@ncds/ui-admin 0.0.26 → 0.0.27

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.
@@ -99,7 +99,8 @@ ButtonGroup.Item = function (_a) {
99
99
  }, {
100
100
  'is-current': isCurrent
101
101
  }),
102
- disabled: disabled
102
+ disabled: disabled,
103
+ type: as === 'button' ? 'button' : undefined
103
104
  }, props), (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
104
105
  children: [position === 'leading' && renderIcon(), !onlyIcon && label, children, position === 'trailing' && renderIcon()]
105
106
  }));
@@ -21,7 +21,9 @@ var __assign = void 0 && (void 0).__assign || function () {
21
21
  return __assign.apply(this, arguments);
22
22
  };
23
23
  var RangeDatePickerWithButtons = function (_a) {
24
- var currentButtonId = _a.currentButtonId,
24
+ var _b = _a.buttonGroupSize,
25
+ buttonGroupSize = _b === void 0 ? 'sm' : _b,
26
+ currentButtonId = _a.currentButtonId,
25
27
  setCurrentButtonId = _a.setCurrentButtonId,
26
28
  startDateOptions = _a.startDateOptions,
27
29
  endDateOptions = _a.endDateOptions,
@@ -60,7 +62,7 @@ var RangeDatePickerWithButtons = function (_a) {
60
62
  className: "ncua-range-date-picker-with-buttons"
61
63
  }, {
62
64
  children: [(0, _jsxRuntime.jsx)(_button.ButtonGroup, __assign({
63
- size: "sm"
65
+ size: buttonGroupSize
64
66
  }, {
65
67
  children: periodKeys.map(function (key) {
66
68
  return (0, _jsxRuntime.jsx)(_button.ButtonGroup.Item, {
@@ -29,7 +29,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
29
29
  return t;
30
30
  };
31
31
  /**
32
- * 현재 icon destructive 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
32
+ * 현재 icon 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
33
33
  */
34
34
  var Select = exports.Select = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
35
35
  var icon = _a.icon,
@@ -87,14 +87,6 @@ var Select = exports.Select = /*#__PURE__*/(0, _react.forwardRef)(function (_a,
87
87
  children: item.label
88
88
  }), "option-".concat(index));
89
89
  }), children]
90
- })), destructive && (0, _jsxRuntime.jsx)("div", __assign({
91
- className: "ncua-select__destructive-icon"
92
- }, {
93
- children: (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
94
- name: "info-circle",
95
- width: 14,
96
- height: 14
97
- })
98
90
  }))]
99
91
  })), hintText && (0, _jsxRuntime.jsx)(_HintText.HintText, __assign({
100
92
  destructive: destructive,
@@ -89,7 +89,8 @@ ButtonGroup.Item = function (_a) {
89
89
  }, {
90
90
  'is-current': isCurrent
91
91
  }),
92
- disabled: disabled
92
+ disabled: disabled,
93
+ type: as === 'button' ? 'button' : undefined
93
94
  }, props), _jsxs(_Fragment, {
94
95
  children: [position === 'leading' && renderIcon(), !onlyIcon && label, children, position === 'trailing' && renderIcon()]
95
96
  }));
@@ -15,7 +15,9 @@ import { ButtonGroup } from '../button';
15
15
  import { getDateFormat, getSubtractDate } from '../../utils/date-picker';
16
16
  import { PERIOD_ITEM } from '../../constant/date-picker';
