@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,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 V, textXs as D, 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 z, CommandItem as H, 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 V, focusRing as S, accentA11 as D, 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 z } from "../../tokens/index.js";
7
+ import { CommandCollection as H, 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(z),
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,58 +89,58 @@ 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"
106
105
  },
107
106
  content: {
108
- ...l,
109
- ...c.padding(0)
107
+ ...s,
108
+ ...d.padding(0)
110
109
  },
111
110
  command: {
112
- ...l,
111
+ ...s,
113
112
  width: "100%",
114
- ...c.borderRadius(0)
113
+ ...d.borderRadius(0)
115
114
  },
116
115
  input: {
117
- ...F,
116
+ ...R,
118
117
  width: "100%"
119
118
  },
120
119
  list: {
121
- ...l,
122
- ...c.padding(u)
120
+ ...s,
121
+ ...d.padding(u)
123
122
  },
124
123
  item: {
125
- ...l,
126
- paddingLeft: f,
124
+ ...s,
125
+ paddingLeft: h,
127
126
  paddingRight: "2rem",
128
127
  paddingTop: "0.375rem",
129
128
  paddingBottom: "0.375rem",
130
- color: g,
129
+ color: C,
131
130
  position: "relative",
132
131
  display: "flex",
133
132
  width: "100%",
134
133
  cursor: "default",
135
134
  alignItems: "center",
136
- ...c.gap(u),
137
- ...c.borderRadius(G),
138
- fontSize: w,
139
- lineHeight: C,
135
+ ...d.gap(u),
136
+ ...d.borderRadius(j),
137
+ fontSize: F,
138
+ lineHeight: w,
140
139
  outlineStyle: "none",
141
140
  userSelect: "none"
142
141
  },
