@neurocode-ai/ui 1.18.8
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/package.json +113 -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/accordion.css +147 -0
- package/src/components/accordion.tsx +92 -0
- package/src/components/animated-number.css +75 -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/avatar.css +49 -0
- package/src/components/avatar.tsx +55 -0
- package/src/components/button.css +194 -0
- package/src/components/button.tsx +33 -0
- package/src/components/card.css +115 -0
- package/src/components/card.tsx +123 -0
- package/src/components/checkbox.css +131 -0
- package/src/components/checkbox.tsx +43 -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/dialog.css +181 -0
- package/src/components/dialog.tsx +72 -0
- package/src/components/diff-changes.css +42 -0
- package/src/components/diff-changes.tsx +115 -0
- package/src/components/dock-surface.css +37 -0
- package/src/components/dock-surface.tsx +54 -0
- package/src/components/dropdown-menu.css +135 -0
- package/src/components/dropdown-menu.tsx +308 -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/icon-button.css +181 -0
- package/src/components/icon-button.tsx +29 -0
- package/src/components/icon.css +34 -0
- package/src/components/icon.tsx +170 -0
- package/src/components/image-preview.css +63 -0
- package/src/components/image-preview.tsx +32 -0
- package/src/components/inline-input.css +17 -0
- package/src/components/inline-input.tsx +22 -0
- package/src/components/keybind.css +18 -0
- package/src/components/keybind.tsx +20 -0
- package/src/components/list.css +331 -0
- package/src/components/list.tsx +394 -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 +153 -0
- package/src/components/progress-circle.css +16 -0
- package/src/components/progress-circle.tsx +64 -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 +1135 -0
- package/src/components/provider-icons/types.ts +105 -0
- package/src/components/radio-group.css +187 -0
- package/src/components/radio-group.tsx +83 -0
- package/src/components/resize-handle.css +58 -0
- package/src/components/resize-handle.tsx +98 -0
- package/src/components/scroll-view.css +67 -0
- package/src/components/scroll-view.tsx +388 -0
- package/src/components/select.css +199 -0
- package/src/components/select.tsx +174 -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/switch.css +132 -0
- package/src/components/switch.tsx +29 -0
- package/src/components/tabs.css +861 -0
- package/src/components/tabs.tsx +125 -0
- package/src/components/tag.css +37 -0
- package/src/components/tag.tsx +22 -0
- package/src/components/text-field.css +134 -0
- package/src/components/text-field.tsx +128 -0
- package/src/components/text-reveal.css +150 -0
- package/src/components/text-reveal.tsx +143 -0
- package/src/components/text-shimmer.css +119 -0
- package/src/components/text-shimmer.tsx +62 -0
- package/src/components/text-strikethrough.css +27 -0
- package/src/components/text-strikethrough.tsx +84 -0
- 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/components/typewriter.css +14 -0
- package/src/components/typewriter.tsx +55 -0
- package/src/context/dialog.tsx +197 -0
- package/src/context/file.tsx +10 -0
- package/src/context/helper.tsx +38 -0
- package/src/context/i18n.tsx +38 -0
- package/src/context/index.ts +4 -0
- package/src/context/marked-code-span.ts +17 -0
- package/src/context/marked.tsx +570 -0
- package/src/context/worker-pool.tsx +20 -0
- package/src/custom-elements.d.ts +17 -0
- package/src/hooks/create-auto-scroll.tsx +237 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-filtered-list.tsx +134 -0
- package/src/i18n/ar.ts +193 -0
- package/src/i18n/br.ts +193 -0
- package/src/i18n/bs.ts +197 -0
- package/src/i18n/da.ts +192 -0
- package/src/i18n/de.ts +199 -0
- package/src/i18n/en.ts +196 -0
- package/src/i18n/es.ts +193 -0
- package/src/i18n/fr.ts +193 -0
- package/src/i18n/ja.ts +192 -0
- package/src/i18n/ko.ts +194 -0
- package/src/i18n/no.ts +197 -0
- package/src/i18n/pl.ts +192 -0
- package/src/i18n/ru.ts +192 -0
- package/src/i18n/th.ts +194 -0
- package/src/i18n/tr.ts +199 -0
- package/src/i18n/uk.ts +196 -0
- package/src/i18n/zh.ts +196 -0
- package/src/i18n/zht.ts +196 -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 +404 -0
- package/src/styles/colors.css +772 -0
- package/src/styles/index.css +53 -0
- package/src/styles/tailwind/colors.css +286 -0
- package/src/styles/tailwind/index.css +78 -0
- package/src/styles/tailwind/utilities.css +131 -0
- package/src/styles/theme.css +631 -0
- package/src/styles/utilities.css +118 -0
- package/src/theme/color.ts +299 -0
- package/src/theme/context.tsx +373 -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 +474 -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 +60 -0
- package/src/theme/v2/mapping.ts +170 -0
- package/src/theme/v2/resolve.ts +153 -0
- package/src/v2/components/accordion-v2.css +139 -0
- package/src/v2/components/accordion-v2.tsx +86 -0
- package/src/v2/components/avatar-v2.css +70 -0
- package/src/v2/components/avatar-v2.tsx +59 -0
- package/src/v2/components/badge-v2.css +33 -0
- package/src/v2/components/badge-v2.tsx +23 -0
- package/src/v2/components/button-v2.css +262 -0
- 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/v2/components/dialog-v2.css +177 -0
- package/src/v2/components/dialog-v2.tsx +115 -0
- package/src/v2/components/diff-changes-v2.css +24 -0
- package/src/v2/components/diff-changes-v2.tsx +28 -0
- package/src/v2/components/divider-v2.css +11 -0
- package/src/v2/components/divider-v2.tsx +20 -0
- package/src/v2/components/field-v2.css +94 -0
- package/src/v2/components/field-v2.tsx +265 -0
- package/src/v2/components/file-tree-v2.css +137 -0
- package/src/v2/components/icon-button-v2.css +159 -0
- package/src/v2/components/icon-button-v2.tsx +37 -0
- package/src/v2/components/icon.tsx +209 -0
- package/src/v2/components/inline-input-v2.css +225 -0
- package/src/v2/components/inline-input-v2.tsx +105 -0
- package/src/v2/components/keybind-v2.css +76 -0
- package/src/v2/components/keybind-v2.tsx +30 -0
- package/src/v2/components/line-comment-v2.css +258 -0
- package/src/v2/components/line-comment-v2.tsx +304 -0
- package/src/v2/components/loader-v2.css +32 -0
- package/src/v2/components/loader-v2.tsx +31 -0
- package/src/v2/components/menu-v2.css +190 -0
- package/src/v2/components/menu-v2.tsx +225 -0
- package/src/v2/components/progress-circle-v2.css +13 -0
- package/src/v2/components/progress-circle-v2.tsx +52 -0
- package/src/v2/components/project-avatar-v2.css +132 -0
- package/src/v2/components/project-avatar-v2.tsx +66 -0
- package/src/v2/components/radio-v2.css +202 -0
- package/src/v2/components/radio-v2.tsx +72 -0
- package/src/v2/components/segmented-control-v2.css +80 -0
- package/src/v2/components/segmented-control-v2.tsx +208 -0
- package/src/v2/components/select-v2.css +286 -0
- package/src/v2/components/select-v2.tsx +208 -0
- package/src/v2/components/split-button-v2.css +99 -0
- package/src/v2/components/split-button-v2.tsx +48 -0
- package/src/v2/components/switch-v2.css +154 -0
- package/src/v2/components/switch-v2.tsx +28 -0
- package/src/v2/components/tab-state-indicator.tsx +37 -0
- package/src/v2/components/tabs-v2.css +226 -0
- package/src/v2/components/tabs-v2.tsx +147 -0
- package/src/v2/components/text-input-v2.css +179 -0
- package/src/v2/components/text-input-v2.tsx +93 -0
- package/src/v2/components/text-shimmer-v2.css +125 -0
- package/src/v2/components/text-shimmer-v2.tsx +63 -0
- package/src/v2/components/textarea-v2.css +78 -0
- package/src/v2/components/textarea-v2.tsx +31 -0
- package/src/v2/components/toast-v2.css +215 -0
- package/src/v2/components/toast-v2.tsx +146 -0
- package/src/v2/components/tooltip-v2.css +69 -0
- package/src/v2/components/tooltip-v2.tsx +147 -0
- package/src/v2/components/wordmark-v2.tsx +71 -0
- package/src/v2/styles/colors.css +172 -0
- package/src/v2/styles/tailwind.css +2 -0
- package/src/v2/styles/theme.css +503 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createEffect,
|
|
3
|
+
createMemo,
|
|
4
|
+
mergeProps,
|
|
5
|
+
onCleanup,
|
|
6
|
+
onMount,
|
|
7
|
+
Show,
|
|
8
|
+
splitProps,
|
|
9
|
+
type Accessor,
|
|
10
|
+
type ComponentProps,
|
|
11
|
+
} from "solid-js"
|
|
12
|
+
import { Portal } from "solid-js/web"
|
|
13
|
+
import { createResizeObserver } from "@solid-primitives/resize-observer"
|
|
14
|
+
import { createStore } from "solid-js/store"
|
|
15
|
+
import { useI18n } from "../context/i18n"
|
|
16
|
+
|
|
17
|
+
export type ScrollViewThumbVisibility = "hover" | "scroll"
|
|
18
|
+
|
|
19
|
+
export interface ScrollViewProps extends ComponentProps<"div"> {
|
|
20
|
+
viewportRef?: (el: HTMLDivElement) => void
|
|
21
|
+
orientation?: "vertical" | "horizontal" // currently only vertical is fully implemented for thumb
|
|
22
|
+
/**
|
|
23
|
+
* `hover`: show while hovered or scrolling. `scroll`: show only while scrolling.
|
|
24
|
+
*
|
|
25
|
+
* In most cases, scrolling a container = hovering over it, so this change has no effect.
|
|
26
|
+
* This is a special case to account for the home page scroll, where scrolling a container != hovering over it
|
|
27
|
+
* */
|
|
28
|
+
thumbVisibility?: ScrollViewThumbVisibility
|
|
29
|
+
/** Mount the thumb into an external track. Scroll metrics still come from this ScrollView. */
|
|
30
|
+
thumbContainer?: HTMLElement | Accessor<HTMLElement | undefined>
|
|
31
|
+
/** Element whose hover reveals the thumb. Defaults to the ScrollView root when unset. */
|
|
32
|
+
thumbHoverTarget?: HTMLElement | Accessor<HTMLElement | undefined>
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const scrollKey = (event: Pick<KeyboardEvent, "key" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey">) => {
|
|
36
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return
|
|
37
|
+
if (event.shiftKey && event.key !== " ") return
|
|
38
|
+
|
|
39
|
+
switch (event.key) {
|
|
40
|
+
case "PageDown":
|
|
41
|
+
return "page-down"
|
|
42
|
+
case "PageUp":
|
|
43
|
+
return "page-up"
|
|
44
|
+
case "Home":
|
|
45
|
+
return "home"
|
|
46
|
+
case "End":
|
|
47
|
+
return "end"
|
|
48
|
+
case "ArrowUp":
|
|
49
|
+
return "up"
|
|
50
|
+
case "ArrowDown":
|
|
51
|
+
return "down"
|
|
52
|
+
case " ":
|
|
53
|
+
return event.shiftKey ? "page-up" : "page-down"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function canScrollKey(element: HTMLElement, key: NonNullable<ReturnType<typeof scrollKey>>) {
|
|
58
|
+
const up = key === "up" || key === "page-up" || key === "home"
|
|
59
|
+
return up ? element.scrollTop > 0 : element.scrollTop + element.clientHeight < element.scrollHeight
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function scrollKeyOwner(
|
|
63
|
+
root: HTMLElement,
|
|
64
|
+
target: EventTarget | null,
|
|
65
|
+
key: NonNullable<ReturnType<typeof scrollKey>>,
|
|
66
|
+
) {
|
|
67
|
+
const element = target instanceof Element ? target : undefined
|
|
68
|
+
const owner = element?.closest<HTMLElement>("[data-scrollable]")
|
|
69
|
+
if (!owner || owner === root) return root
|
|
70
|
+
if (!root.contains(owner)) return owner
|
|
71
|
+
return canScrollKey(owner, key) ? owner : root
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function isScrollKeyTarget(target: EventTarget | null, key: NonNullable<ReturnType<typeof scrollKey>>) {
|
|
75
|
+
const element = target instanceof HTMLElement ? target : undefined
|
|
76
|
+
if (!element) return true
|
|
77
|
+
if (["INPUT", "TEXTAREA", "SELECT"].includes(element.tagName) || element.isContentEditable) return false
|
|
78
|
+
if ((key === "page-up" || key === "page-down") && element.closest('button, a[href], [role="button"]')) return false
|
|
79
|
+
return true
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function scrollTopFromThumbPointer(input: {
|
|
83
|
+
pointer: number
|
|
84
|
+
viewportTop: number
|
|
85
|
+
grabOffset: number
|
|
86
|
+
clientHeight: number
|
|
87
|
+
scrollHeight: number
|
|
88
|
+
thumbHeight: number
|
|
89
|
+
/** Viewport height used for max scroll. Defaults to `clientHeight` (track == viewport). */
|
|
90
|
+
scrollClientHeight?: number
|
|
91
|
+
}) {
|
|
92
|
+
const padding = 8
|
|
93
|
+
const maxThumbTop = input.clientHeight - padding * 2 - input.thumbHeight
|
|
94
|
+
if (maxThumbTop <= 0) return 0
|
|
95
|
+
const thumbTop = Math.max(0, Math.min(input.pointer - input.viewportTop - padding - input.grabOffset, maxThumbTop))
|
|
96
|
+
return (thumbTop / maxThumbTop) * Math.max(0, input.scrollHeight - (input.scrollClientHeight ?? input.clientHeight))
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function ScrollView(props: ScrollViewProps) {
|
|
100
|
+
const i18n = useI18n()
|
|
101
|
+
const merged = mergeProps({ orientation: "vertical", thumbVisibility: "hover" }, props)
|
|
102
|
+
const [local, events, rest] = splitProps(
|
|
103
|
+
merged,
|
|
104
|
+
[
|
|
105
|
+
"class",
|
|
106
|
+
"children",
|
|
107
|
+
"viewportRef",
|
|
108
|
+
"orientation",
|
|
109
|
+
"thumbVisibility",
|
|
110
|
+
"thumbContainer",
|
|
111
|
+
"thumbHoverTarget",
|
|
112
|
+
"style",
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
"onScroll",
|
|
116
|
+
"onWheel",
|
|
117
|
+
"onTouchStart",
|
|
118
|
+
"onTouchMove",
|
|
119
|
+
"onTouchEnd",
|
|
120
|
+
"onTouchCancel",
|
|
121
|
+
"onPointerDown",
|
|
122
|
+
"onClick",
|
|
123
|
+
"onKeyDown",
|
|
124
|
+
],
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
let rootRef!: HTMLDivElement
|
|
128
|
+
let viewportRef!: HTMLDivElement
|
|
129
|
+
let thumbRef!: HTMLDivElement
|
|
130
|
+
|
|
131
|
+
const resolveEl = (value: HTMLElement | Accessor<HTMLElement | undefined> | undefined) => {
|
|
132
|
+
if (typeof value === "function") return value()
|
|
133
|
+
return value
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const thumbMount = createMemo(() => resolveEl(local.thumbContainer))
|
|
137
|
+
const thumbHover = createMemo(() => resolveEl(local.thumbHoverTarget))
|
|
138
|
+
const hoverRoot = () => !local.thumbHoverTarget && !local.thumbContainer
|
|
139
|
+
|
|
140
|
+
const [state, setState] = createStore({
|
|
141
|
+
isHovered: false,
|
|
142
|
+
isDragging: false,
|
|
143
|
+
isScrolling: false,
|
|
144
|
+
thumbHeight: 0,
|
|
145
|
+
thumbTop: 0,
|
|
146
|
+
showThumb: false,
|
|
147
|
+
})
|
|
148
|
+
const isHovered = () => state.isHovered
|
|
149
|
+
const isDragging = () => state.isDragging
|
|
150
|
+
const isScrolling = () => state.isScrolling
|
|
151
|
+
const thumbHeight = () => state.thumbHeight
|
|
152
|
+
const thumbTop = () => state.thumbTop
|
|
153
|
+
const showThumb = () => state.showThumb
|
|
154
|
+
|
|
155
|
+
let scrollIdleTimer: ReturnType<typeof setTimeout> | undefined
|
|
156
|
+
|
|
157
|
+
const markScrolling = () => {
|
|
158
|
+
setState("isScrolling", true)
|
|
159
|
+
if (scrollIdleTimer !== undefined) clearTimeout(scrollIdleTimer)
|
|
160
|
+
scrollIdleTimer = setTimeout(() => setState("isScrolling", false), 800)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const thumbVisible = () => {
|
|
164
|
+
if (isDragging()) return true
|
|
165
|
+
if (isScrolling()) return true
|
|
166
|
+
return local.thumbVisibility === "hover" && isHovered()
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
onCleanup(() => {
|
|
170
|
+
if (scrollIdleTimer !== undefined) clearTimeout(scrollIdleTimer)
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
const updateThumb = () => {
|
|
174
|
+
if (!viewportRef) return
|
|
175
|
+
const { scrollTop, scrollHeight, clientHeight } = viewportRef
|
|
176
|
+
|
|
177
|
+
if (scrollHeight <= clientHeight || scrollHeight === 0) {
|
|
178
|
+
setState("showThumb", false)
|
|
179
|
+
return
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
setState("showThumb", true)
|
|
183
|
+
const trackPadding = 8
|
|
184
|
+
const trackClientHeight = thumbMount()?.clientHeight || clientHeight
|
|
185
|
+
const trackHeight = trackClientHeight - trackPadding * 2
|
|
186
|
+
|
|
187
|
+
const minThumbHeight = 32
|
|
188
|
+
// Calculate raw thumb height based on ratio
|
|
189
|
+
let height = (clientHeight / scrollHeight) * trackHeight
|
|
190
|
+
height = Math.max(height, minThumbHeight)
|
|
191
|
+
|
|
192
|
+
const maxScrollTop = scrollHeight - clientHeight
|
|
193
|
+
const maxThumbTop = trackHeight - height
|
|
194
|
+
|
|
195
|
+
const top = maxScrollTop > 0 ? (scrollTop / maxScrollTop) * maxThumbTop : 0
|
|
196
|
+
|
|
197
|
+
// Ensure thumb stays within bounds (shouldn't be necessary due to math above, but good for safety)
|
|
198
|
+
const boundedTop = trackPadding + Math.max(0, Math.min(top, maxThumbTop))
|
|
199
|
+
|
|
200
|
+
setState("thumbHeight", height)
|
|
201
|
+
setState("thumbTop", boundedTop)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
onMount(() => {
|
|
205
|
+
if (local.viewportRef) {
|
|
206
|
+
local.viewportRef(viewportRef)
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
createResizeObserver(
|
|
210
|
+
() => [viewportRef, viewportRef.firstElementChild, thumbMount()].filter(Boolean) as HTMLElement[],
|
|
211
|
+
updateThumb,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
updateThumb()
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
createEffect(() => {
|
|
218
|
+
thumbMount()
|
|
219
|
+
updateThumb()
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
createEffect(() => {
|
|
223
|
+
const target = thumbHover()
|
|
224
|
+
if (!target) return
|
|
225
|
+
|
|
226
|
+
const enter = () => setState("isHovered", true)
|
|
227
|
+
const leave = () => setState("isHovered", false)
|
|
228
|
+
target.addEventListener("pointerenter", enter)
|
|
229
|
+
target.addEventListener("pointerleave", leave)
|
|
230
|
+
onCleanup(() => {
|
|
231
|
+
target.removeEventListener("pointerenter", enter)
|
|
232
|
+
target.removeEventListener("pointerleave", leave)
|
|
233
|
+
setState("isHovered", false)
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
|
|
237
|
+
const onThumbPointerDown = (e: PointerEvent) => {
|
|
238
|
+
e.preventDefault()
|
|
239
|
+
e.stopPropagation()
|
|
240
|
+
setState("isDragging", true)
|
|
241
|
+
const grabOffset = e.clientY - thumbRef.getBoundingClientRect().top
|
|
242
|
+
const track = thumbMount() ?? viewportRef
|
|
243
|
+
|
|
244
|
+
thumbRef.setPointerCapture(e.pointerId)
|
|
245
|
+
|
|
246
|
+
const onPointerMove = (e: PointerEvent) => {
|
|
247
|
+
const { scrollHeight, clientHeight } = viewportRef
|
|
248
|
+
viewportRef.scrollTop = scrollTopFromThumbPointer({
|
|
249
|
+
pointer: e.clientY,
|
|
250
|
+
viewportTop: track.getBoundingClientRect().top,
|
|
251
|
+
grabOffset,
|
|
252
|
+
clientHeight: track.clientHeight,
|
|
253
|
+
scrollClientHeight: clientHeight,
|
|
254
|
+
scrollHeight,
|
|
255
|
+
thumbHeight: thumbHeight(),
|
|
256
|
+
})
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const done = (e: PointerEvent) => {
|
|
260
|
+
setState("isDragging", false)
|
|
261
|
+
thumbRef.releasePointerCapture(e.pointerId)
|
|
262
|
+
thumbRef.removeEventListener("pointermove", onPointerMove)
|
|
263
|
+
thumbRef.removeEventListener("pointerup", done)
|
|
264
|
+
thumbRef.removeEventListener("pointercancel", done)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
thumbRef.addEventListener("pointermove", onPointerMove)
|
|
268
|
+
thumbRef.addEventListener("pointerup", done)
|
|
269
|
+
thumbRef.addEventListener("pointercancel", done)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const renderThumb = () => (
|
|
273
|
+
<div
|
|
274
|
+
ref={(el) => {
|
|
275
|
+
thumbRef = el
|
|
276
|
+
}}
|
|
277
|
+
onPointerDown={onThumbPointerDown}
|
|
278
|
+
class="scroll-view__thumb"
|
|
279
|
+
data-visible={thumbVisible()}
|
|
280
|
+
data-dragging={isDragging()}
|
|
281
|
+
style={{
|
|
282
|
+
height: `${thumbHeight()}px`,
|
|
283
|
+
transform: `translateY(${thumbTop()}px)`,
|
|
284
|
+
"z-index": 100, // ensure it displays over content
|
|
285
|
+
}}
|
|
286
|
+
/>
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
// Keybinds implementation
|
|
290
|
+
// We ensure the viewport has a tabindex so it can receive focus
|
|
291
|
+
// We can also explicitly catch PageUp/Down if we want smooth scroll or specific behavior,
|
|
292
|
+
// but native usually handles this perfectly. Let's explicitly ensure it behaves well.
|
|
293
|
+
const onKeyDown = (e: KeyboardEvent) => {
|
|
294
|
+
// If user is focused on an input inside the scroll view, don't hijack keys
|
|
295
|
+
if (document.activeElement && ["INPUT", "TEXTAREA", "SELECT"].includes(document.activeElement.tagName)) {
|
|
296
|
+
return
|
|
297
|
+
}
|
|
298
|
+
const next = scrollKey(e)
|
|
299
|
+
if (!next) return
|
|
300
|
+
if (!isScrollKeyTarget(e.target, next)) return
|
|
301
|
+
if (scrollKeyOwner(viewportRef, e.target, next) !== viewportRef) return
|
|
302
|
+
|
|
303
|
+
const scrollAmount = viewportRef.clientHeight * 0.8
|
|
304
|
+
const lineAmount = 40
|
|
305
|
+
|
|
306
|
+
switch (next) {
|
|
307
|
+
case "page-down":
|
|
308
|
+
e.preventDefault()
|
|
309
|
+
viewportRef.scrollBy({ top: scrollAmount, behavior: "smooth" })
|
|
310
|
+
break
|
|
311
|
+
case "page-up":
|
|
312
|
+
e.preventDefault()
|
|
313
|
+
viewportRef.scrollBy({ top: -scrollAmount, behavior: "smooth" })
|
|
314
|
+
break
|
|
315
|
+
case "home":
|
|
316
|
+
e.preventDefault()
|
|
317
|
+
viewportRef.scrollTo({ top: 0, behavior: "smooth" })
|
|
318
|
+
break
|
|
319
|
+
case "end":
|
|
320
|
+
e.preventDefault()
|
|
321
|
+
viewportRef.scrollTo({ top: viewportRef.scrollHeight, behavior: "smooth" })
|
|
322
|
+
break
|
|
323
|
+
case "up":
|
|
324
|
+
e.preventDefault()
|
|
325
|
+
viewportRef.scrollBy({ top: -lineAmount, behavior: "smooth" })
|
|
326
|
+
break
|
|
327
|
+
case "down":
|
|
328
|
+
e.preventDefault()
|
|
329
|
+
viewportRef.scrollBy({ top: lineAmount, behavior: "smooth" })
|
|
330
|
+
break
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return (
|
|
335
|
+
<div
|
|
336
|
+
ref={rootRef}
|
|
337
|
+
class={`scroll-view ${local.class || ""}`}
|
|
338
|
+
style={local.style}
|
|
339
|
+
onPointerEnter={() => {
|
|
340
|
+
if (hoverRoot()) setState("isHovered", true)
|
|
341
|
+
}}
|
|
342
|
+
onPointerLeave={() => {
|
|
343
|
+
if (hoverRoot()) setState("isHovered", false)
|
|
344
|
+
}}
|
|
345
|
+
{...rest}
|
|
346
|
+
>
|
|
347
|
+
{/* Viewport */}
|
|
348
|
+
<div
|
|
349
|
+
ref={viewportRef}
|
|
350
|
+
class="scroll-view__viewport"
|
|
351
|
+
data-scrollable
|
|
352
|
+
onScroll={(e) => {
|
|
353
|
+
updateThumb()
|
|
354
|
+
markScrolling()
|
|
355
|
+
if (typeof events.onScroll === "function") events.onScroll(e as any)
|
|
356
|
+
}}
|
|
357
|
+
onWheel={(e) => {
|
|
358
|
+
markScrolling()
|
|
359
|
+
const handler = events.onWheel
|
|
360
|
+
if (typeof handler === "function") handler(e as any)
|
|
361
|
+
if (Array.isArray(handler)) handler[0](handler[1], e as any)
|
|
362
|
+
}}
|
|
363
|
+
onTouchStart={events.onTouchStart as any}
|
|
364
|
+
onTouchMove={events.onTouchMove as any}
|
|
365
|
+
onTouchEnd={events.onTouchEnd as any}
|
|
366
|
+
onTouchCancel={events.onTouchCancel as any}
|
|
367
|
+
onPointerDown={events.onPointerDown as any}
|
|
368
|
+
onClick={events.onClick as any}
|
|
369
|
+
tabIndex={0}
|
|
370
|
+
role="region"
|
|
371
|
+
aria-label={i18n.t("ui.scrollView.ariaLabel")}
|
|
372
|
+
onKeyDown={(e) => {
|
|
373
|
+
onKeyDown(e)
|
|
374
|
+
if (typeof events.onKeyDown === "function") events.onKeyDown(e as any)
|
|
375
|
+
}}
|
|
376
|
+
>
|
|
377
|
+
{local.children}
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
{/* Thumb Overlay — optionally portaled into an external track */}
|
|
381
|
+
<Show when={showThumb()}>
|
|
382
|
+
<Show when={thumbMount()} fallback={renderThumb()}>
|
|
383
|
+
{(mount) => <Portal mount={mount()}>{renderThumb()}</Portal>}
|
|
384
|
+
</Show>
|
|
385
|
+
</Show>
|
|
386
|
+
</div>
|
|
387
|
+
)
|
|
388
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
[data-component="select"] {
|
|
2
|
+
[data-slot="select-select-trigger"] {
|
|
3
|
+
padding: 0 4px 0 8px;
|
|
4
|
+
box-shadow: none;
|
|
5
|
+
|
|
6
|
+
[data-slot="select-select-trigger-value"] {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
}
|
|
11
|
+
[data-slot="select-select-trigger-icon"] {
|
|
12
|
+
width: 16px;
|
|
13
|
+
height: 16px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
color: var(--text-weak);
|
|
19
|
+
transition: transform 0.1s ease-in-out;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[data-expanded] {
|
|
23
|
+
&[data-variant="secondary"] {
|
|
24
|
+
background-color: var(--button-secondary-hover);
|
|
25
|
+
}
|
|
26
|
+
&[data-variant="ghost"] {
|
|
27
|
+
background-color: var(--surface-raised-base-active);
|
|
28
|
+
}
|
|
29
|
+
&[data-variant="primary"] {
|
|
30
|
+
background-color: var(--icon-strong-active);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:not([data-expanded]):focus-visible {
|
|
35
|
+
&[data-variant="secondary"] {
|
|
36
|
+
background-color: var(--button-secondary-base);
|
|
37
|
+
}
|
|
38
|
+
&[data-variant="ghost"] {
|
|
39
|
+
background-color: var(--surface-raised-base-hover);
|
|
40
|
+
}
|
|
41
|
+
&[data-variant="primary"] {
|
|
42
|
+
background-color: var(--icon-strong-base);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[data-trigger-style="settings"] {
|
|
48
|
+
[data-slot="select-select-trigger"] {
|
|
49
|
+
padding: 6px 6px 6px 12px;
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
border-radius: 6px;
|
|
52
|
+
min-width: 160px;
|
|
53
|
+
height: 32px;
|
|
54
|
+
justify-content: flex-end;
|
|
55
|
+
gap: 12px;
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
|
|
58
|
+
[data-slot="select-select-trigger-value"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
font-size: var(--font-size-base);
|
|
63
|
+
font-weight: var(--font-weight-regular);
|
|
64
|
+
}
|
|
65
|
+
[data-slot="select-select-trigger-icon"] {
|
|
66
|
+
width: 16px;
|
|
67
|
+
height: 20px;
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
color: var(--text-weak);
|
|
73
|
+
background-color: var(--surface-raised-base);
|
|
74
|
+
border-radius: 4px;
|
|
75
|
+
transition: transform 0.1s ease-in-out;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[data-slot="select-select-trigger"]:hover:not(:disabled),
|
|
79
|
+
&[data-slot="select-select-trigger"][data-expanded],
|
|
80
|
+
&[data-slot="select-select-trigger"][data-expanded]:hover:not(:disabled) {
|
|
81
|
+
background-color: var(--input-base);
|
|
82
|
+
box-shadow: var(--shadow-xs-border-base);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:not([data-expanded]):not(:focus-visible):focus {
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
box-shadow: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-component="select-content"] {
|
|
94
|
+
min-width: 104px;
|
|
95
|
+
max-width: 23rem;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
border-radius: var(--radius-md);
|
|
98
|
+
background-color: var(--surface-raised-stronger-non-alpha);
|
|
99
|
+
padding: 4px;
|
|
100
|
+
box-shadow: var(--shadow-xs-border);
|
|
101
|
+
z-index: 60;
|
|
102
|
+
|
|
103
|
+
&[data-expanded] {
|
|
104
|
+
animation: select-open 0.15s ease-out;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-slot="select-select-content-list"] {
|
|
108
|
+
overflow-y: auto;
|
|
109
|
+
max-height: 12rem;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
overflow-x: hidden;
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
|
|
115
|
+
&:focus {
|
|
116
|
+
outline: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
> *:not([role="presentation"]) + *:not([role="presentation"]) {
|
|
120
|
+
margin-top: 2px;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-slot="select-select-item"] {
|
|
125
|
+
position: relative;
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
padding: 2px 8px;
|
|
129
|
+
gap: 12px;
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
cursor: default;
|
|
132
|
+
|
|
133
|
+
/* text-12-medium */
|
|
134
|
+
font-family: var(--font-family-sans);
|
|
135
|
+
font-size: var(--font-size-small);
|
|
136
|
+
font-style: normal;
|
|
137
|
+
font-weight: var(--font-weight-medium);
|
|
138
|
+
line-height: var(--line-height-large); /* 166.667% */
|
|
139
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
140
|
+
|
|
141
|
+
color: var(--text-strong);
|
|
142
|
+
|
|
143
|
+
outline: none;
|
|
144
|
+
user-select: none;
|
|
145
|
+
|
|
146
|
+
&[data-highlighted] {
|
|
147
|
+
background: var(--surface-raised-base-hover);
|
|
148
|
+
}
|
|
149
|
+
&[data-disabled] {
|
|
150
|
+
background-color: var(--surface-raised-base);
|
|
151
|
+
pointer-events: none;
|
|
152
|
+
}
|
|
153
|
+
[data-slot="select-select-item-indicator"] {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
margin-left: auto;
|
|
158
|
+
width: 16px;
|
|
159
|
+
height: 16px;
|
|
160
|
+
}
|
|
161
|
+
&:focus {
|
|
162
|
+
outline: none;
|
|
163
|
+
}
|
|
164
|
+
&:hover {
|
|
165
|
+
background: var(--surface-raised-base-hover);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[data-component="select-content"][data-trigger-style="settings"] {
|
|
171
|
+
min-width: 160px;
|
|
172
|
+
border-radius: 8px;
|
|
173
|
+
padding: 0;
|
|
174
|
+
|
|
175
|
+
[data-slot="select-select-content-list"] {
|
|
176
|
+
padding: 4px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
[data-slot="select-select-item"] {
|
|
180
|
+
/* text-14-regular */
|
|
181
|
+
font-family: var(--font-family-sans);
|
|
182
|
+
font-size: var(--font-size-base);
|
|
183
|
+
font-style: normal;
|
|
184
|
+
font-weight: var(--font-weight-regular);
|
|
185
|
+
line-height: var(--line-height-large);
|
|
186
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@keyframes select-open {
|
|
191
|
+
from {
|
|
192
|
+
opacity: 0;
|
|
193
|
+
transform: scale(0.95);
|
|
194
|
+
}
|
|
195
|
+
to {
|
|
196
|
+
opacity: 1;
|
|
197
|
+
transform: scale(1);
|
|
198
|
+
}
|
|
199
|
+
}
|