aristid-ds 20.0.0 → 20.2.0

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 (194) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/dist/Kit/App/index.js +1 -1
  3. package/dist/Kit/DataDisplay/Avatar/index.js +1 -1
  4. package/dist/Kit/DataDisplay/Badge/index.js +1 -1
  5. package/dist/Kit/DataDisplay/Card/index.js +1 -1
  6. package/dist/Kit/DataDisplay/Carousel/index.js +1 -1
  7. package/dist/Kit/DataDisplay/Comment/index.js +1 -1
  8. package/dist/Kit/DataDisplay/Empty/index.js +1 -1
  9. package/dist/Kit/DataDisplay/Error/index.js +1 -1
  10. package/dist/Kit/DataDisplay/IdCard/index.js +1 -1
  11. package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
  12. package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
  13. package/dist/Kit/DataDisplay/Kanban/KanbanCard.d.ts +12 -0
  14. package/dist/Kit/DataDisplay/Kanban/KanbanColumn.d.ts +20 -0
  15. package/dist/Kit/DataDisplay/Kanban/KanbanItem.d.ts +14 -0
  16. package/dist/Kit/DataDisplay/Kanban/index.d.ts +8 -0
  17. package/dist/Kit/DataDisplay/Kanban/index.js +1 -0
  18. package/dist/Kit/DataDisplay/Kanban/types.d.ts +114 -0
  19. package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
  20. package/dist/Kit/DataDisplay/Tab/TabDropdownButton.d.ts +7 -0
  21. package/dist/Kit/DataDisplay/Tab/index.d.ts +6 -1
  22. package/dist/Kit/DataDisplay/Tab/index.js +1 -1
  23. package/dist/Kit/DataDisplay/Tab/types.d.ts +8 -0
  24. package/dist/Kit/DataDisplay/Table/KitTableExpandButton.d.ts +2 -1
  25. package/dist/Kit/DataDisplay/Table/index.js +1 -1
  26. package/dist/Kit/DataDisplay/Tag/index.js +1 -1
  27. package/dist/Kit/DataDisplay/Tag/types.d.ts +12 -1
  28. package/dist/Kit/DataDisplay/ToolBar/index.d.ts +3 -0
  29. package/dist/Kit/DataDisplay/ToolBar/index.js +1 -0
  30. package/dist/Kit/DataDisplay/ToolBar/types.d.ts +11 -0
  31. package/dist/Kit/DataEntry/AutoComplete/index.js +2 -2
  32. package/dist/Kit/DataEntry/Checkbox/index.js +1 -1
  33. package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
  34. package/dist/Kit/DataEntry/DatePicker/DatePicker.d.ts +1 -1
  35. package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +1 -1
  36. package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
  37. package/dist/Kit/DataEntry/DatePicker/preset/useActiveDatePickerPreset.d.ts +1 -1
  38. package/dist/Kit/DataEntry/DatePicker/types.d.ts +2 -0
  39. package/dist/Kit/DataEntry/Filter/FilterButton.d.ts +1 -2
  40. package/dist/Kit/DataEntry/Filter/index.js +1 -1
  41. package/dist/Kit/DataEntry/Filter/types.d.ts +19 -3
  42. package/dist/Kit/DataEntry/Input/index.js +1 -1
  43. package/dist/Kit/DataEntry/Input/types.d.ts +1 -0
  44. package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
  45. package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -0
  46. package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
  47. package/dist/Kit/DataEntry/Radio/index.js +1 -1
  48. package/dist/Kit/DataEntry/Rate/index.js +1 -1
  49. package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
  50. package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
  51. package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.d.ts +3 -3
  52. package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js +28 -18
  53. package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/types.d.ts +4 -0
  54. package/dist/Kit/DataEntry/RichText/MenuBar/ShowMoreButton.d.ts +1 -1
  55. package/dist/Kit/DataEntry/RichText/MenuBar/index.d.ts +1 -1
  56. package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
  57. package/dist/Kit/DataEntry/RichText/MenuBar/types.d.ts +2 -0
  58. package/dist/Kit/DataEntry/RichText/index.js +1 -1
  59. package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
  60. package/dist/Kit/DataEntry/Select/LoadingSuffix.d.ts +2 -0
  61. package/dist/Kit/DataEntry/Select/index.js +1 -1
  62. package/dist/Kit/DataEntry/TreeSelect/index.js +1 -1
  63. package/dist/Kit/DataEntry/TreeSelect/useIcons.d.ts +4 -2
  64. package/dist/Kit/DataEntry/Upload/index.js +1 -1
  65. package/dist/Kit/Feedback/Alert/index.js +1 -1
  66. package/dist/Kit/Feedback/Modal/index.js +1 -1
  67. package/dist/Kit/Feedback/Notification/index.js +1 -1
  68. package/dist/Kit/Feedback/Progress/index.js +1 -1
  69. package/dist/Kit/Feedback/SnackBar/index.js +5 -1
  70. package/dist/Kit/General/Button/index.js +1 -1
  71. package/dist/Kit/General/DynamicActions/index.js +1 -1
  72. package/dist/Kit/General/Icon/index.js +1 -1
  73. package/dist/Kit/General/Typography/index.js +1 -1
  74. package/dist/Kit/Layout/PageLayout/index.js +1 -1
  75. package/dist/Kit/Navigation/DropDown/index.js +52 -38
  76. package/dist/Kit/Navigation/Header/index.js +1 -1
  77. package/dist/Kit/Navigation/PageHeader/index.js +1 -1
  78. package/dist/Kit/Navigation/Pagination/index.js +1 -1
  79. package/dist/Kit/Navigation/SideMenu/index.js +1 -1
  80. package/dist/Kit/Navigation/SidePanel/index.js +1 -1
  81. package/dist/Kit/index.d.ts +4 -0
  82. package/dist/Kit/index.js +62 -60
  83. package/dist/assets/App.css +1 -1
  84. package/dist/assets/Button.css +1 -1
  85. package/dist/assets/ColorPicker.css +1 -1
  86. package/dist/assets/DatePicker.css +1 -1
  87. package/dist/assets/Filter.css +1 -1
  88. package/dist/assets/Input.css +1 -1
  89. package/dist/assets/Kanban.css +1 -0
  90. package/dist/assets/LoadingSuffix.css +1 -0
  91. package/dist/assets/MenuBar.css +1 -1
  92. package/dist/assets/RichText.css +1 -1
  93. package/dist/assets/SideMenu.css +1 -1
  94. package/dist/assets/Tab.css +1 -1
  95. package/dist/assets/Tag.css +1 -1
  96. package/dist/assets/ToolBar.css +1 -0
  97. package/dist/assets/icons/loader/faKitLoader.d.ts +2 -0
  98. package/dist/chunks/{Alert.CQaVbuFR.js → Alert.CHcxwc-7.js} +2 -2
  99. package/dist/chunks/{App.D0rw9orm.js → App.DEAyG_cT.js} +4 -4
  100. package/dist/chunks/{Avatar.BHlNyW0q.js → Avatar.CHhPAXNx.js} +1 -1
  101. package/dist/chunks/{Avatar.DysCcyLq.js → Avatar.CPy-hK8w.js} +1 -1
  102. package/dist/chunks/{Badge.B__O4nmc.js → Badge.tu17MdMt.js} +1 -1
  103. package/dist/chunks/Button.Cf2t8x-g.js +152 -0
  104. package/dist/chunks/{Card.Cq08rN_s.js → Card.BifWds4Q.js} +1 -1
  105. package/dist/chunks/{Carousel.BlbPUDYo.js → Carousel.D_UPa7c6.js} +2 -1
  106. package/dist/chunks/{Checkbox.CklNShKc.js → Checkbox.C0E-Lf9F.js} +1 -1
  107. package/dist/chunks/{ColorPicker.gPY0qyUV.js → ColorPicker.CXPDOjlD.js} +5 -5
  108. package/dist/chunks/{Comment.DmUzK6J4.js → Comment.D3uQOVRA.js} +1 -1
  109. package/dist/chunks/DatePicker.CZ7uUpci.js +283 -0
  110. package/dist/chunks/{DynamicActions.DK0mupe6.js → DynamicActions.B0RCwP59.js} +1 -1
  111. package/dist/chunks/{Empty.kPH-hJ9V.js → Empty.C_H88Lwp.js} +1 -1
  112. package/dist/chunks/{Error.CYRnZXNg.js → Error.DtFtGSNd.js} +1 -1
  113. package/dist/chunks/Filter.bcFfECQ2.js +91 -0
  114. package/dist/chunks/{FontSizeSelect.CFAIqibs.js → FontSizeSelect.BEujUTOk.js} +1 -1
  115. package/dist/chunks/{Header.C7xrnZDI.js → Header.CjmOOvCM.js} +3 -3
  116. package/dist/chunks/{Icon.DRPmn7dQ.js → Icon.DbHbt0HM.js} +1 -1
  117. package/dist/chunks/{IdCard.Dx6_WU3t.js → IdCard.DcdzxJ6s.js} +1 -1
  118. package/dist/chunks/{Input.CNLvspAE.js → Input.NJ0gxOKB.js} +201 -177
  119. package/dist/chunks/InputNumber.ArmZWyjD.js +59 -0
  120. package/dist/chunks/{InputWrapper.DXw2Vcpa.js → InputWrapper.UG5UbUiq.js} +1 -1
  121. package/dist/chunks/{InternalSizeChanger.CvYkvotd.js → InternalSizeChanger.4uhUYdQf.js} +2 -2
  122. package/dist/chunks/{ItemCard.CyPAPDy2.js → ItemCard.I_EZWDr7.js} +4 -4
  123. package/dist/chunks/{ItemList.Cy8wRu3i.js → ItemList.ZRUcXI2B.js} +4 -4
  124. package/dist/chunks/Kanban.DlRMF3Pf.js +478 -0
  125. package/dist/chunks/{LinkButton.CzpCbe5U.js → LinkButton.VSCUoTOf.js} +3 -3
  126. package/dist/chunks/LoadingSuffix.DoHzo7nz.js +13 -0
  127. package/dist/chunks/MenuBar.BKo3YUWL.js +86 -0
  128. package/dist/chunks/{Modal.Bi8z9VE0.js → Modal.BGfgvCM-.js} +5 -5
  129. package/dist/chunks/{Notification.BrJDgjWr.js → Notification.BvB2WQpw.js} +4 -4
  130. package/dist/chunks/{PageHeader.CLKSCN4a.js → PageHeader.CK5neQHJ.js} +3 -3
  131. package/dist/chunks/{PageLayout.D4BnVUAq.js → PageLayout.CypWl6mK.js} +2 -2
  132. package/dist/chunks/{Pagination.Dqci6TDr.js → Pagination.D2RZjMJN.js} +1 -1
  133. package/dist/chunks/{Progress.DIpbT4Go.js → Progress.DGZSgm84.js} +1 -1
  134. package/dist/chunks/{Radio.Cik5u8WU.js → Radio.BpOV2_Ga.js} +1 -1
  135. package/dist/chunks/{Rate.DOR2Ky6x.js → Rate.ClZk2tCh.js} +1 -1
  136. package/dist/chunks/{RedirectCard.C-uKjgcb.js → RedirectCard.NBOpek7n.js} +3 -3
  137. package/dist/chunks/{RichText.D98AWkBw.js → RichText.D_VsFypi.js} +73 -73
  138. package/dist/chunks/{SearchInput.De_qSxro.js → SearchInput.C7EnHTpX.js} +1 -1
  139. package/dist/chunks/Select.DAAdVERs.js +247 -0
  140. package/dist/chunks/{SideMenu.DQiL42Il.js → SideMenu.Cd2GjK9u.js} +9 -9
  141. package/dist/chunks/{SidePanel.C5nMMMse.js → SidePanel.C-fXIhny.js} +3 -3
  142. package/dist/chunks/SnackBar.CEjyTWJG.js +82 -0
  143. package/dist/chunks/Tab.BQDQSuOg.js +281 -0
  144. package/dist/chunks/{Table.BN-UWSUv.js → Table.DPRSm9mV.js} +63 -55
  145. package/dist/chunks/{Tag.gcpIeECV.js → Tag.By8jS_2F.js} +9 -9
  146. package/dist/chunks/ToolBar.qYFzjJ3S.js +22 -0
  147. package/dist/chunks/{TreeSelect.BRaAmKyc.js → TreeSelect.DD8WhA4W.js} +97 -95
  148. package/dist/chunks/{Typography.MRyLnlCD.js → Typography.dSdY4EZz.js} +1 -1
  149. package/dist/chunks/{Upload.CXHhjlnm.js → Upload.DxszpKf4.js} +5 -5
  150. package/dist/chunks/faKitLoader.BJKbv-bm.js +13 -0
  151. package/dist/chunks/{functions.Cjvxsib3.js → functions.m4ADIGGk.js} +2 -2
  152. package/dist/chunks/useLoadingWidthLock.CzCPeVNp.js +13 -0
  153. package/dist/index.d.ts +2 -0
  154. package/dist/index.es.js +56 -54
  155. package/dist/index.umd.js +4 -4
  156. package/dist/theme/aristid/general/utilities/index.js +12 -6
  157. package/dist/theme/types/utilities/index.d.ts +18 -0
  158. package/dist/theme/utils/tokens-mapper/DataEntry/DatePicker/index.d.ts +1 -0
  159. package/dist/theme/utils/tokens-mapper/DataEntry/DatePicker/index.js +1 -0
  160. package/dist/theme/utils/tokens-mapper/DataEntry/Input/index.d.ts +1 -0
  161. package/dist/theme/utils/tokens-mapper/DataEntry/Input/index.js +1 -0
  162. package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.d.ts +1 -0
  163. package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.js +1 -0
  164. package/dist/translation/en-US/components/DataDisplay/Kanban/index.d.ts +2 -0
  165. package/dist/translation/en-US/components/DataDisplay/Kanban/index.js +16 -0
  166. package/dist/translation/en-US/components/DataDisplay/Tab/index.js +5 -1
  167. package/dist/translation/en-US/index.js +34 -30
  168. package/dist/translation/fr-FR/components/DataDisplay/Kanban/index.d.ts +2 -0
  169. package/dist/translation/fr-FR/components/DataDisplay/Kanban/index.js +16 -0
  170. package/dist/translation/fr-FR/components/DataDisplay/Tab/index.js +5 -1
  171. package/dist/translation/fr-FR/index.js +34 -30
  172. package/dist/translation/pt-PT/components/DataDisplay/Kanban/index.d.ts +2 -0
  173. package/dist/translation/pt-PT/components/DataDisplay/Kanban/index.js +16 -0
  174. package/dist/translation/pt-PT/components/DataDisplay/Tab/index.js +5 -1
  175. package/dist/translation/pt-PT/index.js +34 -30
  176. package/dist/translation/types/components/DataDisplay/Kanban/index.d.ts +16 -0
  177. package/dist/translation/types/components/DataDisplay/Tab/index.d.ts +2 -0
  178. package/dist/translation/types/index.d.ts +2 -0
  179. package/dist/utils/functions/colorVariants.d.ts +18 -0
  180. package/dist/utils/functions/index.d.ts +1 -2
  181. package/dist/utils/functions/index.js +1 -1
  182. package/dist/utils/functions/types.d.ts +6 -0
  183. package/dist/utils/hooks/useLoadingWidthLock.d.ts +2 -0
  184. package/package.json +17 -19
  185. package/dist/assets/styles.css +0 -1
  186. package/dist/chunks/Button.mFkl13ue.js +0 -145
  187. package/dist/chunks/DatePicker.CtiOTI4X.js +0 -267
  188. package/dist/chunks/Filter.ByG4s-gy.js +0 -83
  189. package/dist/chunks/InputNumber.CtaH9tBG.js +0 -52
  190. package/dist/chunks/MenuBar.DigScTZX.js +0 -68
  191. package/dist/chunks/Select.S4xsr0eN.js +0 -248
  192. package/dist/chunks/SnackBar.CdNbNCdU.js +0 -83
  193. package/dist/chunks/Tab.BLLuv1ds.js +0 -188
  194. package/dist/chunks/styles.module.DRkuoXqe.js +0 -3
