test-stpr-ui-kit 0.7.0 → 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,28 @@
|
|
|
1
|
+
import './Spinner.css';const i = "_spinner_if3pi_1", e = "_spinnerWithText_if3pi_71", n = "_spinnerWithText__line_if3pi_77", _ = "_spinnerWithText__text_if3pi_100", t = "_spinnerWithText__dots_if3pi_103", s = "_spinnerWithText__dot_if3pi_103", p = {
|
|
2
|
+
spinner: i,
|
|
3
|
+
"spinner-rotate": "_spinner-rotate_if3pi_1",
|
|
4
|
+
"spinner-clip": "_spinner-clip_if3pi_1",
|
|
5
|
+
"spinner--size-sm": "_spinner--size-sm_if3pi_32",
|
|
6
|
+
"spinner--size-md": "_spinner--size-md_if3pi_36",
|
|
7
|
+
"spinner--size-lg": "_spinner--size-lg_if3pi_40",
|
|
8
|
+
"spinner--size-xl": "_spinner--size-xl_if3pi_44",
|
|
9
|
+
spinnerWithText: e,
|
|
10
|
+
spinnerWithText__line: n,
|
|
11
|
+
"spinnerWithText__line--size-sm": "_spinnerWithText__line--size-sm_if3pi_88",
|
|
12
|
+
"spinnerWithText__line--size-md": "_spinnerWithText__line--size-md_if3pi_91",
|
|
13
|
+
"spinnerWithText__line--size-lg": "_spinnerWithText__line--size-lg_if3pi_94",
|
|
14
|
+
"spinnerWithText__line--size-xl": "_spinnerWithText__line--size-xl_if3pi_97",
|
|
15
|
+
spinnerWithText__text: _,
|
|
16
|
+
spinnerWithText__dots: t,
|
|
17
|
+
spinnerWithText__dot: s,
|
|
18
|
+
"spinner-dot-wave": "_spinner-dot-wave_if3pi_1"
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
p as default,
|
|
22
|
+
i as spinner,
|
|
23
|
+
e as spinnerWithText,
|
|
24
|
+
s as spinnerWithText__dot,
|
|
25
|
+
t as spinnerWithText__dots,
|
|
26
|
+
n as spinnerWithText__line,
|
|
27
|
+
_ as spinnerWithText__text
|
|
28
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type SpinnerSize = "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export interface SpinnerProps {
|
|
3
|
+
size?: SpinnerSize;
|
|
4
|
+
color?: string;
|
|
5
|
+
classNameRoot?: string;
|
|
6
|
+
/** Текст под спиннером; в конце отображаются четыре точки с волновой анимацией */
|
|
7
|
+
loadingText?: string;
|
|
8
|
+
classNameSpinnerTextLine?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tableWrapperRoot_ugn7p_1{position:relative}._tableWrapperRoot_hasError_ugn7p_4{outline:var(--spui-border-width-sm) solid var(--spui-color-border-error)}._tableWrapperRoot__errorTooltip_ugn7p_7{position:absolute;bottom:calc(100% + 2px);left:0}._tableWrapper_ugn7p_1{width:100%}._tableWrapper_ugn7p_1::-webkit-scrollbar{width:var(--spui-scrollbar-width);height:var(--spui-scrollbar-width)}._tableWrapper_ugn7p_1::-webkit-scrollbar-track{background:var(--spui-color-surface-secondary-hover)}._tableWrapper_ugn7p_1::-webkit-scrollbar-thumb{background:var(--color-aqua-blue)}._tableWrapper_ugn7p_1::-webkit-scrollbar-thumb:hover{background:var(--color-accent-blue)}._tableWrapper_ugn7p_1{opacity:1;visibility:visible}._tableWrapper_ugn7p_1{transition:all .3s ease-in-out}@starting-style{._tableWrapper_ugn7p_1{opacity:0;visibility:hidden}}._table_ugn7p_1{width:100%;table-layout:fixed;border-collapse:collapse}._table_ugn7p_1 th,._table_ugn7p_1 td{text-align:start;color:var(--color-gray-chicago);font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);font-size:12px}._table_ugn7p_1 tr:hover td{background-color:var(--spui-color-blue-50)}._table_ugn7p_1 th{padding:12px 16px;background-color:var(--spui-color-gray-50);font-weight:var(--spui-font-weight-medium)}._table__tdContent_ugn7p_63{display:block;padding:18px 16px;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;font-style:inherit}._table__tdContent_ugn7p_63{opacity:1;visibility:visible}._table__tdContent_ugn7p_63{transition:all .3s ease-in-out}@starting-style{._table__tdContent_ugn7p_63{opacity:0;visibility:hidden}}._table__controlWrapper_ugn7p_85{display:flex;align-items:center;gap:12px}._table__controlWrapper__control_ugn7p_90{color:var(--spui-color-icon-action);cursor:pointer}._table__controlWrapper__control_ugn7p_90{opacity:1;visibility:visible}._table__controlWrapper__control_ugn7p_90{transition:all .3s ease-in-out}@starting-style{._table__controlWrapper__control_ugn7p_90{opacity:0;visibility:hidden}}._table__controlWrapper__control_disabled_ugn7p_107{color:var(--spui-color-icon-disabled);pointer-events:none}._table__loadingWrapper_ugn7p_111{display:flex;justify-content:center;align-items:center;height:100%;min-height:60px}._table__noDataWrapper_ugn7p_118{display:flex;justify-content:center;align-items:center;height:60px;color:var(--spui-color-text-secondary);font-style:italic}._table__sortableHeader_ugn7p_126{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .2s ease}._table__sortableHeader_ugn7p_126:hover{background-color:var(--spui-color-surface-disabled)}._table__sortableHeader_ugn7p_126:hover ._table__sortIcon_ugn7p_134{color:var(--spui-color-icon-action)}._table__headerContent_ugn7p_137{display:flex;align-items:center;justify-content:start;gap:4px}._table__sortIcon_ugn7p_134{font-size:16px;line-height:1;color:var(--spui-color-gray-400);font-weight:var(--spui-font-weight-medium)}._table--variant-default_ugn7p_149 th,._table--variant-default_ugn7p_149 td{border:var(--spui-border-width-sm) solid var(--spui-color-border-primary)}._table--variant-znp_ugn7p_152 th,._table--variant-znp_ugn7p_152 td{border-bottom:var(--spui-border-width-sm) solid var(--spui-color-border-primary)}._table--variant-znp_ugn7p_152 ._table__tdContent_ugn7p_63{color:var(--spui-color-text-primary);font-weight:var(--spui-font-weight-medium)}._tooltip_ugn7p_160{padding:8px 12px!important}._tooltip_hasError_ugn7p_163{background-color:var(--spui-color-red-100)}._tooltip_hasError_ugn7p_163 ._tooltip__content_ugn7p_166{color:var(--spui-color-text-error)}._tooltip__content_ugn7p_166{font-size:12px}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import c from "clsx";
|
|
3
|
+
import Q, { useRef as U, useState as B, useEffect as X, useCallback as Y } from "react";
|
|
4
|
+
import r from "./Table.module.scss.js";
|
|
5
|
+
import { isString as H, isNumber as E } from "./utils/index.js";
|
|
6
|
+
import { BaseTooltip as Z } from "../BaseTooltip/BaseTooltip.js";
|
|
7
|
+
import { Spinner as w } from "../Spinner/Spinner.js";
|
|
8
|
+
import { Icon as h } from "../Icons/Icon.js";
|
|
9
|
+
import { EIconName as f } from "../Icons/types/index.js";
|
|
10
|
+
import { EllipsisTextWithTooltip as ee } from "../EllipsisTextWithTooltip/EllipsisTextWithTooltip.js";
|
|
11
|
+
const me = (O) => {
|
|
12
|
+
const {
|
|
13
|
+
columns: m,
|
|
14
|
+
data: s,
|
|
15
|
+
dispatch: d,
|
|
16
|
+
styleVariant: k = "default",
|
|
17
|
+
classNameRoot: C,
|
|
18
|
+
classNameTableRoot: g,
|
|
19
|
+
classNameTdContentRoot: y,
|
|
20
|
+
renderCellContent: T,
|
|
21
|
+
noData: S = { isVisibleHeader: !0, noDataText: "Нет данных" },
|
|
22
|
+
loading: N = !1,
|
|
23
|
+
hasError: R = !1,
|
|
24
|
+
errorText: P = ""
|
|
25
|
+
} = O, _ = U(null), [V, I] = B(60), [l, W] = B(null);
|
|
26
|
+
X(() => {
|
|
27
|
+
if (_.current && s && s.length > 0 && !N) {
|
|
28
|
+
const e = _.current.offsetHeight;
|
|
29
|
+
e > 60 && I(e);
|
|
30
|
+
}
|
|
31
|
+
}, [s, N]);
|
|
32
|
+
const D = Y((e) => e.sortBy ?? e.key, []), $ = Q.useMemo(() => !l || !s.length ? s : [...s].sort((e, a) => {
|
|
33
|
+
const i = m.find((L) => L.key === l.key);
|
|
34
|
+
if (!i) return 0;
|
|
35
|
+
const p = D(i), o = e[p], n = a[p];
|
|
36
|
+
if (o == null && n == null) return 0;
|
|
37
|
+
if (o == null) return l.direction === "asc" ? -1 : 1;
|
|
38
|
+
if (n == null) return l.direction === "asc" ? 1 : -1;
|
|
39
|
+
if (H(o) && H(n))
|
|
40
|
+
return l.direction === "asc" ? o.localeCompare(n) : n.localeCompare(o);
|
|
41
|
+
if (E(o) && E(n))
|
|
42
|
+
return o < n ? l.direction === "asc" ? -1 : 1 : o > n ? l.direction === "asc" ? 1 : -1 : 0;
|
|
43
|
+
const v = String(o), x = String(n);
|
|
44
|
+
return l.direction === "asc" ? v.localeCompare(x) : x.localeCompare(v);
|
|
45
|
+
}), [l, s, m, D]), F = (e) => {
|
|
46
|
+
e.isSortable && (l?.key === e.key ? W({
|
|
47
|
+
key: e.key,
|
|
48
|
+
direction: l.direction === "asc" ? "desc" : "asc"
|
|
49
|
+
}) : W({
|
|
50
|
+
key: e.key,
|
|
51
|
+
direction: "asc"
|
|
52
|
+
}));
|
|
53
|
+
}, j = (e) => e.isSortable ? l?.key === e.key ? l.direction === "asc" ? "↑" : "↓" : "↕" : null, z = c({
|
|
54
|
+
[r.tableWrapperRoot]: !0,
|
|
55
|
+
[r.tableWrapperRoot_hasError]: R
|
|
56
|
+
}), M = c({
|
|
57
|
+
[r.tableWrapper]: !0,
|
|
58
|
+
...C && { [C]: !0 }
|
|
59
|
+
}), q = c({
|
|
60
|
+
[r.table]: !0,
|
|
61
|
+
[r[`table--variant-${k}`]]: k,
|
|
62
|
+
...g && { [g]: !0 }
|
|
63
|
+
}), u = c({
|
|
64
|
+
[r.table__tdContent]: !0,
|
|
65
|
+
...y && { [y]: !0 }
|
|
66
|
+
}), A = (e, a) => {
|
|
67
|
+
if (a.renderCell)
|
|
68
|
+
return /* @__PURE__ */ t("div", { className: u, children: a.renderCell(e, a) });
|
|
69
|
+
if (a.key === "controls") {
|
|
70
|
+
const o = !!a.isDisabled;
|
|
71
|
+
return /* @__PURE__ */ t("div", { className: u, children: /* @__PURE__ */ b("div", { className: r.table__controlWrapper, children: [
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
h,
|
|
74
|
+
{
|
|
75
|
+
name: f.Edit,
|
|
76
|
+
className: c(
|
|
77
|
+
r.table__controlWrapper__control,
|
|
78
|
+
o && r.table__controlWrapper__control_disabled
|
|
79
|
+
),
|
|
80
|
+
onClick: (n) => {
|
|
81
|
+
n.stopPropagation(), d?.({
|
|
82
|
+
clickOn: "edit",
|
|
83
|
+
rowData: e
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ t(
|
|
89
|
+
h,
|
|
90
|
+
{
|
|
91
|
+
name: f.Trash,
|
|
92
|
+
className: c(
|
|
93
|
+
r.table__controlWrapper__control,
|
|
94
|
+
o && r.table__controlWrapper__control_disabled
|
|
95
|
+
),
|
|
96
|
+
onClick: (n) => {
|
|
97
|
+
n.stopPropagation(), d?.({
|
|
98
|
+
clickOn: "delete",
|
|
99
|
+
rowData: e
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] }) });
|
|
105
|
+
}
|
|
106
|
+
if (a.key === "deleteControl") {
|
|
107
|
+
const o = !!a.isDisabled;
|
|
108
|
+
return /* @__PURE__ */ t("div", { className: u, children: /* @__PURE__ */ t("div", { className: r.table__controlWrapper, children: /* @__PURE__ */ t(
|
|
109
|
+
h,
|
|
110
|
+
{
|
|
111
|
+
name: f.Trash,
|
|
112
|
+
className: c(
|
|
113
|
+
r.table__controlWrapper__control,
|
|
114
|
+
o && r.table__controlWrapper__control_disabled
|
|
115
|
+
),
|
|
116
|
+
onClick: (n) => {
|
|
117
|
+
n.stopPropagation(), d && d({
|
|
118
|
+
clickOn: "delete",
|
|
119
|
+
rowData: e
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
) }) });
|
|
124
|
+
}
|
|
125
|
+
if (a.key === "editControl") {
|
|
126
|
+
const o = !!a.isDisabled;
|
|
127
|
+
return /* @__PURE__ */ t("div", { className: u, children: /* @__PURE__ */ t("div", { className: r.table__controlWrapper, children: /* @__PURE__ */ t(
|
|
128
|
+
h,
|
|
129
|
+
{
|
|
130
|
+
name: f.Edit,
|
|
131
|
+
className: c(
|
|
132
|
+
r.table__controlWrapper__control,
|
|
133
|
+
o && r.table__controlWrapper__control_disabled
|
|
134
|
+
),
|
|
135
|
+
onClick: (n) => {
|
|
136
|
+
n.stopPropagation(), d && d({
|
|
137
|
+
clickOn: "edit",
|
|
138
|
+
rowData: e
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
) }) });
|
|
143
|
+
}
|
|
144
|
+
if (T)
|
|
145
|
+
return /* @__PURE__ */ t("div", { className: u, children: T(e, a) });
|
|
146
|
+
const i = !!a.isClickable, p = e[a.key];
|
|
147
|
+
return /* @__PURE__ */ t("div", { className: u, children: /* @__PURE__ */ t(
|
|
148
|
+
ee,
|
|
149
|
+
{
|
|
150
|
+
onClick: (o) => {
|
|
151
|
+
i && (o.stopPropagation(), d?.({
|
|
152
|
+
clickOn: String(a.key),
|
|
153
|
+
rowData: e
|
|
154
|
+
}));
|
|
155
|
+
},
|
|
156
|
+
classNameBaseTooltipRoot: r.tooltip,
|
|
157
|
+
isInheritFontStyles: !0,
|
|
158
|
+
text: p ? String(p) : "-",
|
|
159
|
+
isCursorPointerByOnClick: i
|
|
160
|
+
}
|
|
161
|
+
) });
|
|
162
|
+
}, G = () => !S.isVisibleHeader && (!s || s.length === 0) ? null : /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: m.map((e, a) => {
|
|
163
|
+
const i = j(e), p = e.isSortable;
|
|
164
|
+
return /* @__PURE__ */ t(
|
|
165
|
+
"th",
|
|
166
|
+
{
|
|
167
|
+
onClick: () => F(e),
|
|
168
|
+
className: c(p && r.table__sortableHeader),
|
|
169
|
+
children: /* @__PURE__ */ b("div", { className: r.table__headerContent, children: [
|
|
170
|
+
/* @__PURE__ */ t("span", { children: e.title }),
|
|
171
|
+
i && /* @__PURE__ */ t("span", { className: r.table__sortIcon, children: i })
|
|
172
|
+
] })
|
|
173
|
+
},
|
|
174
|
+
a
|
|
175
|
+
);
|
|
176
|
+
}) }) }), J = () => N ? /* @__PURE__ */ t("tbody", { ref: _, style: { height: `${V}px` }, children: /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: m.length, children: /* @__PURE__ */ t("div", { className: r.table__loadingWrapper, children: /* @__PURE__ */ t(w, { size: "lg" }) }) }) }) }) : !s || s.length === 0 ? /* @__PURE__ */ t("tbody", { ref: _, children: /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: m.length, children: /* @__PURE__ */ t("div", { className: r.table__noDataWrapper, children: S.noDataText }) }) }) }) : /* @__PURE__ */ t("tbody", { ref: _, children: $.map((e, a) => e ? /* @__PURE__ */ t(
|
|
177
|
+
"tr",
|
|
178
|
+
{
|
|
179
|
+
onClick: (i) => {
|
|
180
|
+
i.stopPropagation(), d && d({
|
|
181
|
+
clickOn: "row",
|
|
182
|
+
rowData: e
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
children: m.map((i, p) => /* @__PURE__ */ t("td", { children: A(e, i) }, `${a}:${p}`))
|
|
186
|
+
},
|
|
187
|
+
a
|
|
188
|
+
) : null) }), K = () => /* @__PURE__ */ b("table", { className: q, children: [
|
|
189
|
+
/* @__PURE__ */ t("colgroup", { children: m.map(({ width: e }, a) => /* @__PURE__ */ t(
|
|
190
|
+
"col",
|
|
191
|
+
{
|
|
192
|
+
style: {
|
|
193
|
+
width: e ? `${e}px` : void 0
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
a
|
|
197
|
+
)) }),
|
|
198
|
+
G(),
|
|
199
|
+
J()
|
|
200
|
+
] });
|
|
201
|
+
return /* @__PURE__ */ b("div", { className: z, children: [
|
|
202
|
+
R && /* @__PURE__ */ t(
|
|
203
|
+
Z,
|
|
204
|
+
{
|
|
205
|
+
text: P,
|
|
206
|
+
classNameRoot: c(
|
|
207
|
+
r.tableWrapperRoot__errorTooltip,
|
|
208
|
+
r.tooltip,
|
|
209
|
+
r.tooltip_hasError
|
|
210
|
+
),
|
|
211
|
+
classNameContentRoot: r.tooltip__content
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ t("div", { className: M, children: K() })
|
|
215
|
+
] });
|
|
216
|
+
};
|
|
217
|
+
export {
|
|
218
|
+
me as Table
|
|
219
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import './Table.css';const t = "_tableWrapperRoot_ugn7p_1", _ = "_tableWrapperRoot_hasError_ugn7p_4", o = "_tableWrapperRoot__errorTooltip_ugn7p_7", r = "_tableWrapper_ugn7p_1", a = "_table_ugn7p_1", e = "_table__tdContent_ugn7p_63", p = "_table__controlWrapper_ugn7p_85", l = "_table__controlWrapper__control_ugn7p_90", n = "_table__controlWrapper__control_disabled_ugn7p_107", b = "_table__loadingWrapper_ugn7p_111", c = "_table__noDataWrapper_ugn7p_118", s = "_table__sortableHeader_ugn7p_126", W = "_table__sortIcon_ugn7p_134", g = "_table__headerContent_ugn7p_137", i = "_tooltip_ugn7p_160", u = "_tooltip_hasError_ugn7p_163", d = "_tooltip__content_ugn7p_166", h = {
|
|
2
|
+
tableWrapperRoot: t,
|
|
3
|
+
tableWrapperRoot_hasError: _,
|
|
4
|
+
tableWrapperRoot__errorTooltip: o,
|
|
5
|
+
tableWrapper: r,
|
|
6
|
+
table: a,
|
|
7
|
+
table__tdContent: e,
|
|
8
|
+
table__controlWrapper: p,
|
|
9
|
+
table__controlWrapper__control: l,
|
|
10
|
+
table__controlWrapper__control_disabled: n,
|
|
11
|
+
table__loadingWrapper: b,
|
|
12
|
+
table__noDataWrapper: c,
|
|
13
|
+
table__sortableHeader: s,
|
|
14
|
+
table__sortIcon: W,
|
|
15
|
+
table__headerContent: g,
|
|
16
|
+
"table--variant-default": "_table--variant-default_ugn7p_149",
|
|
17
|
+
"table--variant-znp": "_table--variant-znp_ugn7p_152",
|
|
18
|
+
tooltip: i,
|
|
19
|
+
tooltip_hasError: u,
|
|
20
|
+
tooltip__content: d
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
h as default,
|
|
24
|
+
a as table,
|
|
25
|
+
r as tableWrapper,
|
|
26
|
+
t as tableWrapperRoot,
|
|
27
|
+
o as tableWrapperRoot__errorTooltip,
|
|
28
|
+
_ as tableWrapperRoot_hasError,
|
|
29
|
+
p as table__controlWrapper,
|
|
30
|
+
l as table__controlWrapper__control,
|
|
31
|
+
n as table__controlWrapper__control_disabled,
|
|
32
|
+
g as table__headerContent,
|
|
33
|
+
b as table__loadingWrapper,
|
|
34
|
+
c as table__noDataWrapper,
|
|
35
|
+
W as table__sortIcon,
|
|
36
|
+
s as table__sortableHeader,
|
|
37
|
+
e as table__tdContent,
|
|
38
|
+
i as tooltip,
|
|
39
|
+
d as tooltip__content,
|
|
40
|
+
u as tooltip_hasError
|
|
41
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TClickOnCellAction } from "../types";
|
|
2
|
+
interface IUseTableActionsProps<T> {
|
|
3
|
+
onEdit?: (data: T) => void;
|
|
4
|
+
onDelete?: (key: string) => void;
|
|
5
|
+
onRowClick?: (data: T) => void;
|
|
6
|
+
onCustomAction?: (action: TClickOnCellAction<T>) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useTableActions: <T extends {
|
|
9
|
+
key?: string | number;
|
|
10
|
+
id?: string | number;
|
|
11
|
+
}>({ onEdit, onDelete, onRowClick, onCustomAction, }?: IUseTableActionsProps<T>) => (action: TClickOnCellAction<T>) => void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useCallback as b } from "react";
|
|
2
|
+
const i = ({
|
|
3
|
+
onEdit: a,
|
|
4
|
+
onDelete: e,
|
|
5
|
+
onRowClick: s,
|
|
6
|
+
onCustomAction: f
|
|
7
|
+
} = {}) => b(
|
|
8
|
+
(r) => {
|
|
9
|
+
switch (f && f(r), r.clickOn) {
|
|
10
|
+
case "delete":
|
|
11
|
+
if (e) {
|
|
12
|
+
const w = "key" in r.rowData && r.rowData.key || "id" in r.rowData && r.rowData.id || void 0;
|
|
13
|
+
w !== void 0 && e(String(w));
|
|
14
|
+
}
|
|
15
|
+
break;
|
|
16
|
+
case "edit":
|
|
17
|
+
a && a(r.rowData);
|
|
18
|
+
break;
|
|
19
|
+
case "row":
|
|
20
|
+
s && s(r.rowData);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
[a, e, s, f]
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
i as useTableActions
|
|
28
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Dispatch, ReactNode } from "react";
|
|
2
|
+
export interface TableProps<TData extends object = Record<string, unknown>> {
|
|
3
|
+
data: TData[];
|
|
4
|
+
columns: TColumn<TData>[];
|
|
5
|
+
dispatch?: Dispatch<TClickOnCellAction<TData>>;
|
|
6
|
+
classNameRoot?: string;
|
|
7
|
+
classNameTableRoot?: string;
|
|
8
|
+
classNameTdContentRoot?: string;
|
|
9
|
+
renderCellContent?: (row: TData, col: TColumn<TData>) => ReactNode;
|
|
10
|
+
styleVariant?: TTableStyleVariant;
|
|
11
|
+
noData?: {
|
|
12
|
+
isVisibleHeader?: boolean;
|
|
13
|
+
noDataText?: string;
|
|
14
|
+
};
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
hasError?: boolean;
|
|
17
|
+
errorText?: string;
|
|
18
|
+
}
|
|
19
|
+
export type TClickOnCellAction<TData> = {
|
|
20
|
+
clickOn: string;
|
|
21
|
+
rowData: TData;
|
|
22
|
+
};
|
|
23
|
+
export type TTableStyleVariant = "default" | "znp";
|
|
24
|
+
export type TColumn<TData> = {
|
|
25
|
+
key: keyof TData | TDefaultColumnKey;
|
|
26
|
+
title: string;
|
|
27
|
+
isVisible?: boolean;
|
|
28
|
+
isClickable?: boolean;
|
|
29
|
+
isSortable?: boolean;
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
width?: number;
|
|
32
|
+
renderCell?: (row: TData, col: TColumn<TData>) => ReactNode;
|
|
33
|
+
sortBy?: keyof TData;
|
|
34
|
+
};
|
|
35
|
+
export type TSortState<TData> = {
|
|
36
|
+
key: keyof TData | TDefaultColumnKey;
|
|
37
|
+
direction: "asc" | "desc";
|
|
38
|
+
};
|
|
39
|
+
export type TDefaultColumnKey = "controls" | "deleteControl" | "editControl";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spTabs_14g3q_1{display:flex;align-items:flex-start}._spTabs_14g3q_1{opacity:1;visibility:visible}._spTabs_14g3q_1{transition:all .3s ease-in-out}@starting-style{._spTabs_14g3q_1{opacity:0;visibility:hidden}}._spTabs_separated_14g3q_18{background-color:transparent;gap:var(--spui-tabs-container-gap);padding:var(--spui-spacing-none)}._spTabs--size-md_14g3q_23{--spui-tabs-container-gap: var(--spui-spacing-1x);--spui-tabs-container-padding: 6px;--spui-tab-item-padding: var(--spui-spacing-none) var(--spui-spacing-4x);--spui-tab-item-height: var(--spui-control-height-md);--spui-tabs-contained-content-height: var(--spui-control-height-base);--spui-tab-item-font-size: 16px}._spTabs--size-xl_14g3q_31{--spui-tabs-container-gap: var(--spui-spacing-2x);--spui-tabs-container-padding: var(--spui-spacing-2x);--spui-tab-item-padding: var(--spui-spacing-none) var(--spui-spacing-5x);--spui-tab-item-height: var(--spui-control-height-xl);--spui-tabs-contained-content-height: var(--spui-control-height-md);--spui-tab-item-font-size: 20px}._spTabs--variant-contained_14g3q_39{background-color:var(--spui-color-surface-page);padding:var(--spui-spacing-none) var(--tabs-container-padding)}._spTabs--variant-contained_14g3q_39 ._spTabs__tabElement_14g3q_43{color:var(--spui-color-text-secondary);background-color:transparent;padding:var(--spui-spacing-none)}._spTabs--variant-contained_14g3q_39 ._spTabs__tabElement_14g3q_43:hover:not(._spTabs__tabElement_active_14g3q_48) ._spTabs__tabContent_14g3q_48{background-color:var(--tab-item-bg-hover)}._spTabs--variant-contained_14g3q_39 ._spTabs__tabElement_active_14g3q_48{color:var(--spui-color-text-action);background-color:transparent}._spTabs--variant-contained_14g3q_39 ._spTabs__tabElement_active_14g3q_48 ._spTabs__tooltip_14g3q_55{color:var(--spui-color-text-action)}._spTabs--variant-contained_14g3q_39 ._spTabs__tabElement_active_14g3q_48 ._spTabs__tabContent_14g3q_48{background-color:var(--spui-color-surface-default)}._spTabs--variant-contained_14g3q_39 ._spTabs__tabContent_14g3q_48{height:var(--tabs-contained-content-height);min-height:var(--tabs-contained-content-height);padding:var(--tab-item-padding);background-color:transparent}._spTabs--variant-outlined_14g3q_67{background-color:transparent;padding:var(--spui-spacing-none)}._spTabs--variant-outlined_14g3q_67 ._spTabs__tabElement_14g3q_43{border-bottom:var(--spui-border-width-md) solid transparent;color:var(--spui-color-text-secondary);background-color:transparent}._spTabs--variant-outlined_14g3q_67 ._spTabs__tabElement_14g3q_43:hover{color:var(--spui-color-text-action)}._spTabs--variant-outlined_14g3q_67 ._spTabs__tabElement_active_14g3q_48{color:var(--spui-color-text-action);border-bottom:var(--spui-border-width-md) solid var(--spui-color-border-action)}._spTabs--variant-outlined_14g3q_67 ._spTabs__tabElement_active_14g3q_48 ._spTabs__tooltip_14g3q_55{color:var(--spui-color-text-action)}._spTabs--variant-filled_14g3q_86{background-color:transparent;padding:var(--spui-spacing-none)}._spTabs--variant-filled_14g3q_86 ._spTabs__tabElement_14g3q_43{border:var(--spui-border-width-sm) solid var(--spui-color-border-disabled, var(--color-light-smoke));color:var(--spui-color-text-secondary);background-color:var(--spui-color-surface-disabled)}._spTabs--variant-filled_14g3q_86 ._spTabs__tabElement_14g3q_43:hover{border-color:var(--spui-color-border-action)}._spTabs--variant-filled_14g3q_86 ._spTabs__tabElement_active_14g3q_48{color:var(--spui-color-text-on-action);background-color:var(--spui-color-surface-action);border-color:var(--spui-color-border-action)}._spTabs--variant-filled_14g3q_86 ._spTabs__tabElement_active_14g3q_48 ._spTabs__tooltip_14g3q_55{color:var(--spui-color-text-on-action)}._spTabs__tabElement_14g3q_43{display:flex;cursor:pointer;justify-content:center;align-items:center;height:var(--tab-item-height);min-height:var(--tab-item-height);padding:var(--tab-item-padding);font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);font-size:var(--tab-item-font-size);line-height:120%}._spTabs__tabElement_active_14g3q_48{font-weight:var(--spui-font-weight-medium)}._spTabs__tabContent_14g3q_48{display:flex;align-items:center;justify-content:center;gap:var(--spui-spacing-2x);box-sizing:border-box;width:100%;height:100%;min-height:100%;padding:var(--spui-spacing-none)}._spTabs__iconContainer_14g3q_133{display:flex}._spTabs__iconContainer_14g3q_133 .stpr-icon{width:var(--spui-icon-size-base);height:var(--spui-icon-size-base);transition:unset;flex-shrink:0}._spTabs__tabText_14g3q_142{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}._spTabs__tooltip_14g3q_55{display:flex;flex-shrink:0;align-items:center}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as s, jsxs as N, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import n from "clsx";
|
|
3
|
+
import e from "./Tabs.module.scss.js";
|
|
4
|
+
import { InfoTooltip as $ } from "../Tooltip/Tooltip.js";
|
|
5
|
+
import { Icon as F } from "../Icons/Icon.js";
|
|
6
|
+
const D = (_) => {
|
|
7
|
+
const {
|
|
8
|
+
panes: R,
|
|
9
|
+
isSeparated: v = !1,
|
|
10
|
+
classNameRoot: c,
|
|
11
|
+
classNameTabElementRoot: i,
|
|
12
|
+
classNameBaseTooltipRoot: I,
|
|
13
|
+
variant: m = "contained",
|
|
14
|
+
size: p = "xl"
|
|
15
|
+
} = _, f = n({
|
|
16
|
+
[e.spTabs]: !0,
|
|
17
|
+
[e.spTabs_separated]: v,
|
|
18
|
+
[e[`spTabs--variant-${m}`]]: m,
|
|
19
|
+
[e[`spTabs--size-${p}`]]: p,
|
|
20
|
+
...c && { [c]: !0 }
|
|
21
|
+
}), h = n({
|
|
22
|
+
[e.spTabs__iconContainer]: !0
|
|
23
|
+
}), C = n({
|
|
24
|
+
[e.spTabs__tooltip]: !0
|
|
25
|
+
}), x = n({
|
|
26
|
+
[e.spTabs__tabContent]: !0
|
|
27
|
+
}), r = (o, a) => o ? /* @__PURE__ */ s("div", { className: h, children: /* @__PURE__ */ s(F, { name: o, rotate: a }) }) : null, B = (o, a) => {
|
|
28
|
+
const {
|
|
29
|
+
name: d,
|
|
30
|
+
active: E,
|
|
31
|
+
onClick: y,
|
|
32
|
+
infoTooltipText: T,
|
|
33
|
+
isOnlyIcon: t = !1,
|
|
34
|
+
startIconName: l,
|
|
35
|
+
endIconName: b,
|
|
36
|
+
startIconRotate: u = 0,
|
|
37
|
+
endIconRotate: g = 0
|
|
38
|
+
} = o, j = !t && !!l, k = !t && !!b, z = !t;
|
|
39
|
+
return /* @__PURE__ */ s(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"aria-label": t ? d : void 0,
|
|
43
|
+
className: n({
|
|
44
|
+
[e.spTabs__tabElement]: !0,
|
|
45
|
+
[e.spTabs__tabElement_active]: E,
|
|
46
|
+
...i && { [i]: !0 }
|
|
47
|
+
}),
|
|
48
|
+
onClick: y,
|
|
49
|
+
children: /* @__PURE__ */ N("div", { className: x, children: [
|
|
50
|
+
t ? r(l, u) : /* @__PURE__ */ N(S, { children: [
|
|
51
|
+
r(j ? l : void 0, u),
|
|
52
|
+
z && /* @__PURE__ */ s("span", { className: e.spTabs__tabText, children: d }),
|
|
53
|
+
r(k ? b : void 0, g)
|
|
54
|
+
] }),
|
|
55
|
+
!!T && /* @__PURE__ */ s(
|
|
56
|
+
$,
|
|
57
|
+
{
|
|
58
|
+
hover: !0,
|
|
59
|
+
classNameTooltip: C,
|
|
60
|
+
text: T,
|
|
61
|
+
classNameBaseTooltipRoot: I
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] })
|
|
65
|
+
},
|
|
66
|
+
o.key || a
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ s("div", { className: f, children: R.map((o, a) => B(o, a)) });
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
D as Tabs
|
|
73
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import './Tabs.css';const s = "_spTabs_14g3q_1", _ = "_spTabs_separated_14g3q_18", a = "_spTabs__tabElement_14g3q_43", t = "_spTabs__tabElement_active_14g3q_48", b = "_spTabs__tabContent_14g3q_48", e = "_spTabs__tooltip_14g3q_55", n = "_spTabs__iconContainer_14g3q_133", p = "_spTabs__tabText_14g3q_142", T = {
|
|
2
|
+
spTabs: s,
|
|
3
|
+
spTabs_separated: _,
|
|
4
|
+
"spTabs--size-md": "_spTabs--size-md_14g3q_23",
|
|
5
|
+
"spTabs--size-xl": "_spTabs--size-xl_14g3q_31",
|
|
6
|
+
"spTabs--variant-contained": "_spTabs--variant-contained_14g3q_39",
|
|
7
|
+
spTabs__tabElement: a,
|
|
8
|
+
spTabs__tabElement_active: t,
|
|
9
|
+
spTabs__tabContent: b,
|
|
10
|
+
spTabs__tooltip: e,
|
|
11
|
+
"spTabs--variant-outlined": "_spTabs--variant-outlined_14g3q_67",
|
|
12
|
+
"spTabs--variant-filled": "_spTabs--variant-filled_14g3q_86",
|
|
13
|
+
spTabs__iconContainer: n,
|
|
14
|
+
spTabs__tabText: p
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
T as default,
|
|
18
|
+
s as spTabs,
|
|
19
|
+
n as spTabs__iconContainer,
|
|
20
|
+
b as spTabs__tabContent,
|
|
21
|
+
a as spTabs__tabElement,
|
|
22
|
+
t as spTabs__tabElement_active,
|
|
23
|
+
p as spTabs__tabText,
|
|
24
|
+
e as spTabs__tooltip,
|
|
25
|
+
_ as spTabs_separated
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { EIconName } from "../../Icons";
|
|
3
|
+
export type TTabsVariant = "filled" | "contained" | "outlined";
|
|
4
|
+
export type TTabsSize = "md" | "xl";
|
|
5
|
+
export type TPaneItem = {
|
|
6
|
+
name: string;
|
|
7
|
+
key?: string;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
10
|
+
infoTooltipText?: string;
|
|
11
|
+
isOnlyIcon?: boolean;
|
|
12
|
+
startIconName?: EIconName;
|
|
13
|
+
endIconName?: EIconName;
|
|
14
|
+
startIconRotate?: number;
|
|
15
|
+
endIconRotate?: number;
|
|
16
|
+
};
|
|
17
|
+
export interface TabsProps {
|
|
18
|
+
size?: TTabsSize;
|
|
19
|
+
panes: TPaneItem[];
|
|
20
|
+
isSeparated?: boolean;
|
|
21
|
+
variant?: TTabsVariant;
|
|
22
|
+
classNameRoot?: string;
|
|
23
|
+
classNameTabElementRoot?: string;
|
|
24
|
+
classNameBaseTooltipRoot?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spText_1rmz8_1{display:inline-block;font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-regular);font-size:16px;line-height:120%;white-space:normal}._spText_1rmz8_1{opacity:1;visibility:visible}._spText_1rmz8_1{transition:all .3s ease-in-out}@starting-style{._spText_1rmz8_1{opacity:0;visibility:hidden}}@media only screen and (min-width:768px){._spText_1rmz8_1{font-size:18px}}._spText_ellipsis_1rmz8_27{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}._spText_type-h1_1rmz8_33{font-family:var(--spui-font-family-title),serif;font-weight:var(--spui-font-weight-bold);font-size:28px}@media only screen and (min-width:768px){._spText_type-h1_1rmz8_33{font-size:48px}}._spText_type-h3_1rmz8_43{font-family:var(--spui-font-family-title),serif;font-weight:var(--spui-font-weight-bold);font-size:24px}@media only screen and (min-width:768px){._spText_type-h3_1rmz8_43{font-size:28px}}@media only screen and (min-width:1200px){._spText_type-h3_1rmz8_43{font-size:36px}}@media only screen and (min-width:768px){._spText_type-p1_1rmz8_59{font-size:20px}}@media only screen and (min-width:768px){._spText_type-p2_1rmz8_64{font-size:16px}}._spText_type-description_1rmz8_68{font-size:14px}@media only screen and (min-width:768px){._spText_type-description_1rmz8_68{font-size:16px}}._spText_type-link_1rmz8_76{color:var(--spui-color-text-action);font-size:16px;font-weight:var(--spui-font-weight-medium)}@media only screen and (min-width:768px){._spText_type-link_1rmz8_76{font-size:18px}}._spText_type-link_1rmz8_76:hover{color:var(--spui-color-text-action)}._spText_cursorPointer_1rmz8_89{cursor:pointer}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import T from "clsx";
|
|
3
|
+
import N from "react";
|
|
4
|
+
import t from "./Text.module.scss.js";
|
|
5
|
+
const R = N.forwardRef((o, i) => {
|
|
6
|
+
const {
|
|
7
|
+
type: s,
|
|
8
|
+
children: l,
|
|
9
|
+
color: p,
|
|
10
|
+
title: a,
|
|
11
|
+
style: n,
|
|
12
|
+
onClick: e,
|
|
13
|
+
isEllipsis: c = !1,
|
|
14
|
+
isCursorPointer: m = !1,
|
|
15
|
+
isCursorPointerByOnClick: u = !0,
|
|
16
|
+
classNameRoot: r
|
|
17
|
+
} = o, f = () => e && u ? !0 : m, x = T({
|
|
18
|
+
[t.spText]: !0,
|
|
19
|
+
[t.spText_ellipsis]: c,
|
|
20
|
+
[t.spText_cursorPointer]: f(),
|
|
21
|
+
[t[`spText_type-${s}`]]: s,
|
|
22
|
+
...r && { [r]: !0 }
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ C(
|
|
25
|
+
"span",
|
|
26
|
+
{
|
|
27
|
+
style: { ...n, color: p },
|
|
28
|
+
title: a,
|
|
29
|
+
onClick: (y) => e && e(y),
|
|
30
|
+
className: x,
|
|
31
|
+
ref: i,
|
|
32
|
+
children: l
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
R.displayName = "Text";
|
|
37
|
+
export {
|
|
38
|
+
R as Text
|
|
39
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './Text.css';const t = "_spText_1rmz8_1", _ = "_spText_ellipsis_1rmz8_27", e = "_spText_cursorPointer_1rmz8_89", p = {
|
|
2
|
+
spText: t,
|
|
3
|
+
spText_ellipsis: _,
|
|
4
|
+
"spText_type-h1": "_spText_type-h1_1rmz8_33",
|
|
5
|
+
"spText_type-h3": "_spText_type-h3_1rmz8_43",
|
|
6
|
+
"spText_type-p1": "_spText_type-p1_1rmz8_59",
|
|
7
|
+
"spText_type-p2": "_spText_type-p2_1rmz8_64",
|
|
8
|
+
"spText_type-description": "_spText_type-description_1rmz8_68",
|
|
9
|
+
"spText_type-link": "_spText_type-link_1rmz8_76",
|
|
10
|
+
spText_cursorPointer: e
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
p as default,
|
|
14
|
+
t as spText,
|
|
15
|
+
e as spText_cursorPointer,
|
|
16
|
+
_ as spText_ellipsis
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ForwardedRef, ReactNode } from "react";
|
|
2
|
+
export type TTextType = "h1" | "h3" | "p1" | "p2" | "description" | "link";
|
|
3
|
+
export interface TextProps {
|
|
4
|
+
children?: string | ReactNode;
|
|
5
|
+
color?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
classNameRoot?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
onClick?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
|
|
10
|
+
isEllipsis?: boolean;
|
|
11
|
+
isCursorPointer?: boolean;
|
|
12
|
+
isCursorPointerByOnClick?: boolean;
|
|
13
|
+
type?: TTextType;
|
|
14
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spTextWithLabel_18nkl_1{width:fit-content}._spTextWithLabel_ellipsis_18nkl_4{width:100%}
|