@bubo-squared/ui-framework 0.1.6 → 0.1.9

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,8 +1,10 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React$1 from 'react';
3
+ import { FC } from 'react';
3
4
  import { VariantProps } from 'class-variance-authority';
4
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
7
+ import * as RPNInput from 'react-phone-number-input';
6
8
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
7
9
  import { ClassValue } from 'clsx';
8
10
 
@@ -258,6 +260,17 @@ interface DropdownProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElem
258
260
  }
259
261
  declare const Dropdown: React$1.FC<DropdownProps>;
260
262
 
263
+ type FieldStatus = "default" | "success" | "error";
264
+ interface FieldProps {
265
+ label?: string;
266
+ hint?: string;
267
+ status?: FieldStatus;
268
+ disabled?: boolean | null;
269
+ className?: string;
270
+ children: React$1.ReactNode;
271
+ }
272
+ declare const Field: React$1.FC<FieldProps>;
273
+
261
274
  type PasswordInputSize = "large" | "extra-large";
262
275
  type PasswordInputStatus = "default" | "success" | "error";
263
276
  type PasswordInputVariant = "icons" | "action";
@@ -276,6 +289,33 @@ interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputE
276
289
  }
277
290
  declare const PasswordInput: React$1.FC<PasswordInputProps>;
278
291
 
292
+ type TextInputSize = "large" | "extra-large";
293
+ type TextInputStatus = "default" | "success" | "error";
294
+ interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
295
+ label?: string;
296
+ hint?: string;
297
+ placeholder?: string;
298
+ status?: TextInputStatus;
299
+ size?: TextInputSize;
300
+ disabled?: boolean;
301
+ leadingIcon?: React$1.ReactNode | null;
302
+ trailingIcon?: React$1.ReactNode | null;
303
+ }
304
+ declare const TextInput: React$1.FC<TextInputProps>;
305
+
306
+ type PhoneInputProps = Omit<React$1.ComponentProps<"input">, "onChange" | "value" | "ref"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange"> & {
307
+ onChange?: (value: RPNInput.Value) => void;
308
+ } & {
309
+ className?: string;
310
+ label?: string;
311
+ hint?: string;
312
+ placeholder?: string;
313
+ disabled?: boolean;
314
+ status?: TextInputStatus;
315
+ size?: TextInputSize;
316
+ };
317
+ declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps>;
318
+
279
319
  type RadioGroupOrientation = "vertical" | "horizontal";
280
320
  interface RadioGroupOption {
281
321
  value: string;
@@ -339,20 +379,6 @@ interface SliderProps {
339
379
  }
340
380
  declare const Slider: React$1.FC<SliderProps>;
341
381
 
342
- type TextInputSize = "large" | "extra-large";
343
- type TextInputStatus = "default" | "success" | "error";
344
- interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
345
- label?: string;
346
- hint?: string;
347
- placeholder?: string;
348
- status?: TextInputStatus;
349
- size?: TextInputSize;
350
- disabled?: boolean;
351
- leadingIcon?: React$1.ReactNode | null;
352
- trailingIcon?: React$1.ReactNode | null;
353
- }
354
- declare const TextInput: React$1.FC<TextInputProps>;
355
-
356
382
  type TextAreaType = "responsive" | "character-limit";
357
383
  interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled"> {
358
384
  label?: string;
@@ -400,22 +426,66 @@ interface WebsiteInputProps extends Omit<TextInputProps, "leadingIcon" | "traili
400
426
  }
401
427
  declare const WebsiteInput: React$1.FC<WebsiteInputProps>;
402
428
 
403
- declare const LogoIconExtraLarge: () => react_jsx_runtime.JSX.Element;
404
-
405
- declare const LogoIconExtraSmall: () => react_jsx_runtime.JSX.Element;
406
-
407
- declare const LogoIconLarge: () => react_jsx_runtime.JSX.Element;
408
-
409
- declare const LogoIconMedium: () => react_jsx_runtime.JSX.Element;
429
+ type PopoverPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
430
+ interface PopoverProps {
431
+ children: React$1.ReactNode;
432
+ strapline?: string;
433
+ title: string;
434
+ description?: string;
435
+ onOk?: () => void;
436
+ okText?: string;
437
+ onCancel?: () => void;
438
+ cancelText?: string;
439
+ showArrow?: boolean;
440
+ className?: string;
441
+ /**
442
+ * Controls where the popover appears relative to the trigger.
443
+ * Examples: "bottomRight", "top", "left".
444
+ */
445
+ placement?: PopoverPlacement;
446
+ /**
447
+ * Distance between the trigger and the popover.
448
+ * This is forwarded to Radix's `sideOffset`, useful when adjusting
449
+ * the arrow size so the content clears the trigger.
450
+ */
451
+ offset?: number;
452
+ }
453
+ declare const Popover: React$1.FC<PopoverProps>;
410
454
 
