@gsk_poc/untitled-ui-base 0.1.17 → 0.1.19

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.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import react__default, { FC, ReactNode, ComponentPropsWithRef, Ref, CSSProperties, HTMLAttributes, SVGProps, ComponentProps, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, MouseEventHandler, DetailedHTMLProps, ButtonHTMLAttributes, AnchorHTMLAttributes, PropsWithChildren, ComponentType } from 'react';
2
+ import react__default, { FC, ReactNode, ComponentPropsWithRef, Ref, CSSProperties, HTMLAttributes, SVGProps, ComponentProps, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, MouseEventHandler, DetailedHTMLProps, ButtonHTMLAttributes, AnchorHTMLAttributes, PropsWithChildren, ComponentType, SelectHTMLAttributes } from 'react';
3
3
  import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
4
  import { FileIcon } from '@untitledui/file-icons';
5
5
  import * as react_aria_components from 'react-aria-components';
6
- import { DialogProps as DialogProps$1, ModalOverlayProps, ModalRenderProps, DialogTrigger, TableProps, TableBody, CellProps, ColumnProps, TableHeaderProps as TableHeaderProps$1, RowProps, TabListProps, TabProps, TabRenderProps, TabPanel as TabPanel$1, Tabs as Tabs$1, ToggleButtonGroupProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, MenuTrigger, PopoverProps, MenuProps, MenuItemProps, SeparatorProps, Form as Form$1, RadioProps, RadioGroupProps as RadioGroupProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxProps, ListBoxItemProps, SelectProps as SelectProps$1, Key, SliderProps as SliderProps$1, TagGroupProps as TagGroupProps$1, TagProps as TagProps$1, TextAreaProps, TextFieldProps as TextFieldProps$2, SwitchProps, TooltipTriggerComponentProps, TooltipProps as TooltipProps$1, LabelProps as LabelProps$1 } from 'react-aria-components';
6
+ import { DialogProps as DialogProps$1, ModalOverlayProps, ModalRenderProps, DialogTrigger, TableProps, TableBody, CellProps, ColumnProps, TableHeaderProps as TableHeaderProps$1, RowProps, TabListProps, TabProps, TabRenderProps, TabPanel as TabPanel$1, Tabs as Tabs$1, ToggleButtonGroupProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, MenuTrigger, PopoverProps, MenuProps, MenuItemProps, SeparatorProps, Form as Form$1, RadioProps, RadioGroupProps as RadioGroupProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxProps, ListBoxItemProps, SelectProps as SelectProps$1, Key, SliderProps as SliderProps$1, TagGroupProps as TagGroupProps$1, TagProps as TagProps$1, TextAreaProps, TextFieldProps as TextFieldProps$2, SwitchProps, TooltipTriggerComponentProps, TooltipProps as TooltipProps$1, LabelProps as LabelProps$1, TextProps } from 'react-aria-components';
7
7
  import { OTPInput } from 'input-otp';
8
8
  import { ListData } from 'react-stately';
9
9
  import { RefObject } from '@react-types/shared';
@@ -1358,6 +1358,10 @@ interface InputBaseProps extends TextFieldProps {
1358
1358
  /** Icon component to display on the left side of the input. */
1359
1359
  icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;
1360
1360
  }