17
17
  export var RangeDatePickerWithButtons = function (_a) {
18
- var currentButtonId = _a.currentButtonId,
18
+ var _b = _a.buttonGroupSize,
19
+ buttonGroupSize = _b === void 0 ? 'sm' : _b,
20
+ currentButtonId = _a.currentButtonId,
19
21
  setCurrentButtonId = _a.setCurrentButtonId,
20
22
  startDateOptions = _a.startDateOptions,
21
23
  endDateOptions = _a.endDateOptions,
@@ -54,7 +56,7 @@ export var RangeDatePickerWithButtons = function (_a) {
54
56
  className: "ncua-range-date-picker-with-buttons"
55
57
  }, {
56
58
  children: [_jsx(ButtonGroup, __assign({
57
- size: "sm"
59
+ size: buttonGroupSize
58
60
  }, {
59
61
  children: periodKeys.map(function (key) {
60
62
  return _jsx(ButtonGroup.Item, {
@@ -22,7 +22,7 @@ import classNames from 'classnames';
22
22
  import { forwardRef } from 'react';
23
23
  import { HintText } from '../shared/hintText/HintText';
24
24
  /**
25
- * 현재 icon destructive 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
25
+ * 현재 icon 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
26
26
  */
27
27
  export var Select = /*#__PURE__*/forwardRef(function (_a, ref) {
28
28
  var icon = _a.icon,
@@ -80,14 +80,6 @@ export var Select = /*#__PURE__*/forwardRef(function (_a, ref) {
80
80
  children: item.label
81
81
  }), "option-".concat(index));
82
82
  }), children]
83
- })), destructive && _jsx("div", __assign({
84
- className: "ncua-select__destructive-icon"
85
- }, {
86
- children: _jsx(Icon, {
87
- name: "info-circle",
88
- width: 14,
89
- height: 14
90
- })
91
83
  }))]
92
84
  })), hintText && _jsx(HintText, __assign({
93
85
  destructive: destructive,
@@ -2,7 +2,7 @@ import { IconName } from '@ncds/ui-admin-icon';
2
2
  import React, { ComponentProps } from 'react';
3
3
  import { ColorKeyType } from '../../../constant/color';
4
4
  import { Size } from '../../../constant/size';
5
- type ButtonGroupSize = Extract<Size, 'xs' | 'sm' | 'md' | 'lg'>;
5
+ export type ButtonGroupSize = Extract<Size, 'xs' | 'sm' | 'md' | 'lg'>;
6
6
  interface SideCommon {
7
7
  position?: 'leading' | 'trailing';
8
8
  }
@@ -54,7 +54,7 @@ export declare const ButtonGroup: {
54
54
  formNoValidate?: boolean | undefined;
55
55
  formTarget?: string | undefined;
56
56
  name?: string | undefined;
57
- type?: "button" | "submit" | "reset" | undefined;
57
+ type: string | undefined;
58
58
  value?: string | number | readonly string[] | undefined;
59
59
  defaultChecked?: boolean | undefined;
60
60
  defaultValue?: string | number | readonly string[] | undefined;
@@ -333,7 +333,7 @@ export declare const ButtonGroup: {
333
333
  media?: string | undefined;
334
334
  ping?: string | undefined;
335
335
  target?: React.HTMLAttributeAnchorTarget | undefined;
336
- type?: string | undefined;
336
+ type: string | undefined;
337
337
  referrerPolicy?: React.HTMLAttributeReferrerPolicy | undefined;
338
338
  defaultChecked?: boolean | undefined;
339
339
  defaultValue?: string | number | readonly string[] | undefined;
@@ -1,12 +1,14 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { RangeDatePickerProps } from './RangeDatePicker';
3
+ import { ButtonGroupSize } from '../button';
3
4
  import { PERIOD_ITEM } from '../../constant/date-picker';
4
5
  export type PeriodKeyType = keyof typeof PERIOD_ITEM;
5
6
  type RangeDatePickerWithButtonsProps = {
7
+ buttonGroupSize?: ButtonGroupSize;
6
8
  currentButtonId: PeriodKeyType;
7
9
  setCurrentButtonId: Dispatch<SetStateAction<PeriodKeyType>>;
8
10
  periodKeys: PeriodKeyType[];
9
11
  } & RangeDatePickerProps;
10
- export declare const RangeDatePickerWithButtons: ({ currentButtonId, setCurrentButtonId, startDateOptions, endDateOptions, validationOption, periodKeys, onDateValidation, }: RangeDatePickerWithButtonsProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const RangeDatePickerWithButtons: ({ buttonGroupSize, currentButtonId, setCurrentButtonId, startDateOptions, endDateOptions, validationOption, periodKeys, onDateValidation, }: RangeDatePickerWithButtonsProps) => import("react/jsx-runtime").JSX.Element;
11
13
  export {};
12
14
  //# sourceMappingURL=RangeDatePickerWithButtons.d.ts.map
@@ -25,7 +25,7 @@ export interface SelectProps extends PropsWithChildren<BaseSelectProps> {
25
25
  type?: 'default' | 'simple';
26
26
  }
27
27
  /**
28
- * 현재 icon destructive 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
28
+ * 현재 icon 속성은 현재 디자인 시스템에 존재하지 않으니 사용하지 않는 것을 권장합니다.
29
29
  */
30
30
  export declare const Select: import("react").ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
31
31
  export {};
@@ -532,7 +532,7 @@ button {
532
532
  color: var(--gray-600);
533
533
  }
534
534
  :where(.ncua-button-group.has-border) {
535
- border: 1px solid var(--gray-200);
535
+ outline: 1px solid var(--gray-200);
536
536
  box-shadow: var(--shadow-xs);
537
537
  }
538
538
  :where(.ncua-button-group.has-border) .ncua-button-group__item:hover {
@@ -721,15 +721,13 @@ button {
721
721
  display: none;
722
722
  }
723
723
  .ncua-checkbox-input :disabled + .ncua-checkbox-input__ico {
724
- background-color: var(--gray-100);
725
724
  border-radius: 4px;
726
725
  }
727
726
 
728
727
  .ncua-checkbox-field {
729
728
  position: relative;
730
- line-height: 18px;
731
- font-weight: var(--font-weights-commerce-sans-0);
732
729
  font-size: var(--font-size-xs);
730
+ line-height: var(--line-heights-xs);
733
731
  cursor: pointer;
734
732
  }
735
733
  .ncua-checkbox-field__text {
@@ -739,17 +737,17 @@ button {
739
737
  }
740
738
  .ncua-checkbox-field__support-text {
741
739
  color: var(--gray-400);
742
- font-size: var(--font-size-xs);
743
- line-height: var(--line-heights-xs);
740
+ font-weight: var(--font-weights-commerce-sans-0);
744
741
  }
745
742
  .ncua-checkbox-field:hover .ncua-checkbox-field__input {
746
743
  border-color: var(--gray-700);
747
744
  background-color: var(--gray-50);
748
745
  border-radius: 4px;
749
746
  }
750
- .ncua-checkbox-field--md .ncua-checkbox-field__text {
747
+ .ncua-checkbox-field--md .ncua-checkbox-field__text,
748
+ .ncua-checkbox-field--md .ncua-checkbox-field__support-text {
751
749
  font-size: var(--font-size-sm);
752
- line-height: 22px;
750
+ line-height: var(--line-heights-sm);
753
751
  }
754
752
  .ncua-checkbox-field.has-text {
755
753
  display: inline-flex;
@@ -2050,7 +2048,7 @@ button {
2050
2048
  .ncua-radio-field__support-text {
2051
2049
  color: var(--gray-400);
2052
2050
  }
2053
- .ncua-radio-field--md .ncua-radio-field__text {
2051
+ .ncua-radio-field--md .ncua-radio-field__text, .ncua-radio-field--md .ncua-radio-field__support-text {
2054
2052
  font-size: var(--font-size-sm);
2055
2053
  line-height: var(--line-heights-sm);
2056
2054
  }
@@ -2339,34 +2337,30 @@ button {
2339
2337
  .ncua-select.destructive .ncua-select__content:focus-within {
2340
2338
  box-shadow: var(--shadow-xs-focused-4px-error-100);
2341
2339
  }
2342
- .ncua-select__destructive-icon {
2343
- position: absolute;
2344
- top: 50%;
2345
- right: 25px;
2346
- width: 14px;
2347
- height: 14px;
2348
- font-size: 0;
2349
- color: var(--primary-red-600);
2350
- transform: translateY(-50%);
2351
- }
2352
2340
  .ncua-select--xs {
2353
2341
  height: var(--select-height-xs);
2354
2342
  border-radius: 6px;
2355
- padding-right: 28px;
2343
+ padding-inline: 10px 28px;
2356
2344
  }
2357
2345
  .ncua-select--xs > .ncua-select__tag {
2358
2346
  font-size: var(--font-size-xs);
2359
2347
  font-weight: var(--font-weights-commerce-sans-0);
2360
2348
  }
2349
+ .ncua-select--xs + .ncua-hint-text {
2350
+ margin-block-start: 4px;
2351
+ }
2361
2352
  .ncua-select--sm {
2362
2353
  height: var(--select-height-sm);
2363
2354
  border-radius: 6px;
2364
- padding-right: 30px;
2355
+ padding-inline: 12px 30px;
2365
2356
  }
2366
2357
  .ncua-select--sm > .ncua-select__tag {
2367
2358
  font-size: var(--font-size-sm);
2368
2359
  font-weight: var(--font-weights-commerce-sans-0);
2369
2360
  }
2361
+ .ncua-select--sm + .ncua-hint-text {
2362
+ margin-block-start: 6px;
2363
+ }
2370
2364
  .ncua-select--sm.ncua-select__content::after {
2371
2365
  width: 16px;
2372
2366
  height: 16px;
@@ -2376,12 +2370,15 @@ button {
2376
2370
  min-width: 132px;
2377
2371
  height: var(--select-height-md);
2378
2372
  border-radius: 8px;
2379
- padding-right: 30px;
2373
+ padding-inline: 12px 30px;
2380
2374
  }
2381
2375
  .ncua-select--md > .ncua-select__tag {
2382
2376
  font-size: var(--font-size-sm);
2383
2377
  font-weight: var(--font-weights-commerce-sans-1);
2384
2378
  }
2379
+ .ncua-select--md + .ncua-hint-text {
2380
+ margin-block-start: 6px;
2381
+ }
2385
2382
  .ncua-select--md.ncua-select__content::after {
2386
2383
  width: 16px;
2387
2384
  height: 16px;
@@ -2413,8 +2410,9 @@ button {
2413
2410
  padding-right: 18px;
2414
2411
  }
2415
2412
  .ncua-select .ncua-hint-text {
2416
- margin-block-start: 6px;
2417
- font-size: var(--font-size-xxxs);
2413
+ font-size: var(--font-size-xxs);
2414
+ line-height: var(--line-heights-xxs);
2415
+ color: var(--gray-400);
2418
2416
  }
2419
2417
 
2420
2418
  .ncua-pagination {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ncds/ui-admin",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "nhn-commerce의 어드민 디자인 시스템입니다.",
5
5
  "scripts": {
6
6
  "barrel": "node barrel.js",