@nswds/app 1.23.6 → 1.24.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/index.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var AccordionPrimitive = require('@radix-ui/react-accordion');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
- var clsx11 = require('clsx');
5
+ var clsx12 = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var classVarianceAuthority = require('class-variance-authority');
8
8
  var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
@@ -70,7 +70,7 @@ function _interopNamespace(e) {
70
70
  }
71
71
 
72
72
  var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
73
- var clsx11__default = /*#__PURE__*/_interopDefault(clsx11);
73
+ var clsx12__default = /*#__PURE__*/_interopDefault(clsx12);
74
74
  var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
75
75
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
76
76
  var Headless__namespace = /*#__PURE__*/_interopNamespace(Headless);
@@ -197,7 +197,7 @@ var Icons = {
197
197
  west: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M233-440h607q17 0 28.5-11.5T880-480q0-17-11.5-28.5T840-520H233l155-156q11-11 11.5-27.5T388-732q-11-11-28-11t-28 11L108-508q-6 6-8.5 13T97-480q0 8 2.5 15t8.5 13l224 224q11 11 27.5 11t28.5-11q12-12 12-28.5T388-285L233-440Z" }) })
198
198
  };
199
199
  function cn(...inputs) {
200
- return tailwindMerge.twMerge(clsx11.clsx(inputs));
200
+ return tailwindMerge.twMerge(clsx12.clsx(inputs));
201
201
  }
202
202
  function truncate(text, maxLength) {
203
203
  if (text.length <= maxLength) {
@@ -211,6 +211,9 @@ function kebabCase(str) {
211
211
  function camelCase(str) {
212
212
  return str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_, chr) => chr.toUpperCase());
213
213
  }
214
+ function humaniseVariant(key) {
215
+ return key.replace(/([a-z])([A-Z0-9])/g, "$1 $2").replace(/([0-9])([A-Za-z])/g, "$1 $2").replace(/_/g, " ").replace(/\bFull\s?Width\b/gi, "full width").replace(/\s+/g, " ").trim().replace(/^./, (s) => s.toUpperCase());
216
+ }
214
217
  function Accordion({ ...props }) {
215
218
  return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
216
219
  }
@@ -695,7 +698,7 @@ var Button2 = React6.forwardRef(function Button3({ className, variant, color, si
695
698
  {
696
699
  "data-variant": variant,
697
700
  ...props,
698
- className: clsx11__default.default(classes, "cursor-pointer"),
701
+ className: clsx12__default.default(classes, "cursor-pointer"),
699
702
  ref,
700
703
  children: /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, { children })
701
704
  }
@@ -1160,7 +1163,7 @@ var BadgeButton = React6.forwardRef(function BadgeButton2({
1160
1163
  children,
1161
1164
  ...props
1162
1165
  }, ref) {
1163
- const classes = clsx11__default.default(className, focusOutline[color], [
1166
+ const classes = clsx12__default.default(className, focusOutline[color], [
1164
1167
  // Base
1165
1168
  "group relative inline-flex rounded-sm",
1166
1169
  // Focus
@@ -1182,7 +1185,7 @@ var BadgeButton = React6.forwardRef(function BadgeButton2({
1182
1185
  {
1183
1186
  "data-variant": variant,
1184
1187
  ...props,
1185
- className: clsx11__default.default(classes, "cursor-pointer"),
1188
+ className: clsx12__default.default(classes, "cursor-pointer"),
1186
1189
  ref,
1187
1190
  children: /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, { children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, color, size, children }) })
1188
1191
  }
@@ -2086,40 +2089,11 @@ function PreWithCopy(props) {
2086
2089
  onClick: handleCopy,
2087
2090
  children: [
2088
2091
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge(isJustCopied && "hidden"), children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center", children: [
2089
- /* @__PURE__ */ jsxRuntime.jsx(
2090
- "svg",
2091
- {
2092
- className: "me-1.5 size-3",
2093
- "aria-hidden": "true",
2094
- xmlns: "http://www.w3.org/2000/svg",
2095
- fill: "currentColor",
2096
- viewBox: "0 0 18 20",
2097
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z" })
2098
- }
2099
- ),
2092
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.copy, { className: "me-1.5 size-3" }),
2100
2093
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold", children: "Copy code" })
2101
2094
  ] }) }),
2102
2095
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge(isJustCopied ? "block" : "hidden"), children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center", children: [
2103
- /* @__PURE__ */ jsxRuntime.jsx(
2104
- "svg",
2105
- {
2106
- className: "text-primary-700 dark:text-primary-500 me-1.5 size-3",
2107
- "aria-hidden": "true",
2108
- xmlns: "http://www.w3.org/2000/svg",
2109
- fill: "none",
2110
- viewBox: "0 0 16 12",
2111
- children: /* @__PURE__ */ jsxRuntime.jsx(
2112
- "path",
2113
- {
2114
- stroke: "currentColor",
2115
- strokeLinecap: "round",
2116
- strokeLinejoin: "round",
2117
- strokeWidth: "2",
2118
- d: "M1 5.917 5.724 10.5 15 1.5"
2119
- }
2120
- )
2121
- }
2122
- ),
2096
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { className: "text-primary-700 dark:text-primary-500 me-1.5 size-3" }),
2123
2097
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary-700 dark:text-primary-500 text-xs font-semibold", children: "Copied" })
2124
2098
  ] }) })
