@zylem/ui 0.1.0 → 0.2.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.
Files changed (78) hide show
  1. package/dist/chunk-VGOOWBSO.js +1 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.d.ts +75 -2
  4. package/dist/index.js +1 -1
  5. package/dist/styles.css +1 -1
  6. package/dist/styles.js +1 -1
  7. package/package.json +13 -11
  8. package/src/components/Accordion/Accordion.tsx +60 -0
  9. package/src/components/Badge/Badge.css.ts +52 -0
  10. package/src/components/Badge/Badge.tsx +23 -0
  11. package/src/components/Button/Button.css.ts +127 -0
  12. package/src/components/Button/Button.tsx +34 -0
  13. package/src/components/Card/Card.css.ts +62 -0
  14. package/src/components/Card/Card.tsx +54 -0
  15. package/src/{global/checkbox.css.ts → components/Checkbox/Checkbox.css.ts} +23 -23
  16. package/src/components/Checkbox/Checkbox.tsx +41 -0
  17. package/src/components/Console/Console.css.ts +67 -0
  18. package/src/components/Console/Console.tsx +51 -0
  19. package/src/components/Dialog/Dialog.css.ts +86 -0
  20. package/src/components/Dialog/Dialog.tsx +89 -0
  21. package/src/components/DropdownMenu/DropdownMenu.css.ts +76 -0
  22. package/src/components/DropdownMenu/DropdownMenu.tsx +63 -0
  23. package/src/components/EmptyState/EmptyState.css.ts +29 -0
  24. package/src/components/EmptyState/EmptyState.tsx +32 -0
  25. package/src/components/Kbd/Kbd.css.ts +27 -0
  26. package/src/components/Kbd/Kbd.tsx +17 -0
  27. package/src/components/NumberField/NumberField.css.ts +47 -0
  28. package/src/components/NumberField/NumberField.tsx +66 -0
  29. package/src/components/Panel/Panel.css.ts +88 -0
  30. package/src/components/Panel/Panel.tsx +66 -0
  31. package/src/components/Progress/Progress.css.ts +51 -0
  32. package/src/components/Progress/Progress.tsx +43 -0
  33. package/src/components/Property/Property.css.ts +70 -0
  34. package/src/components/Property/Property.tsx +118 -0
  35. package/src/components/ScrollArea/ScrollArea.tsx +41 -0
  36. package/src/components/SearchInput/SearchInput.css.ts +25 -0
  37. package/src/components/SearchInput/SearchInput.tsx +31 -0
  38. package/src/components/Select/Select.css.ts +93 -0
  39. package/src/components/Select/Select.tsx +68 -0
  40. package/src/components/Separator/Separator.css.ts +22 -0
  41. package/src/components/Separator/Separator.tsx +18 -0
  42. package/src/components/Sidebar/Sidebar.css.ts +79 -0
  43. package/src/components/Sidebar/Sidebar.tsx +69 -0
  44. package/src/components/Slider/Slider.css.ts +91 -0
  45. package/src/components/Slider/Slider.tsx +51 -0
  46. package/src/components/Switch/Switch.css.ts +72 -0
  47. package/src/components/Switch/Switch.tsx +36 -0
  48. package/src/components/Tabs/Tabs.css.ts +70 -0
  49. package/src/components/Tabs/Tabs.tsx +79 -0
  50. package/src/components/TextField/TextField.css.ts +16 -0
  51. package/src/components/TextField/TextField.tsx +76 -0
  52. package/src/components/TitleBar/TitleBar.css.ts +46 -0
  53. package/src/components/TitleBar/TitleBar.tsx +60 -0
  54. package/src/components/Toolbar/Toolbar.css.ts +29 -0
  55. package/src/components/Toolbar/Toolbar.tsx +30 -0
  56. package/src/components/ToolbarButton/ToolbarButton.css.ts +67 -0
  57. package/src/components/ToolbarButton/ToolbarButton.tsx +42 -0
  58. package/src/components/Tooltip/Tooltip.css.ts +35 -0
  59. package/src/components/Tooltip/Tooltip.tsx +33 -0
  60. package/src/components/WindowControls/WindowControls.css.ts +59 -0
  61. package/src/components/WindowControls/WindowControls.tsx +51 -0
  62. package/src/components/index.ts +67 -6
  63. package/src/components/shared/field.css.ts +60 -0
  64. package/src/global/accordion.css.ts +32 -18
  65. package/src/global/common.css.ts +14 -17
  66. package/src/global/detached-panel.css.ts +31 -8
  67. package/src/global/editor-base.css.ts +96 -121
  68. package/src/global/entities.css.ts +19 -15
  69. package/src/global/hyperglass-base.css.ts +166 -0
  70. package/src/global/menu.css.ts +8 -3
  71. package/src/sprinkles.css.ts +22 -0
  72. package/src/styles.ts +32 -4
  73. package/src/theme.css.ts +190 -99
  74. package/dist/chunk-3R5KFBTB.js +0 -1
  75. package/src/components/Button.tsx +0 -19
  76. package/src/global/console.css.ts +0 -43
  77. package/src/global/sidebar.css.ts +0 -18
  78. package/src/global/toolbar.css.ts +0 -62
