@epam/ai-dial-ui-kit 0.15.0-dev.3 → 0.15.0-dev.31

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 (168) hide show
  1. package/README.md +185 -0
  2. package/dist/CHANGELOG.md +48 -0
  3. package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-BFEh4rXZ.cjs} +26 -26
  4. package/dist/DateCellRenderer-J1V3xwF7.cjs +1 -0
  5. package/dist/IconButton-DHOFapLo.cjs +1 -0
  6. package/dist/{JsonEditor-qv1Z0dLX.cjs → JsonEditor-BDe6elKO.cjs} +1 -1
  7. package/dist/{MarkdownEditor-DHn2pYOJ.cjs → MarkdownEditor-C7BONfsl.cjs} +1 -1
  8. package/dist/{MarkdownEditor-jQ8nDJfx.cjs → MarkdownEditor-FVzYMdkC.cjs} +1 -1
  9. package/dist/{MarkdownEditorContainer-Bzcnoemw.cjs → MarkdownEditorContainer-GvlxX6kx.cjs} +1 -1
  10. package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
  11. package/dist/components/Button/constants.js +9 -8
  12. package/dist/components/Dropdown/Dropdown.js +70 -65
  13. package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
  14. package/dist/components/Dropdown/constants.js +16 -14
  15. package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
  16. package/dist/components/FileManager/FileManager.js +373 -372
  17. package/dist/components/FileManager/FileManagerProvider.js +266 -264
  18. package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
  19. package/dist/components/New/Accordion/Accordion.js +87 -71
  20. package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
  21. package/dist/components/New/Breadcrumbs/constants.js +41 -0
  22. package/dist/components/New/Button/Button.js +32 -32
  23. package/dist/components/New/Button/ButtonWrappers.js +93 -37
  24. package/dist/components/New/Button/constants.js +3 -0
  25. package/dist/components/New/Button/utils.js +18 -8
  26. package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
  27. package/dist/components/New/Calendar/Calendar.js +337 -289
  28. package/dist/components/New/Calendar/constants.js +5 -5
  29. package/dist/components/New/CaptionText/CaptionText.js +18 -15
  30. package/dist/components/New/CardShell/CardShell.js +5 -3
  31. package/dist/components/New/Checkbox/Checkbox.js +67 -56
  32. package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
  33. package/dist/components/New/CloseButton/CloseButton.js +18 -16
  34. package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
  35. package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
  36. package/dist/components/New/Dropdown/Dropdown.js +112 -105
  37. package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
  38. package/dist/components/New/Dropdown/constants.js +22 -17
  39. package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
  40. package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
  41. package/dist/components/New/FileIcon/FileIcon.js +55 -0
  42. package/dist/components/New/FileIcon/constants.js +134 -0
  43. package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
  44. package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
  45. package/dist/components/New/FileName/FileName.js +78 -0
  46. package/dist/components/New/FilterChips/FilterChips.js +43 -0
  47. package/dist/components/New/FilterChips/constants.js +5 -0
  48. package/dist/components/New/FolderName/FolderName.js +16 -0
  49. package/dist/components/New/FolderPath/FolderPath.js +29 -28
  50. package/dist/components/New/Highlight/Highlight.js +23 -30
  51. package/dist/components/New/IconButton/IconButton.js +30 -28
  52. package/dist/components/New/InfoButton/InfoButton.js +13 -11
  53. package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
  54. package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
  55. package/dist/components/New/InteractiveTooltip/constants.js +2 -2
  56. package/dist/components/New/Label/Label.js +13 -8
  57. package/dist/components/New/MenuItem/MenuItem.js +29 -27
  58. package/dist/components/New/MenuItem/constants.js +9 -8
  59. package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
  60. package/dist/components/New/Notification/Notification.js +33 -29
  61. package/dist/components/New/NumberInput/NumberInput.js +42 -33
  62. package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
  63. package/dist/components/New/Popup/Popup.js +46 -44
  64. package/dist/components/New/Popup/constants.js +3 -3
  65. package/dist/components/New/Radio/Radio.js +75 -64
  66. package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
  67. package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
  68. package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
  69. package/dist/components/New/Search/Search.js +29 -27
  70. package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
  71. package/dist/components/New/Select/Select.js +120 -109
  72. package/dist/components/New/Select/constants.js +23 -20
  73. package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
  74. package/dist/components/New/Switch/Switch.js +69 -58
  75. package/dist/components/New/Tabs/Tabs.js +125 -61
  76. package/dist/components/New/Tag/Tag.js +42 -40
  77. package/dist/components/New/TagInput/TagInput.js +48 -44
  78. package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
  79. package/dist/components/New/Tooltip/TooltipContent.js +11 -9
  80. package/dist/components/New/Tooltip/constants.js +1 -1
  81. package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
  82. package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
  83. package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
  84. package/dist/components/New/TransferQueue/constants.js +24 -0
  85. package/dist/components/New/constants/overlay.js +15 -9
  86. package/dist/components/Popup/constants.js +8 -8
  87. package/dist/components/ProgressBar/ProgressBar.js +45 -33
  88. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
  89. package/dist/components/SchemaRenderer/components/SchemaField.js +19 -19
  90. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +18 -18
  91. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
  92. package/dist/components/SchemaRenderer/types.js +19 -8
  93. package/dist/components/SchemaRenderer/utils.js +122 -95
  94. package/dist/components/Skeleton/Skeleton.js +25 -19
  95. package/dist/components/Spinner/Spinner.js +7 -5
  96. package/dist/components/Tooltip/TooltipContent.js +11 -11
  97. package/dist/components-manifest.json +830 -31
  98. package/dist/constants/public-class-names.js +198 -0
  99. package/dist/dial-ui-kit.cjs +2 -2
  100. package/dist/dial-ui-kit.js +330 -302
  101. package/dist/editors.cjs +1 -1
  102. package/dist/file-manager.cjs +1 -1
  103. package/dist/grid.cjs +1 -1
  104. package/dist/index.css +2 -2
  105. package/dist/lazy-BEsZqouS.cjs +1 -0
  106. package/dist/merge-classes-BEJXjzkx.cjs +1 -0
  107. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
  108. package/dist/src/components/FileManager/FileManager.d.ts +2 -0
  109. package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
  110. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
  111. package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
  112. package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
  113. package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
  114. package/dist/src/components/New/Button/Button.d.ts +4 -1
  115. package/dist/src/components/New/Button/ButtonWrappers.d.ts +20 -0
  116. package/dist/src/components/New/Button/utils.d.ts +15 -0
  117. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
  118. package/dist/src/components/New/Calendar/Calendar.d.ts +14 -1
  119. package/dist/src/components/New/Calendar/constants.d.ts +1 -1
  120. package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
  121. package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
  122. package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
  123. package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
  124. package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
  125. package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
  126. package/dist/src/components/New/FileName/FileName.d.ts +79 -0
  127. package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
  128. package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
  129. package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
  130. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
  131. package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
  132. package/dist/src/components/New/Notification/Notification.d.ts +18 -0
  133. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  134. package/dist/src/components/New/Select/constants.d.ts +3 -2
  135. package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
  136. package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
  137. package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
  138. package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
  139. package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
  140. package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
  141. package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
  142. package/dist/src/components/New/constants/overlay.d.ts +13 -0
  143. package/dist/src/components/Popup/constants.d.ts +1 -1
  144. package/dist/src/components/SchemaRenderer/types.d.ts +11 -0
  145. package/dist/src/components/SchemaRenderer/utils.d.ts +10 -1
  146. package/dist/src/constants/public-class-names.d.ts +189 -0
  147. package/dist/src/index.d.ts +22 -1
  148. package/dist/src/types/accordion.d.ts +7 -0
  149. package/dist/src/types/breadcrumbs.d.ts +9 -0
  150. package/dist/src/types/button.d.ts +1 -0
  151. package/dist/src/types/transfer-queue.d.ts +10 -0
  152. package/dist/src/utils/__tests__/timezone.spec.d.ts +1 -0
  153. package/dist/src/utils/sub-menu-floating.d.ts +7 -4
  154. package/dist/src/utils/timezone.d.ts +24 -0
  155. package/dist/types/accordion.js +4 -0
  156. package/dist/types/breadcrumbs.js +4 -0
  157. package/dist/types/button.js +3 -3
  158. package/dist/types/transfer-queue.js +4 -0
  159. package/dist/use-file-manager-tabs-C0h1Sq5T.cjs +3 -0
  160. package/dist/utils/merge-classes.js +12 -5
  161. package/dist/utils/sub-menu-floating.js +98 -54
  162. package/dist/utils/timezone.js +19 -0
  163. package/package.json +3 -3
  164. package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
  165. package/dist/IconButton-DWqoaBWf.cjs +0 -1
  166. package/dist/lazy-tfN4sKhq.cjs +0 -1
  167. package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
  168. package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
