@odx/foundation 1.0.0-rc.4 → 1.0.0-rc.5
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/CHANGELOG.md +11 -0
- package/README.md +10 -0
- package/dist/lib/format.d.ts +1 -0
- package/dist/lib/format.js +3 -2
- package/dist/styles.css +390 -229
- package/package.json +8 -4
- package/types/styles.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 1.0.0-rc.5
|
|
2
|
+
|
|
3
|
+
### Major Changes
|
|
4
|
+
|
|
5
|
+
- Rename CSS utility classes `odx-text-primary|accent|...` to `odx-fg-*` to better reflect their purpose
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- Add `.odx-cloak` class to prevent FOUC (Flash of Unstyled Content) during initial load, use `odx-cloak` class on the root element of your application to enable it.
|
|
10
|
+
- Support `:visited` state for native links and anchors with `odx-link` class for better user experience
|
|
11
|
+
|
|
1
12
|
## 1.0.0-rc.4
|
|
2
13
|
|
|
3
14
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -86,6 +86,16 @@ setTheme({
|
|
|
86
86
|
});
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
### Page Cloak
|
|
90
|
+
|
|
91
|
+
To prevent unstyled content from flashing during the initial load of your application, you can use the `.odx-cloak` CSS class.
|
|
92
|
+
This class will temporarily hide the content of the `.odx-root` element until custom elements are fully loaded.
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<html class="odx-root odx-cloak">
|
|
96
|
+
</html>
|
|
97
|
+
```
|
|
98
|
+
|
|
89
99
|
### Documentation
|
|
90
100
|
|
|
91
101
|
For detailed documentation on how to use the `@odx/foundation` package, including examples and best practices, please visit our <a href="https://ca-odx-storybook-dev.yellowisland-7b13f2d7.westeurope.azurecontainerapps.io/" target="_blank" rel="noopener">storybook documentation</a>.
|
package/dist/lib/format.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ declare const TIME_UNIT_MAP: {
|
|
|
53
53
|
};
|
|
54
54
|
interface RelativeTimeFormatOptions extends Intl.RelativeTimeFormatOptions, BaseFormatOptions {
|
|
55
55
|
minUnit?: keyof typeof TIME_UNIT_MAP;
|
|
56
|
+
start?: number | string | Date;
|
|
56
57
|
}
|
|
57
58
|
declare function formatRelativeTime(input: number | string | Date, options?: RelativeTimeFormatOptions): string;
|
|
58
59
|
//#endregion
|
package/dist/lib/format.js
CHANGED
|
@@ -54,9 +54,10 @@ const TIME_UNIT_MAP = {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
function formatRelativeTime(input, options) {
|
|
57
|
+
const startDate = parseDate(options?.start ?? Date.now());
|
|
57
58
|
const value = parseDate(input);
|
|
58
|
-
if (!value) return "";
|
|
59
|
-
const relativeTime = value.getTime() -
|
|
59
|
+
if (!value || !startDate) return "";
|
|
60
|
+
const relativeTime = value.getTime() - startDate.getTime();
|
|
60
61
|
const minUnit = options?.minUnit && TIME_UNIT_MAP[options.minUnit] || TIME_UNIT_MAP.second;
|
|
61
62
|
const [unit, unitConfig] = Object.entries(TIME_UNIT_MAP).find(([_, { value, max }]) => Math.abs(relativeTime) < max && minUnit.value <= value);
|
|
62
63
|
return new Intl.RelativeTimeFormat(options?.locale, options).format(Math.round(relativeTime / unitConfig.value), unit);
|
package/dist/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer odx
|
|
1
|
+
@layer odx-native {
|
|
2
2
|
.odx-root {
|
|
3
3
|
&, & *, & :before, & :after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -60,138 +60,85 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
}
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
.odx-link, .odx-root a {
|
|
65
|
+
transition: var(--odx-motion-transition-reduced);
|
|
66
|
+
overflow: inherit;
|
|
67
|
+
vertical-align: baseline;
|
|
68
|
+
text-align: start;
|
|
69
|
+
text-decoration: initial;
|
|
70
|
+
text-overflow: inherit;
|
|
71
|
+
color: var(--odx-color-foreground-accent-rest);
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
user-select: text;
|
|
74
|
+
border-radius: 1px;
|
|
75
|
+
outline: 0;
|
|
76
|
+
font-family: inherit;
|
|
77
|
+
font-size: 1em;
|
|
78
|
+
transition-property: color;
|
|
79
|
+
display: inline-block;
|
|
79
80
|
|
|
80
|
-
&:
|
|
81
|
-
|
|
81
|
+
&:active {
|
|
82
|
+
color: var(--odx-color-foreground-accent-pressed);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
&:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
font-weight: var(--odx-typography-font-weight-medium);
|
|
88
|
-
content: attr(slot, "default") " slot";
|
|
85
|
+
&:focus-visible {
|
|
86
|
+
outline: var(--odx-focus-ring-outer);
|
|
87
|
+
outline-offset: var(--odx-focus-ring-offset-sm);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
&:
|
|
92
|
-
|
|
93
|
-
color: var(--odx-color-foreground-subtle);
|
|
94
|
-
font-size: var(--odx-typography-font-size-text-xs);
|
|
95
|
-
content: "This is a placeholder. A Replace with your own content";
|
|
90
|
+
&:visited {
|
|
91
|
+
color: var(--odx-color-special-link-visited);
|
|
96
92
|
}
|
|
97
|
-
}
|
|
98
93
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
&:after {
|
|
105
|
-
display: none;
|
|
94
|
+
&[disabled] {
|
|
95
|
+
color: var(--odx-color-foreground-disabled-rest);
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
user-select: none;
|
|
106
98
|
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.odx-cluster, .odx-flank, .odx-stack {
|
|
110
|
-
gap: var(--odx-spacing-layout-md);
|
|
111
|
-
max-width: 100%;
|
|
112
|
-
text-align: inherit;
|
|
113
|
-
flex-direction: column;
|
|
114
|
-
justify-content: flex-start;
|
|
115
|
-
align-items: center;
|
|
116
|
-
display: flex;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.odx-cluster {
|
|
120
|
-
flex-flow: wrap;
|
|
121
|
-
align-items: center;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.odx-flank {
|
|
125
|
-
flex-direction: row;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.odx-stack {
|
|
129
|
-
align-items: stretch;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.odx-flank:not(.odx-justify-end) > :not(:first-child), .odx-flank.odx-justify-end > :not(:last-child), .odx-fill {
|
|
133
|
-
flex: 1;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.odx-shrink {
|
|
137
|
-
flex: none;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.odx-align-baseline, .odx-align-start {
|
|
141
|
-
align-items: flex-start;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.odx-align-center {
|
|
145
|
-
align-items: center;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.odx-align-end {
|
|
149
|
-
align-items: end;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.odx-justify-start {
|
|
153
|
-
justify-content: flex-start;
|
|
154
|
-
}
|
|
155
99
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
100
|
+
@media (hover: hover) {
|
|
101
|
+
&:hover:not([disabled], :active, :focus-visible) {
|
|
102
|
+
color: var(--odx-color-foreground-accent-hover);
|
|
103
|
+
text-decoration: underline;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
162
106
|
}
|
|
163
107
|
|
|
164
|
-
|
|
165
|
-
|
|
108
|
+
:root {
|
|
109
|
+
interpolate-size: allow-keywords;
|
|
166
110
|
}
|
|
167
111
|
|
|
168
|
-
.odx-
|
|
169
|
-
|
|
170
|
-
|
|
112
|
+
.odx-root {
|
|
113
|
+
transition: opacity var(--odx-motion-duration-slow) linear;
|
|
114
|
+
tab-size: 4;
|
|
115
|
+
line-height: var(--odx-typography-line-height-base);
|
|
116
|
+
color: var(--odx-color-foreground-rest);
|
|
117
|
+
font-family: var(--odx-typography-font-family-base), "Noto Sans", Kanit, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji";
|
|
118
|
+
font-size: var(--odx-typography-font-size-base);
|
|
119
|
+
text-size-adjust: 100%;
|
|
120
|
+
-webkit-tap-highlight-color: transparent;
|
|
121
|
+
scrollbar-width: thin;
|
|
171
122
|
|
|
172
|
-
|
|
173
|
-
|
|
123
|
+
&[inert] {
|
|
124
|
+
opacity: 0;
|
|
125
|
+
transition-duration: 0s;
|
|
126
|
+
}
|
|
174
127
|
}
|
|
175
128
|
|
|
176
|
-
.odx-
|
|
177
|
-
|
|
178
|
-
|
|
129
|
+
html.odx-root {
|
|
130
|
+
scroll-behavior: smooth;
|
|
131
|
+
scrollbar-color: var(--odx-color-special-scrollbar) transparent;
|
|
132
|
+
height: 100%;
|
|
179
133
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
--gap: var(--odx-spacing-layout-md);
|
|
184
|
-
--_max-column-size: calc((100% - var(--gap) * (var(--max-columns) + 1)) / var(--max-columns));
|
|
185
|
-
--_min-column-size: min(100%, max(var(--min-column-size), var(--_max-column-size)));
|
|
186
|
-
--_column-size: minmax(var(--_min-column-size), 1fr);
|
|
187
|
-
grid-template-columns: repeat(auto-fit, var(--_column-size));
|
|
188
|
-
gap: var(--gap);
|
|
189
|
-
place-content: center;
|
|
190
|
-
display: grid;
|
|
191
|
-
}
|
|
134
|
+
&:not(:has(body.odx-light-mode), :has(body.odx-dark-mode)) {
|
|
135
|
+
background-color: var(--odx-color-background-base);
|
|
136
|
+
}
|
|
192
137
|
|
|
193
|
-
|
|
194
|
-
|
|
138
|
+
& body {
|
|
139
|
+
margin: 0;
|
|
140
|
+
padding: 0;
|
|
141
|
+
}
|
|
195
142
|
}
|
|
196
143
|
|
|
197
144
|
.odx-content :where(table), .odx-table {
|
|
@@ -362,59 +309,174 @@
|
|
|
362
309
|
padding: var(--odx-spacing-layout-lg);
|
|
363
310
|
border-radius: 0;
|
|
364
311
|
}
|
|
312
|
+
}
|
|
365
313
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
text-align: start;
|
|
371
|
-
text-decoration: initial;
|
|
372
|
-
text-overflow: inherit;
|
|
373
|
-
color: var(--odx-color-foreground-accent-rest);
|
|
374
|
-
cursor: pointer;
|
|
375
|
-
user-select: text;
|
|
376
|
-
border-radius: 1px;
|
|
377
|
-
outline: 0;
|
|
378
|
-
font-family: inherit;
|
|
379
|
-
font-size: 1em;
|
|
380
|
-
transition-property: color;
|
|
381
|
-
display: inline-block;
|
|
314
|
+
@layer odx-utils {
|
|
315
|
+
.odx-cloak:has(:not(:defined)) {
|
|
316
|
+
animation: 2s step-end odx-cloak-hide;
|
|
317
|
+
}
|
|
382
318
|
|
|
383
|
-
|
|
384
|
-
|
|
319
|
+
@keyframes odx-cloak-hide {
|
|
320
|
+
from {
|
|
321
|
+
opacity: 0;
|
|
385
322
|
}
|
|
386
323
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
outline-offset: var(--odx-focus-ring-offset-sm);
|
|
324
|
+
to {
|
|
325
|
+
opacity: 1;
|
|
390
326
|
}
|
|
327
|
+
}
|
|
391
328
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
329
|
+
.odx-visually-hidden:not(:focus-within), .odx-visually-hidden-force {
|
|
330
|
+
clip-path: rect(0 0 0 0) !important;
|
|
331
|
+
white-space: nowrap !important;
|
|
332
|
+
border: none !important;
|
|
333
|
+
width: 1px !important;
|
|
334
|
+
height: 1px !important;
|
|
335
|
+
padding: 0 !important;
|
|
336
|
+
position: absolute !important;
|
|
337
|
+
overflow: hidden !important;
|
|
338
|
+
}
|
|
397
339
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
340
|
+
.odx-cluster, .odx-flank, .odx-stack {
|
|
341
|
+
gap: var(--odx-spacing-layout-md);
|
|
342
|
+
max-width: 100%;
|
|
343
|
+
text-align: inherit;
|
|
344
|
+
flex-direction: column;
|
|
345
|
+
justify-content: flex-start;
|
|
346
|
+
align-items: center;
|
|
347
|
+
display: flex;
|
|
404
348
|
}
|
|
405
349
|
|
|
406
|
-
.odx-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
display: block;
|
|
350
|
+
.odx-cluster {
|
|
351
|
+
flex-flow: wrap;
|
|
352
|
+
align-items: center;
|
|
410
353
|
}
|
|
411
354
|
|
|
412
|
-
.odx-
|
|
413
|
-
|
|
355
|
+
.odx-flank {
|
|
356
|
+
flex-direction: row;
|
|
414
357
|
}
|
|
415
358
|
|
|
416
|
-
.odx-
|
|
417
|
-
|
|
359
|
+
.odx-stack {
|
|
360
|
+
align-items: stretch;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.odx-flank:not(.odx-justify-end) > :not(:first-child), .odx-flank.odx-justify-end > :not(:last-child), .odx-fill {
|
|
364
|
+
flex: 1;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.odx-shrink {
|
|
368
|
+
flex: none;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
:where(.odx-align-baseline, .odx-align-start, .odx-align-center, .odx-align-end, .odx-align-stretch) {
|
|
372
|
+
display: flex;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.odx-align-baseline {
|
|
376
|
+
align-items: baseline;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.odx-align-self-baseline {
|
|
380
|
+
align-self: baseline;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.odx-align-start {
|
|
384
|
+
align-items: flex-start;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.odx-align-self-start {
|
|
388
|
+
align-self: flex-start;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.odx-align-center {
|
|
392
|
+
align-items: center;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.odx-align-self-center {
|
|
396
|
+
align-self: center;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.odx-align-end {
|
|
400
|
+
align-items: flex-end;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.odx-align-self-end {
|
|
404
|
+
align-self: flex-end;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.odx-align-stretch {
|
|
408
|
+
align-items: stretch;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.odx-align-self-stretch {
|
|
412
|
+
align-self: stretch;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
:where(.odx-justify-start, .odx-justify-end, .odx-justify-center, .odx-justify-space-between, .odx-justify-space-around, .odx-justify-space-evenly) {
|
|
416
|
+
display: flex;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.odx-justify-start {
|
|
420
|
+
justify-content: flex-start;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.odx-justify-end {
|
|
424
|
+
justify-content: flex-end;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.odx-justify-center {
|
|
428
|
+
justify-content: center;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.odx-justify-space-around {
|
|
432
|
+
justify-content: space-around;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.odx-justify-space-between {
|
|
436
|
+
justify-content: space-between;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.odx-justify-space-evenly {
|
|
440
|
+
justify-content: space-evenly;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
:where(.odx-nowrap, .odx-wrap, .odx-wrap-reverse) {
|
|
444
|
+
display: flex;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.odx-nowrap {
|
|
448
|
+
flex-wrap: nowrap;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.odx-wrap {
|
|
452
|
+
flex-wrap: wrap;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.odx-wrap-reverse {
|
|
456
|
+
flex-wrap: wrap-reverse;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
[class*="odx-auto-grid"] {
|
|
460
|
+
--max-columns: 6;
|
|
461
|
+
--min-column-size: 250px;
|
|
462
|
+
--gap: var(--odx-spacing-layout-md);
|
|
463
|
+
--_max-column-size: calc((100% - var(--gap) * (var(--max-columns) + 1)) / var(--max-columns));
|
|
464
|
+
--_min-column-size: min(100%, max(var(--min-column-size), var(--_max-column-size)));
|
|
465
|
+
--_column-size: minmax(var(--_min-column-size), 1fr);
|
|
466
|
+
grid-template-columns: repeat(auto-fit, var(--_column-size));
|
|
467
|
+
gap: var(--gap);
|
|
468
|
+
place-content: center;
|
|
469
|
+
display: grid;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.odx-auto-grid-fill {
|
|
473
|
+
grid-template-columns: repeat(auto-fill, var(--_column-size));
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
[class*="odx-text"] {
|
|
477
|
+
line-height: var(--odx-typography-line-height-base);
|
|
478
|
+
font-family: var(--odx-typography-font-family-base);
|
|
479
|
+
font-weight: var(--odx-typography-font-weight-normal);
|
|
418
480
|
}
|
|
419
481
|
|
|
420
482
|
.odx-text-xs {
|
|
@@ -437,35 +499,14 @@
|
|
|
437
499
|
font-size: var(--odx-typography-font-size-text-lg);
|
|
438
500
|
}
|
|
439
501
|
|
|
440
|
-
.odx-text-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.odx-text-accent {
|
|
445
|
-
color: var(--odx-color-foreground-accent-rest);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
.odx-text-success {
|
|
449
|
-
color: var(--odx-color-foreground-success-rest);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.odx-text-danger {
|
|
453
|
-
color: var(--odx-color-foreground-danger-rest);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.odx-text-subtle {
|
|
457
|
-
color: var(--odx-color-foreground-subtle);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.odx-text-disabled {
|
|
461
|
-
color: var(--odx-color-foreground-disabled-rest);
|
|
502
|
+
.odx-text-strong {
|
|
503
|
+
font-weight: var(--odx-typography-font-weight-medium);
|
|
462
504
|
}
|
|
463
505
|
|
|
464
|
-
[class*="odx-title"], .odx-root :
|
|
506
|
+
[class*="odx-title"], .odx-root :where(h1, h2, h3, h4, h5, h6) {
|
|
465
507
|
text-wrap: balance;
|
|
466
|
-
|
|
508
|
+
font-family: var(--odx-typography-font-family-base);
|
|
467
509
|
font-weight: var(--odx-typography-font-weight-semibold);
|
|
468
|
-
display: block;
|
|
469
510
|
}
|
|
470
511
|
|
|
471
512
|
.odx-title {
|
|
@@ -528,78 +569,99 @@
|
|
|
528
569
|
font-size: var(--odx-typography-font-size-display-xl);
|
|
529
570
|
}
|
|
530
571
|
|
|
531
|
-
|
|
532
|
-
|
|
572
|
+
.odx-no-overflow {
|
|
573
|
+
text-overflow: ellipsis;
|
|
574
|
+
white-space: nowrap;
|
|
575
|
+
overflow: hidden;
|
|
533
576
|
}
|
|
534
577
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
line-height: var(--odx-typography-line-height-base);
|
|
578
|
+
:where() {
|
|
579
|
+
background-color: var(--odx-color-background-selection);
|
|
538
580
|
color: var(--odx-color-foreground-rest);
|
|
539
|
-
|
|
540
|
-
font-size: var(--odx-typography-font-size-base);
|
|
541
|
-
text-size-adjust: 100%;
|
|
542
|
-
-webkit-tap-highlight-color: transparent;
|
|
543
|
-
scrollbar-width: thin;
|
|
581
|
+
}
|
|
544
582
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
color: var(--odx-color-foreground-rest);
|
|
548
|
-
}
|
|
583
|
+
.odx-fg-rest {
|
|
584
|
+
color: var(--odx-color-foreground-rest);
|
|
549
585
|
}
|
|
550
586
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
height: 100%;
|
|
587
|
+
.odx-fg-body {
|
|
588
|
+
color: var(--odx-color-foreground-on);
|
|
589
|
+
}
|
|
555
590
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
591
|
+
.odx-fg-inverse {
|
|
592
|
+
color: var(--odx-color-foreground-inverse-rest);
|
|
593
|
+
}
|
|
559
594
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
padding: 0;
|
|
563
|
-
}
|
|
595
|
+
.odx-fg-inverse-static {
|
|
596
|
+
color: var(--odx-color-foreground-inverse-static);
|
|
564
597
|
}
|
|
565
|
-
}
|
|
566
598
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
text-overflow: ellipsis;
|
|
570
|
-
white-space: nowrap;
|
|
571
|
-
overflow: hidden;
|
|
599
|
+
.odx-fg-accent {
|
|
600
|
+
color: var(--odx-color-foreground-accent-rest);
|
|
572
601
|
}
|
|
573
602
|
|
|
574
|
-
.odx-
|
|
575
|
-
|
|
576
|
-
white-space: nowrap !important;
|
|
577
|
-
border: none !important;
|
|
578
|
-
width: 1px !important;
|
|
579
|
-
height: 1px !important;
|
|
580
|
-
padding: 0 !important;
|
|
581
|
-
position: absolute !important;
|
|
582
|
-
overflow: hidden !important;
|
|
603
|
+
.odx-fg-success {
|
|
604
|
+
color: var(--odx-color-foreground-success-rest);
|
|
583
605
|
}
|
|
584
606
|
|
|
585
|
-
.odx-
|
|
586
|
-
|
|
607
|
+
.odx-fg-danger {
|
|
608
|
+
color: var(--odx-color-foreground-danger-rest);
|
|
587
609
|
}
|
|
588
610
|
|
|
589
|
-
.odx-
|
|
590
|
-
|
|
611
|
+
.odx-fg-subtle {
|
|
612
|
+
color: var(--odx-color-foreground-subtle);
|
|
591
613
|
}
|
|
592
614
|
|
|
593
|
-
.odx-
|
|
594
|
-
|
|
615
|
+
.odx-fg-disabled {
|
|
616
|
+
color: var(--odx-color-foreground-disabled-rest);
|
|
595
617
|
}
|
|
596
618
|
|
|
597
|
-
.odx-
|
|
598
|
-
|
|
619
|
+
:is(.odx-bg-base, .odx-bg-content, .odx-bg-elevated):not(.odx-fg-disabled) {
|
|
620
|
+
color: var(--odx-color-foreground-rest);
|
|
599
621
|
}
|
|
600
622
|
|
|
601
|
-
.odx-
|
|
602
|
-
|
|
623
|
+
.odx-bg-base {
|
|
624
|
+
background-color: var(--odx-color-background-base);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.odx-bg-content {
|
|
628
|
+
background-color: var(--odx-color-background-level-1);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.odx-bg-elevated {
|
|
632
|
+
background-color: var(--odx-color-background-level-2);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.odx-bg-topmost {
|
|
636
|
+
background-color: var(--odx-color-background-level-3);
|
|
637
|
+
|
|
638
|
+
&:not(.odx-fg-disabled) {
|
|
639
|
+
color: var(--odx-color-foreground-inverse);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.odx-bg-brand {
|
|
644
|
+
background-color: var(--odx-color-background-brand);
|
|
645
|
+
color: var(--odx-color-foreground-inverse-static);
|
|
646
|
+
|
|
647
|
+
&.odx-fg-disabled, & .odx-fg-disabled {
|
|
648
|
+
color: var(--odx-color-foreground-disabled-on-brand);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.odx-bg-accent {
|
|
653
|
+
background-color: var(--odx-color-background-accent-rest);
|
|
654
|
+
color: var(--odx-color-foreground-inverse-static);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.odx-bg-danger {
|
|
658
|
+
background-color: var(--odx-color-background-danger-rest);
|
|
659
|
+
color: var(--odx-color-foreground-inverse-static);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.odx-bg-primary {
|
|
663
|
+
background-color: var(--odx-color-background-primary-rest);
|
|
664
|
+
color: var(--odx-color-foreground-inverse);
|
|
603
665
|
}
|
|
604
666
|
|
|
605
667
|
.odx-g-0 {
|
|
@@ -905,4 +967,103 @@
|
|
|
905
967
|
.odx-mb-lg {
|
|
906
968
|
margin-block-end: var(--odx-spacing-layout-lg);
|
|
907
969
|
}
|
|
970
|
+
|
|
971
|
+
[class*="odx-w-xs"] {
|
|
972
|
+
max-width: var(--odx-layout-width-xs);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.odx-w-xs-static {
|
|
976
|
+
width: var(--odx-layout-width-xs);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
[class*="odx-w-sm"] {
|
|
980
|
+
max-width: var(--odx-layout-width-sm);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.odx-w-sm-static {
|
|
984
|
+
width: var(--odx-layout-width-sm);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
[class*="odx-w-md"] {
|
|
988
|
+
max-width: var(--odx-layout-width-md);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.odx-w-md-static {
|
|
992
|
+
width: var(--odx-layout-width-md);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
[class*="odx-w-lg"] {
|
|
996
|
+
max-width: var(--odx-layout-width-lg);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
.odx-w-lg-static {
|
|
1000
|
+
width: var(--odx-layout-width-lg);
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
[class*="odx-w-xl"] {
|
|
1004
|
+
max-width: var(--odx-layout-width-xl);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
.odx-w-xl-static {
|
|
1008
|
+
width: var(--odx-layout-width-xl);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
[class*="odx-w-full"] {
|
|
1012
|
+
max-width: 100%;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.odx-w-full-static {
|
|
1016
|
+
width: 100%;
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
@layer odx-theme, odx-overrides;
|
|
1021
|
+
|
|
1022
|
+
.odx-slot-placeholder-sm, .odx-slot-placeholder {
|
|
1023
|
+
background-color: var(--odx-color-background-accent-subtle);
|
|
1024
|
+
padding: var(--odx-spacing-layout-sm) var(--odx-spacing-layout-lg);
|
|
1025
|
+
height: 100%;
|
|
1026
|
+
min-height: var(--odx-control-height-md);
|
|
1027
|
+
text-align: center;
|
|
1028
|
+
text-overflow: ellipsis;
|
|
1029
|
+
pointer-events: none;
|
|
1030
|
+
user-select: none;
|
|
1031
|
+
flex: 1;
|
|
1032
|
+
place-content: center;
|
|
1033
|
+
overflow: hidden;
|
|
1034
|
+
|
|
1035
|
+
&:before, &:after {
|
|
1036
|
+
display: block;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
&:before {
|
|
1040
|
+
text-transform: capitalize;
|
|
1041
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
1042
|
+
font-weight: var(--odx-typography-font-weight-medium);
|
|
1043
|
+
content: attr(slot, "default") " slot";
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
&:after {
|
|
1047
|
+
line-height: var(--odx-typography-line-height-text-xs);
|
|
1048
|
+
color: var(--odx-color-foreground-subtle);
|
|
1049
|
+
font-size: var(--odx-typography-font-size-text-xs);
|
|
1050
|
+
content: "This is a placeholder. A Replace with your own content";
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.odx-slot-placeholder-sm {
|
|
1055
|
+
padding: var(--odx-spacing-12) var(--odx-spacing-layout-sm);
|
|
1056
|
+
min-height: var(--odx-control-addon-size-md);
|
|
1057
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
1058
|
+
|
|
1059
|
+
&:after {
|
|
1060
|
+
display: none;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
:root {
|
|
1065
|
+
--odx-layout-width-page-min: 340px;
|
|
1066
|
+
--odx-layout-width-page-default: 1440px;
|
|
1067
|
+
--odx-layout-width-page-narrow: 1200px;
|
|
1068
|
+
--odx-layout-width-page-wide: 1800px;
|
|
908
1069
|
}
|
package/package.json
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"name": "@odx/foundation",
|
|
3
3
|
"displayName": "ODX Design System Foundation",
|
|
4
4
|
"description": "The design foundation of the ODX Design System, providing base styles and utilities",
|
|
5
|
-
"version": "1.0.0-rc.
|
|
5
|
+
"version": "1.0.0-rc.5",
|
|
6
6
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
8
8
|
"homepage": "https://odx.draeger.com",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
+
"types",
|
|
11
12
|
"CHANGELOG.md",
|
|
12
13
|
"LICENSE",
|
|
13
14
|
"!dist/**/*.map"
|
|
@@ -21,8 +22,8 @@
|
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@tsdown/css": "0.22.0",
|
|
24
|
-
"lit": "3.3.
|
|
25
|
-
"stylelint": "17.11.
|
|
25
|
+
"lit": "3.3.3",
|
|
26
|
+
"stylelint": "17.11.1",
|
|
26
27
|
"tsdown": "0.22.0",
|
|
27
28
|
"@odx-internal/config-stylelint": "0.0.0",
|
|
28
29
|
"@odx-internal/utils-storybook": "0.0.0"
|
|
@@ -39,7 +40,10 @@
|
|
|
39
40
|
"import": "./dist/main.js",
|
|
40
41
|
"types": "./dist/main.d.ts"
|
|
41
42
|
},
|
|
42
|
-
"./styles":
|
|
43
|
+
"./styles": {
|
|
44
|
+
"import": "./dist/styles.css",
|
|
45
|
+
"types": "./types/styles.d.ts"
|
|
46
|
+
}
|
|
43
47
|
},
|
|
44
48
|
"publishConfig": {
|
|
45
49
|
"access": "public",
|