test-stpr-ui-kit 0.6.15 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -9
- package/dist/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Accordion/Accordion.js +78 -0
- package/dist/components/Accordion/Accordion.module.scss.js +37 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/types/index.d.ts +22 -0
- package/dist/components/ApplyButtons/ApplyButtons.css +1 -0
- package/dist/components/ApplyButtons/ApplyButtons.d.ts +3 -0
- package/dist/components/ApplyButtons/ApplyButtons.js +67 -0
- package/dist/components/ApplyButtons/ApplyButtons.module.scss.js +16 -0
- package/dist/components/ApplyButtons/index.d.ts +2 -0
- package/dist/components/ApplyButtons/types/index.d.ts +24 -0
- package/dist/components/AuthProtected/AuthProtected.d.ts +3 -0
- package/dist/components/AuthProtected/AuthProtected.js +37 -0
- package/dist/components/AuthProtected/index.d.ts +2 -0
- package/dist/components/AuthProtected/types/index.d.ts +11 -0
- package/dist/components/BaseTooltip/BaseTooltip.css +1 -0
- package/dist/components/BaseTooltip/BaseTooltip.d.ts +3 -0
- package/dist/components/BaseTooltip/BaseTooltip.js +25 -0
- package/dist/components/BaseTooltip/BaseTooltip.module.scss.js +11 -0
- package/dist/components/BaseTooltip/index.d.ts +2 -0
- package/dist/components/BaseTooltip/types/index.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.css +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +42 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.scss.js +17 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Breadcrumb/types/index.d.ts +11 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.js +74 -0
- package/dist/components/Button/Button.module.scss.js +33 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/types/index.d.ts +24 -0
- package/dist/components/Checkbox/Checkbox.css +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +72 -0
- package/dist/components/Checkbox/Checkbox.module.scss.js +33 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/types/index.d.ts +24 -0
- package/dist/components/Confirm/Confirm.d.ts +3 -0
- package/dist/components/Confirm/Confirm.js +85 -0
- package/dist/components/Confirm/index.d.ts +2 -0
- package/dist/components/Confirm/types/index.d.ts +7 -0
- package/dist/components/ContextMenu/ContextMenu.css +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -0
- package/dist/components/ContextMenu/ContextMenu.js +39 -0
- package/dist/components/ContextMenu/ContextMenu.module.scss.js +13 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/ContextMenu/types/index.d.ts +12 -0
- package/dist/components/DatePicker/DatePicker.css +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.js +198 -0
- package/dist/components/DatePicker/DatePicker.module.scss.js +31 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/types/index.d.ts +33 -0
- package/dist/components/DatePickerInput/DatePickerInput.css +1 -0
- package/dist/components/DatePickerInput/DatePickerInput.d.ts +3 -0
- package/dist/components/DatePickerInput/DatePickerInput.js +101 -0
- package/dist/components/DatePickerInput/DatePickerInput.module.scss.js +25 -0
- package/dist/components/DatePickerInput/index.d.ts +2 -0
- package/dist/components/DatePickerInput/types/index.d.ts +32 -0
- package/dist/components/DefaultDropzone/DefaultDropzone.d.ts +3 -0
- package/dist/components/DefaultDropzone/DefaultDropzone.js +11 -0
- package/dist/components/DefaultDropzone/hooks/useDefaultDropzone.d.ts +2 -0
- package/dist/components/DefaultDropzone/hooks/useDefaultDropzone.js +5 -0
- package/dist/components/DefaultDropzone/index.d.ts +2 -0
- package/dist/components/DefaultDropzone/types/index.d.ts +10 -0
- package/dist/components/Dropdown/Dropdown.css +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +68 -0
- package/dist/components/Dropdown/Dropdown.module.scss.js +21 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Dropdown/types/index.d.ts +14 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.css +1 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.d.ts +3 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.js +75 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.module.scss.js +11 -0
- package/dist/components/EllipsisTextWithTooltip/index.d.ts +2 -0
- package/dist/components/EllipsisTextWithTooltip/types/index.d.ts +13 -0
- package/dist/components/EllipsisTextWithTooltip/utils/index.d.ts +2 -0
- package/dist/components/EllipsisTextWithTooltip/utils/index.js +5 -0
- package/dist/components/Form/Form.css +1 -0
- package/dist/components/Form/Form.d.ts +3 -0
- package/dist/components/Form/Form.js +28 -0
- package/dist/components/Form/Form.module.scss.js +15 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/types/index.d.ts +13 -0
- package/dist/components/Icons/Icon.css +1 -0
- package/dist/components/Icons/Icon.d.ts +43 -0
- package/dist/components/Icons/Icon.js +136 -0
- package/dist/components/Icons/Icon.module.scss.js +7 -0
- package/dist/components/Icons/index.d.ts +3 -0
- package/dist/components/Icons/types/index.d.ts +47 -0
- package/dist/components/Icons/types/index.js +4 -0
- package/dist/components/IfcPreview/IfcPreview.css +1 -0
- package/dist/components/IfcPreview/IfcPreview.d.ts +3 -0
- package/dist/components/IfcPreview/IfcPreview.js +104 -0
- package/dist/components/IfcPreview/IfcPreview.module.scss.js +37 -0
- package/dist/components/IfcPreview/components/IfcPreviewCard/IfcPreviewCard.d.ts +14 -0
- package/dist/components/IfcPreview/components/IfcPreviewCard/IfcPreviewCard.js +79 -0
- package/dist/components/IfcPreview/components/IfcPreviewCard/index.d.ts +1 -0
- package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/IfcPreviewViewerLayer.d.ts +18 -0
- package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/IfcPreviewViewerLayer.js +59 -0
- package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/index.d.ts +1 -0
- package/dist/components/IfcPreview/constants/index.d.ts +3 -0
- package/dist/components/IfcPreview/constants/index.js +6 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewModel.d.ts +20 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewModel.js +34 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewViewer.d.ts +30 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewViewer.js +73 -0
- package/dist/components/IfcPreview/index.d.ts +2 -0
- package/dist/components/IfcPreview/types/index.d.ts +52 -0
- package/dist/components/IfcPreview/utils/file-hellper.d.ts +2 -0
- package/dist/components/IfcPreview/utils/file-hellper.js +7 -0
- package/dist/components/IfcPreview/utils/fileSizeLimit.d.ts +7 -0
- package/dist/components/IfcPreview/utils/fileSizeLimit.js +8 -0
- package/dist/components/IfcPreview/utils/modelSource.d.ts +7 -0
- package/dist/components/IfcPreview/utils/modelSource.js +35 -0
- package/dist/components/IfcViewer/IfcViewer.css +1 -0
- package/dist/components/IfcViewer/IfcViewer.d.ts +3 -0
- package/dist/components/IfcViewer/IfcViewer.js +71 -0
- package/dist/components/IfcViewer/IfcViewer.module.scss.js +13 -0
- package/dist/components/IfcViewer/index.d.ts +2 -0
- package/dist/components/IfcViewer/types/index.d.ts +12 -0
- package/dist/components/IfcViewer/utils/fetchIfc.d.ts +1 -0
- package/dist/components/IfcViewer/utils/fetchIfc.js +9 -0
- package/dist/components/IfcViewer/utils/formatMeshProgress.d.ts +1 -0
- package/dist/components/IfcViewer/utils/formatMeshProgress.js +4 -0
- package/dist/components/IfcViewer/utils/ifcWebViewer.d.ts +14 -0
- package/dist/components/IfcViewer/utils/ifcWebViewer.js +120 -0
- package/dist/components/Input/Input.css +1 -0
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +121 -0
- package/dist/components/Input/Input.module.scss.js +33 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/types/index.d.ts +40 -0
- package/dist/components/Label/Label.css +1 -0
- package/dist/components/Label/Label.d.ts +3 -0
- package/dist/components/Label/Label.js +36 -0
- package/dist/components/Label/Label.module.scss.js +9 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/Label/types/index.d.ts +9 -0
- package/dist/components/Layer/Layer.css +1 -0
- package/dist/components/Layer/Layer.d.ts +3 -0
- package/dist/components/Layer/Layer.js +26 -0
- package/dist/components/Layer/Layer.module.scss.js +9 -0
- package/dist/components/Layer/index.d.ts +2 -0
- package/dist/components/Layer/types/index.d.ts +7 -0
- package/dist/components/MediaContextProvider/MediaContextProvider.d.ts +3 -0
- package/dist/components/MediaContextProvider/MediaContextProvider.js +25 -0
- package/dist/components/MediaContextProvider/constants/index.d.ts +3 -0
- package/dist/components/MediaContextProvider/constants/index.js +11 -0
- package/dist/components/MediaContextProvider/hooks/index.d.ts +8 -0
- package/dist/components/MediaContextProvider/hooks/index.js +14 -0
- package/dist/components/MediaContextProvider/index.d.ts +4 -0
- package/dist/components/MediaContextProvider/types/index.d.ts +23 -0
- package/dist/components/Modal/Modal.css +1 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/Modal.js +89 -0
- package/dist/components/Modal/Modal.module.scss.js +56 -0
- package/dist/components/Modal/hooks/index.d.ts +17 -0
- package/dist/components/Modal/hooks/index.js +25 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/types/index.d.ts +24 -0
- package/dist/components/Portal/Potral.d.ts +3 -0
- package/dist/components/Portal/Potral.js +18 -0
- package/dist/components/Portal/index.d.ts +2 -0
- package/dist/components/Portal/types/index.d.ts +5 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.css +1 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.d.ts +3 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.js +50 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.module.scss.js +17 -0
- package/dist/components/ProgressWrapper/constants/index.d.ts +1 -0
- package/dist/components/ProgressWrapper/constants/index.js +4 -0
- package/dist/components/ProgressWrapper/hooks/index.d.ts +5 -0
- package/dist/components/ProgressWrapper/hooks/index.js +41 -0
- package/dist/components/ProgressWrapper/index.d.ts +3 -0
- package/dist/components/ProgressWrapper/types/index.d.ts +17 -0
- package/dist/components/Select/Select.css +1 -0
- package/dist/components/Select/Select.d.ts +3 -0
- package/dist/components/Select/Select.js +195 -0
- package/dist/components/Select/Select.module.scss.js +69 -0
- package/dist/components/Select/constants/index.d.ts +3 -0
- package/dist/components/Select/constants/index.js +5 -0
- package/dist/components/Select/hooks/useSelect.d.ts +28 -0
- package/dist/components/Select/hooks/useSelect.js +73 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/types/index.d.ts +50 -0
- package/dist/components/Skeleton/Skeleton.css +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.js +38 -0
- package/dist/components/Skeleton/Skeleton.module.scss.js +13 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/typs/index.d.ts +10 -0
- package/dist/components/Spinner/Spinner.css +1 -0
- package/dist/components/Spinner/Spinner.d.ts +3 -0
- package/dist/components/Spinner/Spinner.js +46 -0
- package/dist/components/Spinner/Spinner.module.scss.js +28 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/types/index.d.ts +9 -0
- package/dist/components/Table/Table.css +1 -0
- package/dist/components/Table/Table.d.ts +2 -0
- package/dist/components/Table/Table.js +219 -0
- package/dist/components/Table/Table.module.scss.js +41 -0
- package/dist/components/Table/hooks/index.d.ts +12 -0
- package/dist/components/Table/hooks/index.js +28 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/types/index.d.ts +39 -0
- package/dist/components/Table/utils/index.d.ts +2 -0
- package/dist/components/Table/utils/index.js +5 -0
- package/dist/components/Tabs/Tabs.css +1 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -0
- package/dist/components/Tabs/Tabs.js +73 -0
- package/dist/components/Tabs/Tabs.module.scss.js +26 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/types/index.d.ts +25 -0
- package/dist/components/Text/Text.css +1 -0
- package/dist/components/Text/Text.d.ts +3 -0
- package/dist/components/Text/Text.js +39 -0
- package/dist/components/Text/Text.module.scss.js +17 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/types/index.d.ts +15 -0
- package/dist/components/TextWithLabel/TextWithLabel.css +1 -0
- package/dist/components/TextWithLabel/TextWithLabel.d.ts +3 -0
- package/dist/components/TextWithLabel/TextWithLabel.js +39 -0
- package/dist/components/TextWithLabel/TextWithLabel.module.scss.js +9 -0
- package/dist/components/TextWithLabel/index.d.ts +2 -0
- package/dist/components/TextWithLabel/types/index.d.ts +6 -0
- package/dist/components/Textarea/Textarea.css +1 -0
- package/dist/components/Textarea/Textarea.d.ts +3 -0
- package/dist/components/Textarea/Textarea.js +132 -0
- package/dist/components/Textarea/Textarea.module.scss.js +35 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/types/index.d.ts +45 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/Tooltip/Tooltip.js +191 -0
- package/dist/components/Tooltip/Tooltip.module.scss.js +13 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/types/index.d.ts +36 -0
- package/dist/components/Tooltip/types/index.js +4 -0
- package/dist/components/UploadFiles/UploadFiles.css +1 -0
- package/dist/components/UploadFiles/UploadFiles.d.ts +3 -0
- package/dist/components/UploadFiles/UploadFiles.js +238 -0
- package/dist/components/UploadFiles/UploadFiles.module.scss.js +73 -0
- package/dist/components/UploadFiles/index.d.ts +2 -0
- package/dist/components/UploadFiles/types/index.d.ts +33 -0
- package/dist/components/UploadFiles/utils/index.d.ts +12 -0
- package/dist/components/UploadFiles/utils/index.js +67 -0
- package/dist/components/ViewImageModal/ViewImageModal.css +1 -0
- package/dist/components/ViewImageModal/ViewImageModal.d.ts +3 -0
- package/dist/components/ViewImageModal/ViewImageModal.js +71 -0
- package/dist/components/ViewImageModal/ViewImageModal.module.scss.js +19 -0
- package/dist/components/ViewImageModal/index.d.ts +2 -0
- package/dist/components/ViewImageModal/types/index.d.ts +13 -0
- package/dist/components-assets/IfcPreview/web-ifc/web-ifc.wasm +0 -0
- package/dist/hooks/useClickOutside.d.ts +14 -0
- package/dist/hooks/useClickOutside.js +15 -0
- package/dist/images/add_file.svg.js +5 -0
- package/dist/images/add_user.svg.js +5 -0
- package/dist/images/arrow-bottom.svg.js +5 -0
- package/dist/images/calendar.svg.js +5 -0
- package/dist/images/check.svg.js +5 -0
- package/dist/images/chevron_down.svg.js +5 -0
- package/dist/images/close.svg.js +5 -0
- package/dist/images/copy.svg.js +5 -0
- package/dist/images/dots.svg.js +5 -0
- package/dist/images/download.svg.js +5 -0
- package/dist/images/edit.svg.js +5 -0
- package/dist/images/eye.svg.js +5 -0
- package/dist/images/file.svg.js +5 -0
- package/dist/images/file_not_filled.svg.js +5 -0
- package/dist/images/filter.svg.js +5 -0
- package/dist/images/folder.svg.js +5 -0
- package/dist/images/history_clock.svg.js +5 -0
- package/dist/images/info.svg.js +5 -0
- package/dist/images/info_error.svg.js +5 -0
- package/dist/images/layers-three.svg.js +5 -0
- package/dist/images/link-angled.svg.js +5 -0
- package/dist/images/logout.svg.js +5 -0
- package/dist/images/minus.svg.js +5 -0
- package/dist/images/pause-circle.svg.js +5 -0
- package/dist/images/play-circle.svg.js +5 -0
- package/dist/images/plus.svg.js +5 -0
- package/dist/images/plus_circle.svg.js +5 -0
- package/dist/images/plus_square.svg.js +5 -0
- package/dist/images/refresh.svg.js +5 -0
- package/dist/images/save.svg.js +5 -0
- package/dist/images/search.svg.js +5 -0
- package/dist/images/select_chevron_down.svg.js +5 -0
- package/dist/images/terminal_square.svg.js +5 -0
- package/dist/images/trash.svg.js +5 -0
- package/dist/images/update.svg.js +5 -0
- package/dist/images/upload-top.svg.js +5 -0
- package/dist/images/upload.svg.js +5 -0
- package/dist/images/user-right.svg.js +5 -0
- package/dist/images/warning_color.svg.js +5 -0
- package/dist/styles/tokens.css +250 -0
- package/dist/test-stpr-ui-kit.d.ts +36 -0
- package/dist/test-stpr-ui-kit.js +43 -15043
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/stringHelper.d.ts +13 -0
- package/dist/utils/stringHelper.js +4 -0
- package/package.json +34 -30
- package/dist/images/icon.svg +0 -8
- package/dist/images/viewImageExample.jpg +0 -0
- package/dist/test-stpr-ui-kit.css +0 -1
- package/dist/test-stpr-ui-kit.es.d.ts +0 -829
- package/dist/test-stpr-ui-kit.umd.cjs +0 -9
- /package/dist/{images → components-assets/ViewImageModal}/fallBackSrc.jpeg +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import './Button.css';const t = "_spButton_18oju_1", _ = "_spButton__text_18oju_34", n = "_spButton_noPadding_18oju_46", o = "_spButton_onlyIcon_18oju_50", s = "_spButton_primary_18oju_59", u = "_spButton_secondary_18oju_69", p = "_spButton_text_18oju_79", B = "_spButton_link_18oju_89", i = "_spButton_fullWidth_18oju_102", c = "_spButton_disabled_18oju_105", e = "_spButton__spinner_18oju_116", d = "_spButton__iconContainer_18oju_125", a = "_spButton__iconContainer__icon_18oju_128", l = {
|
|
2
|
+
spButton: t,
|
|
3
|
+
"spButton_size-md": "_spButton_size-md_18oju_30",
|
|
4
|
+
spButton__text: _,
|
|
5
|
+
"spButton_size-xl": "_spButton_size-xl_18oju_38",
|
|
6
|
+
spButton_noPadding: n,
|
|
7
|
+
spButton_onlyIcon: o,
|
|
8
|
+
spButton_primary: s,
|
|
9
|
+
spButton_secondary: u,
|
|
10
|
+
spButton_text: p,
|
|
11
|
+
spButton_link: B,
|
|
12
|
+
spButton_fullWidth: i,
|
|
13
|
+
spButton_disabled: c,
|
|
14
|
+
spButton__spinner: e,
|
|
15
|
+
spButton__iconContainer: d,
|
|
16
|
+
spButton__iconContainer__icon: a
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
l as default,
|
|
20
|
+
t as spButton,
|
|
21
|
+
d as spButton__iconContainer,
|
|
22
|
+
a as spButton__iconContainer__icon,
|
|
23
|
+
e as spButton__spinner,
|
|
24
|
+
_ as spButton__text,
|
|
25
|
+
c as spButton_disabled,
|
|
26
|
+
i as spButton_fullWidth,
|
|
27
|
+
B as spButton_link,
|
|
28
|
+
n as spButton_noPadding,
|
|
29
|
+
o as spButton_onlyIcon,
|
|
30
|
+
s as spButton_primary,
|
|
31
|
+
u as spButton_secondary,
|
|
32
|
+
p as spButton_text
|
|
33
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
import { EIconName } from "../../Icons";
|
|
3
|
+
export type TButtonType = "submit" | "reset" | "button";
|
|
4
|
+
export type TButtonVariant = "primary" | "secondary" | "text" | "link";
|
|
5
|
+
export type TButtonSize = "md" | "xl";
|
|
6
|
+
export interface ButtonProps extends React.PropsWithChildren {
|
|
7
|
+
variant?: TButtonVariant;
|
|
8
|
+
size?: TButtonSize;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
type?: TButtonType;
|
|
13
|
+
form?: string;
|
|
14
|
+
isFullWidth?: boolean;
|
|
15
|
+
noPadding?: boolean;
|
|
16
|
+
isOnlyIcon?: boolean;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
startIconName?: EIconName;
|
|
19
|
+
endIconName?: EIconName;
|
|
20
|
+
classNameRoot?: string;
|
|
21
|
+
classNameTextRoot?: string;
|
|
22
|
+
startIconRotate?: number;
|
|
23
|
+
endIconRotate?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spCheckbox_3tbu0_1{display:inline-flex;flex-direction:column;align-items:flex-start;position:relative;width:fit-content}._spCheckbox_3tbu0_1{opacity:1;visibility:visible}._spCheckbox_3tbu0_1{transition:all .3s ease-in-out}@starting-style{._spCheckbox_3tbu0_1{opacity:0;visibility:hidden}}._spCheckbox__control_3tbu0_21{display:none}._spCheckbox__label_3tbu0_24{display:flex;align-items:center;font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);font-size:16px;color:var(--spui-color-text-primary)}@media only screen and (min-width:768px){._spCheckbox__label_3tbu0_24{font-size:20px}}._spCheckbox__box_3tbu0_37{display:flex;justify-content:flex-start;align-items:center;cursor:pointer;gap:var(--spui-spacing-3x);-webkit-user-select:none;user-select:none;color:var(--spui-color-border-action)}._spCheckbox__box_3tbu0_37:hover{color:var(--spui-color-border-action-hover)}._spCheckbox__box_disabled_3tbu0_49{cursor:default;pointer-events:none;color:var(--spui-color-border-disabled)}._spCheckbox__box_error_3tbu0_54{color:var(--spui-color-border-error)}._spCheckbox__box_error_3tbu0_54:hover{color:var(--spui-color-red-600)}._spCheckbox__box__checkmark_3tbu0_60{display:flex;width:var(--spui-control-height-base);height:var(--spui-control-height-base);flex-direction:column;justify-content:center;align-items:center;position:relative;background-color:var(--spui-color-surface-default);border:var(--spui-border-width-md) solid currentColor}._spCheckbox__box__checkmark_3tbu0_60{transition:all .2s ease-in-out}._spCheckbox__box__checkmark--size-lg_3tbu0_74{width:var(--spui-control-height-base);height:var(--spui-control-height-base)}._spCheckbox__box__checkmark--size-md_3tbu0_78{width:var(--spui-control-height-sm);height:var(--spui-control-height-sm)}._spCheckbox__box__innerSquare_3tbu0_82{background:var(--spui-color-surface-transparent);transform:scale(0)}._spCheckbox__box__innerSquare_3tbu0_82{transition:all .2s ease-in-out}._spCheckbox__box__innerSquare--size-lg_3tbu0_89{width:var(--spui-icon-size-sm);height:var(--spui-icon-size-sm)}._spCheckbox__box__innerSquare--size-md_3tbu0_93{width:var(--spui-icon-size-xs);height:var(--spui-icon-size-xs)}._spCheckbox__box__innerSquare_checked_3tbu0_97{background-color:currentColor;transform:scale(1)}._spCheckbox__tooltip_3tbu0_101{display:inline-block;vertical-align:middle}._spCheckbox__required_3tbu0_105{margin-left:var(--spui-spacing-1x);color:var(--spui-color-text-secondary)}._spCheckbox__error_3tbu0_109{padding-top:var(--spui-spacing-2x);font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);font-size:12px;color:var(--spui-color-text-error)}@media only screen and (min-width:768px){._spCheckbox__error_3tbu0_109{font-size:14px}}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import e from "./Checkbox.module.scss.js";
|
|
4
|
+
import { InfoTooltip as z } from "../Tooltip/Tooltip.js";
|
|
5
|
+
const L = (m) => {
|
|
6
|
+
const {
|
|
7
|
+
size: c = "lg",
|
|
8
|
+
checked: r,
|
|
9
|
+
disabled: l,
|
|
10
|
+
onChange: p,
|
|
11
|
+
name: x,
|
|
12
|
+
label: n,
|
|
13
|
+
error: a,
|
|
14
|
+
value: b,
|
|
15
|
+
required: k,
|
|
16
|
+
tooltipPosition: C,
|
|
17
|
+
infoTooltipText: h,
|
|
18
|
+
onMouseEnter: d,
|
|
19
|
+
classNameRoot: _,
|
|
20
|
+
classNameError: i
|
|
21
|
+
} = m, u = s({
|
|
22
|
+
[e.spCheckbox]: !0,
|
|
23
|
+
..._ && { [_]: !0 }
|
|
24
|
+
}), N = s({
|
|
25
|
+
[e.spCheckbox__box]: !0,
|
|
26
|
+
[e.spCheckbox__box_disabled]: l,
|
|
27
|
+
[e.spCheckbox__box_error]: a
|
|
28
|
+
}), f = s({
|
|
29
|
+
[e.spCheckbox__box__checkmark]: !0,
|
|
30
|
+
[e[`spCheckbox__box__checkmark--size-${c}`]]: c
|
|
31
|
+
}), q = s({
|
|
32
|
+
[e.spCheckbox__box__innerSquare]: !0,
|
|
33
|
+
[e.spCheckbox__box__innerSquare_checked]: r,
|
|
34
|
+
[e[`spCheckbox__box__innerSquare--size-${c}`]]: c
|
|
35
|
+
}), v = s({
|
|
36
|
+
[e.spCheckbox__control]: !0
|
|
37
|
+
}), g = s({
|
|
38
|
+
[e.spCheckbox__label]: !0
|
|
39
|
+
}), E = s({
|
|
40
|
+
[e.spCheckbox__required]: !0
|
|
41
|
+
}), R = s({
|
|
42
|
+
[e.spCheckbox__error]: !0,
|
|
43
|
+
...i && { [i]: !0 }
|
|
44
|
+
}), S = s({
|
|
45
|
+
[e.spCheckbox__tooltip]: !0
|
|
46
|
+
});
|
|
47
|
+
return /* @__PURE__ */ t("div", { className: u, onMouseEnter: d, children: [
|
|
48
|
+
/* @__PURE__ */ t("label", { className: N, children: [
|
|
49
|
+
/* @__PURE__ */ o(
|
|
50
|
+
"input",
|
|
51
|
+
{
|
|
52
|
+
type: "checkbox",
|
|
53
|
+
className: v,
|
|
54
|
+
checked: r,
|
|
55
|
+
onChange: (T) => {
|
|
56
|
+
l || p?.(T, { name: x, checked: !r, value: b });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ o("span", { className: f, children: /* @__PURE__ */ o("span", { className: q }) }),
|
|
61
|
+
n && /* @__PURE__ */ t("span", { className: g, children: [
|
|
62
|
+
n,
|
|
63
|
+
k && /* @__PURE__ */ o("div", { className: E, children: "*" })
|
|
64
|
+
] }),
|
|
65
|
+
h && /* @__PURE__ */ o("div", { className: S, children: /* @__PURE__ */ o(z, { hover: !0, position: C, text: h }) })
|
|
66
|
+
] }),
|
|
67
|
+
a && /* @__PURE__ */ o("div", { className: R, children: a })
|
|
68
|
+
] });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
L as Checkbox
|
|
72
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import './Checkbox.css';const _ = "_spCheckbox_3tbu0_1", e = "_spCheckbox__control_3tbu0_21", o = "_spCheckbox__label_3tbu0_24", b = "_spCheckbox__box_3tbu0_37", c = "_spCheckbox__box_disabled_3tbu0_49", s = "_spCheckbox__box_error_3tbu0_54", x = "_spCheckbox__box__checkmark_3tbu0_60", k = "_spCheckbox__box__innerSquare_3tbu0_82", r = "_spCheckbox__box__innerSquare_checked_3tbu0_97", h = "_spCheckbox__tooltip_3tbu0_101", p = "_spCheckbox__required_3tbu0_105", C = "_spCheckbox__error_3tbu0_109", t = {
|
|
2
|
+
spCheckbox: _,
|
|
3
|
+
spCheckbox__control: e,
|
|
4
|
+
spCheckbox__label: o,
|
|
5
|
+
spCheckbox__box: b,
|
|
6
|
+
spCheckbox__box_disabled: c,
|
|
7
|
+
spCheckbox__box_error: s,
|
|
8
|
+
spCheckbox__box__checkmark: x,
|
|
9
|
+
"spCheckbox__box__checkmark--size-lg": "_spCheckbox__box__checkmark--size-lg_3tbu0_74",
|
|
10
|
+
"spCheckbox__box__checkmark--size-md": "_spCheckbox__box__checkmark--size-md_3tbu0_78",
|
|
11
|
+
spCheckbox__box__innerSquare: k,
|
|
12
|
+
"spCheckbox__box__innerSquare--size-lg": "_spCheckbox__box__innerSquare--size-lg_3tbu0_89",
|
|
13
|
+
"spCheckbox__box__innerSquare--size-md": "_spCheckbox__box__innerSquare--size-md_3tbu0_93",
|
|
14
|
+
spCheckbox__box__innerSquare_checked: r,
|
|
15
|
+
spCheckbox__tooltip: h,
|
|
16
|
+
spCheckbox__required: p,
|
|
17
|
+
spCheckbox__error: C
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
t as default,
|
|
21
|
+
_ as spCheckbox,
|
|
22
|
+
b as spCheckbox__box,
|
|
23
|
+
x as spCheckbox__box__checkmark,
|
|
24
|
+
k as spCheckbox__box__innerSquare,
|
|
25
|
+
r as spCheckbox__box__innerSquare_checked,
|
|
26
|
+
c as spCheckbox__box_disabled,
|
|
27
|
+
s as spCheckbox__box_error,
|
|
28
|
+
e as spCheckbox__control,
|
|
29
|
+
C as spCheckbox__error,
|
|
30
|
+
o as spCheckbox__label,
|
|
31
|
+
p as spCheckbox__required,
|
|
32
|
+
h as spCheckbox__tooltip
|
|
33
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ETooltipPosition } from "../../Tooltip";
|
|
3
|
+
export type TCheckboxSize = "md" | "lg";
|
|
4
|
+
export interface CheckboxProps {
|
|
5
|
+
size?: TCheckboxSize;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange: TOnChangeCheckbox;
|
|
9
|
+
name: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
tooltipPosition?: ETooltipPosition;
|
|
15
|
+
infoTooltipText?: string;
|
|
16
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
17
|
+
classNameRoot?: string;
|
|
18
|
+
classNameError?: string;
|
|
19
|
+
}
|
|
20
|
+
export type TOnChangeCheckbox = (event: React.ChangeEvent<HTMLInputElement>, data: {
|
|
21
|
+
name: string;
|
|
22
|
+
value?: string;
|
|
23
|
+
checked: boolean;
|
|
24
|
+
}) => void;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as S } from "../Modal/Modal.js";
|
|
3
|
+
import { ApplyButtons as k } from "../ApplyButtons/ApplyButtons.js";
|
|
4
|
+
const G = (n) => {
|
|
5
|
+
const {
|
|
6
|
+
classNameApplyButtonsRoot: i,
|
|
7
|
+
zIndex: m,
|
|
8
|
+
header: r,
|
|
9
|
+
subHeader: c,
|
|
10
|
+
cancelBtnContent: o,
|
|
11
|
+
cancelBtnDisabled: d,
|
|
12
|
+
cancelBtnIconName: t,
|
|
13
|
+
submitBtnContent: e,
|
|
14
|
+
submitBtnIconName: a,
|
|
15
|
+
submit: b,
|
|
16
|
+
formId: u,
|
|
17
|
+
onClose: s,
|
|
18
|
+
applyButtonsMobileDirection: B = "column",
|
|
19
|
+
applyButtonsAlign: f = "right",
|
|
20
|
+
modalVerticalAlign: p = "top",
|
|
21
|
+
textAlign: N = "left",
|
|
22
|
+
disabled: C = !1,
|
|
23
|
+
loading: g = !1,
|
|
24
|
+
disabledConfirm: R = !1,
|
|
25
|
+
loadingConfirm: V = !1,
|
|
26
|
+
isVisibleCloseButton: y,
|
|
27
|
+
isHiddenModal: A,
|
|
28
|
+
size: x,
|
|
29
|
+
classNameRoot: H,
|
|
30
|
+
classNameLayerRoot: I,
|
|
31
|
+
submitBtnVariant: F,
|
|
32
|
+
cancelBtnVariant: M,
|
|
33
|
+
submitBtnClassName: h,
|
|
34
|
+
cancelBtnClassName: z,
|
|
35
|
+
classNameHeaderRoot: D,
|
|
36
|
+
classNameSubHeaderRoot: j,
|
|
37
|
+
classNameFooterRoot: L
|
|
38
|
+
} = n;
|
|
39
|
+
return /* @__PURE__ */ l(
|
|
40
|
+
S,
|
|
41
|
+
{
|
|
42
|
+
zIndex: m,
|
|
43
|
+
header: r,
|
|
44
|
+
onClose: s,
|
|
45
|
+
modalVerticalAlign: p,
|
|
46
|
+
textAlign: N,
|
|
47
|
+
subHeader: c,
|
|
48
|
+
isVisibleCloseButton: y,
|
|
49
|
+
isHiddenModal: A,
|
|
50
|
+
size: x,
|
|
51
|
+
classNameRoot: H,
|
|
52
|
+
classNameLayerRoot: I,
|
|
53
|
+
classNameHeaderRoot: D,
|
|
54
|
+
classNameSubHeaderRoot: j,
|
|
55
|
+
classNameFooterRoot: L,
|
|
56
|
+
loading: V,
|
|
57
|
+
disabled: R,
|
|
58
|
+
footer: o || t || e || a ? /* @__PURE__ */ l(
|
|
59
|
+
k,
|
|
60
|
+
{
|
|
61
|
+
classNameRoot: i,
|
|
62
|
+
submitBtnClassName: h,
|
|
63
|
+
cancelBtnClassName: z,
|
|
64
|
+
applyButtonsMobileDirection: B,
|
|
65
|
+
applyButtonsAlign: f,
|
|
66
|
+
cancelBtnContent: o,
|
|
67
|
+
cancelBtnIconName: t,
|
|
68
|
+
cancelBtnDisabled: d,
|
|
69
|
+
submitBtnContent: e,
|
|
70
|
+
submitBtnIconName: a,
|
|
71
|
+
submitBtnVariant: F,
|
|
72
|
+
cancelBtnVariant: M,
|
|
73
|
+
formId: u,
|
|
74
|
+
disabled: C,
|
|
75
|
+
onClose: s,
|
|
76
|
+
submit: b,
|
|
77
|
+
loading: g
|
|
78
|
+
}
|
|
79
|
+
) : null
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
G as Confirm
|
|
85
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApplyButtonsProps } from "../../ApplyButtons";
|
|
2
|
+
import { ModalProps } from "../../Modal";
|
|
3
|
+
export interface ConfirmProps extends Omit<ApplyButtonsProps, "classNameRoot">, Omit<ModalProps, "footer" | "children" | "style"> {
|
|
4
|
+
classNameApplyButtonsRoot?: string;
|
|
5
|
+
disabledConfirm?: boolean;
|
|
6
|
+
loadingConfirm?: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spContextMenu_qdudd_1{font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);margin:var(--spui-spacing-none);display:flex;padding:var(--spui-spacing-2x) var(--spui-spacing-none);flex-direction:column;align-items:stretch;border:var(--spui-border-width-sm) solid var(--spui-color-border-action);background-color:var(--spui-color-surface-default)}._spContextMenu_qdudd_1{opacity:1;visibility:visible}._spContextMenu_qdudd_1{transition:all .3s ease-in-out}@starting-style{._spContextMenu_qdudd_1{opacity:0;visibility:hidden}}._spContextMenu__item_qdudd_25{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:var(--spui-spacing-2x) var(--spui-spacing-6x);font-size:16px;line-height:120%;gap:var(--spui-spacing-3x)}._spContextMenu__item_qdudd_25:hover{background-color:var(--spui-color-blue-50)}._spContextMenu__item__icon_qdudd_38{color:var(--spui-color-icon-action);width:var(--spui-icon-size-xs);height:var(--spui-icon-size-xs)}._spContextMenu__item__icon_delete_qdudd_43{color:var(--spui-color-icon-error)}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as n, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import m from "clsx";
|
|
3
|
+
import t from "./ContextMenu.module.scss.js";
|
|
4
|
+
import { Icon as u } from "../Icons/Icon.js";
|
|
5
|
+
const N = (r) => {
|
|
6
|
+
const { onClickItem: s, options: c, classNameRoot: o } = r, l = m({
|
|
7
|
+
[t.spContextMenu]: !0,
|
|
8
|
+
...o && { [o]: !0 }
|
|
9
|
+
});
|
|
10
|
+
return /* @__PURE__ */ n("ul", { className: l, children: c?.map((e) => {
|
|
11
|
+
const a = e.key === "delete";
|
|
12
|
+
return /* @__PURE__ */ i(
|
|
13
|
+
"li",
|
|
14
|
+
{
|
|
15
|
+
className: t.spContextMenu__item,
|
|
16
|
+
onClick: () => {
|
|
17
|
+
s && s(e);
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
e?.iconName && /* @__PURE__ */ n(
|
|
21
|
+
u,
|
|
22
|
+
{
|
|
23
|
+
name: e.iconName,
|
|
24
|
+
className: m({
|
|
25
|
+
[t.spContextMenu__item__icon]: !0,
|
|
26
|
+
[t.spContextMenu__item__icon_delete]: a
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
e.label
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
e.key
|
|
34
|
+
);
|
|
35
|
+
}) });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
N as ContextMenu
|
|
39
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './ContextMenu.css';const e = "_spContextMenu_qdudd_1", _ = "_spContextMenu__item_qdudd_25", t = "_spContextMenu__item__icon_qdudd_38", n = "_spContextMenu__item__icon_delete_qdudd_43", o = {
|
|
2
|
+
spContextMenu: e,
|
|
3
|
+
spContextMenu__item: _,
|
|
4
|
+
spContextMenu__item__icon: t,
|
|
5
|
+
spContextMenu__item__icon_delete: n
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
o as default,
|
|
9
|
+
e as spContextMenu,
|
|
10
|
+
_ as spContextMenu__item,
|
|
11
|
+
t as spContextMenu__item__icon,
|
|
12
|
+
n as spContextMenu__item__icon_delete
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EIconName } from "../../Icons";
|
|
2
|
+
export interface ContextMenuProps {
|
|
3
|
+
classNameRoot?: string;
|
|
4
|
+
options: Array<TContextMenuOption> | [];
|
|
5
|
+
onClickItem?: (option: TContextMenuOption) => void;
|
|
6
|
+
}
|
|
7
|
+
export type TContextMenuOption = {
|
|
8
|
+
key?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
iconName?: EIconName;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._datePicker_mhgoa_1{display:flex;flex-direction:column;width:100%;-webkit-user-select:none;user-select:none}._datePicker_mhgoa_1{opacity:1;visibility:visible}._datePicker_mhgoa_1{transition:all .3s ease-in-out}@starting-style{._datePicker_mhgoa_1{opacity:0;visibility:hidden}}._datePicker_relative_mhgoa_20{position:relative}._datePicker__customHeader_mhgoa_23{display:flex;align-items:center;justify-content:space-between}._datePicker__navigationWrapper_mhgoa_28{display:flex;align-items:center;gap:var(--spui-spacing-6x)}._datePicker__navigation_mhgoa_28{display:flex;align-items:center;width:var(--spui-icon-size-base);height:var(--spui-icon-size-base);cursor:pointer}._datePicker__navigation_previous_mhgoa_40{rotate:180deg}._datePicker__error_mhgoa_43{padding-top:8px;font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);font-size:12px;color:var(--spui-color-text-error)}._datePicker__error_absolutePosition_mhgoa_50{position:absolute;top:100%}@media only screen and (min-width:768px){._datePicker__error_mhgoa_43{font-size:14px}}._datePicker__footer_mhgoa_59{display:flex;align-items:center;justify-content:space-between}._datePicker__footerActions_mhgoa_64{font-size:18px;line-height:1.3;cursor:pointer}._datePicker__footerActions_clear_mhgoa_69{color:var(--spui-color-icon-error)}._datePicker__footerActions_done_mhgoa_72{color:var(--spui-color-gray-500)}._datePicker__customContainer_mhgoa_75{border-radius:0;border:none;display:flex;flex-direction:column;gap:var(--spui-spacing-3x);font-family:var(--spui-font-family-main),serif;padding:var(--spui-spacing-6x);box-shadow:0 4px 32px #13131314;background-color:var(--spui-color-surface-default)}._datePicker_mhgoa_1 .react-datepicker__triangle{display:none}._datePicker_mhgoa_1 .react-datepicker-popper:before{content:""}._datePicker_mhgoa_1 .react-datepicker__header--custom{padding:0 0 16.5px;background-color:transparent;border:none}._datePicker_mhgoa_1 .react-datepicker__day-name{color:var(--spui-color-text-secondary)}._datePicker_mhgoa_1 .react-datepicker__day,._datePicker_mhgoa_1 .react-datepicker__day-name{margin:var(--spui-spacing-none);width:42px;font-size:18px;line-height:42px;box-sizing:content-box;border:var(--spui-border-width-md) solid var(--spui-color-surface-transparent)}._datePicker_mhgoa_1 .react-datepicker__day{color:var(--spui-color-text-primary);font-weight:var(--spui-font-weight-regular)}._datePicker_mhgoa_1 .react-datepicker__day{transition:all .2s ease-in-out}._datePicker_mhgoa_1 .react-datepicker__day--disabled,._datePicker_mhgoa_1 .react-datepicker__day--outside-month{color:var(--spui-color-text-secondary)}._datePicker_mhgoa_1 .react-datepicker__day--today{border:var(--spui-border-width-md) solid var(--spui-color-border-action);background-color:var(--spui-color-surface-transparent);color:var(--spui-color-text-action)}._datePicker_mhgoa_1 .react-datepicker__day--today:focus,._datePicker_mhgoa_1 .react-datepicker__day--today:focus-visible{outline:none}._datePicker_mhgoa_1 .react-datepicker__day--keyboard-selected{color:var(--spui-color-text-action);border-radius:var(--spui-border-radius-none);background-color:var(--spui-color-surface-secondary);border:var(--spui-border-width-md) solid var(--spui-color-border-action)}._datePicker_mhgoa_1 .react-datepicker__day--keyboard-selected:focus-visible,._datePicker_mhgoa_1 .react-datepicker__day--keyboard-selected:hover{color:var(--spui-color-text-action)!important;background-color:var(--spui-color-surface-secondary-hover)}._datePicker_mhgoa_1 .react-datepicker__day--keyboard-selected:active{background-color:var(--spui-color-surface-secondary-active)}._datePicker_mhgoa_1 .react-datepicker__day--selected{color:var(--spui-color-text-on-action);border-radius:var(--spui-border-radius-none);background-color:var(--spui-color-surface-action);border:var(--spui-border-width-md) solid var(--spui-color-border-action)}._datePicker_mhgoa_1 .react-datepicker__day--selected:focus-visible,._datePicker_mhgoa_1 .react-datepicker__day--selected:hover{background-color:var(--spui-color-surface-action-hover);border:var(--spui-border-width-md) solid var(--spui-color-border-action-hover)}._datePicker_mhgoa_1 .react-datepicker__day--selected:active{background-color:var(--spui-color-surface-action-active);border:var(--spui-border-width-md) solid var(--spui-color-border-action-active)}._datePicker_mhgoa_1 .react-datepicker__day--selected:hover{background-color:var(--spui-color-surface-action-active)!important;border-color:var(--spui-color-border-action-active)}._datePicker_mhgoa_1 .react-datepicker__day:hover{border-radius:var(--spui-border-radius-none);background-color:var(--spui-color-blue-50)}._datePicker_mhgoa_1 .react-datepicker__month{margin:var(--spui-spacing-none)}._datePickerPortal_mhgoa_165 .react-datepicker-popper{z-index:1000}._datePickerPortal_mhgoa_165 .react-datepicker__triangle{display:none}._datePickerPortal_mhgoa_165 .react-datepicker-popper:before{content:""}._datePickerPortal_mhgoa_165 .react-datepicker__header--custom{padding:0 0 16.5px;background-color:var(--spui-color-surface-transparent);border:none}._datePickerPortal_mhgoa_165 .react-datepicker__day-name{color:var(--spui-color-text-secondary)}._datePickerPortal_mhgoa_165 .react-datepicker__day,._datePickerPortal_mhgoa_165 .react-datepicker__day-name{margin:var(--spui-spacing-none);width:42px;font-size:18px;line-height:42px;box-sizing:content-box;border:var(--spui-border-width-md) solid var(--spui-color-surface-transparent)}._datePickerPortal_mhgoa_165 .react-datepicker__day{color:var(--spui-color-text-primary);font-weight:var(--spui-font-weight-regular)}._datePickerPortal_mhgoa_165 .react-datepicker__day{transition:all .2s ease-in-out}._datePickerPortal_mhgoa_165 .react-datepicker__day--disabled,._datePickerPortal_mhgoa_165 .react-datepicker__day--outside-month{color:var(--spui-color-text-secondary)}._datePickerPortal_mhgoa_165 .react-datepicker__day--today{border:var(--spui-border-width-md) solid var(--spui-color-border-action);background-color:var(--spui-color-surface-transparent);color:var(--spui-color-text-action)}._datePickerPortal_mhgoa_165 .react-datepicker__day--today:focus,._datePickerPortal_mhgoa_165 .react-datepicker__day--today:focus-visible{outline:none}._datePickerPortal_mhgoa_165 .react-datepicker__day--keyboard-selected{color:var(--spui-color-text-action);border-radius:var(--spui-border-radius-none);background-color:var(--spui-color-surface-secondary);border:var(--spui-border-width-md) solid var(--spui-color-border-action)}._datePickerPortal_mhgoa_165 .react-datepicker__day--keyboard-selected:focus-visible,._datePickerPortal_mhgoa_165 .react-datepicker__day--keyboard-selected:hover{color:var(--spui-color-text-action)!important;background-color:var(--spui-color-surface-secondary-hover)}._datePickerPortal_mhgoa_165 .react-datepicker__day--keyboard-selected:active{background-color:var(--spui-color-surface-secondary-active)}._datePickerPortal_mhgoa_165 .react-datepicker__day--selected{color:var(--spui-color-text-on-action);border-radius:var(--spui-border-radius-none);background-color:var(--spui-color-surface-action);border:var(--spui-border-width-md) solid var(--spui-color-border-action)}._datePickerPortal_mhgoa_165 .react-datepicker__day--selected:focus-visible,._datePickerPortal_mhgoa_165 .react-datepicker__day--selected:hover{background-color:var(--spui-color-surface-action-hover);border:var(--spui-border-width-md) solid var(--spui-color-border-action-hover)}._datePickerPortal_mhgoa_165 .react-datepicker__day--selected:active{background-color:var(--spui-color-surface-action-active);border:var(--spui-border-width-md) solid var(--spui-color-border-action-active)}._datePickerPortal_mhgoa_165 .react-datepicker__day--selected:hover{background-color:var(--spui-color-surface-action-active)!important;border-color:var(--spui-color-border-action-active)}._datePickerPortal_mhgoa_165 .react-datepicker__day:hover{border-radius:var(--spui-border-radius-none);background-color:var(--spui-color-blue-50)}._datePickerPortal_mhgoa_165 .react-datepicker__month{margin:var(--spui-spacing-none)}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
3
|
+
import a from "clsx";
|
|
4
|
+
import { ru as ce } from "date-fns/locale/ru";
|
|
5
|
+
import { useState as x, useEffect as ie, useRef as me } from "react";
|
|
6
|
+
import de from "react-datepicker";
|
|
7
|
+
import o from "./DatePicker.module.scss.js";
|
|
8
|
+
import { Label as pe } from "../Label/Label.js";
|
|
9
|
+
import { DatePickerInput as ue } from "../DatePickerInput/DatePickerInput.js";
|
|
10
|
+
import { Text as d } from "../Text/Text.js";
|
|
11
|
+
import { Icon as E } from "../Icons/Icon.js";
|
|
12
|
+
import { EIconName as T } from "../Icons/types/index.js";
|
|
13
|
+
const xe = (O) => {
|
|
14
|
+
const {
|
|
15
|
+
variant: S = "outlined",
|
|
16
|
+
placeholderText: A = "дд.мм.гггг",
|
|
17
|
+
dateFormatMask: B = "99.99.9999",
|
|
18
|
+
dateFormat: L = "dd.MM.yyyy",
|
|
19
|
+
readOnlyInput: M = !0,
|
|
20
|
+
isClearable: F = !0,
|
|
21
|
+
isRelative: w = !0,
|
|
22
|
+
shouldCloseOnSelect: p = !1,
|
|
23
|
+
enablePortal: n = !1,
|
|
24
|
+
closeOnScroll: V = !1,
|
|
25
|
+
disabled: u,
|
|
26
|
+
required: f,
|
|
27
|
+
error: N,
|
|
28
|
+
label: _,
|
|
29
|
+
value: j,
|
|
30
|
+
selected: C,
|
|
31
|
+
onCalendarOpen: H,
|
|
32
|
+
onCalendarClose: U,
|
|
33
|
+
onMouseDownInput: q,
|
|
34
|
+
onChange: P,
|
|
35
|
+
name: c,
|
|
36
|
+
onMouseEnter: K,
|
|
37
|
+
infoTooltipText: W,
|
|
38
|
+
tooltipPosition: Y,
|
|
39
|
+
minDate: z,
|
|
40
|
+
maxDate: G,
|
|
41
|
+
classNameRoot: k,
|
|
42
|
+
classNameDatePickerInputRoot: v,
|
|
43
|
+
classNameLabel: R,
|
|
44
|
+
classNameError: h,
|
|
45
|
+
classNameBaseTooltipRoot: J,
|
|
46
|
+
classNamePortalRoot: b
|
|
47
|
+
} = O, [I, g] = x(C), [Q, y] = x(null);
|
|
48
|
+
ie(() => {
|
|
49
|
+
if (!n) {
|
|
50
|
+
y(null);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const e = "custom-datepicker-portal";
|
|
54
|
+
let t = document.getElementById(e);
|
|
55
|
+
return t || (t = document.createElement("div"), t.id = e, t.className = a(o.datePickerPortal, b), document.body.appendChild(t)), y(t), () => {
|
|
56
|
+
};
|
|
57
|
+
}, [n, b]);
|
|
58
|
+
const X = () => {
|
|
59
|
+
H?.();
|
|
60
|
+
}, i = () => {
|
|
61
|
+
U?.();
|
|
62
|
+
}, m = (e, t) => {
|
|
63
|
+
P && c && P({ name: c, value: e });
|
|
64
|
+
}, Z = (e) => {
|
|
65
|
+
p && m(e), g(e);
|
|
66
|
+
}, $ = a({
|
|
67
|
+
[o.datePicker]: !0,
|
|
68
|
+
[o.datePicker_relative]: w,
|
|
69
|
+
...k && { [k]: !0 }
|
|
70
|
+
}), s = me(null), ee = a({
|
|
71
|
+
...v && { [v]: !0 }
|
|
72
|
+
}), oe = a({
|
|
73
|
+
...R && { [R]: !0 }
|
|
74
|
+
}), te = a({
|
|
75
|
+
[o.datePicker__error]: !0,
|
|
76
|
+
...h && { [h]: !0 }
|
|
77
|
+
}), ae = (e) => {
|
|
78
|
+
e.preventDefault(), e.stopPropagation(), m(null), g(null), s.current && s.current.setOpen(!1), i();
|
|
79
|
+
}, re = (e) => {
|
|
80
|
+
e.preventDefault(), e.stopPropagation(), s.current && s.current.setOpen(!1), m(I), i();
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ l("div", { className: $, children: [
|
|
83
|
+
_ && /* @__PURE__ */ r(
|
|
84
|
+
pe,
|
|
85
|
+
{
|
|
86
|
+
classNameRoot: oe,
|
|
87
|
+
tooltipPosition: Y,
|
|
88
|
+
required: f,
|
|
89
|
+
label: _,
|
|
90
|
+
infoTooltipText: W,
|
|
91
|
+
classNameBaseTooltipRoot: J
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ r(
|
|
95
|
+
de,
|
|
96
|
+
{
|
|
97
|
+
portalId: n && Q ? "custom-datepicker-portal" : void 0,
|
|
98
|
+
popperPlacement: "bottom-end",
|
|
99
|
+
disabledKeyboardNavigation: !I,
|
|
100
|
+
onSelect: Z,
|
|
101
|
+
ref: s,
|
|
102
|
+
closeOnScroll: V,
|
|
103
|
+
shouldCloseOnSelect: p,
|
|
104
|
+
minDate: z,
|
|
105
|
+
maxDate: G,
|
|
106
|
+
dateFormat: L,
|
|
107
|
+
locale: ce,
|
|
108
|
+
required: f,
|
|
109
|
+
name: c,
|
|
110
|
+
onCalendarClose: i,
|
|
111
|
+
onCalendarOpen: X,
|
|
112
|
+
selected: C,
|
|
113
|
+
value: j,
|
|
114
|
+
disabled: u,
|
|
115
|
+
renderCustomHeader: ({
|
|
116
|
+
monthDate: e,
|
|
117
|
+
decreaseMonth: t,
|
|
118
|
+
increaseMonth: se
|
|
119
|
+
}) => {
|
|
120
|
+
const D = e.toLocaleString("ru-RU", {
|
|
121
|
+
month: "short"
|
|
122
|
+
}), le = e.getFullYear(), ne = D.charAt(0).toUpperCase() + D.slice(1) + " " + le;
|
|
123
|
+
return /* @__PURE__ */ l("div", { className: o.datePicker__customHeader, children: [
|
|
124
|
+
/* @__PURE__ */ r(d, { children: ne.replace(".", "") }),
|
|
125
|
+
/* @__PURE__ */ l("div", { className: o.datePicker__navigationWrapper, children: [
|
|
126
|
+
/* @__PURE__ */ r(
|
|
127
|
+
E,
|
|
128
|
+
{
|
|
129
|
+
name: T.ArrowBottom,
|
|
130
|
+
onClick: t,
|
|
131
|
+
className: a(
|
|
132
|
+
o.datePicker__navigation,
|
|
133
|
+
o.datePicker__navigation_previous
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ r(
|
|
138
|
+
E,
|
|
139
|
+
{
|
|
140
|
+
name: T.ArrowBottom,
|
|
141
|
+
onClick: se,
|
|
142
|
+
className: a(o.datePicker__navigation)
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
] })
|
|
146
|
+
] });
|
|
147
|
+
},
|
|
148
|
+
calendarContainer: ({ className: e, children: t }) => /* @__PURE__ */ l("div", { className: a(o.datePicker__customContainer, e), children: [
|
|
149
|
+
t,
|
|
150
|
+
F && /* @__PURE__ */ l("div", { className: o.datePicker__footer, children: [
|
|
151
|
+
/* @__PURE__ */ r(
|
|
152
|
+
d,
|
|
153
|
+
{
|
|
154
|
+
classNameRoot: a(
|
|
155
|
+
o.datePicker__footerActions,
|
|
156
|
+
o.datePicker__footerActions_clear
|
|
157
|
+
),
|
|
158
|
+
onClick: ae,
|
|
159
|
+
children: "Очистить"
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ r(
|
|
163
|
+
d,
|
|
164
|
+
{
|
|
165
|
+
classNameRoot: a(
|
|
166
|
+
o.datePicker__footerActions,
|
|
167
|
+
o.datePicker__footerActions_done
|
|
168
|
+
),
|
|
169
|
+
onClick: re,
|
|
170
|
+
children: "Готово"
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] })
|
|
174
|
+
] }),
|
|
175
|
+
customInput: /* @__PURE__ */ r(
|
|
176
|
+
ue,
|
|
177
|
+
{
|
|
178
|
+
variant: S,
|
|
179
|
+
placeholderText: A,
|
|
180
|
+
dateFormatMask: B,
|
|
181
|
+
classNameRoot: ee,
|
|
182
|
+
onMouseDownInput: q,
|
|
183
|
+
readOnlyInput: M,
|
|
184
|
+
disabled: u,
|
|
185
|
+
isVisibleCalendarIcon: !0,
|
|
186
|
+
isVisibleErrorText: !1,
|
|
187
|
+
isVisibleLabelText: !1,
|
|
188
|
+
onMouseEnter: K
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
N && /* @__PURE__ */ r("div", { className: te, children: N })
|
|
194
|
+
] });
|
|
195
|
+
};
|
|
196
|
+
export {
|
|
197
|
+
xe as DatePicker
|
|
198
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import './DatePicker.css';const e = "_datePicker_mhgoa_1", _ = "_datePicker_relative_mhgoa_20", t = "_datePicker__customHeader_mhgoa_23", o = "_datePicker__navigationWrapper_mhgoa_28", a = "_datePicker__navigation_mhgoa_28", r = "_datePicker__navigation_previous_mhgoa_40", i = "_datePicker__error_mhgoa_43", c = "_datePicker__footer_mhgoa_59", n = "_datePicker__footerActions_mhgoa_64", d = "_datePicker__footerActions_clear_mhgoa_69", P = "_datePicker__footerActions_done_mhgoa_72", k = "_datePicker__customContainer_mhgoa_75", s = "_datePickerPortal_mhgoa_165", g = {
|
|
2
|
+
datePicker: e,
|
|
3
|
+
datePicker_relative: _,
|
|
4
|
+
datePicker__customHeader: t,
|
|
5
|
+
datePicker__navigationWrapper: o,
|
|
6
|
+
datePicker__navigation: a,
|
|
7
|
+
datePicker__navigation_previous: r,
|
|
8
|
+
datePicker__error: i,
|
|
9
|
+
datePicker__footer: c,
|
|
10
|
+
datePicker__footerActions: n,
|
|
11
|
+
datePicker__footerActions_clear: d,
|
|
12
|
+
datePicker__footerActions_done: P,
|
|
13
|
+
datePicker__customContainer: k,
|
|
14
|
+
datePickerPortal: s
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
e as datePicker,
|
|
18
|
+
s as datePickerPortal,
|
|
19
|
+
k as datePicker__customContainer,
|
|
20
|
+
t as datePicker__customHeader,
|
|
21
|
+
i as datePicker__error,
|
|
22
|
+
c as datePicker__footer,
|
|
23
|
+
n as datePicker__footerActions,
|
|
24
|
+
d as datePicker__footerActions_clear,
|
|
25
|
+
P as datePicker__footerActions_done,
|
|
26
|
+
a as datePicker__navigation,
|
|
27
|
+
o as datePicker__navigationWrapper,
|
|
28
|
+
r as datePicker__navigation_previous,
|
|
29
|
+
_ as datePicker_relative,
|
|
30
|
+
g as default
|
|
31
|
+
};
|