@croquiscom/pds 10.0.0 → 10.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 10.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 228947f: PopoverButton IconButton type 추가
8
+
3
9
  ## 10.0.0
4
10
 
5
11
  ### Major Changes
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from '../dropdown';
3
3
  import { AriaFocusProps } from '../../types/common';
4
+ import { IconProps } from '../icons/generated';
4
5
  import { ButtonProps } from './Button';
5
- export interface PopoverButtonProps<OptionValue> extends Omit<ButtonProps, 'size' | 'value' | 'onChange'> {
6
+ import { IconButtonKind } from './types';
7
+ export interface PopoverButtonProps<OptionValue> extends Omit<ButtonProps, 'size' | 'value' | 'onChange' | 'kind'> {
8
+ /** @default false */
9
+ useIconButton?: boolean;
6
10
  /** @default small */
7
11
  size?: 'xsmall' | 'small' | 'medium';
8
12
  /**
@@ -25,7 +29,13 @@ export interface PopoverButtonProps<OptionValue> extends Omit<ButtonProps, 'size
25
29
  maxHeight?: number;
26
30
  disabled?: boolean;
27
31
  value?: OptionValue;
32
+ /**
33
+ * IconButton과 동시 지원을 위해 IconButtonKind로 제한합니다.
34
+ * @default outlined_secondary
35
+ * */
36
+ kind?: IconButtonKind;
37
+ icon?: React.ReactElement<IconProps, string | React.JSXElementConstructor<any>>;
28
38
  onChange?: (value: OptionValue) => void;
29
39
  options: Array<DropdownOption<OptionValue>>;
30
40
  }
31
- export declare const PopoverButton: <OptionValue extends string | number>({ size: sizeProp, loading, type, kind, startIcon, className, children, zIndex, autoPlacement: autoPlacementProps, optionsMatchRefWidth, options, value: valueProp, maxHeight, disabled, unstableFocusVisible, onChange, }: PopoverButtonProps<OptionValue> & AriaFocusProps) => React.JSX.Element;
41
+ export declare const PopoverButton: <OptionValue extends string | number>({ useIconButton, size: sizeProp, loading, type, kind, icon, startIcon, className, children, zIndex, autoPlacement: autoPlacementProps, optionsMatchRefWidth, options, value: valueProp, maxHeight, disabled, unstableFocusVisible, onChange, }: PopoverButtonProps<OptionValue> & AriaFocusProps) => React.JSX.Element;
@@ -7,3 +7,4 @@ export declare const Short: Story;
7
7
  export declare const Long: Story;
8
8
  export declare const Disabled: Story;
9
9
  export declare const Loading: Story;
10
+ export declare const IconPopoverButton: Story;