@epam/ai-dial-ui-kit 0.16.0-dev.44 → 0.16.0-dev.46

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 (217) hide show
  1. package/README.md +7 -10
  2. package/dist/CHANGELOG.md +9 -2
  3. package/dist/DateCellRenderer-Bx79kGGv.cjs +63 -0
  4. package/dist/MarkdownEditor-BtLY7OVq.cjs +1 -0
  5. package/dist/components/New/Grid/Grid.js +19 -14
  6. package/dist/components/New/Popup/constants.js +1 -1
  7. package/dist/components-manifest.json +520 -3036
  8. package/dist/constants/public-class-names.js +0 -7
  9. package/dist/dial-ui-kit.cjs +3 -3
  10. package/dist/dial-ui-kit.js +373 -456
  11. package/dist/editors.cjs +1 -1
  12. package/dist/editors.js +4 -10
  13. package/dist/grid.cjs +1 -1
  14. package/dist/grid.js +23 -31
  15. package/dist/{merge-classes-B0SnCG4i.cjs → icon-D93YIwGJ.cjs} +1 -1
  16. package/dist/index.css +1 -1
  17. package/dist/migration-guides/0.16.0/legacy-file-manager-removal.md +5 -3
  18. package/dist/migration-guides/0.16.0/unused-legacy-components-removal.md +128 -0
  19. package/dist/migration-guides/README.md +1 -0
  20. package/dist/node_modules/react-dnd/dist/internals/registration.js +5 -13
  21. package/dist/src/components/New/MarkdownEditor/lazy.d.ts +8 -2
  22. package/dist/src/components/New/Popup/constants.d.ts +1 -1
  23. package/dist/src/components/New/SegmentedControl/SegmentedControl.d.ts +2 -2
  24. package/dist/src/constants/public-class-names.d.ts +0 -7
  25. package/dist/src/index.d.ts +2 -53
  26. package/dist/src/subpaths/editors.d.ts +9 -15
  27. package/dist/src/subpaths/grid.d.ts +2 -8
  28. package/dist/src/types/editor.d.ts +0 -6
  29. package/dist/src/types/grid.d.ts +2 -2
  30. package/dist/src/utils/grid-registration.d.ts +6 -8
  31. package/package.json +1 -12
  32. package/dist/DateCellRenderer-FseALDXV.cjs +0 -63
  33. package/dist/IconButton-CsePS6PY.cjs +0 -1
  34. package/dist/JsonEditor-DQhHSm93.cjs +0 -1
  35. package/dist/MarkdownEditor-CvIPIbPq.cjs +0 -1
  36. package/dist/MarkdownEditor-TR6X_gdl.cjs +0 -1
  37. package/dist/MarkdownEditorContainer-JIn_VNUX.cjs +0 -1
  38. package/dist/Switch-HEL_aq23.cjs +0 -1
  39. package/dist/assets/icons/file/c.svg.js +0 -5
  40. package/dist/assets/icons/file/cpp.svg.js +0 -5
  41. package/dist/assets/icons/file/cs.svg.js +0 -5
  42. package/dist/assets/icons/file/ini.svg.js +0 -5
  43. package/dist/assets/icons/file/json.svg.js +0 -5
  44. package/dist/assets/icons/file/md.svg.js +0 -5
  45. package/dist/assets/icons/file/py.svg.js +0 -5
  46. package/dist/assets/icons/open-popup.svg.js +0 -5
  47. package/dist/components/AutocompleteInput/AutocompleteInputValue.js +0 -21
  48. package/dist/components/ButtonDropdown/ButtonDropdown.js +0 -33
  49. package/dist/components/ButtonDropdown/constants.js +0 -8
  50. package/dist/components/Checkbox/Checkbox.js +0 -64
  51. package/dist/components/Checkbox/constants.js +0 -4
  52. package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +0 -84
  53. package/dist/components/ConfirmationPopup/ConfirmationPopup.js +0 -75
  54. package/dist/components/ConfirmationPopup/constants.js +0 -32
  55. package/dist/components/DraggableItem/DraggableItem.js +0 -61
  56. package/dist/components/DraggableItem/constants.js +0 -6
  57. package/dist/components/DropdownIcon/DropdownIcon.js +0 -103
  58. package/dist/components/FileIcon/FileIcon.js +0 -37
  59. package/dist/components/FileIcon/constants.js +0 -60
  60. package/dist/components/FileName/FileName.js +0 -68
  61. package/dist/components/FolderName/FolderName.js +0 -57
  62. package/dist/components/FormItem/FormItem.js +0 -90
  63. package/dist/components/FormItem/constants.js +0 -9
  64. package/dist/components/FormPopup/FormPopup.js +0 -59
  65. package/dist/components/FormPopup/constants.js +0 -6
  66. package/dist/components/Grid/Grid.js +0 -333
  67. package/dist/components/Grid/constants.js +0 -33
  68. package/dist/components/Grid/renderers/DateCellRenderer.js +0 -27
  69. package/dist/components/Grid/renderers/constants.js +0 -25
  70. package/dist/components/InputPopup/InputPopup.js +0 -174
  71. package/dist/components/JsonEditor/JsonEditor.js +0 -65
  72. package/dist/components/JsonEditor/lazy.js +0 -4
  73. package/dist/components/MarkdownEditor/MarkdownEditor.js +0 -39
  74. package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +0 -82
  75. package/dist/components/MarkdownEditor/lazy.js +0 -4
  76. package/dist/components/Notification/Notification.js +0 -67
  77. package/dist/components/Notification/constants.js +0 -24
  78. package/dist/components/NumberInput/NumberInput.js +0 -41
  79. package/dist/components/Pagination/Pagination.js +0 -80
  80. package/dist/components/Pagination/utils.js +0 -10
  81. package/dist/components/PasswordInput/Icons/HideIcon.js +0 -16
  82. package/dist/components/PasswordInput/Icons/ShowIcon.js +0 -16
  83. package/dist/components/PasswordInput/PasswordInput.js +0 -21
  84. package/dist/components/Popup/Popup.js +0 -110
  85. package/dist/components/Popup/constants.js +0 -12
  86. package/dist/components/RadioButton/RadioButton.js +0 -103
  87. package/dist/components/RadioGroup/RadioGroup.js +0 -92
  88. package/dist/components/RadioGroup/constants.js +0 -10
  89. package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +0 -101
  90. package/dist/components/ResizableContainer/ConditionalResizableContainer.js +0 -6
  91. package/dist/components/ResizableContainer/ResizableContainer.js +0 -79
  92. package/dist/components/ResizableContainer/components/ResizeHandle.js +0 -20
  93. package/dist/components/ResizableContainer/components/ResizeIcon.js +0 -11
  94. package/dist/components/SchemaRenderer/SchemaRenderer.js +0 -151
  95. package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +0 -56
  96. package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +0 -74
  97. package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +0 -118
  98. package/dist/components/SchemaRenderer/components/SchemaField.js +0 -78
  99. package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +0 -114
  100. package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +0 -272
  101. package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +0 -36
  102. package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +0 -192
  103. package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +0 -161
  104. package/dist/components/SchemaRenderer/components/SchemaSection.js +0 -81
  105. package/dist/components/SchemaRenderer/context.js +0 -12
  106. package/dist/components/Search/Search.js +0 -63
  107. package/dist/components/Search/constants.js +0 -27
  108. package/dist/components/SegmentedControl/SegmentedControl.js +0 -87
  109. package/dist/components/SegmentedControl/constants.js +0 -8
  110. package/dist/components/Select/MultiSelectTags.js +0 -23
  111. package/dist/components/Select/Select.js +0 -435
  112. package/dist/components/Select/SelectSubMenuItem.js +0 -90
  113. package/dist/components/Select/constants.js +0 -15
  114. package/dist/components/SelectField/SelectField.js +0 -66
  115. package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +0 -34
  116. package/dist/components/Slider/Slider.js +0 -158
  117. package/dist/components/Switch/Switch.js +0 -70
  118. package/dist/components/TagInput/TagInput.js +0 -179
  119. package/dist/components/Textarea/Textarea.js +0 -43
  120. package/dist/constants/editor.js +0 -52
  121. package/dist/icon-CrGVkVpG.cjs +0 -1
  122. package/dist/icon-DhjrDQ8I.cjs +0 -1
  123. package/dist/lazy-kq-xfXXv.cjs +0 -1
  124. package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +0 -25
  125. package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +0 -21
  126. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +0 -20
  127. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +0 -19
  128. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +0 -22
  129. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +0 -15
  130. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +0 -13
  131. package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +0 -23
  132. package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +0 -88
  133. package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +0 -87
  134. package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +0 -34
  135. package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +0 -24
  136. package/dist/src/components/ButtonDropdown/constants.d.ts +0 -2
  137. package/dist/src/components/Checkbox/Checkbox.d.ts +0 -36
  138. package/dist/src/components/Checkbox/constants.d.ts +0 -1
  139. package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +0 -46
  140. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +0 -55
  141. package/dist/src/components/ConfirmationPopup/constants.d.ts +0 -18
  142. package/dist/src/components/DraggableItem/DraggableItem.d.ts +0 -33
  143. package/dist/src/components/DraggableItem/constants.d.ts +0 -3
  144. package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +0 -38
  145. package/dist/src/components/FileIcon/FileIcon.d.ts +0 -33
  146. package/dist/src/components/FileIcon/constants.d.ts +0 -9
  147. package/dist/src/components/FileName/FileName.d.ts +0 -49
  148. package/dist/src/components/FolderName/FolderName.d.ts +0 -37
  149. package/dist/src/components/FormItem/FormItem.d.ts +0 -66
  150. package/dist/src/components/FormItem/constants.d.ts +0 -3
  151. package/dist/src/components/FormPopup/FormPopup.d.ts +0 -46
  152. package/dist/src/components/FormPopup/constants.d.ts +0 -3
  153. package/dist/src/components/Grid/Grid.d.ts +0 -120
  154. package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +0 -1
  155. package/dist/src/components/Grid/constants.d.ts +0 -28
  156. package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +0 -34
  157. package/dist/src/components/Grid/renderers/constants.d.ts +0 -7
  158. package/dist/src/components/Grid/renderers/utils.d.ts +0 -1
  159. package/dist/src/components/InputPopup/InputPopup.d.ts +0 -61
  160. package/dist/src/components/JsonEditor/JsonEditor.d.ts +0 -25
  161. package/dist/src/components/JsonEditor/lazy.d.ts +0 -14
  162. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +0 -38
  163. package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +0 -51
  164. package/dist/src/components/MarkdownEditor/lazy.d.ts +0 -7
  165. package/dist/src/components/Notification/Notification.d.ts +0 -58
  166. package/dist/src/components/Notification/constants.d.ts +0 -8
  167. package/dist/src/components/NumberInput/NumberInput.d.ts +0 -34
  168. package/dist/src/components/Pagination/Pagination.d.ts +0 -11
  169. package/dist/src/components/Pagination/utils.d.ts +0 -9
  170. package/dist/src/components/PasswordInput/Icons/HideIcon.d.ts +0 -16
  171. package/dist/src/components/PasswordInput/Icons/ShowIcon.d.ts +0 -16
  172. package/dist/src/components/PasswordInput/PasswordInput.d.ts +0 -26
  173. package/dist/src/components/Popup/Popup.d.ts +0 -64
  174. package/dist/src/components/Popup/constants.d.ts +0 -5
  175. package/dist/src/components/RadioButton/RadioButton.d.ts +0 -54
  176. package/dist/src/components/RadioGroup/RadioGroup.d.ts +0 -66
  177. package/dist/src/components/RadioGroup/constants.d.ts +0 -5
  178. package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +0 -74
  179. package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +0 -35
  180. package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +0 -72
  181. package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +0 -10
  182. package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +0 -8
  183. package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +0 -30
  184. package/dist/src/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.d.ts +0 -20
  185. package/dist/src/components/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +0 -31
  186. package/dist/src/components/SchemaRenderer/components/SchemaArrayEditor.d.ts +0 -31
  187. package/dist/src/components/SchemaRenderer/components/SchemaField.d.ts +0 -29
  188. package/dist/src/components/SchemaRenderer/components/SchemaFieldContent.d.ts +0 -25
  189. package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +0 -33
  190. package/dist/src/components/SchemaRenderer/components/SchemaObjectEditor.d.ts +0 -31
  191. package/dist/src/components/SchemaRenderer/components/SchemaOneOfEditor.d.ts +0 -31
  192. package/dist/src/components/SchemaRenderer/components/SchemaPrimitiveField.d.ts +0 -31
  193. package/dist/src/components/SchemaRenderer/components/SchemaSection.d.ts +0 -33
  194. package/dist/src/components/SchemaRenderer/context.d.ts +0 -19
  195. package/dist/src/components/SchemaRenderer/types.d.ts +0 -62
  196. package/dist/src/components/SchemaRenderer/utils.d.ts +0 -1
  197. package/dist/src/components/Search/Search.d.ts +0 -35
  198. package/dist/src/components/Search/constants.d.ts +0 -8
  199. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +0 -40
  200. package/dist/src/components/SegmentedControl/constants.d.ts +0 -5
  201. package/dist/src/components/Select/MultiSelectTags.d.ts +0 -8
  202. package/dist/src/components/Select/Select.d.ts +0 -100
  203. package/dist/src/components/Select/SelectSubMenuItem.d.ts +0 -8
  204. package/dist/src/components/Select/constants.d.ts +0 -9
  205. package/dist/src/components/SelectField/SelectField.d.ts +0 -42
  206. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +0 -31
  207. package/dist/src/components/Slider/Slider.d.ts +0 -57
  208. package/dist/src/components/Switch/Switch.d.ts +0 -34
  209. package/dist/src/components/TagInput/TagInput.d.ts +0 -52
  210. package/dist/src/components/Textarea/Textarea.d.ts +0 -39
  211. package/dist/src/constants/editor.d.ts +0 -2
  212. package/dist/src/constants/storybook/form-item.d.ts +0 -3
  213. package/dist/src/models/segmented-control.d.ts +0 -7
  214. package/dist/src/types/form-item.d.ts +0 -31
  215. package/dist/src/types/select.d.ts +0 -8
  216. package/dist/types/form-item.js +0 -4
  217. package/dist/types/select.js +0 -5