@@ -1,68 +0,0 @@
1
- import { t as e } from "./Divider.C-DXVgoI.js";
2
- import { n as t } from "./useKitTheme.P5Q2DIyI.js";
3
- import { t as n } from "./FontSizeSelect.CFAIqibs.js";
4
- import { KitMenuActionList as r } from "../Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js";
5
- import { B as i } from "./Ant.m5ItQOpq.js";
6
- import { n as a } from "./useKitLocale.Y5XHnnYS.js";
7
- import { KitButtonTooltip as o } from "../Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js";
8
- import { KitUndoRedoButtons as s } from "../Kit/DataEntry/RichText/MenuBar/UndoRedoButtons/index.js";
9
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
- import u from "classnames";
11
- import { faEllipsisVertical as d } from "@fortawesome/free-solid-svg-icons";
12
- import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
13
- import { useEditorState as p } from "@tiptap/react";
14
- import '../assets/MenuBar.css';// src/Kit/DataEntry/RichText/MenuBar/styles.module.scss
15
- var m = {
16
- "kit-rich-text-menu-bar": "_kit-rich-text-menu-bar_lkmdo_1",
17
- "kit-rich-text-menu-popover": "_kit-rich-text-menu-popover_lkmdo_2"
18
- }, h = ({ editor: e, onImageUpload: t }) => {
19
- let { locale: n } = a();
20
- return c(o, {
21
- title: n.RichText?.moreOptions,
22
- children: c(i, {
23
- trigger: "click",
24
- placement: "bottom",
25
- zIndex: 1010,
26
- arrow: !1,
27
- classNames: { root: m["kit-rich-text-menu-popover"] },
28
- content: c("div", {
29
- className: "kit-rich-text-menu-popover-options",
30
- children: c(r, {
31
- editor: e,
32
- onImageUpload: t
33
- })
34
- }),
35
- children: c("button", {
36
- type: "button",
37
- "aria-label": n.RichText?.moreOptions,
38
- className: "show-more",
39
- children: c(f, { icon: d })
40
- })
41
- })
42
- });
43
- }, g = ({ editor: i, onImageUpload: a }) => {
44
- let { appId: o } = t();
45
- p({
46
- editor: i,
47
- selector: ({ transactionNumber: e }) => e
48
- });
49
- let d = u(o, m["kit-rich-text-menu-bar"], "menu-bar");
50
- return l("div", {
51
- className: d,
52
- children: [
53
- c(s, { editor: i }),
54
- c(e, { orientation: "vertical" }),
55
- c(n, { editor: i }),
56
- c(e, { orientation: "vertical" }),
57
- c(r, {
58
- editor: i,
59
- onImageUpload: a
60
- }),
61
- c(h, {
62
- editor: i,
63
- onImageUpload: a
64
- })
65
- ]
66
- });
67
- };
68
- export { g as t };
@@ -1,248 +0,0 @@
1
- import { t as e } from "./InputWrapper.DXw2Vcpa.js";
2
- import { n as t } from "./useKitTheme.P5Q2DIyI.js";
3
- import { n } from "./useKitLocale.Y5XHnnYS.js";
4
- import { t as r } from "./styles.module.DRkuoXqe.js";
5
- import { t as i } from "./Icon.DRPmn7dQ.js";
6
- import { t as a } from "./Typography.MRyLnlCD.js";
7
- import { t as o } from "./useDeprecatedInputWrapper.CZ2-c80o.js";
8
- import { t as s } from "./useGetPopupContainer.Bcn4zw7O.js";
9
- import { t as c } from "./IdCard.Dx6_WU3t.js";
10
- import { t as l } from "./Tag.gcpIeECV.js";
11
- import { Select as u } from "antd";
12
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
13
- import { forwardRef as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
14
- import v from "classnames";
15
- import { faCheck as ee, faChevronDown as te, faCircleNotch as ne, faCircleXmark as re } from "@fortawesome/free-solid-svg-icons";
16
- import { FontAwesomeIcon as y } from "@fortawesome/react-fontawesome";
17
- import { useDebouncedCallback as ie } from "use-debounce";
18
- import b from "short-unique-id";
19
- // src/Kit/DataEntry/Select/guard.ts
20
- var x = (e) => !!e.idCard, S = (e, t) => {
21
- for (let n of t) {
22
- let t = n.options ? S(e, n.options) : n.value === e ? n : void 0;
23
- if (t) return t;
24
- }
25
- }, C = { MAX_PLACEHOLDER: "MAX_PLACEHOLDER" }, ae = (e, t, n, r, i, a) => {
26
- if (e.label !== null && e.label !== void 0 && typeof e.label == "object" && "specialCase" in e.label && e.label.specialCase === C.MAX_PLACEHOLDER) {
27
- let t = e.label;
28
- return delete t.specialCase, d(l, { ...t });
29
- }
30
- let { labelToDisplay: o, onTagClose: s, isOptionDisabled: u } = S(e.value, r) ?? {}, f = T(o), p = o?.idCard ?? {
31
- description: w(o, e),
32
- ...!!f && { avatarProps: {
33
- icon: f,
34
- shape: "square"
35
- } }
36
- }, m = (e) => {
37
- e.preventDefault(), e.stopPropagation();
38
- }, h = (t) => {
39
- s?.(t), e.onClose(t);
40
- }, g = t || !!u, _ = e.closable && !i;
41
- return d(l, {
42
- type: E(g, n),
43
- size: D(a),
44
- disabled: g,
45
- onClose: _ ? h : void 0,
46
- onMouseDown: m,
47
- children: d(c, {
48
- disabled: g,
49
- description: p.description,
50
- avatarProps: p.avatarProps ? {
51
- ...p.avatarProps,
52
- size: "xs"
53
- } : void 0
54
- })
55
- });
56
- }, oe = (e, t, n) => ({
57
- specialCase: C.MAX_PLACEHOLDER,
58
- type: E(t, n),
59
- children: d(c, {
60
- description: `+${e.length}`,
61
- disabled: t
62
- }),
63
- disabled: t
64
- }), w = (e, t) => e?.label ?? t.label ?? String(t.value), T = (e) => {
65
- if (e?.color) return d("div", {
66
- className: "kit-select-option-badge",
67
- children: d("div", { style: { backgroundColor: e.color } })
68
- });
69
- if (e?.icon) return d(i, {
70
- on: !0,
71
- className: "kit-select-option-icon",
72
- icon: e.icon
73
- });
74
- }, E = (e, t) => e || t === "warning" ? "neutral" : t === "error" ? "error" : "secondary", D = (e) => {
75
- switch (e) {
76
- case "large": return "medium";
77
- case "middle": return "small";
78
- case "small": return "small";
79
- }
80
- }, se = (e, t) => d("div", {
81
- className: "kit-select-dropdown-content",
82
- children: t ? t(e) : e
83
- }), O = (e) => {
84
- let t = document.getElementById(e)?.closest(".ant-select"), n = document.getElementById(`${e}_list`)?.closest(".ant-select-dropdown");
85
- if (t && n) {
86
- let e = n.className.indexOf("ant-select-dropdown-placement-top") >= 0, r = n.className.indexOf("ant-select-dropdown-placement-bottom") >= 0;
87
- e && (t.classList.remove("ant-select-bottom"), t.classList.add("ant-select-top")), r && (t.classList.remove("ant-select-top"), t.classList.add("ant-select-bottom"));
88
- }
89
- }, k = (e, t) => {
90
- if (x(e)) {
91
- let { idCard: t } = e;
92
- return d("div", {
93
- className: "kit-select-option",
94
- children: d(c, { ...t })
95
- });
96
- }
97
- let { icon: n, color: r, label: o } = e;
98
- return f("div", {
99
- className: "kit-select-option",
100
- children: [
101
- n && !t && d(i, {
102
- className: "kit-select-option-icon",
103
- icon: n,
104
- on: !0
105
- }),
106
- r && !t && d("div", {
107
- className: "kit-select-option-badge",
108
- children: r && d("div", { style: { backgroundColor: r } })
109
- }),
110
- d("div", {
111
- className: "kit-select-option-label",
112
- children: d(a.Text, {
113
- ellipsis: !0,
114
- size: "fontSize5",
115
- weight: "regular",
116
- children: o
117
- })
118
- })
119
- ]
120
- });
121
- }, A = (e, t) => e.map((e) => {
122
- let { className: n, disabled: r, closable: i, value: a, options: o, label: s, onTagClose: c } = e;
123
- if (o) return {
124
- label: s,
125
- options: A(o, t)
126
- };
127
- let l = !!r;
128
- return {
129
- label: k(e, t),
130
- labelToDisplay: e,
131
- rawLabel: e?.label ?? "",
132
- className: n,
133
- disabled: l || i === !1,
134
- isOptionDisabled: l,
135
- value: a,
136
- onTagClose: c
137
- };
138
- }), ce = (e, t, n, i, a, o) => {
139
- let s = n?.includes("top");
140
- return v(e, r["kit-select"], t, {
141
- "ant-select-top": s,
142
- "ant-select-bottom": !s,
143
- "kit-select-readonly-light": i,
144
- "kit-select-readonly": a,
145
- "kit-select-one-line": o
146
- });
147
- }, le = (e, t, n, r) => v(e, t, "kit-select-dropdown-content", {
148
- "kit-select-dropdown-focus": n,
149
- "kit-select-dropdown-error": r === "error",
150
- "kit-select-dropdown-warning": r === "warning"
151
- }), ue = new b({
152
- length: 10,
153
- dictionary: "alpha"
154
- }), j = p(({ id: r, options: c, disabled: l, status: f, label: p, helper: b, htmlFor: x, placement: S, onChange: C, onClick: w, onClear: T, onBlur: E, onFocus: D, wrapperClassName: k, className: j, popupClassName: de, labelOnly: M = !1, oneLineTags: N = !1, allowClear: fe = !0, loading: P, required: F, actions: I, extra: L, placeholder: pe, dropdownRender: me, popupRender: R, getPopupContainer: he, readonlyLight: z = !1, readonly: B = !1, suffixIcon: ge, size: V = "large", optionFilterProp: _e = "rawLabel", ...H }, ve) => {
155
- let { appId: U } = t(), { locale: W } = n(), [G, K] = _(!1), q = r ?? x ?? ue.rnd(), ye = g(null), J = g(!1);
156
- o("Select", {
157
- label: p,
158
- helper: b,
159
- htmlFor: x,
160
- className: k,
161
- actions: I,
162
- extra: L,
163
- ...H
164
- });
165
- let Y = ve ?? ye, X = s(Y, he), Z = ie(() => {
166
- O(q);
167
- }, 15);
168
- m(() => (requestAnimationFrame(() => {
169
- O(q);
170
- }), document.addEventListener("scroll", Z), () => {
171
- document.removeEventListener("scroll", Z);
172
- }), [Z, q]);
173
- let Q = h(() => A(c ?? [], M), [c, M]), be = (e) => {
174
- var t;
175
- (t = Y?.current) == null || t.focus(), G || K(!0), w?.(e);
176
- }, xe = () => {
177
- T?.();
178
- }, Se = (e) => {
179
- J.current || (K(!1), E?.(e)), J.current = !1;
180
- }, Ce = (e) => {
181
- K(!0), D?.(e);
182
- }, $ = typeof H.classNames == "function" ? void 0 : H.classNames;
183
- return d(e, {
184
- label: p,
185
- extra: L ?? I,
186
- helper: b,
187
- htmlFor: x,
188
- disabled: l,
189
- status: f,
190
- className: k,
191
- required: F,
192
- children: d(u, {
193
- ...H,
194
- size: V,
195
- ref: Y,
196
- getPopupContainer: X,
197
- id: q,
198
- "aria-required": H["aria-required"] ?? F,
199
- className: ce(U, j, S, z, B, N),
200
- classNames: {
201
- ...$,
202
- popup: {
203
- ...$?.popup,
204
- root: v($?.popup?.root, le(U, de, G, f))
205
- }
206
- },
207
- options: Q,
208
- placement: S,
209
- disabled: l || z || B,
210
- variant: z ? "borderless" : void 0,
211
- status: f,
212
- menuItemSelectedIcon: d(i, {
213
- icon: d(y, { icon: ee }),
214
- on: !0
215
- }),
216
- loading: P,
217
- suffixIcon: ge ?? d(y, {
218
- icon: P ? ne : te,
219
- spin: P
220
- }),
221
- allowClear: fe ? {
222
- clearIcon: d(y, {
223
- "aria-label": W.General?.clear,
224
- icon: re
225
- }),
226
- label: W.General?.clear
227
- } : !1,
228
- popupRender: (e) => se(e, R ?? me),
229
- tagRender: (e) => ae(e, l, f, Q, z || B, V),
230
- maxTagCount: N ? "responsive" : void 0,
231
- maxTagPlaceholder: N ? (e) => oe(e, l, f) : void 0,
232
- placeholder: !z && !B ? d(a.Text, {
233
- ellipsis: !0,
234
- size: "fontSize5",
235
- weight: "regular",
236
- children: pe
237
- }) : void 0,
238
- optionFilterProp: _e,
239
- onChange: C,
240
- onClick: be,
241
- onClear: xe,
242
- onBlur: Se,
243
- onFocus: Ce
244
- })
245
- });
246
- });
247
- j.displayName = "KitSelect";
248
- export { j as t };
@@ -1,83 +0,0 @@
1
- import { t as e } from "./SnackBarProvider.3v41l7_l.js";
2
- import { t } from "./Button.mFkl13ue.js";
3
- import { t as n } from "./DynamicActions.DK0mupe6.js";
4
- import { t as r } from "./Typography.MRyLnlCD.js";
5
- import { t as i } from "./Divider.C-DXVgoI.js";
6
- import { n as a } from "./useKitTheme.P5Q2DIyI.js";
7
- import { n as o } from "./useKitLocale.Y5XHnnYS.js";
8
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
9
- import { forwardRef as u } from "react";
10
- import d from "classnames";
11
- import { faEllipsisV as f, faXmark as p } from "@fortawesome/free-solid-svg-icons";
12
- import { FontAwesomeIcon as m } from "@fortawesome/react-fontawesome";
13
- import { toast as h } from "react-hot-toast";
14
- import '../assets/SnackBar.css';// src/Kit/Feedback/SnackBar/styles.module.scss
15
- var g = { "kit-snackbar": "_kit-snackbar_10suq_1" }, _ = (e) => c(t, {
16
- type: "tertiary",
17
- size: "m",
18
- icon: e.icon,
19
- onClick: e.onClick,
20
- className: e.className,
21
- disabled: e.disabled,
22
- children: e.label
23
- }, e.key), v = u(({ message: e, actions: t, closable: u, onClose: h, actionsInDropDown: v, className: y, style: b, ...S }, C) => {
24
- let { appId: w } = a(), { locale: T } = o(), E = t && t.length > 0, D = u !== void 0, O = d(w, g["kit-snackbar"], y), k = () => {
25
- x(), h?.();
26
- }, A = t?.map((e, t) => ({
27
- ...e,
28
- key: e.key ?? t,
29
- className: d(e.className, "kit-snackbar-action")
30
- })) ?? [];
31
- return l("div", {
32
- ...S,
33
- ref: C,
34
- style: { ...b },
35
- className: O,
36
- children: [
37
- D && c("div", {
38
- className: "kit-snackbar-close",
39
- children: c("button", {
40
- type: "button",
41
- className: "kit-snackbar-close-button",
42
- "aria-label": T.General?.close,
43
- onClick: k,
44
- children: c(m, { icon: p })
45
- })
46
- }),
47
- c("div", {
48
- className: "kit-snackbar-message",
49
- children: c(r.Text, {
50
- className: "kit-snackbar-title",
51
- children: e
52
- })
53
- }),
54
- E && l(s, { children: [(e || D) && c(i, {
55
- orientation: "vertical",
56
- noMargin: !0,
57
- className: "kit-snackbar-divider"
58
- }), c("div", {
59
- className: "kit-snackbar-actions",
60
- children: c(n, {
61
- actions: A,
62
- actionsInDropdown: !!v,
63
- disabled: !1,
64
- actionRenderer: _,
65
- ellipsisButton: c(n.EllipsisButton, {
66
- type: "tertiary",
67
- size: "m",
68
- className: "kit-snackbar-action",
69
- icon: c(m, { icon: f })
70
- }),
71
- threshold: 3
72
- })
73
- })] })
74
- ]
75
- });
76
- }), y = 4e3, b = ({ toasterId: e, duration: t = y, snackbarId: n = null, ...r }) => (x(e), h(c(v, { ...r }), {
77
- toasterId: e ?? "default",
78
- duration: t === 0 ? Infinity : t,
79
- id: n ?? void 0
80
- })), x = (e, t) => {
81
- h.dismiss(t, e ?? "default");
82
- }, S = b, C = x, w = e;
83
- export { C as n, S as r, w as t };
@@ -1,188 +0,0 @@
1
- import { t as e } from "./Button.mFkl13ue.js";
2
- import { KitDropDown as t } from "../Kit/Navigation/DropDown/index.js";
3
- import { n } from "./useKitTheme.P5Q2DIyI.js";
4
- import { n as r } from "./useKitLocale.Y5XHnnYS.js";
5
- import { t as i } from "./Typography.MRyLnlCD.js";
6
- import { t as a } from "./Badge.B__O4nmc.js";
7
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import { forwardRef as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
9
- import p from "classnames";
10
- import { faEllipsisVertical as m, faPlus as h } from "@fortawesome/free-solid-svg-icons";
11
- import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
12
- import { useComposeRef as _ } from "@rc-component/util/es/ref";
13
- import '../assets/Tab.css';// src/Kit/DataDisplay/Tab/styles.module.scss
14
- var v = {
15
- "kit-tab-list-wrapper": "_kit-tab-list-wrapper_jz7kl_1",
16
- "kit-tab-list": "_kit-tab-list_jz7kl_1"
17
- }, y = ({ icon: e, label: t, size: n, badgeCount: r, badgeOverflowCount: l, badgeDot: u, badgeColor: d }) => c(o, { children: [e && s("div", {
18
- className: "kit-tab-icon",
19
- children: e
20
- }), c("div", {
21
- className: "kit-tab-label-wrapper",
22
- children: [s(i.Text, {
23
- className: "kit-tab-label",
24
- size: b(n),
25
- children: t
26
- }), u ? s(a, {
27
- className: "kit-tab-dot",
28
- dot: !0,
29
- color: d
30
- }) : !!r && s(a, {
31
- className: "kit-tab-count",
32
- count: r,
33
- overflowCount: l,
34
- color: d
35
- })]
36
- })] });
37
- function b(e) {
38
- switch (e) {
39
- case "small": return "fontSize7";
40
- case "medium": return "fontSize6";
41
- default: return "fontSize4";
42
- }
43
- }
44
- // src/Kit/DataDisplay/Tab/useOverflowTabs.tsx
45
- function x({ items: e, addTab: t, disableOverflow: n }) {
46
- let r = d(null), i = d({}), a = d(null), o = t ? 56 : 0, [s, c] = f([]), [l, p] = f(!1);
47
- return u(() => {
48
- let t = () => {
49
- if (n) {
50
- p(!0);
51
- return;
52
- }
53
- let t = r.current;
54
- if (!t) return;
55
- let a = S(t), s = o, l = [];
56
- for (let t = 0; t < e.length; t++) {
57
- let n = e[t], r = i.current[n.key];
58
- if (!r) return;
59
- s += r.offsetWidth + 16;
60
- let o = t === e.length - 1 ? 0 : 40;
61
- s > a - o + 16 && l.push(n.key);
62
- }
63
- c((e) => e.join() === l.join() ? e : l), p(!0);
64
- }, a, s = () => {
65
- clearTimeout(a), a = setTimeout(t, 100);
66
- };
67
- return t(), window.addEventListener("resize", s), () => {
68
- window.removeEventListener("resize", s);
69
- };
70
- }, [
71
- e,
72
- o,
73
- r,
74
- a,
75
- n
76
- ]), {
77
- containerRef: r,
78
- tabRefs: i,
79
- overflowedKeys: s,
80
- overflowedItems: e.filter((e) => s.includes(e.key)),
81
- overflowCalculated: l
82
- };
83
- }
84
- function S(e) {
85
- let t = e.parentElement;
86
- for (; t;) {
87
- let e = window.getComputedStyle(t), n = e.width;
88
- if (n !== "auto" && n !== "fit-content" && n !== "min-content" && n !== "max-content" && t.clientWidth > 0) return t.clientWidth - parseFloat(e.paddingLeft) - parseFloat(e.paddingRight);
89
- let r = e.display;
90
- if ((r.includes("flex") || r.includes("grid")) && t.clientWidth > 0) return t.clientWidth - parseFloat(e.paddingLeft) - parseFloat(e.paddingRight);
91
- t = t.parentElement;
92
- }
93
- return window.innerWidth;
94
- }
95
- // src/Kit/DataDisplay/Tab/index.tsx
96
- var C = {
97
- small: "s",
98
- medium: "m",
99
- large: "l"
100
- }, w = l(({ addTab: i, centered: a, className: l, activeKey: u, defaultKey: d, items: b, onChange: S, fullwidthTab: w, size: T = "medium", variant: E = "classic", ...D }, O) => {
101
- let { appId: k } = n(), { locale: A } = r(), [j, M] = f(d ?? b[0]?.key), N = u ?? j, P = b.find((e) => e.key === N)?.tabContent, F = p(k, l, v["kit-tab-list"], T, E, w ? "fullwidth" : "", P && E === "pill" ? "tab-bottom-spacing" : ""), I = p(v["kit-tab-list-wrapper"], { centered: a }), { containerRef: L, tabRefs: R, overflowedKeys: z, overflowedItems: B, overflowCalculated: V } = x({
102
- items: b,
103
- addTab: !!i,
104
- disableOverflow: !!w
105
- }), H = _(L, O), U = (e) => {
106
- M(e), S?.(e);
107
- }, W = (e, t) => {
108
- e.code === "Enter" && (M(t), S?.(t));
109
- };
110
- return c(o, { children: [s("div", {
111
- className: I,
112
- ref: H,
113
- children: c("div", {
114
- ...D,
115
- className: F,
116
- role: "tablist",
117
- children: [
118
- b.map(({ icon: e, label: t, badgeCount: n, badgeOverflowCount: r, badgeDot: i, badgeColor: a, key: o, disabled: c }) => {
119
- let l = z.includes(o), u = N === o;
120
- return s("div", {
121
- ref: (e) => {
122
- R.current[o] = e;
123
- },
124
- className: p("kit-tab", `kit-tab-${T}`, E, {
125
- visible: V && !l,
126
- disabled: c,
127
- active: u,
128
- fullwidth: w
129
- }),
130
- role: "tab",
131
- tabIndex: 0,
132
- "aria-disabled": c,
133
- onClick: c ? void 0 : () => U(o),
134
- onKeyDown: c ? void 0 : (e) => W(e, o),
135
- children: s(y, {
136
- icon: e,
137
- label: t,
138
- size: T,
139
- badgeCount: n,
140
- badgeOverflowCount: r,
141
- badgeDot: i,
142
- badgeColor: a
143
- })
144
- }, o);
145
- }),
146
- i && E === "classic" && s(e, {
147
- disableSecureClick: !0,
148
- type: "tertiary",
149
- icon: s(g, { icon: h }),
150
- onClick: i,
151
- size: C[T]
152
- }),
153
- z.length > 0 && s(t, {
154
- menu: {
155
- items: B.map((e) => ({
156
- label: s("div", {
157
- className: p("kit-tab-dropdown", `kit-tab-dropdown-${T}`),
158
- children: s(y, {
159
- icon: e.icon,
160
- label: e.label,
161
- size: T,
162
- badgeCount: e.badgeCount,
163
- badgeOverflowCount: e.badgeOverflowCount,
164
- badgeDot: e.badgeDot,
165
- badgeColor: e.badgeColor
166
- })
167
- }),
168
- type: "item",
169
- key: e.key,
170
- disabled: e.disabled,
171
- onClick: () => !e.disabled && U(e.key)
172
- })),
173
- selectedKeys: [N]
174
- },
175
- trigger: ["click"],
176
- children: s(e, {
177
- icon: s(g, { icon: m }),
178
- type: z.includes(N) ? "primary" : "tertiary",
179
- "aria-label": A.Tab?.moreOptions,
180
- size: C[T]
181
- })
182
- })
183
- ]
184
- })
185
- }), P] });
186
- });
187
- w.displayName = "KitTab";
188
- export { w as t };
@@ -1,3 +0,0 @@
1
- import '../assets/styles.css';// src/Kit/DataEntry/Select/styles.module.scss
2
- var e = { "kit-select": "_kit-select_oedzc_1" };
3
- export { e as t };