@jects/jds 0.0.1 → 0.0.2-dev

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,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ElementType, ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ComponentProps } from 'react';
3
+ import { MouseEvent, ReactNode, ElementType, ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ComponentProps } from 'react';
4
4
  import { ToggleGroup, Tabs, Tooltip as Tooltip$1, DropdownMenu } from 'radix-ui';
5
5
  import { ToggleGroupSingleProps, ToggleGroupItemProps } from '@radix-ui/react-toggle-group';
6
6
  import * as TabPrimitive from '@radix-ui/react-tabs';
@@ -29,6 +29,7 @@ interface ContentBadgeBasicProps {
29
29
  badgeStyle?: ContentBadgeStyle;
30
30
  isMuted?: boolean;
31
31
  withIcon?: boolean;
32
+ onIconClick?: (e: MouseEvent<Element>) => void;
32
33
  children: ReactNode;
33
34
  }
34
35
  interface ContentFeedbackBadgeProps {
@@ -47,7 +48,7 @@ interface ContentThemeBadgeProps {
47
48
  }
48
49
  declare const ContentBadge: {
49
50
  Basic: {
50
- ({ hierarchy, size, badgeStyle, isMuted, withIcon, children, }: ContentBadgeBasicProps): _emotion_react_jsx_runtime.JSX.Element;
51
+ ({ hierarchy, size, badgeStyle, isMuted, withIcon, onIconClick, children, }: ContentBadgeBasicProps): _emotion_react_jsx_runtime.JSX.Element;
51
52
  displayName: string;
52
53
  };
53
54
  Feedback: {
@@ -425,37 +426,48 @@ declare const Card: {
425
426
  };
426
427
  };
427
428
 
428
- type BasicHierarchy = "accent" | "primary" | "secondary";
429
+ declare const LabelButton: {
430
+ Basic: react.ForwardRefExoticComponent<LabelButtonBasicProps & react.RefAttributes<HTMLButtonElement>>;
431
+ Feedback: react.ForwardRefExoticComponent<LabelButtonFeedbackProps & react.RefAttributes<HTMLButtonElement>>;
432
+ };
433
+
434
+ type LabelButtonSize = "xs" | "sm" | "md" | "lg";
435
+ type LabelButtonHierarchy = "accent" | "primary" | "secondary" | "tertiary";
436
+ type LabelButtonIntent = "positive" | "destructive";
437
+ interface BaseLabelButtonProps extends ComponentPropsWithoutRef<"button"> {
438
+ children: ReactNode;
439
+ size?: LabelButtonSize;
440
+ prefixIcon?: IconName;
441
+ suffixIcon?: IconName;
442
+ }
443
+ interface LabelButtonBasicProps extends BaseLabelButtonProps {
444
+ hierarchy?: LabelButtonHierarchy;
445
+ }
446
+ interface LabelButtonFeedbackProps extends BaseLabelButtonProps {
447
+ intent: LabelButtonIntent;
448
+ }
449
+
450
+ type BasicHierarchy = "primary" | "secondary";
429
451
  type FeedbackHierarchy = "positive" | "destructive" | "notifying";
430
- type CalloutVariant = "hero" | "hint";
431
- type CalloutSize = "lg" | "md" | "sm" | "xs" | "2xs";
452
+ type CalloutSize = "lg" | "md" | "sm" | "xs";
432
453
  interface BaseCalloutProps {
433
- variant?: CalloutVariant;
434
454
  size?: CalloutSize;
435
- titleVisible?: boolean;
436
- extraButtonVisible?: boolean;
437
455
  title?: string;
438
- blockButtonProps?: Omit<BaseBlockButtonProps, "size">;
439
- children: ReactNode;
440
456
  className?: string;
457
+ labelButtonProps?: Omit<LabelButtonBasicProps, "size">;
458
+ children: ReactNode;
441
459
  }
442
- interface BasicCalloutProps extends BaseCalloutProps {
443
- hierarchy: BasicHierarchy;
460
+ interface BasicCalloutModeProps extends BaseCalloutProps {
461
+ hierarchy?: BasicHierarchy;
462
+ feedback?: never;
444
463
  }
445
- interface FeedbackCalloutProps extends BaseCalloutProps {
464
+ interface FeedbackCalloutModeProps extends BaseCalloutProps {
446
465
  feedback: FeedbackHierarchy;
466
+ hierarchy?: never;
447
467
  }
468
+ type CalloutProps = BasicCalloutModeProps | FeedbackCalloutModeProps;
448
469
 
449
- declare const Callout: {
450
- Basic: {
451
- ({ variant, hierarchy, size, title, blockButtonProps, children, className, }: BasicCalloutProps): _emotion_react_jsx_runtime.JSX.Element;
452
- displayName: string;
453
- };
454
- Feedback: {
455
- ({ variant, feedback, size, title, blockButtonProps, children, className, }: FeedbackCalloutProps): _emotion_react_jsx_runtime.JSX.Element;
456
- displayName: string;
457
- };
458
- };
470
+ declare const Callout: ({ size, title, labelButtonProps, children, className, ...props }: CalloutProps) => _emotion_react_jsx_runtime.JSX.Element;
459
471
 
460
472
  declare const Checkbox: {
461
473
  Basic: react.ForwardRefExoticComponent<CheckboxBasicProps & react.RefAttributes<HTMLInputElement>>;
@@ -494,7 +506,8 @@ interface FileItemProps extends ComponentPropsWithoutRef<"button"> {
494
506
  disabled?: boolean;
495
507
  hasError?: boolean;
496
508
  errorMessage?: ReactNode;
497
- suffixButton?: ReactNode;
509
+ removeable?: boolean;
510
+ onRemove?: (e: MouseEvent) => void;
498
511
  }
499
512
 
500
513
  declare const FileItem: react.ForwardRefExoticComponent<FileItemProps & react.RefAttributes<HTMLButtonElement>>;
@@ -752,7 +765,7 @@ interface Tag {
752
765
  }
753
766
  interface TagFieldPublicProps extends FieldPublicProps, Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange" | "defaultValue" | "style" | "type"> {
754
767
  label?: string;
755
- labelIcon?: IconName;
768
+ isWithInfoIcon?: boolean;
756
769
  helperText?: string;
757
770
  tags: Tag[];
758
771
  onTagsChange: (tags: Tag[]) => void;
@@ -762,6 +775,7 @@ interface TagFieldPublicProps extends FieldPublicProps, Omit<ComponentPropsWitho
762
775
  }
763
776
  type TagFieldProps = TagFieldPublicProps;
764
777
  interface TagFieldButtonProps extends TagFieldPublicProps {
778
+ labelIcon?: IconName;
765
779
  button: ReactNode;
766
780
  }
767
781
 
@@ -792,7 +806,7 @@ type InputAreaProps = InputAreaPublicProps;
792
806
 
793
807
  interface SelectFieldPublicProps extends FieldPublicProps {
794
808
  label?: ReactNode;
795
- labelIcon?: IconName;
809
+ isWithInfoIcon?: boolean;
796
810
  helperText?: string;
797
811
  value: string;
798
812
  placeholder?: string;
@@ -803,6 +817,7 @@ interface SelectFieldPublicProps extends FieldPublicProps {
803
817
  }
804
818
  type SelectFieldProps = SelectFieldPublicProps;
805
819
  interface SelectFieldButtonProps extends SelectFieldPublicProps {
820
+ labelIcon?: IconName;
806
821
  button: ReactNode;
807
822
  }
808
823
 
@@ -812,13 +827,14 @@ declare const SelectField: react.ForwardRefExoticComponent<SelectFieldPublicProp
812
827
 
813
828
  interface TextFieldPublicProps extends FieldPublicProps, Omit<FieldInputPublicProps, "value" | "onChange" | "defaultValue"> {
814
829
  label?: ReactNode;
815
- labelIcon?: IconName;
830
+ isWithInfoIcon?: boolean;
816
831
  helperText?: string;
817
832
  value: string;
818
833
  onChange: (e: ChangeEvent<HTMLInputElement>) => void;
819
834
  }
820
835
  type TextFieldProps = TextFieldPublicProps;
821
836
  interface TextFieldButtonProps extends TextFieldPublicProps {
837
+ labelIcon?: IconName;
822
838
  button: ReactNode;
823
839
  }
824
840
 
@@ -849,6 +865,7 @@ declare const TEXT_ALIGN_MAPPING: {
849
865
  type LabelSize = "lg" | "md" | "sm" | "xs";
850
866
  type LabelTextAlign = keyof typeof TEXT_ALIGN_MAPPING;
851
867
  type LabelWeight = "bold" | "normal" | "subtle";
868
+ type LabelCursor = "pointer" | "default";
852
869
 
853
870
  /**
854
871
  * @remarks
@@ -859,6 +876,7 @@ type LabelOwnProps = {
859
876
  size?: LabelSize;
860
877
  textAlign?: LabelTextAlign;
861
878
  weight?: LabelWeight;
879
+ cursor?: LabelCursor;
862
880
  };
863
881
 
864
882
  /**
@@ -873,27 +891,6 @@ declare const Label: (<E extends ElementType = "label">(props: PolymorphicCompon
873
891
  displayName?: string;
874
892
  };
875
893
 
876
- declare const LabelButton: {
877
- Basic: react.ForwardRefExoticComponent<LabelButtonBasicProps & react.RefAttributes<HTMLButtonElement>>;
878
- Feedback: react.ForwardRefExoticComponent<LabelButtonFeedbackProps & react.RefAttributes<HTMLButtonElement>>;
879
- };
880
-
881
- type LabelButtonSize = "xs" | "sm" | "md" | "lg";
882
- type LabelButtonHierarchy = "accent" | "primary" | "secondary" | "tertiary";
883
- type LabelButtonIntent = "positive" | "destructive";
884
- interface BaseLabelButtonProps extends ComponentPropsWithoutRef<"button"> {
885
- children: ReactNode;
886
- size?: LabelButtonSize;
887
- prefixIcon?: IconName;
888
- suffixIcon?: IconName;
889
- }
890
- interface LabelButtonBasicProps extends BaseLabelButtonProps {
891
- hierarchy?: LabelButtonHierarchy;
892
- }
893
- interface LabelButtonFeedbackProps extends BaseLabelButtonProps {
894
- intent: LabelButtonIntent;
895
- }
896
-
897
894
  type LogoHierarchy = "primary" | "secondary" | "tertiary" | "inverse";
898
895
  interface LogoProps extends Omit<ComponentPropsWithoutRef<"a">, "children"> {
899
896
  hierarchy?: LogoHierarchy;
@@ -1444,31 +1441,27 @@ type SnackbarController = {
1444
1441
  declare const snackbarController: SnackbarController;
1445
1442
 
1446
1443
  type AccordionSize = "lg" | "md" | "sm";
1447
- type AccordionRootProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
1444
+ interface AccordionRootBaseProps {
1448
1445
  isStretched?: boolean;
1449
- withPrefixIcon?: boolean;
1450
1446
  size?: AccordionSize;
1447
+ }
1448
+ type AccordionPrimitiveProps = AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps;
1449
+ type AccordionRootProps = AccordionRootBaseProps & AccordionPrimitiveProps;
1450
+ type AccordionItemProps = AccordionPrimitive.AccordionItemProps;
1451
+ type AccordionTriggerProps = AccordionPrimitive.AccordionTriggerProps & {
1452
+ withPrefixIcon?: IconName;
1451
1453
  };
1452
- type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
1453
- type AccordionTriggerProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {
1454
- isStretched?: boolean;
1455
- withPrefixIcon?: IconName | null;
1456
- };
1457
- type AccordionContentProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
1454
+ type AccordionContentProps = AccordionPrimitive.AccordionContentProps;
1458
1455
 
1459
1456
  declare const Accordion: {
1460
- Root: {
1461
- ({ children, isStretched, size, ...props }: AccordionRootProps): _emotion_react_jsx_runtime.JSX.Element;
1462
- displayName: string;
1463
- };
1464
- Item: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1465
- Trigger: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & {
1466
- isStretched?: boolean;
1467
- withPrefixIcon?: IconName | null;
1457
+ Root: react.ForwardRefExoticComponent<AccordionRootProps & react.RefAttributes<HTMLDivElement>>;
1458
+ Item: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionItemProps & react.RefAttributes<HTMLDivElement>>;
1459
+ Trigger: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionTriggerProps & {
1460
+ withPrefixIcon?: IconName;
1468
1461
  } & react.RefAttributes<HTMLButtonElement>>;
1469
- Content: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1462
+ Content: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionContentProps & react.RefAttributes<HTMLDivElement>>;
1470
1463
  };
1471
1464
 
1472
1465
  declare const JDS_VERSION = "0.0.1";
1473
1466
 
1474
- export { Accordion, type AccordionContentProps, type AccordionItemProps, type AccordionRootProps, type AccordionTriggerProps, type BadgeSize, type BadgeStyle, type BadgeStyleWithoutBorder, Banner, type BannerBarProps, type BannerImageProps, type BannerProps, type BannerVariant, type BasicCalloutProps, type BasicHierarchy$1 as BasicHierarchy, BlockButton, type BlockButtonBasicProps, type BlockButtonFeedbackProps, type BlockButtonHierarchy, type BlockButtonSize, type BlockButtonStyle, Callout, Card, type CardBodyProps, type CardCaptionProps, type CardContentProps, type CardImageProps, type CardLabelProps, type CardLayout, type CardMetaItemProps, type CardMetaProps, type CardRootOwnProps, type CardStyle, type CardTitleProps, type CardVariant, Checkbox, type CheckboxAlign, type CheckboxBasicProps, type CheckboxBoxProps, type CheckboxContentProps, type CheckboxSize, type CheckboxVariant, type CheckedState, ContentBadge, type ContentBadgeBasicProps, type ContentBadgeStyle, type ContentFeedbackBadgeProps, type ContentThemeBadgeProps, Dialog, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerThickness, type DividerVariant, DotBadge, DotBadgeFeedback, type DotBadgeFeedbackProps, EmptyState, type EmptyStateProps, type FeedbackCalloutProps, type FeedbackIntent, type FeedbackVariant, type FieldInputPublicProps, type FieldPublicProps, type FieldTextAreaPublicProps, FileItem, type FileItemProps, Footer, type FooterBottomProps, type FooterContentProps, type FooterHeaderProps, type FooterLink, type FooterLogoDivProps, type FooterLogoLinkProps, type FooterNavProps, type FooterRootProps, type FooterSection, type FooterSectionProps, type FooterSocialProps, GlobalNavigation, type GlobalNavigationBlockItemProps, type GlobalNavigationListProps, type GlobalNavigationLogoItemProps, type GlobalNavigationLogoLinkProps, type GlobalNavigationRootProps, type GlobalNavigationToggleItemProps, type GlobalNavigationVariant, Hero, type HeroProps, Icon, IconButton, type IconButtonBasicProps, type IconButtonFeedbackProps, type IconButtonHierarchy, type IconButtonIntent, type IconButtonSize, type IconName, type IconProps, type IconSize, Image, type ImageOwnProps, type ImgOrientation, type ImgRatio, Input, InputArea, type InputAreaLayout, type InputAreaProps, type InputAreaStatus, type InputAreaStyle, type InputAreaValidation, type InputLayout, type InputStyle, type InputValidation, JDS_VERSION, Label, LabelButton, type LabelButtonBasicProps, type LabelButtonFeedbackProps, type LabelButtonHierarchy, type LabelButtonIntent, type LabelButtonSize, type LabelOwnProps, LocalNavigation, type LocalNavigationBackButtonProps, type LocalNavigationButtonGroupProps, type LocalNavigationRootProps, type LocalNavigationTitleProps, Logo, type LogoHierarchy, type LogoProps, MegaMenu, type MegaMenuGroupItemProps, type MegaMenuGroupProps, type MegaMenuProps, type MegaMenuSectionProps, Menu, type MenuAnchorProps, type MenuButtonProps, type MenuCategoryProps, type MenuContentProps, type MenuGroupProps, MenuItem, type MenuItemAnchorProps, type MenuItemButtonProps, type MenuItemProps, type MenuItemSize, type MenuItemVariant, type MenuRootProps, type MenuSize, type MenuStyle, type MenuTrigger, NumericBadge, type NumericBadgeBasicProps, type NumericBadgeStyle, type NumericBasicBadgeProps, type PlateCompactPresetProps, type PlateWithLabelPresetProps, type PlateWithTitlePresetProps, type PostPresetProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlRootProps, type SegmentedControlSize, Select, type SelectCheckboxProps, type SelectContextType, SelectField, type SelectFieldProps, type SelectLabelProps, type SelectProps, type SelectRadioProps, type SelectSize, type SelectValue, type SelectVariant, Snackbar, type SnackbarBase, type SnackbarBaseProps, type SnackbarBasicProps, type SnackbarButtonsProps, type SnackbarFeedbackProps, type SnackbarHandler, type SnackbarItem, SnackbarProvider, type SnackbarStyle, type SnackbarVariant, Step, type StepItemProps, type StepRootProps, type StepSize, type StepStatus, Tab, TabContent, type TabContentProps, TabList, type TabListProps, TabRoot, type TabRootProps, TabTrigger, type TabTriggerProps, type TabVariant, type Tag, TagField, type TagFieldProps, TextField, type TextFieldButtonProps, type TextFieldProps, type TextFieldPublicProps, type ThemeVariant, Title, type TitleProps, Toast, type ToastBaseProps, type ToastFeedbackProps, type ToastHandler, type ToastItem, ToastProvider, type ToastStyle, Tooltip, type TooltipContentProps, type TooltipProps, type TooltipTriggerProps, type UploadError, type UploadErrorType, Uploader, type UploaderFileButtonProps, type UploaderFileProps, type UploaderImageButtonProps, type UploaderImageProps, type UploaderOptions, snackbarController, toastController, useGlobalNavigationVariant, useSnackbar, useToast };
1467
+ export { Accordion, type AccordionContentProps, type AccordionItemProps, type AccordionRootProps, type AccordionTriggerProps, type BadgeSize, type BadgeStyle, type BadgeStyleWithoutBorder, Banner, type BannerBarProps, type BannerImageProps, type BannerProps, type BannerVariant, type BasicHierarchy$1 as BasicHierarchy, BlockButton, type BlockButtonBasicProps, type BlockButtonFeedbackProps, type BlockButtonHierarchy, type BlockButtonSize, type BlockButtonStyle, Callout, Card, type CardBodyProps, type CardCaptionProps, type CardContentProps, type CardImageProps, type CardLabelProps, type CardLayout, type CardMetaItemProps, type CardMetaProps, type CardRootOwnProps, type CardStyle, type CardTitleProps, type CardVariant, Checkbox, type CheckboxAlign, type CheckboxBasicProps, type CheckboxBoxProps, type CheckboxContentProps, type CheckboxSize, type CheckboxVariant, type CheckedState, ContentBadge, type ContentBadgeBasicProps, type ContentBadgeStyle, type ContentFeedbackBadgeProps, type ContentThemeBadgeProps, Dialog, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerThickness, type DividerVariant, DotBadge, DotBadgeFeedback, type DotBadgeFeedbackProps, EmptyState, type EmptyStateProps, type FeedbackIntent, type FeedbackVariant, type FieldInputPublicProps, type FieldPublicProps, type FieldTextAreaPublicProps, FileItem, type FileItemProps, Footer, type FooterBottomProps, type FooterContentProps, type FooterHeaderProps, type FooterLink, type FooterLogoDivProps, type FooterLogoLinkProps, type FooterNavProps, type FooterRootProps, type FooterSection, type FooterSectionProps, type FooterSocialProps, GlobalNavigation, type GlobalNavigationBlockItemProps, type GlobalNavigationListProps, type GlobalNavigationLogoItemProps, type GlobalNavigationLogoLinkProps, type GlobalNavigationRootProps, type GlobalNavigationToggleItemProps, type GlobalNavigationVariant, Hero, type HeroProps, Icon, IconButton, type IconButtonBasicProps, type IconButtonFeedbackProps, type IconButtonHierarchy, type IconButtonIntent, type IconButtonSize, type IconName, type IconProps, type IconSize, Image, type ImageOwnProps, type ImgOrientation, type ImgRatio, Input, InputArea, type InputAreaLayout, type InputAreaProps, type InputAreaStatus, type InputAreaStyle, type InputAreaValidation, type InputLayout, type InputStyle, type InputValidation, JDS_VERSION, Label, LabelButton, type LabelButtonBasicProps, type LabelButtonFeedbackProps, type LabelButtonHierarchy, type LabelButtonIntent, type LabelButtonSize, type LabelOwnProps, LocalNavigation, type LocalNavigationBackButtonProps, type LocalNavigationButtonGroupProps, type LocalNavigationRootProps, type LocalNavigationTitleProps, Logo, type LogoHierarchy, type LogoProps, MegaMenu, type MegaMenuGroupItemProps, type MegaMenuGroupProps, type MegaMenuProps, type MegaMenuSectionProps, Menu, type MenuAnchorProps, type MenuButtonProps, type MenuCategoryProps, type MenuContentProps, type MenuGroupProps, MenuItem, type MenuItemAnchorProps, type MenuItemButtonProps, type MenuItemProps, type MenuItemSize, type MenuItemVariant, type MenuRootProps, type MenuSize, type MenuStyle, type MenuTrigger, NumericBadge, type NumericBadgeBasicProps, type NumericBadgeStyle, type NumericBasicBadgeProps, type PlateCompactPresetProps, type PlateWithLabelPresetProps, type PlateWithTitlePresetProps, type PostPresetProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlRootProps, type SegmentedControlSize, Select, type SelectCheckboxProps, type SelectContextType, SelectField, type SelectFieldProps, type SelectLabelProps, type SelectProps, type SelectRadioProps, type SelectSize, type SelectValue, type SelectVariant, Snackbar, type SnackbarBase, type SnackbarBaseProps, type SnackbarBasicProps, type SnackbarButtonsProps, type SnackbarFeedbackProps, type SnackbarHandler, type SnackbarItem, SnackbarProvider, type SnackbarStyle, type SnackbarVariant, Step, type StepItemProps, type StepRootProps, type StepSize, type StepStatus, Tab, TabContent, type TabContentProps, TabList, type TabListProps, TabRoot, type TabRootProps, TabTrigger, type TabTriggerProps, type TabVariant, type Tag, TagField, type TagFieldProps, TextField, type TextFieldButtonProps, type TextFieldProps, type TextFieldPublicProps, type ThemeVariant, Title, type TitleProps, Toast, type ToastBaseProps, type ToastFeedbackProps, type ToastHandler, type ToastItem, ToastProvider, type ToastStyle, Tooltip, type TooltipContentProps, type TooltipProps, type TooltipTriggerProps, type UploadError, type UploadErrorType, Uploader, type UploaderFileButtonProps, type UploaderFileProps, type UploaderImageButtonProps, type UploaderImageProps, type UploaderOptions, snackbarController, toastController, useGlobalNavigationVariant, useSnackbar, useToast };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, ElementType, ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ComponentProps } from 'react';
3
+ import { MouseEvent, ReactNode, ElementType, ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ComponentProps } from 'react';
4
4
  import { ToggleGroup, Tabs, Tooltip as Tooltip$1, DropdownMenu } from 'radix-ui';
5
5
  import { ToggleGroupSingleProps, ToggleGroupItemProps } from '@radix-ui/react-toggle-group';
6
6
  import * as TabPrimitive from '@radix-ui/react-tabs';
@@ -29,6 +29,7 @@ interface ContentBadgeBasicProps {
29
29
  badgeStyle?: ContentBadgeStyle;
30
30
  isMuted?: boolean;
31
31
  withIcon?: boolean;
32
+ onIconClick?: (e: MouseEvent<Element>) => void;
32
33
  children: ReactNode;
33
34
  }
34
35
  interface ContentFeedbackBadgeProps {
@@ -47,7 +48,7 @@ interface ContentThemeBadgeProps {
47
48
  }
48
49
  declare const ContentBadge: {
49
50
  Basic: {
50
- ({ hierarchy, size, badgeStyle, isMuted, withIcon, children, }: ContentBadgeBasicProps): _emotion_react_jsx_runtime.JSX.Element;
51
+ ({ hierarchy, size, badgeStyle, isMuted, withIcon, onIconClick, children, }: ContentBadgeBasicProps): _emotion_react_jsx_runtime.JSX.Element;
51
52
  displayName: string;
52
53
  };
53
54
  Feedback: {
@@ -425,37 +426,48 @@ declare const Card: {
425
426
  };
426
427
  };
427
428
 
428
- type BasicHierarchy = "accent" | "primary" | "secondary";
429
+ declare const LabelButton: {
430
+ Basic: react.ForwardRefExoticComponent<LabelButtonBasicProps & react.RefAttributes<HTMLButtonElement>>;
431
+ Feedback: react.ForwardRefExoticComponent<LabelButtonFeedbackProps & react.RefAttributes<HTMLButtonElement>>;
432
+ };
433
+
434
+ type LabelButtonSize = "xs" | "sm" | "md" | "lg";
435
+ type LabelButtonHierarchy = "accent" | "primary" | "secondary" | "tertiary";
436
+ type LabelButtonIntent = "positive" | "destructive";
437
+ interface BaseLabelButtonProps extends ComponentPropsWithoutRef<"button"> {
438
+ children: ReactNode;
439
+ size?: LabelButtonSize;
440
+ prefixIcon?: IconName;
441
+ suffixIcon?: IconName;
442
+ }
443
+ interface LabelButtonBasicProps extends BaseLabelButtonProps {
444
+ hierarchy?: LabelButtonHierarchy;
445
+ }
446
+ interface LabelButtonFeedbackProps extends BaseLabelButtonProps {
447
+ intent: LabelButtonIntent;
448
+ }
449
+
450
+ type BasicHierarchy = "primary" | "secondary";
429
451
  type FeedbackHierarchy = "positive" | "destructive" | "notifying";
430
- type CalloutVariant = "hero" | "hint";
431
- type CalloutSize = "lg" | "md" | "sm" | "xs" | "2xs";
452
+ type CalloutSize = "lg" | "md" | "sm" | "xs";
432
453
  interface BaseCalloutProps {
433
- variant?: CalloutVariant;
434
454
  size?: CalloutSize;
435
- titleVisible?: boolean;
436
- extraButtonVisible?: boolean;
437
455
  title?: string;
438
- blockButtonProps?: Omit<BaseBlockButtonProps, "size">;
439
- children: ReactNode;
440
456
  className?: string;
457
+ labelButtonProps?: Omit<LabelButtonBasicProps, "size">;
458
+ children: ReactNode;
441
459
  }
442
- interface BasicCalloutProps extends BaseCalloutProps {
443
- hierarchy: BasicHierarchy;
460
+ interface BasicCalloutModeProps extends BaseCalloutProps {
461
+ hierarchy?: BasicHierarchy;
462
+ feedback?: never;
444
463
  }
445
- interface FeedbackCalloutProps extends BaseCalloutProps {
464
+ interface FeedbackCalloutModeProps extends BaseCalloutProps {
446
465
  feedback: FeedbackHierarchy;
466
+ hierarchy?: never;
447
467
  }
468
+ type CalloutProps = BasicCalloutModeProps | FeedbackCalloutModeProps;
448
469
 
449
- declare const Callout: {
450
- Basic: {
451
- ({ variant, hierarchy, size, title, blockButtonProps, children, className, }: BasicCalloutProps): _emotion_react_jsx_runtime.JSX.Element;
452
- displayName: string;
453
- };
454
- Feedback: {
455
- ({ variant, feedback, size, title, blockButtonProps, children, className, }: FeedbackCalloutProps): _emotion_react_jsx_runtime.JSX.Element;
456
- displayName: string;
457
- };
458
- };
470
+ declare const Callout: ({ size, title, labelButtonProps, children, className, ...props }: CalloutProps) => _emotion_react_jsx_runtime.JSX.Element;
459
471
 
460
472
  declare const Checkbox: {
461
473
  Basic: react.ForwardRefExoticComponent<CheckboxBasicProps & react.RefAttributes<HTMLInputElement>>;
@@ -494,7 +506,8 @@ interface FileItemProps extends ComponentPropsWithoutRef<"button"> {
494
506
  disabled?: boolean;
495
507
  hasError?: boolean;
496
508
  errorMessage?: ReactNode;
497
- suffixButton?: ReactNode;
509
+ removeable?: boolean;
510
+ onRemove?: (e: MouseEvent) => void;
498
511
  }
499
512
 
500
513
  declare const FileItem: react.ForwardRefExoticComponent<FileItemProps & react.RefAttributes<HTMLButtonElement>>;
@@ -752,7 +765,7 @@ interface Tag {
752
765
  }
753
766
  interface TagFieldPublicProps extends FieldPublicProps, Omit<ComponentPropsWithoutRef<"input">, "value" | "onChange" | "defaultValue" | "style" | "type"> {
754
767
  label?: string;
755
- labelIcon?: IconName;
768
+ isWithInfoIcon?: boolean;
756
769
  helperText?: string;
757
770
  tags: Tag[];
758
771
  onTagsChange: (tags: Tag[]) => void;
@@ -762,6 +775,7 @@ interface TagFieldPublicProps extends FieldPublicProps, Omit<ComponentPropsWitho
762
775
  }
763
776
  type TagFieldProps = TagFieldPublicProps;
764
777
  interface TagFieldButtonProps extends TagFieldPublicProps {
778
+ labelIcon?: IconName;
765
779
  button: ReactNode;
766
780
  }
767
781
 
@@ -792,7 +806,7 @@ type InputAreaProps = InputAreaPublicProps;
792
806
 
793
807
  interface SelectFieldPublicProps extends FieldPublicProps {
794
808
  label?: ReactNode;
795
- labelIcon?: IconName;
809
+ isWithInfoIcon?: boolean;
796
810
  helperText?: string;
797
811
  value: string;
798
812
  placeholder?: string;
@@ -803,6 +817,7 @@ interface SelectFieldPublicProps extends FieldPublicProps {
803
817
  }
804
818
  type SelectFieldProps = SelectFieldPublicProps;
805
819
  interface SelectFieldButtonProps extends SelectFieldPublicProps {
820
+ labelIcon?: IconName;
806
821
  button: ReactNode;
807
822
  }
808
823
 
@@ -812,13 +827,14 @@ declare const SelectField: react.ForwardRefExoticComponent<SelectFieldPublicProp
812
827
 
813
828
  interface TextFieldPublicProps extends FieldPublicProps, Omit<FieldInputPublicProps, "value" | "onChange" | "defaultValue"> {
814
829
  label?: ReactNode;
815
- labelIcon?: IconName;
830
+ isWithInfoIcon?: boolean;
816
831
  helperText?: string;
817
832
  value: string;
818
833
  onChange: (e: ChangeEvent<HTMLInputElement>) => void;
819
834
  }
820
835
  type TextFieldProps = TextFieldPublicProps;
821
836
  interface TextFieldButtonProps extends TextFieldPublicProps {
837
+ labelIcon?: IconName;
822
838
  button: ReactNode;
823
839
  }
824
840
 
@@ -849,6 +865,7 @@ declare const TEXT_ALIGN_MAPPING: {
849
865
  type LabelSize = "lg" | "md" | "sm" | "xs";
850
866
  type LabelTextAlign = keyof typeof TEXT_ALIGN_MAPPING;
851
867
  type LabelWeight = "bold" | "normal" | "subtle";
868
+ type LabelCursor = "pointer" | "default";
852
869
 
853
870
  /**
854
871
  * @remarks
@@ -859,6 +876,7 @@ type LabelOwnProps = {
859
876
  size?: LabelSize;
860
877
  textAlign?: LabelTextAlign;
861
878
  weight?: LabelWeight;
879
+ cursor?: LabelCursor;
862
880
  };
863
881
 
864
882
  /**
@@ -873,27 +891,6 @@ declare const Label: (<E extends ElementType = "label">(props: PolymorphicCompon
873
891
  displayName?: string;
874
892
  };
875
893
 
876
- declare const LabelButton: {
877
- Basic: react.ForwardRefExoticComponent<LabelButtonBasicProps & react.RefAttributes<HTMLButtonElement>>;
878
- Feedback: react.ForwardRefExoticComponent<LabelButtonFeedbackProps & react.RefAttributes<HTMLButtonElement>>;
879
- };
880
-
881
- type LabelButtonSize = "xs" | "sm" | "md" | "lg";
882
- type LabelButtonHierarchy = "accent" | "primary" | "secondary" | "tertiary";
883
- type LabelButtonIntent = "positive" | "destructive";
884
- interface BaseLabelButtonProps extends ComponentPropsWithoutRef<"button"> {
885
- children: ReactNode;
886
- size?: LabelButtonSize;
887
- prefixIcon?: IconName;
888
- suffixIcon?: IconName;
889
- }
890
- interface LabelButtonBasicProps extends BaseLabelButtonProps {
891
- hierarchy?: LabelButtonHierarchy;
892
- }
893
- interface LabelButtonFeedbackProps extends BaseLabelButtonProps {
894
- intent: LabelButtonIntent;
895
- }
896
-
897
894
  type LogoHierarchy = "primary" | "secondary" | "tertiary" | "inverse";
898
895
  interface LogoProps extends Omit<ComponentPropsWithoutRef<"a">, "children"> {
899
896
  hierarchy?: LogoHierarchy;
@@ -1444,31 +1441,27 @@ type SnackbarController = {
1444
1441
  declare const snackbarController: SnackbarController;
1445
1442
 
1446
1443
  type AccordionSize = "lg" | "md" | "sm";
1447
- type AccordionRootProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
1444
+ interface AccordionRootBaseProps {
1448
1445
  isStretched?: boolean;
1449
- withPrefixIcon?: boolean;
1450
1446
  size?: AccordionSize;
1447
+ }
1448
+ type AccordionPrimitiveProps = AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps;
1449
+ type AccordionRootProps = AccordionRootBaseProps & AccordionPrimitiveProps;
1450
+ type AccordionItemProps = AccordionPrimitive.AccordionItemProps;
1451
+ type AccordionTriggerProps = AccordionPrimitive.AccordionTriggerProps & {
1452
+ withPrefixIcon?: IconName;
1451
1453
  };
1452
- type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
1453
- type AccordionTriggerProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {
1454
- isStretched?: boolean;
1455
- withPrefixIcon?: IconName | null;
1456
- };
1457
- type AccordionContentProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
1454
+ type AccordionContentProps = AccordionPrimitive.AccordionContentProps;
1458
1455
 
1459
1456
  declare const Accordion: {
1460
- Root: {
1461
- ({ children, isStretched, size, ...props }: AccordionRootProps): _emotion_react_jsx_runtime.JSX.Element;
1462
- displayName: string;
1463
- };
1464
- Item: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1465
- Trigger: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & {
1466
- isStretched?: boolean;
1467
- withPrefixIcon?: IconName | null;
1457
+ Root: react.ForwardRefExoticComponent<AccordionRootProps & react.RefAttributes<HTMLDivElement>>;
1458
+ Item: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionItemProps & react.RefAttributes<HTMLDivElement>>;
1459
+ Trigger: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionTriggerProps & {
1460
+ withPrefixIcon?: IconName;
1468
1461
  } & react.RefAttributes<HTMLButtonElement>>;
1469
- Content: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1462
+ Content: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionContentProps & react.RefAttributes<HTMLDivElement>>;
1470
1463
  };
1471
1464
 
1472
1465
  declare const JDS_VERSION = "0.0.1";
1473
1466
 
1474
- export { Accordion, type AccordionContentProps, type AccordionItemProps, type AccordionRootProps, type AccordionTriggerProps, type BadgeSize, type BadgeStyle, type BadgeStyleWithoutBorder, Banner, type BannerBarProps, type BannerImageProps, type BannerProps, type BannerVariant, type BasicCalloutProps, type BasicHierarchy$1 as BasicHierarchy, BlockButton, type BlockButtonBasicProps, type BlockButtonFeedbackProps, type BlockButtonHierarchy, type BlockButtonSize, type BlockButtonStyle, Callout, Card, type CardBodyProps, type CardCaptionProps, type CardContentProps, type CardImageProps, type CardLabelProps, type CardLayout, type CardMetaItemProps, type CardMetaProps, type CardRootOwnProps, type CardStyle, type CardTitleProps, type CardVariant, Checkbox, type CheckboxAlign, type CheckboxBasicProps, type CheckboxBoxProps, type CheckboxContentProps, type CheckboxSize, type CheckboxVariant, type CheckedState, ContentBadge, type ContentBadgeBasicProps, type ContentBadgeStyle, type ContentFeedbackBadgeProps, type ContentThemeBadgeProps, Dialog, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerThickness, type DividerVariant, DotBadge, DotBadgeFeedback, type DotBadgeFeedbackProps, EmptyState, type EmptyStateProps, type FeedbackCalloutProps, type FeedbackIntent, type FeedbackVariant, type FieldInputPublicProps, type FieldPublicProps, type FieldTextAreaPublicProps, FileItem, type FileItemProps, Footer, type FooterBottomProps, type FooterContentProps, type FooterHeaderProps, type FooterLink, type FooterLogoDivProps, type FooterLogoLinkProps, type FooterNavProps, type FooterRootProps, type FooterSection, type FooterSectionProps, type FooterSocialProps, GlobalNavigation, type GlobalNavigationBlockItemProps, type GlobalNavigationListProps, type GlobalNavigationLogoItemProps, type GlobalNavigationLogoLinkProps, type GlobalNavigationRootProps, type GlobalNavigationToggleItemProps, type GlobalNavigationVariant, Hero, type HeroProps, Icon, IconButton, type IconButtonBasicProps, type IconButtonFeedbackProps, type IconButtonHierarchy, type IconButtonIntent, type IconButtonSize, type IconName, type IconProps, type IconSize, Image, type ImageOwnProps, type ImgOrientation, type ImgRatio, Input, InputArea, type InputAreaLayout, type InputAreaProps, type InputAreaStatus, type InputAreaStyle, type InputAreaValidation, type InputLayout, type InputStyle, type InputValidation, JDS_VERSION, Label, LabelButton, type LabelButtonBasicProps, type LabelButtonFeedbackProps, type LabelButtonHierarchy, type LabelButtonIntent, type LabelButtonSize, type LabelOwnProps, LocalNavigation, type LocalNavigationBackButtonProps, type LocalNavigationButtonGroupProps, type LocalNavigationRootProps, type LocalNavigationTitleProps, Logo, type LogoHierarchy, type LogoProps, MegaMenu, type MegaMenuGroupItemProps, type MegaMenuGroupProps, type MegaMenuProps, type MegaMenuSectionProps, Menu, type MenuAnchorProps, type MenuButtonProps, type MenuCategoryProps, type MenuContentProps, type MenuGroupProps, MenuItem, type MenuItemAnchorProps, type MenuItemButtonProps, type MenuItemProps, type MenuItemSize, type MenuItemVariant, type MenuRootProps, type MenuSize, type MenuStyle, type MenuTrigger, NumericBadge, type NumericBadgeBasicProps, type NumericBadgeStyle, type NumericBasicBadgeProps, type PlateCompactPresetProps, type PlateWithLabelPresetProps, type PlateWithTitlePresetProps, type PostPresetProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlRootProps, type SegmentedControlSize, Select, type SelectCheckboxProps, type SelectContextType, SelectField, type SelectFieldProps, type SelectLabelProps, type SelectProps, type SelectRadioProps, type SelectSize, type SelectValue, type SelectVariant, Snackbar, type SnackbarBase, type SnackbarBaseProps, type SnackbarBasicProps, type SnackbarButtonsProps, type SnackbarFeedbackProps, type SnackbarHandler, type SnackbarItem, SnackbarProvider, type SnackbarStyle, type SnackbarVariant, Step, type StepItemProps, type StepRootProps, type StepSize, type StepStatus, Tab, TabContent, type TabContentProps, TabList, type TabListProps, TabRoot, type TabRootProps, TabTrigger, type TabTriggerProps, type TabVariant, type Tag, TagField, type TagFieldProps, TextField, type TextFieldButtonProps, type TextFieldProps, type TextFieldPublicProps, type ThemeVariant, Title, type TitleProps, Toast, type ToastBaseProps, type ToastFeedbackProps, type ToastHandler, type ToastItem, ToastProvider, type ToastStyle, Tooltip, type TooltipContentProps, type TooltipProps, type TooltipTriggerProps, type UploadError, type UploadErrorType, Uploader, type UploaderFileButtonProps, type UploaderFileProps, type UploaderImageButtonProps, type UploaderImageProps, type UploaderOptions, snackbarController, toastController, useGlobalNavigationVariant, useSnackbar, useToast };
1467
+ export { Accordion, type AccordionContentProps, type AccordionItemProps, type AccordionRootProps, type AccordionTriggerProps, type BadgeSize, type BadgeStyle, type BadgeStyleWithoutBorder, Banner, type BannerBarProps, type BannerImageProps, type BannerProps, type BannerVariant, type BasicHierarchy$1 as BasicHierarchy, BlockButton, type BlockButtonBasicProps, type BlockButtonFeedbackProps, type BlockButtonHierarchy, type BlockButtonSize, type BlockButtonStyle, Callout, Card, type CardBodyProps, type CardCaptionProps, type CardContentProps, type CardImageProps, type CardLabelProps, type CardLayout, type CardMetaItemProps, type CardMetaProps, type CardRootOwnProps, type CardStyle, type CardTitleProps, type CardVariant, Checkbox, type CheckboxAlign, type CheckboxBasicProps, type CheckboxBoxProps, type CheckboxContentProps, type CheckboxSize, type CheckboxVariant, type CheckedState, ContentBadge, type ContentBadgeBasicProps, type ContentBadgeStyle, type ContentFeedbackBadgeProps, type ContentThemeBadgeProps, Dialog, type DialogProps, Divider, type DividerOrientation, type DividerProps, type DividerThickness, type DividerVariant, DotBadge, DotBadgeFeedback, type DotBadgeFeedbackProps, EmptyState, type EmptyStateProps, type FeedbackIntent, type FeedbackVariant, type FieldInputPublicProps, type FieldPublicProps, type FieldTextAreaPublicProps, FileItem, type FileItemProps, Footer, type FooterBottomProps, type FooterContentProps, type FooterHeaderProps, type FooterLink, type FooterLogoDivProps, type FooterLogoLinkProps, type FooterNavProps, type FooterRootProps, type FooterSection, type FooterSectionProps, type FooterSocialProps, GlobalNavigation, type GlobalNavigationBlockItemProps, type GlobalNavigationListProps, type GlobalNavigationLogoItemProps, type GlobalNavigationLogoLinkProps, type GlobalNavigationRootProps, type GlobalNavigationToggleItemProps, type GlobalNavigationVariant, Hero, type HeroProps, Icon, IconButton, type IconButtonBasicProps, type IconButtonFeedbackProps, type IconButtonHierarchy, type IconButtonIntent, type IconButtonSize, type IconName, type IconProps, type IconSize, Image, type ImageOwnProps, type ImgOrientation, type ImgRatio, Input, InputArea, type InputAreaLayout, type InputAreaProps, type InputAreaStatus, type InputAreaStyle, type InputAreaValidation, type InputLayout, type InputStyle, type InputValidation, JDS_VERSION, Label, LabelButton, type LabelButtonBasicProps, type LabelButtonFeedbackProps, type LabelButtonHierarchy, type LabelButtonIntent, type LabelButtonSize, type LabelOwnProps, LocalNavigation, type LocalNavigationBackButtonProps, type LocalNavigationButtonGroupProps, type LocalNavigationRootProps, type LocalNavigationTitleProps, Logo, type LogoHierarchy, type LogoProps, MegaMenu, type MegaMenuGroupItemProps, type MegaMenuGroupProps, type MegaMenuProps, type MegaMenuSectionProps, Menu, type MenuAnchorProps, type MenuButtonProps, type MenuCategoryProps, type MenuContentProps, type MenuGroupProps, MenuItem, type MenuItemAnchorProps, type MenuItemButtonProps, type MenuItemProps, type MenuItemSize, type MenuItemVariant, type MenuRootProps, type MenuSize, type MenuStyle, type MenuTrigger, NumericBadge, type NumericBadgeBasicProps, type NumericBadgeStyle, type NumericBasicBadgeProps, type PlateCompactPresetProps, type PlateWithLabelPresetProps, type PlateWithTitlePresetProps, type PostPresetProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlRootProps, type SegmentedControlSize, Select, type SelectCheckboxProps, type SelectContextType, SelectField, type SelectFieldProps, type SelectLabelProps, type SelectProps, type SelectRadioProps, type SelectSize, type SelectValue, type SelectVariant, Snackbar, type SnackbarBase, type SnackbarBaseProps, type SnackbarBasicProps, type SnackbarButtonsProps, type SnackbarFeedbackProps, type SnackbarHandler, type SnackbarItem, SnackbarProvider, type SnackbarStyle, type SnackbarVariant, Step, type StepItemProps, type StepRootProps, type StepSize, type StepStatus, Tab, TabContent, type TabContentProps, TabList, type TabListProps, TabRoot, type TabRootProps, TabTrigger, type TabTriggerProps, type TabVariant, type Tag, TagField, type TagFieldProps, TextField, type TextFieldButtonProps, type TextFieldProps, type TextFieldPublicProps, type ThemeVariant, Title, type TitleProps, Toast, type ToastBaseProps, type ToastFeedbackProps, type ToastHandler, type ToastItem, ToastProvider, type ToastStyle, Tooltip, type TooltipContentProps, type TooltipProps, type TooltipTriggerProps, type UploadError, type UploadErrorType, Uploader, type UploaderFileButtonProps, type UploaderFileProps, type UploaderImageButtonProps, type UploaderImageProps, type UploaderOptions, snackbarController, toastController, useGlobalNavigationVariant, useSnackbar, useToast };