@dinofront/design_system 1.0.0 → 1.1.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 (105) hide show
  1. package/dist/FormField-CwRAOtTN.js +170 -0
  2. package/dist/FormField-CwRAOtTN.js.map +1 -0
  3. package/dist/components/Accordion/Accordion.types.d.ts +4 -0
  4. package/dist/components/Badge/Badge.types.d.ts +11 -0
  5. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +19 -0
  7. package/dist/components/Breadcrumb/index.d.ts +2 -0
  8. package/dist/components/CardGroup/CardGroup.d.ts +2 -0
  9. package/dist/components/CardGroup/CardGroup.types.d.ts +19 -0
  10. package/dist/components/CardGroup/index.d.ts +2 -0
  11. package/dist/components/Copy/Copy.d.ts +2 -0
  12. package/dist/components/Copy/Copy.types.d.ts +17 -0
  13. package/dist/components/Copy/index.d.ts +2 -0
  14. package/dist/components/Counter/Counter.d.ts +2 -0
  15. package/dist/components/Counter/Counter.types.d.ts +20 -0
  16. package/dist/components/Counter/index.d.ts +2 -0
  17. package/dist/components/DistributionBar/DistributionBar.d.ts +2 -0
  18. package/dist/components/DistributionBar/DistributionBar.types.d.ts +20 -0
  19. package/dist/components/DistributionBar/index.d.ts +2 -0
  20. package/dist/components/Drawer/Drawer.types.d.ts +4 -0
  21. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +22 -2
  22. package/dist/components/Empty/Empty.d.ts +2 -0
  23. package/dist/components/Empty/Empty.types.d.ts +12 -0
  24. package/dist/components/Empty/index.d.ts +2 -0
  25. package/dist/components/FormContainer/FormContainer.d.ts +2 -0
  26. package/dist/components/FormContainer/FormContainer.types.d.ts +18 -0
  27. package/dist/components/FormContainer/index.d.ts +2 -0
  28. package/dist/components/FormField/FormField.d.ts +2 -0
  29. package/dist/components/FormField/FormField.types.d.ts +22 -0
  30. package/dist/components/FormField/index.d.ts +2 -0
  31. package/dist/components/Input/Input.types.d.ts +2 -0
  32. package/dist/components/Link/Link.d.ts +2 -0
  33. package/dist/components/Link/Link.types.d.ts +15 -0
  34. package/dist/components/Link/index.d.ts +2 -0
  35. package/dist/components/MultiSelect/MultiSelect.types.d.ts +8 -0
  36. package/dist/components/Popover/Popover.d.ts +2 -0
  37. package/dist/components/Popover/Popover.types.d.ts +29 -0
  38. package/dist/components/Popover/index.d.ts +2 -0
  39. package/dist/components/ReadMore/ReadMore.d.ts +2 -0
  40. package/dist/components/ReadMore/ReadMore.types.d.ts +17 -0
  41. package/dist/components/ReadMore/index.d.ts +2 -0
  42. package/dist/components/Select/Select.types.d.ts +2 -0
  43. package/dist/components/StepIndicator/StepIndicator.d.ts +2 -0
  44. package/dist/components/StepIndicator/StepIndicator.types.d.ts +24 -0
  45. package/dist/components/StepIndicator/index.d.ts +2 -0
  46. package/dist/components/Tabs/Tabs.types.d.ts +16 -1
  47. package/dist/components/Text/Text.types.d.ts +2 -0
  48. package/dist/components/TextArea/TextArea.types.d.ts +2 -0
  49. package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +2 -0
  50. package/dist/components/ThemeSwitch/ThemeSwitch.types.d.ts +7 -0
  51. package/dist/components/ThemeSwitch/index.d.ts +2 -0
  52. package/dist/components/UnderConstruction/UnderConstruction.d.ts +2 -0
  53. package/dist/components/UnderConstruction/UnderConstruction.types.d.ts +12 -0
  54. package/dist/components/UnderConstruction/index.d.ts +2 -0
  55. package/dist/components/Upload/Upload.types.d.ts +31 -2
  56. package/dist/components/Upload/index.d.ts +1 -1
  57. package/dist/form/index.d.ts +2 -0
  58. package/dist/form.d.ts +2 -0
  59. package/dist/form.js +2 -0
  60. package/dist/hooks/index.d.ts +2 -0
  61. package/dist/hooks/useStepper.d.ts +27 -0
  62. package/dist/icons/brands/AppleIcon.d.ts +1 -0
  63. package/dist/icons/brands/FacebookIcon.d.ts +1 -0
  64. package/dist/icons/brands/GoogleIcon.d.ts +1 -0
  65. package/dist/icons/brands/InstagramIcon.d.ts +1 -0
  66. package/dist/icons/brands/LinkedinIcon.d.ts +1 -0
  67. package/dist/icons/brands/MediumIcon.d.ts +1 -0
  68. package/dist/icons/brands/TelegramIcon.d.ts +1 -0
  69. package/dist/icons/brands/TwitterIcon.d.ts +1 -0
  70. package/dist/icons/brands/YoutubeIcon.d.ts +1 -0
  71. package/dist/icons/brands/index.d.ts +9 -0
  72. package/dist/icons/createIcon.d.ts +28 -0
  73. package/dist/icons/currency/AmdIcon.d.ts +1 -0
  74. package/dist/icons/currency/EurIcon.d.ts +1 -0
  75. package/dist/icons/currency/RubIcon.d.ts +1 -0
  76. package/dist/icons/currency/UsdIcon.d.ts +1 -0
  77. package/dist/icons/currency/index.d.ts +4 -0
  78. package/dist/icons/domain/BudgetTransferIcon.d.ts +1 -0
  79. package/dist/icons/domain/ContractCardIcon.d.ts +1 -0
  80. package/dist/icons/domain/HandOpenHeartIcon.d.ts +1 -0
  81. package/dist/icons/domain/OnlyEmployeeIcon.d.ts +1 -0
  82. package/dist/icons/domain/ProjectProductIcon.d.ts +1 -0
  83. package/dist/icons/domain/UnitsEmployeeIcon.d.ts +1 -0
  84. package/dist/icons/domain/VacationIcon.d.ts +1 -0
  85. package/dist/icons/domain/index.d.ts +7 -0
  86. package/dist/icons/flags/FlagAmIcon.d.ts +1 -0
  87. package/dist/icons/flags/FlagGbIcon.d.ts +1 -0
  88. package/dist/icons/flags/FlagRuIcon.d.ts +1 -0
  89. package/dist/icons/flags/FlagUsIcon.d.ts +1 -0
  90. package/dist/icons/flags/index.d.ts +4 -0
  91. package/dist/icons/index.d.ts +4 -0
  92. package/dist/icons.d.ts +2 -0
  93. package/dist/icons.js +342 -0
  94. package/dist/icons.js.map +1 -0
  95. package/dist/index.d.ts +15 -0
  96. package/dist/index.js +2437 -1554
  97. package/dist/index.js.map +1 -1
  98. package/dist/lib/FormContext.d.ts +22 -0
  99. package/dist/lib/mergeRefs.d.ts +4 -0
  100. package/dist/lib/motion.d.ts +11 -0
  101. package/dist/lib/useAnchoredPosition.d.ts +31 -0
  102. package/dist/lib/useFloatingPosition.d.ts +29 -0
  103. package/dist/lib/useMountTransition.d.ts +21 -0
  104. package/dist/styles.css +328 -0
  105. package/package.json +29 -4
