opui-css 5.0.0 → 5.1.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 (114) hide show
  1. package/CHANGELOG.md +317 -276
  2. package/LICENSE +21 -21
  3. package/MIGRATING.md +138 -127
  4. package/README.md +87 -87
  5. package/astro/index.ts +46 -46
  6. package/components/AGENTS.md +248 -248
  7. package/components/Accordion/Accordion.astro +52 -42
  8. package/components/Anchor/Anchor.astro +55 -51
  9. package/components/Avatar/Avatar.astro +38 -38
  10. package/components/Badge/Badge.astro +59 -59
  11. package/components/Button/Button.astro +45 -45
  12. package/components/ButtonGroup/ButtonGroup.astro +36 -29
  13. package/components/Callout/Callout.astro +75 -75
  14. package/components/Card/Card.astro +38 -36
  15. package/components/Checkbox/Checkbox.astro +76 -76
  16. package/components/Checkbox/CheckboxInput.astro +32 -32
  17. package/components/Chip/Chip.astro +37 -37
  18. package/components/ClassicSelect/ClassicSelect.astro +83 -83
  19. package/components/DescriptionList/Description.astro +12 -12
  20. package/components/DescriptionList/DescriptionList.astro +22 -22
  21. package/components/DescriptionList/Item.astro +12 -12
  22. package/components/DescriptionList/Term.astro +12 -12
  23. package/components/DescriptionList/index.ts +12 -12
  24. package/components/Dialog/Dialog.astro +43 -41
  25. package/components/Divider/Divider.astro +17 -17
  26. package/components/Drawer/Drawer.astro +49 -49
  27. package/components/Drawer/DrawerFooter.astro +14 -14
  28. package/components/Drawer/DrawerHeader.astro +31 -31
  29. package/components/FieldDescription/FieldDescription.astro +13 -13
  30. package/components/FieldGroup/FieldGroup.astro +31 -31
  31. package/components/FieldLegend/FieldLegend.astro +15 -15
  32. package/components/FieldSet/FieldSet.astro +15 -15
  33. package/components/Form/Form.astro +15 -15
  34. package/components/IconButton/IconButton.astro +26 -26
  35. package/components/List/List.astro +36 -36
  36. package/components/ListItem/ListItem.astro +118 -118
  37. package/components/Progress/Progress.astro +41 -40
  38. package/components/Radio/Radio.astro +70 -70
  39. package/components/Radio/RadioInput.astro +24 -24
  40. package/components/Range/Range.astro +136 -136
  41. package/components/Select/Select.astro +106 -106
  42. package/components/Switch/Switch.astro +101 -101
  43. package/components/Switch/SwitchInput.astro +25 -25
  44. package/components/Table/Body.astro +13 -13
  45. package/components/Table/Cell.astro +13 -13
  46. package/components/Table/Column.astro +15 -15
  47. package/components/Table/ColumnGroup.astro +13 -13
  48. package/components/Table/Head.astro +13 -13
  49. package/components/Table/HeaderCell.astro +13 -13
  50. package/components/Table/Row.astro +13 -13
  51. package/components/Table/Table.astro +18 -18
  52. package/components/Table/index.ts +20 -20
  53. package/components/Tabs/Tabs.astro +28 -28
  54. package/components/Tabs/TabsItem.astro +47 -47
  55. package/components/Tabs/TabsPanel.astro +21 -21
  56. package/components/Tabs/TabsTab.astro +19 -19
  57. package/components/Tabs/index.ts +14 -14
  58. package/components/TextField/TextField.astro +128 -128
  59. package/components/Textarea/Textarea.astro +106 -106
  60. package/components/Toast/Toast.astro +42 -42
  61. package/components/ToggleButton/ToggleButton.astro +53 -53
  62. package/components/ToggleGroup/ToggleGroup.astro +49 -49
  63. package/components/Tooltip/Tooltip.astro +30 -30
  64. package/core/normalize.css +200 -194
  65. package/core/palette.css +110 -59
  66. package/core/utils.css +71 -71
  67. package/css/components/accordion.css +174 -174
  68. package/css/components/anchor.css +27 -27
  69. package/css/components/avatar.css +65 -65
  70. package/css/components/badge.css +107 -107
  71. package/css/components/button-group.css +193 -179
  72. package/css/components/button.css +227 -215
  73. package/css/components/callout.css +112 -109
  74. package/css/components/card.css +115 -117
  75. package/css/components/checkbox.css +211 -205
  76. package/css/components/chip.css +92 -87
  77. package/css/components/description-list.css +81 -80
  78. package/css/components/dialog.css +69 -68
  79. package/css/components/divider.css +20 -20
  80. package/css/components/drawer.css +171 -171
  81. package/css/components/form.css +147 -146
  82. package/css/components/icon-button.css +158 -139
  83. package/css/components/link.css +21 -21
  84. package/css/components/list.css +343 -345
  85. package/css/components/progress.css +103 -97
  86. package/css/components/radio.css +170 -172
  87. package/css/components/range.css +342 -337
  88. package/css/components/select.css +172 -169
  89. package/css/components/spinner.css +38 -37
  90. package/css/components/switch.css +271 -268
  91. package/css/components/table.css +173 -179
  92. package/css/components/tabs.css +84 -83
  93. package/css/components/text-field.css +449 -450
  94. package/css/components/text-input.css +68 -64
  95. package/css/components/textarea.css +26 -24
  96. package/css/components/toast.css +160 -161
  97. package/css/components/toggle-button.css +91 -87
  98. package/css/components/toggle-group.css +56 -56
  99. package/css/components/tooltip.css +70 -67
  100. package/css/components/typography.css +585 -585
  101. package/css/components.css +41 -41
  102. package/css/imports.css +17 -16
  103. package/css/js/checkbox.js +21 -21
  104. package/css/js/toast.js +94 -94
  105. package/css/theme.css +133 -132
  106. package/dist/op.css +4 -66
  107. package/dist/op.css.map +1 -1
  108. package/dist/opui.components.css +5234 -5154
  109. package/dist/opui.components.css.map +1 -1
  110. package/dist/opui.css +5798 -5663
  111. package/dist/opui.css.map +1 -1
  112. package/env.d.ts +14 -14
  113. package/open-props.css +8 -9
  114. package/package.json +81 -81
