@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,177 @@
|
|
|
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
|
+
user-select: none;
|
|
97
|
+
font-weight: 440;
|
|
98
|
+
font-size: 13px;
|
|
99
|
+
line-height: 20px;
|
|
100
|
+
letter-spacing: -0.04px;
|
|
101
|
+
color: var(--v2-text-text-muted);
|
|
102
|
+
font-variation-settings: "slnt" 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[data-slot="dialog-close-button"] {
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
align-items: center;
|
|
109
|
+
width: 20px;
|
|
110
|
+
height: 20px;
|
|
111
|
+
margin-top: -2px;
|
|
112
|
+
margin-right: -2px;
|
|
113
|
+
margin-left: auto;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
color: var(--v2-icon-icon-muted);
|
|
118
|
+
|
|
119
|
+
&:hover {
|
|
120
|
+
background: var(--v2-overlay-simple-overlay-hover);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&[data-hide-close] [data-slot="dialog-close-button"] {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[data-slot="dialog-footer"] {
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: row;
|
|
132
|
+
justify-content: flex-end;
|
|
133
|
+
align-items: flex-start;
|
|
134
|
+
padding: 16px;
|
|
135
|
+
gap: 8px;
|
|
136
|
+
align-self: stretch;
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[data-slot="dialog-body"] {
|
|
141
|
+
width: 100%;
|
|
142
|
+
position: relative;
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
flex: 1;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
|
|
148
|
+
&:focus-visible {
|
|
149
|
+
outline: none;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
&:focus-visible {
|
|
153
|
+
outline: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&[data-fit] {
|
|
159
|
+
[data-slot="dialog-container"] {
|
|
160
|
+
height: auto;
|
|
161
|
+
|
|
162
|
+
[data-slot="dialog-content"] {
|
|
163
|
+
min-height: 0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&[data-size="large"] [data-slot="dialog-container"] {
|
|
169
|
+
width: 640px;
|
|
170
|
+
height: 480px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&[data-size="x-large"] [data-slot="dialog-container"] {
|
|
174
|
+
width: min(calc(100vw - 32px), 980px);
|
|
175
|
+
height: min(calc(100vh - 92px), 600px);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Dialog as Kobalte } from "@kobalte/core/dialog"
|
|
2
|
+
import { type ComponentProps, type JSXElement, type ParentProps, Show, children, splitProps } from "solid-js"
|
|
3
|
+
import "./dialog-v2.css"
|
|
4
|
+
|
|
5
|
+
export interface DialogProps extends ParentProps {
|
|
6
|
+
size?: "normal" | "large" | "x-large"
|
|
7
|
+
variant?: "default" | "settings"
|
|
8
|
+
class?: ComponentProps<"div">["class"]
|
|
9
|
+
containerClass?: ComponentProps<"div">["class"]
|
|
10
|
+
classList?: ComponentProps<"div">["classList"]
|
|
11
|
+
fit?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface DialogHeaderProps extends ParentProps {
|
|
15
|
+
closeLabel?: string
|
|
16
|
+
hideClose?: boolean
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface DialogTitleGroupProps {
|
|
20
|
+
title?: JSXElement
|
|
21
|
+
description: JSXElement
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function DialogFooter(props: ParentProps) {
|
|
25
|
+
return <div data-slot="dialog-footer">{props.children}</div>
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function DialogBody(props: ParentProps & { class?: ComponentProps<"div">["class"] }) {
|
|
29
|
+
const [local] = splitProps(props, ["class", "children"])
|
|
30
|
+
return (
|
|
31
|
+
<div data-slot="dialog-body" class={local.class}>
|
|
32
|
+
{local.children}
|
|
33
|
+
</div>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function DialogTitle(props: ParentProps) {
|
|
38
|
+
return <Kobalte.Title data-slot="dialog-header-title">{props.children}</Kobalte.Title>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function DialogTitleGroup(props: DialogTitleGroupProps) {
|
|
42
|
+
const title = children(() => props.title)
|
|
43
|
+
const description = children(() => props.description)
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div data-slot="dialog-title-group">
|
|
47
|
+
<Show when={title()}>{(t) => <Kobalte.Title data-slot="dialog-title">{t()}</Kobalte.Title>}</Show>
|
|
48
|
+
<Kobalte.Description data-slot="dialog-description">{description()}</Kobalte.Description>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function DialogHeader(props: DialogHeaderProps) {
|
|
54
|
+
const [local] = splitProps(props, ["closeLabel", "hideClose", "children"])
|
|
55
|
+
const hideClose = () => local.hideClose === true
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<div data-slot="dialog-header" data-hide-close={hideClose() ? "" : undefined}>
|
|
59
|
+
{local.children}
|
|
60
|
+
{!hideClose() && (
|
|
61
|
+
<Kobalte.CloseButton data-slot="dialog-close-button" aria-label={local.closeLabel ?? "Close"}>
|
|
62
|
+
<svg
|
|
63
|
+
width="16"
|
|
64
|
+
height="16"
|
|
65
|
+
viewBox="0 0 16 16"
|
|
66
|
+
fill="none"
|
|
67
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
>
|
|
70
|
+
<path
|
|
71
|
+
d="M12.4446 3.55469L3.55566 12.4436M3.55566 3.55469L12.4446 12.4436"
|
|
72
|
+
stroke="currentColor"
|
|
73
|
+
stroke-linejoin="round"
|
|
74
|
+
/>
|
|
75
|
+
</svg>
|
|
76
|
+
</Kobalte.CloseButton>
|
|
77
|
+
)}
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function Dialog(props: DialogProps) {
|
|
83
|
+
const [local] = splitProps(props, ["size", "variant", "class", "containerClass", "classList", "fit", "children"])
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<div
|
|
87
|
+
data-component="dialog-v2"
|
|
88
|
+
data-variant={local.variant === "settings" ? "settings" : undefined}
|
|
89
|
+
data-fit={local.fit ? true : undefined}
|
|
90
|
+
data-size={local.size || "normal"}
|
|
91
|
+
>
|
|
92
|
+
<div data-slot="dialog-container" class={local.containerClass}>
|
|
93
|
+
<Kobalte.Content
|
|
94
|
+
data-slot="dialog-content"
|
|
95
|
+
classList={{
|
|
96
|
+
...local.classList,
|
|
97
|
+
[local.class ?? ""]: !!local.class,
|
|
98
|
+
}}
|
|
99
|
+
onOpenAutoFocus={(e) => {
|
|
100
|
+
const target = e.currentTarget as HTMLElement | null
|
|
101
|
+
const autofocusEl = target?.querySelector("[autofocus]") as HTMLElement | null
|
|
102
|
+
if (autofocusEl) {
|
|
103
|
+
e.preventDefault()
|
|
104
|
+
autofocusEl.focus({ preventScroll: true })
|
|
105
|
+
}
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
{local.children}
|
|
109
|
+
</Kobalte.Content>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export const DialogV2 = Dialog
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[data-component="diff-changes"] {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 8px;
|
|
4
|
+
justify-content: flex-end;
|
|
5
|
+
align-items: center;
|
|
6
|
+
|
|
7
|
+
[data-slot="diff-changes-additions"],
|
|
8
|
+
[data-slot="diff-changes-deletions"] {
|
|
9
|
+
font-size: 11px;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-weight: 440;
|
|
12
|
+
line-height: 1;
|
|
13
|
+
letter-spacing: 0.05px;
|
|
14
|
+
text-align: right;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-slot="diff-changes-additions"] {
|
|
18
|
+
color: var(--v2-state-fg-success);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-slot="diff-changes-deletions"] {
|
|
22
|
+
color: var(--v2-state-fg-danger);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createMemo, Show } from "solid-js"
|
|
2
|
+
import "./diff-changes-v2.css"
|
|
3
|
+
|
|
4
|
+
export function DiffChanges(props: {
|
|
5
|
+
class?: string
|
|
6
|
+
changes: { additions: number; deletions: number } | { additions: number; deletions: number }[]
|
|
7
|
+
}) {
|
|
8
|
+
const additions = createMemo(() =>
|
|
9
|
+
Array.isArray(props.changes)
|
|
10
|
+
? props.changes.reduce((acc, diff) => acc + (diff.additions ?? 0), 0)
|
|
11
|
+
: props.changes.additions,
|
|
12
|
+
)
|
|
13
|
+
const deletions = createMemo(() =>
|
|
14
|
+
Array.isArray(props.changes)
|
|
15
|
+
? props.changes.reduce((acc, diff) => acc + (diff.deletions ?? 0), 0)
|
|
16
|
+
: props.changes.deletions,
|
|
17
|
+
)
|
|
18
|
+
const total = createMemo(() => (additions() ?? 0) + (deletions() ?? 0))
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Show when={total() > 0}>
|
|
22
|
+
<div data-component="diff-changes" classList={{ [props.class ?? ""]: true }}>
|
|
23
|
+
<span data-slot="diff-changes-additions">{`+${additions()}`}</span>
|
|
24
|
+
<span data-slot="diff-changes-deletions">{`-${deletions()}`}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</Show>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ComponentProps, splitProps } from "solid-js"
|
|
2
|
+
import "./divider-v2.css"
|
|
3
|
+
|
|
4
|
+
export interface DividerV2Props extends ComponentProps<"div"> {}
|
|
5
|
+
|
|
6
|
+
export function DividerV2(props: DividerV2Props) {
|
|
7
|
+
const [local, rest] = splitProps(props, ["class", "classList"])
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
{...rest}
|
|
11
|
+
role="separator"
|
|
12
|
+
aria-orientation="horizontal"
|
|
13
|
+
data-component="divider-v2"
|
|
14
|
+
classList={{
|
|
15
|
+
...local.classList,
|
|
16
|
+
[local.class ?? ""]: !!local.class,
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
[data-component="field-v2"] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[data-component="field-v2"] [data-slot="field-v2-label"] {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: center;
|
|
14
|
+
align-self: stretch;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
min-height: 16px;
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
border: 0;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 530;
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
line-height: 1;
|
|
24
|
+
letter-spacing: -0.04px;
|
|
25
|
+
color: var(--v2-text-text-base);
|
|
26
|
+
font-variation-settings: "slnt" 0;
|
|
27
|
+
cursor: default;
|
|
28
|
+
user-select: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-component="field-v2"] [data-slot="field-v2-label-text"] {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-component="field-v2"] [data-slot="field-v2-label"] [data-component="tooltip-v2-trigger"] {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
flex: none;
|
|
39
|
+
width: 16px;
|
|
40
|
+
height: 16px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-component="field-v2"] [data-slot="field-v2-label-info"] {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
flex: none;
|
|
48
|
+
width: 16px;
|
|
49
|
+
height: 16px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
border: 0;
|
|
52
|
+
border-radius: 0;
|
|
53
|
+
background: transparent;
|
|
54
|
+
color: var(--v2-icon-icon-muted);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
outline: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-component="field-v2"] [data-slot="field-v2-label-info"]:is(:hover, [data-state="hover"]) {
|
|
60
|
+
color: var(--v2-text-text-base);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-component="field-v2"] [data-slot="field-v2-label-info"]:focus {
|
|
64
|
+
outline: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[data-component="field-v2"] [data-slot="field-v2-label-info"]:focus-visible {
|
|
68
|
+
outline: 2px solid var(--v2-border-border-focus);
|
|
69
|
+
outline-offset: 1px;
|
|
70
|
+
border-radius: 2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[data-component="field-v2"] [data-slot="field-v2-prefix"],
|
|
74
|
+
[data-component="field-v2"] [data-slot="field-v2-suffix"] {
|
|
75
|
+
align-self: stretch;
|
|
76
|
+
width: 100%;
|
|
77
|
+
min-height: 11px;
|
|
78
|
+
font-style: normal;
|
|
79
|
+
font-weight: 440;
|
|
80
|
+
font-size: 11px;
|
|
81
|
+
line-height: 1;
|
|
82
|
+
letter-spacing: 0.05px;
|
|
83
|
+
color: var(--v2-text-text-muted);
|
|
84
|
+
font-variation-settings: "slnt" 0;
|
|
85
|
+
user-select: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-component="field-v2"] [data-slot="field-v2-control"] {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: flex-start;
|
|
92
|
+
width: 100%;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
}
|