@nationaldesignstudio/react 0.5.0 → 0.5.2
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 +3617 -51
- package/dist/index.js +3368 -14973
- package/dist/index.js.map +1 -1
- package/dist/tailwind.css +0 -10
- package/package.json +3 -2
- package/src/components/atoms/popover/popover.tsx +1 -1
- package/src/components/atoms/tooltip/tooltip.tsx +1 -1
- package/dist/assets/fonts/PPNeueMontreal-Variable.woff2 +0 -0
- package/dist/assets/react.svg +0 -1
- package/dist/components/atoms/accordion/accordion.d.ts +0 -91
- package/dist/components/atoms/background/background.d.ts +0 -144
- package/dist/components/atoms/button/button.d.ts +0 -148
- package/dist/components/atoms/button/button.figma.d.ts +0 -1
- package/dist/components/atoms/button/icon-button.d.ts +0 -172
- package/dist/components/atoms/input/input-group.d.ts +0 -278
- package/dist/components/atoms/input/input.d.ts +0 -121
- package/dist/components/atoms/ndstudio-footer/ndstudio-footer.d.ts +0 -30
- package/dist/components/atoms/pager-control/pager-control.d.ts +0 -169
- package/dist/components/atoms/popover/popover.d.ts +0 -195
- package/dist/components/atoms/select/select.d.ts +0 -131
- package/dist/components/atoms/tooltip/tooltip.d.ts +0 -161
- package/dist/components/dev-tools/dev-toolbar/dev-toolbar.d.ts +0 -4
- package/dist/components/dev-tools/grid-overlay/grid-overlay.d.ts +0 -6
- package/dist/components/organisms/card/card.d.ts +0 -235
- package/dist/components/organisms/navbar/navbar.d.ts +0 -66
- package/dist/components/organisms/us-gov-banner/us-gov-banner.d.ts +0 -137
- package/dist/components/sections/banner/banner.d.ts +0 -97
- package/dist/components/sections/card-grid/card-grid.d.ts +0 -86
- package/dist/components/sections/faq-section/faq-section.d.ts +0 -44
- package/dist/components/sections/hero/hero.d.ts +0 -337
- package/dist/components/sections/prose/prose.d.ts +0 -37
- package/dist/components/sections/quote-block/quote-block.d.ts +0 -152
- package/dist/components/sections/river/river.d.ts +0 -96
- package/dist/components/sections/tout/tout.d.ts +0 -153
- package/dist/components/sections/two-column-section/two-column-section.d.ts +0 -118
- package/dist/components/shared/floating-arrow.d.ts +0 -34
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/use-event-listener.d.ts +0 -24
- package/dist/lib/form-control.d.ts +0 -106
- package/dist/lib/theme.d.ts +0 -330
- package/dist/lib/utils.d.ts +0 -1
package/dist/tailwind.css
CHANGED
|
@@ -11,13 +11,3 @@
|
|
|
11
11
|
|
|
12
12
|
/* Import design tokens (@theme and @utility definitions) */
|
|
13
13
|
@import "./tokens.css";
|
|
14
|
-
|
|
15
|
-
/* Custom font */
|
|
16
|
-
@font-face {
|
|
17
|
-
font-family: "PP Neue Montreal";
|
|
18
|
-
src: url("./assets/fonts/PPNeueMontreal-Variable.woff2")
|
|
19
|
-
format("woff2-variations");
|
|
20
|
-
font-weight: 100 900;
|
|
21
|
-
font-style: normal;
|
|
22
|
-
font-display: swap;
|
|
23
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nationaldesignstudio/react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "storybook dev -p 6006",
|
|
25
|
-
"build": "
|
|
25
|
+
"build": "tsup && bun run scripts/postbuild.ts",
|
|
26
26
|
"preview": "vite preview",
|
|
27
27
|
"storybook": "storybook dev -p 6006",
|
|
28
28
|
"build-storybook": "storybook build",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"react-dom": "catalog:",
|
|
78
78
|
"storybook": "catalog:",
|
|
79
79
|
"tailwindcss": "catalog:",
|
|
80
|
+
"tsup": "^8.5.1",
|
|
80
81
|
"typescript": "catalog:",
|
|
81
82
|
"vite": "catalog:",
|
|
82
83
|
"vite-plugin-dts": "^4.5.4",
|
|
@@ -104,7 +104,7 @@ const PopoverTrigger = React.forwardRef<HTMLButtonElement, PopoverTriggerProps>(
|
|
|
104
104
|
<BasePopover.Trigger
|
|
105
105
|
ref={ref}
|
|
106
106
|
className={className}
|
|
107
|
-
render={children}
|
|
107
|
+
render={children as React.ReactElement<Record<string, unknown>>}
|
|
108
108
|
{...props}
|
|
109
109
|
/>
|
|
110
110
|
);
|
|
@@ -117,7 +117,7 @@ const TooltipTrigger = React.forwardRef<HTMLButtonElement, TooltipTriggerProps>(
|
|
|
117
117
|
<BaseTooltip.Trigger
|
|
118
118
|
ref={ref}
|
|
119
119
|
className={className}
|
|
120
|
-
render={children}
|
|
120
|
+
render={children as React.ReactElement<Record<string, unknown>>}
|
|
121
121
|
{...props}
|
|
122
122
|
/>
|
|
123
123
|
);
|
|
Binary file
|
package/dist/assets/react.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'tailwind-variants';
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const accordionVariants: import('tailwind-variants').TVReturnType<{
|
|
4
|
-
colorScheme: {
|
|
5
|
-
dark: string;
|
|
6
|
-
light: string;
|
|
7
|
-
};
|
|
8
|
-
}, undefined, "flex flex-col", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
9
|
-
colorScheme: {
|
|
10
|
-
dark: string;
|
|
11
|
-
light: string;
|
|
12
|
-
};
|
|
13
|
-
}, {
|
|
14
|
-
colorScheme: {
|
|
15
|
-
dark: string;
|
|
16
|
-
light: string;
|
|
17
|
-
};
|
|
18
|
-
}>, {
|
|
19
|
-
colorScheme: {
|
|
20
|
-
dark: string;
|
|
21
|
-
light: string;
|
|
22
|
-
};
|
|
23
|
-
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
24
|
-
colorScheme: {
|
|
25
|
-
dark: string;
|
|
26
|
-
light: string;
|
|
27
|
-
};
|
|
28
|
-
}, undefined, "flex flex-col", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
29
|
-
colorScheme: {
|
|
30
|
-
dark: string;
|
|
31
|
-
light: string;
|
|
32
|
-
};
|
|
33
|
-
}, {
|
|
34
|
-
colorScheme: {
|
|
35
|
-
dark: string;
|
|
36
|
-
light: string;
|
|
37
|
-
};
|
|
38
|
-
}>, unknown, unknown, undefined>>;
|
|
39
|
-
export interface AccordionProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof accordionVariants> {
|
|
40
|
-
/**
|
|
41
|
-
* Allow multiple items to be expanded at once
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
allowMultiple?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* The ID(s) of items that should be expanded by default
|
|
47
|
-
*/
|
|
48
|
-
defaultExpanded?: string | string[];
|
|
49
|
-
children: React.ReactNode;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Accordion component for expandable/collapsible content sections.
|
|
53
|
-
* Built on Base UI's Accordion primitive.
|
|
54
|
-
*
|
|
55
|
-
* Variants:
|
|
56
|
-
* - light: Light theme styling (default)
|
|
57
|
-
* - dark: Dark theme styling
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```tsx
|
|
61
|
-
* <Accordion defaultExpanded="item-1" variant="dark">
|
|
62
|
-
* <AccordionItem id="item-1" title="Question 1">
|
|
63
|
-
* Answer to question 1
|
|
64
|
-
* </AccordionItem>
|
|
65
|
-
* <AccordionItem id="item-2" title="Question 2">
|
|
66
|
-
* Answer to question 2
|
|
67
|
-
* </AccordionItem>
|
|
68
|
-
* </Accordion>
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
-
export interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
73
|
-
/**
|
|
74
|
-
* Unique identifier for this item
|
|
75
|
-
*/
|
|
76
|
-
id: string;
|
|
77
|
-
/**
|
|
78
|
-
* The question/title displayed in the header
|
|
79
|
-
*/
|
|
80
|
-
title: string;
|
|
81
|
-
/**
|
|
82
|
-
* The answer/content revealed when expanded
|
|
83
|
-
*/
|
|
84
|
-
children: React.ReactNode;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Individual accordion item with collapsible content.
|
|
88
|
-
* Must be used within an Accordion component.
|
|
89
|
-
*/
|
|
90
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
export { Accordion, AccordionItem, accordionVariants };
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { useRender } from '@base-ui-components/react/use-render';
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const backgroundVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
4
|
-
/**
|
|
5
|
-
* Base container for background composition.
|
|
6
|
-
* Use as a wrapper to compose multiple background layers (image, video, overlay, gradient).
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <Background>
|
|
11
|
-
* <Background.Image src="/hero.jpg" />
|
|
12
|
-
* <Background.Overlay opacity={0.4} />
|
|
13
|
-
* <Background.Gradient direction="to-t" from="black" to="transparent" />
|
|
14
|
-
* </Background>
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export interface BackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
-
}
|
|
19
|
-
declare const backgroundImageVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
20
|
-
export interface BackgroundImageProps extends useRender.ComponentProps<"img">, Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src" | "render"> {
|
|
21
|
-
/**
|
|
22
|
-
* URL for the background image
|
|
23
|
-
*/
|
|
24
|
-
src: string;
|
|
25
|
-
/**
|
|
26
|
-
* Object position (default: "center")
|
|
27
|
-
*/
|
|
28
|
-
position?: string;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Background image layer using an actual img element with object-cover.
|
|
32
|
-
* Supports native lazy loading, srcset, and better accessibility.
|
|
33
|
-
* Supports render prop for element composition.
|
|
34
|
-
*/
|
|
35
|
-
declare function BackgroundImage(props: BackgroundImageProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
36
|
-
declare namespace BackgroundImage {
|
|
37
|
-
var displayName: string;
|
|
38
|
-
}
|
|
39
|
-
declare const backgroundVideoVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 size-full object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
40
|
-
export interface BackgroundVideoProps extends useRender.ComponentProps<"video">, Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "children" | "render" | "src"> {
|
|
41
|
-
/**
|
|
42
|
-
* URL for the video source
|
|
43
|
-
*/
|
|
44
|
-
src: string;
|
|
45
|
-
/**
|
|
46
|
-
* Video MIME type (default: auto-detected from src)
|
|
47
|
-
*/
|
|
48
|
-
type?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Poster image URL shown before video loads
|
|
51
|
-
*/
|
|
52
|
-
poster?: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Background video layer using HTML5 video element.
|
|
56
|
-
* Supports render prop for element composition.
|
|
57
|
-
*/
|
|
58
|
-
declare function BackgroundVideo(props: BackgroundVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
declare namespace BackgroundVideo {
|
|
60
|
-
var displayName: string;
|
|
61
|
-
}
|
|
62
|
-
declare const backgroundStreamVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 size-full border-0 scale-[1.5] object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 size-full border-0 scale-[1.5] object-cover", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
63
|
-
export interface BackgroundStreamProps extends React.IframeHTMLAttributes<HTMLIFrameElement> {
|
|
64
|
-
/**
|
|
65
|
-
* Cloudflare Stream video ID
|
|
66
|
-
*/
|
|
67
|
-
videoId: string;
|
|
68
|
-
/**
|
|
69
|
-
* Poster image URL (Cloudflare Stream thumbnail or custom)
|
|
70
|
-
*/
|
|
71
|
-
poster?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Whether the video should autoplay (default: true)
|
|
74
|
-
*/
|
|
75
|
-
autoplay?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Whether the video should loop (default: true)
|
|
78
|
-
*/
|
|
79
|
-
loop?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Whether the video should be muted (default: true)
|
|
82
|
-
*/
|
|
83
|
-
muted?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Whether to show playback controls (default: false)
|
|
86
|
-
*/
|
|
87
|
-
controls?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Custom Cloudflare customer subdomain (if using custom domains)
|
|
90
|
-
*/
|
|
91
|
-
customerSubdomain?: string;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Background video layer using Cloudflare Stream.
|
|
95
|
-
*/
|
|
96
|
-
declare const BackgroundStream: React.ForwardRefExoticComponent<BackgroundStreamProps & React.RefAttributes<HTMLIFrameElement>>;
|
|
97
|
-
declare const backgroundOverlayVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0 bg-bg-overlay", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0 bg-bg-overlay", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
98
|
-
export interface BackgroundOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
99
|
-
/**
|
|
100
|
-
* Overlay opacity (0-1)
|
|
101
|
-
*/
|
|
102
|
-
opacity?: number;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Solid color overlay layer. Uses semantic bg-overlay token by default.
|
|
106
|
-
* Override with className for different colors.
|
|
107
|
-
*/
|
|
108
|
-
declare const BackgroundOverlay: React.ForwardRefExoticComponent<BackgroundOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
109
|
-
declare const backgroundGradientVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "absolute inset-0", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "absolute inset-0", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
110
|
-
export interface BackgroundGradientProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
111
|
-
/**
|
|
112
|
-
* Gradient direction (Tailwind convention: to-t, to-b, to-l, to-r, etc.)
|
|
113
|
-
* Or CSS gradient direction (to top, to bottom, 45deg, etc.)
|
|
114
|
-
*/
|
|
115
|
-
direction?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Starting color (from)
|
|
118
|
-
*/
|
|
119
|
-
from?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Optional middle color (via)
|
|
122
|
-
*/
|
|
123
|
-
via?: string;
|
|
124
|
-
/**
|
|
125
|
-
* Ending color (to)
|
|
126
|
-
*/
|
|
127
|
-
to?: string;
|
|
128
|
-
/**
|
|
129
|
-
* Full custom gradient string (overrides from/via/to)
|
|
130
|
-
*/
|
|
131
|
-
gradient?: string;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Gradient overlay layer. Use for fading backgrounds or creating depth.
|
|
135
|
-
*/
|
|
136
|
-
declare const BackgroundGradient: React.ForwardRefExoticComponent<BackgroundGradientProps & React.RefAttributes<HTMLDivElement>>;
|
|
137
|
-
declare const BackgroundCompound: React.ForwardRefExoticComponent<BackgroundProps & React.RefAttributes<HTMLDivElement>> & {
|
|
138
|
-
Image: typeof BackgroundImage;
|
|
139
|
-
Video: typeof BackgroundVideo;
|
|
140
|
-
Stream: React.ForwardRefExoticComponent<BackgroundStreamProps & React.RefAttributes<HTMLIFrameElement>>;
|
|
141
|
-
Overlay: React.ForwardRefExoticComponent<BackgroundOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
142
|
-
Gradient: React.ForwardRefExoticComponent<BackgroundGradientProps & React.RefAttributes<HTMLDivElement>>;
|
|
143
|
-
};
|
|
144
|
-
export { BackgroundCompound as Background, BackgroundImage, BackgroundVideo, BackgroundStream, BackgroundOverlay, BackgroundGradient, backgroundVariants, backgroundImageVariants, backgroundVideoVariants, backgroundStreamVariants, backgroundOverlayVariants, backgroundGradientVariants, };
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { ButtonProps as BaseButtonProps } from '@base-ui-components/react/button';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import { ButtonTheme } from '../../../lib/theme';
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
/**
|
|
6
|
-
* Button component based on Figma Button component
|
|
7
|
-
*
|
|
8
|
-
* Variants (matches Figma):
|
|
9
|
-
* - primary: Blue filled button for primary actions
|
|
10
|
-
* - default: Dark filled button for secondary prominence
|
|
11
|
-
* - secondary: Light gray filled button with subtle border
|
|
12
|
-
* - destructive: Red filled button for destructive actions
|
|
13
|
-
* - outline: Bordered button with transparent background
|
|
14
|
-
* - ghost: Transparent button with subtle hover
|
|
15
|
-
* - link: Text-only button with underline on hover
|
|
16
|
-
*
|
|
17
|
-
* Sizes (matches Figma):
|
|
18
|
-
* - sm: Small buttons (32px height)
|
|
19
|
-
* - default: Default buttons (36px height)
|
|
20
|
-
* - lg: Large buttons (40px height)
|
|
21
|
-
*
|
|
22
|
-
* For icon-only buttons, use the IconButton component instead.
|
|
23
|
-
*
|
|
24
|
-
* Theme Support:
|
|
25
|
-
* Pass a `theme` prop to override default colors via CSS custom properties.
|
|
26
|
-
*/
|
|
27
|
-
declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
28
|
-
variant: {
|
|
29
|
-
primary: string;
|
|
30
|
-
default: string;
|
|
31
|
-
secondary: string;
|
|
32
|
-
destructive: string;
|
|
33
|
-
outline: string;
|
|
34
|
-
ghost: string;
|
|
35
|
-
link: string;
|
|
36
|
-
themed: string;
|
|
37
|
-
};
|
|
38
|
-
size: {
|
|
39
|
-
sm: string;
|
|
40
|
-
default: string;
|
|
41
|
-
lg: string;
|
|
42
|
-
};
|
|
43
|
-
}, undefined, "inline-flex items-center justify-center gap-spatial-ui-button-gap-icon-text whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
44
|
-
variant: {
|
|
45
|
-
primary: string;
|
|
46
|
-
default: string;
|
|
47
|
-
secondary: string;
|
|
48
|
-
destructive: string;
|
|
49
|
-
outline: string;
|
|
50
|
-
ghost: string;
|
|
51
|
-
link: string;
|
|
52
|
-
themed: string;
|
|
53
|
-
};
|
|
54
|
-
size: {
|
|
55
|
-
sm: string;
|
|
56
|
-
default: string;
|
|
57
|
-
lg: string;
|
|
58
|
-
};
|
|
59
|
-
}, {
|
|
60
|
-
variant: {
|
|
61
|
-
primary: string;
|
|
62
|
-
default: string;
|
|
63
|
-
secondary: string;
|
|
64
|
-
destructive: string;
|
|
65
|
-
outline: string;
|
|
66
|
-
ghost: string;
|
|
67
|
-
link: string;
|
|
68
|
-
themed: string;
|
|
69
|
-
};
|
|
70
|
-
size: {
|
|
71
|
-
sm: string;
|
|
72
|
-
default: string;
|
|
73
|
-
lg: string;
|
|
74
|
-
};
|
|
75
|
-
}>, {
|
|
76
|
-
variant: {
|
|
77
|
-
primary: string;
|
|
78
|
-
default: string;
|
|
79
|
-
secondary: string;
|
|
80
|
-
destructive: string;
|
|
81
|
-
outline: string;
|
|
82
|
-
ghost: string;
|
|
83
|
-
link: string;
|
|
84
|
-
themed: string;
|
|
85
|
-
};
|
|
86
|
-
size: {
|
|
87
|
-
sm: string;
|
|
88
|
-
default: string;
|
|
89
|
-
lg: string;
|
|
90
|
-
};
|
|
91
|
-
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
92
|
-
variant: {
|
|
93
|
-
primary: string;
|
|
94
|
-
default: string;
|
|
95
|
-
secondary: string;
|
|
96
|
-
destructive: string;
|
|
97
|
-
outline: string;
|
|
98
|
-
ghost: string;
|
|
99
|
-
link: string;
|
|
100
|
-
themed: string;
|
|
101
|
-
};
|
|
102
|
-
size: {
|
|
103
|
-
sm: string;
|
|
104
|
-
default: string;
|
|
105
|
-
lg: string;
|
|
106
|
-
};
|
|
107
|
-
}, undefined, "inline-flex items-center justify-center gap-spatial-ui-button-gap-icon-text whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
108
|
-
variant: {
|
|
109
|
-
primary: string;
|
|
110
|
-
default: string;
|
|
111
|
-
secondary: string;
|
|
112
|
-
destructive: string;
|
|
113
|
-
outline: string;
|
|
114
|
-
ghost: string;
|
|
115
|
-
link: string;
|
|
116
|
-
themed: string;
|
|
117
|
-
};
|
|
118
|
-
size: {
|
|
119
|
-
sm: string;
|
|
120
|
-
default: string;
|
|
121
|
-
lg: string;
|
|
122
|
-
};
|
|
123
|
-
}, {
|
|
124
|
-
variant: {
|
|
125
|
-
primary: string;
|
|
126
|
-
default: string;
|
|
127
|
-
secondary: string;
|
|
128
|
-
destructive: string;
|
|
129
|
-
outline: string;
|
|
130
|
-
ghost: string;
|
|
131
|
-
link: string;
|
|
132
|
-
themed: string;
|
|
133
|
-
};
|
|
134
|
-
size: {
|
|
135
|
-
sm: string;
|
|
136
|
-
default: string;
|
|
137
|
-
lg: string;
|
|
138
|
-
};
|
|
139
|
-
}>, unknown, unknown, undefined>>;
|
|
140
|
-
export type HTMLButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
141
|
-
export type ButtonProps = BaseButtonProps & VariantProps<typeof buttonVariants> & HTMLButtonProps & {
|
|
142
|
-
/**
|
|
143
|
-
* Theme overrides for button styling via CSS custom properties
|
|
144
|
-
*/
|
|
145
|
-
theme?: ButtonTheme;
|
|
146
|
-
};
|
|
147
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
148
|
-
export { Button, buttonVariants };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { useRender } from '@base-ui-components/react/use-render';
|
|
2
|
-
import { VariantProps } from 'tailwind-variants';
|
|
3
|
-
/**
|
|
4
|
-
* IconButton component based on Figma Button component (icon-only variant)
|
|
5
|
-
*
|
|
6
|
-
* **IMPORTANT: Accessibility Requirement**
|
|
7
|
-
* Icon-only buttons MUST have an accessible label. Provide one of:
|
|
8
|
-
* - `aria-label`: A text description of the button's action (recommended)
|
|
9
|
-
* - `aria-labelledby`: Reference to an element containing the label
|
|
10
|
-
* - `title`: Tooltip text (less preferred, but provides a label)
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* // Correct usage with aria-label
|
|
15
|
-
* <IconButton aria-label="Close menu">
|
|
16
|
-
* <CloseIcon />
|
|
17
|
-
* </IconButton>
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* Variants (matches Figma):
|
|
21
|
-
* - primary: Filled brand button (indigo background)
|
|
22
|
-
* - primary-outline: Outlined brand button (indigo border/text)
|
|
23
|
-
* - secondary: Filled neutral button (white background, for dark backgrounds)
|
|
24
|
-
* - secondary-outline: Outlined neutral button (white border/text, for dark backgrounds)
|
|
25
|
-
* - ghost: Transparent button with subtle hover (for light backgrounds)
|
|
26
|
-
* - ghost-inverse: Transparent button with subtle hover (for dark backgrounds)
|
|
27
|
-
*
|
|
28
|
-
* Sizes:
|
|
29
|
-
* - sm: Small (28x28)
|
|
30
|
-
* - md: Medium (40x40) - default
|
|
31
|
-
* - lg: Large (56x56)
|
|
32
|
-
*
|
|
33
|
-
* Rounded:
|
|
34
|
-
* - default: Standard border radius (matches size)
|
|
35
|
-
* - full: Fully circular
|
|
36
|
-
*/
|
|
37
|
-
declare const iconButtonVariants: import('tailwind-variants').TVReturnType<{
|
|
38
|
-
variant: {
|
|
39
|
-
primary: string;
|
|
40
|
-
"primary-outline": string;
|
|
41
|
-
secondary: string;
|
|
42
|
-
"secondary-outline": string;
|
|
43
|
-
ghost: string;
|
|
44
|
-
"ghost-inverse": string;
|
|
45
|
-
};
|
|
46
|
-
size: {
|
|
47
|
-
sm: string;
|
|
48
|
-
md: string;
|
|
49
|
-
lg: string;
|
|
50
|
-
};
|
|
51
|
-
rounded: {
|
|
52
|
-
default: string;
|
|
53
|
-
full: string;
|
|
54
|
-
};
|
|
55
|
-
}, undefined, "inline-flex items-center justify-center whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
56
|
-
variant: {
|
|
57
|
-
primary: string;
|
|
58
|
-
"primary-outline": string;
|
|
59
|
-
secondary: string;
|
|
60
|
-
"secondary-outline": string;
|
|
61
|
-
ghost: string;
|
|
62
|
-
"ghost-inverse": string;
|
|
63
|
-
};
|
|
64
|
-
size: {
|
|
65
|
-
sm: string;
|
|
66
|
-
md: string;
|
|
67
|
-
lg: string;
|
|
68
|
-
};
|
|
69
|
-
rounded: {
|
|
70
|
-
default: string;
|
|
71
|
-
full: string;
|
|
72
|
-
};
|
|
73
|
-
}, {
|
|
74
|
-
variant: {
|
|
75
|
-
primary: string;
|
|
76
|
-
"primary-outline": string;
|
|
77
|
-
secondary: string;
|
|
78
|
-
"secondary-outline": string;
|
|
79
|
-
ghost: string;
|
|
80
|
-
"ghost-inverse": string;
|
|
81
|
-
};
|
|
82
|
-
size: {
|
|
83
|
-
sm: string;
|
|
84
|
-
md: string;
|
|
85
|
-
lg: string;
|
|
86
|
-
};
|
|
87
|
-
rounded: {
|
|
88
|
-
default: string;
|
|
89
|
-
full: string;
|
|
90
|
-
};
|
|
91
|
-
}>, {
|
|
92
|
-
variant: {
|
|
93
|
-
primary: string;
|
|
94
|
-
"primary-outline": string;
|
|
95
|
-
secondary: string;
|
|
96
|
-
"secondary-outline": string;
|
|
97
|
-
ghost: string;
|
|
98
|
-
"ghost-inverse": string;
|
|
99
|
-
};
|
|
100
|
-
size: {
|
|
101
|
-
sm: string;
|
|
102
|
-
md: string;
|
|
103
|
-
lg: string;
|
|
104
|
-
};
|
|
105
|
-
rounded: {
|
|
106
|
-
default: string;
|
|
107
|
-
full: string;
|
|
108
|
-
};
|
|
109
|
-
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
110
|
-
variant: {
|
|
111
|
-
primary: string;
|
|
112
|
-
"primary-outline": string;
|
|
113
|
-
secondary: string;
|
|
114
|
-
"secondary-outline": string;
|
|
115
|
-
ghost: string;
|
|
116
|
-
"ghost-inverse": string;
|
|
117
|
-
};
|
|
118
|
-
size: {
|
|
119
|
-
sm: string;
|
|
120
|
-
md: string;
|
|
121
|
-
lg: string;
|
|
122
|
-
};
|
|
123
|
-
rounded: {
|
|
124
|
-
default: string;
|
|
125
|
-
full: string;
|
|
126
|
-
};
|
|
127
|
-
}, undefined, "inline-flex items-center justify-center whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
128
|
-
variant: {
|
|
129
|
-
primary: string;
|
|
130
|
-
"primary-outline": string;
|
|
131
|
-
secondary: string;
|
|
132
|
-
"secondary-outline": string;
|
|
133
|
-
ghost: string;
|
|
134
|
-
"ghost-inverse": string;
|
|
135
|
-
};
|
|
136
|
-
size: {
|
|
137
|
-
sm: string;
|
|
138
|
-
md: string;
|
|
139
|
-
lg: string;
|
|
140
|
-
};
|
|
141
|
-
rounded: {
|
|
142
|
-
default: string;
|
|
143
|
-
full: string;
|
|
144
|
-
};
|
|
145
|
-
}, {
|
|
146
|
-
variant: {
|
|
147
|
-
primary: string;
|
|
148
|
-
"primary-outline": string;
|
|
149
|
-
secondary: string;
|
|
150
|
-
"secondary-outline": string;
|
|
151
|
-
ghost: string;
|
|
152
|
-
"ghost-inverse": string;
|
|
153
|
-
};
|
|
154
|
-
size: {
|
|
155
|
-
sm: string;
|
|
156
|
-
md: string;
|
|
157
|
-
lg: string;
|
|
158
|
-
};
|
|
159
|
-
rounded: {
|
|
160
|
-
default: string;
|
|
161
|
-
full: string;
|
|
162
|
-
};
|
|
163
|
-
}>, unknown, unknown, undefined>>;
|
|
164
|
-
interface IconButtonState extends Record<string, unknown> {
|
|
165
|
-
variant: "primary" | "primary-outline" | "secondary" | "secondary-outline" | "ghost" | "ghost-inverse";
|
|
166
|
-
size: "sm" | "md" | "lg";
|
|
167
|
-
rounded: "default" | "full";
|
|
168
|
-
}
|
|
169
|
-
export interface IconButtonProps extends useRender.ComponentProps<"button", IconButtonState>, VariantProps<typeof iconButtonVariants> {
|
|
170
|
-
}
|
|
171
|
-
declare function IconButton(props: IconButtonProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
172
|
-
export { IconButton, iconButtonVariants };
|