nitro_kit 2.0.0.alpha.2 → 2.0.0.alpha.3
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 +50 -1
- data/README.md +23 -4
- data/STYLE_GUIDE.md +37 -5
- data/app/assets/stylesheets/nitro_kit.css +1714 -1358
- data/app/components/nitro_kit/accordion.rb +1 -7
- data/app/components/nitro_kit/app_navigation.rb +1 -2
- data/app/components/nitro_kit/app_shell.rb +1 -7
- data/app/components/nitro_kit/appearance_picker.rb +1 -11
- data/app/components/nitro_kit/avatar.rb +6 -1
- data/app/components/nitro_kit/avatar_stack.rb +3 -0
- 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 +3 -16
- data/app/components/nitro_kit/command_palette.rb +41 -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 +3 -14
- 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 +0 -1
- 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 +3 -3
- 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 +1 -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 +21 -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 +8 -1
- data/app/javascript/controllers/nk/tooltip_controller.js +9 -0
- data/config/locales/en.yml +4 -1
- data/docs/agent_guide.md +31 -16
- data/docs/agent_native_spec.md +27 -10
- data/docs/browser_support.md +193 -0
- data/docs/component_contracts.md +88 -82
- data/docs/customization.md +27 -15
- data/docs/hotwire.md +15 -3
- data/docs/initialization_prompt.md +31 -6
- data/docs/migration_1_to_2.md +61 -19
- data/docs/patterns/application_foundation.md +6 -4
- data/docs/patterns/crud_resource.md +6 -3
- data/docs/patterns/destructive_action.md +25 -0
- data/docs/patterns/resource_form.md +1 -1
- data/docs/rails_conventions.md +4 -1
- data/docs/rails_integration.md +39 -11
- data/lib/generators/nitro_kit/upgrade_smoke_tests_generator.rb +12 -0
- data/lib/nitro_kit/installation.rb +9 -4
- data/lib/nitro_kit/migration_inventory.rb +268 -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 +6 -1
- data/plugins/nitro-kit/skills/nitro-kit-ui/SKILL.md +18 -8
- data/src/stylesheets/nitro_kit/components/accordion.css +40 -40
- data/src/stylesheets/nitro_kit/components/alert.css +9 -9
- data/src/stylesheets/nitro_kit/components/app_navigation.css +19 -19
- data/src/stylesheets/nitro_kit/components/app_shell.css +196 -193
- data/src/stylesheets/nitro_kit/components/appearance_picker.css +41 -31
- data/src/stylesheets/nitro_kit/components/avatar.css +3 -3
- data/src/stylesheets/nitro_kit/components/avatar_stack.css +36 -19
- data/src/stylesheets/nitro_kit/components/button.css +83 -58
- data/src/stylesheets/nitro_kit/components/button_group.css +19 -14
- data/src/stylesheets/nitro_kit/components/card.css +11 -5
- data/src/stylesheets/nitro_kit/components/checkbox.css +40 -36
- data/src/stylesheets/nitro_kit/components/checkbox_group.css +13 -13
- data/src/stylesheets/nitro_kit/components/combobox.css +33 -23
- data/src/stylesheets/nitro_kit/components/command_palette.css +48 -47
- data/src/stylesheets/nitro_kit/components/control_group.css +52 -58
- data/src/stylesheets/nitro_kit/components/danger_zone.css +3 -3
- data/src/stylesheets/nitro_kit/components/data_section.css +1 -1
- data/src/stylesheets/nitro_kit/components/details_table.css +13 -13
- data/src/stylesheets/nitro_kit/components/dialog.css +6 -3
- data/src/stylesheets/nitro_kit/components/dropdown.css +29 -23
- data/src/stylesheets/nitro_kit/components/dropzone.css +71 -28
- data/src/stylesheets/nitro_kit/components/empty_state.css +6 -6
- data/src/stylesheets/nitro_kit/components/field.css +30 -26
- data/src/stylesheets/nitro_kit/components/field_group.css +13 -0
- data/src/stylesheets/nitro_kit/components/fieldset.css +6 -0
- data/src/stylesheets/nitro_kit/components/input.css +9 -2
- data/src/stylesheets/nitro_kit/components/layout.css +165 -165
- data/src/stylesheets/nitro_kit/components/page_header.css +3 -3
- data/src/stylesheets/nitro_kit/components/pagination.css +55 -46
- data/src/stylesheets/nitro_kit/components/pagination_bar.css +7 -7
- data/src/stylesheets/nitro_kit/components/palette.css +20 -20
- data/src/stylesheets/nitro_kit/components/progressive_image.css +44 -54
- data/src/stylesheets/nitro_kit/components/radio_button.css +36 -29
- data/src/stylesheets/nitro_kit/components/radio_button_group.css +43 -43
- data/src/stylesheets/nitro_kit/components/rich_text_area.css +15 -0
- data/src/stylesheets/nitro_kit/components/select.css +2 -9
- data/src/stylesheets/nitro_kit/components/settings_layout.css +21 -18
- data/src/stylesheets/nitro_kit/components/settings_section.css +84 -0
- data/src/stylesheets/nitro_kit/components/sheet.css +23 -3
- data/src/stylesheets/nitro_kit/components/stat_grid.css +10 -9
- data/src/stylesheets/nitro_kit/components/switch.css +37 -33
- data/src/stylesheets/nitro_kit/components/table.css +35 -31
- data/src/stylesheets/nitro_kit/components/tabs.css +43 -39
- data/src/stylesheets/nitro_kit/components/toast.css +20 -9
- data/src/stylesheets/nitro_kit/components/toolbar.css +14 -39
- data/src/stylesheets/nitro_kit/components/tooltip.css +34 -29
- data/src/stylesheets/nitro_kit/components/typeset.css +147 -1
- data/src/stylesheets/nitro_kit/reset.css +9 -9
- data/src/stylesheets/nitro_kit/tokens.css +8 -9
- metadata +4 -3
- data/src/stylesheets/nitro_kit/components/form_section.css +0 -71
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
:where(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
[data-nk="checkbox"] [data-slot="checkbox-control"],
|
|
24
|
+
[data-nk="checkbox"] [data-slot="checkbox-indicator"]
|
|
25
|
+
) {
|
|
26
26
|
grid-area: 1 / 1;
|
|
27
27
|
inline-size: 1.125rem;
|
|
28
28
|
block-size: 1.125rem;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
:where(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
[data-nk="checkbox"][data-size="lg"] [data-slot="checkbox-control"],
|
|
33
|
+
[data-nk="checkbox"][data-size="lg"] [data-slot="checkbox-indicator"]
|
|
34
|
+
) {
|
|
35
35
|
inline-size: 1.5rem;
|
|
36
36
|
block-size: 1.5rem;
|
|
37
37
|
}
|
|
@@ -68,53 +68,57 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
:where(
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
[data-nk="checkbox"][data-size="lg"] [data-slot="checkbox-indicator"]
|
|
72
|
+
)::after {
|
|
73
73
|
inline-size: 0.625rem;
|
|
74
74
|
block-size: 0.375rem;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
:where([data-nk="checkbox"] [data-slot="checkbox-label-text"]) {
|
|
78
78
|
display: block;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:where([data-nk="checkbox"] [data-slot="checkbox-content"]) {
|
|
82
79
|
grid-column: 2;
|
|
83
80
|
}
|
|
84
81
|
|
|
85
|
-
:where([data-nk="checkbox"] [data-slot="checkbox-description"]) {
|
|
82
|
+
:where([data-nk="checkbox"] > [data-slot="checkbox-description"]) {
|
|
86
83
|
display: block;
|
|
87
84
|
margin-block-start: var(--nk-space);
|
|
85
|
+
padding-inline-start: calc(1.125rem + (var(--nk-space) * 2));
|
|
88
86
|
color: var(--nk-color-muted-foreground);
|
|
89
87
|
font-size: var(--nk-text-sm);
|
|
90
88
|
text-wrap: pretty;
|
|
91
89
|
}
|
|
90
|
+
|
|
91
|
+
:where(
|
|
92
|
+
[data-nk="checkbox"][data-size="lg"] > [data-slot="checkbox-description"]
|
|
93
|
+
) {
|
|
94
|
+
padding-inline-start: calc(1.5rem + (var(--nk-space) * 2));
|
|
95
|
+
}
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
@layer nitro-kit.state {
|
|
95
99
|
:where(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
[data-nk="checkbox"]
|
|
101
|
+
[data-slot="checkbox-control"]:checked
|
|
102
|
+
+ [data-slot="checkbox-indicator"],
|
|
103
|
+
[data-nk="checkbox"][data-state="indeterminate"]
|
|
104
|
+
[data-slot="checkbox-indicator"]
|
|
105
|
+
) {
|
|
102
106
|
background: var(--nk-color-primary);
|
|
103
107
|
border-color: var(--nk-color-primary);
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
:where(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
[data-nk="checkbox"]
|
|
112
|
+
[data-slot="checkbox-control"]:checked
|
|
113
|
+
+ [data-slot="checkbox-indicator"]
|
|
114
|
+
)::after {
|
|
111
115
|
opacity: 1;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
:where(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
[data-nk="checkbox"][data-state="indeterminate"]
|
|
120
|
+
[data-slot="checkbox-indicator"]
|
|
121
|
+
)::after {
|
|
118
122
|
inline-size: 0.55rem;
|
|
119
123
|
block-size: 0;
|
|
120
124
|
border-block-end: 0.125rem solid currentcolor;
|
|
@@ -124,17 +128,17 @@
|
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
:where(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
[data-nk="checkbox"][data-size="lg"][data-state="indeterminate"]
|
|
132
|
+
[data-slot="checkbox-indicator"]
|
|
133
|
+
)::after {
|
|
130
134
|
inline-size: 0.7rem;
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
:where(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
[data-nk="checkbox"]
|
|
139
|
+
[data-slot="checkbox-control"]:focus-visible
|
|
140
|
+
+ [data-slot="checkbox-indicator"]
|
|
141
|
+
) {
|
|
138
142
|
outline: var(--nk-focus-width) solid var(--nk-color-focus);
|
|
139
143
|
outline-offset: var(--nk-focus-offset);
|
|
140
144
|
}
|
|
@@ -151,10 +155,10 @@
|
|
|
151
155
|
user touches the control, so an untouched invalid checkbox keeps its
|
|
152
156
|
border. */
|
|
153
157
|
:where(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
[data-nk="checkbox"]
|
|
159
|
+
[data-slot="checkbox-control"][aria-invalid="true"]:not(:user-valid)
|
|
160
|
+
+ [data-slot="checkbox-indicator"]
|
|
161
|
+
) {
|
|
158
162
|
border-color: var(--nk-color-danger);
|
|
159
163
|
}
|
|
160
164
|
}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
:where(
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
[data-nk="checkbox-group"] > [data-slot="checkbox-group-description"]
|
|
17
|
+
) {
|
|
18
18
|
margin-block-start: var(--nk-space);
|
|
19
19
|
color: var(--nk-color-muted-foreground);
|
|
20
20
|
font-size: var(--nk-text-sm);
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
:where(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
[data-nk="checkbox-group"][data-orientation="horizontal"]
|
|
32
|
+
> [data-slot="checkbox-group-choices"]
|
|
33
|
+
) {
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-wrap: wrap;
|
|
36
36
|
gap: calc(var(--nk-space) * 4);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
:where(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
[data-nk="checkbox-group"][data-presentation="cards"]
|
|
41
|
+
> [data-slot="checkbox-group-choices"]
|
|
42
|
+
> [data-slot="checkbox-group-choice"]
|
|
43
|
+
) {
|
|
44
44
|
inline-size: 100%;
|
|
45
45
|
padding: calc(var(--nk-space) * 3);
|
|
46
46
|
background: var(--nk-color-surface);
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
|
|
52
52
|
@layer nitro-kit.state {
|
|
53
53
|
:where(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
[data-nk="checkbox-group"][data-presentation="cards"]
|
|
55
|
+
> [data-slot="checkbox-group-choices"]
|
|
56
|
+
> [data-slot="checkbox-group-choice"]:has(input:checked)
|
|
57
|
+
) {
|
|
58
58
|
border-color: var(--nk-color-primary);
|
|
59
59
|
box-shadow: 0 0 0 var(--nk-border-width) var(--nk-color-primary);
|
|
60
60
|
}
|
|
@@ -79,12 +79,22 @@
|
|
|
79
79
|
display: block;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
:where([data-nk="combobox"] [data-slot="combobox-empty"]) {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
min-block-size: var(--nk-control-height-md);
|
|
86
|
+
padding-block: var(--nk-space);
|
|
87
|
+
padding-inline: calc(var(--nk-space) * 3);
|
|
88
|
+
color: var(--nk-color-muted-foreground);
|
|
89
|
+
font-size: var(--nk-text-sm);
|
|
90
|
+
}
|
|
91
|
+
|
|
82
92
|
:where(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
[data-nk="combobox"]
|
|
94
|
+
> [data-slot="combobox-listbox"]
|
|
95
|
+
> [data-slot="combobox-option"]
|
|
96
|
+
> [data-slot="combobox-option-description"]
|
|
97
|
+
) {
|
|
88
98
|
display: block;
|
|
89
99
|
margin-block-start: calc(var(--nk-space) * 0.5);
|
|
90
100
|
color: var(--nk-color-muted-foreground);
|
|
@@ -95,37 +105,37 @@
|
|
|
95
105
|
|
|
96
106
|
@layer nitro-kit.state {
|
|
97
107
|
:where(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
[data-nk="combobox"]
|
|
109
|
+
[data-slot="combobox-option"]:is(
|
|
110
|
+
[data-active="true"],
|
|
111
|
+
[aria-selected="true"]
|
|
112
|
+
)
|
|
113
|
+
) {
|
|
104
114
|
background: var(--nk-color-muted);
|
|
105
115
|
}
|
|
106
116
|
|
|
107
117
|
:where(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
[data-nk="combobox"]
|
|
119
|
+
> [data-slot="combobox-listbox"]
|
|
120
|
+
> [data-slot="combobox-option"]:is(
|
|
121
|
+
[data-active="true"],
|
|
122
|
+
[aria-selected="true"]
|
|
123
|
+
)
|
|
124
|
+
> [data-slot="combobox-option-description"]
|
|
125
|
+
) {
|
|
116
126
|
color: var(--nk-color-foreground);
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
:where(
|
|
120
|
-
|
|
121
|
-
|
|
130
|
+
[data-nk="combobox"] [data-slot="combobox-option"][aria-disabled="true"]
|
|
131
|
+
) {
|
|
122
132
|
cursor: not-allowed;
|
|
123
133
|
opacity: 0.6;
|
|
124
134
|
}
|
|
125
135
|
|
|
126
136
|
:where(
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
[data-nk="combobox"] > [data-slot="combobox-listbox"][data-state="open"]
|
|
138
|
+
) {
|
|
129
139
|
animation: nk-combobox-enter var(--nk-duration-normal) var(--nk-ease);
|
|
130
140
|
}
|
|
131
141
|
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
:where(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
[data-nk="command-palette"]
|
|
17
|
+
> [data-slot="command-palette-trigger"]
|
|
18
|
+
> [data-slot="button-label"]
|
|
19
|
+
) {
|
|
20
20
|
display: flex;
|
|
21
21
|
flex: 1 1 auto;
|
|
22
22
|
gap: calc(var(--nk-space) * 2);
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:where(
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
[data-nk="command-palette"] [data-slot="command-palette-trigger-label"]
|
|
29
|
+
) {
|
|
30
30
|
overflow: hidden;
|
|
31
31
|
text-overflow: ellipsis;
|
|
32
32
|
white-space: nowrap;
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
:where(
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
[data-nk="command-palette"] > [data-slot="command-palette-panel"]
|
|
64
|
+
)::backdrop {
|
|
65
65
|
background: var(--nk-color-overlay);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
:where(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
[data-nk="command-palette"] [data-slot="command-palette-title"],
|
|
70
|
+
[data-nk="command-palette"] [data-slot="command-palette-status"]
|
|
71
|
+
) {
|
|
72
72
|
position: absolute;
|
|
73
73
|
width: 1px;
|
|
74
74
|
height: 1px;
|
|
@@ -90,19 +90,19 @@
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
:where(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
[data-nk="command-palette"]
|
|
94
|
+
> [data-slot="command-palette-panel"]
|
|
95
|
+
> [data-slot="command-palette-close"]
|
|
96
|
+
) {
|
|
97
97
|
margin-block: calc(var(--nk-space) * 2);
|
|
98
98
|
margin-inline: auto calc(var(--nk-space) * 2);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
:where(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
[data-nk="command-palette"][data-enhanced]
|
|
103
|
+
> [data-slot="command-palette-panel"]
|
|
104
|
+
> [data-slot="command-palette-close"]
|
|
105
|
+
) {
|
|
106
106
|
position: absolute;
|
|
107
107
|
z-index: 1;
|
|
108
108
|
inset-block-start: calc(var(--nk-space) * 2);
|
|
@@ -111,23 +111,23 @@
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
:where(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
[data-nk="command-palette"][data-enhanced]
|
|
115
|
+
[data-slot="command-palette-search"]
|
|
116
|
+
) {
|
|
117
117
|
padding-inline-end: calc(
|
|
118
118
|
var(--nk-control-height-md) + (var(--nk-space) * 4)
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
:where(
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
[data-nk="command-palette"] [data-slot="command-palette-search"][hidden]
|
|
124
|
+
) {
|
|
125
125
|
display: none;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
:where(
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
[data-nk="command-palette"] [data-slot="command-palette-search-icon"]
|
|
130
|
+
) {
|
|
131
131
|
flex: 0 0 auto;
|
|
132
132
|
margin-inline-start: calc(var(--nk-space) * 2);
|
|
133
133
|
color: var(--nk-color-muted-foreground);
|
|
@@ -138,8 +138,9 @@
|
|
|
138
138
|
min-inline-size: 0;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
:where(
|
|
142
|
-
|
|
141
|
+
:where(
|
|
142
|
+
[data-nk="command-palette"] [data-slot="command-palette-input"]
|
|
143
|
+
)::-webkit-search-cancel-button {
|
|
143
144
|
appearance: none;
|
|
144
145
|
}
|
|
145
146
|
|
|
@@ -158,8 +159,8 @@
|
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
:where(
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
[data-nk="command-palette"] [data-slot="command-palette-destination"]
|
|
163
|
+
) {
|
|
163
164
|
display: flex;
|
|
164
165
|
flex-direction: column;
|
|
165
166
|
justify-content: center;
|
|
@@ -177,9 +178,9 @@
|
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
:where(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
[data-nk="command-palette"]
|
|
182
|
+
[data-slot="command-palette-destination-description"]
|
|
183
|
+
) {
|
|
183
184
|
margin-block-start: calc(var(--nk-space) * 0.5);
|
|
184
185
|
color: var(--nk-color-muted-foreground);
|
|
185
186
|
font-size: var(--nk-text-xs);
|
|
@@ -198,18 +199,18 @@
|
|
|
198
199
|
@layer nitro-kit.state {
|
|
199
200
|
@media (hover: hover) {
|
|
200
201
|
:where(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
[data-nk="command-palette"]
|
|
203
|
+
[data-slot="command-palette-destination"]:hover
|
|
204
|
+
) {
|
|
204
205
|
color: var(--nk-color-foreground);
|
|
205
206
|
background: var(--nk-color-muted);
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
:where(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
[data-nk="command-palette"]
|
|
212
|
+
[data-slot="command-palette-destination"]:focus-visible
|
|
213
|
+
) {
|
|
213
214
|
color: var(--nk-color-foreground);
|
|
214
215
|
background: var(--nk-color-muted);
|
|
215
216
|
outline: var(--nk-focus-width) solid var(--nk-color-focus);
|
|
@@ -217,16 +218,16 @@
|
|
|
217
218
|
}
|
|
218
219
|
|
|
219
220
|
:where(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
[data-nk="command-palette"]
|
|
222
|
+
[data-slot="command-palette-destination"]:is(:hover, :focus-visible)
|
|
223
|
+
[data-slot="command-palette-destination-description"]
|
|
224
|
+
) {
|
|
224
225
|
color: var(--nk-color-foreground);
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
:where(
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
[data-nk="command-palette"] > [data-slot="command-palette-panel"][open]
|
|
230
|
+
) {
|
|
230
231
|
animation: nk-command-palette-enter var(--nk-duration-slow) var(--nk-ease);
|
|
231
232
|
}
|
|
232
233
|
|
|
@@ -247,8 +248,8 @@
|
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
:where(
|
|
250
|
-
|
|
251
|
-
|
|
251
|
+
[data-nk="command-palette"] [data-slot="command-palette-destination"]
|
|
252
|
+
) {
|
|
252
253
|
transition-duration: 0.01ms;
|
|
253
254
|
}
|
|
254
255
|
}
|
|
@@ -7,47 +7,47 @@
|
|
|
7
7
|
min-inline-size: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
:where(
|
|
11
|
-
[data-nk="control-group"]:has(> [data-nk="button"][data-size="lg"])
|
|
12
|
-
) {
|
|
10
|
+
:where([data-nk="control-group"]:has(> [data-nk="button"][data-size="lg"])) {
|
|
13
11
|
--_nk-control-group-height: var(--nk-control-height-lg);
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
:where(
|
|
17
|
-
[data-nk="control-group"]:has(> [data-nk="button"][data-size="xl"])
|
|
18
|
-
) {
|
|
14
|
+
:where([data-nk="control-group"]:has(> [data-nk="button"][data-size="xl"])) {
|
|
19
15
|
--_nk-control-group-height: var(--nk-control-height-xl);
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
:where(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
[data-nk="control-group"]
|
|
20
|
+
> :is(
|
|
21
|
+
[data-nk="input"],
|
|
22
|
+
[data-nk="select"],
|
|
23
|
+
[data-nk="button"],
|
|
24
|
+
span[data-slot="control-group-addon"]
|
|
25
|
+
)
|
|
26
|
+
) {
|
|
31
27
|
position: relative;
|
|
32
28
|
block-size: var(--_nk-control-group-height);
|
|
33
29
|
min-block-size: var(--_nk-control-group-height);
|
|
34
30
|
}
|
|
35
31
|
|
|
36
32
|
:where(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
[data-nk="control-group"]
|
|
34
|
+
> :is(
|
|
35
|
+
[data-nk="input"],
|
|
36
|
+
[data-nk="select"],
|
|
37
|
+
[data-nk="button"]
|
|
38
|
+
):focus-within
|
|
39
|
+
) {
|
|
40
40
|
z-index: 1;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
:where(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
[data-nk="control-group"]
|
|
45
|
+
> :is(
|
|
46
|
+
[data-nk="input"],
|
|
47
|
+
[data-nk="button"],
|
|
48
|
+
span[data-slot="control-group-addon"]
|
|
49
|
+
)
|
|
50
|
+
) {
|
|
51
51
|
border-radius: 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -59,59 +59,57 @@
|
|
|
59
59
|
/* Safari positions its native date editor from the line box's top edge.
|
|
60
60
|
Give the grouped editor the same explicit line-box treatment as a
|
|
61
61
|
standalone date Input, using the compound control's resolved height. */
|
|
62
|
-
:where(
|
|
63
|
-
[data-nk="control-group"] > [data-nk="input"][type="date"]
|
|
64
|
-
) {
|
|
62
|
+
:where([data-nk="control-group"] > [data-nk="input"][type="date"]) {
|
|
65
63
|
line-height: calc(
|
|
66
64
|
var(--_nk-control-group-height) - (var(--nk-border-width) * 2)
|
|
67
65
|
);
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
:where(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
[data-nk="control-group"]
|
|
70
|
+
> :is(
|
|
71
|
+
[data-nk="input"],
|
|
72
|
+
[data-nk="button"],
|
|
73
|
+
span[data-slot="control-group-addon"]
|
|
74
|
+
):first-child
|
|
75
|
+
) {
|
|
78
76
|
border-start-start-radius: var(--nk-radius-md);
|
|
79
77
|
border-end-start-radius: var(--nk-radius-md);
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
:where(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
[data-nk="control-group"]
|
|
82
|
+
> :is(
|
|
83
|
+
[data-nk="input"],
|
|
84
|
+
[data-nk="button"],
|
|
85
|
+
span[data-slot="control-group-addon"]
|
|
86
|
+
):last-child
|
|
87
|
+
) {
|
|
90
88
|
border-start-end-radius: var(--nk-radius-md);
|
|
91
89
|
border-end-end-radius: var(--nk-radius-md);
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
:where(
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
[data-nk="control-group"]
|
|
94
|
+
> :is(
|
|
97
95
|
[data-nk="input"],
|
|
98
96
|
[data-nk="select"],
|
|
99
97
|
[data-nk="button"],
|
|
100
98
|
span[data-slot="control-group-addon"]
|
|
101
99
|
)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
100
|
+
+ :is(
|
|
101
|
+
[data-nk="input"],
|
|
102
|
+
[data-nk="select"],
|
|
103
|
+
[data-nk="button"],
|
|
104
|
+
span[data-slot="control-group-addon"]
|
|
105
|
+
)
|
|
106
|
+
) {
|
|
109
107
|
margin-inline-start: calc(var(--nk-border-width) * -1);
|
|
110
108
|
}
|
|
111
109
|
|
|
112
110
|
:where(
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
[data-nk="control-group"] > :is([data-nk="input"], [data-nk="select"])
|
|
112
|
+
) {
|
|
115
113
|
min-inline-size: 0;
|
|
116
114
|
flex: 1 1 auto;
|
|
117
115
|
}
|
|
@@ -133,16 +131,12 @@
|
|
|
133
131
|
border: var(--nk-border-width) solid var(--nk-color-border);
|
|
134
132
|
}
|
|
135
133
|
|
|
136
|
-
:where(
|
|
137
|
-
[data-nk="control-group"] > [data-nk="select"]:first-child > select
|
|
138
|
-
) {
|
|
134
|
+
:where([data-nk="control-group"] > [data-nk="select"]:first-child > select) {
|
|
139
135
|
border-start-start-radius: var(--nk-radius-md);
|
|
140
136
|
border-end-start-radius: var(--nk-radius-md);
|
|
141
137
|
}
|
|
142
138
|
|
|
143
|
-
:where(
|
|
144
|
-
[data-nk="control-group"] > [data-nk="select"]:last-child > select
|
|
145
|
-
) {
|
|
139
|
+
:where([data-nk="control-group"] > [data-nk="select"]:last-child > select) {
|
|
146
140
|
border-start-end-radius: var(--nk-radius-md);
|
|
147
141
|
border-end-end-radius: var(--nk-radius-md);
|
|
148
142
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
:where([data-nk="danger-zone"] [data-slot="danger-zone-title"]) {
|
|
26
26
|
font-size: var(--nk-text-xl);
|
|
27
|
-
font-weight: var(--nk-font-weight-
|
|
27
|
+
font-weight: var(--nk-font-weight-bold);
|
|
28
28
|
line-height: var(--nk-leading-tight);
|
|
29
29
|
text-wrap: balance;
|
|
30
30
|
}
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
@layer nitro-kit.
|
|
48
|
-
@media (
|
|
47
|
+
@layer nitro-kit.compound {
|
|
48
|
+
@media (width < 48rem) {
|
|
49
49
|
:where([data-nk="danger-zone"]) {
|
|
50
50
|
grid-template-columns: minmax(0, 1fr);
|
|
51
51
|
align-items: stretch;
|