@croquiscom/pds 0.30.2 → 0.31.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/badge/types.d.ts +3 -3
  3. package/dist/components/banner/NormalBanner.d.ts +12 -0
  4. package/dist/components/banner/NormalBanner.stories.d.ts +6 -0
  5. package/dist/components/banner/index.d.ts +1 -0
  6. package/dist/components/banner/styles.d.ts +3 -0
  7. package/dist/components/bottom-sheet/BottomSheet.d.ts +1 -1
  8. package/dist/components/button/ButtonIcon.d.ts +5 -2
  9. package/dist/components/button/types.d.ts +6 -6
  10. package/dist/components/form/FormHelperText.d.ts +1 -1
  11. package/dist/components/index.d.ts +1 -0
  12. package/dist/components/input/Input.d.ts +1 -1
  13. package/dist/components/input/InputBase.d.ts +1 -1
  14. package/dist/components/input/NumericInput.d.ts +1 -1
  15. package/dist/components/input/types.d.ts +2 -2
  16. package/dist/components/menu/MenuItem.d.ts +2 -1
  17. package/dist/components/message/MessageManager.d.ts +4 -4
  18. package/dist/components/message/types.d.ts +2 -2
  19. package/dist/components/modal/Modal.d.ts +1 -1
  20. package/dist/components/modal/renderModal.d.ts +2 -1
  21. package/dist/components/notification/types.d.ts +2 -2
  22. package/dist/components/popover/Popover.d.ts +2 -2
  23. package/dist/components/provider/Provider.d.ts +2 -2
  24. package/dist/components/radio/RadioGroup.d.ts +2 -2
  25. package/dist/components/stack/HStack.d.ts +1 -1
  26. package/dist/components/stack/VStack.d.ts +1 -1
  27. package/dist/components/stack/types.d.ts +1 -1
  28. package/dist/components/switch/Switch.d.ts +1 -1
  29. package/dist/components/text/BaseText.d.ts +2 -2
  30. package/dist/components/toast/types.d.ts +4 -4
  31. package/dist/components/tooltip/Tooltip.d.ts +2 -2
  32. package/dist/components/tooltip/types.d.ts +2 -2
  33. package/dist/foundation/shapes.d.ts +2 -2
  34. package/dist/foundation/typography.d.ts +3 -3
  35. package/dist/index.es.js +5 -5
  36. package/dist/index.es.js.map +1 -1
  37. package/dist/index.js +5 -5
  38. package/dist/index.js.map +1 -1
  39. package/dist/styles/buildCSSWithLength.d.ts +1 -1
  40. package/dist/styles/placement.d.ts +1 -1
  41. package/dist/styles/zIndex.d.ts +1 -1
  42. package/dist/types/index.d.ts +1 -1
  43. package/package.json +13 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0c8524a: NormalBanner 컴포넌트 추가
8
+
9
+ ## 0.30.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 6c9d3bc: React 18 업데이트
14
+
3
15
  ## 0.30.2
4
16
 
5
17
  ### Patch Changes
