@ncds/ui-admin 1.5.4 → 1.6.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 (77) hide show
  1. package/dist/cjs/src/components/badge/utils.js +2 -4
  2. package/dist/cjs/src/components/breadcrumb/BreadCrumb.js +2 -3
  3. package/dist/cjs/src/components/button/Button.js +4 -5
  4. package/dist/cjs/src/components/button/ButtonCloseX.js +3 -3
  5. package/dist/cjs/src/components/button/ButtonGroup.js +2 -6
  6. package/dist/cjs/src/components/carousel/CarouselArrow.js +5 -5
  7. package/dist/cjs/src/components/combobox/ComboBox.js +3 -2
  8. package/dist/cjs/src/components/date-picker/CustomInput.js +5 -4
  9. package/dist/cjs/src/components/date-picker/DatePicker.js +3 -2
  10. package/dist/cjs/src/components/dropdown/Dropdown.js +14 -15
  11. package/dist/cjs/src/components/featured-icon/FeaturedIcon.js +3 -5
  12. package/dist/cjs/src/components/file-input/FileInput.js +6 -7
  13. package/dist/cjs/src/components/image-file-input/ImageFileInput.js +4 -5
  14. package/dist/cjs/src/components/image-file-input/components/ImagePreview.js +2 -1
  15. package/dist/cjs/src/components/input/InputBase.js +24 -24
  16. package/dist/cjs/src/components/input/PasswordInput.js +1 -1
  17. package/dist/cjs/src/components/modal/Modal.js +7 -5
  18. package/dist/cjs/src/components/notification/FloatingNotification.js +8 -7
  19. package/dist/cjs/src/components/notification/FullWidthNotification.js +17 -17
  20. package/dist/cjs/src/components/notification/MessageNotification.js +11 -12
  21. package/dist/cjs/src/components/pagination/NavButton.js +12 -11
  22. package/dist/cjs/src/components/select-dropdown/SelectDropdown.js +14 -4
  23. package/dist/cjs/src/components/selectbox/SelectBox.js +62 -39
  24. package/dist/cjs/src/components/tab/TabButton.js +2 -3
  25. package/dist/cjs/src/components/tag/Tag.js +4 -5
  26. package/dist/esm/src/components/badge/utils.js +1 -2
  27. package/dist/esm/src/components/breadcrumb/BreadCrumb.js +2 -3
  28. package/dist/esm/src/components/button/Button.js +3 -4
  29. package/dist/esm/src/components/button/ButtonCloseX.js +3 -3
  30. package/dist/esm/src/components/button/ButtonGroup.js +2 -6
  31. package/dist/esm/src/components/carousel/CarouselArrow.js +5 -5
  32. package/dist/esm/src/components/combobox/ComboBox.js +3 -2
  33. package/dist/esm/src/components/date-picker/CustomInput.js +5 -3
  34. package/dist/esm/src/components/date-picker/DatePicker.js +3 -2
  35. package/dist/esm/src/components/dropdown/Dropdown.js +14 -14
  36. package/dist/esm/src/components/featured-icon/FeaturedIcon.js +2 -4
  37. package/dist/esm/src/components/file-input/FileInput.js +6 -7
  38. package/dist/esm/src/components/image-file-input/ImageFileInput.js +4 -5
  39. package/dist/esm/src/components/image-file-input/components/ImagePreview.js +2 -1
  40. package/dist/esm/src/components/input/InputBase.js +24 -24
  41. package/dist/esm/src/components/input/PasswordInput.js +2 -2
  42. package/dist/esm/src/components/modal/Modal.js +7 -5
  43. package/dist/esm/src/components/notification/FloatingNotification.js +8 -7
  44. package/dist/esm/src/components/notification/FullWidthNotification.js +17 -17
  45. package/dist/esm/src/components/notification/MessageNotification.js +11 -12
  46. package/dist/esm/src/components/pagination/NavButton.js +11 -10
  47. package/dist/esm/src/components/select-dropdown/SelectDropdown.js +14 -4
  48. package/dist/esm/src/components/selectbox/SelectBox.js +62 -39
  49. package/dist/esm/src/components/tab/TabButton.js +2 -3
  50. package/dist/esm/src/components/tag/Tag.js +5 -6
  51. package/dist/types/src/components/badge/BadgeGroup.d.ts +4 -4
  52. package/dist/types/src/components/badge/utils.d.ts +2 -2
  53. package/dist/types/src/components/button/Button.d.ts +18 -20
  54. package/dist/types/src/components/button/ButtonCloseX.d.ts +1 -1
  55. package/dist/types/src/components/button/ButtonGroup.d.ts +6 -6
  56. package/dist/types/src/components/combobox/ComboBox.d.ts +4 -4
  57. package/dist/types/src/components/date-picker/CustomInput.d.ts +1 -2
  58. package/dist/types/src/components/date-picker/DatePicker.d.ts +1 -0
  59. package/dist/types/src/components/dot/Dot.d.ts +1 -1
  60. package/dist/types/src/components/dropdown/Dropdown.d.ts +4 -3
  61. package/dist/types/src/components/featured-icon/FeaturedIcon.d.ts +2 -2
  62. package/dist/types/src/components/file-input/FileInput.d.ts +1 -1
  63. package/dist/types/src/components/image-file-input/ImageFileInput.d.ts +2 -2
  64. package/dist/types/src/components/index.d.ts +1 -0
  65. package/dist/types/src/components/input/InputBase.d.ts +4 -4
  66. package/dist/types/src/components/modal/Modal.d.ts +6 -4
  67. package/dist/types/src/components/notification/MessageNotification.d.ts +3 -3
  68. package/dist/types/src/components/notification/Notification.d.ts +3 -3
  69. package/dist/types/src/components/pagination/NavButton.d.ts +5 -4
  70. package/dist/types/src/components/select-dropdown/SelectDropdown.d.ts +1 -0
  71. package/dist/types/src/components/selectbox/SelectBox.d.ts +6 -4
  72. package/dist/types/src/components/tab/TabButton.d.ts +3 -3
  73. package/dist/types/src/components/tag/Tag.d.ts +3 -3
  74. package/dist/types/src/types/dropdown/option.d.ts +4 -0
  75. package/dist/types/src/types/index.d.ts +1 -0
  76. package/dist/ui-admin/assets/styles/style.css +35 -5
  77. package/package.json +1 -1
