@opencode/ui 2.0.14 → 2.0.16
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/context/dialog.d.ts +3 -0
- package/dist/context/i18n.d.ts +11 -2
- package/dist/i18n/ar.d.ts +97 -0
- package/dist/i18n/bg.d.ts +57 -0
- package/dist/i18n/br.d.ts +67 -0
- package/dist/i18n/bs.d.ts +67 -0
- package/dist/i18n/da.d.ts +57 -0
- package/dist/i18n/de.d.ts +57 -0
- package/dist/i18n/en.d.ts +6 -0
- package/dist/i18n/es.d.ts +67 -0
- package/dist/i18n/fr.d.ts +67 -0
- package/dist/i18n/he.d.ts +67 -0
- package/dist/i18n/ja.d.ts +57 -0
- package/dist/i18n/km.d.ts +57 -0
- package/dist/i18n/ko.d.ts +57 -0
- package/dist/i18n/lo.d.ts +57 -0
- package/dist/i18n/mk.d.ts +57 -0
- package/dist/i18n/mn.d.ts +57 -0
- package/dist/i18n/my.d.ts +57 -0
- package/dist/i18n/pl.d.ts +77 -0
- package/dist/i18n/ru.d.ts +77 -0
- package/dist/i18n/sr.d.ts +71 -4
- package/dist/i18n/tg.d.ts +57 -0
- package/dist/i18n/th.d.ts +57 -0
- package/dist/i18n/tr.d.ts +57 -0
- package/dist/i18n/zh.d.ts +57 -0
- package/dist/i18n/zht.d.ts +57 -0
- package/dist/overlays/dialog/dialog.d.ts +4 -1
- package/package.json +1 -1
- package/src/context/dialog.tsx +11 -2
- package/src/context/i18n.tsx +49 -5
- package/src/i18n/am.ts +57 -0
- package/src/i18n/ar.ts +98 -0
- package/src/i18n/az.ts +57 -0
- package/src/i18n/bg.ts +57 -0
- package/src/i18n/bn.ts +61 -0
- package/src/i18n/br.ts +69 -0
- package/src/i18n/bs.ts +67 -0
- package/src/i18n/ca.ts +67 -0
- package/src/i18n/cs.ts +77 -0
- package/src/i18n/da.ts +58 -0
- package/src/i18n/de.ts +58 -0
- package/src/i18n/dv.ts +64 -0
- package/src/i18n/dz.ts +59 -0
- package/src/i18n/el.ts +57 -0
- package/src/i18n/en.ts +6 -0
- package/src/i18n/es.ts +68 -0
- package/src/i18n/et.ts +57 -0
- package/src/i18n/fa.ts +59 -0
- package/src/i18n/fi.ts +58 -0
- package/src/i18n/fo.ts +57 -0
- package/src/i18n/fr.ts +68 -0
- package/src/i18n/he.ts +68 -0
- package/src/i18n/hi.ts +61 -0
- package/src/i18n/hr.ts +67 -0
- package/src/i18n/hu.ts +57 -0
- package/src/i18n/hy.ts +58 -0
- package/src/i18n/id.ts +58 -0
- package/src/i18n/is.ts +58 -0
- package/src/i18n/it.ts +69 -0
- package/src/i18n/ja.ts +58 -0
- package/src/i18n/ka.ts +58 -0
- package/src/i18n/km.ts +61 -3
- package/src/i18n/ko.ts +58 -0
- package/src/i18n/lo.ts +58 -0
- package/src/i18n/lt.ts +77 -0
- package/src/i18n/lv.ts +67 -0
- package/src/i18n/mk.ts +57 -0
- package/src/i18n/mn.ts +57 -0
- package/src/i18n/ms.ts +58 -0
- package/src/i18n/my.ts +58 -0
- package/src/i18n/ne.ts +61 -0
- package/src/i18n/nl.ts +58 -0
- package/src/i18n/no.ts +58 -0
- package/src/i18n/pa.ts +63 -0
- package/src/i18n/pl.ts +77 -0
- package/src/i18n/ro.ts +68 -0
- package/src/i18n/ru.ts +77 -0
- package/src/i18n/si.ts +61 -0
- package/src/i18n/sk.ts +85 -8
- package/src/i18n/sl.ts +85 -8
- package/src/i18n/sq.ts +57 -0
- package/src/i18n/sr.ts +71 -4
- package/src/i18n/sv.ts +58 -0
- package/src/i18n/tg.ts +58 -0
- package/src/i18n/th.ts +58 -0
- package/src/i18n/tk.ts +57 -0
- package/src/i18n/tr.ts +57 -0
- package/src/i18n/uk.ts +85 -8
- package/src/i18n/ur.ts +64 -0
- package/src/i18n/uz.ts +59 -2
- package/src/i18n/vi.ts +59 -1
- package/src/i18n/zh.ts +58 -0
- package/src/i18n/zht.ts +58 -0
- package/src/overlays/dialog/dialog.tsx +23 -4
- package/src/theme/color.ts +1 -1
- package/src/theme/themes/catppuccin-frappe.json +20 -40
- package/src/theme/themes/catppuccin-macchiato.json +14 -34
- package/src/theme/themes/catppuccin.json +7 -7
- package/src/theme/themes/kanagawa.json +18 -18
- package/src/theme/themes/oc-2.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CloseButton, Content, Description, Title } from "@kobalte/core/dialog"
|
|
2
|
-
import { type ComponentProps, type JSXElement, type ParentProps, Show, children, splitProps } from "solid-js"
|
|
2
|
+
import { type ComponentProps, type JSXElement, type ParentProps, Show, children, createEffect, splitProps } from "solid-js"
|
|
3
|
+
import { useDialogLayer } from "../../context/dialog"
|
|
3
4
|
import { useI18n } from "../../context/i18n"
|
|
4
5
|
import "./dialog.css"
|
|
5
6
|
|
|
@@ -10,6 +11,8 @@ export interface DialogProps extends ParentProps {
|
|
|
10
11
|
containerClass?: ComponentProps<"div">["class"]
|
|
11
12
|
classList?: ComponentProps<"div">["classList"]
|
|
12
13
|
fit?: boolean
|
|
14
|
+
onCloseAutoFocus?: ComponentProps<typeof Content>["onCloseAutoFocus"]
|
|
15
|
+
preventBackdropDismiss?: boolean
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export interface DialogHeaderProps extends ParentProps {
|
|
@@ -19,7 +22,7 @@ export interface DialogHeaderProps extends ParentProps {
|
|
|
19
22
|
|
|
20
23
|
export interface DialogTitleGroupProps {
|
|
21
24
|
title?: JSXElement
|
|
22
|
-
description
|
|
25
|
+
description?: JSXElement
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export function DialogFooter(props: ParentProps) {
|
|
@@ -46,7 +49,7 @@ export function DialogTitleGroup(props: DialogTitleGroupProps) {
|
|
|
46
49
|
return (
|
|
47
50
|
<div data-slot="dialog-title-group">
|
|
48
51
|
<Show when={title()}>{(t) => <Title data-slot="dialog-title">{t()}</Title>}</Show>
|
|
49
|
-
<Description data-slot="dialog-description">{
|
|
52
|
+
<Show when={description()}>{(value) => <Description data-slot="dialog-description">{value()}</Description>}</Show>
|
|
50
53
|
</div>
|
|
51
54
|
)
|
|
52
55
|
}
|
|
@@ -82,7 +85,19 @@ export function DialogHeader(props: DialogHeaderProps) {
|
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
export function Dialog(props: DialogProps) {
|
|
85
|
-
const [local] = splitProps(props, [
|
|
88
|
+
const [local] = splitProps(props, [
|
|
89
|
+
"size",
|
|
90
|
+
"variant",
|
|
91
|
+
"class",
|
|
92
|
+
"containerClass",
|
|
93
|
+
"classList",
|
|
94
|
+
"fit",
|
|
95
|
+
"children",
|
|
96
|
+
"onCloseAutoFocus",
|
|
97
|
+
"preventBackdropDismiss",
|
|
98
|
+
])
|
|
99
|
+
const layer = useDialogLayer()
|
|
100
|
+
createEffect(() => layer?.setBackdropDismiss(!local.preventBackdropDismiss))
|
|
86
101
|
|
|
87
102
|
return (
|
|
88
103
|
<div
|
|
@@ -94,6 +109,10 @@ export function Dialog(props: DialogProps) {
|
|
|
94
109
|
<div data-slot="dialog-container" class={local.containerClass}>
|
|
95
110
|
<Content
|
|
96
111
|
data-slot="dialog-content"
|
|
112
|
+
onCloseAutoFocus={local.onCloseAutoFocus}
|
|
113
|
+
onPointerDownOutside={(event) => {
|
|
114
|
+
if (local.preventBackdropDismiss) event.preventDefault()
|
|
115
|
+
}}
|
|
97
116
|
classList={{
|
|
98
117
|
...local.classList,
|
|
99
118
|
[local.class ?? ""]: !!local.class,
|
package/src/theme/color.ts
CHANGED
|
@@ -258,7 +258,7 @@ export function contrastRatio(foreground: HexColor, background: HexColor) {
|
|
|
258
258
|
const linear = (c: number) => (c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4)
|
|
259
259
|
const luminance = (hex: HexColor) => {
|
|
260
260
|
const { r, g, b } = hexToRgb(hex)
|
|
261
|
-
return 0.2126 * linear(r) + 0.
|
|
261
|
+
return 0.2126 * linear(r) + 0.7152 * linear(g) + 0.0722 * linear(b)
|
|
262
262
|
}
|
|
263
263
|
const fg = luminance(foreground)
|
|
264
264
|
const bg = luminance(background)
|
|
@@ -4,49 +4,29 @@
|
|
|
4
4
|
"id": "catppuccin-frappe",
|
|
5
5
|
"light": {
|
|
6
6
|
"palette": {
|
|
7
|
-
"neutral": "#
|
|
8
|
-
"ink": "#
|
|
9
|
-
"primary": "#
|
|
10
|
-
"accent": "#
|
|
11
|
-
"success": "#
|
|
12
|
-
"warning": "#
|
|
13
|
-
"error": "#
|
|
14
|
-
"info": "#
|
|
7
|
+
"neutral": "#eff1f5",
|
|
8
|
+
"ink": "#4c4f69",
|
|
9
|
+
"primary": "#7287fd",
|
|
10
|
+
"accent": "#d20f39",
|
|
11
|
+
"success": "#40a02b",
|
|
12
|
+
"warning": "#df8e1d",
|
|
13
|
+
"error": "#d20f39",
|
|
14
|
+
"info": "#04a5e5",
|
|
15
|
+
"diffAdd": "#40a02b",
|
|
16
|
+
"diffDelete": "#d20f39"
|
|
15
17
|
},
|
|
16
18
|
"overrides": {
|
|
17
|
-
"
|
|
18
|
-
"syntax-
|
|
19
|
-
"syntax-
|
|
20
|
-
"syntax-
|
|
21
|
-
"syntax-primitive": "#8da4e2",
|
|
22
|
-
"syntax-variable": "#e78284",
|
|
23
|
-
"syntax-property": "#99d1db",
|
|
24
|
-
"syntax-type": "#e5c890",
|
|
25
|
-
"syntax-constant": "#ef9f76",
|
|
26
|
-
"syntax-operator": "#99d1db",
|
|
27
|
-
"syntax-punctuation": "#c6d0f5",
|
|
28
|
-
"syntax-object": "#e78284",
|
|
29
|
-
"markdown-heading": "#ca9ee6",
|
|
30
|
-
"markdown-text": "#c6d0f5",
|
|
31
|
-
"markdown-link": "#8da4e2",
|
|
32
|
-
"markdown-link-text": "#99d1db",
|
|
33
|
-
"markdown-code": "#a6d189",
|
|
34
|
-
"markdown-block-quote": "#e5c890",
|
|
35
|
-
"markdown-emph": "#e5c890",
|
|
36
|
-
"markdown-strong": "#ef9f76",
|
|
37
|
-
"markdown-horizontal-rule": "#a5adce",
|
|
38
|
-
"markdown-list-item": "#8da4e2",
|
|
39
|
-
"markdown-list-enumeration": "#99d1db",
|
|
40
|
-
"markdown-image": "#8da4e2",
|
|
41
|
-
"markdown-image-text": "#99d1db",
|
|
42
|
-
"markdown-code-block": "#c6d0f5"
|
|
19
|
+
"syntax-comment": "#6c6f85",
|
|
20
|
+
"syntax-keyword": "#8839ef",
|
|
21
|
+
"syntax-primitive": "#1e66f5",
|
|
22
|
+
"syntax-constant": "#fe640b"
|
|
43
23
|
}
|
|
44
24
|
},
|
|
45
25
|
"dark": {
|
|
46
26
|
"palette": {
|
|
47
27
|
"neutral": "#303446",
|
|
48
28
|
"ink": "#c6d0f5",
|
|
49
|
-
"primary": "#
|
|
29
|
+
"primary": "#8caaee",
|
|
50
30
|
"accent": "#f4b8e4",
|
|
51
31
|
"success": "#a6d189",
|
|
52
32
|
"warning": "#e5c890",
|
|
@@ -55,10 +35,10 @@
|
|
|
55
35
|
},
|
|
56
36
|
"overrides": {
|
|
57
37
|
"text-weak": "#b5bfe2",
|
|
58
|
-
"syntax-comment": "#
|
|
38
|
+
"syntax-comment": "#949cbb",
|
|
59
39
|
"syntax-keyword": "#ca9ee6",
|
|
60
40
|
"syntax-string": "#a6d189",
|
|
61
|
-
"syntax-primitive": "#
|
|
41
|
+
"syntax-primitive": "#8caaee",
|
|
62
42
|
"syntax-variable": "#e78284",
|
|
63
43
|
"syntax-property": "#99d1db",
|
|
64
44
|
"syntax-type": "#e5c890",
|
|
@@ -68,16 +48,16 @@
|
|
|
68
48
|
"syntax-object": "#e78284",
|
|
69
49
|
"markdown-heading": "#ca9ee6",
|
|
70
50
|
"markdown-text": "#c6d0f5",
|
|
71
|
-
"markdown-link": "#
|
|
51
|
+
"markdown-link": "#8caaee",
|
|
72
52
|
"markdown-link-text": "#99d1db",
|
|
73
53
|
"markdown-code": "#a6d189",
|
|
74
54
|
"markdown-block-quote": "#e5c890",
|
|
75
55
|
"markdown-emph": "#e5c890",
|
|
76
56
|
"markdown-strong": "#ef9f76",
|
|
77
57
|
"markdown-horizontal-rule": "#a5adce",
|
|
78
|
-
"markdown-list-item": "#
|
|
58
|
+
"markdown-list-item": "#8caaee",
|
|
79
59
|
"markdown-list-enumeration": "#99d1db",
|
|
80
|
-
"markdown-image": "#
|
|
60
|
+
"markdown-image": "#8caaee",
|
|
81
61
|
"markdown-image-text": "#99d1db",
|
|
82
62
|
"markdown-code-block": "#c6d0f5"
|
|
83
63
|
}
|
|
@@ -4,42 +4,22 @@
|
|
|
4
4
|
"id": "catppuccin-macchiato",
|
|
5
5
|
"light": {
|
|
6
6
|
"palette": {
|
|
7
|
-
"neutral": "#
|
|
8
|
-
"ink": "#
|
|
9
|
-
"primary": "#
|
|
10
|
-
"accent": "#
|
|
11
|
-
"success": "#
|
|
12
|
-
"warning": "#
|
|
13
|
-
"error": "#
|
|
14
|
-
"info": "#
|
|
7
|
+
"neutral": "#eff1f5",
|
|
8
|
+
"ink": "#4c4f69",
|
|
9
|
+
"primary": "#7287fd",
|
|
10
|
+
"accent": "#d20f39",
|
|
11
|
+
"success": "#40a02b",
|
|
12
|
+
"warning": "#df8e1d",
|
|
13
|
+
"error": "#d20f39",
|
|
14
|
+
"info": "#04a5e5",
|
|
15
|
+
"diffAdd": "#40a02b",
|
|
16
|
+
"diffDelete": "#d20f39"
|
|
15
17
|
},
|
|
16
18
|
"overrides": {
|
|
17
|
-
"
|
|
18
|
-
"syntax-
|
|
19
|
-
"syntax-
|
|
20
|
-
"syntax-
|
|
21
|
-
"syntax-primitive": "#8aadf4",
|
|
22
|
-
"syntax-variable": "#ed8796",
|
|
23
|
-
"syntax-property": "#91d7e3",
|
|
24
|
-
"syntax-type": "#eed49f",
|
|
25
|
-
"syntax-constant": "#f5a97f",
|
|
26
|
-
"syntax-operator": "#91d7e3",
|
|
27
|
-
"syntax-punctuation": "#cad3f5",
|
|
28
|
-
"syntax-object": "#ed8796",
|
|
29
|
-
"markdown-heading": "#c6a0f6",
|
|
30
|
-
"markdown-text": "#cad3f5",
|
|
31
|
-
"markdown-link": "#8aadf4",
|
|
32
|
-
"markdown-link-text": "#91d7e3",
|
|
33
|
-
"markdown-code": "#a6da95",
|
|
34
|
-
"markdown-block-quote": "#eed49f",
|
|
35
|
-
"markdown-emph": "#eed49f",
|
|
36
|
-
"markdown-strong": "#f5a97f",
|
|
37
|
-
"markdown-horizontal-rule": "#a5adcb",
|
|
38
|
-
"markdown-list-item": "#8aadf4",
|
|
39
|
-
"markdown-list-enumeration": "#91d7e3",
|
|
40
|
-
"markdown-image": "#8aadf4",
|
|
41
|
-
"markdown-image-text": "#91d7e3",
|
|
42
|
-
"markdown-code-block": "#cad3f5"
|
|
19
|
+
"syntax-comment": "#6c6f85",
|
|
20
|
+
"syntax-keyword": "#8839ef",
|
|
21
|
+
"syntax-primitive": "#1e66f5",
|
|
22
|
+
"syntax-constant": "#fe640b"
|
|
43
23
|
}
|
|
44
24
|
},
|
|
45
25
|
"dark": {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"id": "catppuccin",
|
|
5
5
|
"light": {
|
|
6
6
|
"palette": {
|
|
7
|
-
"neutral": "#
|
|
7
|
+
"neutral": "#eff1f5",
|
|
8
8
|
"ink": "#4c4f69",
|
|
9
9
|
"primary": "#7287fd",
|
|
10
10
|
"accent": "#d20f39",
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"warning": "#df8e1d",
|
|
13
13
|
"error": "#d20f39",
|
|
14
14
|
"info": "#04a5e5",
|
|
15
|
-
"diffAdd": "#
|
|
16
|
-
"diffDelete": "#
|
|
15
|
+
"diffAdd": "#40a02b",
|
|
16
|
+
"diffDelete": "#d20f39"
|
|
17
17
|
},
|
|
18
18
|
"overrides": {
|
|
19
|
-
"syntax-comment": "#
|
|
19
|
+
"syntax-comment": "#6c6f85",
|
|
20
20
|
"syntax-keyword": "#8839ef",
|
|
21
21
|
"syntax-primitive": "#1e66f5",
|
|
22
|
-
"syntax-constant": "#
|
|
22
|
+
"syntax-constant": "#fe640b"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dark": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"ink": "#cdd6f4",
|
|
29
29
|
"primary": "#b4befe",
|
|
30
30
|
"accent": "#f38ba8",
|
|
31
|
-
"success": "#
|
|
32
|
-
"warning": "#
|
|
31
|
+
"success": "#a6e3a1",
|
|
32
|
+
"warning": "#f9e2af",
|
|
33
33
|
"error": "#f38ba8",
|
|
34
34
|
"info": "#89dceb",
|
|
35
35
|
"diffAdd": "#94e2d5",
|
|
@@ -8,35 +8,35 @@
|
|
|
8
8
|
"ink": "#54433A",
|
|
9
9
|
"primary": "#2D4F67",
|
|
10
10
|
"accent": "#D27E99",
|
|
11
|
-
"success": "#
|
|
12
|
-
"warning": "#
|
|
11
|
+
"success": "#6f894e",
|
|
12
|
+
"warning": "#cc6d00",
|
|
13
13
|
"error": "#E82424",
|
|
14
|
-
"info": "#
|
|
14
|
+
"info": "#4d699b",
|
|
15
15
|
"diffAdd": "#89AF5B",
|
|
16
16
|
"diffDelete": "#D61F1F"
|
|
17
17
|
},
|
|
18
18
|
"overrides": {
|
|
19
|
-
"text-weak": "#
|
|
20
|
-
"syntax-comment": "#
|
|
21
|
-
"syntax-keyword": "#
|
|
22
|
-
"syntax-string": "#
|
|
19
|
+
"text-weak": "#8a8980",
|
|
20
|
+
"syntax-comment": "#8a8980",
|
|
21
|
+
"syntax-keyword": "#624c83",
|
|
22
|
+
"syntax-string": "#6f894e",
|
|
23
23
|
"syntax-primitive": "#2D4F67",
|
|
24
24
|
"syntax-variable": "#54433A",
|
|
25
|
-
"syntax-property": "#
|
|
26
|
-
"syntax-type": "#
|
|
27
|
-
"syntax-constant": "#
|
|
28
|
-
"syntax-operator": "#
|
|
25
|
+
"syntax-property": "#4d699b",
|
|
26
|
+
"syntax-type": "#b35b79",
|
|
27
|
+
"syntax-constant": "#cc6d00",
|
|
28
|
+
"syntax-operator": "#735896",
|
|
29
29
|
"syntax-punctuation": "#54433A",
|
|
30
30
|
"syntax-object": "#54433A",
|
|
31
|
-
"markdown-heading": "#
|
|
31
|
+
"markdown-heading": "#624c83",
|
|
32
32
|
"markdown-text": "#54433A",
|
|
33
33
|
"markdown-link": "#2D4F67",
|
|
34
|
-
"markdown-link-text": "#
|
|
35
|
-
"markdown-code": "#
|
|
36
|
-
"markdown-block-quote": "#
|
|
37
|
-
"markdown-emph": "#
|
|
38
|
-
"markdown-strong": "#
|
|
39
|
-
"markdown-horizontal-rule": "#
|
|
34
|
+
"markdown-link-text": "#4d699b",
|
|
35
|
+
"markdown-code": "#6f894e",
|
|
36
|
+
"markdown-block-quote": "#8a8980",
|
|
37
|
+
"markdown-emph": "#b35b79",
|
|
38
|
+
"markdown-strong": "#cc6d00",
|
|
39
|
+
"markdown-horizontal-rule": "#8a8980",
|
|
40
40
|
"markdown-list-item": "#2D4F67",
|
|
41
41
|
"markdown-list-enumeration": "#76946A",
|
|
42
42
|
"markdown-image": "#2D4F67",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"border-weak-base": "#DBDBDB",
|
|
26
26
|
"border-weaker-base": "#E8E8E8",
|
|
27
27
|
"icon-base": "#8F8F8F",
|
|
28
|
-
"icon-weak-base": "C7C7C7",
|
|
28
|
+
"icon-weak-base": "#C7C7C7",
|
|
29
29
|
"surface-raised-base": "#F3F3F3",
|
|
30
30
|
"surface-raised-base-hover": "#EDEDED",
|
|
31
31
|
"surface-base": "#F8F8F8",
|