@namroodinc/liquid-editorial 0.6.8 → 0.6.9

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.
Files changed (120) hide show
  1. package/README.md +108 -2
  2. package/UPGRADING.md +65 -0
  3. package/dist/chunks/CollectionView-BIuOL917.cjs +2 -0
  4. package/dist/chunks/CollectionView-BIuOL917.cjs.map +1 -0
  5. package/dist/chunks/CollectionView-Cr12UFWa.js +179 -0
  6. package/dist/chunks/CollectionView-Cr12UFWa.js.map +1 -0
  7. package/dist/chunks/LoadState-B7GTDlWv.js +71 -0
  8. package/dist/chunks/LoadState-B7GTDlWv.js.map +1 -0
  9. package/dist/chunks/LoadState-C7tQ6fIP.cjs +2 -0
  10. package/dist/chunks/LoadState-C7tQ6fIP.cjs.map +1 -0
  11. package/dist/chunks/Wizard-B_CPW1V6.cjs +2 -0
  12. package/dist/chunks/Wizard-B_CPW1V6.cjs.map +1 -0
  13. package/dist/chunks/Wizard-C1iR5z44.js +99 -0
  14. package/dist/chunks/Wizard-C1iR5z44.js.map +1 -0
  15. package/dist/components/CollectionView/empty.d.cts +15 -0
  16. package/dist/components/CollectionView/empty.d.cts.map +1 -0
  17. package/dist/components/CollectionView/empty.d.ts +15 -0
  18. package/dist/components/CollectionView/empty.d.ts.map +1 -0
  19. package/dist/components/CollectionView/filters.d.cts +6 -0
  20. package/dist/components/CollectionView/filters.d.cts.map +1 -0
  21. package/dist/components/CollectionView/filters.d.ts +6 -0
  22. package/dist/components/CollectionView/filters.d.ts.map +1 -0
  23. package/dist/components/CollectionView/index.cjs +1 -0
  24. package/dist/components/CollectionView/index.d.cts +6 -0
  25. package/dist/components/CollectionView/index.d.cts.map +1 -0
  26. package/dist/components/CollectionView/index.d.ts +6 -0
  27. package/dist/components/CollectionView/index.d.ts.map +1 -0
  28. package/dist/components/CollectionView/index.js +2 -0
  29. package/dist/components/CollectionView/style.css +70 -0
  30. package/dist/components/CollectionView/toolbar.d.cts +5 -0
  31. package/dist/components/CollectionView/toolbar.d.cts.map +1 -0
  32. package/dist/components/CollectionView/toolbar.d.ts +5 -0
  33. package/dist/components/CollectionView/toolbar.d.ts.map +1 -0
  34. package/dist/components/CollectionView/types.d.cts +40 -0
  35. package/dist/components/CollectionView/types.d.cts.map +1 -0
  36. package/dist/components/CollectionView/types.d.ts +40 -0
  37. package/dist/components/CollectionView/types.d.ts.map +1 -0
  38. package/dist/components/EditLayout/style.css +1 -1
  39. package/dist/components/EditSection/index.cjs +2 -0
  40. package/dist/components/EditSection/index.cjs.map +1 -0
  41. package/dist/components/EditSection/index.d.cts +9 -0
  42. package/dist/components/EditSection/index.d.cts.map +1 -0
  43. package/dist/components/EditSection/index.d.ts +9 -0
  44. package/dist/components/EditSection/index.d.ts.map +1 -0
  45. package/dist/components/EditSection/index.js +22 -0
  46. package/dist/components/EditSection/index.js.map +1 -0
  47. package/dist/components/EditSection/style.css +31 -0
  48. package/dist/components/FormEditor/README.md +16 -0
  49. package/dist/components/LoadState/error.d.cts +13 -0
  50. package/dist/components/LoadState/error.d.cts.map +1 -0
  51. package/dist/components/LoadState/error.d.ts +13 -0
  52. package/dist/components/LoadState/error.d.ts.map +1 -0
  53. package/dist/components/LoadState/index.cjs +1 -0
  54. package/dist/components/LoadState/index.d.cts +15 -0
  55. package/dist/components/LoadState/index.d.cts.map +1 -0
  56. package/dist/components/LoadState/index.d.ts +15 -0
  57. package/dist/components/LoadState/index.d.ts.map +1 -0
  58. package/dist/components/LoadState/index.js +1 -0
  59. package/dist/components/LoadState/types.d.cts +3 -0
  60. package/dist/components/LoadState/types.d.cts.map +1 -0
  61. package/dist/components/LoadState/types.d.ts +3 -0
  62. package/dist/components/LoadState/types.d.ts.map +1 -0
  63. package/dist/components/LoadState/useRetryAttempt.d.cts +15 -0
  64. package/dist/components/LoadState/useRetryAttempt.d.cts.map +1 -0
  65. package/dist/components/LoadState/useRetryAttempt.d.ts +15 -0
  66. package/dist/components/LoadState/useRetryAttempt.d.ts.map +1 -0
  67. package/dist/components/MetaList/index.cjs +2 -0
  68. package/dist/components/MetaList/index.cjs.map +1 -0
  69. package/dist/components/MetaList/index.d.cts +7 -0
  70. package/dist/components/MetaList/index.d.cts.map +1 -0
  71. package/dist/components/MetaList/index.d.ts +7 -0
  72. package/dist/components/MetaList/index.d.ts.map +1 -0
  73. package/dist/components/MetaList/index.js +13 -0
  74. package/dist/components/MetaList/index.js.map +1 -0
  75. package/dist/components/MetaList/style.css +19 -0
  76. package/dist/components/PageHeader/index.cjs +2 -0
  77. package/dist/components/PageHeader/index.cjs.map +1 -0
  78. package/dist/components/PageHeader/index.d.cts +9 -0
  79. package/dist/components/PageHeader/index.d.cts.map +1 -0
  80. package/dist/components/PageHeader/index.d.ts +9 -0
  81. package/dist/components/PageHeader/index.d.ts.map +1 -0
  82. package/dist/components/PageHeader/index.js +27 -0
  83. package/dist/components/PageHeader/index.js.map +1 -0
  84. package/dist/components/PageHeader/style.css +39 -0
  85. package/dist/components/Stepper/index.cjs +1 -1
  86. package/dist/components/Stepper/index.cjs.map +1 -1
  87. package/dist/components/Stepper/index.d.cts +8 -0
  88. package/dist/components/Stepper/index.d.cts.map +1 -1
  89. package/dist/components/Stepper/index.d.ts +8 -0
  90. package/dist/components/Stepper/index.d.ts.map +1 -1
  91. package/dist/components/Stepper/index.js +15 -14
  92. package/dist/components/Stepper/index.js.map +1 -1
  93. package/dist/components/Stepper/style.css +53 -0
  94. package/dist/components/Wizard/actions.d.cts +13 -0
  95. package/dist/components/Wizard/actions.d.cts.map +1 -0
  96. package/dist/components/Wizard/actions.d.ts +13 -0
  97. package/dist/components/Wizard/actions.d.ts.map +1 -0
  98. package/dist/components/Wizard/index.cjs +1 -0
  99. package/dist/components/Wizard/index.d.cts +7 -0
  100. package/dist/components/Wizard/index.d.cts.map +1 -0
  101. package/dist/components/Wizard/index.d.ts +7 -0
  102. package/dist/components/Wizard/index.d.ts.map +1 -0
  103. package/dist/components/Wizard/index.js +2 -0
  104. package/dist/components/Wizard/review-table.d.cts +13 -0
  105. package/dist/components/Wizard/review-table.d.cts.map +1 -0
  106. package/dist/components/Wizard/review-table.d.ts +13 -0
  107. package/dist/components/Wizard/review-table.d.ts.map +1 -0
  108. package/dist/components/Wizard/style.css +13 -0
  109. package/dist/components/Wizard/types.d.cts +35 -0
  110. package/dist/components/Wizard/types.d.cts.map +1 -0
  111. package/dist/components/Wizard/types.d.ts +35 -0
  112. package/dist/components/Wizard/types.d.ts.map +1 -0
  113. package/dist/index.cjs +1 -1
  114. package/dist/index.d.cts +13 -1
  115. package/dist/index.d.cts.map +1 -1
  116. package/dist/index.d.ts +13 -1
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +36 -30
  119. package/dist/styles.css +5 -0
  120. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ export type LoadStatus = "loading" | "ready" | "error";
