@croquiscom/pds 8.21.3 → 8.22.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 +13 -0
- package/assets/icons/DotsHorizontal.svg +5 -0
- package/assets/icons/DotsVertical.svg +5 -0
- package/dist/components/button/PopoverButton.d.ts +31 -0
- package/dist/components/button/PopoverButton.stories.d.ts +9 -0
- package/dist/components/dropdown/DropdownOptions.d.ts +33 -0
- package/dist/components/icons/generated/DotsHorizontal.d.ts +4 -0
- package/dist/components/icons/generated/DotsVertical.d.ts +4 -0
- package/dist/components/icons/generated/index.d.ts +2 -0
- package/dist/components/tabs/LineTabs.d.ts +6 -1
- package/dist/components/tabs/Tabs.stories.d.ts +1 -0
- package/dist/index.es.js +7 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @croquiscom/pds
|
|
2
2
|
|
|
3
|
+
## 8.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a1d2e89: PopoverButton 추가
|
|
8
|
+
- b7d23a1: linetabs side padding option 추가
|
|
9
|
+
|
|
10
|
+
## 8.21.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 95831e9: ColorPicker SelectedDisabled 상태 표시 변경
|
|
15
|
+
|
|
3
16
|
## 8.21.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M19 13.5C19.8284 13.5 20.5 12.8284 20.5 12C20.5 11.1716 19.8284 10.5 19 10.5C18.1716 10.5 17.5 11.1716 17.5 12C17.5 12.8284 18.1716 13.5 19 13.5Z" fill="#363644"/>
|
|
3
|
+
<path d="M13.5 12C13.5 12.8284 12.8284 13.5 12 13.5C11.1716 13.5 10.5 12.8284 10.5 12C10.5 11.1716 11.1716 10.5 12 10.5C12.8284 10.5 13.5 11.1716 13.5 12Z" fill="#363644"/>
|
|
4
|
+
<path d="M6.5 12C6.5 12.8284 5.82843 13.5 5 13.5C4.17157 13.5 3.5 12.8284 3.5 12C3.5 11.1716 4.17157 10.5 5 10.5C5.82843 10.5 6.5 11.1716 6.5 12Z" fill="#363644"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.5 19C10.5 19.8284 11.1716 20.5 12 20.5C12.8284 20.5 13.5 19.8284 13.5 19C13.5 18.1716 12.8284 17.5 12 17.5C11.1716 17.5 10.5 18.1716 10.5 19Z" fill="#363644"/>
|
|
3
|
+
<path d="M12 6.5C11.1716 6.5 10.5 5.82843 10.5 5C10.5 4.17157 11.1716 3.5 12 3.5C12.8284 3.5 13.5 4.17157 13.5 5C13.5 5.82843 12.8284 6.5 12 6.5Z" fill="#363644"/>
|
|
4
|
+
<path d="M12 13.5C11.1716 13.5 10.5 12.8284 10.5 12C10.5 11.1716 11.1716 10.5 12 10.5C12.8284 10.5 13.5 11.1716 13.5 12C13.5 12.8284 12.8284 13.5 12 13.5Z" fill="#363644"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropdownOption } from '../dropdown';
|
|
3
|
+
import { AriaFocusProps } from '../../types/common';
|
|
4
|
+
import { ButtonProps } from './Button';
|
|
5
|
+
export interface PopoverButtonProps<OptionValue> extends Omit<ButtonProps, 'size' | 'value' | 'onChange'> {
|
|
6
|
+
/** @default small */
|
|
7
|
+
size?: 'xsmall' | 'small' | 'medium';
|
|
8
|
+
/**
|
|
9
|
+
* floating 요소가 reference 영역을 넘어갈 경우 자동 위치 처리 사용 유무
|
|
10
|
+
* - 자동 위치 상/하만 적용됩니다.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
autoPlacement?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
|
|
16
|
+
* @default 1030
|
|
17
|
+
*/
|
|
18
|
+
zIndex?: number;
|
|
19
|
+
/** @default true */
|
|
20
|
+
optionsMatchRefWidth?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Popover OptionList maxHeight값
|
|
23
|
+
* @default 400
|
|
24
|
+
*/
|
|
25
|
+
maxHeight?: number;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
value?: OptionValue;
|
|
28
|
+
onChange?: (value: OptionValue) => void;
|
|
29
|
+
options: Array<DropdownOption<OptionValue>>;
|
|
30
|
+
}
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PopoverButton } from './PopoverButton';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: Meta<typeof PopoverButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof PopoverButton>;
|
|
6
|
+
export declare const Short: Story;
|
|
7
|
+
export declare const Long: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import { ExtendedRefs, FloatingContext, MiddlewareData } from '@floating-ui/react';
|
|
3
|
+
import { InputSize } from '../input/types';
|
|
4
|
+
import { AriaFocusProps } from '../../types/common';
|
|
5
|
+
import { DropdownOption } from '../dropdown';
|
|
6
|
+
export interface PopoverContentProps<OptionValue> {
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
|
|
10
|
+
* @default 1030
|
|
11
|
+
*/
|
|
12
|
+
zIndex?: number;
|
|
13
|
+
/** @default large */
|
|
14
|
+
size?: InputSize;
|
|
15
|
+
/** @default false */
|
|
16
|
+
opened: boolean;
|
|
17
|
+
options: Array<DropdownOption<OptionValue>>;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
value?: OptionValue;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
keyExtractor?: (item: DropdownOption<OptionValue>, index: number) => string | number;
|
|
22
|
+
onChange?: (value: OptionValue) => void;
|
|
23
|
+
renderLabel?: (selectedOption: DropdownOption<OptionValue>) => ReactNode;
|
|
24
|
+
focusIndex?: number | null;
|
|
25
|
+
getFloatingProps: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
26
|
+
getItemProps: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
27
|
+
context: FloatingContext;
|
|
28
|
+
floatingStyles: CSSProperties;
|
|
29
|
+
refs: ExtendedRefs<Element>;
|
|
30
|
+
hide: MiddlewareData['hide'];
|
|
31
|
+
setRefs: (node: HTMLElement | null, index: number) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const DropdownOptions: <OptionValue extends string | number>({ className, zIndex, size: sizeProp, options, opened, onClose, value: valueProp, unstableFocusVisible, keyExtractor, onChange, focusIndex, context, getFloatingProps, getItemProps, floatingStyles, refs, hide, setRefs, }: PopoverContentProps<OptionValue> & AriaFocusProps) => React.JSX.Element;
|
|
@@ -152,6 +152,8 @@ export { default as IconCrop } from './Crop';
|
|
|
152
152
|
export { default as IconDiscountTagFill } from './DiscountTagFill';
|
|
153
153
|
export { default as IconDocument } from './Document';
|
|
154
154
|
export { default as IconDocumentCheck } from './DocumentCheck';
|
|
155
|
+
export { default as IconDotsHorizontal } from './DotsHorizontal';
|
|
156
|
+
export { default as IconDotsVertical } from './DotsVertical';
|
|
155
157
|
export { default as IconEdit } from './Edit';
|
|
156
158
|
export { default as IconEmail } from './Email';
|
|
157
159
|
export { default as IconExcel } from './Excel';
|
|
@@ -20,7 +20,12 @@ export interface LineTabsProps {
|
|
|
20
20
|
* @default false
|
|
21
21
|
*/
|
|
22
22
|
dense?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* side padding on/off
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
horizontalPadding?: boolean;
|
|
23
28
|
activeTabId?: string;
|
|
24
29
|
onChange?: (id?: string) => void;
|
|
25
30
|
}
|
|
26
|
-
export declare const LineTabs: ({ className, children, dense, width, activeTabId, onChange, }: PropsWithChildren<LineTabsProps>) => React.JSX.Element;
|
|
31
|
+
export declare const LineTabs: ({ className, children, dense, horizontalPadding, width, activeTabId, onChange, }: PropsWithChildren<LineTabsProps>) => React.JSX.Element;
|