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,244 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use '../../styles/colors/colors-base' as colors;
|
|
3
|
+
@use '../../styles/mixins/utilities' as utils;
|
|
4
|
+
@use '../../styles/mixins/color-modes' as color-modes;
|
|
5
|
+
@use '../../Modal/styles/animation';
|
|
6
|
+
@use './mixin';
|
|
7
|
+
@use './variables';
|
|
8
|
+
|
|
9
|
+
// Container that the drawer scrolls within
|
|
10
|
+
.rs-drawer {
|
|
11
|
+
display: none;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
position: fixed;
|
|
14
|
+
z-index: var(--rs-zindex-drawer);
|
|
15
|
+
box-shadow: var(--rs-drawer-shadow);
|
|
16
|
+
pointer-events: auto;
|
|
17
|
+
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
|
18
|
+
// https://github.com/twbs/bootstrap/pull/10951.
|
|
19
|
+
outline: 0;
|
|
20
|
+
|
|
21
|
+
// Kill the scroll on the body
|
|
22
|
+
&-open.rs-drawer-has-backdrop {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
$sizes: lg, md, sm, xs;
|
|
27
|
+
|
|
28
|
+
// Drawer sizes
|
|
29
|
+
&-left,
|
|
30
|
+
&-right {
|
|
31
|
+
top: 0;
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: var(--rs-drawer-inline-size);
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
|
|
36
|
+
@each $size in $sizes {
|
|
37
|
+
&.rs-drawer-#{$size} {
|
|
38
|
+
--rs-drawer-inline-size: var(--rs-drawer-inline-size-#{$size});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-top,
|
|
44
|
+
&-bottom {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: var(--rs-drawer-block-size);
|
|
47
|
+
|
|
48
|
+
@each $size in $sizes {
|
|
49
|
+
&.rs-drawer-#{$size} {
|
|
50
|
+
--rs-drawer-block-size: var(--rs-drawer-block-size-#{$size});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Full page
|
|
56
|
+
&-full {
|
|
57
|
+
height: var(--rs-drawer-size-full);
|
|
58
|
+
width: var(--rs-drawer-size-full);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Drawer directions
|
|
62
|
+
&-right {
|
|
63
|
+
inset-inline-end: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&-left {
|
|
67
|
+
inset-inline-start: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-top {
|
|
71
|
+
top: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&-bottom {
|
|
75
|
+
bottom: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.rs-drawer-wrapper {
|
|
80
|
+
position: fixed;
|
|
81
|
+
z-index: var(--rs-zindex-drawer);
|
|
82
|
+
top: 0;
|
|
83
|
+
inset-inline-start: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
|
|
87
|
+
&.rs-drawer-no-backdrop {
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Make sure drawer can be show in Safari.
|
|
93
|
+
.rs-drawer-open .rs-drawer {
|
|
94
|
+
overflow: visible;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.rs-drawer-dialog {
|
|
98
|
+
position: relative;
|
|
99
|
+
width: 100%;
|
|
100
|
+
height: 100%;
|
|
101
|
+
background-color: var(--rs-bg-overlay);
|
|
102
|
+
|
|
103
|
+
.rs-drawer-shake & {
|
|
104
|
+
animation: 0.3s linear shakeHead;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@include color-modes.high-contrast-mode {
|
|
108
|
+
background-color: var(--rs-drawer-bg);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.rs-drawer-backdrop {
|
|
113
|
+
position: fixed;
|
|
114
|
+
top: 0;
|
|
115
|
+
bottom: 0;
|
|
116
|
+
inset-inline-end: 0;
|
|
117
|
+
inset-inline-start: 0;
|
|
118
|
+
z-index: var(--rs-zindex-drawer);
|
|
119
|
+
background-color: var(--rs-bg-backdrop);
|
|
120
|
+
|
|
121
|
+
// Fade for backdrop
|
|
122
|
+
&.rs-anim-fade {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
transition: opacity 0.3s ease-in;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.rs-anim-in {
|
|
128
|
+
opacity: 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Drawer header
|
|
133
|
+
// Top section of the modal title.
|
|
134
|
+
.rs-drawer-header {
|
|
135
|
+
@include utils.clearfix;
|
|
136
|
+
|
|
137
|
+
position: relative;
|
|
138
|
+
padding-block: 20px;
|
|
139
|
+
padding-inline: 60px 40px;
|
|
140
|
+
border-bottom: 1px solid var(--rs-border-primary);
|
|
141
|
+
display: flex;
|
|
142
|
+
|
|
143
|
+
.rs-drawer-header-close {
|
|
144
|
+
position: absolute;
|
|
145
|
+
inset-inline-start: 15px;
|
|
146
|
+
top: 23px;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.rs-drawer-title {
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
flex-grow: 1;
|
|
154
|
+
flex-shrink: 1;
|
|
155
|
+
margin: 0;
|
|
156
|
+
color: var(--rs-text-heading);
|
|
157
|
+
font-weight: normal;
|
|
158
|
+
font-size: var(--rs-drawer-title-font-size);
|
|
159
|
+
line-height: var(--rs-drawer-title-line-height);
|
|
160
|
+
|
|
161
|
+
@include utils.ellipsis-basic;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.rs-drawer-actions {
|
|
165
|
+
@include utils.clearfix; // clear it in case folks use .pull-* classes on buttons
|
|
166
|
+
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
text-align: end; // right align buttons
|
|
169
|
+
border-top: none;
|
|
170
|
+
margin-inline-start: auto;
|
|
171
|
+
|
|
172
|
+
.rs-drawer-title ~ & {
|
|
173
|
+
margin-inline-start: 10px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Properly space out buttons
|
|
177
|
+
.rs-btn + .rs-btn {
|
|
178
|
+
margin-inline-start: 10px;
|
|
179
|
+
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
|
180
|
+
}
|
|
181
|
+
// but override that for button groups
|
|
182
|
+
.rs-btn-group .rs-btn + .rs-btn {
|
|
183
|
+
margin-inline-start: -1px;
|
|
184
|
+
}
|
|
185
|
+
// and override it for block buttons as well
|
|
186
|
+
.rs-btn-block + .rs-btn-block {
|
|
187
|
+
margin-inline-start: 0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Drawer body
|
|
192
|
+
.rs-drawer-body {
|
|
193
|
+
position: relative;
|
|
194
|
+
padding: var(--rs-drawer-body-padding);
|
|
195
|
+
height: 100%;
|
|
196
|
+
overflow: auto;
|
|
197
|
+
|
|
198
|
+
.rs-drawer-header + & {
|
|
199
|
+
height: calc(100% - 76px);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&-close {
|
|
203
|
+
position: absolute;
|
|
204
|
+
inset-inline-start: 15px;
|
|
205
|
+
top: 25px;
|
|
206
|
+
|
|
207
|
+
.rs-drawer-header ~ .rs-drawer-body & {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Measure scrollbar width for padding body during modal show/hide
|
|
214
|
+
.rs-drawer-scrollbar-measure {
|
|
215
|
+
position: absolute;
|
|
216
|
+
top: -9999px;
|
|
217
|
+
width: 50px;
|
|
218
|
+
height: 50px;
|
|
219
|
+
overflow: scroll;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Footer (for actions)
|
|
223
|
+
// todo rs-drawer-footer has been deprecated, remove the styles once the component API is removed
|
|
224
|
+
.rs-drawer-footer {
|
|
225
|
+
@include utils.clearfix; // clear it in case folks use .pull-* classes on buttons
|
|
226
|
+
|
|
227
|
+
text-align: end; // right align buttons
|
|
228
|
+
border-top: none;
|
|
229
|
+
margin: 0 var(--rs-drawer-footer-spacing) var(--rs-drawer-footer-spacing);
|
|
230
|
+
|
|
231
|
+
// Properly space out buttons
|
|
232
|
+
.rs-btn + .rs-btn {
|
|
233
|
+
margin-inline-start: 10px;
|
|
234
|
+
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
|
235
|
+
}
|
|
236
|
+
// but override that for button groups
|
|
237
|
+
.rs-btn-group .rs-btn + .rs-btn {
|
|
238
|
+
margin-inline-start: -1px;
|
|
239
|
+
}
|
|
240
|
+
// and override it for block buttons as well
|
|
241
|
+
.rs-btn-block + .rs-btn-block {
|
|
242
|
+
margin-inline-start: 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--rs-dropdown-divider-color: var(--rs-divider-border);
|
|
3
|
+
--rs-dropdown-shadow: var(--rs-shadow-md);
|
|
4
|
+
--rs-dropdown-caret-icon-padding-horizontal: 9px;
|
|
5
|
+
--rs-dropdown-item-padding-y: 8px;
|
|
6
|
+
--rs-dropdown-item-padding-x: 12px;
|
|
7
|
+
--rs-menu-padding: calc(var(--rs-spacing) * 1.5);
|
|
8
|
+
--rs-menuitem-padding-inline: calc(var(--rs-spacing) * 3);
|
|
9
|
+
--rs-menuitem-padding-block: calc(var(--rs-spacing) * 2);
|
|
10
|
+
--rs-menuitem-divider-margin-block: calc(var(--rs-spacing) * 1.5);
|
|
11
|
+
--rs-menuitem-spacing: calc(var(--rs-spacing) * 2);
|
|
12
|
+
}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../internals/Box/styles/index' as box;
|
|
3
|
+
@use '../../styles/mixins/utilities' as utils;
|
|
4
|
+
@use '../../styles/mixins/color-modes' as color-modes;
|
|
5
|
+
@use '../../styles/mixins/menu' as menu;
|
|
6
|
+
@use '../../Button/styles/index' as button;
|
|
7
|
+
@use './mixin' as *;
|
|
8
|
+
@use './variables' as *;
|
|
9
|
+
|
|
10
|
+
// The dropdown wrapper (div)
|
|
11
|
+
.rs-dropdown {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: inline-block;
|
|
14
|
+
vertical-align: middle; // Make sure dropdown vertical alignment with button,button group and so on.
|
|
15
|
+
|
|
16
|
+
&[data-disabled='true'] &-toggle.rs-btn {
|
|
17
|
+
cursor: var(--rs-cursor-disabled) !important;
|
|
18
|
+
box-shadow: none;
|
|
19
|
+
|
|
20
|
+
&.rs-btn[data-appearance='subtle'] {
|
|
21
|
+
&,
|
|
22
|
+
&:focus,
|
|
23
|
+
&:active {
|
|
24
|
+
color: var(--rs-btn-subtle-disabled-text);
|
|
25
|
+
background: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.rs-btn[data-appearance='primary'] {
|
|
30
|
+
&,
|
|
31
|
+
&:focus,
|
|
32
|
+
&:active {
|
|
33
|
+
opacity: 0.3;
|
|
34
|
+
background-color: var(--rs-btn-primary-bg);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.rs-btn[data-appearance='link'] {
|
|
39
|
+
&,
|
|
40
|
+
&:focus,
|
|
41
|
+
&:active {
|
|
42
|
+
opacity: 0.3;
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.rs-btn[data-appearance='ghost'] {
|
|
48
|
+
&,
|
|
49
|
+
&:focus,
|
|
50
|
+
&:active {
|
|
51
|
+
opacity: 0.3;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.rs-ripple-pond {
|
|
56
|
+
display: none !important;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Dropdown Toggle
|
|
62
|
+
.rs-dropdown-toggle {
|
|
63
|
+
&,
|
|
64
|
+
&.rs-btn {
|
|
65
|
+
// Force set style even if has `.btn`.
|
|
66
|
+
@include dropdown-toggle;
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: calc(var(--rs-spacing) * 1.5);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.rs-dropdown-toggle-no-caret {
|
|
73
|
+
padding-inline-end: var(--rs-padding-inline-md);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// The dropdown menu (ul)
|
|
78
|
+
.rs-dropdown-menu {
|
|
79
|
+
margin: 0; // override default ul
|
|
80
|
+
list-style: none;
|
|
81
|
+
font-size: var(--rs-font-size-sm);
|
|
82
|
+
text-align: start; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
|
83
|
+
background-color: var(--rs-bg-overlay);
|
|
84
|
+
border-radius: var(--rs-radius-md);
|
|
85
|
+
padding: var(--rs-menu-padding);
|
|
86
|
+
outline: 0;
|
|
87
|
+
|
|
88
|
+
&:focus-visible {
|
|
89
|
+
@include utils.focus-ring();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.rs-dropdown & {
|
|
93
|
+
position: absolute;
|
|
94
|
+
// dropdown-menu zindex value is greater than dropdown-toggle
|
|
95
|
+
z-index: calc(var(--rs-zindex-dropdown) + 1);
|
|
96
|
+
float: inline-start;
|
|
97
|
+
box-shadow: var(--rs-dropdown-shadow);
|
|
98
|
+
outline: none;
|
|
99
|
+
|
|
100
|
+
@include color-modes.high-contrast-mode {
|
|
101
|
+
border: 1px solid var(--rs-border-secondary);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[hidden] {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Links within the dropdown menu
|
|
111
|
+
.rs-dropdown-item {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
width: 100%;
|
|
115
|
+
gap: var(--rs-menuitem-spacing);
|
|
116
|
+
padding-inline: var(--rs-menuitem-padding-inline);
|
|
117
|
+
padding-block: var(--rs-menuitem-padding-block);
|
|
118
|
+
clear: both;
|
|
119
|
+
font-weight: normal;
|
|
120
|
+
line-height: var(--rs-line-height-md);
|
|
121
|
+
color: var(--rs-text-primary);
|
|
122
|
+
border-radius: var(--rs-radius-sm);
|
|
123
|
+
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
|
124
|
+
cursor: pointer; //fixed link has not [href] style
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
|
|
127
|
+
&:focus,
|
|
128
|
+
&:hover {
|
|
129
|
+
text-decoration: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&-content {
|
|
133
|
+
flex: 1;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.rs-dropdown-item-shortcut {
|
|
139
|
+
border: none;
|
|
140
|
+
line-height: var(--rs-text-line-height-xs);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
> .rs-icon {
|
|
144
|
+
width: var(--rs-font-size-base);
|
|
145
|
+
text-align: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&[data-active='true'] {
|
|
149
|
+
outline: 0;
|
|
150
|
+
font-weight: bold;
|
|
151
|
+
|
|
152
|
+
&,
|
|
153
|
+
&:hover,
|
|
154
|
+
&:focus {
|
|
155
|
+
color: var(--rs-menuitem-text-active);
|
|
156
|
+
background-color: var(--rs-menuitem-bg-active);
|
|
157
|
+
|
|
158
|
+
.rs-text {
|
|
159
|
+
color: var(--rs-menuitem-text-active);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Hover/Focus state
|
|
165
|
+
&:focus-visible,
|
|
166
|
+
&[data-focus='true'] {
|
|
167
|
+
@include menu.menuitem-active;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:focus {
|
|
171
|
+
outline: 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Disabled state
|
|
175
|
+
&[data-disabled='true'] {
|
|
176
|
+
color: var(--rs-text-disabled);
|
|
177
|
+
cursor: var(--rs-cursor-disabled);
|
|
178
|
+
|
|
179
|
+
.rs-text {
|
|
180
|
+
color: var(--rs-text-disabled);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Nuke hover/focus effects
|
|
184
|
+
&:hover,
|
|
185
|
+
&:focus {
|
|
186
|
+
text-decoration: none;
|
|
187
|
+
background-color: transparent;
|
|
188
|
+
background-image: none; // Remove CSS gradient
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Divider
|
|
194
|
+
.rs-dropdown-item-divider {
|
|
195
|
+
height: 1px;
|
|
196
|
+
margin-block: var(--rs-menuitem-divider-margin-block);
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
background-color: var(--rs-dropdown-divider-color);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// The dropdown submenu
|
|
202
|
+
.rs-dropdown-item-submenu {
|
|
203
|
+
position: relative;
|
|
204
|
+
|
|
205
|
+
&:hover > .rs-dropdown-item-toggle {
|
|
206
|
+
@include menu.menuitem-active;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.rs-dropdown-item {
|
|
210
|
+
position: relative;
|
|
211
|
+
|
|
212
|
+
> .rs-dropdown-item-toggle {
|
|
213
|
+
.rs-dropdown-menu-toggle-icon {
|
|
214
|
+
position: absolute;
|
|
215
|
+
top: 11px;
|
|
216
|
+
margin: 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
> .rs-dropdown-menu {
|
|
221
|
+
position: absolute;
|
|
222
|
+
top: 0;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Set submenu icon
|
|
227
|
+
&.rs-dropdown-item {
|
|
228
|
+
padding: 0;
|
|
229
|
+
|
|
230
|
+
.rs-dropdown-item-toggle {
|
|
231
|
+
padding-inline-end: 26px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.rs-dropdown-menu-toggle-icon {
|
|
235
|
+
inset-inline-end: var(--rs-dropdown-caret-icon-padding-horizontal);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.rs-dropdown-menu {
|
|
240
|
+
inset-inline-start: 100%;
|
|
241
|
+
|
|
242
|
+
&[data-direction='start'] {
|
|
243
|
+
inset-inline-start: unset;
|
|
244
|
+
inset-inline-end: 100%;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Open
|
|
249
|
+
&[data-open='true'] > .rs-dropdown-menu {
|
|
250
|
+
//use display table to fix-content
|
|
251
|
+
display: table;
|
|
252
|
+
animation-name: slideUpIn;
|
|
253
|
+
animation-play-state: running;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Active state
|
|
258
|
+
.rs-dropdown-menu > .rs-dropdown-menu-item[data-focus='true'] {
|
|
259
|
+
outline: 0;
|
|
260
|
+
background-color: var(--rs-menuitem-bg-active);
|
|
261
|
+
|
|
262
|
+
&:hover,
|
|
263
|
+
&:focus {
|
|
264
|
+
@include menu.menuitem-active;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Open state for the dropdown
|
|
269
|
+
.rs-dropdown:where([data-open='true']) {
|
|
270
|
+
> .rs-dropdown-menu {
|
|
271
|
+
animation-play-state: running;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Remove the outline when :focus is triggered
|
|
275
|
+
> a {
|
|
276
|
+
outline: 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Vertical placements
|
|
280
|
+
@mixin placement-vertical($position, $value) {
|
|
281
|
+
&[data-placement='#{$position}-start'],
|
|
282
|
+
&[data-placement='#{$position}-end'] {
|
|
283
|
+
> .rs-dropdown-menu {
|
|
284
|
+
#{$value}: 100%;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Horizontal alignments
|
|
290
|
+
@mixin placement-align($start, $end, $value) {
|
|
291
|
+
&[data-placement='#{$start}'],
|
|
292
|
+
&[data-placement='#{$end}'] {
|
|
293
|
+
> .rs-dropdown-menu {
|
|
294
|
+
#{$value}: 0;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Apply placements
|
|
300
|
+
@include placement-vertical(top, bottom);
|
|
301
|
+
@include placement-vertical(bottom, top);
|
|
302
|
+
@include placement-vertical(left, inset-inline-end);
|
|
303
|
+
@include placement-vertical(right, inset-inline-start);
|
|
304
|
+
|
|
305
|
+
// Apply alignments
|
|
306
|
+
@include placement-align(top-start, bottom-start, inset-inline-start);
|
|
307
|
+
@include placement-align(top-end, bottom-end, inset-inline-end);
|
|
308
|
+
@include placement-align(left-start, right-start, top);
|
|
309
|
+
@include placement-align(left-end, right-end, bottom);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Dropdown section headers
|
|
313
|
+
.rs-dropdown-header {
|
|
314
|
+
display: block;
|
|
315
|
+
padding: var(--rs-dropdown-item-padding-y) var(--rs-dropdown-item-padding-x);
|
|
316
|
+
line-height: var(--rs-line-height-md);
|
|
317
|
+
color: var(--rs-dropdown-header-text);
|
|
318
|
+
border-bottom: 1px solid var(--rs-dropdown-divider-color);
|
|
319
|
+
white-space: nowrap; // as with > li > a
|
|
320
|
+
margin-bottom: 2px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Opacity not working in Safari,so remove .
|
|
324
|
+
@keyframes slideUpIn {
|
|
325
|
+
0% {
|
|
326
|
+
transform-origin: 0% 0%;
|
|
327
|
+
transform: scaleY(0.8);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
100% {
|
|
331
|
+
transform-origin: 0% 0%;
|
|
332
|
+
transform: scaleY(1);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@use '../../internals/Box/styles/index' as box;
|
|
2
|
+
@use '../../styles/colors/colors-base' as colors;
|
|
3
|
+
@use '../../styles/mixins/utilities' as utils;
|
|
4
|
+
@use 'sass:math';
|
|
5
|
+
|
|
6
|
+
// Flex-box grid wrapper
|
|
7
|
+
.rs-flex-box-grid {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-flow: row wrap;
|
|
10
|
+
|
|
11
|
+
// Flex-box grid item
|
|
12
|
+
&-item {
|
|
13
|
+
width: 100%;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//##==== Alignment (Y-Axis).
|
|
18
|
+
|
|
19
|
+
// At the top of the alignment.
|
|
20
|
+
&-top {
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Align center.
|
|
25
|
+
&-middle {
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// At the bottom of the alignment.
|
|
30
|
+
&-bottom {
|
|
31
|
+
align-items: flex-end;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//##==== Layout (X-Axis).
|
|
35
|
+
|
|
36
|
+
// Pack items from the start.
|
|
37
|
+
&-start {
|
|
38
|
+
justify-content: flex-start;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Pack items around the center.
|
|
42
|
+
&-center {
|
|
43
|
+
justify-content: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Pack items from the end.
|
|
47
|
+
&-end {
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Distribute items evenly.
|
|
52
|
+
// The first item is flush with the start, the last is flush with the end.
|
|
53
|
+
&-space-between {
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Distribute items evenly.
|
|
58
|
+
// Items have a half-size space on either end.
|
|
59
|
+
&-space-around {
|
|
60
|
+
justify-content: space-around;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Generate the flex grid.
|
|
65
|
+
// Loop to generate flex grid.
|
|
66
|
+
@for $value from 1 through 24 {
|
|
67
|
+
// Generate columns styles.
|
|
68
|
+
.rs-flex-box-grid-item-#{$value} {
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
// Provide positioning for child elements.
|
|
71
|
+
position: relative;
|
|
72
|
+
display: block;
|
|
73
|
+
// To prevent the collapse when column is empty.
|
|
74
|
+
min-height: 1px;
|
|
75
|
+
width: math.percentage(math.div($value, 24));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Generate order styles.
|
|
79
|
+
.rs-flex-box-grid-item-order-#{$value} {
|
|
80
|
+
order: $value;
|
|
81
|
+
}
|
|
82
|
+
}
|