@nswds/ui 9.6.6 → 9.6.7
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/components/badge.d.ts +1 -1
- package/dist/components/breadcrumb.d.ts +1 -1
- package/dist/components/button-group.d.ts +1 -1
- package/dist/components/button.d.ts +3 -3
- package/dist/components/header.d.ts +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/masthead.d.ts +1 -1
- package/dist/components/resizable.js +5 -2
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/skip-link.d.ts +1 -1
- package/dist/components/spinner.js +11 -1
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import '@base-ui/react/button';
|
|
|
7
7
|
import './link.js';
|
|
8
8
|
|
|
9
9
|
declare const badgeCva: (props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "soft" | "outline" | "solid" | "surface" | null | undefined;
|
|
11
11
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
13
13
|
type BadgeVariantProps = NonNullable<Parameters<typeof badgeCva>[0]> & {
|
|
@@ -24,7 +24,7 @@ import * as React from 'react';
|
|
|
24
24
|
* look lands on the 4px grid (40px tall, 48px with the ellipsis).
|
|
25
25
|
*/
|
|
26
26
|
declare const breadcrumbVariants: (props?: ({
|
|
27
|
-
variant?: "default" | "band" | "
|
|
27
|
+
variant?: "default" | "band" | "rail" | "soft" | null | undefined;
|
|
28
28
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
29
29
|
/**
|
|
30
30
|
* The `sideOffset` to give a DropdownMenuContent opened from the ellipsis. The
|
|
@@ -45,7 +45,7 @@ import '@base-ui/react/separator';
|
|
|
45
45
|
* group's segments.
|
|
46
46
|
*/
|
|
47
47
|
declare const buttonGroupVariants: (props?: ({
|
|
48
|
-
variant?: "
|
|
48
|
+
variant?: "soft" | "outline" | "solid" | "surface" | "ghost" | null | undefined;
|
|
49
49
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
50
50
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
51
|
/** The group variants a ButtonGroup can paint. `link` has no group form. */
|
|
@@ -5,8 +5,8 @@ import React__default from 'react';
|
|
|
5
5
|
import { Link } from './link.js';
|
|
6
6
|
|
|
7
7
|
declare const buttonCva: (props?: ({
|
|
8
|
-
variant?: "
|
|
9
|
-
color?: "tertiary" | "accent" | "success" | "warning" | "
|
|
8
|
+
variant?: "soft" | "link" | "outline" | "solid" | "surface" | "ghost" | null | undefined;
|
|
9
|
+
color?: "tertiary" | "accent" | "success" | "warning" | "white" | "grey" | "primary" | "secondary" | "danger" | null | undefined;
|
|
10
10
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
11
11
|
iconOnly?: boolean | null | undefined;
|
|
12
12
|
onTint?: boolean | null | undefined;
|
|
@@ -27,7 +27,7 @@ type ButtonVariantProps = NonNullable<Parameters<typeof buttonCva>[0]>;
|
|
|
27
27
|
*/
|
|
28
28
|
declare function buttonVariants({ onTint, ...props }?: ButtonVariantProps): string;
|
|
29
29
|
declare const buttonColorCva: (props?: ({
|
|
30
|
-
color?: "tertiary" | "accent" | "success" | "warning" | "
|
|
30
|
+
color?: "tertiary" | "accent" | "success" | "warning" | "white" | "grey" | "primary" | "secondary" | "danger" | null | undefined;
|
|
31
31
|
onTint?: boolean | null | undefined;
|
|
32
32
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
33
33
|
/**
|
|
@@ -32,7 +32,7 @@ declare const headerColors: {
|
|
|
32
32
|
};
|
|
33
33
|
type HeaderColor = keyof typeof headerColors;
|
|
34
34
|
declare const headerVariants: (props?: ({
|
|
35
|
-
color?: "
|
|
35
|
+
color?: "white" | "grey" | "light" | "dark" | null | undefined;
|
|
36
36
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
37
37
|
declare const headerContainerVariants: (props?: ({
|
|
38
38
|
container?: "fluid" | "contained" | null | undefined;
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
|
|
5
5
|
declare const linkVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "white" | "primary" | "secondary" | "unstyled" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
type LinkComponent = React__default.ElementType;
|
|
9
9
|
/**
|
|
@@ -10,7 +10,7 @@ declare const mastheadColors: {
|
|
|
10
10
|
};
|
|
11
11
|
type MastheadColor = keyof typeof mastheadColors;
|
|
12
12
|
declare const mastheadVariants: (props?: ({
|
|
13
|
-
color?: "
|
|
13
|
+
color?: "white" | "grey" | "light" | "dark" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
15
|
declare const mastheadContainerVariants: (props?: ({
|
|
16
16
|
container?: "fluid" | "contained" | null | undefined;
|
|
@@ -26,11 +26,14 @@ function ResizableHandle({
|
|
|
26
26
|
{
|
|
27
27
|
"data-slot": "resizable-handle",
|
|
28
28
|
className: cn(
|
|
29
|
-
|
|
29
|
+
// The line and grip are a control a reader has to find, so they use the
|
|
30
|
+
// strong border token form fields draw their edges with; `bg-border`
|
|
31
|
+
// is for decorative rules and measured 1.34:1 / 1.67:1 (#256).
|
|
32
|
+
"relative flex w-px items-center justify-center bg-(--border-strong) ring-offset-background after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
30
33
|
className
|
|
31
34
|
),
|
|
32
35
|
...props,
|
|
33
|
-
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-full bg-border" })
|
|
36
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-full bg-(--border-strong)" })
|
|
34
37
|
}
|
|
35
38
|
);
|
|
36
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/resizable.tsx"],"names":[],"mappings":";;;;AAMA,SAAS,mBAAA,CAAoB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AACnF,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,KAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,yDAAA,EAA2D,SAAS,CAAA;AAAA,MACjF,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAAkC;AACnE,EAAA,2BAAQ,kBAAA,CAAmB,KAAA,EAAnB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,eAAA,CAAgB;AAAA,EACvB,UAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,SAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/components/resizable.tsx"],"names":[],"mappings":";;;;AAMA,SAAS,mBAAA,CAAoB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AACnF,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,KAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,yDAAA,EAA2D,SAAS,CAAA;AAAA,MACjF,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAAkC;AACnE,EAAA,2BAAQ,kBAAA,CAAmB,KAAA,EAAnB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,eAAA,CAAgB;AAAA,EACvB,UAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,SAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA;AAAA;AAAA;AAAA,QAIT,oqBAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA,UAAA,oBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,8DAAA,EAA+D;AAAA;AAAA,GAElF;AAEJ","file":"resizable.js","sourcesContent":["'use client'\n\nimport * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils.js'\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot='resizable-panel-group'\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot='resizable-panel' {...props} />\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot='resizable-handle'\n className={cn(\n // The line and grip are a control a reader has to find, so they use the\n // strong border token form fields draw their edges with; `bg-border`\n // is for decorative rules and measured 1.34:1 / 1.67:1 (#256).\n 'relative flex w-px items-center justify-center bg-(--border-strong) ring-offset-background after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className='z-10 flex h-6 w-1 shrink-0 rounded-full bg-(--border-strong)' />\n )}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/scroll-area.tsx"],"names":["ScrollAreaPrimitive"],"mappings":";;;;AAMA,SAAS,WAAW,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAmC;AACrF,EAAA,uBACE,IAAA;AAAA,IAACA,YAAA,CAAoB,IAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAS,CAAA;AAAA,MAClC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAACA,YAAA,CAAoB,QAAA;AAAA,UAApB;AAAA,YACC,WAAA,EAAU,sBAAA;AAAA,YACV,SAAA,EAAU,oJAAA;AAAA,YAET;AAAA;AAAA,SACH;AAAA,4BACC,SAAA,EAAA,EAAU,CAAA;AAAA,wBACX,GAAA,CAACA,YAAA,CAAoB,MAAA,EAApB,EAA2B;AAAA;AAAA;AAAA,GAC9B;AAEJ;AAEA,SAAS,SAAA,CAAU;AAAA,EACjB,SAAA;AAAA,EACA,WAAA,GAAc,UAAA;AAAA,EACd,GAAG;AACL,CAAA,EAAwC;AACtC,EAAA,uBACE,GAAA;AAAA,IAACA,YAAA,CAAoB,SAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,WAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,oQAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/components/scroll-area.tsx"],"names":["ScrollAreaPrimitive"],"mappings":";;;;AAMA,SAAS,WAAW,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,OAAM,EAAmC;AACrF,EAAA,uBACE,IAAA;AAAA,IAACA,YAAA,CAAoB,IAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAS,CAAA;AAAA,MAClC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAACA,YAAA,CAAoB,QAAA;AAAA,UAApB;AAAA,YACC,WAAA,EAAU,sBAAA;AAAA,YACV,SAAA,EAAU,oJAAA;AAAA,YAET;AAAA;AAAA,SACH;AAAA,4BACC,SAAA,EAAA,EAAU,CAAA;AAAA,wBACX,GAAA,CAACA,YAAA,CAAoB,MAAA,EAApB,EAA2B;AAAA;AAAA;AAAA,GAC9B;AAEJ;AAEA,SAAS,SAAA,CAAU;AAAA,EACjB,SAAA;AAAA,EACA,WAAA,GAAc,UAAA;AAAA,EACd,GAAG;AACL,CAAA,EAAwC;AACtC,EAAA,uBACE,GAAA;AAAA,IAACA,YAAA,CAAoB,SAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,WAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,oQAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAIJ,QAAA,kBAAA,GAAA;AAAA,QAACA,YAAA,CAAoB,KAAA;AAAA,QAApB;AAAA,UACC,WAAA,EAAU,mBAAA;AAAA,UACV,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA,GACF;AAEJ","file":"scroll-area.js","sourcesContent":["'use client'\n\nimport { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area'\n\nimport { cn } from '../lib/utils.js'\n\nfunction ScrollArea({ className, children, ...props }: ScrollAreaPrimitive.Root.Props) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot='scroll-area'\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot='scroll-area-viewport'\n className='size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1'\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n data-slot='scroll-area-scrollbar'\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent',\n className,\n )}\n {...props}\n >\n {/* The thumb is the only sign of scroll position, so it uses the strong\n border token; `bg-border` measured 1.34:1 / 1.67:1 (#256). */}\n <ScrollAreaPrimitive.Thumb\n data-slot='scroll-area-thumb'\n className='relative flex-1 rounded-full bg-(--border-strong)'\n />\n </ScrollAreaPrimitive.Scrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"]}
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
|
|
5
5
|
declare const skipLinkVariants: (props?: ({
|
|
6
|
-
color?: "
|
|
6
|
+
color?: "white" | "grey" | "light" | "dark" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
type SkipLinkProps = React__default.ComponentPropsWithoutRef<'a'> & VariantProps<typeof skipLinkVariants> & {
|
|
9
9
|
/** Same-page fragment target, e.g. `"#content"`. */
|
|
@@ -11,7 +11,17 @@ const theme = {
|
|
|
11
11
|
xl: "h-10 w-10"
|
|
12
12
|
},
|
|
13
13
|
color: {
|
|
14
|
-
|
|
14
|
+
// In dark mode the arc steps to the -200 ink (DESIGN.md, The Role-Flip
|
|
15
|
+
// Rule) — primary-800 measured 1.32:1 on the dark page (#256) — and the
|
|
16
|
+
// track deepens with it, so the pale arc still stands out from it. The
|
|
17
|
+
// step is made on two variables, not with `dark:fill-*`: a consumer's own
|
|
18
|
+
// `fill-*` / `text-*` in `svgClassName` replaces the two utilities below
|
|
19
|
+
// through tailwind-merge, in both modes, where a `dark:` pair would have
|
|
20
|
+
// survived the merge and overridden their colours in dark mode. The
|
|
21
|
+
// variables read the Tailwind colour bridges (`--color-*`), as
|
|
22
|
+
// `fill-primary-800` did, so a brand theme that re-points those still
|
|
23
|
+
// recolours the default spinner.
|
|
24
|
+
primary: "[--spinner-arc:var(--color-primary-800)] [--spinner-track:var(--color-grey-400)] dark:[--spinner-arc:var(--color-primary-200)] dark:[--spinner-track:var(--color-grey-600)] fill-(--spinner-arc) text-(--spinner-track)",
|
|
15
25
|
accent: "fill-accent-600 text-grey-400",
|
|
16
26
|
white: "fill-white text-white/30",
|
|
17
27
|
// Inherit the surrounding text colour (e.g. inside a Button, where the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/spinner.tsx"],"names":[],"mappings":";;;AAKA,MAAM,KAAA,GAAQ;AAAA,EACZ,IAAA,EAAM;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,KAAA,EAAO;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/components/spinner.tsx"],"names":[],"mappings":";;;AAKA,MAAM,KAAA,GAAQ;AAAA,EACZ,IAAA,EAAM;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI,SAAA;AAAA,IACJ,EAAA,EAAI;AAAA,GACN;AAAA,EACA,KAAA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWL,OAAA,EACE,yNAAA;AAAA,IACF,MAAA,EAAQ,+BAAA;AAAA,IACR,KAAA,EAAO,0BAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,OAAA,EAAS;AAAA;AAEb,CAAA;AAmBA,SAAS,OAAA,CAAQ;AAAA,EACf,SAAA;AAAA,EACA,YAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,KAAA,GAAQ,SAAA;AAAA,EACR,KAAA,GAAQ,SAAA;AAAA,EACR,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiB;AAKf,EAAA,MAAM,WAAW,KAAA,KAAU,EAAA;AAC3B,EAAA,uBACE,IAAA,CAAC,UAAK,GAAA,EAAU,IAAA,EAAM,WAAW,QAAA,GAAW,MAAA,EAAW,SAAA,EAAuB,GAAG,KAAA,EAC/E,QAAA,EAAA;AAAA,oBAAA,IAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,MAAA;AAAA,QACL,OAAA,EAAQ,aAAA;AAAA,QACR,aAAA,EAAY,MAAA;AAAA,QACZ,SAAA,EAAW,EAAA;AAAA,UACT,iCAAA;AAAA,UACA,KAAA,CAAM,MAAM,KAAK,CAAA;AAAA,UACjB,KAAA,CAAM,KAAK,IAAI,CAAA;AAAA,UACf;AAAA,SACF;AAAA,QAIA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,CAAA,EAAE,8WAAA;AAAA,cACF,IAAA,EAAK;AAAA;AAAA,WACP;AAAA,0BAaA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,+kBAAA,EAAglB;AAAA;AAAA;AAAA,KAC1lB;AAAA,IACC,2BAAW,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,SAAA,EAAW,iBAAM,CAAA,GAAU;AAAA,GAAA,EACzD,CAAA;AAEJ","file":"spinner.js","sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../lib/utils.js'\n\nconst theme = {\n size: {\n xs: 'h-3 w-3',\n sm: 'h-4 w-4',\n md: 'h-6 w-6',\n lg: 'h-8 w-8',\n xl: 'h-10 w-10',\n },\n color: {\n // In dark mode the arc steps to the -200 ink (DESIGN.md, The Role-Flip\n // Rule) — primary-800 measured 1.32:1 on the dark page (#256) — and the\n // track deepens with it, so the pale arc still stands out from it. The\n // step is made on two variables, not with `dark:fill-*`: a consumer's own\n // `fill-*` / `text-*` in `svgClassName` replaces the two utilities below\n // through tailwind-merge, in both modes, where a `dark:` pair would have\n // survived the merge and overridden their colours in dark mode. The\n // variables read the Tailwind colour bridges (`--color-*`), as\n // `fill-primary-800` did, so a brand theme that re-points those still\n // recolours the default spinner.\n primary:\n '[--spinner-arc:var(--color-primary-800)] [--spinner-track:var(--color-grey-400)] dark:[--spinner-arc:var(--color-primary-200)] dark:[--spinner-track:var(--color-grey-600)] fill-(--spinner-arc) text-(--spinner-track)',\n accent: 'fill-accent-600 text-grey-400',\n white: 'fill-white text-white/30',\n // Inherit the surrounding text colour (e.g. inside a Button, where the\n // text colour varies per variant/colour). The arc uses currentColor at\n // full strength; the track is the same colour dimmed via opacity on the\n // first <path>, so the two-tone effect works from a single hue.\n current: 'fill-current text-current [&>path:first-child]:opacity-25',\n },\n}\n\ntype SpinnerProps = {\n /** Applied to the outer status element, like every other spread prop. */\n className?: string\n /** Applied to the inner svg (sizing/colour live there). */\n svgClassName?: string\n size?: keyof typeof theme.size\n color?: keyof typeof theme.color\n /**\n * Accessible name announced for the `role=\"status\"` element. Defaults to\n * \"Loading\"; pass an empty string to suppress when surrounding content\n * already conveys the busy state (e.g. inside a Button with a label).\n */\n label?: string\n} & React.HTMLAttributes<HTMLSpanElement> & {\n ref?: React.Ref<HTMLSpanElement>\n }\n\nfunction Spinner({\n className,\n svgClassName,\n size = 'md',\n color = 'primary',\n label = 'Loading',\n ref,\n ...props\n}: SpinnerProps) {\n // An empty label suppresses the live region entirely: a `role=\"status\"`\n // element with no text content is an empty, redundant live region (e.g. when\n // the Spinner sits inside a Button whose own `aria-busy` conveys the state).\n // A consumer-supplied `role` in `...props` still wins, as before.\n const labelled = label !== ''\n return (\n <span ref={ref} role={labelled ? 'status' : undefined} className={className} {...props}>\n <svg\n fill='none'\n viewBox='0 0 100 101'\n aria-hidden='true'\n className={cn(\n 'inline motion-safe:animate-spin',\n theme.color[color],\n theme.size[size],\n svgClassName,\n )}\n >\n {/* Track — `currentColor` resolves against the `text-*` half of the\n colour variant. */}\n <path\n d='M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z'\n fill='currentColor'\n />\n {/* Arc — deliberately carries NO `fill` of its own, so it inherits the\n `fill-*` half of the colour variant from the <svg>. That is what\n makes the spinner two-tone from a single variant class.\n\n This previously read `fill=\"currentFill\"`, a Flowbite idiom that is\n not a valid paint value. It happened to render correctly only\n because an invalid presentation attribute is discarded, after which\n `fill` — an inherited property — fell through to the <svg> anyway.\n Omitting the attribute reaches the same computed value through a\n defined mechanism instead of relying on error handling, and stops\n shipping an invalid attribute into consumers' markup. The CssCheck\n story asserts both paths against their source property. */}\n <path d='M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z' />\n </svg>\n {labelled ? <span className='sr-only'>{label}</span> : null}\n </span>\n )\n}\n\nexport { Spinner }\nexport type { SpinnerProps }\n"]}
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { Link } from './link.js';
|
|
|
8
8
|
import './button.js';
|
|
9
9
|
|
|
10
10
|
declare const tagCva: (props?: ({
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "soft" | "outline" | "solid" | "surface" | null | undefined;
|
|
12
12
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
13
13
|
interactive?: boolean | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|