@opencode-ai/ui 1.17.12 → 1.17.13
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/dist/v2/components/button-v2.d.ts +1 -1
- package/dist/v2/components/icon.d.ts +16 -0
- package/dist/v2/components/loader-v2.d.ts +3 -0
- package/package.json +1 -1
- package/src/v2/components/button-v2.css +10 -1
- package/src/v2/components/button-v2.tsx +1 -1
- package/src/v2/components/icon.tsx +16 -0
- package/src/v2/components/loader-v2.css +32 -0
- package/src/v2/components/loader-v2.tsx +31 -0
- package/src/v2/components/radio-v2.css +6 -6
|
@@ -4,7 +4,7 @@ import { type IconProps } from "./icon";
|
|
|
4
4
|
import "./button-v2.css";
|
|
5
5
|
export interface ButtonV2Props extends ComponentProps<typeof Kobalte>, Pick<ComponentProps<"button">, "class" | "classList" | "children"> {
|
|
6
6
|
size?: "small" | "normal" | "large";
|
|
7
|
-
variant?: "neutral" | "danger" | "contrast" | "ghost" | "ghost-muted" | "
|
|
7
|
+
variant?: "neutral" | "danger" | "outline" | "contrast" | "ghost" | "ghost-muted" | "loading";
|
|
8
8
|
icon?: IconProps["name"];
|
|
9
9
|
}
|
|
10
10
|
export declare function ButtonV2(props: ButtonV2Props): import("solid-js").JSX.Element;
|
|
@@ -8,6 +8,14 @@ declare const icons: {
|
|
|
8
8
|
viewBox: string;
|
|
9
9
|
body: string;
|
|
10
10
|
};
|
|
11
|
+
folder: {
|
|
12
|
+
viewBox: string;
|
|
13
|
+
body: string;
|
|
14
|
+
};
|
|
15
|
+
branch: {
|
|
16
|
+
viewBox: string;
|
|
17
|
+
body: string;
|
|
18
|
+
};
|
|
11
19
|
"grid-plus": {
|
|
12
20
|
viewBox: string;
|
|
13
21
|
body: string;
|
|
@@ -84,6 +92,10 @@ declare const icons: {
|
|
|
84
92
|
viewBox: string;
|
|
85
93
|
body: string;
|
|
86
94
|
};
|
|
95
|
+
"outline-sliders": {
|
|
96
|
+
viewBox: string;
|
|
97
|
+
body: string;
|
|
98
|
+
};
|
|
87
99
|
"outline-copy": {
|
|
88
100
|
viewBox: string;
|
|
89
101
|
body: string;
|
|
@@ -92,6 +104,10 @@ declare const icons: {
|
|
|
92
104
|
viewBox: string;
|
|
93
105
|
body: string;
|
|
94
106
|
};
|
|
107
|
+
reset: {
|
|
108
|
+
viewBox: string;
|
|
109
|
+
body: string;
|
|
110
|
+
};
|
|
95
111
|
archive: {
|
|
96
112
|
viewBox: string;
|
|
97
113
|
body: string;
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
outline: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
[data-component="button-v2"]:is(:focus-visible, [data-state="focus"]):not(:disabled) {
|
|
31
|
+
[data-component="button-v2"]:is(:focus-visible, [data-state="focus"]):not(:disabled):not([data-variant="loading"]) {
|
|
32
32
|
outline: 2px solid var(--v2-border-border-focus);
|
|
33
33
|
outline-offset: 2.5px;
|
|
34
34
|
}
|
|
@@ -170,6 +170,15 @@
|
|
|
170
170
|
cursor: not-allowed;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/* Loading */
|
|
174
|
+
[data-component="button-v2"][data-variant="loading"] {
|
|
175
|
+
background: #f2f2f2;
|
|
176
|
+
color: var(--v2-text-text-base);
|
|
177
|
+
box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
|
|
178
|
+
cursor: default;
|
|
179
|
+
pointer-events: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
173
182
|
/* Ghost */
|
|
174
183
|
[data-component="button-v2"][data-variant="ghost"] {
|
|
175
184
|
background-color: transparent;
|
|
@@ -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" | "danger" | "contrast" | "ghost" | "ghost-muted" | "
|
|
10
|
+
variant?: "neutral" | "danger" | "outline" | "contrast" | "ghost" | "ghost-muted" | "loading"
|
|
11
11
|
icon?: IconProps["name"]
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -9,6 +9,14 @@ const icons = {
|
|
|
9
9
|
viewBox: "0 0 16 16",
|
|
10
10
|
body: `<path d="M7.5 13.3333H1.5V2H6.83333L8.83333 4H14.8333V6M10.1667 11.3333H15.5M12.8333 8.66667V14" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
|
|
11
11
|
},
|
|
12
|
+
folder: {
|
|
13
|
+
viewBox: "0 0 16 16",
|
|
14
|
+
body: `<path d="M2.545 3.364V12.636H13.455V5H8.545L6.909 3.364H2.545Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
|
|
15
|
+
},
|
|
16
|
+
branch: {
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
body: `<path d="M5.118 5.686V10.314M5.118 5.686C5.97 5.686 6.661 4.995 6.661 4.143C6.661 3.291 5.97 2.6 5.118 2.6C4.266 2.6 3.575 3.291 3.575 4.143C3.575 4.995 4.266 5.686 5.118 5.686ZM5.118 10.314C4.266 10.314 3.575 11.005 3.575 11.857C3.575 12.709 4.266 13.4 5.118 13.4C5.97 13.4 6.661 12.709 6.661 11.857M5.118 10.314C5.97 10.314 6.661 11.005 6.661 11.857M10.882 5.686C11.734 5.686 12.425 4.995 12.425 4.143C12.425 3.291 11.734 2.6 10.882 2.6C10.03 2.6 9.339 3.291 9.339 4.143C9.339 4.995 10.03 5.686 10.882 5.686ZM10.882 5.686V9.457C10.882 10.783 9.807 11.857 8.482 11.857H6.661" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`,
|
|
19
|
+
},
|
|
12
20
|
"grid-plus": {
|
|
13
21
|
viewBox: "0 0 16 16",
|
|
14
22
|
body: `<path d="M13.9948 11.668H9.32812M11.6641 9.33203V13.9987M6.66667 9.33203V13.9987H2V9.33203H6.66667ZM6.66667 2V6.66667H2V2H6.66667ZM13.9948 2V6.66667H9.32812V2H13.9948Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
|
|
@@ -85,6 +93,10 @@ const icons = {
|
|
|
85
93
|
viewBox: "0 0 16 16",
|
|
86
94
|
body: `<path d="M2.5 7.5H3.5V8.5H2.5V7.5Z" stroke="currentColor"/><path d="M7.5 7.5H8.5V8.5H7.5V7.5Z" stroke="currentColor"/><path d="M12.5 7.5H13.5V8.5H12.5V7.5Z" stroke="currentColor"/>`,
|
|
87
95
|
},
|
|
96
|
+
"outline-sliders": {
|
|
97
|
+
viewBox: "0 0 16 16",
|
|
98
|
+
body: `<path d="M11.7779 4.66675H14.4446M11.7779 4.66675C11.7779 5.77132 10.8825 6.66675 9.77789 6.66675C8.67332 6.66675 7.77789 5.77132 7.77789 4.66675M11.7779 4.66675C11.7779 3.56218 10.8825 2.66675 9.77789 2.66675C8.67332 2.66675 7.77789 3.56218 7.77789 4.66675M1.55566 4.66675H7.77789M4.22233 11.3334H1.55566M4.22233 11.3334C4.22233 12.438 5.11776 13.3334 6.22233 13.3334C7.3269 13.3334 8.22233 12.438 8.22233 11.3334M4.22233 11.3334C4.22233 10.2288 5.11776 9.33341 6.22233 9.33341C7.3269 9.33341 8.22233 10.2288 8.22233 11.3334M14.4446 11.3334H8.22233" stroke="currentColor"/>`,
|
|
99
|
+
},
|
|
88
100
|
"outline-copy": {
|
|
89
101
|
viewBox: "0 0 16 16",
|
|
90
102
|
body: `<path d="M4.14908 11.0081H1.76282V1.51758H9.1038V2.55588M14.2225 4.99681H6.75397V14.4873H14.2225V4.99681Z" stroke="currentColor"/>`,
|
|
@@ -93,6 +105,10 @@ const icons = {
|
|
|
93
105
|
viewBox: "0 0 16 16",
|
|
94
106
|
body: `<path d="M13.5555 6.66656V2.44434H9.33326M13.5555 2.44434L7.99993 7.99989M13.5555 9.33324V13.5555C13.5555 13.5555 12.7599 13.5555 11.7777 13.5555H2.44438C2.44438 13.5555 2.44438 12.7599 2.44438 11.7777V4.22213C2.44438 3.2399 2.44434 2.44435 2.44434 2.44435H6.66661" stroke="currentColor"/>`,
|
|
95
107
|
},
|
|
108
|
+
reset: {
|
|
109
|
+
viewBox: "0 0 20 20",
|
|
110
|
+
body: `<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`,
|
|
111
|
+
},
|
|
96
112
|
archive: {
|
|
97
113
|
viewBox: "0 0 16 16",
|
|
98
114
|
body: `<path d="M13.1112 13.5555V14.0555H13.6112V13.5555H13.1112ZM2.889 13.5555H2.389L2.389 14.0555H2.889V13.5555ZM3.38901 5.55546L3.38901 5.05546L2.38901 5.05546L2.38901 5.55546L2.88901 5.55546L3.38901 5.55546ZM14.4446 2.44434H14.9446V1.94434L14.4446 1.94434L14.4446 2.44434ZM14.4446 5.55545L14.4446 6.05545L14.9446 6.05545V5.55545H14.4446ZM1.55566 5.55546L1.05566 5.55545L1.05566 6.05546L1.55566 6.05546L1.55566 5.55546ZM1.5557 2.44436L1.5557 1.94436L1.05571 1.94436L1.0557 2.44435L1.5557 2.44436ZM13.1112 5.55546H12.6112V13.5555H13.1112H13.6112V5.55546H13.1112ZM2.889 13.5555H3.389L3.38901 5.55546L2.88901 5.55546L2.38901 5.55546L2.389 13.5555H2.889ZM14.4446 2.44434H13.9446V5.55545H14.4446H14.9446V2.44434H14.4446ZM1.55566 5.55546L2.05566 5.55547L2.0557 2.44436L1.5557 2.44436L1.0557 2.44435L1.05566 5.55545L1.55566 5.55546ZM6.22234 8.22213V8.72213H9.7779V8.22213V7.72213H6.22234V8.22213ZM13.1112 13.5555V13.0555H2.889V13.5555V14.0555H13.1112V13.5555ZM1.5557 2.44436L1.5557 2.94436L14.4446 2.94434L14.4446 2.44434L14.4446 1.94434L1.5557 1.94436L1.5557 2.44436ZM14.4446 5.55545L14.4446 5.05545L1.55566 5.05546L1.55566 5.55546L1.55566 6.05546L14.4446 6.05545L14.4446 5.55545Z" fill="currentColor"/>`,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[data-component="loader-v2"] {
|
|
2
|
+
--_duration: 900ms;
|
|
3
|
+
display: block;
|
|
4
|
+
flex-shrink: 0;
|
|
5
|
+
color: var(--v2-icon-icon-muted, #808080);
|
|
6
|
+
animation: loader-v2-spin var(--_duration) linear infinite;
|
|
7
|
+
transform-origin: center;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-component="loader-v2"] [data-slot="loader-v2-background"] {
|
|
11
|
+
stroke: currentColor;
|
|
12
|
+
opacity: 0.2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-component="loader-v2"] [data-slot="loader-v2-progress"] {
|
|
16
|
+
stroke: currentColor;
|
|
17
|
+
stroke-linecap: round;
|
|
18
|
+
transform: rotate(-90deg);
|
|
19
|
+
transform-origin: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@keyframes loader-v2-spin {
|
|
23
|
+
to {
|
|
24
|
+
transform: rotate(360deg);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (prefers-reduced-motion: reduce) {
|
|
29
|
+
[data-component="loader-v2"] {
|
|
30
|
+
animation: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { splitProps, type ComponentProps } from "solid-js"
|
|
2
|
+
import "./loader-v2.css"
|
|
3
|
+
|
|
4
|
+
export function LoaderV2(props: ComponentProps<"svg">) {
|
|
5
|
+
const [local, rest] = splitProps(props, ["class", "classList", "width", "height"])
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
{...rest}
|
|
9
|
+
class={local.class}
|
|
10
|
+
classList={local.classList}
|
|
11
|
+
width={local.width ?? 16}
|
|
12
|
+
height={local.height ?? 16}
|
|
13
|
+
viewBox="0 0 16 16"
|
|
14
|
+
fill="none"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
data-component="loader-v2"
|
|
17
|
+
aria-hidden={rest["aria-hidden"] ?? "true"}
|
|
18
|
+
>
|
|
19
|
+
<circle cx="8" cy="8" r="6" data-slot="loader-v2-background" stroke-width="2" />
|
|
20
|
+
<circle
|
|
21
|
+
cx="8"
|
|
22
|
+
cy="8"
|
|
23
|
+
r="6"
|
|
24
|
+
data-slot="loader-v2-progress"
|
|
25
|
+
pathLength="100"
|
|
26
|
+
stroke-width="2"
|
|
27
|
+
stroke-dasharray="33 67"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
[data-slot="radio-v2-item"] {
|
|
48
|
+
position: relative;
|
|
48
49
|
display: flex;
|
|
49
50
|
flex-direction: row;
|
|
50
51
|
align-items: flex-start;
|
|
@@ -131,10 +132,6 @@
|
|
|
131
132
|
linear-gradient(180deg, var(--v2-alpha-light-20) 0%, var(--v2-alpha-light-0) 100%), var(--v2-background-bg-accent);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
&:where([data-checked][data-disabled]) [data-slot="radio-v2-item-control"] {
|
|
135
|
-
opacity: 0.5;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
135
|
&:where([data-invalid]):where(:not([data-checked])) [data-slot="radio-v2-item-control"] {
|
|
139
136
|
background: var(--v2-state-bg-danger);
|
|
140
137
|
box-shadow: inset 0 0 0 0.5px var(--v2-state-border-danger);
|
|
@@ -195,8 +192,11 @@
|
|
|
195
192
|
user-select: none;
|
|
196
193
|
}
|
|
197
194
|
|
|
198
|
-
&:where([data-disabled]) [data-slot="radio-v2-item-label"]
|
|
195
|
+
&:where([data-disabled]) [data-slot="radio-v2-item-label-text"] {
|
|
196
|
+
color: var(--v2-text-text-muted);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
199
|
&:where([data-disabled]) [data-slot="radio-v2-item-description"] {
|
|
200
|
-
|
|
200
|
+
color: var(--v2-text-text-faint);
|
|
201
201
|
}
|
|
202
202
|
}
|