opui-css 1.2.7 → 2.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 (39) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +32 -25
  3. package/dist/op+ui.css +4195 -4195
  4. package/dist/ui.css +4197 -4197
  5. package/package.json +1 -1
  6. package/src/components/accordion.css +172 -172
  7. package/src/components/alert.css +85 -85
  8. package/src/components/avatar.css +68 -68
  9. package/src/components/badge.css +101 -101
  10. package/src/components/button-group.css +69 -69
  11. package/src/components/button.css +267 -267
  12. package/src/components/card.css +82 -82
  13. package/src/components/checkbox-radio.css +123 -123
  14. package/src/components/chip.css +135 -135
  15. package/src/components/definition-list.css +65 -65
  16. package/src/components/dialog.css +59 -59
  17. package/src/components/divider.css +7 -7
  18. package/src/components/field-group.css +83 -83
  19. package/src/components/field.css +494 -494
  20. package/src/components/icon-button.css +40 -40
  21. package/src/components/list.css +317 -317
  22. package/src/components/progress.css +83 -83
  23. package/src/components/range.css +121 -121
  24. package/src/components/rich-text.css +210 -210
  25. package/src/components/select.css +163 -163
  26. package/src/components/snackbar.css +148 -148
  27. package/src/components/spinner.css +38 -38
  28. package/src/components/switch.css +189 -189
  29. package/src/components/tab-buttons.css +120 -120
  30. package/src/components/table.css +107 -107
  31. package/src/components/text-field.css +57 -57
  32. package/src/components/textarea.css +25 -25
  33. package/src/components/toggle-button-group.css +139 -139
  34. package/src/components/tooltip.css +94 -94
  35. package/src/components/typography.css +209 -209
  36. package/src/core/normalize.css +194 -194
  37. package/src/core/theme.css +160 -160
  38. package/src/core/utils.css +60 -60
  39. package/src/main.css +13 -13
