@rolemodel/optics 0.2.3
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/.eslintrc.json +14 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/pull_request_template.md +30 -0
- package/.github/workflows/linting.yml +38 -0
- package/.github/workflows/publish-storybook.yml +26 -0
- package/.github/workflows/release-package.yml +33 -0
- package/.prettierignore +0 -0
- package/.prettierrc.json +8 -0
- package/.storybook/ModeSwitcher.jsx +98 -0
- package/.storybook/documentation.scss +65 -0
- package/.storybook/main.js +10 -0
- package/.storybook/manager.js +22 -0
- package/.storybook/preview.js +12 -0
- package/.storybook/rolemodelTheme.js +10 -0
- package/.stylelintrc.json +15 -0
- package/LICENSE +21 -0
- package/README.md +57 -0
- package/build_token_json.js +149 -0
- package/dist/css/optics.css +2586 -0
- package/dist/css/optics.css.map +1 -0
- package/dist/scss/addons/rails-modal-and-panel/index.scss +2 -0
- package/dist/scss/addons/rails-modal-and-panel/modal.scss +86 -0
- package/dist/scss/addons/rails-modal-and-panel/panel.scss +36 -0
- package/dist/scss/addons/tom-select.scss +77 -0
- package/dist/scss/components/alert.scss +158 -0
- package/dist/scss/components/badge.scss +80 -0
- package/dist/scss/components/button.scss +235 -0
- package/dist/scss/components/button_group.scss +35 -0
- package/dist/scss/components/card.scss +65 -0
- package/dist/scss/components/flash.scss +58 -0
- package/dist/scss/components/form.scss +178 -0
- package/dist/scss/components/icon.scss +109 -0
- package/dist/scss/components/index.scss +10 -0
- package/dist/scss/components/sidebar.scss +255 -0
- package/dist/scss/components/table.scss +132 -0
- package/dist/scss/core/base.scss +95 -0
- package/dist/scss/core/layout.scss +36 -0
- package/dist/scss/core/tokens/base_tokens.scss +251 -0
- package/dist/scss/core/tokens/dark_mode_tokens.scss +324 -0
- package/dist/scss/core/tokens/index.scss +3 -0
- package/dist/scss/core/tokens/scale_color_tokens.scss +303 -0
- package/dist/scss/core/utilities.scss +548 -0
- package/dist/scss/optics.scss +13 -0
- package/dist/scss/recipes/16six-sidebar.scss +97 -0
- package/dist/scss/recipes/domains-sidebar.scss +60 -0
- package/dist/tokens/tokens.json +391 -0
- package/package.json +80 -0
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
// Container Properties
|
|
2
|
+
|
|
3
|
+
.container {
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: $breakpoint-medium;
|
|
6
|
+
padding: 0 var(--rm-space-large);
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.container--sm {
|
|
11
|
+
max-width: $breakpoint-small;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container--md-padding {
|
|
15
|
+
padding: 0 var(--rm-space-medium);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.container--sm-padding {
|
|
19
|
+
padding: 0 var(--rm-space-small);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.container--xs {
|
|
23
|
+
max-width: $breakpoint-x-small;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Width Properties
|
|
27
|
+
|
|
28
|
+
.full-width {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.half-width {
|
|
33
|
+
width: 50%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.four-fifths-width {
|
|
37
|
+
width: calc(100% * 4 / 5);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.three-fifths-width {
|
|
41
|
+
width: calc(100% * 3 / 5);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.two-fifths-width {
|
|
45
|
+
width: calc(100% * 2 / 5);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.one-fifth-width {
|
|
49
|
+
width: calc(100% * 1 / 5);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.three-quarters-width {
|
|
53
|
+
width: calc(100% * 3 / 4);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.one-quarter-width {
|
|
57
|
+
width: calc(100% * 1 / 4);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.two-thirds-width {
|
|
61
|
+
width: calc(100% * 2 / 3);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.one-third-width {
|
|
65
|
+
width: calc(100% * 1 / 3);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Flex Properties
|
|
69
|
+
|
|
70
|
+
.flex {
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.flex-col {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.flex-row {
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.flex-wrap {
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.flex-no-wrap {
|
|
87
|
+
flex-wrap: nowrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.flex-grow-1 {
|
|
91
|
+
flex-grow: 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Gap Properties
|
|
95
|
+
.gap-xxs {
|
|
96
|
+
gap: var(--rm-space-2x-small);
|
|
97
|
+
|
|
98
|
+
--rm-gap: var(--rm-space-2x-small);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.gap-xs {
|
|
102
|
+
gap: var(--rm-space-x-small);
|
|
103
|
+
|
|
104
|
+
--rm-gap: var(--rm-space-x-small);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.gap-sm {
|
|
108
|
+
gap: var(--rm-space-small);
|
|
109
|
+
|
|
110
|
+
--rm-gap: var(--rm-space-small);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.gap-md {
|
|
114
|
+
gap: var(--rm-space-medium);
|
|
115
|
+
|
|
116
|
+
--rm-gap: var(--rm-space-medium);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.gap-lg {
|
|
120
|
+
gap: var(--rm-space-large);
|
|
121
|
+
|
|
122
|
+
--rm-gap: var(--rm-space-large);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.gap-xl {
|
|
126
|
+
gap: var(--rm-space-x-large);
|
|
127
|
+
|
|
128
|
+
--rm-gap: var(--rm-space-x-large);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Justify Content
|
|
132
|
+
|
|
133
|
+
.justify-start {
|
|
134
|
+
justify-content: flex-start;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.justify-center {
|
|
138
|
+
justify-content: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.justify-end {
|
|
142
|
+
justify-content: flex-end;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.justify-between {
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.justify-around {
|
|
150
|
+
justify-content: space-around;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Align Items
|
|
154
|
+
|
|
155
|
+
.items-stretch {
|
|
156
|
+
align-items: stretch;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.items-start {
|
|
160
|
+
align-items: flex-start;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.items-center {
|
|
164
|
+
align-items: center;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.items-end {
|
|
168
|
+
align-items: flex-end;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.items-baseline {
|
|
172
|
+
align-items: baseline;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Align Self
|
|
176
|
+
|
|
177
|
+
.self-auto {
|
|
178
|
+
align-self: auto;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.self-start {
|
|
182
|
+
align-self: flex-start;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.self-center {
|
|
186
|
+
align-self: center;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.self-end {
|
|
190
|
+
align-self: flex-end;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.self-stretch {
|
|
194
|
+
align-self: stretch;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Text Alignment
|
|
198
|
+
|
|
199
|
+
.text-left {
|
|
200
|
+
text-align: left;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.text-center {
|
|
204
|
+
text-align: center;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.text-right {
|
|
208
|
+
text-align: right;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.text-justify {
|
|
212
|
+
text-align: justify;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Box Margin
|
|
216
|
+
|
|
217
|
+
.margin-xl {
|
|
218
|
+
margin: var(--rm-space-x-large);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.margin-lg {
|
|
222
|
+
margin: var(--rm-space-large);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.margin-md {
|
|
226
|
+
margin: var(--rm-space-medium);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.margin-sm {
|
|
230
|
+
margin: var(--rm-space-small);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.margin-xs {
|
|
234
|
+
margin: var(--rm-space-x-small);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.margin-none {
|
|
238
|
+
margin: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.margin-auto {
|
|
242
|
+
margin: auto;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Vertical Margin
|
|
246
|
+
|
|
247
|
+
.margin-y-xl {
|
|
248
|
+
margin-top: var(--rm-space-x-large);
|
|
249
|
+
margin-bottom: var(--rm-space-x-large);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.margin-y-lg {
|
|
253
|
+
margin-top: var(--rm-space-large);
|
|
254
|
+
margin-bottom: var(--rm-space-large);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.margin-y-md {
|
|
258
|
+
margin-top: var(--rm-space-medium);
|
|
259
|
+
margin-bottom: var(--rm-space-medium);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.margin-y-sm {
|
|
263
|
+
margin-top: var(--rm-space-small);
|
|
264
|
+
margin-bottom: var(--rm-space-small);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.margin-y-xs {
|
|
268
|
+
margin-top: var(--rm-space-x-small);
|
|
269
|
+
margin-bottom: var(--rm-space-x-small);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.margin-y-none {
|
|
273
|
+
margin-top: 0;
|
|
274
|
+
margin-bottom: 0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Horizontal Margin
|
|
278
|
+
|
|
279
|
+
.margin-x-xl {
|
|
280
|
+
margin-right: var(--rm-space-x-large);
|
|
281
|
+
margin-left: var(--rm-space-x-large);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.margin-x-lg {
|
|
285
|
+
margin-right: var(--rm-space-large);
|
|
286
|
+
margin-left: var(--rm-space-large);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.margin-x-md {
|
|
290
|
+
margin-right: var(--rm-space-medium);
|
|
291
|
+
margin-left: var(--rm-space-medium);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.margin-x-sm {
|
|
295
|
+
margin-right: var(--rm-space-small);
|
|
296
|
+
margin-left: var(--rm-space-small);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.margin-x-xs {
|
|
300
|
+
margin-right: var(--rm-space-x-small);
|
|
301
|
+
margin-left: var(--rm-space-x-small);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.margin-x-none {
|
|
305
|
+
margin-right: 0;
|
|
306
|
+
margin-left: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Top Margin
|
|
310
|
+
|
|
311
|
+
.margin-top-xl {
|
|
312
|
+
margin-top: var(--rm-space-x-large);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.margin-top-lg {
|
|
316
|
+
margin-top: var(--rm-space-large);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.margin-top-md {
|
|
320
|
+
margin-top: var(--rm-space-medium);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.margin-top-sm {
|
|
324
|
+
margin-top: var(--rm-space-small);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.margin-top-xs {
|
|
328
|
+
margin-top: var(--rm-space-x-small);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.margin-top-none {
|
|
332
|
+
margin-top: 0;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Bottom Margin
|
|
336
|
+
|
|
337
|
+
.margin-bottom-xl {
|
|
338
|
+
margin-bottom: var(--rm-space-x-large);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.margin-bottom-lg {
|
|
342
|
+
margin-bottom: var(--rm-space-large);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.margin-bottom-md {
|
|
346
|
+
margin-bottom: var(--rm-space-medium);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.margin-bottom-sm {
|
|
350
|
+
margin-bottom: var(--rm-space-small);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.margin-bottom-xs {
|
|
354
|
+
margin-bottom: var(--rm-space-x-small);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.margin-bottom-none {
|
|
358
|
+
margin-bottom: 0;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Right Margin
|
|
362
|
+
|
|
363
|
+
.margin-right-xl {
|
|
364
|
+
margin-right: var(--rm-space-x-large);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.margin-right-lg {
|
|
368
|
+
margin-right: var(--rm-space-large);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.margin-right-md {
|
|
372
|
+
margin-right: var(--rm-space-medium);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.margin-right-sm {
|
|
376
|
+
margin-right: var(--rm-space-small);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.margin-right-xs {
|
|
380
|
+
margin-right: var(--rm-space-x-small);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.margin-right-none {
|
|
384
|
+
margin-left: 0;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Left Margin
|
|
388
|
+
|
|
389
|
+
.margin-left-xl {
|
|
390
|
+
margin-left: var(--rm-space-x-large);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.margin-left-lg {
|
|
394
|
+
margin-left: var(--rm-space-large);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.margin-left-md {
|
|
398
|
+
margin-left: var(--rm-space-medium);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.margin-left-sm {
|
|
402
|
+
margin-left: var(--rm-space-small);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.margin-left-xs {
|
|
406
|
+
margin-left: var(--rm-space-x-small);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.margin-left-none {
|
|
410
|
+
margin-left: 0;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Layout properties
|
|
414
|
+
// Layout row evenly spaces all elements within it.
|
|
415
|
+
// It also makes it responsive at the sm breakpoint.
|
|
416
|
+
// If you combine it with flex-wrap, it tries to break using the
|
|
417
|
+
// normal flex wrap rules instead of responsively.
|
|
418
|
+
|
|
419
|
+
// E.G:
|
|
420
|
+
// .flex.layout-row
|
|
421
|
+
// .card Item
|
|
422
|
+
// .card Item
|
|
423
|
+
// .card Item
|
|
424
|
+
|
|
425
|
+
// Normal width
|
|
426
|
+
// | Item | | Item | | Item |
|
|
427
|
+
// Mobile
|
|
428
|
+
// | Item |
|
|
429
|
+
// | Item |
|
|
430
|
+
// | Item |
|
|
431
|
+
|
|
432
|
+
// E.G:
|
|
433
|
+
// .flex.layout-row.flex-wrap
|
|
434
|
+
// .card Item
|
|
435
|
+
// .card Item
|
|
436
|
+
|
|
437
|
+
// Normal width
|
|
438
|
+
// | Item | | Item | | Item |
|
|
439
|
+
// Mobile (really small)
|
|
440
|
+
// | Item | | Item |
|
|
441
|
+
// | Item |
|
|
442
|
+
.layout-row {
|
|
443
|
+
& > * {
|
|
444
|
+
flex: 1;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
@media screen and (max-width: $breakpoint-small) {
|
|
448
|
+
// Use flex wrapping strategy instead of responsive wrapping at sm breakpoint.
|
|
449
|
+
&:not(.flex-wrap) {
|
|
450
|
+
flex-direction: column;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// Flexible Layout
|
|
456
|
+
// This allows for creating a grid like area using one flex container with multiple lines
|
|
457
|
+
// Percentage based widths can be used to define the areas of each row.
|
|
458
|
+
// Note: This responsively breaks at $breakpoint-small to a single column.
|
|
459
|
+
// You can add the .flex-no-wrap class to prevent that.
|
|
460
|
+
// This can also be combined with .gap-{size} to space items without having
|
|
461
|
+
// them wrap when you don't want them to.
|
|
462
|
+
|
|
463
|
+
// E.G
|
|
464
|
+
// | One Fifth | | One Fifth | | One Fifth | | One Fifth | | One Fifth |
|
|
465
|
+
// | One Quarter | | One Quarter | | One Quarter | | One Quarter |
|
|
466
|
+
// | One Third | | One Third | | One Third |
|
|
467
|
+
// | One Half | | One Half |
|
|
468
|
+
// | One Full |
|
|
469
|
+
// Mobile
|
|
470
|
+
// | Item |
|
|
471
|
+
// | Item |
|
|
472
|
+
// | Item |
|
|
473
|
+
// | Item |
|
|
474
|
+
// | Item |
|
|
475
|
+
// | Item |
|
|
476
|
+
// | Item |
|
|
477
|
+
// | Item |
|
|
478
|
+
// | Item |
|
|
479
|
+
// | Item |
|
|
480
|
+
// | Item |
|
|
481
|
+
// | Item |
|
|
482
|
+
// | Item |
|
|
483
|
+
// | Item |
|
|
484
|
+
// | Item |
|
|
485
|
+
|
|
486
|
+
// .flexible-layout-area can be nested in the item of another .flexible-layout-area
|
|
487
|
+
// for a more complex layout if needed. Gaps are not inherited and will need
|
|
488
|
+
// to be redefined at each level
|
|
489
|
+
|
|
490
|
+
.flexible-layout-area {
|
|
491
|
+
display: flex;
|
|
492
|
+
flex-wrap: wrap;
|
|
493
|
+
|
|
494
|
+
& > * {
|
|
495
|
+
flex: 1;
|
|
496
|
+
|
|
497
|
+
&.four-fifths-width {
|
|
498
|
+
flex-basis: calc(calc(100% * 4 / 5) - var(--rm-gap));
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
&.three-fifths-width {
|
|
502
|
+
flex-basis: calc(calc(100% * 3 / 5) - var(--rm-gap));
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
&.two-fifths-width {
|
|
506
|
+
flex-basis: calc(calc(100% * 2 / 5) - var(--rm-gap));
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
&.one-fifth-width {
|
|
510
|
+
flex-basis: calc(calc(100% * 1 / 5) - var(--rm-gap));
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
&.three-quarters-width {
|
|
514
|
+
flex-basis: calc(calc(100% * 3 / 4) - var(--rm-gap));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
&.one-quarter-width {
|
|
518
|
+
flex-basis: calc(calc(100% * 1 / 4) - var(--rm-gap));
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
&.two-thirds-width {
|
|
522
|
+
flex-basis: calc(calc(100% * 2 / 3) - var(--rm-gap));
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
&.one-third-width {
|
|
526
|
+
flex-basis: calc(calc(100% * 1 / 3) - var(--rm-gap));
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
&.full-width {
|
|
530
|
+
flex-basis: calc(100% - var(--rm-gap));
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
&.half-width {
|
|
534
|
+
flex-basis: calc(50% - var(--rm-gap));
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
@media screen and (max-width: $breakpoint-small) {
|
|
539
|
+
&:not(.flex-no-wrap) {
|
|
540
|
+
flex-direction: column;
|
|
541
|
+
|
|
542
|
+
& > * {
|
|
543
|
+
width: 100%;
|
|
544
|
+
flex-basis: 100%;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Third party Vendors
|
|
2
|
+
@import 'modern-css-reset/dist/reset';
|
|
3
|
+
|
|
4
|
+
// Tokens
|
|
5
|
+
@import 'core/tokens';
|
|
6
|
+
|
|
7
|
+
// Base styles and utilities
|
|
8
|
+
@import 'core/base';
|
|
9
|
+
@import 'core/layout';
|
|
10
|
+
@import 'core/utilities';
|
|
11
|
+
|
|
12
|
+
// Components
|
|
13
|
+
@import 'components';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// 16Six Sidebar Example
|
|
2
|
+
@mixin sidebar-16six-rail-global {
|
|
3
|
+
.sidebar__brand {
|
|
4
|
+
svg {
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 0 var(--rm-space-small);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sidebar__brand-label {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin sidebar-16six-drawer-global {
|
|
16
|
+
.sidebar__item {
|
|
17
|
+
border-radius: var(--rm-radius-large);
|
|
18
|
+
font-size: var(--rm-font-small);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.sidebar-16six {
|
|
23
|
+
@extend %sidebar-global;
|
|
24
|
+
|
|
25
|
+
--_rm-sidebar-spacing: var(--rm-space-x-small);
|
|
26
|
+
|
|
27
|
+
// Normal
|
|
28
|
+
--_rm-sidebar-background-color: var(--rm-color-primary-minus-five);
|
|
29
|
+
--_rm-sidebar-text-color: var(--rm-color-primary-on-minus-five);
|
|
30
|
+
|
|
31
|
+
// Active
|
|
32
|
+
--_rm-sidebar-icon-background-active-color: var(--rm-color-primary-minus-three);
|
|
33
|
+
--_rm-sidebar-icon-text-active-color: var(--rm-color-primary-on-minus-three);
|
|
34
|
+
|
|
35
|
+
// Hover
|
|
36
|
+
--_rm-sidebar-icon-background-hover-color: var(--rm-color-primary-minus-three);
|
|
37
|
+
--_rm-sidebar-icon-text-hover-color: var(--rm-color-primary-on-minus-three);
|
|
38
|
+
|
|
39
|
+
gap: var(--rm-space-x-large);
|
|
40
|
+
|
|
41
|
+
.sidebar__brand {
|
|
42
|
+
display: flex;
|
|
43
|
+
color: inherit;
|
|
44
|
+
gap: var(--rm-space-small);
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
|
|
47
|
+
svg {
|
|
48
|
+
width: var(--rm-space-3x-large);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sidebar__brand-label {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: var(--rm-space-4x-small);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.sidebar__content {
|
|
59
|
+
gap: var(--rm-space-x-small);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sidebar__item {
|
|
63
|
+
.sidebar__item-icon {
|
|
64
|
+
border-radius: var(--rm-radius-large);
|
|
65
|
+
|
|
66
|
+
&.sidebar__item-icon--rotated {
|
|
67
|
+
rotate: 90deg;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:hover,
|
|
72
|
+
&.active {
|
|
73
|
+
.sidebar__item-icon {
|
|
74
|
+
--rm-mso-weight: var(--rm-font-weight-medium);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Modifiers
|
|
80
|
+
&.sidebar--drawer:not(.sidebar--responsive) {
|
|
81
|
+
@include sidebar-16six-drawer-global;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.sidebar--drawer.sidebar--responsive {
|
|
85
|
+
@media (width > $breakpoint-medium) {
|
|
86
|
+
@include sidebar-16six-drawer-global;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (width <= $breakpoint-medium) {
|
|
90
|
+
@include sidebar-16six-rail-global;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.sidebar--rail {
|
|
95
|
+
@include sidebar-16six-rail-global;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Domains Sidebar Example
|
|
2
|
+
@mixin sidebar-domains-rail-global {
|
|
3
|
+
.sidebar__brand {
|
|
4
|
+
padding: 0 var(--_rm-sidebar-spacing);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@mixin sidebar-domains-drawer-global {
|
|
9
|
+
.sidebar__content {
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sidebar__item {
|
|
14
|
+
border-bottom-left-radius: 0;
|
|
15
|
+
border-top-left-radius: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.sidebar__section-divider {
|
|
19
|
+
margin: var(--rm-space-small) 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.sidebar-domains {
|
|
24
|
+
@extend %sidebar-global;
|
|
25
|
+
|
|
26
|
+
// Normal
|
|
27
|
+
--_rm-sidebar-background-color: var(--rm-color-background);
|
|
28
|
+
--_rm-sidebar-text-color: var(--rm-color-on-background);
|
|
29
|
+
|
|
30
|
+
// Active
|
|
31
|
+
--_rm-sidebar-icon-background-active-color: var(--rm-color-primary-plus-seven);
|
|
32
|
+
--_rm-sidebar-icon-text-active-color: var(--rm-color-primary-on-plus-seven);
|
|
33
|
+
|
|
34
|
+
// Hover
|
|
35
|
+
--_rm-sidebar-icon-background-hover-color: var(--rm-color-neutral-plus-seven);
|
|
36
|
+
--_rm-sidebar-icon-text-hover-color: var(--rm-color-neutral-on-plus-seven);
|
|
37
|
+
|
|
38
|
+
.sidebar__brand {
|
|
39
|
+
padding: 0 var(--rm-space-4x-large);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Modifiers
|
|
43
|
+
&.sidebar--drawer:not(.sidebar--responsive) {
|
|
44
|
+
@include sidebar-domains-drawer-global;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.sidebar--drawer.sidebar--responsive {
|
|
48
|
+
@media (width > $breakpoint-medium) {
|
|
49
|
+
@include sidebar-domains-drawer-global;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (width <= $breakpoint-medium) {
|
|
53
|
+
@include sidebar-domains-rail-global;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.sidebar--rail {
|
|
58
|
+
@include sidebar-domains-rail-global;
|
|
59
|
+
}
|
|
60
|
+
}
|