@nswds/app 0.1.15 → 1.7.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.ts CHANGED
@@ -1,199 +1,308 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as React$1 from 'react';
4
- import React__default from 'react';
5
- import { VariantProps } from 'class-variance-authority';
6
- import { ClassValue } from 'clsx';
7
- import * as _sindresorhus_slugify from '@sindresorhus/slugify';
8
-
9
- declare const buttonVariants: (props?: ({
10
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
11
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
12
- } & class_variance_authority_types.ClassProp) | undefined) => string;
13
- declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
14
- asChild?: boolean;
15
- }): react_jsx_runtime.JSX.Element;
1
+ import * as react_jsx_runtime from 'react/jsx-runtime'
2
+ import * as class_variance_authority_types from 'class-variance-authority/types'
3
+ import * as React$1 from 'react'
4
+ import React__default, { ReactNode } from 'react'
5
+ import { VariantProps } from 'class-variance-authority'
6
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'
7
+ import * as TabsPrimitive from '@radix-ui/react-tabs'
8
+ import { ThemeProviderProps } from 'next-themes'
9
+ import { ClassValue } from 'clsx'
10
+ import * as _sindresorhus_slugify from '@sindresorhus/slugify'
11
+
12
+ declare const buttonVariants: (
13
+ props?:
14
+ | ({
15
+ variant?:
16
+ | 'default'
17
+ | 'destructive'
18
+ | 'outline'
19
+ | 'secondary'
20
+ | 'ghost'
21
+ | 'link'
22
+ | null
23
+ | undefined
24
+ size?: 'default' | 'sm' | 'lg' | 'icon' | null | undefined
25
+ } & class_variance_authority_types.ClassProp)
26
+ | undefined,
27
+ ) => string
28
+ declare function Button({
29
+ className,
30
+ variant,
31
+ size,
32
+ asChild,
33
+ ...props
34
+ }: React$1.ComponentProps<'button'> &
35
+ VariantProps<typeof buttonVariants> & {
36
+ asChild?: boolean
37
+ }): react_jsx_runtime.JSX.Element
16
38
 
17
39
  interface DynamicFaviconProps {
18
- lightModeFavicon: string;
19
- darkModeFavicon: string;
40
+ lightModeFavicon: string
41
+ darkModeFavicon: string
20
42
  }
21
- declare function DynamicFavicon({ lightModeFavicon, darkModeFavicon }: DynamicFaviconProps): null;
43
+ declare function DynamicFavicon({ lightModeFavicon, darkModeFavicon }: DynamicFaviconProps): null
22
44
 
23
- declare function Footer(): react_jsx_runtime.JSX.Element;
45
+ declare function Footer(): react_jsx_runtime.JSX.Element
24
46
 
