@croquiscom/pds 8.21.4 → 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 CHANGED
@@ -1,5 +1,12 @@
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
+
3
10
  ## 8.21.4
4
11
 
5
12
  ### 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;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from '.';
3
+ declare const SvgDotsHorizontal: ({ size, color, secondaryColor, ...props }: IconProps) => JSX.Element;
4
+ export default SvgDotsHorizontal;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from '.';
3
+ declare const SvgDotsVertical: ({ size, color, secondaryColor, ...props }: IconProps) => JSX.Element;
4
+ export default SvgDotsVertical;
@@ -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;
@@ -8,3 +8,4 @@ export declare const Fill: Story;
8
8
  export declare const Dense: Story;
9
9
  export declare const WithIcon: Story;
10
10
  export declare const Scroll: Story;
11
+ export declare const NoSidePadding: Story;