@opencode-ai/ui 0.0.0-beta-202606270323 → 0.0.0-dev-202606251214
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/package.json +16 -61
- package/src/components/accordion.css +7 -31
- package/src/components/card.css +5 -26
- package/src/components/card.tsx +1 -1
- package/src/styles/tailwind/colors.css +0 -1
- package/src/theme/themes/oc-2.json +14 -20
- package/src/theme/v2/mapping.ts +0 -2
- package/src/v2/components/button-v2.css +0 -24
- package/src/v2/components/button-v2.tsx +1 -1
- package/src/v2/components/dialog-v2.css +7 -31
- package/src/v2/components/dialog-v2.tsx +47 -66
- package/src/v2/components/icon.tsx +0 -20
- package/src/v2/components/project-avatar-v2.css +1 -0
- package/src/v2/components/tooltip-v2.css +0 -4
- package/src/v2/styles/theme.css +0 -16
- package/dist/components/accordion.d.ts +0 -24
- package/dist/components/animated-number.d.ts +0 -4
- package/dist/components/app-icon.d.ts +0 -6
- package/dist/components/app-icons/types.d.ts +0 -2
- package/dist/components/avatar.d.ts +0 -9
- package/dist/components/button.d.ts +0 -9
- package/dist/components/card.d.ts +0 -22
- package/dist/components/checkbox.d.ts +0 -8
- package/dist/components/collapsible.d.ts +0 -17
- package/dist/components/context-menu.d.ts +0 -80
- package/dist/components/dialog.d.ts +0 -12
- package/dist/components/diff-changes.d.ts +0 -11
- package/dist/components/dock-surface.d.ts +0 -7
- package/dist/components/dropdown-menu.d.ts +0 -80
- package/dist/components/favicon.d.ts +0 -1
- package/dist/components/file-icon.d.ts +0 -12
- package/dist/components/file-icons/types.d.ts +0 -2
- package/dist/components/font.d.ts +0 -1
- package/dist/components/hover-card.d.ts +0 -9
- package/dist/components/icon-button.d.ts +0 -10
- package/dist/components/icon.d.ts +0 -104
- package/dist/components/image-preview.d.ts +0 -5
- package/dist/components/inline-input.d.ts +0 -5
- package/dist/components/keybind.d.ts +0 -6
- package/dist/components/list.d.ts +0 -45
- package/dist/components/logo.d.ts +0 -8
- package/dist/components/motion-spring.d.ts +0 -4
- package/dist/components/popover.d.ts +0 -14
- package/dist/components/progress-circle.d.ts +0 -7
- package/dist/components/progress.d.ts +0 -7
- package/dist/components/provider-icon.d.ts +0 -5
- package/dist/components/provider-icons/types.d.ts +0 -2
- package/dist/components/radio-group.d.ts +0 -16
- package/dist/components/resize-handle.d.ts +0 -12
- package/dist/components/scroll-view.d.ts +0 -15
- package/dist/components/select.d.ts +0 -21
- package/dist/components/spinner.d.ts +0 -6
- package/dist/components/sticky-accordion-header.d.ts +0 -5
- package/dist/components/switch.d.ts +0 -7
- package/dist/components/tabs.d.ts +0 -32
- package/dist/components/tag.d.ts +0 -5
- package/dist/components/text-field.d.ts +0 -13
- package/dist/components/text-reveal.d.ts +0 -13
- package/dist/components/text-shimmer.d.ts +0 -8
- package/dist/components/text-strikethrough.d.ts +0 -11
- package/dist/components/toast.d.ts +0 -56
- package/dist/components/tooltip.d.ts +0 -17
- package/dist/components/typewriter.d.ts +0 -6
- package/dist/context/dialog.d.ts +0 -18
- package/dist/context/file.d.ts +0 -5
- package/dist/context/helper.d.ts +0 -14
- package/dist/context/i18n.d.ts +0 -12
- package/dist/context/index.d.ts +0 -4
- package/dist/context/marked.d.ts +0 -9
- package/dist/context/worker-pool.d.ts +0 -9
- package/dist/hooks/create-auto-scroll.d.ts +0 -17
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/use-filtered-list.d.ts +0 -39
- package/dist/i18n/ar.d.ts +0 -148
- package/dist/i18n/br.d.ts +0 -148
- package/dist/i18n/bs.d.ts +0 -148
- package/dist/i18n/da.d.ts +0 -148
- package/dist/i18n/de.d.ts +0 -148
- package/dist/i18n/en.d.ts +0 -1
- package/dist/i18n/es.d.ts +0 -148
- package/dist/i18n/fr.d.ts +0 -148
- package/dist/i18n/ja.d.ts +0 -148
- package/dist/i18n/ko.d.ts +0 -148
- package/dist/i18n/no.d.ts +0 -4
- package/dist/i18n/pl.d.ts +0 -148
- package/dist/i18n/ru.d.ts +0 -148
- package/dist/i18n/th.d.ts +0 -148
- package/dist/i18n/tr.d.ts +0 -148
- package/dist/i18n/uk.d.ts +0 -1
- package/dist/i18n/zh.d.ts +0 -148
- package/dist/i18n/zht.d.ts +0 -148
- package/dist/storybook/fixtures.d.ts +0 -19
- package/dist/storybook/scaffold.d.ts +0 -16
- package/dist/theme/color.d.ts +0 -30
- package/dist/theme/context.d.ts +0 -21
- package/dist/theme/default-themes.d.ts +0 -39
- package/dist/theme/index.d.ts +0 -7
- package/dist/theme/loader.d.ts +0 -6
- package/dist/theme/resolve.d.ts +0 -7
- package/dist/theme/types.d.ts +0 -56
- package/dist/theme/v2/avatar.d.ts +0 -5
- package/dist/theme/v2/default-primitives.d.ts +0 -3
- package/dist/theme/v2/foreground.d.ts +0 -2
- package/dist/theme/v2/mapping.d.ts +0 -3
- package/dist/theme/v2/resolve.d.ts +0 -9
- package/dist/v2/components/accordion-v2.d.ts +0 -26
- package/dist/v2/components/avatar-v2.d.ts +0 -11
- package/dist/v2/components/badge-v2.d.ts +0 -5
- package/dist/v2/components/button-v2.d.ts +0 -10
- package/dist/v2/components/checkbox-v2.d.ts +0 -10
- package/dist/v2/components/dialog-v2.d.ts +0 -25
- package/dist/v2/components/diff-changes-v2.d.ts +0 -11
- package/dist/v2/components/divider-v2.d.ts +0 -5
- package/dist/v2/components/field-v2.d.ts +0 -28
- package/dist/v2/components/icon-button-v2.d.ts +0 -11
- package/dist/v2/components/icon.d.ts +0 -97
- package/dist/v2/components/inline-input-v2.d.ts +0 -21
- package/dist/v2/components/keybind-v2.d.ts +0 -7
- package/dist/v2/components/line-comment-v2.d.ts +0 -28
- package/dist/v2/components/menu-v2.d.ts +0 -52
- package/dist/v2/components/project-avatar-v2.d.ts +0 -11
- package/dist/v2/components/radio-v2.d.ts +0 -16
- package/dist/v2/components/segmented-control-v2.d.ts +0 -21
- package/dist/v2/components/select-v2.d.ts +0 -24
- package/dist/v2/components/switch-v2.d.ts +0 -7
- package/dist/v2/components/tab-state-indicator.d.ts +0 -2
- package/dist/v2/components/tabs-v2.d.ts +0 -34
- package/dist/v2/components/text-input-v2.d.ts +0 -17
- package/dist/v2/components/text-shimmer-v2.d.ts +0 -9
- package/dist/v2/components/textarea-v2.d.ts +0 -7
- package/dist/v2/components/toast-v2.d.ts +0 -48
- package/dist/v2/components/tooltip-v2.d.ts +0 -13
- package/dist/v2/components/wordmark-v2.d.ts +0 -2
- package/src/v2/components/divider-v2.css +0 -11
- package/src/v2/components/divider-v2.tsx +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencode-ai/ui",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-dev-202606251214",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"**/*.css"
|
|
16
16
|
],
|
|
17
17
|
"files": [
|
|
18
|
-
"dist/**/*.d.ts",
|
|
19
18
|
"src/**/*.ts",
|
|
20
19
|
"src/**/*.tsx",
|
|
21
20
|
"!src/**/*.test.ts",
|
|
@@ -34,71 +33,28 @@
|
|
|
34
33
|
],
|
|
35
34
|
"exports": {
|
|
36
35
|
"./package.json": "./package.json",
|
|
37
|
-
"./*":
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"./
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
"./hooks": {
|
|
46
|
-
"types": "./dist/hooks/index.d.ts",
|
|
47
|
-
"import": "./src/hooks/index.ts"
|
|
48
|
-
},
|
|
49
|
-
"./context": {
|
|
50
|
-
"types": "./dist/context/index.d.ts",
|
|
51
|
-
"import": "./src/context/index.ts"
|
|
52
|
-
},
|
|
53
|
-
"./context/*": {
|
|
54
|
-
"types": "./dist/context/*.d.ts",
|
|
55
|
-
"import": "./src/context/*.tsx"
|
|
56
|
-
},
|
|
57
|
-
"./storybook/scaffold": {
|
|
58
|
-
"types": "./dist/storybook/scaffold.d.ts",
|
|
59
|
-
"import": "./src/storybook/scaffold.tsx"
|
|
60
|
-
},
|
|
61
|
-
"./storybook/fixtures": {
|
|
62
|
-
"types": "./dist/storybook/fixtures.d.ts",
|
|
63
|
-
"import": "./src/storybook/fixtures.ts"
|
|
64
|
-
},
|
|
36
|
+
"./*": "./src/components/*.tsx",
|
|
37
|
+
"./i18n/*": "./src/i18n/*.ts",
|
|
38
|
+
"./hooks": "./src/hooks/index.ts",
|
|
39
|
+
"./context": "./src/context/index.ts",
|
|
40
|
+
"./context/*": "./src/context/*.tsx",
|
|
41
|
+
"./storybook/scaffold": "./src/storybook/scaffold.tsx",
|
|
42
|
+
"./storybook/fixtures": "./src/storybook/fixtures.ts",
|
|
65
43
|
"./styles": "./src/styles/index.css",
|
|
66
44
|
"./styles/tailwind": "./src/styles/tailwind/index.css",
|
|
67
|
-
"./theme":
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"./
|
|
72
|
-
|
|
73
|
-
"import": "./src/theme/*.ts"
|
|
74
|
-
},
|
|
75
|
-
"./theme/context": {
|
|
76
|
-
"types": "./dist/theme/context.d.ts",
|
|
77
|
-
"import": "./src/theme/context.tsx"
|
|
78
|
-
},
|
|
79
|
-
"./icons/provider": {
|
|
80
|
-
"types": "./dist/components/provider-icons/types.d.ts",
|
|
81
|
-
"import": "./src/components/provider-icons/types.ts"
|
|
82
|
-
},
|
|
83
|
-
"./icons/file-type": {
|
|
84
|
-
"types": "./dist/components/file-icons/types.d.ts",
|
|
85
|
-
"import": "./src/components/file-icons/types.ts"
|
|
86
|
-
},
|
|
87
|
-
"./icons/app": {
|
|
88
|
-
"types": "./dist/components/app-icons/types.d.ts",
|
|
89
|
-
"import": "./src/components/app-icons/types.ts"
|
|
90
|
-
},
|
|
45
|
+
"./theme": "./src/theme/index.ts",
|
|
46
|
+
"./theme/*": "./src/theme/*.ts",
|
|
47
|
+
"./theme/context": "./src/theme/context.tsx",
|
|
48
|
+
"./icons/provider": "./src/components/provider-icons/types.ts",
|
|
49
|
+
"./icons/file-type": "./src/components/file-icons/types.ts",
|
|
50
|
+
"./icons/app": "./src/components/app-icons/types.ts",
|
|
91
51
|
"./fonts/*": "./src/assets/fonts/*",
|
|
92
52
|
"./audio/*": "./src/assets/audio/*",
|
|
93
53
|
"./v2/*.css": "./src/v2/components/*.css",
|
|
94
|
-
"./v2/*":
|
|
95
|
-
"types": "./dist/v2/components/*.d.ts",
|
|
96
|
-
"import": "./src/v2/components/*.tsx"
|
|
97
|
-
},
|
|
54
|
+
"./v2/*": "./src/v2/components/*.tsx",
|
|
98
55
|
"./v2/styles/*": "./src/v2/styles/*"
|
|
99
56
|
},
|
|
100
57
|
"scripts": {
|
|
101
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
102
58
|
"typecheck": "tsgo --noEmit",
|
|
103
59
|
"test": "bun test src --only-failures",
|
|
104
60
|
"dev": "vite",
|
|
@@ -106,16 +62,15 @@
|
|
|
106
62
|
"generate:v2-oc2": "bun run script/build-oc2-v2-overrides.ts"
|
|
107
63
|
},
|
|
108
64
|
"devDependencies": {
|
|
109
|
-
"@solidjs/meta": "0.29.4",
|
|
110
65
|
"@tailwindcss/vite": "4.1.11",
|
|
111
66
|
"@tsconfig/node22": "22.0.2",
|
|
112
67
|
"@types/bun": "1.3.13",
|
|
113
68
|
"@types/katex": "0.16.7",
|
|
114
69
|
"@types/luxon": "3.7.1",
|
|
115
70
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
71
|
+
"@solidjs/meta": "0.29.4",
|
|
116
72
|
"solid-js": "1.9.10",
|
|
117
73
|
"tailwindcss": "4.1.11",
|
|
118
|
-
"tw-animate-css": "1.4.0",
|
|
119
74
|
"typescript": "5.8.2",
|
|
120
75
|
"vite": "7.1.4",
|
|
121
76
|
"vite-plugin-icons-spritesheet": "3.0.1",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
cursor: default;
|
|
36
36
|
user-select: none;
|
|
37
37
|
|
|
38
|
-
background-color: var(--
|
|
39
|
-
border:
|
|
38
|
+
background-color: var(--background-stronger);
|
|
39
|
+
border: 1px solid var(--border-weak-base);
|
|
40
40
|
border-radius: 0;
|
|
41
41
|
box-shadow: none;
|
|
42
42
|
overflow: clip;
|
|
43
|
-
color: var(--
|
|
43
|
+
color: var(--text-strong);
|
|
44
44
|
transition: background-color 0.15s ease;
|
|
45
45
|
|
|
46
46
|
/* text-12-regular */
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
letter-spacing: var(--letter-spacing-normal);
|
|
53
53
|
|
|
54
54
|
&:hover:not([data-disabled]) {
|
|
55
|
-
background-color: var(--
|
|
55
|
+
background-color: var(--surface-base-hover);
|
|
56
56
|
}
|
|
57
57
|
&:active:not([data-disabled]) {
|
|
58
|
-
background-color: var(--
|
|
58
|
+
background-color: var(--surface-base-active);
|
|
59
59
|
}
|
|
60
60
|
&:focus-visible {
|
|
61
61
|
outline: none;
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
|
|
83
83
|
&[data-expanded] {
|
|
84
84
|
[data-slot="accordion-content"] {
|
|
85
|
-
border:
|
|
85
|
+
border: 1px solid var(--border-weak-base);
|
|
86
86
|
border-top: 0;
|
|
87
|
-
background-color: var(--
|
|
87
|
+
background-color: var(--background-stronger);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -104,30 +104,6 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
body:not([data-new-layout]) [data-component="accordion"] {
|
|
108
|
-
[data-slot="accordion-item"] [data-slot="accordion-header"] [data-slot="accordion-trigger"] {
|
|
109
|
-
background-color: var(--background-stronger);
|
|
110
|
-
border-width: 1px;
|
|
111
|
-
border-color: var(--border-weak-base);
|
|
112
|
-
color: var(--text-strong);
|
|
113
|
-
|
|
114
|
-
&:hover:not([data-disabled]) {
|
|
115
|
-
background-color: var(--surface-base-hover);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&:active:not([data-disabled]) {
|
|
119
|
-
background-color: var(--surface-base-active);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
[data-slot="accordion-item"][data-expanded] [data-slot="accordion-content"] {
|
|
124
|
-
border-width: 1px;
|
|
125
|
-
border-color: var(--border-weak-base);
|
|
126
|
-
border-top: 0;
|
|
127
|
-
background-color: var(--background-stronger);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
107
|
@keyframes slideDown {
|
|
132
108
|
from {
|
|
133
109
|
height: 0;
|
package/src/components/card.css
CHANGED
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
font-weight: var(--font-weight-regular);
|
|
20
20
|
line-height: var(--line-height-large);
|
|
21
21
|
letter-spacing: var(--letter-spacing-normal);
|
|
22
|
-
color: var(--
|
|
22
|
+
color: var(--text-strong);
|
|
23
23
|
|
|
24
24
|
--card-gap: 8px;
|
|
25
25
|
--card-icon: 16px;
|
|
26
26
|
--card-indent: 0px;
|
|
27
27
|
--card-line-pad: 8px;
|
|
28
28
|
|
|
29
|
-
--card-accent: var(--
|
|
29
|
+
--card-accent: var(--icon-active);
|
|
30
30
|
|
|
31
31
|
&:has([data-slot="card-title"]) {
|
|
32
32
|
gap: 8px;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
:where([data-card="title"], [data-slot="card-title"]) {
|
|
51
|
-
color: var(--
|
|
51
|
+
color: var(--text-strong);
|
|
52
52
|
font-weight: var(--font-weight-medium);
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
:where([data-slot="card-title-icon"][data-placeholder]) [data-component="icon"] {
|
|
75
|
-
color: var(--
|
|
75
|
+
color: var(--text-weak);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
:where([data-slot="card-title-icon"])
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
:where([data-card="description"], [data-slot="card-description"]) {
|
|
85
|
-
color: var(--
|
|
85
|
+
color: var(--text-base);
|
|
86
86
|
white-space: pre-wrap;
|
|
87
87
|
overflow-wrap: anywhere;
|
|
88
88
|
word-break: break-word;
|
|
@@ -92,24 +92,3 @@
|
|
|
92
92
|
padding-left: var(--card-indent);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
body:not([data-new-layout]) [data-component="card"] {
|
|
97
|
-
color: var(--text-strong);
|
|
98
|
-
--card-accent: var(--icon-active);
|
|
99
|
-
|
|
100
|
-
:where([data-card="title"], [data-slot="card-title"]) {
|
|
101
|
-
color: var(--text-strong);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
:where([data-slot="card-title-icon"][data-placeholder]) [data-component="icon"] {
|
|
105
|
-
color: var(--text-weak);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
:where([data-card="description"], [data-slot="card-description"]) {
|
|
109
|
-
color: var(--text-base);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&[data-variant="error"] {
|
|
113
|
-
--card-accent: var(--icon-critical-base) !important;
|
|
114
|
-
}
|
|
115
|
-
}
|
package/src/components/card.tsx
CHANGED
|
@@ -40,7 +40,7 @@ export function Card(props: CardProps) {
|
|
|
40
40
|
const variant = () => split.variant ?? "normal"
|
|
41
41
|
const accent = () => {
|
|
42
42
|
const v = variant()
|
|
43
|
-
if (v === "error") return "var(--
|
|
43
|
+
if (v === "error") return "var(--icon-critical-base)"
|
|
44
44
|
if (v === "warning") return "var(--icon-warning-active)"
|
|
45
45
|
if (v === "success") return "var(--icon-success-active)"
|
|
46
46
|
if (v === "info") return "var(--icon-info-active)"
|
|
@@ -249,7 +249,6 @@
|
|
|
249
249
|
--color-v2-text-text-contrast: var(--v2-text-text-contrast);
|
|
250
250
|
--color-v2-text-text-accent: var(--v2-text-text-accent);
|
|
251
251
|
--color-v2-text-text-accent-hover: var(--v2-text-text-accent-hover);
|
|
252
|
-
--color-v2-text-text-code-accent: var(--v2-text-text-code-accent);
|
|
253
252
|
--color-v2-icon-icon-base: var(--v2-icon-icon-base);
|
|
254
253
|
--color-v2-icon-icon-muted: var(--v2-icon-icon-muted);
|
|
255
254
|
--color-v2-icon-icon-inverse: var(--v2-icon-icon-inverse);
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
"text-base": "#6F6F6F",
|
|
21
21
|
"text-weak": "#8F8F8F",
|
|
22
22
|
"text-weaker": "#C7C7C7",
|
|
23
|
-
"text-diff-add-base": "var(--v2-state-fg-success)",
|
|
24
|
-
"text-diff-delete-base": "var(--v2-state-fg-danger)",
|
|
25
23
|
"border-weak-base": "#DBDBDB",
|
|
26
24
|
"border-weaker-base": "#E8E8E8",
|
|
27
25
|
"icon-base": "#8F8F8F",
|
|
@@ -33,14 +31,14 @@
|
|
|
33
31
|
"surface-interactive-weak": "#F5FAFF",
|
|
34
32
|
"icon-success-base": "#0ABE00",
|
|
35
33
|
"surface-success-base": "#E6FFE5",
|
|
36
|
-
"syntax-comment": "
|
|
37
|
-
"syntax-keyword": "
|
|
38
|
-
"syntax-string": "
|
|
39
|
-
"syntax-primitive": "
|
|
40
|
-
"syntax-property": "
|
|
41
|
-
"syntax-type": "
|
|
34
|
+
"syntax-comment": "#7a7a7a",
|
|
35
|
+
"syntax-keyword": "#a753ae",
|
|
36
|
+
"syntax-string": "#00ceb9",
|
|
37
|
+
"syntax-primitive": "#034cff",
|
|
38
|
+
"syntax-property": "#a753ae",
|
|
39
|
+
"syntax-type": "#8a6f00",
|
|
42
40
|
"syntax-constant": "#007b80",
|
|
43
|
-
"syntax-critical": "
|
|
41
|
+
"syntax-critical": "#ff8c00",
|
|
44
42
|
"syntax-diff-delete": "#ff8c00",
|
|
45
43
|
"syntax-diff-unknown": "#a753ae",
|
|
46
44
|
"surface-critical-base": "#FFF2F0"
|
|
@@ -172,7 +170,6 @@
|
|
|
172
170
|
"v2-text-text-contrast": "var(--v2-grey-50)",
|
|
173
171
|
"v2-text-text-accent": "var(--v2-blue-600)",
|
|
174
172
|
"v2-text-text-accent-hover": "var(--v2-blue-700)",
|
|
175
|
-
"v2-text-text-code-accent": "var(--v2-blue-900)",
|
|
176
173
|
"v2-icon-icon-base": "var(--v2-grey-800)",
|
|
177
174
|
"v2-icon-icon-muted": "var(--v2-grey-600)",
|
|
178
175
|
"v2-icon-icon-inverse": "var(--v2-grey-50)",
|
|
@@ -255,8 +252,6 @@
|
|
|
255
252
|
"text-base": "#A0A0A0",
|
|
256
253
|
"text-weak": "#707070",
|
|
257
254
|
"text-weaker": "#505050",
|
|
258
|
-
"text-diff-add-base": "var(--v2-state-fg-success)",
|
|
259
|
-
"text-diff-delete-base": "var(--v2-state-fg-danger)",
|
|
260
255
|
"border-weak-base": "#282828",
|
|
261
256
|
"border-weaker-base": "#232323",
|
|
262
257
|
"icon-base": "#7E7E7E",
|
|
@@ -267,14 +262,14 @@
|
|
|
267
262
|
"surface-base-hover": "#FFFFFF0D",
|
|
268
263
|
"surface-interactive-weak": "#0D172B",
|
|
269
264
|
"surface-success-base": "#022B00",
|
|
270
|
-
"syntax-comment": "
|
|
271
|
-
"syntax-keyword": "
|
|
272
|
-
"syntax-string": "
|
|
273
|
-
"syntax-primitive": "
|
|
274
|
-
"syntax-property": "
|
|
275
|
-
"syntax-type": "
|
|
265
|
+
"syntax-comment": "#8f8f8f",
|
|
266
|
+
"syntax-keyword": "#edb2f1",
|
|
267
|
+
"syntax-string": "#00ceb9",
|
|
268
|
+
"syntax-primitive": "#8cb0ff",
|
|
269
|
+
"syntax-property": "#fab283",
|
|
270
|
+
"syntax-type": "#fcd53a",
|
|
276
271
|
"syntax-constant": "#93e9f6",
|
|
277
|
-
"syntax-critical": "
|
|
272
|
+
"syntax-critical": "#fab283",
|
|
278
273
|
"syntax-diff-delete": "#fab283",
|
|
279
274
|
"syntax-diff-unknown": "#edb2f1",
|
|
280
275
|
"surface-critical-base": "#1F0603"
|
|
@@ -406,7 +401,6 @@
|
|
|
406
401
|
"v2-text-text-contrast": "var(--v2-grey-50)",
|
|
407
402
|
"v2-text-text-accent": "var(--v2-blue-400)",
|
|
408
403
|
"v2-text-text-accent-hover": "var(--v2-blue-300)",
|
|
409
|
-
"v2-text-text-code-accent": "var(--v2-blue-400)",
|
|
410
404
|
"v2-icon-icon-base": "var(--v2-grey-400)",
|
|
411
405
|
"v2-icon-icon-muted": "var(--v2-grey-600)",
|
|
412
406
|
"v2-icon-icon-inverse": "var(--v2-grey-1100)",
|
package/src/theme/v2/mapping.ts
CHANGED
|
@@ -18,7 +18,6 @@ const light: Record<string, V2ColorValue> = {
|
|
|
18
18
|
"v2-text-text-contrast": ref("v2-grey-100"),
|
|
19
19
|
"v2-text-text-accent": ref("v2-blue-600"),
|
|
20
20
|
"v2-text-text-accent-hover": ref("v2-blue-700"),
|
|
21
|
-
"v2-text-text-code-accent": ref("v2-blue-900"),
|
|
22
21
|
"v2-border-border-muted": ref("v2-alpha-dark-8"),
|
|
23
22
|
"v2-border-border-base": ref("v2-alpha-dark-10"),
|
|
24
23
|
"v2-border-border-strong": ref("v2-alpha-dark-20"),
|
|
@@ -82,7 +81,6 @@ const dark: Record<string, V2ColorValue> = {
|
|
|
82
81
|
"v2-text-text-contrast": ref("v2-grey-100"),
|
|
83
82
|
"v2-text-text-accent": ref("v2-blue-400"),
|
|
84
83
|
"v2-text-text-accent-hover": ref("v2-blue-300"),
|
|
85
|
-
"v2-text-text-code-accent": ref("v2-blue-400"),
|
|
86
84
|
"v2-border-border-muted": ref("v2-alpha-light-8"),
|
|
87
85
|
"v2-border-border-base": ref("v2-alpha-light-10"),
|
|
88
86
|
"v2-border-border-strong": ref("v2-alpha-light-20"),
|
|
@@ -89,30 +89,6 @@
|
|
|
89
89
|
cursor: not-allowed;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
/* Danger */
|
|
93
|
-
[data-component="button-v2"][data-variant="danger"] {
|
|
94
|
-
background-color: var(--v2-background-bg-button-neutral);
|
|
95
|
-
color: var(--v2-state-fg-danger);
|
|
96
|
-
box-shadow: var(--v2-elevation-button-neutral);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
[data-component="button-v2"][data-variant="danger"]:is(:hover, [data-state="hover"]):not(:disabled) {
|
|
100
|
-
background-image:
|
|
101
|
-
linear-gradient(90deg, var(--v2-overlay-simple-overlay-hover) 0%, var(--v2-overlay-simple-overlay-hover) 100%),
|
|
102
|
-
linear-gradient(90deg, var(--v2-background-bg-button-neutral) 0%, var(--v2-background-bg-button-neutral) 100%);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[data-component="button-v2"][data-variant="danger"]:is(:active, [data-state="pressed"]):not(:disabled) {
|
|
106
|
-
background-image:
|
|
107
|
-
linear-gradient(90deg, var(--v2-overlay-simple-overlay-pressed) 0%, var(--v2-overlay-simple-overlay-pressed) 100%),
|
|
108
|
-
linear-gradient(90deg, var(--v2-background-bg-button-neutral) 0%, var(--v2-background-bg-button-neutral) 100%);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
[data-component="button-v2"][data-variant="danger"]:is(:disabled, [data-state="disabled"]) {
|
|
112
|
-
opacity: 0.5;
|
|
113
|
-
cursor: not-allowed;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
92
|
/* Contrast */
|
|
117
93
|
[data-component="button-v2"][data-variant="contrast"] {
|
|
118
94
|
background-image:
|
|
@@ -7,7 +7,7 @@ export interface ButtonV2Props
|
|
|
7
7
|
extends ComponentProps<typeof Kobalte>,
|
|
8
8
|
Pick<ComponentProps<"button">, "class" | "classList" | "children"> {
|
|
9
9
|
size?: "small" | "normal" | "large"
|
|
10
|
-
variant?: "neutral" | "
|
|
10
|
+
variant?: "neutral" | "contrast" | "ghost" | "ghost-muted"
|
|
11
11
|
icon?: IconProps["name"]
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -49,51 +49,34 @@
|
|
|
49
49
|
display: flex;
|
|
50
50
|
flex-direction: row;
|
|
51
51
|
align-items: flex-start;
|
|
52
|
-
align-self: stretch;
|
|
53
|
-
width: 100%;
|
|
54
|
-
gap: 0;
|
|
55
52
|
padding: 16px;
|
|
53
|
+
gap: 8px;
|
|
56
54
|
flex-shrink: 0;
|
|
57
|
-
|
|
58
|
-
[data-slot="dialog-header-title"] {
|
|
59
|
-
margin: 0;
|
|
60
|
-
flex: 1;
|
|
61
|
-
min-width: 0;
|
|
62
|
-
font-weight: 530;
|
|
63
|
-
font-size: 13px;
|
|
64
|
-
line-height: 16px;
|
|
65
|
-
letter-spacing: -0.04px;
|
|
66
|
-
color: var(--v2-text-text-base);
|
|
67
|
-
font-variation-settings: "slnt" 0;
|
|
68
|
-
}
|
|
55
|
+
align-self: stretch;
|
|
69
56
|
|
|
70
57
|
[data-slot="dialog-title-group"] {
|
|
71
58
|
display: flex;
|
|
72
59
|
flex-direction: column;
|
|
73
60
|
align-items: flex-start;
|
|
74
|
-
gap:
|
|
61
|
+
gap: 8px;
|
|
75
62
|
flex: 1;
|
|
76
63
|
min-width: 0;
|
|
77
64
|
}
|
|
78
65
|
|
|
79
66
|
[data-slot="dialog-title"] {
|
|
80
67
|
margin: 0;
|
|
81
|
-
flex: none;
|
|
82
|
-
flex-grow: 0;
|
|
83
68
|
font-weight: 530;
|
|
84
69
|
font-size: 15px;
|
|
85
|
-
line-height:
|
|
70
|
+
line-height: 100%;
|
|
86
71
|
letter-spacing: -0.13px;
|
|
87
72
|
color: var(--v2-text-text-base);
|
|
88
73
|
font-variation-settings: "slnt" 0;
|
|
89
74
|
}
|
|
90
75
|
|
|
91
76
|
[data-slot="dialog-description"] {
|
|
92
|
-
flex: none;
|
|
93
|
-
flex-grow: 0;
|
|
94
77
|
font-weight: 440;
|
|
95
78
|
font-size: 13px;
|
|
96
|
-
line-height:
|
|
79
|
+
line-height: 100%;
|
|
97
80
|
letter-spacing: -0.04px;
|
|
98
81
|
color: var(--v2-text-text-muted);
|
|
99
82
|
font-variation-settings: "slnt" 0;
|
|
@@ -103,11 +86,8 @@
|
|
|
103
86
|
display: flex;
|
|
104
87
|
justify-content: center;
|
|
105
88
|
align-items: center;
|
|
106
|
-
width:
|
|
107
|
-
height:
|
|
108
|
-
margin-top: -2px;
|
|
109
|
-
margin-right: -2px;
|
|
110
|
-
margin-left: auto;
|
|
89
|
+
width: 24px;
|
|
90
|
+
height: 24px;
|
|
111
91
|
border-radius: 4px;
|
|
112
92
|
flex-shrink: 0;
|
|
113
93
|
cursor: pointer;
|
|
@@ -117,10 +97,6 @@
|
|
|
117
97
|
background: var(--v2-overlay-simple-overlay-hover);
|
|
118
98
|
}
|
|
119
99
|
}
|
|
120
|
-
|
|
121
|
-
&[data-hide-close] [data-slot="dialog-close-button"] {
|
|
122
|
-
display: none;
|
|
123
|
-
}
|
|
124
100
|
}
|
|
125
101
|
|
|
126
102
|
[data-slot="dialog-footer"] {
|
|
@@ -3,6 +3,9 @@ import { type ComponentProps, type JSXElement, type ParentProps, Show, children,
|
|
|
3
3
|
import "./dialog-v2.css"
|
|
4
4
|
|
|
5
5
|
export interface DialogProps extends ParentProps {
|
|
6
|
+
title?: JSXElement
|
|
7
|
+
description?: JSXElement
|
|
8
|
+
action?: JSXElement
|
|
6
9
|
size?: "normal" | "large" | "x-large"
|
|
7
10
|
variant?: "default" | "settings"
|
|
8
11
|
class?: ComponentProps<"div">["class"]
|
|
@@ -10,76 +13,26 @@ export interface DialogProps extends ParentProps {
|
|
|
10
13
|
fit?: boolean
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
export interface DialogHeaderProps extends ParentProps {
|
|
14
|
-
closeLabel?: string
|
|
15
|
-
hideClose?: boolean
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface DialogTitleGroupProps {
|
|
19
|
-
title?: JSXElement
|
|
20
|
-
description: JSXElement
|
|
21
|
-
}
|
|
22
|
-
|
|
23
16
|
export function DialogFooter(props: ParentProps) {
|
|
24
17
|
return <div data-slot="dialog-footer">{props.children}</div>
|
|
25
18
|
}
|
|
26
19
|
|
|
27
|
-
export function DialogBody(props: ParentProps & { class?: ComponentProps<"div">["class"] }) {
|
|
28
|
-
const [local] = splitProps(props, ["class", "children"])
|
|
29
|
-
return (
|
|
30
|
-
<div data-slot="dialog-body" class={local.class}>
|
|
31
|
-
{local.children}
|
|
32
|
-
</div>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function DialogTitle(props: ParentProps) {
|
|
37
|
-
return <Kobalte.Title data-slot="dialog-header-title">{props.children}</Kobalte.Title>
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function DialogTitleGroup(props: DialogTitleGroupProps) {
|
|
41
|
-
const title = children(() => props.title)
|
|
42
|
-
const description = children(() => props.description)
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div data-slot="dialog-title-group">
|
|
46
|
-
<Show when={title()}>{(t) => <Kobalte.Title data-slot="dialog-title">{t()}</Kobalte.Title>}</Show>
|
|
47
|
-
<Kobalte.Description data-slot="dialog-description">{description()}</Kobalte.Description>
|
|
48
|
-
</div>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function DialogHeader(props: DialogHeaderProps) {
|
|
53
|
-
const [local] = splitProps(props, ["closeLabel", "hideClose", "children"])
|
|
54
|
-
const hideClose = () => local.hideClose === true
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<div data-slot="dialog-header" data-hide-close={hideClose() ? "" : undefined}>
|
|
58
|
-
{local.children}
|
|
59
|
-
{!hideClose() && (
|
|
60
|
-
<Kobalte.CloseButton data-slot="dialog-close-button" aria-label={local.closeLabel ?? "Close"}>
|
|
61
|
-
<svg
|
|
62
|
-
width="16"
|
|
63
|
-
height="16"
|
|
64
|
-
viewBox="0 0 16 16"
|
|
65
|
-
fill="none"
|
|
66
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
67
|
-
aria-hidden="true"
|
|
68
|
-
>
|
|
69
|
-
<path
|
|
70
|
-
d="M12.4446 3.55469L3.55566 12.4436M3.55566 3.55469L12.4446 12.4436"
|
|
71
|
-
stroke="currentColor"
|
|
72
|
-
stroke-linejoin="round"
|
|
73
|
-
/>
|
|
74
|
-
</svg>
|
|
75
|
-
</Kobalte.CloseButton>
|
|
76
|
-
)}
|
|
77
|
-
</div>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
20
|
export function Dialog(props: DialogProps) {
|
|
82
|
-
const [local] = splitProps(props, [
|
|
21
|
+
const [local] = splitProps(props, [
|
|
22
|
+
"title",
|
|
23
|
+
"description",
|
|
24
|
+
"action",
|
|
25
|
+
"size",
|
|
26
|
+
"variant",
|
|
27
|
+
"class",
|
|
28
|
+
"classList",
|
|
29
|
+
"fit",
|
|
30
|
+
"children",
|
|
31
|
+
])
|
|
32
|
+
const title = children(() => local.title)
|
|
33
|
+
const description = children(() => local.description)
|
|
34
|
+
const action = children(() => local.action)
|
|
35
|
+
const hasHeader = () => title() || action()
|
|
83
36
|
|
|
84
37
|
return (
|
|
85
38
|
<div
|
|
@@ -91,6 +44,7 @@ export function Dialog(props: DialogProps) {
|
|
|
91
44
|
<div data-slot="dialog-container">
|
|
92
45
|
<Kobalte.Content
|
|
93
46
|
data-slot="dialog-content"
|
|
47
|
+
data-no-header={!hasHeader() ? "" : undefined}
|
|
94
48
|
classList={{
|
|
95
49
|
...local.classList,
|
|
96
50
|
[local.class ?? ""]: !!local.class,
|
|
@@ -104,7 +58,34 @@ export function Dialog(props: DialogProps) {
|
|
|
104
58
|
}
|
|
105
59
|
}}
|
|
106
60
|
>
|
|
107
|
-
{
|
|
61
|
+
<Show when={hasHeader()}>
|
|
62
|
+
<div data-slot="dialog-header">
|
|
63
|
+
<div data-slot="dialog-title-group">
|
|
64
|
+
<Show when={title()}>{(t) => <Kobalte.Title data-slot="dialog-title">{t()}</Kobalte.Title>}</Show>
|
|
65
|
+
<Show when={description()}>
|
|
66
|
+
{(d) => <Kobalte.Description data-slot="dialog-description">{d()}</Kobalte.Description>}
|
|
67
|
+
</Show>
|
|
68
|
+
</div>
|
|
69
|
+
<Show when={action()}>{(a) => a()}</Show>
|
|
70
|
+
<Kobalte.CloseButton data-slot="dialog-close-button" aria-label="Close">
|
|
71
|
+
<svg
|
|
72
|
+
width="16"
|
|
73
|
+
height="16"
|
|
74
|
+
viewBox="0 0 16 16"
|
|
75
|
+
fill="none"
|
|
76
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
77
|
+
aria-hidden="true"
|
|
78
|
+
>
|
|
79
|
+
<path
|
|
80
|
+
d="M12.4446 3.55469L3.55566 12.4436M3.55566 3.55469L12.4446 12.4436"
|
|
81
|
+
stroke="currentColor"
|
|
82
|
+
stroke-linejoin="round"
|
|
83
|
+
/>
|
|
84
|
+
</svg>
|
|
85
|
+
</Kobalte.CloseButton>
|
|
86
|
+
</div>
|
|
87
|
+
</Show>
|
|
88
|
+
<div data-slot="dialog-body">{local.children}</div>
|
|
108
89
|
</Kobalte.Content>
|
|
109
90
|
</div>
|
|
110
91
|
</div>
|
|
@@ -49,26 +49,6 @@ const icons = {
|
|
|
49
49
|
viewBox: "0 0 16 16",
|
|
50
50
|
body: `<path d="M5 6.5L8 9.5L11 6.5" stroke="currentColor"/>`,
|
|
51
51
|
},
|
|
52
|
-
check: {
|
|
53
|
-
viewBox: "0 0 16 16",
|
|
54
|
-
body: `<path d="M3.53613 8.17857L6.39328 11.75L12.4647 4.25" stroke="currentColor"/>`,
|
|
55
|
-
},
|
|
56
|
-
monitor: {
|
|
57
|
-
viewBox: "0 0 16 16",
|
|
58
|
-
body: `<path d="M4.05559 9.38889H0.500007C0.500007 9.38889 0.500017 8.59298 0.500017 7.61112V2.27778C0.500017 1.29594 0.500102 0.5 0.500102 0.5H13.3889C13.3889 0.5 13.3889 1.29594 13.3889 2.27778V7.61112C13.3889 8.59298 13.3889 9.38889 13.3889 9.38889H9.83336M4.05559 9.38889V11.6111H6.94448H9.83336V9.38889M4.05559 9.38889H9.83336" transform="translate(1.05556 1.94444)" stroke="currentColor"/>`,
|
|
59
|
-
},
|
|
60
|
-
"workspace-new": {
|
|
61
|
-
viewBox: "0 0 16 16",
|
|
62
|
-
body: `<path d="M2 10.7578V14.0011H5.24324M13.9991 5.24324V2H10.7559M13.9991 10.7578V14.0011H10.7559M2 5.24324V2H5.24324" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/><path d="M8 4.5V11.5M4.5 8H11.5" stroke="currentColor" stroke-linejoin="round"/>`,
|
|
63
|
-
},
|
|
64
|
-
"workspace-isolated": {
|
|
65
|
-
viewBox: "0 0 16 16",
|
|
66
|
-
body: `<path d="M10.5 10.5V5.5H5.5V10.5H10.5Z" fill="currentColor"/><rect x="2.5" y="2.5" width="11" height="11" stroke="currentColor"/>`,
|
|
67
|
-
},
|
|
68
|
-
workspace: {
|
|
69
|
-
viewBox: "0 0 16 16",
|
|
70
|
-
body: `<path d="M2 10.668V14.0013H10.6667M13.9974 10.6667V2H2.66406M13.9974 10.668V14.0013H10.6641M2 10V2H5.33333" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/><path d="M10.6693 10.6654V5.33203H5.33594V10.6654H10.6693Z" fill="currentColor"/>`,
|
|
71
|
-
},
|
|
72
52
|
close: {
|
|
73
53
|
viewBox: "0 0 20 20",
|
|
74
54
|
body: `<path d="M14.4446 5.55566L5.55566 14.4446M5.55566 5.55566L14.4446 14.4446" stroke="currentColor" stroke-linejoin="round"/>`,
|