rsuite 6.0.1 → 6.1.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/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 +31 -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/DateRangePicker/DateRangePicker.js +6 -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 +52 -74
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.LICENSE.txt +0 -20
- 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/DateRangePicker/DateRangePicker.js +6 -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,24 @@
|
|
|
1
|
+
@mixin kbd {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
word-spacing: -0.4em;
|
|
9
|
+
user-select: none;
|
|
10
|
+
border-radius: var(--rs-radius-sm);
|
|
11
|
+
line-height: 1.7em;
|
|
12
|
+
padding-inline-start: 0.5em;
|
|
13
|
+
padding-inline-end: 0.5em;
|
|
14
|
+
padding-bottom: 0.05em;
|
|
15
|
+
height: fit-content;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
background-color: var(--rs-kbd-bg);
|
|
18
|
+
border: solid 1px var(--rs-kbd-border);
|
|
19
|
+
box-shadow: inset 0 -1px 0 var(--rs-kbd-border);
|
|
20
|
+
color: var(--rs-kbd-text);
|
|
21
|
+
font-family: var(--rs-kbd-font-family);
|
|
22
|
+
font-size: var(--rs-kbd-font-size);
|
|
23
|
+
letter-spacing: var(--rs-kbd-letter-spacing);
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--rs-kbd-font-size-xs: var(--rs-font-size-2xs);
|
|
3
|
+
--rs-kbd-font-size-sm: var(--rs-font-size-xs);
|
|
4
|
+
--rs-kbd-font-size-md: var(--rs-font-size-sm);
|
|
5
|
+
--rs-kbd-font-size-lg: var(--rs-font-size-md);
|
|
6
|
+
--rs-kbd-letter-spacing-xs: 0.0025em;
|
|
7
|
+
--rs-kbd-letter-spacing-sm: 0em;
|
|
8
|
+
--rs-kbd-letter-spacing-md: 0em;
|
|
9
|
+
--rs-kbd-letter-spacing-lg: -0.0025em;
|
|
10
|
+
--rs-kbd-font-family: var(--rs-font-family-monospace);
|
|
11
|
+
--rs-kbd-font-size: var(--rs-kbd-font-size-md);
|
|
12
|
+
--rs-kbd-letter-spacing: var(--rs-kbd-letter-spacing-md);
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use '../../internals/Box/styles/index' as box;
|
|
3
|
+
@use './variables';
|
|
4
|
+
@use './mixin' as kbd-mixin;
|
|
5
|
+
|
|
6
|
+
// Kbd
|
|
7
|
+
// -------------------------
|
|
8
|
+
|
|
9
|
+
.rs-kbd {
|
|
10
|
+
@include kbd-mixin.kbd();
|
|
11
|
+
|
|
12
|
+
// Size variants
|
|
13
|
+
$sizes: lg, md, sm, xs;
|
|
14
|
+
|
|
15
|
+
@each $size in $sizes {
|
|
16
|
+
&-#{$size} {
|
|
17
|
+
--rs-kbd-font-size: var(--rs-kbd-font-size-#{$size});
|
|
18
|
+
--rs-kbd-letter-spacing: var(--rs-kbd-letter-spacing-#{$size});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
|
|
3
|
+
.rs-link {
|
|
4
|
+
--rs-link-disabled-opacity: 0.5;
|
|
5
|
+
--rs-link-spacing: var(--rs-spacing);
|
|
6
|
+
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
|
|
11
|
+
&-icon {
|
|
12
|
+
margin-inline: var(--rs-link-spacing);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:where([data-underline='always']) {
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:where([data-underline='hover']) {
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
&:hover {
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:where([data-underline='never']) {
|
|
27
|
+
text-decoration: none !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:where([data-underline='not-hover']) {
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
&:hover {
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:where([data-disabled='true']) {
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
opacity: var(--rs-link-disabled-opacity);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
// List
|
|
5
|
+
// --------------------------------------------------
|
|
6
|
+
|
|
7
|
+
.rs-list {
|
|
8
|
+
--rs-list-border-width: 1px;
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
overflow-x: hidden;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
|
|
14
|
+
&[data-bordered='true'] {
|
|
15
|
+
border-radius: var(--rs-radius-md);
|
|
16
|
+
border: var(--rs-list-border-width) solid var(--rs-list-border);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-hover='true'] .rs-list-item:hover {
|
|
20
|
+
background-color: var(--rs-list-hover-bg);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[data-sortable='true'] .rs-list-item {
|
|
24
|
+
cursor: move; // fallback on IE 11
|
|
25
|
+
cursor: grab;
|
|
26
|
+
|
|
27
|
+
&-disabled,
|
|
28
|
+
&-disabled:active {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// default list item ( axis-y )
|
|
35
|
+
.rs-list-item {
|
|
36
|
+
position: relative;
|
|
37
|
+
|
|
38
|
+
&[data-bordered='true'] {
|
|
39
|
+
padding-inline-start: 20px;
|
|
40
|
+
padding-inline-end: 20px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[data-size='lg'] {
|
|
44
|
+
padding-top: 20px;
|
|
45
|
+
padding-bottom: 20px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[data-size='md'] {
|
|
49
|
+
padding-top: 13px;
|
|
50
|
+
padding-bottom: 13px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[data-size='sm'] {
|
|
54
|
+
padding-top: 8px;
|
|
55
|
+
padding-bottom: 8px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-size='xs'] {
|
|
59
|
+
padding-top: 2px;
|
|
60
|
+
padding-bottom: 2px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.rs-list-item {
|
|
65
|
+
background-color: var(--rs-list-bg);
|
|
66
|
+
|
|
67
|
+
&-helper {
|
|
68
|
+
position: absolute;
|
|
69
|
+
background-color: var(--rs-list-bg);
|
|
70
|
+
box-shadow: var(--rs-shadow-sm);
|
|
71
|
+
width: calc(100% - 2px);
|
|
72
|
+
border-radius: var(--rs-radius-md);
|
|
73
|
+
top: 0;
|
|
74
|
+
inset-inline-start: 0;
|
|
75
|
+
z-index: var(--rs-zindex-list-helper);
|
|
76
|
+
border: none;
|
|
77
|
+
cursor: move;
|
|
78
|
+
|
|
79
|
+
// Increase z-index when modal opened.
|
|
80
|
+
.rs-modal-open & {
|
|
81
|
+
z-index: calc(var(--rs-zindex-modal) + var(--rs-zindex-list-helper));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Increase z-index when drawer opened.
|
|
85
|
+
.rs-drawer-open & {
|
|
86
|
+
z-index: calc(var(--rs-zindex-drawer) + var(--rs-zindex-list-helper));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&-holder {
|
|
91
|
+
background-color: var(--rs-list-placeholder-bg);
|
|
92
|
+
visibility: hidden;
|
|
93
|
+
|
|
94
|
+
&::after {
|
|
95
|
+
content: '';
|
|
96
|
+
position: absolute;
|
|
97
|
+
visibility: visible;
|
|
98
|
+
top: var(--rs-list-border-width);
|
|
99
|
+
inset-inline-start: var(--rs-list-border-width);
|
|
100
|
+
width: calc(100% - 2 * var(--rs-list-border-width));
|
|
101
|
+
height: calc(100% - 2 * var(--rs-list-border-width));
|
|
102
|
+
border: var(--rs-list-border-width) var(--rs-list-placeholder-border) dashed;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.rs-list[data-divider='true'] {
|
|
108
|
+
.rs-list-item + .rs-list-item {
|
|
109
|
+
border-top: var(--rs-list-border-width) solid var(--rs-list-border);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// Loader size mixin
|
|
4
|
+
@mixin loader-size($side) {
|
|
5
|
+
width: $side;
|
|
6
|
+
height: $side;
|
|
7
|
+
|
|
8
|
+
&::before,
|
|
9
|
+
&::after {
|
|
10
|
+
width: $side;
|
|
11
|
+
height: $side;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Loader spin animation mixin
|
|
16
|
+
@mixin loader-spin {
|
|
17
|
+
&::before,
|
|
18
|
+
&::after {
|
|
19
|
+
content: '';
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset-inline-start: 0;
|
|
22
|
+
inset-inline-end: 0;
|
|
23
|
+
display: block;
|
|
24
|
+
border-radius: var(--rs-radius-full);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&::before {
|
|
28
|
+
border: var(--rs-loader-spin-ring-width) solid var(--rs-loader-ring);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
border-width: var(--rs-loader-spin-ring-width);
|
|
33
|
+
border-style: solid;
|
|
34
|
+
border-color: var(--rs-loader-rotor) transparent transparent;
|
|
35
|
+
animation: loaderSpin var(--rs-loader-duration-normal) infinite linear;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Loader variables
|
|
2
|
+
:root {
|
|
3
|
+
--rs-loader-duration-fast: 0.4s;
|
|
4
|
+
--rs-loader-duration-normal: 0.6s;
|
|
5
|
+
--rs-loader-duration-slow: 0.8s;
|
|
6
|
+
--rs-loader-duration-paused: paused;
|
|
7
|
+
|
|
8
|
+
--rs-loader-size-xs: 1rem;
|
|
9
|
+
--rs-loader-size-sm: 1.125rem;
|
|
10
|
+
--rs-loader-size-md: 2.25rem;
|
|
11
|
+
--rs-loader-size-lg: 4rem;
|
|
12
|
+
|
|
13
|
+
--rs-loader-font-size-xs: var(--rs-font-size-xs);
|
|
14
|
+
--rs-loader-font-size-sm: var(--rs-font-size-sm);
|
|
15
|
+
--rs-loader-font-size-md: var(--rs-font-size-sm);
|
|
16
|
+
--rs-loader-font-size-lg: var(--rs-font-size-md);
|
|
17
|
+
|
|
18
|
+
--rs-loader-spin-ring-width: 3px;
|
|
19
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use './mixin';
|
|
3
|
+
@use './variables';
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Loader
|
|
7
|
+
// --------------------------------------------------
|
|
8
|
+
|
|
9
|
+
.rs-loader {
|
|
10
|
+
&-box {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
gap: calc(var(--rs-spacing) * 3);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Loader spin
|
|
18
|
+
&-spin {
|
|
19
|
+
position: relative;
|
|
20
|
+
display: inline-block;
|
|
21
|
+
@include mixin.loader-size(var(--rs-loader-size));
|
|
22
|
+
@include mixin.loader-spin;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-content {
|
|
26
|
+
font-size: var(--rs-loader-font-size);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Backdrop
|
|
30
|
+
&-backdrop {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
inset-inline-start: 0;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
background: var(--rs-loader-backdrop);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Vertical
|
|
40
|
+
&[data-direction="vertical"] {
|
|
41
|
+
.rs-loader-box {
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// inverse
|
|
47
|
+
&[data-inverse="true"] {
|
|
48
|
+
.rs-loader-content {
|
|
49
|
+
color: var(--rs-text-inverse);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.rs-loader-backdrop {
|
|
53
|
+
background: var(--rs-loader-backdrop-inverse);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.rs-loader-spin::before {
|
|
57
|
+
border-color: var(--rs-loader-ring-inverse);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.rs-loader-spin::after {
|
|
61
|
+
border-top-color: var(--rs-loader-rotor-inverse);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Loader speeds
|
|
66
|
+
&[data-speed="fast"] &-spin::after {
|
|
67
|
+
animation-duration: var(--rs-loader-duration-fast);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&[data-speed="normal"] &-spin::after {
|
|
71
|
+
animation-duration: var(--rs-loader-duration-normal);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&[data-speed="slow"] &-spin::after {
|
|
75
|
+
animation-duration: var(--rs-loader-duration-slow);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[data-speed="paused"] &-spin::after {
|
|
79
|
+
animation-play-state: var(--rs-loader-duration-paused);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Position center
|
|
83
|
+
&[data-center="true"] {
|
|
84
|
+
position: absolute;
|
|
85
|
+
top: 0;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
inset-inline-start: 0;
|
|
88
|
+
inset-inline-end: 0;
|
|
89
|
+
margin: auto;
|
|
90
|
+
width: 100%;
|
|
91
|
+
height: 100%;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
|
|
96
|
+
.rs-loader-content {
|
|
97
|
+
z-index: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Size variants
|
|
103
|
+
$sizes: (xs, sm, md, lg);
|
|
104
|
+
|
|
105
|
+
@each $size in $sizes {
|
|
106
|
+
.rs-loader[data-size='#{$size}'] {
|
|
107
|
+
--rs-loader-size: var(--rs-loader-size-#{$size});
|
|
108
|
+
--rs-loader-font-size: var(--rs-loader-font-size-#{$size});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes loaderSpin {
|
|
113
|
+
from {
|
|
114
|
+
transform: rotate(0);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
to {
|
|
118
|
+
transform: rotate(360deg);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use '../../styles/mixins/menu' as menu;
|
|
3
|
+
@use '../../styles/mixins/utilities' as utils;
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Menu
|
|
7
|
+
// --------------------------------------------------
|
|
8
|
+
|
|
9
|
+
.rs-menu {
|
|
10
|
+
--rs-menu-divider-color: var(--rs-divider-border);
|
|
11
|
+
--rs-menu-shadow: var(--rs-shadow-md);
|
|
12
|
+
--rs-menu-padding: calc(var(--rs-spacing) * 1.5);
|
|
13
|
+
--rs-menu-font-size: var(--rs-font-size-sm);
|
|
14
|
+
--rs-menuitem-padding-inline: calc(var(--rs-spacing) * 3);
|
|
15
|
+
--rs-menuitem-padding-block: calc(var(--rs-spacing) * 2);
|
|
16
|
+
--rs-menuitem-divider-margin-block: calc(var(--rs-spacing) * 1.5);
|
|
17
|
+
--rs-menuitem-spacing: calc(var(--rs-spacing) * 2);
|
|
18
|
+
|
|
19
|
+
margin: 0; // override default ul
|
|
20
|
+
list-style: none;
|
|
21
|
+
font-size: var(--rs-menu-font-size);
|
|
22
|
+
text-align: start;
|
|
23
|
+
background-color: var(--rs-bg-overlay);
|
|
24
|
+
border-radius: var(--rs-radius-md);
|
|
25
|
+
padding: var(--rs-menu-padding);
|
|
26
|
+
outline: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Links within the menu menu
|
|
30
|
+
.rs-menu-item {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
width: 100%;
|
|
34
|
+
gap: var(--rs-menuitem-spacing);
|
|
35
|
+
padding-inline: var(--rs-menuitem-padding-inline);
|
|
36
|
+
padding-block: var(--rs-menuitem-padding-block);
|
|
37
|
+
color: var(--rs-text-primary);
|
|
38
|
+
border-radius: var(--rs-radius-sm);
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
@include utils.reset-link-text-decoration(none);
|
|
41
|
+
|
|
42
|
+
&-content {
|
|
43
|
+
flex: 1;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.rs-menu-item-shortcut {
|
|
49
|
+
border: none;
|
|
50
|
+
line-height: var(--rs-text-line-height-xs);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
> .rs-icon {
|
|
54
|
+
width: var(--rs-font-size-base);
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-active="true"] {
|
|
59
|
+
outline: 0;
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
|
|
62
|
+
&,
|
|
63
|
+
&:hover,
|
|
64
|
+
&:focus {
|
|
65
|
+
color: var(--rs-menuitem-text-active);
|
|
66
|
+
background-color: var(--rs-menuitem-bg-active);
|
|
67
|
+
|
|
68
|
+
.rs-text {
|
|
69
|
+
color: var(--rs-menuitem-text-active);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Hover/Focus state
|
|
75
|
+
&:focus-visible,
|
|
76
|
+
&[data-focus="true"] {
|
|
77
|
+
@include menu.menuitem-active;
|
|
78
|
+
}
|
|
79
|
+
&:focus {
|
|
80
|
+
outline: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Disabled state
|
|
84
|
+
//
|
|
85
|
+
// Gray out text and ensure the hover/focus state remains gray
|
|
86
|
+
&[data-disabled="true"] {
|
|
87
|
+
color: var(--rs-text-disabled);
|
|
88
|
+
cursor: var(--rs-cursor-disabled);
|
|
89
|
+
|
|
90
|
+
.rs-text {
|
|
91
|
+
color: var(--rs-text-disabled);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Nuke hover/focus effects
|
|
95
|
+
&:hover,
|
|
96
|
+
&:focus {
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
background-color: transparent;
|
|
99
|
+
background-image: none; // Remove CSS gradient
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.rs-menu-item-divider {
|
|
105
|
+
height: 1px;
|
|
106
|
+
margin-block: var(--rs-menuitem-divider-margin-block);
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
background-color: var(--rs-menu-divider-color);
|
|
109
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use '../../styles/mixins/color-modes' as color-modes;
|
|
3
|
+
@use '../../styles/mixins/utilities' as utils;
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
// Messages
|
|
7
|
+
// --------------------------------------------------
|
|
8
|
+
|
|
9
|
+
// Base styles
|
|
10
|
+
// -------------------------
|
|
11
|
+
|
|
12
|
+
.rs-message {
|
|
13
|
+
--rs-message-font-size: var(--rs-font-size-sm);
|
|
14
|
+
--rs-message-line-height: var(--rs-text-line-height-sm);
|
|
15
|
+
--rs-message-border-radius: var(--rs-radius-md);
|
|
16
|
+
--rs-message-icon-size: var(--rs-font-size-md);
|
|
17
|
+
--rs-message-padding: calc(var(--rs-spacing) * 4);
|
|
18
|
+
--rs-message-header-color: var(--rs-text-heading);
|
|
19
|
+
--rs-message-body-color: var(--rs-text-primary);
|
|
20
|
+
--rs-message-icon-color: var(--rs-text-secondary);
|
|
21
|
+
--rs-message-spacing: calc(var(--rs-spacing) * 2);
|
|
22
|
+
|
|
23
|
+
border-radius: var(--rs-message-border-radius);
|
|
24
|
+
font-size: var(--rs-message-font-size);
|
|
25
|
+
line-height: var(--rs-message-line-height);
|
|
26
|
+
position: relative;
|
|
27
|
+
animation-fill-mode: forwards;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
background: #fff;
|
|
30
|
+
|
|
31
|
+
// Alternate styles
|
|
32
|
+
// -------------------------
|
|
33
|
+
// Generate contextual modifier classes for colorizing the message.
|
|
34
|
+
$types: success, info, warning, error;
|
|
35
|
+
@each $type in $types {
|
|
36
|
+
&.rs-message-#{$type} {
|
|
37
|
+
--rs-message-bg-color: var(--rs-message-#{$type}-bg);
|
|
38
|
+
--rs-message-header-color: var(--rs-message-#{$type}-header);
|
|
39
|
+
--rs-message-body-color: var(--rs-message-#{$type}-text);
|
|
40
|
+
--rs-message-icon-color: var(--rs-message-#{$type}-icon);
|
|
41
|
+
--rs-message-border-color: var(--rs-message-#{$type}-border);
|
|
42
|
+
--rs-message-icon-border-color: var(--rs-message-#{$type}-icon-border);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include color-modes.high-contrast-mode {
|
|
47
|
+
border: 1px solid var(--rs-message-border-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-container {
|
|
51
|
+
background-color: var(--rs-message-bg-color);
|
|
52
|
+
padding: var(--rs-message-padding);
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: baseline;
|
|
55
|
+
gap: var(--rs-message-spacing);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Message with a title
|
|
59
|
+
&.rs-message-has-title {
|
|
60
|
+
--rs-message-icon-size: var(--rs-font-size-2xl);
|
|
61
|
+
|
|
62
|
+
// Bigger icon
|
|
63
|
+
.rs-message-icon {
|
|
64
|
+
align-self: flex-start;
|
|
65
|
+
|
|
66
|
+
.rs-icon {
|
|
67
|
+
line-height: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&-bordered {
|
|
73
|
+
border: 1px solid var(--rs-message-border-color);
|
|
74
|
+
border-left-width: 4px;
|
|
75
|
+
|
|
76
|
+
.rs-message-icon {
|
|
77
|
+
box-sizing: content-box;
|
|
78
|
+
border: 4px solid var(--rs-message-icon-border-color);
|
|
79
|
+
border-radius: 50%;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.rs-message-centered {
|
|
84
|
+
--rs-message-icon-size: var(--rs-font-size-5xl);
|
|
85
|
+
|
|
86
|
+
.rs-message-container {
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
text-align: center;
|
|
90
|
+
gap: calc(var(--rs-spacing) * 4);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.rs-message-icon {
|
|
94
|
+
align-self: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.rs-message-bordered {
|
|
98
|
+
border-style: solid;
|
|
99
|
+
border-width: 4px 1px 1px 1px;
|
|
100
|
+
border-color: var(--rs-message-border-color);
|
|
101
|
+
|
|
102
|
+
.rs-message-icon {
|
|
103
|
+
box-sizing: content-box;
|
|
104
|
+
border: 4px solid var(--rs-message-icon-border-color);
|
|
105
|
+
border-radius: var(--rs-radius-full);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Message icon
|
|
111
|
+
&-icon {
|
|
112
|
+
align-self: center;
|
|
113
|
+
font-size: 0; // remove whitespace before svg
|
|
114
|
+
|
|
115
|
+
// Icon
|
|
116
|
+
.rs-icon {
|
|
117
|
+
font-size: var(--rs-message-icon-size);
|
|
118
|
+
align-items: center;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&-content {
|
|
123
|
+
flex-grow: 1;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Header
|
|
127
|
+
&-header {
|
|
128
|
+
color: var(--rs-message-header-color);
|
|
129
|
+
line-height: var(--rs-text-line-height-md);
|
|
130
|
+
font-weight: bold;
|
|
131
|
+
@include utils.ellipsis;
|
|
132
|
+
|
|
133
|
+
& + .rs-message-body {
|
|
134
|
+
margin-top: 4px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Description
|
|
139
|
+
&-body {
|
|
140
|
+
color: var(--rs-message-body-color);
|
|
141
|
+
ul,
|
|
142
|
+
ol {
|
|
143
|
+
margin: 0;
|
|
144
|
+
padding: 0;
|
|
145
|
+
padding-inline-start: 16px;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.rs-message-icon > .rs-icon,
|
|
150
|
+
.rs-btn-close {
|
|
151
|
+
color: var(--rs-message-icon-color);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Multiple messages should have spacing
|
|
155
|
+
// Hiding Message haven't spacing.
|
|
156
|
+
&:not(.rs-message-hiding) + & {
|
|
157
|
+
margin-top: 10px;
|
|
158
|
+
|
|
159
|
+
//The last message hiding haven't clearance.
|
|
160
|
+
&.rs-message-hiding:last-child {
|
|
161
|
+
transition: margin-top 0.1s linear 0.3s;
|
|
162
|
+
margin-top: 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&.rs-message-hiding {
|
|
167
|
+
// The same with notification
|
|
168
|
+
animation: notificationMoveOut 0.3s ease-in forwards;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// In dark mode, links inside Message body shows underline by default
|
|
172
|
+
@include color-modes.dark-mode {
|
|
173
|
+
.rs-btn[data-appearance='link'],
|
|
174
|
+
a {
|
|
175
|
+
color: inherit;
|
|
176
|
+
text-decoration: underline;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Full the containers
|
|
182
|
+
.rs-message-full {
|
|
183
|
+
position: absolute;
|
|
184
|
+
top: 0;
|
|
185
|
+
inset-inline-start: 0;
|
|
186
|
+
width: 100%;
|
|
187
|
+
border-radius: var(--rs-radius-none);
|
|
188
|
+
z-index: var(--rs-zindex-message-full);
|
|
189
|
+
}
|