Skip to content

Commit 90647bb

Browse files
committed
moved implementation to lib in order to match core structure
1 parent c384a2d commit 90647bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+226
-105
lines changed
-54.7 KB
Binary file not shown.

app/assets/images/icons/bootstrap-icons.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/concepts/matestack/ui/bootstrap/base_component.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/concepts/matestack/ui/bootstrap/base_vue_js_component.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/helpers/matestack/ui/bootstrap/application_helper.rb

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/javascript/matestack-ui-bootstrap/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55

66
import "./stylesheets/matestack-ui-bootstrap.scss";
77

8-
import '../../concepts/matestack/ui/bootstrap/components/alert'
9-
import '../../concepts/matestack/ui/bootstrap/components/carousel'
10-
import '../../concepts/matestack/ui/bootstrap/components/collapse'
11-
import '../../concepts/matestack/ui/bootstrap/components/dropdown'
12-
import '../../concepts/matestack/ui/bootstrap/components/modal'
13-
import '../../concepts/matestack/ui/bootstrap/components/toast'
14-
import '../../concepts/matestack/ui/bootstrap/components/popover'
15-
import '../../concepts/matestack/ui/bootstrap/components/tooltip'
16-
import '../../concepts/matestack/ui/bootstrap/layout/sidebar'
17-
import '../../concepts/matestack/ui/bootstrap/layout/sidebar.scss'
18-
import '../../concepts/matestack/ui/bootstrap/content/smart_collection/collection.scss'
8+
import '../../../lib/matestack/ui/bootstrap/components/alert'
9+
import '../../../lib/matestack/ui/bootstrap/components/carousel'
10+
import '../../../lib/matestack/ui/bootstrap/components/collapse'
11+
import '../../../lib/matestack/ui/bootstrap/components/dropdown'
12+
import '../../../lib/matestack/ui/bootstrap/components/modal'
13+
import '../../../lib/matestack/ui/bootstrap/components/toast'
14+
import '../../../lib/matestack/ui/bootstrap/components/popover'
15+
import '../../../lib/matestack/ui/bootstrap/components/tooltip'
16+
import '../../../lib/matestack/ui/bootstrap/layout/sidebar'
17+
import '../../../lib/matestack/ui/bootstrap/layout/sidebar.scss'
18+
import '../../../lib/matestack/ui/bootstrap/content/smart_collection/collection.scss'
1919

2020
const MatestackUiBootstrap = {}
2121

lib/matestack/ui/bootstrap.rb

Lines changed: 96 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,106 @@
1-
# require 'trailblazer'
2-
# require 'trailblazer/rails'
3-
# require 'trailblazer/cell'
4-
# require 'cell/rails'
5-
# require 'cell/haml'
6-
71
require "matestack/ui/core"
8-
require "matestack/ui/bootstrap/engine"
2+
3+
base_path = 'matestack/ui/bootstrap'
4+
require "#{base_path}/version"
5+
6+
module Matestack
7+
module Ui
8+
module Bootstrap
9+
end
10+
end
11+
end
12+
13+
require "#{base_path}/base_component"
14+
require "#{base_path}/base_vue_js_component"
15+
16+
module Matestack
17+
module Ui
18+
module Bootstrap
19+
module Apps
20+
end
21+
end
22+
end
23+
end
24+
require "#{base_path}/apps/admin_template"
925

1026
module Matestack
1127
module Ui
1228
module Bootstrap
13-
# https://github.com/rails/webpacker/blob/5-x-stable/docs/engines.md
14-
# ROOT_PATH = Pathname.new(File.expand_path("../../../../", Pathname.new(__FILE__).realpath))
15-
ROOT_PATH = Pathname.new(File.join(__dir__, "../../../"))
16-
17-
class << self
18-
def webpacker
19-
@webpacker ||= ::Webpacker::Instance.new(
20-
root_path: ROOT_PATH,
21-
config_path: ROOT_PATH.join("config/webpacker.yml")
22-
)
29+
module Layout
30+
end
31+
end
32+
end
33+
end
34+
require "#{base_path}/layout/row"
35+
require "#{base_path}/layout/column"
36+
require "#{base_path}/layout/container"
37+
require "#{base_path}/layout/sidebar"
38+
39+
module Matestack
40+
module Ui
41+
module Bootstrap
42+
module Components
43+
end
44+
end
45+
end
46+
end
47+
require "#{base_path}/components/collapse"
48+
require "#{base_path}/components/navbar"
49+
require "#{base_path}/components/page_heading"
50+
require "#{base_path}/components/section_card"
51+
require "#{base_path}/components/carousel"
52+
require "#{base_path}/components/tooltip"
53+
require "#{base_path}/components/alert"
54+
require "#{base_path}/components/breadcrumb"
55+
require "#{base_path}/components/tab_nav"
56+
require "#{base_path}/components/progress"
57+
require "#{base_path}/components/toast"
58+
require "#{base_path}/components/accordion"
59+
require "#{base_path}/components/avatar"
60+
require "#{base_path}/components/close"
61+
require "#{base_path}/components/card"
62+
require "#{base_path}/components/dropdown"
63+
require "#{base_path}/components/modal"
64+
require "#{base_path}/components/list_group"
65+
require "#{base_path}/components/scrollspy"
66+
require "#{base_path}/components/button"
67+
require "#{base_path}/components/spinner"
68+
require "#{base_path}/components/pagination"
69+
require "#{base_path}/components/tab_nav_content"
70+
require "#{base_path}/components/popover"
71+
require "#{base_path}/components/badge"
72+
require "#{base_path}/components/button_group"
73+
require "#{base_path}/components/icon"
74+
75+
module Matestack
76+
module Ui
77+
module Bootstrap
78+
module Content
79+
module SmartCollection
2380
end
2481
end
2582
end
2683
end
2784
end
85+
require "#{base_path}/content/figure"
86+
require "#{base_path}/content/smart_collection/collection"
87+
require "#{base_path}/content/smart_collection/content"
88+
require "#{base_path}/content/smart_collection/filter"
89+
require "#{base_path}/content/smart_collection/paginate"
90+
91+
module Matestack
92+
module Ui
93+
module Bootstrap
94+
module Form
95+
end
96+
end
97+
end
98+
end
99+
require "#{base_path}/form/checkbox"
100+
require "#{base_path}/form/input"
101+
require "#{base_path}/form/radio"
102+
require "#{base_path}/form/select"
103+
require "#{base_path}/form/submit"
104+
require "#{base_path}/form/switch"
105+
106+
require "#{base_path}/registry"

app/concepts/matestack/ui/bootstrap/apps/admin_template.rb renamed to lib/matestack/ui/bootstrap/apps/admin_template.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require_relative "../registry"
2+
13
class Matestack::Ui::Bootstrap::Apps::AdminTemplate < Matestack::Ui::App
24

35
include Matestack::Ui::Bootstrap::Registry
@@ -87,5 +89,4 @@ def content_background_class
8789
"bg-light"
8890
end
8991

90-
9192
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require_relative "./registry"
2+
3+
module Matestack
4+
module Ui
5+
module Bootstrap
6+
class BaseComponent < Matestack::Ui::Component
7+
8+
include Matestack::Ui::Bootstrap::Registry
9+
10+
end
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require_relative "./registry"
2+
3+
module Matestack
4+
module Ui
5+
module Bootstrap
6+
class BaseVueJsComponent < Matestack::Ui::VueJsComponent
7+
8+
include Matestack::Ui::Bootstrap::Registry
9+
10+
end
11+
end
12+
end
13+
end

0 commit comments

Comments
 (0)