@deepfuture/dui-theme-default 0.0.2 → 0.0.4

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 (63) hide show
  1. package/README.md +9 -1
  2. package/components/accordion-item.js +11 -10
  3. package/components/alert-dialog-popup.js +9 -17
  4. package/components/avatar.js +2 -2
  5. package/components/badge.js +55 -29
  6. package/components/breadcrumb-ellipsis.js +1 -1
  7. package/components/breadcrumb-link.js +2 -2
  8. package/components/breadcrumb-page.js +1 -1
  9. package/components/breadcrumb-separator.js +1 -1
  10. package/components/breadcrumb.js +3 -2
  11. package/components/button.js +88 -51
  12. package/components/calendar.js +24 -21
  13. package/components/checkbox-group.js +1 -1
  14. package/components/checkbox.js +10 -9
  15. package/components/collapsible.js +11 -10
  16. package/components/combobox.js +65 -19
  17. package/components/command-empty.js +3 -2
  18. package/components/command-group.js +3 -2
  19. package/components/command-input.js +4 -3
  20. package/components/command-item.js +6 -5
  21. package/components/command-list.js +1 -1
  22. package/components/command-separator.js +1 -1
  23. package/components/command-shortcut.js +3 -2
  24. package/components/command.js +2 -2
  25. package/components/data-table.js +20 -19
  26. package/components/dialog-popup.js +9 -17
  27. package/components/dropzone.js +10 -9
  28. package/components/input.js +13 -12
  29. package/components/menu-item.js +11 -9
  30. package/components/menu.js +19 -1
  31. package/components/number-field.js +13 -11
  32. package/components/popover-popup.js +25 -1
  33. package/components/preview-card-popup.js +26 -1
  34. package/components/progress.js +2 -2
  35. package/components/radio.js +11 -10
  36. package/components/scroll-area.js +9 -9
  37. package/components/select.js +62 -10
  38. package/components/sidebar-group-label.js +2 -2
  39. package/components/sidebar-menu-button.js +6 -14
  40. package/components/sidebar-provider.js +6 -14
  41. package/components/sidebar.js +1 -1
  42. package/components/slider.js +8 -7
  43. package/components/switch.js +12 -11
  44. package/components/tab.js +10 -9
  45. package/components/tabs-indicator.js +3 -3
  46. package/components/tabs-panel.js +3 -2
  47. package/components/textarea.js +11 -10
  48. package/components/toggle-group.js +0 -1
  49. package/components/toggle.js +28 -11
  50. package/components/tooltip-popup.js +29 -1
  51. package/components/trunc.js +3 -3
  52. package/index.d.ts +4 -0
  53. package/index.js +6 -0
  54. package/package.json +14 -2
  55. package/prose.d.ts +2 -0
  56. package/prose.js +4 -0
  57. package/tokens-raw.js +1 -1
  58. package/tokens.css +95 -72
  59. package/tokens.js +3 -2
  60. package/types.d.ts +18 -0
  61. package/types.js +8 -0
  62. package/typography.d.ts +104 -0
  63. package/typography.js +103 -0
@@ -1,30 +1,31 @@
1
1
  import { css } from "lit";
2
+ import { type } from "../typography.js";
2
3
  export const inputStyles = css `
3
4
  [part="input"] {
4
5
  padding: var(--space-2);
5
6
  font-family: var(--font-sans);
6
- font-size: var(--font-size-sm);
7
- line-height: var(--line-height-normal);
7
+ ${type("sm")}
8
8
  height: var(--component-height-md);
9
- color: var(--foreground);
10
- border: var(--border-width-thin) solid var(--input);
11
- background: var(--input-bg);
9
+ color: var(--text-1);
10
+ border: var(--border-width-thin) solid var(--border);
11
+ background: var(--sunken);
12
12
  border-radius: var(--radius-md);
13
+ transition-property: border-color, box-shadow, background, filter, transform;
13
14
  transition-duration: var(--duration-fast);
14
15
  }
15
16
 
16
17
  [part="input"]::placeholder {
17
- color: var(--muted-foreground);
18
+ color: var(--text-3);
18
19
  }
19
20
 
20
21
  [part="input"]:focus-visible {
21
22
  box-shadow:
22
- 0 0 0 var(--space-0_5) var(--background),
23
- 0 0 0 var(--space-1) var(--ring);
23
+ 0 0 0 var(--focus-ring-offset) var(--background),
24
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
24
25
  }
25
26
 
26
27
  [part="input"]:disabled {
27
- opacity: 0.5;
28
+ opacity: 0.4;
28
29
  }
29
30
 
30
31
  [part="input"][data-invalid] {
@@ -33,8 +34,8 @@ export const inputStyles = css `
33
34
 
