@axis-ds/ui-react 1.4.0 → 1.5.1
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/README.md +46 -1
- package/dist/accordion/index.js +9 -27
- package/dist/accordion/index.mjs +58 -7
- package/dist/alert/index.js +9 -27
- package/dist/alert/index.mjs +54 -7
- package/dist/avatar/avatar.d.mts +24 -0
- package/dist/avatar/avatar.d.ts +24 -0
- package/dist/avatar/avatar.js +70 -0
- package/dist/{chunk-OQGMQL2A.mjs → avatar/avatar.mjs} +5 -26
- package/dist/avatar/index.d.mts +5 -26
- package/dist/avatar/index.d.ts +5 -26
- package/dist/avatar/index.js +4 -78
- package/dist/avatar/index.mjs +2 -5
- package/dist/avatar/variants.d.mts +14 -0
- package/dist/avatar/variants.d.ts +14 -0
- package/dist/avatar/variants.js +44 -0
- package/dist/avatar/variants.mjs +20 -0
- package/dist/badge/index.js +5 -23
- package/dist/badge/index.mjs +35 -5
- package/dist/breadcrumb/index.js +15 -33
- package/dist/breadcrumb/index.mjs +118 -10
- package/dist/button/index.js +5 -23
- package/dist/button/index.mjs +44 -5
- package/dist/card/index.js +13 -31
- package/dist/card/index.mjs +58 -9
- package/dist/checkbox/index.js +5 -23
- package/dist/checkbox/index.mjs +41 -4
- package/dist/collapsible/index.js +3 -5
- package/dist/collapsible/index.mjs +4 -5
- package/dist/command/index.d.mts +7 -7
- package/dist/command/index.d.ts +7 -7
- package/dist/command/index.js +16 -33
- package/dist/command/index.mjs +110 -10
- package/dist/dialog/index.js +18 -36
- package/dist/dialog/index.mjs +88 -13
- package/dist/dropdown-menu/index.js +26 -44
- package/dist/dropdown-menu/index.mjs +188 -18
- package/dist/index.d.mts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +153 -1907
- package/dist/index.mjs +105 -150
- package/dist/input/index.js +4 -22
- package/dist/input/index.mjs +28 -4
- package/dist/label/index.js +5 -23
- package/dist/label/index.mjs +17 -4
- package/dist/popover/index.js +6 -24
- package/dist/popover/index.mjs +21 -6
- package/dist/progress/index.js +7 -25
- package/dist/progress/index.mjs +71 -6
- package/dist/radio-group/index.js +6 -24
- package/dist/radio-group/index.mjs +40 -5
- package/dist/scroll-area/index.js +6 -24
- package/dist/scroll-area/index.mjs +34 -5
- package/dist/select/index.js +16 -34
- package/dist/select/index.mjs +129 -11
- package/dist/separator/index.js +4 -22
- package/dist/separator/index.mjs +21 -4
- package/dist/sheet/index.js +19 -37
- package/dist/sheet/index.mjs +122 -13
- package/dist/skeleton/index.js +4 -22
- package/dist/skeleton/index.mjs +19 -4
- package/dist/slider/index.js +4 -22
- package/dist/slider/index.mjs +34 -4
- package/dist/switch/index.js +5 -23
- package/dist/switch/index.mjs +29 -4
- package/dist/table/index.js +18 -36
- package/dist/table/index.mjs +96 -11
- package/dist/tabs/index.js +9 -27
- package/dist/tabs/index.mjs +47 -7
- package/dist/textarea/index.js +4 -22
- package/dist/textarea/index.mjs +20 -4
- package/dist/toast/index.js +16 -34
- package/dist/toast/index.mjs +94 -10
- package/dist/toggle/index.js +5 -23
- package/dist/toggle/index.mjs +34 -5
- package/dist/tooltip/index.js +7 -25
- package/dist/tooltip/index.mjs +26 -7
- package/dist/utils.d.mts +9 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +40 -0
- package/dist/{chunk-ZIF4PLK3.mjs → utils.mjs} +2 -4
- package/package.json +99 -5
- package/dist/chunk-22MWNPDF.mjs +0 -44
- package/dist/chunk-2OEPKE4D.mjs +0 -69
- package/dist/chunk-2XNUJNTG.mjs +0 -43
- package/dist/chunk-3N6NG7VT.mjs +0 -11
- package/dist/chunk-4I2F2NLP.mjs +0 -111
- package/dist/chunk-4PT43LON.mjs +0 -31
- package/dist/chunk-5NWFAQBM.mjs +0 -36
- package/dist/chunk-5Z2R3IHJ.mjs +0 -28
- package/dist/chunk-AY4B3RRN.mjs +0 -144
- package/dist/chunk-C5O47K7L.mjs +0 -71
- package/dist/chunk-CNU6645Y.mjs +0 -42
- package/dist/chunk-CY72AGI2.mjs +0 -105
- package/dist/chunk-DRFCNDVQ.mjs +0 -27
- package/dist/chunk-F2WSIT7F.mjs +0 -49
- package/dist/chunk-FZFREHAE.mjs +0 -139
- package/dist/chunk-HKYKDQ6C.mjs +0 -81
- package/dist/chunk-IS7NER3O.mjs +0 -37
- package/dist/chunk-MOBW7BKD.mjs +0 -49
- package/dist/chunk-PJX5UF3Y.mjs +0 -25
- package/dist/chunk-QXQWVRXN.mjs +0 -53
- package/dist/chunk-RFB4IABR.mjs +0 -108
- package/dist/chunk-SO2QSRGV.mjs +0 -58
- package/dist/chunk-TA62Q7YX.mjs +0 -37
- package/dist/chunk-TB33GTWS.mjs +0 -43
- package/dist/chunk-YI5OZRUB.mjs +0 -132
- package/dist/chunk-YZDRNV46.mjs +0 -210
- package/dist/chunk-Z4P43F5J.mjs +0 -65
- package/dist/chunk-Z65ZMFDH.mjs +0 -123
- package/dist/chunk-ZW6GY5PO.mjs +0 -29
package/dist/avatar/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,87 +15,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/avatar/index.tsx
|
|
31
19
|
var avatar_exports = {};
|
|
32
20
|
__export(avatar_exports, {
|
|
33
|
-
Avatar: () => Avatar,
|
|
34
|
-
avatarVariants: () => avatarVariants
|
|
21
|
+
Avatar: () => import_avatar.Avatar,
|
|
22
|
+
avatarVariants: () => import_variants.avatarVariants
|
|
35
23
|
});
|
|
36
24
|
module.exports = __toCommonJS(avatar_exports);
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
// src/utils.ts
|
|
41
|
-
var import_clsx = require("clsx");
|
|
42
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
43
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
44
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
45
|
-
extend: {
|
|
46
|
-
classGroups: {
|
|
47
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
function cn(...inputs) {
|
|
52
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// src/avatar/index.tsx
|
|
56
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
57
|
-
var avatarVariants = (0, import_class_variance_authority.cva)(
|
|
58
|
-
"relative flex shrink-0 overflow-hidden rounded-full bg-[var(--axis-surface-secondary)]",
|
|
59
|
-
{
|
|
60
|
-
variants: {
|
|
61
|
-
size: {
|
|
62
|
-
sm: "h-8 w-8 text-xs",
|
|
63
|
-
default: "h-10 w-10 text-sm",
|
|
64
|
-
lg: "h-12 w-12 text-base",
|
|
65
|
-
xl: "h-16 w-16 text-lg"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
size: "default"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
var Avatar = React.forwardRef(
|
|
74
|
-
({ className, size, src, alt, fallback, ...props }, ref) => {
|
|
75
|
-
const [hasError, setHasError] = React.useState(false);
|
|
76
|
-
const initials = React.useMemo(() => {
|
|
77
|
-
if (fallback) return fallback;
|
|
78
|
-
if (!alt) return "?";
|
|
79
|
-
return alt.split(" ").map((word) => word[0]).join("").toUpperCase().slice(0, 2);
|
|
80
|
-
}, [alt, fallback]);
|
|
81
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
ref,
|
|
85
|
-
className: cn(avatarVariants({ size, className })),
|
|
86
|
-
...props,
|
|
87
|
-
children: src && !hasError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
-
"img",
|
|
89
|
-
{
|
|
90
|
-
src,
|
|
91
|
-
alt: alt || "Avatar",
|
|
92
|
-
className: "aspect-square h-full w-full object-cover",
|
|
93
|
-
onError: () => setHasError(true)
|
|
94
|
-
}
|
|
95
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "flex h-full w-full items-center justify-center bg-[var(--axis-surface-tertiary)] text-[var(--axis-text-secondary)] font-medium", children: initials })
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
Avatar.displayName = "Avatar";
|
|
25
|
+
var import_avatar = require("./avatar.js");
|
|
26
|
+
var import_variants = require("./variants.js");
|
|
101
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
102
28
|
0 && (module.exports = {
|
|
103
29
|
Avatar,
|
package/dist/avatar/index.mjs
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Avatar 크기 variants
|
|
5
|
+
*
|
|
6
|
+
* 컴포넌트(./avatar, 클라이언트 경계)와 파일을 나눠 두었습니다. 같은 파일에 있으면
|
|
7
|
+
* 서버 컴포넌트에서 `avatarVariants()` 를 부를 때 클라이언트 참조가 되어 실패합니다(WI-0050 D2).
|
|
8
|
+
* 이 파일은 클라이언트 지시문 목록(scripts/client-modules.mjs)에 넣지 않습니다.
|
|
9
|
+
*/
|
|
10
|
+
declare const avatarVariants: (props?: ({
|
|
11
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
|
|
14
|
+
export { avatarVariants };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Avatar 크기 variants
|
|
5
|
+
*
|
|
6
|
+
* 컴포넌트(./avatar, 클라이언트 경계)와 파일을 나눠 두었습니다. 같은 파일에 있으면
|
|
7
|
+
* 서버 컴포넌트에서 `avatarVariants()` 를 부를 때 클라이언트 참조가 되어 실패합니다(WI-0050 D2).
|
|
8
|
+
* 이 파일은 클라이언트 지시문 목록(scripts/client-modules.mjs)에 넣지 않습니다.
|
|
9
|
+
*/
|
|
10
|
+
declare const avatarVariants: (props?: ({
|
|
11
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
|
+
|
|
14
|
+
export { avatarVariants };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var variants_exports = {};
|
|
20
|
+
__export(variants_exports, {
|
|
21
|
+
avatarVariants: () => avatarVariants
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(variants_exports);
|
|
24
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
25
|
+
const avatarVariants = (0, import_class_variance_authority.cva)(
|
|
26
|
+
"relative flex shrink-0 overflow-hidden rounded-full bg-[var(--axis-surface-secondary)]",
|
|
27
|
+
{
|
|
28
|
+
variants: {
|
|
29
|
+
size: {
|
|
30
|
+
sm: "h-8 w-8 text-xs",
|
|
31
|
+
default: "h-10 w-10 text-sm",
|
|
32
|
+
lg: "h-12 w-12 text-base",
|
|
33
|
+
xl: "h-16 w-16 text-lg"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
size: "default"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
avatarVariants
|
|
44
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const avatarVariants = cva(
|
|
3
|
+
"relative flex shrink-0 overflow-hidden rounded-full bg-[var(--axis-surface-secondary)]",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
sm: "h-8 w-8 text-xs",
|
|
8
|
+
default: "h-10 w-10 text-sm",
|
|
9
|
+
lg: "h-12 w-12 text-base",
|
|
10
|
+
xl: "h-16 w-16 text-lg"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
size: "default"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
export {
|
|
19
|
+
avatarVariants
|
|
20
|
+
};
|
package/dist/badge/index.js
CHANGED
|
@@ -26,35 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/badge/index.tsx
|
|
31
29
|
var badge_exports = {};
|
|
32
30
|
__export(badge_exports, {
|
|
33
31
|
Badge: () => Badge,
|
|
34
32
|
badgeVariants: () => badgeVariants
|
|
35
33
|
});
|
|
36
34
|
module.exports = __toCommonJS(badge_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
36
|
var React = __toESM(require("react"));
|
|
38
37
|
var import_class_variance_authority = require("class-variance-authority");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var import_clsx = require("clsx");
|
|
42
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
43
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
44
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
45
|
-
extend: {
|
|
46
|
-
classGroups: {
|
|
47
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
function cn(...inputs) {
|
|
52
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// src/badge/index.tsx
|
|
56
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
57
|
-
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
38
|
+
var import_utils = require("../utils.js");
|
|
39
|
+
const badgeVariants = (0, import_class_variance_authority.cva)(
|
|
58
40
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
59
41
|
{
|
|
60
42
|
variants: {
|
|
@@ -74,12 +56,12 @@ var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
|
74
56
|
}
|
|
75
57
|
}
|
|
76
58
|
);
|
|
77
|
-
|
|
59
|
+
const Badge = React.forwardRef(
|
|
78
60
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
61
|
"div",
|
|
80
62
|
{
|
|
81
63
|
ref,
|
|
82
|
-
className: cn(badgeVariants({ variant }), className),
|
|
64
|
+
className: (0, import_utils.cn)(badgeVariants({ variant }), className),
|
|
83
65
|
...props
|
|
84
66
|
}
|
|
85
67
|
)
|
package/dist/badge/index.mjs
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../
|
|
5
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../utils.mjs";
|
|
5
|
+
const badgeVariants = cva(
|
|
6
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "border-transparent bg-[var(--axis-badge-default-bg)] text-[var(--axis-badge-default-text)]",
|
|
11
|
+
secondary: "border-transparent bg-[var(--axis-surface-secondary)] text-[var(--axis-text-secondary)]",
|
|
12
|
+
destructive: "border-transparent bg-[var(--axis-badge-error-bg)] text-[var(--axis-badge-error-text)]",
|
|
13
|
+
success: "border-transparent bg-[var(--axis-badge-success-bg)] text-[var(--axis-badge-success-text)]",
|
|
14
|
+
warning: "border-transparent bg-[var(--axis-badge-warning-bg)] text-[var(--axis-badge-warning-text)]",
|
|
15
|
+
error: "border-transparent bg-[var(--axis-badge-error-bg)] text-[var(--axis-badge-error-text)]",
|
|
16
|
+
info: "border-transparent bg-[var(--axis-badge-info-bg)] text-[var(--axis-badge-info-text)]",
|
|
17
|
+
outline: "border-[var(--axis-border-default)] text-[var(--axis-text-primary)]"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
const Badge = React.forwardRef(
|
|
26
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(badgeVariants({ variant }), className),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
Badge.displayName = "Badge";
|
|
6
36
|
export {
|
|
7
37
|
Badge,
|
|
8
38
|
badgeVariants
|
package/dist/breadcrumb/index.js
CHANGED
|
@@ -26,8 +26,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/breadcrumb/index.tsx
|
|
31
29
|
var breadcrumb_exports = {};
|
|
32
30
|
__export(breadcrumb_exports, {
|
|
33
31
|
Breadcrumb: () => Breadcrumb,
|
|
@@ -39,33 +37,17 @@ __export(breadcrumb_exports, {
|
|
|
39
37
|
BreadcrumbSeparator: () => BreadcrumbSeparator
|
|
40
38
|
});
|
|
41
39
|
module.exports = __toCommonJS(breadcrumb_exports);
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
41
|
var React = __toESM(require("react"));
|
|
43
42
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var import_clsx = require("clsx");
|
|
47
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
48
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
49
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
50
|
-
extend: {
|
|
51
|
-
classGroups: {
|
|
52
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
function cn(...inputs) {
|
|
57
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// src/breadcrumb/index.tsx
|
|
61
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
|
-
var Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
43
|
+
var import_utils = require("../utils.js");
|
|
44
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
63
45
|
Breadcrumb.displayName = "Breadcrumb";
|
|
64
|
-
|
|
46
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
47
|
"ol",
|
|
66
48
|
{
|
|
67
49
|
ref,
|
|
68
|
-
className: cn(
|
|
50
|
+
className: (0, import_utils.cn)(
|
|
69
51
|
"flex flex-wrap items-center gap-1.5 break-words text-sm text-[var(--axis-text-secondary)] sm:gap-2.5",
|
|
70
52
|
className
|
|
71
53
|
),
|
|
@@ -73,22 +55,22 @@ var BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
73
55
|
}
|
|
74
56
|
));
|
|
75
57
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
76
|
-
|
|
58
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
59
|
"li",
|
|
78
60
|
{
|
|
79
61
|
ref,
|
|
80
|
-
className: cn("inline-flex items-center gap-1.5", className),
|
|
62
|
+
className: (0, import_utils.cn)("inline-flex items-center gap-1.5", className),
|
|
81
63
|
...props
|
|
82
64
|
}
|
|
83
65
|
));
|
|
84
66
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
85
|
-
|
|
67
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
86
68
|
const Comp = asChild ? import_react_slot.Slot : "a";
|
|
87
69
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
70
|
Comp,
|
|
89
71
|
{
|
|
90
72
|
ref,
|
|
91
|
-
className: cn(
|
|
73
|
+
className: (0, import_utils.cn)(
|
|
92
74
|
"transition-colors hover:text-[var(--axis-text-primary)]",
|
|
93
75
|
className
|
|
94
76
|
),
|
|
@@ -97,19 +79,19 @@ var BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) =>
|
|
|
97
79
|
);
|
|
98
80
|
});
|
|
99
81
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
100
|
-
|
|
82
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
83
|
"span",
|
|
102
84
|
{
|
|
103
85
|
ref,
|
|
104
86
|
role: "link",
|
|
105
87
|
"aria-disabled": "true",
|
|
106
88
|
"aria-current": "page",
|
|
107
|
-
className: cn("font-normal text-[var(--axis-text-primary)]", className),
|
|
89
|
+
className: (0, import_utils.cn)("font-normal text-[var(--axis-text-primary)]", className),
|
|
108
90
|
...props
|
|
109
91
|
}
|
|
110
92
|
));
|
|
111
93
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
112
|
-
|
|
94
|
+
const BreadcrumbSeparator = ({
|
|
113
95
|
children,
|
|
114
96
|
className,
|
|
115
97
|
...props
|
|
@@ -118,7 +100,7 @@ var BreadcrumbSeparator = ({
|
|
|
118
100
|
{
|
|
119
101
|
role: "presentation",
|
|
120
102
|
"aria-hidden": "true",
|
|
121
|
-
className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
|
|
103
|
+
className: (0, import_utils.cn)("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
|
|
122
104
|
...props,
|
|
123
105
|
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
106
|
"svg",
|
|
@@ -138,7 +120,7 @@ var BreadcrumbSeparator = ({
|
|
|
138
120
|
}
|
|
139
121
|
);
|
|
140
122
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
141
|
-
|
|
123
|
+
const BreadcrumbEllipsis = ({
|
|
142
124
|
className,
|
|
143
125
|
...props
|
|
144
126
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -146,7 +128,7 @@ var BreadcrumbEllipsis = ({
|
|
|
146
128
|
{
|
|
147
129
|
role: "presentation",
|
|
148
130
|
"aria-hidden": "true",
|
|
149
|
-
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
131
|
+
className: (0, import_utils.cn)("flex h-9 w-9 items-center justify-center", className),
|
|
150
132
|
...props,
|
|
151
133
|
children: [
|
|
152
134
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -1,13 +1,121 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cn } from "../utils.mjs";
|
|
5
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
6
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
7
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8
|
+
"ol",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
className: cn(
|
|
12
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-[var(--axis-text-secondary)] sm:gap-2.5",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
19
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
20
|
+
"li",
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
));
|
|
27
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
28
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
29
|
+
const Comp = asChild ? Slot : "a";
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
Comp,
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
className: cn(
|
|
35
|
+
"transition-colors hover:text-[var(--axis-text-primary)]",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
43
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
role: "link",
|
|
48
|
+
"aria-disabled": "true",
|
|
49
|
+
"aria-current": "page",
|
|
50
|
+
className: cn("font-normal text-[var(--axis-text-primary)]", className),
|
|
51
|
+
...props
|
|
52
|
+
}
|
|
53
|
+
));
|
|
54
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
55
|
+
const BreadcrumbSeparator = ({
|
|
56
|
+
children,
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}) => /* @__PURE__ */ jsx(
|
|
60
|
+
"li",
|
|
61
|
+
{
|
|
62
|
+
role: "presentation",
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
|
|
65
|
+
...props,
|
|
66
|
+
children: children ?? /* @__PURE__ */ jsx(
|
|
67
|
+
"svg",
|
|
68
|
+
{
|
|
69
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
70
|
+
width: "16",
|
|
71
|
+
height: "16",
|
|
72
|
+
viewBox: "0 0 24 24",
|
|
73
|
+
fill: "none",
|
|
74
|
+
stroke: "currentColor",
|
|
75
|
+
strokeWidth: "2",
|
|
76
|
+
strokeLinecap: "round",
|
|
77
|
+
strokeLinejoin: "round",
|
|
78
|
+
children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
84
|
+
const BreadcrumbEllipsis = ({
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
}) => /* @__PURE__ */ jsxs(
|
|
88
|
+
"span",
|
|
89
|
+
{
|
|
90
|
+
role: "presentation",
|
|
91
|
+
"aria-hidden": "true",
|
|
92
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
93
|
+
...props,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsxs(
|
|
96
|
+
"svg",
|
|
97
|
+
{
|
|
98
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
99
|
+
width: "16",
|
|
100
|
+
height: "16",
|
|
101
|
+
viewBox: "0 0 24 24",
|
|
102
|
+
fill: "none",
|
|
103
|
+
stroke: "currentColor",
|
|
104
|
+
strokeWidth: "2",
|
|
105
|
+
strokeLinecap: "round",
|
|
106
|
+
strokeLinejoin: "round",
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" }),
|
|
109
|
+
/* @__PURE__ */ jsx("circle", { cx: "19", cy: "12", r: "1" }),
|
|
110
|
+
/* @__PURE__ */ jsx("circle", { cx: "5", cy: "12", r: "1" })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
11
119
|
export {
|
|
12
120
|
Breadcrumb,
|
|
13
121
|
BreadcrumbEllipsis,
|
package/dist/button/index.js
CHANGED
|
@@ -26,36 +26,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/button/index.tsx
|
|
31
29
|
var button_exports = {};
|
|
32
30
|
__export(button_exports, {
|
|
33
31
|
Button: () => Button,
|
|
34
32
|
buttonVariants: () => buttonVariants
|
|
35
33
|
});
|
|
36
34
|
module.exports = __toCommonJS(button_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
36
|
var React = __toESM(require("react"));
|
|
38
37
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
39
38
|
var import_class_variance_authority = require("class-variance-authority");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var import_clsx = require("clsx");
|
|
43
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
44
|
-
var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
|
|
45
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
46
|
-
extend: {
|
|
47
|
-
classGroups: {
|
|
48
|
-
shadow: [{ shadow: [isArbitraryShadowWithHint] }]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
function cn(...inputs) {
|
|
53
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// src/button/index.tsx
|
|
57
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
39
|
+
var import_utils = require("../utils.js");
|
|
40
|
+
const buttonVariants = (0, import_class_variance_authority.cva)(
|
|
59
41
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
60
42
|
{
|
|
61
43
|
variants: {
|
|
@@ -80,13 +62,13 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
80
62
|
}
|
|
81
63
|
}
|
|
82
64
|
);
|
|
83
|
-
|
|
65
|
+
const Button = React.forwardRef(
|
|
84
66
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
85
67
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
86
68
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
69
|
Comp,
|
|
88
70
|
{
|
|
89
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
71
|
+
className: (0, import_utils.cn)(buttonVariants({ variant, size, className })),
|
|
90
72
|
ref,
|
|
91
73
|
...props
|
|
92
74
|
}
|
package/dist/button/index.mjs
CHANGED
|
@@ -1,8 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "
|
|
5
|
-
import "../
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../utils.mjs";
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-[var(--axis-button-bg-default)] text-[var(--axis-button-text-default)] hover:bg-[var(--axis-button-bg-hover)] active:bg-[var(--axis-button-bg-active)] focus-visible:ring-[var(--axis-button-border-focus)]",
|
|
12
|
+
secondary: "bg-[var(--axis-button-secondary-bg-default)] text-[var(--axis-button-secondary-text-default)] hover:bg-[var(--axis-button-secondary-bg-hover)] active:bg-[var(--axis-button-secondary-bg-active)]",
|
|
13
|
+
ghost: "bg-[var(--axis-button-ghost-bg-default)] text-[var(--axis-button-ghost-text-default)] hover:bg-[var(--axis-button-ghost-bg-hover)] active:bg-[var(--axis-button-ghost-bg-active)]",
|
|
14
|
+
destructive: "bg-[var(--axis-button-destructive-bg-default)] text-[var(--axis-button-destructive-text-default)] hover:bg-[var(--axis-button-destructive-bg-hover)] active:bg-[var(--axis-button-destructive-bg-active)]",
|
|
15
|
+
outline: "border border-[var(--axis-border-default)] bg-transparent hover:bg-[var(--axis-surface-secondary)] text-[var(--axis-text-primary)]",
|
|
16
|
+
link: "text-[var(--axis-text-brand)] underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
sm: "h-8 px-3 text-xs",
|
|
20
|
+
default: "h-10 px-4 py-2",
|
|
21
|
+
lg: "h-12 px-6 text-base",
|
|
22
|
+
icon: "h-10 w-10"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default",
|
|
27
|
+
size: "default"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
const Button = React.forwardRef(
|
|
32
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
33
|
+
const Comp = asChild ? Slot : "button";
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
Comp,
|
|
36
|
+
{
|
|
37
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
38
|
+
ref,
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
Button.displayName = "Button";
|
|
6
45
|
export {
|
|
7
46
|
Button,
|
|
8
47
|
buttonVariants
|