@vieo-io/ui 0.1.0 → 0.3.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 +65 -5
- package/dist/app-switcher.css +1 -0
- package/dist/controls.css +5 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +9 -0
- package/dist/core/reveal.d.ts +10 -0
- package/dist/core/reveal.js +65 -0
- package/dist/core/search.d.ts +5 -0
- package/dist/core/search.js +12 -0
- package/dist/core/settingsSearch.d.ts +21 -0
- package/dist/core/settingsSearch.js +37 -0
- package/dist/core/update/build.d.ts +48 -0
- package/dist/core/update/build.js +90 -0
- package/dist/core/update/follow.d.ts +39 -0
- package/dist/core/update/follow.js +49 -0
- package/dist/core/update/notNow.d.ts +4 -0
- package/dist/core/update/notNow.js +18 -0
- package/dist/core/update/offer.d.ts +32 -0
- package/dist/core/update/offer.js +19 -0
- package/dist/core/update/reload.d.ts +12 -0
- package/dist/core/update/reload.js +16 -0
- package/dist/core/update/types.d.ts +33 -0
- package/dist/field.css +7 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.js +4 -0
- package/dist/react/settingsSearch.d.ts +35 -0
- package/dist/react/settingsSearch.js +97 -0
- package/dist/react/update/Offer.d.ts +9 -0
- package/dist/react/update/Offer.js +4 -0
- package/dist/react/update/UpdateNotice.d.ts +37 -0
- package/dist/react/update/UpdateNotice.js +141 -0
- package/dist/react/update/hooks.d.ts +9 -0
- package/dist/react/update/hooks.js +51 -0
- package/dist/search.css +83 -0
- package/dist/setting.css +26 -0
- package/dist/shell.css +31 -0
- package/dist/{AppShell.d.ts → solid/AppShell.d.ts} +7 -0
- package/dist/{AppShell.jsx → solid/AppShell.jsx} +1 -1
- package/dist/{CommandPalette.d.ts → solid/CommandPalette.d.ts} +1 -1
- package/dist/{CommandPalette.jsx → solid/CommandPalette.jsx} +5 -10
- package/dist/{Dialog.jsx → solid/Dialog.jsx} +1 -1
- package/dist/{Icon.d.ts → solid/Icon.d.ts} +1 -1
- package/dist/{Icon.jsx → solid/Icon.jsx} +1 -1
- package/dist/{Listbox.jsx → solid/Listbox.jsx} +2 -2
- package/dist/{Menu.jsx → solid/Menu.jsx} +3 -3
- package/dist/{Popover.jsx → solid/Popover.jsx} +2 -2
- package/dist/{SegmentedControl.jsx → solid/SegmentedControl.jsx} +2 -2
- package/dist/{Sidebar.jsx → solid/Sidebar.jsx} +1 -1
- package/dist/{Tabs.jsx → solid/Tabs.jsx} +2 -2
- package/dist/{TextField.jsx → solid/TextField.jsx} +1 -1
- package/dist/{Toolbar.jsx → solid/Toolbar.jsx} +1 -1
- package/dist/{Tooltip.jsx → solid/Tooltip.jsx} +1 -1
- package/dist/{Tree.d.ts → solid/Tree.d.ts} +8 -1
- package/dist/{Tree.jsx → solid/Tree.jsx} +27 -8
- package/dist/{index.d.ts → solid/index.d.ts} +1 -1
- package/dist/{index.js → solid/index.js} +1 -1
- package/dist/solid/trigger.js +1 -0
- package/dist/styles.css +2 -0
- package/dist/toolbar.css +8 -0
- package/dist/tree.css +38 -1
- package/dist/update.css +118 -0
- package/package.json +39 -8
- /package/dist/{aria.d.ts → core/aria.d.ts} +0 -0
- /package/dist/{aria.js → core/aria.js} +0 -0
- /package/dist/{layers.d.ts → core/layers.d.ts} +0 -0
- /package/dist/{layers.js → core/layers.js} +0 -0
- /package/dist/{paths.d.ts → core/paths.d.ts} +0 -0
- /package/dist/{paths.js → core/paths.js} +0 -0
- /package/dist/{roving.d.ts → core/roving.d.ts} +0 -0
- /package/dist/{roving.js → core/roving.js} +0 -0
- /package/dist/{trigger.js → core/update/types.js} +0 -0
- /package/dist/{AppSwitcher.d.ts → solid/AppSwitcher.d.ts} +0 -0
- /package/dist/{AppSwitcher.jsx → solid/AppSwitcher.jsx} +0 -0
- /package/dist/{Badge.d.ts → solid/Badge.d.ts} +0 -0
- /package/dist/{Badge.jsx → solid/Badge.jsx} +0 -0
- /package/dist/{Button.d.ts → solid/Button.d.ts} +0 -0
- /package/dist/{Button.jsx → solid/Button.jsx} +0 -0
- /package/dist/{Checkbox.d.ts → solid/Checkbox.d.ts} +0 -0
- /package/dist/{Checkbox.jsx → solid/Checkbox.jsx} +0 -0
- /package/dist/{Dialog.d.ts → solid/Dialog.d.ts} +0 -0
- /package/dist/{EmptyState.d.ts → solid/EmptyState.d.ts} +0 -0
- /package/dist/{EmptyState.jsx → solid/EmptyState.jsx} +0 -0
- /package/dist/{IconButton.d.ts → solid/IconButton.d.ts} +0 -0
- /package/dist/{IconButton.jsx → solid/IconButton.jsx} +0 -0
- /package/dist/{Kbd.d.ts → solid/Kbd.d.ts} +0 -0
- /package/dist/{Kbd.jsx → solid/Kbd.jsx} +0 -0
- /package/dist/{Listbox.d.ts → solid/Listbox.d.ts} +0 -0
- /package/dist/{Menu.d.ts → solid/Menu.d.ts} +0 -0
- /package/dist/{ObjectCard.d.ts → solid/ObjectCard.d.ts} +0 -0
- /package/dist/{ObjectCard.jsx → solid/ObjectCard.jsx} +0 -0
- /package/dist/{Popover.d.ts → solid/Popover.d.ts} +0 -0
- /package/dist/{Resizer.d.ts → solid/Resizer.d.ts} +0 -0
- /package/dist/{Resizer.jsx → solid/Resizer.jsx} +0 -0
- /package/dist/{SegmentedControl.d.ts → solid/SegmentedControl.d.ts} +0 -0
- /package/dist/{Select.d.ts → solid/Select.d.ts} +0 -0
- /package/dist/{Select.jsx → solid/Select.jsx} +0 -0
- /package/dist/{SettingRow.d.ts → solid/SettingRow.d.ts} +0 -0
- /package/dist/{SettingRow.jsx → solid/SettingRow.jsx} +0 -0
- /package/dist/{Sidebar.d.ts → solid/Sidebar.d.ts} +0 -0
- /package/dist/{Switch.d.ts → solid/Switch.d.ts} +0 -0
- /package/dist/{Switch.jsx → solid/Switch.jsx} +0 -0
- /package/dist/{Tabs.d.ts → solid/Tabs.d.ts} +0 -0
- /package/dist/{TextField.d.ts → solid/TextField.d.ts} +0 -0
- /package/dist/{Toast.d.ts → solid/Toast.d.ts} +0 -0
- /package/dist/{Toast.jsx → solid/Toast.jsx} +0 -0
- /package/dist/{Toolbar.d.ts → solid/Toolbar.d.ts} +0 -0
- /package/dist/{Tooltip.d.ts → solid/Tooltip.d.ts} +0 -0
- /package/dist/{trigger.d.ts → solid/trigger.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createFocusTrap } from '@solid-primitives/focus';
|
|
2
2
|
import { Portal, Show } from '@solidjs/web';
|
|
3
3
|
import { createEffect, createSignal, createUniqueId } from 'solid-js';
|
|
4
|
-
import { isTopDialog, pushDialog } from '
|
|
4
|
+
import { isTopDialog, pushDialog } from '../core/layers';
|
|
5
5
|
/**
|
|
6
6
|
* A modal dialog. Escape or a click on the backdrop closes the top dialog only, focus stays inside
|
|
7
7
|
* while it's open, and focus goes back to whatever had it before the dialog opened.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { omit } from 'solid-js';
|
|
2
|
-
import { PATHS } from '
|
|
2
|
+
import { PATHS } from '../core/paths';
|
|
3
3
|
/** An inline SVG icon in `currentColor`, hidden from assistive technology. */
|
|
4
4
|
export function Icon(props) {
|
|
5
5
|
const rest = omit(props, 'class', 'name', 'size', 'style');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { For, Show } from '@solidjs/web';
|
|
2
2
|
import { createSignal } from 'solid-js';
|
|
3
|
-
import { aria } from '
|
|
4
|
-
import { first, moveFor, rows } from '
|
|
3
|
+
import { aria } from '../core/aria';
|
|
4
|
+
import { first, moveFor, rows } from '../core/roving';
|
|
5
5
|
/**
|
|
6
6
|
* A single-choice list with roving focus: one option is in the tab order, arrow keys, Home, and End
|
|
7
7
|
* move between the enabled ones, and Enter, Space, or a click chooses.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { For, Portal, Show } from '@solidjs/web';
|
|
2
2
|
import { createEffect, createSignal, createUniqueId, onFlush } from 'solid-js';
|
|
3
|
-
import { aria } from '
|
|
3
|
+
import { aria } from '../core/aria';
|
|
4
|
+
import { closeOnOutside, place } from '../core/layers';
|
|
5
|
+
import { first, moveFor, rows, typeahead } from '../core/roving';
|
|
4
6
|
import { Icon } from './Icon';
|
|
5
|
-
import { closeOnOutside, place } from './layers';
|
|
6
|
-
import { first, moveFor, rows, typeahead } from './roving';
|
|
7
7
|
/**
|
|
8
8
|
* A menu of actions. Arrow keys, Home, End, and a typed letter move between items; Enter or a click
|
|
9
9
|
* runs one. Escape, Tab, and a click elsewhere close it, and Escape and a choice return focus to the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal, Show } from '@solidjs/web';
|
|
2
2
|
import { createEffect, createSignal, createUniqueId } from 'solid-js';
|
|
3
|
-
import { aria } from '
|
|
4
|
-
import { closeOnOutside, place } from '
|
|
3
|
+
import { aria } from '../core/aria';
|
|
4
|
+
import { closeOnOutside, place } from '../core/layers';
|
|
5
5
|
/**
|
|
6
6
|
* Content that floats beside its trigger. A click on the trigger toggles it; Escape closes it and
|
|
7
7
|
* returns focus to the trigger, and a click elsewhere closes it and leaves focus where the click put it.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { For, Show } from '@solidjs/web';
|
|
2
|
-
import { aria } from '
|
|
2
|
+
import { aria } from '../core/aria';
|
|
3
|
+
import { first, moveFor, rows } from '../core/roving';
|
|
3
4
|
import { Icon } from './Icon';
|
|
4
|
-
import { first, moveFor, rows } from './roving';
|
|
5
5
|
/**
|
|
6
6
|
* A row of mutually exclusive options, as a radio group. The chosen option is the one tab stop, and
|
|
7
7
|
* arrow keys, Home, and End choose the next enabled option as they move.
|
|
@@ -2,7 +2,7 @@ import { createFocusTrap } from '@solid-primitives/focus';
|
|
|
2
2
|
import { createPresence } from '@solid-primitives/presence';
|
|
3
3
|
import { Show } from '@solidjs/web';
|
|
4
4
|
import { createEffect, createSignal, onSettled } from 'solid-js';
|
|
5
|
-
import { isTopDialog, pushDialog } from '
|
|
5
|
+
import { isTopDialog, pushDialog } from '../core/layers';
|
|
6
6
|
import { Resizer } from './Resizer';
|
|
7
7
|
const BREAKPOINT = 640;
|
|
8
8
|
/** How long the drawer takes to slide in or out, matching `--vds-drawer-duration`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { For } from '@solidjs/web';
|
|
2
2
|
import { createUniqueId } from 'solid-js';
|
|
3
|
-
import { aria } from '
|
|
4
|
-
import { moveFor, rows } from '
|
|
3
|
+
import { aria } from '../core/aria';
|
|
4
|
+
import { moveFor, rows } from '../core/roving';
|
|
5
5
|
/** A row of tabs over one panel. Arrow keys, Home, and End move between tabs and select as they go. */
|
|
6
6
|
export function Tabs(props) {
|
|
7
7
|
const id = createUniqueId();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Show } from '@solidjs/web';
|
|
2
2
|
import { createSignal, createUniqueId } from 'solid-js';
|
|
3
|
-
import { aria } from '
|
|
3
|
+
import { aria } from '../core/aria';
|
|
4
4
|
/**
|
|
5
5
|
* A labelled text input with a hint and an error read along with it. Typing goes to a draft that
|
|
6
6
|
* follows `value` whenever the caller changes it, so typed text survives any other prop changing.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Show } from '@solidjs/web';
|
|
2
2
|
import { onSettled } from 'solid-js';
|
|
3
|
-
import { moveFor } from '
|
|
3
|
+
import { moveFor } from '../core/roving';
|
|
4
4
|
const CONTROLS = 'button, a[href], input, select, textarea, [role="button"], [role="switch"]';
|
|
5
5
|
/** Fields whose arrow keys move within them, which the toolbar leaves alone. */
|
|
6
6
|
const TEXT_ENTRY = 'input:not([type="button"], [type="checkbox"], [type="radio"]), textarea, select';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Portal, Show } from '@solidjs/web';
|
|
2
2
|
import { createEffect, createSignal, createUniqueId, onSettled } from 'solid-js';
|
|
3
|
-
import { place } from '
|
|
3
|
+
import { place } from '../core/layers';
|
|
4
4
|
/** How long the pointer rests on a trigger before its tooltip shows. Keyboard focus shows it at once. */
|
|
5
5
|
const HOVER_DELAY_MS = 500;
|
|
6
6
|
/** A short label shown on hover or keyboard focus, and hidden on Escape. */
|
|
@@ -2,11 +2,18 @@ import { type JSX } from '@solidjs/web';
|
|
|
2
2
|
import { type IconName } from './Icon';
|
|
3
3
|
export type TreeNode = {
|
|
4
4
|
children?: TreeNode[];
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* At the row's end in muted text, such as a count.
|
|
7
|
+
* Several children stack, end-aligned, such as a time over an icon.
|
|
8
|
+
*/
|
|
6
9
|
end?: JSX.Element;
|
|
7
10
|
icon?: IconName;
|
|
8
11
|
id: string;
|
|
9
12
|
label: string;
|
|
13
|
+
/** A second line under the label, such as where a chat runs. It joins the row's name, after the label. */
|
|
14
|
+
meta?: JSX.Element;
|
|
15
|
+
/** Sets the label, and the end's first child, strong in the text colour, and describes the row as Unread. */
|
|
16
|
+
unread?: boolean;
|
|
10
17
|
};
|
|
11
18
|
export type TreeProps = {
|
|
12
19
|
/** Buttons at the row's end, shown on hover and focus, and always on a touch screen. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { For, Show } from '@solidjs/web';
|
|
2
2
|
import { createMemo, createSignal, createUniqueId } from 'solid-js';
|
|
3
|
-
import { aria } from '
|
|
3
|
+
import { aria } from '../core/aria';
|
|
4
|
+
import { moveFor, typeahead } from '../core/roving';
|
|
4
5
|
import { Icon } from './Icon';
|
|
5
|
-
import { moveFor, typeahead } from './roving';
|
|
6
6
|
/**
|
|
7
7
|
* Navigation as a WAI-ARIA tree. Up and Down move through the visible rows, Right opens a folder or enters it, Left
|
|
8
8
|
* closes one or goes to its parent, Home and End reach either end, and a letter moves to the next row starting with it.
|
|
@@ -76,17 +76,23 @@ export function Tree(props) {
|
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
78
|
* A treeitem is the row alone, and owns its children's group through `aria-owns`, so its name and its
|
|
79
|
-
* visible text stay the row's own.
|
|
79
|
+
* visible text stay the row's own.
|
|
80
|
+
* A meta line and a count join the name after a space, which the text has too.
|
|
80
81
|
*/
|
|
81
82
|
const Row = (rowProps) => {
|
|
82
83
|
const itemId = () => rowId(rowProps.node.id);
|
|
83
84
|
const folder = () => Boolean(rowProps.node.children?.length);
|
|
85
|
+
const labelledBy = () => [
|
|
86
|
+
`${itemId()}-label`,
|
|
87
|
+
rowProps.node.meta && `${itemId()}-meta`,
|
|
88
|
+
rowProps.node.end && `${itemId()}-end`,
|
|
89
|
+
]
|
|
90
|
+
.filter(Boolean)
|
|
91
|
+
.join(' ');
|
|
84
92
|
return (<>
|
|
85
93
|
{/* biome-ignore lint/a11y/useFocusableInteractive: tabindex is set below, as the tree's roving tab stop. */}
|
|
86
94
|
{/* biome-ignore lint/a11y/useKeyWithClickEvents: the tree's own keydown handles Enter and the arrows. */}
|
|
87
|
-
<div id={itemId()} class='vds-tree__item' role='treeitem' aria-labelledby={rowProps.node.
|
|
88
|
-
? `${itemId()}-label ${itemId()}-end`
|
|
89
|
-
: `${itemId()}-label`} aria-level={rowProps.level} aria-expanded={folder() ? aria(open(rowProps.node)) : undefined} aria-owns={open(rowProps.node) ? `${itemId()}-group` : undefined} aria-current={rowProps.node.id === props.current ? 'page' : undefined} tabindex={stop() === rowProps.node.id ? '0' : '-1'} style={{ '--vds-tree-depth': rowProps.level - 1 }} onFocus={() => setFocused(rowProps.node.id)} onClick={() => {
|
|
95
|
+
<div id={itemId()} class='vds-tree__item' role='treeitem' aria-labelledby={labelledBy()} aria-describedby={rowProps.node.unread ? `${itemId()}-unread` : undefined} aria-level={rowProps.level} aria-expanded={folder() ? aria(open(rowProps.node)) : undefined} aria-owns={open(rowProps.node) ? `${itemId()}-group` : undefined} aria-current={rowProps.node.id === props.current ? 'page' : undefined} data-unread={rowProps.node.unread ? '' : undefined} tabindex={stop() === rowProps.node.id ? '0' : '-1'} style={{ '--vds-tree-depth': rowProps.level - 1 }} onFocus={() => setFocused(rowProps.node.id)} onClick={() => {
|
|
90
96
|
focus(rowProps.node.id);
|
|
91
97
|
props.onOpen(rowProps.node);
|
|
92
98
|
}}>
|
|
@@ -101,9 +107,22 @@ export function Tree(props) {
|
|
|
101
107
|
<Show when={rowProps.node.icon}>
|
|
102
108
|
{(name) => <Icon name={name()} class='vds-tree__icon'/>}
|
|
103
109
|
</Show>
|
|
104
|
-
<span
|
|
105
|
-
{
|
|
110
|
+
<span class='vds-tree__text'>
|
|
111
|
+
<span id={`${itemId()}-label`} class='vds-tree__label'>
|
|
112
|
+
{rowProps.node.label}
|
|
113
|
+
</span>
|
|
114
|
+
<Show when={rowProps.node.meta}>
|
|
115
|
+
{' '}
|
|
116
|
+
<span id={`${itemId()}-meta`} class='vds-tree__meta'>
|
|
117
|
+
{rowProps.node.meta}
|
|
118
|
+
</span>
|
|
119
|
+
</Show>
|
|
106
120
|
</span>
|
|
121
|
+
<Show when={rowProps.node.unread}>
|
|
122
|
+
<span id={`${itemId()}-unread`} hidden>
|
|
123
|
+
Unread
|
|
124
|
+
</span>
|
|
125
|
+
</Show>
|
|
107
126
|
<Show when={rowProps.node.end}>
|
|
108
127
|
{' '}
|
|
109
128
|
<span id={`${itemId()}-end`} class='vds-tree__end'>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { aria } from '../core/aria';
|
|
1
2
|
export { AppShell, type AppShellProps } from './AppShell';
|
|
2
3
|
export { type App, AppMark, AppSwitcher, type AppSwitcherProps } from './AppSwitcher';
|
|
3
|
-
export { aria } from './aria';
|
|
4
4
|
export { Badge, type BadgeProps } from './Badge';
|
|
5
5
|
export { Button, type ButtonProps } from './Button';
|
|
6
6
|
export { Checkbox, type CheckboxProps } from './Checkbox';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { aria } from '../core/aria';
|
|
1
2
|
export { AppShell } from './AppShell';
|
|
2
3
|
export { AppMark, AppSwitcher } from './AppSwitcher';
|
|
3
|
-
export { aria } from './aria';
|
|
4
4
|
export { Badge } from './Badge';
|
|
5
5
|
export { Button } from './Button';
|
|
6
6
|
export { Checkbox } from './Checkbox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/styles.css
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@import "./object-card.css";
|
|
11
11
|
@import "./palette.css";
|
|
12
12
|
@import "./popover.css";
|
|
13
|
+
@import "./search.css";
|
|
13
14
|
@import "./setting.css";
|
|
14
15
|
@import "./shell.css";
|
|
15
16
|
@import "./small.css";
|
|
@@ -18,3 +19,4 @@
|
|
|
18
19
|
@import "./toolbar.css";
|
|
19
20
|
@import "./tooltip.css";
|
|
20
21
|
@import "./tree.css";
|
|
22
|
+
@import "./update.css";
|
package/dist/toolbar.css
CHANGED
|
@@ -44,3 +44,11 @@
|
|
|
44
44
|
color: var(--muted);
|
|
45
45
|
font-size: var(--font-sm);
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
/* A design may draw buttons under --hit-min, so neighbours stand far enough apart for each touch area. */
|
|
49
|
+
@media (pointer: coarse) {
|
|
50
|
+
.vds-toolbar__leading,
|
|
51
|
+
.vds-toolbar__actions {
|
|
52
|
+
gap: max(var(--space-1), calc(var(--hit-min) - var(--control-height)));
|
|
53
|
+
}
|
|
54
|
+
}
|
package/dist/tree.css
CHANGED
|
@@ -46,16 +46,50 @@
|
|
|
46
46
|
color: var(--muted);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.vds-
|
|
49
|
+
.vds-tree__text {
|
|
50
|
+
display: flex;
|
|
50
51
|
flex: 1;
|
|
52
|
+
flex-direction: column;
|
|
51
53
|
min-width: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vds-tree__label,
|
|
57
|
+
.vds-tree__meta {
|
|
52
58
|
overflow: hidden;
|
|
53
59
|
text-overflow: ellipsis;
|
|
54
60
|
white-space: nowrap;
|
|
55
61
|
}
|
|
56
62
|
|
|
63
|
+
.vds-tree__meta {
|
|
64
|
+
color: var(--muted);
|
|
65
|
+
font-size: var(--font-xs);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vds-tree__meta > .vds-icon {
|
|
69
|
+
margin-right: var(--space-1);
|
|
70
|
+
vertical-align: -0.2em;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Two lines can outgrow the row height, so they get room above and below. */
|
|
74
|
+
.vds-tree__item:has(.vds-tree__meta) {
|
|
75
|
+
padding-block: var(--space-1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vds-tree__item[data-unread] .vds-tree__label {
|
|
79
|
+
font-weight: var(--weight-strong);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.vds-tree__item[data-unread] .vds-tree__end > :first-child {
|
|
83
|
+
color: var(--text);
|
|
84
|
+
font-weight: var(--weight-strong);
|
|
85
|
+
}
|
|
86
|
+
|
|
57
87
|
.vds-tree__end {
|
|
88
|
+
display: flex;
|
|
58
89
|
flex: none;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: flex-end;
|
|
92
|
+
gap: var(--space-1);
|
|
59
93
|
color: var(--muted);
|
|
60
94
|
font-size: var(--font-xs);
|
|
61
95
|
font-variant-numeric: tabular-nums;
|
|
@@ -82,8 +116,11 @@
|
|
|
82
116
|
}
|
|
83
117
|
|
|
84
118
|
@media (pointer: coarse) {
|
|
119
|
+
/* Each button's touch area keeps clear of its neighbour's and of the scrolling sidebar's edge, which clips it. */
|
|
85
120
|
.vds-tree__actions {
|
|
86
121
|
display: inline-flex;
|
|
122
|
+
gap: max(var(--space-1), calc(var(--hit-min) - var(--control-height-sm)));
|
|
123
|
+
margin-right: 0;
|
|
87
124
|
}
|
|
88
125
|
|
|
89
126
|
.vds-tree__item:has(> .vds-tree__actions) > .vds-tree__end {
|
package/dist/update.css
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The update card, drawn from @vieo-io/tokens. An app puts it under its own bar with --vieo-update-notice-top.
|
|
3
|
+
* Each rule names the card, so an app's own button and link styles do not change it.
|
|
4
|
+
*/
|
|
5
|
+
.vieo-update-notice {
|
|
6
|
+
position: fixed;
|
|
7
|
+
right: 16px;
|
|
8
|
+
top: var(--vieo-update-notice-top, calc(max(10px, env(safe-area-inset-top)) + 54px));
|
|
9
|
+
z-index: 41;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 12px;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
max-width: min(640px, calc(100vw - 32px));
|
|
15
|
+
padding: 10px 12px 10px 16px;
|
|
16
|
+
border: 1px solid var(--border);
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
background: var(--raised);
|
|
19
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
|
|
20
|
+
color: var(--text);
|
|
21
|
+
font-family: var(--font-family-ui);
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vieo-update-notice[hidden] {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vieo-update-notice a {
|
|
31
|
+
color: inherit;
|
|
32
|
+
text-decoration: inherit;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* A long reason, such as a package's address, breaks where it must rather than pushing the buttons off the card. */
|
|
36
|
+
.vieo-update-notice > span {
|
|
37
|
+
min-width: 0;
|
|
38
|
+
overflow-wrap: anywhere;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* On a narrow screen the text wraps and the link and the button stay whole. */
|
|
42
|
+
.vieo-update-notice a,
|
|
43
|
+
.vieo-update-notice .vieo-update-action {
|
|
44
|
+
flex: none;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.vieo-update-notice .vieo-update-action {
|
|
49
|
+
min-height: 32px;
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 6px 12px;
|
|
52
|
+
border: 1px solid var(--accent);
|
|
53
|
+
border-radius: 8px;
|
|
54
|
+
background: var(--accent);
|
|
55
|
+
color: var(--accent-ink);
|
|
56
|
+
font: inherit;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.vieo-update-notice .vieo-update-action:active {
|
|
62
|
+
transform: translateY(1px);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vieo-update-notice .vieo-update-not-now {
|
|
66
|
+
display: inline-grid;
|
|
67
|
+
flex: none;
|
|
68
|
+
place-items: center;
|
|
69
|
+
width: 28px;
|
|
70
|
+
height: 28px;
|
|
71
|
+
min-height: 0;
|
|
72
|
+
margin: 0;
|
|
73
|
+
padding: 0;
|
|
74
|
+
border: 1px solid transparent;
|
|
75
|
+
border-radius: 7px;
|
|
76
|
+
background: transparent;
|
|
77
|
+
color: var(--muted);
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vieo-update-notice .vieo-update-not-now:hover {
|
|
82
|
+
background: var(--bg-hover);
|
|
83
|
+
color: var(--text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.vieo-update-notice .vieo-update-not-now:focus-visible {
|
|
87
|
+
outline: 2px solid var(--accent);
|
|
88
|
+
outline-offset: 1px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.vieo-update-notice .vieo-update-not-now svg {
|
|
92
|
+
width: 16px;
|
|
93
|
+
height: 16px;
|
|
94
|
+
fill: none;
|
|
95
|
+
stroke: currentColor;
|
|
96
|
+
stroke-width: 2;
|
|
97
|
+
stroke-linecap: round;
|
|
98
|
+
stroke-linejoin: round;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@media (pointer: coarse) {
|
|
102
|
+
.vieo-update-notice .vieo-update-action {
|
|
103
|
+
min-height: 40px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.vieo-update-notice .vieo-update-not-now {
|
|
107
|
+
width: 32px;
|
|
108
|
+
height: 32px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (max-width: 700px) {
|
|
113
|
+
.vieo-update-notice {
|
|
114
|
+
left: 8px;
|
|
115
|
+
right: 8px;
|
|
116
|
+
max-width: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vieo-io/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Vieo's components
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Vieo's components: a framework-free core with Solid and React bindings, styled by @vieo-io/tokens",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -18,16 +18,40 @@
|
|
|
18
18
|
],
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"solid": "./dist/index.js"
|
|
21
|
+
"types": "./dist/solid/index.d.ts",
|
|
22
|
+
"solid": "./dist/solid/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./solid": {
|
|
25
|
+
"types": "./dist/solid/index.d.ts",
|
|
26
|
+
"solid": "./dist/solid/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./core": {
|
|
29
|
+
"types": "./dist/core/index.d.ts",
|
|
30
|
+
"default": "./dist/core/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./react": {
|
|
33
|
+
"types": "./dist/react/index.d.ts",
|
|
34
|
+
"default": "./dist/react/index.js"
|
|
23
35
|
},
|
|
24
36
|
"./styles.css": "./dist/styles.css"
|
|
25
37
|
},
|
|
26
38
|
"peerDependencies": {
|
|
27
39
|
"@solidjs/web": "^2.0.3",
|
|
28
|
-
"@vieo-io/tokens": "
|
|
40
|
+
"@vieo-io/tokens": ">=0.2.0 <0.4.0",
|
|
41
|
+
"react": "^18.3 || ^19",
|
|
29
42
|
"solid-js": "^2.0.3"
|
|
30
43
|
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"@solidjs/web": {
|
|
46
|
+
"optional": true
|
|
47
|
+
},
|
|
48
|
+
"react": {
|
|
49
|
+
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"solid-js": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
31
55
|
"dependencies": {
|
|
32
56
|
"@floating-ui/dom": "1.8.0",
|
|
33
57
|
"@solid-primitives/focus": "1.0.0",
|
|
@@ -39,17 +63,24 @@
|
|
|
39
63
|
"@solidjs/testing-library": "1.0.0-rc.2",
|
|
40
64
|
"@solidjs/vite-plugin": "3.0.1",
|
|
41
65
|
"@solidjs/web": "2.0.3",
|
|
66
|
+
"@testing-library/dom": "10.4.2",
|
|
67
|
+
"@testing-library/react": "16.3.3",
|
|
68
|
+
"@types/react": "19.3.0",
|
|
69
|
+
"@types/react-dom": "19.3.0",
|
|
70
|
+
"@vitejs/plugin-react": "6.1.2",
|
|
42
71
|
"jsdom": "31.0.1",
|
|
72
|
+
"react": "19.3.1",
|
|
73
|
+
"react-dom": "19.3.1",
|
|
43
74
|
"solid-js": "2.0.3",
|
|
44
75
|
"vite": "8.3.8",
|
|
45
76
|
"vitest": "5.1.1",
|
|
46
|
-
"@vieo-io/tokens": "0.
|
|
77
|
+
"@vieo-io/tokens": "0.3.0"
|
|
47
78
|
},
|
|
48
79
|
"sideEffects": [
|
|
49
80
|
"**/*.css"
|
|
50
81
|
],
|
|
51
82
|
"scripts": {
|
|
52
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/*.css dist/",
|
|
53
|
-
"test": "vitest run && tsc --noEmit -p ."
|
|
83
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && tsc -p tsconfig.react.build.json && cp src/*.css dist/",
|
|
84
|
+
"test": "vitest run && tsc --noEmit -p . && tsc --noEmit -p tsconfig.react.json"
|
|
54
85
|
}
|
|
55
86
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|