@collectivetrait/lineaui 0.0.0-stage → 1.0.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 (130) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/LICENSE +21 -0
  3. package/README.md +113 -2
  4. package/config.json +3 -0
  5. package/dist/blocks.css +5042 -0
  6. package/dist/blocks.css.map +1 -0
  7. package/dist/bundle.js +873 -0
  8. package/dist/core.css +1641 -0
  9. package/dist/core.css.map +1 -0
  10. package/dist/icons-manifest.json +1 -0
  11. package/dist/icons.css +158 -0
  12. package/dist/styles.css +10546 -0
  13. package/dist/styles.css.map +1 -0
  14. package/dist/theme-init.js +8 -0
  15. package/dist/utilities.css +3865 -0
  16. package/dist/utilities.css.map +1 -0
  17. package/humans.txt +8 -0
  18. package/js/config.js +3 -0
  19. package/js/index.js +45 -0
  20. package/js/modules/copy.js +64 -0
  21. package/js/modules/dialog.js +55 -0
  22. package/js/modules/dismiss.js +43 -0
  23. package/js/modules/dropdown.js +108 -0
  24. package/js/modules/gallery.js +84 -0
  25. package/js/modules/highlight.js +89 -0
  26. package/js/modules/navigation.js +104 -0
  27. package/js/modules/quantity.js +63 -0
  28. package/js/modules/rhythm.js +21 -0
  29. package/js/modules/table.js +109 -0
  30. package/js/modules/tabs.js +112 -0
  31. package/js/modules/toast.js +97 -0
  32. package/js/modules/tooltip.js +106 -0
  33. package/js/theme-init.js +8 -0
  34. package/package.json +71 -4
  35. package/scss/_blocks-only.scss +4 -0
  36. package/scss/_core.scss +7 -0
  37. package/scss/_index.scss +12 -0
  38. package/scss/_layers.scss +2 -0
  39. package/scss/_utilities-only.scss +4 -0
  40. package/scss/base/_code.scss +50 -0
  41. package/scss/base/_forms.scss +110 -0
  42. package/scss/base/_index.scss +7 -0
  43. package/scss/base/_interactive.scss +25 -0
  44. package/scss/base/_media.scss +28 -0
  45. package/scss/base/_reset.scss +53 -0
  46. package/scss/base/_tables.scss +49 -0
  47. package/scss/base/_typography.scss +232 -0
  48. package/scss/blocks/_accordion.scss +88 -0
  49. package/scss/blocks/_alert.scss +101 -0
  50. package/scss/blocks/_avatar.scss +104 -0
  51. package/scss/blocks/_badge.scss +72 -0
  52. package/scss/blocks/_breadcrumb.scss +65 -0
  53. package/scss/blocks/_button-group.scss +73 -0
  54. package/scss/blocks/_button.scss +212 -0
  55. package/scss/blocks/_card.scss +146 -0
  56. package/scss/blocks/_choice.scss +163 -0
  57. package/scss/blocks/_code.scss +157 -0
  58. package/scss/blocks/_data-list.scss +92 -0
  59. package/scss/blocks/_divider.scss +54 -0
  60. package/scss/blocks/_drawer.scss +160 -0
  61. package/scss/blocks/_dropdown.scss +167 -0
  62. package/scss/blocks/_empty-state.scss +61 -0
  63. package/scss/blocks/_field.scss +146 -0
  64. package/scss/blocks/_form.scss +87 -0
  65. package/scss/blocks/_gallery.scss +120 -0
  66. package/scss/blocks/_index.scss +49 -0
  67. package/scss/blocks/_input-group.scss +95 -0
  68. package/scss/blocks/_line-item.scss +105 -0
  69. package/scss/blocks/_list.scss +117 -0
  70. package/scss/blocks/_media.scss +105 -0
  71. package/scss/blocks/_menu.scss +191 -0
  72. package/scss/blocks/_meta.scss +59 -0
  73. package/scss/blocks/_modal.scss +156 -0
  74. package/scss/blocks/_navbar.scss +227 -0
  75. package/scss/blocks/_order-summary.scss +92 -0
  76. package/scss/blocks/_page-header.scss +88 -0
  77. package/scss/blocks/_pagination.scss +110 -0
  78. package/scss/blocks/_price.scss +88 -0
  79. package/scss/blocks/_product-card.scss +138 -0
  80. package/scss/blocks/_progress.scss +68 -0
  81. package/scss/blocks/_prose.scss +165 -0
  82. package/scss/blocks/_quantity.scss +73 -0
  83. package/scss/blocks/_quote.scss +71 -0
  84. package/scss/blocks/_rating.scss +50 -0
  85. package/scss/blocks/_site-footer.scss +135 -0
  86. package/scss/blocks/_skeleton.scss +63 -0
  87. package/scss/blocks/_spinner.scss +44 -0
  88. package/scss/blocks/_stat.scss +111 -0
  89. package/scss/blocks/_steps.scss +147 -0
  90. package/scss/blocks/_swatch.scss +117 -0
  91. package/scss/blocks/_table.scss +242 -0
  92. package/scss/blocks/_tabs.scss +168 -0
  93. package/scss/blocks/_tag.scss +72 -0
  94. package/scss/blocks/_timeline.scss +84 -0
  95. package/scss/blocks/_toast.scss +146 -0
  96. package/scss/blocks/_toolbar.scss +67 -0
  97. package/scss/blocks/_tooltip.scss +63 -0
  98. package/scss/helpers/_index.scss +2 -0
  99. package/scss/helpers/_rhythm.scss +64 -0
  100. package/scss/helpers/_typography.scss +4 -0
  101. package/scss/layout/_cluster.scss +43 -0
  102. package/scss/layout/_container.scss +26 -0
  103. package/scss/layout/_grid.scss +90 -0
  104. package/scss/layout/_index.scss +5 -0
  105. package/scss/layout/_section.scss +78 -0
  106. package/scss/layout/_shell.scss +87 -0
  107. package/scss/settings/_blocks.scss +3 -0
  108. package/scss/settings/_breakpoints.scss +7 -0
  109. package/scss/settings/_fonts.scss +5 -0
  110. package/scss/settings/_index.scss +7 -0
  111. package/scss/settings/_layout.scss +5 -0
  112. package/scss/settings/_prefix.scss +1 -0
  113. package/scss/settings/_rhythm.scss +6 -0
  114. package/scss/settings/_utilities.scss +2 -0
  115. package/scss/tokens/_borders.scss +16 -0
  116. package/scss/tokens/_elevation.scss +37 -0
  117. package/scss/tokens/_index.scss +8 -0
  118. package/scss/tokens/_layout.scss +17 -0
  119. package/scss/tokens/_motion.scss +17 -0
  120. package/scss/tokens/_palette.scss +50 -0
  121. package/scss/tokens/_roles.scss +90 -0
  122. package/scss/tokens/_space.scss +9 -0
  123. package/scss/tokens/_type.scss +57 -0
  124. package/scss/tools/_bem.scss +22 -0
  125. package/scss/tools/_index.scss +4 -0
  126. package/scss/tools/_rhythm.scss +26 -0
  127. package/scss/tools/_role-engine.scss +16 -0
  128. package/scss/tools/_utility-generator.scss +74 -0
  129. package/scss/utilities/_index.scss +8 -0
  130. package/scss/utilities/_map.scss +321 -0
