@lablup/ui-common 0.2.0-alpha.17 → 0.2.0-alpha.19

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 (173) hide show
  1. package/README.md +3 -2
  2. package/astryx/components/Board.doc.mjs +122 -0
  3. package/astryx/components/Board.tsx +3 -0
  4. package/astryx/components/Form.doc.mjs +1 -1
  5. package/astryx/docs/ui-common.doc.mjs +1 -1
  6. package/dist/assets/components/Board/Board.css +2 -0
  7. package/dist/assets/components/Form/FormItemVisual.css +1 -1
  8. package/dist/astryx/DateInput/tokens.stylex.d.ts +1 -0
  9. package/dist/astryx/DateInput/tokens.stylex.js +1 -0
  10. package/dist/astryx/Icon/IconSize.stylex.d.ts +1 -0
  11. package/dist/astryx/Icon/IconSize.stylex.js +1 -0
  12. package/dist/astryx/Indicator/indicator.markers.stylex.d.ts +1 -0
  13. package/dist/astryx/Indicator/indicator.markers.stylex.js +1 -0
  14. package/dist/astryx/Layer/layerAnimations.stylex.d.ts +1 -0
  15. package/dist/astryx/Layer/layerAnimations.stylex.js +1 -0
  16. package/dist/astryx/Layer/layerTextReset.stylex.d.ts +1 -0
  17. package/dist/astryx/Layer/layerTextReset.stylex.js +1 -0
  18. package/dist/astryx/Layer/layerViewportInset.stylex.d.ts +1 -0
  19. package/dist/astryx/Layer/layerViewportInset.stylex.js +1 -0
  20. package/dist/astryx/Layout/container.stylex.d.ts +1 -0
  21. package/dist/astryx/Layout/container.stylex.js +1 -0
  22. package/dist/astryx/Layout/edgeCompensation.stylex.d.ts +1 -0
  23. package/dist/astryx/Layout/edgeCompensation.stylex.js +1 -0
  24. package/dist/astryx/Layout/padding.stylex.d.ts +1 -0
  25. package/dist/astryx/Layout/padding.stylex.js +1 -0
  26. package/dist/astryx/Markdown/plugin-renderer.d.ts +1 -0
  27. package/dist/astryx/Markdown/plugin-renderer.js +1 -0
  28. package/dist/astryx/NavItem/navItemStyles.stylex.d.ts +1 -0
  29. package/dist/astryx/NavItem/navItemStyles.stylex.js +1 -0
  30. package/dist/astryx/Selector/selectorPresentation.stylex.d.ts +1 -0
  31. package/dist/astryx/Selector/selectorPresentation.stylex.js +1 -0
  32. package/dist/astryx/Stack/stack.stylex.d.ts +1 -0
  33. package/dist/astryx/Stack/stack.stylex.js +1 -0
  34. package/dist/astryx/Stack/stackItem.stylex.d.ts +1 -0
  35. package/dist/astryx/Stack/stackItem.stylex.js +1 -0
  36. package/dist/astryx/Text/text.stylex.d.ts +1 -0
  37. package/dist/astryx/Text/text.stylex.js +1 -0
  38. package/dist/astryx/theme/dataTokens.stylex.d.ts +1 -0
  39. package/dist/astryx/theme/dataTokens.stylex.js +1 -0
  40. package/dist/astryx/theme/neutral/fonts.css +3 -0
  41. package/dist/astryx/utils/focusOutline.stylex.d.ts +1 -0
  42. package/dist/astryx/utils/focusOutline.stylex.js +1 -0
  43. package/dist/astryx/utils/interactionOverlay.stylex.d.ts +1 -0
  44. package/dist/astryx/utils/interactionOverlay.stylex.js +1 -0
  45. package/dist/components/Board/Board.d.ts +102 -0
  46. package/dist/components/Board/Board.messages.d.ts +62 -0
  47. package/dist/components/Board/Board.messages.js +68 -0
  48. package/dist/components/Board/Board.messages.js.map +1 -0
  49. package/dist/components/Board/Board2.js +607 -0
  50. package/dist/components/Board/Board2.js.map +1 -0
  51. package/dist/components/Board/engine.d.ts +60 -0
  52. package/dist/components/Board/engine.js +397 -0
  53. package/dist/components/Board/engine.js.map +1 -0
  54. package/dist/components/Board/index.d.ts +4 -0
  55. package/dist/components/Board/index.js +3 -0
  56. package/dist/components/Board/layout.d.ts +81 -0
  57. package/dist/components/Board/layout.js +67 -0
  58. package/dist/components/Board/layout.js.map +1 -0
  59. package/dist/components/Board/scroll.d.ts +38 -0
  60. package/dist/components/Board/scroll.js +42 -0
  61. package/dist/components/Board/scroll.js.map +1 -0
  62. package/dist/components/DataGrid/DataGrid2.js +128 -128
  63. package/dist/components/DataGrid/DataGrid2.js.map +1 -1
  64. package/dist/components/Form/FormItem.d.ts +6 -1
  65. package/dist/components/Form/FormItem.js +68 -67
  66. package/dist/components/Form/FormItem.js.map +1 -1
  67. package/dist/components/Form/FormItemVisual.d.ts +7 -0
  68. package/dist/components/Form/FormItemVisual2.js +60 -55
  69. package/dist/components/Form/FormItemVisual2.js.map +1 -1
  70. package/dist/components/NotificationStack/NotificationStack2.js +1 -0
  71. package/dist/components/NotificationStack/NotificationStack2.js.map +1 -1
  72. package/dist/components/PageHeader/PageHeader2.js +4 -4
  73. package/dist/components/PagedSelector/PagedSelector.d.ts +1 -1
  74. package/dist/components/PagedSelector/PagedSelector2.js +37 -37
  75. package/dist/components/PagedSelector/PagedSelector2.js.map +1 -1
  76. package/dist/components/SelectionLabel/SelectionLabel.js +4 -4
  77. package/dist/forks/ComplexSelector/ComplexSelector.d.ts +82 -6
  78. package/dist/forks/ComplexSelector/ComplexSelector.js +170 -114
  79. package/dist/forks/ComplexSelector/ComplexSelector.js.map +1 -1
  80. package/dist/forks/ComplexSelector/ComplexSelector.styles.d.ts +40 -0
  81. package/dist/forks/ComplexSelector/ComplexSelector.styles.js +46 -6
  82. package/dist/forks/ComplexSelector/ComplexSelector.styles.js.map +1 -1
  83. package/dist/forks/ComplexSelector/index.d.ts +1 -1
  84. package/dist/forks/Drawer/Drawer.d.ts +21 -3
  85. package/dist/forks/Drawer/Drawer.js +70 -65
  86. package/dist/forks/Drawer/Drawer.js.map +1 -1
  87. package/dist/forks/Drawer/Drawer.styles.d.ts +16 -0
  88. package/dist/forks/Drawer/Drawer.styles.js +16 -0
  89. package/dist/forks/Drawer/Drawer.styles.js.map +1 -1
  90. package/dist/forks/Drawer/useDrawerDialogPresence.js.map +1 -1
  91. package/dist/forks/Tour/Tour.js +38 -40
  92. package/dist/forks/Tour/Tour.js.map +1 -1
  93. package/dist/forks/Tour/TourContext.js.map +1 -1
  94. package/dist/forks/Tour/TourStep.js.map +1 -1
  95. package/dist/forks/Tour/TourStep.styles.js.map +1 -1
  96. package/dist/forks/Tour/useTour.js.map +1 -1
  97. package/dist/i18n/catalog.js +27 -25
  98. package/dist/i18n/catalog.js.map +1 -1
  99. package/dist/i18n/locales/de-DE.js +60 -0
  100. package/dist/i18n/locales/de-DE.js.map +1 -1
  101. package/dist/i18n/locales/el-GR.js +60 -0
  102. package/dist/i18n/locales/el-GR.js.map +1 -1
  103. package/dist/i18n/locales/es-ES.js +60 -0
  104. package/dist/i18n/locales/es-ES.js.map +1 -1
  105. package/dist/i18n/locales/fi-FI.js +60 -0
  106. package/dist/i18n/locales/fi-FI.js.map +1 -1
  107. package/dist/i18n/locales/fr-FR.js +60 -0
  108. package/dist/i18n/locales/fr-FR.js.map +1 -1
  109. package/dist/i18n/locales/id-ID.js +60 -0
  110. package/dist/i18n/locales/id-ID.js.map +1 -1
  111. package/dist/i18n/locales/it-IT.js +60 -0
  112. package/dist/i18n/locales/it-IT.js.map +1 -1
  113. package/dist/i18n/locales/ja-JP.js +60 -0
  114. package/dist/i18n/locales/ja-JP.js.map +1 -1
  115. package/dist/i18n/locales/ko-KR.js +60 -0
  116. package/dist/i18n/locales/ko-KR.js.map +1 -1
  117. package/dist/i18n/locales/mn-MN.js +60 -0
  118. package/dist/i18n/locales/mn-MN.js.map +1 -1
  119. package/dist/i18n/locales/ms-MY.js +60 -0
  120. package/dist/i18n/locales/ms-MY.js.map +1 -1
  121. package/dist/i18n/locales/pl-PL.js +60 -0
  122. package/dist/i18n/locales/pl-PL.js.map +1 -1
  123. package/dist/i18n/locales/pt-BR.js +60 -0
  124. package/dist/i18n/locales/pt-BR.js.map +1 -1
  125. package/dist/i18n/locales/pt-PT.js +60 -0
  126. package/dist/i18n/locales/pt-PT.js.map +1 -1
  127. package/dist/i18n/locales/ru-RU.js +60 -0
  128. package/dist/i18n/locales/ru-RU.js.map +1 -1
  129. package/dist/i18n/locales/th-TH.js +60 -0
  130. package/dist/i18n/locales/th-TH.js.map +1 -1
  131. package/dist/i18n/locales/tr-TR.js +60 -0
  132. package/dist/i18n/locales/tr-TR.js.map +1 -1
  133. package/dist/i18n/locales/vi-VN.js +60 -0
  134. package/dist/i18n/locales/vi-VN.js.map +1 -1
  135. package/dist/i18n/locales/zh-CN.js +60 -0
  136. package/dist/i18n/locales/zh-CN.js.map +1 -1
  137. package/dist/i18n/locales/zh-TW.js +60 -0
  138. package/dist/i18n/locales/zh-TW.js.map +1 -1
  139. package/dist/index.d.ts +7 -5
  140. package/dist/index.js +61 -59
  141. package/dist/instance.js +2 -2
  142. package/dist/locales/en.generated.js +34 -0
  143. package/dist/locales/en.json +136 -0
  144. package/dist/locales/pseudo.generated.js +34 -0
  145. package/dist/locales/pseudo.json +102 -0
  146. package/dist/theme/lablup/built/lablup.d.ts +3 -3
  147. package/dist/theme/lablup/built/lablup.js +24 -5
  148. package/dist/theme/lablup/built/lablup.variants.d.ts +2 -2
  149. package/dist/theme/lablup/built/theme.css +70 -63
  150. package/dist/theme/lablup/built/theme.css.d.ts +9 -0
  151. package/dist/ui-common-locales/de-DE.json +60 -0
  152. package/dist/ui-common-locales/el-GR.json +60 -0
  153. package/dist/ui-common-locales/en.json +60 -0
  154. package/dist/ui-common-locales/es-ES.json +60 -0
  155. package/dist/ui-common-locales/fi-FI.json +60 -0
  156. package/dist/ui-common-locales/fr-FR.json +60 -0
  157. package/dist/ui-common-locales/id-ID.json +60 -0
  158. package/dist/ui-common-locales/it-IT.json +60 -0
  159. package/dist/ui-common-locales/ja-JP.json +60 -0
  160. package/dist/ui-common-locales/ko-KR.json +60 -0
  161. package/dist/ui-common-locales/mn-MN.json +60 -0
  162. package/dist/ui-common-locales/ms-MY.json +60 -0
  163. package/dist/ui-common-locales/pl-PL.json +60 -0
  164. package/dist/ui-common-locales/pt-BR.json +60 -0
  165. package/dist/ui-common-locales/pt-PT.json +60 -0
  166. package/dist/ui-common-locales/ru-RU.json +60 -0
  167. package/dist/ui-common-locales/th-TH.json +60 -0
  168. package/dist/ui-common-locales/tr-TR.json +60 -0
  169. package/dist/ui-common-locales/vi-VN.json +60 -0
  170. package/dist/ui-common-locales/zh-CN.json +60 -0
  171. package/dist/ui-common-locales/zh-TW.json +60 -0
  172. package/exports.customs.json +1 -0
  173. package/package.json +86 -6
