@deepfuture/dui-theme-default 0.0.1 → 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.
- package/README.md +191 -0
- package/components/accordion-item.js +11 -10
- package/components/alert-dialog-popup.js +9 -17
- package/components/avatar.js +2 -2
- package/components/badge.js +55 -29
- package/components/breadcrumb-ellipsis.js +1 -1
- package/components/breadcrumb-link.js +2 -2
- package/components/breadcrumb-page.js +1 -1
- package/components/breadcrumb-separator.js +1 -1
- package/components/breadcrumb.js +3 -2
- package/components/button.js +88 -51
- package/components/calendar.js +24 -21
- package/components/checkbox-group.js +1 -1
- package/components/checkbox.js +10 -9
- package/components/collapsible.js +11 -10
- package/components/combobox.js +65 -19
- package/components/command-empty.js +3 -2
- package/components/command-group.js +3 -2
- package/components/command-input.js +4 -3
- package/components/command-item.js +6 -5
- package/components/command-list.js +1 -1
- package/components/command-separator.js +1 -1
- package/components/command-shortcut.js +3 -2
- package/components/command.js +2 -2
- package/components/data-table.js +20 -19
- package/components/dialog-popup.js +9 -17
- package/components/dropzone.js +10 -9
- package/components/input.js +13 -12
- package/components/menu-item.js +11 -9
- package/components/menu.js +19 -1
- package/components/number-field.js +13 -11
- package/components/popover-popup.js +25 -1
- package/components/preview-card-popup.js +26 -1
- package/components/progress.js +2 -2
- package/components/radio.js +11 -10
- package/components/scroll-area.js +9 -9
- package/components/select.js +62 -10
- package/components/sidebar-group-label.js +2 -2
- package/components/sidebar-menu-button.js +6 -14
- package/components/sidebar-provider.js +6 -14
- package/components/sidebar.js +1 -1
- package/components/slider.js +8 -7
- package/components/switch.js +12 -11
- package/components/tab.js +10 -9
- package/components/tabs-indicator.js +3 -3
- package/components/tabs-panel.js +3 -2
- package/components/textarea.js +11 -10
- package/components/toggle-group.js +0 -1
- package/components/toggle.js +28 -11
- package/components/tooltip-popup.js +29 -1
- package/components/trunc.js +3 -3
- package/index.d.ts +4 -0
- package/index.js +6 -0
- package/package.json +17 -4
- package/prose.d.ts +2 -0
- package/prose.js +4 -0
- package/tokens-raw.js +1 -1
- package/tokens.css +95 -72
- package/tokens.js +3 -2
- package/types.d.ts +18 -0
- package/types.js +8 -0
- package/typography.d.ts +104 -0
- package/typography.js +103 -0
package/components/select.js
CHANGED
|
@@ -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(--
|
|
8
|
+
border: var(--border-width-thin) solid var(--border);
|
|
8
9
|
border-radius: var(--radius-md);
|
|
9
|
-
background: var(--
|
|
10
|
-
color: var(--
|
|
10
|
+
background: var(--sunken);
|
|
11
|
+
color: var(--text-1);
|
|
11
12
|
font-family: var(--font-sans);
|
|
12
|
-
|
|
13
|
-
|
|
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(--
|
|
25
|
-
0 0 0 var(--
|
|
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.
|
|
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(--
|
|
38
|
+
color: var(--text-3);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
.Icon {
|
|
41
42
|
--icon-size: var(--space-4);
|
|
42
|
-
color: var(--
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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-
|
|
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(--
|
|
69
|
-
0 0 0 var(--
|
|
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.
|
|
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:
|
|
12
|
-
|
|
13
|
-
|
|
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(--
|
|
25
|
-
--sidebar-muted-fg: var(--
|
|
26
|
-
--sidebar-ring: var(--
|
|
16
|
+
--sidebar-button-fg: var(--text-1);
|
|
17
|
+
--sidebar-muted-fg: var(--text-2);
|
|
18
|
+
--sidebar-ring: var(--accent);
|
|
27
19
|
}
|
|
28
20
|
`;
|
package/components/sidebar.js
CHANGED
package/components/slider.js
CHANGED
|
@@ -10,17 +10,17 @@ export const sliderStyles = css `
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
[part="root"][data-disabled] {
|
|
13
|
-
opacity: 0.
|
|
13
|
+
opacity: 0.4;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
[part="track"] {
|
|
17
17
|
height: var(--slider-track-height);
|
|
18
|
-
background: var(--
|
|
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(--
|
|
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:
|
|
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
|
|
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(--
|
|
55
|
-
0 0 0 var(--
|
|
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
|
`;
|
package/components/switch.js
CHANGED
|
@@ -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(--
|
|
21
|
-
background:
|
|
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(--
|
|
27
|
-
outline-color: var(--
|
|
27
|
+
background: var(--accent);
|
|
28
|
+
outline-color: var(--accent);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
[part="root"][data-disabled] {
|
|
31
|
-
opacity: 0.
|
|
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(--
|
|
43
|
-
0 0 0 var(--
|
|
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:
|
|
60
|
-
background: var(--
|
|
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(--
|
|
67
|
-
outline-color: var(--primary-foreground);
|
|
68
|
+
background: oklch(from var(--accent) 0.98 0.01 h);
|
|
68
69
|
}
|
|
69
70
|
`;
|
package/components/tab.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
+
import { type } from "../typography.js";
|
|
2
3
|
export const tabStyles = css `
|
|
3
4
|
[part="tab"] {
|
|
4
|
-
color: var(--
|
|
5
|
-
|
|
6
|
-
line-height: var(--line-height-snug);
|
|
5
|
+
color: var(--text-2);
|
|
6
|
+
${type("sm", { lineHeight: "var(--line-height-snug)" })}
|
|
7
7
|
font-weight: var(--font-weight-medium);
|
|
8
8
|
padding-inline: var(--space-2);
|
|
9
|
-
height:
|
|
9
|
+
height: var(--component-height-md);
|
|
10
|
+
transition-property: color, box-shadow, background, filter, transform;
|
|
10
11
|
transition-duration: var(--duration-fast);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
[part="tab"][data-active] {
|
|
14
|
-
color: var(--
|
|
15
|
+
color: var(--text-1);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
@media (hover: hover) {
|
|
18
19
|
[part="tab"]:hover:not([data-disabled]) {
|
|
19
|
-
color: var(--
|
|
20
|
+
color: var(--text-1);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
[part="tab"]:focus-visible {
|
|
24
25
|
box-shadow:
|
|
25
|
-
0 0 0 var(--
|
|
26
|
-
0 0 0 var(--
|
|
26
|
+
0 0 0 var(--focus-ring-offset) var(--background),
|
|
27
|
+
0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
|
|
27
28
|
border-radius: var(--radius-sm);
|
|
28
29
|
z-index: 1;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
[part="tab"][data-disabled] {
|
|
32
|
-
opacity: 0.
|
|
33
|
+
opacity: 0.4;
|
|
33
34
|
}
|
|
34
35
|
`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
export const tabsIndicatorStyles = css `
|
|
3
3
|
:host {
|
|
4
|
-
height:
|
|
4
|
+
height: var(--space-6);
|
|
5
5
|
border-radius: var(--radius-sm);
|
|
6
|
-
background: var(--
|
|
7
|
-
transition-duration:
|
|
6
|
+
background: oklch(from var(--foreground) l c h / 0.08);
|
|
7
|
+
transition-duration: var(--duration-normal);
|
|
8
8
|
transition-timing-function: var(--ease-in-out-3);
|
|
9
9
|
}
|
|
10
10
|
`;
|
package/components/tabs-panel.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
export const tabsPanelStyles = css `
|
|
3
3
|
[part="panel"] {
|
|
4
|
+
transition-property: box-shadow;
|
|
4
5
|
transition-duration: var(--duration-fast);
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
[part="panel"]:focus-visible {
|
|
8
9
|
box-shadow:
|
|
9
|
-
0 0 0 var(--
|
|
10
|
-
0 0 0 var(--
|
|
10
|
+
0 0 0 var(--focus-ring-offset) var(--background),
|
|
11
|
+
0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
|
|
11
12
|
border-radius: var(--radius-md);
|
|
12
13
|
}
|
|
13
14
|
`;
|
package/components/textarea.js
CHANGED
|
@@ -9,10 +9,11 @@ export const textareaStyles = css `
|
|
|
9
9
|
font-family: var(--font-sans);
|
|
10
10
|
font-size: var(--font-size);
|
|
11
11
|
line-height: var(--line-height-snug);
|
|
12
|
-
color: var(--
|
|
13
|
-
border: var(--border-width-thin) solid var(--
|
|
14
|
-
background: var(--
|
|
12
|
+
color: var(--text-1);
|
|
13
|
+
border: var(--border-width-thin) solid var(--border);
|
|
14
|
+
background: var(--sunken);
|
|
15
15
|
border-radius: var(--radius-md);
|
|
16
|
+
transition-property: border-color, box-shadow, background, filter, transform;
|
|
16
17
|
transition-duration: var(--duration-fast);
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -23,7 +24,7 @@ export const textareaStyles = css `
|
|
|
23
24
|
/* Scrollbar */
|
|
24
25
|
[part="textarea"] {
|
|
25
26
|
scrollbar-width: thin;
|
|
26
|
-
scrollbar-color: color-mix(in srgb, var(--
|
|
27
|
+
scrollbar-color: color-mix(in srgb, var(--text-2) 50%, transparent) transparent;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
[part="textarea"]::-webkit-scrollbar {
|
|
@@ -35,28 +36,28 @@ export const textareaStyles = css `
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
[part="textarea"]::-webkit-scrollbar-thumb {
|
|
38
|
-
background: color-mix(in srgb, var(--
|
|
39
|
+
background: color-mix(in srgb, var(--text-2) 50%, transparent);
|
|
39
40
|
border-radius: var(--radius-sm);
|
|
40
41
|
border: 0.125rem solid transparent;
|
|
41
42
|
background-clip: padding-box;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
[part="textarea"]::-webkit-scrollbar-thumb:hover {
|
|
45
|
-
background: color-mix(in srgb, var(--
|
|
46
|
+
background: color-mix(in srgb, var(--text-2) 70%, transparent);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
[part="textarea"]::placeholder {
|
|
49
|
-
color: var(--
|
|
50
|
+
color: var(--text-3);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
[part="textarea"]:focus-visible {
|
|
53
54
|
box-shadow:
|
|
54
|
-
0 0 0 var(--
|
|
55
|
-
0 0 0 var(--
|
|
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
|
|
|
58
59
|
[part="textarea"]:disabled {
|
|
59
|
-
opacity: 0.
|
|
60
|
+
opacity: 0.4;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
[part="textarea"][data-invalid] {
|
package/components/toggle.js
CHANGED
|
@@ -1,34 +1,51 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
+
import { type } from "../typography.js";
|
|
2
3
|
export const toggleStyles = css `
|
|
4
|
+
/* --_select / --_interact alpha overlay pattern */
|
|
5
|
+
|
|
3
6
|
[part="root"] {
|
|
4
|
-
|
|
7
|
+
--_select: 0;
|
|
8
|
+
--_interact: 0;
|
|
9
|
+
--toggle-gap: var(--space-1_5);
|
|
10
|
+
--icon-size: var(--space-4);
|
|
11
|
+
--icon-color: currentColor;
|
|
12
|
+
height: var(--component-height-md);
|
|
5
13
|
padding: 0 var(--space-2_5);
|
|
6
14
|
border-radius: var(--radius-md);
|
|
7
|
-
|
|
15
|
+
border: var(--border-width-thin) solid var(--border);
|
|
16
|
+
${type("sm")}
|
|
8
17
|
font-weight: var(--font-weight-medium);
|
|
9
|
-
color: var(--
|
|
10
|
-
|
|
18
|
+
color: var(--text-2);
|
|
19
|
+
background: oklch(from var(--foreground) l c h / calc(var(--_select) + var(--_interact)));
|
|
20
|
+
transition-property: background, color, box-shadow;
|
|
11
21
|
transition-duration: var(--duration-fast);
|
|
22
|
+
min-width: var(--component-height-md);
|
|
12
23
|
}
|
|
13
24
|
|
|
14
25
|
@media (hover: hover) {
|
|
15
26
|
[part="root"]:hover:not(:disabled):not([data-pressed]) {
|
|
16
|
-
|
|
17
|
-
color: var(--
|
|
27
|
+
--_interact: 0.05;
|
|
28
|
+
color: var(--text-1);
|
|
18
29
|
}
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
[part="root"][data-pressed] {
|
|
22
|
-
|
|
23
|
-
color: var(--
|
|
33
|
+
--_select: 0.10;
|
|
34
|
+
color: var(--text-1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[part="root"]:active:not(:disabled) {
|
|
38
|
+
--_interact: 0.10;
|
|
24
39
|
}
|
|
25
40
|
|
|
26
41
|
[part="root"]:focus-visible {
|
|
27
|
-
outline:
|
|
28
|
-
|
|
42
|
+
outline: none;
|
|
43
|
+
box-shadow:
|
|
44
|
+
0 0 0 var(--focus-ring-offset) var(--background),
|
|
45
|
+
0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
|
|
29
46
|
}
|
|
30
47
|
|
|
31
48
|
[part="root"]:disabled {
|
|
32
|
-
opacity: 0.
|
|
49
|
+
opacity: 0.4;
|
|
33
50
|
}
|
|
34
51
|
`;
|
|
@@ -1,2 +1,30 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
|
|
2
|
+
import { type } from "../typography.js";
|
|
3
|
+
export const tooltipPopupStyles = css `
|
|
4
|
+
.Popup {
|
|
5
|
+
padding: var(--space-0_5) var(--space-1_5);
|
|
6
|
+
border-radius: var(--radius-sm);
|
|
7
|
+
background: color-mix(
|
|
8
|
+
in oklch,
|
|
9
|
+
var(--foreground) 90%,
|
|
10
|
+
oklch(0 0 0 / 0)
|
|
11
|
+
);
|
|
12
|
+
backdrop-filter: var(--filter-blur-sm);
|
|
13
|
+
color: var(--background);
|
|
14
|
+
font-family: var(--font-sans);
|
|
15
|
+
${type("xs", { lineHeight: "var(--line-height-snug)" })}
|
|
16
|
+
box-shadow: var(--shadow-sm);
|
|
17
|
+
max-width: var(--space-80);
|
|
18
|
+
transition-duration: var(--duration-fastest);
|
|
19
|
+
transition-timing-function: var(--ease-out-3);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Arrow .arrow-fill {
|
|
23
|
+
fill: color-mix(in oklch, var(--foreground) 90%, oklch(0 0 0 / 0));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.Arrow .arrow-stroke {
|
|
27
|
+
fill: none;
|
|
28
|
+
stroke: none;
|
|
29
|
+
}
|
|
30
|
+
`;
|
package/components/trunc.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
+
import { type } from "../typography.js";
|
|
2
3
|
export const truncStyles = css `
|
|
3
4
|
[part="root"] {
|
|
4
5
|
font-family: var(--font-sans);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
color: var(--foreground);
|
|
6
|
+
${type("sm")}
|
|
7
|
+
color: var(--text-1);
|
|
8
8
|
}
|
|
9
9
|
`;
|
package/index.d.ts
CHANGED
|
@@ -80,3 +80,7 @@ export { toggleGroupStyles } from "./components/toggle-group.js";
|
|
|
80
80
|
export { numberFieldStyles } from "./components/number-field.js";
|
|
81
81
|
export { menubarStyles } from "./components/menubar.js";
|
|
82
82
|
export { calendarStyles } from "./components/calendar.js";
|
|
83
|
+
export { proseSheet } from "./prose.js";
|
|
84
|
+
export { type, typeScale } from "./typography.js";
|
|
85
|
+
export type { TypeSize } from "./typography.js";
|
|
86
|
+
export type { ButtonVariant, ButtonAppearance, ButtonSize, BadgeVariant, BadgeAppearance, SpinnerVariant, SpinnerSize, TextareaVariant, SidebarVariant, SidebarMenuButtonSize, ToolbarSize, } from "./types.js";
|
package/index.js
CHANGED
|
@@ -78,10 +78,12 @@ import { toggleGroupStyles } from "./components/toggle-group.js";
|
|
|
78
78
|
import { numberFieldStyles } from "./components/number-field.js";
|
|
79
79
|
import { menubarStyles } from "./components/menubar.js";
|
|
80
80
|
import { calendarStyles } from "./components/calendar.js";
|
|
81
|
+
import { proseSheet } from "./prose.js";
|
|
81
82
|
import { tokenSheet } from "./tokens.js";
|
|
82
83
|
export const defaultTheme = {
|
|
83
84
|
tokens: tokenSheet,
|
|
84
85
|
base: themedBase,
|
|
86
|
+
prose: proseSheet,
|
|
85
87
|
styles: new Map([
|
|
86
88
|
["dui-accordion", accordionStyles],
|
|
87
89
|
["dui-accordion-item", accordionItemStyles],
|
|
@@ -244,3 +246,7 @@ export { toggleGroupStyles } from "./components/toggle-group.js";
|
|
|
244
246
|
export { numberFieldStyles } from "./components/number-field.js";
|
|
245
247
|
export { menubarStyles } from "./components/menubar.js";
|
|
246
248
|
export { calendarStyles } from "./components/calendar.js";
|
|
249
|
+
// --- Prose ---
|
|
250
|
+
export { proseSheet } from "./prose.js";
|
|
251
|
+
// --- Typography helpers ---
|
|
252
|
+
export { type, typeScale } from "./typography.js";
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepfuture/dui-theme-default",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "DUI default theme — design tokens and aesthetic component styles",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "https://github.com/deepfuturenow/dui.git",
|
|
10
10
|
"directory": "packages/theme-default"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
@@ -66,14 +66,26 @@
|
|
|
66
66
|
"import": "./components/tooltip-popup.js",
|
|
67
67
|
"types": "./components/tooltip-popup.d.ts"
|
|
68
68
|
},
|
|
69
|
+
"./types": {
|
|
70
|
+
"import": "./types.js",
|
|
71
|
+
"types": "./types.d.ts"
|
|
72
|
+
},
|
|
69
73
|
"./tokens": {
|
|
70
74
|
"import": "./tokens.js",
|
|
71
75
|
"types": "./tokens.d.ts"
|
|
72
76
|
},
|
|
77
|
+
"./prose": {
|
|
78
|
+
"import": "./prose.js",
|
|
79
|
+
"types": "./prose.d.ts"
|
|
80
|
+
},
|
|
73
81
|
"./tokens-raw": {
|
|
74
82
|
"import": "./tokens-raw.js",
|
|
75
83
|
"types": "./tokens-raw.d.ts"
|
|
76
84
|
},
|
|
85
|
+
"./typography": {
|
|
86
|
+
"import": "./typography.js",
|
|
87
|
+
"types": "./typography.d.ts"
|
|
88
|
+
},
|
|
77
89
|
"./components/dialog": {
|
|
78
90
|
"import": "./components/dialog.js",
|
|
79
91
|
"types": "./components/dialog.d.ts"
|
|
@@ -342,10 +354,11 @@
|
|
|
342
354
|
"files": [
|
|
343
355
|
"**/*.js",
|
|
344
356
|
"**/*.d.ts",
|
|
345
|
-
"**/*.css"
|
|
357
|
+
"**/*.css",
|
|
358
|
+
"README.md"
|
|
346
359
|
],
|
|
347
360
|
"dependencies": {
|
|
348
|
-
"@deepfuture/dui-core": "0.0.
|
|
361
|
+
"@deepfuture/dui-core": "0.0.4",
|
|
349
362
|
"lit": "^3.3.2"
|
|
350
363
|
},
|
|
351
364
|
"sideEffects": false,
|
package/prose.d.ts
ADDED
package/prose.js
ADDED