@unifiedsoftware/react-ui 1.0.20 → 1.0.21
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/dist/index.js +23 -14
- package/dist/index.mjs +83 -74
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -973,7 +973,7 @@ var PopoverContent = (0, import_react22.forwardRef)((props, ref) => {
|
|
|
973
973
|
window.removeEventListener("orientationchange", handleSize);
|
|
974
974
|
};
|
|
975
975
|
}, []);
|
|
976
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
977
977
|
"div",
|
|
978
978
|
__spreadProps(__spreadValues({
|
|
979
979
|
ref: mergeRefs_default(menuListRef, ref),
|
|
@@ -981,10 +981,7 @@ var PopoverContent = (0, import_react22.forwardRef)((props, ref) => {
|
|
|
981
981
|
style: __spreadValues(__spreadValues({}, style), contentStyle),
|
|
982
982
|
onClick: handleClick
|
|
983
983
|
}, rest), {
|
|
984
|
-
children
|
|
985
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: `${prefixCls}popover__overlay` }),
|
|
986
|
-
children
|
|
987
|
-
]
|
|
984
|
+
children
|
|
988
985
|
})
|
|
989
986
|
);
|
|
990
987
|
});
|
|
@@ -1404,7 +1401,9 @@ var AutocompleteVirtual = () => {
|
|
|
1404
1401
|
return;
|
|
1405
1402
|
const value = valuesToValue(values);
|
|
1406
1403
|
const index = data.findIndex((item) => item[keyField] === value);
|
|
1407
|
-
|
|
1404
|
+
if (index !== -1) {
|
|
1405
|
+
virtualizer.scrollToIndex(index, { align: "start" });
|
|
1406
|
+
}
|
|
1408
1407
|
}, [isOpen]);
|
|
1409
1408
|
if (!virtual)
|
|
1410
1409
|
return null;
|
|
@@ -1519,6 +1518,7 @@ var Autocomplete = (props) => {
|
|
|
1519
1518
|
disclosure: disclosureProp,
|
|
1520
1519
|
virtual,
|
|
1521
1520
|
placeholder,
|
|
1521
|
+
className,
|
|
1522
1522
|
style,
|
|
1523
1523
|
startContent,
|
|
1524
1524
|
endContent,
|
|
@@ -1671,10 +1671,14 @@ var Autocomplete = (props) => {
|
|
|
1671
1671
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger_default, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1672
1672
|
"div",
|
|
1673
1673
|
{
|
|
1674
|
-
className: clsx_default(
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1674
|
+
className: clsx_default(
|
|
1675
|
+
`${prefixCls}input ${prefixCls}input--filterable`,
|
|
1676
|
+
{
|
|
1677
|
+
[`${prefixCls}input--focus`]: focus,
|
|
1678
|
+
[`${prefixCls}input--disabled`]: disabled
|
|
1679
|
+
},
|
|
1680
|
+
className
|
|
1681
|
+
),
|
|
1678
1682
|
style,
|
|
1679
1683
|
onClick: handleClick,
|
|
1680
1684
|
onFocus: () => {
|
|
@@ -2844,6 +2848,7 @@ var Select = (props) => {
|
|
|
2844
2848
|
disclosure: disclosureProp,
|
|
2845
2849
|
virtual,
|
|
2846
2850
|
placeholder,
|
|
2851
|
+
className,
|
|
2847
2852
|
style,
|
|
2848
2853
|
startContent,
|
|
2849
2854
|
endContent,
|
|
@@ -2982,10 +2987,14 @@ var Select = (props) => {
|
|
|
2982
2987
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(PopoverTrigger_default, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2983
2988
|
"div",
|
|
2984
2989
|
{
|
|
2985
|
-
className: clsx_default(
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2990
|
+
className: clsx_default(
|
|
2991
|
+
`${prefixCls}input`,
|
|
2992
|
+
{
|
|
2993
|
+
[`${prefixCls}input--focus`]: focus,
|
|
2994
|
+
[`${prefixCls}input--disabled`]: disabled
|
|
2995
|
+
},
|
|
2996
|
+
className
|
|
2997
|
+
),
|
|
2989
2998
|
style,
|
|
2990
2999
|
onClick: handleClick,
|
|
2991
3000
|
onFocus: () => {
|
package/dist/index.mjs
CHANGED
|
@@ -806,7 +806,7 @@ var Popover_default = Popover;
|
|
|
806
806
|
|
|
807
807
|
// src/components/Popover/PopoverContent.tsx
|
|
808
808
|
import { forwardRef as forwardRef9, useCallback as useCallback3, useEffect as useEffect10, useRef as useRef5, useState as useState8 } from "react";
|
|
809
|
-
import { jsx as jsx9
|
|
809
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
810
810
|
function getScrollParent(node) {
|
|
811
811
|
if (node == null) {
|
|
812
812
|
return null;
|
|
@@ -885,7 +885,7 @@ var PopoverContent = forwardRef9((props, ref) => {
|
|
|
885
885
|
window.removeEventListener("orientationchange", handleSize);
|
|
886
886
|
};
|
|
887
887
|
}, []);
|
|
888
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ jsx9(
|
|
889
889
|
"div",
|
|
890
890
|
__spreadProps(__spreadValues({
|
|
891
891
|
ref: mergeRefs_default(menuListRef, ref),
|
|
@@ -893,10 +893,7 @@ var PopoverContent = forwardRef9((props, ref) => {
|
|
|
893
893
|
style: __spreadValues(__spreadValues({}, style), contentStyle),
|
|
894
894
|
onClick: handleClick
|
|
895
895
|
}, rest), {
|
|
896
|
-
children
|
|
897
|
-
/* @__PURE__ */ jsx9("div", { className: `${prefixCls}popover__overlay` }),
|
|
898
|
-
children
|
|
899
|
-
]
|
|
896
|
+
children
|
|
900
897
|
})
|
|
901
898
|
);
|
|
902
899
|
});
|
|
@@ -954,7 +951,7 @@ var useCollapse = () => {
|
|
|
954
951
|
var CollapseContext_default = CollapseContext;
|
|
955
952
|
|
|
956
953
|
// src/components/Collapse/Collapse.tsx
|
|
957
|
-
import { jsxs as
|
|
954
|
+
import { jsxs as jsxs7 } from "react/jsx-runtime";
|
|
958
955
|
var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
|
|
959
956
|
const collapseRef = useRef6(null);
|
|
960
957
|
const [selfIsOpen, setSelfIsOpen] = useState9(isOpen != null ? isOpen : false);
|
|
@@ -984,7 +981,7 @@ var Collapse = ({ children, isOpen, onOpen, onClose, onToggle }) => {
|
|
|
984
981
|
}
|
|
985
982
|
}, 100);
|
|
986
983
|
}, [isOpen]);
|
|
987
|
-
return /* @__PURE__ */
|
|
984
|
+
return /* @__PURE__ */ jsxs7(
|
|
988
985
|
CollapseContext_default.Provider,
|
|
989
986
|
{
|
|
990
987
|
value: {
|
|
@@ -1047,7 +1044,7 @@ var CollapseTrigger_default = CollapseTrigger;
|
|
|
1047
1044
|
|
|
1048
1045
|
// src/components/List/ListItem.tsx
|
|
1049
1046
|
import { forwardRef as forwardRef14 } from "react";
|
|
1050
|
-
import { jsx as jsx11, jsxs as
|
|
1047
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1051
1048
|
var ListItem = forwardRef14(
|
|
1052
1049
|
(_a, ref) => {
|
|
1053
1050
|
var _b = _a, {
|
|
@@ -1084,7 +1081,7 @@ var ListItem = forwardRef14(
|
|
|
1084
1081
|
const handleClick = (event) => {
|
|
1085
1082
|
onClick == null ? void 0 : onClick(event);
|
|
1086
1083
|
};
|
|
1087
|
-
return /* @__PURE__ */
|
|
1084
|
+
return /* @__PURE__ */ jsxs8(
|
|
1088
1085
|
Component,
|
|
1089
1086
|
__spreadProps(__spreadValues({
|
|
1090
1087
|
ref,
|
|
@@ -1105,7 +1102,7 @@ var ListItem = forwardRef14(
|
|
|
1105
1102
|
children: [
|
|
1106
1103
|
hoverable && /* @__PURE__ */ jsx11("div", { className: `${prefixCls}overlay` }),
|
|
1107
1104
|
startContent && /* @__PURE__ */ jsx11("div", { className: `${prefixCls}list-item__start-content`, children: startContent }),
|
|
1108
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ jsxs8("div", { className: `${prefixCls}list-item__content`, children: [
|
|
1109
1106
|
/* @__PURE__ */ jsx11("span", __spreadProps(__spreadValues({}, slotProps == null ? void 0 : slotProps.title), { className: clsx_default(`${prefixCls}list-item__title`, (_a2 = slotProps == null ? void 0 : slotProps.title) == null ? void 0 : _a2.className), children: title })),
|
|
1110
1107
|
/* @__PURE__ */ jsx11(
|
|
1111
1108
|
"span",
|
|
@@ -1124,7 +1121,7 @@ var ListItem = forwardRef14(
|
|
|
1124
1121
|
var ListItem_default = ListItem;
|
|
1125
1122
|
|
|
1126
1123
|
// src/components/List/ListGroup.tsx
|
|
1127
|
-
import { Fragment, jsx as jsx12, jsxs as
|
|
1124
|
+
import { Fragment, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1128
1125
|
var ListGroup = forwardRef15(
|
|
1129
1126
|
(_a, ref) => {
|
|
1130
1127
|
var _b = _a, {
|
|
@@ -1150,16 +1147,16 @@ var ListGroup = forwardRef15(
|
|
|
1150
1147
|
]);
|
|
1151
1148
|
const disclosure = isOpen !== void 0 ? { isOpen, onOpen, onClose, onToggle } : useDisclosure_default();
|
|
1152
1149
|
const prefixCls = PREFIX_CLS;
|
|
1153
|
-
return /* @__PURE__ */ jsx12("div", { className: `${prefixCls}list-group`, children: /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ jsx12("div", { className: `${prefixCls}list-group`, children: /* @__PURE__ */ jsxs9(Collapse_default, __spreadProps(__spreadValues({}, disclosure), { children: [
|
|
1154
1151
|
/* @__PURE__ */ jsx12(CollapseTrigger_default, { children: /* @__PURE__ */ jsx12(
|
|
1155
1152
|
ListItem_default,
|
|
1156
1153
|
__spreadValues({
|
|
1157
1154
|
ref,
|
|
1158
|
-
startContent: expandVisible && expandPosition === "start" ? /* @__PURE__ */
|
|
1155
|
+
startContent: expandVisible && expandPosition === "start" ? /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
1159
1156
|
/* @__PURE__ */ jsx12(Icon_default, { children: disclosure.isOpen ? /* @__PURE__ */ jsx12(ChevronUpIcon_default, {}) : /* @__PURE__ */ jsx12(ChevronDownIcon_default, {}) }),
|
|
1160
1157
|
startContent
|
|
1161
1158
|
] }) : startContent,
|
|
1162
|
-
endContent: expandVisible && expandPosition === "end" ? /* @__PURE__ */
|
|
1159
|
+
endContent: expandVisible && expandPosition === "end" ? /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
1163
1160
|
endContent,
|
|
1164
1161
|
/* @__PURE__ */ jsx12(Icon_default, { children: disclosure.isOpen ? /* @__PURE__ */ jsx12(ChevronUpIcon_default, {}) : /* @__PURE__ */ jsx12(ChevronDownIcon_default, {}) })
|
|
1165
1162
|
] }) : endContent
|
|
@@ -1316,7 +1313,9 @@ var AutocompleteVirtual = () => {
|
|
|
1316
1313
|
return;
|
|
1317
1314
|
const value = valuesToValue(values);
|
|
1318
1315
|
const index = data.findIndex((item) => item[keyField] === value);
|
|
1319
|
-
|
|
1316
|
+
if (index !== -1) {
|
|
1317
|
+
virtualizer.scrollToIndex(index, { align: "start" });
|
|
1318
|
+
}
|
|
1320
1319
|
}, [isOpen]);
|
|
1321
1320
|
if (!virtual)
|
|
1322
1321
|
return null;
|
|
@@ -1418,7 +1417,7 @@ var AutocompleteVirtual = () => {
|
|
|
1418
1417
|
var AutocompleteVirtual_default = AutocompleteVirtual;
|
|
1419
1418
|
|
|
1420
1419
|
// src/components/Autocomplete/Autocomplete.tsx
|
|
1421
|
-
import { jsx as jsx16, jsxs as
|
|
1420
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1422
1421
|
var Autocomplete = (props) => {
|
|
1423
1422
|
const {
|
|
1424
1423
|
data,
|
|
@@ -1431,6 +1430,7 @@ var Autocomplete = (props) => {
|
|
|
1431
1430
|
disclosure: disclosureProp,
|
|
1432
1431
|
virtual,
|
|
1433
1432
|
placeholder,
|
|
1433
|
+
className,
|
|
1434
1434
|
style,
|
|
1435
1435
|
startContent,
|
|
1436
1436
|
endContent,
|
|
@@ -1570,7 +1570,7 @@ var Autocomplete = (props) => {
|
|
|
1570
1570
|
setOffset,
|
|
1571
1571
|
renderItem
|
|
1572
1572
|
},
|
|
1573
|
-
children: /* @__PURE__ */
|
|
1573
|
+
children: /* @__PURE__ */ jsxs10(
|
|
1574
1574
|
Popover_default,
|
|
1575
1575
|
__spreadProps(__spreadValues({
|
|
1576
1576
|
target: true
|
|
@@ -1580,13 +1580,17 @@ var Autocomplete = (props) => {
|
|
|
1580
1580
|
onClose: handleClose,
|
|
1581
1581
|
autoClose: "outside",
|
|
1582
1582
|
children: [
|
|
1583
|
-
/* @__PURE__ */ jsx16(PopoverTrigger_default, { children: /* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ jsx16(PopoverTrigger_default, { children: /* @__PURE__ */ jsxs10(
|
|
1584
1584
|
"div",
|
|
1585
1585
|
{
|
|
1586
|
-
className: clsx_default(
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1586
|
+
className: clsx_default(
|
|
1587
|
+
`${prefixCls}input ${prefixCls}input--filterable`,
|
|
1588
|
+
{
|
|
1589
|
+
[`${prefixCls}input--focus`]: focus,
|
|
1590
|
+
[`${prefixCls}input--disabled`]: disabled
|
|
1591
|
+
},
|
|
1592
|
+
className
|
|
1593
|
+
),
|
|
1590
1594
|
style,
|
|
1591
1595
|
onClick: handleClick,
|
|
1592
1596
|
onFocus: () => {
|
|
@@ -1597,7 +1601,7 @@ var Autocomplete = (props) => {
|
|
|
1597
1601
|
},
|
|
1598
1602
|
children: [
|
|
1599
1603
|
/* @__PURE__ */ jsx16("div", { className: `${prefixCls}outline` }),
|
|
1600
|
-
/* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ jsxs10("div", { className: `${prefixCls}input__content`, children: [
|
|
1601
1605
|
startContent && /* @__PURE__ */ jsx16("div", { className: `${prefixCls}input__start-content`, children: startContent }),
|
|
1602
1606
|
/* @__PURE__ */ jsx16(
|
|
1603
1607
|
"input",
|
|
@@ -1610,7 +1614,7 @@ var Autocomplete = (props) => {
|
|
|
1610
1614
|
onChange: handleFilterChange
|
|
1611
1615
|
}
|
|
1612
1616
|
),
|
|
1613
|
-
/* @__PURE__ */
|
|
1617
|
+
/* @__PURE__ */ jsxs10("div", { className: `${prefixCls}input__end-content`, children: [
|
|
1614
1618
|
endContent,
|
|
1615
1619
|
loading ? /* @__PURE__ */ jsx16(Icon_default, { children: /* @__PURE__ */ jsx16(LoaderIcon_default, { className: `${prefixCls}animation-spin` }) }) : /* @__PURE__ */ jsx16(Button, { color: "secondary", variant: "plain", size: "xs", iconOnly: true, onClick: handleClear, children: /* @__PURE__ */ jsx16(Icon_default, { children: /* @__PURE__ */ jsx16(CloseIcon_default, {}) }) }),
|
|
1616
1620
|
/* @__PURE__ */ jsx16("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ jsx16(Icon_default, { children: disclosure.isOpen ? /* @__PURE__ */ jsx16(ChevronUpIcon_default, {}) : /* @__PURE__ */ jsx16(ChevronDownIcon_default, {}) }) })
|
|
@@ -1632,7 +1636,7 @@ var Autocomplete_default = Autocomplete;
|
|
|
1632
1636
|
import clsx6 from "clsx";
|
|
1633
1637
|
import { forwardRef as forwardRef17, useRef as useRef10 } from "react";
|
|
1634
1638
|
import { mergeRefs as mergeRefs2 } from "react-merge-refs";
|
|
1635
|
-
import { jsx as jsx17, jsxs as
|
|
1639
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1636
1640
|
var Backdrop = forwardRef17((props, ref) => {
|
|
1637
1641
|
const _a = props, { children, className, isOpen, onClose } = _a, rest = __objRest(_a, ["children", "className", "isOpen", "onClose"]);
|
|
1638
1642
|
const nodeRef = useRef10(null);
|
|
@@ -1646,7 +1650,7 @@ var Backdrop = forwardRef17((props, ref) => {
|
|
|
1646
1650
|
leave: 300,
|
|
1647
1651
|
mountOnEnter: true,
|
|
1648
1652
|
unmountOnExit: true,
|
|
1649
|
-
children: /* @__PURE__ */ jsx17(Portal_default, { children: /* @__PURE__ */
|
|
1653
|
+
children: /* @__PURE__ */ jsx17(Portal_default, { children: /* @__PURE__ */ jsxs11(
|
|
1650
1654
|
"div",
|
|
1651
1655
|
__spreadProps(__spreadValues({
|
|
1652
1656
|
ref: mergeRefs2([ref, nodeRef]),
|
|
@@ -1666,9 +1670,9 @@ var Backdrop_default = Backdrop;
|
|
|
1666
1670
|
|
|
1667
1671
|
// src/components/Badge/Badge.tsx
|
|
1668
1672
|
import clsx7 from "clsx";
|
|
1669
|
-
import { jsx as jsx18, jsxs as
|
|
1673
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1670
1674
|
var Badge = ({ children, placement, content }) => {
|
|
1671
|
-
return /* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ jsxs12("div", { className: clsx7(`${PREFIX_CLS}badge-wrapper`), children: [
|
|
1672
1676
|
children,
|
|
1673
1677
|
/* @__PURE__ */ jsx18(
|
|
1674
1678
|
"div",
|
|
@@ -1695,14 +1699,14 @@ var Card_default = Card;
|
|
|
1695
1699
|
|
|
1696
1700
|
// src/components/Card/CardHeader.tsx
|
|
1697
1701
|
import { forwardRef as forwardRef19 } from "react";
|
|
1698
|
-
import { jsx as jsx20, jsxs as
|
|
1702
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1699
1703
|
var CardHeader = forwardRef19(
|
|
1700
1704
|
(_a, ref) => {
|
|
1701
1705
|
var _b = _a, { as: Component = "div", className, title, subtitle, startContent, endContent } = _b, rest = __objRest(_b, ["as", "className", "title", "subtitle", "startContent", "endContent"]);
|
|
1702
1706
|
const prefixCls = PREFIX_CLS;
|
|
1703
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ jsxs13(Component, __spreadProps(__spreadValues({ ref, className: clsx_default(`${prefixCls}card-header`, className) }, rest), { children: [
|
|
1704
1708
|
startContent && /* @__PURE__ */ jsx20("div", { className: `${prefixCls}card-header__start-content`, children: startContent }),
|
|
1705
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsxs13("div", { className: `${prefixCls}card-header__content`, children: [
|
|
1706
1710
|
/* @__PURE__ */ jsx20("div", { className: `${prefixCls}card-header__title`, children: title }),
|
|
1707
1711
|
subtitle && /* @__PURE__ */ jsx20("div", { className: `${prefixCls}card-header__subtitle`, children: subtitle })
|
|
1708
1712
|
] }),
|
|
@@ -1715,11 +1719,11 @@ var CardHeader_default = CardHeader;
|
|
|
1715
1719
|
// src/components/Chip/Chip.tsx
|
|
1716
1720
|
import clsx8 from "clsx";
|
|
1717
1721
|
import { forwardRef as forwardRef20 } from "react";
|
|
1718
|
-
import { jsx as jsx21, jsxs as
|
|
1722
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1719
1723
|
var Chip = forwardRef20(
|
|
1720
1724
|
(_a, ref) => {
|
|
1721
1725
|
var _b = _a, { as: Component = "div", children, className, variant = "text", color = "primary", size = "md" } = _b, rest = __objRest(_b, ["as", "children", "className", "variant", "color", "size"]);
|
|
1722
|
-
return /* @__PURE__ */
|
|
1726
|
+
return /* @__PURE__ */ jsxs14(
|
|
1723
1727
|
Component,
|
|
1724
1728
|
__spreadProps(__spreadValues({
|
|
1725
1729
|
ref,
|
|
@@ -1748,14 +1752,14 @@ var Chip_default = Chip;
|
|
|
1748
1752
|
import clsx9 from "clsx";
|
|
1749
1753
|
import { forwardRef as forwardRef21, useRef as useRef11 } from "react";
|
|
1750
1754
|
import { mergeRefs as mergeRefs3 } from "react-merge-refs";
|
|
1751
|
-
import { jsx as jsx22, jsxs as
|
|
1755
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1752
1756
|
var Drawer = forwardRef21((props, ref) => {
|
|
1753
1757
|
const { children, className, isOpen, size = "md", position = "left", onClose } = props;
|
|
1754
1758
|
const nodeRef = useRef11(null);
|
|
1755
1759
|
const handleClose = () => {
|
|
1756
1760
|
onClose();
|
|
1757
1761
|
};
|
|
1758
|
-
return /* @__PURE__ */ jsx22(Backdrop_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsx22(Transition_default, { nodeRef, isOpen, name: `${PREFIX_CLS}drawer`, enter: 600, leave: 300, unmountOnExit: true, children: /* @__PURE__ */
|
|
1762
|
+
return /* @__PURE__ */ jsx22(Backdrop_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsx22(Transition_default, { nodeRef, isOpen, name: `${PREFIX_CLS}drawer`, enter: 600, leave: 300, unmountOnExit: true, children: /* @__PURE__ */ jsxs15(
|
|
1759
1763
|
"div",
|
|
1760
1764
|
{
|
|
1761
1765
|
ref: mergeRefs3([ref, nodeRef]),
|
|
@@ -1813,7 +1817,7 @@ var useMenuItemValue = () => {
|
|
|
1813
1817
|
var MenuValueContext_default = MenuValueContext;
|
|
1814
1818
|
|
|
1815
1819
|
// src/components/Menu/MenuItem.tsx
|
|
1816
|
-
import { jsx as jsx23, jsxs as
|
|
1820
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1817
1821
|
var MenuItem = forwardRef22((props, ref) => {
|
|
1818
1822
|
const _a = props, { as: Component = "div", className, style, value, title, icon, level = 1, disabled, onClick } = _a, rest = __objRest(_a, ["as", "className", "style", "value", "title", "icon", "level", "disabled", "onClick"]);
|
|
1819
1823
|
const { value: menuValue, originalValue, navMode, onChange, onOpen, onItemSelect } = useMenu();
|
|
@@ -1833,7 +1837,7 @@ var MenuItem = forwardRef22((props, ref) => {
|
|
|
1833
1837
|
onChange(mergedValues);
|
|
1834
1838
|
}
|
|
1835
1839
|
}, [value, originalValue, navMode]);
|
|
1836
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ jsxs16(
|
|
1837
1841
|
Component,
|
|
1838
1842
|
__spreadProps(__spreadValues({
|
|
1839
1843
|
ref,
|
|
@@ -1889,7 +1893,7 @@ var addOrRemoveValueInArray = (array, value) => {
|
|
|
1889
1893
|
};
|
|
1890
1894
|
|
|
1891
1895
|
// src/components/Menu/MenuSubmenu.tsx
|
|
1892
|
-
import { jsx as jsx24, jsxs as
|
|
1896
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1893
1897
|
var MenuSubmenu = (_a) => {
|
|
1894
1898
|
var _b = _a, {
|
|
1895
1899
|
children,
|
|
@@ -1938,8 +1942,8 @@ var MenuSubmenu = (_a) => {
|
|
|
1938
1942
|
}
|
|
1939
1943
|
onClick == null ? void 0 : onClick(event);
|
|
1940
1944
|
};
|
|
1941
|
-
return /* @__PURE__ */ jsx24(MenuValueContext_default.Provider, { value: mergedValues, children: /* @__PURE__ */ jsx24("div", { className: clsx11(`${PREFIX_CLS}menu-submenu`), children: /* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */ jsx24(CollapseTrigger_default, { children: /* @__PURE__ */
|
|
1945
|
+
return /* @__PURE__ */ jsx24(MenuValueContext_default.Provider, { value: mergedValues, children: /* @__PURE__ */ jsx24("div", { className: clsx11(`${PREFIX_CLS}menu-submenu`), children: /* @__PURE__ */ jsxs17(Collapse_default, { isOpen, children: [
|
|
1946
|
+
/* @__PURE__ */ jsx24(CollapseTrigger_default, { children: /* @__PURE__ */ jsxs17(
|
|
1943
1947
|
"div",
|
|
1944
1948
|
__spreadProps(__spreadValues({
|
|
1945
1949
|
className: clsx11(
|
|
@@ -1976,7 +1980,7 @@ var MenuSubmenu = (_a) => {
|
|
|
1976
1980
|
var MenuSubmenu_default = MenuSubmenu;
|
|
1977
1981
|
|
|
1978
1982
|
// src/components/Menu/MenuGroup.tsx
|
|
1979
|
-
import { Fragment as Fragment4, jsx as jsx25, jsxs as
|
|
1983
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1980
1984
|
var MenuGroup = (_a) => {
|
|
1981
1985
|
var _b = _a, {
|
|
1982
1986
|
children,
|
|
@@ -2001,8 +2005,8 @@ var MenuGroup = (_a) => {
|
|
|
2001
2005
|
return type === "item" ? /* @__PURE__ */ jsx25(MenuItem_default, __spreadValues({}, item), index) : type === "submenu" ? /* @__PURE__ */ jsx25(MenuSubmenu_default, __spreadValues({}, item), index) : /* @__PURE__ */ jsx25(MenuItem_default, __spreadValues({}, item), index);
|
|
2002
2006
|
});
|
|
2003
2007
|
}, [items]);
|
|
2004
|
-
return /* @__PURE__ */
|
|
2005
|
-
/* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
2009
|
+
/* @__PURE__ */ jsxs18(
|
|
2006
2010
|
"div",
|
|
2007
2011
|
__spreadProps(__spreadValues({
|
|
2008
2012
|
className: clsx12(`${PREFIX_CLS}menu-group`, className),
|
|
@@ -2136,18 +2140,18 @@ var AccordionItem_default = AccordionItem;
|
|
|
2136
2140
|
|
|
2137
2141
|
// src/components/Accordion/AccordionHeader.tsx
|
|
2138
2142
|
import { forwardRef as forwardRef25 } from "react";
|
|
2139
|
-
import { jsx as jsx29, jsxs as
|
|
2143
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2140
2144
|
var AccordionHeader = forwardRef25((props, ref) => {
|
|
2141
2145
|
const _a = props, { className, title, subtitle, startContent, endContent } = _a, rest = __objRest(_a, ["className", "title", "subtitle", "startContent", "endContent"]);
|
|
2142
2146
|
const prefixCls = PREFIX_CLS;
|
|
2143
2147
|
const { isOpen } = useCollapse();
|
|
2144
|
-
return /* @__PURE__ */ jsx29(CollapseTrigger_default, { children: /* @__PURE__ */
|
|
2148
|
+
return /* @__PURE__ */ jsx29(CollapseTrigger_default, { children: /* @__PURE__ */ jsxs19("div", __spreadProps(__spreadValues({ ref, className: clsx_default(`${prefixCls}accordion-header`, className) }, rest), { children: [
|
|
2145
2149
|
startContent && /* @__PURE__ */ jsx29("div", { className: `${prefixCls}accordion-header__start-content`, children: startContent }),
|
|
2146
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsxs19("div", { className: `${prefixCls}accordion-header__content`, children: [
|
|
2147
2151
|
/* @__PURE__ */ jsx29("div", { className: `${prefixCls}accordion-header__title`, children: title }),
|
|
2148
2152
|
subtitle && /* @__PURE__ */ jsx29("div", { className: `${prefixCls}accordion-header__subtitle`, children: subtitle })
|
|
2149
2153
|
] }),
|
|
2150
|
-
/* @__PURE__ */ jsx29("div", { className: `${prefixCls}accordion-header__end-content`, children: /* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ jsx29("div", { className: `${prefixCls}accordion-header__end-content`, children: /* @__PURE__ */ jsxs19("div", { className: "us-d-flex us-items-center us-gap-1", children: [
|
|
2151
2155
|
endContent,
|
|
2152
2156
|
/* @__PURE__ */ jsx29(Button, { type: "button", variant: "text", color: "secondary", size: "sm", iconOnly: true, children: /* @__PURE__ */ jsx29(Icon_default, { children: isOpen ? /* @__PURE__ */ jsx29(ChevronUpIcon_default, {}) : /* @__PURE__ */ jsx29(ChevronDownIcon_default, {}) }) })
|
|
2153
2157
|
] }) })
|
|
@@ -2192,7 +2196,7 @@ var useTabs = () => {
|
|
|
2192
2196
|
};
|
|
2193
2197
|
|
|
2194
2198
|
// src/components/Tabs/Tab.tsx
|
|
2195
|
-
import { jsx as jsx32, jsxs as
|
|
2199
|
+
import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2196
2200
|
var Tab = forwardRef28(
|
|
2197
2201
|
(_a, ref) => {
|
|
2198
2202
|
var _b = _a, {
|
|
@@ -2267,7 +2271,7 @@ var Tab = forwardRef28(
|
|
|
2267
2271
|
tabs.previousTabRef.current = tabRef.current;
|
|
2268
2272
|
}
|
|
2269
2273
|
}, [value, tabs.value]);
|
|
2270
|
-
return /* @__PURE__ */
|
|
2274
|
+
return /* @__PURE__ */ jsxs20(
|
|
2271
2275
|
Component,
|
|
2272
2276
|
__spreadProps(__spreadValues({
|
|
2273
2277
|
ref: mergeRefs4(tabRef, ref, (el) => tabs.tabRefs.current[value] = el),
|
|
@@ -2281,10 +2285,10 @@ var Tab = forwardRef28(
|
|
|
2281
2285
|
}, rest), {
|
|
2282
2286
|
children: [
|
|
2283
2287
|
/* @__PURE__ */ jsx32("div", { className: `${prefixCls}overlay`, children: /* @__PURE__ */ jsx32("div", { className: `${prefixCls}overlay__surface` }) }),
|
|
2284
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ jsxs20("div", { className: `${prefixCls}tab__content`, children: [
|
|
2285
2289
|
startContent && /* @__PURE__ */ jsx32("div", { className: `${prefixCls}tab__start-content`, children: startContent }),
|
|
2286
2290
|
children,
|
|
2287
|
-
endContent || closable && /* @__PURE__ */
|
|
2291
|
+
endContent || closable && /* @__PURE__ */ jsxs20("div", { className: `${prefixCls}tab__end-content`, children: [
|
|
2288
2292
|
endContent,
|
|
2289
2293
|
closable && /* @__PURE__ */ jsx32(Button, { variant: "text", color: "secondary", iconOnly: true, size: "xs", onClick: handleClose, children: /* @__PURE__ */ jsx32(Icon_default, { children: /* @__PURE__ */ jsx32(CloseIcon_default, {}) }) })
|
|
2290
2294
|
] })
|
|
@@ -2299,7 +2303,7 @@ var Tab = forwardRef28(
|
|
|
2299
2303
|
// src/components/Tabs/Tabs.tsx
|
|
2300
2304
|
import clsx15 from "clsx";
|
|
2301
2305
|
import { useEffect as useEffect18, useRef as useRef13, useState as useState12 } from "react";
|
|
2302
|
-
import { jsx as jsx33, jsxs as
|
|
2306
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2303
2307
|
var Tabs = (_a) => {
|
|
2304
2308
|
var _b = _a, {
|
|
2305
2309
|
children,
|
|
@@ -2361,7 +2365,7 @@ var Tabs = (_a) => {
|
|
|
2361
2365
|
setSelfValue(item == null ? void 0 : item.value);
|
|
2362
2366
|
}
|
|
2363
2367
|
}, [value, items]);
|
|
2364
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ jsxs21(
|
|
2365
2369
|
TabsContext.Provider,
|
|
2366
2370
|
{
|
|
2367
2371
|
value: { previousTabRef, tabRefs, value: selfValue, onChange: handleChange, onClose: handleClose, registerItem },
|
|
@@ -2383,7 +2387,7 @@ var Tabs = (_a) => {
|
|
|
2383
2387
|
|
|
2384
2388
|
// src/components/Toolbar/Toolbar.tsx
|
|
2385
2389
|
import clsx16 from "clsx";
|
|
2386
|
-
import { Fragment as Fragment5, jsx as jsx34, jsxs as
|
|
2390
|
+
import { Fragment as Fragment5, jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2387
2391
|
var Toolbar = (props) => {
|
|
2388
2392
|
const _a = props, {
|
|
2389
2393
|
children,
|
|
@@ -2407,11 +2411,11 @@ var Toolbar = (props) => {
|
|
|
2407
2411
|
"subtitle"
|
|
2408
2412
|
]);
|
|
2409
2413
|
const prefixCls = PREFIX_CLS;
|
|
2410
|
-
return /* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ jsxs22("div", __spreadProps(__spreadValues({ className: clsx16(`${prefixCls}toolbar`, { [`${prefixCls}toolbar--${size}`]: size }, className) }, rest), { children: [
|
|
2411
2415
|
/* @__PURE__ */ jsx34("div", { className: `${prefixCls}outline-b` }),
|
|
2412
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsxs22("div", { className: clsx16(`${prefixCls}toolbar__container`), children: [
|
|
2413
2417
|
startContent ? /* @__PURE__ */ jsx34("div", { className: clsx16(`${prefixCls}toolbar__start-content`), children: startContent }) : startAction && /* @__PURE__ */ jsx34("div", { className: clsx16(`${prefixCls}toolbar__start-action`), children: startAction }),
|
|
2414
|
-
/* @__PURE__ */ jsx34("div", { className: clsx16(`${prefixCls}toolbar__content`), children: title || subtitle ? /* @__PURE__ */
|
|
2418
|
+
/* @__PURE__ */ jsx34("div", { className: clsx16(`${prefixCls}toolbar__content`), children: title || subtitle ? /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
2415
2419
|
title && /* @__PURE__ */ jsx34("div", { className: clsx16(`${prefixCls}toolbar__title`), children: title }),
|
|
2416
2420
|
subtitle && /* @__PURE__ */ jsx34("div", { className: clsx16(`${prefixCls}toolbar__subtitle`), children: subtitle })
|
|
2417
2421
|
] }) : children }),
|
|
@@ -2423,7 +2427,7 @@ var Toolbar_default = Toolbar;
|
|
|
2423
2427
|
|
|
2424
2428
|
// src/components/TextInput/TextInput.tsx
|
|
2425
2429
|
import { forwardRef as forwardRef29, useRef as useRef14, useState as useState13 } from "react";
|
|
2426
|
-
import { jsx as jsx35, jsxs as
|
|
2430
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2427
2431
|
var TextInput = forwardRef29(
|
|
2428
2432
|
(_a, ref) => {
|
|
2429
2433
|
var _b = _a, { className, value, defaultValue, disabled, inputRef, startContent, endContent, style, onChange, onClick } = _b, rest = __objRest(_b, ["className", "value", "defaultValue", "disabled", "inputRef", "startContent", "endContent", "style", "onChange", "onClick"]);
|
|
@@ -2438,7 +2442,7 @@ var TextInput = forwardRef29(
|
|
|
2438
2442
|
onClick == null ? void 0 : onClick(event);
|
|
2439
2443
|
(_a2 = selfInputRef == null ? void 0 : selfInputRef.current) == null ? void 0 : _a2.focus();
|
|
2440
2444
|
};
|
|
2441
|
-
return /* @__PURE__ */
|
|
2445
|
+
return /* @__PURE__ */ jsxs23(
|
|
2442
2446
|
"div",
|
|
2443
2447
|
{
|
|
2444
2448
|
ref,
|
|
@@ -2457,7 +2461,7 @@ var TextInput = forwardRef29(
|
|
|
2457
2461
|
onClick: handleClick,
|
|
2458
2462
|
children: [
|
|
2459
2463
|
/* @__PURE__ */ jsx35("div", { className: `${prefixCls}outline` }),
|
|
2460
|
-
/* @__PURE__ */
|
|
2464
|
+
/* @__PURE__ */ jsxs23("div", { className: `${prefixCls}input__content`, children: [
|
|
2461
2465
|
startContent && /* @__PURE__ */ jsx35("div", { className: `${prefixCls}input__start-content`, children: startContent }),
|
|
2462
2466
|
/* @__PURE__ */ jsx35(
|
|
2463
2467
|
"input",
|
|
@@ -2482,7 +2486,7 @@ var TextInput_default = TextInput;
|
|
|
2482
2486
|
// src/components/Switch/Switch.tsx
|
|
2483
2487
|
import clsx17 from "clsx";
|
|
2484
2488
|
import { forwardRef as forwardRef30, useEffect as useEffect19, useState as useState14 } from "react";
|
|
2485
|
-
import { jsx as jsx36, jsxs as
|
|
2489
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2486
2490
|
var Switch = forwardRef30(
|
|
2487
2491
|
(_a, ref) => {
|
|
2488
2492
|
var _b = _a, {
|
|
@@ -2519,7 +2523,7 @@ var Switch = forwardRef30(
|
|
|
2519
2523
|
setSelfChecked(checkedProp);
|
|
2520
2524
|
}
|
|
2521
2525
|
}, [checkedProp]);
|
|
2522
|
-
return /* @__PURE__ */
|
|
2526
|
+
return /* @__PURE__ */ jsxs24(
|
|
2523
2527
|
"label",
|
|
2524
2528
|
__spreadProps(__spreadValues({
|
|
2525
2529
|
ref,
|
|
@@ -2743,7 +2747,7 @@ var SelectVirtual = () => {
|
|
|
2743
2747
|
var SelectVirtual_default = SelectVirtual;
|
|
2744
2748
|
|
|
2745
2749
|
// src/components/Select/Select.tsx
|
|
2746
|
-
import { jsx as jsx39, jsxs as
|
|
2750
|
+
import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2747
2751
|
var Select = (props) => {
|
|
2748
2752
|
const {
|
|
2749
2753
|
data,
|
|
@@ -2756,6 +2760,7 @@ var Select = (props) => {
|
|
|
2756
2760
|
disclosure: disclosureProp,
|
|
2757
2761
|
virtual,
|
|
2758
2762
|
placeholder,
|
|
2763
|
+
className,
|
|
2759
2764
|
style,
|
|
2760
2765
|
startContent,
|
|
2761
2766
|
endContent,
|
|
@@ -2881,7 +2886,7 @@ var Select = (props) => {
|
|
|
2881
2886
|
setOffset,
|
|
2882
2887
|
renderItem
|
|
2883
2888
|
},
|
|
2884
|
-
children: /* @__PURE__ */
|
|
2889
|
+
children: /* @__PURE__ */ jsxs25(
|
|
2885
2890
|
Popover_default,
|
|
2886
2891
|
__spreadProps(__spreadValues({
|
|
2887
2892
|
target: true
|
|
@@ -2891,13 +2896,17 @@ var Select = (props) => {
|
|
|
2891
2896
|
onClose: handleClose,
|
|
2892
2897
|
autoClose: "outside",
|
|
2893
2898
|
children: [
|
|
2894
|
-
/* @__PURE__ */ jsx39(PopoverTrigger_default, { children: /* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ jsx39(PopoverTrigger_default, { children: /* @__PURE__ */ jsxs25(
|
|
2895
2900
|
"div",
|
|
2896
2901
|
{
|
|
2897
|
-
className: clsx_default(
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2902
|
+
className: clsx_default(
|
|
2903
|
+
`${prefixCls}input`,
|
|
2904
|
+
{
|
|
2905
|
+
[`${prefixCls}input--focus`]: focus,
|
|
2906
|
+
[`${prefixCls}input--disabled`]: disabled
|
|
2907
|
+
},
|
|
2908
|
+
className
|
|
2909
|
+
),
|
|
2901
2910
|
style,
|
|
2902
2911
|
onClick: handleClick,
|
|
2903
2912
|
onFocus: () => {
|
|
@@ -2909,10 +2918,10 @@ var Select = (props) => {
|
|
|
2909
2918
|
children: [
|
|
2910
2919
|
/* @__PURE__ */ jsx39("input", { type: "text", ref: inputRef, style: { position: "absolute", opacity: 0 } }),
|
|
2911
2920
|
/* @__PURE__ */ jsx39("div", { className: `${prefixCls}outline` }),
|
|
2912
|
-
/* @__PURE__ */
|
|
2921
|
+
/* @__PURE__ */ jsxs25("div", { className: `${prefixCls}input__content`, children: [
|
|
2913
2922
|
startContent && /* @__PURE__ */ jsx39("div", { className: `${prefixCls}input__start-content`, children: startContent }),
|
|
2914
2923
|
/* @__PURE__ */ jsx39("div", { className: `${prefixCls}input__field`, children: search || placeholder }),
|
|
2915
|
-
/* @__PURE__ */
|
|
2924
|
+
/* @__PURE__ */ jsxs25("div", { className: `${prefixCls}input__end-content`, children: [
|
|
2916
2925
|
endContent,
|
|
2917
2926
|
loading ? /* @__PURE__ */ jsx39(Icon_default, { children: /* @__PURE__ */ jsx39(LoaderIcon_default, { className: `${prefixCls}animation-spin` }) }) : /* @__PURE__ */ jsx39(Button, { color: "secondary", variant: "plain", size: "xs", iconOnly: true, onClick: handleClear, children: /* @__PURE__ */ jsx39(Icon_default, { children: /* @__PURE__ */ jsx39(CloseIcon_default, {}) }) }),
|
|
2918
2927
|
/* @__PURE__ */ jsx39("div", { style: { pointerEvents: "none" }, children: /* @__PURE__ */ jsx39(Icon_default, { children: disclosure.isOpen ? /* @__PURE__ */ jsx39(ChevronUpIcon_default, {}) : /* @__PURE__ */ jsx39(ChevronDownIcon_default, {}) }) })
|
|
@@ -2932,11 +2941,11 @@ var Select_default = Select;
|
|
|
2932
2941
|
|
|
2933
2942
|
// src/components/Field/Field.tsx
|
|
2934
2943
|
import { forwardRef as forwardRef31 } from "react";
|
|
2935
|
-
import { jsx as jsx40, jsxs as
|
|
2944
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2936
2945
|
var Field = forwardRef31(({ children, label }, ref) => {
|
|
2937
2946
|
{
|
|
2938
2947
|
const prefixCls = PREFIX_CLS;
|
|
2939
|
-
return /* @__PURE__ */
|
|
2948
|
+
return /* @__PURE__ */ jsxs26("div", { ref, className: clsx_default(`${prefixCls}field`), children: [
|
|
2940
2949
|
/* @__PURE__ */ jsx40("div", { className: `${prefixCls}field__label`, children: label }),
|
|
2941
2950
|
/* @__PURE__ */ jsx40("div", { className: `${prefixCls}field__content`, children })
|
|
2942
2951
|
] });
|