34
35
  [part="input"][data-invalid]:focus-visible {
35
36
  box-shadow:
36
- 0 0 0 var(--space-0_5) var(--background),
37
- 0 0 0 var(--space-1) var(--ring);
37
+ 0 0 0 var(--focus-ring-offset) var(--background),
38
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
38
39
  }
39
40
 
40
41
  /* Password bullets are tiny at small font sizes — bump them up */
@@ -47,7 +48,7 @@ export const inputStyles = css `
47
48
  [part="input"]:-webkit-autofill,
48
49
  [part="input"]:-webkit-autofill:hover,
49
50
  [part="input"]:-webkit-autofill:focus {
50
- -webkit-text-fill-color: var(--foreground);
51
+ -webkit-text-fill-color: var(--text-1);
51
52
  transition: background-color 5000s ease-in-out 0s;
52
53
  }
53
54
  `;
@@ -1,20 +1,22 @@
1
1
  import { css } from "lit";
2
+ import { type } from "../typography.js";
2
3
  export const menuItemStyles = css `
3
4
  .Item {
4
5
  --icon-size: var(--space-4);
5
- --icon-color: var(--muted-foreground);
6
+ --icon-color: var(--text-2);
7
+ gap: var(--space-2);
6
8
  padding: var(--space-2) var(--space-3);
7
9
  border-radius: var(--radius-sm);
8
- font-size: var(--font-size-sm);
10
+ ${type("sm")}
9
11
  font-family: var(--font-sans);
10
- color: var(--popover-foreground);
12
+ color: var(--text-1);
11
13
  }
12
14
 
13
15
  .Item:hover,
14
16
  :host([data-highlighted]) .Item {
15
- --icon-color: var(--foreground);
16
- background: var(--secondary);
17
- color: var(--foreground);
17
+ --icon-color: var(--text-1);
18
+ background: oklch(from var(--foreground) l c h / 0.05);
19
+ color: var(--text-1);
18
20
  }
19
21
 
20
22
  :host([variant="danger"]) .Item {
@@ -24,13 +26,13 @@ export const menuItemStyles = css `
24
26
 
25
27
  :host([variant="danger"]) .Item:hover,
26
28
  :host([variant="danger"][data-highlighted]) .Item {
27
- --icon-color: var(--destructive-foreground);
29
+ --icon-color: oklch(from var(--destructive) 0.98 0.01 h);
28
30
  background: var(--destructive);
29
- color: var(--destructive-foreground);
31
+ color: oklch(from var(--destructive) 0.98 0.01 h);
30
32
  }
31
33
 
32
34
  :host([disabled]) .Item {
33
- opacity: 0.5;
35
+ opacity: 0.4;
34
36
  cursor: not-allowed;
35
37
  }
36
38
  `;
@@ -1,2 +1,20 @@
1
1
  import { css } from "lit";
2
- export const menuStyles = css ``;
2
+ export const menuStyles = css `
3
+ .Popup {
4
+ background: var(--surface-3);
5
+ border: var(--border-width-thin) solid var(--border);
6
+ border-radius: var(--radius-md);
7
+ box-shadow: var(--shadow-md);
8
+ transition-duration: var(--duration-fast);
9
+ transition-timing-function: var(--ease-out-3);
10
+ }
11
+
12
+ .Popup[data-starting-style],
13
+ .Popup[data-ending-style] {
14
+ transform: translateY(calc(var(--space-1) * -1));
15
+ }
16
+
17
+ .Menu {
18
+ padding: var(--space-1);
19
+ }
20
+ `;
@@ -1,20 +1,22 @@
1
1
  import { css } from "lit";
2
+ import { type } from "../typography.js";
2
3
  export const numberFieldStyles = css `
