@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.7

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 (63) hide show
  1. package/README.md +139 -0
  2. package/dist/CHANGELOG.md +10 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-4iMidqal.cjs} +26 -26
  4. package/dist/DateCellRenderer-CTTAnQjB.cjs +1 -0
  5. package/dist/components/Dropdown/Dropdown.js +70 -65
  6. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  7. package/dist/components/Dropdown/constants.js +14 -12
  8. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  9. package/dist/components/New/Accordion/Accordion.js +39 -37
  10. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
  11. package/dist/components/New/Calendar/Calendar.js +253 -222
  12. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  13. package/dist/components/New/CardShell/CardShell.js +4 -2
  14. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  15. package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
  16. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  17. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  18. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
  19. package/dist/components/New/Dropdown/Dropdown.js +101 -95
  20. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
  21. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  22. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  23. package/dist/components/New/Highlight/Highlight.js +23 -30
  24. package/dist/components/New/InfoButton/InfoButton.js +12 -10
  25. package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
  26. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
  27. package/dist/components/New/Label/Label.js +13 -8
  28. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  29. package/dist/components/New/MenuItem/constants.js +9 -8
  30. package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
  31. package/dist/components/New/Notification/Notification.js +28 -26
  32. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  33. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  34. package/dist/components/New/Popup/Popup.js +45 -43
  35. package/dist/components/New/Radio/Radio.js +75 -64
  36. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  37. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  38. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  39. package/dist/components/New/Search/Search.js +28 -26
  40. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  41. package/dist/components/New/Select/Select.js +120 -109
  42. package/dist/components/New/Switch/Switch.js +69 -58
  43. package/dist/components/New/Tabs/Tabs.js +28 -22
  44. package/dist/components/New/Tag/Tag.js +42 -40
  45. package/dist/components/New/TagInput/TagInput.js +44 -42
  46. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
  47. package/dist/components/New/Tooltip/TooltipContent.js +10 -8
  48. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  49. package/dist/components/Skeleton/Skeleton.js +25 -19
  50. package/dist/components/Spinner/Spinner.js +6 -4
  51. package/dist/components-manifest.json +7 -2
  52. package/dist/constants/public-class-names.js +152 -0
  53. package/dist/dial-ui-kit.cjs +2 -2
  54. package/dist/dial-ui-kit.js +203 -201
  55. package/dist/file-manager.cjs +1 -1
  56. package/dist/grid.cjs +1 -1
  57. package/dist/index.css +1 -1
  58. package/dist/src/constants/public-class-names.d.ts +143 -0
  59. package/dist/src/index.d.ts +1 -0
  60. package/dist/use-file-manager-tabs-DKmWaOlC.cjs +3 -0
  61. package/package.json +1 -1
  62. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  63. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -1,40 +1,42 @@
1
1
  import { jsxs as r, jsx as a } from "react/jsx-runtime";
2
- import { useMemo as u } from "react";
3
- import { DialIcon as v } from "../../Icon/Icon.js";
4
- import { NotificationVariant as n, NotificationType as s } from "../../../types/notification.js";
2
+ import { useMemo as b } from "react";
3
+ import { DialIcon as k } from "../../Icon/Icon.js";
4
+ import { NotificationVariant as n, NotificationType as i } from "../../../types/notification.js";
5
5
  import { mergeClasses as c } from "../../../utils/merge-classes.js";
