@epilot/zenith-react 0.2.2 → 0.3.0-next.10

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.
Files changed (96) hide show
  1. package/CHANGELOG.md +292 -0
  2. package/codemods/README.md +5 -3
  3. package/codemods/migrate/volt/field-combobox.ts +37 -0
  4. package/codemods/migrate/volt/index.ts +2 -0
  5. package/codemods/migrate/volt/same-name.ts +2 -17
  6. package/dist/_virtual/_zenith-runtime-family_autocomplete.js +7 -0
  7. package/dist/_virtual/_zenith-runtime-family_autocomplete.js.map +1 -0
  8. package/dist/components/command/command.js +263 -179
  9. package/dist/components/command/command.js.map +1 -1
  10. package/dist/components/field/field-combobox.js +213 -177
  11. package/dist/components/field/field-combobox.js.map +1 -1
  12. package/dist/components/field/field.js +281 -247
  13. package/dist/components/field/field.js.map +1 -1
  14. package/dist/index.d.ts +89 -256
  15. package/dist/index.js +120 -119
  16. package/dist/renderer/runtime-contract.generated.js +4 -4
  17. package/dist/renderer/runtime-contract.generated.js.map +1 -1
  18. package/package.json +28 -4
  19. package/dist/vendor/.bun/@radix-ui_primitive@1.1.3/vendor/@radix-ui/primitive/dist/index.js +0 -10
  20. package/dist/vendor/.bun/@radix-ui_primitive@1.1.3/vendor/@radix-ui/primitive/dist/index.js.map +0 -1
  21. package/dist/vendor/.bun/@radix-ui_react-compose-refs@1.1.2_0ac650c021fb1b59/vendor/@radix-ui/react-compose-refs/dist/index.js +0 -30
  22. package/dist/vendor/.bun/@radix-ui_react-compose-refs@1.1.2_0ac650c021fb1b59/vendor/@radix-ui/react-compose-refs/dist/index.js.map +0 -1
  23. package/dist/vendor/.bun/@radix-ui_react-context@1.1.2_0ac650c021fb1b59/vendor/@radix-ui/react-context/dist/index.js +0 -71
  24. package/dist/vendor/.bun/@radix-ui_react-context@1.1.2_0ac650c021fb1b59/vendor/@radix-ui/react-context/dist/index.js.map +0 -1
  25. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js +0 -258
  26. package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js.map +0 -1
  27. package/dist/vendor/.bun/@radix-ui_react-dismissable-layer@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
  28. package/dist/vendor/.bun/@radix-ui_react-dismissable-layer@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-dismissable-layer/dist/index.js.map +0 -1
  29. package/dist/vendor/.bun/@radix-ui_react-focus-guards@1.1.3_0ac650c021fb1b59/vendor/@radix-ui/react-focus-guards/dist/index.js +0 -18
  30. package/dist/vendor/.bun/@radix-ui_react-focus-guards@1.1.3_0ac650c021fb1b59/vendor/@radix-ui/react-focus-guards/dist/index.js.map +0 -1
  31. package/dist/vendor/.bun/@radix-ui_react-focus-scope@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-focus-scope/dist/index.js +0 -138
  32. package/dist/vendor/.bun/@radix-ui_react-focus-scope@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-focus-scope/dist/index.js.map +0 -1
  33. package/dist/vendor/.bun/@radix-ui_react-id@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-id/dist/index.js +0 -14
  34. package/dist/vendor/.bun/@radix-ui_react-id@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-id/dist/index.js.map +0 -1
  35. package/dist/vendor/.bun/@radix-ui_react-portal@1.1.9_2b23df507bdda662/vendor/@radix-ui/react-portal/dist/index.js +0 -17
  36. package/dist/vendor/.bun/@radix-ui_react-portal@1.1.9_2b23df507bdda662/vendor/@radix-ui/react-portal/dist/index.js.map +0 -1
  37. package/dist/vendor/.bun/@radix-ui_react-presence@1.1.5_2b23df507bdda662/vendor/@radix-ui/react-presence/dist/index.js +0 -72
  38. package/dist/vendor/.bun/@radix-ui_react-presence@1.1.5_2b23df507bdda662/vendor/@radix-ui/react-presence/dist/index.js.map +0 -1
  39. package/dist/vendor/.bun/@radix-ui_react-primitive@2.1.3_2b23df507bdda662/vendor/@radix-ui/react-primitive/dist/index.js +0 -37
  40. package/dist/vendor/.bun/@radix-ui_react-primitive@2.1.3_2b23df507bdda662/vendor/@radix-ui/react-primitive/dist/index.js.map +0 -1
  41. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +0 -51
  42. package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +0 -1
  43. package/dist/vendor/.bun/@radix-ui_react-use-callback-ref@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-callback-ref/dist/index.js +0 -14
  44. package/dist/vendor/.bun/@radix-ui_react-use-callback-ref@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-callback-ref/dist/index.js.map +0 -1
  45. package/dist/vendor/.bun/@radix-ui_react-use-controllable-state@1.2.2_0ac650c021fb1b59/vendor/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  46. package/dist/vendor/.bun/@radix-ui_react-use-controllable-state@1.2.2_0ac650c021fb1b59/vendor/@radix-ui/react-use-controllable-state/dist/index.js.map +0 -1
  47. package/dist/vendor/.bun/@radix-ui_react-use-escape-keydown@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-escape-keydown/dist/index.js +0 -15
  48. package/dist/vendor/.bun/@radix-ui_react-use-escape-keydown@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-escape-keydown/dist/index.js.map +0 -1
  49. package/dist/vendor/.bun/@radix-ui_react-use-layout-effect@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
  50. package/dist/vendor/.bun/@radix-ui_react-use-layout-effect@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-layout-effect/dist/index.js.map +0 -1
  51. package/dist/vendor/.bun/aria-hidden@1.2.6/vendor/aria-hidden/dist/es2015/index.js +0 -53
  52. package/dist/vendor/.bun/aria-hidden@1.2.6/vendor/aria-hidden/dist/es2015/index.js.map +0 -1
  53. package/dist/vendor/.bun/cmdk@1.1.1_2b23df507bdda662/vendor/cmdk/dist/chunk-NZJY6EH4.js +0 -18
  54. package/dist/vendor/.bun/cmdk@1.1.1_2b23df507bdda662/vendor/cmdk/dist/chunk-NZJY6EH4.js.map +0 -1
  55. package/dist/vendor/.bun/cmdk@1.1.1_2b23df507bdda662/vendor/cmdk/dist/index.js +0 -313
  56. package/dist/vendor/.bun/cmdk@1.1.1_2b23df507bdda662/vendor/cmdk/dist/index.js.map +0 -1
  57. package/dist/vendor/.bun/get-nonce@1.0.1/vendor/get-nonce/dist/es2015/index.js +0 -8
  58. package/dist/vendor/.bun/get-nonce@1.0.1/vendor/get-nonce/dist/es2015/index.js.map +0 -1
  59. package/dist/vendor/.bun/react-remove-scroll-bar@2.3.8_0ac650c021fb1b59/vendor/react-remove-scroll-bar/dist/es2015/component.js +0 -72
  60. package/dist/vendor/.bun/react-remove-scroll-bar@2.3.8_0ac650c021fb1b59/vendor/react-remove-scroll-bar/dist/es2015/component.js.map +0 -1
  61. package/dist/vendor/.bun/react-remove-scroll-bar@2.3.8_0ac650c021fb1b59/vendor/react-remove-scroll-bar/dist/es2015/constants.js +0 -8
  62. package/dist/vendor/.bun/react-remove-scroll-bar@2.3.8_0ac650c021fb1b59/vendor/react-remove-scroll-bar/dist/es2015/constants.js.map +0 -1
  63. package/dist/vendor/.bun/react-remove-scroll-bar@2.3.8_0ac650c021fb1b59/vendor/react-remove-scroll-bar/dist/es2015/utils.js +0 -26
  64. package/dist/vendor/.bun/react-remove-scroll-bar@2.3.8_0ac650c021fb1b59/vendor/react-remove-scroll-bar/dist/es2015/utils.js.map +0 -1
  65. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/Combination.js +0 -12
  66. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/Combination.js.map +0 -1
  67. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/SideEffect.js +0 -116
  68. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/SideEffect.js.map +0 -1
  69. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/UI.js +0 -32
  70. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/UI.js.map +0 -1
  71. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -17
  72. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +0 -1
  73. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/handleScroll.js +0 -69
  74. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/handleScroll.js.map +0 -1
  75. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/medium.js +0 -6
  76. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/medium.js.map +0 -1
  77. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/sidecar.js +0 -8
  78. package/dist/vendor/.bun/react-remove-scroll@2.7.2_0ac650c021fb1b59/vendor/react-remove-scroll/dist/es2015/sidecar.js.map +0 -1
  79. package/dist/vendor/.bun/react-style-singleton@2.2.3_0ac650c021fb1b59/vendor/react-style-singleton/dist/es2015/component.js +0 -12
  80. package/dist/vendor/.bun/react-style-singleton@2.2.3_0ac650c021fb1b59/vendor/react-style-singleton/dist/es2015/component.js.map +0 -1
  81. package/dist/vendor/.bun/react-style-singleton@2.2.3_0ac650c021fb1b59/vendor/react-style-singleton/dist/es2015/hook.js +0 -16
  82. package/dist/vendor/.bun/react-style-singleton@2.2.3_0ac650c021fb1b59/vendor/react-style-singleton/dist/es2015/hook.js.map +0 -1
  83. package/dist/vendor/.bun/react-style-singleton@2.2.3_0ac650c021fb1b59/vendor/react-style-singleton/dist/es2015/singleton.js +0 -31
  84. package/dist/vendor/.bun/react-style-singleton@2.2.3_0ac650c021fb1b59/vendor/react-style-singleton/dist/es2015/singleton.js.map +0 -1
  85. package/dist/vendor/.bun/tslib@2.8.1/vendor/tslib/tslib.es6.js +0 -28
  86. package/dist/vendor/.bun/tslib@2.8.1/vendor/tslib/tslib.es6.js.map +0 -1
  87. package/dist/vendor/.bun/use-callback-ref@1.3.3_0ac650c021fb1b59/vendor/use-callback-ref/dist/es2015/assignRef.js +0 -7
  88. package/dist/vendor/.bun/use-callback-ref@1.3.3_0ac650c021fb1b59/vendor/use-callback-ref/dist/es2015/assignRef.js.map +0 -1
  89. package/dist/vendor/.bun/use-callback-ref@1.3.3_0ac650c021fb1b59/vendor/use-callback-ref/dist/es2015/useMergeRef.js +0 -27
  90. package/dist/vendor/.bun/use-callback-ref@1.3.3_0ac650c021fb1b59/vendor/use-callback-ref/dist/es2015/useMergeRef.js.map +0 -1
  91. package/dist/vendor/.bun/use-callback-ref@1.3.3_0ac650c021fb1b59/vendor/use-callback-ref/dist/es2015/useRef.js +0 -26
  92. package/dist/vendor/.bun/use-callback-ref@1.3.3_0ac650c021fb1b59/vendor/use-callback-ref/dist/es2015/useRef.js.map +0 -1
  93. package/dist/vendor/.bun/use-sidecar@1.1.3_0ac650c021fb1b59/vendor/use-sidecar/dist/es2015/exports.js +0 -19
  94. package/dist/vendor/.bun/use-sidecar@1.1.3_0ac650c021fb1b59/vendor/use-sidecar/dist/es2015/exports.js.map +0 -1
  95. package/dist/vendor/.bun/use-sidecar@1.1.3_0ac650c021fb1b59/vendor/use-sidecar/dist/es2015/medium.js +0 -68
  96. package/dist/vendor/.bun/use-sidecar@1.1.3_0ac650c021fb1b59/vendor/use-sidecar/dist/es2015/medium.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as a, jsxs as S } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { Command as g } from "../../vendor/.bun/cmdk@1.1.1_2b23df507bdda662/vendor/cmdk/dist/index.js";
