maverick-wave 4.27.0 → 5.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 (140) hide show
  1. package/.claude/settings.local.json +29 -1
  2. package/.claude/skills/mw-maverick-wave/SKILL.md +42 -25
  3. package/.claude/skills/mw-maverick-wave/examples/angular-services.md +16 -4
  4. package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +13 -4
  5. package/.claude/skills/mw-maverick-wave/references/components.md +90 -5
  6. package/.claude/skills/mw-maverick-wave/references/forms.md +14 -2
  7. package/.claude/skills/mw-maverick-wave/references/javascript.md +18 -4
  8. package/.claude/skills/mw-maverick-wave/references/layout.md +53 -19
  9. package/.claude/skills/mw-maverick-wave/references/theming.md +38 -1
  10. package/.impeccable/config.local.json +5 -0
  11. package/.impeccable/hook.cache.json +1 -0
  12. package/CHANGELOG.md +17 -0
  13. package/CLAUDE.md +5 -5
  14. package/README.md +48 -4
  15. package/index.html +19 -38
  16. package/maverick-wave.min.css +14 -12
  17. package/maverick-wave.min.js +1 -1
  18. package/package.json +2 -2
  19. package/scripts/verify.js +27 -2
  20. package/src/js/main.js +266 -75
  21. package/src/partials/accordions-container.html +6 -10
  22. package/src/partials/alerts-container.html +6 -6
  23. package/src/partials/announcement-container.html +5 -5
  24. package/src/partials/avatars-container.html +85 -17
  25. package/src/partials/badges-container.html +6 -6
  26. package/src/partials/blog-posts-container.html +11 -12
  27. package/src/partials/buttons-container.html +3 -3
  28. package/src/partials/cards-container.html +26 -9
  29. package/src/partials/code-container.html +5 -5
  30. package/src/partials/content-slider-container.html +5 -4
  31. package/src/partials/divider-container.html +7 -7
  32. package/src/partials/dropdown-container.html +2 -2
  33. package/src/partials/empty-state-container.html +5 -5
  34. package/src/partials/footer-container.html +21 -18
  35. package/src/partials/form-elements-container.html +14 -14
  36. package/src/partials/gallery-container.html +16 -8
  37. package/src/partials/get-started-container.html +4 -8
  38. package/src/partials/header-container.html +18 -7
  39. package/src/partials/header-utilities-container.html +192 -5
  40. package/src/partials/home-container.html +10 -20
  41. package/src/partials/input-group-container.html +11 -2
  42. package/src/partials/kbd-container.html +1 -1
  43. package/src/partials/login-container.html +5 -1
  44. package/src/partials/media-container.html +2 -2
  45. package/src/partials/modals-container.html +22 -32
  46. package/src/partials/pricing-container.html +9 -9
  47. package/src/partials/skeleton-container.html +6 -6
  48. package/src/partials/stepper-container.html +2 -2
  49. package/src/partials/tables-container.html +12 -12
  50. package/src/partials/tabs-container.html +17 -27
  51. package/src/partials/tags-container.html +23 -17
  52. package/src/partials/techstack-bucket-container.html +13 -0
  53. package/src/partials/tiles-container.html +26 -9
  54. package/src/partials/typography-container.html +7 -6
  55. package/src/partials/utilities-container.html +35 -15
  56. package/src/scss/_layers.scss +10 -0
  57. package/src/scss/abstracts/_index.scss +6 -0
  58. package/src/scss/abstracts/_mixins.scss +61 -153
  59. package/src/scss/abstracts/_variables.scss +123 -319
  60. package/src/scss/base/_base.scss +170 -190
  61. package/src/scss/base/_reset.scss +106 -104
  62. package/src/scss/base/_typography.scss +153 -151
  63. package/src/scss/components/_accordions.scss +97 -97
  64. package/src/scss/components/_alerts.scss +71 -70
  65. package/src/scss/components/_announcement.scss +71 -70
  66. package/src/scss/components/_avatars.scss +130 -142
  67. package/src/scss/components/_badge.scss +131 -132
  68. package/src/scss/components/_blog-post.scss +223 -220
  69. package/src/scss/components/_breadcrumbs.scss +93 -92
  70. package/src/scss/components/_button-bar.scss +102 -110
  71. package/src/scss/components/_buttons.scss +319 -324
  72. package/src/scss/components/_calendar.scss +251 -252
  73. package/src/scss/components/_cards.scss +359 -386
  74. package/src/scss/components/_code.scss +190 -194
  75. package/src/scss/components/_coming-soon.scss +77 -75
  76. package/src/scss/components/_content-slider.scss +90 -89
  77. package/src/scss/components/_divider.scss +55 -53
  78. package/src/scss/components/_dropdown.scss +179 -185
  79. package/src/scss/components/_empty-state.scss +57 -57
  80. package/src/scss/components/_flag.scss +325 -0
  81. package/src/scss/components/_gallery.scss +131 -133
  82. package/src/scss/components/_index.scss +2 -0
  83. package/src/scss/components/_info.scss +151 -167
  84. package/src/scss/components/_kanban.scss +332 -341
  85. package/src/scss/components/_kbd.scss +40 -38
  86. package/src/scss/components/_lang-switch.scss +108 -0
  87. package/src/scss/components/_links.scss +21 -28
  88. package/src/scss/components/_lists.scss +510 -514
  89. package/src/scss/components/_localhost-indicator.scss +26 -24
  90. package/src/scss/components/_media.scss +22 -20
  91. package/src/scss/components/_meta-info.scss +35 -33
  92. package/src/scss/components/_modals.scss +277 -186
  93. package/src/scss/components/_pagination.scss +81 -87
  94. package/src/scss/components/_panels.scss +99 -97
  95. package/src/scss/components/_pricing.scss +183 -241
  96. package/src/scss/components/_progress.scss +112 -89
  97. package/src/scss/components/_prose.scss +35 -33
  98. package/src/scss/components/_ratings.scss +40 -38
  99. package/src/scss/components/_segmented.scss +82 -84
  100. package/src/scss/components/_skeleton.scss +66 -72
  101. package/src/scss/components/_spinners.scss +155 -159
  102. package/src/scss/components/_stepper.scss +116 -116
  103. package/src/scss/components/_tables.scss +155 -148
  104. package/src/scss/components/_tabs.scss +232 -141
  105. package/src/scss/components/_tags.scss +109 -107
  106. package/src/scss/components/_techstack-bucket.scss +123 -122
  107. package/src/scss/components/_testimonial.scss +72 -70
  108. package/src/scss/components/_theme-toggle.scss +53 -51
  109. package/src/scss/components/_tiles.scss +174 -174
  110. package/src/scss/components/_timelines.scss +282 -280
  111. package/src/scss/components/_toasts.scss +66 -72
  112. package/src/scss/form-elements/_checkbox.scss +117 -132
  113. package/src/scss/form-elements/_form.scss +149 -115
  114. package/src/scss/form-elements/_input-group.scss +99 -103
  115. package/src/scss/form-elements/_input.scss +74 -74
  116. package/src/scss/form-elements/_login.scss +48 -48
  117. package/src/scss/form-elements/_prefilled.scss +53 -51
  118. package/src/scss/form-elements/_radio.scss +95 -107
  119. package/src/scss/form-elements/_select.scss +42 -42
  120. package/src/scss/form-elements/_slider.scss +117 -132
  121. package/src/scss/form-elements/_textarea.scss +68 -54
  122. package/src/scss/form-elements/_toggle.scss +127 -140
  123. package/src/scss/layout/_footer.scss +172 -171
  124. package/src/scss/layout/_grid.scss +268 -302
  125. package/src/scss/layout/_header.scss +426 -427
  126. package/src/scss/layout/_home.scss +28 -27
  127. package/src/scss/layout/_main.scss +275 -238
  128. package/src/scss/layout/_page-header.scss +38 -36
  129. package/src/scss/layout/_section.scss +150 -124
  130. package/src/scss/main.scss +1 -1
  131. package/src/scss/utilities/_accessibility.scss +46 -45
  132. package/src/scss/utilities/_aspect.scss +22 -20
  133. package/src/scss/utilities/_corner.scss +23 -5
  134. package/src/scss/utilities/_display.scss +76 -70
  135. package/src/scss/utilities/_elevation.scss +13 -11
  136. package/src/scss/utilities/_flex.scss +83 -85
  137. package/src/scss/utilities/_reveal.scss +40 -63
  138. package/src/scss/utilities/_spacing.scss +63 -64
  139. package/src/scss/utilities/_text.scss +139 -141
  140. package/src/scss/utilities/_touch-targets.scss +130 -147
