@reportportal/ui-kit 0.0.1-alpha.11 → 0.0.1-alpha.110
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.
- package/README.md +28 -2
- package/dist/attachedFile.js +9 -0
- package/dist/autocompletes.js +694 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-8e5ca8d7.js +183 -0
- package/dist/breadcrumbs.js +11 -0
- package/dist/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/button-97d9e587.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/checkbox-ed6cc375.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/chevronDownDropdown-66f5b1af.js +7 -0
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/common/types.d.ts +4 -0
- package/dist/common/utils/getFileExtension.d.ts +1 -0
- package/dist/common/utils/index.d.ts +2 -0
- package/dist/common/utils/isString.d.ts +1 -0
- package/dist/components/attachedFile/attachedFile.d.ts +14 -0
- package/dist/components/attachedFile/index.d.ts +2 -0
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +9 -0
- package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
- package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOptions.d.ts +19 -0
- package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
- package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
- package/dist/components/autocompletes/common/index.d.ts +19 -0
- package/dist/components/autocompletes/constants.d.ts +2 -0
- package/dist/components/autocompletes/index.d.ts +3 -0
- package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +46 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +35 -0
- package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
- package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +40 -0
- package/dist/components/autocompletes/types.d.ts +8 -0
- package/dist/components/autocompletes/utils.d.ts +5 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +5 -0
- package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
- package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
- package/dist/components/breadcrumbs/types.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +2 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +5 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/datePicker/datePicker.d.ts +25 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
- package/dist/components/datePicker/header/index.d.ts +4 -0
- package/dist/components/datePicker/index.d.ts +5 -0
- package/dist/components/datePicker/utils.d.ts +4 -0
- package/dist/components/dropdown/constants.d.ts +1 -0
- package/dist/components/dropdown/dropdown.d.ts +14 -4
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/components/dropdown/types.d.ts +3 -0
- package/dist/components/dropdown/utils.d.ts +2 -1
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +12 -4
- package/dist/components/fieldText/index.d.ts +1 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +5 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +21 -0
- package/dist/components/fileDropArea/attachedFilesList/index.d.ts +5 -0
- package/dist/components/fileDropArea/browseButton/browseButton.d.ts +9 -0
- package/dist/components/fileDropArea/browseButton/index.d.ts +4 -0
- package/dist/components/fileDropArea/constants.d.ts +2 -0
- package/dist/components/fileDropArea/dropZone/dropZone.d.ts +10 -0
- package/dist/components/fileDropArea/dropZone/index.d.ts +4 -0
- package/dist/components/fileDropArea/errorMessage/errorMessage.d.ts +5 -0
- package/dist/components/fileDropArea/errorMessage/index.d.ts +4 -0
- package/dist/components/fileDropArea/fileDropArea.d.ts +19 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/fileDropAreaProvider.d.ts +17 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/index.d.ts +1 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/useFileDropAreaContext.d.ts +3 -0
- package/dist/components/fileDropArea/hooks/index.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileDropArea.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useOverlayDropArea.d.ts +22 -0
- package/dist/components/fileDropArea/index.d.ts +6 -0
- package/dist/components/fileDropArea/types.d.ts +58 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +3 -0
- package/dist/components/fileDropArea/utils/index.d.ts +2 -0
- package/dist/components/fileDropArea/utils/validateFile.d.ts +3 -0
- package/dist/components/icons/index.d.ts +60 -7
- package/dist/components/index.d.ts +21 -9
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +7 -3
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +3 -1
- package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
- package/dist/components/modal/types.d.ts +6 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +1 -0
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +3 -2
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +1 -0
- package/dist/components/selection/index.d.ts +5 -0
- package/dist/components/selection/selection.d.ts +12 -0
- package/dist/components/selection/types.d.ts +1 -0
- package/dist/components/sidePanel/index.d.ts +2 -0
- package/dist/components/sidePanel/sidePanel.d.ts +17 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +22 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +5 -0
- package/dist/components/table/hooks/index.d.ts +4 -0
- package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
- package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
- package/dist/components/table/hooks/useTableHover.d.ts +10 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +24 -9
- package/dist/components/table/utils.d.ts +10 -1
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +12 -2
- package/dist/datePicker-efa4e2d6.js +194 -0
- package/dist/datePicker.js +27 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-ec754bbe.js +289 -0
- package/dist/dropdown.js +5 -2
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-d1b5a7a1.js +140 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-ba8a917c.js +165 -0
- package/dist/fieldText.js +6 -2
- package/dist/fieldTextFlex-2f51c173.js +80 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +325 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +80 -0
- package/dist/index-1a874a8b.js +110 -0
- package/dist/index.js +140 -48
- package/dist/isEmpty-ccacb5ff.js +38 -0
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/minus-2857540f.js +5 -0
- package/dist/modal.js +153 -14
- package/dist/openEye-7b9cf080.js +7 -0
- package/dist/pagination-43330c73.js +347 -0
- package/dist/pagination.js +10 -5
- package/dist/plus-199fb2a8.js +5 -0
- package/dist/popover.js +61 -57
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-62546efa.js +76 -0
- package/dist/radio.js +1 -1
- package/dist/selection-9124d029.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/sidePanel.js +74 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/success-8fd8bd2c.js +7 -0
- package/dist/systemAlert.js +69 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-ea578f47.js +476 -0
- package/dist/table.js +3 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +87 -56
- package/dist/tree-c3dd3d45.js +6 -0
- package/dist/xls-995781cc.js +11 -0
- package/package.json +47 -16
- package/dist/baseIconButton-7bc53dec.js +0 -25
- package/dist/bubblesLoader-a7e709d4.js +0 -17
- package/dist/button-7fb84fde.js +0 -62
- package/dist/checkbox-6777be17.js +0 -73
- package/dist/dropdown-e07f2a71.js +0 -212
- package/dist/fieldNumber-46fe79b9.js +0 -127
- package/dist/fieldText-d80b29ba.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-bb9b62ef.js +0 -131
- package/dist/pagination-5449cd03.js +0 -346
- package/dist/radio-fd49a09c.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/table-231fd19c.js +0 -138
- package/dist/toggle-707ecb74.js +0 -67
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useRef as v, useEffect as _ } from "react";
|
|
3
|
+
import { c as E } from "./bind-06a7ff84.js";
|
|
4
|
+
import { S as I } from "./close-4d480ef7.js";
|
|
5
|
+
import { S as p, b as S, a as O } from "./success-8fd8bd2c.js";
|
|
6
|
+
var o = /* @__PURE__ */ ((t) => (t.INFO = "info", t.SUCCESS = "success", t.WARNING = "warning", t.ERROR = "error", t))(o || {}), f = /* @__PURE__ */ ((t) => (t.WHITE = "white", t.BLACK = "black", t))(f || {});
|
|
7
|
+
const k = "_error_jbf1d_14", x = "_success_jbf1d_17", D = "_info_jbf1d_20", H = "_warning_jbf1d_23", T = "_title_jbf1d_38", U = {
|
|
8
|
+
"system-alert": "_system-alert_jbf1d_1",
|
|
9
|
+
"system-alert--black": "_system-alert--black_jbf1d_11",
|
|
10
|
+
error: k,
|
|
11
|
+
success: x,
|
|
12
|
+
info: D,
|
|
13
|
+
warning: H,
|
|
14
|
+
"icon-wrapper": "_icon-wrapper_jbf1d_26",
|
|
15
|
+
"content-wrapper": "_content-wrapper_jbf1d_32",
|
|
16
|
+
title: T,
|
|
17
|
+
"title--white": "_title--white_jbf1d_50",
|
|
18
|
+
"title--black": "_title--black_jbf1d_53",
|
|
19
|
+
"close-button": "_close-button_jbf1d_56"
|
|
20
|
+
}, s = E.bind(U), F = 7e3, W = 4e3, G = ({
|
|
21
|
+
title: t,
|
|
22
|
+
onClose: c,
|
|
23
|
+
icon: u = null,
|
|
24
|
+
type: n = o.INFO,
|
|
25
|
+
typographyColor: i = f.WHITE,
|
|
26
|
+
duration: d = W,
|
|
27
|
+
className: m,
|
|
28
|
+
dataAutomationId: b
|
|
29
|
+
}) => {
|
|
30
|
+
const l = n === o.ERROR ? F : d, [j, w] = h(""), r = v(null);
|
|
31
|
+
_(() => {
|
|
32
|
+
const { offsetHeight: a, scrollHeight: N } = r == null ? void 0 : r.current;
|
|
33
|
+
a < N && w(t);
|
|
34
|
+
}, [t]), _(() => {
|
|
35
|
+
const a = setTimeout(() => {
|
|
36
|
+
c();
|
|
37
|
+
}, l);
|
|
38
|
+
return () => clearTimeout(a);
|
|
39
|
+
}, [l, c]);
|
|
40
|
+
const R = () => {
|
|
41
|
+
switch (n) {
|
|
42
|
+
case "info":
|
|
43
|
+
return /* @__PURE__ */ e(O, {});
|
|
44
|
+
case "success":
|
|
45
|
+
return /* @__PURE__ */ e(S, {});
|
|
46
|
+
case "warning":
|
|
47
|
+
case "error":
|
|
48
|
+
return /* @__PURE__ */ e(p, {});
|
|
49
|
+
default:
|
|
50
|
+
return u;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ g(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: s("system-alert", n, m, `system-alert--${i}`),
|
|
57
|
+
title: j,
|
|
58
|
+
"data-automation-id": b,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ e("div", { className: s("icon-wrapper"), children: R() }),
|
|
61
|
+
/* @__PURE__ */ e("div", { className: s("content-wrapper"), children: /* @__PURE__ */ e("h2", { ref: r, className: s("title", `title--${i}`), children: t }) }),
|
|
62
|
+
/* @__PURE__ */ e("button", { className: s("close-button"), onClick: c, "aria-label": "close system alert", children: /* @__PURE__ */ e(I, {}) })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
G as SystemAlert
|
|
69
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as _ } from "./bind-06a7ff84.js";
|
|
3
|
+
const c = "_children_vll7q_54", m = {
|
|
4
|
+
"system-message": "_system-message_vll7q_1",
|
|
5
|
+
"stripes-info": "_stripes-info_vll7q_12",
|
|
6
|
+
"stripes-warning": "_stripes-warning_vll7q_17",
|
|
7
|
+
"stripes-error": "_stripes-error_vll7q_22",
|
|
8
|
+
"text-container": "_text-container_vll7q_27",
|
|
9
|
+
"message-header-info": "_message-header-info_vll7q_30",
|
|
10
|
+
"message-header-warning": "_message-header-warning_vll7q_38",
|
|
11
|
+
"message-header-error": "_message-header-error_vll7q_46",
|
|
12
|
+
children: c,
|
|
13
|
+
"content-width": "_content-width_vll7q_70"
|
|
14
|
+
}, e = _.bind(m), h = ({
|
|
15
|
+
header: r,
|
|
16
|
+
caption: a,
|
|
17
|
+
children: i,
|
|
18
|
+
mode: n = "info",
|
|
19
|
+
widthByContent: l = !1
|
|
20
|
+
}) => /* @__PURE__ */ t("div", { className: e("system-message", { "content-width": l }), children: [
|
|
21
|
+
/* @__PURE__ */ s("div", { className: e(`stripes-${n}`) }),
|
|
22
|
+
/* @__PURE__ */ t("div", { className: e("text-container"), children: [
|
|
23
|
+
r && /* @__PURE__ */ s("h1", { className: e(`message-header-${n}`), children: r }),
|
|
24
|
+
/* @__PURE__ */ s("div", { className: e("children"), children: i }),
|
|
25
|
+
a && /* @__PURE__ */ s("p", { children: a })
|
|
26
|
+
] })
|
|
27
|
+
] });
|
|
28
|
+
export {
|
|
29
|
+
h as S
|
|
30
|
+
};
|
package/dist/systemMessage.js
CHANGED
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as Q, useState as D, useCallback as g, useEffect as ue, useRef as fe } from "react";
|
|
3
|
+
import { c as ke } from "./bind-06a7ff84.js";
|
|
4
|
+
import { b as K, a as Y, S as ve } from "./chevronDownDropdown-66f5b1af.js";
|
|
5
|
+
import { C as q } from "./checkbox-ed6cc375.js";
|
|
6
|
+
const V = (l) => typeof l == "string", Ce = "_table_12bpb_1", ge = "_selectable_12bpb_56", xe = "_expanded_12bpb_52", Ne = "_label_12bpb_269", we = {
|
|
7
|
+
table: Ce,
|
|
8
|
+
"fixed-header": "_fixed-header_12bpb_8",
|
|
9
|
+
"horizontally-scrollable-container": "_horizontally-scrollable-container_12bpb_14",
|
|
10
|
+
"table-header": "_table-header_12bpb_19",
|
|
11
|
+
"sticky-header": "_sticky-header_12bpb_25",
|
|
12
|
+
"horizontally-scrollable": "_horizontally-scrollable_12bpb_14",
|
|
13
|
+
"table-row": "_table-row_12bpb_47",
|
|
14
|
+
"expanded-cell": "_expanded-cell_12bpb_52",
|
|
15
|
+
selectable: ge,
|
|
16
|
+
"row-content-wrapper": "_row-content-wrapper_12bpb_60",
|
|
17
|
+
"table-row-content": "_table-row-content_12bpb_65",
|
|
18
|
+
"expand-cell": "_expand-cell_12bpb_81",
|
|
19
|
+
"size-small": "_size-small_12bpb_84",
|
|
20
|
+
"size-large": "_size-large_12bpb_95",
|
|
21
|
+
"table-body": "_table-body_12bpb_110",
|
|
22
|
+
"scrollable-body": "_scrollable-body_12bpb_116",
|
|
23
|
+
"table-header-cell": "_table-header-cell_12bpb_162",
|
|
24
|
+
"table-cell": "_table-cell_12bpb_163",
|
|
25
|
+
"action-menu-cell": "_action-menu-cell_12bpb_170",
|
|
26
|
+
"checkbox-cell": "_checkbox-cell_12bpb_195",
|
|
27
|
+
"expand-icon": "_expand-icon_12bpb_241",
|
|
28
|
+
expanded: xe,
|
|
29
|
+
"primary-cell": "_primary-cell_12bpb_250",
|
|
30
|
+
label: Ne,
|
|
31
|
+
"sortable-cell": "_sortable-cell_12bpb_273",
|
|
32
|
+
"align-right": "_align-right_12bpb_276",
|
|
33
|
+
"align-center": "_align-center_12bpb_282",
|
|
34
|
+
"pinned-column": "_pinned-column_12bpb_285"
|
|
35
|
+
}, Z = "asc", w = 32, F = 100, me = 48, Ee = (l) => l.toLowerCase() === Z, Me = (l) => l.map((a) => a.key), x = (l) => "primary" in l && l.primary === !0, $e = (l) => {
|
|
36
|
+
var t;
|
|
37
|
+
return `size-${((t = l.rowConfigs) == null ? void 0 : t.size) ?? "default"}`;
|
|
38
|
+
}, Se = (l, a, t, c, i) => {
|
|
39
|
+
let o = 0;
|
|
40
|
+
c && (o += w), i && (o += w);
|
|
41
|
+
for (let b = 0; b < l; b++) {
|
|
42
|
+
const r = a[b];
|
|
43
|
+
if (x(r)) {
|
|
44
|
+
const n = t.current.get(r.key) || F;
|
|
45
|
+
o += n;
|
|
46
|
+
} else {
|
|
47
|
+
const n = r, h = V(n.width) ? parseInt(n.width, 10) || 0 : n.width;
|
|
48
|
+
o += h;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return o;
|
|
52
|
+
}, A = (l, a, t, c, i, o, b) => {
|
|
53
|
+
const r = {};
|
|
54
|
+
if (!x(l)) {
|
|
55
|
+
const n = l;
|
|
56
|
+
r.textAlign = n.align;
|
|
57
|
+
}
|
|
58
|
+
if (a && t !== void 0) {
|
|
59
|
+
const n = Se(
|
|
60
|
+
t,
|
|
61
|
+
c,
|
|
62
|
+
i,
|
|
63
|
+
o,
|
|
64
|
+
b
|
|
65
|
+
);
|
|
66
|
+
r.left = `${n}px`;
|
|
67
|
+
}
|
|
68
|
+
return r;
|
|
69
|
+
}, J = (l, a, t, c, i, o = !1) => {
|
|
70
|
+
const b = [];
|
|
71
|
+
t && b.push(`${w}px`), o && c && b.push(`${w}px`);
|
|
72
|
+
const r = (n) => {
|
|
73
|
+
if (x(n))
|
|
74
|
+
b.push(`minmax(${F}px, 1fr)`);
|
|
75
|
+
else {
|
|
76
|
+
const h = n, p = V(h.width) ? h.width : `${h.width}px`;
|
|
77
|
+
b.push(p);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return l.forEach(r), a.forEach(r), i && b.push(`${me}px`), b.join(" ");
|
|
81
|
+
}, Te = ({
|
|
82
|
+
primaryColumns: l,
|
|
83
|
+
fixedColumns: a,
|
|
84
|
+
pinnedColumnKeys: t
|
|
85
|
+
}) => Q(() => {
|
|
86
|
+
const c = [], i = [];
|
|
87
|
+
return l.forEach((o) => {
|
|
88
|
+
const b = { ...o, primary: !0 };
|
|
89
|
+
t.includes(o.key) ? c.push(b) : i.push(b);
|
|
90
|
+
}), a.forEach((o) => {
|
|
91
|
+
t.includes(o.key) ? c.push(o) : i.push(o);
|
|
92
|
+
}), {
|
|
93
|
+
pinnedColumns: c,
|
|
94
|
+
scrollableColumns: i
|
|
95
|
+
};
|
|
96
|
+
}, [l, a, t]), ze = () => {
|
|
97
|
+
const [l, a] = D(null), [t, c] = D(null), i = g((n) => {
|
|
98
|
+
a(n);
|
|
99
|
+
}, []), o = g(() => {
|
|
100
|
+
a(null);
|
|
101
|
+
}, []), b = g((n) => {
|
|
102
|
+
c(n);
|
|
103
|
+
}, []), r = g(() => {
|
|
104
|
+
c(null);
|
|
105
|
+
}, []);
|
|
106
|
+
return {
|
|
107
|
+
hoveredColumn: l,
|
|
108
|
+
hoveredRow: t,
|
|
109
|
+
handleColumnMouseEnter: i,
|
|
110
|
+
handleColumnMouseLeave: o,
|
|
111
|
+
handleRowMouseEnter: b,
|
|
112
|
+
handleRowMouseLeave: r
|
|
113
|
+
};
|
|
114
|
+
}, Ae = ({
|
|
115
|
+
primaryColumns: l,
|
|
116
|
+
fixedColumns: a,
|
|
117
|
+
expandedRowIds: t,
|
|
118
|
+
onToggleRowExpansion: c
|
|
119
|
+
}) => {
|
|
120
|
+
const [i, o] = D(/* @__PURE__ */ new Set());
|
|
121
|
+
ue(() => {
|
|
122
|
+
const n = [
|
|
123
|
+
...l.map((p) => p.key),
|
|
124
|
+
...a.map((p) => p.key)
|
|
125
|
+
], h = /* @__PURE__ */ new Set();
|
|
126
|
+
t.forEach((p) => {
|
|
127
|
+
n.forEach((f) => {
|
|
128
|
+
h.add(`${p}-${f}`);
|
|
129
|
+
});
|
|
130
|
+
}), o((p) => {
|
|
131
|
+
if (p.size === h.size) {
|
|
132
|
+
let f = !0;
|
|
133
|
+
if (p.forEach((y) => {
|
|
134
|
+
h.has(y) || (f = !1);
|
|
135
|
+
}), f)
|
|
136
|
+
return p;
|
|
137
|
+
}
|
|
138
|
+
return h;
|
|
139
|
+
});
|
|
140
|
+
}, [t, l, a]);
|
|
141
|
+
const b = g(
|
|
142
|
+
(n) => {
|
|
143
|
+
const h = new Set(i), p = t.includes(n), f = [
|
|
144
|
+
...l.map((y) => y.key),
|
|
145
|
+
...a.map((y) => y.key)
|
|
146
|
+
];
|
|
147
|
+
p ? f.forEach((y) => {
|
|
148
|
+
const C = `${n}-${y}`;
|
|
149
|
+
h.delete(C);
|
|
150
|
+
}) : f.forEach((y) => {
|
|
151
|
+
const C = `${n}-${y}`;
|
|
152
|
+
h.add(C);
|
|
153
|
+
}), o(h), c(n);
|
|
154
|
+
},
|
|
155
|
+
[i, t, l, a, c]
|
|
156
|
+
), r = g(
|
|
157
|
+
(n, h) => {
|
|
158
|
+
const p = `${n}-${h}`;
|
|
159
|
+
return i.has(p);
|
|
160
|
+
},
|
|
161
|
+
[i]
|
|
162
|
+
);
|
|
163
|
+
return {
|
|
164
|
+
expandedCells: i,
|
|
165
|
+
handleToggleRowExpansion: b,
|
|
166
|
+
isCellExpanded: r
|
|
167
|
+
};
|
|
168
|
+
}, Le = () => {
|
|
169
|
+
const l = fe(/* @__PURE__ */ new Map()), a = g(
|
|
170
|
+
(t) => (c) => {
|
|
171
|
+
if (!c)
|
|
172
|
+
return;
|
|
173
|
+
const i = c.getBoundingClientRect().width;
|
|
174
|
+
i > 0 && l.current.set(t, i);
|
|
175
|
+
},
|
|
176
|
+
[]
|
|
177
|
+
);
|
|
178
|
+
return {
|
|
179
|
+
columnWidthsRef: l,
|
|
180
|
+
setCellRef: a
|
|
181
|
+
};
|
|
182
|
+
}, d = ke.bind(we), je = ({
|
|
183
|
+
data: l,
|
|
184
|
+
primaryColumn: a,
|
|
185
|
+
fixedColumns: t,
|
|
186
|
+
renderRowActions: c,
|
|
187
|
+
className: i = "",
|
|
188
|
+
rowClassName: o = "",
|
|
189
|
+
headerClassName: b = "",
|
|
190
|
+
selectable: r = !1,
|
|
191
|
+
selectedRowIds: n = [],
|
|
192
|
+
sortingDirection: h = Z,
|
|
193
|
+
sortingColumn: p,
|
|
194
|
+
sortableColumns: f,
|
|
195
|
+
isHeaderFixed: y = !1,
|
|
196
|
+
isHorizontallyScrollable: C = !1,
|
|
197
|
+
pinnedColumnKeys: R = [],
|
|
198
|
+
isRowsExpandable: u = !1,
|
|
199
|
+
expandedRowIds: m = [],
|
|
200
|
+
onChangeSorting: I = () => {
|
|
201
|
+
},
|
|
202
|
+
onToggleRowSelection: ee = () => {
|
|
203
|
+
},
|
|
204
|
+
onToggleAllRowsSelection: le = () => {
|
|
205
|
+
},
|
|
206
|
+
onToggleRowExpansion: ne = () => {
|
|
207
|
+
},
|
|
208
|
+
onToggleAllRowsExpansion: ae = () => {
|
|
209
|
+
}
|
|
210
|
+
}) => {
|
|
211
|
+
const E = Q(
|
|
212
|
+
() => Array.isArray(a) ? a : [a],
|
|
213
|
+
[a]
|
|
214
|
+
), k = p ?? E[0], M = f ?? Me([...E, ...t]), { pinnedColumns: v, scrollableColumns: $ } = Te({
|
|
215
|
+
primaryColumns: E,
|
|
216
|
+
fixedColumns: t,
|
|
217
|
+
pinnedColumnKeys: R
|
|
218
|
+
}), {
|
|
219
|
+
hoveredColumn: P,
|
|
220
|
+
hoveredRow: te,
|
|
221
|
+
handleColumnMouseEnter: W,
|
|
222
|
+
handleColumnMouseLeave: U,
|
|
223
|
+
handleRowMouseEnter: se,
|
|
224
|
+
handleRowMouseLeave: ce
|
|
225
|
+
} = ze(), { columnWidthsRef: S, setCellRef: O } = Le(), { handleToggleRowExpansion: re, isCellExpanded: j } = Ae({
|
|
226
|
+
primaryColumns: E,
|
|
227
|
+
fixedColumns: t,
|
|
228
|
+
expandedRowIds: m,
|
|
229
|
+
onToggleRowExpansion: ne
|
|
230
|
+
}), B = (e) => {
|
|
231
|
+
M.includes(e) && I({ key: e, direction: h });
|
|
232
|
+
}, oe = (e) => {
|
|
233
|
+
ee(e);
|
|
234
|
+
}, ie = () => {
|
|
235
|
+
le();
|
|
236
|
+
}, de = () => {
|
|
237
|
+
ae();
|
|
238
|
+
}, G = (e) => M.includes(e) ? (k == null ? void 0 : k.key) === e ? Ee(h) ? /* @__PURE__ */ s(Y, {}) : /* @__PURE__ */ s(ve, {}) : /* @__PURE__ */ s(Y, {}) : null, be = l.every((e) => n.includes(e.id)), he = l.some((e) => n.includes(e.id)), H = (n == null ? void 0 : n.length) > 0, pe = l.every((e) => m.includes(e.id)), _e = J(
|
|
239
|
+
v,
|
|
240
|
+
$,
|
|
241
|
+
u,
|
|
242
|
+
r,
|
|
243
|
+
!!c,
|
|
244
|
+
!1
|
|
245
|
+
), ye = J(
|
|
246
|
+
v,
|
|
247
|
+
$,
|
|
248
|
+
u,
|
|
249
|
+
r,
|
|
250
|
+
!!c,
|
|
251
|
+
!0
|
|
252
|
+
);
|
|
253
|
+
return /* @__PURE__ */ N(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
className: d(
|
|
257
|
+
"table",
|
|
258
|
+
{
|
|
259
|
+
"fixed-header": y,
|
|
260
|
+
"horizontally-scrollable-container": y && C
|
|
261
|
+
},
|
|
262
|
+
i
|
|
263
|
+
),
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ N(
|
|
266
|
+
"div",
|
|
267
|
+
{
|
|
268
|
+
className: d(
|
|
269
|
+
"table-header",
|
|
270
|
+
{
|
|
271
|
+
"sticky-header": y,
|
|
272
|
+
"horizontally-scrollable": C
|
|
273
|
+
},
|
|
274
|
+
b
|
|
275
|
+
),
|
|
276
|
+
style: { gridTemplateColumns: ye },
|
|
277
|
+
children: [
|
|
278
|
+
r && /* @__PURE__ */ s(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
className: d("table-header-cell", "checkbox-cell"),
|
|
282
|
+
style: { left: u ? `${w}px` : "0" },
|
|
283
|
+
children: H && /* @__PURE__ */ s(
|
|
284
|
+
q,
|
|
285
|
+
{
|
|
286
|
+
value: be,
|
|
287
|
+
partiallyChecked: he,
|
|
288
|
+
onChange: ie,
|
|
289
|
+
className: d("checkbox-cell")
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
u && /* @__PURE__ */ s("div", { className: d("table-header-cell", "expand-cell"), style: { left: "0" }, children: /* @__PURE__ */ s("button", { onClick: de, "aria-label": "Toggle all rows expansion", children: /* @__PURE__ */ s("span", { className: d("expand-icon", { expanded: pe }), children: /* @__PURE__ */ s(K, {}) }) }) }),
|
|
295
|
+
v.map((e, T) => /* @__PURE__ */ s(
|
|
296
|
+
"button",
|
|
297
|
+
{
|
|
298
|
+
className: d("table-header-cell", "pinned-column", {
|
|
299
|
+
[`align-${e.align}`]: "align" in e,
|
|
300
|
+
"primary-cell": x(e),
|
|
301
|
+
"sortable-cell": M.includes(e.key)
|
|
302
|
+
}),
|
|
303
|
+
style: A(
|
|
304
|
+
e,
|
|
305
|
+
!0,
|
|
306
|
+
T,
|
|
307
|
+
v,
|
|
308
|
+
S,
|
|
309
|
+
u,
|
|
310
|
+
r
|
|
311
|
+
),
|
|
312
|
+
children: /* @__PURE__ */ N(
|
|
313
|
+
"div",
|
|
314
|
+
{
|
|
315
|
+
className: d("label"),
|
|
316
|
+
onClick: () => B(e.key),
|
|
317
|
+
onMouseEnter: () => W(e.key),
|
|
318
|
+
onMouseLeave: U,
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ s("span", { children: e.header }),
|
|
321
|
+
(P === e.key || (k == null ? void 0 : k.key) === e.key) && G(e.key)
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
},
|
|
326
|
+
e.key
|
|
327
|
+
)),
|
|
328
|
+
$.map((e) => /* @__PURE__ */ s(
|
|
329
|
+
"button",
|
|
330
|
+
{
|
|
331
|
+
className: d("table-header-cell", {
|
|
332
|
+
[`align-${e.align}`]: "align" in e,
|
|
333
|
+
"primary-cell": x(e),
|
|
334
|
+
"sortable-cell": M.includes(e.key)
|
|
335
|
+
}),
|
|
336
|
+
style: A(
|
|
337
|
+
e,
|
|
338
|
+
!1,
|
|
339
|
+
void 0,
|
|
340
|
+
v,
|
|
341
|
+
S,
|
|
342
|
+
u,
|
|
343
|
+
r
|
|
344
|
+
),
|
|
345
|
+
children: /* @__PURE__ */ N(
|
|
346
|
+
"div",
|
|
347
|
+
{
|
|
348
|
+
className: d("label"),
|
|
349
|
+
onClick: () => B(e.key),
|
|
350
|
+
onMouseEnter: () => W(e.key),
|
|
351
|
+
onMouseLeave: U,
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ s("span", { children: e.header }),
|
|
354
|
+
(P === e.key || (k == null ? void 0 : k.key) === e.key) && G(e.key)
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
)
|
|
358
|
+
},
|
|
359
|
+
e.key
|
|
360
|
+
)),
|
|
361
|
+
c && /* @__PURE__ */ s("div", { className: d("table-header-cell", "action-menu-cell") })
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
/* @__PURE__ */ s(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
className: d("table-body", {
|
|
369
|
+
"scrollable-body": y,
|
|
370
|
+
"horizontally-scrollable": C
|
|
371
|
+
}),
|
|
372
|
+
children: l.map((e, T) => /* @__PURE__ */ N(
|
|
373
|
+
"div",
|
|
374
|
+
{
|
|
375
|
+
className: d("table-row", $e(e), o, {
|
|
376
|
+
selectable: r
|
|
377
|
+
}),
|
|
378
|
+
onMouseEnter: () => se(T),
|
|
379
|
+
onMouseLeave: ce,
|
|
380
|
+
children: [
|
|
381
|
+
r && /* @__PURE__ */ s(
|
|
382
|
+
"div",
|
|
383
|
+
{
|
|
384
|
+
className: d("table-cell", "checkbox-cell"),
|
|
385
|
+
style: { left: u ? `${w}px` : "0" },
|
|
386
|
+
children: (H || te === T) && /* @__PURE__ */ s(
|
|
387
|
+
q,
|
|
388
|
+
{
|
|
389
|
+
value: n.includes(e.id),
|
|
390
|
+
onChange: () => oe(e.id),
|
|
391
|
+
className: d("checkbox-cell")
|
|
392
|
+
}
|
|
393
|
+
)
|
|
394
|
+
}
|
|
395
|
+
),
|
|
396
|
+
/* @__PURE__ */ s("div", { className: d("row-content-wrapper"), children: /* @__PURE__ */ N("div", { className: d("table-row-content"), style: { gridTemplateColumns: _e }, children: [
|
|
397
|
+
u && /* @__PURE__ */ s("div", { className: d("table-cell", "expand-cell"), style: { left: "0" }, children: /* @__PURE__ */ s(
|
|
398
|
+
"button",
|
|
399
|
+
{
|
|
400
|
+
onClick: () => re(e.id),
|
|
401
|
+
"aria-label": m.includes(e.id) ? "Collapse row" : "Expand row",
|
|
402
|
+
"aria-expanded": m.includes(e.id),
|
|
403
|
+
children: /* @__PURE__ */ s(
|
|
404
|
+
"span",
|
|
405
|
+
{
|
|
406
|
+
className: d("expand-icon", {
|
|
407
|
+
expanded: m.includes(e.id)
|
|
408
|
+
}),
|
|
409
|
+
children: /* @__PURE__ */ s(K, {})
|
|
410
|
+
}
|
|
411
|
+
)
|
|
412
|
+
}
|
|
413
|
+
) }),
|
|
414
|
+
v.map((_, L) => {
|
|
415
|
+
const z = j(e.id, _.key), X = x(_);
|
|
416
|
+
return /* @__PURE__ */ s(
|
|
417
|
+
"div",
|
|
418
|
+
{
|
|
419
|
+
ref: X ? O(_.key) : void 0,
|
|
420
|
+
className: d("table-cell", "pinned-column", {
|
|
421
|
+
"primary-cell": X,
|
|
422
|
+
"expanded-cell": z
|
|
423
|
+
}),
|
|
424
|
+
style: A(
|
|
425
|
+
_,
|
|
426
|
+
!0,
|
|
427
|
+
L,
|
|
428
|
+
v,
|
|
429
|
+
S,
|
|
430
|
+
u,
|
|
431
|
+
r
|
|
432
|
+
),
|
|
433
|
+
children: e[_.key].component || e[_.key].content || e[_.key]
|
|
434
|
+
},
|
|
435
|
+
_.key
|
|
436
|
+
);
|
|
437
|
+
}),
|
|
438
|
+
$.map((_) => {
|
|
439
|
+
const L = j(e.id, _.key), z = x(_);
|
|
440
|
+
return /* @__PURE__ */ s(
|
|
441
|
+
"div",
|
|
442
|
+
{
|
|
443
|
+
ref: z ? O(_.key) : void 0,
|
|
444
|
+
className: d("table-cell", {
|
|
445
|
+
"primary-cell": z,
|
|
446
|
+
"expanded-cell": L
|
|
447
|
+
}),
|
|
448
|
+
style: A(
|
|
449
|
+
_,
|
|
450
|
+
!1,
|
|
451
|
+
void 0,
|
|
452
|
+
v,
|
|
453
|
+
S,
|
|
454
|
+
u,
|
|
455
|
+
r
|
|
456
|
+
),
|
|
457
|
+
children: e[_.key].component || e[_.key].content || e[_.key]
|
|
458
|
+
},
|
|
459
|
+
_.key
|
|
460
|
+
);
|
|
461
|
+
}),
|
|
462
|
+
c && /* @__PURE__ */ s("div", { className: d("table-cell", "action-menu-cell"), children: c(e.metaData) })
|
|
463
|
+
] }) })
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
e.id
|
|
467
|
+
))
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
);
|
|
473
|
+
};
|
|
474
|
+
export {
|
|
475
|
+
je as T
|
|
476
|
+
};
|
package/dist/table.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as r } from "./table-
|
|
1
|
+
import { T as r } from "./table-ea578f47.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
5
|
-
import "./
|
|
6
|
-
import "./checkbox-
|
|
5
|
+
import "./chevronDownDropdown-66f5b1af.js";
|
|
6
|
+
import "./checkbox-ed6cc375.js";
|
|
7
7
|
import "./keyCodes-f63c0e11.js";
|
|
8
8
|
export {
|
|
9
9
|
r as Table,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as h } from "./bind-06a7ff84.js";
|
|
3
|
+
import { useRef as k, useId as x } from "react";
|
|
4
|
+
import { K as _ } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
const y = "_toggle_1c7gt_1", E = "_slider_1c7gt_27", D = "_round_1c7gt_47", K = "_input_1c7gt_51", N = "_disabled_1c7gt_92", C = {
|
|
6
|
+
toggle: y,
|
|
7
|
+
"children-container": "_children-container_1c7gt_14",
|
|
8
|
+
slider: E,
|
|
9
|
+
round: D,
|
|
10
|
+
input: K,
|
|
11
|
+
disabled: N
|
|
12
|
+
}, e = h.bind(C), w = ({
|
|
13
|
+
children: s,
|
|
14
|
+
value: r,
|
|
15
|
+
onChange: g,
|
|
16
|
+
className: u,
|
|
17
|
+
disabled: t = !1,
|
|
18
|
+
title: p,
|
|
19
|
+
...m
|
|
20
|
+
}) => {
|
|
21
|
+
const c = k(null), l = x(), f = (n) => {
|
|
22
|
+
var a, d;
|
|
23
|
+
const { keyCode: i } = n;
|
|
24
|
+
if (i === _.SPACE_KEY_CODE) {
|
|
25
|
+
n.preventDefault(), (a = c.current) == null || a.click();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
i === _.ENTER_KEY_CODE && (n.preventDefault(), (d = c.current) == null || d.click());
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ b("label", { id: l, title: p, className: e("toggle", u, { disabled: t }), children: [
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
ref: c,
|
|
35
|
+
tabIndex: t ? -1 : 0,
|
|
36
|
+
onChange: g,
|
|
37
|
+
checked: r,
|
|
38
|
+
disabled: t,
|
|
39
|
+
onKeyDown: f,
|
|
40
|
+
className: e("input"),
|
|
41
|
+
type: "checkbox",
|
|
42
|
+
...m
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ o(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"aria-labelledby": l,
|
|
49
|
+
role: "checkbox",
|
|
50
|
+
"aria-checked": r,
|
|
51
|
+
className: e("slider", "round")
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
s && /* @__PURE__ */ o("span", { className: e("children-container"), children: s })
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
w as T
|
|
59
|
+
};
|
package/dist/toggle.js
CHANGED