nitro_kit 2.0.0.beta.1 → 2.0.0.beta.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/CHANGELOG.md +55 -1
- data/README.md +16 -2
- data/STYLE_GUIDE.md +3 -1
- data/app/assets/stylesheets/nitro_kit.css +519 -35
- data/app/components/nitro_kit/app_shell.rb +41 -5
- data/app/components/nitro_kit/avatar.rb +21 -2
- data/app/components/nitro_kit/card.rb +28 -1
- data/app/javascript/controllers/nk/app_shell_controller.js +64 -2
- data/config/locales/en.yml +1 -0
- data/docs/agent_native_spec.md +5 -4
- data/docs/component_contracts.md +93 -5
- data/docs/customization.md +2 -2
- data/docs/eject.md +86 -0
- data/docs/migration_1_to_2.md +1 -1
- data/docs/patterns/application_foundation.md +22 -0
- data/docs/patterns/inset_workspace.md +9 -1
- data/docs/rails_integration.md +1 -1
- data/lib/generators/nitro_kit/eject_generator.rb +26 -0
- data/lib/nitro_kit/ejection.rb +136 -0
- data/lib/nitro_kit/version.rb +1 -1
- data/src/stylesheets/nitro_kit/components/app_navigation.css +4 -1
- data/src/stylesheets/nitro_kit/components/app_shell.css +209 -0
- data/src/stylesheets/nitro_kit/components/avatar.css +10 -0
- data/src/stylesheets/nitro_kit/components/avatar_stack.css +9 -5
- data/src/stylesheets/nitro_kit/components/card.css +206 -15
- data/src/stylesheets/nitro_kit/components/danger_zone.css +1 -1
- data/src/stylesheets/nitro_kit/components/dropzone.css +15 -0
- data/src/stylesheets/nitro_kit/components/empty_state.css +3 -3
- data/src/stylesheets/nitro_kit/components/field_group.css +6 -2
- data/src/stylesheets/nitro_kit/components/pagination_bar.css +3 -0
- data/src/stylesheets/nitro_kit/components/progressive_image.css +2 -0
- data/src/stylesheets/nitro_kit/components/settings_layout.css +2 -0
- data/src/stylesheets/nitro_kit/components/stat_grid.css +4 -4
- data/src/stylesheets/nitro_kit/components/toolbar.css +12 -0
- data/src/stylesheets/nitro_kit/components/tooltip.css +15 -1
- data/src/stylesheets/nitro_kit/components/typeset.css +4 -0
- data/src/stylesheets/nitro_kit/reset.css +11 -1
- data/src/stylesheets/nitro_kit/tokens.css +3 -2
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d426e47dadcb1efcc115e21074c210e35c4120fca8c4093abf1cc5c431689ce4
|
|
4
|
+
data.tar.gz: 04e353250240db16067074982096a1753afd7ba45f0da04675cff2621e48ac50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2874c385257fbaeae559112addd4702d06b12b510eefcde84c8408f422ce54e7326329f27d2843b420245abbde08acf95aa68f4fd85c69041ca6b477350910a
|
|
7
|
+
data.tar.gz: 153c7c83078bc7521af05540b4750ac3e82b5e5f99da6255c3372c37fa6ef3d1a084aad094e72f45d7da89a06dc294eb249f569dc67d9d8bfa594213a99945f4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 2.0.0.beta.2
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Redesign Card with `header`, `description`, and `actions` slots so call sites
|
|
8
|
+
stop hand-rolling headers and footers. `actions` inside a `header` trail the
|
|
9
|
+
title and description; inside a `footer` they push to the end.
|
|
10
|
+
- Add Card `size: :sm | :md | :lg` density and `variant: :default | :muted |
|
|
11
|
+
:outline` surfaces, emitted as owned `data-size` and `data-variant`
|
|
12
|
+
attributes. Sizes coordinate padding, part gaps, corners, and title size.
|
|
13
|
+
- Add explicit `nitro_kit:eject COMPONENT` source-level customization, with
|
|
14
|
+
isolated Ruby/CSS/Stimulus dependencies, version provenance, and safe whole-snapshot
|
|
15
|
+
skip behavior unless `--force` is requested.
|
|
16
|
+
- Desktop AppShell sidebar rail with hover/focus overlay peek and an accessible
|
|
17
|
+
pin toggle, enabled with `collapsible: true`. The default sidebar stays
|
|
18
|
+
expanded without a toggle or peek behavior; `sidebar: :collapsed` starts an
|
|
19
|
+
opted-in sidebar unpinned.
|
|
20
|
+
Mobile keeps its native drawer, and reduced motion disables rail animation.
|
|
21
|
+
- Align rail selection backgrounds and pin controls, keep peek surfaces opaque,
|
|
22
|
+
and isolate nested shells. `brand(icon:)` keeps a brand mark on the rail
|
|
23
|
+
without cropping the full logotype.
|
|
24
|
+
- Unpinning with a pointer collapses the sidebar immediately; hover peek
|
|
25
|
+
resumes after the pointer first leaves the sidebar.
|
|
26
|
+
- Synchronize sidebar panel, reserved content track, and selection-highlight
|
|
27
|
+
transitions so pinning and unpinning do not snap ahead of the animation.
|
|
28
|
+
Keep the pin control outside hover/focus peek so direct expansion starts
|
|
29
|
+
the panel and content transitions together.
|
|
30
|
+
- Preserve client sidebar pin state and its accessible toggle state across
|
|
31
|
+
Turbo morph refreshes without persisting it across page loads.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- Card titles scale with the card's own size instead of the shared
|
|
36
|
+
`--nk-title-surface-size` role, which now covers dialogs, sheets, empty
|
|
37
|
+
states, and fieldsets.
|
|
38
|
+
- Give card sections set apart by a divider at the top or bottom edge even
|
|
39
|
+
spacing, fixing the uneven medium footer padding. Tables inside `full`
|
|
40
|
+
regions align with the card gutter, and a trailing footer stays on the
|
|
41
|
+
bottom edge of a card stretched by a Grid row.
|
|
42
|
+
- Align StatGrid, DangerZone, and EmptyState panels with the card's padding
|
|
43
|
+
and corners.
|
|
44
|
+
- Stop FieldGroup spacing from counting hidden inputs as neighbours.
|
|
45
|
+
- Replace ghost menu triggers inside gallery cards with the default button
|
|
46
|
+
treatment and rebuild the card gallery around header, body, and footer
|
|
47
|
+
recipes.
|
|
48
|
+
|
|
49
|
+
### Upgrade notes
|
|
50
|
+
|
|
51
|
+
- Pin `2.0.0.beta.2` explicitly. Beta releases may still change APIs; review
|
|
52
|
+
release notes before updating.
|
|
53
|
+
- Cards no longer read `--nk-title-surface-size`; a theme that tuned card
|
|
54
|
+
headings through that token should pick a card `size:` instead.
|
|
55
|
+
- Review application-owned card headers and footers built from raw `Flex`
|
|
56
|
+
rows and move them onto `header`, `description`, and `actions`. Existing
|
|
57
|
+
copied or ejected source is not updated automatically by this gem release.
|
|
4
58
|
|
|
5
59
|
## 2.0.0.beta.1
|
|
6
60
|
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Audience:** Rails developers evaluating or installing Nitro Kit.
|
|
8
8
|
|
|
9
|
-
Nitro Kit is a gem-owned Phlex UI system for Rails. The `2.0.0.beta.
|
|
9
|
+
Nitro Kit is a gem-owned Phlex UI system for Rails. The `2.0.0.beta.2` prerelease
|
|
10
10
|
is under active testing and is not stable.
|
|
11
11
|
|
|
12
12
|
[](https://rubygems.org/gems/nitro_kit)
|
|
@@ -16,7 +16,7 @@ is under active testing and is not stable.
|
|
|
16
16
|
Pin the prerelease:
|
|
17
17
|
|
|
18
18
|
```ruby
|
|
19
|
-
gem "nitro_kit", "2.0.0.beta.
|
|
19
|
+
gem "nitro_kit", "2.0.0.beta.2"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
```sh
|
|
@@ -34,6 +34,7 @@ Start with:
|
|
|
34
34
|
- [Rails integration](docs/rails_integration.md)
|
|
35
35
|
- [Component contracts](docs/component_contracts.md)
|
|
36
36
|
- [Customization](docs/customization.md)
|
|
37
|
+
- [Eject a component into application-owned code](docs/eject.md)
|
|
37
38
|
- [Browser support](docs/browser_support.md)
|
|
38
39
|
- [Nitro Kit 1.x migration](docs/migration_1_to_2.md)
|
|
39
40
|
- [Coding-agent guide](docs/agent_guide.md)
|
|
@@ -60,6 +61,19 @@ Set up Nitro Kit before planning or implementing the product:
|
|
|
60
61
|
Maintaining Nitro Kit 1? Its frozen documentation remains at
|
|
61
62
|
[v1.nitrokit.dev](https://v1.nitrokit.dev).
|
|
62
63
|
|
|
64
|
+
## Eject for source-level customization
|
|
65
|
+
|
|
66
|
+
Prefer tokens and composition. When you need to change a component's source:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
bin/rails generate nitro_kit:eject Button
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Render `Ui::EjectedButton::Button.new("Save")` and load `ejected_button.css`
|
|
73
|
+
after `nitro_kit.css`. Ruby, CSS, and Stimulus dependencies become application-owned;
|
|
74
|
+
keep the gem installed for the shared kernel and tokens. See [Eject](docs/eject.md)
|
|
75
|
+
for integration, collision handling, and upgrade responsibilities.
|
|
76
|
+
|
|
63
77
|
## License
|
|
64
78
|
|
|
65
79
|
Nitro Kit uses the custom [NitroKit License](LICENSE).
|
data/STYLE_GUIDE.md
CHANGED
|
@@ -73,7 +73,8 @@ test/dummy/app/components/gallery/ # Phlex gallery pages
|
|
|
73
73
|
test/integration/ # catalog-driven route coverage
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Do not add component helper modules or
|
|
76
|
+
Do not add component helper modules or default copy-install. The explicit
|
|
77
|
+
user-requested eject generator is the sole copying exception; see `docs/eject.md`.
|
|
77
78
|
|
|
78
79
|
## Component anatomy
|
|
79
80
|
|
|
@@ -443,6 +444,7 @@ Every component includes:
|
|
|
443
444
|
- Structural and component-specific accessibility assertions.
|
|
444
445
|
- A gallery combination page with meaningful permutations.
|
|
445
446
|
- Long, missing optional, disabled, validation/error, dark, and narrow-width examples where relevant.
|
|
447
|
+
- An "Under pressure" example flagged `stress: true`, composed from `Gallery::Hostile`, that the stress sweep audits.
|
|
446
448
|
- Behavior tests for interactive components.
|
|
447
449
|
|
|
448
450
|
The gallery uses explicit Phlex page classes and `Gallery::Catalog`. Do not add ERB component examples or infer routes from filenames. Every `Gallery::Example` pairs Preview and Code tabs. Keep the preview in the block passed to the gallery helper so `Gallery::SourceCode` can extract, highlight, and copy its executable Ruby body; use a concrete method source for inherited flow wrappers instead of duplicating snippets.
|