@@ -1,45 +1,46 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { IconFolder as p, IconChevronRight as I } from "@tabler/icons-react";
3
- import { DialBreadcrumb as f } from "../../Breadcrumb/Breadcrumb.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { IconFolder as I, IconChevronRight as f } from "@tabler/icons-react";
3
+ import { DialBreadcrumb as h } from "../../Breadcrumb/Breadcrumb.js";
4
4
  import { DialIcon as t } from "../../Icon/Icon.js";
5
5
  import { DIAL_KIT_ICON_STROKE as s } from "../constants/icon.js";
6
- import { DIAL_ICON_SIZE as h } from "../../../constants/icon.js";
7
- import { mergeClasses as x } from "../../../utils/merge-classes.js";
8
- const F = ({
9
- segments: r,
10
- labelClassName: l = "dial-small-text",
11
- leafClassName: m = "dial-small-semi-text",
12
- className: i,
13
- ariaLabel: c = "Folder path"
6
+ import { DIAL_ICON_SIZE as x } from "../../../constants/icon.js";
7
+ import { mergeClasses as l } from "../../../utils/merge-classes.js";
8
+ import { DIAL_KIT_CLASS as N } from "../../../constants/public-class-names.js";
9
+ const y = ({
10
+ segments: e,
11
+ labelClassName: m = "dial-small-text",
12
+ leafClassName: i = "dial-small-semi-text",
13
+ className: c,
14
+ ariaLabel: d = "Folder path"
14
15
  }) => {
15
- const n = /* @__PURE__ */ e(
16
+ const n = /* @__PURE__ */ r(
16
17
  t,
17
18
  {
18
- icon: /* @__PURE__ */ e(
19
- p,
19
+ icon: /* @__PURE__ */ r(
20
+ I,
20
21
  {
21
- size: h.SM,
22
+ size: x.SM,
22
23
  stroke: s,
23
24
  "aria-hidden": "true"
24
25
  }
25
26
  ),
26
27
  className: "text-secondary"
27
28
  }
28
- ), d = r.map((o, a) => ({
29
- label: a === r.length - 1 ? /* @__PURE__ */ e("span", { className: m, children: o }) : o,
29
+ ), p = e.map((o, a) => ({
30
+ label: a === e.length - 1 ? /* @__PURE__ */ r("span", { className: i, children: o }) : o,
30
31
  disabled: !0,
31
32
  ...a === 0 ? { iconBefore: n } : {}
32
33
  }));
33
- return /* @__PURE__ */ e(
34
- f,
34
+ return /* @__PURE__ */ r(
35
+ h,
35
36
  {
36
- className: i,
37
- ariaLabel: c,
38
- separator: /* @__PURE__ */ e(
37
+ className: l(c, N.folderPath),
38
+ ariaLabel: d,
39
+ separator: /* @__PURE__ */ r(
39
40
  t,
40
41
  {
41
- icon: /* @__PURE__ */ e(
42
- I,
42
+ icon: /* @__PURE__ */ r(
43
+ f,
43
44
  {
44
45
  size: 14,
45
46
  stroke: s,
@@ -50,9 +51,9 @@ const F = ({
50
51
  className: "text-secondary"
51
52
  }
52
53
  ),
53
- pathItems: d,
54
- labelClassName: x(
55
- l,
54
+ pathItems: p,
55
+ labelClassName: l(
56
+ m,
56
57
  "text-secondary",
57
58
  "!cursor-default"
58
59
  )
@@ -60,5 +61,5 @@ const F = ({
60
61
  );
61
62
  };
62
63
  export {
63
- F as FolderPath
64
+ y as FolderPath
64
65
  };
@@ -1,50 +1,43 @@
1
- import { jsx as c, jsxs as h, Fragment as g } from "react/jsx-runtime";
2
- import { mergeClasses as s } from "../../../utils/merge-classes.js";
3
- import { EllipsisTooltip as t } from "../EllipsisTooltip/EllipsisTooltip.js";
1
+ import { jsx as a, jsxs as h, Fragment as g } from "react/jsx-runtime";
2
+ import { mergeClasses as t } from "../../../utils/merge-classes.js";
3
+ import { EllipsisTooltip as o } from "../EllipsisTooltip/EllipsisTooltip.js";
4
+ import { DIAL_KIT_CLASS as C } from "../../../constants/public-class-names.js";
4
5
  const i = {
5
6
  2: "line-clamp-2",
6
7
  3: "line-clamp-3",
7
8
  4: "line-clamp-4",
8
9
  5: "line-clamp-5",
9
10
  6: "line-clamp-6"
10
- }, C = (e) => e === 1 ? "!truncate !whitespace-nowrap" : `${i[e] ?? i[2]} !whitespace-normal`, d = ({
11
+ }, N = (e) => e === 1 ? "!truncate !whitespace-nowrap" : `${i[e] ?? i[2]} !whitespace-normal`, S = ({
11
12
  text: e,
12
- query: a,
13
- markClassName: m,
14
- className: n,
13
+ query: s,
14
+ markClassName: n,
15
+ className: m,
15
16
  maxLines: r = 2
16
17
  }) => {
17
- const o = C(r);
18
- if (!a.trim())
19
- return /* @__PURE__ */ c(
20
- t,
21
- {
22
- className: s(o, n),
23
- text: e
24
- }
25
- );
26
- const l = e.toLowerCase().indexOf(a.toLowerCase()), p = l === -1 ? e : /* @__PURE__ */ h(g, { children: [
18
+ const c = t(
19
+ N(r),
20
+ m,
21
+ C.highlight
22
+ );
23
+ if (!s.trim())
24
+ return /* @__PURE__ */ a(o, { className: c, text: e });
25
+ const l = e.toLowerCase().indexOf(s.toLowerCase()), p = l === -1 ? e : /* @__PURE__ */ h(g, { children: [
27
26
  e.slice(0, l),
28
- /* @__PURE__ */ c(
27
+ /* @__PURE__ */ a(
29
28
  "mark",
30
29
  {
31
- className: s(
30
+ className: t(
32
31
  "text-accent bg-control-accent-alpha-hover",
33
- m
32
+ n
34
33
  ),
35
- children: e.slice(l, l + a.length)
34
+ children: e.slice(l, l + s.length)
36
35
  }
37
36
  ),
38
- e.slice(l + a.length)
37
+ e.slice(l + s.length)
39
38
  ] });
40
- return /* @__PURE__ */ c(
41
- t,
42
- {
43
- className: s(o, n),
44
- text: p
45
- }
46
- );
39
+ return /* @__PURE__ */ a(o, { className: c, text: p });
47
40
  };
48
41
  export {
49
- d as Highlight
42
+ S as Highlight
50
43
  };
@@ -1,46 +1,48 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { ButtonAppearance as b } from "../../../types/button.js";
3
- import { mergeClasses as u } from "../../../utils/merge-classes.js";
4
- import { resolveAccessibleName as p } from "../../../utils/accessible-name.js";
5
- import { ElementSize as t } from "../../../types/size.js";
6
- import { Tooltip as S } from "../Tooltip/Tooltip.js";
7
- import { getButtonClassNames as f } from "../Button/utils.js";
8
- const g = {
9
- [t.Small]: "size-[24px]",
10
- [t.Standard]: "size-[40px] dial-kit-enhanced-target",
11
- [t.Large]: "size-[48px] dial-kit-enhanced-target"
12
- }, B = ({
13
- variant: a,
14
- appearance: n = b.Solid,
15
- size: l = t.Standard,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { ButtonAppearance as u } from "../../../types/button.js";
3
+ import { mergeClasses as S } from "../../../utils/merge-classes.js";
4
+ import { resolveAccessibleName as f } from "../../../utils/accessible-name.js";
5
+ import { ElementSize as e } from "../../../types/size.js";
6
+ import { Tooltip as g } from "../Tooltip/Tooltip.js";
7
+ import { getButtonClassNames as p, getDisabledButtonProps as C } from "../Button/utils.js";
8
+ const h = {
9
+ [e.Small]: "size-[24px]",
10
+ [e.Standard]: "size-[40px] dial-kit-enhanced-target",
11
+ [e.Large]: "size-[48px] dial-kit-enhanced-target"
12
+ }, I = ({
13
+ variant: i,
14
+ appearance: r = u.Solid,
15
+ size: l = e.Standard,
16
16
  className: m,
17
17
  icon: s,
18
- tooltipProps: e,
18
+ tooltipProps: t,
19
19
  type: c = "button",
20
- ...o
20
+ disabled: d,
21
+ ...a
21
22
  }) => {
22
- const d = u(
23
+ const b = S(
23
24
  "dial-kit-base-icon-button dial-kit-base-button",
24
- a && f(a, n),
25
+ i && p(i, r),
25
26
  // 24px is below the AAA target size, so only the larger tiers get the
26
27
  // enhanced pointer target — see the accessibility rules in AGENTS.md.
27
- g[l],
28
+ h[l],
28
29
  m
29
- ), i = /* @__PURE__ */ r(
30
+ ), n = /* @__PURE__ */ o(
30
31
  "button",
31
32
  {
32
- ...o,
33
+ ...a,
34
+ ...C(d, t, a.onClick),
33
35
  type: c,
34
- className: d,
35
- "aria-label": p(
36
- o["aria-label"],
37
- e?.tooltip
36
+ className: b,
37
+ "aria-label": f(
38
+ a["aria-label"],
39
+ t?.tooltip
38
40
  ),
39
41
  children: s
40
42
  }
41
43
  );
42
- return e ? /* @__PURE__ */ r(S, { asChild: !0, ...e, children: i }) : i;
44
+ return t ? /* @__PURE__ */ o(g, { asChild: !0, ...t, children: n }) : n;
43
45
  };
44
46
  export {
45
- B as IconButton
47
+ I as IconButton
46
48
  };
@@ -1,39 +1,41 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { IconInfoCircle as n } from "@tabler/icons-react";
3
3
  import { DIAL_KIT_ICON_STROKE as l } from "../constants/icon.js";
4
- import { DIAL_ICON_SIZE as s } from "../../../constants/icon.js";
5
- import { ElementSize as m } from "../../../types/size.js";
4
+ import { DIAL_ICON_SIZE as m } from "../../../constants/icon.js";
5
+ import { ElementSize as s } from "../../../types/size.js";
6
6
  import { mergeClasses as a } from "../../../utils/merge-classes.js";
7
7
  import { IconButton as c } from "../IconButton/IconButton.js";
8
- const S = ({
8
+ import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
9
+ const b = ({
9
10
  caption: o,
10
- onClick: e,
11
- "aria-label": r
11
+ onClick: r,
12
+ "aria-label": e
12
13
  }) => {
13
14
  if (!o) return null;
14
15
  const i = a(
15
16
  "text-secondary hover:text-control-accent-hover active:text-control-accent-active",
16
- "focus-visible:outline focus-visible:outline-focus"
17
+ "focus-visible:outline focus-visible:outline-focus",
18
+ f.infoButton
17
19
  );
18
20
  return /* @__PURE__ */ t(
19
21
  c,
20
22
  {
21
- "aria-label": r,
23
+ "aria-label": e,
22
24
  className: i,
23
25
  icon: /* @__PURE__ */ t(
24
26
  n,
25
27
  {
26
- size: s.SM,
28
+ size: m.SM,
27
29
  stroke: l,
28
30
  "aria-hidden": "true"
29
31
  }
30
32
  ),
31
- onClick: e,
32
- size: m.Small,
33
+ onClick: r,
34
+ size: s.Small,
33
35
  tooltipProps: { tooltip: o }
34
36
  }
35
37
  );
36
38
  };
37
39
  export {
38
- S as InfoButton
40
+ b as InfoButton
39
41
  };
@@ -1,96 +1,114 @@
1
- import { jsx as c, jsxs as y } from "react/jsx-runtime";
2
- import { IconChevronDown as N } from "@tabler/icons-react";
3
- import { useState as p, useMemo as D, useCallback as O } from "react";
4
- import { Dropdown as _ } from "../Dropdown/Dropdown.js";
5
- import { DIAL_KIT_ICON_STROKE as K } from "../constants/icon.js";
6
- import { DIAL_ICON_SIZE as E } from "../../../constants/icon.js";
7
- import { mergeClasses as f } from "../../../utils/merge-classes.js";
8
- import { ElementSize as T } from "../../../types/size.js";
9
- const j = ({
1
+ import { jsx as s, jsxs as E } from "react/jsx-runtime";
2
+ import { IconChevronDown as j } from "@tabler/icons-react";
3
+ import { useState as b, useCallback as v, useMemo as w } from "react";
4
+ import { Dropdown as z } from "../Dropdown/Dropdown.js";
5
+ import { DIAL_KIT_ICON_STROKE as M } from "../constants/icon.js";
6
+ import { DIAL_ICON_SIZE as U } from "../../../constants/icon.js";
7
+ import { mergeClasses as I } from "../../../utils/merge-classes.js";
8
+ import { ElementSize as $ } from "../../../types/size.js";
9
+ import { DIAL_KIT_CLASS as R } from "../../../constants/public-class-names.js";
10
+ const Z = ({
10
11
  label: e,
11
- size: a,
12
+ size: l,
12
13
  isOpen: n = !1,
14
+ labelClassName: a,
15
+ className: c,
13
16
  "aria-label": t,
14
- ...r
17
+ ...m
15
18
  }) => {
16
- const l = a === T.Small ? "h-[32px]" : "h-[40px] dial-kit-enhanced-target";
17
- return /* @__PURE__ */ y(
19
+ const d = l === $.Small ? "h-[32px]" : "h-[40px] dial-kit-enhanced-target";
20
+ return /* @__PURE__ */ E(
18
21
  "button",
19
22
  {
20
23
  type: "button",
24
+ ...m,
21
25
  "aria-haspopup": "menu",
22
26
  "aria-expanded": n,
23
27
  "aria-label": t ? `${t} ${e}` : void 0,
24
- className: f(
28
+ className: I(
25
29
  "dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus",
26
30
  "flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-primary",
27
31
  "hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",
28
- l,
29
- r.className
32
+ d,
33
+ c,
34
+ R.inlineSelect
30
35
  ),
31
- ...r,
32
36
  children: [
33
- e,
34
- /* @__PURE__ */ c(
35
- N,
37
+ /* @__PURE__ */ s("span", { className: a, children: e }),
38
+ /* @__PURE__ */ s(
39
+ j,
36
40
  {
37
- size: E.MD,
38
- stroke: K,
41
+ size: U.MD,
42
+ stroke: M,
39
43
  "aria-hidden": !0,
40
- className: f("transition-transform", n && "rotate-180")
44
+ className: I("transition-transform", n && "rotate-180")
41
45
  }
42
46
  )
43
47
  ]
44
48
  }
45
49
  );
46
- }, Z = ({
50
+ }, W = ({
47
51
  items: e,
48
- selectedKey: a,
52
+ selectedKey: l,
49
53
  defaultSelectedKey: n,
50
- onSelect: t,
51
- size: r,
52
- disabled: l,
53
- placement: d = "bottom-end",
54
- matchReferenceWidth: u = !1,
55
- listClassName: b,
56
- ariaLabel: h
54
+ onSelect: a,
55
+ size: c,
56
+ disabled: t,
57
+ placement: m = "bottom-end",
58
+ matchReferenceWidth: d = !1,
59
+ listClassName: C,
60
+ listStyle: S,
61
+ ariaLabel: g,
62
+ triggerClassName: x,
63
+ triggerLabelClassName: N,
64
+ open: p,
65
+ onOpenChange: u
57
66
  }) => {
58
- const [v, I] = p(!1), [x, g] = p(
67
+ const [k, y] = b(!1), r = p !== void 0, O = r ? p : k, _ = v(
68
+ (o) => {
69
+ r || y(o), u?.(o);
70
+ },
71
+ [r, u]
72
+ ), [D, K] = b(
59
73
  n ?? e[0]?.key
60
- ), s = a !== void 0, m = s ? a : x, C = D(() => {
61
- const o = e.find((i) => i.key === m);
74
+ ), f = l !== void 0, h = f ? l : D, A = w(() => {
75
+ const o = e.find((i) => i.key === h);
62
76
  return o?.label ? String(o.label) : "";
63
- }, [e, m]), S = O(
77
+ }, [e, h]), L = v(
64
78
  ({ key: o }) => {
65
- const i = e.find((k) => k.key === o);
66
- i && (s || g(o), t?.(i));
79
+ const i = e.find((T) => T.key === o);
80
+ i && (f || K(o), a?.(i));
67
81
  },
68
- [e, s, t]
82
+ [e, f, a]
69
83
  );
70
- return /* @__PURE__ */ c(
71
- _,
84
+ return /* @__PURE__ */ s(
85
+ z,
72
86
  {
73
87
  items: e,
74
- placement: d,
75
- matchReferenceWidth: u,
76
- listClassName: b,
77
- disabled: l,
78
- onOpenChange: I,
79
- onItemClick: S,
80
- children: /* @__PURE__ */ c(
81
- j,
88
+ placement: m,
89
+ matchReferenceWidth: d,
90
+ listClassName: C,
91
+ listStyle: S,
92
+ disabled: t,
93
+ open: r ? p : void 0,
94
+ onOpenChange: _,
95
+ onItemClick: L,
96
+ children: /* @__PURE__ */ s(
97
+ Z,
82
98
  {
83
- label: C,
84
- size: r,
85
- isOpen: v,
86
- disabled: l,
87
- "aria-label": h
99
+ label: A,
100
+ size: c,
101
+ isOpen: O,
102
+ disabled: t,
103
+ "aria-label": g,
104
+ className: x,
105
+ labelClassName: N
88
106
  }
89
107
  )
90
108
  }
91
109
  );
92
110
  };
93
111
  export {
94
- Z as InlineSelect,
95
- j as InlineSelectTrigger
112
+ W as InlineSelect,
113
+ Z as InlineSelectTrigger
96
114
  };
@@ -1,57 +1,58 @@
1
- import { jsx as n, jsxs as w, Fragment as D } from "react/jsx-runtime";
2
- import { useFloatingNodeId as H, useFloating as U, autoUpdate as G, offset as Y, flip as k, shift as q, useHover as z, safePolygon as B, useFocus as J, useDismiss as K, useInteractions as Q, useMergeRefs as u, FloatingPortal as W, FloatingFocusManager as X } from "@floating-ui/react";
1
+ import { jsx as n, jsxs as j, Fragment as w } from "react/jsx-runtime";
2
+ import { useFloatingNodeId as H, useFloating as U, autoUpdate as G, offset as K, flip as Y, shift as k, useHover as q, safePolygon as z, useFocus as B, useDismiss as J, useInteractions as Q, useMergeRefs as u, FloatingPortal as W, FloatingFocusManager as X } from "@floating-ui/react";
3
3
  import { useState as Z, useRef as $, useMemo as d, isValidElement as ee, cloneElement as oe } from "react";
4
- import { useThemeScope as se } from "../ThemeScope/ThemeScope.js";
5
- import { useIsMobileScreen as te } from "../../../hooks/use-is-mobile-screen.js";
4
+ import { useThemeScope as te } from "../ThemeScope/ThemeScope.js";
5
+ import { useIsMobileScreen as se } from "../../../hooks/use-is-mobile-screen.js";
6
6
  import { TooltipPlacement as ne } from "../../../types/tooltip.js";
7
7
  import { mergeClasses as g } from "../../../utils/merge-classes.js";
8
8
  import { INTERACTIVE_TOOLTIP_GAP as le, INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY as ae, interactiveTooltipClassName as re } from "./constants.js";
9
+ import { DIAL_KIT_CLASS as ie } from "../../../constants/public-class-names.js";
9
10
  const Re = ({
10
11
  content: a,
11
- placement: R = ne.Right,
12
+ placement: T = ne.Right,
12
13
  children: e,
13
- asChild: F = !1,
14
- hideTooltip: T = !1,
15
- initialOpen: h = !1,
16
- open: s,
17
- onOpenChange: I,
14
+ asChild: I = !1,
15
+ hideTooltip: R = !1,
16
+ initialOpen: F = !1,
17
+ open: t,
18
+ onOpenChange: h,
18
19
  triggerClassName: r,
19
20
  contentClassName: E
20
21
  }) => {
21
- const P = te(), C = se(), [N, O] = Z(h), i = s ?? N, v = (m) => {
22
- I?.(m), s == null && O(m);
23
- }, M = H(), { refs: t, floatingStyles: _, context: o } = U({
24
- nodeId: M,
25
- placement: R,
22
+ const P = se(), C = te(), [v, N] = Z(F), i = t ?? v, O = (m) => {
23
+ h?.(m), t == null && N(m);
24
+ }, _ = H(), { refs: s, floatingStyles: S, context: o } = U({
25
+ nodeId: _,
26
+ placement: T,
26
27
  open: i,
27
- onOpenChange: v,
28
+ onOpenChange: O,
28
29
  whileElementsMounted: G,
29
30
  middleware: [
30
- Y(le),
31
+ K(le),
31
32
  /* No `fallbackAxisSideDirection`: a panel placed to the right should
32
33
  flip to the left when it does not fit, not drop to the perpendicular
33
34
  top/bottom axis, which reads as the panel landing in the wrong place.*/
34
- k({ padding: 5 }),
35
- q({ padding: 5 })
35
+ Y({ padding: 5 }),
36
+ k({ padding: 5 })
36
37
  ]
37
- }), S = z(o, {
38
- enabled: s == null,
38
+ }), A = q(o, {
39
+ enabled: t == null,
39
40
  /* Lets the pointer cross the gap between the trigger and the panel
40
41
  without closing it, so it can actually be reached and used. */
41
- handleClose: B(),
42
+ handleClose: z(),
42
43
  delay: { open: ae, close: 0 }
43
- }), V = J(o, { enabled: s == null }), b = K(o), { getReferenceProps: c, getFloatingProps: x } = Q([
44
- S,
45
- V,
46
- b
47
- ]), y = $(null), A = u(
48
- d(() => [t.setFloating, y], [t.setFloating])
49
- ), f = F && ee(e), l = f ? e.props?.ref : null, p = u(
44
+ }), M = B(o, { enabled: t == null }), L = J(o), { getReferenceProps: c, getFloatingProps: V } = Q([
45
+ A,
46
+ M,
47
+ L
48
+ ]), b = $(null), x = u(
49
+ d(() => [s.setFloating, b], [s.setFloating])
50
+ ), f = I && ee(e), l = f ? e.props?.ref : null, p = u(
50
51
  d(
51
- () => [t.setReference, ...l ? [l] : []],
52
- [t.setReference, l]
52
+ () => [s.setReference, ...l ? [l] : []],
53
+ [s.setReference, l]
53
54
  )
54
- ), L = !T && !P && !!a, j = f ? oe(
55
+ ), y = !R && !P && !!a, D = f ? oe(
55
56
  e,
56
57
  c({
57
58
  ...e.props,
@@ -70,9 +71,9 @@ const Re = ({
70
71
  children: e
71
72
  }
72
73
  );
73
- return /* @__PURE__ */ w(D, { children: [
74
- j,
75
- i && L && /* @__PURE__ */ n(W, { id: "interactive-tooltip-portal", children: /* @__PURE__ */ n(
74
+ return /* @__PURE__ */ j(w, { children: [
75
+ D,
76
+ i && y && /* @__PURE__ */ n(W, { id: "interactive-tooltip-portal", children: /* @__PURE__ */ n(
76
77
  X,
77
78
  {
78
79
  context: o,
@@ -83,14 +84,15 @@ const Re = ({
83
84
  children: /* @__PURE__ */ n(
84
85
  "div",
85
86
  {
86
- ref: A,
87
+ ref: x,
87
88
  "data-placement": o.placement,
88
- style: _,
89
- ...x(),
89
+ style: S,
90
+ ...V(),
90
91
  className: g(
91
92
  re,
92
93
  C,
93
- E
94
+ E,
95
+ ie.interactiveTooltip
94
96
  ),
95
97
  children: a
96
98
  }
@@ -1,6 +1,6 @@
1
- const t = 8, a = 400, T = "z-[54] max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md";
1
+ const t = 8, a = 400, e = "z-interactive-tooltip max-w-[320px] rounded-xl bg-layer-0 p-4 dial-small-text text-primary shadow-md";
2
2
  export {
3
3
  t as INTERACTIVE_TOOLTIP_GAP,
4
4
  a as INTERACTIVE_TOOLTIP_HOVER_OPEN_DELAY,
5
- T as interactiveTooltipClassName
5
+ e as interactiveTooltipClassName
6
6
  };
@@ -1,19 +1,24 @@
1
1
  import { jsxs as t, jsx as r, Fragment as d } from "react/jsx-runtime";
2
2
  import { mergeClasses as s } from "../../../utils/merge-classes.js";
3
- import { ElementSize as n } from "../../../types/size.js";
3
+ import { ElementSize as a } from "../../../types/size.js";
4
4
  import { InfoButton as p } from "../InfoButton/InfoButton.js";
5
- const g = ({
5
+ import { DIAL_KIT_CLASS as f } from "../../../constants/public-class-names.js";
6
+ const N = ({
6
7
  label: e,
7
- required: a,
8
+ required: n,
8
9
  className: i,
9
10
  containerClassName: l,
10
11
  caption: m,
11
- size: o = n.Small,
12
+ size: o = a.Small,
12
13
  ...c
13
14
  }) => e ? /* @__PURE__ */ t(
14
15
  "span",
15
16
  {
16
- className: s("flex items-center gap-0.5", l),
17
+ className: s(
18
+ "flex items-center gap-0.5",
19
+ l,
20
+ f.label
21
+ ),
17
22
  children: [
18
23
  /* @__PURE__ */ t(
19
24
  "label",
@@ -21,12 +26,12 @@ const g = ({
21
26
  ...c,
22
27
  className: s(
23
28
  "text-secondary flex items-center gap-0.5",
24
- o === n.Small ? "dial-tiny-semi-text" : "dial-small-text",
29
+ o === a.Small ? "dial-tiny-semi-text" : "dial-small-text",
25
30
  i
26
31
  ),
27
32
  children: [
28
33
  typeof e == "string" ? /* @__PURE__ */ r("span", { className: "min-h-4", children: e }) : e,
29
- a && /* @__PURE__ */ t(d, { children: [
34
+ n && /* @__PURE__ */ t(d, { children: [
30
35
  /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "text-error dial-tiny-text", children: "*" }),
31
36
  /* @__PURE__ */ r("span", { className: "sr-only", children: "(required)" })
32
37
  ] })
@@ -38,5 +43,5 @@ const g = ({
38
43
  }
39
44
  ) : null;
40
45
  export {
41
- g as Label
46
+ N as Label
42
47
  };