@scalewing/react 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.
Files changed (62) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +23 -2
  3. package/dist/components/Accordion.d.ts +8 -0
  4. package/dist/components/Accordion.js +14 -0
  5. package/dist/components/AppHeader.d.ts +5 -0
  6. package/dist/components/AppHeader.js +7 -0
  7. package/dist/components/Badge.d.ts +13 -0
  8. package/dist/components/Badge.js +7 -0
  9. package/dist/components/BarChart.d.ts +16 -0
  10. package/dist/components/BarChart.js +13 -0
  11. package/dist/components/Box.d.ts +4 -4
  12. package/dist/components/Box.js +1 -1
  13. package/dist/components/Button.d.ts +17 -0
  14. package/dist/components/Button.js +7 -0
  15. package/dist/components/Card.d.ts +2 -2
  16. package/dist/components/Card.js +2 -2
  17. package/dist/components/Dialog.d.ts +8 -0
  18. package/dist/components/Dialog.js +36 -0
  19. package/dist/components/Field.d.ts +11 -0
  20. package/dist/components/Field.js +6 -0
  21. package/dist/components/Nav.d.ts +3 -0
  22. package/dist/components/Nav.js +7 -0
  23. package/dist/components/SegmentedControl.d.ts +19 -0
  24. package/dist/components/SegmentedControl.js +28 -0
  25. package/dist/components/Select.d.ts +17 -0
  26. package/dist/components/Select.js +107 -0
  27. package/dist/components/Split.d.ts +8 -0
  28. package/dist/components/Split.js +117 -0
  29. package/dist/components/Table.d.ts +32 -0
  30. package/dist/components/Table.js +24 -0
  31. package/dist/components/Text.d.ts +3 -3
  32. package/dist/components/Text.js +2 -1
  33. package/dist/components/Toast.d.ts +10 -0
  34. package/dist/components/Toast.js +61 -0
  35. package/dist/index.d.ts +18 -0
  36. package/dist/index.js +13 -0
  37. package/dist/palette/amber.css +21 -0
  38. package/dist/palette/capri.css +21 -0
  39. package/dist/palette/cerulean.css +21 -0
  40. package/dist/palette/cornflower.css +21 -0
  41. package/dist/palette/fuchsia.css +21 -0
  42. package/dist/palette/harvest.css +31 -0
  43. package/dist/palette/ink.css +21 -0
  44. package/dist/palette/mocha.css +31 -0
  45. package/dist/palette/navy.css +21 -0
  46. package/dist/palette/postcard.css +31 -0
  47. package/dist/palette/raspberry.css +21 -0
  48. package/dist/palette/sky.css +21 -0
  49. package/dist/palette/soft-blue.css +21 -0
  50. package/dist/palette/sunburst.css +31 -0
  51. package/dist/palette/synthwave.css +26 -0
  52. package/dist/palette/tangerine.css +21 -0
  53. package/dist/select-list.d.ts +7 -0
  54. package/dist/select-list.js +24 -0
  55. package/dist/split-size.d.ts +18 -0
  56. package/dist/split-size.js +94 -0
  57. package/dist/styles.css +1228 -23
  58. package/dist/theme/ThemeProvider.d.ts +4 -3
  59. package/dist/theme/ThemeProvider.js +8 -3
  60. package/dist/toast-travel.d.ts +16 -0
  61. package/dist/toast-travel.js +42 -0
  62. package/package.json +7 -3
