m9sh 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.do/app.yaml +25 -0
  3. data/.dockerignore +51 -0
  4. data/.idea/.gitignore +8 -0
  5. data/.idea/aws.xml +17 -0
  6. data/.idea/hotcdn.iml +189 -0
  7. data/.idea/jsLibraryMappings.xml +6 -0
  8. data/.idea/misc.xml +4 -0
  9. data/.idea/modules.xml +8 -0
  10. data/.idea/vcs.xml +6 -0
  11. data/.mise.toml +3 -0
  12. data/.node-version +1 -0
  13. data/Dockerfile +84 -0
  14. data/README.md +230 -0
  15. data/Rakefile +6 -0
  16. data/app/components/m9sh/accordion_component.rb +122 -0
  17. data/app/components/m9sh/alert_component.rb +72 -0
  18. data/app/components/m9sh/alert_dialog_component.rb +100 -0
  19. data/app/components/m9sh/avatar_component.rb +65 -0
  20. data/app/components/m9sh/badge_component.rb +37 -0
  21. data/app/components/m9sh/base_component.rb +21 -0
  22. data/app/components/m9sh/breadcrumb_component.rb +100 -0
  23. data/app/components/m9sh/button_component.rb +54 -0
  24. data/app/components/m9sh/card_component.rb +90 -0
  25. data/app/components/m9sh/checkbox_component.rb +36 -0
  26. data/app/components/m9sh/collapsible_component.rb +47 -0
  27. data/app/components/m9sh/dialog_component.rb +123 -0
  28. data/app/components/m9sh/dropdown_menu_component.rb +27 -0
  29. data/app/components/m9sh/dropdown_menu_content_component.rb +24 -0
  30. data/app/components/m9sh/dropdown_menu_item_component.rb +36 -0
  31. data/app/components/m9sh/dropdown_menu_separator_component.rb +9 -0
  32. data/app/components/m9sh/dropdown_menu_trigger_component.rb +19 -0
  33. data/app/components/m9sh/hover_card_component.rb +48 -0
  34. data/app/components/m9sh/input_component.rb +33 -0
  35. data/app/components/m9sh/label_component.rb +27 -0
  36. data/app/components/m9sh/main_component.rb +16 -0
  37. data/app/components/m9sh/navigation_menu_component.rb +95 -0
  38. data/app/components/m9sh/popover_component.rb +47 -0
  39. data/app/components/m9sh/progress_component.rb +46 -0
  40. data/app/components/m9sh/radio_group_component.rb +88 -0
  41. data/app/components/m9sh/select_component.rb +51 -0
  42. data/app/components/m9sh/separator_component.rb +40 -0
  43. data/app/components/m9sh/sheet_component.rb +123 -0
  44. data/app/components/m9sh/sidebar_component.rb +126 -0
  45. data/app/components/m9sh/sidebar_group_component.rb +51 -0
  46. data/app/components/m9sh/sidebar_inset_component.rb +16 -0
  47. data/app/components/m9sh/sidebar_menu_button_component.rb +56 -0
  48. data/app/components/m9sh/sidebar_menu_component.rb +16 -0
  49. data/app/components/m9sh/sidebar_menu_item_component.rb +16 -0
  50. data/app/components/m9sh/sidebar_provider_component.rb +29 -0
  51. data/app/components/m9sh/sidebar_trigger_component.rb +44 -0
  52. data/app/components/m9sh/skeleton_component.rb +32 -0
  53. data/app/components/m9sh/slider_component.rb +83 -0
  54. data/app/components/m9sh/spinner_component.rb +46 -0
  55. data/app/components/m9sh/switch_component.rb +47 -0
  56. data/app/components/m9sh/table_component.rb +111 -0
  57. data/app/components/m9sh/tabs_component.rb +92 -0
  58. data/app/components/m9sh/textarea_component.rb +44 -0
  59. data/app/components/m9sh/theme_toggle_component.rb +88 -0
  60. data/app/components/m9sh/toast_component.rb +86 -0
  61. data/app/components/m9sh/toaster_component.rb +20 -0
  62. data/app/components/m9sh/toggle_component.rb +64 -0
  63. data/app/components/m9sh/tooltip_component.rb +48 -0
  64. data/app/components/m9sh/typography_component.rb +56 -0
  65. data/app/components/m9sh/utilities.rb +26 -0
  66. data/app/javascript/controllers/m9sh/accordion_controller.js +110 -0
  67. data/app/javascript/controllers/m9sh/alert_dialog_controller.js +47 -0
  68. data/app/javascript/controllers/m9sh/collapsible_controller.js +57 -0
  69. data/app/javascript/controllers/m9sh/dialog_controller.js +119 -0
  70. data/app/javascript/controllers/m9sh/dropdown_menu_controller.js +103 -0
  71. data/app/javascript/controllers/m9sh/hover_card_controller.js +66 -0
  72. data/app/javascript/controllers/m9sh/navigation_menu_controller.js +219 -0
  73. data/app/javascript/controllers/m9sh/popover_controller.js +113 -0
  74. data/app/javascript/controllers/m9sh/radio_controller.js +59 -0
  75. data/app/javascript/controllers/m9sh/sheet_controller.js +46 -0
  76. data/app/javascript/controllers/m9sh/sidebar_controller.js +114 -0
  77. data/app/javascript/controllers/m9sh/sidebar_provider_controller.js +12 -0
  78. data/app/javascript/controllers/m9sh/slider_controller.js +90 -0
  79. data/app/javascript/controllers/m9sh/switch_controller.js +33 -0
  80. data/app/javascript/controllers/m9sh/tabs_controller.js +51 -0
  81. data/app/javascript/controllers/m9sh/theme_controller.js +50 -0
  82. data/app/javascript/controllers/m9sh/toast_controller.js +46 -0
  83. data/app/javascript/controllers/m9sh/toaster_controller.js +70 -0
  84. data/app/javascript/controllers/m9sh/toggle_controller.js +27 -0
  85. data/app/javascript/controllers/m9sh/tooltip_controller.js +86 -0
  86. data/components.json +21 -0
  87. data/config.ru +6 -0
  88. data/exe/m9sh +12 -0
  89. data/fix_namespaces.py +32 -0
  90. data/fly.toml +30 -0
  91. data/koyeb.yaml +26 -0
  92. data/lib/m9sh/cli.rb +234 -0
  93. data/lib/m9sh/config.rb +114 -0
  94. data/lib/m9sh/generator.rb +183 -0
  95. data/lib/m9sh/registry.rb +107 -0
  96. data/lib/m9sh/registry.yml +384 -0
  97. data/lib/m9sh/version.rb +5 -0
  98. data/lib/m9sh.rb +11 -0
  99. data/package-lock.json +99 -0
  100. data/package.json +28 -0
  101. data/pnpm-lock.yaml +75 -0
  102. data/tailwind.config.js +93 -0
  103. data/update_namespace.py +73 -0
  104. metadata +208 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 15abe8ca859f94770761794841f7844ec485314e25a084a491e784f20212fb6a
