@opencode-ai/ui 0.0.0-next-14647 → 0.0.0-next-14662

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.
@@ -1,5 +1,5 @@
1
1
  import { type ComponentProps } from "solid-js";
2
- export interface ProgressCircleProps extends Pick<ComponentProps<"svg">, "class" | "classList"> {
2
+ export interface ProgressCircleProps extends Pick<ComponentProps<"svg">, "class" | "classList" | "style"> {
3
3
  percentage: number;
4
4
  size?: number;
5
5
  strokeWidth?: number;
@@ -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;
@@ -23,3 +23,4 @@ export declare function DialogTitle(props: ParentProps): import("solid-js").JSX.
23
23
  export declare function DialogTitleGroup(props: DialogTitleGroupProps): import("solid-js").JSX.Element;
24
24
  export declare function DialogHeader(props: DialogHeaderProps): import("solid-js").JSX.Element;
25
25
  export declare function Dialog(props: DialogProps): import("solid-js").JSX.Element;
26
+ export declare const DialogV2: typeof Dialog;
@@ -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,22 @@ declare const icons: {
84
92
  viewBox: string;
85
93
  body: string;
86
94
  };
95
+ "outline-sliders": {
96
+ viewBox: string;
97
+ body: string;
98
+ };
99
+ "outline-copy": {
100
+ viewBox: string;
101
+ body: string;
102
+ };
103
+ "outline-square-arrow": {
104
+ viewBox: string;
105
+ body: string;
106
+ };
107
+ reset: {
108
+ viewBox: string;
109
+ body: string;
110
+ };
87
111
  archive: {
88
112
  viewBox: string;
89
113
  body: string;
@@ -0,0 +1,3 @@
1
+ import { type ComponentProps } from "solid-js";
2
+ import "./loader-v2.css";
3
+ export declare function LoaderV2(props: ComponentProps<"svg">): import("solid-js").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type ComponentProps } from "solid-js";
2
+ import "./progress-circle-v2.css";
3
+ export interface ProgressCircleV2Props extends Pick<ComponentProps<"svg">, "class" | "classList"> {
4
+ percentage: number;
5
+ size?: number;
6
+ strokeWidth?: number;
7
+ }
8
+ export declare function ProgressCircleV2(props: ProgressCircleV2Props): import("solid-js").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-ai/ui",
3
- "version": "0.0.0-next-14647",
3
+ "version": "0.0.0-next-14662",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -2,11 +2,15 @@
2
2
  transform: rotate(-90deg);
3
3
 
4
4
  [data-slot="progress-circle-background"] {
5
- stroke: var(--border-weak-base);
5
+ stroke: var(--progress-circle-background, var(--border-weak-base));
6
+ }
7
+
8
+ [data-slot="progress-circle-background-overlay"] {
9
+ stroke: var(--progress-circle-background-overlay, transparent);
6
10
  }
7
11
 
8
12
  [data-slot="progress-circle-progress"] {
9
- stroke: var(--border-active);
13
+ stroke: var(--progress-circle-progress, var(--border-active));
10
14
  transition: stroke-dashoffset 0.35s cubic-bezier(0.65, 0, 0.35, 1);
11
15
  }
12
16
  }
@@ -1,6 +1,6 @@
1
1
  import { type ComponentProps, createMemo, splitProps } from "solid-js"
2
2
 
3
- export interface ProgressCircleProps extends Pick<ComponentProps<"svg">, "class" | "classList"> {
3
+ export interface ProgressCircleProps extends Pick<ComponentProps<"svg">, "class" | "classList" | "style"> {
4
4
  percentage: number
5
5
  size?: number
6
6
  strokeWidth?: number
@@ -43,6 +43,13 @@ export function ProgressCircle(props: ProgressCircleProps) {
43
43
  data-slot="progress-circle-background"
44
44
  stroke-width={strokeWidth()}
45
45
  />
46
+ <circle
47
+ cx={center}
48
+ cy={center}
49
+ r={radius()}
50
+ data-slot="progress-circle-background-overlay"
51
+ stroke-width={strokeWidth()}
52
+ />
46
53
  <circle
47
54
  cx={center}
48
55
  cy={center}
@@ -107,6 +107,8 @@ export function Tooltip(props: TooltipProps) {
107
107
  <Match when={true}>
108
108
  <KobalteTooltip
109
109
  gutter={4}
110
+ openDelay={400}
111
+ skipDelayDuration={300}
110
112
  {...others}
111
113
  closeDelay={0}
112
114
  ignoreSafeArea={local.ignoreSafeArea ?? true}
@@ -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
  }
@@ -113,6 +113,26 @@
113
113
  cursor: not-allowed;
114
114
  }
115
115
 
116
+ /* Outline */
117
+ [data-component="button-v2"][data-variant="outline"] {
118
+ background-color: transparent;
119
+ color: var(--v2-text-text-base);
120
+ box-shadow: inset 0 0 0 1px var(--v2-border-border-muted);
121
+ }
122
+
123
+ [data-component="button-v2"][data-variant="outline"]:is(:hover, [data-state="hover"]):not(:disabled) {
124
+ background-color: var(--v2-overlay-simple-overlay-hover);
125
+ }
126
+
127
+ [data-component="button-v2"][data-variant="outline"]:is(:active, [data-state="pressed"]):not(:disabled) {
128
+ background-color: var(--v2-overlay-simple-overlay-pressed);
129
+ }
130
+
131
+ [data-component="button-v2"][data-variant="outline"]:is(:disabled, [data-state="disabled"]) {
132
+ opacity: 0.5;
133
+ cursor: not-allowed;
134
+ }
135
+
116
136
  /* Contrast */
117
137
  [data-component="button-v2"][data-variant="contrast"] {
118
138
  background-image:
@@ -150,6 +170,15 @@
150
170
  cursor: not-allowed;
151
171
  }
152
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
+
153
182
  /* Ghost */
154
183
  [data-component="button-v2"][data-variant="ghost"] {
155
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
 
@@ -59,6 +59,7 @@
59
59
  margin: 0;
60
60
  flex: 1;
61
61
  min-width: 0;
62
+ user-select: none;
62
63
  font-weight: 530;
63
64
  font-size: 13px;
64
65
  line-height: 16px;
@@ -80,6 +81,7 @@
80
81
  margin: 0;
81
82
  flex: none;
82
83
  flex-grow: 0;
84
+ user-select: none;
83
85
  font-weight: 530;
84
86
  font-size: 15px;
85
87
  line-height: 20px;
@@ -91,6 +93,7 @@
91
93
  [data-slot="dialog-description"] {
92
94
  flex: none;
93
95
  flex-grow: 0;
96
+ user-select: none;
94
97
  font-weight: 440;
95
98
  font-size: 13px;
96
99
  line-height: 20px;
@@ -110,3 +110,5 @@ export function Dialog(props: DialogProps) {
110
110
  </div>
111
111
  )
112
112
  }
113
+
114
+ export const DialogV2 = Dialog
@@ -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,22 @@ 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
+ },
100
+ "outline-copy": {
101
+ viewBox: "0 0 16 16",
102
+ body: `<path d="M4.14908 11.0081H1.76282V1.51758H9.1038V2.55588M14.2225 4.99681H6.75397V14.4873H14.2225V4.99681Z" stroke="currentColor"/>`,
103
+ },
104
+ "outline-square-arrow": {
105
+ viewBox: "0 0 16 16",
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"/>`,
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
+ },
88
112
  archive: {
89
113
  viewBox: "0 0 16 16",
90
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
+ }
@@ -0,0 +1,13 @@
1
+ [data-component="progress-circle-v2"] {
2
+ display: block;
3
+ transform: rotate(-90deg);
4
+ }
5
+
6
+ [data-component="progress-circle-v2"] [data-slot="progress-circle-v2-background"] {
7
+ stroke: var(--v2-background-bg-layer-04);
8
+ }
9
+
10
+ [data-component="progress-circle-v2"] [data-slot="progress-circle-v2-progress"] {
11
+ stroke: var(--v2-icon-icon-muted);
12
+ transition: stroke-dashoffset 0.35s cubic-bezier(0.65, 0, 0.35, 1);
13
+ }
@@ -0,0 +1,52 @@
1
+ import { type ComponentProps, createMemo, splitProps } from "solid-js"
2
+ import "./progress-circle-v2.css"
3
+
4
+ export interface ProgressCircleV2Props extends Pick<ComponentProps<"svg">, "class" | "classList"> {
5
+ percentage: number
6
+ size?: number
7
+ strokeWidth?: number
8
+ }
9
+
10
+ export function ProgressCircleV2(props: ProgressCircleV2Props) {
11
+ const [split, rest] = splitProps(props, ["percentage", "size", "strokeWidth", "class", "classList"])
12
+
13
+ const size = () => split.size ?? 14
14
+ const strokeWidth = () => split.strokeWidth ?? 1.5
15
+ const viewBoxSize = 14
16
+ const center = viewBoxSize / 2
17
+ const radius = () => center - strokeWidth() / 2
18
+ const circumference = createMemo(() => 2 * Math.PI * radius())
19
+ const offset = createMemo(() => circumference() * (1 - Math.max(0, Math.min(100, split.percentage || 0)) / 100))
20
+
21
+ return (
22
+ <svg
23
+ {...rest}
24
+ width={size()}
25
+ height={size()}
26
+ viewBox={`0 0 ${viewBoxSize} ${viewBoxSize}`}
27
+ fill="none"
28
+ data-component="progress-circle-v2"
29
+ classList={{
30
+ ...split.classList,
31
+ [split.class ?? ""]: !!split.class,
32
+ }}
33
+ >
34
+ <circle
35
+ cx={center}
36
+ cy={center}
37
+ r={radius()}
38
+ data-slot="progress-circle-v2-background"
39
+ stroke-width={strokeWidth()}
40
+ />
41
+ <circle
42
+ cx={center}
43
+ cy={center}
44
+ r={radius()}
45
+ data-slot="progress-circle-v2-progress"
46
+ stroke-width={strokeWidth()}
47
+ stroke-dasharray={circumference().toString()}
48
+ stroke-dashoffset={offset()}
49
+ />
50
+ </svg>
51
+ )
52
+ }
@@ -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
- opacity: 0.5;
200
+ color: var(--v2-text-text-faint);
201
201
  }
202
202
  }
@@ -55,3 +55,10 @@
55
55
  transform: scale(0.96);
56
56
  }
57
57
  }
58
+
59
+ @media (prefers-reduced-motion: reduce) {
60
+ [data-component="tooltip-v2"],
61
+ [data-component="tooltip-v2"][data-closed] {
62
+ animation: none;
63
+ }
64
+ }
@@ -88,8 +88,9 @@ export function TooltipV2(props: TooltipV2Props) {
88
88
  <Match when={true}>
89
89
  <KobalteTooltip
90
90
  gutter={4}
91
+ openDelay={400}
92
+ skipDelayDuration={300}
91
93
  {...others}
92
- openDelay={0}
93
94
  closeDelay={0}
94
95
  ignoreSafeArea={local.ignoreSafeArea ?? true}
95
96
  open={local.forceOpen || state.open}