@nurihaus/web-design-system 3.3.0 → 3.4.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.
Files changed (87) hide show
  1. package/README.md +36 -0
  2. package/dist/ai/components.md +120 -9
  3. package/dist/avatar.js +5 -5
  4. package/dist/bottom-nav.js +22 -8
  5. package/dist/breadcrumb.js +25 -10
  6. package/dist/check-box.js +24 -8
  7. package/dist/chip-group.js +21 -7
  8. package/dist/{chunk-563.js → chunk-1563.js} +26 -13
  9. package/dist/{chunk-657.js → chunk-1657.js} +2 -2
  10. package/dist/{chunk-777.js → chunk-2777.js} +2 -2
  11. package/dist/{chunk-558.js → chunk-4558.js} +2 -2
  12. package/dist/chunk-4560.js +77 -0
  13. package/dist/{chunk-917.js → chunk-4917.js} +2 -2
  14. package/dist/{chunk-77.js → chunk-5077.js} +2 -2
  15. package/dist/{chunk-149.js → chunk-6149.js} +2 -2
  16. package/dist/{chunk-302.js → chunk-6302.js} +2 -2
  17. package/dist/{chunk-364.js → chunk-6364.js} +2 -2
  18. package/dist/{chunk-713.js → chunk-6713.js} +2 -2
  19. package/dist/{chunk-298.js → chunk-7298.js} +2 -2
  20. package/dist/{chunk-653.js → chunk-7653.js} +2 -2
  21. package/dist/{chunk-739.js → chunk-7739.js} +2 -2
  22. package/dist/{chunk-309.js → chunk-8690.js} +2 -2
  23. package/dist/{chunk-933.js → chunk-8933.js} +2 -2
  24. package/dist/chunk-910.js +23 -10
  25. package/dist/{chunk-387.js → chunk-9387.js} +2 -2
  26. package/dist/{chunk-436.js → chunk-9436.js} +2 -2
  27. package/dist/{chunk-976.js → chunk-9976.js} +3 -3
  28. package/dist/collapsible-menu.js +25 -12
  29. package/dist/components/badge/badge-props.d.ts +4 -4
  30. package/dist/components/badge/badge.stories.d.ts +1 -1
  31. package/dist/components/bottom-nav/bottom-nav-type.d.ts +5 -2
  32. package/dist/components/breadcrumb/breadcrumb-type.d.ts +2 -1
  33. package/dist/components/button/button-props.d.ts +2 -2
  34. package/dist/components/button/button-type.d.ts +2 -1
  35. package/dist/components/button/button.stories.d.ts +1 -1
  36. package/dist/components/check-box/check-box-type.d.ts +2 -1
  37. package/dist/components/chip-group/chip-group-type.d.ts +2 -1
  38. package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +2 -1
  39. package/dist/components/drawer/drawer-type.d.ts +2 -1
  40. package/dist/components/drop-down/drop-down-type.d.ts +2 -1
  41. package/dist/components/logging/log-context.d.ts +9 -0
  42. package/dist/components/logging/logging-type.d.ts +25 -0
  43. package/dist/components/logging/logging.d.ts +5 -0
  44. package/dist/components/logging/logging.stories.d.ts +18 -0
  45. package/dist/components/modal/modal-type.d.ts +2 -1
  46. package/dist/components/pagination/pagination-type.d.ts +2 -1
  47. package/dist/components/radio/radio-type.d.ts +3 -1
  48. package/dist/components/radio/radio.d.ts +2 -1
  49. package/dist/components/radio/radio.stories.d.ts +1 -1
  50. package/dist/components/skeleton/skeleton.stories.d.ts +5 -5
  51. package/dist/components/switch/switch-type.d.ts +2 -1
  52. package/dist/components/table/table-type.d.ts +2 -1
  53. package/dist/components/tabs/tabs-type.d.ts +2 -1
  54. package/dist/components/text-area/text-area-type.d.ts +2 -1
  55. package/dist/components/text-field/text-field-type.d.ts +2 -1
  56. package/dist/components/toast/toast-type.d.ts +2 -1
  57. package/dist/components/toast/toast.stories.d.ts +8 -6
  58. package/dist/components/tooltip/tooltip-type.d.ts +2 -1
  59. package/dist/components.css +38 -0
  60. package/dist/cta-button.js +35 -20
  61. package/dist/data-table.js +19 -7
  62. package/dist/drawer.js +23 -9
  63. package/dist/drop-down.js +25 -9
  64. package/dist/helpers/hooks/useTrack.d.ts +3 -0
  65. package/dist/icon-text-badge.js +12 -10
  66. package/dist/icon-text-option-badge.js +6 -6
  67. package/dist/icon.js +5 -5
  68. package/dist/index.d.ts +2 -0
  69. package/dist/index.js +433 -80
  70. package/dist/loading.js +6 -6
  71. package/dist/logging.js +147 -0
  72. package/dist/modal-with-double-button.js +14 -12
  73. package/dist/modal.js +39 -26
  74. package/dist/option-badge.js +12 -10
  75. package/dist/pagination.js +23 -9
  76. package/dist/radio.js +24 -10
  77. package/dist/skeleton.js +4 -4
  78. package/dist/step-progress.js +3 -3
  79. package/dist/styles.css +32 -0
  80. package/dist/switch.js +24 -8
  81. package/dist/tabs.js +22 -6
  82. package/dist/text-area.js +30 -8
  83. package/dist/text-field.js +31 -9
  84. package/dist/text.js +5 -5
  85. package/dist/toast.js +32 -15
  86. package/dist/tooltip.js +33 -18
  87. package/package.json +5 -1
