nitro_kit 0.9.0 → 2.0.0.alpha.2

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 +172 -0
  4. data/LICENSE +28 -0
  5. data/README.md +22 -15
  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 +7239 -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 +131 -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 +335 -122
  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 +107 -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/initialization_prompt.md +36 -0
  95. data/docs/migration_1_to_2.md +318 -0
  96. data/docs/new_app_strategy.md +22 -0
  97. data/docs/patterns/application_foundation.md +136 -0
  98. data/docs/patterns/crud_resource.md +144 -0
  99. data/docs/patterns/destructive_action.md +105 -0
  100. data/docs/patterns/flash_and_toast.md +57 -0
  101. data/docs/patterns/inline_edit.md +59 -0
  102. data/docs/patterns/queryable_collection.md +187 -0
  103. data/docs/patterns/resource_form.md +126 -0
  104. data/docs/rails_conventions.md +95 -0
  105. data/docs/rails_integration.md +514 -0
  106. data/lib/generators/nitro_kit/install_generator.rb +48 -0
  107. data/lib/generators/nitro_kit/upgrade_smoke_tests_generator.rb +67 -0
  108. data/lib/nitro_kit/engine.rb +20 -0
  109. data/lib/nitro_kit/installation.rb +671 -0
  110. data/lib/nitro_kit/migration_inventory.rb +345 -0
  111. data/lib/nitro_kit/upgrade_smoke_test.rb +403 -0
  112. data/lib/nitro_kit/version.rb +1 -1
  113. data/lib/nitro_kit.rb +5 -42
  114. data/lib/rails/commands/nitro_kit/nitro_kit_command.rb +42 -0
  115. data/lib/tasks/nitro_kit_tasks.rake +79 -4
  116. data/plugins/nitro-kit/.codex-plugin/plugin.json +28 -0
  117. data/plugins/nitro-kit/skills/nitro-kit-hotwire/SKILL.md +67 -0
  118. data/plugins/nitro-kit/skills/nitro-kit-hotwire/agents/openai.yaml +4 -0
  119. data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +60 -0
  120. data/plugins/nitro-kit/skills/nitro-kit-rails/agents/openai.yaml +4 -0
  121. data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +62 -0
  122. data/plugins/nitro-kit/skills/nitro-kit-ui/agents/openai.yaml +4 -0
  123. data/src/stylesheets/nitro_kit/components/accordion.css +119 -0
  124. data/src/stylesheets/nitro_kit/components/alert.css +82 -0
  125. data/src/stylesheets/nitro_kit/components/app_navigation.css +156 -0
  126. data/src/stylesheets/nitro_kit/components/app_shell.css +605 -0
  127. data/src/stylesheets/nitro_kit/components/appearance_picker.css +117 -0
  128. data/src/stylesheets/nitro_kit/components/auth_shell.css +8 -0
  129. data/src/stylesheets/nitro_kit/components/avatar.css +81 -0
  130. data/src/stylesheets/nitro_kit/components/avatar_stack.css +80 -0
  131. data/src/stylesheets/nitro_kit/components/badge.css +76 -0
  132. data/src/stylesheets/nitro_kit/components/button.css +283 -0
  133. data/src/stylesheets/nitro_kit/components/button_group.css +53 -0
  134. data/src/stylesheets/nitro_kit/components/button_to.css +6 -0
  135. data/src/stylesheets/nitro_kit/components/card.css +70 -0
  136. data/src/stylesheets/nitro_kit/components/checkbox.css +160 -0
  137. data/src/stylesheets/nitro_kit/components/checkbox_group.css +61 -0
  138. data/src/stylesheets/nitro_kit/components/combobox.css +148 -0
  139. data/src/stylesheets/nitro_kit/components/command_palette.css +255 -0
  140. data/src/stylesheets/nitro_kit/components/container.css +25 -0
  141. data/src/stylesheets/nitro_kit/components/control_group.css +149 -0
  142. data/src/stylesheets/nitro_kit/components/danger_zone.css +54 -0
  143. data/src/stylesheets/nitro_kit/components/data_section.css +40 -0
  144. data/src/stylesheets/nitro_kit/components/details_table.css +53 -0
  145. data/src/stylesheets/nitro_kit/components/dialog.css +80 -0
  146. data/src/stylesheets/nitro_kit/components/dropdown.css +152 -0
  147. data/src/stylesheets/nitro_kit/components/dropzone.css +198 -0
  148. data/src/stylesheets/nitro_kit/components/empty_state.css +53 -0
  149. data/src/stylesheets/nitro_kit/components/field.css +79 -0
  150. data/src/stylesheets/nitro_kit/components/field_group.css +6 -0
  151. data/src/stylesheets/nitro_kit/components/fieldset.css +28 -0
  152. data/src/stylesheets/nitro_kit/components/flex.css +455 -0
  153. data/src/stylesheets/nitro_kit/components/form_section.css +71 -0
  154. data/src/stylesheets/nitro_kit/components/grid.css +308 -0
  155. data/src/stylesheets/nitro_kit/components/icon.css +26 -0
  156. data/src/stylesheets/nitro_kit/components/input.css +80 -0
  157. data/src/stylesheets/nitro_kit/components/label.css +9 -0
  158. data/src/stylesheets/nitro_kit/components/layout.css +440 -0
  159. data/src/stylesheets/nitro_kit/components/page_header.css +61 -0
  160. data/src/stylesheets/nitro_kit/components/pagination.css +119 -0
  161. data/src/stylesheets/nitro_kit/components/pagination_bar.css +41 -0
  162. data/src/stylesheets/nitro_kit/components/palette.css +113 -0
  163. data/src/stylesheets/nitro_kit/components/progressive_image.css +139 -0
  164. data/src/stylesheets/nitro_kit/components/radio_button.css +127 -0
  165. data/src/stylesheets/nitro_kit/components/radio_button_group.css +143 -0
  166. data/src/stylesheets/nitro_kit/components/rich_text_area.css +21 -0
  167. data/src/stylesheets/nitro_kit/components/select.css +70 -0
  168. data/src/stylesheets/nitro_kit/components/settings_layout.css +100 -0
  169. data/src/stylesheets/nitro_kit/components/sheet.css +100 -0
  170. data/src/stylesheets/nitro_kit/components/stat_grid.css +51 -0
  171. data/src/stylesheets/nitro_kit/components/switch.css +152 -0
  172. data/src/stylesheets/nitro_kit/components/table.css +116 -0
  173. data/src/stylesheets/nitro_kit/components/tabs.css +138 -0
  174. data/src/stylesheets/nitro_kit/components/textarea.css +39 -0
  175. data/src/stylesheets/nitro_kit/components/toast.css +131 -0
  176. data/src/stylesheets/nitro_kit/components/toolbar.css +78 -0
  177. data/src/stylesheets/nitro_kit/components/tooltip.css +124 -0
  178. data/src/stylesheets/nitro_kit/components/typeset.css +191 -0
  179. data/src/stylesheets/nitro_kit/layers.css +7 -0
  180. data/src/stylesheets/nitro_kit/reset.css +192 -0
  181. data/src/stylesheets/nitro_kit/tokens.css +198 -0
  182. metadata +182 -51
  183. data/Rakefile +0 -8
  184. data/app/assets/tailwind/application.css +0 -49
  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 -46
  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 -129
  219. data/lib/nitro_kit/variants.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06ec36dc808b0223864423889cf64d62465c925e111a49d334110aadfa0859a3