143
142
  itemCheckIcon: {
144
- ...l,
143
+ ...s,
145
144
  position: "absolute",
146
145
  right: u,
147
146
  display: "flex",
@@ -151,212 +150,247 @@ const Q = (a) => /* @__PURE__ */ r(
151
150
  justifyContent: "center"
152
151
  },
153
152
  checkSvg: {
154
- ...l,
153
+ ...s,
155
154
  width: "1rem",
156
155
  height: "1rem",
157
- color: g
156
+ color: C
158
157
  },
159
158
  empty: {
160
- ...l,
159
+ ...s,
161
160
  paddingTop: "1.5rem",
162
161
  paddingBottom: "1.5rem",
163
162
  textAlign: "center",
164
- color: g,
165
- fontSize: w,
166
- lineHeight: C
163
+ color: C,
164
+ fontSize: F,
165
+ lineHeight: w,
166
+ ":empty": {
167
+ paddingTop: 0,
168
+ paddingBottom: 0
169
+ }
167
170
  },
168
171
  group: {
169
- ...l,
170
- ...c.padding(0)
172
+ ...s,
173
+ ...d.padding(0)
171
174
  },
172
175
  groupLabel: {
173
- ...l,
174
- color: h,
175
- fontWeight: B,
176
+ ...s,
177
+ color: y,
178
+ fontWeight: E,
176
179
  paddingLeft: u,
177
180
  paddingRight: u,
178
181
  paddingTop: u,
179
182
  paddingBottom: u,
180
- fontSize: D,
181
- lineHeight: V
183
+ fontSize: A,
184
+ lineHeight: k
182
185
  },
183
186
  separator: {
184
- ...l,
185
- backgroundColor: P,
187
+ ...s,
188
+ backgroundColor: G,
186
189
  pointerEvents: "none",
187
- marginLeft: `calc(-1 * ${S})`,
188
- marginRight: `calc(-1 * ${S})`,
190
+ marginLeft: `calc(-1 * ${L})`,
191
+ marginRight: `calc(-1 * ${L})`,
189
192
  marginTop: u,
190
193
  marginBottom: u,
191
194
  height: "1px"
192
195
  },
193
196
  loading: {
194
- ...l,
195
- color: h,
196
- paddingLeft: f,
197
- paddingRight: f,
197
+ ...s,
198
+ color: y,
199
+ paddingLeft: h,
200
+ paddingRight: h,
198
201
  paddingTop: u,
199
- paddingBottom: u
202
+ paddingBottom: u,
203
+ // A status region stays mounted; it takes room only while it has something to say.
204
+ ":empty": {
205
+ paddingTop: 0,
206
+ paddingBottom: 0
207
+ }
200
208
  },
201
209
  clear: {
202
- ...l,
210
+ ...s,
203
211
  position: "absolute",
204
212
  right: "2.75rem",
205
213
  cursor: "pointer",
206
214
  minHeight: "auto",
207
- ...c.padding("0.125rem"),
215
+ ...d.padding("0.125rem"),
208
216
  display: "inline-flex",
209
217
  alignItems: "center",
210
218
  justifyContent: "center",
211
- ...c.borderRadius("9999px"),
219
+ ...d.borderRadius("9999px"),
212
220
  backgroundColor: "transparent",
213
- ...c.border("0"),
214
- color: T,
221
+ ...d.border("0"),
222
+ color: D,
215
223
  ":focus-visible": {
216
224
  outlineWidth: "2px",
217
225
  outlineStyle: "solid",
218
226
  outlineOffset: "2px",
219
- outlineColor: v
227
+ outlineColor: S
220
228
  }
221
229
  },
222
230
  clearSvg: {
223
- ...l,
231
+ ...s,
224
232
  width: "1.25rem",
225
233
  height: "1.25rem"
226
234
  },
227
235
  clearValue: {
228
- ...l,
236
+ ...s,
229
237
  cursor: "pointer",
230
238
  ":hover": {
231
239
  opacity: 0.7
232
240
  },
233
241
  color: "currentColor",
234
- ...c.borderRadius("9999px"),
242
+ ...d.borderRadius("9999px"),
235
243
  display: "inline-flex",
236
244
  alignItems: "center",
237
245
  justifyContent: "center"
238
246
  },
239
247
  clearValueSvg: {
240
- ...l,
248
+ ...s,
241
249
  width: "1rem",
242
250
  height: "1rem",
243
251
  color: "currentColor"
244
252
  },
245
253
  placeholder: {
246
- color: q
254
+ color: V
247
255
  }
248
- }), mo = s.forwardRef(
256
+ }), go = m.forwardRef(
249
257
  function(t, o) {
250
258
  return /* @__PURE__ */ r(
251
- X,
259
+ Q,
252
260
  {
253
261
  "data-slot": "combobox",
254
- [d]: "combobox",
262
+ [c]: "combobox",
255
263
  ...t
256
264
  }
257
265
  );
258
266
  }
259
- ), co = s.forwardRef(function({ className: t, children: o, ...n }, e) {
260
- const m = p(), i = K(), I = i !== null, y = (i == null ? void 0 : i.inputRef) ?? null;
261
- return /* @__PURE__ */ L(
262
- J,
267
+ ), xo = m.forwardRef(function({ className: t, children: o, ...n }, e) {
268
+ const l = p(), i = to(), g = i !== null, f = (i == null ? void 0 : i.inputRef) ?? null;
269
+ return no(n.id), /* @__PURE__ */ P(
270
+ oo,
263
271
  {
264
272
  ref: (x) => {
265
- y && (y.current = x), typeof e == "function" ? e(x) : e && (e.current = x);
273
+ f && (f.current = x), typeof e == "function" ? e(x) : e && (e.current = x);
266
274
  },
267
275
  "data-slot": "select-trigger",
268
- [d]: "select-trigger",
276
+ [c]: "select-trigger",
269
277
  className: b(
270
- m.trigger,
271
- I && m.triggerInField,
278
+ l.trigger,
279
+ g && l.triggerInField,
272
280
  t
273
281
  ),
274
282
  ...n,
275
283
  children: [
276
284
  o,
277
285
  /* @__PURE__ */ r(
278
- U,
286
+ ao,
279
287
  {
280
288
  "data-slot": "combobox-icon",
281
- [d]: "combobox-icon",
282
- className: m.triggerChevron
289
+ [c]: "combobox-icon",
290
+ className: l.triggerChevron
283
291
  }
284
292
  )
285
293
  ]
286
294
  }
287
295
  );
288
- }), bo = s.forwardRef(function({ className: t, children: o, container: n, ...e }, m) {
289
- const i = p();
290
- return /* @__PURE__ */ r($, { container: n, children: /* @__PURE__ */ r(
291
- _,
296
+ }), fo = m.forwardRef(function({
297
+ className: t,
298
+ children: o,
299
+ container: n,
300
+ items: e,
301
+ filter: l,
302
+ itemToStringValue: i,
303
+ limit: g,
304
+ value: f,
305
+ defaultValue: v,
306
+ onValueChange: x,
307
+ ...q
308
+ }, T) {
309
+ const I = p();
310
+ return /* @__PURE__ */ r(U, { container: n, children: /* @__PURE__ */ r(
311
+ Y,
292
312
  {
293
- ref: m,
313
+ ref: T,
294
314
  "data-slot": "combobox-content",
295
- [d]: "combobox-content",
296
- className: b(i.content, t),
297
- ...e,
315
+ [c]: "combobox-content",
316
+ className: b(I.content, t),
317
+ ...q,
298
318
  children: /* @__PURE__ */ r(
299
- A,
319
+ W,
300
320
  {
301
321
  "data-slot": "combobox-command",
302
- [d]: "combobox-command",
303
- className: i.command,
322
+ [c]: "combobox-command",
323
+ className: I.command,
324
+ items: e,
325
+ filter: l,
326
+ itemToStringValue: i,
327
+ limit: g,
328
+ value: f,
329
+ defaultValue: v,
330
+ onValueChange: x,
304
331
  children: o
305
332
  }
306
333
  )
307
334
  }
308
335
  ) });
309
- }), po = s.forwardRef(function({ className: t, children: o, ...n }, e) {
310
- const m = p();
336
+ }), Co = m.forwardRef(function({ className: t, children: o, ...n }, e) {
337
+ const l = p();
311
338
  return /* @__PURE__ */ r(
312
339
  "div",
313
340
  {
314
341
  ref: e,
315
342
  "data-slot": "combobox-value",
316
- [d]: "combobox-value",
317
- className: b(m.value, t),
343
+ [c]: "combobox-value",
344
+ className: b(l.value, t),
318
345
  ...n,
319
346
  children: o
320
347
  }
321
348
  );
322
- }), uo = s.forwardRef(function({ className: t, ...o }, n) {
349
+ }), ho = m.forwardRef(function({ className: t, ...o }, n) {
323
350
  const e = p();
324
351
  return /* @__PURE__ */ r(
325
- z,
352
+ X,
326
353
  {
327
354
  ref: n,
328
355
  "data-slot": "combobox-command-input",
329
- [d]: "combobox-command-input",
356
+ [c]: "combobox-command-input",
330
357
  className: b(e.input, t),
331
358
  ...o
332
359
  }
333
360
  );
334
- }), go = s.forwardRef(function({ className: t, ...o }, n) {
335
- const e = p();
361
+ }), yo = m.forwardRef(function({
362
+ className: t,
363
+ "aria-label": o,
364
+ "aria-labelledby": n,
365
+ ...e
366
+ }, l) {
367
+ const i = p(), g = eo();
336
368
  return /* @__PURE__ */ r(
337
- W,
369
+ _,
338
370
  {
339
- ref: n,
371
+ ref: l,
340
372
  "data-slot": "combobox-command-list",
341
- [d]: "combobox-command-list",
342
- className: b(e.list, t),
343
- ...o
373
+ [c]: "combobox-command-list",
374
+ className: b(i.list, t),
375
+ "aria-label": o,
376
+ "aria-labelledby": n ?? (o ? void 0 : g),
377
+ ...e
344
378
  }
345
379
  );
346
- }), xo = s.forwardRef(function({ className: t, children: o, ...n }, e) {
347
- const m = p();
380
+ }), wo = m.forwardRef(function({ className: t, children: o, ...n }, e) {
381
+ const l = p();
348
382
  return /* @__PURE__ */ r(
349
- H,
383
+ $,
350
384
  {
351
385
  ref: e,
352
386
  "data-slot": "combobox-item",
353
- [d]: "combobox-item",
354
- className: b(m.item, t),
387
+ [c]: "combobox-item",
388
+ className: b(l.item, t),
355
389
  ...n,
356
390
  children: o
357
391
  }
358
392
  );
359
- }), fo = s.forwardRef(function({ className: t, ...o }, n) {
393
+ }), Fo = m.forwardRef(function({ className: t, ...o }, n) {
360
394
  const e = p();
361
395
  return /* @__PURE__ */ r(
362
396
  "span",
@@ -364,78 +398,78 @@ const Q = (a) => /* @__PURE__ */ r(
364
398
  ref: n,
365
399
  className: b(e.itemCheckIcon, t),
366
400
  ...o,
367
- children: /* @__PURE__ */ r(Q, { className: e.checkSvg })
401
+ children: /* @__PURE__ */ r(ro, { className: e.checkSvg })
368
402
  }
369
403
  );
370
- }), ho = s.forwardRef(function({ className: t, ...o }, n) {
404
+ }), vo = m.forwardRef(function({ className: t, ...o }, n) {
371
405
  const e = p();
372
406
  return /* @__PURE__ */ r(
373
- E,
407
+ M,
374
408
  {
375
409
  ref: n,
376
410
  "data-slot": "combobox-empty",
377
- [d]: "combobox-empty",
411
+ [c]: "combobox-empty",
378
412
  className: b(e.empty, t),
379
413
  ...o
380
414
  }
381
415
  );
382
- }), Co = s.forwardRef(function({ className: t, ...o }, n) {
416
+ }), Io = m.forwardRef(function({ className: t, ...o }, n) {
383
417
  const e = p();
384
418
  return /* @__PURE__ */ r(
385
- j,
419
+ O,
386
420
  {
387
421
  ref: n,
388
422
  "data-slot": "combobox-group",
389
- [d]: "combobox-group",
423
+ [c]: "combobox-group",
390
424
  className: b(e.group, t),
391
425
  ...o
392
426
  }
393
427
  );
394
- }), wo = s.forwardRef(function({ className: t, ...o }, n) {
428
+ }), Ro = m.forwardRef(function({ className: t, ...o }, n) {
395
429
  const e = p();
396
430
  return /* @__PURE__ */ r(
397
431
  Z,
398
432
  {
399
433
  ref: n,
400
434
  "data-slot": "combobox-group-label",
401
- [d]: "combobox-group-label",
435
+ [c]: "combobox-group-label",
402
436
  className: b(e.groupLabel, t),
403
437
  ...o
404
438
  }
405
439
  );
406
- }), yo = s.forwardRef(function({ className: t, ...o }, n) {
440
+ }), So = (a) => /* @__PURE__ */ r(H, { ...a }), Lo = m.forwardRef(function({ className: t, ...o }, n) {
407
441
  const e = p();
408
442
  return /* @__PURE__ */ r(
409
- O,
443
+ K,
410
444
  {
411
445
  ref: n,
412
446
  "data-slot": "select-separator",
413
- [d]: "select-separator",
447
+ [c]: "select-separator",
414
448
  className: b(e.separator, t),
415
449
  ...o
416
450
  }
417
451
  );
418
- }), Fo = s.forwardRef(function({ className: t, ...o }, n) {
452
+ }), No = m.forwardRef(function({ className: t, ...o }, n) {
419
453
  const e = p();
420
454
  return /* @__PURE__ */ r(
421
- M,
455
+ J,
422
456
  {
423
457
  ref: n,
424
458
  "data-slot": "combobox-command-loading",
425
- [d]: "combobox-command-loading",
459
+ [c]: "combobox-command-loading",
426
460
  className: b(e.loading, t),
427
461
  ...o
428
462
  }
429
463
  );
430
- }), vo = s.forwardRef(function({ className: t, onClick: o, ...n }, e) {
431
- const m = p();
464
+ }), qo = m.forwardRef(function({ className: t, onClick: o, ...n }, e) {
465
+ const l = p();
432
466
  return /* @__PURE__ */ r(
433
467
  "span",
434
468
  {
435
469
  ref: e,
436
470
  role: "button",
437
471
  tabIndex: 0,
438
- className: b(m.clear, t),
472
+ className: b(l.clear, t),
439
473
  onPointerDown: (i) => {
440
474
  i.preventDefault(), i.stopPropagation();
441
475
  },
@@ -443,10 +477,10 @@ const Q = (a) => /* @__PURE__ */ r(
443
477
  i.preventDefault(), i.stopPropagation(), o == null || o(i);
444
478
  },
445
479
  ...n,
446
- children: /* @__PURE__ */ r(R, { className: m.clearSvg })
480
+ children: /* @__PURE__ */ r(N, { className: l.clearSvg })
447
481
  }
448
482
  );
449
- }), So = s.forwardRef(function({ className: t, ...o }, n) {
483
+ }), To = m.forwardRef(function({ className: t, ...o }, n) {
450
484
  const e = p();
451
485
  return /* @__PURE__ */ r(
452
486
  "span",
@@ -456,15 +490,15 @@ const Q = (a) => /* @__PURE__ */ r(
456
490
  ...o
457
491
  }
458
492
  );
459
- }), Ro = s.forwardRef(function({ className: t, onClick: o, ...n }, e) {
460
- const m = p();
493
+ }), Po = m.forwardRef(function({ className: t, onClick: o, ...n }, e) {
494
+ const l = p();
461
495
  return /* @__PURE__ */ r(
462
496
  "span",
463
497
  {
464
498
  ref: e,
465
499
  role: "button",
466
500
  tabIndex: 0,
467
- className: b(m.clearValue, t),
501
+ className: b(l.clearValue, t),
468
502
  onPointerDown: (i) => {
469
503
  i.preventDefault(), i.stopPropagation();
470
504
  },
@@ -472,42 +506,44 @@ const Q = (a) => /* @__PURE__ */ r(
472
506
  i.preventDefault(), i.stopPropagation(), o == null || o(i);
473
507
  },
474
508
  ...n,
475
- children: /* @__PURE__ */ r(R, { className: m.clearValueSvg })
509
+ children: /* @__PURE__ */ r(N, { className: l.clearValueSvg })
476
510
  }
477
511
  );
478
512
  });
479
513
  export {
480
- mo as Combobox,
481
- vo as ComboboxClear,
482
- Ro as ComboboxClearValue,
483
- bo as ComboboxContent,
484
- ho as ComboboxEmpty,
485
- Co as ComboboxGroup,
486
- wo as ComboboxGroupLabel,
487
- uo as ComboboxInput,
488
- xo as ComboboxItem,
489
- fo as ComboboxItemCheckIcon,
490
- go as ComboboxList,
491
- Fo as ComboboxLoading,
492
- So as ComboboxPlaceholder,
493
- yo as ComboboxSeparator,
494
- co as ComboboxTrigger,
495
- po as ComboboxValue,
496
- mo as FieldCombobox,
497
- vo as FieldComboboxClear,
498
- Ro as FieldComboboxClearValue,
499
- bo as FieldComboboxContent,
500
- ho as FieldComboboxEmpty,
501
- Co as FieldComboboxGroup,
502
- wo as FieldComboboxGroupLabel,
503
- uo as FieldComboboxInput,
504
- xo as FieldComboboxItem,
505
- fo as FieldComboboxItemCheckIcon,
506
- go as FieldComboboxList,
507
- Fo as FieldComboboxLoading,
508
- So as FieldComboboxPlaceholder,
509
- yo as FieldComboboxSeparator,
510
- co as FieldComboboxTrigger,
511
- po as FieldComboboxValue
514
+ go as Combobox,
515
+ qo as ComboboxClear,
516
+ Po as ComboboxClearValue,
517
+ So as ComboboxCollection,
518
+ fo as ComboboxContent,
519
+ vo as ComboboxEmpty,
520
+ Io as ComboboxGroup,
521
+ Ro as ComboboxGroupLabel,
522
+ ho as ComboboxInput,
523
+ wo as ComboboxItem,
524
+ Fo as ComboboxItemCheckIcon,
525
+ yo as ComboboxList,
526
+ No as ComboboxLoading,
527
+ To as ComboboxPlaceholder,
528
+ Lo as ComboboxSeparator,
529
+ xo as ComboboxTrigger,
530
+ Co as ComboboxValue,
531
+ go as FieldCombobox,
532
+ qo as FieldComboboxClear,
533
+ Po as FieldComboboxClearValue,
534
+ So as FieldComboboxCollection,
535
+ fo as FieldComboboxContent,
536
+ vo as FieldComboboxEmpty,
537
+ Io as FieldComboboxGroup,
538
+ Ro as FieldComboboxGroupLabel,
539
+ ho as FieldComboboxInput,
540
+ wo as FieldComboboxItem,
541
+ Fo as FieldComboboxItemCheckIcon,
542
+ yo as FieldComboboxList,
543
+ No as FieldComboboxLoading,
544
+ To as FieldComboboxPlaceholder,
545
+ Lo as FieldComboboxSeparator,
546
+ xo as FieldComboboxTrigger,
547
+ Co as FieldComboboxValue
512
548
  };
513
549
  //# sourceMappingURL=field-combobox.js.map