@@ -0,0 +1,170 @@
1
+ import { createContext as e, forwardRef as t, useContext as n } from "react";
2
+ import { Loader2 as r } from "lucide-react";
3
+ import { clsx as i } from "clsx";
4
+ import { extendTailwindMerge as a } from "tailwind-merge";
5
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
+ import { Controller as l, useForm as u } from "react-hook-form";
7
+ import { yupResolver as d } from "@hookform/resolvers/yup";
8
+ //#region src/lib/cn.ts
9
+ var f = a({ extend: { theme: { text: [
10
+ "h-xl",
11
+ "h-lg",
12
+ "h-md",
13
+ "h-std",
14
+ "h-sm",
15
+ "h-xs",
16
+ "p-lg",
17
+ "p-md",
18
+ "p-std",
19
+ "p-sm",
20
+ "p-xs",
21
+ "label-lg",
22
+ "label-md",
23
+ "label-std",
24
+ "label-sm",
25
+ "label-xs",
26
+ "label-xxs"
27
+ ] } } });
28
+ function p(...e) {
29
+ return f(i(e));
30
+ }
31
+ //#endregion
32
+ //#region src/components/Button/Button.tsx
33
+ var m = {
34
+ lg: "h-12 px-5 text-p-md gap-2 rounded-lg",
35
+ md: "h-10 px-4 text-p-std gap-2 rounded-lg",
36
+ sm: "h-8 px-3 text-p-sm gap-1.5 rounded-md"
37
+ }, h = {
38
+ lg: "h-12 w-12 rounded-lg",
39
+ md: "h-10 w-10 rounded-lg",
40
+ sm: "h-8 w-8 rounded-md"
41
+ }, g = {
42
+ primary: [
43
+ "bg-brand-500 text-white border border-transparent",
44
+ "hover:bg-brand-600 active:bg-brand-700",
45
+ "disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed",
46
+ "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2"
47
+ ].join(" "),
48
+ secondary: [
49
+ "bg-bg-default text-fg-default border border-border-default",
50
+ "hover:bg-bg-container active:bg-bg-subtle",
51
+ "disabled:bg-bg-container disabled:text-fg-disabled disabled:cursor-not-allowed",
52
+ "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2"
53
+ ].join(" "),
54
+ tertiary: [
55
+ "bg-transparent text-fg-default border border-transparent",
56
+ "hover:bg-bg-subtle active:bg-bg-subtle",
57
+ "disabled:text-fg-disabled disabled:cursor-not-allowed",
58
+ "focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2"
59
+ ].join(" "),
60
+ danger: [
61
+ "bg-red-700 text-white border border-transparent",
62
+ "hover:bg-red-800 active:bg-red-900",
63
+ "disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed",
64
+ "focus-visible:ring-2 focus-visible:ring-red-300 focus-visible:ring-offset-2"
65
+ ].join(" ")
66
+ }, _ = {
67
+ primary: "bg-brand-700",
68
+ secondary: "bg-bg-subtle",
69
+ tertiary: "bg-bg-subtle",
70
+ danger: "bg-red-900"
71
+ }, v = t(function({ variant: e = "primary", size: t = "md", leftIcon: n, rightIcon: i, loading: a = !1, iconOnly: l = !1, fullWidth: u = !1, pressed: d = !1, disabled: f, className: v, children: y, onClick: b, dataTestId: x, ...S }, C) {
72
+ return /* @__PURE__ */ s("button", {
73
+ ref: C,
74
+ disabled: f || a,
75
+ "aria-pressed": d,
76
+ "data-test-id": x,
77
+ onClick: (e) => {
78
+ if (d || f || a) {
79
+ e.preventDefault();
80
+ return;
81
+ }
82
+ b?.(e);
83
+ },
84
+ className: p("inline-flex items-center justify-center font-medium transition-colors outline-none", l ? h[t] : m[t], g[e], d && _[e], u && "w-full", v),
85
+ ...S,
86
+ children: a ? /* @__PURE__ */ s(r, {
87
+ className: "h-4 w-4 animate-spin",
88
+ "aria-hidden": !0
89
+ }) : /* @__PURE__ */ c(o, { children: [
90
+ n && /* @__PURE__ */ s("span", {
91
+ className: "inline-flex shrink-0",
92
+ children: n
93
+ }),
94
+ y,
95
+ i && /* @__PURE__ */ s("span", {
96
+ className: "inline-flex shrink-0",
97
+ children: i
98
+ })
99
+ ] })
100
+ });
101
+ }), y = e(null), b = t(function({ children: e, className: t, validationSchema: n, defaultValues: r, buttons: i, mode: a = "onBlur", shouldUnregister: o, shouldFocusError: l = !0, formId: f, onSubmit: m, dataTestId: h, ...g }, _) {
102
+ let { handleSubmit: b, register: x, setValue: S, control: C, formState: w, getValues: T, watch: E, reset: D, clearErrors: O, setError: k, trigger: A, getFieldState: j, unregister: M } = u({
103
+ mode: a,
104
+ resolver: d(n),
105
+ defaultValues: r,
106
+ shouldFocusError: l,
107
+ shouldUnregister: o
108
+ }), { errors: N, isDirty: P, isSubmitted: F, isSubmitting: I, dirtyFields: L, isValid: R } = w, z = b((e) => {
109
+ m?.(e, w);
110
+ }), B = {
111
+ control: C,
112
+ register: x,
113
+ errors: N,
114
+ setValue: S,
115
+ getValues: T,
116
+ watch: E,
117
+ reset: D,
118
+ trigger: A,
119
+ clearErrors: O,
120
+ setError: k,
121
+ getFieldState: j,
122
+ unregister: M,
123
+ isDirty: P,
124
+ isSubmitted: F,
125
+ isSubmitting: I,
126
+ isValid: R,
127
+ dirtyFields: L,
128
+ submit: z
129
+ };
130
+ return /* @__PURE__ */ s("form", {
131
+ ref: _,
132
+ id: f,
133
+ onSubmit: z,
134
+ "data-test-id": h,
135
+ className: p("flex flex-col gap-4", t),
136
+ ...g,
137
+ children: /* @__PURE__ */ c(y.Provider, {
138
+ value: B,
139
+ children: [e, i && i.length > 0 && /* @__PURE__ */ s("div", {
140
+ className: "flex items-center gap-3",
141
+ "data-test-id": h ? `${h}-buttons` : void 0,
142
+ children: i.map((e, t) => /* @__PURE__ */ s(v, { ...e }, t))
143
+ })]
144
+ })
145
+ });
146
+ }), x = t(function({ name: e, defaultValue: t, render: r, className: i, dataTestId: a, ...o }, c) {
147
+ let u = n(y);
148
+ if (!u) throw Error("FormField must be rendered inside a FormContainer.");
149
+ return /* @__PURE__ */ s("div", {
150
+ ref: c,
151
+ className: p(i),
152
+ "data-test-id": a,
153
+ ...o,
154
+ children: /* @__PURE__ */ s(l, {
155
+ control: u.control,
156
+ name: e,
157
+ defaultValue: t,
158
+ render: ({ field: e, fieldState: t }) => r({
159
+ ...e,
160
+ error: !!t.error,
161
+ errorText: t.error?.message,
162
+ dataTestId: a
163
+ })
164
+ })
165
+ });
166
+ });
167
+ //#endregion
168
+ export { p as i, b as n, v as r, x as t };
169
+
170
+ //# sourceMappingURL=FormField-CwRAOtTN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField-CwRAOtTN.js","names":[],"sources":["../src/lib/cn.ts","../src/components/Button/Button.tsx","../src/lib/FormContext.ts","../src/components/FormContainer/FormContainer.tsx","../src/components/FormField/FormField.tsx"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n/**\n * The custom font-size scale declared in `src/styles/tokens.css`'s `@theme`\n * block (`--text-h-xl`, `--text-p-sm`, `--text-label-md`, ...). Mirrored\n * here by hand — same two-parallel-representations discipline as the token\n * pipeline itself — because tailwind-merge ships its own hardcoded default\n * theme and has no way to read this project's actual `@theme` CSS.\n *\n * Without this, tailwind-merge's default config only recognizes Tailwind's\n * built-in font-size keywords (`xs`, `sm`, `lg`, ...) as font sizes; any\n * `text-*` suffix it doesn't recognize as a font size instead falls through\n * to the *color* class group, whose theme scale is deliberately `isAny`\n * (Tailwind v4 allows arbitrary custom theme colors). That misclassifies\n * every `text-p-*`/`text-h-*`/`text-label-*` utility as a text color, so it\n * gets silently dropped as a \"conflict\" whenever it appears alongside an\n * actual `text-{color}` class in the same `cn()` call — which is nearly\n * every real usage, since components pair a typography variant with a\n * semantic text color.\n */\nconst FONT_SIZE_TOKENS = [\n 'h-xl',\n 'h-lg',\n 'h-md',\n 'h-std',\n 'h-sm',\n 'h-xs',\n 'p-lg',\n 'p-md',\n 'p-std',\n 'p-sm',\n 'p-xs',\n 'label-lg',\n 'label-md',\n 'label-std',\n 'label-sm',\n 'label-xs',\n 'label-xxs',\n];\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n text: FONT_SIZE_TOKENS,\n },\n },\n});\n\n/**\n * Merges class names, resolving conflicting Tailwind utilities in favor of\n * the last one specified (e.g. `cn('px-2', 'px-4')` -> `'px-4'`). This is\n * what lets consumers pass a `className` prop that overrides a component's\n * defaults instead of just appending to them.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import { forwardRef } from 'react';\nimport { Loader2 } from 'lucide-react';\nimport { cn } from '../../lib/cn';\nimport type { ButtonProps, ButtonSize, ButtonVariant } from './Button.types';\n\nconst sizeStyles: Record<ButtonSize, string> = {\n lg: 'h-12 px-5 text-p-md gap-2 rounded-lg',\n md: 'h-10 px-4 text-p-std gap-2 rounded-lg',\n sm: 'h-8 px-3 text-p-sm gap-1.5 rounded-md',\n};\n\nconst iconOnlySize: Record<ButtonSize, string> = {\n lg: 'h-12 w-12 rounded-lg',\n md: 'h-10 w-10 rounded-lg',\n sm: 'h-8 w-8 rounded-md',\n};\n\nconst variantStyles: Record<ButtonVariant, string> = {\n primary: [\n 'bg-brand-500 text-white border border-transparent',\n 'hover:bg-brand-600 active:bg-brand-700',\n 'disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed',\n 'focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2',\n ].join(' '),\n secondary: [\n 'bg-bg-default text-fg-default border border-border-default',\n 'hover:bg-bg-container active:bg-bg-subtle',\n 'disabled:bg-bg-container disabled:text-fg-disabled disabled:cursor-not-allowed',\n 'focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2',\n ].join(' '),\n tertiary: [\n 'bg-transparent text-fg-default border border-transparent',\n 'hover:bg-bg-subtle active:bg-bg-subtle',\n 'disabled:text-fg-disabled disabled:cursor-not-allowed',\n 'focus-visible:ring-2 focus-visible:ring-brand-300 focus-visible:ring-offset-2',\n ].join(' '),\n danger: [\n 'bg-red-700 text-white border border-transparent',\n 'hover:bg-red-800 active:bg-red-900',\n 'disabled:bg-bg-subtle disabled:text-fg-disabled disabled:cursor-not-allowed',\n 'focus-visible:ring-2 focus-visible:ring-red-300 focus-visible:ring-offset-2',\n ].join(' '),\n};\n\n// Same shade each variant already uses for `active:`, applied persistently\n// while `pressed` is true instead of only during the mousedown instant.\nconst pressedStyles: Record<ButtonVariant, string> = {\n primary: 'bg-brand-700',\n secondary: 'bg-bg-subtle',\n tertiary: 'bg-bg-subtle',\n danger: 'bg-red-900',\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = 'primary',\n size = 'md',\n leftIcon,\n rightIcon,\n loading = false,\n iconOnly = false,\n fullWidth = false,\n pressed = false,\n disabled,\n className,\n children,\n onClick,\n dataTestId,\n ...rest\n },\n ref,\n) {\n return (\n <button\n ref={ref}\n disabled={disabled || loading}\n aria-pressed={pressed}\n data-test-id={dataTestId}\n onClick={(event) => {\n if (pressed || disabled || loading) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n }}\n className={cn(\n 'inline-flex items-center justify-center font-medium transition-colors outline-none',\n iconOnly ? iconOnlySize[size] : sizeStyles[size],\n variantStyles[variant],\n pressed && pressedStyles[variant],\n fullWidth && 'w-full',\n className,\n )}\n {...rest}\n >\n {loading ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" aria-hidden />\n ) : (\n <>\n {leftIcon && <span className=\"inline-flex shrink-0\">{leftIcon}</span>}\n {children}\n {rightIcon && <span className=\"inline-flex shrink-0\">{rightIcon}</span>}\n </>\n )}\n </button>\n );\n});\n","import { createContext } from 'react';\nimport type {\n Control,\n FieldErrors,\n FieldValues,\n UseFormClearErrors,\n UseFormGetFieldState,\n UseFormGetValues,\n UseFormRegister,\n UseFormReset,\n UseFormSetError,\n UseFormSetValue,\n UseFormTrigger,\n UseFormUnregister,\n UseFormWatch,\n} from 'react-hook-form';\n\nexport interface FormContextValue {\n control: Control<FieldValues>;\n register: UseFormRegister<FieldValues>;\n errors: FieldErrors<FieldValues>;\n setValue: UseFormSetValue<FieldValues>;\n getValues: UseFormGetValues<FieldValues>;\n watch: UseFormWatch<FieldValues>;\n reset: UseFormReset<FieldValues>;\n trigger: UseFormTrigger<FieldValues>;\n clearErrors: UseFormClearErrors<FieldValues>;\n setError: UseFormSetError<FieldValues>;\n getFieldState: UseFormGetFieldState<FieldValues>;\n unregister: UseFormUnregister<FieldValues>;\n isDirty: boolean;\n isSubmitted: boolean;\n isSubmitting: boolean;\n isValid: boolean;\n dirtyFields: Partial<Readonly<Record<string, boolean>>>;\n submit: () => void;\n}\n\nexport const FormContext = createContext<FormContextValue | null>(null);\n","import { forwardRef } from 'react';\nimport { useForm, type FieldValues } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { cn } from '../../lib/cn';\nimport { FormContext, type FormContextValue } from '../../lib/FormContext';\nimport { Button } from '../Button';\nimport type { FormContainerProps } from './FormContainer.types';\n\nexport const FormContainer = forwardRef<HTMLFormElement, FormContainerProps>(function FormContainer(\n {\n children,\n className,\n validationSchema,\n defaultValues,\n buttons,\n mode = 'onBlur',\n shouldUnregister,\n shouldFocusError = true,\n formId,\n onSubmit,\n dataTestId,\n ...rest\n },\n ref,\n) {\n const {\n handleSubmit,\n register,\n setValue,\n control,\n formState,\n getValues,\n watch,\n reset,\n clearErrors,\n setError,\n trigger,\n getFieldState,\n unregister,\n } = useForm<FieldValues>({\n mode,\n resolver: yupResolver(validationSchema),\n defaultValues,\n shouldFocusError,\n shouldUnregister,\n });\n\n const { errors, isDirty, isSubmitted, isSubmitting, dirtyFields, isValid } = formState;\n\n const submit = handleSubmit((data) => {\n onSubmit?.(data, formState);\n });\n\n const contextValue: FormContextValue = {\n control,\n register,\n errors,\n setValue,\n getValues,\n watch,\n reset,\n trigger,\n clearErrors,\n setError,\n getFieldState,\n unregister,\n isDirty,\n isSubmitted,\n isSubmitting,\n isValid,\n dirtyFields,\n submit,\n };\n\n return (\n <form\n ref={ref}\n id={formId}\n onSubmit={submit}\n data-test-id={dataTestId}\n className={cn('flex flex-col gap-4', className)}\n {...rest}\n >\n <FormContext.Provider value={contextValue}>\n {children}\n {buttons && buttons.length > 0 && (\n <div className=\"flex items-center gap-3\" data-test-id={dataTestId ? `${dataTestId}-buttons` : undefined}>\n {buttons.map((buttonProps, index) => (\n <Button key={index} {...buttonProps} />\n ))}\n </div>\n )}\n </FormContext.Provider>\n </form>\n );\n});\n","import { forwardRef, useContext } from 'react';\nimport { Controller } from 'react-hook-form';\nimport { cn } from '../../lib/cn';\nimport { FormContext } from '../../lib/FormContext';\nimport type { FormFieldProps } from './FormField.types';\n\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n { name, defaultValue, render, className, dataTestId, ...rest },\n ref,\n) {\n const context = useContext(FormContext);\n\n if (!context) {\n throw new Error('FormField must be rendered inside a FormContainer.');\n }\n\n return (\n <div ref={ref} className={cn(className)} data-test-id={dataTestId} {...rest}>\n <Controller\n control={context.control}\n name={name}\n defaultValue={defaultValue}\n render={({ field, fieldState }) =>\n render({\n ...field,\n error: !!fieldState.error,\n errorText: fieldState.error?.message,\n dataTestId,\n })\n }\n />\n </div>\n );\n});\n"],"mappings":"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"}
@@ -9,6 +9,10 @@ export interface AccordionProps extends HTMLAttributes<HTMLDivElement>, BaseProp
9
9
  /** Controlled open value(s). Pass alongside `onValueChange` to fully control which item(s) are open. */
