@nurihaus/web-design-system 3.3.0 → 3.5.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/README.md +36 -0
- package/dist/ai/components.md +148 -5
- package/dist/avatar.js +5 -5
- package/dist/bottom-nav.js +22 -8
- package/dist/breadcrumb.js +25 -10
- package/dist/callout.js +220 -0
- package/dist/check-box.js +24 -8
- package/dist/chip-group.js +21 -7
- package/dist/{chunk-563.js → chunk-1563.js} +26 -13
- package/dist/{chunk-657.js → chunk-1657.js} +2 -2
- package/dist/chunk-2496.js +70 -0
- package/dist/{chunk-777.js → chunk-2777.js} +2 -2
- package/dist/{chunk-558.js → chunk-4558.js} +2 -2
- package/dist/chunk-4560.js +77 -0
- package/dist/{chunk-917.js → chunk-4917.js} +2 -2
- package/dist/{chunk-77.js → chunk-5077.js} +2 -2
- package/dist/chunk-5226.js +79 -0
- package/dist/{chunk-149.js → chunk-6149.js} +2 -2
- package/dist/{chunk-302.js → chunk-6302.js} +2 -2
- package/dist/{chunk-364.js → chunk-6364.js} +2 -2
- package/dist/{chunk-713.js → chunk-6713.js} +2 -2
- package/dist/{chunk-298.js → chunk-7298.js} +2 -2
- package/dist/{chunk-653.js → chunk-7653.js} +2 -2
- package/dist/{chunk-739.js → chunk-7739.js} +2 -2
- package/dist/{chunk-309.js → chunk-8690.js} +2 -2
- package/dist/{chunk-933.js → chunk-8933.js} +2 -2
- package/dist/chunk-910.js +30 -11
- package/dist/{chunk-387.js → chunk-9387.js} +2 -2
- package/dist/{chunk-436.js → chunk-9436.js} +2 -2
- package/dist/collapsible-menu.js +25 -12
- package/dist/components/bottom-nav/bottom-nav-type.d.ts +5 -2
- package/dist/components/breadcrumb/breadcrumb-type.d.ts +2 -1
- package/dist/components/button/button-props.d.ts +2 -2
- package/dist/components/button/button-type.d.ts +4 -1
- package/dist/components/button/button.stories.d.ts +1 -1
- package/dist/components/callout/base-callout.d.ts +4 -0
- package/dist/components/callout/callout-props.d.ts +10 -0
- package/dist/components/callout/callout-type.d.ts +7 -0
- package/dist/components/callout/callout.d.ts +5 -0
- package/dist/components/callout/callout.stories.d.ts +22 -0
- package/dist/components/check-box/check-box-type.d.ts +2 -1
- package/dist/components/chip-group/chip-group-type.d.ts +2 -1
- package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +2 -1
- package/dist/components/drawer/drawer-type.d.ts +2 -1
- package/dist/components/drop-down/drop-down-type.d.ts +2 -1
- package/dist/components/logging/log-context.d.ts +9 -0
- package/dist/components/logging/logging-type.d.ts +25 -0
- package/dist/components/logging/logging.d.ts +5 -0
- package/dist/components/logging/logging.stories.d.ts +18 -0
- package/dist/components/modal/modal-type.d.ts +2 -1
- package/dist/components/pagination/pagination-type.d.ts +2 -1
- package/dist/components/radio/radio-type.d.ts +3 -1
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.stories.d.ts +1 -1
- package/dist/components/skeleton/skeleton.stories.d.ts +5 -5
- package/dist/components/switch/switch-type.d.ts +2 -1
- package/dist/components/table/table-type.d.ts +2 -1
- package/dist/components/tabs/tabs-type.d.ts +2 -1
- package/dist/components/text-area/text-area-type.d.ts +2 -1
- package/dist/components/text-field/text-field-type.d.ts +2 -1
- package/dist/components/toast/toast-type.d.ts +2 -1
- package/dist/components/toast/toast.stories.d.ts +7 -5
- package/dist/components/tooltip/tooltip-type.d.ts +2 -1
- package/dist/components.css +79 -0
- package/dist/cta-button.js +44 -21
- package/dist/data-table.js +19 -7
- package/dist/drawer.js +23 -9
- package/dist/drop-down.js +25 -9
- package/dist/helpers/hooks/useTrack.d.ts +3 -0
- package/dist/icon-text-badge.js +11 -9
- package/dist/icon-text-option-badge.js +5 -5
- package/dist/icon.js +5 -5
- package/dist/index.d.ts +4 -0
- package/dist/index.js +557 -80
- package/dist/loading.js +6 -6
- package/dist/logging.js +147 -0
- package/dist/modal-with-double-button.js +16 -12
- package/dist/modal.js +39 -26
- package/dist/option-badge.js +11 -9
- package/dist/pagination.js +23 -9
- package/dist/radio.js +24 -10
- package/dist/skeleton.js +4 -4
- package/dist/step-progress.js +3 -3
- package/dist/styles.css +66 -0
- package/dist/switch.js +24 -8
- package/dist/tabs.js +22 -6
- package/dist/text-area.js +30 -8
- package/dist/text-field.js +31 -9
- package/dist/text.js +5 -5
- package/dist/toast.js +34 -15
- package/dist/tooltip.js +33 -18
- package/package.json +9 -1
- package/dist/chunk-976.js +0 -29
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 4560;
|
|
3
|
+
export const __webpack_esm_ids__ = [4560];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 4804
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ e: () => (/* binding */ useLogEmitter)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* unused harmony export LogProvider */
|
|
13
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
14
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
15
|
+
var _a;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// 진입점(`/logging`, `/cta-button`, 루트)마다 이 파일이 따로 들어가므로 context 는 전역 키 하나에 둔다.
|
|
19
|
+
var CONTEXT_KEY = Symbol["for"]('@nurihaus/web-design-system/log-provider');
|
|
20
|
+
var registry = globalThis;
|
|
21
|
+
var LogContext = (_a = registry[CONTEXT_KEY]) !== null && _a !== void 0 ? _a : registry[CONTEXT_KEY] = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)(null);
|
|
22
|
+
var LogProvider = function LogProvider(props) {
|
|
23
|
+
var onEvent = props.onEvent,
|
|
24
|
+
children = props.children;
|
|
25
|
+
// context 값이 Provider 렌더마다 바뀌면 track 을 단 컴포넌트가 모두 다시 그려진다. 최신 onEvent 는 ref 로 읽는다.
|
|
26
|
+
var onEventRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(onEvent);
|
|
27
|
+
onEventRef.current = onEvent;
|
|
28
|
+
var emit = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (event) {
|
|
29
|
+
// 로그 수집기가 던져도 클릭·열기 같은 UI 동작은 이어져야 한다.
|
|
30
|
+
try {
|
|
31
|
+
onEventRef.current(event);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error('[LogProvider] onEvent threw', error);
|
|
34
|
+
}
|
|
35
|
+
}, []);
|
|
36
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(LogContext.Provider, {
|
|
37
|
+
value: emit,
|
|
38
|
+
children: children
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
LogProvider.displayName = 'LogProvider';
|
|
42
|
+
/** LogProvider 가 둔 emit 함수. Provider 밖이면 null 이다. */
|
|
43
|
+
var useLogEmitter = function useLogEmitter() {
|
|
44
|
+
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(LogContext);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/***/ },
|
|
48
|
+
|
|
49
|
+
/***/ 4560
|
|
50
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
51
|
+
|
|
52
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
53
|
+
/* harmony export */ n: () => (/* binding */ useTrack)
|
|
54
|
+
/* harmony export */ });
|
|
55
|
+
/* harmony import */ var _components_logging_log_context__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(4804);
|
|
56
|
+
|
|
57
|
+
/** 컴포넌트 하나가 쓸 emit 함수. Provider 가 없거나 track 이 없으면 아무것도 보내지 않는다. */
|
|
58
|
+
var useTrack = function useTrack(component, props) {
|
|
59
|
+
var track = props.track,
|
|
60
|
+
trackProps = props.trackProps;
|
|
61
|
+
var emit = (0,_components_logging_log_context__WEBPACK_IMPORTED_MODULE_0__/* .useLogEmitter */ .e)();
|
|
62
|
+
return function (action, value) {
|
|
63
|
+
if (!track) return;
|
|
64
|
+
emit === null || emit === void 0 ? void 0 : emit({
|
|
65
|
+
component: component,
|
|
66
|
+
action: action,
|
|
67
|
+
track: track,
|
|
68
|
+
value: value,
|
|
69
|
+
props: trackProps,
|
|
70
|
+
timestamp: Date.now()
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/***/ }
|
|
76
|
+
|
|
77
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 5226;
|
|
3
|
+
export const __webpack_esm_ids__ = [5226];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 9976
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ Lr: () => (/* binding */ ctaButtonProps)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* unused harmony exports variant, sizes */
|
|
13
|
+
/* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7298);
|
|
14
|
+
|
|
15
|
+
var variant = ['primary', 'secondary', 'ghost', 'neutral', 'confirm', 'outlined', 'social'];
|
|
16
|
+
var sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
17
|
+
var ctaButtonProps = {
|
|
18
|
+
variant: {
|
|
19
|
+
type: 'className',
|
|
20
|
+
className: 'variant',
|
|
21
|
+
values: variant,
|
|
22
|
+
"default": 'primary'
|
|
23
|
+
},
|
|
24
|
+
size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'm')
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/***/ },
|
|
28
|
+
|
|
29
|
+
/***/ 1163
|
|
30
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
31
|
+
|
|
32
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
33
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
34
|
+
/* harmony export */ });
|
|
35
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
36
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
37
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(7335);
|
|
38
|
+
/* harmony import */ var _base_callout__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(1211);
|
|
39
|
+
/* harmony import */ var _callout_props__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(7810);
|
|
40
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
41
|
+
__assign = Object.assign || function (t) {
|
|
42
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
43
|
+
s = arguments[i];
|
|
44
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
48
|
+
return __assign.apply(this, arguments);
|
|
49
|
+
};
|
|
50
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
51
|
+
var t = {};
|
|
52
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
53
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/** 대상에 붙어 늘 떠 있는 작은 말풍선 (ADR 0007). 자리는 쓰는 쪽이 정한다 — CTAButton 은 `callout` prop 으로 모서리에 끼운다 */
|
|
64
|
+
var Callout = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
65
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_2__/* .getMergedProps */ .p)(props, _callout_props__WEBPACK_IMPORTED_MODULE_4__/* .calloutProps */ .B),
|
|
66
|
+
text = _a.text,
|
|
67
|
+
restProps = __rest(_a, ["text"]);
|
|
68
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_callout__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A, __assign({
|
|
69
|
+
ref: ref
|
|
70
|
+
}, restProps, {
|
|
71
|
+
children: text
|
|
72
|
+
}));
|
|
73
|
+
});
|
|
74
|
+
Callout.displayName = 'Callout';
|
|
75
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Callout);
|
|
76
|
+
|
|
77
|
+
/***/ }
|
|
78
|
+
|
|
79
|
+
};
|
package/dist/chunk-910.js
CHANGED
|
@@ -11,11 +11,13 @@ export const __webpack_esm_modules__ = {
|
|
|
11
11
|
/* harmony export */ });
|
|
12
12
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
13
13
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
14
|
-
/* harmony import */ var
|
|
15
|
-
/* harmony import */ var
|
|
16
|
-
/* harmony import */ var
|
|
17
|
-
/* harmony import */ var
|
|
18
|
-
/* harmony import */ var
|
|
14
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(4560);
|
|
15
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(3274);
|
|
16
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(7335);
|
|
17
|
+
/* harmony import */ var _callout_callout__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(1163);
|
|
18
|
+
/* harmony import */ var _loading_spinner_spinner__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(6302);
|
|
19
|
+
/* harmony import */ var _base_button__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(8933);
|
|
20
|
+
/* harmony import */ var _button_props__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(9976);
|
|
19
21
|
var __assign = undefined && undefined.__assign || function () {
|
|
20
22
|
__assign = Object.assign || function (t) {
|
|
21
23
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -41,19 +43,36 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
|
|
46
|
+
|
|
47
|
+
|
|
44
48
|
var CTAButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
45
|
-
var _a = (0,
|
|
49
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_4__/* .getMergedProps */ .p)(props, _button_props__WEBPACK_IMPORTED_MODULE_8__/* .ctaButtonProps */ .Lr),
|
|
46
50
|
className = _a.className,
|
|
47
51
|
text = _a.text,
|
|
48
52
|
leftIcon = _a.leftIcon,
|
|
49
53
|
rightIcon = _a.rightIcon,
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
callout = _a.callout,
|
|
55
|
+
_onClick = _a.onClick,
|
|
56
|
+
track = _a.track,
|
|
57
|
+
trackProps = _a.trackProps,
|
|
58
|
+
restProps = __rest(_a, ["className", "text", "leftIcon", "rightIcon", "callout", "onClick", "track", "trackProps"]);
|
|
59
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__/* .useTrack */ .n)('CTAButton', {
|
|
60
|
+
track: track,
|
|
61
|
+
trackProps: trackProps
|
|
62
|
+
});
|
|
63
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, __assign({
|
|
52
64
|
ref: ref,
|
|
53
|
-
className: (0,
|
|
54
|
-
loadingComponent: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
65
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)(className, 'cta-button', callout ? 'with-callout' : undefined),
|
|
66
|
+
loadingComponent: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_loading_spinner_spinner__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {}),
|
|
67
|
+
onClick: function onClick(event) {
|
|
68
|
+
emit('click');
|
|
69
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(event);
|
|
70
|
+
}
|
|
55
71
|
}, restProps, {
|
|
56
|
-
children: [leftIcon, text, rightIcon]
|
|
72
|
+
children: [leftIcon, text, rightIcon, callout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_callout_callout__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A, {
|
|
73
|
+
className: 'cta-button-callout',
|
|
74
|
+
text: callout
|
|
75
|
+
}) : null]
|
|
57
76
|
}));
|
|
58
77
|
});
|
|
59
78
|
CTAButton.displayName = 'CTAButton';
|
package/dist/collapsible-menu.js
CHANGED
|
@@ -17,6 +17,8 @@ __nuri_require__.d(__webpack_exports__, {
|
|
|
17
17
|
var jsx_runtime_ = __nuri_require__(612);
|
|
18
18
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
19
19
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
20
|
+
// EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
|
|
21
|
+
var useTrack = __nuri_require__(4560);
|
|
20
22
|
// EXTERNAL MODULE: ./helpers/utils/classNames.js
|
|
21
23
|
var classNames = __nuri_require__(3274);
|
|
22
24
|
// EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
|
|
@@ -117,6 +119,7 @@ var collapsible_menu_assign = undefined && undefined.__assign || function () {
|
|
|
117
119
|
|
|
118
120
|
|
|
119
121
|
|
|
122
|
+
|
|
120
123
|
var Anchor = function Anchor(props) {
|
|
121
124
|
return (0,jsx_runtime_.jsx)("a", collapsible_menu_assign({}, props));
|
|
122
125
|
};
|
|
@@ -130,7 +133,13 @@ var CollapsibleMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
130
133
|
onActiveKeyChange = _a.onActiveKeyChange,
|
|
131
134
|
_b = _a.indent,
|
|
132
135
|
indent = _b === void 0 ? 12 : _b,
|
|
133
|
-
linkComponent = _a.linkComponent
|
|
136
|
+
linkComponent = _a.linkComponent,
|
|
137
|
+
track = _a.track,
|
|
138
|
+
trackProps = _a.trackProps;
|
|
139
|
+
var emit = (0,useTrack/* useTrack */.n)('CollapsibleMenu', {
|
|
140
|
+
track: track,
|
|
141
|
+
trackProps: trackProps
|
|
142
|
+
});
|
|
134
143
|
var Link = linkComponent !== null && linkComponent !== void 0 ? linkComponent : Anchor;
|
|
135
144
|
var rootClassName = (0,classNames/* classNames */.x)(className, 'collapsible-menu');
|
|
136
145
|
var _hasActiveDescendant = function hasActiveDescendant(item) {
|
|
@@ -139,6 +148,12 @@ var CollapsibleMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
139
148
|
if (item.key === activeKey) return true;
|
|
140
149
|
return (_b = (_a = item.children) === null || _a === void 0 ? void 0 : _a.some(_hasActiveDescendant)) !== null && _b !== void 0 ? _b : false;
|
|
141
150
|
};
|
|
151
|
+
var selectItem = function selectItem(item) {
|
|
152
|
+
var _a;
|
|
153
|
+
emit('navigate', item.key);
|
|
154
|
+
onActiveKeyChange === null || onActiveKeyChange === void 0 ? void 0 : onActiveKeyChange(item.key);
|
|
155
|
+
(_a = item.onSelect) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
156
|
+
};
|
|
142
157
|
var _renderItems = function renderItems(targetItems, depth) {
|
|
143
158
|
var indentStyle = {
|
|
144
159
|
paddingLeft: "".concat(depth * indent, "px")
|
|
@@ -179,13 +194,11 @@ var CollapsibleMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
179
194
|
"aria-current": isActive ? 'page' : undefined,
|
|
180
195
|
"aria-disabled": item.disabled ? 'true' : undefined,
|
|
181
196
|
onClick: function onClick(e) {
|
|
182
|
-
var _a;
|
|
183
197
|
if (item.disabled) {
|
|
184
198
|
e.preventDefault();
|
|
185
199
|
return;
|
|
186
200
|
}
|
|
187
|
-
|
|
188
|
-
(_a = item.onSelect) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
201
|
+
selectItem(item);
|
|
189
202
|
},
|
|
190
203
|
children: left
|
|
191
204
|
}, item.key);
|
|
@@ -195,9 +208,7 @@ var CollapsibleMenu = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
195
208
|
className: itemClassName,
|
|
196
209
|
disabled: item.disabled,
|
|
197
210
|
onClick: function onClick() {
|
|
198
|
-
|
|
199
|
-
onActiveKeyChange === null || onActiveKeyChange === void 0 ? void 0 : onActiveKeyChange(item.key);
|
|
200
|
-
(_a = item.onSelect) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
211
|
+
return selectItem(item);
|
|
201
212
|
},
|
|
202
213
|
children: left
|
|
203
214
|
}, item.key);
|
|
@@ -234,7 +245,7 @@ var x = (y) => {
|
|
|
234
245
|
var x = {}; __nuri_require__.d(x, y); return x
|
|
235
246
|
}
|
|
236
247
|
var y = (x) => (() => (x))
|
|
237
|
-
module.exports = x({ ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef) });
|
|
248
|
+
module.exports = x({ ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["useCallback"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useCallback), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext), ["useRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useRef) });
|
|
238
249
|
|
|
239
250
|
/***/ },
|
|
240
251
|
|
|
@@ -339,7 +350,7 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
|
|
|
339
350
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
340
351
|
/******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
|
|
341
352
|
/******/ var installedChunks = {
|
|
342
|
-
/******/
|
|
353
|
+
/******/ 6311: 0
|
|
343
354
|
/******/ };
|
|
344
355
|
/******/
|
|
345
356
|
/******/ var installChunk = (data) => {
|
|
@@ -379,15 +390,17 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
|
|
|
379
390
|
/******/
|
|
380
391
|
/************************************************************************/
|
|
381
392
|
/******/
|
|
382
|
-
/******/ import * as __webpack_chunk_1__ from "./chunk-
|
|
393
|
+
/******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
|
|
383
394
|
/******/ __nuri_require__.C(__webpack_chunk_1__);
|
|
384
|
-
/******/ import * as __webpack_chunk_2__ from "./chunk-
|
|
395
|
+
/******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
|
|
385
396
|
/******/ __nuri_require__.C(__webpack_chunk_2__);
|
|
397
|
+
/******/ import * as __webpack_chunk_3__ from "./chunk-4917.js";
|
|
398
|
+
/******/ __nuri_require__.C(__webpack_chunk_3__);
|
|
386
399
|
/******/
|
|
387
400
|
/******/ // startup
|
|
388
401
|
/******/ // Load entry module and return exports
|
|
389
402
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
|
390
|
-
/******/ var __webpack_exports__ = __nuri_require__.O(undefined, [
|
|
403
|
+
/******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560,4917], () => (__nuri_require__(5932)))
|
|
391
404
|
/******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
|
|
392
405
|
/******/ const __webpack_exports__default = __webpack_exports__.A;
|
|
393
406
|
/******/ export { __webpack_exports__default as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ComponentType, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentPropsWithRef, ComponentType, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
3
|
import { IconName } from '../icon/icon-type';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
export interface BottomNavBadge {
|
|
5
6
|
/** 숫자. 없으면 점으로 그린다. 99 를 넘으면 99+ */
|
|
6
7
|
count?: number;
|
|
@@ -21,8 +22,10 @@ export interface BottomNavLinkProps {
|
|
|
21
22
|
className: string;
|
|
22
23
|
children: ReactNode;
|
|
23
24
|
'aria-current'?: 'page';
|
|
25
|
+
/** `track` 을 주면 누를 때 로그를 보낸다. 직접 만든 `linkComponent` 는 이 값을 `<a>` 에 넘긴다 */
|
|
26
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
24
27
|
}
|
|
25
|
-
export interface BottomNavProps extends StyleProps {
|
|
28
|
+
export interface BottomNavProps extends StyleProps, TrackProps {
|
|
26
29
|
items: BottomNavItem[];
|
|
27
30
|
/** 지금 화면의 탭 id. 주소에서 정하므로 탭 바가 스스로 바꾸지 않는다 */
|
|
28
31
|
value?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes } from './breadcrumb-props';
|
|
4
5
|
export type BreadcrumbRootProps = ComponentPropsWithRef<'nav'>;
|
|
5
6
|
export type BreadcrumbListProps = ComponentPropsWithRef<'ol'>;
|
|
@@ -17,7 +18,7 @@ export interface BreadcrumbItem {
|
|
|
17
18
|
/** 없으면 링크가 아닌 글자로 그린다. 마지막 항목은 href 가 있어도 현재 위치로 그린다. */
|
|
18
19
|
href?: string;
|
|
19
20
|
}
|
|
20
|
-
export interface BreadcrumbProps extends StyleProps {
|
|
21
|
+
export interface BreadcrumbProps extends StyleProps, TrackProps {
|
|
21
22
|
items: BreadcrumbItem[];
|
|
22
23
|
size?: (typeof sizes)[number];
|
|
23
24
|
/** 마지막(현재 위치) 항목이 아닌 항목을 클릭하면 그 id 로 불린다. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const variant: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined"];
|
|
1
|
+
export declare const variant: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined", "social"];
|
|
2
2
|
export declare const sizes: readonly ["xs", "s", "m", "l", "xl"];
|
|
3
3
|
export declare const ctaButtonProps: {
|
|
4
4
|
variant: {
|
|
5
5
|
type: "className";
|
|
6
6
|
className: string;
|
|
7
|
-
values: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined"];
|
|
7
|
+
values: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined", "social"];
|
|
8
8
|
default: "primary";
|
|
9
9
|
};
|
|
10
10
|
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes, variant } from './button-props';
|
|
4
5
|
export interface CommonButtonProps {
|
|
5
6
|
loading?: boolean;
|
|
@@ -8,10 +9,12 @@ export interface BaseButtonProps extends ComponentPropsWithRef<'button'>, Common
|
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
loadingComponent?: ReactNode;
|
|
10
11
|
}
|
|
11
|
-
export interface CTAButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps {
|
|
12
|
+
export interface CTAButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps, TrackProps {
|
|
12
13
|
variant?: (typeof variant)[number];
|
|
13
14
|
size?: (typeof sizes)[number];
|
|
14
15
|
text: string | ReactNode;
|
|
15
16
|
leftIcon?: ReactNode;
|
|
16
17
|
rightIcon?: ReactNode;
|
|
18
|
+
/** 버튼 오른쪽 위 모서리에 끼우는 말풍선(Callout) 글자. 글자는 움직이지 않는다. 로딩 중에는 Spinner 와 바뀌어 숨는다 */
|
|
19
|
+
callout?: ReactNode;
|
|
17
20
|
}
|
|
@@ -7,7 +7,7 @@ declare const meta: {
|
|
|
7
7
|
control: {
|
|
8
8
|
type: "select";
|
|
9
9
|
};
|
|
10
|
-
options: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined"];
|
|
10
|
+
options: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined", "social"];
|
|
11
11
|
};
|
|
12
12
|
size: {
|
|
13
13
|
control: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseCallout: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default BaseCallout;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 꼬리가 나오는 자리. `bottom-start` 는 말풍선 아래 왼쪽에서 아래를 가리킨다 */
|
|
2
|
+
export declare const tail: readonly ["bottom-start", "bottom-end", "top-start", "top-end"];
|
|
3
|
+
export declare const calloutProps: {
|
|
4
|
+
tail: {
|
|
5
|
+
type: "className";
|
|
6
|
+
className: string;
|
|
7
|
+
values: readonly ["bottom-start", "bottom-end", "top-start", "top-end"];
|
|
8
|
+
default: "bottom-start";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { tail } from './callout-props';
|
|
3
|
+
export type BaseCalloutProps = ComponentPropsWithRef<'span'>;
|
|
4
|
+
export interface CalloutProps extends Omit<ComponentPropsWithRef<'span'>, 'children'> {
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
tail?: (typeof tail)[number];
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CalloutProps } from './callout-type';
|
|
2
|
+
/** 대상에 붙어 늘 떠 있는 작은 말풍선 (ADR 0007). 자리는 쓰는 쪽이 정한다 — CTAButton 은 `callout` prop 으로 모서리에 끼운다 */
|
|
3
|
+
declare const Callout: import("react").ForwardRefExoticComponent<Omit<CalloutProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default Callout;
|
|
5
|
+
export type { CalloutProps } from './callout-type';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("./callout-type").CalloutProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
tail: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "select";
|
|
9
|
+
};
|
|
10
|
+
options: readonly ["bottom-start", "bottom-end", "top-start", "top-end"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
20
|
+
export declare const Tails: Story;
|
|
21
|
+
/** CTAButton 의 callout prop — 버튼 오른쪽 위 모서리에 끼운다 */
|
|
22
|
+
export declare const OnButton: Story;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes } from './check-box-props';
|
|
4
5
|
export interface CheckBoxRootProps {
|
|
5
6
|
checked?: boolean;
|
|
@@ -15,7 +16,7 @@ export interface CheckBoxLabelProps extends AsChildProps {
|
|
|
15
16
|
preventChangeOnClick?: boolean;
|
|
16
17
|
className?: string;
|
|
17
18
|
}
|
|
18
|
-
export interface CheckBoxProps extends CheckBoxRootProps {
|
|
19
|
+
export interface CheckBoxProps extends CheckBoxRootProps, TrackProps {
|
|
19
20
|
label: string | ReactNode;
|
|
20
21
|
size?: (typeof sizes)[number];
|
|
21
22
|
className?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
export interface ChipGroupItem {
|
|
4
5
|
id: string;
|
|
5
6
|
label: ReactNode;
|
|
@@ -7,7 +8,7 @@ export interface ChipGroupItem {
|
|
|
7
8
|
count?: number;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export interface ChipGroupProps extends StyleProps {
|
|
11
|
+
export interface ChipGroupProps extends StyleProps, TrackProps {
|
|
11
12
|
items: ChipGroupItem[];
|
|
12
13
|
value?: string;
|
|
13
14
|
defaultValue?: string;
|