@@ -0,0 +1,117 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { spacingScale } from '@scalewing/tokens';
4
+ import { useCallback, useId, useLayoutEffect, useRef, useState, } from 'react';
5
+ import { cx } from '../class-names.js';
6
+ import { applySplitDrag, applySplitKey, cssLengthToPx, effectiveSplitMax, readSplitMetrics, splitPercent, } from '../split-size.js';
7
+ function metricsFrom(node) {
8
+ const styles = getComputedStyle(node);
9
+ const remPx = cssLengthToPx(getComputedStyle(document.documentElement).fontSize) || 16;
10
+ return readSplitMetrics((name) => styles.getPropertyValue(name), remPx);
11
+ }
12
+ export function Split({ children, className, collapsed: collapsedProp, label, onCollapsedChange, ...rest }) {
13
+ const paneId = useId();
14
+ const splitRef = useRef(null);
15
+ const handleRef = useRef(null);
16
+ const dragRef = useRef(null);
17
+ const [width, setWidth] = useState(null);
18
+ const [range, setRange] = useState(null);
19
+ const [collapsedUncontrolled, setCollapsedUncontrolled] = useState(false);
20
+ const collapsed = collapsedProp ?? collapsedUncontrolled;
21
+ const setCollapsed = useCallback((next) => {
22
+ onCollapsedChange?.(next);
23
+ if (collapsedProp === undefined) {
24
+ setCollapsedUncontrolled(next);
25
+ }
26
+ }, [collapsedProp, onCollapsedChange]);
27
+ useLayoutEffect(() => {
28
+ const node = splitRef.current;
29
+ if (!node) {
30
+ return;
31
+ }
32
+ const measured = metricsFrom(node);
33
+ setRange({ min: measured.min, max: measured.max });
34
+ setWidth((current) => current ?? measured.defaultWidth);
35
+ }, []);
36
+ function dragMetrics() {
37
+ const split = splitRef.current;
38
+ const handle = handleRef.current;
39
+ if (!split) {
40
+ return { min: 0, max: 0, step: 16, defaultWidth: 0 };
41
+ }
42
+ const measured = metricsFrom(split);
43
+ const parentWidth = split.parentElement?.getBoundingClientRect().width ?? 0;
44
+ const handleWidth = handle?.getBoundingClientRect().width ?? 0;
45
+ return {
46
+ ...measured,
47
+ max: effectiveSplitMax(measured.max, parentWidth, handleWidth, measured.min),
48
+ };
49
+ }
50
+ function currentSnapshot() {
51
+ const measured = dragMetrics();
52
+ return {
53
+ collapsed,
54
+ width: width ?? measured.defaultWidth,
55
+ };
56
+ }
57
+ function applySnapshot(next) {
58
+ setWidth(next.width);
59
+ if (next.collapsed !== collapsed) {
60
+ setCollapsed(next.collapsed);
61
+ }
62
+ }
63
+ function onPointerDown(event) {
64
+ if (event.button !== 0 || !splitRef.current) {
65
+ return;
66
+ }
67
+ event.preventDefault();
68
+ event.currentTarget.focus();
69
+ event.currentTarget.setPointerCapture?.(event.pointerId);
70
+ dragRef.current = {
71
+ pointerId: event.pointerId,
72
+ startX: event.clientX,
73
+ snapshot: currentSnapshot(),
74
+ metrics: dragMetrics(),
75
+ moved: false,
76
+ };
77
+ }
78
+ function onPointerMove(event) {
79
+ const drag = dragRef.current;
80
+ if (!drag || event.pointerId !== drag.pointerId) {
81
+ return;
82
+ }
83
+ const delta = event.clientX - drag.startX;
84
+ if (Math.abs(delta) >= spacingScale[1]) {
85
+ drag.moved = true;
86
+ }
87
+ applySnapshot(applySplitDrag(drag.snapshot, delta, drag.metrics));
88
+ }
89
+ function endDrag(event) {
90
+ const drag = dragRef.current;
91
+ if (!drag || event.pointerId !== drag.pointerId) {
92
+ return;
93
+ }
94
+ dragRef.current = null;
95
+ event.currentTarget.releasePointerCapture?.(event.pointerId);
96
+ if (!drag.moved && drag.snapshot.collapsed) {
97
+ setCollapsed(false);
98
+ }
99
+ }
100
+ function onKeyDown(event) {
101
+ if (!splitRef.current) {
102
+ return;
103
+ }
104
+ const next = applySplitKey(event.key, currentSnapshot(), dragMetrics());
105
+ if (!next) {
106
+ return;
107
+ }
108
+ event.preventDefault();
109
+ applySnapshot(next);
110
+ }
111
+ const valueNow = collapsed
112
+ ? 0
113
+ : range && width !== null
114
+ ? splitPercent(width, range.min, range.max)
115
+ : 0;
116
+ return (_jsxs("div", { ...rest, ref: splitRef, className: cx('sw-split', className), "data-collapsed": collapsed ? '' : undefined, children: [_jsx("div", { className: "sw-split-pane", id: paneId, "aria-hidden": collapsed || undefined, style: width === null ? undefined : { width: `${width}px` }, children: children }), _jsx("div", { ref: handleRef, "aria-controls": paneId, "aria-label": collapsed ? `Show ${label}` : `Resize ${label}`, "aria-orientation": "vertical", "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": valueNow, className: "sw-split-handle", onKeyDown: onKeyDown, onPointerCancel: endDrag, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: endDrag, role: "separator", tabIndex: 0, children: _jsx("span", { "aria-hidden": "true", className: "sw-split-grip" }) })] }));
117
+ }
@@ -0,0 +1,32 @@
1
+ import { type HTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
2
+ export type TableDensity = 'comfortable' | 'compact';
3
+ export type TableProps = HTMLAttributes<HTMLTableElement> & {
4
+ density?: TableDensity;
5
+ stickyHeader?: boolean;
6
+ };
7
+ export declare const Table: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & {
8
+ density?: TableDensity;
9
+ stickyHeader?: boolean;
10
+ } & import("react").RefAttributes<HTMLTableElement>>;
11
+ export type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
12
+ export declare const TableHeader: import("react").ForwardRefExoticComponent<TableHeaderProps & import("react").RefAttributes<HTMLTableSectionElement>>;
13
+ export type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
14
+ export declare const TableBody: import("react").ForwardRefExoticComponent<TableBodyProps & import("react").RefAttributes<HTMLTableSectionElement>>;
15
+ export type TableRowProps = HTMLAttributes<HTMLTableRowElement> & {
16
+ selected?: boolean;
17
+ };
18
+ export declare const TableRow: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & {
19
+ selected?: boolean;
20
+ } & import("react").RefAttributes<HTMLTableRowElement>>;
21
+ type TableCellAlign = 'start' | 'end';
22
+ export type TableCellProps = ((TdHTMLAttributes<HTMLTableCellElement> & {
23
+ as?: 'td';
24
+ }) | (ThHTMLAttributes<HTMLTableCellElement> & {
25
+ as: 'th';
26
+ })) & {
27
+ align?: TableCellAlign;
28
+ numeric?: boolean;
29
+ truncate?: boolean;
30
+ };
31
+ export declare const TableCell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
32
+ export {};
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef, } from 'react';
3
+ import { cx } from '../class-names.js';
4
+ export const Table = forwardRef(function Table({ children, className, density = 'comfortable', stickyHeader = true, ...rest }, ref) {
5
+ return (_jsx("div", { className: "sw-table-wrap", children: _jsx("table", { ref: ref, className: cx('sw-table', density === 'compact' && 'sw-table-compact', stickyHeader && 'sw-table-sticky', className), ...rest, children: children }) }));
6
+ });
7
+ export const TableHeader = forwardRef(function TableHeader({ className, ...rest }, ref) {
8
+ return _jsx("thead", { ref: ref, className: className, ...rest });
9
+ });
10
+ export const TableBody = forwardRef(function TableBody({ className, ...rest }, ref) {
11
+ return _jsx("tbody", { ref: ref, className: className, ...rest });
12
+ });
13
+ export const TableRow = forwardRef(function TableRow({ className, selected = false, ...rest }, ref) {
14
+ return (_jsx("tr", { ref: ref, "aria-selected": selected || undefined, className: cx(selected && 'sw-table-row-selected', className), ...rest }));
15
+ });
16
+ export const TableCell = forwardRef(function TableCell({ align = 'start', as = 'td', className, numeric = false, truncate = false, ...rest }, ref) {
17
+ const Component = as;
18
+ const alignmentClass = numeric
19
+ ? 'sw-table-numeric'
20
+ : align === 'end'
21
+ ? 'sw-table-end'
22
+ : undefined;
23
+ return (_jsx(Component, { ref: ref, className: cx(alignmentClass, truncate && 'sw-table-clip', className), ...rest }));
24
+ });
@@ -1,13 +1,13 @@
1
1
  import { type SemanticColorKey, type TypographyVariant } from '@scalewing/tokens';
