lutra 0.1.68 → 0.1.69

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 (72) hide show
  1. package/dist/components/AspectRatio.svelte +19 -9
  2. package/dist/components/AspectRatio.svelte.d.ts +2 -1
  3. package/dist/components/Avatar.svelte +5 -8
  4. package/dist/components/Close.svelte +24 -27
  5. package/dist/components/Close.svelte.d.ts +2 -0
  6. package/dist/components/ContextTip.svelte +3 -2
  7. package/dist/components/Dialog.svelte +38 -0
  8. package/dist/components/Icon.svelte +2 -2
  9. package/dist/components/IconButton.svelte +10 -22
  10. package/dist/components/Image.svelte +2 -2
  11. package/dist/components/Indicator.svelte +2 -1
  12. package/dist/components/Inset.svelte +13 -0
  13. package/dist/components/Layout.svelte +7 -3
  14. package/dist/components/Layout.svelte.d.ts +3 -2
  15. package/dist/components/MenuDropdown.svelte +12 -2
  16. package/dist/components/MenuItem.svelte +30 -14
  17. package/dist/components/MenuItem.svelte.d.ts +6 -0
  18. package/dist/components/Modal.svelte +36 -20
  19. package/dist/components/Popover.svelte +39 -12
  20. package/dist/components/TabbedContent.svelte +1 -1
  21. package/dist/components/TabbedContentItem.svelte +14 -0
  22. package/dist/components/TabbedContentItem.svelte.d.ts +4 -0
  23. package/dist/components/Table.svelte +69 -0
  24. package/dist/components/Table.svelte.d.ts +7 -0
  25. package/dist/components/Tabs.svelte +44 -36
  26. package/dist/components/Tag.svelte +53 -13
  27. package/dist/components/Tag.svelte.d.ts +4 -0
  28. package/dist/components/Theme.svelte +121 -94
  29. package/dist/components/Theme.svelte.d.ts +7 -6
  30. package/dist/components/Toast.svelte +11 -8
  31. package/dist/components/Tooltip.svelte +17 -10
  32. package/dist/css/1-props.css +64 -51
  33. package/dist/css/2-init.css +503 -0
  34. package/dist/css/{2-base.css → 3-base.css} +42 -131
  35. package/dist/css/{3-typo.css → 4-typo.css} +3 -1
  36. package/dist/css/lutra.css +7 -6
  37. package/dist/css/themes/DefaultTheme.css +16 -4
  38. package/dist/form/Button.svelte +20 -0
  39. package/dist/form/Button.svelte.d.ts +9 -0
  40. package/dist/form/Datepicker.svelte +13 -0
  41. package/dist/form/Datepicker.svelte.d.ts +3 -0
  42. package/dist/form/FieldContent.svelte +18 -9
  43. package/dist/form/FieldError.svelte +1 -1
  44. package/dist/form/Fieldset.svelte +19 -11
  45. package/dist/form/Form.svelte +137 -63
  46. package/dist/form/Form.svelte.d.ts +21 -0
  47. package/dist/form/FormActions.svelte +21 -3
  48. package/dist/form/FormActions.svelte.d.ts +3 -0
  49. package/dist/form/FormSection.svelte +22 -20
  50. package/dist/form/ImageUpload.svelte +50 -30
  51. package/dist/form/ImageUpload.svelte.d.ts +14 -0
  52. package/dist/form/Input.svelte +62 -30
  53. package/dist/form/Input.svelte.d.ts +0 -1
  54. package/dist/form/InputLength.svelte +5 -5
  55. package/dist/form/Label.svelte +6 -6
  56. package/dist/form/LogoUpload.svelte +24 -10
  57. package/dist/form/Select.svelte +23 -10
  58. package/dist/form/Select.svelte.d.ts +6 -6
  59. package/dist/form/Textarea.svelte +11 -1
  60. package/dist/form/client.svelte.js +0 -2
  61. package/dist/state/Persisted.svelte.d.ts +6 -0
  62. package/dist/state/Persisted.svelte.js +29 -0
  63. package/dist/state/theme.svelte.d.ts +7 -0
  64. package/dist/state/theme.svelte.js +14 -0
  65. package/dist/types.d.ts +6 -23
  66. package/dist/types.js +0 -17
  67. package/dist/util/color.js +2 -2
  68. package/package.json +5 -4
  69. package/dist/config.d.ts +0 -30
  70. package/dist/config.js +0 -18
  71. /package/dist/css/{4-layout.css → 5-layout.css} +0 -0
  72. /package/dist/css/{5-media.css → 6-media.css} +0 -0
@@ -1,104 +1,131 @@
1
1
  <script lang="ts">
