@nswds/app 1.26.0 → 1.27.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/globals.css +63 -0
- package/dist/index.cjs +300 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -1
- package/dist/index.d.ts +53 -1
- package/dist/index.js +297 -15
- package/dist/index.js.map +1 -1
- package/dist/styles.css +60 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -2
package/dist/globals.css
CHANGED
|
@@ -516,6 +516,12 @@
|
|
|
516
516
|
.ml-2 {
|
|
517
517
|
margin-left: calc(var(--spacing) * 2);
|
|
518
518
|
}
|
|
519
|
+
.ml-3 {
|
|
520
|
+
margin-left: calc(var(--spacing) * 3);
|
|
521
|
+
}
|
|
522
|
+
.ml-4 {
|
|
523
|
+
margin-left: calc(var(--spacing) * 4);
|
|
524
|
+
}
|
|
519
525
|
.ml-5 {
|
|
520
526
|
margin-left: calc(var(--spacing) * 5);
|
|
521
527
|
}
|
|
@@ -723,6 +729,12 @@
|
|
|
723
729
|
.min-h-\[200px\] {
|
|
724
730
|
min-height: 200px;
|
|
725
731
|
}
|
|
732
|
+
.w-0 {
|
|
733
|
+
width: calc(var(--spacing) * 0);
|
|
734
|
+
}
|
|
735
|
+
.w-0\.5 {
|
|
736
|
+
width: calc(var(--spacing) * 0.5);
|
|
737
|
+
}
|
|
726
738
|
.w-2 {
|
|
727
739
|
width: calc(var(--spacing) * 2);
|
|
728
740
|
}
|
|
@@ -1123,6 +1135,13 @@
|
|
|
1123
1135
|
margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));
|
|
1124
1136
|
}
|
|
1125
1137
|
}
|
|
1138
|
+
.space-y-9 {
|
|
1139
|
+
:where(& > :not(:last-child)) {
|
|
1140
|
+
--tw-space-y-reverse: 0;
|
|
1141
|
+
margin-block-start: calc(calc(var(--spacing) * 9) * var(--tw-space-y-reverse));
|
|
1142
|
+
margin-block-end: calc(calc(var(--spacing) * 9) * calc(1 - var(--tw-space-y-reverse)));
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1126
1145
|
.space-y-12 {
|
|
1127
1146
|
:where(& > :not(:last-child)) {
|
|
1128
1147
|
--tw-space-y-reverse: 0;
|
|
@@ -1430,6 +1449,9 @@
|
|
|
1430
1449
|
.bg-border {
|
|
1431
1450
|
background-color: var(--border);
|
|
1432
1451
|
}
|
|
1452
|
+
.bg-gray-300 {
|
|
1453
|
+
background-color: var(--color-gray-300);
|
|
1454
|
+
}
|
|
1433
1455
|
.bg-gray-800 {
|
|
1434
1456
|
background-color: var(--color-gray-800);
|
|
1435
1457
|
}
|
|
@@ -1685,6 +1707,9 @@
|
|
|
1685
1707
|
.pb-0 {
|
|
1686
1708
|
padding-bottom: calc(var(--spacing) * 0);
|
|
1687
1709
|
}
|
|
1710
|
+
.pb-3 {
|
|
1711
|
+
padding-bottom: calc(var(--spacing) * 3);
|
|
1712
|
+
}
|
|
1688
1713
|
.pb-4 {
|
|
1689
1714
|
padding-bottom: calc(var(--spacing) * 4);
|
|
1690
1715
|
}
|
|
@@ -2008,6 +2033,9 @@
|
|
|
2008
2033
|
.text-nsw-grey-600 {
|
|
2009
2034
|
color: var(--color-nsw-grey-600);
|
|
2010
2035
|
}
|
|
2036
|
+
.text-nsw-grey-700 {
|
|
2037
|
+
color: var(--color-nsw-grey-700);
|
|
2038
|
+
}
|
|
2011
2039
|
.text-nsw-grey-800 {
|
|
2012
2040
|
color: var(--color-nsw-grey-800);
|
|
2013
2041
|
}
|
|
@@ -2498,6 +2526,27 @@
|
|
|
2498
2526
|
background-color: color-mix(in oklab, oklch(0.2899986864508513 0.11729574451023282 259.841936589881) 10%, transparent);
|
|
2499
2527
|
}
|
|
2500
2528
|
}
|
|
2529
|
+
.group-hover\:border-gray-400 {
|
|
2530
|
+
&:is(:where(.group):hover *) {
|
|
2531
|
+
@media (hover: hover) {
|
|
2532
|
+
border-color: var(--color-gray-400);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
.group-hover\:bg-gray-300 {
|
|
2537
|
+
&:is(:where(.group):hover *) {
|
|
2538
|
+
@media (hover: hover) {
|
|
2539
|
+
background-color: var(--color-gray-300);
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
.group-hover\:bg-nsw-grey-800 {
|
|
2544
|
+
&:is(:where(.group):hover *) {
|
|
2545
|
+
@media (hover: hover) {
|
|
2546
|
+
background-color: var(--color-nsw-grey-800);
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2501
2550
|
.group-hover\:fill-nsw-grey-900 {
|
|
2502
2551
|
&:is(:where(.group):hover *) {
|
|
2503
2552
|
@media (hover: hover) {
|
|
@@ -2505,6 +2554,13 @@
|
|
|
2505
2554
|
}
|
|
2506
2555
|
}
|
|
2507
2556
|
}
|
|
2557
|
+
.group-hover\:text-white {
|
|
2558
|
+
&:is(:where(.group):hover *) {
|
|
2559
|
+
@media (hover: hover) {
|
|
2560
|
+
color: var(--color-white);
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2508
2564
|
.group-hover\:opacity-100 {
|
|
2509
2565
|
&:is(:where(.group):hover *) {
|
|
2510
2566
|
@media (hover: hover) {
|
|
@@ -3057,6 +3113,13 @@
|
|
|
3057
3113
|
}
|
|
3058
3114
|
}
|
|
3059
3115
|
}
|
|
3116
|
+
.hover\:text-nsw-grey-800 {
|
|
3117
|
+
&:hover {
|
|
3118
|
+
@media (hover: hover) {
|
|
3119
|
+
color: var(--color-nsw-grey-800);
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3060
3123
|
.hover\:text-nsw-grey-850 {
|
|
3061
3124
|
&:hover {
|
|
3062
3125
|
@media (hover: hover) {
|
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
|
|
|
9
9
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
10
10
|
var Headless = require('@headlessui/react');
|
|
11
11
|
var React6 = require('react');
|
|
12
|
-
var
|
|
12
|
+
var Link9 = require('next/link');
|
|
13
13
|
var culori = require('culori');
|
|
14
14
|
var reactSlot = require('@radix-ui/react-slot');
|
|
15
15
|
var navigation = require('next/navigation');
|
|
@@ -49,6 +49,8 @@ var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
|
49
49
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
50
50
|
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
51
51
|
var slugify = require('@sindresorhus/slugify');
|
|
52
|
+
var zustand = require('zustand');
|
|
53
|
+
var middleware = require('zustand/middleware');
|
|
52
54
|
|
|
53
55
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
54
56
|
|
|
@@ -76,7 +78,7 @@ var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatio
|
|
|
76
78
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
77
79
|
var Headless__namespace = /*#__PURE__*/_interopNamespace(Headless);
|
|
78
80
|
var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
|
|
79
|
-
var
|
|
81
|
+
var Link9__default = /*#__PURE__*/_interopDefault(Link9);
|
|
80
82
|
var culori__namespace = /*#__PURE__*/_interopNamespace(culori);
|
|
81
83
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
82
84
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
@@ -372,7 +374,7 @@ function AvatarFallback({
|
|
|
372
374
|
);
|
|
373
375
|
}
|
|
374
376
|
var Link = React6.forwardRef(function Link2(props, ref) {
|
|
375
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Headless__namespace.DataInteractive, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
377
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Headless__namespace.DataInteractive, { children: /* @__PURE__ */ jsxRuntime.jsx(Link9__default.default, { ...props, ref }) });
|
|
376
378
|
});
|
|
377
379
|
var styles = {
|
|
378
380
|
base: [
|
|
@@ -1866,7 +1868,7 @@ function Breadcrumbs({
|
|
|
1866
1868
|
const shouldCollapse = breadcrumbItems.length > maxItems;
|
|
1867
1869
|
if (!shouldCollapse) {
|
|
1868
1870
|
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { className: "-ml-1", children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbList, { children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
1869
|
-
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1871
|
+
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link9__default.default, { href: item.path, children: item.label }) }) }),
|
|
1870
1872
|
index < breadcrumbItems.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {})
|
|
1871
1873
|
] }, item.path)) }) });
|
|
1872
1874
|
}
|
|
@@ -1877,7 +1879,7 @@ function Breadcrumbs({
|
|
|
1877
1879
|
const collapsedItems = breadcrumbItems.slice(startItems, breadcrumbItems.length - endItems);
|
|
1878
1880
|
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { children: /* @__PURE__ */ jsxRuntime.jsxs(BreadcrumbList, { children: [
|
|
1879
1881
|
itemsAtStart.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
1880
|
-
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1882
|
+
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link9__default.default, { href: item.path, children: item.label }) }) }),
|
|
1881
1883
|
index < itemsAtStart.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {})
|
|
1882
1884
|
] }, item.path)),
|
|
1883
1885
|
itemsAtStart.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}),
|
|
@@ -1886,11 +1888,11 @@ function Breadcrumbs({
|
|
|
1886
1888
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbEllipsis, { className: "h-4 w-4" }),
|
|
1887
1889
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle menu" })
|
|
1888
1890
|
] }),
|
|
1889
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "start", children: collapsedItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1891
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "start", children: collapsedItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link9__default.default, { href: item.path, children: item.label }) }, item.path)) })
|
|
1890
1892
|
] }) }),
|
|
1891
1893
|
itemsAtEnd.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}),
|
|
1892
1894
|
itemsAtEnd.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
1893
|
-
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1895
|
+
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: item.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link9__default.default, { href: item.path, children: item.label }) }) }),
|
|
1894
1896
|
index < itemsAtEnd.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {})
|
|
1895
1897
|
] }, item.path))
|
|
1896
1898
|
] }) });
|
|
@@ -7142,7 +7144,7 @@ function FooterLegalLinks({ legalLinks }) {
|
|
|
7142
7144
|
"aria-label": "Footer",
|
|
7143
7145
|
className: "flex flex-wrap justify-center gap-x-4 gap-y-3 py-4 text-sm lg:justify-start",
|
|
7144
7146
|
children: legalLinks?.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7145
|
-
|
|
7147
|
+
Link9__default.default,
|
|
7146
7148
|
{
|
|
7147
7149
|
href: item.href,
|
|
7148
7150
|
className: "text-nsw-grey-600 hover:text-nsw-grey-600 hover:bg-primary-800/10 -m-1 rounded p-1 underline underline-offset-4 hover:decoration-2",
|
|
@@ -7452,7 +7454,7 @@ function Heading({
|
|
|
7452
7454
|
|
|
7453
7455
|
// package.json
|
|
7454
7456
|
var package_default = {
|
|
7455
|
-
version: "1.
|
|
7457
|
+
version: "1.26.0"};
|
|
7456
7458
|
function Logo(props) {
|
|
7457
7459
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7458
7460
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "NSW Government" }),
|
|
@@ -7596,7 +7598,7 @@ function Header2({
|
|
|
7596
7598
|
children: [
|
|
7597
7599
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-6 flex lg:hidden" }),
|
|
7598
7600
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex grow basis-0 items-center", children: [
|
|
7599
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7601
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Link9__default.default, { href: "/", "aria-label": "Home page", className: "flex items-center justify-between", children: [
|
|
7600
7602
|
/* @__PURE__ */ jsxRuntime.jsx(Logo, { className: "h-12 w-auto lg:h-14" }),
|
|
7601
7603
|
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 2, size: 6, className: "ml-6", children: sitename })
|
|
7602
7604
|
] }),
|
|
@@ -7929,7 +7931,7 @@ function Navigation({
|
|
|
7929
7931
|
role: "list",
|
|
7930
7932
|
className: "border-nsw-grey-400 dark:border-nsw-grey-200/15 mt-2 flex flex-col gap-2 border-l lg:mt-4",
|
|
7931
7933
|
children: section.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "-ml-px flex flex-col items-start gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7932
|
-
|
|
7934
|
+
Link9__default.default,
|
|
7933
7935
|
{
|
|
7934
7936
|
href: link.href,
|
|
7935
7937
|
onClick: onLinkClick,
|
|
@@ -8187,7 +8189,7 @@ function PrevNextLinksPageLink({
|
|
|
8187
8189
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, children: [
|
|
8188
8190
|
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "font-display text-sm font-medium text-slate-900 dark:text-white", children: dir === "next" ? "Next" : "Previous" }),
|
|
8189
8191
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "mt-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8190
|
-
|
|
8192
|
+
Link9__default.default,
|
|
8191
8193
|
{
|
|
8192
8194
|
href,
|
|
8193
8195
|
className: clsx12__default.default(
|
|
@@ -8510,7 +8512,257 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
8510
8512
|
))
|
|
8511
8513
|
}
|
|
8512
8514
|
) })
|
|
8513
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8515
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(Link9__default.default, { href: link.href, onClick: onLinkClick, className: baseLinkClasses, children: link.title }) });
|
|
8516
|
+
}
|
|
8517
|
+
var StepIndicator = React6__namespace.forwardRef(
|
|
8518
|
+
({ className, array, onLinkClick, ...props }, ref) => {
|
|
8519
|
+
const pathname = navigation.usePathname();
|
|
8520
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", ref, className: cn("w-full", className), ...props, children: array.map((step, stepIdx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8521
|
+
"li",
|
|
8522
|
+
{
|
|
8523
|
+
className: clsx12__default.default(stepIdx !== array.length - 1 ? "pb-3" : "", "relative"),
|
|
8524
|
+
children: step.href === pathname && !(step.status === "completed" || step.status === "error" || step.status === "saved" || step.status === "cannot-start") ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: step.status === "in-progress" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8525
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8526
|
+
"div",
|
|
8527
|
+
{
|
|
8528
|
+
"aria-hidden": "true",
|
|
8529
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8530
|
+
}
|
|
8531
|
+
) : null,
|
|
8532
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8533
|
+
Link9__default.default,
|
|
8534
|
+
{
|
|
8535
|
+
href: step.href,
|
|
8536
|
+
className: "group relative flex items-center",
|
|
8537
|
+
onClick: onLinkClick,
|
|
8538
|
+
children: [
|
|
8539
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "-ml-1 flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-tertiary-lighter relative z-10 flex size-8 items-center justify-center rounded-full border-2 bg-white", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-tertiary-lighter relative z-10 flex size-6 items-center justify-center rounded-full border-2 bg-white", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8540
|
+
Icons.more_horiz,
|
|
8541
|
+
{
|
|
8542
|
+
"aria-hidden": "true",
|
|
8543
|
+
className: "text-tertiary-lighter size-4"
|
|
8544
|
+
}
|
|
8545
|
+
) }) }) }),
|
|
8546
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-3 flex min-w-0 flex-col", children: [
|
|
8547
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-tertiary-lighter text-sm font-semibold dark:text-slate-400", children: step.title }),
|
|
8548
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-tertiary-lighter text-sm font-semibold dark:text-slate-400", children: step.description })
|
|
8549
|
+
] })
|
|
8550
|
+
]
|
|
8551
|
+
}
|
|
8552
|
+
)
|
|
8553
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8554
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8555
|
+
"div",
|
|
8556
|
+
{
|
|
8557
|
+
"aria-hidden": "true",
|
|
8558
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8559
|
+
}
|
|
8560
|
+
) : null,
|
|
8561
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8562
|
+
Link9__default.default,
|
|
8563
|
+
{
|
|
8564
|
+
href: step.href,
|
|
8565
|
+
"aria-current": "step",
|
|
8566
|
+
className: "group relative flex items-center",
|
|
8567
|
+
onClick: onLinkClick,
|
|
8568
|
+
children: [
|
|
8569
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-tertiary-lighter relative z-10 flex size-6 items-center justify-center rounded-full border-2 bg-white", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-tertiary-lighter size-2 rounded-full" }) }) }),
|
|
8570
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8571
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-tertiary-lighter text-sm font-semibold dark:text-slate-400", children: step.title }),
|
|
8572
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-tertiary-lighter text-sm font-semibold dark:text-slate-400", children: step.description })
|
|
8573
|
+
] })
|
|
8574
|
+
]
|
|
8575
|
+
}
|
|
8576
|
+
)
|
|
8577
|
+
] }) }) : step.status === "completed" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8578
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8579
|
+
"div",
|
|
8580
|
+
{
|
|
8581
|
+
"aria-hidden": "true",
|
|
8582
|
+
className: "bg-success absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5"
|
|
8583
|
+
}
|
|
8584
|
+
) : null,
|
|
8585
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8586
|
+
Link9__default.default,
|
|
8587
|
+
{
|
|
8588
|
+
href: step.href,
|
|
8589
|
+
className: "group relative flex items-center",
|
|
8590
|
+
onClick: onLinkClick,
|
|
8591
|
+
children: [
|
|
8592
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-success-light group-hover:bg-success group-hover:border-success-dark relative z-10 flex size-6 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "aria-hidden": "true", className: "size-4 text-white" }) }) }),
|
|
8593
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8594
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8595
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8596
|
+
] })
|
|
8597
|
+
]
|
|
8598
|
+
}
|
|
8599
|
+
)
|
|
8600
|
+
] }) : step.status === "saved" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8601
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8602
|
+
"div",
|
|
8603
|
+
{
|
|
8604
|
+
"aria-hidden": "true",
|
|
8605
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8606
|
+
}
|
|
8607
|
+
) : null,
|
|
8608
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8609
|
+
Link9__default.default,
|
|
8610
|
+
{
|
|
8611
|
+
href: step.href,
|
|
8612
|
+
className: "group relative flex items-center",
|
|
8613
|
+
onClick: onLinkClick,
|
|
8614
|
+
children: [
|
|
8615
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-success-light group-hover:bg-success-light text-success-light relative z-10 flex size-6 items-center justify-center rounded-full border-2 bg-white group-hover:text-white", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "aria-hidden": "true", className: "size-4" }) }) }),
|
|
8616
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8617
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8618
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8619
|
+
] })
|
|
8620
|
+
]
|
|
8621
|
+
}
|
|
8622
|
+
)
|
|
8623
|
+
] }) : step.status === "in-progress" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8624
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8625
|
+
"div",
|
|
8626
|
+
{
|
|
8627
|
+
"aria-hidden": "true",
|
|
8628
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8629
|
+
}
|
|
8630
|
+
) : null,
|
|
8631
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8632
|
+
Link9__default.default,
|
|
8633
|
+
{
|
|
8634
|
+
href: step.href,
|
|
8635
|
+
className: "group relative flex items-center",
|
|
8636
|
+
onClick: onLinkClick,
|
|
8637
|
+
children: [
|
|
8638
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "border-tertiary-lighter group-hover:border-tertiary-light group-hover:bg-tertiary-light text-tertiary-lighter relative z-10 flex size-6 items-center justify-center rounded-full border-2 bg-white group-hover:text-white", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.more_horiz, { "aria-hidden": "true", className: "size-4" }) }) }),
|
|
8639
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8640
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8641
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8642
|
+
] })
|
|
8643
|
+
]
|
|
8644
|
+
}
|
|
8645
|
+
)
|
|
8646
|
+
] }) : step.status === "error" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8647
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8648
|
+
"div",
|
|
8649
|
+
{
|
|
8650
|
+
"aria-hidden": "true",
|
|
8651
|
+
className: "bg-error-light absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5"
|
|
8652
|
+
}
|
|
8653
|
+
) : null,
|
|
8654
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8655
|
+
Link9__default.default,
|
|
8656
|
+
{
|
|
8657
|
+
href: step.href,
|
|
8658
|
+
className: "group relative flex items-center",
|
|
8659
|
+
onClick: onLinkClick,
|
|
8660
|
+
children: [
|
|
8661
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-error-light group-hover:bg-error group-hover:border-error relative z-10 flex size-6 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.exclamation, { "aria-hidden": "true", className: "size-4 text-white" }) }) }),
|
|
8662
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8663
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8664
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8665
|
+
] })
|
|
8666
|
+
]
|
|
8667
|
+
}
|
|
8668
|
+
)
|
|
8669
|
+
] }) : step.status === "not-started" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8670
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8671
|
+
"div",
|
|
8672
|
+
{
|
|
8673
|
+
"aria-hidden": "true",
|
|
8674
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8675
|
+
}
|
|
8676
|
+
) : null,
|
|
8677
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8678
|
+
Link9__default.default,
|
|
8679
|
+
{
|
|
8680
|
+
href: step.href,
|
|
8681
|
+
className: "group relative flex items-center",
|
|
8682
|
+
onClick: onLinkClick,
|
|
8683
|
+
children: [
|
|
8684
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 flex size-6 items-center justify-center rounded-full border-2 border-gray-300 bg-white group-hover:border-gray-400", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-2 rounded-full bg-transparent group-hover:bg-gray-300" }) }) }),
|
|
8685
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8686
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8687
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8688
|
+
] })
|
|
8689
|
+
]
|
|
8690
|
+
}
|
|
8691
|
+
)
|
|
8692
|
+
] }) : step.status === "cannot-start" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8693
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8694
|
+
"div",
|
|
8695
|
+
{
|
|
8696
|
+
"aria-hidden": "true",
|
|
8697
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8698
|
+
}
|
|
8699
|
+
) : null,
|
|
8700
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8701
|
+
Link9__default.default,
|
|
8702
|
+
{
|
|
8703
|
+
href: step.href,
|
|
8704
|
+
className: "group relative flex items-center",
|
|
8705
|
+
onClick: onLinkClick,
|
|
8706
|
+
children: [
|
|
8707
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-nsw-grey-600 group-hover:bg-nsw-grey-800 relative z-10 flex size-6 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.remove, { "aria-hidden": "true", className: "size-4 text-white" }) }) }),
|
|
8708
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8709
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8710
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8711
|
+
] })
|
|
8712
|
+
]
|
|
8713
|
+
}
|
|
8714
|
+
)
|
|
8715
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8716
|
+
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8717
|
+
"div",
|
|
8718
|
+
{
|
|
8719
|
+
"aria-hidden": "true",
|
|
8720
|
+
className: "absolute top-4 left-3 mt-0.5 -ml-px h-full w-0.5 bg-gray-300"
|
|
8721
|
+
}
|
|
8722
|
+
) : null,
|
|
8723
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8724
|
+
Link9__default.default,
|
|
8725
|
+
{
|
|
8726
|
+
href: step.href,
|
|
8727
|
+
className: "group relative flex items-center",
|
|
8728
|
+
onClick: onLinkClick,
|
|
8729
|
+
children: [
|
|
8730
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "flex h-9 items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 flex size-6 items-center justify-center rounded-full border-2 border-gray-300 bg-white group-hover:border-gray-400", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-2 rounded-full bg-transparent group-hover:bg-gray-300" }) }) }),
|
|
8731
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-4 flex min-w-0 flex-col", children: [
|
|
8732
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.title }),
|
|
8733
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-nsw-grey-700 hover:text-nsw-grey-800 text-sm dark:text-slate-400 dark:hover:text-slate-300", children: step.description })
|
|
8734
|
+
] })
|
|
8735
|
+
]
|
|
8736
|
+
}
|
|
8737
|
+
)
|
|
8738
|
+
] })
|
|
8739
|
+
},
|
|
8740
|
+
step.title
|
|
8741
|
+
)) });
|
|
8742
|
+
}
|
|
8743
|
+
);
|
|
8744
|
+
StepIndicator.displayName = "StepIndicator";
|
|
8745
|
+
function StepNavigation({
|
|
8746
|
+
className,
|
|
8747
|
+
navigation,
|
|
8748
|
+
useFormStore
|
|
8749
|
+
}) {
|
|
8750
|
+
const { formStatus } = useFormStore();
|
|
8751
|
+
const navigationWithStatus = navigation.map((section) => ({
|
|
8752
|
+
...section,
|
|
8753
|
+
links: section.links.map((link) => {
|
|
8754
|
+
return {
|
|
8755
|
+
...link,
|
|
8756
|
+
status: formStatus[camelCase(
|
|
8757
|
+
`${section.title.replace(/[|&;$%@"<>()+,]/g, "")} ${link.title.replace(/[|&;$%@"<>()+,]/g, "")}`
|
|
8758
|
+
)] || "unknown"
|
|
8759
|
+
};
|
|
8760
|
+
})
|
|
8761
|
+
}));
|
|
8762
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx12__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "space-y-9", children: navigationWithStatus.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
8763
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display font-medium text-slate-900 dark:text-white", children: section.title }),
|
|
8764
|
+
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { className: "mt-2 lg:mt-4", array: section.links })
|
|
8765
|
+
] }, section.title)) }) }) });
|
|
8514
8766
|
}
|
|
8515
8767
|
function Skeleton({ className, ...props }) {
|
|
8516
8768
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8791,7 +9043,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
8791
9043
|
),
|
|
8792
9044
|
/* @__PURE__ */ jsxRuntime.jsx("ol", { role: "list", className: "mt-4 space-y-3 text-sm", children: tableOfContents.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
8793
9045
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8794
|
-
|
|
9046
|
+
Link9__default.default,
|
|
8795
9047
|
{
|
|
8796
9048
|
href: `#${section.id}`,
|
|
8797
9049
|
className: clsx12__default.default(
|
|
@@ -8806,7 +9058,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
8806
9058
|
role: "list",
|
|
8807
9059
|
className: "mt-2 space-y-3 pl-5 text-slate-500 dark:text-slate-400",
|
|
8808
9060
|
children: section.children.map((subSection) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8809
|
-
|
|
9061
|
+
Link9__default.default,
|
|
8810
9062
|
{
|
|
8811
9063
|
href: `#${subSection.id}`,
|
|
8812
9064
|
className: isActive(subSection) ? "text-primary-750 font-semibold" : "hover:text-slate-600 dark:hover:text-slate-300",
|
|
@@ -9199,6 +9451,36 @@ function getHeadings(slugify$1 = slugify.slugifyWithCounter()) {
|
|
|
9199
9451
|
});
|
|
9200
9452
|
return result;
|
|
9201
9453
|
}
|
|
9454
|
+
function createFormStore(opts) {
|
|
9455
|
+
const { storageKey, initialFormData, initialFormStatus } = opts;
|
|
9456
|
+
return zustand.create()(
|
|
9457
|
+
middleware.persist(
|
|
9458
|
+
(set) => ({
|
|
9459
|
+
formData: initialFormData,
|
|
9460
|
+
formStatus: initialFormStatus,
|
|
9461
|
+
isLoading: true,
|
|
9462
|
+
updateFormData: (page, data) => set((state) => ({
|
|
9463
|
+
formData: {
|
|
9464
|
+
...state.formData,
|
|
9465
|
+
[page]: { ...state.formData[page] || {}, ...data }
|
|
9466
|
+
}
|
|
9467
|
+
})),
|
|
9468
|
+
updateFormStatus: (page, status) => set((state) => ({
|
|
9469
|
+
formStatus: { ...state.formStatus, [page]: status }
|
|
9470
|
+
})),
|
|
9471
|
+
resetForm: () => set({ formData: initialFormData, formStatus: initialFormStatus }),
|
|
9472
|
+
setIsLoading: (loading) => set({ isLoading: loading })
|
|
9473
|
+
}),
|
|
9474
|
+
{
|
|
9475
|
+
name: storageKey,
|
|
9476
|
+
storage: middleware.createJSONStorage(() => localStorage),
|
|
9477
|
+
onRehydrateStorage: () => (state) => {
|
|
9478
|
+
state?.setIsLoading(false);
|
|
9479
|
+
}
|
|
9480
|
+
}
|
|
9481
|
+
)
|
|
9482
|
+
);
|
|
9483
|
+
}
|
|
9202
9484
|
|
|
9203
9485
|
// src/types/types.ts
|
|
9204
9486
|
var languages = [
|
|
@@ -9412,6 +9694,8 @@ exports.Skeleton = Skeleton;
|
|
|
9412
9694
|
exports.Slider = Slider;
|
|
9413
9695
|
exports.Social = Social;
|
|
9414
9696
|
exports.Spinner = Spinner;
|
|
9697
|
+
exports.StepIndicator = StepIndicator;
|
|
9698
|
+
exports.StepNavigation = StepNavigation;
|
|
9415
9699
|
exports.Strong = Strong;
|
|
9416
9700
|
exports.Switch = Switch;
|
|
9417
9701
|
exports.Table = Table;
|
|
@@ -9459,6 +9743,7 @@ exports.colorThemes = colorThemes;
|
|
|
9459
9743
|
exports.colors = colors;
|
|
9460
9744
|
exports.createColorArray = createColorArray;
|
|
9461
9745
|
exports.createColorData = createColorData;
|
|
9746
|
+
exports.createFormStore = createFormStore;
|
|
9462
9747
|
exports.darkenColor = darkenColor;
|
|
9463
9748
|
exports.domToSimple = domToSimple;
|
|
9464
9749
|
exports.generateColorThemes = generateColorThemes;
|