3
4
  [part="root"] {
4
5
  border: var(--border-width-thin) solid var(--border);
5
6
  border-radius: var(--radius-md);
6
- background: var(--background);
7
+ background: var(--sunken);
7
8
  transition-property: border-color, box-shadow;
8
9
  transition-duration: var(--duration-fast);
9
10
  }
10
11
 
11
12
  [part="root"]:focus-within {
12
- border-color: var(--ring);
13
- box-shadow: 0 0 0 var(--space-0_5) color-mix(in oklch, var(--ring) 25%, transparent);
13
+ box-shadow:
14
+ 0 0 0 var(--focus-ring-offset) var(--background),
15
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
14
16
  }
15
17
 
16
18
  [part="root"][data-disabled] {
17
- opacity: 0.5;
19
+ opacity: 0.4;
18
20
  }
19
21
 
20
22
  [part="root"][data-invalid] {
@@ -22,18 +24,18 @@ export const numberFieldStyles = css `
22
24
  }
23
25
 
24
26
  [part="input"] {
25
- height: var(--space-9);
27
+ height: var(--component-height-md);
26
28
  width: var(--space-16);
27
29
  font-family: var(--font-sans);
28
- font-size: var(--font-size-sm);
29
- color: var(--foreground);
30
+ ${type("sm")}
31
+ color: var(--text-1);
30
32
  }
31
33
 
32
34
  [part="decrement"],
33
35
  [part="increment"] {
34
36
  width: var(--space-8);
35
37
  height: var(--space-8);
36
- color: var(--muted-foreground);
38
+ color: var(--text-2);
37
39
  border-radius: var(--radius-sm);
38
40
  font-size: var(--font-size-lg);
39
41
  transition-property: background, color;
@@ -43,13 +45,13 @@ export const numberFieldStyles = css `
43
45
  @media (hover: hover) {
44
46
  [part="decrement"]:hover:not(:disabled),
45
47
  [part="increment"]:hover:not(:disabled) {
46
- background: var(--muted);
47
- color: var(--foreground);
48
+ background: var(--surface-1);
49
+ color: var(--text-1);
48
50
  }
49
51
  }
50
52
 
51
53
  [part="decrement"]:disabled,
52
54
  [part="increment"]:disabled {
53
- opacity: 0.3;
55
+ opacity: 0.4;
54
56
  }
55
57
  `;
@@ -1,2 +1,26 @@
1
1
  import { css } from "lit";
2
- export const popoverPopupStyles = css ``;
2
+ import { type } from "../typography.js";
3
+ export const popoverPopupStyles = css `
4
+ .Popup {
5
+ padding: var(--space-1);
6
+ border-radius: var(--radius-md);
7
+ background: var(--surface-3);
8
+ color: var(--text-1);
9
+ font-family: var(--font-sans);
10
+ ${type("sm")}
11
+ box-shadow: var(--shadow-md);
12
+ border: var(--border-width-thin) solid var(--border);
13
+ transition-duration: var(--duration-fast);
14
+ transition-timing-function: var(--ease-out-3);
15
+ }
16
+
17
+ .Arrow .arrow-fill {
18
+ fill: var(--surface-3);
19
+ }
20
+
21
+ .Arrow .arrow-stroke {
22
+ fill: none;
23
+ stroke: var(--border);
24
+ stroke-width: 1px;
25
+ }
26
+ `;
@@ -1,2 +1,27 @@
1
1
  import { css } from "lit";
2
- export const previewCardPopupStyles = css ``;
2
+ import { type } from "../typography.js";
3
+ export const previewCardPopupStyles = css `
4
+ .Popup {
5
+ padding: var(--space-4);
6
+ border-radius: var(--radius-md);
7
+ background: var(--surface-3);
8
+ color: var(--text-1);
9
+ font-family: var(--font-sans);
10
+ ${type("sm")}
11
+ box-shadow: var(--shadow-lg);
12
+ border: var(--border-width-thin) solid var(--border);
13
+ max-width: var(--max-width, var(--space-80));
14
+ transition-duration: var(--duration-fast);
15
+ transition-timing-function: var(--ease-out-3);
16
+ }
17
+
18
+ .Arrow .arrow-fill {
19
+ fill: var(--surface-3);
20
+ }
21
+
22
+ .Arrow .arrow-stroke {
23
+ fill: none;
24
+ stroke: var(--border);
25
+ stroke-width: 1px;
26
+ }
27
+ `;
@@ -6,12 +6,12 @@ export const progressStyles = css `
6
6
 
7
7
  [part="track"] {
8
8
  height: var(--progress-height);
9
- background: var(--muted);
9
+ background: var(--surface-1);
10
10
  border-radius: var(--radius-full);
11
11
  }
12
12
 
13
13
  [part="indicator"] {
14
- background: var(--primary);
14
+ background: var(--accent);
15
15
  border-radius: var(--radius-full);
16
16
  transition: width var(--duration-normal) var(--ease-out-3);
17
17
  }
@@ -9,28 +9,29 @@ export const radioStyles = css `
9
9
  width: var(--radio-size);
10
10
  height: var(--radio-size);
11
11
  border-radius: 50%;
12
+ transition-property: background, border-color, box-shadow, filter, transform;
12
13
  transition-duration: var(--duration-fast);
13
14
  }
14
15
 
15
16
  [part="root"][data-unchecked] {
16
- border: var(--border-width-thin) solid var(--input);
17
- background: var(--input-bg);
17
+ border: var(--border-width-thin) solid var(--border);
18
+ background: var(--sunken);
18
19
  }
19
20
 
20
21
  [part="root"][data-checked] {
21
- border: var(--border-width-thin) solid var(--primary);
22
- background: var(--primary);
22
+ border: var(--border-width-thin) solid var(--accent);
23
+ background: var(--accent);
23
24
  }
24
25
 
25
26
  [part="root"][data-disabled] {
26
- opacity: 0.5;
27
+ opacity: 0.4;
27
28
  }
28
29
 
29
30
  [part="root"]:focus-visible {
30
31
  outline: none;
31
32
  box-shadow:
32
- 0 0 0 var(--space-0_5) var(--background),
33
- 0 0 0 var(--space-1) var(--ring);
33
+ 0 0 0 var(--focus-ring-offset) var(--background),
34
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
34
35
  }
35
36
 
36
37
  [part="root"][data-invalid] {
@@ -39,9 +40,9 @@ export const radioStyles = css `
39
40
  }