25
- type IconProps = React.HTMLAttributes<SVGElement>;
47
+ type IconProps = React.HTMLAttributes<SVGElement>
26
48
  declare const Icons: {
27
- logo: (props: IconProps) => react_jsx_runtime.JSX.Element;
28
- github: (props: IconProps) => react_jsx_runtime.JSX.Element;
29
- linkedin: (props: IconProps) => react_jsx_runtime.JSX.Element;
30
- twitter: (props: IconProps) => react_jsx_runtime.JSX.Element;
31
- youtube: (props: IconProps) => react_jsx_runtime.JSX.Element;
32
- account_circle: (props: IconProps) => react_jsx_runtime.JSX.Element;
33
- attach_file: (props: IconProps) => react_jsx_runtime.JSX.Element;
34
- cancel: (props: IconProps) => react_jsx_runtime.JSX.Element;
35
- check_circle: (props: IconProps) => react_jsx_runtime.JSX.Element;
36
- check: (props: IconProps) => react_jsx_runtime.JSX.Element;
37
- chevron_down: (props: IconProps) => react_jsx_runtime.JSX.Element;
38
- chevron_left: (props: IconProps) => react_jsx_runtime.JSX.Element;
39
- chevron_right: (props: IconProps) => react_jsx_runtime.JSX.Element;
40
- chevron_up: (props: IconProps) => react_jsx_runtime.JSX.Element;
41
- close: (props: IconProps) => react_jsx_runtime.JSX.Element;
42
- collapse_all: (props: IconProps) => react_jsx_runtime.JSX.Element;
43
- computer: (props: IconProps) => react_jsx_runtime.JSX.Element;
44
- copy: (props: IconProps) => react_jsx_runtime.JSX.Element;
45
- dark_mode: (props: IconProps) => react_jsx_runtime.JSX.Element;
46
- dock_to_left: (props: IconProps) => react_jsx_runtime.JSX.Element;
47
- dock_to_right: (props: IconProps) => react_jsx_runtime.JSX.Element;
48
- delete: (props: IconProps) => react_jsx_runtime.JSX.Element;
49
- desktop: (props: IconProps) => react_jsx_runtime.JSX.Element;
50
- display_settings: (props: IconProps) => react_jsx_runtime.JSX.Element;
51
- double_arrow_left: (props: IconProps) => react_jsx_runtime.JSX.Element;
52
- double_arrow_right: (props: IconProps) => react_jsx_runtime.JSX.Element;
53
- download: (props: IconProps) => react_jsx_runtime.JSX.Element;
54
- east: (props: IconProps) => react_jsx_runtime.JSX.Element;
55
- error: (props: IconProps) => react_jsx_runtime.JSX.Element;
56
- exclamation: (props: IconProps) => react_jsx_runtime.JSX.Element;
57
- help: (props: IconProps) => react_jsx_runtime.JSX.Element;
58
- info: (props: IconProps) => react_jsx_runtime.JSX.Element;
59
- light_mode: (props: IconProps) => react_jsx_runtime.JSX.Element;
60
- link: (props: IconProps) => react_jsx_runtime.JSX.Element;
61
- login: (props: IconProps) => react_jsx_runtime.JSX.Element;
62
- logout: (props: IconProps) => react_jsx_runtime.JSX.Element;
63
- menu: (props: IconProps) => react_jsx_runtime.JSX.Element;
64
- more_horiz: (props: IconProps) => react_jsx_runtime.JSX.Element;
65
- more_vert: (props: IconProps) => react_jsx_runtime.JSX.Element;
66
- north: (props: IconProps) => react_jsx_runtime.JSX.Element;
67
- open_in_new: (props: IconProps) => react_jsx_runtime.JSX.Element;
68
- print: (props: IconProps) => react_jsx_runtime.JSX.Element;
69
- progress_activity: (props: IconProps) => react_jsx_runtime.JSX.Element;
70
- remove: (props: IconProps) => react_jsx_runtime.JSX.Element;
71
- search: (props: IconProps) => react_jsx_runtime.JSX.Element;
72
- settings_brightness: (props: IconProps) => react_jsx_runtime.JSX.Element;
73
- share: (props: IconProps) => react_jsx_runtime.JSX.Element;
74
- side_navigation: (props: IconProps) => react_jsx_runtime.JSX.Element;
75
- south: (props: IconProps) => react_jsx_runtime.JSX.Element;
76
- unfold_less: (props: IconProps) => react_jsx_runtime.JSX.Element;
77
- unfold_more: (props: IconProps) => react_jsx_runtime.JSX.Element;
78
- upload: (props: IconProps) => react_jsx_runtime.JSX.Element;
79
- west: (props: IconProps) => react_jsx_runtime.JSX.Element;
80
- };
49
+ logo: (props: IconProps) => react_jsx_runtime.JSX.Element
50
+ github: (props: IconProps) => react_jsx_runtime.JSX.Element
51
+ linkedin: (props: IconProps) => react_jsx_runtime.JSX.Element
52
+ twitter: (props: IconProps) => react_jsx_runtime.JSX.Element
53
+ youtube: (props: IconProps) => react_jsx_runtime.JSX.Element
54
+ account_circle: (props: IconProps) => react_jsx_runtime.JSX.Element
55
+ attach_file: (props: IconProps) => react_jsx_runtime.JSX.Element
56
+ cancel: (props: IconProps) => react_jsx_runtime.JSX.Element
57
+ check_circle: (props: IconProps) => react_jsx_runtime.JSX.Element
58
+ check: (props: IconProps) => react_jsx_runtime.JSX.Element
59
+ chevron_down: (props: IconProps) => react_jsx_runtime.JSX.Element
60
+ chevron_left: (props: IconProps) => react_jsx_runtime.JSX.Element
61
+ chevron_right: (props: IconProps) => react_jsx_runtime.JSX.Element
62
+ chevron_up: (props: IconProps) => react_jsx_runtime.JSX.Element
63
+ close: (props: IconProps) => react_jsx_runtime.JSX.Element
64
+ collapse_all: (props: IconProps) => react_jsx_runtime.JSX.Element
65
+ computer: (props: IconProps) => react_jsx_runtime.JSX.Element
66
+ copy: (props: IconProps) => react_jsx_runtime.JSX.Element
67
+ dark_mode: (props: IconProps) => react_jsx_runtime.JSX.Element
68
+ dock_to_left: (props: IconProps) => react_jsx_runtime.JSX.Element
69
+ dock_to_right: (props: IconProps) => react_jsx_runtime.JSX.Element
70
+ delete: (props: IconProps) => react_jsx_runtime.JSX.Element
71
+ desktop: (props: IconProps) => react_jsx_runtime.JSX.Element
72
+ display_settings: (props: IconProps) => react_jsx_runtime.JSX.Element
73
+ double_arrow_left: (props: IconProps) => react_jsx_runtime.JSX.Element
74
+ double_arrow_right: (props: IconProps) => react_jsx_runtime.JSX.Element
75
+ download: (props: IconProps) => react_jsx_runtime.JSX.Element
76
+ east: (props: IconProps) => react_jsx_runtime.JSX.Element
77
+ error: (props: IconProps) => react_jsx_runtime.JSX.Element
78
+ exclamation: (props: IconProps) => react_jsx_runtime.JSX.Element
79
+ help: (props: IconProps) => react_jsx_runtime.JSX.Element
80
+ info: (props: IconProps) => react_jsx_runtime.JSX.Element
81
+ light_mode: (props: IconProps) => react_jsx_runtime.JSX.Element
82
+ link: (props: IconProps) => react_jsx_runtime.JSX.Element
83
+ login: (props: IconProps) => react_jsx_runtime.JSX.Element
84
+ logout: (props: IconProps) => react_jsx_runtime.JSX.Element
85
+ menu: (props: IconProps) => react_jsx_runtime.JSX.Element
86
+ more_horiz: (props: IconProps) => react_jsx_runtime.JSX.Element
87
+ more_vert: (props: IconProps) => react_jsx_runtime.JSX.Element
88
+ north: (props: IconProps) => react_jsx_runtime.JSX.Element
89
+ open_in_new: (props: IconProps) => react_jsx_runtime.JSX.Element
90
+ print: (props: IconProps) => react_jsx_runtime.JSX.Element
91
+ progress_activity: (props: IconProps) => react_jsx_runtime.JSX.Element
92
+ remove: (props: IconProps) => react_jsx_runtime.JSX.Element
93
+ search: (props: IconProps) => react_jsx_runtime.JSX.Element
94
+ settings_brightness: (props: IconProps) => react_jsx_runtime.JSX.Element
95
+ share: (props: IconProps) => react_jsx_runtime.JSX.Element
96
+ side_navigation: (props: IconProps) => react_jsx_runtime.JSX.Element
97
+ south: (props: IconProps) => react_jsx_runtime.JSX.Element
98
+ unfold_less: (props: IconProps) => react_jsx_runtime.JSX.Element
99
+ unfold_more: (props: IconProps) => react_jsx_runtime.JSX.Element
100
+ upload: (props: IconProps) => react_jsx_runtime.JSX.Element
101
+ west: (props: IconProps) => react_jsx_runtime.JSX.Element
102
+ }
103
+
104
+ declare function Logo(props: React.ComponentPropsWithoutRef<'svg'>): react_jsx_runtime.JSX.Element
81
105
 
