@j2-health/design-system 0.6.4 → 0.6.6
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/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/index.cjs +12 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -3
- package/dist/index2.js +8 -3
- package/dist/src/AppConfigProvider.cjs +1 -2
- package/dist/src/AppConfigProvider.js +1 -2
- package/dist/src/appTheme.cjs +8 -2
- package/dist/src/appTheme.cjs.map +1 -1
- package/dist/src/appTheme.js +8 -2
- package/dist/src/appTheme.js.map +1 -1
- package/dist/src/components/alert/Alert.cjs +1 -2
- package/dist/src/components/alert/Alert.js +1 -2
- package/dist/src/components/alert/Alert.module.css.cjs +1 -2
- package/dist/src/components/alert/Alert.module.css.js +1 -2
- package/dist/src/components/barchart/BarChart.cjs +1 -2
- package/dist/src/components/barchart/BarChart.js +1 -2
- package/dist/src/components/barchart/chart.module.css.cjs +1 -2
- package/dist/src/components/barchart/chart.module.css.js +1 -2
- package/dist/src/components/bareButton/BareButton.cjs +1 -2
- package/dist/src/components/bareButton/BareButton.js +1 -2
- package/dist/src/components/breadcrumb/Breadcrumb.cjs +1 -2
- package/dist/src/components/breadcrumb/Breadcrumb.js +1 -2
- package/dist/src/components/bulkActionBar/BulkActionBar.cjs +1 -2
- package/dist/src/components/bulkActionBar/BulkActionBar.js +1 -2
- package/dist/src/components/button/Button.cjs +1 -2
- package/dist/src/components/button/Button.js +1 -2
- package/dist/src/components/callout/Callout.cjs +35 -0
- package/dist/src/components/callout/Callout.cjs.map +1 -0
- package/dist/src/components/callout/Callout.d.ts +18 -0
- package/dist/src/components/callout/Callout.js +33 -0
- package/dist/src/components/callout/Callout.js.map +1 -0
- package/dist/src/components/callout/index.d.ts +1 -0
- package/dist/src/components/card/Card.cjs +1 -2
- package/dist/src/components/card/Card.js +1 -2
- package/dist/src/components/changeChip/ChangeChip.cjs +1 -2
- package/dist/src/components/changeChip/ChangeChip.js +1 -2
- package/dist/src/components/checkbox/Checkbox.cjs +1 -2
- package/dist/src/components/checkbox/Checkbox.js +1 -2
- package/dist/src/components/checkboxTree/CheckboxTree.cjs +1 -2
- package/dist/src/components/checkboxTree/CheckboxTree.js +1 -2
- package/dist/src/components/checkboxTree/TreeNode.cjs +1 -2
- package/dist/src/components/checkboxTree/TreeNode.js +1 -2
- package/dist/src/components/checkboxTree/utils.cjs +1 -2
- package/dist/src/components/checkboxTree/utils.js +1 -2
- package/dist/src/components/collapse/Collapse.cjs +1 -2
- package/dist/src/components/collapse/Collapse.js +1 -2
- package/dist/src/components/collapse/Collapse.module.css.cjs +1 -2
- package/dist/src/components/collapse/Collapse.module.css.js +1 -2
- package/dist/src/components/drawer/Drawer.cjs +1 -2
- package/dist/src/components/drawer/Drawer.js +1 -2
- package/dist/src/components/dropdown/Dropdown.cjs +1 -2
- package/dist/src/components/dropdown/Dropdown.js +1 -2
- package/dist/src/components/emptyState/EmptyState.cjs +1 -2
- package/dist/src/components/emptyState/EmptyState.js +1 -2
- package/dist/src/components/fileDropzone/FileDropzone.cjs +296 -0
- package/dist/src/components/fileDropzone/FileDropzone.cjs.map +1 -0
- package/dist/src/components/fileDropzone/FileDropzone.d.ts +68 -0
- package/dist/src/components/fileDropzone/FileDropzone.js +293 -0
- package/dist/src/components/fileDropzone/FileDropzone.js.map +1 -0
- package/dist/src/components/fileDropzone/index.d.ts +1 -0
- package/dist/src/components/filterform/FilterGroup.cjs +1 -2
- package/dist/src/components/filterform/FilterGroup.js +1 -2
- package/dist/src/components/filterform/FilterInput.cjs +1 -2
- package/dist/src/components/filterform/FilterInput.js +1 -2
- package/dist/src/components/filterform/FiltersForm.cjs +1 -2
- package/dist/src/components/filterform/FiltersForm.js +1 -2
- package/dist/src/components/filterform/FiltersForm.module.css.cjs +1 -2
- package/dist/src/components/filterform/FiltersForm.module.css.js +1 -2
- package/dist/src/components/filterform/filterHelpers.cjs +1 -2
- package/dist/src/components/filterform/filterHelpers.js +1 -2
- package/dist/src/components/filterform/useFilterField.cjs +1 -2
- package/dist/src/components/filterform/useFilterField.js +1 -2
- package/dist/src/components/filterform/useFiltersForm.cjs +1 -2
- package/dist/src/components/filterform/useFiltersForm.js +1 -2
- package/dist/src/components/form/Form.cjs +1 -2
- package/dist/src/components/form/Form.js +1 -2
- package/dist/src/components/form/FormItem.cjs +1 -2
- package/dist/src/components/form/FormItem.js +1 -2
- package/dist/src/components/form/FormItemFieldContext.cjs +1 -2
- package/dist/src/components/form/FormItemFieldContext.cjs.map +1 -1
- package/dist/src/components/form/FormItemFieldContext.js +1 -2
- package/dist/src/components/form/FormikField.cjs +1 -2
- package/dist/src/components/form/FormikField.js +1 -2
- package/dist/src/components/input/AntdInput.cjs +1 -2
- package/dist/src/components/input/AntdInput.d.ts +1 -1
- package/dist/src/components/input/AntdInput.js +1 -2
- package/dist/src/components/input/AntdSearchInput.cjs +1 -2
- package/dist/src/components/input/AntdSearchInput.d.ts +1 -1
- package/dist/src/components/input/AntdSearchInput.js +1 -2
- package/dist/src/components/input/AntdTextArea.cjs +15 -0
- package/dist/src/components/input/AntdTextArea.cjs.map +1 -0
- package/dist/src/components/input/AntdTextArea.d.ts +347 -0
- package/dist/src/components/input/AntdTextArea.js +15 -0
- package/dist/src/components/input/AntdTextArea.js.map +1 -0
- package/dist/src/components/input/Input.cjs +1 -2
- package/dist/src/components/input/Input.js +1 -2
- package/dist/src/components/input/index.d.ts +1 -0
- package/dist/src/components/inputnumber/InputNumber.cjs +1 -2
- package/dist/src/components/inputnumber/InputNumber.js +1 -2
- package/dist/src/components/inputnumber/InputNumber.module.css.cjs +1 -2
- package/dist/src/components/inputnumber/InputNumber.module.css.js +1 -2
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.cjs +1 -2
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.js +1 -2
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.module.css.cjs +1 -2
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.module.css.js +1 -2
- package/dist/src/components/legacyNavMenu/UserProfile.cjs +1 -2
- package/dist/src/components/legacyNavMenu/UserProfile.js +1 -2
- package/dist/src/components/legacyNavMenu/UserProfile.module.css.cjs +1 -2
- package/dist/src/components/legacyNavMenu/UserProfile.module.css.js +1 -2
- package/dist/src/components/listRow/ListRow.cjs +1 -2
- package/dist/src/components/listRow/ListRow.js +1 -2
- package/dist/src/components/listpopover/ListPopover.cjs +1 -2
- package/dist/src/components/listpopover/ListPopover.js +1 -2
- package/dist/src/components/listpopover/ListPopover.module.css.cjs +1 -2
- package/dist/src/components/listpopover/ListPopover.module.css.js +1 -2
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs +1 -2
- package/dist/src/components/manageColumns/ManageColumnsItem.js +1 -2
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs +1 -2
- package/dist/src/components/manageColumns/ManageColumnsPanel.js +1 -2
- package/dist/src/components/manageColumns/SelectAll.cjs +1 -2
- package/dist/src/components/manageColumns/SelectAll.js +1 -2
- package/dist/src/components/menu/Menu.cjs +1 -2
- package/dist/src/components/menu/Menu.js +1 -2
- package/dist/src/components/menu/Menu.module.css.cjs +1 -2
- package/dist/src/components/menu/Menu.module.css.js +1 -2
- package/dist/src/components/message/Message.module.css.cjs +1 -2
- package/dist/src/components/message/Message.module.css.js +1 -2
- package/dist/src/components/message/useMessage.cjs +1 -2
- package/dist/src/components/message/useMessage.js +1 -2
- package/dist/src/components/modal/Modal.cjs +1 -2
- package/dist/src/components/modal/Modal.js +1 -2
- package/dist/src/components/navMenu/NavMenu.cjs +1 -2
- package/dist/src/components/navMenu/NavMenu.js +1 -2
- package/dist/src/components/navMenu/NavMenu.module.css.cjs +1 -2
- package/dist/src/components/navMenu/NavMenu.module.css.js +1 -2
- package/dist/src/components/notification/Notification.module.css.cjs +1 -2
- package/dist/src/components/notification/Notification.module.css.js +1 -2
- package/dist/src/components/notification/useNotification.cjs +1 -2
- package/dist/src/components/notification/useNotification.js +1 -2
- package/dist/src/components/notificationModal/NotifcationModal.module.css.cjs +1 -2
- package/dist/src/components/notificationModal/NotifcationModal.module.css.js +1 -2
- package/dist/src/components/notificationModal/NotificationModal.cjs +1 -2
- package/dist/src/components/notificationModal/NotificationModal.js +1 -2
- package/dist/src/components/pagination/Pagination.cjs +1 -2
- package/dist/src/components/pagination/Pagination.js +1 -2
- package/dist/src/components/pagination/Pagination.module.css.cjs +1 -2
- package/dist/src/components/pagination/Pagination.module.css.js +1 -2
- package/dist/src/components/popover/Popover.cjs +1 -2
- package/dist/src/components/popover/Popover.js +1 -2
- package/dist/src/components/popover/Popover.module.css.cjs +1 -2
- package/dist/src/components/popover/Popover.module.css.js +1 -2
- package/dist/src/components/progress/Progress.cjs +1 -2
- package/dist/src/components/progress/Progress.js +1 -2
- package/dist/src/components/radio/Radio.cjs +1 -2
- package/dist/src/components/radio/Radio.js +1 -2
- package/dist/src/components/radioCardGroup/RadioCardGroup.cjs +78 -0
- package/dist/src/components/radioCardGroup/RadioCardGroup.cjs.map +1 -0
- package/dist/src/components/radioCardGroup/RadioCardGroup.d.ts +26 -0
- package/dist/src/components/radioCardGroup/RadioCardGroup.js +76 -0
- package/dist/src/components/radioCardGroup/RadioCardGroup.js.map +1 -0
- package/dist/src/components/radioCardGroup/index.d.ts +1 -0
- package/dist/src/components/rate/Rate.cjs +1 -2
- package/dist/src/components/rate/Rate.js +1 -2
- package/dist/src/components/select/AntdSelect.cjs +1 -2
- package/dist/src/components/select/AntdSelect.js +1 -2
- package/dist/src/components/select/Select.cjs +1 -2
- package/dist/src/components/select/Select.js +1 -2
- package/dist/src/components/select/SummarizedSelect.cjs +1 -2
- package/dist/src/components/select/SummarizedSelect.js +1 -2
- package/dist/src/components/select/SummarizedSelect.module.css.cjs +1 -2
- package/dist/src/components/select/SummarizedSelect.module.css.js +1 -2
- package/dist/src/components/skeleton/Skeleton.cjs +1 -2
- package/dist/src/components/skeleton/Skeleton.js +1 -2
- package/dist/src/components/slider/Slider.cjs +21 -0
- package/dist/src/components/slider/Slider.cjs.map +1 -0
- package/dist/src/components/slider/Slider.d.ts +7 -0
- package/dist/src/components/slider/Slider.js +19 -0
- package/dist/src/components/slider/Slider.js.map +1 -0
- package/dist/src/components/slider/index.d.ts +1 -0
- package/dist/src/components/spinner/Spinner.cjs +1 -2
- package/dist/src/components/spinner/Spinner.js +1 -2
- package/dist/src/components/statusPill/StatusPill.cjs +1 -2
- package/dist/src/components/statusPill/StatusPill.js +1 -2
- package/dist/src/components/statusPill/StatusPill.module.css.cjs +1 -2
- package/dist/src/components/statusPill/StatusPill.module.css.js +1 -2
- package/dist/src/components/stepDrawer/StepDrawer.cjs +1 -2
- package/dist/src/components/stepDrawer/StepDrawer.js +1 -2
- package/dist/src/components/steps/Steps.cjs +1 -2
- package/dist/src/components/steps/Steps.js +1 -2
- package/dist/src/components/steps/useSteps.cjs +1 -2
- package/dist/src/components/steps/useSteps.js +1 -2
- package/dist/src/components/swatch/Swatch.cjs +1 -2
- package/dist/src/components/swatch/Swatch.js +1 -2
- package/dist/src/components/swatchStrip/SwatchStrip.cjs +1 -2
- package/dist/src/components/swatchStrip/SwatchStrip.js +1 -2
- package/dist/src/components/switch/Switch.cjs +1 -2
- package/dist/src/components/switch/Switch.js +1 -2
- package/dist/src/components/table/Table.cjs +2 -3
- package/dist/src/components/table/Table.js +2 -3
- package/dist/src/components/table/Table.module.css.cjs +1 -2
- package/dist/src/components/table/Table.module.css.js +1 -2
- package/dist/src/components/tabs/Tabs.cjs +1 -2
- package/dist/src/components/tabs/Tabs.js +1 -2
- package/dist/src/components/tabs/Tabs.module.css.cjs +1 -2
- package/dist/src/components/tabs/Tabs.module.css.js +1 -2
- package/dist/src/components/tag/Tag.cjs +1 -2
- package/dist/src/components/tag/Tag.js +1 -2
- package/dist/src/components/thresholdBar/ThresholdBar.cjs +1 -2
- package/dist/src/components/thresholdBar/ThresholdBar.js +1 -2
- package/dist/src/components/thresholdBar/ThresholdBar.module.css.cjs +1 -2
- package/dist/src/components/thresholdBar/ThresholdBar.module.css.js +1 -2
- package/dist/src/components/tooltip/Tooltip.cjs +1 -2
- package/dist/src/components/tooltip/Tooltip.js +1 -2
- package/dist/src/components/vennDiagram/VennDiagram.cjs +1 -2
- package/dist/src/components/vennDiagram/VennDiagram.js +1 -2
- package/dist/src/svgs/ProgressCircle.svg.cjs +1 -2
- package/dist/src/svgs/ProgressCircle.svg.js +1 -2
- package/dist/src/svgs/j2-logo-menu-collapse.svg.cjs +1 -2
- package/dist/src/svgs/j2-logo-menu-collapse.svg.js +1 -2
- package/dist/src/svgs/j2-logo-menu.svg.cjs +1 -2
- package/dist/src/svgs/j2-logo-menu.svg.js +1 -2
- package/dist/src/svgs/menu-sidebar-collapse.svg.cjs +1 -2
- package/dist/src/svgs/menu-sidebar-collapse.svg.js +1 -2
- package/dist/src/svgs/menu-sidebar-expand.svg.cjs +1 -2
- package/dist/src/svgs/menu-sidebar-expand.svg.js +1 -2
- package/dist/src/utils/useRender.cjs +1 -2
- package/dist/src/utils/useRender.js +1 -2
- package/dist/style.css +78 -78
- package/dist/tailwind.cjs +1 -2
- package/dist/tailwind.js +1 -2
- package/package.json +13 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/notificationModal/NotifcationModal.module.css
|
|
2
2
|
var modalTitleWithIcon = "_modalTitleWithIcon_5g0kf_1";
|
|
3
3
|
var modalIcon = "_modalIcon_5g0kf_7";
|
|
4
4
|
var modalTitleContent = "_modalTitleContent_5g0kf_16";
|
|
@@ -11,7 +11,6 @@ var NotifcationModal_module_default = {
|
|
|
11
11
|
modalTitleText,
|
|
12
12
|
modalContentWithIcon
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { NotifcationModal_module_default as default, modalContentWithIcon, modalIcon, modalTitleContent, modalTitleText, modalTitleWithIcon };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=NotifcationModal.module.css.js.map
|
|
@@ -5,7 +5,7 @@ let react = require("react");
|
|
|
5
5
|
let _phosphor_icons_react = require("@phosphor-icons/react");
|
|
6
6
|
_phosphor_icons_react = require_runtime.__toESM(_phosphor_icons_react, 1);
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
|
|
8
|
+
// src/components/notificationModal/NotificationModal.tsx
|
|
9
9
|
var getNotificationIcon = (type) => {
|
|
10
10
|
switch (type) {
|
|
11
11
|
case "error": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_phosphor_icons_react.XCircleIcon, {
|
|
@@ -55,7 +55,6 @@ var NotificationModal = ({ type, title, children, withContentPadding = true, ...
|
|
|
55
55
|
})
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
|
-
//#endregion
|
|
59
58
|
exports.NotificationModal = NotificationModal;
|
|
60
59
|
|
|
61
60
|
//# sourceMappingURL=NotificationModal.cjs.map
|
|
@@ -3,7 +3,7 @@ import NotifcationModal_module_default from "./NotifcationModal.module.css.js";
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { CheckCircleIcon, InfoIcon, WarningCircleIcon, XCircleIcon } from "@phosphor-icons/react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/notificationModal/NotificationModal.tsx
|
|
7
7
|
var getNotificationIcon = (type) => {
|
|
8
8
|
switch (type) {
|
|
9
9
|
case "error": return /* @__PURE__ */ jsx(XCircleIcon, {
|
|
@@ -53,7 +53,6 @@ var NotificationModal = ({ type, title, children, withContentPadding = true, ...
|
|
|
53
53
|
})
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
//#endregion
|
|
57
56
|
export { NotificationModal };
|
|
58
57
|
|
|
59
58
|
//# sourceMappingURL=NotificationModal.js.map
|
|
@@ -6,7 +6,7 @@ _phosphor_icons_react = require_runtime.__toESM(_phosphor_icons_react, 1);
|
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let classnames = require("classnames");
|
|
8
8
|
classnames = require_runtime.__toESM(classnames, 1);
|
|
9
|
-
|
|
9
|
+
// src/components/pagination/Pagination.tsx
|
|
10
10
|
var renderIconButton = (icon, isSmall, customClassName) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Button, {
|
|
11
11
|
type: "link",
|
|
12
12
|
size: isSmall ? "small" : "middle",
|
|
@@ -66,7 +66,6 @@ var Pagination = ({ paginationTextLabels = false, ...props }) => {
|
|
|
66
66
|
const enriched = withDesignSystemPaginationOverrides(props, { paginationTextLabels });
|
|
67
67
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Pagination, { ...enriched });
|
|
68
68
|
};
|
|
69
|
-
//#endregion
|
|
70
69
|
exports.Pagination = Pagination;
|
|
71
70
|
exports.withDesignSystemPaginationOverrides = withDesignSystemPaginationOverrides;
|
|
72
71
|
|
|
@@ -3,7 +3,7 @@ import { Button, Pagination, Select } from "antd";
|
|
|
3
3
|
import { CaretDoubleLeftIcon, CaretDoubleRightIcon, CaretDownIcon, CaretLeftIcon, CaretRightIcon, DotsThreeIcon } from "@phosphor-icons/react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import cx from "classnames";
|
|
6
|
-
|
|
6
|
+
// src/components/pagination/Pagination.tsx
|
|
7
7
|
var renderIconButton = (icon, isSmall, customClassName) => /* @__PURE__ */ jsx(Button, {
|
|
8
8
|
type: "link",
|
|
9
9
|
size: isSmall ? "small" : "middle",
|
|
@@ -63,7 +63,6 @@ var Pagination$1 = ({ paginationTextLabels = false, ...props }) => {
|
|
|
63
63
|
const enriched = withDesignSystemPaginationOverrides(props, { paginationTextLabels });
|
|
64
64
|
return /* @__PURE__ */ jsx(Pagination, { ...enriched });
|
|
65
65
|
};
|
|
66
|
-
//#endregion
|
|
67
66
|
export { Pagination$1 as Pagination, withDesignSystemPaginationOverrides };
|
|
68
67
|
|
|
69
68
|
//# sourceMappingURL=Pagination.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/pagination/Pagination.module.css
|
|
2
2
|
var Pagination_module_default = { "jump-button": "_jump-button_bwjnt_41" };
|
|
3
|
-
//#endregion
|
|
4
3
|
exports.default = Pagination_module_default;
|
|
5
4
|
|
|
6
5
|
//# sourceMappingURL=Pagination.module.css.cjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/pagination/Pagination.module.css
|
|
2
2
|
var Pagination_module_default = { "jump-button": "_jump-button_bwjnt_41" };
|
|
3
|
-
//#endregion
|
|
4
3
|
export { Pagination_module_default as default };
|
|
5
4
|
|
|
6
5
|
//# sourceMappingURL=Pagination.module.css.js.map
|
|
@@ -4,7 +4,7 @@ let antd = require("antd");
|
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
let classnames = require("classnames");
|
|
6
6
|
classnames = require_runtime.__toESM(classnames, 1);
|
|
7
|
-
|
|
7
|
+
// src/components/popover/Popover.tsx
|
|
8
8
|
var Popover = ({ children, placement = "top", scrollable = false, contentPadding = true, content, smallPadding = false, paddingSize, arrow = false, rootClassName, ...props }) => {
|
|
9
9
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Popover, {
|
|
10
10
|
rootClassName: (0, classnames.default)(rootClassName, require_Popover_module.default.j2Popover, scrollable && require_Popover_module.default.scrollable, smallPadding && require_Popover_module.default.smallPadding, paddingSize && require_Popover_module.default[`${paddingSize}Padding`]),
|
|
@@ -18,7 +18,6 @@ var Popover = ({ children, placement = "top", scrollable = false, contentPadding
|
|
|
18
18
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children })
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
exports.Popover = Popover;
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=Popover.cjs.map
|
|
@@ -2,7 +2,7 @@ import Popover_module_default from "./Popover.module.css.js";
|
|
|
2
2
|
import { Popover } from "antd";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
-
|
|
5
|
+
// src/components/popover/Popover.tsx
|
|
6
6
|
var Popover$1 = ({ children, placement = "top", scrollable = false, contentPadding = true, content, smallPadding = false, paddingSize, arrow = false, rootClassName, ...props }) => {
|
|
7
7
|
return /* @__PURE__ */ jsx(Popover, {
|
|
8
8
|
rootClassName: cx(rootClassName, Popover_module_default.j2Popover, scrollable && Popover_module_default.scrollable, smallPadding && Popover_module_default.smallPadding, paddingSize && Popover_module_default[`${paddingSize}Padding`]),
|
|
@@ -16,7 +16,6 @@ var Popover$1 = ({ children, placement = "top", scrollable = false, contentPaddi
|
|
|
16
16
|
children: /* @__PURE__ */ jsx("div", { children })
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { Popover$1 as Popover };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=Popover.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/popover/Popover.module.css
|
|
2
2
|
var j2Popover = "_j2Popover_r2pkr_1";
|
|
3
3
|
var smallPadding = "_smallPadding_r2pkr_6";
|
|
4
4
|
var smPadding = "_smPadding_r2pkr_7";
|
|
@@ -21,7 +21,6 @@ var Popover_module_default = {
|
|
|
21
21
|
popoverHeader,
|
|
22
22
|
scrollable
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
exports.default = Popover_module_default;
|
|
26
25
|
exports.j2Popover = j2Popover;
|
|
27
26
|
exports.mdPadding = mdPadding;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/popover/Popover.module.css
|
|
2
2
|
var j2Popover = "_j2Popover_r2pkr_1";
|
|
3
3
|
var smallPadding = "_smallPadding_r2pkr_6";
|
|
4
4
|
var smPadding = "_smPadding_r2pkr_7";
|
|
@@ -21,7 +21,6 @@ var Popover_module_default = {
|
|
|
21
21
|
popoverHeader,
|
|
22
22
|
scrollable
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { Popover_module_default as default, j2Popover, mdPadding, nonePadding, popoverHeader, scrollable, smPadding, smallPadding, xlPadding, xsPadding, xxsPadding };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=Popover.module.css.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
let antd = require("antd");
|
|
2
2
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
-
|
|
3
|
+
// src/components/progress/Progress.tsx
|
|
4
4
|
var Progress = ({ ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Progress, { ...props });
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
exports.Progress = Progress;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=Progress.cjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Progress } from "antd";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/progress/Progress.tsx
|
|
4
4
|
var Progress$1 = ({ ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ jsx(Progress, { ...props });
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { Progress$1 as Progress };
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=Progress.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let antd = require("antd");
|
|
2
2
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
-
|
|
3
|
+
// src/components/radio/Radio.tsx
|
|
4
4
|
var Radio = (props) => {
|
|
5
5
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Radio, { ...props });
|
|
6
6
|
};
|
|
@@ -11,7 +11,6 @@ var RadioGroup = ({ buttonStyle = "solid", optionType = "button", ...props }) =>
|
|
|
11
11
|
optionType
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
exports.Radio = Radio;
|
|
16
15
|
exports.RadioGroup = RadioGroup;
|
|
17
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Radio } from "antd";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/radio/Radio.tsx
|
|
4
4
|
var Radio$1 = (props) => {
|
|
5
5
|
return /* @__PURE__ */ jsx(Radio, { ...props });
|
|
6
6
|
};
|
|
@@ -11,7 +11,6 @@ var RadioGroup = ({ buttonStyle = "solid", optionType = "button", ...props }) =>
|
|
|
11
11
|
optionType
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { Radio$1 as Radio, RadioGroup };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let classnames = require("classnames");
|
|
5
|
+
classnames = require_runtime.__toESM(classnames, 1);
|
|
6
|
+
// src/components/radioCardGroup/RadioCardGroup.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A single choice shown as a row of bordered cards, each with a radio mark,
|
|
9
|
+
* a label and an optional line of description. Behaves as a radio group: the
|
|
10
|
+
* arrow keys move between cards and select, and only the selected card (or
|
|
11
|
+
* the first, when none is) is in the tab order.
|
|
12
|
+
*/
|
|
13
|
+
function RadioCardGroup({ options, value, onChange, columns, className, ...aria }) {
|
|
14
|
+
const refs = (0, react.useRef)([]);
|
|
15
|
+
const enabled = options.map((option, index) => ({
|
|
16
|
+
option,
|
|
17
|
+
index
|
|
18
|
+
})).filter(({ option }) => !option.disabled);
|
|
19
|
+
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
20
|
+
const tabStop = selectedIndex >= 0 && !options[selectedIndex].disabled ? selectedIndex : enabled[0]?.index ?? -1;
|
|
21
|
+
const move = (from, step) => {
|
|
22
|
+
const position = enabled.findIndex(({ index }) => index === from);
|
|
23
|
+
const next = enabled[(position + step + enabled.length) % enabled.length];
|
|
24
|
+
if (!next) return;
|
|
25
|
+
onChange(next.option.value);
|
|
26
|
+
refs.current[next.index]?.focus();
|
|
27
|
+
};
|
|
28
|
+
const handleKeyDown = (event, index) => {
|
|
29
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
move(index, 1);
|
|
32
|
+
} else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
move(index, -1);
|
|
35
|
+
} else if (event.key === " " || event.key === "Enter") {
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
if (!options[index].disabled) onChange(options[index].value);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
41
|
+
role: "radiogroup",
|
|
42
|
+
...aria,
|
|
43
|
+
className: (0, classnames.default)("grid gap-3", className),
|
|
44
|
+
style: { gridTemplateColumns: `repeat(${columns ?? options.length}, minmax(0, 1fr))` },
|
|
45
|
+
children: options.map((option, index) => {
|
|
46
|
+
const selected = option.value === value;
|
|
47
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
48
|
+
ref: (element) => {
|
|
49
|
+
refs.current[index] = element;
|
|
50
|
+
},
|
|
51
|
+
role: "radio",
|
|
52
|
+
"aria-checked": selected,
|
|
53
|
+
"aria-disabled": option.disabled || void 0,
|
|
54
|
+
tabIndex: index === tabStop ? 0 : -1,
|
|
55
|
+
onClick: () => !option.disabled && onChange(option.value),
|
|
56
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
57
|
+
className: (0, classnames.default)("rounded-j2 border-2 border-solid p-3.5 transition-colors", option.disabled ? "cursor-not-allowed border-j2-gray-5 opacity-60" : selected ? "cursor-pointer border-j2-primary bg-j2-blue-1" : "cursor-pointer border-j2-gray-5 hover:border-j2-gray-7 hover:bg-j2-gray-1"),
|
|
58
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59
|
+
className: (0, classnames.default)("flex items-center gap-2.5", Boolean(option.description) && "mb-1"),
|
|
60
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
61
|
+
"aria-hidden": true,
|
|
62
|
+
className: (0, classnames.default)("flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center rounded-full border-2 border-solid transition-colors", selected ? "border-j2-primary" : "border-j2-gray-7"),
|
|
63
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: (0, classnames.default)("h-[9px] w-[9px] rounded-full transition-colors", selected ? "bg-j2-primary" : "bg-transparent") })
|
|
64
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
65
|
+
className: "text-sm font-semibold text-j2-text",
|
|
66
|
+
children: option.label
|
|
67
|
+
})]
|
|
68
|
+
}), option.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
69
|
+
className: "pl-7 text-xs leading-snug text-j2-text-secondary",
|
|
70
|
+
children: option.description
|
|
71
|
+
})]
|
|
72
|
+
}, option.value);
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
exports.RadioCardGroup = RadioCardGroup;
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=RadioCardGroup.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioCardGroup.cjs","names":["useRef","cx"],"sources":["../../../../src/components/radioCardGroup/RadioCardGroup.tsx"],"sourcesContent":["import { useRef, type KeyboardEvent, type ReactNode } from 'react'\nimport cx from 'classnames'\n\nexport type RadioCardOption<T extends string> = {\n value: T\n label: ReactNode\n /** One short line under the label. Leave it out when the label says\n * enough. */\n description?: ReactNode\n disabled?: boolean\n}\n\nexport type RadioCardGroupProps<T extends string> = {\n options: RadioCardOption<T>[]\n value?: T | null\n onChange: (value: T) => void\n /** Cards per row; defaults to one row with every option. */\n columns?: number\n 'aria-label'?: string\n 'aria-labelledby'?: string\n className?: string\n}\n\n/**\n * A single choice shown as a row of bordered cards, each with a radio mark,\n * a label and an optional line of description. Behaves as a radio group: the\n * arrow keys move between cards and select, and only the selected card (or\n * the first, when none is) is in the tab order.\n */\nexport function RadioCardGroup<T extends string>({\n options,\n value,\n onChange,\n columns,\n className,\n ...aria\n}: RadioCardGroupProps<T>) {\n const refs = useRef<(HTMLDivElement | null)[]>([])\n const enabled = options\n .map((option, index) => ({ option, index }))\n .filter(({ option }) => !option.disabled)\n const selectedIndex = options.findIndex((option) => option.value === value)\n const tabStop =\n selectedIndex >= 0 && !options[selectedIndex].disabled\n ? selectedIndex\n : (enabled[0]?.index ?? -1)\n\n const move = (from: number, step: 1 | -1) => {\n const position = enabled.findIndex(({ index }) => index === from)\n const next = enabled[(position + step + enabled.length) % enabled.length]\n if (!next) return\n onChange(next.option.value)\n refs.current[next.index]?.focus()\n }\n\n const handleKeyDown = (event: KeyboardEvent, index: number) => {\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n event.preventDefault()\n move(index, 1)\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n event.preventDefault()\n move(index, -1)\n } else if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault()\n // A card can turn disabled while it has focus; it must not select.\n if (!options[index].disabled) onChange(options[index].value)\n }\n }\n\n return (\n <div\n role=\"radiogroup\"\n {...aria}\n className={cx('grid gap-3', className)}\n style={{\n gridTemplateColumns: `repeat(${columns ?? options.length}, minmax(0, 1fr))`,\n }}\n >\n {options.map((option, index) => {\n const selected = option.value === value\n return (\n <div\n key={option.value}\n ref={(element) => {\n refs.current[index] = element\n }}\n role=\"radio\"\n aria-checked={selected}\n aria-disabled={option.disabled || undefined}\n tabIndex={index === tabStop ? 0 : -1}\n onClick={() => !option.disabled && onChange(option.value)}\n onKeyDown={(event) => handleKeyDown(event, index)}\n className={cx(\n 'rounded-j2 border-2 border-solid p-3.5 transition-colors',\n option.disabled\n ? 'cursor-not-allowed border-j2-gray-5 opacity-60'\n : selected\n ? 'cursor-pointer border-j2-primary bg-j2-blue-1'\n : 'cursor-pointer border-j2-gray-5 hover:border-j2-gray-7 hover:bg-j2-gray-1'\n )}\n >\n <div\n className={cx(\n 'flex items-center gap-2.5',\n Boolean(option.description) && 'mb-1'\n )}\n >\n <span\n aria-hidden\n className={cx(\n 'flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center rounded-full border-2 border-solid transition-colors',\n selected ? 'border-j2-primary' : 'border-j2-gray-7'\n )}\n >\n <span\n className={cx(\n 'h-[9px] w-[9px] rounded-full transition-colors',\n selected ? 'bg-j2-primary' : 'bg-transparent'\n )}\n />\n </span>\n <span className=\"text-sm font-semibold text-j2-text\">\n {option.label}\n </span>\n </div>\n {option.description && (\n <div className=\"pl-7 text-xs leading-snug text-j2-text-secondary\">\n {option.description}\n </div>\n )}\n </div>\n )\n })}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,SAAgB,eAAiC,EAC/C,SACA,OACA,UACA,SACA,WACA,GAAG,QACsB;CACzB,MAAM,QAAA,GAAOA,MAAAA,OAAAA,CAAkC,CAAC,CAAC;CACjD,MAAM,UAAU,QACb,KAAK,QAAQ,WAAW;EAAE;EAAQ;CAAM,EAAE,CAAC,CAC3C,QAAQ,EAAE,aAAa,CAAC,OAAO,QAAQ;CAC1C,MAAM,gBAAgB,QAAQ,WAAW,WAAW,OAAO,UAAU,KAAK;CAC1E,MAAM,UACJ,iBAAiB,KAAK,CAAC,QAAQ,cAAc,CAAC,WAC1C,gBACC,QAAQ,EAAE,EAAE,SAAS;CAE5B,MAAM,QAAQ,MAAc,SAAiB;EAC3C,MAAM,WAAW,QAAQ,WAAW,EAAE,YAAY,UAAU,IAAI;EAChE,MAAM,OAAO,SAAS,WAAW,OAAO,QAAQ,UAAU,QAAQ;EAClE,IAAI,CAAC,MAAM;EACX,SAAS,KAAK,OAAO,KAAK;EAC1B,KAAK,QAAQ,KAAK,MAAM,EAAE,MAAM;CAClC;CAEA,MAAM,iBAAiB,OAAsB,UAAkB;EAC7D,IAAI,MAAM,QAAQ,gBAAgB,MAAM,QAAQ,aAAa;GAC3D,MAAM,eAAe;GACrB,KAAK,OAAO,CAAC;EACf,OAAO,IAAI,MAAM,QAAQ,eAAe,MAAM,QAAQ,WAAW;GAC/D,MAAM,eAAe;GACrB,KAAK,OAAO,EAAE;EAChB,OAAO,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,SAAS;GACrD,MAAM,eAAe;GAErB,IAAI,CAAC,QAAQ,MAAM,CAAC,UAAU,SAAS,QAAQ,MAAM,CAAC,KAAK;EAC7D;CACF;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,MAAK;EACL,GAAI;EACJ,YAAA,GAAWC,WAAAA,QAAAA,CAAG,cAAc,SAAS;EACrC,OAAO,EACL,qBAAqB,UAAU,WAAW,QAAQ,OAAO,mBAC3D;EAEC,UAAA,QAAQ,KAAK,QAAQ,UAAU;GAC9B,MAAM,WAAW,OAAO,UAAU;GAClC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAEE,MAAM,YAAY;KAChB,KAAK,QAAQ,SAAS;IACxB;IACA,MAAK;IACL,gBAAc;IACd,iBAAe,OAAO,YAAY,KAAA;IAClC,UAAU,UAAU,UAAU,IAAI;IAClC,eAAe,CAAC,OAAO,YAAY,SAAS,OAAO,KAAK;IACxD,YAAY,UAAU,cAAc,OAAO,KAAK;IAChD,YAAA,GAAWA,WAAAA,QAAAA,CACT,4DACA,OAAO,WACH,mDACA,WACE,kDACA,2EACR;IAlBF,UAAA,CAoBE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;KACE,YAAA,GAAWA,WAAAA,QAAAA,CACT,6BACA,QAAQ,OAAO,WAAW,KAAK,MACjC;KAJF,UAAA,CAME,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MACE,eAAA;MACA,YAAA,GAAWA,WAAAA,QAAAA,CACT,yHACA,WAAW,sBAAsB,kBACnC;MAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EACE,YAAA,GAAWA,WAAAA,QAAAA,CACT,kDACA,WAAW,kBAAkB,gBAC/B,EACD,CAAA;KACG,CAAA,GACN,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAU;MACb,UAAA,OAAO;KACJ,CAAA,CACH;IACJ,CAAA,GAAA,OAAO,eACN,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAK,WAAU;KACZ,UAAA,OAAO;IACL,CAAA,CAEJ;GAhDE,GAAA,OAAO,KAgDT;EAET,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type RadioCardOption<T extends string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** One short line under the label. Leave it out when the label says
|
|
6
|
+
* enough. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type RadioCardGroupProps<T extends string> = {
|
|
11
|
+
options: RadioCardOption<T>[];
|
|
12
|
+
value?: T | null;
|
|
13
|
+
onChange: (value: T) => void;
|
|
14
|
+
/** Cards per row; defaults to one row with every option. */
|
|
15
|
+
columns?: number;
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
'aria-labelledby'?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A single choice shown as a row of bordered cards, each with a radio mark,
|
|
22
|
+
* a label and an optional line of description. Behaves as a radio group: the
|
|
23
|
+
* arrow keys move between cards and select, and only the selected card (or
|
|
24
|
+
* the first, when none is) is in the tab order.
|
|
25
|
+
*/
|
|
26
|
+
export declare function RadioCardGroup<T extends string>({ options, value, onChange, columns, className, ...aria }: RadioCardGroupProps<T>): import('react').JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
// src/components/radioCardGroup/RadioCardGroup.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A single choice shown as a row of bordered cards, each with a radio mark,
|
|
7
|
+
* a label and an optional line of description. Behaves as a radio group: the
|
|
8
|
+
* arrow keys move between cards and select, and only the selected card (or
|
|
9
|
+
* the first, when none is) is in the tab order.
|
|
10
|
+
*/
|
|
11
|
+
function RadioCardGroup({ options, value, onChange, columns, className, ...aria }) {
|
|
12
|
+
const refs = useRef([]);
|
|
13
|
+
const enabled = options.map((option, index) => ({
|
|
14
|
+
option,
|
|
15
|
+
index
|
|
16
|
+
})).filter(({ option }) => !option.disabled);
|
|
17
|
+
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
18
|
+
const tabStop = selectedIndex >= 0 && !options[selectedIndex].disabled ? selectedIndex : enabled[0]?.index ?? -1;
|
|
19
|
+
const move = (from, step) => {
|
|
20
|
+
const position = enabled.findIndex(({ index }) => index === from);
|
|
21
|
+
const next = enabled[(position + step + enabled.length) % enabled.length];
|
|
22
|
+
if (!next) return;
|
|
23
|
+
onChange(next.option.value);
|
|
24
|
+
refs.current[next.index]?.focus();
|
|
25
|
+
};
|
|
26
|
+
const handleKeyDown = (event, index) => {
|
|
27
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
move(index, 1);
|
|
30
|
+
} else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
move(index, -1);
|
|
33
|
+
} else if (event.key === " " || event.key === "Enter") {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
if (!options[index].disabled) onChange(options[index].value);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsx("div", {
|
|
39
|
+
role: "radiogroup",
|
|
40
|
+
...aria,
|
|
41
|
+
className: cx("grid gap-3", className),
|
|
42
|
+
style: { gridTemplateColumns: `repeat(${columns ?? options.length}, minmax(0, 1fr))` },
|
|
43
|
+
children: options.map((option, index) => {
|
|
44
|
+
const selected = option.value === value;
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
46
|
+
ref: (element) => {
|
|
47
|
+
refs.current[index] = element;
|
|
48
|
+
},
|
|
49
|
+
role: "radio",
|
|
50
|
+
"aria-checked": selected,
|
|
51
|
+
"aria-disabled": option.disabled || void 0,
|
|
52
|
+
tabIndex: index === tabStop ? 0 : -1,
|
|
53
|
+
onClick: () => !option.disabled && onChange(option.value),
|
|
54
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
55
|
+
className: cx("rounded-j2 border-2 border-solid p-3.5 transition-colors", option.disabled ? "cursor-not-allowed border-j2-gray-5 opacity-60" : selected ? "cursor-pointer border-j2-primary bg-j2-blue-1" : "cursor-pointer border-j2-gray-5 hover:border-j2-gray-7 hover:bg-j2-gray-1"),
|
|
56
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
57
|
+
className: cx("flex items-center gap-2.5", Boolean(option.description) && "mb-1"),
|
|
58
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
59
|
+
"aria-hidden": true,
|
|
60
|
+
className: cx("flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center rounded-full border-2 border-solid transition-colors", selected ? "border-j2-primary" : "border-j2-gray-7"),
|
|
61
|
+
children: /* @__PURE__ */ jsx("span", { className: cx("h-[9px] w-[9px] rounded-full transition-colors", selected ? "bg-j2-primary" : "bg-transparent") })
|
|
62
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
63
|
+
className: "text-sm font-semibold text-j2-text",
|
|
64
|
+
children: option.label
|
|
65
|
+
})]
|
|
66
|
+
}), option.description && /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: "pl-7 text-xs leading-snug text-j2-text-secondary",
|
|
68
|
+
children: option.description
|
|
69
|
+
})]
|
|
70
|
+
}, option.value);
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export { RadioCardGroup };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=RadioCardGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioCardGroup.js","names":[],"sources":["../../../../src/components/radioCardGroup/RadioCardGroup.tsx"],"sourcesContent":["import { useRef, type KeyboardEvent, type ReactNode } from 'react'\nimport cx from 'classnames'\n\nexport type RadioCardOption<T extends string> = {\n value: T\n label: ReactNode\n /** One short line under the label. Leave it out when the label says\n * enough. */\n description?: ReactNode\n disabled?: boolean\n}\n\nexport type RadioCardGroupProps<T extends string> = {\n options: RadioCardOption<T>[]\n value?: T | null\n onChange: (value: T) => void\n /** Cards per row; defaults to one row with every option. */\n columns?: number\n 'aria-label'?: string\n 'aria-labelledby'?: string\n className?: string\n}\n\n/**\n * A single choice shown as a row of bordered cards, each with a radio mark,\n * a label and an optional line of description. Behaves as a radio group: the\n * arrow keys move between cards and select, and only the selected card (or\n * the first, when none is) is in the tab order.\n */\nexport function RadioCardGroup<T extends string>({\n options,\n value,\n onChange,\n columns,\n className,\n ...aria\n}: RadioCardGroupProps<T>) {\n const refs = useRef<(HTMLDivElement | null)[]>([])\n const enabled = options\n .map((option, index) => ({ option, index }))\n .filter(({ option }) => !option.disabled)\n const selectedIndex = options.findIndex((option) => option.value === value)\n const tabStop =\n selectedIndex >= 0 && !options[selectedIndex].disabled\n ? selectedIndex\n : (enabled[0]?.index ?? -1)\n\n const move = (from: number, step: 1 | -1) => {\n const position = enabled.findIndex(({ index }) => index === from)\n const next = enabled[(position + step + enabled.length) % enabled.length]\n if (!next) return\n onChange(next.option.value)\n refs.current[next.index]?.focus()\n }\n\n const handleKeyDown = (event: KeyboardEvent, index: number) => {\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n event.preventDefault()\n move(index, 1)\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n event.preventDefault()\n move(index, -1)\n } else if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault()\n // A card can turn disabled while it has focus; it must not select.\n if (!options[index].disabled) onChange(options[index].value)\n }\n }\n\n return (\n <div\n role=\"radiogroup\"\n {...aria}\n className={cx('grid gap-3', className)}\n style={{\n gridTemplateColumns: `repeat(${columns ?? options.length}, minmax(0, 1fr))`,\n }}\n >\n {options.map((option, index) => {\n const selected = option.value === value\n return (\n <div\n key={option.value}\n ref={(element) => {\n refs.current[index] = element\n }}\n role=\"radio\"\n aria-checked={selected}\n aria-disabled={option.disabled || undefined}\n tabIndex={index === tabStop ? 0 : -1}\n onClick={() => !option.disabled && onChange(option.value)}\n onKeyDown={(event) => handleKeyDown(event, index)}\n className={cx(\n 'rounded-j2 border-2 border-solid p-3.5 transition-colors',\n option.disabled\n ? 'cursor-not-allowed border-j2-gray-5 opacity-60'\n : selected\n ? 'cursor-pointer border-j2-primary bg-j2-blue-1'\n : 'cursor-pointer border-j2-gray-5 hover:border-j2-gray-7 hover:bg-j2-gray-1'\n )}\n >\n <div\n className={cx(\n 'flex items-center gap-2.5',\n Boolean(option.description) && 'mb-1'\n )}\n >\n <span\n aria-hidden\n className={cx(\n 'flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center rounded-full border-2 border-solid transition-colors',\n selected ? 'border-j2-primary' : 'border-j2-gray-7'\n )}\n >\n <span\n className={cx(\n 'h-[9px] w-[9px] rounded-full transition-colors',\n selected ? 'bg-j2-primary' : 'bg-transparent'\n )}\n />\n </span>\n <span className=\"text-sm font-semibold text-j2-text\">\n {option.label}\n </span>\n </div>\n {option.description && (\n <div className=\"pl-7 text-xs leading-snug text-j2-text-secondary\">\n {option.description}\n </div>\n )}\n </div>\n )\n })}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;AA6BA,SAAgB,eAAiC,EAC/C,SACA,OACA,UACA,SACA,WACA,GAAG,QACsB;CACzB,MAAM,OAAO,OAAkC,CAAC,CAAC;CACjD,MAAM,UAAU,QACb,KAAK,QAAQ,WAAW;EAAE;EAAQ;CAAM,EAAE,CAAC,CAC3C,QAAQ,EAAE,aAAa,CAAC,OAAO,QAAQ;CAC1C,MAAM,gBAAgB,QAAQ,WAAW,WAAW,OAAO,UAAU,KAAK;CAC1E,MAAM,UACJ,iBAAiB,KAAK,CAAC,QAAQ,cAAc,CAAC,WAC1C,gBACC,QAAQ,EAAE,EAAE,SAAS;CAE5B,MAAM,QAAQ,MAAc,SAAiB;EAC3C,MAAM,WAAW,QAAQ,WAAW,EAAE,YAAY,UAAU,IAAI;EAChE,MAAM,OAAO,SAAS,WAAW,OAAO,QAAQ,UAAU,QAAQ;EAClE,IAAI,CAAC,MAAM;EACX,SAAS,KAAK,OAAO,KAAK;EAC1B,KAAK,QAAQ,KAAK,MAAM,EAAE,MAAM;CAClC;CAEA,MAAM,iBAAiB,OAAsB,UAAkB;EAC7D,IAAI,MAAM,QAAQ,gBAAgB,MAAM,QAAQ,aAAa;GAC3D,MAAM,eAAe;GACrB,KAAK,OAAO,CAAC;EACf,OAAO,IAAI,MAAM,QAAQ,eAAe,MAAM,QAAQ,WAAW;GAC/D,MAAM,eAAe;GACrB,KAAK,OAAO,EAAE;EAChB,OAAO,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,SAAS;GACrD,MAAM,eAAe;GAErB,IAAI,CAAC,QAAQ,MAAM,CAAC,UAAU,SAAS,QAAQ,MAAM,CAAC,KAAK;EAC7D;CACF;CAEA,OACE,oBAAC,OAAD;EACE,MAAK;EACL,GAAI;EACJ,WAAW,GAAG,cAAc,SAAS;EACrC,OAAO,EACL,qBAAqB,UAAU,WAAW,QAAQ,OAAO,mBAC3D;EAEC,UAAA,QAAQ,KAAK,QAAQ,UAAU;GAC9B,MAAM,WAAW,OAAO,UAAU;GAClC,OACE,qBAAC,OAAD;IAEE,MAAM,YAAY;KAChB,KAAK,QAAQ,SAAS;IACxB;IACA,MAAK;IACL,gBAAc;IACd,iBAAe,OAAO,YAAY,KAAA;IAClC,UAAU,UAAU,UAAU,IAAI;IAClC,eAAe,CAAC,OAAO,YAAY,SAAS,OAAO,KAAK;IACxD,YAAY,UAAU,cAAc,OAAO,KAAK;IAChD,WAAW,GACT,4DACA,OAAO,WACH,mDACA,WACE,kDACA,2EACR;IAlBF,UAAA,CAoBE,qBAAC,OAAD;KACE,WAAW,GACT,6BACA,QAAQ,OAAO,WAAW,KAAK,MACjC;KAJF,UAAA,CAME,oBAAC,QAAD;MACE,eAAA;MACA,WAAW,GACT,yHACA,WAAW,sBAAsB,kBACnC;MAEA,UAAA,oBAAC,QAAD,EACE,WAAW,GACT,kDACA,WAAW,kBAAkB,gBAC/B,EACD,CAAA;KACG,CAAA,GACN,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,OAAO;KACJ,CAAA,CACH;IACJ,CAAA,GAAA,OAAO,eACN,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,OAAO;IACL,CAAA,CAEJ;GAhDE,GAAA,OAAO,KAgDT;EAET,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioCardGroup, type RadioCardGroupProps, type RadioCardOption, } from './RadioCardGroup.js';
|
|
@@ -4,7 +4,7 @@ let antd = require("antd");
|
|
|
4
4
|
let _phosphor_icons_react = require("@phosphor-icons/react");
|
|
5
5
|
_phosphor_icons_react = require_runtime.__toESM(_phosphor_icons_react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
|
|
7
|
+
// src/components/rate/Rate.tsx
|
|
8
8
|
var Rate = ({ count = 5, ...props }) => {
|
|
9
9
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Rate, {
|
|
10
10
|
...props,
|
|
@@ -16,7 +16,6 @@ var Rate = ({ count = 5, ...props }) => {
|
|
|
16
16
|
character: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_phosphor_icons_react.StarIcon, { weight: "fill" })
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
exports.Rate = Rate;
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=Rate.cjs.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Rate } from "antd";
|
|
3
3
|
import { StarIcon } from "@phosphor-icons/react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/rate/Rate.tsx
|
|
6
6
|
var Rate$1 = ({ count = 5, ...props }) => {
|
|
7
7
|
return /* @__PURE__ */ jsx(Rate, {
|
|
8
8
|
...props,
|
|
@@ -14,7 +14,6 @@ var Rate$1 = ({ count = 5, ...props }) => {
|
|
|
14
14
|
character: /* @__PURE__ */ jsx(StarIcon, { weight: "fill" })
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { Rate$1 as Rate };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=Rate.js.map
|
|
@@ -7,7 +7,7 @@ let _phosphor_icons_react = require("@phosphor-icons/react");
|
|
|
7
7
|
_phosphor_icons_react = require_runtime.__toESM(_phosphor_icons_react, 1);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let _ant_design_icons = require("@ant-design/icons");
|
|
10
|
-
|
|
10
|
+
// src/components/select/AntdSelect.tsx
|
|
11
11
|
var AntdSelect = (props) => {
|
|
12
12
|
const [isFocused, setIsFocused] = (0, react$1.useState)(false);
|
|
13
13
|
const handleSearch = (value) => {
|
|
@@ -54,7 +54,6 @@ var AntdSelect = (props) => {
|
|
|
54
54
|
size: props.size || "large"
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
-
//#endregion
|
|
58
57
|
exports.AntdSelect = AntdSelect;
|
|
59
58
|
|
|
60
59
|
//# sourceMappingURL=AntdSelect.cjs.map
|
|
@@ -4,7 +4,7 @@ import { Select, Spin } from "antd";
|
|
|
4
4
|
import { CaretDownIcon, MagnifyingGlassIcon, XCircleIcon } from "@phosphor-icons/react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { LoadingOutlined } from "@ant-design/icons";
|
|
7
|
-
|
|
7
|
+
// src/components/select/AntdSelect.tsx
|
|
8
8
|
var AntdSelect = (props) => {
|
|
9
9
|
const [isFocused, setIsFocused] = useState(false);
|
|
10
10
|
const handleSearch = (value) => {
|
|
@@ -51,7 +51,6 @@ var AntdSelect = (props) => {
|
|
|
51
51
|
size: props.size || "large"
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { AntdSelect };
|
|
56
55
|
|
|
57
56
|
//# sourceMappingURL=AntdSelect.js.map
|
|
@@ -8,7 +8,7 @@ let _phosphor_icons_react = require("@phosphor-icons/react");
|
|
|
8
8
|
_phosphor_icons_react = require_runtime.__toESM(_phosphor_icons_react, 1);
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let _ant_design_icons = require("@ant-design/icons");
|
|
11
|
-
|
|
11
|
+
// src/components/select/Select.tsx
|
|
12
12
|
var isGroupOption = (opt) => "options" in opt && Array.isArray(opt.options);
|
|
13
13
|
var flattenOptions = (opts) => {
|
|
14
14
|
if (!opts) return [];
|
|
@@ -117,7 +117,6 @@ var SelectControl = ({ props, field, form }) => {
|
|
|
117
117
|
size: props.size || "large"
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
|
-
//#endregion
|
|
121
120
|
exports.Select = Select;
|
|
122
121
|
|
|
123
122
|
//# sourceMappingURL=Select.cjs.map
|
|
@@ -5,7 +5,7 @@ import { Select, Spin } from "antd";
|
|
|
5
5
|
import { CaretDownIcon, MagnifyingGlassIcon, XCircleIcon } from "@phosphor-icons/react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { LoadingOutlined } from "@ant-design/icons";
|
|
8
|
-
|
|
8
|
+
// src/components/select/Select.tsx
|
|
9
9
|
var isGroupOption = (opt) => "options" in opt && Array.isArray(opt.options);
|
|
10
10
|
var flattenOptions = (opts) => {
|
|
11
11
|
if (!opts) return [];
|
|
@@ -114,7 +114,6 @@ var SelectControl = ({ props, field, form }) => {
|
|
|
114
114
|
size: props.size || "large"
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
|
-
//#endregion
|
|
118
117
|
export { Select$1 as Select };
|
|
119
118
|
|
|
120
119
|
//# sourceMappingURL=Select.js.map
|
|
@@ -9,7 +9,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
9
9
|
let classnames = require("classnames");
|
|
10
10
|
classnames = require_runtime.__toESM(classnames, 1);
|
|
11
11
|
let _ant_design_icons = require("@ant-design/icons");
|
|
12
|
-
|
|
12
|
+
// src/components/select/SummarizedSelect.tsx
|
|
13
13
|
var isGroupOption = (option) => {
|
|
14
14
|
return "options" in option;
|
|
15
15
|
};
|
|
@@ -457,7 +457,6 @@ function SummarizedSelect({ searchPlaceholder, formControlPlaceholder, loading,
|
|
|
457
457
|
...props
|
|
458
458
|
})] });
|
|
459
459
|
}
|
|
460
|
-
//#endregion
|
|
461
460
|
exports.SummarizedSelect = SummarizedSelect;
|
|
462
461
|
|
|
463
462
|
//# sourceMappingURL=SummarizedSelect.cjs.map
|
|
@@ -6,7 +6,7 @@ import { CaretDownIcon, MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import cx from "classnames";
|
|
8
8
|
import { LoadingOutlined } from "@ant-design/icons";
|
|
9
|
-
|
|
9
|
+
// src/components/select/SummarizedSelect.tsx
|
|
10
10
|
var isGroupOption = (option) => {
|
|
11
11
|
return "options" in option;
|
|
12
12
|
};
|
|
@@ -454,7 +454,6 @@ function SummarizedSelect({ searchPlaceholder, formControlPlaceholder, loading,
|
|
|
454
454
|
...props
|
|
455
455
|
})] });
|
|
456
456
|
}
|
|
457
|
-
//#endregion
|
|
458
457
|
export { SummarizedSelect };
|
|
459
458
|
|
|
460
459
|
//# sourceMappingURL=SummarizedSelect.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/select/SummarizedSelect.module.css
|
|
2
2
|
var hemisphericSelect = "_hemisphericSelect_1pxzv_1";
|
|
3
3
|
var summarizedSelect = "_summarizedSelect_1pxzv_9";
|
|
4
4
|
var isActive = "_isActive_1pxzv_46";
|
|
@@ -23,7 +23,6 @@ var SummarizedSelect_module_default = {
|
|
|
23
23
|
fieldSelect,
|
|
24
24
|
groupDivider
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
exports.clearAllButton = clearAllButton;
|
|
28
27
|
exports.default = SummarizedSelect_module_default;
|
|
29
28
|
exports.dropdownTrigger = dropdownTrigger;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/select/SummarizedSelect.module.css
|
|
2
2
|
var hemisphericSelect = "_hemisphericSelect_1pxzv_1";
|
|
3
3
|
var summarizedSelect = "_summarizedSelect_1pxzv_9";
|
|
4
4
|
var isActive = "_isActive_1pxzv_46";
|
|
@@ -23,7 +23,6 @@ var SummarizedSelect_module_default = {
|
|
|
23
23
|
fieldSelect,
|
|
24
24
|
groupDivider
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { clearAllButton, SummarizedSelect_module_default as default, dropdownTrigger, fieldSelect, groupDivider, headlinedMenuContainer, headlinedSelect, hemisphericSelect, isActive, menuContainer, menuContainerMultiple, summarizedSelect };
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=SummarizedSelect.module.css.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let antd = require("antd");
|
|
2
2
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
-
|
|
3
|
+
// src/components/skeleton/Skeleton.tsx
|
|
4
4
|
var Skeleton = (props) => {
|
|
5
5
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Skeleton, { ...props });
|
|
6
6
|
};
|
|
@@ -9,7 +9,6 @@ Skeleton.Avatar = antd.Skeleton.Avatar;
|
|
|
9
9
|
Skeleton.Input = antd.Skeleton.Input;
|
|
10
10
|
Skeleton.Image = antd.Skeleton.Image;
|
|
11
11
|
Skeleton.Button = antd.Skeleton.Button;
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.Skeleton = Skeleton;
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=Skeleton.cjs.map
|