@scalably/ui 0.2.2 → 0.4.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ReactNode } from 'react';
2
+ import react__default, { ReactNode, HTMLAttributes, ImgHTMLAttributes } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -88,6 +88,64 @@ interface BackToTopProps {
88
88
  */
89
89
  declare const BackToTop: react.ForwardRefExoticComponent<BackToTopProps & react.RefAttributes<HTMLButtonElement>>;
90
90
 
91
+ interface AuthPromptProps {
92
+ /** Main heading text. Defaults to "Login to continue". */
93
+ title?: React.ReactNode;
94
+ /**
95
+ * Supporting description below the title.
96
+ * Defaults to "Login to unlock this feature and continue exploring".
97
+ */
98
+ description?: React.ReactNode;
99
+ /** Label for the primary action button (left). Defaults to "Login". */
100
+ primaryLabel?: React.ReactNode;
101
+ /** Label for the secondary action button (right). Defaults to "Register". */
102
+ secondaryLabel?: React.ReactNode;
103
+ /**
104
+ * Click handler for the primary action button.
105
+ * Typically used to navigate to the login page.
106
+ */
107
+ onPrimaryClick?: () => void;
108
+ /**
109
+ * Click handler for the secondary action button.
110
+ * Typically used to navigate to the registration page.
111
+ */
112
+ onSecondaryClick?: () => void;
113
+ /** Additional classes for the outer container. */
114
+ className?: string;
115
+ /** Additional classes for the buttons wrapper row. */
116
+ actionsClassName?: string;
117
+ }
118
+ /**
119
+ * AuthPrompt - A simple authentication call-to-action card.
120
+ *
121
+ * Designed for feature gating flows where users must authenticate before
122
+ * continuing. The layout follows the Scalably design system and the
123
+ * provided reference UI:
124
+ *
125
+ * - Centered card with title and description
126
+ * - Two horizontally aligned buttons on the same row
127
+ * - Mobile-first responsive layout with full-width buttons on small screens
128
+ * - Consumers provide navigation logic via `onPrimaryClick` / `onSecondaryClick`
129
+ *
130
+ * @example
131
+ * ```tsx
132
+ * <AuthPrompt
133
+ * onPrimaryClick={() => router.push("/login")}
134
+ * onSecondaryClick={() => router.push("/register")}
135
+ * />
136
+ *
137
+ * <AuthPrompt
138
+ * title="Join Scalably"
139
+ * description="Create an account or log in to save your workspace."
140
+ * primaryLabel="Sign in"
141
+ * secondaryLabel="Create account"
142
+ * onPrimaryClick={() => navigate("/signin")}
143
+ * onSecondaryClick={() => navigate("/signup")}
144
+ * />
145
+ * ```
146
+ */
147
+ declare const AuthPrompt: React.FC<AuthPromptProps>;
148
+
91
149
  /**
92
150
  * Accessible status badge with semantic color variants.
93
151
  *
@@ -107,9 +165,9 @@ declare const BackToTop: react.ForwardRefExoticComponent<BackToTopProps & react.
107
165
  * ```
108
166
  */
109
167
  declare const statusBadgeVariants: (props?: ({
110
- size?: "sm" | "md" | "lg" | null | undefined;
168
+ size?: "md" | "lg" | "sm" | null | undefined;
111
169
  status?: "error" | "success" | "warning" | "info" | "inactive" | null | undefined;
112
- variant?: "solid" | "soft" | "outline" | null | undefined;
170
+ variant?: "outline" | "solid" | "soft" | null | undefined;
113
171
  fullWidth?: boolean | null | undefined;
114
172
  } & class_variance_authority_types.ClassProp) | undefined) => string;
115
173
  type StatusBadgeStatus = NonNullable<VariantProps<typeof statusBadgeVariants>["status"]>;
@@ -141,7 +199,7 @@ interface StatusBadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "
141
199
  declare const StatusBadge: react.ForwardRefExoticComponent<StatusBadgeProps & react.RefAttributes<HTMLSpanElement>>;
142
200
 
143
201
  declare const buttonVariants: (props?: ({
144
- variant?: "link" | "text" | "outline" | "default" | "destructive" | "secondary" | null | undefined;
202
+ variant?: "link" | "text" | "default" | "destructive" | "outline" | "secondary" | null | undefined;
145
203
  size?: "icon" | "md" | "lg" | null | undefined;
146
204
  } & class_variance_authority_types.ClassProp) | undefined) => string;
147
205
  type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
@@ -287,8 +345,8 @@ interface MultipleSelectionButtonProps extends MultipleSelectionButtonBaseProps
287
345
  */
288
346
  declare const MultipleSelectionButton: react.ForwardRefExoticComponent<MultipleSelectionButtonProps & react.RefAttributes<HTMLDivElement>>;
289
347
 
290
- type BaseInputProps$1 = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
291
- interface CheckboxProps extends BaseInputProps$1 {
348
+ type BaseInputProps$2 = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
349
+ interface CheckBoxProps extends BaseInputProps$2 {
292
350
  /** Marks the field as invalid (error state). Applies error color styling. */
293
351
  invalid?: boolean;
294
352
  /** Sets the checkbox to an indeterminate state. */
@@ -345,11 +403,11 @@ interface CheckboxProps extends BaseInputProps$1 {
345
403
  * />
346
404
  * ```
347
405
  */
348
- declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
406
+ declare const CheckBox: react.ForwardRefExoticComponent<CheckBoxProps & react.RefAttributes<HTMLInputElement>>;
349
407
 
350
408
  type Orientation = "horizontal" | "vertical";
351
409
 
352
- interface CheckboxGroupOption<T extends string = string> {
410
+ interface CheckBoxGroupOption<T extends string = string> {
353
411
  value: T;
354
412
  label: React.ReactNode;
355
413
  description?: React.ReactNode;
@@ -358,7 +416,7 @@ interface CheckboxGroupOption<T extends string = string> {
358
416
  id?: string;
359
417
  }
360
418
  type BaseFieldSetProps$1 = Omit<React.HTMLAttributes<HTMLFieldSetElement>, "onChange">;
361
- interface CheckboxGroupProps<T extends string = string> extends BaseFieldSetProps$1 {
419
+ interface CheckBoxGroupProps<T extends string = string> extends BaseFieldSetProps$1 {
362
420
  /** Accessible legend/title for the group */
363
421
  legend: React.ReactNode;
364
422
  /** Shared name assigned to all checkboxes in this group */
@@ -366,7 +424,7 @@ interface CheckboxGroupProps<T extends string = string> extends BaseFieldSetProp
366
424
  /** Layout direction */
367
425
  orientation?: Orientation;
368
426
  /** Checkbox options list */
369
- options: CheckboxGroupOption<T>[];
427
+ options: CheckBoxGroupOption<T>[];
370
428
  /** Controlled values array */
371
429
  value?: T[];
372
430
  /** Uncontrolled default values array */
@@ -387,7 +445,7 @@ interface CheckboxGroupProps<T extends string = string> extends BaseFieldSetProp
387
445
  /**
388
446
  * - Fieldset wrapper managing a group of checkboxes with optional Select All,description, and orientation.
389
447
  */
390
- declare const CheckboxGroup: react.ForwardRefExoticComponent<CheckboxGroupProps<string> & react.RefAttributes<HTMLFieldSetElement>>;
448
+ declare const CheckBoxGroup: react.ForwardRefExoticComponent<CheckBoxGroupProps<string> & react.RefAttributes<HTMLFieldSetElement>>;
391
449
 
392
450
  declare const inputVariants: (props?: ({
393
451
  variant?: "error" | "default" | null | undefined;
@@ -660,7 +718,7 @@ declare const DateInput: react.ForwardRefExoticComponent<DateInputProps & react.
660
718
  declare const dividerVariants: (props?: ({
661
719
  orientation?: "horizontal" | "vertical" | null | undefined;
662
720
  inset?: "end" | "none" | "both" | "start" | null | undefined;
663
- thickness?: "sm" | "px" | null | undefined;
721
+ thickness?: "px" | "sm" | null | undefined;
664
722
  stretch?: "none" | "full" | null | undefined;
665
723
  } & class_variance_authority_types.ClassProp) | undefined) => string;
666
724
  type DividerVariant = VariantProps<typeof dividerVariants>;
@@ -674,7 +732,7 @@ type DividerProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof d
674
732
  declare const Divider: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
675
733
  orientation?: "horizontal" | "vertical" | null | undefined;
676
734
  inset?: "end" | "none" | "both" | "start" | null | undefined;
677
- thickness?: "sm" | "px" | null | undefined;
735
+ thickness?: "px" | "sm" | null | undefined;
678
736
  stretch?: "none" | "full" | null | undefined;
679
737
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
680
738
  colorClassName?: string;
@@ -682,7 +740,7 @@ declare const Divider: react.ForwardRefExoticComponent<react.HTMLAttributes<HTML
682
740
 
683
741
  declare const fileUploadVariants: (props?: ({
684
742
  variant?: "error" | "default" | "disabled" | "dragOver" | null | undefined;
685
- size?: "sm" | "md" | "lg" | null | undefined;
743
+ size?: "md" | "lg" | "sm" | null | undefined;
686
744
  } & class_variance_authority_types.ClassProp) | undefined) => string;
687
745
  type FileUploadVariant = VariantProps<typeof fileUploadVariants>["variant"];
688
746
  type FileUploadSize = VariantProps<typeof fileUploadVariants>["size"];
@@ -890,8 +948,8 @@ interface PaginationProps extends PaginationBaseProps {
890
948
  */
891
949
  declare const Pagination: react.ForwardRefExoticComponent<PaginationProps & react.RefAttributes<HTMLElement>>;
892
950
 
893
- type BaseInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
894
- interface RadioProps extends BaseInputProps {
951
+ type BaseInputProps$1 = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
952
+ interface RadioProps extends BaseInputProps$1 {
895
953
  /** Marks the field as invalid (error state). Applies error color styling. */
896
954
  invalid?: boolean;
897
955
  /** Optional visible label. Use `children` if you need custom label layout. */
@@ -990,6 +1048,57 @@ interface RadioGroupProps<T extends string = string> extends BaseFieldSetProps {
990
1048
  */
991
1049
  declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps<string> & react.RefAttributes<HTMLFieldSetElement>>;
992
1050
 
1051
+ type BaseInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type">;
1052
+ interface SwitchProps extends BaseInputProps {
1053
+ /** Marks the field as invalid (error state). Applies error color styling. */
1054
+ invalid?: boolean;
1055
+ /** Optional visible label displayed next to the switch. */
1056
+ label?: React.ReactNode;
1057
+ /** Optional hint/description text shown under the label for a11y. */
1058
+ description?: React.ReactNode;
1059
+ /** Id of the description element for aria-describedby; auto-wired if `description` provided. */
1060
+ descriptionId?: string;
1061
+ }
1062
+ /**
1063
+ * Switch - An accessible on/off switch built on a native checkbox.
1064
+ *
1065
+ * Features:
1066
+ * - Uses system design tokens for colors and typography
1067
+ * - Optional label and hint/description text
1068
+ * - Error/invalid and disabled states with proper styling
1069
+ * - Full keyboard navigation and screen reader support
1070
+ *
1071
+ * Notes:
1072
+ * - Implemented as `type="checkbox"` so it keeps the native checkbox role
1073
+ * while visually styled as a switch. This ensures maximum compatibility
1074
+ * with existing form/a11y helpers in the library.
1075
+ *
1076
+ * @example
1077
+ * ```tsx
1078
+ * // Basic usage
1079
+ * <Switch
1080
+ * id="notifications"
1081
+ * name="notifications"
1082
+ * checked={enabled}
1083
+ * onChange={(e) => setEnabled(e.target.checked)}
1084
+ * label="Notifications"
1085
+ * description="This is a hint text to help user."
1086
+ * />
1087
+ *
1088
+ * // With invalid state
1089
+ * <Switch
1090
+ * id="terms"
1091
+ * name="terms"
1092
+ * checked={accepted}
1093
+ * onChange={(e) => setAccepted(e.target.checked)}
1094
+ * label="Accept terms"
1095
+ * description="You must accept to continue."
1096
+ * invalid={!accepted && submitted}
1097
+ * />
1098
+ * ```
1099
+ */
1100
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
1101
+
993
1102
  declare const selectVariants: (props?: ({
994
1103
  variant?: "error" | "default" | null | undefined;
995
1104
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -1092,6 +1201,98 @@ interface SelectProps extends SelectBaseProps {
1092
1201
  */
1093
1202
  declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement | HTMLSelectElement>>;
1094
1203
 
1204
+ declare const skeletonVariants: (props?: ({
1205
+ variant?: "text" | "circle" | "rectangle" | null | undefined;
1206
+ size?: "md" | "lg" | "sm" | null | undefined;
1207
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1208
+ type SkeletonVariant = NonNullable<VariantProps<typeof skeletonVariants>["variant"]>;
1209
+ type SkeletonSize = NonNullable<VariantProps<typeof skeletonVariants>["size"]>;
1210
+ interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "width" | "height">, VariantProps<typeof skeletonVariants> {
1211
+ /**
1212
+ * Width of the skeleton.
1213
+ * If a number is provided, it will be automatically converted to pixels.
1214
+ * @example width={40} → width="40px"
1215
+ * @example width="100%" → width="100%"
1216
+ */
1217
+ width?: string | number;
1218
+ /**
1219
+ * Height of the skeleton.
1220
+ * If a number is provided, it will be automatically converted to pixels.
1221
+ * @example height={40} → height="40px"
1222
+ * @example height="100%" → height="100%"
1223
+ */
1224
+ height?: string | number;
1225
+ /**
1226
+ * Accessible label for screen readers.
1227
+ * Falls back to a generic "Loading" label if not provided.
1228
+ */
1229
+ "aria-label"?: string;
1230
+ }
1231
+ /**
1232
+ * Skeleton component for displaying loading placeholders with shimmer animation.
1233
+ *
1234
+ * Features:
1235
+ * - Multiple variants: text, circle, rectangle
1236
+ * - Responsive sizes: sm, md, lg
1237
+ * - Custom dimensions via width/height props
1238
+ * - Shimmer animation with reduced motion support
1239
+ * - Full accessibility support
1240
+ *
1241
+ * @example
1242
+ * ```tsx
1243
+ * // Basic text skeleton
1244
+ * <Skeleton variant="text" size="md" width="100%" />
1245
+ *
1246
+ * // Circle avatar skeleton
1247
+ * <Skeleton variant="circle" width={40} height={40} />
1248
+ *
1249
+ * // Custom rectangle
1250
+ * <Skeleton variant="rectangle" width={200} height={100} />
1251
+ * ```
1252
+ */
1253
+ declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
1254
+
1255
+ interface SkeletonTextProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
1256
+ /**
1257
+ * Number of lines to render.
1258
+ * @default 3
1259
+ */
1260
+ lines?: number;
1261
+ /**
1262
+ * Spacing between lines.
1263
+ * If a number is provided, it will be automatically converted to pixels.
1264
+ * @default "0.5rem"
1265
+ * @example gap={8} → gap="8px"
1266
+ * @example gap="1rem" → gap="1rem"
1267
+ */
1268
+ gap?: string | number;
1269
+ }
1270
+ /**
1271
+ * SkeletonText component for creating multi-line text skeleton placeholders.
1272
+ *
1273
+ * Features:
1274
+ * - Configurable number of lines
1275
+ * - Customizable gap between lines
1276
+ * - Natural paragraph ending (last line is 80% width when multiple lines)
1277
+ * - Composed from Skeleton components
1278
+ *
1279
+ * This component saves you from repeating the "flex-col gap + last line width" pattern
1280
+ * and enforces UI consistency across your application.
1281
+ *
1282
+ * @example
1283
+ * ```tsx
1284
+ * // Default 3-line paragraph skeleton
1285
+ * <SkeletonText />
1286
+ *
1287
+ * // Custom 5-line skeleton with larger gap
1288
+ * <SkeletonText lines={5} gap="1rem" />
1289
+ *
1290
+ * // Compact 2-line skeleton
1291
+ * <SkeletonText lines={2} gap={4} />
1292
+ * ```
1293
+ */
1294
+ declare const SkeletonText: react.ForwardRefExoticComponent<SkeletonTextProps & react.RefAttributes<HTMLDivElement>>;
1295
+
1095
1296
  type TabsProps = {
1096
1297
  className?: string;
1097
1298
  value?: string;
@@ -1283,6 +1484,19 @@ interface TimePickerProps {
1283
1484
  */
1284
1485
  declare const TimePicker: react.ForwardRefExoticComponent<TimePickerProps & react.RefAttributes<HTMLDivElement>>;
1285
1486
 
1487
+ type CountdownUnit = "days" | "hours" | "minutes" | "seconds";
1488
+ type CountdownSize = "sm" | "lg";
1489
+ type CountdownTimeValues = Partial<Record<CountdownUnit, number>>;
1490
+ interface CountdownProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
1491
+ targetDate: Date | string;
1492
+ displayUnits?: CountdownUnit[];
1493
+ size?: CountdownSize;
1494
+ label?: string;
1495
+ onComplete?: () => void;
1496
+ unitLabels?: Partial<Record<CountdownUnit, string>>;
1497
+ }
1498
+ declare const Countdown: react.ForwardRefExoticComponent<CountdownProps & react.RefAttributes<HTMLDivElement>>;
1499
+
1286
1500
  type ToastStatus = "success" | "info" | "warn" | "error";
1287
1501
  interface ToastAction {
1288
1502
  label: string;
@@ -1573,6 +1787,362 @@ interface ViewToggleProps {
1573
1787
  */
1574
1788
  declare const ViewToggle: React.FC<ViewToggleProps>;
1575
1789
 
1790
+ /**
1791
+ * Centralized catalog of fallback imagery for avatars and generic image slots.
1792
+ * Consumers can reference these to keep placeholder usage consistent.
1793
+ */
1794
+ declare const defaultAssets: {
1795
+ readonly avatars: {
1796
+ readonly group: string;
1797
+ readonly profile: string;
1798
+ };
1799
+ readonly placeholders: {
1800
+ readonly image: string;
1801
+ };
1802
+ };
1803
+
1804
+ type AvatarPlaceholderCategory = keyof typeof defaultAssets;
1805
+ type AvatarPlaceholderVariantMap = {
1806
+ [K in AvatarPlaceholderCategory]: keyof (typeof defaultAssets)[K];
1807
+ };
1808
+ type AvatarPlaceholderVariant<C extends AvatarPlaceholderCategory = AvatarPlaceholderCategory> = AvatarPlaceholderVariantMap[C];
1809
+ interface BaseAvatarPlaceholderProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt"> {
1810
+ /**
1811
+ * Accessible text describing the placeholder image.
1812
+ * Falls back to a generated description derived from category and variant.
1813
+ */
1814
+ alt?: string;
1815
+ }
1816
+ interface AvatarPlaceholderProps<C extends AvatarPlaceholderCategory = AvatarPlaceholderCategory> extends BaseAvatarPlaceholderProps {
1817
+ /**
1818
+ * Asset grouping to load from (`avatars` or `placeholders`).
1819
+ */
1820
+ category: C;
1821
+ /**
1822
+ * Asset key within the selected category (e.g. `group`, `profile`, `image`).
1823
+ */
1824
+ variant: AvatarPlaceholderVariant<C>;
1825
+ }
1826
+ /**
1827
+ * Thin wrapper around the shared default asset catalog that renders placeholder imagery
1828
+ * (e.g. generic avatars) as a standard `<img>` element with sensible defaults.
1829
+ */
1830
+ declare const AvatarPlaceholder: react.ForwardRefExoticComponent<AvatarPlaceholderProps<"avatars" | "placeholders"> & react.RefAttributes<HTMLImageElement>>;
1831
+
1832
+ declare const logoAssets: {
1833
+ readonly app: {
1834
+ readonly png: string;
1835
+ readonly svg: string;
1836
+ };
1837
+ readonly campaign: {
1838
+ readonly png: string;
1839
+ readonly svg: string;
1840
+ };
1841
+ readonly membership: {
1842
+ readonly png: string;
1843
+ readonly svg: string;
1844
+ };
1845
+ readonly icon: {
1846
+ readonly png: string;
1847
+ readonly svg: string;
1848
+ };
1849
+ readonly "icon-big": {
1850
+ readonly png: string;
1851
+ };
1852
+ };
1853
+
1854
+ type LogoVariant = keyof typeof logoAssets;
1855
+ type LogoFormat = {
1856
+ [K in LogoVariant]: keyof (typeof logoAssets)[K];
1857
+ }[LogoVariant];
1858
+ interface LogoProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt"> {
1859
+ /**
1860
+ * Which logo variant to render (derived from logo assets).
1861
+ */
1862
+ variant: LogoVariant;
1863
+ /**
1864
+ * File format to render. Defaults to SVG when available, otherwise PNG.
1865
+ */
1866
+ format?: LogoFormat;
1867
+ /**
1868
+ * Accessible description. Falls back to "Scalably {variant} logo".
1869
+ */
1870
+ alt?: string;
1871
+ }
1872
+ /**
1873
+ * Branded logo renderer that stays tightly coupled to available assets.
1874
+ */
1875
+ declare const Logo: react.ForwardRefExoticComponent<LogoProps & react.RefAttributes<HTMLImageElement>>;
1876
+
1877
+ interface LoadingScreenProps extends Omit<react__default.HTMLAttributes<HTMLDivElement>, "children"> {
1878
+ /**
1879
+ * Optional loading message displayed below the logo.
1880
+ */
1881
+ message?: string;
1882
+ /**
1883
+ * Backdrop blur amount. Set to 0 to disable blur.
1884
+ * @default 8
1885
+ */
1886
+ backdropBlur?: number;
1887
+ /**
1888
+ * Backdrop opacity (0-1).
1889
+ * @default 0.8
1890
+ */
1891
+ backdropOpacity?: number;
1892
+ /**
1893
+ * Logo size in pixels. Responsive: smaller on mobile, larger on desktop.
1894
+ * @default { mobile: 64, desktop: 80 }
1895
+ */
1896
+ size?: number | {
1897
+ mobile: number;
1898
+ desktop: number;
1899
+ };
1900
+ /**
1901
+ * Accessible label for screen readers.
1902
+ * Falls back to "Loading" or includes message if provided.
1903
+ */
1904
+ "aria-label"?: string;
1905
+ }
1906
+ /**
1907
+ * Full-screen loading overlay component with animated Scalably logo.
1908
+ *
1909
+ * Features:
1910
+ * - Full-screen overlay with customizable backdrop
1911
+ * - Animated logo with pulse and rotate combination
1912
+ * - Optional loading message
1913
+ * - Full accessibility support
1914
+ * - Respects reduced motion preferences
1915
+ * - Mobile-first responsive design
1916
+ *
1917
+ * @example
1918
+ * ```tsx
1919
+ * // Basic usage
1920
+ * <LoadingScreen />
1921
+ *
1922
+ * // With message
1923
+ * <LoadingScreen message="Loading your data..." />
1924
+ *
1925
+ * // Custom backdrop
1926
+ * <LoadingScreen backdropBlur={12} backdropOpacity={0.9} />
1927
+ *
1928
+ * // Custom size
1929
+ * <LoadingScreen size={{ mobile: 48, desktop: 96 }} />
1930
+ * ```
1931
+ */
1932
+ declare const LoadingScreen: react__default.ForwardRefExoticComponent<LoadingScreenProps & react__default.RefAttributes<HTMLDivElement>>;
1933
+
1934
+ interface WelcomeBackgroundProps extends Omit<react__default.HTMLAttributes<HTMLDivElement>, "children"> {
1935
+ /**
1936
+ * Optional children rendered on top of the animated background.
1937
+ */
1938
+ children?: react__default.ReactNode;
1939
+ /**
1940
+ * Toggle ellipse animation layer.
1941
+ * @default true
1942
+ */
1943
+ showEllipses?: boolean;
1944
+ /**
1945
+ * Toggle line wave animation layer.
1946
+ * @default true
1947
+ */
1948
+ showLines?: boolean;
1949
+ /**
1950
+ * Disable all animations (also handled automatically for prefers-reduced-motion).
1951
+ * @default false
1952
+ */
1953
+ disableAnimation?: boolean;
1954
+ /**
1955
+ * Override background image URL.
1956
+ */
1957
+ backgroundImage?: string;
1958
+ /**
1959
+ * Override ellipse sources (defaults to bundled welcome assets).
1960
+ */
1961
+ ellipsesData?: readonly string[];
1962
+ /**
1963
+ * Override lines overlay source (defaults to bundled welcome assets).
1964
+ */
1965
+ linesSrc?: string;
1966
+ }
1967
+ /**
1968
+ * Animated background for welcome/landing experiences.
1969
+ * - Uses deterministic seeded randomness for stable ellipse paths.
1970
+ * - Honors reduced-motion preferences and optional animation disabling.
1971
+ * - Mobile-first; hides heavy layers on very small screens via consumer control.
1972
+ */
1973
+ declare const WelcomeBackground: {
1974
+ ({ className, style, children, showEllipses, showLines, disableAnimation, backgroundImage, ellipsesData, linesSrc, ...props }: WelcomeBackgroundProps): react_jsx_runtime.JSX.Element;
1975
+ displayName: string;
1976
+ };
1977
+
1978
+ type ImageSourceMode = "both" | "url-only" | "upload-only";
1979
+ interface RichTextEditorProps {
1980
+ /** Controlled HTML value of the editor */
1981
+ value: string;
1982
+ /** Called whenever the content changes (HTML string) */
1983
+ onChange: (html: string) => void;
1984
+ /** Optional label rendered above the editor */
1985
+ label?: string;
1986
+ /** Error message shown below the editor and applied to border */
1987
+ error?: string;
1988
+ /** Helper text shown when there is no error */
1989
+ helperText?: string;
1990
+ /** Placeholder text rendered when editor is empty */
1991
+ placeholder?: string;
1992
+ /** Minimum height of the content area (e.g. "160px") */
1993
+ minHeight?: string;
1994
+ /** When true, renders a reduced toolbar (basic formatting only) */
1995
+ simple?: boolean;
1996
+ /** Disables editing and toolbar interaction */
1997
+ disabled?: boolean;
1998
+ /** Optional test id for querying in tests */
1999
+ "data-testid"?: string;
2000
+ /** Additional className for the outer container */
2001
+ containerClassName?: string;
2002
+ /**
2003
+ * Optional handler for image uploads.
2004
+ *
2005
+ * The editor **always** inserts images by URL. This callback is an
2006
+ * optional helper that lets you plug in your own upload flow:
2007
+ *
2008
+ * - When **not provided**:
2009
+ * - The image popover only shows a "Source URL" field and "Alt text".
2010
+ * - Users can paste any public image URL and click "Save" to insert it.
2011
+ *
2012
+ * - When **provided**:
2013
+ * - The image popover also shows an "Upload file" button.
2014
+ * - After the user selects a file, this function is called with that File.
2015
+ * - You upload the file (e.g. S3, Firebase, your API) and return a
2016
+ * Promise that resolves to the public image URL.
2017
+ * - The returned URL is written into the "Source URL" field, and the
2018
+ * user can then confirm insertion with "Save".
2019
+ */
2020
+ onImageUpload?: (file: File) => Promise<string>;
2021
+ /**
2022
+ * Controls how users are allowed to provide image sources.
2023
+ *
2024
+ * The editor always stores images as URLs; this setting only affects the UI:
2025
+ *
2026
+ * - "both" (default):
2027
+ * - Users can type or paste into the Source URL field.
2028
+ * - If `onImageUpload` is provided, they can also use the Upload file helper.
2029
+ *
2030
+ * - "url-only":
2031
+ * - Users can only type/paste a URL.
2032
+ * - The Upload file helper is hidden even if `onImageUpload` is provided.
2033
+ *
2034
+ * - "upload-only":
2035
+ * - Users can only upload via `onImageUpload`; the Source URL field is
2036
+ * rendered read-only to display the resolved URL.
2037
+ * - If `onImageUpload` is not provided, this mode gracefully behaves like
2038
+ * "url-only" so the image feature is still usable.
2039
+ */
2040
+ imageSourceMode?: ImageSourceMode;
2041
+ /**
2042
+ * Maximum number of plain-text characters allowed.
2043
+ * If the limit is reached, further typing is prevented by the
2044
+ * `CharacterCount` extension.
2045
+ *
2046
+ * Non-positive or non-finite values (e.g. 0, NaN, Infinity) are treated
2047
+ * as "no limit".
2048
+ */
2049
+ maxCharacters?: number;
2050
+ /**
2051
+ * Callback fired when the max character limit is reached.
2052
+ * Fired only once per breach (debounced until length drops below limit).
2053
+ */
2054
+ onMaxLengthExceed?: (info: {
2055
+ max: number;
2056
+ current: number;
2057
+ }) => void;
2058
+ }
2059
+ /**
2060
+ * RichTextEditor - Controlled rich text editor built on top of Tiptap.
2061
+ *
2062
+ * - Exposes a simple HTML-based value/onChange API.
2063
+ * - Renders a toolbar with common formatting controls.
2064
+ * - Mimics the design system's input styling (label, error, helper text).
2065
+ *
2066
+ * **Viewing Content:**
2067
+ * To display the HTML content created with this editor in read-only mode,
2068
+ * use the `RichTextViewer` component. It ensures content rendered in "view"
2069
+ * mode matches "edit" mode styling exactly.
2070
+ *
2071
+ * @example
2072
+ * ```tsx
2073
+ * import { RichTextEditor, RichTextViewer } from '@scalably/ui';
2074
+ *
2075
+ * function BlogPost({ post }) {
2076
+ * const [content, setContent] = useState<string>(post.content);
2077
+ *
2078
+ * return (
2079
+ * <div>
2080
+ * <RichTextEditor value={content} onChange={setContent} />
2081
+ * <RichTextViewer content={content} />
2082
+ * </div>
2083
+ * );
2084
+ * }
2085
+ * ```
2086
+ *
2087
+ * @see RichTextViewer - Read-only viewer component for displaying rich text content
2088
+ */
2089
+ declare const RichTextEditor: {
2090
+ ({ value, onChange, label, error, helperText, placeholder, minHeight, simple, disabled, "data-testid": dataTestId, containerClassName, onImageUpload, imageSourceMode, maxCharacters, onMaxLengthExceed, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
2091
+ displayName: string;
2092
+ };
2093
+
2094
+ interface RichTextViewerProps {
2095
+ /**
2096
+ * HTML content string to render (typically from RichTextEditor's value prop).
2097
+ * This content will be rendered as-is, so ensure it's sanitized if it comes
2098
+ * from untrusted sources.
2099
+ */
2100
+ content: string;
2101
+ /**
2102
+ * Additional CSS classes to apply to the container.
2103
+ */
2104
+ className?: string;
2105
+ /**
2106
+ * Optional test id for querying in tests.
2107
+ */
2108
+ "data-testid"?: string;
2109
+ }
2110
+ /**
2111
+ * RichTextViewer - Read-only component for displaying rich text content.
2112
+ *
2113
+ * This component renders HTML content with the same styling as RichTextEditor,
2114
+ * ensuring a consistent appearance between "edit" and "view" modes.
2115
+ *
2116
+ * **Security Note:** This component uses `dangerouslySetInnerHTML` to render
2117
+ * the provided HTML. If the content comes from untrusted sources (e.g., user
2118
+ * input, external APIs), you should sanitize it first using a library like
2119
+ * DOMPurify:
2120
+ *
2121
+ * ```tsx
2122
+ * import DOMPurify from 'isomorphic-dompurify';
2123
+ *
2124
+ * <RichTextViewer content={DOMPurify.sanitize(userContent)} />
2125
+ * ```
2126
+ *
2127
+ * @example
2128
+ * ```tsx
2129
+ * import { RichTextEditor, RichTextViewer } from '@scalably/ui';
2130
+ *
2131
+ * function BlogPost({ post }) {
2132
+ * return (
2133
+ * <div>
2134
+ * <RichTextEditor value={post.content} onChange={setContent} />
2135
+ * <RichTextViewer content={post.content} />
2136
+ * </div>
2137
+ * );
2138
+ * }
2139
+ * ```
2140
+ */
2141
+ declare const RichTextViewer: {
2142
+ ({ content, className, "data-testid": dataTestId, }: RichTextViewerProps): react_jsx_runtime.JSX.Element;
2143
+ displayName: string;
2144
+ };
2145
+
1576
2146
  interface ScalablyUIProviderProps {
1577
2147
  children: React.ReactNode;
1578
2148
  /**
@@ -1618,6 +2188,12 @@ interface ScalablyUIProviderProps {
1618
2188
  */
1619
2189
  declare const ScalablyUIProvider: React.FC<ScalablyUIProviderProps>;
1620
2190
 
2191
+ declare const welcomeAssets: {
2192
+ readonly ellipses: readonly [string, string];
2193
+ readonly multipleLine: string;
2194
+ readonly background: string;
2195
+ };
2196
+
1621
2197
  /**
1622
2198
  * Type for class values accepted by clsx
1623
2199
  */
@@ -2689,4 +3265,4 @@ interface YoutubeIconProps extends React.SVGProps<SVGSVGElement> {
2689
3265
  */
2690
3266
  declare const YoutubeIcon: react.MemoExoticComponent<react.ForwardRefExoticComponent<Omit<YoutubeIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>>;
2691
3267
 
2692
- export { 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, 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, 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, ScalablyUIProvider, type ScalablyUIProviderProps, SearchIcon, type SearchIconProps, SearchInput, type SearchInputProps, type SearchInputVariant, Select, type SelectOption, type SelectProps, type SelectVariant, SettingsIcon, type SettingsIconProps, SignalIcon, type SignalIconProps, 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, fieldErrorToProps, formatDateLocalized, monthsForLocale, scopeClass, throttle, toDateKey, weekdaysForLocale, zodErrorsToSummary };
3268
+ export { AuthPrompt, type AuthPromptProps, AvatarPlaceholder, type AvatarPlaceholderCategory, type AvatarPlaceholderProps, type AvatarPlaceholderVariant, BackToTop, type BackToTopProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, type CalendarIconProps, 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, 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, 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 };