@nurihaus/web-design-system 3.0.0 → 3.0.3

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 (124) hide show
  1. package/README.md +104 -5
  2. package/dist/.storybook/story-kit.d.ts +18 -0
  3. package/dist/ai/components.md +742 -0
  4. package/dist/ai/tokens.md +319 -0
  5. package/dist/avatar.js +336 -0
  6. package/dist/check-box.js +379 -0
  7. package/dist/chunk-149.js +57 -0
  8. package/dist/chunk-298.js +34 -0
  9. package/dist/chunk-302.js +105 -0
  10. package/dist/chunk-309.js +36 -0
  11. package/dist/chunk-364.js +126 -0
  12. package/dist/chunk-387.js +37 -0
  13. package/dist/chunk-558.js +200 -0
  14. package/dist/chunk-563.js +181 -0
  15. package/dist/chunk-739.js +68 -0
  16. package/dist/chunk-777.js +117 -0
  17. package/dist/chunk-917.js +35 -0
  18. package/dist/chunk-933.js +70 -0
  19. package/dist/chunk-976.js +29 -0
  20. package/dist/collapsible-menu.js +394 -0
  21. package/dist/components/avatar/avatar-props.d.ts +2 -6
  22. package/dist/components/avatar/avatar-type.d.ts +4 -5
  23. package/dist/components/avatar/avatar.d.ts +1 -0
  24. package/dist/components/avatar/avatar.stories.d.ts +17 -1
  25. package/dist/components/badge/badge-props.d.ts +17 -80
  26. package/dist/components/badge/badge-type.d.ts +38 -2
  27. package/dist/components/badge/badge.stories.d.ts +25 -2
  28. package/dist/components/badge/base-badge.d.ts +2 -1
  29. package/dist/components/badge/icon-text-badge.d.ts +3 -21
  30. package/dist/components/badge/icon-text-option-badge.d.ts +2 -15
  31. package/dist/components/badge/option-badge.d.ts +3 -20
  32. package/dist/components/button/button-props.d.ts +2 -7
  33. package/dist/components/button/button-type.d.ts +11 -3
  34. package/dist/components/button/button.stories.d.ts +13 -10
  35. package/dist/components/button/cta-button.d.ts +3 -12
  36. package/dist/components/check-box/base-check-box.d.ts +9 -5
  37. package/dist/components/check-box/check-box-props.d.ts +2 -7
  38. package/dist/components/check-box/check-box-type.d.ts +11 -4
  39. package/dist/components/check-box/check-box.d.ts +3 -10
  40. package/dist/components/check-box/check-box.stories.d.ts +19 -4
  41. package/dist/components/collapsible-menu/base-collapsible-menu.d.ts +9 -5
  42. package/dist/components/collapsible-menu/collapsible-menu-props.d.ts +3 -12
  43. package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +33 -9
  44. package/dist/components/collapsible-menu/collapsible-menu.d.ts +3 -23
  45. package/dist/components/collapsible-menu/collapsible-menu.stories.d.ts +20 -4
  46. package/dist/components/drop-down/base-drop-down.d.ts +11 -3
  47. package/dist/components/drop-down/drop-down-props.d.ts +3 -12
  48. package/dist/components/drop-down/drop-down-type.d.ts +34 -15
  49. package/dist/components/drop-down/drop-down.d.ts +3 -32
  50. package/dist/components/drop-down/drop-down.stories.d.ts +23 -4
  51. package/dist/components/elements/text/base-text.d.ts +3 -0
  52. package/dist/components/elements/text/text-props.d.ts +16 -0
  53. package/dist/components/elements/text/text-type.d.ts +6 -2
  54. package/dist/components/elements/text/text.d.ts +2 -1
  55. package/dist/components/elements/text/text.stories.d.ts +43 -3
  56. package/dist/components/loading/index.d.ts +6 -6
  57. package/dist/components/loading/inline-loading/base-inline-loading.d.ts +3 -0
  58. package/dist/components/loading/inline-loading/inline-loading-props.d.ts +9 -0
  59. package/dist/components/loading/inline-loading/inline-loading-type.d.ts +8 -6
  60. package/dist/components/loading/inline-loading/inline-loading.d.ts +3 -2
  61. package/dist/components/loading/inline-loading/inline-loading.stories.d.ts +5 -9
  62. package/dist/components/loading/overlay-loading/base-overlay-loading.d.ts +3 -0
  63. package/dist/components/loading/overlay-loading/overlay-loading-props.d.ts +7 -0
  64. package/dist/components/loading/overlay-loading/overlay-loading-type.d.ts +6 -3
  65. package/dist/components/loading/overlay-loading/overlay-loading.d.ts +3 -3
  66. package/dist/components/loading/overlay-loading/overlay-loading.stories.d.ts +8 -8
  67. package/dist/components/loading/spinner/base-spinner.d.ts +4 -0
  68. package/dist/components/loading/spinner/spinner-props.d.ts +1 -0
  69. package/dist/components/loading/spinner/spinner-type.d.ts +4 -4
  70. package/dist/components/loading/spinner/spinner.d.ts +2 -2
  71. package/dist/components/loading/spinner/spinner.stories.d.ts +5 -12
  72. package/dist/components/modal/base-modal.d.ts +17 -5
  73. package/dist/components/modal/modal-props.d.ts +2 -7
  74. package/dist/components/modal/modal-type.d.ts +20 -10
  75. package/dist/components/modal/modal-with-double-button.d.ts +4 -16
  76. package/dist/components/modal/modal.stories.d.ts +15 -2
  77. package/dist/components/radio/base-radio.d.ts +9 -5
  78. package/dist/components/radio/radio-props.d.ts +1 -0
  79. package/dist/components/radio/radio-type.d.ts +6 -8
  80. package/dist/components/radio/radio.d.ts +2 -2
  81. package/dist/components/radio/radio.stories.d.ts +13 -4
  82. package/dist/components/table/base-table.d.ts +4 -5
  83. package/dist/components/table/data-table.d.ts +5 -22
  84. package/dist/components/table/table-type.d.ts +22 -1
  85. package/dist/components/table/table.stories.d.ts +19 -3
  86. package/dist/components/tabs/base-tabs.d.ts +7 -7
  87. package/dist/components/tabs/tabs-props.d.ts +1 -1
  88. package/dist/components/tabs/tabs-type.d.ts +9 -13
  89. package/dist/components/tabs/tabs.d.ts +3 -3
  90. package/dist/components/tabs/tabs.stories.d.ts +16 -10
  91. package/dist/components/text-field/base-text-field.d.ts +5 -3
  92. package/dist/components/text-field/text-field-props.d.ts +3 -12
  93. package/dist/components/text-field/text-field-type.d.ts +14 -0
  94. package/dist/components/text-field/text-field.d.ts +3 -16
  95. package/dist/components/text-field/text-field.stories.d.ts +24 -0
  96. package/dist/components/tooltip/base-tooltip.d.ts +13 -3
  97. package/dist/components/tooltip/tooltip-props.d.ts +3 -2
  98. package/dist/components/tooltip/tooltip-type.d.ts +17 -5
  99. package/dist/components/tooltip/tooltip.d.ts +4 -7
  100. package/dist/components/tooltip/tooltip.stories.d.ts +21 -4
  101. package/dist/components.css +1984 -0
  102. package/dist/cta-button.js +236 -0
  103. package/dist/data-table.js +386 -0
  104. package/dist/drop-down.js +433 -0
  105. package/dist/helpers/props/common-props.d.ts +7 -0
  106. package/dist/helpers/types/common-props.d.ts +8 -0
  107. package/dist/icon-text-badge.js +294 -0
  108. package/dist/icon-text-option-badge.js +270 -0
  109. package/dist/index.d.ts +17 -1
  110. package/dist/index.js +3021 -10637
  111. package/dist/loading.js +383 -0
  112. package/dist/modal-with-double-button.js +527 -0
  113. package/dist/option-badge.js +293 -0
  114. package/dist/radio.js +363 -0
  115. package/dist/reset.css +45 -0
  116. package/dist/styles.css +785 -559
  117. package/dist/tabs.js +421 -0
  118. package/dist/text-field.js +369 -0
  119. package/dist/text.js +233 -0
  120. package/dist/tokens.css +73 -0
  121. package/dist/tokens.js +4 -6
  122. package/dist/tooltip.js +360 -0
  123. package/package.json +91 -14
  124. package/dist/components/text-field/text-filed.stories.d.ts +0 -8
