@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.
Files changed (101) hide show
  1. package/dist/context/dialog.d.ts +3 -0
  2. package/dist/context/i18n.d.ts +11 -2
  3. package/dist/i18n/ar.d.ts +97 -0
  4. package/dist/i18n/bg.d.ts +57 -0
  5. package/dist/i18n/br.d.ts +67 -0
  6. package/dist/i18n/bs.d.ts +67 -0
  7. package/dist/i18n/da.d.ts +57 -0
  8. package/dist/i18n/de.d.ts +57 -0
  9. package/dist/i18n/en.d.ts +6 -0
  10. package/dist/i18n/es.d.ts +67 -0
  11. package/dist/i18n/fr.d.ts +67 -0
  12. package/dist/i18n/he.d.ts +67 -0
  13. package/dist/i18n/ja.d.ts +57 -0
  14. package/dist/i18n/km.d.ts +57 -0
  15. package/dist/i18n/ko.d.ts +57 -0
  16. package/dist/i18n/lo.d.ts +57 -0
  17. package/dist/i18n/mk.d.ts +57 -0
  18. package/dist/i18n/mn.d.ts +57 -0
  19. package/dist/i18n/my.d.ts +57 -0
  20. package/dist/i18n/pl.d.ts +77 -0
  21. package/dist/i18n/ru.d.ts +77 -0
  22. package/dist/i18n/sr.d.ts +71 -4
  23. package/dist/i18n/tg.d.ts +57 -0
  24. package/dist/i18n/th.d.ts +57 -0
  25. package/dist/i18n/tr.d.ts +57 -0
  26. package/dist/i18n/zh.d.ts +57 -0
  27. package/dist/i18n/zht.d.ts +57 -0
  28. package/dist/overlays/dialog/dialog.d.ts +4 -1
  29. package/package.json +1 -1
  30. package/src/context/dialog.tsx +11 -2
  31. package/src/context/i18n.tsx +49 -5
  32. package/src/i18n/am.ts +57 -0
  33. package/src/i18n/ar.ts +98 -0
  34. package/src/i18n/az.ts +57 -0
  35. package/src/i18n/bg.ts +57 -0
  36. package/src/i18n/bn.ts +61 -0
  37. package/src/i18n/br.ts +69 -0
  38. package/src/i18n/bs.ts +67 -0
  39. package/src/i18n/ca.ts +67 -0
  40. package/src/i18n/cs.ts +77 -0
  41. package/src/i18n/da.ts +58 -0
  42. package/src/i18n/de.ts +58 -0
  43. package/src/i18n/dv.ts +64 -0
  44. package/src/i18n/dz.ts +59 -0
  45. package/src/i18n/el.ts +57 -0
  46. package/src/i18n/en.ts +6 -0
  47. package/src/i18n/es.ts +68 -0
  48. package/src/i18n/et.ts +57 -0
  49. package/src/i18n/fa.ts +59 -0
  50. package/src/i18n/fi.ts +58 -0
  51. package/src/i18n/fo.ts +57 -0
  52. package/src/i18n/fr.ts +68 -0
  53. package/src/i18n/he.ts +68 -0
  54. package/src/i18n/hi.ts +61 -0
  55. package/src/i18n/hr.ts +67 -0
  56. package/src/i18n/hu.ts +57 -0
  57. package/src/i18n/hy.ts +58 -0
  58. package/src/i18n/id.ts +58 -0
  59. package/src/i18n/is.ts +58 -0
  60. package/src/i18n/it.ts +69 -0
  61. package/src/i18n/ja.ts +58 -0
  62. package/src/i18n/ka.ts +58 -0
  63. package/src/i18n/km.ts +61 -3
  64. package/src/i18n/ko.ts +58 -0
  65. package/src/i18n/lo.ts +58 -0
  66. package/src/i18n/lt.ts +77 -0
  67. package/src/i18n/lv.ts +67 -0
  68. package/src/i18n/mk.ts +57 -0
  69. package/src/i18n/mn.ts +57 -0
  70. package/src/i18n/ms.ts +58 -0
  71. package/src/i18n/my.ts +58 -0
  72. package/src/i18n/ne.ts +61 -0
  73. package/src/i18n/nl.ts +58 -0
  74. package/src/i18n/no.ts +58 -0
  75. package/src/i18n/pa.ts +63 -0
  76. package/src/i18n/pl.ts +77 -0
  77. package/src/i18n/ro.ts +68 -0
  78. package/src/i18n/ru.ts +77 -0
  79. package/src/i18n/si.ts +61 -0
  80. package/src/i18n/sk.ts +85 -8
  81. package/src/i18n/sl.ts +85 -8
  82. package/src/i18n/sq.ts +57 -0
  83. package/src/i18n/sr.ts +71 -4
  84. package/src/i18n/sv.ts +58 -0
  85. package/src/i18n/tg.ts +58 -0
  86. package/src/i18n/th.ts +58 -0
  87. package/src/i18n/tk.ts +57 -0
  88. package/src/i18n/tr.ts +57 -0
  89. package/src/i18n/uk.ts +85 -8
  90. package/src/i18n/ur.ts +64 -0
  91. package/src/i18n/uz.ts +59 -2
  92. package/src/i18n/vi.ts +59 -1
  93. package/src/i18n/zh.ts +58 -0
  94. package/src/i18n/zht.ts +58 -0
  95. package/src/overlays/dialog/dialog.tsx +23 -4
  96. package/src/theme/color.ts +1 -1
  97. package/src/theme/themes/catppuccin-frappe.json +20 -40
  98. package/src/theme/themes/catppuccin-macchiato.json +14 -34
  99. package/src/theme/themes/catppuccin.json +7 -7
  100. package/src/theme/themes/kanagawa.json +18 -18
  101. 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: JSXElement
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">{description()}</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, ["size", "variant", "class", "containerClass", "classList", "fit", "children"])
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,
@@ -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.587 * linear(g) + 0.0722 * linear(b)
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": "#303446",
8
- "ink": "#c6d0f5",
9
- "primary": "#8da4e2",
10
- "accent": "#f4b8e4",
11
- "success": "#a6d189",
12
- "warning": "#e5c890",
13
- "error": "#e78284",
14
- "info": "#81c8be"
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
- "text-weak": "#b5bfe2",
18
- "syntax-comment": "#949cb8",
19
- "syntax-keyword": "#ca9ee6",
20
- "syntax-string": "#a6d189",
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": "#8da4e2",
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": "#949cb8",
38
+ "syntax-comment": "#949cbb",
59
39
  "syntax-keyword": "#ca9ee6",
