nitro_kit 0.8.0 → 2.0.0.alpha.1

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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/.agents/plugins/marketplace.json +20 -0
  3. data/CHANGELOG.md +151 -0
  4. data/LICENSE +28 -0
  5. data/README.md +21 -16
  6. data/STYLE_GUIDE.md +425 -0
  7. data/app/assets/stylesheets/nitro_kit-tailwind-v4.css +38 -0
  8. data/app/assets/stylesheets/nitro_kit.css +7225 -0
  9. data/app/components/nitro_kit/accordion.rb +125 -65
  10. data/app/components/nitro_kit/alert.rb +80 -43
  11. data/app/components/nitro_kit/app_navigation.rb +307 -0
  12. data/app/components/nitro_kit/app_shell.rb +227 -0
  13. data/app/components/nitro_kit/appearance_bootstrap.rb +146 -0
  14. data/app/components/nitro_kit/appearance_picker.rb +156 -0
  15. data/app/components/nitro_kit/auth_shell.rb +34 -0
  16. data/app/components/nitro_kit/avatar.rb +85 -29
  17. data/app/components/nitro_kit/avatar_stack.rb +155 -9
  18. data/app/components/nitro_kit/badge.rb +43 -81
  19. data/app/components/nitro_kit/button.rb +180 -103
  20. data/app/components/nitro_kit/button_group.rb +63 -11
  21. data/app/components/nitro_kit/button_to.rb +69 -0
  22. data/app/components/nitro_kit/card.rb +42 -45
  23. data/app/components/nitro_kit/checkbox.rb +115 -62
  24. data/app/components/nitro_kit/checkbox_group.rb +128 -22
  25. data/app/components/nitro_kit/choice.rb +55 -0
  26. data/app/components/nitro_kit/combobox.rb +292 -105
  27. data/app/components/nitro_kit/command_palette.rb +412 -0
  28. data/app/components/nitro_kit/component.rb +322 -46
  29. data/app/components/nitro_kit/container.rb +32 -0
  30. data/app/components/nitro_kit/control_group.rb +45 -0
  31. data/app/components/nitro_kit/danger_zone.rb +78 -0
  32. data/app/components/nitro_kit/data_section.rb +106 -0
  33. data/app/components/nitro_kit/details_table.rb +229 -0
  34. data/app/components/nitro_kit/dialog.rb +257 -83
  35. data/app/components/nitro_kit/dropdown.rb +336 -119
  36. data/app/components/nitro_kit/dropzone.rb +326 -0
  37. data/app/components/nitro_kit/empty_state.rb +99 -0
  38. data/app/components/nitro_kit/field.rb +461 -236
  39. data/app/components/nitro_kit/field_group.rb +15 -8
  40. data/app/components/nitro_kit/fieldset.rb +37 -39
  41. data/app/components/nitro_kit/flex.rb +49 -0
  42. data/app/components/nitro_kit/form_builder.rb +313 -72
  43. data/app/components/nitro_kit/form_section.rb +79 -0
  44. data/app/components/nitro_kit/grid.rb +34 -0
  45. data/app/components/nitro_kit/icon.rb +54 -25
  46. data/app/components/nitro_kit/input.rb +97 -10
  47. data/app/components/nitro_kit/label.rb +22 -6
  48. data/app/components/nitro_kit/layout_options.rb +7 -0
  49. data/app/components/nitro_kit/page_header.rb +76 -0
  50. data/app/components/nitro_kit/pagination.rb +355 -69
  51. data/app/components/nitro_kit/pagination_bar.rb +90 -0
  52. data/app/components/nitro_kit/progressive_image.rb +181 -0
  53. data/app/components/nitro_kit/radio_button.rb +77 -55
  54. data/app/components/nitro_kit/radio_button_group.rb +104 -36
  55. data/app/components/nitro_kit/responsive_value.rb +94 -0
  56. data/app/components/nitro_kit/rich_text_area.rb +31 -0
  57. data/app/components/nitro_kit/select.rb +129 -64
  58. data/app/components/nitro_kit/settings_layout.rb +152 -0
  59. data/app/components/nitro_kit/sheet.rb +202 -0
  60. data/app/components/nitro_kit/stat_grid.rb +75 -0
  61. data/app/components/nitro_kit/switch.rb +108 -51
  62. data/app/components/nitro_kit/table.rb +237 -45
  63. data/app/components/nitro_kit/tabs.rb +168 -63
  64. data/app/components/nitro_kit/textarea.rb +81 -10
  65. data/app/components/nitro_kit/toast.rb +211 -80
  66. data/app/components/nitro_kit/toolbar.rb +75 -0
  67. data/app/components/nitro_kit/tooltip.rb +235 -34
  68. data/app/components/nitro_kit/typeset.rb +28 -0
  69. data/app/javascript/controllers/nk/app_shell_controller.js +224 -0
  70. data/app/javascript/controllers/nk/appearance_controller.js +73 -0
  71. data/app/javascript/controllers/nk/avatar_controller.js +15 -0
  72. data/app/javascript/controllers/nk/button_controller.js +56 -0
  73. data/app/javascript/controllers/nk/checkable_controller.js +41 -0
  74. data/app/javascript/controllers/nk/combobox_controller.js +314 -82
  75. data/app/javascript/controllers/nk/command_palette_controller.js +249 -0
  76. data/app/javascript/controllers/nk/dialog_controller.js +14 -10
  77. data/app/javascript/controllers/nk/dropdown_controller.js +106 -58
  78. data/app/javascript/controllers/nk/dropzone/direct_upload.js +61 -0
  79. data/app/javascript/controllers/nk/dropzone/file_rules.js +77 -0
  80. data/app/javascript/controllers/nk/dropzone/form_submit_lock.js +30 -0
  81. data/app/javascript/controllers/nk/dropzone_controller.js +482 -0
  82. data/app/javascript/controllers/nk/overlay_position.js +37 -0
  83. data/app/javascript/controllers/nk/progressive_image_controller.js +116 -0
  84. data/app/javascript/controllers/nk/tabs_controller.js +135 -23
  85. data/app/javascript/controllers/nk/toast_controller.js +112 -45
  86. data/app/javascript/controllers/nk/tooltip_controller.js +12 -47
  87. data/config/importmap.rb +2 -0
  88. data/config/locales/en.yml +98 -0
  89. data/docs/agent_guide.md +139 -0
  90. data/docs/agent_native_spec.md +422 -0
  91. data/docs/component_contracts.md +263 -0
  92. data/docs/customization.md +595 -0
  93. data/docs/hotwire.md +94 -0
  94. data/docs/implementation_plan.md +279 -0
  95. data/docs/initialization_prompt.md +36 -0
  96. data/docs/migration_1_to_2.md +318 -0
  97. data/docs/new_app_strategy.md +24 -0
  98. data/docs/patterns/application_foundation.md +136 -0
  99. data/docs/patterns/crud_resource.md +144 -0
  100. data/docs/patterns/destructive_action.md +105 -0
  101. data/docs/patterns/flash_and_toast.md +57 -0
  102. data/docs/patterns/inline_edit.md +59 -0
  103. data/docs/patterns/queryable_collection.md +187 -0
  104. data/docs/patterns/resource_form.md +126 -0
  105. data/docs/rails_conventions.md +95 -0
  106. data/docs/rails_integration.md +514 -0
  107. data/lib/generators/nitro_kit/install_generator.rb +48 -0
  108. data/lib/generators/nitro_kit/upgrade_smoke_tests_generator.rb +67 -0
  109. data/lib/nitro_kit/engine.rb +20 -0
  110. data/lib/nitro_kit/installation.rb +671 -0
  111. data/lib/nitro_kit/migration_inventory.rb +345 -0
  112. data/lib/nitro_kit/upgrade_smoke_test.rb +403 -0
  113. data/lib/nitro_kit/version.rb +1 -1
  114. data/lib/nitro_kit.rb +5 -42
  115. data/lib/rails/commands/nitro_kit/nitro_kit_command.rb +42 -0
  116. data/lib/tasks/nitro_kit_tasks.rake +79 -4
  117. data/plugins/nitro-kit/.codex-plugin/plugin.json +28 -0
  118. data/plugins/nitro-kit/skills/nitro-kit-hotwire/SKILL.md +67 -0
  119. data/plugins/nitro-kit/skills/nitro-kit-hotwire/agents/openai.yaml +4 -0
  120. data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +60 -0
  121. data/plugins/nitro-kit/skills/nitro-kit-rails/agents/openai.yaml +4 -0
  122. data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +62 -0
  123. data/plugins/nitro-kit/skills/nitro-kit-ui/agents/openai.yaml +4 -0
  124. data/src/stylesheets/nitro_kit/components/accordion.css +119 -0
  125. data/src/stylesheets/nitro_kit/components/alert.css +82 -0
  126. data/src/stylesheets/nitro_kit/components/app_navigation.css +156 -0
  127. data/src/stylesheets/nitro_kit/components/app_shell.css +605 -0
  128. data/src/stylesheets/nitro_kit/components/appearance_picker.css +117 -0
  129. data/src/stylesheets/nitro_kit/components/auth_shell.css +8 -0
  130. data/src/stylesheets/nitro_kit/components/avatar.css +81 -0
  131. data/src/stylesheets/nitro_kit/components/avatar_stack.css +80 -0
  132. data/src/stylesheets/nitro_kit/components/badge.css +76 -0
  133. data/src/stylesheets/nitro_kit/components/button.css +283 -0
  134. data/src/stylesheets/nitro_kit/components/button_group.css +53 -0
  135. data/src/stylesheets/nitro_kit/components/button_to.css +6 -0
  136. data/src/stylesheets/nitro_kit/components/card.css +70 -0
  137. data/src/stylesheets/nitro_kit/components/checkbox.css +160 -0
  138. data/src/stylesheets/nitro_kit/components/checkbox_group.css +61 -0
  139. data/src/stylesheets/nitro_kit/components/combobox.css +148 -0
  140. data/src/stylesheets/nitro_kit/components/command_palette.css +255 -0
  141. data/src/stylesheets/nitro_kit/components/container.css +25 -0
  142. data/src/stylesheets/nitro_kit/components/control_group.css +149 -0
  143. data/src/stylesheets/nitro_kit/components/danger_zone.css +54 -0
  144. data/src/stylesheets/nitro_kit/components/data_section.css +40 -0
  145. data/src/stylesheets/nitro_kit/components/details_table.css +53 -0
  146. data/src/stylesheets/nitro_kit/components/dialog.css +80 -0
  147. data/src/stylesheets/nitro_kit/components/dropdown.css +152 -0
  148. data/src/stylesheets/nitro_kit/components/dropzone.css +189 -0
  149. data/src/stylesheets/nitro_kit/components/empty_state.css +53 -0
  150. data/src/stylesheets/nitro_kit/components/field.css +79 -0
  151. data/src/stylesheets/nitro_kit/components/field_group.css +6 -0
  152. data/src/stylesheets/nitro_kit/components/fieldset.css +28 -0
  153. data/src/stylesheets/nitro_kit/components/flex.css +455 -0
  154. data/src/stylesheets/nitro_kit/components/form_section.css +71 -0
  155. data/src/stylesheets/nitro_kit/components/grid.css +308 -0
  156. data/src/stylesheets/nitro_kit/components/icon.css +26 -0
  157. data/src/stylesheets/nitro_kit/components/input.css +80 -0
  158. data/src/stylesheets/nitro_kit/components/label.css +9 -0
  159. data/src/stylesheets/nitro_kit/components/layout.css +440 -0
  160. data/src/stylesheets/nitro_kit/components/page_header.css +62 -0
  161. data/src/stylesheets/nitro_kit/components/pagination.css +119 -0
  162. data/src/stylesheets/nitro_kit/components/pagination_bar.css +41 -0
  163. data/src/stylesheets/nitro_kit/components/palette.css +113 -0
  164. data/src/stylesheets/nitro_kit/components/progressive_image.css +139 -0
  165. data/src/stylesheets/nitro_kit/components/radio_button.css +127 -0
  166. data/src/stylesheets/nitro_kit/components/radio_button_group.css +143 -0
  167. data/src/stylesheets/nitro_kit/components/rich_text_area.css +21 -0
  168. data/src/stylesheets/nitro_kit/components/select.css +70 -0
  169. data/src/stylesheets/nitro_kit/components/settings_layout.css +100 -0
  170. data/src/stylesheets/nitro_kit/components/sheet.css +100 -0
  171. data/src/stylesheets/nitro_kit/components/stat_grid.css +51 -0
  172. data/src/stylesheets/nitro_kit/components/switch.css +152 -0
  173. data/src/stylesheets/nitro_kit/components/table.css +110 -0
  174. data/src/stylesheets/nitro_kit/components/tabs.css +138 -0
  175. data/src/stylesheets/nitro_kit/components/textarea.css +39 -0
  176. data/src/stylesheets/nitro_kit/components/toast.css +131 -0
  177. data/src/stylesheets/nitro_kit/components/toolbar.css +78 -0
  178. data/src/stylesheets/nitro_kit/components/tooltip.css +124 -0
  179. data/src/stylesheets/nitro_kit/components/typeset.css +191 -0
  180. data/src/stylesheets/nitro_kit/layers.css +7 -0
  181. data/src/stylesheets/nitro_kit/reset.css +192 -0
  182. data/src/stylesheets/nitro_kit/tokens.css +198 -0
  183. metadata +183 -50
  184. data/Rakefile +0 -8
  185. data/app/components/nitro_kit/datepicker.rb +0 -9
  186. data/app/helpers/nitro_kit/accordion_helper.rb +0 -9
  187. data/app/helpers/nitro_kit/alert_helper.rb +0 -11
  188. data/app/helpers/nitro_kit/avatar_helper.rb +0 -13
  189. data/app/helpers/nitro_kit/badge_helper.rb +0 -13
  190. data/app/helpers/nitro_kit/button_group_helper.rb +0 -9
  191. data/app/helpers/nitro_kit/button_helper.rb +0 -49
  192. data/app/helpers/nitro_kit/card_helper.rb +0 -9
  193. data/app/helpers/nitro_kit/checkbox_helper.rb +0 -50
  194. data/app/helpers/nitro_kit/combobox_helper.rb +0 -9
  195. data/app/helpers/nitro_kit/datepicker_helper.rb +0 -9
  196. data/app/helpers/nitro_kit/dialog_helper.rb +0 -9
  197. data/app/helpers/nitro_kit/dropdown_helper.rb +0 -9
  198. data/app/helpers/nitro_kit/field_group_helper.rb +0 -9
  199. data/app/helpers/nitro_kit/field_helper.rb +0 -9
  200. data/app/helpers/nitro_kit/fieldset_helper.rb +0 -9
  201. data/app/helpers/nitro_kit/form_helper.rb +0 -13
  202. data/app/helpers/nitro_kit/icon_helper.rb +0 -9
  203. data/app/helpers/nitro_kit/input_helper.rb +0 -37
  204. data/app/helpers/nitro_kit/label_helper.rb +0 -19
  205. data/app/helpers/nitro_kit/pagination_helper.rb +0 -42
  206. data/app/helpers/nitro_kit/radio_button_helper.rb +0 -23
  207. data/app/helpers/nitro_kit/select_helper.rb +0 -24
  208. data/app/helpers/nitro_kit/switch_helper.rb +0 -9
  209. data/app/helpers/nitro_kit/table_helper.rb +0 -9
  210. data/app/helpers/nitro_kit/tabs_helper.rb +0 -9
  211. data/app/helpers/nitro_kit/textarea_helper.rb +0 -9
  212. data/app/helpers/nitro_kit/toast_helper.rb +0 -25
  213. data/app/helpers/nitro_kit/tooltip_helper.rb +0 -9
  214. data/app/javascript/controllers/nk/accordion_controller.js +0 -18
  215. data/app/javascript/controllers/nk/datepicker_controller.js +0 -5
  216. data/app/javascript/controllers/nk/switch_controller.js +0 -32
  217. data/lib/generators/nitro_kit/component_generator.rb +0 -84
  218. data/lib/nitro_kit/schema_builder.rb +0 -121
  219. data/lib/nitro_kit/variants.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f96e86485be82839eb17fea8522c31b8bac982f5b9e09a479d159e9f69b59f7