2
- import { type HTMLAttributes } from 'react';
2
+ import { type HTMLAttributes, type LabelHTMLAttributes } from 'react';
3
3
  export type TextElement = 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'label' | 'strong';
4
- export type TextProps = HTMLAttributes<HTMLElement> & {
4
+ export type TextProps = HTMLAttributes<HTMLElement> & Pick<LabelHTMLAttributes<HTMLLabelElement>, 'htmlFor'> & {
5
5
  as?: TextElement;
6
6
  color?: SemanticColorKey;
7
7
  truncate?: boolean;
8
8
  variant?: TypographyVariant;
9
9
  };
10
- export declare const Text: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
10
+ export declare const Text: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & Pick<LabelHTMLAttributes<HTMLLabelElement>, "htmlFor"> & {
11
11
  as?: TextElement;
12
12
  color?: SemanticColorKey;
13
13
  truncate?: boolean;
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
2
+ import { forwardRef, } from 'react';
3
3
  import { cx } from '../class-names.js';
4
4
  const defaultElement = {
5
5
  body: 'p',
6
6
  caption: 'span',
7
+ data: 'span',
7
8
  display: 'h1',
8
9
  heading: 'h2',
9
10
  label: 'span',
@@ -0,0 +1,10 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ export type ToastProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'popover'> & {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ timeoutMs?: number;
6
+ anchor?: Element | null;
7
+ target?: Element | null;
8
+ children: ReactNode;
9
+ };
10
+ export declare function Toast({ anchor, children, className, onOpenChange, open, target, timeoutMs, ...rest }: ToastProps): import("react").JSX.Element;
@@ -0,0 +1,61 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useLayoutEffect, useEffect, useRef, } from 'react';
4
+ import { cx } from '../class-names.js';
5
+ import { spacingClassNames } from '../spacing-classes.js';
6
+ import { applyTravelVars, clearTravelVars, travelTranslate, } from '../toast-travel.js';
7
+ const DEFAULT_TIMEOUT_MS = 800;
8
+ function travels(anchor, target) {
9
+ return Boolean(anchor && target);
10
+ }
11
+ export function Toast({ anchor = null, children, className, onOpenChange, open, target = null, timeoutMs = DEFAULT_TIMEOUT_MS, ...rest }) {
12
+ const nodeRef = useRef(null);
13
+ const moving = travels(anchor, target);
14
+ useLayoutEffect(() => {
15
+ const node = nodeRef.current;
16
+ if (!node || typeof node.showPopover !== 'function') {
17
+ return;
18
+ }
19
+ if (!open) {
20
+ if (node.matches(':popover-open')) {
21
+ node.hidePopover();
22
+ }
23
+ clearTravelVars(node);
24
+ return;
25
+ }
26
+ if (moving && anchor && target) {
27
+ if (!node.matches(':popover-open')) {
28
+ node.showPopover();
29
+ }
30
+ applyTravelVars(node, travelTranslate(anchor.getBoundingClientRect(), target.getBoundingClientRect(), node.getBoundingClientRect()));
31
+ return;
32
+ }
33
+ clearTravelVars(node);
34
+ if (!node.matches(':popover-open')) {
35
+ node.showPopover();
36
+ }
37
+ }, [anchor, moving, open, target]);
38
+ useEffect(() => {
39
+ if (!open) {
40
+ return;
41
+ }
42
+ const reducedMotion = typeof window.matchMedia === 'function' &&
43
+ window.matchMedia('(prefers-reduced-motion: reduce)').matches;
44
+ if (moving && !reducedMotion) {
45
+ return;
46
+ }
47
+ const timer = window.setTimeout(() => {
48
+ onOpenChange(false);
49
+ }, timeoutMs);
50
+ return () => {
51
+ window.clearTimeout(timer);
52
+ };
53
+ }, [moving, open, onOpenChange, timeoutMs]);
54
+ function onAnimationEnd(event) {
55
+ if (event.target !== event.currentTarget || !moving) {
56
+ return;
57
+ }
58
+ onOpenChange(false);
59
+ }
60
+ return (_jsx("div", { ...rest, ref: nodeRef, className: cx('sw-toast', moving && 'sw-toast-travel', ...spacingClassNames({ padding: 3 }), className), onAnimationEnd: onAnimationEnd, popover: "manual", role: "status", children: children }));
61
+ }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,24 @@
1
+ export { Accordion } from './components/Accordion.js';
2
+ export type { AccordionProps } from './components/Accordion.js';
3
+ export { AppHeader, type AppHeaderProps } from './components/AppHeader.js';
4
+ export { Badge, type BadgeProps, type BadgeSize, type BadgeTone, } from './components/Badge.js';
5
+ export { BarChart, type BarChartItem, type BarChartProps, } from './components/BarChart.js';
6
+ export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, } from './components/Button.js';
1
7
  export { Box, type BoxElement, type BoxProps } from './components/Box.js';
2
8
  export { Card, type CardProps, type CardVariant } from './components/Card.js';
9
+ export { Dialog } from './components/Dialog.js';
10
+ export type { DialogProps } from './components/Dialog.js';
11
+ export { Toast } from './components/Toast.js';
12
+ export type { ToastProps } from './components/Toast.js';
13
+ export { Field, type FieldProps, type FieldSize } from './components/Field.js';
3
14
  export { Inline, type InlineProps } from './components/Inline.js';
15
+ export { Split } from './components/Split.js';
16
+ export type { SplitProps } from './components/Split.js';
17
+ export { Nav, type NavProps } from './components/Nav.js';
18
+ export { SegmentedControl, type SegmentedControlProps, type SegmentedItem, } from './components/SegmentedControl.js';
19
+ export { Select } from './components/Select.js';
20
+ export type { SelectAction, SelectOption, SelectProps, } from './components/Select.js';
4
21
  export { Stack, type Align, type Justify, type StackProps, } from './components/Stack.js';
22
+ export { Table, TableBody, TableCell, TableHeader, TableRow, type TableBodyProps, type TableCellProps, type TableDensity, type TableHeaderProps, type TableProps, type TableRowProps, } from './components/Table.js';
5
23
  export { Text, type TextElement, type TextProps } from './components/Text.js';
6
24
  export { ThemeProvider, useTheme, type ThemeProviderProps, } from './theme/ThemeProvider.js';
package/dist/index.js CHANGED
@@ -1,6 +1,19 @@
1
+ export { Accordion } from './components/Accordion.js';
2
+ export { AppHeader } from './components/AppHeader.js';
3
+ export { Badge, } from './components/Badge.js';
4
+ export { BarChart, } from './components/BarChart.js';
5
+ export { Button, } from './components/Button.js';
1
6
  export { Box } from './components/Box.js';
2
7
  export { Card } from './components/Card.js';
8
+ export { Dialog } from './components/Dialog.js';
9
+ export { Toast } from './components/Toast.js';
10
+ export { Field } from './components/Field.js';
3
11
  export { Inline } from './components/Inline.js';
12
+ export { Split } from './components/Split.js';
13
+ export { Nav } from './components/Nav.js';
14
+ export { SegmentedControl, } from './components/SegmentedControl.js';
15
+ export { Select } from './components/Select.js';
4
16
  export { Stack, } from './components/Stack.js';
17
+ export { Table, TableBody, TableCell, TableHeader, TableRow, } from './components/Table.js';
5
18
  export { Text } from './components/Text.js';
6
19
  export { ThemeProvider, useTheme, } from './theme/ThemeProvider.js';
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #B45309;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #FCD34D;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(68, 61, 38, 0.72);
19
+ --sw-glass-border: rgba(254, 237, 184, 0.22);
20
+ --sw-glass-specular: rgba(254, 246, 219, 0.28);
21
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #0077B6;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #48CAE4;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(36, 59, 66, 0.72);
19
+ --sw-glass-border: rgba(182, 234, 244, 0.22);
20
+ --sw-glass-specular: rgba(218, 244, 250, 0.28);
21
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #0066CC;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #5AC8FA;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(39, 59, 70, 0.72);
19
+ --sw-glass-border: rgba(189, 233, 253, 0.22);
20
+ --sw-glass-specular: rgba(222, 244, 254, 0.28);
21
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #4F6BED;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #93A4FF;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(49, 52, 71, 0.72);
19
+ --sw-glass-border: rgba(212, 219, 255, 0.22);
20
+ --sw-glass-specular: rgba(233, 237, 255, 0.28);
21
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #C026D3;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #E879F9;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(65, 45, 69, 0.72);
19
+ --sw-glass-border: rgba(246, 201, 253, 0.22);
20
+ --sw-glass-specular: rgba(250, 228, 254, 0.28);
21
+ }
@@ -0,0 +1,31 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-background: #E3DCC8;
5
+ --sw-color-surface: #EBE6D6;
6
+ --sw-color-text: #1D1D1F;
7
+ --sw-color-muted: #5C5346;
8
+ --sw-color-accent: #3E3E24;
9
+ --sw-color-onAccent: #FFFFFF;
10
+ --sw-color-border: #C9C2AE;
11
+ --sw-glass-blur: 24px;
12
+ --sw-glass-saturate: 1;
13
+ --sw-glass-fill: rgba(255, 255, 255, 1);
14
+ --sw-glass-border: rgba(210, 210, 215, 1);
15
+ --sw-glass-specular: rgba(255, 255, 255, 0);
16
+ }
17
+
18
+ [data-theme='dark'] {
19
+ --sw-color-background: #263E24;
20
+ --sw-color-surface: #2F4A2C;
21
+ --sw-color-text: #E3DCC8;
22
+ --sw-color-muted: #B8B090;
23
+ --sw-color-accent: #CEA453;
24
+ --sw-color-onAccent: #101214;
25
+ --sw-color-border: #3D5238;
26
+ --sw-glass-blur: 24px;
27
+ --sw-glass-saturate: 1.8;
28
+ --sw-glass-fill: rgba(60, 52, 40, 0.72);
29
+ --sw-glass-border: rgba(235, 219, 186, 0.22);
30
+ --sw-glass-specular: rgba(245, 237, 221, 0.28);
31
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #1D1D1F;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #F5F5F7;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(67, 67, 69, 0.72);
19
+ --sw-glass-border: rgba(251, 251, 252, 0.22);
20
+ --sw-glass-specular: rgba(253, 253, 253, 0.28);
21
+ }
@@ -0,0 +1,31 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-background: #F3E3C3;
5
+ --sw-color-surface: #F8EEE0;
6
+ --sw-color-text: #473333;
7
+ --sw-color-muted: #6B5348;
8
+ --sw-color-accent: #473333;
9
+ --sw-color-onAccent: #FFFFFF;
10
+ --sw-color-border: #E0CBA8;
11
+ --sw-glass-blur: 24px;
12
+ --sw-glass-saturate: 1;
13
+ --sw-glass-fill: rgba(255, 255, 255, 1);
14
+ --sw-glass-border: rgba(210, 210, 215, 1);
15
+ --sw-glass-specular: rgba(255, 255, 255, 0);
16
+ }
17
+
18
+ [data-theme='dark'] {
19
+ --sw-color-background: #473333;
20
+ --sw-color-surface: #5A4242;
21
+ --sw-color-text: #F3E3C3;
22
+ --sw-color-muted: #D4C4A8;
23
+ --sw-color-accent: #E8C69F;
24
+ --sw-color-onAccent: #101214;
25
+ --sw-color-border: #6B5353;
26
+ --sw-glass-blur: 24px;
27
+ --sw-glass-saturate: 1.8;
28
+ --sw-glass-fill: rgba(65, 59, 53, 0.72);
29
+ --sw-glass-border: rgba(246, 232, 217, 0.22);
30
+ --sw-glass-specular: rgba(250, 244, 236, 0.28);
31
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #0A2540;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #7EB8FF;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(46, 56, 71, 0.72);
19
+ --sw-glass-border: rgba(203, 227, 255, 0.22);
20
+ --sw-glass-specular: rgba(229, 241, 255, 0.28);
21
+ }
@@ -0,0 +1,31 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-background: #E4E4CC;
5
+ --sw-color-surface: #EEEEDD;
6
+ --sw-color-text: #1B2130;
7
+ --sw-color-muted: #5C5346;
8
+ --sw-color-accent: #A33B2B;
9
+ --sw-color-onAccent: #FFFFFF;
10
+ --sw-color-border: #D0D0B8;
11
+ --sw-glass-blur: 24px;
12
+ --sw-glass-saturate: 1;
13
+ --sw-glass-fill: rgba(255, 255, 255, 1);
14
+ --sw-glass-border: rgba(210, 210, 215, 1);
15
+ --sw-glass-specular: rgba(255, 255, 255, 0);
16
+ }
17
+
18
+ [data-theme='dark'] {
19
+ --sw-color-background: #1B2130;
20
+ --sw-color-surface: #252B40;
21
+ --sw-color-text: #E4E4CC;
22
+ --sw-color-muted: #B8B49A;
23
+ --sw-color-accent: #EEAF90;
24
+ --sw-color-onAccent: #101214;
25
+ --sw-color-border: #3A4158;
26
+ --sw-glass-blur: 24px;
27
+ --sw-glass-saturate: 1.8;
28
+ --sw-glass-fill: rgba(66, 54, 51, 0.72);
29
+ --sw-glass-border: rgba(248, 223, 211, 0.22);
30
+ --sw-glass-specular: rgba(252, 239, 233, 0.28);
31
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #DB2777;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #F472B6;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(67, 43, 57, 0.72);
19
+ --sw-glass-border: rgba(251, 199, 226, 0.22);
20
+ --sw-glass-specular: rgba(253, 227, 240, 0.28);
21
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #0369A1;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #38BDF8;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(33, 57, 69, 0.72);
19
+ --sw-glass-border: rgba(175, 229, 252, 0.22);
20
+ --sw-glass-specular: rgba(215, 242, 254, 0.28);
21
+ }
@@ -0,0 +1,21 @@
1
+ /* Generated by @scalewing/tokens. Do not edit by hand. */
2
+ :root,
3
+ [data-theme='light'] {
4
+ --sw-color-accent: #3B6FD4;
5
+ --sw-color-onAccent: #FFFFFF;
6
+ --sw-glass-blur: 24px;
7
+ --sw-glass-saturate: 1;
8
+ --sw-glass-fill: rgba(255, 255, 255, 1);
9
+ --sw-glass-border: rgba(210, 210, 215, 1);
10
+ --sw-glass-specular: rgba(255, 255, 255, 0);
11
+ }
12
+
13
+ [data-theme='dark'] {
14
+ --sw-color-accent: #8BB8FF;
15
+ --sw-color-onAccent: #101214;
16
+ --sw-glass-blur: 24px;
17
+ --sw-glass-saturate: 1.8;
18
+ --sw-glass-fill: rgba(48, 56, 71, 0.72);
19
+ --sw-glass-border: rgba(209, 227, 255, 0.22);
20
+ --sw-glass-specular: rgba(232, 241, 255, 0.28);
21
+ }