@nurihaus/web-design-system 3.26.1 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agreement.js +6 -198
- package/dist/ai/components.md +696 -77
- package/dist/ai/migration.md +25 -0
- package/dist/ai/motion.md +10 -4
- package/dist/ai/patterns.md +1631 -663
- package/dist/ai/tokens.md +14 -8
- package/dist/check-box.js +24 -14
- package/dist/chip-group.js +23 -7
- package/dist/chunk-244.js +31 -0
- package/dist/chunk-2735.js +123 -0
- package/dist/chunk-4359.js +96 -0
- package/dist/{chunk-6096.js → chunk-4709.js} +17 -33
- package/dist/chunk-4955.js +115 -0
- package/dist/chunk-7024.js +3 -1
- package/dist/chunk-7187.js +35 -0
- package/dist/chunk-7829.js +10 -2
- package/dist/chunk-8144.js +106 -0
- package/dist/chunk-9350.js +23 -0
- package/dist/components/check-box/check-box-type.d.ts +2 -0
- package/dist/components/check-box/check-box.stories.d.ts +2 -0
- package/dist/components/chip-group/chip-group-props.d.ts +6 -3
- package/dist/components/chip-group/chip-group-type.d.ts +4 -1
- package/dist/components/chip-group/chip-group.stories.d.ts +6 -2
- package/dist/components/description-list/description-list-props.d.ts +15 -1
- package/dist/components/description-list/description-list-type.d.ts +11 -1
- package/dist/components/description-list/description-list.d.ts +1 -1
- package/dist/components/description-list/description-list.stories.d.ts +7 -0
- package/dist/components/drop-down/drop-down-type.d.ts +14 -2
- package/dist/components/drop-down/drop-down.stories.d.ts +3 -1
- package/dist/components/empty-state/empty-state-props.d.ts +3 -0
- package/dist/components/empty-state/empty-state-type.d.ts +8 -2
- package/dist/components/empty-state/empty-state.d.ts +3 -0
- package/dist/components/empty-state/empty-state.stories.d.ts +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 +3 -3
- package/dist/components/stat/base-stat.d.ts +13 -4
- package/dist/components/stat/stat-group.d.ts +8 -0
- package/dist/components/stat/stat-group.stories.d.ts +27 -0
- package/dist/components/stat/stat-props.d.ts +5 -3
- package/dist/components/stat/stat-type.d.ts +40 -2
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/stat/stat.stories.d.ts +3 -1
- package/dist/components/table/base-table.d.ts +5 -1
- package/dist/components/table/data-table.d.ts +6 -1
- package/dist/components/table/table-props.d.ts +10 -0
- package/dist/components/table/table-type.d.ts +42 -6
- package/dist/components/table/table.stories.d.ts +101 -2
- package/dist/components/text-area/base-text-area.d.ts +2 -2
- package/dist/components/text-area/text-area-props.d.ts +8 -0
- package/dist/components/text-area/text-area-type.d.ts +12 -1
- package/dist/components/text-area/text-area.stories.d.ts +11 -1
- package/dist/components/text-button/text-button-type.d.ts +5 -0
- package/dist/components/text-button/text-button.stories.d.ts +2 -0
- package/dist/components/text-field/base-text-field.d.ts +2 -2
- package/dist/components/text-field/text-field-props.d.ts +8 -0
- package/dist/components/text-field/text-field-type.d.ts +13 -1
- package/dist/components/text-field/text-field.stories.d.ts +10 -2
- package/dist/components/toast/toast-props.d.ts +10 -2
- package/dist/components/toast/toast-type.d.ts +3 -1
- package/dist/components/toast/toast.stories.d.ts +18 -3
- package/dist/components.css +1598 -142
- package/dist/data-table.js +301 -50
- package/dist/description-list.js +221 -6
- package/dist/docs/patterns/desktop/admin-apply.stories.d.ts +16 -0
- package/dist/docs/patterns/desktop/admin-bulk.stories.d.ts +7 -4
- package/dist/docs/patterns/desktop/admin-dashboard.stories.d.ts +4 -2
- package/dist/docs/patterns/desktop/admin-detail.stories.d.ts +5 -0
- package/dist/docs/patterns/desktop/admin-feature-intro.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-form.stories.d.ts +4 -2
- package/dist/docs/patterns/desktop/admin-list.stories.d.ts +5 -0
- package/dist/docs/patterns/desktop/admin-picker.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-queue.stories.d.ts +23 -0
- package/dist/docs/patterns/desktop/admin-report.stories.d.ts +3 -2
- package/dist/docs/patterns/desktop/admin-review.stories.d.ts +6 -2
- package/dist/docs/patterns/desktop/admin-settings.stories.d.ts +6 -2
- package/dist/docs/patterns/desktop/admin-split.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-states.stories.d.ts +5 -3
- package/dist/docs/patterns/desktop/admin-upload.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-wallet.stories.d.ts +18 -0
- package/dist/docs/patterns/desktop/admin-wizard.stories.d.ts +6 -3
- package/dist/docs/patterns/mobile/form.stories.d.ts +1 -0
- package/dist/drop-down.js +64 -155
- package/dist/empty-state.js +26 -14
- package/dist/form-field.js +511 -0
- package/dist/form-section.js +298 -0
- package/dist/full-secure-keypad.js +4 -4
- package/dist/helpers/motion/use-attention-handle.d.ts +1 -1
- package/dist/helpers/motion/use-effect-trigger.d.ts +1 -1
- package/dist/icon-button.js +2 -1
- package/dist/icon-text-badge.js +4 -4
- package/dist/index.d.ts +6 -1
- package/dist/index.js +2220 -648
- 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 +1357 -164
- package/dist/text-area.js +90 -53
- package/dist/text-button.js +14 -7
- package/dist/text-field.js +94 -62
- package/dist/toast.js +27 -15
- package/dist/tokens/generated/semantic-admin.d.ts +1 -0
- package/dist/tokens/generated/semantic-app.d.ts +2 -4
- package/dist/tokens.css +24 -9
- package/dist/tokens.js +3 -4
- package/package.json +13 -1
package/dist/index.js
CHANGED
|
@@ -4037,6 +4037,7 @@ var CheckBoxRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwar
|
|
|
4037
4037
|
disabled = props.disabled,
|
|
4038
4038
|
className = props.className,
|
|
4039
4039
|
checkedProp = props.checked,
|
|
4040
|
+
indeterminate = props.indeterminate,
|
|
4040
4041
|
onChange = props.onChange,
|
|
4041
4042
|
ariaLabelledBy = props["aria-labelledby"],
|
|
4042
4043
|
ariaLabel = props["aria-label"];
|
|
@@ -4058,7 +4059,8 @@ var CheckBoxRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwar
|
|
|
4058
4059
|
"aria-labelledby": ariaLabelledBy,
|
|
4059
4060
|
"aria-label": ariaLabel,
|
|
4060
4061
|
disabled: disabled,
|
|
4061
|
-
|
|
4062
|
+
// Radix 는 indeterminate 에서 누르면 true 로 넘긴다
|
|
4063
|
+
checked: indeterminate ? 'indeterminate' : checked,
|
|
4062
4064
|
onCheckedChange: function onCheckedChange(next) {
|
|
4063
4065
|
return setChecked(next === true);
|
|
4064
4066
|
},
|
|
@@ -4165,8 +4167,9 @@ var checkBoxIndicatorProps = {
|
|
|
4165
4167
|
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(4560);
|
|
4166
4168
|
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3274);
|
|
4167
4169
|
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(7335);
|
|
4168
|
-
/* harmony import */ var
|
|
4169
|
-
/* harmony import */ var
|
|
4170
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(3547);
|
|
4171
|
+
/* harmony import */ var _base_check_box__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(9703);
|
|
4172
|
+
/* harmony import */ var _check_box_props__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(6278);
|
|
4170
4173
|
var __assign = undefined && undefined.__assign || function () {
|
|
4171
4174
|
__assign = Object.assign || function (t) {
|
|
4172
4175
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -4193,9 +4196,10 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
4193
4196
|
|
|
4194
4197
|
|
|
4195
4198
|
|
|
4199
|
+
|
|
4196
4200
|
var CheckBox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
4197
4201
|
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,
|
|
4202
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _check_box_props__WEBPACK_IMPORTED_MODULE_8__/* .checkBoxIndicatorProps */ .l2),
|
|
4199
4203
|
label = _a.label,
|
|
4200
4204
|
indicatorClassName = _a.className,
|
|
4201
4205
|
_onChange = _a.onChange,
|
|
@@ -4209,7 +4213,7 @@ var CheckBox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
|
4209
4213
|
track: track,
|
|
4210
4214
|
trackProps: trackProps
|
|
4211
4215
|
});
|
|
4212
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
|
|
4216
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_check_box__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, __assign({
|
|
4213
4217
|
ref: ref,
|
|
4214
4218
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)(rootClassName, 'check-box'),
|
|
4215
4219
|
onChange: function onChange(checked) {
|
|
@@ -4223,12 +4227,15 @@ var CheckBox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
|
4223
4227
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {
|
|
4224
4228
|
className: 'check-box-rest-icon',
|
|
4225
4229
|
"aria-hidden": 'true'
|
|
4226
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
4230
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_check_box__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.Indicator, {
|
|
4227
4231
|
className: 'check-box-indicator',
|
|
4228
4232
|
delay: delay,
|
|
4229
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
4233
|
+
children: restProps.indeterminate ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
4234
|
+
name: 'minus',
|
|
4235
|
+
size: 'xs'
|
|
4236
|
+
}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {})
|
|
4230
4237
|
})]
|
|
4231
|
-
}), label && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
4238
|
+
}), label && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_check_box__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.Label, {
|
|
4232
4239
|
children: label
|
|
4233
4240
|
})]
|
|
4234
4241
|
}));
|
|
@@ -4259,6 +4266,8 @@ var useTrack = __nuri_require__(4560);
|
|
|
4259
4266
|
var classNames = __nuri_require__(3274);
|
|
4260
4267
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
4261
4268
|
var getMergedProps = __nuri_require__(7335);
|
|
4269
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
4270
|
+
var icon = __nuri_require__(3547);
|
|
4262
4271
|
// EXTERNAL MODULE: external {"root":"RadixUI","commonjs2":"radix-ui","commonjs":"radix-ui","amd":"radix-ui","module":"radix-ui"}
|
|
4263
4272
|
var external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_ = __nuri_require__(0);
|
|
4264
4273
|
;// ./components/chip-group/base-chip-group.tsx
|
|
@@ -4339,8 +4348,11 @@ var ChipGroupRoot = Object.assign(ChipGroupRootBase, {
|
|
|
4339
4348
|
var common_props = __nuri_require__(7298);
|
|
4340
4349
|
;// ./components/chip-group/chip-group-props.ts
|
|
4341
4350
|
|
|
4342
|
-
/**
|
|
4343
|
-
|
|
4351
|
+
/**
|
|
4352
|
+
* 칩이 놓이는 바탕의 무게. filled 는 페이지 바탕 위, outlined 는 카드·시트 안, ghost 는 촘촘하거나 보조 필터.
|
|
4353
|
+
* tab 은 같은 목록의 상태 거르기(고르면 회색 알약, 개수는 알약), toggle 은 따로 켜고 끄는 점선 칩(multiple 전용)
|
|
4354
|
+
*/
|
|
4355
|
+
var variant = ['filled', 'outlined', 'ghost', 'tab', 'toggle'];
|
|
4344
4356
|
/** s 는 페이지 바탕 위(36), xs 는 카드·시트 안(28) */
|
|
4345
4357
|
var sizes = ['xs', 's'];
|
|
4346
4358
|
var chipGroupProps = {
|
|
@@ -4371,13 +4383,19 @@ var chip_group_assign = undefined && undefined.__assign || function () {
|
|
|
4371
4383
|
|
|
4372
4384
|
|
|
4373
4385
|
|
|
4386
|
+
|
|
4374
4387
|
var chipClassName = function chipClassName(pressEffect) {
|
|
4375
4388
|
return (0,classNames/* classNames */.x)('chip-group-chip', pressEffect && 'motion-press motion-press-dim');
|
|
4376
4389
|
};
|
|
4377
4390
|
var ChipLabel = function ChipLabel(props) {
|
|
4378
|
-
var item = props.item
|
|
4391
|
+
var item = props.item,
|
|
4392
|
+
variant = props.variant;
|
|
4379
4393
|
return (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
4380
|
-
children: [
|
|
4394
|
+
children: [variant === 'toggle' && (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
4395
|
+
name: 'check',
|
|
4396
|
+
size: 'xs',
|
|
4397
|
+
className: 'chip-group-check'
|
|
4398
|
+
}), item.label, item.count !== undefined && (0,jsx_runtime_.jsx)("span", {
|
|
4381
4399
|
className: 'chip-group-count',
|
|
4382
4400
|
children: item.count
|
|
4383
4401
|
})]
|
|
@@ -4488,7 +4506,8 @@ var MultipleChipGroup = /*#__PURE__*/(0,external_root_React_commonjs2_react_comm
|
|
|
4488
4506
|
value: item.id,
|
|
4489
4507
|
disabled: item.disabled || full && !selected.includes(item.id),
|
|
4490
4508
|
children: (0,jsx_runtime_.jsx)(ChipLabel, {
|
|
4491
|
-
item: item
|
|
4509
|
+
item: item,
|
|
4510
|
+
variant: props.variant
|
|
4492
4511
|
})
|
|
4493
4512
|
}, item.id);
|
|
4494
4513
|
})
|
|
@@ -4909,6 +4928,8 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ =
|
|
|
4909
4928
|
var classNames = __nuri_require__(3274);
|
|
4910
4929
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
4911
4930
|
var getMergedProps = __nuri_require__(7335);
|
|
4931
|
+
// EXTERNAL MODULE: ./components/icon-button/icon-button.tsx
|
|
4932
|
+
var icon_button = __nuri_require__(4955);
|
|
4912
4933
|
;// ./components/description-list/base-description-list.tsx
|
|
4913
4934
|
var __assign = undefined && undefined.__assign || function () {
|
|
4914
4935
|
__assign = Object.assign || function (t) {
|
|
@@ -4942,8 +4963,21 @@ var BaseDescriptionList = /*#__PURE__*/(0,external_root_React_commonjs2_react_co
|
|
|
4942
4963
|
BaseDescriptionList.displayName = 'BaseDescriptionList';
|
|
4943
4964
|
/* harmony default export */ const base_description_list = (BaseDescriptionList);
|
|
4944
4965
|
;// ./components/description-list/description-list-props.ts
|
|
4945
|
-
|
|
4946
|
-
|
|
4966
|
+
/**
|
|
4967
|
+
* between 은 이름 왼쪽·값 오른쪽 끝(금액 내역), side 는 고정 폭 이름 칸 옆에 값(정보 카드),
|
|
4968
|
+
* grid 는 회색 이름 칸과 값 칸이 번갈아 서는 4열 표(정산·계약 정보)다. grid 는 좁은 화면에서 2열이 된다
|
|
4969
|
+
*/
|
|
4970
|
+
var layout = ['between', 'side', 'grid'];
|
|
4971
|
+
var descriptionListProps = {
|
|
4972
|
+
layout: {
|
|
4973
|
+
type: 'className',
|
|
4974
|
+
className: 'layout',
|
|
4975
|
+
values: layout,
|
|
4976
|
+
"default": 'between'
|
|
4977
|
+
}
|
|
4978
|
+
};
|
|
4979
|
+
/** 복사한 뒤 체크 아이콘과 알림 문구를 두는 시간(ms) */
|
|
4980
|
+
var COPY_FEEDBACK_MS = 2000;
|
|
4947
4981
|
;// ./components/description-list/description-list.tsx
|
|
4948
4982
|
var description_list_assign = undefined && undefined.__assign || function () {
|
|
4949
4983
|
description_list_assign = Object.assign || function (t) {
|
|
@@ -4955,6 +4989,117 @@ var description_list_assign = undefined && undefined.__assign || function () {
|
|
|
4955
4989
|
};
|
|
4956
4990
|
return description_list_assign.apply(this, arguments);
|
|
4957
4991
|
};
|
|
4992
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4993
|
+
function adopt(value) {
|
|
4994
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
4995
|
+
resolve(value);
|
|
4996
|
+
});
|
|
4997
|
+
}
|
|
4998
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4999
|
+
function fulfilled(value) {
|
|
5000
|
+
try {
|
|
5001
|
+
step(generator.next(value));
|
|
5002
|
+
} catch (e) {
|
|
5003
|
+
reject(e);
|
|
5004
|
+
}
|
|
5005
|
+
}
|
|
5006
|
+
function rejected(value) {
|
|
5007
|
+
try {
|
|
5008
|
+
step(generator["throw"](value));
|
|
5009
|
+
} catch (e) {
|
|
5010
|
+
reject(e);
|
|
5011
|
+
}
|
|
5012
|
+
}
|
|
5013
|
+
function step(result) {
|
|
5014
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
5015
|
+
}
|
|
5016
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5017
|
+
});
|
|
5018
|
+
};
|
|
5019
|
+
var __generator = undefined && undefined.__generator || function (thisArg, body) {
|
|
5020
|
+
var _ = {
|
|
5021
|
+
label: 0,
|
|
5022
|
+
sent: function sent() {
|
|
5023
|
+
if (t[0] & 1) throw t[1];
|
|
5024
|
+
return t[1];
|
|
5025
|
+
},
|
|
5026
|
+
trys: [],
|
|
5027
|
+
ops: []
|
|
5028
|
+
},
|
|
5029
|
+
f,
|
|
5030
|
+
y,
|
|
5031
|
+
t,
|
|
5032
|
+
g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
5033
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
5034
|
+
return this;
|
|
5035
|
+
}), g;
|
|
5036
|
+
function verb(n) {
|
|
5037
|
+
return function (v) {
|
|
5038
|
+
return step([n, v]);
|
|
5039
|
+
};
|
|
5040
|
+
}
|
|
5041
|
+
function step(op) {
|
|
5042
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
5043
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
5044
|
+
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;
|
|
5045
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
5046
|
+
switch (op[0]) {
|
|
5047
|
+
case 0:
|
|
5048
|
+
case 1:
|
|
5049
|
+
t = op;
|
|
5050
|
+
break;
|
|
5051
|
+
case 4:
|
|
5052
|
+
_.label++;
|
|
5053
|
+
return {
|
|
5054
|
+
value: op[1],
|
|
5055
|
+
done: false
|
|
5056
|
+
};
|
|
5057
|
+
case 5:
|
|
5058
|
+
_.label++;
|
|
5059
|
+
y = op[1];
|
|
5060
|
+
op = [0];
|
|
5061
|
+
continue;
|
|
5062
|
+
case 7:
|
|
5063
|
+
op = _.ops.pop();
|
|
5064
|
+
_.trys.pop();
|
|
5065
|
+
continue;
|
|
5066
|
+
default:
|
|
5067
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
5068
|
+
_ = 0;
|
|
5069
|
+
continue;
|
|
5070
|
+
}
|
|
5071
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
5072
|
+
_.label = op[1];
|
|
5073
|
+
break;
|
|
5074
|
+
}
|
|
5075
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
5076
|
+
_.label = t[1];
|
|
5077
|
+
t = op;
|
|
5078
|
+
break;
|
|
5079
|
+
}
|
|
5080
|
+
if (t && _.label < t[2]) {
|
|
5081
|
+
_.label = t[2];
|
|
5082
|
+
_.ops.push(op);
|
|
5083
|
+
break;
|
|
5084
|
+
}
|
|
5085
|
+
if (t[2]) _.ops.pop();
|
|
5086
|
+
_.trys.pop();
|
|
5087
|
+
continue;
|
|
5088
|
+
}
|
|
5089
|
+
op = body.call(thisArg, _);
|
|
5090
|
+
} catch (e) {
|
|
5091
|
+
op = [6, e];
|
|
5092
|
+
y = 0;
|
|
5093
|
+
} finally {
|
|
5094
|
+
f = t = 0;
|
|
5095
|
+
}
|
|
5096
|
+
if (op[0] & 5) throw op[1];
|
|
5097
|
+
return {
|
|
5098
|
+
value: op[0] ? op[1] : void 0,
|
|
5099
|
+
done: true
|
|
5100
|
+
};
|
|
5101
|
+
}
|
|
5102
|
+
};
|
|
4958
5103
|
var description_list_rest = undefined && undefined.__rest || function (s, e) {
|
|
4959
5104
|
var t = {};
|
|
4960
5105
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -4969,23 +5114,92 @@ var description_list_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
4969
5114
|
|
|
4970
5115
|
|
|
4971
5116
|
|
|
4972
|
-
|
|
5117
|
+
|
|
5118
|
+
var COPY_MESSAGE = {
|
|
5119
|
+
copied: '복사했어요',
|
|
5120
|
+
failed: '복사하지 못했어요'
|
|
5121
|
+
};
|
|
5122
|
+
/** 이름–값 요약. between(값 오른쪽 끝)·side(이름 칸 옆)·grid(회색 이름 칸 4열 표) */
|
|
4973
5123
|
var DescriptionList = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
4974
5124
|
var _a = (0,getMergedProps/* getMergedProps */.p)(props, descriptionListProps),
|
|
4975
5125
|
className = _a.className,
|
|
4976
5126
|
items = _a.items,
|
|
4977
5127
|
restProps = description_list_rest(_a, ["className", "items"]);
|
|
5128
|
+
var _b = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(null),
|
|
5129
|
+
copy = _b[0],
|
|
5130
|
+
setCopy = _b[1];
|
|
5131
|
+
var resetTimer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(undefined);
|
|
5132
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useEffect)(function () {
|
|
5133
|
+
return function () {
|
|
5134
|
+
return clearTimeout(resetTimer.current);
|
|
5135
|
+
};
|
|
5136
|
+
}, []);
|
|
5137
|
+
// 클립보드는 권한·보안 문맥(https)에 따라 거절된다. 실패도 알림 문구로 알린다
|
|
5138
|
+
var copyItem = function copyItem(item) {
|
|
5139
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
5140
|
+
var result, _a;
|
|
5141
|
+
return __generator(this, function (_b) {
|
|
5142
|
+
switch (_b.label) {
|
|
5143
|
+
case 0:
|
|
5144
|
+
result = 'copied';
|
|
5145
|
+
_b.label = 1;
|
|
5146
|
+
case 1:
|
|
5147
|
+
_b.trys.push([1, 3,, 4]);
|
|
5148
|
+
return [4 /*yield*/, navigator.clipboard.writeText(item.copyValue)];
|
|
5149
|
+
case 2:
|
|
5150
|
+
_b.sent();
|
|
5151
|
+
return [3 /*break*/, 4];
|
|
5152
|
+
case 3:
|
|
5153
|
+
_a = _b.sent();
|
|
5154
|
+
result = 'failed';
|
|
5155
|
+
return [3 /*break*/, 4];
|
|
5156
|
+
case 4:
|
|
5157
|
+
setCopy({
|
|
5158
|
+
id: item.id,
|
|
5159
|
+
result: result
|
|
5160
|
+
});
|
|
5161
|
+
clearTimeout(resetTimer.current);
|
|
5162
|
+
resetTimer.current = setTimeout(function () {
|
|
5163
|
+
return setCopy(null);
|
|
5164
|
+
}, COPY_FEEDBACK_MS);
|
|
5165
|
+
return [2 /*return*/];
|
|
5166
|
+
}
|
|
5167
|
+
});
|
|
5168
|
+
});
|
|
5169
|
+
};
|
|
4978
5170
|
return (0,jsx_runtime_.jsx)(base_description_list, description_list_assign({
|
|
4979
5171
|
ref: ref,
|
|
4980
5172
|
className: (0,classNames/* classNames */.x)(className, 'description-list')
|
|
4981
5173
|
}, restProps, {
|
|
4982
5174
|
children: items.map(function (item) {
|
|
5175
|
+
var copyValue = item.copyValue;
|
|
5176
|
+
var result = (copy === null || copy === void 0 ? void 0 : copy.id) === item.id ? copy.result : null;
|
|
4983
5177
|
return (0,jsx_runtime_.jsxs)("div", {
|
|
4984
5178
|
className: (0,classNames/* classNames */.x)('description-list-item', item.total && 'total'),
|
|
4985
5179
|
children: [(0,jsx_runtime_.jsx)("dt", {
|
|
4986
5180
|
children: item.label
|
|
4987
|
-
}), (0,jsx_runtime_.jsx)("dd", {
|
|
5181
|
+
}), copyValue === undefined ? (0,jsx_runtime_.jsx)("dd", {
|
|
4988
5182
|
children: item.value
|
|
5183
|
+
}) : (0,jsx_runtime_.jsxs)("dd", {
|
|
5184
|
+
className: 'has-copy',
|
|
5185
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
5186
|
+
className: 'description-list-value',
|
|
5187
|
+
children: item.value
|
|
5188
|
+
}), (0,jsx_runtime_.jsx)(icon_button/* default */.A, {
|
|
5189
|
+
className: 'description-list-copy',
|
|
5190
|
+
size: 's',
|
|
5191
|
+
icon: result === 'copied' ? 'check' : 'copy',
|
|
5192
|
+
label: typeof item.label === 'string' ? "".concat(item.label, " \uBCF5\uC0AC") : '복사',
|
|
5193
|
+
onClick: function onClick() {
|
|
5194
|
+
return copyItem(description_list_assign(description_list_assign({}, item), {
|
|
5195
|
+
copyValue: copyValue
|
|
5196
|
+
}));
|
|
5197
|
+
}
|
|
5198
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
5199
|
+
className: 'description-list-copy-status',
|
|
5200
|
+
role: 'status',
|
|
5201
|
+
children: result && COPY_MESSAGE[result]
|
|
5202
|
+
})]
|
|
4989
5203
|
})]
|
|
4990
5204
|
}, item.id);
|
|
4991
5205
|
})
|
|
@@ -5291,34 +5505,16 @@ Drawer.displayName = 'Drawer';
|
|
|
5291
5505
|
|
|
5292
5506
|
/***/ },
|
|
5293
5507
|
|
|
5294
|
-
/***/
|
|
5508
|
+
/***/ 2735
|
|
5295
5509
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5296
5510
|
|
|
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
|
|
5511
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5512
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5513
|
+
/* harmony export */ });
|
|
5514
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
5515
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
5516
|
+
/* harmony import */ var radix_ui__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(0);
|
|
5517
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(3274);
|
|
5322
5518
|
var __assign = undefined && undefined.__assign || function () {
|
|
5323
5519
|
__assign = Object.assign || function (t) {
|
|
5324
5520
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -5345,34 +5541,34 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5345
5541
|
var DropDownRootBase = function DropDownRootBase(props) {
|
|
5346
5542
|
var children = props.children,
|
|
5347
5543
|
restProps = __rest(props, ["children"]);
|
|
5348
|
-
return (0,
|
|
5544
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Root, __assign({}, restProps, {
|
|
5349
5545
|
children: children
|
|
5350
5546
|
}));
|
|
5351
5547
|
};
|
|
5352
5548
|
DropDownRootBase.displayName = 'DropDownRoot';
|
|
5353
|
-
var DropDownTrigger = /*#__PURE__*/(0,
|
|
5549
|
+
var DropDownTrigger = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5354
5550
|
var children = props.children,
|
|
5355
5551
|
className = props.className,
|
|
5356
5552
|
restProps = __rest(props, ["children", "className"]);
|
|
5357
|
-
return (0,
|
|
5553
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Trigger, __assign({
|
|
5358
5554
|
ref: ref,
|
|
5359
|
-
className: (0,
|
|
5555
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down trigger', className)
|
|
5360
5556
|
}, restProps, {
|
|
5361
5557
|
children: children
|
|
5362
5558
|
}));
|
|
5363
5559
|
});
|
|
5364
5560
|
DropDownTrigger.displayName = 'DropDownTrigger';
|
|
5365
5561
|
// ref 는 바깥 span 이 아니라 Radix 가 값을 그리는 Select.Value 에 준다.
|
|
5366
|
-
var DropDownValue = /*#__PURE__*/(0,
|
|
5562
|
+
var DropDownValue = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5367
5563
|
var className = props.className,
|
|
5368
5564
|
asChild = props.asChild,
|
|
5369
5565
|
placeholder = props.placeholder;
|
|
5370
|
-
return (0,
|
|
5371
|
-
className: (0,
|
|
5372
|
-
children: (0,
|
|
5566
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
5567
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down value', className),
|
|
5568
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Value, {
|
|
5373
5569
|
ref: ref,
|
|
5374
5570
|
asChild: asChild,
|
|
5375
|
-
placeholder: (0,
|
|
5571
|
+
placeholder: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
5376
5572
|
className: 'nuri-placeholder',
|
|
5377
5573
|
children: placeholder
|
|
5378
5574
|
})
|
|
@@ -5380,35 +5576,39 @@ var DropDownValue = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
5380
5576
|
});
|
|
5381
5577
|
});
|
|
5382
5578
|
DropDownValue.displayName = 'DropDownValue';
|
|
5383
|
-
var DropDownContent = /*#__PURE__*/(0,
|
|
5579
|
+
var DropDownContent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5384
5580
|
var children = props.children,
|
|
5385
5581
|
className = props.className,
|
|
5386
5582
|
_a = props.position,
|
|
5387
5583
|
position = _a === void 0 ? 'popper' : _a,
|
|
5388
5584
|
restProps = __rest(props, ["children", "className", "position"]);
|
|
5389
|
-
return (0,
|
|
5585
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Content, __assign({
|
|
5390
5586
|
ref: ref,
|
|
5391
|
-
className: (0,
|
|
5587
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down content', className),
|
|
5392
5588
|
position: position,
|
|
5393
5589
|
sideOffset: 4
|
|
5394
5590
|
}, restProps, {
|
|
5395
|
-
children: (0,
|
|
5591
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Viewport, {
|
|
5396
5592
|
children: children
|
|
5397
5593
|
})
|
|
5398
5594
|
}));
|
|
5399
5595
|
});
|
|
5400
5596
|
DropDownContent.displayName = 'DropDownContent';
|
|
5401
|
-
var DropDownItem = /*#__PURE__*/(0,
|
|
5597
|
+
var DropDownItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5402
5598
|
var children = props.children,
|
|
5403
5599
|
className = props.className,
|
|
5404
|
-
|
|
5405
|
-
|
|
5600
|
+
indicator = props.indicator,
|
|
5601
|
+
restProps = __rest(props, ["children", "className", "indicator"]);
|
|
5602
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.Item, __assign({
|
|
5406
5603
|
ref: ref,
|
|
5407
|
-
className: (0,
|
|
5604
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)('nuri-theme base-drop-down item', className)
|
|
5408
5605
|
}, restProps, {
|
|
5409
|
-
children: (0,
|
|
5606
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.ItemText, {
|
|
5410
5607
|
children: children
|
|
5411
|
-
})
|
|
5608
|
+
}), indicator != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(radix_ui__WEBPACK_IMPORTED_MODULE_2__.Select.ItemIndicator, {
|
|
5609
|
+
className: 'nuri-theme base-drop-down item-indicator',
|
|
5610
|
+
children: indicator
|
|
5611
|
+
})]
|
|
5412
5612
|
}));
|
|
5413
5613
|
});
|
|
5414
5614
|
DropDownItem.displayName = 'DropDownItem';
|
|
@@ -5418,28 +5618,56 @@ var DropDownRoot = Object.assign(DropDownRootBase, {
|
|
|
5418
5618
|
Content: DropDownContent,
|
|
5419
5619
|
Item: DropDownItem
|
|
5420
5620
|
});
|
|
5421
|
-
/* harmony default export */ const
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5621
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropDownRoot);
|
|
5622
|
+
|
|
5623
|
+
/***/ },
|
|
5624
|
+
|
|
5625
|
+
/***/ 9350
|
|
5626
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5627
|
+
|
|
5628
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5629
|
+
/* harmony export */ k: () => (/* binding */ dropDownSingleProps)
|
|
5630
|
+
/* harmony export */ });
|
|
5631
|
+
/* unused harmony export sizes */
|
|
5632
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
5425
5633
|
|
|
5426
5634
|
var sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
5427
5635
|
var dropDownSingleProps = {
|
|
5428
|
-
size: (0,
|
|
5429
|
-
width: (0,
|
|
5636
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 's'),
|
|
5637
|
+
width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('fit-content')
|
|
5430
5638
|
};
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5639
|
+
|
|
5640
|
+
/***/ },
|
|
5641
|
+
|
|
5642
|
+
/***/ 9303
|
|
5643
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5644
|
+
|
|
5645
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5646
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5647
|
+
/* harmony export */ });
|
|
5648
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
5649
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
5650
|
+
/* harmony import */ var _assets_icons_chevronDown_svg__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(9436);
|
|
5651
|
+
/* harmony import */ var _helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(9387);
|
|
5652
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(4560);
|
|
5653
|
+
/* harmony import */ var _helpers_motion_stagger__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(4577);
|
|
5654
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(3274);
|
|
5655
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(7335);
|
|
5656
|
+
/* harmony import */ var _form_field_form_field_context__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(7187);
|
|
5657
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_9__ = __nuri_require__(3547);
|
|
5658
|
+
/* harmony import */ var _base_drop_down__WEBPACK_IMPORTED_MODULE_10__ = __nuri_require__(2735);
|
|
5659
|
+
/* harmony import */ var _drop_down_props__WEBPACK_IMPORTED_MODULE_11__ = __nuri_require__(9350);
|
|
5660
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
5661
|
+
__assign = Object.assign || function (t) {
|
|
5434
5662
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5435
5663
|
s = arguments[i];
|
|
5436
5664
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
5437
5665
|
}
|
|
5438
5666
|
return t;
|
|
5439
5667
|
};
|
|
5440
|
-
return
|
|
5668
|
+
return __assign.apply(this, arguments);
|
|
5441
5669
|
};
|
|
5442
|
-
var
|
|
5670
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
5443
5671
|
var t = {};
|
|
5444
5672
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5445
5673
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5457,14 +5685,21 @@ var drop_down_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5457
5685
|
|
|
5458
5686
|
|
|
5459
5687
|
|
|
5460
|
-
|
|
5461
|
-
|
|
5688
|
+
|
|
5689
|
+
|
|
5690
|
+
var DropDown = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5691
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_7__/* .getMergedProps */ .p)(props, _drop_down_props__WEBPACK_IMPORTED_MODULE_11__/* .dropDownSingleProps */ .k),
|
|
5462
5692
|
className = _a.className,
|
|
5463
5693
|
renderValue = _a.renderValue,
|
|
5464
5694
|
placeholder = _a.placeholder,
|
|
5465
5695
|
options = _a.options,
|
|
5466
5696
|
value = _a.value,
|
|
5467
5697
|
disabled = _a.disabled,
|
|
5698
|
+
isErrorProp = _a.isError,
|
|
5699
|
+
id = _a.id,
|
|
5700
|
+
ariaLabel = _a["aria-label"],
|
|
5701
|
+
ariaLabelledBy = _a["aria-labelledby"],
|
|
5702
|
+
ariaDescribedBy = _a["aria-describedby"],
|
|
5468
5703
|
leftIcon = _a.leftIcon,
|
|
5469
5704
|
rightIcon = _a.rightIcon,
|
|
5470
5705
|
style = _a.style,
|
|
@@ -5480,12 +5715,14 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5480
5715
|
pressEffect = _b === void 0 ? true : _b,
|
|
5481
5716
|
track = _a.track,
|
|
5482
5717
|
trackProps = _a.trackProps,
|
|
5483
|
-
restProps =
|
|
5484
|
-
var emit = (0,
|
|
5718
|
+
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"]);
|
|
5719
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_4__/* .useTrack */ .n)('DropDown', {
|
|
5485
5720
|
track: track,
|
|
5486
5721
|
trackProps: trackProps
|
|
5487
5722
|
});
|
|
5488
|
-
var
|
|
5723
|
+
var field = (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_8__/* .useFormFieldControl */ .j8)();
|
|
5724
|
+
var isError = isErrorProp || (field === null || field === void 0 ? void 0 : field.invalid);
|
|
5725
|
+
var _c = (0,_helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_3__/* .useExternalState */ .C)({
|
|
5489
5726
|
prop: openProp,
|
|
5490
5727
|
handler: onOpenChangeProp,
|
|
5491
5728
|
defaultProp: defaultOpen !== null && defaultOpen !== void 0 ? defaultOpen : false
|
|
@@ -5495,7 +5732,7 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5495
5732
|
var close = function close() {
|
|
5496
5733
|
return setOpen(false);
|
|
5497
5734
|
};
|
|
5498
|
-
return (0,
|
|
5735
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A, __assign({
|
|
5499
5736
|
value: value,
|
|
5500
5737
|
disabled: disabled,
|
|
5501
5738
|
open: open,
|
|
@@ -5505,20 +5742,26 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5505
5742
|
_onValueChange === null || _onValueChange === void 0 ? void 0 : _onValueChange(next);
|
|
5506
5743
|
}
|
|
5507
5744
|
}, restProps, {
|
|
5508
|
-
children: [(0,
|
|
5509
|
-
className: (0,
|
|
5745
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Trigger, {
|
|
5746
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__/* .classNames */ .x)(className, 'drop-down-single-trigger', isError && 'error'),
|
|
5510
5747
|
style: style,
|
|
5511
|
-
|
|
5748
|
+
id: id,
|
|
5749
|
+
"aria-label": ariaLabel,
|
|
5750
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : ariaLabel ? undefined : field === null || field === void 0 ? void 0 : field.labelId,
|
|
5751
|
+
"aria-describedby": (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_8__/* .joinIds */ .VS)(ariaDescribedBy, field === null || field === void 0 ? void 0 : field.describedBy),
|
|
5752
|
+
"aria-invalid": isError || undefined,
|
|
5753
|
+
"aria-required": (field === null || field === void 0 ? void 0 : field.required) || undefined,
|
|
5754
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
|
|
5512
5755
|
className: 'nuri-display-flex nuri-ai-center drop-down-single-label',
|
|
5513
|
-
children: [leftIcon, (renderValue === null || renderValue === void 0 ? void 0 : renderValue(value)) || (0,
|
|
5756
|
+
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
5757
|
ref: ref,
|
|
5515
5758
|
className: 'drop-down-single-value',
|
|
5516
5759
|
placeholder: placeholder
|
|
5517
5760
|
})]
|
|
5518
|
-
}), rightIcon || (0,
|
|
5761
|
+
}), rightIcon || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_assets_icons_chevronDown_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {
|
|
5519
5762
|
className: 'drop-down-single-icon rotate'
|
|
5520
5763
|
})]
|
|
5521
|
-
}), (0,
|
|
5764
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Content, {
|
|
5522
5765
|
className: 'drop-down-single-content motion-unfold',
|
|
5523
5766
|
side: side,
|
|
5524
5767
|
align: align,
|
|
@@ -5528,11 +5771,15 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5528
5771
|
isOpen: open,
|
|
5529
5772
|
close: close
|
|
5530
5773
|
}) : options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
5531
|
-
return (0,
|
|
5532
|
-
className: (0,
|
|
5533
|
-
style: (0,
|
|
5774
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_drop_down__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Item, {
|
|
5775
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_6__/* .classNames */ .x)('drop-down-single-item motion-unfold-item', pressEffect && 'motion-press-dim'),
|
|
5776
|
+
style: (0,_helpers_motion_stagger__WEBPACK_IMPORTED_MODULE_5__/* .staggerStyle */ .L)(index),
|
|
5534
5777
|
value: option.value,
|
|
5535
5778
|
disabled: option.disabled,
|
|
5779
|
+
indicator: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, {
|
|
5780
|
+
name: 'check',
|
|
5781
|
+
size: 's'
|
|
5782
|
+
}),
|
|
5536
5783
|
children: option.label
|
|
5537
5784
|
}, option.value);
|
|
5538
5785
|
})
|
|
@@ -5540,7 +5787,7 @@ var DropDown = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
5540
5787
|
}));
|
|
5541
5788
|
});
|
|
5542
5789
|
DropDown.displayName = 'DropDown';
|
|
5543
|
-
/* harmony default export */ const
|
|
5790
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropDown);
|
|
5544
5791
|
|
|
5545
5792
|
/***/ },
|
|
5546
5793
|
|
|
@@ -5561,9 +5808,463 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
5561
5808
|
}
|
|
5562
5809
|
return t;
|
|
5563
5810
|
};
|
|
5564
|
-
return __assign.apply(this, arguments);
|
|
5811
|
+
return __assign.apply(this, arguments);
|
|
5812
|
+
};
|
|
5813
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
5814
|
+
var t = {};
|
|
5815
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5816
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5817
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
5818
|
+
}
|
|
5819
|
+
return t;
|
|
5820
|
+
};
|
|
5821
|
+
|
|
5822
|
+
|
|
5823
|
+
|
|
5824
|
+
var BaseText = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5825
|
+
var _a = props.as,
|
|
5826
|
+
as = _a === void 0 ? 'p' : _a,
|
|
5827
|
+
className = props.className,
|
|
5828
|
+
restProps = __rest(props, ["as", "className"]);
|
|
5829
|
+
// 태그마다 ref 요소 타입이 달라 합집합으로는 ref 를 넘길 수 없다.
|
|
5830
|
+
var Comp = as;
|
|
5831
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Comp, __assign({
|
|
5832
|
+
ref: ref,
|
|
5833
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-text', className)
|
|
5834
|
+
}, restProps));
|
|
5835
|
+
});
|
|
5836
|
+
BaseText.displayName = 'BaseText';
|
|
5837
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseText);
|
|
5838
|
+
|
|
5839
|
+
/***/ },
|
|
5840
|
+
|
|
5841
|
+
/***/ 9074
|
|
5842
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5843
|
+
|
|
5844
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5845
|
+
/* harmony export */ Gk: () => (/* binding */ semanticColor),
|
|
5846
|
+
/* harmony export */ Oc: () => (/* binding */ styleClassProps),
|
|
5847
|
+
/* harmony export */ TU: () => (/* binding */ fontSizeClass),
|
|
5848
|
+
/* harmony export */ em: () => (/* binding */ textProps)
|
|
5849
|
+
/* harmony export */ });
|
|
5850
|
+
/* unused harmony exports fontSize, weight, color, textAlign, textDecoration, wordBreak, whiteSpace */
|
|
5851
|
+
/* harmony import */ var _styles_token_colors__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7232);
|
|
5852
|
+
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
|
|
5853
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
5854
|
+
if (ar || !(i in from)) {
|
|
5855
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5856
|
+
ar[i] = from[i];
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5859
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
5860
|
+
};
|
|
5861
|
+
|
|
5862
|
+
// 글자 크기 단계다. 컴포넌트 크기 이름(xs·s·m·l·xl)과 축이 달라 따로 둔다.
|
|
5863
|
+
var fontSize = (/* unused pure expression or super */ null && (['xsm', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']));
|
|
5864
|
+
var weight = (/* unused pure expression or super */ null && (['regular', 'medium', 'semibold', 'bold', 'extrabold']));
|
|
5865
|
+
// `2xl` 처럼 숫자로 시작하는 클래스는 선택자로 쓸 수 없어 `t-` 를 붙인다. Text 의 CSS 를 함께 쓰는 Paragraph·Post 도 이것으로 클래스를 만든다.
|
|
5866
|
+
var fontSizeClass = function fontSizeClass(size) {
|
|
5867
|
+
return /^\d+xl$/.test(size) ? "t-".concat(size) : size;
|
|
5868
|
+
};
|
|
5869
|
+
// 의미 이름(`text-primary` → `--text-primary`). 다크에서 값이 바뀐다(ADR 0012). 원시 이름은 라이트 값에 묶인다(ADR 0004)
|
|
5870
|
+
var semanticColor = ['text-primary', 'text-body', 'text-secondary', 'text-tertiary', 'text-muted', 'text-placeholder', 'text-disabled', 'text-inverse', 'text-on-brand', 'text-on-brand-subtle', 'text-on-overlay', 'text-on-disabled', 'text-brand', 'text-brand-active', 'text-brand-emphasis', 'text-brand-secondary', 'text-danger', 'text-error', 'text-success', 'text-warning'];
|
|
5871
|
+
var color = __spreadArray(__spreadArray([], semanticColor, true), Object.keys(_styles_token_colors__WEBPACK_IMPORTED_MODULE_0__/* .colors */ .T), true);
|
|
5872
|
+
// 아래 값은 CSS 표기(`pre-line`)로 받고 클래스는 camelCase(`whiteSpace-preLine`)다.
|
|
5873
|
+
// getMergedProps 는 값을 그대로 붙이므로 이 변환은 text.tsx 의 styleClass 가 한다.
|
|
5874
|
+
var textAlign = (/* unused pure expression or super */ null && (['left', 'center']));
|
|
5875
|
+
var textDecoration = (/* unused pure expression or super */ null && (['underline', 'none', 'line-through', 'overline', 'blink']));
|
|
5876
|
+
var wordBreak = (/* unused pure expression or super */ null && (['normal', 'break-all', 'break-word', 'keep-all']));
|
|
5877
|
+
var whiteSpace = (/* unused pure expression or super */ null && (['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap']));
|
|
5878
|
+
var styleClassProps = ['textAlign', 'textDecoration', 'wordBreak', 'whiteSpace'];
|
|
5879
|
+
var textProps = {
|
|
5880
|
+
color: {
|
|
5881
|
+
type: 'className',
|
|
5882
|
+
className: 'color',
|
|
5883
|
+
values: color
|
|
5884
|
+
}
|
|
5885
|
+
};
|
|
5886
|
+
|
|
5887
|
+
/***/ },
|
|
5888
|
+
|
|
5889
|
+
/***/ 7739
|
|
5890
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5891
|
+
|
|
5892
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5893
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5894
|
+
/* harmony export */ });
|
|
5895
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
5896
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
5897
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
5898
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(7335);
|
|
5899
|
+
/* harmony import */ var _base_text__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(5437);
|
|
5900
|
+
/* harmony import */ var _text_props__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(9074);
|
|
5901
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
5902
|
+
var t = {};
|
|
5903
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5904
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5905
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
5906
|
+
}
|
|
5907
|
+
return t;
|
|
5908
|
+
};
|
|
5909
|
+
|
|
5910
|
+
|
|
5911
|
+
|
|
5912
|
+
|
|
5913
|
+
|
|
5914
|
+
|
|
5915
|
+
// CSS 클래스는 camelCase(`whiteSpace-preLine`)인데 prop 값은 CSS 표기(`pre-line`)라 변환해서 붙인다.
|
|
5916
|
+
var styleClass = function styleClass(prefix, value) {
|
|
5917
|
+
return value ? "".concat(prefix, "-").concat(String(value).replace(/-(\w)/g, function (_, c) {
|
|
5918
|
+
return c.toUpperCase();
|
|
5919
|
+
})) : '';
|
|
5920
|
+
};
|
|
5921
|
+
// onClick·id 같은 HTML 속성은 넘기지 않는다. className 과 style 만 요소에 간다.
|
|
5922
|
+
var Text = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5923
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__/* .getMergedProps */ .p)(props, _text_props__WEBPACK_IMPORTED_MODULE_5__/* .textProps */ .em),
|
|
5924
|
+
text = _a.text,
|
|
5925
|
+
size = _a.size,
|
|
5926
|
+
weight = _a.weight,
|
|
5927
|
+
as = _a.as,
|
|
5928
|
+
className = _a.className,
|
|
5929
|
+
style = _a.style,
|
|
5930
|
+
restProps = __rest(_a, ["text", "size", "weight", "as", "className", "style"]);
|
|
5931
|
+
var textClassName = (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)(className, (0,_text_props__WEBPACK_IMPORTED_MODULE_5__/* .fontSizeClass */ .TU)(size), weight, _text_props__WEBPACK_IMPORTED_MODULE_5__/* .styleClassProps */ .Oc.map(function (key) {
|
|
5932
|
+
return styleClass(key, restProps[key]);
|
|
5933
|
+
}));
|
|
5934
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, {
|
|
5935
|
+
ref: ref,
|
|
5936
|
+
className: textClassName,
|
|
5937
|
+
as: as,
|
|
5938
|
+
style: style,
|
|
5939
|
+
children: text
|
|
5940
|
+
});
|
|
5941
|
+
});
|
|
5942
|
+
Text.displayName = 'Text';
|
|
5943
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Text);
|
|
5944
|
+
|
|
5945
|
+
/***/ },
|
|
5946
|
+
|
|
5947
|
+
/***/ 5589
|
|
5948
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5949
|
+
|
|
5950
|
+
|
|
5951
|
+
// EXPORTS
|
|
5952
|
+
__nuri_require__.d(__webpack_exports__, {
|
|
5953
|
+
A: () => (/* binding */ empty_state)
|
|
5954
|
+
});
|
|
5955
|
+
|
|
5956
|
+
// EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
|
|
5957
|
+
var jsx_runtime_ = __nuri_require__(612);
|
|
5958
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
5959
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
5960
|
+
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
5961
|
+
var classNames = __nuri_require__(3274);
|
|
5962
|
+
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
5963
|
+
var getMergedProps = __nuri_require__(7335);
|
|
5964
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
5965
|
+
var icon_icon = __nuri_require__(3547);
|
|
5966
|
+
;// ./components/empty-state/base-empty-state.tsx
|
|
5967
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
5968
|
+
__assign = Object.assign || function (t) {
|
|
5969
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5970
|
+
s = arguments[i];
|
|
5971
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
5972
|
+
}
|
|
5973
|
+
return t;
|
|
5974
|
+
};
|
|
5975
|
+
return __assign.apply(this, arguments);
|
|
5976
|
+
};
|
|
5977
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
5978
|
+
var t = {};
|
|
5979
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5980
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5981
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
5982
|
+
}
|
|
5983
|
+
return t;
|
|
5984
|
+
};
|
|
5985
|
+
|
|
5986
|
+
|
|
5987
|
+
|
|
5988
|
+
var BaseEmptyState = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
5989
|
+
var className = props.className,
|
|
5990
|
+
restProps = __rest(props, ["className"]);
|
|
5991
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
5992
|
+
ref: ref,
|
|
5993
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-empty-state', className)
|
|
5994
|
+
}, restProps));
|
|
5995
|
+
});
|
|
5996
|
+
BaseEmptyState.displayName = 'BaseEmptyState';
|
|
5997
|
+
/* harmony default export */ const base_empty_state = (BaseEmptyState);
|
|
5998
|
+
// EXTERNAL MODULE: ./helpers/props/common-props.ts
|
|
5999
|
+
var common_props = __nuri_require__(7298);
|
|
6000
|
+
;// ./components/empty-state/empty-state-props.ts
|
|
6001
|
+
|
|
6002
|
+
/** 아이콘 원의 색. default 는 연보라, neutral 은 회색(오류·준비 중처럼 힘을 뺄 때), success 는 초록(끝냈을 때) */
|
|
6003
|
+
var variant = ['default', 'neutral', 'success'];
|
|
6004
|
+
/** 제목 태그. 기본 p 는 제목 단계를 정하지 않는다 */
|
|
6005
|
+
var titleAs = (/* unused pure expression or super */ null && (['p', 'h1', 'h2', 'h3']));
|
|
6006
|
+
/** m 은 화면·카드 한가운데, s 는 표·블록 안의 작은 빈 자리 */
|
|
6007
|
+
var sizes = ['s', 'm'];
|
|
6008
|
+
var emptyStateProps = {
|
|
6009
|
+
variant: {
|
|
6010
|
+
type: 'className',
|
|
6011
|
+
className: 'variant',
|
|
6012
|
+
values: variant,
|
|
6013
|
+
"default": 'default'
|
|
6014
|
+
},
|
|
6015
|
+
size: (0,common_props/* sizeProp */.lw)(sizes, 'm')
|
|
6016
|
+
};
|
|
6017
|
+
;// ./components/empty-state/empty-state.tsx
|
|
6018
|
+
var empty_state_assign = undefined && undefined.__assign || function () {
|
|
6019
|
+
empty_state_assign = Object.assign || function (t) {
|
|
6020
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6021
|
+
s = arguments[i];
|
|
6022
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6023
|
+
}
|
|
6024
|
+
return t;
|
|
6025
|
+
};
|
|
6026
|
+
return empty_state_assign.apply(this, arguments);
|
|
6027
|
+
};
|
|
6028
|
+
var empty_state_rest = undefined && undefined.__rest || function (s, e) {
|
|
6029
|
+
var t = {};
|
|
6030
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6031
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6032
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6033
|
+
}
|
|
6034
|
+
return t;
|
|
6035
|
+
};
|
|
6036
|
+
|
|
6037
|
+
|
|
6038
|
+
|
|
6039
|
+
|
|
6040
|
+
|
|
6041
|
+
|
|
6042
|
+
|
|
6043
|
+
// 아이콘 원(--empty-state-icon-box-*) 안 아이콘 크기
|
|
6044
|
+
var ICON_SIZE = {
|
|
6045
|
+
s: 'l',
|
|
6046
|
+
m: 'xl'
|
|
6047
|
+
};
|
|
6048
|
+
/** 빈 목록·오류 뒤 다시 시도·찾을 수 없음·준비 중·모두 완료 화면 */
|
|
6049
|
+
var EmptyState = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6050
|
+
var _a;
|
|
6051
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, emptyStateProps),
|
|
6052
|
+
className = _b.className,
|
|
6053
|
+
icon = _b.icon,
|
|
6054
|
+
figure = _b.figure,
|
|
6055
|
+
title = _b.title,
|
|
6056
|
+
_c = _b.titleAs,
|
|
6057
|
+
Title = _c === void 0 ? 'p' : _c,
|
|
6058
|
+
description = _b.description,
|
|
6059
|
+
action = _b.action,
|
|
6060
|
+
restProps = empty_state_rest(_b, ["className", "icon", "figure", "title", "titleAs", "description", "action"]);
|
|
6061
|
+
return (0,jsx_runtime_.jsxs)(base_empty_state, empty_state_assign({
|
|
6062
|
+
ref: ref,
|
|
6063
|
+
className: (0,classNames/* classNames */.x)(className, 'empty-state'),
|
|
6064
|
+
role: 'status'
|
|
6065
|
+
}, restProps, {
|
|
6066
|
+
children: [icon && (0,jsx_runtime_.jsx)("span", {
|
|
6067
|
+
className: 'empty-state-icon',
|
|
6068
|
+
children: (0,jsx_runtime_.jsx)(icon_icon/* default */.A, {
|
|
6069
|
+
name: icon,
|
|
6070
|
+
size: ICON_SIZE[(_a = props.size) !== null && _a !== void 0 ? _a : 'm']
|
|
6071
|
+
})
|
|
6072
|
+
}), figure && (0,jsx_runtime_.jsx)("div", {
|
|
6073
|
+
className: 'empty-state-figure',
|
|
6074
|
+
children: figure
|
|
6075
|
+
}), (0,jsx_runtime_.jsx)(Title, {
|
|
6076
|
+
className: 'empty-state-title',
|
|
6077
|
+
children: title
|
|
6078
|
+
}), description && (0,jsx_runtime_.jsx)("p", {
|
|
6079
|
+
className: 'empty-state-description',
|
|
6080
|
+
children: description
|
|
6081
|
+
}), action && (0,jsx_runtime_.jsx)("div", {
|
|
6082
|
+
className: 'empty-state-action',
|
|
6083
|
+
children: action
|
|
6084
|
+
})]
|
|
6085
|
+
}));
|
|
6086
|
+
});
|
|
6087
|
+
EmptyState.displayName = 'EmptyState';
|
|
6088
|
+
/* harmony default export */ const empty_state = (EmptyState);
|
|
6089
|
+
|
|
6090
|
+
/***/ },
|
|
6091
|
+
|
|
6092
|
+
/***/ 7187
|
|
6093
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
6094
|
+
|
|
6095
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
6096
|
+
/* harmony export */ VS: () => (/* binding */ joinIds),
|
|
6097
|
+
/* harmony export */ j8: () => (/* binding */ useFormFieldControl),
|
|
6098
|
+
/* harmony export */ wh: () => (/* binding */ FormFieldContext)
|
|
6099
|
+
/* harmony export */ });
|
|
6100
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
6101
|
+
|
|
6102
|
+
/** FormField 가 안의 컨트롤에 내려 주는 라벨·도움말 연결 값. FormField 밖에서는 null */
|
|
6103
|
+
var FormFieldContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
|
|
6104
|
+
/** TextField·TextArea·DropDown 이 FormField 안에 놓였을 때 라벨·도움말·오류에 스스로 잇는 데 쓴다 */
|
|
6105
|
+
var useFormFieldControl = function useFormFieldControl() {
|
|
6106
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FormFieldContext);
|
|
6107
|
+
};
|
|
6108
|
+
/** 공백으로 나뉜 id 목록을 겹치지 않게 잇는다. 쓰는 쪽이 같은 id 를 또 넘겨도 한 번만 남는다 */
|
|
6109
|
+
var joinIds = function joinIds() {
|
|
6110
|
+
var ids = [];
|
|
6111
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
6112
|
+
ids[_i] = arguments[_i];
|
|
6113
|
+
}
|
|
6114
|
+
return Array.from(new Set(ids.flatMap(function (id) {
|
|
6115
|
+
return id ? id.split(' ') : [];
|
|
6116
|
+
}))).join(' ') || undefined;
|
|
6117
|
+
};
|
|
6118
|
+
|
|
6119
|
+
/***/ },
|
|
6120
|
+
|
|
6121
|
+
/***/ 581
|
|
6122
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
6123
|
+
|
|
6124
|
+
|
|
6125
|
+
// EXPORTS
|
|
6126
|
+
__nuri_require__.d(__webpack_exports__, {
|
|
6127
|
+
A: () => (/* binding */ form_field)
|
|
6128
|
+
});
|
|
6129
|
+
|
|
6130
|
+
// EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
|
|
6131
|
+
var jsx_runtime_ = __nuri_require__(612);
|
|
6132
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
6133
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
6134
|
+
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
6135
|
+
var classNames = __nuri_require__(3274);
|
|
6136
|
+
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
6137
|
+
var getMergedProps = __nuri_require__(7335);
|
|
6138
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
6139
|
+
var icon = __nuri_require__(3547);
|
|
6140
|
+
// EXTERNAL MODULE: external {"root":"RadixUI","commonjs2":"radix-ui","commonjs":"radix-ui","amd":"radix-ui","module":"radix-ui"}
|
|
6141
|
+
var external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_ = __nuri_require__(0);
|
|
6142
|
+
;// ./components/form-field/base-form-field.tsx
|
|
6143
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
6144
|
+
__assign = Object.assign || function (t) {
|
|
6145
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6146
|
+
s = arguments[i];
|
|
6147
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6148
|
+
}
|
|
6149
|
+
return t;
|
|
6150
|
+
};
|
|
6151
|
+
return __assign.apply(this, arguments);
|
|
6152
|
+
};
|
|
6153
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
6154
|
+
var t = {};
|
|
6155
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
6156
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6157
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6158
|
+
}
|
|
6159
|
+
return t;
|
|
6160
|
+
};
|
|
6161
|
+
|
|
6162
|
+
|
|
6163
|
+
|
|
6164
|
+
|
|
6165
|
+
var FormFieldRootBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6166
|
+
var className = props.className,
|
|
6167
|
+
restProps = __rest(props, ["className"]);
|
|
6168
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
6169
|
+
ref: ref,
|
|
6170
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-field root', className)
|
|
6171
|
+
}, restProps));
|
|
6172
|
+
});
|
|
6173
|
+
FormFieldRootBase.displayName = 'FormFieldRoot';
|
|
6174
|
+
var FormFieldLabel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6175
|
+
var className = props.className,
|
|
6176
|
+
htmlFor = props.htmlFor,
|
|
6177
|
+
required = props.required,
|
|
6178
|
+
children = props.children,
|
|
6179
|
+
restProps = __rest(props, ["className", "htmlFor", "required", "children"]);
|
|
6180
|
+
var mergedClassName = (0,classNames/* classNames */.x)('nuri-theme base-form-field label', className);
|
|
6181
|
+
var content = (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
6182
|
+
children: [children, required ? (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
6183
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
6184
|
+
className: 'form-field-required nuri-required-dot',
|
|
6185
|
+
"aria-hidden": 'true'
|
|
6186
|
+
}), (0,jsx_runtime_.jsx)(external_root_RadixUI_commonjs2_radix_ui_commonjs_radix_ui_amd_radix_ui_module_radix_ui_.VisuallyHidden.Root, {
|
|
6187
|
+
children: "\uD544\uC218"
|
|
6188
|
+
})]
|
|
6189
|
+
}) : null]
|
|
6190
|
+
});
|
|
6191
|
+
if (htmlFor) {
|
|
6192
|
+
return (0,jsx_runtime_.jsx)("label", __assign({
|
|
6193
|
+
ref: ref,
|
|
6194
|
+
className: mergedClassName,
|
|
6195
|
+
htmlFor: htmlFor
|
|
6196
|
+
}, restProps, {
|
|
6197
|
+
children: content
|
|
6198
|
+
}));
|
|
6199
|
+
}
|
|
6200
|
+
return (0,jsx_runtime_.jsx)("span", __assign({
|
|
6201
|
+
ref: ref,
|
|
6202
|
+
className: mergedClassName
|
|
6203
|
+
}, restProps, {
|
|
6204
|
+
children: content
|
|
6205
|
+
}));
|
|
6206
|
+
});
|
|
6207
|
+
FormFieldLabel.displayName = 'FormFieldLabel';
|
|
6208
|
+
var FormFieldPanel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6209
|
+
var className = props.className,
|
|
6210
|
+
restProps = __rest(props, ["className"]);
|
|
6211
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
6212
|
+
ref: ref,
|
|
6213
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-field panel', className)
|
|
6214
|
+
}, restProps));
|
|
6215
|
+
});
|
|
6216
|
+
FormFieldPanel.displayName = 'FormFieldPanel';
|
|
6217
|
+
var FormFieldColumns = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6218
|
+
var className = props.className,
|
|
6219
|
+
restProps = __rest(props, ["className"]);
|
|
6220
|
+
return (0,jsx_runtime_.jsx)("div", __assign({
|
|
6221
|
+
ref: ref,
|
|
6222
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-field columns', className)
|
|
6223
|
+
}, restProps));
|
|
6224
|
+
});
|
|
6225
|
+
FormFieldColumns.displayName = 'FormFieldColumns';
|
|
6226
|
+
var FormFieldRoot = Object.assign(FormFieldRootBase, {
|
|
6227
|
+
Label: FormFieldLabel,
|
|
6228
|
+
Panel: FormFieldPanel,
|
|
6229
|
+
Columns: FormFieldColumns
|
|
6230
|
+
});
|
|
6231
|
+
/* harmony default export */ const base_form_field = (FormFieldRoot);
|
|
6232
|
+
// EXTERNAL MODULE: ./components/form-field/form-field-context.ts
|
|
6233
|
+
var form_field_context = __nuri_require__(7187);
|
|
6234
|
+
;// ./components/form-field/form-field-props.ts
|
|
6235
|
+
/** 라벨 자리. top 은 컨트롤 위, side 는 왼쪽 고정 폭 칸 */
|
|
6236
|
+
var layout = ['top', 'side'];
|
|
6237
|
+
/** FormField.Columns 한 줄의 칸 수 */
|
|
6238
|
+
var columns = [2, 3];
|
|
6239
|
+
var formFieldProps = {
|
|
6240
|
+
layout: {
|
|
6241
|
+
type: 'className',
|
|
6242
|
+
className: 'layout',
|
|
6243
|
+
values: layout,
|
|
6244
|
+
"default": 'top'
|
|
6245
|
+
}
|
|
6246
|
+
};
|
|
6247
|
+
var formFieldPanelProps = {};
|
|
6248
|
+
var formFieldColumnsProps = {
|
|
6249
|
+
columns: {
|
|
6250
|
+
type: 'css',
|
|
6251
|
+
key: '--form-field-columns',
|
|
6252
|
+
values: columns,
|
|
6253
|
+
"default": 2
|
|
6254
|
+
}
|
|
6255
|
+
};
|
|
6256
|
+
;// ./components/form-field/form-field.tsx
|
|
6257
|
+
var form_field_assign = undefined && undefined.__assign || function () {
|
|
6258
|
+
form_field_assign = Object.assign || function (t) {
|
|
6259
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6260
|
+
s = arguments[i];
|
|
6261
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6262
|
+
}
|
|
6263
|
+
return t;
|
|
6264
|
+
};
|
|
6265
|
+
return form_field_assign.apply(this, arguments);
|
|
5565
6266
|
};
|
|
5566
|
-
var
|
|
6267
|
+
var form_field_rest = undefined && undefined.__rest || function (s, e) {
|
|
5567
6268
|
var t = {};
|
|
5568
6269
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5569
6270
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5574,136 +6275,149 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5574
6275
|
|
|
5575
6276
|
|
|
5576
6277
|
|
|
5577
|
-
var BaseText = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
5578
|
-
var _a = props.as,
|
|
5579
|
-
as = _a === void 0 ? 'p' : _a,
|
|
5580
|
-
className = props.className,
|
|
5581
|
-
restProps = __rest(props, ["as", "className"]);
|
|
5582
|
-
// 태그마다 ref 요소 타입이 달라 합집합으로는 ref 를 넘길 수 없다.
|
|
5583
|
-
var Comp = as;
|
|
5584
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Comp, __assign({
|
|
5585
|
-
ref: ref,
|
|
5586
|
-
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-text', className)
|
|
5587
|
-
}, restProps));
|
|
5588
|
-
});
|
|
5589
|
-
BaseText.displayName = 'BaseText';
|
|
5590
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BaseText);
|
|
5591
|
-
|
|
5592
|
-
/***/ },
|
|
5593
|
-
|
|
5594
|
-
/***/ 9074
|
|
5595
|
-
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5596
|
-
|
|
5597
|
-
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5598
|
-
/* harmony export */ Gk: () => (/* binding */ semanticColor),
|
|
5599
|
-
/* harmony export */ Oc: () => (/* binding */ styleClassProps),
|
|
5600
|
-
/* harmony export */ TU: () => (/* binding */ fontSizeClass),
|
|
5601
|
-
/* harmony export */ em: () => (/* binding */ textProps)
|
|
5602
|
-
/* harmony export */ });
|
|
5603
|
-
/* unused harmony exports fontSize, weight, color, textAlign, textDecoration, wordBreak, whiteSpace */
|
|
5604
|
-
/* harmony import */ var _styles_token_colors__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7232);
|
|
5605
|
-
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
|
|
5606
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
5607
|
-
if (ar || !(i in from)) {
|
|
5608
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5609
|
-
ar[i] = from[i];
|
|
5610
|
-
}
|
|
5611
|
-
}
|
|
5612
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
5613
|
-
};
|
|
5614
|
-
|
|
5615
|
-
// 글자 크기 단계다. 컴포넌트 크기 이름(xs·s·m·l·xl)과 축이 달라 따로 둔다.
|
|
5616
|
-
var fontSize = (/* unused pure expression or super */ null && (['xsm', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']));
|
|
5617
|
-
var weight = (/* unused pure expression or super */ null && (['regular', 'medium', 'semibold', 'bold', 'extrabold']));
|
|
5618
|
-
// `2xl` 처럼 숫자로 시작하는 클래스는 선택자로 쓸 수 없어 `t-` 를 붙인다. Text 의 CSS 를 함께 쓰는 Paragraph·Post 도 이것으로 클래스를 만든다.
|
|
5619
|
-
var fontSizeClass = function fontSizeClass(size) {
|
|
5620
|
-
return /^\d+xl$/.test(size) ? "t-".concat(size) : size;
|
|
5621
|
-
};
|
|
5622
|
-
// 의미 이름(`text-primary` → `--text-primary`). 다크에서 값이 바뀐다(ADR 0012). 원시 이름은 라이트 값에 묶인다(ADR 0004)
|
|
5623
|
-
var semanticColor = ['text-primary', 'text-body', 'text-secondary', 'text-tertiary', 'text-muted', 'text-placeholder', 'text-disabled', 'text-inverse', 'text-on-brand', 'text-on-brand-subtle', 'text-on-overlay', 'text-on-disabled', 'text-brand', 'text-brand-active', 'text-brand-emphasis', 'text-brand-secondary', 'text-danger', 'text-error', 'text-success', 'text-warning'];
|
|
5624
|
-
var color = __spreadArray(__spreadArray([], semanticColor, true), Object.keys(_styles_token_colors__WEBPACK_IMPORTED_MODULE_0__/* .colors */ .T), true);
|
|
5625
|
-
// 아래 값은 CSS 표기(`pre-line`)로 받고 클래스는 camelCase(`whiteSpace-preLine`)다.
|
|
5626
|
-
// getMergedProps 는 값을 그대로 붙이므로 이 변환은 text.tsx 의 styleClass 가 한다.
|
|
5627
|
-
var textAlign = (/* unused pure expression or super */ null && (['left', 'center']));
|
|
5628
|
-
var textDecoration = (/* unused pure expression or super */ null && (['underline', 'none', 'line-through', 'overline', 'blink']));
|
|
5629
|
-
var wordBreak = (/* unused pure expression or super */ null && (['normal', 'break-all', 'break-word', 'keep-all']));
|
|
5630
|
-
var whiteSpace = (/* unused pure expression or super */ null && (['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap']));
|
|
5631
|
-
var styleClassProps = ['textAlign', 'textDecoration', 'wordBreak', 'whiteSpace'];
|
|
5632
|
-
var textProps = {
|
|
5633
|
-
color: {
|
|
5634
|
-
type: 'className',
|
|
5635
|
-
className: 'color',
|
|
5636
|
-
values: color
|
|
5637
|
-
}
|
|
5638
|
-
};
|
|
5639
|
-
|
|
5640
|
-
/***/ },
|
|
5641
|
-
|
|
5642
|
-
/***/ 7739
|
|
5643
|
-
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5644
|
-
|
|
5645
|
-
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
5646
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5647
|
-
/* harmony export */ });
|
|
5648
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
5649
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
5650
|
-
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
5651
|
-
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(7335);
|
|
5652
|
-
/* harmony import */ var _base_text__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(5437);
|
|
5653
|
-
/* harmony import */ var _text_props__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(9074);
|
|
5654
|
-
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
5655
|
-
var t = {};
|
|
5656
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5657
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5658
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
5659
|
-
}
|
|
5660
|
-
return t;
|
|
5661
|
-
};
|
|
5662
|
-
|
|
5663
6278
|
|
|
5664
6279
|
|
|
5665
6280
|
|
|
5666
6281
|
|
|
5667
6282
|
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
return value ? "".concat(prefix, "-").concat(String(value).replace(/-(\w)/g, function (_, c) {
|
|
5671
|
-
return c.toUpperCase();
|
|
5672
|
-
})) : '';
|
|
6283
|
+
var isShown = function isShown(node) {
|
|
6284
|
+
return node !== undefined && node !== null && node !== false && node !== '';
|
|
5673
6285
|
};
|
|
5674
|
-
|
|
5675
|
-
var
|
|
5676
|
-
var _a = (0,
|
|
5677
|
-
text = _a.text,
|
|
5678
|
-
size = _a.size,
|
|
5679
|
-
weight = _a.weight,
|
|
5680
|
-
as = _a.as,
|
|
6286
|
+
/** 컨트롤 하나(또는 한 묶음)에 라벨·필수 표시·힌트·도움말·오류를 붙이는 행 */
|
|
6287
|
+
var FormFieldBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6288
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formFieldProps),
|
|
5681
6289
|
className = _a.className,
|
|
5682
6290
|
style = _a.style,
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
6291
|
+
label = _a.label,
|
|
6292
|
+
labelWidth = _a.labelWidth,
|
|
6293
|
+
required = _a.required,
|
|
6294
|
+
hint = _a.hint,
|
|
6295
|
+
labelAction = _a.labelAction,
|
|
6296
|
+
helperText = _a.helperText,
|
|
6297
|
+
errorText = _a.errorText,
|
|
6298
|
+
note = _a.note,
|
|
6299
|
+
htmlFor = _a.htmlFor,
|
|
6300
|
+
children = _a.children,
|
|
6301
|
+
restProps = form_field_rest(_a, ["className", "style", "label", "labelWidth", "required", "hint", "labelAction", "helperText", "errorText", "note", "htmlFor", "children"]);
|
|
6302
|
+
var baseId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
6303
|
+
var labelId = "".concat(baseId, "-label");
|
|
6304
|
+
var messageId = "".concat(baseId, "-message");
|
|
6305
|
+
var noteId = "".concat(baseId, "-note");
|
|
6306
|
+
var invalid = isShown(errorText);
|
|
6307
|
+
var message = invalid ? errorText : helperText;
|
|
6308
|
+
var hasMessage = isShown(message);
|
|
6309
|
+
var hasNote = isShown(note);
|
|
6310
|
+
var describedBy = [hasMessage && messageId, hasNote && noteId].filter(Boolean).join(' ') || undefined;
|
|
6311
|
+
var field = {
|
|
6312
|
+
id: htmlFor !== null && htmlFor !== void 0 ? htmlFor : "".concat(baseId, "-control"),
|
|
6313
|
+
labelId: labelId,
|
|
6314
|
+
describedBy: describedBy,
|
|
6315
|
+
invalid: invalid,
|
|
6316
|
+
required: Boolean(required)
|
|
6317
|
+
};
|
|
6318
|
+
// 안의 TextField·TextArea·DropDown 은 이 값을 읽어 스스로 잇는다. 겹친 FormField 는 제 값으로 덮는다
|
|
6319
|
+
var control = (0,jsx_runtime_.jsx)(form_field_context/* FormFieldContext */.wh.Provider, {
|
|
6320
|
+
value: field,
|
|
6321
|
+
children: typeof children === 'function' ? children(field) : children
|
|
6322
|
+
});
|
|
6323
|
+
// 숫자 px 은 React 가 사용자 변수에 단위를 붙이지 않아 여기서 붙인다
|
|
6324
|
+
var mergedStyle = labelWidth === undefined ? style : form_field_assign(form_field_assign({}, style), {
|
|
6325
|
+
'--form-field-label-width': typeof labelWidth === 'number' ? "".concat(labelWidth, "px") : labelWidth
|
|
6326
|
+
});
|
|
6327
|
+
return (0,jsx_runtime_.jsxs)(base_form_field, form_field_assign({
|
|
6328
|
+
ref: ref,
|
|
6329
|
+
className: (0,classNames/* classNames */.x)(className, 'form-field'),
|
|
6330
|
+
style: mergedStyle,
|
|
6331
|
+
role: 'group',
|
|
6332
|
+
"aria-labelledby": labelId,
|
|
6333
|
+
"aria-describedby": describedBy
|
|
6334
|
+
}, restProps, {
|
|
6335
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
6336
|
+
className: 'form-field-head',
|
|
6337
|
+
children: [(0,jsx_runtime_.jsx)(base_form_field.Label, {
|
|
6338
|
+
id: labelId,
|
|
6339
|
+
className: 'form-field-label',
|
|
6340
|
+
htmlFor: field.id,
|
|
6341
|
+
required: required,
|
|
6342
|
+
children: label
|
|
6343
|
+
}), isShown(hint) ? (0,jsx_runtime_.jsx)("span", {
|
|
6344
|
+
className: 'form-field-hint',
|
|
6345
|
+
children: hint
|
|
6346
|
+
}) : null, isShown(labelAction) ? (0,jsx_runtime_.jsx)("span", {
|
|
6347
|
+
className: 'form-field-label-action',
|
|
6348
|
+
children: labelAction
|
|
6349
|
+
}) : null]
|
|
6350
|
+
}), (0,jsx_runtime_.jsxs)("div", {
|
|
6351
|
+
className: 'form-field-body',
|
|
6352
|
+
children: [hasNote ? (0,jsx_runtime_.jsxs)("div", {
|
|
6353
|
+
className: 'form-field-control-row',
|
|
6354
|
+
children: [(0,jsx_runtime_.jsx)("div", {
|
|
6355
|
+
className: 'form-field-control',
|
|
6356
|
+
children: control
|
|
6357
|
+
}), (0,jsx_runtime_.jsxs)("p", {
|
|
6358
|
+
id: noteId,
|
|
6359
|
+
className: 'form-field-note',
|
|
6360
|
+
children: [(0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
6361
|
+
className: 'form-field-note-icon',
|
|
6362
|
+
name: 'info',
|
|
6363
|
+
size: 'xs'
|
|
6364
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
6365
|
+
children: note
|
|
6366
|
+
})]
|
|
6367
|
+
})]
|
|
6368
|
+
}) : (0,jsx_runtime_.jsx)("div", {
|
|
6369
|
+
className: 'form-field-control',
|
|
6370
|
+
children: control
|
|
6371
|
+
}), (0,jsx_runtime_.jsx)("div", {
|
|
6372
|
+
className: 'form-field-message',
|
|
6373
|
+
"aria-live": 'polite',
|
|
6374
|
+
children: hasMessage ? (0,jsx_runtime_.jsx)("p", {
|
|
6375
|
+
id: messageId,
|
|
6376
|
+
className: (0,classNames/* classNames */.x)('form-field-message-text', invalid && 'error'),
|
|
6377
|
+
children: message
|
|
6378
|
+
}) : null
|
|
6379
|
+
})]
|
|
6380
|
+
})]
|
|
5686
6381
|
}));
|
|
5687
|
-
|
|
6382
|
+
});
|
|
6383
|
+
FormFieldBase.displayName = 'FormField';
|
|
6384
|
+
/** 조건부 하위 필드를 담는 연회색 면. 안에서도 FormField 를 그대로 쓴다 */
|
|
6385
|
+
var form_field_FormFieldPanel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6386
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formFieldPanelProps),
|
|
6387
|
+
className = _a.className,
|
|
6388
|
+
restProps = form_field_rest(_a, ["className"]);
|
|
6389
|
+
return (0,jsx_runtime_.jsx)(base_form_field.Panel, form_field_assign({
|
|
5688
6390
|
ref: ref,
|
|
5689
|
-
className:
|
|
5690
|
-
|
|
5691
|
-
style: style,
|
|
5692
|
-
children: text
|
|
5693
|
-
});
|
|
6391
|
+
className: (0,classNames/* classNames */.x)(className, 'form-field-panel')
|
|
6392
|
+
}, restProps));
|
|
5694
6393
|
});
|
|
5695
|
-
|
|
5696
|
-
|
|
6394
|
+
form_field_FormFieldPanel.displayName = 'FormFieldPanel';
|
|
6395
|
+
/** 짝인 값을 한 줄에 나란히 놓는 격자. 768px 미만에서는 한 열 */
|
|
6396
|
+
var form_field_FormFieldColumns = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6397
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formFieldColumnsProps),
|
|
6398
|
+
className = _a.className,
|
|
6399
|
+
restProps = form_field_rest(_a, ["className"]);
|
|
6400
|
+
return (0,jsx_runtime_.jsx)(base_form_field.Columns, form_field_assign({
|
|
6401
|
+
ref: ref,
|
|
6402
|
+
className: (0,classNames/* classNames */.x)(className, 'form-field-columns')
|
|
6403
|
+
}, restProps));
|
|
6404
|
+
});
|
|
6405
|
+
form_field_FormFieldColumns.displayName = 'FormFieldColumns';
|
|
6406
|
+
var FormField = Object.assign(FormFieldBase, {
|
|
6407
|
+
Panel: form_field_FormFieldPanel,
|
|
6408
|
+
Columns: form_field_FormFieldColumns
|
|
6409
|
+
});
|
|
6410
|
+
/* harmony default export */ const form_field = (FormField);
|
|
5697
6411
|
|
|
5698
6412
|
/***/ },
|
|
5699
6413
|
|
|
5700
|
-
/***/
|
|
6414
|
+
/***/ 6529
|
|
5701
6415
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
5702
6416
|
|
|
5703
6417
|
|
|
5704
6418
|
// EXPORTS
|
|
5705
6419
|
__nuri_require__.d(__webpack_exports__, {
|
|
5706
|
-
A: () => (/* binding */
|
|
6420
|
+
A: () => (/* binding */ form_section)
|
|
5707
6421
|
});
|
|
5708
6422
|
|
|
5709
6423
|
// EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
|
|
@@ -5714,9 +6428,7 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ =
|
|
|
5714
6428
|
var classNames = __nuri_require__(3274);
|
|
5715
6429
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
5716
6430
|
var getMergedProps = __nuri_require__(7335);
|
|
5717
|
-
|
|
5718
|
-
var icon_icon = __nuri_require__(3547);
|
|
5719
|
-
;// ./components/empty-state/base-empty-state.tsx
|
|
6431
|
+
;// ./components/form-section/base-form-section.tsx
|
|
5720
6432
|
var __assign = undefined && undefined.__assign || function () {
|
|
5721
6433
|
__assign = Object.assign || function (t) {
|
|
5722
6434
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -5738,41 +6450,32 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5738
6450
|
|
|
5739
6451
|
|
|
5740
6452
|
|
|
5741
|
-
var
|
|
6453
|
+
var BaseFormSection = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
5742
6454
|
var className = props.className,
|
|
5743
6455
|
restProps = __rest(props, ["className"]);
|
|
5744
|
-
return (0,jsx_runtime_.jsx)("
|
|
6456
|
+
return (0,jsx_runtime_.jsx)("section", __assign({
|
|
5745
6457
|
ref: ref,
|
|
5746
|
-
className: (0,classNames/* classNames */.x)('nuri-theme base-
|
|
6458
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-form-section', className)
|
|
5747
6459
|
}, restProps));
|
|
5748
6460
|
});
|
|
5749
|
-
|
|
5750
|
-
/* harmony default export */ const
|
|
5751
|
-
;// ./components/
|
|
5752
|
-
|
|
5753
|
-
var
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
var
|
|
5757
|
-
|
|
5758
|
-
type: 'className',
|
|
5759
|
-
className: 'variant',
|
|
5760
|
-
values: variant,
|
|
5761
|
-
"default": 'default'
|
|
5762
|
-
}
|
|
5763
|
-
};
|
|
5764
|
-
;// ./components/empty-state/empty-state.tsx
|
|
5765
|
-
var empty_state_assign = undefined && undefined.__assign || function () {
|
|
5766
|
-
empty_state_assign = Object.assign || function (t) {
|
|
6461
|
+
BaseFormSection.displayName = 'BaseFormSection';
|
|
6462
|
+
/* harmony default export */ const base_form_section = (BaseFormSection);
|
|
6463
|
+
;// ./components/form-section/form-section-props.ts
|
|
6464
|
+
// 크기·변형이 없다. 섹션 카드는 한 모양이다(흰 면, lg bold 제목, 오른쪽 위 보조 버튼 자리).
|
|
6465
|
+
var titleLevel = (/* unused pure expression or super */ null && ([2, 3, 4]));
|
|
6466
|
+
var formSectionProps = {};
|
|
6467
|
+
;// ./components/form-section/form-section.tsx
|
|
6468
|
+
var form_section_assign = undefined && undefined.__assign || function () {
|
|
6469
|
+
form_section_assign = Object.assign || function (t) {
|
|
5767
6470
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5768
6471
|
s = arguments[i];
|
|
5769
6472
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
5770
6473
|
}
|
|
5771
6474
|
return t;
|
|
5772
6475
|
};
|
|
5773
|
-
return
|
|
6476
|
+
return form_section_assign.apply(this, arguments);
|
|
5774
6477
|
};
|
|
5775
|
-
var
|
|
6478
|
+
var form_section_rest = undefined && undefined.__rest || function (s, e) {
|
|
5776
6479
|
var t = {};
|
|
5777
6480
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5778
6481
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5786,47 +6489,53 @@ var empty_state_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
5786
6489
|
|
|
5787
6490
|
|
|
5788
6491
|
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
6492
|
+
var HEADING_OF_LEVEL = {
|
|
6493
|
+
2: 'h2',
|
|
6494
|
+
3: 'h3',
|
|
6495
|
+
4: 'h4'
|
|
6496
|
+
};
|
|
6497
|
+
/** 폼의 한 주제를 담는 흰 섹션 카드. 연회색 페이지 바탕 위에 세로로 쌓는다 */
|
|
6498
|
+
var FormSection = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
6499
|
+
var _a = (0,getMergedProps/* getMergedProps */.p)(props, formSectionProps),
|
|
5793
6500
|
className = _a.className,
|
|
5794
|
-
icon = _a.icon,
|
|
5795
|
-
figure = _a.figure,
|
|
5796
6501
|
title = _a.title,
|
|
5797
|
-
_b = _a.titleAs,
|
|
5798
|
-
Title = _b === void 0 ? 'p' : _b,
|
|
5799
6502
|
description = _a.description,
|
|
6503
|
+
_b = _a.titleLevel,
|
|
6504
|
+
titleLevel = _b === void 0 ? 3 : _b,
|
|
5800
6505
|
action = _a.action,
|
|
5801
|
-
|
|
5802
|
-
|
|
6506
|
+
children = _a.children,
|
|
6507
|
+
restProps = form_section_rest(_a, ["className", "title", "description", "titleLevel", "action", "children"]);
|
|
6508
|
+
var titleId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
6509
|
+
var Heading = HEADING_OF_LEVEL[titleLevel];
|
|
6510
|
+
return (0,jsx_runtime_.jsxs)(base_form_section, form_section_assign({
|
|
5803
6511
|
ref: ref,
|
|
5804
|
-
className: (0,classNames/* classNames */.x)(className, '
|
|
5805
|
-
|
|
6512
|
+
className: (0,classNames/* classNames */.x)(className, 'form-section'),
|
|
6513
|
+
"aria-labelledby": titleId
|
|
5806
6514
|
}, restProps, {
|
|
5807
|
-
children: [
|
|
5808
|
-
className: '
|
|
5809
|
-
children: (0,jsx_runtime_.
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
6515
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
6516
|
+
className: 'form-section-head',
|
|
6517
|
+
children: [(0,jsx_runtime_.jsxs)("div", {
|
|
6518
|
+
className: 'form-section-heading',
|
|
6519
|
+
children: [(0,jsx_runtime_.jsx)(Heading, {
|
|
6520
|
+
id: titleId,
|
|
6521
|
+
className: 'form-section-title',
|
|
6522
|
+
children: title
|
|
6523
|
+
}), description ? (0,jsx_runtime_.jsx)("p", {
|
|
6524
|
+
className: 'form-section-description',
|
|
6525
|
+
children: description
|
|
6526
|
+
}) : null]
|
|
6527
|
+
}), action ? (0,jsx_runtime_.jsx)("div", {
|
|
6528
|
+
className: 'form-section-action',
|
|
6529
|
+
children: action
|
|
6530
|
+
}) : null]
|
|
6531
|
+
}), (0,jsx_runtime_.jsx)("div", {
|
|
6532
|
+
className: 'form-section-body',
|
|
6533
|
+
children: children
|
|
5825
6534
|
})]
|
|
5826
6535
|
}));
|
|
5827
6536
|
});
|
|
5828
|
-
|
|
5829
|
-
/* harmony default export */ const
|
|
6537
|
+
FormSection.displayName = 'FormSection';
|
|
6538
|
+
/* harmony default export */ const form_section = (FormSection);
|
|
5830
6539
|
|
|
5831
6540
|
/***/ },
|
|
5832
6541
|
|
|
@@ -10706,12 +11415,20 @@ var ModalRoot = Object.assign(ModalRootBase, {
|
|
|
10706
11415
|
/* harmony export */ r4: () => (/* binding */ modalWithDoubleButtonProps),
|
|
10707
11416
|
/* harmony export */ y_: () => (/* binding */ modalProps)
|
|
10708
11417
|
/* harmony export */ });
|
|
10709
|
-
/* unused harmony
|
|
11418
|
+
/* unused harmony exports sizes, align */
|
|
10710
11419
|
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
10711
11420
|
|
|
10712
|
-
var sizes = ['s', 'm', 'l'];
|
|
11421
|
+
var sizes = ['s', 'm', 'l', 'xl'];
|
|
11422
|
+
/** ModalWithDoubleButton 의 제목·버튼 자리. center 는 가운데 쌓기, start 는 왼쪽 제목 + 오른쪽 아래 버튼 */
|
|
11423
|
+
var align = ['center', 'start'];
|
|
10713
11424
|
var modalWithDoubleButtonProps = {
|
|
10714
|
-
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
11425
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm'),
|
|
11426
|
+
// 기본값을 두지 않는다. center 는 예전 DOM 그대로(클래스 없음)여야 쓰는 쪽 CSS 가 깨지지 않는다
|
|
11427
|
+
align: {
|
|
11428
|
+
type: 'className',
|
|
11429
|
+
className: 'align',
|
|
11430
|
+
values: align
|
|
11431
|
+
}
|
|
10715
11432
|
};
|
|
10716
11433
|
var modalProps = {
|
|
10717
11434
|
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
@@ -10759,35 +11476,80 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
10759
11476
|
|
|
10760
11477
|
|
|
10761
11478
|
|
|
10762
|
-
// Row 는
|
|
10763
|
-
var
|
|
10764
|
-
|
|
10765
|
-
|
|
11479
|
+
// 버튼 기본 모양. start 의 Row 는 회색 닫기 + 주색 동사(토스 모달)이고 나머지는 ghost 쪽이 outline 이다
|
|
11480
|
+
var BUTTON_DEFAULTS = {
|
|
11481
|
+
center: {
|
|
11482
|
+
row: {
|
|
11483
|
+
left: {
|
|
11484
|
+
variant: 'outline'
|
|
11485
|
+
},
|
|
11486
|
+
right: {}
|
|
11487
|
+
},
|
|
11488
|
+
column: {
|
|
11489
|
+
left: {},
|
|
11490
|
+
right: {
|
|
11491
|
+
variant: 'outline'
|
|
11492
|
+
}
|
|
11493
|
+
}
|
|
11494
|
+
},
|
|
11495
|
+
start: {
|
|
11496
|
+
row: {
|
|
11497
|
+
left: {
|
|
11498
|
+
color: 'neutral',
|
|
11499
|
+
variant: 'weak'
|
|
11500
|
+
},
|
|
11501
|
+
right: {}
|
|
11502
|
+
},
|
|
11503
|
+
column: {
|
|
11504
|
+
left: {},
|
|
11505
|
+
right: {
|
|
11506
|
+
variant: 'outline'
|
|
11507
|
+
}
|
|
11508
|
+
}
|
|
11509
|
+
}
|
|
10766
11510
|
};
|
|
10767
11511
|
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
|
-
|
|
11512
|
+
var _a;
|
|
11513
|
+
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_7__/* .getMergedProps */ .p)(props, _modal_props__WEBPACK_IMPORTED_MODULE_11__/* .modalWithDoubleButtonProps */ .r4),
|
|
11514
|
+
layout = _b.layout,
|
|
11515
|
+
open = _b.open,
|
|
11516
|
+
onOpenChange = _b.onOpenChange,
|
|
11517
|
+
content = _b.content,
|
|
11518
|
+
title = _b.title,
|
|
11519
|
+
subTitle = _b.subTitle,
|
|
11520
|
+
titleIcon = _b.titleIcon,
|
|
11521
|
+
showCloseIcon = _b.showCloseIcon,
|
|
11522
|
+
left = _b.left,
|
|
11523
|
+
right = _b.right,
|
|
11524
|
+
portalContainer = _b.portalContainer,
|
|
11525
|
+
_c = _b.closeOnBackEvent,
|
|
11526
|
+
closeOnBackEvent = _c === void 0 ? true : _c,
|
|
11527
|
+
initialFocusRef = _b.initialFocusRef,
|
|
11528
|
+
footerStart = _b.footerStart,
|
|
11529
|
+
onEntered = _b.onEntered,
|
|
11530
|
+
onExited = _b.onExited,
|
|
11531
|
+
className = _b.className;
|
|
11532
|
+
var align = (_a = props.align) !== null && _a !== void 0 ? _a : 'center';
|
|
11533
|
+
var buttonDefaults = BUTTON_DEFAULTS[align][layout];
|
|
10786
11534
|
// open 을 넘기면 Radix 가 열림·포커스·Esc 를 맡는다. 안 넘기면 예전처럼 forceMount 로 늘 보인다.
|
|
10787
11535
|
var controlled = open !== undefined;
|
|
10788
|
-
var
|
|
10789
|
-
focusOnOpen =
|
|
10790
|
-
returnFocus =
|
|
11536
|
+
var _d = (0,_helpers_hooks_useReturnFocus__WEBPACK_IMPORTED_MODULE_4__/* .useReturnFocus */ .G)(),
|
|
11537
|
+
focusOnOpen = _d.focusOnOpen,
|
|
11538
|
+
returnFocus = _d.returnFocus;
|
|
11539
|
+
var onOpenAutoFocus = function onOpenAutoFocus(event) {
|
|
11540
|
+
var _a;
|
|
11541
|
+
focusOnOpen(event);
|
|
11542
|
+
(_a = initialFocusRef === null || initialFocusRef === void 0 ? void 0 : initialFocusRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11543
|
+
};
|
|
11544
|
+
var buttons = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
11545
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Close, {
|
|
11546
|
+
asChild: true,
|
|
11547
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_button_cta_button__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, __assign({}, buttonDefaults.left, left))
|
|
11548
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Close, {
|
|
11549
|
+
asChild: true,
|
|
11550
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_button_cta_button__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A, __assign({}, buttonDefaults.right, right))
|
|
11551
|
+
})]
|
|
11552
|
+
});
|
|
10791
11553
|
var presence = (0,_helpers_motion_use_presence_callbacks__WEBPACK_IMPORTED_MODULE_5__/* .usePresenceCallbacks */ .r)({
|
|
10792
11554
|
open: open !== null && open !== void 0 ? open : true,
|
|
10793
11555
|
onEntered: onEntered,
|
|
@@ -10809,7 +11571,7 @@ var ModalWithDoubleButtonBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1
|
|
|
10809
11571
|
forceMount: controlled ? undefined : true,
|
|
10810
11572
|
portalContainer: portalContainer,
|
|
10811
11573
|
onAnimationEnd: presence.onAnimationEnd,
|
|
10812
|
-
onOpenAutoFocus: controlled ?
|
|
11574
|
+
onOpenAutoFocus: controlled ? onOpenAutoFocus : undefined,
|
|
10813
11575
|
onCloseAutoFocus: controlled ? returnFocus : undefined,
|
|
10814
11576
|
children: [showCloseIcon && (controlled ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_modal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.Close, {
|
|
10815
11577
|
className: 'modal-with-double-button-close-button',
|
|
@@ -10839,19 +11601,17 @@ var ModalWithDoubleButtonBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1
|
|
|
10839
11601
|
})), (layout === 'column' || content) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
10840
11602
|
className: 'modal-with-double-button-content',
|
|
10841
11603
|
children: content
|
|
10842
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
11604
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
10843
11605
|
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
|
-
})]
|
|
11606
|
+
children: align === 'start' ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
11607
|
+
children: [footerStart && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11608
|
+
className: 'modal-with-double-button-footer-start',
|
|
11609
|
+
children: footerStart
|
|
11610
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11611
|
+
className: 'modal-with-double-button-buttons',
|
|
11612
|
+
children: buttons
|
|
11613
|
+
})]
|
|
11614
|
+
}) : buttons
|
|
10855
11615
|
})]
|
|
10856
11616
|
})
|
|
10857
11617
|
});
|
|
@@ -10924,6 +11684,8 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
10924
11684
|
description = _a.description,
|
|
10925
11685
|
children = _a.children,
|
|
10926
11686
|
footer = _a.footer,
|
|
11687
|
+
footerStart = _a.footerStart,
|
|
11688
|
+
initialFocusRef = _a.initialFocusRef,
|
|
10927
11689
|
_b = _a.showCloseIcon,
|
|
10928
11690
|
showCloseIcon = _b === void 0 ? true : _b,
|
|
10929
11691
|
_c = _a.closeOnOverlayClick,
|
|
@@ -10971,6 +11733,11 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
10971
11733
|
var _g = (0,_helpers_hooks_useReturnFocus__WEBPACK_IMPORTED_MODULE_5__/* .useReturnFocus */ .G)(),
|
|
10972
11734
|
focusOnOpen = _g.focusOnOpen,
|
|
10973
11735
|
returnFocus = _g.returnFocus;
|
|
11736
|
+
var onOpenAutoFocus = function onOpenAutoFocus(event) {
|
|
11737
|
+
var _a;
|
|
11738
|
+
focusOnOpen(event);
|
|
11739
|
+
(_a = initialFocusRef === null || initialFocusRef === void 0 ? void 0 : initialFocusRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11740
|
+
};
|
|
10974
11741
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_modal__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .A, {
|
|
10975
11742
|
open: open,
|
|
10976
11743
|
onOpenChange: changeOpen,
|
|
@@ -10982,7 +11749,7 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
10982
11749
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_9__/* .classNames */ .x)(className, 'modal'),
|
|
10983
11750
|
style: style,
|
|
10984
11751
|
portalContainer: portalContainer,
|
|
10985
|
-
onOpenAutoFocus:
|
|
11752
|
+
onOpenAutoFocus: onOpenAutoFocus,
|
|
10986
11753
|
onCloseAutoFocus: trigger ? undefined : returnFocus,
|
|
10987
11754
|
"data-effect": reject.effect,
|
|
10988
11755
|
onAnimationEnd: function onAnimationEnd(event) {
|
|
@@ -11015,9 +11782,12 @@ var Modal = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
11015
11782
|
}), children && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11016
11783
|
className: 'modal-body',
|
|
11017
11784
|
children: children
|
|
11018
|
-
}), footer && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
11785
|
+
}), (footer || footerStart) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
11019
11786
|
className: 'modal-footer',
|
|
11020
|
-
children:
|
|
11787
|
+
children: [footerStart && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
11788
|
+
className: 'modal-footer-start',
|
|
11789
|
+
children: footerStart
|
|
11790
|
+
}), footer]
|
|
11021
11791
|
})]
|
|
11022
11792
|
})]
|
|
11023
11793
|
});
|
|
@@ -11047,7 +11817,7 @@ var getMergedProps = __nuri_require__(7335);
|
|
|
11047
11817
|
// EXTERNAL MODULE: ./components/button/cta-button.tsx
|
|
11048
11818
|
var cta_button = __nuri_require__(910);
|
|
11049
11819
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
11050
|
-
var
|
|
11820
|
+
var icon_icon = __nuri_require__(3547);
|
|
11051
11821
|
;// ./components/notice/base-notice.tsx
|
|
11052
11822
|
var __assign = undefined && undefined.__assign || function () {
|
|
11053
11823
|
__assign = Object.assign || function (t) {
|
|
@@ -11143,10 +11913,11 @@ var Notice = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
11143
11913
|
var _a;
|
|
11144
11914
|
var _b = (0,getMergedProps/* getMergedProps */.p)(props, noticeProps),
|
|
11145
11915
|
className = _b.className,
|
|
11916
|
+
icon = _b.icon,
|
|
11146
11917
|
title = _b.title,
|
|
11147
11918
|
children = _b.children,
|
|
11148
11919
|
action = _b.action,
|
|
11149
|
-
restProps = notice_rest(_b, ["className", "title", "children", "action"]);
|
|
11920
|
+
restProps = notice_rest(_b, ["className", "icon", "title", "children", "action"]);
|
|
11150
11921
|
var variant = (_a = props.variant) !== null && _a !== void 0 ? _a : 'neutral';
|
|
11151
11922
|
return (0,jsx_runtime_.jsxs)(base_notice, notice_assign({
|
|
11152
11923
|
ref: ref,
|
|
@@ -11154,9 +11925,9 @@ var Notice = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
11154
11925
|
// danger 는 바로 읽어 준다. 쓰는 쪽이 role 을 주면 그 값이 앞선다
|
|
11155
11926
|
role: variant === 'danger' ? 'alert' : undefined
|
|
11156
11927
|
}, restProps, {
|
|
11157
|
-
children: [(0,jsx_runtime_.jsx)(
|
|
11928
|
+
children: [(0,jsx_runtime_.jsx)(icon_icon/* default */.A, {
|
|
11158
11929
|
className: 'notice-icon',
|
|
11159
|
-
name: VARIANT_ICON[variant],
|
|
11930
|
+
name: icon !== null && icon !== void 0 ? icon : VARIANT_ICON[variant],
|
|
11160
11931
|
size: 's',
|
|
11161
11932
|
weight: 'fill'
|
|
11162
11933
|
}), (0,jsx_runtime_.jsxs)("div", {
|
|
@@ -11717,6 +12488,8 @@ var useTrack = __nuri_require__(4560);
|
|
|
11717
12488
|
var classNames = __nuri_require__(3274);
|
|
11718
12489
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
11719
12490
|
var getMergedProps = __nuri_require__(7335);
|
|
12491
|
+
// EXTERNAL MODULE: ./components/drop-down/drop-down.tsx
|
|
12492
|
+
var drop_down = __nuri_require__(9303);
|
|
11720
12493
|
;// ./components/pagination/base-pagination.tsx
|
|
11721
12494
|
var __assign = undefined && undefined.__assign || function () {
|
|
11722
12495
|
__assign = Object.assign || function (t) {
|
|
@@ -11776,7 +12549,7 @@ var PaginationItem = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
11776
12549
|
PaginationItem.displayName = 'PaginationItem';
|
|
11777
12550
|
var PaginationEllipsis = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
11778
12551
|
var _a = props.children,
|
|
11779
|
-
children = _a === void 0 ? '
|
|
12552
|
+
children = _a === void 0 ? '•••' : _a,
|
|
11780
12553
|
className = props.className,
|
|
11781
12554
|
restProps = __rest(props, ["children", "className"]);
|
|
11782
12555
|
return (0,jsx_runtime_.jsx)("span", __assign({
|
|
@@ -11838,6 +12611,7 @@ var __spreadArray = undefined && undefined.__spreadArray || function (to, from,
|
|
|
11838
12611
|
|
|
11839
12612
|
|
|
11840
12613
|
|
|
12614
|
+
|
|
11841
12615
|
var range = function range(start, end) {
|
|
11842
12616
|
return Array.from({
|
|
11843
12617
|
length: end - start + 1
|
|
@@ -11884,21 +12658,38 @@ var mergePageSlots = function mergePageSlots(wide, narrow, totalPages) {
|
|
|
11884
12658
|
};
|
|
11885
12659
|
});
|
|
11886
12660
|
};
|
|
12661
|
+
var formatCount = function formatCount(count) {
|
|
12662
|
+
return count.toLocaleString('ko-KR');
|
|
12663
|
+
};
|
|
12664
|
+
/** `999개의 결과 중 1-50`. 페이지 크기를 모르면 범위 없이 `999개의 결과` */
|
|
12665
|
+
var resultText = function resultText(totalCount, page, pageSize) {
|
|
12666
|
+
if (pageSize <= 0) return formatCount(totalCount) + '개의 결과';
|
|
12667
|
+
if (totalCount === 0) return '0개의 결과 중 0';
|
|
12668
|
+
var start = (page - 1) * pageSize + 1;
|
|
12669
|
+
var end = Math.min(page * pageSize, totalCount);
|
|
12670
|
+
return formatCount(totalCount) + '개의 결과 중 ' + formatCount(start) + '-' + formatCount(end);
|
|
12671
|
+
};
|
|
11887
12672
|
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
|
-
|
|
12673
|
+
var _a;
|
|
12674
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, paginationProps),
|
|
12675
|
+
className = _b.className,
|
|
12676
|
+
totalPages = _b.totalPages,
|
|
12677
|
+
pageProp = _b.page,
|
|
12678
|
+
defaultPage = _b.defaultPage,
|
|
12679
|
+
onPageChange = _b.onPageChange,
|
|
12680
|
+
_c = _b.siblingCount,
|
|
12681
|
+
siblingCount = _c === void 0 ? 1 : _c,
|
|
12682
|
+
totalCount = _b.totalCount,
|
|
12683
|
+
pageSizeProp = _b.pageSize,
|
|
12684
|
+
defaultPageSize = _b.defaultPageSize,
|
|
12685
|
+
onPageSizeChange = _b.onPageSizeChange,
|
|
12686
|
+
pageSizeOptions = _b.pageSizeOptions,
|
|
12687
|
+
disabled = _b.disabled,
|
|
12688
|
+
_d = _b.pressEffect,
|
|
12689
|
+
pressEffect = _d === void 0 ? true : _d,
|
|
12690
|
+
track = _b.track,
|
|
12691
|
+
trackProps = _b.trackProps,
|
|
12692
|
+
restProps = pagination_rest(_b, ["className", "totalPages", "page", "defaultPage", "onPageChange", "siblingCount", "totalCount", "pageSize", "defaultPageSize", "onPageSizeChange", "pageSizeOptions", "disabled", "pressEffect", "track", "trackProps"]);
|
|
11902
12693
|
var emit = (0,useTrack/* useTrack */.n)('Pagination', {
|
|
11903
12694
|
track: track,
|
|
11904
12695
|
trackProps: trackProps
|
|
@@ -11906,7 +12697,7 @@ var Pagination = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_re
|
|
|
11906
12697
|
var itemClassName = (0,classNames/* classNames */.x)('pagination-item', pressEffect && 'motion-press motion-press-dim');
|
|
11907
12698
|
var controlClassName = (0,classNames/* classNames */.x)(itemClassName, 'pagination-control');
|
|
11908
12699
|
var lastPage = Math.max(totalPages, 1);
|
|
11909
|
-
var
|
|
12700
|
+
var _e = (0,useExternalState/* useExternalState */.C)({
|
|
11910
12701
|
prop: pageProp,
|
|
11911
12702
|
handler: function handler(next) {
|
|
11912
12703
|
emit('change', String(next));
|
|
@@ -11914,56 +12705,93 @@ var Pagination = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_re
|
|
|
11914
12705
|
},
|
|
11915
12706
|
defaultProp: defaultPage !== null && defaultPage !== void 0 ? defaultPage : 1
|
|
11916
12707
|
}),
|
|
11917
|
-
pageValue =
|
|
11918
|
-
setPage =
|
|
12708
|
+
pageValue = _e[0],
|
|
12709
|
+
setPage = _e[1];
|
|
11919
12710
|
var page = Math.min(Math.max(pageValue, 1), lastPage);
|
|
11920
12711
|
var goTo = function goTo(next) {
|
|
11921
12712
|
if (next !== page) {
|
|
11922
12713
|
setPage(next);
|
|
11923
12714
|
}
|
|
11924
12715
|
};
|
|
12716
|
+
// 0 은 페이지 크기를 모른다는 뜻이다. 결과 범위 대신 전체 수만 보인다
|
|
12717
|
+
var _f = (0,useExternalState/* useExternalState */.C)({
|
|
12718
|
+
prop: pageSizeProp,
|
|
12719
|
+
handler: onPageSizeChange,
|
|
12720
|
+
defaultProp: (_a = defaultPageSize !== null && defaultPageSize !== void 0 ? defaultPageSize : pageSizeOptions === null || pageSizeOptions === void 0 ? void 0 : pageSizeOptions[0]) !== null && _a !== void 0 ? _a : 0
|
|
12721
|
+
}),
|
|
12722
|
+
pageSize = _f[0],
|
|
12723
|
+
setPageSize = _f[1];
|
|
12724
|
+
var changePageSize = function changePageSize(next) {
|
|
12725
|
+
setPageSize(next);
|
|
12726
|
+
goTo(1);
|
|
12727
|
+
};
|
|
12728
|
+
var hasSummary = totalCount != null || pageSizeOptions != null;
|
|
11925
12729
|
return (0,jsx_runtime_.jsxs)(base_pagination, pagination_assign({
|
|
11926
12730
|
ref: ref,
|
|
11927
|
-
className: (0,classNames/* classNames */.x)(className, 'pagination'),
|
|
12731
|
+
className: (0,classNames/* classNames */.x)(className, 'pagination', hasSummary && 'with-summary'),
|
|
11928
12732
|
disabled: disabled
|
|
11929
12733
|
}, 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,
|
|
12734
|
+
children: [hasSummary && (0,jsx_runtime_.jsxs)("div", {
|
|
12735
|
+
className: 'pagination-summary',
|
|
12736
|
+
children: [totalCount != null && (0,jsx_runtime_.jsx)("span", {
|
|
12737
|
+
className: 'pagination-result',
|
|
12738
|
+
children: resultText(totalCount, page, pageSize)
|
|
12739
|
+
}), pageSizeOptions && (0,jsx_runtime_.jsx)(drop_down/* default */.A, {
|
|
12740
|
+
className: 'pagination-page-size',
|
|
12741
|
+
size: 'xs',
|
|
12742
|
+
"aria-label": "\uD55C \uD398\uC774\uC9C0\uC5D0 \uBCF4\uC77C \uACB0\uACFC \uC218",
|
|
11947
12743
|
disabled: disabled,
|
|
11948
|
-
|
|
12744
|
+
value: String(pageSize),
|
|
12745
|
+
options: pageSizeOptions.map(function (option) {
|
|
12746
|
+
return {
|
|
12747
|
+
value: String(option),
|
|
12748
|
+
label: formatCount(option) + '개씩 보기'
|
|
12749
|
+
};
|
|
12750
|
+
}),
|
|
12751
|
+
onValueChange: function onValueChange(next) {
|
|
12752
|
+
return changePageSize(Number(next));
|
|
12753
|
+
}
|
|
12754
|
+
})]
|
|
12755
|
+
}), (0,jsx_runtime_.jsxs)("div", {
|
|
12756
|
+
className: 'pagination-pages',
|
|
12757
|
+
children: [(0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
12758
|
+
className: controlClassName,
|
|
12759
|
+
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
12760
|
+
disabled: disabled || page <= 1,
|
|
11949
12761
|
onClick: function onClick() {
|
|
11950
|
-
return goTo(
|
|
12762
|
+
return goTo(page - 1);
|
|
11951
12763
|
},
|
|
11952
|
-
children:
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
12764
|
+
children: (0,jsx_runtime_.jsx)(chevronDown/* default */.A, {
|
|
12765
|
+
className: 'pagination-icon pagination-icon-prev'
|
|
12766
|
+
})
|
|
12767
|
+
}), mergePageSlots(getPageSlots(page, lastPage, siblingCount), getPageSlots(page, lastPage, 0), lastPage).map(function (_a) {
|
|
12768
|
+
var slot = _a.slot,
|
|
12769
|
+
shownOn = _a.shownOn;
|
|
12770
|
+
var shownOnAttribute = shownOn === 'both' ? undefined : shownOn;
|
|
12771
|
+
return typeof slot === 'number' ? (0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
12772
|
+
className: itemClassName,
|
|
12773
|
+
active: slot === page,
|
|
12774
|
+
disabled: disabled,
|
|
12775
|
+
"data-shown-on": shownOnAttribute,
|
|
12776
|
+
onClick: function onClick() {
|
|
12777
|
+
return goTo(slot);
|
|
12778
|
+
},
|
|
12779
|
+
children: slot
|
|
12780
|
+
}, slot) : (0,jsx_runtime_.jsx)(base_pagination.Ellipsis, {
|
|
12781
|
+
className: 'pagination-ellipsis',
|
|
12782
|
+
"data-shown-on": shownOnAttribute
|
|
12783
|
+
}, slot);
|
|
12784
|
+
}), (0,jsx_runtime_.jsx)(base_pagination.Item, {
|
|
12785
|
+
className: controlClassName,
|
|
12786
|
+
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
12787
|
+
disabled: disabled || page >= lastPage,
|
|
12788
|
+
onClick: function onClick() {
|
|
12789
|
+
return goTo(page + 1);
|
|
12790
|
+
},
|
|
12791
|
+
children: (0,jsx_runtime_.jsx)(chevronDown/* default */.A, {
|
|
12792
|
+
className: 'pagination-icon pagination-icon-next'
|
|
12793
|
+
})
|
|
12794
|
+
})]
|
|
11967
12795
|
})]
|
|
11968
12796
|
}));
|
|
11969
12797
|
});
|
|
@@ -12629,6 +13457,8 @@ var useTrack = __nuri_require__(4560);
|
|
|
12629
13457
|
var classNames = __nuri_require__(3274);
|
|
12630
13458
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
12631
13459
|
var getMergedProps = __nuri_require__(7335);
|
|
13460
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
13461
|
+
var icon = __nuri_require__(3547);
|
|
12632
13462
|
// EXTERNAL MODULE: external "motion/react"
|
|
12633
13463
|
var react_ = __nuri_require__(4700);
|
|
12634
13464
|
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
@@ -12669,6 +13499,13 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
12669
13499
|
|
|
12670
13500
|
|
|
12671
13501
|
|
|
13502
|
+
/** 화살표 키가 옮기는 칸 수. 라디오 묶음은 네 방향 모두 앞뒤로 옮긴다 */
|
|
13503
|
+
var ARROW_STEP = {
|
|
13504
|
+
ArrowRight: 1,
|
|
13505
|
+
ArrowDown: 1,
|
|
13506
|
+
ArrowLeft: -1,
|
|
13507
|
+
ArrowUp: -1
|
|
13508
|
+
};
|
|
12672
13509
|
var RadioContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.createContext)({
|
|
12673
13510
|
options: [],
|
|
12674
13511
|
selected: null,
|
|
@@ -12766,31 +13603,55 @@ var RadioButton = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
12766
13603
|
});
|
|
12767
13604
|
});
|
|
12768
13605
|
RadioButton.displayName = 'RadioButton';
|
|
12769
|
-
//
|
|
12770
|
-
var
|
|
13606
|
+
// 칩·칸·카드 전체가 라디오 하나다. role·aria-checked 로 선택을 알린다.
|
|
13607
|
+
var RadioChoice = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
13608
|
+
var _a;
|
|
12771
13609
|
var className = props.className,
|
|
12772
13610
|
id = props.id,
|
|
13611
|
+
part = props.part,
|
|
12773
13612
|
disabled = props.disabled,
|
|
12774
|
-
restProps = __rest(props, ["className", "id", "disabled"]);
|
|
12775
|
-
var
|
|
12776
|
-
selected =
|
|
12777
|
-
onChange =
|
|
13613
|
+
restProps = __rest(props, ["className", "id", "part", "disabled"]);
|
|
13614
|
+
var _b = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useContext)(RadioContext),
|
|
13615
|
+
selected = _b.selected,
|
|
13616
|
+
onChange = _b.onChange,
|
|
13617
|
+
options = _b.options;
|
|
12778
13618
|
var checked = id === selected;
|
|
13619
|
+
// 묶음에 Tab 정지점은 하나다. 고른 칸, 고른 칸이 없거나 막혔으면 첫 열린 칸이다
|
|
13620
|
+
var enabled = options.filter(function (option) {
|
|
13621
|
+
return !option.disabled;
|
|
13622
|
+
});
|
|
13623
|
+
var tabStop = enabled.some(function (option) {
|
|
13624
|
+
return option.id === selected;
|
|
13625
|
+
}) ? selected : (_a = enabled[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
13626
|
+
var moveByArrow = function moveByArrow(event) {
|
|
13627
|
+
var step = ARROW_STEP[event.key];
|
|
13628
|
+
if (!step) return;
|
|
13629
|
+
var group = event.currentTarget.closest('[role="radiogroup"]');
|
|
13630
|
+
if (!group) return;
|
|
13631
|
+
var radios = Array.from(group.querySelectorAll('[role="radio"]:not(:disabled)'));
|
|
13632
|
+
var next = radios[(radios.indexOf(event.currentTarget) + step + radios.length) % radios.length];
|
|
13633
|
+
if (!next || next === event.currentTarget) return;
|
|
13634
|
+
event.preventDefault();
|
|
13635
|
+
next.focus();
|
|
13636
|
+
next.click();
|
|
13637
|
+
};
|
|
12779
13638
|
return (0,jsx_runtime_.jsx)(base_button/* default */.A, __assign({
|
|
12780
13639
|
ref: ref,
|
|
12781
|
-
className: (0,classNames/* classNames */.x)('nuri-theme base-radio
|
|
13640
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-radio', part, className),
|
|
12782
13641
|
type: 'button',
|
|
12783
13642
|
role: 'radio',
|
|
12784
13643
|
"aria-checked": checked,
|
|
12785
13644
|
"data-state": checked ? 'checked' : 'unchecked',
|
|
12786
13645
|
disabled: disabled,
|
|
12787
13646
|
"data-disabled": disabled || undefined,
|
|
13647
|
+
tabIndex: id === tabStop ? 0 : -1,
|
|
12788
13648
|
onClick: function onClick() {
|
|
12789
13649
|
return onChange(id);
|
|
12790
|
-
}
|
|
13650
|
+
},
|
|
13651
|
+
onKeyDown: moveByArrow
|
|
12791
13652
|
}, restProps));
|
|
12792
13653
|
});
|
|
12793
|
-
|
|
13654
|
+
RadioChoice.displayName = 'RadioChoice';
|
|
12794
13655
|
// 고르지 않은 선택지에도 남겨 둔다. 보이고 숨는 것은 CSS 가 data-state 로 그리는 scale 이고 스프링은 그 위에 얹힌다
|
|
12795
13656
|
var RadioIndicator = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
12796
13657
|
var children = props.children,
|
|
@@ -12850,19 +13711,25 @@ var RadioRoot = Object.assign(RadioRootBase, {
|
|
|
12850
13711
|
OptionGroup: RadioOptionGroup,
|
|
12851
13712
|
Option: RadioOption,
|
|
12852
13713
|
Button: RadioButton,
|
|
12853
|
-
|
|
13714
|
+
Choice: RadioChoice,
|
|
12854
13715
|
Indicator: RadioIndicator,
|
|
12855
13716
|
Label: RadioLabel
|
|
12856
13717
|
});
|
|
12857
13718
|
/* harmony default export */ const base_radio = (RadioRoot);
|
|
12858
13719
|
;// ./components/radio/radio-props.ts
|
|
12859
|
-
var variant = ['default', 'chip'];
|
|
13720
|
+
var variant = ['default', 'chip', 'button', 'card'];
|
|
13721
|
+
var columns = [1, 2, 3];
|
|
12860
13722
|
var radioProps = {
|
|
12861
13723
|
variant: {
|
|
12862
13724
|
type: 'className',
|
|
12863
13725
|
className: 'variant',
|
|
12864
13726
|
values: variant,
|
|
12865
13727
|
"default": 'default'
|
|
13728
|
+
},
|
|
13729
|
+
columns: {
|
|
13730
|
+
type: 'css',
|
|
13731
|
+
key: '--radio-columns',
|
|
13732
|
+
values: columns
|
|
12866
13733
|
}
|
|
12867
13734
|
};
|
|
12868
13735
|
;// ./components/radio/radio.tsx
|
|
@@ -12873,6 +13740,7 @@ var radioProps = {
|
|
|
12873
13740
|
|
|
12874
13741
|
|
|
12875
13742
|
|
|
13743
|
+
|
|
12876
13744
|
// 칩은 버튼 자체가 role='radio' 라 li 는 목록 의미를 빼고 자리만 잡는다.
|
|
12877
13745
|
// 칩의 ::after 는 터치 영역이라 눌림은 딤 없이 scale 만 쓴다.
|
|
12878
13746
|
var ChipOption = function ChipOption(props) {
|
|
@@ -12883,7 +13751,8 @@ var ChipOption = function ChipOption(props) {
|
|
|
12883
13751
|
className: 'radio radio-option',
|
|
12884
13752
|
role: 'none',
|
|
12885
13753
|
disabled: option.disabled,
|
|
12886
|
-
children: (0,jsx_runtime_.jsx)(base_radio.
|
|
13754
|
+
children: (0,jsx_runtime_.jsx)(base_radio.Choice, {
|
|
13755
|
+
part: 'chip',
|
|
12887
13756
|
className: (0,classNames/* classNames */.x)('radio radio-chip', pressEffect && 'motion-press'),
|
|
12888
13757
|
style: confirmStyle,
|
|
12889
13758
|
id: option.id,
|
|
@@ -12893,6 +13762,76 @@ var ChipOption = function ChipOption(props) {
|
|
|
12893
13762
|
});
|
|
12894
13763
|
};
|
|
12895
13764
|
ChipOption.displayName = 'RadioChipOption';
|
|
13765
|
+
// 칸끼리 선을 나눠 붙은 묶음이라 줄이지 않고 딤만 쓴다. 체크는 늘 그려 두고 CSS 가 data-state 로 보인다.
|
|
13766
|
+
var ButtonOption = function ButtonOption(props) {
|
|
13767
|
+
var option = props.option,
|
|
13768
|
+
pressEffect = props.pressEffect,
|
|
13769
|
+
confirmStyle = props.confirmStyle;
|
|
13770
|
+
return (0,jsx_runtime_.jsx)(base_radio.Option, {
|
|
13771
|
+
className: 'radio radio-option',
|
|
13772
|
+
role: 'none',
|
|
13773
|
+
disabled: option.disabled,
|
|
13774
|
+
children: (0,jsx_runtime_.jsxs)(base_radio.Choice, {
|
|
13775
|
+
part: 'segment',
|
|
13776
|
+
className: (0,classNames/* classNames */.x)('radio radio-segment', pressEffect && 'motion-press-dim'),
|
|
13777
|
+
style: confirmStyle,
|
|
13778
|
+
id: option.id,
|
|
13779
|
+
disabled: option.disabled,
|
|
13780
|
+
children: [(0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
13781
|
+
className: 'radio radio-segment-check',
|
|
13782
|
+
name: 'check',
|
|
13783
|
+
size: 'xs'
|
|
13784
|
+
}), option.label]
|
|
13785
|
+
})
|
|
13786
|
+
});
|
|
13787
|
+
};
|
|
13788
|
+
ButtonOption.displayName = 'RadioButtonOption';
|
|
13789
|
+
// 이름은 제목만, 설명은 aria-describedby 로 따로 읽힌다. 동그라미는 기본형의 모양을 빌린 표시다.
|
|
13790
|
+
var CardOption = function CardOption(props) {
|
|
13791
|
+
var option = props.option,
|
|
13792
|
+
pressEffect = props.pressEffect,
|
|
13793
|
+
confirmStyle = props.confirmStyle,
|
|
13794
|
+
motion = props.motion,
|
|
13795
|
+
delay = props.delay;
|
|
13796
|
+
var titleId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
13797
|
+
var descriptionId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
13798
|
+
var hasDescription = option.description != null;
|
|
13799
|
+
return (0,jsx_runtime_.jsx)(base_radio.Option, {
|
|
13800
|
+
className: 'radio radio-option',
|
|
13801
|
+
role: 'none',
|
|
13802
|
+
disabled: option.disabled,
|
|
13803
|
+
children: (0,jsx_runtime_.jsxs)(base_radio.Choice, {
|
|
13804
|
+
part: 'card',
|
|
13805
|
+
className: (0,classNames/* classNames */.x)('radio radio-card', pressEffect && 'motion-press-dim'),
|
|
13806
|
+
style: confirmStyle,
|
|
13807
|
+
id: option.id,
|
|
13808
|
+
disabled: option.disabled,
|
|
13809
|
+
"aria-labelledby": titleId,
|
|
13810
|
+
"aria-describedby": hasDescription ? descriptionId : undefined,
|
|
13811
|
+
children: [(0,jsx_runtime_.jsxs)("span", {
|
|
13812
|
+
className: 'radio radio-card-text',
|
|
13813
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
13814
|
+
id: titleId,
|
|
13815
|
+
className: 'radio radio-card-title',
|
|
13816
|
+
children: option.label
|
|
13817
|
+
}), hasDescription && (0,jsx_runtime_.jsx)("span", {
|
|
13818
|
+
id: descriptionId,
|
|
13819
|
+
className: 'radio radio-card-description',
|
|
13820
|
+
children: option.description
|
|
13821
|
+
})]
|
|
13822
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
13823
|
+
className: 'radio radio-mark',
|
|
13824
|
+
children: (0,jsx_runtime_.jsx)(base_radio.Indicator, {
|
|
13825
|
+
className: 'radio radio-indicator',
|
|
13826
|
+
id: option.id,
|
|
13827
|
+
motion: motion,
|
|
13828
|
+
delay: delay
|
|
13829
|
+
})
|
|
13830
|
+
})]
|
|
13831
|
+
})
|
|
13832
|
+
});
|
|
13833
|
+
};
|
|
13834
|
+
CardOption.displayName = 'RadioCardOption';
|
|
12896
13835
|
var DefaultOption = function DefaultOption(props) {
|
|
12897
13836
|
var option = props.option,
|
|
12898
13837
|
pressEffect = props.pressEffect,
|
|
@@ -12922,26 +13861,36 @@ var DefaultOption = function DefaultOption(props) {
|
|
|
12922
13861
|
});
|
|
12923
13862
|
};
|
|
12924
13863
|
DefaultOption.displayName = 'RadioDefaultOption';
|
|
13864
|
+
var optionByVariant = {
|
|
13865
|
+
"default": DefaultOption,
|
|
13866
|
+
chip: ChipOption,
|
|
13867
|
+
button: ButtonOption,
|
|
13868
|
+
card: CardOption
|
|
13869
|
+
};
|
|
12925
13870
|
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
|
-
|
|
13871
|
+
var _a;
|
|
13872
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, radioProps),
|
|
13873
|
+
className = _b.className,
|
|
13874
|
+
style = _b.style,
|
|
13875
|
+
selected = _b.selected,
|
|
13876
|
+
_onChange = _b.onChange,
|
|
13877
|
+
options = _b.options,
|
|
13878
|
+
label = _b.label,
|
|
13879
|
+
_c = _b.fill,
|
|
13880
|
+
fill = _c === void 0 ? false : _c,
|
|
13881
|
+
track = _b.track,
|
|
13882
|
+
trackProps = _b.trackProps,
|
|
13883
|
+
_d = _b.pressEffect,
|
|
13884
|
+
pressEffect = _d === void 0 ? true : _d,
|
|
13885
|
+
motion = _b.motion,
|
|
13886
|
+
delay = _b.delay;
|
|
12938
13887
|
// getMergedProps 가 variant 를 클래스로 바꾸며 지우므로 원래 props 에서 읽는다.
|
|
12939
|
-
var
|
|
13888
|
+
var variantName = (_a = props.variant) !== null && _a !== void 0 ? _a : 'default';
|
|
12940
13889
|
var emit = (0,useTrack/* useTrack */.n)('Radio', {
|
|
12941
13890
|
track: track,
|
|
12942
13891
|
trackProps: trackProps
|
|
12943
13892
|
});
|
|
12944
|
-
var Option =
|
|
13893
|
+
var Option = optionByVariant[variantName];
|
|
12945
13894
|
var confirmStyle = delay ? {
|
|
12946
13895
|
'--confirm-delay': "".concat(delay, "ms")
|
|
12947
13896
|
} : undefined;
|
|
@@ -12954,9 +13903,10 @@ var Radio = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_a
|
|
|
12954
13903
|
},
|
|
12955
13904
|
children: (0,jsx_runtime_.jsx)(base_radio.OptionGroup, {
|
|
12956
13905
|
ref: ref,
|
|
12957
|
-
className: (0,classNames/* classNames */.x)(className, 'radio radio-group'),
|
|
12958
|
-
|
|
12959
|
-
|
|
13906
|
+
className: (0,classNames/* classNames */.x)(className, 'radio radio-group', fill && 'fill'),
|
|
13907
|
+
style: style,
|
|
13908
|
+
// 칩·칸·카드는 버튼마다 role='radio' 라 묶음도 radiogroup 이다. 기본형은 목록 그대로 둔다.
|
|
13909
|
+
role: variantName === 'default' ? undefined : 'radiogroup',
|
|
12960
13910
|
"aria-label": label,
|
|
12961
13911
|
children: options.map(function (option) {
|
|
12962
13912
|
return (0,jsx_runtime_.jsx)(Option, {
|
|
@@ -13486,10 +14436,16 @@ __nuri_require__.d(__webpack_exports__, {
|
|
|
13486
14436
|
var jsx_runtime_ = __nuri_require__(612);
|
|
13487
14437
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
13488
14438
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
14439
|
+
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
14440
|
+
var useExternalState = __nuri_require__(9387);
|
|
13489
14441
|
// EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
|
|
13490
14442
|
var useTrack = __nuri_require__(4560);
|
|
14443
|
+
// EXTERNAL MODULE: ./helpers/motion/stagger.ts
|
|
14444
|
+
var stagger = __nuri_require__(4577);
|
|
13491
14445
|
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
13492
14446
|
var classNames = __nuri_require__(3274);
|
|
14447
|
+
// EXTERNAL MODULE: ./components/drop-down/base-drop-down.tsx
|
|
14448
|
+
var base_drop_down = __nuri_require__(2735);
|
|
13493
14449
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
13494
14450
|
var icon = __nuri_require__(3547);
|
|
13495
14451
|
// EXTERNAL MODULE: ./components/text-field/text-field.tsx
|
|
@@ -13553,36 +14509,87 @@ var search_field_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
13553
14509
|
|
|
13554
14510
|
|
|
13555
14511
|
|
|
14512
|
+
|
|
14513
|
+
|
|
14514
|
+
|
|
13556
14515
|
/**
|
|
13557
14516
|
* 돋보기·지우기 버튼이 붙은 TextField 를 `role="search"` 영역으로 감싼다.
|
|
13558
14517
|
* 지우기 버튼의 눌림 motion-press 는 TextField 가 단다.
|
|
13559
14518
|
*/
|
|
13560
14519
|
var SearchField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
14520
|
+
var _a, _b, _c, _d;
|
|
13561
14521
|
var className = props.className,
|
|
13562
14522
|
style = props.style,
|
|
13563
|
-
|
|
13564
|
-
fixed =
|
|
13565
|
-
|
|
13566
|
-
takeSpace =
|
|
13567
|
-
|
|
13568
|
-
size =
|
|
13569
|
-
|
|
13570
|
-
width =
|
|
13571
|
-
|
|
13572
|
-
name =
|
|
13573
|
-
|
|
13574
|
-
ariaLabel =
|
|
14523
|
+
_e = props.fixed,
|
|
14524
|
+
fixed = _e === void 0 ? false : _e,
|
|
14525
|
+
_f = props.takeSpace,
|
|
14526
|
+
takeSpace = _f === void 0 ? false : _f,
|
|
14527
|
+
_g = props.size,
|
|
14528
|
+
size = _g === void 0 ? 's' : _g,
|
|
14529
|
+
_h = props.width,
|
|
14530
|
+
width = _h === void 0 ? '100%' : _h,
|
|
14531
|
+
_j = props.name,
|
|
14532
|
+
name = _j === void 0 ? 'search' : _j,
|
|
14533
|
+
_k = props["aria-label"],
|
|
14534
|
+
ariaLabel = _k === void 0 ? '검색' : _k,
|
|
13575
14535
|
onSearch = props.onSearch,
|
|
13576
14536
|
onClear = props.onClear,
|
|
14537
|
+
criterion = props.criterion,
|
|
13577
14538
|
track = props.track,
|
|
13578
14539
|
trackProps = props.trackProps,
|
|
13579
|
-
restProps = search_field_rest(props, ["className", "style", "fixed", "takeSpace", "size", "width", "name", 'aria-label', "onSearch", "onClear", "track", "trackProps"]);
|
|
14540
|
+
restProps = search_field_rest(props, ["className", "style", "fixed", "takeSpace", "size", "width", "name", 'aria-label', "onSearch", "onClear", "criterion", "track", "trackProps"]);
|
|
13580
14541
|
// TextField 에 track 을 넘기면 로그의 component 가 TextField 가 된다. 그래서 여기서 직접 보낸다
|
|
13581
14542
|
var emit = (0,useTrack/* useTrack */.n)('SearchField', {
|
|
13582
14543
|
track: track,
|
|
13583
14544
|
trackProps: trackProps
|
|
13584
14545
|
});
|
|
13585
14546
|
var focusedValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
|
|
14547
|
+
var _l = (0,useExternalState/* useExternalState */.C)({
|
|
14548
|
+
prop: criterion === null || criterion === void 0 ? void 0 : criterion.value,
|
|
14549
|
+
handler: function handler(next) {
|
|
14550
|
+
var _a;
|
|
14551
|
+
emit('change', next);
|
|
14552
|
+
(_a = criterion === null || criterion === void 0 ? void 0 : criterion.onValueChange) === null || _a === void 0 ? void 0 : _a.call(criterion, next);
|
|
14553
|
+
},
|
|
14554
|
+
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 : ''
|
|
14555
|
+
}),
|
|
14556
|
+
criterionValue = _l[0],
|
|
14557
|
+
setCriterionValue = _l[1];
|
|
14558
|
+
// 기준 고르기는 입력 상자 안 맨 앞에 놓여 바깥 상자 하나가 포커스 선을 그린다(ADR 0021). 목록은 DropDown 과 같은 모양이다
|
|
14559
|
+
var criterionSelect = criterion ? (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
14560
|
+
children: [(0,jsx_runtime_.jsxs)(base_drop_down/* default */.A, {
|
|
14561
|
+
value: criterionValue,
|
|
14562
|
+
onValueChange: setCriterionValue,
|
|
14563
|
+
disabled: restProps.disabled,
|
|
14564
|
+
children: [(0,jsx_runtime_.jsxs)(base_drop_down/* default */.A.Trigger, {
|
|
14565
|
+
className: 'search-field-criterion',
|
|
14566
|
+
"aria-label": (_d = criterion['aria-label']) !== null && _d !== void 0 ? _d : '검색 기준',
|
|
14567
|
+
children: [(0,jsx_runtime_.jsx)(base_drop_down/* default */.A.Value, {}), (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
14568
|
+
name: 'caret-down',
|
|
14569
|
+
size: 'xs',
|
|
14570
|
+
className: 'search-field-criterion-icon'
|
|
14571
|
+
})]
|
|
14572
|
+
}), (0,jsx_runtime_.jsx)(base_drop_down/* default */.A.Content, {
|
|
14573
|
+
className: 'drop-down-single-content motion-unfold',
|
|
14574
|
+
align: 'start',
|
|
14575
|
+
children: criterion.options.map(function (option, index) {
|
|
14576
|
+
return (0,jsx_runtime_.jsx)(base_drop_down/* default */.A.Item, {
|
|
14577
|
+
className: 'drop-down-single-item motion-unfold-item motion-press-dim',
|
|
14578
|
+
style: (0,stagger/* staggerStyle */.L)(index),
|
|
14579
|
+
value: option.value,
|
|
14580
|
+
indicator: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
14581
|
+
name: 'check',
|
|
14582
|
+
size: 's'
|
|
14583
|
+
}),
|
|
14584
|
+
children: option.label
|
|
14585
|
+
}, option.value);
|
|
14586
|
+
})
|
|
14587
|
+
})]
|
|
14588
|
+
}), (0,jsx_runtime_.jsx)("span", {
|
|
14589
|
+
className: 'search-field-divider',
|
|
14590
|
+
"aria-hidden": 'true'
|
|
14591
|
+
})]
|
|
14592
|
+
}) : null;
|
|
13586
14593
|
return (0,jsx_runtime_.jsx)(base_search_field, {
|
|
13587
14594
|
className: (0,classNames/* classNames */.x)(className, 'search-field'),
|
|
13588
14595
|
style: style,
|
|
@@ -13594,13 +14601,17 @@ var SearchField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
13594
14601
|
ref: ref,
|
|
13595
14602
|
type: 'search',
|
|
13596
14603
|
enterKeyHint: 'search',
|
|
14604
|
+
// 검색 상자는 선 없는 연회색 면이다(ADR 0021). 기준 고르기가 붙으면 토스 목록 필터처럼 흰 상자에 회색 선이다
|
|
14605
|
+
variant: criterion ? 'outline' : 'fill',
|
|
13597
14606
|
size: size,
|
|
13598
14607
|
width: width,
|
|
13599
14608
|
name: name,
|
|
13600
14609
|
"aria-label": ariaLabel,
|
|
13601
|
-
leftIcon: (0,jsx_runtime_.
|
|
13602
|
-
|
|
13603
|
-
|
|
14610
|
+
leftIcon: (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
14611
|
+
children: [criterionSelect, (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
14612
|
+
name: 'magnifying-glass',
|
|
14613
|
+
size: size
|
|
14614
|
+
})]
|
|
13604
14615
|
}),
|
|
13605
14616
|
clearable: true,
|
|
13606
14617
|
onClear: onClear,
|
|
@@ -13614,7 +14625,7 @@ var SearchField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
13614
14625
|
// 한글 조합을 끝내는 Enter 가 검색까지 하지 않게 한다
|
|
13615
14626
|
if (event.key !== 'Enter' || event.nativeEvent.isComposing) return;
|
|
13616
14627
|
emit('submit');
|
|
13617
|
-
onSearch === null || onSearch === void 0 ? void 0 : onSearch(event.currentTarget.value);
|
|
14628
|
+
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
14629
|
}
|
|
13619
14630
|
}, restProps))
|
|
13620
14631
|
})
|
|
@@ -13870,8 +14881,16 @@ var common_props = __nuri_require__(7298);
|
|
|
13870
14881
|
|
|
13871
14882
|
/** s 는 카드·시트 안(32), m 은 화면 위(40). px 은 --segmented-height-* */
|
|
13872
14883
|
var sizes = ['s', 'm'];
|
|
14884
|
+
/** 고른 칸의 판. brand 는 보라 판에 흰 글자, neutral 은 회색 바탕 위 흰 알약에 검정 글자(토스 어드민) */
|
|
14885
|
+
var variant = ['brand', 'neutral'];
|
|
13873
14886
|
var segmentedControlProps = {
|
|
13874
|
-
size: (0,common_props/* sizeProp */.lw)(sizes, 'm')
|
|
14887
|
+
size: (0,common_props/* sizeProp */.lw)(sizes, 'm'),
|
|
14888
|
+
variant: {
|
|
14889
|
+
type: 'className',
|
|
14890
|
+
className: 'variant',
|
|
14891
|
+
values: variant,
|
|
14892
|
+
"default": 'brand'
|
|
14893
|
+
}
|
|
13875
14894
|
};
|
|
13876
14895
|
;// ./components/segmented-control/segmented-control.tsx
|
|
13877
14896
|
var segmented_control_assign = undefined && undefined.__assign || function () {
|
|
@@ -14641,7 +15660,7 @@ var text_field_props = __nuri_require__(244);
|
|
|
14641
15660
|
/** 크기는 TextField 와 같다. 같은 입력 상자 CSS 를 쓴다 */
|
|
14642
15661
|
|
|
14643
15662
|
var splitTextFieldProps = {
|
|
14644
|
-
size: text_field_props/* textFieldProps */.
|
|
15663
|
+
size: text_field_props/* textFieldProps */.gx.size,
|
|
14645
15664
|
width: (0,common_props/* widthProp */.Iw)('100%')
|
|
14646
15665
|
};
|
|
14647
15666
|
/** 주민등록번호 13자리. 뒤 7자리를 가린다 */
|
|
@@ -14738,6 +15757,8 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14738
15757
|
trackProps: trackProps
|
|
14739
15758
|
});
|
|
14740
15759
|
var titleId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
15760
|
+
var firstId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
15761
|
+
var helperId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
14741
15762
|
var firstRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(null);
|
|
14742
15763
|
var secondRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(null);
|
|
14743
15764
|
var focusedRawRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
|
|
@@ -14769,6 +15790,7 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14769
15790
|
className: (0,classNames/* classNames */.x)(className, 'text-field', 'split-text-field', spec.className),
|
|
14770
15791
|
style: rootStyle,
|
|
14771
15792
|
"aria-labelledby": title ? titleId : undefined,
|
|
15793
|
+
"aria-describedby": helperText ? helperId : undefined,
|
|
14772
15794
|
onFocus: function onFocus() {
|
|
14773
15795
|
if (!focusWithin) focusedRawRef.current = raw;
|
|
14774
15796
|
setFocusWithin(true);
|
|
@@ -14778,12 +15800,13 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14778
15800
|
setFocusWithin(false);
|
|
14779
15801
|
if (raw !== focusedRawRef.current) emit('change');
|
|
14780
15802
|
},
|
|
14781
|
-
children: [title &&
|
|
15803
|
+
children: [title &&
|
|
15804
|
+
// 라벨을 누르면 앞 칸으로 간다. 칸의 이름은 aria-label 이 그대로 정한다
|
|
15805
|
+
(0,jsx_runtime_.jsx)(base_text_field/* default */.A.Label, {
|
|
15806
|
+
className: 'text-field-title',
|
|
14782
15807
|
id: titleId,
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
text: title
|
|
14786
|
-
})
|
|
15808
|
+
htmlFor: firstId,
|
|
15809
|
+
text: title
|
|
14787
15810
|
}), (0,jsx_runtime_.jsxs)("div", {
|
|
14788
15811
|
className: (0,classNames/* classNames */.x)('nuri-theme text-field-input-wrapper', sizeClassName, {
|
|
14789
15812
|
error: isError
|
|
@@ -14802,6 +15825,7 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14802
15825
|
},
|
|
14803
15826
|
children: (0,jsx_runtime_.jsx)(base_text_field/* default */.A.Input, {
|
|
14804
15827
|
ref: firstRef,
|
|
15828
|
+
id: firstId,
|
|
14805
15829
|
className: 'split-text-field-input split-text-field-first',
|
|
14806
15830
|
inputMode: 'numeric',
|
|
14807
15831
|
autoComplete: 'off',
|
|
@@ -14858,6 +15882,7 @@ var SplitTextFieldBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_com
|
|
|
14858
15882
|
className: (0,classNames/* classNames */.x)('text-field-helper-text', {
|
|
14859
15883
|
error: isError
|
|
14860
15884
|
}),
|
|
15885
|
+
id: helperId,
|
|
14861
15886
|
text: helperText
|
|
14862
15887
|
})]
|
|
14863
15888
|
});
|
|
@@ -14887,24 +15912,15 @@ var SplitTextField = {
|
|
|
14887
15912
|
|
|
14888
15913
|
/***/ },
|
|
14889
15914
|
|
|
14890
|
-
/***/
|
|
15915
|
+
/***/ 2017
|
|
14891
15916
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
14892
15917
|
|
|
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
|
|
15918
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
15919
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15920
|
+
/* harmony export */ });
|
|
15921
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
15922
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
15923
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
14908
15924
|
var __assign = undefined && undefined.__assign || function () {
|
|
14909
15925
|
__assign = Object.assign || function (t) {
|
|
14910
15926
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -14927,39 +15943,229 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
14927
15943
|
|
|
14928
15944
|
|
|
14929
15945
|
/** 이름–값 쌍이라 dl 이다 */
|
|
14930
|
-
var
|
|
15946
|
+
var StatRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
14931
15947
|
var className = props.className,
|
|
14932
15948
|
restProps = __rest(props, ["className"]);
|
|
14933
|
-
return (0,
|
|
15949
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("dl", __assign({
|
|
15950
|
+
ref: ref,
|
|
15951
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat', className)
|
|
15952
|
+
}, restProps));
|
|
15953
|
+
});
|
|
15954
|
+
StatRootBase.displayName = 'StatRoot';
|
|
15955
|
+
var StatGroup = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
15956
|
+
var className = props.className,
|
|
15957
|
+
restProps = __rest(props, ["className"]);
|
|
15958
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({
|
|
15959
|
+
ref: ref,
|
|
15960
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat group', className),
|
|
15961
|
+
role: 'group'
|
|
15962
|
+
}, restProps));
|
|
15963
|
+
});
|
|
15964
|
+
StatGroup.displayName = 'StatGroup';
|
|
15965
|
+
var StatItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
15966
|
+
var className = props.className,
|
|
15967
|
+
restProps = __rest(props, ["className"]);
|
|
15968
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({
|
|
15969
|
+
ref: ref,
|
|
15970
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat item', className)
|
|
15971
|
+
}, restProps));
|
|
15972
|
+
});
|
|
15973
|
+
StatItem.displayName = 'StatItem';
|
|
15974
|
+
/** 칸 전체를 덮는 누르는 자리. 칸 안의 dl 은 button 안에 들어갈 수 없어 형제로 둔다 */
|
|
15975
|
+
var StatToggle = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
15976
|
+
var className = props.className,
|
|
15977
|
+
restProps = __rest(props, ["className"]);
|
|
15978
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", __assign({
|
|
14934
15979
|
ref: ref,
|
|
14935
|
-
className: (0,
|
|
15980
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-stat toggle', className),
|
|
15981
|
+
type: 'button'
|
|
14936
15982
|
}, restProps));
|
|
14937
15983
|
});
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
15984
|
+
StatToggle.displayName = 'StatToggle';
|
|
15985
|
+
var StatRoot = Object.assign(StatRootBase, {
|
|
15986
|
+
Group: StatGroup,
|
|
15987
|
+
Item: StatItem,
|
|
15988
|
+
Toggle: StatToggle
|
|
15989
|
+
});
|
|
15990
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatRoot);
|
|
15991
|
+
|
|
15992
|
+
/***/ },
|
|
15993
|
+
|
|
15994
|
+
/***/ 2455
|
|
15995
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
15996
|
+
|
|
15997
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
15998
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15999
|
+
/* harmony export */ });
|
|
16000
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
16001
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
16002
|
+
/* harmony import */ var _helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(9387);
|
|
16003
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(4560);
|
|
16004
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3274);
|
|
16005
|
+
/* harmony import */ var _base_stat__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(2017);
|
|
16006
|
+
/* harmony import */ var _stat__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(857);
|
|
16007
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
16008
|
+
__assign = Object.assign || function (t) {
|
|
16009
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16010
|
+
s = arguments[i];
|
|
16011
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
16012
|
+
}
|
|
16013
|
+
return t;
|
|
16014
|
+
};
|
|
16015
|
+
return __assign.apply(this, arguments);
|
|
16016
|
+
};
|
|
16017
|
+
|
|
16018
|
+
|
|
16019
|
+
|
|
16020
|
+
|
|
16021
|
+
|
|
16022
|
+
|
|
16023
|
+
|
|
16024
|
+
/** 칸마다 새 줄의 첫 칸인지와, 가장 긴 줄의 칸 수(격자 열 수) */
|
|
16025
|
+
var layoutOf = function layoutOf(items) {
|
|
16026
|
+
var rowStarts = items.map(function (item, index) {
|
|
16027
|
+
return index === 0 || item.newRow === true;
|
|
16028
|
+
});
|
|
16029
|
+
var columns = 0;
|
|
16030
|
+
var run = 0;
|
|
16031
|
+
rowStarts.forEach(function (start) {
|
|
16032
|
+
run = start ? 1 : run + 1;
|
|
16033
|
+
columns = Math.max(columns, run);
|
|
16034
|
+
});
|
|
16035
|
+
return {
|
|
16036
|
+
rowStarts: rowStarts,
|
|
16037
|
+
columns: columns
|
|
16038
|
+
};
|
|
16039
|
+
};
|
|
16040
|
+
/**
|
|
16041
|
+
* 상태별 건수 칸 묶음. 한 면을 세로선으로 나눈 칸이고, 누른 칸이 고른 필터가 된다.
|
|
16042
|
+
* 칸마다 aria-pressed 버튼이 칸 전체를 덮고, 그 아래 Stat 이 라벨·숫자를 그린다.
|
|
16043
|
+
*/
|
|
16044
|
+
var StatGroup = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16045
|
+
var className = props.className,
|
|
16046
|
+
style = props.style,
|
|
16047
|
+
items = props.items,
|
|
16048
|
+
label = props.label,
|
|
16049
|
+
value = props.value,
|
|
16050
|
+
defaultValue = props.defaultValue,
|
|
16051
|
+
onValueChange = props.onValueChange,
|
|
16052
|
+
_a = props.pressEffect,
|
|
16053
|
+
pressEffect = _a === void 0 ? true : _a,
|
|
16054
|
+
track = props.track,
|
|
16055
|
+
trackProps = props.trackProps;
|
|
16056
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__/* .useTrack */ .n)('StatGroup', {
|
|
16057
|
+
track: track,
|
|
16058
|
+
trackProps: trackProps
|
|
16059
|
+
});
|
|
16060
|
+
var _b = (0,_helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_2__/* .useExternalState */ .C)({
|
|
16061
|
+
prop: value,
|
|
16062
|
+
handler: function handler(id) {
|
|
16063
|
+
if (id === null) return;
|
|
16064
|
+
emit('change', id);
|
|
16065
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(id);
|
|
16066
|
+
},
|
|
16067
|
+
defaultProp: defaultValue !== null && defaultValue !== void 0 ? defaultValue : null
|
|
16068
|
+
}),
|
|
16069
|
+
selected = _b[0],
|
|
16070
|
+
setSelected = _b[1];
|
|
16071
|
+
var baseId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
16072
|
+
var _c = layoutOf(items),
|
|
16073
|
+
rowStarts = _c.rowStarts,
|
|
16074
|
+
columns = _c.columns;
|
|
16075
|
+
var groupStyle = __assign(__assign({}, style), {
|
|
16076
|
+
'--stat-group-columns': columns
|
|
16077
|
+
});
|
|
16078
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_stat__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A.Group, {
|
|
16079
|
+
ref: ref,
|
|
16080
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)(className, 'stat-group'),
|
|
16081
|
+
style: groupStyle,
|
|
16082
|
+
"aria-label": label,
|
|
16083
|
+
children: items.map(function (item, index) {
|
|
16084
|
+
var pressed = selected === item.id;
|
|
16085
|
+
var labelId = "".concat(baseId, "-").concat(index, "-label");
|
|
16086
|
+
var valueId = "".concat(baseId, "-").concat(index, "-value");
|
|
16087
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_stat__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A.Item, {
|
|
16088
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('stat-group-item', !item.readOnly && 'pressable', rowStarts[index] && 'row-start'),
|
|
16089
|
+
"data-state": item.readOnly ? undefined : pressed ? 'on' : 'off',
|
|
16090
|
+
children: [item.readOnly ? null : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_stat__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A.Toggle
|
|
16091
|
+
// 칸은 면 안의 칸이라 줄이지 않고 딤만 쓴다(press form dim)
|
|
16092
|
+
, {
|
|
16093
|
+
// 칸은 면 안의 칸이라 줄이지 않고 딤만 쓴다(press form dim)
|
|
16094
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('stat-group-toggle', pressEffect && 'motion-press-dim'),
|
|
16095
|
+
"aria-pressed": pressed,
|
|
16096
|
+
"aria-labelledby": "".concat(labelId, " ").concat(valueId),
|
|
16097
|
+
onClick: function onClick() {
|
|
16098
|
+
return setSelected(item.id);
|
|
16099
|
+
}
|
|
16100
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_stat__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
16101
|
+
size: 's',
|
|
16102
|
+
icon: item.icon,
|
|
16103
|
+
help: item.help,
|
|
16104
|
+
valueTone: item.valueTone,
|
|
16105
|
+
label: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16106
|
+
id: labelId,
|
|
16107
|
+
children: item.label
|
|
16108
|
+
}),
|
|
16109
|
+
value: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16110
|
+
id: valueId,
|
|
16111
|
+
children: item.value
|
|
16112
|
+
})
|
|
16113
|
+
})]
|
|
16114
|
+
}, item.id);
|
|
16115
|
+
})
|
|
16116
|
+
});
|
|
16117
|
+
});
|
|
16118
|
+
StatGroup.displayName = 'StatGroup';
|
|
16119
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatGroup);
|
|
16120
|
+
|
|
16121
|
+
/***/ },
|
|
16122
|
+
|
|
16123
|
+
/***/ 7296
|
|
16124
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
14943
16125
|
|
|
14944
|
-
|
|
14945
|
-
|
|
16126
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16127
|
+
/* harmony export */ Xi: () => (/* binding */ statProps)
|
|
16128
|
+
/* harmony export */ });
|
|
16129
|
+
/* unused harmony exports sizes, tone, valueTone */
|
|
16130
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
16131
|
+
|
|
16132
|
+
/** 숫자 크기. s 는 xl(상태 요약 칸), m 은 2xl(수치 타일), l 은 3xl(화면의 주 수치 하나) */
|
|
16133
|
+
var sizes = ['s', 'm', 'l'];
|
|
14946
16134
|
/** 증감의 뜻. positive 는 좋아짐(초록), negative 는 나빠짐(빨강), neutral 은 그대로(회색). 부호와 따로다 */
|
|
14947
16135
|
var tone = (/* unused pure expression or super */ null && (['positive', 'negative', 'neutral']));
|
|
16136
|
+
/** 숫자 색. danger 는 처리해야 할 건수(발송기한 초과 등)에만 붙는다 */
|
|
16137
|
+
var valueTone = (/* unused pure expression or super */ null && (['default', 'danger']));
|
|
14948
16138
|
var statProps = {
|
|
14949
|
-
size: (0,
|
|
16139
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
14950
16140
|
};
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
16141
|
+
|
|
16142
|
+
/***/ },
|
|
16143
|
+
|
|
16144
|
+
/***/ 857
|
|
16145
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
16146
|
+
|
|
16147
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16148
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16149
|
+
/* harmony export */ });
|
|
16150
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
16151
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
16152
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
16153
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(7335);
|
|
16154
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3547);
|
|
16155
|
+
/* harmony import */ var _tooltip_tooltip__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(1563);
|
|
16156
|
+
/* harmony import */ var _base_stat__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(2017);
|
|
16157
|
+
/* harmony import */ var _stat_props__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(7296);
|
|
16158
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
16159
|
+
__assign = Object.assign || function (t) {
|
|
14954
16160
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14955
16161
|
s = arguments[i];
|
|
14956
16162
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
14957
16163
|
}
|
|
14958
16164
|
return t;
|
|
14959
16165
|
};
|
|
14960
|
-
return
|
|
16166
|
+
return __assign.apply(this, arguments);
|
|
14961
16167
|
};
|
|
14962
|
-
var
|
|
16168
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
14963
16169
|
var t = {};
|
|
14964
16170
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14965
16171
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -14973,41 +16179,74 @@ var stat_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
14973
16179
|
|
|
14974
16180
|
|
|
14975
16181
|
|
|
16182
|
+
|
|
16183
|
+
|
|
14976
16184
|
var TONE_CLASS = {
|
|
14977
16185
|
positive: 'tone-positive',
|
|
14978
16186
|
negative: 'tone-negative',
|
|
14979
16187
|
neutral: 'tone-neutral'
|
|
14980
16188
|
};
|
|
14981
16189
|
/** 수치 한 묶음. 작은 회색 라벨 위, 굵은 숫자 아래, 그 아래 증감과 기준 글. 면은 Card 가 갖는다 */
|
|
14982
|
-
var Stat = /*#__PURE__*/(0,
|
|
14983
|
-
var _a = (0,
|
|
16190
|
+
var Stat = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16191
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__/* .getMergedProps */ .p)(props, _stat_props__WEBPACK_IMPORTED_MODULE_7__/* .statProps */ .Xi),
|
|
14984
16192
|
className = _a.className,
|
|
14985
16193
|
label = _a.label,
|
|
14986
16194
|
value = _a.value,
|
|
14987
16195
|
delta = _a.delta,
|
|
14988
16196
|
caption = _a.caption,
|
|
14989
|
-
|
|
14990
|
-
|
|
16197
|
+
icon = _a.icon,
|
|
16198
|
+
help = _a.help,
|
|
16199
|
+
_b = _a.valueTone,
|
|
16200
|
+
valueTone = _b === void 0 ? 'default' : _b,
|
|
16201
|
+
restProps = __rest(_a, ["className", "label", "value", "delta", "caption", "icon", "help", "valueTone"]);
|
|
16202
|
+
var labelId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
16203
|
+
var helpId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
16204
|
+
var hasIcon = icon !== undefined && icon !== null;
|
|
16205
|
+
var hasHelp = help !== undefined && help !== null;
|
|
16206
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_stat__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, __assign({
|
|
14991
16207
|
ref: ref,
|
|
14992
|
-
className: (0,
|
|
16208
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)(className, 'stat', hasIcon && 'has-icon')
|
|
14993
16209
|
}, restProps, {
|
|
14994
|
-
children: [(0,
|
|
16210
|
+
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("dt", {
|
|
14995
16211
|
className: 'stat-label',
|
|
14996
|
-
children:
|
|
14997
|
-
|
|
14998
|
-
|
|
16212
|
+
children: [hasIcon ?
|
|
16213
|
+
// 라벨과 숫자 두 줄의 왼쪽 가운데에 놓는다. dl 에는 dt·dd 밖의 요소를 둘 수 없어 dt 안에서 띄운다
|
|
16214
|
+
(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16215
|
+
className: 'stat-icon',
|
|
16216
|
+
"aria-hidden": 'true',
|
|
16217
|
+
children: icon
|
|
16218
|
+
}) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16219
|
+
id: labelId,
|
|
16220
|
+
children: label
|
|
16221
|
+
}), hasHelp ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tooltip_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A, {
|
|
16222
|
+
trigger: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", {
|
|
16223
|
+
id: helpId,
|
|
16224
|
+
className: 'stat-help',
|
|
16225
|
+
type: 'button',
|
|
16226
|
+
"aria-label": "\uB3C4\uC6C0\uB9D0",
|
|
16227
|
+
"aria-labelledby": "".concat(labelId, " ").concat(helpId),
|
|
16228
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, {
|
|
16229
|
+
name: 'info',
|
|
16230
|
+
size: 'xs'
|
|
16231
|
+
})
|
|
16232
|
+
}),
|
|
16233
|
+
content: help,
|
|
16234
|
+
direction: 'top'
|
|
16235
|
+
}) : null]
|
|
16236
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("dd", {
|
|
16237
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('stat-value', valueTone === 'danger' && 'tone-danger'),
|
|
14999
16238
|
children: value
|
|
15000
|
-
}), delta || caption ? (0,
|
|
16239
|
+
}), delta || caption ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("dd", {
|
|
15001
16240
|
className: 'stat-detail',
|
|
15002
|
-
children: [delta ? (0,
|
|
15003
|
-
className: (0,
|
|
16241
|
+
children: [delta ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
16242
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('stat-delta', TONE_CLASS[delta.tone]),
|
|
15004
16243
|
children: delta.value
|
|
15005
16244
|
}) : null, delta && caption ? ' ' : null, caption]
|
|
15006
16245
|
}) : null]
|
|
15007
16246
|
}));
|
|
15008
16247
|
});
|
|
15009
16248
|
Stat.displayName = 'Stat';
|
|
15010
|
-
/* harmony default export */ const
|
|
16249
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Stat);
|
|
15011
16250
|
|
|
15012
16251
|
/***/ },
|
|
15013
16252
|
|
|
@@ -15614,12 +16853,20 @@ __nuri_require__.d(__webpack_exports__, {
|
|
|
15614
16853
|
var jsx_runtime_ = __nuri_require__(612);
|
|
15615
16854
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
15616
16855
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
16856
|
+
// EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
|
|
16857
|
+
var useExternalState = __nuri_require__(9387);
|
|
15617
16858
|
// EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
|
|
15618
16859
|
var useTrack = __nuri_require__(4560);
|
|
15619
16860
|
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
15620
16861
|
var classNames = __nuri_require__(3274);
|
|
15621
16862
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
15622
16863
|
var getMergedProps = __nuri_require__(7335);
|
|
16864
|
+
// EXTERNAL MODULE: ./components/check-box/check-box.tsx
|
|
16865
|
+
var check_box = __nuri_require__(4359);
|
|
16866
|
+
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
16867
|
+
var icon = __nuri_require__(3547);
|
|
16868
|
+
// EXTERNAL MODULE: ./components/tooltip/tooltip.tsx
|
|
16869
|
+
var tooltip = __nuri_require__(1563);
|
|
15623
16870
|
;// ./components/table/base-table.tsx
|
|
15624
16871
|
var __assign = undefined && undefined.__assign || function () {
|
|
15625
16872
|
__assign = Object.assign || function (t) {
|
|
@@ -15687,11 +16934,41 @@ var TableCell = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
|
|
|
15687
16934
|
}, restProps));
|
|
15688
16935
|
});
|
|
15689
16936
|
TableCell.displayName = 'TableCell';
|
|
16937
|
+
var TableCellText = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16938
|
+
var className = props.className,
|
|
16939
|
+
title = props.title,
|
|
16940
|
+
description = props.description,
|
|
16941
|
+
restProps = __rest(props, ["className", "title", "description"]);
|
|
16942
|
+
return (0,jsx_runtime_.jsxs)("span", __assign({
|
|
16943
|
+
ref: ref,
|
|
16944
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-table cell-text', className)
|
|
16945
|
+
}, restProps, {
|
|
16946
|
+
children: [(0,jsx_runtime_.jsx)("span", {
|
|
16947
|
+
className: 'cell-text-title',
|
|
16948
|
+
children: title
|
|
16949
|
+
}), description != null && (0,jsx_runtime_.jsx)("span", {
|
|
16950
|
+
className: 'cell-text-description',
|
|
16951
|
+
children: description
|
|
16952
|
+
})]
|
|
16953
|
+
}));
|
|
16954
|
+
});
|
|
16955
|
+
TableCellText.displayName = 'TableCellText';
|
|
16956
|
+
var TableHoverActions = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16957
|
+
var className = props.className,
|
|
16958
|
+
restProps = __rest(props, ["className"]);
|
|
16959
|
+
return (0,jsx_runtime_.jsx)("span", __assign({
|
|
16960
|
+
ref: ref,
|
|
16961
|
+
className: (0,classNames/* classNames */.x)('nuri-theme base-table hover-actions', className)
|
|
16962
|
+
}, restProps));
|
|
16963
|
+
});
|
|
16964
|
+
TableHoverActions.displayName = 'TableHoverActions';
|
|
15690
16965
|
var TableRoot = Object.assign(TableRootBase, {
|
|
15691
16966
|
Header: TableHeader,
|
|
15692
16967
|
Body: TableBody,
|
|
15693
16968
|
Row: TableRow,
|
|
15694
|
-
Cell: TableCell
|
|
16969
|
+
Cell: TableCell,
|
|
16970
|
+
CellText: TableCellText,
|
|
16971
|
+
HoverActions: TableHoverActions
|
|
15695
16972
|
});
|
|
15696
16973
|
/* harmony default export */ const base_table = (TableRoot);
|
|
15697
16974
|
;// ./components/table/table-props.ts
|
|
@@ -15707,12 +16984,22 @@ var table_props_assign = undefined && undefined.__assign || function () {
|
|
|
15707
16984
|
};
|
|
15708
16985
|
var dataTableCommonProps = {};
|
|
15709
16986
|
var variants = ['plain', 'padded'];
|
|
16987
|
+
/** 머리 행 바탕. tinted 는 회색 머리(토스 목록 표) */
|
|
16988
|
+
var headerVariants = ['plain', 'tinted'];
|
|
16989
|
+
/** 열 정렬. 숫자·금액 열은 end */
|
|
16990
|
+
var aligns = (/* unused pure expression or super */ null && (['start', 'center', 'end']));
|
|
15710
16991
|
var dataTableProps = {
|
|
15711
16992
|
variant: {
|
|
15712
16993
|
type: 'className',
|
|
15713
16994
|
className: 'variant',
|
|
15714
16995
|
values: variants,
|
|
15715
16996
|
"default": 'plain'
|
|
16997
|
+
},
|
|
16998
|
+
headerVariant: {
|
|
16999
|
+
type: 'className',
|
|
17000
|
+
className: 'header',
|
|
17001
|
+
values: headerVariants,
|
|
17002
|
+
"default": 'plain'
|
|
15716
17003
|
}
|
|
15717
17004
|
};
|
|
15718
17005
|
var dataTableHeaderProps = table_props_assign(table_props_assign({}, dataTableCommonProps), {
|
|
@@ -15746,6 +17033,17 @@ var data_table_assign = undefined && undefined.__assign || function () {
|
|
|
15746
17033
|
};
|
|
15747
17034
|
return data_table_assign.apply(this, arguments);
|
|
15748
17035
|
};
|
|
17036
|
+
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
|
|
17037
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
17038
|
+
if (ar || !(i in from)) {
|
|
17039
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17040
|
+
ar[i] = from[i];
|
|
17041
|
+
}
|
|
17042
|
+
}
|
|
17043
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17044
|
+
};
|
|
17045
|
+
|
|
17046
|
+
|
|
15749
17047
|
|
|
15750
17048
|
|
|
15751
17049
|
|
|
@@ -15753,15 +17051,66 @@ var data_table_assign = undefined && undefined.__assign || function () {
|
|
|
15753
17051
|
|
|
15754
17052
|
|
|
15755
17053
|
|
|
17054
|
+
|
|
17055
|
+
|
|
17056
|
+
var ALIGN_CLASS_NAME = {
|
|
17057
|
+
start: undefined,
|
|
17058
|
+
center: 'align-center',
|
|
17059
|
+
end: 'align-end'
|
|
17060
|
+
};
|
|
17061
|
+
/** 고정 열(.fixed·.fixed-end)에 앞(뒤) 고정 칸 너비의 합을 left(right)로 준다. 칸 폭은 내용이 정해 렌더 뒤에만 안다 */
|
|
17062
|
+
var pinStickyCells = function pinStickyCells(table) {
|
|
17063
|
+
for (var _i = 0, _a = Array.from(table.rows); _i < _a.length; _i++) {
|
|
17064
|
+
var row = _a[_i];
|
|
17065
|
+
var cells = Array.from(row.cells);
|
|
17066
|
+
var left = 0;
|
|
17067
|
+
for (var _b = 0, cells_1 = cells; _b < cells_1.length; _b++) {
|
|
17068
|
+
var cell = cells_1[_b];
|
|
17069
|
+
if (!cell.classList.contains('fixed')) continue;
|
|
17070
|
+
cell.style.left = left + 'px';
|
|
17071
|
+
left += cell.offsetWidth;
|
|
17072
|
+
}
|
|
17073
|
+
var right = 0;
|
|
17074
|
+
for (var _c = 0, _d = cells.reverse(); _c < _d.length; _c++) {
|
|
17075
|
+
var cell = _d[_c];
|
|
17076
|
+
if (!cell.classList.contains('fixed-end')) continue;
|
|
17077
|
+
cell.style.right = right + 'px';
|
|
17078
|
+
right += cell.offsetWidth;
|
|
17079
|
+
}
|
|
17080
|
+
}
|
|
17081
|
+
};
|
|
17082
|
+
/**
|
|
17083
|
+
* 가려진 쪽이 있을 때만 고정 열 경계 그림자를 그리도록 감싸개에 표시한다. 스크롤마다 다시 그리지 않게 DOM 에 직접 단다.
|
|
17084
|
+
* 보이는 폭은 빈 결과 문구를 화면 안 가운데에 두는 데 쓴다
|
|
17085
|
+
*/
|
|
17086
|
+
var syncScrollEdges = function syncScrollEdges(scroller) {
|
|
17087
|
+
scroller.style.setProperty('--data-table-scroll-width', scroller.clientWidth + 'px');
|
|
17088
|
+
var hiddenEnd = scroller.scrollWidth - scroller.clientWidth - scroller.scrollLeft;
|
|
17089
|
+
scroller.toggleAttribute('data-overflow-start', scroller.scrollLeft >= 1);
|
|
17090
|
+
scroller.toggleAttribute('data-overflow-end', hiddenEnd >= 1);
|
|
17091
|
+
};
|
|
17092
|
+
var headerName = function headerName(item) {
|
|
17093
|
+
return typeof item.value === 'string' ? item.value : '열';
|
|
17094
|
+
};
|
|
15756
17095
|
var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
15757
17096
|
var rows = props.rows,
|
|
15758
17097
|
columns = props.columns,
|
|
15759
17098
|
_a = props.fixedRowsIndex,
|
|
15760
17099
|
fixedRowsIndex = _a === void 0 ? 0 : _a,
|
|
17100
|
+
_b = props.fixedEndRowsCount,
|
|
17101
|
+
fixedEndRowsCount = _b === void 0 ? 0 : _b,
|
|
17102
|
+
_c = props.scrollX,
|
|
17103
|
+
scrollX = _c === void 0 ? false : _c,
|
|
17104
|
+
_d = props.selectable,
|
|
17105
|
+
selectable = _d === void 0 ? false : _d,
|
|
17106
|
+
selectedRowIds = props.selectedRowIds,
|
|
17107
|
+
defaultSelectedRowIds = props.defaultSelectedRowIds,
|
|
17108
|
+
onSelectedRowIdsChange = props.onSelectedRowIdsChange,
|
|
17109
|
+
empty = props.empty,
|
|
15761
17110
|
track = props.track,
|
|
15762
17111
|
trackProps = props.trackProps,
|
|
15763
|
-
|
|
15764
|
-
pressEffect =
|
|
17112
|
+
_e = props.pressEffect,
|
|
17113
|
+
pressEffect = _e === void 0 ? true : _e;
|
|
15765
17114
|
var emit = (0,useTrack/* useTrack */.n)('DataTable', {
|
|
15766
17115
|
track: track,
|
|
15767
17116
|
trackProps: trackProps
|
|
@@ -15770,6 +17119,67 @@ var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
15770
17119
|
var headerStyle = (0,getMergedProps/* getMergedProps */.p)(props, dataTableHeaderProps).style;
|
|
15771
17120
|
var rowStyle = (0,getMergedProps/* getMergedProps */.p)(props, dataTableRowProps).style;
|
|
15772
17121
|
var cellStyle = (0,getMergedProps/* getMergedProps */.p)(props, dataTableCellProps).style;
|
|
17122
|
+
var baseId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
17123
|
+
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)(null);
|
|
17124
|
+
var _f = (0,useExternalState/* useExternalState */.C)({
|
|
17125
|
+
prop: selectedRowIds,
|
|
17126
|
+
handler: onSelectedRowIdsChange,
|
|
17127
|
+
defaultProp: defaultSelectedRowIds !== null && defaultSelectedRowIds !== void 0 ? defaultSelectedRowIds : []
|
|
17128
|
+
}),
|
|
17129
|
+
selectedIds = _f[0],
|
|
17130
|
+
setSelectedIds = _f[1];
|
|
17131
|
+
var rowIdOf = function rowIdOf(column, index) {
|
|
17132
|
+
var _a;
|
|
17133
|
+
return (_a = column.rowId) !== null && _a !== void 0 ? _a : String(index);
|
|
17134
|
+
};
|
|
17135
|
+
var selectableIds = columns.flatMap(function (column, index) {
|
|
17136
|
+
return column.rowDisabled ? [] : [rowIdOf(column, index)];
|
|
17137
|
+
});
|
|
17138
|
+
var selectedCount = selectableIds.filter(function (id) {
|
|
17139
|
+
return selectedIds.includes(id);
|
|
17140
|
+
}).length;
|
|
17141
|
+
var allSelected = selectableIds.length > 0 && selectedCount === selectableIds.length;
|
|
17142
|
+
var toggleAll = function toggleAll(checked) {
|
|
17143
|
+
emit('change', 'all');
|
|
17144
|
+
setSelectedIds(checked ? __spreadArray(__spreadArray([], selectedIds, true), selectableIds.filter(function (id) {
|
|
17145
|
+
return !selectedIds.includes(id);
|
|
17146
|
+
}), true) : selectedIds.filter(function (id) {
|
|
17147
|
+
return !selectableIds.includes(id);
|
|
17148
|
+
}));
|
|
17149
|
+
};
|
|
17150
|
+
var toggleRow = function toggleRow(rowId, checked) {
|
|
17151
|
+
emit('change', rowId);
|
|
17152
|
+
setSelectedIds(checked ? __spreadArray(__spreadArray([], selectedIds, true), [rowId], false) : selectedIds.filter(function (id) {
|
|
17153
|
+
return id !== rowId;
|
|
17154
|
+
}));
|
|
17155
|
+
};
|
|
17156
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useLayoutEffect)(function () {
|
|
17157
|
+
var scroller = scrollRef.current;
|
|
17158
|
+
if (!scroller) return;
|
|
17159
|
+
pinStickyCells(scroller.firstElementChild);
|
|
17160
|
+
syncScrollEdges(scroller);
|
|
17161
|
+
});
|
|
17162
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useEffect)(function () {
|
|
17163
|
+
var scroller = scrollRef.current;
|
|
17164
|
+
if (!scroller) return undefined;
|
|
17165
|
+
var table = scroller.firstElementChild;
|
|
17166
|
+
var onScroll = function onScroll() {
|
|
17167
|
+
return syncScrollEdges(scroller);
|
|
17168
|
+
};
|
|
17169
|
+
var observer = new ResizeObserver(function () {
|
|
17170
|
+
pinStickyCells(table);
|
|
17171
|
+
syncScrollEdges(scroller);
|
|
17172
|
+
});
|
|
17173
|
+
observer.observe(scroller);
|
|
17174
|
+
observer.observe(table);
|
|
17175
|
+
scroller.addEventListener('scroll', onScroll, {
|
|
17176
|
+
passive: true
|
|
17177
|
+
});
|
|
17178
|
+
return function () {
|
|
17179
|
+
observer.disconnect();
|
|
17180
|
+
scroller.removeEventListener('scroll', onScroll);
|
|
17181
|
+
};
|
|
17182
|
+
}, []);
|
|
15773
17183
|
var widthStyle = function widthStyle(item) {
|
|
15774
17184
|
return item.width == null ? undefined : {
|
|
15775
17185
|
width: item.width
|
|
@@ -15778,72 +17188,110 @@ var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
15778
17188
|
var bodyCellStyle = function bodyCellStyle(item) {
|
|
15779
17189
|
return data_table_assign(data_table_assign({}, cellStyle), widthStyle(item));
|
|
15780
17190
|
};
|
|
15781
|
-
var
|
|
15782
|
-
|
|
17191
|
+
var fixedEndStart = rows.length - fixedEndRowsCount;
|
|
17192
|
+
var columnClassName = function columnClassName(item, index) {
|
|
17193
|
+
var _a;
|
|
17194
|
+
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
17195
|
};
|
|
15784
|
-
|
|
17196
|
+
var selectCellClassName = (0,classNames/* classNames */.x)('data-table-select', fixedRowsIndex > 0 && 'fixed');
|
|
17197
|
+
var columnCount = rows.length + (selectable ? 1 : 0);
|
|
17198
|
+
// 넓은 화면은 scrollX 일 때만, 좁은 화면은 늘 이 감싸개 안에서 가로로 스크롤한다. ref·className 은 표에 둔다
|
|
15785
17199
|
return (0,jsx_runtime_.jsx)("div", {
|
|
15786
|
-
|
|
17200
|
+
ref: scrollRef,
|
|
17201
|
+
className: (0,classNames/* classNames */.x)('data-table-scroll', scrollX && 'scroll-x'),
|
|
15787
17202
|
children: (0,jsx_runtime_.jsxs)(base_table, {
|
|
15788
17203
|
ref: ref,
|
|
15789
17204
|
className: (0,classNames/* classNames */.x)('data-table', className),
|
|
15790
17205
|
children: [(0,jsx_runtime_.jsx)(base_table.Header, {
|
|
15791
17206
|
className: 'data-table-header',
|
|
15792
17207
|
style: headerStyle,
|
|
15793
|
-
children: (0,jsx_runtime_.
|
|
17208
|
+
children: (0,jsx_runtime_.jsxs)(base_table.Row, {
|
|
15794
17209
|
className: 'data-table-row',
|
|
15795
17210
|
style: headerStyle,
|
|
15796
|
-
children:
|
|
17211
|
+
children: [selectable && (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
17212
|
+
className: selectCellClassName,
|
|
17213
|
+
children: (0,jsx_runtime_.jsx)(check_box/* default */.A, {
|
|
17214
|
+
id: baseId + '-all',
|
|
17215
|
+
size: 's',
|
|
17216
|
+
label: null,
|
|
17217
|
+
"aria-label": "\uC804\uCCB4 \uC120\uD0DD",
|
|
17218
|
+
checked: allSelected,
|
|
17219
|
+
indeterminate: selectedCount > 0 && !allSelected,
|
|
17220
|
+
disabled: selectableIds.length === 0,
|
|
17221
|
+
onChange: toggleAll
|
|
17222
|
+
})
|
|
17223
|
+
}), rows.map(function (item, index) {
|
|
15797
17224
|
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'),
|
|
17225
|
+
className: (0,classNames/* classNames */.x)(columnClassName(item, index), pressEffect && item.onClickRow && 'motion-press-dim'),
|
|
15812
17226
|
style: widthStyle(item),
|
|
15813
17227
|
onClick: function onClick() {
|
|
15814
17228
|
if (!item.onClickRow) return;
|
|
15815
17229
|
emit('click', item.id);
|
|
15816
17230
|
item.onClickRow(item.id);
|
|
15817
17231
|
},
|
|
15818
|
-
children: item.value
|
|
17232
|
+
children: item.info == null ? item.value : (0,jsx_runtime_.jsxs)("span", {
|
|
17233
|
+
className: 'data-table-header-label',
|
|
17234
|
+
children: [item.value, (0,jsx_runtime_.jsx)(tooltip/* default */.A, {
|
|
17235
|
+
direction: 'top',
|
|
17236
|
+
content: item.info,
|
|
17237
|
+
trigger: (0,jsx_runtime_.jsx)("button", {
|
|
17238
|
+
type: 'button',
|
|
17239
|
+
className: 'data-table-header-info',
|
|
17240
|
+
"aria-label": headerName(item) + ' 설명',
|
|
17241
|
+
// ⓘ 를 눌러도 머리 칸의 onClickRow(정렬 등)가 불리지 않게 한다
|
|
17242
|
+
onClick: function onClick(event) {
|
|
17243
|
+
return event.stopPropagation();
|
|
17244
|
+
},
|
|
17245
|
+
children: (0,jsx_runtime_.jsx)(icon/* default */.A, {
|
|
17246
|
+
name: 'info',
|
|
17247
|
+
size: 'xs'
|
|
17248
|
+
})
|
|
17249
|
+
})
|
|
17250
|
+
})]
|
|
17251
|
+
})
|
|
15819
17252
|
}, item.id);
|
|
15820
|
-
})
|
|
17253
|
+
})]
|
|
15821
17254
|
})
|
|
15822
|
-
}), (0,jsx_runtime_.
|
|
17255
|
+
}), (0,jsx_runtime_.jsxs)(base_table.Body, {
|
|
15823
17256
|
className: 'data-table',
|
|
15824
|
-
children: columns.
|
|
17257
|
+
children: [columns.length === 0 && empty != null && (0,jsx_runtime_.jsx)(base_table.Row, {
|
|
17258
|
+
className: 'data-table-row data-table-empty-row',
|
|
17259
|
+
children: (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
17260
|
+
className: 'data-table-empty',
|
|
17261
|
+
colSpan: columnCount,
|
|
17262
|
+
children: (0,jsx_runtime_.jsx)("span", {
|
|
17263
|
+
className: 'data-table-empty-message',
|
|
17264
|
+
children: empty
|
|
17265
|
+
})
|
|
17266
|
+
})
|
|
17267
|
+
}), columns.map(function (column, columnIndex) {
|
|
17268
|
+
var _a, _b;
|
|
15825
17269
|
var columnKey = Object.keys(column).join('__');
|
|
15826
|
-
|
|
17270
|
+
var rowId = rowIdOf(column, columnIndex);
|
|
17271
|
+
var selected = selectedIds.includes(rowId);
|
|
17272
|
+
return (0,jsx_runtime_.jsxs)(base_table.Row, {
|
|
15827
17273
|
className: 'data-table-row',
|
|
15828
17274
|
style: rowStyle,
|
|
15829
|
-
|
|
17275
|
+
"data-state": selectable ? selected ? 'selected' : 'unselected' : undefined,
|
|
17276
|
+
"data-disabled": column.rowDisabled || undefined,
|
|
17277
|
+
children: [selectable && (0,jsx_runtime_.jsx)(base_table.Cell, {
|
|
17278
|
+
className: selectCellClassName,
|
|
17279
|
+
children: (0,jsx_runtime_.jsx)(check_box/* default */.A, {
|
|
17280
|
+
id: baseId + '-row-' + rowId,
|
|
17281
|
+
size: 's',
|
|
17282
|
+
label: null,
|
|
17283
|
+
"aria-label": ((_a = column.rowLabel) !== null && _a !== void 0 ? _a : columnIndex + 1 + '번째 행') + ' 선택',
|
|
17284
|
+
checked: selected,
|
|
17285
|
+
disabled: column.rowDisabled,
|
|
17286
|
+
onChange: function onChange(checked) {
|
|
17287
|
+
return toggleRow(rowId, checked);
|
|
17288
|
+
}
|
|
17289
|
+
})
|
|
17290
|
+
}), rows.map(function (item, i) {
|
|
15830
17291
|
var cellData = column[item.id];
|
|
15831
17292
|
var cellValue = cellData === null || cellData === void 0 ? void 0 : cellData.value;
|
|
15832
17293
|
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'),
|
|
17294
|
+
className: (0,classNames/* classNames */.x)(columnClassName(item, i), pressEffect && (cellData === null || cellData === void 0 ? void 0 : cellData.onClickCell) && 'motion-press-dim'),
|
|
15847
17295
|
"data-id": item.id,
|
|
15848
17296
|
onClick: function onClick() {
|
|
15849
17297
|
var _a;
|
|
@@ -15852,16 +17300,20 @@ var DataTableBase = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs
|
|
|
15852
17300
|
style: bodyCellStyle(item),
|
|
15853
17301
|
children: typeof cellValue === 'function' ? cellValue(item) : cellValue
|
|
15854
17302
|
}, "".concat(columnKey, "__").concat(item.id));
|
|
15855
|
-
})
|
|
15856
|
-
}, "column__".concat(columnKey, "__").concat(columnIndex));
|
|
15857
|
-
})
|
|
17303
|
+
})]
|
|
17304
|
+
}, (_b = column.rowId) !== null && _b !== void 0 ? _b : "column__".concat(columnKey, "__").concat(columnIndex));
|
|
17305
|
+
})]
|
|
15858
17306
|
})]
|
|
15859
17307
|
})
|
|
15860
17308
|
});
|
|
15861
17309
|
});
|
|
15862
17310
|
DataTableBase.displayName = 'DataTable';
|
|
15863
17311
|
// forwardRef 는 제네릭을 잃는다. rows 의 id 로 columns 키를 좁히는 타입을 되살린다.
|
|
15864
|
-
var
|
|
17312
|
+
var DataTableGeneric = DataTableBase;
|
|
17313
|
+
var DataTable = Object.assign(DataTableGeneric, {
|
|
17314
|
+
CellText: base_table.CellText,
|
|
17315
|
+
HoverActions: base_table.HoverActions
|
|
17316
|
+
});
|
|
15865
17317
|
/* harmony default export */ const data_table = (DataTable);
|
|
15866
17318
|
|
|
15867
17319
|
/***/ },
|
|
@@ -16267,10 +17719,10 @@ var useTrack = __nuri_require__(4560);
|
|
|
16267
17719
|
var classNames = __nuri_require__(3274);
|
|
16268
17720
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
16269
17721
|
var getMergedProps = __nuri_require__(7335);
|
|
17722
|
+
// EXTERNAL MODULE: ./components/form-field/form-field-context.ts
|
|
17723
|
+
var form_field_context = __nuri_require__(7187);
|
|
16270
17724
|
// EXTERNAL MODULE: ./components/icon/icon.tsx
|
|
16271
17725
|
var icon = __nuri_require__(3547);
|
|
16272
|
-
// EXTERNAL MODULE: ./components/elements/text/text.tsx
|
|
16273
|
-
var text_text = __nuri_require__(7739);
|
|
16274
17726
|
;// ./components/text-area/base-text-area.tsx
|
|
16275
17727
|
var __assign = undefined && undefined.__assign || function () {
|
|
16276
17728
|
__assign = Object.assign || function (t) {
|
|
@@ -16293,7 +17745,6 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16293
17745
|
|
|
16294
17746
|
|
|
16295
17747
|
|
|
16296
|
-
|
|
16297
17748
|
var TextAreaContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.createContext)({
|
|
16298
17749
|
onChange: function onChange() {}
|
|
16299
17750
|
});
|
|
@@ -16318,14 +17769,14 @@ var TextAreaRootBase = function TextAreaRootBase(props) {
|
|
|
16318
17769
|
TextAreaRootBase.displayName = 'TextAreaRoot';
|
|
16319
17770
|
var TextAreaLabel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16320
17771
|
var text = props.text,
|
|
16321
|
-
className = props.className
|
|
16322
|
-
|
|
17772
|
+
className = props.className,
|
|
17773
|
+
htmlFor = props.htmlFor;
|
|
17774
|
+
return (0,jsx_runtime_.jsx)("label", {
|
|
16323
17775
|
ref: ref,
|
|
16324
17776
|
className: (0,classNames/* classNames */.x)('nuri-theme base-text-area label', className),
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
}) : text;
|
|
17777
|
+
htmlFor: htmlFor,
|
|
17778
|
+
children: text
|
|
17779
|
+
});
|
|
16329
17780
|
});
|
|
16330
17781
|
TextAreaLabel.displayName = 'TextAreaLabel';
|
|
16331
17782
|
var TextAreaTextarea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
@@ -16366,16 +17817,17 @@ var TextAreaAction = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonj
|
|
|
16366
17817
|
}));
|
|
16367
17818
|
});
|
|
16368
17819
|
TextAreaAction.displayName = 'TextAreaAction';
|
|
17820
|
+
// 노드를 넘겨도 감싸서 id 를 단다. textarea 의 aria-describedby 가 이 id 를 가리킨다
|
|
16369
17821
|
var TextAreaHelperText = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
|
|
16370
17822
|
var text = props.text,
|
|
16371
|
-
className = props.className
|
|
16372
|
-
|
|
17823
|
+
className = props.className,
|
|
17824
|
+
id = props.id;
|
|
17825
|
+
return (0,jsx_runtime_.jsx)("div", {
|
|
16373
17826
|
ref: ref,
|
|
16374
17827
|
className: (0,classNames/* classNames */.x)('nuri-theme base-text-area helper-text', className),
|
|
16375
|
-
|
|
16376
|
-
|
|
16377
|
-
|
|
16378
|
-
}) : text;
|
|
17828
|
+
id: id,
|
|
17829
|
+
children: text
|
|
17830
|
+
});
|
|
16379
17831
|
});
|
|
16380
17832
|
TextAreaHelperText.displayName = 'TextAreaHelperText';
|
|
16381
17833
|
var TextAreaRoot = Object.assign(TextAreaRootBase, {
|
|
@@ -16387,10 +17839,15 @@ var TextAreaRoot = Object.assign(TextAreaRootBase, {
|
|
|
16387
17839
|
/* harmony default export */ const base_text_area = (TextAreaRoot);
|
|
16388
17840
|
// EXTERNAL MODULE: ./helpers/props/common-props.ts
|
|
16389
17841
|
var common_props = __nuri_require__(7298);
|
|
17842
|
+
// EXTERNAL MODULE: ./components/text-field/text-field-props.ts
|
|
17843
|
+
var text_field_props = __nuri_require__(244);
|
|
16390
17844
|
;// ./components/text-area/text-area-props.ts
|
|
16391
17845
|
|
|
17846
|
+
|
|
16392
17847
|
var sizes = ['s', 'm'];
|
|
16393
17848
|
var resize = ['none', 'vertical'];
|
|
17849
|
+
/** TextField 와 같다. outline 은 흰 바탕에 회색 선(기본), fill 은 선 없는 연회색 면 */
|
|
17850
|
+
|
|
16394
17851
|
var textAreaProps = {
|
|
16395
17852
|
size: (0,common_props/* sizeProp */.lw)(sizes, 's'),
|
|
16396
17853
|
width: (0,common_props/* widthProp */.Iw)('100%'),
|
|
@@ -16399,7 +17856,8 @@ var textAreaProps = {
|
|
|
16399
17856
|
className: 'resize',
|
|
16400
17857
|
values: resize,
|
|
16401
17858
|
"default": 'vertical'
|
|
16402
|
-
}
|
|
17859
|
+
},
|
|
17860
|
+
variant: text_field_props/* textFieldProps */.gx.variant
|
|
16403
17861
|
};
|
|
16404
17862
|
;// ./components/text-area/text-area.tsx
|
|
16405
17863
|
var text_area_assign = undefined && undefined.__assign || function () {
|
|
@@ -16429,42 +17887,57 @@ var text_area_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16429
17887
|
|
|
16430
17888
|
|
|
16431
17889
|
|
|
17890
|
+
|
|
16432
17891
|
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
|
-
|
|
17892
|
+
var _a;
|
|
17893
|
+
var _b = (0,getMergedProps/* getMergedProps */.p)(props, textAreaProps),
|
|
17894
|
+
className = _b.className,
|
|
17895
|
+
style = _b.style,
|
|
17896
|
+
title = _b.title,
|
|
17897
|
+
value = _b.value,
|
|
17898
|
+
onChange = _b.onChange,
|
|
17899
|
+
defaultValue = _b.defaultValue,
|
|
17900
|
+
helperText = _b.helperText,
|
|
17901
|
+
isErrorProp = _b.isError,
|
|
17902
|
+
showCount = _b.showCount,
|
|
17903
|
+
maxLength = _b.maxLength,
|
|
17904
|
+
required = _b.required,
|
|
17905
|
+
id = _b.id,
|
|
17906
|
+
ariaDescribedBy = _b["aria-describedby"],
|
|
17907
|
+
clearable = _b.clearable,
|
|
17908
|
+
onClear = _b.onClear,
|
|
17909
|
+
disabled = _b.disabled,
|
|
17910
|
+
readOnly = _b.readOnly,
|
|
17911
|
+
_onFocus = _b.onFocus,
|
|
17912
|
+
_onBlur = _b.onBlur,
|
|
17913
|
+
track = _b.track,
|
|
17914
|
+
trackProps = _b.trackProps,
|
|
17915
|
+
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
17916
|
var emit = (0,useTrack/* useTrack */.n)('TextArea', {
|
|
16452
17917
|
track: track,
|
|
16453
17918
|
trackProps: trackProps
|
|
16454
17919
|
});
|
|
16455
17920
|
var focusedValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
|
|
16456
|
-
var
|
|
16457
|
-
innerValue =
|
|
16458
|
-
setInnerValue =
|
|
17921
|
+
var _c = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : ''),
|
|
17922
|
+
innerValue = _c[0],
|
|
17923
|
+
setInnerValue = _c[1];
|
|
16459
17924
|
var currentValue = value !== null && value !== void 0 ? value : innerValue;
|
|
16460
|
-
var
|
|
16461
|
-
fieldRef =
|
|
16462
|
-
engaged =
|
|
16463
|
-
wrapperProps =
|
|
16464
|
-
clearProps =
|
|
17925
|
+
var _d = (0,useFieldClear/* useFieldClear */.h)(onClear),
|
|
17926
|
+
fieldRef = _d.fieldRef,
|
|
17927
|
+
engaged = _d.engaged,
|
|
17928
|
+
wrapperProps = _d.wrapperProps,
|
|
17929
|
+
clearProps = _d.clearProps;
|
|
16465
17930
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useImperativeHandle)(ref, function () {
|
|
16466
17931
|
return fieldRef.current;
|
|
16467
17932
|
});
|
|
17933
|
+
var autoId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useId)();
|
|
17934
|
+
// 제 라벨(title)이 없을 때만 둘레 FormField 의 라벨·도움말·오류에 잇는다
|
|
17935
|
+
var formField = (0,form_field_context/* useFormFieldControl */.j8)();
|
|
17936
|
+
var field = title ? null : formField;
|
|
17937
|
+
var textareaId = (_a = id !== null && id !== void 0 ? id : field === null || field === void 0 ? void 0 : field.id) !== null && _a !== void 0 ? _a : autoId;
|
|
17938
|
+
var helperId = "".concat(textareaId, "-helper");
|
|
17939
|
+
var describedBy = (0,form_field_context/* joinIds */.VS)(ariaDescribedBy, field === null || field === void 0 ? void 0 : field.describedBy, helperText ? helperId : false);
|
|
17940
|
+
var isError = isErrorProp || (field === null || field === void 0 ? void 0 : field.invalid);
|
|
16468
17941
|
var handleChange = function handleChange(e) {
|
|
16469
17942
|
if (value === undefined) setInnerValue(e.target.value);
|
|
16470
17943
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
@@ -16478,16 +17951,27 @@ var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
16478
17951
|
className: 'text-area',
|
|
16479
17952
|
children: [title && (0,jsx_runtime_.jsx)(base_text_area.Label, {
|
|
16480
17953
|
className: 'text-area-title',
|
|
16481
|
-
|
|
17954
|
+
htmlFor: textareaId,
|
|
17955
|
+
text: (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
17956
|
+
children: [title, required && (0,jsx_runtime_.jsx)("span", {
|
|
17957
|
+
className: 'nuri-required-dot',
|
|
17958
|
+
"aria-hidden": 'true'
|
|
17959
|
+
})]
|
|
17960
|
+
})
|
|
16482
17961
|
}), (0,jsx_runtime_.jsxs)("div", text_area_assign({
|
|
16483
17962
|
className: (0,classNames/* classNames */.x)('nuri-theme text-area-input-wrapper', isError && 'error', className),
|
|
16484
17963
|
style: style
|
|
16485
17964
|
}, wrapperProps, {
|
|
16486
17965
|
children: [(0,jsx_runtime_.jsx)(base_text_area.Textarea, text_area_assign({
|
|
16487
17966
|
ref: fieldRef,
|
|
17967
|
+
id: textareaId,
|
|
17968
|
+
maxLength: maxLength,
|
|
17969
|
+
required: required,
|
|
16488
17970
|
disabled: disabled,
|
|
16489
17971
|
readOnly: readOnly,
|
|
16490
17972
|
"aria-invalid": isError || undefined,
|
|
17973
|
+
"aria-required": !required && (field === null || field === void 0 ? void 0 : field.required) || undefined,
|
|
17974
|
+
"aria-describedby": describedBy,
|
|
16491
17975
|
onFocus: function onFocus(e) {
|
|
16492
17976
|
// uncontrolled 면 ref 로 바뀐 값(react-hook-form)을 여기서 읽어 지우기 버튼에 맞춘다
|
|
16493
17977
|
if (value === undefined) setInnerValue(e.target.value);
|
|
@@ -16506,9 +17990,16 @@ var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
|
|
|
16506
17990
|
name: 'x',
|
|
16507
17991
|
size: 's'
|
|
16508
17992
|
})
|
|
16509
|
-
}))
|
|
17993
|
+
})), showCount && maxLength !== undefined &&
|
|
17994
|
+
// 칠 때마다 숫자를 읽지 않게 숨긴다. 제한은 textarea 의 maxLength 가 맡는다
|
|
17995
|
+
(0,jsx_runtime_.jsxs)("span", {
|
|
17996
|
+
className: 'text-area-count',
|
|
17997
|
+
"aria-hidden": 'true',
|
|
17998
|
+
children: [currentValue.length, "/", maxLength]
|
|
17999
|
+
})]
|
|
16510
18000
|
})), helperText && (0,jsx_runtime_.jsx)(base_text_area.HelperText, {
|
|
16511
18001
|
className: (0,classNames/* classNames */.x)('text-area-helper-text', isError && 'error'),
|
|
18002
|
+
id: helperId,
|
|
16512
18003
|
text: helperText
|
|
16513
18004
|
})]
|
|
16514
18005
|
})
|
|
@@ -16654,8 +18145,8 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16654
18145
|
|
|
16655
18146
|
|
|
16656
18147
|
|
|
16657
|
-
// 글자 크기마다
|
|
16658
|
-
var
|
|
18148
|
+
// 글자 크기마다 아이콘·화살표 크기. 글자(sm 14·base 16·lg 18)보다 조금 작게 둔다
|
|
18149
|
+
var ICON_SIZE = {
|
|
16659
18150
|
s: 'xs',
|
|
16660
18151
|
m: 's',
|
|
16661
18152
|
l: 'm'
|
|
@@ -16666,6 +18157,8 @@ var TextButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(
|
|
|
16666
18157
|
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _text_button_props__WEBPACK_IMPORTED_MODULE_8__/* .textButtonProps */ .GY),
|
|
16667
18158
|
className = _b.className,
|
|
16668
18159
|
text = _b.text,
|
|
18160
|
+
leftIcon = _b.leftIcon,
|
|
18161
|
+
rightIcon = _b.rightIcon,
|
|
16669
18162
|
asChild = _b.asChild,
|
|
16670
18163
|
children = _b.children,
|
|
16671
18164
|
_onClick = _b.onClick,
|
|
@@ -16673,16 +18166,21 @@ var TextButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(
|
|
|
16673
18166
|
pressEffect = _c === void 0 ? true : _c,
|
|
16674
18167
|
track = _b.track,
|
|
16675
18168
|
trackProps = _b.trackProps,
|
|
16676
|
-
restProps = __rest(_b, ["className", "text", "asChild", "children", "onClick", "pressEffect", "track", "trackProps"]);
|
|
18169
|
+
restProps = __rest(_b, ["className", "text", "leftIcon", "rightIcon", "asChild", "children", "onClick", "pressEffect", "track", "trackProps"]);
|
|
16677
18170
|
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__/* .useTrack */ .n)('TextButton', {
|
|
16678
18171
|
track: track,
|
|
16679
18172
|
trackProps: trackProps
|
|
16680
18173
|
});
|
|
18174
|
+
var iconSize = ICON_SIZE[(_a = props.size) !== null && _a !== void 0 ? _a : _text_button_props__WEBPACK_IMPORTED_MODULE_8__/* .defaultSize */ .R7];
|
|
18175
|
+
var endIcon = rightIcon !== null && rightIcon !== void 0 ? rightIcon : props.variant === 'arrow' ? 'caret-right' : undefined;
|
|
16681
18176
|
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
|
-
})
|
|
18177
|
+
children: [leftIcon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
18178
|
+
name: leftIcon,
|
|
18179
|
+
size: iconSize
|
|
18180
|
+
}), text, endIcon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {
|
|
18181
|
+
name: endIcon,
|
|
18182
|
+
size: iconSize
|
|
18183
|
+
})]
|
|
16686
18184
|
});
|
|
16687
18185
|
var link = (0,_helpers_utils_fillLinkChild__WEBPACK_IMPORTED_MODULE_4__/* .fillLinkChild */ .Q)(asChild, children, content);
|
|
16688
18186
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, __assign({
|
|
@@ -16713,7 +18211,6 @@ TextButton.displayName = 'TextButton';
|
|
|
16713
18211
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
16714
18212
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
16715
18213
|
/* 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
18214
|
var __assign = undefined && undefined.__assign || function () {
|
|
16718
18215
|
__assign = Object.assign || function (t) {
|
|
16719
18216
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -16735,7 +18232,6 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16735
18232
|
|
|
16736
18233
|
|
|
16737
18234
|
|
|
16738
|
-
|
|
16739
18235
|
var identity = function identity(text) {
|
|
16740
18236
|
return text;
|
|
16741
18237
|
};
|
|
@@ -16774,14 +18270,16 @@ var TextFieldRootBase = function TextFieldRootBase(props) {
|
|
|
16774
18270
|
TextFieldRootBase.displayName = 'TextFieldRoot';
|
|
16775
18271
|
var TextFieldLabel = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16776
18272
|
var text = props.text,
|
|
16777
|
-
className = props.className
|
|
16778
|
-
|
|
18273
|
+
className = props.className,
|
|
18274
|
+
htmlFor = props.htmlFor,
|
|
18275
|
+
id = props.id;
|
|
18276
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", {
|
|
16779
18277
|
ref: ref,
|
|
16780
18278
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-text-field label', className),
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
})
|
|
18279
|
+
htmlFor: htmlFor,
|
|
18280
|
+
id: id,
|
|
18281
|
+
children: text
|
|
18282
|
+
});
|
|
16785
18283
|
});
|
|
16786
18284
|
TextFieldLabel.displayName = 'TextFieldLabel';
|
|
16787
18285
|
var TextFieldInput = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
@@ -16840,16 +18338,17 @@ var TextFieldAction = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forward
|
|
|
16840
18338
|
}));
|
|
16841
18339
|
});
|
|
16842
18340
|
TextFieldAction.displayName = 'TextFieldAction';
|
|
18341
|
+
// 노드를 넘겨도 감싸서 id 를 단다. input 의 aria-describedby 가 이 id 를 가리킨다
|
|
16843
18342
|
var TextFieldHelperText = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
16844
18343
|
var text = props.text,
|
|
16845
|
-
className = props.className
|
|
16846
|
-
|
|
18344
|
+
className = props.className,
|
|
18345
|
+
id = props.id;
|
|
18346
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
16847
18347
|
ref: ref,
|
|
16848
18348
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-text-field helper-text', className),
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
}) : text;
|
|
18349
|
+
id: id,
|
|
18350
|
+
children: text
|
|
18351
|
+
});
|
|
16853
18352
|
});
|
|
16854
18353
|
TextFieldHelperText.displayName = 'TextFieldHelperText';
|
|
16855
18354
|
var TextFieldRoot = Object.assign(TextFieldRootBase, {
|
|
@@ -16868,15 +18367,23 @@ var TextFieldRoot = Object.assign(TextFieldRootBase, {
|
|
|
16868
18367
|
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
16869
18368
|
|
|
16870
18369
|
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
16871
|
-
/* harmony export */
|
|
18370
|
+
/* harmony export */ gx: () => (/* binding */ textFieldProps)
|
|
16872
18371
|
/* harmony export */ });
|
|
16873
|
-
/* unused harmony
|
|
18372
|
+
/* unused harmony exports sizes, variant */
|
|
16874
18373
|
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
16875
18374
|
|
|
16876
18375
|
var sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
18376
|
+
/** outline 은 흰 바탕에 회색 선(기본), fill 은 선 없는 연회색 면(검색 상자·회색 바탕 위) */
|
|
18377
|
+
var variant = ['outline', 'fill'];
|
|
16877
18378
|
var textFieldProps = {
|
|
16878
18379
|
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%')
|
|
18380
|
+
width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('100%'),
|
|
18381
|
+
variant: {
|
|
18382
|
+
type: 'className',
|
|
18383
|
+
className: 'variant',
|
|
18384
|
+
values: variant,
|
|
18385
|
+
"default": 'outline'
|
|
18386
|
+
}
|
|
16880
18387
|
};
|
|
16881
18388
|
|
|
16882
18389
|
/***/ },
|
|
@@ -16893,9 +18400,10 @@ var textFieldProps = {
|
|
|
16893
18400
|
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(4560);
|
|
16894
18401
|
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3274);
|
|
16895
18402
|
/* 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
|
|
18403
|
+
/* harmony import */ var _form_field_form_field_context__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(7187);
|
|
18404
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(3547);
|
|
18405
|
+
/* harmony import */ var _base_text_field__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(4709);
|
|
18406
|
+
/* harmony import */ var _text_field_props__WEBPACK_IMPORTED_MODULE_9__ = __nuri_require__(244);
|
|
16899
18407
|
var __assign = undefined && undefined.__assign || function () {
|
|
16900
18408
|
__assign = Object.assign || function (t) {
|
|
16901
18409
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -16923,53 +18431,68 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
16923
18431
|
|
|
16924
18432
|
|
|
16925
18433
|
|
|
18434
|
+
|
|
16926
18435
|
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
|
-
|
|
18436
|
+
var _a;
|
|
18437
|
+
var _b = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_5__/* .getMergedProps */ .p)(props, _text_field_props__WEBPACK_IMPORTED_MODULE_9__/* .textFieldProps */ .gx),
|
|
18438
|
+
className = _b.className,
|
|
18439
|
+
style = _b.style,
|
|
18440
|
+
leftIcon = _b.leftIcon,
|
|
18441
|
+
rightIcon = _b.rightIcon,
|
|
18442
|
+
prefix = _b.prefix,
|
|
18443
|
+
suffix = _b.suffix,
|
|
18444
|
+
format = _b.format,
|
|
18445
|
+
clearable = _b.clearable,
|
|
18446
|
+
onClear = _b.onClear,
|
|
18447
|
+
passwordToggle = _b.passwordToggle,
|
|
18448
|
+
onVisibilityChange = _b.onVisibilityChange,
|
|
18449
|
+
title = _b.title,
|
|
18450
|
+
value = _b.value,
|
|
18451
|
+
onChange = _b.onChange,
|
|
18452
|
+
defaultValue = _b.defaultValue,
|
|
18453
|
+
helperText = _b.helperText,
|
|
18454
|
+
isErrorProp = _b.isError,
|
|
18455
|
+
showCount = _b.showCount,
|
|
18456
|
+
maxLength = _b.maxLength,
|
|
18457
|
+
required = _b.required,
|
|
18458
|
+
id = _b.id,
|
|
18459
|
+
ariaDescribedBy = _b["aria-describedby"],
|
|
18460
|
+
type = _b.type,
|
|
18461
|
+
disabled = _b.disabled,
|
|
18462
|
+
readOnly = _b.readOnly,
|
|
18463
|
+
_onFocus = _b.onFocus,
|
|
18464
|
+
_onBlur = _b.onBlur,
|
|
18465
|
+
track = _b.track,
|
|
18466
|
+
trackProps = _b.trackProps,
|
|
18467
|
+
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
18468
|
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_3__/* .useTrack */ .n)('TextField', {
|
|
16954
18469
|
track: track,
|
|
16955
18470
|
trackProps: trackProps
|
|
16956
18471
|
});
|
|
16957
18472
|
var focusedValueRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');
|
|
16958
|
-
var
|
|
16959
|
-
innerValue =
|
|
16960
|
-
setInnerValue =
|
|
18473
|
+
var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : ''),
|
|
18474
|
+
innerValue = _c[0],
|
|
18475
|
+
setInnerValue = _c[1];
|
|
16961
18476
|
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 =
|
|
18477
|
+
var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
|
|
18478
|
+
passwordVisible = _d[0],
|
|
18479
|
+
setPasswordVisible = _d[1];
|
|
18480
|
+
var _e = (0,_helpers_hooks_useFieldClear__WEBPACK_IMPORTED_MODULE_2__/* .useFieldClear */ .h)(onClear),
|
|
18481
|
+
fieldRef = _e.fieldRef,
|
|
18482
|
+
engaged = _e.engaged,
|
|
18483
|
+
wrapperProps = _e.wrapperProps,
|
|
18484
|
+
clearProps = _e.clearProps;
|
|
16970
18485
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () {
|
|
16971
18486
|
return fieldRef.current;
|
|
16972
18487
|
});
|
|
18488
|
+
var autoId = (0,react__WEBPACK_IMPORTED_MODULE_1__.useId)();
|
|
18489
|
+
// 제 라벨(title)이 없을 때만 둘레 FormField 의 라벨·도움말·오류에 잇는다
|
|
18490
|
+
var formField = (0,_form_field_form_field_context__WEBPACK_IMPORTED_MODULE_6__/* .useFormFieldControl */ .j8)();
|
|
18491
|
+
var field = title ? null : formField;
|
|
18492
|
+
var inputId = (_a = id !== null && id !== void 0 ? id : field === null || field === void 0 ? void 0 : field.id) !== null && _a !== void 0 ? _a : autoId;
|
|
18493
|
+
var helperId = "".concat(inputId, "-helper");
|
|
18494
|
+
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);
|
|
18495
|
+
var isError = isErrorProp || (field === null || field === void 0 ? void 0 : field.invalid);
|
|
16973
18496
|
var handleChange = function handleChange(e) {
|
|
16974
18497
|
if (value === undefined) setInnerValue(e.target.value);
|
|
16975
18498
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
@@ -16981,7 +18504,7 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
16981
18504
|
actions.push(__assign({
|
|
16982
18505
|
id: 'clear',
|
|
16983
18506
|
'aria-label': '입력 지우기',
|
|
16984
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18507
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, {
|
|
16985
18508
|
name: 'x',
|
|
16986
18509
|
size: 's'
|
|
16987
18510
|
})
|
|
@@ -16994,7 +18517,7 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
16994
18517
|
'aria-pressed': passwordVisible,
|
|
16995
18518
|
disabled: disabled,
|
|
16996
18519
|
// 아이콘은 지금 상태를 보인다 — 숨김이면 사선 눈, 보이면 눈 (앱과 같은 뜻)
|
|
16997
|
-
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18520
|
+
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, {
|
|
16998
18521
|
name: passwordVisible ? 'eye' : 'eye-slash',
|
|
16999
18522
|
size: 's'
|
|
17000
18523
|
}),
|
|
@@ -17004,29 +18527,40 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
17004
18527
|
}
|
|
17005
18528
|
});
|
|
17006
18529
|
}
|
|
17007
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18530
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A, {
|
|
17008
18531
|
value: value,
|
|
17009
18532
|
defaultValue: defaultValue,
|
|
17010
18533
|
format: format,
|
|
17011
18534
|
onChange: handleChange,
|
|
17012
18535
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
|
|
17013
18536
|
className: 'text-field',
|
|
17014
|
-
children: [title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18537
|
+
children: [title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Label, {
|
|
17015
18538
|
className: 'text-field-title',
|
|
17016
|
-
|
|
18539
|
+
htmlFor: inputId,
|
|
18540
|
+
text: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
|
18541
|
+
children: [title, required && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
|
|
18542
|
+
className: 'nuri-required-dot',
|
|
18543
|
+
"aria-hidden": 'true'
|
|
18544
|
+
})]
|
|
18545
|
+
})
|
|
17017
18546
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({
|
|
17018
18547
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('nuri-theme text-field-input-wrapper', isError && 'error', className),
|
|
17019
18548
|
style: style
|
|
17020
18549
|
}, wrapperProps, {
|
|
17021
|
-
children: [leftIcon, prefix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18550
|
+
children: [leftIcon, prefix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Prefix, {
|
|
17022
18551
|
className: 'text-field-prefix',
|
|
17023
18552
|
children: prefix
|
|
17024
|
-
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18553
|
+
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Input, __assign({
|
|
17025
18554
|
ref: fieldRef,
|
|
18555
|
+
id: inputId,
|
|
17026
18556
|
type: hasPasswordToggle && passwordVisible ? 'text' : type,
|
|
18557
|
+
maxLength: maxLength,
|
|
18558
|
+
required: required,
|
|
17027
18559
|
disabled: disabled,
|
|
17028
18560
|
readOnly: readOnly,
|
|
17029
18561
|
"aria-invalid": isError || undefined,
|
|
18562
|
+
"aria-required": !required && (field === null || field === void 0 ? void 0 : field.required) || undefined,
|
|
18563
|
+
"aria-describedby": describedBy,
|
|
17030
18564
|
onFocus: function onFocus(e) {
|
|
17031
18565
|
// uncontrolled 면 ref 로 바뀐 값(react-hook-form)을 여기서 읽어 지우기 버튼에 맞춘다
|
|
17032
18566
|
var now = raw;
|
|
@@ -17041,18 +18575,25 @@ var TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
|
|
|
17041
18575
|
if (raw !== focusedValueRef.current) emit('change');
|
|
17042
18576
|
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
|
|
17043
18577
|
}
|
|
17044
|
-
}, restProps)), suffix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18578
|
+
}, restProps)), suffix != null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Suffix, {
|
|
17045
18579
|
className: 'text-field-suffix',
|
|
17046
18580
|
children: suffix
|
|
17047
18581
|
}), actions.map(function (_a) {
|
|
17048
|
-
var
|
|
18582
|
+
var actionId = _a.id,
|
|
17049
18583
|
action = __rest(_a, ["id"]);
|
|
17050
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18584
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Action, __assign({
|
|
17051
18585
|
className: 'text-field-action motion-press'
|
|
17052
|
-
}, action),
|
|
18586
|
+
}, action), actionId);
|
|
18587
|
+
}), showCount && maxLength !== undefined &&
|
|
18588
|
+
// 칠 때마다 숫자를 읽지 않게 숨긴다. 제한은 input 의 maxLength 가 맡는다
|
|
18589
|
+
(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
|
|
18590
|
+
className: 'text-field-count',
|
|
18591
|
+
"aria-hidden": 'true',
|
|
18592
|
+
children: [(format ? format.transform(raw) : raw).length, "/", maxLength]
|
|
17053
18593
|
}), rightIcon]
|
|
17054
|
-
})), helperText && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
18594
|
+
})), helperText && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_text_field__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.HelperText, {
|
|
17055
18595
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_4__/* .classNames */ .x)('text-field-helper-text', isError && 'error'),
|
|
18596
|
+
id: helperId,
|
|
17056
18597
|
text: helperText
|
|
17057
18598
|
})]
|
|
17058
18599
|
})
|
|
@@ -17206,15 +18747,23 @@ var ToastRoot = Object.assign(ToastRootBase, {
|
|
|
17206
18747
|
/* harmony export */ Cc: () => (/* binding */ toastViewportProps),
|
|
17207
18748
|
/* harmony export */ Eg: () => (/* binding */ toastProps)
|
|
17208
18749
|
/* harmony export */ });
|
|
17209
|
-
/* unused harmony exports variants, positions */
|
|
18750
|
+
/* unused harmony exports variants, positions, surfaces */
|
|
17210
18751
|
var variants = ['default', 'secondary', 'success', 'warning', 'error'];
|
|
17211
|
-
var positions = ['top-right', 'bottom-right', 'bottom-center'];
|
|
18752
|
+
var positions = ['top-right', 'top-center', 'bottom-right', 'bottom-center'];
|
|
18753
|
+
/** 토스트 판. filled 는 variant 색으로 칠한 판, card 는 흰 카드 위에 variant 색 아이콘만 둔다 */
|
|
18754
|
+
var surfaces = ['filled', 'card'];
|
|
17212
18755
|
var toastProps = {
|
|
17213
18756
|
variant: {
|
|
17214
18757
|
type: 'className',
|
|
17215
18758
|
className: 'variant',
|
|
17216
18759
|
values: variants,
|
|
17217
18760
|
"default": 'default'
|
|
18761
|
+
},
|
|
18762
|
+
surface: {
|
|
18763
|
+
type: 'className',
|
|
18764
|
+
className: 'surface',
|
|
18765
|
+
values: surfaces,
|
|
18766
|
+
"default": 'filled'
|
|
17218
18767
|
}
|
|
17219
18768
|
};
|
|
17220
18769
|
var toastViewportProps = {
|
|
@@ -17281,11 +18830,19 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
17281
18830
|
|
|
17282
18831
|
|
|
17283
18832
|
|
|
17284
|
-
// 상태를 뜻하는 variant 는 앞에 아이콘을 둔다. error 는 닫기 X 와 헷갈리지 않게 원 안 느낌표를
|
|
18833
|
+
// 상태를 뜻하는 variant 는 앞에 아이콘을 둔다. filled 의 error 는 닫기 X 와 헷갈리지 않게 원 안 느낌표를 쓰고,
|
|
18834
|
+
// card 는 CSS 가 아이콘 뒤에 색 원을 깔기 때문에 원 없는 느낌표를 쓴다
|
|
17285
18835
|
var VARIANT_ICON = {
|
|
17286
|
-
|
|
17287
|
-
|
|
17288
|
-
|
|
18836
|
+
filled: {
|
|
18837
|
+
success: _assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A,
|
|
18838
|
+
warning: _assets_icons_exclamation_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A,
|
|
18839
|
+
error: _assets_icons_exclamationCircle_svg__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A
|
|
18840
|
+
},
|
|
18841
|
+
card: {
|
|
18842
|
+
success: _assets_icons_check_svg__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A,
|
|
18843
|
+
warning: _assets_icons_exclamation_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A,
|
|
18844
|
+
error: _assets_icons_exclamation_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A
|
|
18845
|
+
}
|
|
17289
18846
|
};
|
|
17290
18847
|
var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
17291
18848
|
var _a;
|
|
@@ -17293,9 +18850,11 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17293
18850
|
title = props.title,
|
|
17294
18851
|
description = props.description,
|
|
17295
18852
|
variant = props.variant,
|
|
18853
|
+
_b = props.surface,
|
|
18854
|
+
surface = _b === void 0 ? 'filled' : _b,
|
|
17296
18855
|
action = props.action,
|
|
17297
|
-
|
|
17298
|
-
showClose =
|
|
18856
|
+
_c = props.showClose,
|
|
18857
|
+
showClose = _c === void 0 ? true : _c,
|
|
17299
18858
|
track = props.track,
|
|
17300
18859
|
trackProps = props.trackProps,
|
|
17301
18860
|
openProp = props.open,
|
|
@@ -17304,7 +18863,7 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17304
18863
|
onEntered = props.onEntered,
|
|
17305
18864
|
onExited = props.onExited,
|
|
17306
18865
|
_onAnimationEnd = props.onAnimationEnd,
|
|
17307
|
-
restProps = __rest(props, ["className", "title", "description", "variant", "action", "showClose", "track", "trackProps", "open", "defaultOpen", "onOpenChange", "onEntered", "onExited", "onAnimationEnd"]);
|
|
18866
|
+
restProps = __rest(props, ["className", "title", "description", "variant", "surface", "action", "showClose", "track", "trackProps", "open", "defaultOpen", "onOpenChange", "onEntered", "onExited", "onAnimationEnd"]);
|
|
17308
18867
|
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_7__/* .useTrack */ .n)('Toast', {
|
|
17309
18868
|
track: track,
|
|
17310
18869
|
trackProps: trackProps
|
|
@@ -17312,13 +18871,13 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17312
18871
|
// Radix 는 open·defaultOpen 이 없으면 연 채로 시작한다. Radix 가 스스로 닫는 것은 이 값에 보이지 않아 다시 보내지 않는다.
|
|
17313
18872
|
var shown = (_a = openProp !== null && openProp !== void 0 ? openProp : defaultOpen) !== null && _a !== void 0 ? _a : true;
|
|
17314
18873
|
// 시간이 다 되거나 밀어서 Radix 가 스스로 닫는 것까지 알아야 onExited 를 부른다
|
|
17315
|
-
var
|
|
18874
|
+
var _d = (0,_helpers_hooks_useExternalState__WEBPACK_IMPORTED_MODULE_6__/* .useExternalState */ .C)({
|
|
17316
18875
|
prop: openProp,
|
|
17317
18876
|
handler: onOpenChange,
|
|
17318
18877
|
defaultProp: defaultOpen !== null && defaultOpen !== void 0 ? defaultOpen : true
|
|
17319
18878
|
}),
|
|
17320
|
-
open =
|
|
17321
|
-
setOpen =
|
|
18879
|
+
open = _d[0],
|
|
18880
|
+
setOpen = _d[1];
|
|
17322
18881
|
var presence = (0,_helpers_motion_use_presence_callbacks__WEBPACK_IMPORTED_MODULE_8__/* .usePresenceCallbacks */ .r)({
|
|
17323
18882
|
open: open,
|
|
17324
18883
|
onEntered: onEntered,
|
|
@@ -17329,9 +18888,11 @@ var Toast = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(funct
|
|
|
17329
18888
|
}, [shown]);
|
|
17330
18889
|
var variantClassName = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_10__/* .getMergedProps */ .p)({
|
|
17331
18890
|
className: className,
|
|
17332
|
-
variant: variant
|
|
18891
|
+
variant: variant,
|
|
18892
|
+
surface: surface
|
|
17333
18893
|
}, _toast_props__WEBPACK_IMPORTED_MODULE_13__/* .toastProps */ .Eg).className;
|
|
17334
|
-
var
|
|
18894
|
+
var icons = VARIANT_ICON[surface];
|
|
18895
|
+
var Icon = variant && variant in icons ? icons[variant] : null;
|
|
17335
18896
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_toast__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .A, __assign({
|
|
17336
18897
|
ref: ref,
|
|
17337
18898
|
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_9__/* .classNames */ .x)(variantClassName, 'toast')
|
|
@@ -19335,8 +20896,8 @@ var skeleton = __nuri_require__(7687);
|
|
|
19335
20896
|
var skeleton_group = __nuri_require__(7719);
|
|
19336
20897
|
// EXTERNAL MODULE: ./components/breadcrumb/breadcrumb.tsx + 2 modules
|
|
19337
20898
|
var breadcrumb = __nuri_require__(1986);
|
|
19338
|
-
// EXTERNAL MODULE: ./components/drop-down/drop-down.tsx
|
|
19339
|
-
var drop_down = __nuri_require__(
|
|
20899
|
+
// EXTERNAL MODULE: ./components/drop-down/drop-down.tsx
|
|
20900
|
+
var drop_down = __nuri_require__(9303);
|
|
19340
20901
|
// EXTERNAL MODULE: ./components/collapsible-menu/collapsible-menu.tsx + 2 modules
|
|
19341
20902
|
var collapsible_menu = __nuri_require__(5932);
|
|
19342
20903
|
// EXTERNAL MODULE: ./components/elements/text/text.tsx
|
|
@@ -19673,8 +21234,10 @@ var rating = __nuri_require__(9419);
|
|
|
19673
21234
|
var numeric_spinner = __nuri_require__(7740);
|
|
19674
21235
|
// EXTERNAL MODULE: ./components/card/card.tsx + 2 modules
|
|
19675
21236
|
var card = __nuri_require__(329);
|
|
19676
|
-
// EXTERNAL MODULE: ./components/stat/stat.tsx
|
|
19677
|
-
var stat = __nuri_require__(
|
|
21237
|
+
// EXTERNAL MODULE: ./components/stat/stat.tsx
|
|
21238
|
+
var stat = __nuri_require__(857);
|
|
21239
|
+
// EXTERNAL MODULE: ./components/stat/stat-group.tsx
|
|
21240
|
+
var stat_group = __nuri_require__(2455);
|
|
19678
21241
|
// EXTERNAL MODULE: ./components/platform-badge/platform-badge.tsx + 2 modules
|
|
19679
21242
|
var platform_badge = __nuri_require__(5529);
|
|
19680
21243
|
// EXTERNAL MODULE: ./components/section-header/section-header.tsx + 2 modules
|
|
@@ -19695,6 +21258,10 @@ var list_footer = __nuri_require__(2829);
|
|
|
19695
21258
|
var description_list = __nuri_require__(6143);
|
|
19696
21259
|
// EXTERNAL MODULE: ./components/grid-list/grid-list.tsx + 2 modules
|
|
19697
21260
|
var grid_list = __nuri_require__(2109);
|
|
21261
|
+
// EXTERNAL MODULE: ./components/form-field/form-field.tsx + 2 modules
|
|
21262
|
+
var form_field = __nuri_require__(581);
|
|
21263
|
+
// EXTERNAL MODULE: ./components/form-section/form-section.tsx + 2 modules
|
|
21264
|
+
var form_section = __nuri_require__(6529);
|
|
19698
21265
|
// EXTERNAL MODULE: ./components/board-row/board-row.tsx + 2 modules
|
|
19699
21266
|
var board_row = __nuri_require__(8954);
|
|
19700
21267
|
// EXTERNAL MODULE: ./components/border/border.tsx
|
|
@@ -20722,6 +22289,7 @@ var semanticApp = {
|
|
|
20722
22289
|
"default": "#E4E4E7",
|
|
20723
22290
|
"hover": "#A1A1AA",
|
|
20724
22291
|
"accent": "#4C277C",
|
|
22292
|
+
"accent-subtle": "#C3B4DD",
|
|
20725
22293
|
"error": "#DF535C",
|
|
20726
22294
|
"disabled": "#E4E4E7"
|
|
20727
22295
|
},
|
|
@@ -20730,6 +22298,7 @@ var semanticApp = {
|
|
|
20730
22298
|
},
|
|
20731
22299
|
"surface": {
|
|
20732
22300
|
"base": "#FFFFFF",
|
|
22301
|
+
"elevated": "#FFFFFF",
|
|
20733
22302
|
"subtle": "#FAFAFA",
|
|
20734
22303
|
"muted": "#F4F4F5",
|
|
20735
22304
|
"strong": "#E4E4E7",
|
|
@@ -20789,10 +22358,6 @@ var semanticApp = {
|
|
|
20789
22358
|
"on-brand": "#FFFFFF",
|
|
20790
22359
|
"brand": "#4C277C"
|
|
20791
22360
|
},
|
|
20792
|
-
"focus-halo": {
|
|
20793
|
-
"color": "#F4EFFA",
|
|
20794
|
-
"error-color": "#FFF5F6"
|
|
20795
|
-
},
|
|
20796
22361
|
"toast": {
|
|
20797
22362
|
"description": "#DDD1F0",
|
|
20798
22363
|
"success-background": "#16A34A",
|
|
@@ -20964,6 +22529,7 @@ var semanticAdmin = {
|
|
|
20964
22529
|
"default": "#D4D4D8",
|
|
20965
22530
|
"hover": "#A1A1AA",
|
|
20966
22531
|
"accent": "#391D5D",
|
|
22532
|
+
"accent-subtle": "#C3B4DD",
|
|
20967
22533
|
"error": "#DF535C",
|
|
20968
22534
|
"disabled": "#E4E4E7"
|
|
20969
22535
|
},
|
|
@@ -21061,6 +22627,9 @@ var motion = __nuri_require__(8982);
|
|
|
21061
22627
|
|
|
21062
22628
|
|
|
21063
22629
|
|
|
22630
|
+
|
|
22631
|
+
|
|
22632
|
+
|
|
21064
22633
|
|
|
21065
22634
|
|
|
21066
22635
|
|
|
@@ -21091,6 +22660,8 @@ export const DescriptionList = description_list/* default */.A;
|
|
|
21091
22660
|
export const Drawer = drawer/* default */.A;
|
|
21092
22661
|
export const DropDown = drop_down/* default */.A;
|
|
21093
22662
|
export const EmptyState = empty_state/* default */.A;
|
|
22663
|
+
export const FormField = form_field/* default */.A;
|
|
22664
|
+
export const FormSection = form_section/* default */.A;
|
|
21094
22665
|
export const FullSecureKeypad = full_secure_keypad/* default */.A;
|
|
21095
22666
|
export const GridList = grid_list/* default */.A;
|
|
21096
22667
|
export const Highlight = highlight/* default */.A;
|
|
@@ -21135,6 +22706,7 @@ export const Slider = slider/* default */.A;
|
|
|
21135
22706
|
export const Spinner = spinner/* default */.A;
|
|
21136
22707
|
export const SplitTextField = split_text_field/* default */.A;
|
|
21137
22708
|
export const Stat = stat/* default */.A;
|
|
22709
|
+
export const StatGroup = stat_group/* default */.A;
|
|
21138
22710
|
export const StepProgress = step_progress/* default */.A;
|
|
21139
22711
|
export const Switch = switch_switch/* default */.A;
|
|
21140
22712
|
export const TableRow = table_row/* default */.A;
|