6
- import { CloseButton as C } from "../CloseButton/CloseButton.js";
7
- import { variantIcons as k, notificationVariantRoleMap as M, notificationVariantClassNameMap as T, alertBaseClassName as I } from "./constants.js";
8
- const R = ({
6
+ import { CloseButton as u } from "../CloseButton/CloseButton.js";
7
+ import { variantIcons as I, notificationVariantRoleMap as M, notificationVariantClassNameMap as T, alertBaseClassName as v } from "./constants.js";
8
+ import { DIAL_KIT_CLASS as L } from "../../../constants/public-class-names.js";
9
+ const K = ({
9
10
  variant: e = n.Info,
10
- type: i = s.Toast,
11
+ type: s = i.Toast,
11
12
  title: o,
12
- message: l,
13
+ message: t,
13
14
  className: d,
14
- iconSize: t = 24,
15
+ iconSize: l = 24,
15
16
  iconStroke: m = 2,
16
- closable: p = !1,
17
- onClose: f,
17
+ closable: f = !1,
18
+ onClose: p,
18
19
  children: x,
19
20
  textClassName: h,
20
- ...N
21
+ ...w
21
22
  }) => {
22
- const w = u(() => k({ size: t, stroke: m })[e], [e, t, m]), g = h ?? (i === s.SectionMessage ? "flex-row flex-wrap items-baseline gap-x-1" : "flex-col");
23
+ const N = b(() => I({ size: l, stroke: m })[e], [e, l, m]), g = h ?? (s === i.SectionMessage ? "flex-row flex-wrap items-baseline gap-x-1" : "flex-col");
23
24
  return /* @__PURE__ */ r(
24
25
  "div",
25
26
  {
26
27
  role: M[e],
27
- ...N,
28
+ ...w,
28
29
  className: c(
29
- I,
30
+ L.notification,
31
+ v,
30
32
  T[e],
31
- i === s.Toast && "min-w-[200px] max-w-[600px] shadow-lg",
32
- i === s.SectionMessage && e === n.Loading && "border-secondary",
33
+ s === i.Toast && "min-w-[200px] max-w-[600px] shadow-lg",
34
+ s === i.SectionMessage && e === n.Loading && "border-secondary",
33
35
  d
34
36
  ),
35
37
  children: [
36
38
  /* @__PURE__ */ r("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
37
- /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ a(v, { icon: w }) }),
39
+ /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ a(k, { icon: N }) }),
38
40
  o ? /* @__PURE__ */ r(
39
41
  "div",
40
42
  {
@@ -44,24 +46,24 @@ const R = ({
44
46
  ),
45
47
  children: [
46
48
  /* @__PURE__ */ a("div", { className: "dial-small-paragraph-semi-text min-w-0 break-words", children: o }),
47
- /* @__PURE__ */ a("div", { className: "dial-small-paragraph-text min-w-0 break-words", children: l })
49
+ /* @__PURE__ */ a("div", { className: "dial-small-paragraph-text min-w-0 break-words", children: t })
48
50
  ]
49
51
  }
50
- ) : /* @__PURE__ */ a("div", { className: "dial-small-paragraph-text min-w-0 text-primary break-words", children: l })
52
+ ) : /* @__PURE__ */ a("div", { className: "dial-small-paragraph-text min-w-0 text-primary break-words", children: t })
51
53
  ] }),
52
54
  x,
53
- p && /* @__PURE__ */ a("div", { className: "relative size-[40px]", children: /* @__PURE__ */ a(
54
- C,
55
+ f && /* @__PURE__ */ a(
56
+ u,
55
57
  {
56
- className: "absolute top-[-2px] right-0 size-auto hover:bg-transparent ",
58
+ className: "shrink-0 self-start",
57
59
  ariaLabel: "Close notification",
58
- onClose: (b) => f?.(b)
60
+ onClose: (C) => p?.(C)
59
61
  }
60
- ) })
62
+ )
61
63
  ]
62
64
  }
63
65
  );
64
66
  };
65
67
  export {
66
- R as Notification
68
+ K as Notification
67
69
  };