10
10
  value?: string | string[];
11
11
  onValueChange?: (value: string | string[]) => void;
12
+ /** Animates each panel open/closed. Set `false` for the pre-1.x instant toggle (also restores the plain `hidden` attribute instead of the animated grid wrapper). */
13
+ animated?: boolean;
14
+ /** Renders a Divider between each item's header and its panel content. */
15
+ showDivider?: boolean;
12
16
  children: ReactNode;
13
17
  }
14
18
  export interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, BaseProps {
@@ -3,12 +3,23 @@ import { BaseProps } from '../../types';
3
3
  export type BadgeVariant = 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'privacy';
4
4
  export type BadgeStyle = 'filled' | 'outline' | 'accent';
5
5
  export type BadgeSize = 'lg' | 'md' | 'sm' | 'xs';
6
+ export type BadgeShape = 'rounded' | 'pill';
6
7
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, BaseProps {
7
8
  variant?: BadgeVariant;
8
9
  appearance?: BadgeStyle;
9
10
  size?: BadgeSize;
11
+ /** `'pill'` is fully rounded; `'rounded'` (default) uses the size's own corner radius. */
12
+ shape?: BadgeShape;
10
13
  leftIcon?: ReactNode;
11
14
  rightIcon?: ReactNode;
12
15
  /** Renders a trailing dismiss button (replacing `rightIcon`) that calls this on click. */
13
16
  onDismiss?: () => void;
17
+ /** Renders as a standalone status dot instead of a labeled badge. Ignores `children`, icons, and `onDismiss`. */
18
+ dot?: boolean;
19
+ /** Renders a leading status dot before `children`, in place of `leftIcon`. */
20
+ withDot?: boolean;
21
+ /** Dims the badge and blocks pointer/keyboard interaction, including `onDismiss`. */
22
+ disabled?: boolean;
23
+ /** Adds hover/active states, a focus ring, `role="button"`, and Enter/Space activation for `onClick`. */
24
+ interactive?: boolean;
14
25
  }
@@ -0,0 +1,2 @@
1
+ import { BreadcrumbProps } from './Breadcrumb.types';
2
+ export declare const Breadcrumb: import('react').ForwardRefExoticComponent<BreadcrumbProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,19 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type BreadcrumbSize = 'md' | 'sm';
4
+ export interface BreadcrumbItem {
5
+ value: string | number;
6
+ label: ReactNode;
7
+ /** Renders the crumb as an `<a>` instead of a `<button>`. */
8
+ href?: string;
9
+ disabled?: boolean;
10
+ }
11
+ export interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, 'onSelect'>, BaseProps {
12
+ items: BreadcrumbItem[];
13
+ /** Value of the current-page crumb, rendered as plain text with `aria-current="page"`. Defaults to the last item. */
14
+ currentValue?: string | number;
15
+ onSelect?: (value: string | number) => void;
16
+ /** Rendered between crumbs, hidden from assistive tech. Default `'/'`. */
17
+ separator?: ReactNode;
18
+ size?: BreadcrumbSize;
19
+ }
@@ -0,0 +1,2 @@
1
+ export { Breadcrumb } from './Breadcrumb';
2
+ export type { BreadcrumbItem, BreadcrumbProps, BreadcrumbSize } from './Breadcrumb.types';
@@ -0,0 +1,2 @@
1
+ import { CardGroupProps } from './CardGroup.types';
2
+ export declare const CardGroup: import('react').ForwardRefExoticComponent<CardGroupProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,19 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type CardGroupTitleColor = 'brand' | 'blue' | 'purple' | 'pink' | 'yellow' | 'gray';
4
+ export type CardGroupTitlePlacement = 'top' | 'left' | 'right';
5
+ export interface CardGroupTitle {
6
+ text: ReactNode;
7
+ /** Default `'gray'`. */
8
+ color?: CardGroupTitleColor;
9
+ /** Default `'left'`. `'left'`/`'right'` render a vertical rail along that edge; `'top'` renders a horizontal bar. */
10
+ placement?: CardGroupTitlePlacement;
11
+ }
12
+ export interface CardGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, BaseProps {
13
+ title?: CardGroupTitle;
14
+ /** Extra content beside the title, rendered as the first divided section. */
15
+ header?: ReactNode;
16
+ children?: ReactNode;
17
+ /** Disables the automatic divider between the header and each child. */
18
+ noDivider?: boolean;
19
+ }
@@ -0,0 +1,2 @@
1
+ export { CardGroup } from './CardGroup';
2
+ export type { CardGroupProps, CardGroupTitle, CardGroupTitleColor, CardGroupTitlePlacement, } from './CardGroup.types';
@@ -0,0 +1,2 @@
1
+ import { CopyProps } from './Copy.types';
2
+ export declare const Copy: import('react').ForwardRefExoticComponent<CopyProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ import { ButtonProps } from '../Button';
4
+ export interface CopyProps extends Omit<ButtonProps, 'children' | 'onClick' | 'leftIcon' | 'rightIcon' | 'onCopy'>, BaseProps {
5
+ /** Text copied to the clipboard on click. */
6
+ text: string;
7
+ /** Feedback shown in the popover after copying. Default `'Copied'`. */
8
+ copiedLabel?: string;
9
+ /** Accessible name for the button (it has no visible text). Default `'Copy to clipboard'`. */
10
+ label?: string;
11
+ /** Milliseconds before the feedback clears. Default `1500`. */
12
+ timeout?: number;
13
+ /** Overrides the default copy icon. */
14
+ icon?: ReactNode;
15
+ onCopy?: (text: string) => void;
16
+ onError?: (error: unknown) => void;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { Copy } from './Copy';
2
+ export type { CopyProps } from './Copy.types';
@@ -0,0 +1,2 @@
1
+ import { CounterProps } from './Counter.types';
2
+ export declare const Counter: import('react').ForwardRefExoticComponent<CounterProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,20 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ import { InputSize } from '../Input';
4
+ export interface CounterProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'>, BaseProps {
5
+ /** Controlled value. */
6
+ value?: number;
7
+ /** Uncontrolled initial value. Default `0`. */
8
+ defaultValue?: number;
9
+ /** Fires on every committed change — button press, or blur after typing. Not native `onChange`, since a button press isn't a `ChangeEvent`. */
10
+ onValueChange?: (value: number) => void;
11
+ min?: number;
12
+ max?: number;
13
+ step?: number;
14
+ size?: InputSize;
15
+ label?: ReactNode;
16
+ helperText?: ReactNode;
17
+ errorText?: ReactNode;
18
+ error?: boolean;
19
+ wrapperClassName?: string;
20
+ }
@@ -0,0 +1,2 @@
1
+ export { Counter } from './Counter';
2
+ export type { CounterProps } from './Counter.types';
@@ -0,0 +1,2 @@
1
+ import { DistributionBarProps } from './DistributionBar.types';
2
+ export declare const DistributionBar: import('react').ForwardRefExoticComponent<DistributionBarProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type DistributionColor = 'brand' | 'blue' | 'purple' | 'pink' | 'yellow' | 'red' | 'gray';
4
+ export type DistributionBarSize = 'sm' | 'lg';
5
+ export interface DistributionSegment {
6
+ label: ReactNode;
7
+ value: number;
8
+ color: DistributionColor;
9
+ /** Suffix appended after the formatted value in the legend, e.g. `'AMD'`. */
10
+ unit?: string;
11
+ /** Still counted in the bar's proportions, just omitted from the legend list. */
12
+ hideFromLegend?: boolean;
13
+ }
14
+ export interface DistributionBarProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
15
+ segments: DistributionSegment[];
16
+ hideLegend?: boolean;
17
+ /** Default: `Intl.NumberFormat().format`. */
18
+ formatValue?: (value: number) => string;
19
+ size?: DistributionBarSize;
20
+ }
@@ -0,0 +1,2 @@
1
+ export { DistributionBar } from './DistributionBar';
2
+ export type { DistributionBarProps, DistributionBarSize, DistributionColor, DistributionSegment, } from './DistributionBar.types';
@@ -19,5 +19,9 @@ export interface DrawerProps extends BaseProps {
19
19
  closeOnOverlayClick?: boolean;
20
20
  /** Whether the built-in close (X) button is rendered. */
21
21
  showClose?: boolean;
22
+ /** Slides/fades the drawer in and out. Set `false` for the pre-1.x instant mount/unmount. */
23
+ animated?: boolean;
24
+ /** Extra controls in the header, left of the close button — e.g. a pin or back button. */
25
+ headerActions?: ReactNode;
22
26
  className?: string;
23
27
  }