package/dist/skeleton.js CHANGED
@@ -277,8 +277,8 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
277
277
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
278
278
  /******/ var installedChunks = {
279
279
  /******/ 74: 0,
280
- /******/ 298: 0,
281
- /******/ 917: 0
280
+ /******/ 4917: 0,
281
+ /******/ 7298: 0
282
282
  /******/ };
283
283
  /******/
284
284
  /******/ var installChunk = (data) => {
@@ -318,13 +318,13 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
318
318
  /******/
319
319
  /************************************************************************/
320
320
  /******/
321
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
321
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
322
322
  /******/ __nuri_require__.C(__webpack_chunk_1__);
323
323
  /******/
324
324
  /******/ // startup
325
325
  /******/ // Load entry module and return exports
326
326
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
327
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364], () => (__nuri_require__(1144)))
327
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364], () => (__nuri_require__(1144)))
328
328
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
329
329
  /******/ const __webpack_exports__default = __webpack_exports__.A;
330
330
  /******/ export { __webpack_exports__default as default };
@@ -257,7 +257,7 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
257
257
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
258
258
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
259
259
  /******/ var installedChunks = {
260
- /******/ 347: 0
260
+ /******/ 8347: 0
261
261
  /******/ };
262
262
  /******/
263
263
  /******/ var installChunk = (data) => {
@@ -297,13 +297,13 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
297
297
  /******/
298
298
  /************************************************************************/
299
299
  /******/
300
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
300
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
301
301
  /******/ __nuri_require__.C(__webpack_chunk_1__);
302
302
  /******/
303
303
  /******/ // startup
304
304
  /******/ // Load entry module and return exports
305
305
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
306
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364], () => (__nuri_require__(7131)))
306
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364], () => (__nuri_require__(7131)))
307
307
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
308
308
  /******/ const __webpack_exports__default = __webpack_exports__.A;
309
309
  /******/ export { __webpack_exports__default as default };
package/dist/styles.css CHANGED
@@ -789,6 +789,29 @@ p {
789
789
  background-color: var(--color-white);
790
790
  border: var(--hairline) solid var(--color-grey-scale-300);
791
791
  }