40
41
 
41
42
  [part="dot"] {
42
- width: 8px;
43
- height: 8px;
43
+ width: var(--space-2);
44
+ height: var(--space-2);
44
45
  border-radius: 50%;
45
- background: var(--primary-foreground);
46
+ background: oklch(from var(--accent) 0.98 0.01 h);
46
47
  }
47
48
  `;
@@ -6,7 +6,7 @@ export const scrollAreaStyles = css `
6
6
  var(--scroll-fade-spread-radius, var(--space-2))
7
7
  var(--scroll-fade-color, var(--background));
8
8
  opacity: 0;
9
- transition: opacity 150ms ease;
9
+ transition: opacity var(--duration-fast) ease;
10
10
 
11
11
  &[data-scrolled] {
12
12
  opacity: 1;
@@ -14,24 +14,24 @@ export const scrollAreaStyles = css `
14
14
  }
15
15
 
16
16
  .Scrollbar {
17
- border-radius: var(--radius-sm, 0.375rem);
18
- transition: opacity 150ms;
17
+ border-radius: var(--radius-sm);
18
+ transition: opacity var(--duration-fast);
19
19
  }
20
20
 
21
21
  .Scrollbar[data-orientation="vertical"] {
22
- width: 0.25rem;
23
- margin: 0.1rem;
22
+ width: var(--space-1);
23
+ margin: var(--space-px);
24
24
  }
25
25
 
26
26
  .Scrollbar[data-orientation="horizontal"] {
27
- height: 0.25rem;
28
- margin: 0.1rem;
27
+ height: var(--space-1);
28
+ margin: var(--space-px);
29
29
  }
30
30
 
31
31
  .Thumb {
32
32
  border-radius: inherit;
33
- background: var(--scroll-area-thumb-color, var(--muted-foreground));
34
- opacity: 0.5;
33
+ background: var(--scroll-area-thumb-color, var(--text-2));
34
+ opacity: 0.4;
35
35
  transition: opacity var(--duration-fast);
36
36
 
37
37
  &:hover {
@@ -1,16 +1,17 @@
1
1
  import { css } from "lit";
2
+ import { type } from "../typography.js";
2
3
  export const selectStyles = css `
3
4
  .Trigger {
4
5
  height: var(--component-height-md);
5
6
  gap: var(--space-2);
6
7
  padding: var(--space-2) var(--space-3);
7
- border: var(--border-width-thin) solid var(--input);
8
+ border: var(--border-width-thin) solid var(--border);
8
9
  border-radius: var(--radius-md);
9
- background: var(--input-bg);
10
- color: var(--foreground);
10
+ background: var(--sunken);
11
+ color: var(--text-1);
11
12
  font-family: var(--font-sans);
12
- font-size: var(--font-size-sm);
13
- line-height: var(--line-height-normal);
13
+ ${type("sm")}
14
+ transition-property: border-color, box-shadow, background, filter, transform;
14
15
  transition-duration: var(--duration-fast);
15
16
  }
16
17
 
@@ -21,12 +22,12 @@ export const selectStyles = css `
21
22
  .Trigger:focus-visible {
22
23
  outline: none;
23
24
  box-shadow:
24
- 0 0 0 var(--space-0_5) var(--background),
25
- 0 0 0 var(--space-1) var(--ring);
25
+ 0 0 0 var(--focus-ring-offset) var(--background),
26
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
26
27
  }
27
28
 
28
29
  .Trigger[data-disabled] {
29
- opacity: 0.5;
30
+ opacity: 0.4;
30
31
  }
31
32
 
32
33
  .Trigger[data-invalid] {
@@ -34,11 +35,62 @@ export const selectStyles = css `
34
35
  }
