@opencode/ui 0.0.0-reserved → 2.0.0
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/LICENSE +21 -0
- package/dist/actions/button/button.d.ts +10 -0
- package/dist/actions/icon-button/icon-button.d.ts +11 -0
- package/dist/actions/split-button/split-button.d.ts +5 -0
- package/dist/components/animated-number.d.ts +4 -0
- package/dist/components/app-icon.d.ts +6 -0
- package/dist/components/app-icons/types.d.ts +2 -0
- package/dist/components/card.d.ts +22 -0
- package/dist/components/collapsible.d.ts +17 -0
- package/dist/components/context-menu.d.ts +80 -0
- package/dist/components/dock-surface.d.ts +7 -0
- package/dist/components/favicon.d.ts +1 -0
- package/dist/components/file-icon.d.ts +12 -0
- package/dist/components/file-icons/types.d.ts +2 -0
- package/dist/components/font.d.ts +1 -0
- package/dist/components/hover-card.d.ts +9 -0
- package/dist/components/image-preview.d.ts +5 -0
- package/dist/components/list.d.ts +45 -0
- package/dist/components/logo.d.ts +8 -0
- package/dist/components/motion-spring.d.ts +4 -0
- package/dist/components/popover.d.ts +14 -0
- package/dist/components/progress.d.ts +7 -0
- package/dist/components/provider-icon.d.ts +5 -0
- package/dist/components/provider-icons/types.d.ts +2 -0
- package/dist/components/resize-handle.d.ts +14 -0
- package/dist/components/scroll-view.d.ts +42 -0
- package/dist/components/spinner.d.ts +6 -0
- package/dist/components/sticky-accordion-header.d.ts +5 -0
- package/dist/components/text-field.d.ts +13 -0
- package/dist/components/text-reveal.d.ts +13 -0
- package/dist/components/text-strikethrough.d.ts +11 -0
- package/dist/components/typewriter.d.ts +6 -0
- package/dist/context/dialog.d.ts +18 -0
- package/dist/context/file.d.ts +5 -0
- package/dist/context/helper.d.ts +14 -0
- package/dist/context/i18n.d.ts +24 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/marked-base.d.ts +3 -0
- package/dist/context/marked-parser.d.ts +1 -0
- package/dist/context/marked-theme-register.d.ts +1 -0
- package/dist/context/marked-theme.d.ts +2 -0
- package/dist/context/marked.d.ts +2 -0
- package/dist/context/worker-pool.d.ts +9 -0
- package/dist/data-display/accordion/accordion.d.ts +24 -0
- package/dist/data-display/avatar/avatar.d.ts +11 -0
- package/dist/data-display/badge/badge.d.ts +7 -0
- package/dist/data-display/diff-changes/diff-changes.d.ts +12 -0
- package/dist/data-display/keybind/keybind.d.ts +7 -0
- package/dist/data-display/line-comment/line-comment.d.ts +32 -0
- package/dist/data-display/project-avatar/project-avatar.d.ts +12 -0
- package/dist/feedback/loader/loader.d.ts +3 -0
- package/dist/feedback/progress-circle/progress-circle.d.ts +9 -0
- package/dist/feedback/toast/toast.d.ts +57 -0
- package/dist/forms/checkbox/checkbox.d.ts +8 -0
- package/dist/forms/field/field.d.ts +22 -0
- package/dist/forms/inline-input/inline-input.d.ts +5 -0
- package/dist/forms/radio/radio.d.ts +16 -0
- package/dist/forms/select/select.d.ts +23 -0
- package/dist/forms/switch/switch.d.ts +9 -0
- package/dist/forms/text-input/text-input.d.ts +24 -0
- package/dist/forms/textarea/textarea.d.ts +7 -0
- package/dist/hooks/create-auto-scroll.d.ts +17 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use-filtered-list.d.ts +48 -0
- package/dist/i18n/am.d.ts +1 -0
- package/dist/i18n/ar.d.ts +209 -0
- package/dist/i18n/az.d.ts +1 -0
- package/dist/i18n/bg.d.ts +193 -0
- package/dist/i18n/bn.d.ts +1 -0
- package/dist/i18n/br.d.ts +197 -0
- package/dist/i18n/bs.d.ts +197 -0
- package/dist/i18n/ca.d.ts +1 -0
- package/dist/i18n/cs.d.ts +1 -0
- package/dist/i18n/da.d.ts +193 -0
- package/dist/i18n/de.d.ts +193 -0
- package/dist/i18n/dv.d.ts +1 -0
- package/dist/i18n/dz.d.ts +1 -0
- package/dist/i18n/el.d.ts +1 -0
- package/dist/i18n/en.d.ts +251 -0
- package/dist/i18n/es.d.ts +197 -0
- package/dist/i18n/et.d.ts +1 -0
- package/dist/i18n/fa.d.ts +1 -0
- package/dist/i18n/fi.d.ts +1 -0
- package/dist/i18n/fo.d.ts +1 -0
- package/dist/i18n/fr.d.ts +197 -0
- package/dist/i18n/he.d.ts +197 -0
- package/dist/i18n/hi.d.ts +1 -0
- package/dist/i18n/hr.d.ts +1 -0
- package/dist/i18n/hu.d.ts +1 -0
- package/dist/i18n/hy.d.ts +1 -0
- package/dist/i18n/id.d.ts +1 -0
- package/dist/i18n/is.d.ts +1 -0
- package/dist/i18n/it.d.ts +1 -0
- package/dist/i18n/ja.d.ts +193 -0
- package/dist/i18n/ka.d.ts +1 -0
- package/dist/i18n/km.d.ts +193 -0
- package/dist/i18n/ko.d.ts +193 -0
- package/dist/i18n/lo.d.ts +193 -0
- package/dist/i18n/lt.d.ts +1 -0
- package/dist/i18n/lv.d.ts +1 -0
- package/dist/i18n/mk.d.ts +193 -0
- package/dist/i18n/mn.d.ts +193 -0
- package/dist/i18n/ms.d.ts +1 -0
- package/dist/i18n/my.d.ts +193 -0
- package/dist/i18n/ne.d.ts +1 -0
- package/dist/i18n/nl.d.ts +1 -0
- package/dist/i18n/no.d.ts +4 -0
- package/dist/i18n/pa.d.ts +1 -0
- package/dist/i18n/pl.d.ts +201 -0
- package/dist/i18n/ro.d.ts +1 -0
- package/dist/i18n/ru.d.ts +201 -0
- package/dist/i18n/si.d.ts +1 -0
- package/dist/i18n/sk.d.ts +1 -0
- package/dist/i18n/sl.d.ts +1 -0
- package/dist/i18n/sq.d.ts +1 -0
- package/dist/i18n/sr.d.ts +197 -0
- package/dist/i18n/sv.d.ts +1 -0
- package/dist/i18n/tg.d.ts +193 -0
- package/dist/i18n/th.d.ts +193 -0
- package/dist/i18n/tk.d.ts +1 -0
- package/dist/i18n/tr.d.ts +193 -0
- package/dist/i18n/uk.d.ts +1 -0
- package/dist/i18n/ur.d.ts +1 -0
- package/dist/i18n/uz.d.ts +1 -0
- package/dist/i18n/vi.d.ts +1 -0
- package/dist/i18n/zh.d.ts +193 -0
- package/dist/i18n/zht.d.ts +193 -0
- package/dist/icons/icon/additional-icons.d.ts +105 -0
- package/dist/icons/icon/icon.d.ts +228 -0
- package/dist/layout/divider/divider.d.ts +5 -0
- package/dist/navigation/menu/menu.d.ts +59 -0
- package/dist/navigation/segmented-control/segmented-control.d.ts +21 -0
- package/dist/navigation/tab-state-indicator.d.ts +2 -0
- package/dist/navigation/tabs/tabs.d.ts +39 -0
- package/dist/overlays/dialog/dialog.d.ts +26 -0
- package/dist/overlays/tooltip/tooltip.d.ts +15 -0
- package/dist/storybook/fixtures.d.ts +19 -0
- package/dist/storybook/scaffold.d.ts +16 -0
- package/dist/theme/color.d.ts +30 -0
- package/dist/theme/context.d.ts +21 -0
- package/dist/theme/default-themes.d.ts +39 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/loader.d.ts +6 -0
- package/dist/theme/resolve.d.ts +7 -0
- package/dist/theme/types.d.ts +56 -0
- package/dist/theme/v2/avatar.d.ts +5 -0
- package/dist/theme/v2/default-primitives.d.ts +3 -0
- package/dist/theme/v2/foreground.d.ts +2 -0
- package/dist/theme/v2/mapping.d.ts +3 -0
- package/dist/theme/v2/resolve.d.ts +9 -0
- package/dist/typography/text-shimmer/text-shimmer.d.ts +9 -0
- package/dist/typography/wordmark/wordmark.d.ts +5 -0
- package/package.json +252 -6
- package/src/actions/button/button.css +294 -0
- package/src/actions/button/button.tsx +42 -0
- package/src/actions/icon-button/icon-button.css +124 -0
- package/src/actions/icon-button/icon-button.tsx +32 -0
- package/src/actions/split-button/split-button.css +95 -0
- package/src/actions/split-button/split-button.tsx +48 -0
- package/src/actions/submit.css +74 -0
- package/src/assets/audio/alert-01.aac +0 -0
- package/src/assets/audio/alert-01.mp3 +0 -0
- package/src/assets/audio/alert-02.aac +0 -0
- package/src/assets/audio/alert-02.mp3 +0 -0
- package/src/assets/audio/alert-03.aac +0 -0
- package/src/assets/audio/alert-03.mp3 +0 -0
- package/src/assets/audio/alert-04.aac +0 -0
- package/src/assets/audio/alert-04.mp3 +0 -0
- package/src/assets/audio/alert-05.aac +0 -0
- package/src/assets/audio/alert-05.mp3 +0 -0
- package/src/assets/audio/alert-06.aac +0 -0
- package/src/assets/audio/alert-06.mp3 +0 -0
- package/src/assets/audio/alert-07.aac +0 -0
- package/src/assets/audio/alert-07.mp3 +0 -0
- package/src/assets/audio/alert-08.aac +0 -0
- package/src/assets/audio/alert-08.mp3 +0 -0
- package/src/assets/audio/alert-09.aac +0 -0
- package/src/assets/audio/alert-09.mp3 +0 -0
- package/src/assets/audio/alert-10.aac +0 -0
- package/src/assets/audio/alert-10.mp3 +0 -0
- package/src/assets/audio/bip-bop-01.aac +0 -0
- package/src/assets/audio/bip-bop-01.mp3 +0 -0
- package/src/assets/audio/bip-bop-02.aac +0 -0
- package/src/assets/audio/bip-bop-02.mp3 +0 -0
- package/src/assets/audio/bip-bop-03.aac +0 -0
- package/src/assets/audio/bip-bop-03.mp3 +0 -0
- package/src/assets/audio/bip-bop-04.aac +0 -0
- package/src/assets/audio/bip-bop-04.mp3 +0 -0
- package/src/assets/audio/bip-bop-05.aac +0 -0
- package/src/assets/audio/bip-bop-05.mp3 +0 -0
- package/src/assets/audio/bip-bop-06.aac +0 -0
- package/src/assets/audio/bip-bop-06.mp3 +0 -0
- package/src/assets/audio/bip-bop-07.aac +0 -0
- package/src/assets/audio/bip-bop-07.mp3 +0 -0
- package/src/assets/audio/bip-bop-08.aac +0 -0
- package/src/assets/audio/bip-bop-08.mp3 +0 -0
- package/src/assets/audio/bip-bop-09.aac +0 -0
- package/src/assets/audio/bip-bop-09.mp3 +0 -0
- package/src/assets/audio/bip-bop-10.aac +0 -0
- package/src/assets/audio/bip-bop-10.mp3 +0 -0
- package/src/assets/audio/nope-01.aac +0 -0
- package/src/assets/audio/nope-01.mp3 +0 -0
- package/src/assets/audio/nope-02.aac +0 -0
- package/src/assets/audio/nope-02.mp3 +0 -0
- package/src/assets/audio/nope-03.aac +0 -0
- package/src/assets/audio/nope-03.mp3 +0 -0
- package/src/assets/audio/nope-04.aac +0 -0
- package/src/assets/audio/nope-04.mp3 +0 -0
- package/src/assets/audio/nope-05.aac +0 -0
- package/src/assets/audio/nope-05.mp3 +0 -0
- package/src/assets/audio/nope-06.aac +0 -0
- package/src/assets/audio/nope-06.mp3 +0 -0
- package/src/assets/audio/nope-07.aac +0 -0
- package/src/assets/audio/nope-07.mp3 +0 -0
- package/src/assets/audio/nope-08.aac +0 -0
- package/src/assets/audio/nope-08.mp3 +0 -0
- package/src/assets/audio/nope-09.aac +0 -0
- package/src/assets/audio/nope-09.mp3 +0 -0
- package/src/assets/audio/nope-10.aac +0 -0
- package/src/assets/audio/nope-10.mp3 +0 -0
- package/src/assets/audio/nope-11.aac +0 -0
- package/src/assets/audio/nope-11.mp3 +0 -0
- package/src/assets/audio/nope-12.aac +0 -0
- package/src/assets/audio/nope-12.mp3 +0 -0
- package/src/assets/audio/staplebops-01.aac +0 -0
- package/src/assets/audio/staplebops-01.mp3 +0 -0
- package/src/assets/audio/staplebops-02.aac +0 -0
- package/src/assets/audio/staplebops-02.mp3 +0 -0
- package/src/assets/audio/staplebops-03.aac +0 -0
- package/src/assets/audio/staplebops-03.mp3 +0 -0
- package/src/assets/audio/staplebops-04.aac +0 -0
- package/src/assets/audio/staplebops-04.mp3 +0 -0
- package/src/assets/audio/staplebops-05.aac +0 -0
- package/src/assets/audio/staplebops-05.mp3 +0 -0
- package/src/assets/audio/staplebops-06.aac +0 -0
- package/src/assets/audio/staplebops-06.mp3 +0 -0
- package/src/assets/audio/staplebops-07.aac +0 -0
- package/src/assets/audio/staplebops-07.mp3 +0 -0
- package/src/assets/audio/yup-01.aac +0 -0
- package/src/assets/audio/yup-01.mp3 +0 -0
- package/src/assets/audio/yup-02.aac +0 -0
- package/src/assets/audio/yup-02.mp3 +0 -0
- package/src/assets/audio/yup-03.aac +0 -0
- package/src/assets/audio/yup-03.mp3 +0 -0
- package/src/assets/audio/yup-04.aac +0 -0
- package/src/assets/audio/yup-04.mp3 +0 -0
- package/src/assets/audio/yup-05.aac +0 -0
- package/src/assets/audio/yup-05.mp3 +0 -0
- package/src/assets/audio/yup-06.aac +0 -0
- package/src/assets/audio/yup-06.mp3 +0 -0
- package/src/assets/fonts/Inter.ttf +0 -0
- package/src/assets/fonts/JetBrainsMonoNerdFontMono-Regular.woff2 +0 -0
- package/src/assets/icons/app/android-studio.svg +369 -0
- package/src/assets/icons/app/antigravity.svg +97 -0
- package/src/assets/icons/app/cursor.svg +16 -0
- package/src/assets/icons/app/file-explorer.svg +20 -0
- package/src/assets/icons/app/finder.png +0 -0
- package/src/assets/icons/app/ghostty.svg +13 -0
- package/src/assets/icons/app/iterm2.svg +13 -0
- package/src/assets/icons/app/powershell.svg +14 -0
- package/src/assets/icons/app/sublimetext.svg +17 -0
- package/src/assets/icons/app/terminal.png +0 -0
- package/src/assets/icons/app/textmate.png +0 -0
- package/src/assets/icons/app/vscode.svg +39 -0
- package/src/assets/icons/app/warp.png +0 -0
- package/src/assets/icons/app/xcode.png +0 -0
- package/src/assets/icons/app/zed-dark.svg +15 -0
- package/src/assets/icons/app/zed.svg +15 -0
- package/src/components/animated-number.css +93 -0
- package/src/components/animated-number.tsx +109 -0
- package/src/components/app-icon.css +5 -0
- package/src/components/app-icon.tsx +85 -0
- package/src/components/app-icons/sprite.svg +114 -0
- package/src/components/app-icons/types.ts +21 -0
- package/src/components/card.css +94 -0
- package/src/components/card.tsx +123 -0
- package/src/components/collapsible.css +154 -0
- package/src/components/collapsible.tsx +48 -0
- package/src/components/context-menu.css +134 -0
- package/src/components/context-menu.tsx +308 -0
- package/src/components/dock-surface.css +30 -0
- package/src/components/dock-surface.tsx +54 -0
- package/src/components/favicon.tsx +13 -0
- package/src/components/file-icon.css +26 -0
- package/src/components/file-icon.tsx +588 -0
- package/src/components/file-icons/sprite.svg +11707 -0
- package/src/components/file-icons/types.ts +1095 -0
- package/src/components/font.tsx +1 -0
- package/src/components/hover-card.css +61 -0
- package/src/components/hover-card.tsx +32 -0
- package/src/components/image-preview.css +63 -0
- package/src/components/image-preview.tsx +33 -0
- package/src/components/list.css +331 -0
- package/src/components/list.tsx +396 -0
- package/src/components/logo.css +4 -0
- package/src/components/logo.tsx +62 -0
- package/src/components/motion-spring.tsx +58 -0
- package/src/components/popover.css +98 -0
- package/src/components/popover.tsx +154 -0
- package/src/components/progress.css +63 -0
- package/src/components/progress.tsx +39 -0
- package/src/components/provider-icon.css +5 -0
- package/src/components/provider-icon.tsx +25 -0
- package/src/components/provider-icons/sprite.svg +1110 -0
- package/src/components/provider-icons/types.ts +105 -0
- package/src/components/resize-handle.css +70 -0
- package/src/components/resize-handle.tsx +102 -0
- package/src/components/scroll-view.css +99 -0
- package/src/components/scroll-view.tsx +453 -0
- package/src/components/spinner.css +6 -0
- package/src/components/spinner.tsx +52 -0
- package/src/components/sticky-accordion-header.css +6 -0
- package/src/components/sticky-accordion-header.tsx +18 -0
- package/src/components/text-field.css +134 -0
- package/src/components/text-field.tsx +136 -0
- package/src/components/text-reveal.css +150 -0
- package/src/components/text-reveal.tsx +143 -0
- package/src/components/text-strikethrough.css +27 -0
- package/src/components/text-strikethrough.tsx +84 -0
- package/src/components/typewriter.css +14 -0
- package/src/components/typewriter.tsx +55 -0
- package/src/context/dialog.tsx +198 -0
- package/src/context/file.tsx +10 -0
- package/src/context/helper.tsx +38 -0
- package/src/context/i18n.tsx +77 -0
- package/src/context/index.ts +4 -0
- package/src/context/marked-base.tsx +55 -0
- package/src/context/marked-parser.tsx +58 -0
- package/src/context/marked-theme-register.tsx +10 -0
- package/src/context/marked-theme.tsx +372 -0
- package/src/context/marked.tsx +28 -0
- package/src/context/worker-pool.tsx +20 -0
- package/src/custom-elements.d.ts +17 -0
- package/src/data-display/accordion/accordion.css +121 -0
- package/src/data-display/accordion/accordion.tsx +92 -0
- package/src/data-display/avatar/avatar.css +70 -0
- package/src/data-display/avatar/avatar.tsx +59 -0
- package/src/data-display/badge/badge.css +52 -0
- package/src/data-display/badge/badge.tsx +25 -0
- package/src/data-display/diff-changes/diff-changes.css +47 -0
- package/src/data-display/diff-changes/diff-changes.tsx +33 -0
- package/src/data-display/keybind/keybind.css +76 -0
- package/src/data-display/keybind/keybind.tsx +30 -0
- package/src/data-display/line-comment/line-comment.css +258 -0
- package/src/data-display/line-comment/line-comment.tsx +308 -0
- package/src/data-display/project-avatar/project-avatar.css +132 -0
- package/src/data-display/project-avatar/project-avatar.tsx +66 -0
- package/src/feedback/loader/loader.css +32 -0
- package/src/feedback/loader/loader.tsx +31 -0
- package/src/feedback/progress-circle/progress-circle.css +28 -0
- package/src/feedback/progress-circle/progress-circle.tsx +64 -0
- package/src/feedback/toast/toast.css +225 -0
- package/src/feedback/toast/toast.tsx +283 -0
- package/src/forms/checkbox/checkbox.css +125 -0
- package/src/forms/checkbox/checkbox.tsx +43 -0
- package/src/forms/field/field.css +94 -0
- package/src/forms/field/field.tsx +263 -0
- package/src/forms/inline-input/inline-input.css +17 -0
- package/src/forms/inline-input/inline-input.tsx +22 -0
- package/src/forms/radio/radio.css +202 -0
- package/src/forms/radio/radio.tsx +82 -0
- package/src/forms/select/select.css +290 -0
- package/src/forms/select/select.tsx +219 -0
- package/src/forms/switch/switch.css +272 -0
- package/src/forms/switch/switch.tsx +34 -0
- package/src/forms/text-input/text-input.css +181 -0
- package/src/forms/text-input/text-input.tsx +99 -0
- package/src/forms/textarea/textarea.css +78 -0
- package/src/forms/textarea/textarea.tsx +31 -0
- package/src/hooks/create-auto-scroll.tsx +257 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-filtered-list.tsx +134 -0
- package/src/i18n/am.ts +194 -0
- package/src/i18n/ar.ts +231 -0
- package/src/i18n/az.ts +195 -0
- package/src/i18n/bg.ts +195 -0
- package/src/i18n/bn.ts +197 -0
- package/src/i18n/br.ts +219 -0
- package/src/i18n/bs.ts +223 -0
- package/src/i18n/ca.ts +199 -0
- package/src/i18n/cs.ts +203 -0
- package/src/i18n/da.ts +214 -0
- package/src/i18n/de.ts +219 -0
- package/src/i18n/dv.ts +196 -0
- package/src/i18n/dz.ts +197 -0
- package/src/i18n/el.ts +195 -0
- package/src/i18n/en.ts +276 -0
- package/src/i18n/es.ts +219 -0
- package/src/i18n/et.ts +195 -0
- package/src/i18n/fa.ts +195 -0
- package/src/i18n/fi.ts +195 -0
- package/src/i18n/fo.ts +195 -0
- package/src/i18n/fr.ts +221 -0
- package/src/i18n/he.ts +199 -0
- package/src/i18n/hi.ts +197 -0
- package/src/i18n/hr.ts +200 -0
- package/src/i18n/hu.ts +197 -0
- package/src/i18n/hy.ts +195 -0
- package/src/i18n/id.ts +217 -0
- package/src/i18n/is.ts +195 -0
- package/src/i18n/it.ts +200 -0
- package/src/i18n/ja.ts +214 -0
- package/src/i18n/ka.ts +195 -0
- package/src/i18n/km.ts +196 -0
- package/src/i18n/ko.ts +216 -0
- package/src/i18n/lo.ts +195 -0
- package/src/i18n/lt.ts +203 -0
- package/src/i18n/lv.ts +199 -0
- package/src/i18n/mk.ts +195 -0
- package/src/i18n/mn.ts +195 -0
- package/src/i18n/ms.ts +195 -0
- package/src/i18n/my.ts +196 -0
- package/src/i18n/ne.ts +197 -0
- package/src/i18n/nl.ts +195 -0
- package/src/i18n/no.ts +219 -0
- package/src/i18n/pa.ts +196 -0
- package/src/i18n/pl.ts +223 -0
- package/src/i18n/ro.ts +199 -0
- package/src/i18n/ru.ts +222 -0
- package/src/i18n/si.ts +195 -0
- package/src/i18n/sk.ts +203 -0
- package/src/i18n/sl.ts +204 -0
- package/src/i18n/sq.ts +195 -0
- package/src/i18n/sr.ts +200 -0
- package/src/i18n/sv.ts +195 -0
- package/src/i18n/tg.ts +195 -0
- package/src/i18n/th.ts +215 -0
- package/src/i18n/tk.ts +195 -0
- package/src/i18n/tr.ts +221 -0
- package/src/i18n/uk.ts +226 -0
- package/src/i18n/ur.ts +196 -0
- package/src/i18n/uz.ts +198 -0
- package/src/i18n/vi.ts +195 -0
- package/src/i18n/zh.ts +217 -0
- package/src/i18n/zht.ts +217 -0
- package/src/icons/icon/additional-icons.ts +115 -0
- package/src/icons/icon/icon.css +3 -0
- package/src/icons/icon/icon.tsx +305 -0
- package/src/layout/divider/divider.css +11 -0
- package/src/layout/divider/divider.tsx +20 -0
- package/src/navigation/menu/menu.css +311 -0
- package/src/navigation/menu/menu.tsx +289 -0
- package/src/navigation/segmented-control/segmented-control.css +80 -0
- package/src/navigation/segmented-control/segmented-control.tsx +209 -0
- package/src/navigation/tab-state-indicator.tsx +37 -0
- package/src/navigation/tabs/tabs-current.css +239 -0
- package/src/navigation/tabs/tabs.css +710 -0
- package/src/navigation/tabs/tabs.tsx +194 -0
- package/src/overlays/dialog/dialog.css +180 -0
- package/src/overlays/dialog/dialog.tsx +115 -0
- package/src/overlays/tooltip/tooltip.css +102 -0
- package/src/overlays/tooltip/tooltip.tsx +154 -0
- package/src/storybook/fixtures.ts +51 -0
- package/src/storybook/scaffold.tsx +62 -0
- package/src/styles/animations.css +141 -0
- package/src/styles/base.css +409 -0
- package/src/styles/colors.css +772 -0
- package/src/styles/file-tree.css +202 -0
- package/src/styles/index.css +37 -0
- package/src/styles/tailwind/colors.css +288 -0
- package/src/styles/tailwind/index.css +95 -0
- package/src/styles/tailwind/utilities.css +131 -0
- package/src/styles/theme.css +631 -0
- package/src/styles/tokens/colors.css +172 -0
- package/src/styles/tokens/index.css +2 -0
- package/src/styles/tokens/theme.css +510 -0
- package/src/styles/utilities.css +118 -0
- package/src/theme/color.ts +299 -0
- package/src/theme/context.tsx +381 -0
- package/src/theme/default-themes.ts +116 -0
- package/src/theme/index.ts +78 -0
- package/src/theme/loader.ts +112 -0
- package/src/theme/resolve.ts +540 -0
- package/src/theme/themes/amoled.json +49 -0
- package/src/theme/themes/aura.json +51 -0
- package/src/theme/themes/ayu.json +51 -0
- package/src/theme/themes/carbonfox.json +53 -0
- package/src/theme/themes/catppuccin-frappe.json +85 -0
- package/src/theme/themes/catppuccin-macchiato.json +85 -0
- package/src/theme/themes/catppuccin.json +45 -0
- package/src/theme/themes/cobalt2.json +87 -0
- package/src/theme/themes/cursor.json +91 -0
- package/src/theme/themes/dracula.json +49 -0
- package/src/theme/themes/everforest.json +89 -0
- package/src/theme/themes/flexoki.json +86 -0
- package/src/theme/themes/github.json +85 -0
- package/src/theme/themes/gruvbox.json +45 -0
- package/src/theme/themes/kanagawa.json +89 -0
- package/src/theme/themes/lucent-orng.json +87 -0
- package/src/theme/themes/material.json +87 -0
- package/src/theme/themes/matrix.json +113 -0
- package/src/theme/themes/mercury.json +86 -0
- package/src/theme/themes/monokai.json +49 -0
- package/src/theme/themes/nightowl.json +46 -0
- package/src/theme/themes/nord.json +46 -0
- package/src/theme/themes/oc-2.json +507 -0
- package/src/theme/themes/one-dark.json +89 -0
- package/src/theme/themes/onedarkpro.json +45 -0
- package/src/theme/themes/opencode.json +89 -0
- package/src/theme/themes/orng.json +87 -0
- package/src/theme/themes/osaka-jade.json +88 -0
- package/src/theme/themes/palenight.json +85 -0
- package/src/theme/themes/rosepine.json +85 -0
- package/src/theme/themes/shadesofpurple.json +51 -0
- package/src/theme/themes/solarized.json +49 -0
- package/src/theme/themes/synthwave84.json +87 -0
- package/src/theme/themes/tokyonight.json +47 -0
- package/src/theme/themes/vercel.json +90 -0
- package/src/theme/themes/vesper.json +51 -0
- package/src/theme/themes/zenburn.json +87 -0
- package/src/theme/types.ts +75 -0
- package/src/theme/v2/avatar.ts +48 -0
- package/src/theme/v2/default-primitives.ts +114 -0
- package/src/theme/v2/foreground.ts +61 -0
- package/src/theme/v2/mapping.ts +176 -0
- package/src/theme/v2/resolve.ts +153 -0
- package/src/typography/text-shimmer/text-shimmer.css +120 -0
- package/src/typography/text-shimmer/text-shimmer.tsx +63 -0
- package/src/typography/wordmark/wordmark.tsx +39 -0
- package/README.md +0 -5
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Popover as Kobalte } from "@kobalte/core/popover"
|
|
2
|
+
import { ComponentProps, JSXElement, ParentProps, Show, createEffect, splitProps, ValidComponent } from "solid-js"
|
|
3
|
+
import { createStore } from "solid-js/store"
|
|
4
|
+
import { makeEventListener } from "@solid-primitives/event-listener"
|
|
5
|
+
import { useI18n } from "../context/i18n"
|
|
6
|
+
import { Icon } from "@opencode/ui/icon"
|
|
7
|
+
import { IconButton } from "@opencode/ui/icon-button"
|
|
8
|
+
|
|
9
|
+
export interface PopoverProps<T extends ValidComponent = "div">
|
|
10
|
+
extends ParentProps,
|
|
11
|
+
Omit<ComponentProps<typeof Kobalte>, "children"> {
|
|
12
|
+
trigger?: JSXElement
|
|
13
|
+
triggerAs?: T
|
|
14
|
+
triggerProps?: ComponentProps<T>
|
|
15
|
+
title?: JSXElement
|
|
16
|
+
description?: JSXElement
|
|
17
|
+
class?: ComponentProps<"div">["class"]
|
|
18
|
+
classList?: ComponentProps<"div">["classList"]
|
|
19
|
+
style?: ComponentProps<"div">["style"]
|
|
20
|
+
portal?: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function Popover<T extends ValidComponent = "div">(props: PopoverProps<T>) {
|
|
24
|
+
const i18n = useI18n()
|
|
25
|
+
const [local, rest] = splitProps(props, [
|
|
26
|
+
"trigger",
|
|
27
|
+
"triggerAs",
|
|
28
|
+
"triggerProps",
|
|
29
|
+
"title",
|
|
30
|
+
"description",
|
|
31
|
+
"class",
|
|
32
|
+
"classList",
|
|
33
|
+
"style",
|
|
34
|
+
"children",
|
|
35
|
+
"portal",
|
|
36
|
+
"open",
|
|
37
|
+
"defaultOpen",
|
|
38
|
+
"onOpenChange",
|
|
39
|
+
"modal",
|
|
40
|
+
])
|
|
41
|
+
|
|
42
|
+
const [state, setState] = createStore({
|
|
43
|
+
contentRef: undefined as HTMLElement | undefined,
|
|
44
|
+
triggerRef: undefined as HTMLElement | undefined,
|
|
45
|
+
dismiss: null as "escape" | "outside" | null,
|
|
46
|
+
uncontrolledOpen: local.defaultOpen ?? false,
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const controlled = () => local.open !== undefined
|
|
50
|
+
const opened = () => {
|
|
51
|
+
if (controlled()) return local.open ?? false
|
|
52
|
+
return state.uncontrolledOpen
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const onOpenChange = (next: boolean) => {
|
|
56
|
+
if (next) setState("dismiss", null)
|
|
57
|
+
if (local.onOpenChange) local.onOpenChange(next)
|
|
58
|
+
if (controlled()) return
|
|
59
|
+
setState("uncontrolledOpen", next)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
createEffect(() => {
|
|
63
|
+
if (!opened()) return
|
|
64
|
+
|
|
65
|
+
const inside = (node: Node | null | undefined) => {
|
|
66
|
+
if (!node) return false
|
|
67
|
+
const content = state.contentRef
|
|
68
|
+
if (content && content.contains(node)) return true
|
|
69
|
+
const trigger = state.triggerRef
|
|
70
|
+
if (trigger && trigger.contains(node)) return true
|
|
71
|
+
return false
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const close = (reason: "escape" | "outside") => {
|
|
75
|
+
setState("dismiss", reason)
|
|
76
|
+
onOpenChange(false)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
80
|
+
if (event.key !== "Escape") return
|
|
81
|
+
close("escape")
|
|
82
|
+
event.preventDefault()
|
|
83
|
+
event.stopPropagation()
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const onPointerDown = (event: PointerEvent) => {
|
|
87
|
+
const target = event.target
|
|
88
|
+
if (!(target instanceof Node)) return
|
|
89
|
+
if (inside(target)) return
|
|
90
|
+
close("outside")
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const onFocusIn = (event: FocusEvent) => {
|
|
94
|
+
const target = event.target
|
|
95
|
+
if (!(target instanceof Node)) return
|
|
96
|
+
if (inside(target)) return
|
|
97
|
+
close("outside")
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
makeEventListener(window, "keydown", onKeyDown, { capture: true })
|
|
101
|
+
makeEventListener(window, "pointerdown", onPointerDown, { capture: true })
|
|
102
|
+
makeEventListener(window, "focusin", onFocusIn, { capture: true })
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
const content = () => (
|
|
106
|
+
<Kobalte.Content
|
|
107
|
+
ref={(el: HTMLElement | undefined) => setState("contentRef", el)}
|
|
108
|
+
data-component="popover-content"
|
|
109
|
+
classList={{
|
|
110
|
+
...local.classList,
|
|
111
|
+
[local.class ?? ""]: !!local.class,
|
|
112
|
+
}}
|
|
113
|
+
style={local.style}
|
|
114
|
+
onCloseAutoFocus={(event: Event) => {
|
|
115
|
+
if (state.dismiss === "outside") event.preventDefault()
|
|
116
|
+
setState("dismiss", null)
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
{/* <Kobalte.Arrow data-slot="popover-arrow" /> */}
|
|
120
|
+
<Show when={local.title}>
|
|
121
|
+
<div data-slot="popover-header">
|
|
122
|
+
<Kobalte.Title data-slot="popover-title">{local.title}</Kobalte.Title>
|
|
123
|
+
<Kobalte.CloseButton
|
|
124
|
+
data-slot="popover-close-button"
|
|
125
|
+
as={IconButton}
|
|
126
|
+
icon={<Icon name="close" />}
|
|
127
|
+
variant="ghost"
|
|
128
|
+
aria-label={i18n.t("ui.common.close")}
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
</Show>
|
|
132
|
+
<Show when={local.description}>
|
|
133
|
+
<Kobalte.Description data-slot="popover-description">{local.description}</Kobalte.Description>
|
|
134
|
+
</Show>
|
|
135
|
+
<div data-slot="popover-body">{local.children}</div>
|
|
136
|
+
</Kobalte.Content>
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<Kobalte gutter={4} {...rest} open={opened()} onOpenChange={onOpenChange} modal={local.modal ?? false}>
|
|
141
|
+
<Kobalte.Trigger
|
|
142
|
+
ref={(el: HTMLElement) => setState("triggerRef", el)}
|
|
143
|
+
as={local.triggerAs ?? "div"}
|
|
144
|
+
data-slot="popover-trigger"
|
|
145
|
+
{...(local.triggerProps as any)}
|
|
146
|
+
>
|
|
147
|
+
{local.trigger}
|
|
148
|
+
</Kobalte.Trigger>
|
|
149
|
+
<Show when={local.portal ?? true} fallback={content()}>
|
|
150
|
+
<Kobalte.Portal>{content()}</Kobalte.Portal>
|
|
151
|
+
</Show>
|
|
152
|
+
</Kobalte>
|
|
153
|
+
)
|
|
154
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[data-component="progress"] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
|
|
6
|
+
[data-slot="progress-header"] {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-slot="progress-label"],
|
|
14
|
+
[data-slot="progress-value-label"] {
|
|
15
|
+
font-family: var(--font-family-sans);
|
|
16
|
+
font-size: var(--font-size-small);
|
|
17
|
+
font-weight: var(--font-weight-regular);
|
|
18
|
+
line-height: var(--line-height-large);
|
|
19
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-slot="progress-label"] {
|
|
23
|
+
color: var(--text-base);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[data-slot="progress-value-label"] {
|
|
27
|
+
color: var(--text-weak);
|
|
28
|
+
font-variant-numeric: tabular-nums;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-slot="progress-track"] {
|
|
32
|
+
position: relative;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 8px;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
border-radius: 999px;
|
|
37
|
+
border: 1px solid var(--border-weak-base);
|
|
38
|
+
background-color: var(--surface-base);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-slot="progress-fill"] {
|
|
42
|
+
height: 100%;
|
|
43
|
+
width: var(--kb-progress-fill-width);
|
|
44
|
+
border-radius: inherit;
|
|
45
|
+
background-color: var(--border-active);
|
|
46
|
+
transition: width 200ms ease;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-indeterminate] [data-slot="progress-fill"] {
|
|
50
|
+
width: 35%;
|
|
51
|
+
animation: progress-indeterminate 1.3s ease-in-out infinite;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes progress-indeterminate {
|
|
56
|
+
from {
|
|
57
|
+
transform: translateX(-100%);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
to {
|
|
61
|
+
transform: translateX(300%);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Progress as Kobalte } from "@kobalte/core/progress"
|
|
2
|
+
import { Show, splitProps } from "solid-js"
|
|
3
|
+
import type { ComponentProps, ParentProps } from "solid-js"
|
|
4
|
+
|
|
5
|
+
export interface ProgressProps extends ParentProps<ComponentProps<typeof Kobalte>> {
|
|
6
|
+
hideLabel?: boolean
|
|
7
|
+
showValueLabel?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Progress(props: ProgressProps) {
|
|
11
|
+
const [local, others] = splitProps(props, ["children", "class", "classList", "hideLabel", "showValueLabel"])
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Kobalte
|
|
15
|
+
{...others}
|
|
16
|
+
data-component="progress"
|
|
17
|
+
classList={{
|
|
18
|
+
...local.classList,
|
|
19
|
+
[local.class ?? ""]: !!local.class,
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<Show when={local.children || local.showValueLabel}>
|
|
23
|
+
<div data-slot="progress-header">
|
|
24
|
+
<Show when={local.children}>
|
|
25
|
+
<Kobalte.Label data-slot="progress-label" classList={{ "sr-only": local.hideLabel }}>
|
|
26
|
+
{local.children}
|
|
27
|
+
</Kobalte.Label>
|
|
28
|
+
</Show>
|
|
29
|
+
<Show when={local.showValueLabel}>
|
|
30
|
+
<Kobalte.ValueLabel data-slot="progress-value-label" />
|
|
31
|
+
</Show>
|
|
32
|
+
</div>
|
|
33
|
+
</Show>
|
|
34
|
+
<Kobalte.Track data-slot="progress-track">
|
|
35
|
+
<Kobalte.Fill data-slot="progress-fill" />
|
|
36
|
+
</Kobalte.Track>
|
|
37
|
+
</Kobalte>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Component, JSX } from "solid-js"
|
|
2
|
+
import { createMemo, splitProps } from "solid-js"
|
|
3
|
+
import sprite from "./provider-icons/sprite.svg"
|
|
4
|
+
import { iconNames, type IconName } from "./provider-icons/types"
|
|
5
|
+
|
|
6
|
+
export type ProviderIconProps = JSX.SVGElementTags["svg"] & {
|
|
7
|
+
id: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const ProviderIcon: Component<ProviderIconProps> = (props) => {
|
|
11
|
+
const [local, rest] = splitProps(props, ["id", "class", "classList"])
|
|
12
|
+
const resolved = createMemo(() => (iconNames.includes(local.id as IconName) ? local.id : "synthetic"))
|
|
13
|
+
return (
|
|
14
|
+
<svg
|
|
15
|
+
data-component="provider-icon"
|
|
16
|
+
{...rest}
|
|
17
|
+
classList={{
|
|
18
|
+
...local.classList,
|
|
19
|
+
[local.class ?? ""]: !!local.class,
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<use href={`${sprite}#${resolved()}`} />
|
|
23
|
+
</svg>
|
|
24
|
+
)
|
|
25
|
+
}
|