@@ -1,6 +1,9 @@
1
- import { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode } from 'react';
1
+ import { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
2
2
  import { BaseProps } from '../../types';
3
- export type DropdownContentAlign = 'start' | 'end';
3
+ import { AnchoredAlign, AnchoredSide } from '../../lib/useAnchoredPosition';
4
+ export type DropdownContentAlign = AnchoredAlign;
5
+ export type DropdownContentSide = AnchoredSide;
6
+ export type DropdownContentStrategy = 'fixed' | 'absolute';
4
7
  export interface DropdownMenuProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
5
8
  children: ReactNode;
6
9
  /** Uncontrolled initial open state. */
@@ -8,6 +11,8 @@ export interface DropdownMenuProps extends HTMLAttributes<HTMLDivElement>, BaseP
8
11
  /** Controlled open state. Pass alongside `onOpenChange` to fully control the menu. */
9
12
  open?: boolean;
10
13
  onOpenChange?: (open: boolean) => void;
14
+ /** Anchor the panel to an element the consumer owns instead of `<DropdownTrigger>`'s child. */
15
+ anchorRef?: RefObject<HTMLElement | null>;
11
16
  }
12
17
  export interface DropdownTriggerProps {
13
18
  /** A single element cloned with the click handler and `aria-haspopup`/`aria-expanded` that open the menu. */
@@ -17,6 +22,19 @@ export interface DropdownContentProps extends HTMLAttributes<HTMLDivElement>, Ba
17
22
  children: ReactNode;
18
23
  /** Horizontal alignment of the panel relative to the trigger. */
19
24
  align?: DropdownContentAlign;
25
+ /** `'fixed'` portals the panel to `document.body` so it can never be clipped by an
26
+ * `overflow: hidden` ancestor. `'absolute'` is the pre-1.x behaviour, kept as an escape
27
+ * hatch for consumers who positioned the panel themselves via `className`. */
28
+ strategy?: DropdownContentStrategy;
29
+ /** Preferred vertical side. Auto-flips when there isn't room, unless `flip` is false. Only applies when `strategy="fixed"`. */
30
+ side?: DropdownContentSide;
31
+ sideOffset?: number;
32
+ flip?: boolean;
33
+ shift?: boolean;
34
+ /** Sets the panel's min-width to the trigger's/anchor's width. */
35
+ matchTriggerWidth?: boolean;
36
+ /** Closes the menu when any ancestor scrolls. */
37
+ closeOnScroll?: boolean;
20
38
  }