2125
2099
  ]
@@ -2166,13 +2140,26 @@ function SelectTrigger({
2166
2140
  "data-slot": "select-trigger",
2167
2141
  "data-size": size,
2168
2142
  className: cn(
2169
- "border-nsw-grey-200 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2143
+ // Base styles
2144
+ "border-nsw-grey-600 [&_svg:not([class*='text-'])]:text-nsw-grey-600 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2145
+ // Disabled styles
2146
+ "disabled:cursor-not-allowed disabled:opacity-50",
2147
+ // aria-invalid styles
2148
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
2149
+ // Focus styles
2150
+ "focus:outline-primary-650/70 focus:outline focus:outline-2 focus:outline-offset-2",
2151
+ // Placeholder styles
2152
+ "data-[placeholder]:text-nsw-grey-600",
2153
+ // Dark mode styles
2154
+ "dark:bg-input/30 dark:hover:bg-input/50",
2155
+ // Size styles
2156
+ "data-[size=default]:h-12 data-[size=sm]:h-9",
2170
2157
  className
2171
2158
  ),
2172
2159
  ...props,
2173
2160
  children: [
2174
2161
  children,
2175
- /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_down, { className: "size-4 opacity-50" }) })
2162
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_down, { className: "size-6 opacity-80" }) })
2176
2163
  ]
2177
2164
  }
2178
2165
  );
@@ -2188,7 +2175,9 @@ function SelectContent({
2188
2175
  {
2189
2176
  "data-slot": "select-content",
2190
2177
  className: cn(
2191
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
2178
+ // Base styles
2179
+ "text-nsw-grey-800 bg-white",
2180
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
2192
2181
  position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2193
2182
  className
2194
2183
  ),
@@ -2216,7 +2205,7 @@ function SelectLabel({ className, ...props }) {
2216
2205
  SelectPrimitive__namespace.Label,
2217
2206
  {
2218
2207
  "data-slot": "select-label",
2219
- className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
2208
+ className: cn("text-nsw-grey-600 px-2 py-1.5 text-xs", className),
2220
2209
  ...props
2221
2210
  }
2222
2211
  );
@@ -2231,12 +2220,12 @@ function SelectItem({
2231
2220
  {
2232
2221
  "data-slot": "select-item",
2233
2222
  className: cn(
2234
- "focus:bg-primary-800/10 focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
2223
+ "focus:bg-primary-800/10 focus:text-primary-800 [&_svg:not([class*='text-'])]:text-nsw-grey-600 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:font-bold data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
2235
2224
  className
2236
2225
  ),
2237
2226
  ...props,
2238
2227
  children: [
2239
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { className: "size-4" }) }) }),
2228
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { className: "size-6" }) }) }),
2240
2229
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
2241
2230
  ]