@@ -0,0 +1,60 @@
1
+ import { Show, splitProps } from 'solid-js';
2
+ import type { JSX } from 'solid-js';
3
+ import { WindowControls, type WindowControlsProps } from '../WindowControls/WindowControls';
4
+
5
+ export interface TitleBarProps
6
+ extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'title' | 'onClose'>,
7
+ WindowControlsProps {
8
+ title?: JSX.Element;
9
+ /** Smaller 32px bar for panel headers. */
10
+ compact?: boolean;
11
+ /** Show grab cursor for draggable bars. */
12
+ draggable?: boolean;
13
+ /** Extra content placed between the title and window controls. */
14
+ children?: JSX.Element;
15
+ }
16
+
17
+ /**
18
+ * HyperGlass title bar: glossy molded glass strip with a title, optional
19
+ * extra chrome, and shared glass window controls.
20
+ */
21
+ export function TitleBar(props: TitleBarProps) {
22
+ const [local, rest] = splitProps(props, [
23
+ 'title',
24
+ 'compact',
25
+ 'draggable',
26
+ 'children',
27
+ 'onClose',
28
+ 'onCollapse',
29
+ 'collapsed',
30
+ 'closeLabel',
31
+ 'closeTestId',
32
+ 'class',
33
+ ]);
34
+
35
+ const classes = () =>
36
+ [
37
+ 'zylem-titlebar',
38
+ local.compact ? 'zylem-titlebar--compact' : '',
39
+ local.draggable ? 'zylem-titlebar--draggable' : '',
40
+ local.class ?? '',
41
+ ]
42
+ .filter(Boolean)
43
+ .join(' ');
44
+
45
+ return (
46
+ <div class={classes()} {...rest}>
47
+ <Show when={local.title}>
48
+ <span class="zylem-titlebar-title">{local.title}</span>
49
+ </Show>
50
+ {local.children}
51
+ <WindowControls
52
+ onClose={local.onClose}
53
+ onCollapse={local.onCollapse}
54
+ collapsed={local.collapsed}
55
+ closeLabel={local.closeLabel}
56
+ closeTestId={local.closeTestId}
57
+ />
58
+ </div>
59
+ );
60
+ }
@@ -0,0 +1,29 @@
1
+ import { globalStyle } from '@vanilla-extract/css';
2
+ import { vars } from '../../theme.css';
3
+
4
+ /**
5
+ * Molded command strip: a glossy horizontal rail that toolbar buttons sit in.
6
+ * Owns the `.zylem-toolbar` class used by the editor.
7
+ */
8
+ globalStyle('.zylem-toolbar', {
9
+ boxSizing: 'border-box',
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ gap: vars.spacing.sm,
13
+ padding: vars.spacing.sm,
14
+ borderRadius: vars.radii.control,
15
+ border: '1px solid rgba(97, 166, 232, 0.3)',
16
+ background:
17
+ 'linear-gradient(180deg, rgba(130, 180, 230, 0.2), rgba(30, 60, 95, 0.28) 50%, rgba(8, 22, 38, 0.4))',
18
+ boxShadow:
19
+ 'inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.35)',
20
+ });
21
+
22
+ globalStyle('.zylem-toolbar--vertical', {
23
+ flexDirection: 'column',
24
+ });
25
+
26
+ // Legacy hook: editor uses `.zylem-toolbar.separator` for a bottom rule.
27
+ globalStyle('.zylem-toolbar.separator', {
28
+ borderBottom: '1px solid rgba(97, 166, 232, 0.4)',
29
+ });
@@ -0,0 +1,30 @@
1
+ import { splitProps } from 'solid-js';
2
+ import type { JSX } from 'solid-js';
3
+
4
+ export interface ToolbarProps extends JSX.HTMLAttributes<HTMLDivElement> {
5
+ orientation?: 'horizontal' | 'vertical';
6
+ children?: JSX.Element;
7
+ }
8
+
9
+ /**
10
+ * HyperGlass toolbar: molded glass command strip. Compose with
11
+ * `ToolbarButton` (and `Separator orientation="vertical"` between groups).
12
+ */
13
+ export function Toolbar(props: ToolbarProps) {
14
+ const [local, rest] = splitProps(props, ['orientation', 'children', 'class']);
15
+
16
+ const classes = () =>
17
+ [
18
+ 'zylem-toolbar',
19
+ local.orientation === 'vertical' ? 'zylem-toolbar--vertical' : '',
20
+ local.class ?? '',
21
+ ]
22
+ .filter(Boolean)
23
+ .join(' ');
24
+
25
+ return (
26
+ <div role="toolbar" class={classes()} {...rest}>
27
+ {local.children}
28
+ </div>
29
+ );
30
+ }
@@ -0,0 +1,67 @@
1
+ import { globalStyle } from '@vanilla-extract/css';
2
+ import { vars } from '../../theme.css';
3
+
4
+ /**
5
+ * Square glass icon button for toolbars — owns the `.zylem-toolbar-btn`
6
+ * class the editor already uses. Selected state uses the live-green jewel
7
+ * treatment.
8
+ */
9
+ globalStyle('.zylem-toolbar-btn', {
10
+ boxSizing: 'border-box',
11
+ display: 'inline-flex',
12
+ alignItems: 'center',
13
+ justifyContent: 'center',
14
+ gap: vars.spacing.xs,
15
+ minWidth: '34px',
16
+ height: '34px',
17
+ padding: `0 ${vars.spacing.sm}`,
18
+ fontFamily: vars.typography.fontFamily,
19
+ fontSize: `calc(${vars.typography.fontSize} - 1px)`,
20
+ fontWeight: 600,
21
+ whiteSpace: 'nowrap',
22
+ textShadow: '0 1px 1px rgba(0,0,0,0.6)',
23
+ cursor: 'pointer',
24
+ borderRadius: vars.radii.control,
25
+ border: '1px solid rgba(150, 210, 255, 0.5)',
26
+ background: vars.material.buttonGlass,
27
+ boxShadow: vars.effects.shadowButton,
28
+ color: '#E8F4FF',
29
+ transition: `transform ${vars.motion.fast} ${vars.motion.easeOut}, box-shadow ${vars.motion.fast} ${vars.motion.easeOut}, filter ${vars.motion.fast} ${vars.motion.easeOut}, background ${vars.motion.fast} ${vars.motion.easeOut}`,
30
+ });
31
+
32
+ globalStyle('.zylem-toolbar-btn:hover', {
33
+ background: vars.material.buttonGlassHover,
34
+ boxShadow: `${vars.effects.shadowButton}, ${vars.effects.glowPrimary}`,
35
+ transform: 'translateY(-1px)',
36
+ });
37
+
38
+ globalStyle('.zylem-toolbar-btn:active', {
39
+ transform: 'translateY(1px)',
40
+ filter: 'brightness(0.92)',
41
+ // CodePen-inspired press: compressed drop shadow + bright bottom rim flash.
42
+ boxShadow:
43
+ 'inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(255,255,255,0.55), inset 0 2px 3px rgba(0,0,0,0.28), 0 1px 3px rgba(0,0,0,0.28)',
44
+ });
45
+
46
+ globalStyle('.zylem-toolbar-btn:focus-visible', {
47
+ outline: 'none',
48
+ boxShadow: `${vars.effects.shadowButton}, ${vars.effects.focusRing}`,
49
+ });
50
+
51
+ globalStyle('.zylem-toolbar-btn[data-selected], .zylem-toolbar-btn.selected', {
52
+ borderColor: 'rgba(20, 255, 60, 0.78)',
53
+ background: vars.material.buttonGlassActive,
54
+ boxShadow: `${vars.effects.shadowButton}, ${vars.effects.glowActive}`,
55
+ });
56
+
57
+ globalStyle('.zylem-toolbar-btn[disabled]', {
58
+ opacity: 0.45,
59
+ cursor: 'not-allowed',
60
+ });
61
+
62
+ globalStyle('.zylem-toolbar-btn svg', {
63
+ width: '18px',
64
+ height: '18px',
65
+ stroke: 'currentColor',
66
+ filter: 'drop-shadow(0 1px 1px rgba(0,0,0,0.55))',
67
+ });
@@ -0,0 +1,42 @@
1
+ import { Button as KButton, Tooltip as KTooltip } from '@kobalte/core';
2
+ import type { JSX } from 'solid-js';
3
+
4
+ export interface ToolbarButtonProps {
5
+ label: string;
6
+ onClick?: (event: MouseEvent) => void;
7
+ selected?: boolean;
8
+ disabled?: boolean;
9
+ children: JSX.Element;
10
+ class?: string;
11
+ }
12
+
13
+ /**
14
+ * HyperGlass toolbar button: square glass icon button with a tooltip.
15
+ * Selected state renders as a live-green jewel.
16
+ */
17
+ export function ToolbarButton(props: ToolbarButtonProps) {
18
+ return (
19
+ <KTooltip.Root openDelay={400}>
20
+ <KTooltip.Trigger as="span">
21
+ <KButton.Root
22
+ aria-label={props.label}
23
+ onClick={props.onClick}
24
+ disabled={props.disabled}
25
+ class={
26
+ props.class
27
+ ? `zylem-toolbar-btn ${props.class}`
28
+ : 'zylem-toolbar-btn'
29
+ }
30
+ data-selected={props.selected ? '' : undefined}
31
+ >
32
+ {props.children}
33
+ </KButton.Root>
34
+ </KTooltip.Trigger>
35
+ <KTooltip.Portal>
36
+ <KTooltip.Content class="zylem-tooltip">
37
+ {props.label}
38
+ </KTooltip.Content>
39
+ </KTooltip.Portal>
40
+ </KTooltip.Root>
41
+ );
42
+ }
@@ -0,0 +1,35 @@
1
+ import { globalStyle, keyframes } from '@vanilla-extract/css';
2
+ import { vars } from '../../theme.css';
3
+
4
+ const enter = keyframes({
5
+ from: { opacity: 0, transform: 'translateY(4px)' },
6
+ to: { opacity: 1, transform: 'translateY(0)' },
7
+ });
8
+
9
+ globalStyle('.zylem-tooltip', {
10
+ position: 'relative',
11
+ zIndex: 10050,
12
+ maxWidth: '260px',
13
+ padding: `${vars.spacing.xs} ${vars.spacing.sm}`,
14
+ borderRadius: vars.radii.control,
15
+ border: '1px solid rgba(97, 166, 232, 0.45)',
16
+ background: vars.material.glassPanelDark,
17
+ boxShadow:
18
+ '0 8px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12)',
19
+ backdropFilter: `blur(${vars.effects.blurSm}) saturate(1.15)`,
20
+ color: vars.colors.text,
21
+ fontFamily: vars.typography.fontFamily,
22
+ fontSize: `calc(${vars.typography.fontSize} - 1px)`,
23
+ fontWeight: 600,
24
+ letterSpacing: '0.02em',
25
+ pointerEvents: 'none',
26
+ '@supports': {
27
+ 'not (backdrop-filter: blur(1px))': {
28
+ background: vars.colors.surface,
29
+ },
30
+ },
31
+ });
32
+
33
+ globalStyle('.zylem-tooltip[data-enter]', {
34
+ animation: `${enter} 0.15s ${vars.motion.easeOut}`,
35
+ });
@@ -0,0 +1,33 @@
1
+ import { Tooltip as KTooltip } from '@kobalte/core';
2
+ import type { JSX } from 'solid-js';
3
+
4
+ export interface TooltipProps {
5
+ /** Tooltip body. */
6
+ content: JSX.Element;
7
+ /** Trigger element(s). */
8
+ children: JSX.Element;
9
+ placement?: 'top' | 'bottom' | 'left' | 'right';
10
+ openDelay?: number;
11
+ }
12
+
13
+ /**
14
+ * HyperGlass tooltip: small floating glass sheet, portaled above page chrome
15
+ * so it is not trapped by local stacking contexts (grids, panels, etc.).
16
+ */
17
+ export function Tooltip(props: TooltipProps) {
18
+ return (
19
+ <KTooltip.Root placement={props.placement} openDelay={props.openDelay ?? 400}>
20
+ <KTooltip.Trigger
21
+ as="span"
22
+ style={{ display: 'flex', width: '100%', height: '100%', 'min-width': 0 }}
23
+ >
24
+ {props.children}
25
+ </KTooltip.Trigger>
26
+ <KTooltip.Portal>
27
+ <KTooltip.Content class="zylem-tooltip">
28
+ {props.content}
29
+ </KTooltip.Content>
30
+ </KTooltip.Portal>
31
+ </KTooltip.Root>
32
+ );
33
+ }
@@ -0,0 +1,59 @@
1
+ import { globalStyle } from '@vanilla-extract/css';
2
+ import { vars } from '../../theme.css';
3
+
4
+ globalStyle('.zylem-window-controls', {
5
+ display: 'flex',
6
+ alignItems: 'center',
7
+ gap: '7px',
8
+ });
9
+
10
+ /**
11
+ * Shared glass icon button used for all panel chrome: window controls,
12
+ * floating panels, and detached panels. `.floating-panel-button` is kept as
13
+ * an alias so existing panel markup shares this single definition.
14
+ */
15
+ globalStyle('.zylem-window-control, .floating-panel-button', {
16
+ all: 'unset',
17
+ boxSizing: 'border-box',
18
+ cursor: 'pointer',
19
+ minWidth: '18px',
20
+ height: '18px',
21
+ padding: '0 4px',
22
+ display: 'inline-flex',
23
+ alignItems: 'center',
24
+ justifyContent: 'center',
25
+ fontSize: '10px',
26
+ lineHeight: 1,
27
+ color: '#F4FAFF',
28
+ textShadow: '0 1px 1px rgba(0,0,0,0.6)',
29
+ borderRadius: vars.radii.control,
30
+ border: '1px solid rgba(255,255,255,0.38)',
31
+ background: vars.material.buttonGlass,
32
+ boxShadow:
33
+ 'inset 1px 1px 0 rgba(255,255,255,0.5), inset -1px -1px 0 rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.4)',
34
+ transition: `filter ${vars.motion.fast} ${vars.motion.easeOut}, transform ${vars.motion.fast} ${vars.motion.easeOut}, background ${vars.motion.fast} ${vars.motion.easeOut}, border-color ${vars.motion.fast} ${vars.motion.easeOut}`,
35
+ });
36
+
37
+ globalStyle('.zylem-window-control:hover, .floating-panel-button:hover', {
38
+ filter: 'brightness(1.2)',
39
+ transform: 'translateY(-1px)',
40
+ });
41
+
42
+ globalStyle('.zylem-window-control:active, .floating-panel-button:active', {
43
+ filter: 'brightness(0.9)',
44
+ transform: 'translateY(1px)',
45
+ });
46
+
47
+ globalStyle(
48
+ '.zylem-window-control:focus-visible, .floating-panel-button:focus-visible',
49
+ {
50
+ boxShadow: `inset 1px 1px 0 rgba(255,255,255,0.5), inset -1px -1px 0 rgba(0,0,0,0.4), ${vars.effects.focusRing}`,
51
+ },
52
+ );
53
+
54
+ /** Close is neutral glass at rest and only turns accent on hover. */
55
+ globalStyle('.zylem-window-control--close:hover', {
56
+ background: vars.colors.accent,
57
+ borderColor: 'rgba(255, 160, 150, 0.75)',
58
+ boxShadow: `inset 1px 1px 0 rgba(255,255,255,0.4), inset -1px -1px 0 rgba(0,0,0,0.4), ${vars.effects.glowDanger}`,
59
+ });
@@ -0,0 +1,51 @@
1
+ import { Show } from 'solid-js';
2
+ import PanelBottomClose from 'lucide-solid/icons/panel-bottom-close';
3
+ import PanelBottomOpen from 'lucide-solid/icons/panel-bottom-open';
4
+ import X from 'lucide-solid/icons/x';
5
+
6
+ export interface WindowControlsProps {
7
+ onClose?: () => void;
8
+ onCollapse?: () => void;
9
+ /** Show the "expand" collapse icon when the panel is collapsed. */
10
+ collapsed?: boolean;
11
+ /** Accessible label/title for the close button (default "Close panel"). */
12
+ closeLabel?: string;
13
+ /** Forwarded as data-testid on the close button. */
14
+ closeTestId?: string;
15
+ }
16
+
17
+ /**
18
+ * Shared glass window controls: the same icon buttons used by floating and
19
+ * detached panels. Only controls with a handler are rendered.
20
+ */
21
+ export function WindowControls(props: WindowControlsProps) {
22
+ return (
23
+ <Show when={props.onClose || props.onCollapse}>
24
+ <div class="zylem-window-controls" aria-label="Window controls">
25
+ <Show when={props.onCollapse}>
26
+ <button
27
+ type="button"
28
+ class="zylem-window-control zylem-window-control--collapse"
29
+ aria-label={props.collapsed ? 'Expand panel' : 'Collapse panel'}
30
+ title={props.collapsed ? 'Expand panel' : 'Collapse panel'}
31
+ onClick={() => props.onCollapse?.()}
32
+ >
33
+ {props.collapsed ? <PanelBottomOpen size={12} /> : <PanelBottomClose size={12} />}
34
+ </button>
35
+ </Show>
36
+ <Show when={props.onClose}>
37
+ <button
38
+ type="button"
39
+ class="zylem-window-control zylem-window-control--close"
40
+ aria-label={props.closeLabel ?? 'Close panel'}
41
+ title={props.closeLabel ?? 'Close panel'}
42
+ data-testid={props.closeTestId}
43
+ onClick={() => props.onClose?.()}
44
+ >
45
+ <X size={12} />
46
+ </button>
47
+ </Show>
48
+ </div>
49
+ </Show>
50
+ );
51
+ }
@@ -1,9 +1,70 @@
1
1
  /**
2
- * Solid component library surface for `@zylem/ui`.
2
+ * @zylem/ui component library HyperGlass Solid components.
3
3
  *
4
- * Exposed as source via the `./components` subpath export so consumers
5
- * (editor, showcase, zylem-creator) compile the Solid JSX with their own
6
- * bundler (vite-plugin-solid). Requires the `@zylem/ui/styles.css`
7
- * bundle (or the `src/styles` barrel in dev) to be loaded for styling.
4
+ * Behavior comes from Kobalte primitives where available; visuals come from
5
+ * vanilla-extract recipes/styles driven by the Zylem token system.
8
6
  */
