@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.
- package/CHANGELOG.md +12 -0
- package/dist/components/badge/types.d.ts +3 -3
- package/dist/components/banner/NormalBanner.d.ts +12 -0
- package/dist/components/banner/NormalBanner.stories.d.ts +6 -0
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/banner/styles.d.ts +3 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +1 -1
- package/dist/components/button/ButtonIcon.d.ts +5 -2
- package/dist/components/button/types.d.ts +6 -6
- package/dist/components/form/FormHelperText.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/InputBase.d.ts +1 -1
- package/dist/components/input/NumericInput.d.ts +1 -1
- package/dist/components/input/types.d.ts +2 -2
- package/dist/components/menu/MenuItem.d.ts +2 -1
- package/dist/components/message/MessageManager.d.ts +4 -4
- package/dist/components/message/types.d.ts +2 -2
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/renderModal.d.ts +2 -1
- package/dist/components/notification/types.d.ts +2 -2
- package/dist/components/popover/Popover.d.ts +2 -2
- package/dist/components/provider/Provider.d.ts +2 -2
- package/dist/components/radio/RadioGroup.d.ts +2 -2
- package/dist/components/stack/HStack.d.ts +1 -1
- package/dist/components/stack/VStack.d.ts +1 -1
- package/dist/components/stack/types.d.ts +1 -1
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/text/BaseText.d.ts +2 -2
- package/dist/components/toast/types.d.ts +4 -4
- package/dist/components/tooltip/Tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +2 -2
- package/dist/foundation/shapes.d.ts +2 -2
- package/dist/foundation/typography.d.ts +3 -3
- package/dist/index.es.js +5 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/styles/buildCSSWithLength.d.ts +1 -1
- package/dist/styles/placement.d.ts +1 -1
- package/dist/styles/zIndex.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
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';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
2
|
import { IconProps } from '../icons/generated';
|
|
3
|
-
export
|
|
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
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
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
|
-
|
|
4
|
+
type FormHelperTextElement = keyof Pick<JSX.IntrinsicElements, 'div' | 'p' | 'span'>;
|
|
5
5
|
export interface FormHelperTextProps extends React.Attributes {
|
|
6
6
|
/**
|
|
7
7
|
* @default span
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputAffixProps } from './InputAffix';
|
|
3
3
|
import { InputBaseProps } from './InputBase';
|
|
4
|
-
export
|
|
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
|
|
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
|
|
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
|
|
2
|
-
export
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
export
|
|
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
|
|
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
|
|
10
|
-
export
|
|
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<
|
|
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
|
|
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
|
|
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
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
3
|
-
export
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,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
|
-
|
|
5
|
-
|
|
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
|
|
3
|
-
export
|
|
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
|
|
12
|
-
export
|
|
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
|
|
5
|
-
|
|
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
|
|
2
|
-
export
|
|
1
|
+
export type TooltipSize = 'small' | 'medium' | 'large';
|
|
2
|
+
export type TooltipKind = 'brand' | 'primary' | 'negative';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
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 {};
|