@nationaldesignstudio/react 0.2.0 → 0.5.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.
Files changed (97) hide show
  1. package/dist/component-registry.md +1310 -127
  2. package/dist/components/atoms/background/background.d.ts +13 -27
  3. package/dist/components/atoms/button/button.d.ts +64 -72
  4. package/dist/components/atoms/button/button.figma.d.ts +1 -0
  5. package/dist/components/atoms/button/icon-button.d.ts +62 -110
  6. package/dist/components/atoms/input/input-group.d.ts +278 -0
  7. package/dist/components/atoms/input/input.d.ts +121 -0
  8. package/dist/components/atoms/popover/popover.d.ts +195 -0
  9. package/dist/components/atoms/select/select.d.ts +131 -0
  10. package/dist/components/atoms/tooltip/tooltip.d.ts +161 -0
  11. package/dist/components/organisms/card/card.d.ts +3 -3
  12. package/dist/components/sections/hero/hero.d.ts +2 -2
  13. package/dist/components/sections/prose/prose.d.ts +3 -3
  14. package/dist/components/sections/river/river.d.ts +1 -1
  15. package/dist/components/sections/tout/tout.d.ts +4 -4
  16. package/dist/components/shared/floating-arrow.d.ts +34 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +13935 -7622
  19. package/dist/index.js.map +1 -1
  20. package/dist/lib/form-control.d.ts +106 -0
  21. package/dist/tokens.css +4725 -19065
  22. package/package.json +2 -1
  23. package/src/components/atoms/accordion/accordion.stories.tsx +1 -1
  24. package/src/components/atoms/accordion/accordion.tsx +2 -2
  25. package/src/components/atoms/background/background.tsx +71 -109
  26. package/src/components/atoms/button/button.figma.tsx +37 -0
  27. package/src/components/atoms/button/button.stories.tsx +253 -115
  28. package/src/components/atoms/button/button.test.tsx +289 -5
  29. package/src/components/atoms/button/button.tsx +40 -101
  30. package/src/components/atoms/button/button.visual.test.tsx +28 -32
  31. package/src/components/atoms/button/icon-button.stories.tsx +44 -101
  32. package/src/components/atoms/button/icon-button.test.tsx +26 -94
  33. package/src/components/atoms/button/icon-button.tsx +81 -224
  34. package/src/components/atoms/input/index.ts +17 -0
  35. package/src/components/atoms/input/input-group.stories.tsx +646 -0
  36. package/src/components/atoms/input/input-group.test.tsx +362 -0
  37. package/src/components/atoms/input/input-group.tsx +409 -0
  38. package/src/components/atoms/input/input.stories.tsx +228 -0
  39. package/src/components/atoms/input/input.test.tsx +167 -0
  40. package/src/components/atoms/input/input.tsx +104 -0
  41. package/src/components/atoms/pager-control/pager-control.stories.tsx +6 -8
  42. package/src/components/atoms/pager-control/pager-control.tsx +12 -12
  43. package/src/components/atoms/popover/index.ts +30 -0
  44. package/src/components/atoms/popover/popover.stories.tsx +531 -0
  45. package/src/components/atoms/popover/popover.test.tsx +486 -0
  46. package/src/components/atoms/popover/popover.tsx +488 -0
  47. package/src/components/atoms/select/index.ts +18 -0
  48. package/src/components/atoms/select/select.stories.tsx +455 -0
  49. package/src/components/atoms/select/select.tsx +324 -0
  50. package/src/components/atoms/tooltip/index.ts +24 -0
  51. package/src/components/atoms/tooltip/tooltip.stories.tsx +348 -0
  52. package/src/components/atoms/tooltip/tooltip.test.tsx +363 -0
  53. package/src/components/atoms/tooltip/tooltip.tsx +347 -0
  54. package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +8 -17
  55. package/src/components/dev-tools/dev-toolbar/dev-toolbar.tsx +3 -3
  56. package/src/components/foundation/typography/typography.stories.tsx +401 -0
  57. package/src/components/organisms/card/card.stories.tsx +19 -19
  58. package/src/components/organisms/card/card.test.tsx +1 -1
  59. package/src/components/organisms/card/card.tsx +3 -3
  60. package/src/components/organisms/card/card.visual.test.tsx +11 -11
  61. package/src/components/organisms/navbar/navbar.tsx +2 -2
  62. package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
  63. package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +2 -2
  64. package/src/components/sections/banner/banner.stories.tsx +1 -5
  65. package/src/components/sections/banner/banner.test.tsx +2 -2
  66. package/src/components/sections/banner/banner.tsx +6 -6
  67. package/src/components/sections/card-grid/card-grid.tsx +5 -5
  68. package/src/components/sections/faq-section/faq-section.tsx +2 -2
  69. package/src/components/sections/hero/hero.stories.tsx +7 -7
  70. package/src/components/sections/hero/hero.test.tsx +5 -5
  71. package/src/components/sections/hero/hero.tsx +10 -11
  72. package/src/components/sections/prose/prose.test.tsx +2 -2
  73. package/src/components/sections/prose/prose.tsx +6 -7
  74. package/src/components/sections/river/river.stories.tsx +8 -8
  75. package/src/components/sections/river/river.test.tsx +4 -4
  76. package/src/components/sections/river/river.tsx +8 -16
  77. package/src/components/sections/tout/tout.stories.tsx +7 -31
  78. package/src/components/sections/tout/tout.test.tsx +1 -1
  79. package/src/components/sections/tout/tout.tsx +11 -11
  80. package/src/components/sections/two-column-section/two-column-section.tsx +7 -9
  81. package/src/components/shared/floating-arrow.tsx +78 -0
  82. package/src/components/shared/index.ts +5 -0
  83. package/src/index.ts +98 -0
  84. package/src/lib/form-control.ts +71 -0
  85. package/src/stories/grid-system.stories.tsx +309 -0
  86. package/src/stories/{Introduction.mdx → introduction.mdx} +29 -15
  87. package/src/stories/{ThemeProvider.stories.tsx → theme-provider.stories.tsx} +8 -22
  88. package/src/stories/{TokenShowcase.stories.tsx → token-showcase.stories.tsx} +1 -20
  89. package/src/stories/token-showcase.tsx +777 -0
  90. package/src/styles.css +3 -0
  91. package/src/tests/token-resolution.test.tsx +298 -0
  92. package/src/theme/hooks.ts +1 -1
  93. package/src/theme/index.ts +1 -1
  94. package/src/theme/theme-provider.test.tsx +270 -0
  95. package/src/theme/{ThemeProvider.tsx → theme-provider.tsx} +18 -2
  96. package/src/stories/GridSystem.stories.tsx +0 -84
  97. package/src/stories/TokenShowcase.tsx +0 -1429