411
- declare const LogoIconSmall: () => react_jsx_runtime.JSX.Element;
455
+ interface BreadcrumbProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
456
+ variant?: "flat" | "colored";
457
+ asChild?: boolean;
458
+ /** Label text shown in the breadcrumb item. */
459
+ label?: string;
460
+ /** Whether to render the leading chevron icon. */
461
+ showIcon?: boolean;
462
+ /** Optional custom icon to use instead of the default chevron. */
463
+ icon?: React$1.ReactNode;
464
+ /** Whether to render the label text. */
465
+ showText?: boolean;
466
+ }
467
+ declare const Breadcrumb: React$1.ForwardRefExoticComponent<BreadcrumbProps & React$1.RefAttributes<HTMLButtonElement>>;
412
468
 
413
- declare const LogoInline$1: () => react_jsx_runtime.JSX.Element;
469
+ interface LogoBaseProps {
470
+ className?: string;
471
+ }
472
+ type LogoTextColor = "light" | "dark";
473
+ interface LogoTextProps extends LogoBaseProps {
474
+ textColor?: LogoTextColor;
475
+ }
476
+ type LogoVariant = "inline" | "inlineSmall" | "multiline";
477
+ interface LogoProps extends LogoTextProps {
478
+ variant?: LogoVariant;
479
+ }
480
+ type LogoIconSize = "xs" | "sm" | "md" | "lg" | "xl";
481
+ interface LogoIconProps extends LogoBaseProps {
482
+ size?: LogoIconSize;
483
+ }
414
484
 
415
- declare const LogoInline: () => react_jsx_runtime.JSX.Element;
485
+ declare const LogoIcon: FC<LogoIconProps>;
416
486
 
417
- declare const LogoMultiline: () => react_jsx_runtime.JSX.Element;
487
+ declare const Logo: FC<LogoProps>;
418
488
 
419
489
  declare function cn(...inputs: ClassValue[]): string;
420
490
 
421
- export { Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Button, ButtonGroup, Checkbox, Divider, Dropdown, IconButton, IconButtonGroup, LinkButton, LogoIconExtraLarge, LogoIconExtraSmall, LogoIconLarge, LogoIconMedium, LogoIconSmall, LogoInline$1 as LogoInline, LogoInline as LogoInlineSmall, LogoMultiline, MessageButton, PasswordInput, Progress, RadioGroup, SearchInput, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, WebsiteInput, cn };
491
+ export { Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Breadcrumb, Button, ButtonGroup, Checkbox, Divider, Dropdown, Field, IconButton, IconButtonGroup, LinkButton, Logo, LogoIcon, MessageButton, PasswordInput, PhoneInput, Popover, Progress, RadioGroup, SearchInput, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, WebsiteInput, cn };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React$1 from 'react';
3
+ import { FC } from 'react';
3
4
  import { VariantProps } from 'class-variance-authority';
4
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
7
+ import * as RPNInput from 'react-phone-number-input';
6
8
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
7
9
  import { ClassValue } from 'clsx';
8
10
 
@@ -258,6 +260,17 @@ interface DropdownProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElem
258
260
  }
259
261
  declare const Dropdown: React$1.FC<DropdownProps>;
260
262
 
263
+ type FieldStatus = "default" | "success" | "error";
264
+ interface FieldProps {
265
+ label?: string;
266
+ hint?: string;
267
+ status?: FieldStatus;
268
+ disabled?: boolean | null;
269
+ className?: string;
270
+ children: React$1.ReactNode;
271
+ }
272
+ declare const Field: React$1.FC<FieldProps>;
273
+
261
274
  type PasswordInputSize = "large" | "extra-large";
262
275
  type PasswordInputStatus = "default" | "success" | "error";
263
276
  type PasswordInputVariant = "icons" | "action";
@@ -276,6 +289,33 @@ interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputE
276
289
  }
277
290
  declare const PasswordInput: React$1.FC<PasswordInputProps>;
278
291
 
292
+ type TextInputSize = "large" | "extra-large";
293
+ type TextInputStatus = "default" | "success" | "error";
294
+ interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
295
+ label?: string;
296
+ hint?: string;
297
+ placeholder?: string;
298
+ status?: TextInputStatus;
299
+ size?: TextInputSize;
300
+ disabled?: boolean;
301
+ leadingIcon?: React$1.ReactNode | null;
302
+ trailingIcon?: React$1.ReactNode | null;
303
+ }
304
+ declare const TextInput: React$1.FC<TextInputProps>;
305
+
306
+ type PhoneInputProps = Omit<React$1.ComponentProps<"input">, "onChange" | "value" | "ref"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange"> & {
307
+ onChange?: (value: RPNInput.Value) => void;
308
+ } & {
309
+ className?: string;
310
+ label?: string;
311
+ hint?: string;
312
+ placeholder?: string;
313
+ disabled?: boolean;
314
+ status?: TextInputStatus;
315
+ size?: TextInputSize;
316
+ };
317
+ declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps>;
318
+
279
319
  type RadioGroupOrientation = "vertical" | "horizontal";