@@ -1,39 +0,0 @@
1
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
- import p from "@uiw/react-md-editor";
3
- import { EditorThemes as f } from "../../types/editor.js";
4
- import { mergeClasses as x } from "../../utils/merge-classes.js";
5
- const u = ({
6
- value: e,
7
- onChange: t,
8
- height: i = 300,
9
- preview: a = "edit",
10
- theme: s = f.dark,
11
- className: d,
12
- placeholder: o,
13
- showDragbar: m = !0
14
- }) => {
15
- const l = o !== void 0 && !e;
16
- return /* @__PURE__ */ c(
17
- "div",
18
- {
19
- "data-color-mode": s,
20
- className: x("relative", d),
21
- children: [
22
- /* @__PURE__ */ r(
23
- p,
24
- {
25
- value: e,
26
- onChange: (n) => t?.(n || ""),
27
- height: i,
28
- preview: a,
29
- visibleDragbar: m
30
- }
31
- ),
32
- l && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40", children: o })
33
- ]
34
- }
35
- );
36
- };
37
- export {
38
- u as DialMarkdownEditor
39
- };
@@ -1,82 +0,0 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { useId as J, useState as u, useEffect as S, useCallback as x } from "react";
3
- import { DialSwitch as b } from "../Switch/Switch.js";
4
- import { EditorThemes as v } from "../../types/editor.js";
5
- import { DialMarkdownEditor as y } from "./MarkdownEditor.js";
6
- import { DialLabel as j } from "../Label/Label.js";
7
- const B = ({
8
- value: s,
9
- onChangeValue: l,
10
- label: t,
11
- headerContent: d,
12
- switcherLabel: a,
13
- height: c = 300,
14
- theme: m = v.dark,
15
- onValidateJSON: f,
16
- preview: C = "edit",
17
- showDragbar: N = !0
18
- }) => {
19
- const w = J(), [n, D] = u(!1), [p, E] = u(null);
20
- S(() => {
21
- n && typeof window < "u" && import("../JsonEditor/JsonEditor.js").then((o) => {
22
- E(() => o.DialJsonEditor);
23
- });
24
- }, [n]);
25
- const h = x(
26
- (o) => {
27
- l?.(o);
28
- },
29
- [l]
30
- ), g = x(
31
- (o) => {
32
- f?.(o);
33
- },
34
- [f]
35
- ), i = !!a;
36
- return /* @__PURE__ */ e("div", { className: "size-full flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ r("div", { children: [
37
- (t || d || i) && /* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-2", children: [
38
- t && /* @__PURE__ */ e(j, { label: t }),
39
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 flex-1 justify-end", children: [
40
- d,
41
- i && /* @__PURE__ */ e("label", { className: "flex items-center gap-2 cursor-pointer", children: /* @__PURE__ */ e(
42
- b,
43
- {
44
- isOn: n,
45
- label: a,
46
- switchId: w,
47
- onChange: (o) => D(o)
48
- }
49
- ) })
50
- ] })
51
- ] }),
52
- i && n ? /* @__PURE__ */ e(
53
- "div",
54
- {
55
- className: "border border-primary rounded",
56
- style: { height: `${c}px` },
57
- children: p && /* @__PURE__ */ e(
58
- p,
59
- {
60
- value: s,
61
- onChange: h,
62
- onValidateJSON: g,
63
- currentTheme: m
64
- }
65
- )
66
- }
67
- ) : /* @__PURE__ */ e(
68
- y,
69
- {
70
- value: s,
71
- onChange: h,
72
- height: c,
73
- preview: C,
74
- showDragbar: N,
75
- theme: m
76
- }
77
- )
78
- ] }) }) });
79
- };
80
- export {
81
- B as DialMarkdownEditorContainer
82
- };
@@ -1,4 +0,0 @@
1
- const o = () => import("./MarkdownEditor.js");
2
- export {
3
- o as LazyDialMarkdownEditor
4
- };
@@ -1,67 +0,0 @@
1
- import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
- import { IconX as N } from "@tabler/icons-react";
3
- import { useMemo as h } from "react";
4
- import { DialIcon as I } from "../Icon/Icon.js";
5
- import { DIAL_ICON_SIZE as v } from "../../constants/icon.js";
6
- import { NotificationVariant as u } from "../../types/notification.js";
7
- import { mergeClasses as r } from "../../utils/merge-classes.js";
8
- import { DialGhostIconButton as C } from "../IconButton/IconButtonWrappers.js";
9
- import { variantIcons as D, notificationVariantClassNameMap as g, alertBaseClassName as z } from "./constants.js";
10
- const A = ({
11
- variant: a = u.Info,
12
- title: l,
13
- message: o,
14
- className: m,
15
- iconSize: s = 24,
16
- iconStroke: t = 2,
17
- closable: c = !1,
18
- onClose: n,
19
- children: f,
20
- textClassName: d = "flex-col",
21
- ...p
22
- }) => {
23
- const x = h(() => D({ size: s, stroke: t })[a], [a, s, t]);
24
- return /* @__PURE__ */ e(
25
- "div",
26
- {
27
- ...p,
28
- role: "alert",
29
- className: r(
30
- z,
31
- g[a],
32
- m
33
- ),
34
- children: [
35
- /* @__PURE__ */ e("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
36
- /* @__PURE__ */ i(I, { icon: x }),
37
- l ? /* @__PURE__ */ e(
38
- "div",
39
- {
40
- className: r(
41
- "flex flex-col gap-1 text-primary",
42
- d
43
- ),
44
- children: [
45
- /* @__PURE__ */ i("div", { className: "dial-small-semi-text", children: l }),
46
- /* @__PURE__ */ i("div", { className: "dial-small-text", children: o })
47
- ]
48
- }
49
- ) : /* @__PURE__ */ i("div", { className: "dial-small-text text-primary", children: o })
50
- ] }),
51
- f,
52
- c && /* @__PURE__ */ i("div", { className: "relative size-[40px]", children: /* @__PURE__ */ i(
53
- C,
54
- {
55
- className: "absolute top-0 right-0 size-auto",
56
- "aria-label": "Close notification",
57
- icon: /* @__PURE__ */ i(N, { size: v.SM }),
58
- onClick: n
59
- }
60
- ) })
61
- ]
62
- }
63
- );
64
- };
65
- export {
66
- A as DialNotification
67
- };
@@ -1,24 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Spinner as n } from "../Spinner/Spinner.js";
3
- import { NotificationVariant as i } from "../../types/notification.js";
4
- import { IconCheck as o, IconCircleCheckFilled as s, IconAlertTriangleFilled as t, IconAlertCircleFilled as a, IconInfoCircleFilled as c } from "@tabler/icons-react";
5
- const b = (e) => ({
6
- info: /* @__PURE__ */ r(c, { size: e.size }),
7
- error: /* @__PURE__ */ r(a, { size: e.size }),
8
- warning: /* @__PURE__ */ r(t, { size: e.size }),
9
- success: /* @__PURE__ */ r(s, { size: e.size }),
10
- loading: /* @__PURE__ */ r(n, { size: e.size }),
11
- general: /* @__PURE__ */ r(o, { size: e.size, stroke: e.stroke })
12
- }), m = {
13
- [i.Info]: "bg-info border-info text-info",
14
- [i.Success]: "bg-success border-success text-success",
15
- [i.Warning]: "bg-warning border-warning text-warning",
16
- [i.Error]: "bg-error border-error text-error",
17
- [i.Loading]: "bg-info border-info text-info",
18
- [i.General]: "bg-sunken border-secondary text-primary"
19
- }, z = "items-center justify-between relative gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex";
20
- export {
21
- z as alertBaseClassName,
22
- m as notificationVariantClassNameMap,
23
- b as variantIcons
24
- };
@@ -1,41 +0,0 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { DialInput as m } from "../Input/Input.js";
3
- import { handleKeyDown as h } from "../Input/utils.js";
4
- const y = /^0+\.(\d+)?$/, I = /^0+/, x = ({
5
- integer: r,
6
- onChange: o,
7
- min: s,
8
- max: a,
9
- onKeyDown: i,
10
- onPaste: d,
11
- ...g
12
- }) => {
13
- const c = (e) => !e || e === "-" ? e : String(e)?.match(y) ? String(e)?.replace(I, "0") : Number(e);
14
- return /* @__PURE__ */ f(
15
- m,
16
- {
17
- type: "number",
18
- min: s,
19
- max: a,
20
- onChange: (e) => o?.(c(e)),
21
- onKeyDown: r ? (e) => {
22
- if ([".", "-", "+", "e", "E"].includes(e.key)) {
23
- e.preventDefault();
24
- return;
25
- }
26
- h(e, "number", s, a);
27
- } : i,
28
- onPaste: r ? (e) => {
29
- const l = e.clipboardData.getData("text"), n = l.replace(/\D/g, "");
30
- if (n !== l && (e.preventDefault(), n)) {
31
- const t = e.currentTarget, D = t.selectionStart ?? 0, p = t.selectionEnd ?? 0, u = t.value.slice(0, D) + n + t.value.slice(p);
32
- o?.(c(u));
33
- }
34
- } : d,
35
- ...g
36
- }
37
- );
38
- };
39
- export {
40
- x as DialNumberInput
41
- };
@@ -1,80 +0,0 @@
1
- import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
- import { IconCaretLeftFilled as u, IconCaretRightFilled as x } from "@tabler/icons-react";
3
- import { DialIconButton as o } from "../IconButton/IconButton.js";
4
- import { mergeClasses as n } from "../../utils/merge-classes.js";
5
- import { DIAL_ICON_SIZE as c } from "../../constants/icon.js";
6
- import { ElementSize as m } from "../../types/size.js";
7
- import { getPageRange as y, PageDisplayType as r, getPageDisplayType as b } from "./utils.js";
8
- const C = ({
9
- page: e,
10
- totalPages: t,
11
- onPageChange: l,
12
- className: p
13
- }) => {
14
- const d = y(t);
15
- return /* @__PURE__ */ f(
16
- "nav",
17
- {
18
- "aria-label": "Pagination",
19
- className: n("flex items-center gap-2", p),
20
- children: [
21
- /* @__PURE__ */ i(
22
- o,
23
- {
24
- icon: /* @__PURE__ */ i(
25
- u,
26
- {
27
- size: c.SM,
28
- className: "text-secondary"
29
- }
30
- ),
31
- size: m.Small,
32
- className: "!p-0 items-center flex justify-center",
33
- disabled: e <= 1,
34
- onClick: () => l(e - 1),
35
- "aria-label": "Previous page"
36
- }
37
- ),
38
- /* @__PURE__ */ i("div", { className: "flex flex-row items-center gap-2", children: d.map((a) => {
39
- const s = b(a, e, t);
40
- return /* @__PURE__ */ i(
41
- "button",
42
- {
43
- type: "button",
44
- onClick: () => l(a),
45
- "aria-label": `Page ${a}`,
46
- "aria-current": a === e ? "page" : void 0,
47
- className: n(
48
- "dial-pagination-dot rounded-full focus-visible:outline outline-offset-0 transition-all duration-300 ease-in-out",
49
- s === r.Active && "h-[8px] w-[32px]",
50
- s === r.Adjacent && "size-[8px]",
51
- s === r.Far && "size-[4px]"
52
- )
53
- },
54
- a
55
- );
56
- }) }),
57
- /* @__PURE__ */ i(
58
- o,
59
- {
60
- icon: /* @__PURE__ */ i(
61
- x,
62
- {
63
- size: c.SM,
64
- className: "text-secondary"
65
- }
66
- ),
67
- size: m.Small,
68
- className: "!p-0 items-center flex justify-center",
69
- disabled: e >= t,
70
- onClick: () => l(e + 1),
71
- "aria-label": "Next page"
72
- }
73
- )
74
- ]
75
- }
76
- );
77
- };
78
- export {
79
- C as DialPagination
80
- };
@@ -1,10 +0,0 @@
1
- const a = 7, A = 2, c = (r) => r <= 0 ? [] : Array.from({ length: r }, (t, n) => n + 1);
2
- var e = /* @__PURE__ */ ((r) => (r.Active = "active", r.Adjacent = "adjacent", r.Far = "far", r))(e || {});
3
- const f = (r, t, n) => r === t ? "active" : n < 7 || Math.abs(r - t) <= 2 ? "adjacent" : "far";
4
- export {
5
- A as ADJACENT_WINDOW,
6
- a as MANY_PAGES_THRESHOLD,
7
- e as PageDisplayType,
8
- f as getPageDisplayType,
9
- c as getPageRange
10
- };
@@ -1,16 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { IconEyeOff as t } from "@tabler/icons-react";
3
- import { BASE_ICON_PROPS as e } from "../../../constants/icon.js";
4
- const f = ({ onClick: r }) => /* @__PURE__ */ o(
5
- t,
6
- {
7
- ...e,
8
- className: "text-primary",
9
- onClick: r,
10
- role: "button",
11
- "aria-label": "hide"
12
- }
13
- );
14
- export {
15
- f as DialHideIcon
16
- };
@@ -1,16 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { IconEye as t } from "@tabler/icons-react";
3
- import { BASE_ICON_PROPS as m } from "../../../constants/icon.js";
4
- const l = ({ onClick: o }) => /* @__PURE__ */ r(
5
- t,
6
- {
7
- ...m,
8
- className: "text-primary",
9
- onClick: o,
10
- role: "button",
11
- "aria-label": "show"
12
- }
13
- );
14
- export {
15
- l as DialShowIcon
16
- };
@@ -1,21 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useState as i, useCallback as n } from "react";
3
- import { DialHideIcon as s } from "./Icons/HideIcon.js";
4
- import { DialShowIcon as m } from "./Icons/ShowIcon.js";
5
- import { DialInput as u } from "../Input/Input.js";
6
- const h = ({ ...t }) => {
7
- const [e, l] = i(!1), a = n((r) => {
8
- l(r);
9
- }, []);
10
- return /* @__PURE__ */ o(
11
- u,
12
- {
13
- type: e ? "text" : "password",
14
- ...t,
15
- iconAfter: t.disabled ? null : e ? /* @__PURE__ */ o(s, { onClick: () => a(!1) }) : /* @__PURE__ */ o(m, { onClick: () => a(!0) })
16
- }
17
- );
18
- };
19
- export {
20
- h as DialPasswordInput
21
- };
@@ -1,110 +0,0 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
- import { useFloating as M, useRole as S, useDismiss as R, useInteractions as j, FloatingPortal as B, FloatingOverlay as L, FloatingFocusManager as T } from "@floating-ui/react";
3
- import i from "classnames";
4
- import { useRef as _ } from "react";
5
- import { DialCloseButton as A } from "../CloseButton/CloseButton.js";
6
- import { DialTooltip as E } from "../Tooltip/Tooltip.js";
7
- import { PopupSize as G } from "../../types/popup.js";
8
- import { popupHeaderClassName as H, popupDividerClassName as c, popupSizeClassMap as O, overlayBaseClassName as Z } from "./constants.js";
9
- import { mergeClasses as k } from "../../utils/merge-classes.js";
10
- import { DIAL_ICON_SIZE as q } from "../../constants/icon.js";
11
- const oe = ({
12
- open: s = !1,
13
- header: r,
14
- portalId: f,
15
- className: g,
16
- overlayClassName: h,
17
- titleClassName: N,
18
- headerClassName: v,
19
- dividers: x = !0,
20
- dividerFooter: C = !0,
21
- children: F,
22
- footer: l,
23
- onClose: t,
24
- size: y = G.Md,
25
- hideClose: D = !1,
26
- closeOnOutsideClick: I = !0,
27
- preventKeyboardOnOpen: n = !1
28
- }) => {
29
- const p = _(null), { refs: m, context: a } = M({
30
- open: s,
31
- onOpenChange: (o) => {
32
- o || t?.(null);
33
- }
34
- }), b = S(a, { role: "dialog" }), P = R(a, { outsidePress: I }), { getFloatingProps: w } = j([b, P]);
35
- if (!s) return null;
36
- const d = typeof r == "string" ? "dial-popup-heading" : void 0, z = (o) => o ? typeof o == "string" ? /* @__PURE__ */ e(
37
- "h3",
38
- {
39
- id: d,
40
- className: i(
41
- "flex-1 min-w-0 mr-3 truncate dial-h3-text text-primary",
42
- N
43
- ),
44
- children: /* @__PURE__ */ e(E, { tooltip: o, children: o })
45
- }
46
- ) : o : /* @__PURE__ */ e("span", {});
47
- return /* @__PURE__ */ e(B, { id: f, children: /* @__PURE__ */ e(
48
- L,
49
- {
50
- className: i(Z, h),
51
- children: /* @__PURE__ */ e(
52
- T,
53
- {
54
- context: a,
55
- initialFocus: n ? p : m.floating,
56
- children: /* @__PURE__ */ u(
57
- "div",
58
- {
59
- ref: m.setFloating,
60
- ...w(),
61
- role: "dialog",
62
- "aria-modal": "true",
63
- "aria-labelledby": d,
64
- className: i(
65
- "dial-popup",
66
- O[y],
67
- x && c,
68
- g
69
- ),
70
- children: [
71
- n && /* @__PURE__ */ e(
72
- "div",
73
- {
74
- ref: p,
75
- tabIndex: -1,
76
- "aria-hidden": !0,
77
- className: "absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"
78
- }
79
- ),
80
- /* @__PURE__ */ u(
81
- "div",
82
- {
83
- className: k(H, v),
84
- children: [
85
- z(r),
86
- !D && /* @__PURE__ */ e(
87
- A,
88
- {
89
- size: q.SM,
90
- ariaLabel: "Close dialog",
91
- onClose: (o) => t?.(o)
92
- }
93
- )
94
- ]
95
- }
96
- ),
97
- /* @__PURE__ */ e("div", { className: "grow overflow-auto", "aria-label": "popup-description", children: F }),
98
- C && !l && /* @__PURE__ */ e("div", { className: c }),
99
- l
100
- ]
101
- }
102
- )
103
- }
104
- )
105
- }
106
- ) });
107
- };
108
- export {
109
- oe as DialPopup
110
- };
@@ -1,12 +0,0 @@
1
- import { PopupSize as p } from "../../types/popup.js";
2
- const o = "z-popup flex items-center justify-center bg-blackout md:p-4", s = "divide-tertiary divide-y", i = "flex flex-row justify-between py-4 px-6 items-center", t = {
3
- [p.Sm]: "dial-sm-popup",
4
- [p.Md]: "dial-md-popup",
5
- [p.Lg]: "dial-lg-popup"
6
- };
7
- export {
8
- o as overlayBaseClassName,
9
- s as popupDividerClassName,
10
- i as popupHeaderClassName,
11
- t as popupSizeClassMap
12
- };
@@ -1,103 +0,0 @@
1
- import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
- import a from "classnames";
3
- const F = ({
4
- name: d,
5
- value: i,
6
- label: s,
7
- description: l,
8
- checked: o = !1,
9
- inputId: c,
10
- className: f,
11
- labelClassName: N,
12
- disabled: e,
13
- onChange: u,
14
- descriptionClassName: y,
15
- containerClassName: h,
16
- caption: r,
17
- oneLineCaption: n = !1
18
- }) => {
19
- const x = `${c}-desc`, p = a(
20
- "dial-small-text cursor-pointer py-[1px]",
21
- e ? "text-secondary" : "text-primary",
22
- N,
23
- e && "cursor-not-allowed"
24
- ), w = a(
25
- "cursor-pointer dial-input-radio",
26
- !!s && "mr-2",
27
- f,
28
- e && "!cursor-not-allowed"
29
- ), g = a(
30
- "flex flex-col",
31
- !!l && "mb-2",
32
- e && "cursor-not-allowed",
33
- h
34
- ), C = a(
35
- "dial-tiny-text mt-2 ml-[26px] text-secondary",
36
- y,
37
- e && "cursor-not-allowed"
38
- ), v = (j) => {
39
- e || j.target.checked && u?.(i);
40
- };
41
- return /* @__PURE__ */ m("div", { className: g, children: [
42
- /* @__PURE__ */ m(
43
- "div",
44
- {
45
- className: a(
46
- "flex flex-row",
47
- (!r || n) && "items-center"
48
- ),
49
- children: [
50
- /* @__PURE__ */ t(
51
- "input",
52
- {
53
- type: "radio",
54
- id: c,
55
- name: d,
56
- value: i,
57
- checked: o,
58
- disabled: e,
59
- "aria-describedby": o && l ? x : void 0,
60
- className: w,
61
- onChange: v
62
- }
63
- ),
64
- (s || r) && /* @__PURE__ */ m(
65
- "div",
66
- {
67
- className: a(
68
- "flex",
69
- n ? "flex-1 flex-row items-center gap-2" : "flex-col gap-1"
70
- ),
71
- children: [
72
- s && /* @__PURE__ */ t(
73
- "label",
74
- {
75
- className: p,
76
- htmlFor: c,
77
- "aria-describedby": r ? "caption" : "",
78
- children: s
79
- }
80
- ),
81
- r && /* @__PURE__ */ t(
82
- "span",
83
- {
84
- id: "caption",
85
- className: a(
86
- "dial-tiny-text text-secondary",
87
- n && "ml-auto"
88
- ),
89
- children: r
90
- }
91
- )
92
- ]
93
- }
94
- )
95
- ]
96
- }
97
- ),
98
- o && l && /* @__PURE__ */ t("div", { id: x, className: C, children: l })
99
- ] });
100
- };
101
- export {
102
- F as DialRadioButton
103
- };