@scalably/ui 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,5 @@
1
1
  import * as react from 'react';
2
- import react__default, { ReactNode, ImgHTMLAttributes } from 'react';
3
- import * as class_variance_authority_types from 'class-variance-authority/types';
4
- import { VariantProps } from 'class-variance-authority';
2
+ import react__default, { ReactNode, HTMLAttributes, ForwardRefExoticComponent, SVGProps, RefAttributes, MemoExoticComponent } from 'react';
5
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
4
  import * as date_fns from 'date-fns';
7
5
  export { addMonths, endOfMonth, isSameDay, startOfMonth } from 'date-fns';
@@ -88,34 +86,68 @@ interface BackToTopProps {
88
86
  */
89
87
  declare const BackToTop: react.ForwardRefExoticComponent<BackToTopProps & react.RefAttributes<HTMLButtonElement>>;
90
88
 
89
+ interface AuthPromptProps {
90
+ /** Main heading text. Defaults to "Login to continue". */
91
+ title?: React.ReactNode;
92
+ /**
93
+ * Supporting description below the title.
94
+ * Defaults to "Login to unlock this feature and continue exploring".
95
+ */
96
+ description?: React.ReactNode;
97
+ /** Label for the primary action button (left). Defaults to "Login". */
98
+ primaryLabel?: React.ReactNode;
99
+ /** Label for the secondary action button (right). Defaults to "Register". */
100
+ secondaryLabel?: React.ReactNode;
101
+ /**
102
+ * Click handler for the primary action button.
103
+ * Typically used to navigate to the login page.
104
+ */
105
+ onPrimaryClick?: () => void;
106
+ /**
107
+ * Click handler for the secondary action button.
108
+ * Typically used to navigate to the registration page.
109
+ */
110
+ onSecondaryClick?: () => void;
111
+ /** Additional classes for the outer container. */
112
+ className?: string;
113
+ /** Additional classes for the buttons wrapper row. */
114
+ actionsClassName?: string;
115
+ }
91
116
  /**
92
- * Accessible status badge with semantic color variants.
117
+ * AuthPrompt - A simple authentication call-to-action card.
93
118
  *
94
- * Aligns with design system color semantics:
95
- * - `success`: Active/Complete/Done/Confirmed/Verified
96
- * - `warning`: In progress/Waiting for confirmation
97
- * - `error`: Needs attention/Important/Alert/Danger
98
- * - `inactive`: Closed/Passed/Not active/Too late
99
- * - `info`: Informational status
119
+ * Designed for feature gating flows where users must authenticate before
120
+ * continuing. The layout follows the Scalably design system and the
121
+ * provided reference UI:
122
+ *
123
+ * - Centered card with title and description
124
+ * - Two horizontally aligned buttons on the same row
125
+ * - Mobile-first responsive layout with full-width buttons on small screens
126
+ * - Consumers provide navigation logic via `onPrimaryClick` / `onSecondaryClick`
100
127
  *
101
128
  * @example
102
129
  * ```tsx
103
- * <StatusBadge status="success">Active</StatusBadge>
104
- * <StatusBadge status="warning" variant="outline">Pending</StatusBadge>
105
- * <StatusBadge status="inactive">Closed</StatusBadge>
106
- * <StatusBadge status="error" icon={<AlertIcon />}>Urgent</StatusBadge>
130
+ * <AuthPrompt
131
+ * onPrimaryClick={() => router.push("/login")}
132
+ * onSecondaryClick={() => router.push("/register")}
133
+ * />
134
+ *
135
+ * <AuthPrompt
136
+ * title="Join Scalably"
137
+ * description="Create an account or log in to save your workspace."
138
+ * primaryLabel="Sign in"
139
+ * secondaryLabel="Create account"
140
+ * onPrimaryClick={() => navigate("/signin")}
141
+ * onSecondaryClick={() => navigate("/signup")}
142
+ * />
107
143
  * ```
108
144
  */
109
- declare const statusBadgeVariants: (props?: ({
110
- size?: "sm" | "md" | "lg" | null | undefined;
111
- status?: "error" | "success" | "warning" | "info" | "inactive" | null | undefined;
112
- variant?: "solid" | "soft" | "outline" | null | undefined;
113
- fullWidth?: boolean | null | undefined;
114
- } & class_variance_authority_types.ClassProp) | undefined) => string;
115
- type StatusBadgeStatus = NonNullable<VariantProps<typeof statusBadgeVariants>["status"]>;
116
- type StatusBadgeVariant = NonNullable<VariantProps<typeof statusBadgeVariants>["variant"]>;
117
- type StatusBadgeSize = NonNullable<VariantProps<typeof statusBadgeVariants>["size"]>;
118
- interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof statusBadgeVariants> {
145
+ declare const AuthPrompt: React.FC<AuthPromptProps>;
146
+
147
+ type StatusBadgeStatus = "success" | "warning" | "error" | "info" | "inactive";
148
+ type StatusBadgeVariant = "solid" | "soft" | "outline";
149
+ type StatusBadgeSize = "sm" | "md" | "lg";
150
+ interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
119
151
  /**
120
152
  * Badge size using design system typography.
121
153
  * - `sm`: 12px medium (label-12-medium) - default
@@ -123,7 +155,10 @@ interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "
123
155
  * - `lg`: 16px medium (body-16-medium)
124
156
  * @default "sm"
125
157
  */
126
- size?: "sm" | "md" | "lg";
158
+ size?: StatusBadgeSize;
159
+ status?: StatusBadgeStatus;
160
+ variant?: StatusBadgeVariant;
161
+ fullWidth?: boolean;
127
162
  /**
128
163
  * Optional leading icon.
129
164
  */
@@ -140,16 +175,13 @@ interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "
140
175
  }
141
176
  declare const StatusBadge: react.ForwardRefExoticComponent<StatusBadgeProps & react.RefAttributes<HTMLSpanElement>>;
142
177
 
143
- declare const buttonVariants: (props?: ({
144
- variant?: "link" | "text" | "outline" | "default" | "destructive" | "secondary" | null | undefined;
145
- size?: "icon" | "md" | "lg" | null | undefined;
146
- } & class_variance_authority_types.ClassProp) | undefined) => string;
147
- type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
148
- type ButtonSize = VariantProps<typeof buttonVariants>["size"];
178
+ type ButtonVariant = "default" | "destructive" | "outline" | "secondary" | "text" | "link";
179
+ type ButtonSize = "md" | "lg" | "icon";
149
180
  type ButtonBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size">;
150
- interface ButtonProps extends ButtonBaseProps, VariantProps<typeof buttonVariants> {
181
+ interface ButtonProps extends ButtonBaseProps {
182
+ variant?: ButtonVariant;
183
+ size?: ButtonSize;
151
184
  loading?: boolean;
152
- disabled?: boolean;
153
185
  leftIcon?: React.ReactNode;
154
186
  rightIcon?: React.ReactNode;
155
187
  }
@@ -287,8 +319,8 @@ interface MultipleSelectionButtonProps extends MultipleSelectionButtonBaseProps
287
319
  */
288
320
  declare const MultipleSelectionButton: react.ForwardRefExoticComponent<MultipleSelectionButtonProps & react.RefAttributes<HTMLDivElement>>;
289
321
 
290
- type BaseInputProps$1 = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
291
- interface CheckboxProps extends BaseInputProps$1 {
322
+ type BaseInputProps$2 = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
323
+ interface CheckBoxProps extends BaseInputProps$2 {
292
324
  /** Marks the field as invalid (error state). Applies error color styling. */
293
325
  invalid?: boolean;
294
326
  /** Sets the checkbox to an indeterminate state. */
@@ -345,11 +377,11 @@ interface CheckboxProps extends BaseInputProps$1 {
345
377
  * />
346
378
  * ```
347
379
  */
348
- declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
380
+ declare const CheckBox: react.ForwardRefExoticComponent<CheckBoxProps & react.RefAttributes<HTMLInputElement>>;
349
381
 
350
382
  type Orientation = "horizontal" | "vertical";
351
383
 
352
- interface CheckboxGroupOption<T extends string = string> {
384
+ interface CheckBoxGroupOption<T extends string = string> {
353
385
  value: T;
354
386
  label: React.ReactNode;
355
387
  description?: React.ReactNode;
@@ -358,7 +390,7 @@ interface CheckboxGroupOption<T extends string = string> {
358
390
  id?: string;
359
391
  }
360
392
  type BaseFieldSetProps$1 = Omit<React.HTMLAttributes<HTMLFieldSetElement>, "onChange">;
361
- interface CheckboxGroupProps<T extends string = string> extends BaseFieldSetProps$1 {
393
+ interface CheckBoxGroupProps<T extends string = string> extends BaseFieldSetProps$1 {
362
394
  /** Accessible legend/title for the group */
363
395
  legend: React.ReactNode;
364
396
  /** Shared name assigned to all checkboxes in this group */
@@ -366,7 +398,7 @@ interface CheckboxGroupProps<T extends string = string> extends BaseFieldSetProp
366
398
  /** Layout direction */
367
399
  orientation?: Orientation;
368
400
  /** Checkbox options list */
369
- options: CheckboxGroupOption<T>[];
401
+ options: CheckBoxGroupOption<T>[];
370
402
  /** Controlled values array */
371
403
  value?: T[];
372
404
  /** Uncontrolled default values array */
@@ -387,13 +419,9 @@ interface CheckboxGroupProps<T extends string = string> extends BaseFieldSetProp
387
419
  /**
388
420
  * - Fieldset wrapper managing a group of checkboxes with optional Select All,description, and orientation.
389
421
  */
390
- declare const CheckboxGroup: react.ForwardRefExoticComponent<CheckboxGroupProps<string> & react.RefAttributes<HTMLFieldSetElement>>;
422
+ declare const CheckBoxGroup: react.ForwardRefExoticComponent<CheckBoxGroupProps<string> & react.RefAttributes<HTMLFieldSetElement>>;
391
423
 
392
- declare const inputVariants: (props?: ({
393
- variant?: "error" | "default" | null | undefined;
394
- } & class_variance_authority_types.ClassProp) | undefined) => string;
395
- type InputVariants = VariantProps<typeof inputVariants>;
396
- type InputVariant = InputVariants["variant"];
424
+ type InputVariant = "default" | "error";
397
425
  type InputBaseProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "required">;
398
426
  interface InputProps extends InputBaseProps {
399
427
  variant?: InputVariant;
@@ -492,10 +520,7 @@ interface QuantityInputProps extends QuantityInputBaseProps {
492
520
  */
493
521
  declare const QuantityInput: react.ForwardRefExoticComponent<QuantityInputProps & react.RefAttributes<HTMLInputElement>>;
494
522
 
495
- declare const searchInputVariants: (props?: ({
496
- variant?: "full" | "compact" | null | undefined;
497
- } & class_variance_authority_types.ClassProp) | undefined) => string;
498
- type SearchInputVariant = VariantProps<typeof searchInputVariants>["variant"];
523
+ type SearchInputVariant = "compact" | "full";
499
524
  type SearchInputBaseProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type">;
500
525
  interface SearchInputProps extends SearchInputBaseProps {
501
526
  variant?: SearchInputVariant;
@@ -657,35 +682,29 @@ type DateInputProps = SingleProps | RangeProps;
657
682
  */
658
683
  declare const DateInput: react.ForwardRefExoticComponent<DateInputProps & react.RefAttributes<HTMLInputElement>>;
659
684
 
660
- declare const dividerVariants: (props?: ({
661
- orientation?: "horizontal" | "vertical" | null | undefined;
662
- inset?: "end" | "none" | "both" | "start" | null | undefined;
663
- thickness?: "sm" | "px" | null | undefined;
664
- stretch?: "none" | "full" | null | undefined;
665
- } & class_variance_authority_types.ClassProp) | undefined) => string;
666
- type DividerVariant = VariantProps<typeof dividerVariants>;
667
- type DividerProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof dividerVariants> & {
685
+ type DividerOrientation = "horizontal" | "vertical";
686
+ type DividerInset = "none" | "start" | "end" | "both";
687
+ type DividerThickness = "px" | "sm";
688
+ type DividerStretch = "none" | "full";
689
+ type DividerVariant = {
690
+ orientation?: DividerOrientation;
691
+ inset?: DividerInset;
692
+ thickness?: DividerThickness;
693
+ stretch?: DividerStretch;
694
+ };
695
+ type DividerProps = React.HTMLAttributes<HTMLDivElement> & DividerVariant & {
668
696
  colorClassName?: string;
669
697
  };
670
698
  /**
671
699
  * - Themed horizontal or vertical separator with orientation, inset, thickness,
672
700
  * and stretch variants. Uses role="separator" for a11y.
673
701
  */
674
- declare const Divider: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
675
- orientation?: "horizontal" | "vertical" | null | undefined;
676
- inset?: "end" | "none" | "both" | "start" | null | undefined;
677
- thickness?: "sm" | "px" | null | undefined;
678
- stretch?: "none" | "full" | null | undefined;
679
- } & class_variance_authority_types.ClassProp) | undefined) => string> & {
702
+ declare const Divider: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLDivElement> & DividerVariant & {
680
703
  colorClassName?: string;
681
704
  } & react.RefAttributes<HTMLDivElement>>;
682
705
 
683
- declare const fileUploadVariants: (props?: ({
684
- variant?: "error" | "default" | "disabled" | "dragOver" | null | undefined;
685
- size?: "sm" | "md" | "lg" | null | undefined;
686
- } & class_variance_authority_types.ClassProp) | undefined) => string;
687
- type FileUploadVariant = VariantProps<typeof fileUploadVariants>["variant"];
688
- type FileUploadSize = VariantProps<typeof fileUploadVariants>["size"];
706
+ type FileUploadVariant = "default" | "dragOver" | "error" | "disabled";
707
+ type FileUploadSize = "sm" | "md" | "lg";
689
708
  type FileUploadIconType = "file" | "image" | "video";
690
709
  interface FileUploadError {
691
710
  type: "fileType" | "fileSize" | "fileCount" | "network" | "unknown";
@@ -890,8 +909,8 @@ interface PaginationProps extends PaginationBaseProps {
890
909
  */
891
910
  declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
892
911
 
893
- type BaseInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
894
- interface RadioProps extends BaseInputProps {
912
+ type BaseInputProps$1 = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
913
+ interface RadioProps extends BaseInputProps$1 {
895
914
  /** Marks the field as invalid (error state). Applies error color styling. */
896
915
  invalid?: boolean;
897
916
  /** Optional visible label. Use `children` if you need custom label layout. */
@@ -990,10 +1009,58 @@ interface RadioGroupProps<T extends string = string> extends BaseFieldSetProps {
990
1009
  */
991
1010
  declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps<string> & react.RefAttributes<HTMLFieldSetElement>>;
992
1011
 
993
- declare const selectVariants: (props?: ({
994
- variant?: "error" | "default" | null | undefined;
995
- } & class_variance_authority_types.ClassProp) | undefined) => string;
996
- type SelectVariant = VariantProps<typeof selectVariants>["variant"];
1012
+ type BaseInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type">;
1013
+ interface SwitchProps extends BaseInputProps {
1014
+ /** Marks the field as invalid (error state). Applies error color styling. */
1015
+ invalid?: boolean;
1016
+ /** Optional visible label displayed next to the switch. */
1017
+ label?: React.ReactNode;
1018
+ /** Optional hint/description text shown under the label for a11y. */
1019
+ description?: React.ReactNode;
1020
+ /** Id of the description element for aria-describedby; auto-wired if `description` provided. */
1021
+ descriptionId?: string;
1022
+ }
1023
+ /**
1024
+ * Switch - An accessible on/off switch built on a native checkbox.
1025
+ *
1026
+ * Features:
1027
+ * - Uses system design tokens for colors and typography
1028
+ * - Optional label and hint/description text
1029
+ * - Error/invalid and disabled states with proper styling
1030
+ * - Full keyboard navigation and screen reader support
1031
+ *
1032
+ * Notes:
1033
+ * - Implemented as `type="checkbox"` so it keeps the native checkbox role
1034
+ * while visually styled as a switch. This ensures maximum compatibility
1035
+ * with existing form/a11y helpers in the library.
1036
+ *
1037
+ * @example
1038
+ * ```tsx
1039
+ * // Basic usage
1040
+ * <Switch
1041
+ * id="notifications"
1042
+ * name="notifications"
1043
+ * checked={enabled}
1044
+ * onChange={(e) => setEnabled(e.target.checked)}
1045
+ * label="Notifications"
1046
+ * description="This is a hint text to help user."
1047
+ * />
1048
+ *
1049
+ * // With invalid state
1050
+ * <Switch
1051
+ * id="terms"
1052
+ * name="terms"
1053
+ * checked={accepted}
1054
+ * onChange={(e) => setAccepted(e.target.checked)}
1055
+ * label="Accept terms"
1056
+ * description="You must accept to continue."
1057
+ * invalid={!accepted && submitted}
1058
+ * />
1059
+ * ```
1060
+ */
1061
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
1062
+
1063
+ type SelectVariant = "default" | "error";
997
1064
  interface SelectOption {
998
1065
  value: string;
999
1066
  label: string;
@@ -1092,13 +1159,11 @@ interface SelectProps extends SelectBaseProps {
1092
1159
  */
1093
1160
  declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement | HTMLSelectElement>>;
1094
1161
 
1095
- declare const skeletonVariants: (props?: ({
1096
- variant?: "text" | "circle" | "rectangle" | null | undefined;
1097
- size?: "sm" | "md" | "lg" | null | undefined;
1098
- } & class_variance_authority_types.ClassProp) | undefined) => string;
1099
- type SkeletonVariant = NonNullable<VariantProps<typeof skeletonVariants>["variant"]>;
1100
- type SkeletonSize = NonNullable<VariantProps<typeof skeletonVariants>["size"]>;
1101
- interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "width" | "height">, VariantProps<typeof skeletonVariants> {
1162
+ type SkeletonVariant = "text" | "circle" | "rectangle";
1163
+ type SkeletonSize = "sm" | "md" | "lg";
1164
+ interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "width" | "height"> {
1165
+ variant?: SkeletonVariant;
1166
+ size?: SkeletonSize;
1102
1167
  /**
1103
1168
  * Width of the skeleton.
1104
1169
  * If a number is provided, it will be automatically converted to pixels.
@@ -1375,6 +1440,19 @@ interface TimePickerProps {
1375
1440
  */
1376
1441
  declare const TimePicker: react.ForwardRefExoticComponent<TimePickerProps & react.RefAttributes<HTMLDivElement>>;
1377
1442
 
1443
+ type CountdownUnit = "days" | "hours" | "minutes" | "seconds";
1444
+ type CountdownSize = "sm" | "lg";
1445
+ type CountdownTimeValues = Partial<Record<CountdownUnit, number>>;
1446
+ interface CountdownProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1447
+ targetDate: Date | string;
1448
+ displayUnits?: CountdownUnit[];
1449
+ size?: CountdownSize;
1450
+ label?: string;
1451
+ onComplete?: () => void;
1452
+ unitLabels?: Partial<Record<CountdownUnit, string>>;
1453
+ }
1454
+ declare const Countdown: react.ForwardRefExoticComponent<CountdownProps & react.RefAttributes<HTMLDivElement>>;
1455
+
1378
1456
  type ToastStatus = "success" | "info" | "warn" | "error";
1379
1457
  interface ToastAction {
1380
1458
  label: string;
@@ -1665,28 +1743,57 @@ interface ViewToggleProps {
1665
1743
  */
1666
1744
  declare const ViewToggle: React.FC<ViewToggleProps>;
1667
1745
 
1746
+ interface DefaultAssetProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
1747
+ /**
1748
+ * Optional square dimension override. Falls back to the intrinsic
1749
+ * width/height of the asset when not provided.
1750
+ */
1751
+ size?: number;
1752
+ }
1753
+ type DefaultAssetComponent = ForwardRefExoticComponent<DefaultAssetProps & RefAttributes<SVGSVGElement>> | MemoExoticComponent<ForwardRefExoticComponent<DefaultAssetProps & RefAttributes<SVGSVGElement>>>;
1754
+
1668
1755
  /**
1669
- * Centralized catalog of fallback imagery for avatars and generic image slots.
1670
- * Consumers can reference these to keep placeholder usage consistent.
1756
+ * Group avatar placeholder rendered as an inline SVG so consumers
1757
+ * don't need to manage static asset paths.
1758
+ */
1759
+ declare const GroupAvatar: react.MemoExoticComponent<react.ForwardRefExoticComponent<DefaultAssetProps & react.RefAttributes<SVGSVGElement>>>;
1760
+
1761
+ /**
1762
+ * Image placeholder illustration as an inline SVG.
1763
+ */
1764
+ declare const ImagePlaceholder: react.MemoExoticComponent<react.ForwardRefExoticComponent<DefaultAssetProps & react.RefAttributes<SVGSVGElement>>>;
1765
+
1766
+ /**
1767
+ * Profile avatar placeholder rendered as an inline SVG.
1671
1768
  */
1672
- declare const defaultAssets: {
1673
- readonly avatars: {
1674
- readonly group: string;
1675
- readonly profile: string;
1769
+ declare const ProfileAvatar: react.MemoExoticComponent<react.ForwardRefExoticComponent<DefaultAssetProps & react.RefAttributes<SVGSVGElement>>>;
1770
+
1771
+ type DefaultAssetCatalog = {
1772
+ avatars: {
1773
+ group: DefaultAssetComponent;
1774
+ profile: DefaultAssetComponent;
1676
1775
  };
1677
- readonly placeholders: {
1678
- readonly image: string;
1776
+ placeholders: {
1777
+ image: DefaultAssetComponent;
1679
1778
  };
1680
1779
  };
1780
+ /**
1781
+ * Centralized catalog of fallback imagery for avatars and generic image slots.
1782
+ * Provided as inline SVG React components to avoid bundling pitfalls for consumers.
1783
+ */
1784
+ declare const defaultAssets: DefaultAssetCatalog;
1785
+ type DefaultAssets = DefaultAssetCatalog;
1786
+ type DefaultAssetCategory = keyof DefaultAssetCatalog;
1787
+ type DefaultAssetVariant<C extends DefaultAssetCategory = DefaultAssetCategory> = keyof DefaultAssetCatalog[C];
1681
1788
 
1682
1789
  type AvatarPlaceholderCategory = keyof typeof defaultAssets;
1683
1790
  type AvatarPlaceholderVariantMap = {
1684
1791
  [K in AvatarPlaceholderCategory]: keyof (typeof defaultAssets)[K];
1685
1792
  };
1686
1793
  type AvatarPlaceholderVariant<C extends AvatarPlaceholderCategory = AvatarPlaceholderCategory> = AvatarPlaceholderVariantMap[C];
1687
- interface BaseAvatarPlaceholderProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt"> {
1794
+ interface BaseAvatarPlaceholderProps extends Omit<DefaultAssetProps, "children"> {
1688
1795
  /**
1689
- * Accessible text describing the placeholder image.
1796
+ * Accessible text describing the placeholder illustration.
1690
1797
  * Falls back to a generated description derived from category and variant.
1691
1798
  */
1692
1799
  alt?: string;
@@ -1702,44 +1809,69 @@ interface AvatarPlaceholderProps<C extends AvatarPlaceholderCategory = AvatarPla
1702
1809
  variant: AvatarPlaceholderVariant<C>;
1703
1810
  }
1704
1811
  /**
1705
- * Thin wrapper around the shared default asset catalog that renders placeholder imagery
1706
- * (e.g. generic avatars) as a standard `<img>` element with sensible defaults.
1812
+ * Thin wrapper around the shared default asset catalog that renders placeholder
1813
+ * imagery (e.g. generic avatars) as inline SVG React components with sensible defaults.
1707
1814
  */
1708
- declare const AvatarPlaceholder: react.ForwardRefExoticComponent<AvatarPlaceholderProps<"avatars" | "placeholders"> & react.RefAttributes<HTMLImageElement>>;
1815
+ declare const AvatarPlaceholder: react.ForwardRefExoticComponent<AvatarPlaceholderProps<keyof {
1816
+ avatars: {
1817
+ group: DefaultAssetComponent;
1818
+ profile: DefaultAssetComponent;
1819
+ };
1820
+ placeholders: {
1821
+ image: DefaultAssetComponent;
1822
+ };
1823
+ }> & react.RefAttributes<SVGSVGElement>>;
1709
1824
 
1710
- declare const logoAssets: {
1711
- readonly app: {
1712
- readonly png: string;
1713
- readonly svg: string;
1825
+ interface LogoAssetProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
1826
+ /**
1827
+ * Optional square dimension override; falls back to intrinsic size.
1828
+ */
1829
+ size?: number;
1830
+ /**
1831
+ * Optional alt text (mirrored to aria-label by consumers).
1832
+ */
1833
+ alt?: string;
1834
+ }
1835
+ type LogoAssetComponent = ForwardRefExoticComponent<LogoAssetProps & RefAttributes<SVGSVGElement>> | MemoExoticComponent<ForwardRefExoticComponent<LogoAssetProps & RefAttributes<SVGSVGElement>>>;
1836
+
1837
+ declare const AppLogo: react.MemoExoticComponent<react.ForwardRefExoticComponent<LogoAssetProps & react.RefAttributes<SVGSVGElement>>>;
1838
+
1839
+ declare const CampaignLogo: react.MemoExoticComponent<react.ForwardRefExoticComponent<LogoAssetProps & react.RefAttributes<SVGSVGElement>>>;
1840
+
1841
+ declare const IconBigLogo: react.MemoExoticComponent<react.ForwardRefExoticComponent<LogoAssetProps & react.RefAttributes<SVGSVGElement>>>;
1842
+
1843
+ declare const IconLogo: react.MemoExoticComponent<react.ForwardRefExoticComponent<LogoAssetProps & react.RefAttributes<SVGSVGElement>>>;
1844
+
1845
+ type LogoAssetCatalog = {
1846
+ app: {
1847
+ svg: LogoAssetComponent;
1714
1848
  };
1715
- readonly campaign: {
1716
- readonly png: string;
1717
- readonly svg: string;
1849
+ campaign: {
1850
+ svg: LogoAssetComponent;
1718
1851
  };
1719
- readonly membership: {
1720
- readonly png: string;
1721
- readonly svg: string;
1852
+ membership: {
1853
+ svg: LogoAssetComponent;
1722
1854
  };
1723
- readonly icon: {
1724
- readonly png: string;
1725
- readonly svg: string;
1855
+ icon: {
1856
+ svg: LogoAssetComponent;
1726
1857
  };
1727
- readonly "icon-big": {
1728
- readonly png: string;
1858
+ "icon-big": {
1859
+ svg: LogoAssetComponent;
1729
1860
  };
1730
1861
  };
1862
+ declare const logoAssets: LogoAssetCatalog;
1863
+ type LogoAssets = LogoAssetCatalog;
1731
1864
 
1732
1865
  type LogoVariant = keyof typeof logoAssets;
1733
- type LogoFormat = {
1734
- [K in LogoVariant]: keyof (typeof logoAssets)[K];
1735
- }[LogoVariant];
1736
- interface LogoProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt"> {
1866
+ type LogoFormat = "svg";
1867
+ interface LogoProps extends Omit<LogoAssetProps, "children"> {
1737
1868
  /**
1738
1869
  * Which logo variant to render (derived from logo assets).
1739
1870
  */
1740
1871
  variant: LogoVariant;
1741
1872
  /**
1742
- * File format to render. Defaults to SVG when available, otherwise PNG.
1873
+ * Logical format to render. Both formats map to inline SVG components.
1874
+ * Defaults to SVG when available.
1743
1875
  */
1744
1876
  format?: LogoFormat;
1745
1877
  /**
@@ -1750,7 +1882,7 @@ interface LogoProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "a
1750
1882
  /**
1751
1883
  * Branded logo renderer that stays tightly coupled to available assets.
1752
1884
  */
1753
- declare const Logo: react.ForwardRefExoticComponent<LogoProps & react.RefAttributes<HTMLImageElement>>;
1885
+ declare const Logo: react.ForwardRefExoticComponent<LogoProps & react.RefAttributes<SVGSVGElement>>;
1754
1886
 
1755
1887
  interface LoadingScreenProps extends Omit<react__default.HTMLAttributes<HTMLDivElement>, "children"> {
1756
1888
  /**
@@ -1809,6 +1941,78 @@ interface LoadingScreenProps extends Omit<react__default.HTMLAttributes<HTMLDivE
1809
1941
  */
1810
1942
  declare const LoadingScreen: react__default.ForwardRefExoticComponent<LoadingScreenProps & react__default.RefAttributes<HTMLDivElement>>;
1811
1943
 
1944
+ interface WelcomeAssetProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
1945
+ /**
1946
+ * Optional square dimension override; falls back to intrinsic size.
1947
+ */
1948
+ size?: number;
1949
+ }
1950
+ type WelcomeAssetComponent = ForwardRefExoticComponent<WelcomeAssetProps & RefAttributes<SVGSVGElement>> | MemoExoticComponent<ForwardRefExoticComponent<WelcomeAssetProps & RefAttributes<SVGSVGElement>>>;
1951
+
1952
+ type WelcomeAssetCatalog = {
1953
+ ellipses: readonly [WelcomeAssetComponent, WelcomeAssetComponent];
1954
+ multipleLine: WelcomeAssetComponent;
1955
+ background: WelcomeAssetComponent;
1956
+ };
1957
+ declare const welcomeAssets: WelcomeAssetCatalog;
1958
+
1959
+ type EllipseSource = string | WelcomeAssetComponent;
1960
+ type LineSource = string | WelcomeAssetComponent;
1961
+ type BackgroundSource = string | WelcomeAssetComponent;
1962
+ interface WelcomeBackgroundProps extends Omit<react__default.HTMLAttributes<HTMLDivElement>, "children"> {
1963
+ /**
1964
+ * Optional children rendered on top of the animated background.
1965
+ */
1966
+ children?: react__default.ReactNode;
1967
+ /**
1968
+ * Toggle ellipse animation layer.
1969
+ * @default true
1970
+ */
1971
+ showEllipses?: boolean;
1972
+ /**
1973
+ * Toggle line wave animation layer.
1974
+ * @default true
1975
+ */
1976
+ showLines?: boolean;
1977
+ /**
1978
+ * Disable all animations (also handled automatically for prefers-reduced-motion).
1979
+ * @default false
1980
+ */
1981
+ disableAnimation?: boolean;
1982
+ /**
1983
+ * Background image URL or inline React SVG component.
1984
+ * Defaults to bundled inline SVG background.
1985
+ */
1986
+ backgroundImage?: BackgroundSource;
1987
+ /**
1988
+ * Ellipse sources (URLs or inline React SVG components). Defaults to bundled inline SVGs.
1989
+ */
1990
+ ellipsesData?: readonly EllipseSource[];
1991
+ /**
1992
+ * Lines overlay source (URL or inline React SVG component). Defaults to bundled inline SVG.
1993
+ */
1994
+ linesSrc?: LineSource;
1995
+ }
1996
+ /**
1997
+ * Animated background for welcome/landing experiences.
1998
+ * - Uses deterministic seeded randomness for stable ellipse paths.
1999
+ * - Honors reduced-motion preferences and optional animation disabling.
2000
+ * - Mobile-first; hides heavy layers on very small screens via consumer control.
2001
+ *
2002
+ * @remarks
2003
+ * **Asset handling**
2004
+ * - Recommended: host your own assets (e.g., place files in `/public/static/welcome`)
2005
+ * and pass them via `backgroundImage`, `ellipsesData`, and `linesSrc`.
2006
+ * - Bundled option: import `welcomeAssets` and copy the hashed files from
2007
+ * `node_modules/@scalably/ui/dist/` into a served location (e.g., via a
2008
+ * postinstall script) before using those paths.
2009
+ * Bundler setups differ; self-hosted URLs are the most reliable.
2010
+ */
2011
+ declare const WelcomeBackground: {
2012
+ ({ className, style, children, showEllipses, showLines, disableAnimation, backgroundImage, ellipsesData, linesSrc, ...props }: WelcomeBackgroundProps): react_jsx_runtime.JSX.Element;
2013
+ displayName: string;
2014
+ };
2015
+
1812
2016
  type ImageSourceMode = "both" | "url-only" | "upload-only";
1813
2017
  interface RichTextEditorProps {
1814
2018
  /** Controlled HTML value of the editor */
@@ -1872,6 +2076,23 @@ interface RichTextEditorProps {
1872
2076
  * "url-only" so the image feature is still usable.
1873
2077
  */
1874
2078
  imageSourceMode?: ImageSourceMode;
2079
+ /**
2080
+ * Maximum number of plain-text characters allowed.
2081
+ * If the limit is reached, further typing is prevented by the
2082
+ * `CharacterCount` extension.
2083
+ *
2084
+ * Non-positive or non-finite values (e.g. 0, NaN, Infinity) are treated
2085
+ * as "no limit".
2086
+ */
2087
+ maxCharacters?: number;
2088
+ /**
2089
+ * Callback fired when the max character limit is reached.
2090
+ * Fired only once per breach (debounced until length drops below limit).
2091
+ */
2092
+ onMaxLengthExceed?: (info: {
2093
+ max: number;
2094
+ current: number;
2095
+ }) => void;
1875
2096
  }
1876
2097
  /**
1877
2098
  * RichTextEditor - Controlled rich text editor built on top of Tiptap.
@@ -1890,7 +2111,7 @@ interface RichTextEditorProps {
1890
2111
  * import { RichTextEditor, RichTextViewer } from '@scalably/ui';
1891
2112
  *
1892
2113
  * function BlogPost({ post }) {
1893
- * const [content, setContent] = useState(post.content);
2114
+ * const [content, setContent] = useState<string>(post.content);
1894
2115
  *
1895
2116
  * return (
1896
2117
  * <div>
@@ -1904,7 +2125,7 @@ interface RichTextEditorProps {
1904
2125
  * @see RichTextViewer - Read-only viewer component for displaying rich text content
1905
2126
  */
1906
2127
  declare const RichTextEditor: {
1907
- ({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
2128
+ ({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, maxCharacters, onMaxLengthExceed, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
1908
2129
  displayName: string;
1909
2130
  };
1910
2131
 
@@ -3076,4 +3297,4 @@ interface YoutubeIconProps extends React.SVGProps<SVGSVGElement> {
3076
3297
  */
3077
3298
  declare const YoutubeIcon: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<YoutubeIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>>;
3078
3299
 
3079
- export { AvatarPlaceholder, type AvatarPlaceholderCategory, type AvatarPlaceholderProps, type AvatarPlaceholderVariant, BackToTop, type BackToTopProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, type CalendarIconProps, CaptureIcon, type CaptureIconProps, CheckIcon, type CheckIconProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CloseIcon, type CloseIconProps, DateInput, type DateInputMode, type DateInputProps, DatePicker, type DatePickerMode, type DatePickerProps, DiscordIcon, type DiscordIconProps, Divider, type DividerProps, type DividerVariant, DropUpIcon, type DropUpIconProps, DropdownIcon, type DropdownIconProps, ErrorIcon, type ErrorIconProps, FacebookIcon, type FacebookIconProps, type FieldErrorLike, FileIcon, type FileIconProps, FileUpload, type FileUploadError, type FileUploadFile, FileUploadIcon, type FileUploadIconProps, type FileUploadIconType, type FileUploadProps, type FileUploadSize, type FileUploadVariant, Form, type FormErrorItem, FormErrorSummary, type FormErrorSummaryProps, FormField, type FormFieldProps, type FormProps, GmailIcon, type GmailIconProps, GridIcon, type GridIconProps, ImageIcon, type ImageIconProps, type ImageSourceMode, ImageUploadIcon, type ImageUploadIconProps, IndeterminateIcon, type IndeterminateIconProps, InfoIcon, type InfoIconProps, Input, type InputProps, type InputVariant, InstagramIcon, type InstagramIconProps, KakaoTalkIcon, type KakaoTalkIconProps, LineIcon, type LineIconProps, LinkedInIcon, type LinkedInIconProps, ListIcon, type ListIconProps, LoadingScreen, type LoadingScreenProps, Logo, type LogoFormat, type LogoProps, type LogoVariant, MessengerIcon, type MessengerIconProps, MinusIcon, type MinusIconProps, MultipleSelectionButton, type MultipleSelectionButtonProps, MultipleSelectionIcon, type MultipleSelectionIconProps, Pagination, type PaginationProps, PlusIcon, type PlusIconProps, QuantityInput, type QuantityInputProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeValue, RedditIcon, type RedditIconProps, RichTextEditor, type RichTextEditorProps, RichTextViewer, type RichTextViewerProps, ScalablyUIProvider, type ScalablyUIProviderProps, SearchIcon, type SearchIconProps, SearchInput, type SearchInputProps, type SearchInputVariant, Select, type SelectOption, type SelectProps, type SelectVariant, SettingsIcon, type SettingsIconProps, SignalIcon, type SignalIconProps, Skeleton, type SkeletonProps, type SkeletonSize, SkeletonText, type SkeletonTextProps, type SkeletonVariant, SlackIcon, type SlackIconProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusBadgeStatus, type StatusBadgeVariant, SuccessIcon, type SuccessIconProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TelegramIcon, type TelegramIconProps, TickIcon, type TickIconProps, TiktokIcon, type TiktokIconProps, TimePicker, type TimePickerProps, ToFirstIcon, type ToFirstIconProps, ToLastIcon, type ToLastIconProps, ToNextIcon, type ToNextIconProps, ToPreviousIcon, type ToPreviousIconProps, Toast, type ToastAction, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, type ToastStatus, Tooltip, type TooltipAlign, type TooltipProps, type TooltipSide, TwitchIcon, type TwitchIconProps, VideoIcon, type VideoIconProps, VideoUploadIcon, type VideoUploadIconProps, type ViewMode, ViewToggle, type ViewToggleProps, WarnIcon, type WarnIconProps, WhatsAppIcon, type WhatsAppIconProps, XIcon, type XIconProps, YoutubeIcon, type YoutubeIconProps, clampDate, cn, daysGrid, debounce, defaultAssets, fieldErrorToProps, formatDateLocalized, logoAssets, monthsForLocale, scopeClass, throttle, toDateKey, weekdaysForLocale, zodErrorsToSummary };
3300
+ export { AppLogo, AuthPrompt, type AuthPromptProps, AvatarPlaceholder, type AvatarPlaceholderCategory, type AvatarPlaceholderProps, type AvatarPlaceholderVariant, BackToTop, type BackToTopProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, type CalendarIconProps, CampaignLogo, CaptureIcon, type CaptureIconProps, CheckBox, CheckBoxGroup, type CheckBoxGroupOption, type CheckBoxGroupProps, type CheckBoxProps, CheckIcon, type CheckIconProps, CloseIcon, type CloseIconProps, Countdown, type CountdownProps, type CountdownSize, type CountdownTimeValues, type CountdownUnit, DateInput, type DateInputMode, type DateInputProps, DatePicker, type DatePickerMode, type DatePickerProps, type DefaultAssetCategory, type DefaultAssetComponent, type DefaultAssetProps, type DefaultAssetVariant, type DefaultAssets, DiscordIcon, type DiscordIconProps, Divider, type DividerProps, type DividerVariant, DropUpIcon, type DropUpIconProps, DropdownIcon, type DropdownIconProps, ErrorIcon, type ErrorIconProps, FacebookIcon, type FacebookIconProps, type FieldErrorLike, FileIcon, type FileIconProps, FileUpload, type FileUploadError, type FileUploadFile, FileUploadIcon, type FileUploadIconProps, type FileUploadIconType, type FileUploadProps, type FileUploadSize, type FileUploadVariant, Form, type FormErrorItem, FormErrorSummary, type FormErrorSummaryProps, FormField, type FormFieldProps, type FormProps, GmailIcon, type GmailIconProps, GridIcon, type GridIconProps, GroupAvatar, IconBigLogo, IconLogo, ImageIcon, type ImageIconProps, ImagePlaceholder, type ImageSourceMode, ImageUploadIcon, type ImageUploadIconProps, IndeterminateIcon, type IndeterminateIconProps, InfoIcon, type InfoIconProps, Input, type InputProps, type InputVariant, InstagramIcon, type InstagramIconProps, KakaoTalkIcon, type KakaoTalkIconProps, LineIcon, type LineIconProps, LinkedInIcon, type LinkedInIconProps, ListIcon, type ListIconProps, LoadingScreen, type LoadingScreenProps, Logo, type LogoAssetComponent, type LogoAssetProps, type LogoAssets, type LogoFormat, type LogoProps, type LogoVariant, MessengerIcon, type MessengerIconProps, MinusIcon, type MinusIconProps, MultipleSelectionButton, type MultipleSelectionButtonProps, MultipleSelectionIcon, type MultipleSelectionIconProps, Pagination, type PaginationProps, PlusIcon, type PlusIconProps, ProfileAvatar, QuantityInput, type QuantityInputProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeValue, RedditIcon, type RedditIconProps, RichTextEditor, type RichTextEditorProps, RichTextViewer, type RichTextViewerProps, ScalablyUIProvider, type ScalablyUIProviderProps, SearchIcon, type SearchIconProps, SearchInput, type SearchInputProps, type SearchInputVariant, Select, type SelectOption, type SelectProps, type SelectVariant, SettingsIcon, type SettingsIconProps, SignalIcon, type SignalIconProps, Skeleton, type SkeletonProps, type SkeletonSize, SkeletonText, type SkeletonTextProps, type SkeletonVariant, SlackIcon, type SlackIconProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, type StatusBadgeStatus, type StatusBadgeVariant, SuccessIcon, type SuccessIconProps, Switch, type SwitchProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TelegramIcon, type TelegramIconProps, TickIcon, type TickIconProps, TiktokIcon, type TiktokIconProps, TimePicker, type TimePickerProps, ToFirstIcon, type ToFirstIconProps, ToLastIcon, type ToLastIconProps, ToNextIcon, type ToNextIconProps, ToPreviousIcon, type ToPreviousIconProps, Toast, type ToastAction, ToastContainer, type ToastContainerProps, type ToastPosition, type ToastProps, type ToastStatus, Tooltip, type TooltipAlign, type TooltipProps, type TooltipSide, TwitchIcon, type TwitchIconProps, VideoIcon, type VideoIconProps, VideoUploadIcon, type VideoUploadIconProps, type ViewMode, ViewToggle, type ViewToggleProps, WarnIcon, type WarnIconProps, WelcomeBackground, type WelcomeBackgroundProps, WhatsAppIcon, type WhatsAppIconProps, XIcon, type XIconProps, YoutubeIcon, type YoutubeIconProps, clampDate, cn, daysGrid, debounce, defaultAssets, fieldErrorToProps, formatDateLocalized, logoAssets, monthsForLocale, scopeClass, throttle, toDateKey, weekdaysForLocale, welcomeAssets, zodErrorsToSummary };