abrplus-ui-kit 1.0.7 → 1.0.9

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 (60) hide show
  1. package/dist/antOverrides.cjs.js +1 -127
  2. package/dist/antOverrides.es.js +70 -98
  3. package/dist/atoms.cjs.js +1 -391
  4. package/dist/atoms.es.js +252 -306
  5. package/dist/colors-BDQwGpaB.cjs +5 -0
  6. package/dist/{colors-CztsZ6e_.js → colors-BW-NR0oP.js} +30 -34
  7. package/dist/deepMerge-2zqLIrFM.cjs +1 -0
  8. package/dist/deepMerge-Dm_AZi0Z.js +14 -0
  9. package/dist/index-B1HRk2-g.cjs +1 -0
  10. package/dist/index-BCH1vT85.js +8 -0
  11. package/dist/index-BJmt8SSx.cjs +1 -0
  12. package/dist/index-BPqX2Hsu.js +75 -0
  13. package/dist/{index-B02Mlfa4.js → index-BRLLsEKX.js} +19905 -19821
  14. package/dist/index-BeP9-mrf.js +200 -0
  15. package/dist/index-Bpx-uyOR.cjs +1 -0
  16. package/dist/index-CpGdrWps.js +19 -0
  17. package/dist/index-CwKyw6uN.cjs +1 -0
  18. package/dist/index-CzPs2mPX.js +478 -0
  19. package/dist/index-QraJKad8.cjs +1 -0
  20. package/dist/index-R9oQ5kp6.js +1569 -0
  21. package/dist/index-bNh4-ggT.cjs +1 -0
  22. package/dist/index-lDQ4dr86.cjs +1 -0
  23. package/dist/index.cjs.js +1 -109
  24. package/dist/index.css +1 -1519
  25. package/dist/index.es.js +5 -5
  26. package/dist/index2.css +1 -3
  27. package/dist/molecules.cjs.js +8 -7826
  28. package/dist/molecules.es.js +4270 -6306
  29. package/dist/organisms.cjs.js +1 -940
  30. package/dist/organisms.es.js +651 -758
  31. package/dist/provider.cjs.js +1 -48
  32. package/dist/provider.es.js +29 -34
  33. package/dist/sortable.esm-BSCvBWLi.js +2943 -0
  34. package/dist/sortable.esm-CA8VbUF-.cjs +5 -0
  35. package/dist/theme.css +1 -102
  36. package/dist/types/components/atoms/icon/constants/iconNames.d.ts +1 -1
  37. package/dist/types/components/molecules/noResult/index.d.ts +1 -1
  38. package/dist/types/components/organisms/avatarGroup/index.d.ts +2 -2
  39. package/dist/types/components/organisms/table/components/cell/currencyCell.d.ts +1 -1
  40. package/dist/types/components/organisms/table/components/cell/dateCell.d.ts +1 -1
  41. package/dist/types/components/organisms/table/components/cell/status.d.ts +1 -1
  42. package/package.json +4 -4
  43. package/dist/colors-TPZkyKI4.cjs +0 -2212
  44. package/dist/deepMerge-CG1he8ZD.js +0 -20
  45. package/dist/deepMerge-Cn27K7-s.cjs +0 -19
  46. package/dist/index-B1Z0XlNV.cjs +0 -542
  47. package/dist/index-CCvWoynu.cjs +0 -12
  48. package/dist/index-CVNEow23.js +0 -543
  49. package/dist/index-Cbtrrxcv.js +0 -90
  50. package/dist/index-CiSH4Pqy.js +0 -266
  51. package/dist/index-Crz4ws0L.js +0 -1630
  52. package/dist/index-D-q_-bu0.cjs +0 -1629
  53. package/dist/index-DLUd_0LP.js +0 -13
  54. package/dist/index-DM-zAoQS.cjs +0 -89
  55. package/dist/index-DPvG_H_Y.cjs +0 -27
  56. package/dist/index-DdzyIn4u.js +0 -28
  57. package/dist/index-DsPAgC23.cjs +0 -37937
  58. package/dist/index-PyheoujP.cjs +0 -265
  59. package/dist/sortable.esm-BPjdpL-J.cjs +0 -3872
  60. package/dist/sortable.esm-C7oRJuPU.js +0 -3873