@@ -26,8 +26,8 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
26
26
  return to.concat(ar || Array.prototype.slice.call(from));
27
27
  };
28
28
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
29
- import Icon from '@ncds/ui-admin-icon/dynamic';
30
- import { COLOR } from '@ncds/ui-admin/constant/color';
29
+ import { ChevronDown } from '@ncds/ui-admin-icon';
30
+ import { COLOR } from '../../../constant/color';
31
31
  import classNames from 'classnames';
32
32
  import { forwardRef, useCallback, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
33
33
  import { useDropdown, useScrollLock } from '../../hooks/dropdown';
@@ -46,29 +46,33 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
46
46
  size = _d === void 0 ? 'xs' : _d,
47
47
  _e = _a.type,
48
48
  type = _e === void 0 ? 'default' : _e,
49
- _f = _a.destructive,
50
- destructive = _f === void 0 ? false : _f,
49
+ _f = _a.autoWidth,
50
+ autoWidth = _f === void 0 ? true : _f,
51
+ _g = _a.destructive,
52
+ destructive = _g === void 0 ? false : _g,
51
53
  value = _a.value,
52
- _g = _a.optionItems,
53
- optionItems = _g === void 0 ? [] : _g,
54
- _h = _a.disabled,
55
- disabled = _h === void 0 ? false : _h,
56
- _j = _a.maxHeight,
57
- maxHeight = _j === void 0 ? DEFAULT_MAX_HEIGHT : _j,
58
- _k = _a.multiple,
59
- multiple = _k === void 0 ? false : _k,
54
+ _h = _a.optionItems,
55
+ optionItems = _h === void 0 ? [] : _h,
56
+ _j = _a.disabled,
57
+ disabled = _j === void 0 ? false : _j,
58
+ _k = _a.maxHeight,
59
+ maxHeight = _k === void 0 ? DEFAULT_MAX_HEIGHT : _k,
60
+ _l = _a.multiple,
61
+ multiple = _l === void 0 ? false : _l,
62
+ _m = _a.align,
63
+ align = _m === void 0 ? 'left' : _m,
60
64
  id = _a.id,
61
65
  className = _a.className,
62
66
  children = _a.children,
63
67
  register = _a.register,
64
68
  onChange = _a.onChange,
65
69
  onEdit = _a.onEdit,
66
- props = __rest(_a, ["placeholder", "disabledPlaceholder", "hintText", "size", "type", "destructive", "value", "optionItems", "disabled", "maxHeight", "multiple", "id", "className", "children", "register", "onChange", "onEdit"]);
70
+ props = __rest(_a, ["placeholder", "disabledPlaceholder", "hintText", "size", "type", "autoWidth", "destructive", "value", "optionItems", "disabled", "maxHeight", "multiple", "align", "id", "className", "children", "register", "onChange", "onEdit"]);
67
71
  var internalRef = useRef(null);
68
72
  var dropdownRef = useRef(null);
69
- var _l = useState([]),
70
- selectedTags = _l[0],
71
- setSelectedTags = _l[1];
73
+ var _o = useState([]),
74
+ selectedTags = _o[0],
75
+ setSelectedTags = _o[1];
72
76
  var selectedOption = useMemo(function () {
73
77
  if (multiple) return null;
74
78
  return optionItems.find(function (option) {
@@ -79,7 +83,7 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
79
83
  if (multiple) {
80
84
  return placeholder;
81
85
  }
82
- return selectedOption ? selectedOption.label : placeholder;
86
+ return selectedOption ? selectedOption : placeholder;
83
87
  }, [multiple, selectedOption, placeholder]);
84
88
  var handleOptionSelect = function (option) {
85
89
  if (disabled) return;
@@ -107,7 +111,7 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
107
111
  });
108
112
  }
109
113
  };