2242
2231
  }
@@ -2250,7 +2239,7 @@ function SelectSeparator({
2250
2239
  SelectPrimitive__namespace.Separator,
2251
2240
  {
2252
2241
  "data-slot": "select-separator",
2253
- className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
2242
+ className: cn("bg-nsw-primary-800/20 pointer-events-none -mx-1 my-1 h-px", className),
2254
2243
  ...props
2255
2244
  }
2256
2245
  );
@@ -2265,7 +2254,7 @@ function SelectScrollUpButton({
2265
2254
  "data-slot": "select-scroll-up-button",
2266
2255
  className: cn("flex cursor-default items-center justify-center py-1", className),
2267
2256
  ...props,
2268
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_up, { className: "size-4" })
2257
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_up, { className: "size-6" })
2269
2258
  }
2270
2259
  );
2271
2260
  }
@@ -2279,7 +2268,7 @@ function SelectScrollDownButton({
2279
2268
  "data-slot": "select-scroll-down-button",
2280
2269
  className: cn("flex cursor-default items-center justify-center py-1", className),
2281
2270
  ...props,
2282
- children: /* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_down, { className: "size-4" })
2271
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icons.chevron_down, { className: "size-6" })
2283
2272
  }
2284
2273
  );
2285
2274
  }
@@ -6046,6 +6035,10 @@ function CodeDemo({ data, hide = {} }) {
6046
6035
  const codeItems = getCodeItems(code);
6047
6036
  const current = getCurrent(codeItems, tabIndex);
6048
6037
  const shouldExpand = getShouldExpand(current.code.trim());
6038
+ const variantLabels = React6__namespace.default.useMemo(() => {
6039
+ const explicit = data.labels ?? {};
6040
+ return Object.fromEntries(variants.map((v) => [v, explicit[v] ?? humaniseVariant(v)]));
6041
+ }, [variants, data]);
6049
6042
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8", children: [
6050
6043
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-grey-200 bg-grey-50 dark:border-grey-600 dark:bg-grey-700 w-full rounded-t-xl border p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3", children: [
6051
6044
  /* @__PURE__ */ jsxRuntime.jsx(EditOnGithubButton, { githubSlug: data.githubSlug }),
@@ -6105,8 +6098,8 @@ function CodeDemo({ data, hide = {} }) {
6105
6098
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-grey-200 bg-grey-50 dark:border-grey-600 dark:bg-grey-700 flex w-full rounded-t-md border-b", children: [
6106
6099
  /* @__PURE__ */ jsxRuntime.jsx(Tabs, { tabIndex, items: codeItems, onSelect: setTabIndex }),
6107
6100
  variants.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Select, { onValueChange: (value) => handleSelectVariant(value), children: [
6108
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a variant" }) }),
6109
- /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: variants.map((v) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: v, children: v }, v)) })
6101
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a variant" }) }),
6102
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: variants.map((v) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: v, children: variantLabels[v] }, v)) })
6110
6103
  ] }),
6111
6104
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6112
6105
  CopyToClipboardButton,