9
- export { Button, type ButtonProps } from './Button';
7
+
8
+ // Primitives
9
+ export { Button, type ButtonProps, type ButtonVariant, type ButtonSize } from './Button/Button';
10
+ export { ToolbarButton, type ToolbarButtonProps } from './ToolbarButton/ToolbarButton';
11
+ export { TextField, type TextFieldProps } from './TextField/TextField';
12
+ export { NumberField, type NumberFieldProps } from './NumberField/NumberField';
13
+ export { Select, type SelectProps, type SelectOption } from './Select/Select';
14
+ export { Checkbox, type CheckboxProps } from './Checkbox/Checkbox';
15
+ export { Switch, type SwitchProps } from './Switch/Switch';
16
+ export { Slider, type SliderProps } from './Slider/Slider';
17
+ export {
18
+ Tabs,
19
+ TabsList,
20
+ TabsTrigger,
21
+ TabsContent,
22
+ type TabsProps,
23
+ } from './Tabs/Tabs';
24
+ export {
25
+ Accordion,
26
+ type AccordionProps,
27
+ type AccordionItemConfig,
28
+ } from './Accordion/Accordion';
29
+ export { Tooltip, type TooltipProps } from './Tooltip/Tooltip';
30
+ export {
31
+ DropdownMenu,
32
+ type DropdownMenuProps,
33
+ type DropdownMenuItemConfig,
34
+ } from './DropdownMenu/DropdownMenu';
35
+ export {
36
+ Dialog,
37
+ ConfirmDialog,
38
+ type DialogProps,
39
+ type ConfirmDialogProps,
40
+ } from './Dialog/Dialog';
41
+ export { Progress, type ProgressProps } from './Progress/Progress';
42
+ export { Badge, type BadgeProps, type BadgeTone } from './Badge/Badge';
43
+ export { Separator, type SeparatorProps } from './Separator/Separator';
44
+
45
+ // Composites
46
+ export { WindowControls, type WindowControlsProps } from './WindowControls/WindowControls';
47
+ export { TitleBar, type TitleBarProps } from './TitleBar/TitleBar';
48
+ export { Panel, type PanelProps } from './Panel/Panel';
49
+ export { Toolbar, type ToolbarProps } from './Toolbar/Toolbar';
50
+ export {
51
+ PropertyList,
52
+ PropertyRow,
53
+ type PropertyListProps,
54
+ type PropertyRowProps,
55
+ } from './Property/Property';
56
+ export { Console, type ConsoleProps } from './Console/Console';
57
+ export {
58
+ Sidebar,
59
+ SidebarSection,
60
+ SidebarItem,
61
+ sidebarItemClass,
62
+ type SidebarProps,
63
+ type SidebarSectionProps,
64
+ type SidebarItemProps,
65
+ } from './Sidebar/Sidebar';
66
+ export { Card, type CardProps } from './Card/Card';
67
+ export { SearchInput, type SearchInputProps } from './SearchInput/SearchInput';
68
+ export { EmptyState, type EmptyStateProps } from './EmptyState/EmptyState';
69
+ export { ScrollArea, type ScrollAreaProps } from './ScrollArea/ScrollArea';
70
+ export { Kbd, type KbdProps } from './Kbd/Kbd';
@@ -0,0 +1,60 @@
1
+ import { globalStyle } from '@vanilla-extract/css';
2
+ import { vars } from '../../theme.css';
3
+
4
+ /**
5
+ * Shared HyperGlass "field" surface — the low-gloss inset glass used by
6
+ * text inputs, number fields, select triggers, and textareas.
7
+ */
8
+
9
+ globalStyle('.zylem-field', {
10
+ boxSizing: 'border-box',
11
+ minHeight: '28px',
12
+ borderRadius: vars.radii.control,
13
+ border: '1px solid rgba(97, 166, 232, 0.32)',
14
+ background: vars.material.fieldGlass,
15
+ boxShadow: vars.effects.shadowInset,
16
+ color: vars.colors.text,
17
+ fontFamily: vars.typography.fontFamily,
18
+ fontSize: vars.typography.fontSize,
19
+ padding: `0 ${vars.spacing.sm}`,
20
+ outline: 'none',
21
+ transition: `box-shadow ${vars.motion.fast} ${vars.motion.easeOut}, border-color ${vars.motion.fast} ${vars.motion.easeOut}`,
22
+ });
23
+
24
+ globalStyle('.zylem-field:focus, .zylem-field:focus-within', {
25
+ boxShadow: `${vars.effects.shadowInset}, ${vars.effects.focusRing}`,
26
+ borderColor: 'rgba(97, 166, 232, 0.6)',
27
+ });
28
+
29
+ globalStyle('.zylem-field::placeholder', {
30
+ color: vars.colors.textSecondary,
31
+ });
32
+
33
+ globalStyle('.zylem-field[disabled], .zylem-field[data-disabled]', {
34
+ opacity: 0.5,
35
+ cursor: 'not-allowed',
36
+ });
37
+
38
+ globalStyle('.zylem-field-label', {
39
+ display: 'block',
40
+ fontSize: '11px',
41
+ letterSpacing: '0.08em',
42
+ textTransform: 'uppercase',
43
+ color: vars.colors.textSecondary,
44
+ fontFamily: vars.typography.fontFamily,
45
+ marginBottom: vars.spacing.xxs,
46
+ userSelect: 'none',
47
+ });
48
+
49
+ globalStyle('.zylem-field-error', {
50
+ fontSize: `calc(${vars.typography.fontSize} - 2px)`,
51
+ color: vars.colors.accent,
52
+ fontFamily: vars.typography.fontFamily,
53
+ marginTop: vars.spacing.xxs,
54
+ });
55
+
56
+ globalStyle('.zylem-field-root', {
57
+ display: 'flex',
58
+ flexDirection: 'column',
59
+ minWidth: 0,
60
+ });
@@ -1,8 +1,13 @@
1
1
  import { globalStyle } from '@vanilla-extract/css';
