@bioturing/components 0.15.0 → 0.15.1
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/Badge/component.js +21 -0
- package/dist/components/Badge/component.js.map +1 -0
- package/dist/components/Badge/style.css +1 -0
- package/dist/components/Breadcrumb/component.js +46 -0
- package/dist/components/Breadcrumb/component.js.map +1 -0
- package/dist/components/Breadcrumb/style.css +1 -0
- package/dist/components/Breadcrumb/useItemRender.js +27 -0
- package/dist/components/Breadcrumb/useItemRender.js.map +1 -0
- package/dist/components/Button/component.js +9 -0
- package/dist/components/Button/component.js.map +1 -0
- package/dist/components/Button/style.css +1 -0
- package/dist/components/Checkbox/component.js +11 -0
- package/dist/components/Checkbox/component.js.map +1 -0
- package/dist/components/Checkbox/style.css +1 -0
- package/dist/components/CodeBlock/component.js +127 -0
- package/dist/components/CodeBlock/component.js.map +1 -0
- package/dist/components/CodeBlock/style.css +1 -0
- package/dist/components/DSRoot/component.js +21 -0
- package/dist/components/DSRoot/component.js.map +1 -0
- package/dist/components/DSRoot/context.js +9 -0
- package/dist/components/DSRoot/context.js.map +1 -0
- package/dist/components/DSRoot/style.css +1 -0
- package/dist/components/DropdownMenu/component.js +103 -0
- package/dist/components/DropdownMenu/component.js.map +1 -0
- package/dist/components/DropdownMenu/style.css +1 -0
- package/dist/components/Empty/component.js +48 -0
- package/dist/components/Empty/component.js.map +1 -0
- package/dist/components/Empty/style.css +1 -0
- package/dist/components/Field/component.js +30 -0
- package/dist/components/Field/component.js.map +1 -0
- package/dist/components/Field/style.css +1 -0
- package/dist/components/Form/component.js +23 -0
- package/dist/components/Form/component.js.map +1 -0
- package/dist/components/Form/item.js +30 -0
- package/dist/components/Form/item.js.map +1 -0
- package/dist/components/Form/style.css +1 -0
- package/dist/components/IconButton/component.js +49 -0
- package/dist/components/IconButton/component.js.map +1 -0
- package/dist/components/IconButton/style.css +1 -0
- package/dist/components/Input/component.js +25 -0
- package/dist/components/Input/component.js.map +1 -0
- package/dist/components/Modal/Modal.js +161 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/ModalProvider.js +70 -0
- package/dist/components/Modal/ModalProvider.js.map +1 -0
- package/dist/components/Modal/ModalService.js +25 -0
- package/dist/components/Modal/ModalService.js.map +1 -0
- package/dist/components/Modal/constants.js +5 -0
- package/dist/components/Modal/constants.js.map +1 -0
- package/dist/components/Modal/functions.js +27 -0
- package/dist/components/Modal/functions.js.map +1 -0
- package/dist/components/Modal/index.js +20 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/style.css +1 -0
- package/dist/components/Popover/component.js +12 -0
- package/dist/components/Popover/component.js.map +1 -0
- package/dist/components/PopupPanel/component.js +190 -0
- package/dist/components/PopupPanel/component.js.map +1 -0
- package/dist/components/PopupPanel/constants.js +5 -0
- package/dist/components/PopupPanel/constants.js.map +1 -0
- package/dist/components/PopupPanel/style.css +1 -0
- package/dist/components/Radio/component.js +22 -0
- package/dist/components/Radio/component.js.map +1 -0
- package/dist/components/Radio/style.css +1 -0
- package/dist/components/ScrollArea/component.js +40 -0
- package/dist/components/ScrollArea/component.js.map +1 -0
- package/dist/components/ScrollArea/style.css +1 -0
- package/dist/components/Segmented/component.js +9 -0
- package/dist/components/Segmented/component.js.map +1 -0
- package/dist/components/Segmented/style.css +1 -0
- package/dist/components/Select/component.js +135 -0
- package/dist/components/Select/component.js.map +1 -0
- package/dist/components/Select/style.css +1 -0
- package/dist/components/Slider/component.js +23 -0
- package/dist/components/Slider/component.js.map +1 -0
- package/dist/components/Spin/component.js +12 -0
- package/dist/components/Spin/component.js.map +1 -0
- package/dist/components/Spin/style.css +1 -0
- package/dist/components/Splitter/component.js +40 -0
- package/dist/components/Splitter/component.js.map +1 -0
- package/dist/components/Splitter/style.css +1 -0
- package/dist/components/Stack/Stack.js +37 -0
- package/dist/components/Stack/Stack.js.map +1 -0
- package/dist/components/Stack/StackChild.js +57 -0
- package/dist/components/Stack/StackChild.js.map +1 -0
- package/dist/components/Stack/index.js +9 -0
- package/dist/components/Stack/index.js.map +1 -0
- package/dist/components/Stack/style.css +1 -0
- package/dist/components/Switch/component.js +9 -0
- package/dist/components/Switch/component.js.map +1 -0
- package/dist/components/Switch/style.css +1 -0
- package/dist/components/Table/component.js +68 -0
- package/dist/components/Table/component.js.map +1 -0
- package/dist/components/Table/style.css +1 -0
- package/dist/components/Tag/component.js +30 -0
- package/dist/components/Tag/component.js.map +1 -0
- package/dist/components/Tag/style.css +1 -0
- package/dist/components/ThemeProvider/component.js +41 -0
- package/dist/components/ThemeProvider/component.js.map +1 -0
- package/dist/components/ThemeProvider/style.css +1 -0
- package/dist/components/Toast/component.js +101 -0
- package/dist/components/Toast/component.js.map +1 -0
- package/dist/components/Toast/function.js +25 -0
- package/dist/components/Toast/function.js.map +1 -0
- package/dist/components/Toast/style.css +1 -0
- package/dist/components/Tooltip/component.js +26 -0
- package/dist/components/Tooltip/component.js.map +1 -0
- package/dist/components/Tooltip/style.css +1 -0
- package/dist/components/Tour/component.js +35 -0
- package/dist/components/Tour/component.js.map +1 -0
- package/dist/components/Tour/style.css +1 -0
- package/dist/components/Transition/component.js +44 -0
- package/dist/components/Transition/component.js.map +1 -0
- package/dist/components/Tree/components.js +67 -0
- package/dist/components/Tree/components.js.map +1 -0
- package/dist/components/Tree/helpers.js +53 -0
- package/dist/components/Tree/helpers.js.map +1 -0
- package/dist/components/Tree/useTreeCommon.js +86 -0
- package/dist/components/Tree/useTreeCommon.js.map +1 -0
- package/dist/components/Tree/useUniqueKeysTree.js +142 -0
- package/dist/components/Tree/useUniqueKeysTree.js.map +1 -0
- package/dist/components/Truncate/component.js +93 -0
- package/dist/components/Truncate/component.js.map +1 -0
- package/dist/components/Truncate/helpers.js +36 -0
- package/dist/components/Truncate/helpers.js.map +1 -0
- package/dist/components/Truncate/style.css +1 -0
- package/dist/components/Upload/component.js +39 -0
- package/dist/components/Upload/component.js.map +1 -0
- package/dist/components/Upload/dragger.js +23 -0
- package/dist/components/Upload/dragger.js.map +1 -0
- package/dist/components/Upload/hooks.js +18 -0
- package/dist/components/Upload/hooks.js.map +1 -0
- package/dist/components/Upload/item.js +84 -0
- package/dist/components/Upload/item.js.map +1 -0
- package/dist/components/Upload/utils.js +7 -0
- package/dist/components/Upload/utils.js.map +1 -0
- package/dist/components/VerticalCollapsiblePanel/component.js +125 -0
- package/dist/components/VerticalCollapsiblePanel/component.js.map +1 -0
- package/dist/components/VerticalCollapsiblePanel/style.css +1 -0
- package/dist/components/hooks/antd.js +22 -0
- package/dist/components/hooks/antd.js.map +1 -0
- package/dist/components/hooks/base-ui.js +47 -0
- package/dist/components/hooks/base-ui.js.map +1 -0
- package/dist/components/hooks/useCharts.js +28 -0
- package/dist/components/hooks/useCharts.js.map +1 -0
- package/dist/components/hooks/useControlledState.js +15 -0
- package/dist/components/hooks/useControlledState.js.map +1 -0
- package/dist/components/utils/WithAntdTokens.js +24 -0
- package/dist/components/utils/WithAntdTokens.js.map +1 -0
- package/dist/components/utils/antdUtils.js +58 -0
- package/dist/components/utils/antdUtils.js.map +1 -0
- package/dist/components/utils/cn.js +27 -0
- package/dist/components/utils/cn.js.map +1 -0
- package/dist/components/utils/isTracebackError.js +10 -0
- package/dist/components/utils/isTracebackError.js.map +1 -0
- package/dist/components/utils/reactToString.js +23 -0
- package/dist/components/utils/reactToString.js.map +1 -0
- package/dist/index.d.ts +2497 -3
- package/dist/index.js +188 -4004
- package/dist/index.js.map +1 -0
- package/dist/metadata.js +513 -0
- package/dist/metadata.js.map +1 -0
- package/dist/tailwind.css +1 -121
- package/dist/tailwind.d.ts +1 -0
- package/dist/tokens/and-theme/tokens.js +351 -0
- package/dist/tokens/and-theme/tokens.js.map +1 -0
- package/dist/tokens/charts/index.js +18 -0
- package/dist/tokens/charts/index.js.map +1 -0
- package/dist/tokens/charts/tokens.js +208 -0
- package/dist/tokens/charts/tokens.js.map +1 -0
- package/dist/tokens/utils.js +37 -0
- package/dist/tokens/utils.js.map +1 -0
- package/package.json +10 -108
- package/dist/Badge.css +0 -6
- package/dist/Badge.js +0 -41
- package/dist/Breadcrumb.css +0 -83
- package/dist/Breadcrumb.js +0 -92
- package/dist/Checkbox.css +0 -13
- package/dist/Checkbox.js +0 -12
- package/dist/CodeBlock.css +0 -213
- package/dist/CodeBlock.js +0 -644
- package/dist/Collapse.css +0 -21
- package/dist/Collapse.js +0 -49
- package/dist/DSRoot.css +0 -667
- package/dist/DSRoot.js +0 -1428
- package/dist/DropdownMenu.css +0 -95
- package/dist/DropdownMenu.js +0 -211
- package/dist/Empty.css +0 -19
- package/dist/Empty.js +0 -53
- package/dist/Field.css +0 -14
- package/dist/Field.js +0 -66
- package/dist/Form.css +0 -64
- package/dist/Form.js +0 -125
- package/dist/IconButton.css +0 -52
- package/dist/IconButton.js +0 -82
- package/dist/Input.js +0 -48
- package/dist/Modal.css +0 -317
- package/dist/Modal.js +0 -677
- package/dist/Popover.js +0 -10
- package/dist/PopupPanel.css +0 -170
- package/dist/PopupPanel.js +0 -333
- package/dist/Radio.css +0 -14
- package/dist/Radio.js +0 -24
- package/dist/ScrollArea.css +0 -64
- package/dist/ScrollArea.js +0 -50
- package/dist/Segmented.css +0 -16
- package/dist/Segmented.js +0 -10
- package/dist/Select.css +0 -24
- package/dist/Select.js +0 -157
- package/dist/Slider.js +0 -39
- package/dist/Spin.css +0 -36
- package/dist/Spin.js +0 -33
- package/dist/Splitter.css +0 -6
- package/dist/Splitter.js +0 -47
- package/dist/Switch.css +0 -7
- package/dist/Switch.js +0 -10
- package/dist/Table.css +0 -116
- package/dist/Table.js +0 -126
- package/dist/Tag.css +0 -17
- package/dist/Tag.js +0 -24
- package/dist/ThemeProvider.css +0 -39
- package/dist/ThemeProvider.js +0 -403
- package/dist/Toast.css +0 -622
- package/dist/Toast.js +0 -1401
- package/dist/Tooltip.css +0 -6
- package/dist/Tooltip.js +0 -36
- package/dist/Tour.css +0 -73
- package/dist/Tour.js +0 -54
- package/dist/Tree.js +0 -318
- package/dist/Truncate.css +0 -31
- package/dist/Truncate.js +0 -216
- package/dist/Upload.css +0 -144
- package/dist/Upload.js +0 -516
- package/dist/VerticalCollapsiblePanel.css +0 -193
- package/dist/VerticalCollapsiblePanel.js +0 -469
- package/dist/components/Badge/component.d.ts +0 -4
- package/dist/components/Badge/index.d.ts +0 -1
- package/dist/components/Breadcrumb/component.d.ts +0 -6
- package/dist/components/Breadcrumb/index.d.ts +0 -2
- package/dist/components/Breadcrumb/types.d.ts +0 -18
- package/dist/components/Breadcrumb/useItemRender.d.ts +0 -6
- package/dist/components/Button/component.d.ts +0 -8
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Checkbox/component.d.ts +0 -11
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/CodeBlock/component.d.ts +0 -3
- package/dist/components/CodeBlock/index.d.ts +0 -2
- package/dist/components/CodeBlock/types.d.ts +0 -59
- package/dist/components/Collapse/component.d.ts +0 -14
- package/dist/components/Collapse/index.d.ts +0 -1
- package/dist/components/DSRoot/component.d.ts +0 -14
- package/dist/components/DSRoot/context.d.ts +0 -7
- package/dist/components/DSRoot/index.d.ts +0 -1
- package/dist/components/DropdownMenu/component.d.ts +0 -31
- package/dist/components/DropdownMenu/index.d.ts +0 -2
- package/dist/components/Empty/component.d.ts +0 -13
- package/dist/components/Empty/index.d.ts +0 -1
- package/dist/components/Field/component.d.ts +0 -42
- package/dist/components/Field/index.d.ts +0 -1
- package/dist/components/Form/component.d.ts +0 -19
- package/dist/components/Form/index.d.ts +0 -1
- package/dist/components/Form/item.d.ts +0 -5
- package/dist/components/IconButton/component.d.ts +0 -30
- package/dist/components/IconButton/index.d.ts +0 -1
- package/dist/components/Input/component.d.ts +0 -30
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -84
- package/dist/components/Modal/ModalProvider.d.ts +0 -5
- package/dist/components/Modal/ModalService.d.ts +0 -33
- package/dist/components/Modal/constants.d.ts +0 -9
- package/dist/components/Modal/functions.d.ts +0 -27
- package/dist/components/Modal/index.d.ts +0 -15
- package/dist/components/Popover/component.d.ts +0 -9
- package/dist/components/Popover/index.d.ts +0 -1
- package/dist/components/PopupPanel/component.d.ts +0 -61
- package/dist/components/PopupPanel/constants.d.ts +0 -7
- package/dist/components/PopupPanel/index.d.ts +0 -1
- package/dist/components/Radio/component.d.ts +0 -8
- package/dist/components/Radio/index.d.ts +0 -2
- package/dist/components/Radio/interface.d.ts +0 -5
- package/dist/components/ScrollArea/component.d.ts +0 -32
- package/dist/components/ScrollArea/index.d.ts +0 -1
- package/dist/components/Segmented/component.d.ts +0 -10
- package/dist/components/Segmented/index.d.ts +0 -1
- package/dist/components/Select/component.d.ts +0 -24
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Slider/component.d.ts +0 -5
- package/dist/components/Slider/index.d.ts +0 -1
- package/dist/components/Spin/component.d.ts +0 -4
- package/dist/components/Spin/index.d.ts +0 -1
- package/dist/components/Splitter/component.d.ts +0 -13
- package/dist/components/Splitter/index.d.ts +0 -1
- package/dist/components/Stack/Stack.d.ts +0 -39
- package/dist/components/Stack/StackChild.d.ts +0 -30
- package/dist/components/Stack/index.d.ts +0 -8
- package/dist/components/Switch/component.d.ts +0 -9
- package/dist/components/Switch/index.d.ts +0 -1
- package/dist/components/Table/component.d.ts +0 -20
- package/dist/components/Table/index.d.ts +0 -1
- package/dist/components/Tag/component.d.ts +0 -12
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/ThemeProvider/component.d.ts +0 -7
- package/dist/components/ThemeProvider/index.d.ts +0 -1
- package/dist/components/Toast/component.d.ts +0 -15
- package/dist/components/Toast/function.d.ts +0 -10
- package/dist/components/Toast/index.d.ts +0 -3
- package/dist/components/Toast/types.d.ts +0 -3
- package/dist/components/Tooltip/component.d.ts +0 -10
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/Tour/component.d.ts +0 -8
- package/dist/components/Tour/index.d.ts +0 -1
- package/dist/components/Transition/component.d.ts +0 -17
- package/dist/components/Transition/index.d.ts +0 -1
- package/dist/components/Tree/components.d.ts +0 -13
- package/dist/components/Tree/helpers.d.ts +0 -4
- package/dist/components/Tree/index.d.ts +0 -4
- package/dist/components/Tree/types.d.ts +0 -55
- package/dist/components/Tree/useTreeCommon.d.ts +0 -178
- package/dist/components/Tree/useUniqueKeysTree.d.ts +0 -33
- package/dist/components/Truncate/component.d.ts +0 -15
- package/dist/components/Truncate/helpers.d.ts +0 -5
- package/dist/components/Truncate/index.d.ts +0 -1
- package/dist/components/Upload/component.d.ts +0 -16
- package/dist/components/Upload/dragger.d.ts +0 -13
- package/dist/components/Upload/hooks.d.ts +0 -5
- package/dist/components/Upload/index.d.ts +0 -4
- package/dist/components/Upload/item.d.ts +0 -11
- package/dist/components/Upload/utils.d.ts +0 -1
- package/dist/components/VerticalCollapsiblePanel/component.d.ts +0 -65
- package/dist/components/VerticalCollapsiblePanel/index.d.ts +0 -1
- package/dist/components/hooks/antd.d.ts +0 -11
- package/dist/components/hooks/base-ui.d.ts +0 -7
- package/dist/components/hooks/index.d.ts +0 -4
- package/dist/components/hooks/useCharts.d.ts +0 -22
- package/dist/components/hooks/useControlledState.d.ts +0 -1
- package/dist/components/index.d.ts +0 -41
- package/dist/components/utils/WithAntdTokens.d.ts +0 -7
- package/dist/components/utils/antdUtils.d.ts +0 -15
- package/dist/components/utils/client.d.ts +0 -2
- package/dist/components/utils/cn.d.ts +0 -4
- package/dist/components/utils/index.d.ts +0 -3
- package/dist/components/utils/isTracebackError.d.ts +0 -1
- package/dist/components/utils/main.d.ts +0 -3
- package/dist/components/utils/reactToString.d.ts +0 -2
- package/dist/components/utils/types.d.ts +0 -9
- package/dist/hooks.js +0 -961
- package/dist/index.css +0 -1471
- package/dist/metadata.d.ts +0 -363
- package/dist/tokens/and-theme/index.d.ts +0 -1
- package/dist/tokens/and-theme/tokens.d.ts +0 -5
- package/dist/tokens/charts/index.d.ts +0 -6
- package/dist/tokens/charts/tokens.d.ts +0 -455
- package/dist/tokens/index.d.ts +0 -2
- package/dist/tokens/utils.d.ts +0 -16
- package/dist/utils.js +0 -120
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.ds-truncate {
|
|
3
|
-
white-space: nowrap;
|
|
4
|
-
flex-grow: 1;
|
|
5
|
-
width: 100%;
|
|
6
|
-
min-width: 0;
|
|
7
|
-
max-width: 100%;
|
|
8
|
-
display: block;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ds-truncate-end {
|
|
13
|
-
text-overflow: ellipsis;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ds-truncate-middle {
|
|
17
|
-
text-overflow: clip;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ds-truncate-multiline {
|
|
21
|
-
-webkit-line-clamp: var(--ds-line-clamp, 2);
|
|
22
|
-
line-clamp: var(--ds-line-clamp, 2);
|
|
23
|
-
white-space: normal;
|
|
24
|
-
text-overflow: ellipsis;
|
|
25
|
-
word-break: break-word;
|
|
26
|
-
-webkit-box-orient: vertical;
|
|
27
|
-
display: -webkit-box;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@layer components {
|
|
33
|
-
.ds-collapsible-panel {
|
|
34
|
-
flex-basis: fit-content;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
flex-grow: 0;
|
|
37
|
-
flex-shrink: 0;
|
|
38
|
-
max-height: 100%;
|
|
39
|
-
display: flex;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ds-collapsible-panel[data-closed] {
|
|
44
|
-
transition: all .2s ease-out;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.ds-collapsible-panel[data-open] {
|
|
48
|
-
flex-grow: 1;
|
|
49
|
-
transition: all .2s ease-in;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.ds-collapsible-panel-trigger {
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
text-align: left;
|
|
55
|
-
background: none;
|
|
56
|
-
border: none;
|
|
57
|
-
padding: 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.ds-collapsible-panel-header {
|
|
61
|
-
border-bottom: 1px solid #0000;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
flex-grow: 0;
|
|
64
|
-
transition: all .2s ease-in-out;
|
|
65
|
-
display: flex;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.ds-collapsible-panel-header-inner {
|
|
69
|
-
align-items: center;
|
|
70
|
-
gap: .5rem;
|
|
71
|
-
padding: .75rem 1rem;
|
|
72
|
-
transition: width .2s;
|
|
73
|
-
display: flex;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ds-collapsible-panel-header-after {
|
|
77
|
-
align-items: center;
|
|
78
|
-
gap: .5rem;
|
|
79
|
-
padding: 0 1rem .75rem;
|
|
80
|
-
display: flex;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.ds-collapsible-panel[data-open] .ds-collapsible-panel-header {
|
|
84
|
-
border-bottom: 1px solid var(--ds-color-split);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.ds-collapsible-panel[data-open] .ds-collapsible-panel-header-inner {
|
|
88
|
-
flex-grow: 1;
|
|
89
|
-
justify-content: flex-start;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.ds-collapsible-panel-trigger:hover .ds-collapsible-panel-header {
|
|
93
|
-
background-color: var(--ds-color-bg-hover);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.ds-collapsible-panel-header-actions {
|
|
97
|
-
flex-grow: 0;
|
|
98
|
-
flex-shrink: 0;
|
|
99
|
-
justify-content: center;
|
|
100
|
-
align-items: center;
|
|
101
|
-
gap: .5rem;
|
|
102
|
-
display: flex;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.ds-collapsible-panel-header-text {
|
|
106
|
-
font-size: var(--text-ds-h5);
|
|
107
|
-
font-weight: var(--text-ds-h5--font-weight);
|
|
108
|
-
line-height: var(--text-ds-h5--line-height);
|
|
109
|
-
color: var(--ds-color-text);
|
|
110
|
-
flex-grow: 1;
|
|
111
|
-
display: inline-block;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.ds-collapsible-panel[data-closed] .ds-collapsible-panel-header-inner {
|
|
115
|
-
writing-mode: vertical-rl;
|
|
116
|
-
transform: rotate(180deg);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.ds-collapsible-panel-content {
|
|
120
|
-
flex-direction: column;
|
|
121
|
-
flex-grow: 1;
|
|
122
|
-
flex-shrink: 1;
|
|
123
|
-
display: flex;
|
|
124
|
-
overflow-y: auto;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.ds-collapsible-panel-content[data-closed] {
|
|
128
|
-
display: none;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.ds-collapsible-panel-body {
|
|
132
|
-
padding: var(--ds-content-padding);
|
|
133
|
-
flex-grow: 1;
|
|
134
|
-
transition: opacity .2s ease-in-out;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.ds-collapsible-panel-body[data-starting], .ds-collapsible-panel-body[data-ending] {
|
|
138
|
-
opacity: 0;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@layer components {
|
|
143
|
-
.ds-icon-button {
|
|
144
|
-
cursor: pointer;
|
|
145
|
-
color: var(--ds-color-icon);
|
|
146
|
-
background-color: #0000;
|
|
147
|
-
border: none;
|
|
148
|
-
border-radius: 999px;
|
|
149
|
-
justify-content: center;
|
|
150
|
-
align-items: center;
|
|
151
|
-
transition: all .2s;
|
|
152
|
-
display: inline-flex;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.ds-icon-button:hover {
|
|
156
|
-
background-color: var(--ds-color-fill-secondary);
|
|
157
|
-
color: var(--ds-color-icon-hover);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.ds-icon-button:active, .ds-icon-button.ds-popover-open {
|
|
161
|
-
background-color: var(--ds-color-primary-bg);
|
|
162
|
-
color: var(--ds-color-primary);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.ds-icon-button:focus {
|
|
166
|
-
outline: none;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.ds-icon-button:disabled {
|
|
170
|
-
cursor: not-allowed;
|
|
171
|
-
pointer-events: none;
|
|
172
|
-
color: var(--ds-color-text-disabled);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.ds-icon-button.ds-icon-button-medium {
|
|
176
|
-
width: 1.5rem;
|
|
177
|
-
height: 1.5rem;
|
|
178
|
-
padding: .125rem;
|
|
179
|
-
font-size: 1.25rem;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.ds-icon-button.ds-icon-button-small {
|
|
183
|
-
width: 1.25rem;
|
|
184
|
-
height: 1.25rem;
|
|
185
|
-
padding: .125rem;
|
|
186
|
-
font-size: 1rem;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.ds-icon-button.ds-icon-button-negative-margin {
|
|
190
|
-
margin: -.125rem;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
@@ -1,469 +0,0 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__ from "@base-ui-components/react";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__ from "@bioturing/assets";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__ from "antd/es/config-provider";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_es_theme_useToken_e8911485__ from "antd/es/theme/useToken";
|
|
7
|
-
import "tailwind-merge";
|
|
8
|
-
import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_use_render_2fb9dc6d__ from "@base-ui-components/react/use-render";
|
|
9
|
-
import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_merge_props_04b69945__ from "@base-ui-components/react/merge-props";
|
|
10
|
-
import * as __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__ from "@base-ui-components/react/utils";
|
|
11
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__ from "react-dom";
|
|
12
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
|
|
13
|
-
function cx(...args) {
|
|
14
|
-
const classes = [];
|
|
15
|
-
for (const arg of args)if (arg) {
|
|
16
|
-
if ("string" == typeof arg || "number" == typeof arg) classes.push(String(arg));
|
|
17
|
-
else if (Array.isArray(arg)) classes.push(...cx(...arg));
|
|
18
|
-
else if ("object" == typeof arg) {
|
|
19
|
-
for (const [key, value] of Object.entries(arg))if (value) classes.push(key);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return classes;
|
|
23
|
-
}
|
|
24
|
-
function clsx(...args) {
|
|
25
|
-
return cx(...args).join(" ");
|
|
26
|
-
}
|
|
27
|
-
"use client";
|
|
28
|
-
const useAntdCssVarClassname = ()=>{
|
|
29
|
-
var _token_;
|
|
30
|
-
const token = (0, __WEBPACK_EXTERNAL_MODULE_antd_es_theme_useToken_e8911485__["default"])();
|
|
31
|
-
return null == (_token_ = token[4]) ? void 0 : _token_.key;
|
|
32
|
-
};
|
|
33
|
-
const useCls = ()=>{
|
|
34
|
-
const { getPrefixCls } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(__WEBPACK_EXTERNAL_MODULE_antd_es_config_provider_6a57beb3__["default"].ConfigContext);
|
|
35
|
-
return (...args)=>cx(...args).map((cls)=>getPrefixCls(cls)).join(" ");
|
|
36
|
-
};
|
|
37
|
-
"use client";
|
|
38
|
-
function useControlledState(value, onChange, defaultValue) {
|
|
39
|
-
const [internalState, setInternalState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultValue);
|
|
40
|
-
const isControlled = void 0 !== value;
|
|
41
|
-
const setState = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((next)=>{
|
|
42
|
-
const nextValue = "function" == typeof next ? next(value) : next;
|
|
43
|
-
if ("function" == typeof onChange) onChange(nextValue);
|
|
44
|
-
if (!isControlled) setInternalState(next);
|
|
45
|
-
}, [
|
|
46
|
-
value,
|
|
47
|
-
onChange,
|
|
48
|
-
isControlled
|
|
49
|
-
]);
|
|
50
|
-
const state = isControlled ? value : internalState;
|
|
51
|
-
return [
|
|
52
|
-
state,
|
|
53
|
-
setState
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
"use client";
|
|
57
|
-
const useEnhancedEffect = "undefined" != typeof window ? __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect : __WEBPACK_EXTERNAL_MODULE_react__.useEffect;
|
|
58
|
-
function useEventCallback(fn) {
|
|
59
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(fn);
|
|
60
|
-
useEnhancedEffect(()=>{
|
|
61
|
-
ref.current = fn;
|
|
62
|
-
});
|
|
63
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((...args)=>{
|
|
64
|
-
var _ref_current;
|
|
65
|
-
return null == (_ref_current = ref.current) ? void 0 : _ref_current.call(ref, ...args);
|
|
66
|
-
}, []);
|
|
67
|
-
}
|
|
68
|
-
function useLatestRef(value) {
|
|
69
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(value);
|
|
70
|
-
useEnhancedEffect(()=>{
|
|
71
|
-
ref.current = value;
|
|
72
|
-
});
|
|
73
|
-
return ref;
|
|
74
|
-
}
|
|
75
|
-
function useAnimationsFinished(ref, waitForNextTick = false) {
|
|
76
|
-
const frameRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
|
|
77
|
-
const timeoutRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(-1);
|
|
78
|
-
const cancelTasks = useEventCallback(()=>{
|
|
79
|
-
cancelAnimationFrame(frameRef.current);
|
|
80
|
-
clearTimeout(timeoutRef.current);
|
|
81
|
-
});
|
|
82
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>cancelTasks, [
|
|
83
|
-
cancelTasks
|
|
84
|
-
]);
|
|
85
|
-
return useEventCallback((fnToExecute)=>{
|
|
86
|
-
cancelTasks();
|
|
87
|
-
const element = ref.current;
|
|
88
|
-
if (!element) return;
|
|
89
|
-
if ("function" != typeof element.getAnimations) fnToExecute();
|
|
90
|
-
else frameRef.current = requestAnimationFrame(()=>{
|
|
91
|
-
function exec() {
|
|
92
|
-
if (!element) return;
|
|
93
|
-
Promise.allSettled(element.getAnimations().map((anim)=>anim.finished)).then(()=>{
|
|
94
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.flushSync)(fnToExecute);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
if (waitForNextTick) timeoutRef.current = window.setTimeout(exec);
|
|
98
|
-
else exec();
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
"use client";
|
|
103
|
-
const Transition = (props)=>{
|
|
104
|
-
const { children = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {}), className, starting, ending, show = true, keepMounted = false, ...otherProps } = props;
|
|
105
|
-
const { mounted, setMounted, transitionStatus } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_utils_d48cdb94__.useTransitionStatus)(show);
|
|
106
|
-
const showRef = useLatestRef(show);
|
|
107
|
-
const combinedClassName = clsx(className, "starting" === transitionStatus && "string" == typeof starting && starting, "ending" === transitionStatus && "string" == typeof ending && ending);
|
|
108
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
109
|
-
const runOnceAnimationsFinish = useAnimationsFinished(ref, show);
|
|
110
|
-
const { renderElement } = (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_use_render_2fb9dc6d__.useRender)({
|
|
111
|
-
render: "function" == typeof children ? children(otherProps, {}) : children,
|
|
112
|
-
props: (0, __WEBPACK_EXTERNAL_MODULE__base_ui_components_react_merge_props_04b69945__.mergeProps)({
|
|
113
|
-
...otherProps,
|
|
114
|
-
ref,
|
|
115
|
-
className: combinedClassName,
|
|
116
|
-
...{
|
|
117
|
-
"data-starting": "starting" === transitionStatus ? "true" : void 0,
|
|
118
|
-
"data-ending": "ending" === transitionStatus ? "true" : void 0
|
|
119
|
-
},
|
|
120
|
-
style: {
|
|
121
|
-
..."starting" === transitionStatus && "object" == typeof starting ? starting : {},
|
|
122
|
-
..."ending" === transitionStatus && "object" == typeof ending ? ending : {}
|
|
123
|
-
}
|
|
124
|
-
})
|
|
125
|
-
});
|
|
126
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
127
|
-
if (keepMounted) return;
|
|
128
|
-
runOnceAnimationsFinish(()=>{
|
|
129
|
-
if (show === showRef.current) setMounted(show);
|
|
130
|
-
});
|
|
131
|
-
}, [
|
|
132
|
-
show,
|
|
133
|
-
keepMounted,
|
|
134
|
-
runOnceAnimationsFinish,
|
|
135
|
-
setMounted,
|
|
136
|
-
showRef
|
|
137
|
-
]);
|
|
138
|
-
return mounted ? renderElement() : null;
|
|
139
|
-
};
|
|
140
|
-
"use client";
|
|
141
|
-
const IconButtonImpl = (props, ref)=>{
|
|
142
|
-
const { label, size = "medium", negativeMargin = true, children, className, tooltipProps = {}, as, href, target, rel, download, hrefLang, referrerPolicy, ...rest } = props;
|
|
143
|
-
const cls = useCls();
|
|
144
|
-
const antdCssVarClassname = useAntdCssVarClassname();
|
|
145
|
-
const buttonClasses = [
|
|
146
|
-
cls("icon-button"),
|
|
147
|
-
cls(`icon-button-${size}`),
|
|
148
|
-
cls(negativeMargin ? "icon-button-negative-margin" : ""),
|
|
149
|
-
antdCssVarClassname,
|
|
150
|
-
className
|
|
151
|
-
].filter(Boolean).join(" ");
|
|
152
|
-
const Component = as || (href ? "a" : "button");
|
|
153
|
-
const anchorProps = "a" === Component ? {
|
|
154
|
-
...void 0 !== target && {
|
|
155
|
-
target
|
|
156
|
-
},
|
|
157
|
-
...void 0 !== rel && {
|
|
158
|
-
rel
|
|
159
|
-
},
|
|
160
|
-
...void 0 !== download && {
|
|
161
|
-
download
|
|
162
|
-
},
|
|
163
|
-
...void 0 !== hrefLang && {
|
|
164
|
-
hrefLang
|
|
165
|
-
},
|
|
166
|
-
...void 0 !== referrerPolicy && {
|
|
167
|
-
referrerPolicy
|
|
168
|
-
}
|
|
169
|
-
} : {};
|
|
170
|
-
const elementProps = {
|
|
171
|
-
ref,
|
|
172
|
-
className: buttonClasses,
|
|
173
|
-
..."button" === Component && {
|
|
174
|
-
type: "button"
|
|
175
|
-
},
|
|
176
|
-
...href && {
|
|
177
|
-
href
|
|
178
|
-
},
|
|
179
|
-
...anchorProps,
|
|
180
|
-
...rest
|
|
181
|
-
};
|
|
182
|
-
const element = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Component, {
|
|
183
|
-
...elementProps,
|
|
184
|
-
children: children
|
|
185
|
-
});
|
|
186
|
-
return label ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tooltip, {
|
|
187
|
-
title: label,
|
|
188
|
-
arrow: false,
|
|
189
|
-
...tooltipProps,
|
|
190
|
-
children: element
|
|
191
|
-
}) : element;
|
|
192
|
-
};
|
|
193
|
-
const IconButton = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(IconButtonImpl);
|
|
194
|
-
const measureText = (container)=>{
|
|
195
|
-
const span = document.createElement("span");
|
|
196
|
-
span.style.opacity = "0";
|
|
197
|
-
span.style.position = "absolute";
|
|
198
|
-
span.style.top = "-1000px";
|
|
199
|
-
span.style.left = "-1000px";
|
|
200
|
-
span.style.whiteSpace = "nowrap";
|
|
201
|
-
span.style.pointerEvents = "none";
|
|
202
|
-
container.appendChild(span);
|
|
203
|
-
return {
|
|
204
|
-
measure: (text)=>{
|
|
205
|
-
span.innerText = text;
|
|
206
|
-
return span.clientWidth;
|
|
207
|
-
},
|
|
208
|
-
destroy: ()=>{
|
|
209
|
-
container.removeChild(span);
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
const getMiddleTruncatedString = (text, ellipsis, container)=>{
|
|
214
|
-
var _Object_values_reverse_find;
|
|
215
|
-
if (!text) return text;
|
|
216
|
-
const { measure: getTextWidth, destroy: destroyMeasure } = measureText(container);
|
|
217
|
-
const textWidth = getTextWidth(text);
|
|
218
|
-
const containerWidth = container.clientWidth;
|
|
219
|
-
const initialOffset = Math.floor(containerWidth / textWidth * text.length);
|
|
220
|
-
if (textWidth <= containerWidth) {
|
|
221
|
-
destroyMeasure();
|
|
222
|
-
return text;
|
|
223
|
-
}
|
|
224
|
-
let offset = initialOffset;
|
|
225
|
-
const attempts = {};
|
|
226
|
-
const maxAttempts = 20;
|
|
227
|
-
const buffer = 10;
|
|
228
|
-
while(Object.values(attempts).length <= maxAttempts){
|
|
229
|
-
if (attempts[offset]) break;
|
|
230
|
-
if (offset <= 1) {
|
|
231
|
-
attempts[0] = [
|
|
232
|
-
0,
|
|
233
|
-
ellipsis
|
|
234
|
-
];
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
const start = text.slice(0, Math.ceil((offset - ellipsis.length) / 2 - 1)).trimEnd();
|
|
238
|
-
const end = text.slice(Math.floor((offset - ellipsis.length) / 2) - offset).trimStart();
|
|
239
|
-
const truncatedStr = start + ellipsis + end;
|
|
240
|
-
const width = getTextWidth(truncatedStr);
|
|
241
|
-
attempts[offset] = [
|
|
242
|
-
width,
|
|
243
|
-
truncatedStr
|
|
244
|
-
];
|
|
245
|
-
if (width >= containerWidth) offset -= 2;
|
|
246
|
-
else {
|
|
247
|
-
if (containerWidth - width < buffer) break;
|
|
248
|
-
offset += 2;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
destroyMeasure();
|
|
252
|
-
return (null == (_Object_values_reverse_find = Object.values(attempts).reverse().find(([width])=>width < containerWidth)) ? void 0 : _Object_values_reverse_find[1]) ?? Object.values(attempts)[0][1];
|
|
253
|
-
};
|
|
254
|
-
"use client";
|
|
255
|
-
const Truncate = ({ children, position = "end", lines = 1, className, style, ...rest })=>{
|
|
256
|
-
const cls = useCls();
|
|
257
|
-
const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
258
|
-
const [isTruncated, setIsTruncated] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
259
|
-
const [truncatedText, setTruncatedText] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(children);
|
|
260
|
-
const text = children;
|
|
261
|
-
const getContainerStyles = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
262
|
-
if ("auto" !== lines) return {
|
|
263
|
-
...style,
|
|
264
|
-
...lines > 1 ? {
|
|
265
|
-
"--ds-line-clamp": lines
|
|
266
|
-
} : {}
|
|
267
|
-
};
|
|
268
|
-
return {
|
|
269
|
-
...style,
|
|
270
|
-
"--ds-line-clamp": 999
|
|
271
|
-
};
|
|
272
|
-
}, [
|
|
273
|
-
lines,
|
|
274
|
-
style
|
|
275
|
-
]);
|
|
276
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
|
|
277
|
-
const container = containerRef.current;
|
|
278
|
-
if (!container) return;
|
|
279
|
-
if ("auto" === lines) {
|
|
280
|
-
var _window_document_fonts_ready, _window_document_fonts;
|
|
281
|
-
setTruncatedText(text);
|
|
282
|
-
const calculateLines = ()=>{
|
|
283
|
-
const parent = container.parentElement;
|
|
284
|
-
if (!parent) return;
|
|
285
|
-
const styles = window.getComputedStyle(container);
|
|
286
|
-
const fontSize = parseFloat(styles.fontSize);
|
|
287
|
-
const lineHeight = "normal" === styles.lineHeight ? 1.2 * fontSize : parseFloat(styles.lineHeight);
|
|
288
|
-
const parentStyles = window.getComputedStyle(parent);
|
|
289
|
-
const paddingTop = parseFloat(parentStyles.paddingTop) || 0;
|
|
290
|
-
const paddingBottom = parseFloat(parentStyles.paddingBottom) || 0;
|
|
291
|
-
const borderTopWidth = parseFloat(parentStyles.borderTopWidth) || 0;
|
|
292
|
-
const borderBottomWidth = parseFloat(parentStyles.borderBottomWidth) || 0;
|
|
293
|
-
const parentHeight = parent.clientHeight;
|
|
294
|
-
const availableHeight = parentHeight - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;
|
|
295
|
-
const maxLines = Math.max(1, Math.floor(availableHeight / lineHeight));
|
|
296
|
-
if (container) container.style.setProperty("--ds-line-clamp", String(maxLines));
|
|
297
|
-
const clone = document.createElement("span");
|
|
298
|
-
clone.style.visibility = "hidden";
|
|
299
|
-
clone.style.position = "absolute";
|
|
300
|
-
clone.style.width = `${container.clientWidth}px`;
|
|
301
|
-
clone.style.fontSize = styles.fontSize;
|
|
302
|
-
clone.style.fontFamily = styles.fontFamily;
|
|
303
|
-
clone.style.lineHeight = styles.lineHeight;
|
|
304
|
-
clone.textContent = text;
|
|
305
|
-
document.body.appendChild(clone);
|
|
306
|
-
const isTruncated = clone.scrollHeight > availableHeight;
|
|
307
|
-
document.body.removeChild(clone);
|
|
308
|
-
setIsTruncated(isTruncated);
|
|
309
|
-
};
|
|
310
|
-
null == (_window_document_fonts = window.document.fonts) || null == (_window_document_fonts_ready = _window_document_fonts.ready) || _window_document_fonts_ready.then(calculateLines);
|
|
311
|
-
const observer = new ResizeObserver(()=>{
|
|
312
|
-
window.requestAnimationFrame(calculateLines);
|
|
313
|
-
});
|
|
314
|
-
observer.observe(container);
|
|
315
|
-
if (container.parentElement) observer.observe(container.parentElement);
|
|
316
|
-
return ()=>observer.disconnect();
|
|
317
|
-
}
|
|
318
|
-
if ("number" == typeof lines && lines > 1) {
|
|
319
|
-
var _window_document_fonts_ready1, _window_document_fonts1;
|
|
320
|
-
setTruncatedText(text);
|
|
321
|
-
const checkIfTruncated = ()=>{
|
|
322
|
-
const clone = document.createElement("span");
|
|
323
|
-
clone.style.visibility = "hidden";
|
|
324
|
-
clone.style.position = "absolute";
|
|
325
|
-
clone.style.width = `${container.clientWidth}px`;
|
|
326
|
-
clone.textContent = text;
|
|
327
|
-
document.body.appendChild(clone);
|
|
328
|
-
const isTruncated = clone.scrollHeight > (container.clientHeight || container.offsetHeight);
|
|
329
|
-
document.body.removeChild(clone);
|
|
330
|
-
setIsTruncated(isTruncated);
|
|
331
|
-
};
|
|
332
|
-
null == (_window_document_fonts1 = window.document.fonts) || null == (_window_document_fonts_ready1 = _window_document_fonts1.ready) || _window_document_fonts_ready1.then(checkIfTruncated);
|
|
333
|
-
const observer = new ResizeObserver(()=>{
|
|
334
|
-
window.requestAnimationFrame(checkIfTruncated);
|
|
335
|
-
});
|
|
336
|
-
observer.observe(container);
|
|
337
|
-
return ()=>observer.disconnect();
|
|
338
|
-
}
|
|
339
|
-
let cancellationToken = {
|
|
340
|
-
cancelled: false
|
|
341
|
-
};
|
|
342
|
-
const calculateTruncatedString = ()=>{
|
|
343
|
-
if (cancellationToken) cancellationToken.cancelled = true;
|
|
344
|
-
const requestCancellationToken = {
|
|
345
|
-
cancelled: false
|
|
346
|
-
};
|
|
347
|
-
cancellationToken = requestCancellationToken;
|
|
348
|
-
const truncated = getMiddleTruncatedString(text, "\u2026", container);
|
|
349
|
-
if (requestCancellationToken.cancelled) return;
|
|
350
|
-
setTruncatedText(truncated);
|
|
351
|
-
};
|
|
352
|
-
if ("middle" == position) {
|
|
353
|
-
var _window_document_fonts_ready2, _window_document_fonts2;
|
|
354
|
-
null == (_window_document_fonts2 = window.document.fonts) || null == (_window_document_fonts_ready2 = _window_document_fonts2.ready) || _window_document_fonts_ready2.then(calculateTruncatedString);
|
|
355
|
-
}
|
|
356
|
-
if ("end" == position) setTruncatedText(text);
|
|
357
|
-
const observer = new ResizeObserver(()=>{
|
|
358
|
-
if ("middle" == position) window.requestAnimationFrame(calculateTruncatedString);
|
|
359
|
-
if ("end" == position) {
|
|
360
|
-
const isOverflowing = container.scrollWidth > container.clientWidth;
|
|
361
|
-
if (isOverflowing) setIsTruncated(true);
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
observer.observe(container);
|
|
365
|
-
return ()=>{
|
|
366
|
-
cancellationToken.cancelled = true;
|
|
367
|
-
observer.disconnect();
|
|
368
|
-
};
|
|
369
|
-
}, [
|
|
370
|
-
text,
|
|
371
|
-
position,
|
|
372
|
-
lines
|
|
373
|
-
]);
|
|
374
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
375
|
-
ref: containerRef,
|
|
376
|
-
style: getContainerStyles(),
|
|
377
|
-
className: clsx(1 === lines ? cls("truncate") : cls("truncate-multiline"), "middle" === position ? cls("truncate-middle") : cls("truncate-end"), className),
|
|
378
|
-
title: isTruncated ? text : void 0,
|
|
379
|
-
...rest,
|
|
380
|
-
children: text === truncatedText ? text : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
381
|
-
children: truncatedText
|
|
382
|
-
})
|
|
383
|
-
});
|
|
384
|
-
};
|
|
385
|
-
"use client";
|
|
386
|
-
const VerticalCollapsiblePanel = ({ children, title, defaultOpen = false, open: controlledOpen, onOpenChange, className, headerClassName, headerInnerClassName, bodyClassName, contentPadding = "16px", afterTitle, actions, useTitleAsTrigger = true, keepMounted = false })=>{
|
|
387
|
-
const cls = useCls();
|
|
388
|
-
const [isOpen, setIsOpen] = useControlledState(controlledOpen, onOpenChange, defaultOpen);
|
|
389
|
-
const [isBodyOpen, setIsBodyOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(isOpen);
|
|
390
|
-
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
391
|
-
const runOnceAnimationsFinish = useAnimationsFinished(ref, isOpen);
|
|
392
|
-
const cssVars = useAntdCssVarClassname();
|
|
393
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
394
|
-
runOnceAnimationsFinish(()=>{
|
|
395
|
-
setIsBodyOpen(isOpen);
|
|
396
|
-
});
|
|
397
|
-
}, [
|
|
398
|
-
isOpen,
|
|
399
|
-
runOnceAnimationsFinish
|
|
400
|
-
]);
|
|
401
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Root, {
|
|
402
|
-
className: clsx(cls("collapsible-panel"), cssVars, className),
|
|
403
|
-
open: isOpen,
|
|
404
|
-
onOpenChange: setIsOpen,
|
|
405
|
-
ref: ref,
|
|
406
|
-
children: [
|
|
407
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
408
|
-
className: clsx(cls("collapsible-panel-header"), headerClassName),
|
|
409
|
-
children: [
|
|
410
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
411
|
-
className: clsx(cls("collapsible-panel-header-inner"), headerInnerClassName),
|
|
412
|
-
children: [
|
|
413
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
414
|
-
className: cls("collapsible-panel-header-text"),
|
|
415
|
-
onClick: useTitleAsTrigger ? ()=>setIsOpen((open)=>!open) : void 0,
|
|
416
|
-
style: useTitleAsTrigger ? {
|
|
417
|
-
cursor: "pointer"
|
|
418
|
-
} : {},
|
|
419
|
-
children: "string" == typeof title ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Truncate, {
|
|
420
|
-
children: title
|
|
421
|
-
}) : title
|
|
422
|
-
}),
|
|
423
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
424
|
-
className: cls("collapsible-panel-header-actions"),
|
|
425
|
-
children: [
|
|
426
|
-
isOpen && actions,
|
|
427
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Trigger, {
|
|
428
|
-
className: cls("collapsible-panel-trigger"),
|
|
429
|
-
render: isOpen ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
|
|
430
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.MinusCircle, {
|
|
431
|
-
weight: "bold",
|
|
432
|
-
className: clsx(cls("collapsible-panel-caret"), isOpen && cls("collapsible-panel-caret-open"))
|
|
433
|
-
})
|
|
434
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(IconButton, {
|
|
435
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__bioturing_assets_dd0c210d__.PlusCircle, {
|
|
436
|
-
weight: "bold",
|
|
437
|
-
className: clsx(cls("collapsible-panel-caret"), isOpen && cls("collapsible-panel-caret-open"))
|
|
438
|
-
})
|
|
439
|
-
})
|
|
440
|
-
})
|
|
441
|
-
]
|
|
442
|
-
})
|
|
443
|
-
]
|
|
444
|
-
}),
|
|
445
|
-
isOpen && afterTitle && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
446
|
-
className: cls("collapsible-panel-header-after"),
|
|
447
|
-
children: afterTitle
|
|
448
|
-
})
|
|
449
|
-
]
|
|
450
|
-
}),
|
|
451
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__base_ui_components_react_5aaa6934__.Collapsible.Panel, {
|
|
452
|
-
className: cls("collapsible-panel-content"),
|
|
453
|
-
style: void 0 !== contentPadding ? {
|
|
454
|
-
"--ds-content-padding": false === contentPadding || 0 === contentPadding ? "0" : "number" == typeof contentPadding ? `${contentPadding}px` : contentPadding
|
|
455
|
-
} : {},
|
|
456
|
-
keepMounted: keepMounted,
|
|
457
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Transition, {
|
|
458
|
-
show: isBodyOpen,
|
|
459
|
-
className: clsx(cls("collapsible-panel-body"), bodyClassName),
|
|
460
|
-
keepMounted: true,
|
|
461
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
462
|
-
children: children
|
|
463
|
-
})
|
|
464
|
-
})
|
|
465
|
-
})
|
|
466
|
-
]
|
|
467
|
-
});
|
|
468
|
-
};
|
|
469
|
-
export { VerticalCollapsiblePanel };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./component";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type BreadcrumbProps, type BreadcrumbItemProps } from "./types";
|
|
2
|
-
import "./style.css";
|
|
3
|
-
export declare const Breadcrumb: (({ className, items, noWrap, itemRender: outsideItemRender, ...rest }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
|
-
Item: (props: BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
Separator: (props: React.HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
};
|