2
+ export type RetryState = "pending" | "failed";
3
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../../src/components/LoadState/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type LoadStatus = "loading" | "ready" | "error";
2
+ export type RetryState = "pending" | "failed";
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/LoadState/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { RetryState } from "./types.cjs";
2
+ import type { LoadStatus } from "./types.cjs";
3
+ /**
4
+ * A retry started from failure feedback. The owner keeps that feedback mounted
5
+ * while the retry loads, so Retry keeps focus, and reports a repeated failure.
6
+ * Success, or any load the retry didn't start, clears it. A retry that reports
7
+ * no load within RETRY_START_WINDOW_MS, for example because the owner keeps
8
+ * `error` while refetching, lapses, so a later unrelated load shows a skeleton.
9
+ */
10
+ export declare function useRetryAttempt(status: LoadStatus, error: Error | null | undefined, onRetry?: () => void): {
11
+ state: RetryState | undefined;
12
+ error: Error | null | undefined;
13
+ retry: (() => void) | undefined;
14
+ };
15
+ //# sourceMappingURL=useRetryAttempt.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRetryAttempt.d.cts","sourceRoot":"","sources":["../../../src/components/LoadState/useRetryAttempt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAe1C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAC/B,OAAO,CAAC,EAAE,MAAM,IAAI;;;;EA0CrB"}
@@ -0,0 +1,15 @@
1
+ import type { RetryState } from "./types.js";
2
+ import type { LoadStatus } from "./types.js";
3
+ /**
4
+ * A retry started from failure feedback. The owner keeps that feedback mounted
5
+ * while the retry loads, so Retry keeps focus, and reports a repeated failure.
6
+ * Success, or any load the retry didn't start, clears it. A retry that reports
7
+ * no load within RETRY_START_WINDOW_MS, for example because the owner keeps
8
+ * `error` while refetching, lapses, so a later unrelated load shows a skeleton.
9
+ */
10
+ export declare function useRetryAttempt(status: LoadStatus, error: Error | null | undefined, onRetry?: () => void): {
11
+ state: RetryState | undefined;
12
+ error: Error | null | undefined;
13
+ retry: (() => void) | undefined;
14
+ };
15
+ //# sourceMappingURL=useRetryAttempt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRetryAttempt.d.ts","sourceRoot":"","sources":["../../../src/components/LoadState/useRetryAttempt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAe1C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAC/B,OAAO,CAAC,EAAE,MAAM,IAAI;;;;EA0CrB"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");function n({items:n}){return(0,t.jsx)(`dl`,{className:`ds-meta-list`,children:n.map(([n,r],i)=>(0,t.jsxs)(e.Fragment,{children:[(0,t.jsx)(`dt`,{children:n}),(0,t.jsx)(`dd`,{children:r})]},i))})}exports.MetaList=n;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["Fragment","react","react_jsx_runtime","MetaList","items","term","description","index"],"sources":["../../../src/components/MetaList/index.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport type { ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport interface MetaListProps {\n items: readonly [term: string, description: ReactNode][];\n}\n\n/** Read-only facts about an item: IDs, dates, sizes. */\nexport function MetaList({ items }: MetaListProps) {\n return (\n <dl className=\"ds-meta-list\">\n {/* Terms may repeat, and rows hold no state of their own, so position is the key. */}\n {items.map(([term, description], index) => (\n <Fragment key={index}>\n <dt>{term}</dt>\n <dd>{description}</dd>\n </Fragment>\n ))}\n </dl>\n );\n}\n"],"mappings":"A,yHASA,SAAgBG,EAAS,CAAE,SAAwB,CACjD,OACE,EAAAD,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,eAEX,SAAAE,EAAM,KAAK,CAACC,EAAMC,GAAc,KAC/B,EAAAJ,EAAA,KAAA,CAACF,EAAAA,SAAD,CAAA,SAAA,EACE,EAAAE,EAAA,IAAA,CAAC,KAAD,CAAA,SAAKG,CAAS,CAAA,GACd,EAAAH,EAAA,IAAA,CAAC,KAAD,CAAA,SAAKI,CAAgB,CAAA,CACb,CAAA,EAHKC,CAGL,CACX,CACC,CAAA,CAER,C"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ export interface MetaListProps {
3
+ items: readonly [term: string, description: ReactNode][];
4
+ }
5
+ /** Read-only facts about an item: IDs, dates, sizes. */
6
+ export declare function MetaList({ items }: MetaListProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/MetaList/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,CAAC;CAC1D;AAED,wDAAwD;AACxD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,+BAYhD"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ export interface MetaListProps {
3
+ items: readonly [term: string, description: ReactNode][];
4
+ }
5
+ /** Read-only facts about an item: IDs, dates, sizes. */
6
+ export declare function MetaList({ items }: MetaListProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MetaList/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,CAAC;CAC1D;AAED,wDAAwD;AACxD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,+BAYhD"}
@@ -0,0 +1,13 @@
1
+ import { Fragment as e } from "react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/components/MetaList/index.tsx
4
+ function r({ items: r }) {
5
+ return /* @__PURE__ */ t("dl", {
6
+ className: "ds-meta-list",
7
+ children: r.map(([r, i], a) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("dt", { children: r }), /* @__PURE__ */ t("dd", { children: i })] }, a))
8
+ });
9
+ }
10
+ //#endregion
11
+ export { r as MetaList };
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["MetaList","items","term","description","Fragment","index"],"sources":["../../../src/components/MetaList/index.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport type { ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport interface MetaListProps {\n items: readonly [term: string, description: ReactNode][];\n}\n\n/** Read-only facts about an item: IDs, dates, sizes. */\nexport function MetaList({ items }: MetaListProps) {\n return (\n <dl className=\"ds-meta-list\">\n {/* Terms may repeat, and rows hold no state of their own, so position is the key. */}\n {items.map(([term, description], index) => (\n <Fragment key={index}>\n <dt>{term}</dt>\n <dd>{description}</dd>\n </Fragment>\n ))}\n </dl>\n );\n}\n"],"mappings":";;;AASA,SAAgBA,EAAS,EAAE,YAAwB;CACjD,OACE,kBAAC,MAAD;EAAI,WAAU;EAEX,UAAAC,EAAM,KAAK,CAACC,GAAMC,IAAc,MAC/B,kBAACC,GAAD,EAAA,UAAA,CACE,kBAAC,MAAD,EAAA,UAAKF,EAAS,CAAA,GACd,kBAAC,MAAD,EAAA,UAAKC,EAAgB,CAAA,CACb,EAAA,GAHKE,CAGL,CACX;CACC,CAAA;AAER"}
@@ -0,0 +1,19 @@
1
+ @layer components {
2
+ .ds-meta-list {
3
+ display: grid;
4
+ grid-template-columns: auto minmax(0, 1fr);
5
+ gap: var(--space-2) var(--space-3);
6
+ margin: 0;
7
+ font-size: var(--font-size-sm);
8
+ }
9
+
10
+ .ds-meta-list dt {
11
+ color: var(--color-text-muted);
12
+ }
13
+
14
+ .ds-meta-list dd {
15
+ margin: 0;
16
+ overflow-wrap: anywhere;
17
+ text-align: end;
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({title:e,description:n,actions:r,className:i,...a},o){return(0,t.jsxs)(`header`,{...a,ref:o,className:[`ds-page-header`,i].filter(Boolean).join(` `),children:[(0,t.jsxs)(`div`,{className:`ds-page-header__titles`,children:[(0,t.jsx)(`h1`,{className:`ds-page-header__title`,children:e}),n&&(0,t.jsx)(`p`,{className:`ds-page-header__description`,children:n})]}),r&&(0,t.jsx)(`div`,{className:`ds-page-header__actions`,children:r})]})});exports.PageHeader=n;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","PageHeader","rest","className","title","description","actions"],"sources":["../../../src/components/PageHeader/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n title: ReactNode;\n description?: ReactNode;\n actions?: ReactNode;\n}\n\n/** Page title and actions, independent of routing. */\nexport const PageHeader = forwardRef<HTMLElement, PageHeaderProps>(function PageHeader(\n { title, description, actions, className, ...rest },\n ref,\n) {\n return (\n <header\n {...rest}\n ref={ref}\n className={[\"ds-page-header\", className].filter(Boolean).join(\" \")}\n >\n <div className=\"ds-page-header__titles\">\n <h1 className=\"ds-page-header__title\">{title}</h1>\n {description && <p className=\"ds-page-header__description\">{description}</p>}\n </div>\n {actions && <div className=\"ds-page-header__actions\">{actions}</div>}\n </header>\n );\n});\n"],"mappings":"A,yHAUA,IAAaG,GAAA,EAAaH,EAAAA,WAAAA,CAAyC,SACjE,CAAE,QAAO,cAAa,UAAS,YAAW,GAAGI,GAC7C,EACA,CACA,OACE,EAAAF,EAAA,KAAA,CAAC,SAAD,CACE,GAAIE,EACC,MACL,UAAW,CAAC,iBAAkBC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAHnE,SAAA,EAKE,EAAAH,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,yBAAf,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,wBAAyB,SAAAI,CAAU,CAAA,EAChDC,IAAe,EAAAL,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,8BAA+B,SAAAK,CAAe,CAAA,CACxE,CACJ,CAAA,EAAAC,IAAW,EAAAN,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0BAA2B,SAAAM,CAAa,CAAA,CAC7D,C,EAEZ,CAAC,E"}
@@ -0,0 +1,9 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ export interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
3
+ title: ReactNode;
4
+ description?: ReactNode;
5
+ actions?: ReactNode;
6
+ }
7
+ /** Page title and actions, independent of routing. */
8
+ export declare const PageHeader: import("react").ForwardRefExoticComponent<PageHeaderProps & import("react").RefAttributes<HTMLElement>>;
9
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/PageHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,sDAAsD;AACtD,eAAO,MAAM,UAAU,yGAiBrB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ export interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
3
+ title: ReactNode;
4
+ description?: ReactNode;
5
+ actions?: ReactNode;
6
+ }
7
+ /** Page title and actions, independent of routing. */
8
+ export declare const PageHeader: import("react").ForwardRefExoticComponent<PageHeaderProps & import("react").RefAttributes<HTMLElement>>;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACjF,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,sDAAsD;AACtD,eAAO,MAAM,UAAU,yGAiBrB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { forwardRef as e } from "react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/components/PageHeader/index.tsx
4
+ var r = e(function({ title: e, description: r, actions: i, className: a, ...o }, s) {
5
+ return /* @__PURE__ */ n("header", {
6
+ ...o,
7
+ ref: s,
8
+ className: ["ds-page-header", a].filter(Boolean).join(" "),
9
+ children: [/* @__PURE__ */ n("div", {
10
+ className: "ds-page-header__titles",
11
+ children: [/* @__PURE__ */ t("h1", {
12
+ className: "ds-page-header__title",
13
+ children: e
14
+ }), r && /* @__PURE__ */ t("p", {
15
+ className: "ds-page-header__description",
16
+ children: r
17
+ })]
18
+ }), i && /* @__PURE__ */ t("div", {
19
+ className: "ds-page-header__actions",
20
+ children: i
21
+ })]
22
+ });
23
+ });
24
+ //#endregion
25
+ export { r as PageHeader };
26
+
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["PageHeader","forwardRef","rest","className","title","description","actions"],"sources":["../../../src/components/PageHeader/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n title: ReactNode;\n description?: ReactNode;\n actions?: ReactNode;\n}\n\n/** Page title and actions, independent of routing. */\nexport const PageHeader = forwardRef<HTMLElement, PageHeaderProps>(function PageHeader(\n { title, description, actions, className, ...rest },\n ref,\n) {\n return (\n <header\n {...rest}\n ref={ref}\n className={[\"ds-page-header\", className].filter(Boolean).join(\" \")}\n >\n <div className=\"ds-page-header__titles\">\n <h1 className=\"ds-page-header__title\">{title}</h1>\n {description && <p className=\"ds-page-header__description\">{description}</p>}\n </div>\n {actions && <div className=\"ds-page-header__actions\">{actions}</div>}\n </header>\n );\n});\n"],"mappings":";;;AAUA,IAAaA,IAAaC,EAAyC,SACjE,EAAE,UAAO,gBAAa,YAAS,cAAW,GAAGC,KAC7C,GACA;CACA,OACE,kBAAC,UAAD;EACE,GAAIA;EACC;EACL,WAAW,CAAC,kBAAkBC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAHnE,UAAA,CAKE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;IAAyB,UAAAC;GAAU,CAAA,GAChDC,KAAe,kBAAC,KAAD;IAAG,WAAU;IAA+B,UAAAA;GAAe,CAAA,CACxE;EACJ,CAAA,GAAAC,KAAW,kBAAC,OAAD;GAAK,WAAU;GAA2B,UAAAA;EAAa,CAAA,CAC7D;;AAEZ,CAAC"}
@@ -0,0 +1,39 @@
1
+ @layer components {
2
+ .ds-page-header {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ flex-wrap: wrap;
7
+ gap: var(--space-6);
8
+ min-inline-size: 0;
9
+ }
10
+
11
+ .ds-page-header__titles {
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: var(--space-1);
15
+ min-inline-size: 0;
16
+ }
17
+
18
+ /* reset.css is optional, so the heading and description clear UA margins. */
19
+ .ds-page-header__title {
20
+ margin: 0;
21
+ font-size: var(--font-size-xl);
22
+ font-weight: var(--font-weight-bold);
23
+ line-height: var(--line-height-tight);
24
+ overflow-wrap: anywhere;
25
+ }
26
+
27
+ .ds-page-header__description {
28
+ margin: 0;
29
+ color: var(--color-text-muted);
30
+ overflow-wrap: anywhere;
31
+ }
32
+
33
+ .ds-page-header__actions {
34
+ display: flex;
35
+ align-items: center;
36
+ flex-wrap: wrap;
37
+ gap: var(--space-2);
38
+ }
39
+ }
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-WOhlu6Rp.cjs"),t=require("../Button/index.cjs");let n=require("react"),r=require("react/jsx-runtime");function i(e,t){return e<t?`complete`:e===t?`current`:`upcoming`}var a=(0,n.forwardRef)(function({steps:a,activeStep:o,size:s=`md`,label:c=`Progress`,onStepChange:l,className:u,...d},f){let p=(0,n.useId)();return(0,r.jsx)(`nav`,{ref:f,"aria-label":c,"data-size":s,className:[`ds-stepper`,u].filter(Boolean).join(` `),...d,children:(0,r.jsx)(`ol`,{className:`ds-stepper__list`,children:a.map((n,a)=>{let s=i(a,o),c=!!l&&s!==`upcoming`,u=(0,r.jsxs)(r.Fragment,{children:[s===`complete`?(0,r.jsx)(e.t,{name:`check`,size:16,"aria-hidden":`true`}):a+1,(0,r.jsx)(`span`,{id:`${p}-${a}-status`,className:`ds-stepper__sr`,children:s})]});return(0,r.jsxs)(`li`,{className:`ds-stepper__step`,"data-status":s,"aria-current":s===`current`?`step`:void 0,children:[(0,r.jsxs)(`span`,{className:`ds-stepper__track`,"aria-hidden":`true`,children:[(0,r.jsx)(`span`,{className:`ds-stepper__connector`,"data-side":`start`}),(0,r.jsx)(`span`,{className:`ds-stepper__connector`,"data-side":`end`})]}),c?(0,r.jsx)(t.Button,{className:`ds-stepper__marker`,variant:s===`complete`?`primary`:`active`,size:`sm`,isIconOnly:!0,"aria-labelledby":`${p}-${a}-label`,"aria-describedby":`${p}-${a}-status`,onClick:()=>l?.(a,n.id),children:u}):(0,r.jsx)(`span`,{className:`ds-stepper__marker`,children:u}),(0,r.jsxs)(`span`,{className:`ds-stepper__text`,children:[(0,r.jsx)(`span`,{id:`${p}-${a}-label`,className:`ds-stepper__label`,children:n.label}),n.description&&(0,r.jsx)(`span`,{className:`ds-stepper__description`,children:n.description})]})]},n.id)})})})});exports.Stepper=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-WOhlu6Rp.cjs"),t=require("../Button/index.cjs");let n=require("react"),r=require("react/jsx-runtime");function i(e,t){return e<t?`complete`:e===t?`current`:`upcoming`}var a=(0,n.forwardRef)(function({steps:a,activeStep:o,size:s=`md`,orientation:c=`horizontal`,label:l=`Progress`,onStepChange:u,className:d,...f},p){let m=(0,n.useId)();return(0,r.jsx)(`nav`,{ref:p,"aria-label":l,"data-size":s,"data-orientation":c,className:[`ds-stepper`,d].filter(Boolean).join(` `),...f,children:(0,r.jsx)(`ol`,{className:`ds-stepper__list`,children:a.map((n,a)=>{let s=i(a,o),c=!!u&&s!==`upcoming`,l=(0,r.jsxs)(r.Fragment,{children:[s===`complete`?(0,r.jsx)(e.t,{name:`check`,size:16,"aria-hidden":`true`}):a+1,(0,r.jsx)(`span`,{id:`${m}-${a}-status`,className:`ds-stepper__sr`,children:s})]});return(0,r.jsxs)(`li`,{className:`ds-stepper__step`,"data-status":s,"aria-current":s===`current`?`step`:void 0,children:[(0,r.jsxs)(`span`,{className:`ds-stepper__track`,"aria-hidden":`true`,children:[(0,r.jsx)(`span`,{className:`ds-stepper__connector`,"data-side":`start`}),(0,r.jsx)(`span`,{className:`ds-stepper__connector`,"data-side":`end`})]}),c?(0,r.jsx)(t.Button,{className:`ds-stepper__marker`,variant:s===`complete`?`primary`:`active`,size:`sm`,isIconOnly:!0,"aria-labelledby":`${m}-${a}-label`,"aria-describedby":`${m}-${a}-status`,onClick:()=>u?.(a,n.id),children:l}):(0,r.jsx)(`span`,{className:`ds-stepper__marker`,children:l}),(0,r.jsxs)(`span`,{className:`ds-stepper__text`,children:[(0,r.jsx)(`span`,{id:`${m}-${a}-label`,className:`ds-stepper__label`,children:n.label}),n.description&&(0,r.jsx)(`span`,{className:`ds-stepper__description`,children:n.description})]})]},n.id)})})})});exports.Stepper=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["forwardRef","useId","_Fragment","Icon","Button","require_Icon","require_components_Button_index","react","react_jsx_runtime","statusOf","index","activeStep","Stepper","rest","id","label","size","className","steps","status","interactive","onStepChange","marker","step"],"sources":["../../../src/components/Stepper/index.tsx"],"sourcesContent":["import { forwardRef, useId, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Icon } from \"../Icon\";\nimport { Button } from \"../Button\";\nimport \"./style.css\";\n\nexport type StepperSize = \"sm\" | \"md\";\nexport type StepStatus = \"complete\" | \"current\" | \"upcoming\";\n\nexport interface Step {\n /** Stable key, and the value reported by `onStepChange`. */\n id: string;\n /** The step in the user's words — sentence case. */\n label: ReactNode;\n /** One line on what happens here. */\n description?: ReactNode;\n}\n\nexport interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, \"onChange\" | \"children\"> {\n /** The ordered steps. Three or more spread evenly across the full width. */\n steps: Step[];\n /** Index of the step being worked on. Everything before it reads as complete. */\n activeStep: number;\n /** Marker scale. `sm` for a toolbar band, `md` for a page header. */\n size?: StepperSize;\n /** Accessible name for the progress bar. */\n label?: string;\n /**\n * Makes completed steps (and the current one) navigable. Omit for a\n * read-only progress indicator.\n */\n onStepChange?: (index: number, id: string) => void;\n}\n\nfunction statusOf(index: number, activeStep: number): StepStatus {\n if (index < activeStep) {\n return \"complete\";\n }\n if (index === activeStep) {\n return \"current\";\n }\n return \"upcoming\";\n}\n\n/**\n * A linear progress rail: 1 - 2 - 3. Steps share the row equally however many\n * there are, so the last marker always lands on the trailing edge.\n */\nexport const Stepper = forwardRef<HTMLElement, StepperProps>(function Stepper(\n { steps, activeStep, size = \"md\", label = \"Progress\", onStepChange, className, ...rest },\n ref,\n) {\n const id = useId();\n return (\n <nav\n ref={ref}\n aria-label={label}\n data-size={size}\n className={[\"ds-stepper\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <ol className=\"ds-stepper__list\">\n {steps.map((step, index) => {\n const status = statusOf(index, activeStep);\n const interactive = Boolean(onStepChange) && status !== \"upcoming\";\n const marker = (\n <>\n {status === \"complete\" ? (\n <Icon\n name=\"check\"\n size={16}\n aria-hidden=\"true\"\n />\n ) : (\n index + 1\n )}\n <span\n id={`${id}-${index}-status`}\n className=\"ds-stepper__sr\"\n >\n {status}\n </span>\n </>\n );\n return (\n <li\n key={step.id}\n className=\"ds-stepper__step\"\n data-status={status}\n aria-current={status === \"current\" ? \"step\" : undefined}\n >\n <span\n className=\"ds-stepper__track\"\n aria-hidden=\"true\"\n >\n <span\n className=\"ds-stepper__connector\"\n data-side=\"start\"\n />\n <span\n className=\"ds-stepper__connector\"\n data-side=\"end\"\n />\n </span>\n {interactive ? (\n <Button\n className=\"ds-stepper__marker\"\n variant={status === \"complete\" ? \"primary\" : \"active\"}\n size=\"sm\"\n isIconOnly\n aria-labelledby={`${id}-${index}-label`}\n aria-describedby={`${id}-${index}-status`}\n onClick={() => onStepChange?.(index, step.id)}\n >\n {marker}\n </Button>\n ) : (\n <span className=\"ds-stepper__marker\">{marker}</span>\n )}\n <span className=\"ds-stepper__text\">\n <span\n id={`${id}-${index}-label`}\n className=\"ds-stepper__label\"\n >\n {step.label}\n </span>\n {step.description && (\n <span className=\"ds-stepper__description\">{step.description}</span>\n )}\n </span>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n});\n"],"mappings":"A,4MAiCA,SAASS,EAAS,EAAe,EAAgC,CAO/D,OANIC,EAAQC,EACH,WAELD,IAAUC,EACL,UAEF,UACT,CAMA,IAAaC,GAAA,EAAUZ,EAAAA,WAAAA,CAAsC,SAC3D,CAAE,QAAO,aAAY,OAAO,KAAM,QAAQ,WAAY,eAAc,YAAW,GAAGa,GAClF,EACA,CACA,IAAMC,GAAA,EAAKb,EAAAA,MAAAA,CAAM,EACjB,OACE,EAAAO,EAAA,IAAA,CAAC,MAAD,CACO,MACL,aAAYO,EACZ,YAAWC,EACX,UAAW,CAAC,aAAcC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAC7D,GAAIJ,EAEJ,UAAA,EAAAL,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,mBACX,SAAAU,EAAM,KAAK,EAAM,IAAU,CAC1B,IAAMC,EAASV,EAASC,EAAOC,CAAU,EACnCS,EAAc,EAAQC,GAAiBF,IAAW,WAClDG,GACJ,EAAAd,EAAA,KAAA,CAAAN,EAAAA,SAAA,CAAA,SAAA,CACGiB,IAAW,YACV,EAAAX,EAAA,IAAA,CAACL,EAAAA,EAAD,CACE,KAAK,QACL,KAAM,GACN,cAAY,MACb,CAAA,EAEDO,EAAQ,GAEV,EAAAF,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,GAAGM,EAAG,GAAGJ,EAAM,SACnB,UAAU,iBAET,SAAAS,CACG,CAAA,CACN,CAAA,CAAA,EAEJ,OACE,EAAAX,EAAA,KAAA,CAAC,KAAD,CAEE,UAAU,mBACV,cAAaW,EACb,eAAcA,IAAW,UAAY,OAAS,IAAA,GAJhD,SAAA,EAME,EAAAX,EAAA,KAAA,CAAC,OAAD,CACE,UAAU,oBACV,cAAY,OAFd,SAAA,EAIE,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,wBACV,YAAU,OACX,CAAA,GACD,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,wBACV,YAAU,KACX,CAAA,CACG,C,GACLY,GACC,EAAAZ,EAAA,IAAA,CAACJ,EAAAA,OAAD,CACE,UAAU,qBACV,QAASe,IAAW,WAAa,UAAY,SAC7C,KAAK,KACL,WAAA,GACA,kBAAiB,GAAGL,EAAG,GAAGJ,EAAM,QAChC,mBAAkB,GAAGI,EAAG,GAAGJ,EAAM,SACjC,YAAeW,IAAeX,EAAOa,EAAK,EAAE,EAE3C,SAAAD,CACK,CAAA,GAER,EAAAd,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,qBAAsB,SAAAc,CAAa,CAAA,GAErD,EAAAd,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,mBAAhB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,GAAGM,EAAG,GAAGJ,EAAM,QACnB,UAAU,oBAET,SAAAa,EAAK,KACF,CAAA,EACLA,EAAK,cACJ,EAAAf,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,0BAA2B,SAAAe,EAAK,WAAkB,CAAA,CAEhE,C,EACJ,CA5CG,EAAAA,EAAK,EA4CR,CAER,CAAC,CACC,CAAA,CACD,CAAA,CAET,CAAC,E"}
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","useId","_Fragment","Icon","Button","require_Icon","require_components_Button_index","react","react_jsx_runtime","statusOf","index","activeStep","Stepper","rest","id","label","size","orientation","className","steps","status","interactive","onStepChange","marker","step"],"sources":["../../../src/components/Stepper/index.tsx"],"sourcesContent":["import { forwardRef, useId, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Icon } from \"../Icon\";\nimport { Button } from \"../Button\";\nimport \"./style.css\";\n\nexport type StepperSize = \"sm\" | \"md\";\n/**\n * `horizontal` spreads steps across one row. `vertical` stacks them, each\n * marker beside its label. `auto` stacks while the stepper is narrower than\n * 28rem, so labels stay readable in narrow dialogs, drawers and sidebars.\n */\nexport type StepperOrientation = \"horizontal\" | \"vertical\" | \"auto\";\nexport type StepStatus = \"complete\" | \"current\" | \"upcoming\";\n\nexport interface Step {\n /** Stable key, and the value reported by `onStepChange`. */\n id: string;\n /** The step in the user's words — sentence case. */\n label: ReactNode;\n /** One line on what happens here. */\n description?: ReactNode;\n}\n\nexport interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, \"onChange\" | \"children\"> {\n /** The ordered steps. Three or more spread evenly across the full width. */\n steps: Step[];\n /** Index of the step being worked on. Everything before it reads as complete. */\n activeStep: number;\n /** Marker scale. `sm` for a toolbar band, `md` for a page header. */\n size?: StepperSize;\n /** Layout of the steps. Defaults to `horizontal`. */\n orientation?: StepperOrientation;\n /** Accessible name for the progress bar. */\n label?: string;\n /**\n * Makes completed steps (and the current one) navigable. Omit for a\n * read-only progress indicator.\n */\n onStepChange?: (index: number, id: string) => void;\n}\n\nfunction statusOf(index: number, activeStep: number): StepStatus {\n if (index < activeStep) {\n return \"complete\";\n }\n if (index === activeStep) {\n return \"current\";\n }\n return \"upcoming\";\n}\n\n/**\n * A linear progress rail: 1 - 2 - 3. Steps share the row equally however many\n * there are, so the last marker always lands on the trailing edge.\n */\nexport const Stepper = forwardRef<HTMLElement, StepperProps>(function Stepper(\n {\n steps,\n activeStep,\n size = \"md\",\n orientation = \"horizontal\",\n label = \"Progress\",\n onStepChange,\n className,\n ...rest\n },\n ref,\n) {\n const id = useId();\n return (\n <nav\n ref={ref}\n aria-label={label}\n data-size={size}\n data-orientation={orientation}\n className={[\"ds-stepper\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <ol className=\"ds-stepper__list\">\n {steps.map((step, index) => {\n const status = statusOf(index, activeStep);\n const interactive = Boolean(onStepChange) && status !== \"upcoming\";\n const marker = (\n <>\n {status === \"complete\" ? (\n <Icon\n name=\"check\"\n size={16}\n aria-hidden=\"true\"\n />\n ) : (\n index + 1\n )}\n <span\n id={`${id}-${index}-status`}\n className=\"ds-stepper__sr\"\n >\n {status}\n </span>\n </>\n );\n return (\n <li\n key={step.id}\n className=\"ds-stepper__step\"\n data-status={status}\n aria-current={status === \"current\" ? \"step\" : undefined}\n >\n <span\n className=\"ds-stepper__track\"\n aria-hidden=\"true\"\n >\n <span\n className=\"ds-stepper__connector\"\n data-side=\"start\"\n />\n <span\n className=\"ds-stepper__connector\"\n data-side=\"end\"\n />\n </span>\n {interactive ? (\n <Button\n className=\"ds-stepper__marker\"\n variant={status === \"complete\" ? \"primary\" : \"active\"}\n size=\"sm\"\n isIconOnly\n aria-labelledby={`${id}-${index}-label`}\n aria-describedby={`${id}-${index}-status`}\n onClick={() => onStepChange?.(index, step.id)}\n >\n {marker}\n </Button>\n ) : (\n <span className=\"ds-stepper__marker\">{marker}</span>\n )}\n <span className=\"ds-stepper__text\">\n <span\n id={`${id}-${index}-label`}\n className=\"ds-stepper__label\"\n >\n {step.label}\n </span>\n {step.description && (\n <span className=\"ds-stepper__description\">{step.description}</span>\n )}\n </span>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n});\n"],"mappings":"A,4MAyCA,SAASS,EAAS,EAAe,EAAgC,CAO/D,OANIC,EAAQC,EACH,WAELD,IAAUC,EACL,UAEF,UACT,CAMA,IAAaC,GAAA,EAAUZ,EAAAA,WAAAA,CAAsC,SAC3D,CACE,QACA,aACA,OAAO,KACP,cAAc,aACd,QAAQ,WACR,eACA,YACA,GAAGa,GAEL,EACA,CACA,IAAMC,GAAA,EAAKb,EAAAA,MAAAA,CAAM,EACjB,OACE,EAAAO,EAAA,IAAA,CAAC,MAAD,CACO,MACL,aAAYO,EACZ,YAAWC,EACX,mBAAkBC,EAClB,UAAW,CAAC,aAAcC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAC7D,GAAIL,EAEJ,UAAA,EAAAL,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,mBACX,SAAAW,EAAM,KAAK,EAAM,IAAU,CAC1B,IAAMC,EAASX,EAASC,EAAOC,CAAU,EACnCU,EAAc,EAAQC,GAAiBF,IAAW,WAClDG,GACJ,EAAAf,EAAA,KAAA,CAAAN,EAAAA,SAAA,CAAA,SAAA,CACGkB,IAAW,YACV,EAAAZ,EAAA,IAAA,CAACL,EAAAA,EAAD,CACE,KAAK,QACL,KAAM,GACN,cAAY,MACb,CAAA,EAEDO,EAAQ,GAEV,EAAAF,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,GAAGM,EAAG,GAAGJ,EAAM,SACnB,UAAU,iBAET,SAAAU,CACG,CAAA,CACN,CAAA,CAAA,EAEJ,OACE,EAAAZ,EAAA,KAAA,CAAC,KAAD,CAEE,UAAU,mBACV,cAAaY,EACb,eAAcA,IAAW,UAAY,OAAS,IAAA,GAJhD,SAAA,EAME,EAAAZ,EAAA,KAAA,CAAC,OAAD,CACE,UAAU,oBACV,cAAY,OAFd,SAAA,EAIE,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,wBACV,YAAU,OACX,CAAA,GACD,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,wBACV,YAAU,KACX,CAAA,CACG,C,GACLa,GACC,EAAAb,EAAA,IAAA,CAACJ,EAAAA,OAAD,CACE,UAAU,qBACV,QAASgB,IAAW,WAAa,UAAY,SAC7C,KAAK,KACL,WAAA,GACA,kBAAiB,GAAGN,EAAG,GAAGJ,EAAM,QAChC,mBAAkB,GAAGI,EAAG,GAAGJ,EAAM,SACjC,YAAeY,IAAeZ,EAAOc,EAAK,EAAE,EAE3C,SAAAD,CACK,CAAA,GAER,EAAAf,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,qBAAsB,SAAAe,CAAa,CAAA,GAErD,EAAAf,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,mBAAhB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,GAAGM,EAAG,GAAGJ,EAAM,QACnB,UAAU,oBAET,SAAAc,EAAK,KACF,CAAA,EACLA,EAAK,cACJ,EAAAhB,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,0BAA2B,SAAAgB,EAAK,WAAkB,CAAA,CAEhE,C,EACJ,CA5CG,EAAAA,EAAK,EA4CR,CAER,CAAC,CACC,CAAA,CACD,CAAA,CAET,CAAC,E"}
@@ -1,5 +1,11 @@
1
1
  import { type HTMLAttributes, type ReactNode } from "react";
