@odx/foundation 1.0.0-rc.5 → 1.0.0-rc.6
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 +15 -0
- package/README.md +3 -1
- package/dist/lib/breakpoints.d.ts +0 -3
- package/dist/lib/breakpoints.js +0 -2
- package/dist/lib/format.d.ts +0 -3
- package/dist/lib/format.js +0 -2
- package/dist/lib/localization.d.ts +0 -3
- package/dist/lib/localization.js +0 -2
- package/dist/lib/models.d.ts +0 -2
- package/dist/lib/signals.d.ts +0 -3
- package/dist/lib/signals.js +0 -2
- package/dist/lib/theming.d.ts +0 -3
- package/dist/lib/theming.js +0 -2
- package/dist/lib/utils/shared-media-observer.js +0 -2
- package/dist/styles.css +177 -173
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.0.0-rc.6
|
|
2
|
+
|
|
3
|
+
### Minor Changes
|
|
4
|
+
|
|
5
|
+
- Rename CSS layers to remove dot notation:
|
|
6
|
+
- `odx.reset` to `odx-reset`
|
|
7
|
+
- `odx.base` to `odx-base`
|
|
8
|
+
- `odx.overrides` to `odx-overrides`
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- Remove debug info from rolldown build output
|
|
13
|
+
- Fix `.odx-cloak` if applied to `:root` element not working correctly
|
|
14
|
+
|
|
1
15
|
## 1.0.0-rc.5
|
|
2
16
|
|
|
3
17
|
### Major Changes
|
|
@@ -8,6 +22,7 @@
|
|
|
8
22
|
|
|
9
23
|
- 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
24
|
- Support `:visited` state for native links and anchors with `odx-link` class for better user experience
|
|
25
|
+
- Improve tabbable element detection
|
|
11
26
|
|
|
12
27
|
## 1.0.0-rc.4
|
|
13
28
|
|
package/README.md
CHANGED
|
@@ -96,6 +96,8 @@ This class will temporarily hide the content of the `.odx-root` element until cu
|
|
|
96
96
|
</html>
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
+
> The timeout can be set via the `--odx-cloak-timeout` custom property on the `:root` element, which defaults to `2s`.
|
|
100
|
+
|
|
99
101
|
### Documentation
|
|
100
102
|
|
|
101
|
-
For detailed documentation on how to use the `@odx/foundation` package,
|
|
103
|
+
For detailed documentation on how to use the `@odx/foundation` package, please visit our <a href="https://ca-odx-storybook-dev.yellowisland-7b13f2d7.westeurope.azurecontainerapps.io/" target="_blank" rel="noopener">storybook documentation</a>.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Signal } from "./signals.js";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/breakpoints.d.ts
|
|
4
2
|
declare global {
|
|
5
3
|
namespace ODX.Breakpoints {
|
|
6
4
|
interface Config {
|
|
@@ -57,5 +55,4 @@ declare function setupBreakpoints(breakpointsConfig?: BreakpointConfig[]): () =>
|
|
|
57
55
|
declare function createBreakpointUpdater(breakpoints: Breakpoint[], update?: (target: HTMLElement, change: Breakpoint & {
|
|
58
56
|
matches: boolean;
|
|
59
57
|
}) => void): () => void;
|
|
60
|
-
//#endregion
|
|
61
58
|
export { Breakpoint, BreakpointConfig, BreakpointOperator, breakpointAttribute, buildBreakpoint, createBreakpointUpdater, defaultBreakpoints, expandBreakpoints, observeBreakpoint, registeredBreakpoints, setupBreakpoints };
|
package/dist/lib/breakpoints.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { effect, signal } from "./signals.js";
|
|
2
2
|
import { observeMedia } from "./utils/shared-media-observer.js";
|
|
3
|
-
//#region src/lib/breakpoints.ts
|
|
4
3
|
const operators = [
|
|
5
4
|
"<",
|
|
6
5
|
"<=",
|
|
@@ -154,5 +153,4 @@ function createBreakpointUpdater(breakpoints, update) {
|
|
|
154
153
|
}
|
|
155
154
|
};
|
|
156
155
|
}
|
|
157
|
-
//#endregion
|
|
158
156
|
export { breakpointAttribute, buildBreakpoint, createBreakpointUpdater, defaultBreakpoints, expandBreakpoints, observeBreakpoint, registeredBreakpoints, setupBreakpoints };
|
package/dist/lib/format.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { UnitIdentifier } from "./models.js";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/format.d.ts
|
|
4
2
|
interface FormatOptions {
|
|
5
3
|
dateTimeFormatOptions?: DateTimeFormatOptions;
|
|
6
4
|
numberFormatOptions?: NumberFormatOptions;
|
|
@@ -56,5 +54,4 @@ interface RelativeTimeFormatOptions extends Intl.RelativeTimeFormatOptions, Base
|
|
|
56
54
|
start?: number | string | Date;
|
|
57
55
|
}
|
|
58
56
|
declare function formatRelativeTime(input: number | string | Date, options?: RelativeTimeFormatOptions): string;
|
|
59
|
-
//#endregion
|
|
60
57
|
export { DateTimeFormatOptions, FormatOptions, ListFormatOptions, NumberFormatOptions, RelativeTimeFormatOptions, formatDate, formatList, formatNumber, formatRelativeTime, parseDate };
|
package/dist/lib/format.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/format.ts
|
|
2
1
|
function parseDate(value) {
|
|
3
2
|
const createDate = (value) => Number.isNaN(value) ? null : new Date(value);
|
|
4
3
|
if (value instanceof Date) return createDate(value.getTime());
|
|
@@ -62,5 +61,4 @@ function formatRelativeTime(input, options) {
|
|
|
62
61
|
const [unit, unitConfig] = Object.entries(TIME_UNIT_MAP).find(([_, { value, max }]) => Math.abs(relativeTime) < max && minUnit.value <= value);
|
|
63
62
|
return new Intl.RelativeTimeFormat(options?.locale, options).format(Math.round(relativeTime / unitConfig.value), unit);
|
|
64
63
|
}
|
|
65
|
-
//#endregion
|
|
66
64
|
export { formatDate, formatList, formatNumber, formatRelativeTime, parseDate };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { FormatOptions } from "./format.js";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/localization.d.ts
|
|
4
2
|
interface LocalizationOptions extends FormatOptions {
|
|
5
3
|
defaultLocale: () => Intl.Locale | Intl.UnicodeBCP47LocaleIdentifier;
|
|
6
4
|
fallbackLanguage: () => Intl.UnicodeBCP47LocaleIdentifier;
|
|
@@ -11,5 +9,4 @@ declare function setLocalizationOptions(options?: Partial<LocalizationOptions> |
|
|
|
11
9
|
declare function getLocalizationOptions(options?: Partial<LocalizationOptions> | null): LocalizationOptions;
|
|
12
10
|
declare function getLocale(localeInput?: Intl.Locale | Intl.UnicodeBCP47LocaleIdentifier | null): Intl.Locale;
|
|
13
11
|
declare function setLocale(localeInput?: Intl.Locale | Intl.UnicodeBCP47LocaleIdentifier | null): void;
|
|
14
|
-
//#endregion
|
|
15
12
|
export { LocalizationOptions, getLocale, getLocalizationOptions, setLocale, setLocalizationOptions };
|
package/dist/lib/localization.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { sharedSignal } from "./signals.js";
|
|
2
|
-
//#region src/lib/localization.ts
|
|
3
2
|
const locale = sharedSignal("locale", null);
|
|
4
3
|
const localizationOptions = sharedSignal("localizationOptions", null);
|
|
5
4
|
const LocalizationOptions = (config) => ({
|
|
@@ -24,5 +23,4 @@ function getLocale(localeInput) {
|
|
|
24
23
|
function setLocale(localeInput) {
|
|
25
24
|
locale.set(localeInput ? getLocale(localeInput) : null);
|
|
26
25
|
}
|
|
27
|
-
//#endregion
|
|
28
26
|
export { LocalizationOptions, getLocale, getLocalizationOptions, setLocale, setLocalizationOptions };
|
package/dist/lib/models.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
//#region src/lib/models.d.ts
|
|
2
1
|
type UnitIdentifier = SingleUnitIdentifier | `${SingleUnitIdentifier}-per-${SingleUnitIdentifier}` | (string & {});
|
|
3
2
|
type SingleUnitIdentifier = 'acre' | 'bit' | 'byte' | 'celsius' | 'centimeter' | 'day' | 'degree' | 'fahrenheit' | 'fluid-ounce' | 'foot' | 'gallon' | 'gigabit' | 'gigabyte' | 'gram' | 'hectare' | 'hour' | 'inch' | 'kilobit' | 'kilobyte' | 'kilogram' | 'kilometer' | 'liter' | 'megabit' | 'megabyte' | 'meter' | 'microsecond' | 'mile' | 'mile-scandinavian' | 'milliliter' | 'millimeter' | 'millisecond' | 'minute' | 'month' | 'nanosecond' | 'ounce' | 'percent' | 'petabyte' | 'pound' | 'second' | 'stone' | 'terabit' | 'terabyte' | 'week' | 'yard' | 'year';
|
|
4
|
-
//#endregion
|
|
5
3
|
export { UnitIdentifier };
|
package/dist/lib/signals.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Signal } from "signal-polyfill";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/signals.d.ts
|
|
4
2
|
type Signal$1<T> = Signal.State<T> & {
|
|
5
3
|
update: (updateFn: (value: T) => T) => void;
|
|
6
4
|
};
|
|
@@ -19,5 +17,4 @@ declare function effect(callback: (() => void) | (() => () => void)): () => void
|
|
|
19
17
|
declare global {
|
|
20
18
|
var __ODX_SHARED_SIGNALS__: Record<string, unknown>;
|
|
21
19
|
}
|
|
22
|
-
//#endregion
|
|
23
20
|
export { ReadonlySignal, Signal$1 as Signal, SignalOptions, computed, effect, sharedSignal, signal };
|
package/dist/lib/signals.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Signal } from "signal-polyfill";
|
|
2
|
-
//#region src/lib/signals.ts
|
|
3
2
|
function transformOptions(options) {
|
|
4
3
|
if (!options) return;
|
|
5
4
|
return {
|
|
@@ -48,5 +47,4 @@ function effect(callback) {
|
|
|
48
47
|
};
|
|
49
48
|
}
|
|
50
49
|
globalThis.__ODX_SHARED_SIGNALS__ ||= {};
|
|
51
|
-
//#endregion
|
|
52
50
|
export { computed, effect, sharedSignal, signal };
|
package/dist/lib/theming.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ThemeConfig } from "@odx/design-tokens";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/theming.d.ts
|
|
4
2
|
declare global {
|
|
5
3
|
var __ODX_THEME_ROOT__: HTMLElement;
|
|
6
4
|
}
|
|
@@ -15,5 +13,4 @@ interface AttachDarkModeToggleOptions<T extends HTMLElement> {
|
|
|
15
13
|
root?: HTMLElement;
|
|
16
14
|
}
|
|
17
15
|
declare function attachDarkModeToggle<T extends HTMLElement>(host: T, options?: AttachDarkModeToggleOptions<T>): () => void;
|
|
18
|
-
//#endregion
|
|
19
16
|
export { AttachDarkModeToggleOptions, attachDarkModeToggle, darkModeIcon, isDarkModeEnabled, lightModeIcon, setTheme$1 as setTheme, toggleDarkMode, userPrefersDarkMode };
|
package/dist/lib/theming.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { effect, sharedSignal } from "./signals.js";
|
|
2
2
|
import { darkModeClass, lightModeClass, setTheme } from "@odx/design-tokens";
|
|
3
|
-
//#region src/lib/theming.ts
|
|
4
3
|
const { matches: userPrefersDarkMode = false } = globalThis.matchMedia?.("(prefers-color-scheme: dark)") ?? {};
|
|
5
4
|
const darkModeIcon = "core::night-mode";
|
|
6
5
|
const lightModeIcon = "core::brightness";
|
|
@@ -30,5 +29,4 @@ function attachDarkModeToggle(host, options = {}) {
|
|
|
30
29
|
options.update?.(host, darkModeEnabled, icon);
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
|
-
//#endregion
|
|
34
32
|
export { attachDarkModeToggle, darkModeIcon, isDarkModeEnabled, lightModeIcon, setTheme$1 as setTheme, toggleDarkMode, userPrefersDarkMode };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/utils/shared-media-observer.ts
|
|
2
1
|
const mediaQueryRegistry = /* @__PURE__ */ new Map();
|
|
3
2
|
const eventListenerRegistry = /* @__PURE__ */ new Map();
|
|
4
3
|
function handleMediaChange(event) {
|
|
@@ -37,5 +36,4 @@ function unobserveMedia(query, listener) {
|
|
|
37
36
|
mediaQueryList.removeEventListener("change", handleMediaChange);
|
|
38
37
|
mediaQueryRegistry.delete(query);
|
|
39
38
|
}
|
|
40
|
-
//#endregion
|
|
41
39
|
export { observeMedia };
|
package/dist/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer odx-
|
|
1
|
+
@layer odx-reset {
|
|
2
2
|
.odx-root {
|
|
3
3
|
&, & *, & :before, & :after {
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -60,7 +60,9 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
}
|
|
63
64
|
|
|
65
|
+
@layer odx-base {
|
|
64
66
|
.odx-link, .odx-root a {
|
|
65
67
|
transition: var(--odx-motion-transition-reduced);
|
|
66
68
|
overflow: inherit;
|
|
@@ -141,179 +143,12 @@
|
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
--
|
|
146
|
-
border-collapse: collapse;
|
|
147
|
-
background-color: #0000;
|
|
148
|
-
width: 100%;
|
|
149
|
-
max-width: 100%;
|
|
150
|
-
|
|
151
|
-
& caption {
|
|
152
|
-
line-height: var(--odx-typography-line-height-text-sm);
|
|
153
|
-
font-size: var(--odx-typography-font-size-text-sm);
|
|
154
|
-
font-weight: var(--odx-typography-font-weight-semibold);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
& thead {
|
|
158
|
-
background-color: inherit;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
& tr {
|
|
162
|
-
transition: var(--odx-motion-transition-reduced);
|
|
163
|
-
background-color: var(--odx-color-background-transparent);
|
|
164
|
-
transition-property: background-color, color;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
& tr:has(td):hover {
|
|
168
|
-
background-color: var(--odx-color-background-transparent-hover);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
& th, & td {
|
|
172
|
-
padding: var(--odx-control-spacing-md) var(--odx-control-spacing-inline-md);
|
|
173
|
-
min-height: var(--odx-size-250);
|
|
174
|
-
text-align: start;
|
|
175
|
-
font-size: inherit;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
& th {
|
|
179
|
-
border-bottom: var(--odx-border-width-thin) solid var(--odx-color-stroke-neutral-subtle);
|
|
180
|
-
vertical-align: top;
|
|
181
|
-
font-weight: var(--odx-typography-font-weight-medium);
|
|
182
|
-
cursor: default;
|
|
183
|
-
user-select: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
& td {
|
|
187
|
-
height: var(--cell-size);
|
|
188
|
-
vertical-align: middle;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
& tr:not(:last-child) td {
|
|
192
|
-
border-bottom: var(--odx-border-width-thin) solid var(--odx-color-stroke-neutral-subtle);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
& th :is(odx-input, odx-select) {
|
|
196
|
-
margin-inline: var(--odx-spacing-negative-50);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.odx-content {
|
|
201
|
-
--_content-spacing-sm: var(--odx-spacing-layout-sm);
|
|
202
|
-
--_content-spacing-md: var(--odx-spacing-layout-md);
|
|
203
|
-
--_content-spacing-lg: var(--odx-spacing-layout-lg);
|
|
204
|
-
line-height: var(--odx-typography-line-height-text-md);
|
|
205
|
-
|
|
206
|
-
& table, & ul, & ol, & dl, & blockquote, & pre, & figure, & video, & embed, & iframe {
|
|
207
|
-
margin: var(--_content-spacing-md) 0;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
& :is(odx-key-value-list, odx-list) {
|
|
211
|
-
margin-block: var(--_content-spacing-md);
|
|
212
|
-
|
|
213
|
-
& :is(odx-key-value-list, odx-list) {
|
|
214
|
-
margin-block: 0;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
& > :is(odx-text, .odx-text), & li > :is(ul, ol, dl), & p, & li {
|
|
219
|
-
margin: var(--_content-spacing-sm) 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
& :is(odx-text, .odx-text), & p {
|
|
223
|
-
&:first-child {
|
|
224
|
-
margin-block-start: 0;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
& > :is(odx-title, [class*="odx-title"]), & h1, & h2, & h3, & h4, & h5, & h6 {
|
|
229
|
-
margin-block: var(--_content-spacing-lg) var(--_content-spacing-sm);
|
|
230
|
-
|
|
231
|
-
&:first-child {
|
|
232
|
-
margin-block-start: var(--_content-spacing-sm);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
& table, & ul, & ol, & dl, & blockquote {
|
|
237
|
-
padding-inline-start: var(--odx-spacing-150);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
& code, & pre, & mark {
|
|
241
|
-
border-radius: var(--odx-border-radius-sm);
|
|
242
|
-
padding: 0 var(--odx-spacing-12);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
& code, & pre {
|
|
246
|
-
background-color: var(--odx-color-background-control-rest);
|
|
247
|
-
font-size: var(--odx-typography-font-size-text-sm);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
& blockquote {
|
|
251
|
-
padding-inline-end: var(--odx-spacing-150);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
& dt {
|
|
255
|
-
font-weight: var(--odx-typography-font-weight-medium);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
& a {
|
|
259
|
-
text-decoration: underline;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
& del {
|
|
263
|
-
color: var(--odx-color-foreground-danger-rest);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
& figure {
|
|
267
|
-
flex-direction: column;
|
|
268
|
-
display: flex;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
& figcaption {
|
|
272
|
-
padding: var(--_content-spacing-sm);
|
|
273
|
-
line-height: var(--odx-typography-line-height-text-sm);
|
|
274
|
-
font-size: var(--odx-typography-font-size-text-sm);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
& ins {
|
|
278
|
-
color: var(--odx-color-foreground-success-rest);
|
|
279
|
-
text-decoration: none;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
& mark {
|
|
283
|
-
background-color: var(--odx-color-background-selection);
|
|
284
|
-
color: var(--odx-color-foreground-rest);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
& pre {
|
|
288
|
-
padding: var(--odx-control-spacing-md) calc(2 * var(--odx-control-spacing-inline-md));
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
& small {
|
|
292
|
-
font-size: var(--odx-typography-font-size-text-sm);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
& var {
|
|
296
|
-
font-weight: var(--odx-typography-font-weight-medium);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.odx-content-sm {
|
|
301
|
-
--_content-spacing-md: var(--odx-spacing-layout-sm);
|
|
302
|
-
--_content-spacing-lg: var(--odx-spacing-layout-md);
|
|
303
|
-
line-height: var(--odx-typography-line-height-text-sm);
|
|
304
|
-
font-size: var(--odx-typography-font-size-text-sm);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.odx-content-box {
|
|
308
|
-
background-color: var(--odx-color-background-level-1);
|
|
309
|
-
padding: var(--odx-spacing-layout-lg);
|
|
310
|
-
border-radius: 0;
|
|
146
|
+
:root {
|
|
147
|
+
--odx-cloak-timeout: 2s;
|
|
311
148
|
}
|
|
312
|
-
}
|
|
313
149
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
animation: 2s step-end odx-cloak-hide;
|
|
150
|
+
.odx-cloak:has(:not(:defined)) > * {
|
|
151
|
+
animation: var(--odx-cloak-timeout) step-end odx-cloak-hide;
|
|
317
152
|
}
|
|
318
153
|
|
|
319
154
|
@keyframes odx-cloak-hide {
|
|
@@ -1015,9 +850,178 @@
|
|
|
1015
850
|
.odx-w-full-static {
|
|
1016
851
|
width: 100%;
|
|
1017
852
|
}
|
|
853
|
+
|
|
854
|
+
.odx-content :where(table), .odx-table {
|
|
855
|
+
--cell-size: var(--odx-size-300);
|
|
856
|
+
border-collapse: collapse;
|
|
857
|
+
background-color: #0000;
|
|
858
|
+
width: 100%;
|
|
859
|
+
max-width: 100%;
|
|
860
|
+
|
|
861
|
+
& caption {
|
|
862
|
+
line-height: var(--odx-typography-line-height-text-sm);
|
|
863
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
864
|
+
font-weight: var(--odx-typography-font-weight-semibold);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
& thead {
|
|
868
|
+
background-color: inherit;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
& tr {
|
|
872
|
+
transition: var(--odx-motion-transition-reduced);
|
|
873
|
+
background-color: var(--odx-color-background-transparent);
|
|
874
|
+
transition-property: background-color, color;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
& tr:has(td):hover {
|
|
878
|
+
background-color: var(--odx-color-background-transparent-hover);
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
& th, & td {
|
|
882
|
+
padding: var(--odx-control-spacing-md) var(--odx-control-spacing-inline-md);
|
|
883
|
+
min-height: var(--odx-size-250);
|
|
884
|
+
text-align: start;
|
|
885
|
+
font-size: inherit;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
& th {
|
|
889
|
+
border-bottom: var(--odx-border-width-thin) solid var(--odx-color-stroke-neutral-subtle);
|
|
890
|
+
vertical-align: top;
|
|
891
|
+
font-weight: var(--odx-typography-font-weight-medium);
|
|
892
|
+
cursor: default;
|
|
893
|
+
user-select: none;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
& td {
|
|
897
|
+
height: var(--cell-size);
|
|
898
|
+
vertical-align: middle;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
& tr:not(:last-child) td {
|
|
902
|
+
border-bottom: var(--odx-border-width-thin) solid var(--odx-color-stroke-neutral-subtle);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
& th :is(odx-input, odx-select) {
|
|
906
|
+
margin-inline: var(--odx-spacing-negative-50);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.odx-content {
|
|
911
|
+
--_content-spacing-sm: var(--odx-spacing-layout-sm);
|
|
912
|
+
--_content-spacing-md: var(--odx-spacing-layout-md);
|
|
913
|
+
--_content-spacing-lg: var(--odx-spacing-layout-lg);
|
|
914
|
+
line-height: var(--odx-typography-line-height-text-md);
|
|
915
|
+
|
|
916
|
+
& table, & ul, & ol, & dl, & blockquote, & pre, & figure, & video, & embed, & iframe {
|
|
917
|
+
margin: var(--_content-spacing-md) 0;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
& :is(odx-key-value-list, odx-list) {
|
|
921
|
+
margin-block: var(--_content-spacing-md);
|
|
922
|
+
|
|
923
|
+
& :is(odx-key-value-list, odx-list) {
|
|
924
|
+
margin-block: 0;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
& > :is(odx-text, .odx-text), & li > :is(ul, ol, dl), & p, & li {
|
|
929
|
+
margin: var(--_content-spacing-sm) 0;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
& :is(odx-text, .odx-text), & p {
|
|
933
|
+
&:first-child {
|
|
934
|
+
margin-block-start: 0;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
& > :is(odx-title, [class*="odx-title"]), & h1, & h2, & h3, & h4, & h5, & h6 {
|
|
939
|
+
margin-block: var(--_content-spacing-lg) var(--_content-spacing-sm);
|
|
940
|
+
|
|
941
|
+
&:first-child {
|
|
942
|
+
margin-block-start: var(--_content-spacing-sm);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
& table, & ul, & ol, & dl, & blockquote {
|
|
947
|
+
padding-inline-start: var(--odx-spacing-150);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
& code, & pre, & mark {
|
|
951
|
+
border-radius: var(--odx-border-radius-sm);
|
|
952
|
+
padding: 0 var(--odx-spacing-12);
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
& code, & pre {
|
|
956
|
+
background-color: var(--odx-color-background-control-rest);
|
|
957
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
& blockquote {
|
|
961
|
+
padding-inline-end: var(--odx-spacing-150);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
& dt {
|
|
965
|
+
font-weight: var(--odx-typography-font-weight-medium);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
& a {
|
|
969
|
+
text-decoration: underline;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
& del {
|
|
973
|
+
color: var(--odx-color-foreground-danger-rest);
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
& figure {
|
|
977
|
+
flex-direction: column;
|
|
978
|
+
display: flex;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
& figcaption {
|
|
982
|
+
padding: var(--_content-spacing-sm);
|
|
983
|
+
line-height: var(--odx-typography-line-height-text-sm);
|
|
984
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
& ins {
|
|
988
|
+
color: var(--odx-color-foreground-success-rest);
|
|
989
|
+
text-decoration: none;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
& mark {
|
|
993
|
+
background-color: var(--odx-color-background-selection);
|
|
994
|
+
color: var(--odx-color-foreground-rest);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
& pre {
|
|
998
|
+
padding: var(--odx-control-spacing-md) calc(2 * var(--odx-control-spacing-inline-md));
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
& small {
|
|
1002
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
& var {
|
|
1006
|
+
font-weight: var(--odx-typography-font-weight-medium);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
.odx-content-sm {
|
|
1011
|
+
--_content-spacing-md: var(--odx-spacing-layout-sm);
|
|
1012
|
+
--_content-spacing-lg: var(--odx-spacing-layout-md);
|
|
1013
|
+
line-height: var(--odx-typography-line-height-text-sm);
|
|
1014
|
+
font-size: var(--odx-typography-font-size-text-sm);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.odx-content-box {
|
|
1018
|
+
background-color: var(--odx-color-background-level-1);
|
|
1019
|
+
padding: var(--odx-spacing-layout-lg);
|
|
1020
|
+
border-radius: 0;
|
|
1021
|
+
}
|
|
1018
1022
|
}
|
|
1019
1023
|
|
|
1020
|
-
@layer odx-
|
|
1024
|
+
@layer odx-overrides;
|
|
1021
1025
|
|
|
1022
1026
|
.odx-slot-placeholder-sm, .odx-slot-placeholder {
|
|
1023
1027
|
background-color: var(--odx-color-background-accent-subtle);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.6",
|
|
6
6
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
8
8
|
"homepage": "https://odx.draeger.com",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"dist",
|
|
11
11
|
"types",
|
|
12
12
|
"CHANGELOG.md",
|
|
13
|
-
"LICENSE",
|
|
14
13
|
"!dist/**/*.map"
|
|
15
14
|
],
|
|
16
15
|
"type": "module",
|