@ds-mo/ui 0.2.4 → 0.4.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/dist/components/ds-accordion.d.ts +11 -0
- package/dist/components/ds-accordion.js +2 -0
- package/dist/components/ds-accordion.js.map +1 -0
- package/dist/components/ds-badge.d.ts +11 -0
- package/dist/components/ds-badge.js +2 -0
- package/dist/components/ds-badge.js.map +1 -0
- package/dist/components/ds-banner.d.ts +11 -0
- package/dist/components/ds-banner.js +2 -0
- package/dist/components/ds-banner.js.map +1 -0
- package/dist/components/ds-breadcrumb.d.ts +11 -0
- package/dist/components/ds-breadcrumb.js +2 -0
- package/dist/components/ds-breadcrumb.js.map +1 -0
- package/dist/components/ds-button.d.ts +11 -0
- package/dist/components/ds-button.js +2 -0
- package/dist/components/ds-button.js.map +1 -0
- package/dist/components/ds-card.d.ts +11 -0
- package/dist/components/ds-card.js +2 -0
- package/dist/components/ds-card.js.map +1 -0
- package/dist/components/ds-checkbox.d.ts +11 -0
- package/dist/components/ds-checkbox.js +2 -0
- package/dist/components/ds-checkbox.js.map +1 -0
- package/dist/components/ds-divider.d.ts +11 -0
- package/dist/components/ds-divider.js +2 -0
- package/dist/components/ds-divider.js.map +1 -0
- package/dist/components/ds-empty-state.d.ts +11 -0
- package/dist/components/ds-empty-state.js +2 -0
- package/dist/components/ds-empty-state.js.map +1 -0
- package/dist/components/ds-fade.d.ts +11 -0
- package/dist/components/ds-fade.js +2 -0
- package/dist/components/ds-fade.js.map +1 -0
- package/dist/components/ds-field.d.ts +11 -0
- package/dist/components/ds-field.js +2 -0
- package/dist/components/ds-field.js.map +1 -0
- package/dist/components/ds-header.d.ts +11 -0
- package/dist/components/ds-header.js +2 -0
- package/dist/components/ds-header.js.map +1 -0
- package/dist/components/ds-input.d.ts +11 -0
- package/dist/components/ds-input.js +2 -0
- package/dist/components/ds-input.js.map +1 -0
- package/dist/components/ds-loader.d.ts +11 -0
- package/dist/components/ds-loader.js +2 -0
- package/dist/components/ds-loader.js.map +1 -0
- package/dist/components/ds-menu.d.ts +11 -0
- package/dist/components/ds-menu.js +2 -0
- package/dist/components/ds-menu.js.map +1 -0
- package/dist/components/ds-modal.d.ts +11 -0
- package/dist/components/ds-modal.js +2 -0
- package/dist/components/ds-modal.js.map +1 -0
- package/dist/components/ds-pagination.d.ts +11 -0
- package/dist/components/ds-pagination.js +2 -0
- package/dist/components/ds-pagination.js.map +1 -0
- package/dist/components/ds-radio-group.d.ts +11 -0
- package/dist/components/ds-radio-group.js +2 -0
- package/dist/components/ds-radio-group.js.map +1 -0
- package/dist/components/ds-scrollbar.d.ts +11 -0
- package/dist/components/ds-scrollbar.js +2 -0
- package/dist/components/ds-scrollbar.js.map +1 -0
- package/dist/components/ds-sidebar.d.ts +11 -0
- package/dist/components/ds-sidebar.js +2 -0
- package/dist/components/ds-sidebar.js.map +1 -0
- package/dist/components/ds-skeleton.d.ts +11 -0
- package/dist/components/ds-skeleton.js +2 -0
- package/dist/components/ds-skeleton.js.map +1 -0
- package/dist/components/ds-slider.d.ts +11 -0
- package/dist/components/ds-slider.js +2 -0
- package/dist/components/ds-slider.js.map +1 -0
- package/dist/components/ds-surface.d.ts +11 -0
- package/dist/components/ds-surface.js +2 -0
- package/dist/components/ds-surface.js.map +1 -0
- package/dist/components/ds-tab-group.d.ts +11 -0
- package/dist/components/ds-tab-group.js +2 -0
- package/dist/components/ds-tab-group.js.map +1 -0
- package/dist/components/ds-table.d.ts +11 -0
- package/dist/components/ds-table.js +2 -0
- package/dist/components/ds-table.js.map +1 -0
- package/dist/components/ds-tag.d.ts +11 -0
- package/dist/components/ds-tag.js +2 -0
- package/dist/components/ds-tag.js.map +1 -0
- package/dist/components/ds-text.d.ts +11 -0
- package/dist/components/ds-text.js +2 -0
- package/dist/components/ds-text.js.map +1 -0
- package/dist/components/ds-toast-provider.d.ts +11 -0
- package/dist/components/ds-toast-provider.js +2 -0
- package/dist/components/ds-toast-provider.js.map +1 -0
- package/dist/components/ds-toggle.d.ts +11 -0
- package/dist/components/ds-toggle.js +2 -0
- package/dist/components/ds-toggle.js.map +1 -0
- package/dist/components/ds-tooltip.d.ts +11 -0
- package/dist/components/ds-tooltip.js +2 -0
- package/dist/components/ds-tooltip.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/p-BcuUR5Ao.js +2 -0
- package/dist/components/p-BcuUR5Ao.js.map +1 -0
- package/dist/types/.stencil/Accordion/Accordion.d.ts +28 -0
- package/dist/types/.stencil/Badge/Badge.d.ts +8 -0
- package/dist/types/.stencil/Badge/index.d.ts +2 -0
- package/dist/types/.stencil/Banner/Banner.d.ts +29 -0
- package/dist/types/.stencil/Breadcrumb/Breadcrumb.d.ts +16 -0
- package/dist/types/.stencil/Button/Button.d.ts +38 -0
- package/dist/types/.stencil/Button/index.d.ts +2 -0
- package/dist/types/.stencil/Card/Card.d.ts +8 -0
- package/dist/types/.stencil/Checkbox/Checkbox.d.ts +13 -0
- package/dist/types/.stencil/Checkbox/index.d.ts +2 -0
- package/dist/types/.stencil/Divider/Divider.d.ts +7 -0
- package/dist/types/.stencil/Divider/index.d.ts +2 -0
- package/dist/types/.stencil/EmptyState/EmptyState.d.ts +7 -0
- package/dist/types/.stencil/Fade/Fade.d.ts +10 -0
- package/dist/types/.stencil/Fade/index.d.ts +2 -0
- package/dist/types/.stencil/Field/Field.d.ts +8 -0
- package/dist/types/.stencil/Header/Header.d.ts +7 -0
- package/dist/types/.stencil/Input/Input.d.ts +26 -0
- package/dist/types/.stencil/Input/index.d.ts +2 -0
- package/dist/types/.stencil/Loader/Loader.d.ts +12 -0
- package/dist/types/.stencil/Loader/index.d.ts +2 -0
- package/dist/types/.stencil/Menu/Menu.d.ts +60 -0
- package/dist/types/.stencil/Modal/Modal.d.ts +31 -0
- package/dist/types/.stencil/Pagination/Pagination.d.ts +11 -0
- package/dist/types/.stencil/RadioGroup/RadioGroup.d.ts +21 -0
- package/dist/types/.stencil/RadioGroup/index.d.ts +2 -0
- package/dist/types/.stencil/Scrollbar/Scrollbar.d.ts +27 -0
- package/dist/types/.stencil/Sidebar/Sidebar.d.ts +29 -0
- package/dist/types/.stencil/Skeleton/Skeleton.d.ts +16 -0
- package/dist/types/.stencil/Skeleton/index.d.ts +2 -0
- package/dist/types/.stencil/Slider/Slider.d.ts +18 -0
- package/dist/types/.stencil/Slider/index.d.ts +2 -0
- package/dist/types/.stencil/Surface/Surface.d.ts +22 -0
- package/dist/types/.stencil/TabGroup/TabGroup.d.ts +29 -0
- package/dist/types/.stencil/Table/Table.d.ts +50 -0
- package/dist/types/.stencil/Tag/Tag.d.ts +32 -0
- package/dist/types/.stencil/Tag/index.d.ts +2 -0
- package/dist/types/.stencil/Text/Text.d.ts +22 -0
- package/dist/types/.stencil/Text/index.d.ts +2 -0
- package/dist/types/.stencil/Toast/Toast.d.ts +15 -0
- package/dist/types/.stencil/Toast/toast-service.d.ts +24 -0
- package/dist/types/.stencil/Toggle/Toggle.d.ts +10 -0
- package/dist/types/.stencil/Toggle/index.d.ts +2 -0
- package/dist/types/.stencil/Tooltip/Tooltip.d.ts +36 -0
- package/dist/types/components.d.ts +2024 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/package.json +33 -29
- package/src/angular/angular-component-lib/utils.ts +65 -0
- package/src/angular/index.ts +35 -0
- package/src/angular/proxies.ts +819 -0
- package/dist/index.css +0 -2
- package/dist/index.d.ts +0 -969
- package/dist/index.js +0 -2492
- package/dist/index.js.map +0 -1
- package/dist/r/accordion.json +0 -79
- package/dist/r/badge.json +0 -69
- package/dist/r/banner.json +0 -90
- package/dist/r/breadcrumb.json +0 -70
- package/dist/r/button-group.json +0 -65
- package/dist/r/button.json +0 -137
- package/dist/r/card.json +0 -82
- package/dist/r/checkbox.json +0 -91
- package/dist/r/divider.json +0 -57
- package/dist/r/empty-state.json +0 -69
- package/dist/r/error-boundary.json +0 -66
- package/dist/r/fade.json +0 -65
- package/dist/r/field.json +0 -71
- package/dist/r/header.json +0 -67
- package/dist/r/input.json +0 -77
- package/dist/r/loader.json +0 -54
- package/dist/r/menu.json +0 -130
- package/dist/r/modal.json +0 -93
- package/dist/r/pagination.json +0 -80
- package/dist/r/radio.json +0 -85
- package/dist/r/registry.json +0 -1600
- package/dist/r/scrollbar.json +0 -68
- package/dist/r/select.json +0 -93
- package/dist/r/sidebar.json +0 -105
- package/dist/r/skeleton.json +0 -72
- package/dist/r/slider.json +0 -87
- package/dist/r/surface.json +0 -97
- package/dist/r/tab-group.json +0 -72
- package/dist/r/tab.json +0 -71
- package/dist/r/table.json +0 -110
- package/dist/r/tag.json +0 -110
- package/dist/r/text.json +0 -94
- package/dist/r/toast.json +0 -77
- package/dist/r/toggle-button-group.json +0 -65
- package/dist/r/toggle-button.json +0 -94
- package/dist/r/toggle.json +0 -65
- package/dist/r/tooltip.json +0 -86
- package/src/components/Accordion/Accordion.module.css +0 -66
- package/src/components/Accordion/Accordion.stories.tsx +0 -95
- package/src/components/Accordion/Accordion.tsx +0 -122
- package/src/components/Accordion/index.ts +0 -2
- package/src/components/Badge/Badge.module.css +0 -6
- package/src/components/Badge/Badge.stories.tsx +0 -99
- package/src/components/Badge/Badge.tsx +0 -23
- package/src/components/Badge/index.ts +0 -2
- package/src/components/Banner/Banner.module.css +0 -67
- package/src/components/Banner/Banner.stories.tsx +0 -81
- package/src/components/Banner/Banner.tsx +0 -109
- package/src/components/Banner/index.ts +0 -2
- package/src/components/Breadcrumb/Breadcrumb.module.css +0 -46
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +0 -72
- package/src/components/Breadcrumb/Breadcrumb.tsx +0 -68
- package/src/components/Breadcrumb/index.ts +0 -2
- package/src/components/Button/Button.mdx +0 -143
- package/src/components/Button/Button.module.css +0 -343
- package/src/components/Button/Button.stories.tsx +0 -575
- package/src/components/Button/Button.tsx +0 -201
- package/src/components/Button/index.ts +0 -10
- package/src/components/ButtonGroup/ButtonGroup.module.css +0 -157
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -384
- package/src/components/ButtonGroup/ButtonGroup.tsx +0 -122
- package/src/components/ButtonGroup/index.ts +0 -2
- package/src/components/Card/Card.module.css +0 -36
- package/src/components/Card/Card.stories.tsx +0 -78
- package/src/components/Card/Card.tsx +0 -53
- package/src/components/Card/index.ts +0 -2
- package/src/components/Checkbox/Checkbox.module.css +0 -47
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -129
- package/src/components/Checkbox/Checkbox.tsx +0 -68
- package/src/components/Checkbox/index.ts +0 -2
- package/src/components/Divider/Divider.module.css +0 -19
- package/src/components/Divider/Divider.stories.tsx +0 -55
- package/src/components/Divider/Divider.tsx +0 -28
- package/src/components/Divider/index.ts +0 -2
- package/src/components/EmptyState/EmptyState.module.css +0 -8
- package/src/components/EmptyState/EmptyState.stories.tsx +0 -53
- package/src/components/EmptyState/EmptyState.tsx +0 -31
- package/src/components/EmptyState/index.ts +0 -2
- package/src/components/ErrorBoundary/ErrorBoundary.module.css +0 -18
- package/src/components/ErrorBoundary/ErrorBoundary.stories.tsx +0 -38
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -50
- package/src/components/ErrorBoundary/index.ts +0 -2
- package/src/components/Fade/Fade.module.css +0 -31
- package/src/components/Fade/Fade.stories.tsx +0 -35
- package/src/components/Fade/Fade.tsx +0 -33
- package/src/components/Fade/index.ts +0 -2
- package/src/components/Field/Field.module.css +0 -5
- package/src/components/Field/Field.stories.tsx +0 -111
- package/src/components/Field/Field.tsx +0 -22
- package/src/components/Field/index.ts +0 -2
- package/src/components/Header/Header.module.css +0 -33
- package/src/components/Header/Header.stories.tsx +0 -52
- package/src/components/Header/Header.tsx +0 -42
- package/src/components/Header/index.ts +0 -2
- package/src/components/Input/Input.module.css +0 -71
- package/src/components/Input/Input.stories.tsx +0 -135
- package/src/components/Input/Input.tsx +0 -76
- package/src/components/Input/index.ts +0 -2
- package/src/components/LabelWrap/LabelWrap.module.css +0 -34
- package/src/components/LabelWrap/LabelWrap.tsx +0 -32
- package/src/components/LabelWrap/index.ts +0 -1
- package/src/components/Loader/Loader.module.css +0 -9
- package/src/components/Loader/Loader.stories.tsx +0 -44
- package/src/components/Loader/Loader.tsx +0 -43
- package/src/components/Loader/index.ts +0 -2
- package/src/components/Menu/DestructiveMenuItem.module.css +0 -57
- package/src/components/Menu/DestructiveMenuItem.tsx +0 -64
- package/src/components/Menu/Menu.module.css +0 -49
- package/src/components/Menu/Menu.stories.tsx +0 -129
- package/src/components/Menu/Menu.tsx +0 -269
- package/src/components/Menu/MenuItem.module.css +0 -84
- package/src/components/Menu/MenuItem.tsx +0 -101
- package/src/components/Menu/index.ts +0 -6
- package/src/components/Modal/Modal.module.css +0 -67
- package/src/components/Modal/Modal.stories.tsx +0 -71
- package/src/components/Modal/Modal.tsx +0 -122
- package/src/components/Modal/index.ts +0 -2
- package/src/components/Pagination/Pagination.module.css +0 -64
- package/src/components/Pagination/Pagination.stories.tsx +0 -51
- package/src/components/Pagination/Pagination.tsx +0 -103
- package/src/components/Pagination/index.ts +0 -2
- package/src/components/Radio/Radio.module.css +0 -61
- package/src/components/Radio/Radio.stories.tsx +0 -101
- package/src/components/Radio/Radio.tsx +0 -108
- package/src/components/Radio/index.ts +0 -2
- package/src/components/Scrollbar/Scrollbar.module.css +0 -81
- package/src/components/Scrollbar/Scrollbar.stories.tsx +0 -46
- package/src/components/Scrollbar/Scrollbar.tsx +0 -187
- package/src/components/Scrollbar/index.ts +0 -2
- package/src/components/Select/Select.module.css +0 -31
- package/src/components/Select/Select.stories.tsx +0 -59
- package/src/components/Select/Select.tsx +0 -92
- package/src/components/Select/index.ts +0 -2
- package/src/components/Sidebar/Sidebar.module.css +0 -161
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -125
- package/src/components/Sidebar/Sidebar.tsx +0 -129
- package/src/components/Sidebar/SidebarItem.tsx +0 -57
- package/src/components/Sidebar/SidebarSection.tsx +0 -42
- package/src/components/Sidebar/index.ts +0 -6
- package/src/components/Skeleton/Skeleton.module.css +0 -53
- package/src/components/Skeleton/Skeleton.stories.tsx +0 -89
- package/src/components/Skeleton/Skeleton.tsx +0 -66
- package/src/components/Skeleton/index.ts +0 -2
- package/src/components/Slider/Slider.module.css +0 -62
- package/src/components/Slider/Slider.stories.tsx +0 -120
- package/src/components/Slider/Slider.tsx +0 -74
- package/src/components/Slider/index.ts +0 -2
- package/src/components/Surface/Surface.module.css +0 -222
- package/src/components/Surface/Surface.stories.tsx +0 -213
- package/src/components/Surface/Surface.tsx +0 -219
- package/src/components/Surface/index.ts +0 -12
- package/src/components/Tab/Tab.module.css +0 -66
- package/src/components/Tab/Tab.stories.tsx +0 -103
- package/src/components/Tab/Tab.tsx +0 -41
- package/src/components/Tab/index.ts +0 -2
- package/src/components/TabGroup/TabGroup.module.css +0 -26
- package/src/components/TabGroup/TabGroup.stories.tsx +0 -60
- package/src/components/TabGroup/TabGroup.tsx +0 -83
- package/src/components/TabGroup/index.ts +0 -2
- package/src/components/Table/Table.module.css +0 -130
- package/src/components/Table/Table.stories.tsx +0 -111
- package/src/components/Table/Table.tsx +0 -226
- package/src/components/Table/index.ts +0 -11
- package/src/components/Tag/Tag.module.css +0 -270
- package/src/components/Tag/Tag.stories.tsx +0 -399
- package/src/components/Tag/Tag.tsx +0 -162
- package/src/components/Tag/index.ts +0 -2
- package/src/components/Text/Text.module.css +0 -166
- package/src/components/Text/Text.stories.tsx +0 -212
- package/src/components/Text/Text.tsx +0 -181
- package/src/components/Text/index.ts +0 -13
- package/src/components/Toast/Toast.module.css +0 -91
- package/src/components/Toast/Toast.stories.tsx +0 -66
- package/src/components/Toast/Toast.tsx +0 -182
- package/src/components/Toast/index.ts +0 -8
- package/src/components/Toggle/Toggle.module.css +0 -87
- package/src/components/Toggle/Toggle.stories.tsx +0 -85
- package/src/components/Toggle/Toggle.tsx +0 -52
- package/src/components/Toggle/index.ts +0 -2
- package/src/components/ToggleButton/ToggleButton.module.css +0 -172
- package/src/components/ToggleButton/ToggleButton.stories.tsx +0 -299
- package/src/components/ToggleButton/ToggleButton.tsx +0 -118
- package/src/components/ToggleButton/index.ts +0 -2
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.module.css +0 -163
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.stories.tsx +0 -341
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +0 -111
- package/src/components/ToggleButtonGroup/index.ts +0 -2
- package/src/components/Tooltip/Tooltip.module.css +0 -45
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -46
- package/src/components/Tooltip/Tooltip.tsx +0 -224
- package/src/components/Tooltip/index.ts +0 -2
- package/src/css-modules.d.ts +0 -4
- package/src/docs/ColorUsage.mdx +0 -195
- package/src/docs/ElevationUsage.mdx +0 -95
- package/src/docs/Introduction.mdx +0 -97
- package/src/docs/OpticalSizing.mdx +0 -178
- package/src/docs/TypographyUsage.mdx +0 -121
- package/src/index.ts +0 -154
- package/src/stories/Colors.stories.tsx +0 -528
- package/src/stories/Dimensions.stories.tsx +0 -200
- package/src/stories/Effects.stories.tsx +0 -231
- package/src/stories/Icons.stories.tsx +0 -159
- package/src/stories/Typography.stories.tsx +0 -157
- package/src/types/icons.ts +0 -15
- package/src/types/index.ts +0 -1
- package/src/utils/cn.ts +0 -6
- package/src/utils/css-tokens.ts +0 -22
package/dist/index.js
DELETED
|
@@ -1,2492 +0,0 @@
|
|
|
1
|
-
import e, { Component as t, forwardRef as n, useCallback as r, useEffect as i, useId as a, useLayoutEffect as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
|
|
2
|
-
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
3
|
-
import { ChevronDown as m, Cross as h } from "@ds-mo/icons";
|
|
4
|
-
import g, { createPortal as _ } from "react-dom";
|
|
5
|
-
var v = {
|
|
6
|
-
text: "_text_12t2m_1",
|
|
7
|
-
truncate1Line: "_truncate1Line_12t2m_9",
|
|
8
|
-
truncate2Lines: "_truncate2Lines_12t2m_15",
|
|
9
|
-
truncate3Lines: "_truncate3Lines_12t2m_24",
|
|
10
|
-
truncate4Lines: "_truncate4Lines_12t2m_33",
|
|
11
|
-
truncate5Lines: "_truncate5Lines_12t2m_42",
|
|
12
|
-
noTruncation: "_noTruncation_12t2m_51",
|
|
13
|
-
wrapNowrap: "_wrapNowrap_12t2m_56",
|
|
14
|
-
wrapBalance: "_wrapBalance_12t2m_64",
|
|
15
|
-
wrapPretty: "_wrapPretty_12t2m_68",
|
|
16
|
-
colorPrimary: "_colorPrimary_12t2m_76",
|
|
17
|
-
colorSecondary: "_colorSecondary_12t2m_80",
|
|
18
|
-
colorTertiary: "_colorTertiary_12t2m_84",
|
|
19
|
-
colorBrand: "_colorBrand_12t2m_88",
|
|
20
|
-
colorNegative: "_colorNegative_12t2m_92",
|
|
21
|
-
colorPositive: "_colorPositive_12t2m_96",
|
|
22
|
-
colorWarning: "_colorWarning_12t2m_100",
|
|
23
|
-
colorCaution: "_colorCaution_12t2m_104",
|
|
24
|
-
colorAi: "_colorAi_12t2m_108",
|
|
25
|
-
colorOnStrong: "_colorOnStrong_12t2m_112",
|
|
26
|
-
colorOnBold: "_colorOnBold_12t2m_116",
|
|
27
|
-
colorInherit: "_colorInherit_12t2m_120",
|
|
28
|
-
decorationNone: "_decorationNone_12t2m_128",
|
|
29
|
-
decorationUnderline: "_decorationUnderline_12t2m_132",
|
|
30
|
-
decorationDottedUnderline: "_decorationDottedUnderline_12t2m_138",
|
|
31
|
-
italic: "_italic_12t2m_148",
|
|
32
|
-
alignLeft: "_alignLeft_12t2m_156",
|
|
33
|
-
alignCenter: "_alignCenter_12t2m_160",
|
|
34
|
-
alignRight: "_alignRight_12t2m_164"
|
|
35
|
-
}, y = {
|
|
36
|
-
primary: v.colorPrimary,
|
|
37
|
-
secondary: v.colorSecondary,
|
|
38
|
-
tertiary: v.colorTertiary,
|
|
39
|
-
brand: v.colorBrand,
|
|
40
|
-
negative: v.colorNegative,
|
|
41
|
-
positive: v.colorPositive,
|
|
42
|
-
warning: v.colorWarning,
|
|
43
|
-
caution: v.colorCaution,
|
|
44
|
-
ai: v.colorAi,
|
|
45
|
-
"on-strong": v.colorOnStrong,
|
|
46
|
-
"on-bold": v.colorOnBold,
|
|
47
|
-
inherit: v.colorInherit
|
|
48
|
-
}, b = {
|
|
49
|
-
none: v.decorationNone,
|
|
50
|
-
underline: v.decorationUnderline,
|
|
51
|
-
"dotted-underline": v.decorationDottedUnderline
|
|
52
|
-
}, x = {
|
|
53
|
-
left: v.alignLeft,
|
|
54
|
-
center: v.alignCenter,
|
|
55
|
-
right: v.alignRight
|
|
56
|
-
}, S = {
|
|
57
|
-
1: v.truncate1Line,
|
|
58
|
-
2: v.truncate2Lines,
|
|
59
|
-
3: v.truncate3Lines,
|
|
60
|
-
4: v.truncate4Lines,
|
|
61
|
-
5: v.truncate5Lines,
|
|
62
|
-
none: v.noTruncation
|
|
63
|
-
}, C = (e) => e.startsWith("var(--"), w = n(({ variant: e = "text-body-medium", children: t, color: n, decoration: r, italic: i, align: a, lineTruncation: o = "none", wrap: s, as: c = "p", id: l, htmlFor: u, className: d = "", style: p }, m) => {
|
|
64
|
-
let h = s === "nowrap" ? v.wrapNowrap : s === "balance" ? v.wrapBalance : s === "pretty" ? v.wrapPretty : "", g = s === "nowrap" ? "" : S[o], _ = [
|
|
65
|
-
e,
|
|
66
|
-
v.text,
|
|
67
|
-
h,
|
|
68
|
-
g,
|
|
69
|
-
n && !C(n) ? y[n] : "",
|
|
70
|
-
r ? b[r] : "",
|
|
71
|
-
i ? v.italic : "",
|
|
72
|
-
a ? x[a] : "",
|
|
73
|
-
d
|
|
74
|
-
].filter(Boolean).join(" "), w = {
|
|
75
|
-
...p,
|
|
76
|
-
...n && C(n) ? { color: n } : {}
|
|
77
|
-
};
|
|
78
|
-
return /* @__PURE__ */ f(c, {
|
|
79
|
-
ref: m,
|
|
80
|
-
className: _,
|
|
81
|
-
style: Object.keys(w).length > 0 ? w : void 0,
|
|
82
|
-
...l ? { id: l } : {},
|
|
83
|
-
...c === "label" && u ? { htmlFor: u } : {},
|
|
84
|
-
children: t
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
w.displayName = "Text";
|
|
88
|
-
var T = {
|
|
89
|
-
surface: "_surface_65ypw_7",
|
|
90
|
-
bgPrimary: "_bgPrimary_65ypw_28",
|
|
91
|
-
bgSecondary: "_bgSecondary_65ypw_32",
|
|
92
|
-
bgTransparent: "_bgTransparent_65ypw_36",
|
|
93
|
-
bgTranslucent: "_bgTranslucent_65ypw_40",
|
|
94
|
-
intentBrandFaint: "_intentBrandFaint_65ypw_51",
|
|
95
|
-
intentBrandMedium: "_intentBrandMedium_65ypw_52",
|
|
96
|
-
intentBrandBold: "_intentBrandBold_65ypw_53",
|
|
97
|
-
intentBrandStrong: "_intentBrandStrong_65ypw_54",
|
|
98
|
-
intentPositiveFaint: "_intentPositiveFaint_65ypw_57",
|
|
99
|
-
intentPositiveMedium: "_intentPositiveMedium_65ypw_58",
|
|
100
|
-
intentPositiveBold: "_intentPositiveBold_65ypw_59",
|
|
101
|
-
intentPositiveStrong: "_intentPositiveStrong_65ypw_60",
|
|
102
|
-
intentNegativeFaint: "_intentNegativeFaint_65ypw_63",
|
|
103
|
-
intentNegativeMedium: "_intentNegativeMedium_65ypw_64",
|
|
104
|
-
intentNegativeBold: "_intentNegativeBold_65ypw_65",
|
|
105
|
-
intentNegativeStrong: "_intentNegativeStrong_65ypw_66",
|
|
106
|
-
intentWarningFaint: "_intentWarningFaint_65ypw_69",
|
|
107
|
-
intentWarningMedium: "_intentWarningMedium_65ypw_70",
|
|
108
|
-
intentWarningBold: "_intentWarningBold_65ypw_71",
|
|
109
|
-
intentWarningStrong: "_intentWarningStrong_65ypw_72",
|
|
110
|
-
intentCautionFaint: "_intentCautionFaint_65ypw_75",
|
|
111
|
-
intentCautionMedium: "_intentCautionMedium_65ypw_76",
|
|
112
|
-
intentCautionBold: "_intentCautionBold_65ypw_77",
|
|
113
|
-
intentCautionStrong: "_intentCautionStrong_65ypw_78",
|
|
114
|
-
intentAiFaint: "_intentAiFaint_65ypw_81",
|
|
115
|
-
intentAiMedium: "_intentAiMedium_65ypw_82",
|
|
116
|
-
intentAiBold: "_intentAiBold_65ypw_83",
|
|
117
|
-
intentAiStrong: "_intentAiStrong_65ypw_84",
|
|
118
|
-
intentNeutralFaint: "_intentNeutralFaint_65ypw_87",
|
|
119
|
-
intentNeutralMedium: "_intentNeutralMedium_65ypw_88",
|
|
120
|
-
intentNeutralBold: "_intentNeutralBold_65ypw_89",
|
|
121
|
-
intentNeutralStrong: "_intentNeutralStrong_65ypw_90",
|
|
122
|
-
intentWalkthroughFaint: "_intentWalkthroughFaint_65ypw_93",
|
|
123
|
-
intentWalkthroughMedium: "_intentWalkthroughMedium_65ypw_94",
|
|
124
|
-
intentWalkthroughBold: "_intentWalkthroughBold_65ypw_95",
|
|
125
|
-
intentWalkthroughStrong: "_intentWalkthroughStrong_65ypw_96",
|
|
126
|
-
intentGuideFaint: "_intentGuideFaint_65ypw_99",
|
|
127
|
-
intentGuideMedium: "_intentGuideMedium_65ypw_100",
|
|
128
|
-
intentGuideBold: "_intentGuideBold_65ypw_101",
|
|
129
|
-
intentGuideStrong: "_intentGuideStrong_65ypw_102",
|
|
130
|
-
elevationNone: "_elevationNone_65ypw_108",
|
|
131
|
-
elevationDepressed: "_elevationDepressed_65ypw_110",
|
|
132
|
-
elevationDepressedMd: "_elevationDepressedMd_65ypw_114",
|
|
133
|
-
elevationFlat: "_elevationFlat_65ypw_118",
|
|
134
|
-
elevationElevated: "_elevationElevated_65ypw_122",
|
|
135
|
-
elevationFloating: "_elevationFloating_65ypw_126",
|
|
136
|
-
elevationOverlayTop: "_elevationOverlayTop_65ypw_130",
|
|
137
|
-
elevationOverlayRight: "_elevationOverlayRight_65ypw_134",
|
|
138
|
-
elevationOverlayBottom: "_elevationOverlayBottom_65ypw_138",
|
|
139
|
-
elevationOverlayLeft: "_elevationOverlayLeft_65ypw_142",
|
|
140
|
-
edgeTop: "_edgeTop_65ypw_150",
|
|
141
|
-
edgeRight: "_edgeRight_65ypw_151",
|
|
142
|
-
edgeBottom: "_edgeBottom_65ypw_152",
|
|
143
|
-
edgeLeft: "_edgeLeft_65ypw_153",
|
|
144
|
-
radiusNone: "_radiusNone_65ypw_159",
|
|
145
|
-
radiusXs: "_radiusXs_65ypw_160",
|
|
146
|
-
radiusSm: "_radiusSm_65ypw_161",
|
|
147
|
-
radiusMd: "_radiusMd_65ypw_162",
|
|
148
|
-
radiusLg: "_radiusLg_65ypw_163",
|
|
149
|
-
radiusXl: "_radiusXl_65ypw_164",
|
|
150
|
-
radius2xl: "_radius2xl_65ypw_165",
|
|
151
|
-
radiusFull: "_radiusFull_65ypw_166",
|
|
152
|
-
interactive: "_interactive_65ypw_172",
|
|
153
|
-
selected: "_selected_65ypw_199",
|
|
154
|
-
inactive: "_inactive_65ypw_218"
|
|
155
|
-
}, E = {
|
|
156
|
-
primary: T.bgPrimary,
|
|
157
|
-
secondary: T.bgSecondary,
|
|
158
|
-
transparent: T.bgTransparent,
|
|
159
|
-
translucent: T.bgTranslucent
|
|
160
|
-
}, D = {
|
|
161
|
-
none: T.elevationNone,
|
|
162
|
-
depressed: T.elevationDepressed,
|
|
163
|
-
"depressed-md": T.elevationDepressedMd,
|
|
164
|
-
flat: T.elevationFlat,
|
|
165
|
-
elevated: T.elevationElevated,
|
|
166
|
-
floating: T.elevationFloating,
|
|
167
|
-
overlayTop: T.elevationOverlayTop,
|
|
168
|
-
overlayRight: T.elevationOverlayRight,
|
|
169
|
-
overlayBottom: T.elevationOverlayBottom,
|
|
170
|
-
overlayLeft: T.elevationOverlayLeft
|
|
171
|
-
}, O = {
|
|
172
|
-
top: T.edgeTop,
|
|
173
|
-
right: T.edgeRight,
|
|
174
|
-
bottom: T.edgeBottom,
|
|
175
|
-
left: T.edgeLeft
|
|
176
|
-
}, k = {
|
|
177
|
-
none: T.radiusNone,
|
|
178
|
-
xs: T.radiusXs,
|
|
179
|
-
sm: T.radiusSm,
|
|
180
|
-
md: T.radiusMd,
|
|
181
|
-
lg: T.radiusLg,
|
|
182
|
-
xl: T.radiusXl,
|
|
183
|
-
"2xl": T.radius2xl,
|
|
184
|
-
full: T.radiusFull
|
|
185
|
-
}, A = (e, t) => T[`intent${e.charAt(0).toUpperCase() + e.slice(1)}${t.charAt(0).toUpperCase() + t.slice(1)}`] || "", j = (e) => e in k, M = n(({ children: e, background: t = "transparent", intent: n, contrast: r = "faint", elevation: i = "none", edge: a, radius: o, interactive: s = !1, selected: c = !1, inactive: l = !1, as: u = "div", className: d = "", style: p, type: m, ...h }, g) => {
|
|
186
|
-
let _ = [
|
|
187
|
-
T.surface,
|
|
188
|
-
n ? A(n, r) : E[t],
|
|
189
|
-
D[i],
|
|
190
|
-
...a && i === "none" ? Array.isArray(a) ? a.map((e) => O[e]) : [O[a]] : [],
|
|
191
|
-
o && j(o) ? k[o] : "",
|
|
192
|
-
s ? T.interactive : "",
|
|
193
|
-
c ? T.selected : "",
|
|
194
|
-
l ? T.inactive : "",
|
|
195
|
-
d
|
|
196
|
-
].filter(Boolean).join(" "), v = {
|
|
197
|
-
...p,
|
|
198
|
-
...o && !j(o) ? { borderRadius: o } : {}
|
|
199
|
-
};
|
|
200
|
-
return /* @__PURE__ */ f(u, {
|
|
201
|
-
ref: g,
|
|
202
|
-
className: _,
|
|
203
|
-
style: o && !j(o) || p && Object.keys(p).length > 0 ? v : void 0,
|
|
204
|
-
disabled: u === "button" ? l : void 0,
|
|
205
|
-
type: u === "button" ? m || "button" : void 0,
|
|
206
|
-
...h,
|
|
207
|
-
children: e
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
M.displayName = "Surface";
|
|
211
|
-
var N = {
|
|
212
|
-
card: "_card_1idsz_6",
|
|
213
|
-
elevationFlat: "_elevationFlat_1idsz_13",
|
|
214
|
-
elevationElevated: "_elevationElevated_1idsz_14",
|
|
215
|
-
elevationFloating: "_elevationFloating_1idsz_15",
|
|
216
|
-
radiusSm: "_radiusSm_1idsz_18",
|
|
217
|
-
radiusMd: "_radiusMd_1idsz_19",
|
|
218
|
-
radiusLg: "_radiusLg_1idsz_20",
|
|
219
|
-
radiusXl: "_radiusXl_1idsz_21",
|
|
220
|
-
header: "_header_1idsz_24",
|
|
221
|
-
body: "_body_1idsz_29",
|
|
222
|
-
footer: "_footer_1idsz_33"
|
|
223
|
-
};
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/utils/cn.ts
|
|
226
|
-
function P(...e) {
|
|
227
|
-
return e.filter(Boolean).join(" ");
|
|
228
|
-
}
|
|
229
|
-
//#endregion
|
|
230
|
-
//#region src/components/Card/Card.tsx
|
|
231
|
-
var ee = {
|
|
232
|
-
flat: N.elevationFlat,
|
|
233
|
-
elevated: N.elevationElevated,
|
|
234
|
-
floating: N.elevationFloating
|
|
235
|
-
}, F = {
|
|
236
|
-
sm: N.radiusSm,
|
|
237
|
-
md: N.radiusMd,
|
|
238
|
-
lg: N.radiusLg,
|
|
239
|
-
xl: N.radiusXl
|
|
240
|
-
}, I = n(({ children: e, header: t, footer: n, elevation: r = "elevated", radius: i = "lg", className: a, style: o }, s) => /* @__PURE__ */ p("div", {
|
|
241
|
-
ref: s,
|
|
242
|
-
className: P(N.card, ee[r], F[i], a),
|
|
243
|
-
style: o,
|
|
244
|
-
children: [
|
|
245
|
-
t && /* @__PURE__ */ f("div", {
|
|
246
|
-
className: N.header,
|
|
247
|
-
children: t
|
|
248
|
-
}),
|
|
249
|
-
/* @__PURE__ */ f("div", {
|
|
250
|
-
className: N.body,
|
|
251
|
-
children: e
|
|
252
|
-
}),
|
|
253
|
-
n && /* @__PURE__ */ f("div", {
|
|
254
|
-
className: N.footer,
|
|
255
|
-
children: n
|
|
256
|
-
})
|
|
257
|
-
]
|
|
258
|
-
}));
|
|
259
|
-
I.displayName = "Card";
|
|
260
|
-
var L = {
|
|
261
|
-
labelWrap: "_labelWrap_1t38o_8",
|
|
262
|
-
sizeSm: "_sizeSm_1t38o_16",
|
|
263
|
-
sizeXs: "_sizeXs_1t38o_19",
|
|
264
|
-
truncate: "_truncate_1t38o_22"
|
|
265
|
-
}, R = ({ children: e, size: t = "md", truncate: n = !1, className: r }) => /* @__PURE__ */ f("span", {
|
|
266
|
-
className: P(L.labelWrap, t === "sm" && L.sizeSm, t === "xs" && L.sizeXs, n && L.truncate, r),
|
|
267
|
-
children: e
|
|
268
|
-
});
|
|
269
|
-
R.displayName = "LabelWrap";
|
|
270
|
-
var te = {
|
|
271
|
-
loader: "_loader_fz5t7_1",
|
|
272
|
-
spin: "_spin_fz5t7_1"
|
|
273
|
-
}, z = ({ size: e = 20, className: t }) => /* @__PURE__ */ f("svg", {
|
|
274
|
-
width: e,
|
|
275
|
-
height: e,
|
|
276
|
-
viewBox: "0 0 16 16",
|
|
277
|
-
fill: "none",
|
|
278
|
-
className: `${te.loader}${t ? ` ${t}` : ""}`,
|
|
279
|
-
"aria-hidden": "true",
|
|
280
|
-
children: /* @__PURE__ */ f("circle", {
|
|
281
|
-
cx: "8",
|
|
282
|
-
cy: "8",
|
|
283
|
-
r: "5",
|
|
284
|
-
stroke: "currentColor",
|
|
285
|
-
strokeWidth: "1",
|
|
286
|
-
strokeLinecap: "round",
|
|
287
|
-
strokeDasharray: "23.6 7.9"
|
|
288
|
-
})
|
|
289
|
-
});
|
|
290
|
-
z.displayName = "Loader";
|
|
291
|
-
var B = {
|
|
292
|
-
button: "_button_1vroe_6",
|
|
293
|
-
inactive: "_inactive_1vroe_35",
|
|
294
|
-
onMedium: "_onMedium_1vroe_50",
|
|
295
|
-
onBold: "_onBold_1vroe_56",
|
|
296
|
-
onStrong: "_onStrong_1vroe_62",
|
|
297
|
-
onAlwaysDark: "_onAlwaysDark_1vroe_68",
|
|
298
|
-
primary: "_primary_1vroe_79",
|
|
299
|
-
intentNone: "_intentNone_1vroe_84",
|
|
300
|
-
intentBrand: "_intentBrand_1vroe_102",
|
|
301
|
-
intentNeutral: "_intentNeutral_1vroe_103",
|
|
302
|
-
intentPositive: "_intentPositive_1vroe_104",
|
|
303
|
-
intentNegative: "_intentNegative_1vroe_105",
|
|
304
|
-
intentWarning: "_intentWarning_1vroe_106",
|
|
305
|
-
intentCaution: "_intentCaution_1vroe_107",
|
|
306
|
-
intentAi: "_intentAi_1vroe_108",
|
|
307
|
-
contrastMedium: "_contrastMedium_1vroe_112",
|
|
308
|
-
contrastStrong: "_contrastStrong_1vroe_126",
|
|
309
|
-
contrastFaint: "_contrastFaint_1vroe_140",
|
|
310
|
-
secondary: "_secondary_1vroe_158",
|
|
311
|
-
elevationFlat: "_elevationFlat_1vroe_224",
|
|
312
|
-
elevationElevated: "_elevationElevated_1vroe_228",
|
|
313
|
-
elevationFloating: "_elevationFloating_1vroe_235",
|
|
314
|
-
elevationNone: "_elevationNone_1vroe_248",
|
|
315
|
-
iconOnly: "_iconOnly_1vroe_275",
|
|
316
|
-
labelOnly: "_labelOnly_1vroe_276",
|
|
317
|
-
iconAndLabel: "_iconAndLabel_1vroe_277",
|
|
318
|
-
dropdown: "_dropdown_1vroe_278",
|
|
319
|
-
sizeSM: "_sizeSM_1vroe_284",
|
|
320
|
-
sizeXS: "_sizeXS_1vroe_289",
|
|
321
|
-
sizeLG: "_sizeLG_1vroe_293",
|
|
322
|
-
rounded: "_rounded_1vroe_302",
|
|
323
|
-
badge: "_badge_1vroe_324",
|
|
324
|
-
fullWidth: "_fullWidth_1vroe_340"
|
|
325
|
-
}, V = {
|
|
326
|
-
xs: 12,
|
|
327
|
-
sm: 16,
|
|
328
|
-
md: 20,
|
|
329
|
-
lg: 24
|
|
330
|
-
}, ne = {
|
|
331
|
-
xs: "text-caption-emphasis",
|
|
332
|
-
sm: "text-body-small-emphasis",
|
|
333
|
-
md: "text-body-medium-emphasis",
|
|
334
|
-
lg: "text-body-large-emphasis"
|
|
335
|
-
}, re = n(({ as: e, variant: t = "primary", label: n, icon: r, intent: i = "brand", size: a = "md", rounded: o = !1, fullWidth: s = !1, width: c, contrast: l = "bold", background: u, dropdown: d = !1, badgeCount: h, elevation: g, loading: _ = !1, onClick: v, onMouseEnter: y, onMouseLeave: b, className: x, inactive: S = !1, type: C = "button", id: T, "aria-label": E, href: D, target: O, rel: k }, A) => {
|
|
336
|
-
let j = e ?? "button", M = !e || e === "button", N = !S && !_, ee = !!r, F = !!n, I = ee || _, L = I && !F, te = F && !I, re = I && F, H = V[a], ie = ne[a], ae = g ?? (t === "primary" ? "none" : "flat"), oe = ae.charAt(0).toUpperCase() + ae.slice(1), U = P(B.button, B[t], B[`intent${i.charAt(0).toUpperCase() + i.slice(1)}`], a !== "md" && B[`size${a.toUpperCase()}`], o && B.rounded, (S || _) && B.inactive, L && B.iconOnly, te && B.labelOnly, re && B.iconAndLabel, d && B.dropdown, t === "primary" && i !== "none" && l !== "bold" && B[`contrast${l.charAt(0).toUpperCase() + l.slice(1)}`], B[`elevation${oe}`], u && u !== "faint" && B[u === "always-dark" ? "onAlwaysDark" : `on${u.charAt(0).toUpperCase() + u.slice(1)}`], s && B.fullWidth, x), se = E || n || "button", W = {};
|
|
337
|
-
return M && (W.type = C, W.disabled = S || _), D && (W.href = D), O && (W.target = O), k && (W.rel = k), /* @__PURE__ */ p(j, {
|
|
338
|
-
ref: A,
|
|
339
|
-
id: T,
|
|
340
|
-
className: U,
|
|
341
|
-
style: c ? { width: c } : void 0,
|
|
342
|
-
onClick: N ? v : void 0,
|
|
343
|
-
onMouseEnter: N ? y : void 0,
|
|
344
|
-
onMouseLeave: N ? b : void 0,
|
|
345
|
-
"aria-label": se,
|
|
346
|
-
"aria-busy": _ || void 0,
|
|
347
|
-
...W,
|
|
348
|
-
children: [
|
|
349
|
-
_ ? /* @__PURE__ */ f(z, { size: H }) : r && /* @__PURE__ */ f(r, { size: H }),
|
|
350
|
-
n && /* @__PURE__ */ f(R, {
|
|
351
|
-
truncate: s,
|
|
352
|
-
children: /* @__PURE__ */ f(w, {
|
|
353
|
-
variant: ie,
|
|
354
|
-
as: "span",
|
|
355
|
-
color: "inherit",
|
|
356
|
-
children: n
|
|
357
|
-
})
|
|
358
|
-
}),
|
|
359
|
-
d && /* @__PURE__ */ f(m, { size: H }),
|
|
360
|
-
h != null && h > 0 && /* @__PURE__ */ f("span", {
|
|
361
|
-
className: B.badge,
|
|
362
|
-
children: h > 9 ? "+" : h
|
|
363
|
-
})
|
|
364
|
-
]
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
re.displayName = "Button";
|
|
368
|
-
var H = {
|
|
369
|
-
toggleButton: "_toggleButton_ywix4_11",
|
|
370
|
-
inactive: "_inactive_ywix4_38",
|
|
371
|
-
onMedium: "_onMedium_ywix4_51",
|
|
372
|
-
onBold: "_onBold_ywix4_57",
|
|
373
|
-
onStrong: "_onStrong_ywix4_63",
|
|
374
|
-
onAlwaysDark: "_onAlwaysDark_ywix4_69",
|
|
375
|
-
elevationElevated: "_elevationElevated_ywix4_81",
|
|
376
|
-
elevationFlat: "_elevationFlat_ywix4_91",
|
|
377
|
-
elevationNone: "_elevationNone_ywix4_98",
|
|
378
|
-
elevationFloating: "_elevationFloating_ywix4_104",
|
|
379
|
-
pressed: "_pressed_ywix4_129",
|
|
380
|
-
iconOnly: "_iconOnly_ywix4_138",
|
|
381
|
-
labelOnly: "_labelOnly_ywix4_139",
|
|
382
|
-
iconAndLabel: "_iconAndLabel_ywix4_140",
|
|
383
|
-
sizeSM: "_sizeSM_ywix4_146",
|
|
384
|
-
sizeXS: "_sizeXS_ywix4_151",
|
|
385
|
-
rounded: "_rounded_ywix4_159"
|
|
386
|
-
}, ie = {
|
|
387
|
-
md: 20,
|
|
388
|
-
sm: 16,
|
|
389
|
-
xs: 12
|
|
390
|
-
}, ae = {
|
|
391
|
-
md: "text-body-medium-emphasis",
|
|
392
|
-
sm: "text-body-small-emphasis",
|
|
393
|
-
xs: "text-caption-emphasis"
|
|
394
|
-
}, oe = n(({ elevation: e = "elevated", label: t, icon: n, size: r = "md", rounded: i = !1, background: a, pressed: o, onPressedChange: s, inactive: c = !1, className: l, id: u, "aria-label": d }, m) => {
|
|
395
|
-
let h = !!n, g = !!t, _ = h && !g, v = g && !h, y = h && g, b = ie[r], x = ae[r], S = e.charAt(0).toUpperCase() + e.slice(1);
|
|
396
|
-
return /* @__PURE__ */ p("button", {
|
|
397
|
-
ref: m,
|
|
398
|
-
id: u,
|
|
399
|
-
className: P(H.toggleButton, H[`elevation${S}`], r !== "md" && H[`size${r.toUpperCase()}`], i && H.rounded, c && H.inactive, _ && H.iconOnly, v && H.labelOnly, y && H.iconAndLabel, a && a !== "faint" && H[a === "always-dark" ? "onAlwaysDark" : `on${a.charAt(0).toUpperCase() + a.slice(1)}`], o && H.pressed, l),
|
|
400
|
-
onClick: c ? void 0 : () => s(!o),
|
|
401
|
-
type: "button",
|
|
402
|
-
disabled: c,
|
|
403
|
-
"aria-label": d || t || "toggle",
|
|
404
|
-
"aria-pressed": o,
|
|
405
|
-
children: [n && /* @__PURE__ */ f(n, { size: b }), t && /* @__PURE__ */ f(R, { children: /* @__PURE__ */ f(w, {
|
|
406
|
-
variant: x,
|
|
407
|
-
as: "span",
|
|
408
|
-
color: "inherit",
|
|
409
|
-
children: t
|
|
410
|
-
}) })]
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
oe.displayName = "ToggleButton";
|
|
414
|
-
var U = {
|
|
415
|
-
group: "_group_1u9mw_5",
|
|
416
|
-
groupElevated: "_groupElevated_1u9mw_27",
|
|
417
|
-
groupFlat: "_groupFlat_1u9mw_31",
|
|
418
|
-
groupFloating: "_groupFloating_1u9mw_33",
|
|
419
|
-
groupRounded: "_groupRounded_1u9mw_37",
|
|
420
|
-
item: "_item_1u9mw_23",
|
|
421
|
-
divider: "_divider_1u9mw_64",
|
|
422
|
-
dividerGhost: "_dividerGhost_1u9mw_75",
|
|
423
|
-
dividerGhostXS: "_dividerGhostXS_1u9mw_76",
|
|
424
|
-
dividerGhostSM: "_dividerGhostSM_1u9mw_77",
|
|
425
|
-
dividerGhostLG: "_dividerGhostLG_1u9mw_78",
|
|
426
|
-
dividerBold: "_dividerBold_1u9mw_81",
|
|
427
|
-
dividerMedium: "_dividerMedium_1u9mw_82",
|
|
428
|
-
dividerStrong: "_dividerStrong_1u9mw_83",
|
|
429
|
-
itemShort: "_itemShort_1u9mw_100",
|
|
430
|
-
first: "_first_1u9mw_94",
|
|
431
|
-
last: "_last_1u9mw_94",
|
|
432
|
-
middle: "_middle_1u9mw_95",
|
|
433
|
-
roundedFirstMD: "_roundedFirstMD_1u9mw_145",
|
|
434
|
-
roundedLastMD: "_roundedLastMD_1u9mw_146",
|
|
435
|
-
roundedMidMD: "_roundedMidMD_1u9mw_147",
|
|
436
|
-
roundedFirstSM: "_roundedFirstSM_1u9mw_150",
|
|
437
|
-
roundedLastSM: "_roundedLastSM_1u9mw_151",
|
|
438
|
-
roundedMidSM: "_roundedMidSM_1u9mw_152",
|
|
439
|
-
roundedFirstLG: "_roundedFirstLG_1u9mw_155",
|
|
440
|
-
roundedLastLG: "_roundedLastLG_1u9mw_156",
|
|
441
|
-
roundedMidLG: "_roundedMidLG_1u9mw_157"
|
|
442
|
-
}, se = ({ children: t, className: n }) => {
|
|
443
|
-
let r = e.Children.toArray(t).filter(e.isValidElement), i = r.length, a = r[0]?.props, o = a?.variant ?? "secondary", s = a?.elevation ?? (o === "primary" ? "none" : "flat"), c = !!a?.rounded, l = s.charAt(0).toUpperCase() + s.slice(1);
|
|
444
|
-
return /* @__PURE__ */ f("div", {
|
|
445
|
-
className: P(U.group, U[`group${l}`], c && U.groupRounded, n),
|
|
446
|
-
role: "group",
|
|
447
|
-
children: r.map((t, n) => {
|
|
448
|
-
let r = t, a = r.props, o = n === 0, s = n === i - 1, c = !o && !s, l = a.variant ?? "secondary", u = a.size ?? "md", d = a.contrast ?? "bold", m = a.intent ?? "brand", h = !!a.rounded, g = !!a.icon && !a.label, _ = l === "secondary" && (a.elevation ?? "flat") === "none", v = l === "primary" && m !== "none", y = d.charAt(0).toUpperCase() + d.slice(1), b = u.toUpperCase(), x = h && !g && u !== "xs", S = P(U.divider, _ && U.dividerGhost, _ && u === "xs" && U.dividerGhostXS, _ && u === "sm" && U.dividerGhostSM, _ && u === "lg" && U.dividerGhostLG, v && U[`divider${y}`]);
|
|
449
|
-
return /* @__PURE__ */ p(e.Fragment, { children: [n > 0 && /* @__PURE__ */ f("div", {
|
|
450
|
-
className: S,
|
|
451
|
-
"aria-hidden": "true"
|
|
452
|
-
}), e.cloneElement(r, { className: P(a.className, U.item, o && U.first, s && U.last, c && U.middle, _ && U.itemShort, x && o && U[`roundedFirst${b}`], x && s && U[`roundedLast${b}`], x && c && U[`roundedMid${b}`]) })] }, n);
|
|
453
|
-
})
|
|
454
|
-
});
|
|
455
|
-
};
|
|
456
|
-
se.displayName = "ButtonGroup";
|
|
457
|
-
var W = {
|
|
458
|
-
group: "_group_14dyx_5",
|
|
459
|
-
groupElevated: "_groupElevated_14dyx_27",
|
|
460
|
-
groupFlat: "_groupFlat_14dyx_31",
|
|
461
|
-
groupFloating: "_groupFloating_14dyx_33",
|
|
462
|
-
groupRounded: "_groupRounded_14dyx_37",
|
|
463
|
-
item: "_item_14dyx_23",
|
|
464
|
-
divider: "_divider_14dyx_66",
|
|
465
|
-
dividerGhost: "_dividerGhost_14dyx_77",
|
|
466
|
-
dividerGhostXS: "_dividerGhostXS_14dyx_78",
|
|
467
|
-
dividerGhostSM: "_dividerGhostSM_14dyx_79",
|
|
468
|
-
itemPressed: "_itemPressed_14dyx_86",
|
|
469
|
-
itemShort: "_itemShort_14dyx_102",
|
|
470
|
-
first: "_first_14dyx_96",
|
|
471
|
-
last: "_last_14dyx_96",
|
|
472
|
-
middle: "_middle_14dyx_96",
|
|
473
|
-
roundedFirstMD: "_roundedFirstMD_14dyx_156",
|
|
474
|
-
roundedLastMD: "_roundedLastMD_14dyx_157",
|
|
475
|
-
roundedMidMD: "_roundedMidMD_14dyx_158",
|
|
476
|
-
roundedFirstSM: "_roundedFirstSM_14dyx_161",
|
|
477
|
-
roundedLastSM: "_roundedLastSM_14dyx_162",
|
|
478
|
-
roundedMidSM: "_roundedMidSM_14dyx_163"
|
|
479
|
-
}, ce = ({ children: t, className: n }) => {
|
|
480
|
-
let r = e.Children.toArray(t).filter(e.isValidElement), i = r.length, a = r[0]?.props, o = a?.elevation ?? "elevated", s = !!a?.rounded, c = o.charAt(0).toUpperCase() + o.slice(1);
|
|
481
|
-
return /* @__PURE__ */ f("div", {
|
|
482
|
-
className: P(W.group, W[`group${c}`], s && W.groupRounded, n),
|
|
483
|
-
role: "group",
|
|
484
|
-
children: r.map((t, n) => {
|
|
485
|
-
let r = t, a = r.props, o = n === 0, s = n === i - 1, c = !o && !s, l = a.size ?? "md", u = !!a.rounded, d = !!a.pressed, m = !!a.icon && !a.label, h = (a.elevation ?? "elevated") === "none", g = l.toUpperCase(), _ = u && !m && l !== "xs", v = P(W.divider, h && W.dividerGhost, h && l === "xs" && W.dividerGhostXS, h && l === "sm" && W.dividerGhostSM);
|
|
486
|
-
return /* @__PURE__ */ p(e.Fragment, { children: [n > 0 && /* @__PURE__ */ f("div", {
|
|
487
|
-
className: v,
|
|
488
|
-
"aria-hidden": "true"
|
|
489
|
-
}), e.cloneElement(r, { className: P(a.className, W.item, o && W.first, s && W.last, c && W.middle, h && W.itemShort, h && d && W.itemPressed, _ && o && W[`roundedFirst${g}`], _ && s && W[`roundedLast${g}`], _ && c && W[`roundedMid${g}`]) })] }, n);
|
|
490
|
-
})
|
|
491
|
-
});
|
|
492
|
-
};
|
|
493
|
-
ce.displayName = "ToggleButtonGroup";
|
|
494
|
-
var G = {
|
|
495
|
-
tag: "_tag_1sd2v_6",
|
|
496
|
-
sizeMd: "_sizeMd_1sd2v_27",
|
|
497
|
-
sizeSm: "_sizeSm_1sd2v_28",
|
|
498
|
-
sizeXs: "_sizeXs_1sd2v_29",
|
|
499
|
-
rounded: "_rounded_1sd2v_35",
|
|
500
|
-
roundedLeftMD: "_roundedLeftMD_1sd2v_46",
|
|
501
|
-
roundedRightMD: "_roundedRightMD_1sd2v_47",
|
|
502
|
-
roundedLeftSM: "_roundedLeftSM_1sd2v_50",
|
|
503
|
-
roundedRightSM: "_roundedRightSM_1sd2v_51",
|
|
504
|
-
roundedLeftXS: "_roundedLeftXS_1sd2v_54",
|
|
505
|
-
roundedRightXS: "_roundedRightXS_1sd2v_55",
|
|
506
|
-
iconLeftMD: "_iconLeftMD_1sd2v_69",
|
|
507
|
-
iconRightMD: "_iconRightMD_1sd2v_70",
|
|
508
|
-
iconLeftSM: "_iconLeftSM_1sd2v_72",
|
|
509
|
-
iconRightSM: "_iconRightSM_1sd2v_73",
|
|
510
|
-
iconLeftXS: "_iconLeftXS_1sd2v_75",
|
|
511
|
-
iconRightXS: "_iconRightXS_1sd2v_76",
|
|
512
|
-
onMedium: "_onMedium_1sd2v_82",
|
|
513
|
-
onBold: "_onBold_1sd2v_87",
|
|
514
|
-
onStrong: "_onStrong_1sd2v_92",
|
|
515
|
-
onAlwaysDark: "_onAlwaysDark_1sd2v_97",
|
|
516
|
-
elevationFlat: "_elevationFlat_1sd2v_111",
|
|
517
|
-
intentNeutral: "_intentNeutral_1sd2v_120",
|
|
518
|
-
contrastBold: "_contrastBold_1sd2v_120",
|
|
519
|
-
intentBrand: "_intentBrand_1sd2v_121",
|
|
520
|
-
intentAi: "_intentAi_1sd2v_122",
|
|
521
|
-
intentNegative: "_intentNegative_1sd2v_123",
|
|
522
|
-
intentWarning: "_intentWarning_1sd2v_124",
|
|
523
|
-
intentCaution: "_intentCaution_1sd2v_125",
|
|
524
|
-
intentPositive: "_intentPositive_1sd2v_126",
|
|
525
|
-
contrastStrong: "_contrastStrong_1sd2v_128",
|
|
526
|
-
contrastMedium: "_contrastMedium_1sd2v_136",
|
|
527
|
-
contrastFaint: "_contrastFaint_1sd2v_144",
|
|
528
|
-
elevationElevated: "_elevationElevated_1sd2v_152",
|
|
529
|
-
interactive: "_interactive_1sd2v_206",
|
|
530
|
-
pressed: "_pressed_1sd2v_226",
|
|
531
|
-
removable: "_removable_1sd2v_236",
|
|
532
|
-
removeButton: "_removeButton_1sd2v_239",
|
|
533
|
-
inactive: "_inactive_1sd2v_270"
|
|
534
|
-
}, le = {
|
|
535
|
-
md: 20,
|
|
536
|
-
sm: 16,
|
|
537
|
-
xs: 12
|
|
538
|
-
}, ue = {
|
|
539
|
-
md: "text-body-medium",
|
|
540
|
-
sm: "text-body-small",
|
|
541
|
-
xs: "text-caption"
|
|
542
|
-
}, de = n(({ label: e, intent: t = "neutral", contrast: n = "faint", elevation: r = "none", size: i = "md", rounded: a = !1, icon: o, removable: s = !1, onRemove: c, removeIcon: l, maxWidth: u, inactive: d = !1, background: m, onClick: g, pressed: _, onPressedChange: v, className: y }, b) => {
|
|
543
|
-
let x = !!g || !!v, S = s && !!c, C = le[i], T = ue[i], E = r.charAt(0).toUpperCase() + r.slice(1), D = i.toUpperCase();
|
|
544
|
-
return /* @__PURE__ */ p("div", {
|
|
545
|
-
ref: b,
|
|
546
|
-
className: P(G.tag, G[`intent${t.charAt(0).toUpperCase() + t.slice(1)}`], G[`contrast${n.charAt(0).toUpperCase() + n.slice(1)}`], G[`elevation${E}`], G[`size${i.charAt(0).toUpperCase() + i.slice(1)}`], a && G.rounded, a && !o && G[`roundedLeft${D}`], a && !S && G[`roundedRight${D}`], !!o && G[`iconLeft${D}`], S && G[`iconRight${D}`], s && G.removable, x && G.interactive, m && m !== "faint" && G[m === "always-dark" ? "onAlwaysDark" : `on${m.charAt(0).toUpperCase() + m.slice(1)}`], d && G.inactive, _ && G.pressed, y),
|
|
547
|
-
style: u == null ? void 0 : { maxWidth: typeof u == "number" ? `${u}px` : u },
|
|
548
|
-
onClick: x && !d ? () => {
|
|
549
|
-
v?.(!_), g?.();
|
|
550
|
-
} : void 0,
|
|
551
|
-
onKeyDown: x && !d ? (e) => {
|
|
552
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), v?.(!_), g?.());
|
|
553
|
-
} : void 0,
|
|
554
|
-
role: x ? "button" : void 0,
|
|
555
|
-
tabIndex: x && !d ? 0 : void 0,
|
|
556
|
-
"aria-pressed": v == null ? void 0 : _,
|
|
557
|
-
"aria-disabled": d || void 0,
|
|
558
|
-
children: [
|
|
559
|
-
o && /* @__PURE__ */ f(o, { size: C }),
|
|
560
|
-
/* @__PURE__ */ f(R, {
|
|
561
|
-
size: i,
|
|
562
|
-
children: /* @__PURE__ */ f(w, {
|
|
563
|
-
variant: T,
|
|
564
|
-
as: "span",
|
|
565
|
-
color: "inherit",
|
|
566
|
-
children: e
|
|
567
|
-
})
|
|
568
|
-
}),
|
|
569
|
-
s && c && /* @__PURE__ */ f("button", {
|
|
570
|
-
type: "button",
|
|
571
|
-
className: G.removeButton,
|
|
572
|
-
onClick: (e) => {
|
|
573
|
-
e.stopPropagation(), c();
|
|
574
|
-
},
|
|
575
|
-
"aria-label": `Remove ${e}`,
|
|
576
|
-
tabIndex: -1,
|
|
577
|
-
children: f(l || h, { size: C })
|
|
578
|
-
})
|
|
579
|
-
]
|
|
580
|
-
});
|
|
581
|
-
});
|
|
582
|
-
de.displayName = "Tag";
|
|
583
|
-
var fe = { badge: "_badge_1nscu_1" }, pe = ({ count: e, isSelected: t = !1, className: n }) => {
|
|
584
|
-
if (e === 0) return null;
|
|
585
|
-
let r = e > 9 ? "+" : e.toString();
|
|
586
|
-
return /* @__PURE__ */ f("span", {
|
|
587
|
-
className: `${fe.badge} ${n || ""}`,
|
|
588
|
-
"aria-label": `${e} unread`,
|
|
589
|
-
children: /* @__PURE__ */ f(w, {
|
|
590
|
-
variant: "text-caption-emphasis",
|
|
591
|
-
as: "span",
|
|
592
|
-
color: t ? "primary" : "secondary",
|
|
593
|
-
children: r
|
|
594
|
-
})
|
|
595
|
-
});
|
|
596
|
-
};
|
|
597
|
-
pe.displayName = "Badge";
|
|
598
|
-
var me = {
|
|
599
|
-
toggle: "_toggle_1aw6v_1",
|
|
600
|
-
checked: "_checked_1aw6v_35",
|
|
601
|
-
thumb: "_thumb_1aw6v_39",
|
|
602
|
-
inactive: "_inactive_1aw6v_62"
|
|
603
|
-
}, he = n(({ checked: e = !1, onChange: t, inactive: n = !1, className: r, "aria-label": i }, a) => {
|
|
604
|
-
let [o, s] = l(!1);
|
|
605
|
-
return /* @__PURE__ */ f("button", {
|
|
606
|
-
ref: a,
|
|
607
|
-
type: "button",
|
|
608
|
-
role: "switch",
|
|
609
|
-
"aria-checked": e,
|
|
610
|
-
"aria-label": i,
|
|
611
|
-
disabled: n,
|
|
612
|
-
className: P(me.toggle, e && me.checked, n && me.inactive, r),
|
|
613
|
-
onMouseDown: (e) => {
|
|
614
|
-
n || (e.preventDefault(), s(!0));
|
|
615
|
-
},
|
|
616
|
-
onMouseUp: () => {
|
|
617
|
-
n || !o || (s(!1), t?.(!e));
|
|
618
|
-
},
|
|
619
|
-
onMouseLeave: () => {
|
|
620
|
-
o && s(!1);
|
|
621
|
-
},
|
|
622
|
-
children: /* @__PURE__ */ f("span", { className: me.thumb })
|
|
623
|
-
});
|
|
624
|
-
});
|
|
625
|
-
he.displayName = "Toggle";
|
|
626
|
-
var ge = {
|
|
627
|
-
checkbox: "_checkbox_1brbf_1",
|
|
628
|
-
inactive: "_inactive_1brbf_18",
|
|
629
|
-
box: "_box_1brbf_25",
|
|
630
|
-
boxChecked: "_boxChecked_1brbf_37",
|
|
631
|
-
checkmark: "_checkmark_1brbf_42"
|
|
632
|
-
}, _e = n(({ label: e, checked: t = !1, indeterminate: n = !1, onChange: r, inactive: i = !1, className: a, checkedIcon: o, uncheckedIcon: s, indeterminateIcon: c }, l) => {
|
|
633
|
-
let u = () => {
|
|
634
|
-
i || r?.(!t);
|
|
635
|
-
}, d = n || t ? "var(--color-foreground-primary)" : "var(--color-foreground-secondary)", m = n ? c : t ? o : s;
|
|
636
|
-
return /* @__PURE__ */ p("div", {
|
|
637
|
-
ref: l,
|
|
638
|
-
role: "checkbox",
|
|
639
|
-
"aria-checked": n ? "mixed" : t,
|
|
640
|
-
"aria-inactive": i,
|
|
641
|
-
tabIndex: i ? -1 : 0,
|
|
642
|
-
className: P(ge.checkbox, i && ge.inactive, a),
|
|
643
|
-
onClick: u,
|
|
644
|
-
onKeyDown: (e) => {
|
|
645
|
-
(e.key === " " || e.key === "Enter") && (e.preventDefault(), u());
|
|
646
|
-
},
|
|
647
|
-
children: [m ? /* @__PURE__ */ f(m, {
|
|
648
|
-
size: 20,
|
|
649
|
-
color: d
|
|
650
|
-
}) : /* @__PURE__ */ f("span", {
|
|
651
|
-
className: P(ge.box, (t || n) && ge.boxChecked),
|
|
652
|
-
children: (t || n) && /* @__PURE__ */ f("span", {
|
|
653
|
-
className: ge.checkmark,
|
|
654
|
-
children: n ? "−" : "✓"
|
|
655
|
-
})
|
|
656
|
-
}), /* @__PURE__ */ f(w, {
|
|
657
|
-
variant: "text-body-medium",
|
|
658
|
-
as: "span",
|
|
659
|
-
color: "inherit",
|
|
660
|
-
children: e
|
|
661
|
-
})]
|
|
662
|
-
});
|
|
663
|
-
});
|
|
664
|
-
_e.displayName = "Checkbox";
|
|
665
|
-
var ve = {
|
|
666
|
-
wrapper: "_wrapper_14bd3_1",
|
|
667
|
-
row: "_row_14bd3_16",
|
|
668
|
-
input: "_input_14bd3_24",
|
|
669
|
-
clearButton: "_clearButton_14bd3_49",
|
|
670
|
-
suffix: "_suffix_14bd3_65"
|
|
671
|
-
}, ye = n(({ value: e, onChange: t, id: n, placeholder: r, autoFocus: i = !1, className: a, type: o = "text", inactive: s = !1, onKeyDown: c, suffix: l, clearIcon: u, "aria-label": d }, m) => {
|
|
672
|
-
let h = o === "search" && e.length > 0 && !s;
|
|
673
|
-
return /* @__PURE__ */ f("div", {
|
|
674
|
-
ref: m,
|
|
675
|
-
className: P(ve.wrapper, a),
|
|
676
|
-
children: /* @__PURE__ */ p("div", {
|
|
677
|
-
className: ve.row,
|
|
678
|
-
children: [
|
|
679
|
-
/* @__PURE__ */ f("input", {
|
|
680
|
-
type: o,
|
|
681
|
-
id: n,
|
|
682
|
-
value: e,
|
|
683
|
-
onChange: t,
|
|
684
|
-
onKeyDown: c,
|
|
685
|
-
placeholder: r,
|
|
686
|
-
className: ve.input,
|
|
687
|
-
autoFocus: i,
|
|
688
|
-
disabled: s,
|
|
689
|
-
"aria-label": d
|
|
690
|
-
}),
|
|
691
|
-
h && /* @__PURE__ */ f("button", {
|
|
692
|
-
type: "button",
|
|
693
|
-
className: ve.clearButton,
|
|
694
|
-
onClick: () => {
|
|
695
|
-
t({ target: { value: "" } });
|
|
696
|
-
},
|
|
697
|
-
"aria-label": "Clear",
|
|
698
|
-
children: u ? /* @__PURE__ */ f(u, { size: 16 }) : /* @__PURE__ */ f("span", {
|
|
699
|
-
"aria-hidden": !0,
|
|
700
|
-
children: "×"
|
|
701
|
-
})
|
|
702
|
-
}),
|
|
703
|
-
l && /* @__PURE__ */ f("div", {
|
|
704
|
-
className: ve.suffix,
|
|
705
|
-
children: l
|
|
706
|
-
})
|
|
707
|
-
]
|
|
708
|
-
})
|
|
709
|
-
});
|
|
710
|
-
});
|
|
711
|
-
ye.displayName = "Input";
|
|
712
|
-
var K = {
|
|
713
|
-
field: "_field_6azt6_1",
|
|
714
|
-
labelRow: "_labelRow_6azt6_2",
|
|
715
|
-
track: "_track_6azt6_4",
|
|
716
|
-
trackInner: "_trackInner_6azt6_10",
|
|
717
|
-
fillTrack: "_fillTrack_6azt6_16",
|
|
718
|
-
fill: "_fill_6azt6_16",
|
|
719
|
-
trackAtMin: "_trackAtMin_6azt6_27",
|
|
720
|
-
thumb: "_thumb_6azt6_29",
|
|
721
|
-
trackInactive: "_trackInactive_6azt6_49",
|
|
722
|
-
input: "_input_6azt6_54"
|
|
723
|
-
}, be = n(({ value: e, onChange: t, min: n = 0, max: o = 100, step: s = 1, label: u, id: d, inactive: m = !1, className: h }, g) => {
|
|
724
|
-
let _ = a(), v = d ?? _, y = c(null), [b, x] = l(() => {
|
|
725
|
-
let t = o - n;
|
|
726
|
-
return t === 0 ? 0 : Math.round((e - n) / t * 100);
|
|
727
|
-
}), S = r(() => {
|
|
728
|
-
let t = o - n;
|
|
729
|
-
x(t === 0 ? 0 : Math.round((e - n) / t * 100));
|
|
730
|
-
}, [
|
|
731
|
-
e,
|
|
732
|
-
n,
|
|
733
|
-
o
|
|
734
|
-
]);
|
|
735
|
-
return i(() => {
|
|
736
|
-
S();
|
|
737
|
-
}, [S]), /* @__PURE__ */ p("div", {
|
|
738
|
-
ref: g,
|
|
739
|
-
className: P(K.field, h),
|
|
740
|
-
children: [/* @__PURE__ */ p("div", {
|
|
741
|
-
className: K.labelRow,
|
|
742
|
-
children: [/* @__PURE__ */ f(w, {
|
|
743
|
-
variant: "text-body-small-emphasis",
|
|
744
|
-
as: "label",
|
|
745
|
-
htmlFor: v,
|
|
746
|
-
children: u
|
|
747
|
-
}), /* @__PURE__ */ f(w, {
|
|
748
|
-
variant: "text-body-small-emphasis",
|
|
749
|
-
as: "span",
|
|
750
|
-
children: e
|
|
751
|
-
})]
|
|
752
|
-
}), /* @__PURE__ */ p("div", {
|
|
753
|
-
ref: y,
|
|
754
|
-
className: P(K.track, m && K.trackInactive, b === 0 && K.trackAtMin),
|
|
755
|
-
style: { "--slider-pct": b },
|
|
756
|
-
children: [/* @__PURE__ */ p("div", {
|
|
757
|
-
className: K.trackInner,
|
|
758
|
-
children: [/* @__PURE__ */ f("div", {
|
|
759
|
-
className: K.fillTrack,
|
|
760
|
-
children: /* @__PURE__ */ f("div", { className: K.fill })
|
|
761
|
-
}), /* @__PURE__ */ f("div", { className: K.thumb })]
|
|
762
|
-
}), /* @__PURE__ */ f("input", {
|
|
763
|
-
type: "range",
|
|
764
|
-
id: v,
|
|
765
|
-
min: n,
|
|
766
|
-
max: o,
|
|
767
|
-
step: s,
|
|
768
|
-
value: e,
|
|
769
|
-
onChange: (e) => {
|
|
770
|
-
t(Number(e.target.value));
|
|
771
|
-
},
|
|
772
|
-
disabled: m,
|
|
773
|
-
className: K.input,
|
|
774
|
-
"aria-valuemin": n,
|
|
775
|
-
"aria-valuemax": o,
|
|
776
|
-
"aria-valuenow": e
|
|
777
|
-
})]
|
|
778
|
-
})]
|
|
779
|
-
});
|
|
780
|
-
});
|
|
781
|
-
be.displayName = "Slider";
|
|
782
|
-
var xe = { field: "_field_140we_1" }, Se = n(({ label: e, children: t, id: n, className: r }, i) => /* @__PURE__ */ p("div", {
|
|
783
|
-
ref: i,
|
|
784
|
-
className: P(xe.field, r),
|
|
785
|
-
children: [/* @__PURE__ */ f(w, {
|
|
786
|
-
variant: "text-body-small-emphasis",
|
|
787
|
-
as: "label",
|
|
788
|
-
htmlFor: n,
|
|
789
|
-
children: e
|
|
790
|
-
}), t]
|
|
791
|
-
}));
|
|
792
|
-
Se.displayName = "Field";
|
|
793
|
-
var q = {
|
|
794
|
-
backdrop: "_backdrop_k4mxw_1",
|
|
795
|
-
modalBackdropFadeIn: "_modalBackdropFadeIn_k4mxw_1",
|
|
796
|
-
closing: "_closing_k4mxw_15",
|
|
797
|
-
modalBackdropFadeOut: "_modalBackdropFadeOut_k4mxw_1",
|
|
798
|
-
dialog: "_dialog_k4mxw_29",
|
|
799
|
-
modalDialogFadeIn: "_modalDialogFadeIn_k4mxw_1",
|
|
800
|
-
modalDialogFadeOut: "_modalDialogFadeOut_k4mxw_1",
|
|
801
|
-
header: "_header_k4mxw_51",
|
|
802
|
-
subtitle: "_subtitle_k4mxw_55",
|
|
803
|
-
body: "_body_k4mxw_60",
|
|
804
|
-
footer: "_footer_k4mxw_65"
|
|
805
|
-
}, Ce = {
|
|
806
|
-
sm: "var(--dimension-modal-width-sm, 400px)",
|
|
807
|
-
md: "var(--dimension-modal-width-md, 560px)",
|
|
808
|
-
lg: "var(--dimension-modal-width-lg, 720px)"
|
|
809
|
-
}, we = 220, Te = ({ isOpen: e, onClose: t, title: n, subtitle: r, children: o, footer: u, width: d = "md", bodyClassName: m }) => {
|
|
810
|
-
let h = c(null), g = a(), [v, y] = l(!1), [b, x] = l(e), S = s(() => d === "sm" || d === "md" || d === "lg" ? Ce[d] : d, [d]);
|
|
811
|
-
return i(() => {
|
|
812
|
-
if (e) x(!0), y(!1);
|
|
813
|
-
else if (b) {
|
|
814
|
-
y(!0);
|
|
815
|
-
let e = setTimeout(() => {
|
|
816
|
-
x(!1), y(!1);
|
|
817
|
-
}, we);
|
|
818
|
-
return () => clearTimeout(e);
|
|
819
|
-
}
|
|
820
|
-
}, [e, b]), i(() => {
|
|
821
|
-
if (!e) return;
|
|
822
|
-
let n = (e) => {
|
|
823
|
-
e.key === "Escape" && t();
|
|
824
|
-
};
|
|
825
|
-
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
826
|
-
}, [e, t]), i(() => {
|
|
827
|
-
if (!e || !b) return;
|
|
828
|
-
let t = requestAnimationFrame(() => {
|
|
829
|
-
h.current?.focus();
|
|
830
|
-
});
|
|
831
|
-
return () => cancelAnimationFrame(t);
|
|
832
|
-
}, [e, b]), b ? _(/* @__PURE__ */ f("div", {
|
|
833
|
-
className: `${q.backdrop} ${v ? q.closing : ""}`,
|
|
834
|
-
onMouseDown: (e) => {
|
|
835
|
-
e.target === e.currentTarget && t();
|
|
836
|
-
},
|
|
837
|
-
children: /* @__PURE__ */ p(M, {
|
|
838
|
-
ref: h,
|
|
839
|
-
background: "primary",
|
|
840
|
-
elevation: "floating",
|
|
841
|
-
radius: "var(--dimension-radius-275, 22px)",
|
|
842
|
-
className: q.dialog,
|
|
843
|
-
style: { width: `min(${S}, calc(100vw - 32px))` },
|
|
844
|
-
role: "dialog",
|
|
845
|
-
"aria-modal": "true",
|
|
846
|
-
"aria-labelledby": g,
|
|
847
|
-
tabIndex: -1,
|
|
848
|
-
children: [
|
|
849
|
-
/* @__PURE__ */ p("div", {
|
|
850
|
-
className: q.header,
|
|
851
|
-
children: [/* @__PURE__ */ f(w, {
|
|
852
|
-
id: g,
|
|
853
|
-
as: "h2",
|
|
854
|
-
variant: "text-title-small",
|
|
855
|
-
children: n
|
|
856
|
-
}), r != null && /* @__PURE__ */ f("div", {
|
|
857
|
-
className: q.subtitle,
|
|
858
|
-
children: r
|
|
859
|
-
})]
|
|
860
|
-
}),
|
|
861
|
-
/* @__PURE__ */ f("div", {
|
|
862
|
-
className: `${q.body} ${m ?? ""}`.trim(),
|
|
863
|
-
children: o
|
|
864
|
-
}),
|
|
865
|
-
u != null && /* @__PURE__ */ f("div", {
|
|
866
|
-
className: q.footer,
|
|
867
|
-
children: u
|
|
868
|
-
})
|
|
869
|
-
]
|
|
870
|
-
})
|
|
871
|
-
}), document.body) : null;
|
|
872
|
-
};
|
|
873
|
-
Te.displayName = "Modal";
|
|
874
|
-
var J = {
|
|
875
|
-
menuItem: "_menuItem_ozcs1_1",
|
|
876
|
-
subtext: "_subtext_ozcs1_15",
|
|
877
|
-
iconPrefix: "_iconPrefix_ozcs1_17",
|
|
878
|
-
menuItemSelected: "_menuItemSelected_ozcs1_24",
|
|
879
|
-
content: "_content_ozcs1_26",
|
|
880
|
-
label: "_label_ozcs1_34",
|
|
881
|
-
menuItemLabelTertiary: "_menuItemLabelTertiary_ozcs1_37",
|
|
882
|
-
menuItemNegative: "_menuItemNegative_ozcs1_38",
|
|
883
|
-
menuItemInactive: "_menuItemInactive_ozcs1_42",
|
|
884
|
-
toggleSuffix: "_toggleSuffix_ozcs1_44",
|
|
885
|
-
toggle: "_toggle_ozcs1_44",
|
|
886
|
-
toggleOn: "_toggleOn_ozcs1_55",
|
|
887
|
-
toggleThumb: "_toggleThumb_ozcs1_57",
|
|
888
|
-
checkSuffix: "_checkSuffix_ozcs1_70",
|
|
889
|
-
chevronSuffix: "_chevronSuffix_ozcs1_77"
|
|
890
|
-
}, Ee = n(({ label: e, onClick: t, isSelected: n = !1, isInactive: r = !1, icon: i, labelColor: a, subtext: o, showToggle: s = !1, toggleValue: c = !1, intent: l, selectionStyle: u = "highlight", showTrailingChevron: d = !1, checkIcon: m, chevronIcon: h }, g) => {
|
|
891
|
-
let _ = u === "radio";
|
|
892
|
-
return /* @__PURE__ */ p(M, {
|
|
893
|
-
ref: g,
|
|
894
|
-
as: "button",
|
|
895
|
-
interactive: !r,
|
|
896
|
-
selected: n && !(u === "noOverlay" || _),
|
|
897
|
-
radius: "sm",
|
|
898
|
-
className: `${J.menuItem} ${n ? J.menuItemSelected : ""} ${r ? J.menuItemInactive : ""} ${l === "negative" ? J.menuItemNegative : ""} ${a === "tertiary" ? J.menuItemLabelTertiary : ""}`,
|
|
899
|
-
onClick: t,
|
|
900
|
-
type: "button",
|
|
901
|
-
inactive: r,
|
|
902
|
-
children: [
|
|
903
|
-
i && /* @__PURE__ */ f("div", {
|
|
904
|
-
className: J.iconPrefix,
|
|
905
|
-
children: /* @__PURE__ */ f(i, { size: 20 })
|
|
906
|
-
}),
|
|
907
|
-
/* @__PURE__ */ p("div", {
|
|
908
|
-
className: J.content,
|
|
909
|
-
children: [/* @__PURE__ */ f(w, {
|
|
910
|
-
variant: n ? "text-body-medium-emphasis" : "text-body-medium",
|
|
911
|
-
color: a,
|
|
912
|
-
as: "span",
|
|
913
|
-
className: J.label,
|
|
914
|
-
children: e
|
|
915
|
-
}), o && /* @__PURE__ */ f(w, {
|
|
916
|
-
variant: "text-body-small",
|
|
917
|
-
as: "span",
|
|
918
|
-
className: J.subtext,
|
|
919
|
-
children: o
|
|
920
|
-
})]
|
|
921
|
-
}),
|
|
922
|
-
s && /* @__PURE__ */ f("div", {
|
|
923
|
-
className: J.toggleSuffix,
|
|
924
|
-
children: /* @__PURE__ */ f("div", {
|
|
925
|
-
className: `${J.toggle} ${c ? J.toggleOn : ""}`,
|
|
926
|
-
children: /* @__PURE__ */ f("div", { className: J.toggleThumb })
|
|
927
|
-
})
|
|
928
|
-
}),
|
|
929
|
-
_ && n && m && /* @__PURE__ */ f("div", {
|
|
930
|
-
className: J.checkSuffix,
|
|
931
|
-
children: /* @__PURE__ */ f(m, { size: 20 })
|
|
932
|
-
}),
|
|
933
|
-
d && h && /* @__PURE__ */ f("div", {
|
|
934
|
-
className: J.chevronSuffix,
|
|
935
|
-
children: /* @__PURE__ */ f(h, { size: 20 })
|
|
936
|
-
})
|
|
937
|
-
]
|
|
938
|
-
});
|
|
939
|
-
});
|
|
940
|
-
Ee.displayName = "MenuItem";
|
|
941
|
-
var De = {
|
|
942
|
-
destructiveMenuItem: "_destructiveMenuItem_1t03u_1",
|
|
943
|
-
subtext: "_subtext_1t03u_19",
|
|
944
|
-
progressFill: "_progressFill_1t03u_21",
|
|
945
|
-
content: "_content_1t03u_44",
|
|
946
|
-
label: "_label_1t03u_53"
|
|
947
|
-
}, Oe = n(({ label: e, onClick: t, holdDuration: n = 4e3, subtext: r }, a) => {
|
|
948
|
-
let [o, s] = l(0), u = c(null), d = c(0), m = c(null), h = () => {
|
|
949
|
-
s(0), u.current &&= (clearTimeout(u.current), null), m.current &&= (cancelAnimationFrame(m.current), null);
|
|
950
|
-
};
|
|
951
|
-
return i(() => () => {
|
|
952
|
-
h();
|
|
953
|
-
}, []), /* @__PURE__ */ p("button", {
|
|
954
|
-
ref: a,
|
|
955
|
-
className: De.destructiveMenuItem,
|
|
956
|
-
onMouseDown: (e) => {
|
|
957
|
-
if (e.stopPropagation(), e.preventDefault(), n === 0) {
|
|
958
|
-
t();
|
|
959
|
-
return;
|
|
960
|
-
}
|
|
961
|
-
d.current = performance.now();
|
|
962
|
-
let r = () => {
|
|
963
|
-
let e = performance.now() - d.current, t = Math.min(e / n * 100, 100);
|
|
964
|
-
s(t), t < 100 && (m.current = requestAnimationFrame(r));
|
|
965
|
-
};
|
|
966
|
-
m.current = requestAnimationFrame(r), u.current = window.setTimeout(() => {
|
|
967
|
-
t(), h();
|
|
968
|
-
}, n);
|
|
969
|
-
},
|
|
970
|
-
onMouseUp: (e) => {
|
|
971
|
-
e.stopPropagation(), h();
|
|
972
|
-
},
|
|
973
|
-
onMouseLeave: (e) => {
|
|
974
|
-
e.stopPropagation(), h();
|
|
975
|
-
},
|
|
976
|
-
type: "button",
|
|
977
|
-
children: [/* @__PURE__ */ f("div", {
|
|
978
|
-
className: De.progressFill,
|
|
979
|
-
style: { width: `${o}%` }
|
|
980
|
-
}), /* @__PURE__ */ p("div", {
|
|
981
|
-
className: De.content,
|
|
982
|
-
children: [/* @__PURE__ */ f(w, {
|
|
983
|
-
variant: "text-body-medium",
|
|
984
|
-
as: "span",
|
|
985
|
-
className: De.label,
|
|
986
|
-
children: e
|
|
987
|
-
}), r && /* @__PURE__ */ f(w, {
|
|
988
|
-
variant: "text-body-small",
|
|
989
|
-
as: "span",
|
|
990
|
-
className: De.subtext,
|
|
991
|
-
children: r
|
|
992
|
-
})]
|
|
993
|
-
})]
|
|
994
|
-
});
|
|
995
|
-
});
|
|
996
|
-
Oe.displayName = "DestructiveMenuItem";
|
|
997
|
-
//#endregion
|
|
998
|
-
//#region src/utils/css-tokens.ts
|
|
999
|
-
function ke(e, t) {
|
|
1000
|
-
if (typeof document > "u") return t;
|
|
1001
|
-
let n = getComputedStyle(document.documentElement).getPropertyValue(e).trim(), r = parseFloat(n);
|
|
1002
|
-
return Number.isNaN(r) ? t : r;
|
|
1003
|
-
}
|
|
1004
|
-
function Ae(e, t) {
|
|
1005
|
-
if (typeof document > "u") return t;
|
|
1006
|
-
let n = getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
1007
|
-
return n.endsWith("ms") ? parseFloat(n) || t : n.endsWith("s") && (parseFloat(n) || 0) * 1e3 || t;
|
|
1008
|
-
}
|
|
1009
|
-
var je = {
|
|
1010
|
-
menuContainer: "_menuContainer_ljt4d_1",
|
|
1011
|
-
menuFadeIn: "_menuFadeIn_ljt4d_1",
|
|
1012
|
-
closing: "_closing_ljt4d_21",
|
|
1013
|
-
menuFadeOut: "_menuFadeOut_ljt4d_1",
|
|
1014
|
-
menuSection: "_menuSection_ljt4d_30",
|
|
1015
|
-
sectionHeader: "_sectionHeader_ljt4d_37",
|
|
1016
|
-
sectionLabel: "_sectionLabel_ljt4d_46"
|
|
1017
|
-
}, Me = 220, Ne = ({ isOpen: e, onClose: t, anchorRef: n, items: r, sections: a, side: s = "bottom", align: u = "start", sideOffset: d = 4, alignOffset: m = 0, sideOffsetToken: h, alignOffsetToken: g, width: v, minWidth: y, maxWidth: b, matchAnchorWidth: x = !1, matchAnchorWidthOffset: S = 0, usePortal: C = !0 }) => {
|
|
1018
|
-
let [T, E] = l(!1), [D, O] = l(e), [k, A] = l(!1), [j, N] = l({
|
|
1019
|
-
x: 0,
|
|
1020
|
-
y: 0
|
|
1021
|
-
}), [P, ee] = l({
|
|
1022
|
-
width: 0,
|
|
1023
|
-
height: 0
|
|
1024
|
-
}), [F, I] = l({
|
|
1025
|
-
width: 0,
|
|
1026
|
-
height: 0
|
|
1027
|
-
}), L = c(!1), R = c(null), te = c([]), z = a || (r ? [{ items: r }] : []), B = z.some((e) => e.items.length > 0);
|
|
1028
|
-
!T && z.length > 0 && B && (te.current = z);
|
|
1029
|
-
let V = T ? te.current : z;
|
|
1030
|
-
if (i(() => {
|
|
1031
|
-
if (e) O(!0), E(!1), A(!1), L.current = !1;
|
|
1032
|
-
else if (D) {
|
|
1033
|
-
E(!0);
|
|
1034
|
-
let e = setTimeout(() => {
|
|
1035
|
-
O(!1), E(!1), L.current = !1;
|
|
1036
|
-
}, Me);
|
|
1037
|
-
return () => clearTimeout(e);
|
|
1038
|
-
}
|
|
1039
|
-
}, [e, D]), o(() => {
|
|
1040
|
-
if (!e || !D || !R.current) return;
|
|
1041
|
-
let t = () => {
|
|
1042
|
-
if (!R.current) return;
|
|
1043
|
-
let e = R.current.getBoundingClientRect();
|
|
1044
|
-
e.width > 0 && e.height > 0 && ee({
|
|
1045
|
-
width: e.width,
|
|
1046
|
-
height: e.height
|
|
1047
|
-
});
|
|
1048
|
-
};
|
|
1049
|
-
if (t(), requestAnimationFrame(() => requestAnimationFrame(t)), typeof ResizeObserver < "u") {
|
|
1050
|
-
let e = new ResizeObserver(t);
|
|
1051
|
-
return e.observe(R.current), () => e.disconnect();
|
|
1052
|
-
}
|
|
1053
|
-
}, [
|
|
1054
|
-
e,
|
|
1055
|
-
D,
|
|
1056
|
-
z.length
|
|
1057
|
-
]), o(() => {
|
|
1058
|
-
if (!e || !D || !n.current || !R.current) return;
|
|
1059
|
-
let t = () => {
|
|
1060
|
-
let e = n.current, t = R.current;
|
|
1061
|
-
if (!e || !t) return;
|
|
1062
|
-
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = i.width || P.width || 200, o = i.height || P.height || 160;
|
|
1063
|
-
I({
|
|
1064
|
-
width: r.width,
|
|
1065
|
-
height: r.height
|
|
1066
|
-
});
|
|
1067
|
-
let c = h == null ? d : ke(h, 12), l = g == null ? m : ke(g, 4), f = 0, p = 0;
|
|
1068
|
-
switch (s) {
|
|
1069
|
-
case "top":
|
|
1070
|
-
p = r.top - o - c, f = u === "start" ? r.left + l : u === "end" ? r.right - a + l : r.left + r.width / 2 - a / 2 + l;
|
|
1071
|
-
break;
|
|
1072
|
-
case "bottom":
|
|
1073
|
-
p = r.bottom + c, f = u === "start" ? r.left + l : u === "end" ? r.right - a + l : r.left + r.width / 2 - a / 2 + l;
|
|
1074
|
-
break;
|
|
1075
|
-
case "left":
|
|
1076
|
-
f = r.left - a - c, p = u === "start" ? r.top + l : u === "end" ? r.bottom - o + l : r.top + r.height / 2 - o / 2 + l;
|
|
1077
|
-
break;
|
|
1078
|
-
case "right":
|
|
1079
|
-
f = r.right + c, p = u === "start" ? r.top + l : u === "end" ? r.bottom - o + l : r.top + r.height / 2 - o / 2 + l;
|
|
1080
|
-
break;
|
|
1081
|
-
}
|
|
1082
|
-
N({
|
|
1083
|
-
x: Math.min(Math.max(f, 4), window.innerWidth - a - 4),
|
|
1084
|
-
y: Math.min(Math.max(p, 4), window.innerHeight - o - 4)
|
|
1085
|
-
}), L.current = !0, A(!0);
|
|
1086
|
-
};
|
|
1087
|
-
L.current || (t(), requestAnimationFrame(() => {
|
|
1088
|
-
L.current || t();
|
|
1089
|
-
}));
|
|
1090
|
-
let r = () => t();
|
|
1091
|
-
return window.addEventListener("scroll", r, !0), window.addEventListener("resize", r), () => {
|
|
1092
|
-
window.removeEventListener("scroll", r, !0), window.removeEventListener("resize", r);
|
|
1093
|
-
};
|
|
1094
|
-
}, [
|
|
1095
|
-
e,
|
|
1096
|
-
D,
|
|
1097
|
-
n,
|
|
1098
|
-
s,
|
|
1099
|
-
u,
|
|
1100
|
-
d,
|
|
1101
|
-
m,
|
|
1102
|
-
h,
|
|
1103
|
-
g,
|
|
1104
|
-
P.width,
|
|
1105
|
-
P.height,
|
|
1106
|
-
z.length,
|
|
1107
|
-
S
|
|
1108
|
-
]), i(() => {
|
|
1109
|
-
if (!e || !D) return;
|
|
1110
|
-
let r = (e) => {
|
|
1111
|
-
let r = e.target;
|
|
1112
|
-
R.current?.contains(r) || n.current?.contains(r) || t();
|
|
1113
|
-
};
|
|
1114
|
-
return document.addEventListener("mousedown", r, !0), () => document.removeEventListener("mousedown", r, !0);
|
|
1115
|
-
}, [
|
|
1116
|
-
e,
|
|
1117
|
-
D,
|
|
1118
|
-
t,
|
|
1119
|
-
n
|
|
1120
|
-
]), i(() => {
|
|
1121
|
-
if (!e) return;
|
|
1122
|
-
let n = (e) => {
|
|
1123
|
-
e.key === "Escape" && t();
|
|
1124
|
-
};
|
|
1125
|
-
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
1126
|
-
}, [e, t]), !D || V.length === 0) return null;
|
|
1127
|
-
let ne = (e, n) => e.isDestructive ? /* @__PURE__ */ f(Oe, {
|
|
1128
|
-
label: e.label,
|
|
1129
|
-
subtext: e.subtext,
|
|
1130
|
-
holdDuration: e.holdDuration ?? 4e3,
|
|
1131
|
-
onClick: () => {
|
|
1132
|
-
e.onClick(), e.keepOpenOnClick || t();
|
|
1133
|
-
}
|
|
1134
|
-
}, n) : /* @__PURE__ */ f(Ee, {
|
|
1135
|
-
icon: e.icon,
|
|
1136
|
-
label: e.label,
|
|
1137
|
-
subtext: e.subtext,
|
|
1138
|
-
onClick: () => {
|
|
1139
|
-
e.isInactive || (e.onClick(), e.keepOpenOnClick || t());
|
|
1140
|
-
},
|
|
1141
|
-
isSelected: e.isSelected,
|
|
1142
|
-
isInactive: e.isInactive,
|
|
1143
|
-
intent: e.intent,
|
|
1144
|
-
showToggle: e.showToggle,
|
|
1145
|
-
toggleValue: e.toggleValue,
|
|
1146
|
-
selectionStyle: e.selectionStyle
|
|
1147
|
-
}, n), re = {
|
|
1148
|
-
position: "absolute",
|
|
1149
|
-
left: 0,
|
|
1150
|
-
top: 0,
|
|
1151
|
-
transform: `translate(${Math.round(j.x)}px, ${Math.round(j.y)}px)`,
|
|
1152
|
-
willChange: "transform",
|
|
1153
|
-
zIndex: 9998,
|
|
1154
|
-
visibility: k ? "visible" : "hidden",
|
|
1155
|
-
...x && F.width > 0 ? { width: `${F.width + S}px` } : v ? { width: v } : {},
|
|
1156
|
-
...y ? { minWidth: y } : {},
|
|
1157
|
-
...b ? { maxWidth: b } : {}
|
|
1158
|
-
}, H = /* @__PURE__ */ f("div", {
|
|
1159
|
-
ref: R,
|
|
1160
|
-
className: `${je.menuContainer} ${T ? je.closing : ""}`,
|
|
1161
|
-
style: re,
|
|
1162
|
-
role: "menu",
|
|
1163
|
-
"aria-label": "Menu",
|
|
1164
|
-
children: V.map((e, t) => /* @__PURE__ */ p(M, {
|
|
1165
|
-
as: "div",
|
|
1166
|
-
className: je.menuSection,
|
|
1167
|
-
edge: t < V.length - 1 ? "bottom" : void 0,
|
|
1168
|
-
elevation: "none",
|
|
1169
|
-
children: [e.header && /* @__PURE__ */ f("div", {
|
|
1170
|
-
className: je.sectionHeader,
|
|
1171
|
-
children: /* @__PURE__ */ f(w, {
|
|
1172
|
-
variant: "text-body-small-emphasis",
|
|
1173
|
-
as: "span",
|
|
1174
|
-
className: je.sectionLabel,
|
|
1175
|
-
children: e.header
|
|
1176
|
-
})
|
|
1177
|
-
}), e.items.map((e, t) => ne(e, t))]
|
|
1178
|
-
}, t))
|
|
1179
|
-
});
|
|
1180
|
-
return C ? _(H, document.body) : H;
|
|
1181
|
-
};
|
|
1182
|
-
Ne.displayName = "Menu";
|
|
1183
|
-
var Pe = {
|
|
1184
|
-
tooltip: "_tooltip_3kdaq_1",
|
|
1185
|
-
tooltipFadeIn: "_tooltipFadeIn_3kdaq_1",
|
|
1186
|
-
tooltipInner: "_tooltipInner_3kdaq_14",
|
|
1187
|
-
keyHint: "_keyHint_3kdaq_21",
|
|
1188
|
-
closing: "_closing_3kdaq_33",
|
|
1189
|
-
tooltipFadeOut: "_tooltipFadeOut_3kdaq_1"
|
|
1190
|
-
}, Fe = 1e3, Ie = 300, Le = 200, Re = 0, ze = ({ label: t, children: n, delay: a, side: s = "top", align: u = "center", sideOffset: m = 4, alignOffset: h = 0, shortcutKey: g, shortcutKeyPosition: v = "end", usePortal: y = !0 }) => {
|
|
1191
|
-
let b = Ae("--effect-animation-delay-medium-3", Fe), x = a ?? b, S = c(null), C = c(null), T = r((t) => {
|
|
1192
|
-
S.current = t;
|
|
1193
|
-
let r = e.Children.only(n), i = "ref" in r ? r.ref : void 0;
|
|
1194
|
-
typeof i == "function" ? i(t) : i && typeof i == "object" && (i.current = t);
|
|
1195
|
-
}, [n]), [E, D] = l(!1), [O, k] = l(!1), [A, j] = l(!1), [M, N] = l({
|
|
1196
|
-
x: 0,
|
|
1197
|
-
y: 0
|
|
1198
|
-
}), [P, ee] = l({
|
|
1199
|
-
width: 0,
|
|
1200
|
-
height: 0
|
|
1201
|
-
}), F = c(null), I = c(null), L = () => {
|
|
1202
|
-
F.current &&= (clearTimeout(F.current), null);
|
|
1203
|
-
}, R = () => {
|
|
1204
|
-
if (L(), Date.now() - Re < Ie) {
|
|
1205
|
-
D(!0), j(!0), k(!1);
|
|
1206
|
-
return;
|
|
1207
|
-
}
|
|
1208
|
-
F.current = setTimeout(() => {
|
|
1209
|
-
F.current = null, D(!0), j(!0), k(!1);
|
|
1210
|
-
}, x);
|
|
1211
|
-
}, te = () => {
|
|
1212
|
-
L(), I.current &&= (clearTimeout(I.current), null), !(!E && !A) && (Re = Date.now(), k(!0), I.current = setTimeout(() => {
|
|
1213
|
-
I.current = null, j(!1), D(!1), k(!1);
|
|
1214
|
-
}, Le));
|
|
1215
|
-
};
|
|
1216
|
-
i(() => () => {
|
|
1217
|
-
L(), I.current && clearTimeout(I.current);
|
|
1218
|
-
}, []), o(() => {
|
|
1219
|
-
if (!A || !C.current) return;
|
|
1220
|
-
let e = () => {
|
|
1221
|
-
if (!C.current) return;
|
|
1222
|
-
let e = C.current.getBoundingClientRect(), t = e.width || C.current.offsetWidth, n = e.height || C.current.offsetHeight;
|
|
1223
|
-
t > 0 && n > 0 && ee({
|
|
1224
|
-
width: t,
|
|
1225
|
-
height: n
|
|
1226
|
-
});
|
|
1227
|
-
};
|
|
1228
|
-
if (e(), requestAnimationFrame(e), typeof ResizeObserver < "u") {
|
|
1229
|
-
let t = new ResizeObserver(e);
|
|
1230
|
-
return t.observe(C.current), () => t.disconnect();
|
|
1231
|
-
}
|
|
1232
|
-
}, [
|
|
1233
|
-
A,
|
|
1234
|
-
t,
|
|
1235
|
-
g,
|
|
1236
|
-
v
|
|
1237
|
-
]), o(() => {
|
|
1238
|
-
if (!A || !S.current || !C.current) return;
|
|
1239
|
-
let e = () => {
|
|
1240
|
-
if (!S.current || !C.current) return;
|
|
1241
|
-
let e = S.current.getBoundingClientRect(), t = C.current.getBoundingClientRect().width || P.width || 80, n = C.current.getBoundingClientRect().height || P.height || 24, r = 0, i = 0;
|
|
1242
|
-
switch (s) {
|
|
1243
|
-
case "top":
|
|
1244
|
-
i = e.top - n - m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
|
|
1245
|
-
break;
|
|
1246
|
-
case "bottom":
|
|
1247
|
-
i = e.bottom + m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
|
|
1248
|
-
break;
|
|
1249
|
-
case "left":
|
|
1250
|
-
r = e.left - t - m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
|
|
1251
|
-
break;
|
|
1252
|
-
case "right":
|
|
1253
|
-
r = e.right + m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
|
|
1254
|
-
break;
|
|
1255
|
-
}
|
|
1256
|
-
N({
|
|
1257
|
-
x: Math.min(Math.max(r, 4), window.innerWidth - t - 4),
|
|
1258
|
-
y: Math.min(Math.max(i, 4), window.innerHeight - n - 4)
|
|
1259
|
-
});
|
|
1260
|
-
};
|
|
1261
|
-
e(), requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1262
|
-
}, [
|
|
1263
|
-
A,
|
|
1264
|
-
s,
|
|
1265
|
-
u,
|
|
1266
|
-
m,
|
|
1267
|
-
h,
|
|
1268
|
-
P.width,
|
|
1269
|
-
P.height,
|
|
1270
|
-
t
|
|
1271
|
-
]), i(() => {
|
|
1272
|
-
if (!A) return;
|
|
1273
|
-
let e = () => {
|
|
1274
|
-
if (!S.current || !C.current) return;
|
|
1275
|
-
let e = S.current.getBoundingClientRect(), t = P.width || 80, n = P.height || 24, r = 0, i = 0;
|
|
1276
|
-
switch (s) {
|
|
1277
|
-
case "top":
|
|
1278
|
-
i = e.top - n - m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
|
|
1279
|
-
break;
|
|
1280
|
-
case "bottom":
|
|
1281
|
-
i = e.bottom + m, r = u === "start" ? e.left + h : u === "end" ? e.right - t + h : e.left + e.width / 2 - t / 2 + h;
|
|
1282
|
-
break;
|
|
1283
|
-
case "left":
|
|
1284
|
-
r = e.left - t - m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
|
|
1285
|
-
break;
|
|
1286
|
-
case "right":
|
|
1287
|
-
r = e.right + m, i = u === "start" ? e.top + h : u === "end" ? e.bottom - n + h : e.top + e.height / 2 - n / 2 + h;
|
|
1288
|
-
break;
|
|
1289
|
-
}
|
|
1290
|
-
N({
|
|
1291
|
-
x: Math.min(Math.max(r, 4), window.innerWidth - t - 4),
|
|
1292
|
-
y: Math.min(Math.max(i, 4), window.innerHeight - n - 4)
|
|
1293
|
-
});
|
|
1294
|
-
};
|
|
1295
|
-
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
1296
|
-
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
1297
|
-
};
|
|
1298
|
-
}, [
|
|
1299
|
-
A,
|
|
1300
|
-
s,
|
|
1301
|
-
u,
|
|
1302
|
-
m,
|
|
1303
|
-
h,
|
|
1304
|
-
P.width,
|
|
1305
|
-
P.height
|
|
1306
|
-
]);
|
|
1307
|
-
let z = g ? /* @__PURE__ */ f("div", {
|
|
1308
|
-
className: Pe.keyHint,
|
|
1309
|
-
"aria-hidden": !0,
|
|
1310
|
-
children: /* @__PURE__ */ f(w, {
|
|
1311
|
-
variant: "text-caption-emphasis",
|
|
1312
|
-
as: "span",
|
|
1313
|
-
color: "primary",
|
|
1314
|
-
children: g
|
|
1315
|
-
})
|
|
1316
|
-
}) : null, B = A ? /* @__PURE__ */ f("div", {
|
|
1317
|
-
ref: C,
|
|
1318
|
-
className: `${Pe.tooltip} ${O ? Pe.closing : ""}`,
|
|
1319
|
-
style: {
|
|
1320
|
-
position: "fixed",
|
|
1321
|
-
left: 0,
|
|
1322
|
-
top: 0,
|
|
1323
|
-
transform: `translate(${Math.round(M.x)}px, ${Math.round(M.y)}px)`,
|
|
1324
|
-
willChange: "transform",
|
|
1325
|
-
zIndex: 1e4
|
|
1326
|
-
},
|
|
1327
|
-
role: "tooltip",
|
|
1328
|
-
children: /* @__PURE__ */ p("div", {
|
|
1329
|
-
className: Pe.tooltipInner,
|
|
1330
|
-
children: [
|
|
1331
|
-
g && v === "start" && z,
|
|
1332
|
-
/* @__PURE__ */ f(w, {
|
|
1333
|
-
variant: "text-body-small",
|
|
1334
|
-
as: "span",
|
|
1335
|
-
color: "primary",
|
|
1336
|
-
children: t
|
|
1337
|
-
}),
|
|
1338
|
-
g && v === "end" && z
|
|
1339
|
-
]
|
|
1340
|
-
})
|
|
1341
|
-
}) : null, V = e.Children.only(n);
|
|
1342
|
-
return /* @__PURE__ */ p(d, { children: [e.isValidElement(V) ? e.cloneElement(V, {
|
|
1343
|
-
ref: T,
|
|
1344
|
-
onMouseEnter: (e) => {
|
|
1345
|
-
R(), V.props.onMouseEnter?.(e);
|
|
1346
|
-
},
|
|
1347
|
-
onMouseLeave: (e) => {
|
|
1348
|
-
te(), V.props.onMouseLeave?.(e);
|
|
1349
|
-
}
|
|
1350
|
-
}) : n, y ? _(B, document.body) : B] });
|
|
1351
|
-
};
|
|
1352
|
-
ze.displayName = "Tooltip";
|
|
1353
|
-
var Be = {
|
|
1354
|
-
selectWrapper: "_selectWrapper_17kkf_1",
|
|
1355
|
-
selectButton: "_selectButton_17kkf_6",
|
|
1356
|
-
chevron: "_chevron_17kkf_26"
|
|
1357
|
-
}, Ve = n(({ value: e, onChange: t, options: n, placeholder: r = "Select option", className: i, inactive: a = !1, id: o, chevronIcon: s }, u) => {
|
|
1358
|
-
let [d, m] = l(!1), h = c(null), g = n.find((t) => t.value === e), _ = g?.label || r, v = n.map((n) => ({
|
|
1359
|
-
label: n.label,
|
|
1360
|
-
onClick: () => {
|
|
1361
|
-
t(n.value), m(!1);
|
|
1362
|
-
},
|
|
1363
|
-
isSelected: n.value === e
|
|
1364
|
-
}));
|
|
1365
|
-
return /* @__PURE__ */ p("div", {
|
|
1366
|
-
ref: u,
|
|
1367
|
-
className: `${Be.selectWrapper} ${i || ""}`,
|
|
1368
|
-
children: [/* @__PURE__ */ p(M, {
|
|
1369
|
-
id: o,
|
|
1370
|
-
ref: h,
|
|
1371
|
-
as: "button",
|
|
1372
|
-
type: "button",
|
|
1373
|
-
elevation: "elevated",
|
|
1374
|
-
radius: "sm",
|
|
1375
|
-
interactive: !0,
|
|
1376
|
-
selected: d,
|
|
1377
|
-
className: Be.selectButton,
|
|
1378
|
-
onClick: () => {
|
|
1379
|
-
a || m((e) => !e);
|
|
1380
|
-
},
|
|
1381
|
-
inactive: a,
|
|
1382
|
-
children: [/* @__PURE__ */ f(w, {
|
|
1383
|
-
variant: "text-body-medium",
|
|
1384
|
-
as: "span",
|
|
1385
|
-
color: g ? "primary" : "secondary",
|
|
1386
|
-
children: _
|
|
1387
|
-
}), s && /* @__PURE__ */ f("span", {
|
|
1388
|
-
className: Be.chevron,
|
|
1389
|
-
children: /* @__PURE__ */ f(s, { size: 16 })
|
|
1390
|
-
})]
|
|
1391
|
-
}), /* @__PURE__ */ f(Ne, {
|
|
1392
|
-
isOpen: d,
|
|
1393
|
-
onClose: () => m(!1),
|
|
1394
|
-
anchorRef: h,
|
|
1395
|
-
items: v,
|
|
1396
|
-
side: "bottom",
|
|
1397
|
-
align: "start",
|
|
1398
|
-
sideOffset: 4,
|
|
1399
|
-
alignOffset: -4,
|
|
1400
|
-
matchAnchorWidth: !0,
|
|
1401
|
-
matchAnchorWidthOffset: 8
|
|
1402
|
-
})]
|
|
1403
|
-
});
|
|
1404
|
-
});
|
|
1405
|
-
Ve.displayName = "Select";
|
|
1406
|
-
var Y = {
|
|
1407
|
-
bannerWrapper: "_bannerWrapper_xz2oj_1",
|
|
1408
|
-
banner: "_banner_xz2oj_1",
|
|
1409
|
-
bannerHeaderSurface: "_bannerHeaderSurface_xz2oj_10",
|
|
1410
|
-
bannerHeader: "_bannerHeader_xz2oj_10",
|
|
1411
|
-
bannerBody: "_bannerBody_xz2oj_30",
|
|
1412
|
-
message: "_message_xz2oj_35",
|
|
1413
|
-
floatingPosition: "_floatingPosition_xz2oj_41",
|
|
1414
|
-
floatingToast: "_floatingToast_xz2oj_49",
|
|
1415
|
-
toastFadeIn: "_toastFadeIn_xz2oj_1",
|
|
1416
|
-
closing: "_closing_xz2oj_55",
|
|
1417
|
-
toastFadeOut: "_toastFadeOut_xz2oj_1"
|
|
1418
|
-
}, He = 4e3, Ue = 200, We = (e, t) => t === "bold" ? "var(--color-foreground-on-bold-background-primary)" : `var(--color-foreground-${t === "faint" ? "bold" : t === "medium" ? "strong" : "medium"}-${e})`, Ge = ({ intent: e, contrast: t, message: n, header: a = !1, className: o = "", floating: s = !1, onDismiss: u }) => {
|
|
1419
|
-
let d = Ae("--effect-animation-delay-long-2", He), m = We(e, t), [h, g] = l(!1), v = c(null), y = c(null), b = r(() => {
|
|
1420
|
-
v.current && clearTimeout(v.current), y.current && clearTimeout(y.current), v.current = setTimeout(() => {
|
|
1421
|
-
v.current = null, g(!0), y.current = setTimeout(() => {
|
|
1422
|
-
y.current = null, u?.();
|
|
1423
|
-
}, Ue);
|
|
1424
|
-
}, d);
|
|
1425
|
-
}, [u, d]);
|
|
1426
|
-
i(() => (s && n && b(), () => {
|
|
1427
|
-
v.current && clearTimeout(v.current), y.current && clearTimeout(y.current);
|
|
1428
|
-
}), [
|
|
1429
|
-
s,
|
|
1430
|
-
n,
|
|
1431
|
-
b
|
|
1432
|
-
]);
|
|
1433
|
-
let x = /* @__PURE__ */ f("div", {
|
|
1434
|
-
className: `${Y.bannerWrapper} ${o}`.trim(),
|
|
1435
|
-
style: { "--banner-content": m },
|
|
1436
|
-
children: /* @__PURE__ */ p(M, {
|
|
1437
|
-
elevation: s ? "floating" : "elevated",
|
|
1438
|
-
intent: e,
|
|
1439
|
-
contrast: t,
|
|
1440
|
-
radius: "sm",
|
|
1441
|
-
className: Y.banner,
|
|
1442
|
-
children: [a && /* @__PURE__ */ f("div", {
|
|
1443
|
-
className: Y.bannerHeaderSurface,
|
|
1444
|
-
children: /* @__PURE__ */ f("div", {
|
|
1445
|
-
className: Y.bannerHeader,
|
|
1446
|
-
"aria-hidden": !0
|
|
1447
|
-
})
|
|
1448
|
-
}), /* @__PURE__ */ f("div", {
|
|
1449
|
-
className: Y.bannerBody,
|
|
1450
|
-
children: /* @__PURE__ */ f(w, {
|
|
1451
|
-
variant: "text-body-medium",
|
|
1452
|
-
as: "span",
|
|
1453
|
-
className: Y.message,
|
|
1454
|
-
children: n
|
|
1455
|
-
})
|
|
1456
|
-
})]
|
|
1457
|
-
})
|
|
1458
|
-
});
|
|
1459
|
-
return s ? _(/* @__PURE__ */ f("div", {
|
|
1460
|
-
className: Y.floatingPosition,
|
|
1461
|
-
style: { zIndex: 9998 },
|
|
1462
|
-
children: /* @__PURE__ */ f("div", {
|
|
1463
|
-
className: `${Y.floatingToast} ${h ? Y.closing : ""}`,
|
|
1464
|
-
children: x
|
|
1465
|
-
})
|
|
1466
|
-
}), document.body) : x;
|
|
1467
|
-
};
|
|
1468
|
-
Ge.displayName = "Banner";
|
|
1469
|
-
var X = {
|
|
1470
|
-
tableWrapper: "_tableWrapper_1xqt4_1",
|
|
1471
|
-
tableScroll: "_tableScroll_1xqt4_9",
|
|
1472
|
-
table: "_table_1xqt4_1",
|
|
1473
|
-
headerRow: "_headerRow_1xqt4_20",
|
|
1474
|
-
headerCell: "_headerCell_1xqt4_24",
|
|
1475
|
-
sortable: "_sortable_1xqt4_38",
|
|
1476
|
-
sortIndicator: "_sortIndicator_1xqt4_46",
|
|
1477
|
-
row: "_row_1xqt4_51",
|
|
1478
|
-
cell: "_cell_1xqt4_55",
|
|
1479
|
-
rowSelected: "_rowSelected_1xqt4_59",
|
|
1480
|
-
rowClickable: "_rowClickable_1xqt4_63",
|
|
1481
|
-
alignRight: "_alignRight_1xqt4_77",
|
|
1482
|
-
alignCenter: "_alignCenter_1xqt4_78",
|
|
1483
|
-
emptyRow: "_emptyRow_1xqt4_80",
|
|
1484
|
-
skeleton: "_skeleton_1xqt4_88",
|
|
1485
|
-
shimmer: "_shimmer_1xqt4_1",
|
|
1486
|
-
pagination: "_pagination_1xqt4_102",
|
|
1487
|
-
pageButton: "_pageButton_1xqt4_112"
|
|
1488
|
-
};
|
|
1489
|
-
//#endregion
|
|
1490
|
-
//#region src/components/Table/Table.tsx
|
|
1491
|
-
function Ke(e, t) {
|
|
1492
|
-
if (e.accessorKey) return t[e.accessorKey];
|
|
1493
|
-
if (e.accessor) return e.accessor(t);
|
|
1494
|
-
}
|
|
1495
|
-
function qe(e, t, n) {
|
|
1496
|
-
let r = n === "asc" ? 1 : -1;
|
|
1497
|
-
return e == null && t == null ? 0 : e == null ? r : t == null ? -r : typeof e == "number" && typeof t == "number" ? (e - t) * r : String(e).localeCompare(String(t)) * r;
|
|
1498
|
-
}
|
|
1499
|
-
function Je({ columns: e, data: t, sortState: n, onSort: r, className: i, onRowClick: a, selectedRows: o, loading: c = !1, pagination: l, onPaginationChange: u, emptyMessage: d = "No results found." }) {
|
|
1500
|
-
let m = s(() => e.filter((e) => !e.hide), [e]), h = s(() => m.map((e) => e.width ? typeof e.width == "number" ? `${e.width}px` : e.width : "minmax(120px, 1fr)").join(" "), [m]), g = s(() => {
|
|
1501
|
-
if (!n) return t;
|
|
1502
|
-
let r = e.find((e) => e.id === n.columnId);
|
|
1503
|
-
return r ? [...t].sort((e, t) => qe(Ke(r, e), Ke(r, t), n.direction)) : t;
|
|
1504
|
-
}, [
|
|
1505
|
-
t,
|
|
1506
|
-
e,
|
|
1507
|
-
n
|
|
1508
|
-
]), _ = s(() => {
|
|
1509
|
-
if (!l) return g;
|
|
1510
|
-
let e = l.pageIndex * l.pageSize;
|
|
1511
|
-
return g.slice(e, e + l.pageSize);
|
|
1512
|
-
}, [g, l]), v = l ? Math.ceil(g.length / l.pageSize) : 1, y = !c && _.length === 0, b = (e) => {
|
|
1513
|
-
r && r(e);
|
|
1514
|
-
};
|
|
1515
|
-
return /* @__PURE__ */ p("div", {
|
|
1516
|
-
className: P(X.tableWrapper, i),
|
|
1517
|
-
children: [/* @__PURE__ */ f("div", {
|
|
1518
|
-
className: X.tableScroll,
|
|
1519
|
-
children: /* @__PURE__ */ p("div", {
|
|
1520
|
-
className: X.table,
|
|
1521
|
-
style: { gridTemplateColumns: h },
|
|
1522
|
-
role: "table",
|
|
1523
|
-
children: [
|
|
1524
|
-
/* @__PURE__ */ f("div", {
|
|
1525
|
-
className: X.headerRow,
|
|
1526
|
-
role: "row",
|
|
1527
|
-
children: m.map((e) => /* @__PURE__ */ p("div", {
|
|
1528
|
-
className: P(X.headerCell, e.sortable && X.sortable, e.align === "right" && X.alignRight, e.align === "center" && X.alignCenter),
|
|
1529
|
-
role: "columnheader",
|
|
1530
|
-
onClick: () => e.sortable && b(e.id),
|
|
1531
|
-
style: e.minWidth ? { minWidth: typeof e.minWidth == "number" ? `${e.minWidth}px` : e.minWidth } : void 0,
|
|
1532
|
-
children: [typeof e.header == "string" ? /* @__PURE__ */ f(w, {
|
|
1533
|
-
variant: "text-body-small-emphasis",
|
|
1534
|
-
as: "span",
|
|
1535
|
-
color: "secondary",
|
|
1536
|
-
children: e.header
|
|
1537
|
-
}) : e.header, n?.columnId === e.id && /* @__PURE__ */ f("span", {
|
|
1538
|
-
className: X.sortIndicator,
|
|
1539
|
-
"aria-hidden": !0,
|
|
1540
|
-
children: n.direction === "asc" ? "↑" : "↓"
|
|
1541
|
-
})]
|
|
1542
|
-
}, e.id))
|
|
1543
|
-
}),
|
|
1544
|
-
c && Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ f("div", {
|
|
1545
|
-
className: X.row,
|
|
1546
|
-
role: "row",
|
|
1547
|
-
children: m.map((e) => /* @__PURE__ */ f("div", {
|
|
1548
|
-
className: X.cell,
|
|
1549
|
-
role: "cell",
|
|
1550
|
-
children: /* @__PURE__ */ f("div", { className: X.skeleton })
|
|
1551
|
-
}, e.id))
|
|
1552
|
-
}, `skeleton-${t}`)),
|
|
1553
|
-
y && /* @__PURE__ */ f("div", {
|
|
1554
|
-
className: X.emptyRow,
|
|
1555
|
-
style: { gridColumn: "1 / -1" },
|
|
1556
|
-
children: /* @__PURE__ */ f(w, {
|
|
1557
|
-
variant: "text-body-medium",
|
|
1558
|
-
as: "p",
|
|
1559
|
-
color: "secondary",
|
|
1560
|
-
children: d
|
|
1561
|
-
})
|
|
1562
|
-
}),
|
|
1563
|
-
!c && _.map((e, t) => {
|
|
1564
|
-
let n = o?.has(t);
|
|
1565
|
-
return /* @__PURE__ */ f("div", {
|
|
1566
|
-
className: P(X.row, n && X.rowSelected, a && X.rowClickable),
|
|
1567
|
-
role: "row",
|
|
1568
|
-
onClick: () => a?.(e, t),
|
|
1569
|
-
children: m.map((n) => /* @__PURE__ */ f("div", {
|
|
1570
|
-
className: P(X.cell, n.align === "right" && X.alignRight, n.align === "center" && X.alignCenter),
|
|
1571
|
-
role: "cell",
|
|
1572
|
-
children: n.renderCell ? n.renderCell(e, t) : /* @__PURE__ */ f(w, {
|
|
1573
|
-
variant: "text-body-medium",
|
|
1574
|
-
as: "span",
|
|
1575
|
-
lineTruncation: 1,
|
|
1576
|
-
children: String(Ke(n, e) ?? "")
|
|
1577
|
-
})
|
|
1578
|
-
}, n.id))
|
|
1579
|
-
}, t);
|
|
1580
|
-
})
|
|
1581
|
-
]
|
|
1582
|
-
})
|
|
1583
|
-
}), l && u && v > 1 && /* @__PURE__ */ p("div", {
|
|
1584
|
-
className: X.pagination,
|
|
1585
|
-
children: [
|
|
1586
|
-
/* @__PURE__ */ f("button", {
|
|
1587
|
-
className: X.pageButton,
|
|
1588
|
-
disabled: l.pageIndex === 0,
|
|
1589
|
-
onClick: () => u(l.pageIndex - 1, l.pageSize),
|
|
1590
|
-
type: "button",
|
|
1591
|
-
children: /* @__PURE__ */ f(w, {
|
|
1592
|
-
variant: "text-body-small",
|
|
1593
|
-
as: "span",
|
|
1594
|
-
children: "Previous"
|
|
1595
|
-
})
|
|
1596
|
-
}),
|
|
1597
|
-
/* @__PURE__ */ f(w, {
|
|
1598
|
-
variant: "text-body-small",
|
|
1599
|
-
as: "span",
|
|
1600
|
-
color: "secondary",
|
|
1601
|
-
children: `Page ${l.pageIndex + 1} of ${v}`
|
|
1602
|
-
}),
|
|
1603
|
-
/* @__PURE__ */ f("button", {
|
|
1604
|
-
className: X.pageButton,
|
|
1605
|
-
disabled: l.pageIndex >= v - 1,
|
|
1606
|
-
onClick: () => u(l.pageIndex + 1, l.pageSize),
|
|
1607
|
-
type: "button",
|
|
1608
|
-
children: /* @__PURE__ */ f(w, {
|
|
1609
|
-
variant: "text-body-small",
|
|
1610
|
-
as: "span",
|
|
1611
|
-
children: "Next"
|
|
1612
|
-
})
|
|
1613
|
-
})
|
|
1614
|
-
]
|
|
1615
|
-
})]
|
|
1616
|
-
});
|
|
1617
|
-
}
|
|
1618
|
-
Je.displayName = "Table";
|
|
1619
|
-
var Ye = {
|
|
1620
|
-
tab: "_tab_7ngwl_5",
|
|
1621
|
-
tabSelected: "_tabSelected_7ngwl_33",
|
|
1622
|
-
onMedium: "_onMedium_7ngwl_39",
|
|
1623
|
-
onBold: "_onBold_7ngwl_44",
|
|
1624
|
-
onStrong: "_onStrong_7ngwl_52",
|
|
1625
|
-
onAlwaysDark: "_onAlwaysDark_7ngwl_60"
|
|
1626
|
-
}, Xe = n(({ id: e, label: t, isSelected: n = !1, background: r, onClick: i, className: a }, o) => {
|
|
1627
|
-
let s = r && r !== "faint" ? Ye[r === "always-dark" ? "onAlwaysDark" : `on${r.charAt(0).toUpperCase() + r.slice(1)}`] : void 0;
|
|
1628
|
-
return /* @__PURE__ */ f("button", {
|
|
1629
|
-
ref: o,
|
|
1630
|
-
id: e,
|
|
1631
|
-
className: P(Ye.tab, n && Ye.tabSelected, s, a),
|
|
1632
|
-
onClick: i,
|
|
1633
|
-
type: "button",
|
|
1634
|
-
"aria-selected": n,
|
|
1635
|
-
role: "tab",
|
|
1636
|
-
children: /* @__PURE__ */ f(w, {
|
|
1637
|
-
variant: n ? "text-body-medium-emphasis" : "text-body-medium",
|
|
1638
|
-
as: "span",
|
|
1639
|
-
children: t
|
|
1640
|
-
})
|
|
1641
|
-
});
|
|
1642
|
-
});
|
|
1643
|
-
Xe.displayName = "Tab";
|
|
1644
|
-
var Ze = { emptyState: "_emptyState_1988v_1" }, Qe = {
|
|
1645
|
-
"no-content": "No page contents to display.",
|
|
1646
|
-
"no-results": "No results found.",
|
|
1647
|
-
"no-results-filter": "No results found. Please update search criteria.",
|
|
1648
|
-
"no-access": "You don't have access to this page."
|
|
1649
|
-
}, $e = n(({ type: e = "no-content", message: t, className: n }, r) => /* @__PURE__ */ f("div", {
|
|
1650
|
-
ref: r,
|
|
1651
|
-
className: P(Ze.emptyState, n),
|
|
1652
|
-
children: /* @__PURE__ */ f(w, {
|
|
1653
|
-
variant: "text-body-medium",
|
|
1654
|
-
as: "p",
|
|
1655
|
-
color: "secondary",
|
|
1656
|
-
children: t || Qe[e]
|
|
1657
|
-
})
|
|
1658
|
-
}));
|
|
1659
|
-
$e.displayName = "EmptyState";
|
|
1660
|
-
var et = {
|
|
1661
|
-
fade: "_fade_8nnao_1",
|
|
1662
|
-
fadeTop: "_fadeTop_8nnao_13",
|
|
1663
|
-
fadeBottom: "_fadeBottom_8nnao_18",
|
|
1664
|
-
fadeLeft: "_fadeLeft_8nnao_23",
|
|
1665
|
-
fadeRight: "_fadeRight_8nnao_28"
|
|
1666
|
-
}, tt = {
|
|
1667
|
-
top: "fadeTop",
|
|
1668
|
-
bottom: "fadeBottom",
|
|
1669
|
-
left: "fadeLeft",
|
|
1670
|
-
right: "fadeRight"
|
|
1671
|
-
}, nt = n(({ side: e, height: t, background: n = "var(--color-background-secondary)", className: r, style: i = {} }, a) => /* @__PURE__ */ f("div", {
|
|
1672
|
-
ref: a,
|
|
1673
|
-
className: P(et.fade, et[tt[e]], r),
|
|
1674
|
-
style: {
|
|
1675
|
-
...i,
|
|
1676
|
-
height: t,
|
|
1677
|
-
"--background": n
|
|
1678
|
-
},
|
|
1679
|
-
"aria-hidden": "true"
|
|
1680
|
-
}));
|
|
1681
|
-
nt.displayName = "Fade";
|
|
1682
|
-
var rt = {
|
|
1683
|
-
container: "_container_153sa_1",
|
|
1684
|
-
content: "_content_153sa_8",
|
|
1685
|
-
track: "_track_153sa_20",
|
|
1686
|
-
thumb: "_thumb_153sa_35",
|
|
1687
|
-
trackHorizontal: "_trackHorizontal_153sa_49",
|
|
1688
|
-
thumbHorizontal: "_thumbHorizontal_153sa_64",
|
|
1689
|
-
thick: "_thick_153sa_78"
|
|
1690
|
-
}, it = ({ children: e, className: t, variant: n = "default", showTrackOnHover: a = !0, onScroll: o, fadeOverlay: s, contentRef: u }) => {
|
|
1691
|
-
let d = c(null), m = c(null), h = u || m, g = c(null), _ = c(null), [v, y] = l(0), [b, x] = l(0), [S, C] = l(0), [w, T] = l(0), [E, D] = l(!1), [O, k] = l(!1), [A, j] = l(!1), M = c(0), N = c(0), ee = c(0), F = c(0), I = r(() => {
|
|
1692
|
-
a && j(!0);
|
|
1693
|
-
}, [a]), L = r(() => {
|
|
1694
|
-
j(!1);
|
|
1695
|
-
}, []), R = r(() => {
|
|
1696
|
-
let e = d.current, t = h.current;
|
|
1697
|
-
if (!e || !t) return;
|
|
1698
|
-
let n = e.clientHeight, r = e.clientWidth, i = t.scrollHeight, a = t.scrollWidth, o = t.scrollTop, s = t.scrollLeft;
|
|
1699
|
-
if (i <= n) y(0);
|
|
1700
|
-
else {
|
|
1701
|
-
let e = n / i, t = Math.max(20, n * e);
|
|
1702
|
-
y(t), x(o / (i - n) * (n - t));
|
|
1703
|
-
}
|
|
1704
|
-
if (a <= r) C(0);
|
|
1705
|
-
else {
|
|
1706
|
-
let e = r / a, t = Math.max(20, r * e);
|
|
1707
|
-
C(t), T(s / (a - r) * (r - t));
|
|
1708
|
-
}
|
|
1709
|
-
}, [h]);
|
|
1710
|
-
i(() => {
|
|
1711
|
-
let e = h.current;
|
|
1712
|
-
if (!e) return;
|
|
1713
|
-
let t = (e) => {
|
|
1714
|
-
R(), o && o(e);
|
|
1715
|
-
};
|
|
1716
|
-
return e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
1717
|
-
}, [
|
|
1718
|
-
R,
|
|
1719
|
-
o,
|
|
1720
|
-
h
|
|
1721
|
-
]), i(() => {
|
|
1722
|
-
let e = h.current;
|
|
1723
|
-
if (!e) return;
|
|
1724
|
-
let t = () => R();
|
|
1725
|
-
if (window.addEventListener("resize", t), typeof ResizeObserver < "u") {
|
|
1726
|
-
let n = new ResizeObserver(t);
|
|
1727
|
-
return n.observe(e), () => {
|
|
1728
|
-
window.removeEventListener("resize", t), n.disconnect();
|
|
1729
|
-
};
|
|
1730
|
-
}
|
|
1731
|
-
return () => window.removeEventListener("resize", t);
|
|
1732
|
-
}, [R, h]), i(() => {
|
|
1733
|
-
R();
|
|
1734
|
-
}, [R, e]);
|
|
1735
|
-
let te = r((e) => {
|
|
1736
|
-
e.preventDefault(), e.stopPropagation();
|
|
1737
|
-
let t = h.current;
|
|
1738
|
-
if (!t) return;
|
|
1739
|
-
D(!0), M.current = e.clientY, N.current = t.scrollTop;
|
|
1740
|
-
let n = (e) => {
|
|
1741
|
-
let n = d.current;
|
|
1742
|
-
if (!n || !t) return;
|
|
1743
|
-
let r = e.clientY - M.current, i = t.scrollHeight - n.clientHeight, a = i / (n.clientHeight - v);
|
|
1744
|
-
t.scrollTop = Math.max(0, Math.min(i, N.current + r * a));
|
|
1745
|
-
}, r = () => {
|
|
1746
|
-
D(!1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r);
|
|
1747
|
-
};
|
|
1748
|
-
document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
|
|
1749
|
-
}, [v, h]), z = r((e) => {
|
|
1750
|
-
e.preventDefault(), e.stopPropagation();
|
|
1751
|
-
let t = h.current;
|
|
1752
|
-
if (!t) return;
|
|
1753
|
-
k(!0), ee.current = e.clientX, F.current = t.scrollLeft;
|
|
1754
|
-
let n = (e) => {
|
|
1755
|
-
let n = d.current;
|
|
1756
|
-
if (!n || !t) return;
|
|
1757
|
-
let r = e.clientX - ee.current, i = t.scrollWidth - n.clientWidth, a = i / (n.clientWidth - S);
|
|
1758
|
-
t.scrollLeft = Math.max(0, Math.min(i, F.current + r * a));
|
|
1759
|
-
}, r = () => {
|
|
1760
|
-
k(!1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r);
|
|
1761
|
-
};
|
|
1762
|
-
document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
|
|
1763
|
-
}, [S, h]), B = v > 0, V = S > 0, ne = a && (A || E || O);
|
|
1764
|
-
return /* @__PURE__ */ p("div", {
|
|
1765
|
-
ref: d,
|
|
1766
|
-
className: P(rt.container, n === "thick" && rt.thick, t),
|
|
1767
|
-
onMouseEnter: I,
|
|
1768
|
-
onMouseLeave: L,
|
|
1769
|
-
"data-dragging": E || O,
|
|
1770
|
-
"data-show-track": ne ? "true" : "false",
|
|
1771
|
-
children: [
|
|
1772
|
-
/* @__PURE__ */ f("div", {
|
|
1773
|
-
ref: h,
|
|
1774
|
-
className: rt.content,
|
|
1775
|
-
children: e
|
|
1776
|
-
}),
|
|
1777
|
-
s,
|
|
1778
|
-
B && /* @__PURE__ */ f("div", {
|
|
1779
|
-
className: rt.track,
|
|
1780
|
-
children: /* @__PURE__ */ f("div", {
|
|
1781
|
-
ref: g,
|
|
1782
|
-
className: rt.thumb,
|
|
1783
|
-
style: {
|
|
1784
|
-
height: `${v}px`,
|
|
1785
|
-
top: `${b}px`
|
|
1786
|
-
},
|
|
1787
|
-
onMouseDown: te
|
|
1788
|
-
})
|
|
1789
|
-
}),
|
|
1790
|
-
V && /* @__PURE__ */ f("div", {
|
|
1791
|
-
className: rt.trackHorizontal,
|
|
1792
|
-
children: /* @__PURE__ */ f("div", {
|
|
1793
|
-
ref: _,
|
|
1794
|
-
className: rt.thumbHorizontal,
|
|
1795
|
-
style: {
|
|
1796
|
-
width: `${S}px`,
|
|
1797
|
-
left: `${w}px`
|
|
1798
|
-
},
|
|
1799
|
-
onMouseDown: z
|
|
1800
|
-
})
|
|
1801
|
-
})
|
|
1802
|
-
]
|
|
1803
|
-
});
|
|
1804
|
-
};
|
|
1805
|
-
it.displayName = "Scrollbar";
|
|
1806
|
-
var at = {
|
|
1807
|
-
errorBoundary: "_errorBoundary_1avvb_1",
|
|
1808
|
-
errorDetails: "_errorDetails_1avvb_11"
|
|
1809
|
-
}, ot = class extends t {
|
|
1810
|
-
constructor(e) {
|
|
1811
|
-
super(e), this.handleReset = () => {
|
|
1812
|
-
this.setState({
|
|
1813
|
-
hasError: !1,
|
|
1814
|
-
error: null
|
|
1815
|
-
});
|
|
1816
|
-
}, this.state = {
|
|
1817
|
-
hasError: !1,
|
|
1818
|
-
error: null
|
|
1819
|
-
};
|
|
1820
|
-
}
|
|
1821
|
-
static getDerivedStateFromError(e) {
|
|
1822
|
-
return {
|
|
1823
|
-
hasError: !0,
|
|
1824
|
-
error: e
|
|
1825
|
-
};
|
|
1826
|
-
}
|
|
1827
|
-
componentDidCatch(e, t) {
|
|
1828
|
-
console.error("ErrorBoundary caught an error:", e, t);
|
|
1829
|
-
}
|
|
1830
|
-
render() {
|
|
1831
|
-
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ p("div", {
|
|
1832
|
-
className: at.errorBoundary,
|
|
1833
|
-
children: [/* @__PURE__ */ f($e, { type: "no-content" }), /* @__PURE__ */ f("div", {
|
|
1834
|
-
className: at.errorDetails,
|
|
1835
|
-
children: /* @__PURE__ */ f(w, {
|
|
1836
|
-
variant: "text-body-small",
|
|
1837
|
-
as: "p",
|
|
1838
|
-
color: "secondary",
|
|
1839
|
-
children: "Something went wrong. Please refresh the page."
|
|
1840
|
-
})
|
|
1841
|
-
})]
|
|
1842
|
-
}) : this.props.children;
|
|
1843
|
-
}
|
|
1844
|
-
}, Z = {
|
|
1845
|
-
sidebar: "_sidebar_1al5s_2",
|
|
1846
|
-
resizing: "_resizing_1al5s_14",
|
|
1847
|
-
collapsed: "_collapsed_1al5s_16",
|
|
1848
|
-
mobile: "_mobile_1al5s_18",
|
|
1849
|
-
mini: "_mini_1al5s_26",
|
|
1850
|
-
itemLabel: "_itemLabel_1al5s_26",
|
|
1851
|
-
itemBadge: "_itemBadge_1al5s_27",
|
|
1852
|
-
sectionHeader: "_sectionHeader_1al5s_28",
|
|
1853
|
-
backdrop: "_backdrop_1al5s_30",
|
|
1854
|
-
content: "_content_1al5s_37",
|
|
1855
|
-
footer: "_footer_1al5s_47",
|
|
1856
|
-
resizeHandle: "_resizeHandle_1al5s_54",
|
|
1857
|
-
section: "_section_1al5s_28",
|
|
1858
|
-
sectionHeaderClickable: "_sectionHeaderClickable_1al5s_87",
|
|
1859
|
-
sectionItems: "_sectionItems_1al5s_89",
|
|
1860
|
-
itemWrapper: "_itemWrapper_1al5s_96",
|
|
1861
|
-
item: "_item_1al5s_26",
|
|
1862
|
-
itemSelected: "_itemSelected_1al5s_130",
|
|
1863
|
-
itemDisabled: "_itemDisabled_1al5s_133",
|
|
1864
|
-
itemIcon: "_itemIcon_1al5s_135",
|
|
1865
|
-
subItems: "_subItems_1al5s_156"
|
|
1866
|
-
}, st = 56, ct = 240, lt = 180, ut = 140, dt = n(({ children: e, isCollapsed: t = !1, onToggle: n, width: a = "default", onWidthChange: o, resizable: s = !0, footer: u, className: m, isMobile: h = !1 }, g) => {
|
|
1867
|
-
let _ = c(null), v = g || _, [y, b] = l(!1), x = a === "mini", S = a === "mini" ? st : a === "default" ? ct : a, C = r((e) => {
|
|
1868
|
-
if (!s || !o) return;
|
|
1869
|
-
e.preventDefault(), b(!0), e.clientX;
|
|
1870
|
-
let t = (e) => {
|
|
1871
|
-
let t = e.clientX;
|
|
1872
|
-
o(t < ut ? "mini" : t < lt ? "default" : t);
|
|
1873
|
-
}, n = () => {
|
|
1874
|
-
b(!1), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1875
|
-
};
|
|
1876
|
-
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
1877
|
-
}, [s, o]);
|
|
1878
|
-
return i(() => {
|
|
1879
|
-
if (!h || t) return;
|
|
1880
|
-
let e = (e) => {
|
|
1881
|
-
e.key === "Escape" && n?.();
|
|
1882
|
-
};
|
|
1883
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1884
|
-
}, [
|
|
1885
|
-
h,
|
|
1886
|
-
t,
|
|
1887
|
-
n
|
|
1888
|
-
]), t && !h ? null : /* @__PURE__ */ p(d, { children: [h && !t && /* @__PURE__ */ f("div", {
|
|
1889
|
-
className: Z.backdrop,
|
|
1890
|
-
onClick: n,
|
|
1891
|
-
"aria-hidden": !0
|
|
1892
|
-
}), /* @__PURE__ */ p("aside", {
|
|
1893
|
-
ref: v,
|
|
1894
|
-
className: P(Z.sidebar, x && Z.mini, h && Z.mobile, t && Z.collapsed, y && Z.resizing, m),
|
|
1895
|
-
style: { width: t ? 0 : S },
|
|
1896
|
-
role: "navigation",
|
|
1897
|
-
"aria-label": "Sidebar",
|
|
1898
|
-
children: [
|
|
1899
|
-
/* @__PURE__ */ f("div", {
|
|
1900
|
-
className: Z.content,
|
|
1901
|
-
children: e
|
|
1902
|
-
}),
|
|
1903
|
-
u && /* @__PURE__ */ f("div", {
|
|
1904
|
-
className: Z.footer,
|
|
1905
|
-
children: u
|
|
1906
|
-
}),
|
|
1907
|
-
s && !h && /* @__PURE__ */ f("div", {
|
|
1908
|
-
className: Z.resizeHandle,
|
|
1909
|
-
onMouseDown: C,
|
|
1910
|
-
role: "separator",
|
|
1911
|
-
"aria-orientation": "vertical",
|
|
1912
|
-
"aria-label": "Resize sidebar"
|
|
1913
|
-
})
|
|
1914
|
-
]
|
|
1915
|
-
})] });
|
|
1916
|
-
});
|
|
1917
|
-
dt.displayName = "Sidebar";
|
|
1918
|
-
//#endregion
|
|
1919
|
-
//#region src/components/Sidebar/SidebarSection.tsx
|
|
1920
|
-
var ft = n(({ label: e, children: t, collapsible: n = !1, defaultCollapsed: r = !1, className: i }, a) => {
|
|
1921
|
-
let [o, s] = l(r);
|
|
1922
|
-
return /* @__PURE__ */ p("div", {
|
|
1923
|
-
ref: a,
|
|
1924
|
-
className: P(Z.section, i),
|
|
1925
|
-
children: [e && /* @__PURE__ */ f("div", {
|
|
1926
|
-
className: P(Z.sectionHeader, n && Z.sectionHeaderClickable),
|
|
1927
|
-
onClick: n ? () => s((e) => !e) : void 0,
|
|
1928
|
-
role: n ? "button" : void 0,
|
|
1929
|
-
"aria-expanded": n ? !o : void 0,
|
|
1930
|
-
children: /* @__PURE__ */ f(w, {
|
|
1931
|
-
variant: "text-caption-emphasis",
|
|
1932
|
-
as: "span",
|
|
1933
|
-
color: "tertiary",
|
|
1934
|
-
children: e
|
|
1935
|
-
})
|
|
1936
|
-
}), !o && /* @__PURE__ */ f("div", {
|
|
1937
|
-
className: Z.sectionItems,
|
|
1938
|
-
children: t
|
|
1939
|
-
})]
|
|
1940
|
-
});
|
|
1941
|
-
});
|
|
1942
|
-
ft.displayName = "SidebarSection";
|
|
1943
|
-
//#endregion
|
|
1944
|
-
//#region src/components/Sidebar/SidebarItem.tsx
|
|
1945
|
-
var pt = n(({ label: e, icon: t, isSelected: n = !1, isDisabled: r = !1, onClick: i, badge: a, children: o, className: s }, c) => /* @__PURE__ */ p("div", {
|
|
1946
|
-
className: P(Z.itemWrapper, s),
|
|
1947
|
-
children: [/* @__PURE__ */ p("button", {
|
|
1948
|
-
ref: c,
|
|
1949
|
-
className: P(Z.item, n && Z.itemSelected, r && Z.itemDisabled),
|
|
1950
|
-
onClick: i,
|
|
1951
|
-
disabled: r,
|
|
1952
|
-
type: "button",
|
|
1953
|
-
"aria-current": n ? "page" : void 0,
|
|
1954
|
-
children: [
|
|
1955
|
-
t && /* @__PURE__ */ f("span", {
|
|
1956
|
-
className: Z.itemIcon,
|
|
1957
|
-
children: /* @__PURE__ */ f(t, { size: 20 })
|
|
1958
|
-
}),
|
|
1959
|
-
/* @__PURE__ */ f(w, {
|
|
1960
|
-
variant: n ? "text-body-medium-emphasis" : "text-body-medium",
|
|
1961
|
-
as: "span",
|
|
1962
|
-
className: Z.itemLabel,
|
|
1963
|
-
lineTruncation: 1,
|
|
1964
|
-
children: e
|
|
1965
|
-
}),
|
|
1966
|
-
a && /* @__PURE__ */ f("span", {
|
|
1967
|
-
className: Z.itemBadge,
|
|
1968
|
-
children: a
|
|
1969
|
-
})
|
|
1970
|
-
]
|
|
1971
|
-
}), o && n && /* @__PURE__ */ f("div", {
|
|
1972
|
-
className: Z.subItems,
|
|
1973
|
-
children: o
|
|
1974
|
-
})]
|
|
1975
|
-
}));
|
|
1976
|
-
pt.displayName = "SidebarItem";
|
|
1977
|
-
var mt = {
|
|
1978
|
-
header: "_header_1902d_1",
|
|
1979
|
-
left: "_left_1902d_11",
|
|
1980
|
-
center: "_center_1902d_19",
|
|
1981
|
-
right: "_right_1902d_28"
|
|
1982
|
-
}, ht = n(({ title: e, left: t, center: n, right: r, background: i = "secondary", className: a }, o) => /* @__PURE__ */ p(M, {
|
|
1983
|
-
ref: o,
|
|
1984
|
-
as: "header",
|
|
1985
|
-
background: i,
|
|
1986
|
-
elevation: "none",
|
|
1987
|
-
edge: "bottom",
|
|
1988
|
-
className: P(mt.header, a),
|
|
1989
|
-
children: [
|
|
1990
|
-
/* @__PURE__ */ p("div", {
|
|
1991
|
-
className: mt.left,
|
|
1992
|
-
children: [t, e && !n && /* @__PURE__ */ f(w, {
|
|
1993
|
-
variant: "text-title-small",
|
|
1994
|
-
as: "h1",
|
|
1995
|
-
lineTruncation: 1,
|
|
1996
|
-
children: e
|
|
1997
|
-
})]
|
|
1998
|
-
}),
|
|
1999
|
-
n && /* @__PURE__ */ f("div", {
|
|
2000
|
-
className: mt.center,
|
|
2001
|
-
children: n
|
|
2002
|
-
}),
|
|
2003
|
-
/* @__PURE__ */ f("div", {
|
|
2004
|
-
className: mt.right,
|
|
2005
|
-
children: r
|
|
2006
|
-
})
|
|
2007
|
-
]
|
|
2008
|
-
}));
|
|
2009
|
-
ht.displayName = "Header";
|
|
2010
|
-
var gt = {
|
|
2011
|
-
group: "_group_9khnl_1",
|
|
2012
|
-
horizontal: "_horizontal_9khnl_7",
|
|
2013
|
-
radio: "_radio_9khnl_14",
|
|
2014
|
-
inactive: "_inactive_9khnl_31",
|
|
2015
|
-
circle: "_circle_9khnl_39",
|
|
2016
|
-
circleChecked: "_circleChecked_9khnl_52",
|
|
2017
|
-
dot: "_dot_9khnl_56"
|
|
2018
|
-
}, _t = n(({ value: e, onChange: t, options: n, "aria-label": r, direction: i = "vertical", inactive: a = !1, className: o }, s) => /* @__PURE__ */ f("div", {
|
|
2019
|
-
ref: s,
|
|
2020
|
-
role: "radiogroup",
|
|
2021
|
-
"aria-label": r,
|
|
2022
|
-
className: P(gt.group, i === "horizontal" && gt.horizontal, o),
|
|
2023
|
-
children: n.map((n) => /* @__PURE__ */ f(vt, {
|
|
2024
|
-
label: n.label,
|
|
2025
|
-
checked: e === n.value,
|
|
2026
|
-
inactive: a || n.inactive,
|
|
2027
|
-
onChange: () => t(n.value)
|
|
2028
|
-
}, n.value))
|
|
2029
|
-
}));
|
|
2030
|
-
_t.displayName = "RadioGroup";
|
|
2031
|
-
var vt = n(({ label: e, checked: t = !1, onChange: n, inactive: r = !1, className: i }, a) => {
|
|
2032
|
-
let o = () => {
|
|
2033
|
-
!r && !t && n?.();
|
|
2034
|
-
};
|
|
2035
|
-
return /* @__PURE__ */ p("div", {
|
|
2036
|
-
ref: a,
|
|
2037
|
-
role: "radio",
|
|
2038
|
-
"aria-checked": t,
|
|
2039
|
-
tabIndex: r ? -1 : 0,
|
|
2040
|
-
className: P(gt.radio, r && gt.inactive, i),
|
|
2041
|
-
onClick: o,
|
|
2042
|
-
onKeyDown: (e) => {
|
|
2043
|
-
(e.key === " " || e.key === "Enter") && (e.preventDefault(), o());
|
|
2044
|
-
},
|
|
2045
|
-
children: [/* @__PURE__ */ f("span", {
|
|
2046
|
-
className: P(gt.circle, t && gt.circleChecked),
|
|
2047
|
-
children: t && /* @__PURE__ */ f("span", { className: gt.dot })
|
|
2048
|
-
}), /* @__PURE__ */ f(w, {
|
|
2049
|
-
variant: "text-body-medium",
|
|
2050
|
-
as: "span",
|
|
2051
|
-
color: "inherit",
|
|
2052
|
-
children: e
|
|
2053
|
-
})]
|
|
2054
|
-
});
|
|
2055
|
-
});
|
|
2056
|
-
vt.displayName = "RadioItem";
|
|
2057
|
-
var yt = {
|
|
2058
|
-
tabGroup: "_tabGroup_1kx0a_1",
|
|
2059
|
-
tabsRow: "_tabsRow_1kx0a_7",
|
|
2060
|
-
track: "_track_1kx0a_12",
|
|
2061
|
-
indicator: "_indicator_1kx0a_18"
|
|
2062
|
-
}, bt = n(({ tabs: e, activeIndex: t = 0, onTabChange: n, className: a }, o) => {
|
|
2063
|
-
let s = c([]), [u, d] = l({
|
|
2064
|
-
left: 0,
|
|
2065
|
-
width: 0
|
|
2066
|
-
}), m = r(() => {
|
|
2067
|
-
let e = s.current[t];
|
|
2068
|
-
e && e.parentElement && d({
|
|
2069
|
-
left: e.offsetLeft,
|
|
2070
|
-
width: e.offsetWidth
|
|
2071
|
-
});
|
|
2072
|
-
}, [t]);
|
|
2073
|
-
return i(() => {
|
|
2074
|
-
m();
|
|
2075
|
-
}, [m]), i(() => {
|
|
2076
|
-
let e = new ResizeObserver(m), t = s.current[0]?.parentElement;
|
|
2077
|
-
return t && e.observe(t), () => e.disconnect();
|
|
2078
|
-
}, [m]), /* @__PURE__ */ p("div", {
|
|
2079
|
-
ref: o,
|
|
2080
|
-
role: "tablist",
|
|
2081
|
-
className: P(yt.tabGroup, a),
|
|
2082
|
-
children: [/* @__PURE__ */ f("div", {
|
|
2083
|
-
className: yt.tabsRow,
|
|
2084
|
-
children: e.map((e, r) => /* @__PURE__ */ f(Xe, {
|
|
2085
|
-
ref: (e) => {
|
|
2086
|
-
s.current[r] = e;
|
|
2087
|
-
},
|
|
2088
|
-
id: e.id,
|
|
2089
|
-
label: e.label,
|
|
2090
|
-
isSelected: r === t,
|
|
2091
|
-
onClick: () => n?.(r)
|
|
2092
|
-
}, e.id ?? r))
|
|
2093
|
-
}), /* @__PURE__ */ f("div", {
|
|
2094
|
-
className: yt.track,
|
|
2095
|
-
children: /* @__PURE__ */ f("div", {
|
|
2096
|
-
className: yt.indicator,
|
|
2097
|
-
style: {
|
|
2098
|
-
transform: `translateX(${u.left}px)`,
|
|
2099
|
-
width: u.width
|
|
2100
|
-
}
|
|
2101
|
-
})
|
|
2102
|
-
})]
|
|
2103
|
-
});
|
|
2104
|
-
});
|
|
2105
|
-
bt.displayName = "TabGroup";
|
|
2106
|
-
var Q = {
|
|
2107
|
-
accordion: "_accordion_15kid_1",
|
|
2108
|
-
item: "_item_15kid_8",
|
|
2109
|
-
inactive: "_inactive_15kid_16",
|
|
2110
|
-
trigger: "_trigger_15kid_23",
|
|
2111
|
-
chevron: "_chevron_15kid_44",
|
|
2112
|
-
chevronOpen: "_chevronOpen_15kid_52",
|
|
2113
|
-
body: "_body_15kid_58",
|
|
2114
|
-
bodyInner: "_bodyInner_15kid_63"
|
|
2115
|
-
}, xt = n(({ items: e, multiple: t = !1, expandedIds: n, onExpandedChange: r, className: i }, a) => {
|
|
2116
|
-
let [o, s] = l([]), c = n ?? o, u = (e) => {
|
|
2117
|
-
let n;
|
|
2118
|
-
n = c.includes(e) ? c.filter((t) => t !== e) : t ? [...c, e] : [e], s(n), r?.(n);
|
|
2119
|
-
};
|
|
2120
|
-
return /* @__PURE__ */ f("div", {
|
|
2121
|
-
ref: a,
|
|
2122
|
-
className: P(Q.accordion, i),
|
|
2123
|
-
children: e.map((e) => /* @__PURE__ */ f(St, {
|
|
2124
|
-
label: e.label,
|
|
2125
|
-
isExpanded: c.includes(e.id),
|
|
2126
|
-
inactive: e.inactive,
|
|
2127
|
-
onToggle: () => u(e.id),
|
|
2128
|
-
children: e.content
|
|
2129
|
-
}, e.id))
|
|
2130
|
-
});
|
|
2131
|
-
});
|
|
2132
|
-
xt.displayName = "Accordion";
|
|
2133
|
-
var St = n(({ label: e, children: t, isExpanded: n = !1, onToggle: a, inactive: o = !1, className: s }, u) => {
|
|
2134
|
-
let d = c(null), [m, h] = l(0), g = r(() => {
|
|
2135
|
-
d.current && h(d.current.scrollHeight);
|
|
2136
|
-
}, []);
|
|
2137
|
-
return i(() => {
|
|
2138
|
-
g();
|
|
2139
|
-
let e = d.current;
|
|
2140
|
-
if (!e) return;
|
|
2141
|
-
let t = new ResizeObserver(g);
|
|
2142
|
-
return t.observe(e), () => t.disconnect();
|
|
2143
|
-
}, [g]), /* @__PURE__ */ p("div", {
|
|
2144
|
-
ref: u,
|
|
2145
|
-
className: P(Q.item, o && Q.inactive, s),
|
|
2146
|
-
children: [/* @__PURE__ */ p("button", {
|
|
2147
|
-
type: "button",
|
|
2148
|
-
className: Q.trigger,
|
|
2149
|
-
onClick: () => !o && a?.(),
|
|
2150
|
-
"aria-expanded": n,
|
|
2151
|
-
tabIndex: o ? -1 : 0,
|
|
2152
|
-
children: [/* @__PURE__ */ f(w, {
|
|
2153
|
-
variant: "text-body-medium-emphasis",
|
|
2154
|
-
as: "span",
|
|
2155
|
-
color: "inherit",
|
|
2156
|
-
children: e
|
|
2157
|
-
}), /* @__PURE__ */ f("span", {
|
|
2158
|
-
className: P(Q.chevron, n && Q.chevronOpen),
|
|
2159
|
-
children: "›"
|
|
2160
|
-
})]
|
|
2161
|
-
}), /* @__PURE__ */ f("div", {
|
|
2162
|
-
className: Q.body,
|
|
2163
|
-
style: { height: n ? m : 0 },
|
|
2164
|
-
"aria-hidden": !n,
|
|
2165
|
-
children: /* @__PURE__ */ f("div", {
|
|
2166
|
-
ref: d,
|
|
2167
|
-
className: Q.bodyInner,
|
|
2168
|
-
children: t
|
|
2169
|
-
})
|
|
2170
|
-
})]
|
|
2171
|
-
});
|
|
2172
|
-
});
|
|
2173
|
-
St.displayName = "AccordionItem";
|
|
2174
|
-
var Ct = {
|
|
2175
|
-
breadcrumb: "_breadcrumb_1xq6b_1",
|
|
2176
|
-
list: "_list_1xq6b_6",
|
|
2177
|
-
item: "_item_1xq6b_15",
|
|
2178
|
-
link: "_link_1xq6b_21",
|
|
2179
|
-
separator: "_separator_1xq6b_41"
|
|
2180
|
-
}, wt = n(({ items: e, separator: t = "/", className: n }, r) => /* @__PURE__ */ f("nav", {
|
|
2181
|
-
ref: r,
|
|
2182
|
-
"aria-label": "Breadcrumb",
|
|
2183
|
-
className: P(Ct.breadcrumb, n),
|
|
2184
|
-
children: /* @__PURE__ */ f("ol", {
|
|
2185
|
-
className: Ct.list,
|
|
2186
|
-
children: e.map((n, r) => {
|
|
2187
|
-
let i = r === e.length - 1;
|
|
2188
|
-
return /* @__PURE__ */ f("li", {
|
|
2189
|
-
className: Ct.item,
|
|
2190
|
-
children: i ? /* @__PURE__ */ f(w, {
|
|
2191
|
-
variant: "text-body-medium-emphasis",
|
|
2192
|
-
as: "span",
|
|
2193
|
-
color: "primary",
|
|
2194
|
-
"aria-current": "page",
|
|
2195
|
-
children: n.label
|
|
2196
|
-
}) : /* @__PURE__ */ p(d, { children: [n.href ? /* @__PURE__ */ f("a", {
|
|
2197
|
-
href: n.href,
|
|
2198
|
-
className: Ct.link,
|
|
2199
|
-
onClick: (e) => {
|
|
2200
|
-
n.onClick && (e.preventDefault(), n.onClick());
|
|
2201
|
-
},
|
|
2202
|
-
children: /* @__PURE__ */ f(w, {
|
|
2203
|
-
variant: "text-body-medium",
|
|
2204
|
-
as: "span",
|
|
2205
|
-
color: "inherit",
|
|
2206
|
-
children: n.label
|
|
2207
|
-
})
|
|
2208
|
-
}) : /* @__PURE__ */ f("button", {
|
|
2209
|
-
type: "button",
|
|
2210
|
-
className: Ct.link,
|
|
2211
|
-
onClick: n.onClick,
|
|
2212
|
-
children: /* @__PURE__ */ f(w, {
|
|
2213
|
-
variant: "text-body-medium",
|
|
2214
|
-
as: "span",
|
|
2215
|
-
color: "inherit",
|
|
2216
|
-
children: n.label
|
|
2217
|
-
})
|
|
2218
|
-
}), /* @__PURE__ */ f("span", {
|
|
2219
|
-
className: Ct.separator,
|
|
2220
|
-
"aria-hidden": "true",
|
|
2221
|
-
children: t
|
|
2222
|
-
})] })
|
|
2223
|
-
}, r);
|
|
2224
|
-
})
|
|
2225
|
-
})
|
|
2226
|
-
}));
|
|
2227
|
-
wt.displayName = "Breadcrumb";
|
|
2228
|
-
var $ = {
|
|
2229
|
-
pagination: "_pagination_ax4c0_1",
|
|
2230
|
-
inactive: "_inactive_ax4c0_9",
|
|
2231
|
-
button: "_button_ax4c0_16",
|
|
2232
|
-
active: "_active_ax4c0_45",
|
|
2233
|
-
nav: "_nav_ax4c0_52",
|
|
2234
|
-
ellipsis: "_ellipsis_ax4c0_58"
|
|
2235
|
-
};
|
|
2236
|
-
//#endregion
|
|
2237
|
-
//#region src/components/Pagination/Pagination.tsx
|
|
2238
|
-
function Tt(e, t) {
|
|
2239
|
-
let n = [];
|
|
2240
|
-
for (let r = e; r <= t; r++) n.push(r);
|
|
2241
|
-
return n;
|
|
2242
|
-
}
|
|
2243
|
-
function Et(e, t, n) {
|
|
2244
|
-
if (t <= n * 2 + 5) return Tt(1, t);
|
|
2245
|
-
let r = Math.max(e - n, 2), i = Math.min(e + n, t - 1), a = r > 2, o = i < t - 1;
|
|
2246
|
-
return !a && o ? [
|
|
2247
|
-
...Tt(1, n * 2 + 3),
|
|
2248
|
-
"ellipsis",
|
|
2249
|
-
t
|
|
2250
|
-
] : a && !o ? [
|
|
2251
|
-
1,
|
|
2252
|
-
"ellipsis",
|
|
2253
|
-
...Tt(t - (n * 2 + 2), t)
|
|
2254
|
-
] : [
|
|
2255
|
-
1,
|
|
2256
|
-
"ellipsis",
|
|
2257
|
-
...Tt(r, i),
|
|
2258
|
-
"ellipsis",
|
|
2259
|
-
t
|
|
2260
|
-
];
|
|
2261
|
-
}
|
|
2262
|
-
var Dt = n(({ page: e, totalPages: t, onPageChange: n, siblingCount: r = 1, inactive: i = !1, className: a }, o) => {
|
|
2263
|
-
let c = s(() => Et(e, t, r), [
|
|
2264
|
-
e,
|
|
2265
|
-
t,
|
|
2266
|
-
r
|
|
2267
|
-
]);
|
|
2268
|
-
return t <= 1 ? null : /* @__PURE__ */ p("nav", {
|
|
2269
|
-
ref: o,
|
|
2270
|
-
"aria-label": "Pagination",
|
|
2271
|
-
className: P($.pagination, i && $.inactive, a),
|
|
2272
|
-
children: [
|
|
2273
|
-
/* @__PURE__ */ f("button", {
|
|
2274
|
-
type: "button",
|
|
2275
|
-
className: P($.button, $.nav),
|
|
2276
|
-
disabled: e <= 1 || i,
|
|
2277
|
-
onClick: () => n(e - 1),
|
|
2278
|
-
"aria-label": "Previous page",
|
|
2279
|
-
children: /* @__PURE__ */ f(w, {
|
|
2280
|
-
variant: "text-body-small",
|
|
2281
|
-
as: "span",
|
|
2282
|
-
color: "inherit",
|
|
2283
|
-
children: "‹"
|
|
2284
|
-
})
|
|
2285
|
-
}),
|
|
2286
|
-
c.map((t, r) => t === "ellipsis" ? /* @__PURE__ */ f("span", {
|
|
2287
|
-
className: $.ellipsis,
|
|
2288
|
-
children: /* @__PURE__ */ f(w, {
|
|
2289
|
-
variant: "text-body-small",
|
|
2290
|
-
as: "span",
|
|
2291
|
-
color: "tertiary",
|
|
2292
|
-
children: "…"
|
|
2293
|
-
})
|
|
2294
|
-
}, `e${r}`) : /* @__PURE__ */ f("button", {
|
|
2295
|
-
type: "button",
|
|
2296
|
-
className: P($.button, t === e && $.active),
|
|
2297
|
-
onClick: () => n(t),
|
|
2298
|
-
"aria-current": t === e ? "page" : void 0,
|
|
2299
|
-
disabled: i,
|
|
2300
|
-
children: /* @__PURE__ */ f(w, {
|
|
2301
|
-
variant: t === e ? "text-body-small-emphasis" : "text-body-small",
|
|
2302
|
-
as: "span",
|
|
2303
|
-
color: "inherit",
|
|
2304
|
-
children: t
|
|
2305
|
-
})
|
|
2306
|
-
}, t)),
|
|
2307
|
-
/* @__PURE__ */ f("button", {
|
|
2308
|
-
type: "button",
|
|
2309
|
-
className: P($.button, $.nav),
|
|
2310
|
-
disabled: e >= t || i,
|
|
2311
|
-
onClick: () => n(e + 1),
|
|
2312
|
-
"aria-label": "Next page",
|
|
2313
|
-
children: /* @__PURE__ */ f(w, {
|
|
2314
|
-
variant: "text-body-small",
|
|
2315
|
-
as: "span",
|
|
2316
|
-
color: "inherit",
|
|
2317
|
-
children: "›"
|
|
2318
|
-
})
|
|
2319
|
-
})
|
|
2320
|
-
]
|
|
2321
|
-
});
|
|
2322
|
-
});
|
|
2323
|
-
Dt.displayName = "Pagination";
|
|
2324
|
-
var Ot = {
|
|
2325
|
-
divider: "_divider_yo1st_1",
|
|
2326
|
-
vertical: "_vertical_yo1st_9"
|
|
2327
|
-
}, kt = n(({ orientation: e = "horizontal", className: t }, n) => /* @__PURE__ */ f("hr", {
|
|
2328
|
-
ref: n,
|
|
2329
|
-
role: "separator",
|
|
2330
|
-
"aria-orientation": e,
|
|
2331
|
-
className: P(Ot.divider, e === "vertical" && Ot.vertical, t)
|
|
2332
|
-
}));
|
|
2333
|
-
kt.displayName = "Divider";
|
|
2334
|
-
var At = {
|
|
2335
|
-
skeleton: "_skeleton_gebkr_1",
|
|
2336
|
-
text: "_text_gebkr_9",
|
|
2337
|
-
circular: "_circular_gebkr_15",
|
|
2338
|
-
rectangular: "_rectangular_gebkr_21",
|
|
2339
|
-
textGroup: "_textGroup_gebkr_29",
|
|
2340
|
-
animate: "_animate_gebkr_37",
|
|
2341
|
-
shimmer: "_shimmer_gebkr_1"
|
|
2342
|
-
}, jt = n(({ variant: e = "text", width: t, height: n, lines: r = 1, animate: i = !0, className: a }, o) => e === "text" && r > 1 ? /* @__PURE__ */ f("div", {
|
|
2343
|
-
ref: o,
|
|
2344
|
-
className: P(At.textGroup, a),
|
|
2345
|
-
style: { width: t },
|
|
2346
|
-
children: Array.from({ length: r }, (e, t) => /* @__PURE__ */ f("div", {
|
|
2347
|
-
className: P(At.skeleton, At.text, i && At.animate),
|
|
2348
|
-
style: {
|
|
2349
|
-
width: t === r - 1 ? "60%" : "100%",
|
|
2350
|
-
height: n
|
|
2351
|
-
}
|
|
2352
|
-
}, t))
|
|
2353
|
-
}) : /* @__PURE__ */ f("div", {
|
|
2354
|
-
ref: o,
|
|
2355
|
-
className: P(At.skeleton, At[e], i && At.animate, a),
|
|
2356
|
-
style: {
|
|
2357
|
-
width: t,
|
|
2358
|
-
height: n
|
|
2359
|
-
},
|
|
2360
|
-
"aria-hidden": "true"
|
|
2361
|
-
}));
|
|
2362
|
-
jt.displayName = "Skeleton";
|
|
2363
|
-
var Mt = {
|
|
2364
|
-
container: "_container_ssyox_3",
|
|
2365
|
-
topCenter: "_topCenter_ssyox_16",
|
|
2366
|
-
topRight: "_topRight_ssyox_23",
|
|
2367
|
-
bottomCenter: "_bottomCenter_ssyox_29",
|
|
2368
|
-
bottomRight: "_bottomRight_ssyox_36",
|
|
2369
|
-
toast: "_toast_ssyox_44",
|
|
2370
|
-
slideIn: "_slideIn_ssyox_1",
|
|
2371
|
-
toastExit: "_toastExit_ssyox_54",
|
|
2372
|
-
fadeOut: "_fadeOut_ssyox_1",
|
|
2373
|
-
dismiss: "_dismiss_ssyox_58"
|
|
2374
|
-
}, Nt = [], Pt = /* @__PURE__ */ new Set();
|
|
2375
|
-
function Ft() {
|
|
2376
|
-
Pt.forEach((e) => e());
|
|
2377
|
-
}
|
|
2378
|
-
function It() {
|
|
2379
|
-
return Nt;
|
|
2380
|
-
}
|
|
2381
|
-
function Lt(e) {
|
|
2382
|
-
return Pt.add(e), () => {
|
|
2383
|
-
Pt.delete(e);
|
|
2384
|
-
};
|
|
2385
|
-
}
|
|
2386
|
-
var Rt = 0, zt = {
|
|
2387
|
-
show(e) {
|
|
2388
|
-
let t = `toast-${++Rt}`;
|
|
2389
|
-
return Nt = [...Nt, {
|
|
2390
|
-
id: t,
|
|
2391
|
-
...e
|
|
2392
|
-
}], Ft(), t;
|
|
2393
|
-
},
|
|
2394
|
-
info(e, t) {
|
|
2395
|
-
return zt.show({
|
|
2396
|
-
message: e,
|
|
2397
|
-
intent: "neutral",
|
|
2398
|
-
...t
|
|
2399
|
-
});
|
|
2400
|
-
},
|
|
2401
|
-
success(e, t) {
|
|
2402
|
-
return zt.show({
|
|
2403
|
-
message: e,
|
|
2404
|
-
intent: "positive",
|
|
2405
|
-
...t
|
|
2406
|
-
});
|
|
2407
|
-
},
|
|
2408
|
-
error(e, t) {
|
|
2409
|
-
return zt.show({
|
|
2410
|
-
message: e,
|
|
2411
|
-
intent: "negative",
|
|
2412
|
-
...t
|
|
2413
|
-
});
|
|
2414
|
-
},
|
|
2415
|
-
warning(e, t) {
|
|
2416
|
-
return zt.show({
|
|
2417
|
-
message: e,
|
|
2418
|
-
intent: "warning",
|
|
2419
|
-
...t
|
|
2420
|
-
});
|
|
2421
|
-
},
|
|
2422
|
-
dismiss(e) {
|
|
2423
|
-
Nt = Nt.filter((t) => t.id !== e), Ft();
|
|
2424
|
-
},
|
|
2425
|
-
dismissAll() {
|
|
2426
|
-
Nt = [], Ft();
|
|
2427
|
-
}
|
|
2428
|
-
};
|
|
2429
|
-
function Bt() {
|
|
2430
|
-
return u(Lt, It, It);
|
|
2431
|
-
}
|
|
2432
|
-
var Vt = {
|
|
2433
|
-
neutral: "neutral",
|
|
2434
|
-
brand: "brand",
|
|
2435
|
-
positive: "positive",
|
|
2436
|
-
negative: "negative",
|
|
2437
|
-
warning: "warning",
|
|
2438
|
-
caution: "caution"
|
|
2439
|
-
}, Ht = ({ data: e }) => {
|
|
2440
|
-
let [t, n] = l(!1), a = c(void 0), o = r(() => {
|
|
2441
|
-
n(!0), setTimeout(() => {
|
|
2442
|
-
zt.dismiss(e.id), e.onDismiss?.();
|
|
2443
|
-
}, 200);
|
|
2444
|
-
}, [e]);
|
|
2445
|
-
return i(() => {
|
|
2446
|
-
let t = e.duration ?? 4e3;
|
|
2447
|
-
return t > 0 && (a.current = setTimeout(o, t)), () => {
|
|
2448
|
-
a.current && clearTimeout(a.current);
|
|
2449
|
-
};
|
|
2450
|
-
}, [e.duration, o]), /* @__PURE__ */ p(M, {
|
|
2451
|
-
intent: Vt[e.intent ?? "neutral"],
|
|
2452
|
-
contrast: "bold",
|
|
2453
|
-
elevation: "floating",
|
|
2454
|
-
radius: "lg",
|
|
2455
|
-
className: P(Mt.toast, t && Mt.toastExit),
|
|
2456
|
-
role: "status",
|
|
2457
|
-
"aria-live": "polite",
|
|
2458
|
-
children: [/* @__PURE__ */ f(w, {
|
|
2459
|
-
variant: "text-body-medium",
|
|
2460
|
-
as: "span",
|
|
2461
|
-
color: "inherit",
|
|
2462
|
-
children: e.message
|
|
2463
|
-
}), /* @__PURE__ */ f("button", {
|
|
2464
|
-
type: "button",
|
|
2465
|
-
className: Mt.dismiss,
|
|
2466
|
-
onClick: o,
|
|
2467
|
-
"aria-label": "Dismiss",
|
|
2468
|
-
children: "×"
|
|
2469
|
-
})]
|
|
2470
|
-
});
|
|
2471
|
-
}, Ut = n(({ position: e = "top-center" }, t) => {
|
|
2472
|
-
let n = Bt();
|
|
2473
|
-
return typeof document > "u" ? null : g.createPortal(/* @__PURE__ */ f("div", {
|
|
2474
|
-
ref: t,
|
|
2475
|
-
className: P(Mt.container, Mt[Wt(e)]),
|
|
2476
|
-
"aria-label": "Notifications",
|
|
2477
|
-
children: n.map((e) => /* @__PURE__ */ f(Ht, { data: e }, e.id))
|
|
2478
|
-
}), document.body);
|
|
2479
|
-
});
|
|
2480
|
-
Ut.displayName = "ToastContainer";
|
|
2481
|
-
function Wt(e) {
|
|
2482
|
-
switch (e) {
|
|
2483
|
-
case "top-center": return "topCenter";
|
|
2484
|
-
case "top-right": return "topRight";
|
|
2485
|
-
case "bottom-center": return "bottomCenter";
|
|
2486
|
-
case "bottom-right": return "bottomRight";
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
//#endregion
|
|
2490
|
-
export { xt as Accordion, St as AccordionItem, pe as Badge, Ge as Banner, wt as Breadcrumb, re as Button, se as ButtonGroup, I as Card, _e as Checkbox, Oe as DestructiveMenuItem, kt as Divider, $e as EmptyState, ot as ErrorBoundary, nt as Fade, Se as Field, ht as Header, ye as Input, z as Loader, Ne as Menu, Ee as MenuItem, Te as Modal, Dt as Pagination, _t as RadioGroup, vt as RadioItem, it as Scrollbar, Ve as Select, dt as Sidebar, pt as SidebarItem, ft as SidebarSection, jt as Skeleton, be as Slider, M as Surface, Xe as Tab, bt as TabGroup, Je as Table, de as Tag, w as Text, Ut as ToastContainer, he as Toggle, oe as ToggleButton, ce as ToggleButtonGroup, ze as Tooltip, zt as toast, Bt as useToasts };
|
|
2491
|
-
|
|
2492
|
-
//# sourceMappingURL=index.js.map
|