@@ -1,157 +1,213 @@
1
1
  "use client";
2
2
  import { compiledStyles as e } from "../compiled.js";
3
3
  import { interactionOverlayStyles as t, styles as n } from "./ComplexSelector.styles.js";
4
- import { use as r, useCallback as i, useId as a, useImperativeHandle as ee, useOptimistic as o, useRef as s, useTransition as c } from "react";
5
- import { useTranslator as te } from "@astryxdesign/core/i18n";
6
- import { layerAnimations as ne } from "@astryxdesign/core/Layer";
7
- import { composeEventHandlers as re, focusOutlineStyles as ie, isRenderable as ae, mergeProps as oe, themeProps as l } from "@astryxdesign/core/utils";
8
- import { Fragment as se, jsx as u, jsxs as d } from "react/jsx-runtime";
9
- import { Icon as f, renderIconSlot as p } from "@astryxdesign/core/Icon";
10
- import { usePopover as m } from "@astryxdesign/core/Popover";
11
- import * as h from "@stylexjs/stylex";
12
- import { Field as g, InputClearButton as ce, inputWrapperStyles as _ } from "@astryxdesign/core/Field";
13
- import { FormLayoutContext as v } from "@astryxdesign/core/FormLayout";
14
- import { Spinner as le } from "@astryxdesign/core/Spinner";
15
- import { spacingVars as ue } from "@astryxdesign/core/theme/tokens.stylex";
4
+ import { use as r, useCallback as i, useId as a, useImperativeHandle as o, useOptimistic as s, useRef as c, useTransition as l } from "react";
5
+ import { useTranslator as u } from "@astryxdesign/core/i18n";
6
+ import { useDevWarning as d, useMergedRefs as f, usePressFeedback as p } from "@astryxdesign/core/hooks";
7
+ import { layerAnimations as ee } from "@astryxdesign/core/Layer";
8
+ import { composeEventHandlers as m, focusOutlineStyles as te, isRenderable as ne, mergeProps as re, mergeRefs as ie, themeProps as h } from "@astryxdesign/core/utils";
9
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
10
+ import { Icon as ae, renderIconSlot as oe } from "@astryxdesign/core/Icon";
11
+ import { usePopover as se } from "@astryxdesign/core/Popover";
12
+ import * as y from "@stylexjs/stylex";
13
+ import { Field as ce, InputClearButton as le, inputWrapperStyles as ue } from "@astryxdesign/core/Field";
14
+ import { FormLayoutContext as b } from "@astryxdesign/core/FormLayout";
15
+ import { useInputGroup as x } from "@astryxdesign/core/InputGroup";
16
+ import { Spinner as de } from "@astryxdesign/core/Spinner";
17
+ import { spacingVars as fe } from "@astryxdesign/core/theme/tokens.stylex";
16
18
  //#region src/forks/ComplexSelector/ComplexSelector.tsx