280
320
  interface RadioGroupOption {
281
321
  value: string;
@@ -339,20 +379,6 @@ interface SliderProps {
339
379
  }
340
380
  declare const Slider: React$1.FC<SliderProps>;
341
381
 
342
- type TextInputSize = "large" | "extra-large";
343
- type TextInputStatus = "default" | "success" | "error";
344
- interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
345
- label?: string;
346
- hint?: string;
347
- placeholder?: string;
348
- status?: TextInputStatus;
349
- size?: TextInputSize;
350
- disabled?: boolean;
351
- leadingIcon?: React$1.ReactNode | null;
352
- trailingIcon?: React$1.ReactNode | null;
353
- }
354
- declare const TextInput: React$1.FC<TextInputProps>;
355
-
356
382
  type TextAreaType = "responsive" | "character-limit";
357
383
  interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled"> {
358
384
  label?: string;
@@ -400,22 +426,66 @@ interface WebsiteInputProps extends Omit<TextInputProps, "leadingIcon" | "traili
400
426
  }
401
427
  declare const WebsiteInput: React$1.FC<WebsiteInputProps>;
402
428
 
403
- declare const LogoIconExtraLarge: () => react_jsx_runtime.JSX.Element;
404
-
405
- declare const LogoIconExtraSmall: () => react_jsx_runtime.JSX.Element;
406
-
407
- declare const LogoIconLarge: () => react_jsx_runtime.JSX.Element;
408
-
409
- declare const LogoIconMedium: () => react_jsx_runtime.JSX.Element;
429
+ type PopoverPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
430
+ interface PopoverProps {
431
+ children: React$1.ReactNode;
432
+ strapline?: string;
433
+ title: string;
434
+ description?: string;
435
+ onOk?: () => void;
436
+ okText?: string;
437
+ onCancel?: () => void;
438
+ cancelText?: string;
439
+ showArrow?: boolean;
440
+ className?: string;
441
+ /**
442
+ * Controls where the popover appears relative to the trigger.
443
+ * Examples: "bottomRight", "top", "left".
444
+ */
445
+ placement?: PopoverPlacement;
446
+ /**
447
+ * Distance between the trigger and the popover.
448
+ * This is forwarded to Radix's `sideOffset`, useful when adjusting
449
+ * the arrow size so the content clears the trigger.
450
+ */
451
+ offset?: number;
452
+ }
453
+ declare const Popover: React$1.FC<PopoverProps>;
410
454
 
411
- declare const LogoIconSmall: () => react_jsx_runtime.JSX.Element;
455
+ interface BreadcrumbProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
456
+ variant?: "flat" | "colored";
457
+ asChild?: boolean;
458
+ /** Label text shown in the breadcrumb item. */
459
+ label?: string;
460
+ /** Whether to render the leading chevron icon. */
461
+ showIcon?: boolean;
462
+ /** Optional custom icon to use instead of the default chevron. */
463
+ icon?: React$1.ReactNode;
464
+ /** Whether to render the label text. */
465
+ showText?: boolean;
466
+ }
467
+ declare const Breadcrumb: React$1.ForwardRefExoticComponent<BreadcrumbProps & React$1.RefAttributes<HTMLButtonElement>>;
412
468
 
413
- declare const LogoInline$1: () => react_jsx_runtime.JSX.Element;
469
+ interface LogoBaseProps {
470
+ className?: string;
471
+ }
472
+ type LogoTextColor = "light" | "dark";
473
+ interface LogoTextProps extends LogoBaseProps {
474
+ textColor?: LogoTextColor;
475
+ }
476
+ type LogoVariant = "inline" | "inlineSmall" | "multiline";
477
+ interface LogoProps extends LogoTextProps {
478
+ variant?: LogoVariant;
479
+ }
480
+ type LogoIconSize = "xs" | "sm" | "md" | "lg" | "xl";
481
+ interface LogoIconProps extends LogoBaseProps {
482
+ size?: LogoIconSize;
483
+ }
414
484
 
415
- declare const LogoInline: () => react_jsx_runtime.JSX.Element;
485
+ declare const LogoIcon: FC<LogoIconProps>;
416
486
 
417
- declare const LogoMultiline: () => react_jsx_runtime.JSX.Element;
487
+ declare const Logo: FC<LogoProps>;
418
488
 
419
489
  declare function cn(...inputs: ClassValue[]): string;
420
490
 
421
- export { Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Button, ButtonGroup, Checkbox, Divider, Dropdown, IconButton, IconButtonGroup, LinkButton, LogoIconExtraLarge, LogoIconExtraSmall, LogoIconLarge, LogoIconMedium, LogoIconSmall, LogoInline$1 as LogoInline, LogoInline as LogoInlineSmall, LogoMultiline, MessageButton, PasswordInput, Progress, RadioGroup, SearchInput, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, WebsiteInput, cn };
491
+ export { Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Breadcrumb, Button, ButtonGroup, Checkbox, Divider, Dropdown, Field, IconButton, IconButtonGroup, LinkButton, Logo, LogoIcon, MessageButton, PasswordInput, PhoneInput, Popover, Progress, RadioGroup, SearchInput, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, WebsiteInput, cn };