@allxsmith/bestax-bulma 1.0.5 → 1.0.6
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 +10 -1
- package/dist/index.cjs.js +357 -2154
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +357 -2154
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Column.d.ts +0 -43
- package/dist/types/columns/Columns.d.ts +0 -32
- package/dist/types/components/Breadcrumb.d.ts +0 -28
- package/dist/types/components/Card.d.ts +0 -24
- package/dist/types/components/Dropdown.d.ts +0 -42
- package/dist/types/components/Menu.d.ts +0 -48
- package/dist/types/components/Message.d.ts +0 -21
- package/dist/types/components/Modal.d.ts +0 -21
- package/dist/types/components/Navbar.d.ts +0 -146
- package/dist/types/components/Pagination.d.ts +0 -68
- package/dist/types/components/Panel.d.ts +0 -81
- package/dist/types/components/Tab.d.ts +0 -49
- package/dist/types/components/Tabs.d.ts +0 -49
- package/dist/types/elements/Block.d.ts +0 -20
- package/dist/types/elements/Box.d.ts +1 -23
- package/dist/types/elements/Button.d.ts +0 -36
- package/dist/types/elements/Buttons.d.ts +0 -22
- package/dist/types/elements/Content.d.ts +0 -21
- package/dist/types/elements/Delete.d.ts +0 -22
- package/dist/types/elements/Icon.d.ts +0 -24
- package/dist/types/elements/IconText.d.ts +0 -27
- package/dist/types/elements/Image.d.ts +0 -27
- package/dist/types/elements/Notification.d.ts +0 -20
- package/dist/types/elements/Progress.d.ts +0 -20
- package/dist/types/elements/SubTitle.d.ts +0 -24
- package/dist/types/elements/Table.d.ts +0 -25
- package/dist/types/elements/Tag.d.ts +0 -28
- package/dist/types/elements/Tags.d.ts +0 -18
- package/dist/types/elements/Tbody.d.ts +0 -19
- package/dist/types/elements/Td.d.ts +0 -23
- package/dist/types/elements/Tfoot.d.ts +0 -19
- package/dist/types/elements/Th.d.ts +0 -25
- package/dist/types/elements/Thead.d.ts +0 -19
- package/dist/types/elements/Title.d.ts +0 -25
- package/dist/types/elements/Tr.d.ts +0 -21
- package/dist/types/form/Checkbox.d.ts +0 -16
- package/dist/types/form/Checkboxes.d.ts +0 -15
- package/dist/types/form/Control.d.ts +0 -30
- package/dist/types/form/Field.d.ts +0 -57
- package/dist/types/form/File.d.ts +0 -26
- package/dist/types/form/Input.d.ts +0 -22
- package/dist/types/form/Radio.d.ts +0 -16
- package/dist/types/form/Radios.d.ts +0 -15
- package/dist/types/form/Select.d.ts +0 -22
- package/dist/types/form/TextArea.d.ts +0 -25
- package/dist/types/grid/Cell.d.ts +0 -26
- package/dist/types/grid/Grid.d.ts +0 -40
- package/dist/types/helpers/classNames.d.ts +0 -14
- package/dist/types/helpers/useBulmaClasses.d.ts +0 -130
- package/dist/types/layout/Container.d.ts +0 -26
- package/dist/types/layout/Footer.d.ts +0 -19
- package/dist/types/layout/Hero.d.ts +0 -57
- package/dist/types/layout/Level.d.ts +0 -59
- package/dist/types/layout/Media.d.ts +0 -55
- package/dist/types/layout/Section.d.ts +0 -21
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -2,26 +2,47 @@ import React, { useMemo, useState, useRef, useEffect, createContext, useContext,
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = {exports: {}};
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var reactJsxRuntime_production = {};
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
|
-
* react-jsx-runtime.production.
|
|
9
|
+
* react-jsx-runtime.production.js
|
|
10
10
|
*
|
|
11
|
-
* Copyright (c)
|
|
11
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
var hasRequiredReactJsxRuntime_production;
|
|
18
|
+
|
|
19
|
+
function requireReactJsxRuntime_production () {
|
|
20
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
21
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
22
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
23
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
24
|
+
function jsxProd(type, config, maybeKey) {
|
|
25
|
+
var key = null;
|
|
26
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
27
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
28
|
+
if ("key" in config) {
|
|
29
|
+
maybeKey = {};
|
|
30
|
+
for (var propName in config)
|
|
31
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
32
|
+
} else maybeKey = config;
|
|
33
|
+
config = maybeKey.ref;
|
|
34
|
+
return {
|
|
35
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
36
|
+
type: type,
|
|
37
|
+
key: key,
|
|
38
|
+
ref: void 0 !== config ? config : null,
|
|
39
|
+
props: maybeKey
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
43
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
44
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
45
|
+
return reactJsxRuntime_production;
|
|
25
46
|
}
|
|
26
47
|
|
|
27
48
|
var reactJsxRuntime_development = {};
|
|
@@ -30,7 +51,7 @@ var reactJsxRuntime_development = {};
|
|
|
30
51
|
* @license React
|
|
31
52
|
* react-jsx-runtime.development.js
|
|
32
53
|
*
|
|
33
|
-
* Copyright (c)
|
|
54
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
34
55
|
*
|
|
35
56
|
* This source code is licensed under the MIT license found in the
|
|
36
57
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -41,1309 +62,352 @@ var hasRequiredReactJsxRuntime_development;
|
|
|
41
62
|
function requireReactJsxRuntime_development () {
|
|
42
63
|
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
43
64
|
hasRequiredReactJsxRuntime_development = 1;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
67
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
68
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
69
|
-
function getIteratorFn(maybeIterable) {
|
|
70
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
75
|
-
|
|
76
|
-
if (typeof maybeIterator === 'function') {
|
|
77
|
-
return maybeIterator;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
84
|
-
|
|
85
|
-
function error(format) {
|
|
86
|
-
{
|
|
87
|
-
{
|
|
88
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
89
|
-
args[_key2 - 1] = arguments[_key2];
|
|
65
|
+
"production" !== process.env.NODE_ENV &&
|
|
66
|
+
(function () {
|
|
67
|
+
function getComponentNameFromType(type) {
|
|
68
|
+
if (null == type) return null;
|
|
69
|
+
if ("function" === typeof type)
|
|
70
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
71
|
+
? null
|
|
72
|
+
: type.displayName || type.name || null;
|
|
73
|
+
if ("string" === typeof type) return type;
|
|
74
|
+
switch (type) {
|
|
75
|
+
case REACT_FRAGMENT_TYPE:
|
|
76
|
+
return "Fragment";
|
|
77
|
+
case REACT_PROFILER_TYPE:
|
|
78
|
+
return "Profiler";
|
|
79
|
+
case REACT_STRICT_MODE_TYPE:
|
|
80
|
+
return "StrictMode";
|
|
81
|
+
case REACT_SUSPENSE_TYPE:
|
|
82
|
+
return "Suspense";
|
|
83
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
84
|
+
return "SuspenseList";
|
|
85
|
+
case REACT_ACTIVITY_TYPE:
|
|
86
|
+
return "Activity";
|
|
90
87
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var enableCacheElement = false;
|
|
126
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
127
|
-
|
|
128
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
129
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
130
|
-
// issues in DEV builds.
|
|
131
|
-
|
|
132
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
133
|
-
|
|
134
|
-
var REACT_MODULE_REFERENCE;
|
|
135
|
-
|
|
136
|
-
{
|
|
137
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function isValidElementType(type) {
|
|
141
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
142
|
-
return true;
|
|
143
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (typeof type === 'object' && type !== null) {
|
|
151
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
152
|
-
// types supported by any Flight configuration anywhere since
|
|
153
|
-
// we don't know which Flight build this will end up being used
|
|
154
|
-
// with.
|
|
155
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
164
|
-
var displayName = outerType.displayName;
|
|
165
|
-
|
|
166
|
-
if (displayName) {
|
|
167
|
-
return displayName;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
171
|
-
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
172
|
-
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
function getContextName(type) {
|
|
176
|
-
return type.displayName || 'Context';
|
|
177
|
-
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
function getComponentNameFromType(type) {
|
|
181
|
-
if (type == null) {
|
|
182
|
-
// Host root, text node or just invalid type.
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
{
|
|
187
|
-
if (typeof type.tag === 'number') {
|
|
188
|
-
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (typeof type === 'function') {
|
|
193
|
-
return type.displayName || type.name || null;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (typeof type === 'string') {
|
|
197
|
-
return type;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
switch (type) {
|
|
201
|
-
case REACT_FRAGMENT_TYPE:
|
|
202
|
-
return 'Fragment';
|
|
203
|
-
|
|
204
|
-
case REACT_PORTAL_TYPE:
|
|
205
|
-
return 'Portal';
|
|
206
|
-
|
|
207
|
-
case REACT_PROFILER_TYPE:
|
|
208
|
-
return 'Profiler';
|
|
209
|
-
|
|
210
|
-
case REACT_STRICT_MODE_TYPE:
|
|
211
|
-
return 'StrictMode';
|
|
212
|
-
|
|
213
|
-
case REACT_SUSPENSE_TYPE:
|
|
214
|
-
return 'Suspense';
|
|
215
|
-
|
|
216
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
217
|
-
return 'SuspenseList';
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (typeof type === 'object') {
|
|
222
|
-
switch (type.$$typeof) {
|
|
223
|
-
case REACT_CONTEXT_TYPE:
|
|
224
|
-
var context = type;
|
|
225
|
-
return getContextName(context) + '.Consumer';
|
|
226
|
-
|
|
227
|
-
case REACT_PROVIDER_TYPE:
|
|
228
|
-
var provider = type;
|
|
229
|
-
return getContextName(provider._context) + '.Provider';
|
|
230
|
-
|
|
231
|
-
case REACT_FORWARD_REF_TYPE:
|
|
232
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
233
|
-
|
|
234
|
-
case REACT_MEMO_TYPE:
|
|
235
|
-
var outerName = type.displayName || null;
|
|
236
|
-
|
|
237
|
-
if (outerName !== null) {
|
|
238
|
-
return outerName;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
242
|
-
|
|
243
|
-
case REACT_LAZY_TYPE:
|
|
244
|
-
{
|
|
245
|
-
var lazyComponent = type;
|
|
246
|
-
var payload = lazyComponent._payload;
|
|
247
|
-
var init = lazyComponent._init;
|
|
248
|
-
|
|
249
|
-
try {
|
|
250
|
-
return getComponentNameFromType(init(payload));
|
|
251
|
-
} catch (x) {
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
88
|
+
if ("object" === typeof type)
|
|
89
|
+
switch (
|
|
90
|
+
("number" === typeof type.tag &&
|
|
91
|
+
console.error(
|
|
92
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
93
|
+
),
|
|
94
|
+
type.$$typeof)
|
|
95
|
+
) {
|
|
96
|
+
case REACT_PORTAL_TYPE:
|
|
97
|
+
return "Portal";
|
|
98
|
+
case REACT_CONTEXT_TYPE:
|
|
99
|
+
return (type.displayName || "Context") + ".Provider";
|
|
100
|
+
case REACT_CONSUMER_TYPE:
|
|
101
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
102
|
+
case REACT_FORWARD_REF_TYPE:
|
|
103
|
+
var innerType = type.render;
|
|
104
|
+
type = type.displayName;
|
|
105
|
+
type ||
|
|
106
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
107
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
108
|
+
return type;
|
|
109
|
+
case REACT_MEMO_TYPE:
|
|
110
|
+
return (
|
|
111
|
+
(innerType = type.displayName || null),
|
|
112
|
+
null !== innerType
|
|
113
|
+
? innerType
|
|
114
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
115
|
+
);
|
|
116
|
+
case REACT_LAZY_TYPE:
|
|
117
|
+
innerType = type._payload;
|
|
118
|
+
type = type._init;
|
|
119
|
+
try {
|
|
120
|
+
return getComponentNameFromType(type(innerType));
|
|
121
|
+
} catch (x) {}
|
|
254
122
|
}
|
|
255
|
-
|
|
256
|
-
// eslint-disable-next-line no-fallthrough
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
return null;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
var assign = Object.assign;
|
|
264
|
-
|
|
265
|
-
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
266
|
-
// replaying on render function. This currently only patches the object
|
|
267
|
-
// lazily which won't cover if the log function was extracted eagerly.
|
|
268
|
-
// We could also eagerly patch the method.
|
|
269
|
-
var disabledDepth = 0;
|
|
270
|
-
var prevLog;
|
|
271
|
-
var prevInfo;
|
|
272
|
-
var prevWarn;
|
|
273
|
-
var prevError;
|
|
274
|
-
var prevGroup;
|
|
275
|
-
var prevGroupCollapsed;
|
|
276
|
-
var prevGroupEnd;
|
|
277
|
-
|
|
278
|
-
function disabledLog() {}
|
|
279
|
-
|
|
280
|
-
disabledLog.__reactDisabledLog = true;
|
|
281
|
-
function disableLogs() {
|
|
282
|
-
{
|
|
283
|
-
if (disabledDepth === 0) {
|
|
284
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
285
|
-
prevLog = console.log;
|
|
286
|
-
prevInfo = console.info;
|
|
287
|
-
prevWarn = console.warn;
|
|
288
|
-
prevError = console.error;
|
|
289
|
-
prevGroup = console.group;
|
|
290
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
291
|
-
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
292
|
-
|
|
293
|
-
var props = {
|
|
294
|
-
configurable: true,
|
|
295
|
-
enumerable: true,
|
|
296
|
-
value: disabledLog,
|
|
297
|
-
writable: true
|
|
298
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
299
|
-
|
|
300
|
-
Object.defineProperties(console, {
|
|
301
|
-
info: props,
|
|
302
|
-
log: props,
|
|
303
|
-
warn: props,
|
|
304
|
-
error: props,
|
|
305
|
-
group: props,
|
|
306
|
-
groupCollapsed: props,
|
|
307
|
-
groupEnd: props
|
|
308
|
-
});
|
|
309
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
123
|
+
return null;
|
|
310
124
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function reenableLogs() {
|
|
316
|
-
{
|
|
317
|
-
disabledDepth--;
|
|
318
|
-
|
|
319
|
-
if (disabledDepth === 0) {
|
|
320
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
321
|
-
var props = {
|
|
322
|
-
configurable: true,
|
|
323
|
-
enumerable: true,
|
|
324
|
-
writable: true
|
|
325
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
326
|
-
|
|
327
|
-
Object.defineProperties(console, {
|
|
328
|
-
log: assign({}, props, {
|
|
329
|
-
value: prevLog
|
|
330
|
-
}),
|
|
331
|
-
info: assign({}, props, {
|
|
332
|
-
value: prevInfo
|
|
333
|
-
}),
|
|
334
|
-
warn: assign({}, props, {
|
|
335
|
-
value: prevWarn
|
|
336
|
-
}),
|
|
337
|
-
error: assign({}, props, {
|
|
338
|
-
value: prevError
|
|
339
|
-
}),
|
|
340
|
-
group: assign({}, props, {
|
|
341
|
-
value: prevGroup
|
|
342
|
-
}),
|
|
343
|
-
groupCollapsed: assign({}, props, {
|
|
344
|
-
value: prevGroupCollapsed
|
|
345
|
-
}),
|
|
346
|
-
groupEnd: assign({}, props, {
|
|
347
|
-
value: prevGroupEnd
|
|
348
|
-
})
|
|
349
|
-
});
|
|
350
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
125
|
+
function testStringCoercion(value) {
|
|
126
|
+
return "" + value;
|
|
351
127
|
}
|
|
352
|
-
|
|
353
|
-
if (disabledDepth < 0) {
|
|
354
|
-
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
360
|
-
var prefix;
|
|
361
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
362
|
-
{
|
|
363
|
-
if (prefix === undefined) {
|
|
364
|
-
// Extract the VM specific prefix used by each line.
|
|
128
|
+
function checkKeyStringCoercion(value) {
|
|
365
129
|
try {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
130
|
+
testStringCoercion(value);
|
|
131
|
+
var JSCompiler_inline_result = !1;
|
|
132
|
+
} catch (e) {
|
|
133
|
+
JSCompiler_inline_result = true;
|
|
370
134
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
// If something asked for a stack inside a fake render, it should get ignored.
|
|
387
|
-
if ( !fn || reentry) {
|
|
388
|
-
return '';
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
{
|
|
392
|
-
var frame = componentFrameCache.get(fn);
|
|
393
|
-
|
|
394
|
-
if (frame !== undefined) {
|
|
395
|
-
return frame;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
var control;
|
|
400
|
-
reentry = true;
|
|
401
|
-
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
402
|
-
|
|
403
|
-
Error.prepareStackTrace = undefined;
|
|
404
|
-
var previousDispatcher;
|
|
405
|
-
|
|
406
|
-
{
|
|
407
|
-
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
408
|
-
// for warnings.
|
|
409
|
-
|
|
410
|
-
ReactCurrentDispatcher.current = null;
|
|
411
|
-
disableLogs();
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
try {
|
|
415
|
-
// This should throw.
|
|
416
|
-
if (construct) {
|
|
417
|
-
// Something should be setting the props in the constructor.
|
|
418
|
-
var Fake = function () {
|
|
419
|
-
throw Error();
|
|
420
|
-
}; // $FlowFixMe
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
424
|
-
set: function () {
|
|
425
|
-
// We use a throwing setter instead of frozen or non-writable props
|
|
426
|
-
// because that won't throw in a non-strict mode function.
|
|
427
|
-
throw Error();
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
|
|
431
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
432
|
-
// We construct a different control for this case to include any extra
|
|
433
|
-
// frames added by the construct call.
|
|
434
|
-
try {
|
|
435
|
-
Reflect.construct(Fake, []);
|
|
436
|
-
} catch (x) {
|
|
437
|
-
control = x;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
Reflect.construct(fn, [], Fake);
|
|
441
|
-
} else {
|
|
442
|
-
try {
|
|
443
|
-
Fake.call();
|
|
444
|
-
} catch (x) {
|
|
445
|
-
control = x;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
fn.call(Fake.prototype);
|
|
135
|
+
if (JSCompiler_inline_result) {
|
|
136
|
+
JSCompiler_inline_result = console;
|
|
137
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
138
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
139
|
+
("function" === typeof Symbol &&
|
|
140
|
+
Symbol.toStringTag &&
|
|
141
|
+
value[Symbol.toStringTag]) ||
|
|
142
|
+
value.constructor.name ||
|
|
143
|
+
"Object";
|
|
144
|
+
JSCompiler_temp_const.call(
|
|
145
|
+
JSCompiler_inline_result,
|
|
146
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
147
|
+
JSCompiler_inline_result$jscomp$0
|
|
148
|
+
);
|
|
149
|
+
return testStringCoercion(value);
|
|
449
150
|
}
|
|
450
|
-
}
|
|
151
|
+
}
|
|
152
|
+
function getTaskName(type) {
|
|
153
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
154
|
+
if (
|
|
155
|
+
"object" === typeof type &&
|
|
156
|
+
null !== type &&
|
|
157
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
158
|
+
)
|
|
159
|
+
return "<...>";
|
|
451
160
|
try {
|
|
452
|
-
|
|
161
|
+
var name = getComponentNameFromType(type);
|
|
162
|
+
return name ? "<" + name + ">" : "<...>";
|
|
453
163
|
} catch (x) {
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
fn();
|
|
458
|
-
}
|
|
459
|
-
} catch (sample) {
|
|
460
|
-
// This is inlined manually because closure doesn't do it for us.
|
|
461
|
-
if (sample && control && typeof sample.stack === 'string') {
|
|
462
|
-
// This extracts the first frame from the sample that isn't also in the control.
|
|
463
|
-
// Skipping one frame that we assume is the frame that calls the two.
|
|
464
|
-
var sampleLines = sample.stack.split('\n');
|
|
465
|
-
var controlLines = control.stack.split('\n');
|
|
466
|
-
var s = sampleLines.length - 1;
|
|
467
|
-
var c = controlLines.length - 1;
|
|
468
|
-
|
|
469
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
470
|
-
// We expect at least one stack frame to be shared.
|
|
471
|
-
// Typically this will be the root most one. However, stack frames may be
|
|
472
|
-
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
473
|
-
// earlier than the other. We assume that the sample is longer or the same
|
|
474
|
-
// and there for cut off earlier. So we should find the root most frame in
|
|
475
|
-
// the sample somewhere in the control.
|
|
476
|
-
c--;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
480
|
-
// Next we find the first one that isn't the same which should be the
|
|
481
|
-
// frame that called our sample function and the control.
|
|
482
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
483
|
-
// In V8, the first line is describing the message but other VMs don't.
|
|
484
|
-
// If we're about to return the first line, and the control is also on the same
|
|
485
|
-
// line, that's a pretty good indicator that our sample threw at same line as
|
|
486
|
-
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
487
|
-
// This can happen if you passed a class to function component, or non-function.
|
|
488
|
-
if (s !== 1 || c !== 1) {
|
|
489
|
-
do {
|
|
490
|
-
s--;
|
|
491
|
-
c--; // We may still have similar intermediate frames from the construct call.
|
|
492
|
-
// The next one that isn't the same should be our match though.
|
|
493
|
-
|
|
494
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
495
|
-
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
496
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
497
|
-
// but we have a user-provided "displayName"
|
|
498
|
-
// splice it in to make the stack more readable.
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
502
|
-
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
{
|
|
506
|
-
if (typeof fn === 'function') {
|
|
507
|
-
componentFrameCache.set(fn, _frame);
|
|
508
|
-
}
|
|
509
|
-
} // Return the line we found.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return _frame;
|
|
513
|
-
}
|
|
514
|
-
} while (s >= 1 && c >= 0);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
break;
|
|
518
|
-
}
|
|
164
|
+
return "<...>";
|
|
519
165
|
}
|
|
520
166
|
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
{
|
|
525
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
526
|
-
reenableLogs();
|
|
167
|
+
function getOwner() {
|
|
168
|
+
var dispatcher = ReactSharedInternals.A;
|
|
169
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
527
170
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
} // Fallback to just using the name if we couldn't make it throw.
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
534
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
535
|
-
|
|
536
|
-
{
|
|
537
|
-
if (typeof fn === 'function') {
|
|
538
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
171
|
+
function UnknownOwner() {
|
|
172
|
+
return Error("react-stack-top-frame");
|
|
539
173
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
return describeNativeComponentFrame(fn, false);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
function shouldConstruct(Component) {
|
|
551
|
-
var prototype = Component.prototype;
|
|
552
|
-
return !!(prototype && prototype.isReactComponent);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
556
|
-
|
|
557
|
-
if (type == null) {
|
|
558
|
-
return '';
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
if (typeof type === 'function') {
|
|
562
|
-
{
|
|
563
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
if (typeof type === 'string') {
|
|
568
|
-
return describeBuiltInComponentFrame(type);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
switch (type) {
|
|
572
|
-
case REACT_SUSPENSE_TYPE:
|
|
573
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
574
|
-
|
|
575
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
576
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
if (typeof type === 'object') {
|
|
580
|
-
switch (type.$$typeof) {
|
|
581
|
-
case REACT_FORWARD_REF_TYPE:
|
|
582
|
-
return describeFunctionComponentFrame(type.render);
|
|
583
|
-
|
|
584
|
-
case REACT_MEMO_TYPE:
|
|
585
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
586
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
587
|
-
|
|
588
|
-
case REACT_LAZY_TYPE:
|
|
589
|
-
{
|
|
590
|
-
var lazyComponent = type;
|
|
591
|
-
var payload = lazyComponent._payload;
|
|
592
|
-
var init = lazyComponent._init;
|
|
593
|
-
|
|
594
|
-
try {
|
|
595
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
596
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
597
|
-
} catch (x) {}
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
return '';
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
606
|
-
|
|
607
|
-
var loggedTypeFailures = {};
|
|
608
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
609
|
-
|
|
610
|
-
function setCurrentlyValidatingElement(element) {
|
|
611
|
-
{
|
|
612
|
-
if (element) {
|
|
613
|
-
var owner = element._owner;
|
|
614
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
615
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
616
|
-
} else {
|
|
617
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
174
|
+
function hasValidKey(config) {
|
|
175
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
176
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
177
|
+
if (getter && getter.isReactWarning) return false;
|
|
178
|
+
}
|
|
179
|
+
return void 0 !== config.key;
|
|
618
180
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
for (var typeSpecName in typeSpecs) {
|
|
628
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
629
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
630
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
631
|
-
// After these have been cleaned up, we'll let them throw.
|
|
632
|
-
|
|
633
|
-
try {
|
|
634
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
635
|
-
// behavior as without this statement except with a better message.
|
|
636
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
637
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
638
|
-
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
639
|
-
err.name = 'Invariant Violation';
|
|
640
|
-
throw err;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
644
|
-
} catch (ex) {
|
|
645
|
-
error$1 = ex;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
649
|
-
setCurrentlyValidatingElement(element);
|
|
650
|
-
|
|
651
|
-
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
|
652
|
-
|
|
653
|
-
setCurrentlyValidatingElement(null);
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
657
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
658
|
-
// same error.
|
|
659
|
-
loggedTypeFailures[error$1.message] = true;
|
|
660
|
-
setCurrentlyValidatingElement(element);
|
|
661
|
-
|
|
662
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
663
|
-
|
|
664
|
-
setCurrentlyValidatingElement(null);
|
|
665
|
-
}
|
|
181
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
182
|
+
function warnAboutAccessingKey() {
|
|
183
|
+
specialPropKeyWarningShown ||
|
|
184
|
+
((specialPropKeyWarningShown = true),
|
|
185
|
+
console.error(
|
|
186
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
187
|
+
displayName
|
|
188
|
+
));
|
|
666
189
|
}
|
|
190
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
191
|
+
Object.defineProperty(props, "key", {
|
|
192
|
+
get: warnAboutAccessingKey,
|
|
193
|
+
configurable: true
|
|
194
|
+
});
|
|
667
195
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
/*
|
|
678
|
-
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
679
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
680
|
-
*
|
|
681
|
-
* The functions in this module will throw an easier-to-understand,
|
|
682
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
683
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
684
|
-
* of the `value` object).
|
|
685
|
-
*/
|
|
686
|
-
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
687
|
-
function typeName(value) {
|
|
688
|
-
{
|
|
689
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
690
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
691
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
692
|
-
return type;
|
|
693
|
-
}
|
|
694
|
-
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
function willCoercionThrow(value) {
|
|
698
|
-
{
|
|
699
|
-
try {
|
|
700
|
-
testStringCoercion(value);
|
|
701
|
-
return false;
|
|
702
|
-
} catch (e) {
|
|
703
|
-
return true;
|
|
196
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
197
|
+
var componentName = getComponentNameFromType(this.type);
|
|
198
|
+
didWarnAboutElementRef[componentName] ||
|
|
199
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
200
|
+
console.error(
|
|
201
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
202
|
+
));
|
|
203
|
+
componentName = this.props.ref;
|
|
204
|
+
return void 0 !== componentName ? componentName : null;
|
|
704
205
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
206
|
+
function ReactElement(
|
|
207
|
+
type,
|
|
208
|
+
key,
|
|
209
|
+
self,
|
|
210
|
+
source,
|
|
211
|
+
owner,
|
|
212
|
+
props,
|
|
213
|
+
debugStack,
|
|
214
|
+
debugTask
|
|
215
|
+
) {
|
|
216
|
+
self = props.ref;
|
|
217
|
+
type = {
|
|
218
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
219
|
+
type: type,
|
|
220
|
+
key: key,
|
|
221
|
+
props: props,
|
|
222
|
+
_owner: owner
|
|
223
|
+
};
|
|
224
|
+
null !== (void 0 !== self ? self : null)
|
|
225
|
+
? Object.defineProperty(type, "ref", {
|
|
226
|
+
enumerable: false,
|
|
227
|
+
get: elementRefGetterWithDeprecationWarning
|
|
228
|
+
})
|
|
229
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
230
|
+
type._store = {};
|
|
231
|
+
Object.defineProperty(type._store, "validated", {
|
|
232
|
+
configurable: false,
|
|
233
|
+
enumerable: false,
|
|
234
|
+
writable: true,
|
|
235
|
+
value: 0
|
|
236
|
+
});
|
|
237
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
238
|
+
configurable: false,
|
|
239
|
+
enumerable: false,
|
|
240
|
+
writable: true,
|
|
241
|
+
value: null
|
|
242
|
+
});
|
|
243
|
+
Object.defineProperty(type, "_debugStack", {
|
|
244
|
+
configurable: false,
|
|
245
|
+
enumerable: false,
|
|
246
|
+
writable: true,
|
|
247
|
+
value: debugStack
|
|
248
|
+
});
|
|
249
|
+
Object.defineProperty(type, "_debugTask", {
|
|
250
|
+
configurable: false,
|
|
251
|
+
enumerable: false,
|
|
252
|
+
writable: true,
|
|
253
|
+
value: debugTask
|
|
254
|
+
});
|
|
255
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
256
|
+
return type;
|
|
740
257
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
258
|
+
function jsxDEVImpl(
|
|
259
|
+
type,
|
|
260
|
+
config,
|
|
261
|
+
maybeKey,
|
|
262
|
+
isStaticChildren,
|
|
263
|
+
source,
|
|
264
|
+
self,
|
|
265
|
+
debugStack,
|
|
266
|
+
debugTask
|
|
267
|
+
) {
|
|
268
|
+
var children = config.children;
|
|
269
|
+
if (void 0 !== children)
|
|
270
|
+
if (isStaticChildren)
|
|
271
|
+
if (isArrayImpl(children)) {
|
|
272
|
+
for (
|
|
273
|
+
isStaticChildren = 0;
|
|
274
|
+
isStaticChildren < children.length;
|
|
275
|
+
isStaticChildren++
|
|
276
|
+
)
|
|
277
|
+
validateChildKeys(children[isStaticChildren]);
|
|
278
|
+
Object.freeze && Object.freeze(children);
|
|
279
|
+
} else
|
|
280
|
+
console.error(
|
|
281
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
282
|
+
);
|
|
283
|
+
else validateChildKeys(children);
|
|
284
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
285
|
+
children = getComponentNameFromType(type);
|
|
286
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
287
|
+
return "key" !== k;
|
|
288
|
+
});
|
|
289
|
+
isStaticChildren =
|
|
290
|
+
0 < keys.length
|
|
291
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
292
|
+
: "{key: someKey}";
|
|
293
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
294
|
+
((keys =
|
|
295
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
296
|
+
console.error(
|
|
297
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
298
|
+
isStaticChildren,
|
|
299
|
+
children,
|
|
300
|
+
keys,
|
|
301
|
+
children
|
|
302
|
+
),
|
|
303
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
761
304
|
}
|
|
305
|
+
children = null;
|
|
306
|
+
void 0 !== maybeKey &&
|
|
307
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
308
|
+
hasValidKey(config) &&
|
|
309
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
310
|
+
if ("key" in config) {
|
|
311
|
+
maybeKey = {};
|
|
312
|
+
for (var propName in config)
|
|
313
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
314
|
+
} else maybeKey = config;
|
|
315
|
+
children &&
|
|
316
|
+
defineKeyPropWarningGetter(
|
|
317
|
+
maybeKey,
|
|
318
|
+
"function" === typeof type
|
|
319
|
+
? type.displayName || type.name || "Unknown"
|
|
320
|
+
: type
|
|
321
|
+
);
|
|
322
|
+
return ReactElement(
|
|
323
|
+
type,
|
|
324
|
+
children,
|
|
325
|
+
self,
|
|
326
|
+
source,
|
|
327
|
+
getOwner(),
|
|
328
|
+
maybeKey,
|
|
329
|
+
debugStack,
|
|
330
|
+
debugTask
|
|
331
|
+
);
|
|
762
332
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
{
|
|
770
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
771
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
772
|
-
|
|
773
|
-
if (getter && getter.isReactWarning) {
|
|
774
|
-
return false;
|
|
775
|
-
}
|
|
333
|
+
function validateChildKeys(node) {
|
|
334
|
+
"object" === typeof node &&
|
|
335
|
+
null !== node &&
|
|
336
|
+
node.$$typeof === REACT_ELEMENT_TYPE &&
|
|
337
|
+
node._store &&
|
|
338
|
+
(node._store.validated = 1);
|
|
776
339
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
340
|
+
var React$1 = React,
|
|
341
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
342
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
343
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
344
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
345
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
346
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
347
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
348
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
349
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
350
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
351
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
352
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
353
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
354
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
355
|
+
ReactSharedInternals =
|
|
356
|
+
React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
357
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
358
|
+
isArrayImpl = Array.isArray,
|
|
359
|
+
createTask = console.createTask
|
|
360
|
+
? console.createTask
|
|
361
|
+
: function () {
|
|
362
|
+
return null;
|
|
363
|
+
};
|
|
364
|
+
React$1 = {
|
|
365
|
+
"react-stack-bottom-frame": function (callStackForError) {
|
|
366
|
+
return callStackForError();
|
|
795
367
|
}
|
|
796
368
|
};
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
369
|
+
var specialPropKeyWarningShown;
|
|
370
|
+
var didWarnAboutElementRef = {};
|
|
371
|
+
var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
|
|
372
|
+
React$1,
|
|
373
|
+
UnknownOwner
|
|
374
|
+
)();
|
|
375
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
376
|
+
var didWarnAboutKeySpread = {};
|
|
377
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
378
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
|
|
379
|
+
var trackActualOwner =
|
|
380
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
381
|
+
return jsxDEVImpl(
|
|
382
|
+
type,
|
|
383
|
+
config,
|
|
384
|
+
maybeKey,
|
|
385
|
+
false,
|
|
386
|
+
source,
|
|
387
|
+
self,
|
|
388
|
+
trackActualOwner
|
|
389
|
+
? Error("react-stack-top-frame")
|
|
390
|
+
: unknownOwnerDebugStack,
|
|
391
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
392
|
+
);
|
|
393
|
+
};
|
|
394
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
|
|
395
|
+
var trackActualOwner =
|
|
396
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
397
|
+
return jsxDEVImpl(
|
|
398
|
+
type,
|
|
399
|
+
config,
|
|
400
|
+
maybeKey,
|
|
401
|
+
true,
|
|
402
|
+
source,
|
|
403
|
+
self,
|
|
404
|
+
trackActualOwner
|
|
405
|
+
? Error("react-stack-top-frame")
|
|
406
|
+
: unknownOwnerDebugStack,
|
|
407
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
408
|
+
);
|
|
814
409
|
};
|
|
815
|
-
|
|
816
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
817
|
-
Object.defineProperty(props, 'ref', {
|
|
818
|
-
get: warnAboutAccessingRef,
|
|
819
|
-
configurable: true
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
/**
|
|
824
|
-
* Factory method to create a new React element. This no longer adheres to
|
|
825
|
-
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
826
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
827
|
-
* if something is a React Element.
|
|
828
|
-
*
|
|
829
|
-
* @param {*} type
|
|
830
|
-
* @param {*} props
|
|
831
|
-
* @param {*} key
|
|
832
|
-
* @param {string|object} ref
|
|
833
|
-
* @param {*} owner
|
|
834
|
-
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
835
|
-
* different from the `owner` when React.createElement is called, so that we
|
|
836
|
-
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
837
|
-
* functions, and as long as `this` and owner are the same, there will be no
|
|
838
|
-
* change in behavior.
|
|
839
|
-
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
840
|
-
* indicating filename, line number, and/or other information.
|
|
841
|
-
* @internal
|
|
842
|
-
*/
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
846
|
-
var element = {
|
|
847
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
848
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
849
|
-
// Built-in properties that belong on the element
|
|
850
|
-
type: type,
|
|
851
|
-
key: key,
|
|
852
|
-
ref: ref,
|
|
853
|
-
props: props,
|
|
854
|
-
// Record the component responsible for creating this element.
|
|
855
|
-
_owner: owner
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
{
|
|
859
|
-
// The validation flag is currently mutative. We put it on
|
|
860
|
-
// an external backing store so that we can freeze the whole object.
|
|
861
|
-
// This can be replaced with a WeakMap once they are implemented in
|
|
862
|
-
// commonly used development environments.
|
|
863
|
-
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
864
|
-
// the validation flag non-enumerable (where possible, which should
|
|
865
|
-
// include every environment we run tests in), so the test framework
|
|
866
|
-
// ignores it.
|
|
867
|
-
|
|
868
|
-
Object.defineProperty(element._store, 'validated', {
|
|
869
|
-
configurable: false,
|
|
870
|
-
enumerable: false,
|
|
871
|
-
writable: true,
|
|
872
|
-
value: false
|
|
873
|
-
}); // self and source are DEV only properties.
|
|
874
|
-
|
|
875
|
-
Object.defineProperty(element, '_self', {
|
|
876
|
-
configurable: false,
|
|
877
|
-
enumerable: false,
|
|
878
|
-
writable: false,
|
|
879
|
-
value: self
|
|
880
|
-
}); // Two elements created in two different places should be considered
|
|
881
|
-
// equal for testing purposes and therefore we hide it from enumeration.
|
|
882
|
-
|
|
883
|
-
Object.defineProperty(element, '_source', {
|
|
884
|
-
configurable: false,
|
|
885
|
-
enumerable: false,
|
|
886
|
-
writable: false,
|
|
887
|
-
value: source
|
|
888
|
-
});
|
|
889
|
-
|
|
890
|
-
if (Object.freeze) {
|
|
891
|
-
Object.freeze(element.props);
|
|
892
|
-
Object.freeze(element);
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
return element;
|
|
897
|
-
};
|
|
898
|
-
/**
|
|
899
|
-
* https://github.com/reactjs/rfcs/pull/107
|
|
900
|
-
* @param {*} type
|
|
901
|
-
* @param {object} props
|
|
902
|
-
* @param {string} key
|
|
903
|
-
*/
|
|
904
|
-
|
|
905
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
906
|
-
{
|
|
907
|
-
var propName; // Reserved names are extracted
|
|
908
|
-
|
|
909
|
-
var props = {};
|
|
910
|
-
var key = null;
|
|
911
|
-
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
912
|
-
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
913
|
-
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
914
|
-
// but as an intermediary step, we will use jsxDEV for everything except
|
|
915
|
-
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
916
|
-
// key is explicitly declared to be undefined or not.
|
|
917
|
-
|
|
918
|
-
if (maybeKey !== undefined) {
|
|
919
|
-
{
|
|
920
|
-
checkKeyStringCoercion(maybeKey);
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
key = '' + maybeKey;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
if (hasValidKey(config)) {
|
|
927
|
-
{
|
|
928
|
-
checkKeyStringCoercion(config.key);
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
key = '' + config.key;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
if (hasValidRef(config)) {
|
|
935
|
-
ref = config.ref;
|
|
936
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
937
|
-
} // Remaining properties are added to a new props object
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
for (propName in config) {
|
|
941
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
942
|
-
props[propName] = config[propName];
|
|
943
|
-
}
|
|
944
|
-
} // Resolve default props
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
if (type && type.defaultProps) {
|
|
948
|
-
var defaultProps = type.defaultProps;
|
|
949
|
-
|
|
950
|
-
for (propName in defaultProps) {
|
|
951
|
-
if (props[propName] === undefined) {
|
|
952
|
-
props[propName] = defaultProps[propName];
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
if (key || ref) {
|
|
958
|
-
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
959
|
-
|
|
960
|
-
if (key) {
|
|
961
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
if (ref) {
|
|
965
|
-
defineRefPropWarningGetter(props, displayName);
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
974
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
975
|
-
|
|
976
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
977
|
-
{
|
|
978
|
-
if (element) {
|
|
979
|
-
var owner = element._owner;
|
|
980
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
981
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
982
|
-
} else {
|
|
983
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
var propTypesMisspellWarningShown;
|
|
989
|
-
|
|
990
|
-
{
|
|
991
|
-
propTypesMisspellWarningShown = false;
|
|
992
|
-
}
|
|
993
|
-
/**
|
|
994
|
-
* Verifies the object is a ReactElement.
|
|
995
|
-
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
996
|
-
* @param {?object} object
|
|
997
|
-
* @return {boolean} True if `object` is a ReactElement.
|
|
998
|
-
* @final
|
|
999
|
-
*/
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
function isValidElement(object) {
|
|
1003
|
-
{
|
|
1004
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
function getDeclarationErrorAddendum() {
|
|
1009
|
-
{
|
|
1010
|
-
if (ReactCurrentOwner$1.current) {
|
|
1011
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
1012
|
-
|
|
1013
|
-
if (name) {
|
|
1014
|
-
return '\n\nCheck the render method of `' + name + '`.';
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
return '';
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1023
|
-
{
|
|
1024
|
-
|
|
1025
|
-
return '';
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1030
|
-
* object keys are not valid. This allows us to keep track of children between
|
|
1031
|
-
* updates.
|
|
1032
|
-
*/
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
var ownerHasKeyUseWarning = {};
|
|
1036
|
-
|
|
1037
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1038
|
-
{
|
|
1039
|
-
var info = getDeclarationErrorAddendum();
|
|
1040
|
-
|
|
1041
|
-
if (!info) {
|
|
1042
|
-
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1043
|
-
|
|
1044
|
-
if (parentName) {
|
|
1045
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
return info;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
/**
|
|
1053
|
-
* Warn if the element doesn't have an explicit key assigned to it.
|
|
1054
|
-
* This element is in an array. The array could grow and shrink or be
|
|
1055
|
-
* reordered. All children that haven't already been validated are required to
|
|
1056
|
-
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
1057
|
-
* will only be shown once.
|
|
1058
|
-
*
|
|
1059
|
-
* @internal
|
|
1060
|
-
* @param {ReactElement} element Element that requires a key.
|
|
1061
|
-
* @param {*} parentType element's parent's type.
|
|
1062
|
-
*/
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
function validateExplicitKey(element, parentType) {
|
|
1066
|
-
{
|
|
1067
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1068
|
-
return;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
element._store.validated = true;
|
|
1072
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1073
|
-
|
|
1074
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1075
|
-
return;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1079
|
-
// property, it may be the creator of the child that's responsible for
|
|
1080
|
-
// assigning it a key.
|
|
1081
|
-
|
|
1082
|
-
var childOwner = '';
|
|
1083
|
-
|
|
1084
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
1085
|
-
// Give the component that originally created this child.
|
|
1086
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
setCurrentlyValidatingElement$1(element);
|
|
1090
|
-
|
|
1091
|
-
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1092
|
-
|
|
1093
|
-
setCurrentlyValidatingElement$1(null);
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* Ensure that every element either is passed in a static location, in an
|
|
1098
|
-
* array with an explicit keys property defined, or in an object literal
|
|
1099
|
-
* with valid key property.
|
|
1100
|
-
*
|
|
1101
|
-
* @internal
|
|
1102
|
-
* @param {ReactNode} node Statically passed child of any type.
|
|
1103
|
-
* @param {*} parentType node's parent's type.
|
|
1104
|
-
*/
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
function validateChildKeys(node, parentType) {
|
|
1108
|
-
{
|
|
1109
|
-
if (typeof node !== 'object') {
|
|
1110
|
-
return;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
if (isArray(node)) {
|
|
1114
|
-
for (var i = 0; i < node.length; i++) {
|
|
1115
|
-
var child = node[i];
|
|
1116
|
-
|
|
1117
|
-
if (isValidElement(child)) {
|
|
1118
|
-
validateExplicitKey(child, parentType);
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
} else if (isValidElement(node)) {
|
|
1122
|
-
// This element was passed in a valid location.
|
|
1123
|
-
if (node._store) {
|
|
1124
|
-
node._store.validated = true;
|
|
1125
|
-
}
|
|
1126
|
-
} else if (node) {
|
|
1127
|
-
var iteratorFn = getIteratorFn(node);
|
|
1128
|
-
|
|
1129
|
-
if (typeof iteratorFn === 'function') {
|
|
1130
|
-
// Entry iterators used to provide implicit keys,
|
|
1131
|
-
// but now we print a separate warning for them later.
|
|
1132
|
-
if (iteratorFn !== node.entries) {
|
|
1133
|
-
var iterator = iteratorFn.call(node);
|
|
1134
|
-
var step;
|
|
1135
|
-
|
|
1136
|
-
while (!(step = iterator.next()).done) {
|
|
1137
|
-
if (isValidElement(step.value)) {
|
|
1138
|
-
validateExplicitKey(step.value, parentType);
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
/**
|
|
1147
|
-
* Given an element, validate that its props follow the propTypes definition,
|
|
1148
|
-
* provided by the type.
|
|
1149
|
-
*
|
|
1150
|
-
* @param {ReactElement} element
|
|
1151
|
-
*/
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
function validatePropTypes(element) {
|
|
1155
|
-
{
|
|
1156
|
-
var type = element.type;
|
|
1157
|
-
|
|
1158
|
-
if (type === null || type === undefined || typeof type === 'string') {
|
|
1159
|
-
return;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
var propTypes;
|
|
1163
|
-
|
|
1164
|
-
if (typeof type === 'function') {
|
|
1165
|
-
propTypes = type.propTypes;
|
|
1166
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1167
|
-
// Inner props are checked in the reconciler.
|
|
1168
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1169
|
-
propTypes = type.propTypes;
|
|
1170
|
-
} else {
|
|
1171
|
-
return;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
if (propTypes) {
|
|
1175
|
-
// Intentionally inside to avoid triggering lazy initializers:
|
|
1176
|
-
var name = getComponentNameFromType(type);
|
|
1177
|
-
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
1178
|
-
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1179
|
-
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
1180
|
-
|
|
1181
|
-
var _name = getComponentNameFromType(type);
|
|
1182
|
-
|
|
1183
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
1187
|
-
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* Given a fragment, validate that it can only be provided with fragment props
|
|
1193
|
-
* @param {ReactElement} fragment
|
|
1194
|
-
*/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
function validateFragmentProps(fragment) {
|
|
1198
|
-
{
|
|
1199
|
-
var keys = Object.keys(fragment.props);
|
|
1200
|
-
|
|
1201
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1202
|
-
var key = keys[i];
|
|
1203
|
-
|
|
1204
|
-
if (key !== 'children' && key !== 'key') {
|
|
1205
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1206
|
-
|
|
1207
|
-
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
1208
|
-
|
|
1209
|
-
setCurrentlyValidatingElement$1(null);
|
|
1210
|
-
break;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
if (fragment.ref !== null) {
|
|
1215
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1216
|
-
|
|
1217
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
1218
|
-
|
|
1219
|
-
setCurrentlyValidatingElement$1(null);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
var didWarnAboutKeySpread = {};
|
|
1225
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1226
|
-
{
|
|
1227
|
-
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
1228
|
-
// succeed and there will likely be errors in render.
|
|
1229
|
-
|
|
1230
|
-
if (!validType) {
|
|
1231
|
-
var info = '';
|
|
1232
|
-
|
|
1233
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1234
|
-
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
var sourceInfo = getSourceInfoErrorAddendum();
|
|
1238
|
-
|
|
1239
|
-
if (sourceInfo) {
|
|
1240
|
-
info += sourceInfo;
|
|
1241
|
-
} else {
|
|
1242
|
-
info += getDeclarationErrorAddendum();
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
var typeString;
|
|
1246
|
-
|
|
1247
|
-
if (type === null) {
|
|
1248
|
-
typeString = 'null';
|
|
1249
|
-
} else if (isArray(type)) {
|
|
1250
|
-
typeString = 'array';
|
|
1251
|
-
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1252
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
1253
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
1254
|
-
} else {
|
|
1255
|
-
typeString = typeof type;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
1262
|
-
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
1263
|
-
|
|
1264
|
-
if (element == null) {
|
|
1265
|
-
return element;
|
|
1266
|
-
} // Skip key warning if the type isn't valid since our key validation logic
|
|
1267
|
-
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
1268
|
-
// We don't want exception behavior to differ between dev and prod.
|
|
1269
|
-
// (Rendering will throw with a helpful message and as soon as the type is
|
|
1270
|
-
// fixed, the key warnings will appear.)
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
if (validType) {
|
|
1274
|
-
var children = props.children;
|
|
1275
|
-
|
|
1276
|
-
if (children !== undefined) {
|
|
1277
|
-
if (isStaticChildren) {
|
|
1278
|
-
if (isArray(children)) {
|
|
1279
|
-
for (var i = 0; i < children.length; i++) {
|
|
1280
|
-
validateChildKeys(children[i], type);
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
if (Object.freeze) {
|
|
1284
|
-
Object.freeze(children);
|
|
1285
|
-
}
|
|
1286
|
-
} else {
|
|
1287
|
-
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
|
|
1288
|
-
}
|
|
1289
|
-
} else {
|
|
1290
|
-
validateChildKeys(children, type);
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
{
|
|
1296
|
-
if (hasOwnProperty.call(props, 'key')) {
|
|
1297
|
-
var componentName = getComponentNameFromType(type);
|
|
1298
|
-
var keys = Object.keys(props).filter(function (k) {
|
|
1299
|
-
return k !== 'key';
|
|
1300
|
-
});
|
|
1301
|
-
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
|
|
1302
|
-
|
|
1303
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
1304
|
-
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
|
|
1305
|
-
|
|
1306
|
-
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
|
1307
|
-
|
|
1308
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
1314
|
-
validateFragmentProps(element);
|
|
1315
|
-
} else {
|
|
1316
|
-
validatePropTypes(element);
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
return element;
|
|
1320
|
-
}
|
|
1321
|
-
} // These two functions exist to still get child warnings in dev
|
|
1322
|
-
// even with the prod transform. This means that jsxDEV is purely
|
|
1323
|
-
// opt-in behavior for better messages but that we won't stop
|
|
1324
|
-
// giving you warnings if you use production apis.
|
|
1325
|
-
|
|
1326
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
1327
|
-
{
|
|
1328
|
-
return jsxWithValidation(type, props, key, true);
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
1332
|
-
{
|
|
1333
|
-
return jsxWithValidation(type, props, key, false);
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
|
1338
|
-
// for now we can ship identical prod functions
|
|
1339
|
-
|
|
1340
|
-
var jsxs = jsxWithValidationStatic ;
|
|
1341
|
-
|
|
1342
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
1343
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
1344
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
1345
410
|
})();
|
|
1346
|
-
}
|
|
1347
411
|
return reactJsxRuntime_development;
|
|
1348
412
|
}
|
|
1349
413
|
|
|
@@ -1354,7 +418,7 @@ function requireJsxRuntime () {
|
|
|
1354
418
|
hasRequiredJsxRuntime = 1;
|
|
1355
419
|
|
|
1356
420
|
if (process.env.NODE_ENV === 'production') {
|
|
1357
|
-
jsxRuntime.exports =
|
|
421
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
1358
422
|
} else {
|
|
1359
423
|
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
1360
424
|
}
|
|
@@ -1363,20 +427,6 @@ function requireJsxRuntime () {
|
|
|
1363
427
|
|
|
1364
428
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
1365
429
|
|
|
1366
|
-
/**
|
|
1367
|
-
* Returns a space-separated string of class names based on input arguments.
|
|
1368
|
-
*
|
|
1369
|
-
* Accepts any mix of strings, numbers, arrays, or objects. Falsy values are ignored.
|
|
1370
|
-
* Array and object values are recursively flattened, and object keys are included
|
|
1371
|
-
* if their value is truthy. Duplicate class names are removed.
|
|
1372
|
-
*
|
|
1373
|
-
* @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.
|
|
1374
|
-
* @returns {string} A space-separated string of unique class names.
|
|
1375
|
-
*
|
|
1376
|
-
* @example
|
|
1377
|
-
* classNames('foo', ['bar', { baz: true }], { qux: false, quux: true });
|
|
1378
|
-
* // => 'foo bar baz quux'
|
|
1379
|
-
*/
|
|
1380
430
|
function classNames(...args) {
|
|
1381
431
|
const classSet = new Set();
|
|
1382
432
|
function process(item) {
|
|
@@ -1410,10 +460,6 @@ function classNames(...args) {
|
|
|
1410
460
|
return Array.from(classSet).join(' ');
|
|
1411
461
|
}
|
|
1412
462
|
|
|
1413
|
-
/**
|
|
1414
|
-
* Valid Bulma color classes.
|
|
1415
|
-
* @example 'primary', 'link', 'info'
|
|
1416
|
-
*/
|
|
1417
463
|
const validColors = [
|
|
1418
464
|
'primary',
|
|
1419
465
|
'link',
|
|
@@ -1433,10 +479,6 @@ const validColors = [
|
|
|
1433
479
|
'light',
|
|
1434
480
|
'dark',
|
|
1435
481
|
];
|
|
1436
|
-
/**
|
|
1437
|
-
* Valid Bulma color shade suffixes.
|
|
1438
|
-
* @example '00', '05', 'invert'
|
|
1439
|
-
*/
|
|
1440
482
|
const validColorShades = [
|
|
1441
483
|
'00',
|
|
1442
484
|
'05',
|
|
@@ -1460,40 +502,20 @@ const validColorShades = [
|
|
|
1460
502
|
'95',
|
|
1461
503
|
'invert',
|
|
1462
504
|
];
|
|
1463
|
-
/**
|
|
1464
|
-
* Valid Bulma size classes for margins and paddings.
|
|
1465
|
-
* @example '0', '1', 'auto'
|
|
1466
|
-
*/
|
|
1467
505
|
const validSizes$1 = ['0', '1', '2', '3', '4', '5', '6', 'auto'];
|
|
1468
|
-
/**
|
|
1469
|
-
* Valid Bulma text size classes.
|
|
1470
|
-
* @example '1', '2', '3'
|
|
1471
|
-
*/
|
|
1472
506
|
const validTextSizes = ['1', '2', '3', '4', '5', '6', '7'];
|
|
1473
|
-
/**
|
|
1474
|
-
* Valid Bulma text alignment classes.
|
|
1475
|
-
* @example 'centered', 'left', 'right'
|
|
1476
|
-
*/
|
|
1477
507
|
const validAlignments$1 = [
|
|
1478
508
|
'centered',
|
|
1479
509
|
'justified',
|
|
1480
510
|
'left',
|
|
1481
511
|
'right',
|
|
1482
512
|
];
|
|
1483
|
-
/**
|
|
1484
|
-
* Valid Bulma text transformation classes.
|
|
1485
|
-
* @example 'capitalized', 'uppercase', 'italic'
|
|
1486
|
-
*/
|
|
1487
513
|
const validTextTransforms = [
|
|
1488
514
|
'capitalized',
|
|
1489
515
|
'lowercase',
|
|
1490
516
|
'uppercase',
|
|
1491
517
|
'italic',
|
|
1492
518
|
];
|
|
1493
|
-
/**
|
|
1494
|
-
* Valid Bulma text weight classes.
|
|
1495
|
-
* @example 'light', 'normal', 'bold'
|
|
1496
|
-
*/
|
|
1497
519
|
const validTextWeights = [
|
|
1498
520
|
'light',
|
|
1499
521
|
'normal',
|
|
@@ -1501,10 +523,6 @@ const validTextWeights = [
|
|
|
1501
523
|
'semibold',
|
|
1502
524
|
'bold',
|
|
1503
525
|
];
|
|
1504
|
-
/**
|
|
1505
|
-
* Valid Bulma font family classes.
|
|
1506
|
-
* @example 'sans-serif', 'monospace', 'code'
|
|
1507
|
-
*/
|
|
1508
526
|
const validFontFamilies = [
|
|
1509
527
|
'sans-serif',
|
|
1510
528
|
'monospace',
|
|
@@ -1512,10 +530,6 @@ const validFontFamilies = [
|
|
|
1512
530
|
'secondary',
|
|
1513
531
|
'code',
|
|
1514
532
|
];
|
|
1515
|
-
/**
|
|
1516
|
-
* Valid Bulma display classes.
|
|
1517
|
-
* @example 'block', 'flex', 'inline'
|
|
1518
|
-
*/
|
|
1519
533
|
const validDisplays = [
|
|
1520
534
|
'block',
|
|
1521
535
|
'flex',
|
|
@@ -1523,30 +537,14 @@ const validDisplays = [
|
|
|
1523
537
|
'inline-block',
|
|
1524
538
|
'inline-flex',
|
|
1525
539
|
];
|
|
1526
|
-
/**
|
|
1527
|
-
* Valid Bulma visibility classes.
|
|
1528
|
-
* @example 'hidden', 'sr-only'
|
|
1529
|
-
*/
|
|
1530
540
|
const validVisibilities = ['hidden', 'sr-only'];
|
|
1531
|
-
/**
|
|
1532
|
-
* Valid Bulma flex direction classes.
|
|
1533
|
-
* @example 'row', 'column', 'row-reverse'
|
|
1534
|
-
*/
|
|
1535
541
|
const validFlexDirections = [
|
|
1536
542
|
'row',
|
|
1537
543
|
'row-reverse',
|
|
1538
544
|
'column',
|
|
1539
545
|
'column-reverse',
|
|
1540
546
|
];
|
|
1541
|
-
/**
|
|
1542
|
-
* Valid Bulma flex wrap classes.
|
|
1543
|
-
* @example 'nowrap', 'wrap', 'wrap-reverse'
|
|
1544
|
-
*/
|
|
1545
547
|
const validFlexWraps = ['nowrap', 'wrap', 'wrap-reverse'];
|
|
1546
|
-
/**
|
|
1547
|
-
* Valid Bulma justify-content classes.
|
|
1548
|
-
* @example 'flex-start', 'center', 'space-between'
|
|
1549
|
-
*/
|
|
1550
548
|
const validJustifyContents = [
|
|
1551
549
|
'flex-start',
|
|
1552
550
|
'flex-end',
|
|
@@ -1559,10 +557,6 @@ const validJustifyContents = [
|
|
|
1559
557
|
'left',
|
|
1560
558
|
'right',
|
|
1561
559
|
];
|
|
1562
|
-
/**
|
|
1563
|
-
* Valid Bulma align-content classes.
|
|
1564
|
-
* @example 'flex-start', 'center', 'stretch'
|
|
1565
|
-
*/
|
|
1566
560
|
const validAlignContents = [
|
|
1567
561
|
'flex-start',
|
|
1568
562
|
'flex-end',
|
|
@@ -1572,10 +566,6 @@ const validAlignContents = [
|
|
|
1572
566
|
'space-evenly',
|
|
1573
567
|
'stretch',
|
|
1574
568
|
];
|
|
1575
|
-
/**
|
|
1576
|
-
* Valid Bulma align-items classes.
|
|
1577
|
-
* @example 'stretch', 'flex-start', 'center'
|
|
1578
|
-
*/
|
|
1579
569
|
const validAlignItems = [
|
|
1580
570
|
'stretch',
|
|
1581
571
|
'flex-start',
|
|
@@ -1585,10 +575,6 @@ const validAlignItems = [
|
|
|
1585
575
|
'start',
|
|
1586
576
|
'end',
|
|
1587
577
|
];
|
|
1588
|
-
/**
|
|
1589
|
-
* Valid Bulma align-self classes.
|
|
1590
|
-
* @example 'auto', 'flex-start', 'center'
|
|
1591
|
-
*/
|
|
1592
578
|
const validAlignSelfs = [
|
|
1593
579
|
'auto',
|
|
1594
580
|
'flex-start',
|
|
@@ -1597,15 +583,7 @@ const validAlignSelfs = [
|
|
|
1597
583
|
'baseline',
|
|
1598
584
|
'stretch',
|
|
1599
585
|
];
|
|
1600
|
-
/**
|
|
1601
|
-
* Valid Bulma flex grow and shrink values.
|
|
1602
|
-
* @example '0', '1'
|
|
1603
|
-
*/
|
|
1604
586
|
const validFlexGrowShrink = ['0', '1'];
|
|
1605
|
-
/**
|
|
1606
|
-
* Valid Bulma viewport classes for responsive design.
|
|
1607
|
-
* @example 'mobile', 'tablet', 'desktop'
|
|
1608
|
-
*/
|
|
1609
587
|
const validViewports = [
|
|
1610
588
|
'mobile',
|
|
1611
589
|
'tablet',
|
|
@@ -1613,26 +591,10 @@ const validViewports = [
|
|
|
1613
591
|
'widescreen',
|
|
1614
592
|
'fullhd',
|
|
1615
593
|
];
|
|
1616
|
-
/**
|
|
1617
|
-
* A hook that generates Bulma helper classes from props and separates unhandled props.
|
|
1618
|
-
*
|
|
1619
|
-
* @function useBulmaClasses
|
|
1620
|
-
* @param props - Combination of BulmaClassesProps and additional props.
|
|
1621
|
-
* @returns An object containing the Bulma helper classes and unhandled props.
|
|
1622
|
-
* @example
|
|
1623
|
-
* const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1624
|
-
* color: 'primary',
|
|
1625
|
-
* textSize: '3',
|
|
1626
|
-
* className: 'custom-class'
|
|
1627
|
-
* });
|
|
1628
|
-
* // bulmaHelperClasses: 'has-text-primary is-size-3'
|
|
1629
|
-
* // rest: { className: 'custom-class' }
|
|
1630
|
-
*/
|
|
1631
594
|
const useBulmaClasses = (props) => {
|
|
1632
595
|
const { color, backgroundColor, colorShade, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, textSize, textAlign, textTransform, textWeight, fontFamily, display, visibility, flexDirection, flexWrap, justifyContent, alignContent, alignItems, alignSelf, flexGrow, flexShrink, float, overflow, overlay, interaction, radius, shadow, responsive, viewport, ...rest } = props;
|
|
1633
596
|
const bulmaHelperClasses = useMemo(() => {
|
|
1634
597
|
const classes = [];
|
|
1635
|
-
// Helper to add class with optional viewport
|
|
1636
598
|
const addClass = (prefix, value, validValues) => {
|
|
1637
599
|
if (value && (!validValues.length || validValues.includes(value))) {
|
|
1638
600
|
const className = viewport && validViewports.includes(viewport)
|
|
@@ -1641,7 +603,6 @@ const useBulmaClasses = (props) => {
|
|
|
1641
603
|
classes.push(className);
|
|
1642
604
|
}
|
|
1643
605
|
};
|
|
1644
|
-
// Color handling
|
|
1645
606
|
const addColorClass = (prefix, value, shade) => {
|
|
1646
607
|
if (!value || ![...validColors, 'inherit', 'current'].includes(value))
|
|
1647
608
|
return;
|
|
@@ -1655,10 +616,8 @@ const useBulmaClasses = (props) => {
|
|
|
1655
616
|
addClass(prefix, value, [...validColors, 'inherit', 'current']);
|
|
1656
617
|
}
|
|
1657
618
|
};
|
|
1658
|
-
// Color
|
|
1659
619
|
addColorClass('has-text', color, colorShade);
|
|
1660
620
|
addColorClass('has-background', backgroundColor, colorShade);
|
|
1661
|
-
// Spacing
|
|
1662
621
|
addClass('m', m, validSizes$1);
|
|
1663
622
|
addClass('mt', mt, validSizes$1);
|
|
1664
623
|
addClass('mr', mr, validSizes$1);
|
|
@@ -1673,13 +632,11 @@ const useBulmaClasses = (props) => {
|
|
|
1673
632
|
addClass('pl', pl, validSizes$1);
|
|
1674
633
|
addClass('px', px, validSizes$1);
|
|
1675
634
|
addClass('py', py, validSizes$1);
|
|
1676
|
-
// Typography
|
|
1677
635
|
addClass('is-size', textSize, validTextSizes);
|
|
1678
636
|
addClass('has-text', textAlign, validAlignments$1);
|
|
1679
637
|
addClass('is', textTransform, validTextTransforms);
|
|
1680
638
|
addClass('has-text-weight', textWeight, validTextWeights);
|
|
1681
639
|
addClass('is-family', fontFamily, validFontFamilies);
|
|
1682
|
-
// Visibility
|
|
1683
640
|
addClass('is', display, validDisplays);
|
|
1684
641
|
if (visibility) {
|
|
1685
642
|
if (visibility === 'hidden' &&
|
|
@@ -1691,7 +648,6 @@ const useBulmaClasses = (props) => {
|
|
|
1691
648
|
classes.push(`is-${visibility}`);
|
|
1692
649
|
}
|
|
1693
650
|
}
|
|
1694
|
-
// Flexbox
|
|
1695
651
|
if (display === 'flex' || display === 'inline-flex') {
|
|
1696
652
|
addClass('is-flex-direction', flexDirection, validFlexDirections);
|
|
1697
653
|
addClass('is-flex-wrap', flexWrap, validFlexWraps);
|
|
@@ -1702,7 +658,6 @@ const useBulmaClasses = (props) => {
|
|
|
1702
658
|
addClass('is-flex-grow', flexGrow, validFlexGrowShrink);
|
|
1703
659
|
addClass('is-flex-shrink', flexShrink, validFlexGrowShrink);
|
|
1704
660
|
}
|
|
1705
|
-
// Other Helpers
|
|
1706
661
|
if (float) {
|
|
1707
662
|
addClass('is-pulled', float, ['left', 'right']);
|
|
1708
663
|
}
|
|
@@ -1770,12 +725,8 @@ const useBulmaClasses = (props) => {
|
|
|
1770
725
|
return { bulmaHelperClasses, rest };
|
|
1771
726
|
};
|
|
1772
727
|
|
|
1773
|
-
/**
|
|
1774
|
-
* Builds Bulma column and offset class names for the Column component.
|
|
1775
|
-
*/
|
|
1776
728
|
function getColumnClassNames(props) {
|
|
1777
729
|
const classList = [];
|
|
1778
|
-
// Sizes
|
|
1779
730
|
const sizeProps = [
|
|
1780
731
|
{ prop: 'size', prefix: 'is', suffix: '' },
|
|
1781
732
|
{ prop: 'sizeMobile', prefix: 'is', suffix: 'mobile' },
|
|
@@ -1793,7 +744,6 @@ function getColumnClassNames(props) {
|
|
|
1793
744
|
classList.push(className);
|
|
1794
745
|
}
|
|
1795
746
|
}
|
|
1796
|
-
// Offsets
|
|
1797
747
|
const offsetProps = [
|
|
1798
748
|
{ prop: 'offset', prefix: 'is-offset', suffix: '' },
|
|
1799
749
|
{ prop: 'offsetMobile', prefix: 'is-offset', suffix: 'mobile' },
|
|
@@ -1811,7 +761,6 @@ function getColumnClassNames(props) {
|
|
|
1811
761
|
classList.push(className);
|
|
1812
762
|
}
|
|
1813
763
|
}
|
|
1814
|
-
// isNarrow (responsive)
|
|
1815
764
|
if (props.isNarrow)
|
|
1816
765
|
classList.push('is-narrow');
|
|
1817
766
|
if (props.isNarrowMobile)
|
|
@@ -1828,14 +777,6 @@ function getColumnClassNames(props) {
|
|
|
1828
777
|
classList.push('is-narrow-fullhd');
|
|
1829
778
|
return classList;
|
|
1830
779
|
}
|
|
1831
|
-
/**
|
|
1832
|
-
* Bulma Column component for responsive grid layouts.
|
|
1833
|
-
*
|
|
1834
|
-
* @function
|
|
1835
|
-
* @param {ColumnProps} props - Props for the Column component.
|
|
1836
|
-
* @returns {JSX.Element} The rendered column.
|
|
1837
|
-
* @see {@link https://bulma.io/documentation/columns/ | Bulma Columns documentation}
|
|
1838
|
-
*/
|
|
1839
780
|
const Column = ({ className, textColor, bgColor, size, sizeMobile, sizeTablet, sizeDesktop, sizeWidescreen, sizeFullhd, offset, offsetMobile, offsetTablet, offsetDesktop, offsetWidescreen, offsetFullhd, isNarrow, isNarrowMobile, isNarrowTablet, isNarrowTouch, isNarrowDesktop, isNarrowWidescreen, isNarrowFullhd, children, ...props }) => {
|
|
1840
781
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1841
782
|
color: textColor,
|
|
@@ -1866,9 +807,6 @@ const Column = ({ className, textColor, bgColor, size, sizeMobile, sizeTablet, s
|
|
|
1866
807
|
return (jsxRuntimeExports.jsx("div", { className: columnClasses, ...rest, children: children }));
|
|
1867
808
|
};
|
|
1868
809
|
|
|
1869
|
-
/**
|
|
1870
|
-
* Builds Bulma gap classes for the Columns component.
|
|
1871
|
-
*/
|
|
1872
810
|
function getGapClasses(props) {
|
|
1873
811
|
const gapClassMap = [
|
|
1874
812
|
{ prop: 'gapSize', prefix: 'is' },
|
|
@@ -1889,14 +827,6 @@ function getGapClasses(props) {
|
|
|
1889
827
|
return [];
|
|
1890
828
|
});
|
|
1891
829
|
}
|
|
1892
|
-
/**
|
|
1893
|
-
* Bulma Columns container for flexible, responsive layouts.
|
|
1894
|
-
*
|
|
1895
|
-
* @function
|
|
1896
|
-
* @param {ColumnsProps} props - Props for the Columns component.
|
|
1897
|
-
* @returns {JSX.Element} The rendered columns container.
|
|
1898
|
-
* @see {@link https://bulma.io/documentation/columns/ | Bulma Columns documentation}
|
|
1899
|
-
*/
|
|
1900
830
|
const Columns = ({ className, textColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
|
|
1901
831
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1902
832
|
color: textColor,
|
|
@@ -1929,16 +859,6 @@ const validBreadcrumbSeparators = [
|
|
|
1929
859
|
'succeeds',
|
|
1930
860
|
];
|
|
1931
861
|
const validBreadcrumbSizes = ['small', 'medium', 'large'];
|
|
1932
|
-
/**
|
|
1933
|
-
* Breadcrumb component for rendering a styled Bulma breadcrumb navigation.
|
|
1934
|
-
*
|
|
1935
|
-
* Supports alignment, separator styles, and sizes.
|
|
1936
|
-
*
|
|
1937
|
-
* @function
|
|
1938
|
-
* @param {BreadcrumbProps} props - Props for the Breadcrumb component.
|
|
1939
|
-
* @returns {JSX.Element} The rendered breadcrumb element.
|
|
1940
|
-
* @see {@link https://bulma.io/documentation/components/breadcrumb/ | Bulma Breadcrumb documentation}
|
|
1941
|
-
*/
|
|
1942
862
|
const Breadcrumb = ({ className, alignment, separator, size, children, ...props }) => {
|
|
1943
863
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1944
864
|
const breadcrumbClasses = classNames('breadcrumb', className, bulmaHelperClasses, {
|
|
@@ -1949,21 +869,12 @@ const Breadcrumb = ({ className, alignment, separator, size, children, ...props
|
|
|
1949
869
|
return (jsxRuntimeExports.jsx("nav", { className: breadcrumbClasses, "aria-label": "breadcrumbs", ...rest, children: jsxRuntimeExports.jsx("ul", { children: children }) }));
|
|
1950
870
|
};
|
|
1951
871
|
|
|
1952
|
-
// Always wrap each footer item in .card-footer-item
|
|
1953
872
|
const renderFooter = (footer) => {
|
|
1954
873
|
if (!footer)
|
|
1955
874
|
return null;
|
|
1956
875
|
const items = Array.isArray(footer) ? footer : [footer];
|
|
1957
876
|
return items.map((item, idx) => (jsxRuntimeExports.jsx("span", { className: "card-footer-item", children: item }, idx)));
|
|
1958
|
-
};
|
|
1959
|
-
/**
|
|
1960
|
-
* Card component for rendering a styled Bulma card.
|
|
1961
|
-
*
|
|
1962
|
-
* @function
|
|
1963
|
-
* @param {CardProps} props - Props for the Card component.
|
|
1964
|
-
* @returns {JSX.Element} The rendered card element.
|
|
1965
|
-
* @see {@link https://bulma.io/documentation/components/card/ | Bulma Card documentation}
|
|
1966
|
-
*/
|
|
877
|
+
};
|
|
1967
878
|
const Card = ({ className, children, textColor, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, ...props }) => {
|
|
1968
879
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1969
880
|
color: textColor,
|
|
@@ -1973,7 +884,6 @@ const Card = ({ className, children, textColor, bgColor, hasShadow = true, heade
|
|
|
1973
884
|
const cardClasses = classNames('card', className, bulmaHelperClasses, {
|
|
1974
885
|
'is-shadowless': !hasShadow,
|
|
1975
886
|
});
|
|
1976
|
-
// Render header with optional icon and is-centered modifier
|
|
1977
887
|
const renderHeader = (header, headerIcon, headerCentered) => {
|
|
1978
888
|
if (!header && !headerIcon)
|
|
1979
889
|
return null;
|
|
@@ -1985,34 +895,17 @@ const Card = ({ className, children, textColor, bgColor, hasShadow = true, heade
|
|
|
1985
895
|
children !== null &&
|
|
1986
896
|
children !== '' && jsxRuntimeExports.jsx("div", { className: "card-content", children: children }), footer && (jsxRuntimeExports.jsx("footer", { className: "card-footer", children: renderFooter(footer) }))] }));
|
|
1987
897
|
};
|
|
1988
|
-
// Only for test coverage
|
|
1989
898
|
const __test_exports__ = { renderFooter };
|
|
1990
899
|
|
|
1991
|
-
/**
|
|
1992
|
-
* Checks if code is running in a browser environment.
|
|
1993
|
-
* @param win - Window object.
|
|
1994
|
-
* @param doc - Document object.
|
|
1995
|
-
* @returns {boolean} True if in browser, false otherwise.
|
|
1996
|
-
*/
|
|
1997
900
|
const isBrowser = (win, doc) => typeof win !== 'undefined' && typeof doc !== 'undefined';
|
|
1998
|
-
/**
|
|
1999
|
-
* Bulma Dropdown component.
|
|
2000
|
-
*
|
|
2001
|
-
* @function
|
|
2002
|
-
* @param {DropdownProps} props - Props for the Dropdown component.
|
|
2003
|
-
* @returns {JSX.Element} The rendered dropdown.
|
|
2004
|
-
* @see {@link https://bulma.io/documentation/components/dropdown/ | Bulma Dropdown documentation}
|
|
2005
|
-
*/
|
|
2006
901
|
const DropdownComponent = ({ label, children, className, menuClassName, active: activeProp, up, right, hoverable, disabled, onActiveChange, closeOnClick = true, id, ...props }) => {
|
|
2007
902
|
const [active, setActive] = useState(!!activeProp);
|
|
2008
903
|
const dropdownRef = useRef(null);
|
|
2009
904
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
2010
|
-
// Controlled mode support
|
|
2011
905
|
useEffect(() => {
|
|
2012
906
|
if (typeof activeProp === 'boolean')
|
|
2013
907
|
setActive(activeProp);
|
|
2014
908
|
}, [activeProp]);
|
|
2015
|
-
// SSR-safe outside click
|
|
2016
909
|
useEffect(() => {
|
|
2017
910
|
if (!active)
|
|
2018
911
|
return;
|
|
@@ -2050,83 +943,37 @@ const DropdownComponent = ({ label, children, className, menuClassName, active:
|
|
|
2050
943
|
}, className);
|
|
2051
944
|
return (jsxRuntimeExports.jsxs("div", { className: dropdownClasses, ref: dropdownRef, id: id, "data-testid": "dropdown-root", ...rest, children: [jsxRuntimeExports.jsx("div", { className: "dropdown-trigger", children: jsxRuntimeExports.jsxs("button", { className: "button", "aria-haspopup": "true", "aria-controls": id ? `${id}-menu` : undefined, "aria-expanded": active, onClick: handleToggle, disabled: disabled, type: "button", children: [jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx("span", { className: "icon is-small", "aria-hidden": "true", children: jsxRuntimeExports.jsx("i", { className: "fas fa-angle-down" }) })] }) }), jsxRuntimeExports.jsx("div", { className: classNames('dropdown-menu', menuClassName), id: id ? `${id}-menu` : undefined, role: "menu", "data-testid": "dropdown-menu", children: jsxRuntimeExports.jsx("div", { className: "dropdown-content", onClick: handleMenuClick, tabIndex: -1, children: children }) })] }));
|
|
2052
945
|
};
|
|
2053
|
-
/**
|
|
2054
|
-
* Bulma Dropdown item.
|
|
2055
|
-
*
|
|
2056
|
-
* @function
|
|
2057
|
-
* @param {DropdownItemProps} props - Props for the DropdownItem component.
|
|
2058
|
-
* @returns {JSX.Element} The rendered dropdown item.
|
|
2059
|
-
*/
|
|
2060
946
|
const DropdownItem = ({ children, active, className, as: Component = 'a', ...props }) => {
|
|
2061
947
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
2062
948
|
return (jsxRuntimeExports.jsx(Component, { className: classNames('dropdown-item', bulmaHelperClasses, { 'is-active': active }, className), tabIndex: 0, role: "menuitem", "data-testid": "dropdown-item", ...rest, children: children }));
|
|
2063
949
|
};
|
|
2064
|
-
/**
|
|
2065
|
-
* Bulma Dropdown divider.
|
|
2066
|
-
*
|
|
2067
|
-
* @returns {JSX.Element} The divider element.
|
|
2068
|
-
*/
|
|
2069
950
|
const DropdownDivider = () => (jsxRuntimeExports.jsx("hr", { className: "dropdown-divider" }));
|
|
2070
|
-
// Assign static subcomponents
|
|
2071
951
|
const Dropdown = Object.assign(DropdownComponent, {
|
|
2072
952
|
Item: DropdownItem,
|
|
2073
953
|
Divider: DropdownDivider,
|
|
2074
954
|
});
|
|
2075
955
|
|
|
2076
|
-
// Context to track MenuList nesting level
|
|
2077
956
|
const MenuListLevelContext = createContext(0);
|
|
2078
|
-
/**
|
|
2079
|
-
* Bulma Menu component.
|
|
2080
|
-
*
|
|
2081
|
-
* @function
|
|
2082
|
-
* @param {MenuProps} props - Props for the Menu component.
|
|
2083
|
-
* @returns {JSX.Element} The rendered menu.
|
|
2084
|
-
* @see {@link https://bulma.io/documentation/components/menu/ | Bulma Menu documentation}
|
|
2085
|
-
*/
|
|
2086
957
|
const MenuComponent = ({ className, children, ...props }) => {
|
|
2087
958
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
2088
959
|
return (jsxRuntimeExports.jsx("aside", { className: classNames('menu', className, bulmaHelperClasses), ...rest, children: children }));
|
|
2089
960
|
};
|
|
2090
|
-
/**
|
|
2091
|
-
* Bulma Menu label component.
|
|
2092
|
-
*
|
|
2093
|
-
* @function
|
|
2094
|
-
* @param {MenuLabelProps} props - Props for the MenuLabel component.
|
|
2095
|
-
* @returns {JSX.Element} The rendered menu label.
|
|
2096
|
-
*/
|
|
2097
961
|
const MenuLabel = ({ className, children, ...props }) => {
|
|
2098
962
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
2099
963
|
return (jsxRuntimeExports.jsx("p", { className: classNames('menu-label', className, bulmaHelperClasses), ...rest, children: children }));
|
|
2100
964
|
};
|
|
2101
|
-
/**
|
|
2102
|
-
* MenuList applies `menu-list` class only at the top level (not for nested lists).
|
|
2103
|
-
*
|
|
2104
|
-
* @function
|
|
2105
|
-
* @param {MenuListProps} props - Props for the MenuList component.
|
|
2106
|
-
* @returns {JSX.Element} The rendered menu list.
|
|
2107
|
-
*/
|
|
2108
965
|
const MenuList = ({ className, children, ...props }) => {
|
|
2109
966
|
const level = useContext(MenuListLevelContext);
|
|
2110
967
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
2111
968
|
const ulClass = classNames(className, bulmaHelperClasses, {
|
|
2112
969
|
'menu-list': level === 0,
|
|
2113
970
|
});
|
|
2114
|
-
// Increment level for nested MenuLists
|
|
2115
971
|
return (jsxRuntimeExports.jsx(MenuListLevelContext.Provider, { value: level + 1, children: jsxRuntimeExports.jsx("ul", { className: ulClass, ...rest, children: children }) }));
|
|
2116
972
|
};
|
|
2117
|
-
/**
|
|
2118
|
-
* MenuItem supports `as` prop for custom link components, e.g., react-router-dom Link.
|
|
2119
|
-
*
|
|
2120
|
-
* @function
|
|
2121
|
-
* @param {MenuItemProps} props - Props for the MenuItem component.
|
|
2122
|
-
* @returns {JSX.Element} The rendered menu item.
|
|
2123
|
-
*/
|
|
2124
973
|
const MenuItem = ({ className, children, active, href, as: Component = 'a', 'data-testid': testId, ...rest }) => {
|
|
2125
974
|
const { bulmaHelperClasses, rest: bulmaRest } = useBulmaClasses(rest);
|
|
2126
975
|
const itemClass = classNames({ 'is-active': active }, bulmaHelperClasses);
|
|
2127
|
-
// Standard <li> props
|
|
2128
976
|
const { style, id, title, role, tabIndex, ...linkProps } = bulmaRest;
|
|
2129
|
-
// Split children into label and nested MenuList(s)
|
|
2130
977
|
const labelChildren = [];
|
|
2131
978
|
const nestedMenuLists = [];
|
|
2132
979
|
React.Children.forEach(children, child => {
|
|
@@ -2137,7 +984,6 @@ const MenuItem = ({ className, children, active, href, as: Component = 'a', 'dat
|
|
|
2137
984
|
labelChildren.push(child);
|
|
2138
985
|
}
|
|
2139
986
|
});
|
|
2140
|
-
// href/to should go to the link component
|
|
2141
987
|
if (Component === 'a' && href) {
|
|
2142
988
|
linkProps.href = href;
|
|
2143
989
|
}
|
|
@@ -2146,23 +992,12 @@ const MenuItem = ({ className, children, active, href, as: Component = 'a', 'dat
|
|
|
2146
992
|
}
|
|
2147
993
|
return (jsxRuntimeExports.jsxs("li", { className: className, "data-testid": testId, style: style, id: id, title: title, role: role, tabIndex: tabIndex, children: [jsxRuntimeExports.jsx(Component, { className: itemClass, ...linkProps, children: labelChildren }), nestedMenuLists] }));
|
|
2148
994
|
};
|
|
2149
|
-
// Attach static subcomponents
|
|
2150
995
|
const Menu = Object.assign(MenuComponent, {
|
|
2151
996
|
Label: MenuLabel,
|
|
2152
997
|
List: MenuList,
|
|
2153
998
|
Item: MenuItem,
|
|
2154
999
|
});
|
|
2155
1000
|
|
|
2156
|
-
/**
|
|
2157
|
-
* Bulma-styled Message component.
|
|
2158
|
-
*
|
|
2159
|
-
* Supports Bulma helper classes, color, and an optional close button.
|
|
2160
|
-
*
|
|
2161
|
-
* @function
|
|
2162
|
-
* @param {MessageProps} props - Props for the Message component.
|
|
2163
|
-
* @returns {JSX.Element} The rendered message.
|
|
2164
|
-
* @see {@link https://bulma.io/documentation/components/message/ | Bulma Message documentation}
|
|
2165
|
-
*/
|
|
2166
1001
|
const Message = ({ className, title, textColor, color, bgColor, onClose, children, ...props }) => {
|
|
2167
1002
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2168
1003
|
color: textColor,
|
|
@@ -2173,21 +1008,12 @@ const Message = ({ className, title, textColor, color, bgColor, onClose, childre
|
|
|
2173
1008
|
return (jsxRuntimeExports.jsxs("article", { className: messageClasses, ...rest, "data-testid": "message", children: [(title || onClose) && (jsxRuntimeExports.jsxs("div", { className: "message-header", children: [title && jsxRuntimeExports.jsx("span", { children: title }), onClose && (jsxRuntimeExports.jsx("button", { className: "delete", "aria-label": "delete", onClick: onClose, type: "button", "data-testid": "message-close" }))] })), children && (jsxRuntimeExports.jsx("div", { className: "message-body", "data-testid": "message-body", children: children }))] }));
|
|
2174
1009
|
};
|
|
2175
1010
|
|
|
2176
|
-
/**
|
|
2177
|
-
* Bulma Modal component, supporting both modal-card and modal-content variants.
|
|
2178
|
-
*
|
|
2179
|
-
* @function
|
|
2180
|
-
* @param {ModalProps} props - Props for the Modal component.
|
|
2181
|
-
* @returns {JSX.Element} The rendered modal.
|
|
2182
|
-
* @see {@link https://bulma.io/documentation/components/modal/ | Bulma Modal documentation}
|
|
2183
|
-
*/
|
|
2184
1011
|
const Modal = ({ active = false, onClose, className, textColor, bgColor, modalCardTitle, modalCardFoot, type, children, ...props }) => {
|
|
2185
1012
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2186
1013
|
color: textColor,
|
|
2187
1014
|
backgroundColor: bgColor,
|
|
2188
1015
|
...props,
|
|
2189
1016
|
});
|
|
2190
|
-
// EXPLICIT type wins; fallback to auto detection if not provided
|
|
2191
1017
|
let isModalCard;
|
|
2192
1018
|
if (type === 'card')
|
|
2193
1019
|
isModalCard = true;
|
|
@@ -2199,14 +1025,6 @@ const Modal = ({ active = false, onClose, className, textColor, bgColor, modalCa
|
|
|
2199
1025
|
return (jsxRuntimeExports.jsxs("div", { className: modalClasses, ...rest, "data-testid": "modal", children: [jsxRuntimeExports.jsx("div", { className: "modal-background", onClick: onClose, "data-testid": "modal-background" }), isModalCard ? (jsxRuntimeExports.jsxs("div", { className: "modal-card", children: [modalCardTitle && (jsxRuntimeExports.jsxs("header", { className: "modal-card-head", children: [jsxRuntimeExports.jsx("p", { className: "modal-card-title", children: modalCardTitle }), onClose && (jsxRuntimeExports.jsx("button", { className: "delete", "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close" }))] })), jsxRuntimeExports.jsx("section", { className: "modal-card-body", "data-testid": "modal-body", children: children }), modalCardFoot && (jsxRuntimeExports.jsx("footer", { className: "modal-card-foot", children: modalCardFoot }))] })) : (jsxRuntimeExports.jsx("div", { className: "modal-content", "data-testid": "modal-content", children: children })), (!isModalCard || (!modalCardTitle && onClose)) && onClose && (jsxRuntimeExports.jsx("button", { className: "modal-close is-large", "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close-float" }))] }));
|
|
2200
1026
|
};
|
|
2201
1027
|
|
|
2202
|
-
/**
|
|
2203
|
-
* Bulma Navbar component, supports subcomponents for structured navigation.
|
|
2204
|
-
*
|
|
2205
|
-
* @function
|
|
2206
|
-
* @param {NavbarProps} props - Props for the Navbar component.
|
|
2207
|
-
* @returns {JSX.Element} The rendered navbar.
|
|
2208
|
-
* @see {@link https://bulma.io/documentation/components/navbar/ | Bulma Navbar documentation}
|
|
2209
|
-
*/
|
|
2210
1028
|
const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
|
|
2211
1029
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2212
1030
|
color: textColor,
|
|
@@ -2220,13 +1038,6 @@ const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, chil
|
|
|
2220
1038
|
});
|
|
2221
1039
|
return (jsxRuntimeExports.jsx("nav", { className: navbarClasses, role: "navigation", "aria-label": "main navigation", ...rest, children: children }));
|
|
2222
1040
|
};
|
|
2223
|
-
/**
|
|
2224
|
-
* Bulma Navbar brand area (usually left side).
|
|
2225
|
-
*
|
|
2226
|
-
* @function
|
|
2227
|
-
* @param {NavbarBrandProps} props - Props for the NavbarBrand component.
|
|
2228
|
-
* @returns {JSX.Element} The rendered brand area.
|
|
2229
|
-
*/
|
|
2230
1041
|
const NavbarBrand = ({ className, children, textColor, ...props }) => {
|
|
2231
1042
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2232
1043
|
color: textColor,
|
|
@@ -2234,13 +1045,6 @@ const NavbarBrand = ({ className, children, textColor, ...props }) => {
|
|
|
2234
1045
|
});
|
|
2235
1046
|
return (jsxRuntimeExports.jsx("div", { className: classNames('navbar-brand', bulmaHelperClasses, className), ...rest, children: children }));
|
|
2236
1047
|
};
|
|
2237
|
-
/**
|
|
2238
|
-
* Bulma Navbar item (link, button, etc).
|
|
2239
|
-
*
|
|
2240
|
-
* @function
|
|
2241
|
-
* @param {NavbarItemProps} props - Props for the NavbarItem component.
|
|
2242
|
-
* @returns {JSX.Element} The rendered item.
|
|
2243
|
-
*/
|
|
2244
1048
|
const NavbarItem = ({ className, as: Component = 'a', active, textColor, bgColor, children, ...props }) => {
|
|
2245
1049
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2246
1050
|
color: textColor,
|
|
@@ -2251,13 +1055,6 @@ const NavbarItem = ({ className, as: Component = 'a', active, textColor, bgColor
|
|
|
2251
1055
|
'is-active': active,
|
|
2252
1056
|
}), ...rest, children: children }));
|
|
2253
1057
|
};
|
|
2254
|
-
/**
|
|
2255
|
-
* Bulma Navbar burger (responsive menu toggle).
|
|
2256
|
-
*
|
|
2257
|
-
* @function
|
|
2258
|
-
* @param {NavbarBurgerProps} props - Props for the NavbarBurger component.
|
|
2259
|
-
* @returns {JSX.Element} The rendered burger.
|
|
2260
|
-
*/
|
|
2261
1058
|
const NavbarBurger = ({ className, active, children, ...props }) => {
|
|
2262
1059
|
var _a;
|
|
2263
1060
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
@@ -2267,13 +1064,6 @@ const NavbarBurger = ({ className, active, children, ...props }) => {
|
|
|
2267
1064
|
'is-active': active,
|
|
2268
1065
|
}), "aria-label": props['aria-label'] || 'menu', "aria-expanded": (_a = props['aria-expanded']) !== null && _a !== void 0 ? _a : !!active, ...rest, children: [jsxRuntimeExports.jsx("span", { "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { "aria-hidden": "true" }), children] }));
|
|
2269
1066
|
};
|
|
2270
|
-
/**
|
|
2271
|
-
* Bulma Navbar menu area (collapsible content).
|
|
2272
|
-
*
|
|
2273
|
-
* @function
|
|
2274
|
-
* @param {NavbarMenuProps} props - Props for the NavbarMenu component.
|
|
2275
|
-
* @returns {JSX.Element} The rendered menu.
|
|
2276
|
-
*/
|
|
2277
1067
|
const NavbarMenu = ({ className, active, children, ...props }) => {
|
|
2278
1068
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2279
1069
|
...props,
|
|
@@ -2282,64 +1072,29 @@ const NavbarMenu = ({ className, active, children, ...props }) => {
|
|
|
2282
1072
|
'is-active': active,
|
|
2283
1073
|
}), ...rest, children: children }));
|
|
2284
1074
|
};
|
|
2285
|
-
/**
|
|
2286
|
-
* Bulma Navbar start area (left-aligned).
|
|
2287
|
-
*
|
|
2288
|
-
* @function
|
|
2289
|
-
* @param {NavbarStartEndProps} props - Props for the NavbarStart component.
|
|
2290
|
-
* @returns {JSX.Element} The rendered start area.
|
|
2291
|
-
*/
|
|
2292
1075
|
const NavbarStart = ({ className, children, ...props }) => {
|
|
2293
1076
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2294
1077
|
...props,
|
|
2295
1078
|
});
|
|
2296
1079
|
return (jsxRuntimeExports.jsx("div", { className: classNames('navbar-start', bulmaHelperClasses, className), ...rest, children: children }));
|
|
2297
1080
|
};
|
|
2298
|
-
/**
|
|
2299
|
-
* Bulma Navbar end area (right-aligned).
|
|
2300
|
-
*
|
|
2301
|
-
* @function
|
|
2302
|
-
* @param {NavbarStartEndProps} props - Props for the NavbarEnd component.
|
|
2303
|
-
* @returns {JSX.Element} The rendered end area.
|
|
2304
|
-
*/
|
|
2305
1081
|
const NavbarEnd = ({ className, children, ...props }) => {
|
|
2306
1082
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2307
1083
|
...props,
|
|
2308
1084
|
});
|
|
2309
1085
|
return (jsxRuntimeExports.jsx("div", { className: classNames('navbar-end', bulmaHelperClasses, className), ...rest, children: children }));
|
|
2310
1086
|
};
|
|
2311
|
-
/**
|
|
2312
|
-
* Bulma Navbar dropdown (for nested dropdown menus).
|
|
2313
|
-
*
|
|
2314
|
-
* @function
|
|
2315
|
-
* @param {NavbarDropdownProps} props - Props for the NavbarDropdown component.
|
|
2316
|
-
* @returns {JSX.Element} The rendered dropdown.
|
|
2317
|
-
*/
|
|
2318
1087
|
const NavbarDropdown = ({ className, right, up, hoverable, active, children, ...props }) => (jsxRuntimeExports.jsx("div", { className: classNames('navbar-item', 'has-dropdown', {
|
|
2319
1088
|
'is-right': right,
|
|
2320
1089
|
'is-up': up,
|
|
2321
1090
|
'is-hoverable': hoverable,
|
|
2322
1091
|
'is-active': active,
|
|
2323
1092
|
}, className), ...props, children: children }));
|
|
2324
|
-
/**
|
|
2325
|
-
* Bulma Navbar dropdown menu container.
|
|
2326
|
-
*
|
|
2327
|
-
* @function
|
|
2328
|
-
* @param {NavbarDropdownMenuProps} props - Props for the NavbarDropdownMenu component.
|
|
2329
|
-
* @returns {JSX.Element} The rendered dropdown menu.
|
|
2330
|
-
*/
|
|
2331
1093
|
const NavbarDropdownMenu = ({ className, right, up, children, ...props }) => (jsxRuntimeExports.jsx("div", { className: classNames('navbar-dropdown', {
|
|
2332
1094
|
'is-right': right,
|
|
2333
1095
|
'is-up': up,
|
|
2334
1096
|
}, className), ...props, children: children }));
|
|
2335
|
-
/**
|
|
2336
|
-
* Bulma Navbar divider.
|
|
2337
|
-
*
|
|
2338
|
-
* @param props - Standard hr props.
|
|
2339
|
-
* @returns {JSX.Element} The rendered divider.
|
|
2340
|
-
*/
|
|
2341
1097
|
const NavbarDivider = props => jsxRuntimeExports.jsx("hr", { className: "navbar-divider", ...props });
|
|
2342
|
-
// Attach subcomponents
|
|
2343
1098
|
Navbar.Brand = NavbarBrand;
|
|
2344
1099
|
Navbar.Item = NavbarItem;
|
|
2345
1100
|
Navbar.Burger = NavbarBurger;
|
|
@@ -2350,9 +1105,6 @@ Navbar.Dropdown = NavbarDropdown;
|
|
|
2350
1105
|
Navbar.DropdownMenu = NavbarDropdownMenu;
|
|
2351
1106
|
Navbar.Divider = NavbarDivider;
|
|
2352
1107
|
|
|
2353
|
-
/**
|
|
2354
|
-
* Bulma Pagination previous button.
|
|
2355
|
-
*/
|
|
2356
1108
|
const PaginationPrevious = ({ className, disabled, children, ...props }) => (jsxRuntimeExports.jsx("a", { className: classNames('pagination-previous', className, {
|
|
2357
1109
|
'is-disabled': disabled,
|
|
2358
1110
|
}), "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, ...props, onClick: disabled
|
|
@@ -2361,9 +1113,6 @@ const PaginationPrevious = ({ className, disabled, children, ...props }) => (jsx
|
|
|
2361
1113
|
e.stopPropagation();
|
|
2362
1114
|
}
|
|
2363
1115
|
: props.onClick, children: children }));
|
|
2364
|
-
/**
|
|
2365
|
-
* Bulma Pagination next button.
|
|
2366
|
-
*/
|
|
2367
1116
|
const PaginationNext = ({ className, disabled, children, ...props }) => (jsxRuntimeExports.jsx("a", { className: classNames('pagination-next', className, {
|
|
2368
1117
|
'is-disabled': disabled,
|
|
2369
1118
|
}), "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, ...props, onClick: disabled
|
|
@@ -2372,14 +1121,6 @@ const PaginationNext = ({ className, disabled, children, ...props }) => (jsxRunt
|
|
|
2372
1121
|
e.stopPropagation();
|
|
2373
1122
|
}
|
|
2374
1123
|
: props.onClick, children: children }));
|
|
2375
|
-
/**
|
|
2376
|
-
* Bulma Pagination navigation component.
|
|
2377
|
-
*
|
|
2378
|
-
* @function
|
|
2379
|
-
* @param {PaginationProps} props - Props for the Pagination component.
|
|
2380
|
-
* @returns {JSX.Element} The rendered pagination.
|
|
2381
|
-
* @see {@link https://bulma.io/documentation/components/pagination/ | Bulma Pagination documentation}
|
|
2382
|
-
*/
|
|
2383
1124
|
const Pagination = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
|
|
2384
1125
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2385
1126
|
color: textColor,
|
|
@@ -2394,9 +1135,6 @@ const Pagination = ({ color, textColor, bgColor, size, align, rounded, className
|
|
|
2394
1135
|
});
|
|
2395
1136
|
return (jsxRuntimeExports.jsx("nav", { className: paginationClasses, role: "navigation", "aria-label": "pagination", ...rest, children: children }));
|
|
2396
1137
|
};
|
|
2397
|
-
/**
|
|
2398
|
-
* Bulma Pagination list container.
|
|
2399
|
-
*/
|
|
2400
1138
|
const PaginationList = ({ className, textColor, bgColor, children, ...props }) => {
|
|
2401
1139
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2402
1140
|
color: textColor,
|
|
@@ -2405,9 +1143,6 @@ const PaginationList = ({ className, textColor, bgColor, children, ...props }) =
|
|
|
2405
1143
|
});
|
|
2406
1144
|
return (jsxRuntimeExports.jsx("ul", { className: classNames('pagination-list', bulmaHelperClasses, className), ...rest, children: children }));
|
|
2407
1145
|
};
|
|
2408
|
-
/**
|
|
2409
|
-
* Bulma Pagination link (page number).
|
|
2410
|
-
*/
|
|
2411
1146
|
const PaginationLink = ({ className, textColor, bgColor, active, disabled, onClick, children, ...props }) => {
|
|
2412
1147
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2413
1148
|
color: textColor,
|
|
@@ -2429,12 +1164,6 @@ const PaginationLink = ({ className, textColor, bgColor, active, disabled, onCli
|
|
|
2429
1164
|
'is-disabled': disabled,
|
|
2430
1165
|
}), "aria-current": active ? 'page' : undefined, "aria-disabled": disabled, tabIndex: disabled ? -1 : 0, onClick: handleClick, ...rest, children: children }) }));
|
|
2431
1166
|
};
|
|
2432
|
-
/**
|
|
2433
|
-
* Bulma Pagination ellipsis element.
|
|
2434
|
-
*
|
|
2435
|
-
* @param props - Standard li props.
|
|
2436
|
-
* @returns {JSX.Element} The rendered ellipsis.
|
|
2437
|
-
*/
|
|
2438
1167
|
const PaginationEllipsis = props => (jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx("span", { className: "pagination-ellipsis", ...props, children: "\u2026" }) }));
|
|
2439
1168
|
Pagination.Link = PaginationLink;
|
|
2440
1169
|
Pagination.List = PaginationList;
|
|
@@ -2442,14 +1171,6 @@ Pagination.Ellipsis = PaginationEllipsis;
|
|
|
2442
1171
|
Pagination.Previous = PaginationPrevious;
|
|
2443
1172
|
Pagination.Next = PaginationNext;
|
|
2444
1173
|
|
|
2445
|
-
/**
|
|
2446
|
-
* Bulma Panel component, supports various panel subcomponents.
|
|
2447
|
-
*
|
|
2448
|
-
* @function
|
|
2449
|
-
* @param {PanelProps} props - Props for the Panel component.
|
|
2450
|
-
* @returns {JSX.Element} The rendered panel.
|
|
2451
|
-
* @see {@link https://bulma.io/documentation/components/panel/ | Bulma Panel documentation}
|
|
2452
|
-
*/
|
|
2453
1174
|
const Panel = ({ color, className, children, ...props }) => {
|
|
2454
1175
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2455
1176
|
color,
|
|
@@ -2460,33 +1181,12 @@ const Panel = ({ color, className, children, ...props }) => {
|
|
|
2460
1181
|
});
|
|
2461
1182
|
return (jsxRuntimeExports.jsx("nav", { className: panelClasses, ...rest, children: children }));
|
|
2462
1183
|
};
|
|
2463
|
-
/**
|
|
2464
|
-
* Bulma Panel heading.
|
|
2465
|
-
*/
|
|
2466
1184
|
const PanelHeading = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("p", { className: classNames('panel-heading', className), ...props, children: children }));
|
|
2467
|
-
/**
|
|
2468
|
-
* Bulma Panel tabs.
|
|
2469
|
-
*/
|
|
2470
1185
|
const PanelTabs = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("p", { className: classNames('panel-tabs', className), ...props, children: children }));
|
|
2471
|
-
/**
|
|
2472
|
-
* Bulma Panel block.
|
|
2473
|
-
*/
|
|
2474
1186
|
const PanelBlock = ({ className, active, children, ...props }) => (jsxRuntimeExports.jsx("a", { className: classNames('panel-block', className, { 'is-active': active }), ...props, children: children }));
|
|
2475
|
-
/**
|
|
2476
|
-
* Bulma Panel icon.
|
|
2477
|
-
*/
|
|
2478
1187
|
const PanelIcon = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("span", { className: classNames('panel-icon', className), ...props, children: children }));
|
|
2479
|
-
/**
|
|
2480
|
-
* Bulma Panel input block.
|
|
2481
|
-
*/
|
|
2482
1188
|
const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa-search', ...props }) => (jsxRuntimeExports.jsx("div", { className: "panel-block", ...props, children: jsxRuntimeExports.jsxs("p", { className: "control has-icons-left", children: [jsxRuntimeExports.jsx("input", { className: "input", type: "text", placeholder: placeholder, value: value, onChange: onChange }), jsxRuntimeExports.jsx("span", { className: "icon is-left", children: jsxRuntimeExports.jsx("i", { className: iconClassName, "aria-hidden": "true" }) })] }) }));
|
|
2483
|
-
/**
|
|
2484
|
-
* Bulma Panel checkbox block.
|
|
2485
|
-
*/
|
|
2486
1189
|
const PanelCheckboxBlock = ({ checked, onChange, children, ...props }) => (jsxRuntimeExports.jsxs("label", { className: "panel-block", ...props, children: [jsxRuntimeExports.jsx("input", { type: "checkbox", checked: checked, onChange: onChange }), children] }));
|
|
2487
|
-
/**
|
|
2488
|
-
* Bulma Panel button block.
|
|
2489
|
-
*/
|
|
2490
1190
|
const PanelButtonBlock = ({ children, className, ...props }) => (jsxRuntimeExports.jsx("div", { className: "panel-block", children: jsxRuntimeExports.jsx("button", { className: classNames('button is-link is-outlined is-fullwidth', className), ...props, children: children }) }));
|
|
2491
1191
|
Panel.Heading = PanelHeading;
|
|
2492
1192
|
Panel.Tabs = PanelTabs;
|
|
@@ -2496,14 +1196,6 @@ Panel.InputBlock = PanelInputBlock;
|
|
|
2496
1196
|
Panel.CheckboxBlock = PanelCheckboxBlock;
|
|
2497
1197
|
Panel.ButtonBlock = PanelButtonBlock;
|
|
2498
1198
|
|
|
2499
|
-
/**
|
|
2500
|
-
* Bulma Tabs component with subcomponents for tab lists and items.
|
|
2501
|
-
*
|
|
2502
|
-
* @function
|
|
2503
|
-
* @param {TabsProps} props - Props for the Tabs component.
|
|
2504
|
-
* @returns {JSX.Element} The rendered tabs.
|
|
2505
|
-
* @see {@link https://bulma.io/documentation/components/tabs/ | Bulma Tabs documentation}
|
|
2506
|
-
*/
|
|
2507
1199
|
const Tabs = ({ align, size, fullwidth, boxed, toggle, rounded, color, className, children, ...props }) => {
|
|
2508
1200
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2509
1201
|
color,
|
|
@@ -2520,40 +1212,12 @@ const Tabs = ({ align, size, fullwidth, boxed, toggle, rounded, color, className
|
|
|
2520
1212
|
}, className);
|
|
2521
1213
|
return (jsxRuntimeExports.jsx("div", { className: tabsClass, ...rest, children: children }));
|
|
2522
1214
|
};
|
|
2523
|
-
/**
|
|
2524
|
-
* Bulma Tab list container.
|
|
2525
|
-
*
|
|
2526
|
-
* @function
|
|
2527
|
-
* @param {TabListProps} props - Props for the TabList component.
|
|
2528
|
-
* @returns {JSX.Element} The rendered tab list.
|
|
2529
|
-
*/
|
|
2530
1215
|
const TabList = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("ul", { className: classNames(className), ...props, children: children }));
|
|
2531
|
-
/**
|
|
2532
|
-
* Bulma Tab item.
|
|
2533
|
-
*
|
|
2534
|
-
* @function
|
|
2535
|
-
* @param {TabItemProps} props - Props for the TabItem component.
|
|
2536
|
-
* @returns {JSX.Element} The rendered tab item.
|
|
2537
|
-
*/
|
|
2538
1216
|
const TabItem = ({ active, className, children, onClick, ...props }) => (jsxRuntimeExports.jsx("li", { className: classNames({ 'is-active': active }, className), onClick: onClick, ...props, children: children }));
|
|
2539
1217
|
Tabs.List = TabList;
|
|
2540
1218
|
Tabs.Item = TabItem;
|
|
2541
1219
|
|
|
2542
|
-
/**
|
|
2543
|
-
* Block component for rendering a styled Bulma block element.
|
|
2544
|
-
*
|
|
2545
|
-
* A block is a simple utility element that adds spacing (margin-bottom) between elements.
|
|
2546
|
-
* Supports Bulma helper classes for additional styling like text color, background color, and layout.
|
|
2547
|
-
*
|
|
2548
|
-
* @function
|
|
2549
|
-
* @param {BlockProps} props - Props for the Block component.
|
|
2550
|
-
* @returns {JSX.Element} The rendered block element.
|
|
2551
|
-
* @see {@link https://bulma.io/documentation/elements/block/ | Bulma Block documentation}
|
|
2552
|
-
*/
|
|
2553
1220
|
const Block = ({ className, textColor, bgColor, children, ...props }) => {
|
|
2554
|
-
/**
|
|
2555
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2556
|
-
*/
|
|
2557
1221
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2558
1222
|
color: textColor,
|
|
2559
1223
|
backgroundColor: bgColor,
|
|
@@ -2563,20 +1227,7 @@ const Block = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
2563
1227
|
return (jsxRuntimeExports.jsx("div", { className: blockClasses, ...rest, children: children }));
|
|
2564
1228
|
};
|
|
2565
1229
|
|
|
2566
|
-
/**
|
|
2567
|
-
* Box component for rendering a styled Bulma box element.
|
|
2568
|
-
*
|
|
2569
|
-
* Supports Bulma helper classes for styling and layout, with optional shadow control.
|
|
2570
|
-
*
|
|
2571
|
-
* @function
|
|
2572
|
-
* @param {BoxProps} props - Props for the Box component.
|
|
2573
|
-
* @returns {JSX.Element} The rendered box element.
|
|
2574
|
-
* @see {@link https://bulma.io/documentation/elements/box/ | Bulma Box documentation}
|
|
2575
|
-
*/
|
|
2576
1230
|
const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...props }) => {
|
|
2577
|
-
/**
|
|
2578
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2579
|
-
*/
|
|
2580
1231
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2581
1232
|
color: textColor,
|
|
2582
1233
|
backgroundColor: bgColor,
|
|
@@ -2588,20 +1239,7 @@ const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...pro
|
|
|
2588
1239
|
return (jsxRuntimeExports.jsx("div", { className: boxClasses, ...rest, children: children }));
|
|
2589
1240
|
};
|
|
2590
1241
|
|
|
2591
|
-
/**
|
|
2592
|
-
* Button component for rendering a Bulma-styled button or anchor.
|
|
2593
|
-
*
|
|
2594
|
-
* Supports Bulma helper classes for colors, sizes, and various button states and modifiers.
|
|
2595
|
-
*
|
|
2596
|
-
* @function
|
|
2597
|
-
* @param {ButtonProps} props - Props for the Button component.
|
|
2598
|
-
* @returns {JSX.Element} The rendered button or anchor element.
|
|
2599
|
-
* @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}
|
|
2600
|
-
*/
|
|
2601
1242
|
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as = 'button', href, onClick, target, rel, ...props }) => {
|
|
2602
|
-
/**
|
|
2603
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2604
|
-
*/
|
|
2605
1243
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2606
1244
|
color: textColor,
|
|
2607
1245
|
backgroundColor: bgColor,
|
|
@@ -2623,7 +1261,6 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
2623
1261
|
'is-disabled': isDisabled,
|
|
2624
1262
|
});
|
|
2625
1263
|
if (as === 'a') {
|
|
2626
|
-
// Remove button-specific props (like 'type') from rest
|
|
2627
1264
|
const { ...anchorRest } = rest;
|
|
2628
1265
|
return (jsxRuntimeExports.jsx("a", { className: buttonClasses, href: href, target: target, rel: rel, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : undefined, onClick: isDisabled
|
|
2629
1266
|
? e => e.preventDefault()
|
|
@@ -2632,20 +1269,7 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
2632
1269
|
return (jsxRuntimeExports.jsx("button", { className: buttonClasses, disabled: isDisabled, onClick: onClick, ...rest, children: children }));
|
|
2633
1270
|
};
|
|
2634
1271
|
|
|
2635
|
-
/**
|
|
2636
|
-
* Buttons component for rendering a group of Bulma-styled buttons.
|
|
2637
|
-
*
|
|
2638
|
-
* Supports Bulma helper classes for styling, color, and layout, including centering, right alignment, and grouping as addons.
|
|
2639
|
-
*
|
|
2640
|
-
* @function
|
|
2641
|
-
* @param {ButtonsProps} props - Props for the Buttons component.
|
|
2642
|
-
* @returns {JSX.Element} The rendered group of buttons.
|
|
2643
|
-
* @see {@link https://bulma.io/documentation/elements/button/#group | Bulma Button Group documentation}
|
|
2644
|
-
*/
|
|
2645
1272
|
const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
|
|
2646
|
-
/**
|
|
2647
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2648
|
-
*/
|
|
2649
1273
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2650
1274
|
color: textColor,
|
|
2651
1275
|
backgroundColor: bgColor,
|
|
@@ -2659,23 +1283,8 @@ const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons
|
|
|
2659
1283
|
return (jsxRuntimeExports.jsx("div", { className: buttonsClasses, ...rest, children: children }));
|
|
2660
1284
|
};
|
|
2661
1285
|
|
|
2662
|
-
// Valid size modifiers for the content class
|
|
2663
1286
|
const validSizes = ['small', 'medium', 'large'];
|
|
2664
|
-
/**
|
|
2665
|
-
* Content component for rendering a styled Bulma content block.
|
|
2666
|
-
*
|
|
2667
|
-
* Applies typographic styles to HTML content (e.g., paragraphs, headings, lists) with Bulma's content class.
|
|
2668
|
-
* Supports size modifiers and Bulma helper classes for additional styling.
|
|
2669
|
-
*
|
|
2670
|
-
* @function
|
|
2671
|
-
* @param {ContentProps} props - Props for the Content component.
|
|
2672
|
-
* @returns {JSX.Element} The rendered content block.
|
|
2673
|
-
* @see {@link https://bulma.io/documentation/elements/content/ | Bulma Content documentation}
|
|
2674
|
-
*/
|
|
2675
1287
|
const Content = ({ className, textColor, bgColor, size, children, ...props }) => {
|
|
2676
|
-
/**
|
|
2677
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2678
|
-
*/
|
|
2679
1288
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2680
1289
|
color: textColor,
|
|
2681
1290
|
backgroundColor: bgColor,
|
|
@@ -2687,20 +1296,7 @@ const Content = ({ className, textColor, bgColor, size, children, ...props }) =>
|
|
|
2687
1296
|
return (jsxRuntimeExports.jsx("div", { className: contentClasses, ...rest, children: children }));
|
|
2688
1297
|
};
|
|
2689
1298
|
|
|
2690
|
-
/**
|
|
2691
|
-
* Delete component for rendering a Bulma-styled delete/close button.
|
|
2692
|
-
*
|
|
2693
|
-
* Supports Bulma helper classes for styling, color, and size, and includes accessibility and disabled state.
|
|
2694
|
-
*
|
|
2695
|
-
* @function
|
|
2696
|
-
* @param {DeleteProps} props - Props for the Delete component.
|
|
2697
|
-
* @returns {JSX.Element} The rendered delete button.
|
|
2698
|
-
* @see {@link https://bulma.io/documentation/elements/delete/ | Bulma Delete documentation}
|
|
2699
|
-
*/
|
|
2700
1299
|
const Delete = ({ className, textColor, bgColor, onClick, size, ariaLabel = 'Close', disabled = false, ...props }) => {
|
|
2701
|
-
/**
|
|
2702
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2703
|
-
*/
|
|
2704
1300
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2705
1301
|
color: textColor,
|
|
2706
1302
|
backgroundColor: bgColor,
|
|
@@ -2713,14 +1309,6 @@ const Delete = ({ className, textColor, bgColor, onClick, size, ariaLabel = 'Clo
|
|
|
2713
1309
|
return (jsxRuntimeExports.jsx("button", { className: classes, onClick: onClick, "aria-label": ariaLabel, disabled: disabled, type: "button", ...rest }));
|
|
2714
1310
|
};
|
|
2715
1311
|
|
|
2716
|
-
/**
|
|
2717
|
-
* Gets the correct classes for the icon element based on the library and features.
|
|
2718
|
-
*
|
|
2719
|
-
* @param {IconLibrary} library - The icon library.
|
|
2720
|
-
* @param {string} name - The icon name.
|
|
2721
|
-
* @param {string | string[]} [libraryFeatures] - Additional library-specific classes.
|
|
2722
|
-
* @returns {string} The combined class string for the icon.
|
|
2723
|
-
*/
|
|
2724
1312
|
function getIconClasses(library, name, libraryFeatures) {
|
|
2725
1313
|
let baseClass = '';
|
|
2726
1314
|
let iconClass = '';
|
|
@@ -2731,8 +1319,6 @@ function getIconClasses(library, name, libraryFeatures) {
|
|
|
2731
1319
|
: [];
|
|
2732
1320
|
switch (library) {
|
|
2733
1321
|
case 'fa': {
|
|
2734
|
-
// Font Awesome 5/6: use 'fas', 'far', 'fab', etc. as feature, icon is 'fa-<icon>'
|
|
2735
|
-
// If features contains a FA style ('fas', 'far', 'fab'), use it, otherwise default to 'fas'
|
|
2736
1322
|
const faStyle = features.find(f => ['fas', 'far', 'fab', 'fal', 'fad', 'fat'].includes(f)) || 'fas';
|
|
2737
1323
|
baseClass = faStyle;
|
|
2738
1324
|
iconClass = `fa-${name}`;
|
|
@@ -2740,35 +1326,18 @@ function getIconClasses(library, name, libraryFeatures) {
|
|
|
2740
1326
|
return [baseClass, iconClass, ...features].join(' ');
|
|
2741
1327
|
}
|
|
2742
1328
|
case 'mdi':
|
|
2743
|
-
// Material Design Icons: always 'mdi mdi-<icon>'
|
|
2744
1329
|
baseClass = 'mdi';
|
|
2745
1330
|
iconClass = `mdi-${name}`;
|
|
2746
1331
|
return [baseClass, iconClass, ...features].join(' ');
|
|
2747
1332
|
case 'ion':
|
|
2748
|
-
// Ionicons (v4+): 'ion' and 'ion-<icon>'
|
|
2749
1333
|
baseClass = 'ion';
|
|
2750
1334
|
iconClass = `ion-${name}`;
|
|
2751
1335
|
return [baseClass, iconClass, ...features].join(' ');
|
|
2752
1336
|
default:
|
|
2753
|
-
// fallback: just icon name and features
|
|
2754
1337
|
return [name, ...features].join(' ');
|
|
2755
1338
|
}
|
|
2756
1339
|
}
|
|
2757
|
-
|
|
2758
|
-
* Icon component for rendering a Bulma-styled icon container.
|
|
2759
|
-
*
|
|
2760
|
-
* Supports Bulma helper classes for styling, color, and size, and renders an <i></i> element for the icon itself.
|
|
2761
|
-
*
|
|
2762
|
-
* @function
|
|
2763
|
-
* @param {IconProps} props - Props for the Icon component.
|
|
2764
|
-
* @returns {JSX.Element} The rendered icon element.
|
|
2765
|
-
* @see {@link https://bulma.io/documentation/elements/icon/ | Bulma Icon documentation}
|
|
2766
|
-
*/
|
|
2767
|
-
const Icon = ({ className, textColor, bgColor, name, library = 'fa', // Font Awesome is default
|
|
2768
|
-
libraryFeatures, size, ariaLabel = 'icon', style, ...props }) => {
|
|
2769
|
-
/**
|
|
2770
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2771
|
-
*/
|
|
1340
|
+
const Icon = ({ className, textColor, bgColor, name, library = 'fa', libraryFeatures, size, ariaLabel = 'icon', style, ...props }) => {
|
|
2772
1341
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2773
1342
|
color: textColor,
|
|
2774
1343
|
backgroundColor: bgColor,
|
|
@@ -2781,20 +1350,7 @@ libraryFeatures, size, ariaLabel = 'icon', style, ...props }) => {
|
|
|
2781
1350
|
return (jsxRuntimeExports.jsx("span", { className: iconContainerClasses, "aria-label": ariaLabel, style: style, ...rest, children: jsxRuntimeExports.jsx("i", { className: iClasses }) }));
|
|
2782
1351
|
};
|
|
2783
1352
|
|
|
2784
|
-
/**
|
|
2785
|
-
* IconText component for rendering one or more icons with optional text, styled with Bulma.
|
|
2786
|
-
*
|
|
2787
|
-
* Supports Bulma helper classes for styling, color, and layout. Can render a single icon with text or multiple icon/text pairs.
|
|
2788
|
-
*
|
|
2789
|
-
* @function
|
|
2790
|
-
* @param {IconTextProps} props - Props for the IconText component.
|
|
2791
|
-
* @returns {JSX.Element} The rendered icon text element.
|
|
2792
|
-
* @see {@link https://bulma.io/documentation/elements/icon/#icon-text | Bulma IconText documentation}
|
|
2793
|
-
*/
|
|
2794
1353
|
const IconText = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
|
|
2795
|
-
/**
|
|
2796
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2797
|
-
*/
|
|
2798
1354
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2799
1355
|
color: textColor,
|
|
2800
1356
|
backgroundColor: bgColor,
|
|
@@ -2804,22 +1360,7 @@ const IconText = ({ className, textColor, bgColor, iconProps, children, items, .
|
|
|
2804
1360
|
return (jsxRuntimeExports.jsx("span", { className: iconTextClasses, ...rest, children: items ? (items.map((item, index) => (jsxRuntimeExports.jsxs(React.Fragment, { children: [jsxRuntimeExports.jsx(Icon, { ...item.iconProps }), item.text && jsxRuntimeExports.jsx("span", { children: item.text })] }, index)))) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [iconProps && jsxRuntimeExports.jsx(Icon, { ...iconProps }), children && jsxRuntimeExports.jsx("span", { children: children })] })) }));
|
|
2805
1361
|
};
|
|
2806
1362
|
|
|
2807
|
-
/**
|
|
2808
|
-
* Image component for rendering a styled Bulma image element.
|
|
2809
|
-
*
|
|
2810
|
-
* Supports fixed-size containers, aspect ratios, rounded images, retina images, and arbitrary children (e.g., iframe).
|
|
2811
|
-
*
|
|
2812
|
-
* The "as" prop allows rendering as "figure", "p", or "div" tags etc.
|
|
2813
|
-
*
|
|
2814
|
-
* @function
|
|
2815
|
-
* @param {ImageProps} props - Props for the Image component.
|
|
2816
|
-
* @returns {JSX.Element} The rendered image element.
|
|
2817
|
-
* @see {@link https://bulma.io/documentation/elements/image/ | Bulma Image documentation}
|
|
2818
|
-
*/
|
|
2819
1363
|
const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, src, alt, children, ...props }) => {
|
|
2820
|
-
/**
|
|
2821
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2822
|
-
*/
|
|
2823
1364
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2824
1365
|
color: textColor,
|
|
2825
1366
|
backgroundColor: bgColor,
|
|
@@ -2829,8 +1370,6 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
2829
1370
|
[`is-${size}`]: size,
|
|
2830
1371
|
'has-ratio': size && typeof size === 'string' && size.includes('by'),
|
|
2831
1372
|
});
|
|
2832
|
-
// Default tag logic: if "as" is provided, use it.
|
|
2833
|
-
// If not, use <figure> for aspect ratios or children, <div> otherwise.
|
|
2834
1373
|
let Tag;
|
|
2835
1374
|
if (as) {
|
|
2836
1375
|
Tag = as;
|
|
@@ -2845,20 +1384,7 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
2845
1384
|
return (jsxRuntimeExports.jsx(Tag, { className: imageClasses, ...rest, children: content }));
|
|
2846
1385
|
};
|
|
2847
1386
|
|
|
2848
|
-
/**
|
|
2849
|
-
* Notification component for rendering a styled Bulma notification.
|
|
2850
|
-
*
|
|
2851
|
-
* Supports colors, light variants, a delete button, and arbitrary content.
|
|
2852
|
-
*
|
|
2853
|
-
* @function
|
|
2854
|
-
* @param {NotificationProps} props - Props for the Notification component.
|
|
2855
|
-
* @returns {JSX.Element} The rendered notification element.
|
|
2856
|
-
* @see {@link https://bulma.io/documentation/elements/notification/ | Bulma Notification documentation}
|
|
2857
|
-
*/
|
|
2858
1387
|
const Notification = ({ className, color, isLight, hasDelete, onDelete, children, ...props }) => {
|
|
2859
|
-
/**
|
|
2860
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2861
|
-
*/
|
|
2862
1388
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2863
1389
|
...props,
|
|
2864
1390
|
});
|
|
@@ -2869,20 +1395,7 @@ const Notification = ({ className, color, isLight, hasDelete, onDelete, children
|
|
|
2869
1395
|
return (jsxRuntimeExports.jsxs("div", { className: notificationClasses, ...rest, children: [hasDelete && (jsxRuntimeExports.jsx("button", { className: "delete", onClick: onDelete, "aria-label": "Close notification" })), children] }));
|
|
2870
1396
|
};
|
|
2871
1397
|
|
|
2872
|
-
/**
|
|
2873
|
-
* Progress component for rendering a styled Bulma progress bar.
|
|
2874
|
-
*
|
|
2875
|
-
* Supports Bulma color and size modifiers, value/max attributes, and optional custom content.
|
|
2876
|
-
*
|
|
2877
|
-
* @function
|
|
2878
|
-
* @param {ProgressProps} props - Props for the Progress component.
|
|
2879
|
-
* @returns {JSX.Element} The rendered progress bar element.
|
|
2880
|
-
* @see {@link https://bulma.io/documentation/elements/progress/ | Bulma Progress documentation}
|
|
2881
|
-
*/
|
|
2882
1398
|
const Progress = ({ className, color, size, value, max, children, ...props }) => {
|
|
2883
|
-
/**
|
|
2884
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2885
|
-
*/
|
|
2886
1399
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2887
1400
|
...props,
|
|
2888
1401
|
});
|
|
@@ -2903,47 +1416,18 @@ const validSubTitleElements = [
|
|
|
2903
1416
|
'h6',
|
|
2904
1417
|
'p',
|
|
2905
1418
|
];
|
|
2906
|
-
/**
|
|
2907
|
-
* SubTitle component for rendering a styled Bulma subtitle.
|
|
2908
|
-
*
|
|
2909
|
-
* Supports Bulma subtitle sizes and rendering as different HTML elements (h1-h6, p).
|
|
2910
|
-
*
|
|
2911
|
-
* @function
|
|
2912
|
-
* @param {SubTitleProps} props - Props for the SubTitle component.
|
|
2913
|
-
* @returns {JSX.Element} The rendered subtitle element.
|
|
2914
|
-
* @see {@link https://bulma.io/documentation/elements/title/#subtitle | Bulma Subtitle documentation}
|
|
2915
|
-
*/
|
|
2916
1419
|
const SubTitle = ({ className, size, as = 'h1', children, ...props }) => {
|
|
2917
|
-
/**
|
|
2918
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2919
|
-
*/
|
|
2920
1420
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
2921
|
-
// Validate 'as' prop at runtime
|
|
2922
1421
|
const element = validSubTitleElements.includes(as) ? as : 'h1';
|
|
2923
|
-
// Validate 'size' prop at runtime
|
|
2924
1422
|
const validSize = size && validSubTitleSizes.includes(size) ? size : undefined;
|
|
2925
1423
|
const subTitleClasses = classNames('subtitle', className, bulmaHelperClasses, {
|
|
2926
1424
|
[`is-${validSize}`]: validSize,
|
|
2927
1425
|
});
|
|
2928
|
-
// Determine the tag based on 'element' and 'validSize'
|
|
2929
1426
|
const Tag = element === 'p' ? 'p' : validSize ? `h${validSize}` : element;
|
|
2930
1427
|
return (jsxRuntimeExports.jsx(Tag, { className: subTitleClasses, ...rest, children: children }));
|
|
2931
1428
|
};
|
|
2932
1429
|
|
|
2933
|
-
/**
|
|
2934
|
-
* Table component for rendering a styled Bulma table.
|
|
2935
|
-
*
|
|
2936
|
-
* Supports responsive, bordered, striped, narrow, hoverable, and fullwidth variants.
|
|
2937
|
-
*
|
|
2938
|
-
* @function
|
|
2939
|
-
* @param {TableProps} props - Props for the Table component.
|
|
2940
|
-
* @returns {JSX.Element} The rendered table element.
|
|
2941
|
-
* @see {@link https://bulma.io/documentation/elements/table/ | Bulma Table documentation}
|
|
2942
|
-
*/
|
|
2943
1430
|
const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
|
|
2944
|
-
/**
|
|
2945
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2946
|
-
*/
|
|
2947
1431
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
2948
1432
|
const tableClasses = classNames('table', className, bulmaHelperClasses, {
|
|
2949
1433
|
'is-bordered': isBordered,
|
|
@@ -2969,20 +1453,7 @@ const validTagColors = [
|
|
|
2969
1453
|
'white',
|
|
2970
1454
|
];
|
|
2971
1455
|
const validTagSizes = ['normal', 'medium', 'large'];
|
|
2972
|
-
/**
|
|
2973
|
-
* Tag component for rendering a styled Bulma tag.
|
|
2974
|
-
*
|
|
2975
|
-
* Supports colors, sizes, rounded, delete, and hoverable variants.
|
|
2976
|
-
*
|
|
2977
|
-
* @function
|
|
2978
|
-
* @param {TagProps} props - Props for the Tag component.
|
|
2979
|
-
* @returns {JSX.Element} The rendered tag element.
|
|
2980
|
-
* @see {@link https://bulma.io/documentation/elements/tag/ | Bulma Tag documentation}
|
|
2981
|
-
*/
|
|
2982
1456
|
const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
|
|
2983
|
-
/**
|
|
2984
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
2985
|
-
*/
|
|
2986
1457
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
2987
1458
|
const tagClasses = classNames('tag', className, bulmaHelperClasses, {
|
|
2988
1459
|
[`is-${color}`]: color && validTagColors.includes(color),
|
|
@@ -2997,20 +1468,7 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
|
|
|
2997
1468
|
return (jsxRuntimeExports.jsx("span", { className: tagClasses, ...rest, children: children }));
|
|
2998
1469
|
};
|
|
2999
1470
|
|
|
3000
|
-
/**
|
|
3001
|
-
* Tags component for rendering a styled Bulma tags container.
|
|
3002
|
-
*
|
|
3003
|
-
* Supports addons and multiline variants.
|
|
3004
|
-
*
|
|
3005
|
-
* @function
|
|
3006
|
-
* @param {TagsProps} props - Props for the Tags component.
|
|
3007
|
-
* @returns {JSX.Element} The rendered tags container.
|
|
3008
|
-
* @see {@link https://bulma.io/documentation/elements/tag/#list-of-tags | Bulma Tags documentation}
|
|
3009
|
-
*/
|
|
3010
1471
|
const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
|
|
3011
|
-
/**
|
|
3012
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3013
|
-
*/
|
|
3014
1472
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3015
1473
|
const tagsClasses = classNames('tags', className, bulmaHelperClasses, {
|
|
3016
1474
|
'has-addons': hasAddons,
|
|
@@ -3019,20 +1477,7 @@ const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
|
|
|
3019
1477
|
return (jsxRuntimeExports.jsx("div", { className: tagsClasses, ...rest, children: children }));
|
|
3020
1478
|
};
|
|
3021
1479
|
|
|
3022
|
-
/**
|
|
3023
|
-
* Tbody component for rendering a styled Bulma table body.
|
|
3024
|
-
*
|
|
3025
|
-
* Supports Bulma helper classes for additional styling.
|
|
3026
|
-
*
|
|
3027
|
-
* @function
|
|
3028
|
-
* @param {TbodyProps} props - Props for the Tbody component.
|
|
3029
|
-
* @returns {JSX.Element} The rendered table body element.
|
|
3030
|
-
* @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}
|
|
3031
|
-
*/
|
|
3032
1480
|
const Tbody = ({ className, children, ...props }) => {
|
|
3033
|
-
/**
|
|
3034
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3035
|
-
*/
|
|
3036
1481
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3037
1482
|
const tbodyClasses = classNames(className, bulmaHelperClasses);
|
|
3038
1483
|
return (jsxRuntimeExports.jsx("tbody", { className: tbodyClasses, ...rest, children: children }));
|
|
@@ -3050,20 +1495,7 @@ const validTableColors = [
|
|
|
3050
1495
|
'light',
|
|
3051
1496
|
'white',
|
|
3052
1497
|
];
|
|
3053
|
-
/**
|
|
3054
|
-
* Td component for rendering a styled Bulma table cell.
|
|
3055
|
-
*
|
|
3056
|
-
* Supports Bulma color modifiers and helper classes for additional styling.
|
|
3057
|
-
*
|
|
3058
|
-
* @function
|
|
3059
|
-
* @param {TdProps} props - Props for the Td component.
|
|
3060
|
-
* @returns {JSX.Element} The rendered table cell element.
|
|
3061
|
-
* @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}
|
|
3062
|
-
*/
|
|
3063
1498
|
const Td = ({ className, color, children, ...props }) => {
|
|
3064
|
-
/**
|
|
3065
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3066
|
-
*/
|
|
3067
1499
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3068
1500
|
const tdClasses = classNames(className, bulmaHelperClasses, {
|
|
3069
1501
|
[`is-${color}`]: color && validTableColors.includes(color),
|
|
@@ -3071,40 +1503,14 @@ const Td = ({ className, color, children, ...props }) => {
|
|
|
3071
1503
|
return (jsxRuntimeExports.jsx("td", { className: tdClasses, ...rest, children: children }));
|
|
3072
1504
|
};
|
|
3073
1505
|
|
|
3074
|
-
/**
|
|
3075
|
-
* Tfoot component for rendering a styled Bulma table footer.
|
|
3076
|
-
*
|
|
3077
|
-
* Supports Bulma helper classes for additional styling.
|
|
3078
|
-
*
|
|
3079
|
-
* @function
|
|
3080
|
-
* @param {TfootProps} props - Props for the Tfoot component.
|
|
3081
|
-
* @returns {JSX.Element} The rendered table footer element.
|
|
3082
|
-
* @see {@link https://bulma.io/documentation/elements/table/#table-footer | Bulma Table documentation}
|
|
3083
|
-
*/
|
|
3084
1506
|
const Tfoot = ({ className, children, ...props }) => {
|
|
3085
|
-
/**
|
|
3086
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3087
|
-
*/
|
|
3088
1507
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3089
1508
|
const tfootClasses = classNames(className, bulmaHelperClasses);
|
|
3090
1509
|
return (jsxRuntimeExports.jsx("tfoot", { className: tfootClasses, ...rest, children: children }));
|
|
3091
1510
|
};
|
|
3092
1511
|
|
|
3093
1512
|
const validAlignments = ['left', 'right', 'centered'];
|
|
3094
|
-
/**
|
|
3095
|
-
* Th component for rendering a styled Bulma table header cell.
|
|
3096
|
-
*
|
|
3097
|
-
* Supports alignment, width, and color modifiers.
|
|
3098
|
-
*
|
|
3099
|
-
* @function
|
|
3100
|
-
* @param {ThProps} props - Props for the Th component.
|
|
3101
|
-
* @returns {JSX.Element} The rendered table header cell element.
|
|
3102
|
-
* @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}
|
|
3103
|
-
*/
|
|
3104
1513
|
const Th = ({ className, isAligned, width, color, children, ...props }) => {
|
|
3105
|
-
/**
|
|
3106
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3107
|
-
*/
|
|
3108
1514
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3109
1515
|
const thClasses = classNames(className, bulmaHelperClasses, {
|
|
3110
1516
|
[`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
|
|
@@ -3115,20 +1521,7 @@ const Th = ({ className, isAligned, width, color, children, ...props }) => {
|
|
|
3115
1521
|
: undefined, ...rest, children: children }));
|
|
3116
1522
|
};
|
|
3117
1523
|
|
|
3118
|
-
/**
|
|
3119
|
-
* Thead component for rendering a styled Bulma table header.
|
|
3120
|
-
*
|
|
3121
|
-
* Supports Bulma helper classes for additional styling.
|
|
3122
|
-
*
|
|
3123
|
-
* @function
|
|
3124
|
-
* @param {TheadProps} props - Props for the Thead component.
|
|
3125
|
-
* @returns {JSX.Element} The rendered table header element.
|
|
3126
|
-
* @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}
|
|
3127
|
-
*/
|
|
3128
1524
|
const Thead = ({ className, children, ...props }) => {
|
|
3129
|
-
/**
|
|
3130
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3131
|
-
*/
|
|
3132
1525
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3133
1526
|
const theadClasses = classNames(className, bulmaHelperClasses);
|
|
3134
1527
|
return (jsxRuntimeExports.jsx("thead", { className: theadClasses, ...rest, children: children }));
|
|
@@ -3136,48 +1529,19 @@ const Thead = ({ className, children, ...props }) => {
|
|
|
3136
1529
|
|
|
3137
1530
|
const validTitleSizes = ['1', '2', '3', '4', '5', '6'];
|
|
3138
1531
|
const validTitleElements = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
3139
|
-
/**
|
|
3140
|
-
* Title component for rendering a styled Bulma title.
|
|
3141
|
-
*
|
|
3142
|
-
* Supports sizes, spacing, and rendering as different HTML elements.
|
|
3143
|
-
*
|
|
3144
|
-
* @function
|
|
3145
|
-
* @param {TitleProps} props - Props for the Title component.
|
|
3146
|
-
* @returns {JSX.Element} The rendered title element.
|
|
3147
|
-
* @see {@link https://bulma.io/documentation/elements/title/ | Bulma Title documentation}
|
|
3148
|
-
*/
|
|
3149
1532
|
const Title = ({ className, size, isSpaced, as = 'h1', children, ...props }) => {
|
|
3150
|
-
/**
|
|
3151
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3152
|
-
*/
|
|
3153
1533
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3154
|
-
// Validate 'as' prop at runtime
|
|
3155
1534
|
const element = validTitleElements.includes(as) ? as : 'h1';
|
|
3156
|
-
// Validate 'size' prop at runtime
|
|
3157
1535
|
const validSize = size && validTitleSizes.includes(size) ? size : undefined;
|
|
3158
1536
|
const titleClasses = classNames('title', className, bulmaHelperClasses, {
|
|
3159
1537
|
[`is-${validSize}`]: validSize,
|
|
3160
1538
|
'is-spaced': isSpaced,
|
|
3161
1539
|
});
|
|
3162
|
-
// Determine the tag based on 'element' and 'validSize'
|
|
3163
1540
|
const Tag = element === 'p' ? 'p' : validSize ? `h${validSize}` : element;
|
|
3164
1541
|
return (jsxRuntimeExports.jsx(Tag, { className: titleClasses, ...rest, children: children }));
|
|
3165
1542
|
};
|
|
3166
1543
|
|
|
3167
|
-
/**
|
|
3168
|
-
* Tr component for rendering a styled Bulma table row.
|
|
3169
|
-
*
|
|
3170
|
-
* Supports the is-selected modifier and color modifiers.
|
|
3171
|
-
*
|
|
3172
|
-
* @function
|
|
3173
|
-
* @param {TrProps} props - Props for the Tr component.
|
|
3174
|
-
* @returns {JSX.Element} The rendered table row element.
|
|
3175
|
-
* @see {@link https://bulma.io/documentation/elements/table/#table-row | Bulma Table documentation}
|
|
3176
|
-
*/
|
|
3177
1544
|
const Tr = ({ className, isSelected, color, children, ...props }) => {
|
|
3178
|
-
/**
|
|
3179
|
-
* Generates Bulma helper classes and separates out remaining props.
|
|
3180
|
-
*/
|
|
3181
1545
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3182
1546
|
const trClasses = classNames(className, bulmaHelperClasses, {
|
|
3183
1547
|
'is-selected': isSelected,
|
|
@@ -3186,14 +1550,6 @@ const Tr = ({ className, isSelected, color, children, ...props }) => {
|
|
|
3186
1550
|
return (jsxRuntimeExports.jsx("tr", { className: trClasses, ...rest, children: children }));
|
|
3187
1551
|
};
|
|
3188
1552
|
|
|
3189
|
-
/**
|
|
3190
|
-
* Bulma Checkbox component with Bulma helper classes support.
|
|
3191
|
-
* The label is provided via the children prop.
|
|
3192
|
-
*
|
|
3193
|
-
* @function
|
|
3194
|
-
* @param {CheckboxProps} props - Props for the Checkbox component.
|
|
3195
|
-
* @returns {JSX.Element} The rendered checkbox element.
|
|
3196
|
-
*/
|
|
3197
1553
|
const Checkbox = forwardRef(({ disabled, className, children, ...props }, ref) => {
|
|
3198
1554
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3199
1555
|
...props,
|
|
@@ -3204,17 +1560,8 @@ const Checkbox = forwardRef(({ disabled, className, children, ...props }, ref) =
|
|
|
3204
1560
|
Checkbox.displayName = 'Checkbox';
|
|
3205
1561
|
|
|
3206
1562
|
const allowedColors = [...validColors, 'inherit', 'current'];
|
|
3207
|
-
/**
|
|
3208
|
-
* Bulma Control component for form controls, with icons, loading, and Bulma helper support.
|
|
3209
|
-
*
|
|
3210
|
-
* @function
|
|
3211
|
-
* @param {ControlProps} props - Props for the Control component.
|
|
3212
|
-
* @returns {JSX.Element} The rendered control container.
|
|
3213
|
-
* @see {@link https://bulma.io/documentation/form/general/#control | Bulma Control documentation}
|
|
3214
|
-
*/
|
|
3215
1563
|
const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isLoading, isExpanded, size, textColor, bgColor, iconLeft, iconRight, iconLeftName, iconLeftSize, iconRightName, iconRightSize, className, children, ...props }, ref) => {
|
|
3216
1564
|
const Component = (as === 'p' ? 'p' : 'div');
|
|
3217
|
-
// Remove textColor/bgColor from props before spreading
|
|
3218
1565
|
const { textColor: _ignoredTextColor, bgColor: _ignoredBgColor, ...restProps } = props;
|
|
3219
1566
|
const safeTextColor = allowedColors.includes(textColor)
|
|
3220
1567
|
? textColor
|
|
@@ -3227,7 +1574,6 @@ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isL
|
|
|
3227
1574
|
backgroundColor: safeBgColor,
|
|
3228
1575
|
...restProps,
|
|
3229
1576
|
});
|
|
3230
|
-
// Prepare icon props for the shortcut
|
|
3231
1577
|
const leftIconProps = iconLeft ||
|
|
3232
1578
|
(iconLeftName
|
|
3233
1579
|
? {
|
|
@@ -3249,18 +1595,10 @@ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isL
|
|
|
3249
1595
|
'is-expanded': isExpanded,
|
|
3250
1596
|
[`is-${size}`]: !!size,
|
|
3251
1597
|
}, className);
|
|
3252
|
-
// --- FIX: Spread both restProps (for data-testid, etc) AND rest (from useBulmaClasses) ---
|
|
3253
1598
|
return (jsxRuntimeExports.jsxs(Component, { className: controlClass, ref: ref, ...restProps, ...rest, children: [children, leftIconProps && leftIconProps.name && (jsxRuntimeExports.jsx(Icon, { ...leftIconProps, className: "is-left" })), rightIconProps && rightIconProps.name && (jsxRuntimeExports.jsx(Icon, { ...rightIconProps, className: "is-right" }))] }));
|
|
3254
1599
|
});
|
|
3255
1600
|
Control.displayName = 'Control';
|
|
3256
1601
|
|
|
3257
|
-
/**
|
|
3258
|
-
* FieldLabel component for rendering a Bulma field label.
|
|
3259
|
-
*
|
|
3260
|
-
* @function
|
|
3261
|
-
* @param {FieldLabelProps} props - Props for the FieldLabel component.
|
|
3262
|
-
* @returns {JSX.Element} The rendered field label.
|
|
3263
|
-
*/
|
|
3264
1602
|
const FieldLabel = ({ size, textColor, bgColor, className, children, ...props }) => {
|
|
3265
1603
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3266
1604
|
color: textColor,
|
|
@@ -3268,16 +1606,8 @@ const FieldLabel = ({ size, textColor, bgColor, className, children, ...props })
|
|
|
3268
1606
|
...props,
|
|
3269
1607
|
});
|
|
3270
1608
|
const fieldLabelClass = classNames('field-label', bulmaHelperClasses, { [`is-${size}`]: size }, className);
|
|
3271
|
-
// Spread ...props and ...rest so custom props like data-testid are included
|
|
3272
1609
|
return (jsxRuntimeExports.jsx("div", { className: fieldLabelClass, ...props, ...rest, children: children }));
|
|
3273
1610
|
};
|
|
3274
|
-
/**
|
|
3275
|
-
* FieldBody component for rendering Bulma field body.
|
|
3276
|
-
*
|
|
3277
|
-
* @function
|
|
3278
|
-
* @param {FieldBodyProps} props - Props for the FieldBody component.
|
|
3279
|
-
* @returns {JSX.Element} The rendered field body.
|
|
3280
|
-
*/
|
|
3281
1611
|
const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
3282
1612
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3283
1613
|
color: textColor,
|
|
@@ -3285,30 +1615,18 @@ const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
|
3285
1615
|
...props,
|
|
3286
1616
|
});
|
|
3287
1617
|
const fieldBodyClass = classNames('field-body', bulmaHelperClasses, className);
|
|
3288
|
-
// Spread ...props and ...rest so custom props like data-testid are included
|
|
3289
1618
|
return (jsxRuntimeExports.jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
|
|
3290
1619
|
};
|
|
3291
1620
|
FieldLabel.displayName = 'FieldLabel';
|
|
3292
1621
|
FieldBody.displayName = 'FieldBody';
|
|
3293
1622
|
|
|
3294
|
-
/**
|
|
3295
|
-
* Bulma File upload component with full Bulma helper class support.
|
|
3296
|
-
* isRight and isCentered are mutually exclusive (Bulma spec).
|
|
3297
|
-
*
|
|
3298
|
-
* @function
|
|
3299
|
-
* @param {FileProps} props - Props for the File component.
|
|
3300
|
-
* @returns {JSX.Element} The rendered file upload field.
|
|
3301
|
-
* @see {@link https://bulma.io/documentation/form/file/ | Bulma File documentation}
|
|
3302
|
-
*/
|
|
3303
1623
|
const File = forwardRef(({ color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, label, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
|
|
3304
1624
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3305
1625
|
color,
|
|
3306
1626
|
...props,
|
|
3307
1627
|
});
|
|
3308
|
-
// Mutually exclusive alignment
|
|
3309
1628
|
let alignmentClass;
|
|
3310
1629
|
if (isRight && isCentered) {
|
|
3311
|
-
// If both are set, prefer isRight and warn in dev
|
|
3312
1630
|
alignmentClass = 'is-right';
|
|
3313
1631
|
}
|
|
3314
1632
|
else if (isRight) {
|
|
@@ -3328,14 +1646,6 @@ const File = forwardRef(({ color, size, isBoxed, isFullwidth, isRight, isCentere
|
|
|
3328
1646
|
});
|
|
3329
1647
|
File.displayName = 'File';
|
|
3330
1648
|
|
|
3331
|
-
/**
|
|
3332
|
-
* Bulma Input component with full Bulma helper class support.
|
|
3333
|
-
*
|
|
3334
|
-
* @function
|
|
3335
|
-
* @param {InputProps} props - Props for the Input component.
|
|
3336
|
-
* @returns {JSX.Element} The rendered input element.
|
|
3337
|
-
* @see {@link https://bulma.io/documentation/form/input/ | Bulma Input documentation}
|
|
3338
|
-
*/
|
|
3339
1649
|
const Input = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading, className, disabled, readOnly, ...props }, ref) => {
|
|
3340
1650
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3341
1651
|
color,
|
|
@@ -3354,14 +1664,6 @@ const Input = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocus
|
|
|
3354
1664
|
});
|
|
3355
1665
|
Input.displayName = 'Input';
|
|
3356
1666
|
|
|
3357
|
-
/**
|
|
3358
|
-
* Bulma Radio component with Bulma helper classes support.
|
|
3359
|
-
* The label is provided via the children prop.
|
|
3360
|
-
*
|
|
3361
|
-
* @function
|
|
3362
|
-
* @param {RadioProps} props - Props for the Radio component.
|
|
3363
|
-
* @returns {JSX.Element} The rendered radio element.
|
|
3364
|
-
*/
|
|
3365
1667
|
const Radio = forwardRef(({ disabled, className, children, ...props }, ref) => {
|
|
3366
1668
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3367
1669
|
...props,
|
|
@@ -3371,14 +1673,6 @@ const Radio = forwardRef(({ disabled, className, children, ...props }, ref) => {
|
|
|
3371
1673
|
});
|
|
3372
1674
|
Radio.displayName = 'Radio';
|
|
3373
1675
|
|
|
3374
|
-
/**
|
|
3375
|
-
* Bulma Select component with full Bulma helper class support.
|
|
3376
|
-
*
|
|
3377
|
-
* @function
|
|
3378
|
-
* @param {SelectProps} props - Props for the Select component.
|
|
3379
|
-
* @returns {JSX.Element} The rendered select element.
|
|
3380
|
-
* @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
|
|
3381
|
-
*/
|
|
3382
1676
|
const Select = forwardRef(({ color, size, isRounded, isLoading, isActive, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
|
|
3383
1677
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3384
1678
|
color,
|
|
@@ -3391,7 +1685,6 @@ const Select = forwardRef(({ color, size, isRounded, isLoading, isActive, classN
|
|
|
3391
1685
|
'is-loading': isLoading,
|
|
3392
1686
|
'is-active': isActive,
|
|
3393
1687
|
}, className);
|
|
3394
|
-
// Only set size attribute when multiple is true and multipleSize is specified
|
|
3395
1688
|
const selectProps = {
|
|
3396
1689
|
disabled,
|
|
3397
1690
|
multiple,
|
|
@@ -3404,14 +1697,6 @@ const Select = forwardRef(({ color, size, isRounded, isLoading, isActive, classN
|
|
|
3404
1697
|
});
|
|
3405
1698
|
Select.displayName = 'Select';
|
|
3406
1699
|
|
|
3407
|
-
/**
|
|
3408
|
-
* Bulma TextArea component with full Bulma helper class support.
|
|
3409
|
-
*
|
|
3410
|
-
* @function
|
|
3411
|
-
* @param {TextAreaProps} props - Props for the TextArea component.
|
|
3412
|
-
* @returns {JSX.Element} The rendered textarea element.
|
|
3413
|
-
* @see {@link https://bulma.io/documentation/form/textarea/ | Bulma Textarea documentation}
|
|
3414
|
-
*/
|
|
3415
1700
|
const TextArea = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading, isActive, hasFixedSize, className, disabled, readOnly, rows, ...props }, ref) => {
|
|
3416
1701
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3417
1702
|
color,
|
|
@@ -3432,9 +1717,6 @@ const TextArea = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFo
|
|
|
3432
1717
|
});
|
|
3433
1718
|
TextArea.displayName = 'TextArea';
|
|
3434
1719
|
|
|
3435
|
-
/**
|
|
3436
|
-
* Builds Bulma grid cell class names for the Cell component.
|
|
3437
|
-
*/
|
|
3438
1720
|
function getCellGridClasses(props) {
|
|
3439
1721
|
const classes = [];
|
|
3440
1722
|
if (props.colStart !== undefined)
|
|
@@ -3451,14 +1733,6 @@ function getCellGridClasses(props) {
|
|
|
3451
1733
|
classes.push(`is-row-span-${props.rowSpan}`);
|
|
3452
1734
|
return classes;
|
|
3453
1735
|
}
|
|
3454
|
-
/**
|
|
3455
|
-
* Bulma Cell component for CSS Grid layouts.
|
|
3456
|
-
*
|
|
3457
|
-
* @function
|
|
3458
|
-
* @param {CellProps} props - Props for the Cell component.
|
|
3459
|
-
* @returns {JSX.Element} The rendered grid cell.
|
|
3460
|
-
* @see {@link https://bulma.io/documentation/grid/ | Bulma Grid documentation}
|
|
3461
|
-
*/
|
|
3462
1736
|
const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, className, textColor, bgColor, children, ...props }) => {
|
|
3463
1737
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3464
1738
|
color: textColor,
|
|
@@ -3476,9 +1750,6 @@ const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, cl
|
|
|
3476
1750
|
return (jsxRuntimeExports.jsx("div", { className: cellClasses, ...rest, children: children }));
|
|
3477
1751
|
};
|
|
3478
1752
|
|
|
3479
|
-
/**
|
|
3480
|
-
* Builds Bulma grid inner classes for the Grid component.
|
|
3481
|
-
*/
|
|
3482
1753
|
function getGridInnerClasses({ gap, columnGap, rowGap, minCol, }) {
|
|
3483
1754
|
const classes = [];
|
|
3484
1755
|
if (gap !== undefined)
|
|
@@ -3491,13 +1762,9 @@ function getGridInnerClasses({ gap, columnGap, rowGap, minCol, }) {
|
|
|
3491
1762
|
classes.push(`is-col-min-${minCol}`);
|
|
3492
1763
|
return classes;
|
|
3493
1764
|
}
|
|
3494
|
-
/**
|
|
3495
|
-
* Builds Bulma fixed grid classes for the Grid component.
|
|
3496
|
-
*/
|
|
3497
1765
|
function getFixedGridClasses({ fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, }) {
|
|
3498
1766
|
const classes = [];
|
|
3499
1767
|
if (fixedCols === 'auto') {
|
|
3500
|
-
// 'auto' overrides all other column settings
|
|
3501
1768
|
classes.push('has-auto-count');
|
|
3502
1769
|
return classes;
|
|
3503
1770
|
}
|
|
@@ -3515,16 +1782,7 @@ function getFixedGridClasses({ fixedCols, fixedColsMobile, fixedColsTablet, fixe
|
|
|
3515
1782
|
classes.push(`has-${fixedColsFullhd}-cols-fullhd`);
|
|
3516
1783
|
return classes;
|
|
3517
1784
|
}
|
|
3518
|
-
/**
|
|
3519
|
-
* Bulma Grid component for CSS Grid layouts, supports both fixed and responsive grid modes.
|
|
3520
|
-
*
|
|
3521
|
-
* @function
|
|
3522
|
-
* @param {GridProps} props - Props for the Grid component.
|
|
3523
|
-
* @returns {JSX.Element} The rendered grid.
|
|
3524
|
-
* @see {@link https://bulma.io/documentation/grid/ | Bulma Grid documentation}
|
|
3525
|
-
*/
|
|
3526
1785
|
const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, bgColor, children, ...props }) => {
|
|
3527
|
-
// Map textColor and bgColor to color and backgroundColor for useBulmaClasses
|
|
3528
1786
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3529
1787
|
color: textColor,
|
|
3530
1788
|
backgroundColor: bgColor,
|
|
@@ -3532,7 +1790,6 @@ const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixe
|
|
|
3532
1790
|
});
|
|
3533
1791
|
const gridClasses = classNames('grid', ...getGridInnerClasses({ gap, columnGap, rowGap, minCol }), bulmaHelperClasses, className);
|
|
3534
1792
|
if (isFixed) {
|
|
3535
|
-
// Apply has-X-cols and responsive column count classes to the outer fixed-grid container
|
|
3536
1793
|
const fixedGridClasses = classNames('fixed-grid', ...getFixedGridClasses({
|
|
3537
1794
|
fixedCols,
|
|
3538
1795
|
fixedColsMobile,
|
|
@@ -3543,26 +1800,15 @@ const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixe
|
|
|
3543
1800
|
}));
|
|
3544
1801
|
return (jsxRuntimeExports.jsx("div", { className: fixedGridClasses, children: jsxRuntimeExports.jsx("div", { className: gridClasses, ...rest, children: children }) }));
|
|
3545
1802
|
}
|
|
3546
|
-
// Standard Bulma grid (not fixed)
|
|
3547
1803
|
return (jsxRuntimeExports.jsx("div", { className: gridClasses, ...rest, children: children }));
|
|
3548
1804
|
};
|
|
3549
1805
|
|
|
3550
|
-
/**
|
|
3551
|
-
* Container component for Bulma.
|
|
3552
|
-
* Adds optional responsive, fluid, and color support, including is-max-* and breakpoint classes.
|
|
3553
|
-
*
|
|
3554
|
-
* @function
|
|
3555
|
-
* @param {ContainerProps} props - Props for the Container component.
|
|
3556
|
-
* @returns {JSX.Element} The rendered container.
|
|
3557
|
-
* @see {@link https://bulma.io/documentation/layout/container/ | Bulma Container documentation}
|
|
3558
|
-
*/
|
|
3559
1806
|
const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
|
|
3560
1807
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3561
1808
|
color: textColor,
|
|
3562
1809
|
backgroundColor: bgColor,
|
|
3563
1810
|
...props,
|
|
3564
1811
|
});
|
|
3565
|
-
// Only allow isMax for supported breakpoints
|
|
3566
1812
|
const validMaxBreakpoints = [
|
|
3567
1813
|
'tablet',
|
|
3568
1814
|
'desktop',
|
|
@@ -3585,14 +1831,6 @@ const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, b
|
|
|
3585
1831
|
return (jsxRuntimeExports.jsx("div", { className: containerClasses, ...rest, children: children }));
|
|
3586
1832
|
};
|
|
3587
1833
|
|
|
3588
|
-
/**
|
|
3589
|
-
* Bulma Hero component root.
|
|
3590
|
-
*
|
|
3591
|
-
* @function
|
|
3592
|
-
* @param {HeroProps} props - Props for the Hero component.
|
|
3593
|
-
* @returns {JSX.Element} The rendered hero.
|
|
3594
|
-
* @see {@link https://bulma.io/documentation/layout/hero/ | Bulma Hero documentation}
|
|
3595
|
-
*/
|
|
3596
1834
|
const Hero = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
|
|
3597
1835
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3598
1836
|
color,
|
|
@@ -3604,9 +1842,6 @@ const Hero = ({ className, color, size, bgColor, fullheightWithNavbar, children,
|
|
|
3604
1842
|
});
|
|
3605
1843
|
return (jsxRuntimeExports.jsx("section", { className: heroClasses, ...rest, children: children }));
|
|
3606
1844
|
};
|
|
3607
|
-
/**
|
|
3608
|
-
* Bulma Hero head section.
|
|
3609
|
-
*/
|
|
3610
1845
|
const HeroHead = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
3611
1846
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3612
1847
|
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
@@ -3615,9 +1850,6 @@ const HeroHead = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
3615
1850
|
});
|
|
3616
1851
|
return (jsxRuntimeExports.jsx("div", { className: classNames('hero-head', bulmaHelperClasses, className), ...rest, children: children }));
|
|
3617
1852
|
};
|
|
3618
|
-
/**
|
|
3619
|
-
* Bulma Hero body section.
|
|
3620
|
-
*/
|
|
3621
1853
|
const HeroBody = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
3622
1854
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3623
1855
|
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
@@ -3626,9 +1858,6 @@ const HeroBody = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
3626
1858
|
});
|
|
3627
1859
|
return (jsxRuntimeExports.jsx("div", { className: classNames('hero-body', bulmaHelperClasses, className), ...rest, children: children }));
|
|
3628
1860
|
};
|
|
3629
|
-
/**
|
|
3630
|
-
* Bulma Hero foot section.
|
|
3631
|
-
*/
|
|
3632
1861
|
const HeroFoot = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
3633
1862
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
3634
1863
|
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
@@ -3637,42 +1866,24 @@ const HeroFoot = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
3637
1866
|
});
|
|
3638
1867
|
return (jsxRuntimeExports.jsx("div", { className: classNames('hero-foot', bulmaHelperClasses, className), ...rest, children: children }));
|
|
3639
1868
|
};
|
|
3640
|
-
// Attach subcomponents
|
|
3641
1869
|
Hero.Head = HeroHead;
|
|
3642
1870
|
Hero.Body = HeroBody;
|
|
3643
1871
|
Hero.Foot = HeroFoot;
|
|
3644
1872
|
|
|
3645
|
-
/**
|
|
3646
|
-
* Bulma Media component root.
|
|
3647
|
-
*
|
|
3648
|
-
* @function
|
|
3649
|
-
* @param {MediaProps} props - Props for the Media component.
|
|
3650
|
-
* @returns {JSX.Element} The rendered media container.
|
|
3651
|
-
* @see {@link https://bulma.io/documentation/layout/media-object/ | Bulma Media documentation}
|
|
3652
|
-
*/
|
|
3653
1873
|
const Media = ({ as = 'article', className, children, ...props }) => {
|
|
3654
1874
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
3655
1875
|
const Tag = as;
|
|
3656
1876
|
return (jsxRuntimeExports.jsx(Tag, { className: classNames('media', bulmaHelperClasses, className), ...rest, children: children }));
|
|
3657
1877
|
};
|
|
3658
|
-
/**
|
|
3659
|
-
* Bulma Media left section.
|
|
3660
|
-
*/
|
|
3661
1878
|
const MediaLeft = ({ as = 'figure', className, children, ...props }) => {
|
|
3662
1879
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
3663
1880
|
const Tag = as;
|
|
3664
1881
|
return (jsxRuntimeExports.jsx(Tag, { className: classNames('media-left', bulmaHelperClasses, className), ...rest, children: children }));
|
|
3665
1882
|
};
|
|
3666
|
-
/**
|
|
3667
|
-
* Bulma Media content section.
|
|
3668
|
-
*/
|
|
3669
1883
|
const MediaContent = ({ className, children, ...props }) => {
|
|
3670
1884
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
3671
1885
|
return (jsxRuntimeExports.jsx("div", { className: classNames('media-content', bulmaHelperClasses, className), ...rest, children: children }));
|
|
3672
1886
|
};
|
|
3673
|
-
/**
|
|
3674
|
-
* Bulma Media right section.
|
|
3675
|
-
*/
|
|
3676
1887
|
const MediaRight = ({ className, children, ...props }) => {
|
|
3677
1888
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
3678
1889
|
return (jsxRuntimeExports.jsx("div", { className: classNames('media-right', bulmaHelperClasses, className), ...rest, children: children }));
|
|
@@ -3681,14 +1892,6 @@ Media.Left = MediaLeft;
|
|
|
3681
1892
|
Media.Content = MediaContent;
|
|
3682
1893
|
Media.Right = MediaRight;
|
|
3683
1894
|
|
|
3684
|
-
/**
|
|
3685
|
-
* Bulma Section component for general layout.
|
|
3686
|
-
*
|
|
3687
|
-
* @function
|
|
3688
|
-
* @param {SectionProps} props - Props for the Section component.
|
|
3689
|
-
* @returns {JSX.Element} The rendered section.
|
|
3690
|
-
* @see {@link https://bulma.io/documentation/layout/section/ | Bulma Section documentation}
|
|
3691
|
-
*/
|
|
3692
1895
|
const Section = ({ size, className, children, ...props }) => {
|
|
3693
1896
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
3694
1897
|
const sectionClasses = classNames('section', className, bulmaHelperClasses, {
|