106
+ declare function Masthead(): react_jsx_runtime.JSX.Element
107
+
108
+ type Link = {
109
+ href: string
110
+ title: string
111
+ links?: Link[]
112
+ }
82
113
  interface ColorData {
83
- oklch: string;
84
- hex: string;
85
- rgb: string;
86
- hsl: string;
87
- [key: string]: string;
88
- }
89
- type Format = 'hex' | 'oklch' | 'hsl' | 'rgb';
90
- type Variant = 'shades' | 'theme';
91
- type Output = 'css' | 'ts' | 'scss' | 'less' | 'tailwind' | 'json' | 'json-DTFM' | 'js';
114
+ oklch: string
115
+ hex: string
116
+ rgb: string
117
+ hsl: string
118
+ [key: string]: string
119
+ }
120
+ type Format = 'hex' | 'oklch' | 'hsl' | 'rgb'
121
+ type Variant = 'shades' | 'theme'
122
+ type Output = 'css' | 'ts' | 'scss' | 'less' | 'tailwind' | 'json' | 'json-DTFM' | 'js'
92
123
  interface ColorsDisplayProps {
93
- baseColors: string[];
94
- themeColor: string | undefined;
95
- colorsToUse: ColorData[];
96
- paletteName: string;
97
- variant: Variant;
124
+ baseColors: string[]
125
+ themeColor: string | undefined
126
+ colorsToUse: ColorData[]
127
+ paletteName: string
128
+ variant: Variant
98
129
  }
