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
package/README.md
CHANGED
|
@@ -3,23 +3,66 @@
|
|
|
3
3
|
- Works out of the box. Test STPR UI contains a set of polished React components
|
|
4
4
|
that work out of the box.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## Installing Test STPR UI
|
|
7
7
|
|
|
8
|
-
⚡️Test STPR UI is made up of multiple components
|
|
9
|
-
|
|
8
|
+
⚡️ Test STPR UI is made up of multiple components which you can import one by one.
|
|
9
|
+
Install the `test-stpr-ui-kit` package:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
|
|
12
|
+
yarn add test-stpr-ui-kit
|
|
13
13
|
# or
|
|
14
|
-
|
|
14
|
+
npm install test-stpr-ui-kit
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The package is **ESM-only**. Runtime dependencies (`clsx`, `date-fns`, `react-datepicker`, etc.) are installed
|
|
18
|
+
transitively with the package.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
### Peer dependencies
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Your app must satisfy:
|
|
23
|
+
|
|
24
|
+
- `react`, `react-dom` — required;
|
|
25
|
+
- `three`, `web-ifc` — required only for `IfcPreview` / `IfcViewer`.
|
|
26
|
+
|
|
27
|
+
## Getting set up
|
|
28
|
+
|
|
29
|
+
### 1. Design tokens (required)
|
|
30
|
+
|
|
31
|
+
Import once at the app entry (e.g. `main.tsx`):
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import "test-stpr-ui-kit/styles/tokens.css";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Component styles rely on `--spui-*` CSS variables from this file.
|
|
38
|
+
|
|
39
|
+
### 2. Components
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
22
42
|
import { Button } from "test-stpr-ui-kit";
|
|
23
43
|
|
|
24
|
-
const App = () => <Button>⚡️Test STPR UI is very easy to use
|
|
44
|
+
const App = () => <Button>⚡️ Test STPR UI is very easy to use! ⚡️</Button>;
|
|
25
45
|
```
|
|
46
|
+
|
|
47
|
+
Per-component CSS is loaded automatically via ESM side effects — no separate CSS import per component.
|
|
48
|
+
|
|
49
|
+
### 3. Vite + linked package (optional)
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
// consumer vite.config.ts
|
|
53
|
+
export default defineConfig({
|
|
54
|
+
optimizeDeps: {
|
|
55
|
+
exclude: ["test-stpr-ui-kit"],
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Documentation
|
|
61
|
+
|
|
62
|
+
Full guide (tokens, fonts, IFC assets, TypeScript): **Storybook → Documentation → Introduction**.
|
|
63
|
+
|
|
64
|
+
Quick checklist: **Documentation → Cheat sheets → Package usage**.
|
|
65
|
+
|
|
66
|
+
## For library contributors
|
|
67
|
+
|
|
68
|
+
See **CONTRIBUTING.md** (components, stories, `src/test-stpr-ui-kit.ts`, release workflow).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spAccordion_1emom_1{--spui-accordion-name-font-size: 24px;--spui-accordion-name-line-height: 28px}._spAccordion_size-md_1emom_5{--spui-accordion-padding: var(--spui-spacing-4x);--spui-accordion-padding-bottom: var(--spui-spacing-4x);--spui-accordion-gap: var(--spui-spacing-4x)}._spAccordion_size-xl_1emom_10{--spui-accordion-padding: var(--spui-spacing-8x);--spui-accordion-padding-bottom: var(--spui-spacing-8x);--spui-accordion-gap: var(--spui-spacing-8x)}._spAccordion_1emom_1{width:100%;display:flex;flex-direction:column;border:var(--spui-border-width-sm) solid var(--spui-color-border-primary);background-color:var(--spui-color-surface-default);color:var(--spui-color-text-primary);font-family:var(--spui-font-family-main),serif;overflow:hidden;gap:var(--spui-spacing-none);padding:var(--spui-accordion-padding)}._spAccordion_1emom_1{transition:all .2s ease-in-out}._spAccordion_1emom_1{opacity:1;visibility:visible}._spAccordion_1emom_1{transition:all .3s ease-in-out}@starting-style{._spAccordion_1emom_1{opacity:0;visibility:hidden}}._spAccordion_open_1emom_43{overflow:visible;gap:var(--spui-accordion-gap)}._spAccordion_noBorder_1emom_47{border:none}._spAccordion_noPadding_1emom_50{--spui-accordion-padding: var(--spui-spacing-none)}._spAccordion_1emom_1._spAccordion_noBorder_1emom_47{border-bottom:var(--spui-border-width-sm) solid var(--spui-color-border-primary)}._spAccordion_1emom_1._spAccordion_noBorder_1emom_47._spAccordion_noPadding_1emom_50{padding-bottom:var(--spui-accordion-padding-bottom)}._spAccordion__header_1emom_59{display:flex;align-items:flex-start;gap:var(--spui-spacing-2x)}._spAccordion__header_1emom_59{transition:all .3s ease-in-out}._spAccordion__name_1emom_67{width:100%;font-family:var(--spui-font-family-title),serif;font-weight:var(--spui-font-weight-medium);font-size:var(--spui-accordion-name-font-size);line-height:var(--spui-accordion-name-line-height);display:flex;align-items:center;gap:var(--spui-spacing-2x);color:var(--spui-color-text-primary)}._spAccordion__name_1emom_67 ._spAccordion__nameText_1emom_78{cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;font-style:inherit}._spAccordion__name_hiddenExpand_1emom_86 ._spAccordion__nameText_1emom_78{cursor:default;pointer-events:none}._spAccordion__icon_1emom_90{width:var(--spui-icon-size-base);height:var(--spui-icon-size-base);flex-shrink:0;color:var(--spui-color-icon-action);cursor:pointer}._spAccordion__icon_hidden_1emom_97{visibility:hidden}._spAccordion__icon_open_1emom_100{transform:rotateX(.5turn)}._spAccordion__icon_1emom_90{transition:all .3s ease-in-out}._spAccordion__childrenWrapper_1emom_106{display:grid;grid-template-rows:0fr;overflow:hidden}._spAccordion__childrenWrapper_1emom_106{transition-property:"grid-template-rows";transition-duration:.3s;transition-timing-function:ease-in-out}._spAccordion__childrenWrapper_open_1emom_116{grid-template-rows:1fr}._spAccordion__content_1emom_119{min-height:0;opacity:0;visibility:hidden;transition:opacity .2s ease .15s,visibility 0s linear .35s}._spAccordion__content_open_1emom_125{opacity:1;visibility:visible;transition:opacity .2s ease .15s,visibility 0s linear}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import { useState as g } from "react";
|
|
4
|
+
import o from "./Accordion.module.scss.js";
|
|
5
|
+
import { EIconName as j } from "../Icons/types/index.js";
|
|
6
|
+
import { Text as z } from "../Text/Text.js";
|
|
7
|
+
import { InfoTooltip as k } from "../Tooltip/Tooltip.js";
|
|
8
|
+
import { Icon as w } from "../Icons/Icon.js";
|
|
9
|
+
const J = (N) => {
|
|
10
|
+
const {
|
|
11
|
+
name: h,
|
|
12
|
+
children: A,
|
|
13
|
+
defaultOpen: f = !1,
|
|
14
|
+
isHiddenExpandIcon: r = !1,
|
|
15
|
+
onOpen: u,
|
|
16
|
+
noBorder: C = !1,
|
|
17
|
+
noPadding: x = !1,
|
|
18
|
+
size: a = "xl",
|
|
19
|
+
expandIconName: T = j.ChevronDown,
|
|
20
|
+
infoTooltipText: i,
|
|
21
|
+
tooltipPosition: I,
|
|
22
|
+
classNameRoot: t,
|
|
23
|
+
classNameHeader: p,
|
|
24
|
+
classNameTitle: l,
|
|
25
|
+
classNameIcon: d,
|
|
26
|
+
classNameChildrenWrapper: m,
|
|
27
|
+
classNameBaseTooltipRoot: v
|
|
28
|
+
} = N, [e, R] = g(f), _ = () => {
|
|
29
|
+
r || (u?.(!e), R(!e));
|
|
30
|
+
}, B = s({
|
|
31
|
+
[o.spAccordion]: !0,
|
|
32
|
+
[o[`spAccordion_size-${a}`]]: a,
|
|
33
|
+
[o.spAccordion_open]: e,
|
|
34
|
+
[o.spAccordion_noBorder]: C,
|
|
35
|
+
[o.spAccordion_noPadding]: x,
|
|
36
|
+
...t && { [t]: !0 }
|
|
37
|
+
}), W = s({
|
|
38
|
+
[o.spAccordion__header]: !0,
|
|
39
|
+
...p && { [p]: !0 }
|
|
40
|
+
}), H = s({
|
|
41
|
+
[o.spAccordion__name]: !0,
|
|
42
|
+
[o.spAccordion__name_hiddenExpand]: r,
|
|
43
|
+
...l && { [l]: !0 }
|
|
44
|
+
}), E = s({
|
|
45
|
+
[o.spAccordion__icon]: !0,
|
|
46
|
+
[o.spAccordion__icon_open]: e,
|
|
47
|
+
[o.spAccordion__icon_hidden]: r,
|
|
48
|
+
...d && { [d]: !0 }
|
|
49
|
+
}), O = s({
|
|
50
|
+
[o.spAccordion__childrenWrapper]: !0,
|
|
51
|
+
[o.spAccordion__childrenWrapper_open]: e,
|
|
52
|
+
...m && { [m]: !0 }
|
|
53
|
+
}), P = s({
|
|
54
|
+
[o.spAccordion__content]: !0,
|
|
55
|
+
[o.spAccordion__content_open]: e
|
|
56
|
+
});
|
|
57
|
+
return /* @__PURE__ */ c("div", { className: B, children: [
|
|
58
|
+
/* @__PURE__ */ c("div", { className: W, children: [
|
|
59
|
+
/* @__PURE__ */ c("div", { className: H, children: [
|
|
60
|
+
/* @__PURE__ */ n(z, { classNameRoot: o.spAccordion__nameText, onClick: _, children: h }),
|
|
61
|
+
i && /* @__PURE__ */ n(
|
|
62
|
+
k,
|
|
63
|
+
{
|
|
64
|
+
hover: !0,
|
|
65
|
+
position: I,
|
|
66
|
+
text: i,
|
|
67
|
+
classNameBaseTooltipRoot: v
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ n(w, { onClick: _, className: E, name: T })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ n("div", { className: O, children: /* @__PURE__ */ n("div", { className: P, children: A }) })
|
|
74
|
+
] });
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
J as Accordion
|
|
78
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import './Accordion.css';const o = "_spAccordion_1emom_1", _ = "_spAccordion_open_1emom_43", c = "_spAccordion_noBorder_1emom_47", n = "_spAccordion_noPadding_1emom_50", d = "_spAccordion__header_1emom_59", e = "_spAccordion__name_1emom_67", i = "_spAccordion__nameText_1emom_78", p = "_spAccordion__name_hiddenExpand_1emom_86", r = "_spAccordion__icon_1emom_90", s = "_spAccordion__icon_hidden_1emom_97", A = "_spAccordion__icon_open_1emom_100", m = "_spAccordion__childrenWrapper_1emom_106", t = "_spAccordion__childrenWrapper_open_1emom_116", a = "_spAccordion__content_1emom_119", h = "_spAccordion__content_open_1emom_125", l = {
|
|
2
|
+
spAccordion: o,
|
|
3
|
+
"spAccordion_size-md": "_spAccordion_size-md_1emom_5",
|
|
4
|
+
"spAccordion_size-xl": "_spAccordion_size-xl_1emom_10",
|
|
5
|
+
spAccordion_open: _,
|
|
6
|
+
spAccordion_noBorder: c,
|
|
7
|
+
spAccordion_noPadding: n,
|
|
8
|
+
spAccordion__header: d,
|
|
9
|
+
spAccordion__name: e,
|
|
10
|
+
spAccordion__nameText: i,
|
|
11
|
+
spAccordion__name_hiddenExpand: p,
|
|
12
|
+
spAccordion__icon: r,
|
|
13
|
+
spAccordion__icon_hidden: s,
|
|
14
|
+
spAccordion__icon_open: A,
|
|
15
|
+
spAccordion__childrenWrapper: m,
|
|
16
|
+
spAccordion__childrenWrapper_open: t,
|
|
17
|
+
spAccordion__content: a,
|
|
18
|
+
spAccordion__content_open: h
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
l as default,
|
|
22
|
+
o as spAccordion,
|
|
23
|
+
m as spAccordion__childrenWrapper,
|
|
24
|
+
t as spAccordion__childrenWrapper_open,
|
|
25
|
+
a as spAccordion__content,
|
|
26
|
+
h as spAccordion__content_open,
|
|
27
|
+
d as spAccordion__header,
|
|
28
|
+
r as spAccordion__icon,
|
|
29
|
+
s as spAccordion__icon_hidden,
|
|
30
|
+
A as spAccordion__icon_open,
|
|
31
|
+
e as spAccordion__name,
|
|
32
|
+
i as spAccordion__nameText,
|
|
33
|
+
p as spAccordion__name_hiddenExpand,
|
|
34
|
+
c as spAccordion_noBorder,
|
|
35
|
+
n as spAccordion_noPadding,
|
|
36
|
+
_ as spAccordion_open
|
|
37
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { EIconName } from "../../Icons";
|
|
3
|
+
import { ETooltipPosition } from "../../Tooltip";
|
|
4
|
+
export type TAccordionSize = "md" | "xl";
|
|
5
|
+
export interface AccordionProps extends React.PropsWithChildren {
|
|
6
|
+
name?: string;
|
|
7
|
+
onOpen?: (open: boolean) => void;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
isHiddenExpandIcon?: boolean;
|
|
10
|
+
noBorder?: boolean;
|
|
11
|
+
noPadding?: boolean;
|
|
12
|
+
classNameRoot?: string;
|
|
13
|
+
classNameHeader?: string;
|
|
14
|
+
classNameTitle?: string;
|
|
15
|
+
classNameIcon?: string;
|
|
16
|
+
classNameChildrenWrapper?: string;
|
|
17
|
+
expandIconName?: EIconName;
|
|
18
|
+
size?: TAccordionSize;
|
|
19
|
+
infoTooltipText?: string;
|
|
20
|
+
tooltipPosition?: ETooltipPosition;
|
|
21
|
+
classNameBaseTooltipRoot?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spApplyButtons_go5we_1{display:inline-flex;align-items:center;gap:var(--spui-spacing-3x)}._spApplyButtons_align-right_go5we_6{justify-content:flex-end}._spApplyButtons_align-left_go5we_9{justify-content:flex-start}._spApplyButtons_align-center_go5we_12{justify-content:center}._spApplyButtons_mobile-column_go5we_15{flex-direction:column}@media only screen and (min-width:768px){._spApplyButtons_mobile-column_go5we_15{flex-direction:row}}._spApplyButtons_mobile-column-reverse_go5we_23{flex-direction:column-reverse}@media only screen and (min-width:768px){._spApplyButtons_mobile-column-reverse_go5we_23{flex-direction:row}}._spApplyButtons__cancel_go5we_31,._spApplyButtons__submit_go5we_34{width:auto}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as x, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import t from "./ApplyButtons.module.scss.js";
|
|
4
|
+
import { Button as p } from "../Button/Button.js";
|
|
5
|
+
const D = (u) => {
|
|
6
|
+
const {
|
|
7
|
+
classNameRoot: n,
|
|
8
|
+
applyButtonsMobileDirection: o = "column",
|
|
9
|
+
applyButtonsAlign: a = "center",
|
|
10
|
+
cancelBtnContent: B = "Отменить",
|
|
11
|
+
cancelBtnIconName: N,
|
|
12
|
+
submitBtnIconName: b,
|
|
13
|
+
cancelBtnDisabled: d,
|
|
14
|
+
submitBtnContent: y = "Подтвердить",
|
|
15
|
+
formId: e,
|
|
16
|
+
disabled: C,
|
|
17
|
+
onClose: l,
|
|
18
|
+
submit: c,
|
|
19
|
+
loading: A,
|
|
20
|
+
cancelBtnVariant: f = "secondary",
|
|
21
|
+
submitBtnVariant: _ = "primary",
|
|
22
|
+
cancelBtnClassName: m,
|
|
23
|
+
submitBtnClassName: r
|
|
24
|
+
} = u, I = s({
|
|
25
|
+
[t.spApplyButtons]: !0,
|
|
26
|
+
[t[`spApplyButtons_mobile-${o}`]]: o,
|
|
27
|
+
[t[`spApplyButtons_align-${a}`]]: a,
|
|
28
|
+
...n && { [n]: !0 }
|
|
29
|
+
}), R = s({
|
|
30
|
+
[t.spApplyButtons__submit]: !0,
|
|
31
|
+
...r && { [r]: !0 }
|
|
32
|
+
}), v = s({
|
|
33
|
+
[t.spApplyButtons__cancel]: !0,
|
|
34
|
+
...m && { [m]: !0 }
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ x("div", { className: I, children: [
|
|
37
|
+
l && /* @__PURE__ */ i(
|
|
38
|
+
p,
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
variant: f,
|
|
42
|
+
startIconName: N,
|
|
43
|
+
classNameRoot: v,
|
|
44
|
+
disabled: d,
|
|
45
|
+
onClick: l,
|
|
46
|
+
children: B
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
c && /* @__PURE__ */ i(
|
|
50
|
+
p,
|
|
51
|
+
{
|
|
52
|
+
type: "submit",
|
|
53
|
+
variant: _,
|
|
54
|
+
startIconName: b,
|
|
55
|
+
classNameRoot: R,
|
|
56
|
+
form: e || void 0,
|
|
57
|
+
disabled: C,
|
|
58
|
+
onClick: c,
|
|
59
|
+
loading: A,
|
|
60
|
+
children: y
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] });
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
D as ApplyButtons
|
|
67
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './ApplyButtons.css';const p = "_spApplyButtons_go5we_1", t = "_spApplyButtons__cancel_go5we_31", s = "_spApplyButtons__submit_go5we_34", _ = {
|
|
2
|
+
spApplyButtons: p,
|
|
3
|
+
"spApplyButtons_align-right": "_spApplyButtons_align-right_go5we_6",
|
|
4
|
+
"spApplyButtons_align-left": "_spApplyButtons_align-left_go5we_9",
|
|
5
|
+
"spApplyButtons_align-center": "_spApplyButtons_align-center_go5we_12",
|
|
6
|
+
"spApplyButtons_mobile-column": "_spApplyButtons_mobile-column_go5we_15",
|
|
7
|
+
"spApplyButtons_mobile-column-reverse": "_spApplyButtons_mobile-column-reverse_go5we_23",
|
|
8
|
+
spApplyButtons__cancel: t,
|
|
9
|
+
spApplyButtons__submit: s
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
_ as default,
|
|
13
|
+
p as spApplyButtons,
|
|
14
|
+
t as spApplyButtons__cancel,
|
|
15
|
+
s as spApplyButtons__submit
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TButtonVariant } from "../../Button";
|
|
3
|
+
import { EIconName } from "../../Icons";
|
|
4
|
+
export type TApplyButtonsMobileDirection = "row" | "column" | "column-reverse";
|
|
5
|
+
export type TApplyButtonsAlign = "left" | "center" | "right";
|
|
6
|
+
export interface ApplyButtonsProps {
|
|
7
|
+
applyButtonsMobileDirection?: TApplyButtonsMobileDirection;
|
|
8
|
+
applyButtonsAlign?: TApplyButtonsAlign;
|
|
9
|
+
cancelBtnContent?: string;
|
|
10
|
+
classNameRoot?: string;
|
|
11
|
+
cancelBtnClassName?: string;
|
|
12
|
+
submitBtnClassName?: string;
|
|
13
|
+
cancelBtnVariant?: TButtonVariant;
|
|
14
|
+
cancelBtnIconName?: EIconName;
|
|
15
|
+
submitBtnIconName?: EIconName;
|
|
16
|
+
submitBtnContent?: string;
|
|
17
|
+
submitBtnVariant?: TButtonVariant;
|
|
18
|
+
cancelBtnDisabled?: boolean;
|
|
19
|
+
formId?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
23
|
+
submit?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as l, Fragment as c, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useEffect as f } from "react";
|
|
3
|
+
import { Confirm as A } from "../Confirm/Confirm.js";
|
|
4
|
+
const g = (o) => {
|
|
5
|
+
const {
|
|
6
|
+
children: i,
|
|
7
|
+
isNeedAuthorized: t,
|
|
8
|
+
onClickAuthorization: n,
|
|
9
|
+
unauthorizedMessage: r = "Необходимо авторизоваться",
|
|
10
|
+
authButtonText: s = "Авторизоваться",
|
|
11
|
+
confirmSize: u = "md",
|
|
12
|
+
zIndex: a = 999
|
|
13
|
+
} = o, [h, e] = m(t);
|
|
14
|
+
return f(() => {
|
|
15
|
+
e(t);
|
|
16
|
+
}, [t]), /* @__PURE__ */ l(c, { children: [
|
|
17
|
+
i,
|
|
18
|
+
h && /* @__PURE__ */ d(
|
|
19
|
+
A,
|
|
20
|
+
{
|
|
21
|
+
zIndex: a,
|
|
22
|
+
isVisibleCloseButton: !1,
|
|
23
|
+
textAlign: "center",
|
|
24
|
+
applyButtonsAlign: "center",
|
|
25
|
+
header: r,
|
|
26
|
+
submitBtnContent: s,
|
|
27
|
+
size: u,
|
|
28
|
+
submit: () => {
|
|
29
|
+
e(!1), n?.();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
g as AuthProtected
|
|
37
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TModalSize } from "../../Modal/types";
|
|
3
|
+
export interface AuthProtectedProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
isNeedAuthorized: boolean;
|
|
6
|
+
onClickAuthorization?: () => void;
|
|
7
|
+
unauthorizedMessage?: string;
|
|
8
|
+
authButtonText?: string;
|
|
9
|
+
confirmSize?: TModalSize;
|
|
10
|
+
zIndex?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spBaseTooltip_mqyqv_1{background-color:var(--spui-color-surface-default);box-shadow:0 10px 45px 0 var(--spui-color-gray-300);width:max-content;max-width:300px;position:absolute;min-width:160px;z-index:199;overflow-y:auto}._spBaseTooltip_mqyqv_1::-webkit-scrollbar{width:var(--spui-scrollbar-width);height:var(--spui-scrollbar-width)}._spBaseTooltip_mqyqv_1::-webkit-scrollbar-track{background:var(--spui-color-surface-transparent)}._spBaseTooltip_mqyqv_1::-webkit-scrollbar-thumb{background:var(--color-aqua-blue)}._spBaseTooltip_mqyqv_1::-webkit-scrollbar-thumb:hover{background:var(--color-accent-blue)}._spBaseTooltip_mqyqv_1,._spBaseTooltip_mqyqv_1 *{box-sizing:border-box}._spBaseTooltip_mqyqv_1{transition:all .2s ease-in-out}._spBaseTooltip_mqyqv_1{opacity:1;visibility:visible}._spBaseTooltip_mqyqv_1{transition:all .3s ease-in-out}@starting-style{._spBaseTooltip_mqyqv_1{opacity:0;visibility:hidden}}._spBaseTooltip_noPadding_mqyqv_43{padding:var(--spui-spacing-none)}@media only screen and (min-width:768px){._spBaseTooltip_mqyqv_1{max-width:450px}}@media only screen and (min-width:1440px){._spBaseTooltip_mqyqv_1{max-width:600px}}._spBaseTooltip_mqyqv_1:not(._spBaseTooltip_noPadding_mqyqv_43){padding:var(--spui-spacing-3x)}@media only screen and (min-width:768px){._spBaseTooltip_mqyqv_1:not(._spBaseTooltip_noPadding_mqyqv_43){padding:var(--spui-spacing-5x)}}@media only screen and (min-width:1440px){._spBaseTooltip_mqyqv_1:not(._spBaseTooltip_noPadding_mqyqv_43){padding:var(--spui-spacing-3x)}}._spBaseTooltip__content_mqyqv_69{font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-medium);color:var(--spui-color-text-primary);font-size:14px;white-space:pre-line}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import a from "clsx";
|
|
3
|
+
import d from "react";
|
|
4
|
+
import o from "./BaseTooltip.module.scss.js";
|
|
5
|
+
const N = d.forwardRef((r, l) => {
|
|
6
|
+
const {
|
|
7
|
+
text: n,
|
|
8
|
+
noPadding: p = !1,
|
|
9
|
+
style: m,
|
|
10
|
+
classNameRoot: t,
|
|
11
|
+
classNameContentRoot: s
|
|
12
|
+
} = r, i = a({
|
|
13
|
+
[o.spBaseTooltip]: !0,
|
|
14
|
+
[o.spBaseTooltip_noPadding]: p,
|
|
15
|
+
...t && { [t]: !0 }
|
|
16
|
+
}), c = a({
|
|
17
|
+
[o.spBaseTooltip__content]: !0,
|
|
18
|
+
...s && { [s]: !0 }
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ e("div", { className: i, ref: l, style: m, children: /* @__PURE__ */ e("div", { className: c, children: n }) });
|
|
21
|
+
});
|
|
22
|
+
N.displayName = "BaseTooltip";
|
|
23
|
+
export {
|
|
24
|
+
N as BaseTooltip
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './BaseTooltip.css';const o = "_spBaseTooltip_mqyqv_1", s = "_spBaseTooltip_noPadding_mqyqv_43", t = "_spBaseTooltip__content_mqyqv_69", p = {
|
|
2
|
+
spBaseTooltip: o,
|
|
3
|
+
spBaseTooltip_noPadding: s,
|
|
4
|
+
spBaseTooltip__content: t
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
p as default,
|
|
8
|
+
o as spBaseTooltip,
|
|
9
|
+
t as spBaseTooltip__content,
|
|
10
|
+
s as spBaseTooltip_noPadding
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spBreadcrumb_10fj1_1{display:block}._spBreadcrumb_10fj1_1{opacity:1;visibility:visible}._spBreadcrumb_10fj1_1{transition:all .3s ease-in-out}@starting-style{._spBreadcrumb_10fj1_1{opacity:0;visibility:hidden}}._spBreadcrumb__list_10fj1_17{display:flex;align-items:center;gap:var(--spui-spacing-1x);flex-direction:row;flex-wrap:wrap;font-family:var(--spui-font-family-main),serif;list-style:none;margin:var(--spui-scale-0, 0);padding:var(--spui-scale-0, 0)}._spBreadcrumb__listItem_10fj1_28{display:flex;align-items:center;flex-direction:row;gap:var(--spui-spacing-1x)}._spBreadcrumb__listItem_10fj1_28:last-child ._spBreadcrumb__listItem__separator_10fj1_34{display:none}._spBreadcrumb__listItem__separator_10fj1_34{color:var(--spui-color-text-primary);flex-shrink:0;width:var(--spui-scale-4x);height:var(--spui-scale-4x)}._spBreadcrumb__listItem__text_10fj1_43{color:var(--spui-color-text-secondary);cursor:pointer;font-size:13px;line-height:130%}@media only screen and (min-width:768px){._spBreadcrumb__listItem__text_10fj1_43{font-size:16px}}._spBreadcrumb__listItem_active_10fj1_54 ._spBreadcrumb__listItem__text_10fj1_43{color:var(--spui-color-text-primary)}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import e from "clsx";
|
|
3
|
+
import s from "./Breadcrumb.module.scss.js";
|
|
4
|
+
import { Icon as N } from "../Icons/Icon.js";
|
|
5
|
+
import { EIconName as b } from "../Icons/types/index.js";
|
|
6
|
+
const x = (o) => {
|
|
7
|
+
const {
|
|
8
|
+
classNameRoot: t,
|
|
9
|
+
classNameListRoot: a,
|
|
10
|
+
crumbsList: c = []
|
|
11
|
+
} = o, l = e({
|
|
12
|
+
[s.spBreadcrumb]: !0,
|
|
13
|
+
...t && { [t]: !0 }
|
|
14
|
+
}), i = e({
|
|
15
|
+
[s.spBreadcrumb__list]: !0,
|
|
16
|
+
...a && { [a]: !0 }
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ r("nav", { "aria-label": "breadcrumb", className: l, children: /* @__PURE__ */ r("ol", { className: i, children: c.map(({ text: m, onClick: n, active: p, visible: u }, _) => u === !1 ? null : /* @__PURE__ */ d(
|
|
19
|
+
"li",
|
|
20
|
+
{
|
|
21
|
+
className: e(
|
|
22
|
+
s.spBreadcrumb__listItem,
|
|
23
|
+
p && s.spBreadcrumb__listItem_active
|
|
24
|
+
),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r("span", { title: m, className: s.spBreadcrumb__listItem__text, onClick: n, children: m }),
|
|
27
|
+
/* @__PURE__ */ r(
|
|
28
|
+
N,
|
|
29
|
+
{
|
|
30
|
+
name: b.SelectChevronDown,
|
|
31
|
+
rotate: -90,
|
|
32
|
+
className: s.spBreadcrumb__listItem__separator
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
_
|
|
38
|
+
)) }) });
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
x as Breadcrumb
|
|
42
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './Breadcrumb.css';const _ = "_spBreadcrumb_10fj1_1", t = "_spBreadcrumb__list_10fj1_17", s = "_spBreadcrumb__listItem_10fj1_28", r = "_spBreadcrumb__listItem__separator_10fj1_34", e = "_spBreadcrumb__listItem__text_10fj1_43", m = "_spBreadcrumb__listItem_active_10fj1_54", a = {
|
|
2
|
+
spBreadcrumb: _,
|
|
3
|
+
spBreadcrumb__list: t,
|
|
4
|
+
spBreadcrumb__listItem: s,
|
|
5
|
+
spBreadcrumb__listItem__separator: r,
|
|
6
|
+
spBreadcrumb__listItem__text: e,
|
|
7
|
+
spBreadcrumb__listItem_active: m
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
a as default,
|
|
11
|
+
_ as spBreadcrumb,
|
|
12
|
+
t as spBreadcrumb__list,
|
|
13
|
+
s as spBreadcrumb__listItem,
|
|
14
|
+
r as spBreadcrumb__listItem__separator,
|
|
15
|
+
e as spBreadcrumb__listItem__text,
|
|
16
|
+
m as spBreadcrumb__listItem_active
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spButton_18oju_1{display:flex;justify-content:center;align-items:center;gap:var(--spui-spacing-2x);border:none;outline:none;cursor:pointer;height:var(--spui-control-height-xl);padding:var(--spui-spacing-none) var(--spui-spacing-8x);background-color:var(--spui-color-surface-action);color:var(--spui-color-text-on-action)}._spButton_18oju_1{transition:all .2s ease-in-out}._spButton_18oju_1{opacity:1;visibility:visible}._spButton_18oju_1{transition:all .3s ease-in-out}@starting-style{._spButton_18oju_1{opacity:0;visibility:hidden}}._spButton_size-md_18oju_30{height:var(--spui-control-height-md);padding:var(--spui-spacing-none) var(--spui-spacing-6x)}._spButton_size-md_18oju_30 ._spButton__text_18oju_34{font-size:var(--spui-button-font-size-md, 16px);line-height:20px}._spButton_size-xl_18oju_38{height:var(--spui-control-height-xl);padding:var(--spui-spacing-none) var(--spui-spacing-8x)}._spButton_size-xl_18oju_38 ._spButton__text_18oju_34{font-size:var(--spui-button-font-size-xl, 18px);line-height:24px}._spButton_noPadding_18oju_46{padding:var(--spui-spacing-none);height:fit-content}._spButton_onlyIcon_18oju_50:not(._spButton_noPadding_18oju_46){padding:var(--spui-spacing-none);width:var(--spui-control-height-xl);min-width:var(--spui-control-height-xl)}._spButton_size-md_18oju_30._spButton_onlyIcon_18oju_50:not(._spButton_noPadding_18oju_46){width:var(--spui-control-height-md);min-width:var(--spui-control-height-md)}._spButton_primary_18oju_59{background-color:var(--spui-color-surface-action);color:var(--spui-color-text-on-action)}._spButton_primary_18oju_59:hover{background-color:var(--spui-color-surface-action-hover)}._spButton_primary_18oju_59:focus-visible,._spButton_primary_18oju_59:active{background-color:var(--spui-color-surface-action-active)}._spButton_secondary_18oju_69{background-color:var(--spui-color-surface-secondary);color:var(--spui-color-text-action)}._spButton_secondary_18oju_69:hover{background-color:var(--spui-color-surface-secondary-hover)}._spButton_secondary_18oju_69:focus-visible,._spButton_secondary_18oju_69:active{background-color:var(--spui-color-surface-secondary-active)}._spButton_text_18oju_79{background-color:var(--spui-color-surface-transparent);color:var(--spui-color-text-action)}._spButton_text_18oju_79:hover{background-color:var(--spui-color-surface-secondary-hover)}._spButton_text_18oju_79:focus-visible,._spButton_text_18oju_79:active{background-color:var(--spui-color-surface-secondary-active)}._spButton_link_18oju_89{background-color:var(--spui-color-surface-transparent);color:var(--spui-color-text-action)}._spButton_link_18oju_89:hover{color:var(--spui-color-text-action-hover)}._spButton_link_18oju_89:hover ._spButton__text_18oju_34{text-decoration:underline}._spButton_link_18oju_89:focus-visible,._spButton_link_18oju_89:active{color:var(--spui-color-text-action-active)}._spButton_fullWidth_18oju_102{width:100%}._spButton_disabled_18oju_105{pointer-events:none;cursor:default;color:var(--spui-color-text-disabled)!important}._spButton_disabled_18oju_105:not(._spButton_link_18oju_89){background-color:var(--spui-color-surface-disabled)!important}._spButton_disabled_18oju_105._spButton_link_18oju_89,._spButton_disabled_18oju_105._spButton_text_18oju_79{background-color:transparent!important}._spButton__spinner_18oju_116{color:currentColor!important}._spButton__text_18oju_34{color:currentColor;font-family:var(--spui-font-family-main),serif;font-weight:var(--spui-font-weight-medium);text-decoration:none}._spButton__iconContainer_18oju_125{display:flex}._spButton__iconContainer__icon_18oju_128{width:var(--spui-icon-size-base);height:var(--spui-icon-size-base);flex-shrink:0}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as n, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import r from "clsx";
|
|
3
|
+
import F from "react";
|
|
4
|
+
import t from "./Button.module.scss.js";
|
|
5
|
+
import { Spinner as P } from "../Spinner/Spinner.js";
|
|
6
|
+
import { Icon as W } from "../Icons/Icon.js";
|
|
7
|
+
const D = (N) => {
|
|
8
|
+
const {
|
|
9
|
+
variant: l = "primary",
|
|
10
|
+
size: c = "xl",
|
|
11
|
+
style: I,
|
|
12
|
+
onClick: R,
|
|
13
|
+
startIconName: i,
|
|
14
|
+
endIconName: d,
|
|
15
|
+
startIconRotate: h = 0,
|
|
16
|
+
endIconRotate: x = 0,
|
|
17
|
+
disabled: e = !1,
|
|
18
|
+
type: C = "button",
|
|
19
|
+
form: g,
|
|
20
|
+
children: m,
|
|
21
|
+
loading: u = !1,
|
|
22
|
+
isFullWidth: v = !1,
|
|
23
|
+
isOnlyIcon: s = !1,
|
|
24
|
+
noPadding: y = !1,
|
|
25
|
+
classNameRoot: p,
|
|
26
|
+
classNameTextRoot: _
|
|
27
|
+
} = N, b = (o) => {
|
|
28
|
+
e || R?.(o);
|
|
29
|
+
}, f = r({
|
|
30
|
+
[t.spButton__iconContainer]: !0
|
|
31
|
+
}), k = r({
|
|
32
|
+
[t.spButton__text]: !0,
|
|
33
|
+
..._ && { [_]: !0 }
|
|
34
|
+
}), z = () => /* @__PURE__ */ n("div", { className: f, children: /* @__PURE__ */ n(P, { size: "md", classNameRoot: t.spButton__spinner }) }), B = (o, a) => o ? /* @__PURE__ */ n("div", { className: f, children: /* @__PURE__ */ n(
|
|
35
|
+
W,
|
|
36
|
+
{
|
|
37
|
+
name: o,
|
|
38
|
+
rotate: a,
|
|
39
|
+
className: t.spButton__iconContainer__icon
|
|
40
|
+
}
|
|
41
|
+
) }) : null, S = () => {
|
|
42
|
+
const o = !!i, a = !s && !!d;
|
|
43
|
+
return /* @__PURE__ */ j(F.Fragment, { children: [
|
|
44
|
+
u ? z() : B(o ? i : void 0, h),
|
|
45
|
+
!s && m && /* @__PURE__ */ n("div", { className: k, children: m }),
|
|
46
|
+
B(a ? d : void 0, x)
|
|
47
|
+
] });
|
|
48
|
+
}, T = r({
|
|
49
|
+
[t.spButton]: !0,
|
|
50
|
+
[t[`spButton_size-${c}`]]: c,
|
|
51
|
+
[t.spButton_noPadding]: y,
|
|
52
|
+
[t.spButton_onlyIcon]: s,
|
|
53
|
+
[t[`spButton_${l}`]]: l,
|
|
54
|
+
[t.spButton_fullWidth]: v,
|
|
55
|
+
[t.spButton_disabled]: e,
|
|
56
|
+
[t.spButton_loading]: u,
|
|
57
|
+
...p && { [p]: !0 }
|
|
58
|
+
});
|
|
59
|
+
return /* @__PURE__ */ n(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
style: I,
|
|
63
|
+
className: T,
|
|
64
|
+
onClick: b,
|
|
65
|
+
disabled: e,
|
|
66
|
+
type: C,
|
|
67
|
+
form: g,
|
|
68
|
+
children: S()
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
D as Button
|
|
74
|
+
};
|