2
2
  export type StepperSize = "sm" | "md";
3
+ /**
4
+ * `horizontal` spreads steps across one row. `vertical` stacks them, each
5
+ * marker beside its label. `auto` stacks while the stepper is narrower than
6
+ * 28rem, so labels stay readable in narrow dialogs, drawers and sidebars.
7
+ */
8
+ export type StepperOrientation = "horizontal" | "vertical" | "auto";
3
9
  export type StepStatus = "complete" | "current" | "upcoming";
4
10
  export interface Step {
5
11
  /** Stable key, and the value reported by `onStepChange`. */
@@ -16,6 +22,8 @@ export interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, "onChang
16
22
  activeStep: number;
17
23
  /** Marker scale. `sm` for a toolbar band, `md` for a page header. */
18
24
  size?: StepperSize;
25
+ /** Layout of the steps. Defaults to `horizontal`. */
26
+ orientation?: StepperOrientation;
19
27
  /** Accessible name for the progress bar. */
20
28
  label?: string;
21
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,IAAI;IACnB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,SAAS,CAAC;IACjB,qCAAqC;IACrC,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9F,4EAA4E;IAC5E,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAYD;;;GAGG;AACH,eAAO,MAAM,OAAO,sGAwFlB,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,IAAI;IACnB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,SAAS,CAAC;IACjB,qCAAqC;IACrC,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9F,4EAA4E;IAC5E,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAYD;;;GAGG;AACH,eAAO,MAAM,OAAO,sGAkGlB,CAAC"}
@@ -1,5 +1,11 @@
1
1
  import { type HTMLAttributes, type ReactNode } from "react";
2
2
  export type StepperSize = "sm" | "md";
3
+ /**
4
+ * `horizontal` spreads steps across one row. `vertical` stacks them, each
5
+ * marker beside its label. `auto` stacks while the stepper is narrower than
6
+ * 28rem, so labels stay readable in narrow dialogs, drawers and sidebars.
7
+ */
8
+ export type StepperOrientation = "horizontal" | "vertical" | "auto";
3
9
  export type StepStatus = "complete" | "current" | "upcoming";
4
10
  export interface Step {
5
11
  /** Stable key, and the value reported by `onStepChange`. */
@@ -16,6 +22,8 @@ export interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, "onChang
16
22
  activeStep: number;
17
23
  /** Marker scale. `sm` for a toolbar band, `md` for a page header. */
18
24
  size?: StepperSize;
25
+ /** Layout of the steps. Defaults to `horizontal`. */
26
+ orientation?: StepperOrientation;
19
27
  /** Accessible name for the progress bar. */
20
28
  label?: string;
21
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,IAAI;IACnB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,SAAS,CAAC;IACjB,qCAAqC;IACrC,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9F,4EAA4E;IAC5E,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAYD;;;GAGG;AACH,eAAO,MAAM,OAAO,sGAwFlB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAE7D,MAAM,WAAW,IAAI;IACnB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,SAAS,CAAC;IACjB,qCAAqC;IACrC,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9F,4EAA4E;IAC5E,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAYD;;;GAGG;AACH,eAAO,MAAM,OAAO,sGAkGlB,CAAC"}
@@ -6,23 +6,24 @@ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  function s(e, t) {
7
7
  return e < t ? "complete" : e === t ? "current" : "upcoming";
8
8
  }
9
- var c = n(function({ steps: n, activeStep: c, size: l = "md", label: u = "Progress", onStepChange: d, className: f, ...p }, m) {
10
- let h = r();
9
+ var c = n(function({ steps: n, activeStep: c, size: l = "md", orientation: u = "horizontal", label: d = "Progress", onStepChange: f, className: p, ...m }, h) {
10
+ let g = r();
11
11
  return /* @__PURE__ */ a("nav", {
12
- ref: m,
13
- "aria-label": u,
12
+ ref: h,
13
+ "aria-label": d,
14
14
  "data-size": l,
15
- className: ["ds-stepper", f].filter(Boolean).join(" "),
16
- ...p,
15
+ "data-orientation": u,
16
+ className: ["ds-stepper", p].filter(Boolean).join(" "),
17
+ ...m,
17
18
  children: /* @__PURE__ */ a("ol", {
18
19
  className: "ds-stepper__list",
19
20
  children: n.map((n, r) => {
20
- let l = s(r, c), u = !!d && l !== "upcoming", f = /* @__PURE__ */ o(i, { children: [l === "complete" ? /* @__PURE__ */ a(e, {
21
+ let l = s(r, c), u = !!f && l !== "upcoming", d = /* @__PURE__ */ o(i, { children: [l === "complete" ? /* @__PURE__ */ a(e, {
21
22
  name: "check",
22
23
  size: 16,
23
24
  "aria-hidden": "true"
24
25
  }) : r + 1, /* @__PURE__ */ a("span", {
25
- id: `${h}-${r}-status`,
26
+ id: `${g}-${r}-status`,
26
27
  className: "ds-stepper__sr",
27
28
  children: l
28
29
  })] });
@@ -47,18 +48,18 @@ var c = n(function({ steps: n, activeStep: c, size: l = "md", label: u = "Progre
47
48
  variant: l === "complete" ? "primary" : "active",
48
49
  size: "sm",
49
50
  isIconOnly: !0,
50
- "aria-labelledby": `${h}-${r}-label`,
51
- "aria-describedby": `${h}-${r}-status`,
52
- onClick: () => d?.(r, n.id),
53
- children: f
51
+ "aria-labelledby": `${g}-${r}-label`,
52
+ "aria-describedby": `${g}-${r}-status`,
53
+ onClick: () => f?.(r, n.id),
54
+ children: d
54
55
  }) : /* @__PURE__ */ a("span", {
55
56
  className: "ds-stepper__marker",
56
- children: f
57
+ children: d
57
58
  }),
58
59
  /* @__PURE__ */ o("span", {
59
60
  className: "ds-stepper__text",
60
61
  children: [/* @__PURE__ */ a("span", {
61
- id: `${h}-${r}-label`,
62
+ id: `${g}-${r}-label`,
62
63
  className: "ds-stepper__label",
63
64
  children: n.label
64
65
  }), n.description && /* @__PURE__ */ a("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Fragment","Icon","Fragment$1","statusOf","index","activeStep","Stepper","forwardRef","rest","id","useId","label","size","className","steps","status","interactive","onStepChange","marker","Button","step"],"sources":["../../../src/components/Stepper/index.tsx"],"sourcesContent":["import { forwardRef, useId, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Icon } from \"../Icon\";\nimport { Button } from \"../Button\";\nimport \"./style.css\";\n\nexport type StepperSize = \"sm\" | \"md\";\nexport type StepStatus = \"complete\" | \"current\" | \"upcoming\";\n\nexport interface Step {\n /** Stable key, and the value reported by `onStepChange`. */\n id: string;\n /** The step in the user's words — sentence case. */\n label: ReactNode;\n /** One line on what happens here. */\n description?: ReactNode;\n}\n\nexport interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, \"onChange\" | \"children\"> {\n /** The ordered steps. Three or more spread evenly across the full width. */\n steps: Step[];\n /** Index of the step being worked on. Everything before it reads as complete. */\n activeStep: number;\n /** Marker scale. `sm` for a toolbar band, `md` for a page header. */\n size?: StepperSize;\n /** Accessible name for the progress bar. */\n label?: string;\n /**\n * Makes completed steps (and the current one) navigable. Omit for a\n * read-only progress indicator.\n */\n onStepChange?: (index: number, id: string) => void;\n}\n\nfunction statusOf(index: number, activeStep: number): StepStatus {\n if (index < activeStep) {\n return \"complete\";\n }\n if (index === activeStep) {\n return \"current\";\n }\n return \"upcoming\";\n}\n\n/**\n * A linear progress rail: 1 - 2 - 3. Steps share the row equally however many\n * there are, so the last marker always lands on the trailing edge.\n */\nexport const Stepper = forwardRef<HTMLElement, StepperProps>(function Stepper(\n { steps, activeStep, size = \"md\", label = \"Progress\", onStepChange, className, ...rest },\n ref,\n) {\n const id = useId();\n return (\n <nav\n ref={ref}\n aria-label={label}\n data-size={size}\n className={[\"ds-stepper\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <ol className=\"ds-stepper__list\">\n {steps.map((step, index) => {\n const status = statusOf(index, activeStep);\n const interactive = Boolean(onStepChange) && status !== \"upcoming\";\n const marker = (\n <>\n {status === \"complete\" ? (\n <Icon\n name=\"check\"\n size={16}\n aria-hidden=\"true\"\n />\n ) : (\n index + 1\n )}\n <span\n id={`${id}-${index}-status`}\n className=\"ds-stepper__sr\"\n >\n {status}\n </span>\n </>\n );\n return (\n <li\n key={step.id}\n className=\"ds-stepper__step\"\n data-status={status}\n aria-current={status === \"current\" ? \"step\" : undefined}\n >\n <span\n className=\"ds-stepper__track\"\n aria-hidden=\"true\"\n >\n <span\n className=\"ds-stepper__connector\"\n data-side=\"start\"\n />\n <span\n className=\"ds-stepper__connector\"\n data-side=\"end\"\n />\n </span>\n {interactive ? (\n <Button\n className=\"ds-stepper__marker\"\n variant={status === \"complete\" ? \"primary\" : \"active\"}\n size=\"sm\"\n isIconOnly\n aria-labelledby={`${id}-${index}-label`}\n aria-describedby={`${id}-${index}-status`}\n onClick={() => onStepChange?.(index, step.id)}\n >\n {marker}\n </Button>\n ) : (\n <span className=\"ds-stepper__marker\">{marker}</span>\n )}\n <span className=\"ds-stepper__text\">\n <span\n id={`${id}-${index}-label`}\n className=\"ds-stepper__label\"\n >\n {step.label}\n </span>\n {step.description && (\n <span className=\"ds-stepper__description\">{step.description}</span>\n )}\n </span>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n});\n"],"mappings":";;;;;AAiCA,SAASG,EAAS,GAAe,GAAgC;CAO/D,OANIC,IAAQC,IACH,aAELD,MAAUC,IACL,YAEF;AACT;AAMA,IAAaC,IAAUC,EAAsC,SAC3D,EAAE,UAAO,eAAY,UAAO,MAAM,WAAQ,YAAY,iBAAc,cAAW,GAAGC,KAClF,GACA;CACA,IAAMC,IAAKC,EAAM;CACjB,OACE,kBAAC,OAAD;EACO;EACL,cAAYC;EACZ,aAAWC;EACX,WAAW,CAAC,cAAcC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC7D,GAAIL;EAEJ,UAAA,kBAAC,MAAD;GAAI,WAAU;GACX,UAAAM,EAAM,KAAK,GAAM,MAAU;IAC1B,IAAMC,IAASZ,EAASC,GAAOC,CAAU,GACnCW,IAAc,EAAQC,KAAiBF,MAAW,YAClDG,IACJ,kBAAAlB,GAAA,EAAA,UAAA,CACGe,MAAW,aACV,kBAACd,GAAD;KACE,MAAK;KACL,MAAM;KACN,eAAY;IACb,CAAA,IAEDG,IAAQ,GAEV,kBAAC,QAAD;KACE,IAAI,GAAGK,EAAG,GAAGL,EAAM;KACnB,WAAU;KAET,UAAAW;IACG,CAAA,CACN,EAAA,CAAA;IAEJ,OACE,kBAAC,MAAD;KAEE,WAAU;KACV,eAAaA;KACb,gBAAcA,MAAW,YAAY,SAAS,KAAA;KAJhD,UAAA;MAME,kBAAC,QAAD;OACE,WAAU;OACV,eAAY;OAFd,UAAA,CAIE,kBAAC,QAAD;QACE,WAAU;QACV,aAAU;OACX,CAAA,GACD,kBAAC,QAAD;QACE,WAAU;QACV,aAAU;OACX,CAAA,CACG;;MACLC,IACC,kBAACG,GAAD;OACE,WAAU;OACV,SAASJ,MAAW,aAAa,YAAY;OAC7C,MAAK;OACL,YAAA;OACA,mBAAiB,GAAGN,EAAG,GAAGL,EAAM;OAChC,oBAAkB,GAAGK,EAAG,GAAGL,EAAM;OACjC,eAAea,IAAeb,GAAOgB,EAAK,EAAE;OAE3C,UAAAF;MACK,CAAA,IAER,kBAAC,QAAD;OAAM,WAAU;OAAsB,UAAAA;MAAa,CAAA;MAErD,kBAAC,QAAD;OAAM,WAAU;OAAhB,UAAA,CACE,kBAAC,QAAD;QACE,IAAI,GAAGT,EAAG,GAAGL,EAAM;QACnB,WAAU;QAET,UAAAgB,EAAK;OACF,CAAA,GACLA,EAAK,eACJ,kBAAC,QAAD;QAAM,WAAU;QAA2B,UAAAA,EAAK;OAAkB,CAAA,CAEhE;;KACJ;IA5CG,GAAAA,EAAK,EA4CR;GAER,CAAC;EACC,CAAA;CACD,CAAA;AAET,CAAC"}
1
+ {"version":3,"file":"index.js","names":["_Fragment","Icon","Fragment$1","statusOf","index","activeStep","Stepper","forwardRef","rest","id","useId","label","size","orientation","className","steps","status","interactive","onStepChange","marker","Button","step"],"sources":["../../../src/components/Stepper/index.tsx"],"sourcesContent":["import { forwardRef, useId, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Icon } from \"../Icon\";\nimport { Button } from \"../Button\";\nimport \"./style.css\";\n\nexport type StepperSize = \"sm\" | \"md\";\n/**\n * `horizontal` spreads steps across one row. `vertical` stacks them, each\n * marker beside its label. `auto` stacks while the stepper is narrower than\n * 28rem, so labels stay readable in narrow dialogs, drawers and sidebars.\n */\nexport type StepperOrientation = \"horizontal\" | \"vertical\" | \"auto\";\nexport type StepStatus = \"complete\" | \"current\" | \"upcoming\";\n\nexport interface Step {\n /** Stable key, and the value reported by `onStepChange`. */\n id: string;\n /** The step in the user's words — sentence case. */\n label: ReactNode;\n /** One line on what happens here. */\n description?: ReactNode;\n}\n\nexport interface StepperProps extends Omit<HTMLAttributes<HTMLElement>, \"onChange\" | \"children\"> {\n /** The ordered steps. Three or more spread evenly across the full width. */\n steps: Step[];\n /** Index of the step being worked on. Everything before it reads as complete. */\n activeStep: number;\n /** Marker scale. `sm` for a toolbar band, `md` for a page header. */\n size?: StepperSize;\n /** Layout of the steps. Defaults to `horizontal`. */\n orientation?: StepperOrientation;\n /** Accessible name for the progress bar. */\n label?: string;\n /**\n * Makes completed steps (and the current one) navigable. Omit for a\n * read-only progress indicator.\n */\n onStepChange?: (index: number, id: string) => void;\n}\n\nfunction statusOf(index: number, activeStep: number): StepStatus {\n if (index < activeStep) {\n return \"complete\";\n }\n if (index === activeStep) {\n return \"current\";\n }\n return \"upcoming\";\n}\n\n/**\n * A linear progress rail: 1 - 2 - 3. Steps share the row equally however many\n * there are, so the last marker always lands on the trailing edge.\n */\nexport const Stepper = forwardRef<HTMLElement, StepperProps>(function Stepper(\n {\n steps,\n activeStep,\n size = \"md\",\n orientation = \"horizontal\",\n label = \"Progress\",\n onStepChange,\n className,\n ...rest\n },\n ref,\n) {\n const id = useId();\n return (\n <nav\n ref={ref}\n aria-label={label}\n data-size={size}\n data-orientation={orientation}\n className={[\"ds-stepper\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n <ol className=\"ds-stepper__list\">\n {steps.map((step, index) => {\n const status = statusOf(index, activeStep);\n const interactive = Boolean(onStepChange) && status !== \"upcoming\";\n const marker = (\n <>\n {status === \"complete\" ? (\n <Icon\n name=\"check\"\n size={16}\n aria-hidden=\"true\"\n />\n ) : (\n index + 1\n )}\n <span\n id={`${id}-${index}-status`}\n className=\"ds-stepper__sr\"\n >\n {status}\n </span>\n </>\n );\n return (\n <li\n key={step.id}\n className=\"ds-stepper__step\"\n data-status={status}\n aria-current={status === \"current\" ? \"step\" : undefined}\n >\n <span\n className=\"ds-stepper__track\"\n aria-hidden=\"true\"\n >\n <span\n className=\"ds-stepper__connector\"\n data-side=\"start\"\n />\n <span\n className=\"ds-stepper__connector\"\n data-side=\"end\"\n />\n </span>\n {interactive ? (\n <Button\n className=\"ds-stepper__marker\"\n variant={status === \"complete\" ? \"primary\" : \"active\"}\n size=\"sm\"\n isIconOnly\n aria-labelledby={`${id}-${index}-label`}\n aria-describedby={`${id}-${index}-status`}\n onClick={() => onStepChange?.(index, step.id)}\n >\n {marker}\n </Button>\n ) : (\n <span className=\"ds-stepper__marker\">{marker}</span>\n )}\n <span className=\"ds-stepper__text\">\n <span\n id={`${id}-${index}-label`}\n className=\"ds-stepper__label\"\n >\n {step.label}\n </span>\n {step.description && (\n <span className=\"ds-stepper__description\">{step.description}</span>\n )}\n </span>\n </li>\n );\n })}\n </ol>\n </nav>\n );\n});\n"],"mappings":";;;;;AAyCA,SAASG,EAAS,GAAe,GAAgC;CAO/D,OANIC,IAAQC,IACH,aAELD,MAAUC,IACL,YAEF;AACT;AAMA,IAAaC,IAAUC,EAAsC,SAC3D,EACE,UACA,eACA,UAAO,MACP,iBAAc,cACd,WAAQ,YACR,iBACA,cACA,GAAGC,KAEL,GACA;CACA,IAAMC,IAAKC,EAAM;CACjB,OACE,kBAAC,OAAD;EACO;EACL,cAAYC;EACZ,aAAWC;EACX,oBAAkBC;EAClB,WAAW,CAAC,cAAcC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC7D,GAAIN;EAEJ,UAAA,kBAAC,MAAD;GAAI,WAAU;GACX,UAAAO,EAAM,KAAK,GAAM,MAAU;IAC1B,IAAMC,IAASb,EAASC,GAAOC,CAAU,GACnCY,IAAc,EAAQC,KAAiBF,MAAW,YAClDG,IACJ,kBAAAnB,GAAA,EAAA,UAAA,CACGgB,MAAW,aACV,kBAACf,GAAD;KACE,MAAK;KACL,MAAM;KACN,eAAY;IACb,CAAA,IAEDG,IAAQ,GAEV,kBAAC,QAAD;KACE,IAAI,GAAGK,EAAG,GAAGL,EAAM;KACnB,WAAU;KAET,UAAAY;IACG,CAAA,CACN,EAAA,CAAA;IAEJ,OACE,kBAAC,MAAD;KAEE,WAAU;KACV,eAAaA;KACb,gBAAcA,MAAW,YAAY,SAAS,KAAA;KAJhD,UAAA;MAME,kBAAC,QAAD;OACE,WAAU;OACV,eAAY;OAFd,UAAA,CAIE,kBAAC,QAAD;QACE,WAAU;QACV,aAAU;OACX,CAAA,GACD,kBAAC,QAAD;QACE,WAAU;QACV,aAAU;OACX,CAAA,CACG;;MACLC,IACC,kBAACG,GAAD;OACE,WAAU;OACV,SAASJ,MAAW,aAAa,YAAY;OAC7C,MAAK;OACL,YAAA;OACA,mBAAiB,GAAGP,EAAG,GAAGL,EAAM;OAChC,oBAAkB,GAAGK,EAAG,GAAGL,EAAM;OACjC,eAAec,IAAed,GAAOiB,EAAK,EAAE;OAE3C,UAAAF;MACK,CAAA,IAER,kBAAC,QAAD;OAAM,WAAU;OAAsB,UAAAA;MAAa,CAAA;MAErD,kBAAC,QAAD;OAAM,WAAU;OAAhB,UAAA,CACE,kBAAC,QAAD;QACE,IAAI,GAAGV,EAAG,GAAGL,EAAM;QACnB,WAAU;QAET,UAAAiB,EAAK;OACF,CAAA,GACLA,EAAK,eACJ,kBAAC,QAAD;QAAM,WAAU;QAA2B,UAAAA,EAAK;OAAkB,CAAA,CAEhE;;KACJ;IA5CG,GAAAA,EAAK,EA4CR;GAER,CAAC;EACC,CAAA;CACD,CAAA;AAET,CAAC"}
@@ -152,6 +152,59 @@
152
152
  white-space: nowrap;
153
153
  }
154
154
 
155
+ /* ── Orientation ─────────────────────────────────────────────────────
156
+ * Stacked steps put each marker beside its label and drop the rail, so long
157
+ * labels wrap instead of overlapping their neighbours. `auto` queries the
158
+ * stepper's own width, so any narrow host (dialog, drawer, sidebar) gets it
159
+ * without overriding these internals. */
160
+ .ds-stepper[data-orientation="auto"] {
161
+ container: ds-stepper / inline-size;
162
+ }
163
+
164
+ .ds-stepper[data-orientation="vertical"] .ds-stepper__list {
165
+ flex-direction: column;
166
+ gap: var(--space-6);
167
+ }
168
+
169
+ .ds-stepper[data-orientation="vertical"] .ds-stepper__step {
170
+ flex-direction: row;
171
+ align-items: start;
172
+ gap: var(--space-3);
173
+ padding-inline: 0;
174
+ text-align: start;
175
+ }
176
+
177
+ .ds-stepper[data-orientation="vertical"] .ds-stepper__track {
178
+ display: none;
179
+ }
180
+
181
+ .ds-stepper[data-orientation="vertical"] .ds-stepper__text {
182
+ overflow-wrap: anywhere;
183
+ }
184
+
185
+ @container ds-stepper (width < 28rem) {
186
+ .ds-stepper[data-orientation="auto"] .ds-stepper__list {
187
+ flex-direction: column;
188
+ gap: var(--space-6);
189
+ }
190
+
191
+ .ds-stepper[data-orientation="auto"] .ds-stepper__step {
192
+ flex-direction: row;
193
+ align-items: start;
194
+ gap: var(--space-3);
195
+ padding-inline: 0;
196
+ text-align: start;
197
+ }
198
+
199
+ .ds-stepper[data-orientation="auto"] .ds-stepper__track {
200
+ display: none;
201
+ }
202
+
203
+ .ds-stepper[data-orientation="auto"] .ds-stepper__text {
204
+ overflow-wrap: anywhere;
205
+ }
206
+ }
207
+
155
208
  @media (prefers-reduced-motion: reduce) {
156
209
  .ds-stepper__marker:not(.ds-button) {
157
210
  transition: none;
@@ -0,0 +1,13 @@
1
+ import type { WizardStep } from "./types.cjs";
2
+ interface WizardActionsProps {
3
+ step: WizardStep;
4
+ isFirst: boolean;
5
+ isLast: boolean;
6
+ isPending: boolean;
7
+ submitLabel: string;
8
+ onBack: () => void;
9
+ onAdvance: () => void;
10
+ }
11
+ export declare function WizardActions({ step, isFirst, isLast, isPending, submitLabel, onBack, onAdvance, }: WizardActionsProps): import("react").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=actions.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.cts","sourceRoot":"","sources":["../../../src/components/Wizard/actions.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAW1C,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,kBAAkB,+BAuBpB"}
@@ -0,0 +1,13 @@
1
+ import type { WizardStep } from "./types.js";
2
+ interface WizardActionsProps {
3
+ step: WizardStep;
4
+ isFirst: boolean;
5
+ isLast: boolean;
6
+ isPending: boolean;
7
+ submitLabel: string;
8
+ onBack: () => void;
9
+ onAdvance: () => void;
10
+ }
11
+ export declare function WizardActions({ step, isFirst, isLast, isPending, submitLabel, onBack, onAdvance, }: WizardActionsProps): import("react").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/components/Wizard/actions.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAW1C,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,kBAAkB,+BAuBpB"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../Stepper/index.cjs");const e=require("../../chunks/Wizard-B_CPW1V6.cjs");exports.ReviewTable=e.n,exports.Wizard=e.t;
@@ -0,0 +1,7 @@
1
+ import type { WizardProps } from "./types.cjs";
2
+ export type { WizardProps, WizardStep } from "./types.cjs";
3
+ export { ReviewTable } from "./review-table.cjs";
4
+ export type { ReviewTableProps, ReviewRow } from "./review-table.cjs";
5
+ /** Controlled layout and navigation; applications own values, validation and actions. */
6
+ export declare function Wizard({ isOpen, modalComponent: ModalComponent, title, description, steps, activeStep, onStepChange, submitLabel, onSubmit, isPending, isNavigable, onClose, }: WizardProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Wizard/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,aAAa,CAAC;AAErB,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElE,yFAAyF;AACzF,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,cAAc,EAAE,cAAsB,EACtC,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAc,EACd,YAAuB,EACvB,WAAW,EACX,QAAQ,EACR,SAAiB,EACjB,WAAkB,EAClB,OAAO,GACR,EAAE,WAAW,+BAqEb"}
@@ -0,0 +1,7 @@
1
+ import type { WizardProps } from "./types.js";
2
+ export type { WizardProps, WizardStep } from "./types.js";
3
+ export { ReviewTable } from "./review-table.js";
4
+ export type { ReviewTableProps, ReviewRow } from "./review-table.js";
5
+ /** Controlled layout and navigation; applications own values, validation and actions. */
6
+ export declare function Wizard({ isOpen, modalComponent: ModalComponent, title, description, steps, activeStep, onStepChange, submitLabel, onSubmit, isPending, isNavigable, onClose, }: WizardProps): import("react").JSX.Element;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Wizard/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AACvD,OAAO,aAAa,CAAC;AAErB,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElE,yFAAyF;AACzF,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,cAAc,EAAE,cAAsB,EACtC,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAc,EACd,YAAuB,EACvB,WAAW,EACX,QAAQ,EACR,SAAiB,EACjB,WAAkB,EAClB,OAAO,GACR,EAAE,WAAW,+BAqEb"}
@@ -0,0 +1,2 @@
1
+ import "../Stepper/index.js";
2
+ export { n as ReviewTable, t as Wizard } from "../../chunks/Wizard-C1iR5z44.js";
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ export interface ReviewRow {
3
+ term: string;
4
+ value: ReactNode;
5
+ step: number;
6
+ }
7
+ export interface ReviewTableProps {
8
+ rows: ReviewRow[];
9
+ isDisabled?: boolean;
10
+ onStepChange: (index: number) => void;
11
+ }
12
+ export declare function ReviewTable({ rows, onStepChange, isDisabled }: ReviewTableProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=review-table.d.cts.map