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.
Files changed (275) hide show
  1. package/Accordion/styles/index.scss +3 -0
  2. package/Animation/styles/_animation.scss +95 -0
  3. package/Animation/styles/_bounce.scss +36 -0
  4. package/Animation/styles/_collapse.scss +23 -0
  5. package/Animation/styles/_fade.scss +10 -0
  6. package/Animation/styles/_mixin.scss +15 -0
  7. package/Animation/styles/_slide.scss +34 -0
  8. package/Animation/styles/_variables.scss +4 -0
  9. package/Animation/styles/index.scss +8 -0
  10. package/AutoComplete/styles/index.scss +43 -0
  11. package/Avatar/styles/index.scss +48 -0
  12. package/AvatarGroup/styles/index.scss +27 -0
  13. package/Badge/styles/_variables.scss +48 -0
  14. package/Badge/styles/index.scss +111 -0
  15. package/Box/styles/index.scss +1 -0
  16. package/Breadcrumb/styles/index.scss +50 -0
  17. package/Button/styles/_mixin.scss +83 -0
  18. package/Button/styles/_variables.scss +38 -0
  19. package/Button/styles/index.scss +374 -0
  20. package/ButtonGroup/styles/index.scss +96 -0
  21. package/ButtonToolbar/styles/index.scss +9 -0
  22. package/CHANGELOG.md +20 -0
  23. package/Calendar/styles/_variables.scss +16 -0
  24. package/Calendar/styles/index.scss +673 -0
  25. package/Card/styles/index.scss +63 -0
  26. package/CardGroup/styles/index.scss +10 -0
  27. package/Carousel/styles/index.scss +204 -0
  28. package/CascadeTree/styles/_search.scss +39 -0
  29. package/CascadeTree/styles/index.scss +83 -0
  30. package/Cascader/styles/index.scss +5 -0
  31. package/Center/styles/index.scss +11 -0
  32. package/CheckPicker/styles/index.scss +23 -0
  33. package/CheckTree/styles/_variables.scss +5 -0
  34. package/CheckTree/styles/index.scss +121 -0
  35. package/CheckTreePicker/styles/index.scss +20 -0
  36. package/Checkbox/styles/_mixin.scss +5 -0
  37. package/Checkbox/styles/_variables.scss +4 -0
  38. package/Checkbox/styles/index.scss +158 -0
  39. package/CheckboxGroup/styles/index.scss +14 -0
  40. package/Col/styles/index.scss +2 -0
  41. package/Container/stories/styles.scss +23 -0
  42. package/Container/styles/index.scss +16 -0
  43. package/Content/styles/index.scss +6 -0
  44. package/DateInput/styles/index.scss +1 -0
  45. package/DatePicker/styles/_mixin.scss +10 -0
  46. package/DatePicker/styles/index.scss +171 -0
  47. package/DateRangeInput/styles/index.scss +1 -0
  48. package/DateRangePicker/styles/index.scss +151 -0
  49. package/Divider/styles/index.scss +85 -0
  50. package/Drawer/styles/_mixin.scss +23 -0
  51. package/Drawer/styles/_variables.scss +18 -0
  52. package/Drawer/styles/index.scss +244 -0
  53. package/Dropdown/styles/_mixin.scss +4 -0
  54. package/Dropdown/styles/_variables.scss +12 -0
  55. package/Dropdown/styles/index.scss +334 -0
  56. package/FlexboxGrid/styles/index.scss +82 -0
  57. package/Footer/styles/index.scss +5 -0
  58. package/Form/styles/index.scss +3 -0
  59. package/FormControl/styles/_variables.scss +4 -0
  60. package/FormControl/styles/index.scss +82 -0
  61. package/FormControlLabel/styles/index.scss +7 -0
  62. package/FormErrorMessage/styles/_animation.scss +43 -0
  63. package/FormErrorMessage/styles/_variables.scss +7 -0
  64. package/FormErrorMessage/styles/index.scss +146 -0
  65. package/FormGroup/styles/index.scss +75 -0
  66. package/FormHelpText/styles/index.scss +21 -0
  67. package/FormStack/styles/index.scss +15 -0
  68. package/Grid/styles/_columns.scss +23 -0
  69. package/Grid/styles/_mixin.scss +110 -0
  70. package/Grid/styles/_row.scss +44 -0
  71. package/Grid/styles/_variables.scss +6 -0
  72. package/Grid/styles/index.scss +115 -0
  73. package/Header/styles/index.scss +5 -0
  74. package/Heading/styles/_variables.scss +19 -0
  75. package/Heading/styles/index.scss +42 -0
  76. package/HeadingGroup/styles/index.scss +5 -0
  77. package/Highlight/styles/index.scss +9 -0
  78. package/IconButton/styles/index.scss +90 -0
  79. package/Image/styles/index.scss +36 -0
  80. package/InlineEdit/styles/index.scss +51 -0
  81. package/Input/styles/_mixin.scss +39 -0
  82. package/Input/styles/_variables.scss +27 -0
  83. package/Input/styles/index.scss +23 -0
  84. package/InputGroup/styles/index.scss +264 -0
  85. package/InputNumber/styles/index.scss +1 -0
  86. package/InputPicker/styles/_mixin.scss +7 -0
  87. package/InputPicker/styles/index.scss +64 -0
  88. package/Kbd/styles/_mixin.scss +24 -0
  89. package/Kbd/styles/_variables.scss +13 -0
  90. package/Kbd/styles/index.scss +21 -0
  91. package/Link/styles/index.scss +41 -0
  92. package/List/styles/index.scss +111 -0
  93. package/Loader/styles/_mixin.scss +37 -0
  94. package/Loader/styles/_variables.scss +19 -0
  95. package/Loader/styles/index.scss +120 -0
  96. package/Menu/styles/index.scss +109 -0
  97. package/Message/styles/index.scss +189 -0
  98. package/Modal/styles/_animation.scss +15 -0
  99. package/Modal/styles/_variables.scss +16 -0
  100. package/Modal/styles/index.scss +186 -0
  101. package/MultiCascadeTree/styles/index.scss +35 -0
  102. package/MultiCascader/styles/index.scss +3 -0
  103. package/Nav/styles/index.scss +383 -0
  104. package/Navbar/styles/index.scss +253 -0
  105. package/Notification/styles/index.scss +116 -0
  106. package/NumberInput/styles/_mixin.scss +11 -0
  107. package/NumberInput/styles/index.scss +78 -0
  108. package/Pagination/styles/_pagination-group.scss +52 -0
  109. package/Pagination/styles/index.scss +77 -0
  110. package/Panel/styles/index.scss +122 -0
  111. package/PanelGroup/styles/index.scss +34 -0
  112. package/PasswordInput/styles/index.scss +3 -0
  113. package/PasswordStrengthMeter/styles/index.scss +41 -0
  114. package/PinInput/styles/index.scss +93 -0
  115. package/Placeholder/styles/_mixin.scss +9 -0
  116. package/Placeholder/styles/index.scss +155 -0
  117. package/Popover/styles/index.scss +224 -0
  118. package/Popover/styles/mixins.scss +54 -0
  119. package/Progress/styles/_animation.scss +69 -0
  120. package/Progress/styles/_mixins.scss +6 -0
  121. package/Progress/styles/_progress-line.scss +343 -0
  122. package/Progress/styles/index.scss +3 -0
  123. package/ProgressCircle/styles/index.scss +2 -0
  124. package/ProgressCircle/styles/progress-circle.scss +49 -0
  125. package/Radio/styles/_mixin.scss +5 -0
  126. package/Radio/styles/_variables.scss +5 -0
  127. package/Radio/styles/index.scss +147 -0
  128. package/RadioGroup/styles/_variables.scss +10 -0
  129. package/RadioGroup/styles/index.scss +83 -0
  130. package/RadioTile/styles/index.scss +80 -0
  131. package/RadioTileGroup/styles/index.scss +1 -0
  132. package/RangeSlider/styles/index.scss +4 -0
  133. package/Rate/styles/index.scss +141 -0
  134. package/Row/styles/index.scss +2 -0
  135. package/SegmentedControl/styles/_mixin.scss +7 -0
  136. package/SegmentedControl/styles/_variables.scss +43 -0
  137. package/SegmentedControl/styles/index.scss +147 -0
  138. package/SelectPicker/styles/index.scss +44 -0
  139. package/Sidebar/styles/index.scss +17 -0
  140. package/Sidenav/styles/index.scss +635 -0
  141. package/Sidenav/styles/mixin.scss +23 -0
  142. package/Slider/styles/index.scss +298 -0
  143. package/Stack/styles/_variables.scss +11 -0
  144. package/Stack/styles/index.scss +79 -0
  145. package/Stat/styles/index.scss +126 -0
  146. package/StatGroup/styles/index.scss +10 -0
  147. package/Steps/styles/index.scss +222 -0
  148. package/Table/styles/index.scss +473 -0
  149. package/Table/styles/mixin.scss +8 -0
  150. package/Tabs/styles/index.scss +24 -0
  151. package/Tag/styles/_variables.scss +13 -0
  152. package/Tag/styles/index.scss +62 -0
  153. package/TagGroup/styles/index.scss +14 -0
  154. package/TagInput/styles/index.scss +5 -0
  155. package/TagPicker/styles/index.scss +141 -0
  156. package/Text/styles/index.scss +142 -0
  157. package/Text/styles/variables.scss +9 -0
  158. package/Textarea/styles/index.scss +9 -0
  159. package/TimePicker/styles/index.scss +1 -0
  160. package/TimeRangePicker/styles/index.scss +1 -0
  161. package/Timeline/stories/styles.scss +29 -0
  162. package/Timeline/styles/_mixin.scss +13 -0
  163. package/Timeline/styles/index.scss +187 -0
  164. package/Toggle/styles/index.scss +284 -0
  165. package/Tooltip/styles/index.scss +160 -0
  166. package/Tooltip/styles/mixins.scss +56 -0
  167. package/Tree/styles/_indent-line.scss +8 -0
  168. package/Tree/styles/_toggle.scss +32 -0
  169. package/Tree/styles/_variables.scss +8 -0
  170. package/Tree/styles/index.scss +184 -0
  171. package/TreePicker/styles/index.scss +16 -0
  172. package/Uploader/styles/_mixin.scss +11 -0
  173. package/Uploader/styles/index.scss +491 -0
  174. package/VisuallyHidden/styles/index.scss +11 -0
  175. package/cjs/Breadcrumb/BreadcrumbItem.js +12 -7
  176. package/cjs/CheckTree/CheckTree.js +3 -0
  177. package/cjs/CheckTree/CheckTreeView.js +7 -3
  178. package/cjs/CheckTree/hooks/useTreeCheckState.d.ts +1 -0
  179. package/cjs/CheckTree/hooks/useTreeCheckState.js +54 -3
  180. package/cjs/CheckTree/utils.d.ts +9 -2
  181. package/cjs/CheckTree/utils.js +70 -11
  182. package/cjs/CheckTreePicker/CheckTreePicker.js +1 -0
  183. package/cjs/Checkbox/Checkbox.js +2 -1
  184. package/cjs/Checkbox/hooks/useIndeterminateCheckbox.d.ts +19 -0
  185. package/cjs/Checkbox/hooks/useIndeterminateCheckbox.js +32 -0
  186. package/cjs/DateInput/DateInput.js +24 -0
  187. package/cjs/DateInput/hooks/useKeyboardInputEvent.d.ts +2 -1
  188. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +14 -0
  189. package/cjs/DateRangeInput/DateRangeInput.js +24 -0
  190. package/cjs/Form/Form.js +5 -1
  191. package/cjs/Rate/Rate.d.ts +8 -0
  192. package/cjs/Rate/Rate.js +3 -1
  193. package/cjs/Tree/hooks/useFlattenTree.d.ts +4 -0
  194. package/cjs/Tree/hooks/useFlattenTree.js +22 -1
  195. package/cjs/Tree/hooks/useFocusTree.js +19 -1
  196. package/cjs/Tree/hooks/useVirtualizedTreeData.d.ts +1 -0
  197. package/cjs/Tree/hooks/useVirtualizedTreeData.js +5 -2
  198. package/cjs/Tree/utils/focusableTree.d.ts +8 -0
  199. package/cjs/Tree/utils/focusableTree.js +40 -2
  200. package/cjs/Tree/utils/index.d.ts +1 -1
  201. package/cjs/Tree/utils/index.js +3 -1
  202. package/cjs/internals/Picker/utils.d.ts +2 -0
  203. package/cjs/internals/Picker/utils.js +13 -1
  204. package/cjs/internals/StyledBox/StyledBox.d.ts +1 -1
  205. package/cjs/internals/StyledBox/StyledBox.js +2 -2
  206. package/dist/rsuite.js +34 -23
  207. package/dist/rsuite.js.map +1 -1
  208. package/dist/rsuite.min.js +1 -1
  209. package/dist/rsuite.min.js.map +1 -1
  210. package/esm/Breadcrumb/BreadcrumbItem.js +10 -5
  211. package/esm/CheckTree/CheckTree.js +3 -0
  212. package/esm/CheckTree/CheckTreeView.js +7 -3
  213. package/esm/CheckTree/hooks/useTreeCheckState.d.ts +1 -0
  214. package/esm/CheckTree/hooks/useTreeCheckState.js +55 -4
  215. package/esm/CheckTree/utils.d.ts +9 -2
  216. package/esm/CheckTree/utils.js +71 -12
  217. package/esm/CheckTreePicker/CheckTreePicker.js +1 -0
  218. package/esm/Checkbox/Checkbox.js +3 -2
  219. package/esm/Checkbox/hooks/useIndeterminateCheckbox.d.ts +19 -0
  220. package/esm/Checkbox/hooks/useIndeterminateCheckbox.js +29 -0
  221. package/esm/DateInput/DateInput.js +24 -0
  222. package/esm/DateInput/hooks/useKeyboardInputEvent.d.ts +2 -1
  223. package/esm/DateInput/hooks/useKeyboardInputEvent.js +14 -0
  224. package/esm/DateRangeInput/DateRangeInput.js +24 -0
  225. package/esm/Form/Form.js +5 -1
  226. package/esm/Rate/Rate.d.ts +8 -0
  227. package/esm/Rate/Rate.js +3 -1
  228. package/esm/Tree/hooks/useFlattenTree.d.ts +4 -0
  229. package/esm/Tree/hooks/useFlattenTree.js +22 -1
  230. package/esm/Tree/hooks/useFocusTree.js +20 -2
  231. package/esm/Tree/hooks/useVirtualizedTreeData.d.ts +1 -0
  232. package/esm/Tree/hooks/useVirtualizedTreeData.js +5 -2
  233. package/esm/Tree/utils/focusableTree.d.ts +8 -0
  234. package/esm/Tree/utils/focusableTree.js +36 -0
  235. package/esm/Tree/utils/index.d.ts +1 -1
  236. package/esm/Tree/utils/index.js +1 -1
  237. package/esm/internals/Picker/utils.d.ts +2 -0
  238. package/esm/internals/Picker/utils.js +13 -1
  239. package/esm/internals/StyledBox/StyledBox.d.ts +1 -1
  240. package/esm/internals/StyledBox/StyledBox.js +2 -2
  241. package/internals/Box/styles/index.scss +31 -0
  242. package/internals/Burger/styles/index.scss +72 -0
  243. package/internals/CloseButton/styles/index.scss +14 -0
  244. package/internals/Picker/styles/_mixin.scss +219 -0
  245. package/internals/Picker/styles/_variables.scss +9 -0
  246. package/internals/Picker/styles/index.scss +476 -0
  247. package/internals/Ripple/styles/_mixins.scss +10 -0
  248. package/internals/Ripple/styles/index.scss +40 -0
  249. package/internals/ScrollView/styles/index.scss +77 -0
  250. package/internals/SearchBox/styles/index.scss +7 -0
  251. package/package.json +4 -4
  252. package/styles/_base.scss +37 -0
  253. package/styles/_css-reset.scss +345 -0
  254. package/styles/_themes.scss +132 -0
  255. package/styles/_variables.scss +48 -0
  256. package/styles/color-modes/_dark.scss +458 -0
  257. package/styles/color-modes/_high-contrast.scss +469 -0
  258. package/styles/color-modes/_light.scss +475 -0
  259. package/styles/colors/_colors-base.scss +39 -0
  260. package/styles/colors/_dark.scss +114 -0
  261. package/styles/colors/_high-contrast.scss +114 -0
  262. package/styles/colors/_light.scss +115 -0
  263. package/styles/colors/_palette.scss +413 -0
  264. package/styles/components.scss +114 -0
  265. package/styles/index.scss +2 -0
  266. package/styles/mixins/_color-modes.scss +20 -0
  267. package/styles/mixins/_combobox.scss +6 -0
  268. package/styles/mixins/_hacks.scss +33 -0
  269. package/styles/mixins/_input.scss +30 -0
  270. package/styles/mixins/_listbox.scss +70 -0
  271. package/styles/mixins/_menu.scss +12 -0
  272. package/styles/mixins/_utilities.scss +130 -0
  273. package/toaster/styles/animation.scss +54 -0
  274. package/toaster/styles/index.scss +109 -0
  275. 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,4 @@
1
+ @mixin dropdown-toggle {
2
+ position: relative;
3
+ z-index: var(--rs-zindex-dropdown);
4
+ }
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ @use '../../internals/Box/styles/index' as box;
2
+
3
+ .rs-footer {
4
+ flex: 0 0 auto;
5
+ }
@@ -0,0 +1,3 @@
1
+ @use '../../internals/Box/styles/index' as box;
2
+
3
+ // Form styles
@@ -0,0 +1,4 @@
1
+ // FormControl variables
2
+ :root {
3
+ --rs-form-control-width: 300px;
4
+ }