@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/globals.css +453 -3909
- package/dist/index.cjs +1160 -531
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +276 -167
- package/dist/index.d.ts +276 -167
- package/dist/index.js +1120 -509
- package/dist/index.js.map +1 -1
- package/dist/styles.css +515 -3940
- package/dist/styles.css.map +1 -1
- package/dist/styles.d.cts +1 -2
- package/dist/styles.d.ts +1 -2
- package/package.json +11 -8
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
|
|
7
|
-
import * as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
124
|
+
baseColors: string[]
|
|
125
|
+
themeColor: string | undefined
|
|
126
|
+
colorsToUse: ColorData[]
|
|
127
|
+
paletteName: string
|
|
128
|
+
variant: Variant
|
|
98
129
|
}
|
|
99
130
|
interface ColourOutputProps {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
131
|
+
colorsToUse: ColorData[]
|
|
132
|
+
paletteName: string
|
|
133
|
+
format: Format
|
|
134
|
+
output: Output
|
|
135
|
+
variant: Variant
|
|
105
136
|
}
|
|
106
137
|
interface DesignTokensShades {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
colorSpace: string
|
|
153
|
+
channels: number[]
|
|
154
|
+
alpha: number
|
|
122
155
|
}
|
|
123
156
|
interface DesignTokensTheme {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
188
|
+
navigation: NavigationSection[]
|
|
161
189
|
}
|
|
162
|
-
declare function PrevNextLinks({
|
|
190
|
+
declare function PrevNextLinks({
|
|
191
|
+
navigation,
|
|
192
|
+
}: PrevNextLinksProps): react_jsx_runtime.JSX.Element | null
|
|
163
193
|
|
|
164
194
|
type TableOfContentsItem = {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
195
|
+
id: string
|
|
196
|
+
children: TableOfContentsItem[]
|
|
197
|
+
title: string
|
|
198
|
+
}
|
|
169
199
|
type TableOfContentsProps = {
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
declare function TableOfContents({
|
|
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
|
|
239
|
+
declare function ThemeProvider({
|
|
240
|
+
children,
|
|
241
|
+
...props
|
|
242
|
+
}: ThemeProviderProps): react_jsx_runtime.JSX.Element
|
|
175
243
|
|
|
176
|
-
declare function
|
|
177
|
-
|
|
178
|
-
declare function
|
|
179
|
-
declare function
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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 {
|
|
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
|
+
}
|