4
- import { mergeClasses as i, SLOT_ATTR as m, shorthands as p } from "@epilot/zenith-runtime/v1";
5
- import { makeZenithStyles as q } from "../../styles/make-styles.js";
1
+ import { jsx as a, jsxs as B } from "react/jsx-runtime";
2
+ import * as d from "react";
3
+ import { Autocomplete as g } from "../../_virtual/_zenith-runtime-family_autocomplete.js";
4
+ import { mergeClasses as l, SLOT_ATTR as r, shorthands as u } from "@epilot/zenith-runtime/v1";
5
+ import { makeZenithStyles as z } from "../../styles/make-styles.js";
6
6
  import { boxModel as s } from "../../styles/host-reset.js";
7
- import { spacingElement3 as f, spacingElement2 as r, fontWeightMedium as v, grayA11 as u, leadingXs as T, textXs as L, accentA3 as b, grayA12 as C, leadingSm as x, textSm as R, spacingElement1 as w, graySoft as I, focusRing as B, body as D, radiusSm as E, radiusMd as k, grayA3 as W } from "../../tokens/index.js";
8
- import { Dialog as X, DialogHeader as A, DialogTitle as H, DialogDescription as z, DialogContent as Y } from "../dialog/dialog.js";
9
- const M = (d) => /* @__PURE__ */ a(
7
+ import { spacingElement3 as f, spacingElement2 as m, fontWeightMedium as E, grayA11 as h, leadingXs as H, textXs as $, accentA3 as A, grayA12 as N, leadingSm as q, textSm as I, spacingElement1 as x, graySoft as Y, focusRing as M, body as O, radiusSm as P, radiusMd as W, grayA3 as Z } from "../../tokens/index.js";
8
+ import { Dialog as j, DialogHeader as _, DialogTitle as F, DialogDescription as J, DialogContent as K } from "../dialog/dialog.js";
9
+ const Q = (i) => /* @__PURE__ */ a(
10
10
  "svg",
11
11
  {
12
12
  xmlns: "http://www.w3.org/2000/svg",
@@ -14,28 +14,28 @@ const M = (d) => /* @__PURE__ */ a(
14
14
  viewBox: "0 -960 960 960",
15
15
  width: "24px",
16
16
  fill: "currentColor",
17
- ...d,
17
+ ...i,
18
18
  children: /* @__PURE__ */ a("path", { d: "M380-320q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l224 224q11 11 11 28t-11 28q-11 11-28 11t-28-11L532-372q-30 24-69 38t-83 14Zm0-80q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
19
19
  }
20
- ), c = q({
20
+ ), c = z({
21
21
  root: {
22
22
  ...s,
23
- backgroundColor: D,
24
- color: C,
23
+ backgroundColor: O,
24
+ color: N,
25
25
  display: "flex",
26
26
  height: "100%",
27
27
  width: "100%",
28
28
  flexDirection: "column",
29
29
  overflowX: "hidden",
30
30
  overflowY: "hidden",
31
- ...p.borderRadius(k)
31
+ ...u.borderRadius(W)
32
32
  },
33
33
  inputWrapper: {
34
34
  ...s,
35
35
  display: "flex",
36
36
  alignItems: "center",
37
- ...p.gap(r),
38
- ...p.borderBottom("1px", "solid", W),
37
+ ...u.gap(m),
38
+ ...u.borderBottom("1px", "solid", Z),
39
39
  paddingLeft: f,
40
40
  paddingRight: f,
41
41
  // The input's focus ring, drawn on the whole search row: the row holds the inline padding, so a
@@ -47,7 +47,7 @@ const M = (d) => /* @__PURE__ */ a(
47
47
  outlineWidth: "2px",
48
48
  outlineStyle: "solid",
49
49
  outlineOffset: "-2px",
50
- outlineColor: B
50
+ outlineColor: M
51
51
  }
52
52
  },
53
53
  searchIcon: {
@@ -62,15 +62,15 @@ const M = (d) => /* @__PURE__ */ a(
62
62
  height: "3rem",
63
63
  display: "flex",
64
64
  width: "100%",
65
- ...p.borderRadius(k),
65
+ ...u.borderRadius(W),
66
66
  backgroundColor: "transparent",
67
67
  paddingTop: f,
68
68
  paddingBottom: f,
69
- fontSize: R,
70
- lineHeight: x,
69
+ fontSize: I,
70
+ lineHeight: q,
71
71
  outlineStyle: "none",
72
72
  "::placeholder": {
73
- color: u
73
+ color: h
74
74
  },
75
75
  ":disabled": {
76
76
  cursor: "not-allowed",
@@ -80,40 +80,46 @@ const M = (d) => /* @__PURE__ */ a(
80
80
  list: {
81
81
  overflowX: "hidden",
82
82
  overflowY: "auto",
83
- scrollPaddingTop: w,
84
- scrollPaddingBottom: w
83
+ scrollPaddingTop: x,
84
+ scrollPaddingBottom: x
85
85
  },
86
86
  empty: {
87
87
  ...s,
88
88
  paddingTop: "1.5rem",
89
89
  paddingBottom: "1.5rem",
90
90
  textAlign: "center",
91
- fontSize: R,
92
- lineHeight: x,
93
- color: u
91
+ fontSize: I,
92
+ lineHeight: q,
93
+ color: h,
94
+ // Base UI keeps the empty state mounted as a live region and empties it while items match.
95
+ ":empty": {
96
+ paddingTop: 0,
97
+ paddingBottom: 0
98
+ }
94
99
  },
95
100
  group: {
96
101
  ...s,
97
- color: C,
102
+ color: N,
98
103
  overflowX: "hidden",
99
104
  overflowY: "hidden",
100
- ...p.padding(w),
101
- "& [cmdk-group-heading]": {
102
- color: u,
103
- paddingLeft: r,
104
- paddingRight: r,
105
- paddingTop: "0.375rem",
106
- paddingBottom: "0.375rem",
107
- fontSize: L,
108
- lineHeight: T,
109
- fontWeight: v
110
- }
105
+ ...u.padding(x)
106
+ },
107
+ groupLabel: {
108
+ ...s,
109
+ color: h,
110
+ paddingLeft: m,
111
+ paddingRight: m,
112
+ paddingTop: "0.375rem",
113
+ paddingBottom: "0.375rem",
114
+ fontSize: $,
115
+ lineHeight: H,
116
+ fontWeight: E
111
117
  },
112
118
  separator: {
113
119
  ...s,
114
- backgroundColor: I,
115
- marginLeft: `calc(-1 * ${w})`,
116
- marginRight: `calc(-1 * ${w})`,
120
+ backgroundColor: Y,
121
+ marginLeft: `calc(-1 * ${x})`,
122
+ marginRight: `calc(-1 * ${x})`,
117
123
  height: "1px"
118
124
  },
119
125
  item: {
@@ -122,24 +128,24 @@ const M = (d) => /* @__PURE__ */ a(
122
128
  display: "flex",
123
129
  cursor: "default",
124
130
  alignItems: "center",
125
- ...p.gap(r),
126
- ...p.borderRadius(E),
127
- paddingLeft: r,
128
- paddingRight: r,
131
+ ...u.gap(m),
132
+ ...u.borderRadius(P),
133
+ paddingLeft: m,
134
+ paddingRight: m,
129
135
  paddingTop: "0.375rem",
130
136
  paddingBottom: "0.375rem",
131
- fontSize: R,
132
- lineHeight: x,
137
+ fontSize: I,
138
+ lineHeight: q,
133
139
  outlineStyle: "none",
134
140
  userSelect: "none",
135
- color: C,
136
- "&[data-selected='true'], &[aria-selected='true']": {
137
- backgroundColor: b
141
+ color: N,
142
+ "&[data-highlighted]": {
143
+ backgroundColor: A
138
144
  },
139
145
  ":hover": {
140
- backgroundColor: b
146
+ backgroundColor: A
141
147
  },
142
- "&[data-disabled='true'], &[aria-disabled='true']": {
148
+ "&[data-disabled]": {
143
149
  pointerEvents: "none",
144
150
  opacity: 0.5
145
151
  },
@@ -150,54 +156,50 @@ const M = (d) => /* @__PURE__ */ a(
150
156
  height: "1rem"
151
157
  },
152
158
  "& svg:not([class*='text-'])": {
153
- color: u
159
+ color: h
154
160
  }
155
161
  },
156
162
  shortcut: {
157
- color: u,
163
+ color: h,
158
164
  marginLeft: "auto",
159
- fontSize: L,
160
- lineHeight: T,
165
+ fontSize: $,
166
+ lineHeight: H,
161
167
  letterSpacing: "0.1em"
162
168
  },
163
169
  loading: {
164
- color: u
170
+ color: h
165
171
  },
166
172
  dialogContent: {
167
173
  ...s,
168
174
  overflowX: "hidden",
169
175
  overflowY: "hidden",
170
- ...p.padding(0)
176
+ ...u.padding(0)
171
177
  },
172
178
  dialogCommand: {
173
- "& [cmdk-group-heading]": {
174
- color: u,
175
- paddingLeft: r,
176
- paddingRight: r,
177
- fontWeight: v
179
+ [`& [${r}="command-group-label"]`]: {
180
+ color: h,
181
+ paddingLeft: m,
182
+ paddingRight: m,
183
+ fontWeight: E
178
184
  },
179
- [`& [${m}="command-input-wrapper"]`]: {
185
+ [`& [${r}="command-input-wrapper"]`]: {
180
186
  height: "3rem"
181
187
  },
182
- "& [cmdk-group]": {
183
- paddingLeft: r,
184
- paddingRight: r
188
+ [`& [${r}="command-group"]`]: {
189
+ paddingLeft: m,
190
+ paddingRight: m
185
191
  },
186
- "& [cmdk-item]": {
187
- paddingLeft: r,
188
- paddingRight: r,
192
+ [`& [${r}="command-item"]`]: {
193
+ paddingLeft: m,
194
+ paddingRight: m,
189
195
  paddingTop: f,
190
196
  paddingBottom: f
191
197
  },
192
- "& [cmdk-item] svg": {
198
+ [`& [${r}="command-item"] svg`]: {
193
199
  width: "1.25rem",
194
200
  height: "1.25rem"
195
201
  },
196
- "& [cmdk-input-wrapper] svg": {
197
- width: "1.25rem",
198
- height: "1.25rem"
199
- },
200
- "& [cmdk-input]": {
202
+ [`& [${r}="command-input"]`]: {
201
203
  height: "3rem"
202
204
  }
203
205
  },
@@ -218,166 +220,248 @@ const M = (d) => /* @__PURE__ */ a(
218
220
  overflowY: "hidden",
219
221
  clip: "rect(0, 0, 0, 0)",
220
222
  whiteSpace: "nowrap",
221
- ...p.borderWidth(0)
223
+ ...u.borderWidth(0)
222
224
  }
223
- }), O = l.forwardRef(function({ className: t, "data-slot": o = "command", ...e }, n) {
224
- const h = c();
225
- return /* @__PURE__ */ a(
226
- g,
227
- {
228
- ref: n,
229
- "data-slot": o,
230
- [m]: o,
231
- className: i(h.root, t),
232
- ...e
233
- }
234
- );
235
- });
236
- l.forwardRef(
225
+ }), X = d.createContext(""), U = d.forwardRef(
226
+ function({
227
+ className: e,
228
+ "data-slot": o = "command",
229
+ items: t,
230
+ filter: n,
231
+ itemToStringValue: p,
232
+ limit: y,
233
+ value: S,
234
+ defaultValue: b,
235
+ onValueChange: w,
236
+ children: R,
237
+ ...v
238
+ }, L) {
239
+ const T = c(), [k, C] = d.useState(b ?? ""), G = S ?? k;
240
+ return /* @__PURE__ */ a(
241
+ g.Root,
242
+ {
243
+ inline: !0,
244
+ open: !0,
245
+ autoHighlight: "always",
246
+ keepHighlight: !0,
247
+ items: t,
248
+ filter: n,
249
+ itemToStringValue: p,
250
+ limit: y,
251
+ value: S,
252
+ defaultValue: b,
253
+ onValueChange: (D) => {
254
+ C(D), w == null || w(D);
255
+ },
256
+ children: /* @__PURE__ */ a(X.Provider, { value: G, children: /* @__PURE__ */ a(
257
+ "div",
258
+ {
259
+ ref: L,
260
+ "data-slot": o,
261
+ [r]: o,
262
+ className: l(T.root, e),
263
+ ...v,
264
+ children: R
265
+ }
266
+ ) })
267
+ }
268
+ );
269
+ }
270
+ );
271
+ d.forwardRef(
237
272
  function({
238
- title: t = "Command Palette",
273
+ title: e = "Command Palette",
239
274
  description: o = "Search for a command to run...",
240
- children: e,
275
+ children: t,
241
276
  className: n,
242
- showCloseButton: h = !0,
243
- ...N
244
- }, G) {
245
- const y = c();
246
- return /* @__PURE__ */ S(X, { ...N, children: [
247
- /* @__PURE__ */ S(A, { className: y.srOnly, children: [
248
- /* @__PURE__ */ a(H, { children: t }),
249
- /* @__PURE__ */ a(z, { children: o })
277
+ showCloseButton: p = !0,
278
+ items: y,
279
+ filter: S,
280
+ itemToStringValue: b,
281
+ limit: w,
282
+ value: R,
283
+ defaultValue: v,
284
+ onValueChange: L,
285
+ ...T
286
+ }, k) {
287
+ const C = c();
288
+ return /* @__PURE__ */ B(j, { ...T, children: [
289
+ /* @__PURE__ */ B(_, { className: C.srOnly, children: [
290
+ /* @__PURE__ */ a(F, { children: e }),
291
+ /* @__PURE__ */ a(J, { children: o })
250
292
  ] }),
251
293
  /* @__PURE__ */ a(
252
- Y,
294
+ K,
253
295
  {
254
- className: i(y.dialogContent, n),
255
- showCloseButton: h,
256
- children: /* @__PURE__ */ a(O, { className: y.dialogCommand, children: e })
296
+ className: l(C.dialogContent, n),
297
+ showCloseButton: p,
298
+ children: /* @__PURE__ */ a(
299
+ U,
300
+ {
301
+ className: C.dialogCommand,
302
+ items: y,
303
+ filter: S,
304
+ itemToStringValue: b,
305
+ limit: w,
306
+ value: R,
307
+ defaultValue: v,
308
+ onValueChange: L,
309
+ children: t
310
+ }
311
+ )
257
312
  }
258
313
  )
259
314
  ] });
260
315
  }
261
316
  );
262
- const K = l.forwardRef(function({ className: t, wrapperClassName: o, ...e }, n) {
263
- const h = c();
264
- return /* @__PURE__ */ S(
317
+ const io = d.forwardRef(function({ className: e, wrapperClassName: o, ...t }, n) {
318
+ const p = c();
319
+ return /* @__PURE__ */ B(
265
320
  "div",
266
321
  {
267
322
  "data-slot": "command-input-wrapper",
268
- [m]: "command-input-wrapper",
269
- className: i(h.inputWrapper, o),
323
+ [r]: "command-input-wrapper",
324
+ className: l(p.inputWrapper, o),
270
325
  children: [
271
- /* @__PURE__ */ a(M, { className: h.searchIcon }),
326
+ /* @__PURE__ */ a(Q, { className: p.searchIcon }),
272
327
  /* @__PURE__ */ a(
273
328
  g.Input,
274
329
  {
275
330
  ref: n,
276
331
  "data-slot": "command-input",
277
- [m]: "command-input",
278
- className: i(h.input, t),
279
- ...e
332
+ [r]: "command-input",
333
+ className: l(p.input, e),
334
+ ...t
280
335
  }
281
336
  )
282
337
  ]
283
338
  }
284
339
  );
285
- }), Q = l.forwardRef(function({ className: t, ...o }, e) {
286
- const n = c();
287
- return /* @__PURE__ */ a(
288
- g.List,
289
- {
290
- ref: e,
291
- "data-slot": "command-list",
292
- [m]: "command-list",
293
- className: i(n.list, t),
294
- ...o
295
- }
296
- );
297
- }), U = l.forwardRef(function({ className: t, ...o }, e) {
298
- const n = c();
299
- return /* @__PURE__ */ a(
300
- g.Empty,
301
- {
302
- ref: e,
303
- "data-slot": "command-empty",
304
- [m]: "command-empty",
305
- className: i(n.empty, t),
306
- ...o
307
- }
308
- );
309
- }), V = l.forwardRef(function({ className: t, ...o }, e) {
340
+ }), mo = d.forwardRef(
341
+ function({
342
+ className: e,
343
+ "aria-label": o,
344
+ "aria-labelledby": t,
345
+ ...n
346
+ }, p) {
347
+ const y = c();
348
+ return /* @__PURE__ */ a(
349
+ g.List,
350
+ {
351
+ ref: p,
352
+ "data-slot": "command-list",
353
+ [r]: "command-list",
354
+ className: l(y.list, e),
355
+ "aria-labelledby": t,
356
+ "aria-label": o ?? (t ? void 0 : "Suggestions"),
357
+ ...n
358
+ }
359
+ );
360
+ }
361
+ ), lo = d.forwardRef(
362
+ function({ className: e, ...o }, t) {
363
+ const n = c();
364
+ return /* @__PURE__ */ a(
365
+ g.Empty,
366
+ {
367
+ ref: t,
368
+ "data-slot": "command-empty",
369
+ [r]: "command-empty",
370
+ className: l(n.empty, e),
371
+ ...o
372
+ }
373
+ );
374
+ }
375
+ ), so = d.forwardRef(
376
+ function({ className: e, ...o }, t) {
377
+ const n = c();
378
+ return /* @__PURE__ */ a(
379
+ g.Group,
380
+ {
381
+ ref: t,
382
+ "data-slot": "command-group",
383
+ [r]: "command-group",
384
+ className: l(n.group, e),
385
+ ...o
386
+ }
387
+ );
388
+ }
389
+ ), co = d.forwardRef(function({ className: e, ...o }, t) {
310
390
  const n = c();
311
391
  return /* @__PURE__ */ a(
312
- g.Group,
392
+ g.GroupLabel,
313
393
  {
314
- ref: e,
315
- "data-slot": "command-group",
316
- [m]: "command-group",
317
- className: i(n.group, t),
394
+ ref: t,
395
+ "data-slot": "command-group-label",
396
+ [r]: "command-group-label",
397
+ className: l(n.groupLabel, e),
318
398
  ...o
319
399
  }
320
400
  );
321
- }), oo = l.forwardRef(function({ className: t, ...o }, e) {
401
+ }), po = ({ children: i }) => /* @__PURE__ */ a(g.Collection, { children: i }), go = d.forwardRef(function({ className: e, ...o }, t) {
322
402
  const n = c();
323
- return /* @__PURE__ */ a(
403
+ return d.useContext(X).trim() !== "" ? null : /* @__PURE__ */ a(
324
404
  g.Separator,
325
405
  {
326
- ref: e,
406
+ ref: t,
327
407
  "data-slot": "command-separator",
328
- [m]: "command-separator",
329
- className: i(n.separator, t),
408
+ [r]: "command-separator",
409
+ className: l(n.separator, e),
330
410
  ...o
331
411
  }
332
412
  );
333
- }), to = l.forwardRef(function({ className: t, ...o }, e) {
334
- const n = c();
335
- return /* @__PURE__ */ a(
336
- g.Item,
337
- {
338
- ref: e,
339
- "data-slot": "command-item",
340
- [m]: "command-item",
341
- className: i(n.item, t),
342
- ...o
343
- }
344
- );
345
- });
346
- l.forwardRef(function({ className: t, ...o }, e) {
413
+ }), uo = d.forwardRef(
414
+ function({ className: e, ...o }, t) {
415
+ const n = c();
416
+ return /* @__PURE__ */ a(
417
+ g.Item,
418
+ {
419
+ ref: t,
420
+ "data-slot": "command-item",
421
+ [r]: "command-item",
422
+ className: l(n.item, e),
423
+ ...o
424
+ }
425
+ );
426
+ }
427
+ );
428
+ d.forwardRef(function({ className: e, ...o }, t) {
347
429
  const n = c();
348
430
  return /* @__PURE__ */ a(
349
431
  "span",
350
432
  {
351
- ref: e,
433
+ ref: t,
352
434
  "data-slot": "command-shortcut",
353
- [m]: "command-shortcut",
354
- className: i(n.shortcut, t),
435
+ [r]: "command-shortcut",
436
+ className: l(n.shortcut, e),
355
437
  ...o
356
438
  }
357
439
  );
358
440
  });
359
- const eo = l.forwardRef(function({ className: t, ...o }, e) {
441
+ const ho = d.forwardRef(function({ className: e, ...o }, t) {
360
442
  const n = c();
361
443
  return /* @__PURE__ */ a(
362
- g.Loading,
444
+ g.Status,
363
445
  {
364
- ref: e,
446
+ ref: t,
365
447
  "data-slot": "command-loading",
366
- [m]: "command-loading",
367
- className: i(n.loading, t),
448
+ [r]: "command-loading",
449
+ className: l(n.loading, e),
368
450
  ...o
369
451
  }
370
452
  );
371
453
  });
372
454
  export {
373
- O as Command,
374
- U as CommandEmpty,
375
- V as CommandGroup,
376
- K as CommandInput,
377
- to as CommandItem,
378
- Q as CommandList,
379
- eo as CommandLoading,
380
- O as CommandRoot,
381
- oo as CommandSeparator
455
+ U as Command,
456
+ po as CommandCollection,
457
+ lo as CommandEmpty,
458
+ so as CommandGroup,
459
+ co as CommandGroupLabel,
460
+ io as CommandInput,
461
+ uo as CommandItem,
462
+ mo as CommandList,
463
+ ho as CommandLoading,
464
+ U as CommandRoot,
465
+ go as CommandSeparator
382
466
  };
383
467
  //# sourceMappingURL=command.js.map