@nswds/app 1.73.0 → 1.74.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.d.cts CHANGED
@@ -1204,9 +1204,7 @@ type HeadingProps = ({
1204
1204
  level?: 1 | 2 | 3 | 4 | 5 | 6;
1205
1205
  trim?: 'normal' | 'start' | 'end' | 'both';
1206
1206
  } & BaseProps$1);
1207
- declare function Heading({ className, trim, id, size, level, display, children, ...props }: HeadingProps & {
1208
- id?: string;
1209
- }): react_jsx_runtime.JSX.Element;
1207
+ declare function Heading({ className, trim, size, level, display, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
1210
1208
 
1211
1209
  declare const heroBannerVariants: (props?: ({
1212
1210
  variant?: "white" | "primary-800" | "grey-150" | "accent-800" | "primary-200" | null | undefined;
package/dist/index.d.ts CHANGED
@@ -1204,9 +1204,7 @@ type HeadingProps = ({
1204
1204
  level?: 1 | 2 | 3 | 4 | 5 | 6;
1205
1205
  trim?: 'normal' | 'start' | 'end' | 'both';
1206
1206
  } & BaseProps$1);
1207
- declare function Heading({ className, trim, id, size, level, display, children, ...props }: HeadingProps & {
1208
- id?: string;
1209
- }): react_jsx_runtime.JSX.Element;
1207
+ declare function Heading({ className, trim, size, level, display, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
1210
1208
 
1211
1209
  declare const heroBannerVariants: (props?: ({
1212
1210
  variant?: "white" | "primary-800" | "grey-150" | "accent-800" | "primary-200" | null | undefined;
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { twMerge } from 'tailwind-merge';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
7
7
  import * as React5 from 'react';
8
- import React5__default, { forwardRef, useEffect, createContext, useState, useContext, useMemo, useRef, useInsertionEffect, useLayoutEffect, Fragment as Fragment$1, createElement, useCallback, Suspense, useId, Children, Component } from 'react';
8
+ import React5__default, { forwardRef, useEffect, createContext, useState, useContext, useMemo, useRef, useInsertionEffect, useLayoutEffect, Fragment as Fragment$1, createElement, useCallback, Suspense, useId, Component } from 'react';
9
9
  import * as Headless4 from '@headlessui/react';
10
10
  import { PopoverGroup, Popover as Popover$1, PopoverButton, PopoverPanel, Dialog as Dialog$1, DialogPanel } from '@headlessui/react';
11
11
  import Link12 from 'next/link';
@@ -51,7 +51,6 @@ import { Drawer as Drawer$1 } from 'vaul';
51
51
  import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
52
52
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
53
53
  import * as TogglePrimitive from '@radix-ui/react-toggle';
54
- import { slugifyWithCounter } from '@sindresorhus/slugify';
55
54
  import Image2 from 'next/image';
56
55
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
57
56
  import { OTPInput, OTPInputContext } from 'input-otp';
@@ -61,6 +60,7 @@ import * as ProgressPrimitive from '@radix-ui/react-progress';
61
60
  import { tv } from 'tailwind-variants';
62
61
  import * as ResizablePrimitive from 'react-resizable-panels';
63
62
  import * as SliderPrimitive from '@radix-ui/react-slider';
63
+ import { slugifyWithCounter } from '@sindresorhus/slugify';
64
64
  import { create } from 'zustand';
65
65
  import { persist, createJSONStorage } from 'zustand/middleware';
66
66
 
@@ -17412,36 +17412,16 @@ function FormatToggle({ format, setFormat }) {
17412
17412
 
17413
17413
  // package.json
17414
17414
  var package_default = {
17415
- version: "1.72.4"};
17416
- function isReactElement(child) {
17417
- return typeof child === "object" && child !== null && "props" in child;
17418
- }
17419
- function textFromChildren(node) {
17420
- let out = "";
17421
- Children.forEach(node, (child) => {
17422
- if (typeof child === "string" || typeof child === "number") {
17423
- out += String(child);
17424
- } else if (isReactElement(child) && child.props && typeof child.props === "object" && "children" in child.props) {
17425
- out += textFromChildren(child.props.children);
17426
- }
17427
- });
17428
- return out.trim();
17429
- }
17415
+ version: "1.73.0"};
17430
17416
  function Heading({
17431
17417
  className,
17432
17418
  trim = "normal",
17433
- id: id3,
17434
17419
  size = 1,
17435
17420
  level = 1,
17436
17421
  display = false,
17437
- children,
17438
17422
  ...props
17439
17423
  }) {
17440
17424
  const Element2 = `h${level}`;
17441
- const slugify = slugifyWithCounter();
17442
- const computedId = id3 ?? slugify(textFromChildren(children));
17443
- if (typeof window === "undefined") console.log("SSR id:", id3);
17444
- else console.log("Client id:", id3);
17445
17425
  const headingSizeClasses = {
17446
17426
  1: "text-[calc(var(--heading-font-size-1)_*_var(--heading-font-size-adjust))] leading-[var(--line-height-52)] tracking-[calc(var(--heading-letter-spacing-2)_+_var(--heading-letter-spacing))]",
17447
17427
  2: "text-[calc(var(--heading-font-size-2)_*_var(--heading-font-size-adjust))] leading-[var(--line-height-44)] tracking-[calc(var(--heading-letter-spacing-2)_+_var(--heading-letter-spacing))]",
@@ -17477,7 +17457,6 @@ function Heading({
17477
17457
  Element2,
17478
17458
  {
17479
17459
  ...props,
17480
- id: computedId,
17481
17460
  className: clsx12(
17482
17461
  className,
17483
17462
  trimClasses[trim],
@@ -17486,8 +17465,7 @@ function Heading({
17486
17465
  "[--leading-trim-end:var(--heading-leading-trim-end)] [--leading-trim-start:var(--heading-leading-trim-start)]",
17487
17466
  "text-primary-800 dark:text-white",
17488
17467
  sizeClass
17489
- ),
17490
- children
17468
+ )
17491
17469
  }
17492
17470
  );
17493
17471
  }