@@ -1,210 +1,210 @@
1
- @layer components.extended {
2
- @scope (.rich-text) to (.not-rich-text) {
3
- a {
4
- color: var(--primary);
5
- cursor: pointer;
6
- font-size: inherit;
7
- font-weight: 700;
8
- line-height: inherit;
9
- text-decoration: underline;
10
- text-decoration-color: var(--primary);
11
- text-underline-offset: 2px;
12
-
13
- &[href] {
14
- &:hover,
15
- &:focus-visible {
16
- color: var(--primary-light);
17
- }
18
- }
19
- }
20
-
21
- /* Blockquote */
22
- blockquote {
23
- font-size: inherit;
24
- line-height: inherit;
25
- :first-child {
26
- margin-block-start: 0;
27
- }
28
-
29
- :last-child {
30
- margin-block-end: 0;
31
- }
32
- }
33
-
34
- /* Text */
35
- p {
36
- font-size: inherit;
37
- line-height: inherit;
38
- margin-block: 1.25em;
39
- }
40
-
41
- :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
42
- color: var(--text-color-1);
43
-
44
- & + *:not(&) {
45
- margin-block-start: 0;
46
- }
47
- }
48
-
49
- h1,
50
- .h1 {
51
- font-size: var(--font-size-h1, var(--font-size-7));
52
- letter-spacing: -0.02em;
53
- line-height: 1.1111111;
54
- margin-block: 0 0.8888889em;
55
- }
56
-
57
- h2,
58
- .h2 {
59
- font-size: var(--font-size-h2, var(--font-size-5, 2rem));
60
- letter-spacing: -0.02em;
61
- line-height: 1.3333333;
62
- margin-block: 2em 1em;
63
- }
64
-
65
- h3,
66
- .h3 {
67
- font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
68
- letter-spacing: -0.01em;
69
- line-height: 1.6;
70
- margin-block: 1.6em 0.6em;
71
- }
72
-
73
- h4,
74
- .h4 {
75
- font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
76
- letter-spacing: -0.01em;
77
- line-height: 1.5;
78
- margin-block: 1.5em 0.5em;
79
- }
80
-
81
- h5,
82
- .h5 {
83
- font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
84
- line-height: 1;
85
- margin-block: 0 var(--size-1);
86
- }
87
-
88
- h6,
89
- .h6 {
90
- font-size: var(--font-size-h6, var(--font-size-1, 1rem));
91
- line-height: 1;
92
- margin-block: 0 var(--size-1);
93
- }
94
-
95
- /** Overline */
96
- :where(.overline, hgroup > :where(p, .p):first-of-type:first-child) {
97
- color: light-dark(
98
- oklch(from var(--text-color-2) calc(l * 1.25) c h),
99
- oklch(from var(--text-color-2) calc(l * 0.75) c h)
100
- );
101
- font-size: var(--font-size-xs);
102
- font-weight: 500;
103
- letter-spacing: 0.06em;
104
- line-height: 2.5;
105
- text-transform: uppercase;
106
- }
107
-
108
- hgroup {
109
- & > p {
110
- margin: 0;
111
- }
112
-
113
- & > :where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
114
- margin-block-end: 0.4em;
115
- }
116
-
117
- & + * {
118
- margin-block-start: 3em;
119
- }
120
-
121
- /* The second p element */
122
- & > :where(p, .p):last-of-type:last-child:not(:first-child) {
123
- color: oklch(from currentColor l c h / 75%);
124
- font-size: var(--font-size-lg);
125
- line-height: 1.6;
126
- }
127
- }
128
-
129
- /* Lists */
130
- ul:not([class]) {
131
- list-style-type: disc;
132
- }
133
-
134
- ol:not([class]) {
135
- list-style-type: decimal;
136
- }
137
-
138
- :where(ul, ol):not([class]) {
139
- display: grid;
140
- font-size: inherit;
141
- gap: 0.5em;
142
- line-height: inherit;
143
- margin-block-start: 1.25em;
144
- margin-block-end: 1.25em;
145
- padding-inline-start: 1.625em;
146
-
147
- li {
148
- padding-inline-start: 0.375em;
149
- }
150
- }
151
-
152
- /* Nested lists */
153
- :where(ul ul),
154
- :where(ul ol),
155
- :where(ol ul),
156
- :where(ol ol) {
157
- margin-block-start: 0.75em;
158
- margin-block-end: 0.75em;
159
- }
160
-
161
- /* Description lists */
162
- :where(dl) {
163
- font-size: inherit;
164
- line-height: inherit;
165
- margin-block-start: 1.25em;
166
- margin-block-end: 1.25em;
167
-
168
- dt {
169
- margin-block-start: 1.25em;
170
- }
171
-
172
- dd {
173
- margin-block-start: 0.5em;
174
- padding-inline-start: 1.625em;
175
- }
176
- }
177
-
178
- /* Figures */
179
- figure {
180
- margin-block: 2em;
181
-
182
- & > * {
183
- margin-block: 0;
184
- }
185
-
186
- & figcaption {
187
- font-size: 0.875em;
188
- line-height: 1.4285714;
189
- margin-block-start: 0.8571429em;
190
- }
191
- }
192
-
193
- /* Remove top margin from first child */
194
- & > :first-child {
195
- margin-block-start: 0;
196
- }
197
-
198
- /* Remove bottom margin from last child */
199
- & > :last-child {
200
- margin-block-end: 0;
201
- }
202
-
203
- /* Horizontal rules */
204
- hr {
205
- & + * {
206
- margin-block-start: 0;
207
- }
208
- }
209
- }
210
- }
1
+ @layer components.extended {
2
+ @scope (.rich-text) to (.not-rich-text) {
3
+ a {
4
+ color: var(--primary);
5
+ cursor: pointer;
6
+ font-size: inherit;
7
+ font-weight: 700;
8
+ line-height: inherit;
9
+ text-decoration: underline;
10
+ text-decoration-color: var(--primary);
11
+ text-underline-offset: 2px;
12
+
13
+ &[href] {
14
+ &:hover,
15
+ &:focus-visible {
16
+ color: var(--primary-light);
17
+ }
18
+ }
19
+ }
20
+
21
+ /* Blockquote */
22
+ blockquote {
23
+ font-size: inherit;
24
+ line-height: inherit;
25
+ :first-child {
26
+ margin-block-start: 0;
27
+ }
28
+
29
+ :last-child {
30
+ margin-block-end: 0;
31
+ }
32
+ }
33
+
34
+ /* Text */
35
+ p {
36
+ font-size: inherit;
37
+ line-height: inherit;
38
+ margin-block: 1.25em;
39
+ }
40
+
41
+ :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
42
+ color: var(--text-color-1);
43
+
44
+ & + *:not(&) {
45
+ margin-block-start: 0;
46
+ }
47
+ }
48
+
49
+ h1,
50
+ .h1 {
51
+ font-size: var(--font-size-h1, var(--font-size-7));
52
+ letter-spacing: -0.02em;
53
+ line-height: 1.1111111;
54
+ margin-block: 0 0.8888889em;
55
+ }
56
+
57
+ h2,
58
+ .h2 {
59
+ font-size: var(--font-size-h2, var(--font-size-5, 2rem));
60
+ letter-spacing: -0.02em;
61
+ line-height: 1.3333333;
62
+ margin-block: 2em 1em;
63
+ }
64
+
65
+ h3,
66
+ .h3 {
67
+ font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
68
+ letter-spacing: -0.01em;
69
+ line-height: 1.6;
70
+ margin-block: 1.6em 0.6em;
71
+ }
72
+
73
+ h4,
74
+ .h4 {
75
+ font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
76
+ letter-spacing: -0.01em;
77
+ line-height: 1.5;
78
+ margin-block: 1.5em 0.5em;
79
+ }
80
+
81
+ h5,
82
+ .h5 {
83
+ font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
84
+ line-height: 1;
85
+ margin-block: 0 var(--size-1);
86
+ }
87
+
88
+ h6,
89
+ .h6 {
90
+ font-size: var(--font-size-h6, var(--font-size-1, 1rem));
91
+ line-height: 1;
92
+ margin-block: 0 var(--size-1);
93
+ }
94
+
95
+ /** Overline */
96
+ :where(.overline, hgroup > :where(p, .p):first-of-type:first-child) {
97
+ color: light-dark(
98
+ oklch(from var(--text-color-2) calc(l * 1.25) c h),
99
+ oklch(from var(--text-color-2) calc(l * 0.75) c h)
100
+ );
101
+ font-size: var(--font-size-xs);
102
+ font-weight: 500;
103
+ letter-spacing: 0.06em;
104
+ line-height: 2.5;
105
+ text-transform: uppercase;
106
+ }
107
+
108
+ hgroup {
109
+ & > p {
110
+ margin: 0;
111
+ }
112
+
113
+ & > :where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
114
+ margin-block-end: 0.4em;
115
+ }
116
+
117
+ & + * {
118
+ margin-block-start: 3em;
119
+ }
120
+
121
+ /* The second p element */
122
+ & > :where(p, .p):last-of-type:last-child:not(:first-child) {
123
+ color: oklch(from currentColor l c h / 75%);
124
+ font-size: var(--font-size-lg);
125
+ line-height: 1.6;
126
+ }
127
+ }
128
+
129
+ /* Lists */
130
+ ul:not([class]) {
131
+ list-style-type: disc;
132
+ }
133
+
134
+ ol:not([class]) {
135
+ list-style-type: decimal;
136
+ }
137
+
138
+ :where(ul, ol):not([class]) {
139
+ display: grid;
140
+ font-size: inherit;
141
+ gap: 0.5em;
142
+ line-height: inherit;
143
+ margin-block-start: 1.25em;
144
+ margin-block-end: 1.25em;
145
+ padding-inline-start: 1.625em;
146
+
147
+ li {
148
+ padding-inline-start: 0.375em;
149
+ }
150
+ }
151
+
152
+ /* Nested lists */
153
+ :where(ul ul),
154
+ :where(ul ol),
155
+ :where(ol ul),
156
+ :where(ol ol) {
157
+ margin-block-start: 0.75em;
158
+ margin-block-end: 0.75em;
159
+ }
160
+
161
+ /* Description lists */
162
+ :where(dl) {
163
+ font-size: inherit;
164
+ line-height: inherit;
165
+ margin-block-start: 1.25em;
166
+ margin-block-end: 1.25em;
167
+
168
+ dt {
169
+ margin-block-start: 1.25em;
170
+ }
171
+
172
+ dd {
173
+ margin-block-start: 0.5em;
174
+ padding-inline-start: 1.625em;
175
+ }
176
+ }
177
+
178
+ /* Figures */
179
+ figure {
180
+ margin-block: 2em;
181
+
182
+ & > * {
183
+ margin-block: 0;
184
+ }
185
+
186
+ & figcaption {
187
+ font-size: 0.875em;
188
+ line-height: 1.4285714;
189
+ margin-block-start: 0.8571429em;
190
+ }
191
+ }
192
+
193
+ /* Remove top margin from first child */
194
+ & > :first-child {
195
+ margin-block-start: 0;
196
+ }
197
+
198
+ /* Remove bottom margin from last child */
199
+ & > :last-child {
200
+ margin-block-end: 0;
201
+ }
202
+
203
+ /* Horizontal rules */
204
+ hr {
205
+ & + * {
206
+ margin-block-start: 0;
207
+ }
208
+ }
209
+ }
210
+ }