@opencode/ui 0.0.0-reserved → 2.0.1
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,194 @@
|
|
|
1
|
+
import { Content, List, Root, Trigger } from "@kobalte/core/tabs"
|
|
2
|
+
import { createContext, Show, splitProps, useContext, type JSX } from "solid-js"
|
|
3
|
+
import type { Component, ComponentProps, ParentProps } from "solid-js"
|
|
4
|
+
import { useI18n } from "../../context/i18n"
|
|
5
|
+
import "./tabs-current.css"
|
|
6
|
+
|
|
7
|
+
export type TabsVariant = "panel" | "underline" | "surface" | "line" | "pill" | "settings"
|
|
8
|
+
|
|
9
|
+
export interface TabsProps extends ComponentProps<typeof Root> {
|
|
10
|
+
variant?: TabsVariant
|
|
11
|
+
orientation?: "horizontal" | "vertical"
|
|
12
|
+
}
|
|
13
|
+
export interface TabsListProps extends ComponentProps<typeof List> {}
|
|
14
|
+
export interface TabsTriggerProps extends ComponentProps<typeof Trigger> {
|
|
15
|
+
classes?: { button?: string }
|
|
16
|
+
closeButton?: JSX.Element
|
|
17
|
+
hideCloseButton?: boolean
|
|
18
|
+
onMiddleClick?: () => void
|
|
19
|
+
subtext?: JSX.Element | string
|
|
20
|
+
}
|
|
21
|
+
export interface TabsCloseButtonProps extends ComponentProps<"button"> {}
|
|
22
|
+
export interface TabsContentProps extends ComponentProps<typeof Content> {}
|
|
23
|
+
|
|
24
|
+
const TabsContext = createContext<{ current: () => boolean }>({ current: () => false })
|
|
25
|
+
|
|
26
|
+
function TabsRoot(props: TabsProps) {
|
|
27
|
+
const [local, rest] = splitProps(props, ["class", "classList", "variant", "orientation", "children"])
|
|
28
|
+
const variant = () => local.variant ?? "panel"
|
|
29
|
+
const current = () => variant() === "line" || variant() === "pill" || variant() === "settings"
|
|
30
|
+
const dataVariant = () => {
|
|
31
|
+
if (variant() === "panel" || variant() === "line") return "normal"
|
|
32
|
+
if (variant() === "underline") return "alt"
|
|
33
|
+
if (variant() === "surface") return "pill"
|
|
34
|
+
return variant()
|
|
35
|
+
}
|
|
36
|
+
return (
|
|
37
|
+
<TabsContext.Provider value={{ current }}>
|
|
38
|
+
<Root
|
|
39
|
+
{...rest}
|
|
40
|
+
orientation={local.orientation}
|
|
41
|
+
data-component={current() ? "tabs-v2" : "tabs"}
|
|
42
|
+
data-variant={dataVariant()}
|
|
43
|
+
data-orientation={local.orientation || "horizontal"}
|
|
44
|
+
classList={{
|
|
45
|
+
...local.classList,
|
|
46
|
+
[local.class ?? ""]: !!local.class,
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
{local.children}
|
|
50
|
+
</Root>
|
|
51
|
+
</TabsContext.Provider>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function TabsList(props: TabsListProps) {
|
|
56
|
+
const ctx = useContext(TabsContext)
|
|
57
|
+
const [local, rest] = splitProps(props, ["class", "classList"])
|
|
58
|
+
return (
|
|
59
|
+
<List
|
|
60
|
+
{...rest}
|
|
61
|
+
data-slot={ctx.current() ? "tabs-v2-list" : "tabs-list"}
|
|
62
|
+
classList={{
|
|
63
|
+
...local.classList,
|
|
64
|
+
[local.class ?? ""]: !!local.class,
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function TabsTrigger(props: ParentProps<TabsTriggerProps>) {
|
|
71
|
+
const ctx = useContext(TabsContext)
|
|
72
|
+
const [local, rest] = splitProps(props, [
|
|
73
|
+
"class",
|
|
74
|
+
"classList",
|
|
75
|
+
"classes",
|
|
76
|
+
"children",
|
|
77
|
+
"closeButton",
|
|
78
|
+
"hideCloseButton",
|
|
79
|
+
"onMiddleClick",
|
|
80
|
+
"subtext",
|
|
81
|
+
"dir",
|
|
82
|
+
])
|
|
83
|
+
const wrapperSlot = () => (ctx.current() ? "tabs-v2-trigger-wrapper" : "tabs-trigger-wrapper")
|
|
84
|
+
const triggerSlot = () => (ctx.current() ? "tabs-v2-trigger" : "tabs-trigger")
|
|
85
|
+
const closeSlot = () => (ctx.current() ? "tabs-v2-trigger-close-button" : "tabs-trigger-close-button")
|
|
86
|
+
return (
|
|
87
|
+
<div
|
|
88
|
+
data-slot={wrapperSlot()}
|
|
89
|
+
data-value={props.value}
|
|
90
|
+
classList={{
|
|
91
|
+
...local.classList,
|
|
92
|
+
[local.class ?? ""]: !!local.class,
|
|
93
|
+
}}
|
|
94
|
+
onMouseDown={(event) => {
|
|
95
|
+
if (event.button !== 1 || !local.onMiddleClick) return
|
|
96
|
+
event.preventDefault()
|
|
97
|
+
}}
|
|
98
|
+
onAuxClick={(event) => {
|
|
99
|
+
if (event.button !== 1 || !local.onMiddleClick) return
|
|
100
|
+
event.preventDefault()
|
|
101
|
+
local.onMiddleClick()
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
<Trigger
|
|
105
|
+
{...rest}
|
|
106
|
+
dir={local.dir ?? "auto"}
|
|
107
|
+
data-slot={triggerSlot()}
|
|
108
|
+
data-value={props.value}
|
|
109
|
+
classList={{ [local.classes?.button ?? ""]: !!local.classes?.button }}
|
|
110
|
+
>
|
|
111
|
+
<Show when={ctx.current()} fallback={local.children}>
|
|
112
|
+
<span class="inline-flex items-center gap-2" data-slot="tabs-v2-trigger-content">
|
|
113
|
+
{local.children}
|
|
114
|
+
<Show when={local.subtext}>
|
|
115
|
+
{(subtext) => (
|
|
116
|
+
<span data-slot="tabs-v2-subtext" class="ms-2 text-xs text-text-weak">
|
|
117
|
+
{subtext()}
|
|
118
|
+
</span>
|
|
119
|
+
)}
|
|
120
|
+
</Show>
|
|
121
|
+
</span>
|
|
122
|
+
</Show>
|
|
123
|
+
</Trigger>
|
|
124
|
+
<Show when={local.closeButton}>
|
|
125
|
+
{(closeButton) => (
|
|
126
|
+
<div data-slot={closeSlot()} data-hidden={local.hideCloseButton ? "" : undefined}>
|
|
127
|
+
{closeButton()}
|
|
128
|
+
</div>
|
|
129
|
+
)}
|
|
130
|
+
</Show>
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function TabsCloseButton(props: TabsCloseButtonProps) {
|
|
136
|
+
const i18n = useI18n()
|
|
137
|
+
const [local, rest] = splitProps(props, ["class", "classList", "onClick", "onPointerDown", "aria-label"])
|
|
138
|
+
return (
|
|
139
|
+
<button
|
|
140
|
+
type="button"
|
|
141
|
+
{...rest}
|
|
142
|
+
aria-label={local["aria-label"] ?? i18n.t("ui.tabs.close")}
|
|
143
|
+
data-slot="tabs-close-button"
|
|
144
|
+
classList={{
|
|
145
|
+
[local.class ?? ""]: !!local.class,
|
|
146
|
+
...local.classList,
|
|
147
|
+
}}
|
|
148
|
+
onPointerDown={(event) => {
|
|
149
|
+
event.stopPropagation()
|
|
150
|
+
if (typeof local.onPointerDown === "function") local.onPointerDown(event)
|
|
151
|
+
}}
|
|
152
|
+
onClick={(event) => {
|
|
153
|
+
event.preventDefault()
|
|
154
|
+
event.stopPropagation()
|
|
155
|
+
if (typeof local.onClick === "function") local.onClick(event)
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
159
|
+
<path d="M10.8889 3.11108L3.11108 10.8889" stroke="currentColor" stroke-linejoin="round" />
|
|
160
|
+
<path d="M3.11108 3.11108L10.8889 10.8889" stroke="currentColor" stroke-linejoin="round" />
|
|
161
|
+
</svg>
|
|
162
|
+
</button>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function TabsContent(props: ParentProps<TabsContentProps>) {
|
|
167
|
+
const ctx = useContext(TabsContext)
|
|
168
|
+
const [local, rest] = splitProps(props, ["class", "classList", "children"])
|
|
169
|
+
return (
|
|
170
|
+
<Content
|
|
171
|
+
{...rest}
|
|
172
|
+
data-slot={ctx.current() ? "tabs-v2-content" : "tabs-content"}
|
|
173
|
+
classList={{
|
|
174
|
+
...local.classList,
|
|
175
|
+
[local.class ?? ""]: !!local.class,
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
{local.children}
|
|
179
|
+
</Content>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const TabsSectionTitle: Component<ParentProps> = (props) => {
|
|
184
|
+
const ctx = useContext(TabsContext)
|
|
185
|
+
return <div data-slot={ctx.current() ? "tabs-v2-section-title" : "tabs-section-title"}>{props.children}</div>
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export const Tabs = Object.assign(TabsRoot, {
|
|
189
|
+
List: TabsList,
|
|
190
|
+
Trigger: TabsTrigger,
|
|
191
|
+
CloseButton: TabsCloseButton,
|
|
192
|
+
Content: TabsContent,
|
|
193
|
+
SectionTitle: TabsSectionTitle,
|
|
194
|
+
})
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/* [data-component="dialog-trigger"] { } */
|
|
2
|
+
|
|
3
|
+
[data-component="dialog-overlay"] {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: 0;
|
|
6
|
+
z-index: 50;
|
|
7
|
+
background-color: var(--v2-overlay-simple-overlay-scrim);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-component="dialog-v2"] {
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0;
|
|
13
|
+
z-index: 50;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
|
|
19
|
+
[data-slot="dialog-container"] {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: flex-start;
|
|
23
|
+
width: 480px;
|
|
24
|
+
height: 368px;
|
|
25
|
+
background: var(--v2-background-bg-layer-01);
|
|
26
|
+
box-shadow: var(--v2-elevation-overlay);
|
|
27
|
+
border-radius: 6px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
pointer-events: auto;
|
|
30
|
+
|
|
31
|
+
[data-slot="dialog-content"] {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
align-self: stretch;
|
|
36
|
+
width: 100%;
|
|
37
|
+
max-height: 100%;
|
|
38
|
+
flex: 1;
|
|
39
|
+
overflow: auto;
|
|
40
|
+
background: transparent;
|
|
41
|
+
|
|
42
|
+
scrollbar-width: none;
|
|
43
|
+
-ms-overflow-style: none;
|
|
44
|
+
&::-webkit-scrollbar {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-slot="dialog-header"] {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: row;
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
align-self: stretch;
|
|
53
|
+
width: 100%;
|
|
54
|
+
gap: 0;
|
|
55
|
+
padding: 16px;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
|
|
58
|
+
[data-slot="dialog-header-title"] {
|
|
59
|
+
margin: 0;
|
|
60
|
+
flex: 1;
|
|
61
|
+
min-width: 0;
|
|
62
|
+
user-select: none;
|
|
63
|
+
font-weight: 530;
|
|
64
|
+
font-size: 13px;
|
|
65
|
+
line-height: 16px;
|
|
66
|
+
letter-spacing: -0.04px;
|
|
67
|
+
color: var(--v2-text-text-base);
|
|
68
|
+
font-variation-settings: "slnt" 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-slot="dialog-title-group"] {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
gap: 4px;
|
|
76
|
+
flex: 1;
|
|
77
|
+
min-width: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-slot="dialog-title"] {
|
|
81
|
+
margin: 0;
|
|
82
|
+
flex: none;
|
|
83
|
+
flex-grow: 0;
|
|
84
|
+
user-select: none;
|
|
85
|
+
font-weight: 530;
|
|
86
|
+
font-size: 15px;
|
|
87
|
+
line-height: 20px;
|
|
88
|
+
letter-spacing: -0.13px;
|
|
89
|
+
color: var(--v2-text-text-base);
|
|
90
|
+
font-variation-settings: "slnt" 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-slot="dialog-description"] {
|
|
94
|
+
flex: none;
|
|
95
|
+
flex-grow: 0;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
max-width: 100%;
|
|
98
|
+
overflow-wrap: anywhere;
|
|
99
|
+
user-select: none;
|
|
100
|
+
font-weight: 440;
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
line-height: 20px;
|
|
103
|
+
letter-spacing: -0.04px;
|
|
104
|
+
color: var(--v2-text-text-muted);
|
|
105
|
+
font-variation-settings: "slnt" 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-slot="dialog-close-button"] {
|
|
109
|
+
display: flex;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
align-items: center;
|
|
112
|
+
width: 20px;
|
|
113
|
+
height: 20px;
|
|
114
|
+
margin-top: -2px;
|
|
115
|
+
margin-inline-end: -2px;
|
|
116
|
+
margin-inline-start: auto;
|
|
117
|
+
border-radius: 4px;
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
color: var(--v2-icon-icon-muted);
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background: var(--v2-overlay-simple-overlay-hover);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&[data-hide-close] [data-slot="dialog-close-button"] {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[data-slot="dialog-footer"] {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: row;
|
|
135
|
+
justify-content: flex-end;
|
|
136
|
+
align-items: flex-start;
|
|
137
|
+
padding: 16px;
|
|
138
|
+
gap: 8px;
|
|
139
|
+
align-self: stretch;
|
|
140
|
+
flex-shrink: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[data-slot="dialog-body"] {
|
|
144
|
+
width: 100%;
|
|
145
|
+
position: relative;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
flex: 1;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
|
|
151
|
+
&:focus-visible {
|
|
152
|
+
outline: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
&:focus-visible {
|
|
156
|
+
outline: none;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&[data-fit] {
|
|
162
|
+
[data-slot="dialog-container"] {
|
|
163
|
+
height: auto;
|
|
164
|
+
|
|
165
|
+
[data-slot="dialog-content"] {
|
|
166
|
+
min-height: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&[data-size="large"] [data-slot="dialog-container"] {
|
|
172
|
+
width: 640px;
|
|
173
|
+
height: 480px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&[data-size="x-large"] [data-slot="dialog-container"] {
|
|
177
|
+
width: min(calc(100vw - 32px), 980px);
|
|
178
|
+
height: min(calc(100vh - 92px), 600px);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { CloseButton, Content, Description, Title } from "@kobalte/core/dialog"
|
|
2
|
+
import { type ComponentProps, type JSXElement, type ParentProps, Show, children, splitProps } from "solid-js"
|
|
3
|
+
import { useI18n } from "../../context/i18n"
|
|
4
|
+
import "./dialog.css"
|
|
5
|
+
|
|
6
|
+
export interface DialogProps extends ParentProps {
|
|
7
|
+
size?: "normal" | "large" | "x-large"
|
|
8
|
+
variant?: "default" | "settings"
|
|
9
|
+
class?: ComponentProps<"div">["class"]
|
|
10
|
+
containerClass?: ComponentProps<"div">["class"]
|
|
11
|
+
classList?: ComponentProps<"div">["classList"]
|
|
12
|
+
fit?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DialogHeaderProps extends ParentProps {
|
|
16
|
+
closeLabel?: string
|
|
17
|
+
hideClose?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DialogTitleGroupProps {
|
|
21
|
+
title?: JSXElement
|
|
22
|
+
description: JSXElement
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function DialogFooter(props: ParentProps) {
|
|
26
|
+
return <div data-slot="dialog-footer">{props.children}</div>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function DialogBody(props: ParentProps & { class?: ComponentProps<"div">["class"] }) {
|
|
30
|
+
const [local] = splitProps(props, ["class", "children"])
|
|
31
|
+
return (
|
|
32
|
+
<div data-slot="dialog-body" class={local.class}>
|
|
33
|
+
{local.children}
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function DialogTitle(props: ParentProps) {
|
|
39
|
+
return <Title data-slot="dialog-header-title">{props.children}</Title>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function DialogTitleGroup(props: DialogTitleGroupProps) {
|
|
43
|
+
const title = children(() => props.title)
|
|
44
|
+
const description = children(() => props.description)
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div data-slot="dialog-title-group">
|
|
48
|
+
<Show when={title()}>{(t) => <Title data-slot="dialog-title">{t()}</Title>}</Show>
|
|
49
|
+
<Description data-slot="dialog-description">{description()}</Description>
|
|
50
|
+
</div>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function DialogHeader(props: DialogHeaderProps) {
|
|
55
|
+
const i18n = useI18n()
|
|
56
|
+
const [local] = splitProps(props, ["closeLabel", "hideClose", "children"])
|
|
57
|
+
const hideClose = () => local.hideClose === true
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div data-slot="dialog-header" data-hide-close={hideClose() ? "" : undefined}>
|
|
61
|
+
{local.children}
|
|
62
|
+
<Show when={!hideClose()}>
|
|
63
|
+
<CloseButton data-slot="dialog-close-button" aria-label={local.closeLabel ?? i18n.t("ui.common.close")}>
|
|
64
|
+
<svg
|
|
65
|
+
width="16"
|
|
66
|
+
height="16"
|
|
67
|
+
viewBox="0 0 16 16"
|
|
68
|
+
fill="none"
|
|
69
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
70
|
+
aria-hidden="true"
|
|
71
|
+
>
|
|
72
|
+
<path
|
|
73
|
+
d="M12.4446 3.55469L3.55566 12.4436M3.55566 3.55469L12.4446 12.4436"
|
|
74
|
+
stroke="currentColor"
|
|
75
|
+
stroke-linejoin="round"
|
|
76
|
+
/>
|
|
77
|
+
</svg>
|
|
78
|
+
</CloseButton>
|
|
79
|
+
</Show>
|
|
80
|
+
</div>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function Dialog(props: DialogProps) {
|
|
85
|
+
const [local] = splitProps(props, ["size", "variant", "class", "containerClass", "classList", "fit", "children"])
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<div
|
|
89
|
+
data-component="dialog-v2"
|
|
90
|
+
data-variant={local.variant === "settings" ? "settings" : undefined}
|
|
91
|
+
data-fit={local.fit ? true : undefined}
|
|
92
|
+
data-size={local.size || "normal"}
|
|
93
|
+
>
|
|
94
|
+
<div data-slot="dialog-container" class={local.containerClass}>
|
|
95
|
+
<Content
|
|
96
|
+
data-slot="dialog-content"
|
|
97
|
+
classList={{
|
|
98
|
+
...local.classList,
|
|
99
|
+
[local.class ?? ""]: !!local.class,
|
|
100
|
+
}}
|
|
101
|
+
onOpenAutoFocus={(e) => {
|
|
102
|
+
const target = e.currentTarget as HTMLElement | null
|
|
103
|
+
const autofocusEl = target?.querySelector("[autofocus]") as HTMLElement | null
|
|
104
|
+
if (autofocusEl) {
|
|
105
|
+
e.preventDefault()
|
|
106
|
+
autofocusEl.focus({ preventScroll: true })
|
|
107
|
+
}
|
|
108
|
+
}}
|
|
109
|
+
>
|
|
110
|
+
{local.children}
|
|
111
|
+
</Content>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[data-component="tooltip-v2-trigger"] {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
[data-popper-positioner]:has([data-component="tooltip-v2"]) {
|
|
6
|
+
z-index: 1000;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-component="tooltip-v2"] {
|
|
10
|
+
z-index: 1000;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
align-items: center;
|
|
15
|
+
padding: 5px 6px;
|
|
16
|
+
gap: 6px;
|
|
17
|
+
|
|
18
|
+
background: var(--v2-background-bg-layer-01);
|
|
19
|
+
box-shadow: var(--v2-elevation-floating);
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
|
|
22
|
+
font-style: normal;
|
|
23
|
+
font-weight: 530;
|
|
24
|
+
font-size: 11px;
|
|
25
|
+
line-height: 12px;
|
|
26
|
+
letter-spacing: 0.05px;
|
|
27
|
+
color: var(--v2-text-text-base);
|
|
28
|
+
font-variant-numeric: tabular-nums;
|
|
29
|
+
font-variation-settings: "slnt" 0;
|
|
30
|
+
|
|
31
|
+
user-select: none;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
|
|
34
|
+
animation: tooltipV2In 120ms ease-out;
|
|
35
|
+
transform-origin: var(--kb-tooltip-content-transform-origin);
|
|
36
|
+
|
|
37
|
+
&[data-closed] {
|
|
38
|
+
animation: tooltipV2Out 80ms ease-in forwards;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[data-component="tooltip-v2"][data-appearance="standard"] {
|
|
43
|
+
display: block;
|
|
44
|
+
max-width: 320px;
|
|
45
|
+
padding: 2px 8px;
|
|
46
|
+
border: 1px solid var(--border-weak-base, rgba(0, 0, 0, 0.07));
|
|
47
|
+
border-radius: var(--radius-sm);
|
|
48
|
+
background: var(--surface-float-base);
|
|
49
|
+
color: var(--text-invert-strong);
|
|
50
|
+
box-shadow: var(--shadow-md);
|
|
51
|
+
font-family: var(--font-family-sans);
|
|
52
|
+
font-size: var(--font-size-small);
|
|
53
|
+
font-style: normal;
|
|
54
|
+
font-weight: var(--font-weight-medium);
|
|
55
|
+
line-height: var(--line-height-large);
|
|
56
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
57
|
+
font-variant-numeric: normal;
|
|
58
|
+
font-variation-settings: normal;
|
|
59
|
+
user-select: text;
|
|
60
|
+
animation: none;
|
|
61
|
+
|
|
62
|
+
&[data-closed]:not([data-force-open="true"]) {
|
|
63
|
+
opacity: 0;
|
|
64
|
+
animation: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-component="tooltip-v2"][data-appearance="large"] {
|
|
69
|
+
padding: 12px;
|
|
70
|
+
font-size: 13px;
|
|
71
|
+
line-height: var(--line-height-compact);
|
|
72
|
+
letter-spacing: -0.04px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@keyframes tooltipV2In {
|
|
76
|
+
from {
|
|
77
|
+
opacity: 0;
|
|
78
|
+
transform: scale(0.96);
|
|
79
|
+
}
|
|
80
|
+
to {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: scale(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes tooltipV2Out {
|
|
87
|
+
from {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
transform: scale(1);
|
|
90
|
+
}
|
|
91
|
+
to {
|
|
92
|
+
opacity: 0;
|
|
93
|
+
transform: scale(0.96);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (prefers-reduced-motion: reduce) {
|
|
98
|
+
[data-component="tooltip-v2"],
|
|
99
|
+
[data-component="tooltip-v2"][data-closed] {
|
|
100
|
+
animation: none;
|
|
101
|
+
}
|
|
102
|
+
}
|