@@ -1,146 +1,147 @@
1
- @layer components.extended {
2
-
3
- /* Form */
4
- :where(.ui-form) {
5
- display: grid;
6
- gap: var(--size-8);
7
-
8
- hr {
9
- margin-block: 0;
10
- }
11
- }
12
-
13
- /* Fieldset */
14
- :where(.ui-fieldset) {
15
- all: unset;
16
- border: 0;
17
- border-radius: 0;
18
- display: grid;
19
- gap: var(--size-1);
20
- margin: 0;
21
- min-inline-size: 0;
22
- padding: 0;
23
-
24
- /* Legend */
25
- :where(legend, .ui-legend) {
26
- all: unset;
27
- color: var(--text-primary);
28
- font-weight: 600;
29
- margin-block-end: var(--size-3);
30
- padding: 0;
31
-
32
- &:has(+ :where(.ui-field-description)) {
33
- margin-block-end: 0;
34
- }
35
- }
36
-
37
- /* Field description / supporting text */
38
- :where(.ui-field-description) {
39
- color: var(--text-muted);
40
- font-size: var(--font-size-05);
41
- line-height: var(--font-lineheight-3);
42
-
43
- &:has(+ *) {
44
- margin-block-end: var(--size-3);
45
- }
46
- }
47
-
48
- /* End text */
49
- :where(.ui-end-text) {
50
- color: var(--text-muted);
51
- font-size: var(--font-size-0);
52
- line-height: var(--font-lineheight-3);
53
- }
54
-
55
- &:has(.ui-text-field.ui-row) {
56
- row-gap: var(--size-7);
57
- }
58
-
59
- /* Disabled */
60
- &[disabled] {
61
- opacity: 0.64;
62
- user-select: none;
63
-
64
- input,
65
- label,
66
- .ui-label {
67
- cursor: not-allowed;
68
- }
69
- }
70
-
71
- /* Error / validation */
72
- &[data-invalid] {
73
- :where(.ui-end-text) {
74
- color: var(--primary);
75
- }
76
-
77
- :where(.ui-checkbox, .ui-radio, .ui-switch) {
78
- --palette-source: oklch(0.58 0.21 var(--hue-red));
79
-
80
- :where(.ui-end-text) {
81
- color: var(--primary);
82
- }
83
- }
84
-
85
- :where(.ui-switch) {
86
- input {
87
- border-radius: var(--radius-round);
88
- outline: 2px solid var(--primary);
89
- }
90
- }
91
- }
92
-
93
- /* Required */
94
- &:has(:invalid) {
95
- :where(legend, .ui-legend) {
96
- padding-inline-end: 1ex;
97
- position: relative;
98
-
99
- &::after {
100
- color: var(--red);
101
- content: "*";
102
- inset: 0 -0.25ex auto auto;
103
- position: absolute;
104
- }
105
- }
106
- }
107
- }
108
-
109
- /* Field group */
110
- :where(.ui-field-group) {
111
- display: flex;
112
- flex-direction: column;
113
- gap: var(--size-4);
114
-
115
- /* If it only has checkboxes, radios, or switches */
116
- &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(:has(> :not(.ui-checkbox, .ui-radio, .ui-switch))) {
117
- gap: var(--size-2);
118
- }
119
-
120
- /* If it only has buttons */
121
- &:has(.ui-button):not(:has(*:not(.ui-button))) {
122
- align-items: center;
123
- flex-direction: row;
124
- gap: var(--size-2);
125
-
126
- /* If it's not preceeded by an hr */
127
- &:not(hr + &) {
128
- margin-block-start: var(--size-4);
129
- }
130
- }
131
-
132
- &+& {
133
- margin-block-start: var(--size-5);
134
- }
135
-
136
- /* Directions */
137
- &.ui-row {
138
- flex-direction: row;
139
- flex-wrap: wrap;
140
-
141
- &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)) {
142
- gap: var(--size-4);
143
- }
144
- }
145
- }
146
- }
1
+ @layer components.extended {
2
+ /* Form */
3
+ :where(.ui-form) {
4
+ display: grid;
5
+ gap: var(--size-8);
6
+
7
+ hr {
8
+ margin-block: 0;
9
+ }
10
+ }
11
+
12
+ /* Fieldset */
13
+ :where(.ui-fieldset) {
14
+ all: unset;
15
+ border: 0;
16
+ border-radius: 0;
17
+ display: grid;
18
+ gap: var(--size-1);
19
+ margin: 0;
20
+ min-inline-size: 0;
21
+ padding: 0;
22
+
23
+ /* Legend */
24
+ :where(legend, .ui-legend) {
25
+ all: unset;
26
+ color: var(--text-primary);
27
+ font-weight: 600;
28
+ margin-block-end: var(--size-3);
29
+ padding: 0;
30
+
31
+ &:has(+ :where(.ui-field-description)) {
32
+ margin-block-end: 0;
33
+ }
34
+ }
35
+
36
+ /* Field description / supporting text */
37
+ :where(.ui-field-description) {
38
+ color: var(--text-muted);
39
+ font-size: var(--font-size-05);
40
+ line-height: var(--font-lineheight-3);
41
+
42
+ &:has(+ *) {
43
+ margin-block-end: var(--size-3);
44
+ }
45
+ }
46
+
47
+ /* End text */
48
+ :where(.ui-end-text) {
49
+ color: var(--text-muted);
50
+ font-size: var(--font-size-0);
51
+ line-height: var(--font-lineheight-3);
52
+ }
53
+
54
+ &:has(.ui-text-field.ui-row) {
55
+ row-gap: var(--size-7);
56
+ }
57
+
58
+ /* Disabled */
59
+ &[disabled] {
60
+ opacity: 0.64;
61
+ user-select: none;
62
+
63
+ input,
64
+ label,
65
+ .ui-label {
66
+ cursor: not-allowed;
67
+ }
68
+ }
69
+
70
+ /* Error / validation */
71
+ &[data-invalid] {
72
+ :where(.ui-end-text) {
73
+ color: var(--critical);
74
+ }
75
+
76
+ :where(.ui-checkbox, .ui-radio, .ui-switch) {
77
+ --primary: var(--critical);
78
+
79
+ :where(.ui-end-text) {
80
+ color: var(--critical);
81
+ }
82
+ }
83
+
84
+ :where(.ui-switch) {
85
+ input {
86
+ border-radius: var(--radius-round);
87
+ outline: 2px solid var(--critical);
88
+ }
89
+ }
90
+ }
91
+
92
+ /* Required */
93
+ &:has(:invalid) {
94
+ :where(legend, .ui-legend) {
95
+ padding-inline-end: 1ex;
96
+ position: relative;
97
+
98
+ &::after {
99
+ color: var(--red);
100
+ content: "*";
101
+ inset: 0 -0.25ex auto auto;
102
+ position: absolute;
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ /* Field group */
109
+ :where(.ui-field-group) {
110
+ display: flex;
111
+ flex-direction: column;
112
+ gap: var(--size-4);
113
+
114
+ /* If it only has checkboxes, radios, or switches */
115
+ &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(
116
+ :has(> :not(.ui-checkbox, .ui-radio, .ui-switch))
117
+ ) {
118
+ gap: var(--size-2);
119
+ }
120
+
121
+ /* If it only has buttons */
122
+ &:has(.ui-button):not(:has(*:not(.ui-button))) {
123
+ align-items: center;
124
+ flex-direction: row;
125
+ gap: var(--size-2);
126
+
127
+ /* If it's not preceeded by an hr */
128
+ &:not(hr + &) {
129
+ margin-block-start: var(--size-4);
130
+ }
131
+ }
132
+
133
+ & + & {
134
+ margin-block-start: var(--size-5);
135
+ }
136
+
137
+ /* Directions */
138
+ &.ui-row {
139
+ flex-direction: row;
140
+ flex-wrap: wrap;
141
+
142
+ &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)) {
143
+ gap: var(--size-4);
144
+ }
145
+ }
146
+ }
147
+ }
@@ -1,139 +1,158 @@
1
- @layer components.root {
2
- :where(.ui-icon-button) {
3
- --_color: light-dark(var(--color-16), var(--color-1));
4
- --_color-contrast: light-dark(var(--color-1), var(--color-16));
5
- --_color-tonal: var(--surface-tonal);
6
-
7
- --_accent: var(--_color);
8
- --_accent-contrast: var(--_color-contrast);
9
- --_accent-tonal: var(--_color-tonal);
10
- --_accent-tonal-contrast: var(--_color);
11
- --_default-hover-bg-color: light-dark(oklch(from var(--_accent) l 0.01 h / 10%),
12
- oklch(from var(--_accent) l 0.01 h / 20%));
13
- --_default-active-bg-color: light-dark(oklch(from var(--_accent) l 0.06 h / 20%),
14
- oklch(from var(--_accent) l 0.06 h / 30%));
15
- --_filled-hover-bg-color: light-dark(oklch(from var(--_accent) calc(l + 0.2) c h),
16
- oklch(from var(--_accent) calc(l - 0.1) c h));
17
- --_filled-active-bg-color: light-dark(oklch(from var(--_accent) calc(l + 0.3) c h),
18
- oklch(from var(--_accent) calc(l - 0.15) c h));
19
- --_outlined-active-bg-color: var(--_filled-active-bg-color);
20
-
21
- --_bg-color: transparent;
22
- --_border-color: transparent;
23
- --_border-width: var(--border-size-1);
24
- --_text-color: inherit;
25
-
26
- align-items: center;
27
- aspect-ratio: 1;
28
- background-color: var(--_bg-color);
29
- block-size: var(--size-6);
30
- border: var(--_border-width) solid var(--_border-color);
31
- border-radius: var(--radius-round);
32
- color: var(--_text-color);
33
- display: inline-flex;
34
- inline-size: var(--size-6);
35
- justify-content: center;
36
- padding: 0;
37
- transform-style: preserve-3d;
38
- transition: background-color .1s ease, color .1s ease,
39
- border-color .1s ease, box-shadow .1s ease;
40
-
41
- &:where([disabled]) {
42
- --_text-color: light-dark(rgb(0, 0, 0/0.3), rgb(255, 255, 255/0.26));
43
- cursor: not-allowed;
44
- opacity: 0.64;
45
- }
46
-
47
- svg {
48
- block-size: auto;
49
- inline-size: auto;
50
- max-block-size: var(--size-5);
51
- max-inline-size: var(--size-5);
52
- pointer-events: none;
53
- }
54
-
55
- /* Ripple effect, utils.css */
56
- &::before {
57
- --highlight-size: 130%;
58
- background-color: transparent;
59
-
60
- @media (prefers-reduced-motion: no-preference) {
61
- transition: transform 0.2s ease, background-color .1s ease;
62
- }
63
- }
64
-
65
- /* Colors — shared interaction model for critical and primary.
66
- Each color modifier below only swaps --_color; the tonal surface,
67
- contrast text, and hover/active strategy are identical.
68
- The .critical scope class in theme.css redirects --palette-source so
69
- --color-6 below becomes a tint of the active color. */
70
- &.ui-critical,
71
- &.ui-primary {
72
- --_color-contrast: var(--gray-1);
73
- --_color-tonal: var(--color-6);
74
- --_accent-tonal-contrast: var(--text-primary-contrast);
75
-
76
- --_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
77
- --_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
78
-
79
- --_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
80
- --_filled-active-bg-color: oklch(from var(--_accent) calc(l - 0.15) c h);
81
-
82
- --_outlined-active-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
83
- }
84
-
85
- &.ui-critical {
86
- --_color: var(--critical);
87
- }
88
-
89
- &.ui-primary {
90
- --_color: var(--primary);
91
- }
92
-
93
- /* Element states */
94
- &:where(:not([disabled])) {
95
- &:where(:not(:active):hover) {
96
- &::before {
97
- background-color: var(--_interaction-hover-color, var(--_default-hover-bg-color));
98
- }
99
- }
100
-
101
- &:where(:hover:active),
102
- &[aria-current="page"] {
103
- &::before {
104
- background-color: var(--_interaction-active-color, var(--_default-active-bg-color));
105
- }
106
- }
107
- }
108
-
109
- /* Size */
110
- &.ui-small {
111
- block-size: var(--size-4);
112
- inline-size: var(--size-4);
113
-
114
- svg {
115
- max-block-size: var(--size-4);
116
- max-inline-size: var(--size-4);
117
- }
118
- }
119
-
120
- /* Variants */
121
- &.ui-outlined {
122
- --_bg-color: transparent;
123
- --_border-color: var(--_accent);
124
- --_text-color: var(--_accent);
125
- }
126
-
127
- &.ui-tonal {
128
- --_bg-color: var(--_accent-tonal);
129
- --_text-color: var(--_accent-tonal-contrast);
130
- }
131
-
132
- &.ui-filled {
133
- --_bg-color: var(--_accent);
134
- --_interaction-active-color: var(--_filled-active-bg-color);
135
- --_interaction-hover-color: var(--_filled-hover-bg-color);
136
- --_text-color: var(--_accent-contrast);
137
- }
138
- }
139
- }
1
+ @layer components.root {
2
+ :where(.ui-icon-button) {
3
+ --_color: light-dark(var(--color-16), var(--color-1));
4
+ --_color-contrast: light-dark(var(--color-1), var(--color-16));
5
+ --_color-tonal: var(--surface-tonal);
6
+
7
+ --_accent: var(--_color);
8
+ --_accent-contrast: var(--_color-contrast);
9
+ --_accent-tonal: var(--_color-tonal);
10
+ --_accent-tonal-contrast: var(--_color);
11
+ --_default-hover-bg-color: light-dark(
12
+ oklch(from var(--_accent) l 0.01 h / 10%),
13
+ oklch(from var(--_accent) l 0.01 h / 20%)
14
+ );
15
+ --_default-active-bg-color: light-dark(
16
+ oklch(from var(--_accent) l 0.06 h / 20%),
17
+ oklch(from var(--_accent) l 0.06 h / 30%)
18
+ );
19
+ --_filled-hover-bg-color: light-dark(
20
+ oklch(from var(--_accent) calc(l + 0.2) c h),
21
+ oklch(from var(--_accent) calc(l - 0.1) c h)
22
+ );
23
+ --_filled-active-bg-color: light-dark(
24
+ oklch(from var(--_accent) calc(l + 0.3) c h),
25
+ oklch(from var(--_accent) calc(l - 0.15) c h)
26
+ );
27
+ --_outlined-active-bg-color: var(--_filled-active-bg-color);
28
+
29
+ --_bg-color: transparent;
30
+ --_border-color: transparent;
31
+ --_border-width: var(--border-size-1);
32
+ --_text-color: inherit;
33
+
34
+ align-items: center;
35
+ aspect-ratio: 1;
36
+ background-color: var(--_bg-color);
37
+ block-size: var(--size-6);
38
+ border: var(--_border-width) solid var(--_border-color);
39
+ border-radius: var(--radius-round);
40
+ color: var(--_text-color);
41
+ display: inline-flex;
42
+ inline-size: var(--size-6);
43
+ justify-content: center;
44
+ padding: 0;
45
+ transform-style: preserve-3d;
46
+ transition:
47
+ background-color 0.1s ease,
48
+ color 0.1s ease,
49
+ border-color 0.1s ease,
50
+ box-shadow 0.1s ease;
51
+
52
+ &:where([disabled]) {
53
+ --_text-color: light-dark(rgb(0, 0, 0/0.3), rgb(255, 255, 255/0.26));
54
+ cursor: not-allowed;
55
+ opacity: 0.64;
56
+ }
57
+
58
+ svg {
59
+ block-size: auto;
60
+ inline-size: auto;
61
+ max-block-size: var(--size-5);
62
+ max-inline-size: var(--size-5);
63
+ pointer-events: none;
64
+ }
65
+
66
+ /* Ripple effect, utils.css */
67
+ &::before {
68
+ --highlight-size: 130%;
69
+ background-color: transparent;
70
+
71
+ @media (prefers-reduced-motion: no-preference) {
72
+ transition:
73
+ transform 0.2s ease,
74
+ background-color 0.1s ease;
75
+ }
76
+ }
77
+
78
+ /* Colors — shared interaction model for critical and primary.
79
+ Each color modifier below only swaps --_color; the tonal surface,
80
+ contrast text, and hover/active strategy are identical.
81
+ The .critical scope class in theme.css redirects --palette-source so
82
+ --color-6 below becomes a tint of the active color. */
83
+ &.ui-critical,
84
+ &.ui-primary {
85
+ --_color-contrast: var(--gray-1);
86
+ --_color-tonal: var(--color-6);
87
+ --_accent-tonal-contrast: var(--text-primary-contrast);
88
+
89
+ --_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
90
+ --_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
91
+
92
+ --_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
93
+ --_filled-active-bg-color: oklch(from var(--_accent) calc(l - 0.15) c h);
94
+
95
+ --_outlined-active-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
96
+ }
97
+
98
+ &.ui-critical {
99
+ --_color: var(--critical);
100
+ }
101
+
102
+ &.ui-primary {
103
+ --_color: var(--primary);
104
+ }
105
+
106
+ /* Element states */
107
+ &:where(:not([disabled])) {
108
+ &:where(:not(:active):hover) {
109
+ &::before {
110
+ background-color: var(
111
+ --_interaction-hover-color,
112
+ var(--_default-hover-bg-color)
113
+ );
114
+ }
115
+ }
116
+
117
+ &:where(:hover:active),
118
+ &[aria-current="page"] {
119
+ &::before {
120
+ background-color: var(
121
+ --_interaction-active-color,
122
+ var(--_default-active-bg-color)
123
+ );
124
+ }
125
+ }
126
+ }
127
+
128
+ /* Size */
129
+ &.ui-small {
130
+ block-size: var(--size-4);
131
+ inline-size: var(--size-4);
132
+
133
+ svg {
134
+ max-block-size: var(--size-4);
135
+ max-inline-size: var(--size-4);
136
+ }
137
+ }
138
+
139
+ /* Variants */
140
+ &.ui-outlined {
141
+ --_bg-color: transparent;
142
+ --_border-color: var(--_accent);
143
+ --_text-color: var(--_accent);
144
+ }
145
+
146
+ &.ui-tonal {
147
+ --_bg-color: var(--_accent-tonal);
148
+ --_text-color: var(--_accent-tonal-contrast);
149
+ }
150
+
151
+ &.ui-filled {
152
+ --_bg-color: var(--_accent);
153
+ --_interaction-active-color: var(--_filled-active-bg-color);
154
+ --_interaction-hover-color: var(--_filled-hover-bg-color);
155
+ --_text-color: var(--_accent-contrast);
156
+ }
157
+ }
158
+ }
@@ -1,21 +1,21 @@
1
- @layer components.root {
2
- :where(.ui-link) {
3
- color: var(--primary);
4
- cursor: pointer;
5
- font-weight: 700;
6
- text-decoration: underline;
7
- text-decoration-color: var(--primary);
8
- text-underline-offset: 2px;
9
-
10
- &[href] {
11
- &:hover,
12
- &:focus-visible {
13
- color: var(--primary-light);
14
- }
15
- }
16
-
17
- @supports (-moz-appearance: none) {
18
- text-underline-offset: 2px;
19
- }
20
- }
21
- }
1
+ @layer components.root {
2
+ :where(.ui-link) {
3
+ color: var(--primary);
4
+ cursor: pointer;
5
+ font-weight: 700;
6
+ text-decoration: underline;
7
+ text-decoration-color: var(--primary);
8
+ text-underline-offset: 2px;
9
+
10
+ &[href] {
11
+ &:hover,
12
+ &:focus-visible {
13
+ color: var(--primary-light);
14
+ }
15
+ }
16
+
17
+ @supports (-moz-appearance: none) {
18
+ text-underline-offset: 2px;
19
+ }
20
+ }
21
+ }