nitro_kit 2.0.0.alpha.3 → 2.0.0.alpha.5
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 +194 -0
- data/README.md +34 -23
- data/STYLE_GUIDE.md +10 -0
- data/app/assets/stylesheets/nitro_kit-tailwind-v4.css +3 -3
- data/app/assets/stylesheets/nitro_kit.css +1220 -572
- data/app/components/nitro_kit/accordion.rb +1 -19
- data/app/components/nitro_kit/alert.rb +1 -11
- data/app/components/nitro_kit/app_navigation.rb +44 -9
- data/app/components/nitro_kit/appearance_picker.rb +10 -1
- data/app/components/nitro_kit/badge.rb +13 -4
- data/app/components/nitro_kit/combobox.rb +1 -17
- data/app/components/nitro_kit/command_palette.rb +1 -0
- data/app/components/nitro_kit/dropzone.rb +1 -1
- data/app/components/nitro_kit/form_builder.rb +1 -1
- data/app/components/nitro_kit/select.rb +1 -14
- data/app/components/nitro_kit/tabs.rb +1 -0
- data/app/javascript/controllers/nk/command_palette_controller.js +4 -0
- data/app/javascript/controllers/nk/tabs_controller.js +13 -1
- data/docs/agent_guide.md +85 -138
- data/docs/agent_native_spec.md +72 -400
- data/docs/browser_support.md +77 -188
- data/docs/component_contracts.md +56 -36
- data/docs/customization.md +675 -89
- data/docs/hotwire.md +61 -99
- data/docs/initialization_prompt.md +33 -57
- data/docs/migration_1_to_2.md +34 -18
- data/docs/patterns/application_foundation.md +45 -121
- data/docs/patterns/crud_resource.md +44 -129
- data/docs/patterns/destructive_action.md +45 -102
- 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 -78
- data/docs/rails_integration.md +96 -474
- data/lib/nitro_kit/installation.rb +19 -3
- data/lib/nitro_kit/migration_inventory.rb +15 -8
- data/lib/nitro_kit/version.rb +1 -1
- data/plugins/nitro-kit/.codex-plugin/plugin.json +4 -4
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/SKILL.md +12 -0
- data/plugins/nitro-kit/skills/nitro-kit-hotwire/agents/openai.yaml +1 -1
- data/plugins/nitro-kit/skills/nitro-kit-rails/SKILL.md +22 -0
- data/plugins/nitro-kit/skills/nitro-kit-rails/agents/openai.yaml +1 -1
- data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +33 -11
- data/plugins/nitro-kit/skills/nitro-kit-ui/agents/openai.yaml +1 -1
- data/src/stylesheets/nitro_kit/components/accordion.css +4 -4
- data/src/stylesheets/nitro_kit/components/alert.css +20 -29
- data/src/stylesheets/nitro_kit/components/app_navigation.css +74 -2
- data/src/stylesheets/nitro_kit/components/app_shell.css +3 -3
- data/src/stylesheets/nitro_kit/components/appearance_picker.css +20 -8
- data/src/stylesheets/nitro_kit/components/auth_shell.css +2 -2
- data/src/stylesheets/nitro_kit/components/avatar.css +12 -8
- data/src/stylesheets/nitro_kit/components/avatar_stack.css +12 -10
- data/src/stylesheets/nitro_kit/components/badge.css +13 -9
- data/src/stylesheets/nitro_kit/components/button.css +42 -25
- data/src/stylesheets/nitro_kit/components/card.css +2 -2
- data/src/stylesheets/nitro_kit/components/checkbox.css +29 -46
- data/src/stylesheets/nitro_kit/components/checkbox_group.css +3 -3
- data/src/stylesheets/nitro_kit/components/combobox.css +6 -6
- data/src/stylesheets/nitro_kit/components/command_palette.css +62 -4
- data/src/stylesheets/nitro_kit/components/container.css +6 -6
- data/src/stylesheets/nitro_kit/components/control_group.css +9 -9
- data/src/stylesheets/nitro_kit/components/danger_zone.css +6 -6
- data/src/stylesheets/nitro_kit/components/data_section.css +4 -4
- data/src/stylesheets/nitro_kit/components/details_table.css +7 -5
- data/src/stylesheets/nitro_kit/components/dialog.css +3 -3
- data/src/stylesheets/nitro_kit/components/dropdown.css +7 -7
- data/src/stylesheets/nitro_kit/components/dropzone.css +7 -7
- data/src/stylesheets/nitro_kit/components/empty_state.css +4 -4
- data/src/stylesheets/nitro_kit/components/field.css +2 -2
- data/src/stylesheets/nitro_kit/components/fieldset.css +2 -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 +33 -6
- data/src/stylesheets/nitro_kit/components/page_header.css +4 -4
- data/src/stylesheets/nitro_kit/components/pagination.css +3 -3
- data/src/stylesheets/nitro_kit/components/pagination_bar.css +2 -2
- data/src/stylesheets/nitro_kit/components/palette.css +140 -72
- data/src/stylesheets/nitro_kit/components/progressive_image.css +1 -1
- data/src/stylesheets/nitro_kit/components/radio_button.css +28 -33
- data/src/stylesheets/nitro_kit/components/radio_button_group.css +6 -6
- data/src/stylesheets/nitro_kit/components/rich_text_area.css +2 -2
- data/src/stylesheets/nitro_kit/components/select.css +24 -8
- data/src/stylesheets/nitro_kit/components/settings_layout.css +5 -5
- data/src/stylesheets/nitro_kit/components/settings_section.css +2 -2
- data/src/stylesheets/nitro_kit/components/sheet.css +10 -10
- data/src/stylesheets/nitro_kit/components/stat_grid.css +1 -1
- data/src/stylesheets/nitro_kit/components/switch.css +34 -40
- data/src/stylesheets/nitro_kit/components/table.css +8 -4
- data/src/stylesheets/nitro_kit/components/tabs.css +5 -1
- data/src/stylesheets/nitro_kit/components/textarea.css +20 -5
- data/src/stylesheets/nitro_kit/components/toast.css +11 -58
- data/src/stylesheets/nitro_kit/components/toolbar.css +2 -2
- data/src/stylesheets/nitro_kit/components/tooltip.css +4 -0
- data/src/stylesheets/nitro_kit/components/typeset.css +4 -4
- data/src/stylesheets/nitro_kit/reset.css +6 -6
- data/src/stylesheets/nitro_kit/tokens.css +497 -74
- metadata +1 -2
- data/docs/new_app_strategy.md +0 -22
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
@layer nitro-kit.base {
|
|
2
|
+
/* Four declared inputs; everything else derives. The block heights ride the
|
|
3
|
+
control ramp, the track is the block plus the handle's travel, and the
|
|
4
|
+
handle inset is whatever centers it inside the bordered track. */
|
|
2
5
|
:where([data-nk="switch"]) {
|
|
6
|
+
--_nk-switch-block-size: var(--nk-control-height-xs);
|
|
7
|
+
--_nk-switch-handle-size: calc(var(--nk-space) * 4);
|
|
8
|
+
--_nk-switch-travel: calc(var(--nk-space) * 4);
|
|
9
|
+
--_nk-switch-track-size: calc(
|
|
10
|
+
var(--_nk-switch-block-size) + var(--_nk-switch-travel)
|
|
11
|
+
);
|
|
12
|
+
--_nk-switch-pad: calc(
|
|
13
|
+
(var(--_nk-switch-block-size) - var(--_nk-switch-handle-size)) / 2 -
|
|
14
|
+
var(--nk-border-width)
|
|
15
|
+
);
|
|
16
|
+
|
|
3
17
|
display: inline-grid;
|
|
4
18
|
color: var(--nk-color-foreground);
|
|
5
19
|
}
|
|
6
20
|
|
|
21
|
+
:where([data-nk="switch"][data-size="lg"]) {
|
|
22
|
+
--_nk-switch-block-size: var(--nk-control-height-sm);
|
|
23
|
+
--_nk-switch-handle-size: calc(var(--nk-space) * 6);
|
|
24
|
+
--_nk-switch-travel: calc(var(--nk-space) * 5);
|
|
25
|
+
}
|
|
26
|
+
|
|
7
27
|
:where([data-nk="switch"] > [data-slot="switch-label"]) {
|
|
8
28
|
display: grid;
|
|
9
29
|
grid-template-columns: auto minmax(0, 1fr);
|
|
@@ -22,8 +42,8 @@
|
|
|
22
42
|
|
|
23
43
|
:where([data-nk="switch"] [data-slot="switch-control"]) {
|
|
24
44
|
z-index: 1;
|
|
25
|
-
inline-size:
|
|
26
|
-
block-size:
|
|
45
|
+
inline-size: var(--_nk-switch-track-size);
|
|
46
|
+
block-size: var(--_nk-switch-block-size);
|
|
27
47
|
margin: 0;
|
|
28
48
|
cursor: pointer;
|
|
29
49
|
appearance: none;
|
|
@@ -33,9 +53,9 @@
|
|
|
33
53
|
:where([data-nk="switch"] [data-slot="switch-track"]) {
|
|
34
54
|
display: flex;
|
|
35
55
|
align-items: center;
|
|
36
|
-
inline-size:
|
|
37
|
-
block-size:
|
|
38
|
-
padding:
|
|
56
|
+
inline-size: var(--_nk-switch-track-size);
|
|
57
|
+
block-size: var(--_nk-switch-block-size);
|
|
58
|
+
padding: var(--_nk-switch-pad);
|
|
39
59
|
pointer-events: none;
|
|
40
60
|
background: var(--nk-color-muted);
|
|
41
61
|
border: var(--nk-border-width) solid var(--nk-color-border);
|
|
@@ -45,28 +65,15 @@
|
|
|
45
65
|
border-color var(--nk-duration-normal) var(--nk-ease);
|
|
46
66
|
}
|
|
47
67
|
|
|
48
|
-
:where(
|
|
49
|
-
[data-nk="switch"][data-size="lg"] [data-slot="switch-control"],
|
|
50
|
-
[data-nk="switch"][data-size="lg"] [data-slot="switch-track"]
|
|
51
|
-
) {
|
|
52
|
-
inline-size: 3.25rem;
|
|
53
|
-
block-size: 2rem;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
68
|
:where([data-nk="switch"] [data-slot="switch-handle"]) {
|
|
57
|
-
inline-size:
|
|
58
|
-
block-size:
|
|
69
|
+
inline-size: var(--_nk-switch-handle-size);
|
|
70
|
+
block-size: var(--_nk-switch-handle-size);
|
|
59
71
|
background: var(--nk-color-surface);
|
|
60
72
|
border-radius: var(--nk-radius-full);
|
|
61
73
|
box-shadow: var(--nk-shadow-sm);
|
|
62
74
|
transition: transform var(--nk-duration-normal) var(--nk-ease);
|
|
63
75
|
}
|
|
64
76
|
|
|
65
|
-
:where([data-nk="switch"][data-size="lg"] [data-slot="switch-handle"]) {
|
|
66
|
-
inline-size: 1.5rem;
|
|
67
|
-
block-size: 1.5rem;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
77
|
:where([data-nk="switch"] [data-slot="switch-label-text"]) {
|
|
71
78
|
display: block;
|
|
72
79
|
grid-column: 2;
|
|
@@ -75,18 +82,14 @@
|
|
|
75
82
|
:where([data-nk="switch"] > [data-slot="switch-description"]) {
|
|
76
83
|
display: block;
|
|
77
84
|
margin-block-start: var(--nk-space);
|
|
78
|
-
padding-inline-start: calc(
|
|
85
|
+
padding-inline-start: calc(
|
|
86
|
+
var(--_nk-switch-track-size) + (var(--nk-space) * 3)
|
|
87
|
+
);
|
|
79
88
|
color: var(--nk-color-muted-foreground);
|
|
80
89
|
font-size: var(--nk-text-sm);
|
|
81
90
|
font-weight: var(--nk-font-weight-normal);
|
|
82
91
|
text-wrap: pretty;
|
|
83
92
|
}
|
|
84
|
-
|
|
85
|
-
:where(
|
|
86
|
-
[data-nk="switch"][data-size="lg"] > [data-slot="switch-description"]
|
|
87
|
-
) {
|
|
88
|
-
padding-inline-start: calc(3.25rem + (var(--nk-space) * 3));
|
|
89
|
-
}
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
@layer nitro-kit.state {
|
|
@@ -105,16 +108,7 @@
|
|
|
105
108
|
+ [data-slot="switch-track"]
|
|
106
109
|
> [data-slot="switch-handle"]
|
|
107
110
|
) {
|
|
108
|
-
transform: translateX(
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:where(
|
|
112
|
-
[data-nk="switch"][data-size="lg"]
|
|
113
|
-
[data-slot="switch-control"]:checked
|
|
114
|
-
+ [data-slot="switch-track"]
|
|
115
|
-
> [data-slot="switch-handle"]
|
|
116
|
-
) {
|
|
117
|
-
transform: translateX(1.25rem);
|
|
111
|
+
transform: translateX(var(--_nk-switch-travel));
|
|
118
112
|
}
|
|
119
113
|
|
|
120
114
|
:where(
|
|
@@ -128,19 +122,19 @@
|
|
|
128
122
|
|
|
129
123
|
:where([data-nk="switch"][data-disabled="true"]) {
|
|
130
124
|
cursor: not-allowed;
|
|
131
|
-
opacity:
|
|
125
|
+
opacity: var(--nk-disabled-opacity);
|
|
132
126
|
}
|
|
133
127
|
|
|
134
128
|
/* The server error describes the submitted value. Once the user toggles the
|
|
135
129
|
control and it satisfies its own constraints the error is stale, so the
|
|
136
|
-
|
|
130
|
+
destructive border stands down. `:user-valid` never matches before the user
|
|
137
131
|
touches the control, so an untouched invalid switch keeps its border. */
|
|
138
132
|
:where(
|
|
139
133
|
[data-nk="switch"]
|
|
140
134
|
[data-slot="switch-control"][aria-invalid="true"]:not(:user-valid)
|
|
141
135
|
+ [data-slot="switch-track"]
|
|
142
136
|
) {
|
|
143
|
-
border-color: var(--nk-color-
|
|
137
|
+
border-color: var(--nk-color-destructive);
|
|
144
138
|
}
|
|
145
139
|
}
|
|
146
140
|
|
|
@@ -52,9 +52,14 @@
|
|
|
52
52
|
text-decoration: none;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/* Half-strength through the color channel rather than opacity, so the
|
|
56
|
+
dimming is one declaration and never cascades into descendants. */
|
|
55
57
|
:where([data-nk="table"] [data-slot="table-sort-indicator"]) {
|
|
56
|
-
color:
|
|
57
|
-
|
|
58
|
+
color: color-mix(
|
|
59
|
+
in oklab,
|
|
60
|
+
var(--nk-color-muted-foreground) 50%,
|
|
61
|
+
transparent
|
|
62
|
+
);
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
|
|
@@ -80,7 +85,6 @@
|
|
|
80
85
|
[data-slot="table-sort-indicator"]
|
|
81
86
|
) {
|
|
82
87
|
color: var(--nk-color-primary);
|
|
83
|
-
opacity: 1;
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
@media (hover: hover) {
|
|
@@ -93,7 +97,7 @@
|
|
|
93
97
|
[data-slot="table-sort"]:hover
|
|
94
98
|
[data-slot="table-sort-indicator"]
|
|
95
99
|
) {
|
|
96
|
-
|
|
100
|
+
color: var(--nk-color-muted-foreground);
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
padding-block: calc(var(--nk-space) * 4);
|
|
38
38
|
line-height: var(--nk-leading-normal);
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
:where([data-nk="tabs"] > [data-slot="tabs-panel"][hidden="until-found"]) {
|
|
42
|
+
padding-block: 0;
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
@layer nitro-kit.variant {
|
|
@@ -129,7 +133,7 @@
|
|
|
129
133
|
) {
|
|
130
134
|
color: var(--nk-color-muted-foreground);
|
|
131
135
|
cursor: not-allowed;
|
|
132
|
-
opacity:
|
|
136
|
+
opacity: var(--nk-disabled-opacity);
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -2,19 +2,34 @@
|
|
|
2
2
|
:where([data-nk="textarea"]) {
|
|
3
3
|
display: block;
|
|
4
4
|
inline-size: 100%;
|
|
5
|
-
min-block-size:
|
|
6
|
-
padding: calc(var(--nk-space) * 2)
|
|
5
|
+
min-block-size: calc(var(--nk-space) * 24);
|
|
6
|
+
padding-block: calc(var(--nk-space) * 2);
|
|
7
|
+
padding-inline: var(--nk-control-padding-inline);
|
|
7
8
|
color: var(--nk-color-foreground);
|
|
8
9
|
font: inherit;
|
|
10
|
+
font-size: var(--nk-text-base);
|
|
9
11
|
line-height: var(--nk-leading-normal);
|
|
10
12
|
resize: vertical;
|
|
11
13
|
background: var(--nk-color-surface);
|
|
12
14
|
border: var(--nk-border-width) solid var(--nk-color-border);
|
|
13
|
-
border-radius: var(--nk-radius-
|
|
15
|
+
border-radius: var(--nk-radius-lg);
|
|
14
16
|
transition:
|
|
15
17
|
border-color var(--nk-duration-normal) var(--nk-ease),
|
|
16
18
|
box-shadow var(--nk-duration-normal) var(--nk-ease);
|
|
17
19
|
}
|
|
20
|
+
|
|
21
|
+
/* Matches the Input width split. */
|
|
22
|
+
@media (min-width: 48rem) {
|
|
23
|
+
:where([data-nk="textarea"]) {
|
|
24
|
+
font-size: var(--nk-text-sm);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (prefers-reduced-motion: reduce) {
|
|
29
|
+
:where([data-nk="textarea"]) {
|
|
30
|
+
transition-duration: 0.01ms;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
18
33
|
}
|
|
19
34
|
|
|
20
35
|
@layer nitro-kit.state {
|
|
@@ -30,10 +45,10 @@
|
|
|
30
45
|
|
|
31
46
|
:where([data-nk="textarea"]:disabled) {
|
|
32
47
|
cursor: not-allowed;
|
|
33
|
-
opacity:
|
|
48
|
+
opacity: var(--nk-disabled-opacity);
|
|
34
49
|
}
|
|
35
50
|
|
|
36
51
|
:where([data-nk="textarea"][aria-invalid="true"]) {
|
|
37
|
-
border-color: var(--nk-color-
|
|
52
|
+
border-color: var(--nk-color-destructive);
|
|
38
53
|
}
|
|
39
54
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
inset-block-end: calc(var(--nk-space) * 5);
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
|
-
inline-size: min(26rem, calc(
|
|
13
|
+
inline-size: min(26rem, calc(100% - (var(--nk-space) * 10)));
|
|
14
14
|
gap: calc(var(--nk-space) * 3);
|
|
15
15
|
margin: 0;
|
|
16
16
|
padding: 0;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
background: var(--_nk-toast-background);
|
|
34
34
|
border: var(--nk-border-width) solid var(--_nk-toast-border);
|
|
35
35
|
border-radius: var(--nk-radius-lg);
|
|
36
|
-
box-shadow: var(--nk-shadow-
|
|
36
|
+
box-shadow: var(--nk-shadow-md);
|
|
37
37
|
transition:
|
|
38
38
|
opacity var(--nk-duration-normal) var(--nk-ease),
|
|
39
39
|
transform var(--nk-duration-normal) var(--nk-ease);
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
:where([data-nk="toast-item"] [data-slot="toast-item-title"]) {
|
|
50
|
-
font-size: var(--nk-
|
|
51
|
-
font-weight: var(--nk-
|
|
50
|
+
font-size: var(--nk-title-compact-size);
|
|
51
|
+
font-weight: var(--nk-title-compact-weight);
|
|
52
52
|
line-height: var(--nk-leading-tight);
|
|
53
53
|
text-wrap: balance;
|
|
54
54
|
}
|
|
@@ -66,60 +66,13 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
@layer nitro-kit.variant {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
);
|
|
75
|
-
--_nk-toast-foreground: var(--
|
|
76
|
-
--_nk-toast-border: color-mix(
|
|
77
|
-
in oklab,
|
|
78
|
-
var(--nk-color-info) 45%,
|
|
79
|
-
transparent
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:where([data-nk="toast-item"][data-variant="success"]) {
|
|
84
|
-
--_nk-toast-background: color-mix(
|
|
85
|
-
in oklab,
|
|
86
|
-
var(--nk-color-success) 10%,
|
|
87
|
-
var(--nk-color-surface)
|
|
88
|
-
);
|
|
89
|
-
--_nk-toast-foreground: var(--nk-color-success-content);
|
|
90
|
-
--_nk-toast-border: color-mix(
|
|
91
|
-
in oklab,
|
|
92
|
-
var(--nk-color-success) 45%,
|
|
93
|
-
transparent
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:where([data-nk="toast-item"][data-variant="warning"]) {
|
|
98
|
-
--_nk-toast-background: color-mix(
|
|
99
|
-
in oklab,
|
|
100
|
-
var(--nk-color-warning) 10%,
|
|
101
|
-
var(--nk-color-surface)
|
|
102
|
-
);
|
|
103
|
-
--_nk-toast-foreground: var(--nk-color-warning-content);
|
|
104
|
-
--_nk-toast-border: color-mix(
|
|
105
|
-
in oklab,
|
|
106
|
-
var(--nk-color-warning) 45%,
|
|
107
|
-
transparent
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:where([data-nk="toast-item"][data-variant="error"]) {
|
|
112
|
-
--_nk-toast-background: color-mix(
|
|
113
|
-
in oklab,
|
|
114
|
-
var(--nk-color-danger) 10%,
|
|
115
|
-
var(--nk-color-surface)
|
|
116
|
-
);
|
|
117
|
-
--_nk-toast-foreground: var(--nk-color-danger-content);
|
|
118
|
-
--_nk-toast-border: color-mix(
|
|
119
|
-
in oklab,
|
|
120
|
-
var(--nk-color-danger) 45%,
|
|
121
|
-
transparent
|
|
122
|
-
);
|
|
69
|
+
/* Colour, tint strength, and appearance switching all come from the shared
|
|
70
|
+
semantic palette, so a Toast and an Alert of the same variant render
|
|
71
|
+
identically. */
|
|
72
|
+
:where([data-nk="toast-item"][data-variant]) {
|
|
73
|
+
--_nk-toast-background: var(--_nk-semantic-surface);
|
|
74
|
+
--_nk-toast-border: var(--_nk-semantic-border);
|
|
75
|
+
--_nk-toast-foreground: var(--_nk-semantic-content);
|
|
123
76
|
}
|
|
124
77
|
}
|
|
125
78
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer nitro-kit.base {
|
|
2
2
|
:where([data-nk="toolbar"]) {
|
|
3
3
|
display: flex;
|
|
4
|
-
min-
|
|
4
|
+
min-inline-size: 0;
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: space-between;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[data-nk="toolbar"] > [data-slot="toolbar-trailing"]
|
|
14
14
|
) {
|
|
15
15
|
display: flex;
|
|
16
|
-
min-
|
|
16
|
+
min-inline-size: 0;
|
|
17
17
|
/* Regions never exceed the toolbar, so nested content such as a
|
|
18
18
|
scrolling ButtonGroup receives real width pressure when stacked. */
|
|
19
19
|
max-inline-size: 100%;
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
position: absolute;
|
|
9
9
|
z-index: 50;
|
|
10
10
|
inline-size: max-content;
|
|
11
|
+
/* Absolutely positioned inside its wrapper, so a percentage would resolve
|
|
12
|
+
against the trigger, not the viewport. 100vw can overshoot by a classic
|
|
13
|
+
scrollbar's width, but only below a 22.5rem viewport, where scrollbars
|
|
14
|
+
overlay. The fixed overlays use 100% of the initial containing block. */
|
|
11
15
|
max-inline-size: min(20rem, calc(100vw - (var(--nk-space) * 8)));
|
|
12
16
|
padding: calc(var(--nk-space) * 1.5) calc(var(--nk-space) * 2.5);
|
|
13
17
|
color: var(--nk-color-foreground);
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
border-radius: var(--nk-radius-sm);
|
|
107
107
|
}
|
|
108
108
|
:where([data-nk="typeset"]) > table:not([data-nk], [data-typeset="off"]) {
|
|
109
|
-
|
|
109
|
+
inline-size: 100%;
|
|
110
110
|
border-collapse: collapse;
|
|
111
111
|
font-size: 0.925em;
|
|
112
112
|
}
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
table {
|
|
253
|
-
|
|
253
|
+
inline-size: 100%;
|
|
254
254
|
border-collapse: collapse;
|
|
255
255
|
font-size: 0.925em;
|
|
256
256
|
}
|
|
@@ -267,8 +267,8 @@
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
:where(img, video, svg) {
|
|
270
|
-
max-
|
|
271
|
-
|
|
270
|
+
max-inline-size: 100%;
|
|
271
|
+
block-size: auto;
|
|
272
272
|
border-radius: var(--nk-radius-md);
|
|
273
273
|
}
|
|
274
274
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
/* Nitro-owned boxes never establish a min-content floor, so long slot
|
|
20
20
|
content shrinks instead of overflowing its flex or grid parent. */
|
|
21
21
|
:where([data-nk], [data-nk] [data-slot]) {
|
|
22
|
-
min-
|
|
22
|
+
min-inline-size: 0;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
:where(html, :host) {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
:where(input)::-webkit-date-and-time-value {
|
|
122
|
-
min-
|
|
122
|
+
min-block-size: 1lh;
|
|
123
123
|
text-align: inherit;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
|
|
135
135
|
:where(input)::-webkit-inner-spin-button,
|
|
136
136
|
:where(input)::-webkit-outer-spin-button {
|
|
137
|
-
|
|
137
|
+
block-size: auto;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
:where(input):-moz-ui-invalid {
|
|
@@ -164,12 +164,12 @@
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
:where(img, video) {
|
|
167
|
-
max-
|
|
168
|
-
|
|
167
|
+
max-inline-size: 100%;
|
|
168
|
+
block-size: auto;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
:where(hr) {
|
|
172
|
-
|
|
172
|
+
block-size: 0;
|
|
173
173
|
color: inherit;
|
|
174
174
|
border-top-width: var(--nk-border-width);
|
|
175
175
|
}
|