asheeui 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/centered/Centered.d.ts +49 -0
- package/dist/components/centered/Centered.d.ts.map +1 -0
- package/dist/components/centered/Centered.js +32 -0
- package/dist/components/centered/centered-config.d.ts +63 -0
- package/dist/components/centered/centered-config.d.ts.map +1 -0
- package/dist/components/centered/centered-config.js +17 -0
- package/dist/components/centered/centered-styles.d.ts +11 -0
- package/dist/components/centered/centered-styles.d.ts.map +1 -0
- package/dist/components/centered/centered-styles.js +9 -0
- package/dist/components/centered/index.d.ts +3 -0
- package/dist/components/centered/index.d.ts.map +1 -0
- package/dist/components/centered/index.js +3 -0
- package/dist/components/chip/Chip.d.ts +8 -0
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +15 -15
- package/dist/components/data-table/DataTable.d.ts +137 -0
- package/dist/components/data-table/DataTable.d.ts.map +1 -0
- package/dist/components/data-table/DataTable.js +101 -0
- package/dist/components/data-table/data-table-config.d.ts +75 -0
- package/dist/components/data-table/data-table-config.d.ts.map +1 -0
- package/dist/components/data-table/data-table-config.js +24 -0
- package/dist/components/data-table/data-table-styles.d.ts +25 -0
- package/dist/components/data-table/data-table-styles.d.ts.map +1 -0
- package/dist/components/data-table/data-table-styles.js +5 -0
- package/dist/components/data-table/index.d.ts +3 -0
- package/dist/components/data-table/index.d.ts.map +1 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/docs-layout/DocsLayout.d.ts +94 -0
- package/dist/components/docs-layout/DocsLayout.d.ts.map +1 -0
- package/dist/components/docs-layout/DocsLayout.js +62 -0
- package/dist/components/docs-layout/docs-layout-config.d.ts +61 -0
- package/dist/components/docs-layout/docs-layout-config.d.ts.map +1 -0
- package/dist/components/docs-layout/docs-layout-config.js +22 -0
- package/dist/components/docs-layout/docs-layout-styles.d.ts +31 -0
- package/dist/components/docs-layout/docs-layout-styles.d.ts.map +1 -0
- package/dist/components/docs-layout/docs-layout-styles.js +5 -0
- package/dist/components/docs-layout/index.d.ts +3 -0
- package/dist/components/docs-layout/index.d.ts.map +1 -0
- package/dist/components/docs-layout/index.js +3 -0
- package/dist/components/empty-state/EmptyState.d.ts +19 -1
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/components/empty-state/EmptyState.js +10 -9
- package/dist/components/error-state/ErrorState.d.ts +98 -0
- package/dist/components/error-state/ErrorState.d.ts.map +1 -0
- package/dist/components/error-state/ErrorState.js +57 -0
- package/dist/components/error-state/error-state-config.d.ts +66 -0
- package/dist/components/error-state/error-state-config.d.ts.map +1 -0
- package/dist/components/error-state/error-state-config.js +20 -0
- package/dist/components/error-state/error-state-styles.d.ts +17 -0
- package/dist/components/error-state/error-state-styles.d.ts.map +1 -0
- package/dist/components/error-state/error-state-styles.js +5 -0
- package/dist/components/error-state/index.d.ts +3 -0
- package/dist/components/error-state/index.d.ts.map +1 -0
- package/dist/components/error-state/index.js +3 -0
- package/dist/components/file-upload/FileUpload.d.ts +112 -0
- package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
- package/dist/components/file-upload/FileUpload.js +83 -0
- package/dist/components/file-upload/file-upload-config.d.ts +41 -0
- package/dist/components/file-upload/file-upload-config.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload-config.js +16 -0
- package/dist/components/file-upload/file-upload-styles.d.ts +22 -0
- package/dist/components/file-upload/file-upload-styles.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload-styles.js +9 -0
- package/dist/components/file-upload/file-upload.helpers.d.ts +26 -0
- package/dist/components/file-upload/file-upload.helpers.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload.helpers.js +17 -0
- package/dist/components/file-upload/index.d.ts +3 -0
- package/dist/components/file-upload/index.d.ts.map +1 -0
- package/dist/components/file-upload/index.js +4 -0
- package/dist/components/loading-state/LoadingState.d.ts +57 -0
- package/dist/components/loading-state/LoadingState.d.ts.map +1 -0
- package/dist/components/loading-state/LoadingState.js +44 -0
- package/dist/components/loading-state/index.d.ts +3 -0
- package/dist/components/loading-state/index.d.ts.map +1 -0
- package/dist/components/loading-state/index.js +3 -0
- package/dist/components/loading-state/loading-state-config.d.ts +49 -0
- package/dist/components/loading-state/loading-state-config.d.ts.map +1 -0
- package/dist/components/loading-state/loading-state-config.js +18 -0
- package/dist/components/loading-state/loading-state-styles.d.ts +12 -0
- package/dist/components/loading-state/loading-state-styles.d.ts.map +1 -0
- package/dist/components/loading-state/loading-state-styles.js +9 -0
- package/dist/components/marketing-layout/MarketingLayout.d.ts +83 -0
- package/dist/components/marketing-layout/MarketingLayout.d.ts.map +1 -0
- package/dist/components/marketing-layout/MarketingLayout.js +40 -0
- package/dist/components/marketing-layout/index.d.ts +3 -0
- package/dist/components/marketing-layout/index.d.ts.map +1 -0
- package/dist/components/marketing-layout/index.js +3 -0
- package/dist/components/marketing-layout/marketing-layout-config.d.ts +60 -0
- package/dist/components/marketing-layout/marketing-layout-config.d.ts.map +1 -0
- package/dist/components/marketing-layout/marketing-layout-config.js +16 -0
- package/dist/components/marketing-layout/marketing-layout-styles.d.ts +8 -0
- package/dist/components/marketing-layout/marketing-layout-styles.d.ts.map +1 -0
- package/dist/components/marketing-layout/marketing-layout-styles.js +8 -0
- package/dist/components/search-input/SearchInput.d.ts +111 -0
- package/dist/components/search-input/SearchInput.d.ts.map +1 -0
- package/dist/components/search-input/SearchInput.js +86 -0
- package/dist/components/search-input/index.d.ts +3 -0
- package/dist/components/search-input/index.d.ts.map +1 -0
- package/dist/components/search-input/index.js +3 -0
- package/dist/components/search-input/search-input-config.d.ts +55 -0
- package/dist/components/search-input/search-input-config.d.ts.map +1 -0
- package/dist/components/search-input/search-input-config.js +20 -0
- package/dist/components/search-input/search-input-styles.d.ts +16 -0
- package/dist/components/search-input/search-input-styles.d.ts.map +1 -0
- package/dist/components/search-input/search-input-styles.js +9 -0
- package/dist/components/section-kit/ActionGroup.d.ts +8 -1
- package/dist/components/section-kit/ActionGroup.d.ts.map +1 -1
- package/dist/components/section-kit/ActionGroup.js +13 -9
- package/dist/components/section-kit/SkipLink.d.ts +50 -0
- package/dist/components/section-kit/SkipLink.d.ts.map +1 -0
- package/dist/components/section-kit/SkipLink.js +14 -0
- package/dist/components/section-kit/index.d.ts +5 -4
- package/dist/components/section-kit/index.d.ts.map +1 -1
- package/dist/components/section-kit/index.js +1 -0
- package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -1
- package/dist/components/sidebar-layout/SidebarLayout.js +25 -25
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +10 -3
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -1
- package/dist/components/sidebar-layout/sidebar-layout-styles.js +2 -2
- package/dist/components/split/Split.d.ts +68 -0
- package/dist/components/split/Split.d.ts.map +1 -0
- package/dist/components/split/Split.js +36 -0
- package/dist/components/split/index.d.ts +3 -0
- package/dist/components/split/index.d.ts.map +1 -0
- package/dist/components/split/index.js +3 -0
- package/dist/components/split/split-config.d.ts +83 -0
- package/dist/components/split/split-config.d.ts.map +1 -0
- package/dist/components/split/split-config.js +20 -0
- package/dist/components/split/split-styles.d.ts +36 -0
- package/dist/components/split/split-styles.d.ts.map +1 -0
- package/dist/components/split/split-styles.js +76 -0
- package/dist/components/stepper/Stepper.d.ts +94 -0
- package/dist/components/stepper/Stepper.d.ts.map +1 -0
- package/dist/components/stepper/Stepper.js +71 -0
- package/dist/components/stepper/index.d.ts +3 -0
- package/dist/components/stepper/index.d.ts.map +1 -0
- package/dist/components/stepper/index.js +3 -0
- package/dist/components/stepper/stepper-config.d.ts +51 -0
- package/dist/components/stepper/stepper-config.d.ts.map +1 -0
- package/dist/components/stepper/stepper-config.js +16 -0
- package/dist/components/stepper/stepper-styles.d.ts +30 -0
- package/dist/components/stepper/stepper-styles.d.ts.map +1 -0
- package/dist/components/stepper/stepper-styles.js +25 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -73
- package/dist/shared/spacing.d.ts +8 -0
- package/dist/shared/spacing.d.ts.map +1 -1
- package/dist/shared/spacing.js +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/split/split-styles.ts
|
|
3
|
+
var e = "flex w-full min-w-0", t = {
|
|
4
|
+
sm: "flex-col sm:flex-row",
|
|
5
|
+
md: "flex-col md:flex-row",
|
|
6
|
+
lg: "flex-col lg:flex-row",
|
|
7
|
+
xl: "flex-col xl:flex-row"
|
|
8
|
+
}, n = {
|
|
9
|
+
start: "items-start",
|
|
10
|
+
center: "items-center",
|
|
11
|
+
stretch: "items-stretch"
|
|
12
|
+
}, r = "w-full min-w-0", i = {
|
|
13
|
+
sm: {
|
|
14
|
+
equal: {
|
|
15
|
+
start: "sm:basis-1/2",
|
|
16
|
+
end: "sm:basis-1/2"
|
|
17
|
+
},
|
|
18
|
+
start: {
|
|
19
|
+
start: "sm:basis-2/3",
|
|
20
|
+
end: "sm:basis-1/3"
|
|
21
|
+
},
|
|
22
|
+
end: {
|
|
23
|
+
start: "sm:basis-1/3",
|
|
24
|
+
end: "sm:basis-2/3"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
md: {
|
|
28
|
+
equal: {
|
|
29
|
+
start: "md:basis-1/2",
|
|
30
|
+
end: "md:basis-1/2"
|
|
31
|
+
},
|
|
32
|
+
start: {
|
|
33
|
+
start: "md:basis-2/3",
|
|
34
|
+
end: "md:basis-1/3"
|
|
35
|
+
},
|
|
36
|
+
end: {
|
|
37
|
+
start: "md:basis-1/3",
|
|
38
|
+
end: "md:basis-2/3"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
lg: {
|
|
42
|
+
equal: {
|
|
43
|
+
start: "lg:basis-1/2",
|
|
44
|
+
end: "lg:basis-1/2"
|
|
45
|
+
},
|
|
46
|
+
start: {
|
|
47
|
+
start: "lg:basis-2/3",
|
|
48
|
+
end: "lg:basis-1/3"
|
|
49
|
+
},
|
|
50
|
+
end: {
|
|
51
|
+
start: "lg:basis-1/3",
|
|
52
|
+
end: "lg:basis-2/3"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
xl: {
|
|
56
|
+
equal: {
|
|
57
|
+
start: "xl:basis-1/2",
|
|
58
|
+
end: "xl:basis-1/2"
|
|
59
|
+
},
|
|
60
|
+
start: {
|
|
61
|
+
start: "xl:basis-2/3",
|
|
62
|
+
end: "xl:basis-1/3"
|
|
63
|
+
},
|
|
64
|
+
end: {
|
|
65
|
+
start: "xl:basis-1/3",
|
|
66
|
+
end: "xl:basis-2/3"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, a = {
|
|
70
|
+
sm: "divide-y divide-border sm:divide-y-0 sm:divide-x",
|
|
71
|
+
md: "divide-y divide-border md:divide-y-0 md:divide-x",
|
|
72
|
+
lg: "divide-y divide-border lg:divide-y-0 lg:divide-x",
|
|
73
|
+
xl: "divide-y divide-border xl:divide-y-0 xl:divide-x"
|
|
74
|
+
}, o = "sticky top-0 self-start";
|
|
75
|
+
//#endregion
|
|
76
|
+
export { n as SPLIT_ALIGN_CLASS, e as SPLIT_BASE_CLASS, a as SPLIT_DIVIDER_CLASS, r as SPLIT_PANE_BASE_CLASS, i as SPLIT_PANE_WIDTH_CLASS, t as SPLIT_STACK_CLASS, o as SPLIT_STICKY_CLASS };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { StepperConfig } from './stepper-config';
|
|
3
|
+
/**
|
|
4
|
+
* One step of a stepper.
|
|
5
|
+
*/
|
|
6
|
+
export interface StepperStep {
|
|
7
|
+
/**
|
|
8
|
+
* Stable identifier of the step.
|
|
9
|
+
*/
|
|
10
|
+
key: string;
|
|
11
|
+
/**
|
|
12
|
+
* Name of the step.
|
|
13
|
+
*/
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* What the step asks for, shown under the label when descriptions are on.
|
|
17
|
+
*/
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
type BaseStepperProps = StepperConfig & Omit<HTMLAttributes<HTMLOListElement>, "color">;
|
|
21
|
+
/**
|
|
22
|
+
* Props for the Stepper component.
|
|
23
|
+
*/
|
|
24
|
+
export interface StepperProps extends BaseStepperProps {
|
|
25
|
+
/**
|
|
26
|
+
* The steps, in order.
|
|
27
|
+
*/
|
|
28
|
+
steps: StepperStep[];
|
|
29
|
+
/**
|
|
30
|
+
* Zero-based index of the step the reader is on.
|
|
31
|
+
*/
|
|
32
|
+
currentStep: number;
|
|
33
|
+
/**
|
|
34
|
+
* Called with the index of the step a reader asked for.
|
|
35
|
+
* Its presence is what makes the steps the reader has not reached yet
|
|
36
|
+
* interactive; without it the stepper only reports progress.
|
|
37
|
+
*/
|
|
38
|
+
onStepChange?: (index: number) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Name of the list, for a page that has more than one.
|
|
41
|
+
*/
|
|
42
|
+
label?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Element to render.
|
|
45
|
+
* Defaults to an `ol`, which is what makes the sequence a list.
|
|
46
|
+
*
|
|
47
|
+
* @default "ol"
|
|
48
|
+
*/
|
|
49
|
+
as?: ElementType;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The reader's progress through a sequence of steps.
|
|
53
|
+
*
|
|
54
|
+
* Each step reports its own state: the steps before the current one are
|
|
55
|
+
* complete, the current one carries `aria-current="step"`, and the rest are
|
|
56
|
+
* upcoming. The state is carried by the marker's colour and by text as well, so
|
|
57
|
+
* the sequence does not depend on colour alone.
|
|
58
|
+
*
|
|
59
|
+
* The arrangement follows the breakpoint rather than a fixed choice: by default
|
|
60
|
+
* the steps are a column on a narrow screen and a row from the `md` breakpoint,
|
|
61
|
+
* which is the shape a checkout summary takes without a media query at each use.
|
|
62
|
+
*
|
|
63
|
+
* @param props - Stepper configuration options and list attributes.
|
|
64
|
+
* @param props.steps - The steps, in order.
|
|
65
|
+
* @param props.currentStep - Zero-based index of the current step.
|
|
66
|
+
* @param props.onStepChange - Called with the index a reader asked for.
|
|
67
|
+
* @param props.orientation - How the steps are arranged. Defaults to
|
|
68
|
+
* "responsive".
|
|
69
|
+
* @param props.size - Density of markers and labels. Defaults to "md".
|
|
70
|
+
* @param props.showDescriptions - Show each step's description. Defaults to
|
|
71
|
+
* true.
|
|
72
|
+
* @param props.label - Name of the list, for a page with more than one.
|
|
73
|
+
* @param props.as - Element to render. Defaults to "ol".
|
|
74
|
+
* @returns The rendered stepper.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <Stepper
|
|
79
|
+
* currentStep={1}
|
|
80
|
+
* onStepChange={setStep}
|
|
81
|
+
* steps={[
|
|
82
|
+
* { key: "cart", label: "Cart" },
|
|
83
|
+
* { key: "address", label: "Address", description: "Where it ships" },
|
|
84
|
+
* { key: "payment", label: "Payment" },
|
|
85
|
+
* ]}
|
|
86
|
+
* />
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @see Tabs - Switching between panels rather than reporting progress.
|
|
90
|
+
* @see Pagination - Moving through pages of a collection.
|
|
91
|
+
*/
|
|
92
|
+
export declare const Stepper: import('react').ForwardRefExoticComponent<StepperProps & import('react').RefAttributes<HTMLOListElement>>;
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/Stepper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAe/E;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,KAAK,gBAAgB,GAAG,aAAa,GACnC,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD;;OAEG;IACH,KAAK,EAAE,WAAW,EAAE,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,OAAO,2GAwHnB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { useAsheeConfig as t } from "../../libs/context.js";
|
|
5
|
+
import { resolveConfigCascade as n } from "../../utils/resolve-token.js";
|
|
6
|
+
import { CheckIcon as r } from "../../icons/CheckIcon.js";
|
|
7
|
+
import { Typography as i } from "../typography/Typography.js";
|
|
8
|
+
import { FALLBACK_STEPPER_CONFIG as a } from "./stepper-config.js";
|
|
9
|
+
import { STEPPER_CONNECTOR_CLASS as o, STEPPER_ITEM_BUTTON_CLASS as s, STEPPER_ITEM_CLASS as c, STEPPER_LABEL_CLASS as l, STEPPER_LIST_CLASS as u, STEPPER_MARKER_CLASS as d, STEPPER_MARKER_SIZE_CLASS as f, STEPPER_MARKER_STATE_CLASS as p, STEPPER_STATE_TEXT_CLASS as m } from "./stepper-styles.js";
|
|
10
|
+
import { forwardRef as h } from "react";
|
|
11
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/stepper/Stepper.tsx
|
|
13
|
+
var y = h(({ steps: h, currentStep: y, onStepChange: b, label: x, orientation: S, size: C, showDescriptions: w, as: T, className: E, ...D }, O) => {
|
|
14
|
+
let k = t(), A = n({
|
|
15
|
+
orientation: S,
|
|
16
|
+
size: C,
|
|
17
|
+
showDescriptions: w
|
|
18
|
+
}, k.components?.stepper, a);
|
|
19
|
+
return /* @__PURE__ */ _(T ?? "ol", {
|
|
20
|
+
ref: O,
|
|
21
|
+
"aria-label": x,
|
|
22
|
+
className: e(u[A.orientation], E),
|
|
23
|
+
...D,
|
|
24
|
+
children: h.map((t, n) => {
|
|
25
|
+
let a = n < y ? "complete" : n === y ? "current" : "upcoming", u = !!b && a !== "current", x = n === h.length - 1, S = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
|
|
26
|
+
"aria-hidden": "true",
|
|
27
|
+
className: e(d, f[A.size], p[a]),
|
|
28
|
+
children: a === "complete" ? /* @__PURE__ */ _(r, { className: "size-4" }) : n + 1
|
|
29
|
+
}), /* @__PURE__ */ v("span", {
|
|
30
|
+
className: "flex min-w-0 flex-col",
|
|
31
|
+
children: [/* @__PURE__ */ _(i, {
|
|
32
|
+
as: "span",
|
|
33
|
+
role: "label",
|
|
34
|
+
className: l[a],
|
|
35
|
+
children: t.label
|
|
36
|
+
}), A.showDescriptions && t.description && /* @__PURE__ */ _(i, {
|
|
37
|
+
as: "span",
|
|
38
|
+
role: "caption",
|
|
39
|
+
className: "text-xs text-foreground/60",
|
|
40
|
+
children: t.description
|
|
41
|
+
})]
|
|
42
|
+
})] });
|
|
43
|
+
return /* @__PURE__ */ v("li", {
|
|
44
|
+
"aria-current": a === "current" ? "step" : void 0,
|
|
45
|
+
className: c,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ _("span", {
|
|
48
|
+
className: m,
|
|
49
|
+
children: a === "complete" ? "Completed:" : a === "current" ? "Current step:" : "Not started:"
|
|
50
|
+
}),
|
|
51
|
+
u ? /* @__PURE__ */ _("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
className: s,
|
|
54
|
+
onClick: () => b?.(n),
|
|
55
|
+
children: S
|
|
56
|
+
}) : /* @__PURE__ */ _("span", {
|
|
57
|
+
className: "flex min-w-0 items-center gap-2",
|
|
58
|
+
children: S
|
|
59
|
+
}),
|
|
60
|
+
!x && /* @__PURE__ */ _("span", {
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
className: o[A.orientation]
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
}, t.key);
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
y.displayName = "Stepper";
|
|
70
|
+
//#endregion
|
|
71
|
+
export { y as Stepper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* How the steps are arranged.
|
|
4
|
+
*
|
|
5
|
+
* - `responsive`: a column on a narrow screen and a row from the `md`
|
|
6
|
+
* breakpoint, which is the arrangement a checkout summary wants.
|
|
7
|
+
* - `horizontal`: a row at every width, for a stepper of two or three short
|
|
8
|
+
* steps.
|
|
9
|
+
* - `vertical`: a column at every width, for a long sequence or a sidebar.
|
|
10
|
+
*/
|
|
11
|
+
export type StepperOrientation = "responsive" | "horizontal" | "vertical";
|
|
12
|
+
/**
|
|
13
|
+
* Theme configuration options for the Stepper component.
|
|
14
|
+
*
|
|
15
|
+
* Set under `components.stepper` in the AsheeUI config. Values feed the
|
|
16
|
+
* component-level tier of the theme cascade.
|
|
17
|
+
*/
|
|
18
|
+
export interface StepperConfig {
|
|
19
|
+
/**
|
|
20
|
+
* How the steps are arranged.
|
|
21
|
+
*
|
|
22
|
+
* @default "responsive"
|
|
23
|
+
*/
|
|
24
|
+
orientation?: StepperOrientation;
|
|
25
|
+
/**
|
|
26
|
+
* Density of the step markers and their labels.
|
|
27
|
+
*
|
|
28
|
+
* @default "md"
|
|
29
|
+
*/
|
|
30
|
+
size?: Size;
|
|
31
|
+
/**
|
|
32
|
+
* Whether each step's description is shown under its label.
|
|
33
|
+
*
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
showDescriptions?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default config values registered for the Stepper component.
|
|
40
|
+
*/
|
|
41
|
+
export declare const defaultStepperConfig: StepperConfig;
|
|
42
|
+
declare module "../../libs/registry" {
|
|
43
|
+
interface ComponentTypeConfigRegistry {
|
|
44
|
+
stepper: StepperConfig;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Hard fallback values used when no config tier provides a value.
|
|
49
|
+
*/
|
|
50
|
+
export declare const FALLBACK_STEPPER_CONFIG: Required<StepperConfig>;
|
|
51
|
+
//# sourceMappingURL=stepper-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper-config.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/stepper-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAEjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAIlC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,OAAO,EAAE,aAAa,CAAC;KACxB;CACF;AAID;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,aAAa,CAI3D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/stepper/stepper-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
orientation: "responsive",
|
|
6
|
+
size: "md",
|
|
7
|
+
showDescriptions: !0
|
|
8
|
+
};
|
|
9
|
+
e("stepper", t);
|
|
10
|
+
var n = {
|
|
11
|
+
orientation: "responsive",
|
|
12
|
+
size: "md",
|
|
13
|
+
showDescriptions: !0
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as FALLBACK_STEPPER_CONFIG, t as defaultStepperConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
import { StepperOrientation } from './stepper-config';
|
|
3
|
+
/** The state a step is in, relative to the current step. */
|
|
4
|
+
export type StepperStepState = "complete" | "current" | "upcoming";
|
|
5
|
+
/** The list, which is a column on a narrow screen and a row on a wide one. */
|
|
6
|
+
export declare const STEPPER_LIST_CLASS: Record<StepperOrientation, string>;
|
|
7
|
+
/** Shared classes for one step. */
|
|
8
|
+
export declare const STEPPER_ITEM_CLASS = "flex min-w-0 items-center gap-2";
|
|
9
|
+
/** The control a consumer can move between steps with. */
|
|
10
|
+
export declare const STEPPER_ITEM_BUTTON_CLASS = "flex min-w-0 items-center gap-2 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2";
|
|
11
|
+
/** The marker, which holds a number or a tick. */
|
|
12
|
+
export declare const STEPPER_MARKER_SIZE_CLASS: Record<Size, string>;
|
|
13
|
+
/** Shared classes for the marker. */
|
|
14
|
+
export declare const STEPPER_MARKER_CLASS = "flex shrink-0 items-center justify-center rounded-full border font-medium";
|
|
15
|
+
/** The marker's treatment for each state. */
|
|
16
|
+
export declare const STEPPER_MARKER_STATE_CLASS: Record<StepperStepState, string>;
|
|
17
|
+
/** The label of each step, and the tone that follows its state. */
|
|
18
|
+
export declare const STEPPER_LABEL_CLASS: Record<StepperStepState, string>;
|
|
19
|
+
/** The description under a label. */
|
|
20
|
+
export declare const STEPPER_DESCRIPTION_CLASS = "text-xs text-foreground/60";
|
|
21
|
+
/**
|
|
22
|
+
* The rule between two steps.
|
|
23
|
+
* It is drawn only in the row arrangement: stacked, the order of the steps and
|
|
24
|
+
* their states carry the sequence, and a rule would add noise rather than
|
|
25
|
+
* information.
|
|
26
|
+
*/
|
|
27
|
+
export declare const STEPPER_CONNECTOR_CLASS: Record<StepperOrientation, string>;
|
|
28
|
+
/** Visually hidden text that states a step's position for assistive technology. */
|
|
29
|
+
export declare const STEPPER_STATE_TEXT_CLASS = "sr-only";
|
|
30
|
+
//# sourceMappingURL=stepper-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper-styles.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/stepper-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,4DAA4D;AAC5D,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnE,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAKjE,CAAC;AAEF,mCAAmC;AACnC,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AAEpE,0DAA0D;AAC1D,eAAO,MAAM,yBAAyB,kJAC2G,CAAC;AAElJ,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI1D,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,oBAAoB,8EAC4C,CAAC;AAE9E,6CAA6C;AAC7C,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAIvE,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAIhE,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,yBAAyB,+BAA+B,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAItE,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,YAAY,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/stepper/stepper-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
responsive: "flex w-full min-w-0 flex-col gap-4 md:flex-row md:items-center md:gap-2",
|
|
5
|
+
horizontal: "flex w-full min-w-0 flex-row items-center gap-2",
|
|
6
|
+
vertical: "flex w-full min-w-0 flex-col gap-4"
|
|
7
|
+
}, t = "flex min-w-0 items-center gap-2", n = "flex min-w-0 items-center gap-2 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", r = {
|
|
8
|
+
sm: "size-6 text-xs",
|
|
9
|
+
md: "size-8 text-sm",
|
|
10
|
+
lg: "size-10 text-base"
|
|
11
|
+
}, i = "flex shrink-0 items-center justify-center rounded-full border font-medium", a = {
|
|
12
|
+
complete: "border-success bg-success text-background",
|
|
13
|
+
current: "border-primary bg-primary text-background",
|
|
14
|
+
upcoming: "border-border bg-background text-foreground/70"
|
|
15
|
+
}, o = {
|
|
16
|
+
complete: "text-sm font-medium text-foreground",
|
|
17
|
+
current: "text-sm font-medium text-foreground",
|
|
18
|
+
upcoming: "text-sm font-medium text-foreground/60"
|
|
19
|
+
}, s = "text-xs text-foreground/60", c = {
|
|
20
|
+
responsive: "hidden h-px flex-1 bg-border md:block",
|
|
21
|
+
horizontal: "hidden h-px flex-1 bg-border sm:block",
|
|
22
|
+
vertical: ""
|
|
23
|
+
}, l = "sr-only";
|
|
24
|
+
//#endregion
|
|
25
|
+
export { c as STEPPER_CONNECTOR_CLASS, s as STEPPER_DESCRIPTION_CLASS, n as STEPPER_ITEM_BUTTON_CLASS, t as STEPPER_ITEM_CLASS, o as STEPPER_LABEL_CLASS, e as STEPPER_LIST_CLASS, i as STEPPER_MARKER_CLASS, r as STEPPER_MARKER_SIZE_CLASS, a as STEPPER_MARKER_STATE_CLASS, l as STEPPER_STATE_TEXT_CLASS };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,14 +20,19 @@ export * from './components/button';
|
|
|
20
20
|
export * from './components/calendar';
|
|
21
21
|
export * from './components/card';
|
|
22
22
|
export * from './components/carousel';
|
|
23
|
+
export * from './components/centered';
|
|
23
24
|
export * from './components/chip';
|
|
24
25
|
export * from './components/clipboard';
|
|
25
26
|
export * from './components/container';
|
|
26
27
|
export * from './components/cta';
|
|
28
|
+
export * from './components/data-table';
|
|
29
|
+
export * from './components/docs-layout';
|
|
27
30
|
export * from './components/drawer';
|
|
28
31
|
export * from './components/dropmenu';
|
|
29
32
|
export * from './components/empty-state';
|
|
33
|
+
export * from './components/error-state';
|
|
30
34
|
export * from './components/feature-grid';
|
|
35
|
+
export * from './components/file-upload';
|
|
31
36
|
export * from './components/footer';
|
|
32
37
|
export * from './components/form';
|
|
33
38
|
export * from './components/grid';
|
|
@@ -36,6 +41,8 @@ export * from './components/image';
|
|
|
36
41
|
export * from './components/input';
|
|
37
42
|
export * from './components/keyboard';
|
|
38
43
|
export * from './components/link';
|
|
44
|
+
export * from './components/loading-state';
|
|
45
|
+
export * from './components/marketing-layout';
|
|
39
46
|
export * from './components/marquee';
|
|
40
47
|
export * from './components/modal';
|
|
41
48
|
export * from './components/multi-select';
|
|
@@ -46,12 +53,15 @@ export * from './components/pin-input';
|
|
|
46
53
|
export * from './components/pricing-card';
|
|
47
54
|
export * from './components/radio';
|
|
48
55
|
export * from './components/resizable-screen';
|
|
56
|
+
export * from './components/search-input';
|
|
49
57
|
export * from './components/section';
|
|
50
58
|
export * from './components/sidebar';
|
|
51
59
|
export * from './components/sidebar-layout';
|
|
52
60
|
export * from './components/skeleton';
|
|
53
61
|
export * from './components/spinner';
|
|
62
|
+
export * from './components/split';
|
|
54
63
|
export * from './components/stack';
|
|
64
|
+
export * from './components/stepper';
|
|
55
65
|
export * from './components/switch';
|
|
56
66
|
export * from './components/table';
|
|
57
67
|
export * from './components/tabs';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,yCAAyC,CAAC;AAEjD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;GAQG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC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