kiso 0.3.0.pre → 0.4.1.pre

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 (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -1
  3. data/README.md +16 -3
  4. data/app/assets/tailwind/kiso/engine.css +40 -28
  5. data/app/assets/tailwind/kiso/palettes/blue.css +65 -0
  6. data/app/assets/tailwind/kiso/palettes/green.css +65 -0
  7. data/app/assets/tailwind/kiso/palettes/orange.css +65 -0
  8. data/app/assets/tailwind/kiso/palettes/violet.css +65 -0
  9. data/app/assets/tailwind/kiso/palettes/zinc.css +65 -0
  10. data/app/helpers/kiso/app_component_helper.rb +63 -0
  11. data/app/helpers/kiso/component_helper.rb +140 -24
  12. data/app/helpers/kiso/ui_context_helper.rb +59 -0
  13. data/app/javascript/controllers/kiso/alert_controller.js +33 -0
  14. data/app/javascript/controllers/kiso/index.js +3 -0
  15. data/app/views/kiso/components/_alert.html.erb +19 -3
  16. data/app/views/kiso/components/_alert_dialog.html.erb +2 -2
  17. data/app/views/kiso/components/_app.html.erb +7 -0
  18. data/app/views/kiso/components/_avatar.html.erb +3 -3
  19. data/app/views/kiso/components/_breadcrumb.html.erb +1 -1
  20. data/app/views/kiso/components/_color_mode_button.html.erb +1 -1
  21. data/app/views/kiso/components/_color_mode_select.html.erb +4 -4
  22. data/app/views/kiso/components/_container.html.erb +7 -0
  23. data/app/views/kiso/components/_dashboard_sidebar.html.erb +1 -1
  24. data/app/views/kiso/components/_dialog.html.erb +2 -2
  25. data/app/views/kiso/components/_footer.html.erb +7 -0
  26. data/app/views/kiso/components/_header.html.erb +7 -0
  27. data/app/views/kiso/components/_main.html.erb +7 -0
  28. data/app/views/kiso/components/_page.html.erb +7 -0
  29. data/app/views/kiso/components/_page_body.html.erb +7 -0
  30. data/app/views/kiso/components/_page_card.html.erb +40 -0
  31. data/app/views/kiso/components/_page_grid.html.erb +7 -0
  32. data/app/views/kiso/components/_page_header.html.erb +38 -0
  33. data/app/views/kiso/components/_page_section.html.erb +11 -0
  34. data/app/views/kiso/components/_pagination.html.erb +1 -1
  35. data/app/views/kiso/components/_select_native.html.erb +3 -3
  36. data/app/views/kiso/components/_skeleton.html.erb +5 -0
  37. data/app/views/kiso/components/_slider.html.erb +4 -4
  38. data/app/views/kiso/components/_switch.html.erb +2 -2
  39. data/app/views/kiso/components/alert/_actions.html.erb +7 -0
  40. data/app/views/kiso/components/breadcrumb/_ellipsis.html.erb +1 -1
  41. data/app/views/kiso/components/combobox/_input.html.erb +1 -1
  42. data/app/views/kiso/components/combobox/_item.html.erb +2 -2
  43. data/app/views/kiso/components/combobox/_list.html.erb +2 -1
  44. data/app/views/kiso/components/command/_group.html.erb +2 -2
  45. data/app/views/kiso/components/command/_input.html.erb +3 -2
  46. data/app/views/kiso/components/command/_list.html.erb +2 -1
  47. data/app/views/kiso/components/dashboard_navbar/_toggle.html.erb +1 -1
  48. data/app/views/kiso/components/dashboard_sidebar/_collapse.html.erb +1 -1
  49. data/app/views/kiso/components/dashboard_sidebar/_toggle.html.erb +1 -1
  50. data/app/views/kiso/components/dialog/_close.html.erb +1 -1
  51. data/app/views/kiso/components/nav/_item.html.erb +2 -2
  52. data/app/views/kiso/components/nav/_section.html.erb +5 -5
  53. data/app/views/kiso/components/page/_center.html.erb +7 -0
  54. data/app/views/kiso/components/page/_left.html.erb +7 -0
  55. data/app/views/kiso/components/page/_right.html.erb +7 -0
  56. data/app/views/kiso/components/page_card/_body.html.erb +7 -0
  57. data/app/views/kiso/components/page_card/_description.html.erb +7 -0
  58. data/app/views/kiso/components/page_card/_footer.html.erb +7 -0
  59. data/app/views/kiso/components/page_card/_header.html.erb +7 -0
  60. data/app/views/kiso/components/page_card/_icon.html.erb +7 -0
  61. data/app/views/kiso/components/page_card/_title.html.erb +7 -0
  62. data/app/views/kiso/components/page_header/_description.html.erb +7 -0
  63. data/app/views/kiso/components/page_header/_headline.html.erb +7 -0
  64. data/app/views/kiso/components/page_header/_links.html.erb +7 -0
  65. data/app/views/kiso/components/page_header/_title.html.erb +7 -0
  66. data/app/views/kiso/components/page_section/_body.html.erb +7 -0
  67. data/app/views/kiso/components/page_section/_description.html.erb +7 -0
  68. data/app/views/kiso/components/page_section/_header.html.erb +7 -0
  69. data/app/views/kiso/components/page_section/_headline.html.erb +7 -0
  70. data/app/views/kiso/components/page_section/_links.html.erb +7 -0
  71. data/app/views/kiso/components/page_section/_title.html.erb +7 -0
  72. data/app/views/kiso/components/page_section/_wrapper.html.erb +7 -0
  73. data/app/views/kiso/components/pagination/_ellipsis.html.erb +1 -1
  74. data/app/views/kiso/components/pagination/_next.html.erb +2 -2
  75. data/app/views/kiso/components/pagination/_previous.html.erb +2 -2
  76. data/app/views/kiso/components/select/_item.html.erb +2 -2
  77. data/config/locales/en.yml +33 -0
  78. data/lib/generators/kiso/component/USAGE +35 -0
  79. data/lib/generators/kiso/component/component_generator.rb +104 -0
  80. data/lib/generators/kiso/component/templates/partial.html.erb.tt +5 -0
  81. data/lib/generators/kiso/component/templates/sub_part_partial.html.erb.tt +5 -0
  82. data/lib/generators/kiso/component/templates/sub_part_theme.rb.tt +21 -0
  83. data/lib/generators/kiso/component/templates/theme.rb.tt +21 -0
  84. data/lib/kiso/configuration.rb +40 -0
  85. data/lib/kiso/engine.rb +109 -1
  86. data/lib/kiso/presets/rounded.rb +136 -0
  87. data/lib/kiso/presets/sharp.rb +178 -0
  88. data/lib/kiso/presets.rb +49 -0
  89. data/lib/kiso/theme_overrides.rb +5 -1
  90. data/lib/kiso/themes/alert.rb +24 -11
  91. data/lib/kiso/themes/dashboard.rb +1 -1
  92. data/lib/kiso/themes/layout.rb +78 -0
  93. data/lib/kiso/themes/page.rb +295 -0
  94. data/lib/kiso/themes/skeleton.rb +16 -0
  95. data/lib/kiso/version.rb +1 -1
  96. data/lib/kiso.rb +7 -0
  97. data/lib/tasks/kiso.rake +36 -0
  98. metadata +64 -1
@@ -0,0 +1,78 @@
1
+ module Kiso
2
+ module Themes
3
+ # Root application wrapper. Provides base structure and sets
4
+ # `text-foreground` for dark mode inheritance.
5
+ #
6
+ # @example
7
+ # App.render
8
+ # App.render(center: true)
9
+ #
10
+ # Variants:
11
+ # - +center+ — centers content vertically and horizontally (e.g., login pages)
12
+ App = ClassVariants.build(
13
+ base: "bg-background text-foreground antialiased",
14
+ variants: {
15
+ center: {
16
+ true => "min-h-screen flex items-center justify-center",
17
+ false => ""
18
+ }
19
+ },
20
+ defaults: {center: false}
21
+ )
22
+
23
+ # Content containment with consistent max-width and padding.
24
+ #
25
+ # @example
26
+ # Container.render(size: :default)
27
+ #
28
+ # Variants:
29
+ # - +size+ — :narrow, :default, :wide, :full
30
+ #
31
+ # Nuxt UI base: w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8
32
+ Container = ClassVariants.build(
33
+ base: "mx-auto w-full px-4 sm:px-6 lg:px-8",
34
+ variants: {
35
+ size: {
36
+ narrow: "max-w-3xl",
37
+ default: "max-w-7xl",
38
+ wide: "max-w-screen-2xl",
39
+ full: "max-w-full"
40
+ }
41
+ },
42
+ defaults: {size: :default}
43
+ )
44
+
45
+ # Site/app header. Semantic `<header>` element.
46
+ #
47
+ # @example
48
+ # Header.render
49
+ #
50
+ # No variants — purely structural.
51
+ #
52
+ # Nuxt UI base: bg-default/75 backdrop-blur border-b border-default
53
+ # h-(--ui-header-height) sticky top-0 z-50
54
+ Header = ClassVariants.build(
55
+ base: "bg-background/75 backdrop-blur border-b border-border sticky top-0 z-50"
56
+ )
57
+
58
+ # Site/app footer. Semantic `<footer>` element.
59
+ #
60
+ # @example
61
+ # Footer.render
62
+ #
63
+ # No variants — purely structural.
64
+ Footer = ClassVariants.build(
65
+ base: ""
66
+ )
67
+
68
+ # Primary content area wrapper. Semantic `<main>` element.
69
+ #
70
+ # @example
71
+ # Main.render
72
+ #
73
+ # No variants — purely structural.
74
+ Main = ClassVariants.build(
75
+ base: "flex-1"
76
+ )
77
+ end
78
+ end
@@ -0,0 +1,295 @@
1
+ module Kiso
2
+ module Themes
3
+ # Page layout wrapper with optional left/right sidebar grid.
4
+ #
5
+ # Provides a responsive grid that switches from stacked (mobile) to
6
+ # a 10-column grid (desktop). Left and right sidebars each take 2
7
+ # columns, the center adjusts automatically.
8
+ #
9
+ # @example
10
+ # Page.render
11
+ #
12
+ # Sub-parts: {PageLeft}, {PageCenter}, {PageRight}
13
+ #
14
+ # Nuxt UI base: flex flex-col lg:grid lg:grid-cols-10 lg:gap-10
15
+ Page = ClassVariants.build(
16
+ base: "flex flex-col lg:grid lg:grid-cols-10 lg:gap-10"
17
+ )
18
+
19
+ # Left sidebar slot — 2 columns on desktop.
20
+ #
21
+ # Nuxt UI: lg:col-span-2
22
+ PageLeft = ClassVariants.build(
23
+ base: "lg:col-span-2"
24
+ )
25
+
26
+ # Center content area — adjusts span based on sidebar presence.
27
+ #
28
+ # Nuxt UI: lg:col-span-8 (default), lg:col-span-6 (both sidebars),
29
+ # lg:col-span-10 (no sidebars)
30
+ PageCenter = ClassVariants.build(
31
+ base: "lg:col-span-8"
32
+ )
33
+
34
+ # Right sidebar slot — 2 columns, ordered first on mobile, last on desktop.
35
+ #
36
+ # Nuxt UI: lg:col-span-2 order-first lg:order-last
37
+ PageRight = ClassVariants.build(
38
+ base: "lg:col-span-2 order-first lg:order-last"
39
+ )
40
+
41
+ # Page header with title, description, and links.
42
+ #
43
+ # Section header for page-level content with border-bottom divider.
44
+ # Supports headline, title, description, and action links.
45
+ #
46
+ # @example
47
+ # PageHeader.render
48
+ #
49
+ # Sub-parts: {PageHeaderHeadline}, {PageHeaderTitle},
50
+ # {PageHeaderDescription}, {PageHeaderLinks}
51
+ #
52
+ # Nuxt UI base: relative border-b border-default py-8
53
+ PageHeader = ClassVariants.build(
54
+ base: "relative border-b border-border py-8 text-foreground"
55
+ )
56
+
57
+ # Inner wrapper for page header content — flex row on desktop.
58
+ #
59
+ # Nuxt UI: flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4
60
+ PageHeaderWrapper = ClassVariants.build(
61
+ base: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4"
62
+ )
63
+
64
+ # Headline eyebrow text above the page header title.
65
+ #
66
+ # Nuxt UI: mb-2.5 text-sm font-semibold text-primary flex items-center gap-1.5
67
+ PageHeaderHeadline = ClassVariants.build(
68
+ base: "mb-2.5 text-sm font-semibold text-primary flex items-center gap-1.5"
69
+ )
70
+
71
+ # Page header title — large bold heading.
72
+ #
73
+ # Nuxt UI: text-3xl sm:text-4xl text-pretty font-bold text-highlighted
74
+ PageHeaderTitle = ClassVariants.build(
75
+ base: "text-3xl sm:text-4xl text-pretty font-bold text-foreground"
76
+ )
77
+
78
+ # Page header description text.
79
+ #
80
+ # Nuxt UI: text-lg text-pretty text-muted
81
+ PageHeaderDescription = ClassVariants.build(
82
+ base: "mt-4 text-lg text-pretty text-muted-foreground"
83
+ )
84
+
85
+ # Action links container in page header.
86
+ #
87
+ # Nuxt UI: flex flex-wrap items-center gap-1.5
88
+ PageHeaderLinks = ClassVariants.build(
89
+ base: "flex flex-wrap items-center gap-1.5"
90
+ )
91
+
92
+ # Page body — main content wrapper with vertical spacing.
93
+ #
94
+ # Nuxt UI base: mt-8 pb-24 space-y-12
95
+ PageBody = ClassVariants.build(
96
+ base: "mt-8 pb-24 space-y-12"
97
+ )
98
+
99
+ # Content section with consistent vertical spacing and optional title.
100
+ #
101
+ # Supports horizontal and vertical orientations. Horizontal uses a
102
+ # 2-column grid for side-by-side content. Vertical centers text.
103
+ #
104
+ # @example
105
+ # PageSection.render(orientation: :vertical)
106
+ #
107
+ # Sub-parts: {PageSectionWrapper}, {PageSectionHeader},
108
+ # {PageSectionTitle}, {PageSectionDescription}, {PageSectionBody},
109
+ # {PageSectionLinks}
110
+ #
111
+ # Nuxt UI base: relative isolate
112
+ PageSection = ClassVariants.build(
113
+ base: "relative isolate text-foreground",
114
+ variants: {
115
+ orientation: {
116
+ horizontal: "",
117
+ vertical: ""
118
+ }
119
+ },
120
+ defaults: {orientation: :horizontal}
121
+ )
122
+
123
+ # Section inner container — switches to grid on desktop.
124
+ #
125
+ # Nuxt UI: flex flex-col lg:grid py-16 sm:py-24 lg:py-32 gap-8 sm:gap-16
126
+ PageSectionContainer = ClassVariants.build(
127
+ base: "flex flex-col lg:grid py-16 sm:py-24 lg:py-32 gap-8 sm:gap-16",
128
+ variants: {
129
+ orientation: {
130
+ horizontal: "lg:grid-cols-2 lg:items-center",
131
+ vertical: ""
132
+ }
133
+ },
134
+ defaults: {orientation: :horizontal}
135
+ )
136
+
137
+ # Section text/content wrapper.
138
+ PageSectionWrapper = ClassVariants.build(
139
+ base: "",
140
+ variants: {
141
+ order: {
142
+ first: "",
143
+ last: "order-last"
144
+ }
145
+ },
146
+ defaults: {order: :first}
147
+ )
148
+
149
+ # Section header for title/description/links grouping.
150
+ PageSectionHeader = ClassVariants.build(
151
+ base: ""
152
+ )
153
+
154
+ # Section headline eyebrow text.
155
+ #
156
+ # Nuxt UI: mb-3 font-semibold text-primary flex items-center gap-1.5
157
+ PageSectionHeadline = ClassVariants.build(
158
+ base: "mb-3 font-semibold text-primary flex items-center gap-1.5",
159
+ variants: {
160
+ orientation: {
161
+ horizontal: "",
162
+ vertical: "justify-center"
163
+ }
164
+ },
165
+ defaults: {orientation: :horizontal}
166
+ )
167
+
168
+ # Section title — large bold heading.
169
+ #
170
+ # Nuxt UI: text-3xl sm:text-4xl lg:text-5xl text-pretty tracking-tight font-bold text-highlighted
171
+ PageSectionTitle = ClassVariants.build(
172
+ base: "text-3xl sm:text-4xl lg:text-5xl text-pretty tracking-tight font-bold text-foreground",
173
+ variants: {
174
+ orientation: {
175
+ horizontal: "",
176
+ vertical: "text-center"
177
+ }
178
+ },
179
+ defaults: {orientation: :horizontal}
180
+ )
181
+
182
+ # Section description text.
183
+ #
184
+ # Nuxt UI: text-base sm:text-lg text-muted
185
+ PageSectionDescription = ClassVariants.build(
186
+ base: "mt-6 text-base sm:text-lg text-muted-foreground",
187
+ variants: {
188
+ orientation: {
189
+ horizontal: "text-pretty",
190
+ vertical: "text-center text-balance"
191
+ }
192
+ },
193
+ defaults: {orientation: :horizontal}
194
+ )
195
+
196
+ # Section body for additional content.
197
+ PageSectionBody = ClassVariants.build(
198
+ base: "mt-8"
199
+ )
200
+
201
+ # Section action links container.
202
+ #
203
+ # Nuxt UI: flex flex-wrap gap-x-6 gap-y-3
204
+ PageSectionLinks = ClassVariants.build(
205
+ base: "mt-8 flex flex-wrap gap-x-6 gap-y-3",
206
+ variants: {
207
+ orientation: {
208
+ horizontal: "",
209
+ vertical: "justify-center"
210
+ }
211
+ },
212
+ defaults: {orientation: :horizontal}
213
+ )
214
+
215
+ # Responsive grid for page cards/features.
216
+ #
217
+ # Nuxt UI base: relative grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8
218
+ PageGrid = ClassVariants.build(
219
+ base: "relative grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8"
220
+ )
221
+
222
+ # Content card for grid/column layouts.
223
+ #
224
+ # Supports outline, soft, subtle, and ghost variants.
225
+ # Ghost variant has no background or border for minimal styling.
226
+ #
227
+ # @example
228
+ # PageCard.render(variant: :outline)
229
+ #
230
+ # Sub-parts: {PageCardHeader}, {PageCardBody}, {PageCardFooter},
231
+ # {PageCardIcon}, {PageCardTitle}, {PageCardDescription}
232
+ #
233
+ # Nuxt UI base: relative flex rounded-lg
234
+ PageCard = ClassVariants.build(
235
+ base: "relative flex rounded-lg text-foreground",
236
+ variants: {
237
+ variant: {
238
+ outline: "bg-background ring ring-inset ring-border",
239
+ soft: "bg-elevated/50",
240
+ subtle: "bg-elevated/50 ring ring-inset ring-border",
241
+ ghost: ""
242
+ }
243
+ },
244
+ defaults: {variant: :outline}
245
+ )
246
+
247
+ # Page card inner container with padding.
248
+ #
249
+ # Nuxt UI: relative flex flex-col flex-1 lg:grid gap-x-8 gap-y-4 p-4 sm:p-6
250
+ PageCardContainer = ClassVariants.build(
251
+ base: "relative flex flex-col flex-1 gap-x-8 gap-y-4 p-4 sm:p-6"
252
+ )
253
+
254
+ # Page card content wrapper.
255
+ PageCardWrapper = ClassVariants.build(
256
+ base: "flex flex-col flex-1 items-start"
257
+ )
258
+
259
+ # Page card header area.
260
+ PageCardHeader = ClassVariants.build(
261
+ base: "mb-4"
262
+ )
263
+
264
+ # Page card body — grows to fill available space.
265
+ PageCardBody = ClassVariants.build(
266
+ base: "flex-1"
267
+ )
268
+
269
+ # Page card footer area.
270
+ PageCardFooter = ClassVariants.build(
271
+ base: "pt-4 mt-auto"
272
+ )
273
+
274
+ # Page card leading icon.
275
+ #
276
+ # Nuxt UI: size-5 shrink-0 text-primary
277
+ PageCardIcon = ClassVariants.build(
278
+ base: "inline-flex items-center mb-2.5 [&_svg]:size-5 [&_svg]:shrink-0 [&_svg]:text-primary"
279
+ )
280
+
281
+ # Page card title text.
282
+ #
283
+ # Nuxt UI: text-base text-pretty font-semibold text-highlighted
284
+ PageCardTitle = ClassVariants.build(
285
+ base: "text-base text-pretty font-semibold text-foreground"
286
+ )
287
+
288
+ # Page card description text.
289
+ #
290
+ # Nuxt UI: text-[15px] text-pretty text-muted
291
+ PageCardDescription = ClassVariants.build(
292
+ base: "mt-1 text-sm text-pretty text-muted-foreground"
293
+ )
294
+ end
295
+ end
@@ -0,0 +1,16 @@
1
+ module Kiso
2
+ module Themes
3
+ # Placeholder element displayed while content is loading.
4
+ #
5
+ # @example
6
+ # Skeleton.render
7
+ #
8
+ # No variants — dimensions set by consumer via css_classes.
9
+ #
10
+ # shadcn base: animate-pulse rounded-md bg-accent
11
+ # Nuxt UI base: animate-pulse rounded-md bg-elevated
12
+ Skeleton = ClassVariants.build(
13
+ base: "animate-pulse rounded-md bg-elevated"
14
+ )
15
+ end
16
+ end
data/lib/kiso/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Kiso
4
4
  # @return [String] the current gem version
5
- VERSION = "0.3.0.pre"
5
+ VERSION = "0.4.1.pre"
6
6
  end
data/lib/kiso.rb CHANGED
@@ -4,6 +4,7 @@ require "class_variants"
4
4
  require "tailwind_merge"
5
5
  require "kiso/version"
6
6
  require "kiso/configuration"
7
+ require "kiso/presets"
7
8
  require "kiso/theme_overrides"
8
9
  require "kiso/propshaft_tailwind_stub_filter"
9
10
  require "kiso/engine"
@@ -45,8 +46,11 @@ require "kiso/themes/color_mode_button"
45
46
  require "kiso/themes/color_mode_select"
46
47
  require "kiso/themes/dashboard"
47
48
  require "kiso/themes/nav"
49
+ require "kiso/themes/page"
48
50
  require "kiso/themes/avatar"
51
+ require "kiso/themes/skeleton"
49
52
  require "kiso/themes/slider"
53
+ require "kiso/themes/layout"
50
54
  require "kiso/icons"
51
55
 
52
56
  # Kiso — a Rails engine providing UI components inspired by shadcn/ui and Nuxt UI.
@@ -72,6 +76,9 @@ require "kiso/icons"
72
76
  # @see ComponentHelper#kui
73
77
  # @see Themes
74
78
  module Kiso
79
+ # Base error class for Kiso engine errors.
80
+ class Error < StandardError; end
81
+
75
82
  class << self
76
83
  # @return [Configuration] the global configuration instance
77
84
  def configuration
@@ -0,0 +1,36 @@
1
+ # Generates CSS stub files for Kiso's palette files in the host app.
2
+ #
3
+ # tailwindcss-rails creates a stub at app/assets/builds/tailwind/kiso.css
4
+ # for engine.css, but it doesn't handle subdirectories. Palette files at
5
+ # app/assets/tailwind/kiso/palettes/*.css inside the gem are invisible to
6
+ # the host app's Tailwind CLI without stubs.
7
+ #
8
+ # This task creates matching stubs so host apps can import palettes with:
9
+ # @import "../builds/tailwind/kiso/palettes/blue.css";
10
+
11
+ namespace :kiso do
12
+ desc "Generate CSS stubs for Kiso palette files"
13
+ task palettes: :environment do
14
+ palette_dir = Kiso::Engine.root.join("app/assets/tailwind/kiso/palettes")
15
+ next unless palette_dir.directory?
16
+
17
+ output_dir = Rails.root.join("app/assets/builds/tailwind/kiso/palettes")
18
+ FileUtils.mkdir_p(output_dir)
19
+
20
+ Dir[palette_dir.join("*.css")].each do |source|
21
+ name = File.basename(source)
22
+ stub_path = output_dir.join(name)
23
+ File.write(stub_path, <<~CSS)
24
+ /* DO NOT MODIFY THIS FILE, it was auto-generated by kiso */
25
+
26
+ @import "#{source}";
27
+ CSS
28
+ end
29
+ end
30
+ end
31
+
32
+ # Hook into tailwindcss-rails build pipeline so palette stubs are
33
+ # generated before the Tailwind CLI runs.
34
+ if Rake::Task.task_defined?("tailwindcss:engines")
35
+ Rake::Task["tailwindcss:engines"].enhance(["kiso:palettes"])
36
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.pre
4
+ version: 0.4.1.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Clarke
@@ -86,11 +86,19 @@ files:
86
86
  - app/assets/tailwind/kiso/dialog.css
87
87
  - app/assets/tailwind/kiso/engine.css
88
88
  - app/assets/tailwind/kiso/input-otp.css
89
+ - app/assets/tailwind/kiso/palettes/blue.css
90
+ - app/assets/tailwind/kiso/palettes/green.css
91
+ - app/assets/tailwind/kiso/palettes/orange.css
92
+ - app/assets/tailwind/kiso/palettes/violet.css
93
+ - app/assets/tailwind/kiso/palettes/zinc.css
89
94
  - app/assets/tailwind/kiso/radio-group.css
90
95
  - app/assets/tailwind/kiso/slider.css
96
+ - app/helpers/kiso/app_component_helper.rb
91
97
  - app/helpers/kiso/component_helper.rb
92
98
  - app/helpers/kiso/icon_helper.rb
93
99
  - app/helpers/kiso/theme_helper.rb
100
+ - app/helpers/kiso/ui_context_helper.rb
101
+ - app/javascript/controllers/kiso/alert_controller.js
94
102
  - app/javascript/controllers/kiso/combobox_controller.js
95
103
  - app/javascript/controllers/kiso/command_controller.js
96
104
  - app/javascript/controllers/kiso/command_dialog_controller.js
@@ -113,6 +121,7 @@ files:
113
121
  - app/javascript/kiso/vendor/floating-ui-dom.js
114
122
  - app/views/kiso/components/_alert.html.erb
115
123
  - app/views/kiso/components/_alert_dialog.html.erb
124
+ - app/views/kiso/components/_app.html.erb
116
125
  - app/views/kiso/components/_aspect_ratio.html.erb
117
126
  - app/views/kiso/components/_avatar.html.erb
118
127
  - app/views/kiso/components/_badge.html.erb
@@ -124,6 +133,7 @@ files:
124
133
  - app/views/kiso/components/_color_mode_select.html.erb
125
134
  - app/views/kiso/components/_combobox.html.erb
126
135
  - app/views/kiso/components/_command.html.erb
136
+ - app/views/kiso/components/_container.html.erb
127
137
  - app/views/kiso/components/_dashboard_group.html.erb
128
138
  - app/views/kiso/components/_dashboard_navbar.html.erb
129
139
  - app/views/kiso/components/_dashboard_panel.html.erb
@@ -135,18 +145,28 @@ files:
135
145
  - app/views/kiso/components/_field.html.erb
136
146
  - app/views/kiso/components/_field_group.html.erb
137
147
  - app/views/kiso/components/_field_set.html.erb
148
+ - app/views/kiso/components/_footer.html.erb
149
+ - app/views/kiso/components/_header.html.erb
138
150
  - app/views/kiso/components/_input.html.erb
139
151
  - app/views/kiso/components/_input_group.html.erb
140
152
  - app/views/kiso/components/_input_otp.html.erb
141
153
  - app/views/kiso/components/_kbd.html.erb
142
154
  - app/views/kiso/components/_label.html.erb
155
+ - app/views/kiso/components/_main.html.erb
143
156
  - app/views/kiso/components/_nav.html.erb
157
+ - app/views/kiso/components/_page.html.erb
158
+ - app/views/kiso/components/_page_body.html.erb
159
+ - app/views/kiso/components/_page_card.html.erb
160
+ - app/views/kiso/components/_page_grid.html.erb
161
+ - app/views/kiso/components/_page_header.html.erb
162
+ - app/views/kiso/components/_page_section.html.erb
144
163
  - app/views/kiso/components/_pagination.html.erb
145
164
  - app/views/kiso/components/_popover.html.erb
146
165
  - app/views/kiso/components/_radio_group.html.erb
147
166
  - app/views/kiso/components/_select.html.erb
148
167
  - app/views/kiso/components/_select_native.html.erb
149
168
  - app/views/kiso/components/_separator.html.erb
169
+ - app/views/kiso/components/_skeleton.html.erb
150
170
  - app/views/kiso/components/_slider.html.erb
151
171
  - app/views/kiso/components/_stats_card.html.erb
152
172
  - app/views/kiso/components/_stats_grid.html.erb
@@ -155,6 +175,7 @@ files:
155
175
  - app/views/kiso/components/_textarea.html.erb
156
176
  - app/views/kiso/components/_toggle.html.erb
157
177
  - app/views/kiso/components/_toggle_group.html.erb
178
+ - app/views/kiso/components/alert/_actions.html.erb
158
179
  - app/views/kiso/components/alert/_description.html.erb
159
180
  - app/views/kiso/components/alert/_title.html.erb
160
181
  - app/views/kiso/components/alert_dialog/_action.html.erb
@@ -247,6 +268,26 @@ files:
247
268
  - app/views/kiso/components/nav/_item.html.erb
248
269
  - app/views/kiso/components/nav/_section.html.erb
249
270
  - app/views/kiso/components/nav/_section_title.html.erb
271
+ - app/views/kiso/components/page/_center.html.erb
272
+ - app/views/kiso/components/page/_left.html.erb
273
+ - app/views/kiso/components/page/_right.html.erb
274
+ - app/views/kiso/components/page_card/_body.html.erb
275
+ - app/views/kiso/components/page_card/_description.html.erb
276
+ - app/views/kiso/components/page_card/_footer.html.erb
277
+ - app/views/kiso/components/page_card/_header.html.erb
278
+ - app/views/kiso/components/page_card/_icon.html.erb
279
+ - app/views/kiso/components/page_card/_title.html.erb
280
+ - app/views/kiso/components/page_header/_description.html.erb
281
+ - app/views/kiso/components/page_header/_headline.html.erb
282
+ - app/views/kiso/components/page_header/_links.html.erb
283
+ - app/views/kiso/components/page_header/_title.html.erb
284
+ - app/views/kiso/components/page_section/_body.html.erb
285
+ - app/views/kiso/components/page_section/_description.html.erb
286
+ - app/views/kiso/components/page_section/_header.html.erb
287
+ - app/views/kiso/components/page_section/_headline.html.erb
288
+ - app/views/kiso/components/page_section/_links.html.erb
289
+ - app/views/kiso/components/page_section/_title.html.erb
290
+ - app/views/kiso/components/page_section/_wrapper.html.erb
250
291
  - app/views/kiso/components/pagination/_content.html.erb
251
292
  - app/views/kiso/components/pagination/_ellipsis.html.erb
252
293
  - app/views/kiso/components/pagination/_item.html.erb
@@ -282,6 +323,13 @@ files:
282
323
  - config/deploy.docs.yml
283
324
  - config/deploy.yml
284
325
  - config/importmap.rb
326
+ - config/locales/en.yml
327
+ - lib/generators/kiso/component/USAGE
328
+ - lib/generators/kiso/component/component_generator.rb
329
+ - lib/generators/kiso/component/templates/partial.html.erb.tt
330
+ - lib/generators/kiso/component/templates/sub_part_partial.html.erb.tt
331
+ - lib/generators/kiso/component/templates/sub_part_theme.rb.tt
332
+ - lib/generators/kiso/component/templates/theme.rb.tt
285
333
  - lib/kiso.rb
286
334
  - lib/kiso/cli.rb
287
335
  - lib/kiso/cli/base.rb
@@ -290,6 +338,9 @@ files:
290
338
  - lib/kiso/cli/make.rb
291
339
  - lib/kiso/configuration.rb
292
340
  - lib/kiso/engine.rb
341
+ - lib/kiso/presets.rb
342
+ - lib/kiso/presets/rounded.rb
343
+ - lib/kiso/presets/sharp.rb
293
344
  - lib/kiso/propshaft_tailwind_stub_filter.rb
294
345
  - lib/kiso/theme_overrides.rb
295
346
  - lib/kiso/themes/alert.rb
@@ -317,7 +368,9 @@ files:
317
368
  - lib/kiso/themes/input_otp.rb
318
369
  - lib/kiso/themes/kbd.rb
319
370
  - lib/kiso/themes/label.rb
371
+ - lib/kiso/themes/layout.rb
320
372
  - lib/kiso/themes/nav.rb
373
+ - lib/kiso/themes/page.rb
321
374
  - lib/kiso/themes/pagination.rb
322
375
  - lib/kiso/themes/popover.rb
323
376
  - lib/kiso/themes/radio_group.rb
@@ -325,6 +378,7 @@ files:
325
378
  - lib/kiso/themes/select_native.rb
326
379
  - lib/kiso/themes/separator.rb
327
380
  - lib/kiso/themes/shared.rb
381
+ - lib/kiso/themes/skeleton.rb
328
382
  - lib/kiso/themes/slider.rb
329
383
  - lib/kiso/themes/stats_card.rb
330
384
  - lib/kiso/themes/switch.rb
@@ -333,6 +387,7 @@ files:
333
387
  - lib/kiso/themes/toggle.rb
334
388
  - lib/kiso/themes/toggle_group.rb
335
389
  - lib/kiso/version.rb
390
+ - lib/tasks/kiso.rake
336
391
  homepage: https://github.com/steveclarke/kiso
337
392
  licenses:
338
393
  - MIT
@@ -343,6 +398,14 @@ metadata:
343
398
  bug_tracker_uri: https://github.com/steveclarke/kiso/issues
344
399
  rubygems_mfa_required: 'true'
345
400
  allowed_push_host: https://rubygems.org
401
+ post_install_message: |
402
+ Kiso installed successfully!
403
+
404
+ To get AI-assisted Kiso development with Claude Code, install the skill:
405
+
406
+ npx skills add steveclarke/kiso/skills/kiso
407
+
408
+ Learn more: https://kisoui.com/getting-started
346
409
  rdoc_options: []
347
410
  require_paths:
348
411
  - lib