1361
+ declare const InputBase: {
1362
+ ({ ref, tooltip, shortcut, groupRef, size, isInvalid, isDisabled, icon: Icon, placeholder, wrapperClassName, tooltipClassName, inputClassName, iconClassName, isRequired: _isRequired, ...inputProps }: Omit<InputBaseProps, "label" | "hint">): react.JSX.Element;
1363
+ displayName: string;
1364
+ };
1361
1365
  interface BaseProps {
1362
1366
  /** Label text for the input */
1363
1367
  label?: string;
@@ -1367,6 +1371,10 @@ interface BaseProps {
1367
1371
  interface TextFieldProps extends BaseProps, TextFieldProps$2, Pick<InputBaseProps, "size" | "wrapperClassName" | "inputClassName" | "iconClassName" | "tooltipClassName"> {
1368
1372
  ref?: Ref<HTMLDivElement>;
1369
1373
  }
1374
+ declare const TextField: {
1375
+ ({ className, ...props }: TextFieldProps): react.JSX.Element;
1376
+ displayName: string;
1377
+ };
1370
1378
  interface InputProps extends InputBaseProps, BaseProps {
1371
1379
  /** Whether to hide required indicator from label */
1372
1380
  hideRequiredIndicator?: boolean;
@@ -1384,6 +1392,7 @@ interface InputPrefixProps extends HTMLAttributes<HTMLDivElement> {
1384
1392
  /** Indicates that the prefix is disabled. */
1385
1393
  isDisabled?: boolean;
1386
1394
  }
1395
+ declare const InputPrefix: ({ isDisabled, children, ...props }: InputPrefixProps) => react.JSX.Element;
1387
1396
  interface InputGroupProps extends Omit<InputBaseProps, "type" | "icon" | "placeholder" | "tooltip" | "shortcut" | `${string}ClassName`> {
1388
1397
  /** A prefix text that is displayed in the same box as the input.*/
1389
1398
  prefix?: string;
@@ -1414,4 +1423,54 @@ declare const Label: {
1414
1423
  displayName: string;
1415
1424
  };
1416
1425
 
1417
- export { Avatar, type AvatarProps, Badge, type BadgeColor, BadgeGroup, BadgeIcon, BadgeWithButton, BadgeWithDot, BadgeWithFlag, BadgeWithIcon, BadgeWithImage, Button, ButtonGroup, type ButtonProps, Carousel, CarouselContext, Checkbox, ComboBox, type CommonProps$1 as CommonProps, Dialog, Dropdown, EmptyState, FeaturedIcon$1 as FeaturedIcon, FileListItemProgressBar, FileListItemProgressFill, type FileListItemProps, FileUpload, FileUploadDropZone, Form, HeaderNavigationBase, Input, InputGroup, Label, LoadingIndicator, Modal, Dialog$1 as ModalDialog, ModalOverlay, MultiSelect, PaginationButtonGroup, PaginationCardDefault, PaginationCardMinimal, PaginationDot, PaginationLine, PaginationPageDefault, PaginationPageMinimalCenter, PinInput, ProgressBar, ProgressBarBase, type ProgressBarProps, type ProgressIndicatorWithTextProps, type Props, RadioButton, RadioButtonBase, type RadioButtonBaseProps, RadioGroup, type RadioGroupContextType, RatingBadge, RatingStars, _Select as Select, SlideoutMenu, Slider, StarIcon, Tab, TabList, TabPanel, Table, TableCard, TableRowActionsDropdown, Tabs, Tag, TagGroup, type TagItem, TagList, TextArea, TextAreaBase, Toggle, ToggleBase, Tooltip, TooltipTrigger, Wreath, cx, filledColors, getReadableFileSize, getStarProgress, isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent, sortCx, styles$1 as styles, useActiveItem, useBreakpoint, useCarousel, useClipboard, usePinInputContext, useResizeObserver };
1426
+ interface HintTextProps extends TextProps {
1427
+ /** Indicates that the hint text is an error message. */
1428
+ isInvalid?: boolean;
1429
+ ref?: Ref<HTMLElement>;
1430
+ children: ReactNode;
1431
+ }
1432
+ declare const HintText: {
1433
+ ({ isInvalid, className, ...props }: HintTextProps): react.JSX.Element;
1434
+ displayName: string;
1435
+ };
1436
+
1437
+ /**
1438
+ * Format the card number in groups of 4 digits (i.e. 1234 5678 9012 3456).
1439
+ */
1440
+ declare const formatCardNumber: (number: string) => string;
1441
+ interface PaymentInputProps extends Omit<InputBaseProps, "icon"> {
1442
+ }
1443
+ declare const PaymentInput: {
1444
+ ({ onChange, value, defaultValue, className, maxLength, label, hint, ...props }: PaymentInputProps): react.JSX.Element;
1445
+ displayName: string;
1446
+ };
1447
+
1448
+ declare const AmexIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1449
+
1450
+ declare const ApplePayIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1451
+
1452
+ declare const DiscoverIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1453
+
1454
+ declare const MastercardIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1455
+
1456
+ declare const VisaIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1457
+
1458
+ declare const PayPalIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1459
+
1460
+ declare const StripeIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1461
+
1462
+ declare const UnionPayIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1463
+
1464
+ interface NativeSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
1465
+ label?: string;
1466
+ hint?: string;
1467
+ selectClassName?: string;
1468
+ options: {
1469
+ label: string;
1470
+ value: string;
1471
+ disabled?: boolean;
1472
+ }[];
1473
+ }
1474
+ declare const NativeSelect: ({ label, hint, options, className, selectClassName, ...props }: NativeSelectProps) => react.JSX.Element;
1475
+
1476
+ export { AmexIcon, ApplePayIcon, Avatar, type AvatarProps, Badge, type BadgeColor, BadgeGroup, BadgeIcon, BadgeWithButton, BadgeWithDot, BadgeWithFlag, BadgeWithIcon, BadgeWithImage, Button, ButtonGroup, type ButtonProps, Carousel, CarouselContext, Checkbox, ComboBox, type CommonProps$1 as CommonProps, Dialog, DiscoverIcon, Dropdown, EmptyState, FeaturedIcon$1 as FeaturedIcon, FileListItemProgressBar, FileListItemProgressFill, type FileListItemProps, FileUpload, FileUploadDropZone, Form, HeaderNavigationBase, HintText, Input, InputBase, type InputBaseProps, InputGroup, InputPrefix, Label, LoadingIndicator, MastercardIcon, Modal, Dialog$1 as ModalDialog, ModalOverlay, MultiSelect, NativeSelect, PaginationButtonGroup, PaginationCardDefault, PaginationCardMinimal, PaginationDot, PaginationLine, PaginationPageDefault, PaginationPageMinimalCenter, PayPalIcon, PaymentInput, PinInput, ProgressBar, ProgressBarBase, type ProgressBarProps, type ProgressIndicatorWithTextProps, type Props, RadioButton, RadioButtonBase, type RadioButtonBaseProps, RadioGroup, type RadioGroupContextType, RatingBadge, RatingStars, _Select as Select, SlideoutMenu, Slider, StarIcon, StripeIcon, Tab, TabList, TabPanel, Table, TableCard, TableRowActionsDropdown, Tabs, Tag, TagGroup, type TagItem, TagList, TextArea, TextAreaBase, TextField, Toggle, ToggleBase, Tooltip, TooltipTrigger, UnionPayIcon, VisaIcon, Wreath, cx, filledColors, formatCardNumber, getReadableFileSize, getStarProgress, isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent, sortCx, styles$1 as styles, useActiveItem, useBreakpoint, useCarousel, useClipboard, usePinInputContext, useResizeObserver };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- import react__default, { FC, ReactNode, ComponentPropsWithRef, Ref, CSSProperties, HTMLAttributes, SVGProps, ComponentProps, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, MouseEventHandler, DetailedHTMLProps, ButtonHTMLAttributes, AnchorHTMLAttributes, PropsWithChildren, ComponentType } from 'react';
2
+ import react__default, { FC, ReactNode, ComponentPropsWithRef, Ref, CSSProperties, HTMLAttributes, SVGProps, ComponentProps, RefAttributes, TdHTMLAttributes, ThHTMLAttributes, MouseEventHandler, DetailedHTMLProps, ButtonHTMLAttributes, AnchorHTMLAttributes, PropsWithChildren, ComponentType, SelectHTMLAttributes } from 'react';
3
3
  import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
4
  import { FileIcon } from '@untitledui/file-icons';
5
5
  import * as react_aria_components from 'react-aria-components';
6
- import { DialogProps as DialogProps$1, ModalOverlayProps, ModalRenderProps, DialogTrigger, TableProps, TableBody, CellProps, ColumnProps, TableHeaderProps as TableHeaderProps$1, RowProps, TabListProps, TabProps, TabRenderProps, TabPanel as TabPanel$1, Tabs as Tabs$1, ToggleButtonGroupProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, MenuTrigger, PopoverProps, MenuProps, MenuItemProps, SeparatorProps, Form as Form$1, RadioProps, RadioGroupProps as RadioGroupProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxProps, ListBoxItemProps, SelectProps as SelectProps$1, Key, SliderProps as SliderProps$1, TagGroupProps as TagGroupProps$1, TagProps as TagProps$1, TextAreaProps, TextFieldProps as TextFieldProps$2, SwitchProps, TooltipTriggerComponentProps, TooltipProps as TooltipProps$1, LabelProps as LabelProps$1 } from 'react-aria-components';
6
+ import { DialogProps as DialogProps$1, ModalOverlayProps, ModalRenderProps, DialogTrigger, TableProps, TableBody, CellProps, ColumnProps, TableHeaderProps as TableHeaderProps$1, RowProps, TabListProps, TabProps, TabRenderProps, TabPanel as TabPanel$1, Tabs as Tabs$1, ToggleButtonGroupProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, MenuTrigger, PopoverProps, MenuProps, MenuItemProps, SeparatorProps, Form as Form$1, RadioProps, RadioGroupProps as RadioGroupProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxProps, ListBoxItemProps, SelectProps as SelectProps$1, Key, SliderProps as SliderProps$1, TagGroupProps as TagGroupProps$1, TagProps as TagProps$1, TextAreaProps, TextFieldProps as TextFieldProps$2, SwitchProps, TooltipTriggerComponentProps, TooltipProps as TooltipProps$1, LabelProps as LabelProps$1, TextProps } from 'react-aria-components';
7
7
  import { OTPInput } from 'input-otp';
8
8
  import { ListData } from 'react-stately';
9
9
  import { RefObject } from '@react-types/shared';
@@ -1358,6 +1358,10 @@ interface InputBaseProps extends TextFieldProps {
1358
1358
  /** Icon component to display on the left side of the input. */
1359
1359
  icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;
1360
1360
  }
1361
+ declare const InputBase: {
1362
+ ({ ref, tooltip, shortcut, groupRef, size, isInvalid, isDisabled, icon: Icon, placeholder, wrapperClassName, tooltipClassName, inputClassName, iconClassName, isRequired: _isRequired, ...inputProps }: Omit<InputBaseProps, "label" | "hint">): react.JSX.Element;
1363
+ displayName: string;
1364
+ };
1361
1365
  interface BaseProps {
1362
1366
  /** Label text for the input */
1363
1367
  label?: string;
@@ -1367,6 +1371,10 @@ interface BaseProps {
1367
1371
  interface TextFieldProps extends BaseProps, TextFieldProps$2, Pick<InputBaseProps, "size" | "wrapperClassName" | "inputClassName" | "iconClassName" | "tooltipClassName"> {
1368
1372
  ref?: Ref<HTMLDivElement>;
1369
1373
  }
1374
+ declare const TextField: {
1375
+ ({ className, ...props }: TextFieldProps): react.JSX.Element;
1376
+ displayName: string;
1377
+ };
1370
1378
  interface InputProps extends InputBaseProps, BaseProps {
1371
1379
  /** Whether to hide required indicator from label */
1372
1380
  hideRequiredIndicator?: boolean;
@@ -1384,6 +1392,7 @@ interface InputPrefixProps extends HTMLAttributes<HTMLDivElement> {
1384
1392
  /** Indicates that the prefix is disabled. */
1385
1393
  isDisabled?: boolean;
1386
1394
  }
1395
+ declare const InputPrefix: ({ isDisabled, children, ...props }: InputPrefixProps) => react.JSX.Element;
1387
1396
  interface InputGroupProps extends Omit<InputBaseProps, "type" | "icon" | "placeholder" | "tooltip" | "shortcut" | `${string}ClassName`> {
1388
1397
  /** A prefix text that is displayed in the same box as the input.*/
1389
1398
  prefix?: string;
@@ -1414,4 +1423,54 @@ declare const Label: {
1414
1423
  displayName: string;
1415
1424
  };
1416
1425
 
1417
- export { Avatar, type AvatarProps, Badge, type BadgeColor, BadgeGroup, BadgeIcon, BadgeWithButton, BadgeWithDot, BadgeWithFlag, BadgeWithIcon, BadgeWithImage, Button, ButtonGroup, type ButtonProps, Carousel, CarouselContext, Checkbox, ComboBox, type CommonProps$1 as CommonProps, Dialog, Dropdown, EmptyState, FeaturedIcon$1 as FeaturedIcon, FileListItemProgressBar, FileListItemProgressFill, type FileListItemProps, FileUpload, FileUploadDropZone, Form, HeaderNavigationBase, Input, InputGroup, Label, LoadingIndicator, Modal, Dialog$1 as ModalDialog, ModalOverlay, MultiSelect, PaginationButtonGroup, PaginationCardDefault, PaginationCardMinimal, PaginationDot, PaginationLine, PaginationPageDefault, PaginationPageMinimalCenter, PinInput, ProgressBar, ProgressBarBase, type ProgressBarProps, type ProgressIndicatorWithTextProps, type Props, RadioButton, RadioButtonBase, type RadioButtonBaseProps, RadioGroup, type RadioGroupContextType, RatingBadge, RatingStars, _Select as Select, SlideoutMenu, Slider, StarIcon, Tab, TabList, TabPanel, Table, TableCard, TableRowActionsDropdown, Tabs, Tag, TagGroup, type TagItem, TagList, TextArea, TextAreaBase, Toggle, ToggleBase, Tooltip, TooltipTrigger, Wreath, cx, filledColors, getReadableFileSize, getStarProgress, isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent, sortCx, styles$1 as styles, useActiveItem, useBreakpoint, useCarousel, useClipboard, usePinInputContext, useResizeObserver };
1426
+ interface HintTextProps extends TextProps {
1427
+ /** Indicates that the hint text is an error message. */
1428
+ isInvalid?: boolean;
1429
+ ref?: Ref<HTMLElement>;
1430
+ children: ReactNode;
1431
+ }
1432
+ declare const HintText: {
1433
+ ({ isInvalid, className, ...props }: HintTextProps): react.JSX.Element;
1434
+ displayName: string;
1435
+ };
1436
+
1437
+ /**
1438
+ * Format the card number in groups of 4 digits (i.e. 1234 5678 9012 3456).
1439
+ */
1440
+ declare const formatCardNumber: (number: string) => string;
1441
+ interface PaymentInputProps extends Omit<InputBaseProps, "icon"> {
1442
+ }
1443
+ declare const PaymentInput: {
1444
+ ({ onChange, value, defaultValue, className, maxLength, label, hint, ...props }: PaymentInputProps): react.JSX.Element;
1445
+ displayName: string;
1446
+ };
1447
+
1448
+ declare const AmexIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1449
+
1450
+ declare const ApplePayIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1451
+
1452
+ declare const DiscoverIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1453
+
1454
+ declare const MastercardIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1455
+
1456
+ declare const VisaIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1457
+
1458
+ declare const PayPalIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1459
+
1460
+ declare const StripeIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1461
+
1462
+ declare const UnionPayIcon: (props: SVGProps<SVGSVGElement>) => react.JSX.Element;
1463
+
1464
+ interface NativeSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
1465
+ label?: string;
1466
+ hint?: string;
1467
+ selectClassName?: string;
1468
+ options: {
1469
+ label: string;
1470
+ value: string;
1471
+ disabled?: boolean;
1472
+ }[];
1473
+ }
1474
+ declare const NativeSelect: ({ label, hint, options, className, selectClassName, ...props }: NativeSelectProps) => react.JSX.Element;
1475
+
1476
+ export { AmexIcon, ApplePayIcon, Avatar, type AvatarProps, Badge, type BadgeColor, BadgeGroup, BadgeIcon, BadgeWithButton, BadgeWithDot, BadgeWithFlag, BadgeWithIcon, BadgeWithImage, Button, ButtonGroup, type ButtonProps, Carousel, CarouselContext, Checkbox, ComboBox, type CommonProps$1 as CommonProps, Dialog, DiscoverIcon, Dropdown, EmptyState, FeaturedIcon$1 as FeaturedIcon, FileListItemProgressBar, FileListItemProgressFill, type FileListItemProps, FileUpload, FileUploadDropZone, Form, HeaderNavigationBase, HintText, Input, InputBase, type InputBaseProps, InputGroup, InputPrefix, Label, LoadingIndicator, MastercardIcon, Modal, Dialog$1 as ModalDialog, ModalOverlay, MultiSelect, NativeSelect, PaginationButtonGroup, PaginationCardDefault, PaginationCardMinimal, PaginationDot, PaginationLine, PaginationPageDefault, PaginationPageMinimalCenter, PayPalIcon, PaymentInput, PinInput, ProgressBar, ProgressBarBase, type ProgressBarProps, type ProgressIndicatorWithTextProps, type Props, RadioButton, RadioButtonBase, type RadioButtonBaseProps, RadioGroup, type RadioGroupContextType, RatingBadge, RatingStars, _Select as Select, SlideoutMenu, Slider, StarIcon, StripeIcon, Tab, TabList, TabPanel, Table, TableCard, TableRowActionsDropdown, Tabs, Tag, TagGroup, type TagItem, TagList, TextArea, TextAreaBase, TextField, Toggle, ToggleBase, Tooltip, TooltipTrigger, UnionPayIcon, VisaIcon, Wreath, cx, filledColors, formatCardNumber, getReadableFileSize, getStarProgress, isClassComponent, isForwardRefComponent, isFunctionComponent, isReactComponent, sortCx, styles$1 as styles, useActiveItem, useBreakpoint, useCarousel, useClipboard, usePinInputContext, useResizeObserver };