@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,14 +1,13 @@
1
- import { jsx as r, jsxs as L } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import { SLOT_ATTR as d, mergeClasses as b, shorthands as c } from "@epilot/zenith-runtime/v1";
4
- import { makeZenithStyles as N } from "../../styles/make-styles.js";
5
- import { boxModel as l, nativeControl as F } from "../../styles/host-reset.js";
6
- import { grayA8 as q, focusRing as v, accentA11 as T, spacingElement2 as u, spacingGroup1 as f, grayA11 as h, spacingElement1 as S, graySoft as P, leadingXs as D, textXs as V, fontWeightSemibold as B, leadingSm as C, textSm as w, grayA12 as g, radiusMd as G, radiusLg as k } from "../../tokens/index.js";
7
- import { Command as A, CommandEmpty as E, CommandGroup as j, CommandInput as H, CommandItem as z, CommandList as W, CommandLoading as M, CommandSeparator as O } from "../command/command.js";
8
- import { Label as Z } from "../label/label.js";
9
- import { Popover as X, PopoverPortal as $, PopoverContent as _, PopoverTrigger as J } from "../popover/popover.js";
10
- import { useOptionalFieldContext as K } from "./field.js";
11
- const Q = (a) => /* @__PURE__ */ r(
1
+ import { jsx as r, jsxs as P } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { SLOT_ATTR as c, mergeClasses as b, shorthands as d } from "@epilot/zenith-runtime/v1";
4
+ import { makeZenithStyles as B } from "../../styles/make-styles.js";
5
+ import { boxModel as s, nativeControl as R } from "../../styles/host-reset.js";
6
+ import { grayA8 as D, focusRing as S, accentA11 as V, spacingElement2 as u, spacingGroup1 as h, grayA11 as y, spacingElement1 as L, graySoft as G, leadingXs as k, textXs as A, fontWeightSemibold as E, leadingSm as w, textSm as F, grayA12 as C, radiusMd as j, radiusLg as H } from "../../tokens/index.js";
7
+ import { CommandCollection as z, Command as W, CommandEmpty as M, CommandGroup as O, CommandGroupLabel as Z, CommandInput as X, CommandItem as $, CommandList as _, CommandLoading as J, CommandSeparator as K } from "../command/command.js";
8
+ import { Popover as Q, PopoverPortal as U, PopoverContent as Y, PopoverTrigger as oo } from "../popover/popover.js";
9
+ import { useFieldLabelId as eo, useOptionalFieldContext as to, useReportFieldControlId as no } from "./field.js";
10
+ const ro = (a) => /* @__PURE__ */ r(
12
11
  "svg",
13
12
  {
14
13
  xmlns: "http://www.w3.org/2000/svg",
@@ -19,7 +18,7 @@ const Q = (a) => /* @__PURE__ */ r(
19
18
  ...a,
20
19
  children: /* @__PURE__ */ r("path", { d: "m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z" })
21
20
  }
22
- ), U = (a) => /* @__PURE__ */ r(
21
+ ), ao = (a) => /* @__PURE__ */ r(
23
22
  "svg",
24
23
  {
25
24
  xmlns: "http://www.w3.org/2000/svg",
@@ -30,7 +29,7 @@ const Q = (a) => /* @__PURE__ */ r(
30
29
  ...a,
31
30
  children: /* @__PURE__ */ r("path", { d: "M459-381 314-526q-3-3-4.5-6.5T308-540q0-8 5.5-14t14.5-6h304q9 0 14.5 6t5.5 14q0 2-6 14L501-381q-5 5-10 7t-11 2q-6 0-11-2t-10-7Z" })
32
31
  }
33
- ), R = (a) => /* @__PURE__ */ r(
32
+ ), N = (a) => /* @__PURE__ */ r(
34
33
  "svg",
35
34
  {
36
35
  xmlns: "http://www.w3.org/2000/svg",
@@ -41,27 +40,27 @@ const Q = (a) => /* @__PURE__ */ r(
41
40
  ...a,
42
41
  children: /* @__PURE__ */ r("path", { d: "M480-424 284-228q-11 11-28 11t-28-11q-11-11-11-28t11-28l196-196-196-196q-11-11-11-28t11-28q11-11 28-11t28 11l196 196 196-196q11-11 28-11t28 11q11 11 11 28t-11 28L536-480l196 196q11 11 11 28t-11 28q-11 11-28 11t-28-11L480-424Z" })
43
42
  }
44
- ), p = N({
43
+ ), p = B({
45
44
  trigger: {
46
- ...F,
45
+ ...R,
47
46
  width: "100%",
48
47
  display: "flex",
49
48
  alignItems: "center",
50
49
  justifyContent: "space-between",
51
- ...c.gap(u),
52
- ...c.borderRadius(k),
50
+ ...d.gap(u),
51
+ ...d.borderRadius(H),
53
52
  backgroundColor: "transparent",
54
- fontSize: w,
55
- lineHeight: C,
53
+ fontSize: F,
54
+ lineHeight: w,
56
55
  whiteSpace: "nowrap",
57
56
  outlineStyle: "none",
58
- ...c.border("0"),
59
- ...c.padding(0),
57
+ ...d.border("0"),
58
+ ...d.padding(0),
60
59
  ":focus-visible": {
61
60
  outlineWidth: "2px",
62
61
  outlineStyle: "solid",
63
62
  outlineOffset: "2px",
64
- outlineColor: v
63
+ outlineColor: S
65
64
  },
66
65
  ":disabled": {
67
66
  cursor: "not-allowed",
@@ -69,7 +68,7 @@ const Q = (a) => /* @__PURE__ */ r(
69
68
  },
70
69
  // The open-state chevron rotation is declared HERE, on the trigger that carries the state
71
70
  // attribute, reaching the chevron by SLOT_ATTR.
72
- [`&[data-popup-open] [${d}="combobox-icon"]`]: {
71
+ [`&[data-popup-open] [${c}="combobox-icon"]`]: {
73
72
  transform: "rotate(180deg)"
74
73
  }
75
74
  },
@@ -80,7 +79,7 @@ const Q = (a) => /* @__PURE__ */ r(
80
79
  }
81
80
  },
82
81
  triggerChevron: {
83
- ...l,
82
+ ...s,
84
83
  width: "1.5rem",
85
84
  height: "1.5rem",
86
85
  flexShrink: 0,
@@ -90,16 +89,16 @@ const Q = (a) => /* @__PURE__ */ r(
90
89
  "@media (prefers-reduced-motion: reduce)": {
91
90
  transitionDuration: "0.01ms"
92
91
  },
93
- color: h
92
+ color: y
94
93
  },
95
94
  value: {
96
- ...l,
97
- color: g,
95
+ ...s,
96
+ color: C,
98
97
  width: "100%",
99
98
  textAlign: "left",
100
99
  flexWrap: "wrap",
101
100
  display: "flex",
102
- ...c.gap(u),
101
+ ...d.gap(u),
103
102
  position: "relative",
104
103
  whiteSpace: "normal",
105
104
  marginRight: "1.25rem"
@@ -108,46 +107,46 @@ const Q = (a) => /* @__PURE__ */ r(
108
107
  // into `--available-height` (seeded before its first pass, so no fallback). As a column, the
109
108
  // command root shrinks to fit and its list scrolls, under a search input that stays in place.
110
109
  content: {
111
- ...l,
112
- ...c.padding(0),
110
+ ...s,
111
+ ...d.padding(0),
113
112
  display: "flex",
114
113
  flexDirection: "column",
115
114
  maxHeight: "var(--available-height)"
116
115
  },
117
116
  command: {
118
- ...l,
117
+ ...s,
119
118
  width: "100%",
120
- ...c.borderRadius(0)
119
+ ...d.borderRadius(0)
121
120
  },
122
121
  input: {
123
- ...F,
122
+ ...R,
124
123
  width: "100%"
125
124
  },
126
125
  list: {
127
- ...l,
128
- ...c.padding(u)
126
+ ...s,
127
+ ...d.padding(u)
129
128
  },
130
129
  item: {
131
- ...l,
132
- paddingLeft: f,
130
+ ...s,
131
+ paddingLeft: h,
133
132
  paddingRight: "2rem",
134
133
  paddingTop: "0.375rem",
135
134
  paddingBottom: "0.375rem",
136
- color: g,
135
+ color: C,
137
136
  position: "relative",
138
137
  display: "flex",
139
138
  width: "100%",
140
139
  cursor: "default",
141
140
  alignItems: "center",
142
- ...c.gap(u),
143
- ...c.borderRadius(G),
144
- fontSize: w,
145
- lineHeight: C,
141
+ ...d.gap(u),
142
+ ...d.borderRadius(j),
143
+ fontSize: F,
144
+ lineHeight: w,
146
145
  outlineStyle: "none",
147
146
  userSelect: "none"
148
147
  },
149
148
  itemCheckIcon: {
150
- ...l,
149
+ ...s,
151
150
  position: "absolute",
152
151
  right: u,
153
152
  display: "flex",
@@ -157,212 +156,247 @@ const Q = (a) => /* @__PURE__ */ r(
157
156
  justifyContent: "center"
158
157
  },
159
158
  checkSvg: {
160
- ...l,
159
+ ...s,
161
160
  width: "1rem",
162
161
  height: "1rem",
163
- color: g
162
+ color: C
164
163
  },
165
164
  empty: {
166
- ...l,
165
+ ...s,
167
166
  paddingTop: "1.5rem",
168
167
  paddingBottom: "1.5rem",
169
168
  textAlign: "center",
170
- color: g,
171
- fontSize: w,
172
- lineHeight: C
169
+ color: C,
170
+ fontSize: F,
171
+ lineHeight: w,
172
+ ":empty": {
173
+ paddingTop: 0,
174
+ paddingBottom: 0
175
+ }
173
176
  },
174
177
  group: {
175
- ...l,
176
- ...c.padding(0)
178
+ ...s,
179
+ ...d.padding(0)
177
180
  },
178
181
  groupLabel: {
179
- ...l,
180
- color: h,
181
- fontWeight: B,
182
+ ...s,
183
+ color: y,
184
+ fontWeight: E,
182
185
  paddingLeft: u,
183
186
  paddingRight: u,
184
187
  paddingTop: u,
185
188
  paddingBottom: u,
186
- fontSize: V,
187
- lineHeight: D
189
+ fontSize: A,
190
+ lineHeight: k
188
191
  },
189
192
  separator: {
190
- ...l,
191
- backgroundColor: P,
193
+ ...s,
194
+ backgroundColor: G,
192
195
  pointerEvents: "none",
193
- marginLeft: `calc(-1 * ${S})`,
194
- marginRight: `calc(-1 * ${S})`,
196
+ marginLeft: `calc(-1 * ${L})`,
197
+ marginRight: `calc(-1 * ${L})`,
195
198
  marginTop: u,
196
199
  marginBottom: u,
197
200
  height: "1px"
198
201
  },
199
202
  loading: {
200
- ...l,
201
- color: h,
202
- paddingLeft: f,
203
- paddingRight: f,
203
+ ...s,
204
+ color: y,
205
+ paddingLeft: h,
206
+ paddingRight: h,
204
207
  paddingTop: u,
205
- paddingBottom: u
208
+ paddingBottom: u,
209
+ // A status region stays mounted; it takes room only while it has something to say.
210
+ ":empty": {
211
+ paddingTop: 0,
212
+ paddingBottom: 0
213
+ }
206
214
  },
207
215
  clear: {
208
- ...l,
216
+ ...s,
209
217
  position: "absolute",
210
218
  right: "2.75rem",
211
219
  cursor: "pointer",
212
220
  minHeight: "auto",
213
- ...c.padding("0.125rem"),
221
+ ...d.padding("0.125rem"),
214
222
  display: "inline-flex",
215
223
  alignItems: "center",
216
224
  justifyContent: "center",
217
- ...c.borderRadius("9999px"),
225
+ ...d.borderRadius("9999px"),
218
226
  backgroundColor: "transparent",
219
- ...c.border("0"),
220
- color: T,
227
+ ...d.border("0"),
228
+ color: V,
221
229
  ":focus-visible": {
222
230
  outlineWidth: "2px",
223
231
  outlineStyle: "solid",
224
232
  outlineOffset: "2px",
225
- outlineColor: v
233
+ outlineColor: S
226
234
  }
227
235
  },
228
236
  clearSvg: {
229
- ...l,
237
+ ...s,
230
238
  width: "1.25rem",
231
239
  height: "1.25rem"
232
240
  },
233
241
  clearValue: {
234
- ...l,
242
+ ...s,
235
243
  cursor: "pointer",
236
244
  ":hover": {
237
245
  opacity: 0.7
238
246
  },
239
247
  color: "currentColor",
240
- ...c.borderRadius("9999px"),
248
+ ...d.borderRadius("9999px"),
241
249
  display: "inline-flex",
242
250
  alignItems: "center",
243
251
  justifyContent: "center"
244
252
  },
245
253
  clearValueSvg: {
246
- ...l,
254
+ ...s,
247
255
  width: "1rem",
248
256
  height: "1rem",
249
257
  color: "currentColor"
250
258
  },
251
259
  placeholder: {
252
- color: q
260
+ color: D
253
261
  }
254
- }), mo = s.forwardRef(
262
+ }), go = m.forwardRef(
255
263
  function(t, o) {
256
264
  return /* @__PURE__ */ r(
257
- X,
265
+ Q,
258
266
  {
259
267
  "data-slot": "combobox",
260
- [d]: "combobox",
268
+ [c]: "combobox",
261
269
  ...t
262
270
  }
263
271
  );
264
272
  }
265
- ), co = s.forwardRef(function({ className: t, children: o, ...n }, e) {
266
- const m = p(), i = K(), I = i !== null, y = (i == null ? void 0 : i.inputRef) ?? null;
267
- return /* @__PURE__ */ L(
268
- J,
273
+ ), xo = m.forwardRef(function({ className: t, children: o, ...n }, e) {
274
+ const l = p(), i = to(), g = i !== null, f = (i == null ? void 0 : i.inputRef) ?? null;
275
+ return no(n.id), /* @__PURE__ */ P(
276
+ oo,
269
277
  {
270
278
  ref: (x) => {
271
- y && (y.current = x), typeof e == "function" ? e(x) : e && (e.current = x);
279
+ f && (f.current = x), typeof e == "function" ? e(x) : e && (e.current = x);
272
280
  },
273
281
  "data-slot": "select-trigger",
274
- [d]: "select-trigger",
282
+ [c]: "select-trigger",
275
283
  className: b(
276
- m.trigger,
277
- I && m.triggerInField,
284
+ l.trigger,
285
+ g && l.triggerInField,
278
286
  t
279
287
  ),
280
288
  ...n,
281
289
  children: [
282
290
  o,
283
291
  /* @__PURE__ */ r(
284
- U,
292
+ ao,
285
293
  {
286
294
  "data-slot": "combobox-icon",
287
- [d]: "combobox-icon",
288
- className: m.triggerChevron
295
+ [c]: "combobox-icon",
296
+ className: l.triggerChevron
289
297
  }
290
298
  )
291
299
  ]
292
300
  }
293
301
  );
294
- }), bo = s.forwardRef(function({ className: t, children: o, container: n, ...e }, m) {
295
- const i = p();
296
- return /* @__PURE__ */ r($, { container: n, children: /* @__PURE__ */ r(
297
- _,
302
+ }), fo = m.forwardRef(function({
303
+ className: t,
304
+ children: o,
305
+ container: n,
306
+ items: e,
307
+ filter: l,
308
+ itemToStringValue: i,
309
+ limit: g,
310
+ value: f,
311
+ defaultValue: v,
312
+ onValueChange: x,
313
+ ...q
314
+ }, T) {
315
+ const I = p();
316
+ return /* @__PURE__ */ r(U, { container: n, children: /* @__PURE__ */ r(
317
+ Y,
298
318
  {
299
- ref: m,
319
+ ref: T,
300
320
  "data-slot": "combobox-content",
301
- [d]: "combobox-content",
302
- className: b(i.content, t),
303
- ...e,
321
+ [c]: "combobox-content",
322
+ className: b(I.content, t),
323
+ ...q,
304
324
  children: /* @__PURE__ */ r(
305
- A,
325
+ W,
306
326
  {
307
327
  "data-slot": "combobox-command",
308
- [d]: "combobox-command",
309
- className: i.command,
328
+ [c]: "combobox-command",
329
+ className: I.command,
330
+ items: e,
331
+ filter: l,
332
+ itemToStringValue: i,
333
+ limit: g,
334
+ value: f,
335
+ defaultValue: v,
336
+ onValueChange: x,
310
337
  children: o
311
338
  }
312
339
  )
313
340
  }
314
341
  ) });
315
- }), po = s.forwardRef(function({ className: t, children: o, ...n }, e) {
316
- const m = p();
342
+ }), Co = m.forwardRef(function({ className: t, children: o, ...n }, e) {
343
+ const l = p();
317
344
  return /* @__PURE__ */ r(
318
345
  "div",
319
346
  {
320
347
  ref: e,
321
348
  "data-slot": "combobox-value",
322
- [d]: "combobox-value",
323
- className: b(m.value, t),
349
+ [c]: "combobox-value",
350
+ className: b(l.value, t),
324
351
  ...n,
325
352
  children: o
326
353
  }
327
354
  );
328
- }), uo = s.forwardRef(function({ className: t, ...o }, n) {
355
+ }), ho = m.forwardRef(function({ className: t, ...o }, n) {
329
356
  const e = p();
330
357
  return /* @__PURE__ */ r(
331
- H,
358
+ X,
332
359
  {
333
360
  ref: n,
334
361
  "data-slot": "combobox-command-input",
335
- [d]: "combobox-command-input",
362
+ [c]: "combobox-command-input",
336
363
  className: b(e.input, t),
337
364
  ...o
338
365
  }
339
366
  );
340
- }), go = s.forwardRef(function({ className: t, ...o }, n) {
341
- const e = p();
367
+ }), yo = m.forwardRef(function({
368
+ className: t,
369
+ "aria-label": o,
370
+ "aria-labelledby": n,
371
+ ...e
372
+ }, l) {
373
+ const i = p(), g = eo();
342
374
  return /* @__PURE__ */ r(
343
- W,
375
+ _,
344
376
  {
345
- ref: n,
377
+ ref: l,
346
378
  "data-slot": "combobox-command-list",
347
- [d]: "combobox-command-list",
348
- className: b(e.list, t),
349
- ...o
379
+ [c]: "combobox-command-list",
380
+ className: b(i.list, t),
381
+ "aria-label": o,
382
+ "aria-labelledby": n ?? (o ? void 0 : g),
383
+ ...e
350
384
  }
351
385
  );
352
- }), xo = s.forwardRef(function({ className: t, children: o, ...n }, e) {
353
- const m = p();
386
+ }), wo = m.forwardRef(function({ className: t, children: o, ...n }, e) {
387
+ const l = p();
354
388
  return /* @__PURE__ */ r(
355
- z,
389
+ $,
356
390
  {
357
391
  ref: e,
358
392
  "data-slot": "combobox-item",
359
- [d]: "combobox-item",
360
- className: b(m.item, t),
393
+ [c]: "combobox-item",
394
+ className: b(l.item, t),
361
395
  ...n,
362
396
  children: o
363
397
  }
364
398
  );
365
- }), fo = s.forwardRef(function({ className: t, ...o }, n) {
399
+ }), Fo = m.forwardRef(function({ className: t, ...o }, n) {
366
400
  const e = p();
367
401
  return /* @__PURE__ */ r(
368
402
  "span",
@@ -370,78 +404,78 @@ const Q = (a) => /* @__PURE__ */ r(
370
404
  ref: n,
371
405
  className: b(e.itemCheckIcon, t),
372
406
  ...o,
373
- children: /* @__PURE__ */ r(Q, { className: e.checkSvg })
407
+ children: /* @__PURE__ */ r(ro, { className: e.checkSvg })
374
408
  }
375
409
  );
376
- }), ho = s.forwardRef(function({ className: t, ...o }, n) {
410
+ }), vo = m.forwardRef(function({ className: t, ...o }, n) {
377
411
  const e = p();
378
412
  return /* @__PURE__ */ r(
379
- E,
413
+ M,
380
414
  {
381
415
  ref: n,
382
416
  "data-slot": "combobox-empty",
383
- [d]: "combobox-empty",
417
+ [c]: "combobox-empty",
384
418
  className: b(e.empty, t),
385
419
  ...o
386
420
  }
387
421
  );
388
- }), Co = s.forwardRef(function({ className: t, ...o }, n) {
422
+ }), Io = m.forwardRef(function({ className: t, ...o }, n) {
389
423
  const e = p();
390
424
  return /* @__PURE__ */ r(
391
- j,
425
+ O,
392
426
  {
393
427
  ref: n,
394
428
  "data-slot": "combobox-group",
395
- [d]: "combobox-group",
429
+ [c]: "combobox-group",
396
430
  className: b(e.group, t),
397
431
  ...o
398
432
  }
399
433
  );
400
- }), wo = s.forwardRef(function({ className: t, ...o }, n) {
434
+ }), Ro = m.forwardRef(function({ className: t, ...o }, n) {
401
435
  const e = p();
402
436
  return /* @__PURE__ */ r(
403
437
  Z,
404
438
  {
405
439
  ref: n,
406
440
  "data-slot": "combobox-group-label",
407
- [d]: "combobox-group-label",
441
+ [c]: "combobox-group-label",
408
442
  className: b(e.groupLabel, t),
409
443
  ...o
410
444
  }
411
445
  );
412
- }), yo = s.forwardRef(function({ className: t, ...o }, n) {
446
+ }), So = (a) => /* @__PURE__ */ r(z, { ...a }), Lo = m.forwardRef(function({ className: t, ...o }, n) {
413
447
  const e = p();
414
448
  return /* @__PURE__ */ r(
415
- O,
449
+ K,
416
450
  {
417
451
  ref: n,
418
452
  "data-slot": "select-separator",
419
- [d]: "select-separator",
453
+ [c]: "select-separator",
420
454
  className: b(e.separator, t),
421
455
  ...o
422
456
  }
423
457
  );
424
- }), Fo = s.forwardRef(function({ className: t, ...o }, n) {
458
+ }), No = m.forwardRef(function({ className: t, ...o }, n) {
425
459
  const e = p();
426
460
  return /* @__PURE__ */ r(
427
- M,
461
+ J,
428
462
  {
429
463
  ref: n,
430
464
  "data-slot": "combobox-command-loading",
431
- [d]: "combobox-command-loading",
465
+ [c]: "combobox-command-loading",
432
466
  className: b(e.loading, t),
433
467
  ...o
434
468
  }
435
469
  );
436
- }), vo = s.forwardRef(function({ className: t, onClick: o, ...n }, e) {
437
- const m = p();
470
+ }), qo = m.forwardRef(function({ className: t, onClick: o, ...n }, e) {
471
+ const l = p();
438
472
  return /* @__PURE__ */ r(
439
473
  "span",
440
474
  {
441
475
  ref: e,
442
476
  role: "button",
443
477
  tabIndex: 0,
444
- className: b(m.clear, t),
478
+ className: b(l.clear, t),
445
479
  onPointerDown: (i) => {
446
480
  i.preventDefault(), i.stopPropagation();
447
481
  },
@@ -449,10 +483,10 @@ const Q = (a) => /* @__PURE__ */ r(
449
483
  i.preventDefault(), i.stopPropagation(), o == null || o(i);
450
484
  },
451
485
  ...n,
452
- children: /* @__PURE__ */ r(R, { className: m.clearSvg })
486
+ children: /* @__PURE__ */ r(N, { className: l.clearSvg })
453
487
  }
454
488
  );
455
- }), So = s.forwardRef(function({ className: t, ...o }, n) {
489
+ }), To = m.forwardRef(function({ className: t, ...o }, n) {
456
490
  const e = p();
457
491
  return /* @__PURE__ */ r(
458
492
  "span",
@@ -462,15 +496,15 @@ const Q = (a) => /* @__PURE__ */ r(
462
496
  ...o
463
497
  }
464
498
  );
465
- }), Ro = s.forwardRef(function({ className: t, onClick: o, ...n }, e) {
466
- const m = p();
499
+ }), Po = m.forwardRef(function({ className: t, onClick: o, ...n }, e) {
500
+ const l = p();
467
501
  return /* @__PURE__ */ r(
468
502
  "span",
469
503
  {
470
504
  ref: e,
471
505
  role: "button",
472
506
  tabIndex: 0,
473
- className: b(m.clearValue, t),
507
+ className: b(l.clearValue, t),
474
508
  onPointerDown: (i) => {
475
509
  i.preventDefault(), i.stopPropagation();
476
510
  },
@@ -478,42 +512,44 @@ const Q = (a) => /* @__PURE__ */ r(
478
512
  i.preventDefault(), i.stopPropagation(), o == null || o(i);
479
513
  },
480
514
  ...n,
481
- children: /* @__PURE__ */ r(R, { className: m.clearValueSvg })
515
+ children: /* @__PURE__ */ r(N, { className: l.clearValueSvg })
482
516
  }
483
517
  );
484
518
  });
485
519
  export {
486
- mo as Combobox,
487
- vo as ComboboxClear,
488
- Ro as ComboboxClearValue,
489
- bo as ComboboxContent,
490
- ho as ComboboxEmpty,
491
- Co as ComboboxGroup,
492
- wo as ComboboxGroupLabel,
493
- uo as ComboboxInput,
494
- xo as ComboboxItem,
495
- fo as ComboboxItemCheckIcon,
496
- go as ComboboxList,
497
- Fo as ComboboxLoading,
498
- So as ComboboxPlaceholder,
499
- yo as ComboboxSeparator,
500
- co as ComboboxTrigger,
501
- po as ComboboxValue,
502
- mo as FieldCombobox,
503
- vo as FieldComboboxClear,
504
- Ro as FieldComboboxClearValue,
505
- bo as FieldComboboxContent,
506
- ho as FieldComboboxEmpty,
507
- Co as FieldComboboxGroup,
508
- wo as FieldComboboxGroupLabel,
509
- uo as FieldComboboxInput,
510
- xo as FieldComboboxItem,
511
- fo as FieldComboboxItemCheckIcon,
512
- go as FieldComboboxList,
513
- Fo as FieldComboboxLoading,
514
- So as FieldComboboxPlaceholder,
515
- yo as FieldComboboxSeparator,
516
- co as FieldComboboxTrigger,
517
- po as FieldComboboxValue
520
+ go as Combobox,
521
+ qo as ComboboxClear,
522
+ Po as ComboboxClearValue,
523
+ So as ComboboxCollection,
524
+ fo as ComboboxContent,
525
+ vo as ComboboxEmpty,
526
+ Io as ComboboxGroup,
527
+ Ro as ComboboxGroupLabel,
528
+ ho as ComboboxInput,
529
+ wo as ComboboxItem,
530
+ Fo as ComboboxItemCheckIcon,
531
+ yo as ComboboxList,
532
+ No as ComboboxLoading,
533
+ To as ComboboxPlaceholder,
534
+ Lo as ComboboxSeparator,
535
+ xo as ComboboxTrigger,
536
+ Co as ComboboxValue,
537
+ go as FieldCombobox,
538
+ qo as FieldComboboxClear,
539
+ Po as FieldComboboxClearValue,
540
+ So as FieldComboboxCollection,
541
+ fo as FieldComboboxContent,
542
+ vo as FieldComboboxEmpty,
543
+ Io as FieldComboboxGroup,
544
+ Ro as FieldComboboxGroupLabel,
545
+ ho as FieldComboboxInput,
546
+ wo as FieldComboboxItem,
547
+ Fo as FieldComboboxItemCheckIcon,
548
+ yo as FieldComboboxList,
549
+ No as FieldComboboxLoading,
550
+ To as FieldComboboxPlaceholder,
551
+ Lo as FieldComboboxSeparator,
552
+ xo as FieldComboboxTrigger,
553
+ Co as FieldComboboxValue
518
554
  };
519
555
  //# sourceMappingURL=field-combobox.js.map