@jfrader/ui 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion-CkOZ-tvs.js +178 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/alert-Dsjx14UW.js +131 -0
  5. package/dist/alert.js +1 -1
  6. package/dist/avatar-BRGKkoSr.js +127 -0
  7. package/dist/avatar.js +1 -1
  8. package/dist/badge-DLxUMsCx.js +104 -0
  9. package/dist/badge.js +1 -1
  10. package/dist/breadcrumbs-694hF_hm.js +131 -0
  11. package/dist/breadcrumbs.js +1 -1
  12. package/dist/button-CoaIcykB.js +190 -0
  13. package/dist/button.js +1 -1
  14. package/dist/calendar-Doj7PTdG.js +379 -0
  15. package/dist/calendar.js +1 -1
  16. package/dist/card-2IM71XZj.js +134 -0
  17. package/dist/card.js +1 -1
  18. package/dist/checkbox-B7xGNFzp.js +136 -0
  19. package/dist/checkbox.js +1 -1
  20. package/dist/combobox-Bjhxv5U3.js +311 -0
  21. package/dist/combobox.js +1 -1
  22. package/dist/{command-palette-6c158eH1.js → command-palette-BhJwm6cS.js} +144 -129
  23. package/dist/command-palette.js +1 -1
  24. package/dist/container-BhnrGPu-.js +36 -0
  25. package/dist/container.js +1 -1
  26. package/dist/date-picker-Jk8SpoiO.js +245 -0
  27. package/dist/date-picker.js +1 -1
  28. package/dist/dialog-fhS07G41.js +187 -0
  29. package/dist/dialog.js +1 -1
  30. package/dist/divider-v_78HYF5.js +79 -0
  31. package/dist/divider.js +1 -1
  32. package/dist/flex-COZzFqI8.js +22 -0
  33. package/dist/flex.js +1 -1
  34. package/dist/index.js +36 -36
  35. package/dist/kbd-CeP8Kfvp.js +61 -0
  36. package/dist/kbd.js +1 -1
  37. package/dist/menu-B6KCbLCr.js +196 -0
  38. package/dist/menu.js +1 -1
  39. package/dist/navigation-BDht6S2-.js +182 -0
  40. package/dist/navigation.js +1 -1
  41. package/dist/{pagination-BIKYsxK1.js → pagination-B50PCaDU.js} +58 -56
  42. package/dist/pagination.js +1 -1
  43. package/dist/pill-2_XzBdkD.js +51 -0
  44. package/dist/pill.js +1 -1
  45. package/dist/popover-DRHbeIVq.js +103 -0
  46. package/dist/popover.js +1 -1
  47. package/dist/{progress-C8bgujFI.js → progress-CpsskKTD.js} +37 -36
  48. package/dist/progress.js +1 -1
  49. package/dist/radio-group-DPI5KUCj.js +136 -0
  50. package/dist/radio-group.js +1 -1
  51. package/dist/select-C1xGrOhT.js +266 -0
  52. package/dist/select.js +1 -1
  53. package/dist/skeleton-DitdP-yz.js +49 -0
  54. package/dist/skeleton.js +1 -1
  55. package/dist/{spinner-CSFiP0Oi.js → spinner-CFq5HPoo.js} +24 -23
  56. package/dist/spinner.js +1 -1
  57. package/dist/stack-D_g6NJzo.js +21 -0
  58. package/dist/stack.js +1 -1
  59. package/dist/switch-B5TTU-oJ.js +138 -0
  60. package/dist/switch.js +1 -1
  61. package/dist/tabs-C26PWl2c.js +183 -0
  62. package/dist/tabs.js +1 -1
  63. package/dist/text-field-8PQAqRpM.js +75 -0
  64. package/dist/text-field.js +1 -1
  65. package/dist/textarea-CcGWuntL.js +85 -0
  66. package/dist/textarea.js +1 -1
  67. package/dist/theme-root-BRLIA4eb.js +22 -0
  68. package/dist/theme-root.js +1 -1
  69. package/dist/toast-B1PXuwZ4.js +277 -0
  70. package/dist/toast.js +1 -1
  71. package/dist/toggle-group-N_owicT0.js +156 -0
  72. package/dist/toggle-group.js +1 -1
  73. package/dist/tooltip-BJPisf60.js +98 -0
  74. package/dist/tooltip.js +1 -1
  75. package/dist/types/components/accordion/accordion.d.ts +13 -9
  76. package/dist/types/components/alert/alert.d.ts +6 -3
  77. package/dist/types/components/avatar/avatar.d.ts +6 -3
  78. package/dist/types/components/badge/badge.d.ts +6 -3
  79. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +8 -5
  80. package/dist/types/components/button/button.d.ts +6 -3
  81. package/dist/types/components/calendar/calendar.d.ts +11 -7
  82. package/dist/types/components/card/card.d.ts +20 -13
  83. package/dist/types/components/checkbox/checkbox.d.ts +6 -3
  84. package/dist/types/components/combobox/combobox.d.ts +12 -8
  85. package/dist/types/components/command-palette/command-palette.d.ts +22 -15
  86. package/dist/types/components/container/container.d.ts +6 -3
  87. package/dist/types/components/date-picker/date-picker.d.ts +6 -4
  88. package/dist/types/components/dialog/dialog.d.ts +16 -11
  89. package/dist/types/components/divider/divider.d.ts +6 -3
  90. package/dist/types/components/flex/flex.d.ts +6 -3
  91. package/dist/types/components/kbd/kbd.d.ts +8 -5
  92. package/dist/types/components/menu/menu.d.ts +13 -9
  93. package/dist/types/components/navigation/navigation.d.ts +11 -7
  94. package/dist/types/components/pagination/pagination.d.ts +6 -3
  95. package/dist/types/components/pill/pill.d.ts +6 -3
  96. package/dist/types/components/popover/popover.d.ts +7 -5
  97. package/dist/types/components/progress/progress.d.ts +6 -3
  98. package/dist/types/components/radio-group/radio-group.d.ts +8 -5
  99. package/dist/types/components/select/select.d.ts +13 -9
  100. package/dist/types/components/skeleton/skeleton.d.ts +6 -3
  101. package/dist/types/components/spinner/spinner.d.ts +6 -3
  102. package/dist/types/components/stack/stack.d.ts +4 -1
  103. package/dist/types/components/switch/switch.d.ts +6 -3
  104. package/dist/types/components/tabs/tabs.d.ts +14 -9
  105. package/dist/types/components/text-field/text-field.d.ts +6 -3
  106. package/dist/types/components/textarea/textarea.d.ts +6 -3
  107. package/dist/types/components/theme-root/theme-root.d.ts +6 -3
  108. package/dist/types/components/toast/toast.d.ts +6 -4
  109. package/dist/types/components/toggle-group/toggle-group.d.ts +7 -5
  110. package/dist/types/components/tooltip/tooltip.d.ts +7 -5
  111. package/dist/types/overlay/use-native-dialog.d.ts +2 -2
  112. package/package.json +4 -4
  113. package/dist/accordion-C3YbYFBi.js +0 -169
  114. package/dist/alert-CA9ZlIZp.js +0 -130
  115. package/dist/avatar-IUW4yJl0.js +0 -125
  116. package/dist/badge-Bru30HEn.js +0 -103
  117. package/dist/breadcrumbs-CQaviWRc.js +0 -126
  118. package/dist/button-Cmixur4Q.js +0 -188
  119. package/dist/calendar-DUgS0xmp.js +0 -373
  120. package/dist/card-D9CHtouU.js +0 -121
  121. package/dist/checkbox-DKa5BCdy.js +0 -135
  122. package/dist/combobox-Dq3V88Zt.js +0 -302
  123. package/dist/container-xUEIoZzj.js +0 -35
  124. package/dist/date-picker-DrHJMt2p.js +0 -240
  125. package/dist/dialog-C2NSOOP-.js +0 -176
  126. package/dist/divider-yF5EmhhT.js +0 -77
  127. package/dist/flex-5-NI5SSy.js +0 -22
  128. package/dist/kbd-B03_qIwQ.js +0 -56
  129. package/dist/menu-bvKRJOhJ.js +0 -187
  130. package/dist/navigation-xPoqh_Iz.js +0 -175
  131. package/dist/pill-CrVqffKM.js +0 -50
  132. package/dist/popover-CVAZ_C1a.js +0 -98
  133. package/dist/radio-group-CvQ4x8ii.js +0 -131
  134. package/dist/select-CNNiUhKB.js +0 -257
  135. package/dist/skeleton-gJ4ImO5u.js +0 -48
  136. package/dist/stack-mEAryjKz.js +0 -21
  137. package/dist/switch-2hm2WnWt.js +0 -136
  138. package/dist/tabs-GBppQabg.js +0 -174
  139. package/dist/text-field-DDPqQu29.js +0 -74
  140. package/dist/textarea-OP8_3IUR.js +0 -84
  141. package/dist/theme-root-eLka0ZP1.js +0 -21
  142. package/dist/toast-D3Y6OAsg.js +0 -271
  143. package/dist/toggle-group-BxzJ-6Cp.js +0 -151
  144. package/dist/tooltip-CVl8HS4S.js +0 -93
