@pibit.ai/cure-design-system 0.5.7 → 0.5.9

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 (90) hide show
  1. package/dist/applications/date-picker/calendar.d.ts +42 -0
  2. package/dist/applications/date-picker/calendar.d.ts.map +1 -0
  3. package/dist/applications/date-picker/calendar.js +310 -0
  4. package/dist/applications/date-picker/cell.d.ts +15 -0
  5. package/dist/applications/date-picker/cell.d.ts.map +1 -0
  6. package/dist/applications/date-picker/cell.js +90 -0
  7. package/dist/applications/date-picker/date-input.d.ts +7 -0
  8. package/dist/applications/date-picker/date-input.d.ts.map +1 -0
  9. package/dist/applications/date-picker/date-input.js +39 -0
  10. package/dist/applications/date-picker/date-picker.d.ts +47 -0
  11. package/dist/applications/date-picker/date-picker.d.ts.map +1 -0
  12. package/dist/applications/date-picker/date-picker.js +237 -0
  13. package/dist/applications/date-picker/date-range-picker.d.ts +44 -0
  14. package/dist/applications/date-picker/date-range-picker.d.ts.map +1 -0
  15. package/dist/applications/date-picker/date-range-picker.js +335 -0
  16. package/dist/applications/date-picker/date-range-presets.d.ts +50 -0
  17. package/dist/applications/date-picker/date-range-presets.d.ts.map +1 -0
  18. package/dist/applications/date-picker/date-range-presets.js +86 -0
  19. package/dist/applications/date-picker/date-time-calendar.d.ts +34 -0
  20. package/dist/applications/date-picker/date-time-calendar.d.ts.map +1 -0
  21. package/dist/applications/date-picker/date-time-calendar.js +140 -0
  22. package/dist/applications/date-picker/index.d.ts +12 -0
  23. package/dist/applications/date-picker/index.d.ts.map +1 -0
  24. package/dist/applications/date-picker/index.js +36 -0
  25. package/dist/applications/date-picker/range-calendar.d.ts +23 -0
  26. package/dist/applications/date-picker/range-calendar.d.ts.map +1 -0
  27. package/dist/applications/date-picker/range-calendar.js +210 -0
  28. package/dist/applications/date-picker/range-preset.d.ts +10 -0
  29. package/dist/applications/date-picker/range-preset.d.ts.map +1 -0
  30. package/dist/applications/date-picker/range-preset.js +27 -0
  31. package/dist/applications/date-picker/styles.d.ts +8 -0
  32. package/dist/applications/date-picker/styles.d.ts.map +1 -0
  33. package/dist/applications/date-picker/styles.js +14 -0
  34. package/dist/applications/date-picker/time-field.d.ts +7 -0
  35. package/dist/applications/date-picker/time-field.d.ts.map +1 -0
  36. package/dist/applications/date-picker/time-field.js +116 -0
  37. package/dist/applications/date-picker/time-list.d.ts +23 -0
  38. package/dist/applications/date-picker/time-list.d.ts.map +1 -0
  39. package/dist/applications/date-picker/time-list.js +89 -0
  40. package/dist/hooks/use-breakpoint.d.ts +10 -0
  41. package/dist/hooks/use-breakpoint.d.ts.map +1 -0
  42. package/dist/hooks/use-breakpoint.js +21 -0
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +341 -316
  46. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +6 -6
  47. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +6 -6
  48. package/dist/primitives/select/SearchInput.js +1 -1
  49. package/dist/primitives/select/combobox.d.ts +1 -1
  50. package/dist/primitives/select/combobox.d.ts.map +1 -1
  51. package/dist/primitives/select/combobox.js +1 -1
  52. package/dist/primitives/select/multi-select.d.ts +1 -1
  53. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  54. package/dist/primitives/select/multi-select.js +81 -82
  55. package/dist/primitives/select/searchable-select.d.ts +1 -1
  56. package/dist/primitives/select/searchable-select.d.ts.map +1 -1
  57. package/dist/primitives/select/searchable-select.js +1 -1
  58. package/dist/primitives/select/select-item.d.ts +1 -1
  59. package/dist/primitives/select/select-item.d.ts.map +1 -1
  60. package/dist/primitives/select/select-item.js +1 -1
  61. package/dist/primitives/select/select-shared.d.ts +48 -0
  62. package/dist/primitives/select/select-shared.d.ts.map +1 -0
  63. package/dist/primitives/select/select-shared.js +18 -0
  64. package/dist/primitives/select/select.d.ts +4 -46
  65. package/dist/primitives/select/select.d.ts.map +1 -1
  66. package/dist/primitives/select/select.js +71 -81
  67. package/dist/styles/components.css +1 -1
  68. package/package.json +8 -1
  69. package/dist/node_modules/@react-aria/focus/dist/FocusScope.js +0 -442
  70. package/dist/node_modules/@react-aria/i18n/dist/context.js +0 -10
  71. package/dist/node_modules/@react-aria/i18n/dist/useCollator.js +0 -11
  72. package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.js +0 -36
  73. package/dist/node_modules/@react-aria/i18n/dist/useFilter.js +0 -35
  74. package/dist/node_modules/@react-aria/i18n/dist/utils.js +0 -44
  75. package/dist/node_modules/@react-aria/interactions/dist/focusSafely.js +0 -18
  76. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +0 -62
  77. package/dist/node_modules/@react-aria/interactions/dist/utils.js +0 -5
  78. package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.js +0 -49
  79. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +0 -27
  80. package/dist/node_modules/@react-aria/utils/dist/ShadowTreeWalker.js +0 -130
  81. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +0 -15
  82. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +0 -45
  83. package/dist/node_modules/@react-aria/utils/dist/isElementVisible.js +0 -25
  84. package/dist/node_modules/@react-aria/utils/dist/isFocusable.js +0 -37
  85. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +0 -7
  86. package/dist/node_modules/@react-aria/utils/dist/openLink.js +0 -28
  87. package/dist/node_modules/@react-aria/utils/dist/platform.js +0 -47
  88. package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.js +0 -35
  89. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +0 -6
  90. package/dist/node_modules/@react-stately/flags/dist/import.js +0 -7
