@epilot/zenith-react 0.2.0 → 0.3.0-next.1

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