@@ -8,83 +8,83 @@ import { a, r as o, s, t as c } from "./collection-registry-1l9f3XJZ.js";
8
8
  import { t as l } from "./trigger-style-B1GFmH7M.js";
9
9
  import { i as u, r as d, t as f } from "./use-native-dialog-DWpIUVO1.js";
10
10
  import { n as p, t as m } from "./surface-DZ4d-2aL.js";
11
- import { createContext as h, forwardRef as g, useCallback as _, useContext as v, useId as y, useMemo as b, useRef as x, useState as S } from "react";
12
- import { vars as C } from "@jfrader/tokens/vars";
13
- import { jsx as w, jsxs as T } from "@emotion/react/jsx-runtime";
14
- import { FloatingList as E, useFloatingRootContext as ee, useInteractions as te, useListNavigation as ne, useMergeRefs as D } from "@floating-ui/react";
11
+ import { createContext as h, useCallback as g, useContext as _, useId as v, useMemo as y, useRef as b, useState as x } from "react";
12
+ import { vars as S } from "@jfrader/tokens/vars";
13
+ import { jsx as C, jsxs as w } from "@emotion/react/jsx-runtime";
14
+ import { FloatingList as T, useFloatingRootContext as ee, useInteractions as te, useListNavigation as ne, useMergeRefs as E } from "@floating-ui/react";
15
15
  //#region src/components/command-palette/command-palette.styles.ts
