@nationaldesignstudio/react 0.6.0 → 0.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.
Files changed (106) hide show
  1. package/dist/accordion/index.d.ts +95 -0
  2. package/dist/accordion/index.js +143 -0
  3. package/dist/accordion/index.js.map +1 -0
  4. package/dist/background/index.d.ts +149 -0
  5. package/dist/background/index.js +200 -0
  6. package/dist/background/index.js.map +1 -0
  7. package/dist/banner/index.d.ts +101 -0
  8. package/dist/banner/index.js +81 -0
  9. package/dist/banner/index.js.map +1 -0
  10. package/dist/blurred-video-backdrop/index.d.ts +233 -0
  11. package/dist/blurred-video-backdrop/index.js +266 -0
  12. package/dist/blurred-video-backdrop/index.js.map +1 -0
  13. package/dist/button/index.d.ts +180 -0
  14. package/dist/button/index.js +169 -0
  15. package/dist/button/index.js.map +1 -0
  16. package/dist/button-B2g5fH9b.d.ts +152 -0
  17. package/dist/card/index.d.ts +406 -0
  18. package/dist/card/index.js +219 -0
  19. package/dist/card/index.js.map +1 -0
  20. package/dist/card-grid/index.d.ts +90 -0
  21. package/dist/card-grid/index.js +74 -0
  22. package/dist/card-grid/index.js.map +1 -0
  23. package/dist/component-registry.md +136 -2
  24. package/dist/dev-toolbar/index.d.ts +8 -0
  25. package/dist/dev-toolbar/index.js +206 -0
  26. package/dist/dev-toolbar/index.js.map +1 -0
  27. package/dist/dialog/index.d.ts +268 -0
  28. package/dist/dialog/index.js +288 -0
  29. package/dist/dialog/index.js.map +1 -0
  30. package/dist/faq-section/index.d.ts +47 -0
  31. package/dist/faq-section/index.js +152 -0
  32. package/dist/faq-section/index.js.map +1 -0
  33. package/dist/grid-overlay/index.d.ts +10 -0
  34. package/dist/grid-overlay/index.js +38 -0
  35. package/dist/grid-overlay/index.js.map +1 -0
  36. package/dist/hero/index.d.ts +462 -0
  37. package/dist/hero/index.js +494 -0
  38. package/dist/hero/index.js.map +1 -0
  39. package/dist/hooks/index.d.ts +150 -0
  40. package/dist/hooks/index.js +339 -0
  41. package/dist/hooks/index.js.map +1 -0
  42. package/dist/index.d.ts +46 -5339
  43. package/dist/index.js +157 -4080
  44. package/dist/index.js.map +1 -1
  45. package/dist/input/index.d.ts +404 -0
  46. package/dist/input/index.js +393 -0
  47. package/dist/input/index.js.map +1 -0
  48. package/dist/navbar/index.d.ts +68 -0
  49. package/dist/navbar/index.js +227 -0
  50. package/dist/navbar/index.js.map +1 -0
  51. package/dist/ndstudio-footer/index.d.ts +32 -0
  52. package/dist/ndstudio-footer/index.js +35 -0
  53. package/dist/ndstudio-footer/index.js.map +1 -0
  54. package/dist/pager-control/index.d.ts +173 -0
  55. package/dist/pager-control/index.js +267 -0
  56. package/dist/pager-control/index.js.map +1 -0
  57. package/dist/popover/index.d.ts +200 -0
  58. package/dist/popover/index.js +290 -0
  59. package/dist/popover/index.js.map +1 -0
  60. package/dist/prose/index.d.ts +39 -0
  61. package/dist/prose/index.js +56 -0
  62. package/dist/prose/index.js.map +1 -0
  63. package/dist/quote-block/index.d.ts +156 -0
  64. package/dist/quote-block/index.js +321 -0
  65. package/dist/quote-block/index.js.map +1 -0
  66. package/dist/river/index.d.ts +100 -0
  67. package/dist/river/index.js +107 -0
  68. package/dist/river/index.js.map +1 -0
  69. package/dist/select/index.d.ts +188 -0
  70. package/dist/select/index.js +295 -0
  71. package/dist/select/index.js.map +1 -0
  72. package/dist/theme/index.d.ts +149 -0
  73. package/dist/theme/index.js +211 -0
  74. package/dist/theme/index.js.map +1 -0
  75. package/dist/theme-CzBPUlh_.d.ts +332 -0
  76. package/dist/tooltip/index.d.ts +166 -0
  77. package/dist/tooltip/index.js +200 -0
  78. package/dist/tooltip/index.js.map +1 -0
  79. package/dist/tout/index.d.ts +157 -0
  80. package/dist/tout/index.js +315 -0
  81. package/dist/tout/index.js.map +1 -0
  82. package/dist/two-column-section/index.d.ts +122 -0
  83. package/dist/two-column-section/index.js +121 -0
  84. package/dist/two-column-section/index.js.map +1 -0
  85. package/dist/us-gov-banner/index.d.ts +141 -0
  86. package/dist/us-gov-banner/index.js +74 -0
  87. package/dist/us-gov-banner/index.js.map +1 -0
  88. package/dist/use-captions-AkKlJhov.d.ts +71 -0
  89. package/dist/utils/index.d.ts +7 -0
  90. package/dist/utils/index.js +12 -0
  91. package/dist/utils/index.js.map +1 -0
  92. package/dist/video-dialog/index.d.ts +106 -0
  93. package/dist/video-dialog/index.js +1305 -0
  94. package/dist/video-dialog/index.js.map +1 -0
  95. package/dist/video-player/index.d.ts +115 -0
  96. package/dist/video-player/index.js +879 -0
  97. package/dist/video-player/index.js.map +1 -0
  98. package/dist/video-player-qxf-BURH.d.ts +236 -0
  99. package/dist/video-with-backdrop/index.d.ts +267 -0
  100. package/dist/video-with-backdrop/index.js +1284 -0
  101. package/dist/video-with-backdrop/index.js.map +1 -0
  102. package/package.json +13 -2
  103. package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +5 -27
  104. package/src/theme/hooks.ts +2 -0
  105. package/src/theme/index.ts +2 -0
  106. package/src/theme/theme-provider.tsx +2 -0
