@rolemodel/optics 2.3.1 → 2.5.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.
- package/.github/workflows/deploy-to-ghp.yml +2 -2
- package/.github/workflows/deploy-to-npm.yml +9 -5
- package/.github/workflows/linting.yml +5 -3
- package/.github/workflows/publish-storybook.yml +4 -4
- package/.prettierignore +3 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +1740 -0
- package/README.md +16 -0
- package/context7.json +4 -0
- package/dist/README.md +16 -0
- package/dist/css/addons/fonts/lucide_icons.css +6380 -3081
- package/dist/css/addons/fonts/phosphor_icons.css +8 -7
- package/dist/css/addons/fonts/tabler_icons.css +2 -1
- package/dist/css/components/accordion.css +1 -1
- package/dist/css/components/icon.css +30 -0
- package/dist/css/components/index.css +26 -26
- package/dist/css/components/text_pair.css +5 -1
- package/dist/css/core/fonts/index.css +2 -2
- package/dist/css/core/tokens/index.css +2 -2
- package/dist/css/core/utilities.css +157 -10
- package/dist/css/optics+feather_icons.css +600 -12
- package/dist/css/optics+feather_icons.min.css +1 -1
- package/dist/css/optics+lucide_icons.css +6748 -3088
- package/dist/css/optics+lucide_icons.min.css +1 -1
- package/dist/css/optics+material_outlined_variable.css +370 -12
- package/dist/css/optics+material_outlined_variable.min.css +1 -1
- package/dist/css/optics+no_icons.css +370 -12
- package/dist/css/optics+no_icons.min.css +1 -1
- package/dist/css/optics+phosphor_icons.css +381 -19
- package/dist/css/optics+phosphor_icons.min.css +1 -1
- package/dist/css/optics+tabler_icons.css +373 -13
- package/dist/css/optics+tabler_icons.min.css +1 -1
- package/dist/css/optics.css +371 -12
- package/dist/css/optics.min.css +1 -1
- package/dist/package.json +19 -16
- package/package.json +19 -16
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/*
|
|
2
2
|
See all icons at: https://phosphoricons.com/
|
|
3
|
-
|
|
3
|
+
See Changelog at: https://github.com/phosphor-icons/web/releases
|
|
4
|
+
Current version: 2.1.2
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
|
-
@import 'https://unpkg.com/@phosphor-icons/web@2.1.
|
|
7
|
-
@import 'https://unpkg.com/@phosphor-icons/web@2.1.
|
|
8
|
-
@import 'https://unpkg.com/@phosphor-icons/web@2.1.
|
|
9
|
-
@import 'https://unpkg.com/@phosphor-icons/web@2.1.
|
|
10
|
-
@import 'https://unpkg.com/@phosphor-icons/web@2.1.
|
|
11
|
-
@import 'https://unpkg.com/@phosphor-icons/web@2.1.
|
|
7
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/regular/style.css';
|
|
8
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/thin/style.css';
|
|
9
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/light/style.css';
|
|
10
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/bold/style.css';
|
|
11
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/fill/style.css';
|
|
12
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.2/src/duotone/style.css';
|
|
12
13
|
|
|
13
14
|
/* Note: the important tag is how Phosphor sets up the fonts which is why we replicate them here */
|
|
14
15
|
|
|
@@ -26,6 +26,13 @@
|
|
|
26
26
|
--_op-icon-optical-size-large: 40;
|
|
27
27
|
--_op-icon-optical-size-x-large: 48;
|
|
28
28
|
|
|
29
|
+
/* SVG (.icon--svg) */
|
|
30
|
+
--_op-icon-stroke-width-light: 1;
|
|
31
|
+
--_op-icon-stroke-width-normal: 1.5;
|
|
32
|
+
--_op-icon-stroke-width-semi-bold: 2;
|
|
33
|
+
--_op-icon-stroke-width-bold: 2.5;
|
|
34
|
+
--_op-icon-svg-opacity-low-emphasis: 0.6;
|
|
35
|
+
|
|
29
36
|
/* Private API (component option defaults) */
|
|
30
37
|
--__op-icon-weight: var(--_op-icon-weight-normal);
|
|
31
38
|
--__op-icon-fill: var(--_op-icon-fill-outlined);
|
|
@@ -53,18 +60,22 @@
|
|
|
53
60
|
/* Weight Modifiers */
|
|
54
61
|
&.icon--weight-light {
|
|
55
62
|
--__op-icon-weight: var(--_op-icon-weight-light);
|
|
63
|
+
--__op-icon-stroke-width: var(--_op-icon-stroke-width-light);
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
&.icon--weight-normal {
|
|
59
67
|
--__op-icon-weight: var(--_op-icon-weight-normal);
|
|
68
|
+
--__op-icon-stroke-width: var(--_op-icon-stroke-width-normal);
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
&.icon--weight-semi-bold {
|
|
63
72
|
--__op-icon-weight: var(--_op-icon-weight-semi-bold);
|
|
73
|
+
--__op-icon-stroke-width: var(--_op-icon-stroke-width-semi-bold);
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
&.icon--weight-bold {
|
|
67
77
|
--__op-icon-weight: var(--_op-icon-weight-bold);
|
|
78
|
+
--__op-icon-stroke-width: var(--_op-icon-stroke-width-bold);
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
/* Emphasis */
|
|
@@ -100,6 +111,25 @@
|
|
|
100
111
|
--__op-icon-font-size: var(--_op-icon-font-size-x-large);
|
|
101
112
|
--__op-icon-optical-size: var(--_op-icon-optical-size-x-large);
|
|
102
113
|
}
|
|
114
|
+
|
|
115
|
+
/* SVG Modifier: an inline SVG instead of a font glyph, e.g. `icon icon--svg icon--large` */
|
|
116
|
+
&.icon--svg {
|
|
117
|
+
svg {
|
|
118
|
+
display: block;
|
|
119
|
+
block-size: 100%;
|
|
120
|
+
inline-size: 100%;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* A rule on the <svg> root cannot beat a stroke-width attribute on a child, so target the attribute.
|
|
124
|
+
With no weight modifier the set keeps the widths it was drawn with. */
|
|
125
|
+
&:is(.icon--weight-light, .icon--weight-normal, .icon--weight-semi-bold, .icon--weight-bold) svg [stroke-width] {
|
|
126
|
+
stroke-width: var(--__op-icon-stroke-width);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.icon--low-emphasis {
|
|
130
|
+
opacity: var(--_op-icon-svg-opacity-low-emphasis);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
103
133
|
}
|
|
104
134
|
|
|
105
135
|
/* Material Icons class provided by the Google Fonts CDN */
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
@import 'accordion';
|
|
2
|
-
@import 'alert';
|
|
3
|
-
@import 'avatar';
|
|
4
|
-
@import 'badge';
|
|
5
|
-
@import 'breadcrumbs';
|
|
6
|
-
@import 'button';
|
|
7
|
-
@import 'button_group';
|
|
8
|
-
@import 'card';
|
|
9
|
-
@import 'confirm-dialog';
|
|
10
|
-
@import 'content-header';
|
|
11
|
-
@import 'divider';
|
|
12
|
-
@import 'form';
|
|
13
|
-
@import 'icon';
|
|
14
|
-
@import 'modal';
|
|
15
|
-
@import 'navbar';
|
|
16
|
-
@import 'pagination';
|
|
17
|
-
@import 'segmented-control';
|
|
18
|
-
@import 'sidebar';
|
|
19
|
-
@import 'side_panel';
|
|
20
|
-
@import 'spinner';
|
|
21
|
-
@import 'switch';
|
|
22
|
-
@import 'tab';
|
|
23
|
-
@import 'table';
|
|
24
|
-
@import 'tag';
|
|
25
|
-
@import 'text_pair';
|
|
26
|
-
@import 'tooltip';
|
|
1
|
+
@import 'accordion.css';
|
|
2
|
+
@import 'alert.css';
|
|
3
|
+
@import 'avatar.css';
|
|
4
|
+
@import 'badge.css';
|
|
5
|
+
@import 'breadcrumbs.css';
|
|
6
|
+
@import 'button.css';
|
|
7
|
+
@import 'button_group.css';
|
|
8
|
+
@import 'card.css';
|
|
9
|
+
@import 'confirm-dialog.css';
|
|
10
|
+
@import 'content-header.css';
|
|
11
|
+
@import 'divider.css';
|
|
12
|
+
@import 'form.css';
|
|
13
|
+
@import 'icon.css';
|
|
14
|
+
@import 'modal.css';
|
|
15
|
+
@import 'navbar.css';
|
|
16
|
+
@import 'pagination.css';
|
|
17
|
+
@import 'segmented-control.css';
|
|
18
|
+
@import 'sidebar.css';
|
|
19
|
+
@import 'side_panel.css';
|
|
20
|
+
@import 'spinner.css';
|
|
21
|
+
@import 'switch.css';
|
|
22
|
+
@import 'tab.css';
|
|
23
|
+
@import 'table.css';
|
|
24
|
+
@import 'tag.css';
|
|
25
|
+
@import 'text_pair.css';
|
|
26
|
+
@import 'tooltip.css';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import 'base_tokens';
|
|
2
|
-
@import 'scale_color_tokens';
|
|
1
|
+
@import 'base_tokens.css';
|
|
2
|
+
@import 'scale_color_tokens.css';
|
|
@@ -94,6 +94,12 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/* Gap Properties */
|
|
97
|
+
.gap-none {
|
|
98
|
+
gap: 0;
|
|
99
|
+
|
|
100
|
+
--op-gap: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
97
103
|
.gap-xxs {
|
|
98
104
|
gap: var(--op-space-2x-small);
|
|
99
105
|
|
|
@@ -424,21 +430,27 @@
|
|
|
424
430
|
.op-stack {
|
|
425
431
|
display: flex;
|
|
426
432
|
flex-direction: column;
|
|
427
|
-
|
|
433
|
+
margin-block: 0;
|
|
434
|
+
margin-inline: 0;
|
|
428
435
|
|
|
429
|
-
|
|
430
|
-
|
|
436
|
+
/* zero specificity. Lets utilities override */
|
|
437
|
+
:where(&) {
|
|
438
|
+
gap: var(--op-space-medium);
|
|
439
|
+
}
|
|
431
440
|
}
|
|
432
441
|
|
|
433
442
|
/* Equivalent to .flex.flex-wrap.items-center.gap-md */
|
|
434
443
|
.op-cluster {
|
|
435
444
|
display: flex;
|
|
436
445
|
flex-wrap: wrap;
|
|
437
|
-
|
|
446
|
+
margin-block: 0;
|
|
447
|
+
margin-inline: 0;
|
|
438
448
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
449
|
+
/* zero specificity. Lets utilities override */
|
|
450
|
+
:where(&) {
|
|
451
|
+
align-items: center;
|
|
452
|
+
gap: var(--op-space-medium);
|
|
453
|
+
}
|
|
442
454
|
}
|
|
443
455
|
|
|
444
456
|
/* Equivalent to .flex.flex-wrap.items-center.justify-between.gap-md */
|
|
@@ -446,9 +458,144 @@
|
|
|
446
458
|
display: flex;
|
|
447
459
|
flex-wrap: wrap;
|
|
448
460
|
justify-content: space-between;
|
|
461
|
+
margin-block: 0;
|
|
462
|
+
margin-inline: 0;
|
|
463
|
+
|
|
464
|
+
/* zero specificity. Lets utilities override */
|
|
465
|
+
:where(&) {
|
|
466
|
+
align-items: center;
|
|
467
|
+
gap: var(--op-space-medium);
|
|
468
|
+
}
|
|
449
469
|
}
|
|
450
470
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
471
|
+
/*
|
|
472
|
+
side by side layout with a small area and a large area
|
|
473
|
+
similar to .flex with a .flex-grow-1 within it, but with a more semantic name and wrap handling.
|
|
474
|
+
|
|
475
|
+
|[] [ ]|
|
|
476
|
+
|[ ] []| with end
|
|
477
|
+
*/
|
|
478
|
+
.op-flank {
|
|
479
|
+
display: flex;
|
|
480
|
+
margin-block: 0;
|
|
481
|
+
margin-inline: 0;
|
|
482
|
+
|
|
483
|
+
/* zero specificity. Lets utilities override */
|
|
484
|
+
:where(&) {
|
|
485
|
+
flex-wrap: wrap;
|
|
486
|
+
align-items: center;
|
|
487
|
+
gap: var(--op-space-medium);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* Small area */
|
|
491
|
+
&:not(.op-flank--end) > :first-child,
|
|
492
|
+
&.op-flank--end > :last-child {
|
|
493
|
+
flex-basis: auto;
|
|
494
|
+
flex-grow: 1;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/* Large area */
|
|
498
|
+
&:not(.op-flank--end) > :last-child,
|
|
499
|
+
&.op-flank--end > :first-child {
|
|
500
|
+
flex-basis: 0;
|
|
501
|
+
flex-grow: 999;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/* Grid Layout */
|
|
506
|
+
.op-grid {
|
|
507
|
+
--_op-grid-min-column-size: var(--op-space-4x-large);
|
|
508
|
+
--_op-grid-max-column-size: 0px;
|
|
509
|
+
|
|
510
|
+
display: grid;
|
|
511
|
+
grid-template-columns: repeat(
|
|
512
|
+
auto-fit,
|
|
513
|
+
minmax(max(var(--_op-grid-min-column-size), var(--_op-grid-max-column-size)), 1fr)
|
|
514
|
+
);
|
|
515
|
+
margin-block: 0;
|
|
516
|
+
margin-inline: 0;
|
|
517
|
+
|
|
518
|
+
/* zero specificity. Lets utilities override */
|
|
519
|
+
:where(&) {
|
|
520
|
+
gap: var(--op-space-medium);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
&.op-grid--2-column {
|
|
524
|
+
--_op-grid-max-column-size: calc(100% / 3);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
&.op-grid--3-column {
|
|
528
|
+
--_op-grid-max-column-size: calc(100% / 4);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
&.op-grid--4-column {
|
|
532
|
+
--_op-grid-max-column-size: calc(100% / 5);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
&.op-grid--5-column {
|
|
536
|
+
--_op-grid-max-column-size: calc(100% / 6);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
&.op-grid--6-column {
|
|
540
|
+
--_op-grid-max-column-size: calc(100% / 7);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/* Frame */
|
|
545
|
+
@property --_op-frame-inline-size {
|
|
546
|
+
inherits: true;
|
|
547
|
+
initial-value: 100%;
|
|
548
|
+
syntax: '<length> | <percentage>';
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.op-frame {
|
|
552
|
+
display: flex;
|
|
553
|
+
overflow: hidden;
|
|
554
|
+
border-radius: inherit;
|
|
555
|
+
aspect-ratio: 1 / 1;
|
|
556
|
+
margin-block: 0;
|
|
557
|
+
margin-inline: 0;
|
|
558
|
+
max-inline-size: var(--_op-frame-inline-size);
|
|
559
|
+
|
|
560
|
+
:where(&) {
|
|
561
|
+
align-items: center;
|
|
562
|
+
justify-content: center;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
> img,
|
|
566
|
+
> video {
|
|
567
|
+
block-size: 100%;
|
|
568
|
+
inline-size: 100%;
|
|
569
|
+
object-fit: cover;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* aspect ratio */
|
|
573
|
+
|
|
574
|
+
&.op-frame--square {
|
|
575
|
+
aspect-ratio: 1 / 1;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
&.op-frame--landscape {
|
|
579
|
+
aspect-ratio: 16 / 9;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
&.op-frame--portrait {
|
|
583
|
+
aspect-ratio: 9 / 16;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
&.op-frame--4-3 {
|
|
587
|
+
aspect-ratio: 4 / 3;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
&.op-frame--3-4 {
|
|
591
|
+
aspect-ratio: 3 / 4;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
&.op-frame--3-2 {
|
|
595
|
+
aspect-ratio: 3 / 2;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
&.op-frame--2-3 {
|
|
599
|
+
aspect-ratio: 2 / 3;
|
|
600
|
+
}
|
|
454
601
|
}
|