@ncds/ui-admin 1.6.1 → 1.6.3

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 (58) hide show
  1. package/dist/cjs/assets/scripts/comboBox.js +3 -3
  2. package/dist/cjs/assets/scripts/selectBox.js +2 -2
  3. package/dist/cjs/assets/scripts/utils/{selectbox/SelectBoxController.js → unifiedBox/UnifiedBoxController.js} +38 -38
  4. package/dist/cjs/assets/scripts/utils/{selectbox/UnifiedSelectBox.js → unifiedBox/UnifiedBoxManager.js} +42 -42
  5. package/dist/cjs/src/components/button/Button.js +0 -1
  6. package/dist/cjs/src/components/checkbox/CheckboxInput.js +0 -3
  7. package/dist/cjs/src/components/date-picker/DatePicker.js +5 -1
  8. package/dist/cjs/src/components/dot/Dot.js +1 -1
  9. package/dist/cjs/src/components/pagination/Pagination.js +1 -1
  10. package/dist/cjs/src/components/select/Select.js +0 -3
  11. package/dist/cjs/src/components/tab/HorizontalTab.js +1 -1
  12. package/dist/cjs/src/components/tab/VerticalTab.js +1 -1
  13. package/dist/cjs/src/types/side-slot.js +5 -0
  14. package/dist/esm/assets/scripts/comboBox.js +3 -3
  15. package/dist/esm/assets/scripts/selectBox.js +2 -2
  16. package/dist/esm/assets/scripts/utils/{selectbox/SelectBoxController.js → unifiedBox/UnifiedBoxController.js} +38 -38
  17. package/dist/esm/assets/scripts/utils/{selectbox/UnifiedSelectBox.js → unifiedBox/UnifiedBoxManager.js} +42 -42
  18. package/dist/esm/src/components/button/Button.js +0 -1
  19. package/dist/esm/src/components/checkbox/CheckboxInput.js +0 -3
  20. package/dist/esm/src/components/date-picker/DatePicker.js +5 -1
  21. package/dist/esm/src/components/dot/Dot.js +1 -1
  22. package/dist/esm/src/components/pagination/Pagination.js +1 -1
  23. package/dist/esm/src/components/select/Select.js +0 -3
  24. package/dist/esm/src/components/switch/Switch.js +1 -1
  25. package/dist/esm/src/components/tab/HorizontalTab.js +1 -1
  26. package/dist/esm/src/components/tab/VerticalTab.js +1 -1
  27. package/dist/esm/src/types/side-slot.js +1 -0
  28. package/dist/types/assets/scripts/comboBox.d.ts +3 -3
  29. package/dist/types/assets/scripts/modal/const/types.d.ts +1 -1
  30. package/dist/types/assets/scripts/selectBox.d.ts +1 -1
  31. package/dist/types/assets/scripts/utils/{selectbox/SelectBoxController.d.ts → unifiedBox/UnifiedBoxController.d.ts} +5 -5
  32. package/dist/types/assets/scripts/utils/{selectbox/UnifiedSelectBox.d.ts → unifiedBox/UnifiedBoxManager.d.ts} +6 -6
  33. package/dist/types/src/components/badge/BadgeGroup.d.ts +1 -1
  34. package/dist/types/src/components/button/Button.d.ts +13 -13
  35. package/dist/types/src/components/checkbox/Checkbox.d.ts +1 -2
  36. package/dist/types/src/components/checkbox/CheckboxInput.d.ts +0 -3
  37. package/dist/types/src/components/combobox/ComboBox.d.ts +3 -4
  38. package/dist/types/src/components/dot/Dot.d.ts +1 -1
  39. package/dist/types/src/components/dropdown/Dropdown.d.ts +1 -5
  40. package/dist/types/src/components/input/InputBase.d.ts +3 -3
  41. package/dist/types/src/components/input/NumberInput.d.ts +1 -1
  42. package/dist/types/src/components/modal/Modal.d.ts +2 -2
  43. package/dist/types/src/components/pagination/Pagination.d.ts +1 -1
  44. package/dist/types/src/components/progress-bar/types.d.ts +1 -1
  45. package/dist/types/src/components/radio/Radio.d.ts +1 -2
  46. package/dist/types/src/components/select/Select.d.ts +3 -7
  47. package/dist/types/src/components/selectbox/SelectBox.d.ts +3 -4
  48. package/dist/types/src/components/spinner/Spinner.d.ts +1 -1
  49. package/dist/types/src/components/tag/Tag.d.ts +1 -1
  50. package/dist/types/src/types/side-slot.d.ts +26 -0
  51. package/dist/ui-admin/assets/styles/style.css +22 -40
  52. package/package.json +1 -1
  53. /package/dist/cjs/assets/scripts/utils/{selectbox → unifiedBox}/DOMRenderer.js +0 -0
  54. /package/dist/cjs/assets/scripts/utils/{selectbox → unifiedBox}/DropdownModel.js +0 -0
  55. /package/dist/esm/assets/scripts/utils/{selectbox → unifiedBox}/DOMRenderer.js +0 -0
  56. /package/dist/esm/assets/scripts/utils/{selectbox → unifiedBox}/DropdownModel.js +0 -0
  57. /package/dist/types/assets/scripts/utils/{selectbox → unifiedBox}/DOMRenderer.d.ts +0 -0
  58. /package/dist/types/assets/scripts/utils/{selectbox → unifiedBox}/DropdownModel.d.ts +0 -0
