@nurihaus/web-design-system 3.26.0 → 3.27.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/dist/agreement.js +6 -198
- package/dist/ai/components.md +696 -77
- package/dist/ai/migration.md +25 -0
- package/dist/ai/motion.md +10 -4
- package/dist/ai/patterns.md +1631 -663
- package/dist/ai/tokens.md +14 -8
- package/dist/check-box.js +24 -14
- package/dist/chip-group.js +23 -7
- package/dist/chunk-244.js +31 -0
- package/dist/chunk-2735.js +123 -0
- package/dist/chunk-4359.js +96 -0
- package/dist/{chunk-6096.js → chunk-4709.js} +17 -33
- package/dist/chunk-4955.js +115 -0
- package/dist/chunk-7024.js +3 -1
- package/dist/chunk-7187.js +35 -0
- package/dist/chunk-7829.js +10 -2
- package/dist/chunk-8144.js +106 -0
- package/dist/chunk-9350.js +23 -0
- package/dist/components/check-box/check-box-type.d.ts +2 -0
- package/dist/components/check-box/check-box.stories.d.ts +2 -0
- package/dist/components/chip-group/chip-group-props.d.ts +6 -3
- package/dist/components/chip-group/chip-group-type.d.ts +4 -1
- package/dist/components/chip-group/chip-group.stories.d.ts +6 -2
- package/dist/components/description-list/description-list-props.d.ts +15 -1
- package/dist/components/description-list/description-list-type.d.ts +11 -1
- package/dist/components/description-list/description-list.d.ts +1 -1
- package/dist/components/description-list/description-list.stories.d.ts +7 -0
- package/dist/components/drop-down/drop-down-type.d.ts +14 -2
- package/dist/components/drop-down/drop-down.stories.d.ts +3 -1
- package/dist/components/empty-state/empty-state-props.d.ts +3 -0
- package/dist/components/empty-state/empty-state-type.d.ts +8 -2
- package/dist/components/empty-state/empty-state.d.ts +3 -0
- package/dist/components/empty-state/empty-state.stories.d.ts +296 -4
- package/dist/components/form-field/base-form-field.d.ts +13 -0
- package/dist/components/form-field/form-field-context.d.ts +7 -0
- package/dist/components/form-field/form-field-props.d.ts +21 -0
- package/dist/components/form-field/form-field-type.d.ts +51 -0
- package/dist/components/form-field/form-field.d.ts +9 -0
- package/dist/components/form-field/form-field.stories.d.ts +335 -0
- package/dist/components/form-section/base-form-section.d.ts +4 -0
- package/dist/components/form-section/form-section-props.d.ts +2 -0
- package/dist/components/form-section/form-section-type.d.ts +16 -0
- package/dist/components/form-section/form-section.d.ts +5 -0
- package/dist/components/form-section/form-section.stories.d.ts +308 -0
- package/dist/components/icon/icon.stories.d.ts +1 -1
- package/dist/components/list/list-footer.stories.d.ts +1 -1
- package/dist/components/list/list-row.stories.d.ts +1 -1
- package/dist/components/member-card/member-card-type.d.ts +2 -0
- package/dist/components/member-card/member-card.stories.d.ts +1 -1
- package/dist/components/message/message.stories.d.ts +3 -3
- package/dist/components/modal/modal-props.d.ts +10 -3
- package/dist/components/modal/modal-type.d.ts +22 -4
- package/dist/components/modal/modal-with-double-button.stories.d.ts +16 -1
- package/dist/components/modal/modal.stories.d.ts +5 -1
- package/dist/components/notice/notice-type.d.ts +3 -0
- package/dist/components/notice/notice.stories.d.ts +279 -0
- package/dist/components/overlay/overlay-type.d.ts +1 -1
- package/dist/components/pagination/pagination-type.d.ts +10 -0
- package/dist/components/pagination/pagination.stories.d.ts +7 -1
- package/dist/components/radio/base-radio.d.ts +2 -2
- package/dist/components/radio/radio-props.d.ts +8 -2
- package/dist/components/radio/radio-type.d.ts +14 -3
- package/dist/components/radio/radio.stories.d.ts +11 -1
- package/dist/components/search-field/search-field-type.d.ts +19 -3
- package/dist/components/search-field/search-field.d.ts +1 -1
- package/dist/components/search-field/search-field.stories.d.ts +2 -0
- package/dist/components/segmented-control/segmented-control-props.d.ts +8 -0
- package/dist/components/segmented-control/segmented-control-type.d.ts +3 -1
- package/dist/components/segmented-control/segmented-control.stories.d.ts +8 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +3 -3
- package/dist/components/stat/base-stat.d.ts +13 -4
- package/dist/components/stat/stat-group.d.ts +8 -0
- package/dist/components/stat/stat-group.stories.d.ts +27 -0
- package/dist/components/stat/stat-props.d.ts +5 -3
- package/dist/components/stat/stat-type.d.ts +40 -2
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/stat/stat.stories.d.ts +3 -1
- package/dist/components/table/base-table.d.ts +5 -1
- package/dist/components/table/data-table.d.ts +6 -1
- package/dist/components/table/table-props.d.ts +10 -0
- package/dist/components/table/table-type.d.ts +42 -6
- package/dist/components/table/table.stories.d.ts +101 -2
- package/dist/components/text-area/base-text-area.d.ts +2 -2
- package/dist/components/text-area/text-area-props.d.ts +8 -0
- package/dist/components/text-area/text-area-type.d.ts +12 -1
- package/dist/components/text-area/text-area.stories.d.ts +11 -1
- package/dist/components/text-button/text-button-type.d.ts +5 -0
- package/dist/components/text-button/text-button.stories.d.ts +2 -0
- package/dist/components/text-field/base-text-field.d.ts +2 -2
- package/dist/components/text-field/text-field-props.d.ts +8 -0
- package/dist/components/text-field/text-field-type.d.ts +13 -1
- package/dist/components/text-field/text-field.stories.d.ts +10 -2
- package/dist/components/toast/toast-props.d.ts +10 -2
- package/dist/components/toast/toast-type.d.ts +3 -1
- package/dist/components/toast/toast.stories.d.ts +18 -3
- package/dist/components.css +1598 -142
- package/dist/data-table.js +301 -50
- package/dist/description-list.js +221 -6
- package/dist/docs/patterns/desktop/admin-apply.stories.d.ts +16 -0
- package/dist/docs/patterns/desktop/admin-bulk.stories.d.ts +7 -4
- package/dist/docs/patterns/desktop/admin-dashboard.stories.d.ts +4 -2
- package/dist/docs/patterns/desktop/admin-detail.stories.d.ts +5 -0
- package/dist/docs/patterns/desktop/admin-feature-intro.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-form.stories.d.ts +4 -2
- package/dist/docs/patterns/desktop/admin-list.stories.d.ts +5 -0
- package/dist/docs/patterns/desktop/admin-picker.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-queue.stories.d.ts +23 -0
- package/dist/docs/patterns/desktop/admin-report.stories.d.ts +3 -2
- package/dist/docs/patterns/desktop/admin-review.stories.d.ts +6 -2
- package/dist/docs/patterns/desktop/admin-settings.stories.d.ts +6 -2
- package/dist/docs/patterns/desktop/admin-split.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-states.stories.d.ts +5 -3
- package/dist/docs/patterns/desktop/admin-upload.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-wallet.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-wizard.stories.d.ts +6 -3
- package/dist/docs/patterns/mobile/form.stories.d.ts +1 -0
- package/dist/drop-down.js +64 -155
- package/dist/empty-state.js +26 -14
- package/dist/form-field.js +511 -0
- package/dist/form-section.js +298 -0
- package/dist/full-secure-keypad.js +4 -4
- package/dist/helpers/motion/use-attention-handle.d.ts +1 -1
- package/dist/helpers/motion/use-effect-trigger.d.ts +1 -1
- package/dist/icon-button.js +2 -1
- package/dist/icon-text-badge.js +4 -4
- package/dist/index.d.ts +6 -1
- package/dist/index.js +2213 -636
- package/dist/loading.js +6 -6
- package/dist/member-card.js +18 -13
- package/dist/modal-with-double-button.js +95 -44
- package/dist/modal.js +24 -6
- package/dist/notice.js +5 -4
- package/dist/option-badge.js +4 -4
- package/dist/overlay.js +134 -61
- package/dist/pagination.js +291 -57
- package/dist/radio.js +165 -37
- package/dist/search-field.js +188 -77
- package/dist/section-header.js +14 -7
- package/dist/segmented-control.js +9 -1
- package/dist/split-text-field.js +16 -14
- package/dist/stat-group.js +441 -0
- package/dist/stat.js +90 -75
- package/dist/styles.css +1357 -164
- package/dist/text-area.js +90 -53
- package/dist/text-button.js +14 -7
- package/dist/text-field.js +94 -62
- package/dist/toast.js +27 -15
- package/dist/tokens/generated/semantic-admin.d.ts +1 -0
- package/dist/tokens/generated/semantic-app.d.ts +2 -4
- package/dist/tokens.css +24 -9
- package/dist/tokens.js +3 -4
- package/package.json +13 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 4955;
|
|
3
|
+
export const __webpack_esm_ids__ = [4955];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 4955
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
13
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
14
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(4560);
|
|
15
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(3274);
|
|
16
|
+
/* harmony import */ var _helpers_utils_fillLinkChild__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(1176);
|
|
17
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(7335);
|
|
18
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(3547);
|
|
19
|
+
/* harmony import */ var _loading_spinner_spinner__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(6302);
|
|
20
|
+
/* harmony import */ var _base_icon_button__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(595);
|
|
21
|
+
/* harmony import */ var _icon_button_props__WEBPACK_IMPORTED_MODULE_9__ = __nuri_require__(8770);
|
|
22
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
23
|
+
__assign = Object.assign || function (t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
return __assign.apply(this, arguments);
|
|
31
|
+
};
|
|
32
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
35
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
36
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
37
|
+
}
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// 버튼 크기마다 아이콘 크기. 버튼 지름은 size.css 의 --icon-button-size-*
|
|
51
|
+
var ICON_SIZE = {
|
|
52
|
+
s: 's',
|
|
53
|
+
m: 'l',
|
|
54
|
+
l: 'xl'
|
|
55
|
+
};
|
|
56
|
+
/** 아이콘 하나뿐인 버튼. 누르는 자리는 늘 터치 44 이상이다 */
|
|
57
|
+
var IconButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
58
|
+
var _a;
|
|
59
|
+
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _icon_button_props__WEBPACK_IMPORTED_MODULE_9__/* .iconButtonProps */ .Ei),
|
|
60
|
+
className = _b.className,
|
|
61
|
+
icon = _b.icon,
|
|
62
|
+
label = _b.label,
|
|
63
|
+
asChild = _b.asChild,
|
|
64
|
+
children = _b.children,
|
|
65
|
+
loading = _b.loading,
|
|
66
|
+
_onClick = _b.onClick,
|
|
67
|
+
_c = _b.pressEffect,
|
|
68
|
+
pressEffect = _c === void 0 ? true : _c,
|
|
69
|
+
track = _b.track,
|
|
70
|
+
trackProps = _b.trackProps,
|
|
71
|
+
restProps = __rest(_b, ["className", "icon", "label", "asChild", "children", "loading", "onClick", "pressEffect", "track", "trackProps"]);
|
|
72
|
+
var size = (_a = props.size) !== null && _a !== void 0 ? _a : _icon_button_props__WEBPACK_IMPORTED_MODULE_9__/* .defaultSize */ .R7;
|
|
73
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__/* .useTrack */ .n)('IconButton', {
|
|
74
|
+
track: track,
|
|
75
|
+
trackProps: trackProps
|
|
76
|
+
});
|
|
77
|
+
var content = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
78
|
+
name: icon,
|
|
79
|
+
size: ICON_SIZE[size]
|
|
80
|
+
});
|
|
81
|
+
var link = (0,_helpers_utils_fillLinkChild__WEBPACK_IMPORTED_MODULE_4__/* .fillLinkChild */ .Q)(asChild, children, content);
|
|
82
|
+
// 링크는 로딩을 그리지 않는다(CTAButton 과 같다)
|
|
83
|
+
var busy = link ? undefined : loading;
|
|
84
|
+
// 링 지름은 로딩 가족의 같은 이름 크기(s 16·m 20·l 40)라 아이콘(18·24·32)에 가장 가깝다.
|
|
85
|
+
// 짙은 보라 바탕(primary)만 흰 링이고 나머지는 회색이다. 누른 직후라 늦게 보이기는 끈다
|
|
86
|
+
var spinner = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_loading_spinner_spinner__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, {
|
|
87
|
+
size: size,
|
|
88
|
+
variant: props.variant === 'primary' ? 'inverse' : 'neutral',
|
|
89
|
+
delay: false
|
|
90
|
+
});
|
|
91
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_icon_button__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A, __assign({
|
|
92
|
+
ref: ref,
|
|
93
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)(className, 'icon-button', pressEffect && !busy && 'motion-press'),
|
|
94
|
+
"aria-label": label,
|
|
95
|
+
"aria-busy": busy || undefined,
|
|
96
|
+
asChild: link !== null,
|
|
97
|
+
onClick: function onClick(event) {
|
|
98
|
+
// 폼 안의 submit 버튼이 로딩 중에 다시 제출하지 않게 기본 동작까지 막는다
|
|
99
|
+
if (busy) {
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
emit('click');
|
|
104
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(event);
|
|
105
|
+
}
|
|
106
|
+
}, restProps, {
|
|
107
|
+
children: link !== null && link !== void 0 ? link : busy ? spinner : content
|
|
108
|
+
}));
|
|
109
|
+
});
|
|
110
|
+
IconButton.displayName = 'IconButton';
|
|
111
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconButton);
|
|
112
|
+
|
|
113
|
+
/***/ }
|
|
114
|
+
|
|
115
|
+
};
|
package/dist/chunk-7024.js
CHANGED
|
@@ -33,6 +33,7 @@ var CheckBoxRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwar
|
|
|
33
33
|
disabled = props.disabled,
|
|
34
34
|
className = props.className,
|
|
35
35
|
checkedProp = props.checked,
|
|
36
|
+
indeterminate = props.indeterminate,
|
|
36
37
|
onChange = props.onChange,
|
|
37
38
|
ariaLabelledBy = props["aria-labelledby"],
|
|
38
39
|
ariaLabel = props["aria-label"];
|
|
@@ -54,7 +55,8 @@ var CheckBoxRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwar
|
|
|
54
55
|
"aria-labelledby": ariaLabelledBy,
|
|
55
56
|
"aria-label": ariaLabel,
|
|
56
57
|
disabled: disabled,
|
|
57
|
-
|
|
58
|
+
// Radix 는 indeterminate 에서 누르면 true 로 넘긴다
|
|
59
|
+
checked: indeterminate ? 'indeterminate' : checked,
|
|
58
60
|
onCheckedChange: function onCheckedChange(next) {
|
|
59
61
|
return setChecked(next === true);
|
|
60
62
|
},
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 7187;
|
|
3
|
+
export const __webpack_esm_ids__ = [7187];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 7187
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ VS: () => (/* binding */ joinIds),
|
|
11
|
+
/* harmony export */ j8: () => (/* binding */ useFormFieldControl)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* unused harmony export FormFieldContext */
|
|
14
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
15
|
+
|
|
16
|
+
/** FormField 가 안의 컨트롤에 내려 주는 라벨·도움말 연결 값. FormField 밖에서는 null */
|
|
17
|
+
var FormFieldContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
|
18
|
+
/** TextField·TextArea·DropDown 이 FormField 안에 놓였을 때 라벨·도움말·오류에 스스로 잇는 데 쓴다 */
|
|
19
|
+
var useFormFieldControl = function useFormFieldControl() {
|
|
20
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FormFieldContext);
|
|
21
|
+
};
|
|
22
|
+
/** 공백으로 나뉜 id 목록을 겹치지 않게 잇는다. 쓰는 쪽이 같은 id 를 또 넘겨도 한 번만 남는다 */
|
|
23
|
+
var joinIds = function joinIds() {
|
|
24
|
+
var ids = [];
|
|
25
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
26
|
+
ids[_i] = arguments[_i];
|
|
27
|
+
}
|
|
28
|
+
return Array.from(new Set(ids.flatMap(function (id) {
|
|
29
|
+
return id ? id.split(' ') : [];
|
|
30
|
+
}))).join(' ') || undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/***/ }
|
|
34
|
+
|
|
35
|
+
};
|
package/dist/chunk-7829.js
CHANGED
|
@@ -216,15 +216,23 @@ var ToastRoot = Object.assign(ToastRootBase, {
|
|
|
216
216
|
/* harmony export */ Cc: () => (/* binding */ toastViewportProps),
|
|
217
217
|
/* harmony export */ Eg: () => (/* binding */ toastProps)
|
|
218
218
|
/* harmony export */ });
|
|
219
|
-
/* unused harmony exports variants, positions */
|
|
219
|
+
/* unused harmony exports variants, positions, surfaces */
|
|
220
220
|
var variants = ['default', 'secondary', 'success', 'warning', 'error'];
|
|
221
|
-
var positions = ['top-right', 'bottom-right', 'bottom-center'];
|
|
221
|
+
var positions = ['top-right', 'top-center', 'bottom-right', 'bottom-center'];
|
|
222
|
+
/** 토스트 판. filled 는 variant 색으로 칠한 판, card 는 흰 카드 위에 variant 색 아이콘만 둔다 */
|
|
223
|
+
var surfaces = ['filled', 'card'];
|
|
222
224
|
var toastProps = {
|
|
223
225
|
variant: {
|
|
224
226
|
type: 'className',
|
|
225
227
|
className: 'variant',
|
|
226
228
|
values: variants,
|
|
227
229
|
"default": 'default'
|
|
230
|
+
},
|
|
231
|
+
surface: {
|
|
232
|
+
type: 'className',
|
|
233
|
+
className: 'surface',
|
|
234
|
+
values: surfaces,
|
|
235
|
+
"default": 'filled'
|
|
228
236
|
}
|
|
229
237
|
};
|
|
230
238
|
var toastViewportProps = {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 8144;
|
|
3
|
+
export const __webpack_esm_ids__ = [8144];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 2017
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
13
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
14
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
15
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
16
|
+
__assign = Object.assign || function (t) {
|
|
17
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
+
s = arguments[i];
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
return __assign.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
28
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
29
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/** 이름–값 쌍이라 dl 이다 */
|
|
37
|
+
var StatRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
38
|
+
var className = props.className,
|
|
39
|
+
restProps = __rest(props, ["className"]);
|
|
40
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("dl", __assign({
|
|
41
|
+
ref: ref,
|
|
42
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat', className)
|
|
43
|
+
}, restProps));
|
|
44
|
+
});
|
|
45
|
+
StatRootBase.displayName = 'StatRoot';
|
|
46
|
+
var StatGroup = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
47
|
+
var className = props.className,
|
|
48
|
+
restProps = __rest(props, ["className"]);
|
|
49
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({
|
|
50
|
+
ref: ref,
|
|
51
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat group', className),
|
|
52
|
+
role: 'group'
|
|
53
|
+
}, restProps));
|
|
54
|
+
});
|
|
55
|
+
StatGroup.displayName = 'StatGroup';
|
|
56
|
+
var StatItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
57
|
+
var className = props.className,
|
|
58
|
+
restProps = __rest(props, ["className"]);
|
|
59
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({
|
|
60
|
+
ref: ref,
|
|
61
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat item', className)
|
|
62
|
+
}, restProps));
|
|
63
|
+
});
|
|
64
|
+
StatItem.displayName = 'StatItem';
|
|
65
|
+
/** 칸 전체를 덮는 누르는 자리. 칸 안의 dl 은 button 안에 들어갈 수 없어 형제로 둔다 */
|
|
66
|
+
var StatToggle = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
67
|
+
var className = props.className,
|
|
68
|
+
restProps = __rest(props, ["className"]);
|
|
69
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", __assign({
|
|
70
|
+
ref: ref,
|
|
71
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat toggle', className),
|
|
72
|
+
type: 'button'
|
|
73
|
+
}, restProps));
|
|
74
|
+
});
|
|
75
|
+
StatToggle.displayName = 'StatToggle';
|
|
76
|
+
var StatRoot = Object.assign(StatRootBase, {
|
|
77
|
+
Group: StatGroup,
|
|
78
|
+
Item: StatItem,
|
|
79
|
+
Toggle: StatToggle
|
|
80
|
+
});
|
|
81
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatRoot);
|
|
82
|
+
|
|
83
|
+
/***/ },
|
|
84
|
+
|
|
85
|
+
/***/ 7296
|
|
86
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
87
|
+
|
|
88
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
89
|
+
/* harmony export */ Xi: () => (/* binding */ statProps)
|
|
90
|
+
/* harmony export */ });
|
|
91
|
+
/* unused harmony exports sizes, tone, valueTone */
|
|
92
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
93
|
+
|
|
94
|
+
/** 숫자 크기. s 는 xl(상태 요약 칸), m 은 2xl(수치 타일), l 은 3xl(화면의 주 수치 하나) */
|
|
95
|
+
var sizes = ['s', 'm', 'l'];
|
|
96
|
+
/** 증감의 뜻. positive 는 좋아짐(초록), negative 는 나빠짐(빨강), neutral 은 그대로(회색). 부호와 따로다 */
|
|
97
|
+
var tone = (/* unused pure expression or super */ null && (['positive', 'negative', 'neutral']));
|
|
98
|
+
/** 숫자 색. danger 는 처리해야 할 건수(발송기한 초과 등)에만 붙는다 */
|
|
99
|
+
var valueTone = (/* unused pure expression or super */ null && (['default', 'danger']));
|
|
100
|
+
var statProps = {
|
|
101
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/***/ }
|
|
105
|
+
|
|
106
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 9350;
|
|
3
|
+
export const __webpack_esm_ids__ = [9350];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 9350
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ k: () => (/* binding */ dropDownSingleProps)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* unused harmony export sizes */
|
|
13
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
14
|
+
|
|
15
|
+
var sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
16
|
+
var dropDownSingleProps = {
|
|
17
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 's'),
|
|
18
|
+
width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('fit-content')
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/***/ }
|
|
22
|
+
|
|
23
|
+
};
|
|
@@ -7,6 +7,8 @@ import { sizes, variant } from './check-box-props';
|
|
|
7
7
|
export type CheckBoxMotionProps = Pick<ConfirmMotionProps, 'delay'>;
|
|
8
8
|
export interface CheckBoxRootProps {
|
|
9
9
|
checked?: boolean;
|
|
10
|
+
/** 일부만 골랐다는 `−` 표시. `checked` 보다 앞선다. 누르면 `onChange(true)` */
|
|
11
|
+
indeterminate?: boolean;
|
|
10
12
|
onChange?: (checked: boolean) => void;
|
|
11
13
|
id: string;
|
|
12
14
|
disabled?: boolean;
|
|
@@ -39,6 +39,8 @@ export declare const Sizes: Story;
|
|
|
39
39
|
export declare const Variants: Story;
|
|
40
40
|
/** 체크된 상태로 고정된 체크박스다. */
|
|
41
41
|
export declare const Checked: Story;
|
|
42
|
+
/** 일부만 고른 묶음의 머리 체크박스다. 보라 채움에 흰 `−` 가 보이고 누르면 onChange(true) 가 불린다. */
|
|
43
|
+
export declare const Indeterminate: Story;
|
|
42
44
|
/** disabled 체크박스를 체크 안 됨과 체크됨으로 나란히 그렸다. 두 상태 모두 흐려지는지 본다. */
|
|
43
45
|
export declare const Disabled: Story;
|
|
44
46
|
/** 라벨 없이 상자만 있는 체크박스다. */
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 칩이 놓이는 바탕의 무게. filled 는 페이지 바탕 위, outlined 는 카드·시트 안, ghost 는 촘촘하거나 보조 필터.
|
|
3
|
+
* tab 은 같은 목록의 상태 거르기(고르면 회색 알약, 개수는 알약), toggle 은 따로 켜고 끄는 점선 칩(multiple 전용)
|
|
4
|
+
*/
|
|
5
|
+
export declare const variant: readonly ["filled", "outlined", "ghost", "tab", "toggle"];
|
|
3
6
|
/** s 는 페이지 바탕 위(36), xs 는 카드·시트 안(28) */
|
|
4
7
|
export declare const sizes: readonly ["xs", "s"];
|
|
5
8
|
export declare const chipGroupProps: {
|
|
6
9
|
variant: {
|
|
7
10
|
type: "className";
|
|
8
11
|
className: string;
|
|
9
|
-
values: readonly ["filled", "outlined", "ghost"];
|
|
12
|
+
values: readonly ["filled", "outlined", "ghost", "tab", "toggle"];
|
|
10
13
|
default: "filled";
|
|
11
14
|
};
|
|
12
15
|
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s"]>;
|
|
@@ -10,15 +10,17 @@ export interface ChipGroupItem {
|
|
|
10
10
|
count?: number;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
13
|
+
export type ChipGroupVariant = (typeof variant)[number];
|
|
13
14
|
interface ChipGroupCommonProps extends StyleProps, TrackProps, PressEffectProps {
|
|
14
15
|
items: ChipGroupItem[];
|
|
15
16
|
/** 'aria-label' 로 붙는다 (예: '캠페인 종류') */
|
|
16
17
|
label: string;
|
|
17
|
-
variant?: (typeof variant)[number];
|
|
18
18
|
size?: (typeof sizes)[number];
|
|
19
19
|
}
|
|
20
20
|
/** 하나를 골라 목록을 거르는 필터 (기본). 늘 하나가 골라져 있다 */
|
|
21
21
|
export interface ChipGroupSingleProps extends ChipGroupCommonProps {
|
|
22
|
+
/** toggle 은 칩마다 따로 켜고 끄는 모양이라 하나 고르기에는 없다 */
|
|
23
|
+
variant?: Exclude<ChipGroupVariant, 'toggle'>;
|
|
22
24
|
multiple?: false;
|
|
23
25
|
value?: string;
|
|
24
26
|
defaultValue?: string;
|
|
@@ -27,6 +29,7 @@ export interface ChipGroupSingleProps extends ChipGroupCommonProps {
|
|
|
27
29
|
}
|
|
28
30
|
/** 여러 개를 고르는 입력. 고른 칩을 다시 누르면 풀린다. 칩은 줄을 바꿔 늘어놓는다 */
|
|
29
31
|
export interface ChipGroupMultipleProps extends ChipGroupCommonProps {
|
|
32
|
+
variant?: ChipGroupVariant;
|
|
30
33
|
multiple: true;
|
|
31
34
|
value?: string[];
|
|
32
35
|
defaultValue?: string[];
|
|
@@ -15,7 +15,7 @@ declare const meta: {
|
|
|
15
15
|
control: {
|
|
16
16
|
type: "select";
|
|
17
17
|
};
|
|
18
|
-
options: readonly ["filled", "outlined", "ghost"];
|
|
18
|
+
options: readonly ["filled", "outlined", "ghost", "tab", "toggle"];
|
|
19
19
|
};
|
|
20
20
|
size: {
|
|
21
21
|
control: {
|
|
@@ -48,8 +48,12 @@ export default meta;
|
|
|
48
48
|
type Story = StoryObj<typeof meta>;
|
|
49
49
|
/** 캠페인 종류를 고르는 칩 묶음이다. 누르면 선택이 옮겨간다. 칩 옆 개수와 비활성인 이벤트 칩을 본다. */
|
|
50
50
|
export declare const Default: Story;
|
|
51
|
-
/**
|
|
51
|
+
/** 하나 고르기의 variant 를 같은 항목으로 나란히 놓았다. 고른 칩의 모양 차이를 본다. toggle 은 ToggleFilters 에 있다. */
|
|
52
52
|
export declare const Variants: Story;
|
|
53
|
+
/** 같은 목록의 상태 거르기 칩 탭(variant tab). 고르면 회색 알약, 개수는 알약이고 고른 칩에서 진해진다. */
|
|
54
|
+
export declare const StatusTabs: Story;
|
|
55
|
+
/** 따로 켜고 끄는 점선 토글 칩(variant toggle + multiple). 둘은 서로 상관없이 켜지고 꺼진다. */
|
|
56
|
+
export declare const ToggleFilters: Story;
|
|
53
57
|
/** 두 크기. s 는 페이지 바탕 위, xs 는 카드·시트 안에 들어가는 크기다. */
|
|
54
58
|
export declare const Sizes: Story;
|
|
55
59
|
/** 카드 안에 들어간 outlined xs. 상자 안에서 채움 없이 가볍게 보이는지 본다. */
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* between 은 이름 왼쪽·값 오른쪽 끝(금액 내역), side 는 고정 폭 이름 칸 옆에 값(정보 카드),
|
|
3
|
+
* grid 는 회색 이름 칸과 값 칸이 번갈아 서는 4열 표(정산·계약 정보)다. grid 는 좁은 화면에서 2열이 된다
|
|
4
|
+
*/
|
|
5
|
+
export declare const layout: readonly ["between", "side", "grid"];
|
|
6
|
+
export declare const descriptionListProps: {
|
|
7
|
+
layout: {
|
|
8
|
+
type: "className";
|
|
9
|
+
className: string;
|
|
10
|
+
values: readonly ["between", "side", "grid"];
|
|
11
|
+
default: "between";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/** 복사한 뒤 체크 아이콘과 알림 문구를 두는 시간(ms) */
|
|
15
|
+
export declare const COPY_FEEDBACK_MS = 2000;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { layout } from './description-list-props';
|
|
3
4
|
export type BaseDescriptionListProps = ComponentPropsWithRef<'dl'>;
|
|
4
5
|
export interface DescriptionListItem {
|
|
5
6
|
id: string;
|
|
6
7
|
label: ReactNode;
|
|
7
8
|
value: ReactNode;
|
|
8
|
-
/** 합계 줄. 위에 구분선이 생기고 값이 굵고
|
|
9
|
+
/** 합계 줄. 위에 구분선이 생기고 값이 굵고 커진다. layout 'between' 에서만 모양이 바뀐다 */
|
|
9
10
|
total?: boolean;
|
|
11
|
+
/** 주면 값 옆에 복사 버튼이 붙는다. 누르면 이 글을 클립보드에 쓰고 잠시 체크 아이콘과 "복사했어요" 알림을 준다 */
|
|
12
|
+
copyValue?: string;
|
|
10
13
|
}
|
|
11
14
|
export interface DescriptionListProps extends StyleProps {
|
|
12
15
|
items: DescriptionListItem[];
|
|
16
|
+
/** `between`(기본) 이름 왼쪽·값 오른쪽 끝, `side` 고정 폭 이름 칸 옆에 값, `grid` 회색 이름 칸 4열 표(좁은 화면 2열) */
|
|
17
|
+
layout?: (typeof layout)[number];
|
|
18
|
+
}
|
|
19
|
+
/** 마지막 복사 결과. 이 줄의 아이콘과 알림 문구를 정한다 */
|
|
20
|
+
export interface DescriptionListCopyState {
|
|
21
|
+
id: string;
|
|
22
|
+
result: 'copied' | 'failed';
|
|
13
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DescriptionListProps } from './description-list-type';
|
|
2
|
-
/** 이름–값 요약.
|
|
2
|
+
/** 이름–값 요약. between(값 오른쪽 끝)·side(이름 칸 옆)·grid(회색 이름 칸 4열 표) */
|
|
3
3
|
declare const DescriptionList: import("react").ForwardRefExoticComponent<DescriptionListProps & import("react").RefAttributes<HTMLDListElement>>;
|
|
4
4
|
export default DescriptionList;
|
|
5
5
|
export type { DescriptionListProps } from './description-list-type';
|
|
@@ -25,3 +25,10 @@ export declare const Default: Story;
|
|
|
25
25
|
export declare const WithTotal: Story;
|
|
26
26
|
/** 값이 길면 줄을 바꾸고 오른쪽 정렬을 지킨다 */
|
|
27
27
|
export declare const LongValue: Story;
|
|
28
|
+
/** 값 옆 복사 버튼. 누르면 복사하고 체크 아이콘과 "복사했어요" 알림을 잠시 준다 */
|
|
29
|
+
export declare const Copyable: Story;
|
|
30
|
+
/** side: 고정 폭 이름 칸 옆에 값이 왼쪽부터 선다(정보 카드) */
|
|
31
|
+
export declare const Side: Story;
|
|
32
|
+
/** grid: 회색 이름 칸 4열 표. 값 안에 회색 칩을 둔다. 좁은 화면에서는 이름|값 2열로 접힌다 */
|
|
33
|
+
export declare const Grid: Story;
|
|
34
|
+
export declare const GridMobile: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
3
3
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
4
4
|
import { TrackProps } from '../logging/logging-type';
|
|
@@ -12,7 +12,7 @@ export interface DropDownRootProps {
|
|
|
12
12
|
onValueChange?: (value: string) => void;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export interface DropDownTriggerProps extends AsChildProps, StyleProps {
|
|
15
|
+
export interface DropDownTriggerProps extends AsChildProps, StyleProps, Pick<ComponentPropsWithRef<'button'>, 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-invalid' | 'aria-required'> {
|
|
16
16
|
}
|
|
17
17
|
export interface DropDownValueProps extends AsChildProps, StyleProps {
|
|
18
18
|
defaultValue?: string;
|
|
@@ -29,6 +29,8 @@ export interface DropDownItemProps extends AsChildProps {
|
|
|
29
29
|
value: string;
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
onClick?: () => void;
|
|
32
|
+
/** 고른 항목에만 보이는 표시(Radix ItemIndicator 안). 글 오른쪽에 놓인다 */
|
|
33
|
+
indicator?: ReactNode;
|
|
32
34
|
}
|
|
33
35
|
export interface DropDownProps extends StyleProps, TrackProps, PressEffectProps {
|
|
34
36
|
size?: (typeof sizes)[number];
|
|
@@ -47,6 +49,16 @@ export interface DropDownProps extends StyleProps, TrackProps, PressEffectProps
|
|
|
47
49
|
}) => ReactNode;
|
|
48
50
|
placeholder?: ReactNode;
|
|
49
51
|
disabled?: boolean;
|
|
52
|
+
/** 트리거 선이 빨개지고 트리거에 aria-invalid 가 붙는다 */
|
|
53
|
+
isError?: boolean;
|
|
54
|
+
/** 트리거 버튼의 id. 바깥 `label htmlFor`(FormField `htmlFor`)가 가리킨다 */
|
|
55
|
+
id?: string;
|
|
56
|
+
/** 트리거의 이름. 보이는 라벨이 없을 때 준다 */
|
|
57
|
+
'aria-label'?: string;
|
|
58
|
+
/** 트리거의 이름이 될 라벨의 id (FormField 함수 children 의 `labelId`) */
|
|
59
|
+
'aria-labelledby'?: string;
|
|
60
|
+
/** 트리거의 설명이 될 도움말·오류의 id (FormField 함수 children 의 `describedBy`) */
|
|
61
|
+
'aria-describedby'?: string;
|
|
50
62
|
defaultOpen?: boolean;
|
|
51
63
|
open?: boolean;
|
|
52
64
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -34,9 +34,11 @@ export declare const WithIcons: Story;
|
|
|
34
34
|
export declare const Sizes: Story;
|
|
35
35
|
/** 두 번째 옵션이 골라진 채 시작하는 드롭다운이다. 고른 값이 버튼에 보이는지 본다. */
|
|
36
36
|
export declare const Selected: Story;
|
|
37
|
+
/** isError 면 트리거 선이 빨개지고 트리거에 aria-invalid 가 붙는다. 오류 글은 아래에 따로 둔다. */
|
|
38
|
+
export declare const ErrorState: Story;
|
|
37
39
|
/** disabled 드롭다운이다. 눌러도 펼쳐지지 않는다. */
|
|
38
40
|
export declare const Disabled: Story;
|
|
39
|
-
/** 세 번째 항목은 disabled 라 고를 수 없다. */
|
|
41
|
+
/** 열린 목록이다. 고른 두 번째 항목은 굵고 오른쪽에 체크가 붙는다. 세 번째 항목은 disabled 라 고를 수 없다. */
|
|
40
42
|
export declare const Open: Story;
|
|
41
43
|
/** 열면 목록이 트리거 쪽에서 펼쳐지고 선택지가 위에서부터 30ms 간격으로 차례로 나타난다(unfold) */
|
|
42
44
|
export declare const MotionUnfold: Story;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export declare const variant: readonly ["default", "neutral", "success"];
|
|
3
3
|
/** 제목 태그. 기본 p 는 제목 단계를 정하지 않는다 */
|
|
4
4
|
export declare const titleAs: readonly ["p", "h1", "h2", "h3"];
|
|
5
|
+
/** m 은 화면·카드 한가운데, s 는 표·블록 안의 작은 빈 자리 */
|
|
6
|
+
export declare const sizes: readonly ["s", "m"];
|
|
5
7
|
export declare const emptyStateProps: {
|
|
6
8
|
variant: {
|
|
7
9
|
type: "className";
|
|
@@ -9,4 +11,5 @@ export declare const emptyStateProps: {
|
|
|
9
11
|
values: readonly ["default", "neutral", "success"];
|
|
10
12
|
default: "default";
|
|
11
13
|
};
|
|
14
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m"]>;
|
|
12
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { IconName } from '../icon/icon-type';
|
|
3
|
-
import { titleAs, variant } from './empty-state-props';
|
|
3
|
+
import { sizes, titleAs, variant } from './empty-state-props';
|
|
4
4
|
export type BaseEmptyStateProps = ComponentPropsWithRef<'div'>;
|
|
5
5
|
export interface EmptyStateCommonProps extends Omit<ComponentPropsWithRef<'div'>, 'title' | 'children'> {
|
|
6
6
|
/** 제목 한 줄 */
|
|
@@ -12,9 +12,15 @@ export interface EmptyStateCommonProps extends Omit<ComponentPropsWithRef<'div'>
|
|
|
12
12
|
action?: ReactNode;
|
|
13
13
|
/** 아이콘 원의 색. figure 에는 붙지 않는다 */
|
|
14
14
|
variant?: (typeof variant)[number];
|
|
15
|
+
/** `m`(기본) 화면·카드 가운데, `s` 표·블록 안. s 는 여백·글자가 작고 제목이 회색이다 */
|
|
16
|
+
size?: (typeof sizes)[number];
|
|
15
17
|
}
|
|
16
|
-
/** 위 그림은 아이콘 원(icon)이나 쓰는 쪽이 그린 그림(figure) 중
|
|
18
|
+
/** 위 그림은 아이콘 원(icon)이나 쓰는 쪽이 그린 그림(figure) 중 하나이거나 없다 */
|
|
17
19
|
export type EmptyStateFigureProps = {
|
|
20
|
+
/** 그림 없이 글만. 표 안 0건처럼 작은 자리에 쓴다 */
|
|
21
|
+
icon?: never;
|
|
22
|
+
figure?: never;
|
|
23
|
+
} | {
|
|
18
24
|
/** 원 안에 그릴 Icon 이름 */
|
|
19
25
|
icon: IconName;
|
|
20
26
|
figure?: never;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/** 빈 목록·오류 뒤 다시 시도·찾을 수 없음·준비 중·모두 완료 화면 */
|
|
2
2
|
declare const EmptyState: import("react").ForwardRefExoticComponent<(Omit<import("./empty-state-type").EmptyStateCommonProps & {
|
|
3
|
+
icon?: never;
|
|
4
|
+
figure?: never;
|
|
5
|
+
}, "ref"> | Omit<import("./empty-state-type").EmptyStateCommonProps & {
|
|
3
6
|
icon: import("../icon/icon-type").IconName;
|
|
4
7
|
figure?: never;
|
|
5
8
|
}, "ref"> | Omit<import("./empty-state-type").EmptyStateCommonProps & {
|