@@ -4,7 +4,7 @@ import { useId as H, useRef as l, useContext as y, useInsertionEffect as I } fro
4
4
  import { MotionConfigContext as M } from "../../context/MotionConfigContext.js";
5
5
  import { useComposedRefs as W } from "../../utils/use-composed-ref.js";
6
6
  import { isHTMLElement as u } from "../../../../../motion-dom/dist/es/utils/is-html-element.js";
7
- class B extends g.Component {
7
+ class v extends g.Component {
8
8
  getSnapshotBeforeUpdate(i) {
9
9
  const e = this.props.childRef.current;
10
10
  if (e && i.isPresent && !this.props.isPresent) {
@@ -22,7 +22,7 @@ class B extends g.Component {
22
22
  return this.props.children;
23
23
  }
24
24
  }
25
- function D({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
25
+ function B({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
26
26
  var c;
27
27
  const r = H(), t = l(null), h = l({
28
28
  width: 0,
@@ -36,7 +36,7 @@ function D({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
36
36
  const { width: d, height: a, top: C, left: R, right: b, bottom: w } = h.current;
37
37
  if (i || !t.current || !d || !a)
38
38
  return;
39
- const P = e === "left" ? `left: ${R}` : `right: ${b}`, z = n === "bottom" ? `bottom: ${w}` : `top: ${C}`;
39
+ const z = e === "left" ? `left: ${R}` : `right: ${b}`, P = n === "bottom" ? `bottom: ${w}` : `top: ${C}`;
40
40
  t.current.dataset.motionPopId = r;
41
41
  const s = document.createElement("style");
42
42
  m && (s.nonce = m);
@@ -46,14 +46,14 @@ function D({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
46
46
  position: absolute !important;
47
47
  width: ${d}px !important;
48
48
  height: ${a}px !important;
49
- ${P}px !important;
50
49
  ${z}px !important;
50
+ ${P}px !important;
51
51
  }
52
52
  `), () => {
53
53
  f.contains(s) && f.removeChild(s);
54
54
  };
55
- }, [i]), E(B, { isPresent: i, childRef: t, sizeRef: h, children: g.cloneElement(o, { ref: x }) });
55
+ }, [i]), E(v, { isPresent: i, childRef: t, sizeRef: h, children: g.cloneElement(o, { ref: x }) });
56
56
  }
57
57
  export {
58
- D as PopChild
58
+ B as PopChild
59
59
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as M from "react";
3
- import { useId as g, useMemo as c } from "react";
4
- import { PresenceContext as w } from "../../context/PresenceContext.js";
5
- import { useConstant as x } from "../../utils/use-constant.js";
3
+ import { useId as w, useMemo as c } from "react";
4
+ import { PresenceContext as x } from "../../context/PresenceContext.js";
5
+ import { useConstant as z } from "../../utils/use-constant.js";
6
6
  import { PopChild as $ } from "./PopChild.js";
7
7
  const X = ({ children: f, initial: i, isPresent: r, onExitComplete: o, custom: m, presenceAffectsLayout: p, mode: l, anchorX: d, anchorY: h, root: C }) => {
8
- const e = x(j), v = g();
8
+ const e = z(g), v = w();
9
9
  let u = !0, n = c(() => (u = !1, {
10
10
  id: v,
11
11
  initial: i,
@@ -24,9 +24,9 @@ const X = ({ children: f, initial: i, isPresent: r, onExitComplete: o, custom: m
24
24
  e.forEach((t, s) => e.set(s, !1));
25
25
  }, [r]), M.useEffect(() => {
26
26
  !r && !e.size && o && o();
27
- }, [r]), l === "popLayout" && (f = a($, { isPresent: r, anchorX: d, anchorY: h, root: C, children: f })), a(w.Provider, { value: n, children: f });
27
+ }, [r]), l === "popLayout" && (f = a($, { isPresent: r, anchorX: d, anchorY: h, root: C, children: f })), a(x.Provider, { value: n, children: f });
28
28
  };
29
- function j() {
29
+ function g() {
30
30
  return /* @__PURE__ */ new Map();
31
31
  }
32
32
  export {
@@ -4,7 +4,7 @@ import { SearchMd as A, XClose as E } from "@untitledui/icons";
4
4
  import { ComboBox as P, Group as R, Input as j } from "react-aria-components";
5
5
  import { cx as i } from "../../utils/cn.js";
6
6
  import { getPlatformShortcutLabel as B } from "../../utils/keyboard-shortcut.js";
7
- import { sizes as g } from "./select.js";
7
+ import { sizes as g } from "./select-shared.js";
8
8
  import { ButtonUtility as G } from "../button/button-utility.js";
9
9
  const M = {
10
10
  xs: "h-7",
@@ -1,6 +1,6 @@
1
1
  import { RefAttributes } from 'react';
2
2
  import { ComboBoxProps as AriaComboBoxProps, ListBoxProps as AriaListBoxProps } from 'react-aria-components';
3
- import { CommonProps, SelectItemType } from './select';
3
+ import { CommonProps, SelectItemType } from './select-shared';
4
4
  interface ComboBoxProps extends Omit<AriaComboBoxProps<SelectItemType>, "children" | "items">, RefAttributes<HTMLDivElement>, CommonProps {
5
5
  shortcut?: boolean;
6
6
  items?: SelectItemType[];
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,aAAa,EAEd,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAElC,YAAY,IAAI,gBAAgB,EACjC,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AASlB,UAAU,aACR,SACE,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,EAC7D,aAAa,CAAC,cAAc,CAAC,EAC7B,WAAW;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC;IACvD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAyND,eAAO,MAAM,QAAQ,GAAI,oGAStB,aAAa,4CAmEf,CAAC"}
1
+ {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,aAAa,EAEd,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAElC,YAAY,IAAI,gBAAgB,EACjC,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AASzB,UAAU,aACR,SACE,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,EAC7D,aAAa,CAAC,cAAc,CAAC,EAC7B,WAAW;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC;IACvD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAyND,eAAO,MAAM,QAAQ,GAAI,oGAStB,aAAa,4CAmEf,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as x, Fragment as B } from "react/jsx-runtime";
2
2
  import { useRef as C, useState as E, useCallback as q, useContext as O, useEffect as W } from "react";
3
3
  import { SearchLg as z, ChevronDown as I } from "@untitledui/icons";
4
4
  import { ComboBox as T, ListBox as M, ComboBoxStateContext as j, Group as _, Input as A } from "react-aria-components";
5
- import { SelectContext as G, sizes as S } from "./select.js";
5
+ import { SelectContext as G, sizes as S } from "./select-shared.js";
6
6
  import { cx as c } from "../../utils/cn.js";
7
7
  import { getPlatformShortcutLabel as H } from "../../utils/keyboard-shortcut.js";
8
8
  import { Label as K } from "../input/label.js";
@@ -1,7 +1,7 @@
1
1
  import { FocusEventHandler, PointerEventHandler, RefAttributes, RefObject } from 'react';
2
2
  import { ComboBoxProps as AriaComboBoxProps, GroupProps as AriaGroupProps, ListBoxProps as AriaListBoxProps, Key } from 'react-aria-components';
3
3
  import { ListData } from 'react-stately';
4
- import { SelectItemType } from './select';
4
+ import { SelectItemType } from './select-shared';
5
5
  import { SelectItem } from './select-item';
6
6
  import { IconComponentType } from '../badge';
7
7
  interface ComboBoxValueProps extends AriaGroupProps {
@@ -1 +1 @@
1
- {"version":3,"file":"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,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,GAAI,mLAgB7B,gBAAgB,4CA8IlB,CAAC;AA6JF,eAAO,MAAM,oBAAoB,GAAI,6HAUlC,kBAAkB,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,4CAgC7C,CAAC;AAEF,QAAA,MAAM,WAAW,EAAsB,OAAO,eAAe,GAAG;IAC9D,IAAI,EAAE,OAAO,UAAU,CAAC;CACzB,CAAC;AAIF,OAAO,EAAE,WAAW,IAAI,WAAW,EAAE,CAAC"}
@@ -1,24 +1,23 @@
1
- import { jsx as i, jsxs as N, Fragment as _ } from "react/jsx-runtime";
2
- import { useCallback as z, useRef as L, useState as E, createContext as q, useContext as D } from "react";
3
- import { ComboBox as j, ListBox as C, Group as V, ComboBoxStateContext as W, Input as G } from "react-aria-components";
4
- import { Avatar as H } from "../avatar/avatar.js";
5
- import { HintText as U } from "../input/hint-text.js";
6
- import { Label as X } from "../input/label.js";
7
- import { Popover as J } from "./popover.js";
8
- import { sizes as O } from "./select.js";
9
- import { TagCloseX as Q } from "../tags/base-components/tag-close-x.js";
10
- import { SelectItem as Y } from "./select-item.js";
1
+ import { jsx as i, jsxs as N, Fragment as L } from "react/jsx-runtime";
2
+ import { useCallback as F, useRef as E, useState as q, createContext as j, useContext as P } from "react";
3
+ import { useFilter as C, FocusScope as V, useFocusManager as $ } from "react-aria";
4
+ import { ComboBox as W, ListBox as G, Group as H, ComboBoxStateContext as U, Input as X } from "react-aria-components";
5
+ import { Avatar as J } from "../avatar/avatar.js";
6
+ import { HintText as O } from "../input/hint-text.js";
7
+ import { Label as Q } from "../input/label.js";
8
+ import { Popover as Y } from "./popover.js";
9
+ import { sizes as Z } from "./select-shared.js";
10
+ import { TagCloseX as M } from "../tags/base-components/tag-close-x.js";
11
+ import { SelectItem as B } from "./select-item.js";
11
12
  import { cx as w } from "../../utils/cn.js";
12
- import { getPlatformShortcutLabel as Z } from "../../utils/keyboard-shortcut.js";
13
- import { useResizeObserver as M } from "../../hooks/use-resize-observer.js";
14
- import { useFilter as B } from "../../node_modules/@react-aria/i18n/dist/useFilter.js";
15
- import { useListData as I } from "../../node_modules/@react-stately/data/dist/useListData.js";
16
- import { FocusScope as ee, useFocusManager as te } from "../../node_modules/@react-aria/focus/dist/FocusScope.js";
17
- const re = {
13
+ import { getPlatformShortcutLabel as I } from "../../utils/keyboard-shortcut.js";
14
+ import { useResizeObserver as ee } from "../../hooks/use-resize-observer.js";
15
+ import { useListData as te } from "../../node_modules/@react-stately/data/dist/useListData.js";
16
+ const se = {
18
17
  sm: "text-xs",
19
18
  md: "text-sm",
20
19
  lg: "text-md"
21
- }, P = q({
20
+ }, K = j({
22
21
  size: "sm",
23
22
  selectedKeys: [],
24
23
  selectedItems: {},
@@ -28,14 +27,14 @@ const re = {
28
27
  },
29
28
  showAvatar: !0,
30
29
  chipClassName: void 0
31
- }), se = ({
32
- items: m,
30
+ }), re = ({
31
+ items: f,
33
32
  children: b,
34
33
  size: h = "sm",
35
34
  selectedItems: l,
36
35
  onItemCleared: c,
37
36
  onItemInserted: t,
38
- shortcut: r,
37
+ shortcut: s,
39
38
  placeholder: d = "Search",
40
39
  showAvatar: p = !0,
41
40
  readOnly: g = !1,
@@ -45,38 +44,38 @@ const re = {
45
44
  className: T,
46
45
  ...n
47
46
  }) => {
48
- var A;
49
- const { contains: x } = B({ sensitivity: "base" }), u = (A = l == null ? void 0 : l.items) != null && A.length ? l.items.map((s) => s.id) : [], e = z(
50
- (s, a) => !u.includes(s.id) && x(s.label || s.supportingText || "", a),
47
+ var D;
48
+ const { contains: x } = C({ sensitivity: "base" }), u = (D = l == null ? void 0 : l.items) != null && D.length ? l.items.map((r) => r.id) : [], e = F(
49
+ (r, a) => !u.includes(r.id) && x(r.label || r.supportingText || "", a),
51
50
  [x, u]
52
- ), o = I({
53
- initialItems: m,
51
+ ), o = te({
52
+ initialItems: f,
54
53
  filter: e
55
- }), v = z(
56
- (s) => {
57
- const a = s.values().next().value;
54
+ }), v = F(
55
+ (r) => {
56
+ const a = r.values().next().value;
58
57
  a && (l.remove(a), c == null || c(a));
59
58
  },
60
59
  [l, c]
61
- ), S = (s) => {
62
- if (!s)
60
+ ), S = (r) => {
61
+ if (!r)
63
62
  return;
64
- const a = o.getItem(s);
65
- a && (u.includes(s) || (l.append(a), t == null || t(s)), o.setFilterText(""));
66
- }, y = (s) => {
67
- g || o.setFilterText(s);
68
- }, f = L(null), [K, F] = E(""), $ = z(() => {
63
+ const a = o.getItem(r);
64
+ a && (u.includes(r) || (l.append(a), t == null || t(r)), o.setFilterText(""));
65
+ }, y = (r) => {
66
+ g || o.setFilterText(r);
67
+ }, m = E(null), [_, A] = q(""), z = F(() => {
69
68
  var a;
70
- if (!f.current) return;
71
- let s = (a = f.current) == null ? void 0 : a.getBoundingClientRect();
72
- F(s.width + "px");
73
- }, [f, F]);
74
- return M({
75
- ref: f,
76
- onResize: $,
69
+ if (!m.current) return;
70
+ let r = (a = m.current) == null ? void 0 : a.getBoundingClientRect();
71
+ A(r.width + "px");
72
+ }, [m, A]);
73
+ return ee({
74
+ ref: m,
75
+ onResize: z,
77
76
  box: "border-box"
78
77
  }), /* @__PURE__ */ i(
79
- P.Provider,
78
+ K.Provider,
80
79
  {
81
80
  value: {
82
81
  size: h,
@@ -88,7 +87,7 @@ const re = {
88
87
  chipClassName: k
89
88
  },
90
89
  children: /* @__PURE__ */ i(
91
- j,
90
+ W,
92
91
  {
93
92
  allowsEmptyCollection: !0,
94
93
  allowsCustomValue: !1,
@@ -99,31 +98,31 @@ const re = {
99
98
  selectedKey: null,
100
99
  onSelectionChange: S,
101
100
  ...n,
102
- children: (s) => {
101
+ children: (r) => {
103
102
  var a;
104
103
  return /* @__PURE__ */ N("div", { className: "flex flex-col gap-1.5", children: [
105
- n.label && /* @__PURE__ */ i(X, { isRequired: s.isRequired, tooltip: n.tooltip, children: n.label }),
104
+ n.label && /* @__PURE__ */ i(Q, { isRequired: r.isRequired, tooltip: n.tooltip, children: n.label }),
106
105
  /* @__PURE__ */ i(
107
106
  ae,
108
107
  {
109
108
  size: h,
110
- shortcut: r,
111
- ref: f,
109
+ shortcut: s,
110
+ ref: m,
112
111
  placeholder: d,
113
112
  readOnly: g,
114
- onFocus: $,
115
- onPointerEnter: $
113
+ onFocus: z,
114
+ onPointerEnter: z
116
115
  }
117
116
  ),
118
117
  ((a = o.items) == null ? void 0 : a.length) > 0 && /* @__PURE__ */ i(
119
- J,
118
+ Y,
120
119
  {
121
120
  size: "md",
122
- triggerRef: f,
123
- style: { width: K },
121
+ triggerRef: m,
122
+ style: { width: _ },
124
123
  className: n == null ? void 0 : n.popoverClassName,
125
124
  children: /* @__PURE__ */ i(
126
- C,
125
+ G,
127
126
  {
128
127
  selectionMode: "multiple",
129
128
  className: "size-full outline-hidden",
@@ -132,7 +131,7 @@ const re = {
132
131
  )
133
132
  }
134
133
  ),
135
- n.hint && /* @__PURE__ */ i(U, { isInvalid: s.isInvalid, children: n.hint })
134
+ n.hint && /* @__PURE__ */ i(O, { isInvalid: r.isInvalid, children: n.hint })
136
135
  ] });
137
136
  }
138
137
  }
@@ -140,14 +139,14 @@ const re = {
140
139
  }
141
140
  );
142
141
  }, ie = ({
143
- isDisabled: m,
142
+ isDisabled: f,
144
143
  shortcut: b,
145
144
  shortcutClassName: h,
146
145
  placeholder: l,
147
146
  readOnly: c = !1
148
147
  }) => {
149
148
  var T, n, x, u;
150
- const t = te(), r = D(P), d = D(W), p = (e) => {
149
+ const t = $(), s = P(K), d = P(U), p = (e) => {
151
150
  if (!(!(e.currentTarget.selectionStart === 0 && e.currentTarget.selectionEnd === 0) && e.currentTarget.value !== ""))
152
151
  switch (e.key) {
153
152
  case "Backspace":
@@ -161,16 +160,16 @@ const re = {
161
160
  }, g = (e) => {
162
161
  d && !d.isOpen && d.open();
163
162
  }, k = (e, o) => {
164
- var S, y, f;
163
+ var S, y, m;
165
164
  if (e.key === "Tab")
166
165
  return;
167
166
  e.preventDefault();
168
- const v = ((f = (y = (S = r == null ? void 0 : r.selectedItems) == null ? void 0 : S.items) == null ? void 0 : y[0]) == null ? void 0 : f.id) === o;
167
+ const v = ((m = (y = (S = s == null ? void 0 : s.selectedItems) == null ? void 0 : S.items) == null ? void 0 : y[0]) == null ? void 0 : m.id) === o;
169
168
  switch (e.key) {
170
169
  case " ":
171
170
  case "Enter":
172
171
  case "Backspace":
173
- v ? t == null || t.focusNext({ wrap: !1, tabbable: !1 }) : t == null || t.focusPrevious({ wrap: !1, tabbable: !1 }), r.onRemove(/* @__PURE__ */ new Set([o]));
172
+ v ? t == null || t.focusNext({ wrap: !1, tabbable: !1 }) : t == null || t.focusPrevious({ wrap: !1, tabbable: !1 }), s.onRemove(/* @__PURE__ */ new Set([o]));
174
173
  break;
175
174
  case "ArrowLeft":
176
175
  t == null || t.focusPrevious({ wrap: !1, tabbable: !1 });
@@ -182,18 +181,18 @@ const re = {
182
181
  d == null || d.close();
183
182
  break;
184
183
  }
185
- }, R = ((n = (T = r == null ? void 0 : r.selectedItems) == null ? void 0 : T.items) == null ? void 0 : n.length) === 0;
184
+ }, R = ((n = (T = s == null ? void 0 : s.selectedItems) == null ? void 0 : T.items) == null ? void 0 : n.length) === 0;
186
185
  return /* @__PURE__ */ N("div", { className: "relative flex w-full flex-1 flex-row flex-wrap items-center justify-start gap-1.5", children: [
187
- !R && ((u = (x = r == null ? void 0 : r.selectedItems) == null ? void 0 : x.items) == null ? void 0 : u.map((e) => /* @__PURE__ */ N(
186
+ !R && ((u = (x = s == null ? void 0 : s.selectedItems) == null ? void 0 : x.items) == null ? void 0 : u.map((e) => /* @__PURE__ */ N(
188
187
  "span",
189
188
  {
190
189
  className: w(
191
190
  "flex items-center rounded-md bg-primary py-0.5 pr-1 pl-1.25 ring-1 ring-[var(--color-gray-100)] ring-inset",
192
- r == null ? void 0 : r.chipClassName
191
+ s == null ? void 0 : s.chipClassName
193
192
  ),
194
193
  children: [
195
- (r == null ? void 0 : r.showAvatar) && /* @__PURE__ */ i(
196
- H,
194
+ (s == null ? void 0 : s.showAvatar) && /* @__PURE__ */ i(
195
+ J,
197
196
  {
198
197
  size: "sm",
199
198
  alt: e == null ? void 0 : e.label,
@@ -203,13 +202,13 @@ const re = {
203
202
  ),
204
203
  /* @__PURE__ */ i("p", { className: "ml-1.25 truncate text-sm font-medium whitespace-nowrap text-secondary select-none", children: e == null ? void 0 : e.label }),
205
204
  /* @__PURE__ */ i(
206
- Q,
205
+ M,
207
206
  {
208
207
  size: "md",
209
- isDisabled: m,
208
+ isDisabled: f,
210
209
  className: "ml-0.75",
211
210
  onKeyDown: (o) => k(o, e.id),
212
- onPress: () => r.onRemove(/* @__PURE__ */ new Set([e.id]))
211
+ onPress: () => s.onRemove(/* @__PURE__ */ new Set([e.id]))
213
212
  }
214
213
  )
215
214
  ]
@@ -226,7 +225,7 @@ const re = {
226
225
  ),
227
226
  children: [
228
227
  /* @__PURE__ */ i(
229
- G,
228
+ X,
230
229
  {
231
230
  placeholder: l,
232
231
  onKeyDown: p,
@@ -235,7 +234,7 @@ const re = {
235
234
  className: w(
236
235
  "w-full flex-[1_0_0] appearance-none bg-transparent text-ellipsis text-primary caret-alpha-black/90 outline-none placeholder:text-placeholder_subtle focus:outline-hidden disabled:cursor-not-allowed disabled:text-disabled disabled:placeholder:text-disabled",
237
236
  c && "cursor-default",
238
- re[(r == null ? void 0 : r.size) || "sm"]
237
+ se[(s == null ? void 0 : s.size) || "sm"]
239
238
  )
240
239
  }
241
240
  ),
@@ -252,9 +251,9 @@ const re = {
252
251
  {
253
252
  className: w(
254
253
  "pointer-events-none rounded px-1 py-px text-xs font-medium text-quaternary ring-1 ring-secondary select-none ring-inset",
255
- m && "bg-transparent text-disabled"
254
+ f && "bg-transparent text-disabled"
256
255
  ),
257
- children: Z(["meta"], "K")
256
+ children: I(["meta"], "K")
258
257
  }
259
258
  )
260
259
  }
@@ -264,32 +263,32 @@ const re = {
264
263
  )
265
264
  ] });
266
265
  }, ae = ({
267
- size: m,
266
+ size: f,
268
267
  shortcut: b,
269
268
  placeholder: h,
270
269
  shortcutClassName: l,
271
270
  placeholderIcon: c = null,
272
271
  readOnly: t = !1,
273
272
  // Omit this prop to avoid invalid HTML attribute warning
274
- isDisabled: r,
273
+ isDisabled: s,
275
274
  ...d
276
275
  }) => /* @__PURE__ */ i(
277
- V,
276
+ H,
278
277
  {
279
278
  ...d,
280
279
  className: ({ isFocusWithin: p, isDisabled: g }) => w(
281
280
  "relative flex w-full items-center gap-2 rounded-lg bg-primary shadow-xs ring-1 ring-[var(--color-border-secondary)] outline-hidden transition duration-100 ease-linear ring-inset",
282
281
  g && "cursor-not-allowed bg-disabled_subtle",
283
282
  p && "ring-2 ring-brand",
284
- O[m].root
283
+ Z[f].root
285
284
  ),
286
- children: ({ isDisabled: p }) => /* @__PURE__ */ N(_, { children: [
285
+ children: ({ isDisabled: p }) => /* @__PURE__ */ N(L, { children: [
287
286
  c && /* @__PURE__ */ i(c, { className: "pointer-events-none size-5 text-fg-quaternary" }),
288
- /* @__PURE__ */ i(ee, { contain: !1, autoFocus: !1, restoreFocus: !1, children: /* @__PURE__ */ i(
287
+ /* @__PURE__ */ i(V, { contain: !1, autoFocus: !1, restoreFocus: !1, children: /* @__PURE__ */ i(
289
288
  ie,
290
289
  {
291
290
  isDisabled: p,
292
- size: m,
291
+ size: f,
293
292
  shortcut: b,
294
293
  shortcutClassName: l,
295
294
  placeholder: h,
@@ -298,10 +297,10 @@ const re = {
298
297
  ) })
299
298
  ] })
300
299
  }
301
- ), le = se;
302
- le.Item = Y;
300
+ ), le = re;
301
+ le.Item = B;
303
302
  export {
304
303
  le as MultiSelect,
305
- se as MultiSelectBase,
304
+ re as MultiSelectBase,
306
305
  ae as MultiSelectTagsValue
307
306
  };
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { SelectProps as AriaSelectProps } from 'react-aria-components';
3
- import { SelectItemType } from './select';
3
+ import { SelectItemType } from './select-shared';
4
4
  export interface SearchableSelectProps extends Omit<AriaSelectProps<SelectItemType>, "children" | "items" | "onSelectionChange"> {
5
5
  /** Items to display (should be filtered externally by parent) */
6
6
  items: SelectItemType[];
@@ -1 +1 @@
1
- {"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/searchable-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAY5E,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAsBhF,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,eAAe,CAAC,cAAc,CAAC,EAC/B,UAAU,GAAG,OAAO,GAAG,mBAAmB,CAC3C;IACC,iEAAiE;IACjE,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,oEAAoE;IACpE,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,eAAe,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;IACjC,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,2GAA2G;IAC3G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAkHD,eAAO,MAAM,gBAAgB,GAAI,8NAkB9B,qBAAqB,4CAkKvB,CAAC"}
1
+ {"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/searchable-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAY5E,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAsBzB,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,eAAe,CAAC,cAAc,CAAC,EAC/B,UAAU,GAAG,OAAO,GAAG,mBAAmB,CAC3C;IACC,iEAAiE;IACjE,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,oEAAoE;IACpE,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,eAAe,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;IACjC,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,2GAA2G;IAC3G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAkHD,eAAO,MAAM,gBAAgB,GAAI,8NAkB9B,qBAAqB,4CAkKvB,CAAC"}
@@ -7,7 +7,7 @@ import { HintText as G } from "../input/hint-text.js";
7
7
  import { Label as J } from "../input/label.js";
8
8
  import { Popover as Q } from "./popover.js";
9
9
  import { SelectItem as W } from "./select-item.js";
10
- import { SelectContext as X, fontSizes as S, sizes as Y } from "./select.js";
10
+ import { SelectContext as X, fontSizes as S, sizes as Y } from "./select-shared.js";
11
11
  import { cx as s } from "../../utils/cn.js";
12
12
  import { isReactComponent as Z } from "../../utils/is-react-component.js";
13
13
  import $ from "./SearchInput.js";
@@ -1,5 +1,5 @@
1
1
  import { ListBoxItemProps as AriaListBoxItemProps } from 'react-aria-components';
2
- import { SelectItemType } from './select';
2
+ import { SelectItemType } from './select-shared';
3
3
  export interface SelectItemProps extends Omit<AriaListBoxItemProps<SelectItemType>, "id">, SelectItemType {
4
4
  textStyles?: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"select-item.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/select-item.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAMtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAW/C,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,GAAI,oHAYxB,eAAe,4CAqIjB,CAAC"}
1
+ {"version":3,"file":"select-item.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/select-item.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAMtF,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAUhF,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,GAAI,oHAYxB,eAAe,4CAqIjB,CAAC"}
@@ -3,7 +3,7 @@ import { useContext as k, isValidElement as N } from "react";
3
3
  import { Check as R } from "@untitledui/icons";
4
4
  import { ListBoxItem as V, Text as w } from "react-aria-components";
5
5
  import { Avatar as j } from "../avatar/avatar.js";
6
- import { SelectContext as q, fontSizes as C } from "./select.js";
6
+ import { SelectContext as q, fontSizes as C } from "./select-shared.js";
7
7
  import { cx as l } from "../../utils/cn.js";
8
8
  import { isReactComponent as A } from "../../utils/is-react-component.js";
9
9
  const B = {
@@ -0,0 +1,48 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Key } from 'react-aria-components';
3
+ export type SelectItemType = {
4
+ id: string;
5
+ label?: string;
6
+ avatarUrl?: string;
7
+ initials?: string;
8
+ isDisabled?: boolean;
9
+ supportingText?: string;
10
+ icon?: FC | ReactNode;
11
+ };
12
+ export interface CommonProps {
13
+ hint?: string;
14
+ label?: string;
15
+ tooltip?: string;
16
+ size: "sm" | "md" | "lg";
17
+ placeholder?: string;
18
+ }
19
+ export declare const sizes: {
20
+ xs: {
21
+ root: string;
22
+ shortcut: string;
23
+ };
24
+ sm: {
25
+ root: string;
26
+ shortcut: string;
27
+ };
28
+ md: {
29
+ root: string;
30
+ shortcut: string;
31
+ };
32
+ lg: {
33
+ root: string;
34
+ shortcut: string;
35
+ };
36
+ };
37
+ export declare const fontSizes: {
38
+ sm: string;
39
+ md: string;
40
+ lg: string;
41
+ };
42
+ export declare const SelectContext: import('react').Context<{
43
+ size: "sm" | "md" | "lg";
44
+ isDeselectable?: boolean;
45
+ selectedKey?: Key | null;
46
+ onReselectCurrent?: () => void;
47
+ }>;
48
+ //# sourceMappingURL=select-shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-shared.d.ts","sourceRoot":"","sources":["../../../src/primitives/select/select-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAMjD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;CAOjB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,eAAO,MAAM,aAAa;UAClB,IAAI,GAAG,IAAI,GAAG,IAAI;qBACP,OAAO;kBACV,GAAG,GAAG,IAAI;wBACJ,MAAM,IAAI;EACd,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { createContext as t } from "react";
2
+ const s = {
3
+ // xs exists because platform-ui's search fields use it. Select itself does not
4
+ // offer it yet; the map is shared with SearchInput, which does.
5
+ xs: { root: "py-1 px-2 h-7", shortcut: "pr-1.5" },
6
+ sm: { root: "py-1.5 px-2 h-8", shortcut: "pr-2" },
7
+ md: { root: "py-1.5 px-3 h-9", shortcut: "pr-2.5" },
8
+ lg: { root: "py-2.5 px-3.5 h-11", shortcut: "pr-3" }
9
+ }, r = {
10
+ sm: "text-xs",
11
+ md: "text-sm",
12
+ lg: "text-md"
13
+ }, p = t({ size: "sm" });
14
+ export {
15
+ p as SelectContext,
16
+ r as fontSizes,
17
+ s as sizes
18
+ };