@@ -0,0 +1,131 @@
1
+ import { Select as BaseSelect } from '@base-ui-components/react/select';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as React from "react";
4
+ /**
5
+ * Select trigger variants based on Figma BaseKit / Interface / Dropdown
6
+ *
7
+ * States:
8
+ * - Default: White background, subtle border
9
+ * - Hover: Light gray background
10
+ * - Focus/Open: Accent border with focus ring
11
+ * - Selected: Has a value selected (darker text)
12
+ * - Disabled: Reduced opacity, not interactive
13
+ */
14
+ declare const selectTriggerVariants: import('tailwind-variants').TVReturnType<{
15
+ size: {
16
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
17
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
18
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
19
+ };
20
+ error: {
21
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
22
+ readonly false: "";
23
+ };
24
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
25
+ size: {
26
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
27
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
28
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
29
+ };
30
+ error: {
31
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
32
+ readonly false: "";
33
+ };
34
+ }, {
35
+ size: {
36
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
37
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
38
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
39
+ };
40
+ error: {
41
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
42
+ readonly false: "";
43
+ };
44
+ }>, {
45
+ size: {
46
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
47
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
48
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
49
+ };
50
+ error: {
51
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
52
+ readonly false: "";
53
+ };
54
+ }, undefined, import('tailwind-variants').TVReturnType<{
55
+ size: {
56
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
57
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
58
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
59
+ };
60
+ error: {
61
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
62
+ readonly false: "";
63
+ };
64
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
65
+ size: {
66
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
67
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
68
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
69
+ };
70
+ error: {
71
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
72
+ readonly false: "";
73
+ };
74
+ }, {
75
+ size: {
76
+ readonly sm: "h-spatial-ui-control-height-small px-spatial-ui-control-padding-x-small py-spatial-ui-control-padding-y-small text-14";
77
+ readonly default: "h-spatial-ui-control-height-medium px-spatial-ui-control-padding-x-medium py-spatial-ui-control-padding-y-medium";
78
+ readonly lg: "h-spatial-ui-control-height-large px-spatial-ui-control-padding-x-large py-spatial-ui-control-padding-y-large text-18";
79
+ };
80
+ error: {
81
+ readonly true: "border-ui-error-color focus-visible:border-ui-error-color focus-visible:ring-ui-error-color/20 text-ui-error-color";
82
+ readonly false: "";
83
+ };
84
+ }>, unknown, unknown, undefined>>;
85
+ /**
86
+ * Select popup/menu variants
87
+ */
88
+ declare const selectPopupVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
89
+ /**
90
+ * Select option/item variants based on Figma Menu Items
91
+ *
92
+ * States:
93
+ * - Default: White background
94
+ * - Hover/Highlighted: Light indigo tint background
95
+ * - Selected: Stronger indigo tint with blue text and checkmark
96
+ * - Disabled: Reduced opacity
97
+ */
98
+ declare const selectOptionVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
99
+ export interface SelectProps<Value = string> extends BaseSelect.Root.Props<Value> {
100
+ children: React.ReactNode;
101
+ }
102
+ declare const SelectRoot: <Value = string>({ children, ...props }: SelectProps<Value>) => import("react/jsx-runtime").JSX.Element;
103
+ export interface SelectTriggerProps extends Omit<React.ComponentProps<typeof BaseSelect.Trigger>, "className">, VariantProps<typeof selectTriggerVariants> {
104
+ className?: string;
105
+ placeholder?: string;
106
+ }
107
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
108
+ export interface SelectPopupProps extends Omit<React.ComponentProps<typeof BaseSelect.Popup>, "className"> {
109
+ className?: string;
110
+ }
111
+ declare const SelectPopup: React.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
112
+ export interface SelectOptionProps extends Omit<React.ComponentProps<typeof BaseSelect.Item>, "className"> {
113
+ className?: string;
114
+ }
115
+ declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
116
+ export interface SelectGroupProps extends Omit<React.ComponentProps<typeof BaseSelect.Group>, "className"> {
117
+ className?: string;
118
+ }
119
+ declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
120
+ export interface SelectGroupLabelProps extends Omit<React.ComponentProps<typeof BaseSelect.GroupLabel>, "className"> {
121
+ className?: string;
122
+ }
123
+ declare const SelectGroupLabel: React.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
124
+ export declare const Select: (<Value = string>({ children, ...props }: SelectProps<Value>) => import("react/jsx-runtime").JSX.Element) & {
125
+ Trigger: React.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
126
+ Popup: React.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
127
+ Option: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
128
+ Group: React.ForwardRefExoticComponent<Omit<SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
129
+ GroupLabel: React.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
130
+ };
131
+ export { SelectRoot, SelectTrigger, SelectPopup, SelectOption, SelectGroup, SelectGroupLabel, selectTriggerVariants, selectPopupVariants, selectOptionVariants, };
@@ -0,0 +1,161 @@
1
+ import { Tooltip as BaseTooltip } from '@base-ui-components/react/tooltip';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as React from "react";
4
+ /**
5
+ * Tooltip popup variants
6
+ *
7
+ * Uses semantic tokens for themeable styling:
8
+ * - color.tooltip.bg - Dark background
9
+ * - color.tooltip.text - Light text
10
+ * - surface.tooltip.radius - Small border radius
11
+ * - spatial.component.tooltip.padding-x/y - Consistent padding
12
+ */
13
+ declare const tooltipPopupVariants: import('tailwind-variants').TVReturnType<{
14
+ variant: {
15
+ default: string;
16
+ };
17
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
18
+ variant: {
19
+ default: string;
20
+ };
21
+ }, {
22
+ variant: {
23
+ default: string;
24
+ };
25
+ }>, {
26
+ variant: {
27
+ default: string;
28
+ };
29
+ }, undefined, import('tailwind-variants').TVReturnType<{
30
+ variant: {
31
+ default: string;
32
+ };
33
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
34
+ variant: {
35
+ default: string;
36
+ };
37
+ }, {
38
+ variant: {
39
+ default: string;
40
+ };
41
+ }>, unknown, unknown, undefined>>;
42
+ /**
43
+ * Tooltip arrow variants - uses shared floating arrow variants
44
+ */
45
+ declare const tooltipArrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
46
+ export interface TooltipProviderProps extends BaseTooltip.Provider.Props {
47
+ children: React.ReactNode;
48
+ }
49
+ /**
50
+ * Tooltip Provider
51
+ *
52
+ * Manages shared delays across multiple tooltips.
53
+ * Wrap your app or a section with this to enable tooltip delay grouping.
54
+ */
55
+ declare const TooltipProvider: ({ children, ...props }: TooltipProviderProps) => import("react/jsx-runtime").JSX.Element;
56
+ export interface TooltipRootProps extends BaseTooltip.Root.Props {
57
+ children: React.ReactNode;
58
+ }
59
+ /**
60
+ * Tooltip Root
61
+ *
62
+ * Groups all tooltip parts. Does not render an element.
63
+ */
64
+ declare const TooltipRoot: ({ children, ...props }: TooltipRootProps) => import("react/jsx-runtime").JSX.Element;
65
+ export interface TooltipTriggerProps extends React.ComponentProps<typeof BaseTooltip.Trigger> {
66
+ className?: string;
67
+ }
68
+ /**
69
+ * Tooltip Trigger
70
+ *
71
+ * The element that triggers the tooltip on hover/focus.
72
+ * Renders as the child element with tooltip behavior attached.
73
+ * When children is a single React element, uses `render` prop to avoid wrapper element.
74
+ */
75
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
76
+ export interface TooltipPortalProps extends BaseTooltip.Portal.Props {
77
+ children: React.ReactNode;
78
+ }
79
+ /**
80
+ * Tooltip Portal
81
+ *
82
+ * Renders the tooltip popup in a portal outside the DOM hierarchy.
83
+ */
84
+ declare const TooltipPortal: ({ children, ...props }: TooltipPortalProps) => import("react/jsx-runtime").JSX.Element;
85
+ export interface TooltipPositionerProps extends Omit<React.ComponentProps<typeof BaseTooltip.Positioner>, "className"> {
86
+ className?: string;
87
+ }
88
+ /**
89
+ * Tooltip Positioner
90
+ *
91
+ * Positions the tooltip popup relative to the trigger.
92
+ */
93
+ declare const TooltipPositioner: React.ForwardRefExoticComponent<Omit<TooltipPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
94
+ export interface TooltipPopupProps extends Omit<React.ComponentProps<typeof BaseTooltip.Popup>, "className">, VariantProps<typeof tooltipPopupVariants> {
95
+ className?: string;
96
+ }
97
+ /**
98
+ * Tooltip Popup
99
+ *
100
+ * The tooltip content container with styled appearance.
101
+ */
102
+ declare const TooltipPopup: React.ForwardRefExoticComponent<Omit<TooltipPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
103
+ export interface TooltipArrowProps extends Omit<React.ComponentProps<typeof BaseTooltip.Arrow>, "className"> {
104
+ className?: string;
105
+ }
106
+ /**
107
+ * Tooltip Arrow
108
+ *
109
+ * Visual pointer element for the tooltip.
110
+ * Uses shared FloatingArrowSvg with tooltip-bg color token.
111
+ */
112
+ declare const TooltipArrow: React.ForwardRefExoticComponent<Omit<TooltipArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
113
+ export interface TooltipProps {
114
+ /** The content to show in the tooltip */
115
+ content: React.ReactNode;
116
+ /** The element that triggers the tooltip */
117
+ children: React.ReactNode;
118
+ /** Side of the trigger to show the tooltip */
119
+ side?: "top" | "bottom" | "left" | "right";
120
+ /** Offset from the trigger */
121
+ sideOffset?: number;
122
+ /** Alignment along the side */
123
+ align?: "start" | "center" | "end";
124
+ /** Delay before showing the tooltip (ms) */
125
+ delay?: number;
126
+ /** Delay before hiding the tooltip (ms) */
127
+ closeDelay?: number;
128
+ /** Whether to show an arrow */
129
+ showArrow?: boolean;
130
+ /** Controlled open state */
131
+ open?: boolean;
132
+ /** Default open state */
133
+ defaultOpen?: boolean;
134
+ /** Callback when open state changes */
135
+ onOpenChange?: (open: boolean) => void;
136
+ /** Additional className for the popup */
137
+ className?: string;
138
+ }
139
+ /**
140
+ * Tooltip
141
+ *
142
+ * A simple, pre-composed tooltip component for common use cases.
143
+ *
144
+ * @example
145
+ * ```tsx
146
+ * <Tooltip content="Save your changes">
147
+ * <Button>Save</Button>
148
+ * </Tooltip>
149
+ * ```
150
+ */
151
+ declare const Tooltip: ({ content, children, side, sideOffset, align, delay, closeDelay, showArrow, open, defaultOpen, onOpenChange, className, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
152
+ export declare const TooltipParts: (({ children, ...props }: TooltipRootProps) => import("react/jsx-runtime").JSX.Element) & {
153
+ Provider: ({ children, ...props }: TooltipProviderProps) => import("react/jsx-runtime").JSX.Element;
154
+ Root: ({ children, ...props }: TooltipRootProps) => import("react/jsx-runtime").JSX.Element;
155
+ Trigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
156
+ Portal: ({ children, ...props }: TooltipPortalProps) => import("react/jsx-runtime").JSX.Element;
157
+ Positioner: React.ForwardRefExoticComponent<Omit<TooltipPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
158
+ Popup: React.ForwardRefExoticComponent<Omit<TooltipPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
159
+ Arrow: React.ForwardRefExoticComponent<Omit<TooltipArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
160
+ };
161
+ export { Tooltip, TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipPositioner, TooltipPopup, TooltipArrow, tooltipPopupVariants, tooltipArrowVariants, };
@@ -191,14 +191,14 @@ export interface CardContentProps extends React.HTMLAttributes<HTMLDivElement>,
191
191
  * ```
192
192
  */
193
193
  declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
194
- declare const cardEyebrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-caption-large text-text-muted", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-caption-large text-text-muted", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
194
+ declare const cardEyebrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-overline text-text-muted uppercase tracking-wider", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-overline text-text-muted uppercase tracking-wider", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
195
195
  export interface CardEyebrowProps extends React.HTMLAttributes<HTMLParagraphElement> {
196
196
  }
197
197
  /**
198
198
  * Optional eyebrow text above the card title.
199
199
  */
200
200
  declare const CardEyebrow: React.ForwardRefExoticComponent<CardEyebrowProps & React.RefAttributes<HTMLParagraphElement>>;
201
- declare const cardTitleVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-subheading-small text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-subheading-small text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
201
+ declare const cardTitleVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-h5 text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-h5 text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
202
202
  export interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
203
203
  /**
204
204
  * The heading level to render (h1-h6). Defaults to h3.
@@ -224,7 +224,7 @@ export interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
224
224
  * Uses spatial card tokens for consistent sizing.
225
225
  */
226
226
  declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
227
- declare const cardActionsVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex gap-spacing-12", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "flex gap-spacing-12", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
227
+ declare const cardActionsVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex gap-12", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "flex gap-12", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
228
228
  export interface CardActionsProps extends React.HTMLAttributes<HTMLDivElement> {
229
229
  }
230
230
  /**
@@ -2,7 +2,7 @@ import { VariantProps } from 'tailwind-variants';
2
2
  import { ComponentTheme } from '../../../lib/theme';
3
3
  import * as React from "react";
4
4
  export { Background as HeroBackground, BackgroundGradient as HeroGradient, type BackgroundGradientProps as HeroGradientProps, BackgroundImage as HeroBackgroundImage, type BackgroundImageProps as HeroBackgroundImageProps, BackgroundOverlay as HeroOverlay, type BackgroundOverlayProps as HeroOverlayProps, BackgroundStream as HeroBackgroundStream, type BackgroundStreamProps as HeroBackgroundStreamProps, BackgroundVideo as HeroBackgroundVideo, type BackgroundVideoProps as HeroBackgroundVideoProps, } from '../../atoms/background';
5
- declare const DEFAULT_TITLE_TYPOGRAPHY = "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 lg:text-192 lg:leading-192 lg:tracking-192 font-medium";
5
+ declare const DEFAULT_TITLE_TYPOGRAPHY = "typography-h1-display";
6
6
  declare const heroVariants: import('tailwind-variants').TVReturnType<{
7
7
  variant: {
8
8
  A1: {
@@ -254,7 +254,7 @@ export interface HeroProps extends Omit<React.HTMLAttributes<HTMLElement>, "titl
254
254
  title?: string;
255
255
  /**
256
256
  * Custom typography class for the title using primitive tokens.
257
- * Default: "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 lg:text-192 lg:leading-192 lg:tracking-192"
257
+ * Default: "typography-h1-display"
258
258
  */
259
259
  titleClassName?: string;
260
260
  /**
@@ -29,9 +29,9 @@ export interface ProseSectionProps extends React.HTMLAttributes<HTMLElement> {
29
29
  * A section within Prose content, containing a heading and body text.
30
30
  *
31
31
  * Responsive typography:
32
- * - h2: Uses typography-headline-medium (42px mobile → 56px tablet → 72px desktop)
33
- * - h3: Uses typography-headline-small (32px mobile → 42px tablet → 56px desktop)
34
- * - Body: Uses typography-body-medium (16px mobile/tablet → 18px desktop)
32
+ * - h2: Uses typography-h3
33
+ * - h3: Uses typography-h4
34
+ * - Body: Uses typography-body-medium
35
35
  */
36
36
  declare const ProseSection: React.ForwardRefExoticComponent<ProseSectionProps & React.RefAttributes<HTMLElement>>;
37
37
  export { Prose, ProseSection };
@@ -86,7 +86,7 @@ export interface RiverProps extends React.HTMLAttributes<HTMLElement>, VariantPr
86
86
  * headline="Feature Headline"
87
87
  * body="Description of the feature..."
88
88
  * primaryAction={<Button>Primary</Button>}
89
- * secondaryAction={<Button variant="charcoalOutline">Secondary</Button>}
89
+ * secondaryAction={<Button variant="outline">Secondary</Button>}
90
90
  * media={<img src="..." alt="Feature" />}
91
91
  * />
92
92
  * </div>
@@ -127,9 +127,9 @@ export interface ToutProps extends React.HTMLAttributes<HTMLElement>, VariantPro
127
127
  *
128
128
  * This component is self-contained with its own grid.
129
129
  * Grid setup:
130
- * - Desktop (lg): 24 columns, gap-spacing-20, content spans 9 cols
131
- * - Tablet (md): 12 columns, gap-spacing-20, content spans 9 cols
132
- * - Mobile: 4 columns, gap-spacing-20, content spans all 4 cols
130
+ * - Desktop (lg): 24 columns, gap-20, content spans 9 cols
131
+ * - Tablet (md): 12 columns, gap-20, content spans 9 cols
132
+ * - Mobile: 4 columns, gap-20, content spans all 4 cols
133
133
  *
134
134
  * @example
135
135
  * ```tsx
@@ -137,7 +137,7 @@ export interface ToutProps extends React.HTMLAttributes<HTMLElement>, VariantPro
137
137
  * headline="Feature Headline"
138
138
  * body="Description of the feature..."
139
139
  * primaryAction={<Button>Primary</Button>}
140
- * secondaryAction={<Button variant="charcoalOutline">Secondary</Button>}
140
+ * secondaryAction={<Button variant="outline" colorScheme="light">Secondary</Button>}
141
141
  * backgroundMedia={
142
142
  * <img
143
143
  * src="/background.jpg"
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shared arrow variants for floating UI components
3
+ *
4
+ * Used by Tooltip, Popover, and other floating components.
5
+ * Handles positioning based on the side attribute.
6
+ */
7
+ export declare const floatingArrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
8
+ export interface FloatingArrowSvgProps {
9
+ /** CSS class for the main fill color (e.g., "fill-tooltip-bg" or "fill-overlay-background") */
10
+ fillClassName: string;
11
+ /** CSS class for the border color using fill-* (e.g., "fill-overlay-border") - renders as outline behind main fill */
12
+ borderClassName?: string;
13
+ /** Additional className for the SVG element */
14
+ className?: string;
15
+ }
16
+ /**
17
+ * FloatingArrowSvg
18
+ *
19
+ * A shared arrow SVG component for floating UI elements.
20
+ * Use with Tooltip, Popover, Dropdown, and other floating components.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * // For dark tooltip (no border)
25
+ * <FloatingArrowSvg fillClassName="fill-tooltip-bg" />
26
+ *
27
+ * // For light popover with border
28
+ * <FloatingArrowSvg
29
+ * fillClassName="fill-overlay-background"
30
+ * borderClassName="fill-overlay-border"
31
+ * />
32
+ * ```
33
+ */
34
+ export declare const FloatingArrowSvg: ({ fillClassName, borderClassName, className, }: FloatingArrowSvgProps) => import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,25 @@
1
+ /**
2
+ * @nationaldesignstudio/react
3
+ * Design system components for React applications
4
+ */
1
5
  export type { AccordionItemProps, AccordionProps, } from './components/atoms/accordion';
2
6
  export { Accordion, AccordionItem } from './components/atoms/accordion';
3
7
  export type { BackgroundGradientProps, BackgroundImageProps, BackgroundOverlayProps, BackgroundProps, BackgroundStreamProps, BackgroundVideoProps, } from './components/atoms/background';
4
8
  export { Background, BackgroundGradient, BackgroundImage, BackgroundOverlay, BackgroundStream, BackgroundVideo, backgroundGradientVariants, backgroundImageVariants, backgroundOverlayVariants, backgroundStreamVariants, backgroundVariants, backgroundVideoVariants, } from './components/atoms/background';
5
9
  export type { ButtonProps, IconButtonProps } from './components/atoms/button';
6
10
  export { Button, buttonVariants, IconButton, iconButtonVariants, } from './components/atoms/button';
11
+ export type { InputGroupAddonProps, InputGroupButtonProps, InputGroupInputProps, InputGroupProps, InputGroupTextareaProps, InputGroupTextProps, InputProps, } from './components/atoms/input';
12
+ export { Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupVariants, inputVariants, } from './components/atoms/input';
7
13
  export type { NdstudioFooterProps } from './components/atoms/ndstudio-footer';
8
14
  export { NdstudioFooter } from './components/atoms/ndstudio-footer';
9
15
  export type { PagerControlProps } from './components/atoms/pager-control';
10
16
  export { PagerControl, pagerControlVariants, } from './components/atoms/pager-control';
17
+ export type { PopoverArrowProps, PopoverBackdropProps, PopoverCloseProps, PopoverDescriptionProps, PopoverPopupProps, PopoverPortalProps, PopoverPositionerProps, PopoverProps, PopoverRootProps, PopoverTitleProps, PopoverTriggerProps, } from './components/atoms/popover';
18
+ export { Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverParts, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTitle, PopoverTrigger, popoverArrowVariants, popoverPopupVariants, } from './components/atoms/popover';
19
+ export type { SelectGroupLabelProps, SelectGroupProps, SelectOptionProps, SelectPopupProps, SelectProps, SelectTriggerProps, } from './components/atoms/select';
20
+ export { Select, SelectGroup, SelectGroupLabel, SelectOption, SelectPopup, SelectRoot, SelectTrigger, selectOptionVariants, selectPopupVariants, selectTriggerVariants, } from './components/atoms/select';
21
+ export type { TooltipArrowProps, TooltipPopupProps, TooltipPortalProps, TooltipPositionerProps, TooltipProps, TooltipProviderProps, TooltipRootProps, TooltipTriggerProps, } from './components/atoms/tooltip';
22
+ export { Tooltip, TooltipArrow, TooltipParts, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipRoot, TooltipTrigger, tooltipArrowVariants, tooltipPopupVariants, } from './components/atoms/tooltip';
11
23
  export type { DevToolbarProps, GridOverlayProps } from './components/dev-tools';
12
24
  export { DevToolbar, GridOverlay } from './components/dev-tools';
13
25
  export type { CardActionsProps, CardBodyProps, CardContentProps, CardDescriptionProps, CardEyebrowProps, CardImageProps, CardProps, CardTitleProps, } from './components/organisms/card';