rsuite 6.0.1 → 6.1.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/Accordion/styles/index.scss +3 -0
- package/Animation/styles/_animation.scss +95 -0
- package/Animation/styles/_bounce.scss +36 -0
- package/Animation/styles/_collapse.scss +23 -0
- package/Animation/styles/_fade.scss +10 -0
- package/Animation/styles/_mixin.scss +15 -0
- package/Animation/styles/_slide.scss +34 -0
- package/Animation/styles/_variables.scss +4 -0
- package/Animation/styles/index.scss +8 -0
- package/AutoComplete/styles/index.scss +43 -0
- package/Avatar/styles/index.scss +48 -0
- package/AvatarGroup/styles/index.scss +27 -0
- package/Badge/styles/_variables.scss +48 -0
- package/Badge/styles/index.scss +111 -0
- package/Box/styles/index.scss +1 -0
- package/Breadcrumb/styles/index.scss +50 -0
- package/Button/styles/_mixin.scss +83 -0
- package/Button/styles/_variables.scss +38 -0
- package/Button/styles/index.scss +374 -0
- package/ButtonGroup/styles/index.scss +96 -0
- package/ButtonToolbar/styles/index.scss +9 -0
- package/CHANGELOG.md +20 -0
- package/Calendar/styles/_variables.scss +16 -0
- package/Calendar/styles/index.scss +673 -0
- package/Card/styles/index.scss +63 -0
- package/CardGroup/styles/index.scss +10 -0
- package/Carousel/styles/index.scss +204 -0
- package/CascadeTree/styles/_search.scss +39 -0
- package/CascadeTree/styles/index.scss +83 -0
- package/Cascader/styles/index.scss +5 -0
- package/Center/styles/index.scss +11 -0
- package/CheckPicker/styles/index.scss +23 -0
- package/CheckTree/styles/_variables.scss +5 -0
- package/CheckTree/styles/index.scss +121 -0
- package/CheckTreePicker/styles/index.scss +20 -0
- package/Checkbox/styles/_mixin.scss +5 -0
- package/Checkbox/styles/_variables.scss +4 -0
- package/Checkbox/styles/index.scss +158 -0
- package/CheckboxGroup/styles/index.scss +14 -0
- package/Col/styles/index.scss +2 -0
- package/Container/stories/styles.scss +23 -0
- package/Container/styles/index.scss +16 -0
- package/Content/styles/index.scss +6 -0
- package/DateInput/styles/index.scss +1 -0
- package/DatePicker/styles/_mixin.scss +10 -0
- package/DatePicker/styles/index.scss +171 -0
- package/DateRangeInput/styles/index.scss +1 -0
- package/DateRangePicker/styles/index.scss +151 -0
- package/Divider/styles/index.scss +85 -0
- package/Drawer/styles/_mixin.scss +23 -0
- package/Drawer/styles/_variables.scss +18 -0
- package/Drawer/styles/index.scss +244 -0
- package/Dropdown/styles/_mixin.scss +4 -0
- package/Dropdown/styles/_variables.scss +12 -0
- package/Dropdown/styles/index.scss +334 -0
- package/FlexboxGrid/styles/index.scss +82 -0
- package/Footer/styles/index.scss +5 -0
- package/Form/styles/index.scss +3 -0
- package/FormControl/styles/_variables.scss +4 -0
- package/FormControl/styles/index.scss +82 -0
- package/FormControlLabel/styles/index.scss +7 -0
- package/FormErrorMessage/styles/_animation.scss +43 -0
- package/FormErrorMessage/styles/_variables.scss +7 -0
- package/FormErrorMessage/styles/index.scss +146 -0
- package/FormGroup/styles/index.scss +75 -0
- package/FormHelpText/styles/index.scss +21 -0
- package/FormStack/styles/index.scss +15 -0
- package/Grid/styles/_columns.scss +23 -0
- package/Grid/styles/_mixin.scss +110 -0
- package/Grid/styles/_row.scss +44 -0
- package/Grid/styles/_variables.scss +6 -0
- package/Grid/styles/index.scss +115 -0
- package/Header/styles/index.scss +5 -0
- package/Heading/styles/_variables.scss +19 -0
- package/Heading/styles/index.scss +42 -0
- package/HeadingGroup/styles/index.scss +5 -0
- package/Highlight/styles/index.scss +9 -0
- package/IconButton/styles/index.scss +90 -0
- package/Image/styles/index.scss +36 -0
- package/InlineEdit/styles/index.scss +51 -0
- package/Input/styles/_mixin.scss +39 -0
- package/Input/styles/_variables.scss +27 -0
- package/Input/styles/index.scss +23 -0
- package/InputGroup/styles/index.scss +264 -0
- package/InputNumber/styles/index.scss +1 -0
- package/InputPicker/styles/_mixin.scss +7 -0
- package/InputPicker/styles/index.scss +64 -0
- package/Kbd/styles/_mixin.scss +24 -0
- package/Kbd/styles/_variables.scss +13 -0
- package/Kbd/styles/index.scss +21 -0
- package/Link/styles/index.scss +41 -0
- package/List/styles/index.scss +111 -0
- package/Loader/styles/_mixin.scss +37 -0
- package/Loader/styles/_variables.scss +19 -0
- package/Loader/styles/index.scss +120 -0
- package/Menu/styles/index.scss +109 -0
- package/Message/styles/index.scss +189 -0
- package/Modal/styles/_animation.scss +15 -0
- package/Modal/styles/_variables.scss +16 -0
- package/Modal/styles/index.scss +186 -0
- package/MultiCascadeTree/styles/index.scss +35 -0
- package/MultiCascader/styles/index.scss +3 -0
- package/Nav/styles/index.scss +383 -0
- package/Navbar/styles/index.scss +253 -0
- package/Notification/styles/index.scss +116 -0
- package/NumberInput/styles/_mixin.scss +11 -0
- package/NumberInput/styles/index.scss +78 -0
- package/Pagination/styles/_pagination-group.scss +52 -0
- package/Pagination/styles/index.scss +77 -0
- package/Panel/styles/index.scss +122 -0
- package/PanelGroup/styles/index.scss +34 -0
- package/PasswordInput/styles/index.scss +3 -0
- package/PasswordStrengthMeter/styles/index.scss +41 -0
- package/PinInput/styles/index.scss +93 -0
- package/Placeholder/styles/_mixin.scss +9 -0
- package/Placeholder/styles/index.scss +155 -0
- package/Popover/styles/index.scss +224 -0
- package/Popover/styles/mixins.scss +54 -0
- package/Progress/styles/_animation.scss +69 -0
- package/Progress/styles/_mixins.scss +6 -0
- package/Progress/styles/_progress-line.scss +343 -0
- package/Progress/styles/index.scss +3 -0
- package/ProgressCircle/styles/index.scss +2 -0
- package/ProgressCircle/styles/progress-circle.scss +49 -0
- package/Radio/styles/_mixin.scss +5 -0
- package/Radio/styles/_variables.scss +5 -0
- package/Radio/styles/index.scss +147 -0
- package/RadioGroup/styles/_variables.scss +10 -0
- package/RadioGroup/styles/index.scss +83 -0
- package/RadioTile/styles/index.scss +80 -0
- package/RadioTileGroup/styles/index.scss +1 -0
- package/RangeSlider/styles/index.scss +4 -0
- package/Rate/styles/index.scss +141 -0
- package/Row/styles/index.scss +2 -0
- package/SegmentedControl/styles/_mixin.scss +7 -0
- package/SegmentedControl/styles/_variables.scss +43 -0
- package/SegmentedControl/styles/index.scss +147 -0
- package/SelectPicker/styles/index.scss +44 -0
- package/Sidebar/styles/index.scss +17 -0
- package/Sidenav/styles/index.scss +635 -0
- package/Sidenav/styles/mixin.scss +23 -0
- package/Slider/styles/index.scss +298 -0
- package/Stack/styles/_variables.scss +11 -0
- package/Stack/styles/index.scss +79 -0
- package/Stat/styles/index.scss +126 -0
- package/StatGroup/styles/index.scss +10 -0
- package/Steps/styles/index.scss +222 -0
- package/Table/styles/index.scss +473 -0
- package/Table/styles/mixin.scss +8 -0
- package/Tabs/styles/index.scss +24 -0
- package/Tag/styles/_variables.scss +13 -0
- package/Tag/styles/index.scss +62 -0
- package/TagGroup/styles/index.scss +14 -0
- package/TagInput/styles/index.scss +5 -0
- package/TagPicker/styles/index.scss +141 -0
- package/Text/styles/index.scss +142 -0
- package/Text/styles/variables.scss +9 -0
- package/Textarea/styles/index.scss +9 -0
- package/TimePicker/styles/index.scss +1 -0
- package/TimeRangePicker/styles/index.scss +1 -0
- package/Timeline/stories/styles.scss +29 -0
- package/Timeline/styles/_mixin.scss +13 -0
- package/Timeline/styles/index.scss +187 -0
- package/Toggle/styles/index.scss +284 -0
- package/Tooltip/styles/index.scss +160 -0
- package/Tooltip/styles/mixins.scss +56 -0
- package/Tree/styles/_indent-line.scss +8 -0
- package/Tree/styles/_toggle.scss +32 -0
- package/Tree/styles/_variables.scss +8 -0
- package/Tree/styles/index.scss +184 -0
- package/TreePicker/styles/index.scss +16 -0
- package/Uploader/styles/_mixin.scss +11 -0
- package/Uploader/styles/index.scss +491 -0
- package/VisuallyHidden/styles/index.scss +11 -0
- package/cjs/Breadcrumb/BreadcrumbItem.js +12 -7
- package/cjs/CheckTree/CheckTree.js +3 -0
- package/cjs/CheckTree/CheckTreeView.js +7 -3
- package/cjs/CheckTree/hooks/useTreeCheckState.d.ts +1 -0
- package/cjs/CheckTree/hooks/useTreeCheckState.js +54 -3
- package/cjs/CheckTree/utils.d.ts +9 -2
- package/cjs/CheckTree/utils.js +70 -11
- package/cjs/CheckTreePicker/CheckTreePicker.js +1 -0
- package/cjs/Checkbox/Checkbox.js +2 -1
- package/cjs/Checkbox/hooks/useIndeterminateCheckbox.d.ts +19 -0
- package/cjs/Checkbox/hooks/useIndeterminateCheckbox.js +32 -0
- package/cjs/DateInput/DateInput.js +24 -0
- package/cjs/DateInput/hooks/useKeyboardInputEvent.d.ts +2 -1
- package/cjs/DateInput/hooks/useKeyboardInputEvent.js +14 -0
- package/cjs/DateRangeInput/DateRangeInput.js +24 -0
- package/cjs/Form/Form.js +5 -1
- package/cjs/Rate/Rate.d.ts +8 -0
- package/cjs/Rate/Rate.js +3 -1
- package/cjs/Tree/hooks/useFlattenTree.d.ts +4 -0
- package/cjs/Tree/hooks/useFlattenTree.js +22 -1
- package/cjs/Tree/hooks/useFocusTree.js +19 -1
- package/cjs/Tree/hooks/useVirtualizedTreeData.d.ts +1 -0
- package/cjs/Tree/hooks/useVirtualizedTreeData.js +5 -2
- package/cjs/Tree/utils/focusableTree.d.ts +8 -0
- package/cjs/Tree/utils/focusableTree.js +40 -2
- package/cjs/Tree/utils/index.d.ts +1 -1
- package/cjs/Tree/utils/index.js +3 -1
- package/cjs/internals/Picker/utils.d.ts +2 -0
- package/cjs/internals/Picker/utils.js +13 -1
- package/cjs/internals/StyledBox/StyledBox.d.ts +1 -1
- package/cjs/internals/StyledBox/StyledBox.js +2 -2
- package/dist/rsuite.js +34 -23
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Breadcrumb/BreadcrumbItem.js +10 -5
- package/esm/CheckTree/CheckTree.js +3 -0
- package/esm/CheckTree/CheckTreeView.js +7 -3
- package/esm/CheckTree/hooks/useTreeCheckState.d.ts +1 -0
- package/esm/CheckTree/hooks/useTreeCheckState.js +55 -4
- package/esm/CheckTree/utils.d.ts +9 -2
- package/esm/CheckTree/utils.js +71 -12
- package/esm/CheckTreePicker/CheckTreePicker.js +1 -0
- package/esm/Checkbox/Checkbox.js +3 -2
- package/esm/Checkbox/hooks/useIndeterminateCheckbox.d.ts +19 -0
- package/esm/Checkbox/hooks/useIndeterminateCheckbox.js +29 -0
- package/esm/DateInput/DateInput.js +24 -0
- package/esm/DateInput/hooks/useKeyboardInputEvent.d.ts +2 -1
- package/esm/DateInput/hooks/useKeyboardInputEvent.js +14 -0
- package/esm/DateRangeInput/DateRangeInput.js +24 -0
- package/esm/Form/Form.js +5 -1
- package/esm/Rate/Rate.d.ts +8 -0
- package/esm/Rate/Rate.js +3 -1
- package/esm/Tree/hooks/useFlattenTree.d.ts +4 -0
- package/esm/Tree/hooks/useFlattenTree.js +22 -1
- package/esm/Tree/hooks/useFocusTree.js +20 -2
- package/esm/Tree/hooks/useVirtualizedTreeData.d.ts +1 -0
- package/esm/Tree/hooks/useVirtualizedTreeData.js +5 -2
- package/esm/Tree/utils/focusableTree.d.ts +8 -0
- package/esm/Tree/utils/focusableTree.js +36 -0
- package/esm/Tree/utils/index.d.ts +1 -1
- package/esm/Tree/utils/index.js +1 -1
- package/esm/internals/Picker/utils.d.ts +2 -0
- package/esm/internals/Picker/utils.js +13 -1
- package/esm/internals/StyledBox/StyledBox.d.ts +1 -1
- package/esm/internals/StyledBox/StyledBox.js +2 -2
- package/internals/Box/styles/index.scss +31 -0
- package/internals/Burger/styles/index.scss +72 -0
- package/internals/CloseButton/styles/index.scss +14 -0
- package/internals/Picker/styles/_mixin.scss +219 -0
- package/internals/Picker/styles/_variables.scss +9 -0
- package/internals/Picker/styles/index.scss +476 -0
- package/internals/Ripple/styles/_mixins.scss +10 -0
- package/internals/Ripple/styles/index.scss +40 -0
- package/internals/ScrollView/styles/index.scss +77 -0
- package/internals/SearchBox/styles/index.scss +7 -0
- package/package.json +4 -4
- package/styles/_base.scss +37 -0
- package/styles/_css-reset.scss +345 -0
- package/styles/_themes.scss +132 -0
- package/styles/_variables.scss +48 -0
- package/styles/color-modes/_dark.scss +458 -0
- package/styles/color-modes/_high-contrast.scss +469 -0
- package/styles/color-modes/_light.scss +475 -0
- package/styles/colors/_colors-base.scss +39 -0
- package/styles/colors/_dark.scss +114 -0
- package/styles/colors/_high-contrast.scss +114 -0
- package/styles/colors/_light.scss +115 -0
- package/styles/colors/_palette.scss +413 -0
- package/styles/components.scss +114 -0
- package/styles/index.scss +2 -0
- package/styles/mixins/_color-modes.scss +20 -0
- package/styles/mixins/_combobox.scss +6 -0
- package/styles/mixins/_hacks.scss +33 -0
- package/styles/mixins/_input.scss +30 -0
- package/styles/mixins/_listbox.scss +70 -0
- package/styles/mixins/_menu.scss +12 -0
- package/styles/mixins/_utilities.scss +130 -0
- package/toaster/styles/animation.scss +54 -0
- package/toaster/styles/index.scss +109 -0
- package/useToaster/styles/index.scss +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
// PanelGroup
|
|
5
|
+
// --------------------------------------------------
|
|
6
|
+
|
|
7
|
+
.rs-panel-group {
|
|
8
|
+
// The first panel and the last panel in a panel group need set border-radius.
|
|
9
|
+
border-radius: var(--rs-radius-md);
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
|
|
12
|
+
&-bordered {
|
|
13
|
+
border: 1px solid var(--rs-border-primary);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Panel in Panel group haven't border.
|
|
17
|
+
> .rs-panel {
|
|
18
|
+
border: none;
|
|
19
|
+
|
|
20
|
+
// Draw a split line for panel
|
|
21
|
+
& + .rs-panel {
|
|
22
|
+
position: relative;
|
|
23
|
+
|
|
24
|
+
&::before {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
border-top: 1px solid var(--rs-border-primary);
|
|
29
|
+
inset-inline-start: 20px;
|
|
30
|
+
inset-inline-end: 20px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
|
|
3
|
+
.rs-password-strength-meter {
|
|
4
|
+
--rs-password-strength-meter-color-low: var(--rs-color-red);
|
|
5
|
+
--rs-password-strength-meter-color-medium: var(--rs-color-orange);
|
|
6
|
+
--rs-password-strength-meter-color-high: var(--rs-color-green);
|
|
7
|
+
--rs-password-strength-meter-bg: var(--rs-gray-200);
|
|
8
|
+
|
|
9
|
+
margin-top: calc(var(--rs-spacing) * 2);
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: flex-end;
|
|
14
|
+
|
|
15
|
+
&-bar {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: var(--rs-spacing);
|
|
18
|
+
margin-bottom: var(--rs-spacing);
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-segment {
|
|
23
|
+
flex: 1;
|
|
24
|
+
height: 6px;
|
|
25
|
+
border-radius: 2px;
|
|
26
|
+
background: var(--rs-password-strength-meter-bg);
|
|
27
|
+
transition: background 0.3s;
|
|
28
|
+
|
|
29
|
+
&:where([data-active='true']) {
|
|
30
|
+
background: var(--rs-password-strength-meter-color-medium);
|
|
31
|
+
|
|
32
|
+
&:first-child {
|
|
33
|
+
background: var(--rs-password-strength-meter-color-low);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:last-child {
|
|
37
|
+
background: var(--rs-password-strength-meter-color-high);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use '../../Input/styles/index' as input;
|
|
3
|
+
|
|
4
|
+
.rs-pin-input {
|
|
5
|
+
--rs-pin-input-size-lg: 42px;
|
|
6
|
+
--rs-pin-input-size-md: 36px;
|
|
7
|
+
--rs-pin-input-size-sm: 30px;
|
|
8
|
+
--rs-pin-input-size-xs: 24px;
|
|
9
|
+
|
|
10
|
+
--rs-pin-input-size: var(--rs-pin-input-size-md);
|
|
11
|
+
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
// Individual segment styling
|
|
17
|
+
&-segment {
|
|
18
|
+
text-align: center;
|
|
19
|
+
width: var(--rs-pin-input-size);
|
|
20
|
+
caret-color: transparent;
|
|
21
|
+
|
|
22
|
+
// Size variants
|
|
23
|
+
&[data-size='lg'] {
|
|
24
|
+
--rs-pin-input-size: var(--rs-pin-input-size-lg);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-size='md'] {
|
|
28
|
+
--rs-pin-input-size: var(--rs-pin-input-size-md);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-size='sm'] {
|
|
32
|
+
--rs-pin-input-size: var(--rs-pin-input-size-sm);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[data-size='xs'] {
|
|
36
|
+
--rs-pin-input-size: var(--rs-pin-input-size-xs);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Masked input styling
|
|
41
|
+
&-masked {
|
|
42
|
+
font-family: monospace;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Attached segments
|
|
46
|
+
&-attached {
|
|
47
|
+
.rs-pin-input-segment {
|
|
48
|
+
border-radius: 0;
|
|
49
|
+
|
|
50
|
+
&:not(:first-of-type) {
|
|
51
|
+
margin-inline-start: -1px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:where(:first-of-type) {
|
|
55
|
+
border-start-start-radius: var(--rs-input-border-radius);
|
|
56
|
+
border-end-start-radius: var(--rs-input-border-radius);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:where(:last-of-type) {
|
|
60
|
+
border-start-end-radius: var(--rs-input-border-radius);
|
|
61
|
+
border-end-end-radius: var(--rs-input-border-radius);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Hack: Browser compatibility
|
|
65
|
+
// In RTL mode, Chrome requires border-radius to be reversed.
|
|
66
|
+
[dir='rtl'] & {
|
|
67
|
+
&:not(:last-of-type) {
|
|
68
|
+
margin-inline-start: -1px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:where(:first-of-type) {
|
|
72
|
+
border-start-start-radius: 0;
|
|
73
|
+
border-end-start-radius: 0;
|
|
74
|
+
border-start-end-radius: var(--rs-input-border-radius);
|
|
75
|
+
border-end-end-radius: var(--rs-input-border-radius);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:where(:last-of-type) {
|
|
79
|
+
border-start-end-radius: 0;
|
|
80
|
+
border-end-end-radius: 0;
|
|
81
|
+
border-start-start-radius: var(--rs-input-border-radius);
|
|
82
|
+
border-end-start-radius: var(--rs-input-border-radius);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Focus state for attached inputs
|
|
87
|
+
&:focus {
|
|
88
|
+
z-index: 1;
|
|
89
|
+
position: relative;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use 'sass:list';
|
|
3
|
+
@use './mixin' as m;
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Placeholder
|
|
7
|
+
// --------------------------------------------------
|
|
8
|
+
|
|
9
|
+
.rs-placeholder {
|
|
10
|
+
--rs-placeholder-row-height: 0.625rem;
|
|
11
|
+
--rs-placeholder-row-spacing: calc(var(--rs-spacing) * 4);
|
|
12
|
+
--rs-placeholder-paragraph-graph-width: 3.875rem;
|
|
13
|
+
--rs-placeholder-graph-width: 100%;
|
|
14
|
+
--rs-placeholder-graph-height: 12.5rem;
|
|
15
|
+
--rs-placeholder-bg-color: var(--rs-placeholder);
|
|
16
|
+
--rs-placeholder-bg-size: auto;
|
|
17
|
+
--rs-placeholder-img-color: var(--rs-bg-card);
|
|
18
|
+
|
|
19
|
+
display: flex;
|
|
20
|
+
|
|
21
|
+
&-paragraph {
|
|
22
|
+
justify-content: flex-start;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
gap: var(--rs-placeholder-row-spacing);
|
|
25
|
+
|
|
26
|
+
&-graph {
|
|
27
|
+
flex: 0 0 auto;
|
|
28
|
+
width: var(--rs-placeholder-paragraph-graph-width);
|
|
29
|
+
height: var(--rs-placeholder-paragraph-graph-width);
|
|
30
|
+
border-radius: var(--rs-radius-xs);
|
|
31
|
+
background: var(--rs-placeholder-bg-color);
|
|
32
|
+
background-size: var(--rs-placeholder-bg-size);
|
|
33
|
+
|
|
34
|
+
&[data-shape='circle'] {
|
|
35
|
+
border-radius: var(--rs-radius-full);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&[data-shape='image'] {
|
|
39
|
+
width: 80px;
|
|
40
|
+
height: var(--rs-placeholder-paragraph-graph-width);
|
|
41
|
+
position: relative;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
|
|
44
|
+
&::after {
|
|
45
|
+
content: '';
|
|
46
|
+
width: 0;
|
|
47
|
+
height: 0;
|
|
48
|
+
inset-inline-start: 10px;
|
|
49
|
+
bottom: 10px;
|
|
50
|
+
position: absolute;
|
|
51
|
+
border-bottom: 36px solid var(--rs-placeholder-img-color);
|
|
52
|
+
border-left: 20px solid transparent;
|
|
53
|
+
border-right: 30px solid transparent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::before {
|
|
57
|
+
content: '';
|
|
58
|
+
width: 0;
|
|
59
|
+
height: 0;
|
|
60
|
+
inset-inline-start: 40px;
|
|
61
|
+
bottom: 10px;
|
|
62
|
+
position: absolute;
|
|
63
|
+
border-bottom: 22px solid var(--rs-placeholder-img-color);
|
|
64
|
+
border-left: 16px solid transparent;
|
|
65
|
+
border-right: 16px solid transparent;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-image &-inner {
|
|
70
|
+
width: 12px;
|
|
71
|
+
height: 12px;
|
|
72
|
+
inset-inline-end: 18px;
|
|
73
|
+
top: 10px;
|
|
74
|
+
border-radius: var(--rs-radius-full);
|
|
75
|
+
background: var(--rs-placeholder-img-color);
|
|
76
|
+
position: absolute;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&-group {
|
|
81
|
+
width: 100%;
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: var(--rs-placeholder-row-spacing);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.rs-placeholder-row {
|
|
88
|
+
$widths: 100% 50% 80% 65% 90% 70% 85% 60% 75%;
|
|
89
|
+
@include m.generate-row-width($widths, list.length($widths));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-row {
|
|
94
|
+
background: var(--rs-placeholder-bg-color);
|
|
95
|
+
background-size: var(--rs-placeholder-bg-size);
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: var(--rs-placeholder-row-height);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-grid {
|
|
101
|
+
&-col {
|
|
102
|
+
flex: 1;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
align-items: flex-end;
|
|
106
|
+
gap: var(--rs-placeholder-row-spacing);
|
|
107
|
+
|
|
108
|
+
&:first-child {
|
|
109
|
+
align-items: flex-start; //first col align left
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.rs-placeholder-row {
|
|
113
|
+
width: 30%;
|
|
114
|
+
$widths: 50% 25% 35%;
|
|
115
|
+
@include m.generate-row-width($widths, list.length($widths));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&-graph {
|
|
121
|
+
display: inline-block;
|
|
122
|
+
width: var(--rs-placeholder-graph-width);
|
|
123
|
+
height: var(--rs-placeholder-graph-height);
|
|
124
|
+
background: var(--rs-placeholder-bg-color);
|
|
125
|
+
background-size: var(--rs-placeholder-bg-size);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&[data-active='true'] {
|
|
129
|
+
--rs-placeholder-active-bg: linear-gradient(
|
|
130
|
+
-45deg,
|
|
131
|
+
var(--rs-placeholder) 25%,
|
|
132
|
+
var(--rs-placeholder-active) 37%,
|
|
133
|
+
var(--rs-placeholder) 63%
|
|
134
|
+
);
|
|
135
|
+
--rs-placeholder-active-bg-size: 400% 100%;
|
|
136
|
+
|
|
137
|
+
&.rs-placeholder-graph,
|
|
138
|
+
.rs-placeholder-paragraph-graph,
|
|
139
|
+
.rs-placeholder-row {
|
|
140
|
+
background: var(--rs-placeholder-active-bg);
|
|
141
|
+
background-size: var(--rs-placeholder-active-bg-size) !important;
|
|
142
|
+
animation: placeholder-active 1.5s ease infinite;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes placeholder-active {
|
|
147
|
+
0% {
|
|
148
|
+
background-position: 100% 50%;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
100% {
|
|
152
|
+
background-position: 0 50%;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use '../../Heading/styles/index' as heading;
|
|
3
|
+
@use '../../styles/mixins/utilities' as utils;
|
|
4
|
+
@use '../../styles/mixins/color-modes' as color-modes;
|
|
5
|
+
@use './mixins';
|
|
6
|
+
|
|
7
|
+
//
|
|
8
|
+
// Popovers
|
|
9
|
+
// --------------------------------------------------
|
|
10
|
+
.rs-popover {
|
|
11
|
+
--rs-popover-font-size: var(--rs-font-size-xs);
|
|
12
|
+
--rs-popover-line-height: var(--rs-text-line-height-xs);
|
|
13
|
+
--rs-popover-title-font-size: var(--rs-font-size-sm);
|
|
14
|
+
--rs-popover-title-line-height: var(--rs-text-line-height-sm);
|
|
15
|
+
--rs-popover-border-radius: var(--rs-radius-sm);
|
|
16
|
+
--rs-popover-position-x: var(--rs-position-x);
|
|
17
|
+
--rs-popover-position-y: var(--rs-position-y);
|
|
18
|
+
--rs-popover-opacity: var(--rs-opacity, 0);
|
|
19
|
+
--rs-popover-arrow-gap: 4px;
|
|
20
|
+
--rs-popover-arrow-width: 6px;
|
|
21
|
+
--rs-popover-arrow-outer-width: 6px;
|
|
22
|
+
--rs-popover-translate-distance: 2px;
|
|
23
|
+
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: var(--rs-popover-position-y);
|
|
26
|
+
left: var(--rs-popover-position-x);
|
|
27
|
+
z-index: var(--rs-zindex-popover);
|
|
28
|
+
display: block;
|
|
29
|
+
padding: 12px;
|
|
30
|
+
font-size: var(--rs-popover-font-size);
|
|
31
|
+
background-color: var(--rs-bg-overlay);
|
|
32
|
+
background-clip: padding-box;
|
|
33
|
+
border-radius: var(--rs-popover-border-radius);
|
|
34
|
+
opacity: var(--rs-popover-opacity);
|
|
35
|
+
|
|
36
|
+
@include utils.drop-shadow(var(--rs-popover-shadow));
|
|
37
|
+
|
|
38
|
+
&.rs-anim-fade {
|
|
39
|
+
transition:
|
|
40
|
+
opacity 0.1s linear,
|
|
41
|
+
transform 0.1s ease-out;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.rs-anim-in {
|
|
45
|
+
--rs-popover-opacity: 1;
|
|
46
|
+
|
|
47
|
+
transition:
|
|
48
|
+
opacity 0.15s linear,
|
|
49
|
+
transform 0.15s ease-in;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include color-modes.high-contrast-mode {
|
|
53
|
+
border: 1px solid var(--rs-border-primary);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Arrow is outer, Arrow:after is inner
|
|
57
|
+
> .rs-popover-arrow {
|
|
58
|
+
border-width: var(--rs-popover-arrow-outer-width);
|
|
59
|
+
|
|
60
|
+
&,
|
|
61
|
+
&::before,
|
|
62
|
+
&::after {
|
|
63
|
+
position: absolute;
|
|
64
|
+
display: block;
|
|
65
|
+
width: 0;
|
|
66
|
+
height: 0;
|
|
67
|
+
border-color: transparent;
|
|
68
|
+
border-style: solid;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&::before,
|
|
72
|
+
&::after {
|
|
73
|
+
border-width: var(--rs-popover-arrow-width);
|
|
74
|
+
content: '';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&::before {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include color-modes.high-contrast-mode {
|
|
82
|
+
&::before {
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Popover Title
|
|
89
|
+
&-title {
|
|
90
|
+
margin: 0; // reset heading margin
|
|
91
|
+
font-size: var(--rs-popover-title-font-size);
|
|
92
|
+
line-height: var(--rs-popover-title-line-height);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Popover Content
|
|
96
|
+
&-content {
|
|
97
|
+
font-size: var(--rs-popover-font-size);
|
|
98
|
+
line-height: var(--rs-popover-line-height);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&-title ~ &-content {
|
|
102
|
+
margin-top: 8px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rs-popover {
|
|
107
|
+
// Vertical placement styles (top/bottom)
|
|
108
|
+
&:where([data-placement*='top']) {
|
|
109
|
+
margin-top: calc((var(--rs-popover-arrow-width) + 2px) * -1);
|
|
110
|
+
@include utils.set-translate-transition(0, calc(var(--rs-popover-translate-distance) * -1));
|
|
111
|
+
|
|
112
|
+
> .rs-popover-arrow {
|
|
113
|
+
margin-inline-start: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
114
|
+
bottom: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
115
|
+
|
|
116
|
+
@include mixins.with-popover-arrow(bottom);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:where([data-placement*='bottom']) {
|
|
121
|
+
margin-top: calc(var(--rs-popover-arrow-width) + 2px);
|
|
122
|
+
@include utils.set-translate-transition(0, var(--rs-popover-translate-distance));
|
|
123
|
+
|
|
124
|
+
> .rs-popover-arrow {
|
|
125
|
+
margin-inline-start: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
126
|
+
top: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
127
|
+
|
|
128
|
+
@include mixins.with-popover-arrow(top);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Arrow positioning for different placements
|
|
133
|
+
// Vertical centered arrow
|
|
134
|
+
&:where([data-placement='bottom'], [data-placement='top']) {
|
|
135
|
+
> .rs-popover-arrow {
|
|
136
|
+
left: 50%;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:where([data-placement='bottom-end'], [data-placement='top-end']) {
|
|
141
|
+
> .rs-popover-arrow {
|
|
142
|
+
inset-inline-end: var(--rs-popover-arrow-gap);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:where([data-placement='left'], [data-placement='right']) {
|
|
147
|
+
> .rs-popover-arrow {
|
|
148
|
+
top: 50%;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:where([data-placement='left-end'], [data-placement='right-end']) {
|
|
153
|
+
> .rs-popover-arrow {
|
|
154
|
+
bottom: var(--rs-popover-arrow-gap);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.rs-popover {
|
|
160
|
+
--rs-popover-arrow-offset: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
161
|
+
|
|
162
|
+
&:where([data-placement*='right']) {
|
|
163
|
+
margin-inline-start: calc(var(--rs-popover-arrow-width) + 2px);
|
|
164
|
+
@include utils.set-translate-transition(var(--rs-popover-translate-distance), 0);
|
|
165
|
+
|
|
166
|
+
> .rs-popover-arrow {
|
|
167
|
+
inset-inline-start: var(--rs-popover-arrow-offset);
|
|
168
|
+
margin-top: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
169
|
+
|
|
170
|
+
@include mixins.with-popover-arrow(left);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[dir='rtl'] & {
|
|
174
|
+
margin-inline-end: calc(var(--rs-popover-arrow-width) + 2px);
|
|
175
|
+
> .rs-popover-arrow {
|
|
176
|
+
inset-inline-start: auto;
|
|
177
|
+
inset-inline-end: var(--rs-popover-arrow-offset);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&:where([data-placement*='left']) {
|
|
183
|
+
margin-inline-start: calc((var(--rs-popover-arrow-width) + 2px) * -1);
|
|
184
|
+
@include utils.set-translate-transition(calc(var(--rs-popover-translate-distance) * -1), 0);
|
|
185
|
+
|
|
186
|
+
> .rs-popover-arrow {
|
|
187
|
+
inset-inline-end: var(--rs-popover-arrow-offset);
|
|
188
|
+
margin-top: calc(var(--rs-popover-arrow-outer-width) * -1);
|
|
189
|
+
|
|
190
|
+
@include mixins.with-popover-arrow(right);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
[dir='rtl'] & {
|
|
194
|
+
margin-inline-end: calc((var(--rs-popover-arrow-width) + 2px) * -1);
|
|
195
|
+
> .rs-popover-arrow {
|
|
196
|
+
inset-inline-start: var(--rs-popover-arrow-offset);
|
|
197
|
+
inset-inline-end: auto;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Adjust full popover arrow postion
|
|
204
|
+
.rs-popover-full {
|
|
205
|
+
// Reset content padding when [full]
|
|
206
|
+
padding: 0;
|
|
207
|
+
|
|
208
|
+
// Reset content margin-top when [full]
|
|
209
|
+
.rs-popover-content {
|
|
210
|
+
margin-top: 0;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&:where([data-placement='top-start'], [data-placement='bottom-start']) {
|
|
214
|
+
> .rs-popover-arrow {
|
|
215
|
+
margin-inline-start: var(--rs-popover-arrow-outer-width);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:where([data-placement='right-start'], [data-placement='left-start']) {
|
|
220
|
+
> .rs-popover-arrow {
|
|
221
|
+
margin-top: var(--rs-popover-arrow-outer-width);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@forward '../../styles/variables' as vars-*;
|
|
2
|
+
@forward '../../styles/mixins/hacks' as hacks-*;
|
|
3
|
+
@forward '../../styles/mixins/color-modes' as color-modes-*;
|
|
4
|
+
@use '../../styles/mixins/color-modes' as color-modes;
|
|
5
|
+
|
|
6
|
+
// Draw a triangle towards given direction
|
|
7
|
+
// @mixin popover-arrow($direction, $size, $color)
|
|
8
|
+
//
|
|
9
|
+
// @direction: top | right | bottom | left
|
|
10
|
+
// @size: Size (height) of the triangle
|
|
11
|
+
// @color: Filling color of the triangle
|
|
12
|
+
|
|
13
|
+
@mixin popover-arrow($direction, $size, $color) {
|
|
14
|
+
@if $direction == top {
|
|
15
|
+
top: -$size;
|
|
16
|
+
margin-inline-start: -$size;
|
|
17
|
+
border-width: 0 $size $size;
|
|
18
|
+
border-bottom-color: $color;
|
|
19
|
+
} @else if $direction == bottom {
|
|
20
|
+
bottom: -$size;
|
|
21
|
+
margin-inline-start: -$size;
|
|
22
|
+
border-width: $size $size 0;
|
|
23
|
+
border-top-color: $color;
|
|
24
|
+
} @else if $direction == right {
|
|
25
|
+
right: -$size;
|
|
26
|
+
margin-top: -$size;
|
|
27
|
+
border-width: $size 0 $size $size;
|
|
28
|
+
border-left-color: $color;
|
|
29
|
+
} @else if $direction == left {
|
|
30
|
+
left: -$size;
|
|
31
|
+
margin-top: -$size;
|
|
32
|
+
border-width: $size $size $size 0;
|
|
33
|
+
border-right-color: $color;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Append Popover's arrow to Popover
|
|
38
|
+
// @direction: The arrow's pointing direction. It's usually opposite of popover's placement
|
|
39
|
+
// e.g. popover[placement="top"] has an arrow[direction="bottom"]
|
|
40
|
+
// @size: The arrow's size (height)
|
|
41
|
+
// @bg: The arrow's background color, usually equal to popover's background
|
|
42
|
+
// @border: The arrow's border color, usually equal to popover's border (which only take effect
|
|
43
|
+
// in high-contrast theme)
|
|
44
|
+
@mixin with-popover-arrow($direction, $size: 6px, $bg: var(--rs-bg-overlay), $border: var(--rs-border-primary)) {
|
|
45
|
+
&::after {
|
|
46
|
+
@include popover-arrow($direction, $size, $bg);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include color-modes.high-contrast-mode {
|
|
50
|
+
&::before {
|
|
51
|
+
@include popover-arrow($direction, $size + 1px, $border);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@keyframes progress-active {
|
|
2
|
+
0% {
|
|
3
|
+
opacity: 0.1;
|
|
4
|
+
width: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
20% {
|
|
8
|
+
opacity: 0.8;
|
|
9
|
+
width: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
100% {
|
|
13
|
+
opacity: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@keyframes progress-active-vertical {
|
|
19
|
+
0% {
|
|
20
|
+
opacity: 0.1;
|
|
21
|
+
height: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
20% {
|
|
25
|
+
opacity: 0.8;
|
|
26
|
+
height: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
100% {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
height: 100%;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes progress-stripe {
|
|
36
|
+
0% {
|
|
37
|
+
background-position: 0 0;
|
|
38
|
+
}
|
|
39
|
+
100% {
|
|
40
|
+
background-position: var(--rs-progress-line-stripe-size) 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes progress-stripe-vertical {
|
|
45
|
+
0% {
|
|
46
|
+
background-position: 0 0;
|
|
47
|
+
}
|
|
48
|
+
100% {
|
|
49
|
+
background-position: 0 var(--rs-progress-line-stripe-size);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes progress-indeterminate {
|
|
54
|
+
0% {
|
|
55
|
+
transform: translateX(-100%);
|
|
56
|
+
}
|
|
57
|
+
100% {
|
|
58
|
+
transform: translateX(400%);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes progress-indeterminate-vertical {
|
|
63
|
+
0% {
|
|
64
|
+
transform: translateY(-100%);
|
|
65
|
+
}
|
|
66
|
+
100% {
|
|
67
|
+
transform: translateY(400%);
|
|
68
|
+
}
|
|
69
|
+
}
|