nitro_kit 2.0.0.alpha.2 → 2.0.0.alpha.4
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/CHANGELOG.md +229 -1
- data/README.md +25 -10
- data/STYLE_GUIDE.md +47 -5
- data/app/assets/stylesheets/nitro_kit-tailwind-v4.css +3 -3
- data/app/assets/stylesheets/nitro_kit.css +2820 -1816
- data/app/components/nitro_kit/accordion.rb +2 -26
- data/app/components/nitro_kit/alert.rb +1 -11
- data/app/components/nitro_kit/app_navigation.rb +45 -11
- data/app/components/nitro_kit/app_shell.rb +1 -7
- data/app/components/nitro_kit/appearance_picker.rb +11 -12
- data/app/components/nitro_kit/avatar.rb +6 -1
- data/app/components/nitro_kit/avatar_stack.rb +3 -0
- data/app/components/nitro_kit/badge.rb +13 -4
- data/app/components/nitro_kit/button_group.rb +2 -2
- data/app/components/nitro_kit/checkbox.rb +7 -4
- data/app/components/nitro_kit/checkbox_group.rb +0 -25
- data/app/components/nitro_kit/combobox.rb +4 -33
- data/app/components/nitro_kit/command_palette.rb +42 -59
- data/app/components/nitro_kit/component.rb +57 -5
- data/app/components/nitro_kit/danger_zone.rb +5 -1
- data/app/components/nitro_kit/data_section.rb +28 -4
- data/app/components/nitro_kit/details_table.rb +19 -8
- data/app/components/nitro_kit/dialog.rb +23 -19
- data/app/components/nitro_kit/dropdown.rb +1 -6
- data/app/components/nitro_kit/dropzone.rb +4 -15
- data/app/components/nitro_kit/empty_state.rb +21 -2
- data/app/components/nitro_kit/field.rb +35 -11
- data/app/components/nitro_kit/form_builder.rb +1 -2
- data/app/components/nitro_kit/progressive_image.rb +2 -2
- data/app/components/nitro_kit/radio_button.rb +7 -4
- data/app/components/nitro_kit/radio_button_group.rb +0 -25
- data/app/components/nitro_kit/select.rb +4 -17
- data/app/components/nitro_kit/settings_layout.rb +17 -4
- data/app/components/nitro_kit/{form_section.rb → settings_section.rb} +18 -11
- data/app/components/nitro_kit/sheet.rb +29 -20
- data/app/components/nitro_kit/stat_grid.rb +18 -2
- data/app/components/nitro_kit/table.rb +22 -3
- data/app/components/nitro_kit/tabs.rb +2 -13
- data/app/components/nitro_kit/toast.rb +4 -2
- data/app/components/nitro_kit/toolbar.rb +2 -0
- data/app/components/nitro_kit/tooltip.rb +7 -10
- data/app/javascript/controllers/nk/app_shell_controller.js +3 -3
- data/app/javascript/controllers/nk/appearance_controller.js +6 -0
- data/app/javascript/controllers/nk/combobox_controller.js +51 -1
- data/app/javascript/controllers/nk/command_palette_controller.js +25 -11
- data/app/javascript/controllers/nk/dialog_controller.js +54 -0
- data/app/javascript/controllers/nk/dropdown_controller.js +45 -0
- data/app/javascript/controllers/nk/dropzone_controller.js +2 -2
- data/app/javascript/controllers/nk/progressive_image_controller.js +11 -7
- data/app/javascript/controllers/nk/tabs_controller.js +21 -2
- data/app/javascript/controllers/nk/tooltip_controller.js +9 -0
- data/config/locales/en.yml +4 -1
- data/docs/agent_guide.md +63 -123
- data/docs/agent_native_spec.md +72 -383
- data/docs/browser_support.md +82 -0
- data/docs/component_contracts.md +108 -82
- data/docs/customization.md +689 -91
- data/docs/hotwire.md +50 -76
- data/docs/initialization_prompt.md +26 -31
- data/docs/migration_1_to_2.md +88 -30
- data/docs/patterns/application_foundation.md +45 -119
- data/docs/patterns/crud_resource.md +44 -126
- data/docs/patterns/destructive_action.md +45 -77
- data/docs/patterns/flash_and_toast.md +18 -36
- data/docs/patterns/inline_edit.md +21 -44
- data/docs/patterns/queryable_collection.md +65 -161
- data/docs/patterns/resource_form.md +33 -81
- data/docs/rails_conventions.md +38 -75
- data/docs/rails_integration.md +96 -446
- data/lib/generators/nitro_kit/upgrade_smoke_tests_generator.rb +12 -0
- data/lib/nitro_kit/installation.rb +20 -7
- data/lib/nitro_kit/migration_inventory.rb +275 -8
- data/lib/nitro_kit/upgrade_smoke_test.rb +10 -12
- data/lib/nitro_kit/version.rb +1 -1
- data/lib/rails/commands/nitro_kit/nitro_kit_command.rb +10 -3
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/SKILL.md +4 -0
- data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +13 -1
- data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +32 -15
- data/src/stylesheets/nitro_kit/components/accordion.css +44 -44
- data/src/stylesheets/nitro_kit/components/alert.css +27 -36
- data/src/stylesheets/nitro_kit/components/app_navigation.css +92 -20
- data/src/stylesheets/nitro_kit/components/app_shell.css +199 -196
- data/src/stylesheets/nitro_kit/components/appearance_picker.css +61 -39
- data/src/stylesheets/nitro_kit/components/auth_shell.css +2 -2
- data/src/stylesheets/nitro_kit/components/avatar.css +15 -11
- data/src/stylesheets/nitro_kit/components/avatar_stack.css +48 -29
- data/src/stylesheets/nitro_kit/components/badge.css +13 -9
- data/src/stylesheets/nitro_kit/components/button.css +121 -79
- data/src/stylesheets/nitro_kit/components/button_group.css +19 -14
- data/src/stylesheets/nitro_kit/components/card.css +12 -6
- data/src/stylesheets/nitro_kit/components/checkbox.css +54 -67
- data/src/stylesheets/nitro_kit/components/checkbox_group.css +16 -16
- data/src/stylesheets/nitro_kit/components/combobox.css +39 -29
- data/src/stylesheets/nitro_kit/components/command_palette.css +110 -51
- data/src/stylesheets/nitro_kit/components/container.css +6 -6
- data/src/stylesheets/nitro_kit/components/control_group.css +61 -67
- data/src/stylesheets/nitro_kit/components/danger_zone.css +8 -8
- data/src/stylesheets/nitro_kit/components/data_section.css +4 -4
- data/src/stylesheets/nitro_kit/components/details_table.css +17 -15
- data/src/stylesheets/nitro_kit/components/dialog.css +8 -5
- data/src/stylesheets/nitro_kit/components/dropdown.css +36 -30
- data/src/stylesheets/nitro_kit/components/dropzone.css +78 -35
- data/src/stylesheets/nitro_kit/components/empty_state.css +7 -7
- data/src/stylesheets/nitro_kit/components/field.css +32 -28
- data/src/stylesheets/nitro_kit/components/field_group.css +13 -0
- data/src/stylesheets/nitro_kit/components/fieldset.css +8 -2
- data/src/stylesheets/nitro_kit/components/flex.css +1 -1
- data/src/stylesheets/nitro_kit/components/grid.css +1 -1
- data/src/stylesheets/nitro_kit/components/icon.css +5 -5
- data/src/stylesheets/nitro_kit/components/input.css +42 -8
- data/src/stylesheets/nitro_kit/components/layout.css +165 -165
- data/src/stylesheets/nitro_kit/components/page_header.css +7 -7
- data/src/stylesheets/nitro_kit/components/pagination.css +58 -49
- data/src/stylesheets/nitro_kit/components/pagination_bar.css +9 -9
- data/src/stylesheets/nitro_kit/components/palette.css +145 -77
- data/src/stylesheets/nitro_kit/components/progressive_image.css +45 -55
- data/src/stylesheets/nitro_kit/components/radio_button.css +48 -46
- data/src/stylesheets/nitro_kit/components/radio_button_group.css +49 -49
- data/src/stylesheets/nitro_kit/components/rich_text_area.css +16 -1
- data/src/stylesheets/nitro_kit/components/select.css +24 -15
- data/src/stylesheets/nitro_kit/components/settings_layout.css +26 -23
- data/src/stylesheets/nitro_kit/components/settings_section.css +84 -0
- data/src/stylesheets/nitro_kit/components/sheet.css +30 -10
- data/src/stylesheets/nitro_kit/components/stat_grid.css +11 -10
- data/src/stylesheets/nitro_kit/components/switch.css +60 -62
- data/src/stylesheets/nitro_kit/components/table.css +43 -35
- data/src/stylesheets/nitro_kit/components/tabs.css +48 -40
- data/src/stylesheets/nitro_kit/components/textarea.css +20 -5
- data/src/stylesheets/nitro_kit/components/toast.css +11 -47
- data/src/stylesheets/nitro_kit/components/toolbar.css +16 -41
- data/src/stylesheets/nitro_kit/components/tooltip.css +38 -29
- data/src/stylesheets/nitro_kit/components/typeset.css +150 -4
- data/src/stylesheets/nitro_kit/reset.css +15 -15
- data/src/stylesheets/nitro_kit/tokens.css +501 -79
- metadata +4 -4
- data/docs/new_app_strategy.md +0 -22
- data/src/stylesheets/nitro_kit/components/form_section.css +0 -71
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nitro_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.0.alpha.
|
|
4
|
+
version: 2.0.0.alpha.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mikkel Malmberg
|
|
@@ -128,7 +128,6 @@ files:
|
|
|
128
128
|
- app/components/nitro_kit/fieldset.rb
|
|
129
129
|
- app/components/nitro_kit/flex.rb
|
|
130
130
|
- app/components/nitro_kit/form_builder.rb
|
|
131
|
-
- app/components/nitro_kit/form_section.rb
|
|
132
131
|
- app/components/nitro_kit/grid.rb
|
|
133
132
|
- app/components/nitro_kit/icon.rb
|
|
134
133
|
- app/components/nitro_kit/input.rb
|
|
@@ -144,6 +143,7 @@ files:
|
|
|
144
143
|
- app/components/nitro_kit/rich_text_area.rb
|
|
145
144
|
- app/components/nitro_kit/select.rb
|
|
146
145
|
- app/components/nitro_kit/settings_layout.rb
|
|
146
|
+
- app/components/nitro_kit/settings_section.rb
|
|
147
147
|
- app/components/nitro_kit/sheet.rb
|
|
148
148
|
- app/components/nitro_kit/stat_grid.rb
|
|
149
149
|
- app/components/nitro_kit/switch.rb
|
|
@@ -176,12 +176,12 @@ files:
|
|
|
176
176
|
- config/locales/en.yml
|
|
177
177
|
- docs/agent_guide.md
|
|
178
178
|
- docs/agent_native_spec.md
|
|
179
|
+
- docs/browser_support.md
|
|
179
180
|
- docs/component_contracts.md
|
|
180
181
|
- docs/customization.md
|
|
181
182
|
- docs/hotwire.md
|
|
182
183
|
- docs/initialization_prompt.md
|
|
183
184
|
- docs/migration_1_to_2.md
|
|
184
|
-
- docs/new_app_strategy.md
|
|
185
185
|
- docs/patterns/application_foundation.md
|
|
186
186
|
- docs/patterns/crud_resource.md
|
|
187
187
|
- docs/patterns/destructive_action.md
|
|
@@ -238,7 +238,6 @@ files:
|
|
|
238
238
|
- src/stylesheets/nitro_kit/components/field_group.css
|
|
239
239
|
- src/stylesheets/nitro_kit/components/fieldset.css
|
|
240
240
|
- src/stylesheets/nitro_kit/components/flex.css
|
|
241
|
-
- src/stylesheets/nitro_kit/components/form_section.css
|
|
242
241
|
- src/stylesheets/nitro_kit/components/grid.css
|
|
243
242
|
- src/stylesheets/nitro_kit/components/icon.css
|
|
244
243
|
- src/stylesheets/nitro_kit/components/input.css
|
|
@@ -254,6 +253,7 @@ files:
|
|
|
254
253
|
- src/stylesheets/nitro_kit/components/rich_text_area.css
|
|
255
254
|
- src/stylesheets/nitro_kit/components/select.css
|
|
256
255
|
- src/stylesheets/nitro_kit/components/settings_layout.css
|
|
256
|
+
- src/stylesheets/nitro_kit/components/settings_section.css
|
|
257
257
|
- src/stylesheets/nitro_kit/components/sheet.css
|
|
258
258
|
- src/stylesheets/nitro_kit/components/stat_grid.css
|
|
259
259
|
- src/stylesheets/nitro_kit/components/switch.css
|
data/docs/new_app_strategy.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# New application strategy
|
|
2
|
-
|
|
3
|
-
Recommend a Rails application template for new applications, not a return to Nitro Kit's old component-copying generator.
|
|
4
|
-
|
|
5
|
-
Rails application templates are designed to configure a new app during `rails new`, can add gems, and can run generators after Bundler finishes. Nitro Kit's starter therefore remains a thin one-command entry point:
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
rails new my_app -m https://nitrokit.dev/template.rb
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The template adds Nitro Kit and invokes `nitro_kit:install`. The generator owns
|
|
12
|
-
the project-local skills and `AGENTS.md`. The template does not copy Nitro
|
|
13
|
-
components, controllers, authentication, teams, billing, or product models.
|
|
14
|
-
|
|
15
|
-
Existing applications install the gem directly and run the setup generator.
|
|
16
|
-
Agent discovery, version-matched skill routing, diagnostics, and initialization
|
|
17
|
-
handoff are meaningful application-owned setup; component source remains
|
|
18
|
-
gem-owned.
|
|
19
|
-
|
|
20
|
-
An optional `nitro_kit:application` generator can later create an application-owned base: layout, `UI` namespace, shell choice, root screen, and authentication hooks. Keep that separate from installing the UI gem so teams can adopt Nitro Kit without adopting an application architecture.
|
|
21
|
-
|
|
22
|
-
Promote the template into a versioned starter application only when Nitro Kit deliberately owns opinions beyond UI and interaction conventions, such as authentication, accounts, teams, billing, jobs, mail, and deployment. Until then, the application template is easier to inspect, test, and evolve and does not impose the maintenance cost of a forked starter repository.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
@layer nitro-kit.base {
|
|
2
|
-
:where([data-nk="form-section"]) {
|
|
3
|
-
display: grid;
|
|
4
|
-
grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
|
|
5
|
-
column-gap: calc(var(--nk-space) * 8);
|
|
6
|
-
row-gap: calc(var(--nk-space) * 5);
|
|
7
|
-
align-items: start;
|
|
8
|
-
min-width: 0;
|
|
9
|
-
color: var(--nk-color-foreground);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:where([data-nk="form-section"] > [data-slot="form-section-header"]) {
|
|
13
|
-
display: grid;
|
|
14
|
-
gap: calc(var(--nk-space) * 2);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:where([data-nk="form-section"] [data-slot="form-section-title"]) {
|
|
18
|
-
font-size: var(--nk-text-xl);
|
|
19
|
-
font-weight: var(--nk-font-weight-semibold);
|
|
20
|
-
line-height: var(--nk-leading-tight);
|
|
21
|
-
text-wrap: balance;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:where([data-nk="form-section"] [data-slot="form-section-description"]) {
|
|
25
|
-
max-width: var(--nk-content-lg);
|
|
26
|
-
color: var(--nk-color-muted-foreground);
|
|
27
|
-
font-size: var(--nk-text-sm);
|
|
28
|
-
line-height: var(--nk-leading-relaxed);
|
|
29
|
-
text-wrap: pretty;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:where([data-nk="form-section"] > [data-slot="form-section-form"]) {
|
|
33
|
-
display: grid;
|
|
34
|
-
grid-column: 2;
|
|
35
|
-
gap: calc(var(--nk-space) * 4);
|
|
36
|
-
width: 100%;
|
|
37
|
-
max-width: var(--nk-content-lg);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:where([data-nk="form-section"] > [data-slot="form-section-status"]) {
|
|
41
|
-
grid-column: 2;
|
|
42
|
-
width: 100%;
|
|
43
|
-
max-width: var(--nk-content-lg);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:where([data-nk="form-section"] > [data-slot="form-section-form"] > form) {
|
|
47
|
-
display: grid;
|
|
48
|
-
gap: calc(var(--nk-space) * 5);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:where([data-nk="form-section"] + [data-nk="form-section"]) {
|
|
52
|
-
padding-block-start: calc(var(--nk-space) * 8);
|
|
53
|
-
border-block-start: var(--nk-border-width) solid var(--nk-color-border);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@layer nitro-kit.state {
|
|
58
|
-
@media (max-width: 48rem) {
|
|
59
|
-
:where([data-nk="form-section"]) {
|
|
60
|
-
grid-template-columns: minmax(0, 1fr);
|
|
61
|
-
row-gap: calc(var(--nk-space) * 4);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:where(
|
|
65
|
-
[data-nk="form-section"] > [data-slot="form-section-status"],
|
|
66
|
-
[data-nk="form-section"] > [data-slot="form-section-form"]
|
|
67
|
-
) {
|
|
68
|
-
grid-column: 1;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|