4
- data.tar.gz: 41814a0fc817bd11dab95a132de45a83c300c52a39cf3d407e0174c0a6af9584
3
+ metadata.gz: 4c85a9304b86e7fa5d7e77eb872ae140648189174928805acaef127899fc59a0
4
+ data.tar.gz: 43ff42ab7cabb3dc18eee28b4958d55b35e9e1ce5bfee57627f259fc94506c33
5
5
  SHA512:
6
- metadata.gz: 73c6883c42f6cab78d4fe6550ea88dda8c0546ae33c6c9f9696b894bbba47d98a381de82385c754f41e56f1971177876c2ca2e1460ee53243ee4eba82f7ddd74
7
- data.tar.gz: 81998e474d6125fcc2bd6fa094223c3e4470261519049535c0301922873325206c50ad49b6c4756be1914f0a88bb915a7221f1b99c75018120cb6f26dd34f321
6
+ metadata.gz: 3a086bc5c2a642706b29932f04461f7c368b8370ec1c840fc8e604ec7ea7e2d0dd34e7ba7b13c13b62f0821dbb9fbd97a70126894347259bcd105e3f21635d4c
7
+ data.tar.gz: f55aa48a8699baf35ffa1523c9ee3af232dc6513fdc89fa2905425063a8e5a532e032e675b3b3ead1663fa20458f09a7559fa2a2627b54650b828478e8f48e6a
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "nitro-kit",
3
+ "interface": {
4
+ "displayName": "Nitro Kit"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "nitro-kit",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/nitro-kit"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_USE"
16
+ },
17
+ "category": "Developer"
18
+ }
19
+ ]
20
+ }
data/CHANGELOG.md ADDED
@@ -0,0 +1,151 @@
1
+ # Changelog
2
+
3
+ ## 2.0.0.alpha.1
4
+
5
+ Nitro Kit 2.0 alpha is a ground-up, intentionally incompatible rebuild around gem-owned Phlex composition. It replaces the generated, helper-driven 1.x architecture with a versioned component system owned by the gem.
6
+
7
+ ### Breaking changes
8
+
9
+ #### Packaging and API surface
10
+
11
+ - Replace generated editable component copies with versioned `NitroKit::*` classes loaded from the gem.
12
+ - Remove all `nk_*` ERB helpers, generated variant helpers, `from_template`, and template-buffer bridges.
13
+ - Remove copied-component generators, schema/variant metadata, and legacy installation paths.
14
+ - Add a setup-only generator, project-local Rails/Hotwire/UI skills, integration
15
+ diagnostics, and an agent initialization prompt for Nitro Kit 2.
16
+ - Remove Tailwind Merge, consumer Tailwind requirements, old Tailwind assets, and internal component class strings.
17
+ - Use Rails `form_with(..., builder: NitroKit::FormBuilder)` instead of `nk_form_with` or `nk_form_for`.
18
+ - Remove vendored Floating UI and combobox navigation runtimes and the obsolete Datepicker and Switch controllers.
19
+
20
+ #### Attribute boundary
21
+
22
+ - Replace permissive component attributes with explicit options and `html:`, `aria:`, and `data:` boundaries.
23
+ - Reject `class` and `style`; add the observable `desperately_need_a_class:` integration escape.
24
+ - Reserve a named set of data keys instead of an ad hoc list. `Component::COMPONENT_OWNED_DATA_ATTRIBUTES` is `state`, `disabled`, `required`, `orientation`, `presentation`, `placement`, `layout`, and `field-type`; `Component::RESERVED_DATA_ATTRIBUTES` adds `nk`, `slot`, `variant`, `size`, `nk-escape`, and `enhanced`. Passing any of them through `data:` now raises. `data-controller` and `data-action` remain additive.
25
+ - Settle the variant axis: `variant:` and `size:` on a root are the component's identity axes and are emitted only by the base component. A slot may carry its own owned `data-variant` when it has variant identity of its own, as `Toast::Item` and Dropdown items do; caller `data: { variant: }` stays reserved either way.
26
+
27
+ #### Removed components and options
28
+
29
+ - Remove `VStack` and `HStack` in favor of one explicit, responsive `Flex` component.
30
+ - Remove the Datepicker component entirely. `Input`'s `type: :date` is the only date control, and `Field`/`FormBuilder` reach it through `as: :date`.
31
+ - Remove the separate sortable-table component. Sorting lives on `Table` through `Table.new(sort:, direction:)` and `th(sort:, href:, sort_data:)`; `NitroKit::RansackTable` is not a core contract.
32
+ - Remove `Combobox::Option` in favor of the shared, validated `NitroKit::Choice` value.
33
+ - Remove `Alert`'s second palette axis. `Alert` now has one semantic `variant:` axis of `default info success warning error`, matching `Toast::Item`, with the tint driven by the Alert-owned `VARIANT_PALETTE`. There is no `color:` option; the `color:` palette belongs to `Badge` alone.
34
+
35
+ #### Renamed and reshaped options
36
+
37
+ - Rename Button's trailing-icon keyword to `icon_end:`, matching the `button-icon-end` slot. `icon_right:` is gone. `Dropdown#trigger` and `Tooltip#trigger` forward the same `icon:`/`icon_end:` pair.
38
+ - Add `icon:` to `Dropdown#item` alongside its owned `data-variant` for `default` and `destructive` items.
39
+ - Replace Dialog's ad hoc content declarations with exactly one required `panel(title:, description: nil, nonmodal: false)`. Nitro renders close button, title, description, then application content, so a sticky close control survives long panels. `dismissible: false` renders no close button and declaring one raises.
40
+ - Rename `Dropzone`'s visible prompt keyword from `title:` to `label:`, and move its remaining user-facing strings into the `nitro_kit.dropzone.*` locale scope.
41
+ - Require `label:` on `AvatarStack` to name the group, add `max:` to bound visible avatars and derive the `+N` indicator, and reject `aria: { label: }` and combining `max:` with an explicit `overflow`.
42
+ - Give `AppShell` a `layout:` axis rather than a variant. The root is now `div[data-nk="app-shell"][data-layout]`, and the narrow drawer is a real modal `dialog` so the browser owns focus containment, inertness, and Escape.
43
+ - Make `AppNavigation`'s body a real `ul`, with every entry an `li` and items rendering `li > a[data-slot="app-navigation-item-link"]` that carry their own attribute bags. `SettingsLayout` navigation uses the same `nav > ul > li > a` shape.
44
+ - Reshape `Toast`. The list is `ol[data-slot="toast-list"]` whose id is the toast id plus `-list`, so a Turbo Stream can append `Toast::Item` directly to `nk-toast-list`. Items carry `role="status"`, or `role="alert"` for the error variant, and every item is `data-turbo-temporary` while the region and list survive. `dismissible: false` items are never auto-dismissed.
45
+ - Scope checkable behavior to the one state HTML cannot express. `Checkbox` mounts `nk--checkable` only for `indeterminate: true`; ordinary checked state, `Switch`, and `RadioButton` mount no controller and mirror no `data-state`. A `Checkbox` description now requires a non-blank String `id:`.
46
+ - Require `id:`, `name:`, `label:`, and `options:` on `Combobox`, validate the value against the declared options, and accept `label: false` only with `control_aria: { label: }` or `{ labelledby: }`. `Field` gains `as: :combobox`, `as: :rich_text`, and `as: :radio_group`, and rejects `label: false` for radio groups.
47
+
48
+ ### Added
49
+
50
+ - Add `CommandPalette`, a native-dialog destination search with a declarative link baseline, optional Command-K or Control-K shortcut, local or server-rendered Turbo Frame results, result announcements, and Turbo-safe reset behavior.
51
+ - Self-describing, classless `data-nk` roots and component-qualified `data-slot` contracts.
52
+ - Static zero-specificity CSS, light and dark theme tokens with a no-JavaScript system fallback, and a separate Tailwind CSS v4 adapter.
53
+ - Responsive Flex and Grid layouts with fixed mobile-first breakpoints, closed values, classless data contracts, and no Tailwind runtime; plus the constrained-width Container.
54
+ - Sortable `Table` headers with caller-owned URLs, native `aria-sort`, and an optional Ransack gallery recipe.
55
+ - Eleven blocks and shells: AuthShell, AppShell, SettingsLayout, Toolbar, PaginationBar, PageHeader, StatGrid, DataSection, FormSection, DangerZone, and EmptyState.
56
+ - AppNavigation, AppearancePicker, DetailsTable, Dropzone, and ProgressiveImage components, plus the non-visual AppearanceBootstrap runtime.
57
+ - Typed Choice values and direct-Phlex Rails FormBuilder integration with Active Model errors, native and direct uploads, and Turbo Frame/Stream examples.
58
+ - Direct optional Pagy integration through `Pagination(pagy:)`, with an explicit URL callable for caller-owned destinations.
59
+ - Optional Lexxy and Action Text integration through `form.field(..., as: :rich_text)`, preserving editor-native inputs, attachments, options, and behavior inside Nitro's Field contract.
60
+ - Gem-owned importmap pins and Stimulus behavior for AppShell, AppearancePicker, Avatar, Button submission feedback, Checkbox (`nk--checkable`), Combobox, CommandPalette, Dialog, Dropdown, Dropzone, ProgressiveImage, Tabs, Toast, and Tooltip. Accordion needs no JavaScript at all.
61
+ - `Typeset` for semantic rich content and `RichTextArea` for the host application's rich-text editor output.
62
+ - A `nitro_kit.*` locale scope so component copy is translatable; Dropzone additionally hands its runtime strings to `nk--dropzone` as Stimulus values so no user-facing English lives in JavaScript.
63
+ - A catalog-driven Phlex gallery covering components, blocks, broad application flows, complete application shells, responsive states, and light, dark, and system appearance.
64
+ - A public customization guide and gallery wizard for documented tokens, deterministic CSS exports, and copyable AppShell composition.
65
+
66
+ ### License metadata
67
+
68
+ - Mark the gem's existing custom NitroKit License as nonstandard and include `LICENSE` in the package. The license terms are unchanged.
69
+
70
+ ## 0.9.0
71
+
72
+ ### Added
73
+
74
+ - Include assets in the gem package
75
+ - Add integration test coverage for core components
76
+
77
+ ### Changed
78
+
79
+ - Update pagination helper for the latest Pagy API
80
+ - Resolve schema builder dependencies transitively
81
+
82
+ ### Fixed
83
+
84
+ - Apply combobox root class correctly
85
+ - Fix rendering NitroKit components inside NitroKit components
86
+ - Fix Select prompt handling
87
+ - Fix dropdown destructive item helper argument handling
88
+ - Handle missing Pagy dependency gracefully
89
+
90
+ ## 0.8.0
91
+
92
+ ### Changed
93
+
94
+ - Reformat as Rails Omakase rubocop style
95
+ - Update Avatar component rendering for improved consistency
96
+ - Add formatting tools and minor cleanup improvements
97
+
98
+ ### Fixed
99
+
100
+ - Fix Select component empty rendering issue
101
+ - Add missing `select` method to FormBuilder
102
+ - Fix toast controller initialization timing issues
103
+ - Add Table wrapper parameter
104
+ - Remove default whitespace-nowrap from table cells
105
+
106
+ ## 0.7.0
107
+
108
+ ### Changed
109
+
110
+ - Migrate from `builder_method` to `from_template` pattern
111
+ - Update Input focus styling to use `focus-visible` for better accessibility
112
+ - Improve `text_or_block` method with SafeBuffer handling
113
+ - Remove I18n dependency from FormBuilder
114
+
115
+ ### Added
116
+
117
+ - XL size option for Button component
118
+ - `radio_button` method to FormBuilder
119
+ - `nk_avatar_stack` helper and component
120
+ - Pass options to Combobox in `combobox` method
121
+ - Support for rendering fields as custom component classes
122
+
123
+ ### Fixed
124
+
125
+ - Remove duplicate id from field checkbox hidden field
126
+ - Fix checkbox field and textarea rendering
127
+ - Add spacing between consecutive fieldsets
128
+ - Improve dropdown functionality
129
+
130
+ ## 0.6.0
131
+
132
+ NB: Nitro Kit has been re-licensed to disallow reselling as is. It is still free to use in your projects you just can't sell copies of it.
133
+
134
+ ### Breaking changes
135
+
136
+ - Update color definitions and add some more. **You'll need to update the color definitions in your CSS file.** See [Getting Started](https://nitrokit.dev/getting_started)
137
+
138
+ ### Changed
139
+
140
+ - Update `phlex` and `phlex-rails` dependencies
141
+ - Increase button[size=sm] size
142
+
143
+ ### Added
144
+
145
+ - Badge colors!
146
+ - Support for `as:` prop in Dialog
147
+ - `align:` prop for table cells
148
+
149
+ ## 0.5.2
150
+
151
+ Start of this document
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ # NitroKit License (v1.0)
2
+
3
+ © 2025 Brainbow / Mikkel Malmberg
4
+
5
+ ## Grant of Rights
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, modify, and share the Software (including in commercial products), subject to the conditions below.
8
+
9
+ ## Conditions
10
+
11
+ ### 1. Commercial Usage Restrictions
12
+
13
+ - You may use the Software for commercial purposes, including within commercial products or services.
14
+ - You may not sell the Software as a standalone product.
15
+ - You may not sell a product whose primary value derives from the Software with minimal modifications or additions (a "Repackaged Product").
16
+
17
+ ### 2. Attribution Requirements
18
+
19
+ - All copies or substantial portions of the Software must include this license and copyright notice.
20
+ - If the Software is used in a user-facing application, attribution in documentation or about section is sufficient.
21
+
22
+ ### 3. Disclaimer of Warranty
23
+
24
+ The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.
25
+
26
+ ## Termination
27
+
28
+ Your rights under this license will terminate automatically if you fail to comply with any of its terms.
data/README.md CHANGED
@@ -1,28 +1,33 @@
1
- <center><a href="https://nitrokit.dev"><img src="https://s3.brnbw.com/Artboard-q85JFfA8Auat32ByIAXtDAsbYGgs5MeTM4GDaonKhlxVniioPDLQTZUeynCfdBSHAfiRYhMWkGaYZC9ClkZS9aFgkBjx9mrAmnFs.png" alt="Nitro Kit" width="335" /></a></center>
1
+ <p align="center">
2
+ <a href="https://nitrokit.dev"><img src="https://s3.brnbw.com/Artboard-q85JFfA8Auat32ByIAXtDAsbYGgs5MeTM4GDaonKhlxVniioPDLQTZUeynCfdBSHAfiRYhMWkGaYZC9ClkZS9aFgkBjx9mrAmnFs.png" alt="Nitro Kit" width="335"></a>
3
+ </p>
2
4
 