16
- var O = e({
16
+ var D = e({
17
17
  ...m,
18
- marginBlockStart: C.space[12]
19
- }), k = e({
18
+ marginBlockStart: S.space[12]
19
+ }), O = e({
20
20
  ...p,
21
21
  display: "flex",
22
22
  flexDirection: "column",
23
- borderRadius: C.radius.lg,
24
- boxShadow: C.shadow.floating,
23
+ borderRadius: S.radius.lg,
24
+ boxShadow: S.shadow.floating,
25
25
  inlineSize: "min(560px, calc(100vw - 32px))"
26
- }), A = e({
26
+ }), k = e({
27
27
  boxSizing: "border-box",
28
28
  inlineSize: "100%",
29
29
  blockSize: "48px",
30
30
  margin: 0,
31
31
  border: 0,
32
- borderBlockEnd: `1px solid ${C.color.borderControl}`,
33
- borderStartStartRadius: C.radius.lg,
34
- borderStartEndRadius: C.radius.lg,
32
+ borderBlockEnd: `1px solid ${S.color.borderControl}`,
33
+ borderStartStartRadius: S.radius.lg,
34
+ borderStartEndRadius: S.radius.lg,
35
35
  backgroundColor: "transparent",
36
- paddingInline: C.space[4],
36
+ paddingInline: S.space[4],
37
37
  font: "inherit",
38
- fontSize: C.textSize.md,
39
- color: C.color.text,
40
- "&::placeholder": { color: C.color.textSubtle },
38
+ fontSize: S.textSize.md,
39
+ color: S.color.text,
40
+ "&::placeholder": { color: S.color.textSubtle },
41
41
  "&:focus-visible": { ...t }
42
- }), j = e({
42
+ }), A = e({
43
43
  boxSizing: "border-box",
44
44
  display: "flex",
45
45
  flexDirection: "column",
46
46
  maxBlockSize: "320px",
47
47
  overflow: "auto",
48
- padding: C.space[1],
48
+ padding: S.space[1],
49
49
  "&[hidden]": { display: "none" }
50
- }), M = e({
50
+ }), j = e({
51
51
  display: "flex",
52
52
  flexDirection: "column",
53
53
  "&[hidden]": { display: "none" }
54
+ }), M = e({
55
+ paddingBlock: S.space[1],
56
+ paddingInline: S.space[2],
57
+ fontSize: S.textSize.xs,
58
+ fontWeight: S.fontWeight.medium,
59
+ color: S.color.textMuted
54
60
  }), N = e({
55
- paddingBlock: C.space[1],
56
- paddingInline: C.space[2],
57
- fontSize: C.textSize.xs,
58
- fontWeight: C.fontWeight.medium,
59
- color: C.color.textMuted
60
- }), P = e({
61
- "&:hover, &[data-active]": { backgroundColor: C.color.surfaceHover },
61
+ "&:hover, &[data-active]": { backgroundColor: S.color.surfaceHover },
62
62
  "&[hidden]": { display: "none" }
63
- }), F = e({
64
- paddingBlock: C.space[6],
65
- paddingInline: C.space[4],
63
+ }), P = e({
64
+ paddingBlock: S.space[6],
65
+ paddingInline: S.space[4],
66
66
  textAlign: "center",
67
- fontSize: C.textSize.sm,
68
- color: C.color.textMuted
69
- }), re = "Command palette", ie = "No results", I = new Intl.PluralRules("en"), ae = (e, t) => e.toLocaleLowerCase().includes(t.toLocaleLowerCase()), oe = (e) => `${e} ${I.select(e) === "one" ? "result" : "results"}`, L = h(null), R = h(null);
70
- function z(e) {
71
- let t = v(L);
67
+ fontSize: S.textSize.sm,
68
+ color: S.color.textMuted
69
+ }), re = "Command palette", ie = "No results", F = new Intl.PluralRules("en"), ae = (e, t) => e.toLocaleLowerCase().includes(t.toLocaleLowerCase()), oe = (e) => `${e} ${F.select(e) === "one" ? "result" : "results"}`, I = h(null), L = h(null);
70
+ function R(e) {
71
+ let t = _(I);
72
72
  if (!t) throw Error(`CommandPalette.${e} must be rendered inside <CommandPalette>.`);
73
73
  return t;
74
74
  }
75
- var B = (e) => {
75
+ var z = (e) => {
76
76
  e?.setAttribute("autofocus", "");
77
77
  };
78
- function V({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filter: o = ae, emptyMessage: s = ie, formatResultCount: c = oe, children: l }) {
79
- let d = y(), [f = !1, p] = n(e, t, r), { dialogElementRef: m, setDialogElement: h, setOpen: g, requestClose: v, repairToken: C } = u(f, p), [T, E] = S(""), [D, O] = S(!1), [k, A] = S(null), [j, M] = a(), [N, P] = S(null), [F, I] = S(null), [R, z] = S(f), B = x([]);
78
+ function B({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filter: o = ae, emptyMessage: s = ie, formatResultCount: c = oe, children: l }) {
79
+ let d = v(), [f = !1, p] = n(e, t, r), { dialogElementRef: m, setDialogElement: h, setOpen: _, requestClose: S, repairToken: w } = u(f, p), [T, E] = x(""), [D, O] = x(!1), [k, A] = x(null), [j, M] = a(), [N, P] = x(null), [F, L] = x(null), [R, z] = x(f), B = b([]);
80
80
  f !== R && (z(f), f && (E(""), O(!1), A(null)));
81
- let V = _(() => {
82
- g(!(f && m.current?.open));
81
+ let V = g(() => {
82
+ _(!(f && m.current?.open));
83
83
  }, [
84
84
  f,
85
- g,
85
+ _,
86
86
  m
87
- ]), { matchedValues: H, matchedIndices: U, visibleGroupIds: W } = b(() => {
87
+ ]), { matchedValues: H, matchedIndices: U, visibleGroupIds: W } = y(() => {
88
88
  let e = /* @__PURE__ */ new Set(), t = [], n = /* @__PURE__ */ new Set();
89
89
  return j.forEach((r, i) => {
90
90
  r.index !== -1 && (T === "" || o(r.label, T) || r.keywords !== void 0 && o(r.keywords, T)) && (e.add(i), t.push(r.index), r.groupId !== null && n.add(r.groupId));
@@ -97,9 +97,9 @@ function V({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filte
97
97
  j,
98
98
  T,
99
99
  o
100
- ]), G = b(() => new Set(U), [U]), K = k !== null && G.has(k) ? k : U[0] ?? null, q = ee({
100
+ ]), G = y(() => new Set(U), [U]), K = k !== null && G.has(k) ? k : U[0] ?? null, q = ee({
101
101
  open: f,
102
- onOpenChange: (e) => g(e),
102
+ onOpenChange: (e) => _(e),
103
103
  elements: {
104
104
  reference: N,
105
105
  floating: F
@@ -114,12 +114,12 @@ function V({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filte
114
114
  loop: !0,
115
115
  focusItemOnOpen: !1,
116
116
  disabledIndices: (e) => !G.has(e)
117
- }), { getReferenceProps: Y, getFloatingProps: X, getItemProps: Z } = te([J]), Q = U.length, $ = D ? c(Q) : "", se = b(() => ({
117
+ }), { getReferenceProps: Y, getFloatingProps: X, getItemProps: Z } = te([J]), Q = U.length, $ = D ? c(Q) : "", se = y(() => ({
118
118
  open: f,
119
- setOpen: g,
119
+ setOpen: _,
120
120
  toggleOpen: V,
121
- requestClose: v,
122
- repairToken: C,
121
+ requestClose: S,
122
+ repairToken: w,
123
123
  setDialogElement: h,
124
124
  label: i,
125
125
  emptyMessage: s,
@@ -133,7 +133,7 @@ function V({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filte
133
133
  activeIndex: K,
134
134
  elementsRef: B,
135
135
  setInputElement: P,
136
- setListElement: I,
136
+ setListElement: L,
137
137
  getReferenceProps: Y,
138
138
  getFloatingProps: X,
139
139
  getItemProps: Z,
@@ -147,10 +147,10 @@ function V({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filte
147
147
  registration: M
148
148
  }), [
149
149
  f,
150
- g,
150
+ _,
151
151
  V,
152
- v,
153
- C,
152
+ S,
153
+ w,
154
154
  h,
155
155
  i,
156
156
  s,
@@ -167,41 +167,44 @@ function V({ open: e, defaultOpen: t = !1, onOpenChange: r, label: i = re, filte
167
167
  Z,
168
168
  M
169
169
  ]);
170
- return /* @__PURE__ */ w(L.Provider, {
170
+ return /* @__PURE__ */ C(I.Provider, {
171
171
  value: se,
172
172
  children: l
173
173
  });
174
174
  }
175
- var H = g(function({ onClick: e, ...t }, n) {
176
- let { open: r, toggleOpen: i } = z("Trigger"), a = (t) => {
177
- e?.(t), t.defaultPrevented || i();
175
+ B.displayName = "CommandPalette";
176
+ function V({ ref: e, onClick: t, ...n }) {
177
+ let { open: r, toggleOpen: i } = R("Trigger"), a = (e) => {
178
+ t?.(e), e.defaultPrevented || i();
178
179
  };
179
- return /* @__PURE__ */ w("button", {
180
+ return /* @__PURE__ */ C("button", {
180
181
  type: "button",
181
- ...t,
182
- ref: n,
182
+ ...n,
183
+ ref: e,
183
184
  "data-ui": "command-palette-trigger",
184
185
  "aria-haspopup": "dialog",
185
186
  "aria-expanded": r,
186
187
  onClick: a,
187
188
  css: l
188
189
  });
189
- }), U = g(function(e, t) {
190
- let { children: n, onCancel: i, onClick: a, onClose: o, ...s } = f(e), c = z("Content"), { label: l, announcement: u } = c, p = d(c, {
190
+ }
191
+ V.displayName = "CommandPalette.Trigger";
192
+ function H({ ref: e, ...t }) {
193
+ let { children: n, onCancel: i, onClick: a, onClose: o, ...s } = f(t), c = R("Content"), { label: l, announcement: u } = c, p = d(c, {
191
194
  onCancel: i,
192
195
  onClick: a,
193
196
  onClose: o
194
- }, t);
195
- return /* @__PURE__ */ w("dialog", {
197
+ }, e);
198
+ return /* @__PURE__ */ C("dialog", {
196
199
  "aria-label": l,
197
200
  ...s,
198
201
  ...p,
199
202
  "data-ui": "command-palette",
200
203
  "aria-modal": "true",
201
- css: O,
202
- children: /* @__PURE__ */ T("div", {
203
- css: k,
204
- children: [n, /* @__PURE__ */ w("div", {
204
+ css: D,
205
+ children: /* @__PURE__ */ w("div", {
206
+ css: O,
207
+ children: [n, /* @__PURE__ */ C("div", {
205
208
  role: "status",
206
209
  "aria-live": "polite",
207
210
  "aria-atomic": "true",
@@ -210,22 +213,24 @@ var H = g(function({ onClick: e, ...t }, n) {
210
213
  })]
211
214
  })
212
215
  });
213
- }), W = g(function({ onChange: e, onKeyDown: t, ...n }, r) {
214
- let { label: i, listId: a, query: o, matchCount: s, activeIndex: c, elementsRef: l, requestClose: u, setInputElement: d, getReferenceProps: f, changeQuery: p, moveToEdge: m } = z("Input"), h = D([
216
+ }
217
+ H.displayName = "CommandPalette.Content";
218
+ function U({ ref: e, onChange: t, onKeyDown: n, ...r }) {
219
+ let { label: i, listId: a, query: o, matchCount: s, activeIndex: c, elementsRef: l, requestClose: u, setInputElement: d, getReferenceProps: f, changeQuery: p, moveToEdge: m } = R("Input"), h = E([
215
220
  d,
216
- B,
217
- r
218
- ]), g = (t) => {
219
- e?.(t), p(t.currentTarget.value);
221
+ z,
222
+ e
223
+ ]), g = (e) => {
224
+ t?.(e), p(e.currentTarget.value);
220
225
  }, _ = (e) => {
221
- t?.(e), !(e.defaultPrevented || e.nativeEvent.isComposing) && (e.key === "Escape" ? (e.preventDefault(), u()) : (e.key === "Home" || e.key === "End") && !e.shiftKey && !e.ctrlKey && !e.metaKey && !e.altKey ? (e.preventDefault(), m(e.key === "Home" ? "first" : "last")) : e.key === "Enter" && c !== null && (e.preventDefault(), l.current[c]?.click()));
226
+ n?.(e), !(e.defaultPrevented || e.nativeEvent.isComposing) && (e.key === "Escape" ? (e.preventDefault(), u()) : (e.key === "Home" || e.key === "End") && !e.shiftKey && !e.ctrlKey && !e.metaKey && !e.altKey ? (e.preventDefault(), m(e.key === "Home" ? "first" : "last")) : e.key === "Enter" && c !== null && (e.preventDefault(), l.current[c]?.click()));
222
227
  };
223
- return /* @__PURE__ */ w("input", {
228
+ return /* @__PURE__ */ C("input", {
224
229
  "aria-label": i,
225
230
  autoComplete: "off",
226
231
  spellCheck: !1,
227
232
  ...f({
228
- ...n,
233
+ ...r,
229
234
  onChange: g,
230
235
  onKeyDown: _
231
236
  }),
@@ -237,16 +242,18 @@ var H = g(function({ onClick: e, ...t }, n) {
237
242
  "aria-expanded": s > 0,
238
243
  "aria-controls": a,
239
244
  "data-ui": "command-palette-input",
240
- css: A
245
+ css: k
241
246
  });
242
- }), G = g(function({ onMouseDown: e, children: t, ...n }, r) {
243
- let { label: i, listId: a, matchCount: o, elementsRef: s, setListElement: c, getFloatingProps: l } = z("List"), u = D([c, r]), d = (t) => {
244
- e?.(t), t.preventDefault();
247
+ }
248
+ U.displayName = "CommandPalette.Input";
249
+ function W({ ref: e, onMouseDown: t, children: n, ...r }) {
250
+ let { label: i, listId: a, matchCount: o, elementsRef: s, setListElement: c, getFloatingProps: l } = R("List"), u = E([c, e]), d = (e) => {
251
+ t?.(e), e.preventDefault();
245
252
  };
246
- return /* @__PURE__ */ w("div", {
253
+ return /* @__PURE__ */ C("div", {
247
254
  "aria-label": i,
248
255
  ...l({
249
- ...n,
256
+ ...r,
250
257
  onMouseDown: d
251
258
  }),
252
259
  ref: u,
@@ -254,76 +261,84 @@ var H = g(function({ onClick: e, ...t }, n) {
254
261
  role: "listbox",
255
262
  hidden: o === 0,
256
263
  "data-ui": "command-palette-list",
257
- css: j,
258
- children: /* @__PURE__ */ w(E, {
264
+ css: A,
265
+ children: /* @__PURE__ */ C(T, {
259
266
  elementsRef: s,
260
- children: t
267
+ children: n
261
268
  })
262
269
  });
263
- }), K = g(function({ children: e, ...t }, n) {
264
- let { matchCount: r, emptyMessage: a } = z("Empty");
265
- return r > 0 ? null : /* @__PURE__ */ w("div", {
266
- ...t,
267
- ref: n,
270
+ }
271
+ W.displayName = "CommandPalette.List";
272
+ function G({ ref: e, children: t, ...n }) {
273
+ let { matchCount: r, emptyMessage: a } = R("Empty");
274
+ return r > 0 ? null : /* @__PURE__ */ C("div", {
275
+ ...n,
276
+ ref: e,
268
277
  "data-ui": "command-palette-empty",
269
- css: F,
270
- children: i(e) ? e : a
278
+ css: P,
279
+ children: i(t) ? t : a
271
280
  });
272
- }), q = g(function({ label: e, children: t, "aria-labelledby": n, ...r }, i) {
273
- let { visibleGroupIds: a } = z("Group"), o = y(), s = `${o}-heading`;
274
- return /* @__PURE__ */ T("div", {
275
- ...r,
276
- ref: i,
281
+ }
282
+ G.displayName = "CommandPalette.Empty";
283
+ function K({ ref: e, label: t, children: n, "aria-labelledby": r, ...i }) {
284
+ let { visibleGroupIds: a } = R("Group"), o = v(), s = `${o}-heading`;
285
+ return /* @__PURE__ */ w("div", {
286
+ ...i,
287
+ ref: e,
277
288
  role: "group",
278
- "aria-labelledby": [n, s].filter(Boolean).join(" "),
289
+ "aria-labelledby": [r, s].filter(Boolean).join(" "),
279
290
  hidden: !a.has(o),
280
291
  "data-ui": "command-palette-group",
281
- css: M,
282
- children: [/* @__PURE__ */ w("div", {
292
+ css: j,
293
+ children: [/* @__PURE__ */ C("div", {
283
294
  id: s,
284
- css: N,
285
- children: e
286
- }), /* @__PURE__ */ w(R.Provider, {
287
- value: o,
295
+ css: M,
288
296
  children: t
297
+ }), /* @__PURE__ */ C(L.Provider, {
298
+ value: o,
299
+ children: n
289
300
  })]
290
301
  });
291
- }), J = g(function({ value: e, onSelect: t, keywords: n, onClick: r, children: i, ...a }, l) {
292
- let { baseId: u, activeIndex: d, matchedValues: f, getItemProps: p, setOpen: m, registration: h } = z("Item"), g = v(R), _ = x(null), { ref: y, index: b } = o(e, h, _, (e, t) => ({
302
+ }
303
+ K.displayName = "CommandPalette.Group";
304
+ function q({ ref: e, value: t, onSelect: n, keywords: r, onClick: i, children: a, ...l }) {
305
+ let { baseId: u, activeIndex: d, matchedValues: f, getItemProps: p, setOpen: m, registration: h } = R("Item"), g = _(L), v = b(null), { ref: y, index: x } = o(t, h, v, (e, t) => ({
293
306
  index: e,
294
307
  label: t,
295
- keywords: n,
308
+ keywords: r,
296
309
  groupId: g
297
- })), S = D([
310
+ })), S = E([
298
311
  y,
299
- _,
300
- l
301
- ]), C = b !== -1 && d === b, T = (e) => {
302
- r?.(e), !e.defaultPrevented && (t?.(), m(!1));
312
+ v,
313
+ e
314
+ ]), w = x !== -1 && d === x, T = (e) => {
315
+ i?.(e), !e.defaultPrevented && (n?.(), m(!1));
303
316
  };
304
- return /* @__PURE__ */ w("div", {
317
+ return /* @__PURE__ */ C("div", {
305
318
  ...p({
306
- id: c(u, e),
307
- ...a,
319
+ id: c(u, t),
320
+ ...l,
308
321
  onClick: T
309
322
  }),
310
323
  ref: S,
311
324
  role: "option",
312
- "aria-selected": C,
313
- hidden: !f.has(e),
314
- "data-active": C || void 0,
325
+ "aria-selected": w,
326
+ hidden: !f.has(t),
327
+ "data-active": w || void 0,
315
328
  "data-ui": "command-palette-item",
316
- css: [s, P],
317
- children: i
329
+ css: [s, N],
330
+ children: a
318
331
  });
319
- }), Y = Object.assign(V, {
320
- Trigger: H,
321
- Content: U,
322
- Input: W,
323
- List: G,
324
- Empty: K,
325
- Group: q,
326
- Item: J
332
+ }
333
+ q.displayName = "CommandPalette.Item";
334
+ var J = Object.assign(B, {
335
+ Trigger: V,
336
+ Content: H,
337
+ Input: U,
338
+ List: W,
339
+ Empty: G,
340
+ Group: K,
341
+ Item: q
327
342
  });
328
343
  //#endregion
329
- export { Y as t };
344
+ export { J as t };
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as CommandPalette } from "./command-palette-6c158eH1.js";
2
+ export { t as CommandPalette } from "./command-palette-BhJwm6cS.js";
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { t as e } from "./css-Cgj6sCHn.js";
3
+ import { n as t } from "./layout-style-7ZTOiWGR.js";
4
+ import { jsx as n } from "@emotion/react/jsx-runtime";
5
+ //#region src/components/container/container.tsx
6
+ var r = {
7
+ sm: "640px",
8
+ md: "768px",
9
+ lg: "1024px",
10
+ xl: "1280px"
11
+ }, i = e({
12
+ boxSizing: "border-box",
13
+ inlineSize: "100%",
14
+ marginInline: "auto"
15
+ }), a = {
16
+ sm: e({ maxInlineSize: r.sm }),
17
+ md: e({ maxInlineSize: r.md }),
18
+ lg: e({ maxInlineSize: r.lg }),
19
+ xl: e({ maxInlineSize: r.xl })
20
+ }, o = t("paddingInline");
21
+ function s({ ref: e, size: t = "lg", paddingInline: r = "md", ...s }) {
22
+ return /* @__PURE__ */ n("div", {
23
+ ...s,
24
+ ref: e,
25
+ "data-ui": "container",
26
+ "data-size": t,
27
+ css: [
28
+ i,
29
+ a[t],
30
+ o[r]
31
+ ]
32
+ });
33
+ }
34
+ s.displayName = "Container";
35
+ //#endregion
36
+ export { s as t };
package/dist/container.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- export { t as Container } from "./container-xUEIoZzj.js";
2
+ export { t as Container } from "./container-BhnrGPu-.js";