loseta 0.7.0 → 0.8.0

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.
package/README.md CHANGED
@@ -38,7 +38,7 @@ registry/
38
38
  reset.css # preflight-style reset
39
39
  base.css # element defaults
40
40
  utilities.css # sr-only
41
- primitives/ # shared popover, menu and dialog shells
41
+ primitives/ # shared popover, listbox, menu and dialog shells
42
42
  components/ # structural CSS per component
43
43
  styles/ # visual CSS per declared style
44
44
  examples/ # example markup used by `add --html`
@@ -85,7 +85,7 @@ The registry is validated for:
85
85
  - dependency resolution and cycles,
86
86
  - `@layer` wrapping,
87
87
  - one complete style file per declared style for every stable component and primitive,
88
- - exactly one Nova style file for every experimental component,
88
+ - exactly one Nova style file for every experimental component and primitive,
89
89
  - valid `styles/<name>/` paths and no unreferenced style files,
90
90
  - forbidden Tailwind/legacy patterns,
91
91
  - CSS parseability with Lightning CSS.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loseta",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Native CSS component scaffolds with the shadcn feel.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,42 @@
1
+ /* Combobox */
2
+ @layer loseta.components {
3
+ .combobox {
4
+ position: relative;
5
+ display: flex;
6
+ width: 100%;
7
+ flex-direction: column;
8
+
9
+ > input {
10
+ width: 100%;
11
+ min-width: 0;
12
+ outline-style: none;
13
+ -webkit-user-select: text;
14
+ user-select: text;
15
+
16
+ &::placeholder {
17
+ color: var(--muted-foreground);
18
+ }
19
+
20
+ &:disabled {
21
+ pointer-events: none;
22
+ cursor: not-allowed;
23
+ opacity: 50%;
24
+ }
25
+ }
26
+
27
+ > [data-slot='clear'] {
28
+ position: absolute;
29
+ inset-inline-end: 0.25rem;
30
+ inset-block-start: 0.25rem;
31
+ z-index: 1;
32
+ display: inline-flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ }
36
+
37
+ > [data-popover] {
38
+ width: 100%;
39
+ min-width: 8rem;
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,20 @@
1
+ /* Command */
2
+ @layer loseta.components {
3
+ .command {
4
+ display: flex;
5
+ width: 100%;
6
+ flex-direction: column;
7
+ gap: 0.5rem;
8
+
9
+ > [role='listbox'] {
10
+ max-height: 20rem;
11
+ overflow-y: auto;
12
+ }
13
+
14
+ [data-slot='shortcut'] {
15
+ margin-inline-start: auto;
16
+ flex-shrink: 0;
17
+ text-align: end;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,47 @@
1
+ /* Select */
2
+ @layer loseta.components {
3
+ .select {
4
+ position: relative;
5
+ display: flex;
6
+ width: 100%;
7
+ flex-direction: column;
8
+
9
+ > button {
10
+ display: flex;
11
+ width: 100%;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ gap: 0.5rem;
15
+ outline-style: none;
16
+ -webkit-user-select: none;
17
+ user-select: none;
18
+
19
+ @media (forced-colors: active) {
20
+ outline: 2px solid transparent;
21
+ outline-offset: 2px;
22
+ }
23
+
24
+ &:disabled {
25
+ pointer-events: none;
26
+ opacity: 50%;
27
+ }
28
+
29
+ > svg {
30
+ pointer-events: none;
31
+ flex-shrink: 0;
32
+ transition-property: rotate;
33
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
34
+ transition-duration: 150ms;
35
+ }
36
+
37
+ &[aria-expanded='true'] > svg {
38
+ rotate: 180deg;
39
+ }
40
+ }
41
+
42
+ > [data-popover] {
43
+ width: 100%;
44
+ min-width: 8rem;
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,28 @@
1
+ <!-- Single -->
2
+ <div class="combobox">
3
+ <input role="combobox" aria-expanded="false" aria-controls="combobox-fruit-panel" aria-autocomplete="list" placeholder="Search fruit..." aria-label="Search fruit">
4
+ <button type="button" class="btn" data-variant="ghost" data-size="icon-xs" data-slot="clear" aria-label="Clear">×</button>
5
+ <div data-popover data-side="bottom" aria-hidden="true" id="combobox-fruit-panel">
6
+ <div role="listbox" aria-label="Fruit">
7
+ <div role="option" aria-selected="false"><span data-slot="text">Apple</span></div>
8
+ <div role="option" aria-selected="false"><span data-slot="text">Banana</span></div>
9
+ <div role="option" aria-selected="false"><span data-slot="text">Orange</span></div>
10
+ <div role="option" aria-selected="false"><span data-slot="text">Pineapple</span></div>
11
+ <div data-slot="empty" hidden>No fruit found.</div>
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+ <!-- Multiple -->
17
+ <div class="combobox">
18
+ <input role="combobox" aria-expanded="false" aria-controls="combobox-tag-panel" aria-autocomplete="list" placeholder="Search tags..." aria-label="Search tags">
19
+ <button type="button" class="btn" data-variant="ghost" data-size="icon-xs" data-slot="clear" aria-label="Clear">×</button>
20
+ <div data-popover data-side="bottom" aria-hidden="true" id="combobox-tag-panel">
21
+ <div role="listbox" aria-label="Tags" aria-multiselectable="true">
22
+ <div role="option" aria-selected="true"><span data-slot="text">Design</span></div>
23
+ <div role="option" aria-selected="false"><span data-slot="text">Engineering</span></div>
24
+ <div role="option" aria-selected="true"><span data-slot="text">Docs</span></div>
25
+ <div data-slot="empty" hidden>No tags found.</div>
26
+ </div>
27
+ </div>
28
+ </div>
@@ -0,0 +1,44 @@
1
+ <!-- Dialog -->
2
+ <button type="button" class="btn" data-variant="outline">
3
+ Open command
4
+ </button>
5
+
6
+ <dialog class="dialog" id="demo-command" aria-labelledby="command-title" aria-describedby="command-description">
7
+ <div>
8
+ <header>
9
+ <h2 data-slot="title" id="command-title">Command palette</h2>
10
+ <p data-slot="description" id="command-description">Search for a command to run.</p>
11
+ </header>
12
+ <section>
13
+ <div class="command">
14
+ <div class="input-group" role="group" aria-label="Search commands">
15
+ <span data-slot="addon" data-align="inline-start" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg></span>
16
+ <input class="input" type="text" placeholder="Type a command..." aria-label="Search commands" autofocus>
17
+ </div>
18
+ <div role="listbox" aria-label="Commands">
19
+ <div role="group" aria-labelledby="command-group-navigation">
20
+ <div data-slot="label" id="command-group-navigation">Navigation</div>
21
+ <div role="option">
22
+ <span data-slot="text">Go home</span>
23
+ <span data-slot="shortcut">⌘H</span>
24
+ </div>
25
+ <div role="option">
26
+ <span data-slot="text">Open settings</span>
27
+ <span data-slot="shortcut">⌘,</span>
28
+ </div>
29
+ </div>
30
+ <div role="group" aria-labelledby="command-group-actions">
31
+ <div data-slot="label" id="command-group-actions">Actions</div>
32
+ <div role="option">
33
+ <span data-slot="text">Copy link</span>
34
+ </div>
35
+ <div role="option">
36
+ <span data-slot="text">Download</span>
37
+ </div>
38
+ </div>
39
+ <div data-slot="empty" hidden>No commands found.</div>
40
+ </div>
41
+ </div>
42
+ </section>
43
+ </div>
44
+ </dialog>
@@ -0,0 +1,50 @@
1
+ <!-- Default -->
2
+ <div class="select">
3
+ <button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="select-fruit-panel" aria-label="Fruit">
4
+ <span data-slot="value" data-placeholder>Select a fruit</span>
5
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
6
+ </button>
7
+ <div data-popover data-side="bottom" aria-hidden="true" id="select-fruit-panel">
8
+ <div role="listbox" aria-label="Fruit">
9
+ <div role="option" aria-selected="false">
10
+ <span data-slot="text">Apple</span>
11
+ <span data-slot="indicator" aria-hidden="true">✓</span>
12
+ </div>
13
+ <div role="option" aria-selected="false">
14
+ <span data-slot="text">Banana</span>
15
+ <span data-slot="indicator" aria-hidden="true">✓</span>
16
+ </div>
17
+ <div role="option" aria-selected="false">
18
+ <span data-slot="text">Orange</span>
19
+ <span data-slot="indicator" aria-hidden="true">✓</span>
20
+ </div>
21
+ <div role="option" aria-disabled="true">
22
+ <span data-slot="text">Pineapple</span>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+
28
+ <!-- Small, selected -->
29
+ <div class="select" data-size="sm">
30
+ <button type="button" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="select-fruit-small-panel" aria-label="Fruit">
31
+ <span data-slot="value">Apple</span>
32
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
33
+ </button>
34
+ <div data-popover data-side="bottom" aria-hidden="true" id="select-fruit-small-panel">
35
+ <div role="listbox" aria-label="Fruit">
36
+ <div role="option" aria-selected="true">
37
+ <span data-slot="text">Apple</span>
38
+ <span data-slot="indicator" aria-hidden="true">✓</span>
39
+ </div>
40
+ <div role="option" aria-selected="false">
41
+ <span data-slot="text">Banana</span>
42
+ <span data-slot="indicator" aria-hidden="true">✓</span>
43
+ </div>
44
+ <div role="option" aria-selected="false">
45
+ <span data-slot="text">Orange</span>
46
+ <span data-slot="indicator" aria-hidden="true">✓</span>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
@@ -0,0 +1,82 @@
1
+ /* Listbox primitive */
2
+ @layer loseta.components {
3
+ [role='listbox'] {
4
+ display: flex;
5
+ flex-direction: column;
6
+ outline-style: none;
7
+
8
+ @media (forced-colors: active) {
9
+ outline: 2px solid transparent;
10
+ outline-offset: 2px;
11
+ }
12
+ }
13
+
14
+ [role='listbox'] [role='group'] {
15
+ display: flex;
16
+ flex-direction: column;
17
+
18
+ &[hidden] {
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ [role='listbox'] [role='option'] {
24
+ position: relative;
25
+ display: flex;
26
+ width: 100%;
27
+ cursor: default;
28
+ align-items: center;
29
+ gap: 0.25rem;
30
+ white-space: normal;
31
+ outline-style: none;
32
+ -webkit-user-select: none;
33
+ user-select: none;
34
+
35
+ @media (forced-colors: active) {
36
+ outline: 2px solid transparent;
37
+ outline-offset: 2px;
38
+ }
39
+
40
+ &:disabled {
41
+ pointer-events: none;
42
+ opacity: 50%;
43
+ }
44
+
45
+ &[aria-disabled='true'] {
46
+ pointer-events: none;
47
+ opacity: 50%;
48
+ }
49
+
50
+ &[hidden] {
51
+ display: none;
52
+ }
53
+
54
+ & svg {
55
+ pointer-events: none;
56
+ flex-shrink: 0;
57
+ }
58
+ }
59
+
60
+ [role='listbox'] [role='option'] [data-slot='indicator'] {
61
+ pointer-events: none;
62
+ visibility: hidden;
63
+ }
64
+
65
+ [role='listbox'] [role='option'][aria-selected='true'] [data-slot='indicator'] {
66
+ visibility: visible;
67
+ }
68
+
69
+ [role='listbox'] [data-slot='label'] {
70
+ display: flex;
71
+ }
72
+
73
+ [role='listbox'] [data-slot='empty'] {
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+
78
+ &[hidden] {
79
+ display: none;
80
+ }
81
+ }
82
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "./schema.json",
3
3
  "name": "loseta",
4
- "version": "0.7.0",
4
+ "version": "0.8.0",
5
5
  "styles": [
6
6
  {
7
7
  "name": "nova",
@@ -244,6 +244,30 @@
244
244
  }
245
245
  ]
246
246
  },
247
+ {
248
+ "name": "listbox",
249
+ "type": "primitive",
250
+ "status": "experimental",
251
+ "title": "Listbox primitive",
252
+ "description": "Shared listbox option, group, empty and indicator rules used by select, combobox and command.",
253
+ "root": [
254
+ "[role='listbox']"
255
+ ],
256
+ "files": [
257
+ {
258
+ "path": "primitives/listbox.css",
259
+ "target": "primitives/listbox.css",
260
+ "role": "base",
261
+ "layer": "loseta.components"
262
+ },
263
+ {
264
+ "path": "styles/nova/primitives/listbox.css",
265
+ "target": "styles/nova/primitives/listbox.css",
266
+ "role": "style",
267
+ "layer": "loseta.style"
268
+ }
269
+ ]
270
+ },
247
271
  {
248
272
  "name": "popover-primitive",
249
273
  "type": "primitive",
@@ -2812,6 +2836,111 @@
2812
2836
  "examples": [
2813
2837
  "examples/slider.html"
2814
2838
  ]
2839
+ },
2840
+ {
2841
+ "name": "select",
2842
+ "type": "component",
2843
+ "status": "experimental",
2844
+ "title": "Select",
2845
+ "description": "A custom single-select listbox with a button trigger.",
2846
+ "docs": "/docs/components/select",
2847
+ "root": [
2848
+ ".select"
2849
+ ],
2850
+ "registryDependencies": [
2851
+ "listbox",
2852
+ "popover-primitive"
2853
+ ],
2854
+ "optionalDependencies": [],
2855
+ "files": [
2856
+ {
2857
+ "path": "components/select.css",
2858
+ "target": "components/select.css",
2859
+ "role": "base",
2860
+ "layer": "loseta.components"
2861
+ },
2862
+ {
2863
+ "path": "styles/nova/select.css",
2864
+ "target": "styles/nova/select.css",
2865
+ "role": "style",
2866
+ "layer": "loseta.style"
2867
+ }
2868
+ ],
2869
+ "examples": [
2870
+ "examples/select.html"
2871
+ ]
2872
+ },
2873
+ {
2874
+ "name": "combobox",
2875
+ "type": "component",
2876
+ "status": "experimental",
2877
+ "title": "Combobox",
2878
+ "description": "A text input combined with a listbox of options.",
2879
+ "docs": "/docs/components/combobox",
2880
+ "root": [
2881
+ ".combobox"
2882
+ ],
2883
+ "registryDependencies": [
2884
+ "listbox",
2885
+ "popover-primitive"
2886
+ ],
2887
+ "optionalDependencies": [
2888
+ "button"
2889
+ ],
2890
+ "files": [
2891
+ {
2892
+ "path": "components/combobox.css",
2893
+ "target": "components/combobox.css",
2894
+ "role": "base",
2895
+ "layer": "loseta.components"
2896
+ },
2897
+ {
2898
+ "path": "styles/nova/combobox.css",
2899
+ "target": "styles/nova/combobox.css",
2900
+ "role": "style",
2901
+ "layer": "loseta.style"
2902
+ }
2903
+ ],
2904
+ "examples": [
2905
+ "examples/combobox.html"
2906
+ ]
2907
+ },
2908
+ {
2909
+ "name": "command",
2910
+ "type": "component",
2911
+ "status": "experimental",
2912
+ "title": "Command",
2913
+ "description": "A searchable command list for palettes and dialogs.",
2914
+ "docs": "/docs/components/command",
2915
+ "root": [
2916
+ ".command"
2917
+ ],
2918
+ "registryDependencies": [
2919
+ "listbox",
2920
+ "input-group"
2921
+ ],
2922
+ "optionalDependencies": [
2923
+ "dialog-shell",
2924
+ "popover-primitive",
2925
+ "card"
2926
+ ],
2927
+ "files": [
2928
+ {
2929
+ "path": "components/command.css",
2930
+ "target": "components/command.css",
2931
+ "role": "base",
2932
+ "layer": "loseta.components"
2933
+ },
2934
+ {
2935
+ "path": "styles/nova/command.css",
2936
+ "target": "styles/nova/command.css",
2937
+ "role": "style",
2938
+ "layer": "loseta.style"
2939
+ }
2940
+ ],
2941
+ "examples": [
2942
+ "examples/command.html"
2943
+ ]
2815
2944
  }
2816
2945
  ]
2817
2946
  }
@@ -0,0 +1,59 @@
1
+ /* Combobox */
2
+ @layer loseta.style {
3
+ .combobox {
4
+ > input {
5
+ height: 2rem;
6
+ border-style: solid;
7
+ border-width: 1px;
8
+ border-color: var(--input);
9
+ border-radius: var(--radius-lg);
10
+ background-color: light-dark(
11
+ transparent,
12
+ color-mix(in oklab, var(--input) 30%, transparent)
13
+ );
14
+ padding-inline: 0.5rem;
15
+ font-size: var(--text-base);
16
+ line-height: 1.5;
17
+ transition-property: color, background-color, border-color, box-shadow;
18
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
19
+ transition-duration: 150ms;
20
+
21
+ &:focus-visible {
22
+ border-color: var(--ring);
23
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
24
+ }
25
+
26
+ &[aria-invalid='true'] {
27
+ border-color: light-dark(
28
+ var(--destructive),
29
+ color-mix(in oklab, var(--destructive) 50%, transparent)
30
+ );
31
+ box-shadow: 0 0 0 3px light-dark(
32
+ color-mix(in oklab, var(--destructive) 20%, transparent),
33
+ color-mix(in oklab, var(--destructive) 40%, transparent)
34
+ );
35
+ }
36
+
37
+ @media (width >= 48rem) {
38
+ font-size: var(--text-sm);
39
+ line-height: var(--text-sm--line-height);
40
+ }
41
+ }
42
+
43
+ &:has(> [data-slot='clear']) > input {
44
+ padding-inline-end: 2rem;
45
+ }
46
+
47
+ > [data-slot='clear'] {
48
+ width: 1.5rem;
49
+ height: 1.5rem;
50
+ border-radius: min(var(--radius-md), 10px);
51
+ color: var(--muted-foreground);
52
+
53
+ &:hover {
54
+ background-color: var(--muted);
55
+ color: var(--foreground);
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,19 @@
1
+ /* Command */
2
+ @layer loseta.style {
3
+ .command {
4
+ [data-slot='shortcut'] {
5
+ font-size: var(--text-xs);
6
+ line-height: var(--text-xs--line-height);
7
+ letter-spacing: 0.1em;
8
+ color: var(--muted-foreground);
9
+ }
10
+
11
+ [role='listbox'] [role='option'] {
12
+ padding-inline-end: 0.375rem;
13
+ }
14
+
15
+ [role='listbox'] [role='option']:is(:hover, [data-highlighted]) [data-slot='shortcut'] {
16
+ color: var(--accent-foreground);
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,71 @@
1
+ /* Listbox primitive */
2
+ @layer loseta.style {
3
+ [data-popover]:has(> [role='listbox']) {
4
+ gap: 0;
5
+ width: 100%;
6
+ overflow-x: hidden;
7
+ overflow-y: auto;
8
+ border-radius: var(--radius-lg);
9
+ background-color: var(--popover);
10
+ padding: 0.25rem;
11
+ color: var(--popover-foreground);
12
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-md);
13
+ transition-duration: 100ms;
14
+ }
15
+
16
+ [role='listbox'] {
17
+ & [role='option'] {
18
+ gap: 0.375rem;
19
+ border-radius: var(--radius-md);
20
+ padding-inline: 0.375rem;
21
+ padding-inline-end: 1.75rem;
22
+ padding-block: 0.25rem;
23
+ font-size: var(--text-sm);
24
+ line-height: var(--text-sm--line-height);
25
+
26
+ & svg {
27
+ width: 1rem;
28
+ height: 1rem;
29
+ }
30
+
31
+ &[aria-selected='true'] {
32
+ font-weight: 500;
33
+ }
34
+
35
+ &:hover:not([aria-disabled='true']):not(:disabled),
36
+ &[data-highlighted] {
37
+ background-color: var(--accent);
38
+ color: var(--accent-foreground);
39
+ }
40
+
41
+ &[aria-disabled='true'] {
42
+ color: var(--muted-foreground);
43
+ }
44
+ }
45
+
46
+ & [data-slot='indicator'] {
47
+ position: absolute;
48
+ inset-inline-end: 0.5rem;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ }
53
+
54
+ & [data-slot='label'] {
55
+ padding-inline: 0.375rem;
56
+ padding-block: 0.25rem;
57
+ font-size: var(--text-xs);
58
+ line-height: var(--text-xs--line-height);
59
+ font-weight: 500;
60
+ color: var(--muted-foreground);
61
+ }
62
+
63
+ & [data-slot='empty'] {
64
+ padding-inline: 0.375rem;
65
+ padding-block: 0.5rem;
66
+ font-size: var(--text-sm);
67
+ line-height: var(--text-sm--line-height);
68
+ color: var(--muted-foreground);
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,71 @@
1
+ /* Select */
2
+ @layer loseta.style {
3
+ .select {
4
+ > button {
5
+ height: 2rem;
6
+ border-style: solid;
7
+ border-width: 1px;
8
+ border-color: var(--input);
9
+ border-radius: var(--radius-lg);
10
+ background-color: light-dark(
11
+ transparent,
12
+ color-mix(in oklab, var(--input) 30%, transparent)
13
+ );
14
+ padding-inline: 0.5rem;
15
+ font-size: var(--text-sm);
16
+ line-height: var(--text-sm--line-height);
17
+ font-weight: 400;
18
+ text-align: start;
19
+ transition-property: color, background-color, border-color, box-shadow;
20
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
21
+ transition-duration: 150ms;
22
+
23
+ &:hover {
24
+ background-color: light-dark(
25
+ var(--muted),
26
+ color-mix(in oklab, var(--input) 50%, transparent)
27
+ );
28
+ }
29
+
30
+ &:focus-visible {
31
+ border-color: var(--ring);
32
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
33
+ }
34
+
35
+ &[aria-invalid='true'] {
36
+ border-color: light-dark(
37
+ var(--destructive),
38
+ color-mix(in oklab, var(--destructive) 50%, transparent)
39
+ );
40
+ box-shadow: 0 0 0 3px light-dark(
41
+ color-mix(in oklab, var(--destructive) 20%, transparent),
42
+ color-mix(in oklab, var(--destructive) 40%, transparent)
43
+ );
44
+ }
45
+
46
+ > svg {
47
+ width: 1rem;
48
+ height: 1rem;
49
+ color: var(--muted-foreground);
50
+ }
51
+ }
52
+
53
+ &[data-size='sm'] > button {
54
+ height: 1.75rem;
55
+ font-size: var(--text-xs);
56
+ line-height: var(--text-xs--line-height);
57
+ }
58
+
59
+ [data-slot='value'] {
60
+ flex: 1 1 auto;
61
+ overflow: hidden;
62
+ text-align: start;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ [data-slot='value'][data-placeholder] {
68
+ color: var(--muted-foreground);
69
+ }
70
+ }
71
+ }