21
39
  export interface DropdownItemProps extends ButtonHTMLAttributes<HTMLButtonElement>, BaseProps {
22
40
  children: ReactNode;
@@ -29,6 +47,8 @@ export interface DropdownItemProps extends ButtonHTMLAttributes<HTMLButtonElemen
29
47
  destructive?: boolean;
30
48
  /** Renders a leading check mark when `true`; reserves the space (unchecked) when `false`. Omit entirely for items with no check state. */
31
49
  checked?: boolean;
50
+ /** Secondary line rendered under the label. */
51
+ meta?: ReactNode;
32
52
  }
33
53
  export interface DropdownSeparatorProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
34
54
  }
@@ -0,0 +1,2 @@
1
+ import { EmptyProps } from './Empty.types';
2
+ export declare const Empty: import('react').ForwardRefExoticComponent<EmptyProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type EmptySize = 'lg' | 'sm';
4
+ export interface EmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, BaseProps {
5
+ size?: EmptySize;
6
+ title?: ReactNode;
7
+ description?: ReactNode;
8
+ /** Defaults to a `SearchX` icon in an `IconTile` circle — pass your own illustration node to override. */
9
+ illustration?: ReactNode;
10
+ /** Slot for a call-to-action, e.g. a `<Button>`. */
11
+ action?: ReactNode;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { Empty } from './Empty';
2
+ export type { EmptyProps, EmptySize } from './Empty.types';
@@ -0,0 +1,2 @@
1
+ import { FormContainerProps } from './FormContainer.types';
2
+ export declare const FormContainer: import('react').ForwardRefExoticComponent<FormContainerProps & import('react').RefAttributes<HTMLFormElement>>;
@@ -0,0 +1,18 @@
1
+ import { FormHTMLAttributes, ReactNode } from 'react';
2
+ import { FieldValues, FormState, Mode } from 'react-hook-form';
3
+ import { ObjectSchema } from 'yup';
4
+ import { BaseProps } from '../../types';
5
+ import { ButtonProps } from '../Button';
6
+ export interface FormContainerProps extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit'>, BaseProps {
7
+ children?: ReactNode;
8
+ /** A yup object schema — resolved via `@hookform/resolvers/yup`. */
9
+ validationSchema: ObjectSchema<FieldValues>;
10
+ defaultValues: FieldValues;
11
+ /** Rendered as a row of `Button`s below `children` — omit and render your own footer instead. */
12
+ buttons?: ButtonProps[];
13
+ mode?: Mode;
14
+ shouldUnregister?: boolean;
15
+ shouldFocusError?: boolean;
16
+ formId?: string;
17
+ onSubmit?: (data: FieldValues, formState: FormState<FieldValues>) => void;
18
+ }
@@ -0,0 +1,2 @@
1
+ export { FormContainer } from './FormContainer';
2
+ export type { FormContainerProps } from './FormContainer.types';
@@ -0,0 +1,2 @@
1
+ import { FormFieldProps } from './FormField.types';
2
+ export declare const FormField: import('react').ForwardRefExoticComponent<FormFieldProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,22 @@
1
+ import { HTMLAttributes, ReactElement } from 'react';
2
+ import { RefCallBack } from 'react-hook-form';
3
+ import { BaseProps } from '../../types';
4
+ /** Deliberately untyped `value`/`onChange`: this render prop feeds whichever
5
+ * input the consumer wires up (native `value`, Select's `string`, Checkbox's
6
+ * `boolean`, ...). */
7
+ export interface FormFieldRenderProps {
8
+ name: string;
9
+ value: any;
10
+ onChange: (...event: any[]) => void;
11
+ onBlur: () => void;
12
+ ref: RefCallBack;
13
+ error: boolean;
14
+ errorText?: string;
15
+ dataTestId?: string;
16
+ }
17
+ export interface FormFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue'>, BaseProps {
18
+ name: string;
19
+ defaultValue?: unknown;
20
+ /** Render prop — receives field bindings plus `error`/`errorText`, e.g. `(p) => <Input {...p} label="Email" />`. */
21
+ render: (props: FormFieldRenderProps) => ReactElement;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { FormField } from './FormField';
2
+ export type { FormFieldProps, FormFieldRenderProps } from './FormField.types';
@@ -3,6 +3,8 @@ import { BaseProps } from '../../types';
3
3
  export type InputSize = 'lg' | 'md' | 'sm';