60
40
  "syntax-string": "#a6d189",
61
- "syntax-primitive": "#8da4e2",
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": "#8da4e2",
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": "#8da4e2",
58
+ "markdown-list-item": "#8caaee",
79
59
  "markdown-list-enumeration": "#99d1db",
80
- "markdown-image": "#8da4e2",
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": "#24273a",
8
- "ink": "#cad3f5",
9
- "primary": "#8aadf4",
10
- "accent": "#f5bde6",
11
- "success": "#a6da95",
12
- "warning": "#eed49f",
13
- "error": "#ed8796",
14
- "info": "#8bd5ca"
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
- "text-weak": "#b8c0e0",
18
- "syntax-comment": "#939ab7",
19
- "syntax-keyword": "#c6a0f6",
20
- "syntax-string": "#a6da95",
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": "#f5e0dc",
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": "#a6d189",
16
- "diffDelete": "#e78284"
15
+ "diffAdd": "#40a02b",
16
+ "diffDelete": "#d20f39"
17
17
  },
18
18
  "overrides": {
19
- "syntax-comment": "#6c7086",
19
+ "syntax-comment": "#6c6f85",
20
20
  "syntax-keyword": "#8839ef",
21
21
  "syntax-primitive": "#1e66f5",
22
- "syntax-constant": "#ca6702"
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": "#a6d189",
32
- "warning": "#f4b8e4",
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": "#98BB6C",
12
- "warning": "#D7A657",
11
+ "success": "#6f894e",
12
+ "warning": "#cc6d00",
13
13
  "error": "#E82424",
14
- "info": "#76946A",
14
+ "info": "#4d699b",
15
15
  "diffAdd": "#89AF5B",
16
16
  "diffDelete": "#D61F1F"
17
17
  },
18
18
  "overrides": {
19
- "text-weak": "#9E9389",
20
- "syntax-comment": "#9E9389",
21
- "syntax-keyword": "#957FB8",
22
- "syntax-string": "#98BB6C",
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": "#76946A",
26
- "syntax-type": "#C38D9D",
27
- "syntax-constant": "#D7A657",
28
- "syntax-operator": "#D27E99",
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": "#957FB8",
31
+ "markdown-heading": "#624c83",
32
32
  "markdown-text": "#54433A",
33
33
  "markdown-link": "#2D4F67",
34
- "markdown-link-text": "#76946A",
35
- "markdown-code": "#98BB6C",
36
- "markdown-block-quote": "#9E9389",
37
- "markdown-emph": "#C38D9D",
38
- "markdown-strong": "#D7A657",
39
- "markdown-horizontal-rule": "#9E9389",
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",