@@ -6207,7 +6200,7 @@ function CodePreview({
6207
6200
  children: /* @__PURE__ */ jsxRuntime.jsx(
6208
6201
  "div",
6209
6202
  {
6210
- className: clsx11.clsx(
6203
+ className: clsx12.clsx(
6211
6204
  "group dark:bg-grey-900 mx-auto bg-white bg-gradient-to-r",
6212
6205
  view === "desktop" && "w-full",
6213
6206
  view === "tablet" && "max-w-lg",
@@ -6445,7 +6438,7 @@ function ColorCard({ name, token, hex, rgb: rgb2, hsl, oklch: oklch2, format, vi
6445
6438
  {
6446
6439
  className: "flex h-24 w-full items-center justify-center",
6447
6440
  style: { backgroundColor: hex },
6448
- children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: clsx11.clsx("font-medium", isLightColor(hex) ? "text-primary-950" : "text-white"), children: name })
6441
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: clsx12.clsx("font-medium", isLightColor(hex) ? "text-primary-950" : "text-white"), children: name })
6449
6442
  }
6450
6443
  ),
6451
6444
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -7097,7 +7090,7 @@ function Separator4({
7097
7090
  decorative,
7098
7091
  orientation,
7099
7092
  className: cn(
7100
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
7093
+ "bg-primary-800/20 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
7101
7094
  className
7102
7095
  ),
7103
7096
  ...props
@@ -7213,7 +7206,7 @@ var toggleVariants = classVarianceAuthority.cva(styles3.base, {
7213
7206
  variants: {
7214
7207
  variant: {
7215
7208
  ghost: "",
7216
- outline: clsx11__default.default(styles3.outline)
7209
+ outline: clsx12__default.default(styles3.outline)
7217
7210
  },
7218
7211
  size: {
7219
7212
  default: "h-9 px-2 min-w-9",
@@ -7357,7 +7350,7 @@ function Heading({
7357
7350
  Element,
7358
7351
  {
7359
7352
  ...props,
7360
- className: clsx11__default.default(
7353
+ className: clsx12__default.default(
7361
7354
  className,
7362
7355
  trimClasses[trim],
7363
7356
  "m-0",
@@ -7372,7 +7365,7 @@ function Heading({
7372
7365
 
7373
7366
  // package.json
7374
7367
  var package_default = {
7375
- version: "1.22.0"};
7368
+ version: "1.23.4"};
7376
7369
  function Logo(props) {
7377
7370
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7378
7371
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "NSW Government" }),
@@ -7491,9 +7484,11 @@ function SiteSearch({ navigation: navigation$1 }) {
7491
7484
  function Header2({
7492
7485
  sitename,
7493
7486
  navigation,
7494
- version = false
7487
+ version = false,
7488
+ hide = {}
7495
7489
  }) {
7496
7490
  const [isScrolled, setIsScrolled] = React6.useState(false);
7491
+ const { search = false, themeSwitcher = false, github = false } = hide;
7497
7492
  React6.useEffect(() => {
7498
7493
  function onScroll() {
7499
7494
  setIsScrolled(window.scrollY > 0);
@@ -7507,7 +7502,7 @@ function Header2({
7507
7502
  return /* @__PURE__ */ jsxRuntime.jsxs(
7508
7503
  "header",
7509
7504
  {
7510
- className: clsx11__default.default(
7505
+ className: clsx12__default.default(
7511
7506
  "sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 dark:shadow-none",
7512
7507
  isScrolled ? "dark:bg-slate-900/95 dark:backdrop-blur-sm dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75" : "dark:bg-transparent"
7513
7508
  ),
@@ -7521,9 +7516,9 @@ function Header2({
7521
7516
  version && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "soft", color: "primary", className: "ml-2", children: package_default.version })
7522
7517
  ] }),
7523
7518
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex basis-0 justify-end gap-2 sm:gap-4 md:grow", children: [
7524
- /* @__PURE__ */ jsxRuntime.jsx(SiteSearch, { navigation }),
7525
- /* @__PURE__ */ jsxRuntime.jsx(ThemeSwitcher, {}),
7526
- /* @__PURE__ */ jsxRuntime.jsx(
7519
+ !search && /* @__PURE__ */ jsxRuntime.jsx(SiteSearch, { navigation }),
7520
+ !themeSwitcher && /* @__PURE__ */ jsxRuntime.jsx(ThemeSwitcher, {}),
7521
+ !github && /* @__PURE__ */ jsxRuntime.jsx(
7527
7522
  Button2,
7528
7523
  {
7529
7524
  variant: "surface",
@@ -7553,15 +7548,76 @@ function Input({ className, type, ...props }) {
7553
7548
  type,
7554
7549
  "data-slot": "input",
7555
7550
  className: cn(
7556
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-nsw-grey-200 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
7551
+ // Base styles
7552
+ "border-nsw-grey-200 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
7553
+ // Selection styles
7554
+ "selection:bg-primary selection:text-primary-foreground",
7555
+ // Placeholder styles
7556
+ "placeholder:text-muted-foreground",
7557
+ // File input styles
7558
+ "file:text-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
7559
+ // Focus styles
7557
7560
  "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
7561
+ // Disabled styles
7562
+ "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
7563
+ // aria-invalid styles
7558
7564
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
7565
+ // Dark mode styles
7566
+ "dark:bg-input/30",
7559
7567
  className
7560
7568
  ),
7561
7569
  ...props
7562
7570
  }
7563
7571
  );
7564
7572
  }
7573
+ function cn2(...inputs) {
7574
+ return tailwindMerge.twMerge(clsx12.clsx(inputs));
7575
+ }
7576
+ var sizeStyles = {
7577
+ sm: "text-sm",
7578
+ md: "text-base",
7579
+ lg: "text-lg"
7580
+ };
7581
+ var variantStyles = {
7582
+ disc: "list-disc pl-5",
7583
+ decimal: "list-decimal pl-5",
7584
+ icon: "list-none",
7585
+ none: "list-none"
7586
+ };
7587
+ var gapStyles = {
7588
+ sm: "space-y-1",
7589
+ md: "space-y-2",
7590
+ lg: "space-y-3"
7591
+ };
7592
+ var List2 = React6__namespace.forwardRef(
7593
+ ({ asChild, variant = "disc", size = "md", gap = "md", className, ...props }, ref) => {
7594
+ const Comp = asChild ? reactSlot.Slot : "ul";
7595
+ return /* @__PURE__ */ jsxRuntime.jsx(
7596
+ Comp,
7597
+ {
7598
+ ref,
7599
+ "data-slot": "list",
7600
+ className: cn2(sizeStyles[size], variantStyles[variant], gapStyles[gap], className),
7601
+ ...props
7602
+ }
7603
+ );
7604
+ }
7605
+ );
7606
+ List2.displayName = "List";
7607
+ var ListItem = React6__namespace.forwardRef(
7608
+ ({ icon, className, children, ...props }, ref) => {
7609
+ if (icon) {
7610
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { ref, "data-slot": "list-item", className: cn2("flex gap-2", className), ...props, children: [
7611
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5", children: icon }),
7612
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children })
7613
+ ] });
7614
+ }
7615
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { ref, "data-slot": "list-item", className: cn2(className), ...props, children });
7616
+ }
7617
+ );
7618
+ ListItem.displayName = "List.Item";
7619
+ var _List = List2;
7620
+ _List.Item = ListItem;
7565
7621
  function Masthead() {
7566
7622
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-primary h-[var(--masthead-height)] w-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex w-full items-center justify-between px-4 py-2 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-x-12", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-white", children: "A NSW Government website" }) }) }) });
7567
7623
  }
@@ -7778,7 +7834,7 @@ function Navigation({
7778
7834
  navigation: navigation$1
7779
7835
  }) {
7780
7836
  const pathname = navigation.usePathname();
7781
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx11__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "flex flex-col gap-9", children: navigation$1.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
7837
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx12__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "flex flex-col gap-9", children: navigation$1.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
7782
7838
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display text-foreground font-medium dark:text-white", children: section.title }),
7783
7839
  /* @__PURE__ */ jsxRuntime.jsx(
7784
7840
  "ul",
@@ -7790,7 +7846,7 @@ function Navigation({
7790
7846
  {
7791
7847
  href: link.href,
7792
7848
  onClick: onLinkClick,
7793
- className: clsx11__default.default(
7849
+ className: clsx12__default.default(
7794
7850
  "text-foreground inline-block border-l border-transparent pl-5 text-base/8 sm:pl-4 sm:text-sm/6",
7795
7851
  "hover:border-nsw-grey-950 hover:text-nsw-gray-950 hover:font-semibold",
7796
7852
  "dark:text-nsw-grey-400",
@@ -8047,7 +8103,7 @@ function PrevNextLinksPageLink({
8047
8103
  Link3__default.default,
8048
8104
  {
8049
8105
  href,
8050
- className: clsx11__default.default(
8106
+ className: clsx12__default.default(
8051
8107
  "flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300",
8052
8108
  dir === "previous" && "flex-row-reverse"
8053
8109
  ),
@@ -8056,7 +8112,7 @@ function PrevNextLinksPageLink({
8056
8112
  /* @__PURE__ */ jsxRuntime.jsx(
8057
8113
  Icons.east,
8058
8114
  {
8059
- className: clsx11__default.default("size-5 flex-none fill-current", dir === "previous" && "-scale-x-100")
8115
+ className: clsx12__default.default("size-5 flex-none fill-current", dir === "previous" && "-scale-x-100")
8060
8116
  }
8061
8117
  )
8062
8118
  ]
@@ -8296,7 +8352,7 @@ function SidebarNavigation({
8296
8352
  navigation: navigation$1
8297
8353
  }) {
8298
8354
  const pathname = navigation.usePathname();
8299
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx11__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "flex flex-col gap-9", children: navigation$1.map((section, sectionIndex) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8355
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx12__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "flex flex-col gap-9", children: navigation$1.map((section, sectionIndex) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8300
8356
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display text-foreground font-medium dark:text-white", children: section.title }),
8301
8357
  /* @__PURE__ */ jsxRuntime.jsx(
8302
8358
  "ul",
@@ -8321,7 +8377,7 @@ function SidebarNavigation({
8321
8377
  function SidebarLink({ link, pathname, onLinkClick, depth }) {
8322
8378
  const hasChildren = Array.isArray(link.links) && link.links.length > 0;
8323
8379
  const isActive = pathname === link.href;
8324
- const baseLinkClasses = clsx11__default.default(
8380
+ const baseLinkClasses = clsx12__default.default(
8325
8381
  "border-l border-transparent pl-4 pr-2 text-base/8 sm:text-sm/6 w-full text-left py-1 rounded-r-md cursor-pointer",
8326
8382
  "hover:border-nsw-grey-950 hover:text-nsw-gray-950 hover:font-semibold hover:bg-primary-800/10",
8327
8383
  "dark:text-nsw-grey-400 dark:hover:border-nsw-grey-400 dark:hover:text-white",
@@ -8331,13 +8387,13 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
8331
8387
  /* @__PURE__ */ jsxRuntime.jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
8332
8388
  "button",
8333
8389
  {
8334
- className: clsx11__default.default(baseLinkClasses, "group flex items-center justify-between gap-1"),
8390
+ className: clsx12__default.default(baseLinkClasses, "group flex items-center justify-between gap-1"),
8335
8391
  children: [
8336
8392
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: link.title }),
8337
8393
  /* @__PURE__ */ jsxRuntime.jsx(
8338
8394
  Icons.chevron_right,
8339
8395
  {
8340
- className: clsx11__default.default(
8396
+ className: clsx12__default.default(
8341
8397
  "ml-2 size-5 transition-transform duration-200",
8342
8398
  "group-data-[state=open]:rotate-90"
8343
8399
  )
@@ -8349,7 +8405,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
8349
8405
  /* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx(
8350
8406
  "ul",
8351
8407
  {
8352
- className: clsx11__default.default(
8408
+ className: clsx12__default.default(
8353
8409
  "border-nsw-grey-400 dark:border-nsw-grey-200/15 mt-2 ml-5 flex flex-col gap-1 border-l pl-0"
8354
8410
  ),
8355
8411
  children: link.links && link.links.map((childLink) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -8648,7 +8704,7 @@ function TableOfContents({ tableOfContents }) {
8648
8704
  Link3__default.default,
8649
8705
  {
8650
8706
  href: `#${section.id}`,
8651
- className: clsx11__default.default(
8707
+ className: clsx12__default.default(
8652
8708
  isActive(section) ? "text-primary font-semibold" : "font-normal text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-300"
8653
8709
  ),
8654
8710
  children: section.title
@@ -8771,7 +8827,7 @@ function Text({ className, trim = "normal", size = 2, label = false, ...props })
8771
8827
  {
8772
8828
  "data-slot": "text",
8773
8829
  ...props,
8774
- className: clsx11__default.default(className, trimClasses[trim], "text-grey-800 dark:text-grey-400", sizeClass)
8830
+ className: clsx12__default.default(className, trimClasses[trim], "text-grey-800 dark:text-grey-400", sizeClass)
8775
8831
  }
8776
8832
  );
8777
8833
  }
@@ -8780,7 +8836,7 @@ function TextLink({ className, ...props }) {
8780
8836
  Link,
8781
8837
  {
8782
8838
  ...props,
8783
- className: clsx11__default.default(
8839
+ className: clsx12__default.default(
8784
8840
  className,
8785
8841
  "text-primary-800 decoration-primary-800/50 data-hover:decoration-primary-800 underline dark:text-white dark:decoration-white/50 dark:data-hover:decoration-white"
8786
8842
  )
@@ -8788,14 +8844,14 @@ function TextLink({ className, ...props }) {
8788
8844
  );
8789
8845
  }
8790
8846
  function Strong({ className, ...props }) {
8791
- return /* @__PURE__ */ jsxRuntime.jsx("strong", { ...props, className: clsx11__default.default(className, "text-grey-950 font-medium dark:text-white") });
8847
+ return /* @__PURE__ */ jsxRuntime.jsx("strong", { ...props, className: clsx12__default.default(className, "text-grey-950 font-medium dark:text-white") });
8792
8848
  }
8793
8849
  function Code({ className, ...props }) {
8794
8850
  return /* @__PURE__ */ jsxRuntime.jsx(
8795
8851
  "code",
8796
8852
  {
8797
8853
  ...props,
8798
- className: clsx11__default.default(
8854
+ className: clsx12__default.default(
8799
8855
  className,
8800
8856
  "border-grey-950/10 bg-grey-950/[2.5%] text-grey-950 rounded-sm border px-0.5 text-sm font-medium sm:text-[0.8125rem] dark:border-white/20 dark:bg-white/5 dark:text-white"
8801
8857
  )
@@ -9183,6 +9239,7 @@ exports.Icons = Icons;
9183
9239
  exports.Input = Input;
9184
9240
  exports.Label = Label3;
9185
9241
  exports.Link = Link;
9242
+ exports.List = _List;
9186
9243
  exports.Logo = Logo;
9187
9244
  exports.Masthead = Masthead;
9188
9245
  exports.Menubar = Menubar;
@@ -9312,6 +9369,7 @@ exports.getColorValue = getColorValue;
9312
9369
  exports.getHeadings = getHeadings;
9313
9370
  exports.getNodeText = getNodeText;
9314
9371
  exports.getSurroundingColors = getSurroundingColors;
9372
+ exports.humaniseVariant = humaniseVariant;
9315
9373
  exports.interpolateColors = interpolateColors;
9316
9374
  exports.isLightColor = isLightColor;
9317
9375
  exports.kebabCase = kebabCase;