@@ -3,10 +3,6 @@ export type AvatarTrigger = {
3
3
  type: 'avatar';
4
4
  avatar: string;
5
5
  };
6
- export type TextTrigger = {
7
- type: 'text';
8
- title: string;
9
- };
10
6
  export type ButtonTrigger = {
11
7
  type: 'button';
12
8
  text: string;
@@ -44,7 +40,7 @@ export type TextHeader = {
44
40
  };
45
41
  export type DropdownHeaderType = AvatarHeader | TextHeader;
46
42
  export type DropdownProps = {
47
- trigger: AvatarTrigger | TextTrigger | ButtonTrigger | IconTrigger | CustomTrigger;
43
+ trigger: AvatarTrigger | ButtonTrigger | IconTrigger | CustomTrigger;
48
44
  opened?: boolean;
49
45
  closeOnClickOutside?: boolean;
50
46
  closeOnClickItem?: boolean;
@@ -1,7 +1,7 @@
1
1
  import type React from 'react';
2
- import { type ElementType } from 'react';
3
2
  import { COLOR } from '../../../constant/color';
4
3
  import type { Size } from '../../../constant/size';
4
+ import type { SlotIconComponent } from '../../types/side-slot';
5
5
  interface InputSideButtonSlot {
6
6
  type: 'button';
7
7
  label: string;
@@ -14,8 +14,8 @@ interface InputSideTextSlot {
14
14
  }
15
15
  interface InputSideIconSlot {
16
16
  type: 'icon';
17
- icon: ElementType;
18
- size?: number | string;
17
+ icon: SlotIconComponent;
18
+ size?: number;
19
19
  color?: keyof typeof COLOR;
20
20
  className?: string;
21
21
  }
@@ -3,7 +3,7 @@ type NumberInputProps = InputBaseProps & {
3
3
  minValue?: number;
4
4
  maxValue?: number;
5
5
  step?: number;
6
- stepperPosition?: 'leading' | 'trailing';
6
+ stepperPosition: 'leading' | 'trailing';
7
7
  };
8
8
  export declare const NumberInput: import("react").ForwardRefExoticComponent<NumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
9
9
  export {};
@@ -3,7 +3,7 @@ import type { SlotIconComponent } from '../../types/side-slot';
3
3
  import { FeaturedIconColor, FeaturedIconTheme } from '../featured-icon';
4
4
  export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
5
5
  export type ModalHeaderAlign = 'left' | 'center' | 'horizontal';
6
- export type ModalAlign = 'center' | 'right' | 'stretch';
6
+ export type ModalActionsAlign = 'left' | 'center' | 'right' | 'stretch';
7
7
  export type ModalActionsLayout = 'vertical' | 'horizontal' | 'checkbox';
8
8
  export type ModalProps = {
9
9
  isOpen: boolean;
@@ -72,7 +72,7 @@ export type ModalActionsProps = {
72
72
  children: ReactNode;
73
73
  layout?: ModalActionsLayout;
74
74
  showDivider?: boolean;
75
- align?: 'left' | 'center' | 'right' | 'stretch';
75
+ align?: ModalActionsAlign;
76
76
  checkboxContent?: ReactNode;
77
77
  };
78
78
  //# sourceMappingURL=Modal.d.ts.map
@@ -1,4 +1,4 @@
1
- type PaginationProps = {
1
+ type PaginationProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> & {
2
2
  className?: string;
3
3
  totalCount: number;
4
4
  itemCountPerPage?: number;
@@ -1,7 +1,7 @@
1
1
  export type ProgressLabel = 'right' | 'bottom' | 'top-float' | 'bottom-float';
2
2
  export interface ProgressSegment {
3
3
  value: number;
4
- color?: string;
4
+ color?: 'red' | 'green' | 'blue' | 'pink' | 'orange' | 'violet' | 'gray';
5
5
  }
6
6
  export interface ProcessedSegment extends ProgressSegment {
7
7
  width: number;
@@ -1,9 +1,8 @@
1
- import { ChangeEvent, ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { RadioInputProps } from './RadioInput';
3
3
  export interface RadioProps extends Omit<RadioInputProps, 'type'> {
4
4
  text?: ReactNode;
5
5
  supportText?: string;
6
- onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
7
6
  }
8
7
  export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
9
8
  //# sourceMappingURL=Radio.d.ts.map
@@ -1,9 +1,8 @@
1
1
  import { Size } from '@ncds/ui/constant/size';
2
- import { ComponentPropsWithRef, PropsWithChildren } from 'react';
2
+ import { ComponentPropsWithRef, ReactNode } from 'react';
3
3
  import { UseFormRegisterReturn } from 'react-hook-form';
4
4
  import { OptionType } from '../../types/dropdown';
5
- type BaseSelectProps = Omit<ComponentPropsWithRef<'select'>, 'size'>;
6
- export interface SelectProps extends PropsWithChildren<BaseSelectProps> {
5
+ export interface SelectProps extends Omit<ComponentPropsWithRef<'select'>, 'size'> {
7
6
  placeholder?: string;
8
7
  disabledPlaceholder?: boolean;
9
8
  hintText?: string;
@@ -12,10 +11,7 @@ export interface SelectProps extends PropsWithChildren<BaseSelectProps> {
12
11
  optionItems?: OptionType[];
13
12
  register?: UseFormRegisterReturn;
14
13
  type?: 'default' | 'simple';
14
+ children?: ReactNode;
15
15
  }
16
- /**
17
- * 현재 icon 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
18
- */
19
16
  export declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
20
- export {};
21
17
  //# sourceMappingURL=Select.d.ts.map
@@ -1,10 +1,10 @@
1
- import { type ComponentPropsWithRef, type PropsWithChildren } from 'react';
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import type { UseFormRegisterReturn } from 'react-hook-form';
3
3
  import type { Size } from '../../../constant/size';
4
4
  import type { OptionChangeHandler, OptionType, OptionValue } from '../../types/dropdown';
5
5
  export declare const DEFAULT_MAX_HEIGHT = 275;
6
- type BaseSelectBoxProps = Omit<ComponentPropsWithRef<'div'>, 'size' | 'onChange'>;
7
- export type SelectBoxProps = PropsWithChildren<BaseSelectBoxProps> & {
6
+ export type SelectBoxProps = Omit<ComponentPropsWithRef<'div'>, 'size' | 'onChange'> & {
7
+ children?: ReactNode;
8
8
  placeholder?: string;
9
9
  disabledPlaceholder?: boolean;
10
10
  hintText?: string;
@@ -23,5 +23,4 @@ export type SelectBoxProps = PropsWithChildren<BaseSelectBoxProps> & {
23
23
  align?: 'left' | 'right';
24
24
  };
25
25
  export declare const SelectBox: import("react").ForwardRefExoticComponent<Omit<SelectBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
26
- export {};
27
26
  //# sourceMappingURL=SelectBox.d.ts.map
@@ -2,7 +2,7 @@ import { ElementType, ReactNode } from 'react';
2
2
  interface SpinnerProps {
3
3
  as?: ElementType;
4
4
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
- children: ReactNode;
5
+ children?: ReactNode;
6
6
  backdrop?: boolean;
7
7
  }
8
8
  export declare const Spinner: ({ as, size, children, backdrop }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,7 @@ interface TagProps {
11
11
  onButtonClick?: MouseEventHandler<HTMLButtonElement>;
12
12
  maxLength?: number;
13
13
  }
14
- export type CalculatedPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
14
+ export type CalculatedPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
15
15
  export declare const Tag: ({ size, icon, text, count, close, onButtonClick, maxLength }: TagProps) => import("react/jsx-runtime").JSX.Element;
16
16
  export {};
17
17
  //# sourceMappingURL=Tag.d.ts.map
@@ -0,0 +1,26 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { COLOR } from '../../constant/color';
3
+ import type { DotProps } from '../components';
4
+ export type SlotIconComponent = ComponentType<{
5
+ height?: number;
6
+ width?: number;
7
+ color?: string;
8
+ className?: string;
9
+ }>;
10
+ export type IconSlotType = {
11
+ type: 'icon';
12
+ icon: SlotIconComponent;
13
+ color?: keyof typeof COLOR;
14
+ size?: number;
15
+ };
16
+ export type DotSlotType = {
17
+ type: 'dot';
18
+ color: DotProps['color'];
19
+ size: DotProps['size'];
20
+ };
21
+ export type CustomSlotType = {
22
+ type: 'custom';
23
+ children: ReactNode;
24
+ };
25
+ export type SideSlotType = IconSlotType | DotSlotType | CustomSlotType;
26
+ //# sourceMappingURL=side-slot.d.ts.map
@@ -1522,7 +1522,7 @@ button {
1522
1522
  color: var(--gray-300);
1523
1523
  background-color: inherit;
1524
1524
  }
1525
- .ncua-input.is-disabled .ncua-input__destructive-ico {
1525
+ .ncua-input.is-disabled .ncua-input__destructive-icon {
1526
1526
  display: none;
1527
1527
  }
1528
1528
  .ncua-input.is-disabled .ncua-input__button {
@@ -2560,6 +2560,9 @@ button {
2560
2560
  .ncua-radio-input.destructive :where(input) {
2561
2561
  border-color: var(--primary-red-600);
2562
2562
  }
2563
+ .ncua-radio-input.destructive :where(input):not(:disabled):hover {
2564
+ border-color: var(--primary-red-600);
2565
+ }
2563
2566
  .ncua-radio-input.destructive :where(input):focus {
2564
2567
  border-color: var(--primary-red-600);
2565
2568
  box-shadow: var(--shadow-xs-focused-4px-error-100);
@@ -2665,36 +2668,6 @@ button {
2665
2668
  z-index: 1000;
2666
2669
  pointer-events: none;
2667
2670
  }
2668
- .ncua-tag__tooltip:not([class*="--top-"]):not([class*="--bottom-"]):not([class*="--left"]):not([class*="--right"]) {
2669
- bottom: 100%;
2670
- left: 50%;
2671
- transform: translateX(-50%);
2672
- margin-bottom: var(--spacing-md);
2673
- }
2674
- .ncua-tag__tooltip--top {
2675
- bottom: 100%;
2676
- left: 50%;
2677
- transform: translateX(-50%);
2678
- margin-bottom: var(--spacing-md);
2679
- }
2680
- .ncua-tag__tooltip--bottom {
2681
- top: 100%;
2682
- left: 50%;
2683
- transform: translateX(-50%);
2684
- margin-top: var(--spacing-md);
2685
- }
2686
- .ncua-tag__tooltip--left {
2687
- right: 100%;
2688
- top: 50%;
2689
- transform: translateY(-50%);
2690
- margin-right: var(--spacing-md);
2691
- }
2692
- .ncua-tag__tooltip--right {
2693
- left: 100%;
2694
- top: 50%;
2695
- transform: translateY(-50%);
2696
- margin-left: var(--spacing-md);
2697
- }
2698
2671
  .ncua-tag__tooltip--top-left {
2699
2672
  bottom: 100%;
2700
2673
  right: 0;
@@ -2715,10 +2688,6 @@ button {
2715
2688
  left: 0;
2716
2689
  margin-top: var(--spacing-md);
2717
2690
  }
2718
- .ncua-tag__tooltip--measuring {
2719
- opacity: 0;
2720
- visibility: hidden;
2721
- }
2722
2691
  .ncua-tag__tooltip-content {
2723
2692
  display: block;
2724
2693
  padding: var(--spacing-md) var(--spacing-lg);
@@ -3821,47 +3790,57 @@ button {
3821
3790
  font-size: 11px;
3822
3791
  }
3823
3792
  .ncua-spinner--xs .ncua-spinner__content::before {
3824
- margin-block-end: 12px;
3825
3793
  width: 16px;
3826
3794
  height: 16px;
3827
3795
  border-width: 2px;
3828
3796
  }
3797
+ .ncua-spinner--xs .ncua-spinner__content:has(*)::before {
3798
+ margin-block-end: 12px;
3799
+ }
3829
3800
  .ncua-spinner--sm {
3830
3801
  font-size: 14px;
3831
3802
  }
3832
3803
  .ncua-spinner--sm .ncua-spinner__content::before {
3833
- margin-block-end: 16px;
3834
3804
  width: 32px;
3835
3805
  height: 32px;
3836
3806
  border-width: 4px;
3837
3807
  }
3808
+ .ncua-spinner--sm .ncua-spinner__content:has(*)::before {
3809
+ margin-block-end: 16px;
3810
+ }
3838
3811
  .ncua-spinner--md {
3839
3812
  font-size: 14px;
3840
3813
  }
3841
3814
  .ncua-spinner--md .ncua-spinner__content::before {
3842
- margin-block-end: 16px;
3843
3815
  width: 48px;
3844
3816
  height: 48px;
3845
3817
  border-width: 6px;
3846
3818
  }
3819
+ .ncua-spinner--md .ncua-spinner__content:has(*)::before {
3820
+ margin-block-end: 16px;
3821
+ }
3847
3822
  .ncua-spinner--lg {
3848
3823
  font-size: 18px;
3849
3824
  }
3850
3825
  .ncua-spinner--lg .ncua-spinner__content::before {
3851
- margin-block-end: 16px;
3852
3826
  width: 56px;
3853
3827
  height: 56px;
3854
3828
  border-width: 6px;
3855
3829
  }
3830
+ .ncua-spinner--lg .ncua-spinner__content:has(*)::before {
3831
+ margin-block-end: 16px;
3832
+ }
3856
3833
  .ncua-spinner--xl {
3857
3834
  font-size: 18px;
3858
3835
  }
3859
3836
  .ncua-spinner--xl .ncua-spinner__content::before {
3860
- margin-block-end: 20px;
3861
3837
  width: 64px;
3862
3838
  height: 64px;
3863
3839
  border-width: 8px;
3864
3840
  }
3841
+ .ncua-spinner--xl .ncua-spinner__content:has(*)::before {
3842
+ margin-block-end: 20px;
3843
+ }
3865
3844
  .ncua-spinner--backdrop {
3866
3845
  content: "";
3867
3846
  position: fixed;
@@ -3991,6 +3970,9 @@ button {
3991
3970
  .ncua-toggle--disabled .ncua-toggle__switch {
3992
3971
  background-color: var(--gray-100);
3993
3972
  }
3973
+ .ncua-toggle--disabled .ncua-toggle__input:checked + .ncua-toggle__switch {
3974
+ background-color: var(--gray-100);
3975
+ }
3994
3976
  .ncua-toggle--disabled .ncua-toggle__slider {
3995
3977
  background-color: var(--gray-50);
3996
3978
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ncds/ui-admin",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "nhn-commerce의 어드민 디자인 시스템입니다.",
5
5
  "scripts": {
6
6
  "barrel": "node barrel.js",