@@ -0,0 +1,88 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+
5
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'price') {
6
+ @layer blocks {
7
+ @include b.block('price') {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ gap: var(--s1);
11
+ font-family: var(--f-ui);
12
+ font-variant-numeric: tabular-nums;
13
+
14
+ @include b.element('current') {
15
+ font-size: var(--t-h4-s);
16
+ line-height: var(--t-h4-lh);
17
+ font-weight: 600;
18
+ color: var(--text);
19
+ }
20
+
21
+ @include b.element('original') {
22
+ font-size: var(--t-body-sm-s);
23
+ line-height: var(--t-body-sm-lh);
24
+ color: var(--c-muted);
25
+ text-decoration: line-through;
26
+ }
27
+
28
+ @include b.element('discount') {
29
+ font-size: var(--t-body-sm-s);
30
+ line-height: var(--t-body-sm-lh);
31
+ font-weight: 600;
32
+ color: var(--danger-text);
33
+ }
34
+
35
+ @include b.element('currency') {
36
+ font-size: var(--t-body-sm-s);
37
+ line-height: var(--t-body-sm-lh);
38
+ font-weight: 500;
39
+ }
40
+
41
+ @include b.element('period') {
42
+ font-size: var(--t-meta-s);
43
+ line-height: var(--t-meta-lh);
44
+ color: var(--c-muted);
45
+ font-weight: 400;
46
+ }
47
+
48
+ @include b.modifier('sale') {}
49
+
50
+ @include b.modifier('range') {
51
+ &::before {
52
+ content: 'From';
53
+ font-size: var(--t-meta-s);
54
+ line-height: var(--t-meta-lh);
55
+ color: var(--c-muted);
56
+ font-weight: 400;
57
+ }
58
+ }
59
+
60
+ @include b.modifier('stacked') {
61
+ flex-direction: column;
62
+ align-items: flex-start;
63
+ gap: 0;
64
+ }
65
+
66
+ @include b.modifier('sm') {
67
+ .#{s.$prefix}price__current {
68
+ font-size: var(--t-body-s);
69
+ line-height: var(--t-body-lh);
70
+ }
71
+ }
72
+
73
+ @include b.modifier('lg') {
74
+ .#{s.$prefix}price__current {
75
+ font-size: var(--t-h3-s);
76
+ line-height: var(--t-h3-lh);
77
+ }
78
+ }
79
+
80
+ @include b.modifier('xl') {
81
+ .#{s.$prefix}price__current {
82
+ font-size: var(--t-h2-s);
83
+ line-height: var(--t-h2-lh);
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,138 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+
5
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'product-card') {
6
+ @layer blocks {
7
+ @include b.block('product-card') {
8
+ display: flex;
9
+ flex-direction: column;
10
+ background-color: var(--surface);
11
+ overflow: hidden;
12
+ position: relative;
13
+ outline: var(--bd1) solid var(--border);
14
+ outline-offset: calc(-1 * var(--bd1));
15
+
16
+ @include b.element('media') {
17
+ position: relative;
18
+ background: var(--surface-sunken);
19
+ }
20
+
21
+ @include b.element('img') {
22
+ aspect-ratio: var(--ratio, 4 / 5);
23
+ background: var(--surface-sunken);
24
+ display: grid;
25
+ place-items: center;
26
+ color: var(--c-subtle);
27
+
28
+ > img {
29
+ display: block;
30
+ width: 100%;
31
+ height: 100%;
32
+ object-fit: cover;
33
+ }
34
+ }
35
+
36
+ @include b.element('badges') {
37
+ position: absolute;
38
+ top: 0.75rem;
39
+ left: 0.75rem;
40
+ display: flex;
41
+ gap: 0.25rem;
42
+ z-index: 1;
43
+ }
44
+
45
+ @include b.element('wishlist') {
46
+ position: absolute;
47
+ top: 0.75rem;
48
+ right: 0.75rem;
49
+ z-index: 2;
50
+ }
51
+
52
+ @include b.element('body') {
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: 0.25rem;
56
+ padding: 1rem;
57
+ }
58
+
59
+ @include b.element('vendor') {
60
+ font: 500 0.75rem/1rem var(--f-mono);
61
+ letter-spacing: 0.06em;
62
+ text-transform: uppercase;
63
+ color: var(--c-subtle);
64
+ }
65
+
66
+ @include b.element('title') {
67
+ font: 500 1rem/1.5rem var(--f-ui);
68
+ margin: 0;
69
+ overflow: hidden;
70
+
71
+ a {
72
+ color: var(--text);
73
+ text-decoration: none;
74
+
75
+ &::after {
76
+ content: '';
77
+ position: absolute;
78
+ inset: 0;
79
+ }
80
+ }
81
+ }
82
+
83
+ @include b.element('swatches') {
84
+ position: relative;
85
+ z-index: 1;
86
+ }
87
+
88
+ @include b.element('actions') {
89
+ position: relative;
90
+ z-index: 1;
91
+ }
92
+
93
+ // Aspect ratio modifiers
94
+ @include b.modifier('ratio-1x1') { --ratio: 1 / 1; }
95
+ @include b.modifier('ratio-4x5') { --ratio: 4 / 5; }
96
+ @include b.modifier('ratio-3x4') { --ratio: 3 / 4; }
97
+
98
+ @include b.modifier('horizontal') {
99
+ flex-direction: row;
100
+
101
+ .#{s.$prefix}product-card__media {
102
+ width: 40%;
103
+ max-width: 200px;
104
+ flex-shrink: 0;
105
+ aspect-ratio: auto;
106
+ }
107
+ }
108
+
109
+ @include b.modifier('compact') {
110
+ .#{s.$prefix}product-card__body {
111
+ padding: var(--s2);
112
+ }
113
+
114
+ .#{s.$prefix}product-card__actions {
115
+ padding: var(--s2);
116
+ padding-top: 0;
117
+ }
118
+ }
119
+
120
+ @include b.modifier('center') {
121
+ text-align: center;
122
+
123
+ .#{s.$prefix}product-card__actions {
124
+ justify-content: center;
125
+ }
126
+ }
127
+
128
+ @include b.modifier('flat') {
129
+ outline: 0;
130
+ }
131
+
132
+ &.is-sold-out {
133
+ opacity: 0.6;
134
+ pointer-events: none;
135
+ }
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,68 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+ @use '../tools/role-engine' as role;
5
+
6
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'progress') {
7
+ @layer blocks {
8
+ @include b.block('progress') {
9
+ --_fill: var(--primary);
10
+ --_track-height: 8px;
11
+
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: var(--s1);
15
+
16
+ @include b.element('header') {
17
+ display: flex;
18
+ justify-content: space-between;
19
+ align-items: baseline;
20
+ }
21
+
22
+ @include b.element('label') {
23
+ font: 500 var(--t-body-sm-s)/var(--t-body-sm-lh) var(--f-ui);
24
+ color: var(--text);
25
+ }
26
+
27
+ @include b.element('value') {
28
+ font: var(--t-meta-s)/var(--t-meta-lh) var(--f-mono);
29
+ color: var(--c-muted);
30
+ font-variant-numeric: tabular-nums;
31
+ }
32
+
33
+ @include b.element('track') {
34
+ width: 100%;
35
+ height: var(--_track-height);
36
+ background-color: var(--surface-sunken);
37
+ border-radius: var(--r-pill);
38
+ overflow: hidden;
39
+ }
40
+
41
+ @include b.element('bar') {
42
+ height: 100%;
43
+ width: var(--progress, 0%);
44
+ background-color: var(--_fill);
45
+ border-radius: var(--r-pill);
46
+ transition: width var(--dur-slow) var(--e-standard);
47
+ }
48
+
49
+ @include b.modifier('xs') { --_track-height: 4px; }
50
+ @include b.modifier('sm') { --_track-height: 8px; }
51
+ @include b.modifier('md') { --_track-height: 16px; }
52
+
53
+ @include b.modifier('indeterminate') {
54
+ .#{s.$prefix}progress__bar {
55
+ width: 40%;
56
+ animation: #{s.$prefix}progress-indeterminate 1.8s var(--e-standard) infinite;
57
+ }
58
+ }
59
+
60
+ @include role.role-modifiers;
61
+ }
62
+
63
+ @keyframes #{s.$prefix}progress-indeterminate {
64
+ 0% { transform: translateX(-100%); }
65
+ 100% { transform: translateX(350%); }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,165 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+ @use '../tools/rhythm' as r;
5
+
6
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'prose') {
7
+ @layer blocks {
8
+ @include b.block('prose') {
9
+ font: var(--t-body-prose-s)/var(--t-body-prose-lh) var(--f-prose);
10
+ max-width: var(--measure);
11
+
12
+ // Headings
13
+ :is(h1, h2, h3, h4, h5, h6):first-child {
14
+ margin-top: 0;
15
+ }
16
+
17
+ > * {
18
+ margin-block: 0;
19
+ }
20
+
21
+ > *:not(:last-child) {
22
+ margin-block-end: 2rem;
23
+ }
24
+
25
+ > h2 {
26
+ font: 400 2rem/3rem var(--f-prose);
27
+ text-wrap: balance;
28
+ }
29
+
30
+ > *:has(+ h2) {
31
+ margin-block-end: 3rem;
32
+ }
33
+
34
+ > h2:not(:last-child) {
35
+ margin-block-end: 1.5rem;
36
+ }
37
+
38
+ > ul {
39
+ padding-left: 1.5rem;
40
+ }
41
+
42
+ li::marker {
43
+ color: var(--primary-text);
44
+ }
45
+
46
+ .lead {
47
+ font-size: 1.125rem;
48
+ line-height: 1.5rem;
49
+ color: var(--c-muted);
50
+ }
51
+
52
+ em {
53
+ font-style: italic;
54
+ }
55
+
56
+ code {
57
+ font: 400 0.8em/1 var(--f-mono);
58
+ padding: 0.125rem 0.25rem;
59
+ border-radius: var(--radius);
60
+ background: var(--surface-sunken);
61
+ }
62
+
63
+ // Links
64
+ a {
65
+ text-decoration: underline;
66
+ }
67
+
68
+ // Lists
69
+ ol {
70
+ padding-left: 1.5rem;
71
+ }
72
+
73
+ li + li {
74
+ margin-top: var(--s-h);
75
+ }
76
+
77
+ // Images
78
+ img {
79
+ max-width: 100%;
80
+ height: auto;
81
+ border-radius: var(--r-md);
82
+ }
83
+
84
+ // Horizontal rule
85
+ hr {
86
+ margin: r.lines(1) 0;
87
+ }
88
+
89
+ // Pull quote spacing
90
+ > *:has(+ .#{s.$prefix}quote--pull) {
91
+ margin-block-end: 3rem;
92
+ }
93
+
94
+ .#{s.$prefix}quote--pull:not(:last-child) {
95
+ margin-block-end: 3rem;
96
+ }
97
+
98
+ // WordPress alignment classes
99
+ .alignleft {
100
+ float: left;
101
+ margin-right: var(--s3);
102
+ margin-bottom: var(--s1);
103
+ max-width: 50%;
104
+ }
105
+
106
+ .alignright {
107
+ float: right;
108
+ margin-left: var(--s3);
109
+ margin-bottom: var(--s1);
110
+ max-width: 50%;
111
+ }
112
+
113
+ .aligncenter {
114
+ display: block;
115
+ margin-inline: auto;
116
+ }
117
+
118
+ .alignwide {
119
+ max-width: var(--container-wide);
120
+ margin-inline: auto;
121
+ }
122
+
123
+ .alignfull {
124
+ max-width: none;
125
+ margin-inline: calc(-1 * var(--gutter));
126
+ }
127
+
128
+ // Clearfix
129
+ &::after {
130
+ content: '';
131
+ display: table;
132
+ clear: both;
133
+ }
134
+
135
+ // Last child margin reset
136
+ > :last-child {
137
+ margin-bottom: 0;
138
+ }
139
+
140
+ // Size modifiers
141
+ @include b.modifier('sm') {
142
+ font-size: var(--t-body-sm-s);
143
+ line-height: var(--t-body-sm-lh);
144
+ }
145
+
146
+ @include b.modifier('lg') {
147
+ font-size: var(--t-body-lg-s);
148
+ line-height: var(--t-body-lg-lh);
149
+ }
150
+
151
+ @include b.modifier('ui') {
152
+ font-family: var(--f-ui);
153
+ }
154
+
155
+ @include b.modifier('wide-media') {
156
+ img,
157
+ figure,
158
+ .#{s.$prefix}media {
159
+ max-width: var(--container);
160
+ margin-inline: auto;
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
@@ -0,0 +1,73 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+
5
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'quantity') {
6
+ @layer blocks {
7
+ @include b.block('quantity') {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ height: 2rem;
11
+ border-radius: var(--r-xs);
12
+ border: var(--bd1) solid var(--border-control);
13
+ background: var(--surface);
14
+ overflow: hidden;
15
+
16
+ @include b.element('button') {
17
+ width: 2rem;
18
+ height: 100%;
19
+ border: 0;
20
+ border-radius: 0;
21
+ background: transparent;
22
+ color: var(--text);
23
+ cursor: pointer;
24
+ font: 500 1rem/1.5rem var(--f-ui);
25
+
26
+ &:hover {
27
+ background: var(--surface-raised);
28
+ }
29
+
30
+ &:disabled {
31
+ color: var(--c-disabled);
32
+ cursor: not-allowed;
33
+ background: transparent;
34
+ }
35
+ }
36
+
37
+ @include b.element('decrement') { @extend .#{s.$prefix}quantity__button; }
38
+ @include b.element('increment') { @extend .#{s.$prefix}quantity__button; }
39
+
40
+ @include b.element('input') {
41
+ width: 2.5rem;
42
+ height: 2rem;
43
+ border: 0;
44
+ background: transparent;
45
+ text-align: center;
46
+ color: var(--text);
47
+ font: 500 0.875rem/1.25rem var(--f-mono);
48
+
49
+ -moz-appearance: textfield;
50
+ &::-webkit-outer-spin-button,
51
+ &::-webkit-inner-spin-button {
52
+ -webkit-appearance: none;
53
+ margin: 0;
54
+ }
55
+ }
56
+
57
+ @include b.modifier('compact') {
58
+ height: 1.5rem;
59
+
60
+ .#{s.$prefix}quantity__button {
61
+ width: 1.5rem;
62
+ height: 1.5rem;
63
+ }
64
+
65
+ .#{s.$prefix}quantity__input {
66
+ width: 2rem;
67
+ height: 1.5rem;
68
+ font-size: 0.75rem;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,71 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+ @use '../tools/rhythm' as r;
5
+ @use '../tools/role-engine' as role;
6
+
7
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'quote') {
8
+ @layer blocks {
9
+ @include b.block('quote') {
10
+ --_edge: var(--_border-color, var(--primary));
11
+
12
+ font-family: var(--f-prose);
13
+ margin-bottom: r.lines(1);
14
+
15
+ &:last-child {
16
+ margin-bottom: 0;
17
+ }
18
+
19
+ @include b.element('text') {
20
+ font-size: var(--t-body-lg-s);
21
+ line-height: var(--t-body-lg-lh);
22
+ font-style: italic;
23
+ }
24
+
25
+ @include b.element('footer') {
26
+ margin-top: var(--s1);
27
+ display: flex;
28
+ align-items: center;
29
+ gap: var(--s2);
30
+ }
31
+
32
+ @include b.element('cite') {
33
+ font-style: normal;
34
+ font-size: var(--t-body-sm-s);
35
+ line-height: var(--t-body-sm-lh);
36
+ color: var(--c-muted);
37
+ }
38
+
39
+ @include b.element('avatar') {
40
+ width: 3rem;
41
+ height: 3rem;
42
+ border-radius: 50%;
43
+ object-fit: cover;
44
+ flex-shrink: 0;
45
+ }
46
+
47
+ @include b.modifier('pull') {
48
+ font: italic 400 1.25rem/1.5rem var(--f-prose);
49
+ color: var(--text);
50
+ text-wrap: balance;
51
+ padding: 0 0 0 2rem;
52
+ border-left: 3px solid var(--primary-text);
53
+ }
54
+
55
+ @include b.modifier('card') {
56
+ background: var(--surface);
57
+ padding: calc(var(--s3) - var(--bd1));
58
+ border-radius: var(--r-lg);
59
+ border: var(--bd1) solid var(--border);
60
+ }
61
+
62
+ @include b.modifier('bordered') {
63
+ border: var(--bd1) solid var(--border);
64
+ padding: calc(var(--s3) - var(--bd1));
65
+ border-radius: var(--r-md);
66
+ }
67
+
68
+ @include role.role-modifiers;
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,50 @@
1
+ @use 'sass:list';
2
+ @use '../settings' as s;
3
+ @use '../tools/bem' as b;
4
+
5
+ @if list.length(s.$blocks) == 0 or list.index(s.$blocks, 'rating') {
6
+ @layer blocks {
7
+ @include b.block('rating') {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: 0.5rem;
11
+ height: 1.5rem;
12
+ font: 400 0.875rem/1.25rem var(--f-ui);
13
+ color: var(--c-muted);
14
+
15
+ @include b.element('stars') {
16
+ --rating: 0;
17
+
18
+ position: relative;
19
+ width: 5rem;
20
+ height: 1rem;
21
+ background: linear-gradient(90deg, var(--star-color, var(--primary)) calc(var(--rating) / 5 * 100%), var(--border) 0);
22
+ mask: var(--star-mask) repeat-x 0 0 / 16px 16px;
23
+ }
24
+
25
+ @include b.element('value') {
26
+ color: var(--text);
27
+ font-weight: 500;
28
+ font-variant-numeric: tabular-nums;
29
+ }
30
+
31
+ @include b.element('count') {
32
+ color: var(--c-muted);
33
+ }
34
+
35
+ @include b.modifier('input') {
36
+ cursor: pointer;
37
+ }
38
+
39
+ @include b.modifier('compact') {
40
+ .#{s.$prefix}rating__count {
41
+ display: none;
42
+ }
43
+ }
44
+ }
45
+
46
+ :root {
47
+ --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.2l2 4.3 4.6.5-3.4 3.2.9 4.6L8 11.5l-4.1 2.3.9-4.6L1.4 6l4.6-.5z'/%3E%3C/svg%3E");
48
+ }
49
+ }
50
+ }