3
- <p></p>
5
+ # Nitro Kit
4
6
 
5
- **Nitro Kit** is a set of **generic UI components** to help you build your **Ruby on Rails** application.
7
+ **Rails front-end for the agent era.**
6
8
 
7
- Rather than being fancy it is **purposefully modest**. Instead of giving you a black box, it is provided as a bunch of generators that give you a starting point to build upon.
9
+ Nitro Kit is a gem-owned, agent-native UI system for Ruby on Rails. The `2.0.0.alpha.1` prerelease is a ground-up rebuild. The free core is available now; new documentation and the verified Nitro Kit Pro catalog are coming next.
8
10
 
9
- Easy to customize, accessible, Rails native.
11
+ [![RubyGems](https://img.shields.io/gem/v/nitro_kit.svg)](https://rubygems.org/gems/nitro_kit)
10
12
 
11
- _Nitro Kit is still pre 1.0 and is in active development._
13
+ ## Installation
12
14
 
13
- See [nitrokit.dev](https://nitrokit.dev).
14
-
15
- [![Rubygems](https://img.shields.io/gem/v/nitro_kit.svg)](https://rubygems.org/gems/nitro_kit)
16
-
17
- ---
15
+ ```ruby
16
+ gem "nitro_kit", "2.0.0.alpha.1"
17
+ ```
18
18
 
19
- ### Development
19
+ Use the released gem and commit `Gemfile` with `Gemfile.lock`. Before upgrading, review the changelog, run `bundle update nitro_kit`, rerun the installer, and test the application.
20
20
 
21
21
  ```sh
22
- bin/setup
23
- bin/dev
22
+ bundle install
23
+ bin/rails generate nitro_kit:install
24
+ bin/rails nitro_kit:doctor
24
25
  ```
25
26
 
26
- ### License
27
+ The [agent guide](docs/agent_guide.md), [Rails integration guide](docs/rails_integration.md), and [component contracts](docs/component_contracts.md) are included with the gem.
28
+
29
+ Maintaining Nitro Kit 1? Its frozen documentation remains at [v1.nitrokit.dev](https://v1.nitrokit.dev).
30
+
31
+ ## License
27
32
 
28
- MIT
33
+ Nitro Kit is distributed under the custom [NitroKit License](LICENSE).