@@ -0,0 +1,200 @@
1
+ "use client";
2
+ import { Tooltip as Tooltip$1 } from '@base-ui-components/react/tooltip';
3
+ import * as React from 'react';
4
+ import { tv, cnBase } from 'tailwind-variants';
5
+ import { clsx } from 'clsx';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ // src/components/atoms/tooltip/tooltip.tsx
9
+ function cn(...inputs) {
10
+ return cnBase(clsx(inputs));
11
+ }
12
+ var floatingArrowVariants = tv({
13
+ base: [
14
+ // Display flex to properly size the arrow container
15
+ "flex",
16
+ // Positioning based on floating side (uses spacing tokens since --spacing: 1px)
17
+ "data-[side=bottom]:-top-7",
18
+ "data-[side=left]:-right-12 data-[side=left]:rotate-90",
19
+ "data-[side=right]:-left-12 data-[side=right]:-rotate-90",
20
+ "data-[side=top]:-bottom-7 data-[side=top]:rotate-180",
21
+ // Animation - follows popup
22
+ "data-[starting-style]:opacity-0",
23
+ "data-[ending-style]:opacity-0"
24
+ ]
25
+ });
26
+ var FloatingArrowSvg = ({
27
+ fillClassName,
28
+ borderClassName,
29
+ className
30
+ }) => /* @__PURE__ */ jsxs(
31
+ "svg",
32
+ {
33
+ width: "20",
34
+ height: "10",
35
+ viewBox: "0 0 20 10",
36
+ fill: "none",
37
+ className: cn("block", className),
38
+ "aria-hidden": "true",
39
+ children: [
40
+ /* @__PURE__ */ jsx(
41
+ "path",
42
+ {
43
+ d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
44
+ className: fillClassName
45
+ }
46
+ ),
47
+ borderClassName && /* @__PURE__ */ jsx(
48
+ "path",
49
+ {
50
+ d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",
51
+ className: borderClassName
52
+ }
53
+ )
54
+ ]
55
+ }
56
+ );
57
+ var tooltipPopupVariants = tv({
58
+ base: [
59
+ // Layout - uses component tooltip tokens
60
+ "px-spatial-component-tooltip-padding-x py-spatial-component-tooltip-padding-y",
61
+ // Background and text - uses tooltip color tokens
62
+ "bg-tooltip-bg text-tooltip-text",
63
+ // Border radius - uses surface tooltip token
64
+ "rounded-surface-tooltip",
65
+ // Typography - uses semantic body text composite
66
+ "typography-body-sm-md font-medium",
67
+ // Shadow for elevation
68
+ "shadow-md",
69
+ // Allow arrow to extend outside popup bounds
70
+ "overflow-visible",
71
+ // Animation
72
+ "origin-[var(--transform-origin)]",
73
+ "transition-[transform,scale,opacity] duration-150",
74
+ "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
75
+ "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
76
+ // Ensure it's above other content
77
+ "z-50"
78
+ ],
79
+ variants: {
80
+ variant: {
81
+ default: ""
82
+ // Future variants can be added here (e.g., light, primary)
83
+ }
84
+ },
85
+ defaultVariants: {
86
+ variant: "default"
87
+ }
88
+ });
89
+ var tooltipArrowVariants = floatingArrowVariants;
90
+ var TooltipProvider = ({ children, ...props }) => {
91
+ return /* @__PURE__ */ jsx(Tooltip$1.Provider, { ...props, children });
92
+ };
93
+ var TooltipRoot = ({ children, ...props }) => {
94
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, { ...props, children });
95
+ };
96
+ var TooltipTrigger = React.forwardRef(
97
+ ({ className, children, ...props }, ref) => {
98
+ const isSingleElement = React.isValidElement(children);
99
+ if (isSingleElement) {
100
+ return /* @__PURE__ */ jsx(
101
+ Tooltip$1.Trigger,
102
+ {
103
+ ref,
104
+ className,
105
+ render: children,
106
+ ...props
107
+ }
108
+ );
109
+ }
110
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { ref, className, ...props, children });
111
+ }
112
+ );
113
+ TooltipTrigger.displayName = "TooltipTrigger";
114
+ var TooltipPortal = ({ children, ...props }) => {
115
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { ...props, children });
116
+ };
117
+ var TooltipPositioner = React.forwardRef(({ className, side = "top", sideOffset = 8, ...props }, ref) => {
118
+ return /* @__PURE__ */ jsx(
119
+ Tooltip$1.Positioner,
120
+ {
121
+ ref,
122
+ side,
123
+ sideOffset,
124
+ className,
125
+ ...props
126
+ }
127
+ );
128
+ });
129
+ TooltipPositioner.displayName = "TooltipPositioner";
130
+ var TooltipPopup = React.forwardRef(
131
+ ({ className, variant, ...props }, ref) => {
132
+ return /* @__PURE__ */ jsx(
133
+ Tooltip$1.Popup,
134
+ {
135
+ ref,
136
+ role: "tooltip",
137
+ className: cn(tooltipPopupVariants({ variant }), className),
138
+ ...props
139
+ }
140
+ );
141
+ }
142
+ );
143
+ TooltipPopup.displayName = "TooltipPopup";
144
+ var TooltipArrow = React.forwardRef(
145
+ ({ className, ...props }, ref) => {
146
+ return /* @__PURE__ */ jsx(
147
+ Tooltip$1.Arrow,
148
+ {
149
+ ref,
150
+ className: cn(tooltipArrowVariants(), className),
151
+ ...props,
152
+ children: /* @__PURE__ */ jsx(FloatingArrowSvg, { fillClassName: "fill-tooltip-bg" })
153
+ }
154
+ );
155
+ }
156
+ );
157
+ TooltipArrow.displayName = "TooltipArrow";
158
+ var Tooltip = ({
159
+ content,
160
+ children,
161
+ side = "top",
162
+ sideOffset = 8,
163
+ align = "center",
164
+ delay,
165
+ closeDelay,
166
+ showArrow = true,
167
+ open,
168
+ defaultOpen,
169
+ onOpenChange,
170
+ className
171
+ }) => {
172
+ return /* @__PURE__ */ jsxs(
173
+ TooltipRoot,
174
+ {
175
+ open,
176
+ defaultOpen,
177
+ onOpenChange,
178
+ children: [
179
+ /* @__PURE__ */ jsx(TooltipTrigger, { delay, closeDelay, children }),
180
+ /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, { side, sideOffset, align, children: /* @__PURE__ */ jsxs(TooltipPopup, { className, children: [
181
+ showArrow && /* @__PURE__ */ jsx(TooltipArrow, {}),
182
+ content
183
+ ] }) }) })
184
+ ]
185
+ }
186
+ );
187
+ };
188
+ var TooltipParts = Object.assign(TooltipRoot, {
189
+ Provider: TooltipProvider,
190
+ Root: TooltipRoot,
191
+ Trigger: TooltipTrigger,
192
+ Portal: TooltipPortal,
193
+ Positioner: TooltipPositioner,
194
+ Popup: TooltipPopup,
195
+ Arrow: TooltipArrow
196
+ });
197
+
198
+ export { Tooltip, TooltipArrow, TooltipParts, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipRoot, TooltipTrigger, tooltipArrowVariants, tooltipPopupVariants };
199
+ //# sourceMappingURL=index.js.map
200
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/shared/floating-arrow.tsx","../../src/components/atoms/tooltip/tooltip.tsx"],"names":["twMerge","tv","jsx","BaseTooltip","jsxs"],"mappings":";;;;;;;AAKO,SAAS,MAAM,MAAA,EAAsB;AAC3C,EAAA,OAAOA,MAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC5B;ACEO,IAAM,wBAAwB,EAAA,CAAG;AAAA,EACvC,IAAA,EAAM;AAAA;AAAA,IAEL,MAAA;AAAA;AAAA,IAEA,2BAAA;AAAA,IACA,uDAAA;AAAA,IACA,yDAAA;AAAA,IACA,sDAAA;AAAA;AAAA,IAEA,iCAAA;AAAA,IACA;AAAA;AAEF,CAAC,CAAA;AA6BM,IAAM,mBAAmB,CAAC;AAAA,EAChC,aAAA;AAAA,EACA,eAAA;AAAA,EACA;AACD,CAAA,qBACC,IAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACA,KAAA,EAAM,IAAA;AAAA,IACN,MAAA,EAAO,IAAA;AAAA,IACP,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,EAAK,MAAA;AAAA,IACL,SAAA,EAAW,EAAA,CAAG,OAAA,EAAS,SAAS,CAAA;AAAA,IAChC,aAAA,EAAY,MAAA;AAAA,IAGZ,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACA,CAAA,EAAE,iMAAA;AAAA,UACF,SAAA,EAAW;AAAA;AAAA,OACZ;AAAA,MAEC,eAAA,oBACA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACA,CAAA,EAAE,kSAAA;AAAA,UACF,SAAA,EAAW;AAAA;AAAA;AACZ;AAAA;AAEF,CAAA;ACxDD,IAAM,uBAAuBC,EAAAA,CAAG;AAAA,EAC/B,IAAA,EAAM;AAAA;AAAA,IAEL,+EAAA;AAAA;AAAA,IAEA,iCAAA;AAAA;AAAA,IAEA,yBAAA;AAAA;AAAA,IAEA,mC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,YAAA;AAAA,EACP,KAAA,EAAO;AACR,CAAC","file":"index.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { cnBase as twMerge } from \"tailwind-variants\";\n\nexport { twMerge };\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { tv } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Shared arrow variants for floating UI components\n *\n * Used by Tooltip, Popover, and other floating components.\n * Handles positioning based on the side attribute.\n */\nexport const floatingArrowVariants = tv({\n\tbase: [\n\t\t// Display flex to properly size the arrow container\n\t\t\"flex\",\n\t\t// Positioning based on floating side (uses spacing tokens since --spacing: 1px)\n\t\t\"data-[side=bottom]:-top-7\",\n\t\t\"data-[side=left]:-right-12 data-[side=left]:rotate-90\",\n\t\t\"data-[side=right]:-left-12 data-[side=right]:-rotate-90\",\n\t\t\"data-[side=top]:-bottom-7 data-[side=top]:rotate-180\",\n\t\t// Animation - follows popup\n\t\t\"data-[starting-style]:opacity-0\",\n\t\t\"data-[ending-style]:opacity-0\",\n\t],\n});\n\nexport interface FloatingArrowSvgProps {\n\t/** CSS class for the main fill color (e.g., \"fill-tooltip-bg\" or \"fill-overlay-background\") */\n\tfillClassName: string;\n\t/** CSS class for the border color using fill-* (e.g., \"fill-overlay-border\") - renders as outline behind main fill */\n\tborderClassName?: string;\n\t/** Additional className for the SVG element */\n\tclassName?: string;\n}\n\n/**\n * FloatingArrowSvg\n *\n * A shared arrow SVG component for floating UI elements.\n * Use with Tooltip, Popover, Dropdown, and other floating components.\n *\n * @example\n * ```tsx\n * // For dark tooltip (no border)\n * <FloatingArrowSvg fillClassName=\"fill-tooltip-bg\" />\n *\n * // For light popover with border\n * <FloatingArrowSvg\n * fillClassName=\"fill-overlay-background\"\n * borderClassName=\"fill-overlay-border\"\n * />\n * ```\n */\nexport const FloatingArrowSvg = ({\n\tfillClassName,\n\tborderClassName,\n\tclassName,\n}: FloatingArrowSvgProps) => (\n\t<svg\n\t\twidth=\"20\"\n\t\theight=\"10\"\n\t\tviewBox=\"0 0 20 10\"\n\t\tfill=\"none\"\n\t\tclassName={cn(\"block\", className)}\n\t\taria-hidden=\"true\"\n\t>\n\t\t{/* Main fill shape */}\n\t\t<path\n\t\t\td=\"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z\"\n\t\t\tclassName={fillClassName}\n\t\t/>\n\t\t{/* Border stroke (rendered on top for outline effect) */}\n\t\t{borderClassName && (\n\t\t\t<path\n\t\t\t\td=\"M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z\"\n\t\t\t\tclassName={borderClassName}\n\t\t\t/>\n\t\t)}\n\t</svg>\n);\n","\"use client\";\n\nimport { Tooltip as BaseTooltip } from \"@base-ui-components/react/tooltip\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\nimport {\n\tFloatingArrowSvg,\n\tfloatingArrowVariants,\n} from \"../../shared/floating-arrow\";\n\n/**\n * Tooltip popup variants\n *\n * Uses semantic tokens for themeable styling:\n * - color.tooltip.bg - Dark background\n * - color.tooltip.text - Light text\n * - surface.tooltip.radius - Small border radius\n * - spatial.component.tooltip.padding-x/y - Consistent padding\n */\nconst tooltipPopupVariants = tv({\n\tbase: [\n\t\t// Layout - uses component tooltip tokens\n\t\t\"px-spatial-component-tooltip-padding-x py-spatial-component-tooltip-padding-y\",\n\t\t// Background and text - uses tooltip color tokens\n\t\t\"bg-tooltip-bg text-tooltip-text\",\n\t\t// Border radius - uses surface tooltip token\n\t\t\"rounded-surface-tooltip\",\n\t\t// Typography - uses semantic body text composite\n\t\t\"typography-body-sm-md font-medium\",\n\t\t// Shadow for elevation\n\t\t\"shadow-md\",\n\t\t// Allow arrow to extend outside popup bounds\n\t\t\"overflow-visible\",\n\t\t// Animation\n\t\t\"origin-[var(--transform-origin)]\",\n\t\t\"transition-[transform,scale,opacity] duration-150\",\n\t\t\"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n\t\t\"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n\t\t// Ensure it's above other content\n\t\t\"z-50\",\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: \"\",\n\t\t\t// Future variants can be added here (e.g., light, primary)\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t},\n});\n\n/**\n * Tooltip arrow variants - uses shared floating arrow variants\n */\nconst tooltipArrowVariants = floatingArrowVariants;\n\n// ============================================================================\n// Tooltip Provider\n// ============================================================================\n\nexport interface TooltipProviderProps extends BaseTooltip.Provider.Props {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Tooltip Provider\n *\n * Manages shared delays across multiple tooltips.\n * Wrap your app or a section with this to enable tooltip delay grouping.\n */\nconst TooltipProvider = ({ children, ...props }: TooltipProviderProps) => {\n\treturn <BaseTooltip.Provider {...props}>{children}</BaseTooltip.Provider>;\n};\n\n// ============================================================================\n// Tooltip Root\n// ============================================================================\n\nexport interface TooltipRootProps extends BaseTooltip.Root.Props {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Tooltip Root\n *\n * Groups all tooltip parts. Does not render an element.\n */\nconst TooltipRoot = ({ children, ...props }: TooltipRootProps) => {\n\treturn <BaseTooltip.Root {...props}>{children}</BaseTooltip.Root>;\n};\n\n// ============================================================================\n// Tooltip Trigger\n// ============================================================================\n\nexport interface TooltipTriggerProps\n\textends React.ComponentProps<typeof BaseTooltip.Trigger> {\n\tclassName?: string;\n}\n\n/**\n * Tooltip Trigger\n *\n * The element that triggers the tooltip on hover/focus.\n * Renders as the child element with tooltip behavior attached.\n * When children is a single React element, uses `render` prop to avoid wrapper element.\n */\nconst TooltipTrigger = React.forwardRef<HTMLButtonElement, TooltipTriggerProps>(\n\t({ className, children, ...props }, ref) => {\n\t\t// If children is a single React element, use render prop to avoid wrapper\n\t\tconst isSingleElement = React.isValidElement(children);\n\n\t\tif (isSingleElement) {\n\t\t\treturn (\n\t\t\t\t<BaseTooltip.Trigger\n\t\t\t\t\tref={ref}\n\t\t\t\t\tclassName={className}\n\t\t\t\t\trender={children as React.ReactElement<Record<string, unknown>>}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<BaseTooltip.Trigger ref={ref} className={className} {...props}>\n\t\t\t\t{children}\n\t\t\t</BaseTooltip.Trigger>\n\t\t);\n\t},\n);\nTooltipTrigger.displayName = \"TooltipTrigger\";\n\n// ============================================================================\n// Tooltip Portal\n// ============================================================================\n\nexport interface TooltipPortalProps extends BaseTooltip.Portal.Props {\n\tchildren: React.ReactNode;\n}\n\n/**\n * Tooltip Portal\n *\n * Renders the tooltip popup in a portal outside the DOM hierarchy.\n */\nconst TooltipPortal = ({ children, ...props }: TooltipPortalProps) => {\n\treturn <BaseTooltip.Portal {...props}>{children}</BaseTooltip.Portal>;\n};\n\n// ============================================================================\n// Tooltip Positioner\n// ============================================================================\n\nexport interface TooltipPositionerProps\n\textends Omit<\n\t\tReact.ComponentProps<typeof BaseTooltip.Positioner>,\n\t\t\"className\"\n\t> {\n\tclassName?: string;\n}\n\n/**\n * Tooltip Positioner\n *\n * Positions the tooltip popup relative to the trigger.\n */\nconst TooltipPositioner = React.forwardRef<\n\tHTMLDivElement,\n\tTooltipPositionerProps\n>(({ className, side = \"top\", sideOffset = 8, ...props }, ref) => {\n\treturn (\n\t\t<BaseTooltip.Positioner\n\t\t\tref={ref}\n\t\t\tside={side}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={className}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nTooltipPositioner.displayName = \"TooltipPositioner\";\n\n// ============================================================================\n// Tooltip Popup\n// ============================================================================\n\nexport interface TooltipPopupProps\n\textends Omit<React.ComponentProps<typeof BaseTooltip.Popup>, \"className\">,\n\t\tVariantProps<typeof tooltipPopupVariants> {\n\tclassName?: string;\n}\n\n/**\n * Tooltip Popup\n *\n * The tooltip content container with styled appearance.\n */\nconst TooltipPopup = React.forwardRef<HTMLDivElement, TooltipPopupProps>(\n\t({ className, variant, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BaseTooltip.Popup\n\t\t\t\tref={ref}\n\t\t\t\trole=\"tooltip\"\n\t\t\t\tclassName={cn(tooltipPopupVariants({ variant }), className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nTooltipPopup.displayName = \"TooltipPopup\";\n\n// ============================================================================\n// Tooltip Arrow\n// ============================================================================\n\nexport interface TooltipArrowProps\n\textends Omit<React.ComponentProps<typeof BaseTooltip.Arrow>, \"className\"> {\n\tclassName?: string;\n}\n\n/**\n * Tooltip Arrow\n *\n * Visual pointer element for the tooltip.\n * Uses shared FloatingArrowSvg with tooltip-bg color token.\n */\nconst TooltipArrow = React.forwardRef<HTMLDivElement, TooltipArrowProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BaseTooltip.Arrow\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(tooltipArrowVariants(), className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<FloatingArrowSvg fillClassName=\"fill-tooltip-bg\" />\n\t\t\t</BaseTooltip.Arrow>\n\t\t);\n\t},\n);\nTooltipArrow.displayName = \"TooltipArrow\";\n\n// ============================================================================\n// Simple Tooltip Component\n// ============================================================================\n\nexport interface TooltipProps {\n\t/** The content to show in the tooltip */\n\tcontent: React.ReactNode;\n\t/** The element that triggers the tooltip */\n\tchildren: React.ReactNode;\n\t/** Side of the trigger to show the tooltip */\n\tside?: \"top\" | \"bottom\" | \"left\" | \"right\";\n\t/** Offset from the trigger */\n\tsideOffset?: number;\n\t/** Alignment along the side */\n\talign?: \"start\" | \"center\" | \"end\";\n\t/** Delay before showing the tooltip (ms) */\n\tdelay?: number;\n\t/** Delay before hiding the tooltip (ms) */\n\tcloseDelay?: number;\n\t/** Whether to show an arrow */\n\tshowArrow?: boolean;\n\t/** Controlled open state */\n\topen?: boolean;\n\t/** Default open state */\n\tdefaultOpen?: boolean;\n\t/** Callback when open state changes */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Additional className for the popup */\n\tclassName?: string;\n}\n\n/**\n * Tooltip\n *\n * A simple, pre-composed tooltip component for common use cases.\n *\n * @example\n * ```tsx\n * <Tooltip content=\"Save your changes\">\n * <Button>Save</Button>\n * </Tooltip>\n * ```\n */\nconst Tooltip = ({\n\tcontent,\n\tchildren,\n\tside = \"top\",\n\tsideOffset = 8,\n\talign = \"center\",\n\tdelay,\n\tcloseDelay,\n\tshowArrow = true,\n\topen,\n\tdefaultOpen,\n\tonOpenChange,\n\tclassName,\n}: TooltipProps) => {\n\treturn (\n\t\t<TooltipRoot\n\t\t\topen={open}\n\t\t\tdefaultOpen={defaultOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t>\n\t\t\t<TooltipTrigger delay={delay} closeDelay={closeDelay}>\n\t\t\t\t{children}\n\t\t\t</TooltipTrigger>\n\t\t\t<TooltipPortal>\n\t\t\t\t<TooltipPositioner side={side} sideOffset={sideOffset} align={align}>\n\t\t\t\t\t<TooltipPopup className={className}>\n\t\t\t\t\t\t{showArrow && <TooltipArrow />}\n\t\t\t\t\t\t{content}\n\t\t\t\t\t</TooltipPopup>\n\t\t\t\t</TooltipPositioner>\n\t\t\t</TooltipPortal>\n\t\t</TooltipRoot>\n\t);\n};\n\n// ============================================================================\n// Compound Component Export\n// ============================================================================\n\nexport const TooltipParts = Object.assign(TooltipRoot, {\n\tProvider: TooltipProvider,\n\tRoot: TooltipRoot,\n\tTrigger: TooltipTrigger,\n\tPortal: TooltipPortal,\n\tPositioner: TooltipPositioner,\n\tPopup: TooltipPopup,\n\tArrow: TooltipArrow,\n});\n\nexport {\n\tTooltip,\n\tTooltipProvider,\n\tTooltipRoot,\n\tTooltipTrigger,\n\tTooltipPortal,\n\tTooltipPositioner,\n\tTooltipPopup,\n\tTooltipArrow,\n\ttooltipPopupVariants,\n\ttooltipArrowVariants,\n};\n"]}
@@ -0,0 +1,157 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
4
+ import * as React from 'react';
5
+ import { a as ComponentTheme } from '../theme-CzBPUlh_.js';
6
+
7
+ /**
8
+ * Tout variants for background and content styling
9
+ */
10
+ declare const toutVariants: tailwind_variants.TVReturnType<{
11
+ colorScheme: {
12
+ light: string;
13
+ dark: string;
14
+ };
15
+ align: {
16
+ left: string;
17
+ center: string;
18
+ };
19
+ }, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
20
+ colorScheme: {
21
+ light: string;
22
+ dark: string;
23
+ };
24
+ align: {
25
+ left: string;
26
+ center: string;
27
+ };
28
+ }, {
29
+ colorScheme: {
30
+ light: string;
31
+ dark: string;
32
+ };
33
+ align: {
34
+ left: string;
35
+ center: string;
36
+ };
37
+ }>, {
38
+ colorScheme: {
39
+ light: string;
40
+ dark: string;
41
+ };
42
+ align: {
43
+ left: string;
44
+ center: string;
45
+ };
46
+ }, undefined, tailwind_variants.TVReturnType<{
47
+ colorScheme: {
48
+ light: string;
49
+ dark: string;
50
+ };
51
+ align: {
52
+ left: string;
53
+ center: string;
54
+ };
55
+ }, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
56
+ colorScheme: {
57
+ light: string;
58
+ dark: string;
59
+ };
60
+ align: {
61
+ left: string;
62
+ center: string;
63
+ };
64
+ }, {
65
+ colorScheme: {
66
+ light: string;
67
+ dark: string;
68
+ };
69
+ align: {
70
+ left: string;
71
+ center: string;
72
+ };
73
+ }>, unknown, unknown, undefined>>;
74
+ /**
75
+ * Tout component based on Figma BaseKit / Touts
76
+ *
77
+ * A full-bleed section with a background image and overlaid content.
78
+ * Content can be positioned on the left side or centered.
79
+ *
80
+ * Color schemes:
81
+ * - light: Light text styling (default)
82
+ * - dark: Dark text styling
83
+ *
84
+ * Alignment:
85
+ * - left: Content aligned to the left (default)
86
+ * - center: Content centered
87
+ *
88
+ * Responsive behavior:
89
+ * - Mobile (sm): 600px height, 4 columns with gap-20, content spans all 4 cols
90
+ * - Tablet (md): 750px height, 12 columns with gap-20, content spans 9 cols (left) or centered
91
+ * - Desktop (lg): 900px height, 24 columns with gap-20, content spans 9 cols (left) or centered
92
+ *
93
+ * This component is self-contained - do NOT wrap in a grid-container.
94
+ */
95
+ interface ToutProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof toutVariants> {
96
+ /**
97
+ * The headline displayed in the tout
98
+ */
99
+ headline: React.ReactNode;
100
+ /**
101
+ * The body text displayed below the headline (optional)
102
+ */
103
+ body?: string;
104
+ /**
105
+ * Primary action button (required)
106
+ */
107
+ primaryAction: React.ReactNode;
108
+ /**
109
+ * Secondary action button (optional)
110
+ */
111
+ secondaryAction?: React.ReactNode;
112
+ /**
113
+ * Background media (image or video element)
114
+ * Should be a full-bleed element that covers the entire section
115
+ */
116
+ backgroundMedia: React.ReactNode;
117
+ /**
118
+ * Optional footer content to display at the bottom of the section.
119
+ * Use with NdstudioFooter component for the branded footer.
120
+ */
121
+ footer?: React.ReactNode;
122
+ /**
123
+ * Component-level theme overrides.
124
+ * Allows customization of colors, spacing, and surface properties.
125
+ */
126
+ theme?: ComponentTheme;
127
+ }
128
+ /**
129
+ * Tout component for hero-like sections with background media and overlaid content.
130
+ *
131
+ * This component is self-contained with its own grid.
132
+ * Grid setup:
133
+ * - Desktop (lg): 24 columns, gap-20, content spans 9 cols
134
+ * - Tablet (md): 12 columns, gap-20, content spans 9 cols
135
+ * - Mobile: 4 columns, gap-20, content spans all 4 cols
136
+ *
137
+ * @example
138
+ * ```tsx
139
+ * <Tout
140
+ * headline="Feature Headline"
141
+ * body="Description of the feature..."
142
+ * primaryAction={<Button>Primary</Button>}
143
+ * secondaryAction={<Button variant="outline" colorScheme="light">Secondary</Button>}
144
+ * backgroundMedia={
145
+ * <img
146
+ * src="/background.jpg"
147
+ * alt=""
148
+ * className="absolute inset-0 w-full h-full object-cover"
149
+ * />
150
+ * }
151
+ * footer={<NdstudioFooter />}
152
+ * />
153
+ * ```
154
+ */
155
+ declare const Tout: React.ForwardRefExoticComponent<ToutProps & React.RefAttributes<HTMLElement>>;
156
+
157
+ export { Tout, type ToutProps };