@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
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAoB,MAAM,iBAAiB,CAAC;AAE9E,2EAA2E;AAC3E,6EAA6E;AAC7E,OAAO,EAAE,OAAO,EAAE,OAAO,EAA2C,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAqC,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAyC,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAmD,MAAM,8BAA8B,CAAC;AAEzH,4EAA4E;AAC5E,OAAO,EAAE,IAAI,EAAE,aAAa,EAAiC,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,eAAe,EAA2B,MAAM,kBAAkB,CAAC;AAE3F,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,8EAA8E;AAC9E,4DAA4D;AAC5D,OAAO,EAAE,SAAS,EAAE,eAAe,EAA6C,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAA8C,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `Button` — self-built chrome `[11.1]` (NOT HeroUI; HeroUI
|
|
3
|
+
* owns the heavy widgets). tailwind-variants variant/size + optional leading/
|
|
4
|
+
* trailing icon slots (OpenHands Button shape, tv-ified). Reads seed-engine
|
|
5
|
+
* color utilities. Browser-safe.
|
|
6
|
+
*/
|
|
7
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
8
|
+
import { type VariantProps } from "tailwind-variants";
|
|
9
|
+
export declare const button: import("tailwind-variants").TVReturnType<{
|
|
10
|
+
variant: {
|
|
11
|
+
primary: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
ghost: string;
|
|
14
|
+
danger: string;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
};
|
|
21
|
+
}, undefined, "inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:opacity-50 disabled:cursor-default", {
|
|
22
|
+
variant: {
|
|
23
|
+
primary: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
ghost: string;
|
|
26
|
+
danger: string;
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
sm: string;
|
|
30
|
+
md: string;
|
|
31
|
+
lg: string;
|
|
32
|
+
};
|
|
33
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
34
|
+
variant: {
|
|
35
|
+
primary: string;
|
|
36
|
+
secondary: string;
|
|
37
|
+
ghost: string;
|
|
38
|
+
danger: string;
|
|
39
|
+
};
|
|
40
|
+
size: {
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
};
|
|
45
|
+
}, undefined, "inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:opacity-50 disabled:cursor-default", unknown, unknown, undefined>>;
|
|
46
|
+
export type ButtonVariants = VariantProps<typeof button>;
|
|
47
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color">, ButtonVariants {
|
|
48
|
+
start?: ReactNode;
|
|
49
|
+
end?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export declare function Button({ variant, size, start, end, className, children, type, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/primitives/button.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mPAYjB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc;IACzG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAe,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CAQ/G"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { cn } from "../cn.js";
|
|
4
|
+
export const button = tv({
|
|
5
|
+
base: "inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:opacity-50 disabled:cursor-default",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
primary: "bg-accent text-text-on-accent hover:opacity-90",
|
|
9
|
+
secondary: "bg-surface-raised text-text-base border border-border-base hover:bg-surface-hover",
|
|
10
|
+
ghost: "bg-transparent text-text-base hover:bg-surface-hover",
|
|
11
|
+
danger: "bg-error text-text-on-error hover:opacity-90",
|
|
12
|
+
},
|
|
13
|
+
size: { sm: "h-7 px-2 text-xs", md: "h-9 px-3 text-sm", lg: "h-11 px-4 text-base" },
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { variant: "primary", size: "md" },
|
|
16
|
+
});
|
|
17
|
+
export function Button({ variant, size, start, end, className, children, type = "button", ...rest }) {
|
|
18
|
+
return (_jsxs("button", { type: type, className: cn(button({ variant, size }), className), ...rest, children: [start, children, end] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/primitives/button.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,EAAE,EAAqB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAC;IACvB,IAAI,EAAE,sMAAsM;IAC5M,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,gDAAgD;YACzD,SAAS,EAAE,mFAAmF;YAC9F,KAAK,EAAE,sDAAsD;YAC7D,MAAM,EAAE,8CAA8C;SACvD;QACD,IAAI,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,qBAAqB,EAAE;KACpF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;CACpD,CAAC,CAAC;AASH,MAAM,UAAU,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,IAAI,EAAe;IAC9G,OAAO,CACL,kBAAQ,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,aAC9E,KAAK,EACL,QAAQ,EACR,GAAG,IACG,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `Card` — a raised, bordered, rounded {@link Surface}
|
|
3
|
+
* preset for panels/sidebars. Browser-safe.
|
|
4
|
+
*/
|
|
5
|
+
import { type SurfaceProps } from "./surface.js";
|
|
6
|
+
export declare function Card({ level, border, radius, padding, ...rest }: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/primitives/card.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,wBAAgB,IAAI,CAAC,EAAE,KAAgB,EAAE,MAAe,EAAE,MAAa,EAAE,OAAc,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,2CAE/G"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* (7.3 / task 03 — W2) `Card` — a raised, bordered, rounded {@link Surface}
|
|
4
|
+
* preset for panels/sidebars. Browser-safe.
|
|
5
|
+
*/
|
|
6
|
+
import { Surface } from "./surface.js";
|
|
7
|
+
export function Card({ level = "raised", border = "base", radius = "lg", padding = "md", ...rest }) {
|
|
8
|
+
return _jsx(Surface, { level: level, border: border, radius: radius, padding: padding, ...rest });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/primitives/card.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAE1D,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,IAAI,EAAgB;IAC9G,OAAO,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAM,IAAI,GAAI,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `ScrollArea` — an overflow-scroll {@link Surface} preset
|
|
3
|
+
* for the transcript / file-tree / sidebar panes. Browser-safe.
|
|
4
|
+
*/
|
|
5
|
+
import { type SurfaceProps } from "./surface.js";
|
|
6
|
+
export declare function ScrollArea({ overflow, grow, className, ...rest }: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/primitives/scroll-area.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,wBAAgB,UAAU,CAAC,EAAE,QAAiB,EAAE,IAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,2CAE9F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* (7.3 / task 03 — W2) `ScrollArea` — an overflow-scroll {@link Surface} preset
|
|
4
|
+
* for the transcript / file-tree / sidebar panes. Browser-safe.
|
|
5
|
+
*/
|
|
6
|
+
import { Surface } from "./surface.js";
|
|
7
|
+
export function ScrollArea({ overflow = "auto", grow = true, className, ...rest }) {
|
|
8
|
+
return _jsx(Surface, { overflow: overflow, grow: grow, className: className, ...rest });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.js","sourceRoot":"","sources":["../../src/primitives/scroll-area.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAE1D,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAgB;IAC7F,OAAO,KAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,KAAM,IAAI,GAAI,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `Stack` / `Row` — thin row/column convenience over
|
|
3
|
+
* {@link Surface} (the most common layout shape during the W4 migration). `Stack`
|
|
4
|
+
* is a column, `Row` a row; both forward all Surface variants. Browser-safe.
|
|
5
|
+
*/
|
|
6
|
+
import { type SurfaceProps } from "./surface.js";
|
|
7
|
+
export declare function Stack(props: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function Row(props: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/primitives/stack.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,wBAAgB,KAAK,CAAC,KAAK,EAAE,YAAY,2CAExC;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,YAAY,2CAEtC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* (7.3 / task 03 — W2) `Stack` / `Row` — thin row/column convenience over
|
|
4
|
+
* {@link Surface} (the most common layout shape during the W4 migration). `Stack`
|
|
5
|
+
* is a column, `Row` a row; both forward all Surface variants. Browser-safe.
|
|
6
|
+
*/
|
|
7
|
+
import { Surface } from "./surface.js";
|
|
8
|
+
export function Stack(props) {
|
|
9
|
+
return _jsx(Surface, { direction: "column", ...props });
|
|
10
|
+
}
|
|
11
|
+
export function Row(props) {
|
|
12
|
+
return _jsx(Surface, { direction: "row", ...props });
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../../src/primitives/stack.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAE1D,MAAM,UAAU,KAAK,CAAC,KAAmB;IACvC,OAAO,KAAC,OAAO,IAAC,SAAS,EAAC,QAAQ,KAAK,KAAK,GAAI,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,KAAmB;IACrC,OAAO,KAAC,OAAO,IAAC,SAAS,EAAC,KAAK,KAAK,KAAK,GAAI,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `StatusBadge` — the plan-mode / auto-accept / yolo / risk
|
|
3
|
+
* pill, reusing the brand token utilities `[11.1]`. `tone` picks the semantic
|
|
4
|
+
* color. Browser-safe.
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from "react";
|
|
7
|
+
import { type VariantProps } from "tailwind-variants";
|
|
8
|
+
export declare const statusBadge: import("tailwind-variants").TVReturnType<{
|
|
9
|
+
tone: {
|
|
10
|
+
plan: string;
|
|
11
|
+
accept: string;
|
|
12
|
+
success: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
error: string;
|
|
15
|
+
neutral: string;
|
|
16
|
+
};
|
|
17
|
+
}, undefined, "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", {
|
|
18
|
+
tone: {
|
|
19
|
+
plan: string;
|
|
20
|
+
accept: string;
|
|
21
|
+
success: string;
|
|
22
|
+
warning: string;
|
|
23
|
+
error: string;
|
|
24
|
+
neutral: string;
|
|
25
|
+
};
|
|
26
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
27
|
+
tone: {
|
|
28
|
+
plan: string;
|
|
29
|
+
accept: string;
|
|
30
|
+
success: string;
|
|
31
|
+
warning: string;
|
|
32
|
+
error: string;
|
|
33
|
+
neutral: string;
|
|
34
|
+
};
|
|
35
|
+
}, undefined, "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", unknown, unknown, undefined>>;
|
|
36
|
+
export type StatusBadgeVariants = VariantProps<typeof statusBadge>;
|
|
37
|
+
export interface StatusBadgeProps extends StatusBadgeVariants {
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function StatusBadge({ tone, className, children }: StatusBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
//# sourceMappingURL=status-badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/primitives/status-badge.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;0HAatB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;AAEnE,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CAE1E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { cn } from "../cn.js";
|
|
4
|
+
export const statusBadge = tv({
|
|
5
|
+
base: "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",
|
|
6
|
+
variants: {
|
|
7
|
+
tone: {
|
|
8
|
+
plan: "text-plan-mode border border-plan-mode",
|
|
9
|
+
accept: "text-auto-accept border border-auto-accept",
|
|
10
|
+
success: "text-success border border-success",
|
|
11
|
+
warning: "text-warning border border-warning",
|
|
12
|
+
error: "text-error border border-error",
|
|
13
|
+
neutral: "text-text-weak border border-border-base",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: { tone: "neutral" },
|
|
17
|
+
});
|
|
18
|
+
export function StatusBadge({ tone, className, children }) {
|
|
19
|
+
return _jsx("span", { className: cn(statusBadge({ tone }), className), children: children });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=status-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-badge.js","sourceRoot":"","sources":["../../src/primitives/status-badge.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,EAAE,EAAqB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;IAC5B,IAAI,EAAE,6EAA6E;IACnF,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,IAAI,EAAE,wCAAwC;YAC9C,MAAM,EAAE,4CAA4C;YACpD,OAAO,EAAE,oCAAoC;YAC7C,OAAO,EAAE,oCAAoC;YAC7C,KAAK,EAAE,gCAAgC;YACvC,OAAO,EAAE,0CAA0C;SACpD;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AASH,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAoB;IACzE,OAAO,eAAM,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAQ,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `Surface` — the flex container primitive `[11.11]`, the
|
|
3
|
+
* tailwind-variants replacement for the inline-style `Box` (retired in W4). Reads
|
|
4
|
+
* the seed-engine `@theme` color utilities (`bg-bg-base` / `bg-surface-raised` /
|
|
5
|
+
* `border-border-base`). Layout beyond the common variants → `className`
|
|
6
|
+
* (Tailwind utilities) or `style` (one-off escape hatch). Browser-safe.
|
|
7
|
+
*/
|
|
8
|
+
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
9
|
+
import { type VariantProps } from "tailwind-variants";
|
|
10
|
+
export declare const surface: import("tailwind-variants").TVReturnType<{
|
|
11
|
+
direction: {
|
|
12
|
+
row: string;
|
|
13
|
+
column: string;
|
|
14
|
+
};
|
|
15
|
+
level: {
|
|
16
|
+
none: string;
|
|
17
|
+
base: string;
|
|
18
|
+
weak: string;
|
|
19
|
+
raised: string;
|
|
20
|
+
inset: string;
|
|
21
|
+
};
|
|
22
|
+
border: {
|
|
23
|
+
none: string;
|
|
24
|
+
base: string;
|
|
25
|
+
weak: string;
|
|
26
|
+
strong: string;
|
|
27
|
+
};
|
|
28
|
+
radius: {
|
|
29
|
+
none: string;
|
|
30
|
+
sm: string;
|
|
31
|
+
md: string;
|
|
32
|
+
lg: string;
|
|
33
|
+
full: string;
|
|
34
|
+
};
|
|
35
|
+
padding: {
|
|
36
|
+
none: string;
|
|
37
|
+
xs: string;
|
|
38
|
+
sm: string;
|
|
39
|
+
md: string;
|
|
40
|
+
lg: string;
|
|
41
|
+
};
|
|
42
|
+
gap: {
|
|
43
|
+
none: string;
|
|
44
|
+
xs: string;
|
|
45
|
+
sm: string;
|
|
46
|
+
md: string;
|
|
47
|
+
lg: string;
|
|
48
|
+
};
|
|
49
|
+
align: {
|
|
50
|
+
start: string;
|
|
51
|
+
center: string;
|
|
52
|
+
end: string;
|
|
53
|
+
stretch: string;
|
|
54
|
+
};
|
|
55
|
+
justify: {
|
|
56
|
+
start: string;
|
|
57
|
+
center: string;
|
|
58
|
+
end: string;
|
|
59
|
+
between: string;
|
|
60
|
+
};
|
|
61
|
+
grow: {
|
|
62
|
+
true: string;
|
|
63
|
+
false: string;
|
|
64
|
+
};
|
|
65
|
+
overflow: {
|
|
66
|
+
visible: string;
|
|
67
|
+
hidden: string;
|
|
68
|
+
auto: string;
|
|
69
|
+
scroll: string;
|
|
70
|
+
};
|
|
71
|
+
}, undefined, "flex", {
|
|
72
|
+
direction: {
|
|
73
|
+
row: string;
|
|
74
|
+
column: string;
|
|
75
|
+
};
|
|
76
|
+
level: {
|
|
77
|
+
none: string;
|
|
78
|
+
base: string;
|
|
79
|
+
weak: string;
|
|
80
|
+
raised: string;
|
|
81
|
+
inset: string;
|
|
82
|
+
};
|
|
83
|
+
border: {
|
|
84
|
+
none: string;
|
|
85
|
+
base: string;
|
|
86
|
+
weak: string;
|
|
87
|
+
strong: string;
|
|
88
|
+
};
|
|
89
|
+
radius: {
|
|
90
|
+
none: string;
|
|
91
|
+
sm: string;
|
|
92
|
+
md: string;
|
|
93
|
+
lg: string;
|
|
94
|
+
full: string;
|
|
95
|
+
};
|
|
96
|
+
padding: {
|
|
97
|
+
none: string;
|
|
98
|
+
xs: string;
|
|
99
|
+
sm: string;
|
|
100
|
+
md: string;
|
|
101
|
+
lg: string;
|
|
102
|
+
};
|
|
103
|
+
gap: {
|
|
104
|
+
none: string;
|
|
105
|
+
xs: string;
|
|
106
|
+
sm: string;
|
|
107
|
+
md: string;
|
|
108
|
+
lg: string;
|
|
109
|
+
};
|
|
110
|
+
align: {
|
|
111
|
+
start: string;
|
|
112
|
+
center: string;
|
|
113
|
+
end: string;
|
|
114
|
+
stretch: string;
|
|
115
|
+
};
|
|
116
|
+
justify: {
|
|
117
|
+
start: string;
|
|
118
|
+
center: string;
|
|
119
|
+
end: string;
|
|
120
|
+
between: string;
|
|
121
|
+
};
|
|
122
|
+
grow: {
|
|
123
|
+
true: string;
|
|
124
|
+
false: string;
|
|
125
|
+
};
|
|
126
|
+
overflow: {
|
|
127
|
+
visible: string;
|
|
128
|
+
hidden: string;
|
|
129
|
+
auto: string;
|
|
130
|
+
scroll: string;
|
|
131
|
+
};
|
|
132
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
133
|
+
direction: {
|
|
134
|
+
row: string;
|
|
135
|
+
column: string;
|
|
136
|
+
};
|
|
137
|
+
level: {
|
|
138
|
+
none: string;
|
|
139
|
+
base: string;
|
|
140
|
+
weak: string;
|
|
141
|
+
raised: string;
|
|
142
|
+
inset: string;
|
|
143
|
+
};
|
|
144
|
+
border: {
|
|
145
|
+
none: string;
|
|
146
|
+
base: string;
|
|
147
|
+
weak: string;
|
|
148
|
+
strong: string;
|
|
149
|
+
};
|
|
150
|
+
radius: {
|
|
151
|
+
none: string;
|
|
152
|
+
sm: string;
|
|
153
|
+
md: string;
|
|
154
|
+
lg: string;
|
|
155
|
+
full: string;
|
|
156
|
+
};
|
|
157
|
+
padding: {
|
|
158
|
+
none: string;
|
|
159
|
+
xs: string;
|
|
160
|
+
sm: string;
|
|
161
|
+
md: string;
|
|
162
|
+
lg: string;
|
|
163
|
+
};
|
|
164
|
+
gap: {
|
|
165
|
+
none: string;
|
|
166
|
+
xs: string;
|
|
167
|
+
sm: string;
|
|
168
|
+
md: string;
|
|
169
|
+
lg: string;
|
|
170
|
+
};
|
|
171
|
+
align: {
|
|
172
|
+
start: string;
|
|
173
|
+
center: string;
|
|
174
|
+
end: string;
|
|
175
|
+
stretch: string;
|
|
176
|
+
};
|
|
177
|
+
justify: {
|
|
178
|
+
start: string;
|
|
179
|
+
center: string;
|
|
180
|
+
end: string;
|
|
181
|
+
between: string;
|
|
182
|
+
};
|
|
183
|
+
grow: {
|
|
184
|
+
true: string;
|
|
185
|
+
false: string;
|
|
186
|
+
};
|
|
187
|
+
overflow: {
|
|
188
|
+
visible: string;
|
|
189
|
+
hidden: string;
|
|
190
|
+
auto: string;
|
|
191
|
+
scroll: string;
|
|
192
|
+
};
|
|
193
|
+
}, undefined, "flex", unknown, unknown, undefined>>;
|
|
194
|
+
export type SurfaceVariants = VariantProps<typeof surface>;
|
|
195
|
+
export interface SurfaceProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, SurfaceVariants {
|
|
196
|
+
children?: ReactNode;
|
|
197
|
+
className?: string;
|
|
198
|
+
style?: CSSProperties;
|
|
199
|
+
}
|
|
200
|
+
export declare function Surface({ direction, level, border, radius, padding, gap, align, justify, grow, overflow, className, children, ...rest }: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
//# sourceMappingURL=surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/primitives/surface.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDA+BlB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;AAE3D,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EAAE,eAAe;IAClG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,EACH,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,YAAY,2CAYd"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { cn } from "../cn.js";
|
|
4
|
+
export const surface = tv({
|
|
5
|
+
base: "flex",
|
|
6
|
+
variants: {
|
|
7
|
+
direction: { row: "flex-row", column: "flex-col" },
|
|
8
|
+
level: {
|
|
9
|
+
none: "",
|
|
10
|
+
base: "bg-bg-base",
|
|
11
|
+
weak: "bg-bg-weak",
|
|
12
|
+
raised: "bg-surface-raised",
|
|
13
|
+
inset: "bg-surface-inset",
|
|
14
|
+
},
|
|
15
|
+
border: {
|
|
16
|
+
none: "",
|
|
17
|
+
base: "border border-border-base",
|
|
18
|
+
weak: "border border-border-weak",
|
|
19
|
+
strong: "border border-border-strong",
|
|
20
|
+
},
|
|
21
|
+
radius: { none: "", sm: "rounded-sm", md: "rounded-md", lg: "rounded-lg", full: "rounded-full" },
|
|
22
|
+
padding: { none: "", xs: "p-1", sm: "p-2", md: "p-3", lg: "p-4" },
|
|
23
|
+
gap: { none: "", xs: "gap-1", sm: "gap-2", md: "gap-3", lg: "gap-4" },
|
|
24
|
+
align: { start: "items-start", center: "items-center", end: "items-end", stretch: "items-stretch" },
|
|
25
|
+
justify: {
|
|
26
|
+
start: "justify-start",
|
|
27
|
+
center: "justify-center",
|
|
28
|
+
end: "justify-end",
|
|
29
|
+
between: "justify-between",
|
|
30
|
+
},
|
|
31
|
+
grow: { true: "flex-1", false: "" },
|
|
32
|
+
overflow: { visible: "", hidden: "overflow-hidden", auto: "overflow-auto", scroll: "overflow-y-auto" },
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: { direction: "column", level: "none", border: "none", radius: "none", padding: "none", gap: "none" },
|
|
35
|
+
});
|
|
36
|
+
export function Surface({ direction, level, border, radius, padding, gap, align, justify, grow, overflow, className, children, ...rest }) {
|
|
37
|
+
return (_jsx("div", { className: cn(surface({ direction, level, border, radius, padding, gap, align, justify, grow, overflow }), className), ...rest, children: children }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/primitives/surface.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,EAAE,EAAqB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE;QAClD,KAAK,EAAE;YACL,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,mBAAmB;YAC3B,KAAK,EAAE,kBAAkB;SAC1B;QACD,MAAM,EAAE;YACN,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,2BAA2B;YACjC,MAAM,EAAE,6BAA6B;SACtC;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE;QAChG,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE;QACjE,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE;QACrE,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE;QACnG,OAAO,EAAE;YACP,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,gBAAgB;YACxB,GAAG,EAAE,aAAa;YAClB,OAAO,EAAE,iBAAiB;SAC3B;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;QACnC,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE;KACvG;IACD,eAAe,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE;CACtH,CAAC,CAAC;AAUH,MAAM,UAAU,OAAO,CAAC,EACtB,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,GAAG,EACH,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACM;IACb,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAC3F,SAAS,CACV,KACG,IAAI,YAEP,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (7.3 / task 03 — W2) `Text` — the typography primitive `[11.11]`, the
|
|
3
|
+
* tailwind-variants replacement for the inline-style `Txt` (retired in W4).
|
|
4
|
+
* `tone` maps to the seed-engine text/state color utilities; `as` picks the
|
|
5
|
+
* element (span default, or h1–h4/p/code/div). One-off colors → `style`.
|
|
6
|
+
* Browser-safe.
|
|
7
|
+
*/
|
|
8
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
9
|
+
import { type VariantProps } from "tailwind-variants";
|
|
10
|
+
export declare const text: import("tailwind-variants").TVReturnType<{
|
|
11
|
+
tone: {
|
|
12
|
+
base: string;
|
|
13
|
+
weak: string;
|
|
14
|
+
weaker: string;
|
|
15
|
+
strong: string;
|
|
16
|
+
accent: string;
|
|
17
|
+
success: string;
|
|
18
|
+
error: string;
|
|
19
|
+
warning: string;
|
|
20
|
+
permission: string;
|
|
21
|
+
inherit: string;
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
xs: string;
|
|
25
|
+
sm: string;
|
|
26
|
+
md: string;
|
|
27
|
+
lg: string;
|
|
28
|
+
xl: string;
|
|
29
|
+
};
|
|
30
|
+
weight: {
|
|
31
|
+
normal: string;
|
|
32
|
+
medium: string;
|
|
33
|
+
semibold: string;
|
|
34
|
+
bold: string;
|
|
35
|
+
};
|
|
36
|
+
mono: {
|
|
37
|
+
true: string;
|
|
38
|
+
false: string;
|
|
39
|
+
};
|
|
40
|
+
truncate: {
|
|
41
|
+
true: string;
|
|
42
|
+
false: string;
|
|
43
|
+
};
|
|
44
|
+
}, undefined, "", {
|
|
45
|
+
tone: {
|
|
46
|
+
base: string;
|
|
47
|
+
weak: string;
|
|
48
|
+
weaker: string;
|
|
49
|
+
strong: string;
|
|
50
|
+
accent: string;
|
|
51
|
+
success: string;
|
|
52
|
+
error: string;
|
|
53
|
+
warning: string;
|
|
54
|
+
permission: string;
|
|
55
|
+
inherit: string;
|
|
56
|
+
};
|
|
57
|
+
size: {
|
|
58
|
+
xs: string;
|
|
59
|
+
sm: string;
|
|
60
|
+
md: string;
|
|
61
|
+
lg: string;
|
|
62
|
+
xl: string;
|
|
63
|
+
};
|
|
64
|
+
weight: {
|
|
65
|
+
normal: string;
|
|
66
|
+
medium: string;
|
|
67
|
+
semibold: string;
|
|
68
|
+
bold: string;
|
|
69
|
+
};
|
|
70
|
+
mono: {
|
|
71
|
+
true: string;
|
|
72
|
+
false: string;
|
|
73
|
+
};
|
|
74
|
+
truncate: {
|
|
75
|
+
true: string;
|
|
76
|
+
false: string;
|
|
77
|
+
};
|
|
78
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
79
|
+
tone: {
|
|
80
|
+
base: string;
|
|
81
|
+
weak: string;
|
|
82
|
+
weaker: string;
|
|
83
|
+
strong: string;
|
|
84
|
+
accent: string;
|
|
85
|
+
success: string;
|
|
86
|
+
error: string;
|
|
87
|
+
warning: string;
|
|
88
|
+
permission: string;
|
|
89
|
+
inherit: string;
|
|
90
|
+
};
|
|
91
|
+
size: {
|
|
92
|
+
xs: string;
|
|
93
|
+
sm: string;
|
|
94
|
+
md: string;
|
|
95
|
+
lg: string;
|
|
96
|
+
xl: string;
|
|
97
|
+
};
|
|
98
|
+
weight: {
|
|
99
|
+
normal: string;
|
|
100
|
+
medium: string;
|
|
101
|
+
semibold: string;
|
|
102
|
+
bold: string;
|
|
103
|
+
};
|
|
104
|
+
mono: {
|
|
105
|
+
true: string;
|
|
106
|
+
false: string;
|
|
107
|
+
};
|
|
108
|
+
truncate: {
|
|
109
|
+
true: string;
|
|
110
|
+
false: string;
|
|
111
|
+
};
|
|
112
|
+
}, undefined, "", unknown, unknown, undefined>>;
|
|
113
|
+
export type TextVariants = VariantProps<typeof text>;
|
|
114
|
+
type TextElement = "span" | "p" | "div" | "code" | "h1" | "h2" | "h3" | "h4" | "label" | "strong";
|
|
115
|
+
export interface TextProps extends TextVariants {
|
|
116
|
+
as?: TextElement;
|
|
117
|
+
children?: ReactNode;
|
|
118
|
+
className?: string;
|
|
119
|
+
style?: CSSProperties;
|
|
120
|
+
title?: string;
|
|
121
|
+
}
|
|
122
|
+
export declare function Text({ as, tone, size, weight, mono, truncate, className, children, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
123
|
+
export {};
|
|
124
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/primitives/text.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAqBf,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AAErD,KAAK,WAAW,GAAG,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;AAElG,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAOhH"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { cn } from "../cn.js";
|
|
4
|
+
export const text = tv({
|
|
5
|
+
base: "",
|
|
6
|
+
variants: {
|
|
7
|
+
tone: {
|
|
8
|
+
base: "text-text-base",
|
|
9
|
+
weak: "text-text-weak",
|
|
10
|
+
weaker: "text-text-weaker",
|
|
11
|
+
strong: "text-text-strong",
|
|
12
|
+
accent: "text-accent",
|
|
13
|
+
success: "text-success",
|
|
14
|
+
error: "text-error",
|
|
15
|
+
warning: "text-warning",
|
|
16
|
+
permission: "text-permission",
|
|
17
|
+
inherit: "",
|
|
18
|
+
},
|
|
19
|
+
size: { xs: "text-xs", sm: "text-sm", md: "text-base", lg: "text-lg", xl: "text-xl" },
|
|
20
|
+
weight: { normal: "font-normal", medium: "font-medium", semibold: "font-semibold", bold: "font-bold" },
|
|
21
|
+
mono: { true: "font-mono", false: "" },
|
|
22
|
+
truncate: { true: "truncate", false: "" },
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: { tone: "base", mono: false, truncate: false },
|
|
25
|
+
});
|
|
26
|
+
export function Text({ as = "span", tone, size, weight, mono, truncate, className, children, ...rest }) {
|
|
27
|
+
const Comp = as;
|
|
28
|
+
return (_jsx(Comp, { className: cn(text({ tone, size, weight, mono, truncate }), className), ...rest, children: children }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=text.js.map
|