110
- var _m = useDropdown({
114
+ var _p = useDropdown({
111
115
  triggerRef: internalRef,
112
116
  dropdownRef: dropdownRef,
113
117
  maxHeight: maxHeight,
@@ -117,16 +121,16 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
117
121
  multiple: multiple,
118
122
  onSelect: handleOptionSelect
119
123
  }),
120
- isOpen = _m.isOpen,
121
- dropdownDirection = _m.direction,
122
- focusedIndex = _m.focusedIndex,
123
- toggleDropdown = _m.toggleDropdown,
124
- closeDropdown = _m.closeDropdown,
125
- handleKeyDown = _m.handleKeyDown,
126
- handleDropdownSelect = _m.handleOptionSelect,
127
- handleMouseMove = _m.handleMouseMove,
128
- isKeyboardNavigation = _m.isKeyboardNavigation,
129
- setFocusedIndex = _m.setFocusedIndex;
124
+ isOpen = _p.isOpen,
125
+ dropdownDirection = _p.direction,
126
+ focusedIndex = _p.focusedIndex,
127
+ toggleDropdown = _p.toggleDropdown,
128
+ closeDropdown = _p.closeDropdown,
129
+ handleKeyDown = _p.handleKeyDown,
130
+ handleDropdownSelect = _p.handleOptionSelect,
131
+ handleMouseMove = _p.handleMouseMove,
132
+ isKeyboardNavigation = _p.isKeyboardNavigation,
133
+ setFocusedIndex = _p.setFocusedIndex;
130
134
  var activeDescendantId = useMemo(function () {
131
135
  if (!isOpen || focusedIndex < 0 || focusedIndex >= optionItems.length) {
132
136
  return undefined;
@@ -140,11 +144,11 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
140
144
  }, [handleMouseMove, setFocusedIndex]);
141
145
  // Multiple select 관련 로직
142
146
  var currentSelectedValues = multiple && Array.isArray(value) ? value : [];
143
- var _o = useMultiSelect(currentSelectedValues, optionItems),
144
- selectAllButtonText = _o.buttonText,
145
- toggleSelectAll = _o.toggleSelectAll,
146
- getSelectedTagsData = _o.getSelectedTagsData,
147
- removeTag = _o.removeTag;
147
+ var _q = useMultiSelect(currentSelectedValues, optionItems),
148
+ selectAllButtonText = _q.buttonText,
149
+ toggleSelectAll = _q.toggleSelectAll,
150
+ getSelectedTagsData = _q.getSelectedTagsData,
151
+ removeTag = _q.removeTag;
148
152
  var handleSelectAll = function () {
149
153
  if (!multiple || !onChange) return;
150
154
  var newSelectedValues = toggleSelectAll();
@@ -174,11 +178,11 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
174
178
  };
175
179
  useScrollLock(isOpen, dropdownRef);
176
180
  useLayoutEffect(function () {
177
- if (isOpen && dropdownRef.current && internalRef.current) {
181
+ if (autoWidth && isOpen && dropdownRef.current && internalRef.current) {
178
182
  var dropdownWidth = dropdownRef.current.offsetWidth;
179
183
  internalRef.current.style.width = "".concat(dropdownWidth, "px");
180
184
  }
181
- }, [isOpen, optionItems]);
185
+ }, [autoWidth, isOpen, optionItems]);
182
186
  useImperativeHandle(ref, function () {
183
187
  return internalRef.current;
184
188
  }, []);
@@ -209,12 +213,30 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
209
213
  children: [_jsxs("div", __assign({
210
214
  className: "ncua-selectbox__content-inner"
211
215
  }, {
212
- children: [_jsx("span", __assign({
216
+ children: [_jsx("div", __assign({
213
217
  className: "ncua-selectbox__value"
214
218
  }, {
215
- children: displayValue
216
- })), _jsx(Icon, {
217
- name: "chevron-down",
219
+ children: typeof displayValue === 'string' ? _jsx("span", __assign({
220
+ className: "ncua-selectbox__value-text"
221
+ }, {
222
+ children: displayValue
223
+ })) : _jsxs("div", __assign({
224
+ className: "ncua-selectbox__value-container"
225
+ }, {
226
+ children: [displayValue.icon && _jsx("span", __assign({
227
+ className: "ncua-selectbox__value-icon"
228
+ }, {
229
+ children: _jsx(displayValue.icon, {
230
+ width: 16,
231
+ height: 16
232
+ })
233
+ })), _jsx("span", __assign({
234
+ className: "ncua-selectbox__value-text"
235
+ }, {
236
+ children: displayValue.label
237
+ }))]
238
+ }))
239
+ })), _jsx(ChevronDown, {
218
240
  width: size === 'xs' ? 14 : 16,
219
241
  height: size === 'xs' ? 14 : 16,
220
242
  color: disabled ? COLOR.gray300 : COLOR.gray500,
@@ -238,6 +260,7 @@ export var SelectBox = /*#__PURE__*/forwardRef(function (_a, ref) {
238
260
  componentType: "selectbox",
239
261
  isKeyboardNavigation: isKeyboardNavigation,
240
262
  activeDescendantId: activeDescendantId,
263
+ align: align,
241
264
  onOptionSelect: handleDropdownSelect,
242
265
  onMouseMove: handleMouseMove,
243
266
  onOptionHover: handleOptionHover,
@@ -17,9 +17,9 @@ var __rest = this && this.__rest || function (s, e) {
17
17
  return t;
18
18
  };
19
19
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
20
+ import { XClose } from '@ncds/ui-admin-icon';
20
21
  import classNames from 'classnames';
21
22
  import { Badge } from '../badge/Badge';
22
- import Icon from '@ncds/ui-admin-icon/dynamic';
23
23
  export var TabButton = function (_a) {
24
24
  var id = _a.id,
25
25
  label = _a.label,
@@ -75,8 +75,7 @@ export var TabButton = function (_a) {
75
75
  return onClose === null || onClose === void 0 ? void 0 : onClose(id !== null && id !== void 0 ? id : '');
76
76
  }
77
77
  }, {
78
- children: _jsx(Icon, {
79
- name: "x-close",
78
+ children: _jsx(XClose, {
80
79
  width: 14,
81
80
  height: 14
82
81
  })
@@ -9,9 +9,9 @@ var __assign = this && this.__assign || function () {
9
9
  return __assign.apply(this, arguments);
10
10
  };
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- import Icon from '@ncds/ui-admin-icon/dynamic';
12
+ import { XClose } from '@ncds/ui-admin-icon';
13
13
  import classNames from 'classnames';
14
- import { useState, useCallback, useRef } from 'react';
14
+ import { useCallback, useRef, useState } from 'react';
15
15
  import { COLOR } from '../../../constant/color';
16
16
  import { Dot } from '../dot';
17
17
  var MARGIN = 10;
@@ -103,8 +103,8 @@ export var Tag = function (_a) {
103
103
  var sideSlotRender = function (slot) {
104
104
  var _a;
105
105
  if (slot.type === 'icon') {
106
- return _jsx(Icon, {
107
- name: slot.icon,
106
+ var SlotIcon = slot.icon;
107
+ return _jsx(SlotIcon, {
108
108
  width: iconSize[size],
109
109
  height: iconSize[size],
110
110
  color: slot.color
@@ -139,8 +139,7 @@ export var Tag = function (_a) {
139
139
  className: "ncua-tag__close",
140
140
  onClick: onButtonClick
141
141
  }, {
142
- children: _jsx(Icon, {
143
- name: "x-close",
142
+ children: _jsx(XClose, {
144
143
  color: COLOR.gray300,
145
144
  width: iconSize[size],
146
145
  height: iconSize[size]
@@ -1,7 +1,7 @@
1
- import { ColorTone } from '@ncds/ui-admin/constant/color';
2
- import { BadgeProps } from '.';
3
- import { Size } from '../../../constant/size';
4
- import { SideSlotType } from '../../types/side-slot';
1
+ import type { ColorTone } from '../../../constant/color';
2
+ import type { Size } from '../../../constant/size';
3
+ import type { SideSlotType } from '../../types/side-slot';
4
+ import { type BadgeProps } from '.';
5
5
  export type BadgeGroupSize = Extract<Size, 'xs' | 'sm'>;
6
6
  export type BadgeGroupColor = Extract<ColorTone, 'neutral' | 'error' | 'warning' | 'success'>;
7
7
  export type BadgeGroupProps = Omit<BadgeProps, 'type' | 'size' | 'color'> & {
@@ -1,7 +1,7 @@
1
- import { SideSlotType } from '../../types/side-slot';
1
+ import type { SideSlotType } from '../../types/side-slot';
2
2
  export type SideSlotRenderProps = {
3
3
  slot: SideSlotType;
4
4
  defaultIconSize: number;
5
5
  };
6
- export declare const sideSlotRender: ({ slot, defaultIconSize }: SideSlotRenderProps) => any;
6
+ export declare const sideSlotRender: ({ slot, defaultIconSize }: SideSlotRenderProps) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
7
7
  //# sourceMappingURL=utils.d.ts.map
@@ -1,11 +1,9 @@
1
- import { ComponentProps, ReactNode } from 'react';
2
- import { Size } from '../../../constant/size';
3
- import { SideSlotType } from '../../types/side-slot';
4
- import { DotProps } from '../dot';
5
- export type ButtonTheme = 'primary' | 'secondary' | 'secondary-gray' | 'tertiary-gray' | 'tertiary' | 'text' | 'text-gray' | 'text-red' | 'destructive';
6
- export type ButtonSize = Extract<Size, 'xxs' | 'xs' | 'sm' | 'md'>;
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
+ import type { Size } from '../../../constant/size';
3
+ import type { SideSlotType } from '../../types/side-slot';
4
+ import { type DotProps } from '../dot';
7
5
  type CommonButtonProps<T extends keyof HTMLElementTagNameMap> = Omit<ComponentProps<T>, 'ref'> & {
8
- label: string;
6
+ label: ReactNode;
9
7
  className?: string;
10
8
  hierarchy?: ButtonTheme;
11
9
  disabled?: boolean;
@@ -16,21 +14,21 @@ type CommonButtonProps<T extends keyof HTMLElementTagNameMap> = Omit<ComponentPr
16
14
  children?: ReactNode;
17
15
  underline?: boolean;
18
16
  };
19
- export type ButtonProps = CommonButtonProps<'button'>;
17
+ type ButtonElementProps = CommonButtonProps<Exclude<keyof HTMLElementTagNameMap, 'a'>> & {
18
+ as?: Exclude<keyof HTMLElementTagNameMap, 'a'>;
19
+ href?: never;
20
+ };
21
+ type AnchorElementProps = CommonButtonProps<'a'> & {
22
+ as: 'a';
23
+ href: string;
24
+ target?: HTMLAnchorElement['target'];
25
+ };
26
+ export type ButtonProps = ButtonElementProps | AnchorElementProps;
27
+ export type ButtonTheme = 'primary' | 'secondary' | 'secondary-gray' | 'tertiary-gray' | 'tertiary' | 'text' | 'text-gray' | 'text-red' | 'destructive';
28
+ export type ButtonSize = Extract<Size, 'xxs' | 'xs' | 'sm' | 'md'>;
20
29
  export declare const svgSize: Record<ButtonSize, number>;
21
30
  export declare const iconOnlySvgSize: Record<ButtonSize, number>;
22
31
  export declare const dotSize: Record<ButtonSize, DotProps['size']>;
23
- export declare const Button: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
24
- label: string;
25
- className?: string | undefined;
26
- hierarchy?: ButtonTheme | undefined;
27
- disabled?: boolean | undefined;
28
- leadingIcon?: SideSlotType | undefined;
29
- trailingIcon?: SideSlotType | undefined;
30
- onlyIcon?: boolean | undefined;
31
- size?: ButtonSize | undefined;
32
- children?: ReactNode;
33
- underline?: boolean | undefined;
34
- } & import("react").RefAttributes<HTMLButtonElement>>;
32
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
35
33
  export {};
36
34
  //# sourceMappingURL=Button.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Size } from '../../../constant/size';
1
+ import type { Size } from '../../../constant/size';
2
2
  export type ButtonCloseXProps = {
3
3
  size: Extract<Size, 'xs' | 'sm' | 'md' | 'lg'>;
4
4
  theme?: 'dark' | 'light';
@@ -1,6 +1,6 @@
1
- import React, { ComponentProps } from 'react';
2
- import { Size } from '../../../constant/size';
3
- import { SideSlotType } from '../../types/side-slot';
1
+ import React, { type ComponentProps } from 'react';
2
+ import type { Size } from '../../../constant/size';
3
+ import type { SideSlotType } from '../../types/side-slot';
4
4
  export type ButtonGroupSize = Extract<Size, 'xxs' | 'xs' | 'sm' | 'md'>;
5
5
  interface SideCommon {
6
6
  position?: 'leading' | 'trailing';
@@ -15,9 +15,9 @@ interface ButtonGroupItemCommonProps {
15
15
  disabled?: boolean;
16
16
  isCurrent?: boolean;
17
17
  }
18
- interface ButtonGroupItemProps extends ButtonGroupItemCommonProps, ComponentProps<'button'> {
18
+ export interface ButtonGroupItemProps extends ButtonGroupItemCommonProps, ComponentProps<'button'> {
19
19
  }
20
- interface ButtonGroupProps {
20
+ export interface ButtonGroupProps {
21
21
  className?: string;
22
22
  size?: ButtonGroupSize;
23
23
  children: React.ReactNode;
@@ -107,7 +107,7 @@ export declare const ButtonGroup: {
107
107
  "aria-description"?: string | undefined;
108
108
  "aria-details"?: string | undefined;
109
109
  "aria-disabled"?: (boolean | "true" | "false") | undefined;
110
- "aria-dropeffect"?: "none" | "link" | "move" | "copy" | "execute" | "popup" | undefined;
110
+ "aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
111
111
  "aria-errormessage"?: string | undefined;
112
112
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
113
113
  "aria-flowto"?: string | undefined;
@@ -1,7 +1,7 @@
1
- import { Size } from '@ncds/ui/constant/size';
2
- import { ComponentPropsWithRef, PropsWithChildren } from 'react';
3
- import { UseFormRegisterReturn } from 'react-hook-form';
4
- import { OptionChangeHandler, OptionType, OptionValue } from '../../types/dropdown';
1
+ import type { Size } from '@ncds/ui/constant/size';
2
+ import { type ComponentPropsWithRef, type PropsWithChildren } from 'react';
3
+ import type { UseFormRegisterReturn } from 'react-hook-form';
4
+ import type { OptionChangeHandler, OptionType, OptionValue } from '../../types/dropdown';
5
5
  export declare const defaultMaxHeight = 275;
6
6
  type BaseComboBoxProps = Omit<ComponentPropsWithRef<'div'>, 'size' | 'onChange'>;
7
7
  export interface ComboBoxProps extends PropsWithChildren<BaseComboBoxProps> {
@@ -1,9 +1,8 @@
1
1
  import { type InputHTMLAttributes } from 'react';
2
- import type { IconName } from '@ncds/ui-admin-icon/dynamic';
3
2
  import type { Size } from '../../../constant/size';
4
3
  interface CustomInputProps extends InputHTMLAttributes<HTMLInputElement> {
5
4
  disabled: boolean;
6
- iconName: Extract<IconName, 'calendar' | 'clock'>;
5
+ iconName: 'calendar' | 'clock';
7
6
  iconSize: Extract<Size, 'xs' | 'sm'>;
8
7
  placeholder?: string;
9
8
  }
@@ -9,6 +9,7 @@ export type DatePickerProps = {
9
9
  destructive?: string;
10
10
  placeholder?: string;
11
11
  isEndDate?: boolean;
12
+ className?: string;
12
13
  onChangeDate: (date: string) => void;
13
14
  onValidationError?: (error: {
14
15
  date: Date;
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { Size } from '../../../constant/size';
3
3
  import { ColorTone } from '../../../constant/color';
4
- export type DotColor = ColorTone;
4
+ export type DotColor = Extract<ColorTone, 'neutral' | 'error' | 'warning' | 'success' | 'blue' | 'pink' | 'disabled'>;
5
5
  export type DotSize = Extract<Size, 'sm' | 'md' | 'lg'>;
6
6
  export interface DotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { type IconName } from '@ncds/ui-admin-icon/dynamic';
1
+ import type { SlotIconComponent } from '../../types/side-slot';
2
2
  export type AvatarTrigger = {
3
3
  type: 'avatar';
4
4
  avatar: string;
@@ -13,7 +13,7 @@ export type ButtonTrigger = {
13
13
  };
14
14
  export type IconTrigger = {
15
15
  type: 'icon';
16
- icon?: IconName;
16
+ icon?: SlotIconComponent;
17
17
  };
18
18
  export type CustomTrigger = {
19
19
  type: 'custom';
@@ -22,11 +22,12 @@ export type CustomTrigger = {
22
22
  export type DropdownItemType = {
23
23
  id: string;
24
24
  text: string;
25
- icon?: IconName;
25
+ icon?: SlotIconComponent;
26
26
  shortcut?: string;
27
27
  onClick?: () => void;
28
28
  disabled?: boolean;
29
29
  type?: 'default' | 'danger';
30
+ className?: string;
30
31
  };
31
32
  export type DropdownGroup = {
32
33
  items: DropdownItemType[];
@@ -1,10 +1,10 @@
1
- import { type IconName } from '@ncds/ui-admin-icon/dynamic';
2
1
  import { ComponentPropsWithoutRef } from 'react';
2
+ import type { SlotIconComponent } from '../../types/side-slot';
3
3
  export type FeaturedIconTheme = 'light-circle' | 'dark-circle' | 'outline-circle' | 'square-outline';
4
4
  export type FeaturedIconColor = 'neutral' | 'error' | 'warning' | 'success';
5
5
  export type FeaturedIconSize = 'sm' | 'md' | 'lg' | 'xl';
6
6
  export interface FeaturedIconProps extends Omit<ComponentPropsWithoutRef<'div'>, 'color'> {
7
- name: IconName;
7
+ icon: SlotIconComponent;
8
8
  theme?: FeaturedIconTheme;
9
9
  color?: FeaturedIconColor;
10
10
  size?: FeaturedIconSize;
@@ -1,4 +1,4 @@
1
- import { InputBaseProps } from '../input/InputBase';
1
+ import type { InputBaseProps } from '../input/InputBase';
2
2
  export declare enum FileInputErrorType {
3
3
  ALREADY_UPLOADED = "ALREADY_UPLOADED",
4
4
  EXCEED_MAX_FILE_SIZE = "EXCEED_MAX_FILE_SIZE",
@@ -1,5 +1,5 @@
1
- import { InvalidFile } from '../file-input/FileInput';
2
- import { InputBaseProps } from '../input/InputBase';
1
+ import { type InvalidFile } from '../file-input/FileInput';
2
+ import type { InputBaseProps } from '../input/InputBase';
3
3
  export interface ImageFileInputProps extends Omit<InputBaseProps, 'clearText' | 'onClearText' | 'hintText' | 'value' | 'onChange'> {
4
4
  /**
5
5
  * Accepted file types
@@ -30,4 +30,5 @@ export * from './tab';
30
30
  export * from './tag';
31
31
  export * from './toggle';
32
32
  export * from './tooltip';
33
+ export { type SideSlotType, type SlotIconComponent } from '../types';
33
34
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
- import { type IconName } from '@ncds/ui-admin-icon/dynamic';
2
- import React from 'react';
1
+ import type React from 'react';
2
+ import { type ElementType } from 'react';
3
3
  import { COLOR } from '../../../constant/color';
4
- import { Size } from '../../../constant/size';
4
+ import type { Size } from '../../../constant/size';
5
5
  interface InputSideButtonSlot {
6
6
  type: 'button';
7
7
  label: string;
@@ -14,7 +14,7 @@ interface InputSideTextSlot {
14
14
  }
15
15
  interface InputSideIconSlot {
16
16
  type: 'icon';
17
- icon: IconName;
17
+ icon: ElementType;
18
18
  size?: number | string;
19
19
  color?: keyof typeof COLOR;
20
20
  className?: string;
@@ -1,5 +1,5 @@
1
- import { type IconName } from '@ncds/ui-admin-icon/dynamic';
2
1
  import { ReactNode } from 'react';
2
+ 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';
@@ -18,7 +18,7 @@ export type ModalProps = {
18
18
  export declare const Modal: {
19
19
  ({ isOpen, onClose, children, size, closeOnBackdropClick, closeOnEsc, className, zIndex, ...restProps }: ModalProps): import("react").ReactPortal | null;
20
20
  Header({ children, onClose, featuredIcon, title, subtitle, align, showDivider, hideCloseButton, }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
21
- Content({ children }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
21
+ Content({ children, className }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
22
22
  /**
23
23
  * Modal.Actions - The actions area of the modal
24
24
  *
@@ -47,13 +47,13 @@ export declare const Modal: {
47
47
  * <Button size="sm" label="Confirm" onClick={handleConfirm} hierarchy="primary" />
48
48
  * </Modal.Actions>
49
49
  */
50
- Actions({ children, layout, showDivider, align, checkboxContent, }: ModalActionsProps): import("react/jsx-runtime").JSX.Element;
50
+ Actions({ children, layout, showDivider, align, checkboxContent, className, }: ModalActionsProps): import("react/jsx-runtime").JSX.Element;
51
51
  };
52
52
  export type ModalHeaderProps = {
53
53
  children?: ReactNode;
54
54
  onClose: () => void;
55
55
  featuredIcon?: {
56
- name: IconName;
56
+ icon: SlotIconComponent;
57
57
  color: FeaturedIconColor;
58
58
  theme: FeaturedIconTheme;
59
59
  };
@@ -65,8 +65,10 @@ export type ModalHeaderProps = {
65
65
  };
66
66
  export type ModalContentProps = {
67
67
  children: ReactNode;
68
+ className?: string;
68
69
  };
69
70
  export type ModalActionsProps = {
71
+ className?: string;
70
72
  children: ReactNode;
71
73
  layout?: ModalActionsLayout;
72
74
  showDivider?: boolean;
@@ -1,5 +1,5 @@
1
- import { type IconName } from '@ncds/ui-admin-icon/dynamic';
2
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import type { SlotIconComponent } from '../../types/side-slot';
3
3
  import { NotificationAction, NotificationColor } from './Notification';
4
4
  export interface MessageNotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
5
5
  /**
@@ -11,9 +11,9 @@ export interface MessageNotificationProps extends Omit<ComponentPropsWithoutRef<
11
11
  */
12
12
  supportingText?: ReactNode;
13
13
  /**
14
- * 알림 아이콘 이름 (지정하지 않으면 color에 따라 기본 아이콘 사용)
14
+ * 알림 아이콘 컴포넌트 (지정하지 않으면 color에 따라 기본 아이콘 사용)
15
15
  */
16
- icon?: IconName;
16
+ icon?: SlotIconComponent;
17
17
  /**
18
18
  * 알림 색상 스타일
19
19
  * @default 'neutral'
@@ -1,5 +1,5 @@
1
- import type { IconName } from '@ncds/ui-admin-icon/dynamic';
2
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import type { SlotIconComponent } from '../../types/side-slot';
3
3
  import { ColorTone } from '../../../constant/color';
4
4
  import { ButtonTheme } from '../button';
5
5
  export type NotificationType = 'floating' | 'full-width' | 'message';
@@ -34,9 +34,9 @@ export interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>,
34
34
  */
35
35
  supportingText?: ReactNode;
36
36
  /**
37
- * 알림 아이콘 이름 (지정하지 않으면 variant에 따라 기본 아이콘 사용)
37
+ * 알림 아이콘 컴포넌트 (지정하지 않으면 variant에 따라 기본 아이콘 사용)
38
38
  */
39
- icon?: IconName;
39
+ icon?: SlotIconComponent;
40
40
  /**
41
41
  * 알림 색상 스타일
42
42
  * @default 'neutral'
@@ -1,23 +1,24 @@
1
+ import type { SlotIconComponent } from '../../types/side-slot';
1
2
  declare const NAV_BUTTON_CONFIG: {
2
3
  readonly first: {
3
4
  readonly label: "처음";
4
5
  readonly className: "ncua-pagination__first";
5
- readonly getIcon: (isPC: boolean) => string;
6
+ readonly getIcon: (_isPC: boolean) => SlotIconComponent;
6
7
  };
7
8
  readonly prev: {
8
9
  readonly label: "이전";
9
10
  readonly className: "ncua-pagination__before";
10
- readonly getIcon: (isPC: boolean) => "arrow-left" | "chevron-left";
11
+ readonly getIcon: (isPC: boolean) => SlotIconComponent;
11
12
  };
12
13
  readonly next: {
13
14
  readonly label: "다음";
14
15
  readonly className: "ncua-pagination__next";
15
- readonly getIcon: (isPC: boolean) => "arrow-right" | "chevron-right";
16
+ readonly getIcon: (isPC: boolean) => SlotIconComponent;
16
17
  };
17
18
  readonly last: {
18
19
  readonly label: "마지막";
19
20
  readonly className: "ncua-pagination__last";
20
- readonly getIcon: (isPC: boolean) => string;
21
+ readonly getIcon: (_isPC: boolean) => SlotIconComponent;
21
22
  };
22
23
  };
23
24
  export declare const NavButton: ({ type, breakPoint, noPrev, noNext, onClick, }: {
@@ -23,6 +23,7 @@ export type SelectDropdownProps = ComponentPropsWithRef<'div'> & {
23
23
  onComplete?: () => void;
24
24
  activeDescendantId?: string;
25
25
  componentType?: 'selectbox' | 'combobox';
26
+ align?: 'left' | 'right';
26
27
  };
27
28
  export declare const SelectDropdown: import("react").ForwardRefExoticComponent<Omit<SelectDropdownProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
28
29
  //# sourceMappingURL=SelectDropdown.d.ts.map
@@ -1,7 +1,7 @@
1
- import { ComponentPropsWithRef, PropsWithChildren } from 'react';
2
- import { UseFormRegisterReturn } from 'react-hook-form';
3
- import { Size } from '../../../constant/size';
4
- import { OptionChangeHandler, OptionType, OptionValue } from '../../types/dropdown';
1
+ import { type ComponentPropsWithRef, type PropsWithChildren } from 'react';
2
+ import type { UseFormRegisterReturn } from 'react-hook-form';
3
+ import type { Size } from '../../../constant/size';
4
+ import type { OptionChangeHandler, OptionType, OptionValue } from '../../types/dropdown';
5
5
  export declare const DEFAULT_MAX_HEIGHT = 275;
6
6
  type BaseSelectBoxProps = Omit<ComponentPropsWithRef<'div'>, 'size' | 'onChange'>;
7
7
  export type SelectBoxProps = PropsWithChildren<BaseSelectBoxProps> & {
@@ -10,6 +10,7 @@ export type SelectBoxProps = PropsWithChildren<BaseSelectBoxProps> & {
10
10
  hintText?: string;
11
11
  destructive?: boolean;
12
12
  size?: Extract<Size, 'xs' | 'sm' | 'md'>;
13
+ autoWidth?: boolean;
13
14
  type?: 'default' | 'simple';
14
15
  optionItems?: OptionType[];
15
16
  value?: OptionValue;
@@ -19,6 +20,7 @@ export type SelectBoxProps = PropsWithChildren<BaseSelectBoxProps> & {
19
20
  maxHeight?: number;
20
21
  multiple?: boolean;
21
22
  onEdit?: () => void;
23
+ align?: 'left' | 'right';
22
24
  };
23
25
  export declare const SelectBox: import("react").ForwardRefExoticComponent<Omit<SelectBoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
24
26
  export {};