@nurihaus/web-design-system 3.26.1 → 3.28.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 +707 -80
- 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 +21 -8
- package/dist/avatar.js +37 -5
- 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/asset/asset.d.ts +3 -3
- package/dist/components/asset/asset.stories.d.ts +3 -3
- package/dist/components/avatar/avatar-type.d.ts +3 -0
- package/dist/components/avatar/avatar.stories.d.ts +4 -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 +297 -5
- 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 +2 -2
- package/dist/components/list/list-row.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 +2 -2
- 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 +1612 -123
- 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 +2105 -500
- package/dist/loading.js +6 -6
- 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 +1383 -154
- 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/primitive.d.ts +1 -0
- package/dist/tokens/generated/semantic-admin.d.ts +1 -0
- package/dist/tokens/generated/semantic-app.d.ts +2 -4
- package/dist/tokens.css +33 -9
- package/dist/tokens.js +5 -5
- package/package.json +13 -1
package/dist/index.js
CHANGED
|
@@ -1222,14 +1222,32 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
1222
1222
|
|
|
1223
1223
|
|
|
1224
1224
|
|
|
1225
|
+
/**
|
|
1226
|
+
* 대소문자가 없는 글자 중 첫 글자로 그리는 것. 한글 음절, 히라가나(ゝ 등 반복 부호 제외), 가타카나(・ー 제외),
|
|
1227
|
+
* 한자(확장 A·통합), 태국 자음·앞 모음. 태국 숫자·윗모음 같은 결합 부호는 빠진다
|
|
1228
|
+
*/
|
|
1229
|
+
var UNCASED_LETTER = /^[가-힣\u3041-\u3096\u30A1-\u30FA\u3400-\u4DBF\u4E00-\u9FFF\u0E01-\u0E2E\u0E40-\u0E44]$/;
|
|
1230
|
+
/**
|
|
1231
|
+
* 이름의 첫 글자. 대소문자가 있는 글자(영문 등)는 대문자로, 위 글자는 그대로. 그 밖(숫자·기호·이모지 등)은 없다.
|
|
1232
|
+
* \p{L} 은 빌드 대상이 ES5 라 쓸 수 없다(TS1501)
|
|
1233
|
+
*/
|
|
1234
|
+
var getInitial = function getInitial(name) {
|
|
1235
|
+
var _a;
|
|
1236
|
+
var first = (_a = name === null || name === void 0 ? void 0 : name.trim().normalize('NFC').charAt(0)) !== null && _a !== void 0 ? _a : '';
|
|
1237
|
+
// 대소문자가 있는 글자는 위아래가 다르다. 숫자·기호·이모지 반쪽은 같다
|
|
1238
|
+
var isLetter = UNCASED_LETTER.test(first) || first.toUpperCase() !== first.toLowerCase();
|
|
1239
|
+
return isLetter ? first.toUpperCase().charAt(0) : undefined;
|
|
1240
|
+
};
|
|
1225
1241
|
// Radix Avatar 는 이미지 불러오기 상태만 맡는다. 원·크기·자르기와 배지 자리는 Asset.Frame 이 그린다.
|
|
1226
1242
|
var BaseAvatar = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
1227
1243
|
var className = props.className,
|
|
1228
1244
|
src = props.src,
|
|
1229
|
-
|
|
1230
|
-
|
|
1245
|
+
alt = props.alt,
|
|
1246
|
+
name = props.name,
|
|
1231
1247
|
badge = props.badge,
|
|
1232
|
-
restProps = __rest(props, ["className", "src", "alt", "badge"]);
|
|
1248
|
+
restProps = __rest(props, ["className", "src", "alt", "name", "badge"]);
|
|
1249
|
+
var label = alt !== null && alt !== void 0 ? alt : (name === null || name === void 0 ? void 0 : name.trim()) || 'avatar';
|
|
1250
|
+
var initial = getInitial(name);
|
|
1233
1251
|
return (0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.Avatar.Root, {
|
|
1234
1252
|
asChild: true,
|
|
1235
1253
|
children: (0,jsx_runtime_.jsxs)(asset/* default */.A.Frame, __assign({
|
|
@@ -1241,8 +1259,22 @@ var BaseAvatar = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_re
|
|
|
1241
1259
|
children: [(0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.Avatar.Image, {
|
|
1242
1260
|
className: 'avatar-image',
|
|
1243
1261
|
src: src,
|
|
1244
|
-
alt:
|
|
1245
|
-
}),
|
|
1262
|
+
alt: label
|
|
1263
|
+
}), initial ?
|
|
1264
|
+
// 글자는 꾸밈이다. 사진 자리의 이름은 사진처럼 img 로 읽힌다
|
|
1265
|
+
(0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.Avatar.Fallback, __assign({
|
|
1266
|
+
className: 'avatar-fallback avatar-initial'
|
|
1267
|
+
}, label ? {
|
|
1268
|
+
role: 'img',
|
|
1269
|
+
'aria-label': label
|
|
1270
|
+
} : {
|
|
1271
|
+
'aria-hidden': true
|
|
1272
|
+
}, {
|
|
1273
|
+
children: (0,jsx_runtime_.jsx)("span", {
|
|
1274
|
+
"aria-hidden": true,
|
|
1275
|
+
children: initial
|
|
1276
|
+
})
|
|
1277
|
+
})) : (0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.Avatar.Fallback, {
|
|
1246
1278
|
className: 'avatar-fallback',
|
|
1247
1279
|
children: (0,jsx_runtime_.jsx)(defaultAvatar, {
|
|
1248
1280
|
width: '100%',
|
|
@@ -4037,6 +4069,7 @@ var CheckBoxRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwar
|
|
|
4037
4069
|
disabled = props.disabled,
|
|
4038
4070
|
className = props.className,
|
|
4039
4071
|
checkedProp = props.checked,
|
|
4072
|
+
indeterminate = props.indeterminate,
|
|
4040
4073
|
onChange = props.onChange,
|
|
4041
4074
|
ariaLabelledBy = props["aria-labelledby"],
|
|
4042
4075
|
ariaLabel = props["aria-label"];
|
|
@@ -4058,7 +4091,8 @@ var CheckBoxRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwar
|
|
|
4058
4091
|
"aria-labelledby": ariaLabelledBy,
|
|
4059
4092
|
"aria-label": ariaLabel,
|
|
4060
4093
|
disabled: disabled,
|
|
4061
|
-
|
|
4094
|
+
// Radix 는 indeterminate 에서 누르면 true 로 넘긴다
|
|
4095
|
+
checked: indeterminate ? 'indeterminate' : checked,
|
|
4062
4096
|
onCheckedChange: function onCheckedChange(next) {
|
|
4063
4097
|
return setChecked(next === true);
|
|
4064
4098
|
},
|
|
@@ -4165,8 +4199,9 @@ var checkBoxIndicatorProps = {
|
|
|
4165
4199
|
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(4560);
|
|
4166
4200
|
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3274);
|
|
4167
4201
|
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(7335);
|
|
4168
|
-
/* harmony import */ var
|
|
4169
|
-
/* harmony import */ var
|
|
4202
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(3547);
|
|
4203
|
+
/* harmony import */ var _base_check_box__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(9703);
|
|
4204
|
+
/* harmony import */ var _check_box_props__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(6278);
|
|
4170
4205
|
var __assign = undefined && undefined.__assign || function () {
|
|
4171
4206
|
__assign = Object.assign || function (t) {
|
|
4172
4207
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -4193,9 +4228,10 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
4193
4228
|
|
|
4194
4229
|
|
|
4195
4230
|
|
|
4231
|
+
|
|
4196
4232
|
var CheckBox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
4197
4233
|
var rootClassName = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, {}).className;
|
|
4198
|
-
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props,
|
|
4234
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _check_box_props__WEBPACK_IMPORTED_MODULE_8__/* .checkBoxIndicatorProps */ .l2),
|
|
4199
4235
|
label = _a.label,
|
|
4200
4236
|
indicatorClassName = _a.className,
|
|
4201
4237
|
_onChange = _a.onChange,
|
|
@@ -4209,7 +4245,7 @@ var CheckBox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
|
4209
4245
|
track: track,
|
|
4210
4246
|
trackProps: trackProps
|
|
4211
4247
|
});
|
|
4212
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
|
|
4248
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_check_box__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, __assign({
|
|
4213
4249
|
ref: ref,
|
|
4214
4250
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)(rootClassName, 'check-box'),
|
|
4215
4251
|
onChange: function onChange(checked) {
|
|
@@ -4223,12 +4259,15 @@ var CheckBox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
|
4223
4259
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {
|
|
4224
4260
|
className: 'check-box-rest-icon',
|
|
4225
4261
|
"aria-hidden": 'true'
|
|
4226
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
4262
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_check_box__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.Indicator, {
|
|
4227
4263
|
className: 'check-box-indicator',
|
|
4228
4264
|
delay: delay,
|
|
4229
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
4265
|
+
children: restProps.indeterminate ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
4266
|
+
name: 'minus',
|
|
4267
|
+
size: 'xs'
|
|
4268
|
+
}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {})
|
|
4230
4269
|
})]
|
|
4231
|
-
}), label && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
4270
|
+
}), label && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_check_box__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.Label, {
|
|
4232
4271
|
children: label
|
|
4233
4272
|
})]
|
|
4234
4273
|
}));
|
|
@@ -4259,6 +4298,8 @@ var useTrack = __nuri_require__(4560);
|
|
|
4259
4298
|
var classNames = __nuri_require__(3274);
|
|
4260
4299
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
4261
4300
|
var getMergedProps = __nuri_require__(7335);
|
|
4301
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
4302
|
+
var icon = __nuri_require__(3547);
|
|
4262
4303
|
// EXTERNAL MODULE: external {"root":"RadixUI","commonjs2":"radix-ui","commonjs":"radix-ui","amd":"radix-ui","module":"radix-ui"}
|
|
4263
4304
|
var external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_ = __nuri_require__(0);
|
|
4264
4305
|
;// ./components/chip-group/base-chip-group.tsx
|
|
@@ -4339,8 +4380,11 @@ var ChipGroupRoot = Object.assign(ChipGroupRootBase, {
|
|
|
4339
4380
|
var common_props = __nuri_require__(7298);
|
|
4340
4381
|
;// ./components/chip-group/chip-group-props.ts
|
|
4341
4382
|
|
|
4342
|
-
/**
|
|
4343
|
-
|
|
4383
|
+
/**
|
|
4384
|
+
* 칩이 놓이는 바탕의 무게. filled 는 페이지 바탕 위, outlined 는 카드·시트 안, ghost 는 촘촘하거나 보조 필터.
|
|
4385
|
+
* tab 은 같은 목록의 상태 거르기(고르면 회색 알약, 개수는 알약), toggle 은 따로 켜고 끄는 점선 칩(multiple 전용)
|
|
4386
|
+
*/
|
|
4387
|
+
var variant = ['filled', 'outlined', 'ghost', 'tab', 'toggle'];
|
|
4344
4388
|
/** s 는 페이지 바탕 위(36), xs 는 카드·시트 안(28) */
|
|
4345
4389
|
var sizes = ['xs', 's'];
|
|
4346
4390
|
var chipGroupProps = {
|
|
@@ -4371,13 +4415,19 @@ var chip_group_assign = undefined && undefined.__assign || function () {
|
|
|
4371
4415
|
|
|
4372
4416
|
|
|
4373
4417
|
|
|
4418
|
+
|
|
4374
4419
|
var chipClassName = function chipClassName(pressEffect) {
|
|
4375
4420
|
return (0,classNames/* classNames */.x)('chip-group-chip', pressEffect && 'motion-press motion-press-dim');
|
|
4376
4421
|
};
|
|
4377
4422
|
var ChipLabel = function ChipLabel(props) {
|
|
4378
|
-
var item = props.item
|
|
4423
|
+
var item = props.item,
|
|
4424
|
+
variant = props.variant;
|
|
4379
4425
|
return (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
4380
|
-
children: [
|
|
4426
|
+
children: [variant === 'toggle' && (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
4427
|
+
name: 'check',
|
|
4428
|
+
size: 'xs',
|
|
4429
|
+
className: 'chip-group-check'
|
|
4430
|
+
}), item.label, item.count !== undefined && (0,jsx_runtime_.jsx)("span", {
|
|
4381
4431
|
className: 'chip-group-count',
|
|
4382
4432
|
children: item.count
|
|
4383
4433
|
})]
|
|
@@ -4488,7 +4538,8 @@ var MultipleChipGroup = /*#__PURE__*/(0,external_root_React_commonjs2_react_comm
|
|
|
4488
4538
|
value: item.id,
|
|
4489
4539
|
disabled: item.disabled || full && !selected.includes(item.id),
|
|
4490
4540
|
children: (0,jsx_runtime_.jsx)(ChipLabel, {
|
|
4491
|
-
item: item
|
|
4541
|
+
item: item,
|
|
4542
|
+
variant: props.variant
|
|
4492
4543
|
})
|
|
4493
4544
|
}, item.id);
|
|
4494
4545
|
})
|
|
@@ -4909,6 +4960,8 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ =
|
|
|
4909
4960
|
var classNames = __nuri_require__(3274);
|
|
4910
4961
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
4911
4962
|
var getMergedProps = __nuri_require__(7335);
|
|
4963
|
+
// EXTERNAL MODULE: ./components/icon-button/icon-button.tsx
|
|
4964
|
+
var icon_button = __nuri_require__(4955);
|
|
4912
4965
|
;// ./components/description-list/base-description-list.tsx
|
|
4913
4966
|
var __assign = undefined && undefined.__assign || function () {
|
|
4914
4967
|
__assign = Object.assign || function (t) {
|
|
@@ -4942,8 +4995,21 @@ var BaseDescriptionList = /*#__PURE__*/(0,external_root_React_commonjs2_react_co
|
|
|
4942
4995
|
BaseDescriptionList.displayName = 'BaseDescriptionList';
|
|
4943
4996
|
/* harmony default export */ const base_description_list = (BaseDescriptionList);
|
|
4944
4997
|
;// ./components/description-list/description-list-props.ts
|
|
4945
|
-
|
|
4946
|
-
|
|
4998
|
+
/**
|
|
4999
|
+
* between 은 이름 왼쪽·값 오른쪽 끝(금액 내역), side 는 고정 폭 이름 칸 옆에 값(정보 카드),
|
|
5000
|
+
* grid 는 회색 이름 칸과 값 칸이 번갈아 서는 4열 표(정산·계약 정보)다. grid 는 좁은 화면에서 2열이 된다
|
|
5001
|
+
*/
|
|
5002
|
+
var layout = ['between', 'side', 'grid'];
|
|
5003
|
+
var descriptionListProps = {
|
|
5004
|
+
layout: {
|
|
5005
|
+
type: 'className',
|
|
5006
|
+
className: 'layout',
|
|
5007
|
+
values: layout,
|
|
5008
|
+
"default": 'between'
|
|
5009
|
+
}
|
|
5010
|
+
};
|
|
5011
|
+
/** 복사한 뒤 체크 아이콘과 알림 문구를 두는 시간(ms) */
|
|
5012
|
+
var COPY_FEEDBACK_MS = 2000;
|
|
4947
5013
|
;// ./components/description-list/description-list.tsx
|
|
4948
5014
|
var description_list_assign = undefined && undefined.__assign || function () {
|
|
4949
5015
|
description_list_assign = Object.assign || function (t) {
|
|
@@ -4955,6 +5021,117 @@ var description_list_assign = undefined && undefined.__assign || function () {
|
|
|
4955
5021
|
};
|
|
4956
5022
|
return description_list_assign.apply(this, arguments);
|
|
4957
5023
|
};
|
|
5024
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5025
|
+
function adopt(value) {
|
|
5026
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
5027
|
+
resolve(value);
|
|
5028
|
+
});
|
|
5029
|
+
}
|
|
5030
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5031
|
+
function fulfilled(value) {
|
|
5032
|
+
try {
|
|
5033
|
+
step(generator.next(value));
|
|
5034
|
+
} catch (e) {
|
|
5035
|
+
reject(e);
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
5038
|
+
function rejected(value) {
|
|
5039
|
+
try {
|
|
5040
|
+
step(generator["throw"](value));
|
|
5041
|
+
} catch (e) {
|
|
5042
|
+
reject(e);
|
|
5043
|
+
}
|
|
5044
|
+
}
|
|
5045
|
+
function step(result) {
|
|
5046
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5047
|
+
}
|
|
5048
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5049
|
+
});
|
|
5050
|
+
};
|
|
5051
|
+
var __generator = undefined && undefined.__generator || function (thisArg, body) {
|
|
5052
|
+
var _ = {
|
|
5053
|
+
label: 0,
|
|
5054
|
+
sent: function sent() {
|
|
5055
|
+
if (t[0] & 1) throw t[1];
|
|
5056
|
+
return t[1];
|
|
5057
|
+
},
|
|
5058
|
+
trys: [],
|
|
5059
|
+
ops: []
|
|
5060
|
+
},
|
|
5061
|
+
f,
|
|
5062
|
+
y,
|
|
5063
|
+
t,
|
|
5064
|
+
g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
5065
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
5066
|
+
return this;
|
|
5067
|
+
}), g;
|
|
5068
|
+
function verb(n) {
|
|
5069
|
+
return function (v) {
|
|
5070
|
+
return step([n, v]);
|
|
5071
|
+
};
|
|
5072
|
+
}
|
|
5073
|
+
function step(op) {
|
|
5074
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
5075
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
5076
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
5077
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
5078
|
+
switch (op[0]) {
|
|
5079
|
+
case 0:
|
|
5080
|
+
case 1:
|
|
5081
|
+
t = op;
|
|
5082
|
+
break;
|
|
5083
|
+
case 4:
|
|
5084
|
+
_.label++;
|
|
5085
|
+
return {
|
|
5086
|
+
value: op[1],
|
|
5087
|
+
done: false
|
|
5088
|
+
};
|
|
5089
|
+
case 5:
|
|
5090
|
+
_.label++;
|
|
5091
|
+
y = op[1];
|
|
5092
|
+
op = [0];
|
|
5093
|
+
continue;
|
|
5094
|
+
case 7:
|
|
5095
|
+
op = _.ops.pop();
|
|
5096
|
+
_.trys.pop();
|
|
5097
|
+
continue;
|
|
5098
|
+
default:
|
|
5099
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
5100
|
+
_ = 0;
|
|
5101
|
+
continue;
|
|
5102
|
+
}
|
|
5103
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
5104
|
+
_.label = op[1];
|
|
5105
|
+
break;
|
|
5106
|
+
}
|
|
5107
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
5108
|
+
_.label = t[1];
|
|
5109
|
+
t = op;
|
|
5110
|
+
break;
|
|
5111
|
+
}
|
|
5112
|
+
if (t && _.label < t[2]) {
|
|
5113
|
+
_.label = t[2];
|
|
5114
|
+
_.ops.push(op);
|
|
5115
|
+
break;
|
|
5116
|
+
}
|
|
5117
|
+
if (t[2]) _.ops.pop();
|
|
5118
|
+
_.trys.pop();
|
|
5119
|
+
continue;
|
|
5120
|
+
}
|
|
5121
|
+
op = body.call(thisArg, _);
|
|
5122
|
+
} catch (e) {
|
|
5123
|
+
op = [6, e];
|
|
5124
|
+
y = 0;
|
|
5125
|
+
} finally {
|
|
5126
|
+
f = t = 0;
|
|
5127
|
+
}
|
|
5128
|
+
if (op[0] & 5) throw op[1];
|
|
5129
|
+
return {
|
|
5130
|
+
value: op[0] ? op[1] : void 0,
|
|
5131
|
+
done: true
|
|
5132
|
+
};
|
|
5133
|
+
}
|
|
5134
|
+
};
|
|
4958
5135
|
var description_list_rest = undefined && undefined.__rest || function (s, e) {
|
|
4959
5136
|
var t = {};
|
|
4960
5137
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -4969,23 +5146,92 @@ var description_list_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
4969
5146
|
|
|
4970
5147
|
|
|
4971
5148
|
|
|
4972
|
-
|
|
5149
|
+
|
|
5150
|
+
var COPY_MESSAGE = {
|
|
5151
|
+
copied: '복사했어요',
|
|
5152
|
+
failed: '복사하지 못했어요'
|
|
5153
|
+
};
|
|
5154
|
+
/** 이름–값 요약. between(값 오른쪽 끝)·side(이름 칸 옆)·grid(회색 이름 칸 4열 표) */
|
|
4973
5155
|
var DescriptionList = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
4974
5156
|
var _a = (0,getMergedProps/* getMergedProps */.p)(props, descriptionListProps),
|
|
4975
5157
|
className = _a.className,
|
|
4976
5158
|
items = _a.items,
|
|
4977
5159
|
restProps = description_list_rest(_a, ["className", "items"]);
|
|
5160
|
+
var _b = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(null),
|
|
5161
|
+
copy = _b[0],
|
|
5162
|
+
setCopy = _b[1];
|
|
5163
|
+
var resetTimer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(undefined);
|
|
5164
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useEffect)(function () {
|
|
5165
|
+
return function () {
|
|
5166
|
+
return clearTimeout(resetTimer.current);
|
|
5167
|
+
};
|
|
5168
|
+
}, []);
|
|
5169
|
+
// 클립보드는 권한·보안 문맥(https)에 따라 거절된다. 실패도 알림 문구로 알린다
|
|
5170
|
+
var copyItem = function copyItem(item) {
|
|
5171
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
5172
|
+
var result, _a;
|
|
5173
|
+
return __generator(this, function (_b) {
|
|
5174
|
+
switch (_b.label) {
|
|
5175
|
+
case 0:
|
|
5176
|
+
result = 'copied';
|
|
5177
|
+
_b.label = 1;
|
|
5178
|
+
case 1:
|
|
5179
|
+
_b.trys.push([1, 3,, 4]);
|
|
5180
|
+
return [4 /*yield*/, navigator.clipboard.writeText(item.copyValue)];
|
|
5181
|
+
case 2:
|
|
5182
|
+
_b.sent();
|
|
5183
|
+
return [3 /*break*/, 4];
|
|
5184
|
+
case 3:
|
|
5185
|
+
_a = _b.sent();
|
|
5186
|
+
result = 'failed';
|
|
5187
|
+
return [3 /*break*/, 4];
|
|
5188
|
+
case 4:
|
|
5189
|
+
setCopy({
|
|
5190
|
+
id: item.id,
|
|
5191
|
+
result: result
|
|
5192
|
+
});
|
|
5193
|
+
clearTimeout(resetTimer.current);
|
|
5194
|
+
resetTimer.current = setTimeout(function () {
|
|
5195
|
+
return setCopy(null);
|
|
5196
|
+
}, COPY_FEEDBACK_MS);
|
|
5197
|
+
return [2 /*return*/];
|
|
5198
|
+
}
|
|
5199
|
+
});
|
|
5200
|
+
});
|
|
5201
|
+
};
|
|
4978
5202
|
return (0,jsx_runtime_.jsx)(base_description_list, description_list_assign({
|
|
4979
5203
|
ref: ref,
|
|
4980
5204
|
className: (0,classNames/* classNames */.x)(className, 'description-list')
|
|
4981
5205
|
}, restProps, {
|
|
4982
5206
|
children: items.map(function (item) {
|
|
5207
|
+
var copyValue = item.copyValue;
|
|
5208
|
+
var result = (copy === null || copy === void 0 ? void 0 : copy.id) === item.id ? copy.result : null;
|
|
4983
5209
|
return (0,jsx_runtime_.jsxs)("div", {
|
|
4984
5210
|
className: (0,classNames/* classNames */.x)('description-list-item', item.total && 'total'),
|
|
4985
5211
|
children: [(0,jsx_runtime_.jsx)("dt", {
|
|
4986
5212
|
children: item.label
|
|
4987
|
-
}), (0,jsx_runtime_.jsx)("dd", {
|
|
5213
|
+
}), copyValue === undefined ? (0,jsx_runtime_.jsx)("dd", {
|
|
4988
5214
|
children: item.value
|
|
5215
|
+
}) : (0,jsx_runtime_.jsxs)("dd", {
|
|
5216
|
+
className: 'has-copy',
|
|
5217
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
5218
|
+
className: 'description-list-value',
|
|
5219
|
+
children: item.value
|
|
5220
|
+
}), (0,jsx_runtime_.jsx)(icon_button/* default */.A, {
|
|
5221
|
+
className: 'description-list-copy',
|
|
5222
|
+
size: 's',
|
|
5223
|
+
icon: result === 'copied' ? 'check' : 'copy',
|
|
5224
|
+
label: typeof item.label === 'string' ? "".concat(item.label, " \uBCF5\uC0AC") : '복사',
|
|
5225
|
+
onClick: function onClick() {
|
|
5226
|
+
return copyItem(description_list_assign(description_list_assign({}, item), {
|
|
5227
|
+
copyValue: copyValue
|
|
5228
|
+
}));
|
|
5229
|
+
}
|
|
5230
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
5231
|
+
className: 'description-list-copy-status',
|
|
5232
|
+
role: 'status',
|
|
5233
|
+
children: result && COPY_MESSAGE[result]
|
|
5234
|
+
})]
|
|
4989
5235
|
})]
|
|
4990
5236
|
}, item.id);
|
|
4991
5237
|
})
|
|
@@ -5291,34 +5537,16 @@ Drawer.displayName = 'Drawer';
|
|
|
5291
5537
|
|
|
5292
5538
|
/***/ },
|
|
5293
5539
|
|
|
5294
|
-
/***/
|
|
5540
|
+
/***/ 2735
|
|
5295
5541
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5296
5542
|
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
var jsx_runtime_ = __nuri_require__(612);
|
|
5305
|
-
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
5306
|
-
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
5307
|
-
// EXTERNAL MODULE: ./assets/icons/chevronDown.svg
|
|
5308
|
-
var chevronDown = __nuri_require__(9436);
|
|
5309
|
-
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
5310
|
-
var useExternalState = __nuri_require__(9387);
|
|
5311
|
-
// EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
|
|
5312
|
-
var useTrack = __nuri_require__(4560);
|
|
5313
|
-
// EXTERNAL MODULE: ./helpers/motion/stagger.ts
|
|
5314
|
-
var stagger = __nuri_require__(4577);
|
|
5315
|
-
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
5316
|
-
var classNames = __nuri_require__(3274);
|
|
5317
|
-
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
5318
|
-
var getMergedProps = __nuri_require__(7335);
|
|
5319
|
-
// EXTERNAL MODULE: external {"root":"RadixUI","commonjs2":"radix-ui","commonjs":"radix-ui","amd":"radix-ui","module":"radix-ui"}
|
|
5320
|
-
var external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_ = __nuri_require__(0);
|
|
5321
|
-
;// ./components/drop-down/base-drop-down.tsx
|
|
5543
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5544
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5545
|
+
/* harmony export */ });
|
|
5546
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
5547
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
5548
|
+
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(0);
|
|
5549
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(3274);
|
|
5322
5550
|
var __assign = undefined && undefined.__assign || function () {
|
|
5323
5551
|
__assign = Object.assign || function (t) {
|
|
5324
5552
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -5345,34 +5573,34 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5345
5573
|
var DropDownRootBase = function DropDownRootBase(props) {
|
|
5346
5574
|
var children = props.children,
|
|
5347
5575
|
restProps = __rest(props, ["children"]);
|
|
5348
|
-
return (0,
|
|
5576
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Root, __assign({}, restProps, {
|
|
5349
5577
|
children: children
|
|
5350
5578
|
}));
|
|
5351
5579
|
};
|
|
5352
5580
|
DropDownRootBase.displayName = 'DropDownRoot';
|
|
5353
|
-
var DropDownTrigger = /*#__PURE__*/(0,
|
|
5581
|
+
var DropDownTrigger = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5354
5582
|
var children = props.children,
|
|
5355
5583
|
className = props.className,
|
|
5356
5584
|
restProps = __rest(props, ["children", "className"]);
|
|
5357
|
-
return (0,
|
|
5585
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Trigger, __assign({
|
|
5358
5586
|
ref: ref,
|
|
5359
|
-
className: (0,
|
|
5587
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down trigger', className)
|
|
5360
5588
|
}, restProps, {
|
|
5361
5589
|
children: children
|
|
5362
5590
|
}));
|
|
5363
5591
|
});
|
|
5364
5592
|
DropDownTrigger.displayName = 'DropDownTrigger';
|
|
5365
5593
|
// ref 는 바깥 span 이 아니라 Radix 가 값을 그리는 Select.Value 에 준다.
|
|
5366
|
-
var DropDownValue = /*#__PURE__*/(0,
|
|
5594
|
+
var DropDownValue = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5367
5595
|
var className = props.className,
|
|
5368
5596
|
asChild = props.asChild,
|
|
5369
5597
|
placeholder = props.placeholder;
|
|
5370
|
-
return (0,
|
|
5371
|
-
className: (0,
|
|
5372
|
-
children: (0,
|
|
5598
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
5599
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down value', className),
|
|
5600
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Value, {
|
|
5373
5601
|
ref: ref,
|
|
5374
5602
|
asChild: asChild,
|
|
5375
|
-
placeholder: (0,
|
|
5603
|
+
placeholder: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
5376
5604
|
className: 'nuri-placeholder',
|
|
5377
5605
|
children: placeholder
|
|
5378
5606
|
})
|
|
@@ -5380,35 +5608,39 @@ var DropDownValue = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
5380
5608
|
});
|
|
5381
5609
|
});
|
|
5382
5610
|
DropDownValue.displayName = 'DropDownValue';
|
|
5383
|
-
var DropDownContent = /*#__PURE__*/(0,
|
|
5611
|
+
var DropDownContent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5384
5612
|
var children = props.children,
|
|
5385
5613
|
className = props.className,
|
|
5386
5614
|
_a = props.position,
|
|
5387
5615
|
position = _a === void 0 ? 'popper' : _a,
|
|
5388
5616
|
restProps = __rest(props, ["children", "className", "position"]);
|
|
5389
|
-
return (0,
|
|
5617
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Content, __assign({
|
|
5390
5618
|
ref: ref,
|
|
5391
|
-
className: (0,
|
|
5619
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down content', className),
|
|
5392
5620
|
position: position,
|
|
5393
5621
|
sideOffset: 4
|
|
5394
5622
|
}, restProps, {
|
|
5395
|
-
children: (0,
|
|
5623
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Viewport, {
|
|
5396
5624
|
children: children
|
|
5397
5625
|
})
|
|
5398
5626
|
}));
|
|
5399
5627
|
});
|
|
5400
5628
|
DropDownContent.displayName = 'DropDownContent';
|
|
5401
|
-
var DropDownItem = /*#__PURE__*/(0,
|
|
5629
|
+
var DropDownItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5402
5630
|
var children = props.children,
|
|
5403
5631
|
className = props.className,
|
|
5404
|
-
|
|
5405
|
-
|
|
5632
|
+
indicator = props.indicator,
|
|
5633
|
+
restProps = __rest(props, ["children", "className", "indicator"]);
|
|
5634
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Item, __assign({
|
|
5406
5635
|
ref: ref,
|
|
5407
|
-
className: (0,
|
|
5636
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down item', className)
|
|
5408
5637
|
}, restProps, {
|
|
5409
|
-
children: (0,
|
|
5638
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.ItemText, {
|
|
5410
5639
|
children: children
|
|
5411
|
-
})
|
|
5640
|
+
}), indicator != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.ItemIndicator, {
|
|
5641
|
+
className: 'nuri-theme base-drop-down item-indicator',
|
|
5642
|
+
children: indicator
|
|
5643
|
+
})]
|
|
5412
5644
|
}));
|
|
5413
5645
|
});
|
|
5414
5646
|
DropDownItem.displayName = 'DropDownItem';
|
|
@@ -5418,28 +5650,56 @@ var DropDownRoot = Object.assign(DropDownRootBase, {
|
|
|
5418
5650
|
Content: DropDownContent,
|
|
5419
5651
|
Item: DropDownItem
|
|
5420
5652
|
});
|
|
5421
|
-
/* harmony default export */ const
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5653
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropDownRoot);
|
|
5654
|
+
|
|
5655
|
+
/***/ },
|
|
5656
|
+
|
|
5657
|
+
/***/ 9350
|
|
5658
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5659
|
+
|
|
5660
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5661
|
+
/* harmony export */ k: () => (/* binding */ dropDownSingleProps)
|
|
5662
|
+
/* harmony export */ });
|
|
5663
|
+
/* unused harmony export sizes */
|
|
5664
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
5425
5665
|
|
|
5426
5666
|
var sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
5427
5667
|
var dropDownSingleProps = {
|
|
5428
|
-
size: (0,
|
|
5429
|
-
width: (0,
|
|
5668
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 's'),
|
|
5669
|
+
width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('fit-content')
|
|
5430
5670
|
};
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5671
|
+
|
|
5672
|
+
/***/ },
|
|
5673
|
+
|
|
5674
|
+
/***/ 9303
|
|
5675
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5676
|
+
|
|
5677
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5678
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5679
|
+
/* harmony export */ });
|
|
5680
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
5681
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
5682
|
+
/* harmony import */ var _assets_icons_chevronDown_svg__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(9436);
|
|
5683
|
+
/* harmony import */ var _helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(9387);
|
|
5684
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(4560);
|
|
5685
|
+
/* harmony import */ var _helpers_motion_stagger__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(4577);
|
|
5686
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(3274);
|
|
5687
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(7335);
|
|
5688
|
+
/* harmony import */ var _form_field_form_field_context__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(7187);
|
|
5689
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_9__ = __nuri_require__(3547);
|
|
5690
|
+
/* harmony import */ var _base_drop_down__WEBPACK_IMPORTED_MODULE_10__ = __nuri_require__(2735);
|
|
5691
|
+
/* harmony import */ var _drop_down_props__WEBPACK_IMPORTED_MODULE_11__ = __nuri_require__(9350);
|
|
5692
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
5693
|
+
__assign = Object.assign || function (t) {
|
|
5434
5694
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5435
5695
|
s = arguments[i];
|
|
5436
5696
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
5437
5697
|
}
|
|
5438
5698
|
return t;
|
|
5439
5699
|
};
|
|
5440
|
-
return
|
|
5700
|
+
return __assign.apply(this, arguments);
|
|
5441
5701
|
};
|
|
5442
|
-
var
|
|
5702
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
5443
5703
|
var t = {};
|
|
5444
5704
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5445
5705
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5457,14 +5717,21 @@ var drop_down_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5457
5717
|
|
|
5458
5718
|
|
|
5459
5719
|
|
|
5460
|
-
|
|
5461
|
-
|
|
5720
|
+
|
|
5721
|
+
|
|
5722
|
+
var DropDown = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5723
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_7__/* .getMergedProps */ .p)(props, _drop_down_props__WEBPACK_IMPORTED_MODULE_11__/* .dropDownSingleProps */ .k),
|
|
5462
5724
|
className = _a.className,
|
|
5463
5725
|
renderValue = _a.renderValue,
|
|
5464
5726
|
placeholder = _a.placeholder,
|
|
5465
5727
|
options = _a.options,
|
|
5466
5728
|
value = _a.value,
|
|
5467
5729
|
disabled = _a.disabled,
|
|
5730
|
+
isErrorProp = _a.isError,
|
|
5731
|
+
id = _a.id,
|
|
5732
|
+
ariaLabel = _a["aria-label"],
|
|
5733
|
+
ariaLabelledBy = _a["aria-labelledby"],
|
|
5734
|
+
ariaDescribedBy = _a["aria-describedby"],
|
|
5468
5735
|
leftIcon = _a.leftIcon,
|
|
5469
5736
|
rightIcon = _a.rightIcon,
|
|
5470
5737
|
style = _a.style,
|
|
@@ -5480,12 +5747,14 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5480
5747
|
pressEffect = _b === void 0 ? true : _b,
|
|
5481
5748
|
track = _a.track,
|
|
5482
5749
|
trackProps = _a.trackProps,
|
|
5483
|
-
restProps =
|
|
5484
|
-
var emit = (0,
|
|
5750
|
+
restProps = __rest(_a, ["className", "renderValue", "placeholder", "options", "value", "disabled", "isError", "id", 'aria-label', 'aria-labelledby', 'aria-describedby', "leftIcon", "rightIcon", "style", "renderOption", "side", "align", "position", "open", "onOpenChange", "defaultOpen", "onValueChange", "pressEffect", "track", "trackProps"]);
|
|
5751
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_4__/* .useTrack */ .n)('DropDown', {
|
|
5485
5752
|
track: track,
|
|
5486
5753
|
trackProps: trackProps
|
|
5487
5754
|
});
|
|
5488
|
-
var
|
|
5755
|
+
var field = (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_8__/* .useFormFieldControl */ .j8)();
|
|
5756
|
+
var isError = isErrorProp || (field === null || field === void 0 ? void 0 : field.invalid);
|
|
5757
|
+
var _c = (0,_helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_3__/* .useExternalState */ .C)({
|
|
5489
5758
|
prop: openProp,
|
|
5490
5759
|
handler: onOpenChangeProp,
|
|
5491
5760
|
defaultProp: defaultOpen !== null && defaultOpen !== void 0 ? defaultOpen : false
|
|
@@ -5495,7 +5764,7 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5495
5764
|
var close = function close() {
|
|
5496
5765
|
return setOpen(false);
|
|
5497
5766
|
};
|
|
5498
|
-
return (0,
|
|
5767
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A, __assign({
|
|
5499
5768
|
value: value,
|
|
5500
5769
|
disabled: disabled,
|
|
5501
5770
|
open: open,
|
|
@@ -5505,20 +5774,26 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5505
5774
|
_onValueChange === null || _onValueChange === void 0 ? void 0 : _onValueChange(next);
|
|
5506
5775
|
}
|
|
5507
5776
|
}, restProps, {
|
|
5508
|
-
children: [(0,
|
|
5509
|
-
className: (0,
|
|
5777
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Trigger, {
|
|
5778
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__/* .classNames */ .x)(className, 'drop-down-single-trigger', isError && 'error'),
|
|
5510
5779
|
style: style,
|
|
5511
|
-
|
|
5780
|
+
id: id,
|
|
5781
|
+
"aria-label": ariaLabel,
|
|
5782
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : ariaLabel ? undefined : field === null || field === void 0 ? void 0 : field.labelId,
|
|
5783
|
+
"aria-describedby": (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_8__/* .joinIds */ .VS)(ariaDescribedBy, field === null || field === void 0 ? void 0 : field.describedBy),
|
|
5784
|
+
"aria-invalid": isError || undefined,
|
|
5785
|
+
"aria-required": (field === null || field === void 0 ? void 0 : field.required) || undefined,
|
|
5786
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
|
|
5512
5787
|
className: 'nuri-display-flex nuri-ai-center drop-down-single-label',
|
|
5513
|
-
children: [leftIcon, (renderValue === null || renderValue === void 0 ? void 0 : renderValue(value)) || (0,
|
|
5788
|
+
children: [leftIcon, (renderValue === null || renderValue === void 0 ? void 0 : renderValue(value)) || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Value, {
|
|
5514
5789
|
ref: ref,
|
|
5515
5790
|
className: 'drop-down-single-value',
|
|
5516
5791
|
placeholder: placeholder
|
|
5517
5792
|
})]
|
|
5518
|
-
}), rightIcon || (0,
|
|
5793
|
+
}), rightIcon || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets_icons_chevronDown_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {
|
|
5519
5794
|
className: 'drop-down-single-icon rotate'
|
|
5520
5795
|
})]
|
|
5521
|
-
}), (0,
|
|
5796
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Content, {
|
|
5522
5797
|
className: 'drop-down-single-content motion-unfold',
|
|
5523
5798
|
side: side,
|
|
5524
5799
|
align: align,
|
|
@@ -5528,11 +5803,15 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5528
5803
|
isOpen: open,
|
|
5529
5804
|
close: close
|
|
5530
5805
|
}) : options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
5531
|
-
return (0,
|
|
5532
|
-
className: (0,
|
|
5533
|
-
style: (0,
|
|
5806
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Item, {
|
|
5807
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__/* .classNames */ .x)('drop-down-single-item motion-unfold-item', pressEffect && 'motion-press-dim'),
|
|
5808
|
+
style: (0,_helpers_motion_stagger__WEBPACK_IMPORTED_MODULE_5__/* .staggerStyle */ .L)(index),
|
|
5534
5809
|
value: option.value,
|
|
5535
5810
|
disabled: option.disabled,
|
|
5811
|
+
indicator: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, {
|
|
5812
|
+
name: 'check',
|
|
5813
|
+
size: 's'
|
|
5814
|
+
}),
|
|
5536
5815
|
children: option.label
|
|
5537
5816
|
}, option.value);
|
|
5538
5817
|
})
|
|
@@ -5540,7 +5819,7 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5540
5819
|
}));
|
|
5541
5820
|
});
|
|
5542
5821
|
DropDown.displayName = 'DropDown';
|
|
5543
|
-
/* harmony default export */ const
|
|
5822
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropDown);
|
|
5544
5823
|
|
|
5545
5824
|
/***/ },
|
|
5546
5825
|
|
|
@@ -5748,18 +6027,24 @@ var BaseEmptyState = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
5748
6027
|
});
|
|
5749
6028
|
BaseEmptyState.displayName = 'BaseEmptyState';
|
|
5750
6029
|
/* harmony default export */ const base_empty_state = (BaseEmptyState);
|
|
6030
|
+
// EXTERNAL MODULE: ./helpers/props/common-props.ts
|
|
6031
|
+
var common_props = __nuri_require__(7298);
|
|
5751
6032
|
;// ./components/empty-state/empty-state-props.ts
|
|
6033
|
+
|
|
5752
6034
|
/** 아이콘 원의 색. default 는 연보라, neutral 은 회색(오류·준비 중처럼 힘을 뺄 때), success 는 초록(끝냈을 때) */
|
|
5753
6035
|
var variant = ['default', 'neutral', 'success'];
|
|
5754
6036
|
/** 제목 태그. 기본 p 는 제목 단계를 정하지 않는다 */
|
|
5755
6037
|
var titleAs = (/* unused pure expression or super */ null && (['p', 'h1', 'h2', 'h3']));
|
|
6038
|
+
/** m 은 화면·카드 한가운데, s 는 표·블록 안의 작은 빈 자리 */
|
|
6039
|
+
var sizes = ['s', 'm'];
|
|
5756
6040
|
var emptyStateProps = {
|
|
5757
6041
|
variant: {
|
|
5758
6042
|
type: 'className',
|
|
5759
6043
|
className: 'variant',
|
|
5760
6044
|
values: variant,
|
|
5761
6045
|
"default": 'default'
|
|
5762
|
-
}
|
|
6046
|
+
},
|
|
6047
|
+
size: (0,common_props/* sizeProp */.lw)(sizes, 'm')
|
|
5763
6048
|
};
|
|
5764
6049
|
;// ./components/empty-state/empty-state.tsx
|
|
5765
6050
|
var empty_state_assign = undefined && undefined.__assign || function () {
|
|
@@ -5787,30 +6072,36 @@ var empty_state_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5787
6072
|
|
|
5788
6073
|
|
|
5789
6074
|
|
|
6075
|
+
// 아이콘 원(--empty-state-icon-box-*) 안 아이콘 크기
|
|
6076
|
+
var ICON_SIZE = {
|
|
6077
|
+
s: 'l',
|
|
6078
|
+
m: 'xl'
|
|
6079
|
+
};
|
|
5790
6080
|
/** 빈 목록·오류 뒤 다시 시도·찾을 수 없음·준비 중·모두 완료 화면 */
|
|
5791
6081
|
var EmptyState = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
5792
|
-
var _a
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
6082
|
+
var _a;
|
|
6083
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, emptyStateProps),
|
|
6084
|
+
className = _b.className,
|
|
6085
|
+
icon = _b.icon,
|
|
6086
|
+
figure = _b.figure,
|
|
6087
|
+
title = _b.title,
|
|
6088
|
+
_c = _b.titleAs,
|
|
6089
|
+
Title = _c === void 0 ? 'p' : _c,
|
|
6090
|
+
description = _b.description,
|
|
6091
|
+
action = _b.action,
|
|
6092
|
+
restProps = empty_state_rest(_b, ["className", "icon", "figure", "title", "titleAs", "description", "action"]);
|
|
5802
6093
|
return (0,jsx_runtime_.jsxs)(base_empty_state, empty_state_assign({
|
|
5803
6094
|
ref: ref,
|
|
5804
6095
|
className: (0,classNames/* classNames */.x)(className, 'empty-state'),
|
|
5805
6096
|
role: 'status'
|
|
5806
6097
|
}, restProps, {
|
|
5807
|
-
children: [icon
|
|
6098
|
+
children: [icon && (0,jsx_runtime_.jsx)("span", {
|
|
5808
6099
|
className: 'empty-state-icon',
|
|
5809
6100
|
children: (0,jsx_runtime_.jsx)(icon_icon/* default */.A, {
|
|
5810
6101
|
name: icon,
|
|
5811
|
-
size: '
|
|
6102
|
+
size: ICON_SIZE[(_a = props.size) !== null && _a !== void 0 ? _a : 'm']
|
|
5812
6103
|
})
|
|
5813
|
-
})
|
|
6104
|
+
}), figure && (0,jsx_runtime_.jsx)("div", {
|
|
5814
6105
|
className: 'empty-state-figure',
|
|
5815
6106
|
children: figure
|
|
5816
6107
|
}), (0,jsx_runtime_.jsx)(Title, {
|
|
@@ -5830,12 +6121,462 @@ EmptyState.displayName = 'EmptyState';
|
|
|
5830
6121
|
|
|
5831
6122
|
/***/ },
|
|
5832
6123
|
|
|
5833
|
-
/***/
|
|
6124
|
+
/***/ 7187
|
|
5834
6125
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5835
6126
|
|
|
6127
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
6128
|
+
/* harmony export */ VS: () => (/* binding */ joinIds),
|
|
6129
|
+
/* harmony export */ j8: () => (/* binding */ useFormFieldControl),
|
|
6130
|
+
/* harmony export */ wh: () => (/* binding */ FormFieldContext)
|
|
6131
|
+
/* harmony export */ });
|
|
6132
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
5836
6133
|
|
|
5837
|
-
|
|
5838
|
-
|
|
6134
|
+
/** FormField 가 안의 컨트롤에 내려 주는 라벨·도움말 연결 값. FormField 밖에서는 null */
|
|
6135
|
+
var FormFieldContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
|
6136
|
+
/** TextField·TextArea·DropDown 이 FormField 안에 놓였을 때 라벨·도움말·오류에 스스로 잇는 데 쓴다 */
|
|
6137
|
+
var useFormFieldControl = function useFormFieldControl() {
|
|
6138
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FormFieldContext);
|
|
6139
|
+
};
|
|
6140
|
+
/** 공백으로 나뉜 id 목록을 겹치지 않게 잇는다. 쓰는 쪽이 같은 id 를 또 넘겨도 한 번만 남는다 */
|
|
6141
|
+
var joinIds = function joinIds() {
|
|
6142
|
+
var ids = [];
|
|
6143
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6144
|
+
ids[_i] = arguments[_i];
|
|
6145
|
+
}
|
|
6146
|
+
return Array.from(new Set(ids.flatMap(function (id) {
|
|
6147
|
+
return id ? id.split(' ') : [];
|
|
6148
|
+
}))).join(' ') || undefined;
|
|
6149
|
+
};
|
|
6150
|
+
|
|
6151
|
+
/***/ },
|
|
6152
|
+
|
|
6153
|
+
/***/ 581
|
|
6154
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
6155
|
+
|
|
6156
|
+
|
|
6157
|
+
// EXPORTS
|
|
6158
|
+
__nuri_require__.d(__webpack_exports__, {
|
|
6159
|
+
A: () => (/* binding */ form_field)
|
|
6160
|
+
});
|
|
6161
|
+
|
|
6162
|
+
// EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
|
|
6163
|
+
var jsx_runtime_ = __nuri_require__(612);
|
|
6164
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
6165
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
6166
|
+
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
6167
|
+
var classNames = __nuri_require__(3274);
|
|
6168
|
+
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
6169
|
+
var getMergedProps = __nuri_require__(7335);
|
|
6170
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
6171
|
+
var icon = __nuri_require__(3547);
|
|
6172
|
+
// EXTERNAL MODULE: external {"root":"RadixUI","commonjs2":"radix-ui","commonjs":"radix-ui","amd":"radix-ui","module":"radix-ui"}
|
|
6173
|
+
var external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_ = __nuri_require__(0);
|
|
6174
|
+
;// ./components/form-field/base-form-field.tsx
|
|
6175
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
6176
|
+
__assign = Object.assign || function (t) {
|
|
6177
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6178
|
+
s = arguments[i];
|
|
6179
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6180
|
+
}
|
|
6181
|
+
return t;
|
|
6182
|
+
};
|
|
6183
|
+
return __assign.apply(this, arguments);
|
|
6184
|
+
};
|
|
6185
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
6186
|
+
var t = {};
|
|
6187
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6188
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6189
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6190
|
+
}
|
|
6191
|
+
return t;
|
|
6192
|
+
};
|
|
6193
|
+
|
|
6194
|
+
|
|
6195
|
+
|
|
6196
|
+
|
|
6197
|
+
var FormFieldRootBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6198
|
+
var className = props.className,
|
|
6199
|
+
restProps = __rest(props, ["className"]);
|
|
6200
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
6201
|
+
ref: ref,
|
|
6202
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-field root', className)
|
|
6203
|
+
}, restProps));
|
|
6204
|
+
});
|
|
6205
|
+
FormFieldRootBase.displayName = 'FormFieldRoot';
|
|
6206
|
+
var FormFieldLabel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6207
|
+
var className = props.className,
|
|
6208
|
+
htmlFor = props.htmlFor,
|
|
6209
|
+
required = props.required,
|
|
6210
|
+
children = props.children,
|
|
6211
|
+
restProps = __rest(props, ["className", "htmlFor", "required", "children"]);
|
|
6212
|
+
var mergedClassName = (0,classNames/* classNames */.x)('nuri-theme base-form-field label', className);
|
|
6213
|
+
var content = (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
6214
|
+
children: [children, required ? (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
6215
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
6216
|
+
className: 'form-field-required nuri-required-dot',
|
|
6217
|
+
"aria-hidden": 'true'
|
|
6218
|
+
}), (0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.VisuallyHidden.Root, {
|
|
6219
|
+
children: "\uD544\uC218"
|
|
6220
|
+
})]
|
|
6221
|
+
}) : null]
|
|
6222
|
+
});
|
|
6223
|
+
if (htmlFor) {
|
|
6224
|
+
return (0,jsx_runtime_.jsx)("label", __assign({
|
|
6225
|
+
ref: ref,
|
|
6226
|
+
className: mergedClassName,
|
|
6227
|
+
htmlFor: htmlFor
|
|
6228
|
+
}, restProps, {
|
|
6229
|
+
children: content
|
|
6230
|
+
}));
|
|
6231
|
+
}
|
|
6232
|
+
return (0,jsx_runtime_.jsx)("span", __assign({
|
|
6233
|
+
ref: ref,
|
|
6234
|
+
className: mergedClassName
|
|
6235
|
+
}, restProps, {
|
|
6236
|
+
children: content
|
|
6237
|
+
}));
|
|
6238
|
+
});
|
|
6239
|
+
FormFieldLabel.displayName = 'FormFieldLabel';
|
|
6240
|
+
var FormFieldPanel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6241
|
+
var className = props.className,
|
|
6242
|
+
restProps = __rest(props, ["className"]);
|
|
6243
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
6244
|
+
ref: ref,
|
|
6245
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-field panel', className)
|
|
6246
|
+
}, restProps));
|
|
6247
|
+
});
|
|
6248
|
+
FormFieldPanel.displayName = 'FormFieldPanel';
|
|
6249
|
+
var FormFieldColumns = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6250
|
+
var className = props.className,
|
|
6251
|
+
restProps = __rest(props, ["className"]);
|
|
6252
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
6253
|
+
ref: ref,
|
|
6254
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-field columns', className)
|
|
6255
|
+
}, restProps));
|
|
6256
|
+
});
|
|
6257
|
+
FormFieldColumns.displayName = 'FormFieldColumns';
|
|
6258
|
+
var FormFieldRoot = Object.assign(FormFieldRootBase, {
|
|
6259
|
+
Label: FormFieldLabel,
|
|
6260
|
+
Panel: FormFieldPanel,
|
|
6261
|
+
Columns: FormFieldColumns
|
|
6262
|
+
});
|
|
6263
|
+
/* harmony default export */ const base_form_field = (FormFieldRoot);
|
|
6264
|
+
// EXTERNAL MODULE: ./components/form-field/form-field-context.ts
|
|
6265
|
+
var form_field_context = __nuri_require__(7187);
|
|
6266
|
+
;// ./components/form-field/form-field-props.ts
|
|
6267
|
+
/** 라벨 자리. top 은 컨트롤 위, side 는 왼쪽 고정 폭 칸 */
|
|
6268
|
+
var layout = ['top', 'side'];
|
|
6269
|
+
/** FormField.Columns 한 줄의 칸 수 */
|
|
6270
|
+
var columns = [2, 3];
|
|
6271
|
+
var formFieldProps = {
|
|
6272
|
+
layout: {
|
|
6273
|
+
type: 'className',
|
|
6274
|
+
className: 'layout',
|
|
6275
|
+
values: layout,
|
|
6276
|
+
"default": 'top'
|
|
6277
|
+
}
|
|
6278
|
+
};
|
|
6279
|
+
var formFieldPanelProps = {};
|
|
6280
|
+
var formFieldColumnsProps = {
|
|
6281
|
+
columns: {
|
|
6282
|
+
type: 'css',
|
|
6283
|
+
key: '--form-field-columns',
|
|
6284
|
+
values: columns,
|
|
6285
|
+
"default": 2
|
|
6286
|
+
}
|
|
6287
|
+
};
|
|
6288
|
+
;// ./components/form-field/form-field.tsx
|
|
6289
|
+
var form_field_assign = undefined && undefined.__assign || function () {
|
|
6290
|
+
form_field_assign = Object.assign || function (t) {
|
|
6291
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6292
|
+
s = arguments[i];
|
|
6293
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6294
|
+
}
|
|
6295
|
+
return t;
|
|
6296
|
+
};
|
|
6297
|
+
return form_field_assign.apply(this, arguments);
|
|
6298
|
+
};
|
|
6299
|
+
var form_field_rest = undefined && undefined.__rest || function (s, e) {
|
|
6300
|
+
var t = {};
|
|
6301
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6302
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6303
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6304
|
+
}
|
|
6305
|
+
return t;
|
|
6306
|
+
};
|
|
6307
|
+
|
|
6308
|
+
|
|
6309
|
+
|
|
6310
|
+
|
|
6311
|
+
|
|
6312
|
+
|
|
6313
|
+
|
|
6314
|
+
|
|
6315
|
+
var isShown = function isShown(node) {
|
|
6316
|
+
return node !== undefined && node !== null && node !== false && node !== '';
|
|
6317
|
+
};
|
|
6318
|
+
/** 컨트롤 하나(또는 한 묶음)에 라벨·필수 표시·힌트·도움말·오류를 붙이는 행 */
|
|
6319
|
+
var FormFieldBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6320
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formFieldProps),
|
|
6321
|
+
className = _a.className,
|
|
6322
|
+
style = _a.style,
|
|
6323
|
+
label = _a.label,
|
|
6324
|
+
labelWidth = _a.labelWidth,
|
|
6325
|
+
required = _a.required,
|
|
6326
|
+
hint = _a.hint,
|
|
6327
|
+
labelAction = _a.labelAction,
|
|
6328
|
+
helperText = _a.helperText,
|
|
6329
|
+
errorText = _a.errorText,
|
|
6330
|
+
note = _a.note,
|
|
6331
|
+
htmlFor = _a.htmlFor,
|
|
6332
|
+
children = _a.children,
|
|
6333
|
+
restProps = form_field_rest(_a, ["className", "style", "label", "labelWidth", "required", "hint", "labelAction", "helperText", "errorText", "note", "htmlFor", "children"]);
|
|
6334
|
+
var baseId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
6335
|
+
var labelId = "".concat(baseId, "-label");
|
|
6336
|
+
var messageId = "".concat(baseId, "-message");
|
|
6337
|
+
var noteId = "".concat(baseId, "-note");
|
|
6338
|
+
var invalid = isShown(errorText);
|
|
6339
|
+
var message = invalid ? errorText : helperText;
|
|
6340
|
+
var hasMessage = isShown(message);
|
|
6341
|
+
var hasNote = isShown(note);
|
|
6342
|
+
var describedBy = [hasMessage && messageId, hasNote && noteId].filter(Boolean).join(' ') || undefined;
|
|
6343
|
+
var field = {
|
|
6344
|
+
id: htmlFor !== null && htmlFor !== void 0 ? htmlFor : "".concat(baseId, "-control"),
|
|
6345
|
+
labelId: labelId,
|
|
6346
|
+
describedBy: describedBy,
|
|
6347
|
+
invalid: invalid,
|
|
6348
|
+
required: Boolean(required)
|
|
6349
|
+
};
|
|
6350
|
+
// 안의 TextField·TextArea·DropDown 은 이 값을 읽어 스스로 잇는다. 겹친 FormField 는 제 값으로 덮는다
|
|
6351
|
+
var control = (0,jsx_runtime_.jsx)(form_field_context/* FormFieldContext */.wh.Provider, {
|
|
6352
|
+
value: field,
|
|
6353
|
+
children: typeof children === 'function' ? children(field) : children
|
|
6354
|
+
});
|
|
6355
|
+
// 숫자 px 은 React 가 사용자 변수에 단위를 붙이지 않아 여기서 붙인다
|
|
6356
|
+
var mergedStyle = labelWidth === undefined ? style : form_field_assign(form_field_assign({}, style), {
|
|
6357
|
+
'--form-field-label-width': typeof labelWidth === 'number' ? "".concat(labelWidth, "px") : labelWidth
|
|
6358
|
+
});
|
|
6359
|
+
return (0,jsx_runtime_.jsxs)(base_form_field, form_field_assign({
|
|
6360
|
+
ref: ref,
|
|
6361
|
+
className: (0,classNames/* classNames */.x)(className, 'form-field'),
|
|
6362
|
+
style: mergedStyle,
|
|
6363
|
+
role: 'group',
|
|
6364
|
+
"aria-labelledby": labelId,
|
|
6365
|
+
"aria-describedby": describedBy
|
|
6366
|
+
}, restProps, {
|
|
6367
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
6368
|
+
className: 'form-field-head',
|
|
6369
|
+
children: [(0,jsx_runtime_.jsx)(base_form_field.Label, {
|
|
6370
|
+
id: labelId,
|
|
6371
|
+
className: 'form-field-label',
|
|
6372
|
+
htmlFor: field.id,
|
|
6373
|
+
required: required,
|
|
6374
|
+
children: label
|
|
6375
|
+
}), isShown(hint) ? (0,jsx_runtime_.jsx)("span", {
|
|
6376
|
+
className: 'form-field-hint',
|
|
6377
|
+
children: hint
|
|
6378
|
+
}) : null, isShown(labelAction) ? (0,jsx_runtime_.jsx)("span", {
|
|
6379
|
+
className: 'form-field-label-action',
|
|
6380
|
+
children: labelAction
|
|
6381
|
+
}) : null]
|
|
6382
|
+
}), (0,jsx_runtime_.jsxs)("div", {
|
|
6383
|
+
className: 'form-field-body',
|
|
6384
|
+
children: [hasNote ? (0,jsx_runtime_.jsxs)("div", {
|
|
6385
|
+
className: 'form-field-control-row',
|
|
6386
|
+
children: [(0,jsx_runtime_.jsx)("div", {
|
|
6387
|
+
className: 'form-field-control',
|
|
6388
|
+
children: control
|
|
6389
|
+
}), (0,jsx_runtime_.jsxs)("p", {
|
|
6390
|
+
id: noteId,
|
|
6391
|
+
className: 'form-field-note',
|
|
6392
|
+
children: [(0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
6393
|
+
className: 'form-field-note-icon',
|
|
6394
|
+
name: 'info',
|
|
6395
|
+
size: 'xs'
|
|
6396
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
6397
|
+
children: note
|
|
6398
|
+
})]
|
|
6399
|
+
})]
|
|
6400
|
+
}) : (0,jsx_runtime_.jsx)("div", {
|
|
6401
|
+
className: 'form-field-control',
|
|
6402
|
+
children: control
|
|
6403
|
+
}), (0,jsx_runtime_.jsx)("div", {
|
|
6404
|
+
className: 'form-field-message',
|
|
6405
|
+
"aria-live": 'polite',
|
|
6406
|
+
children: hasMessage ? (0,jsx_runtime_.jsx)("p", {
|
|
6407
|
+
id: messageId,
|
|
6408
|
+
className: (0,classNames/* classNames */.x)('form-field-message-text', invalid && 'error'),
|
|
6409
|
+
children: message
|
|
6410
|
+
}) : null
|
|
6411
|
+
})]
|
|
6412
|
+
})]
|
|
6413
|
+
}));
|
|
6414
|
+
});
|
|
6415
|
+
FormFieldBase.displayName = 'FormField';
|
|
6416
|
+
/** 조건부 하위 필드를 담는 연회색 면. 안에서도 FormField 를 그대로 쓴다 */
|
|
6417
|
+
var form_field_FormFieldPanel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6418
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formFieldPanelProps),
|
|
6419
|
+
className = _a.className,
|
|
6420
|
+
restProps = form_field_rest(_a, ["className"]);
|
|
6421
|
+
return (0,jsx_runtime_.jsx)(base_form_field.Panel, form_field_assign({
|
|
6422
|
+
ref: ref,
|
|
6423
|
+
className: (0,classNames/* classNames */.x)(className, 'form-field-panel')
|
|
6424
|
+
}, restProps));
|
|
6425
|
+
});
|
|
6426
|
+
form_field_FormFieldPanel.displayName = 'FormFieldPanel';
|
|
6427
|
+
/** 짝인 값을 한 줄에 나란히 놓는 격자. 768px 미만에서는 한 열 */
|
|
6428
|
+
var form_field_FormFieldColumns = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6429
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formFieldColumnsProps),
|
|
6430
|
+
className = _a.className,
|
|
6431
|
+
restProps = form_field_rest(_a, ["className"]);
|
|
6432
|
+
return (0,jsx_runtime_.jsx)(base_form_field.Columns, form_field_assign({
|
|
6433
|
+
ref: ref,
|
|
6434
|
+
className: (0,classNames/* classNames */.x)(className, 'form-field-columns')
|
|
6435
|
+
}, restProps));
|
|
6436
|
+
});
|
|
6437
|
+
form_field_FormFieldColumns.displayName = 'FormFieldColumns';
|
|
6438
|
+
var FormField = Object.assign(FormFieldBase, {
|
|
6439
|
+
Panel: form_field_FormFieldPanel,
|
|
6440
|
+
Columns: form_field_FormFieldColumns
|
|
6441
|
+
});
|
|
6442
|
+
/* harmony default export */ const form_field = (FormField);
|
|
6443
|
+
|
|
6444
|
+
/***/ },
|
|
6445
|
+
|
|
6446
|
+
/***/ 6529
|
|
6447
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
6448
|
+
|
|
6449
|
+
|
|
6450
|
+
// EXPORTS
|
|
6451
|
+
__nuri_require__.d(__webpack_exports__, {
|
|
6452
|
+
A: () => (/* binding */ form_section)
|
|
6453
|
+
});
|
|
6454
|
+
|
|
6455
|
+
// EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
|
|
6456
|
+
var jsx_runtime_ = __nuri_require__(612);
|
|
6457
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
6458
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
6459
|
+
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
6460
|
+
var classNames = __nuri_require__(3274);
|
|
6461
|
+
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
6462
|
+
var getMergedProps = __nuri_require__(7335);
|
|
6463
|
+
;// ./components/form-section/base-form-section.tsx
|
|
6464
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
6465
|
+
__assign = Object.assign || function (t) {
|
|
6466
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6467
|
+
s = arguments[i];
|
|
6468
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6469
|
+
}
|
|
6470
|
+
return t;
|
|
6471
|
+
};
|
|
6472
|
+
return __assign.apply(this, arguments);
|
|
6473
|
+
};
|
|
6474
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
6475
|
+
var t = {};
|
|
6476
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6477
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6478
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6479
|
+
}
|
|
6480
|
+
return t;
|
|
6481
|
+
};
|
|
6482
|
+
|
|
6483
|
+
|
|
6484
|
+
|
|
6485
|
+
var BaseFormSection = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6486
|
+
var className = props.className,
|
|
6487
|
+
restProps = __rest(props, ["className"]);
|
|
6488
|
+
return (0,jsx_runtime_.jsx)("section", __assign({
|
|
6489
|
+
ref: ref,
|
|
6490
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-section', className)
|
|
6491
|
+
}, restProps));
|
|
6492
|
+
});
|
|
6493
|
+
BaseFormSection.displayName = 'BaseFormSection';
|
|
6494
|
+
/* harmony default export */ const base_form_section = (BaseFormSection);
|
|
6495
|
+
;// ./components/form-section/form-section-props.ts
|
|
6496
|
+
// 크기·변형이 없다. 섹션 카드는 한 모양이다(흰 면, lg bold 제목, 오른쪽 위 보조 버튼 자리).
|
|
6497
|
+
var titleLevel = (/* unused pure expression or super */ null && ([2, 3, 4]));
|
|
6498
|
+
var formSectionProps = {};
|
|
6499
|
+
;// ./components/form-section/form-section.tsx
|
|
6500
|
+
var form_section_assign = undefined && undefined.__assign || function () {
|
|
6501
|
+
form_section_assign = Object.assign || function (t) {
|
|
6502
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6503
|
+
s = arguments[i];
|
|
6504
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6505
|
+
}
|
|
6506
|
+
return t;
|
|
6507
|
+
};
|
|
6508
|
+
return form_section_assign.apply(this, arguments);
|
|
6509
|
+
};
|
|
6510
|
+
var form_section_rest = undefined && undefined.__rest || function (s, e) {
|
|
6511
|
+
var t = {};
|
|
6512
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6513
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6514
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6515
|
+
}
|
|
6516
|
+
return t;
|
|
6517
|
+
};
|
|
6518
|
+
|
|
6519
|
+
|
|
6520
|
+
|
|
6521
|
+
|
|
6522
|
+
|
|
6523
|
+
|
|
6524
|
+
var HEADING_OF_LEVEL = {
|
|
6525
|
+
2: 'h2',
|
|
6526
|
+
3: 'h3',
|
|
6527
|
+
4: 'h4'
|
|
6528
|
+
};
|
|
6529
|
+
/** 폼의 한 주제를 담는 흰 섹션 카드. 연회색 페이지 바탕 위에 세로로 쌓는다 */
|
|
6530
|
+
var FormSection = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6531
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formSectionProps),
|
|
6532
|
+
className = _a.className,
|
|
6533
|
+
title = _a.title,
|
|
6534
|
+
description = _a.description,
|
|
6535
|
+
_b = _a.titleLevel,
|
|
6536
|
+
titleLevel = _b === void 0 ? 3 : _b,
|
|
6537
|
+
action = _a.action,
|
|
6538
|
+
children = _a.children,
|
|
6539
|
+
restProps = form_section_rest(_a, ["className", "title", "description", "titleLevel", "action", "children"]);
|
|
6540
|
+
var titleId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
6541
|
+
var Heading = HEADING_OF_LEVEL[titleLevel];
|
|
6542
|
+
return (0,jsx_runtime_.jsxs)(base_form_section, form_section_assign({
|
|
6543
|
+
ref: ref,
|
|
6544
|
+
className: (0,classNames/* classNames */.x)(className, 'form-section'),
|
|
6545
|
+
"aria-labelledby": titleId
|
|
6546
|
+
}, restProps, {
|
|
6547
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
6548
|
+
className: 'form-section-head',
|
|
6549
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
6550
|
+
className: 'form-section-heading',
|
|
6551
|
+
children: [(0,jsx_runtime_.jsx)(Heading, {
|
|
6552
|
+
id: titleId,
|
|
6553
|
+
className: 'form-section-title',
|
|
6554
|
+
children: title
|
|
6555
|
+
}), description ? (0,jsx_runtime_.jsx)("p", {
|
|
6556
|
+
className: 'form-section-description',
|
|
6557
|
+
children: description
|
|
6558
|
+
}) : null]
|
|
6559
|
+
}), action ? (0,jsx_runtime_.jsx)("div", {
|
|
6560
|
+
className: 'form-section-action',
|
|
6561
|
+
children: action
|
|
6562
|
+
}) : null]
|
|
6563
|
+
}), (0,jsx_runtime_.jsx)("div", {
|
|
6564
|
+
className: 'form-section-body',
|
|
6565
|
+
children: children
|
|
6566
|
+
})]
|
|
6567
|
+
}));
|
|
6568
|
+
});
|
|
6569
|
+
FormSection.displayName = 'FormSection';
|
|
6570
|
+
/* harmony default export */ const form_section = (FormSection);
|
|
6571
|
+
|
|
6572
|
+
/***/ },
|
|
6573
|
+
|
|
6574
|
+
/***/ 2109
|
|
6575
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
6576
|
+
|
|
6577
|
+
|
|
6578
|
+
// EXPORTS
|
|
6579
|
+
__nuri_require__.d(__webpack_exports__, {
|
|
5839
6580
|
A: () => (/* binding */ grid_list)
|
|
5840
6581
|
});
|
|
5841
6582
|
|
|
@@ -10706,12 +11447,20 @@ var ModalRoot = Object.assign(ModalRootBase, {
|
|
|
10706
11447
|
/* harmony export */ r4: () => (/* binding */ modalWithDoubleButtonProps),
|
|
10707
11448
|
/* harmony export */ y_: () => (/* binding */ modalProps)
|
|
10708
11449
|
/* harmony export */ });
|
|
10709
|
-
/* unused harmony
|
|
11450
|
+
/* unused harmony exports sizes, align */
|
|
10710
11451
|
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
10711
11452
|
|
|
10712
|
-
var sizes = ['s', 'm', 'l'];
|
|
11453
|
+
var sizes = ['s', 'm', 'l', 'xl'];
|
|
11454
|
+
/** ModalWithDoubleButton 의 제목·버튼 자리. center 는 가운데 쌓기, start 는 왼쪽 제목 + 오른쪽 아래 버튼 */
|
|
11455
|
+
var align = ['center', 'start'];
|
|
10713
11456
|
var modalWithDoubleButtonProps = {
|
|
10714
|
-
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
11457
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm'),
|
|
11458
|
+
// 기본값을 두지 않는다. center 는 예전 DOM 그대로(클래스 없음)여야 쓰는 쪽 CSS 가 깨지지 않는다
|
|
11459
|
+
align: {
|
|
11460
|
+
type: 'className',
|
|
11461
|
+
className: 'align',
|
|
11462
|
+
values: align
|
|
11463
|
+
}
|
|
10715
11464
|
};
|
|
10716
11465
|
var modalProps = {
|
|
10717
11466
|
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
@@ -10759,35 +11508,80 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
10759
11508
|
|
|
10760
11509
|
|
|
10761
11510
|
|
|
10762
|
-
// Row 는
|
|
10763
|
-
var
|
|
10764
|
-
|
|
10765
|
-
|
|
11511
|
+
// 버튼 기본 모양. start 의 Row 는 회색 닫기 + 주색 동사(토스 모달)이고 나머지는 ghost 쪽이 outline 이다
|
|
11512
|
+
var BUTTON_DEFAULTS = {
|
|
11513
|
+
center: {
|
|
11514
|
+
row: {
|
|
11515
|
+
left: {
|
|
11516
|
+
variant: 'outline'
|
|
11517
|
+
},
|
|
11518
|
+
right: {}
|
|
11519
|
+
},
|
|
11520
|
+
column: {
|
|
11521
|
+
left: {},
|
|
11522
|
+
right: {
|
|
11523
|
+
variant: 'outline'
|
|
11524
|
+
}
|
|
11525
|
+
}
|
|
11526
|
+
},
|
|
11527
|
+
start: {
|
|
11528
|
+
row: {
|
|
11529
|
+
left: {
|
|
11530
|
+
color: 'neutral',
|
|
11531
|
+
variant: 'weak'
|
|
11532
|
+
},
|
|
11533
|
+
right: {}
|
|
11534
|
+
},
|
|
11535
|
+
column: {
|
|
11536
|
+
left: {},
|
|
11537
|
+
right: {
|
|
11538
|
+
variant: 'outline'
|
|
11539
|
+
}
|
|
11540
|
+
}
|
|
11541
|
+
}
|
|
10766
11542
|
};
|
|
10767
11543
|
var ModalWithDoubleButtonBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
10768
|
-
var _a
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
11544
|
+
var _a;
|
|
11545
|
+
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_7__/* .getMergedProps */ .p)(props, _modal_props__WEBPACK_IMPORTED_MODULE_11__/* .modalWithDoubleButtonProps */ .r4),
|
|
11546
|
+
layout = _b.layout,
|
|
11547
|
+
open = _b.open,
|
|
11548
|
+
onOpenChange = _b.onOpenChange,
|
|
11549
|
+
content = _b.content,
|
|
11550
|
+
title = _b.title,
|
|
11551
|
+
subTitle = _b.subTitle,
|
|
11552
|
+
titleIcon = _b.titleIcon,
|
|
11553
|
+
showCloseIcon = _b.showCloseIcon,
|
|
11554
|
+
left = _b.left,
|
|
11555
|
+
right = _b.right,
|
|
11556
|
+
portalContainer = _b.portalContainer,
|
|
11557
|
+
_c = _b.closeOnBackEvent,
|
|
11558
|
+
closeOnBackEvent = _c === void 0 ? true : _c,
|
|
11559
|
+
initialFocusRef = _b.initialFocusRef,
|
|
11560
|
+
footerStart = _b.footerStart,
|
|
11561
|
+
onEntered = _b.onEntered,
|
|
11562
|
+
onExited = _b.onExited,
|
|
11563
|
+
className = _b.className;
|
|
11564
|
+
var align = (_a = props.align) !== null && _a !== void 0 ? _a : 'center';
|
|
11565
|
+
var buttonDefaults = BUTTON_DEFAULTS[align][layout];
|
|
10786
11566
|
// open 을 넘기면 Radix 가 열림·포커스·Esc 를 맡는다. 안 넘기면 예전처럼 forceMount 로 늘 보인다.
|
|
10787
11567
|
var controlled = open !== undefined;
|
|
10788
|
-
var
|
|
10789
|
-
focusOnOpen =
|
|
10790
|
-
returnFocus =
|
|
11568
|
+
var _d = (0,_helpers_hooks_useReturnFocus__WEBPACK_IMPORTED_MODULE_4__/* .useReturnFocus */ .G)(),
|
|
11569
|
+
focusOnOpen = _d.focusOnOpen,
|
|
11570
|
+
returnFocus = _d.returnFocus;
|
|
11571
|
+
var onOpenAutoFocus = function onOpenAutoFocus(event) {
|
|
11572
|
+
var _a;
|
|
11573
|
+
focusOnOpen(event);
|
|
11574
|
+
(_a = initialFocusRef === null || initialFocusRef === void 0 ? void 0 : initialFocusRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11575
|
+
};
|
|
11576
|
+
var buttons = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
11577
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Close, {
|
|
11578
|
+
asChild: true,
|
|
11579
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_button_cta_button__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, __assign({}, buttonDefaults.left, left))
|
|
11580
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Close, {
|
|
11581
|
+
asChild: true,
|
|
11582
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_button_cta_button__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, __assign({}, buttonDefaults.right, right))
|
|
11583
|
+
})]
|
|
11584
|
+
});
|
|
10791
11585
|
var presence = (0,_helpers_motion_use_presence_callbacks__WEBPACK_IMPORTED_MODULE_5__/* .usePresenceCallbacks */ .r)({
|
|
10792
11586
|
open: open !== null && open !== void 0 ? open : true,
|
|
10793
11587
|
onEntered: onEntered,
|
|
@@ -10809,7 +11603,7 @@ var ModalWithDoubleButtonBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1
|
|
|
10809
11603
|
forceMount: controlled ? undefined : true,
|
|
10810
11604
|
portalContainer: portalContainer,
|
|
10811
11605
|
onAnimationEnd: presence.onAnimationEnd,
|
|
10812
|
-
onOpenAutoFocus: controlled ?
|
|
11606
|
+
onOpenAutoFocus: controlled ? onOpenAutoFocus : undefined,
|
|
10813
11607
|
onCloseAutoFocus: controlled ? returnFocus : undefined,
|
|
10814
11608
|
children: [showCloseIcon && (controlled ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Close, {
|
|
10815
11609
|
className: 'modal-with-double-button-close-button',
|
|
@@ -10839,19 +11633,17 @@ var ModalWithDoubleButtonBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1
|
|
|
10839
11633
|
})), (layout === 'column' || content) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
10840
11634
|
className: 'modal-with-double-button-content',
|
|
10841
11635
|
children: content
|
|
10842
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
11636
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
10843
11637
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__/* .classNames */ .x)('modal-with-double-button-close', layout),
|
|
10844
|
-
children:
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
},
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
}, right))
|
|
10854
|
-
})]
|
|
11638
|
+
children: align === 'start' ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
11639
|
+
children: [footerStart && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11640
|
+
className: 'modal-with-double-button-footer-start',
|
|
11641
|
+
children: footerStart
|
|
11642
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11643
|
+
className: 'modal-with-double-button-buttons',
|
|
11644
|
+
children: buttons
|
|
11645
|
+
})]
|
|
11646
|
+
}) : buttons
|
|
10855
11647
|
})]
|
|
10856
11648
|
})
|
|
10857
11649
|
});
|
|
@@ -10924,6 +11716,8 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
10924
11716
|
description = _a.description,
|
|
10925
11717
|
children = _a.children,
|
|
10926
11718
|
footer = _a.footer,
|
|
11719
|
+
footerStart = _a.footerStart,
|
|
11720
|
+
initialFocusRef = _a.initialFocusRef,
|
|
10927
11721
|
_b = _a.showCloseIcon,
|
|
10928
11722
|
showCloseIcon = _b === void 0 ? true : _b,
|
|
10929
11723
|
_c = _a.closeOnOverlayClick,
|
|
@@ -10971,6 +11765,11 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
10971
11765
|
var _g = (0,_helpers_hooks_useReturnFocus__WEBPACK_IMPORTED_MODULE_5__/* .useReturnFocus */ .G)(),
|
|
10972
11766
|
focusOnOpen = _g.focusOnOpen,
|
|
10973
11767
|
returnFocus = _g.returnFocus;
|
|
11768
|
+
var onOpenAutoFocus = function onOpenAutoFocus(event) {
|
|
11769
|
+
var _a;
|
|
11770
|
+
focusOnOpen(event);
|
|
11771
|
+
(_a = initialFocusRef === null || initialFocusRef === void 0 ? void 0 : initialFocusRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11772
|
+
};
|
|
10974
11773
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_modal__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .A, {
|
|
10975
11774
|
open: open,
|
|
10976
11775
|
onOpenChange: changeOpen,
|
|
@@ -10982,7 +11781,7 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
10982
11781
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_9__/* .classNames */ .x)(className, 'modal'),
|
|
10983
11782
|
style: style,
|
|
10984
11783
|
portalContainer: portalContainer,
|
|
10985
|
-
onOpenAutoFocus:
|
|
11784
|
+
onOpenAutoFocus: onOpenAutoFocus,
|
|
10986
11785
|
onCloseAutoFocus: trigger ? undefined : returnFocus,
|
|
10987
11786
|
"data-effect": reject.effect,
|
|
10988
11787
|
onAnimationEnd: function onAnimationEnd(event) {
|
|
@@ -11015,9 +11814,12 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
11015
11814
|
}), children && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11016
11815
|
className: 'modal-body',
|
|
11017
11816
|
children: children
|
|
11018
|
-
}), footer && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
11817
|
+
}), (footer || footerStart) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
11019
11818
|
className: 'modal-footer',
|
|
11020
|
-
children:
|
|
11819
|
+
children: [footerStart && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11820
|
+
className: 'modal-footer-start',
|
|
11821
|
+
children: footerStart
|
|
11822
|
+
}), footer]
|
|
11021
11823
|
})]
|
|
11022
11824
|
})]
|
|
11023
11825
|
});
|
|
@@ -11047,7 +11849,7 @@ var getMergedProps = __nuri_require__(7335);
|
|
|
11047
11849
|
// EXTERNAL MODULE: ./components/button/cta-button.tsx
|
|
11048
11850
|
var cta_button = __nuri_require__(910);
|
|
11049
11851
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
11050
|
-
var
|
|
11852
|
+
var icon_icon = __nuri_require__(3547);
|
|
11051
11853
|
;// ./components/notice/base-notice.tsx
|
|
11052
11854
|
var __assign = undefined && undefined.__assign || function () {
|
|
11053
11855
|
__assign = Object.assign || function (t) {
|
|
@@ -11143,10 +11945,11 @@ var Notice = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
11143
11945
|
var _a;
|
|
11144
11946
|
var _b = (0,getMergedProps/* getMergedProps */.p)(props, noticeProps),
|
|
11145
11947
|
className = _b.className,
|
|
11948
|
+
icon = _b.icon,
|
|
11146
11949
|
title = _b.title,
|
|
11147
11950
|
children = _b.children,
|
|
11148
11951
|
action = _b.action,
|
|
11149
|
-
restProps = notice_rest(_b, ["className", "title", "children", "action"]);
|
|
11952
|
+
restProps = notice_rest(_b, ["className", "icon", "title", "children", "action"]);
|
|
11150
11953
|
var variant = (_a = props.variant) !== null && _a !== void 0 ? _a : 'neutral';
|
|
11151
11954
|
return (0,jsx_runtime_.jsxs)(base_notice, notice_assign({
|
|
11152
11955
|
ref: ref,
|
|
@@ -11154,9 +11957,9 @@ var Notice = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
11154
11957
|
// danger 는 바로 읽어 준다. 쓰는 쪽이 role 을 주면 그 값이 앞선다
|
|
11155
11958
|
role: variant === 'danger' ? 'alert' : undefined
|
|
11156
11959
|
}, restProps, {
|
|
11157
|
-
children: [(0,jsx_runtime_.jsx)(
|
|
11960
|
+
children: [(0,jsx_runtime_.jsx)(icon_icon/* default */.A, {
|
|
11158
11961
|
className: 'notice-icon',
|
|
11159
|
-
name: VARIANT_ICON[variant],
|
|
11962
|
+
name: icon !== null && icon !== void 0 ? icon : VARIANT_ICON[variant],
|
|
11160
11963
|
size: 's',
|
|
11161
11964
|
weight: 'fill'
|
|
11162
11965
|
}), (0,jsx_runtime_.jsxs)("div", {
|
|
@@ -11717,6 +12520,8 @@ var useTrack = __nuri_require__(4560);
|
|
|
11717
12520
|
var classNames = __nuri_require__(3274);
|
|
11718
12521
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
11719
12522
|
var getMergedProps = __nuri_require__(7335);
|
|
12523
|
+
// EXTERNAL MODULE: ./components/drop-down/drop-down.tsx
|
|
12524
|
+
var drop_down = __nuri_require__(9303);
|
|
11720
12525
|
;// ./components/pagination/base-pagination.tsx
|
|
11721
12526
|
var __assign = undefined && undefined.__assign || function () {
|
|
11722
12527
|
__assign = Object.assign || function (t) {
|
|
@@ -11776,7 +12581,7 @@ var PaginationItem = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
11776
12581
|
PaginationItem.displayName = 'PaginationItem';
|
|
11777
12582
|
var PaginationEllipsis = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
11778
12583
|
var _a = props.children,
|
|
11779
|
-
children = _a === void 0 ? '
|
|
12584
|
+
children = _a === void 0 ? '•••' : _a,
|
|
11780
12585
|
className = props.className,
|
|
11781
12586
|
restProps = __rest(props, ["children", "className"]);
|
|
11782
12587
|
return (0,jsx_runtime_.jsx)("span", __assign({
|
|
@@ -11838,6 +12643,7 @@ var __spreadArray = undefined && undefined.__spreadArray || function (to, from,
|
|
|
11838
12643
|
|
|
11839
12644
|
|
|
11840
12645
|
|
|
12646
|
+
|
|
11841
12647
|
var range = function range(start, end) {
|
|
11842
12648
|
return Array.from({
|
|
11843
12649
|
length: end - start + 1
|
|
@@ -11884,21 +12690,38 @@ var mergePageSlots = function mergePageSlots(wide, narrow, totalPages) {
|
|
|
11884
12690
|
};
|
|
11885
12691
|
});
|
|
11886
12692
|
};
|
|
12693
|
+
var formatCount = function formatCount(count) {
|
|
12694
|
+
return count.toLocaleString('ko-KR');
|
|
12695
|
+
};
|
|
12696
|
+
/** `999개의 결과 중 1-50`. 페이지 크기를 모르면 범위 없이 `999개의 결과` */
|
|
12697
|
+
var resultText = function resultText(totalCount, page, pageSize) {
|
|
12698
|
+
if (pageSize <= 0) return formatCount(totalCount) + '개의 결과';
|
|
12699
|
+
if (totalCount === 0) return '0개의 결과 중 0';
|
|
12700
|
+
var start = (page - 1) * pageSize + 1;
|
|
12701
|
+
var end = Math.min(page * pageSize, totalCount);
|
|
12702
|
+
return formatCount(totalCount) + '개의 결과 중 ' + formatCount(start) + '-' + formatCount(end);
|
|
12703
|
+
};
|
|
11887
12704
|
var Pagination = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
11888
|
-
var _a
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
12705
|
+
var _a;
|
|
12706
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, paginationProps),
|
|
12707
|
+
className = _b.className,
|
|
12708
|
+
totalPages = _b.totalPages,
|
|
12709
|
+
pageProp = _b.page,
|
|
12710
|
+
defaultPage = _b.defaultPage,
|
|
12711
|
+
onPageChange = _b.onPageChange,
|
|
12712
|
+
_c = _b.siblingCount,
|
|
12713
|
+
siblingCount = _c === void 0 ? 1 : _c,
|
|
12714
|
+
totalCount = _b.totalCount,
|
|
12715
|
+
pageSizeProp = _b.pageSize,
|
|
12716
|
+
defaultPageSize = _b.defaultPageSize,
|
|
12717
|
+
onPageSizeChange = _b.onPageSizeChange,
|
|
12718
|
+
pageSizeOptions = _b.pageSizeOptions,
|
|
12719
|
+
disabled = _b.disabled,
|
|
12720
|
+
_d = _b.pressEffect,
|
|
12721
|
+
pressEffect = _d === void 0 ? true : _d,
|
|
12722
|
+
track = _b.track,
|
|
12723
|
+
trackProps = _b.trackProps,
|
|
12724
|
+
restProps = pagination_rest(_b, ["className", "totalPages", "page", "defaultPage", "onPageChange", "siblingCount", "totalCount", "pageSize", "defaultPageSize", "onPageSizeChange", "pageSizeOptions", "disabled", "pressEffect", "track", "trackProps"]);
|
|
11902
12725
|
var emit = (0,useTrack/* useTrack */.n)('Pagination', {
|
|
11903
12726
|
track: track,
|
|
11904
12727
|
trackProps: trackProps
|
|
@@ -11906,7 +12729,7 @@ var Pagination = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_re
|
|
|
11906
12729
|
var itemClassName = (0,classNames/* classNames */.x)('pagination-item', pressEffect && 'motion-press motion-press-dim');
|
|
11907
12730
|
var controlClassName = (0,classNames/* classNames */.x)(itemClassName, 'pagination-control');
|
|
11908
12731
|
var lastPage = Math.max(totalPages, 1);
|
|
11909
|
-
var
|
|
12732
|
+
var _e = (0,useExternalState/* useExternalState */.C)({
|
|
11910
12733
|
prop: pageProp,
|
|
11911
12734
|
handler: function handler(next) {
|
|
11912
12735
|
emit('change', String(next));
|
|
@@ -11914,56 +12737,93 @@ var Pagination = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_re
|
|
|
11914
12737
|
},
|
|
11915
12738
|
defaultProp: defaultPage !== null && defaultPage !== void 0 ? defaultPage : 1
|
|
11916
12739
|
}),
|
|
11917
|
-
pageValue =
|
|
11918
|
-
setPage =
|
|
12740
|
+
pageValue = _e[0],
|
|
12741
|
+
setPage = _e[1];
|
|
11919
12742
|
var page = Math.min(Math.max(pageValue, 1), lastPage);
|
|
11920
12743
|
var goTo = function goTo(next) {
|
|
11921
12744
|
if (next !== page) {
|
|
11922
12745
|
setPage(next);
|
|
11923
12746
|
}
|
|
11924
12747
|
};
|
|
12748
|
+
// 0 은 페이지 크기를 모른다는 뜻이다. 결과 범위 대신 전체 수만 보인다
|
|
12749
|
+
var _f = (0,useExternalState/* useExternalState */.C)({
|
|
12750
|
+
prop: pageSizeProp,
|
|
12751
|
+
handler: onPageSizeChange,
|
|
12752
|
+
defaultProp: (_a = defaultPageSize !== null && defaultPageSize !== void 0 ? defaultPageSize : pageSizeOptions === null || pageSizeOptions === void 0 ? void 0 : pageSizeOptions[0]) !== null && _a !== void 0 ? _a : 0
|
|
12753
|
+
}),
|
|
12754
|
+
pageSize = _f[0],
|
|
12755
|
+
setPageSize = _f[1];
|
|
12756
|
+
var changePageSize = function changePageSize(next) {
|
|
12757
|
+
setPageSize(next);
|
|
12758
|
+
goTo(1);
|
|
12759
|
+
};
|
|
12760
|
+
var hasSummary = totalCount != null || pageSizeOptions != null;
|
|
11925
12761
|
return (0,jsx_runtime_.jsxs)(base_pagination, pagination_assign({
|
|
11926
12762
|
ref: ref,
|
|
11927
|
-
className: (0,classNames/* classNames */.x)(className, 'pagination'),
|
|
12763
|
+
className: (0,classNames/* classNames */.x)(className, 'pagination', hasSummary && 'with-summary'),
|
|
11928
12764
|
disabled: disabled
|
|
11929
12765
|
}, restProps, {
|
|
11930
|
-
children: [(0,jsx_runtime_.
|
|
11931
|
-
className:
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
})
|
|
11940
|
-
}), mergePageSlots(getPageSlots(page, lastPage, siblingCount), getPageSlots(page, lastPage, 0), lastPage).map(function (_a) {
|
|
11941
|
-
var slot = _a.slot,
|
|
11942
|
-
shownOn = _a.shownOn;
|
|
11943
|
-
var shownOnAttribute = shownOn === 'both' ? undefined : shownOn;
|
|
11944
|
-
return typeof slot === 'number' ? (0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
11945
|
-
className: itemClassName,
|
|
11946
|
-
active: slot === page,
|
|
12766
|
+
children: [hasSummary && (0,jsx_runtime_.jsxs)("div", {
|
|
12767
|
+
className: 'pagination-summary',
|
|
12768
|
+
children: [totalCount != null && (0,jsx_runtime_.jsx)("span", {
|
|
12769
|
+
className: 'pagination-result',
|
|
12770
|
+
children: resultText(totalCount, page, pageSize)
|
|
12771
|
+
}), pageSizeOptions && (0,jsx_runtime_.jsx)(drop_down/* default */.A, {
|
|
12772
|
+
className: 'pagination-page-size',
|
|
12773
|
+
size: 'xs',
|
|
12774
|
+
"aria-label": "\uD55C \uD398\uC774\uC9C0\uC5D0 \uBCF4\uC77C \uACB0\uACFC \uC218",
|
|
11947
12775
|
disabled: disabled,
|
|
11948
|
-
|
|
12776
|
+
value: String(pageSize),
|
|
12777
|
+
options: pageSizeOptions.map(function (option) {
|
|
12778
|
+
return {
|
|
12779
|
+
value: String(option),
|
|
12780
|
+
label: formatCount(option) + '개씩 보기'
|
|
12781
|
+
};
|
|
12782
|
+
}),
|
|
12783
|
+
onValueChange: function onValueChange(next) {
|
|
12784
|
+
return changePageSize(Number(next));
|
|
12785
|
+
}
|
|
12786
|
+
})]
|
|
12787
|
+
}), (0,jsx_runtime_.jsxs)("div", {
|
|
12788
|
+
className: 'pagination-pages',
|
|
12789
|
+
children: [(0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
12790
|
+
className: controlClassName,
|
|
12791
|
+
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
12792
|
+
disabled: disabled || page <= 1,
|
|
11949
12793
|
onClick: function onClick() {
|
|
11950
|
-
return goTo(
|
|
12794
|
+
return goTo(page - 1);
|
|
11951
12795
|
},
|
|
11952
|
-
children:
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
12796
|
+
children: (0,jsx_runtime_.jsx)(chevronDown/* default */.A, {
|
|
12797
|
+
className: 'pagination-icon pagination-icon-prev'
|
|
12798
|
+
})
|
|
12799
|
+
}), mergePageSlots(getPageSlots(page, lastPage, siblingCount), getPageSlots(page, lastPage, 0), lastPage).map(function (_a) {
|
|
12800
|
+
var slot = _a.slot,
|
|
12801
|
+
shownOn = _a.shownOn;
|
|
12802
|
+
var shownOnAttribute = shownOn === 'both' ? undefined : shownOn;
|
|
12803
|
+
return typeof slot === 'number' ? (0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
12804
|
+
className: itemClassName,
|
|
12805
|
+
active: slot === page,
|
|
12806
|
+
disabled: disabled,
|
|
12807
|
+
"data-shown-on": shownOnAttribute,
|
|
12808
|
+
onClick: function onClick() {
|
|
12809
|
+
return goTo(slot);
|
|
12810
|
+
},
|
|
12811
|
+
children: slot
|
|
12812
|
+
}, slot) : (0,jsx_runtime_.jsx)(base_pagination.Ellipsis, {
|
|
12813
|
+
className: 'pagination-ellipsis',
|
|
12814
|
+
"data-shown-on": shownOnAttribute
|
|
12815
|
+
}, slot);
|
|
12816
|
+
}), (0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
12817
|
+
className: controlClassName,
|
|
12818
|
+
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
12819
|
+
disabled: disabled || page >= lastPage,
|
|
12820
|
+
onClick: function onClick() {
|
|
12821
|
+
return goTo(page + 1);
|
|
12822
|
+
},
|
|
12823
|
+
children: (0,jsx_runtime_.jsx)(chevronDown/* default */.A, {
|
|
12824
|
+
className: 'pagination-icon pagination-icon-next'
|
|
12825
|
+
})
|
|
12826
|
+
})]
|
|
11967
12827
|
})]
|
|
11968
12828
|
}));
|
|
11969
12829
|
});
|
|
@@ -12629,6 +13489,8 @@ var useTrack = __nuri_require__(4560);
|
|
|
12629
13489
|
var classNames = __nuri_require__(3274);
|
|
12630
13490
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
12631
13491
|
var getMergedProps = __nuri_require__(7335);
|
|
13492
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
13493
|
+
var icon = __nuri_require__(3547);
|
|
12632
13494
|
// EXTERNAL MODULE: external "motion/react"
|
|
12633
13495
|
var react_ = __nuri_require__(4700);
|
|
12634
13496
|
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
@@ -12669,6 +13531,13 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
12669
13531
|
|
|
12670
13532
|
|
|
12671
13533
|
|
|
13534
|
+
/** 화살표 키가 옮기는 칸 수. 라디오 묶음은 네 방향 모두 앞뒤로 옮긴다 */
|
|
13535
|
+
var ARROW_STEP = {
|
|
13536
|
+
ArrowRight: 1,
|
|
13537
|
+
ArrowDown: 1,
|
|
13538
|
+
ArrowLeft: -1,
|
|
13539
|
+
ArrowUp: -1
|
|
13540
|
+
};
|
|
12672
13541
|
var RadioContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.createContext)({
|
|
12673
13542
|
options: [],
|
|
12674
13543
|
selected: null,
|
|
@@ -12766,31 +13635,55 @@ var RadioButton = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
12766
13635
|
});
|
|
12767
13636
|
});
|
|
12768
13637
|
RadioButton.displayName = 'RadioButton';
|
|
12769
|
-
//
|
|
12770
|
-
var
|
|
13638
|
+
// 칩·칸·카드 전체가 라디오 하나다. role·aria-checked 로 선택을 알린다.
|
|
13639
|
+
var RadioChoice = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
13640
|
+
var _a;
|
|
12771
13641
|
var className = props.className,
|
|
12772
13642
|
id = props.id,
|
|
13643
|
+
part = props.part,
|
|
12773
13644
|
disabled = props.disabled,
|
|
12774
|
-
restProps = __rest(props, ["className", "id", "disabled"]);
|
|
12775
|
-
var
|
|
12776
|
-
selected =
|
|
12777
|
-
onChange =
|
|
13645
|
+
restProps = __rest(props, ["className", "id", "part", "disabled"]);
|
|
13646
|
+
var _b = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useContext)(RadioContext),
|
|
13647
|
+
selected = _b.selected,
|
|
13648
|
+
onChange = _b.onChange,
|
|
13649
|
+
options = _b.options;
|
|
12778
13650
|
var checked = id === selected;
|
|
13651
|
+
// 묶음에 Tab 정지점은 하나다. 고른 칸, 고른 칸이 없거나 막혔으면 첫 열린 칸이다
|
|
13652
|
+
var enabled = options.filter(function (option) {
|
|
13653
|
+
return !option.disabled;
|
|
13654
|
+
});
|
|
13655
|
+
var tabStop = enabled.some(function (option) {
|
|
13656
|
+
return option.id === selected;
|
|
13657
|
+
}) ? selected : (_a = enabled[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
13658
|
+
var moveByArrow = function moveByArrow(event) {
|
|
13659
|
+
var step = ARROW_STEP[event.key];
|
|
13660
|
+
if (!step) return;
|
|
13661
|
+
var group = event.currentTarget.closest('[role="radiogroup"]');
|
|
13662
|
+
if (!group) return;
|
|
13663
|
+
var radios = Array.from(group.querySelectorAll('[role="radio"]:not(:disabled)'));
|
|
13664
|
+
var next = radios[(radios.indexOf(event.currentTarget) + step + radios.length) % radios.length];
|
|
13665
|
+
if (!next || next === event.currentTarget) return;
|
|
13666
|
+
event.preventDefault();
|
|
13667
|
+
next.focus();
|
|
13668
|
+
next.click();
|
|
13669
|
+
};
|
|
12779
13670
|
return (0,jsx_runtime_.jsx)(base_button/* default */.A, __assign({
|
|
12780
13671
|
ref: ref,
|
|
12781
|
-
className: (0,classNames/* classNames */.x)('nuri-theme base-radio
|
|
13672
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-radio', part, className),
|
|
12782
13673
|
type: 'button',
|
|
12783
13674
|
role: 'radio',
|
|
12784
13675
|
"aria-checked": checked,
|
|
12785
13676
|
"data-state": checked ? 'checked' : 'unchecked',
|
|
12786
13677
|
disabled: disabled,
|
|
12787
13678
|
"data-disabled": disabled || undefined,
|
|
13679
|
+
tabIndex: id === tabStop ? 0 : -1,
|
|
12788
13680
|
onClick: function onClick() {
|
|
12789
13681
|
return onChange(id);
|
|
12790
|
-
}
|
|
13682
|
+
},
|
|
13683
|
+
onKeyDown: moveByArrow
|
|
12791
13684
|
}, restProps));
|
|
12792
13685
|
});
|
|
12793
|
-
|
|
13686
|
+
RadioChoice.displayName = 'RadioChoice';
|
|
12794
13687
|
// 고르지 않은 선택지에도 남겨 둔다. 보이고 숨는 것은 CSS 가 data-state 로 그리는 scale 이고 스프링은 그 위에 얹힌다
|
|
12795
13688
|
var RadioIndicator = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
12796
13689
|
var children = props.children,
|
|
@@ -12850,19 +13743,25 @@ var RadioRoot = Object.assign(RadioRootBase, {
|
|
|
12850
13743
|
OptionGroup: RadioOptionGroup,
|
|
12851
13744
|
Option: RadioOption,
|
|
12852
13745
|
Button: RadioButton,
|
|
12853
|
-
|
|
13746
|
+
Choice: RadioChoice,
|
|
12854
13747
|
Indicator: RadioIndicator,
|
|
12855
13748
|
Label: RadioLabel
|
|
12856
13749
|
});
|
|
12857
13750
|
/* harmony default export */ const base_radio = (RadioRoot);
|
|
12858
13751
|
;// ./components/radio/radio-props.ts
|
|
12859
|
-
var variant = ['default', 'chip'];
|
|
13752
|
+
var variant = ['default', 'chip', 'button', 'card'];
|
|
13753
|
+
var columns = [1, 2, 3];
|
|
12860
13754
|
var radioProps = {
|
|
12861
13755
|
variant: {
|
|
12862
13756
|
type: 'className',
|
|
12863
13757
|
className: 'variant',
|
|
12864
13758
|
values: variant,
|
|
12865
13759
|
"default": 'default'
|
|
13760
|
+
},
|
|
13761
|
+
columns: {
|
|
13762
|
+
type: 'css',
|
|
13763
|
+
key: '--radio-columns',
|
|
13764
|
+
values: columns
|
|
12866
13765
|
}
|
|
12867
13766
|
};
|
|
12868
13767
|
;// ./components/radio/radio.tsx
|
|
@@ -12873,6 +13772,7 @@ var radioProps = {
|
|
|
12873
13772
|
|
|
12874
13773
|
|
|
12875
13774
|
|
|
13775
|
+
|
|
12876
13776
|
// 칩은 버튼 자체가 role='radio' 라 li 는 목록 의미를 빼고 자리만 잡는다.
|
|
12877
13777
|
// 칩의 ::after 는 터치 영역이라 눌림은 딤 없이 scale 만 쓴다.
|
|
12878
13778
|
var ChipOption = function ChipOption(props) {
|
|
@@ -12883,7 +13783,8 @@ var ChipOption = function ChipOption(props) {
|
|
|
12883
13783
|
className: 'radio radio-option',
|
|
12884
13784
|
role: 'none',
|
|
12885
13785
|
disabled: option.disabled,
|
|
12886
|
-
children: (0,jsx_runtime_.jsx)(base_radio.
|
|
13786
|
+
children: (0,jsx_runtime_.jsx)(base_radio.Choice, {
|
|
13787
|
+
part: 'chip',
|
|
12887
13788
|
className: (0,classNames/* classNames */.x)('radio radio-chip', pressEffect && 'motion-press'),
|
|
12888
13789
|
style: confirmStyle,
|
|
12889
13790
|
id: option.id,
|
|
@@ -12893,6 +13794,76 @@ var ChipOption = function ChipOption(props) {
|
|
|
12893
13794
|
});
|
|
12894
13795
|
};
|
|
12895
13796
|
ChipOption.displayName = 'RadioChipOption';
|
|
13797
|
+
// 칸끼리 선을 나눠 붙은 묶음이라 줄이지 않고 딤만 쓴다. 체크는 늘 그려 두고 CSS 가 data-state 로 보인다.
|
|
13798
|
+
var ButtonOption = function ButtonOption(props) {
|
|
13799
|
+
var option = props.option,
|
|
13800
|
+
pressEffect = props.pressEffect,
|
|
13801
|
+
confirmStyle = props.confirmStyle;
|
|
13802
|
+
return (0,jsx_runtime_.jsx)(base_radio.Option, {
|
|
13803
|
+
className: 'radio radio-option',
|
|
13804
|
+
role: 'none',
|
|
13805
|
+
disabled: option.disabled,
|
|
13806
|
+
children: (0,jsx_runtime_.jsxs)(base_radio.Choice, {
|
|
13807
|
+
part: 'segment',
|
|
13808
|
+
className: (0,classNames/* classNames */.x)('radio radio-segment', pressEffect && 'motion-press-dim'),
|
|
13809
|
+
style: confirmStyle,
|
|
13810
|
+
id: option.id,
|
|
13811
|
+
disabled: option.disabled,
|
|
13812
|
+
children: [(0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
13813
|
+
className: 'radio radio-segment-check',
|
|
13814
|
+
name: 'check',
|
|
13815
|
+
size: 'xs'
|
|
13816
|
+
}), option.label]
|
|
13817
|
+
})
|
|
13818
|
+
});
|
|
13819
|
+
};
|
|
13820
|
+
ButtonOption.displayName = 'RadioButtonOption';
|
|
13821
|
+
// 이름은 제목만, 설명은 aria-describedby 로 따로 읽힌다. 동그라미는 기본형의 모양을 빌린 표시다.
|
|
13822
|
+
var CardOption = function CardOption(props) {
|
|
13823
|
+
var option = props.option,
|
|
13824
|
+
pressEffect = props.pressEffect,
|
|
13825
|
+
confirmStyle = props.confirmStyle,
|
|
13826
|
+
motion = props.motion,
|
|
13827
|
+
delay = props.delay;
|
|
13828
|
+
var titleId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
13829
|
+
var descriptionId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
13830
|
+
var hasDescription = option.description != null;
|
|
13831
|
+
return (0,jsx_runtime_.jsx)(base_radio.Option, {
|
|
13832
|
+
className: 'radio radio-option',
|
|
13833
|
+
role: 'none',
|
|
13834
|
+
disabled: option.disabled,
|
|
13835
|
+
children: (0,jsx_runtime_.jsxs)(base_radio.Choice, {
|
|
13836
|
+
part: 'card',
|
|
13837
|
+
className: (0,classNames/* classNames */.x)('radio radio-card', pressEffect && 'motion-press-dim'),
|
|
13838
|
+
style: confirmStyle,
|
|
13839
|
+
id: option.id,
|
|
13840
|
+
disabled: option.disabled,
|
|
13841
|
+
"aria-labelledby": titleId,
|
|
13842
|
+
"aria-describedby": hasDescription ? descriptionId : undefined,
|
|
13843
|
+
children: [(0,jsx_runtime_.jsxs)("span", {
|
|
13844
|
+
className: 'radio radio-card-text',
|
|
13845
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
13846
|
+
id: titleId,
|
|
13847
|
+
className: 'radio radio-card-title',
|
|
13848
|
+
children: option.label
|
|
13849
|
+
}), hasDescription && (0,jsx_runtime_.jsx)("span", {
|
|
13850
|
+
id: descriptionId,
|
|
13851
|
+
className: 'radio radio-card-description',
|
|
13852
|
+
children: option.description
|
|
13853
|
+
})]
|
|
13854
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
13855
|
+
className: 'radio radio-mark',
|
|
13856
|
+
children: (0,jsx_runtime_.jsx)(base_radio.Indicator, {
|
|
13857
|
+
className: 'radio radio-indicator',
|
|
13858
|
+
id: option.id,
|
|
13859
|
+
motion: motion,
|
|
13860
|
+
delay: delay
|
|
13861
|
+
})
|
|
13862
|
+
})]
|
|
13863
|
+
})
|
|
13864
|
+
});
|
|
13865
|
+
};
|
|
13866
|
+
CardOption.displayName = 'RadioCardOption';
|
|
12896
13867
|
var DefaultOption = function DefaultOption(props) {
|
|
12897
13868
|
var option = props.option,
|
|
12898
13869
|
pressEffect = props.pressEffect,
|
|
@@ -12922,26 +13893,36 @@ var DefaultOption = function DefaultOption(props) {
|
|
|
12922
13893
|
});
|
|
12923
13894
|
};
|
|
12924
13895
|
DefaultOption.displayName = 'RadioDefaultOption';
|
|
13896
|
+
var optionByVariant = {
|
|
13897
|
+
"default": DefaultOption,
|
|
13898
|
+
chip: ChipOption,
|
|
13899
|
+
button: ButtonOption,
|
|
13900
|
+
card: CardOption
|
|
13901
|
+
};
|
|
12925
13902
|
var Radio = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
12926
|
-
var _a
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
13903
|
+
var _a;
|
|
13904
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, radioProps),
|
|
13905
|
+
className = _b.className,
|
|
13906
|
+
style = _b.style,
|
|
13907
|
+
selected = _b.selected,
|
|
13908
|
+
_onChange = _b.onChange,
|
|
13909
|
+
options = _b.options,
|
|
13910
|
+
label = _b.label,
|
|
13911
|
+
_c = _b.fill,
|
|
13912
|
+
fill = _c === void 0 ? false : _c,
|
|
13913
|
+
track = _b.track,
|
|
13914
|
+
trackProps = _b.trackProps,
|
|
13915
|
+
_d = _b.pressEffect,
|
|
13916
|
+
pressEffect = _d === void 0 ? true : _d,
|
|
13917
|
+
motion = _b.motion,
|
|
13918
|
+
delay = _b.delay;
|
|
12938
13919
|
// getMergedProps 가 variant 를 클래스로 바꾸며 지우므로 원래 props 에서 읽는다.
|
|
12939
|
-
var
|
|
13920
|
+
var variantName = (_a = props.variant) !== null && _a !== void 0 ? _a : 'default';
|
|
12940
13921
|
var emit = (0,useTrack/* useTrack */.n)('Radio', {
|
|
12941
13922
|
track: track,
|
|
12942
13923
|
trackProps: trackProps
|
|
12943
13924
|
});
|
|
12944
|
-
var Option =
|
|
13925
|
+
var Option = optionByVariant[variantName];
|
|
12945
13926
|
var confirmStyle = delay ? {
|
|
12946
13927
|
'--confirm-delay': "".concat(delay, "ms")
|
|
12947
13928
|
} : undefined;
|
|
@@ -12954,9 +13935,10 @@ var Radio = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_a
|
|
|
12954
13935
|
},
|
|
12955
13936
|
children: (0,jsx_runtime_.jsx)(base_radio.OptionGroup, {
|
|
12956
13937
|
ref: ref,
|
|
12957
|
-
className: (0,classNames/* classNames */.x)(className, 'radio radio-group'),
|
|
12958
|
-
|
|
12959
|
-
|
|
13938
|
+
className: (0,classNames/* classNames */.x)(className, 'radio radio-group', fill && 'fill'),
|
|
13939
|
+
style: style,
|
|
13940
|
+
// 칩·칸·카드는 버튼마다 role='radio' 라 묶음도 radiogroup 이다. 기본형은 목록 그대로 둔다.
|
|
13941
|
+
role: variantName === 'default' ? undefined : 'radiogroup',
|
|
12960
13942
|
"aria-label": label,
|
|
12961
13943
|
children: options.map(function (option) {
|
|
12962
13944
|
return (0,jsx_runtime_.jsx)(Option, {
|
|
@@ -13486,10 +14468,16 @@ __nuri_require__.d(__webpack_exports__, {
|
|
|
13486
14468
|
var jsx_runtime_ = __nuri_require__(612);
|
|
13487
14469
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
13488
14470
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
14471
|
+
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
14472
|
+
var useExternalState = __nuri_require__(9387);
|
|
13489
14473
|
// EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
|
|
13490
14474
|
var useTrack = __nuri_require__(4560);
|
|
14475
|
+
// EXTERNAL MODULE: ./helpers/motion/stagger.ts
|
|
14476
|
+
var stagger = __nuri_require__(4577);
|
|
13491
14477
|
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
13492
14478
|
var classNames = __nuri_require__(3274);
|
|
14479
|
+
// EXTERNAL MODULE: ./components/drop-down/base-drop-down.tsx
|
|
14480
|
+
var base_drop_down = __nuri_require__(2735);
|
|
13493
14481
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
13494
14482
|
var icon = __nuri_require__(3547);
|
|
13495
14483
|
// EXTERNAL MODULE: ./components/text-field/text-field.tsx
|
|
@@ -13553,36 +14541,87 @@ var search_field_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
13553
14541
|
|
|
13554
14542
|
|
|
13555
14543
|
|
|
14544
|
+
|
|
14545
|
+
|
|
14546
|
+
|
|
13556
14547
|
/**
|
|
13557
14548
|
* 돋보기·지우기 버튼이 붙은 TextField 를 `role="search"` 영역으로 감싼다.
|
|
13558
14549
|
* 지우기 버튼의 눌림 motion-press 는 TextField 가 단다.
|
|
13559
14550
|
*/
|
|
13560
14551
|
var SearchField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
14552
|
+
var _a, _b, _c, _d;
|
|
13561
14553
|
var className = props.className,
|
|
13562
14554
|
style = props.style,
|
|
13563
|
-
|
|
13564
|
-
fixed =
|
|
13565
|
-
|
|
13566
|
-
takeSpace =
|
|
13567
|
-
|
|
13568
|
-
size =
|
|
13569
|
-
|
|
13570
|
-
width =
|
|
13571
|
-
|
|
13572
|
-
name =
|
|
13573
|
-
|
|
13574
|
-
ariaLabel =
|
|
14555
|
+
_e = props.fixed,
|
|
14556
|
+
fixed = _e === void 0 ? false : _e,
|
|
14557
|
+
_f = props.takeSpace,
|
|
14558
|
+
takeSpace = _f === void 0 ? false : _f,
|
|
14559
|
+
_g = props.size,
|
|
14560
|
+
size = _g === void 0 ? 's' : _g,
|
|
14561
|
+
_h = props.width,
|
|
14562
|
+
width = _h === void 0 ? '100%' : _h,
|
|
14563
|
+
_j = props.name,
|
|
14564
|
+
name = _j === void 0 ? 'search' : _j,
|
|
14565
|
+
_k = props["aria-label"],
|
|
14566
|
+
ariaLabel = _k === void 0 ? '검색' : _k,
|
|
13575
14567
|
onSearch = props.onSearch,
|
|
13576
14568
|
onClear = props.onClear,
|
|
14569
|
+
criterion = props.criterion,
|
|
13577
14570
|
track = props.track,
|
|
13578
14571
|
trackProps = props.trackProps,
|
|
13579
|
-
restProps = search_field_rest(props, ["className", "style", "fixed", "takeSpace", "size", "width", "name", 'aria-label', "onSearch", "onClear", "track", "trackProps"]);
|
|
14572
|
+
restProps = search_field_rest(props, ["className", "style", "fixed", "takeSpace", "size", "width", "name", 'aria-label', "onSearch", "onClear", "criterion", "track", "trackProps"]);
|
|
13580
14573
|
// TextField 에 track 을 넘기면 로그의 component 가 TextField 가 된다. 그래서 여기서 직접 보낸다
|
|
13581
14574
|
var emit = (0,useTrack/* useTrack */.n)('SearchField', {
|
|
13582
14575
|
track: track,
|
|
13583
14576
|
trackProps: trackProps
|
|
13584
14577
|
});
|
|
13585
14578
|
var focusedValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
|
|
14579
|
+
var _l = (0,useExternalState/* useExternalState */.C)({
|
|
14580
|
+
prop: criterion === null || criterion === void 0 ? void 0 : criterion.value,
|
|
14581
|
+
handler: function handler(next) {
|
|
14582
|
+
var _a;
|
|
14583
|
+
emit('change', next);
|
|
14584
|
+
(_a = criterion === null || criterion === void 0 ? void 0 : criterion.onValueChange) === null || _a === void 0 ? void 0 : _a.call(criterion, next);
|
|
14585
|
+
},
|
|
14586
|
+
defaultProp: (_c = (_a = criterion === null || criterion === void 0 ? void 0 : criterion.defaultValue) !== null && _a !== void 0 ? _a : (_b = criterion === null || criterion === void 0 ? void 0 : criterion.options[0]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : ''
|
|
14587
|
+
}),
|
|
14588
|
+
criterionValue = _l[0],
|
|
14589
|
+
setCriterionValue = _l[1];
|
|
14590
|
+
// 기준 고르기는 입력 상자 안 맨 앞에 놓여 바깥 상자 하나가 포커스 선을 그린다(ADR 0021). 목록은 DropDown 과 같은 모양이다
|
|
14591
|
+
var criterionSelect = criterion ? (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
14592
|
+
children: [(0,jsx_runtime_.jsxs)(base_drop_down/* default */.A, {
|
|
14593
|
+
value: criterionValue,
|
|
14594
|
+
onValueChange: setCriterionValue,
|
|
14595
|
+
disabled: restProps.disabled,
|
|
14596
|
+
children: [(0,jsx_runtime_.jsxs)(base_drop_down/* default */.A.Trigger, {
|
|
14597
|
+
className: 'search-field-criterion',
|
|
14598
|
+
"aria-label": (_d = criterion['aria-label']) !== null && _d !== void 0 ? _d : '검색 기준',
|
|
14599
|
+
children: [(0,jsx_runtime_.jsx)(base_drop_down/* default */.A.Value, {}), (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
14600
|
+
name: 'caret-down',
|
|
14601
|
+
size: 'xs',
|
|
14602
|
+
className: 'search-field-criterion-icon'
|
|
14603
|
+
})]
|
|
14604
|
+
}), (0,jsx_runtime_.jsx)(base_drop_down/* default */.A.Content, {
|
|
14605
|
+
className: 'drop-down-single-content motion-unfold',
|
|
14606
|
+
align: 'start',
|
|
14607
|
+
children: criterion.options.map(function (option, index) {
|
|
14608
|
+
return (0,jsx_runtime_.jsx)(base_drop_down/* default */.A.Item, {
|
|
14609
|
+
className: 'drop-down-single-item motion-unfold-item motion-press-dim',
|
|
14610
|
+
style: (0,stagger/* staggerStyle */.L)(index),
|
|
14611
|
+
value: option.value,
|
|
14612
|
+
indicator: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
14613
|
+
name: 'check',
|
|
14614
|
+
size: 's'
|
|
14615
|
+
}),
|
|
14616
|
+
children: option.label
|
|
14617
|
+
}, option.value);
|
|
14618
|
+
})
|
|
14619
|
+
})]
|
|
14620
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
14621
|
+
className: 'search-field-divider',
|
|
14622
|
+
"aria-hidden": 'true'
|
|
14623
|
+
})]
|
|
14624
|
+
}) : null;
|
|
13586
14625
|
return (0,jsx_runtime_.jsx)(base_search_field, {
|
|
13587
14626
|
className: (0,classNames/* classNames */.x)(className, 'search-field'),
|
|
13588
14627
|
style: style,
|
|
@@ -13594,13 +14633,17 @@ var SearchField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
13594
14633
|
ref: ref,
|
|
13595
14634
|
type: 'search',
|
|
13596
14635
|
enterKeyHint: 'search',
|
|
14636
|
+
// 검색 상자는 선 없는 연회색 면이다(ADR 0021). 기준 고르기가 붙으면 토스 목록 필터처럼 흰 상자에 회색 선이다
|
|
14637
|
+
variant: criterion ? 'outline' : 'fill',
|
|
13597
14638
|
size: size,
|
|
13598
14639
|
width: width,
|
|
13599
14640
|
name: name,
|
|
13600
14641
|
"aria-label": ariaLabel,
|
|
13601
|
-
leftIcon: (0,jsx_runtime_.
|
|
13602
|
-
|
|
13603
|
-
|
|
14642
|
+
leftIcon: (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
14643
|
+
children: [criterionSelect, (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
14644
|
+
name: 'magnifying-glass',
|
|
14645
|
+
size: size
|
|
14646
|
+
})]
|
|
13604
14647
|
}),
|
|
13605
14648
|
clearable: true,
|
|
13606
14649
|
onClear: onClear,
|
|
@@ -13614,7 +14657,7 @@ var SearchField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
13614
14657
|
// 한글 조합을 끝내는 Enter 가 검색까지 하지 않게 한다
|
|
13615
14658
|
if (event.key !== 'Enter' || event.nativeEvent.isComposing) return;
|
|
13616
14659
|
emit('submit');
|
|
13617
|
-
onSearch === null || onSearch === void 0 ? void 0 : onSearch(event.currentTarget.value);
|
|
14660
|
+
if (criterion) onSearch === null || onSearch === void 0 ? void 0 : onSearch(event.currentTarget.value, criterionValue);else onSearch === null || onSearch === void 0 ? void 0 : onSearch(event.currentTarget.value);
|
|
13618
14661
|
}
|
|
13619
14662
|
}, restProps))
|
|
13620
14663
|
})
|
|
@@ -13870,8 +14913,16 @@ var common_props = __nuri_require__(7298);
|
|
|
13870
14913
|
|
|
13871
14914
|
/** s 는 카드·시트 안(32), m 은 화면 위(40). px 은 --segmented-height-* */
|
|
13872
14915
|
var sizes = ['s', 'm'];
|
|
14916
|
+
/** 고른 칸의 판. brand 는 보라 판에 흰 글자, neutral 은 회색 바탕 위 흰 알약에 검정 글자(토스 어드민) */
|
|
14917
|
+
var variant = ['brand', 'neutral'];
|
|
13873
14918
|
var segmentedControlProps = {
|
|
13874
|
-
size: (0,common_props/* sizeProp */.lw)(sizes, 'm')
|
|
14919
|
+
size: (0,common_props/* sizeProp */.lw)(sizes, 'm'),
|
|
14920
|
+
variant: {
|
|
14921
|
+
type: 'className',
|
|
14922
|
+
className: 'variant',
|
|
14923
|
+
values: variant,
|
|
14924
|
+
"default": 'brand'
|
|
14925
|
+
}
|
|
13875
14926
|
};
|
|
13876
14927
|
;// ./components/segmented-control/segmented-control.tsx
|
|
13877
14928
|
var segmented_control_assign = undefined && undefined.__assign || function () {
|
|
@@ -14641,7 +15692,7 @@ var text_field_props = __nuri_require__(244);
|
|
|
14641
15692
|
/** 크기는 TextField 와 같다. 같은 입력 상자 CSS 를 쓴다 */
|
|
14642
15693
|
|
|
14643
15694
|
var splitTextFieldProps = {
|
|
14644
|
-
size: text_field_props/* textFieldProps */.
|
|
15695
|
+
size: text_field_props/* textFieldProps */.gx.size,
|
|
14645
15696
|
width: (0,common_props/* widthProp */.Iw)('100%')
|
|
14646
15697
|
};
|
|
14647
15698
|
/** 주민등록번호 13자리. 뒤 7자리를 가린다 */
|
|
@@ -14738,6 +15789,8 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14738
15789
|
trackProps: trackProps
|
|
14739
15790
|
});
|
|
14740
15791
|
var titleId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
15792
|
+
var firstId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
15793
|
+
var helperId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
14741
15794
|
var firstRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(null);
|
|
14742
15795
|
var secondRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(null);
|
|
14743
15796
|
var focusedRawRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
|
|
@@ -14769,6 +15822,7 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14769
15822
|
className: (0,classNames/* classNames */.x)(className, 'text-field', 'split-text-field', spec.className),
|
|
14770
15823
|
style: rootStyle,
|
|
14771
15824
|
"aria-labelledby": title ? titleId : undefined,
|
|
15825
|
+
"aria-describedby": helperText ? helperId : undefined,
|
|
14772
15826
|
onFocus: function onFocus() {
|
|
14773
15827
|
if (!focusWithin) focusedRawRef.current = raw;
|
|
14774
15828
|
setFocusWithin(true);
|
|
@@ -14778,12 +15832,13 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14778
15832
|
setFocusWithin(false);
|
|
14779
15833
|
if (raw !== focusedRawRef.current) emit('change');
|
|
14780
15834
|
},
|
|
14781
|
-
children: [title &&
|
|
15835
|
+
children: [title &&
|
|
15836
|
+
// 라벨을 누르면 앞 칸으로 간다. 칸의 이름은 aria-label 이 그대로 정한다
|
|
15837
|
+
(0,jsx_runtime_.jsx)(base_text_field/* default */.A.Label, {
|
|
15838
|
+
className: 'text-field-title',
|
|
14782
15839
|
id: titleId,
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
text: title
|
|
14786
|
-
})
|
|
15840
|
+
htmlFor: firstId,
|
|
15841
|
+
text: title
|
|
14787
15842
|
}), (0,jsx_runtime_.jsxs)("div", {
|
|
14788
15843
|
className: (0,classNames/* classNames */.x)('nuri-theme text-field-input-wrapper', sizeClassName, {
|
|
14789
15844
|
error: isError
|
|
@@ -14802,6 +15857,7 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14802
15857
|
},
|
|
14803
15858
|
children: (0,jsx_runtime_.jsx)(base_text_field/* default */.A.Input, {
|
|
14804
15859
|
ref: firstRef,
|
|
15860
|
+
id: firstId,
|
|
14805
15861
|
className: 'split-text-field-input split-text-field-first',
|
|
14806
15862
|
inputMode: 'numeric',
|
|
14807
15863
|
autoComplete: 'off',
|
|
@@ -14858,6 +15914,7 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14858
15914
|
className: (0,classNames/* classNames */.x)('text-field-helper-text', {
|
|
14859
15915
|
error: isError
|
|
14860
15916
|
}),
|
|
15917
|
+
id: helperId,
|
|
14861
15918
|
text: helperText
|
|
14862
15919
|
})]
|
|
14863
15920
|
});
|
|
@@ -14887,24 +15944,15 @@ var SplitTextField = {
|
|
|
14887
15944
|
|
|
14888
15945
|
/***/ },
|
|
14889
15946
|
|
|
14890
|
-
/***/
|
|
15947
|
+
/***/ 2017
|
|
14891
15948
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
14892
15949
|
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
// EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
|
|
14900
|
-
var jsx_runtime_ = __nuri_require__(612);
|
|
14901
|
-
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
14902
|
-
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
14903
|
-
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
14904
|
-
var classNames = __nuri_require__(3274);
|
|
14905
|
-
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
14906
|
-
var getMergedProps = __nuri_require__(7335);
|
|
14907
|
-
;// ./components/stat/base-stat.tsx
|
|
15950
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
15951
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15952
|
+
/* harmony export */ });
|
|
15953
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
15954
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
15955
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
14908
15956
|
var __assign = undefined && undefined.__assign || function () {
|
|
14909
15957
|
__assign = Object.assign || function (t) {
|
|
14910
15958
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14927,39 +15975,229 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
14927
15975
|
|
|
14928
15976
|
|
|
14929
15977
|
/** 이름–값 쌍이라 dl 이다 */
|
|
14930
|
-
var
|
|
15978
|
+
var StatRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
14931
15979
|
var className = props.className,
|
|
14932
15980
|
restProps = __rest(props, ["className"]);
|
|
14933
|
-
return (0,
|
|
15981
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("dl", __assign({
|
|
15982
|
+
ref: ref,
|
|
15983
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat', className)
|
|
15984
|
+
}, restProps));
|
|
15985
|
+
});
|
|
15986
|
+
StatRootBase.displayName = 'StatRoot';
|
|
15987
|
+
var StatGroup = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
15988
|
+
var className = props.className,
|
|
15989
|
+
restProps = __rest(props, ["className"]);
|
|
15990
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({
|
|
14934
15991
|
ref: ref,
|
|
14935
|
-
className: (0,
|
|
15992
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat group', className),
|
|
15993
|
+
role: 'group'
|
|
14936
15994
|
}, restProps));
|
|
14937
15995
|
});
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
15996
|
+
StatGroup.displayName = 'StatGroup';
|
|
15997
|
+
var StatItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
15998
|
+
var className = props.className,
|
|
15999
|
+
restProps = __rest(props, ["className"]);
|
|
16000
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({
|
|
16001
|
+
ref: ref,
|
|
16002
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat item', className)
|
|
16003
|
+
}, restProps));
|
|
16004
|
+
});
|
|
16005
|
+
StatItem.displayName = 'StatItem';
|
|
16006
|
+
/** 칸 전체를 덮는 누르는 자리. 칸 안의 dl 은 button 안에 들어갈 수 없어 형제로 둔다 */
|
|
16007
|
+
var StatToggle = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16008
|
+
var className = props.className,
|
|
16009
|
+
restProps = __rest(props, ["className"]);
|
|
16010
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", __assign({
|
|
16011
|
+
ref: ref,
|
|
16012
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat toggle', className),
|
|
16013
|
+
type: 'button'
|
|
16014
|
+
}, restProps));
|
|
16015
|
+
});
|
|
16016
|
+
StatToggle.displayName = 'StatToggle';
|
|
16017
|
+
var StatRoot = Object.assign(StatRootBase, {
|
|
16018
|
+
Group: StatGroup,
|
|
16019
|
+
Item: StatItem,
|
|
16020
|
+
Toggle: StatToggle
|
|
16021
|
+
});
|
|
16022
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatRoot);
|
|
16023
|
+
|
|
16024
|
+
/***/ },
|
|
16025
|
+
|
|
16026
|
+
/***/ 2455
|
|
16027
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
16028
|
+
|
|
16029
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16030
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16031
|
+
/* harmony export */ });
|
|
16032
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
16033
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
16034
|
+
/* harmony import */ var _helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(9387);
|
|
16035
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(4560);
|
|
16036
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3274);
|
|
16037
|
+
/* harmony import */ var _base_stat__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(2017);
|
|
16038
|
+
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(857);
|
|
16039
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
16040
|
+
__assign = Object.assign || function (t) {
|
|
16041
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16042
|
+
s = arguments[i];
|
|
16043
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
16044
|
+
}
|
|
16045
|
+
return t;
|
|
16046
|
+
};
|
|
16047
|
+
return __assign.apply(this, arguments);
|
|
16048
|
+
};
|
|
16049
|
+
|
|
16050
|
+
|
|
16051
|
+
|
|
16052
|
+
|
|
16053
|
+
|
|
16054
|
+
|
|
16055
|
+
|
|
16056
|
+
/** 칸마다 새 줄의 첫 칸인지와, 가장 긴 줄의 칸 수(격자 열 수) */
|
|
16057
|
+
var layoutOf = function layoutOf(items) {
|
|
16058
|
+
var rowStarts = items.map(function (item, index) {
|
|
16059
|
+
return index === 0 || item.newRow === true;
|
|
16060
|
+
});
|
|
16061
|
+
var columns = 0;
|
|
16062
|
+
var run = 0;
|
|
16063
|
+
rowStarts.forEach(function (start) {
|
|
16064
|
+
run = start ? 1 : run + 1;
|
|
16065
|
+
columns = Math.max(columns, run);
|
|
16066
|
+
});
|
|
16067
|
+
return {
|
|
16068
|
+
rowStarts: rowStarts,
|
|
16069
|
+
columns: columns
|
|
16070
|
+
};
|
|
16071
|
+
};
|
|
16072
|
+
/**
|
|
16073
|
+
* 상태별 건수 칸 묶음. 한 면을 세로선으로 나눈 칸이고, 누른 칸이 고른 필터가 된다.
|
|
16074
|
+
* 칸마다 aria-pressed 버튼이 칸 전체를 덮고, 그 아래 Stat 이 라벨·숫자를 그린다.
|
|
16075
|
+
*/
|
|
16076
|
+
var StatGroup = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16077
|
+
var className = props.className,
|
|
16078
|
+
style = props.style,
|
|
16079
|
+
items = props.items,
|
|
16080
|
+
label = props.label,
|
|
16081
|
+
value = props.value,
|
|
16082
|
+
defaultValue = props.defaultValue,
|
|
16083
|
+
onValueChange = props.onValueChange,
|
|
16084
|
+
_a = props.pressEffect,
|
|
16085
|
+
pressEffect = _a === void 0 ? true : _a,
|
|
16086
|
+
track = props.track,
|
|
16087
|
+
trackProps = props.trackProps;
|
|
16088
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__/* .useTrack */ .n)('StatGroup', {
|
|
16089
|
+
track: track,
|
|
16090
|
+
trackProps: trackProps
|
|
16091
|
+
});
|
|
16092
|
+
var _b = (0,_helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_2__/* .useExternalState */ .C)({
|
|
16093
|
+
prop: value,
|
|
16094
|
+
handler: function handler(id) {
|
|
16095
|
+
if (id === null) return;
|
|
16096
|
+
emit('change', id);
|
|
16097
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(id);
|
|
16098
|
+
},
|
|
16099
|
+
defaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : null
|
|
16100
|
+
}),
|
|
16101
|
+
selected = _b[0],
|
|
16102
|
+
setSelected = _b[1];
|
|
16103
|
+
var baseId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
16104
|
+
var _c = layoutOf(items),
|
|
16105
|
+
rowStarts = _c.rowStarts,
|
|
16106
|
+
columns = _c.columns;
|
|
16107
|
+
var groupStyle = __assign(__assign({}, style), {
|
|
16108
|
+
'--stat-group-columns': columns
|
|
16109
|
+
});
|
|
16110
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_stat__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A.Group, {
|
|
16111
|
+
ref: ref,
|
|
16112
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)(className, 'stat-group'),
|
|
16113
|
+
style: groupStyle,
|
|
16114
|
+
"aria-label": label,
|
|
16115
|
+
children: items.map(function (item, index) {
|
|
16116
|
+
var pressed = selected === item.id;
|
|
16117
|
+
var labelId = "".concat(baseId, "-").concat(index, "-label");
|
|
16118
|
+
var valueId = "".concat(baseId, "-").concat(index, "-value");
|
|
16119
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_stat__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A.Item, {
|
|
16120
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('stat-group-item', !item.readOnly && 'pressable', rowStarts[index] && 'row-start'),
|
|
16121
|
+
"data-state": item.readOnly ? undefined : pressed ? 'on' : 'off',
|
|
16122
|
+
children: [item.readOnly ? null : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_stat__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A.Toggle
|
|
16123
|
+
// 칸은 면 안의 칸이라 줄이지 않고 딤만 쓴다(press form dim)
|
|
16124
|
+
, {
|
|
16125
|
+
// 칸은 면 안의 칸이라 줄이지 않고 딤만 쓴다(press form dim)
|
|
16126
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('stat-group-toggle', pressEffect && 'motion-press-dim'),
|
|
16127
|
+
"aria-pressed": pressed,
|
|
16128
|
+
"aria-labelledby": "".concat(labelId, " ").concat(valueId),
|
|
16129
|
+
onClick: function onClick() {
|
|
16130
|
+
return setSelected(item.id);
|
|
16131
|
+
}
|
|
16132
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_stat__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
16133
|
+
size: 's',
|
|
16134
|
+
icon: item.icon,
|
|
16135
|
+
help: item.help,
|
|
16136
|
+
valueTone: item.valueTone,
|
|
16137
|
+
label: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16138
|
+
id: labelId,
|
|
16139
|
+
children: item.label
|
|
16140
|
+
}),
|
|
16141
|
+
value: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16142
|
+
id: valueId,
|
|
16143
|
+
children: item.value
|
|
16144
|
+
})
|
|
16145
|
+
})]
|
|
16146
|
+
}, item.id);
|
|
16147
|
+
})
|
|
16148
|
+
});
|
|
16149
|
+
});
|
|
16150
|
+
StatGroup.displayName = 'StatGroup';
|
|
16151
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatGroup);
|
|
16152
|
+
|
|
16153
|
+
/***/ },
|
|
16154
|
+
|
|
16155
|
+
/***/ 7296
|
|
16156
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
14943
16157
|
|
|
14944
|
-
|
|
14945
|
-
|
|
16158
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16159
|
+
/* harmony export */ Xi: () => (/* binding */ statProps)
|
|
16160
|
+
/* harmony export */ });
|
|
16161
|
+
/* unused harmony exports sizes, tone, valueTone */
|
|
16162
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
16163
|
+
|
|
16164
|
+
/** 숫자 크기. s 는 xl(상태 요약 칸), m 은 2xl(수치 타일), l 은 3xl(화면의 주 수치 하나) */
|
|
16165
|
+
var sizes = ['s', 'm', 'l'];
|
|
14946
16166
|
/** 증감의 뜻. positive 는 좋아짐(초록), negative 는 나빠짐(빨강), neutral 은 그대로(회색). 부호와 따로다 */
|
|
14947
16167
|
var tone = (/* unused pure expression or super */ null && (['positive', 'negative', 'neutral']));
|
|
16168
|
+
/** 숫자 색. danger 는 처리해야 할 건수(발송기한 초과 등)에만 붙는다 */
|
|
16169
|
+
var valueTone = (/* unused pure expression or super */ null && (['default', 'danger']));
|
|
14948
16170
|
var statProps = {
|
|
14949
|
-
size: (0,
|
|
16171
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
14950
16172
|
};
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
16173
|
+
|
|
16174
|
+
/***/ },
|
|
16175
|
+
|
|
16176
|
+
/***/ 857
|
|
16177
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
16178
|
+
|
|
16179
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16180
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16181
|
+
/* harmony export */ });
|
|
16182
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
16183
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
16184
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
16185
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(7335);
|
|
16186
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3547);
|
|
16187
|
+
/* harmony import */ var _tooltip_tooltip__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(1563);
|
|
16188
|
+
/* harmony import */ var _base_stat__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(2017);
|
|
16189
|
+
/* harmony import */ var _stat_props__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(7296);
|
|
16190
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
16191
|
+
__assign = Object.assign || function (t) {
|
|
14954
16192
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14955
16193
|
s = arguments[i];
|
|
14956
16194
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
14957
16195
|
}
|
|
14958
16196
|
return t;
|
|
14959
16197
|
};
|
|
14960
|
-
return
|
|
16198
|
+
return __assign.apply(this, arguments);
|
|
14961
16199
|
};
|
|
14962
|
-
var
|
|
16200
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
14963
16201
|
var t = {};
|
|
14964
16202
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14965
16203
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -14973,41 +16211,74 @@ var stat_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
14973
16211
|
|
|
14974
16212
|
|
|
14975
16213
|
|
|
16214
|
+
|
|
16215
|
+
|
|
14976
16216
|
var TONE_CLASS = {
|
|
14977
16217
|
positive: 'tone-positive',
|
|
14978
16218
|
negative: 'tone-negative',
|
|
14979
16219
|
neutral: 'tone-neutral'
|
|
14980
16220
|
};
|
|
14981
16221
|
/** 수치 한 묶음. 작은 회색 라벨 위, 굵은 숫자 아래, 그 아래 증감과 기준 글. 면은 Card 가 갖는다 */
|
|
14982
|
-
var Stat = /*#__PURE__*/(0,
|
|
14983
|
-
var _a = (0,
|
|
16222
|
+
var Stat = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16223
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__/* .getMergedProps */ .p)(props, _stat_props__WEBPACK_IMPORTED_MODULE_7__/* .statProps */ .Xi),
|
|
14984
16224
|
className = _a.className,
|
|
14985
16225
|
label = _a.label,
|
|
14986
16226
|
value = _a.value,
|
|
14987
16227
|
delta = _a.delta,
|
|
14988
16228
|
caption = _a.caption,
|
|
14989
|
-
|
|
14990
|
-
|
|
16229
|
+
icon = _a.icon,
|
|
16230
|
+
help = _a.help,
|
|
16231
|
+
_b = _a.valueTone,
|
|
16232
|
+
valueTone = _b === void 0 ? 'default' : _b,
|
|
16233
|
+
restProps = __rest(_a, ["className", "label", "value", "delta", "caption", "icon", "help", "valueTone"]);
|
|
16234
|
+
var labelId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
16235
|
+
var helpId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
16236
|
+
var hasIcon = icon !== undefined && icon !== null;
|
|
16237
|
+
var hasHelp = help !== undefined && help !== null;
|
|
16238
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_stat__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, __assign({
|
|
14991
16239
|
ref: ref,
|
|
14992
|
-
className: (0,
|
|
16240
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)(className, 'stat', hasIcon && 'has-icon')
|
|
14993
16241
|
}, restProps, {
|
|
14994
|
-
children: [(0,
|
|
16242
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("dt", {
|
|
14995
16243
|
className: 'stat-label',
|
|
14996
|
-
children:
|
|
14997
|
-
|
|
14998
|
-
|
|
16244
|
+
children: [hasIcon ?
|
|
16245
|
+
// 라벨과 숫자 두 줄의 왼쪽 가운데에 놓는다. dl 에는 dt·dd 밖의 요소를 둘 수 없어 dt 안에서 띄운다
|
|
16246
|
+
(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16247
|
+
className: 'stat-icon',
|
|
16248
|
+
"aria-hidden": 'true',
|
|
16249
|
+
children: icon
|
|
16250
|
+
}) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16251
|
+
id: labelId,
|
|
16252
|
+
children: label
|
|
16253
|
+
}), hasHelp ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tooltip_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A, {
|
|
16254
|
+
trigger: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", {
|
|
16255
|
+
id: helpId,
|
|
16256
|
+
className: 'stat-help',
|
|
16257
|
+
type: 'button',
|
|
16258
|
+
"aria-label": "\uB3C4\uC6C0\uB9D0",
|
|
16259
|
+
"aria-labelledby": "".concat(labelId, " ").concat(helpId),
|
|
16260
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, {
|
|
16261
|
+
name: 'info',
|
|
16262
|
+
size: 'xs'
|
|
16263
|
+
})
|
|
16264
|
+
}),
|
|
16265
|
+
content: help,
|
|
16266
|
+
direction: 'top'
|
|
16267
|
+
}) : null]
|
|
16268
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("dd", {
|
|
16269
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('stat-value', valueTone === 'danger' && 'tone-danger'),
|
|
14999
16270
|
children: value
|
|
15000
|
-
}), delta || caption ? (0,
|
|
16271
|
+
}), delta || caption ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("dd", {
|
|
15001
16272
|
className: 'stat-detail',
|
|
15002
|
-
children: [delta ? (0,
|
|
15003
|
-
className: (0,
|
|
16273
|
+
children: [delta ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16274
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('stat-delta', TONE_CLASS[delta.tone]),
|
|
15004
16275
|
children: delta.value
|
|
15005
16276
|
}) : null, delta && caption ? ' ' : null, caption]
|
|
15006
16277
|
}) : null]
|
|
15007
16278
|
}));
|
|
15008
16279
|
});
|
|
15009
16280
|
Stat.displayName = 'Stat';
|
|
15010
|
-
/* harmony default export */ const
|
|
16281
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Stat);
|
|
15011
16282
|
|
|
15012
16283
|
/***/ },
|
|
15013
16284
|
|
|
@@ -15614,12 +16885,20 @@ __nuri_require__.d(__webpack_exports__, {
|
|
|
15614
16885
|
var jsx_runtime_ = __nuri_require__(612);
|
|
15615
16886
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
15616
16887
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
16888
|
+
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
16889
|
+
var useExternalState = __nuri_require__(9387);
|
|
15617
16890
|
// EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
|
|
15618
16891
|
var useTrack = __nuri_require__(4560);
|
|
15619
16892
|
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
15620
16893
|
var classNames = __nuri_require__(3274);
|
|
15621
16894
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
15622
16895
|
var getMergedProps = __nuri_require__(7335);
|
|
16896
|
+
// EXTERNAL MODULE: ./components/check-box/check-box.tsx
|
|
16897
|
+
var check_box = __nuri_require__(4359);
|
|
16898
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
16899
|
+
var icon = __nuri_require__(3547);
|
|
16900
|
+
// EXTERNAL MODULE: ./components/tooltip/tooltip.tsx
|
|
16901
|
+
var tooltip = __nuri_require__(1563);
|
|
15623
16902
|
;// ./components/table/base-table.tsx
|
|
15624
16903
|
var __assign = undefined && undefined.__assign || function () {
|
|
15625
16904
|
__assign = Object.assign || function (t) {
|
|
@@ -15687,11 +16966,41 @@ var TableCell = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
|
|
|
15687
16966
|
}, restProps));
|
|
15688
16967
|
});
|
|
15689
16968
|
TableCell.displayName = 'TableCell';
|
|
16969
|
+
var TableCellText = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16970
|
+
var className = props.className,
|
|
16971
|
+
title = props.title,
|
|
16972
|
+
description = props.description,
|
|
16973
|
+
restProps = __rest(props, ["className", "title", "description"]);
|
|
16974
|
+
return (0,jsx_runtime_.jsxs)("span", __assign({
|
|
16975
|
+
ref: ref,
|
|
16976
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-table cell-text', className)
|
|
16977
|
+
}, restProps, {
|
|
16978
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
16979
|
+
className: 'cell-text-title',
|
|
16980
|
+
children: title
|
|
16981
|
+
}), description != null && (0,jsx_runtime_.jsx)("span", {
|
|
16982
|
+
className: 'cell-text-description',
|
|
16983
|
+
children: description
|
|
16984
|
+
})]
|
|
16985
|
+
}));
|
|
16986
|
+
});
|
|
16987
|
+
TableCellText.displayName = 'TableCellText';
|
|
16988
|
+
var TableHoverActions = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16989
|
+
var className = props.className,
|
|
16990
|
+
restProps = __rest(props, ["className"]);
|
|
16991
|
+
return (0,jsx_runtime_.jsx)("span", __assign({
|
|
16992
|
+
ref: ref,
|
|
16993
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-table hover-actions', className)
|
|
16994
|
+
}, restProps));
|
|
16995
|
+
});
|
|
16996
|
+
TableHoverActions.displayName = 'TableHoverActions';
|
|
15690
16997
|
var TableRoot = Object.assign(TableRootBase, {
|
|
15691
16998
|
Header: TableHeader,
|
|
15692
16999
|
Body: TableBody,
|
|
15693
17000
|
Row: TableRow,
|
|
15694
|
-
Cell: TableCell
|
|
17001
|
+
Cell: TableCell,
|
|
17002
|
+
CellText: TableCellText,
|
|
17003
|
+
HoverActions: TableHoverActions
|
|
15695
17004
|
});
|
|
15696
17005
|
/* harmony default export */ const base_table = (TableRoot);
|
|
15697
17006
|
;// ./components/table/table-props.ts
|
|
@@ -15707,12 +17016,22 @@ var table_props_assign = undefined && undefined.__assign || function () {
|
|
|
15707
17016
|
};
|
|
15708
17017
|
var dataTableCommonProps = {};
|
|
15709
17018
|
var variants = ['plain', 'padded'];
|
|
17019
|
+
/** 머리 행 바탕. tinted 는 회색 머리(토스 목록 표) */
|
|
17020
|
+
var headerVariants = ['plain', 'tinted'];
|
|
17021
|
+
/** 열 정렬. 숫자·금액 열은 end */
|
|
17022
|
+
var aligns = (/* unused pure expression or super */ null && (['start', 'center', 'end']));
|
|
15710
17023
|
var dataTableProps = {
|
|
15711
17024
|
variant: {
|
|
15712
17025
|
type: 'className',
|
|
15713
17026
|
className: 'variant',
|
|
15714
17027
|
values: variants,
|
|
15715
17028
|
"default": 'plain'
|
|
17029
|
+
},
|
|
17030
|
+
headerVariant: {
|
|
17031
|
+
type: 'className',
|
|
17032
|
+
className: 'header',
|
|
17033
|
+
values: headerVariants,
|
|
17034
|
+
"default": 'plain'
|
|
15716
17035
|
}
|
|
15717
17036
|
};
|
|
15718
17037
|
var dataTableHeaderProps = table_props_assign(table_props_assign({}, dataTableCommonProps), {
|
|
@@ -15746,6 +17065,17 @@ var data_table_assign = undefined && undefined.__assign || function () {
|
|
|
15746
17065
|
};
|
|
15747
17066
|
return data_table_assign.apply(this, arguments);
|
|
15748
17067
|
};
|
|
17068
|
+
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
|
|
17069
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
17070
|
+
if (ar || !(i in from)) {
|
|
17071
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17072
|
+
ar[i] = from[i];
|
|
17073
|
+
}
|
|
17074
|
+
}
|
|
17075
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17076
|
+
};
|
|
17077
|
+
|
|
17078
|
+
|
|
15749
17079
|
|
|
15750
17080
|
|
|
15751
17081
|
|
|
@@ -15753,15 +17083,66 @@ var data_table_assign = undefined && undefined.__assign || function () {
|
|
|
15753
17083
|
|
|
15754
17084
|
|
|
15755
17085
|
|
|
17086
|
+
|
|
17087
|
+
|
|
17088
|
+
var ALIGN_CLASS_NAME = {
|
|
17089
|
+
start: undefined,
|
|
17090
|
+
center: 'align-center',
|
|
17091
|
+
end: 'align-end'
|
|
17092
|
+
};
|
|
17093
|
+
/** 고정 열(.fixed·.fixed-end)에 앞(뒤) 고정 칸 너비의 합을 left(right)로 준다. 칸 폭은 내용이 정해 렌더 뒤에만 안다 */
|
|
17094
|
+
var pinStickyCells = function pinStickyCells(table) {
|
|
17095
|
+
for (var _i = 0, _a = Array.from(table.rows); _i < _a.length; _i++) {
|
|
17096
|
+
var row = _a[_i];
|
|
17097
|
+
var cells = Array.from(row.cells);
|
|
17098
|
+
var left = 0;
|
|
17099
|
+
for (var _b = 0, cells_1 = cells; _b < cells_1.length; _b++) {
|
|
17100
|
+
var cell = cells_1[_b];
|
|
17101
|
+
if (!cell.classList.contains('fixed')) continue;
|
|
17102
|
+
cell.style.left = left + 'px';
|
|
17103
|
+
left += cell.offsetWidth;
|
|
17104
|
+
}
|
|
17105
|
+
var right = 0;
|
|
17106
|
+
for (var _c = 0, _d = cells.reverse(); _c < _d.length; _c++) {
|
|
17107
|
+
var cell = _d[_c];
|
|
17108
|
+
if (!cell.classList.contains('fixed-end')) continue;
|
|
17109
|
+
cell.style.right = right + 'px';
|
|
17110
|
+
right += cell.offsetWidth;
|
|
17111
|
+
}
|
|
17112
|
+
}
|
|
17113
|
+
};
|
|
17114
|
+
/**
|
|
17115
|
+
* 가려진 쪽이 있을 때만 고정 열 경계 그림자를 그리도록 감싸개에 표시한다. 스크롤마다 다시 그리지 않게 DOM 에 직접 단다.
|
|
17116
|
+
* 보이는 폭은 빈 결과 문구를 화면 안 가운데에 두는 데 쓴다
|
|
17117
|
+
*/
|
|
17118
|
+
var syncScrollEdges = function syncScrollEdges(scroller) {
|
|
17119
|
+
scroller.style.setProperty('--data-table-scroll-width', scroller.clientWidth + 'px');
|
|
17120
|
+
var hiddenEnd = scroller.scrollWidth - scroller.clientWidth - scroller.scrollLeft;
|
|
17121
|
+
scroller.toggleAttribute('data-overflow-start', scroller.scrollLeft >= 1);
|
|
17122
|
+
scroller.toggleAttribute('data-overflow-end', hiddenEnd >= 1);
|
|
17123
|
+
};
|
|
17124
|
+
var headerName = function headerName(item) {
|
|
17125
|
+
return typeof item.value === 'string' ? item.value : '열';
|
|
17126
|
+
};
|
|
15756
17127
|
var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
15757
17128
|
var rows = props.rows,
|
|
15758
17129
|
columns = props.columns,
|
|
15759
17130
|
_a = props.fixedRowsIndex,
|
|
15760
17131
|
fixedRowsIndex = _a === void 0 ? 0 : _a,
|
|
17132
|
+
_b = props.fixedEndRowsCount,
|
|
17133
|
+
fixedEndRowsCount = _b === void 0 ? 0 : _b,
|
|
17134
|
+
_c = props.scrollX,
|
|
17135
|
+
scrollX = _c === void 0 ? false : _c,
|
|
17136
|
+
_d = props.selectable,
|
|
17137
|
+
selectable = _d === void 0 ? false : _d,
|
|
17138
|
+
selectedRowIds = props.selectedRowIds,
|
|
17139
|
+
defaultSelectedRowIds = props.defaultSelectedRowIds,
|
|
17140
|
+
onSelectedRowIdsChange = props.onSelectedRowIdsChange,
|
|
17141
|
+
empty = props.empty,
|
|
15761
17142
|
track = props.track,
|
|
15762
17143
|
trackProps = props.trackProps,
|
|
15763
|
-
|
|
15764
|
-
pressEffect =
|
|
17144
|
+
_e = props.pressEffect,
|
|
17145
|
+
pressEffect = _e === void 0 ? true : _e;
|
|
15765
17146
|
var emit = (0,useTrack/* useTrack */.n)('DataTable', {
|
|
15766
17147
|
track: track,
|
|
15767
17148
|
trackProps: trackProps
|
|
@@ -15770,6 +17151,67 @@ var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
15770
17151
|
var headerStyle = (0,getMergedProps/* getMergedProps */.p)(props, dataTableHeaderProps).style;
|
|
15771
17152
|
var rowStyle = (0,getMergedProps/* getMergedProps */.p)(props, dataTableRowProps).style;
|
|
15772
17153
|
var cellStyle = (0,getMergedProps/* getMergedProps */.p)(props, dataTableCellProps).style;
|
|
17154
|
+
var baseId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
17155
|
+
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(null);
|
|
17156
|
+
var _f = (0,useExternalState/* useExternalState */.C)({
|
|
17157
|
+
prop: selectedRowIds,
|
|
17158
|
+
handler: onSelectedRowIdsChange,
|
|
17159
|
+
defaultProp: defaultSelectedRowIds !== null && defaultSelectedRowIds !== void 0 ? defaultSelectedRowIds : []
|
|
17160
|
+
}),
|
|
17161
|
+
selectedIds = _f[0],
|
|
17162
|
+
setSelectedIds = _f[1];
|
|
17163
|
+
var rowIdOf = function rowIdOf(column, index) {
|
|
17164
|
+
var _a;
|
|
17165
|
+
return (_a = column.rowId) !== null && _a !== void 0 ? _a : String(index);
|
|
17166
|
+
};
|
|
17167
|
+
var selectableIds = columns.flatMap(function (column, index) {
|
|
17168
|
+
return column.rowDisabled ? [] : [rowIdOf(column, index)];
|
|
17169
|
+
});
|
|
17170
|
+
var selectedCount = selectableIds.filter(function (id) {
|
|
17171
|
+
return selectedIds.includes(id);
|
|
17172
|
+
}).length;
|
|
17173
|
+
var allSelected = selectableIds.length > 0 && selectedCount === selectableIds.length;
|
|
17174
|
+
var toggleAll = function toggleAll(checked) {
|
|
17175
|
+
emit('change', 'all');
|
|
17176
|
+
setSelectedIds(checked ? __spreadArray(__spreadArray([], selectedIds, true), selectableIds.filter(function (id) {
|
|
17177
|
+
return !selectedIds.includes(id);
|
|
17178
|
+
}), true) : selectedIds.filter(function (id) {
|
|
17179
|
+
return !selectableIds.includes(id);
|
|
17180
|
+
}));
|
|
17181
|
+
};
|
|
17182
|
+
var toggleRow = function toggleRow(rowId, checked) {
|
|
17183
|
+
emit('change', rowId);
|
|
17184
|
+
setSelectedIds(checked ? __spreadArray(__spreadArray([], selectedIds, true), [rowId], false) : selectedIds.filter(function (id) {
|
|
17185
|
+
return id !== rowId;
|
|
17186
|
+
}));
|
|
17187
|
+
};
|
|
17188
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useLayoutEffect)(function () {
|
|
17189
|
+
var scroller = scrollRef.current;
|
|
17190
|
+
if (!scroller) return;
|
|
17191
|
+
pinStickyCells(scroller.firstElementChild);
|
|
17192
|
+
syncScrollEdges(scroller);
|
|
17193
|
+
});
|
|
17194
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useEffect)(function () {
|
|
17195
|
+
var scroller = scrollRef.current;
|
|
17196
|
+
if (!scroller) return undefined;
|
|
17197
|
+
var table = scroller.firstElementChild;
|
|
17198
|
+
var onScroll = function onScroll() {
|
|
17199
|
+
return syncScrollEdges(scroller);
|
|
17200
|
+
};
|
|
17201
|
+
var observer = new ResizeObserver(function () {
|
|
17202
|
+
pinStickyCells(table);
|
|
17203
|
+
syncScrollEdges(scroller);
|
|
17204
|
+
});
|
|
17205
|
+
observer.observe(scroller);
|
|
17206
|
+
observer.observe(table);
|
|
17207
|
+
scroller.addEventListener('scroll', onScroll, {
|
|
17208
|
+
passive: true
|
|
17209
|
+
});
|
|
17210
|
+
return function () {
|
|
17211
|
+
observer.disconnect();
|
|
17212
|
+
scroller.removeEventListener('scroll', onScroll);
|
|
17213
|
+
};
|
|
17214
|
+
}, []);
|
|
15773
17215
|
var widthStyle = function widthStyle(item) {
|
|
15774
17216
|
return item.width == null ? undefined : {
|
|
15775
17217
|
width: item.width
|
|
@@ -15778,72 +17220,110 @@ var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
15778
17220
|
var bodyCellStyle = function bodyCellStyle(item) {
|
|
15779
17221
|
return data_table_assign(data_table_assign({}, cellStyle), widthStyle(item));
|
|
15780
17222
|
};
|
|
15781
|
-
var
|
|
15782
|
-
|
|
17223
|
+
var fixedEndStart = rows.length - fixedEndRowsCount;
|
|
17224
|
+
var columnClassName = function columnClassName(item, index) {
|
|
17225
|
+
var _a;
|
|
17226
|
+
return (0,classNames/* classNames */.x)(index < fixedRowsIndex && 'fixed', index === fixedRowsIndex - 1 && 'fixed-last', index >= fixedEndStart && 'fixed-end', index === fixedEndStart && 'fixed-end-first', ALIGN_CLASS_NAME[(_a = item.align) !== null && _a !== void 0 ? _a : 'start']);
|
|
15783
17227
|
};
|
|
15784
|
-
|
|
17228
|
+
var selectCellClassName = (0,classNames/* classNames */.x)('data-table-select', fixedRowsIndex > 0 && 'fixed');
|
|
17229
|
+
var columnCount = rows.length + (selectable ? 1 : 0);
|
|
17230
|
+
// 넓은 화면은 scrollX 일 때만, 좁은 화면은 늘 이 감싸개 안에서 가로로 스크롤한다. ref·className 은 표에 둔다
|
|
15785
17231
|
return (0,jsx_runtime_.jsx)("div", {
|
|
15786
|
-
|
|
17232
|
+
ref: scrollRef,
|
|
17233
|
+
className: (0,classNames/* classNames */.x)('data-table-scroll', scrollX && 'scroll-x'),
|
|
15787
17234
|
children: (0,jsx_runtime_.jsxs)(base_table, {
|
|
15788
17235
|
ref: ref,
|
|
15789
17236
|
className: (0,classNames/* classNames */.x)('data-table', className),
|
|
15790
17237
|
children: [(0,jsx_runtime_.jsx)(base_table.Header, {
|
|
15791
17238
|
className: 'data-table-header',
|
|
15792
17239
|
style: headerStyle,
|
|
15793
|
-
children: (0,jsx_runtime_.
|
|
17240
|
+
children: (0,jsx_runtime_.jsxs)(base_table.Row, {
|
|
15794
17241
|
className: 'data-table-row',
|
|
15795
17242
|
style: headerStyle,
|
|
15796
|
-
children:
|
|
17243
|
+
children: [selectable && (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
17244
|
+
className: selectCellClassName,
|
|
17245
|
+
children: (0,jsx_runtime_.jsx)(check_box/* default */.A, {
|
|
17246
|
+
id: baseId + '-all',
|
|
17247
|
+
size: 's',
|
|
17248
|
+
label: null,
|
|
17249
|
+
"aria-label": "\uC804\uCCB4 \uC120\uD0DD",
|
|
17250
|
+
checked: allSelected,
|
|
17251
|
+
indeterminate: selectedCount > 0 && !allSelected,
|
|
17252
|
+
disabled: selectableIds.length === 0,
|
|
17253
|
+
onChange: toggleAll
|
|
17254
|
+
})
|
|
17255
|
+
}), rows.map(function (item, index) {
|
|
15797
17256
|
return (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
15798
|
-
|
|
15799
|
-
var _a;
|
|
15800
|
-
if (index < fixedRowsIndex && el) {
|
|
15801
|
-
var leftPosition = 0;
|
|
15802
|
-
var cells = (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.fixed');
|
|
15803
|
-
if (cells) {
|
|
15804
|
-
for (var i = 0; i < index; i++) {
|
|
15805
|
-
leftPosition += cells[i].offsetWidth;
|
|
15806
|
-
}
|
|
15807
|
-
}
|
|
15808
|
-
el.style.left = leftPosition + 'px';
|
|
15809
|
-
}
|
|
15810
|
-
},
|
|
15811
|
-
className: (0,classNames/* classNames */.x)(fixedClassName(index), pressEffect && item.onClickRow && 'motion-press-dim'),
|
|
17257
|
+
className: (0,classNames/* classNames */.x)(columnClassName(item, index), pressEffect && item.onClickRow && 'motion-press-dim'),
|
|
15812
17258
|
style: widthStyle(item),
|
|
15813
17259
|
onClick: function onClick() {
|
|
15814
17260
|
if (!item.onClickRow) return;
|
|
15815
17261
|
emit('click', item.id);
|
|
15816
17262
|
item.onClickRow(item.id);
|
|
15817
17263
|
},
|
|
15818
|
-
children: item.value
|
|
17264
|
+
children: item.info == null ? item.value : (0,jsx_runtime_.jsxs)("span", {
|
|
17265
|
+
className: 'data-table-header-label',
|
|
17266
|
+
children: [item.value, (0,jsx_runtime_.jsx)(tooltip/* default */.A, {
|
|
17267
|
+
direction: 'top',
|
|
17268
|
+
content: item.info,
|
|
17269
|
+
trigger: (0,jsx_runtime_.jsx)("button", {
|
|
17270
|
+
type: 'button',
|
|
17271
|
+
className: 'data-table-header-info',
|
|
17272
|
+
"aria-label": headerName(item) + ' 설명',
|
|
17273
|
+
// ⓘ 를 눌러도 머리 칸의 onClickRow(정렬 등)가 불리지 않게 한다
|
|
17274
|
+
onClick: function onClick(event) {
|
|
17275
|
+
return event.stopPropagation();
|
|
17276
|
+
},
|
|
17277
|
+
children: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
17278
|
+
name: 'info',
|
|
17279
|
+
size: 'xs'
|
|
17280
|
+
})
|
|
17281
|
+
})
|
|
17282
|
+
})]
|
|
17283
|
+
})
|
|
15819
17284
|
}, item.id);
|
|
15820
|
-
})
|
|
17285
|
+
})]
|
|
15821
17286
|
})
|
|
15822
|
-
}), (0,jsx_runtime_.
|
|
17287
|
+
}), (0,jsx_runtime_.jsxs)(base_table.Body, {
|
|
15823
17288
|
className: 'data-table',
|
|
15824
|
-
children: columns.
|
|
17289
|
+
children: [columns.length === 0 && empty != null && (0,jsx_runtime_.jsx)(base_table.Row, {
|
|
17290
|
+
className: 'data-table-row data-table-empty-row',
|
|
17291
|
+
children: (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
17292
|
+
className: 'data-table-empty',
|
|
17293
|
+
colSpan: columnCount,
|
|
17294
|
+
children: (0,jsx_runtime_.jsx)("span", {
|
|
17295
|
+
className: 'data-table-empty-message',
|
|
17296
|
+
children: empty
|
|
17297
|
+
})
|
|
17298
|
+
})
|
|
17299
|
+
}), columns.map(function (column, columnIndex) {
|
|
17300
|
+
var _a, _b;
|
|
15825
17301
|
var columnKey = Object.keys(column).join('__');
|
|
15826
|
-
|
|
17302
|
+
var rowId = rowIdOf(column, columnIndex);
|
|
17303
|
+
var selected = selectedIds.includes(rowId);
|
|
17304
|
+
return (0,jsx_runtime_.jsxs)(base_table.Row, {
|
|
15827
17305
|
className: 'data-table-row',
|
|
15828
17306
|
style: rowStyle,
|
|
15829
|
-
|
|
17307
|
+
"data-state": selectable ? selected ? 'selected' : 'unselected' : undefined,
|
|
17308
|
+
"data-disabled": column.rowDisabled || undefined,
|
|
17309
|
+
children: [selectable && (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
17310
|
+
className: selectCellClassName,
|
|
17311
|
+
children: (0,jsx_runtime_.jsx)(check_box/* default */.A, {
|
|
17312
|
+
id: baseId + '-row-' + rowId,
|
|
17313
|
+
size: 's',
|
|
17314
|
+
label: null,
|
|
17315
|
+
"aria-label": ((_a = column.rowLabel) !== null && _a !== void 0 ? _a : columnIndex + 1 + '번째 행') + ' 선택',
|
|
17316
|
+
checked: selected,
|
|
17317
|
+
disabled: column.rowDisabled,
|
|
17318
|
+
onChange: function onChange(checked) {
|
|
17319
|
+
return toggleRow(rowId, checked);
|
|
17320
|
+
}
|
|
17321
|
+
})
|
|
17322
|
+
}), rows.map(function (item, i) {
|
|
15830
17323
|
var cellData = column[item.id];
|
|
15831
17324
|
var cellValue = cellData === null || cellData === void 0 ? void 0 : cellData.value;
|
|
15832
17325
|
return (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
15833
|
-
|
|
15834
|
-
var _a;
|
|
15835
|
-
if (i < fixedRowsIndex && el) {
|
|
15836
|
-
var leftPosition = 0;
|
|
15837
|
-
var cells = (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.fixed');
|
|
15838
|
-
if (cells) {
|
|
15839
|
-
for (var j = 0; j < i; j++) {
|
|
15840
|
-
leftPosition += cells[j].offsetWidth;
|
|
15841
|
-
}
|
|
15842
|
-
}
|
|
15843
|
-
el.style.left = leftPosition + 'px';
|
|
15844
|
-
}
|
|
15845
|
-
},
|
|
15846
|
-
className: (0,classNames/* classNames */.x)(fixedClassName(i), pressEffect && (cellData === null || cellData === void 0 ? void 0 : cellData.onClickCell) && 'motion-press-dim'),
|
|
17326
|
+
className: (0,classNames/* classNames */.x)(columnClassName(item, i), pressEffect && (cellData === null || cellData === void 0 ? void 0 : cellData.onClickCell) && 'motion-press-dim'),
|
|
15847
17327
|
"data-id": item.id,
|
|
15848
17328
|
onClick: function onClick() {
|
|
15849
17329
|
var _a;
|
|
@@ -15852,16 +17332,20 @@ var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
15852
17332
|
style: bodyCellStyle(item),
|
|
15853
17333
|
children: typeof cellValue === 'function' ? cellValue(item) : cellValue
|
|
15854
17334
|
}, "".concat(columnKey, "__").concat(item.id));
|
|
15855
|
-
})
|
|
15856
|
-
}, "column__".concat(columnKey, "__").concat(columnIndex));
|
|
15857
|
-
})
|
|
17335
|
+
})]
|
|
17336
|
+
}, (_b = column.rowId) !== null && _b !== void 0 ? _b : "column__".concat(columnKey, "__").concat(columnIndex));
|
|
17337
|
+
})]
|
|
15858
17338
|
})]
|
|
15859
17339
|
})
|
|
15860
17340
|
});
|
|
15861
17341
|
});
|
|
15862
17342
|
DataTableBase.displayName = 'DataTable';
|
|
15863
17343
|
// forwardRef 는 제네릭을 잃는다. rows 의 id 로 columns 키를 좁히는 타입을 되살린다.
|
|
15864
|
-
var
|
|
17344
|
+
var DataTableGeneric = DataTableBase;
|
|
17345
|
+
var DataTable = Object.assign(DataTableGeneric, {
|
|
17346
|
+
CellText: base_table.CellText,
|
|
17347
|
+
HoverActions: base_table.HoverActions
|
|
17348
|
+
});
|
|
15865
17349
|
/* harmony default export */ const data_table = (DataTable);
|
|
15866
17350
|
|
|
15867
17351
|
/***/ },
|
|
@@ -16267,10 +17751,10 @@ var useTrack = __nuri_require__(4560);
|
|
|
16267
17751
|
var classNames = __nuri_require__(3274);
|
|
16268
17752
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
16269
17753
|
var getMergedProps = __nuri_require__(7335);
|
|
17754
|
+
// EXTERNAL MODULE: ./components/form-field/form-field-context.ts
|
|
17755
|
+
var form_field_context = __nuri_require__(7187);
|
|
16270
17756
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
16271
17757
|
var icon = __nuri_require__(3547);
|
|
16272
|
-
// EXTERNAL MODULE: ./components/elements/text/text.tsx
|
|
16273
|
-
var text_text = __nuri_require__(7739);
|
|
16274
17758
|
;// ./components/text-area/base-text-area.tsx
|
|
16275
17759
|
var __assign = undefined && undefined.__assign || function () {
|
|
16276
17760
|
__assign = Object.assign || function (t) {
|
|
@@ -16293,7 +17777,6 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16293
17777
|
|
|
16294
17778
|
|
|
16295
17779
|
|
|
16296
|
-
|
|
16297
17780
|
var TextAreaContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.createContext)({
|
|
16298
17781
|
onChange: function onChange() {}
|
|
16299
17782
|
});
|
|
@@ -16318,14 +17801,14 @@ var TextAreaRootBase = function TextAreaRootBase(props) {
|
|
|
16318
17801
|
TextAreaRootBase.displayName = 'TextAreaRoot';
|
|
16319
17802
|
var TextAreaLabel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16320
17803
|
var text = props.text,
|
|
16321
|
-
className = props.className
|
|
16322
|
-
|
|
17804
|
+
className = props.className,
|
|
17805
|
+
htmlFor = props.htmlFor;
|
|
17806
|
+
return (0,jsx_runtime_.jsx)("label", {
|
|
16323
17807
|
ref: ref,
|
|
16324
17808
|
className: (0,classNames/* classNames */.x)('nuri-theme base-text-area label', className),
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
}) : text;
|
|
17809
|
+
htmlFor: htmlFor,
|
|
17810
|
+
children: text
|
|
17811
|
+
});
|
|
16329
17812
|
});
|
|
16330
17813
|
TextAreaLabel.displayName = 'TextAreaLabel';
|
|
16331
17814
|
var TextAreaTextarea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
@@ -16366,16 +17849,17 @@ var TextAreaAction = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
16366
17849
|
}));
|
|
16367
17850
|
});
|
|
16368
17851
|
TextAreaAction.displayName = 'TextAreaAction';
|
|
17852
|
+
// 노드를 넘겨도 감싸서 id 를 단다. textarea 의 aria-describedby 가 이 id 를 가리킨다
|
|
16369
17853
|
var TextAreaHelperText = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16370
17854
|
var text = props.text,
|
|
16371
|
-
className = props.className
|
|
16372
|
-
|
|
17855
|
+
className = props.className,
|
|
17856
|
+
id = props.id;
|
|
17857
|
+
return (0,jsx_runtime_.jsx)("div", {
|
|
16373
17858
|
ref: ref,
|
|
16374
17859
|
className: (0,classNames/* classNames */.x)('nuri-theme base-text-area helper-text', className),
|
|
16375
|
-
|
|
16376
|
-
|
|
16377
|
-
|
|
16378
|
-
}) : text;
|
|
17860
|
+
id: id,
|
|
17861
|
+
children: text
|
|
17862
|
+
});
|
|
16379
17863
|
});
|
|
16380
17864
|
TextAreaHelperText.displayName = 'TextAreaHelperText';
|
|
16381
17865
|
var TextAreaRoot = Object.assign(TextAreaRootBase, {
|
|
@@ -16387,10 +17871,15 @@ var TextAreaRoot = Object.assign(TextAreaRootBase, {
|
|
|
16387
17871
|
/* harmony default export */ const base_text_area = (TextAreaRoot);
|
|
16388
17872
|
// EXTERNAL MODULE: ./helpers/props/common-props.ts
|
|
16389
17873
|
var common_props = __nuri_require__(7298);
|
|
17874
|
+
// EXTERNAL MODULE: ./components/text-field/text-field-props.ts
|
|
17875
|
+
var text_field_props = __nuri_require__(244);
|
|
16390
17876
|
;// ./components/text-area/text-area-props.ts
|
|
16391
17877
|
|
|
17878
|
+
|
|
16392
17879
|
var sizes = ['s', 'm'];
|
|
16393
17880
|
var resize = ['none', 'vertical'];
|
|
17881
|
+
/** TextField 와 같다. outline 은 흰 바탕에 회색 선(기본), fill 은 선 없는 연회색 면 */
|
|
17882
|
+
|
|
16394
17883
|
var textAreaProps = {
|
|
16395
17884
|
size: (0,common_props/* sizeProp */.lw)(sizes, 's'),
|
|
16396
17885
|
width: (0,common_props/* widthProp */.Iw)('100%'),
|
|
@@ -16399,7 +17888,8 @@ var textAreaProps = {
|
|
|
16399
17888
|
className: 'resize',
|
|
16400
17889
|
values: resize,
|
|
16401
17890
|
"default": 'vertical'
|
|
16402
|
-
}
|
|
17891
|
+
},
|
|
17892
|
+
variant: text_field_props/* textFieldProps */.gx.variant
|
|
16403
17893
|
};
|
|
16404
17894
|
;// ./components/text-area/text-area.tsx
|
|
16405
17895
|
var text_area_assign = undefined && undefined.__assign || function () {
|
|
@@ -16429,42 +17919,57 @@ var text_area_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16429
17919
|
|
|
16430
17920
|
|
|
16431
17921
|
|
|
17922
|
+
|
|
16432
17923
|
var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16433
|
-
var _a
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16447
|
-
|
|
16448
|
-
|
|
16449
|
-
|
|
16450
|
-
|
|
17924
|
+
var _a;
|
|
17925
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, textAreaProps),
|
|
17926
|
+
className = _b.className,
|
|
17927
|
+
style = _b.style,
|
|
17928
|
+
title = _b.title,
|
|
17929
|
+
value = _b.value,
|
|
17930
|
+
onChange = _b.onChange,
|
|
17931
|
+
defaultValue = _b.defaultValue,
|
|
17932
|
+
helperText = _b.helperText,
|
|
17933
|
+
isErrorProp = _b.isError,
|
|
17934
|
+
showCount = _b.showCount,
|
|
17935
|
+
maxLength = _b.maxLength,
|
|
17936
|
+
required = _b.required,
|
|
17937
|
+
id = _b.id,
|
|
17938
|
+
ariaDescribedBy = _b["aria-describedby"],
|
|
17939
|
+
clearable = _b.clearable,
|
|
17940
|
+
onClear = _b.onClear,
|
|
17941
|
+
disabled = _b.disabled,
|
|
17942
|
+
readOnly = _b.readOnly,
|
|
17943
|
+
_onFocus = _b.onFocus,
|
|
17944
|
+
_onBlur = _b.onBlur,
|
|
17945
|
+
track = _b.track,
|
|
17946
|
+
trackProps = _b.trackProps,
|
|
17947
|
+
restProps = text_area_rest(_b, ["className", "style", "title", "value", "onChange", "defaultValue", "helperText", "isError", "showCount", "maxLength", "required", "id", 'aria-describedby', "clearable", "onClear", "disabled", "readOnly", "onFocus", "onBlur", "track", "trackProps"]);
|
|
16451
17948
|
var emit = (0,useTrack/* useTrack */.n)('TextArea', {
|
|
16452
17949
|
track: track,
|
|
16453
17950
|
trackProps: trackProps
|
|
16454
17951
|
});
|
|
16455
17952
|
var focusedValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
|
|
16456
|
-
var
|
|
16457
|
-
innerValue =
|
|
16458
|
-
setInnerValue =
|
|
17953
|
+
var _c = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : ''),
|
|
17954
|
+
innerValue = _c[0],
|
|
17955
|
+
setInnerValue = _c[1];
|
|
16459
17956
|
var currentValue = value !== null && value !== void 0 ? value : innerValue;
|
|
16460
|
-
var
|
|
16461
|
-
fieldRef =
|
|
16462
|
-
engaged =
|
|
16463
|
-
wrapperProps =
|
|
16464
|
-
clearProps =
|
|
17957
|
+
var _d = (0,useFieldClear/* useFieldClear */.h)(onClear),
|
|
17958
|
+
fieldRef = _d.fieldRef,
|
|
17959
|
+
engaged = _d.engaged,
|
|
17960
|
+
wrapperProps = _d.wrapperProps,
|
|
17961
|
+
clearProps = _d.clearProps;
|
|
16465
17962
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useImperativeHandle)(ref, function () {
|
|
16466
17963
|
return fieldRef.current;
|
|
16467
17964
|
});
|
|
17965
|
+
var autoId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
17966
|
+
// 제 라벨(title)이 없을 때만 둘레 FormField 의 라벨·도움말·오류에 잇는다
|
|
17967
|
+
var formField = (0,form_field_context/* useFormFieldControl */.j8)();
|
|
17968
|
+
var field = title ? null : formField;
|
|
17969
|
+
var textareaId = (_a = id !== null && id !== void 0 ? id : field === null || field === void 0 ? void 0 : field.id) !== null && _a !== void 0 ? _a : autoId;
|
|
17970
|
+
var helperId = "".concat(textareaId, "-helper");
|
|
17971
|
+
var describedBy = (0,form_field_context/* joinIds */.VS)(ariaDescribedBy, field === null || field === void 0 ? void 0 : field.describedBy, helperText ? helperId : false);
|
|
17972
|
+
var isError = isErrorProp || (field === null || field === void 0 ? void 0 : field.invalid);
|
|
16468
17973
|
var handleChange = function handleChange(e) {
|
|
16469
17974
|
if (value === undefined) setInnerValue(e.target.value);
|
|
16470
17975
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
@@ -16478,16 +17983,27 @@ var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
16478
17983
|
className: 'text-area',
|
|
16479
17984
|
children: [title && (0,jsx_runtime_.jsx)(base_text_area.Label, {
|
|
16480
17985
|
className: 'text-area-title',
|
|
16481
|
-
|
|
17986
|
+
htmlFor: textareaId,
|
|
17987
|
+
text: (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
17988
|
+
children: [title, required && (0,jsx_runtime_.jsx)("span", {
|
|
17989
|
+
className: 'nuri-required-dot',
|
|
17990
|
+
"aria-hidden": 'true'
|
|
17991
|
+
})]
|
|
17992
|
+
})
|
|
16482
17993
|
}), (0,jsx_runtime_.jsxs)("div", text_area_assign({
|
|
16483
17994
|
className: (0,classNames/* classNames */.x)('nuri-theme text-area-input-wrapper', isError && 'error', className),
|
|
16484
17995
|
style: style
|
|
16485
17996
|
}, wrapperProps, {
|
|
16486
17997
|
children: [(0,jsx_runtime_.jsx)(base_text_area.Textarea, text_area_assign({
|
|
16487
17998
|
ref: fieldRef,
|
|
17999
|
+
id: textareaId,
|
|
18000
|
+
maxLength: maxLength,
|
|
18001
|
+
required: required,
|
|
16488
18002
|
disabled: disabled,
|
|
16489
18003
|
readOnly: readOnly,
|
|
16490
18004
|
"aria-invalid": isError || undefined,
|
|
18005
|
+
"aria-required": !required && (field === null || field === void 0 ? void 0 : field.required) || undefined,
|
|
18006
|
+
"aria-describedby": describedBy,
|
|
16491
18007
|
onFocus: function onFocus(e) {
|
|
16492
18008
|
// uncontrolled 면 ref 로 바뀐 값(react-hook-form)을 여기서 읽어 지우기 버튼에 맞춘다
|
|
16493
18009
|
if (value === undefined) setInnerValue(e.target.value);
|
|
@@ -16506,9 +18022,16 @@ var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
16506
18022
|
name: 'x',
|
|
16507
18023
|
size: 's'
|
|
16508
18024
|
})
|
|
16509
|
-
}))
|
|
18025
|
+
})), showCount && maxLength !== undefined &&
|
|
18026
|
+
// 칠 때마다 숫자를 읽지 않게 숨긴다. 제한은 textarea 의 maxLength 가 맡는다
|
|
18027
|
+
(0,jsx_runtime_.jsxs)("span", {
|
|
18028
|
+
className: 'text-area-count',
|
|
18029
|
+
"aria-hidden": 'true',
|
|
18030
|
+
children: [currentValue.length, "/", maxLength]
|
|
18031
|
+
})]
|
|
16510
18032
|
})), helperText && (0,jsx_runtime_.jsx)(base_text_area.HelperText, {
|
|
16511
18033
|
className: (0,classNames/* classNames */.x)('text-area-helper-text', isError && 'error'),
|
|
18034
|
+
id: helperId,
|
|
16512
18035
|
text: helperText
|
|
16513
18036
|
})]
|
|
16514
18037
|
})
|
|
@@ -16654,8 +18177,8 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16654
18177
|
|
|
16655
18178
|
|
|
16656
18179
|
|
|
16657
|
-
// 글자 크기마다
|
|
16658
|
-
var
|
|
18180
|
+
// 글자 크기마다 아이콘·화살표 크기. 글자(sm 14·base 16·lg 18)보다 조금 작게 둔다
|
|
18181
|
+
var ICON_SIZE = {
|
|
16659
18182
|
s: 'xs',
|
|
16660
18183
|
m: 's',
|
|
16661
18184
|
l: 'm'
|
|
@@ -16666,6 +18189,8 @@ var TextButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(
|
|
|
16666
18189
|
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _text_button_props__WEBPACK_IMPORTED_MODULE_8__/* .textButtonProps */ .GY),
|
|
16667
18190
|
className = _b.className,
|
|
16668
18191
|
text = _b.text,
|
|
18192
|
+
leftIcon = _b.leftIcon,
|
|
18193
|
+
rightIcon = _b.rightIcon,
|
|
16669
18194
|
asChild = _b.asChild,
|
|
16670
18195
|
children = _b.children,
|
|
16671
18196
|
_onClick = _b.onClick,
|
|
@@ -16673,16 +18198,21 @@ var TextButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(
|
|
|
16673
18198
|
pressEffect = _c === void 0 ? true : _c,
|
|
16674
18199
|
track = _b.track,
|
|
16675
18200
|
trackProps = _b.trackProps,
|
|
16676
|
-
restProps = __rest(_b, ["className", "text", "asChild", "children", "onClick", "pressEffect", "track", "trackProps"]);
|
|
18201
|
+
restProps = __rest(_b, ["className", "text", "leftIcon", "rightIcon", "asChild", "children", "onClick", "pressEffect", "track", "trackProps"]);
|
|
16677
18202
|
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__/* .useTrack */ .n)('TextButton', {
|
|
16678
18203
|
track: track,
|
|
16679
18204
|
trackProps: trackProps
|
|
16680
18205
|
});
|
|
18206
|
+
var iconSize = ICON_SIZE[(_a = props.size) !== null && _a !== void 0 ? _a : _text_button_props__WEBPACK_IMPORTED_MODULE_8__/* .defaultSize */ .R7];
|
|
18207
|
+
var endIcon = rightIcon !== null && rightIcon !== void 0 ? rightIcon : props.variant === 'arrow' ? 'caret-right' : undefined;
|
|
16681
18208
|
var content = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
16682
|
-
children: [
|
|
16683
|
-
name:
|
|
16684
|
-
size:
|
|
16685
|
-
})
|
|
18209
|
+
children: [leftIcon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
18210
|
+
name: leftIcon,
|
|
18211
|
+
size: iconSize
|
|
18212
|
+
}), text, endIcon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
18213
|
+
name: endIcon,
|
|
18214
|
+
size: iconSize
|
|
18215
|
+
})]
|
|
16686
18216
|
});
|
|
16687
18217
|
var link = (0,_helpers_utils_fillLinkChild__WEBPACK_IMPORTED_MODULE_4__/* .fillLinkChild */ .Q)(asChild, children, content);
|
|
16688
18218
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, __assign({
|
|
@@ -16713,7 +18243,6 @@ TextButton.displayName = 'TextButton';
|
|
|
16713
18243
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
16714
18244
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
16715
18245
|
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
16716
|
-
/* harmony import */ var _elements_text_text__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(7739);
|
|
16717
18246
|
var __assign = undefined && undefined.__assign || function () {
|
|
16718
18247
|
__assign = Object.assign || function (t) {
|
|
16719
18248
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -16735,7 +18264,6 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16735
18264
|
|
|
16736
18265
|
|
|
16737
18266
|
|
|
16738
|
-
|
|
16739
18267
|
var identity = function identity(text) {
|
|
16740
18268
|
return text;
|
|
16741
18269
|
};
|
|
@@ -16774,14 +18302,16 @@ var TextFieldRootBase = function TextFieldRootBase(props) {
|
|
|
16774
18302
|
TextFieldRootBase.displayName = 'TextFieldRoot';
|
|
16775
18303
|
var TextFieldLabel = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16776
18304
|
var text = props.text,
|
|
16777
|
-
className = props.className
|
|
16778
|
-
|
|
18305
|
+
className = props.className,
|
|
18306
|
+
htmlFor = props.htmlFor,
|
|
18307
|
+
id = props.id;
|
|
18308
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", {
|
|
16779
18309
|
ref: ref,
|
|
16780
18310
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-text-field label', className),
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
})
|
|
18311
|
+
htmlFor: htmlFor,
|
|
18312
|
+
id: id,
|
|
18313
|
+
children: text
|
|
18314
|
+
});
|
|
16785
18315
|
});
|
|
16786
18316
|
TextFieldLabel.displayName = 'TextFieldLabel';
|
|
16787
18317
|
var TextFieldInput = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
@@ -16840,16 +18370,17 @@ var TextFieldAction = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forward
|
|
|
16840
18370
|
}));
|
|
16841
18371
|
});
|
|
16842
18372
|
TextFieldAction.displayName = 'TextFieldAction';
|
|
18373
|
+
// 노드를 넘겨도 감싸서 id 를 단다. input 의 aria-describedby 가 이 id 를 가리킨다
|
|
16843
18374
|
var TextFieldHelperText = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16844
18375
|
var text = props.text,
|
|
16845
|
-
className = props.className
|
|
16846
|
-
|
|
18376
|
+
className = props.className,
|
|
18377
|
+
id = props.id;
|
|
18378
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
16847
18379
|
ref: ref,
|
|
16848
18380
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-text-field helper-text', className),
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
}) : text;
|
|
18381
|
+
id: id,
|
|
18382
|
+
children: text
|
|
18383
|
+
});
|
|
16853
18384
|
});
|
|
16854
18385
|
TextFieldHelperText.displayName = 'TextFieldHelperText';
|
|
16855
18386
|
var TextFieldRoot = Object.assign(TextFieldRootBase, {
|
|
@@ -16868,15 +18399,23 @@ var TextFieldRoot = Object.assign(TextFieldRootBase, {
|
|
|
16868
18399
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
16869
18400
|
|
|
16870
18401
|
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16871
|
-
/* harmony export */
|
|
18402
|
+
/* harmony export */ gx: () => (/* binding */ textFieldProps)
|
|
16872
18403
|
/* harmony export */ });
|
|
16873
|
-
/* unused harmony
|
|
18404
|
+
/* unused harmony exports sizes, variant */
|
|
16874
18405
|
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
16875
18406
|
|
|
16876
18407
|
var sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
18408
|
+
/** outline 은 흰 바탕에 회색 선(기본), fill 은 선 없는 연회색 면(검색 상자·회색 바탕 위) */
|
|
18409
|
+
var variant = ['outline', 'fill'];
|
|
16877
18410
|
var textFieldProps = {
|
|
16878
18411
|
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 's'),
|
|
16879
|
-
width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('100%')
|
|
18412
|
+
width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('100%'),
|
|
18413
|
+
variant: {
|
|
18414
|
+
type: 'className',
|
|
18415
|
+
className: 'variant',
|
|
18416
|
+
values: variant,
|
|
18417
|
+
"default": 'outline'
|
|
18418
|
+
}
|
|
16880
18419
|
};
|
|
16881
18420
|
|
|
16882
18421
|
/***/ },
|
|
@@ -16893,9 +18432,10 @@ var textFieldProps = {
|
|
|
16893
18432
|
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(4560);
|
|
16894
18433
|
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3274);
|
|
16895
18434
|
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(7335);
|
|
16896
|
-
/* harmony import */ var
|
|
16897
|
-
/* harmony import */ var
|
|
16898
|
-
/* harmony import */ var
|
|
18435
|
+
/* harmony import */ var _form_field_form_field_context__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(7187);
|
|
18436
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(3547);
|
|
18437
|
+
/* harmony import */ var _base_text_field__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(4709);
|
|
18438
|
+
/* harmony import */ var _text_field_props__WEBPACK_IMPORTED_MODULE_9__ = __nuri_require__(244);
|
|
16899
18439
|
var __assign = undefined && undefined.__assign || function () {
|
|
16900
18440
|
__assign = Object.assign || function (t) {
|
|
16901
18441
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -16923,53 +18463,68 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16923
18463
|
|
|
16924
18464
|
|
|
16925
18465
|
|
|
18466
|
+
|
|
16926
18467
|
var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16927
|
-
var _a
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
18468
|
+
var _a;
|
|
18469
|
+
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _text_field_props__WEBPACK_IMPORTED_MODULE_9__/* .textFieldProps */ .gx),
|
|
18470
|
+
className = _b.className,
|
|
18471
|
+
style = _b.style,
|
|
18472
|
+
leftIcon = _b.leftIcon,
|
|
18473
|
+
rightIcon = _b.rightIcon,
|
|
18474
|
+
prefix = _b.prefix,
|
|
18475
|
+
suffix = _b.suffix,
|
|
18476
|
+
format = _b.format,
|
|
18477
|
+
clearable = _b.clearable,
|
|
18478
|
+
onClear = _b.onClear,
|
|
18479
|
+
passwordToggle = _b.passwordToggle,
|
|
18480
|
+
onVisibilityChange = _b.onVisibilityChange,
|
|
18481
|
+
title = _b.title,
|
|
18482
|
+
value = _b.value,
|
|
18483
|
+
onChange = _b.onChange,
|
|
18484
|
+
defaultValue = _b.defaultValue,
|
|
18485
|
+
helperText = _b.helperText,
|
|
18486
|
+
isErrorProp = _b.isError,
|
|
18487
|
+
showCount = _b.showCount,
|
|
18488
|
+
maxLength = _b.maxLength,
|
|
18489
|
+
required = _b.required,
|
|
18490
|
+
id = _b.id,
|
|
18491
|
+
ariaDescribedBy = _b["aria-describedby"],
|
|
18492
|
+
type = _b.type,
|
|
18493
|
+
disabled = _b.disabled,
|
|
18494
|
+
readOnly = _b.readOnly,
|
|
18495
|
+
_onFocus = _b.onFocus,
|
|
18496
|
+
_onBlur = _b.onBlur,
|
|
18497
|
+
track = _b.track,
|
|
18498
|
+
trackProps = _b.trackProps,
|
|
18499
|
+
restProps = __rest(_b, ["className", "style", "leftIcon", "rightIcon", "prefix", "suffix", "format", "clearable", "onClear", "passwordToggle", "onVisibilityChange", "title", "value", "onChange", "defaultValue", "helperText", "isError", "showCount", "maxLength", "required", "id", 'aria-describedby', "type", "disabled", "readOnly", "onFocus", "onBlur", "track", "trackProps"]);
|
|
16953
18500
|
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__/* .useTrack */ .n)('TextField', {
|
|
16954
18501
|
track: track,
|
|
16955
18502
|
trackProps: trackProps
|
|
16956
18503
|
});
|
|
16957
18504
|
var focusedValueRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');
|
|
16958
|
-
var
|
|
16959
|
-
innerValue =
|
|
16960
|
-
setInnerValue =
|
|
18505
|
+
var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : ''),
|
|
18506
|
+
innerValue = _c[0],
|
|
18507
|
+
setInnerValue = _c[1];
|
|
16961
18508
|
var raw = value !== null && value !== void 0 ? value : innerValue;
|
|
16962
|
-
var
|
|
16963
|
-
passwordVisible =
|
|
16964
|
-
setPasswordVisible =
|
|
16965
|
-
var
|
|
16966
|
-
fieldRef =
|
|
16967
|
-
engaged =
|
|
16968
|
-
wrapperProps =
|
|
16969
|
-
clearProps =
|
|
18509
|
+
var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
|
|
18510
|
+
passwordVisible = _d[0],
|
|
18511
|
+
setPasswordVisible = _d[1];
|
|
18512
|
+
var _e = (0,_helpers_hooks_useFieldClear__WEBPACK_IMPORTED_MODULE_2__/* .useFieldClear */ .h)(onClear),
|
|
18513
|
+
fieldRef = _e.fieldRef,
|
|
18514
|
+
engaged = _e.engaged,
|
|
18515
|
+
wrapperProps = _e.wrapperProps,
|
|
18516
|
+
clearProps = _e.clearProps;
|
|
16970
18517
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () {
|
|
16971
18518
|
return fieldRef.current;
|
|
16972
18519
|
});
|
|
18520
|
+
var autoId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
18521
|
+
// 제 라벨(title)이 없을 때만 둘레 FormField 의 라벨·도움말·오류에 잇는다
|
|
18522
|
+
var formField = (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_6__/* .useFormFieldControl */ .j8)();
|
|
18523
|
+
var field = title ? null : formField;
|
|
18524
|
+
var inputId = (_a = id !== null && id !== void 0 ? id : field === null || field === void 0 ? void 0 : field.id) !== null && _a !== void 0 ? _a : autoId;
|
|
18525
|
+
var helperId = "".concat(inputId, "-helper");
|
|
18526
|
+
var describedBy = (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_6__/* .joinIds */ .VS)(ariaDescribedBy, field === null || field === void 0 ? void 0 : field.describedBy, helperText ? helperId : false);
|
|
18527
|
+
var isError = isErrorProp || (field === null || field === void 0 ? void 0 : field.invalid);
|
|
16973
18528
|
var handleChange = function handleChange(e) {
|
|
16974
18529
|
if (value === undefined) setInnerValue(e.target.value);
|
|
16975
18530
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
@@ -16981,7 +18536,7 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
16981
18536
|
actions.push(__assign({
|
|
16982
18537
|
id: 'clear',
|
|
16983
18538
|
'aria-label': '입력 지우기',
|
|
16984
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18539
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, {
|
|
16985
18540
|
name: 'x',
|
|
16986
18541
|
size: 's'
|
|
16987
18542
|
})
|
|
@@ -16994,7 +18549,7 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
16994
18549
|
'aria-pressed': passwordVisible,
|
|
16995
18550
|
disabled: disabled,
|
|
16996
18551
|
// 아이콘은 지금 상태를 보인다 — 숨김이면 사선 눈, 보이면 눈 (앱과 같은 뜻)
|
|
16997
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18552
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, {
|
|
16998
18553
|
name: passwordVisible ? 'eye' : 'eye-slash',
|
|
16999
18554
|
size: 's'
|
|
17000
18555
|
}),
|
|
@@ -17004,29 +18559,40 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
17004
18559
|
}
|
|
17005
18560
|
});
|
|
17006
18561
|
}
|
|
17007
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18562
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A, {
|
|
17008
18563
|
value: value,
|
|
17009
18564
|
defaultValue: defaultValue,
|
|
17010
18565
|
format: format,
|
|
17011
18566
|
onChange: handleChange,
|
|
17012
18567
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
17013
18568
|
className: 'text-field',
|
|
17014
|
-
children: [title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18569
|
+
children: [title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Label, {
|
|
17015
18570
|
className: 'text-field-title',
|
|
17016
|
-
|
|
18571
|
+
htmlFor: inputId,
|
|
18572
|
+
text: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
18573
|
+
children: [title, required && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
18574
|
+
className: 'nuri-required-dot',
|
|
18575
|
+
"aria-hidden": 'true'
|
|
18576
|
+
})]
|
|
18577
|
+
})
|
|
17017
18578
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({
|
|
17018
18579
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('nuri-theme text-field-input-wrapper', isError && 'error', className),
|
|
17019
18580
|
style: style
|
|
17020
18581
|
}, wrapperProps, {
|
|
17021
|
-
children: [leftIcon, prefix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18582
|
+
children: [leftIcon, prefix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Prefix, {
|
|
17022
18583
|
className: 'text-field-prefix',
|
|
17023
18584
|
children: prefix
|
|
17024
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18585
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Input, __assign({
|
|
17025
18586
|
ref: fieldRef,
|
|
18587
|
+
id: inputId,
|
|
17026
18588
|
type: hasPasswordToggle && passwordVisible ? 'text' : type,
|
|
18589
|
+
maxLength: maxLength,
|
|
18590
|
+
required: required,
|
|
17027
18591
|
disabled: disabled,
|
|
17028
18592
|
readOnly: readOnly,
|
|
17029
18593
|
"aria-invalid": isError || undefined,
|
|
18594
|
+
"aria-required": !required && (field === null || field === void 0 ? void 0 : field.required) || undefined,
|
|
18595
|
+
"aria-describedby": describedBy,
|
|
17030
18596
|
onFocus: function onFocus(e) {
|
|
17031
18597
|
// uncontrolled 면 ref 로 바뀐 값(react-hook-form)을 여기서 읽어 지우기 버튼에 맞춘다
|
|
17032
18598
|
var now = raw;
|
|
@@ -17041,18 +18607,25 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
17041
18607
|
if (raw !== focusedValueRef.current) emit('change');
|
|
17042
18608
|
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
|
|
17043
18609
|
}
|
|
17044
|
-
}, restProps)), suffix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18610
|
+
}, restProps)), suffix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Suffix, {
|
|
17045
18611
|
className: 'text-field-suffix',
|
|
17046
18612
|
children: suffix
|
|
17047
18613
|
}), actions.map(function (_a) {
|
|
17048
|
-
var
|
|
18614
|
+
var actionId = _a.id,
|
|
17049
18615
|
action = __rest(_a, ["id"]);
|
|
17050
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18616
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Action, __assign({
|
|
17051
18617
|
className: 'text-field-action motion-press'
|
|
17052
|
-
}, action),
|
|
18618
|
+
}, action), actionId);
|
|
18619
|
+
}), showCount && maxLength !== undefined &&
|
|
18620
|
+
// 칠 때마다 숫자를 읽지 않게 숨긴다. 제한은 input 의 maxLength 가 맡는다
|
|
18621
|
+
(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
|
|
18622
|
+
className: 'text-field-count',
|
|
18623
|
+
"aria-hidden": 'true',
|
|
18624
|
+
children: [(format ? format.transform(raw) : raw).length, "/", maxLength]
|
|
17053
18625
|
}), rightIcon]
|
|
17054
|
-
})), helperText && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18626
|
+
})), helperText && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.HelperText, {
|
|
17055
18627
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('text-field-helper-text', isError && 'error'),
|
|
18628
|
+
id: helperId,
|
|
17056
18629
|
text: helperText
|
|
17057
18630
|
})]
|
|
17058
18631
|
})
|
|
@@ -17206,15 +18779,23 @@ var ToastRoot = Object.assign(ToastRootBase, {
|
|
|
17206
18779
|
/* harmony export */ Cc: () => (/* binding */ toastViewportProps),
|
|
17207
18780
|
/* harmony export */ Eg: () => (/* binding */ toastProps)
|
|
17208
18781
|
/* harmony export */ });
|
|
17209
|
-
/* unused harmony exports variants, positions */
|
|
18782
|
+
/* unused harmony exports variants, positions, surfaces */
|
|
17210
18783
|
var variants = ['default', 'secondary', 'success', 'warning', 'error'];
|
|
17211
|
-
var positions = ['top-right', 'bottom-right', 'bottom-center'];
|
|
18784
|
+
var positions = ['top-right', 'top-center', 'bottom-right', 'bottom-center'];
|
|
18785
|
+
/** 토스트 판. filled 는 variant 색으로 칠한 판, card 는 흰 카드 위에 variant 색 아이콘만 둔다 */
|
|
18786
|
+
var surfaces = ['filled', 'card'];
|
|
17212
18787
|
var toastProps = {
|
|
17213
18788
|
variant: {
|
|
17214
18789
|
type: 'className',
|
|
17215
18790
|
className: 'variant',
|
|
17216
18791
|
values: variants,
|
|
17217
18792
|
"default": 'default'
|
|
18793
|
+
},
|
|
18794
|
+
surface: {
|
|
18795
|
+
type: 'className',
|
|
18796
|
+
className: 'surface',
|
|
18797
|
+
values: surfaces,
|
|
18798
|
+
"default": 'filled'
|
|
17218
18799
|
}
|
|
17219
18800
|
};
|
|
17220
18801
|
var toastViewportProps = {
|
|
@@ -17281,11 +18862,19 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
17281
18862
|
|
|
17282
18863
|
|
|
17283
18864
|
|
|
17284
|
-
// 상태를 뜻하는 variant 는 앞에 아이콘을 둔다. error 는 닫기 X 와 헷갈리지 않게 원 안 느낌표를
|
|
18865
|
+
// 상태를 뜻하는 variant 는 앞에 아이콘을 둔다. filled 의 error 는 닫기 X 와 헷갈리지 않게 원 안 느낌표를 쓰고,
|
|
18866
|
+
// card 는 CSS 가 아이콘 뒤에 색 원을 깔기 때문에 원 없는 느낌표를 쓴다
|
|
17285
18867
|
var VARIANT_ICON = {
|
|
17286
|
-
|
|
17287
|
-
|
|
17288
|
-
|
|
18868
|
+
filled: {
|
|
18869
|
+
success: _assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A,
|
|
18870
|
+
warning: _assets_icons_exclamation_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A,
|
|
18871
|
+
error: _assets_icons_exclamationCircle_svg__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A
|
|
18872
|
+
},
|
|
18873
|
+
card: {
|
|
18874
|
+
success: _assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A,
|
|
18875
|
+
warning: _assets_icons_exclamation_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A,
|
|
18876
|
+
error: _assets_icons_exclamation_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A
|
|
18877
|
+
}
|
|
17289
18878
|
};
|
|
17290
18879
|
var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
17291
18880
|
var _a;
|
|
@@ -17293,9 +18882,11 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17293
18882
|
title = props.title,
|
|
17294
18883
|
description = props.description,
|
|
17295
18884
|
variant = props.variant,
|
|
18885
|
+
_b = props.surface,
|
|
18886
|
+
surface = _b === void 0 ? 'filled' : _b,
|
|
17296
18887
|
action = props.action,
|
|
17297
|
-
|
|
17298
|
-
showClose =
|
|
18888
|
+
_c = props.showClose,
|
|
18889
|
+
showClose = _c === void 0 ? true : _c,
|
|
17299
18890
|
track = props.track,
|
|
17300
18891
|
trackProps = props.trackProps,
|
|
17301
18892
|
openProp = props.open,
|
|
@@ -17304,7 +18895,7 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17304
18895
|
onEntered = props.onEntered,
|
|
17305
18896
|
onExited = props.onExited,
|
|
17306
18897
|
_onAnimationEnd = props.onAnimationEnd,
|
|
17307
|
-
restProps = __rest(props, ["className", "title", "description", "variant", "action", "showClose", "track", "trackProps", "open", "defaultOpen", "onOpenChange", "onEntered", "onExited", "onAnimationEnd"]);
|
|
18898
|
+
restProps = __rest(props, ["className", "title", "description", "variant", "surface", "action", "showClose", "track", "trackProps", "open", "defaultOpen", "onOpenChange", "onEntered", "onExited", "onAnimationEnd"]);
|
|
17308
18899
|
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_7__/* .useTrack */ .n)('Toast', {
|
|
17309
18900
|
track: track,
|
|
17310
18901
|
trackProps: trackProps
|
|
@@ -17312,13 +18903,13 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17312
18903
|
// Radix 는 open·defaultOpen 이 없으면 연 채로 시작한다. Radix 가 스스로 닫는 것은 이 값에 보이지 않아 다시 보내지 않는다.
|
|
17313
18904
|
var shown = (_a = openProp !== null && openProp !== void 0 ? openProp : defaultOpen) !== null && _a !== void 0 ? _a : true;
|
|
17314
18905
|
// 시간이 다 되거나 밀어서 Radix 가 스스로 닫는 것까지 알아야 onExited 를 부른다
|
|
17315
|
-
var
|
|
18906
|
+
var _d = (0,_helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_6__/* .useExternalState */ .C)({
|
|
17316
18907
|
prop: openProp,
|
|
17317
18908
|
handler: onOpenChange,
|
|
17318
18909
|
defaultProp: defaultOpen !== null && defaultOpen !== void 0 ? defaultOpen : true
|
|
17319
18910
|
}),
|
|
17320
|
-
open =
|
|
17321
|
-
setOpen =
|
|
18911
|
+
open = _d[0],
|
|
18912
|
+
setOpen = _d[1];
|
|
17322
18913
|
var presence = (0,_helpers_motion_use_presence_callbacks__WEBPACK_IMPORTED_MODULE_8__/* .usePresenceCallbacks */ .r)({
|
|
17323
18914
|
open: open,
|
|
17324
18915
|
onEntered: onEntered,
|
|
@@ -17329,9 +18920,11 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17329
18920
|
}, [shown]);
|
|
17330
18921
|
var variantClassName = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_10__/* .getMergedProps */ .p)({
|
|
17331
18922
|
className: className,
|
|
17332
|
-
variant: variant
|
|
18923
|
+
variant: variant,
|
|
18924
|
+
surface: surface
|
|
17333
18925
|
}, _toast_props__WEBPACK_IMPORTED_MODULE_13__/* .toastProps */ .Eg).className;
|
|
17334
|
-
var
|
|
18926
|
+
var icons = VARIANT_ICON[surface];
|
|
18927
|
+
var Icon = variant && variant in icons ? icons[variant] : null;
|
|
17335
18928
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_toast__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .A, __assign({
|
|
17336
18929
|
ref: ref,
|
|
17337
18930
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_9__/* .classNames */ .x)(variantClassName, 'toast')
|
|
@@ -19335,8 +20928,8 @@ var skeleton = __nuri_require__(7687);
|
|
|
19335
20928
|
var skeleton_group = __nuri_require__(7719);
|
|
19336
20929
|
// EXTERNAL MODULE: ./components/breadcrumb/breadcrumb.tsx + 2 modules
|
|
19337
20930
|
var breadcrumb = __nuri_require__(1986);
|
|
19338
|
-
// EXTERNAL MODULE: ./components/drop-down/drop-down.tsx
|
|
19339
|
-
var drop_down = __nuri_require__(
|
|
20931
|
+
// EXTERNAL MODULE: ./components/drop-down/drop-down.tsx
|
|
20932
|
+
var drop_down = __nuri_require__(9303);
|
|
19340
20933
|
// EXTERNAL MODULE: ./components/collapsible-menu/collapsible-menu.tsx + 2 modules
|
|
19341
20934
|
var collapsible_menu = __nuri_require__(5932);
|
|
19342
20935
|
// EXTERNAL MODULE: ./components/elements/text/text.tsx
|
|
@@ -19673,8 +21266,10 @@ var rating = __nuri_require__(9419);
|
|
|
19673
21266
|
var numeric_spinner = __nuri_require__(7740);
|
|
19674
21267
|
// EXTERNAL MODULE: ./components/card/card.tsx + 2 modules
|
|
19675
21268
|
var card = __nuri_require__(329);
|
|
19676
|
-
// EXTERNAL MODULE: ./components/stat/stat.tsx
|
|
19677
|
-
var stat = __nuri_require__(
|
|
21269
|
+
// EXTERNAL MODULE: ./components/stat/stat.tsx
|
|
21270
|
+
var stat = __nuri_require__(857);
|
|
21271
|
+
// EXTERNAL MODULE: ./components/stat/stat-group.tsx
|
|
21272
|
+
var stat_group = __nuri_require__(2455);
|
|
19678
21273
|
// EXTERNAL MODULE: ./components/platform-badge/platform-badge.tsx + 2 modules
|
|
19679
21274
|
var platform_badge = __nuri_require__(5529);
|
|
19680
21275
|
// EXTERNAL MODULE: ./components/section-header/section-header.tsx + 2 modules
|
|
@@ -19695,6 +21290,10 @@ var list_footer = __nuri_require__(2829);
|
|
|
19695
21290
|
var description_list = __nuri_require__(6143);
|
|
19696
21291
|
// EXTERNAL MODULE: ./components/grid-list/grid-list.tsx + 2 modules
|
|
19697
21292
|
var grid_list = __nuri_require__(2109);
|
|
21293
|
+
// EXTERNAL MODULE: ./components/form-field/form-field.tsx + 2 modules
|
|
21294
|
+
var form_field = __nuri_require__(581);
|
|
21295
|
+
// EXTERNAL MODULE: ./components/form-section/form-section.tsx + 2 modules
|
|
21296
|
+
var form_section = __nuri_require__(6529);
|
|
19698
21297
|
// EXTERNAL MODULE: ./components/board-row/board-row.tsx + 2 modules
|
|
19699
21298
|
var board_row = __nuri_require__(8954);
|
|
19700
21299
|
// EXTERNAL MODULE: ./components/border/border.tsx
|
|
@@ -20495,7 +22094,8 @@ var primitive = {
|
|
|
20495
22094
|
"red": "#FF0033"
|
|
20496
22095
|
},
|
|
20497
22096
|
"gradient": {
|
|
20498
|
-
"instagram": "linear-gradient(90deg, var(--color-instagram-orange) 0%, var(--color-instagram-pink) 45%, var(--color-instagram-purple) 100%)"
|
|
22097
|
+
"instagram": "linear-gradient(90deg, var(--color-instagram-orange) 0%, var(--color-instagram-pink) 45%, var(--color-instagram-purple) 100%)",
|
|
22098
|
+
"avatar-initial": "linear-gradient(150deg, var(--color-purple-300) 0%, var(--color-purple-700) 100%)"
|
|
20499
22099
|
},
|
|
20500
22100
|
"primary": "Pretendard",
|
|
20501
22101
|
"font-weight": {
|
|
@@ -20722,6 +22322,7 @@ var semanticApp = {
|
|
|
20722
22322
|
"default": "#E4E4E7",
|
|
20723
22323
|
"hover": "#A1A1AA",
|
|
20724
22324
|
"accent": "#4C277C",
|
|
22325
|
+
"accent-subtle": "#C3B4DD",
|
|
20725
22326
|
"error": "#DF535C",
|
|
20726
22327
|
"disabled": "#E4E4E7"
|
|
20727
22328
|
},
|
|
@@ -20730,6 +22331,7 @@ var semanticApp = {
|
|
|
20730
22331
|
},
|
|
20731
22332
|
"surface": {
|
|
20732
22333
|
"base": "#FFFFFF",
|
|
22334
|
+
"elevated": "#FFFFFF",
|
|
20733
22335
|
"subtle": "#FAFAFA",
|
|
20734
22336
|
"muted": "#F4F4F5",
|
|
20735
22337
|
"strong": "#E4E4E7",
|
|
@@ -20789,10 +22391,6 @@ var semanticApp = {
|
|
|
20789
22391
|
"on-brand": "#FFFFFF",
|
|
20790
22392
|
"brand": "#4C277C"
|
|
20791
22393
|
},
|
|
20792
|
-
"focus-halo": {
|
|
20793
|
-
"color": "#F4EFFA",
|
|
20794
|
-
"error-color": "#FFF5F6"
|
|
20795
|
-
},
|
|
20796
22394
|
"toast": {
|
|
20797
22395
|
"description": "#DDD1F0",
|
|
20798
22396
|
"success-background": "#16A34A",
|
|
@@ -20964,6 +22562,7 @@ var semanticAdmin = {
|
|
|
20964
22562
|
"default": "#D4D4D8",
|
|
20965
22563
|
"hover": "#A1A1AA",
|
|
20966
22564
|
"accent": "#391D5D",
|
|
22565
|
+
"accent-subtle": "#C3B4DD",
|
|
20967
22566
|
"error": "#DF535C",
|
|
20968
22567
|
"disabled": "#E4E4E7"
|
|
20969
22568
|
},
|
|
@@ -21061,6 +22660,9 @@ var motion = __nuri_require__(8982);
|
|
|
21061
22660
|
|
|
21062
22661
|
|
|
21063
22662
|
|
|
22663
|
+
|
|
22664
|
+
|
|
22665
|
+
|
|
21064
22666
|
|
|
21065
22667
|
|
|
21066
22668
|
|
|
@@ -21091,6 +22693,8 @@ export const DescriptionList = description_list/* default */.A;
|
|
|
21091
22693
|
export const Drawer = drawer/* default */.A;
|
|
21092
22694
|
export const DropDown = drop_down/* default */.A;
|
|
21093
22695
|
export const EmptyState = empty_state/* default */.A;
|
|
22696
|
+
export const FormField = form_field/* default */.A;
|
|
22697
|
+
export const FormSection = form_section/* default */.A;
|
|
21094
22698
|
export const FullSecureKeypad = full_secure_keypad/* default */.A;
|
|
21095
22699
|
export const GridList = grid_list/* default */.A;
|
|
21096
22700
|
export const Highlight = highlight/* default */.A;
|
|
@@ -21135,6 +22739,7 @@ export const Slider = slider/* default */.A;
|
|
|
21135
22739
|
export const Spinner = spinner/* default */.A;
|
|
21136
22740
|
export const SplitTextField = split_text_field/* default */.A;
|
|
21137
22741
|
export const Stat = stat/* default */.A;
|
|
22742
|
+
export const StatGroup = stat_group/* default */.A;
|
|
21138
22743
|
export const StepProgress = step_progress/* default */.A;
|
|
21139
22744
|
export const Switch = switch_switch/* default */.A;
|
|
21140
22745
|
export const TableRow = table_row/* default */.A;
|