@@ -1,92 +1,92 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- .mw-input {
4
- width: 100%;
5
- padding: spacing('2') spacing('3');
6
- font-size: var(--mw-control-font);
7
- line-height: var(--mw-control-line-height);
8
- min-height: var(--mw-control-height);
9
- background: var(--mw-form-elements-background);
10
- color: var(--mw-form-elements-color);
11
- border: 2px solid var(--mw-border);
12
- border-radius: radius('sm');
13
- transition: var(--mw-transition);
14
- font-family: inherit;
3
+ @layer mw.forms {
4
+ .mw-input {
5
+ width: 100%;
6
+ padding: spacing('2') spacing('3');
7
+ font-size: var(--mw-control-font);
8
+ line-height: var(--mw-control-line-height);
9
+ min-height: var(--mw-control-height);
10
+ background: var(--mw-form-elements-background);
11
+ color: var(--mw-form-elements-color);
12
+ border: 2px solid var(--mw-border);
13
+ border-radius: radius('sm');
14
+ transition: var(--mw-transition);
15
+ font-family: inherit;
15
16
 
16
- &::placeholder {
17
- color: var(--mw-text-muted-color);
18
- opacity: 0.7;
19
- }
17
+ &::placeholder {
18
+ color: var(--mw-text-muted-color);
19
+ opacity: 0.7;
20
+ }
20
21
 
21
- &:hover:not(:focus):not(:read-only):not(:disabled) {
22
- border-color: var(--mw-gray-color);
23
- }
22
+ &:hover:not(:focus):not(:read-only):not(:disabled) {
23
+ border-color: var(--mw-gray-color);
24
+ }
24
25
 
25
- @include field-focus;
26
+ @include field-focus;
26
27
 
27
- &:read-only {
28
- background-color: var(--mw-gray-background);
29
- color: var(--mw-text-muted-color);
30
- cursor: default;
31
- box-shadow: none;
32
- }
28
+ &:read-only {
29
+ background-color: var(--mw-gray-background);
30
+ color: var(--mw-text-muted-color);
31
+ cursor: default;
32
+ box-shadow: none;
33
+ }
33
34
 
34
- &-sm {
35
- padding: spacing('1') spacing('2');
36
- font-size: var(--mw-control-font-sm);
37
- min-height: var(--mw-control-height-sm);
38
- }
39
- &-lg {
40
- padding: spacing('2') spacing('4');
41
- font-size: var(--mw-control-font-lg);
42
- min-height: var(--mw-control-height-lg);
43
- }
35
+ &-sm {
36
+ padding: spacing('1') spacing('2');
37
+ font-size: var(--mw-control-font-sm);
38
+ min-height: var(--mw-control-height-sm);
39
+ }
40
+ &-lg {
41
+ padding: spacing('2') spacing('4');
42
+ font-size: var(--mw-control-font-lg);
43
+ min-height: var(--mw-control-height-lg);
44
+ }
44
45
 
45
- // Numeric input for money and other figures - the entry counterpart to the
46
- // `mw-text-numeric` utility, so a value looks the same while being typed and
47
- // once it is rendered into a table.
48
- //
49
- // Pair it with `type="text" inputmode="decimal"`, not `type="number"`:
50
- // number inputs change their value on scroll, and they reject a comma as
51
- // decimal separator in most locales, which silently empties `.value` for
52
- // anyone typing "1234,50".
53
- &-numeric {
54
- text-align: right;
55
- font-variant-numeric: tabular-nums lining-nums;
56
- font-feature-settings: 'tnum', 'lnum';
46
+ // Numeric input for money and other figures - the entry counterpart to the
47
+ // `mw-text-numeric` utility, so a value looks the same while being typed and
48
+ // once it is rendered into a table.
49
+ //
50
+ // Pair it with `type="text" inputmode="decimal"`, not `type="number"`:
51
+ // number inputs change their value on scroll, and they reject a comma as
52
+ // decimal separator in most locales, which silently empties `.value` for
53
+ // anyone typing "1234,50".
54
+ &-numeric {
55
+ text-align: right;
56
+ font-variant-numeric: tabular-nums lining-nums;
57
+ font-feature-settings: 'tnum', 'lnum';
57
58
 
58
- // Suppress the native spinners if a `type="number"` slips through - their
59
- // step of 1 is meaningless for an amount and the arrows are tiny.
60
- appearance: textfield;
59
+ // Suppress the native spinners if a `type="number"` slips through - their
60
+ // step of 1 is meaningless for an amount and the arrows are tiny.
61
+ appearance: textfield;
61
62
 
62
- &::-webkit-outer-spin-button,
63
- &::-webkit-inner-spin-button {
64
- appearance: none;
65
- margin: 0;
63
+ &::-webkit-outer-spin-button,
64
+ &::-webkit-inner-spin-button {
65
+ appearance: none;
66
+ margin: 0;
67
+ }
66
68
  }
67
- }
68
69
 
69
- // Date / time inputs - style the native picker indicator
70
- &[type='date'],
71
- &[type='time'],
72
- &[type='datetime-local'] {
73
- &::-webkit-calendar-picker-indicator {
74
- cursor: pointer;
75
- opacity: 0.55;
76
- padding: 0;
77
- margin-left: spacing('1');
78
- transition: opacity var(--mw-duration-fast) var(--mw-ease-out);
70
+ &[type='date'],
71
+ &[type='time'],
72
+ &[type='datetime-local'] {
73
+ &::-webkit-calendar-picker-indicator {
74
+ cursor: pointer;
75
+ opacity: 0.55;
76
+ padding: 0;
77
+ margin-left: spacing('1');
78
+ transition: opacity var(--mw-duration-fast) var(--mw-ease-out);
79
79
 
80
- &:hover {
81
- opacity: 1;
80
+ &:hover {
81
+ opacity: 1;
82
+ }
82
83
  }
83
84
  }
84
- }
85
85
 
86
- // disabled state
87
- &:disabled {
88
- background-color: var(--mw-gray-background);
89
- color: var(--mw-text-muted-color);
90
- cursor: not-allowed;
86
+ &:disabled {
87
+ background-color: var(--mw-gray-background);
88
+ color: var(--mw-text-muted-color);
89
+ cursor: not-allowed;
90
+ }
91
91
  }
92
92
  }
@@ -1,65 +1,65 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- .mw-login {
4
- background: var(--mw-card-background);
5
- @include surface;
6
- box-shadow: var(--mw-elevation-2);
7
- transition: var(--mw-transition);
8
- border: 1px solid var(--mw-border);
9
- overflow: hidden;
10
- width: min(340px, 85%);
11
- margin: spacing('2') auto;
12
- padding: spacing('5');
13
- display: flex;
14
- flex-direction: column;
15
- align-items: stretch;
16
-
17
- @include media-down('sm') {
3
+ @layer mw.components {
4
+ .mw-login {
5
+ background: var(--mw-card-background);
6
+ @include surface;
7
+ box-shadow: var(--mw-elevation-2);
8
+ transition: var(--mw-transition);
9
+ border: 1px solid var(--mw-border);
10
+ overflow: hidden;
18
11
  width: min(340px, 100%);
19
- }
20
-
21
- @include media-down('xs') {
12
+ margin: spacing('2') auto;
22
13
  padding: spacing('7') spacing('4');
23
- }
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: stretch;
24
17
 
25
- &-logo {
26
- margin-bottom: spacing('8');
18
+ @include media-up('xs') {
19
+ padding: spacing('5');
20
+ }
27
21
 
28
- img {
29
- display: block;
30
- margin: spacing('0') auto;
31
- height: 60px;
32
- object-fit: contain;
22
+ @include media-up('sm') {
23
+ width: min(340px, 85%);
33
24
  }
34
- }
35
25
 
36
- &-message {
37
- font-size: font-size('sm');
38
- text-align: center;
39
- margin-bottom: spacing('6');
40
- line-height: 1.5;
41
- color: var(--mw-text-muted-color);
26
+ &-logo {
27
+ margin-bottom: spacing('8');
42
28
 
43
- // Variants
44
- &-info {
45
- color: var(--mw-info-text-color);
29
+ img {
30
+ display: block;
31
+ margin: spacing('0') auto;
32
+ height: 60px;
33
+ object-fit: contain;
34
+ }
46
35
  }
47
36
 
48
- &-error {
49
- color: var(--mw-danger-text-color);
50
- }
37
+ &-message {
38
+ font-size: font-size('sm');
39
+ text-align: center;
40
+ margin-bottom: spacing('6');
41
+ line-height: 1.5;
42
+ color: var(--mw-text-muted-color);
51
43
 
52
- // Multiple messages spacing
53
- & + & {
54
- margin-top: spacing('-3');
44
+ &-info {
45
+ color: var(--mw-info-text-color);
46
+ }
47
+
48
+ &-error {
49
+ color: var(--mw-danger-text-color);
50
+ }
51
+
52
+ & + & {
53
+ margin-top: spacing('-3');
54
+ }
55
55
  }
56
- }
57
56
 
58
- &-error {
59
- border: 2px solid var(--mw-danger-color);
60
- }
57
+ &-error {
58
+ border: 2px solid var(--mw-danger-color);
59
+ }
61
60
 
62
- &.mw-form-actions {
63
- width: 100%;
61
+ &.mw-form-actions {
62
+ width: 100%;
63
+ }
64
64
  }
65
65
  }
@@ -1,65 +1,67 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- // ===== Prefilled marker =====
4
- // Marks a control whose value did not come from the user in this session -
5
- // loaded from an existing record, restored from a draft, filled with a
6
- // default. Add `mw-prefilled` to the control itself, not to the wrapper, so
7
- // it also works outside `mw-field` (input groups, standalone selects).
3
+ @layer mw.components {
4
+ // ===== Prefilled marker =====
5
+ // Marks a control whose value did not come from the user in this session -
6
+ // loaded from an existing record, restored from a draft, filled with a
7
+ // default. Add `mw-prefilled` to the control itself, not to the wrapper, so
8
+ // it also works outside `mw-field` (input groups, standalone selects).
8
9
 
9
- $_marker-sm: 10px;
10
- $_marker-base: 12px;
11
- $_marker-lg: 14px;
10
+ $_marker-sm: 10px;
11
+ $_marker-base: 12px;
12
+ $_marker-lg: 14px;
12
13
 
13
- // 135deg puts the hard edge on the anti-diagonal, which fills the top left
14
- // half of the background box - a right triangle pointing into the corner.
15
- $_marker-image: linear-gradient(
16
- 135deg,
17
- var(--mw-info-color) 50%,
18
- transparent 50%
19
- );
14
+ // 135deg puts the hard edge on the anti-diagonal, which fills the top left
15
+ // half of the background box - a right triangle pointing into the corner.
16
+ $_marker-image: linear-gradient(
17
+ 135deg,
18
+ var(--mw-info-color) 50%,
19
+ transparent 50%
20
+ );
20
21
 
21
- @mixin _marker($size) {
22
- background-image: $_marker-image;
23
- background-repeat: no-repeat;
24
- background-position: left top;
25
- background-size: $size $size;
26
- }
22
+ @mixin _marker($size) {
23
+ background-image: $_marker-image;
24
+ background-repeat: no-repeat;
25
+ background-position: left top;
26
+ background-size: $size $size;
27
+ }
27
28
 
28
- // A select already paints its arrow, so adding a layer means restating both.
29
- @mixin _marker-select($size, $arrow-inset, $arrow-size) {
30
- background-image: $_marker-image, $select-arrow-image;
31
- background-repeat: no-repeat;
32
- background-position:
33
- left top,
34
- right $arrow-inset center;
35
- background-size:
36
- $size $size,
37
- $arrow-size $arrow-size;
38
- }
29
+ // A select already paints its arrow, so adding a layer means restating both.
30
+ @mixin _marker-select($size, $arrow-inset, $arrow-size) {
31
+ background-image: $_marker-image, $select-arrow-image;
32
+ background-repeat: no-repeat;
33
+ background-position:
34
+ left top,
35
+ right $arrow-inset center;
36
+ background-size:
37
+ $size $size,
38
+ $arrow-size $arrow-size;
39
+ }
39
40
 
40
- .mw-prefilled {
41
- @include _marker($_marker-base);
41
+ .mw-prefilled {
42
+ @include _marker($_marker-base);
42
43
 
43
- &.mw-input-sm,
44
- &.mw-textarea-sm {
45
- @include _marker($_marker-sm);
46
- }
44
+ &.mw-input-sm,
45
+ &.mw-textarea-sm {
46
+ @include _marker($_marker-sm);
47
+ }
47
48
 
48
- &.mw-input-lg,
49
- &.mw-textarea-lg {
50
- @include _marker($_marker-lg);
51
- }
49
+ &.mw-input-lg,
50
+ &.mw-textarea-lg {
51
+ @include _marker($_marker-lg);
52
+ }
52
53
 
53
- // Selects last: each size restates the arrow layer it would otherwise lose.
54
- &.mw-select {
55
- @include _marker-select($_marker-base, spacing('3'), spacing('3'));
56
- }
54
+ // Selects last: each size restates the arrow layer it would otherwise lose.
55
+ &.mw-select {
56
+ @include _marker-select($_marker-base, spacing('3'), spacing('3'));
57
+ }
57
58
 
58
- &.mw-select-sm {
59
- @include _marker-select($_marker-sm, spacing('2'), spacing('2'));
60
- }
59
+ &.mw-select-sm {
60
+ @include _marker-select($_marker-sm, spacing('2'), spacing('2'));
61
+ }
61
62
 
62
- &.mw-select-lg {
63
- @include _marker-select($_marker-lg, spacing('4'), spacing('4'));
63
+ &.mw-select-lg {
64
+ @include _marker-select($_marker-lg, spacing('4'), spacing('4'));
65
+ }
64
66
  }
65
67
  }
@@ -1,136 +1,124 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- $_mw-radio-colors: (
4
- primary: var(--mw-primary-color),
5
- secondary: var(--mw-secondary-color),
6
- info: var(--mw-info-color),
7
- success: var(--mw-success-color),
8
- warning: var(--mw-warning-color),
9
- danger: var(--mw-danger-color),
10
- );
3
+ @layer mw.forms {
4
+ $_size-sm: spacing('5');
5
+ $_size-default: spacing('6');
6
+ $_size-lg: spacing('7');
11
7
 
12
- $_size-sm: spacing('5');
13
- $_size-default: spacing('6');
14
- $_size-lg: spacing('7');
8
+ .mw-radio-group {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: spacing('3');
15
12
 
16
- .mw-radio-group {
17
- display: flex;
18
- flex-direction: column;
19
- gap: spacing('3');
20
-
21
- &-inline {
22
- flex-direction: row;
23
- flex-wrap: wrap;
24
- align-items: center;
25
- gap: spacing('2') spacing('6');
26
- @include media-down('sm') {
13
+ &-inline {
14
+ flex-direction: row;
15
+ flex-wrap: wrap;
16
+ align-items: center;
27
17
  gap: spacing('2') spacing('4');
18
+ @include media-up('sm') {
19
+ gap: spacing('2') spacing('6');
20
+ }
28
21
  }
29
22
  }
30
- }
31
-
32
- .mw-radio {
33
- display: inline-flex;
34
- align-items: center;
35
- gap: spacing('2');
36
- min-height: 1.5rem;
37
- cursor: pointer;
38
- user-select: none;
39
23
 
40
- // hide native radio
41
- input[type='radio'] {
42
- position: absolute;
43
- opacity: 0;
44
- width: 0;
45
- height: 0;
46
- }
47
-
48
- .mw-radio-button {
49
- position: relative;
50
- flex-shrink: 0;
51
- width: $_size-default;
52
- height: $_size-default;
53
- border: 2px solid var(--mw-border);
54
- border-radius: radius('full');
55
- transition: var(--mw-transition);
56
- background: var(--mw-form-elements-background);
24
+ .mw-radio {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ gap: spacing('2');
28
+ min-height: 1.5rem;
29
+ cursor: pointer;
30
+ user-select: none;
57
31
 
58
- &::after {
59
- content: '';
32
+ input[type='radio'] {
60
33
  position: absolute;
61
- top: 50%;
62
- left: 50%;
63
- width: 50%;
64
- height: 50%;
65
- background: var(--mw-primary-color);
66
- border-radius: radius('full');
67
- transform: translate(-50%, -50%) scale(0);
68
- transition: var(--mw-transition);
34
+ opacity: 0;
35
+ width: 0;
36
+ height: 0;
69
37
  }
70
- }
71
-
72
- // focus-visible state
73
- input[type='radio']:focus-visible + .mw-radio-button {
74
- @include focus-halo;
75
- border-color: var(--mw-primary-color);
76
- }
77
38
 
78
- input[type='radio']:checked + .mw-radio-button {
79
- border-color: var(--mw-primary-color);
80
- }
81
- input[type='radio']:checked + .mw-radio-button::after {
82
- transform: translate(-50%, -50%) scale(1);
83
- }
39
+ .mw-radio-button {
40
+ position: relative;
41
+ flex-shrink: 0;
42
+ width: $_size-default;
43
+ height: $_size-default;
44
+ border: 2px solid var(--mw-border);
45
+ border-radius: radius('full');
46
+ transition: var(--mw-transition);
47
+ background: var(--mw-form-elements-background);
84
48
 
85
- .mw-radio-label {
86
- font-size: font-size('base');
87
- color: var(--mw-text-color);
88
- }
49
+ &::after {
50
+ content: '';
51
+ position: absolute;
52
+ top: 50%;
53
+ left: 50%;
54
+ width: 50%;
55
+ height: 50%;
56
+ background: var(--mw-primary-color);
57
+ border-radius: radius('full');
58
+ transform: translate(-50%, -50%) scale(0);
59
+ transition: var(--mw-transition);
60
+ }
61
+ }
89
62
 
90
- // size variants
91
- &-sm {
92
- .mw-radio-button {
93
- width: $_size-sm;
94
- height: $_size-sm;
63
+ input[type='radio']:focus-visible + .mw-radio-button {
64
+ @include focus-halo;
65
+ border-color: var(--mw-primary-color);
95
66
  }
96
- .mw-radio-label {
97
- font-size: font-size('xs');
67
+
68
+ input[type='radio']:checked + .mw-radio-button {
69
+ border-color: var(--mw-primary-color);
98
70
  }
99
- }
100
- &-lg {
101
- .mw-radio-button {
102
- width: $_size-lg;
103
- height: $_size-lg;
71
+ input[type='radio']:checked + .mw-radio-button::after {
72
+ transform: translate(-50%, -50%) scale(1);
104
73
  }
74
+
105
75
  .mw-radio-label {
106
- font-size: font-size('md');
76
+ font-size: font-size('base');
77
+ color: var(--mw-text-color);
107
78
  }
108
- }
109
79
 
110
- // color variants
111
- @each $name, $col in $_mw-radio-colors {
112
- &-#{$name} {
113
- input[type='radio']:checked + .mw-radio-button {
114
- border-color: #{$col};
80
+ &-sm {
81
+ .mw-radio-button {
82
+ width: $_size-sm;
83
+ height: $_size-sm;
115
84
  }
116
- input[type='radio']:checked + .mw-radio-button::after {
117
- background: #{$col};
85
+ .mw-radio-label {
86
+ font-size: font-size('xs');
87
+ }
88
+ }
89
+ &-lg {
90
+ .mw-radio-button {
91
+ width: $_size-lg;
92
+ height: $_size-lg;
93
+ }
94
+ .mw-radio-label {
95
+ font-size: font-size('md');
118
96
  }
119
97
  }
120
- }
121
98
 
122
- // disabled
123
- &-disabled {
124
- cursor: not-allowed;
99
+ @each $name, $col in $semantic-colors {
100
+ &-#{$name} {
101
+ input[type='radio']:checked + .mw-radio-button {
102
+ border-color: #{$col};
103
+ }
104
+ input[type='radio']:checked + .mw-radio-button::after {
105
+ background: #{$col};
106
+ }
107
+ }
108
+ }
125
109
 
126
- input[type='radio'] {
110
+ &-disabled {
127
111
  cursor: not-allowed;
128
- }
129
- .mw-radio-button {
130
- background: var(--mw-gray-background);
131
- }
132
- .mw-radio-label {
133
- color: var(--mw-text-muted-color);
112
+
113
+ input[type='radio'] {
114
+ cursor: not-allowed;
115
+ }
116
+ .mw-radio-button {
117
+ background: var(--mw-gray-background);
118
+ }
119
+ .mw-radio-label {
120
+ color: var(--mw-text-muted-color);
121
+ }
134
122
  }
135
123
  }
136
124
  }