@fanvue/ui 2.4.0 → 2.5.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/cjs/components/Icons/ThumbDownFilledIcon.cjs +45 -0
- package/dist/cjs/components/Icons/ThumbDownFilledIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ThumbUpFilledIcon.cjs +45 -0
- package/dist/cjs/components/Icons/ThumbUpFilledIcon.cjs.map +1 -0
- package/dist/cjs/components/Stepper/Stepper.cjs +72 -0
- package/dist/cjs/components/Stepper/Stepper.cjs.map +1 -0
- package/dist/cjs/components/Stepper/StepperStep.cjs +103 -0
- package/dist/cjs/components/Stepper/StepperStep.cjs.map +1 -0
- package/dist/cjs/index.cjs +8 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/Icons/ThumbDownFilledIcon.mjs +28 -0
- package/dist/components/Icons/ThumbDownFilledIcon.mjs.map +1 -0
- package/dist/components/Icons/ThumbUpFilledIcon.mjs +28 -0
- package/dist/components/Icons/ThumbUpFilledIcon.mjs.map +1 -0
- package/dist/components/Stepper/Stepper.mjs +55 -0
- package/dist/components/Stepper/Stepper.mjs.map +1 -0
- package/dist/components/Stepper/StepperStep.mjs +86 -0
- package/dist/components/Stepper/StepperStep.mjs.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles/theme.css +9 -0
- package/package.json +2 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
|
+
const ThumbDownFilledIcon = React__namespace.forwardRef(
|
|
25
|
+
({ className, ...props }, ref) => {
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
className: cn.cn("size-6", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("g", { fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(2 2)", children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.38989 3.23001V13.39C6.38989 13.79 6.50989 14.18 6.72989 14.51L9.4599 18.57C9.8899 19.22 10.9599 19.68 11.8699 19.34C12.8499 19.01 13.4999 17.91 13.2899 16.93L12.7699 13.66C12.7299 13.36 12.8099 13.09 12.9799 12.88C13.1499 12.69 13.3999 12.57 13.6699 12.57H17.7799C18.5699 12.57 19.2499 12.25 19.6499 11.69C20.0299 11.15 20.0999 10.45 19.8499 9.74001L17.3899 2.25001C17.0799 1.01001 15.7299 5.72205e-06 14.3899 5.72205e-06H10.4899C9.8199 5.72205e-06 8.8799 0.230005 8.4499 0.660006L7.16989 1.65001C6.67989 2.02001 6.38989 2.61 6.38989 3.23001Z" }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.21 15.3398H2.18C0.63 15.3398 0 14.7398 0 13.2598V3.1998C0 1.7198 0.63 1.1198 2.18 1.1198H3.21C4.76 1.1198 5.39 1.7198 5.39 3.1998V13.2598C5.39 14.7398 4.76 15.3398 3.21 15.3398Z" })
|
|
38
|
+
] }) })
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
ThumbDownFilledIcon.displayName = "ThumbDownFilledIcon";
|
|
44
|
+
exports.ThumbDownFilledIcon = ThumbDownFilledIcon;
|
|
45
|
+
//# sourceMappingURL=ThumbDownFilledIcon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThumbDownFilledIcon.cjs","sources":["../../../../src/components/Icons/ThumbDownFilledIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ThumbDownFilledIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-6\", className)}\n {...props}\n >\n <g fill=\"currentColor\">\n <g transform=\"translate(2 2)\">\n <path d=\"M6.38989 3.23001V13.39C6.38989 13.79 6.50989 14.18 6.72989 14.51L9.4599 18.57C9.8899 19.22 10.9599 19.68 11.8699 19.34C12.8499 19.01 13.4999 17.91 13.2899 16.93L12.7699 13.66C12.7299 13.36 12.8099 13.09 12.9799 12.88C13.1499 12.69 13.3999 12.57 13.6699 12.57H17.7799C18.5699 12.57 19.2499 12.25 19.6499 11.69C20.0299 11.15 20.0999 10.45 19.8499 9.74001L17.3899 2.25001C17.0799 1.01001 15.7299 5.72205e-06 14.3899 5.72205e-06H10.4899C9.8199 5.72205e-06 8.8799 0.230005 8.4499 0.660006L7.16989 1.65001C6.67989 2.02001 6.38989 2.61 6.38989 3.23001Z\" />\n <path d=\"M3.21 15.3398H2.18C0.63 15.3398 0 14.7398 0 13.2598V3.1998C0 1.7198 0.63 1.1198 2.18 1.1198H3.21C4.76 1.1198 5.39 1.7198 5.39 3.1998V13.2598C5.39 14.7398 4.76 15.3398 3.21 15.3398Z\" />\n </g>\n </g>\n </svg>\n );\n },\n);\n\nThumbDownFilledIcon.displayName = \"ThumbDownFilledIcon\";\n"],"names":["React","jsx","cn","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,sBAAsBA,iBAAM;AAAA,EACvC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAAQ;AAChC,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAWC,GAAAA,GAAG,UAAU,SAAS;AAAA,QAChC,GAAG;AAAA,QAEJ,yCAAC,KAAA,EAAE,MAAK,gBACN,UAAAC,2BAAAA,KAAC,KAAA,EAAE,WAAU,kBACX,UAAA;AAAA,UAAAF,2BAAAA,IAAC,QAAA,EAAK,GAAE,oiBAAA,CAAoiB;AAAA,UAC5iBA,2BAAAA,IAAC,QAAA,EAAK,GAAE,uLAAA,CAAuL;AAAA,QAAA,EAAA,CACjM,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,oBAAoB,cAAc;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
|
+
const ThumbUpFilledIcon = React__namespace.forwardRef(
|
|
25
|
+
({ className, ...props }, ref) => {
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
className: cn.cn("size-6", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("g", { fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsxs("g", { transform: "translate(2 2)", children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.38989 16.2251V6.06508C6.38989 5.66508 6.50989 5.27508 6.72989 4.94508L9.4599 0.885083C9.8899 0.235083 10.9599 -0.224917 11.8699 0.115083C12.8499 0.445083 13.4999 1.54508 13.2899 2.52508L12.7699 5.79508C12.7299 6.09508 12.8099 6.36508 12.9799 6.57508C13.1499 6.76508 13.3999 6.88508 13.6699 6.88508H17.7799C18.5699 6.88508 19.2499 7.20508 19.6499 7.76507C20.0299 8.30507 20.0999 9.00507 19.8499 9.71507L17.3899 17.2051C17.0799 18.4451 15.7299 19.4551 14.3899 19.4551H10.4899C9.8199 19.4551 8.8799 19.2251 8.4499 18.7951L7.16989 17.8051C6.67989 17.4351 6.38989 16.8451 6.38989 16.2251Z" }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.21 4.11523H2.18C0.63 4.11523 0 4.71523 0 6.19523V16.2553C0 17.7353 0.63 18.3353 2.18 18.3353H3.21C4.76 18.3353 5.39 17.7353 5.39 16.2553V6.19523C5.39 4.71523 4.76 4.11523 3.21 4.11523Z" })
|
|
38
|
+
] }) })
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
ThumbUpFilledIcon.displayName = "ThumbUpFilledIcon";
|
|
44
|
+
exports.ThumbUpFilledIcon = ThumbUpFilledIcon;
|
|
45
|
+
//# sourceMappingURL=ThumbUpFilledIcon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThumbUpFilledIcon.cjs","sources":["../../../../src/components/Icons/ThumbUpFilledIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ThumbUpFilledIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-6\", className)}\n {...props}\n >\n <g fill=\"currentColor\">\n <g transform=\"translate(2 2)\">\n <path d=\"M6.38989 16.2251V6.06508C6.38989 5.66508 6.50989 5.27508 6.72989 4.94508L9.4599 0.885083C9.8899 0.235083 10.9599 -0.224917 11.8699 0.115083C12.8499 0.445083 13.4999 1.54508 13.2899 2.52508L12.7699 5.79508C12.7299 6.09508 12.8099 6.36508 12.9799 6.57508C13.1499 6.76508 13.3999 6.88508 13.6699 6.88508H17.7799C18.5699 6.88508 19.2499 7.20508 19.6499 7.76507C20.0299 8.30507 20.0999 9.00507 19.8499 9.71507L17.3899 17.2051C17.0799 18.4451 15.7299 19.4551 14.3899 19.4551H10.4899C9.8199 19.4551 8.8799 19.2251 8.4499 18.7951L7.16989 17.8051C6.67989 17.4351 6.38989 16.8451 6.38989 16.2251Z\" />\n <path d=\"M3.21 4.11523H2.18C0.63 4.11523 0 4.71523 0 6.19523V16.2553C0 17.7353 0.63 18.3353 2.18 18.3353H3.21C4.76 18.3353 5.39 17.7353 5.39 16.2553V6.19523C5.39 4.71523 4.76 4.11523 3.21 4.11523Z\" />\n </g>\n </g>\n </svg>\n );\n },\n);\n\nThumbUpFilledIcon.displayName = \"ThumbUpFilledIcon\";\n"],"names":["React","jsx","cn","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,oBAAoBA,iBAAM;AAAA,EACrC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAAQ;AAChC,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAWC,GAAAA,GAAG,UAAU,SAAS;AAAA,QAChC,GAAG;AAAA,QAEJ,yCAAC,KAAA,EAAE,MAAK,gBACN,UAAAC,2BAAAA,KAAC,KAAA,EAAE,WAAU,kBACX,UAAA;AAAA,UAAAF,2BAAAA,IAAC,QAAA,EAAK,GAAE,6kBAAA,CAA6kB;AAAA,UACrlBA,2BAAAA,IAAC,QAAA,EAAK,GAAE,8LAAA,CAA8L;AAAA,QAAA,EAAA,CACxM,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,kBAAkB,cAAc;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
const StepperStep = require("./StepperStep.cjs");
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
if (k !== "default") {
|
|
13
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: () => e[k]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
|
+
const CONNECTOR_MARGIN = {
|
|
26
|
+
sm: "mt-3",
|
|
27
|
+
md: "mt-4",
|
|
28
|
+
lg: "mt-5"
|
|
29
|
+
};
|
|
30
|
+
const Stepper = React__namespace.forwardRef(
|
|
31
|
+
({ activeStep, steps, size = "md", className, ...props }, ref) => {
|
|
32
|
+
return (
|
|
33
|
+
// biome-ignore lint/a11y/useSemanticElements: <fieldset> adds unwanted browser styling for a non-interactive progress indicator
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
role: "group",
|
|
39
|
+
"aria-label": "Progress",
|
|
40
|
+
className: cn.cn("flex items-start", className),
|
|
41
|
+
...props,
|
|
42
|
+
children: steps.map((step, index) => {
|
|
43
|
+
const state = index < activeStep ? "completed" : index === activeStep ? "active" : "upcoming";
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
46
|
+
StepperStep.StepperStep,
|
|
47
|
+
{
|
|
48
|
+
state,
|
|
49
|
+
size,
|
|
50
|
+
stepNumber: index + 1,
|
|
51
|
+
title: step.title,
|
|
52
|
+
description: step.description,
|
|
53
|
+
className: "shrink-0"
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: cn.cn("h-px min-w-6 flex-1 bg-border-primary", CONNECTOR_MARGIN[size]),
|
|
60
|
+
"aria-hidden": "true"
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] }, index);
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
Stepper.displayName = "Stepper";
|
|
71
|
+
exports.Stepper = Stepper;
|
|
72
|
+
//# sourceMappingURL=Stepper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.cjs","sources":["../../../../src/components/Stepper/Stepper.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { StepperStep, type StepperStepSize } from \"./StepperStep\";\n\n/** Configuration for a single step within a {@link Stepper}. */\nexport interface StepItem {\n /** Primary label for the step. */\n title: string;\n /** Secondary description for the step. */\n description?: string;\n}\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Zero-based index of the currently active step. Steps before this are marked completed. */\n activeStep: number;\n /** Configuration for each step. */\n steps: StepItem[];\n /** Size preset applied to all step indicators and labels. @default \"md\" */\n size?: StepperStepSize;\n}\n\nconst CONNECTOR_MARGIN: Record<StepperStepSize, string> = {\n sm: \"mt-3\",\n md: \"mt-4\",\n lg: \"mt-5\",\n};\n\n/**\n * A horizontal progress stepper that displays a sequence of steps with\n * completed, active, and upcoming states.\n *\n * @example\n * ```tsx\n * <Stepper\n * activeStep={1}\n * steps={[\n * { title: \"Account\", description: \"Create account\" },\n * { title: \"Profile\", description: \"Set up profile\" },\n * { title: \"Done\", description: \"All set!\" },\n * ]}\n * />\n * ```\n */\nexport const Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n ({ activeStep, steps, size = \"md\", className, ...props }, ref) => {\n return (\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> adds unwanted browser styling for a non-interactive progress indicator\n <div\n ref={ref}\n role=\"group\"\n aria-label=\"Progress\"\n className={cn(\"flex items-start\", className)}\n {...props}\n >\n {steps.map((step, index) => {\n const state =\n index < activeStep ? \"completed\" : index === activeStep ? \"active\" : \"upcoming\";\n\n return (\n <React.Fragment key={index}>\n <StepperStep\n state={state}\n size={size}\n stepNumber={index + 1}\n title={step.title}\n description={step.description}\n className=\"shrink-0\"\n />\n {index < steps.length - 1 && (\n <div\n className={cn(\"h-px min-w-6 flex-1 bg-border-primary\", CONNECTOR_MARGIN[size])}\n aria-hidden=\"true\"\n />\n )}\n </React.Fragment>\n );\n })}\n </div>\n );\n },\n);\n\nStepper.displayName = \"Stepper\";\n"],"names":["React","jsx","cn","jsxs","StepperStep"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,mBAAoD;AAAA,EACxD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAkBO,MAAM,UAAUA,iBAAM;AAAA,EAC3B,CAAC,EAAE,YAAY,OAAO,OAAO,MAAM,WAAW,GAAG,MAAA,GAAS,QAAQ;AAChE;AAAA;AAAA,MAEEC,2BAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,MAAK;AAAA,UACL,cAAW;AAAA,UACX,WAAWC,GAAAA,GAAG,oBAAoB,SAAS;AAAA,UAC1C,GAAG;AAAA,UAEH,UAAA,MAAM,IAAI,CAAC,MAAM,UAAU;AAC1B,kBAAM,QACJ,QAAQ,aAAa,cAAc,UAAU,aAAa,WAAW;AAEvE,mBACEC,gCAACH,iBAAM,UAAN,EACC,UAAA;AAAA,cAAAC,2BAAAA;AAAAA,gBAACG,YAAAA;AAAAA,gBAAA;AAAA,kBACC;AAAA,kBACA;AAAA,kBACA,YAAY,QAAQ;AAAA,kBACpB,OAAO,KAAK;AAAA,kBACZ,aAAa,KAAK;AAAA,kBAClB,WAAU;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEX,QAAQ,MAAM,SAAS,KACtBH,2BAAAA;AAAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWC,GAAAA,GAAG,yCAAyC,iBAAiB,IAAI,CAAC;AAAA,kBAC7E,eAAY;AAAA,gBAAA;AAAA,cAAA;AAAA,YACd,EAAA,GAbiB,KAerB;AAAA,UAEJ,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA;AAAA,EAGP;AACF;AAEA,QAAQ,cAAc;;"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
const CheckIcon = require("../Icons/CheckIcon.cjs");
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
if (k !== "default") {
|
|
13
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: () => e[k]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
|
+
const INDICATOR_SIZE = {
|
|
26
|
+
sm: "size-6",
|
|
27
|
+
md: "size-8",
|
|
28
|
+
lg: "size-10"
|
|
29
|
+
};
|
|
30
|
+
const INDICATOR_STATE = {
|
|
31
|
+
completed: "bg-success-surface",
|
|
32
|
+
active: "border border-brand-primary-default bg-brand-primary-muted",
|
|
33
|
+
upcoming: "bg-neutral-alphas-50"
|
|
34
|
+
};
|
|
35
|
+
const NUMBER_TYPOGRAPHY = {
|
|
36
|
+
sm: "typography-semibold-body-sm",
|
|
37
|
+
md: "typography-semibold-body-md",
|
|
38
|
+
lg: "typography-semibold-body-lg"
|
|
39
|
+
};
|
|
40
|
+
const NUMBER_COLOR = {
|
|
41
|
+
completed: "",
|
|
42
|
+
active: "text-content-primary",
|
|
43
|
+
upcoming: "text-content-secondary"
|
|
44
|
+
};
|
|
45
|
+
const CONTAINER_GAP = {
|
|
46
|
+
sm: "gap-1",
|
|
47
|
+
md: "gap-2",
|
|
48
|
+
lg: "gap-2"
|
|
49
|
+
};
|
|
50
|
+
const TITLE_TYPOGRAPHY = {
|
|
51
|
+
sm: "typography-regular-body-sm",
|
|
52
|
+
md: "typography-regular-body-md",
|
|
53
|
+
lg: "typography-regular-body-lg"
|
|
54
|
+
};
|
|
55
|
+
const DESCRIPTION_TYPOGRAPHY = {
|
|
56
|
+
sm: "typography-regular-body-sm",
|
|
57
|
+
md: "typography-regular-body-sm",
|
|
58
|
+
lg: "typography-regular-body-md"
|
|
59
|
+
};
|
|
60
|
+
const LABEL_COLOR = {
|
|
61
|
+
completed: "text-content-secondary",
|
|
62
|
+
active: "text-content-primary",
|
|
63
|
+
upcoming: "text-content-tertiary"
|
|
64
|
+
};
|
|
65
|
+
const CHECK_ICON_SIZE = {
|
|
66
|
+
sm: "size-3",
|
|
67
|
+
md: "size-4",
|
|
68
|
+
lg: "size-5"
|
|
69
|
+
};
|
|
70
|
+
const StepperStep = React__namespace.forwardRef(
|
|
71
|
+
({ state = "upcoming", size = "md", stepNumber, title, description, className, ...props }, ref) => {
|
|
72
|
+
const hasLabels = title != null || description != null;
|
|
73
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
ref,
|
|
77
|
+
className: cn.cn("flex flex-col items-center", CONTAINER_GAP[size], className),
|
|
78
|
+
...props,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: cn.cn(
|
|
84
|
+
"flex shrink-0 items-center justify-center rounded-full",
|
|
85
|
+
INDICATOR_SIZE[size],
|
|
86
|
+
INDICATOR_STATE[state]
|
|
87
|
+
),
|
|
88
|
+
"aria-hidden": "true",
|
|
89
|
+
children: state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon.CheckIcon, { className: cn.cn(CHECK_ICON_SIZE[size], "text-success-content") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn.cn(NUMBER_TYPOGRAPHY[size], NUMBER_COLOR[state]), children: stepNumber })
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
hasLabels && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("flex flex-col items-center gap-1 text-center", LABEL_COLOR[state]), children: [
|
|
93
|
+
title != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: TITLE_TYPOGRAPHY[size], children: title }),
|
|
94
|
+
description != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: DESCRIPTION_TYPOGRAPHY[size], children: description })
|
|
95
|
+
] })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
StepperStep.displayName = "StepperStep";
|
|
102
|
+
exports.StepperStep = StepperStep;
|
|
103
|
+
//# sourceMappingURL=StepperStep.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepperStep.cjs","sources":["../../../../src/components/Stepper/StepperStep.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\n\n/** Current state of a step in the stepper. */\nexport type StepperStepState = \"completed\" | \"active\" | \"upcoming\";\n\n/** Size preset for the step indicator and labels. */\nexport type StepperStepSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface StepperStepProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Current state of the step. @default \"upcoming\" */\n state?: StepperStepState;\n /** Size preset for the indicator and labels. @default \"md\" */\n size?: StepperStepSize;\n /** Step number displayed in the indicator for active and upcoming states. */\n stepNumber?: number;\n /** Primary label shown below the indicator. */\n title?: string;\n /** Secondary description shown below the title. */\n description?: string;\n}\n\nconst INDICATOR_SIZE: Record<StepperStepSize, string> = {\n sm: \"size-6\",\n md: \"size-8\",\n lg: \"size-10\",\n};\n\nconst INDICATOR_STATE: Record<StepperStepState, string> = {\n completed: \"bg-success-surface\",\n active: \"border border-brand-primary-default bg-brand-primary-muted\",\n upcoming: \"bg-neutral-alphas-50\",\n};\n\nconst NUMBER_TYPOGRAPHY: Record<StepperStepSize, string> = {\n sm: \"typography-semibold-body-sm\",\n md: \"typography-semibold-body-md\",\n lg: \"typography-semibold-body-lg\",\n};\n\nconst NUMBER_COLOR: Record<StepperStepState, string> = {\n completed: \"\",\n active: \"text-content-primary\",\n upcoming: \"text-content-secondary\",\n};\n\nconst CONTAINER_GAP: Record<StepperStepSize, string> = {\n sm: \"gap-1\",\n md: \"gap-2\",\n lg: \"gap-2\",\n};\n\nconst TITLE_TYPOGRAPHY: Record<StepperStepSize, string> = {\n sm: \"typography-regular-body-sm\",\n md: \"typography-regular-body-md\",\n lg: \"typography-regular-body-lg\",\n};\n\nconst DESCRIPTION_TYPOGRAPHY: Record<StepperStepSize, string> = {\n sm: \"typography-regular-body-sm\",\n md: \"typography-regular-body-sm\",\n lg: \"typography-regular-body-md\",\n};\n\nconst LABEL_COLOR: Record<StepperStepState, string> = {\n completed: \"text-content-secondary\",\n active: \"text-content-primary\",\n upcoming: \"text-content-tertiary\",\n};\n\nconst CHECK_ICON_SIZE: Record<StepperStepSize, string> = {\n sm: \"size-3\",\n md: \"size-4\",\n lg: \"size-5\",\n};\n\n/**\n * A single step indicator with optional labels, used standalone or within a {@link Stepper}.\n *\n * @example\n * ```tsx\n * <StepperStep state=\"active\" stepNumber={2} title=\"Profile\" description=\"Set up profile\" />\n * ```\n */\nexport const StepperStep = React.forwardRef<HTMLDivElement, StepperStepProps>(\n (\n { state = \"upcoming\", size = \"md\", stepNumber, title, description, className, ...props },\n ref,\n ) => {\n const hasLabels = title != null || description != null;\n\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", CONTAINER_GAP[size], className)}\n {...props}\n >\n <div\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-full\",\n INDICATOR_SIZE[size],\n INDICATOR_STATE[state],\n )}\n aria-hidden=\"true\"\n >\n {state === \"completed\" ? (\n <CheckIcon className={cn(CHECK_ICON_SIZE[size], \"text-success-content\")} />\n ) : (\n <span className={cn(NUMBER_TYPOGRAPHY[size], NUMBER_COLOR[state])}>{stepNumber}</span>\n )}\n </div>\n\n {hasLabels && (\n <div className={cn(\"flex flex-col items-center gap-1 text-center\", LABEL_COLOR[state])}>\n {title != null && <span className={TITLE_TYPOGRAPHY[size]}>{title}</span>}\n {description != null && (\n <span className={DESCRIPTION_TYPOGRAPHY[size]}>{description}</span>\n )}\n </div>\n )}\n </div>\n );\n },\n);\n\nStepperStep.displayName = \"StepperStep\";\n"],"names":["React","jsxs","cn","jsx","CheckIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,iBAAkD;AAAA,EACtD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,kBAAoD;AAAA,EACxD,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AACZ;AAEA,MAAM,oBAAqD;AAAA,EACzD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAiD;AAAA,EACrD,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AACZ;AAEA,MAAM,gBAAiD;AAAA,EACrD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,mBAAoD;AAAA,EACxD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,yBAA0D;AAAA,EAC9D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,cAAgD;AAAA,EACpD,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AACZ;AAEA,MAAM,kBAAmD;AAAA,EACvD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAUO,MAAM,cAAcA,iBAAM;AAAA,EAC/B,CACE,EAAE,QAAQ,YAAY,OAAO,MAAM,YAAY,OAAO,aAAa,WAAW,GAAG,MAAA,GACjF,QACG;AACH,UAAM,YAAY,SAAS,QAAQ,eAAe;AAElD,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAWC,GAAAA,GAAG,8BAA8B,cAAc,IAAI,GAAG,SAAS;AAAA,QACzE,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAAC,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWD,GAAAA;AAAAA,gBACT;AAAA,gBACA,eAAe,IAAI;AAAA,gBACnB,gBAAgB,KAAK;AAAA,cAAA;AAAA,cAEvB,eAAY;AAAA,cAEX,UAAA,UAAU,cACTC,2BAAAA,IAACC,UAAAA,WAAA,EAAU,WAAWF,GAAAA,GAAG,gBAAgB,IAAI,GAAG,sBAAsB,EAAA,CAAG,IAEzEC,2BAAAA,IAAC,QAAA,EAAK,WAAWD,GAAAA,GAAG,kBAAkB,IAAI,GAAG,aAAa,KAAK,CAAC,GAAI,UAAA,WAAA,CAAW;AAAA,YAAA;AAAA,UAAA;AAAA,UAIlF,6CACE,OAAA,EAAI,WAAWA,GAAAA,GAAG,gDAAgD,YAAY,KAAK,CAAC,GAClF,UAAA;AAAA,YAAA,SAAS,QAAQC,+BAAC,QAAA,EAAK,WAAW,iBAAiB,IAAI,GAAI,UAAA,OAAM;AAAA,YACjE,eAAe,QACdA,2BAAAA,IAAC,QAAA,EAAK,WAAW,uBAAuB,IAAI,GAAI,UAAA,YAAA,CAAY;AAAA,UAAA,EAAA,CAEhE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,YAAY,cAAc;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -130,7 +130,9 @@ const Support2Icon = require("./components/Icons/Support2Icon.cjs");
|
|
|
130
130
|
const SupportIcon = require("./components/Icons/SupportIcon.cjs");
|
|
131
131
|
const TagIcon = require("./components/Icons/TagIcon.cjs");
|
|
132
132
|
const TaskIcon = require("./components/Icons/TaskIcon.cjs");
|
|
133
|
+
const ThumbDownFilledIcon = require("./components/Icons/ThumbDownFilledIcon.cjs");
|
|
133
134
|
const ThumbDownIcon = require("./components/Icons/ThumbDownIcon.cjs");
|
|
135
|
+
const ThumbUpFilledIcon = require("./components/Icons/ThumbUpFilledIcon.cjs");
|
|
134
136
|
const ThumbUpIcon = require("./components/Icons/ThumbUpIcon.cjs");
|
|
135
137
|
const TickCircleIcon = require("./components/Icons/TickCircleIcon.cjs");
|
|
136
138
|
const TickCircleOffIcon = require("./components/Icons/TickCircleOffIcon.cjs");
|
|
@@ -167,6 +169,8 @@ const Select = require("./components/Select/Select.cjs");
|
|
|
167
169
|
const Skeleton = require("./components/Skeleton/Skeleton.cjs");
|
|
168
170
|
const Slider = require("./components/Slider/Slider.cjs");
|
|
169
171
|
const Snackbar = require("./components/Snackbar/Snackbar.cjs");
|
|
172
|
+
const Stepper = require("./components/Stepper/Stepper.cjs");
|
|
173
|
+
const StepperStep = require("./components/Stepper/StepperStep.cjs");
|
|
170
174
|
const Switch = require("./components/Switch/Switch.cjs");
|
|
171
175
|
const SwitchField = require("./components/SwitchField/SwitchField.cjs");
|
|
172
176
|
const SwitchToggle = require("./components/SwitchToggle/SwitchToggle.cjs");
|
|
@@ -346,7 +350,9 @@ exports.Support2Icon = Support2Icon.Support2Icon;
|
|
|
346
350
|
exports.SupportIcon = SupportIcon.SupportIcon;
|
|
347
351
|
exports.TagIcon = TagIcon.TagIcon;
|
|
348
352
|
exports.TaskIcon = TaskIcon.TaskIcon;
|
|
353
|
+
exports.ThumbDownFilledIcon = ThumbDownFilledIcon.ThumbDownFilledIcon;
|
|
349
354
|
exports.ThumbDownIcon = ThumbDownIcon.ThumbDownIcon;
|
|
355
|
+
exports.ThumbUpFilledIcon = ThumbUpFilledIcon.ThumbUpFilledIcon;
|
|
350
356
|
exports.ThumbUpIcon = ThumbUpIcon.ThumbUpIcon;
|
|
351
357
|
exports.TickCircleIcon = TickCircleIcon.TickCircleIcon;
|
|
352
358
|
exports.TickCircleOffIcon = TickCircleOffIcon.TickCircleOffIcon;
|
|
@@ -390,6 +396,8 @@ exports.SelectSeparator = Select.SelectSeparator;
|
|
|
390
396
|
exports.Skeleton = Skeleton.Skeleton;
|
|
391
397
|
exports.Slider = Slider.Slider;
|
|
392
398
|
exports.Snackbar = Snackbar.Snackbar;
|
|
399
|
+
exports.Stepper = Stepper.Stepper;
|
|
400
|
+
exports.StepperStep = StepperStep.StepperStep;
|
|
393
401
|
exports.Switch = Switch.Switch;
|
|
394
402
|
exports.SwitchField = SwitchField.SwitchField;
|
|
395
403
|
exports.SwitchToggle = SwitchToggle.SwitchToggle;
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const ThumbDownFilledIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
className: cn("size-6", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: /* @__PURE__ */ jsx("g", { fill: "currentColor", children: /* @__PURE__ */ jsxs("g", { transform: "translate(2 2)", children: [
|
|
17
|
+
/* @__PURE__ */ jsx("path", { d: "M6.38989 3.23001V13.39C6.38989 13.79 6.50989 14.18 6.72989 14.51L9.4599 18.57C9.8899 19.22 10.9599 19.68 11.8699 19.34C12.8499 19.01 13.4999 17.91 13.2899 16.93L12.7699 13.66C12.7299 13.36 12.8099 13.09 12.9799 12.88C13.1499 12.69 13.3999 12.57 13.6699 12.57H17.7799C18.5699 12.57 19.2499 12.25 19.6499 11.69C20.0299 11.15 20.0999 10.45 19.8499 9.74001L17.3899 2.25001C17.0799 1.01001 15.7299 5.72205e-06 14.3899 5.72205e-06H10.4899C9.8199 5.72205e-06 8.8799 0.230005 8.4499 0.660006L7.16989 1.65001C6.67989 2.02001 6.38989 2.61 6.38989 3.23001Z" }),
|
|
18
|
+
/* @__PURE__ */ jsx("path", { d: "M3.21 15.3398H2.18C0.63 15.3398 0 14.7398 0 13.2598V3.1998C0 1.7198 0.63 1.1198 2.18 1.1198H3.21C4.76 1.1198 5.39 1.7198 5.39 3.1998V13.2598C5.39 14.7398 4.76 15.3398 3.21 15.3398Z" })
|
|
19
|
+
] }) })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
ThumbDownFilledIcon.displayName = "ThumbDownFilledIcon";
|
|
25
|
+
export {
|
|
26
|
+
ThumbDownFilledIcon
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ThumbDownFilledIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThumbDownFilledIcon.mjs","sources":["../../../src/components/Icons/ThumbDownFilledIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ThumbDownFilledIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-6\", className)}\n {...props}\n >\n <g fill=\"currentColor\">\n <g transform=\"translate(2 2)\">\n <path d=\"M6.38989 3.23001V13.39C6.38989 13.79 6.50989 14.18 6.72989 14.51L9.4599 18.57C9.8899 19.22 10.9599 19.68 11.8699 19.34C12.8499 19.01 13.4999 17.91 13.2899 16.93L12.7699 13.66C12.7299 13.36 12.8099 13.09 12.9799 12.88C13.1499 12.69 13.3999 12.57 13.6699 12.57H17.7799C18.5699 12.57 19.2499 12.25 19.6499 11.69C20.0299 11.15 20.0999 10.45 19.8499 9.74001L17.3899 2.25001C17.0799 1.01001 15.7299 5.72205e-06 14.3899 5.72205e-06H10.4899C9.8199 5.72205e-06 8.8799 0.230005 8.4499 0.660006L7.16989 1.65001C6.67989 2.02001 6.38989 2.61 6.38989 3.23001Z\" />\n <path d=\"M3.21 15.3398H2.18C0.63 15.3398 0 14.7398 0 13.2598V3.1998C0 1.7198 0.63 1.1198 2.18 1.1198H3.21C4.76 1.1198 5.39 1.7198 5.39 3.1998V13.2598C5.39 14.7398 4.76 15.3398 3.21 15.3398Z\" />\n </g>\n </g>\n </svg>\n );\n },\n);\n\nThumbDownFilledIcon.displayName = \"ThumbDownFilledIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,sBAAsB,MAAM;AAAA,EACvC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAAQ;AAChC,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAW,GAAG,UAAU,SAAS;AAAA,QAChC,GAAG;AAAA,QAEJ,8BAAC,KAAA,EAAE,MAAK,gBACN,UAAA,qBAAC,KAAA,EAAE,WAAU,kBACX,UAAA;AAAA,UAAA,oBAAC,QAAA,EAAK,GAAE,oiBAAA,CAAoiB;AAAA,UAC5iB,oBAAC,QAAA,EAAK,GAAE,uLAAA,CAAuL;AAAA,QAAA,EAAA,CACjM,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,oBAAoB,cAAc;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const ThumbUpFilledIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
className: cn("size-6", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: /* @__PURE__ */ jsx("g", { fill: "currentColor", children: /* @__PURE__ */ jsxs("g", { transform: "translate(2 2)", children: [
|
|
17
|
+
/* @__PURE__ */ jsx("path", { d: "M6.38989 16.2251V6.06508C6.38989 5.66508 6.50989 5.27508 6.72989 4.94508L9.4599 0.885083C9.8899 0.235083 10.9599 -0.224917 11.8699 0.115083C12.8499 0.445083 13.4999 1.54508 13.2899 2.52508L12.7699 5.79508C12.7299 6.09508 12.8099 6.36508 12.9799 6.57508C13.1499 6.76508 13.3999 6.88508 13.6699 6.88508H17.7799C18.5699 6.88508 19.2499 7.20508 19.6499 7.76507C20.0299 8.30507 20.0999 9.00507 19.8499 9.71507L17.3899 17.2051C17.0799 18.4451 15.7299 19.4551 14.3899 19.4551H10.4899C9.8199 19.4551 8.8799 19.2251 8.4499 18.7951L7.16989 17.8051C6.67989 17.4351 6.38989 16.8451 6.38989 16.2251Z" }),
|
|
18
|
+
/* @__PURE__ */ jsx("path", { d: "M3.21 4.11523H2.18C0.63 4.11523 0 4.71523 0 6.19523V16.2553C0 17.7353 0.63 18.3353 2.18 18.3353H3.21C4.76 18.3353 5.39 17.7353 5.39 16.2553V6.19523C5.39 4.71523 4.76 4.11523 3.21 4.11523Z" })
|
|
19
|
+
] }) })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
ThumbUpFilledIcon.displayName = "ThumbUpFilledIcon";
|
|
25
|
+
export {
|
|
26
|
+
ThumbUpFilledIcon
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ThumbUpFilledIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThumbUpFilledIcon.mjs","sources":["../../../src/components/Icons/ThumbUpFilledIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ThumbUpFilledIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-6\", className)}\n {...props}\n >\n <g fill=\"currentColor\">\n <g transform=\"translate(2 2)\">\n <path d=\"M6.38989 16.2251V6.06508C6.38989 5.66508 6.50989 5.27508 6.72989 4.94508L9.4599 0.885083C9.8899 0.235083 10.9599 -0.224917 11.8699 0.115083C12.8499 0.445083 13.4999 1.54508 13.2899 2.52508L12.7699 5.79508C12.7299 6.09508 12.8099 6.36508 12.9799 6.57508C13.1499 6.76508 13.3999 6.88508 13.6699 6.88508H17.7799C18.5699 6.88508 19.2499 7.20508 19.6499 7.76507C20.0299 8.30507 20.0999 9.00507 19.8499 9.71507L17.3899 17.2051C17.0799 18.4451 15.7299 19.4551 14.3899 19.4551H10.4899C9.8199 19.4551 8.8799 19.2251 8.4499 18.7951L7.16989 17.8051C6.67989 17.4351 6.38989 16.8451 6.38989 16.2251Z\" />\n <path d=\"M3.21 4.11523H2.18C0.63 4.11523 0 4.71523 0 6.19523V16.2553C0 17.7353 0.63 18.3353 2.18 18.3353H3.21C4.76 18.3353 5.39 17.7353 5.39 16.2553V6.19523C5.39 4.71523 4.76 4.11523 3.21 4.11523Z\" />\n </g>\n </g>\n </svg>\n );\n },\n);\n\nThumbUpFilledIcon.displayName = \"ThumbUpFilledIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,oBAAoB,MAAM;AAAA,EACrC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAAQ;AAChC,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,eAAY;AAAA,QACZ,WAAW,GAAG,UAAU,SAAS;AAAA,QAChC,GAAG;AAAA,QAEJ,8BAAC,KAAA,EAAE,MAAK,gBACN,UAAA,qBAAC,KAAA,EAAE,WAAU,kBACX,UAAA;AAAA,UAAA,oBAAC,QAAA,EAAK,GAAE,6kBAAA,CAA6kB;AAAA,UACrlB,oBAAC,QAAA,EAAK,GAAE,8LAAA,CAA8L;AAAA,QAAA,EAAA,CACxM,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,kBAAkB,cAAc;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
import { StepperStep } from "./StepperStep.mjs";
|
|
6
|
+
const CONNECTOR_MARGIN = {
|
|
7
|
+
sm: "mt-3",
|
|
8
|
+
md: "mt-4",
|
|
9
|
+
lg: "mt-5"
|
|
10
|
+
};
|
|
11
|
+
const Stepper = React.forwardRef(
|
|
12
|
+
({ activeStep, steps, size = "md", className, ...props }, ref) => {
|
|
13
|
+
return (
|
|
14
|
+
// biome-ignore lint/a11y/useSemanticElements: <fieldset> adds unwanted browser styling for a non-interactive progress indicator
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
ref,
|
|
19
|
+
role: "group",
|
|
20
|
+
"aria-label": "Progress",
|
|
21
|
+
className: cn("flex items-start", className),
|
|
22
|
+
...props,
|
|
23
|
+
children: steps.map((step, index) => {
|
|
24
|
+
const state = index < activeStep ? "completed" : index === activeStep ? "active" : "upcoming";
|
|
25
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
StepperStep,
|
|
28
|
+
{
|
|
29
|
+
state,
|
|
30
|
+
size,
|
|
31
|
+
stepNumber: index + 1,
|
|
32
|
+
title: step.title,
|
|
33
|
+
description: step.description,
|
|
34
|
+
className: "shrink-0"
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
index < steps.length - 1 && /* @__PURE__ */ jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: cn("h-px min-w-6 flex-1 bg-border-primary", CONNECTOR_MARGIN[size]),
|
|
41
|
+
"aria-hidden": "true"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] }, index);
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
Stepper.displayName = "Stepper";
|
|
52
|
+
export {
|
|
53
|
+
Stepper
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=Stepper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.mjs","sources":["../../../src/components/Stepper/Stepper.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { StepperStep, type StepperStepSize } from \"./StepperStep\";\n\n/** Configuration for a single step within a {@link Stepper}. */\nexport interface StepItem {\n /** Primary label for the step. */\n title: string;\n /** Secondary description for the step. */\n description?: string;\n}\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Zero-based index of the currently active step. Steps before this are marked completed. */\n activeStep: number;\n /** Configuration for each step. */\n steps: StepItem[];\n /** Size preset applied to all step indicators and labels. @default \"md\" */\n size?: StepperStepSize;\n}\n\nconst CONNECTOR_MARGIN: Record<StepperStepSize, string> = {\n sm: \"mt-3\",\n md: \"mt-4\",\n lg: \"mt-5\",\n};\n\n/**\n * A horizontal progress stepper that displays a sequence of steps with\n * completed, active, and upcoming states.\n *\n * @example\n * ```tsx\n * <Stepper\n * activeStep={1}\n * steps={[\n * { title: \"Account\", description: \"Create account\" },\n * { title: \"Profile\", description: \"Set up profile\" },\n * { title: \"Done\", description: \"All set!\" },\n * ]}\n * />\n * ```\n */\nexport const Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n ({ activeStep, steps, size = \"md\", className, ...props }, ref) => {\n return (\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> adds unwanted browser styling for a non-interactive progress indicator\n <div\n ref={ref}\n role=\"group\"\n aria-label=\"Progress\"\n className={cn(\"flex items-start\", className)}\n {...props}\n >\n {steps.map((step, index) => {\n const state =\n index < activeStep ? \"completed\" : index === activeStep ? \"active\" : \"upcoming\";\n\n return (\n <React.Fragment key={index}>\n <StepperStep\n state={state}\n size={size}\n stepNumber={index + 1}\n title={step.title}\n description={step.description}\n className=\"shrink-0\"\n />\n {index < steps.length - 1 && (\n <div\n className={cn(\"h-px min-w-6 flex-1 bg-border-primary\", CONNECTOR_MARGIN[size])}\n aria-hidden=\"true\"\n />\n )}\n </React.Fragment>\n );\n })}\n </div>\n );\n },\n);\n\nStepper.displayName = \"Stepper\";\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,mBAAoD;AAAA,EACxD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAkBO,MAAM,UAAU,MAAM;AAAA,EAC3B,CAAC,EAAE,YAAY,OAAO,OAAO,MAAM,WAAW,GAAG,MAAA,GAAS,QAAQ;AAChE;AAAA;AAAA,MAEE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,MAAK;AAAA,UACL,cAAW;AAAA,UACX,WAAW,GAAG,oBAAoB,SAAS;AAAA,UAC1C,GAAG;AAAA,UAEH,UAAA,MAAM,IAAI,CAAC,MAAM,UAAU;AAC1B,kBAAM,QACJ,QAAQ,aAAa,cAAc,UAAU,aAAa,WAAW;AAEvE,mBACE,qBAAC,MAAM,UAAN,EACC,UAAA;AAAA,cAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC;AAAA,kBACA;AAAA,kBACA,YAAY,QAAQ;AAAA,kBACpB,OAAO,KAAK;AAAA,kBACZ,aAAa,KAAK;AAAA,kBAClB,WAAU;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEX,QAAQ,MAAM,SAAS,KACtB;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAW,GAAG,yCAAyC,iBAAiB,IAAI,CAAC;AAAA,kBAC7E,eAAY;AAAA,gBAAA;AAAA,cAAA;AAAA,YACd,EAAA,GAbiB,KAerB;AAAA,UAEJ,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA;AAAA,EAGP;AACF;AAEA,QAAQ,cAAc;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
import { CheckIcon } from "../Icons/CheckIcon.mjs";
|
|
6
|
+
const INDICATOR_SIZE = {
|
|
7
|
+
sm: "size-6",
|
|
8
|
+
md: "size-8",
|
|
9
|
+
lg: "size-10"
|
|
10
|
+
};
|
|
11
|
+
const INDICATOR_STATE = {
|
|
12
|
+
completed: "bg-success-surface",
|
|
13
|
+
active: "border border-brand-primary-default bg-brand-primary-muted",
|
|
14
|
+
upcoming: "bg-neutral-alphas-50"
|
|
15
|
+
};
|
|
16
|
+
const NUMBER_TYPOGRAPHY = {
|
|
17
|
+
sm: "typography-semibold-body-sm",
|
|
18
|
+
md: "typography-semibold-body-md",
|
|
19
|
+
lg: "typography-semibold-body-lg"
|
|
20
|
+
};
|
|
21
|
+
const NUMBER_COLOR = {
|
|
22
|
+
completed: "",
|
|
23
|
+
active: "text-content-primary",
|
|
24
|
+
upcoming: "text-content-secondary"
|
|
25
|
+
};
|
|
26
|
+
const CONTAINER_GAP = {
|
|
27
|
+
sm: "gap-1",
|
|
28
|
+
md: "gap-2",
|
|
29
|
+
lg: "gap-2"
|
|
30
|
+
};
|
|
31
|
+
const TITLE_TYPOGRAPHY = {
|
|
32
|
+
sm: "typography-regular-body-sm",
|
|
33
|
+
md: "typography-regular-body-md",
|
|
34
|
+
lg: "typography-regular-body-lg"
|
|
35
|
+
};
|
|
36
|
+
const DESCRIPTION_TYPOGRAPHY = {
|
|
37
|
+
sm: "typography-regular-body-sm",
|
|
38
|
+
md: "typography-regular-body-sm",
|
|
39
|
+
lg: "typography-regular-body-md"
|
|
40
|
+
};
|
|
41
|
+
const LABEL_COLOR = {
|
|
42
|
+
completed: "text-content-secondary",
|
|
43
|
+
active: "text-content-primary",
|
|
44
|
+
upcoming: "text-content-tertiary"
|
|
45
|
+
};
|
|
46
|
+
const CHECK_ICON_SIZE = {
|
|
47
|
+
sm: "size-3",
|
|
48
|
+
md: "size-4",
|
|
49
|
+
lg: "size-5"
|
|
50
|
+
};
|
|
51
|
+
const StepperStep = React.forwardRef(
|
|
52
|
+
({ state = "upcoming", size = "md", stepNumber, title, description, className, ...props }, ref) => {
|
|
53
|
+
const hasLabels = title != null || description != null;
|
|
54
|
+
return /* @__PURE__ */ jsxs(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: cn("flex flex-col items-center", CONTAINER_GAP[size], className),
|
|
59
|
+
...props,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: cn(
|
|
65
|
+
"flex shrink-0 items-center justify-center rounded-full",
|
|
66
|
+
INDICATOR_SIZE[size],
|
|
67
|
+
INDICATOR_STATE[state]
|
|
68
|
+
),
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
children: state === "completed" ? /* @__PURE__ */ jsx(CheckIcon, { className: cn(CHECK_ICON_SIZE[size], "text-success-content") }) : /* @__PURE__ */ jsx("span", { className: cn(NUMBER_TYPOGRAPHY[size], NUMBER_COLOR[state]), children: stepNumber })
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
hasLabels && /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center gap-1 text-center", LABEL_COLOR[state]), children: [
|
|
74
|
+
title != null && /* @__PURE__ */ jsx("span", { className: TITLE_TYPOGRAPHY[size], children: title }),
|
|
75
|
+
description != null && /* @__PURE__ */ jsx("span", { className: DESCRIPTION_TYPOGRAPHY[size], children: description })
|
|
76
|
+
] })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
StepperStep.displayName = "StepperStep";
|
|
83
|
+
export {
|
|
84
|
+
StepperStep
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=StepperStep.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepperStep.mjs","sources":["../../../src/components/Stepper/StepperStep.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport { CheckIcon } from \"../Icons/CheckIcon\";\n\n/** Current state of a step in the stepper. */\nexport type StepperStepState = \"completed\" | \"active\" | \"upcoming\";\n\n/** Size preset for the step indicator and labels. */\nexport type StepperStepSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface StepperStepProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Current state of the step. @default \"upcoming\" */\n state?: StepperStepState;\n /** Size preset for the indicator and labels. @default \"md\" */\n size?: StepperStepSize;\n /** Step number displayed in the indicator for active and upcoming states. */\n stepNumber?: number;\n /** Primary label shown below the indicator. */\n title?: string;\n /** Secondary description shown below the title. */\n description?: string;\n}\n\nconst INDICATOR_SIZE: Record<StepperStepSize, string> = {\n sm: \"size-6\",\n md: \"size-8\",\n lg: \"size-10\",\n};\n\nconst INDICATOR_STATE: Record<StepperStepState, string> = {\n completed: \"bg-success-surface\",\n active: \"border border-brand-primary-default bg-brand-primary-muted\",\n upcoming: \"bg-neutral-alphas-50\",\n};\n\nconst NUMBER_TYPOGRAPHY: Record<StepperStepSize, string> = {\n sm: \"typography-semibold-body-sm\",\n md: \"typography-semibold-body-md\",\n lg: \"typography-semibold-body-lg\",\n};\n\nconst NUMBER_COLOR: Record<StepperStepState, string> = {\n completed: \"\",\n active: \"text-content-primary\",\n upcoming: \"text-content-secondary\",\n};\n\nconst CONTAINER_GAP: Record<StepperStepSize, string> = {\n sm: \"gap-1\",\n md: \"gap-2\",\n lg: \"gap-2\",\n};\n\nconst TITLE_TYPOGRAPHY: Record<StepperStepSize, string> = {\n sm: \"typography-regular-body-sm\",\n md: \"typography-regular-body-md\",\n lg: \"typography-regular-body-lg\",\n};\n\nconst DESCRIPTION_TYPOGRAPHY: Record<StepperStepSize, string> = {\n sm: \"typography-regular-body-sm\",\n md: \"typography-regular-body-sm\",\n lg: \"typography-regular-body-md\",\n};\n\nconst LABEL_COLOR: Record<StepperStepState, string> = {\n completed: \"text-content-secondary\",\n active: \"text-content-primary\",\n upcoming: \"text-content-tertiary\",\n};\n\nconst CHECK_ICON_SIZE: Record<StepperStepSize, string> = {\n sm: \"size-3\",\n md: \"size-4\",\n lg: \"size-5\",\n};\n\n/**\n * A single step indicator with optional labels, used standalone or within a {@link Stepper}.\n *\n * @example\n * ```tsx\n * <StepperStep state=\"active\" stepNumber={2} title=\"Profile\" description=\"Set up profile\" />\n * ```\n */\nexport const StepperStep = React.forwardRef<HTMLDivElement, StepperStepProps>(\n (\n { state = \"upcoming\", size = \"md\", stepNumber, title, description, className, ...props },\n ref,\n ) => {\n const hasLabels = title != null || description != null;\n\n return (\n <div\n ref={ref}\n className={cn(\"flex flex-col items-center\", CONTAINER_GAP[size], className)}\n {...props}\n >\n <div\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-full\",\n INDICATOR_SIZE[size],\n INDICATOR_STATE[state],\n )}\n aria-hidden=\"true\"\n >\n {state === \"completed\" ? (\n <CheckIcon className={cn(CHECK_ICON_SIZE[size], \"text-success-content\")} />\n ) : (\n <span className={cn(NUMBER_TYPOGRAPHY[size], NUMBER_COLOR[state])}>{stepNumber}</span>\n )}\n </div>\n\n {hasLabels && (\n <div className={cn(\"flex flex-col items-center gap-1 text-center\", LABEL_COLOR[state])}>\n {title != null && <span className={TITLE_TYPOGRAPHY[size]}>{title}</span>}\n {description != null && (\n <span className={DESCRIPTION_TYPOGRAPHY[size]}>{description}</span>\n )}\n </div>\n )}\n </div>\n );\n },\n);\n\nStepperStep.displayName = \"StepperStep\";\n"],"names":[],"mappings":";;;;;AAuBA,MAAM,iBAAkD;AAAA,EACtD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,kBAAoD;AAAA,EACxD,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AACZ;AAEA,MAAM,oBAAqD;AAAA,EACzD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAiD;AAAA,EACrD,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AACZ;AAEA,MAAM,gBAAiD;AAAA,EACrD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,mBAAoD;AAAA,EACxD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,yBAA0D;AAAA,EAC9D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,cAAgD;AAAA,EACpD,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AACZ;AAEA,MAAM,kBAAmD;AAAA,EACvD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAUO,MAAM,cAAc,MAAM;AAAA,EAC/B,CACE,EAAE,QAAQ,YAAY,OAAO,MAAM,YAAY,OAAO,aAAa,WAAW,GAAG,MAAA,GACjF,QACG;AACH,UAAM,YAAY,SAAS,QAAQ,eAAe;AAElD,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,8BAA8B,cAAc,IAAI,GAAG,SAAS;AAAA,QACzE,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,eAAe,IAAI;AAAA,gBACnB,gBAAgB,KAAK;AAAA,cAAA;AAAA,cAEvB,eAAY;AAAA,cAEX,UAAA,UAAU,cACT,oBAAC,WAAA,EAAU,WAAW,GAAG,gBAAgB,IAAI,GAAG,sBAAsB,EAAA,CAAG,IAEzE,oBAAC,QAAA,EAAK,WAAW,GAAG,kBAAkB,IAAI,GAAG,aAAa,KAAK,CAAC,GAAI,UAAA,WAAA,CAAW;AAAA,YAAA;AAAA,UAAA;AAAA,UAIlF,kCACE,OAAA,EAAI,WAAW,GAAG,gDAAgD,YAAY,KAAK,CAAC,GAClF,UAAA;AAAA,YAAA,SAAS,QAAQ,oBAAC,QAAA,EAAK,WAAW,iBAAiB,IAAI,GAAI,UAAA,OAAM;AAAA,YACjE,eAAe,QACd,oBAAC,QAAA,EAAK,WAAW,uBAAuB,IAAI,GAAI,UAAA,YAAA,CAAY;AAAA,UAAA,EAAA,CAEhE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,YAAY,cAAc;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2145,6 +2145,70 @@ export declare const StarIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttr
|
|
|
2145
2145
|
className?: string;
|
|
2146
2146
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
2147
2147
|
|
|
2148
|
+
/** Configuration for a single step within a {@link Stepper}. */
|
|
2149
|
+
export declare interface StepItem {
|
|
2150
|
+
/** Primary label for the step. */
|
|
2151
|
+
title: string;
|
|
2152
|
+
/** Secondary description for the step. */
|
|
2153
|
+
description?: string;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* A horizontal progress stepper that displays a sequence of steps with
|
|
2158
|
+
* completed, active, and upcoming states.
|
|
2159
|
+
*
|
|
2160
|
+
* @example
|
|
2161
|
+
* ```tsx
|
|
2162
|
+
* <Stepper
|
|
2163
|
+
* activeStep={1}
|
|
2164
|
+
* steps={[
|
|
2165
|
+
* { title: "Account", description: "Create account" },
|
|
2166
|
+
* { title: "Profile", description: "Set up profile" },
|
|
2167
|
+
* { title: "Done", description: "All set!" },
|
|
2168
|
+
* ]}
|
|
2169
|
+
* />
|
|
2170
|
+
* ```
|
|
2171
|
+
*/
|
|
2172
|
+
export declare const Stepper: React_2.ForwardRefExoticComponent<StepperProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2173
|
+
|
|
2174
|
+
export declare interface StepperProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2175
|
+
/** Zero-based index of the currently active step. Steps before this are marked completed. */
|
|
2176
|
+
activeStep: number;
|
|
2177
|
+
/** Configuration for each step. */
|
|
2178
|
+
steps: StepItem[];
|
|
2179
|
+
/** Size preset applied to all step indicators and labels. @default "md" */
|
|
2180
|
+
size?: StepperStepSize;
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
/**
|
|
2184
|
+
* A single step indicator with optional labels, used standalone or within a {@link Stepper}.
|
|
2185
|
+
*
|
|
2186
|
+
* @example
|
|
2187
|
+
* ```tsx
|
|
2188
|
+
* <StepperStep state="active" stepNumber={2} title="Profile" description="Set up profile" />
|
|
2189
|
+
* ```
|
|
2190
|
+
*/
|
|
2191
|
+
export declare const StepperStep: React_2.ForwardRefExoticComponent<StepperStepProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2192
|
+
|
|
2193
|
+
export declare interface StepperStepProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
2194
|
+
/** Current state of the step. @default "upcoming" */
|
|
2195
|
+
state?: StepperStepState;
|
|
2196
|
+
/** Size preset for the indicator and labels. @default "md" */
|
|
2197
|
+
size?: StepperStepSize;
|
|
2198
|
+
/** Step number displayed in the indicator for active and upcoming states. */
|
|
2199
|
+
stepNumber?: number;
|
|
2200
|
+
/** Primary label shown below the indicator. */
|
|
2201
|
+
title?: string;
|
|
2202
|
+
/** Secondary description shown below the title. */
|
|
2203
|
+
description?: string;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
/** Size preset for the step indicator and labels. */
|
|
2207
|
+
export declare type StepperStepSize = "sm" | "md" | "lg";
|
|
2208
|
+
|
|
2209
|
+
/** Current state of a step in the stepper. */
|
|
2210
|
+
export declare type StepperStepState = "completed" | "active" | "upcoming";
|
|
2211
|
+
|
|
2148
2212
|
export declare const StopIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
2149
2213
|
className?: string;
|
|
2150
2214
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
@@ -2651,10 +2715,18 @@ export declare interface TextFieldProps extends Omit<React_2.InputHTMLAttributes
|
|
|
2651
2715
|
/** Text field height in pixels. */
|
|
2652
2716
|
export declare type TextFieldSize = "48" | "40" | "32";
|
|
2653
2717
|
|
|
2718
|
+
export declare const ThumbDownFilledIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
2719
|
+
className?: string;
|
|
2720
|
+
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
2721
|
+
|
|
2654
2722
|
export declare const ThumbDownIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
2655
2723
|
className?: string;
|
|
2656
2724
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
2657
2725
|
|
|
2726
|
+
export declare const ThumbUpFilledIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
2727
|
+
className?: string;
|
|
2728
|
+
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
2729
|
+
|
|
2658
2730
|
export declare const ThumbUpIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
2659
2731
|
className?: string;
|
|
2660
2732
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
package/dist/index.mjs
CHANGED
|
@@ -128,7 +128,9 @@ import { Support2Icon } from "./components/Icons/Support2Icon.mjs";
|
|
|
128
128
|
import { SupportIcon } from "./components/Icons/SupportIcon.mjs";
|
|
129
129
|
import { TagIcon } from "./components/Icons/TagIcon.mjs";
|
|
130
130
|
import { TaskIcon } from "./components/Icons/TaskIcon.mjs";
|
|
131
|
+
import { ThumbDownFilledIcon } from "./components/Icons/ThumbDownFilledIcon.mjs";
|
|
131
132
|
import { ThumbDownIcon } from "./components/Icons/ThumbDownIcon.mjs";
|
|
133
|
+
import { ThumbUpFilledIcon } from "./components/Icons/ThumbUpFilledIcon.mjs";
|
|
132
134
|
import { ThumbUpIcon } from "./components/Icons/ThumbUpIcon.mjs";
|
|
133
135
|
import { TickCircleIcon } from "./components/Icons/TickCircleIcon.mjs";
|
|
134
136
|
import { TickCircleOffIcon } from "./components/Icons/TickCircleOffIcon.mjs";
|
|
@@ -165,6 +167,8 @@ import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSepa
|
|
|
165
167
|
import { Skeleton } from "./components/Skeleton/Skeleton.mjs";
|
|
166
168
|
import { Slider } from "./components/Slider/Slider.mjs";
|
|
167
169
|
import { Snackbar } from "./components/Snackbar/Snackbar.mjs";
|
|
170
|
+
import { Stepper } from "./components/Stepper/Stepper.mjs";
|
|
171
|
+
import { StepperStep } from "./components/Stepper/StepperStep.mjs";
|
|
168
172
|
import { Switch } from "./components/Switch/Switch.mjs";
|
|
169
173
|
import { SwitchField } from "./components/SwitchField/SwitchField.mjs";
|
|
170
174
|
import { SwitchToggle } from "./components/SwitchToggle/SwitchToggle.mjs";
|
|
@@ -360,6 +364,8 @@ export {
|
|
|
360
364
|
Snackbar,
|
|
361
365
|
SpinnerIcon,
|
|
362
366
|
StarIcon,
|
|
367
|
+
Stepper,
|
|
368
|
+
StepperStep,
|
|
363
369
|
StopIcon,
|
|
364
370
|
SuccessIcon,
|
|
365
371
|
SunIcon,
|
|
@@ -396,7 +402,9 @@ export {
|
|
|
396
402
|
TaskIcon,
|
|
397
403
|
TextArea,
|
|
398
404
|
TextField,
|
|
405
|
+
ThumbDownFilledIcon,
|
|
399
406
|
ThumbDownIcon,
|
|
407
|
+
ThumbUpFilledIcon,
|
|
400
408
|
ThumbUpIcon,
|
|
401
409
|
TickCircleIcon,
|
|
402
410
|
TickCircleOffIcon,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/styles/theme.css
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/* Consumers must provide their own Tailwind import: @import "tailwindcss"; */
|
|
2
2
|
|
|
3
3
|
@variant dark (&:where(.dark, .dark *));
|
|
4
|
+
@custom-variant infloww (&:is([data-infloww] *));
|
|
5
|
+
|
|
6
|
+
@theme {
|
|
7
|
+
--breakpoint-*: initial;
|
|
8
|
+
--breakpoint-sm: 850px;
|
|
9
|
+
--breakpoint-md: 1024px;
|
|
10
|
+
--breakpoint-inflowwmd: 1223px;
|
|
11
|
+
--breakpoint-lg: 1280px;
|
|
12
|
+
}
|
|
4
13
|
|
|
5
14
|
@layer base {
|
|
6
15
|
html {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fanvue/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "React component library built with Tailwind CSS for Fanvue ecosystem",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"size-limit": [
|
|
167
167
|
{
|
|
168
168
|
"path": "dist/index.mjs",
|
|
169
|
-
"limit": "
|
|
169
|
+
"limit": "57 KB",
|
|
170
170
|
"ignore": [
|
|
171
171
|
"@radix-ui/*",
|
|
172
172
|
"clsx",
|