2
2
  import { vars } from '../theme.css';
3
3
 
4
+ /**
5
+ * HyperGlass accordion: flat minimal section headers over glass content
6
+ * regions. Shared by the editor's AccordionMenu markup and the library's
7
+ * Accordion component.
8
+ */
4
9
  globalStyle('.zylem-accordion', {
5
- color: vars.colors.primary,
10
+ color: vars.colors.text,
6
11
  display: 'flex',
7
12
  flexDirection: 'column',
8
13
  height: '100%',
@@ -13,16 +18,12 @@ globalStyle('.accordion-header', {
13
18
  position: 'sticky',
14
19
  top: 0,
15
20
  zIndex: 1,
16
- transition: 'background-color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1)',
17
- });
18
-
19
- globalStyle('.accordion-header[data-expanded]', {
20
- backgroundColor: vars.colors.primaryActive,
21
+ display: 'flex',
21
22
  });
22
23
 
23
24
  globalStyle('.accordion-item', {
24
25
  position: 'relative',
25
- borderBottom: `1px solid ${vars.colors.primary}`,
26
+ borderBottom: '1px solid rgba(97, 166, 232, 0.22)',
26
27
  display: 'flex',
27
28
  flexDirection: 'column',
28
29
  minHeight: 0,
@@ -40,24 +41,37 @@ globalStyle('.accordion-item[data-expanded]', {
40
41
  });
41
42
 
42
43
  globalStyle('.accordion-trigger', {
44
+ boxSizing: 'border-box',
43
45
  width: '100%',
44
- padding: vars.spacing.md,
46
+ flex: 1,
47
+ padding: `${vars.spacing.sm} ${vars.spacing.md}`,
45
48
  display: 'flex',
46
49
  justifyContent: 'space-between',
47
50
  alignItems: 'center',
48
- background: 'none',
51
+ gap: vars.spacing.sm,
49
52
  border: 'none',
50
- color: vars.colors.primary,
53
+ background: 'transparent',
54
+ color: vars.colors.text,
55
+ fontFamily: vars.typography.fontFamily,
56
+ fontSize: vars.typography.fontSize,
57
+ fontWeight: 600,
58
+ letterSpacing: '0.03em',
51
59
  cursor: 'pointer',
52
- transition: 'background-color 0.2s ease',
60
+ outline: 'none',
61
+ transition: `background ${vars.motion.fast} ${vars.motion.easeOut}`,
53
62
  });
54
63
 
55
64
  globalStyle('.accordion-trigger:hover', {
56
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
65
+ background: 'rgba(97, 166, 232, 0.08)',
57
66
  });
58
67
 
59
68
  globalStyle('.accordion-trigger[data-expanded]', {
60
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
69
+ background: 'rgba(97, 166, 232, 0.12)',
70
+ color: '#F4FAFF',
71
+ });
72
+
73
+ globalStyle('.accordion-trigger:focus-visible', {
74
+ boxShadow: vars.effects.focusRing,
61
75
  });
62
76
 
63
77
  globalStyle('.accordion-content', {
@@ -69,15 +83,15 @@ globalStyle('.accordion-content', {
69
83
 
70
84
  globalStyle('.accordion-trigger::after', {
71
85
  content: "'\\25BC'",
72
- right: vars.spacing.lg,
73
86
  position: 'relative',
74
- color: vars.colors.primary,
75
- fontSize: '12px',
76
- transition: 'transform 0.3s ease',
87
+ color: vars.colors.textSecondary,
88
+ fontSize: '10px',
89
+ transition: `transform ${vars.motion.normal} ${vars.motion.easeOut}`,
77
90
  });
78
91
 
79
92
  globalStyle('.accordion-trigger[data-expanded]::after', {
80
93
  transform: 'rotate(180deg)',
94
+ color: '#F4FAFF',
81
95
  });
82
96
 
83
97
  globalStyle('.panel-content', {
@@ -85,5 +99,5 @@ globalStyle('.panel-content', {
85
99
  flexDirection: 'column',
86
100
  gap: vars.spacing.md,
87
101
  padding: vars.spacing.md,
88
- color: vars.colors.primary,
102
+ color: vars.colors.text,
89
103
  });