2
- import { browser } from "$app/environment";
3
- import { onMount, setContext, type Snippet } from "svelte";
4
- import { defaultConfig, type LutraConfig, type LutraRootConfig } from "../config.js";
5
- import { getContextItem, LutraContext, type LutraTheme } from "../types.js";
6
-
7
- /**
8
- * @description
9
- * A theme component. It is used to set the theme of the app in the root of the layout. You can also use it to set the theme of a specific section of the app.
10
- */
11
-
12
- // Destructuring props with default values
13
- let {
14
- theme,
15
- config,
16
- children
17
- }: {
18
- /**
19
- * The theme to use. Leave undefined to use the system theme.
20
- */
21
- theme?: LutraTheme;
22
- /**
23
- * Lutra config. Leave undefined to use the default config.
24
- */
25
- config?: LutraRootConfig;
26
- children: Snippet
27
- } = $props();
28
-
29
- // Determine if this is the root theme context
30
- const root = getContextItem(LutraContext.Theme) === undefined;
31
-
32
- // Retrieve existing configuration from context if available
33
- const existingConfig = getContextItem(LutraContext.Config);
34
-
35
- let _theme = $state(theme);
36
-
37
- // If no config is provided, use the existing one from context or default to the defaultConfig
38
- if(!config) {
39
- config = existingConfig || defaultConfig;
40
- }
41
-
42
- // Set the configuration in the context for child components to access
43
- setContext(LutraContext.Config, config);
44
-
45
- // Retrieve existing theme from context if available
46
- let existingTheme = getContextItem(LutraContext.Theme);
47
-
48
- function getTheme() {
49
- if(browser) {
50
- return localStorage.getItem('lutra.theme') || (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light';
51
- }
52
- // TODO: Implement Sec-CH-Prefers-Color-Scheme header getting from context
53
- return getContextItem(LutraContext.SecChPrefersColorScheme) || 'light';
54
- }
55
-
56
- // If no theme is provided, determine it from localStorage or system preferences
57
- if(!theme) {
58
- _theme = existingTheme || getTheme();
59
- } else if(theme === 'invert') {
60
- _theme = (existingTheme || getTheme()) === 'light' ? 'dark' : 'light';
61
- }
62
-
63
- onMount(() => {
64
- const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
65
- mediaQuery.addEventListener('change', (e) => {
66
- if(browser && root && !theme && !existingTheme && !localStorage.getItem('lutra.theme')) {
67
- _theme = e.matches ? 'dark' : 'light';
68
- } else if(root && theme === "invert") {
69
- _theme = existingTheme === 'light' ? 'dark' : 'light';
70
- } else if(root && !theme) {
71
- _theme = existingTheme || getTheme();
72
- }
73
- });
74
- });
75
-
76
- // Set the theme in the context for child components to access
77
- setContext(LutraContext.Theme, theme);
2
+ import { BROWSER } from 'esm-env';
3
+ import { setContext, type Snippet } from "svelte";
4
+ import { getContextItem, LutraContext, type LutraTheme } from "../types.js";
5
+ import { theme as themeState } from "../state/theme.svelte.js";
6
+
7
+ /**
8
+ * @description
9
+ * Provides light/dark theming at the root layout level, and can override the theme for nested sections.
10
+ * At the root level, sets the `color-scheme` on the document and manages the `theme-color` meta tag.
11
+ * Nested instances can invert or force a specific theme via `color-scheme` scoping.
12
+ * @example
13
+ * <Theme theme="dark">
14
+ * <p>This section is always dark.</p>
15
+ * </Theme>
16
+ */
17
+
18
+ let {
19
+ theme,
20
+ themeColor,
21
+ children
22
+ }: {
23
+ /** The theme to use. Leave undefined to use the system theme. */
24
+ theme?: LutraTheme;
25
+ /**
26
+ * Theme color for the theme-color meta tag. Only used in the root theme.
27
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
28
+ */
29
+ themeColor?: {
30
+ light?: string;
31
+ dark?: string;
32
+ };
33
+ children: Snippet
34
+ } = $props();
35
+
36
+ const isRoot = getContextItem(LutraContext.Theme)?.() === undefined;
37
+
38
+ const parentTheme = isRoot ? undefined : getContextItem(LutraContext.Theme);
39
+
40
+ /** Effective theme for root, derived reactively from theme state. */
41
+ const rootTheme = $derived.by(() => {
42
+ if (!theme || theme === "system") return themeState.current;
43
+ if (theme === "invert") return themeState.current === "light" ? "dark" : "light";
44
+ return theme as "light" | "dark";
45
+ });
46
+
47
+ /** Effective theme for nested (non-root) Theme components. */
48
+ const nestedTheme = $derived.by(() => {
49
+ if (isRoot) return undefined;
50
+ const parent = parentTheme?.() as "light" | "dark" | undefined;
51
+ if (!theme || theme === "system") return parent;
52
+ if (theme === "invert") return parent === "light" ? "dark" : "light";
53
+ return theme as "light" | "dark";
54
+ });
55
+
56
+ setContext(
57
+ LutraContext.Theme,
58
+ isRoot ? () => rootTheme : () => nestedTheme
59
+ );
60
+
61
+ if (isRoot) {
62
+ $effect(() => {
63
+ document.documentElement.classList.remove("light", "dark");
64
+ document.documentElement.classList.add(rootTheme);
65
+ });
66
+ }
78
67
  </script>
79
68
 
80
69
  <svelte:head>
81
- {#if !root}
82
- <meta name="theme-color" content="{theme === 'dark' ? (config?.themeColor?.dark || '#000') : (config?.themeColor?.light || '#fff')}" />
83
- {/if}
70
+ {#if isRoot}
71
+ {#if BROWSER && rootTheme === "dark"}
72
+ <meta name="theme-color" content={themeColor?.dark || "#000"} />
73
+ {:else if BROWSER && rootTheme === "light"}
74
+ <meta name="theme-color" content={themeColor?.light || "#fff"} />
75
+ {:else}
76
+ <meta name="theme-color" media="(prefers-color-scheme: light)" content={themeColor?.light || "#fff"} />
77
+ <meta name="theme-color" media="(prefers-color-scheme: dark)" content={themeColor?.dark || "#000"} />
78
+ {/if}
79
+ <script>
80
+ {
81
+ const theme = localStorage.getItem('lutra.theme');
82
+
83
+ document.documentElement.classList.add(
84
+ !theme || theme === 'system'
85
+ ? window.matchMedia('(prefers-color-scheme: dark)').matches
86
+ ? 'dark'
87
+ : 'light'
88
+ : theme
89
+ );
90
+ }
91
+ </script>
92
+ {/if}
84
93
  </svelte:head>
85
94
 
86
- <div class="Theme {_theme}" class:root>
87
- {@render children()}
95
+ <div
96
+ class="Theme"
97
+ class:light={!isRoot && nestedTheme === "light" && (theme !== "invert" || BROWSER)}
98
+ class:dark={!isRoot && nestedTheme === "dark" && (theme !== "invert" || BROWSER)}
99
+ class:invert={!isRoot && theme === "invert"}
100
+ class:isRoot
101
+ >
102
+ {@render children()}
88
103
  </div>
89
104
 
90
105
  <style>
91
- @layer base {
92
- .Theme {
93
- display: contents;
94
- color-scheme: light dark;
95
- }
96
- .Theme.light {
97
- color-scheme: only light;
98
- }
99
- .Theme.dark {
100
- color-scheme: only dark;
101
- }
102
- }
106
+ .Theme {
107
+ display: contents;
108
+ }
109
+ .Theme.light {
110
+ color-scheme: only light;
111
+ }
112
+ .Theme.dark {
113
+ color-scheme: only dark;
114
+ }
115
+ /* CSS-only inversion fallback (SSR / no-JS).
116
+ Active only when JS has not yet added .light/.dark to the element. */
117
+ :global(html:not(.light):not(.dark)) .invert:not(.light):not(.dark) {
118
+ @media (prefers-color-scheme: dark) {
119
+ color-scheme: only light;
120
+ }
121
+ @media (prefers-color-scheme: light) {
122
+ color-scheme: only dark;
123
+ }
124
+ }
125
+ :global(html.dark) .invert:not(.light):not(.dark) {
126
+ color-scheme: only light;
127
+ }
128
+ :global(html.light) .invert:not(.light):not(.dark) {
129
+ color-scheme: only dark;
130
+ }
103
131
  </style>
104
-
@@ -1,15 +1,16 @@
1
1
  import { type Snippet } from "svelte";
2
- import { type LutraRootConfig } from "../config.js";
3
2
  import { type LutraTheme } from "../types.js";
4
3
  type $$ComponentProps = {
5
- /**
6
- * The theme to use. Leave undefined to use the system theme.
7
- */
4
+ /** The theme to use. Leave undefined to use the system theme. */
8
5
  theme?: LutraTheme;
9
6
  /**
10
- * Lutra config. Leave undefined to use the default config.
7
+ * Theme color for the theme-color meta tag. Only used in the root theme.
8
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color
11
9
  */
12
- config?: LutraRootConfig;
10
+ themeColor?: {
11
+ light?: string;
12
+ dark?: string;
13
+ };
13
14
  children: Snippet;
14
15
  };
15
16
  declare const Theme: import("svelte").Component<$$ComponentProps, {}, "">;
@@ -5,9 +5,12 @@
5
5
  import { removeToast } from "./toasts.svelte.js";
6
6
 
7
7
  /**
8
- * A styled toast/notification card.
9
- * Uses the same surface styling system as Popover and Modal.
10
- * Typically used via addToast() but can be used standalone.
8
+ * @description
9
+ * A styled toast/notification card. Uses the shared surface styling system (background, border, shadow).
10
+ * Typically created via `addToast()` but can be used standalone. Automatically adapts its grid layout
11
+ * based on whether an icon and/or actions are present.
12
+ * @example
13
+ * <Toast title="Saved" content="Your changes have been saved." />
11
14
  */
12
15
  let {
13
16
  id,
@@ -42,7 +45,7 @@
42
45
  }
43
46
  </script>
44
47
 
45
- <div class="Toast" class:has-icon={!!icon} class:has-actions={!!actions}>
48
+ <div class="Toast">
46
49
  {#if !actions}
47
50
  <Close position="top right" onclick={handleClose} />
48
51
  {/if}
@@ -55,7 +58,7 @@
55
58
 
56
59
  <div class="Content">
57
60
  {#if title}
58
- <strong class="Title">{title}</strong>
61
+ <h5 class="Title">{title}</h5>
59
62
  {/if}
60
63
  {#if content}
61
64
  <p class="Text">{content}</p>
@@ -95,15 +98,15 @@
95
98
  }
96
99
  }
97
100
 
98
- .Toast.has-icon {
101
+ .Toast:has(> .Icon) {
99
102
  grid-template-columns: auto 1fr;
100
103
  }
101
104
 
102
- .Toast.has-actions {
105
+ .Toast:has(> .Actions) {
103
106
  grid-template-columns: 1fr auto;
104
107
  }
105
108
 
106
- .Toast.has-icon.has-actions {
109
+ .Toast:has(> .Icon):has(> .Actions) {
107
110
  grid-template-columns: auto 1fr auto;
108
111
  }
109
112
 
@@ -28,7 +28,12 @@
28
28
  * Displays on hover (with delay) or focus (immediate).
29
29
  * Supports "warming" - if a tooltip was recently shown, new tooltips appear instantly.
30
30
  * @supports prefers-reduced-motion
31
- * @cssprop --delay - Hover delay before showing (default: 0.5s)
31
+ * @cssprop --delay - Hover delay before showing. (Default: 0.4s)
32
+ * @cssprop --tooltip-offset - Gap between the anchor and the tooltip. (Default: var(--space-xs))
33
+ * @cssprop --tooltip-padding-block - Block padding of the tooltip. (Default: var(--space-xxs))
34
+ * @cssprop --tooltip-padding-inline - Inline padding of the tooltip. (Default: var(--space-xs))
35
+ * @cssprop --tooltip-font-size - Font size of the tooltip. (Default: max(0.75rem, 11px))
36
+ * @cssprop --tooltip-max-width - Maximum width of the tooltip. (Default: 25ch)
32
37
  */
33
38
  let {
34
39
  children,
@@ -99,17 +104,18 @@
99
104
  position: fixed;
100
105
  position-area: block-start center;
101
106
  position-try-fallbacks: flip-block;
102
- margin-block-end: 0.5rem;
107
+ margin-block-end: var(--tooltip-offset, var(--space-xs));
103
108
  background: var(--tooltip-background, var(--surface-background));
104
109
  border: var(--tooltip-border, var(--surface-border));
105
110
  border-radius: var(--tooltip-border-radius, var(--surface-border-radius));
106
111
  box-shadow: var(--tooltip-shadow, var(--surface-shadow));
107
- padding: 0.35rem 0.5rem;
108
- font-size: max(0.75rem, 11px);
109
- line-height: 1.35;
110
- font-weight: 500;
112
+ padding-block: var(--tooltip-padding-block, var(--space-xxs));
113
+ padding-inline: var(--tooltip-padding-inline, var(--space-xs));
114
+ font-size: var(--tooltip-font-size, max(0.75rem, 11px));
115
+ line-height: var(--font-line-height-tight);
116
+ font-weight: var(--font-weight-normal);
111
117
  color: var(--tooltip-color, var(--text-color-p));
112
- max-width: 25ch;
118
+ max-width: var(--tooltip-max-width, 25ch);
113
119
  width: max-content;
114
120
  text-align: center;
115
121
  opacity: 0;
@@ -117,12 +123,12 @@
117
123
  }
118
124
 
119
125
  .TooltipContent :global(code) {
120
- font-weight: 600;
126
+ font-weight: var(--font-weight-medium);
121
127
  }
122
128
 
123
129
  .TooltipContent :global(strong),
124
130
  .TooltipContent :global(b) {
125
- font-weight: 700;
131
+ font-weight: var(--font-weight-semibold);
126
132
  }
127
133
 
128
134
  .TooltipTrigger {
@@ -140,7 +146,8 @@
140
146
  }
141
147
 
142
148
 
143
- .Tooltip:has(.TooltipTrigger:focus-visible) .TooltipContent {
149
+ .Tooltip:has(.TooltipTrigger :focus-visible) .TooltipContent,
150
+ .Tooltip:focus-within .TooltipContent {
144
151
  opacity: 1;
145
152
  transition-delay: 0s;
146
153
  }
@@ -37,11 +37,15 @@
37
37
  @property --space-900 { syntax: "<length>"; inherits: true; initial-value: 120px; }
38
38
  @property --space-1000 { syntax: "<length>"; inherits: true; initial-value: 128px; }
39
39
 
40
+ @property --space-xxs { syntax: "<length>"; inherits: true; initial-value: 4px; }
40
41
  @property --space-xs { syntax: "<length>"; inherits: true; initial-value: 4px; }
41
42
  @property --space-sm { syntax: "<length>"; inherits: true; initial-value: 8px; }
42
43
  @property --space-md { syntax: "<length>"; inherits: true; initial-value: 16px; }
43
- @property --space-lg { syntax: "<length>"; inherits: true; initial-value: 32px; }
44
- @property --space-xl { syntax: "<length>"; inherits: true; initial-value: 64px; }
44
+ @property --space-lg { syntax: "<length>"; inherits: true; initial-value: 24px; }
45
+ @property --space-xl { syntax: "<length>"; inherits: true; initial-value: 32px; }
46
+ @property --space-xxl { syntax: "<length>"; inherits: true; initial-value: 48px; }
47
+ @property --space-xxxl { syntax: "<length>"; inherits: true; initial-value: 64px; }
48
+ @property --space-xxxxl { syntax: "<length>"; inherits: true; initial-value: 80px; }
45
49
 
46
50
  /**
47
51
  * Fonts
@@ -54,17 +58,17 @@
54
58
  @property --font-size-base { syntax: "<length>"; inherits: true; initial-value: 16px; }
55
59
 
56
60
  /* font size */
57
- @property --font-size-xs { syntax: "<length>"; inherits: true; initial-value: 0.75em; }
58
- @property --font-size-sm { syntax: "<length>"; inherits: true; initial-value: 0.875em; }
59
- @property --font-size-p { syntax: "<length>"; inherits: true; initial-value: 1em; }
60
- @property --font-size-h6 { syntax: "<length>"; inherits: true; initial-value: 1.25em; }
61
- @property --font-size-h5 { syntax: "<length>"; inherits: true; initial-value: 1.5em; }
62
- @property --font-size-h4 { syntax: "<length>"; inherits: true; initial-value: 1.75em; }
63
- @property --font-size-h3 { syntax: "<length>"; inherits: true; initial-value: 2em; }
64
- @property --font-size-h2 { syntax: "<length>"; inherits: true; initial-value: 2.5em; }
65
- @property --font-size-h1 { syntax: "<length>"; inherits: true; initial-value: 3em; }
66
- @property --font-size-hero { syntax: "<length>"; inherits: true; initial-value: 4em; }
67
- @property --font-size-jumbo { syntax: "<length>"; inherits: true; initial-value: 5em; }
61
+ @property --font-size-xs { syntax: "<length>"; inherits: true; initial-value: 12px; }
62
+ @property --font-size-sm { syntax: "<length>"; inherits: true; initial-value: 14px; }
63
+ @property --font-size-p { syntax: "<length>"; inherits: true; initial-value: 16px; }
64
+ @property --font-size-h6 { syntax: "<length>"; inherits: true; initial-value: 20px; }
65
+ @property --font-size-h5 { syntax: "<length>"; inherits: true; initial-value: 24px; }
66
+ @property --font-size-h4 { syntax: "<length>"; inherits: true; initial-value: 28px; }
67
+ @property --font-size-h3 { syntax: "<length>"; inherits: true; initial-value: 32px; }
68
+ @property --font-size-h2 { syntax: "<length>"; inherits: true; initial-value: 40px; }
69
+ @property --font-size-h1 { syntax: "<length>"; inherits: true; initial-value: 48px; }
70
+ @property --font-size-hero { syntax: "<length>"; inherits: true; initial-value: 64px; }
71
+ @property --font-size-jumbo { syntax: "<length>"; inherits: true; initial-value: 80px; }
68
72
 
69
73
  /* font weight */
70
74
  @property --font-weight-thin { syntax: "<number>"; inherits: true; initial-value: 300; }
@@ -108,8 +112,8 @@
108
112
 
109
113
  /* links */
110
114
 
111
- @property --link-text-decoration { syntax: "<string>"; inherits: true; initial-value: none; }
112
- @property --link-text-decoration-hover { syntax: "<string>"; inherits: true; initial-value: underline; }
115
+ @property --link-text-decoration { syntax: "*"; inherits: true; initial-value: none; }
116
+ @property --link-text-decoration-hover { syntax: "*"; inherits: true; initial-value: underline; }
113
117
 
114
118
  @property --link-color { syntax: "*"; inherits: true; initial-value: #2563eb; }
115
119
  @property --link-color-visited { syntax: "*"; inherits: true; initial-value: #7c3aed; }
@@ -156,13 +160,22 @@
156
160
  * Forms
157
161
  */
158
162
 
159
- @property --form-background { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #ffffff; }
160
- @property --form-background-actions { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #ffffff; }
163
+ @property --form-background { syntax: "*"; inherits: true; initial-value: #ffffff; }
164
+ @property --form-background-actions { syntax: "*"; inherits: true; initial-value: #ffffff; }
161
165
  @property --form-border-radius { syntax: "<length>"; inherits: true; initial-value: 8px; }
162
- @property --form-border-color { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #d1d5db; }
166
+ @property --form-border-color { syntax: "*"; inherits: true; initial-value: #d1d5db; }
163
167
  @property --form-border-size { syntax: "<length>"; inherits: true; initial-value: 1px; }
164
168
  @property --form-border-style { syntax: "solid | dashed | dotted | double | groove | ridge | inset | outset"; inherits: true; initial-value: solid; }
165
169
 
170
+ @property --form-field-gap { syntax: "<length>"; inherits: true; initial-value: 24px; }
171
+ @property --form-label-gap { syntax: "<length>"; inherits: true; initial-value: 8px; }
172
+ @property --form-section-gap { syntax: "<length>"; inherits: true; initial-value: 32px; }
173
+ @property --form-title-gap { syntax: "<length>"; inherits: true; initial-value: 16px; }
174
+ @property --form-title-padding-block-end { syntax: "<length>"; inherits: true; initial-value: 8px; }
175
+ @property --form-field-inside-gap { syntax: "<length>"; inherits: true; initial-value: 4px; }
176
+ @property --form-padding-block { syntax: "<length>"; inherits: true; initial-value: 24px; }
177
+ @property --form-padding-inline { syntax: "<length>"; inherits: true; initial-value: 32px; }
178
+
166
179
  /**
167
180
  * Fields
168
181
  */
@@ -218,7 +231,7 @@
218
231
  @property --field-color-loading { syntax: "*"; inherits: true; initial-value: #7c3aed; }
219
232
 
220
233
  @property --field-label-color { syntax: "*"; inherits: true; initial-value: #111111; }
221
- @property --field-label-font-size { syntax: "<length>"; inherits: true; initial-value: 1em; }
234
+ @property --field-label-font-size { syntax: "<length>"; inherits: true; initial-value: 16px; }
222
235
  @property --field-label-font-weight { syntax: "<number>"; inherits: true; initial-value: 600; }
223
236
 
224
237
  @property --field-placeholder-color { syntax: "*"; inherits: true; initial-value: #999999; }
@@ -343,13 +356,13 @@
343
356
  */
344
357
 
345
358
  @property --shadow-color { syntax: "*"; inherits: true; initial-value: rgba(0, 0, 0, 0.1); }
346
- @property --shadow-base { syntax: "<shadow>"; inherits: true; initial-value: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
359
+ @property --shadow-base { syntax: "*"; inherits: true; initial-value: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
347
360
 
348
361
  /**
349
362
  * Code
350
363
  */
351
364
 
352
- @property --code-background { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #f8fafc; }
365
+ @property --code-background { syntax: "*"; inherits: true; initial-value: #f8fafc; }
353
366
  @property --code-color { syntax: "*"; inherits: true; initial-value: #1a1a1a; }
354
367
  @property --code-border-color { syntax: "*"; inherits: true; initial-value: #d1d5db; }
355
368
  @property --code-border-size { syntax: "<length>"; inherits: true; initial-value: 0; }
@@ -363,18 +376,18 @@
363
376
  * Backgrounds
364
377
  */
365
378
 
366
- @property --background-body { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #ffffff; }
367
- @property --background-main { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #ffffff; }
368
- @property --background-main-subtle { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #f8fafc; }
369
-
370
- @property --background-active { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #2563eb; }
371
- @property --background-inactive { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #f3f4f6; }
372
- @property --background-disabled { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #f3f4f6; }
373
- @property --background-focus { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #2563eb; }
374
- @property --background-invalid { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #fef2f2; }
375
- @property --background-valid { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #dcfce7; }
376
- @property --background-success { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #dcfce7; }
377
- @property --background-danger { syntax: "<color># | <image># | <gradient>#"; inherits: true; initial-value: #fef2f2; }
379
+ @property --background-body { syntax: "*"; inherits: true; initial-value: #ffffff; }
380
+ @property --background-main { syntax: "*"; inherits: true; initial-value: #ffffff; }
381
+ @property --background-main-subtle { syntax: "*"; inherits: true; initial-value: #f8fafc; }
382
+
383
+ @property --background-active { syntax: "*"; inherits: true; initial-value: #2563eb; }
384
+ @property --background-inactive { syntax: "*"; inherits: true; initial-value: #f3f4f6; }
385
+ @property --background-disabled { syntax: "*"; inherits: true; initial-value: #f3f4f6; }
386
+ @property --background-focus { syntax: "*"; inherits: true; initial-value: #2563eb; }
387
+ @property --background-invalid { syntax: "*"; inherits: true; initial-value: #fef2f2; }
388
+ @property --background-valid { syntax: "*"; inherits: true; initial-value: #dcfce7; }
389
+ @property --background-success { syntax: "*"; inherits: true; initial-value: #dcfce7; }
390
+ @property --background-danger { syntax: "*"; inherits: true; initial-value: #fef2f2; }
378
391
  @property --background-warn { syntax: "<color>"; inherits: true; initial-value: #fefce8; }
379
392
  @property --background-info { syntax: "<color>"; inherits: true; initial-value: #eff6ff; }
380
393
  @property --background-selected { syntax: "<color>"; inherits: true; initial-value: #eff6ff; }
@@ -425,7 +438,7 @@
425
438
  @property --tooltip-color { syntax: "*"; inherits: true; initial-value: #1a1a1a; }
426
439
  @property --tooltip-border { syntax: "*"; inherits: true; initial-value: 1px solid #d1d5db; }
427
440
  @property --tooltip-border-radius { syntax: "<length>"; inherits: true; initial-value: 8px; }
428
- @property --tooltip-shadow { syntax: "*"; inherits: true; initial-value: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15); }
441
+ @property --tooltip-shadow { syntax: "*"; inherits: true; initial-value: 0 4px 8px rgba(0, 0, 0, 0.15); }
429
442
 
430
443
  /**
431
444
  * Toast (inherits from surface system)
@@ -434,17 +447,17 @@
434
447
  @property --toast-background { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
435
448
  @property --toast-border { syntax: "*"; inherits: true; initial-value: 1px solid #d1d5db; }
436
449
  @property --toast-border-radius { syntax: "<length>"; inherits: true; initial-value: 8px; }
437
- @property --toast-shadow { syntax: "*"; inherits: true; initial-value: 0 0.25rem 1rem rgba(0, 0, 0, 0.15); }
438
- @property --toast-padding-inline { syntax: "<length>"; inherits: true; initial-value: 1rem; }
439
- @property --toast-padding-block { syntax: "<length>"; inherits: true; initial-value: 0.75rem; }
440
- @property --toast-gap { syntax: "<length>"; inherits: true; initial-value: 0.75rem; }
441
- @property --toast-min-width { syntax: "<length>"; inherits: true; initial-value: 20rem; }
442
- @property --toast-max-width { syntax: "<length>"; inherits: true; initial-value: 28rem; }
450
+ @property --toast-shadow { syntax: "*"; inherits: true; initial-value: 0 4px 16px rgba(0, 0, 0, 0.15); }
451
+ @property --toast-padding-inline { syntax: "<length>"; inherits: true; initial-value: 16px; }
452
+ @property --toast-padding-block { syntax: "<length>"; inherits: true; initial-value: 12px; }
453
+ @property --toast-gap { syntax: "<length>"; inherits: true; initial-value: 12px; }
454
+ @property --toast-min-width { syntax: "<length>"; inherits: true; initial-value: 320px; }
455
+ @property --toast-max-width { syntax: "<length>"; inherits: true; initial-value: 448px; }
443
456
  @property --toast-title-color { syntax: "*"; inherits: true; initial-value: #1a1a1a; }
444
457
  @property --toast-title-font-weight { syntax: "<number>"; inherits: true; initial-value: 600; }
445
458
  @property --toast-text-color { syntax: "*"; inherits: true; initial-value: #666666; }
446
- @property --toast-icon-size { syntax: "<length>"; inherits: true; initial-value: 1.25rem; }
447
- @property --toast-offset { syntax: "<length>"; inherits: true; initial-value: 1rem; }
459
+ @property --toast-icon-size { syntax: "<length>"; inherits: true; initial-value: 20px; }
460
+ @property --toast-offset { syntax: "<length>"; inherits: true; initial-value: 16px; }
448
461
 
449
462
  /**
450
463
  * Menu
@@ -490,14 +503,14 @@
490
503
  @property --modal-border-size { syntax: "<length>"; inherits: true; initial-value: 1px; }
491
504
  @property --modal-border-style { syntax: "solid | dashed | dotted | double | groove | ridge | inset | outset"; inherits: true; initial-value: solid; }
492
505
  @property --modal-border-radius { syntax: "<length>"; inherits: true; initial-value: 8px; }
493
- @property --modal-shadow { syntax: "*"; inherits: true; initial-value: 0 0.25rem 1rem rgba(0, 0, 0, 0.15); }
506
+ @property --modal-shadow { syntax: "*"; inherits: true; initial-value: 0 4px 16px rgba(0, 0, 0, 0.15); }
494
507
 
495
508
  @property --modal-padding-inline { syntax: "<length>"; inherits: true; initial-value: 24px; }
496
509
  @property --modal-padding-block { syntax: "<length>"; inherits: true; initial-value: 24px; }
497
510
  @property --modal-width { syntax: "*"; inherits: true; initial-value: fit-content; }
498
511
  @property --modal-min-width { syntax: "*"; inherits: true; initial-value: auto; }
499
- @property --modal-max-width { syntax: "*"; inherits: true; initial-value: 40rem; }
500
- @property --modal-max-height { syntax: "*"; inherits: true; initial-value: 80svh; }
512
+ @property --modal-max-width { syntax: "*"; inherits: true; initial-value: 640px; }
513
+ @property --modal-max-height { syntax: "*"; inherits: true; initial-value: 600px; }
501
514
  @property --modal-gap { syntax: "<length>"; inherits: true; initial-value: 0px; }
502
515
 
503
516
  @property --modal-actions-background { syntax: "<color>"; inherits: true; initial-value: #f8fafc; }
@@ -513,7 +526,7 @@
513
526
  @property --surface-background { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
514
527
  @property --surface-border { syntax: "*"; inherits: true; initial-value: 1px solid #d1d5db; }
515
528
  @property --surface-border-radius { syntax: "<length>"; inherits: true; initial-value: 8px; }
516
- @property --surface-shadow { syntax: "*"; inherits: true; initial-value: 0 0.25rem 1rem rgba(0, 0, 0, 0.15); }
529
+ @property --surface-shadow { syntax: "*"; inherits: true; initial-value: 0 4px 16px rgba(0, 0, 0, 0.15); }
517
530
 
518
531
  /**
519
532
  * Popover Component
@@ -522,18 +535,18 @@
522
535
  @property --popover-background { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
523
536
  @property --popover-border { syntax: "*"; inherits: true; initial-value: 1px solid #d1d5db; }
524
537
  @property --popover-border-radius { syntax: "<length>"; inherits: true; initial-value: 8px; }
525
- @property --popover-shadow { syntax: "*"; inherits: true; initial-value: 0 0.25rem 1rem rgba(0, 0, 0, 0.15); }
538
+ @property --popover-shadow { syntax: "*"; inherits: true; initial-value: 0 4px 16px rgba(0, 0, 0, 0.15); }
526
539
  @property --popover-width { syntax: "*"; inherits: true; initial-value: max-content; }
527
- @property --popover-max-width { syntax: "<length>"; inherits: true; initial-value: calc(100vw - 2rem); }
528
- @property --popover-max-height { syntax: "<length>"; inherits: true; initial-value: calc(100vh - 2rem); }
540
+ @property --popover-max-width { syntax: "*"; inherits: true; initial-value: 1024px; }
541
+ @property --popover-max-height { syntax: "*"; inherits: true; initial-value: 768px; }
529
542
 
530
543
  /**
531
544
  * Overlay System
532
545
  */
533
546
 
534
547
  @property --overlay-z-index { syntax: "<integer>"; inherits: true; initial-value: 1000; }
535
- @property --overlay-gap { syntax: "<length>"; inherits: true; initial-value: 0.75rem; }
536
- @property --overlay-offset { syntax: "<length>"; inherits: true; initial-value: 1rem; }
548
+ @property --overlay-gap { syntax: "<length>"; inherits: true; initial-value: 12px; }
549
+ @property --overlay-offset { syntax: "<length>"; inherits: true; initial-value: 16px; }
537
550
 
538
551
  /**
539
552
  * Scrim/Backdrop (shared across overlays)