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.
- checksums.yaml +4 -4
- data/.agents/plugins/marketplace.json +20 -0
- data/CHANGELOG.md +172 -0
- data/LICENSE +28 -0
- data/README.md +22 -15
- data/STYLE_GUIDE.md +425 -0
- data/app/assets/stylesheets/nitro_kit-tailwind-v4.css +38 -0
- data/app/assets/stylesheets/nitro_kit.css +7239 -0
- data/app/components/nitro_kit/accordion.rb +125 -65
- data/app/components/nitro_kit/alert.rb +80 -43
- data/app/components/nitro_kit/app_navigation.rb +307 -0
- data/app/components/nitro_kit/app_shell.rb +227 -0
- data/app/components/nitro_kit/appearance_bootstrap.rb +146 -0
- data/app/components/nitro_kit/appearance_picker.rb +156 -0
- data/app/components/nitro_kit/auth_shell.rb +34 -0
- data/app/components/nitro_kit/avatar.rb +85 -29
- data/app/components/nitro_kit/avatar_stack.rb +155 -9
- data/app/components/nitro_kit/badge.rb +43 -81
- data/app/components/nitro_kit/button.rb +180 -103
- data/app/components/nitro_kit/button_group.rb +63 -11
- data/app/components/nitro_kit/button_to.rb +69 -0
- data/app/components/nitro_kit/card.rb +42 -45
- data/app/components/nitro_kit/checkbox.rb +115 -62
- data/app/components/nitro_kit/checkbox_group.rb +131 -22
- data/app/components/nitro_kit/choice.rb +55 -0
- data/app/components/nitro_kit/combobox.rb +292 -105
- data/app/components/nitro_kit/command_palette.rb +412 -0
- data/app/components/nitro_kit/component.rb +322 -46
- data/app/components/nitro_kit/container.rb +32 -0
- data/app/components/nitro_kit/control_group.rb +45 -0
- data/app/components/nitro_kit/danger_zone.rb +78 -0
- data/app/components/nitro_kit/data_section.rb +106 -0
- data/app/components/nitro_kit/details_table.rb +229 -0
- data/app/components/nitro_kit/dialog.rb +257 -83
- data/app/components/nitro_kit/dropdown.rb +335 -122
- data/app/components/nitro_kit/dropzone.rb +326 -0
- data/app/components/nitro_kit/empty_state.rb +99 -0
- data/app/components/nitro_kit/field.rb +461 -236
- data/app/components/nitro_kit/field_group.rb +15 -8
- data/app/components/nitro_kit/fieldset.rb +37 -39
- data/app/components/nitro_kit/flex.rb +49 -0
- data/app/components/nitro_kit/form_builder.rb +313 -72
- data/app/components/nitro_kit/form_section.rb +79 -0
- data/app/components/nitro_kit/grid.rb +34 -0
- data/app/components/nitro_kit/icon.rb +54 -25
- data/app/components/nitro_kit/input.rb +97 -10
- data/app/components/nitro_kit/label.rb +22 -6
- data/app/components/nitro_kit/layout_options.rb +7 -0
- data/app/components/nitro_kit/page_header.rb +76 -0
- data/app/components/nitro_kit/pagination.rb +355 -69
- data/app/components/nitro_kit/pagination_bar.rb +90 -0
- data/app/components/nitro_kit/progressive_image.rb +181 -0
- data/app/components/nitro_kit/radio_button.rb +77 -55
- data/app/components/nitro_kit/radio_button_group.rb +107 -36
- data/app/components/nitro_kit/responsive_value.rb +94 -0
- data/app/components/nitro_kit/rich_text_area.rb +31 -0
- data/app/components/nitro_kit/select.rb +129 -64
- data/app/components/nitro_kit/settings_layout.rb +152 -0
- data/app/components/nitro_kit/sheet.rb +202 -0
- data/app/components/nitro_kit/stat_grid.rb +75 -0
- data/app/components/nitro_kit/switch.rb +108 -51
- data/app/components/nitro_kit/table.rb +237 -45
- data/app/components/nitro_kit/tabs.rb +168 -63
- data/app/components/nitro_kit/textarea.rb +81 -10
- data/app/components/nitro_kit/toast.rb +211 -80
- data/app/components/nitro_kit/toolbar.rb +75 -0
- data/app/components/nitro_kit/tooltip.rb +235 -34
- data/app/components/nitro_kit/typeset.rb +28 -0
- data/app/javascript/controllers/nk/app_shell_controller.js +224 -0
- data/app/javascript/controllers/nk/appearance_controller.js +73 -0
- data/app/javascript/controllers/nk/avatar_controller.js +15 -0
- data/app/javascript/controllers/nk/button_controller.js +56 -0
- data/app/javascript/controllers/nk/checkable_controller.js +41 -0
- data/app/javascript/controllers/nk/combobox_controller.js +314 -82
- data/app/javascript/controllers/nk/command_palette_controller.js +249 -0
- data/app/javascript/controllers/nk/dialog_controller.js +14 -10
- data/app/javascript/controllers/nk/dropdown_controller.js +106 -58
- data/app/javascript/controllers/nk/dropzone/direct_upload.js +61 -0
- data/app/javascript/controllers/nk/dropzone/file_rules.js +77 -0
- data/app/javascript/controllers/nk/dropzone/form_submit_lock.js +30 -0
- data/app/javascript/controllers/nk/dropzone_controller.js +482 -0
- data/app/javascript/controllers/nk/overlay_position.js +37 -0
- data/app/javascript/controllers/nk/progressive_image_controller.js +116 -0
- data/app/javascript/controllers/nk/tabs_controller.js +135 -23
- data/app/javascript/controllers/nk/toast_controller.js +112 -45
- data/app/javascript/controllers/nk/tooltip_controller.js +12 -47
- data/config/importmap.rb +2 -0
- data/config/locales/en.yml +98 -0
- data/docs/agent_guide.md +139 -0
- data/docs/agent_native_spec.md +422 -0
- data/docs/component_contracts.md +263 -0
- data/docs/customization.md +595 -0
- data/docs/hotwire.md +94 -0
- data/docs/initialization_prompt.md +36 -0
- data/docs/migration_1_to_2.md +318 -0
- data/docs/new_app_strategy.md +22 -0
- data/docs/patterns/application_foundation.md +136 -0
- data/docs/patterns/crud_resource.md +144 -0
- data/docs/patterns/destructive_action.md +105 -0
- data/docs/patterns/flash_and_toast.md +57 -0
- data/docs/patterns/inline_edit.md +59 -0
- data/docs/patterns/queryable_collection.md +187 -0
- data/docs/patterns/resource_form.md +126 -0
- data/docs/rails_conventions.md +95 -0
- data/docs/rails_integration.md +514 -0
- data/lib/generators/nitro_kit/install_generator.rb +48 -0
- data/lib/generators/nitro_kit/upgrade_smoke_tests_generator.rb +67 -0
- data/lib/nitro_kit/engine.rb +20 -0
- data/lib/nitro_kit/installation.rb +671 -0
- data/lib/nitro_kit/migration_inventory.rb +345 -0
- data/lib/nitro_kit/upgrade_smoke_test.rb +403 -0
- data/lib/nitro_kit/version.rb +1 -1
- data/lib/nitro_kit.rb +5 -42
- data/lib/rails/commands/nitro_kit/nitro_kit_command.rb +42 -0
- data/lib/tasks/nitro_kit_tasks.rake +79 -4
- data/plugins/nitro-kit/.codex-plugin/plugin.json +28 -0
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/SKILL.md +67 -0
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/agents/openai.yaml +4 -0
- data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +60 -0
- data/plugins/nitro-kit/skills/nitro-kit-rails/agents/openai.yaml +4 -0
- data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +62 -0
- data/plugins/nitro-kit/skills/nitro-kit-ui/agents/openai.yaml +4 -0
- data/src/stylesheets/nitro_kit/components/accordion.css +119 -0
- data/src/stylesheets/nitro_kit/components/alert.css +82 -0
- data/src/stylesheets/nitro_kit/components/app_navigation.css +156 -0
- data/src/stylesheets/nitro_kit/components/app_shell.css +605 -0
- data/src/stylesheets/nitro_kit/components/appearance_picker.css +117 -0
- data/src/stylesheets/nitro_kit/components/auth_shell.css +8 -0
- data/src/stylesheets/nitro_kit/components/avatar.css +81 -0
- data/src/stylesheets/nitro_kit/components/avatar_stack.css +80 -0
- data/src/stylesheets/nitro_kit/components/badge.css +76 -0
- data/src/stylesheets/nitro_kit/components/button.css +283 -0
- data/src/stylesheets/nitro_kit/components/button_group.css +53 -0
- data/src/stylesheets/nitro_kit/components/button_to.css +6 -0
- data/src/stylesheets/nitro_kit/components/card.css +70 -0
- data/src/stylesheets/nitro_kit/components/checkbox.css +160 -0
- data/src/stylesheets/nitro_kit/components/checkbox_group.css +61 -0
- data/src/stylesheets/nitro_kit/components/combobox.css +148 -0
- data/src/stylesheets/nitro_kit/components/command_palette.css +255 -0
- data/src/stylesheets/nitro_kit/components/container.css +25 -0
- data/src/stylesheets/nitro_kit/components/control_group.css +149 -0
- data/src/stylesheets/nitro_kit/components/danger_zone.css +54 -0
- data/src/stylesheets/nitro_kit/components/data_section.css +40 -0
- data/src/stylesheets/nitro_kit/components/details_table.css +53 -0
- data/src/stylesheets/nitro_kit/components/dialog.css +80 -0
- data/src/stylesheets/nitro_kit/components/dropdown.css +152 -0
- data/src/stylesheets/nitro_kit/components/dropzone.css +198 -0
- data/src/stylesheets/nitro_kit/components/empty_state.css +53 -0
- data/src/stylesheets/nitro_kit/components/field.css +79 -0
- data/src/stylesheets/nitro_kit/components/field_group.css +6 -0
- data/src/stylesheets/nitro_kit/components/fieldset.css +28 -0
- data/src/stylesheets/nitro_kit/components/flex.css +455 -0
- data/src/stylesheets/nitro_kit/components/form_section.css +71 -0
- data/src/stylesheets/nitro_kit/components/grid.css +308 -0
- data/src/stylesheets/nitro_kit/components/icon.css +26 -0
- data/src/stylesheets/nitro_kit/components/input.css +80 -0
- data/src/stylesheets/nitro_kit/components/label.css +9 -0
- data/src/stylesheets/nitro_kit/components/layout.css +440 -0
- data/src/stylesheets/nitro_kit/components/page_header.css +61 -0
- data/src/stylesheets/nitro_kit/components/pagination.css +119 -0
- data/src/stylesheets/nitro_kit/components/pagination_bar.css +41 -0
- data/src/stylesheets/nitro_kit/components/palette.css +113 -0
- data/src/stylesheets/nitro_kit/components/progressive_image.css +139 -0
- data/src/stylesheets/nitro_kit/components/radio_button.css +127 -0
- data/src/stylesheets/nitro_kit/components/radio_button_group.css +143 -0
- data/src/stylesheets/nitro_kit/components/rich_text_area.css +21 -0
- data/src/stylesheets/nitro_kit/components/select.css +70 -0
- data/src/stylesheets/nitro_kit/components/settings_layout.css +100 -0
- data/src/stylesheets/nitro_kit/components/sheet.css +100 -0
- data/src/stylesheets/nitro_kit/components/stat_grid.css +51 -0
- data/src/stylesheets/nitro_kit/components/switch.css +152 -0
- data/src/stylesheets/nitro_kit/components/table.css +116 -0
- data/src/stylesheets/nitro_kit/components/tabs.css +138 -0
- data/src/stylesheets/nitro_kit/components/textarea.css +39 -0
- data/src/stylesheets/nitro_kit/components/toast.css +131 -0
- data/src/stylesheets/nitro_kit/components/toolbar.css +78 -0
- data/src/stylesheets/nitro_kit/components/tooltip.css +124 -0
- data/src/stylesheets/nitro_kit/components/typeset.css +191 -0
- data/src/stylesheets/nitro_kit/layers.css +7 -0
- data/src/stylesheets/nitro_kit/reset.css +192 -0
- data/src/stylesheets/nitro_kit/tokens.css +198 -0
- metadata +182 -51
- data/Rakefile +0 -8
- data/app/assets/tailwind/application.css +0 -49
- data/app/components/nitro_kit/datepicker.rb +0 -9
- data/app/helpers/nitro_kit/accordion_helper.rb +0 -9
- data/app/helpers/nitro_kit/alert_helper.rb +0 -11
- data/app/helpers/nitro_kit/avatar_helper.rb +0 -13
- data/app/helpers/nitro_kit/badge_helper.rb +0 -13
- data/app/helpers/nitro_kit/button_group_helper.rb +0 -9
- data/app/helpers/nitro_kit/button_helper.rb +0 -49
- data/app/helpers/nitro_kit/card_helper.rb +0 -9
- data/app/helpers/nitro_kit/checkbox_helper.rb +0 -50
- data/app/helpers/nitro_kit/combobox_helper.rb +0 -9
- data/app/helpers/nitro_kit/datepicker_helper.rb +0 -9
- data/app/helpers/nitro_kit/dialog_helper.rb +0 -9
- data/app/helpers/nitro_kit/dropdown_helper.rb +0 -9
- data/app/helpers/nitro_kit/field_group_helper.rb +0 -9
- data/app/helpers/nitro_kit/field_helper.rb +0 -9
- data/app/helpers/nitro_kit/fieldset_helper.rb +0 -9
- data/app/helpers/nitro_kit/form_helper.rb +0 -13
- data/app/helpers/nitro_kit/icon_helper.rb +0 -9
- data/app/helpers/nitro_kit/input_helper.rb +0 -37
- data/app/helpers/nitro_kit/label_helper.rb +0 -19
- data/app/helpers/nitro_kit/pagination_helper.rb +0 -46
- data/app/helpers/nitro_kit/radio_button_helper.rb +0 -23
- data/app/helpers/nitro_kit/select_helper.rb +0 -24
- data/app/helpers/nitro_kit/switch_helper.rb +0 -9
- data/app/helpers/nitro_kit/table_helper.rb +0 -9
- data/app/helpers/nitro_kit/tabs_helper.rb +0 -9
- data/app/helpers/nitro_kit/textarea_helper.rb +0 -9
- data/app/helpers/nitro_kit/toast_helper.rb +0 -25
- data/app/helpers/nitro_kit/tooltip_helper.rb +0 -9
- data/app/javascript/controllers/nk/accordion_controller.js +0 -18
- data/app/javascript/controllers/nk/datepicker_controller.js +0 -5
- data/app/javascript/controllers/nk/switch_controller.js +0 -32
- data/lib/generators/nitro_kit/component_generator.rb +0 -84
- data/lib/nitro_kit/schema_builder.rb +0 -129
- data/lib/nitro_kit/variants.rb +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2cfb9e904d8890216a6c778b5dd10655e22f77fa7508fd4d9eb9521453b61cd8
|
|
4
|
+
data.tar.gz: 3c9564fa27b68e1a10c1febe8b7104416251a5203b1bd25aa89b1617cab1e116
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
<
|
|
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
|
-
|
|
5
|
+
# Nitro Kit
|
|
4
6
|
|
|
5
|
-
**
|
|
7
|
+
**Rails front-end for the agent era.**
|
|
6
8
|
|
|
7
|
-
|
|
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
|
-
|
|
11
|
+
[](https://rubygems.org/gems/nitro_kit)
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
## Installation
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
Install the alpha explicitly and keep it pinned while evaluating it.
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
```ruby
|
|
18
|
+
gem "nitro_kit", "2.0.0.alpha.2"
|
|
19
|
+
```
|
|
18
20
|
|
|
19
|
-
|
|
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
|
-
|
|
23
|
-
bin/
|
|
24
|
+
bundle install
|
|
25
|
+
bin/rails generate nitro_kit:install
|
|
26
|
+
bin/rails nitro_kit:doctor
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
|
|
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
|
-
|
|
35
|
+
Nitro Kit is distributed under the custom [NitroKit License](LICENSE).
|