@@ -1,3 +1,3 @@
1
- export declare type BadgeKind = 'outline' | 'fill';
2
- export declare type BadgeColor = 'pink' | 'blue' | 'gray' | 'red' | 'green' | 'orange';
3
- export declare type BadgeSize = 'small' | 'medium' | 'large';
1
+ export type BadgeKind = 'outline' | 'fill';
2
+ export type BadgeColor = 'pink' | 'blue' | 'gray' | 'red' | 'green' | 'orange';
3
+ export type BadgeSize = 'small' | 'medium' | 'large';
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export type NormalBannerKind = 'info' | 'error';
3
+ export interface NormalBannerProps {
4
+ className?: string;
5
+ /**
6
+ * @default info
7
+ */
8
+ kind?: NormalBannerKind;
9
+ title: string;
10
+ message: ReactNode;
11
+ }
12
+ export declare const NormalBanner: ({ className, kind, title, message }: NormalBannerProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<({ className, kind, title, message }: import("./NormalBanner").NormalBannerProps) => JSX.Element>;
4
+ export default _default;
5
+ export declare const Base: any;
6
+ export declare const Kind: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './NormalBanner';
@@ -0,0 +1,3 @@
1
+ import { NormalBannerKind } from './NormalBanner';
2
+ export declare const banner_color_css: Record<NormalBannerKind, string>;
3
+ export declare const banner_background_color_css: Record<NormalBannerKind, string>;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- declare type BottomSheetContentWithCloseAction = (action: {
2
+ type BottomSheetContentWithCloseAction = (action: {
3
3
  close(): void;
4
4
  }) => ReactNode;
5
5
  export interface BottomSheetProps {
@@ -1,3 +1,6 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
2
  import { IconProps } from '../icons/generated';
3
- export declare const ButtonIcon: ({ size, color, children }: PropsWithChildren<IconProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
3
+ export interface ButtonIcon extends IconProps {
4
+ children: ReactElement<IconProps>;
5
+ }
6
+ export declare const ButtonIcon: ({ size, color, children }: PropsWithChildren<ButtonIcon>) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -1,6 +1,6 @@
1
- export declare type ButtonKind = 'primary' | 'secondary' | 'black';
2
- export declare type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
3
- export declare type ButtonShape = 'rectangle' | 'circle';
4
- export declare type IconButtonKind = 'outlined_secondary' | 'outlined_primary' | 'outlined_negative';
5
- export declare type TextButtonKind = 'text' | 'link';
6
- export declare type TextButtonSize = Exclude<ButtonSize, 'xsmall' | 'xlarge'>;
1
+ export type ButtonKind = 'primary' | 'secondary' | 'black';
2
+ export type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
3
+ export type ButtonShape = 'rectangle' | 'circle';
4
+ export type IconButtonKind = 'outlined_secondary' | 'outlined_primary' | 'outlined_negative';
5
+ export type TextButtonKind = 'text' | 'link';
6
+ export type TextButtonSize = Exclude<ButtonSize, 'xsmall' | 'xlarge'>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="@emotion/react/types/css-prop" />
2
2
  import React from 'react';
3
3
  import { InputStatus } from '../input/types';
4
- declare type FormHelperTextElement = keyof Pick<JSX.IntrinsicElements, 'div' | 'p' | 'span'>;
4
+ type FormHelperTextElement = keyof Pick<JSX.IntrinsicElements, 'div' | 'p' | 'span'>;
5
5
  export interface FormHelperTextProps extends React.Attributes {
6
6
  /**
7
7
  * @default span
@@ -20,3 +20,4 @@ export * from './notification';
20
20
  export * from './bottom-sheet';
21
21
  export * from './modal';
22
22
  export * from './provider';
23
+ export * from './banner';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { InputAffixProps } from './InputAffix';
3
3
  import { InputBaseProps } from './InputBase';
4
- export declare type InputProps = InputBaseProps & InputAffixProps;
4
+ export type InputProps = InputBaseProps & InputAffixProps;
5
5
  export declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width"> & import("./InputBase").InputBaseType & InputAffixProps & React.RefAttributes<HTMLInputElement>>;
@@ -17,5 +17,5 @@ export interface InputBaseType {
17
17
  rightAddon?: InputAffixProps['suffix'];
18
18
  width?: CSSValueWithLength;
19
19
  }
20
- export declare type InputBaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width'> & InputBaseType;
20
+ export type InputBaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width'> & InputBaseType;
21
21
  export declare const InputBase: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "width"> & InputBaseType & React.RefAttributes<HTMLInputElement>>;
@@ -9,5 +9,5 @@ export interface NumericInputBaseType extends InputBaseType, InputAffixProps {
9
9
  decimalScale?: number;
10
10
  onChange?: (value: number, event: ChangeEvent<HTMLInputElement>) => void;
11
11
  }
12
- export declare type NumericInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'width'> & NumericInputBaseType;
12
+ export type NumericInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'width'> & NumericInputBaseType;
13
13
  export declare const NumericInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "width" | "onChange"> & NumericInputBaseType & React.RefAttributes<HTMLInputElement>>;
@@ -1,2 +1,2 @@
1
- export declare type InputAlignment = 'left' | 'center' | 'right';
2
- export declare type InputStatus = 'info' | 'success' | 'error';
1
+ export type InputAlignment = 'left' | 'center' | 'right';
2
+ export type InputStatus = 'info' | 'success' | 'error';
@@ -12,7 +12,8 @@ export interface MenuItemProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'on
12
12
  /** 메뉴 아이템 우측 영역에 렌더링 될 요소 */
13
13
  suffix?: ReactElement<IconProps> | ReactNode;
14
14
  }
15
- export declare const MenuIcon: ({ selected, children }: React.PropsWithChildren<{
15
+ export declare const MenuIcon: ({ selected, children, }: React.PropsWithChildren<{
16
16
  selected: boolean;
17
+ children: ReactElement<IconProps>;
17
18
  }>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
18
19
  export declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLLIElement>>;
@@ -30,11 +30,11 @@ export interface MessageContainerProps {
30
30
  */
31
31
  direction?: MessageDirection;
32
32
  }
33
- declare type MessageContainerKey = `${MessagePosition}_${MessageDirection}_${number}_${number}`;
34
- declare type MessageComponentTypes = ToastComponentProps | NotificationComponentProps;
35
- export declare type MessageOptions<T extends MessageComponentTypes> = Omit<T, 'destroy' | 'position'> & Partial<MessageContainerProps>;
33
+ type MessageContainerKey = `${MessagePosition}_${MessageDirection}_${number}_${number}`;
34
+ type MessageComponentTypes = ToastComponentProps | NotificationComponentProps;
35
+ export type MessageOptions<T extends MessageComponentTypes> = Omit<T, 'destroy' | 'position'> & Partial<MessageContainerProps>;
36
36
  export declare class MessageManager<T extends MessageComponentTypes> {
37
- private container;
37
+ private root;
38
38
  private component;
39
39
  private z_index;
40
40
  private default_max_count;
@@ -6,5 +6,5 @@ export declare const MessagePosition: {
6
6
  readonly BOTTOM_CENTER: "bottom-center";
7
7
  readonly CENTER: "center";
8
8
  };
9
- export declare type MessagePosition = typeof MessagePosition[keyof typeof MessagePosition];
10
- export declare type MessageDirection = Extract<CSSProperties['flexDirection'], 'column' | 'column-reverse'>;
9
+ export type MessagePosition = typeof MessagePosition[keyof typeof MessagePosition];
10
+ export type MessageDirection = Extract<CSSProperties['flexDirection'], 'column' | 'column-reverse'>;
@@ -21,6 +21,6 @@ export interface ModalProps extends ModalOverlayBaseProps {
21
21
  }
22
22
  export declare const MIN_WIDTH = 480;
23
23
  export declare const Modal: ({ opened: openProp, children, title, width, confirmText, cancelText, closeButton, dense, fill, footerAddon, onConfirm, onCancel, onClose, onExited, ...props }: PropsWithChildren<ModalProps>) => JSX.Element;
24
- export declare const ModalTitle: import("@emotion/styled").StyledComponent<React.PropsWithChildren<import("../text").BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)> & {
24
+ export declare const ModalTitle: import("@emotion/styled").StyledComponent<(import("../text").BaseTextProps & (React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> | React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> | React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>)) & {
25
25
  theme?: import("@emotion/react").Theme;
26
26
  }, {}, {}>;
@@ -1,2 +1,3 @@
1
+ import { Root } from 'react-dom/client';
1
2
  export declare function getFloatingModalPortal(): HTMLElement;
2
- export declare function removeFloatingModalPortal(target: HTMLElement, unmountDelay?: number): void;
3
+ export declare function removeFloatingModalPortal(target: HTMLElement, root: Root, unmountDelay?: number): void;
@@ -1,4 +1,4 @@
1
- export declare type NotificationKind = 'info' | 'success' | 'error' | 'warning';
1
+ export type NotificationKind = 'info' | 'success' | 'error' | 'warning';
2
2
  export declare const NotificationPosition: {
3
3
  readonly TOP_RIGHT: "top-right";
4
4
  readonly TOP_CENTER: "top-center";
@@ -6,4 +6,4 @@ export declare const NotificationPosition: {
6
6
  readonly BOTTOM_CENTER: "bottom-center";
7
7
  readonly CENTER: "center";
8
8
  };
9
- export declare type NotificationPosition = typeof NotificationPosition[keyof typeof NotificationPosition];
9
+ export type NotificationPosition = typeof NotificationPosition[keyof typeof NotificationPosition];
@@ -2,8 +2,8 @@ import React, { ReactElement, ReactNode } from 'react';
2
2
  import { Placement } from '../../styles';
3
3
  import { OpenerTriggerEvent } from '../tooltip';
4
4
  import { HelpTextProps } from '../text/HelpText';
5
- declare type PopoverContent = ReactElement<HelpTextProps> | ReactNode;
6
- declare type PopoverWithCloseAction = (action: {
5
+ type PopoverContent = ReactElement<HelpTextProps> | ReactNode;
6
+ type PopoverWithCloseAction = (action: {
7
7
  close(): void;
8
8
  }) => PopoverContent;
9
9
  export interface PopoverProps {
@@ -1,6 +1,6 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import { ko } from '../../locales/ko';
3
- declare type ProviderConfig = {
3
+ type ProviderConfig = {
4
4
  locale: typeof ko;
5
5
  };
6
6
  export declare const defaultProviderConfig: {
@@ -9,7 +9,7 @@ export declare const defaultProviderConfig: {
9
9
  export declare function setContextConfig(config: ProviderConfig): void;
10
10
  export declare function getContextConfig(): ProviderConfig;
11
11
  export declare const providerContext: React.Context<ProviderConfig>;
12
- export declare type ProviderProps = ProviderConfig;
12
+ export type ProviderProps = ProviderConfig;
13
13
  export declare const useProviderConfig: () => ProviderConfig;
14
14
  export declare const Provider: ({ children, ...props }: PropsWithChildren<ProviderProps>) => JSX.Element;
15
15
  export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- export declare type AlignType = 'horizontal' | 'vertical';
3
- export declare type RadioItemType = 'default' | 'box';
2
+ export type AlignType = 'horizontal' | 'vertical';
3
+ export type RadioItemType = 'default' | 'box';
4
4
  interface RadioItem<RadioValue> {
5
5
  label: React.ReactNode;
6
6
  value: RadioValue;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { StackProps } from './types';
3
- declare type VerticalAlignment = 'stretch' | 'top' | 'bottom' | 'center';
3
+ type VerticalAlignment = 'stretch' | 'top' | 'bottom' | 'center';
4
4
  export interface HStackProps extends StackProps {
5
5
  alignment?: VerticalAlignment;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { StackProps } from './types';
3
- declare type HorizontalAlignment = 'stretch' | 'leading' | 'trailing' | 'center';
3
+ type HorizontalAlignment = 'stretch' | 'leading' | 'trailing' | 'center';
4
4
  export interface VStackProps extends StackProps {
5
5
  alignment?: HorizontalAlignment;
6
6
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { SizeProps, SpaceProps } from '../../styles';
3
3
  import { CSSValueWithLength } from '../../styles';
4
- export declare type StackAlignment = 'stretch' | 'flex-start' | 'center' | 'flex-end';
4
+ export type StackAlignment = 'stretch' | 'flex-start' | 'center' | 'flex-end';
5
5
  export interface StackProps extends SizeProps, SpaceProps {
6
6
  className?: string;
7
7
  children?: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React, { ButtonHTMLAttributes } from 'react';
2
- export declare type SwitchSize = 'small' | 'large';
2
+ export type SwitchSize = 'small' | 'large';
3
3
  export interface SwitchProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  /**
5
5
  * @default true
@@ -1,8 +1,8 @@
1
1
  /// <reference types="@emotion/react/types/css-prop" />
2
2
  import React from 'react';
3
3
  import { Typography } from '../../foundation';
4
- declare type Alignment = 'center' | 'leading' | 'trailing';
5
- declare type TextElement = keyof Pick<JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span' | 'li'>;
4
+ type Alignment = 'center' | 'leading' | 'trailing';
5
+ type TextElement = keyof Pick<JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span' | 'li'>;
6
6
  export interface BaseTextProps extends React.Attributes {
7
7
  alignment?: Alignment;
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { MessageDirection } from '../message';
2
- export declare type ToastSize = 'large' | 'medium';
3
- export declare type ToastKind = 'info' | 'success' | 'error';
2
+ export type ToastSize = 'large' | 'medium';
3
+ export type ToastKind = 'info' | 'success' | 'error';
4
4
  export declare const ToastPosition: {
5
5
  readonly TOP_RIGHT: "top-right";
6
6
  readonly TOP_CENTER: "top-center";
@@ -8,5 +8,5 @@ export declare const ToastPosition: {
8
8
  readonly BOTTOM_CENTER: "bottom-center";
9
9
  readonly CENTER: "center";
10
10
  };
11
- export declare type ToastPosition = typeof ToastPosition[keyof typeof ToastPosition];
12
- export declare type ToastDirection = MessageDirection;
11
+ export type ToastPosition = typeof ToastPosition[keyof typeof ToastPosition];
12
+ export type ToastDirection = MessageDirection;
@@ -1,8 +1,8 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { Placement } from '../../styles';
3
3
  import { TooltipBaseProps } from './TooltipBase';
4
- export declare type OpenerTriggerEvent = 'hover' | 'click' | 'none';
5
- declare type TooltipContentWithCloseAction = (action: {
4
+ export type OpenerTriggerEvent = 'hover' | 'click' | 'none';
5
+ type TooltipContentWithCloseAction = (action: {
6
6
  close(): void;
7
7
  }) => ReactNode;
8
8
  export interface TooltipProps extends TooltipBaseProps {
@@ -1,2 +1,2 @@
1
- export declare type TooltipSize = 'small' | 'medium' | 'large';
2
- export declare type TooltipKind = 'brand' | 'primary' | 'negative';
1
+ export type TooltipSize = 'small' | 'medium' | 'large';
2
+ export type TooltipKind = 'brand' | 'primary' | 'negative';
@@ -1,5 +1,5 @@
1
- export declare type CornerRadiusSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
2
- export declare type ShadowScale = 'low' | 'medium' | 'high';
1
+ export type CornerRadiusSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
2
+ export type ShadowScale = 'low' | 'medium' | 'high';
3
3
  interface Shapes {
4
4
  border_radius: Record<CornerRadiusSize, string>;
5
5
  shadow: Record<ShadowScale, string>;
@@ -1,5 +1,5 @@
1
- declare type TypographyUsageWithSize = 'Heading_24' | 'Heading_20' | 'Heading_18' | 'Heading_17' | 'Heading_15' | 'Body_14' | 'Body_13' | 'Body_12' | 'Caption_11' | 'Caption_10';
2
- declare type TypographyWeight = 'Bold' | 'SemiBold' | 'Medium' | 'Regular';
3
- export declare type Typography = `${TypographyUsageWithSize}_${TypographyWeight}`;
1
+ type TypographyUsageWithSize = 'Heading_24' | 'Heading_20' | 'Heading_18' | 'Heading_17' | 'Heading_15' | 'Body_14' | 'Body_13' | 'Body_12' | 'Caption_11' | 'Caption_10';
2
+ type TypographyWeight = 'Bold' | 'SemiBold' | 'Medium' | 'Regular';
3
+ export type Typography = `${TypographyUsageWithSize}_${TypographyWeight}`;
4
4
  export declare const text_styles: Record<Typography, string>;
5
5
  export {};