@broxus/react-uikit 0.23.3 → 0.24.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.
Files changed (319) hide show
  1. package/README.md +328 -1
  2. package/dist/assets/accordion.css +1 -4
  3. package/dist/assets/alert.css +28 -1
  4. package/dist/assets/align.css +5 -5
  5. package/dist/assets/animation.css +1 -1
  6. package/dist/assets/article.css +2 -3
  7. package/dist/assets/background.css +5 -5
  8. package/dist/assets/badge.css +1 -4
  9. package/dist/assets/base.css +2 -12
  10. package/dist/assets/breadcrumb.css +1 -5
  11. package/dist/assets/button.css +12 -37
  12. package/dist/assets/card.css +3 -5
  13. package/dist/assets/checkbox.css +1 -1
  14. package/dist/assets/close.css +1 -3
  15. package/dist/assets/column.css +7 -8
  16. package/dist/assets/comment.css +2 -2
  17. package/dist/assets/container.css +7 -7
  18. package/dist/assets/control.css +1 -16
  19. package/dist/assets/cover.css +1 -1
  20. package/dist/assets/custom-media.css +15 -0
  21. package/dist/assets/datepicker.css +5 -3
  22. package/dist/assets/description-list.css +1 -2
  23. package/dist/assets/divider.css +2 -5
  24. package/dist/assets/dotnav.css +1 -5
  25. package/dist/assets/drawer.css +1 -1
  26. package/dist/assets/drop.css +1 -1
  27. package/dist/assets/dropdown.css +1 -9
  28. package/dist/assets/flex.css +9 -9
  29. package/dist/assets/form.css +3 -11
  30. package/dist/assets/grid.css +7 -8
  31. package/dist/assets/heading.css +3 -6
  32. package/dist/assets/height.css +1 -1
  33. package/dist/assets/icon.css +1 -10
  34. package/dist/assets/iconnav.css +1 -4
  35. package/dist/assets/input-number.css +1 -1
  36. package/dist/assets/input-password.css +1 -1
  37. package/dist/assets/inverse.css +1 -1
  38. package/dist/assets/label.css +1 -3
  39. package/dist/assets/leader.css +1 -1
  40. package/dist/assets/link.css +1 -5
  41. package/dist/assets/list.css +1 -8
  42. package/dist/assets/margin.css +11 -11
  43. package/dist/assets/marker.css +1 -4
  44. package/dist/assets/modal.css +4 -4
  45. package/dist/assets/motion.css +3 -2
  46. package/dist/assets/nav.css +1 -18
  47. package/dist/assets/navbar.css +5 -23
  48. package/dist/assets/overlay.css +1 -1
  49. package/dist/assets/padding.css +3 -3
  50. package/dist/assets/pagination.css +1 -5
  51. package/dist/assets/placeholder.css +1 -1
  52. package/dist/assets/position.css +2 -2
  53. package/dist/assets/print.css +4 -4
  54. package/dist/assets/progress.css +1 -1
  55. package/dist/assets/radio.css +1 -1
  56. package/dist/assets/search.css +1 -10
  57. package/dist/assets/section.css +4 -4
  58. package/dist/assets/segmented.css +1 -1
  59. package/dist/assets/select.css +3 -5
  60. package/dist/assets/slider.css +1 -1
  61. package/dist/assets/spinner.css +1 -1
  62. package/dist/assets/sticky.css +1 -1
  63. package/dist/assets/subnav.css +1 -14
  64. package/dist/assets/svg.css +1 -1
  65. package/dist/assets/switch.css +1 -1
  66. package/dist/assets/table.css +2 -8
  67. package/dist/assets/tabs.css +1 -6
  68. package/dist/assets/text.css +5 -12
  69. package/dist/assets/textarea.css +1 -1
  70. package/dist/assets/thumbnav.css +1 -1
  71. package/dist/assets/tile.css +5 -5
  72. package/dist/assets/tooltip.css +1 -1
  73. package/dist/assets/totop.css +1 -4
  74. package/dist/assets/transition.css +1 -1
  75. package/dist/assets/uikit.min.css +1 -1
  76. package/dist/assets/utility.css +1 -3
  77. package/dist/assets/vars.css +72 -4
  78. package/dist/assets/visibility.css +9 -9
  79. package/dist/assets/width.css +9 -9
  80. package/dist/esm/components/Navbar/Nav.d.ts +1 -1
  81. package/package.json +321 -18
  82. package/styles/_components.scss +85 -0
  83. package/styles/_globals.scss +151 -0
  84. package/styles/_import.components.scss +508 -58
  85. package/styles/_import.scss +608 -83
  86. package/styles/_import.utilities.scss +162 -17
  87. package/styles/_mixins.scss +1865 -0
  88. package/styles/_tokens.scss +85 -0
  89. package/styles/{mixin.scss → _utils.scss} +8 -2
  90. package/styles/{variables.scss → _variables.scss} +41 -27
  91. package/styles/accordion/_accordion.scss +231 -0
  92. package/styles/accordion/_index.scss +11 -0
  93. package/styles/alert/_alert.scss +201 -0
  94. package/styles/alert/_index.scss +11 -0
  95. package/styles/align/_align.scss +153 -0
  96. package/styles/align/_index.scss +11 -0
  97. package/styles/animation/_animation.scss +353 -0
  98. package/styles/animation/_index.scss +11 -0
  99. package/styles/article/_article.scss +112 -0
  100. package/styles/article/_index.scss +11 -0
  101. package/styles/background/_background.scss +170 -0
  102. package/styles/background/_index.scss +11 -0
  103. package/styles/badge/_badge.scss +92 -0
  104. package/styles/badge/_index.scss +11 -0
  105. package/styles/base/_base.scss +661 -0
  106. package/styles/base/_index.scss +11 -0
  107. package/styles/breadcrumb/_breadcrumb.scss +133 -0
  108. package/styles/breadcrumb/_index.scss +11 -0
  109. package/styles/button/_button.scss +707 -0
  110. package/styles/button/_index.scss +11 -0
  111. package/styles/card/_card.scss +544 -0
  112. package/styles/card/_index.scss +11 -0
  113. package/styles/checkbox/_checkbox.scss +329 -0
  114. package/styles/checkbox/_index.scss +11 -0
  115. package/styles/close/_close.scss +69 -0
  116. package/styles/close/_index.scss +11 -0
  117. package/styles/column/_column.scss +159 -0
  118. package/styles/column/_index.scss +11 -0
  119. package/styles/comment/_comment.scss +195 -0
  120. package/styles/comment/_index.scss +11 -0
  121. package/styles/container/_container.scss +240 -0
  122. package/styles/container/_index.scss +11 -0
  123. package/styles/control/_control.scss +364 -0
  124. package/styles/control/_index.scss +11 -0
  125. package/styles/cover/_cover.scss +99 -0
  126. package/styles/cover/_index.scss +8 -0
  127. package/styles/custom-media.scss +17 -0
  128. package/styles/datepicker/_datepicker.scss +841 -0
  129. package/styles/datepicker/_index.scss +11 -0
  130. package/styles/description-list/_description-list.scss +96 -0
  131. package/styles/description-list/_index.scss +11 -0
  132. package/styles/divider/_divider.scss +168 -0
  133. package/styles/divider/_index.scss +11 -0
  134. package/styles/dotnav/_dotnav.scss +171 -0
  135. package/styles/dotnav/_index.scss +11 -0
  136. package/styles/drawer/_drawer.scss +588 -0
  137. package/styles/drawer/_index.scss +11 -0
  138. package/styles/drop/_drop.scss +97 -0
  139. package/styles/drop/_index.scss +11 -0
  140. package/styles/dropdown/_dropdown.scss +218 -0
  141. package/styles/dropdown/_index.scss +11 -0
  142. package/styles/flex/_flex.scss +338 -0
  143. package/styles/flex/_index.scss +8 -0
  144. package/styles/form/_form.scss +665 -0
  145. package/styles/form/_index.scss +11 -0
  146. package/styles/grid/_grid.scss +657 -0
  147. package/styles/grid/_index.scss +11 -0
  148. package/styles/heading/_heading.scss +265 -0
  149. package/styles/heading/_index.scss +11 -0
  150. package/styles/height/_height.scss +77 -0
  151. package/styles/height/_index.scss +11 -0
  152. package/styles/icon/_icon.scss +274 -0
  153. package/styles/icon/_index.scss +11 -0
  154. package/styles/iconnav/_iconnav.scss +149 -0
  155. package/styles/iconnav/_index.scss +11 -0
  156. package/styles/input-number/_index.scss +8 -0
  157. package/styles/input-number/_input-number.scss +115 -0
  158. package/styles/input-password/_index.scss +8 -0
  159. package/styles/input-password/_input-password.scss +52 -0
  160. package/styles/inverse/_index.scss +11 -0
  161. package/styles/inverse/_inverse.scss +68 -0
  162. package/styles/label/_index.scss +11 -0
  163. package/styles/label/_label.scss +132 -0
  164. package/styles/leader/_index.scss +11 -0
  165. package/styles/leader/_leader.scss +80 -0
  166. package/styles/link/_index.scss +11 -0
  167. package/styles/link/_link.scss +158 -0
  168. package/styles/list/_index.scss +11 -0
  169. package/styles/list/_list.scss +288 -0
  170. package/styles/margin/_index.scss +11 -0
  171. package/styles/margin/_margin.scss +312 -0
  172. package/styles/marker/_index.scss +11 -0
  173. package/styles/marker/_marker.scss +73 -0
  174. package/styles/modal/_index.scss +11 -0
  175. package/styles/modal/_modal.scss +374 -0
  176. package/styles/motion/_index.scss +8 -0
  177. package/styles/motion/_motion.scss +640 -0
  178. package/styles/nav/_index.scss +11 -0
  179. package/styles/nav/_nav.scss +583 -0
  180. package/styles/navbar/_index.scss +11 -0
  181. package/styles/navbar/_navbar.scss +694 -0
  182. package/styles/overlay/_index.scss +11 -0
  183. package/styles/overlay/_overlay.scss +115 -0
  184. package/styles/padding/_index.scss +11 -0
  185. package/styles/padding/_padding.scss +93 -0
  186. package/styles/pagination/_index.scss +11 -0
  187. package/styles/pagination/_pagination.scss +149 -0
  188. package/styles/placeholder/_index.scss +11 -0
  189. package/styles/placeholder/_placeholder.scss +60 -0
  190. package/styles/position/_index.scss +11 -0
  191. package/styles/position/_position.scss +257 -0
  192. package/styles/print.scss +8 -5
  193. package/styles/progress/_index.scss +11 -0
  194. package/styles/progress/_progress.scss +131 -0
  195. package/styles/radio/_index.scss +11 -0
  196. package/styles/radio/_radio.scss +272 -0
  197. package/styles/search/_index.scss +11 -0
  198. package/styles/search/_search.scss +353 -0
  199. package/styles/section/_index.scss +11 -0
  200. package/styles/section/_section.scss +293 -0
  201. package/styles/segmented/_index.scss +11 -0
  202. package/styles/segmented/_segmented.scss +275 -0
  203. package/styles/select/_index.scss +11 -0
  204. package/styles/select/_select.scss +639 -0
  205. package/styles/slider/_index.scss +11 -0
  206. package/styles/slider/_slider.scss +525 -0
  207. package/styles/spinner/_index.scss +11 -0
  208. package/styles/spinner/_spinner.scss +90 -0
  209. package/styles/sticky/_index.scss +11 -0
  210. package/styles/sticky/_sticky.scss +66 -0
  211. package/styles/subnav/_index.scss +11 -0
  212. package/styles/subnav/_subnav.scss +267 -0
  213. package/styles/svg/_index.scss +8 -0
  214. package/styles/svg/_svg.scss +64 -0
  215. package/styles/switch/_index.scss +11 -0
  216. package/styles/switch/_switch.scss +226 -0
  217. package/styles/table/_index.scss +11 -0
  218. package/styles/table/_table.scss +337 -0
  219. package/styles/tabs/_index.scss +11 -0
  220. package/styles/tabs/_tabs.scss +809 -0
  221. package/styles/text/_index.scss +11 -0
  222. package/styles/text/_text.scss +432 -0
  223. package/styles/textarea/_index.scss +11 -0
  224. package/styles/textarea/_textarea.scss +98 -0
  225. package/styles/thumbnav/_index.scss +11 -0
  226. package/styles/thumbnav/_thumbnav.scss +130 -0
  227. package/styles/tile/_index.scss +11 -0
  228. package/styles/tile/_tile.scss +313 -0
  229. package/styles/tooltip/_index.scss +11 -0
  230. package/styles/tooltip/_tooltip.scss +101 -0
  231. package/styles/totop/_index.scss +11 -0
  232. package/styles/totop/_totop.scss +80 -0
  233. package/styles/transition/_index.scss +11 -0
  234. package/styles/transition/_transition.scss +197 -0
  235. package/styles/utility/_index.scss +11 -0
  236. package/styles/utility/_utility.scss +642 -0
  237. package/styles/vars.scss +474 -139
  238. package/styles/visibility/_index.scss +8 -0
  239. package/styles/visibility/_visibility.scss +196 -0
  240. package/styles/width/_index.scss +11 -0
  241. package/styles/width/_width.scss +698 -0
  242. package/dist/assets/mixin.css +0 -1
  243. package/dist/assets/mixins.css +0 -1
  244. package/dist/assets/variables.css +0 -1
  245. package/styles/accordion.scss +0 -224
  246. package/styles/alert.scss +0 -197
  247. package/styles/align.scss +0 -149
  248. package/styles/animation.scss +0 -349
  249. package/styles/article.scss +0 -105
  250. package/styles/background.scss +0 -167
  251. package/styles/badge.scss +0 -85
  252. package/styles/base.scss +0 -656
  253. package/styles/breadcrumb.scss +0 -126
  254. package/styles/button.scss +0 -700
  255. package/styles/card.scss +0 -534
  256. package/styles/checkbox.scss +0 -325
  257. package/styles/close.scss +0 -62
  258. package/styles/column.scss +0 -152
  259. package/styles/comment.scss +0 -191
  260. package/styles/container.scss +0 -236
  261. package/styles/control.scss +0 -357
  262. package/styles/cover.scss +0 -81
  263. package/styles/datepicker.scss +0 -834
  264. package/styles/description-list.scss +0 -89
  265. package/styles/divider.scss +0 -161
  266. package/styles/dotnav.scss +0 -164
  267. package/styles/drawer.scss +0 -584
  268. package/styles/drop.scss +0 -93
  269. package/styles/dropdown.scss +0 -207
  270. package/styles/flex.scss +0 -326
  271. package/styles/form.scss +0 -658
  272. package/styles/grid.scss +0 -650
  273. package/styles/heading.scss +0 -258
  274. package/styles/height.scss +0 -73
  275. package/styles/icon.scss +0 -267
  276. package/styles/iconnav.scss +0 -142
  277. package/styles/input-number.scss +0 -98
  278. package/styles/input-password.scss +0 -35
  279. package/styles/inverse.scss +0 -65
  280. package/styles/label.scss +0 -125
  281. package/styles/leader.scss +0 -76
  282. package/styles/link.scss +0 -151
  283. package/styles/list.scss +0 -281
  284. package/styles/margin.scss +0 -308
  285. package/styles/marker.scss +0 -66
  286. package/styles/mixins.scss +0 -2555
  287. package/styles/modal.scss +0 -370
  288. package/styles/motion.scss +0 -627
  289. package/styles/nav.scss +0 -576
  290. package/styles/navbar.scss +0 -682
  291. package/styles/overlay.scss +0 -107
  292. package/styles/padding.scss +0 -89
  293. package/styles/pagination.scss +0 -142
  294. package/styles/placeholder.scss +0 -56
  295. package/styles/position.scss +0 -253
  296. package/styles/progress.scss +0 -127
  297. package/styles/radio.scss +0 -268
  298. package/styles/search.scss +0 -346
  299. package/styles/section.scss +0 -285
  300. package/styles/segmented.scss +0 -271
  301. package/styles/select.scss +0 -644
  302. package/styles/slider.scss +0 -521
  303. package/styles/spinner.scss +0 -86
  304. package/styles/sticky.scss +0 -62
  305. package/styles/subnav.scss +0 -260
  306. package/styles/svg.scss +0 -46
  307. package/styles/switch.scss +0 -218
  308. package/styles/table.scss +0 -330
  309. package/styles/tabs.scss +0 -802
  310. package/styles/text.scss +0 -425
  311. package/styles/textarea.scss +0 -94
  312. package/styles/thumbnav.scss +0 -126
  313. package/styles/tile.scss +0 -309
  314. package/styles/tooltip.scss +0 -94
  315. package/styles/totop.scss +0 -73
  316. package/styles/transition.scss +0 -193
  317. package/styles/utility.scss +0 -635
  318. package/styles/visibility.scss +0 -184
  319. package/styles/width.scss +0 -694