4
+ data.tar.gz: f28037d63d39224a79783679285a7f7906a8ce616c924f06626b44ee6cbf57be
5
+ SHA512:
6
+ metadata.gz: d2a92e62142a02eab15c3925c76365587a49cdf026a15f6d823ff1e12f554f0fc041ded166126ee889c8664414f18233b432c2fd973388a446df44225386087c
7
+ data.tar.gz: 32192a8c31a70aac61c036be5c23ede466f4d9e754899cc738b3dda97f32ebed4aff05a4d9c26581db1b476127b2d0cd7003125c99e89758906bd2ee1b511d88
data/.do/app.yaml ADDED
@@ -0,0 +1,25 @@
1
+ name: m9sh-ui
2
+ region: nyc
3
+ services:
4
+ - name: web
5
+ github:
6
+ repo: veas-org/m9sh
7
+ branch: main
8
+ deploy_on_push: true
9
+ dockerfile_path: Dockerfile
10
+ http_port: 3000
11
+ instance_count: 1
12
+ instance_size_slug: basic-xxs
13
+ routes:
14
+ - path: /
15
+ envs:
16
+ - key: RAILS_ENV
17
+ value: production
18
+ - key: RAILS_LOG_TO_STDOUT
19
+ value: "true"
20
+ - key: RAILS_SERVE_STATIC_FILES
21
+ value: "true"
22
+ - key: SECRET_KEY_BASE
23
+ scope: RUN_AND_BUILD_TIME
24
+ type: SECRET
25
+ value: "513f871313734193bdf9a1b4a32c5e5db614252e4909397e14789bc164f25df19941883bb7a91da4f5e79d0da61964709566c1edbfafaed49f310d2034d506e3"
data/.dockerignore ADDED
@@ -0,0 +1,51 @@
1
+ # See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
2
+
3
+ # Ignore git directory.
4
+ /.git/
5
+ /.gitignore
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore all environment files.
11
+ /.env*
12
+
13
+ # Ignore all default key files.
14
+ /config/master.key
15
+ /config/credentials/*.key
16
+
17
+ # Ignore all logfiles and tempfiles.
18
+ /log/*
19
+ /tmp/*
20
+ !/log/.keep
21
+ !/tmp/.keep
22
+
23
+ # Ignore pidfiles, but keep the directory.
24
+ /tmp/pids/*
25
+ !/tmp/pids/.keep
26
+
27
+ # Ignore storage (uploaded files in development and any SQLite databases).
28
+ /storage/*
29
+ !/storage/.keep
30
+ /tmp/storage/*
31
+ !/tmp/storage/.keep
32
+
33
+ # Ignore assets.
34
+ /node_modules/
35
+ /app/assets/builds/*
36
+ !/app/assets/builds/.keep
37
+ /public/assets
38
+
39
+ # Ignore CI service files.
40
+ /.github
41
+
42
+ # Ignore Kamal files.
43
+ /config/deploy*.yml
44
+ /.kamal
45
+
46
+ # Ignore development files
47
+ /.devcontainer
48
+
49
+ # Ignore Docker-related files
50
+ /.dockerignore
51
+ /Dockerfile*
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
data/.idea/aws.xml ADDED
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="accountSettings">
4
+ <option name="activeProfile" value="profile:default" />
5
+ <option name="activeRegion" value="us-east-1" />
6
+ <option name="recentlyUsedProfiles">
7
+ <list>
8
+ <option value="profile:default" />
9
+ </list>
10
+ </option>
11
+ <option name="recentlyUsedRegions">
12
+ <list>
13
+ <option value="us-east-1" />
14
+ </list>
15
+ </option>
16
+ </component>
17
+ </project>
data/.idea/hotcdn.iml ADDED
@@ -0,0 +1,189 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="FacetManager">
4
+ <facet type="RailsFacetType" name="Ruby on Rails">
5
+ <configuration>
6
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
7
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
8
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
9
+ </configuration>
10
+ </facet>
11
+ </component>
12
+ <component name="ModuleRunConfigurationManager">
13
+ <shared />
14
+ </component>
15
+ <component name="NewModuleRootManager">
16
+ <content url="file://$MODULE_DIR$">
17
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
18
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
19
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
20
+ <excludeFolder url="file://$MODULE_DIR$/.bundle" />
21
+ <excludeFolder url="file://$MODULE_DIR$/components" />
22
+ <excludeFolder url="file://$MODULE_DIR$/log" />
23
+ <excludeFolder url="file://$MODULE_DIR$/public/packs" />
24
+ <excludeFolder url="file://$MODULE_DIR$/public/system" />
25
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
26
+ <excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
27
+ <excludeFolder url="file://$MODULE_DIR$/vendor/cache" />
28
+ </content>
29
+ <orderEntry type="inheritedJdk" />
30
+ <orderEntry type="sourceFolder" forTests="false" />
31
+ <orderEntry type="library" scope="PROVIDED" name="base64 (v0.3.0, mise: 3.4.6) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="benchmark (v0.4.1, mise: 3.4.6) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="bindex (v0.8.1, mise: 3.4.6) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="bootsnap (v1.18.6, mise: 3.4.6) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.3.0, mise: 3.4.6) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.7.2, mise: 3.4.6) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.3.5, mise: 3.4.6) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.5.4, mise: 3.4.6) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, mise: 3.4.6) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="date (v3.4.1, mise: 3.4.6) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="debug (v1.11.0, mise: 3.4.6) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="drb (v2.2.3, mise: 3.4.6) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="error_highlight (v0.7.0, mise: 3.4.6) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="erubi (v1.13.1, mise: 3.4.6) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="globalid (v1.3.0, mise: 3.4.6) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.14.7, mise: 3.4.6) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="importmap-rails (v2.2.2, mise: 3.4.6) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.8.1, mise: 3.4.6) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="irb (v1.15.2, mise: 3.4.6) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.14.1, mise: 3.4.6) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="logger (v1.7.0, mise: 3.4.6) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="loofah (v2.24.1, mise: 3.4.6) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="mail (v2.8.1, mise: 3.4.6) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="marcel (v1.1.0, mise: 3.4.6) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="method_source (v1.1.0, mise: 3.4.6) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.5, mise: 3.4.6) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="msgpack (v1.8.0, mise: 3.4.6) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="mutex_m (v0.3.0, mise: 3.4.6) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="net-pop (v0.1.2, mise: 3.4.6) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="net-protocol (v0.2.2, mise: 3.4.6) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.5.1, mise: 3.4.6) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="nio4r (v2.7.4, mise: 3.4.6) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.18.10, mise: 3.4.6) [gem]" level="application" />
64
+ <orderEntry type="library" scope="PROVIDED" name="prettyprint (v0.2.0, mise: 3.4.6) [gem]" level="application" />
65
+ <orderEntry type="library" scope="PROVIDED" name="psych (v5.2.6, mise: 3.4.6) [gem]" level="application" />
66
+ <orderEntry type="library" scope="PROVIDED" name="puma (v7.0.4, mise: 3.4.6) [gem]" level="application" />
67
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.8.1, mise: 3.4.6) [gem]" level="application" />
68
+ <orderEntry type="library" scope="PROVIDED" name="rack-session (v2.1.1, mise: 3.4.6) [gem]" level="application" />
69
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.2.0, mise: 3.4.6) [gem]" level="application" />
70
+ <orderEntry type="library" scope="PROVIDED" name="rackup (v2.2.1, mise: 3.4.6) [gem]" level="application" />
71
+ <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.3.0, mise: 3.4.6) [gem]" level="application" />
72
+ <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.6.2, mise: 3.4.6) [gem]" level="application" />
73
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.3.0, mise: 3.4.6) [gem]" level="application" />
74
+ <orderEntry type="library" scope="PROVIDED" name="redis (v5.4.1, mise: 3.4.6) [gem]" level="application" />
75
+ <orderEntry type="library" scope="PROVIDED" name="redis-client (v0.26.1, mise: 3.4.6) [gem]" level="application" />
76
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.6.2, mise: 3.4.6) [gem]" level="application" />
77
+ <orderEntry type="library" scope="PROVIDED" name="securerandom (v0.4.1, mise: 3.4.6) [gem]" level="application" />
78
+ <orderEntry type="library" scope="PROVIDED" name="stimulus-rails (v1.3.4, mise: 3.4.6) [gem]" level="application" />
79
+ <orderEntry type="library" scope="PROVIDED" name="stringio (v3.1.7, mise: 3.4.6) [gem]" level="application" />
80
+ <orderEntry type="library" scope="PROVIDED" name="thor (v1.4.0, mise: 3.4.6) [gem]" level="application" />
81
+ <orderEntry type="library" scope="PROVIDED" name="timeout (v0.4.3, mise: 3.4.6) [gem]" level="application" />
82
+ <orderEntry type="library" scope="PROVIDED" name="tsort (v0.2.0, mise: 3.4.6) [gem]" level="application" />
83
+ <orderEntry type="library" scope="PROVIDED" name="turbo-rails (v2.0.17, mise: 3.4.6) [gem]" level="application" />
84
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.6, mise: 3.4.6) [gem]" level="application" />
85
+ <orderEntry type="library" scope="PROVIDED" name="view_component (v3.23.2, mise: 3.4.6) [gem]" level="application" />
86
+ <orderEntry type="library" scope="PROVIDED" name="web-console (v4.2.1, mise: 3.4.6) [gem]" level="application" />
87
+ <orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.8.0, mise: 3.4.6) [gem]" level="application" />
88
+ <orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, mise: 3.4.6) [gem]" level="application" />
89
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.7.3, mise: 3.4.6) [gem]" level="application" />
90
+ </component>
91
+ <component name="RailsPaths" isManagedAutomatically="true">
92
+ <entry key="app">
93
+ <value>file://$MODULE_DIR$/app</value>
94
+ </entry>
95
+ <entry key="app/assets">
96
+ <value>file://$MODULE_DIR$/app/assets</value>
97
+ </entry>
98
+ <entry key="app/channels">
99
+ <value>file://$MODULE_DIR$/app/channels</value>
100
+ </entry>
101
+ <entry key="app/controllers">
102
+ <value>file://$MODULE_DIR$/app/controllers</value>
103
+ </entry>
104
+ <entry key="app/helpers">
105
+ <value>file://$MODULE_DIR$/app/helpers</value>
106
+ </entry>
107
+ <entry key="app/mailers">
108
+ <value>file://$MODULE_DIR$/app/mailers</value>
109
+ </entry>
110
+ <entry key="app/models">
111
+ <value>file://$MODULE_DIR$/app/models</value>
112
+ </entry>
113
+ <entry key="app/views">
114
+ <value>file://$MODULE_DIR$/app/views</value>
115
+ </entry>
116
+ <entry key="config">
117
+ <value>file://$MODULE_DIR$/config</value>
118
+ </entry>
119
+ <entry key="config/cable">
120
+ <value>file://$MODULE_DIR$/config/cable.yml</value>
121
+ </entry>
122
+ <entry key="config/database">
123
+ <value>file://$MODULE_DIR$/config/database.yml</value>
124
+ </entry>
125
+ <entry key="config/environment">
126
+ <value>file://$MODULE_DIR$/config/environment.rb</value>
127
+ </entry>
128
+ <entry key="config/environments">
129
+ <value>file://$MODULE_DIR$/config/environments</value>
130
+ </entry>
131
+ <entry key="config/initializers">
132
+ <value>file://$MODULE_DIR$/config/initializers</value>
133
+ </entry>
134
+ <entry key="config/locales">
135
+ <value>file://$MODULE_DIR$/config/locales</value>
136
+ </entry>
137
+ <entry key="config/routes">
138
+ <value>file://$MODULE_DIR$/config/routes</value>
139
+ </entry>
140
+ <entry key="config/routes.rb">
141
+ <value>file://$MODULE_DIR$/config/routes.rb</value>
142
+ </entry>
143
+ <entry key="config/secrets">
144
+ <value>file://$MODULE_DIR$/config</value>
145
+ </entry>
146
+ <entry key="db">
147
+ <value>file://$MODULE_DIR$/db</value>
148
+ </entry>
149
+ <entry key="db/migrate">
150
+ <value>file://$MODULE_DIR$/db/migrate</value>
151
+ </entry>
152
+ <entry key="db/seeds.rb">
153
+ <value>file://$MODULE_DIR$/db/seeds.rb</value>
154
+ </entry>
155
+ <entry key="lib">
156
+ <value>file://$MODULE_DIR$/lib</value>
157
+ </entry>
158
+ <entry key="lib/assets">
159
+ <value>file://$MODULE_DIR$/lib/assets</value>
160
+ </entry>
161
+ <entry key="lib/tasks">
162
+ <value>file://$MODULE_DIR$/lib/tasks</value>
163
+ </entry>
164
+ <entry key="lib/templates">
165
+ <value>file://$MODULE_DIR$/lib/templates</value>
166
+ </entry>
167
+ <entry key="log">
168
+ <value>file://$MODULE_DIR$/log/development.log</value>
169
+ </entry>
170
+ <entry key="public">
171
+ <value>file://$MODULE_DIR$/public</value>
172
+ </entry>
173
+ <entry key="public/javascripts">
174
+ <value>file://$MODULE_DIR$/public/javascripts</value>
175
+ </entry>
176
+ <entry key="public/stylesheets">
177
+ <value>file://$MODULE_DIR$/public/stylesheets</value>
178
+ </entry>
179
+ <entry key="tmp">
180
+ <value>file://$MODULE_DIR$/tmp</value>
181
+ </entry>
182
+ <entry key="vendor">
183
+ <value>file://$MODULE_DIR$/vendor</value>
184
+ </entry>
185
+ <entry key="vendor/assets">
186
+ <value>file://$MODULE_DIR$/vendor/assets</value>
187
+ </entry>
188
+ </component>
189
+ </module>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptLibraryMappings">
4
+ <excludedPredefinedLibrary name="hotcdn/shacdn/node_modules" />
5
+ </component>
6
+ </project>
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="mise: 3.4.6" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/hotcdn.iml" filepath="$PROJECT_DIR$/.idea/hotcdn.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.mise.toml ADDED
@@ -0,0 +1,3 @@
1
+ [tools]
2
+ ruby = "3.3.0"
3
+ node = "20"
data/.node-version ADDED
@@ -0,0 +1 @@
1
+ 20.19.5
data/Dockerfile ADDED
@@ -0,0 +1,84 @@
1
+ # syntax=docker/dockerfile:1
2
+ # check=error=true
3
+
4
+ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
5
+ ARG RUBY_VERSION=3.3.0
6
+ FROM ruby:$RUBY_VERSION-slim AS base
7
+
8
+ # Rails app lives here
9
+ WORKDIR /rails
10
+
11
+ # Update gems and bundler
12
+ RUN gem update --system --no-document && \
13
+ gem install -N bundler
14
+
15
+ # Install base packages
16
+ RUN apt-get update -qq && \
17
+ apt-get install --no-install-recommends -y curl libjemalloc2 postgresql-client sqlite3 && \
18
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
19
+
20
+ # Set production environment
21
+ ENV BUNDLE_DEPLOYMENT="1" \
22
+ BUNDLE_PATH="/usr/local/bundle" \
23
+ BUNDLE_WITHOUT="development:test" \
24
+ RAILS_ENV="production"
25
+
26
+
27
+ # Throw-away build stage to reduce size of final image
28
+ FROM base AS build
29
+
30
+ # Install packages needed to build gems and node modules
31
+ RUN apt-get update -qq && \
32
+ apt-get install --no-install-recommends -y build-essential libpq-dev libyaml-dev node-gyp pkg-config python-is-python3 && \
33
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
34
+
35
+ # Install Node.js
36
+ ARG NODE_VERSION=20.19.5
37
+ ENV PATH=/usr/local/node/bin:$PATH
38
+ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
39
+ /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
40
+ rm -rf /tmp/node-build-master
41
+
42
+ # Install application gems
43
+ COPY Gemfile Gemfile.lock ./
44
+ RUN bundle install && \
45
+ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
46
+ bundle exec bootsnap precompile --gemfile
47
+
48
+ # Install node modules
49
+ COPY package.json package-lock.json ./
50
+ RUN npm install
51
+
52
+ # Copy application code
53
+ COPY . .
54
+
55
+ # Build CSS using Tailwind CLI before Rails asset precompilation
56
+ RUN npm run build:css
57
+
58
+ # Precompile bootsnap code for faster boot times
59
+ RUN bundle exec bootsnap precompile app/ lib/
60
+
61
+ # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
62
+ RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
63
+
64
+
65
+ # Final stage for app image
66
+ FROM base
67
+
68
+
69
+ # Copy built artifacts: gems, application
70
+ COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
71
+ COPY --from=build /rails /rails
72
+
73
+ # Run and own only the runtime files as a non-root user for security
74
+ RUN groupadd --system --gid 1000 rails && \
75
+ useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
76
+ chown -R 1000:1000 /rails
77
+ USER 1000:1000
78
+
79
+ # Entrypoint prepares the database.
80
+ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
81
+
82
+ # Start the server by default, this can be overwritten at runtime
83
+ EXPOSE 3000
84
+ CMD ["./bin/rails", "server", "-b", "0.0.0.0"]
data/README.md ADDED
@@ -0,0 +1,230 @@
1
+ # HotCDN - shadcn Components for Rails & Hotwire
2
+
3
+ Beautiful, accessible UI components for Rails applications using Hotwire, inspired by [shadcn/ui](https://ui.shadcn.com).
4
+
5
+ ## Features
6
+
7
+ - 🚀 **Rails Native** - Built specifically for Rails with ViewComponent
8
+ - ⚡ **Hotwire Powered** - Interactive components using Stimulus controllers
9
+ - 🎨 **Tailwind CSS v4** - Modern styling with the latest Tailwind features
10
+ - ♿ **Accessible** - ARIA compliant components
11
+ - 🌙 **Dark Mode** - Built-in dark mode support
12
+ - 📦 **Copy & Paste** - Components you can customize and own
13
+
14
+ ## Components
15
+
16
+ ### Basic Components
17
+ - ✅ **Button** - Multiple variants (default, outline, ghost, destructive, etc.)
18
+ - ✅ **Card** - Flexible container with header, content, and footer slots
19
+ - ✅ **Badge** - Status indicators with variants
20
+
21
+ ### Form Components
22
+ - ✅ **Input** - Text inputs with consistent styling
23
+ - ✅ **Select** - Dropdown select with custom styling
24
+ - ✅ **Checkbox** - Custom styled checkboxes
25
+ - ✅ **Switch** - Toggle switches with Stimulus interactivity
26
+
27
+ ### Interactive Components
28
+ - ✅ **Accordion** - Collapsible sections with smooth animations
29
+ - ✅ **Dialog/Modal** - Accessible modals with backdrop
30
+ - ✅ **Tabs** - Tab navigation with Stimulus controllers
31
+ - 🚧 **Dropdown Menu** - Context menus (coming soon)
32
+ - 🚧 **Toast** - Notification system (coming soon)
33
+
34
+ ## Requirements
35
+
36
+ - Ruby 3.3.0+
37
+ - Rails 7.1+
38
+ - Node.js 20+
39
+ - Tailwind CSS v4
40
+
41
+ ## Installation
42
+
43
+ 1. **Clone the repository**
44
+ ```bash
45
+ git clone https://github.com/yourusername/hotcdn.git
46
+ cd hotcdn
47
+ ```
48
+
49
+ 2. **Install Ruby dependencies**
50
+ ```bash
51
+ # Using mise for Ruby version management
52
+ mise install
53
+ bundle install
54
+ ```
55
+
56
+ 3. **Install JavaScript dependencies**
57
+ ```bash
58
+ npm install
59
+ ```
60
+
61
+ 4. **Setup database** (if using Rails with database)
62
+ ```bash
63
+ rails db:create
64
+ rails db:migrate
65
+ ```
66
+
67
+ 5. **Start the Rails server**
68
+ ```bash
69
+ rails server
70
+ ```
71
+
72
+ 6. **In another terminal, start the Tailwind watcher**
73
+ ```bash
74
+ npx tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --watch
75
+ ```
76
+
77
+ 7. **Visit the showcase**
78
+ Open [http://localhost:3000](http://localhost:3000) to see all components in action.
79
+
80
+ ## Usage
81
+
82
+ ### Using Components in Your Views
83
+
84
+ Components are used via ViewComponent's `render` method:
85
+
86
+ ```erb
87
+ # Button component
88
+ <%= render Hotcdn::ButtonComponent.new(variant: :primary, size: :lg) do %>
89
+ Click Me!
90
+ <% end %>
91
+
92
+ # Card component with slots
93
+ <%= render Hotcdn::CardComponent.new do |card| %>
94
+ <% card.with_title do %>
95
+ Card Title
96
+ <% end %>
97
+ <% card.with_description do %>
98
+ Card description
99
+ <% end %>
100
+ Your content here
101
+ <% end %>
102
+
103
+ # Form components
104
+ <%= render Hotcdn::InputComponent.new(
105
+ type: "email",
106
+ placeholder: "Enter email",
107
+ name: "user[email]"
108
+ ) %>
109
+
110
+ <%= render Hotcdn::SwitchComponent.new(
111
+ name: "settings[notifications]",
112
+ checked: true
113
+ ) %>
114
+ ```
115
+
116
+ ### Interactive Components with Stimulus
117
+
118
+ Components like Accordion, Dialog, and Tabs use Stimulus controllers:
119
+
120
+ ```erb
121
+ # Accordion
122
+ <%= render Hotcdn::AccordionComponent.new(type: "single", collapsible: true) do |accordion| %>
123
+ <% accordion.with_item(value: "item-1") do |item| %>
124
+ <% item.with_trigger do %>
125
+ Click to expand
126
+ <% end %>
127
+ <% item.with_content do %>
128
+ Hidden content revealed here
129
+ <% end %>
130
+ <% end %>
131
+ <% end %>
132
+
133
+ # Dialog/Modal
134
+ <%= render Hotcdn::DialogComponent.new do |dialog| %>
135
+ <% dialog.with_trigger do %>
136
+ <%= render Hotcdn::ButtonComponent.new do %>
137
+ Open Modal
138
+ <% end %>
139
+ <% end %>
140
+
141
+ <% dialog.with_title do %>
142
+ Modal Title
143
+ <% end %>
144
+
145
+ Modal content goes here
146
+ <% end %>
147
+ ```
148
+
149
+ ## Customization
150
+
151
+ ### Tailwind Configuration
152
+
153
+ Modify `config/tailwind.config.js` to customize colors, spacing, and other design tokens:
154
+
155
+ ```javascript
156
+ module.exports = {
157
+ theme: {
158
+ extend: {
159
+ colors: {
160
+ primary: {
161
+ DEFAULT: "hsl(var(--primary))",
162
+ foreground: "hsl(var(--primary-foreground))",
163
+ },
164
+ // Add your custom colors
165
+ }
166
+ }
167
+ }
168
+ }
169
+ ```
170
+
171
+ ### CSS Variables
172
+
173
+ The theme uses CSS custom properties defined in `app/assets/stylesheets/application.tailwind.css`:
174
+
175
+ ```css
176
+ @theme {
177
+ --color-primary: oklch(25.2% 0.08 222.2);
178
+ --color-primary-foreground: oklch(98% 0.01 210);
179
+ /* Modify these values for your brand */
180
+ }
181
+ ```
182
+
183
+ ## Project Structure
184
+
185
+ ```
186
+ hotcdn/
187
+ ├── app/
188
+ │ ├── components/
189
+ │ │ └── hotcdn/ # ViewComponent classes
190
+ │ │ ├── base_component.rb
191
+ │ │ ├── button_component.rb
192
+ │ │ ├── card_component.rb
193
+ │ │ └── ...
194
+ │ ├── javascript/
195
+ │ │ └── controllers/
196
+ │ │ └── hotcdn/ # Stimulus controllers
197
+ │ │ ├── accordion_controller.js
198
+ │ │ ├── dialog_controller.js
199
+ │ │ └── ...
200
+ │ ├── views/
201
+ │ │ └── showcase/ # Demo pages
202
+ │ │ └── index.html.erb
203
+ │ └── assets/
204
+ │ └── stylesheets/
205
+ │ └── application.tailwind.css
206
+ ├── config/
207
+ │ ├── routes.rb
208
+ │ └── tailwind.config.js
209
+ └── Gemfile
210
+ ```
211
+
212
+ ## Contributing
213
+
214
+ Contributions are welcome! Please feel free to submit a Pull Request.
215
+
216
+ ## License
217
+
218
+ MIT License - feel free to use this in your projects.
219
+
220
+ ## Credits
221
+
222
+ - Inspired by [shadcn/ui](https://ui.shadcn.com)
223
+ - Built with [Ruby on Rails](https://rubyonrails.org)
224
+ - Powered by [Hotwire](https://hotwired.dev)
225
+ - Styled with [Tailwind CSS](https://tailwindcss.com)
226
+ - Components via [ViewComponent](https://viewcomponent.org)
227
+
228
+ ## Support
229
+
230
+ If you find this helpful, please give it a ⭐ on GitHub!# m9sh
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative "config/application"
5
+
6
+ Rails.application.load_tasks