792
+ /* 버튼 같은 대상의 모서리에 띄우는 말풍선 (ADR 0006). 자리는 쓰는 쪽이 정하고, 꼬리는 아래 왼쪽에서 대상을 가리킨다.
793
+ 흰 둘레로 밑에 깔린 같은 색 면(보라 버튼)과도 갈라 보인다. */
794
+ .variant-callout:is(.option,.icon-text,.icon-text-option) {
795
+ padding: 0 var(--spacing-10);
796
+ border-color: transparent;
797
+ border-radius: var(--radius-6);
798
+ color: var(--color-white);
799
+ background-color: var(--color-purple-900);
800
+ box-shadow:
801
+ 0 0 0 var(--spacing-2) var(--color-white),
802
+ var(--shadow-popover);
803
+ }
804
+ .variant-callout:is(.option,.icon-text,.icon-text-option)::after {
805
+ content: '';
806
+ position: absolute;
807
+ /* 꼬리(--spacing-8 정사각형) 한 변의 절반만큼 아래로 내려 반이 밖으로 나온다 */
808
+ bottom: calc(var(--spacing-4) * -1);
809
+ left: var(--spacing-12);
810
+ width: var(--spacing-8);
811
+ height: var(--spacing-8);
812
+ background-color: inherit;
813
+ transform: rotate(45deg);
814
+ }
792
815
  .base-bottom-nav:where(.root) {
793
816
  position: fixed;
794
817
  left: var(--spacing-16);
@@ -1076,6 +1099,15 @@ p {
1076
1099
  border: var(--hairline) solid var(--color-accent-red-700);
1077
1100
  color: var(--color-accent-red-700);
1078
1101
  }
1102
+ /* 소셜 로그인. Google·Apple 가이드의 흰 바탕·검정 글자 — 공급자 로고는 쓰는 쪽이 leftIcon 으로 (ADR 0006) */
1103
+ .cta-button.variant-social {
1104
+ background-color: var(--color-white);
1105
+ border: var(--hairline) solid var(--color-grey-scale-300);
1106
+ color: var(--color-black);
1107
+ }
1108
+ .cta-button.variant-social:not(:disabled):hover {
1109
+ background-color: var(--color-grey-scale-100);
1110
+ }
1079
1111
  .cta-button.size-xl {
1080
1112
  height: var(--control-height-xl);
1081
1113
  padding: 0 var(--spacing-24);
package/dist/switch.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
@@ -141,17 +143,29 @@ var switch_rest = undefined && undefined.__rest || function (s, e) {
141
143
 
142
144
 
143
145
 
146
+
144
147
  var Switch = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
145
148
  var className = props.className,
146
149
  label = props.label,
147
150
  size = props.size,
148
- restProps = switch_rest(props, ["className", "label", "size"]);
151
+ _onChange = props.onChange,
152
+ track = props.track,
153
+ trackProps = props.trackProps,
154
+ restProps = switch_rest(props, ["className", "label", "size", "onChange", "track", "trackProps"]);
155
+ var emit = (0,useTrack/* useTrack */.n)('Switch', {
156
+ track: track,
157
+ trackProps: trackProps
158
+ });
149
159
  var trackClassName = (0,getMergedProps/* getMergedProps */.p)({
150
160
  size: size
151
161
  }, switchTrackProps).className;
152
162
  return (0,jsx_runtime_.jsxs)(base_switch, switch_assign({
153
163
  ref: ref,
154
- className: (0,classNames/* classNames */.x)(className, 'switch')
164
+ className: (0,classNames/* classNames */.x)(className, 'switch'),
165
+ onChange: function onChange(checked) {
166
+ emit('change', checked ? 'on' : 'off');
167
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(checked);
168
+ }
155
169
  }, restProps, {
156
170
  children: [(0,jsx_runtime_.jsx)("span", {
157
171
  className: (0,classNames/* classNames */.x)(trackClassName, 'switch-track'),
@@ -187,7 +201,7 @@ var x = (y) => {
187
201
  var x = {}; __nuri_require__.d(x, y); return x
188
202
  }
189
203
  var y = (x) => (() => (x))
190
- module.exports = x({ ["Children"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.Children), ["cloneElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.cloneElement), ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["isValidElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext) });
204
+ module.exports = x({ ["Children"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.Children), ["cloneElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.cloneElement), ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["isValidElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement), ["useCallback"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useCallback), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext), ["useRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useRef) });
191
205
 
192
206
  /***/ },
193
207
 
@@ -292,7 +306,7 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
292
306
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
293
307
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
294
308
  /******/ var installedChunks = {
295
- /******/ 75: 0
309
+ /******/ 5075: 0
296
310
  /******/ };
297
311
  /******/
298
312
  /******/ var installChunk = (data) => {
@@ -332,17 +346,19 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
332
346
  /******/
333
347
  /************************************************************************/
334
348
  /******/
335
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
349
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
336
350
  /******/ __nuri_require__.C(__webpack_chunk_1__);
337
- /******/ import * as __webpack_chunk_2__ from "./chunk-777.js";
351
+ /******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
338
352
  /******/ __nuri_require__.C(__webpack_chunk_2__);
339
- /******/ import * as __webpack_chunk_3__ from "./chunk-298.js";
353
+ /******/ import * as __webpack_chunk_3__ from "./chunk-2777.js";
340
354
  /******/ __nuri_require__.C(__webpack_chunk_3__);
355
+ /******/ import * as __webpack_chunk_4__ from "./chunk-7298.js";
356
+ /******/ __nuri_require__.C(__webpack_chunk_4__);
341
357
  /******/
342
358
  /******/ // startup
343
359
  /******/ // Load entry module and return exports
344
360
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
345
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,777,298], () => (__nuri_require__(8614)))
361
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560,2777,7298], () => (__nuri_require__(8614)))
346
362
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
347
363
  /******/ const __webpack_exports__default = __webpack_exports__.A;
348
364
  /******/ export { __webpack_exports__default as default };
package/dist/tabs.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
@@ -199,17 +201,29 @@ var tabs_rest = undefined && undefined.__rest || function (s, e) {
199
201
 
200
202
 
201
203
 
204
+
202
205
  var Tabs = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
203
206
  var rootClassName = (0,getMergedProps/* getMergedProps */.p)(props, {}).className;
204
207
  var _a = (0,getMergedProps/* getMergedProps */.p)(props, tabsProps),
205
208
  items = _a.items,
206
209
  tabClassName = _a.className,
207
- restProps = tabs_rest(_a, ["items", "className"]);
210
+ _onValueChange = _a.onValueChange,
211
+ track = _a.track,
212
+ trackProps = _a.trackProps,
213
+ restProps = tabs_rest(_a, ["items", "className", "onValueChange", "track", "trackProps"]);
214
+ var emit = (0,useTrack/* useTrack */.n)('Tabs', {
215
+ track: track,
216
+ trackProps: trackProps
217
+ });
208
218
  var tabsTriggerClassName = (0,classNames/* classNames */.x)(tabClassName, 'tabs-trigger');
209
219
  var tabsContentClassName = (0,classNames/* classNames */.x)(tabClassName, 'tabs-content');
210
220
  return (0,jsx_runtime_.jsxs)(base_tabs, tabs_assign({
211
221
  ref: ref,
212
- className: (0,classNames/* classNames */.x)(rootClassName, 'tabs-root')
222
+ className: (0,classNames/* classNames */.x)(rootClassName, 'tabs-root'),
223
+ onValueChange: function onValueChange(id) {
224
+ emit('change', id !== null && id !== void 0 ? id : undefined);
225
+ _onValueChange === null || _onValueChange === void 0 ? void 0 : _onValueChange(id);
226
+ }
213
227
  }, restProps, {
214
228
  children: [(0,jsx_runtime_.jsxs)(base_tabs.List, {
215
229
  className: (0,classNames/* classNames */.x)(tabClassName, 'tabs-list'),
@@ -263,7 +277,7 @@ var x = (y) => {
263
277
  var x = {}; __nuri_require__.d(x, y); return x
264
278
  }
265
279
  var y = (x) => (() => (x))
266
- module.exports = x({ ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["useImperativeHandle"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle), ["useLayoutEffect"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect), ["useRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useRef), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
280
+ 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), ["useImperativeHandle"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle), ["useLayoutEffect"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect), ["useRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useRef), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
267
281
 
268
282
  /***/ },
269
283
 
@@ -368,7 +382,7 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
368
382
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
369
383
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
370
384
  /******/ var installedChunks = {
371
- /******/ 575: 0
385
+ /******/ 7575: 0
372
386
  /******/ };
373
387
  /******/
374
388
  /******/ var installChunk = (data) => {
@@ -408,13 +422,15 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
408
422
  /******/
409
423
  /************************************************************************/
410
424
  /******/
411
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
425
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
412
426
  /******/ __nuri_require__.C(__webpack_chunk_1__);
427
+ /******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
428
+ /******/ __nuri_require__.C(__webpack_chunk_2__);
413
429
  /******/
414
430
  /******/ // startup
415
431
  /******/ // Load entry module and return exports
416
432
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
417
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364], () => (__nuri_require__(3973)))
433
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560], () => (__nuri_require__(3973)))
418
434
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
419
435
  /******/ const __webpack_exports__default = __webpack_exports__.A;
420
436
  /******/ export { __webpack_exports__default as default };
package/dist/text-area.js CHANGED
@@ -16,6 +16,8 @@ __nuri_require__.d(__webpack_exports__, {
16
16
  var jsx_runtime_ = __nuri_require__(612);
17
17
  // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
18
18
  var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
19
+ // EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
20
+ var useTrack = __nuri_require__(4560);
19
21
  // EXTERNAL MODULE: ./helpers/utils/classNames.js
20
22
  var classNames = __nuri_require__(3274);
21
23
  // EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
@@ -165,6 +167,7 @@ var text_area_rest = undefined && undefined.__rest || function (s, e) {
165
167
 
166
168
 
167
169
 
170
+
168
171
  var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
169
172
  var _a = (0,getMergedProps/* getMergedProps */.p)(props, textAreaProps),
170
173
  className = _a.className,
@@ -175,7 +178,16 @@ var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
175
178
  defaultValue = _a.defaultValue,
176
179
  helperText = _a.helperText,
177
180
  isError = _a.isError,
178
- restProps = text_area_rest(_a, ["className", "style", "title", "value", "onChange", "defaultValue", "helperText", "isError"]);
181
+ _onFocus = _a.onFocus,
182
+ _onBlur = _a.onBlur,
183
+ track = _a.track,
184
+ trackProps = _a.trackProps,
185
+ restProps = text_area_rest(_a, ["className", "style", "title", "value", "onChange", "defaultValue", "helperText", "isError", "onFocus", "onBlur", "track", "trackProps"]);
186
+ var emit = (0,useTrack/* useTrack */.n)('TextArea', {
187
+ track: track,
188
+ trackProps: trackProps
189
+ });
190
+ var focusedValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
179
191
  return (0,jsx_runtime_.jsx)(base_text_area, {
180
192
  value: value,
181
193
  onChange: onChange,
@@ -189,7 +201,15 @@ var TextArea = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_reac
189
201
  className: (0,classNames/* classNames */.x)('nuri-theme text-area-input-wrapper', className),
190
202
  style: style,
191
203
  children: (0,jsx_runtime_.jsx)(base_text_area.Textarea, text_area_assign({
192
- ref: ref
204
+ ref: ref,
205
+ onFocus: function onFocus(e) {
206
+ focusedValueRef.current = e.target.value;
207
+ _onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(e);
208
+ },
209
+ onBlur: function onBlur(e) {
210
+ if (e.target.value !== focusedValueRef.current) emit('change');
211
+ _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
212
+ }
193
213
  }, restProps))
194
214
  }), helperText && (0,jsx_runtime_.jsx)(base_text_area.HelperText, {
195
215
  className: (0,classNames/* classNames */.x)('text-area-helper-text', isError && 'error'),
@@ -210,7 +230,7 @@ var x = (y) => {
210
230
  var x = {}; __nuri_require__.d(x, y); return x
211
231
  }
212
232
  var y = (x) => (() => (x))
213
- module.exports = x({ ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
233
+ 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), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
214
234
 
215
235
  /***/ },
216
236
 
@@ -355,19 +375,21 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
355
375
  /******/
356
376
  /************************************************************************/
357
377
  /******/
358
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
378
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
359
379
  /******/ __nuri_require__.C(__webpack_chunk_1__);
360
- /******/ import * as __webpack_chunk_2__ from "./chunk-917.js";
380
+ /******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
361
381
  /******/ __nuri_require__.C(__webpack_chunk_2__);
362
- /******/ import * as __webpack_chunk_3__ from "./chunk-558.js";
382
+ /******/ import * as __webpack_chunk_3__ from "./chunk-4917.js";
363
383
  /******/ __nuri_require__.C(__webpack_chunk_3__);
364
- /******/ import * as __webpack_chunk_4__ from "./chunk-739.js";
384
+ /******/ import * as __webpack_chunk_4__ from "./chunk-4558.js";
365
385
  /******/ __nuri_require__.C(__webpack_chunk_4__);
386
+ /******/ import * as __webpack_chunk_5__ from "./chunk-7739.js";
387
+ /******/ __nuri_require__.C(__webpack_chunk_5__);
366
388
  /******/
367
389
  /******/ // startup
368
390
  /******/ // Load entry module and return exports
369
391
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
370
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,917,558,739], () => (__nuri_require__(4794)))
392
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560,4917,4558,7739], () => (__nuri_require__(4794)))
371
393
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
372
394
  /******/ const __webpack_exports__default = __webpack_exports__.A;
373
395
  /******/ export { __webpack_exports__default as default };
@@ -16,6 +16,8 @@ __nuri_require__.d(__webpack_exports__, {
16
16
  var jsx_runtime_ = __nuri_require__(612);
17
17
  // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
18
18
  var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
19
+ // EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
20
+ var useTrack = __nuri_require__(4560);
19
21
  // EXTERNAL MODULE: ./helpers/utils/classNames.js
20
22
  var classNames = __nuri_require__(3274);
21
23
  // EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
@@ -158,6 +160,7 @@ var text_field_rest = undefined && undefined.__rest || function (s, e) {
158
160
 
159
161
 
160
162
 
163
+
161
164
  var TextField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
162
165
  var _a = (0,getMergedProps/* getMergedProps */.p)(props, textFieldProps),
163
166
  className = _a.className,
@@ -170,7 +173,16 @@ var TextField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
170
173
  defaultValue = _a.defaultValue,
171
174
  helperText = _a.helperText,
172
175
  isError = _a.isError,
173
- restProps = text_field_rest(_a, ["className", "style", "leftIcon", "rightIcon", "title", "value", "onChange", "defaultValue", "helperText", "isError"]);
176
+ _onFocus = _a.onFocus,
177
+ _onBlur = _a.onBlur,
178
+ track = _a.track,
179
+ trackProps = _a.trackProps,
180
+ restProps = text_field_rest(_a, ["className", "style", "leftIcon", "rightIcon", "title", "value", "onChange", "defaultValue", "helperText", "isError", "onFocus", "onBlur", "track", "trackProps"]);
181
+ var emit = (0,useTrack/* useTrack */.n)('TextField', {
182
+ track: track,
183
+ trackProps: trackProps
184
+ });
185
+ var focusedValueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useRef)('');
174
186
  return (0,jsx_runtime_.jsx)(base_text_field, {
175
187
  value: value,
176
188
  onChange: onChange,
@@ -184,7 +196,15 @@ var TextField = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
184
196
  className: (0,classNames/* classNames */.x)('nuri-theme text-field-input-wrapper', className),
185
197
  style: style,
186
198
  children: [leftIcon, (0,jsx_runtime_.jsx)(base_text_field.Input, text_field_assign({
187
- ref: ref
199
+ ref: ref,
200
+ onFocus: function onFocus(e) {
201
+ focusedValueRef.current = e.target.value;
202
+ _onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(e);
203
+ },
204
+ onBlur: function onBlur(e) {
205
+ if (e.target.value !== focusedValueRef.current) emit('change');
206
+ _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
207
+ }
188
208
  }, restProps)), rightIcon]
189
209
  }), helperText && (0,jsx_runtime_.jsx)(base_text_field.HelperText, {
190
210
  className: (0,classNames/* classNames */.x)('text-field-helper-text', isError && 'error'),
@@ -205,7 +225,7 @@ var x = (y) => {
205
225
  var x = {}; __nuri_require__.d(x, y); return x
206
226
  }
207
227
  var y = (x) => (() => (x))
208
- module.exports = x({ ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
228
+ 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), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
209
229
 
210
230
  /***/ },
211
231
 
@@ -310,7 +330,7 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
310
330
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
311
331
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
312
332
  /******/ var installedChunks = {
313
- /******/ 489: 0
333
+ /******/ 6489: 0
314
334
  /******/ };
315
335
  /******/
316
336
  /******/ var installChunk = (data) => {
@@ -350,19 +370,21 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
350
370
  /******/
351
371
  /************************************************************************/
352
372
  /******/
353
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
373
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
354
374
  /******/ __nuri_require__.C(__webpack_chunk_1__);
355
- /******/ import * as __webpack_chunk_2__ from "./chunk-917.js";
375
+ /******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
356
376
  /******/ __nuri_require__.C(__webpack_chunk_2__);
357
- /******/ import * as __webpack_chunk_3__ from "./chunk-558.js";
377
+ /******/ import * as __webpack_chunk_3__ from "./chunk-4917.js";
358
378
  /******/ __nuri_require__.C(__webpack_chunk_3__);
359
- /******/ import * as __webpack_chunk_4__ from "./chunk-739.js";
379
+ /******/ import * as __webpack_chunk_4__ from "./chunk-4558.js";
360
380
  /******/ __nuri_require__.C(__webpack_chunk_4__);
381
+ /******/ import * as __webpack_chunk_5__ from "./chunk-7739.js";
382
+ /******/ __nuri_require__.C(__webpack_chunk_5__);
361
383
  /******/
362
384
  /******/ // startup
363
385
  /******/ // Load entry module and return exports
364
386
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
365
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,917,558,739], () => (__nuri_require__(295)))
387
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560,4917,4558,7739], () => (__nuri_require__(295)))
366
388
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
367
389
  /******/ const __webpack_exports__default = __webpack_exports__.A;
368
390
  /******/ export { __webpack_exports__default as default };
package/dist/text.js CHANGED
@@ -177,8 +177,8 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
177
177
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
178
178
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
179
179
  /******/ var installedChunks = {
180
- /******/ 739: 0,
181
- /******/ 826: 0
180
+ /******/ 7739: 0,
181
+ /******/ 8826: 0
182
182
  /******/ };
183
183
  /******/
184
184
  /******/ var installChunk = (data) => {
@@ -218,15 +218,15 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
218
218
  /******/
219
219
  /************************************************************************/
220
220
  /******/
221
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
221
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
222
222
  /******/ __nuri_require__.C(__webpack_chunk_1__);
223
- /******/ import * as __webpack_chunk_2__ from "./chunk-558.js";
223
+ /******/ import * as __webpack_chunk_2__ from "./chunk-4558.js";
224
224
  /******/ __nuri_require__.C(__webpack_chunk_2__);
225
225
  /******/
226
226
  /******/ // startup
227
227
  /******/ // Load entry module and return exports
228
228
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
229
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,558], () => (__nuri_require__(7739)))
229
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4558], () => (__nuri_require__(7739)))
230
230
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
231
231
  /******/ const __webpack_exports__default = __webpack_exports__.A;
232
232
  /******/ export { __webpack_exports__default as default };
package/dist/toast.js CHANGED
@@ -206,6 +206,8 @@ var SvgExclamation = function SvgExclamation(props) {
206
206
  /* harmony default export */ const exclamation = (SvgExclamation);
207
207
  // EXTERNAL MODULE: ./assets/icons/multifly.svg
208
208
  var multifly = __nuri_require__(6713);
209
+ // EXTERNAL MODULE: ./helpers/hooks/useTrack.ts
210
+ var useTrack = __nuri_require__(4560);
209
211
  // EXTERNAL MODULE: ./helpers/utils/classNames.js
210
212
  var classNames = __nuri_require__(3274);
211
213
  // EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
@@ -246,6 +248,7 @@ var __rest = undefined && undefined.__rest || function (s, e) {
246
248
 
247
249
 
248
250
 
251
+
249
252
  // 상태를 뜻하는 variant 는 앞에 아이콘을 둔다. error 는 닫기와 같은 X 를 쓴다
250
253
  var VARIANT_ICON = {
251
254
  success: check/* default */.A,
@@ -253,14 +256,26 @@ var VARIANT_ICON = {
253
256
  error: multifly/* default */.A
254
257
  };
255
258
  var Toast = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
259
+ var _a, _b;
256
260
  var className = props.className,
257
261
  title = props.title,
258
262
  description = props.description,
259
263
  variant = props.variant,
260
264
  action = props.action,
261
- _a = props.showClose,
262
- showClose = _a === void 0 ? true : _a,
263
- restProps = __rest(props, ["className", "title", "description", "variant", "action", "showClose"]);
265
+ _c = props.showClose,
266
+ showClose = _c === void 0 ? true : _c,
267
+ track = props.track,
268
+ trackProps = props.trackProps,
269
+ restProps = __rest(props, ["className", "title", "description", "variant", "action", "showClose", "track", "trackProps"]);
270
+ var emit = (0,useTrack/* useTrack */.n)('Toast', {
271
+ track: track,
272
+ trackProps: trackProps
273
+ });
274
+ // Radix 는 open·defaultOpen 이 없으면 연 채로 시작한다. Radix 가 스스로 닫는 것은 이 값에 보이지 않아 다시 보내지 않는다.
275
+ var shown = (_b = (_a = restProps.open) !== null && _a !== void 0 ? _a : restProps.defaultOpen) !== null && _b !== void 0 ? _b : true;
276
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useEffect)(function () {
277
+ if (shown) emit('show');
278
+ }, [shown]);
264
279
  var variantClassName = (0,getMergedProps/* getMergedProps */.p)({
265
280
  className: className,
266
281
  variant: variant
@@ -322,7 +337,7 @@ var x = (y) => {
322
337
  var x = {}; __nuri_require__.d(x, y); return x
323
338
  }
324
339
  var y = (x) => (() => (x))
325
- module.exports = x({ ["Children"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.Children), ["cloneElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.cloneElement), ["createElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createElement), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["isValidElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement) });
340
+ module.exports = x({ ["Children"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.Children), ["cloneElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.cloneElement), ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["createElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createElement), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["isValidElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement), ["useCallback"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useCallback), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext), ["useEffect"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useEffect), ["useRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useRef) });
326
341
 
327
342
  /***/ },
328
343
 
@@ -427,7 +442,7 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
427
442
  /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
428
443
  /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
429
444
  /******/ var installedChunks = {
430
- /******/ 448: 0
445
+ /******/ 2448: 0
431
446
  /******/ };
432
447
  /******/
433
448
  /******/ var installChunk = (data) => {
@@ -467,29 +482,31 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
467
482
  /******/
468
483
  /************************************************************************/
469
484
  /******/
470
- /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
485
+ /******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
471
486
  /******/ __nuri_require__.C(__webpack_chunk_1__);
472
- /******/ import * as __webpack_chunk_2__ from "./chunk-777.js";
487
+ /******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
473
488
  /******/ __nuri_require__.C(__webpack_chunk_2__);
474
- /******/ import * as __webpack_chunk_3__ from "./chunk-298.js";
489
+ /******/ import * as __webpack_chunk_3__ from "./chunk-2777.js";
475
490
  /******/ __nuri_require__.C(__webpack_chunk_3__);
476
- /******/ import * as __webpack_chunk_4__ from "./chunk-933.js";
491
+ /******/ import * as __webpack_chunk_4__ from "./chunk-7298.js";
477
492
  /******/ __nuri_require__.C(__webpack_chunk_4__);
478
- /******/ import * as __webpack_chunk_5__ from "./chunk-302.js";
493
+ /******/ import * as __webpack_chunk_5__ from "./chunk-8933.js";
479
494
  /******/ __nuri_require__.C(__webpack_chunk_5__);
480
- /******/ import * as __webpack_chunk_6__ from "./chunk-713.js";
495
+ /******/ import * as __webpack_chunk_6__ from "./chunk-6302.js";
481
496
  /******/ __nuri_require__.C(__webpack_chunk_6__);
482
- /******/ import * as __webpack_chunk_7__ from "./chunk-976.js";
497
+ /******/ import * as __webpack_chunk_7__ from "./chunk-6713.js";
483
498
  /******/ __nuri_require__.C(__webpack_chunk_7__);
484
- /******/ import * as __webpack_chunk_8__ from "./chunk-910.js";
499
+ /******/ import * as __webpack_chunk_8__ from "./chunk-9976.js";
485
500
  /******/ __nuri_require__.C(__webpack_chunk_8__);
486
- /******/ import * as __webpack_chunk_9__ from "./chunk-77.js";
501
+ /******/ import * as __webpack_chunk_9__ from "./chunk-910.js";
487
502
  /******/ __nuri_require__.C(__webpack_chunk_9__);
503
+ /******/ import * as __webpack_chunk_10__ from "./chunk-5077.js";
504
+ /******/ __nuri_require__.C(__webpack_chunk_10__);
488
505
  /******/
489
506
  /******/ // startup
490
507
  /******/ // Load entry module and return exports
491
508
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
492
- /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,777,298,933,302,713,976,910,77], () => (__nuri_require__(4012)))
509
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560,2777,7298,8933,6302,6713,9976,910,5077], () => (__nuri_require__(4012)))
493
510
  /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
494
511
  /******/ const __webpack_exports__ToastProvider = __webpack_exports__.t;
495
512
  /******/ const __webpack_exports__default = __webpack_exports__.A;