@@ -0,0 +1,588 @@
1
+ // Name: Drawer
2
+ // Description: Component to create an drawer sidebar
3
+ //
4
+ // Component: `uk-drawer`
5
+ //
6
+ // Sub-objects: `uk-drawer-bar`
7
+ // `uk-drawer-container`
8
+ // `uk-drawer-page`
9
+ //
10
+ // Adopted: `uk-drawer-close`
11
+ //
12
+ // Modifiers: `uk-drawer-flip`
13
+ // `uk-drawer-bar-animation`
14
+ // `uk-drawer-reveal`
15
+ // `uk-drawer-overlay`
16
+ // `uk-drawer-container-animation`
17
+ //
18
+ // States: `uk-open`
19
+ //
20
+ // ========================================================================
21
+
22
+ @use 'sass:map';
23
+ @use 'sass:meta';
24
+
25
+
26
+ // Variables
27
+ // ========================================================================
28
+
29
+ @use '../variables' as *;
30
+ @use '../mixins' as *;
31
+
32
+
33
+ @mixin drawer-styles {
34
+ /* ========================================================================
35
+ Component: Drawer
36
+ ========================================================================== */
37
+
38
+ .#{$prefix}-drawer {
39
+ display: none;
40
+ inset: 0;
41
+ position: fixed;
42
+ z-index: var(--drawer-z-index);
43
+ @if map.has-key($mixins, 'hook-drawer') {
44
+ @include meta.apply(map.get($mixins, 'hook-drawer'));
45
+ }
46
+ }
47
+
48
+ .#{$prefix}-drawer-open {
49
+ touch-action: none;
50
+ width: 100vw;
51
+ }
52
+
53
+
54
+ // Page & Container
55
+ // ========================================================================
56
+
57
+ .#{$prefix}-drawer-page,
58
+ .#{$prefix}-drawer-container {
59
+ overflow-x: clip;
60
+ touch-action: none;
61
+ }
62
+
63
+ .#{$prefix}-drawer-page {
64
+ overflow-y: clip;
65
+ }
66
+
67
+ .#{$prefix}-drawer-container {
68
+ position: relative;
69
+ touch-action: pan-y pinch-zoom;
70
+ transform: none !important;
71
+ transition-duration: var(--drawer-transition-duration);
72
+ transition-timing-function: var(--ease-in-out);
73
+ }
74
+
75
+
76
+ // Content
77
+ // ========================================================================
78
+
79
+ .#{$prefix}-drawer-content-wrapper {
80
+ position: absolute;
81
+ transition: var(--drawer-transition-duration) var(--ease-in-out);
82
+ @if map.has-key($mixins, 'hook-drawer-content-wrapper') {
83
+ @include meta.apply(map.get($mixins, 'hook-drawer-content-wrapper'));
84
+ }
85
+ }
86
+
87
+ .#{$prefix}-drawer-content {
88
+ background-clip: padding-box;
89
+ background-color: var(--drawer-content-background);
90
+ border: 0 none;
91
+ box-sizing: border-box;
92
+ height: 100%;
93
+ outline: 0 none;
94
+ overflow: visible;
95
+ padding: var(--drawer-content-padding);
96
+ pointer-events: auto;
97
+ position: relative;
98
+ width: 100%;
99
+ z-index: 1;
100
+ @if map.has-key($mixins, 'hook-drawer-content') {
101
+ @include meta.apply(map.get($mixins, 'hook-drawer-content'));
102
+ }
103
+ }
104
+
105
+
106
+ // Placement
107
+ // ========================================================================
108
+
109
+ .#{$prefix}-drawer-left .#{$prefix}-drawer-content-wrapper {
110
+ bottom: 0;
111
+ left: 0;
112
+ top: 0;
113
+ }
114
+
115
+ .#{$prefix}-drawer-right .#{$prefix}-drawer-content-wrapper {
116
+ bottom: 0;
117
+ right: 0;
118
+ top: 0;
119
+ }
120
+
121
+ .#{$prefix}-drawer-left,
122
+ .#{$prefix}-drawer-right {
123
+ &:not(.#{$prefix}-drawer-reveal) .#{$prefix}-drawer-content-wrapper {
124
+ width: var(--drawer-width);
125
+ }
126
+
127
+ .#{$prefix}-drawer-content-wrapper {
128
+ max-width: 100vw;
129
+ }
130
+ }
131
+
132
+ .#{$prefix}-drawer-top .#{$prefix}-drawer-content-wrapper {
133
+ left: 0;
134
+ right: 0;
135
+ top: 0;
136
+ }
137
+
138
+ .#{$prefix}-drawer-bottom .#{$prefix}-drawer-content-wrapper {
139
+ bottom: 0;
140
+ left: 0;
141
+ right: 0;
142
+ }
143
+
144
+ .#{$prefix}-drawer-top,
145
+ .#{$prefix}-drawer-bottom {
146
+ &:not(.#{$prefix}-drawer-reveal) .#{$prefix}-drawer-content-wrapper {
147
+ height: var(--drawer-height);
148
+ }
149
+
150
+ .#{$prefix}-drawer-content-wrapper {
151
+ max-height: 100vh;
152
+ }
153
+ }
154
+
155
+
156
+ // Size
157
+ // ========================================================================
158
+
159
+ /* Large */
160
+ .#{$prefix}-drawer-large.#{$prefix}-drawer-left .#{$prefix}-drawer-content-wrapper,
161
+ .#{$prefix}-drawer-large.#{$prefix}-drawer-right .#{$prefix}-drawer-content-wrapper {
162
+ width: var(--drawer-large-width);
163
+ }
164
+
165
+ .#{$prefix}-drawer-large.#{$prefix}-drawer-top .#{$prefix}-drawer-content-wrapper,
166
+ .#{$prefix}-drawer-large.#{$prefix}-drawer-bottom .#{$prefix}-drawer-content-wrapper {
167
+ height: var(--drawer-large-height);
168
+ }
169
+
170
+
171
+ // Animation & Transition
172
+ // ========================================================================
173
+
174
+ .#{$prefix}-drawer-container-push-left,
175
+ .#{$prefix}-drawer-container-reveal-left {
176
+ left: 0;
177
+ transition-property: left;
178
+ will-change: left;
179
+
180
+ &.#{$prefix}-drawer-container-animation {
181
+ left: var(--drawer-width);
182
+
183
+ &.#{$prefix}-drawer-container-large {
184
+ left: var(--drawer-large-width);
185
+ }
186
+ }
187
+ }
188
+
189
+ .#{$prefix}-drawer-container-push-right,
190
+ .#{$prefix}-drawer-container-reveal-right {
191
+ right: 0;
192
+ transition-property: right;
193
+ will-change: right;
194
+
195
+ &.#{$prefix}-drawer-container-animation {
196
+ right: var(--drawer-width);
197
+
198
+ &.#{$prefix}-drawer-container-large {
199
+ right: var(--drawer-large-width);
200
+ }
201
+ }
202
+ }
203
+
204
+ .#{$prefix}-drawer-container-push-top,
205
+ .#{$prefix}-drawer-container-reveal-top {
206
+ top: 0;
207
+ transition-property: top;
208
+ will-change: top;
209
+
210
+ &.#{$prefix}-drawer-container-animation {
211
+ top: var(--drawer-height);
212
+
213
+ &.#{$prefix}-drawer-container-large {
214
+ top: var(--drawer-height);
215
+ }
216
+ }
217
+ }
218
+
219
+ .#{$prefix}-drawer-container-push-bottom,
220
+ .#{$prefix}-drawer-container-reveal-bottom {
221
+ bottom: 0;
222
+ transition-property: bottom;
223
+ will-change: bottom;
224
+
225
+ &.#{$prefix}-drawer-container-animation {
226
+ bottom: var(--drawer-height);
227
+
228
+ &.#{$prefix}-drawer-container-large {
229
+ bottom: var(--drawer-height);
230
+ }
231
+ }
232
+ }
233
+
234
+ /* Reveal animation */
235
+ .#{$prefix}-drawer-reveal .#{$prefix}-drawer-content-wrapper { overflow: hidden; }
236
+
237
+ .#{$prefix}-drawer-left.#{$prefix}-drawer-reveal,
238
+ .#{$prefix}-drawer-right.#{$prefix}-drawer-reveal {
239
+ &:not(.#{$prefix}-drawer-large) {
240
+ .#{$prefix}-drawer-content-wrapper {
241
+ width: 0;
242
+
243
+ .#{$prefix}-drawer-content { width: var(--drawer-width); }
244
+ }
245
+
246
+ &.#{$prefix}-drawer-open .#{$prefix}-drawer-content-wrapper { width: var(--drawer-width); }
247
+ }
248
+
249
+ &.#{$prefix}-drawer-large {
250
+ .#{$prefix}-drawer-content-wrapper {
251
+ .#{$prefix}-drawer-content { width: var(--drawer-large-width); }
252
+ }
253
+
254
+ &.#{$prefix}-drawer-open .#{$prefix}-drawer-content-wrapper { width: var(--drawer-large-width); }
255
+ }
256
+ }
257
+
258
+ .#{$prefix}-drawer-top.#{$prefix}-drawer-reveal,
259
+ .#{$prefix}-drawer-bottom.#{$prefix}-drawer-reveal {
260
+ &:not(.#{$prefix}-drawer-large) {
261
+ .#{$prefix}-drawer-content-wrapper {
262
+ height: 0;
263
+
264
+ .#{$prefix}-drawer-content { height: var(--drawer-height); }
265
+ }
266
+
267
+ &.#{$prefix}-drawer-open .#{$prefix}-drawer-content-wrapper { height: var(--drawer-height); }
268
+ }
269
+
270
+ &.#{$prefix}-drawer-large {
271
+ .#{$prefix}-drawer-content-wrapper {
272
+ .#{$prefix}-drawer-content { height: var(--drawer-large-height); }
273
+ }
274
+
275
+ &.#{$prefix}-drawer-open .#{$prefix}-drawer-content-wrapper { height: var(--drawer-large-height); }
276
+ }
277
+ }
278
+
279
+
280
+ // Motion
281
+ // ========================================================================
282
+
283
+ /* Fade */
284
+ .#{$prefix}-motion-drawer-fade {
285
+ &-appear,
286
+ &-enter,
287
+ &-leave {
288
+ &-active { transition: all var(--drawer-transition-duration) linear; }
289
+ }
290
+
291
+ &-appear,
292
+ &-enter {
293
+ opacity: 0;
294
+
295
+ &-active { opacity: 1; }
296
+ }
297
+
298
+ &-leave {
299
+ opacity: 1;
300
+
301
+ &-active { opacity: 0; }
302
+ }
303
+ }
304
+
305
+ /* Slide Left */
306
+ .#{$prefix}-motion-drawer-push-left,
307
+ .#{$prefix}-motion-drawer-slide-left {
308
+ will-change: transform;
309
+
310
+ &-appear,
311
+ &-enter,
312
+ &-leave {
313
+ &-active { transition: all var(--drawer-transition-duration); }
314
+ &-prepare { transition: none !important; }
315
+ }
316
+
317
+ &-appear,
318
+ &-enter {
319
+ transform: translateX(-100%);
320
+
321
+ &-active { transform: translateX(0); }
322
+ }
323
+
324
+ &-leave {
325
+ transform: translateX(0);
326
+
327
+ &-active { transform: translateX(-100%) !important; }
328
+ }
329
+ }
330
+
331
+ /* Slide Right */
332
+ .#{$prefix}-motion-drawer-push-right,
333
+ .#{$prefix}-motion-drawer-slide-right {
334
+ will-change: transform;
335
+
336
+ &-appear,
337
+ &-enter,
338
+ &-leave {
339
+ &-active { transition: all var(--drawer-transition-duration); }
340
+ &-prepare { transition: none !important; }
341
+ }
342
+
343
+ &-appear,
344
+ &-enter {
345
+ transform: translateX(100%);
346
+
347
+ &-active { transform: translateX(0); }
348
+ }
349
+
350
+ &-leave {
351
+ transform: translateX(0);
352
+
353
+ &-active { transform: translateX(100%) !important; }
354
+ }
355
+ }
356
+
357
+ /* Slide Top */
358
+ .#{$prefix}-motion-drawer-push-top,
359
+ .#{$prefix}-motion-drawer-slide-top {
360
+ will-change: transform;
361
+
362
+ &-appear,
363
+ &-enter,
364
+ &-leave {
365
+ &-active { transition: all var(--drawer-transition-duration); }
366
+ &-prepare { transition: none !important; }
367
+ }
368
+
369
+ &-appear,
370
+ &-enter {
371
+ transform: translateY(-100%);
372
+
373
+ &-active { transform: translateY(0); }
374
+ }
375
+
376
+ &-leave {
377
+ transform: translateX(0);
378
+
379
+ &-active { transform: translateY(-100%) !important; }
380
+ }
381
+ }
382
+
383
+ /* Slide Bottom */
384
+ .#{$prefix}-motion-drawer-push-bottom,
385
+ .#{$prefix}-motion-drawer-slide-bottom {
386
+ will-change: transform;
387
+
388
+ &-appear,
389
+ &-enter,
390
+ &-leave {
391
+ &-active { transition: all var(--drawer-transition-duration); }
392
+ &-prepare { transition: none !important; }
393
+ }
394
+
395
+ &-appear,
396
+ &-enter {
397
+ transform: translateY(100%);
398
+
399
+ &-active { transform: translateY(0); }
400
+ }
401
+
402
+ &-leave {
403
+ transform: translateX(0);
404
+
405
+ &-active { transform: translateY(100%) !important; }
406
+ }
407
+ }
408
+
409
+ /* Reveal Horizontal */
410
+ .#{$prefix}-motion-drawer-reveal-left,
411
+ .#{$prefix}-motion-drawer-reveal-right {
412
+ will-change: width;
413
+
414
+ &-appear,
415
+ &-enter,
416
+ &-leave {
417
+ &-active { transition: all var(--drawer-transition-duration); }
418
+ &-prepare { transition: none !important; }
419
+ }
420
+
421
+ &-appear,
422
+ &-enter {
423
+ width: 0 !important;
424
+
425
+ &-active { width: var(--drawer-width) !important; }
426
+ }
427
+
428
+ &-leave {
429
+ width: var(--drawer-width) !important;
430
+
431
+ &-active { width: 0 !important; }
432
+ }
433
+ }
434
+
435
+ /* Reveal Vertical */
436
+ .#{$prefix}-motion-drawer-reveal-top,
437
+ .#{$prefix}-motion-drawer-reveal-bottom {
438
+ will-change: height;
439
+
440
+ &-appear,
441
+ &-enter,
442
+ &-leave {
443
+ &-active { transition: all var(--drawer-transition-duration); }
444
+ &-prepare { transition: none !important; }
445
+ }
446
+
447
+ &-appear,
448
+ &-enter {
449
+ height: 0 !important;
450
+
451
+ &-active { height: var(--drawer-height) !important; }
452
+ }
453
+
454
+ &-leave {
455
+ height: var(--drawer-height) !important;
456
+
457
+ &-active { height: 0 !important; }
458
+ }
459
+ }
460
+
461
+ .#{$prefix}-drawer-large {
462
+ .#{$prefix}-motion-drawer-reveal-left,
463
+ .#{$prefix}-motion-drawer-reveal-right {
464
+ will-change: width;
465
+
466
+ &-appear,
467
+ &-enter,
468
+ &-leave {
469
+ &-active { transition: all var(--drawer-transition-duration); }
470
+ &-prepare { transition: none !important; }
471
+ }
472
+
473
+ &-appear,
474
+ &-enter {
475
+ width: 0 !important;
476
+
477
+ &-active { width: var(--drawer-large-width) !important; }
478
+ }
479
+
480
+ &-leave {
481
+ width: var(--drawer-large-width) !important;
482
+
483
+ &-active { width: 0 !important; }
484
+ }
485
+ }
486
+
487
+ .#{$prefix}-motion-drawer-reveal-top,
488
+ .#{$prefix}-motion-drawer-reveal-bottom {
489
+ will-change: height;
490
+
491
+ &-appear,
492
+ &-enter,
493
+ &-leave {
494
+ &-active { transition: all var(--drawer-transition-duration); }
495
+ &-prepare { transition: none !important; }
496
+ }
497
+
498
+ &-appear,
499
+ &-enter {
500
+ height: 0 !important;
501
+
502
+ &-active { height: var(--drawer-large-height) !important; }
503
+ }
504
+
505
+ &-leave {
506
+ height: var(--drawer-large-height) !important;
507
+
508
+ &-active { height: 0 !important; }
509
+ }
510
+ }
511
+ }
512
+
513
+
514
+ // Mask
515
+ // ========================================================================
516
+
517
+ .#{$prefix}-drawer-mask {
518
+ background-color: var(--drawer-mask-background);
519
+ inset: 0;
520
+ pointer-events: none;
521
+ position: absolute;
522
+ @if map.has-key($mixins, 'hook-drawer-mask') {
523
+ @include meta.apply(map.get($mixins, 'hook-drawer-mask'));
524
+ }
525
+ }
526
+
527
+ .#{$prefix}-drawer-animation .#{$prefix}-drawer-mask {
528
+ pointer-events: auto;
529
+ @if map.has-key($mixins, 'hook-drawer-mask-open') {
530
+ @include meta.apply(map.get($mixins, 'hook-drawer-mask-open'));
531
+ }
532
+ }
533
+
534
+
535
+ /* Close
536
+ * Adopts `uk-close`
537
+ ========================================================================== */
538
+
539
+ .#{$prefix}-drawer-close {
540
+ --icon-size: 24px;
541
+
542
+ box-sizing: content-box;
543
+ padding: var(--drawer-close-padding);
544
+ position: absolute;
545
+ right: var(--drawer-close-position);
546
+ top: var(--drawer-close-position);
547
+ z-index: var(--drawer-z-index);
548
+ @if map.has-key($mixins, 'hook-drawer-close') {
549
+ @include meta.apply(map.get($mixins, 'hook-drawer-close'));
550
+ }
551
+ }
552
+
553
+ /*
554
+ * Remove margin from adjacent element
555
+ */
556
+
557
+ .#{$prefix}-drawer-close:first-child + * {
558
+ margin-top: 0;
559
+ }
560
+
561
+ /*
562
+ * Hover
563
+ */
564
+
565
+ .#{$prefix}-drawer-close:hover {
566
+ @if map.has-key($mixins, 'hook-drawer-close-hover') {
567
+ @include meta.apply(map.get($mixins, 'hook-drawer-close-hover'));
568
+ }
569
+ }
570
+
571
+ @content;
572
+ }
573
+
574
+ @mixin drawer-tokens {
575
+ --drawer-content-background: var(--global-background);
576
+ --drawer-content-padding: var(--global-gutter);
577
+ --drawer-height: 360px;
578
+ --drawer-large-height: 768px;
579
+ --drawer-width: 360px;
580
+ --drawer-large-width: 768px;
581
+ --drawer-mask-background: #{$drawer-mask-background};
582
+ --drawer-z-index: calc(var(--global-z-index) + 30);
583
+ --drawer-transition-duration: var(--transition-medium-fast-duration);
584
+ --drawer-close-position: var(--global-small-margin);
585
+ --drawer-close-padding: #{$drawer-close-padding};
586
+
587
+ @content;
588
+ }
@@ -0,0 +1,11 @@
1
+ @use 'drawer' as *;
2
+
3
+ $generate-tokens: true !default;
4
+
5
+ @include drawer-styles;
6
+
7
+ @if $generate-tokens {
8
+ :root {
9
+ @include drawer-tokens;
10
+ }
11
+ }
@@ -0,0 +1,97 @@
1
+ // Name: Drop
2
+ // Description: Component to position any element next to any other element.
3
+ //
4
+ // Component: `uk-drop`
5
+ //
6
+ // Modifiers: `uk-drop-placement-top-*`
7
+ // `uk-drop-placement-bottom-*`
8
+ // `uk-drop-stack`
9
+ // `uk-drop-grid`
10
+ //
11
+ // States: `uk-drop-hidden`
12
+ //
13
+ // Uses: Animation
14
+ //
15
+ // ========================================================================
16
+
17
+ @use 'sass:map';
18
+ @use 'sass:meta';
19
+
20
+
21
+ // Variables
22
+ // ========================================================================
23
+
24
+ @use '../variables' as *;
25
+ @use '../mixins' as *;
26
+
27
+
28
+ @mixin drop-styles {
29
+ /* ========================================================================
30
+ Component: Drop
31
+ ========================================================================== */
32
+
33
+ /*
34
+ * 1. Set a default width
35
+ * 2. Set position
36
+ */
37
+
38
+ .#{$prefix}-drop {
39
+ /* 1 */
40
+ box-sizing: border-box;
41
+
42
+ /* 2 */
43
+ position: absolute;
44
+ width: var(--drop-width);
45
+ z-index: var(--drop-z-index);
46
+ }
47
+
48
+ /* Hide */
49
+ .#{$prefix}-drop-hidden { display: none; }
50
+
51
+
52
+ /* Drop mask
53
+ ========================================================================== */
54
+
55
+ .#{$prefix}-drop-mask {
56
+ background-color: var(--drop-mask-background);
57
+ inset: 0;
58
+ opacity: 0;
59
+ pointer-events: none;
60
+ position: fixed;
61
+ @if map.has-key($mixins, 'hook-drop-mask') {
62
+ @include meta.apply(map.get($mixins, 'hook-drop-mask'));
63
+ }
64
+ }
65
+
66
+ .#{$prefix}-drop-mask.#{$prefix}-active {
67
+ opacity: 1;
68
+ @if map.has-key($mixins, 'hook-drop-mask-active') {
69
+ @include meta.apply(map.get($mixins, 'hook-drop-mask-active'));
70
+ }
71
+ }
72
+
73
+
74
+ /* Grid modifiers
75
+ ========================================================================== */
76
+
77
+ .#{$prefix}-drop-stack .#{$prefix}-drop-grid > * { width: 100% !important; }
78
+
79
+
80
+ // Hooks
81
+ // ========================================================================
82
+
83
+ @if map.has-key($mixins, 'hook-drop-misc') {
84
+ @include meta.apply(map.get($mixins, 'hook-drop-misc'));
85
+ }
86
+
87
+ @content;
88
+ }
89
+
90
+ @mixin drop-tokens {
91
+ --drop-mask-background: #{$drop-mask-background};
92
+ --drop-margin: var(--global-margin);
93
+ --drop-width: #{$drop-width};
94
+ --drop-z-index: calc(var(--global-z-index) + 20);
95
+
96
+ @content;
97
+ }
@@ -0,0 +1,11 @@
1
+ @use 'drop' as *;
2
+
3
+ $generate-tokens: true !default;
4
+
5
+ @include drop-styles;
6
+
7
+ @if $generate-tokens {
8
+ :root {
9
+ @include drop-tokens;
10
+ }
11
+ }