35
36
 
36
37
  .Value[data-placeholder] {
37
- color: var(--muted-foreground);
38
+ color: var(--text-3);
38
39
  }
39
40
 
40
41
  .Icon {
41
42
  --icon-size: var(--space-4);
42
- color: var(--foreground);
43
+ color: var(--text-1);
44
+ }
45
+
46
+ /* ---- Popup (rendered in portal shadow root) ---- */
47
+
48
+ .Popup {
49
+ background: var(--surface-3);
50
+ border: var(--border-width-thin) solid var(--border);
51
+ border-radius: var(--radius-md);
52
+ box-shadow: var(--shadow-md);
53
+ transition-duration: var(--duration-fast);
54
+ transition-timing-function: var(--ease-out-3);
55
+ }
56
+
57
+ .Popup[data-starting-style],
58
+ .Popup[data-ending-style] {
59
+ transform: translateY(calc(var(--space-1) * -1));
60
+ }
61
+
62
+ .Listbox {
63
+ padding: var(--space-1);
64
+ }
65
+
66
+ .Item {
67
+ gap: var(--space-2);
68
+ padding: var(--space-1_5) var(--space-2);
69
+ border-radius: var(--radius-sm);
70
+ ${type("sm")}
71
+ font-family: var(--font-sans);
72
+ color: var(--text-1);
73
+ }
74
+
75
+ .Item:hover,
76
+ .Item[data-highlighted] {
77
+ background: oklch(from var(--foreground) l c h / 0.05);
78
+ color: var(--text-1);
79
+ }
80
+
81
+ .Item[data-selected] {
82
+ font-weight: var(--font-weight-medium);
83
+ }
84
+
85
+ .Item[data-disabled] {
86
+ opacity: 0.4;
87
+ }
88
+
89
+ .ItemIndicator {
90
+ width: var(--space-3_5);
91
+ }
92
+
93
+ .ItemIndicator dui-icon {
94
+ --icon-size: var(--space-3_5);
43
95
  }
44
96
  `;
@@ -1,13 +1,13 @@
1
1
  import { css } from "lit";
2
+ import { type } from "../typography.js";
2
3
  export const sidebarGroupLabelStyles = css `