@@ -0,0 +1,293 @@
1
+ "use client";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_radix_ui_3bc96d1b__ from "radix-ui";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__ from "react/jsx-runtime";
5
+ /******/ var __webpack_modules__ = ({
6
+
7
+ /***/ 538
8
+ (__unused_webpack_module, __webpack_exports__, __nuri_require__) {
9
+
10
+ /* harmony export */ __nuri_require__.d(__webpack_exports__, {
11
+ /* harmony export */ f_: () => (/* binding */ optionBadgeProps)
12
+ /* harmony export */ });
13
+ /* unused harmony exports variant, sizes, iconTextBadgeProps, iconTextOptionBadgeProps */
14
+ /* harmony import */ var _helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(298);
15
+ var __assign = undefined && undefined.__assign || function () {
16
+ __assign = Object.assign || function (t) {
17
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
18
+ s = arguments[i];
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
20
+ }
21
+ return t;
22
+ };
23
+ return __assign.apply(this, arguments);
24
+ };
25
+
26
+ var variant = ['neutral', 'primary', 'danger', 'outlined'];
27
+ var sizes = ['xs', 's', 'm', 'l', 'xl'];
28
+ var commonBadgeProps = {
29
+ variant: {
30
+ type: 'className',
31
+ className: 'variant',
32
+ values: variant,
33
+ "default": 'neutral'
34
+ },
35
+ size: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .sizeProp */ .lw)(sizes, 'xl'),
36
+ width: (0,_helpers_props_common_props__WEBPACK_IMPORTED_MODULE_0__/* .widthProp */ .Iw)('100%')
37
+ };
38
+ var iconTextBadgeProps = __assign({}, commonBadgeProps);
39
+ var iconTextOptionBadgeProps = __assign({}, commonBadgeProps);
40
+ var optionBadgeProps = __assign({}, commonBadgeProps);
41
+
42
+ /***/ },
43
+
44
+ /***/ 401
45
+ (__unused_webpack_module, __webpack_exports__, __nuri_require__) {
46
+
47
+ /* harmony export */ __nuri_require__.d(__webpack_exports__, {
48
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
49
+ /* harmony export */ });
50
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
51
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(41);
52
+ /* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(274);
53
+ /* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(335);
54
+ /* harmony import */ var _tooltip_tooltip__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(563);
55
+ /* harmony import */ var _badge_props__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(538);
56
+ /* harmony import */ var _base_badge__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(149);
57
+ var __assign = undefined && undefined.__assign || function () {
58
+ __assign = Object.assign || function (t) {
59
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
60
+ s = arguments[i];
61
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
62
+ }
63
+ return t;
64
+ };
65
+ return __assign.apply(this, arguments);
66
+ };
67
+ var __rest = undefined && undefined.__rest || function (s, e) {
68
+ var t = {};
69
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
70
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
71
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
72
+ }
73
+ return t;
74
+ };
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+ var OptionBadge = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
83
+ var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_3__/* .getMergedProps */ .p)(props, _badge_props__WEBPACK_IMPORTED_MODULE_5__/* .optionBadgeProps */ .f_),
84
+ className = _a.className,
85
+ option = _a.option,
86
+ tooltip = _a.tooltip,
87
+ restProps = __rest(_a, ["className", "option", "tooltip"]);
88
+ var badge = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_base_badge__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, __assign({
89
+ ref: ref,
90
+ className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)(className, 'option')
91
+ }, restProps, {
92
+ children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
93
+ children: option
94
+ })
95
+ }));
96
+ return tooltip ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tooltip_tooltip__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, {
97
+ trigger: badge,
98
+ content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
99
+ children: tooltip.content
100
+ }),
101
+ direction: tooltip.position,
102
+ delayDuration: tooltip.delayDuration
103
+ }) : badge;
104
+ });
105
+ OptionBadge.displayName = 'OptionBadge';
106
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OptionBadge);
107
+
108
+ /***/ },
109
+
110
+ /***/ 0
111
+ (module, __unused_webpack_exports, __nuri_require__) {
112
+
113
+ var x = (y) => {
114
+ var x = {}; __nuri_require__.d(x, y); return x
115
+ }
116
+ var y = (x) => (() => (x))
117
+ module.exports = x({ ["Tooltip"]: () => (__WEBPACK_EXTERNAL_MODULE_radix_ui_3bc96d1b__.Tooltip) });
118
+
119
+ /***/ },
120
+
121
+ /***/ 41
122
+ (module, __unused_webpack_exports, __nuri_require__) {
123
+
124
+ var x = (y) => {
125
+ var x = {}; __nuri_require__.d(x, y); return x
126
+ }
127
+ var y = (x) => (() => (x))
128
+ 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) });
129
+
130
+ /***/ },
131
+
132
+ /***/ 612
133
+ (module, __unused_webpack_exports, __nuri_require__) {
134
+
135
+ var x = (y) => {
136
+ var x = {}; __nuri_require__.d(x, y); return x
137
+ }
138
+ var y = (x) => (() => (x))
139
+ module.exports = x({ ["Fragment"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__.Fragment), ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__.jsx), ["jsxs"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__.jsxs) });
140
+
141
+ /***/ }
142
+
143
+ /******/ });
144
+ /************************************************************************/
145
+ /******/ // The module cache
146
+ /******/ var __webpack_module_cache__ = {};
147
+ /******/
148
+ /******/ // The require function
149
+ /******/ function __nuri_require__(moduleId) {
150
+ /******/ // Check if module is in cache
151
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
152
+ /******/ if (cachedModule !== undefined) {
153
+ /******/ return cachedModule.exports;
154
+ /******/ }
155
+ /******/ // Create a new module (and put it into the cache)
156
+ /******/ var module = __webpack_module_cache__[moduleId] = {
157
+ /******/ // no module.id needed
158
+ /******/ // no module.loaded needed
159
+ /******/ exports: {}
160
+ /******/ };
161
+ /******/
162
+ /******/ // Execute the module function
163
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nuri_require__);
164
+ /******/
165
+ /******/ // Return the exports of the module
166
+ /******/ return module.exports;
167
+ /******/ }
168
+ /******/
169
+ /******/ // expose the modules object (__webpack_modules__)
170
+ /******/ __nuri_require__.m = __webpack_modules__;
171
+ /******/
172
+ /************************************************************************/
173
+ /******/ /* webpack/runtime/chunk loaded */
174
+ /******/ (() => {
175
+ /******/ var deferred = [];
176
+ /******/ __nuri_require__.O = (result, chunkIds, fn, priority) => {
177
+ /******/ if(chunkIds) {
178
+ /******/ priority = priority || 0;
179
+ /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
180
+ /******/ deferred[i] = [chunkIds, fn, priority];
181
+ /******/ return;
182
+ /******/ }
183
+ /******/ var notFulfilled = Infinity;
184
+ /******/ for (var i = 0; i < deferred.length; i++) {
185
+ /******/ var [chunkIds, fn, priority] = deferred[i];
186
+ /******/ var fulfilled = true;
187
+ /******/ for (var j = 0; j < chunkIds.length; j++) {
188
+ /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__nuri_require__.O).every((key) => (__nuri_require__.O[key](chunkIds[j])))) {
189
+ /******/ chunkIds.splice(j--, 1);
190
+ /******/ } else {
191
+ /******/ fulfilled = false;
192
+ /******/ if(priority < notFulfilled) notFulfilled = priority;
193
+ /******/ }
194
+ /******/ }
195
+ /******/ if(fulfilled) {
196
+ /******/ deferred.splice(i--, 1)
197
+ /******/ var r = fn();
198
+ /******/ if (r !== undefined) result = r;
199
+ /******/ }
200
+ /******/ }
201
+ /******/ return result;
202
+ /******/ };
203
+ /******/ })();
204
+ /******/
205
+ /******/ /* webpack/runtime/define property getters */
206
+ /******/ (() => {
207
+ /******/ // define getter functions for harmony exports
208
+ /******/ __nuri_require__.d = (exports, definition) => {
209
+ /******/ for(var key in definition) {
210
+ /******/ if(__nuri_require__.o(definition, key) && !__nuri_require__.o(exports, key)) {
211
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
212
+ /******/ }
213
+ /******/ }
214
+ /******/ };
215
+ /******/ })();
216
+ /******/
217
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
218
+ /******/ (() => {
219
+ /******/ __nuri_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
220
+ /******/ })();
221
+ /******/
222
+ /******/ /* webpack/runtime/export webpack runtime */
223
+ /******/ export { __nuri_require__ };
224
+ /******/
225
+ /******/ /* webpack/runtime/import chunk loading */
226
+ /******/ (() => {
227
+ /******/ // no baseURI
228
+ /******/
229
+ /******/ // object to store loaded and loading chunks
230
+ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
231
+ /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
232
+ /******/ var installedChunks = {
233
+ /******/ 182: 0
234
+ /******/ };
235
+ /******/
236
+ /******/ var installChunk = (data) => {
237
+ /******/ var {__webpack_esm_ids__, __webpack_esm_modules__, __webpack_esm_runtime__} = data;
238
+ /******/ // add "modules" to the modules object,
239
+ /******/ // then flag all "ids" as loaded and fire callback
240
+ /******/ var moduleId, chunkId, i = 0;
241
+ /******/ for(moduleId in __webpack_esm_modules__) {
242
+ /******/ if(__nuri_require__.o(__webpack_esm_modules__, moduleId)) {
243
+ /******/ __nuri_require__.m[moduleId] = __webpack_esm_modules__[moduleId];
244
+ /******/ }
245
+ /******/ }
246
+ /******/ if(__webpack_esm_runtime__) __webpack_esm_runtime__(__nuri_require__);
247
+ /******/ for(;i < __webpack_esm_ids__.length; i++) {
248
+ /******/ chunkId = __webpack_esm_ids__[i];
249
+ /******/ if(__nuri_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
250
+ /******/ installedChunks[chunkId][0]();
251
+ /******/ }
252
+ /******/ installedChunks[__webpack_esm_ids__[i]] = 0;
253
+ /******/ }
254
+ /******/ __nuri_require__.O();
255
+ /******/ }
256
+ /******/
257
+ /******/ // no chunk on demand loading
258
+ /******/
259
+ /******/ // no prefetching
260
+ /******/
261
+ /******/ // no preloaded
262
+ /******/
263
+ /******/ __nuri_require__.C = installChunk;
264
+ /******/
265
+ /******/ __nuri_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
266
+ /******/ // no HMR
267
+ /******/
268
+ /******/ // no HMR manifest
269
+ /******/ })();
270
+ /******/
271
+ /************************************************************************/
272
+ /******/
273
+ /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
274
+ /******/ __nuri_require__.C(__webpack_chunk_1__);
275
+ /******/ import * as __webpack_chunk_2__ from "./chunk-777.js";
276
+ /******/ __nuri_require__.C(__webpack_chunk_2__);
277
+ /******/ import * as __webpack_chunk_3__ from "./chunk-917.js";
278
+ /******/ __nuri_require__.C(__webpack_chunk_3__);
279
+ /******/ import * as __webpack_chunk_4__ from "./chunk-149.js";
280
+ /******/ __nuri_require__.C(__webpack_chunk_4__);
281
+ /******/ import * as __webpack_chunk_5__ from "./chunk-309.js";
282
+ /******/ __nuri_require__.C(__webpack_chunk_5__);
283
+ /******/ import * as __webpack_chunk_6__ from "./chunk-563.js";
284
+ /******/ __nuri_require__.C(__webpack_chunk_6__);
285
+ /******/
286
+ /******/ // startup
287
+ /******/ // Load entry module and return exports
288
+ /******/ // This entry module depends on other loaded chunks and execution need to be delayed
289
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,777,917,149,309,563], () => (__nuri_require__(401)))
290
+ /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
291
+ /******/ const __webpack_exports__default = __webpack_exports__.A;
292
+ /******/ export { __webpack_exports__default as default };
293
+ /******/
package/dist/radio.js ADDED
@@ -0,0 +1,363 @@
1
+ "use client";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__ from "react/jsx-runtime";
4
+ /******/ var __webpack_modules__ = ({
5
+
6
+ /***/ 392
7
+ (__unused_webpack_module, __webpack_exports__, __nuri_require__) {
8
+
9
+
10
+ // EXPORTS
11
+ __nuri_require__.d(__webpack_exports__, {
12
+ A: () => (/* binding */ radio_radio)
13
+ });
14
+
15
+ // EXTERNAL MODULE: external {"root":"jsx-runtime","commonjs2":"react/jsx-runtime","commonjs":"react/jsx-runtime","amd":"react/jsx-runtime","module":"react/jsx-runtime"}
16
+ var jsx_runtime_ = __nuri_require__(612);
17
+ // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
18
+ var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(41);
19
+ // EXTERNAL MODULE: ./helpers/utils/classNames.js
20
+ var classNames = __nuri_require__(274);
21
+ // EXTERNAL MODULE: ./helpers/utils/getMergedProps.ts
22
+ var getMergedProps = __nuri_require__(335);
23
+ // EXTERNAL MODULE: ./helpers/hooks/useExternalState.ts
24
+ var useExternalState = __nuri_require__(387);
25
+ // EXTERNAL MODULE: ./components/button/base-button.tsx
26
+ var base_button = __nuri_require__(933);
27
+ // EXTERNAL MODULE: ./components/core/composer/index.tsx
28
+ var composer = __nuri_require__(777);
29
+ ;// ./components/radio/base-radio.tsx
30
+
31
+
32
+
33
+
34
+
35
+
36
+ var RadioContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.createContext)({
37
+ options: [],
38
+ selected: null,
39
+ onChange: function onChange() {}
40
+ });
41
+ // context 만 내려주고 DOM 을 그리지 않아 ref 를 받을 곳이 없다. DOM 루트는 OptionGroup 이다.
42
+ var RadioRootBase = function RadioRootBase(props) {
43
+ var children = props.children,
44
+ options = props.options,
45
+ _a = props.selected,
46
+ selected = _a === void 0 ? null : _a,
47
+ externalOnChange = props.onChange;
48
+ var _b = (0,useExternalState/* useExternalState */.C)({
49
+ prop: selected,
50
+ handler: externalOnChange,
51
+ defaultProp: selected
52
+ }),
53
+ selectedId = _b[0],
54
+ setSelectedId = _b[1];
55
+ var onChange = function onChange(id) {
56
+ setSelectedId(id);
57
+ };
58
+ return (0,jsx_runtime_.jsx)(RadioContext.Provider, {
59
+ value: {
60
+ selected: selectedId,
61
+ onChange: onChange,
62
+ options: options
63
+ },
64
+ children: children
65
+ });
66
+ };
67
+ RadioRootBase.displayName = 'RadioRoot';
68
+ var RadioOptionGroup = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
69
+ var children = props.children,
70
+ asChild = props.asChild,
71
+ className = props.className;
72
+ var Comp = asChild ? composer/* default */.A : 'ul';
73
+ return (0,jsx_runtime_.jsx)(Comp, {
74
+ ref: ref,
75
+ className: (0,classNames/* classNames */.x)('nuri-theme base-radio option-group', className),
76
+ children: children
77
+ });
78
+ });
79
+ RadioOptionGroup.displayName = 'RadioOptionGroup';
80
+ var RadioButton = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
81
+ var children = props.children,
82
+ asChild = props.asChild,
83
+ className = props.className,
84
+ id = props.id,
85
+ disabled = props.disabled;
86
+ var _a = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useContext)(RadioContext),
87
+ selected = _a.selected,
88
+ onChange = _a.onChange;
89
+ var Comp = asChild ? composer/* default */.A : base_button/* default */.A;
90
+ return (0,jsx_runtime_.jsx)(Comp, {
91
+ ref: ref,
92
+ className: (0,classNames/* classNames */.x)('nuri-theme base-radio button', className),
93
+ disabled: disabled,
94
+ onClick: function onClick() {
95
+ return onChange(id);
96
+ },
97
+ children: id === selected ? children : null
98
+ });
99
+ });
100
+ RadioButton.displayName = 'RadioButton';
101
+ var RadioIndicator = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
102
+ var children = props.children,
103
+ asChild = props.asChild,
104
+ id = props.id,
105
+ className = props.className;
106
+ var selected = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useContext)(RadioContext).selected;
107
+ var Comp = asChild ? composer/* default */.A : 'input';
108
+ return (0,jsx_runtime_.jsx)(Comp, {
109
+ ref: ref,
110
+ className: (0,classNames/* classNames */.x)('nuri-theme base-radio indicator', selected === id && 'selected', className),
111
+ type: 'radio',
112
+ checked: selected === id,
113
+ children: children
114
+ });
115
+ });
116
+ RadioIndicator.displayName = 'RadioIndicator';
117
+ var RadioLabel = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
118
+ var children = props.children,
119
+ asChild = props.asChild,
120
+ className = props.className,
121
+ id = props.id,
122
+ disabled = props.disabled;
123
+ var onChange = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useContext)(RadioContext).onChange;
124
+ var Comp = asChild ? composer/* default */.A : 'label';
125
+ return (0,jsx_runtime_.jsx)(Comp, {
126
+ ref: ref,
127
+ className: (0,classNames/* classNames */.x)('nuri-theme base-radio label', className),
128
+ "data-disabled": disabled || undefined,
129
+ onClick: function onClick() {
130
+ return !disabled && onChange(id);
131
+ },
132
+ children: children
133
+ });
134
+ });
135
+ RadioLabel.displayName = 'RadioLabel';
136
+ var RadioRoot = Object.assign(RadioRootBase, {
137
+ OptionGroup: RadioOptionGroup,
138
+ Button: RadioButton,
139
+ Indicator: RadioIndicator,
140
+ Label: RadioLabel
141
+ });
142
+ /* harmony default export */ const base_radio = (RadioRoot);
143
+ ;// ./components/radio/radio-props.ts
144
+ // CSS 가 아직 크기·방향을 나누지 않아 className 으로 바뀌는 prop 이 없다.
145
+ var radioProps = {};
146
+ ;// ./components/radio/radio.tsx
147
+
148
+
149
+
150
+
151
+
152
+
153
+ var Radio = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.forwardRef)(function (props, ref) {
154
+ var _a = (0,getMergedProps/* getMergedProps */.p)(props, radioProps),
155
+ className = _a.className,
156
+ selected = _a.selected,
157
+ onChange = _a.onChange,
158
+ options = _a.options;
159
+ return (0,jsx_runtime_.jsx)(base_radio, {
160
+ options: options,
161
+ selected: selected,
162
+ onChange: onChange,
163
+ children: (0,jsx_runtime_.jsx)(base_radio.OptionGroup, {
164
+ ref: ref,
165
+ className: (0,classNames/* classNames */.x)(className, 'radio radio-group'),
166
+ children: options.map(function (option) {
167
+ return (0,jsx_runtime_.jsxs)("li", {
168
+ className: 'radio radio-option',
169
+ children: [(0,jsx_runtime_.jsx)(base_radio.Button, {
170
+ className: 'radio radio-button',
171
+ id: option.id,
172
+ disabled: option.disabled,
173
+ children: (0,jsx_runtime_.jsx)(base_radio.Indicator, {
174
+ className: 'radio radio-indicator',
175
+ id: option.id,
176
+ asChild: true,
177
+ children: (0,jsx_runtime_.jsx)("div", {})
178
+ })
179
+ }), (0,jsx_runtime_.jsx)(base_radio.Label, {
180
+ className: 'radio radio-label',
181
+ id: option.id,
182
+ disabled: option.disabled,
183
+ children: option.label
184
+ })]
185
+ }, option.id);
186
+ })
187
+ })
188
+ });
189
+ });
190
+ Radio.displayName = 'Radio';
191
+ /* harmony default export */ const radio_radio = (Radio);
192
+
193
+ /***/ },
194
+
195
+ /***/ 41
196
+ (module, __unused_webpack_exports, __nuri_require__) {
197
+
198
+ var x = (y) => {
199
+ var x = {}; __nuri_require__.d(x, y); return x
200
+ }
201
+ var y = (x) => (() => (x))
202
+ 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), ["useState"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useState) });
203
+
204
+ /***/ },
205
+
206
+ /***/ 612
207
+ (module, __unused_webpack_exports, __nuri_require__) {
208
+
209
+ var x = (y) => {
210
+ var x = {}; __nuri_require__.d(x, y); return x
211
+ }
212
+ var y = (x) => (() => (x))
213
+ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__.jsx), ["jsxs"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__.jsxs) });
214
+
215
+ /***/ }
216
+
217
+ /******/ });
218
+ /************************************************************************/
219
+ /******/ // The module cache
220
+ /******/ var __webpack_module_cache__ = {};
221
+ /******/
222
+ /******/ // The require function
223
+ /******/ function __nuri_require__(moduleId) {
224
+ /******/ // Check if module is in cache
225
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
226
+ /******/ if (cachedModule !== undefined) {
227
+ /******/ return cachedModule.exports;
228
+ /******/ }
229
+ /******/ // Create a new module (and put it into the cache)
230
+ /******/ var module = __webpack_module_cache__[moduleId] = {
231
+ /******/ // no module.id needed
232
+ /******/ // no module.loaded needed
233
+ /******/ exports: {}
234
+ /******/ };
235
+ /******/
236
+ /******/ // Execute the module function
237
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nuri_require__);
238
+ /******/
239
+ /******/ // Return the exports of the module
240
+ /******/ return module.exports;
241
+ /******/ }
242
+ /******/
243
+ /******/ // expose the modules object (__webpack_modules__)
244
+ /******/ __nuri_require__.m = __webpack_modules__;
245
+ /******/
246
+ /************************************************************************/
247
+ /******/ /* webpack/runtime/chunk loaded */
248
+ /******/ (() => {
249
+ /******/ var deferred = [];
250
+ /******/ __nuri_require__.O = (result, chunkIds, fn, priority) => {
251
+ /******/ if(chunkIds) {
252
+ /******/ priority = priority || 0;
253
+ /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
254
+ /******/ deferred[i] = [chunkIds, fn, priority];
255
+ /******/ return;
256
+ /******/ }
257
+ /******/ var notFulfilled = Infinity;
258
+ /******/ for (var i = 0; i < deferred.length; i++) {
259
+ /******/ var [chunkIds, fn, priority] = deferred[i];
260
+ /******/ var fulfilled = true;
261
+ /******/ for (var j = 0; j < chunkIds.length; j++) {
262
+ /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__nuri_require__.O).every((key) => (__nuri_require__.O[key](chunkIds[j])))) {
263
+ /******/ chunkIds.splice(j--, 1);
264
+ /******/ } else {
265
+ /******/ fulfilled = false;
266
+ /******/ if(priority < notFulfilled) notFulfilled = priority;
267
+ /******/ }
268
+ /******/ }
269
+ /******/ if(fulfilled) {
270
+ /******/ deferred.splice(i--, 1)
271
+ /******/ var r = fn();
272
+ /******/ if (r !== undefined) result = r;
273
+ /******/ }
274
+ /******/ }
275
+ /******/ return result;
276
+ /******/ };
277
+ /******/ })();
278
+ /******/
279
+ /******/ /* webpack/runtime/define property getters */
280
+ /******/ (() => {
281
+ /******/ // define getter functions for harmony exports
282
+ /******/ __nuri_require__.d = (exports, definition) => {
283
+ /******/ for(var key in definition) {
284
+ /******/ if(__nuri_require__.o(definition, key) && !__nuri_require__.o(exports, key)) {
285
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
286
+ /******/ }
287
+ /******/ }
288
+ /******/ };
289
+ /******/ })();
290
+ /******/
291
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
292
+ /******/ (() => {
293
+ /******/ __nuri_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
294
+ /******/ })();
295
+ /******/
296
+ /******/ /* webpack/runtime/export webpack runtime */
297
+ /******/ export { __nuri_require__ };
298
+ /******/
299
+ /******/ /* webpack/runtime/import chunk loading */
300
+ /******/ (() => {
301
+ /******/ // no baseURI
302
+ /******/
303
+ /******/ // object to store loaded and loading chunks
304
+ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
305
+ /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
306
+ /******/ var installedChunks = {
307
+ /******/ 860: 0
308
+ /******/ };
309
+ /******/
310
+ /******/ var installChunk = (data) => {
311
+ /******/ var {__webpack_esm_ids__, __webpack_esm_modules__, __webpack_esm_runtime__} = data;
312
+ /******/ // add "modules" to the modules object,
313
+ /******/ // then flag all "ids" as loaded and fire callback
314
+ /******/ var moduleId, chunkId, i = 0;
315
+ /******/ for(moduleId in __webpack_esm_modules__) {
316
+ /******/ if(__nuri_require__.o(__webpack_esm_modules__, moduleId)) {
317
+ /******/ __nuri_require__.m[moduleId] = __webpack_esm_modules__[moduleId];
318
+ /******/ }
319
+ /******/ }
320
+ /******/ if(__webpack_esm_runtime__) __webpack_esm_runtime__(__nuri_require__);
321
+ /******/ for(;i < __webpack_esm_ids__.length; i++) {
322
+ /******/ chunkId = __webpack_esm_ids__[i];
323
+ /******/ if(__nuri_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
324
+ /******/ installedChunks[chunkId][0]();
325
+ /******/ }
326
+ /******/ installedChunks[__webpack_esm_ids__[i]] = 0;
327
+ /******/ }
328
+ /******/ __nuri_require__.O();
329
+ /******/ }
330
+ /******/
331
+ /******/ // no chunk on demand loading
332
+ /******/
333
+ /******/ // no prefetching
334
+ /******/
335
+ /******/ // no preloaded
336
+ /******/
337
+ /******/ __nuri_require__.C = installChunk;
338
+ /******/
339
+ /******/ __nuri_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
340
+ /******/ // no HMR
341
+ /******/
342
+ /******/ // no HMR manifest
343
+ /******/ })();
344
+ /******/
345
+ /************************************************************************/
346
+ /******/
347
+ /******/ import * as __webpack_chunk_1__ from "./chunk-364.js";
348
+ /******/ __nuri_require__.C(__webpack_chunk_1__);
349
+ /******/ import * as __webpack_chunk_2__ from "./chunk-777.js";
350
+ /******/ __nuri_require__.C(__webpack_chunk_2__);
351
+ /******/ import * as __webpack_chunk_3__ from "./chunk-933.js";
352
+ /******/ __nuri_require__.C(__webpack_chunk_3__);
353
+ /******/ import * as __webpack_chunk_4__ from "./chunk-387.js";
354
+ /******/ __nuri_require__.C(__webpack_chunk_4__);
355
+ /******/
356
+ /******/ // startup
357
+ /******/ // Load entry module and return exports
358
+ /******/ // This entry module depends on other loaded chunks and execution need to be delayed
359
+ /******/ var __webpack_exports__ = __nuri_require__.O(undefined, [364,777,933,387], () => (__nuri_require__(392)))
360
+ /******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
361
+ /******/ const __webpack_exports__default = __webpack_exports__.A;
362
+ /******/ export { __webpack_exports__default as default };
363
+ /******/