99
130
  interface ColourOutputProps {
100
- colorsToUse: ColorData[];
101
- paletteName: string;
102
- format: Format;
103
- output: Output;
104
- variant: Variant;
131
+ colorsToUse: ColorData[]
132
+ paletteName: string
133
+ format: Format
134
+ output: Output
135
+ variant: Variant
105
136
  }
106
137
  interface DesignTokensShades {
107
- [paletteName: string]: {
108
- [shade: string]: {
109
- $type: 'color';
110
- $value: string | {
111
- colorSpace: string;
112
- channels: number[];
113
- alpha: number;
114
- };
115
- };
116
- };
138
+ [paletteName: string]: {
139
+ [shade: string]: {
140
+ $type: 'color'
141
+ $value:
142
+ | string
143
+ | {
144
+ colorSpace: string
145
+ channels: number[]
146
+ alpha: number
147
+ }
148
+ }
149
+ }
117
150
  }
118
151
  interface StructuredColor {
119
- colorSpace: string;
120
- channels: number[];
121
- alpha: number;
152
+ colorSpace: string
153
+ channels: number[]
154
+ alpha: number
122
155
  }
123
156
  interface DesignTokensTheme {
124
- [paletteName: string]: {
125
- value: string | StructuredColor;
126
- type: 'color';
127
- variants: Record<string, {
128
- value: string | StructuredColor;
129
- type: 'color';
130
- }>;
131
- };
157
+ [paletteName: string]: {
158
+ value: string | StructuredColor
159
+ type: 'color'
160
+ variants: Record<
161
+ string,
162
+ {
163
+ value: string | StructuredColor
164
+ type: 'color'
165
+ }
166
+ >
167
+ }
132
168
  }
133
169
  type NavigationSection = {
134
- title: string;
135
- links: {
136
- title: string;
137
- href: string;
138
- }[];
139
- };
140
-
141
- declare const defaultNavigation: NavigationSection[];
142
- interface LayoutProps {
143
- children: React__default.ReactNode;
144
- sitename?: string;
145
- navigation?: NavigationSection[];
170
+ title: string
171
+ links: {
172
+ title: string
173
+ href: string
174
+ }[]
146
175
  }
147
- declare function Layout({ children, sitename, navigation }: LayoutProps): react_jsx_runtime.JSX.Element;
148
-
149
- declare function Logo(props: React.ComponentPropsWithoutRef<'svg'>): react_jsx_runtime.JSX.Element;
150
176
 
151
- declare function Masthead(): react_jsx_runtime.JSX.Element;
152
-
153
- declare function Navigation({ className, onLinkClick, navigation, }: {
154
- className?: string;
155
- onLinkClick?: React__default.MouseEventHandler<HTMLAnchorElement>;
156
- navigation: NavigationSection[];
157
- }): react_jsx_runtime.JSX.Element;
177
+ declare function Navigation({
178
+ className,
179
+ onLinkClick,
180
+ navigation,
181
+ }: {
182
+ className?: string
183
+ onLinkClick?: React__default.MouseEventHandler<HTMLAnchorElement>
184
+ navigation: NavigationSection[]
185
+ }): react_jsx_runtime.JSX.Element
158
186
 
159
187
  interface PrevNextLinksProps {
160
- navigation: NavigationSection[];
188
+ navigation: NavigationSection[]
161
189
  }
162
- declare function PrevNextLinks({ navigation }: PrevNextLinksProps): react_jsx_runtime.JSX.Element | null;
190
+ declare function PrevNextLinks({
191
+ navigation,
192
+ }: PrevNextLinksProps): react_jsx_runtime.JSX.Element | null
163
193
 
