@billabex/ui-components 0.0.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/components/button/button.d.ts +24 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.recipe.d.ts +63 -0
- package/dist/components/button/button.recipe.d.ts.map +1 -0
- package/dist/components/button/button.stories.d.ts +46 -0
- package/dist/components/button/button.stories.d.ts.map +1 -0
- package/dist/components/button/button.test.d.ts +2 -0
- package/dist/components/button/button.test.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +5 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +358 -0
- package/dist/preset.d.ts +2 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/preset.js +130 -0
- package/package.json +69 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ButtonVariant, ButtonSize } from './button.recipe';
|
|
3
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** Visual style variant */
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
/** Size preset */
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
/** Content to render inside the button */
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Button — The primary interactive element.
|
|
13
|
+
*
|
|
14
|
+
* RSC-compatible (no `'use client'` needed — pure presentational).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Button variant="primary" size="medium">
|
|
19
|
+
* Click me
|
|
20
|
+
* </Button>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function Button({ variant, size, children, className, disabled, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,2BAA2B;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kBAAkB;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,0CAA0C;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAmB,EACnB,IAAe,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CAUb"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const buttonRecipe: import('../../../styled-system/types').RecipeRuntimeFn<{
|
|
2
|
+
variant: {
|
|
3
|
+
primary: {
|
|
4
|
+
bg: "action.primary";
|
|
5
|
+
color: "text.inverse";
|
|
6
|
+
_hover: {
|
|
7
|
+
bg: "action.primaryHover";
|
|
8
|
+
};
|
|
9
|
+
_active: {
|
|
10
|
+
bg: "action.primaryPressed";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
secondary: {
|
|
14
|
+
bg: "action.secondary";
|
|
15
|
+
color: "text.primary";
|
|
16
|
+
_hover: {
|
|
17
|
+
bg: "action.secondaryHover";
|
|
18
|
+
};
|
|
19
|
+
_active: {
|
|
20
|
+
bg: "action.secondaryHover";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
ghost: {
|
|
24
|
+
bg: "transparent";
|
|
25
|
+
color: "text.primary";
|
|
26
|
+
_hover: {
|
|
27
|
+
bg: "bg.muted";
|
|
28
|
+
};
|
|
29
|
+
_active: {
|
|
30
|
+
bg: "action.secondary";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
destructive: {
|
|
34
|
+
bg: "action.destructive";
|
|
35
|
+
color: "text.inverse";
|
|
36
|
+
_hover: {
|
|
37
|
+
opacity: number;
|
|
38
|
+
};
|
|
39
|
+
_active: {
|
|
40
|
+
opacity: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
medium: {
|
|
46
|
+
height: "32px";
|
|
47
|
+
px: "lg";
|
|
48
|
+
py: "sm";
|
|
49
|
+
fontSize: "body";
|
|
50
|
+
lineHeight: "body";
|
|
51
|
+
};
|
|
52
|
+
small: {
|
|
53
|
+
height: "26px";
|
|
54
|
+
px: "md";
|
|
55
|
+
py: "xs";
|
|
56
|
+
fontSize: "body.sm";
|
|
57
|
+
lineHeight: "body.sm";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
61
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "destructive";
|
|
62
|
+
export type ButtonSize = "medium" | "small";
|
|
63
|
+
//# sourceMappingURL=button.recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.recipe.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.recipe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFvB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,CAAC;AAC9E,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Button;
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {
|
|
8
|
+
variant: {
|
|
9
|
+
control: "select";
|
|
10
|
+
options: string[];
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
size: {
|
|
14
|
+
control: "select";
|
|
15
|
+
options: string[];
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
disabled: {
|
|
19
|
+
control: "boolean";
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
children: {
|
|
23
|
+
control: "text";
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
args: {
|
|
28
|
+
children: string;
|
|
29
|
+
variant: "primary";
|
|
30
|
+
size: "medium";
|
|
31
|
+
disabled: false;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
type Story = StoryObj<typeof meta>;
|
|
36
|
+
export declare const Primary: Story;
|
|
37
|
+
export declare const Secondary: Story;
|
|
38
|
+
export declare const Ghost: Story;
|
|
39
|
+
export declare const Destructive: Story;
|
|
40
|
+
export declare const Small: Story;
|
|
41
|
+
export declare const Disabled: Story;
|
|
42
|
+
/** All variants side by side */
|
|
43
|
+
export declare const AllVariants: Story;
|
|
44
|
+
/** All sizes side by side */
|
|
45
|
+
export declare const AllSizes: Story;
|
|
46
|
+
//# sourceMappingURL=button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,gCAAgC;AAChC,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.test.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGlF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { jsx as V } from "react/jsx-runtime";
|
|
2
|
+
function S(r) {
|
|
3
|
+
return typeof r == "object" && r != null && !Array.isArray(r);
|
|
4
|
+
}
|
|
5
|
+
var L = (r) => typeof r == "object" && r !== null;
|
|
6
|
+
function R(r) {
|
|
7
|
+
return Object.fromEntries(Object.entries(r ?? {}).filter(([t, e]) => e !== void 0));
|
|
8
|
+
}
|
|
9
|
+
var F = (r) => r === "base";
|
|
10
|
+
function X(r) {
|
|
11
|
+
return r.slice().filter((t) => !F(t));
|
|
12
|
+
}
|
|
13
|
+
function x(r) {
|
|
14
|
+
return String.fromCharCode(r + (r > 25 ? 39 : 97));
|
|
15
|
+
}
|
|
16
|
+
function Y(r) {
|
|
17
|
+
let t = "", e;
|
|
18
|
+
for (e = Math.abs(r); e > 52; e = e / 52 | 0)
|
|
19
|
+
t = x(e % 52) + t;
|
|
20
|
+
return x(e % 52) + t;
|
|
21
|
+
}
|
|
22
|
+
function D(r, t) {
|
|
23
|
+
let e = t.length;
|
|
24
|
+
for (; e; )
|
|
25
|
+
r = r * 33 ^ t.charCodeAt(--e);
|
|
26
|
+
return r;
|
|
27
|
+
}
|
|
28
|
+
function H(r) {
|
|
29
|
+
return Y(D(5381, r) >>> 0);
|
|
30
|
+
}
|
|
31
|
+
var E = /\s*!(important)?/i;
|
|
32
|
+
function N(r) {
|
|
33
|
+
return typeof r == "string" ? E.test(r) : !1;
|
|
34
|
+
}
|
|
35
|
+
function q(r) {
|
|
36
|
+
return typeof r == "string" ? r.replace(E, "").trim() : r;
|
|
37
|
+
}
|
|
38
|
+
function O(r) {
|
|
39
|
+
return typeof r == "string" ? r.replaceAll(" ", "_") : r;
|
|
40
|
+
}
|
|
41
|
+
var _ = (r) => {
|
|
42
|
+
const t = /* @__PURE__ */ new Map();
|
|
43
|
+
return (...o) => {
|
|
44
|
+
const n = JSON.stringify(o);
|
|
45
|
+
if (t.has(n))
|
|
46
|
+
return t.get(n);
|
|
47
|
+
const i = r(...o);
|
|
48
|
+
return t.set(n, i), i;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
function k(...r) {
|
|
52
|
+
return r.reduce((t, e) => (e && Object.keys(e).forEach((o) => {
|
|
53
|
+
const n = t[o], i = e[o];
|
|
54
|
+
S(n) && S(i) ? t[o] = k(n, i) : t[o] = i;
|
|
55
|
+
}), t), {});
|
|
56
|
+
}
|
|
57
|
+
var G = (r) => r != null;
|
|
58
|
+
function j(r, t, e = {}) {
|
|
59
|
+
const { stop: o, getKey: n } = e;
|
|
60
|
+
function i(a, s = []) {
|
|
61
|
+
if (L(a)) {
|
|
62
|
+
const c = {};
|
|
63
|
+
for (const [l, p] of Object.entries(a)) {
|
|
64
|
+
const g = (n == null ? void 0 : n(l, p)) ?? l, d = [...s, g];
|
|
65
|
+
if (o != null && o(a, d))
|
|
66
|
+
return t(a, s);
|
|
67
|
+
const b = i(p, d);
|
|
68
|
+
G(b) && (c[g] = b);
|
|
69
|
+
}
|
|
70
|
+
return c;
|
|
71
|
+
}
|
|
72
|
+
return t(a, s);
|
|
73
|
+
}
|
|
74
|
+
return i(r);
|
|
75
|
+
}
|
|
76
|
+
function $(r, t) {
|
|
77
|
+
return r.reduce(
|
|
78
|
+
(e, o, n) => {
|
|
79
|
+
const i = t[n];
|
|
80
|
+
return o != null && (e[i] = o), e;
|
|
81
|
+
},
|
|
82
|
+
{}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
function P(r, t, e = !0) {
|
|
86
|
+
const { utility: o, conditions: n } = t, { hasShorthand: i, resolveShorthand: a } = o;
|
|
87
|
+
return j(
|
|
88
|
+
r,
|
|
89
|
+
(s) => Array.isArray(s) ? $(s, n.breakpoints.keys) : s,
|
|
90
|
+
{
|
|
91
|
+
stop: (s) => Array.isArray(s),
|
|
92
|
+
getKey: e ? (s) => i ? a(s) : s : void 0
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
var K = {
|
|
97
|
+
shift: (r) => r,
|
|
98
|
+
finalize: (r) => r,
|
|
99
|
+
breakpoints: { keys: [] }
|
|
100
|
+
}, Z = (r) => typeof r == "string" ? r.replaceAll(/[\n\s]+/g, " ") : r;
|
|
101
|
+
function U(r) {
|
|
102
|
+
const { utility: t, hash: e, conditions: o = K } = r, n = (a) => [t.prefix, a].filter(Boolean).join("-"), i = (a, s) => {
|
|
103
|
+
let c;
|
|
104
|
+
if (e) {
|
|
105
|
+
const l = [...o.finalize(a), s];
|
|
106
|
+
c = n(t.toHash(l, H));
|
|
107
|
+
} else
|
|
108
|
+
c = [...o.finalize(a), n(s)].join(":");
|
|
109
|
+
return c;
|
|
110
|
+
};
|
|
111
|
+
return _(({ base: a, ...s } = {}) => {
|
|
112
|
+
const c = Object.assign(s, a), l = P(c, r), p = /* @__PURE__ */ new Set();
|
|
113
|
+
return j(l, (g, d) => {
|
|
114
|
+
if (g == null)
|
|
115
|
+
return;
|
|
116
|
+
const b = N(g), [m, ...u] = o.shift(d), y = X(u), v = t.transform(m, q(Z(g)));
|
|
117
|
+
let h = i(y, v.className);
|
|
118
|
+
b && (h = `${h}!`), p.add(h);
|
|
119
|
+
}), Array.from(p).join(" ");
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function J(...r) {
|
|
123
|
+
return r.flat().filter((t) => S(t) && Object.keys(R(t)).length > 0);
|
|
124
|
+
}
|
|
125
|
+
function Q(r) {
|
|
126
|
+
function t(n) {
|
|
127
|
+
const i = J(...n);
|
|
128
|
+
return i.length === 1 ? i : i.map((a) => P(a, r));
|
|
129
|
+
}
|
|
130
|
+
function e(...n) {
|
|
131
|
+
return k(...t(n));
|
|
132
|
+
}
|
|
133
|
+
function o(...n) {
|
|
134
|
+
return Object.assign({}, ...t(n));
|
|
135
|
+
}
|
|
136
|
+
return { mergeCss: _(e), assignCss: o };
|
|
137
|
+
}
|
|
138
|
+
var rr = /([A-Z])/g, tr = /^ms-/, er = _((r) => r.startsWith("--") ? r : r.replace(rr, "-$1").replace(tr, "-ms-").toLowerCase()), or = "cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";
|
|
139
|
+
`${or.split(",").join("|")}`;
|
|
140
|
+
function nr(r, ...t) {
|
|
141
|
+
const e = Object.getOwnPropertyDescriptors(r), o = Object.keys(e), n = (a) => {
|
|
142
|
+
const s = {};
|
|
143
|
+
for (let c = 0; c < a.length; c++) {
|
|
144
|
+
const l = a[c];
|
|
145
|
+
e[l] && (Object.defineProperty(s, l, e[l]), delete e[l]);
|
|
146
|
+
}
|
|
147
|
+
return s;
|
|
148
|
+
}, i = (a) => n(Array.isArray(a) ? a : o.filter(a));
|
|
149
|
+
return t.map(i).concat(n(o));
|
|
150
|
+
}
|
|
151
|
+
var ir = (...r) => {
|
|
152
|
+
const t = r.reduce((e, o) => (o && o.forEach((n) => e.add(n)), e), /* @__PURE__ */ new Set([]));
|
|
153
|
+
return Array.from(t);
|
|
154
|
+
};
|
|
155
|
+
const ar = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,base", I = new Set(ar.split(",")), sr = /^@|&|&$/;
|
|
156
|
+
function w(r) {
|
|
157
|
+
return I.has(r) || sr.test(r);
|
|
158
|
+
}
|
|
159
|
+
const dr = /^_/, cr = /&|@/;
|
|
160
|
+
function lr(r) {
|
|
161
|
+
return r.map((t) => I.has(t) ? t.replace(dr, "") : cr.test(t) ? `[${O(t.trim())}]` : t);
|
|
162
|
+
}
|
|
163
|
+
function br(r) {
|
|
164
|
+
return r.sort((t, e) => {
|
|
165
|
+
const o = w(t), n = w(e);
|
|
166
|
+
return o && !n ? 1 : !o && n ? -1 : 0;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
const gr = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t", A = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map();
|
|
170
|
+
gr.split(",").forEach((r) => {
|
|
171
|
+
const [t, e] = r.split(":"), [o, ...n] = e.split("/");
|
|
172
|
+
A.set(t, o), n.length && n.forEach((i) => {
|
|
173
|
+
T.set(i === "1" ? o : i, t);
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
const C = (r) => T.get(r) || r, M = {
|
|
177
|
+
conditions: {
|
|
178
|
+
shift: br,
|
|
179
|
+
finalize: lr,
|
|
180
|
+
breakpoints: { keys: ["base"] }
|
|
181
|
+
},
|
|
182
|
+
utility: {
|
|
183
|
+
transform: (r, t) => {
|
|
184
|
+
const e = C(r);
|
|
185
|
+
return { className: `${A.get(e) || er(e)}_${O(t)}` };
|
|
186
|
+
},
|
|
187
|
+
hasShorthand: !0,
|
|
188
|
+
toHash: (r, t) => t(r.join(":")),
|
|
189
|
+
resolveShorthand: C
|
|
190
|
+
}
|
|
191
|
+
}, pr = U(M), z = (...r) => pr(f(...r));
|
|
192
|
+
z.raw = (...r) => f(...r);
|
|
193
|
+
const { mergeCss: f } = Q(M), B = (r) => ({
|
|
194
|
+
base: {},
|
|
195
|
+
variants: {},
|
|
196
|
+
defaultVariants: {},
|
|
197
|
+
compoundVariants: [],
|
|
198
|
+
...r
|
|
199
|
+
});
|
|
200
|
+
function W(r) {
|
|
201
|
+
const { base: t, variants: e, defaultVariants: o, compoundVariants: n } = B(r), i = (d) => ({ ...o, ...R(d) });
|
|
202
|
+
function a(d = {}) {
|
|
203
|
+
var y;
|
|
204
|
+
const b = i(d);
|
|
205
|
+
let m = { ...t };
|
|
206
|
+
for (const [v, h] of Object.entries(b))
|
|
207
|
+
(y = e[v]) != null && y[h] && (m = f(m, e[v][h]));
|
|
208
|
+
const u = mr(n, b);
|
|
209
|
+
return f(m, u);
|
|
210
|
+
}
|
|
211
|
+
function s(d) {
|
|
212
|
+
const b = B(d.config), m = ir(d.variantKeys, Object.keys(e));
|
|
213
|
+
return W({
|
|
214
|
+
base: f(t, b.base),
|
|
215
|
+
variants: Object.fromEntries(
|
|
216
|
+
m.map((u) => [u, f(e[u], b.variants[u])])
|
|
217
|
+
),
|
|
218
|
+
defaultVariants: k(o, b.defaultVariants),
|
|
219
|
+
compoundVariants: [...n, ...b.compoundVariants]
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function c(d) {
|
|
223
|
+
return z(a(d));
|
|
224
|
+
}
|
|
225
|
+
const l = Object.keys(e);
|
|
226
|
+
function p(d) {
|
|
227
|
+
return nr(d, l);
|
|
228
|
+
}
|
|
229
|
+
const g = Object.fromEntries(Object.entries(e).map(([d, b]) => [d, Object.keys(b)]));
|
|
230
|
+
return Object.assign(_(c), {
|
|
231
|
+
__cva__: !0,
|
|
232
|
+
variantMap: g,
|
|
233
|
+
variantKeys: l,
|
|
234
|
+
raw: a,
|
|
235
|
+
config: r,
|
|
236
|
+
merge: s,
|
|
237
|
+
splitVariantProps: p,
|
|
238
|
+
getVariantProps: i
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function mr(r, t) {
|
|
242
|
+
let e = {};
|
|
243
|
+
return r.forEach((o) => {
|
|
244
|
+
Object.entries(o).every(([i, a]) => i === "css" ? !0 : (Array.isArray(a) ? a : [a]).some((c) => t[i] === c)) && (e = f(e, o.css));
|
|
245
|
+
}), e;
|
|
246
|
+
}
|
|
247
|
+
const ur = W({
|
|
248
|
+
base: {
|
|
249
|
+
display: "inline-flex",
|
|
250
|
+
alignItems: "center",
|
|
251
|
+
justifyContent: "center",
|
|
252
|
+
gap: "md",
|
|
253
|
+
borderRadius: "sm",
|
|
254
|
+
fontFamily: "body",
|
|
255
|
+
fontWeight: "medium",
|
|
256
|
+
cursor: "pointer",
|
|
257
|
+
transition: "all 0.15s ease",
|
|
258
|
+
border: "none",
|
|
259
|
+
outline: "none",
|
|
260
|
+
whiteSpace: "nowrap",
|
|
261
|
+
userSelect: "none",
|
|
262
|
+
_disabled: {
|
|
263
|
+
opacity: 0.4,
|
|
264
|
+
cursor: "not-allowed"
|
|
265
|
+
},
|
|
266
|
+
_focusVisible: {
|
|
267
|
+
ring: "2px",
|
|
268
|
+
ringColor: "border.focus",
|
|
269
|
+
ringOffset: "2px"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
variants: {
|
|
273
|
+
variant: {
|
|
274
|
+
primary: {
|
|
275
|
+
bg: "action.primary",
|
|
276
|
+
color: "text.inverse",
|
|
277
|
+
_hover: {
|
|
278
|
+
bg: "action.primaryHover"
|
|
279
|
+
},
|
|
280
|
+
_active: {
|
|
281
|
+
bg: "action.primaryPressed"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
secondary: {
|
|
285
|
+
bg: "action.secondary",
|
|
286
|
+
color: "text.primary",
|
|
287
|
+
_hover: {
|
|
288
|
+
bg: "action.secondaryHover"
|
|
289
|
+
},
|
|
290
|
+
_active: {
|
|
291
|
+
bg: "action.secondaryHover"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
ghost: {
|
|
295
|
+
bg: "transparent",
|
|
296
|
+
color: "text.primary",
|
|
297
|
+
_hover: {
|
|
298
|
+
bg: "bg.muted"
|
|
299
|
+
},
|
|
300
|
+
_active: {
|
|
301
|
+
bg: "action.secondary"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
destructive: {
|
|
305
|
+
bg: "action.destructive",
|
|
306
|
+
color: "text.inverse",
|
|
307
|
+
_hover: {
|
|
308
|
+
opacity: 0.9
|
|
309
|
+
},
|
|
310
|
+
_active: {
|
|
311
|
+
opacity: 0.8
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
size: {
|
|
316
|
+
medium: {
|
|
317
|
+
height: "32px",
|
|
318
|
+
px: "lg",
|
|
319
|
+
py: "sm",
|
|
320
|
+
fontSize: "body",
|
|
321
|
+
lineHeight: "body"
|
|
322
|
+
},
|
|
323
|
+
small: {
|
|
324
|
+
height: "26px",
|
|
325
|
+
px: "md",
|
|
326
|
+
py: "xs",
|
|
327
|
+
fontSize: "body.sm",
|
|
328
|
+
lineHeight: "body.sm"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
defaultVariants: {
|
|
333
|
+
variant: "primary",
|
|
334
|
+
size: "medium"
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
function hr({
|
|
338
|
+
variant: r = "primary",
|
|
339
|
+
size: t = "medium",
|
|
340
|
+
children: e,
|
|
341
|
+
className: o,
|
|
342
|
+
disabled: n,
|
|
343
|
+
...i
|
|
344
|
+
}) {
|
|
345
|
+
return /* @__PURE__ */ V(
|
|
346
|
+
"button",
|
|
347
|
+
{
|
|
348
|
+
className: `${ur({ variant: r, size: t })}${o ? ` ${o}` : ""}`,
|
|
349
|
+
disabled: n,
|
|
350
|
+
...i,
|
|
351
|
+
children: e
|
|
352
|
+
}
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
export {
|
|
356
|
+
hr as Button,
|
|
357
|
+
ur as buttonRecipe
|
|
358
|
+
};
|
package/dist/preset.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,cAAc,gCAoIzB,CAAC"}
|
package/dist/preset.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { definePreset as i } from "@pandacss/dev";
|
|
2
|
+
import { border as s, status as l, action as t, text as r, bg as n, typography as a, shadows as v, radii as x, padding as o, spacing as u, colors as e } from "@billabex/ui-tokens";
|
|
3
|
+
const p = i({
|
|
4
|
+
name: "billabex",
|
|
5
|
+
theme: {
|
|
6
|
+
tokens: {
|
|
7
|
+
colors: {
|
|
8
|
+
// Solids
|
|
9
|
+
"solid.white": { value: e.solid.white.hex },
|
|
10
|
+
"solid.black": { value: e.solid.black.hex },
|
|
11
|
+
// Neutral palette
|
|
12
|
+
"neutral.50": { value: e.neutral[50].hex },
|
|
13
|
+
"neutral.100": { value: e.neutral[100].hex },
|
|
14
|
+
"neutral.200": { value: e.neutral[200].hex },
|
|
15
|
+
"neutral.300": { value: e.neutral[300].hex },
|
|
16
|
+
"neutral.400": { value: e.neutral[400].hex },
|
|
17
|
+
"neutral.500": { value: e.neutral[500].hex },
|
|
18
|
+
"neutral.600": { value: e.neutral[600].hex },
|
|
19
|
+
"neutral.700": { value: e.neutral[700].hex },
|
|
20
|
+
// Gold
|
|
21
|
+
"gold.100": { value: e.gold[100].hex },
|
|
22
|
+
"gold.300": { value: e.gold[300].hex },
|
|
23
|
+
"gold.500": { value: e.gold[500].hex },
|
|
24
|
+
// Terracotta
|
|
25
|
+
"terracotta.400": { value: e.terracotta[400].hex },
|
|
26
|
+
"terracotta.500": { value: e.terracotta[500].hex },
|
|
27
|
+
// Status raw colors
|
|
28
|
+
"green.50": { value: e.green[50].hex },
|
|
29
|
+
"green.600": { value: e.green[600].hex },
|
|
30
|
+
"orange.50": { value: e.orange[50].hex },
|
|
31
|
+
"orange.500": { value: e.orange[500].hex },
|
|
32
|
+
"red.50": { value: e.red[50].hex },
|
|
33
|
+
"red.600": { value: e.red[600].hex },
|
|
34
|
+
"blue.50": { value: e.blue[50].hex },
|
|
35
|
+
"blue.700": { value: e.blue[700].hex }
|
|
36
|
+
},
|
|
37
|
+
spacing: {
|
|
38
|
+
xs: { value: u.xs.px },
|
|
39
|
+
sm: { value: u.sm.px },
|
|
40
|
+
md: { value: u.md.px },
|
|
41
|
+
lg: { value: u.lg.px },
|
|
42
|
+
xl: { value: u.xl.px },
|
|
43
|
+
"2xl": { value: u["2xl"].px },
|
|
44
|
+
"3xl": { value: u["3xl"].px },
|
|
45
|
+
"4xl": { value: u["4xl"].px },
|
|
46
|
+
"padding.card": { value: o.card.px },
|
|
47
|
+
"padding.page": { value: o.page.px }
|
|
48
|
+
},
|
|
49
|
+
radii: {
|
|
50
|
+
none: { value: x.none.px },
|
|
51
|
+
xs: { value: x.xs.px },
|
|
52
|
+
sm: { value: x.sm.px },
|
|
53
|
+
md: { value: x.md.px },
|
|
54
|
+
lg: { value: x.lg.px },
|
|
55
|
+
full: { value: x.full.px }
|
|
56
|
+
},
|
|
57
|
+
shadows: {
|
|
58
|
+
sm: { value: v.sm.css },
|
|
59
|
+
md: { value: v.md.css },
|
|
60
|
+
lg: { value: v.lg.css }
|
|
61
|
+
},
|
|
62
|
+
fonts: {
|
|
63
|
+
body: { value: a.body.fontFamily }
|
|
64
|
+
},
|
|
65
|
+
fontSizes: {
|
|
66
|
+
display: { value: a.display.fontSize.px },
|
|
67
|
+
"headline.lg": { value: a.headlineLg.fontSize.px },
|
|
68
|
+
"headline.sm": { value: a.headlineSm.fontSize.px },
|
|
69
|
+
body: { value: a.body.fontSize.px },
|
|
70
|
+
"body.sm": { value: a.bodySm.fontSize.px },
|
|
71
|
+
caption: { value: a.caption.fontSize.px }
|
|
72
|
+
},
|
|
73
|
+
fontWeights: {
|
|
74
|
+
regular: { value: "400" },
|
|
75
|
+
medium: { value: "500" },
|
|
76
|
+
semibold: { value: "600" }
|
|
77
|
+
},
|
|
78
|
+
lineHeights: {
|
|
79
|
+
display: { value: a.display.lineHeight.px },
|
|
80
|
+
"headline.lg": { value: a.headlineLg.lineHeight.px },
|
|
81
|
+
"headline.sm": { value: a.headlineSm.lineHeight.px },
|
|
82
|
+
body: { value: a.body.lineHeight.px },
|
|
83
|
+
"body.sm": { value: a.bodySm.lineHeight.px },
|
|
84
|
+
caption: { value: a.caption.lineHeight.px }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
semanticTokens: {
|
|
88
|
+
colors: {
|
|
89
|
+
// Background
|
|
90
|
+
"bg.default": { value: n.default.hex },
|
|
91
|
+
"bg.subtle": { value: n.subtle.hex },
|
|
92
|
+
"bg.muted": { value: n.muted.hex },
|
|
93
|
+
"bg.inverse": { value: n.inverse.hex },
|
|
94
|
+
"bg.brand": { value: n.brand.hex },
|
|
95
|
+
"bg.accent": { value: n.accent.hex },
|
|
96
|
+
// Text
|
|
97
|
+
"text.primary": { value: r.primary.hex },
|
|
98
|
+
"text.secondary": { value: r.secondary.hex },
|
|
99
|
+
"text.tertiary": { value: r.tertiary.hex },
|
|
100
|
+
"text.inverse": { value: r.inverse.hex },
|
|
101
|
+
"text.link": { value: r.link.hex },
|
|
102
|
+
"text.linkHover": { value: r.linkHover.hex },
|
|
103
|
+
// Action
|
|
104
|
+
"action.primary": { value: t.primary.hex },
|
|
105
|
+
"action.primaryHover": { value: t.primaryHover.hex },
|
|
106
|
+
"action.primaryPressed": { value: t.primaryPressed.hex },
|
|
107
|
+
"action.secondary": { value: t.secondary.hex },
|
|
108
|
+
"action.secondaryHover": { value: t.secondaryHover.hex },
|
|
109
|
+
"action.destructive": { value: t.destructive.hex },
|
|
110
|
+
// Status
|
|
111
|
+
"status.success": { value: l.success.hex },
|
|
112
|
+
"status.successSubtle": { value: l.successSubtle.hex },
|
|
113
|
+
"status.warning": { value: l.warning.hex },
|
|
114
|
+
"status.warningSubtle": { value: l.warningSubtle.hex },
|
|
115
|
+
"status.error": { value: l.error.hex },
|
|
116
|
+
"status.errorSubtle": { value: l.errorSubtle.hex },
|
|
117
|
+
"status.info": { value: l.info.hex },
|
|
118
|
+
"status.infoSubtle": { value: l.infoSubtle.hex },
|
|
119
|
+
// Border
|
|
120
|
+
"border.default": { value: s.default.hex },
|
|
121
|
+
"border.subtle": { value: s.subtle.hex },
|
|
122
|
+
"border.focus": { value: s.focus.hex },
|
|
123
|
+
"border.error": { value: s.error.hex }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
p as billabexPreset
|
|
130
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@billabex/ui-components",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "React components for the Billabex design system — RSC compatible, built with Panda CSS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"./preset": {
|
|
17
|
+
"import": {
|
|
18
|
+
"types": "./dist/preset.d.ts",
|
|
19
|
+
"default": "./dist/preset.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"./styles.css": "./dist/styles.css"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"codegen": "panda codegen && panda cssgen --outfile styled-system/styles.css",
|
|
29
|
+
"build": "panda codegen && panda cssgen --outfile styled-system/styles.css && vite build",
|
|
30
|
+
"build:ship": "panda ship --outfile dist/panda.buildinfo.json",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"test:watch": "vitest",
|
|
33
|
+
"clean": "rm -rf dist styled-system",
|
|
34
|
+
"lint": "tsc --noEmit"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@billabex/ui-tokens": "workspace:*"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": ">=18",
|
|
41
|
+
"react-dom": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@pandacss/dev": "^0.52.0",
|
|
45
|
+
"@testing-library/react": "^16.1.0",
|
|
46
|
+
"@testing-library/jest-dom": "^6.6.0",
|
|
47
|
+
"@types/react": "^19.0.0",
|
|
48
|
+
"@types/react-dom": "^19.0.0",
|
|
49
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
50
|
+
"jsdom": "^25.0.0",
|
|
51
|
+
"react": "^19.0.0",
|
|
52
|
+
"react-dom": "^19.0.0",
|
|
53
|
+
"vite": "^6.0.0",
|
|
54
|
+
"vite-plugin-dts": "^4.3.0",
|
|
55
|
+
"vitest": "^3.0.0"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
},
|
|
60
|
+
"license": "MIT",
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "https://github.com/billabex/lingot.git",
|
|
64
|
+
"directory": "packages/ui-components"
|
|
65
|
+
},
|
|
66
|
+
"sideEffects": [
|
|
67
|
+
"*.css"
|
|
68
|
+
]
|
|
69
|
+
}
|