17
- var y = e(n), de = e(t);
18
- function fe({ isRequired: e = !1, isOptional: t = !1 }) {
19
- let { defaultOptionality: n } = r(v);
19
+ var S = e(n), pe = e(t);
20
+ function me({ isRequired: e = !1, isOptional: t = !1 }) {
21
+ let { defaultOptionality: n } = r(b);
20
22
  return !t && (e || n === "required");
21
23
  }
22
- function b({ label: e, value: t, onChange: n, changeAction: r, children: v, triggerLabel: b, placeholder: pe, isLabelHidden: me = !1, description: x, isOptional: S = !1, isRequired: C = !1, isDisabled: w = !1, isLoading: T = !1, hasClear: E = !1, onClear: D, status: O, statusVariant: k = "attached", labelTooltip: A, size: j = "md", variant: M = "input", startIcon: N, width: P, placement: F = "below", alignment: I = "start", handleRef: L, onOpenChange: R, contentXstyle: z, xstyle: he, className: ge, style: _e, "data-testid": ve, onClick: ye, ...be }) {
23
- let B = te(), xe = fe({
24
- isRequired: C,
25
- isOptional: S
26
- }), Se = pe ?? B("@astryx.selector.placeholder"), Ce = M === "ghost" && k === "attached" ? "detached" : k, V = a(), H = a(), U = a(), W = a(), G = a(), we = [x ? W : null, O?.message ? G : null].filter((e) => e != null).join(" ") || void 0, K = s(null), [Te, q] = c(), [Ee, J] = o(t), Y = T || Te, De = i(() => {
27
- R?.(!0);
28
- }, [R]), Oe = i(() => {
29
- K.current?.focus(), R?.(!1);
30
- }, [R]), X = m({
24
+ var C = "`xstyle`, `className`, and `style` are not supported on Field-composed inputs and were ignored. Style the field with `containerXstyle`/`containerClassName`/`containerStyle` and the control box with `controlXstyle`/`controlClassName`/`controlStyle`. `astryx upgrade` rewrites existing usage.", w = "`containerXstyle`/`containerClassName`/`containerStyle` have no effect here because no Field box renders (inside InputGroup or a `horizontal-labels` FormLayout). Inside InputGroup, style the InputGroup.";
25
+ function he(e, t, n) {
26
+ let i = x(), { direction: a } = r(b), o = i == null && a !== "horizontal-labels", s = t, c = s.xstyle != null || s.className != null || s.style != null, l = t;
27
+ if (c) {
28
+ let { xstyle: e, className: t, style: n, ...r } = s;
29
+ l = r;
30
+ }
31
+ d(e, C, c);
32
+ let { containerXstyle: u, containerClassName: f, containerStyle: p } = n;
33
+ return d(e, w, (u != null || f != null || p != null) && !o), {
34
+ rest: l,
35
+ hasFieldBox: o,
36
+ container: o ? {
37
+ xstyle: u,
38
+ className: f,
39
+ style: p
40
+ } : {}
41
+ };
42
+ }
43
+ var ge = "`container*` and `control*` styling props have no effect with `renderTrigger`: no Field box or control box renders. Style the control you render instead.";
44
+ function T({ label: e, value: t, onChange: n, changeAction: r, children: b, triggerLabel: x, placeholder: C, isLabelHidden: w = !1, description: T, isOptional: E = !1, isRequired: D = !1, isDisabled: O = !1, isLoading: _e = !1, hasClear: ve = !1, onClear: k, status: A, statusVariant: j = "attached", labelTooltip: ye, size: M = "md", variant: N = "input", startIcon: be, width: xe, placement: P = "below", alignment: Se = "start", handleRef: Ce, renderTrigger: F, onOpenChange: I, contentXstyle: we, containerXstyle: L, containerClassName: R, containerStyle: z, controlXstyle: B, controlClassName: V, controlStyle: H, ref: U, id: Te, onClick: W, onKeyDown: G, "aria-describedby": K, ...Ee }) {
45
+ let { rest: De, container: Oe } = he("ComplexSelector", Ee, {
46
+ containerXstyle: L,
47
+ containerClassName: R,
48
+ containerStyle: z
49
+ });
50
+ d("ComplexSelector", ge, F != null && (L != null || R != null || z != null || B != null || V != null || H != null));
51
+ let ke = u(), Ae = p(), je = me({
52
+ isRequired: D,
53
+ isOptional: E
54
+ }), Me = C ?? ke("@astryx.selector.placeholder"), Ne = N === "ghost" && j === "attached" ? "detached" : j, Pe = a(), q = Te ?? Pe, Fe = a(), J = a(), Ie = a(), Le = a(), Re = [T ? Ie : null, A?.message ? Le : null].filter((e) => e != null).join(" ") || void 0, Y = c(null), ze = f(Y, U), [Be, X] = l(), [Ve, He] = s(t), Z = _e || Be, Ue = i(() => {
55
+ I?.(!0);
56
+ }, [I]), We = i(() => {
57
+ Y.current?.focus(), I?.(!1);
58
+ }, [I]), Q = se({
31
59
  dialogLabel: e,
32
60
  hasCloseButton: !1,
33
61
  hasAutoFocus: !0,
34
62
  surfaceTarget: "complex-selector-popup",
35
- onShow: De,
36
- onHide: Oe
37
- }), Z = X.isOpen, Q = i(() => {
38
- w || (X.isOpen ? X.hide() : X.show());
39
- }, [w, X]), ke = i(() => {
40
- X.hide();
41
- }, [X]);
42
- ee(L, () => ({
63
+ onShow: Ue,
64
+ onHide: We
65
+ }), $ = Q.isOpen, Ge = i(() => {
66
+ O || (Q.isOpen ? Q.hide() : Q.show());
67
+ }, [O, Q]), Ke = i(() => {
68
+ Q.hide();
69
+ }, [Q]), qe = i((e) => {
70
+ e.key === "ArrowDown" && !$ && !O && (e.preventDefault(), Q.show());
71
+ }, [
72
+ O,
73
+ $,
74
+ Q
75
+ ]), Je = m(W, Ge), Ye = (e) => {
76
+ qe(e), G?.(e);
77
+ }, Xe = i((e) => {
78
+ Y.current?.contains(e.target) || Y.current?.click();
79
+ }, []);
80
+ o(Ce, () => ({
43
81
  open: () => {
44
- w || X.show();
82
+ O || Q.show();
45
83
  },
46
- close: () => X.hide(),
84
+ close: () => Q.hide(),
47
85
  toggle: () => {
48
- w || (X.isOpen ? X.hide() : X.show());
86
+ O || (Q.isOpen ? Q.hide() : Q.show());
49
87
  },
50
- isOpen: () => X.isOpen
51
- }), [w, X]);
52
- let Ae = i((e) => {
53
- n?.(e), r && q(async () => {
54
- J(e), await r(e);
88
+ isOpen: () => Q.isOpen
89
+ }), [O, Q]);
90
+ let Ze = i((e) => {
91
+ n?.(e), r && X(async () => {
92
+ He(e), await r(e);
55
93
  });
56
94
  }, [
57
95
  r,
58
96
  n,
59
- J,
60
- q
61
- ]), je = b ?? Se, $ = p(N, {
97
+ He,
98
+ X
99
+ ]), Qe = x ?? Me, $e = oe(be, {
62
100
  size: "sm",
63
101
  color: "secondary"
64
- }), Me = /* @__PURE__ */ u("div", {
65
- id: U,
66
- ...h.props(y.content, z),
67
- children: v(Ee, Ae, ke, {
68
- isOpen: Z,
69
- isBusy: Y,
70
- triggerId: V,
71
- contentId: U
102
+ }), et = /* @__PURE__ */ _("div", {
103
+ id: J,
104
+ ...y.props(S.content, we),
105
+ children: b(Ve, Ze, Ke, {
106
+ isOpen: $,
107
+ isBusy: Z,
108
+ triggerId: q,
109
+ contentId: J
72
110
  })
73
- }), Ne = /* @__PURE__ */ d(se, { children: [/* @__PURE__ */ d("div", {
74
- ref: X.triggerRef,
75
- "data-testid": ve,
76
- ...be,
77
- onClick: re(ye, Q),
78
- ...oe(l("complex-selector", {
79
- variant: M,
80
- size: j,
81
- status: O?.type ?? null
82
- }), h.props(_.base, y.triggerContainer, y[j], ie.focusWithin, M === "ghost" && y.triggerGhost, M === "ghost" && de.backgroundImage, w && _.disabled, M === "ghost" && w && y.triggerGhostDisabled, w && y.disabled, b == null && y.placeholder, he), ge, _e),
111
+ }), tt = Q.render(et, {
112
+ placement: P,
113
+ alignment: Se,
114
+ offset: fe["--spacing-1"],
115
+ xstyle: [S.popover, ee[P]]
116
+ });
117
+ if (F != null) {
118
+ let e = {
119
+ ...De,
120
+ "aria-describedby": K,
121
+ ref: ie((e) => {
122
+ Q.triggerRef(e), Y.current = e;
123
+ }, U),
124
+ id: q,
125
+ onClick: m(Ge, W),
126
+ onKeyDown: m(qe, G),
127
+ "aria-haspopup": "dialog",
128
+ "aria-expanded": $,
129
+ "aria-controls": J,
130
+ "aria-busy": Z || void 0
131
+ };
132
+ return /* @__PURE__ */ v(g, { children: [F(e), tt] });
133
+ }
134
+ let nt = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
135
+ ref: Q.triggerRef,
136
+ ...Ae,
137
+ onClick: Xe,
138
+ ...re(h("complex-selector", {
139
+ variant: N,
140
+ size: M,
141
+ status: A?.type ?? null
142
+ }), y.props(ue.base, S.triggerContainer, S[M], te.focusWithin, N === "ghost" && S.triggerGhost, N === "ghost" && pe.backgroundImage, O && ue.disabled, N === "ghost" && O && S.triggerGhostDisabled, O && S.disabled, x == null && S.placeholder, B), V, H),
83
143
  children: [
84
- ae($) && $,
85
- /* @__PURE__ */ u("button", {
86
- ref: K,
87
- id: V,
144
+ ne($e) && $e,
145
+ /* @__PURE__ */ _("button", {
146
+ ...De,
147
+ ref: ze,
148
+ id: q,
88
149
  type: "button",
89
150
  "aria-haspopup": "dialog",
90
- "aria-expanded": Z,
91
- "aria-controls": U,
92
- "aria-describedby": we,
93
- "aria-labelledby": H,
94
- "aria-required": xe ? "true" : void 0,
95
- "aria-invalid": O?.type === "error" ? "true" : void 0,
96
- "aria-busy": Y || void 0,
97
- disabled: w,
98
- onKeyDown: (e) => {
99
- e.key === "ArrowDown" && !Z && !w && (e.preventDefault(), X.show());
100
- },
101
- ...h.props(y.trigger),
102
- children: /* @__PURE__ */ u("span", {
103
- ...h.props(y.triggerText),
104
- children: je
151
+ "aria-expanded": $,
152
+ "aria-controls": J,
153
+ "aria-describedby": [K, Re].filter(Boolean).join(" ") || void 0,
154
+ "aria-labelledby": Fe,
155
+ "aria-required": je ? "true" : void 0,
156
+ "aria-invalid": A?.type === "error" ? "true" : void 0,
157
+ "aria-busy": Z || void 0,
158
+ disabled: O,
159
+ onClick: Je,
160
+ onKeyDown: Ye,
161
+ ...y.props(S.trigger),
162
+ children: /* @__PURE__ */ _("span", {
163
+ ...y.props(S.triggerText),
164
+ children: Qe
105
165
  })
106
166
  }),
107
- Y && /* @__PURE__ */ u(le, { size: "sm" }),
108
- E && b != null && !w && /* @__PURE__ */ u(ce, {
109
- label: B("@astryx.selector.clearLabel", { label: e }),
167
+ Z && /* @__PURE__ */ _(de, { size: "sm" }),
168
+ ve && x != null && !O && /* @__PURE__ */ _(le, {
169
+ label: ke("@astryx.selector.clearLabel", { label: e }),
110
170
  onClick: (e) => {
111
- e.stopPropagation(), D ? D() : n?.(void 0);
171
+ e.stopPropagation(), k ? k() : n?.(void 0);
112
172
  }
113
173
  }),
114
- /* @__PURE__ */ u(f, {
174
+ /* @__PURE__ */ _(ae, {
115
175
  icon: "chevronDown",
116
176
  size: "sm",
117
177
  color: "secondary",
118
178
  xstyle: [
119
- y.triggerIcon,
120
- y.triggerIconRotation,
121
- Z && y.triggerIconOpen
179
+ S.triggerIcon,
180
+ S.triggerIconRotation,
181
+ $ && S.triggerIconOpen
122
182
  ],
123
- ...l("complex-selector-indicator-icon", { state: Z ? "expanded" : "collapsed" })
183
+ ...h("complex-selector-indicator-icon", { state: $ ? "expanded" : "collapsed" })
124
184
  })
125
185
  ]
126
- }), X.render(Me, {
127
- placement: F,
128
- alignment: I,
129
- offset: ue["--spacing-1"],
130
- xstyle: [y.popover, ne[F]]
131
- })] });
132
- return /* @__PURE__ */ u(g, {
186
+ }), tt] });
187
+ return /* @__PURE__ */ _(ce, {
133
188
  label: e,
134
- isLabelHidden: me,
135
- description: x,
136
- inputID: V,
137
- descriptionID: x ? W : void 0,
138
- labelID: H,
139
- isOptional: S,
140
- isRequired: C,
141
- isDisabled: w,
142
- status: O ? {
143
- type: O.type,
144
- message: O.message,
145
- messageID: O.message ? G : void 0
189
+ isLabelHidden: w,
190
+ description: T,
191
+ inputID: q,
192
+ descriptionID: T ? Ie : void 0,
193
+ labelID: Fe,
194
+ isOptional: E,
195
+ isRequired: D,
196
+ isDisabled: O,
197
+ status: A ? {
198
+ type: A.type,
199
+ message: A.message,
200
+ messageID: A.message ? Le : void 0
146
201
  } : void 0,
147
- statusVariant: Ce,
148
- labelTooltip: A,
149
- width: P,
150
- children: Ne
202
+ statusVariant: Ne,
203
+ labelTooltip: ye,
204
+ width: xe,
205
+ ...Oe,
206
+ children: nt
151
207
  });
152
208
  }
153
- b.displayName = "ComplexSelector";
209
+ T.displayName = "ComplexSelector";
154
210
  //#endregion
155
- export { b as ComplexSelector };
211
+ export { T as ComplexSelector };
156
212
 
157
213
  //# sourceMappingURL=ComplexSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComplexSelector.js","names":[],"sources":["../../../src/forks/ComplexSelector/ComplexSelector.tsx"],"sourcesContent":["// Copyright (c) Meta Platforms, Inc. and affiliates.\n// Modifications copyright (c) Lablup Inc.\n//\n// Forked from @astryxdesign/core 0.6.5, src/ComplexSelector/ComplexSelector.tsx\n// (MIT; see NOTICE). Provenance and the drift guard: src/forks/provenance.json.\n\n\"use client\";\n\n/**\n * ComplexSelector, ui-common's copy of Astryx's, with one upstream fix\n * applied: `hasClear` / `onClear`, a clear button between the loading spinner\n * and the chevron, as `Selector`'s `hasClear` has (facebook/astryx#6362, open).\n *\n * Everything else is upstream's, line for line. Two things differ in form\n * only: the style namespaces are Astryx's compiled output (src/forks/compiled.ts),\n * and the two internals Astryx does not export are inlined —\n * `useResolvedRequired` (read through the public `FormLayoutContext`) and\n * `interactionOverlayStyles` (compiled, like the rest).\n *\n * Delete this fork, and its exports.exclude.json entry, once Astryx ships\n * the fix (CONTRIBUTING, \"Forks of Astryx components\").\n */\n\nimport React, {\n use,\n useCallback,\n useId,\n useImperativeHandle,\n useOptimistic,\n useRef,\n useTransition,\n type ReactNode,\n} from \"react\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport type { StyleXStyles } from \"@stylexjs/stylex\";\nimport type { BaseProps } from \"@astryxdesign/core/BaseProps\";\nimport {\n Field,\n InputClearButton,\n inputWrapperStyles,\n type FieldStatusVariant,\n} from \"@astryxdesign/core/Field\";\nimport { FormLayoutContext } from \"@astryxdesign/core/FormLayout\";\nimport { Icon, renderIconSlot, type IconType } from \"@astryxdesign/core/Icon\";\nimport { Spinner } from \"@astryxdesign/core/Spinner\";\nimport { useTranslator } from \"@astryxdesign/core/i18n\";\nimport {\n layerAnimations,\n type LayerAlignment,\n type LayerPlacement,\n} from \"@astryxdesign/core/Layer\";\nimport { usePopover } from \"@astryxdesign/core/Popover\";\nimport { spacingVars } from \"@astryxdesign/core/theme/tokens.stylex\";\nimport {\n composeEventHandlers,\n focusOutlineStyles,\n isRenderable,\n mergeProps,\n themeProps,\n type SizeValue,\n} from \"@astryxdesign/core/utils\";\n\nimport { compiledStyles } from \"../compiled\";\nimport * as compiled from \"./ComplexSelector.styles\";\n\n// dist/ComplexSelector/ComplexSelector.js `styles`, and\n// dist/utils/interactionOverlay.stylex.js, which core does not export.\nconst styles = compiledStyles(compiled.styles);\nconst interactionOverlayStyles = compiledStyles(compiled.interactionOverlayStyles);\n\n// @astryxdesign/core 0.6.5 src/hooks/useResolvedRequired.ts, which core does\n// not export: a field under `FormLayout defaultOptionality=\"required\"` is\n// required unless it opts out.\nfunction useResolvedRequired({\n isRequired = false,\n isOptional = false,\n}: {\n isRequired?: boolean;\n isOptional?: boolean;\n}): boolean {\n const { defaultOptionality } = use(FormLayoutContext);\n return !isOptional && (isRequired || defaultOptionality === \"required\");\n}\n\nexport type ComplexSelectorVariant = \"input\" | \"ghost\";\n\nexport type ComplexSelectorSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ComplexSelectorRenderState {\n /** Whether the selector surface is open. */\n isOpen: boolean;\n /** Whether changeAction/isLoading is pending. */\n isBusy: boolean;\n /** ID of the trigger button. */\n triggerId: string;\n /** ID of the popup content container. */\n contentId: string;\n}\n\n/**\n * Imperative control surface for ComplexSelector, accessed via the `handleRef`\n * prop. Methods drive the same popover machinery as the built-in trigger, so\n * they respect focus restoration, light dismiss, and Escape. Prefer these\n * callbacks over mirroring open state in the parent — the selector owns its\n * visibility, and imperative calls avoid the focus-management pitfalls of\n * syncing an external `isOpen` prop. Pair with `onOpenChange` to observe every\n * open and close, including the ones the selector performs itself.\n */\nexport interface ComplexSelectorHandle {\n /** Open the selector surface. No-op when disabled or already open. */\n open(): void;\n /** Close the selector surface. Restores focus to the trigger. */\n close(): void;\n /** Toggle the selector surface open or closed. */\n toggle(): void;\n /** Whether the selector surface is currently open. Reads live state. */\n isOpen(): boolean;\n}\n\nexport interface ComplexSelectorStatus {\n type: \"warning\" | \"error\" | \"success\";\n message?: string;\n}\n\nexport interface ComplexSelectorProps<Value> extends Omit<\n BaseProps<HTMLDivElement>,\n \"children\" | \"onChange\"\n> {\n /** Label text for accessibility and the field label. */\n label: string;\n /** Current controlled value. */\n value: Value;\n /** Called when custom content commits a new value. */\n onChange?: (value: Value) => void;\n /** Optional async action after onChange; drives optimistic UI. */\n changeAction?: (value: Value) => void | Promise<void>;\n /** Custom selector surface content rendered inside a dialog popover. */\n children: (\n value: Value,\n onChange: (value: Value) => void,\n close: () => void,\n state: ComplexSelectorRenderState,\n ) => ReactNode;\n /** Label/content shown in the closed trigger. */\n triggerLabel?: ReactNode;\n /** Placeholder shown when triggerLabel is omitted. */\n placeholder?: ReactNode;\n /** Whether to visually hide the field label. */\n isLabelHidden?: boolean;\n /** Helper text displayed below the label. */\n description?: string;\n /** Marks the field optional. */\n isOptional?: boolean;\n /** Marks the field required. */\n isRequired?: boolean;\n /** Disables the selector. */\n isDisabled?: boolean;\n /** Shows loading state on the trigger. */\n isLoading?: boolean;\n /**\n * Shows a clear button between the loading spinner and the chevron while\n * `triggerLabel` is set, as `Selector`'s `hasClear` does. Activating it\n * calls `onClear`, or `onChange(undefined)` when `onClear` is not given.\n */\n hasClear?: boolean;\n /** Called when the clear button is activated. */\n onClear?: () => void;\n /** Validation status. */\n status?: ComplexSelectorStatus;\n /** Status placement. */\n statusVariant?: FieldStatusVariant;\n /** Tooltip text displayed next to the label. */\n labelTooltip?: string;\n /** Trigger and field size. */\n size?: ComplexSelectorSize;\n /** Visual trigger style. Ghost matches toolbar buttons. */\n variant?: ComplexSelectorVariant;\n /** Icon displayed at the start of the trigger. */\n startIcon?: ReactNode | IconType;\n /** Width of the field. */\n width?: SizeValue;\n /** Popup placement. */\n placement?: LayerPlacement;\n /** Popup alignment along the placement axis. */\n alignment?: LayerAlignment;\n /**\n * Imperative handle for programmatic open/close control. Exposes open,\n * close, toggle, and the isOpen query. Use this instead of mirroring open\n * state in the parent — the selector owns its visibility.\n */\n handleRef?: React.Ref<ComplexSelectorHandle>;\n /**\n * Called whenever the selector surface opens or closes, however it happened\n * — the trigger, the keyboard, a light dismiss, Escape, content that calls\n * `close()`, or the imperative handle. Pair it with `handleRef` to drive the\n * surface from outside without mirroring its state.\n */\n onOpenChange?: (isOpen: boolean) => void;\n /** StyleX styles for the popup content container. */\n contentXstyle?: StyleXStyles;\n /** Test ID for the trigger container. */\n \"data-testid\"?: string;\n}\n\n/**\n * A selector shell for rich, custom selection surfaces.\n *\n * ComplexSelector owns the field, trigger, popover, focus restore, and async\n * change action flow. Consumers provide the dialog content as a render function,\n * using the supplied `value`, `onChange`, and `close` helpers to compose the\n * right accessible structure for the custom selector.\n *\n * @example\n * ```\n * <ComplexSelector\n * label=\"Fruit\"\n * value={value}\n * onChange={setValue}\n * triggerLabel={`${value.fruit} ${value.ripeness}`}>\n * {(value, onChange, close) => (\n * <FruitGrid\n * value={value}\n * onChange={nextValue => {\n * onChange(nextValue);\n * close();\n * }}\n * />\n * )}\n * </ComplexSelector>\n * ```\n */\nexport function ComplexSelector<Value>({\n label,\n value,\n onChange,\n changeAction,\n children,\n triggerLabel,\n placeholder: placeholderFromProps,\n isLabelHidden = false,\n description,\n isOptional = false,\n isRequired = false,\n isDisabled = false,\n isLoading = false,\n hasClear = false,\n onClear,\n status,\n statusVariant = \"attached\",\n labelTooltip,\n size = \"md\",\n variant = \"input\",\n startIcon,\n width,\n placement = \"below\",\n alignment = \"start\",\n handleRef,\n onOpenChange,\n contentXstyle,\n xstyle,\n className,\n style,\n \"data-testid\": testId,\n onClick: onClickProp,\n ...props\n}: ComplexSelectorProps<Value>) {\n const t = useTranslator();\n const isEffectivelyRequired = useResolvedRequired({ isRequired, isOptional });\n const placeholder = placeholderFromProps ?? t(\"@astryx.selector.placeholder\");\n const effectiveStatusVariant =\n variant === \"ghost\" && statusVariant === \"attached\" ? \"detached\" : statusVariant;\n\n const triggerId = useId();\n const labelId = useId();\n const contentId = useId();\n const descriptionId = useId();\n const statusMessageId = useId();\n const ariaDescribedBy =\n [description ? descriptionId : null, status?.message ? statusMessageId : null]\n .filter((id): id is string => id != null)\n .join(\" \") || undefined;\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n\n const [isPending, startTransition] = useTransition();\n const [optimisticValue, setOptimisticValue] = useOptimistic(value);\n const isBusy = isLoading || isPending;\n\n const handlePopoverShow = useCallback(() => {\n onOpenChange?.(true);\n }, [onOpenChange]);\n\n const handlePopoverHide = useCallback(() => {\n // Focus is restored first so a consumer that moves focus elsewhere from\n // the callback wins, instead of being overwritten a line later.\n triggerRef.current?.focus();\n onOpenChange?.(false);\n }, [onOpenChange]);\n\n const popover = usePopover({\n dialogLabel: label,\n hasCloseButton: false,\n hasAutoFocus: true,\n surfaceTarget: \"complex-selector-popup\",\n onShow: handlePopoverShow,\n onHide: handlePopoverHide,\n });\n\n const isOpen = popover.isOpen;\n\n const handleTriggerClick = useCallback(() => {\n if (isDisabled) {\n return;\n }\n if (popover.isOpen) {\n popover.hide();\n } else {\n popover.show();\n }\n }, [isDisabled, popover]);\n\n const close = useCallback(() => {\n popover.hide();\n }, [popover]);\n\n useImperativeHandle(\n handleRef,\n () => ({\n open: () => {\n if (!isDisabled) {\n popover.show();\n }\n },\n close: () => popover.hide(),\n toggle: () => {\n if (isDisabled) {\n return;\n }\n if (popover.isOpen) {\n popover.hide();\n } else {\n popover.show();\n }\n },\n isOpen: () => popover.isOpen,\n }),\n [isDisabled, popover],\n );\n\n const commitValue = useCallback(\n (nextValue: Value) => {\n onChange?.(nextValue);\n if (changeAction) {\n startTransition(async () => {\n setOptimisticValue(nextValue);\n await changeAction(nextValue);\n });\n }\n },\n [changeAction, onChange, setOptimisticValue, startTransition],\n );\n\n const triggerContent = triggerLabel ?? placeholder;\n\n const startIconSlot = renderIconSlot(startIcon, {\n size: \"sm\",\n color: \"secondary\",\n });\n\n const content = (\n <div id={contentId} {...stylex.props(styles.content, contentXstyle)}>\n {children(optimisticValue, commitValue, close, {\n isOpen,\n isBusy,\n triggerId,\n contentId,\n })}\n </div>\n );\n\n const selectorContent = (\n <>\n <div\n ref={popover.triggerRef}\n data-testid={testId}\n {...props}\n onClick={composeEventHandlers(onClickProp, handleTriggerClick)}\n {...mergeProps(\n themeProps(\"complex-selector\", {\n variant,\n size,\n status: status?.type ?? null,\n }),\n stylex.props(\n inputWrapperStyles.base,\n styles.triggerContainer,\n styles[size],\n // The ring belongs to the wrapper (the focusable `<button>` sits\n // inside it), but it must still be a KEYBOARD ring: `:focus-within`\n // matched a mouse click on the trigger and drew the outline for\n // pointer users too. `focusWithin` here is `:has(:focus-visible)`.\n focusOutlineStyles.focusWithin,\n variant === \"ghost\" && styles.triggerGhost,\n variant === \"ghost\" && interactionOverlayStyles.backgroundImage,\n isDisabled && inputWrapperStyles.disabled,\n variant === \"ghost\" && isDisabled && styles.triggerGhostDisabled,\n isDisabled && styles.disabled,\n triggerLabel == null && styles.placeholder,\n xstyle,\n ),\n className,\n style,\n )}\n >\n {isRenderable(startIconSlot) && startIconSlot}\n <button\n ref={triggerRef}\n id={triggerId}\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={isOpen}\n aria-controls={contentId}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={labelId}\n aria-required={isEffectivelyRequired ? \"true\" : undefined}\n aria-invalid={status?.type === \"error\" ? \"true\" : undefined}\n aria-busy={isBusy || undefined}\n disabled={isDisabled}\n onKeyDown={(event) => {\n if (event.key === \"ArrowDown\" && !isOpen && !isDisabled) {\n event.preventDefault();\n popover.show();\n }\n }}\n {...stylex.props(styles.trigger)}\n >\n <span {...stylex.props(styles.triggerText)}>{triggerContent}</span>\n </button>\n {isBusy && <Spinner size=\"sm\" />}\n {/* ui-common: the clear button (facebook/astryx#6362). */}\n {hasClear && triggerLabel != null && !isDisabled && (\n <InputClearButton\n label={t(\"@astryx.selector.clearLabel\", { label })}\n // The container's own click opens the popover; a clear must not.\n onClick={(event) => {\n event.stopPropagation();\n if (onClear) {\n onClear();\n } else {\n // Clearing hands back \"no value\", which `Value` may not name.\n onChange?.(undefined as Value);\n }\n }}\n />\n )}\n <Icon\n icon=\"chevronDown\"\n size=\"sm\"\n color=\"secondary\"\n // No wrapper: Icon's own span already provides the 16px box (`sm`)\n // and the secondary icon color the wrapper used to set, so the glyph\n // IS the trigger's icon element — one node carrying the box, the\n // color, the rotation, and the theme target.\n xstyle={[\n styles.triggerIcon,\n styles.triggerIconRotation,\n isOpen && styles.triggerIconOpen,\n ]}\n {...themeProps(\"complex-selector-indicator-icon\", {\n state: isOpen ? \"expanded\" : \"collapsed\",\n })}\n />\n </div>\n\n {popover.render(content, {\n placement,\n alignment,\n offset: spacingVars[\"--spacing-1\"],\n xstyle: [styles.popover, layerAnimations[placement]],\n })}\n </>\n );\n\n return (\n <Field\n label={label}\n isLabelHidden={isLabelHidden}\n description={description}\n inputID={triggerId}\n descriptionID={description ? descriptionId : undefined}\n labelID={labelId}\n isOptional={isOptional}\n isRequired={isRequired}\n isDisabled={isDisabled}\n status={\n status\n ? {\n type: status.type,\n message: status.message,\n messageID: status.message ? statusMessageId : undefined,\n }\n : undefined\n }\n statusVariant={effectiveStatusVariant}\n labelTooltip={labelTooltip}\n width={width}\n >\n {selectorContent}\n </Field>\n );\n}\n\nComplexSelector.displayName = \"ComplexSelector\";\n"],"mappings":";;;;;;;;;;;;;;;;AAmEA,IAAM,IAAS,EAAe,CAAe,GACvC,KAA2B,EAAe,CAAiC;AAKjF,SAAS,GAAoB,EAC3B,gBAAa,IACb,gBAAa,MAIH;CACV,IAAM,EAAE,0BAAuB,EAAI,CAAiB;CACpD,OAAO,CAAC,MAAe,KAAc,MAAuB;AAC9D;AAqJA,SAAgB,EAAuB,EACrC,UACA,UACA,aACA,iBACA,aACA,iBACA,aAAa,I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":3,"file":"ComplexSelector.js","names":[],"sources":["../../../src/forks/ComplexSelector/ComplexSelector.tsx"],"sourcesContent":["// Copyright (c) Meta Platforms, Inc. and affiliates.\n// Modifications copyright (c) Lablup Inc.\n//\n// Forked from @astryxdesign/core 0.7.0, src/ComplexSelector/ComplexSelector.tsx\n// (MIT; see NOTICE). Provenance and the drift guard: src/forks/provenance.json.\n\n\"use client\";\n\n/**\n * ComplexSelector, ui-common's copy of Astryx's, with one upstream fix\n * applied: `hasClear` / `onClear`, a clear button between the loading spinner\n * and the chevron, as `Selector`'s `hasClear` has (facebook/astryx#6362, open).\n *\n * Everything else is upstream's, line for line. Two things differ in form\n * only: the style namespaces are Astryx's compiled output (src/forks/compiled.ts),\n * and the two internals Astryx does not export are inlined —\n * `useResolvedRequired` (read through the public `FormLayoutContext`) and\n * `interactionOverlayStyles` (compiled, like the rest).\n *\n * Delete this fork, and its exports.exclude.json entry, once Astryx ships\n * the fix (CONTRIBUTING, \"Forks of Astryx components\").\n */\n\nimport React, {\n use,\n useCallback,\n useId,\n useImperativeHandle,\n useOptimistic,\n useRef,\n useTransition,\n type ReactNode,\n} from \"react\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport type { StyleXStyles } from \"@stylexjs/stylex\";\nimport {\n Field,\n InputClearButton,\n inputWrapperStyles,\n type FieldInputBaseProps,\n type FieldPartStyleProps,\n type FieldContainerStyleProps,\n type FieldStatusVariant,\n} from \"@astryxdesign/core/Field\";\nimport { FormLayoutContext } from \"@astryxdesign/core/FormLayout\";\nimport {\n useDevWarning,\n useMergedRefs,\n usePressFeedback,\n} from \"@astryxdesign/core/hooks\";\nimport { Icon, renderIconSlot, type IconType } from \"@astryxdesign/core/Icon\";\nimport { useInputGroup } from \"@astryxdesign/core/InputGroup\";\nimport { Spinner } from \"@astryxdesign/core/Spinner\";\nimport { useTranslator } from \"@astryxdesign/core/i18n\";\nimport {\n layerAnimations,\n type LayerAlignment,\n type LayerPlacement,\n} from \"@astryxdesign/core/Layer\";\nimport { usePopover } from \"@astryxdesign/core/Popover\";\nimport { spacingVars } from \"@astryxdesign/core/theme/tokens.stylex\";\nimport {\n composeEventHandlers,\n focusOutlineStyles,\n isRenderable,\n mergeProps,\n mergeRefs,\n themeProps,\n type SizeValue,\n} from \"@astryxdesign/core/utils\";\n\nimport { compiledStyles } from \"../compiled\";\nimport * as compiled from \"./ComplexSelector.styles\";\n\n// dist/ComplexSelector/ComplexSelector.js `styles`, and\n// dist/utils/interactionOverlay.stylex.js.\nconst styles = compiledStyles(compiled.styles);\nconst interactionOverlayStyles = compiledStyles(compiled.interactionOverlayStyles);\n\n// @astryxdesign/core 0.7.0 src/hooks/useResolvedRequired.ts, which core does\n// not export: a field under `FormLayout defaultOptionality=\"required\"` is\n// required unless it opts out.\nfunction useResolvedRequired({\n isRequired = false,\n isOptional = false,\n}: {\n isRequired?: boolean;\n isOptional?: boolean;\n}): boolean {\n const { defaultOptionality } = use(FormLayoutContext);\n return !isOptional && (isRequired || defaultOptionality === \"required\");\n}\n\nconst ROOT_STYLING_MESSAGE =\n \"`xstyle`, `className`, and `style` are not supported on Field-composed inputs and were ignored. \" +\n \"Style the field with `containerXstyle`/`containerClassName`/`containerStyle` and the control box with \" +\n \"`controlXstyle`/`controlClassName`/`controlStyle`. `astryx upgrade` rewrites existing usage.\";\n\nconst CONTAINER_WITHOUT_FIELD_MESSAGE =\n \"`containerXstyle`/`containerClassName`/`containerStyle` have no effect here because no Field box renders \" +\n \"(inside InputGroup or a `horizontal-labels` FormLayout). Inside InputGroup, style the InputGroup.\";\n\n// @astryxdesign/core 0.7.0 src/Field/fieldParts.ts `useFieldInputStyling`,\n// which core does not export.\nfunction useFieldInputStyling<R extends object>(\n component: string,\n restProps: R,\n containerProps: FieldContainerStyleProps,\n) {\n const inputGroup = useInputGroup();\n const { direction } = use(FormLayoutContext);\n const hasFieldBox = inputGroup == null && direction !== \"horizontal-labels\";\n\n const untyped = restProps as R & {\n xstyle?: unknown;\n className?: unknown;\n style?: unknown;\n };\n const hasRootStyling =\n untyped.xstyle != null || untyped.className != null || untyped.style != null;\n let rest = restProps;\n if (hasRootStyling) {\n const {\n xstyle: _xstyle,\n className: _className,\n style: _style,\n ...remaining\n } = untyped;\n rest = remaining as R;\n }\n useDevWarning(component, ROOT_STYLING_MESSAGE, hasRootStyling);\n\n const { containerXstyle, containerClassName, containerStyle } = containerProps;\n const hasContainerStyling =\n containerXstyle != null || containerClassName != null || containerStyle != null;\n useDevWarning(\n component,\n CONTAINER_WITHOUT_FIELD_MESSAGE,\n hasContainerStyling && !hasFieldBox,\n );\n\n return {\n rest,\n hasFieldBox,\n container: hasFieldBox\n ? {\n xstyle: containerXstyle,\n className: containerClassName,\n style: containerStyle,\n }\n : {},\n };\n}\n\nexport type ComplexSelectorVariant = \"input\" | \"ghost\";\n\nexport type ComplexSelectorSize = \"sm\" | \"md\" | \"lg\";\n\nconst RENDER_TRIGGER_PARTS_MESSAGE =\n \"`container*` and `control*` styling props have no effect with `renderTrigger`: \" +\n \"no Field box or control box renders. Style the control you render instead.\";\n\n/**\n * Props the `renderTrigger` render prop hands to the control the caller\n * renders.\n * Spread them onto that control: it becomes the popup's anchor, the element\n * focus returns to, and the control that announces the popup's state.\n */\nexport interface ComplexSelectorRenderTriggerProps extends Omit<\n FieldInputBaseProps,\n | keyof FieldPartStyleProps\n | \"id\"\n | \"onClick\"\n | \"onKeyDown\"\n | \"aria-haspopup\"\n | \"aria-expanded\"\n | \"aria-controls\"\n | \"aria-busy\"\n> {\n /**\n * Attaches the control as the popup's anchor and focus-return target, and\n * forwards it to the selector's own `ref`.\n */\n ref: (element: HTMLElement | null) => void;\n /** The id the field would have given its own button. */\n id: string;\n onClick: (event: React.MouseEvent<HTMLElement>) => void;\n /** ArrowDown opens the popup, as it does on the built-in button. */\n onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;\n \"aria-haspopup\": \"dialog\";\n \"aria-expanded\": boolean;\n \"aria-controls\": string;\n \"aria-busy\": boolean | undefined;\n}\n\nexport interface ComplexSelectorRenderState {\n /** Whether the selector surface is open. */\n isOpen: boolean;\n /** Whether changeAction/isLoading is pending. */\n isBusy: boolean;\n /** ID of the trigger button. */\n triggerId: string;\n /** ID of the popup content container. */\n contentId: string;\n}\n\n/**\n * Imperative control surface for ComplexSelector, accessed via the `handleRef`\n * prop. Methods drive the same popover machinery as the built-in trigger, so\n * they respect focus restoration, light dismiss, and Escape. Prefer these\n * callbacks over mirroring open state in the parent — the selector owns its\n * visibility, and imperative calls avoid the focus-management pitfalls of\n * syncing an external `isOpen` prop. Pair with `onOpenChange` to observe every\n * open and close, including the ones the selector performs itself.\n */\nexport interface ComplexSelectorHandle {\n /** Open the selector surface. No-op when disabled or already open. */\n open(): void;\n /** Close the selector surface. Restores focus to the trigger. */\n close(): void;\n /** Toggle the selector surface open or closed. */\n toggle(): void;\n /** Whether the selector surface is currently open. Reads live state. */\n isOpen(): boolean;\n}\n\nexport interface ComplexSelectorStatus {\n type: \"warning\" | \"error\" | \"success\";\n message?: string;\n}\n\nexport interface ComplexSelectorProps<Value> extends Omit<\n FieldInputBaseProps,\n \"children\" | \"onChange\"\n> {\n /** Label text for accessibility and the field label. */\n label: string;\n /**\n * Ref to the trigger: the button that opens the popup and carries the\n * accessible name — or, with `renderTrigger`, the caller's control.\n */\n ref?: React.Ref<HTMLElement>;\n /**\n * Click handler on the trigger. It runs before the popup opens; call\n * `preventDefault()` to keep the popup closed. A press elsewhere in the\n * control box goes through the trigger, so it reaches this handler too.\n * With `renderTrigger` it lands on the caller's control and runs after the\n * built-in toggle, which it cannot cancel.\n */\n onClick?: React.MouseEventHandler<HTMLElement>;\n /**\n * Key handler on the trigger. It runs after the built-in handling and\n * receives every key, including the ArrowDown that opens the popup. With\n * `renderTrigger` it lands on the caller's control, runs after the built-in\n * handling, and is skipped for keys that handling cancels.\n */\n onKeyDown?: React.KeyboardEventHandler<HTMLElement>;\n /** Current controlled value. */\n value: Value;\n /** Called when custom content commits a new value. */\n onChange?: (value: Value) => void;\n /** Optional async action after onChange; drives optimistic UI. */\n changeAction?: (value: Value) => void | Promise<void>;\n /** Custom selector surface content rendered inside a dialog popover. */\n children: (\n value: Value,\n onChange: (value: Value) => void,\n close: () => void,\n state: ComplexSelectorRenderState,\n ) => ReactNode;\n /** Label/content shown in the closed trigger. */\n triggerLabel?: ReactNode;\n /** Placeholder shown when triggerLabel is omitted. */\n placeholder?: ReactNode;\n /** Whether to visually hide the field label. */\n isLabelHidden?: boolean;\n /** Helper text displayed below the label. */\n description?: string;\n /** Marks the field optional. */\n isOptional?: boolean;\n /** Marks the field required. */\n isRequired?: boolean;\n /** Disables the selector. */\n isDisabled?: boolean;\n /** Shows loading state on the trigger. */\n isLoading?: boolean;\n /**\n * Shows a clear button between the loading spinner and the chevron while\n * `triggerLabel` is set, as `Selector`'s `hasClear` does. Activating it\n * calls `onClear`, or `onChange(undefined)` when `onClear` is not given.\n */\n hasClear?: boolean;\n /** Called when the clear button is activated. */\n onClear?: () => void;\n /** Validation status. */\n status?: ComplexSelectorStatus;\n /**\n * How the status message is placed relative to the input.\n * - 'attached': message overlaps directly below the input (bordered treatment; detached when variant is ghost)\n * - 'detached': message floats below as a separate element with spacing\n * - 'tooltip': no message box; the status icon becomes a focusable info-tip button that reveals the message on hover, keyboard focus, or tap\n * @default 'attached'\n */\n statusVariant?: FieldStatusVariant;\n /** Tooltip text displayed next to the label. */\n labelTooltip?: string;\n /** Trigger and field size. */\n size?: ComplexSelectorSize;\n /** Visual trigger style. Ghost matches toolbar buttons. */\n variant?: ComplexSelectorVariant;\n /** Icon displayed at the start of the trigger. */\n startIcon?: ReactNode | IconType;\n /** Width of the field. */\n width?: SizeValue;\n /** Popup placement. */\n placement?: LayerPlacement;\n /** Popup alignment along the placement axis. */\n alignment?: LayerAlignment;\n /**\n * Imperative handle for programmatic open/close control. Exposes open,\n * close, toggle, and the isOpen query. Use this instead of mirroring open\n * state in the parent — the selector owns its visibility.\n */\n handleRef?: React.Ref<ComplexSelectorHandle>;\n /**\n * Render the control the popup hangs off — a glyph in a list row, a chip,\n * an icon button — instead of the selector's own field and button. Spread\n * the given props onto it; the popup is then anchored to that control and\n * still labelled by `label`. The field chrome (`Field`, status, spinner,\n * chevron) is not rendered; the caller owns the opener. Pair with\n * `handleRef` to open the popup from a keystroke elsewhere.\n *\n * Hover and pressed paint stay yours. The open state reaches your control\n * as `aria-expanded` on the given props, so style it from the rendered\n * attribute. A pressed look keyed to `:active` is not a substitute:\n * `:active` does not behave the same under a coarse pointer, which is why\n * menu rows drop coarse-pointer `:active` paint entirely.\n *\n * @example\n * ```\n * <ComplexSelector\n * label=\"Assignee\"\n * renderTrigger={props => <IconButton icon=\"user\" label=\"Assign\" {...props} />}\n * />\n * ```\n *\n * @example\n * ```\n * // Styling the open state from the rendered attribute:\n * // .my-trigger[aria-expanded='true'] { background: var(--color-overlay-pressed); }\n * ```\n */\n renderTrigger?: (props: ComplexSelectorRenderTriggerProps) => ReactNode;\n /**\n * Called whenever the selector surface opens or closes, however it happened\n * — the trigger, the keyboard, a light dismiss, Escape, content that calls\n * `close()`, or the imperative handle. Pair it with `handleRef` to drive the\n * surface from outside without mirroring its state.\n */\n onOpenChange?: (isOpen: boolean) => void;\n /** StyleX styles for the popup content container. */\n contentXstyle?: StyleXStyles;\n /** Test ID for the trigger button. */\n \"data-testid\"?: string;\n}\n\n/**\n * A selector shell for rich, custom selection surfaces.\n *\n * ComplexSelector owns the field, trigger, popover, focus restore, and async\n * change action flow. Consumers provide the dialog content as a render function,\n * using the supplied `value`, `onChange`, and `close` helpers to compose the\n * right accessible structure for the custom selector.\n *\n * @example\n * ```\n * <ComplexSelector\n * label=\"Fruit\"\n * value={value}\n * onChange={setValue}\n * triggerLabel={`${value.fruit} ${value.ripeness}`}>\n * {(value, onChange, close) => (\n * <FruitGrid\n * value={value}\n * onChange={nextValue => {\n * onChange(nextValue);\n * close();\n * }}\n * />\n * )}\n * </ComplexSelector>\n * ```\n */\nexport function ComplexSelector<Value>({\n label,\n value,\n onChange,\n changeAction,\n children,\n triggerLabel,\n placeholder: placeholderFromProps,\n isLabelHidden = false,\n description,\n isOptional = false,\n isRequired = false,\n isDisabled = false,\n isLoading = false,\n hasClear = false,\n onClear,\n status,\n statusVariant = \"attached\",\n labelTooltip,\n size = \"md\",\n variant = \"input\",\n startIcon,\n width,\n placement = \"below\",\n alignment = \"start\",\n handleRef,\n renderTrigger,\n onOpenChange,\n contentXstyle,\n containerXstyle,\n containerClassName,\n containerStyle,\n controlXstyle,\n controlClassName,\n controlStyle,\n ref,\n id,\n onClick: onClickProp,\n onKeyDown: onKeyDownProp,\n \"aria-describedby\": ariaDescribedByProp,\n ...restProps\n}: ComplexSelectorProps<Value>) {\n const { rest, container } = useFieldInputStyling(\"ComplexSelector\", restProps, {\n containerXstyle,\n containerClassName,\n containerStyle,\n });\n useDevWarning(\n \"ComplexSelector\",\n RENDER_TRIGGER_PARTS_MESSAGE,\n renderTrigger != null &&\n (containerXstyle != null ||\n containerClassName != null ||\n containerStyle != null ||\n controlXstyle != null ||\n controlClassName != null ||\n controlStyle != null),\n );\n const t = useTranslator();\n const pressable = usePressFeedback();\n const isEffectivelyRequired = useResolvedRequired({ isRequired, isOptional });\n const placeholder = placeholderFromProps ?? t(\"@astryx.selector.placeholder\");\n const effectiveStatusVariant =\n variant === \"ghost\" && statusVariant === \"attached\" ? \"detached\" : statusVariant;\n\n const generatedTriggerId = useId();\n // A caller's `id` lands on the trigger, so the label wiring must use it.\n const triggerId = id ?? generatedTriggerId;\n const labelId = useId();\n const contentId = useId();\n const descriptionId = useId();\n const statusMessageId = useId();\n const ariaDescribedBy =\n [description ? descriptionId : null, status?.message ? statusMessageId : null]\n .filter((id): id is string => id != null)\n .join(\" \") || undefined;\n\n const triggerRef = useRef<HTMLElement>(null);\n const triggerButtonRef = useMergedRefs<HTMLElement>(triggerRef, ref);\n\n const [isPending, startTransition] = useTransition();\n const [optimisticValue, setOptimisticValue] = useOptimistic(value);\n const isBusy = isLoading || isPending;\n\n const handlePopoverShow = useCallback(() => {\n onOpenChange?.(true);\n }, [onOpenChange]);\n\n const handlePopoverHide = useCallback(() => {\n // Focus is restored first so a consumer that moves focus elsewhere from\n // the callback wins, instead of being overwritten a line later.\n triggerRef.current?.focus();\n onOpenChange?.(false);\n }, [onOpenChange]);\n\n const popover = usePopover({\n dialogLabel: label,\n hasCloseButton: false,\n hasAutoFocus: true,\n surfaceTarget: \"complex-selector-popup\",\n onShow: handlePopoverShow,\n onHide: handlePopoverHide,\n });\n\n const isOpen = popover.isOpen;\n\n const handleTriggerClick = useCallback(() => {\n if (isDisabled) {\n return;\n }\n if (popover.isOpen) {\n popover.hide();\n } else {\n popover.show();\n }\n }, [isDisabled, popover]);\n\n const close = useCallback(() => {\n popover.hide();\n }, [popover]);\n\n const handleTriggerKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === \"ArrowDown\" && !isOpen && !isDisabled) {\n event.preventDefault();\n popover.show();\n }\n },\n [isDisabled, isOpen, popover],\n );\n\n // A caller `onClick` runs first and can cancel opening with\n // `preventDefault()`, as it always could. It now lands on the trigger, so\n // the trigger composes it; a press elsewhere in the control box (padding,\n // start icon, chevron) opens the popup directly.\n const handleTriggerButtonClick = composeEventHandlers(\n onClickProp,\n handleTriggerClick,\n );\n // A caller `onKeyDown` sees every key, including the ArrowDown the trigger\n // has already used to open the popup.\n const handleTriggerButtonKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n handleTriggerKeyDown(event);\n onKeyDownProp?.(event);\n };\n const handleControlBoxClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (triggerRef.current?.contains(event.target as Node)) {\n return;\n }\n // Route the press through the trigger so it behaves exactly like a\n // press on the trigger itself, caller `onClick` included.\n triggerRef.current?.click();\n },\n [],\n );\n\n useImperativeHandle(\n handleRef,\n () => ({\n open: () => {\n if (!isDisabled) {\n popover.show();\n }\n },\n close: () => popover.hide(),\n toggle: () => {\n if (isDisabled) {\n return;\n }\n if (popover.isOpen) {\n popover.hide();\n } else {\n popover.show();\n }\n },\n isOpen: () => popover.isOpen,\n }),\n [isDisabled, popover],\n );\n\n const commitValue = useCallback(\n (nextValue: Value) => {\n onChange?.(nextValue);\n if (changeAction) {\n startTransition(async () => {\n setOptimisticValue(nextValue);\n await changeAction(nextValue);\n });\n }\n },\n [changeAction, onChange, setOptimisticValue, startTransition],\n );\n\n const triggerContent = triggerLabel ?? placeholder;\n\n const startIconSlot = renderIconSlot(startIcon, {\n size: \"sm\",\n color: \"secondary\",\n });\n\n const content = (\n <div id={contentId} {...stylex.props(styles.content, contentXstyle)}>\n {children(optimisticValue, commitValue, close, {\n isOpen,\n isBusy,\n triggerId,\n contentId,\n })}\n </div>\n );\n\n const popup = popover.render(content, {\n placement,\n alignment,\n offset: spacingVars[\"--spacing-1\"],\n xstyle: [styles.popover, layerAnimations[placement]],\n });\n\n if (renderTrigger != null) {\n // Anchor-only mode: the caller renders the opener and spreads these props\n // on it. No Field, no status, no chevron — the caller owns the control;\n // the selector owns the popup, its anchor, and focus return.\n const triggerProps: ComplexSelectorRenderTriggerProps = {\n // Base props reach the caller's control, the primary semantic control\n // in this mode; the selector's own wiring below wins over them.\n ...rest,\n \"aria-describedby\": ariaDescribedByProp,\n ref: mergeRefs<HTMLElement>((el) => {\n popover.triggerRef(el);\n triggerRef.current = el;\n }, ref),\n id: triggerId,\n // This path never forwarded caller handlers before, so the newly\n // forwarded ones compose component first and cannot cancel opening.\n onClick: composeEventHandlers(handleTriggerClick, onClickProp),\n onKeyDown: composeEventHandlers(handleTriggerKeyDown, onKeyDownProp),\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": contentId,\n \"aria-busy\": isBusy || undefined,\n };\n return (\n <>\n {renderTrigger(triggerProps)}\n {popup}\n </>\n );\n }\n\n const selectorContent = (\n <>\n <div\n ref={popover.triggerRef}\n {...pressable}\n onClick={handleControlBoxClick}\n {...mergeProps(\n themeProps(\"complex-selector\", {\n variant,\n size,\n status: status?.type ?? null,\n }),\n stylex.props(\n inputWrapperStyles.base,\n styles.triggerContainer,\n styles[size],\n // The ring belongs to the wrapper (the focusable `<button>` sits\n // inside it), but it must still be a KEYBOARD ring: `:focus-within`\n // matched a mouse click on the trigger and drew the outline for\n // pointer users too. `focusWithin` here is `:has(:focus-visible)`.\n focusOutlineStyles.focusWithin,\n variant === \"ghost\" && styles.triggerGhost,\n variant === \"ghost\" && interactionOverlayStyles.backgroundImage,\n isDisabled && inputWrapperStyles.disabled,\n variant === \"ghost\" && isDisabled && styles.triggerGhostDisabled,\n isDisabled && styles.disabled,\n triggerLabel == null && styles.placeholder,\n controlXstyle,\n ),\n controlClassName,\n controlStyle,\n )}\n >\n {isRenderable(startIconSlot) && startIconSlot}\n <button\n {...rest}\n ref={triggerButtonRef}\n id={triggerId}\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={isOpen}\n aria-controls={contentId}\n // A caller's description is kept alongside the field's own.\n aria-describedby={\n [ariaDescribedByProp, ariaDescribedBy].filter(Boolean).join(\" \") ||\n undefined\n }\n aria-labelledby={labelId}\n aria-required={isEffectivelyRequired ? \"true\" : undefined}\n aria-invalid={status?.type === \"error\" ? \"true\" : undefined}\n aria-busy={isBusy || undefined}\n disabled={isDisabled}\n onClick={handleTriggerButtonClick}\n onKeyDown={handleTriggerButtonKeyDown}\n {...stylex.props(styles.trigger)}\n >\n <span {...stylex.props(styles.triggerText)}>{triggerContent}</span>\n </button>\n {isBusy && <Spinner size=\"sm\" />}\n {/* ui-common: the clear button (facebook/astryx#6362). */}\n {hasClear && triggerLabel != null && !isDisabled && (\n <InputClearButton\n label={t(\"@astryx.selector.clearLabel\", { label })}\n // The container's own click opens the popover; a clear must not.\n onClick={(event) => {\n event.stopPropagation();\n if (onClear) {\n onClear();\n } else {\n // Clearing hands back \"no value\", which `Value` may not name.\n onChange?.(undefined as Value);\n }\n }}\n />\n )}\n <Icon\n icon=\"chevronDown\"\n size=\"sm\"\n color=\"secondary\"\n // No wrapper: Icon's own span already provides the 16px box (`sm`)\n // and the secondary icon color the wrapper used to set, so the glyph\n // IS the trigger's icon element — one node carrying the box, the\n // color, the rotation, and the theme target.\n xstyle={[\n styles.triggerIcon,\n styles.triggerIconRotation,\n isOpen && styles.triggerIconOpen,\n ]}\n {...themeProps(\"complex-selector-indicator-icon\", {\n state: isOpen ? \"expanded\" : \"collapsed\",\n })}\n />\n </div>\n\n {popup}\n </>\n );\n\n return (\n <Field\n label={label}\n isLabelHidden={isLabelHidden}\n description={description}\n inputID={triggerId}\n descriptionID={description ? descriptionId : undefined}\n labelID={labelId}\n isOptional={isOptional}\n isRequired={isRequired}\n isDisabled={isDisabled}\n status={\n status\n ? {\n type: status.type,\n message: status.message,\n messageID: status.message ? statusMessageId : undefined,\n }\n : undefined\n }\n statusVariant={effectiveStatusVariant}\n labelTooltip={labelTooltip}\n width={width}\n {...container}\n >\n {selectorContent}\n </Field>\n );\n}\n\nComplexSelector.displayName = \"ComplexSelector\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4EA,IAAM,IAAS,EAAe,CAAe,GACvC,KAA2B,EAAe,CAAiC;AAKjF,SAAS,GAAoB,EAC3B,gBAAa,IACb,gBAAa,MAIH;CACV,IAAM,EAAE,0BAAuB,EAAI,CAAiB;CACpD,OAAO,CAAC,MAAe,KAAc,MAAuB;AAC9D;AAEA,IAAM,IACJ,sSAII,IACJ;AAKF,SAAS,GACP,GACA,GACA,GACA;CACA,IAAM,IAAa,EAAc,GAC3B,EAAE,iBAAc,EAAI,CAAiB,GACrC,IAAc,KAAc,QAAQ,MAAc,qBAElD,IAAU,GAKV,IACJ,EAAQ,UAAU,QAAQ,EAAQ,aAAa,QAAQ,EAAQ,SAAS,MACtE,IAAO;CACX,IAAI,GAAgB;EAClB,IAAM,EACJ,QAAQ,GACR,WAAW,GACX,OAAO,GACP,GAAG,MACD;EACJ,IAAO;CACT;CACA,EAAc,GAAW,GAAsB,CAAc;CAE7D,IAAM,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B,WAAW,EAAO,UAAU,KAAkB,KAAA;EAChD,IACA,KAAA;EAEN,eAAe;EACD;EACP;EACP,GAAI;EAEH,UAAA;CACI,CAAA;AAEX;AAEA,EAAgB,cAAc"}
@@ -111,19 +111,59 @@ export declare const styles: {
111
111
  };
112
112
  export declare const interactionOverlayStyles: {
113
113
  backgroundColor: {
114
+ "--astryx-press-alpha": string;
115
+ kKVMdj: string;
116
+ k44tkh: string;
117
+ kyAemX: string;
118
+ kWV6AL: string;
119
+ "--_press-paint": string;
120
+ "--_press-paint-image": string;
114
121
  kWkggS: string;
122
+ kKwaWg: string;
115
123
  $$css: boolean;
116
124
  };
117
125
  backgroundImage: {
126
+ "--astryx-press-alpha": string;
127
+ kKVMdj: string;
128
+ k44tkh: string;
129
+ kyAemX: string;
130
+ kWV6AL: string;
131
+ "--_press-paint": string;
132
+ "--_press-paint-image": string;
118
133
  kKwaWg: string;
119
134
  $$css: boolean;
120
135
  };
121
136
  backgroundImageOnNeutral: {
137
+ "--astryx-press-alpha": string;
138
+ kKVMdj: string;
139
+ k44tkh: string;
140
+ kyAemX: string;
141
+ kWV6AL: string;
142
+ "--_press-paint": string;
143
+ "--_press-paint-image": string;
122
144
  kKwaWg: string;
123
145
  $$css: boolean;
124
146
  };
125
147
  pressedBackgroundColor: {
148
+ "--astryx-press-alpha": string;
149
+ kKVMdj: string;
150
+ k44tkh: string;
151
+ kyAemX: string;
152
+ kWV6AL: string;
153
+ "--_press-paint": string;
154
+ "--_press-paint-image": string;
126
155
  kWkggS: string;
156
+ kKwaWg: string;
157
+ $$css: boolean;
158
+ };
159
+ pressedAlpha: {
160
+ "--astryx-press-alpha": string;
161
+ kKVMdj: string;
162
+ k44tkh: string;
163
+ kyAemX: string;
164
+ kWV6AL: string;
165
+ "--_press-paint": string;
166
+ "--_press-paint-image": string;
127
167
  $$css: boolean;
128
168
  };
129
169
  };
@@ -59,12 +59,12 @@ var e = {
59
59
  kGVxlE: "x1gnnqk1 x1s17dad x15ysqaf",
60
60
  k63SB2: "x1e4wzip",
61
61
  k1ekBW: "xrafxwg",
62
- k3aq6I: "x3oybdh xk4oym4",
62
+ k3aq6I: "x3oybdh xk4oym4 x5lqen6 x3y5scg",
63
63
  $$css: !0
64
64
  },
65
65
  triggerGhostDisabled: {
66
66
  kKwaWg: "x18o3ruo",
67
- k3aq6I: "x1c071of x1pdlv7q",
67
+ k3aq6I: "x1c071of x1pdlv7q x1ylxtyb",
68
68
  $$css: !0
69
69
  },
70
70
  triggerIcon: {
@@ -111,19 +111,59 @@ var e = {
111
111
  }
112
112
  }, t = {
113
113
  backgroundColor: {
114
- kWkggS: "xjbqb8w x1anq1lc xoevpu5 xprvw0a",
114
+ "--astryx-press-alpha": "x11z29ks xli5ek3",
115
+ kKVMdj: "x14e4jsf",
116
+ k44tkh: "x8s9nux",
117
+ kyAemX: "xwkbtvz",
118
+ kWV6AL: "xziyay6",
119
+ "--_press-paint": "xz2mauf",
120
+ "--_press-paint-image": "x1l7afqf",
121
+ kWkggS: "xjbqb8w x1anq1lc x1s5nr2v x13ugjdw xl8sb5e xoevpu5 xprvw0a",
122
+ kKwaWg: "x7ngsy6 xubczrd",
115
123
  $$css: !0
116
124
  },
117
125
  backgroundImage: {
118
- kKwaWg: "x7uyq82 xmvprkv xetgvay",
126
+ "--astryx-press-alpha": "x11z29ks xli5ek3",
127
+ kKVMdj: "x14e4jsf",
128
+ k44tkh: "x8s9nux",
129
+ kyAemX: "xwkbtvz",
130
+ kWV6AL: "xziyay6",
131
+ "--_press-paint": "xz2mauf",
132
+ "--_press-paint-image": "x1l7afqf",
133
+ kKwaWg: "x7uyq82 x3f84ok x7ngsy6 xubczrd xmvprkv xetgvay",
119
134
  $$css: !0
120
135
  },
121
136
  backgroundImageOnNeutral: {
122
- kKwaWg: "x14bno8m xzmimnh x1otsd3y xo3fi6e",
137
+ "--astryx-press-alpha": "x11z29ks xli5ek3",
138
+ kKVMdj: "x14e4jsf",
139
+ k44tkh: "x8s9nux",
140
+ kyAemX: "xwkbtvz",
141
+ kWV6AL: "xziyay6",
142
+ "--_press-paint": "xz2mauf",
143
+ "--_press-paint-image": "x1l7afqf",
144
+ kKwaWg: "x14bno8m xzmimnh xvbnuu x5rw36h x1qxwyo6 x1otsd3y xo3fi6e",
123
145
  $$css: !0
124
146
  },
125
147
  pressedBackgroundColor: {
126
- kWkggS: "x1anq1lc",
148
+ "--astryx-press-alpha": "x11z29ks xli5ek3",
149
+ kKVMdj: "x14e4jsf",
150
+ k44tkh: "x8s9nux",
151
+ kyAemX: "xwkbtvz",
152
+ kWV6AL: "xziyay6",
153
+ "--_press-paint": "xz2mauf",
154
+ "--_press-paint-image": "x1l7afqf",
155
+ kWkggS: "x1anq1lc x1s5nr2v x13ugjdw xl8sb5e",
156
+ kKwaWg: "x7ngsy6 xubczrd",
157
+ $$css: !0
158
+ },
159
+ pressedAlpha: {
160
+ "--astryx-press-alpha": "x11z29ks xli5ek3",
161
+ kKVMdj: "x14e4jsf",
162
+ k44tkh: "x8s9nux",
163
+ kyAemX: "xwkbtvz",
164
+ kWV6AL: "xziyay6",
165
+ "--_press-paint": "xz2mauf",
166
+ "--_press-paint-image": "x1l7afqf",
127
167
  $$css: !0
128
168
  }
129
169
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ComplexSelector.styles.js","names":[],"sources":["../../../src/forks/ComplexSelector/ComplexSelector.styles.ts"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\n// @generated by scripts/sync-forks.mjs. Do not edit.\n//\n// Compiled StyleX from @astryxdesign/core 0.6.5, reused by the\n// ComplexSelector fork so it renders with upstream's own class names\n// (src/forks/compiled.ts). Copyright (c) Meta Platforms, Inc. and\n// affiliates; MIT, see NOTICE.\n\n// dist/ComplexSelector/ComplexSelector.js\nexport const styles = {\n triggerContainer: {\n kVAEAm: \"x1n2onr6\",\n k1xSpc: \"x78zum5\",\n kGNEyG: \"x6s0dn4\",\n kjj79g: \"x1qughib\",\n kOIVth: \"x1txdalj\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"xce4md1\",\n kg3NbH: \"xrrkdod\",\n kMv6JI: \"x9ynric\",\n kGuDYH: \"xcr08ib x1w61h2b\",\n kLWn49: \"x1kq96og\",\n kMwMTN: \"x1tgivj0\",\n kkrTdU: \"x1ypdohk x16khyan\",\n $$css: true,\n },\n trigger: {\n k1xSpc: \"x78zum5\",\n kGNEyG: \"x6s0dn4\",\n kjj79g: \"x1qughib\",\n kOIVth: \"x1txdalj\",\n kzQI83: \"x1iyjqo2\",\n kmuXW: \"xs83m0k\",\n kCS8Yb: \"x1r8uery\",\n k7Eaqz: \"xeuugli\",\n kmVPX3: \"x1717udv\",\n kogj98: \"x1ghz6dp\",\n kMzoRj: \"xc342km\",\n ksu8eU: \"xng3xce\",\n kWkggS: \"xjbqb8w\",\n kMv6JI: \"xjb2p0i\",\n kGuDYH: \"x1qlqyl8\",\n kLWn49: \"x15bjb6t\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk x16khyan\",\n kI3sdo: \"x1a2a7pz\",\n kaIpWk: \"xh6dtrn\",\n $$css: true,\n },\n triggerText: {\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n k9WMMc: \"x1yc453h\",\n $$css: true,\n },\n placeholder: {\n kMwMTN: \"xv1l7n4\",\n $$css: true,\n },\n triggerGhost: {\n kzqmXN: \"x14atkfc\",\n kMzoRj: \"xc342km\",\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1 x1s17dad x15ysqaf\",\n k63SB2: \"x1e4wzip\",\n k1ekBW: \"xrafxwg\",\n k3aq6I: \"x3oybdh xk4oym4\",\n $$css: true,\n },\n triggerGhostDisabled: {\n kKwaWg: \"x18o3ruo\",\n k3aq6I: \"x1c071of x1pdlv7q\",\n $$css: true,\n },\n triggerIcon: {\n kmuXW: \"x2lah0s\",\n $$css: true,\n },\n triggerIconRotation: {\n k1ekBW: \"x11xpdln\",\n kIyJzY: \"xuedmi6\",\n kAMwcw: \"xlr8y92\",\n k3nNDw: \"x1g0ag68\",\n $$css: true,\n },\n triggerIconOpen: {\n k3aq6I: \"x19jd1h0\",\n $$css: true,\n },\n popover: {\n k7Eaqz: \"xrzjruh\",\n $$css: true,\n },\n content: {\n kB7OPa: \"x9f619\",\n kskxy: \"xpnbb6b\",\n kVQacm: \"xysyzu8\",\n kmVPX3: \"x1b2ylru\",\n $$css: true,\n },\n sm: {\n kZKoxP: \"x6k0iem\",\n $$css: true,\n },\n md: {\n kZKoxP: \"x1ueg155\",\n $$css: true,\n },\n lg: {\n kZKoxP: \"xssyfek\",\n $$css: true,\n },\n disabled: {\n kkrTdU: \"xt0e3qv\",\n $$css: true,\n },\n};\n\n// dist/utils/interactionOverlay.stylex.js\nexport const interactionOverlayStyles = {\n backgroundColor: {\n kWkggS: \"xjbqb8w x1anq1lc xoevpu5 xprvw0a\",\n $$css: true,\n },\n backgroundImage: {\n kKwaWg: \"x7uyq82 xmvprkv xetgvay\",\n $$css: true,\n },\n backgroundImageOnNeutral: {\n kKwaWg: \"x14bno8m xzmimnh x1otsd3y xo3fi6e\",\n $$css: true,\n },\n pressedBackgroundColor: {\n kWkggS: \"x1anq1lc\",\n $$css: true,\n },\n};\n"],"mappings":";AAUA,IAAa,IAAS;CACpB,kBAAkB;EAChB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,sBAAsB;EACpB,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,OAAO;EACP,OAAO;CACT;CACA,qBAAqB;EACnB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,IAAI;EACF,QAAQ;EACR,OAAO;CACT;CACA,IAAI;EACF,QAAQ;EACR,OAAO;CACT;CACA,IAAI;EACF,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,OAAO;CACT;AACF,GAGa,IAA2B;CACtC,iBAAiB;EACf,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,OAAO;CACT;CACA,0BAA0B;EACxB,QAAQ;EACR,OAAO;CACT;CACA,wBAAwB;EACtB,QAAQ;EACR,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"ComplexSelector.styles.js","names":[],"sources":["../../../src/forks/ComplexSelector/ComplexSelector.styles.ts"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\n// @generated by scripts/sync-forks.mjs. Do not edit.\n//\n// Compiled StyleX from @astryxdesign/core 0.7.0, reused by the\n// ComplexSelector fork so it renders with upstream's own class names\n// (src/forks/compiled.ts). Copyright (c) Meta Platforms, Inc. and\n// affiliates; MIT, see NOTICE.\n\n// dist/ComplexSelector/ComplexSelector.js\nexport const styles = {\n triggerContainer: {\n kVAEAm: \"x1n2onr6\",\n k1xSpc: \"x78zum5\",\n kGNEyG: \"x6s0dn4\",\n kjj79g: \"x1qughib\",\n kOIVth: \"x1txdalj\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"xce4md1\",\n kg3NbH: \"xrrkdod\",\n kMv6JI: \"x9ynric\",\n kGuDYH: \"xcr08ib x1w61h2b\",\n kLWn49: \"x1kq96og\",\n kMwMTN: \"x1tgivj0\",\n kkrTdU: \"x1ypdohk x16khyan\",\n $$css: true,\n },\n trigger: {\n k1xSpc: \"x78zum5\",\n kGNEyG: \"x6s0dn4\",\n kjj79g: \"x1qughib\",\n kOIVth: \"x1txdalj\",\n kzQI83: \"x1iyjqo2\",\n kmuXW: \"xs83m0k\",\n kCS8Yb: \"x1r8uery\",\n k7Eaqz: \"xeuugli\",\n kmVPX3: \"x1717udv\",\n kogj98: \"x1ghz6dp\",\n kMzoRj: \"xc342km\",\n ksu8eU: \"xng3xce\",\n kWkggS: \"xjbqb8w\",\n kMv6JI: \"xjb2p0i\",\n kGuDYH: \"x1qlqyl8\",\n kLWn49: \"x15bjb6t\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk x16khyan\",\n kI3sdo: \"x1a2a7pz\",\n kaIpWk: \"xh6dtrn\",\n $$css: true,\n },\n triggerText: {\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n k9WMMc: \"x1yc453h\",\n $$css: true,\n },\n placeholder: {\n kMwMTN: \"xv1l7n4\",\n $$css: true,\n },\n triggerGhost: {\n kzqmXN: \"x14atkfc\",\n kMzoRj: \"xc342km\",\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1 x1s17dad x15ysqaf\",\n k63SB2: \"x1e4wzip\",\n k1ekBW: \"xrafxwg\",\n k3aq6I: \"x3oybdh xk4oym4 x5lqen6 x3y5scg\",\n $$css: true,\n },\n triggerGhostDisabled: {\n kKwaWg: \"x18o3ruo\",\n k3aq6I: \"x1c071of x1pdlv7q x1ylxtyb\",\n $$css: true,\n },\n triggerIcon: {\n kmuXW: \"x2lah0s\",\n $$css: true,\n },\n triggerIconRotation: {\n k1ekBW: \"x11xpdln\",\n kIyJzY: \"xuedmi6\",\n kAMwcw: \"xlr8y92\",\n k3nNDw: \"x1g0ag68\",\n $$css: true,\n },\n triggerIconOpen: {\n k3aq6I: \"x19jd1h0\",\n $$css: true,\n },\n popover: {\n k7Eaqz: \"xrzjruh\",\n $$css: true,\n },\n content: {\n kB7OPa: \"x9f619\",\n kskxy: \"xpnbb6b\",\n kVQacm: \"xysyzu8\",\n kmVPX3: \"x1b2ylru\",\n $$css: true,\n },\n sm: {\n kZKoxP: \"x6k0iem\",\n $$css: true,\n },\n md: {\n kZKoxP: \"x1ueg155\",\n $$css: true,\n },\n lg: {\n kZKoxP: \"xssyfek\",\n $$css: true,\n },\n disabled: {\n kkrTdU: \"xt0e3qv\",\n $$css: true,\n },\n};\n\n// dist/utils/interactionOverlay.stylex.js\nexport const interactionOverlayStyles = {\n backgroundColor: {\n \"--astryx-press-alpha\": \"x11z29ks xli5ek3\",\n kKVMdj: \"x14e4jsf\",\n k44tkh: \"x8s9nux\",\n kyAemX: \"xwkbtvz\",\n kWV6AL: \"xziyay6\",\n \"--_press-paint\": \"xz2mauf\",\n \"--_press-paint-image\": \"x1l7afqf\",\n kWkggS: \"xjbqb8w x1anq1lc x1s5nr2v x13ugjdw xl8sb5e xoevpu5 xprvw0a\",\n kKwaWg: \"x7ngsy6 xubczrd\",\n $$css: true,\n },\n backgroundImage: {\n \"--astryx-press-alpha\": \"x11z29ks xli5ek3\",\n kKVMdj: \"x14e4jsf\",\n k44tkh: \"x8s9nux\",\n kyAemX: \"xwkbtvz\",\n kWV6AL: \"xziyay6\",\n \"--_press-paint\": \"xz2mauf\",\n \"--_press-paint-image\": \"x1l7afqf\",\n kKwaWg: \"x7uyq82 x3f84ok x7ngsy6 xubczrd xmvprkv xetgvay\",\n $$css: true,\n },\n backgroundImageOnNeutral: {\n \"--astryx-press-alpha\": \"x11z29ks xli5ek3\",\n kKVMdj: \"x14e4jsf\",\n k44tkh: \"x8s9nux\",\n kyAemX: \"xwkbtvz\",\n kWV6AL: \"xziyay6\",\n \"--_press-paint\": \"xz2mauf\",\n \"--_press-paint-image\": \"x1l7afqf\",\n kKwaWg: \"x14bno8m xzmimnh xvbnuu x5rw36h x1qxwyo6 x1otsd3y xo3fi6e\",\n $$css: true,\n },\n pressedBackgroundColor: {\n \"--astryx-press-alpha\": \"x11z29ks xli5ek3\",\n kKVMdj: \"x14e4jsf\",\n k44tkh: \"x8s9nux\",\n kyAemX: \"xwkbtvz\",\n kWV6AL: \"xziyay6\",\n \"--_press-paint\": \"xz2mauf\",\n \"--_press-paint-image\": \"x1l7afqf\",\n kWkggS: \"x1anq1lc x1s5nr2v x13ugjdw xl8sb5e\",\n kKwaWg: \"x7ngsy6 xubczrd\",\n $$css: true,\n },\n pressedAlpha: {\n \"--astryx-press-alpha\": \"x11z29ks xli5ek3\",\n kKVMdj: \"x14e4jsf\",\n k44tkh: \"x8s9nux\",\n kyAemX: \"xwkbtvz\",\n kWV6AL: \"xziyay6\",\n \"--_press-paint\": \"xz2mauf\",\n \"--_press-paint-image\": \"x1l7afqf\",\n $$css: true,\n },\n};\n"],"mappings":";AAUA,IAAa,IAAS;CACpB,kBAAkB;EAChB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EAC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