@opencode-ai/ui 0.0.0-dev-18424 → 0.0.0-dev-202608272004
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/{data-display/accordion → components}/accordion.d.ts +6 -6
- package/dist/components/avatar.d.ts +9 -0
- package/dist/components/button.d.ts +9 -0
- package/dist/components/card.d.ts +1 -1
- package/dist/{forms/checkbox → components}/checkbox.d.ts +2 -2
- package/dist/components/dialog.d.ts +12 -0
- package/dist/{data-display/diff-changes → components}/diff-changes.d.ts +1 -2
- package/dist/components/dropdown-menu.d.ts +80 -0
- package/dist/components/icon-button.d.ts +10 -0
- package/dist/{icons/icon/additional-icons.d.ts → components/icon.d.ts} +8 -8
- package/dist/components/keybind.d.ts +6 -0
- package/dist/components/list.d.ts +1 -1
- package/dist/{feedback/progress-circle → components}/progress-circle.d.ts +0 -2
- package/dist/components/radio-group.d.ts +16 -0
- package/dist/components/scroll-view.d.ts +3 -3
- package/dist/components/select.d.ts +21 -0
- package/dist/{forms/switch → components}/switch.d.ts +2 -4
- package/dist/{navigation/tabs → components}/tabs.d.ts +8 -15
- package/dist/components/tag.d.ts +5 -0
- package/dist/{typography/text-shimmer → components}/text-shimmer.d.ts +0 -1
- package/dist/components/toast.d.ts +56 -0
- package/dist/components/tooltip.d.ts +17 -0
- package/dist/context/i18n.d.ts +7 -10
- package/dist/i18n/ar.d.ts +2 -0
- package/dist/i18n/bg.d.ts +2 -0
- package/dist/i18n/br.d.ts +2 -0
- package/dist/i18n/bs.d.ts +2 -0
- package/dist/i18n/da.d.ts +2 -0
- package/dist/i18n/de.d.ts +2 -0
- package/dist/i18n/en.d.ts +1 -227
- package/dist/i18n/es.d.ts +2 -0
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/ja.d.ts +2 -0
- package/dist/i18n/km.d.ts +2 -0
- package/dist/i18n/ko.d.ts +2 -0
- package/dist/i18n/lo.d.ts +2 -0
- package/dist/i18n/mk.d.ts +2 -0
- package/dist/i18n/mn.d.ts +2 -0
- package/dist/i18n/my.d.ts +2 -0
- package/dist/i18n/pl.d.ts +2 -0
- package/dist/i18n/ru.d.ts +2 -0
- package/dist/i18n/sr.d.ts +2 -0
- package/dist/i18n/tg.d.ts +2 -0
- package/dist/i18n/th.d.ts +2 -0
- package/dist/i18n/tr.d.ts +2 -0
- package/dist/i18n/zh.d.ts +2 -0
- package/dist/i18n/zht.d.ts +2 -0
- package/dist/v2/components/accordion-v2.d.ts +26 -0
- package/dist/{data-display/avatar/avatar.d.ts → v2/components/avatar-v2.d.ts} +1 -1
- package/dist/v2/components/badge-v2.d.ts +6 -0
- package/dist/v2/components/button-v2.d.ts +10 -0
- package/dist/v2/components/checkbox-v2.d.ts +10 -0
- package/dist/{overlays/dialog/dialog.d.ts → v2/components/dialog-v2.d.ts} +2 -1
- package/dist/v2/components/diff-changes-v2.d.ts +11 -0
- package/dist/v2/components/divider-v2.d.ts +5 -0
- package/dist/{forms/field/field.d.ts → v2/components/field-v2.d.ts} +10 -4
- package/dist/v2/components/icon-button-v2.d.ts +11 -0
- package/dist/{icons/icon → v2/components}/icon.d.ts +1 -24
- package/dist/v2/components/inline-input-v2.d.ts +21 -0
- package/dist/v2/components/keybind-v2.d.ts +7 -0
- package/dist/{data-display/line-comment/line-comment.d.ts → v2/components/line-comment-v2.d.ts} +9 -9
- package/dist/v2/components/loader-v2.d.ts +3 -0
- package/dist/v2/components/menu-v2.d.ts +52 -0
- package/dist/v2/components/progress-circle-v2.d.ts +8 -0
- package/dist/{data-display/project-avatar/project-avatar.d.ts → v2/components/project-avatar-v2.d.ts} +1 -1
- package/dist/v2/components/radio-v2.d.ts +16 -0
- package/dist/{navigation/segmented-control/segmented-control.d.ts → v2/components/segmented-control-v2.d.ts} +5 -5
- package/dist/{forms/select/select.d.ts → v2/components/select-v2.d.ts} +6 -4
- package/dist/v2/components/split-button-v2.d.ts +5 -0
- package/dist/v2/components/switch-v2.d.ts +7 -0
- package/dist/v2/components/tabs-v2.d.ts +34 -0
- package/dist/{forms/text-input/text-input.d.ts → v2/components/text-input-v2.d.ts} +3 -3
- package/dist/v2/components/text-shimmer-v2.d.ts +9 -0
- package/dist/v2/components/textarea-v2.d.ts +7 -0
- package/dist/v2/components/toast-v2.d.ts +57 -0
- package/dist/v2/components/tooltip-v2.d.ts +13 -0
- package/dist/v2/components/wordmark-v2.d.ts +2 -0
- package/package.json +13 -131
- package/src/{data-display/accordion → components}/accordion.css +26 -1
- package/src/{data-display/accordion → components}/accordion.tsx +14 -14
- package/src/components/animated-number.css +11 -29
- package/src/components/animated-number.tsx +2 -2
- package/src/components/avatar.css +49 -0
- package/src/components/avatar.tsx +55 -0
- package/src/components/button.css +194 -0
- package/src/{actions/button → components}/button.tsx +11 -10
- package/src/components/card.css +23 -2
- package/src/components/card.tsx +4 -4
- package/src/{forms/checkbox → components}/checkbox.css +7 -1
- package/src/{forms/checkbox → components}/checkbox.tsx +13 -13
- package/src/components/collapsible.tsx +2 -2
- package/src/components/dialog.css +181 -0
- package/src/components/dialog.tsx +72 -0
- package/src/{data-display/diff-changes → components}/diff-changes.css +19 -22
- package/src/components/diff-changes.tsx +115 -0
- package/src/components/dock-surface.css +9 -2
- package/src/components/dropdown-menu.css +135 -0
- package/src/components/dropdown-menu.tsx +308 -0
- package/src/components/icon-button.css +181 -0
- package/src/components/icon-button.tsx +29 -0
- package/src/components/icon.css +39 -0
- package/src/{icons/icon/additional-icons.ts → components/icon.tsx} +74 -8
- package/src/components/image-preview.tsx +2 -3
- package/src/components/keybind.css +18 -0
- package/src/components/keybind.tsx +20 -0
- package/src/components/list.css +5 -5
- package/src/components/list.tsx +5 -7
- package/src/components/popover.tsx +2 -3
- package/src/components/progress-circle.css +16 -0
- package/src/components/progress-circle.tsx +64 -0
- package/src/components/radio-group.css +187 -0
- package/src/components/radio-group.tsx +83 -0
- package/src/components/scroll-view.tsx +20 -5
- package/src/components/select.css +201 -0
- package/src/components/select.tsx +174 -0
- package/src/components/sticky-accordion-header.tsx +1 -1
- package/src/components/switch.css +136 -0
- package/src/components/switch.tsx +29 -0
- package/src/{navigation/tabs → components}/tabs.css +229 -39
- package/src/components/tabs.tsx +126 -0
- package/src/components/tag.css +37 -0
- package/src/components/tag.tsx +22 -0
- package/src/components/text-field.tsx +4 -12
- package/src/{typography/text-shimmer → components}/text-shimmer.css +1 -2
- package/src/{typography/text-shimmer → components}/text-shimmer.tsx +0 -1
- package/src/components/toast.css +236 -0
- package/src/components/toast.tsx +185 -0
- package/src/components/tooltip.css +74 -0
- package/src/components/tooltip.tsx +163 -0
- package/src/context/dialog.tsx +0 -1
- package/src/context/i18n.tsx +14 -17
- package/src/hooks/create-auto-scroll.tsx +0 -20
- package/src/i18n/am.ts +3 -1
- package/src/i18n/ar.ts +3 -1
- package/src/i18n/az.ts +3 -1
- package/src/i18n/bg.ts +3 -1
- package/src/i18n/bn.ts +3 -1
- package/src/i18n/br.ts +3 -1
- package/src/i18n/bs.ts +3 -1
- package/src/i18n/ca.ts +3 -1
- package/src/i18n/cs.ts +3 -1
- package/src/i18n/da.ts +3 -1
- package/src/i18n/de.ts +3 -1
- package/src/i18n/dv.ts +3 -1
- package/src/i18n/dz.ts +3 -1
- package/src/i18n/el.ts +3 -1
- package/src/i18n/en.ts +5 -37
- package/src/i18n/es.ts +3 -1
- package/src/i18n/et.ts +3 -1
- package/src/i18n/fa.ts +3 -1
- package/src/i18n/fi.ts +3 -1
- package/src/i18n/fo.ts +3 -1
- package/src/i18n/fr.ts +3 -1
- package/src/i18n/hi.ts +3 -1
- package/src/i18n/hr.ts +3 -1
- package/src/i18n/hu.ts +3 -1
- package/src/i18n/hy.ts +3 -1
- package/src/i18n/id.ts +3 -1
- package/src/i18n/is.ts +3 -1
- package/src/i18n/it.ts +3 -1
- package/src/i18n/ja.ts +3 -1
- package/src/i18n/ka.ts +3 -1
- package/src/i18n/km.ts +3 -1
- package/src/i18n/ko.ts +3 -1
- package/src/i18n/lo.ts +3 -1
- package/src/i18n/lt.ts +3 -1
- package/src/i18n/lv.ts +3 -1
- package/src/i18n/mk.ts +3 -1
- package/src/i18n/mn.ts +3 -1
- package/src/i18n/ms.ts +3 -1
- package/src/i18n/my.ts +3 -1
- package/src/i18n/ne.ts +3 -1
- package/src/i18n/nl.ts +3 -1
- package/src/i18n/no.ts +3 -1
- package/src/i18n/pa.ts +3 -1
- package/src/i18n/pl.ts +3 -1
- package/src/i18n/ro.ts +3 -1
- package/src/i18n/ru.ts +3 -1
- package/src/i18n/si.ts +3 -1
- package/src/i18n/sk.ts +3 -1
- package/src/i18n/sl.ts +3 -1
- package/src/i18n/sq.ts +3 -1
- package/src/i18n/sr.ts +3 -1
- package/src/i18n/sv.ts +3 -1
- package/src/i18n/tg.ts +3 -1
- package/src/i18n/th.ts +3 -1
- package/src/i18n/tk.ts +3 -1
- package/src/i18n/tr.ts +3 -1
- package/src/i18n/uk.ts +3 -1
- package/src/i18n/ur.ts +3 -1
- package/src/i18n/uz.ts +3 -1
- package/src/i18n/vi.ts +3 -1
- package/src/i18n/zh.ts +3 -1
- package/src/i18n/zht.ts +3 -1
- package/src/styles/index.css +20 -4
- package/src/styles/tailwind/colors.css +0 -1
- package/src/styles/tailwind/index.css +1 -18
- package/src/styles/theme.css +2 -2
- package/src/theme/context.tsx +11 -19
- package/src/theme/themes/oc-2.json +1 -3
- package/src/theme/v2/foreground.ts +0 -1
- package/src/v2/components/accordion-v2.css +139 -0
- package/src/v2/components/accordion-v2.tsx +86 -0
- package/src/{data-display/avatar/avatar.tsx → v2/components/avatar-v2.tsx} +1 -1
- package/src/{data-display/badge/badge.css → v2/components/badge-v2.css} +0 -19
- package/src/{data-display/badge/badge.tsx → v2/components/badge-v2.tsx} +4 -6
- package/src/v2/components/button-v2.tsx +35 -0
- package/src/v2/components/checkbox-v2.css +184 -0
- package/src/v2/components/checkbox-v2.tsx +65 -0
- package/src/{overlays/dialog/dialog.css → v2/components/dialog-v2.css} +0 -3
- package/src/{overlays/dialog/dialog.tsx → v2/components/dialog-v2.tsx} +13 -11
- package/src/v2/components/diff-changes-v2.css +26 -0
- package/src/{data-display/diff-changes/diff-changes.tsx → v2/components/diff-changes-v2.tsx} +2 -7
- package/src/{layout/divider/divider.tsx → v2/components/divider-v2.tsx} +3 -3
- package/src/{forms/field/field.css → v2/components/field-v2.css} +1 -1
- package/src/{forms/field/field.tsx → v2/components/field-v2.tsx} +11 -9
- package/src/v2/components/icon-button-v2.tsx +37 -0
- package/src/{icons/icon → v2/components}/icon.tsx +9 -50
- package/src/v2/components/inline-input-v2.css +225 -0
- package/src/v2/components/inline-input-v2.tsx +107 -0
- package/src/{data-display/keybind/keybind.css → v2/components/keybind-v2.css} +1 -1
- package/src/{data-display/keybind/keybind.tsx → v2/components/keybind-v2.tsx} +3 -3
- package/src/{data-display/line-comment/line-comment.css → v2/components/line-comment-v2.css} +3 -3
- package/src/{data-display/line-comment/line-comment.tsx → v2/components/line-comment-v2.tsx} +15 -17
- package/src/{feedback/loader/loader.tsx → v2/components/loader-v2.tsx} +2 -2
- package/src/{navigation/menu/menu.css → v2/components/menu-v2.css} +2 -122
- package/src/{navigation/menu/menu.tsx → v2/components/menu-v2.tsx} +32 -96
- package/src/v2/components/progress-circle-v2.css +13 -0
- package/src/v2/components/progress-circle-v2.tsx +52 -0
- package/src/{data-display/project-avatar/project-avatar.tsx → v2/components/project-avatar-v2.tsx} +1 -1
- package/src/{forms/radio/radio.tsx → v2/components/radio-v2.tsx} +20 -30
- package/src/{navigation/segmented-control/segmented-control.css → v2/components/segmented-control-v2.css} +1 -1
- package/src/{navigation/segmented-control/segmented-control.tsx → v2/components/segmented-control-v2.tsx} +8 -9
- package/src/{forms/select/select.css → v2/components/select-v2.css} +8 -2
- package/src/{forms/select/select.tsx → v2/components/select-v2.tsx} +32 -38
- package/src/{actions/split-button/split-button.css → v2/components/split-button-v2.css} +6 -1
- package/src/{actions/split-button/split-button.tsx → v2/components/split-button-v2.tsx} +4 -4
- package/src/{forms/switch/switch.css → v2/components/switch-v2.css} +0 -110
- package/src/v2/components/switch-v2.tsx +28 -0
- package/src/{navigation/tabs/tabs-current.css → v2/components/tabs-v2.css} +10 -25
- package/src/v2/components/tabs-v2.tsx +149 -0
- package/src/{forms/text-input/text-input.css → v2/components/text-input-v2.css} +1 -1
- package/src/{forms/text-input/text-input.tsx → v2/components/text-input-v2.tsx} +4 -4
- package/src/v2/components/text-shimmer-v2.css +125 -0
- package/src/v2/components/text-shimmer-v2.tsx +63 -0
- package/src/{forms/textarea/textarea.tsx → v2/components/textarea-v2.tsx} +3 -3
- package/src/{feedback/toast/toast.tsx → v2/components/toast-v2.tsx} +58 -60
- package/src/{overlays/tooltip/tooltip.css → v2/components/tooltip-v2.css} +0 -26
- package/src/{overlays/tooltip/tooltip.tsx → v2/components/tooltip-v2.tsx} +14 -21
- package/src/{typography/wordmark/wordmark.tsx → v2/components/wordmark-v2.tsx} +1 -1
- package/src/{styles/tokens → v2/styles}/theme.css +14 -10
- package/dist/actions/button/button.d.ts +0 -10
- package/dist/actions/icon-button/icon-button.d.ts +0 -11
- package/dist/actions/split-button/split-button.d.ts +0 -5
- package/dist/data-display/badge/badge.d.ts +0 -7
- package/dist/data-display/keybind/keybind.d.ts +0 -7
- package/dist/feedback/loader/loader.d.ts +0 -3
- package/dist/feedback/toast/toast.d.ts +0 -57
- package/dist/forms/radio/radio.d.ts +0 -16
- package/dist/forms/textarea/textarea.d.ts +0 -7
- package/dist/i18n/he.d.ts +0 -197
- package/dist/layout/divider/divider.d.ts +0 -5
- package/dist/navigation/menu/menu.d.ts +0 -59
- package/dist/overlays/tooltip/tooltip.d.ts +0 -15
- package/dist/typography/wordmark/wordmark.d.ts +0 -2
- package/src/actions/icon-button/icon-button.tsx +0 -32
- package/src/feedback/progress-circle/progress-circle.css +0 -28
- package/src/feedback/progress-circle/progress-circle.tsx +0 -64
- package/src/forms/switch/switch.tsx +0 -34
- package/src/i18n/he.ts +0 -199
- package/src/icons/icon/icon.css +0 -3
- package/src/navigation/tabs/tabs.tsx +0 -194
- /package/dist/{forms/inline-input → components}/inline-input.d.ts +0 -0
- /package/dist/{navigation → v2/components}/tab-state-indicator.d.ts +0 -0
- /package/src/{forms/inline-input → components}/inline-input.css +0 -0
- /package/src/{forms/inline-input → components}/inline-input.tsx +0 -0
- /package/src/{data-display/avatar/avatar.css → v2/components/avatar-v2.css} +0 -0
- /package/src/{actions/button/button.css → v2/components/button-v2.css} +0 -0
- /package/src/{layout/divider/divider.css → v2/components/divider-v2.css} +0 -0
- /package/src/{styles/file-tree.css → v2/components/file-tree-v2.css} +0 -0
- /package/src/{actions/icon-button/icon-button.css → v2/components/icon-button-v2.css} +0 -0
- /package/src/{feedback/loader/loader.css → v2/components/loader-v2.css} +0 -0
- /package/src/{data-display/project-avatar/project-avatar.css → v2/components/project-avatar-v2.css} +0 -0
- /package/src/{forms/radio/radio.css → v2/components/radio-v2.css} +0 -0
- /package/src/{navigation → v2/components}/tab-state-indicator.tsx +0 -0
- /package/src/{forms/textarea/textarea.css → v2/components/textarea-v2.css} +0 -0
- /package/src/{feedback/toast/toast.css → v2/components/toast-v2.css} +0 -0
- /package/src/{styles/tokens → v2/styles}/colors.css +0 -0
- /package/src/{styles/tokens/index.css → v2/styles/tailwind.css} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Root } from "@kobalte/core/button";
|
|
2
|
-
import { type ComponentProps } from "solid-js";
|
|
3
|
-
import { type IconProps } from "@opencode-ai/ui/icon";
|
|
4
|
-
import "./button.css";
|
|
5
|
-
export interface ButtonProps extends ComponentProps<typeof Root>, Pick<ComponentProps<"button">, "class" | "classList" | "children"> {
|
|
6
|
-
size?: "small" | "normal" | "large";
|
|
7
|
-
variant?: "neutral" | "danger" | "warning" | "outline" | "contrast" | "ghost" | "ghost-muted" | "loading";
|
|
8
|
-
icon?: IconProps["name"];
|
|
9
|
-
}
|
|
10
|
-
export declare function Button(props: ButtonProps): import("solid-js").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Root } from "@kobalte/core/button";
|
|
2
|
-
import { type ComponentProps } from "solid-js";
|
|
3
|
-
import { JSX } from "solid-js";
|
|
4
|
-
import "./icon-button.css";
|
|
5
|
-
export interface IconButtonProps extends ComponentProps<typeof Root>, Pick<ComponentProps<"button">, "class" | "classList"> {
|
|
6
|
-
icon?: JSX.Element;
|
|
7
|
-
size?: "small" | "normal" | "large";
|
|
8
|
-
variant?: "neutral" | "contrast" | "ghost" | "ghost-muted";
|
|
9
|
-
state?: "rest" | "hover" | "pressed";
|
|
10
|
-
}
|
|
11
|
-
export declare function IconButton(props: ComponentProps<"button"> & IconButtonProps): JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type ParentProps } from "solid-js";
|
|
2
|
-
import "./split-button.css";
|
|
3
|
-
export declare function SplitButton(props: ParentProps<ComponentProps<"div">>): import("solid-js").JSX.Element;
|
|
4
|
-
export declare function SplitButtonAction(props: ComponentProps<"button">): import("solid-js").JSX.Element;
|
|
5
|
-
export declare function SplitButtonMenuTrigger(props: ComponentProps<"button">): import("solid-js").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps } from "solid-js";
|
|
2
|
-
import "./badge.css";
|
|
3
|
-
export interface BadgeProps extends ComponentProps<"span"> {
|
|
4
|
-
appearance?: "standard" | "compact";
|
|
5
|
-
variant?: "neutral" | "accent";
|
|
6
|
-
}
|
|
7
|
-
export declare function Badge(props: BadgeProps): import("solid-js").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps } from "solid-js";
|
|
2
|
-
import "./keybind.css";
|
|
3
|
-
export interface KeybindProps extends ComponentProps<"div"> {
|
|
4
|
-
keys: string[];
|
|
5
|
-
variant?: "neutral" | "ghost";
|
|
6
|
-
}
|
|
7
|
-
export declare function Keybind(props: KeybindProps): import("solid-js").JSX.Element;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { type ToasterProps } from "solid-sonner";
|
|
2
|
-
import type { ComponentProps, JSX } from "solid-js";
|
|
3
|
-
import "../../actions/button/button.css";
|
|
4
|
-
import "./toast.css";
|
|
5
|
-
export interface ToastRegionProps extends ToasterProps {
|
|
6
|
-
}
|
|
7
|
-
declare function ToastRegion(props: ToastRegionProps): JSX.Element;
|
|
8
|
-
export interface ToastRootComponentProps {
|
|
9
|
-
toastId: number;
|
|
10
|
-
children?: JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
declare function ToastRoot(props: ToastRootComponentProps): JSX.Element;
|
|
13
|
-
declare function ToastIcon(props: ComponentProps<"div">): JSX.Element;
|
|
14
|
-
declare function ToastContent(props: ComponentProps<"div">): JSX.Element;
|
|
15
|
-
declare function ToastTitle(props: ComponentProps<"div">): JSX.Element;
|
|
16
|
-
declare function ToastDescription(props: ComponentProps<"div">): JSX.Element;
|
|
17
|
-
declare function ToastActions(props: ComponentProps<"div">): JSX.Element;
|
|
18
|
-
declare function ToastCloseButton(props: ComponentProps<"button">): JSX.Element;
|
|
19
|
-
export declare const Toast: typeof ToastRoot & {
|
|
20
|
-
Region: typeof ToastRegion;
|
|
21
|
-
Icon: typeof ToastIcon;
|
|
22
|
-
Content: typeof ToastContent;
|
|
23
|
-
Title: typeof ToastTitle;
|
|
24
|
-
Description: typeof ToastDescription;
|
|
25
|
-
Actions: typeof ToastActions;
|
|
26
|
-
CloseButton: typeof ToastCloseButton;
|
|
27
|
-
};
|
|
28
|
-
export declare const toaster: {
|
|
29
|
-
show(render: (props: {
|
|
30
|
-
toastId: number;
|
|
31
|
-
}) => JSX.Element, options?: {
|
|
32
|
-
duration?: number;
|
|
33
|
-
persistent?: boolean;
|
|
34
|
-
}): number;
|
|
35
|
-
dismiss(toastId?: number): string | number | undefined;
|
|
36
|
-
};
|
|
37
|
-
export interface ToastAction {
|
|
38
|
-
label: string;
|
|
39
|
-
variant?: "primary" | "secondary";
|
|
40
|
-
onClick: "dismiss" | (() => void);
|
|
41
|
-
}
|
|
42
|
-
export interface ToastOptions {
|
|
43
|
-
title?: string;
|
|
44
|
-
description?: string;
|
|
45
|
-
icon?: JSX.Element;
|
|
46
|
-
variant?: "default" | "success" | "error" | "loading";
|
|
47
|
-
duration?: number;
|
|
48
|
-
persistent?: boolean;
|
|
49
|
-
actions?: ToastAction[];
|
|
50
|
-
}
|
|
51
|
-
export declare function showToast(options: ToastOptions | string): number;
|
|
52
|
-
export interface ToastPromiseOptions<T, U = unknown> {
|
|
53
|
-
loading?: JSX.Element;
|
|
54
|
-
success?: (data: T) => JSX.Element;
|
|
55
|
-
error?: (error: U) => JSX.Element;
|
|
56
|
-
}
|
|
57
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Item, Root } from "@kobalte/core/radio-group";
|
|
2
|
-
import { type JSX } from "solid-js";
|
|
3
|
-
import type { ComponentProps, ParentProps } from "solid-js";
|
|
4
|
-
import "./radio.css";
|
|
5
|
-
export interface RadioGroupProps extends ParentProps<ComponentProps<typeof Root>> {
|
|
6
|
-
label?: JSX.Element;
|
|
7
|
-
description?: JSX.Element;
|
|
8
|
-
hideLabel?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function RadioGroup(props: RadioGroupProps): JSX.Element;
|
|
11
|
-
export interface RadioItemProps extends ComponentProps<typeof Item> {
|
|
12
|
-
label: JSX.Element;
|
|
13
|
-
description?: JSX.Element;
|
|
14
|
-
hideLabel?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare function RadioItem(props: RadioItemProps): JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps } from "solid-js";
|
|
2
|
-
import "./textarea.css";
|
|
3
|
-
export interface TextareaProps extends ComponentProps<"textarea"> {
|
|
4
|
-
/** Error styling for the field and value text. */
|
|
5
|
-
invalid?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function Textarea(props: TextareaProps): import("solid-js").JSX.Element;
|
package/dist/i18n/he.d.ts
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
export declare const dict: {
|
|
2
|
-
"ui.sessionReview.title": string;
|
|
3
|
-
"ui.sessionReview.title.git": string;
|
|
4
|
-
"ui.sessionReview.title.branch": string;
|
|
5
|
-
"ui.sessionReview.title.lastTurn": string;
|
|
6
|
-
"ui.sessionReview.diffStyle.unified": string;
|
|
7
|
-
"ui.sessionReview.diffStyle.split": string;
|
|
8
|
-
"ui.sessionReview.expandAll": string;
|
|
9
|
-
"ui.sessionReview.collapseAll": string;
|
|
10
|
-
"ui.sessionReview.change.added": string;
|
|
11
|
-
"ui.sessionReview.change.removed": string;
|
|
12
|
-
"ui.sessionReview.change.modified": string;
|
|
13
|
-
"ui.sessionReview.image.loading": string;
|
|
14
|
-
"ui.sessionReview.image.placeholder": string;
|
|
15
|
-
"ui.sessionReview.largeDiff.title": string;
|
|
16
|
-
"ui.sessionReview.largeDiff.meta": string;
|
|
17
|
-
"ui.sessionReview.largeDiff.renderAnyway": string;
|
|
18
|
-
"ui.sessionReviewV2.expandMode": string;
|
|
19
|
-
"ui.sessionReviewV2.filterFiles": string;
|
|
20
|
-
"ui.sessionReviewV2.toggleSidebar": string;
|
|
21
|
-
"ui.sessionReviewV2.showAllLines": string;
|
|
22
|
-
"ui.sessionReviewV2.hideNonDiffLines": string;
|
|
23
|
-
"ui.sessionReviewV2.unifiedDiff": string;
|
|
24
|
-
"ui.sessionReviewV2.splitDiff": string;
|
|
25
|
-
"ui.sessionReviewV2.previousFile": string;
|
|
26
|
-
"ui.sessionReviewV2.nextFile": string;
|
|
27
|
-
"ui.sessionReviewV2.diffView": string;
|
|
28
|
-
"ui.sessionReviewV2.empty.noGit.title": string;
|
|
29
|
-
"ui.sessionReviewV2.empty.noGit.description": string;
|
|
30
|
-
"ui.sessionReviewV2.empty.noGit.action": string;
|
|
31
|
-
"ui.sessionReviewV2.empty.noGit.actionLoading": string;
|
|
32
|
-
"ui.sessionReviewV2.empty.changes.title": string;
|
|
33
|
-
"ui.sessionReviewV2.empty.changes.description": string;
|
|
34
|
-
"ui.sessionReview.openFile": string;
|
|
35
|
-
"ui.sessionReview.selection.line": string;
|
|
36
|
-
"ui.sessionReview.selection.lines": string;
|
|
37
|
-
"ui.fileMedia.kind.image": string;
|
|
38
|
-
"ui.fileMedia.kind.audio": string;
|
|
39
|
-
"ui.fileMedia.state.removed": string;
|
|
40
|
-
"ui.fileMedia.state.loading": string;
|
|
41
|
-
"ui.fileMedia.state.error": string;
|
|
42
|
-
"ui.fileMedia.state.unavailable": string;
|
|
43
|
-
"ui.fileMedia.binary.title": string;
|
|
44
|
-
"ui.fileMedia.binary.description.path": string;
|
|
45
|
-
"ui.fileMedia.binary.description.default": string;
|
|
46
|
-
"ui.lineComment.label.prefix": string;
|
|
47
|
-
"ui.lineComment.label.suffix": string;
|
|
48
|
-
"ui.lineComment.editorLabel.prefix": string;
|
|
49
|
-
"ui.lineComment.editorLabel.suffix": string;
|
|
50
|
-
"ui.lineComment.placeholder": string;
|
|
51
|
-
"ui.lineComment.contextPlaceholder": string;
|
|
52
|
-
"ui.lineComment.submit": string;
|
|
53
|
-
"ui.lineComment.cancel": string;
|
|
54
|
-
"ui.sessionTurn.steps.show": string;
|
|
55
|
-
"ui.sessionTurn.steps.hide": string;
|
|
56
|
-
"ui.sessionTurn.summary.response": string;
|
|
57
|
-
"ui.sessionTurn.diff.showMore": string;
|
|
58
|
-
"ui.sessionTurn.diffs.changed.one": string;
|
|
59
|
-
"ui.sessionTurn.diffs.changed.other": string;
|
|
60
|
-
"ui.sessionTurn.diffs.showAll": string;
|
|
61
|
-
"ui.sessionTurn.diffs.showLess": string;
|
|
62
|
-
"ui.sessionTurn.diffs.more": string;
|
|
63
|
-
"ui.sessionTurn.retry.retrying": string;
|
|
64
|
-
"ui.sessionTurn.retry.inSeconds": string;
|
|
65
|
-
"ui.sessionTurn.retry.attempt": string;
|
|
66
|
-
"ui.sessionTurn.retry.attemptLine": string;
|
|
67
|
-
"ui.sessionTurn.retry.geminiHot": string;
|
|
68
|
-
"ui.sessionTurn.error.freeUsageExceeded": string;
|
|
69
|
-
"ui.sessionTurn.error.addCredits": string;
|
|
70
|
-
"dialog.usageExceeded.freeTier.title": string;
|
|
71
|
-
"dialog.usageExceeded.freeTier.description": string;
|
|
72
|
-
"dialog.usageExceeded.freeTier.actionLabel": string;
|
|
73
|
-
"dialog.usageExceeded.accountRateLimit.title": string;
|
|
74
|
-
"dialog.usageExceeded.accountRateLimit.description": string;
|
|
75
|
-
"dialog.usageExceeded.accountRateLimit.actionLabel": string;
|
|
76
|
-
"ui.sessionTurn.status.delegating": string;
|
|
77
|
-
"ui.sessionTurn.status.planning": string;
|
|
78
|
-
"ui.sessionTurn.status.gatheringContext": string;
|
|
79
|
-
"ui.sessionTurn.status.gatheredContext": string;
|
|
80
|
-
"ui.sessionTurn.status.searchingCodebase": string;
|
|
81
|
-
"ui.sessionTurn.status.searchingWeb": string;
|
|
82
|
-
"ui.sessionTurn.status.makingEdits": string;
|
|
83
|
-
"ui.sessionTurn.status.runningCommands": string;
|
|
84
|
-
"ui.sessionTurn.status.thinking": string;
|
|
85
|
-
"ui.sessionTurn.status.thinkingWithTopic": string;
|
|
86
|
-
"ui.sessionTurn.status.gatheringThoughts": string;
|
|
87
|
-
"ui.sessionTurn.status.consideringNextSteps": string;
|
|
88
|
-
"ui.messagePart.diagnostic.error": string;
|
|
89
|
-
"ui.messagePart.title.edit": string;
|
|
90
|
-
"ui.messagePart.title.write": string;
|
|
91
|
-
"ui.messagePart.option.typeOwnAnswer": string;
|
|
92
|
-
"ui.messagePart.review.title": string;
|
|
93
|
-
"ui.messagePart.questions.dismissed": string;
|
|
94
|
-
"ui.messagePart.compaction": string;
|
|
95
|
-
"ui.messagePart.context.read.one": string;
|
|
96
|
-
"ui.messagePart.context.read.other": string;
|
|
97
|
-
"ui.messagePart.context.search.one": string;
|
|
98
|
-
"ui.messagePart.context.search.other": string;
|
|
99
|
-
"ui.messagePart.context.list.one": string;
|
|
100
|
-
"ui.messagePart.context.list.other": string;
|
|
101
|
-
"ui.list.loading": string;
|
|
102
|
-
"ui.list.empty": string;
|
|
103
|
-
"ui.list.clearFilter": string;
|
|
104
|
-
"ui.list.emptyWithFilter.prefix": string;
|
|
105
|
-
"ui.list.emptyWithFilter.suffix": string;
|
|
106
|
-
"ui.fileSearch.placeholder": string;
|
|
107
|
-
"ui.fileSearch.previousMatch": string;
|
|
108
|
-
"ui.fileSearch.nextMatch": string;
|
|
109
|
-
"ui.fileSearch.close": string;
|
|
110
|
-
"ui.messageNav.newMessage": string;
|
|
111
|
-
"ui.promptInput.noMatchingItems": string;
|
|
112
|
-
"ui.promptInput.commands": string;
|
|
113
|
-
"ui.promptInput.dropFiles": string;
|
|
114
|
-
"ui.promptInput.removeAttachment": string;
|
|
115
|
-
"ui.promptInput.label": string;
|
|
116
|
-
"ui.promptInput.placeholder.shell": string;
|
|
117
|
-
"ui.promptInput.placeholder.normal": string;
|
|
118
|
-
"ui.promptInput.add": string;
|
|
119
|
-
"ui.promptInput.attachments": string;
|
|
120
|
-
"ui.promptInput.context": string;
|
|
121
|
-
"ui.promptInput.shell": string;
|
|
122
|
-
"ui.promptInput.chooseAgent": string;
|
|
123
|
-
"ui.promptInput.chooseModel": string;
|
|
124
|
-
"ui.promptInput.chooseVariant": string;
|
|
125
|
-
"ui.promptInput.send": string;
|
|
126
|
-
"ui.promptInput.stop": string;
|
|
127
|
-
"ui.tabs.close": string;
|
|
128
|
-
"ui.textField.copyToClipboard": string;
|
|
129
|
-
"ui.textField.copyLink": string;
|
|
130
|
-
"ui.textField.copied": string;
|
|
131
|
-
"ui.imagePreview.alt": string;
|
|
132
|
-
"ui.scrollView.ariaLabel": string;
|
|
133
|
-
"ui.tool.read": string;
|
|
134
|
-
"ui.tool.loaded": string;
|
|
135
|
-
"ui.tool.list": string;
|
|
136
|
-
"ui.tool.glob": string;
|
|
137
|
-
"ui.tool.grep": string;
|
|
138
|
-
"ui.tool.task": string;
|
|
139
|
-
"ui.tool.webfetch": string;
|
|
140
|
-
"ui.tool.websearch": string;
|
|
141
|
-
"ui.tool.websearch.provider": string;
|
|
142
|
-
"ui.tool.shell": string;
|
|
143
|
-
"ui.tool.patch": string;
|
|
144
|
-
"ui.tool.questions": string;
|
|
145
|
-
"ui.tool.questions.numbered": string;
|
|
146
|
-
"ui.tool.agent": string;
|
|
147
|
-
"ui.tool.agent.default": string;
|
|
148
|
-
"ui.tool.skill": string;
|
|
149
|
-
"ui.basicTool.called": string;
|
|
150
|
-
"ui.toolErrorCard.failed": string;
|
|
151
|
-
"ui.toolErrorCard.copyError": string;
|
|
152
|
-
"ui.common.file.one": string;
|
|
153
|
-
"ui.common.file.other": string;
|
|
154
|
-
"ui.common.question.one": string;
|
|
155
|
-
"ui.common.question.other": string;
|
|
156
|
-
"ui.common.add": string;
|
|
157
|
-
"ui.common.clear": string;
|
|
158
|
-
"ui.common.file": string;
|
|
159
|
-
"ui.common.back": string;
|
|
160
|
-
"ui.common.cancel": string;
|
|
161
|
-
"ui.common.confirm": string;
|
|
162
|
-
"ui.common.dismiss": string;
|
|
163
|
-
"ui.common.close": string;
|
|
164
|
-
"ui.common.next": string;
|
|
165
|
-
"ui.common.submit": string;
|
|
166
|
-
"ui.common.showMore": string;
|
|
167
|
-
"ui.permission.deny": string;
|
|
168
|
-
"ui.permission.allowAlways": string;
|
|
169
|
-
"ui.permission.allowOnce": string;
|
|
170
|
-
"ui.message.expand": string;
|
|
171
|
-
"ui.message.collapse": string;
|
|
172
|
-
"ui.message.copy": string;
|
|
173
|
-
"ui.message.copyMessage": string;
|
|
174
|
-
"ui.message.forkMessage": string;
|
|
175
|
-
"ui.message.revertMessage": string;
|
|
176
|
-
"ui.message.copyResponse": string;
|
|
177
|
-
"ui.message.copied": string;
|
|
178
|
-
"ui.message.duration.seconds": string;
|
|
179
|
-
"ui.message.duration.minutesSeconds": string;
|
|
180
|
-
"ui.message.interrupted": string;
|
|
181
|
-
"ui.message.queued": string;
|
|
182
|
-
"ui.message.attachment.alt": string;
|
|
183
|
-
"ui.patch.action.deleted": string;
|
|
184
|
-
"ui.patch.action.created": string;
|
|
185
|
-
"ui.patch.action.moved": string;
|
|
186
|
-
"ui.patch.action.patched": string;
|
|
187
|
-
"ui.question.subtitle.answered": string;
|
|
188
|
-
"ui.question.answer.none": string;
|
|
189
|
-
"ui.question.review.notAnswered": string;
|
|
190
|
-
"ui.question.multiHint": string;
|
|
191
|
-
"ui.question.singleHint": string;
|
|
192
|
-
"ui.question.custom.placeholder": string;
|
|
193
|
-
"ui.sessionTurn.diffs.changed.two": string;
|
|
194
|
-
"ui.messagePart.context.read.two": string;
|
|
195
|
-
"ui.messagePart.context.search.two": string;
|
|
196
|
-
"ui.messagePart.context.list.two": string;
|
|
197
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { DropdownMenu } from "@kobalte/core/dropdown-menu";
|
|
2
|
-
import { ContextMenu } from "@kobalte/core/context-menu";
|
|
3
|
-
import { type ComponentProps, type JSX, type ParentProps } from "solid-js";
|
|
4
|
-
import "./menu.css";
|
|
5
|
-
export type MenuAppearance = "standard" | "compact";
|
|
6
|
-
export interface MenuItemProps extends ComponentProps<typeof DropdownMenu.Item> {
|
|
7
|
-
shortcut?: JSX.Element | string;
|
|
8
|
-
badge?: JSX.Element | string;
|
|
9
|
-
}
|
|
10
|
-
declare function MenuItem(props: ParentProps<MenuItemProps>): JSX.Element;
|
|
11
|
-
export interface MenuCheckboxItemProps extends ComponentProps<typeof DropdownMenu.CheckboxItem> {
|
|
12
|
-
shortcut?: JSX.Element | string;
|
|
13
|
-
badge?: JSX.Element | string;
|
|
14
|
-
}
|
|
15
|
-
declare function MenuCheckboxItem(props: ParentProps<MenuCheckboxItemProps>): JSX.Element;
|
|
16
|
-
export interface MenuRadioItemProps extends ComponentProps<typeof DropdownMenu.RadioItem> {
|
|
17
|
-
shortcut?: JSX.Element | string;
|
|
18
|
-
badge?: JSX.Element | string;
|
|
19
|
-
}
|
|
20
|
-
declare function MenuRadioItem(props: ParentProps<MenuRadioItemProps>): JSX.Element;
|
|
21
|
-
export interface MenuSubTriggerProps extends ComponentProps<typeof DropdownMenu.SubTrigger> {
|
|
22
|
-
shortcut?: JSX.Element | string;
|
|
23
|
-
badge?: JSX.Element | string;
|
|
24
|
-
}
|
|
25
|
-
declare function MenuSubTrigger(props: ParentProps<MenuSubTriggerProps>): JSX.Element;
|
|
26
|
-
declare function MenuSubContent(props: ComponentProps<typeof DropdownMenu.SubContent>): JSX.Element;
|
|
27
|
-
declare function MenuGroupLabel(props: ComponentProps<typeof DropdownMenu.GroupLabel>): JSX.Element;
|
|
28
|
-
declare function MenuSeparator(props: ComponentProps<typeof DropdownMenu.Separator>): JSX.Element;
|
|
29
|
-
declare function MenuContent(props: ComponentProps<typeof DropdownMenu.Content>): JSX.Element;
|
|
30
|
-
export interface MenuProps extends ComponentProps<typeof DropdownMenu> {
|
|
31
|
-
appearance?: MenuAppearance;
|
|
32
|
-
}
|
|
33
|
-
declare function MenuRoot(props: MenuProps): JSX.Element;
|
|
34
|
-
export interface MenuContextProps extends ComponentProps<typeof ContextMenu> {
|
|
35
|
-
appearance?: MenuAppearance;
|
|
36
|
-
}
|
|
37
|
-
declare function MenuContextRoot(props: MenuContextProps): JSX.Element;
|
|
38
|
-
declare function MenuContextContent(props: ComponentProps<typeof ContextMenu.Content>): JSX.Element;
|
|
39
|
-
export declare const Menu: typeof MenuRoot & {
|
|
40
|
-
Trigger: typeof import("@kobalte/core/dropdown-menu").Trigger;
|
|
41
|
-
Portal: typeof import("@kobalte/core/context-menu").Portal;
|
|
42
|
-
Content: typeof MenuContent;
|
|
43
|
-
Item: typeof MenuItem;
|
|
44
|
-
CheckboxItem: typeof MenuCheckboxItem;
|
|
45
|
-
RadioGroup: typeof import("@kobalte/core/context-menu").RadioGroup;
|
|
46
|
-
RadioItem: typeof MenuRadioItem;
|
|
47
|
-
Group: typeof import("@kobalte/core/context-menu").Group;
|
|
48
|
-
GroupLabel: typeof MenuGroupLabel;
|
|
49
|
-
Separator: typeof MenuSeparator;
|
|
50
|
-
Sub: typeof import("@kobalte/core/context-menu").Sub;
|
|
51
|
-
SubTrigger: typeof MenuSubTrigger;
|
|
52
|
-
SubContent: typeof MenuSubContent;
|
|
53
|
-
Context: typeof MenuContextRoot & {
|
|
54
|
-
Trigger: typeof import("@kobalte/core/context-menu").Trigger;
|
|
55
|
-
Portal: typeof import("@kobalte/core/context-menu").Portal;
|
|
56
|
-
Content: typeof MenuContextContent;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Root } from "@kobalte/core/tooltip";
|
|
2
|
-
import { type JSX } from "solid-js";
|
|
3
|
-
import type { ComponentProps } from "solid-js";
|
|
4
|
-
import "./tooltip.css";
|
|
5
|
-
export interface TooltipProps extends ComponentProps<typeof Root> {
|
|
6
|
-
value: JSX.Element;
|
|
7
|
-
appearance?: "standard" | "compact";
|
|
8
|
-
class?: string;
|
|
9
|
-
contentClass?: string;
|
|
10
|
-
contentStyle?: JSX.CSSProperties;
|
|
11
|
-
inactive?: boolean;
|
|
12
|
-
forceOpen?: boolean;
|
|
13
|
-
triggerTabIndex?: number;
|
|
14
|
-
}
|
|
15
|
-
export declare function Tooltip(props: TooltipProps): JSX.Element;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Root } from "@kobalte/core/button"
|
|
2
|
-
import { type ComponentProps, splitProps } from "solid-js"
|
|
3
|
-
import { JSX } from "solid-js"
|
|
4
|
-
import "./icon-button.css"
|
|
5
|
-
|
|
6
|
-
export interface IconButtonProps
|
|
7
|
-
extends ComponentProps<typeof Root>,
|
|
8
|
-
Pick<ComponentProps<"button">, "class" | "classList"> {
|
|
9
|
-
icon?: JSX.Element
|
|
10
|
-
size?: "small" | "normal" | "large"
|
|
11
|
-
variant?: "neutral" | "contrast" | "ghost" | "ghost-muted"
|
|
12
|
-
state?: "rest" | "hover" | "pressed"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function IconButton(props: ComponentProps<"button"> & IconButtonProps) {
|
|
16
|
-
const [local, rest] = splitProps(props, ["variant", "size", "icon", "class", "classList", "state"])
|
|
17
|
-
return (
|
|
18
|
-
<Root
|
|
19
|
-
{...rest}
|
|
20
|
-
data-component="icon-button-v2"
|
|
21
|
-
data-size={local.size || "normal"}
|
|
22
|
-
data-variant={local.variant || "neutral"}
|
|
23
|
-
data-state={local.state}
|
|
24
|
-
classList={{
|
|
25
|
-
...local.classList,
|
|
26
|
-
[local.class ?? ""]: !!local.class,
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
{local.icon}
|
|
30
|
-
</Root>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
[data-component="progress-circle"] {
|
|
2
|
-
display: block;
|
|
3
|
-
transform: rotate(-90deg);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
[data-component="progress-circle"][data-appearance="compact"] [data-slot="progress-circle-background"] {
|
|
7
|
-
stroke: var(--v2-background-bg-layer-04);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
[data-component="progress-circle"][data-appearance="compact"] [data-slot="progress-circle-progress"] {
|
|
11
|
-
stroke: var(--v2-icon-icon-base);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
[data-component="progress-circle"][data-appearance="indicator"] [data-slot="progress-circle-background"] {
|
|
15
|
-
stroke: var(--progress-circle-background, var(--border-weak-base));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[data-component="progress-circle"][data-appearance="indicator"] [data-slot="progress-circle-background-overlay"] {
|
|
19
|
-
stroke: var(--progress-circle-background-overlay, transparent);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
[data-component="progress-circle"][data-appearance="indicator"] [data-slot="progress-circle-progress"] {
|
|
23
|
-
stroke: var(--progress-circle-progress, var(--border-active));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[data-component="progress-circle"] [data-slot="progress-circle-progress"] {
|
|
27
|
-
transition: stroke-dashoffset 0.35s cubic-bezier(0.65, 0, 0.35, 1);
|
|
28
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, createMemo, Show, splitProps } from "solid-js"
|
|
2
|
-
import "./progress-circle.css"
|
|
3
|
-
|
|
4
|
-
export interface ProgressCircleProps extends Pick<ComponentProps<"svg">, "class" | "classList" | "style"> {
|
|
5
|
-
percentage: number
|
|
6
|
-
appearance?: "compact" | "indicator"
|
|
7
|
-
size?: number
|
|
8
|
-
strokeWidth?: number
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function ProgressCircle(props: ProgressCircleProps) {
|
|
12
|
-
const [local, rest] = splitProps(props, ["percentage", "appearance", "size", "strokeWidth", "class", "classList"])
|
|
13
|
-
|
|
14
|
-
const appearance = () => local.appearance ?? "compact"
|
|
15
|
-
const viewBoxSize = () => (appearance() === "indicator" ? 16 : 14)
|
|
16
|
-
const size = () => local.size ?? viewBoxSize()
|
|
17
|
-
const strokeWidth = () => local.strokeWidth ?? (appearance() === "indicator" ? 3 : 1.5)
|
|
18
|
-
const center = () => viewBoxSize() / 2
|
|
19
|
-
const radius = () => center() - strokeWidth() / 2
|
|
20
|
-
const circumference = createMemo(() => 2 * Math.PI * radius())
|
|
21
|
-
const offset = createMemo(() => circumference() * (1 - Math.max(0, Math.min(100, local.percentage || 0)) / 100))
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<svg
|
|
25
|
-
{...rest}
|
|
26
|
-
width={size()}
|
|
27
|
-
height={size()}
|
|
28
|
-
viewBox={`0 0 ${viewBoxSize()} ${viewBoxSize()}`}
|
|
29
|
-
fill="none"
|
|
30
|
-
data-component="progress-circle"
|
|
31
|
-
data-appearance={appearance()}
|
|
32
|
-
classList={{
|
|
33
|
-
...local.classList,
|
|
34
|
-
[local.class ?? ""]: !!local.class,
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
<circle
|
|
38
|
-
cx={center()}
|
|
39
|
-
cy={center()}
|
|
40
|
-
r={radius()}
|
|
41
|
-
data-slot="progress-circle-background"
|
|
42
|
-
stroke-width={strokeWidth()}
|
|
43
|
-
/>
|
|
44
|
-
<Show when={appearance() === "indicator"}>
|
|
45
|
-
<circle
|
|
46
|
-
cx={center()}
|
|
47
|
-
cy={center()}
|
|
48
|
-
r={radius()}
|
|
49
|
-
data-slot="progress-circle-background-overlay"
|
|
50
|
-
stroke-width={strokeWidth()}
|
|
51
|
-
/>
|
|
52
|
-
</Show>
|
|
53
|
-
<circle
|
|
54
|
-
cx={center()}
|
|
55
|
-
cy={center()}
|
|
56
|
-
r={radius()}
|
|
57
|
-
data-slot="progress-circle-progress"
|
|
58
|
-
stroke-width={strokeWidth()}
|
|
59
|
-
stroke-dasharray={circumference().toString()}
|
|
60
|
-
stroke-dashoffset={offset()}
|
|
61
|
-
/>
|
|
62
|
-
</svg>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Control, Description, ErrorMessage, Input, Label, Root, Thumb } from "@kobalte/core/switch"
|
|
2
|
-
import { Show, splitProps } from "solid-js"
|
|
3
|
-
import type { ComponentProps, ParentProps } from "solid-js"
|
|
4
|
-
import "./switch.css"
|
|
5
|
-
|
|
6
|
-
export interface SwitchProps extends ParentProps<ComponentProps<typeof Root>> {
|
|
7
|
-
// I think we should consolidate - ask designers.
|
|
8
|
-
appearance?: "standard" | "compact"
|
|
9
|
-
hideLabel?: boolean
|
|
10
|
-
description?: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function Switch(props: SwitchProps) {
|
|
14
|
-
const [local, others] = splitProps(props, ["children", "class", "appearance", "hideLabel", "description"])
|
|
15
|
-
return (
|
|
16
|
-
<Root {...others} class={local.class} data-component="switch" data-appearance={local.appearance ?? "compact"}>
|
|
17
|
-
<Input data-slot="switch-input" />
|
|
18
|
-
<Show when={local.children}>
|
|
19
|
-
{(label) => (
|
|
20
|
-
<Label data-slot="switch-label" classList={{ "sr-only": local.hideLabel }}>
|
|
21
|
-
{label()}
|
|
22
|
-
</Label>
|
|
23
|
-
)}
|
|
24
|
-
</Show>
|
|
25
|
-
<Show when={local.description}>
|
|
26
|
-
<Description data-slot="switch-description">{local.description}</Description>
|
|
27
|
-
</Show>
|
|
28
|
-
<Control data-slot="switch-control">
|
|
29
|
-
<Thumb data-slot="switch-thumb" />
|
|
30
|
-
</Control>
|
|
31
|
-
<ErrorMessage data-slot="switch-error" />
|
|
32
|
-
</Root>
|
|
33
|
-
)
|
|
34
|
-
}
|