@adea-ai/ui 0.61.1 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -6
- package/dist/LICENSE +201 -0
- package/dist/NOTICE +101 -0
- package/dist/components/composites/account-menu/index.js +2 -0
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts +5 -0
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-choices.js +211 -0
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts +15 -0
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-editor.js +280 -0
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts +18 -0
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-rows.js +101 -0
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -0
- package/dist/components/composites/appearance-editor/appearance-types.d.ts +42 -0
- package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/index.d.ts +4 -0
- package/dist/components/composites/appearance-editor/index.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/index.js +3 -0
- package/dist/components/composites/appearance-editor/theme-preview.d.ts +17 -0
- package/dist/components/composites/appearance-editor/theme-preview.d.ts.map +1 -0
- package/dist/components/composites/appearance-editor/theme-preview.js +158 -0
- package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -0
- package/dist/components/composites/list-row/index.js +2 -0
- package/dist/components/composites/settings/index.js +2 -0
- package/dist/components/composites/stat/index.js +2 -0
- package/dist/components/composites/update-dialog/index.js +2 -0
- package/dist/components/composites/workspace-mark/index.js +2 -0
- package/dist/components/conversation/index.js +6 -0
- package/dist/components/layout/app-shell/index.js +2 -0
- package/dist/components/layout/page/index.js +2 -0
- package/dist/components/layout/panel/index.js +2 -0
- package/dist/components/layout/side-rail/index.js +3 -0
- package/dist/components/layout/sidebar-nav/index.js +2 -0
- package/dist/components/layout/status-bar/index.js +2 -0
- package/dist/components/layout/top-bar/index.js +2 -0
- package/dist/components/motion/index.js +2 -2
- package/dist/components/theme/index.js +5 -0
- package/dist/components/ui/accordion/index.js +2 -0
- package/dist/components/ui/alert/index.js +2 -0
- package/dist/components/ui/alert-dialog/index.js +2 -0
- package/dist/components/ui/aspect-ratio/index.js +2 -0
- package/dist/components/ui/avatar/index.js +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/board/index.js +2 -0
- package/dist/components/ui/breadcrumb/index.js +2 -0
- package/dist/components/ui/button/index.js +2 -0
- package/dist/components/ui/button-group/index.js +2 -0
- package/dist/components/ui/calendar/index.js +2 -0
- package/dist/components/ui/card/index.js +2 -0
- package/dist/components/ui/carousel/index.js +2 -0
- package/dist/components/ui/chart/index.js +2 -0
- package/dist/components/ui/checkbox/index.js +2 -0
- package/dist/components/ui/code-block/index.js +2 -0
- package/dist/components/ui/collapsible/index.js +2 -0
- package/dist/components/ui/combobox/index.js +2 -0
- package/dist/components/ui/command/index.js +2 -0
- package/dist/components/ui/context-menu/index.js +2 -0
- package/dist/components/ui/detail-panel/index.js +2 -0
- package/dist/components/ui/dialog/index.js +2 -0
- package/dist/components/ui/diff-block/index.js +2 -0
- package/dist/components/ui/drawer/index.js +2 -0
- package/dist/components/ui/dropdown-menu/index.js +2 -0
- package/dist/components/ui/empty/index.js +2 -0
- package/dist/components/ui/entity-icon/index.js +2 -0
- package/dist/components/ui/field/index.js +2 -0
- package/dist/components/ui/hover-card/index.js +2 -0
- package/dist/components/ui/input/index.js +2 -0
- package/dist/components/ui/input-group/index.js +2 -0
- package/dist/components/ui/input-otp/index.js +2 -0
- package/dist/components/ui/item/index.js +2 -0
- package/dist/components/ui/kbd/index.js +2 -0
- package/dist/components/ui/label/index.js +2 -0
- package/dist/components/ui/menubar/index.js +2 -0
- package/dist/components/ui/modal-dialog/index.js +2 -0
- package/dist/components/ui/navigation-menu/index.js +2 -0
- package/dist/components/ui/pagination/index.js +2 -0
- package/dist/components/ui/popover/index.js +2 -0
- package/dist/components/ui/progress/index.js +2 -0
- package/dist/components/ui/radio-group/index.js +2 -0
- package/dist/components/ui/resizable/index.js +2 -0
- package/dist/components/ui/scroll-area/index.js +2 -0
- package/dist/components/ui/select/index.js +2 -0
- package/dist/components/ui/select/select.d.ts +5 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.js +24 -20
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/separator/index.js +2 -0
- package/dist/components/ui/sheet/index.js +2 -0
- package/dist/components/ui/skeleton/index.js +2 -0
- package/dist/components/ui/slider/index.js +2 -0
- package/dist/components/ui/spinner/index.js +2 -0
- package/dist/components/ui/status-chip/index.js +2 -0
- package/dist/components/ui/switch/index.js +2 -0
- package/dist/components/ui/table/index.js +2 -0
- package/dist/components/ui/tabs/index.js +2 -0
- package/dist/components/ui/textarea/index.js +2 -0
- package/dist/components/ui/toast/index.js +2 -0
- package/dist/components/ui/toggle/index.js +2 -0
- package/dist/components/ui/toggle-group/index.js +2 -0
- package/dist/components/ui/tooltip/index.js +2 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/r/appearance-editor.json +51 -0
- package/dist/r/lib.json +1 -1
- package/dist/r/registry.json +52 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +173 -0
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +239 -0
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +122 -0
- package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +40 -0
- package/dist/r/src/components/composites/appearance-editor/index.ts +12 -0
- package/dist/r/src/components/composites/appearance-editor/theme-preview.tsx +128 -0
- package/dist/r/src/components/ui/select/select.tsx +8 -3
- package/package.json +11 -9
- package/registry.json +52 -1
- package/src/components/composites/appearance-editor/appearance-choices.tsx +173 -0
- package/src/components/composites/appearance-editor/appearance-editor.tsx +239 -0
- package/src/components/composites/appearance-editor/appearance-rows.tsx +122 -0
- package/src/components/composites/appearance-editor/appearance-types.ts +40 -0
- package/src/components/composites/appearance-editor/index.ts +12 -0
- package/src/components/composites/appearance-editor/theme-preview.tsx +128 -0
- package/src/components/ui/select/select.tsx +8 -3
- package/src/index.ts +3 -4
- package/dist/components/ui/diff-block/diff-block.test.d.ts +0 -2
- package/dist/components/ui/diff-block/diff-block.test.d.ts.map +0 -1
- package/dist/lib/keyed-rows.test.d.ts +0 -2
- package/dist/lib/keyed-rows.test.d.ts.map +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 Wing
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
/*
|
|
25
|
+
* Substantially translated from Zeron crates/ui/src/settings/appearance.rs
|
|
26
|
+
* `bar`, `miniature`, `miniature_split`, and `palette_preview`, revision
|
|
27
|
+
* 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59, via Adea's existing
|
|
28
|
+
* packages/ui/src/components/theme-preview.tsx adaptation.
|
|
29
|
+
* Retains the sidebar/pane decomposition, exact bar fractions and opacity,
|
|
30
|
+
* split outer corners, and three-band palette strip. GPUI and Adea's local
|
|
31
|
+
* ThemeVariant are replaced by Solid and the canonical AdeaTheme schema.
|
|
32
|
+
* Dynamic inline colors are theme data; no palette is authored here.
|
|
33
|
+
*/
|
|
34
|
+
import type { AdeaTheme } from '@adea-ai/themes'
|
|
35
|
+
import { For } from 'solid-js'
|
|
36
|
+
import { cn } from '#lib/utils'
|
|
37
|
+
|
|
38
|
+
export type ThemeMiniatureProps = {
|
|
39
|
+
theme: AdeaTheme
|
|
40
|
+
corners?: 'all' | 'left' | 'right'
|
|
41
|
+
class?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function Bar(props: { fraction: number; opacity: number; color: string }) {
|
|
45
|
+
return (
|
|
46
|
+
<span
|
|
47
|
+
class="h-[5px] rounded-[3px]"
|
|
48
|
+
style={{
|
|
49
|
+
width: `${Math.round(props.fraction * 100)}%`,
|
|
50
|
+
'background-color': props.color,
|
|
51
|
+
opacity: props.opacity,
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ThemeMiniature(props: ThemeMiniatureProps) {
|
|
58
|
+
return (
|
|
59
|
+
<span
|
|
60
|
+
data-theme-miniature
|
|
61
|
+
aria-hidden="true"
|
|
62
|
+
class={cn(
|
|
63
|
+
'flex size-full overflow-hidden',
|
|
64
|
+
{
|
|
65
|
+
'rounded-md': !props.corners || props.corners === 'all',
|
|
66
|
+
'rounded-l-md': props.corners === 'left',
|
|
67
|
+
'rounded-r-md': props.corners === 'right',
|
|
68
|
+
},
|
|
69
|
+
props.class
|
|
70
|
+
)}
|
|
71
|
+
style={{ 'background-color': props.theme.colors.surface }}
|
|
72
|
+
>
|
|
73
|
+
<span class="flex h-full w-11 shrink-0 flex-col gap-[7px] overflow-hidden px-2 pt-3.5">
|
|
74
|
+
<Bar fraction={0.7} opacity={0.34} color={props.theme.colors.foreground} />
|
|
75
|
+
<Bar fraction={1} opacity={0.22} color={props.theme.colors.foreground} />
|
|
76
|
+
<Bar fraction={0.85} opacity={0.22} color={props.theme.colors.foreground} />
|
|
77
|
+
<Bar fraction={1} opacity={0.22} color={props.theme.colors.foreground} />
|
|
78
|
+
</span>
|
|
79
|
+
<span
|
|
80
|
+
class="my-2 mr-2 flex min-w-0 flex-1 flex-col gap-[7px] overflow-hidden rounded-md border border-(--appearance-preview-border) p-2.5"
|
|
81
|
+
style={{
|
|
82
|
+
'background-color': props.theme.colors.background,
|
|
83
|
+
'--appearance-preview-border': props.theme.colors.border,
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
<Bar fraction={0.62} opacity={0.34} color={props.theme.colors.foreground} />
|
|
87
|
+
<Bar fraction={0.88} opacity={0.22} color={props.theme.colors.foreground} />
|
|
88
|
+
<Bar fraction={0.76} opacity={0.22} color={props.theme.colors.foreground} />
|
|
89
|
+
<Bar fraction={0.52} opacity={0.22} color={props.theme.colors.foreground} />
|
|
90
|
+
</span>
|
|
91
|
+
</span>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function ThemeMiniatureSplit(props: { light: AdeaTheme; dark: AdeaTheme; class?: string }) {
|
|
96
|
+
return (
|
|
97
|
+
<span class={cn('flex size-full', props.class)} aria-hidden="true">
|
|
98
|
+
<span class="h-full w-1/2 overflow-hidden">
|
|
99
|
+
<ThemeMiniature theme={props.light} corners="left" />
|
|
100
|
+
</span>
|
|
101
|
+
<span class="h-full w-1/2 overflow-hidden">
|
|
102
|
+
<ThemeMiniature theme={props.dark} corners="right" />
|
|
103
|
+
</span>
|
|
104
|
+
</span>
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function PalettePreview(props: { theme: AdeaTheme; class?: string }) {
|
|
109
|
+
const bands = () => [
|
|
110
|
+
props.theme.colors.surface,
|
|
111
|
+
props.theme.colors.background,
|
|
112
|
+
props.theme.colors.accent,
|
|
113
|
+
]
|
|
114
|
+
return (
|
|
115
|
+
<span
|
|
116
|
+
class={cn(
|
|
117
|
+
'flex h-[18px] w-[30px] shrink-0 overflow-hidden rounded-[5px] border border-(--appearance-preview-border)',
|
|
118
|
+
props.class
|
|
119
|
+
)}
|
|
120
|
+
aria-hidden="true"
|
|
121
|
+
style={{ '--appearance-preview-border': props.theme.colors.border }}
|
|
122
|
+
>
|
|
123
|
+
<For each={bands()}>
|
|
124
|
+
{(band) => <span class="h-full w-1/3" style={{ 'background-color': band }} />}
|
|
125
|
+
</For>
|
|
126
|
+
</span>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
@@ -129,11 +129,16 @@ export function SelectValue(props: SelectValueProps) {
|
|
|
129
129
|
* which is what makes a Select able to render a typed option rather than a
|
|
130
130
|
* string; `children` here is for content above the list, such as a filter hint.
|
|
131
131
|
*/
|
|
132
|
-
export
|
|
133
|
-
|
|
132
|
+
export type SelectContentProps = ComponentProps<typeof KobalteSelect.Content> & {
|
|
133
|
+
/** Keep a nested menu inside its enclosing modal's accessible subtree. */
|
|
134
|
+
portalMount?: HTMLElement
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function SelectContent(props: SelectContentProps) {
|
|
138
|
+
const [local, rest] = splitProps(props, ['class', 'children', 'portalMount'])
|
|
134
139
|
|
|
135
140
|
return (
|
|
136
|
-
<KobalteSelect.Portal>
|
|
141
|
+
<KobalteSelect.Portal mount={local.portalMount}>
|
|
137
142
|
<KobalteSelect.Content
|
|
138
143
|
class={cn(
|
|
139
144
|
'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',
|
package/src/index.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* import '@adea-ai/ui/fonts.css'
|
|
11
11
|
*
|
|
12
12
|
* Everything here is covered by the Storybook workshop in `apps/storybook`,
|
|
13
|
-
* which is also where the reasoning behind each component is written down.
|
|
14
|
-
* component
|
|
13
|
+
* which is also where the reasoning behind each component is written down. An
|
|
14
|
+
* optional-peer component lives on its documented component subpath rather than here.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/* --- Primitives ---------------------------------------------------------- */
|
|
@@ -26,8 +26,6 @@ export * from './components/ui/breadcrumb'
|
|
|
26
26
|
export * from './components/ui/button'
|
|
27
27
|
export * from './components/ui/button-group'
|
|
28
28
|
export * from './components/ui/calendar'
|
|
29
|
-
export * from './components/ui/carousel'
|
|
30
|
-
export * from './components/ui/chart'
|
|
31
29
|
export * from './components/ui/card'
|
|
32
30
|
export * from './components/ui/checkbox'
|
|
33
31
|
export * from './components/ui/collapsible'
|
|
@@ -98,6 +96,7 @@ export * from './components/composites/account-menu'
|
|
|
98
96
|
export * from './components/composites/list-row'
|
|
99
97
|
export * from './components/composites/settings'
|
|
100
98
|
export * from './components/composites/stat'
|
|
99
|
+
export * from './components/composites/appearance-editor'
|
|
101
100
|
export * from './components/composites/update-dialog'
|
|
102
101
|
export * from './components/composites/workspace-mark'
|
|
103
102
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-block.test.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/diff-block/diff-block.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyed-rows.test.d.ts","sourceRoot":"","sources":["../../src/lib/keyed-rows.test.ts"],"names":[],"mappings":""}
|