3
4
  :host {
4
5
  margin-left: var(--sidebar-group-label-inset);
5
6
  height: var(--component-height-sm);
6
7
  color: var(--sidebar-muted-fg);
7
8
  font-family: var(--font-sans);
8
- font-size: var(--font-size-xs);
9
+ ${type("xs", { lineHeight: "var(--line-height-snug)" })}
9
10
  font-weight: var(--font-weight-medium);
10
- line-height: var(--line-height-snug);
11
11
  }
12
12
 
13
13
  :host([data-icon-collapsed]) {
@@ -30,19 +30,11 @@ export const sidebarMenuButtonStyles = css `
30
30
  }
31
31
 
32
32
  .Row:hover {
33
- background: color-mix(
34
- in oklch,
35
- var(--sidebar-button-bg) 100%,
36
- var(--foreground) 8%
37
- );
33
+ background: oklch(from var(--foreground) l c h / 0.05);
38
34
  }
39
35
 
40
36
  .Row[data-active] {
41
- background: color-mix(
42
- in oklch,
43
- var(--sidebar-button-bg) 100%,
44
- var(--foreground) 12%
45
- );
37
+ background: oklch(from var(--foreground) l c h / 0.10);
46
38
  }
47
39
 
48
40
  .Row[data-icon-collapsed] {
@@ -56,7 +48,7 @@ export const sidebarMenuButtonStyles = css `
56
48
  color: var(--sidebar-button-fg);
57
49
  font-family: var(--font-sans);
58
50
  font-size: var(--smb-font-size);
59
- font-weight: var(--font-weight-normal);
51
+ font-weight: var(--font-weight-regular);
60
52
  letter-spacing: var(--letter-spacing-tight);
61
53
  line-height: var(--line-height-snug);
62
54
  --icon-size: var(--smb-icon-size);
@@ -65,13 +57,13 @@ export const sidebarMenuButtonStyles = css `
65
57
 
66
58
  .Button:focus-visible {
67
59
  box-shadow:
68
- 0 0 0 var(--space-0_5) var(--background),
69
- 0 0 0 var(--space-1) var(--sidebar-ring);
60
+ 0 0 0 var(--focus-ring-offset) var(--background),
61
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--sidebar-ring);
70
62
  border-radius: var(--smb-radius);
71
63
  }
72
64
 
73
65
  :host([disabled]) .Row {
74
- opacity: 0.5;
66
+ opacity: 0.4;
75
67
  }
76
68
 
77
69
  :host([active]) .Button {
@@ -8,21 +8,13 @@ export const sidebarProviderStyles = css `
8
8
  --sidebar-group-label-inset: var(--space-6);
9
9
  --sidebar-button-inset: var(--space-4);
10
10
  --sidebar-header-content-gap: var(--space-4);
11
- --sidebar-bg: color-mix(
12
- in oklch,
13
- var(--background) 97%,
14
- var(--foreground)
15
- );
16
- --sidebar-fg: var(--card-foreground);
17
- --sidebar-separator: color-mix(
18
- in oklch,
19
- var(--foreground) 10%,
20
- oklch(0 0 0 / 0)
21
- );
11
+ --sidebar-bg: var(--surface-1);
12
+ --sidebar-fg: var(--text-1);
13
+ --sidebar-separator: var(--border);
22
14
  --sidebar-border: var(--border);
23
15
  --sidebar-button-bg: oklch(0 0 0 / 0);
24
- --sidebar-button-fg: var(--foreground);
25
- --sidebar-muted-fg: var(--muted-foreground);
26
- --sidebar-ring: var(--ring);
16
+ --sidebar-button-fg: var(--text-1);
17
+ --sidebar-muted-fg: var(--text-2);
18
+ --sidebar-ring: var(--accent);
27
19
  }
28
20
  `;
@@ -70,7 +70,7 @@ export const sidebarStyles = css `
70
70
 
71
71
  .Backdrop {
72
72
  background: black;
73
- opacity: 0.2;
73
+ opacity: 0.4;
74
74
  }
75
75
 
76
76
  .Backdrop[data-starting-style],