164
194
  type TableOfContentsItem = {
165
- id: string;
166
- children: TableOfContentsItem[];
167
- title: string;
168
- };
195
+ id: string
196
+ children: TableOfContentsItem[]
197
+ title: string
198
+ }
169
199
  type TableOfContentsProps = {
170
- tableOfContents: TableOfContentsItem[];
171
- };
172
- declare function TableOfContents({ tableOfContents }: TableOfContentsProps): react_jsx_runtime.JSX.Element;
200
+ tableOfContents: TableOfContentsItem[]
201
+ }
202
+ declare function TableOfContents({
203
+ tableOfContents,
204
+ }: TableOfContentsProps): react_jsx_runtime.JSX.Element
205
+
206
+ declare function ThemeSwitcher(): react_jsx_runtime.JSX.Element
207
+
208
+ declare function Collapsible({
209
+ ...props
210
+ }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element
211
+
212
+ declare function SidebarNavigation({
213
+ className,
214
+ onLinkClick,
215
+ navigation,
216
+ }: {
217
+ className?: string
218
+ onLinkClick?: React$1.MouseEventHandler<HTMLAnchorElement>
219
+ navigation: NavigationSection[]
220
+ }): react_jsx_runtime.JSX.Element
221
+
222
+ declare function Tabs({
223
+ className,
224
+ ...props
225
+ }: React$1.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element
226
+ declare function TabsList({
227
+ className,
228
+ ...props
229
+ }: React$1.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element
230
+ declare function TabsTrigger({
231
+ className,
232
+ ...props
233
+ }: React$1.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element
234
+ declare function TabsContent({
235
+ className,
236
+ ...props
237
+ }: React$1.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element
173
238
 
174
- declare function ThemeSwitcher(): react_jsx_runtime.JSX.Element;
239
+ declare function ThemeProvider({
240
+ children,
241
+ ...props
242
+ }: ThemeProviderProps): react_jsx_runtime.JSX.Element
175
243
 
176
- declare function cn(...inputs: ClassValue[]): string;
177
- declare function truncate(text: string, maxLength: number): string;
178
- declare function kebabCase(str: string): string;
179
- declare function camelCase(str: string): string;
244
+ declare function TocProvider({ children }: { children: ReactNode }): react_jsx_runtime.JSX.Element
245
+
246
+ declare function cn(...inputs: ClassValue[]): string
247
+ declare function truncate(text: string, maxLength: number): string
248
+ declare function kebabCase(str: string): string
249
+ declare function camelCase(str: string): string
180
250
 
181
251
  type SimpleNode = {
182
- type: string;
183
- attributes: {
184
- content?: string;
185
- [key: string]: string | number | boolean | undefined;
186
- };
187
- children?: SimpleNode[];
188
- };
252
+ type: string
253
+ attributes: {
254
+ content?: string
255
+ [key: string]: string | number | boolean | undefined
256
+ }
257
+ children?: SimpleNode[]
258
+ }
189
259
  type HeadingNode = {
190
- level: number;
191
- id: string;
192
- title: string;
193
- children: HeadingNode[];
194
- };
195
- declare function getNodeText(node: HTMLElement | SimpleNode): string;
196
- declare function domToSimple(node: Node): SimpleNode;
197
- declare function getHeadings(slugify?: _sindresorhus_slugify.CountableSlugify): HeadingNode[];
198
-
199
- export { Button, type ColorData, type ColorsDisplayProps, type ColourOutputProps, type DesignTokensShades, type DesignTokensTheme, DynamicFavicon, Footer, type Format, type HeadingNode, Icons, Layout, Logo, Masthead, Navigation, type NavigationSection, type Output, PrevNextLinks, type SimpleNode, type StructuredColor, TableOfContents, ThemeSwitcher, type Variant, camelCase, cn, defaultNavigation, domToSimple, getHeadings, getNodeText, kebabCase, truncate };
260
+ level: number
261
+ id: string
262
+ title: string
263
+ children: HeadingNode[]
264
+ }
265
+ declare function getNodeText(node: HTMLElement | SimpleNode): string
266
+ declare function domToSimple(node: Node): SimpleNode
267
+ declare function getHeadings(slugify?: _sindresorhus_slugify.CountableSlugify): HeadingNode[]
268
+
269
+ export {
270
+ Button,
271
+ Collapsible,
272
+ type ColorData,
273
+ type ColorsDisplayProps,
274
+ type ColourOutputProps,
275
+ type DesignTokensShades,
276
+ type DesignTokensTheme,
277
+ DynamicFavicon,
278
+ Footer,
279
+ type Format,
280
+ type HeadingNode,
281
+ Icons,
282
+ type Link,
283
+ Logo,
284
+ Masthead,
285
+ Navigation,
286
+ type NavigationSection,
287
+ type Output,
288
+ PrevNextLinks,
289
+ SidebarNavigation,
290
+ type SimpleNode,
291
+ type StructuredColor,
292
+ TableOfContents,
293
+ Tabs,
294
+ TabsContent,
295
+ TabsList,
296
+ TabsTrigger,
297
+ ThemeProvider,
298
+ ThemeSwitcher,
299
+ TocProvider,
300
+ type Variant,
301
+ camelCase,
302
+ cn,
303
+ domToSimple,
304
+ getHeadings,
305
+ getNodeText,
306
+ kebabCase,
307
+ truncate,
308
+ }