4
- data.tar.gz: 9a1f9f81419b52fcfb8c5a956e134f424419a4c5b922ecc68d820f3bfb135a9d
3
+ metadata.gz: 2cfb9e904d8890216a6c778b5dd10655e22f77fa7508fd4d9eb9521453b61cd8
4
+ data.tar.gz: 3c9564fa27b68e1a10c1febe8b7104416251a5203b1bd25aa89b1617cab1e116
5
5
  SHA512:
6
- metadata.gz: dd3df11e3987edb2be111e580442b9ccac3d3e1f414bdb7933469f1ab7d1c29cf0e3b17648eb01793301ea64b8880a776d545428b34e76aabf779c9161e7c889
7
- data.tar.gz: b5ef21b4509537b8e373278ea1fa52e08d154e5a46869c942ad39f2fe69888ba2cb215a85e00e1e34f196a94afbace25e2a6b1ed744ef18116724462b2a22676
6
+ metadata.gz: de02c676e41ea2cb0d674de967efa9c73aa8d6f65195af0bfae0ce35e305dc9fb5e53979659e5feed738cf0fdc4e968902931be726a5d1bd67f22a400ce3c0b2
7
+ data.tar.gz: 2ffdd83fe0f4005c5146a3d9e4fa13e7ce8a6b6d84d0a7e881aace598a6ff938836b20c15f29bde5f9d72e9bed8ef2e4a6b8a083add6986a0acdacb653221a4e
@@ -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,172 @@
1
+ # Changelog
2
+
3
+ ## 2.0.0.alpha.2
4
+
5
+ This alpha keeps the 2.0 API experimental while incorporating the first full
6
+ catalog-pattern and external-agent testing pass.
7
+
8
+ ### Changed
9
+
10
+ - Add the setup-only installer, project-local agent guidance, diagnostics, and
11
+ initialization prompt used by new and existing Rails applications.
12
+ - Align desktop page-header actions with the title edge and improve nested
13
+ table and responsive dropzone composition.
14
+ - Exercise desktop pointer capabilities in browser CI with environment-matched
15
+ Chrome tooling.
16
+
17
+ ### Fixed
18
+
19
+ - Improve warning, destructive, form-error, and dark-mode contrast.
20
+ - Preserve native list and fieldset semantics in form errors and grouped
21
+ controls.
22
+ - Fix table-cell alignment leakage and cramped upload actions at narrow widths.
23
+
24
+ ## 2.0.0.alpha.1
25
+
26
+ 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.
27
+
28
+ ### Breaking changes
29
+
30
+ #### Packaging and API surface
31
+
32
+ - Replace generated editable component copies with versioned `NitroKit::*` classes loaded from the gem.
33
+ - Remove all `nk_*` ERB helpers, generated variant helpers, `from_template`, and template-buffer bridges.
34
+ - Remove copied-component generators, schema/variant metadata, and legacy installation paths.
35
+ - Add a setup-only generator, project-local Rails/Hotwire/UI skills, integration
36
+ diagnostics, and an agent initialization prompt for Nitro Kit 2.
37
+ - Remove Tailwind Merge, consumer Tailwind requirements, old Tailwind assets, and internal component class strings.
38
+ - Use Rails `form_with(..., builder: NitroKit::FormBuilder)` instead of `nk_form_with` or `nk_form_for`.
39
+ - Remove vendored Floating UI and combobox navigation runtimes and the obsolete Datepicker and Switch controllers.
40
+
41
+ #### Attribute boundary
42
+
43
+ - Replace permissive component attributes with explicit options and `html:`, `aria:`, and `data:` boundaries.
44
+ - Reject `class` and `style`; add the observable `desperately_need_a_class:` integration escape.
45
+ - 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.
46
+ - 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.
47
+
48
+ #### Removed components and options
49
+
50
+ - Remove `VStack` and `HStack` in favor of one explicit, responsive `Flex` component.
51
+ - Remove the Datepicker component entirely. `Input`'s `type: :date` is the only date control, and `Field`/`FormBuilder` reach it through `as: :date`.
52
+ - 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.
53
+ - Remove `Combobox::Option` in favor of the shared, validated `NitroKit::Choice` value.
54
+ - 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.
55
+
56
+ #### Renamed and reshaped options
57
+
58
+ - 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.
59
+ - Add `icon:` to `Dropdown#item` alongside its owned `data-variant` for `default` and `destructive` items.
60
+ - 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.
61
+ - Rename `Dropzone`'s visible prompt keyword from `title:` to `label:`, and move its remaining user-facing strings into the `nitro_kit.dropzone.*` locale scope.
62
+ - 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`.
63
+ - 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.
64
+ - 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.
65
+ - 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.
66
+ - 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:`.
67
+ - 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.
68
+
69
+ ### Added
70
+
71
+ - 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.
72
+ - Self-describing, classless `data-nk` roots and component-qualified `data-slot` contracts.
73
+ - Static zero-specificity CSS, light and dark theme tokens with a no-JavaScript system fallback, and a separate Tailwind CSS v4 adapter.
74
+ - Responsive Flex and Grid layouts with fixed mobile-first breakpoints, closed values, classless data contracts, and no Tailwind runtime; plus the constrained-width Container.
75
+ - Sortable `Table` headers with caller-owned URLs, native `aria-sort`, and an optional Ransack gallery recipe.
76
+ - Eleven blocks and shells: AuthShell, AppShell, SettingsLayout, Toolbar, PaginationBar, PageHeader, StatGrid, DataSection, FormSection, DangerZone, and EmptyState.
77
+ - AppNavigation, AppearancePicker, DetailsTable, Dropzone, and ProgressiveImage components, plus the non-visual AppearanceBootstrap runtime.
78
+ - Typed Choice values and direct-Phlex Rails FormBuilder integration with Active Model errors, native and direct uploads, and Turbo Frame/Stream examples.
79
+ - Direct optional Pagy integration through `Pagination(pagy:)`, with an explicit URL callable for caller-owned destinations.
80
+ - 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.
81
+ - 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.
82
+ - `Typeset` for semantic rich content and `RichTextArea` for the host application's rich-text editor output.
83
+ - 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.
84
+ - A catalog-driven Phlex gallery covering components, blocks, broad application flows, complete application shells, responsive states, and light, dark, and system appearance.
85
+ - A public customization guide and gallery wizard for documented tokens, deterministic CSS exports, and copyable AppShell composition.
86
+
87
+ ### License metadata
88
+
89
+ - Mark the gem's existing custom NitroKit License as nonstandard and include `LICENSE` in the package. The license terms are unchanged.
90
+
91
+ ## 0.9.0
92
+
93
+ ### Added
94
+
95
+ - Include assets in the gem package
96
+ - Add integration test coverage for core components
97
+
98
+ ### Changed
99
+
100
+ - Update pagination helper for the latest Pagy API
101
+ - Resolve schema builder dependencies transitively
102
+
103
+ ### Fixed
104
+
105
+ - Apply combobox root class correctly
106
+ - Fix rendering NitroKit components inside NitroKit components
107
+ - Fix Select prompt handling
108
+ - Fix dropdown destructive item helper argument handling
109
+ - Handle missing Pagy dependency gracefully
110
+
111
+ ## 0.8.0
112
+
113
+ ### Changed
114
+
115
+ - Reformat as Rails Omakase rubocop style
116
+ - Update Avatar component rendering for improved consistency
117
+ - Add formatting tools and minor cleanup improvements
118
+
119
+ ### Fixed
120
+
121
+ - Fix Select component empty rendering issue
122
+ - Add missing `select` method to FormBuilder
123
+ - Fix toast controller initialization timing issues
124
+ - Add Table wrapper parameter
125
+ - Remove default whitespace-nowrap from table cells
126
+
127
+ ## 0.7.0
128
+
129
+ ### Changed
130
+
131
+ - Migrate from `builder_method` to `from_template` pattern
132
+ - Update Input focus styling to use `focus-visible` for better accessibility
133
+ - Improve `text_or_block` method with SafeBuffer handling
134
+ - Remove I18n dependency from FormBuilder
135
+
136
+ ### Added
137
+
138
+ - XL size option for Button component
139
+ - `radio_button` method to FormBuilder
140
+ - `nk_avatar_stack` helper and component
141
+ - Pass options to Combobox in `combobox` method
142
+ - Support for rendering fields as custom component classes
143
+
144
+ ### Fixed
145
+
146
+ - Remove duplicate id from field checkbox hidden field
147
+ - Fix checkbox field and textarea rendering
148
+ - Add spacing between consecutive fieldsets
149
+ - Improve dropdown functionality
150
+
151
+ ## 0.6.0
152
+
153
+ 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.
154
+
155
+ ### Breaking changes
156
+
157
+ - 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)
158
+
159
+ ### Changed
160
+
161
+ - Update `phlex` and `phlex-rails` dependencies
162
+ - Increase button[size=sm] size
163
+
164
+ ### Added
165
+
166
+ - Badge colors!
167
+ - Support for `as:` prop in Dialog
168
+ - `align:` prop for table cells
169
+
170
+ ## 0.5.2
171
+
172
+ 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,35 @@
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.2` prerelease is a ground-up rebuild under active testing and must not be treated as stable. New documentation and the Nitro Kit Pro alpha 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).
15
+ Install the alpha explicitly and keep it pinned while evaluating it.
14
16
 
15
- [![Rubygems](https://img.shields.io/gem/v/nitro_kit.svg)](https://rubygems.org/gems/nitro_kit)
16
-
17
- ---
17
+ ```ruby
18
+ gem "nitro_kit", "2.0.0.alpha.2"
19
+ ```
18
20
 
19
- ### Development
21
+ 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
22
 
21
23
  ```sh
22
- bin/setup
23
- bin/dev
24
+ bundle install
25
+ bin/rails generate nitro_kit:install
26
+ bin/rails nitro_kit:doctor
24
27
  ```
25
28
 
26
- ### License
29
+ 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.
30
+
31
+ Maintaining Nitro Kit 1? Its frozen documentation remains at [v1.nitrokit.dev](https://v1.nitrokit.dev).
32
+
33
+ ## License
27
34
 
28
- MIT
35
+ Nitro Kit is distributed under the custom [NitroKit License](LICENSE).