@@ -10,17 +10,17 @@ export const sliderStyles = css `
10
10
  }
11
11
 
12
12
  [part="root"][data-disabled] {
13
- opacity: 0.5;
13
+ opacity: 0.4;
14
14
  }
15
15
 
16
16
  [part="track"] {
17
17
  height: var(--slider-track-height);
18
- background: var(--muted);
18
+ background: var(--surface-1);
19
19
  border-radius: calc(var(--slider-track-height) / 2);
20
20
  }
21
21
 
22
22
  [part="indicator"] {
23
- background: var(--primary);
23
+ background: var(--accent);
24
24
  border-radius: calc(var(--slider-track-height) / 2);
25
25
  transition: width 50ms ease-out;
26
26
  }
@@ -33,8 +33,9 @@ export const sliderStyles = css `
33
33
  width: var(--slider-thumb-size);
34
34
  height: var(--slider-thumb-size);
35
35
  background: var(--background);
36
- border: 2px solid var(--primary);
36
+ border: var(--border-width-medium) solid var(--accent);
37
37
  border-radius: 50%;
38
+ transition-property: left, box-shadow;
38
39
  transition-duration: 50ms, var(--duration-fast);
39
40
  transition-timing-function: ease-out, ease;
40
41
  }
@@ -45,13 +46,13 @@ export const sliderStyles = css `
45
46
 
46
47
  @media (hover: hover) {
47
48
  [part="thumb"]:hover {
48
- box-shadow: 0 0 0 4px color-mix(in oklch, var(--primary) 20%, transparent);
49
+ box-shadow: 0 0 0 var(--space-1) color-mix(in oklch, var(--accent) 20%, transparent);
49
50
  }
50
51
  }
51
52
 
52
53
  [part="thumb"]:focus-visible {
53
54
  box-shadow:
54
- 0 0 0 var(--space-0_5) var(--background),
55
- 0 0 0 var(--space-1) var(--ring);
55
+ 0 0 0 var(--focus-ring-offset) var(--background),
56
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
56
57
  }
57
58
  `;
@@ -17,18 +17,19 @@ export const switchStyles = css `
17
17
  (var(--line-height-normal) * 1em - var(--switch-height)) / 2
18
18
  );
19
19
  border-radius: calc(var(--switch-height) / 2);
20
- outline: var(--border-width-thin) solid var(--input);
21
- background: color-mix(in oklch, var(--input) 50%, transparent);
20
+ outline: var(--border-width-thin) solid var(--border-strong);
21
+ background: oklch(from var(--foreground) l c h / 0.12);
22
+ transition-property: background, outline-color, box-shadow, filter, transform;
22
23
  transition-duration: var(--duration-fast);
23
24
  }
24
25
 
25
26
  [part="root"][data-checked] {
26
- background: var(--primary);
27
- outline-color: var(--primary);
27
+ background: var(--accent);
28
+ outline-color: var(--accent);
28
29
  }
29
30
 
30
31
  [part="root"][data-disabled] {
31
- opacity: 0.5;
32
+ opacity: 0.4;
32
33
  cursor: not-allowed;
33
34
  }
34
35
 
@@ -39,8 +40,8 @@ export const switchStyles = css `
39
40
  [part="root"]:focus-visible {
40
41
  outline: none;
41
42
  box-shadow:
42
- 0 0 0 var(--space-0_5) var(--background),
43
- 0 0 0 var(--space-1) var(--ring);
43
+ 0 0 0 var(--focus-ring-offset) var(--background),
44
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
44
45
  }
45
46
 
46
47
  [part="root"][data-invalid] {
@@ -56,14 +57,14 @@ export const switchStyles = css `
56
57
  width: var(--switch-thumb-size);
57
58
  height: var(--switch-thumb-size);
58
59
  border-radius: 50%;
59
- outline: 1px solid transparent;
60
- background: var(--primary);
60
+ outline: var(--border-width-thin) solid transparent;
61
+ background: var(--background);
62
+ transition-property: transform, outline-color;
61
63
  transition-duration: var(--duration-fast);
62
64
  transition-timing-function: var(--ease-out-3);
63
65
  }
64
66
 
65
67
  [part="root"][data-checked] [part="thumb"] {
66
- background: var(--primary-foreground);
67
- outline-color: var(--primary-foreground);
68
+ background: oklch(from var(--accent) 0.98 0.01 h);
68
69
  }
69
70
  `;