@@ -1,41 +1,50 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { Input as D } from "../Input/Input.js";
3
- import { handleKeyDown as y } from "../Input/utils.js";
4
- const g = /^0+\.(\d+)?$/, h = /^0+/, N = [".", "-", "+", "e", "E"], l = (t) => !t || t === "-" ? t : String(t).match(g) ? String(t).replace(h, "0") : Number(t), S = ({
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { Input as y } from "../Input/Input.js";
3
+ import { handleKeyDown as N } from "../Input/utils.js";
4
+ import { DIAL_KIT_CLASS as w } from "../../../constants/public-class-names.js";
5
+ import { mergeClasses as h } from "../../../utils/merge-classes.js";
6
+ const I = /^0+\.(\d+)?$/, K = /^0+/, S = [".", "-", "+", "e", "E"], l = (t) => !t || t === "-" ? t : String(t).match(I) ? String(t).replace(K, "0") : Number(t), k = ({
5
7
  integer: t,
6
8
  onChange: o,
7
9
  min: s,
8
10
  max: a,
9
- onKeyDown: d,
10
- onPaste: i,
11
- ...m
12
- }) => /* @__PURE__ */ p(
13
- D,
14
- {
15
- ...m,
16
- type: "number",
17
- min: s,
18
- max: a,
19
- onChange: (e) => o?.(l(e)),
20
- onKeyDown: (e) => {
21
- if (t && N.includes(e.key)) {
22
- e.preventDefault();
23
- return;
24
- }
25
- y(e, "number", s, a), d?.(e);
26
- },
27
- onPaste: (e) => {
28
- if (t) {
29
- const c = e.clipboardData.getData("text"), r = c.replace(/\D/g, "");
30
- if (r !== c && (e.preventDefault(), r)) {
31
- const n = e.currentTarget, u = n.selectionStart ?? 0, b = n.selectionEnd ?? 0, f = n.value.slice(0, u) + r + n.value.slice(b);
32
- o?.(l(f));
33
- }
11
+ onKeyDown: i,
12
+ onPaste: p,
13
+ ...c
14
+ }) => {
15
+ const u = (e) => {
16
+ if (t && S.includes(e.key)) {
17
+ e.preventDefault();
18
+ return;
19
+ }
20
+ N(e, "number", s, a), i?.(e);
21
+ }, d = (e) => {
22
+ if (t) {
23
+ const m = e.clipboardData.getData("text"), n = m.replace(/\D/g, "");
24
+ if (n !== m && (e.preventDefault(), n)) {
25
+ const r = e.currentTarget, f = r.selectionStart ?? 0, b = r.selectionEnd ?? 0, D = r.value.slice(0, f) + n + r.value.slice(b);
26
+ o?.(l(D));
34
27
  }
35
- i?.(e);
36
28
  }
37
- }
38
- );
29
+ p?.(e);
30
+ };
31
+ return /* @__PURE__ */ g(
32
+ y,
33
+ {
34
+ ...c,
35
+ wrapperClassName: h(
36
+ w.numberInput,
37
+ c.wrapperClassName
38
+ ),
39
+ type: "number",
40
+ min: s,
41
+ max: a,
42
+ onChange: (e) => o?.(l(e)),
43
+ onKeyDown: u,
44
+ onPaste: d
45
+ }
46
+ );
47
+ };
39
48
  export {
40
- S as NumberInput
49
+ k as NumberInput
41
50
  };
@@ -1,55 +1,61 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { IconEyeOff as S, IconEye as u } from "@tabler/icons-react";
3
- import { useState as l, useEffect as d } from "react";
4
- import { GhostIconButton as E } from "../IconButton/IconButtonWrappers.js";
5
- import { Input as w } from "../Input/Input.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { IconEyeOff as c, IconEye as l } from "@tabler/icons-react";
3
+ import { useState as u, useEffect as w } from "react";
4
+ import { GhostIconButton as d } from "../IconButton/IconButtonWrappers.js";
5
+ import { Input as C } from "../Input/Input.js";
6
6
  import { DIAL_KIT_ICON_STROKE as i } from "../constants/icon.js";
7
- import { DIAL_ICON_SIZE as s } from "../../../constants/icon.js";
8
- import { ElementSize as m } from "../../../types/size.js";
9
- const C = ({
10
- showPasswordLabel: n = "Show password",
11
- hidePasswordLabel: a = "Hide password",
12
- disabled: o,
13
- size: f = m.Standard,
14
- ...p
7
+ import { DIAL_ICON_SIZE as m } from "../../../constants/icon.js";
8
+ import { ElementSize as a } from "../../../types/size.js";
9
+ import { DIAL_KIT_CLASS as _ } from "../../../constants/public-class-names.js";
10
+ import { mergeClasses as E } from "../../../utils/merge-classes.js";
11
+ const K = ({
12
+ showPasswordLabel: p = "Show password",
13
+ hidePasswordLabel: f = "Hide password",
14
+ disabled: r,
15
+ size: n = a.Standard,
16
+ ...t
15
17
  }) => {
16
- const [I, e] = l(!1), r = I && !o;
17
- return d(() => {
18
- o && e(!1);
19
- }, [o]), /* @__PURE__ */ t(
20
- w,
18
+ const [I, s] = u(!1), o = I && !r;
19
+ return w(() => {
20
+ r && s(!1);
21
+ }, [r]), /* @__PURE__ */ e(
22
+ C,
21
23
  {
22
- ...p,
23
- size: f,
24
- disabled: o,
25
- type: r ? "text" : "password",
26
- iconAfter: o ? void 0 : /* @__PURE__ */ t(
27
- E,
24
+ ...t,
25
+ wrapperClassName: E(
26
+ _.passwordInput,
27
+ t.wrapperClassName
28
+ ),
29
+ size: n,
30
+ disabled: r,
31
+ type: o ? "text" : "password",
32
+ iconAfter: r ? void 0 : /* @__PURE__ */ e(
33
+ d,
28
34
  {
29
- size: m.Small,
30
- "aria-label": r ? a : n,
31
- "aria-pressed": r,
32
- icon: r ? /* @__PURE__ */ t(
33
- S,
35
+ size: a.Small,
36
+ "aria-label": o ? f : p,
37
+ "aria-pressed": o,
38
+ icon: o ? /* @__PURE__ */ e(
39
+ c,
34
40
  {
35
- size: s.SM,
41
+ size: m.SM,
36
42
  stroke: i,
37
43
  "aria-hidden": "true"
38
44
  }
39
- ) : /* @__PURE__ */ t(
40
- u,
45
+ ) : /* @__PURE__ */ e(
46
+ l,
41
47
  {
42
- size: s.SM,
48
+ size: m.SM,
43
49
  stroke: i,
44
50
  "aria-hidden": "true"
45
51
  }
46
52
  ),
47
- onClick: () => e((c) => !c)
53
+ onClick: () => s((S) => !S)
48
54
  }
49
55
  )
50
56
  }
51
57
  );
52
58
  };
53
59
  export {
54
- C as PasswordInput
60
+ K as PasswordInput
55
61
  };
@@ -7,57 +7,58 @@ import { GhostIconButton as ie } from "../IconButton/IconButtonWrappers.js";
7
7
  import { Tooltip as le } from "../Tooltip/Tooltip.js";
8
8
  import { DIAL_KIT_ICON_STROKE as te } from "../constants/icon.js";
9
9
  import { DIAL_ICON_SIZE as ne } from "../../../constants/icon.js";
10
- import { ButtonVariant as me } from "../../../types/button.js";
11
- import { PopupSize as pe } from "../../../types/popup.js";
10
+ import { ButtonVariant as pe } from "../../../types/button.js";
11
+ import { PopupSize as me } from "../../../types/popup.js";
12
12
  import { ElementSize as ce } from "../../../types/size.js";
13
13
  import { useThemeScope as de } from "../ThemeScope/ThemeScope.js";
14
14
  import { mergeClasses as r } from "../../../utils/merge-classes.js";
15
15
  import { IconChevronLeft as ue } from "@tabler/icons-react";
16
- import { popupActionsGroupClassName as l, popupHeaderDividerClassName as fe, popupHeaderClassName as ge, popupSizeClassMap as he, popupBaseClassName as Ne, popupOverlayBaseClassName as ve, popupTitleClassName as Ce, popupFooterDividerClassName as Ie, popupFooterClassName as Fe } from "./constants.js";
17
- const Oe = ({
16
+ import { popupActionsGroupClassName as l, popupHeaderDividerClassName as fe, popupHeaderClassName as ge, popupSizeClassMap as he, popupBaseClassName as Ne, popupOverlayBaseClassName as Ce, popupTitleClassName as ve, popupFooterDividerClassName as Ie, popupFooterClassName as Fe } from "./constants.js";
17
+ import { DIAL_KIT_CLASS as Se } from "../../../constants/public-class-names.js";
18
+ const $e = ({
18
19
  open: t = !1,
19
20
  header: n,
20
21
  ariaLabel: F,
21
22
  portalId: S,
22
23
  className: x,
23
- overlayClassName: b,
24
- titleClassName: z,
25
- headerClassName: T,
26
- bodyClassName: y,
27
- children: B,
28
- footer: m,
29
- footerClassName: D,
30
- onClose: p,
24
+ overlayClassName: T,
25
+ titleClassName: _,
26
+ headerClassName: b,
27
+ bodyClassName: z,
28
+ children: D,
29
+ footer: p,
30
+ footerClassName: y,
31
+ onClose: m,
31
32
  onBack: c,
32
- backAriaLabel: P = "Back",
33
+ backAriaLabel: B = "Back",
33
34
  headerActions: d,
34
- headerDivider: _ = !1,
35
+ headerDivider: L = !1,
35
36
  mainButtons: u,
36
37
  additionalButtons: f,
37
38
  additionalButtonsOnLeft: g = !1,
38
- footerDivider: M = !1,
39
- size: R = pe.Md,
40
- hideClose: w = !1,
41
- closeAriaLabel: E = "Close dialog",
42
- closeOnOutsideClick: G = !0,
39
+ footerDivider: P = !1,
40
+ size: A = me.Md,
41
+ hideClose: M = !1,
42
+ closeAriaLabel: R = "Close dialog",
43
+ closeOnOutsideClick: w = !0,
43
44
  preventKeyboardOnOpen: h = !1
44
45
  }) => {
45
- const L = de(), N = oe(null), O = re(), { refs: v, context: a } = J({
46
+ const E = de(), N = oe(null), G = re(), { refs: C, context: a } = J({
46
47
  open: t,
47
48
  onOpenChange: (e) => {
48
- e || p?.(null);
49
+ e || m?.(null);
49
50
  }
50
- }), $ = Q(a, { role: "dialog" }), j = U(a, { outsidePress: G }), { getFloatingProps: k } = W([$, j]);
51
+ }), O = Q(a, { role: "dialog" }), $ = U(a, { outsidePress: w }), { getFloatingProps: j } = W([O, $]);
51
52
  if (!t) return null;
52
- const i = typeof n == "string" ? `popup-heading-${O}` : void 0, A = (e) => e ? typeof e == "string" ? /* @__PURE__ */ o(
53
+ const i = typeof n == "string" ? `popup-heading-${G}` : void 0, k = (e) => e ? typeof e == "string" ? /* @__PURE__ */ o(
53
54
  "h2",
54
55
  {
55
56
  id: i,
56
- className: r(Ce, z),
57
+ className: r(ve, _),
57
58
  children: /* @__PURE__ */ o(le, { tooltip: e, triggerClassName: "truncate", children: e })
58
59
  }
59
- ) : e : /* @__PURE__ */ o("span", {}), C = w ? null : /* @__PURE__ */ o(ae, { ariaLabel: E, onClose: (e) => p?.(e) }), I = (e, K = []) => K.map(({ variant: V = me.Neutral, ...Z }, q) => /* @__PURE__ */ o(se, { variant: V, ...Z }, `${e}-${q}`)), H = () => {
60
- if (m !== void 0) return m;
60
+ ) : e : /* @__PURE__ */ o("span", {}), v = M ? null : /* @__PURE__ */ o(ae, { ariaLabel: R, onClose: (e) => m?.(e) }), I = (e, K = []) => K.map(({ variant: V = pe.Neutral, ...Z }, q) => /* @__PURE__ */ o(se, { variant: V, ...Z }, `${e}-${q}`)), H = () => {
61
+ if (p !== void 0) return p;
61
62
  if (!u?.length && !f?.length) return null;
62
63
  const e = I("additional", f);
63
64
  return /* @__PURE__ */ s(
@@ -65,8 +66,8 @@ const Oe = ({
65
66
  {
66
67
  className: r(
67
68
  Fe,
68
- M && Ie,
69
- D
69
+ P && Ie,
70
+ y
70
71
  ),
71
72
  children: [
72
73
  g && e.length > 0 && /* @__PURE__ */ o("div", { className: l, children: e }),
@@ -82,27 +83,28 @@ const Oe = ({
82
83
  Y,
83
84
  {
84
85
  className: r(
85
- ve,
86
- L,
87
- b
86
+ Ce,
87
+ E,
88
+ T
88
89
  ),
89
90
  children: /* @__PURE__ */ o(
90
91
  ee,
91
92
  {
92
93
  context: a,
93
- initialFocus: h ? N : v.floating,
94
+ initialFocus: h ? N : C.floating,
94
95
  children: /* @__PURE__ */ s(
95
96
  "div",
96
97
  {
97
- ref: v.setFloating,
98
- ...k(),
98
+ ref: C.setFloating,
99
+ ...j(),
99
100
  role: "dialog",
100
101
  "aria-modal": "true",
101
102
  "aria-labelledby": i,
102
103
  "aria-label": i ? void 0 : F,
103
104
  className: r(
105
+ Se.popup,
104
106
  Ne,
105
- he[R],
107
+ he[A],
106
108
  x
107
109
  ),
108
110
  children: [
@@ -120,14 +122,14 @@ const Oe = ({
120
122
  {
121
123
  className: r(
122
124
  ge,
123
- _ && fe,
124
- T
125
+ L && fe,
126
+ b
125
127
  ),
126
128
  children: [
127
129
  c && /* @__PURE__ */ o(
128
130
  ie,
129
131
  {
130
- "aria-label": P,
132
+ "aria-label": B,
131
133
  size: ce.Small,
132
134
  className: "mr-2",
133
135
  onClick: c,
@@ -141,15 +143,15 @@ const Oe = ({
141
143
  )
142
144
  }
143
145
  ),
144
- A(n),
146
+ k(n),
145
147
  d ? /* @__PURE__ */ s("div", { className: l, children: [
146
148
  d,
147
- C
148
- ] }) : C
149
+ v
150
+ ] }) : v
149
151
  ]
150
152
  }
151
153
  ),
152
- /* @__PURE__ */ o("div", { className: r("grow overflow-auto", y), children: B }),
154
+ /* @__PURE__ */ o("div", { className: r("grow overflow-auto", z), children: D }),
153
155
  H()
154
156
  ]
155
157
  }
@@ -160,5 +162,5 @@ const Oe = ({
160
162
  ) });
161
163
  };
162
164
  export {
163
- Oe as Popup
165
+ $e as Popup
164
166
  };
@@ -3,88 +3,99 @@ import { useId as h, useCallback as y } from "react";
3
3
  import { ElementSize as N } from "../../../types/size.js";
4
4
  import { mergeClasses as r } from "../../../utils/merge-classes.js";
5
5
  import { resolveAccessibleName as v } from "../../../utils/accessible-name.js";
6
- import { Label as k } from "../Label/Label.js";
7
- const A = ({
6
+ import { Label as I } from "../Label/Label.js";
7
+ import { DIAL_KIT_CLASS as k } from "../../../constants/public-class-names.js";
8
+ const F = ({
8
9
  id: p,
9
10
  name: u,
10
- value: l,
11
+ value: i,
11
12
  labelProps: o,
12
- isSelected: i = !1,
13
+ isSelected: l = !1,
13
14
  disabled: t,
14
15
  onChange: s,
15
16
  caption: c,
16
- className: b,
17
+ className: f,
17
18
  ...n
18
19
  }) => {
19
- const f = h(), a = p ?? f, d = c ? `${a}-caption` : void 0, g = y(
20
+ const b = h(), a = p ?? b, d = c ? `${a}-caption` : void 0, g = y(
20
21
  (x) => {
21
- x.target.checked && s?.(l);
22
+ x.target.checked && s?.(i);
22
23
  },
23
- [s, l]
24
+ [s, i]
24
25
  );
25
26
  return /* @__PURE__ */ m("div", { className: "flex flex-col gap-1", children: [
26
- /* @__PURE__ */ m("div", { className: r("flex items-center gap-2 ", b), children: [
27
- /* @__PURE__ */ e(
28
- "input",
29
- {
30
- ...n,
31
- type: "radio",
32
- id: a,
33
- name: u,
34
- value: l,
35
- checked: i,
36
- disabled: t,
37
- onChange: g,
38
- "aria-label": v(
39
- typeof o?.label != "string" ? n["aria-label"] : void 0
27
+ /* @__PURE__ */ m(
28
+ "div",
29
+ {
30
+ className: r(
31
+ k.radio,
32
+ "flex items-center gap-2 ",
33
+ f
34
+ ),
35
+ children: [
36
+ /* @__PURE__ */ e(
37
+ "input",
38
+ {
39
+ ...n,
40
+ type: "radio",
41
+ id: a,
42
+ name: u,
43
+ value: i,
44
+ checked: l,
45
+ disabled: t,
46
+ onChange: g,
47
+ "aria-label": v(
48
+ typeof o?.label != "string" ? n["aria-label"] : void 0
49
+ ),
50
+ "aria-describedby": d,
51
+ className: "peer sr-only"
52
+ }
40
53
  ),
41
- "aria-describedby": d,
42
- className: "peer sr-only"
43
- }
44
- ),
45
- /* @__PURE__ */ e(
46
- "label",
47
- {
48
- htmlFor: a,
49
- className: r(
50
- "group grid size-[20px] shrink-0 place-items-center rounded-full border transition-colors duration-200 hover:bg-control-accent-alpha-hover",
51
- // 20px is below the 24x24 minimum target, so grow the pointer target
52
- // without touching the rendered size. The 44px enhanced target would
53
- // overhang by 12px per side and swallow the adjacent label.
54
- "dial-kit-minimum-target",
55
- "peer-focus-visible:outline peer-focus-visible:outline-focus",
56
- t ? "cursor-not-allowed border-default bg-control-disable-primary" : r(
57
- "cursor-pointer",
58
- i ? "border border-accent bg-control-neutral" : "border-default bg-control-neutral"
59
- )
54
+ /* @__PURE__ */ e(
55
+ "label",
56
+ {
57
+ htmlFor: a,
58
+ className: r(
59
+ "group grid size-[20px] shrink-0 place-items-center rounded-full border transition-colors duration-200 hover:bg-control-accent-alpha-hover",
60
+ // 20px is below the 24x24 minimum target, so grow the pointer target
61
+ // without touching the rendered size. The 44px enhanced target would
62
+ // overhang by 12px per side and swallow the adjacent label.
63
+ "dial-kit-minimum-target",
64
+ "peer-focus-visible:outline peer-focus-visible:outline-focus",
65
+ t ? "cursor-not-allowed border-default bg-control-disable-primary" : r(
66
+ "cursor-pointer",
67
+ l ? "border border-accent bg-control-neutral" : "border-default bg-control-neutral"
68
+ )
69
+ ),
70
+ children: l && /* @__PURE__ */ e(
71
+ "span",
72
+ {
73
+ className: r(
74
+ "size-3 rounded-full",
75
+ t ? "bg-control-disable-secondary" : "bg-control-accent"
76
+ )
77
+ }
78
+ )
79
+ }
60
80
  ),
61
- children: i && /* @__PURE__ */ e(
62
- "span",
81
+ o && /* @__PURE__ */ e(
82
+ I,
63
83
  {
84
+ size: N.Standard,
85
+ ...o,
86
+ htmlFor: a,
64
87
  className: r(
65
- "size-3 rounded-full",
66
- t ? "bg-control-disable-secondary" : "bg-control-accent"
88
+ // `Label` defaults to the secondary colour; a radio's own label is
89
+ // primary while the control is usable.
90
+ "py-[1px]",
91
+ t ? "cursor-not-allowed text-control-disable-primary" : "cursor-pointer text-primary",
92
+ o.className
67
93
  )
68
94
  }
69
95
  )
70
- }
71
- ),
72
- o && /* @__PURE__ */ e(
73
- k,
74
- {
75
- size: N.Standard,
76
- ...o,
77
- htmlFor: a,
78
- className: r(
79
- // `Label` defaults to the secondary colour; a radio's own label is
80
- // primary while the control is usable.
81
- "py-[1px]",
82
- t ? "cursor-not-allowed text-control-disable-primary" : "cursor-pointer text-primary",
83
- o.className
84
- )
85
- }
86
- )
87
- ] }),
96
+ ]
97
+ }
98
+ ),
88
99
  c && /* @__PURE__ */ e(
89
100
  "span",
90
101
  {
@@ -96,5 +107,5 @@ const A = ({
96
107
  ] });
97
108
  };
98
109
  export {
99
- A as Radio
110
+ F as Radio
100
111
  };