@@ -1,265 +0,0 @@
1
- "use strict";
2
- const jsxRuntime = require("react/jsx-runtime");
3
- const antd = require("antd");
4
- const tailwindMerge = require("tailwind-merge");
5
- const index = require("./index-DsPAgC23.cjs");
6
- const colors = require("./colors-TPZkyKI4.cjs");
7
- const React = require("react");
8
- const reactI18next = require("react-i18next");
9
- const index$1 = require("./index-B1Z0XlNV.cjs");
10
- function getWindowDimensions() {
11
- const { innerWidth: width, innerHeight: height } = typeof window === "undefined" ? {
12
- innerWidth: 1024,
13
- innerHeight: 768
14
- } : window;
15
- return {
16
- width,
17
- height
18
- };
19
- }
20
- function useWindowDimensions() {
21
- const [windowDimensions, setWindowDimensions] = React.useState(getWindowDimensions());
22
- const targetProps = [];
23
- const handleResize = () => {
24
- const { width, height } = getWindowDimensions();
25
- if (width !== windowDimensions.width && targetProps.includes("width") || height !== windowDimensions.height && targetProps.includes("height")) {
26
- setWindowDimensions({ width, height });
27
- }
28
- };
29
- React.useEffect(() => {
30
- window.addEventListener("resize", handleResize);
31
- return () => window.removeEventListener("resize", handleResize);
32
- }, []);
33
- return new Proxy(windowDimensions, {
34
- get(target, prop) {
35
- targetProps.push(prop);
36
- return target[prop];
37
- }
38
- });
39
- }
40
- const PopoverLink = ({ children, size, color, weight, className, ...rest }) => {
41
- return /* @__PURE__ */ jsxRuntime.jsx(
42
- index.Flex,
43
- {
44
- className: tailwindMerge.twMerge("border-secondary items-center border-b border-dashed", className),
45
- ...rest,
46
- children: /* @__PURE__ */ jsxRuntime.jsx(
47
- index.Text,
48
- {
49
- className: "cursor-pointer select-none",
50
- color: color || colors.colors.secondary,
51
- size: size || 16,
52
- weight: weight || "medium",
53
- children
54
- }
55
- )
56
- }
57
- );
58
- };
59
- const Popover = ({
60
- overlayInnerStyle,
61
- overlayClassName,
62
- overlayInnerClassName,
63
- headerTitle,
64
- content,
65
- closeable = true,
66
- onClose,
67
- footer,
68
- ...rest
69
- }) => {
70
- return /* @__PURE__ */ jsxRuntime.jsx(
71
- antd.Popover,
72
- {
73
- showArrow: false,
74
- arrow: false,
75
- overlayClassName: tailwindMerge.twMerge("[&_.ant-popover-inner]:p-0", overlayClassName),
76
- overlayInnerStyle: {
77
- boxShadow: `2px 3px 7px 0 rgba(67, 88, 121, 0.15)`
78
- },
79
- ...rest,
80
- content: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
81
- headerTitle && /* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { className: "border-light-7 bg-light-1 w-full items-center justify-between rounded-t border-b px-3 py-1", children: [
82
- typeof headerTitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx(index.Text, { size: 12, weight: "medium", color: colors.colors.primary, children: headerTitle }) : headerTitle,
83
- closeable && /* @__PURE__ */ jsxRuntime.jsx(
84
- index.Icon,
85
- {
86
- name: "Close",
87
- className: "cursor-pointer",
88
- onClick: onClose,
89
- color: colors.colors.primary,
90
- size: 12
91
- }
92
- )
93
- ] }),
94
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("p-3", overlayInnerClassName), style: overlayInnerStyle, children: typeof content === "function" ? content() : content }),
95
- /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { className: "border-light-7 bg-light-1 w-full items-center justify-between rounded-t border-t px-3 py-1", children: footer })
96
- ] })
97
- }
98
- );
99
- };
100
- Popover.Link = PopoverLink;
101
- function fillRef(ref, node) {
102
- if (typeof ref === "function") {
103
- ref(node);
104
- } else if (typeof ref === "object" && ref && "current" in ref) {
105
- ref.current = node;
106
- }
107
- }
108
- function composeRef(...refs) {
109
- return (node) => {
110
- refs.forEach((ref) => {
111
- fillRef(ref, node);
112
- });
113
- };
114
- }
115
- const canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
116
- const DOM_LAYOUT_HANDLER_NAME = "__reactLayoutHandler";
117
- let didWarn = false;
118
- let resizeObserver = null;
119
- function getResizeObserver() {
120
- if (canUseDOM && typeof window.ResizeObserver !== "undefined") {
121
- if (resizeObserver == null) {
122
- resizeObserver = new window.ResizeObserver(function(entries) {
123
- entries.forEach((entry) => {
124
- const node = entry.target;
125
- const onLayout = node[DOM_LAYOUT_HANDLER_NAME];
126
- if (typeof onLayout === "function") {
127
- measure(
128
- node,
129
- //@ts-ignore
130
- (x, y, width, height, left, top) => {
131
- const event = {
132
- // $FlowFixMe
133
- nativeEvent: {
134
- layout: { x, y, width, height, left, top }
135
- },
136
- timeStamp: Date.now()
137
- };
138
- Object.defineProperty(event.nativeEvent, "target", {
139
- enumerable: true,
140
- get: () => entry.target
141
- });
142
- onLayout(event);
143
- }
144
- );
145
- }
146
- });
147
- });
148
- }
149
- } else if (!didWarn) {
150
- if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test") {
151
- didWarn = true;
152
- }
153
- }
154
- return resizeObserver;
155
- }
156
- function useElementLayout(ref, onLayout) {
157
- const { width, height } = useWindowDimensions();
158
- const observer = getResizeObserver();
159
- React.useEffect(() => {
160
- const node = ref.current;
161
- if (node != null) {
162
- node[DOM_LAYOUT_HANDLER_NAME] = onLayout;
163
- }
164
- }, [ref, onLayout]);
165
- React.useEffect(() => {
166
- const node = ref.current;
167
- if (node != null && observer != null) {
168
- if (typeof node[DOM_LAYOUT_HANDLER_NAME] === "function") {
169
- observer.observe(node);
170
- } else {
171
- observer.unobserve(node);
172
- }
173
- }
174
- return () => {
175
- if (node != null && observer != null) {
176
- observer.unobserve(node);
177
- }
178
- };
179
- }, [ref, observer, width, height]);
180
- }
181
- const getBoundingClientRect = (node) => {
182
- if (node != null) {
183
- const isElement = node.nodeType === 1;
184
- if (isElement && typeof node.getBoundingClientRect === "function") {
185
- return node.getBoundingClientRect();
186
- }
187
- }
188
- };
189
- const measureLayout = (node, relativeToNativeNode, callback) => {
190
- const relativeNode = node && node.parentNode;
191
- if (node && relativeNode) {
192
- setTimeout(() => {
193
- const relativeRect = getBoundingClientRect(relativeNode);
194
- const { height, left, top, width } = getRect(node);
195
- const x = left - relativeRect.left;
196
- const y = top - relativeRect.top;
197
- callback(x, y, width, height, left, top);
198
- }, 0);
199
- }
200
- };
201
- const getRect = (node) => {
202
- const { x, y, top, left } = getBoundingClientRect(node);
203
- const width = node.offsetWidth;
204
- const height = node.offsetHeight;
205
- return { x, y, width, height, top, left };
206
- };
207
- function measure(node, callback) {
208
- measureLayout(node, null, callback);
209
- }
210
- const View = React.forwardRef(
211
- ({
212
- children,
213
- isLoading,
214
- onRetry,
215
- error,
216
- loadingMinHeight,
217
- loadingSize,
218
- onLayout,
219
- ...rest
220
- }, ref) => {
221
- const contentLayoutRef = React.useRef(null);
222
- useElementLayout(contentLayoutRef, onLayout);
223
- const finalRef = composeRef(ref, contentLayoutRef);
224
- const { t } = reactI18next.useTranslation();
225
- if (isLoading) {
226
- return /* @__PURE__ */ jsxRuntime.jsx(
227
- index.Flex,
228
- {
229
- ref: finalRef,
230
- align: "center",
231
- justify: "center",
232
- className: "h-full w-full",
233
- style: {
234
- minHeight: loadingMinHeight
235
- },
236
- children: /* @__PURE__ */ jsxRuntime.jsx(index.Loading, { isLoading: true, size: loadingSize })
237
- }
238
- );
239
- }
240
- if (error) {
241
- return /* @__PURE__ */ jsxRuntime.jsxs(
242
- index.Flex,
243
- {
244
- ref: finalRef,
245
- align: "center",
246
- justify: "center",
247
- style: {
248
- minHeight: loadingMinHeight
249
- },
250
- gap: 8,
251
- vertical: true,
252
- className: "h-full w-full",
253
- children: [
254
- /* @__PURE__ */ jsxRuntime.jsx(index.Text, { size: 16, color: colors.colors.negative, children: error }),
255
- onRetry && /* @__PURE__ */ jsxRuntime.jsx(index$1.Button.Primary, { onClick: onRetry, children: t("common.message.tryAgain") })
256
- ]
257
- }
258
- );
259
- }
260
- return /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { ref: finalRef, ...rest, children });
261
- }
262
- );
263
- exports.Popover = Popover;
264
- exports.View = View;
265
- exports.useWindowDimensions = useWindowDimensions;