4
4
  export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, BaseProps {
5
5
  label?: ReactNode;
6
+ /** Content rendered on the label row, right of the label text and required marker — e.g. an info tooltip trigger. Rendered as a sibling of the `<label>`, not a child, so an interactive addon never steals focus into the field. */
7
+ labelAddons?: ReactNode;
6
8
  helperText?: ReactNode;
7
9
  errorText?: ReactNode;
8
10
  size?: InputSize;
@@ -0,0 +1,2 @@
1
+ import { LinkProps } from './Link.types';
2
+ export declare const Link: import('react').ForwardRefExoticComponent<LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,15 @@
1
+ import { AnchorHTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ import { TextColor, TextVariant, TextWeight } from '../Text';
4
+ export type LinkUnderline = 'hover' | 'always' | 'none';
5
+ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>, BaseProps {
6
+ /** Typography variant, same scale as `Text`. Default `'p-std'`. */
7
+ variant?: TextVariant;
8
+ weight?: TextWeight;
9
+ /** Semantic text color, same scale as `Text`. Default `'brand'`. */
10
+ color?: TextColor;
11
+ underline?: LinkUnderline;
12
+ leftIcon?: ReactNode;
13
+ rightIcon?: ReactNode;
14
+ truncate?: boolean;
15
+ }
@@ -0,0 +1,2 @@
1
+ export { Link } from './Link';
2
+ export type { LinkProps, LinkUnderline } from './Link.types';
@@ -18,6 +18,10 @@ export interface MultiSelectProps extends BaseProps {
18
18
  /** Selected option values (controlled). */
19
19
  value: string[];
20
20
  onChange: (values: string[]) => void;
21
+ /** Called with the option that was just added, alongside `onChange` (never instead of it). */
22
+ onAdd?: (option: MultiSelectOption) => void;
23
+ /** Called with the value that was just removed, alongside `onChange` (never instead of it). */
24
+ onRemove?: (value: string) => void;
21
25
  size?: MultiSelectSize;
22
26
  placeholder?: string;
23
27
  /** Placeholder once at least one chip exists. Defaults to "Add another…". */
@@ -25,6 +29,8 @@ export interface MultiSelectProps extends BaseProps {
25
29
  disabled?: boolean;
26
30
  error?: boolean;
27
31
  label?: ReactNode;
32
+ /** Content rendered on the label row, right of the label text and required marker — e.g. an info tooltip trigger. Rendered as a sibling of the `<label>`, not a child, so an interactive addon never steals focus into the field. */
33
+ labelAddons?: ReactNode;
28
34
  helperText?: ReactNode;
29
35
  errorText?: ReactNode;
30
36
  required?: boolean;
@@ -32,6 +38,8 @@ export interface MultiSelectProps extends BaseProps {
32
38
  lockedValues?: string[];
33
39
  /** Cap on how many can be selected (default: unlimited). */
34
40
  max?: number;
41
+ /** Renders an Avatar on every chip and dropdown row, falling back to initials derived from the option's `label` when it has no `avatarSrc`. Default `false` — avatars still render for options that already set `avatarSrc` regardless. */
42
+ showAvatars?: boolean;
35
43
  /** Set false for a click-to-open picker with no text filter. */
36
44
  searchable?: boolean;
37
45
  /** Dropdown header shown when the query is empty. */
@@ -0,0 +1,2 @@
1
+ import { PopoverProps } from './Popover.types';
2
+ export declare function Popover({ content, children, side, align, offset, open, defaultOpen, onOpenChange, flip, showArrow, closeOnScroll, autoFocus, container, className, dataTestId, }: PopoverProps): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ import { FloatingAlign, FloatingSide } from '../../lib/useFloatingPosition';
4
+ export type PopoverSide = FloatingSide;
5
+ export type PopoverAlign = FloatingAlign;
6
+ export interface PopoverProps extends BaseProps {
7
+ /** Bubble content. May contain interactive elements — unlike `Tooltip`, the bubble is not `pointer-events-none`. */
8
+ content: ReactNode;
9
+ /** Single trigger element; `Popover` attaches an `onClick` (composed with any the child already has) plus `aria-expanded`/`aria-haspopup`. */
10
+ children: ReactElement;
11
+ side?: PopoverSide;
12
+ align?: PopoverAlign;
13
+ /** Gap between the trigger and the bubble, in px. Default `8`. */
14
+ offset?: number;
15
+ /** Controlled open state. Pass alongside `onOpenChange` to fully control the popover. */
16
+ open?: boolean;
17
+ defaultOpen?: boolean;
18
+ onOpenChange?: (open: boolean) => void;
19
+ /** Flips to the opposite side on the same axis when there isn't room. Default `true`. */
20
+ flip?: boolean;
21
+ showArrow?: boolean;
22
+ /** Closes the popover when any ancestor scrolls. Default `true`. */
23
+ closeOnScroll?: boolean;
24
+ /** Moves focus into the bubble on open, restoring it to the trigger on close. Default `false` — there is no focus trap in v1, so use sparingly for content that's genuinely keyboard-operable. */
25
+ autoFocus?: boolean;
26
+ className?: string;
27
+ /** Portal target. Defaults to `document.body`. */
28
+ container?: HTMLElement | null;
29
+ }
@@ -0,0 +1,2 @@
1
+ export { Popover } from './Popover';
2
+ export type { PopoverAlign, PopoverProps, PopoverSide } from './Popover.types';
@@ -0,0 +1,2 @@
1
+ import { ReadMoreProps } from './ReadMore.types';
2
+ export declare const ReadMore: import('react').ForwardRefExoticComponent<ReadMoreProps & import('react').RefAttributes<HTMLDivElement>>;