@chances-ai/design-system 21.0.0 → 24.1.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/dist/cn.d.ts +11 -0
- package/dist/cn.d.ts.map +1 -0
- package/dist/cn.js +14 -0
- package/dist/cn.js.map +1 -0
- package/dist/diff/change-bar.d.ts +30 -0
- package/dist/diff/change-bar.d.ts.map +1 -0
- package/dist/diff/change-bar.js +55 -0
- package/dist/diff/change-bar.js.map +1 -0
- package/dist/diff/monaco-theme.d.ts +32 -0
- package/dist/diff/monaco-theme.d.ts.map +1 -0
- package/dist/diff/monaco-theme.js +70 -0
- package/dist/diff/monaco-theme.js.map +1 -0
- package/dist/heroui-theme.d.ts +37 -0
- package/dist/heroui-theme.d.ts.map +1 -0
- package/dist/heroui-theme.js +77 -0
- package/dist/heroui-theme.js.map +1 -0
- package/dist/icon/icon.d.ts +41 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.js +41 -0
- package/dist/icon/icon.js.map +1 -0
- package/dist/icon/sprite.d.ts +30 -0
- package/dist/icon/sprite.d.ts.map +1 -0
- package/dist/icon/sprite.js +16 -0
- package/dist/icon/sprite.js.map +1 -0
- package/dist/index.d.ts +23 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -7
- package/dist/index.js.map +1 -1
- package/dist/primitives/button.d.ts +52 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +20 -0
- package/dist/primitives/button.js.map +1 -0
- package/dist/primitives/card.d.ts +7 -0
- package/dist/primitives/card.d.ts.map +1 -0
- package/dist/primitives/card.js +10 -0
- package/dist/primitives/card.js.map +1 -0
- package/dist/primitives/scroll-area.d.ts +7 -0
- package/dist/primitives/scroll-area.d.ts.map +1 -0
- package/dist/primitives/scroll-area.js +10 -0
- package/dist/primitives/scroll-area.js.map +1 -0
- package/dist/primitives/stack.d.ts +9 -0
- package/dist/primitives/stack.d.ts.map +1 -0
- package/dist/primitives/stack.js +14 -0
- package/dist/primitives/stack.js.map +1 -0
- package/dist/primitives/status-badge.d.ts +42 -0
- package/dist/primitives/status-badge.d.ts.map +1 -0
- package/dist/primitives/status-badge.js +21 -0
- package/dist/primitives/status-badge.js.map +1 -0
- package/dist/primitives/surface.d.ts +201 -0
- package/dist/primitives/surface.d.ts.map +1 -0
- package/dist/primitives/surface.js +39 -0
- package/dist/primitives/surface.js.map +1 -0
- package/dist/primitives/text.d.ts +124 -0
- package/dist/primitives/text.d.ts.map +1 -0
- package/dist/primitives/text.js +30 -0
- package/dist/primitives/text.js.map +1 -0
- package/dist/theme-vars.d.ts +25 -0
- package/dist/theme-vars.d.ts.map +1 -0
- package/dist/theme-vars.js +24 -0
- package/dist/theme-vars.js.map +1 -0
- package/dist/widgets/filter-autocomplete.d.ts +21 -0
- package/dist/widgets/filter-autocomplete.d.ts.map +1 -0
- package/dist/widgets/filter-autocomplete.js +30 -0
- package/dist/widgets/filter-autocomplete.js.map +1 -0
- package/dist/widgets/index.d.ts +17 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/index.js +17 -0
- package/dist/widgets/index.js.map +1 -0
- package/package.json +60 -7
- package/src/heroui-theme.css +40 -0
- package/src/tokens.css +143 -0
- package/dist/tamagui.config.d.ts +0 -117
- package/dist/tamagui.config.d.ts.map +0 -1
- package/dist/tamagui.config.js +0 -35
- package/dist/tamagui.config.js.map +0 -1
- package/dist/themes.d.ts +0 -5
- package/dist/themes.d.ts.map +0 -1
- package/dist/themes.js +0 -35
- package/dist/themes.js.map +0 -1
- package/dist/tokens.d.ts +0 -90
- package/dist/tokens.d.ts.map +0 -1
- package/dist/tokens.js +0 -34
- package/dist/tokens.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/primitives/text.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,EAAE,EAAqB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,kBAAkB;YAC1B,MAAM,EAAE,kBAAkB;YAC1B,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,cAAc;YACvB,UAAU,EAAE,iBAAiB;YAC7B,OAAO,EAAE,EAAE;SACZ;QACD,IAAI,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE;QACrF,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE;QACtG,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;QACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE;KAC1C;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;CAChE,CAAC,CAAC;AAcH,MAAM,UAAU,IAAI,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAa;IAC/G,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,YACnF,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W1) The runtime half of the `@theme` bridge `[11.4]`/`[11.5]`.
|
|
3
|
+
* `tokens.css` statically binds each Tailwind color utility to a `--ch-*` var
|
|
4
|
+
* (`--color-accent: var(--ch-accent)`); THIS module sets the per-theme VALUES of
|
|
5
|
+
* those `--ch-*` vars at runtime, so switching theme = swapping one set of custom
|
|
6
|
+
* properties (the subtree recomputes). Engine-backed (ui-core `resolveThemeTokens`
|
|
7
|
+
* + `toCssVars`). Browser-safe; the DOM helper is optional (pure `themeVars` for
|
|
8
|
+
* SSR / inline-style spread).
|
|
9
|
+
*/
|
|
10
|
+
import { type ThemeMode } from "@chances-ai/ui-core";
|
|
11
|
+
/** The full `--ch-*` value set for a theme + mode (spread onto a panel root's
|
|
12
|
+
* inline `style`, or fed to {@link applyThemeVars}). */
|
|
13
|
+
export declare function themeVars(themeId: string, mode: ThemeMode): Record<`--${string}`, string>;
|
|
14
|
+
/** Minimal element shape {@link applyThemeVars} writes to — a real `HTMLElement`
|
|
15
|
+
* satisfies it; keeps this testable without a DOM and `@types/dom`-free at call
|
|
16
|
+
* sites that pass a stub. */
|
|
17
|
+
export interface StyleTarget {
|
|
18
|
+
style: {
|
|
19
|
+
setProperty(name: string, value: string): void;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Imperatively write a theme's `--ch-*` vars onto an element (e.g. the panel
|
|
23
|
+
* root / `document.documentElement`). Returns the var set that was applied. */
|
|
24
|
+
export declare function applyThemeVars(el: StyleTarget, themeId: string, mode: ThemeMode): Record<`--${string}`, string>;
|
|
25
|
+
//# sourceMappingURL=theme-vars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-vars.d.ts","sourceRoot":"","sources":["../src/theme-vars.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEpF;yDACyD;AACzD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAEzF;AAED;;8BAE8B;AAC9B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE;QAAE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAC3D;AAED;gFACgF;AAChF,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAI/G"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W1) The runtime half of the `@theme` bridge `[11.4]`/`[11.5]`.
|
|
3
|
+
* `tokens.css` statically binds each Tailwind color utility to a `--ch-*` var
|
|
4
|
+
* (`--color-accent: var(--ch-accent)`); THIS module sets the per-theme VALUES of
|
|
5
|
+
* those `--ch-*` vars at runtime, so switching theme = swapping one set of custom
|
|
6
|
+
* properties (the subtree recomputes). Engine-backed (ui-core `resolveThemeTokens`
|
|
7
|
+
* + `toCssVars`). Browser-safe; the DOM helper is optional (pure `themeVars` for
|
|
8
|
+
* SSR / inline-style spread).
|
|
9
|
+
*/
|
|
10
|
+
import { resolveThemeTokens, toCssVars } from "@chances-ai/ui-core";
|
|
11
|
+
/** The full `--ch-*` value set for a theme + mode (spread onto a panel root's
|
|
12
|
+
* inline `style`, or fed to {@link applyThemeVars}). */
|
|
13
|
+
export function themeVars(themeId, mode) {
|
|
14
|
+
return toCssVars(resolveThemeTokens(themeId, mode));
|
|
15
|
+
}
|
|
16
|
+
/** Imperatively write a theme's `--ch-*` vars onto an element (e.g. the panel
|
|
17
|
+
* root / `document.documentElement`). Returns the var set that was applied. */
|
|
18
|
+
export function applyThemeVars(el, themeId, mode) {
|
|
19
|
+
const vars = themeVars(themeId, mode);
|
|
20
|
+
for (const [name, value] of Object.entries(vars))
|
|
21
|
+
el.style.setProperty(name, value);
|
|
22
|
+
return vars;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=theme-vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-vars.js","sourceRoot":"","sources":["../src/theme-vars.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAkB,MAAM,qBAAqB,CAAC;AAEpF;yDACyD;AACzD,MAAM,UAAU,SAAS,CAAC,OAAe,EAAE,IAAe;IACxD,OAAO,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AACtD,CAAC;AASD;gFACgF;AAChF,MAAM,UAAU,cAAc,CAAC,EAAe,EAAE,OAAe,EAAE,IAAe;IAC9E,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACtC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface FilterAutocompleteProps<T extends object> {
|
|
2
|
+
/** The full option set; filtering happens client-side over `getLabel`. */
|
|
3
|
+
items: readonly T[];
|
|
4
|
+
/** The currently selected option's key, or null when nothing is chosen. */
|
|
5
|
+
selectedKey: string | null;
|
|
6
|
+
getKey: (item: T) => string;
|
|
7
|
+
getLabel: (item: T) => string;
|
|
8
|
+
onSelect: (item: T) => void;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
/** Trigger text shown when nothing is selected. */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Placeholder inside the filter search box. */
|
|
13
|
+
searchPlaceholder?: string;
|
|
14
|
+
/** Shown when the filter matches nothing. */
|
|
15
|
+
emptyLabel?: string;
|
|
16
|
+
/** Required for a11y (the picker has no visible label). */
|
|
17
|
+
"aria-label": string;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function FilterAutocomplete<T extends object>({ items, selectedKey, getKey, getLabel, onSelect, isDisabled, placeholder, searchPlaceholder, emptyLabel, "aria-label": ariaLabel, className, }: FilterAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=filter-autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-autocomplete.d.ts","sourceRoot":"","sources":["../../src/widgets/filter-autocomplete.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM;IACvD,0EAA0E;IAC1E,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IACpB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC5B,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,EACnD,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAuB,EACvB,iBAA6B,EAC7B,UAAuB,EACvB,YAAY,EAAE,SAAS,EACvB,SAAS,GACV,EAAE,uBAAuB,CAAC,CAAC,CAAC,2CAuC5B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* (7.3 / task 03 — W3a) `FilterAutocomplete` — the composed, generic substrate
|
|
4
|
+
* that retires the bespoke web `model-picker.tsx` `[11.2]` (design §3.3). It
|
|
5
|
+
* folds HeroUI v3's `Autocomplete` compound boilerplate (Trigger → Value →
|
|
6
|
+
* Popover → Filter → SearchField + ListBox) into a single typed component: the
|
|
7
|
+
* caller passes `items`, the selected key, and `getKey`/`getLabel`/`onSelect`.
|
|
8
|
+
*
|
|
9
|
+
* Client-side filtering uses a plain `contains` predicate (RAC's `filter` prop
|
|
10
|
+
* is just `(textValue, inputValue) => boolean`), so no `useFilter` dependency.
|
|
11
|
+
* The W4 client migration builds its `ModelPicker` on this; the pure
|
|
12
|
+
* `filterModels` test stays, and real keyboard/filter interaction is covered by
|
|
13
|
+
* the Storybook browser-mode pass (design §4). Theme comes from the panel's
|
|
14
|
+
* `.chances-theme` scope (see heroui-theme.ts). Requires the optional
|
|
15
|
+
* `@heroui/react` peer — only this `./widgets` entry pulls it in.
|
|
16
|
+
*/
|
|
17
|
+
import { Autocomplete, EmptyState, ListBox, ListBoxItem, SearchField } from "@heroui/react";
|
|
18
|
+
import { cn } from "../cn.js";
|
|
19
|
+
const contains = (textValue, inputValue) => textValue.toLowerCase().includes(inputValue.trim().toLowerCase());
|
|
20
|
+
export function FilterAutocomplete({ items, selectedKey, getKey, getLabel, onSelect, isDisabled, placeholder = "select…", searchPlaceholder = "filter…", emptyLabel = "no match", "aria-label": ariaLabel, className, }) {
|
|
21
|
+
const selected = selectedKey == null ? null : (items.find((it) => getKey(it) === selectedKey) ?? null);
|
|
22
|
+
return (_jsxs(Autocomplete, { "aria-label": ariaLabel, selectedKey: selectedKey, isDisabled: isDisabled, onSelectionChange: (key) => {
|
|
23
|
+
if (key == null)
|
|
24
|
+
return;
|
|
25
|
+
const item = items.find((it) => getKey(it) === String(key));
|
|
26
|
+
if (item)
|
|
27
|
+
onSelect(item);
|
|
28
|
+
}, className: cn("inline-flex", className), children: [_jsxs(Autocomplete.Trigger, { children: [_jsx(Autocomplete.Value, { children: selected ? getLabel(selected) : placeholder }), _jsx(Autocomplete.Indicator, {})] }), _jsx(Autocomplete.Popover, { children: _jsxs(Autocomplete.Filter, { filter: contains, children: [_jsx(SearchField, { autoFocus: true, "aria-label": `filter ${ariaLabel}`, children: _jsxs(SearchField.Group, { children: [_jsx(SearchField.SearchIcon, {}), _jsx(SearchField.Input, { placeholder: searchPlaceholder }), _jsx(SearchField.ClearButton, {})] }) }), _jsx(ListBox, { "aria-label": ariaLabel, items: items, renderEmptyState: () => _jsx(EmptyState, { children: emptyLabel }), children: (item) => (_jsx(ListBoxItem, { id: getKey(item), textValue: getLabel(item), children: getLabel(item) })) })] }) })] }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=filter-autocomplete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-autocomplete.js","sourceRoot":"","sources":["../../src/widgets/filter-autocomplete.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAsB9B,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,UAAkB,EAAW,EAAE,CAClE,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AAEpE,MAAM,UAAU,kBAAkB,CAAmB,EACnD,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,WAAW,GAAG,SAAS,EACvB,iBAAiB,GAAG,SAAS,EAC7B,UAAU,GAAG,UAAU,EACvB,YAAY,EAAE,SAAS,EACvB,SAAS,GACkB;IAC3B,MAAM,QAAQ,GAAG,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC;IAEvG,OAAO,CACL,MAAC,YAAY,kBACC,SAAS,EACrB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,CAAC,GAAG,EAAE,EAAE;YACzB,IAAI,GAAG,IAAI,IAAI;gBAAE,OAAO;YACxB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YAC5D,IAAI,IAAI;gBAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC,EACD,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC,aAEvC,MAAC,YAAY,CAAC,OAAO,eACnB,KAAC,YAAY,CAAC,KAAK,cAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,GAAsB,EACtF,KAAC,YAAY,CAAC,SAAS,KAAG,IACL,EACvB,KAAC,YAAY,CAAC,OAAO,cACnB,MAAC,YAAY,CAAC,MAAM,IAAC,MAAM,EAAE,QAAQ,aACnC,KAAC,WAAW,IAAC,SAAS,sBAAa,UAAU,SAAS,EAAE,YACtD,MAAC,WAAW,CAAC,KAAK,eAChB,KAAC,WAAW,CAAC,UAAU,KAAG,EAC1B,KAAC,WAAW,CAAC,KAAK,IAAC,WAAW,EAAE,iBAAiB,GAAI,EACrD,KAAC,WAAW,CAAC,WAAW,KAAG,IACT,GACR,EACd,KAAC,OAAO,kBAAa,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,KAAC,UAAU,cAAE,UAAU,GAAc,YACxG,CAAC,IAAO,EAAE,EAAE,CAAC,CACZ,KAAC,WAAW,IAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,YACrD,QAAQ,CAAC,IAAI,CAAC,GACH,CACf,GACO,IACU,GACD,IACV,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W3a) `@chances-ai/design-system/widgets` — the HeroUI v3
|
|
3
|
+
* "rich widget" tier `[11.2]`. This is the ONLY design-system entry that pulls
|
|
4
|
+
* the optional `@heroui/react` peer, so the main barrel stays HeroUI-free (and
|
|
5
|
+
* `bun --compile` clean for the CLI, which never imports widgets).
|
|
6
|
+
*
|
|
7
|
+
* We re-export the blessed HeroUI compound components through one seam — apps
|
|
8
|
+
* import them from design-system, not `@heroui/react` directly, so the
|
|
9
|
+
* integration point (theme wiring via `.chances-theme`, version pinning) is
|
|
10
|
+
* centralized. Heavy behavior (focus-trap, react-aria keyboard nav, overlay
|
|
11
|
+
* positioning) is HeroUI's; we add only `FilterAutocomplete` (the composed
|
|
12
|
+
* model-picker substrate). Self-built chrome (Surface/Text/Button/…) lives in
|
|
13
|
+
* the main barrel — NOT here — per the two-tier split (design §3.2/§3.3).
|
|
14
|
+
*/
|
|
15
|
+
export { Autocomplete, Select, Modal, Drawer, Popover, Menu, Tabs, Tooltip, ListBox, ListBoxItem, ListBoxSection, SearchField, EmptyState, Label, Separator, Spinner, } from "@heroui/react";
|
|
16
|
+
export { FilterAutocomplete, type FilterAutocompleteProps } from "./filter-autocomplete.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,EACX,UAAU,EACV,KAAK,EACL,SAAS,EACT,OAAO,GACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W3a) `@chances-ai/design-system/widgets` — the HeroUI v3
|
|
3
|
+
* "rich widget" tier `[11.2]`. This is the ONLY design-system entry that pulls
|
|
4
|
+
* the optional `@heroui/react` peer, so the main barrel stays HeroUI-free (and
|
|
5
|
+
* `bun --compile` clean for the CLI, which never imports widgets).
|
|
6
|
+
*
|
|
7
|
+
* We re-export the blessed HeroUI compound components through one seam — apps
|
|
8
|
+
* import them from design-system, not `@heroui/react` directly, so the
|
|
9
|
+
* integration point (theme wiring via `.chances-theme`, version pinning) is
|
|
10
|
+
* centralized. Heavy behavior (focus-trap, react-aria keyboard nav, overlay
|
|
11
|
+
* positioning) is HeroUI's; we add only `FilterAutocomplete` (the composed
|
|
12
|
+
* model-picker substrate). Self-built chrome (Surface/Text/Button/…) lives in
|
|
13
|
+
* the main barrel — NOT here — per the two-tier split (design §3.2/§3.3).
|
|
14
|
+
*/
|
|
15
|
+
export { Autocomplete, Select, Modal, Drawer, Popover, Menu, Tabs, Tooltip, ListBox, ListBoxItem, ListBoxSection, SearchField, EmptyState, Label, Separator, Spinner, } from "@heroui/react";
|
|
16
|
+
export { FilterAutocomplete } from "./filter-autocomplete.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAW,EACX,cAAc,EACd,WAAW,EACX,UAAU,EACV,KAAK,EACL,SAAS,EACT,OAAO,GACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,kBAAkB,EAAgC,MAAM,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chances-ai/design-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,21 +8,74 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.js"
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
"./widgets": {
|
|
13
|
+
"types": "./dist/widgets/index.d.ts",
|
|
14
|
+
"import": "./dist/widgets/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./styles": "./src/tokens.css",
|
|
17
|
+
"./heroui-theme.css": "./src/heroui-theme.css"
|
|
12
18
|
},
|
|
13
19
|
"files": [
|
|
14
|
-
"dist"
|
|
20
|
+
"dist",
|
|
21
|
+
"src/tokens.css",
|
|
22
|
+
"src/heroui-theme.css"
|
|
15
23
|
],
|
|
16
24
|
"dependencies": {
|
|
17
|
-
"@chances-ai/ui-core": "
|
|
18
|
-
"
|
|
25
|
+
"@chances-ai/ui-core": "24.1.0",
|
|
26
|
+
"clsx": "^2.1.1",
|
|
27
|
+
"lucide-react": "1.17.0",
|
|
28
|
+
"tailwind-merge": "^3.4.0",
|
|
29
|
+
"tailwind-variants": "^3.2.2"
|
|
19
30
|
},
|
|
20
31
|
"peerDependencies": {
|
|
21
|
-
"react": "^
|
|
32
|
+
"@heroui/react": "^3.1.0",
|
|
33
|
+
"react": "^19.2",
|
|
34
|
+
"react-dom": "^19.2",
|
|
35
|
+
"tailwindcss": "^4.0.0"
|
|
36
|
+
},
|
|
37
|
+
"peerDependenciesMeta": {
|
|
38
|
+
"@heroui/react": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"react": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"react-dom": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"tailwindcss": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@heroui/react": "^3.1.0",
|
|
53
|
+
"@storybook/addon-a11y": "10.4.1",
|
|
54
|
+
"@storybook/addon-vitest": "10.4.1",
|
|
55
|
+
"@storybook/react-vite": "10.4.1",
|
|
56
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
57
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
58
|
+
"@vitest/browser": "3.2.6",
|
|
59
|
+
"@vitest/expect": "3.2.6",
|
|
60
|
+
"@vitest/runner": "3.2.6",
|
|
61
|
+
"@vitest/snapshot": "3.2.6",
|
|
62
|
+
"@vitest/spy": "3.2.6",
|
|
63
|
+
"@vitest/utils": "3.2.6",
|
|
64
|
+
"playwright": "^1.60.0",
|
|
65
|
+
"react": "^19.2",
|
|
66
|
+
"react-dom": "^19.2",
|
|
67
|
+
"storybook": "10.4.1",
|
|
68
|
+
"tailwindcss": "^4.0.0",
|
|
69
|
+
"vite": "^6.0.0",
|
|
70
|
+
"vitest": "3.2.6"
|
|
22
71
|
},
|
|
23
72
|
"scripts": {
|
|
24
73
|
"build": "tsc -b",
|
|
25
74
|
"check": "tsc -b",
|
|
26
|
-
"test": "bun test"
|
|
75
|
+
"test": "bun test --timeout 30000",
|
|
76
|
+
"test:stories": "vitest run",
|
|
77
|
+
"storybook": "storybook dev -p 6006 --no-open --disable-telemetry",
|
|
78
|
+
"build:storybook": "storybook build --disable-telemetry",
|
|
79
|
+
"gen:theme": "bun ../../scripts/gen-theme-css.ts"
|
|
27
80
|
}
|
|
28
81
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* (7.3 / task 03 — W3a) HeroUI v3 theme bridge — generated-shape, kept in sync
|
|
2
|
+
with `heroui-theme.ts` `HEROUI_BASE_VAR_MAP` (the test enforces parity).
|
|
3
|
+
|
|
4
|
+
UNLAYERED ON PURPOSE: HeroUI declares its variables inside `@layer base`, and
|
|
5
|
+
in the CSS cascade an unlayered rule beats any layered rule regardless of
|
|
6
|
+
source order — so these overrides win without `!important`. We override only
|
|
7
|
+
HeroUI's BASE variables; its "calculated" vars (--surface-hover, --*-soft,
|
|
8
|
+
--border-secondary, …) recompute automatically via `color-mix()` from these.
|
|
9
|
+
|
|
10
|
+
Usage: put `chances-theme` + a mode class (`dark`/`light`) on the panel root,
|
|
11
|
+
and set the `--ch-*` values on that same element (design-system `themeVars` /
|
|
12
|
+
`applyThemeVars`). Then every HeroUI widget rendered inside the panel adopts
|
|
13
|
+
the seed palette. See `heroUiThemeClassName(mode)`. */
|
|
14
|
+
.chances-theme {
|
|
15
|
+
--background: var(--ch-bg-base);
|
|
16
|
+
--foreground: var(--ch-text-base);
|
|
17
|
+
--surface: var(--ch-surface-base);
|
|
18
|
+
--surface-foreground: var(--ch-text-base);
|
|
19
|
+
--surface-secondary: var(--ch-surface-raised);
|
|
20
|
+
--surface-secondary-foreground: var(--ch-text-base);
|
|
21
|
+
--surface-tertiary: var(--ch-bg-weak);
|
|
22
|
+
--surface-tertiary-foreground: var(--ch-text-base);
|
|
23
|
+
--overlay: var(--ch-surface-raised);
|
|
24
|
+
--overlay-foreground: var(--ch-text-base);
|
|
25
|
+
--muted: var(--ch-text-weak);
|
|
26
|
+
--default: var(--ch-bg-weak);
|
|
27
|
+
--default-foreground: var(--ch-text-base);
|
|
28
|
+
--success: var(--ch-success);
|
|
29
|
+
--success-foreground: var(--ch-text-on-success);
|
|
30
|
+
--warning: var(--ch-warning);
|
|
31
|
+
--warning-foreground: var(--ch-text-on-warning);
|
|
32
|
+
--danger: var(--ch-error);
|
|
33
|
+
--danger-foreground: var(--ch-text-on-error);
|
|
34
|
+
--border: var(--ch-border-base);
|
|
35
|
+
--separator: var(--ch-border-weak);
|
|
36
|
+
--field-background: var(--ch-input-base);
|
|
37
|
+
--field-foreground: var(--ch-text-base);
|
|
38
|
+
--segment: var(--ch-surface-raised);
|
|
39
|
+
--segment-foreground: var(--ch-text-base);
|
|
40
|
+
}
|
package/src/tokens.css
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* GENERATED by scripts/gen-theme-css.ts — DO NOT EDIT. Run `bun scripts/gen-theme-css.ts`. */
|
|
2
|
+
/* The seed OKLCH engine (ui-core) is the single source: the @theme block binds
|
|
3
|
+
each Tailwind color utility to a runtime --ch-* var; applyThemeVars (theme-vars.ts)
|
|
4
|
+
sets those vars per selected theme + mode. The :root block is the default-dark
|
|
5
|
+
fallback so the kit renders before a theme is applied. */
|
|
6
|
+
|
|
7
|
+
@theme {
|
|
8
|
+
--color-accent: var(--ch-accent);
|
|
9
|
+
--color-success: var(--ch-success);
|
|
10
|
+
--color-error: var(--ch-error);
|
|
11
|
+
--color-warning: var(--ch-warning);
|
|
12
|
+
--color-permission: var(--ch-permission);
|
|
13
|
+
--color-plan-mode: var(--ch-plan-mode);
|
|
14
|
+
--color-auto-accept: var(--ch-auto-accept);
|
|
15
|
+
--color-bash-pink: var(--ch-bash-pink);
|
|
16
|
+
--color-diff-added-bg: var(--ch-diff-added-bg);
|
|
17
|
+
--color-diff-removed-bg: var(--ch-diff-removed-bg);
|
|
18
|
+
--color-diff-added-word-bg: var(--ch-diff-added-word-bg);
|
|
19
|
+
--color-diff-removed-word-bg: var(--ch-diff-removed-word-bg);
|
|
20
|
+
--color-user-message-bg: var(--ch-user-message-bg);
|
|
21
|
+
--color-stall: var(--ch-stall);
|
|
22
|
+
--color-syn-keyword: var(--ch-syn-keyword);
|
|
23
|
+
--color-syn-string: var(--ch-syn-string);
|
|
24
|
+
--color-syn-comment: var(--ch-syn-comment);
|
|
25
|
+
--color-syn-number: var(--ch-syn-number);
|
|
26
|
+
--color-syn-function: var(--ch-syn-function);
|
|
27
|
+
--color-syn-type: var(--ch-syn-type);
|
|
28
|
+
--color-syn-literal: var(--ch-syn-literal);
|
|
29
|
+
--color-syn-title: var(--ch-syn-title);
|
|
30
|
+
--color-syn-attr: var(--ch-syn-attr);
|
|
31
|
+
--color-bg-base: var(--ch-bg-base);
|
|
32
|
+
--color-bg-weak: var(--ch-bg-weak);
|
|
33
|
+
--color-bg-strong: var(--ch-bg-strong);
|
|
34
|
+
--color-surface-base: var(--ch-surface-base);
|
|
35
|
+
--color-surface-raised: var(--ch-surface-raised);
|
|
36
|
+
--color-surface-inset: var(--ch-surface-inset);
|
|
37
|
+
--color-surface-hover: var(--ch-surface-hover);
|
|
38
|
+
--color-surface-active: var(--ch-surface-active);
|
|
39
|
+
--color-text-base: var(--ch-text-base);
|
|
40
|
+
--color-text-weak: var(--ch-text-weak);
|
|
41
|
+
--color-text-weaker: var(--ch-text-weaker);
|
|
42
|
+
--color-text-strong: var(--ch-text-strong);
|
|
43
|
+
--color-border-base: var(--ch-border-base);
|
|
44
|
+
--color-border-weak: var(--ch-border-weak);
|
|
45
|
+
--color-border-strong: var(--ch-border-strong);
|
|
46
|
+
--color-border-focus: var(--ch-border-focus);
|
|
47
|
+
--color-border-selected: var(--ch-border-selected);
|
|
48
|
+
--color-input-base: var(--ch-input-base);
|
|
49
|
+
--color-input-hover: var(--ch-input-hover);
|
|
50
|
+
--color-input-focus: var(--ch-input-focus);
|
|
51
|
+
--color-input-disabled: var(--ch-input-disabled);
|
|
52
|
+
--color-icon-base: var(--ch-icon-base);
|
|
53
|
+
--color-icon-weak: var(--ch-icon-weak);
|
|
54
|
+
--color-icon-strong: var(--ch-icon-strong);
|
|
55
|
+
--color-icon-disabled: var(--ch-icon-disabled);
|
|
56
|
+
--color-button-primary: var(--ch-button-primary);
|
|
57
|
+
--color-button-secondary: var(--ch-button-secondary);
|
|
58
|
+
--color-button-ghost-hover: var(--ch-button-ghost-hover);
|
|
59
|
+
--color-diff-add-surface: var(--ch-diff-add-surface);
|
|
60
|
+
--color-diff-delete-surface: var(--ch-diff-delete-surface);
|
|
61
|
+
--color-diff-change-bar-add: var(--ch-diff-change-bar-add);
|
|
62
|
+
--color-diff-change-bar-delete: var(--ch-diff-change-bar-delete);
|
|
63
|
+
--color-diff-change-bar-modified: var(--ch-diff-change-bar-modified);
|
|
64
|
+
--color-md-heading: var(--ch-md-heading);
|
|
65
|
+
--color-md-link: var(--ch-md-link);
|
|
66
|
+
--color-md-code: var(--ch-md-code);
|
|
67
|
+
--color-md-quote: var(--ch-md-quote);
|
|
68
|
+
--color-md-strong: var(--ch-md-strong);
|
|
69
|
+
--color-md-emph: var(--ch-md-emph);
|
|
70
|
+
--color-text-on-accent: var(--ch-text-on-accent);
|
|
71
|
+
--color-text-on-success: var(--ch-text-on-success);
|
|
72
|
+
--color-text-on-error: var(--ch-text-on-error);
|
|
73
|
+
--color-text-on-warning: var(--ch-text-on-warning);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:root {
|
|
77
|
+
--ch-accent: rgb(215,119,87);
|
|
78
|
+
--ch-success: rgb(78,186,101);
|
|
79
|
+
--ch-error: rgb(255,107,128);
|
|
80
|
+
--ch-warning: rgb(255,193,7);
|
|
81
|
+
--ch-permission: rgb(177,185,249);
|
|
82
|
+
--ch-plan-mode: rgb(72,150,140);
|
|
83
|
+
--ch-auto-accept: rgb(175,135,255);
|
|
84
|
+
--ch-bash-pink: rgb(253,93,177);
|
|
85
|
+
--ch-stall: rgb(171,43,63);
|
|
86
|
+
--ch-user-message-bg: rgb(55,55,55);
|
|
87
|
+
--ch-diff-added-bg: rgb(34,92,43);
|
|
88
|
+
--ch-diff-removed-bg: rgb(122,41,54);
|
|
89
|
+
--ch-diff-added-word-bg: rgb(56,166,96);
|
|
90
|
+
--ch-diff-removed-word-bg: rgb(179,89,107);
|
|
91
|
+
--ch-syn-keyword: rgb(198,120,221);
|
|
92
|
+
--ch-syn-string: rgb(152,195,121);
|
|
93
|
+
--ch-syn-comment: rgb(106,115,125);
|
|
94
|
+
--ch-syn-number: rgb(209,154,102);
|
|
95
|
+
--ch-syn-function: rgb(97,175,239);
|
|
96
|
+
--ch-syn-type: rgb(229,192,123);
|
|
97
|
+
--ch-syn-literal: rgb(86,182,194);
|
|
98
|
+
--ch-syn-title: rgb(97,175,239);
|
|
99
|
+
--ch-syn-attr: rgb(209,154,102);
|
|
100
|
+
--ch-bg-base: rgb(0,0,0);
|
|
101
|
+
--ch-bg-weak: rgb(12,12,12);
|
|
102
|
+
--ch-bg-strong: rgb(12,12,12);
|
|
103
|
+
--ch-surface-base: rgb(12,12,12);
|
|
104
|
+
--ch-surface-raised: rgb(17,17,17);
|
|
105
|
+
--ch-surface-inset: rgb(9,9,9);
|
|
106
|
+
--ch-surface-hover: rgb(17,17,17);
|
|
107
|
+
--ch-surface-active: rgb(22,22,22);
|
|
108
|
+
--ch-text-base: rgb(255,255,255);
|
|
109
|
+
--ch-text-weak: rgb(98,98,98);
|
|
110
|
+
--ch-text-weaker: rgb(73,73,73);
|
|
111
|
+
--ch-text-strong: rgb(240,240,240);
|
|
112
|
+
--ch-border-base: rgb(85,85,85);
|
|
113
|
+
--ch-border-weak: rgb(22,22,22);
|
|
114
|
+
--ch-border-strong: rgb(52,52,52);
|
|
115
|
+
--ch-border-focus: rgb(85,111,246);
|
|
116
|
+
--ch-border-selected: rgb(85,111,246);
|
|
117
|
+
--ch-input-base: rgb(12,12,12);
|
|
118
|
+
--ch-input-hover: rgb(17,17,17);
|
|
119
|
+
--ch-input-focus: rgb(36,46,157);
|
|
120
|
+
--ch-input-disabled: rgb(22,22,22);
|
|
121
|
+
--ch-icon-base: rgb(127,127,127);
|
|
122
|
+
--ch-icon-weak: rgb(52,52,52);
|
|
123
|
+
--ch-icon-strong: rgb(240,240,240);
|
|
124
|
+
--ch-icon-disabled: rgb(39,39,39);
|
|
125
|
+
--ch-button-primary: rgb(240,240,240);
|
|
126
|
+
--ch-button-secondary: rgb(17,17,17);
|
|
127
|
+
--ch-button-ghost-hover: rgb(17,17,17);
|
|
128
|
+
--ch-diff-add-surface: rgb(0,20,5);
|
|
129
|
+
--ch-diff-delete-surface: rgb(36,0,9);
|
|
130
|
+
--ch-diff-change-bar-add: rgb(22,108,57);
|
|
131
|
+
--ch-diff-change-bar-delete: rgb(163,22,70);
|
|
132
|
+
--ch-diff-change-bar-modified: rgb(113,86,17);
|
|
133
|
+
--ch-md-heading: rgb(254,212,199);
|
|
134
|
+
--ch-md-link: rgb(211,222,254);
|
|
135
|
+
--ch-md-code: rgb(131,254,154);
|
|
136
|
+
--ch-md-quote: rgb(254,221,154);
|
|
137
|
+
--ch-md-strong: rgb(254,212,199);
|
|
138
|
+
--ch-md-emph: rgb(254,221,154);
|
|
139
|
+
--ch-text-on-accent: rgb(0,0,0);
|
|
140
|
+
--ch-text-on-success: rgb(0,0,0);
|
|
141
|
+
--ch-text-on-error: rgb(0,0,0);
|
|
142
|
+
--ch-text-on-warning: rgb(0,0,0);
|
|
143
|
+
}
|
package/dist/tamagui.config.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
export declare const config: import("@tamagui/core").TamaguiInternalConfig<{
|
|
2
|
-
color: {
|
|
3
|
-
white: import("@tamagui/core").Variable<string>;
|
|
4
|
-
black: import("@tamagui/core").Variable<string>;
|
|
5
|
-
accent: import("@tamagui/core").Variable<string>;
|
|
6
|
-
success: import("@tamagui/core").Variable<string>;
|
|
7
|
-
error: import("@tamagui/core").Variable<string>;
|
|
8
|
-
warning: import("@tamagui/core").Variable<string>;
|
|
9
|
-
permission: import("@tamagui/core").Variable<string>;
|
|
10
|
-
planMode: import("@tamagui/core").Variable<string>;
|
|
11
|
-
autoAccept: import("@tamagui/core").Variable<string>;
|
|
12
|
-
bashPink: import("@tamagui/core").Variable<string>;
|
|
13
|
-
};
|
|
14
|
-
space: {
|
|
15
|
-
0: import("@tamagui/core").Variable<number>;
|
|
16
|
-
1: import("@tamagui/core").Variable<number>;
|
|
17
|
-
2: import("@tamagui/core").Variable<number>;
|
|
18
|
-
3: import("@tamagui/core").Variable<number>;
|
|
19
|
-
4: import("@tamagui/core").Variable<number>;
|
|
20
|
-
5: import("@tamagui/core").Variable<number>;
|
|
21
|
-
6: import("@tamagui/core").Variable<number>;
|
|
22
|
-
true: import("@tamagui/core").Variable<number>;
|
|
23
|
-
};
|
|
24
|
-
size: {
|
|
25
|
-
0: import("@tamagui/core").Variable<number>;
|
|
26
|
-
1: import("@tamagui/core").Variable<number>;
|
|
27
|
-
2: import("@tamagui/core").Variable<number>;
|
|
28
|
-
3: import("@tamagui/core").Variable<number>;
|
|
29
|
-
4: import("@tamagui/core").Variable<number>;
|
|
30
|
-
true: import("@tamagui/core").Variable<number>;
|
|
31
|
-
};
|
|
32
|
-
radius: {
|
|
33
|
-
0: import("@tamagui/core").Variable<number>;
|
|
34
|
-
1: import("@tamagui/core").Variable<number>;
|
|
35
|
-
2: import("@tamagui/core").Variable<number>;
|
|
36
|
-
3: import("@tamagui/core").Variable<number>;
|
|
37
|
-
true: import("@tamagui/core").Variable<number>;
|
|
38
|
-
};
|
|
39
|
-
zIndex: {
|
|
40
|
-
0: import("@tamagui/core").Variable<number>;
|
|
41
|
-
1: import("@tamagui/core").Variable<number>;
|
|
42
|
-
2: import("@tamagui/core").Variable<number>;
|
|
43
|
-
true: import("@tamagui/core").Variable<number>;
|
|
44
|
-
};
|
|
45
|
-
} & Omit<{
|
|
46
|
-
space: {
|
|
47
|
-
0: import("@tamagui/core").Variable<number>;
|
|
48
|
-
1: import("@tamagui/core").Variable<number>;
|
|
49
|
-
2: import("@tamagui/core").Variable<number>;
|
|
50
|
-
3: import("@tamagui/core").Variable<number>;
|
|
51
|
-
4: import("@tamagui/core").Variable<number>;
|
|
52
|
-
5: import("@tamagui/core").Variable<number>;
|
|
53
|
-
6: import("@tamagui/core").Variable<number>;
|
|
54
|
-
true: import("@tamagui/core").Variable<number>;
|
|
55
|
-
};
|
|
56
|
-
size: {
|
|
57
|
-
0: import("@tamagui/core").Variable<number>;
|
|
58
|
-
1: import("@tamagui/core").Variable<number>;
|
|
59
|
-
2: import("@tamagui/core").Variable<number>;
|
|
60
|
-
3: import("@tamagui/core").Variable<number>;
|
|
61
|
-
4: import("@tamagui/core").Variable<number>;
|
|
62
|
-
true: import("@tamagui/core").Variable<number>;
|
|
63
|
-
};
|
|
64
|
-
radius: {
|
|
65
|
-
0: import("@tamagui/core").Variable<number>;
|
|
66
|
-
1: import("@tamagui/core").Variable<number>;
|
|
67
|
-
2: import("@tamagui/core").Variable<number>;
|
|
68
|
-
3: import("@tamagui/core").Variable<number>;
|
|
69
|
-
true: import("@tamagui/core").Variable<number>;
|
|
70
|
-
};
|
|
71
|
-
zIndex: {
|
|
72
|
-
0: import("@tamagui/core").Variable<number>;
|
|
73
|
-
1: import("@tamagui/core").Variable<number>;
|
|
74
|
-
2: import("@tamagui/core").Variable<number>;
|
|
75
|
-
true: import("@tamagui/core").Variable<number>;
|
|
76
|
-
};
|
|
77
|
-
color: {
|
|
78
|
-
white: import("@tamagui/core").Variable<string>;
|
|
79
|
-
black: import("@tamagui/core").Variable<string>;
|
|
80
|
-
accent: import("@tamagui/core").Variable<string>;
|
|
81
|
-
success: import("@tamagui/core").Variable<string>;
|
|
82
|
-
error: import("@tamagui/core").Variable<string>;
|
|
83
|
-
warning: import("@tamagui/core").Variable<string>;
|
|
84
|
-
permission: import("@tamagui/core").Variable<string>;
|
|
85
|
-
planMode: import("@tamagui/core").Variable<string>;
|
|
86
|
-
autoAccept: import("@tamagui/core").Variable<string>;
|
|
87
|
-
bashPink: import("@tamagui/core").Variable<string>;
|
|
88
|
-
};
|
|
89
|
-
}, "color" | "space" | "size" | "radius" | "zIndex">, {
|
|
90
|
-
dark: Record<string, string>;
|
|
91
|
-
light: Record<string, string>;
|
|
92
|
-
}, {
|
|
93
|
-
readonly p: "padding";
|
|
94
|
-
readonly px: "paddingHorizontal";
|
|
95
|
-
readonly py: "paddingVertical";
|
|
96
|
-
readonly m: "margin";
|
|
97
|
-
readonly f: "flex";
|
|
98
|
-
readonly w: "width";
|
|
99
|
-
readonly h: "height";
|
|
100
|
-
readonly bg: "backgroundColor";
|
|
101
|
-
}, {
|
|
102
|
-
sm: {
|
|
103
|
-
maxWidth: number;
|
|
104
|
-
};
|
|
105
|
-
gtSm: {
|
|
106
|
-
minWidth: number;
|
|
107
|
-
};
|
|
108
|
-
}, {}, {}, {
|
|
109
|
-
disableSSR: true;
|
|
110
|
-
}, "default">;
|
|
111
|
-
export type AppConfig = typeof config;
|
|
112
|
-
declare module "@tamagui/core" {
|
|
113
|
-
interface TamaguiCustomConfig extends AppConfig {
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
export default config;
|
|
117
|
-
//# sourceMappingURL=tamagui.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tamagui.config.d.ts","sourceRoot":"","sources":["../src/tamagui.config.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAqBjB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,MAAM,CAAC;AAItC,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,mBAAoB,SAAQ,SAAS;KAAG;CACnD;AAED,eAAe,MAAM,CAAC"}
|
package/dist/tamagui.config.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* (v17 M0 / docs/6.1 §4, res #1) The Tamagui design-system config — the SOLE
|
|
3
|
-
* cross-platform design system (Tamagui spans React-DOM + React-Native). M0
|
|
4
|
-
* ships the skeleton: `createTamagui` over ui-core-derived tokens + themes,
|
|
5
|
-
* proving the compile chain works on Bun + `tsc -b` + React 19 BEFORE any
|
|
6
|
-
* component layer consumes it (that lands with web-ui in M1). No components,
|
|
7
|
-
* no compiler plugin (that is a build-time optimization for apps/web).
|
|
8
|
-
*/
|
|
9
|
-
import { createTamagui } from "@tamagui/core";
|
|
10
|
-
import { tokens } from "./tokens.js";
|
|
11
|
-
import { themes } from "./themes.js";
|
|
12
|
-
export const config = createTamagui({
|
|
13
|
-
tokens,
|
|
14
|
-
themes,
|
|
15
|
-
shorthands: {
|
|
16
|
-
p: "padding",
|
|
17
|
-
px: "paddingHorizontal",
|
|
18
|
-
py: "paddingVertical",
|
|
19
|
-
m: "margin",
|
|
20
|
-
f: "flex",
|
|
21
|
-
w: "width",
|
|
22
|
-
h: "height",
|
|
23
|
-
bg: "backgroundColor",
|
|
24
|
-
},
|
|
25
|
-
media: {
|
|
26
|
-
sm: { maxWidth: 860 },
|
|
27
|
-
gtSm: { minWidth: 861 },
|
|
28
|
-
},
|
|
29
|
-
settings: {
|
|
30
|
-
// M0 has no SSR pipeline yet; the web app wires this in M1.
|
|
31
|
-
disableSSR: true,
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
export default config;
|
|
35
|
-
//# sourceMappingURL=tamagui.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tamagui.config.js","sourceRoot":"","sources":["../src/tamagui.config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;IAClC,MAAM;IACN,MAAM;IACN,UAAU,EAAE;QACV,CAAC,EAAE,SAAS;QACZ,EAAE,EAAE,mBAAmB;QACvB,EAAE,EAAE,iBAAiB;QACrB,CAAC,EAAE,QAAQ;QACX,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,OAAO;QACV,CAAC,EAAE,QAAQ;QACX,EAAE,EAAE,iBAAiB;KACb;IACV,KAAK,EAAE;QACL,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;QACrB,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;KACxB;IACD,QAAQ,EAAE;QACR,4DAA4D;QAC5D,UAAU,EAAE,IAAI;KACjB;CACF,CAAC,CAAC;AAUH,eAAe,MAAM,CAAC"}
|
package/dist/themes.d.ts
DELETED
package/dist/themes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
|