@umami/react-zen 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.css +15 -0
- package/dist/index.d.ts +13 -6
- package/dist/index.js +373 -323
- package/dist/index.mjs +373 -323
- package/package.json +10 -7
- package/styles.css +15 -0
package/dist/index.mjs
CHANGED
|
@@ -82,8 +82,8 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
82
82
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
83
83
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
84
84
|
}
|
|
85
|
-
var
|
|
86
|
-
var ReactSharedInternals =
|
|
85
|
+
var React10 = __import_react2;
|
|
86
|
+
var ReactSharedInternals = React10.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
87
87
|
function error(format) {
|
|
88
88
|
{
|
|
89
89
|
{
|
|
@@ -113,13 +113,13 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
113
113
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
114
114
|
}
|
|
115
115
|
var objectIs = typeof Object.is === "function" ? Object.is : is2;
|
|
116
|
-
var useState15 =
|
|
116
|
+
var useState15 = React10.useState, useEffect11 = React10.useEffect, useLayoutEffect2 = React10.useLayoutEffect, useDebugValue = React10.useDebugValue;
|
|
117
117
|
var didWarnOld18Alpha = false;
|
|
118
118
|
var didWarnUncachedGetSnapshot = false;
|
|
119
119
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
120
120
|
{
|
|
121
121
|
if (!didWarnOld18Alpha) {
|
|
122
|
-
if (
|
|
122
|
+
if (React10.startTransition !== void 0) {
|
|
123
123
|
didWarnOld18Alpha = true;
|
|
124
124
|
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
125
125
|
}
|
|
@@ -184,7 +184,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
184
184
|
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
185
185
|
var isServerEnvironment = !canUseDOM;
|
|
186
186
|
var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
187
|
-
var useSyncExternalStore$2 =
|
|
187
|
+
var useSyncExternalStore$2 = React10.useSyncExternalStore !== void 0 ? React10.useSyncExternalStore : shim;
|
|
188
188
|
exports.useSyncExternalStore = useSyncExternalStore$2;
|
|
189
189
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
190
190
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
@@ -213,7 +213,7 @@ var require_classnames = __commonJS({
|
|
|
213
213
|
(function() {
|
|
214
214
|
"use strict";
|
|
215
215
|
var hasOwn = {}.hasOwnProperty;
|
|
216
|
-
function
|
|
216
|
+
function classNames52() {
|
|
217
217
|
var classes = "";
|
|
218
218
|
for (var i = 0; i < arguments.length; i++) {
|
|
219
219
|
var arg = arguments[i];
|
|
@@ -231,7 +231,7 @@ var require_classnames = __commonJS({
|
|
|
231
231
|
return "";
|
|
232
232
|
}
|
|
233
233
|
if (Array.isArray(arg)) {
|
|
234
|
-
return
|
|
234
|
+
return classNames52.apply(null, arg);
|
|
235
235
|
}
|
|
236
236
|
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
237
237
|
return arg.toString();
|
|
@@ -254,14 +254,14 @@ var require_classnames = __commonJS({
|
|
|
254
254
|
return value + newClass;
|
|
255
255
|
}
|
|
256
256
|
if (typeof module !== "undefined" && module.exports) {
|
|
257
|
-
|
|
258
|
-
module.exports =
|
|
257
|
+
classNames52.default = classNames52;
|
|
258
|
+
module.exports = classNames52;
|
|
259
259
|
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
260
260
|
define("classnames", [], function() {
|
|
261
|
-
return
|
|
261
|
+
return classNames52;
|
|
262
262
|
});
|
|
263
263
|
} else {
|
|
264
|
-
window.classNames =
|
|
264
|
+
window.classNames = classNames52;
|
|
265
265
|
}
|
|
266
266
|
})();
|
|
267
267
|
}
|
|
@@ -24267,19 +24267,17 @@ function useController(props) {
|
|
|
24267
24267
|
set(control._formValues, name, value2);
|
|
24268
24268
|
}
|
|
24269
24269
|
}
|
|
24270
|
+
!isArrayField && control.register(name);
|
|
24270
24271
|
return () => {
|
|
24271
24272
|
(isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name) : updateMounted(name, false);
|
|
24272
24273
|
};
|
|
24273
24274
|
}, [name, control, isArrayField, shouldUnregister]);
|
|
24274
24275
|
React.useEffect(() => {
|
|
24275
|
-
|
|
24276
|
-
|
|
24277
|
-
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
value: get(control._fields, name)._f.value
|
|
24281
|
-
});
|
|
24282
|
-
}
|
|
24276
|
+
control._updateDisabledField({
|
|
24277
|
+
disabled,
|
|
24278
|
+
fields: control._fields,
|
|
24279
|
+
name
|
|
24280
|
+
});
|
|
24283
24281
|
}, [disabled, name, control]);
|
|
24284
24282
|
return React.useMemo(() => ({
|
|
24285
24283
|
field,
|
|
@@ -24383,10 +24381,10 @@ var getValueAndMessage = (validationData) => isObject(validationData) && !isRege
|
|
|
24383
24381
|
value: validationData,
|
|
24384
24382
|
message: ""
|
|
24385
24383
|
};
|
|
24386
|
-
var validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
|
|
24387
|
-
const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount
|
|
24384
|
+
var validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
|
|
24385
|
+
const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount } = field._f;
|
|
24388
24386
|
const inputValue = get(formValues, name);
|
|
24389
|
-
if (!mount ||
|
|
24387
|
+
if (!mount || disabledFieldNames.has(name)) {
|
|
24390
24388
|
return {};
|
|
24391
24389
|
}
|
|
24392
24390
|
const inputRef = refs ? refs[0] : ref;
|
|
@@ -24662,9 +24660,6 @@ var getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultVal
|
|
|
24662
24660
|
var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value) ? value : valueAsNumber ? value === "" ? NaN : value ? +value : value : valueAsDate && isString(value) ? new Date(value) : setValueAs ? setValueAs(value) : value;
|
|
24663
24661
|
function getFieldValue(_f) {
|
|
24664
24662
|
const ref = _f.ref;
|
|
24665
|
-
if (_f.refs ? _f.refs.every((ref2) => ref2.disabled) : ref.disabled) {
|
|
24666
|
-
return;
|
|
24667
|
-
}
|
|
24668
24663
|
if (isFileInput(ref)) {
|
|
24669
24664
|
return ref.files;
|
|
24670
24665
|
}
|
|
@@ -24772,6 +24767,7 @@ function createFormControl(props = {}) {
|
|
|
24772
24767
|
};
|
|
24773
24768
|
let _names = {
|
|
24774
24769
|
mount: /* @__PURE__ */ new Set(),
|
|
24770
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
24775
24771
|
unMount: /* @__PURE__ */ new Set(),
|
|
24776
24772
|
array: /* @__PURE__ */ new Set(),
|
|
24777
24773
|
watch: /* @__PURE__ */ new Set()
|
|
@@ -24961,7 +24957,7 @@ function createFormControl(props = {}) {
|
|
|
24961
24957
|
if (isPromiseFunction && _proxyFormState.validatingFields) {
|
|
24962
24958
|
_updateIsValidating([name], true);
|
|
24963
24959
|
}
|
|
24964
|
-
const fieldError = await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);
|
|
24960
|
+
const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);
|
|
24965
24961
|
if (isPromiseFunction && _proxyFormState.validatingFields) {
|
|
24966
24962
|
_updateIsValidating([name]);
|
|
24967
24963
|
}
|
|
@@ -25089,11 +25085,9 @@ function createFormControl(props = {}) {
|
|
|
25089
25085
|
});
|
|
25090
25086
|
if (shouldSkipValidation) {
|
|
25091
25087
|
if (_proxyFormState.isValid) {
|
|
25092
|
-
if (_options.mode === "onBlur") {
|
|
25093
|
-
|
|
25094
|
-
|
|
25095
|
-
}
|
|
25096
|
-
} else {
|
|
25088
|
+
if (_options.mode === "onBlur" && isBlurEvent) {
|
|
25089
|
+
_updateValid();
|
|
25090
|
+
} else if (!isBlurEvent) {
|
|
25097
25091
|
_updateValid();
|
|
25098
25092
|
}
|
|
25099
25093
|
}
|
|
@@ -25112,7 +25106,7 @@ function createFormControl(props = {}) {
|
|
|
25112
25106
|
}
|
|
25113
25107
|
} else {
|
|
25114
25108
|
_updateIsValidating([name], true);
|
|
25115
|
-
error = (await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];
|
|
25109
|
+
error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];
|
|
25116
25110
|
_updateIsValidating([name]);
|
|
25117
25111
|
_updateIsFieldValueUpdated(fieldValue);
|
|
25118
25112
|
if (isFieldValueUpdated) {
|
|
@@ -25222,13 +25216,10 @@ function createFormControl(props = {}) {
|
|
|
25222
25216
|
});
|
|
25223
25217
|
!options.keepIsValid && _updateValid();
|
|
25224
25218
|
};
|
|
25225
|
-
const _updateDisabledField = ({ disabled, name, field, fields
|
|
25226
|
-
if (isBoolean(disabled) && _state.mount || !!disabled) {
|
|
25227
|
-
|
|
25228
|
-
|
|
25229
|
-
set(_formValues, name, inputValue);
|
|
25230
|
-
}
|
|
25231
|
-
updateTouchAndDirty(name, inputValue, false, false, true);
|
|
25219
|
+
const _updateDisabledField = ({ disabled, name, field, fields }) => {
|
|
25220
|
+
if (isBoolean(disabled) && _state.mount || !!disabled || _names.disabled.has(name)) {
|
|
25221
|
+
disabled ? _names.disabled.add(name) : _names.disabled.delete(name);
|
|
25222
|
+
updateTouchAndDirty(name, getFieldValue(field ? field._f : get(fields, name)._f), false, false, true);
|
|
25232
25223
|
}
|
|
25233
25224
|
};
|
|
25234
25225
|
const register = (name, options = {}) => {
|
|
@@ -25248,8 +25239,7 @@ function createFormControl(props = {}) {
|
|
|
25248
25239
|
_updateDisabledField({
|
|
25249
25240
|
field,
|
|
25250
25241
|
disabled: isBoolean(options.disabled) ? options.disabled : _options.disabled,
|
|
25251
|
-
name
|
|
25252
|
-
value: options.value
|
|
25242
|
+
name
|
|
25253
25243
|
});
|
|
25254
25244
|
} else {
|
|
25255
25245
|
updateValidAndValue(name, true, options.value);
|
|
@@ -25324,13 +25314,12 @@ function createFormControl(props = {}) {
|
|
|
25324
25314
|
e.preventDefault && e.preventDefault();
|
|
25325
25315
|
e.persist && e.persist();
|
|
25326
25316
|
}
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25317
|
+
let fieldValues = cloneObject(_formValues);
|
|
25318
|
+
if (_names.disabled.size) {
|
|
25319
|
+
for (const name of _names.disabled) {
|
|
25320
|
+
set(fieldValues, name, void 0);
|
|
25330
25321
|
}
|
|
25331
|
-
return;
|
|
25332
25322
|
}
|
|
25333
|
-
let fieldValues = cloneObject(_formValues);
|
|
25334
25323
|
_subjects.state.next({
|
|
25335
25324
|
isSubmitting: true
|
|
25336
25325
|
});
|
|
@@ -25438,6 +25427,7 @@ function createFormControl(props = {}) {
|
|
|
25438
25427
|
mount: keepStateOptions.keepDirtyValues ? _names.mount : /* @__PURE__ */ new Set(),
|
|
25439
25428
|
unMount: /* @__PURE__ */ new Set(),
|
|
25440
25429
|
array: /* @__PURE__ */ new Set(),
|
|
25430
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
25441
25431
|
watch: /* @__PURE__ */ new Set(),
|
|
25442
25432
|
watchAll: false,
|
|
25443
25433
|
focus: ""
|
|
@@ -25891,8 +25881,25 @@ function RxExternalLink(props) {
|
|
|
25891
25881
|
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 15 15", "fill": "none" }, "child": [{ "tag": "path", "attr": { "fillRule": "evenodd", "clipRule": "evenodd", "d": "M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z", "fill": "currentColor" }, "child": [] }] })(props);
|
|
25892
25882
|
}
|
|
25893
25883
|
|
|
25884
|
+
// src/assets/moon.svg
|
|
25885
|
+
import * as React4 from "react";
|
|
25886
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
25887
|
+
var SvgMoon = (props) => /* @__PURE__ */ jsx2("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1399.98 1400", ...props, children: /* @__PURE__ */ jsx2("path", { d: "M562.44 837.55C335.89 611 288.08 273.54 418.71 0a734.31 734.31 0 0 0-203.17 143.73c-287.39 287.39-287.39 753.33 0 1040.72s753.33 287.4 1040.74 0A733.8 733.8 0 0 0 1400 981.29c-273.55 130.63-611 82.8-837.56-143.74Z" }) });
|
|
25888
|
+
var moon_default = SvgMoon;
|
|
25889
|
+
|
|
25890
|
+
// src/assets/sun.svg
|
|
25891
|
+
import * as React5 from "react";
|
|
25892
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
25893
|
+
var SvgSun = (props) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1400 1400", ...props, children: [
|
|
25894
|
+
/* @__PURE__ */ jsx3("path", { d: "M367.43 422.13a54.44 54.44 0 0 1-38.66-16L205 282.35A54.69 54.69 0 0 1 282.37 205l123.74 123.79a54.68 54.68 0 0 1-38.68 93.34ZM1156.3 1211a54.51 54.51 0 0 1-38.67-16l-123.74-123.79a54.68 54.68 0 1 1 77.34-77.33L1195 1117.65a54.7 54.7 0 0 1-38.7 93.35Zm-912.6 0a54.7 54.7 0 0 1-38.7-93.35l123.74-123.76a54.69 54.69 0 0 1 77.36 77.32L282.37 1195a54.51 54.51 0 0 1-38.67 16Zm788.87-788.87a54.68 54.68 0 0 1-38.68-93.34L1117.61 205a54.69 54.69 0 0 1 77.39 77.35l-123.77 123.76a54.44 54.44 0 0 1-38.66 16.02ZM229.69 754.69h-175a54.69 54.69 0 0 1 0-109.38h175a54.69 54.69 0 0 1 0 109.38Zm1115.62 0h-175a54.69 54.69 0 0 1 0-109.38h175a54.69 54.69 0 0 1 0 109.38ZM700 1400a54.68 54.68 0 0 1-54.69-54.69v-175a54.69 54.69 0 0 1 109.38 0v175A54.68 54.68 0 0 1 700 1400Zm0-1115.62a54.7 54.7 0 0 1-54.69-54.69v-175a54.69 54.69 0 0 1 109.38 0v175A54.7 54.7 0 0 1 700 284.38Z" }),
|
|
25895
|
+
/* @__PURE__ */ jsx3("circle", { cx: 700, cy: 700, r: 306.25 })
|
|
25896
|
+
] });
|
|
25897
|
+
var sun_default = SvgSun;
|
|
25898
|
+
|
|
25894
25899
|
// src/components/Icons.tsx
|
|
25895
25900
|
var Icons = {
|
|
25901
|
+
Moon: moon_default,
|
|
25902
|
+
Sun: sun_default,
|
|
25896
25903
|
Alert: GoAlert,
|
|
25897
25904
|
Arrow: PiArrowRight,
|
|
25898
25905
|
Check: MdCheck,
|
|
@@ -25918,7 +25925,7 @@ var Icons = {
|
|
|
25918
25925
|
var AlertBanner_default = { "banner": "AlertBanner_banner__NDk3N", "message": "AlertBanner_message__OGU2O", "title": "AlertBanner_title__YjhjN", "close": "AlertBanner_close__ZjhiY", "error": "AlertBanner_error__NzM5N", "info": "AlertBanner_info__MTMxY" };
|
|
25919
25926
|
|
|
25920
25927
|
// src/components/AlertBanner.tsx
|
|
25921
|
-
import { jsx as
|
|
25928
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
25922
25929
|
function AlertBanner({
|
|
25923
25930
|
title,
|
|
25924
25931
|
description,
|
|
@@ -25930,14 +25937,14 @@ function AlertBanner({
|
|
|
25930
25937
|
className,
|
|
25931
25938
|
...props
|
|
25932
25939
|
}) {
|
|
25933
|
-
return /* @__PURE__ */
|
|
25934
|
-
(icon || variant) && /* @__PURE__ */
|
|
25935
|
-
/* @__PURE__ */
|
|
25936
|
-
title && /* @__PURE__ */
|
|
25937
|
-
description && /* @__PURE__ */
|
|
25940
|
+
return /* @__PURE__ */ jsxs2("div", { ...props, className: (0, import_classnames2.default)(AlertBanner_default.banner, className, variant && AlertBanner_default[variant]), children: [
|
|
25941
|
+
(icon || variant) && /* @__PURE__ */ jsx4(Icon, { size: "md", children: variant ? createElement(AlertIcons[variant]) : icon }),
|
|
25942
|
+
/* @__PURE__ */ jsxs2("div", { className: AlertBanner_default.message, children: [
|
|
25943
|
+
title && /* @__PURE__ */ jsx4("div", { className: AlertBanner_default.title, children: title }),
|
|
25944
|
+
description && /* @__PURE__ */ jsx4("div", { className: AlertBanner_default.description, children: description })
|
|
25938
25945
|
] }),
|
|
25939
25946
|
children,
|
|
25940
|
-
allowClose && /* @__PURE__ */
|
|
25947
|
+
allowClose && /* @__PURE__ */ jsx4(Icon, { className: AlertBanner_default.close, onClick: onClose, children: /* @__PURE__ */ jsx4(Icons.Close, {}) })
|
|
25941
25948
|
] });
|
|
25942
25949
|
}
|
|
25943
25950
|
var AlertIcons = {
|
|
@@ -26073,7 +26080,7 @@ function useDesignProps(props) {
|
|
|
26073
26080
|
|
|
26074
26081
|
// src/components/Box.tsx
|
|
26075
26082
|
var import_classnames3 = __toESM(require_classnames());
|
|
26076
|
-
import { jsx as
|
|
26083
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
26077
26084
|
function Box({
|
|
26078
26085
|
display,
|
|
26079
26086
|
color,
|
|
@@ -26163,7 +26170,7 @@ function Box({
|
|
|
26163
26170
|
gridColumn,
|
|
26164
26171
|
order
|
|
26165
26172
|
});
|
|
26166
|
-
return /* @__PURE__ */
|
|
26173
|
+
return /* @__PURE__ */ jsx5(
|
|
26167
26174
|
Component,
|
|
26168
26175
|
{
|
|
26169
26176
|
...props,
|
|
@@ -26178,7 +26185,7 @@ function Box({
|
|
|
26178
26185
|
}
|
|
26179
26186
|
|
|
26180
26187
|
// src/components/Flexbox.tsx
|
|
26181
|
-
import { jsx as
|
|
26188
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
26182
26189
|
function Flexbox({
|
|
26183
26190
|
display = "flex",
|
|
26184
26191
|
direction,
|
|
@@ -26207,13 +26214,13 @@ function Flexbox({
|
|
|
26207
26214
|
gapX,
|
|
26208
26215
|
gapY
|
|
26209
26216
|
});
|
|
26210
|
-
return /* @__PURE__ */
|
|
26217
|
+
return /* @__PURE__ */ jsx6(Box, { ...props, className: (0, import_classnames4.default)(className, classes), style: { ...styleProps, ...style }, children });
|
|
26211
26218
|
}
|
|
26212
26219
|
|
|
26213
26220
|
// src/components/Column.tsx
|
|
26214
|
-
import { jsx as
|
|
26221
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
26215
26222
|
function Column({ reverse, children, ...props }) {
|
|
26216
|
-
return /* @__PURE__ */
|
|
26223
|
+
return /* @__PURE__ */ jsx7(Flexbox, { ...props, direction: reverse ? "column-reverse" : "column", children });
|
|
26217
26224
|
}
|
|
26218
26225
|
|
|
26219
26226
|
// src/components/Text.tsx
|
|
@@ -26223,7 +26230,7 @@ var import_classnames5 = __toESM(require_classnames());
|
|
|
26223
26230
|
var Text_default = { "text": "Text_text__NzMxN" };
|
|
26224
26231
|
|
|
26225
26232
|
// src/components/Text.tsx
|
|
26226
|
-
import { jsx as
|
|
26233
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
26227
26234
|
function Text({
|
|
26228
26235
|
color,
|
|
26229
26236
|
size,
|
|
@@ -26247,7 +26254,7 @@ function Text({
|
|
|
26247
26254
|
letterSpacing: spacing,
|
|
26248
26255
|
color
|
|
26249
26256
|
});
|
|
26250
|
-
return /* @__PURE__ */
|
|
26257
|
+
return /* @__PURE__ */ jsx8(
|
|
26251
26258
|
Component,
|
|
26252
26259
|
{
|
|
26253
26260
|
...props,
|
|
@@ -26262,7 +26269,7 @@ function Text({
|
|
|
26262
26269
|
var Form_default = { "form": "Form_form__MmRlO", "text": "Form_text__YzQwZ", "icon": "Form_icon__NjM1M", "error": "Form_error__ODQ0M" };
|
|
26263
26270
|
|
|
26264
26271
|
// src/components/forms/Form.tsx
|
|
26265
|
-
import { jsx as
|
|
26272
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
26266
26273
|
function Form({
|
|
26267
26274
|
gap = "3",
|
|
26268
26275
|
autoComplete,
|
|
@@ -26315,12 +26322,12 @@ function Form({
|
|
|
26315
26322
|
formValues.reset(void 0, { keepDirty: true, keepValues: true });
|
|
26316
26323
|
}
|
|
26317
26324
|
}, [error]);
|
|
26318
|
-
return /* @__PURE__ */
|
|
26319
|
-
error && /* @__PURE__ */
|
|
26320
|
-
/* @__PURE__ */
|
|
26321
|
-
/* @__PURE__ */
|
|
26325
|
+
return /* @__PURE__ */ jsxs3(FormProvider, { ...formValues, children: [
|
|
26326
|
+
error && /* @__PURE__ */ jsxs3(AlertBanner, { variant: "error", className: Form_default.error, children: [
|
|
26327
|
+
/* @__PURE__ */ jsx9(Icon, { size: "lg", className: Form_default.icon, children: /* @__PURE__ */ jsx9(Icons.Alert, {}) }),
|
|
26328
|
+
/* @__PURE__ */ jsx9(Text, { className: Form_default.text, children: error })
|
|
26322
26329
|
] }),
|
|
26323
|
-
/* @__PURE__ */
|
|
26330
|
+
/* @__PURE__ */ jsx9(
|
|
26324
26331
|
"form",
|
|
26325
26332
|
{
|
|
26326
26333
|
...props,
|
|
@@ -26328,7 +26335,7 @@ function Form({
|
|
|
26328
26335
|
className: (0, import_classnames6.default)(Form_default.form, className),
|
|
26329
26336
|
onSubmit: onSubmit ? handleSubmit(onSubmit) : void 0,
|
|
26330
26337
|
onKeyDown,
|
|
26331
|
-
children: /* @__PURE__ */
|
|
26338
|
+
children: /* @__PURE__ */ jsx9(Column, { gap, children: typeof children === "function" ? children(formValues) : children })
|
|
26332
26339
|
}
|
|
26333
26340
|
)
|
|
26334
26341
|
] });
|
|
@@ -26342,20 +26349,20 @@ var import_classnames7 = __toESM(require_classnames());
|
|
|
26342
26349
|
var FormField_default = { "field": "FormField_field__NTJhZ", "description": "FormField_description__NTYzZ", "error": "FormField_error__MzFkZ" };
|
|
26343
26350
|
|
|
26344
26351
|
// src/components/forms/FormField.tsx
|
|
26345
|
-
import { jsx as
|
|
26352
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
26346
26353
|
var FormField = forwardRef(
|
|
26347
26354
|
({ name, description, label, rules, className, children, ...props }, ref) => {
|
|
26348
26355
|
const { formState, control } = useFormContext();
|
|
26349
26356
|
const { field } = useController({ name, control, rules });
|
|
26350
26357
|
const errors = formState?.errors || {};
|
|
26351
26358
|
const errorMessage = errors[name]?.message;
|
|
26352
|
-
return /* @__PURE__ */
|
|
26359
|
+
return /* @__PURE__ */ jsxs4("div", { ...props, ref, className: (0, import_classnames7.default)(FormField_default.input, className), children: [
|
|
26353
26360
|
typeof children === "function" ? children(field) : Children.map(
|
|
26354
26361
|
children,
|
|
26355
26362
|
(child) => child ? cloneElement2(child, { ...field, label: child.props.label || label }) : null
|
|
26356
26363
|
),
|
|
26357
|
-
description && /* @__PURE__ */
|
|
26358
|
-
errorMessage && /* @__PURE__ */
|
|
26364
|
+
description && /* @__PURE__ */ jsx10("div", { className: FormField_default.description, children: description }),
|
|
26365
|
+
errorMessage && /* @__PURE__ */ jsx10("div", { className: FormField_default.error, children: errorMessage })
|
|
26359
26366
|
] });
|
|
26360
26367
|
}
|
|
26361
26368
|
);
|
|
@@ -26368,7 +26375,7 @@ var import_classnames8 = __toESM(require_classnames());
|
|
|
26368
26375
|
var Button_default = { "button": "Button_button__N2NhN", "primary": "Button_primary__MDA0Z", "outline": "Button_outline__MzBjM", "quiet": "Button_quiet__NTFlY", "danger": "Button_danger__ZDg3Y", "xs": "Button_xs__ZGIyN", "sm": "Button_sm__MGY0N", "md": "Button_md__MGYwY", "lg": "Button_lg__NWQyZ", "xl": "Button_xl__MDQxY" };
|
|
26369
26376
|
|
|
26370
26377
|
// src/components/Button.tsx
|
|
26371
|
-
import { jsx as
|
|
26378
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
26372
26379
|
var Button = forwardRef2(
|
|
26373
26380
|
({
|
|
26374
26381
|
variant = "secondary",
|
|
@@ -26381,7 +26388,7 @@ var Button = forwardRef2(
|
|
|
26381
26388
|
}, ref) => {
|
|
26382
26389
|
const Component = asChild ? Slot : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
|
|
26383
26390
|
const buttonProps = Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? { preventFocusOnPress } : void 0;
|
|
26384
|
-
return /* @__PURE__ */
|
|
26391
|
+
return /* @__PURE__ */ jsx11(
|
|
26385
26392
|
Component,
|
|
26386
26393
|
{
|
|
26387
26394
|
...props,
|
|
@@ -26400,14 +26407,14 @@ var Button = forwardRef2(
|
|
|
26400
26407
|
);
|
|
26401
26408
|
|
|
26402
26409
|
// src/components/forms/FormResetButton.tsx
|
|
26403
|
-
import { jsx as
|
|
26410
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
26404
26411
|
function FormResetButton({ values = {}, children, onPress, ...props }) {
|
|
26405
26412
|
const { reset } = useFormContext();
|
|
26406
26413
|
const handleReset = (e) => {
|
|
26407
26414
|
reset(values);
|
|
26408
26415
|
onPress?.(e);
|
|
26409
26416
|
};
|
|
26410
|
-
return /* @__PURE__ */
|
|
26417
|
+
return /* @__PURE__ */ jsx12(Button, { ...props, type: "reset", onPress: handleReset, children });
|
|
26411
26418
|
}
|
|
26412
26419
|
|
|
26413
26420
|
// src/components/Spinner.tsx
|
|
@@ -26417,40 +26424,40 @@ var import_classnames9 = __toESM(require_classnames());
|
|
|
26417
26424
|
var Spinner_default = { "spinner": "Spinner_spinner__MzEyN", "spinner-rotate": "Spinner_spinner-rotate__MTIzZ", "track": "Spinner_track__ZmMyZ", "fill": "Spinner_fill__ZGRmY", "spinner-dash": "Spinner_spinner-dash__NDQzM", "size-sm": "Spinner_size-sm__MmQ2Z", "size-md": "Spinner_size-md__YzU5Y", "size-lg": "Spinner_size-lg__ODBhM", "size-xl": "Spinner_size-xl__YTg2M", "quiet": "Spinner_quiet__NWVlN" };
|
|
26418
26425
|
|
|
26419
26426
|
// src/components/Spinner.tsx
|
|
26420
|
-
import { jsx as
|
|
26427
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
26421
26428
|
function Spinner(props) {
|
|
26422
26429
|
const { size = "lg", quiet, className, ...domProps } = props;
|
|
26423
|
-
return /* @__PURE__ */
|
|
26430
|
+
return /* @__PURE__ */ jsx13(
|
|
26424
26431
|
"div",
|
|
26425
26432
|
{
|
|
26426
26433
|
...domProps,
|
|
26427
26434
|
className: (0, import_classnames9.default)(Spinner_default.spinner, className, Spinner_default[`size-${size}`], {
|
|
26428
26435
|
[Spinner_default.quiet]: quiet
|
|
26429
26436
|
}),
|
|
26430
|
-
children: /* @__PURE__ */
|
|
26431
|
-
/* @__PURE__ */
|
|
26432
|
-
/* @__PURE__ */
|
|
26437
|
+
children: /* @__PURE__ */ jsxs5("svg", { viewBox: "25 25 50 50", children: [
|
|
26438
|
+
/* @__PURE__ */ jsx13("circle", { className: Spinner_default.track, cx: "50", cy: "50", r: "20" }),
|
|
26439
|
+
/* @__PURE__ */ jsx13("circle", { className: Spinner_default.fill, cx: "50", cy: "50", r: "20" })
|
|
26433
26440
|
] })
|
|
26434
26441
|
}
|
|
26435
26442
|
);
|
|
26436
26443
|
}
|
|
26437
26444
|
|
|
26438
26445
|
// src/components/LoadingButton.tsx
|
|
26439
|
-
import { jsx as
|
|
26446
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
26440
26447
|
function LoadingButton({ isLoading, children, ...props }) {
|
|
26441
|
-
return /* @__PURE__ */
|
|
26442
|
-
isLoading && /* @__PURE__ */
|
|
26448
|
+
return /* @__PURE__ */ jsxs6(Button, { ...props, children: [
|
|
26449
|
+
isLoading && /* @__PURE__ */ jsx14(Icon, { size: "sm", children: /* @__PURE__ */ jsx14(Spinner, {}) }),
|
|
26443
26450
|
children
|
|
26444
26451
|
] });
|
|
26445
26452
|
}
|
|
26446
26453
|
|
|
26447
26454
|
// src/components/forms/FormSubmitButton.tsx
|
|
26448
|
-
import { jsx as
|
|
26455
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
26449
26456
|
function FormSubmitButton({ children, disabled, isLoading, ...props }) {
|
|
26450
26457
|
const {
|
|
26451
26458
|
formState: { isDirty, isValid, isSubmitting, isSubmitted, isSubmitSuccessful }
|
|
26452
26459
|
} = useFormContext();
|
|
26453
|
-
return /* @__PURE__ */
|
|
26460
|
+
return /* @__PURE__ */ jsx15(
|
|
26454
26461
|
LoadingButton,
|
|
26455
26462
|
{
|
|
26456
26463
|
...props,
|
|
@@ -26470,7 +26477,7 @@ import { createElement as createElement2 } from "react";
|
|
|
26470
26477
|
var Toast_default = { "toast": "Toast_toast__NTUyY", "icon": "Toast_icon__OWNlN", "title": "Toast_title__MWUyY", "description": "Toast_description__OTU1M", "action": "Toast_action__OWNmM", "close": "Toast_close__MmM0M", "info": "Toast_info__Y2IxZ", "error": "Toast_error__ZGE4Z" };
|
|
26471
26478
|
|
|
26472
26479
|
// src/components/toast/Toast.tsx
|
|
26473
|
-
import { jsx as
|
|
26480
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26474
26481
|
var TOAST_CLOSE_ACTION = "close";
|
|
26475
26482
|
var icons = {
|
|
26476
26483
|
info: Icons.Info,
|
|
@@ -26489,14 +26496,14 @@ function Toast({
|
|
|
26489
26496
|
...props
|
|
26490
26497
|
}) {
|
|
26491
26498
|
const hasActions = actions?.length > 0;
|
|
26492
|
-
return /* @__PURE__ */
|
|
26493
|
-
/* @__PURE__ */
|
|
26494
|
-
title && /* @__PURE__ */
|
|
26495
|
-
message && /* @__PURE__ */
|
|
26499
|
+
return /* @__PURE__ */ jsxs7("div", { ...props, className: (0, import_classnames10.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
|
|
26500
|
+
/* @__PURE__ */ jsx16(Icon, { className: Toast_default.icon, size: "md", children: variant && createElement2(icons[variant]) }),
|
|
26501
|
+
title && /* @__PURE__ */ jsx16("div", { className: Toast_default.title, children: title }),
|
|
26502
|
+
message && /* @__PURE__ */ jsx16("div", { className: Toast_default.description, children: message }),
|
|
26496
26503
|
hasActions && actions.map((action) => {
|
|
26497
|
-
return /* @__PURE__ */
|
|
26504
|
+
return /* @__PURE__ */ jsx16(Button, { className: Toast_default.action, onPress: () => onClose?.(action), children: action }, action);
|
|
26498
26505
|
}),
|
|
26499
|
-
!hasActions && allowClose && /* @__PURE__ */
|
|
26506
|
+
!hasActions && allowClose && /* @__PURE__ */ jsx16(
|
|
26500
26507
|
Icon,
|
|
26501
26508
|
{
|
|
26502
26509
|
size: "sm",
|
|
@@ -26504,7 +26511,7 @@ function Toast({
|
|
|
26504
26511
|
className: Toast_default.close,
|
|
26505
26512
|
"aria-label": "Close",
|
|
26506
26513
|
onClick: () => onClose?.(TOAST_CLOSE_ACTION),
|
|
26507
|
-
children: /* @__PURE__ */
|
|
26514
|
+
children: /* @__PURE__ */ jsx16(Icons.Close, {})
|
|
26508
26515
|
}
|
|
26509
26516
|
)
|
|
26510
26517
|
] });
|
|
@@ -27512,7 +27519,7 @@ function usePrev(value) {
|
|
|
27512
27519
|
import { useContext as useContext2, useMemo, useRef as useRef6 } from "react";
|
|
27513
27520
|
|
|
27514
27521
|
// node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs
|
|
27515
|
-
import * as
|
|
27522
|
+
import * as React7 from "react";
|
|
27516
27523
|
import { forwardRef as forwardRef3, useRef as useRef5, useCallback, useEffect as useEffect5 } from "react";
|
|
27517
27524
|
var $node = Symbol.for("Animated:node");
|
|
27518
27525
|
var isAnimated = (value) => !!value && value[$node] === value;
|
|
@@ -27742,7 +27749,7 @@ var withAnimated = (Component, host2) => {
|
|
|
27742
27749
|
each(observer2.deps, (dep) => removeFluidObserver(dep, observer2));
|
|
27743
27750
|
});
|
|
27744
27751
|
const usedProps = host2.getComponentProps(props.getValue());
|
|
27745
|
-
return /* @__PURE__ */
|
|
27752
|
+
return /* @__PURE__ */ React7.createElement(Component, { ...usedProps, ref });
|
|
27746
27753
|
});
|
|
27747
27754
|
};
|
|
27748
27755
|
var PropsObserver = class {
|
|
@@ -27811,7 +27818,7 @@ var createHost = (components, {
|
|
|
27811
27818
|
var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;
|
|
27812
27819
|
|
|
27813
27820
|
// node_modules/@react-spring/core/dist/react-spring_core.modern.mjs
|
|
27814
|
-
import * as
|
|
27821
|
+
import * as React8 from "react";
|
|
27815
27822
|
import { useContext } from "react";
|
|
27816
27823
|
import { useState as useState4 } from "react";
|
|
27817
27824
|
import * as React22 from "react";
|
|
@@ -29279,13 +29286,13 @@ var SpringContext = ({
|
|
|
29279
29286
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
29280
29287
|
props = useMemoOne(() => ({ pause, immediate }), [pause, immediate]);
|
|
29281
29288
|
const { Provider } = ctx;
|
|
29282
|
-
return /* @__PURE__ */
|
|
29289
|
+
return /* @__PURE__ */ React8.createElement(Provider, { value: props }, children);
|
|
29283
29290
|
};
|
|
29284
29291
|
var ctx = makeContext(SpringContext, {});
|
|
29285
29292
|
SpringContext.Provider = ctx.Provider;
|
|
29286
29293
|
SpringContext.Consumer = ctx.Consumer;
|
|
29287
29294
|
function makeContext(target, init) {
|
|
29288
|
-
Object.assign(target,
|
|
29295
|
+
Object.assign(target, React8.createContext(init));
|
|
29289
29296
|
target.Provider._context = target;
|
|
29290
29297
|
target.Consumer._context = target;
|
|
29291
29298
|
return target;
|
|
@@ -30112,15 +30119,15 @@ var createStoreImpl = (createState) => {
|
|
|
30112
30119
|
var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
30113
30120
|
|
|
30114
30121
|
// node_modules/zustand/esm/react.mjs
|
|
30115
|
-
import
|
|
30122
|
+
import React9 from "react";
|
|
30116
30123
|
var identity = (arg) => arg;
|
|
30117
30124
|
function useStore(api, selector = identity) {
|
|
30118
|
-
const slice =
|
|
30125
|
+
const slice = React9.useSyncExternalStore(
|
|
30119
30126
|
api.subscribe,
|
|
30120
30127
|
() => selector(api.getState()),
|
|
30121
30128
|
() => selector(api.getInitialState())
|
|
30122
30129
|
);
|
|
30123
|
-
|
|
30130
|
+
React9.useDebugValue(slice);
|
|
30124
30131
|
return slice;
|
|
30125
30132
|
}
|
|
30126
30133
|
var createImpl = (createState) => {
|
|
@@ -30136,12 +30143,12 @@ import { useContext as useContext4 } from "react";
|
|
|
30136
30143
|
|
|
30137
30144
|
// src/components/toast/ToastProvider.tsx
|
|
30138
30145
|
import { createContext as createContext2 } from "react";
|
|
30139
|
-
import { jsx as
|
|
30146
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
30140
30147
|
var ToastContext = createContext2({});
|
|
30141
30148
|
function ToastProvider({ children, ...config2 }) {
|
|
30142
|
-
return /* @__PURE__ */
|
|
30149
|
+
return /* @__PURE__ */ jsxs8(ToastContext.Provider, { value: config2, children: [
|
|
30143
30150
|
children,
|
|
30144
|
-
/* @__PURE__ */
|
|
30151
|
+
/* @__PURE__ */ jsx17(Toaster, { ...config2 })
|
|
30145
30152
|
] });
|
|
30146
30153
|
}
|
|
30147
30154
|
|
|
@@ -30166,9 +30173,8 @@ function displayToast(message, { duration = TOAST_DURATION, ...options } = {}) {
|
|
|
30166
30173
|
};
|
|
30167
30174
|
});
|
|
30168
30175
|
}
|
|
30169
|
-
var useStore2 = store;
|
|
30170
30176
|
function useToast() {
|
|
30171
|
-
const { toasts } =
|
|
30177
|
+
const { toasts } = store();
|
|
30172
30178
|
const config2 = useContext4(ToastContext);
|
|
30173
30179
|
const toast = (message, options) => {
|
|
30174
30180
|
displayToast(message, { ...options, ...config2 });
|
|
@@ -30180,7 +30186,7 @@ function useToast() {
|
|
|
30180
30186
|
var Toaster_default = { "toaster": "Toaster_toaster__Mjg1N", "position-top": "Toaster_position-top__N2UwN", "position-top-right": "Toaster_position-top-right__MmExM", "position-top-left": "Toaster_position-top-left__ZWFkZ", "position-bottom": "Toaster_position-bottom__NmI1Z", "position-bottom-right": "Toaster_position-bottom-right__MGUzZ", "position-bottom-left": "Toaster_position-bottom-left__Yzc0O", "position-left": "Toaster_position-left__MDUwZ", "position-right": "Toaster_position-right__ZmRhM" };
|
|
30181
30187
|
|
|
30182
30188
|
// src/components/toast/Toaster.tsx
|
|
30183
|
-
import { jsx as
|
|
30189
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
30184
30190
|
function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
30185
30191
|
const { toasts } = useToast();
|
|
30186
30192
|
const [hovered, setHovered] = useState5(false);
|
|
@@ -30212,7 +30218,7 @@ function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
|
30212
30218
|
};
|
|
30213
30219
|
}
|
|
30214
30220
|
}, [duration, toasts, hovered]);
|
|
30215
|
-
return /* @__PURE__ */
|
|
30221
|
+
return /* @__PURE__ */ jsx18(
|
|
30216
30222
|
"div",
|
|
30217
30223
|
{
|
|
30218
30224
|
className: (0, import_classnames11.default)(Toaster_default.toaster, Toaster_default[`position-${position}`]),
|
|
@@ -30222,7 +30228,7 @@ function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
|
30222
30228
|
const { id, ...props } = item;
|
|
30223
30229
|
return (
|
|
30224
30230
|
// @ts-ignore
|
|
30225
|
-
/* @__PURE__ */
|
|
30231
|
+
/* @__PURE__ */ jsx18(animated.div, { style, children: /* @__PURE__ */ jsx18(Toast, { ...props, id, onClose: () => removeToast(id) }) }, id)
|
|
30226
30232
|
);
|
|
30227
30233
|
})
|
|
30228
30234
|
}
|
|
@@ -30246,15 +30252,15 @@ function useDebounce(value, delay) {
|
|
|
30246
30252
|
|
|
30247
30253
|
// src/components/hooks/useTheme.ts
|
|
30248
30254
|
var initialState2 = {
|
|
30249
|
-
|
|
30255
|
+
theme: "light"
|
|
30250
30256
|
};
|
|
30251
30257
|
var store2 = create(() => ({ ...initialState2 }));
|
|
30252
|
-
function setTheme(
|
|
30253
|
-
store2.setState({
|
|
30254
|
-
document.body.setAttribute("data-theme",
|
|
30258
|
+
function setTheme(theme) {
|
|
30259
|
+
store2.setState({ theme });
|
|
30260
|
+
document.body.setAttribute("data-theme", theme);
|
|
30255
30261
|
}
|
|
30256
30262
|
function useTheme() {
|
|
30257
|
-
const theme = store2
|
|
30263
|
+
const { theme } = store2();
|
|
30258
30264
|
return { theme, setTheme };
|
|
30259
30265
|
}
|
|
30260
30266
|
|
|
@@ -30266,9 +30272,9 @@ var import_classnames12 = __toESM(require_classnames());
|
|
|
30266
30272
|
var Accordion_default = { "accordion": "Accordion_accordion__N2U1M", "item": "Accordion_item__YTQxO", "button": "Accordion_button__ZTA5Z", "icon": "Accordion_icon__ZmQ5M", "panel": "Accordion_panel__YjcyN", "expanded": "Accordion_expanded__NGYxM" };
|
|
30267
30273
|
|
|
30268
30274
|
// src/components/Accordion.tsx
|
|
30269
|
-
import { jsx as
|
|
30275
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
30270
30276
|
function Accordion({ className, children, ...props }) {
|
|
30271
|
-
return /* @__PURE__ */
|
|
30277
|
+
return /* @__PURE__ */ jsx19($28f4fd908f0de97f$export$944aceb4f8c89f10, { ...props, className: (0, import_classnames12.default)(Accordion_default.accordion, className), children });
|
|
30272
30278
|
}
|
|
30273
30279
|
function AccordionItem({
|
|
30274
30280
|
defaultExpanded,
|
|
@@ -30281,18 +30287,18 @@ function AccordionItem({
|
|
|
30281
30287
|
const handleExpandedChange = (isExpanded) => {
|
|
30282
30288
|
requestAnimationFrame(() => setExpanded(isExpanded));
|
|
30283
30289
|
};
|
|
30284
|
-
return /* @__PURE__ */
|
|
30290
|
+
return /* @__PURE__ */ jsxs9(
|
|
30285
30291
|
$28f4fd908f0de97f$export$74a362b31437ec83,
|
|
30286
30292
|
{
|
|
30287
30293
|
...props,
|
|
30288
30294
|
className: (0, import_classnames12.default)(Accordion_default.item, className),
|
|
30289
30295
|
onExpandedChange: handleExpandedChange,
|
|
30290
30296
|
children: [
|
|
30291
|
-
/* @__PURE__ */
|
|
30292
|
-
/* @__PURE__ */
|
|
30293
|
-
/* @__PURE__ */
|
|
30297
|
+
/* @__PURE__ */ jsxs9(Button, { slot: "trigger", className: Accordion_default.button, children: [
|
|
30298
|
+
/* @__PURE__ */ jsx19(Text, { children: trigger }),
|
|
30299
|
+
/* @__PURE__ */ jsx19(Icon, { className: Accordion_default.icon, size: "xs", children: /* @__PURE__ */ jsx19(Icons.Chevron, {}) })
|
|
30294
30300
|
] }),
|
|
30295
|
-
/* @__PURE__ */
|
|
30301
|
+
/* @__PURE__ */ jsx19($28f4fd908f0de97f$export$feabaa331e1d464c, { className: (0, import_classnames12.default)(Accordion_default.panel, expanded && Accordion_default.expanded), children: panel })
|
|
30296
30302
|
]
|
|
30297
30303
|
}
|
|
30298
30304
|
);
|
|
@@ -30308,27 +30314,27 @@ var import_classnames13 = __toESM(require_classnames());
|
|
|
30308
30314
|
var Dialog_default = { "dialog": "Dialog_dialog__YjBmO", "title": "Dialog_title__MmNiZ" };
|
|
30309
30315
|
|
|
30310
30316
|
// src/components/Dialog.tsx
|
|
30311
|
-
import { Fragment as Fragment2, jsx as
|
|
30317
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
30312
30318
|
function Dialog({ title, children, className, ...props }) {
|
|
30313
|
-
return /* @__PURE__ */
|
|
30314
|
-
return /* @__PURE__ */
|
|
30315
|
-
title && /* @__PURE__ */
|
|
30319
|
+
return /* @__PURE__ */ jsx20($de32f1b87079253c$export$3ddf2d174ce01153, { ...props, className: (0, import_classnames13.default)(Dialog_default.dialog, className), children: ({ close }) => {
|
|
30320
|
+
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
30321
|
+
title && /* @__PURE__ */ jsx20("div", { className: Dialog_default.title, children: title }),
|
|
30316
30322
|
typeof children === "function" ? children({ close }) : children
|
|
30317
30323
|
] });
|
|
30318
30324
|
} });
|
|
30319
30325
|
}
|
|
30320
30326
|
|
|
30321
30327
|
// src/components/Row.tsx
|
|
30322
|
-
import { jsx as
|
|
30328
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
30323
30329
|
function Row({ reverse, children, ...props }) {
|
|
30324
|
-
return /* @__PURE__ */
|
|
30330
|
+
return /* @__PURE__ */ jsx21(Flexbox, { ...props, direction: reverse ? "row-reverse" : "row", children });
|
|
30325
30331
|
}
|
|
30326
30332
|
|
|
30327
30333
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/AlertDialog.module.css
|
|
30328
30334
|
var AlertDialog_default = { "dialog": "AlertDialog_dialog__NDdlY", "title": "AlertDialog_title__ZGFlY" };
|
|
30329
30335
|
|
|
30330
30336
|
// src/components/AlertDialog.tsx
|
|
30331
|
-
import { jsx as
|
|
30337
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
30332
30338
|
function AlertDialog({
|
|
30333
30339
|
title,
|
|
30334
30340
|
description,
|
|
@@ -30350,12 +30356,12 @@ function AlertDialog({
|
|
|
30350
30356
|
onCancel?.();
|
|
30351
30357
|
close();
|
|
30352
30358
|
};
|
|
30353
|
-
return /* @__PURE__ */
|
|
30354
|
-
return /* @__PURE__ */
|
|
30359
|
+
return /* @__PURE__ */ jsx22(Dialog, { ...props, title, className: (0, import_classnames14.default)(AlertDialog_default.dialog, className), children: ({ close }) => {
|
|
30360
|
+
return /* @__PURE__ */ jsxs11(Column, { gap: "4", children: [
|
|
30355
30361
|
typeof children === "function" ? children({ close }) : children,
|
|
30356
|
-
/* @__PURE__ */
|
|
30357
|
-
/* @__PURE__ */
|
|
30358
|
-
/* @__PURE__ */
|
|
30362
|
+
/* @__PURE__ */ jsxs11(Row, { gap: "3", justifyContent: "end", children: [
|
|
30363
|
+
/* @__PURE__ */ jsx22(Button, { onPress: () => handleClose(close), children: cancelLabel }),
|
|
30364
|
+
/* @__PURE__ */ jsx22(
|
|
30359
30365
|
Button,
|
|
30360
30366
|
{
|
|
30361
30367
|
variant: isDanger ? "danger" : "primary",
|
|
@@ -30373,10 +30379,10 @@ function AlertDialog({
|
|
|
30373
30379
|
var Blockquote_default = { "blockquote": "Blockquote_blockquote__ZjZlY" };
|
|
30374
30380
|
|
|
30375
30381
|
// src/components/Blockquote.tsx
|
|
30376
|
-
import { jsx as
|
|
30382
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
30377
30383
|
function Blockquote({ asChild, children }) {
|
|
30378
30384
|
const Component = asChild ? Slot : "blockquote";
|
|
30379
|
-
return /* @__PURE__ */
|
|
30385
|
+
return /* @__PURE__ */ jsx23(Component, { className: Blockquote_default.blockquote, children });
|
|
30380
30386
|
}
|
|
30381
30387
|
|
|
30382
30388
|
// src/components/Breadcrumbs.tsx
|
|
@@ -30386,14 +30392,14 @@ var import_classnames15 = __toESM(require_classnames());
|
|
|
30386
30392
|
var Breadcrumbs_default = { "breadcrumbs": "Breadcrumbs_breadcrumbs__NmE0Y", "breadcrumb": "Breadcrumbs_breadcrumb__N2NlN", "icon": "Breadcrumbs_icon__ZDMwZ" };
|
|
30387
30393
|
|
|
30388
30394
|
// src/components/Breadcrumbs.tsx
|
|
30389
|
-
import { jsx as
|
|
30395
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
30390
30396
|
function Breadcrumbs({ children, className, ...props }) {
|
|
30391
|
-
return /* @__PURE__ */
|
|
30397
|
+
return /* @__PURE__ */ jsx24($778035c5624f61e7$export$2dc68d50d56fbbd, { ...props, className: (0, import_classnames15.default)(Breadcrumbs_default.breadcrumbs, className), children });
|
|
30392
30398
|
}
|
|
30393
30399
|
function Breadcrumb2({ children, className, ...props }) {
|
|
30394
|
-
return /* @__PURE__ */
|
|
30400
|
+
return /* @__PURE__ */ jsxs12($778035c5624f61e7$export$dabcc1ec9dd9d1cc, { ...props, className: (0, import_classnames15.default)(Breadcrumbs_default.breadcrumb, className), children: [
|
|
30395
30401
|
children,
|
|
30396
|
-
/* @__PURE__ */
|
|
30402
|
+
/* @__PURE__ */ jsx24(Icon, { className: Breadcrumbs_default.icon, size: "xs", children: /* @__PURE__ */ jsx24(Icons.Chevron, {}) })
|
|
30397
30403
|
] });
|
|
30398
30404
|
}
|
|
30399
30405
|
|
|
@@ -30404,17 +30410,17 @@ var import_classnames16 = __toESM(require_classnames());
|
|
|
30404
30410
|
var Calendar_default = { "calendar": "Calendar_calendar__YWQ4M", "header": "Calendar_header__OTIxN", "heading": "Calendar_heading__Mjk4N", "button": "Calendar_button__MzY0Y", "headerCell": "Calendar_headerCell__NDk1Z", "cell": "Calendar_cell__ZjA0O" };
|
|
30405
30411
|
|
|
30406
30412
|
// src/components/Calendar.tsx
|
|
30407
|
-
import { jsx as
|
|
30413
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
30408
30414
|
function Calendar({ className, ...props }) {
|
|
30409
|
-
return /* @__PURE__ */
|
|
30410
|
-
/* @__PURE__ */
|
|
30411
|
-
/* @__PURE__ */
|
|
30412
|
-
/* @__PURE__ */
|
|
30413
|
-
/* @__PURE__ */
|
|
30415
|
+
return /* @__PURE__ */ jsxs13($dfd62f934fc76fed$export$e1aef45b828286de, { ...props, className: (0, import_classnames16.default)(Calendar_default.calendar, className), children: [
|
|
30416
|
+
/* @__PURE__ */ jsxs13("header", { className: Calendar_default.header, children: [
|
|
30417
|
+
/* @__PURE__ */ jsx25(Button, { slot: "previous", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ jsx25(Icon, { rotate: 180, children: /* @__PURE__ */ jsx25(Icons.Chevron, {}) }) }),
|
|
30418
|
+
/* @__PURE__ */ jsx25($5cb03073d3f54797$export$a8a3e93435678ff9, { className: Calendar_default.heading }),
|
|
30419
|
+
/* @__PURE__ */ jsx25(Button, { slot: "next", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ jsx25(Icon, { children: /* @__PURE__ */ jsx25(Icons.Chevron, {}) }) })
|
|
30414
30420
|
] }),
|
|
30415
|
-
/* @__PURE__ */
|
|
30416
|
-
/* @__PURE__ */
|
|
30417
|
-
/* @__PURE__ */
|
|
30421
|
+
/* @__PURE__ */ jsxs13($dfd62f934fc76fed$export$5bd780d491cfc46c, { children: [
|
|
30422
|
+
/* @__PURE__ */ jsx25($dfd62f934fc76fed$export$22e2d15eaa4d2377, { children: (day) => /* @__PURE__ */ jsx25($dfd62f934fc76fed$export$ad2135cac3a11b3d, { className: Calendar_default.headerCell, children: day }) }),
|
|
30423
|
+
/* @__PURE__ */ jsx25($dfd62f934fc76fed$export$e11f8ba65d857bff, { className: Calendar_default.body, children: (date) => /* @__PURE__ */ jsx25($dfd62f934fc76fed$export$5d847498420df57b, { className: Calendar_default.cell, date }) })
|
|
30418
30424
|
] })
|
|
30419
30425
|
] });
|
|
30420
30426
|
}
|
|
@@ -30434,11 +30440,11 @@ var import_classnames17 = __toESM(require_classnames());
|
|
|
30434
30440
|
var Checkbox_default = { "checkbox": "Checkbox_checkbox__NGI1M", "box": "Checkbox_box__OWZmM", "icon": "Checkbox_icon__OTM3O" };
|
|
30435
30441
|
|
|
30436
30442
|
// src/components/Checkbox.tsx
|
|
30437
|
-
import { Fragment as Fragment3, jsx as
|
|
30443
|
+
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
30438
30444
|
var Checkbox = forwardRef4(
|
|
30439
30445
|
({ label, className, children, ...props }, ref) => {
|
|
30440
30446
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
30441
|
-
return /* @__PURE__ */
|
|
30447
|
+
return /* @__PURE__ */ jsx26(
|
|
30442
30448
|
$bc237834342dbd75$export$48513f6b9f8ce62d,
|
|
30443
30449
|
{
|
|
30444
30450
|
...props,
|
|
@@ -30446,8 +30452,8 @@ var Checkbox = forwardRef4(
|
|
|
30446
30452
|
isSelected,
|
|
30447
30453
|
className: (0, import_classnames17.default)(Checkbox_default.checkbox, className),
|
|
30448
30454
|
children: ({ isIndeterminate, isSelected: isSelected2 }) => {
|
|
30449
|
-
return /* @__PURE__ */
|
|
30450
|
-
/* @__PURE__ */
|
|
30455
|
+
return /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
30456
|
+
/* @__PURE__ */ jsx26("div", { className: Checkbox_default.box, children: /* @__PURE__ */ jsx26(Icon, { className: Checkbox_default.icon, size: "xs", children: isIndeterminate ? /* @__PURE__ */ jsx26(Icons.Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx26(ImCheckmark, {}) : null }) }),
|
|
30451
30457
|
children
|
|
30452
30458
|
] });
|
|
30453
30459
|
}
|
|
@@ -30460,10 +30466,10 @@ var Checkbox = forwardRef4(
|
|
|
30460
30466
|
var Code_default = { "code": "Code_code__MGFiZ" };
|
|
30461
30467
|
|
|
30462
30468
|
// src/components/Code.tsx
|
|
30463
|
-
import { jsx as
|
|
30469
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
30464
30470
|
function Code({ asChild, children }) {
|
|
30465
30471
|
const Component = asChild ? Slot : "code";
|
|
30466
|
-
return /* @__PURE__ */
|
|
30472
|
+
return /* @__PURE__ */ jsx27(Component, { className: Code_default.code, children });
|
|
30467
30473
|
}
|
|
30468
30474
|
|
|
30469
30475
|
// src/components/Combobox.tsx
|
|
@@ -30476,23 +30482,23 @@ var import_classnames18 = __toESM(require_classnames());
|
|
|
30476
30482
|
var List_default = { "list": "List_list__YjljZ", "separator": "List_separator__MTY2Z", "section": "List_section__OTJjN", "header": "List_header__OGNhM", "item": "List_item__ZDcxO", "check": "List_check__ZDNkM" };
|
|
30477
30483
|
|
|
30478
30484
|
// src/components/List.tsx
|
|
30479
|
-
import { jsx as
|
|
30485
|
+
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
30480
30486
|
function List({ items, className, children, ...props }) {
|
|
30481
|
-
return /* @__PURE__ */
|
|
30487
|
+
return /* @__PURE__ */ jsx28($eed445e0843c11d0$export$41f133550aa26f48, { ...props, items, className: (0, import_classnames18.default)(List_default.list, className), children: children || items?.map((item, index) => {
|
|
30482
30488
|
if (item === null) {
|
|
30483
|
-
return /* @__PURE__ */
|
|
30489
|
+
return /* @__PURE__ */ jsx28($431f98aba6844401$export$1ff3c3f08ae963c0, { className: List_default.separator }, index);
|
|
30484
30490
|
}
|
|
30485
|
-
return /* @__PURE__ */
|
|
30491
|
+
return /* @__PURE__ */ jsx28(ListItem, { id: item, className: List_default.item, children: item }, index);
|
|
30486
30492
|
}) });
|
|
30487
30493
|
}
|
|
30488
30494
|
function ListItem({ children, className, ...props }) {
|
|
30489
|
-
return /* @__PURE__ */
|
|
30495
|
+
return /* @__PURE__ */ jsxs15($eed445e0843c11d0$export$a11e76429ed99b4, { ...props, className: (0, import_classnames18.default)(List_default.item, className), children: [
|
|
30490
30496
|
children,
|
|
30491
|
-
/* @__PURE__ */
|
|
30497
|
+
/* @__PURE__ */ jsx28("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx28(Icon, { size: "sm", className: List_default.check, children: /* @__PURE__ */ jsx28(Icons.Check, {}) }) })
|
|
30492
30498
|
] });
|
|
30493
30499
|
}
|
|
30494
30500
|
function ListSeparator({ className, ...props }) {
|
|
30495
|
-
return /* @__PURE__ */
|
|
30501
|
+
return /* @__PURE__ */ jsx28($431f98aba6844401$export$1ff3c3f08ae963c0, { ...props, className: (0, import_classnames18.default)(List_default.separator, className) });
|
|
30496
30502
|
}
|
|
30497
30503
|
function ListSection({
|
|
30498
30504
|
title,
|
|
@@ -30500,8 +30506,8 @@ function ListSection({
|
|
|
30500
30506
|
children,
|
|
30501
30507
|
...props
|
|
30502
30508
|
}) {
|
|
30503
|
-
return /* @__PURE__ */
|
|
30504
|
-
title && /* @__PURE__ */
|
|
30509
|
+
return /* @__PURE__ */ jsxs15($eed445e0843c11d0$export$dca12b0bb56e4fc, { ...props, className: (0, import_classnames18.default)(List_default.section, className), children: [
|
|
30510
|
+
title && /* @__PURE__ */ jsx28($72a5793c14baf454$export$8b251419efc915eb, { className: List_default.header, children: title }),
|
|
30505
30511
|
children
|
|
30506
30512
|
] });
|
|
30507
30513
|
}
|
|
@@ -30513,11 +30519,11 @@ var import_classnames19 = __toESM(require_classnames());
|
|
|
30513
30519
|
var ListItem_default = { "item": "ListItem_item__NjU4Z", "check": "ListItem_check__ZTkxY" };
|
|
30514
30520
|
|
|
30515
30521
|
// src/components/ListItem.tsx
|
|
30516
|
-
import { jsx as
|
|
30522
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
30517
30523
|
function ListItem2({ children, className, ...props }) {
|
|
30518
|
-
return /* @__PURE__ */
|
|
30524
|
+
return /* @__PURE__ */ jsxs16($eed445e0843c11d0$export$a11e76429ed99b4, { ...props, className: (0, import_classnames19.default)(ListItem_default.item, className), children: [
|
|
30519
30525
|
children,
|
|
30520
|
-
/* @__PURE__ */
|
|
30526
|
+
/* @__PURE__ */ jsx29("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx29(Icon, { size: "sm", className: ListItem_default.check, children: /* @__PURE__ */ jsx29(Icons.Check, {}) }) })
|
|
30521
30527
|
] });
|
|
30522
30528
|
}
|
|
30523
30529
|
|
|
@@ -30528,23 +30534,23 @@ var import_classnames20 = __toESM(require_classnames());
|
|
|
30528
30534
|
var Popover_default = { "popover": "Popover_popover__NDdlY", "popover-slide": "Popover_popover-slide__NThhN" };
|
|
30529
30535
|
|
|
30530
30536
|
// src/components/Popover.tsx
|
|
30531
|
-
import { jsx as
|
|
30537
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
30532
30538
|
function Popover({ children, className, ...props }) {
|
|
30533
|
-
return /* @__PURE__ */
|
|
30539
|
+
return /* @__PURE__ */ jsx30($07b14b47974efb58$export$5b6b19405a83ff9d, { ...props, className: (0, import_classnames20.default)(Popover_default.popover, className), children });
|
|
30534
30540
|
}
|
|
30535
30541
|
|
|
30536
30542
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/Combobox.module.css
|
|
30537
30543
|
var Combobox_default = { "combobox": "Combobox_combobox__ZTRmY", "field": "Combobox_field__NTEzO", "input": "Combobox_input__OTg4M", "button": "Combobox_button__NTk2Z", "list": "Combobox_list__NzdmO", "icon": "Combobox_icon__MTA3O" };
|
|
30538
30544
|
|
|
30539
30545
|
// src/components/Combobox.tsx
|
|
30540
|
-
import { jsx as
|
|
30546
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
30541
30547
|
function Combobox({ items, className, ...props }) {
|
|
30542
|
-
return /* @__PURE__ */
|
|
30543
|
-
/* @__PURE__ */
|
|
30544
|
-
/* @__PURE__ */
|
|
30545
|
-
/* @__PURE__ */
|
|
30548
|
+
return /* @__PURE__ */ jsxs17($d01f2c01039c0eec$export$72b9695b8216309a, { ...props, className: (0, import_classnames21.default)(Combobox_default.combobox, className), children: [
|
|
30549
|
+
/* @__PURE__ */ jsxs17("div", { className: Combobox_default.field, children: [
|
|
30550
|
+
/* @__PURE__ */ jsx31($3985021b0ad6602f$export$f5b8910cec6cf069, { className: Combobox_default.input }),
|
|
30551
|
+
/* @__PURE__ */ jsx31($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: Combobox_default.button, children: /* @__PURE__ */ jsx31(Icon, { rotate: 90, size: "xs", className: Combobox_default.icon, children: /* @__PURE__ */ jsx31(Icons.Chevron, {}) }) })
|
|
30546
30552
|
] }),
|
|
30547
|
-
/* @__PURE__ */
|
|
30553
|
+
/* @__PURE__ */ jsx31(Popover, { children: /* @__PURE__ */ jsx31(List, { items, className: Combobox_default.list, children: items.map((item) => /* @__PURE__ */ jsx31(ListItem2, { textValue: item, children: item }, item)) }) })
|
|
30548
30554
|
] });
|
|
30549
30555
|
}
|
|
30550
30556
|
|
|
@@ -30555,7 +30561,7 @@ var import_classnames22 = __toESM(require_classnames());
|
|
|
30555
30561
|
var Container_default = { "container": "Container_container__OWM4N", "centered": "Container_centered__ZWI4Z", "fluid": "Container_fluid__ZjA3M" };
|
|
30556
30562
|
|
|
30557
30563
|
// src/components/Container.tsx
|
|
30558
|
-
import { jsx as
|
|
30564
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
30559
30565
|
function Container({
|
|
30560
30566
|
isCentered = true,
|
|
30561
30567
|
isFluid,
|
|
@@ -30563,7 +30569,7 @@ function Container({
|
|
|
30563
30569
|
children,
|
|
30564
30570
|
...props
|
|
30565
30571
|
}) {
|
|
30566
|
-
return /* @__PURE__ */
|
|
30572
|
+
return /* @__PURE__ */ jsx32(
|
|
30567
30573
|
Box,
|
|
30568
30574
|
{
|
|
30569
30575
|
...props,
|
|
@@ -30593,9 +30599,9 @@ var import_classnames23 = __toESM(require_classnames());
|
|
|
30593
30599
|
var Label_default = { "label": "Label_label__M2VmO" };
|
|
30594
30600
|
|
|
30595
30601
|
// src/components/Label.tsx
|
|
30596
|
-
import { jsx as
|
|
30602
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
30597
30603
|
function Label({ className, ...props }) {
|
|
30598
|
-
return /* @__PURE__ */
|
|
30604
|
+
return /* @__PURE__ */ jsx33($01b77f81d0f07f68$export$b04be29aa201d4f5, { ...props, className: (0, import_classnames23.default)(Label_default.label, className) });
|
|
30599
30605
|
}
|
|
30600
30606
|
|
|
30601
30607
|
// src/components/CopyButton.tsx
|
|
@@ -30606,7 +30612,7 @@ import { useState as useState8, useRef as useRef7 } from "react";
|
|
|
30606
30612
|
var CopyButton_default = { "icon": "CopyButton_icon__Y2VjO", "copy-button": "CopyButton_copy-button__YmUzZ" };
|
|
30607
30613
|
|
|
30608
30614
|
// src/components/CopyButton.tsx
|
|
30609
|
-
import { jsx as
|
|
30615
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
30610
30616
|
var TIMEOUT = 2e3;
|
|
30611
30617
|
function CopyButton({ value, timeout = TIMEOUT, className, children, ...props }) {
|
|
30612
30618
|
const [copied, setCopied] = useState8(false);
|
|
@@ -30619,7 +30625,7 @@ function CopyButton({ value, timeout = TIMEOUT, className, children, ...props })
|
|
|
30619
30625
|
ref.current = +setTimeout(() => setCopied(false), timeout);
|
|
30620
30626
|
}
|
|
30621
30627
|
};
|
|
30622
|
-
return /* @__PURE__ */
|
|
30628
|
+
return /* @__PURE__ */ jsx34(Icon, { ...props, className: (0, import_classnames24.default)(CopyButton_default.icon, className), onClick: handleCopy, children: copied ? /* @__PURE__ */ jsx34(Icons.Check, {}) : /* @__PURE__ */ jsx34(Icons.Copy, {}) });
|
|
30623
30629
|
}
|
|
30624
30630
|
|
|
30625
30631
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/styles/input.module.css
|
|
@@ -30629,7 +30635,7 @@ var input_default = { "field": "input_field__OWZkN", "row": "input_row__ZmZmO",
|
|
|
30629
30635
|
var TextField_default = { "allowCopy": "TextField_allowCopy__N2FhM", "icon": "TextField_icon__NzRhZ" };
|
|
30630
30636
|
|
|
30631
30637
|
// src/components/TextField.tsx
|
|
30632
|
-
import { jsx as
|
|
30638
|
+
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
30633
30639
|
var TextField = forwardRef5(
|
|
30634
30640
|
({
|
|
30635
30641
|
value,
|
|
@@ -30652,7 +30658,7 @@ var TextField = forwardRef5(
|
|
|
30652
30658
|
useEffect8(() => {
|
|
30653
30659
|
setInputValue(value);
|
|
30654
30660
|
}, [value]);
|
|
30655
|
-
return /* @__PURE__ */
|
|
30661
|
+
return /* @__PURE__ */ jsxs18(
|
|
30656
30662
|
$bcdf0525bf22703d$export$2c73285ae9390cec,
|
|
30657
30663
|
{
|
|
30658
30664
|
...props,
|
|
@@ -30660,9 +30666,9 @@ var TextField = forwardRef5(
|
|
|
30660
30666
|
value: inputValue,
|
|
30661
30667
|
className: (0, import_classnames25.default)(input_default.field, className),
|
|
30662
30668
|
children: [
|
|
30663
|
-
label && /* @__PURE__ */
|
|
30664
|
-
/* @__PURE__ */
|
|
30665
|
-
/* @__PURE__ */
|
|
30669
|
+
label && /* @__PURE__ */ jsx35(Label, { children: label }),
|
|
30670
|
+
/* @__PURE__ */ jsxs18("div", { className: input_default.row, children: [
|
|
30671
|
+
/* @__PURE__ */ jsx35(
|
|
30666
30672
|
Component,
|
|
30667
30673
|
{
|
|
30668
30674
|
className: (0, import_classnames25.default)(TextField_default.input, input_default.input, allowCopy && TextField_default.allowCopy),
|
|
@@ -30671,7 +30677,7 @@ var TextField = forwardRef5(
|
|
|
30671
30677
|
children
|
|
30672
30678
|
}
|
|
30673
30679
|
),
|
|
30674
|
-
allowCopy && /* @__PURE__ */
|
|
30680
|
+
allowCopy && /* @__PURE__ */ jsx35(CopyButton, { className: (0, import_classnames25.default)(TextField_default.icon, input_default.icon), value: inputValue })
|
|
30675
30681
|
] })
|
|
30676
30682
|
]
|
|
30677
30683
|
}
|
|
@@ -30683,7 +30689,7 @@ var TextField = forwardRef5(
|
|
|
30683
30689
|
var ConfirmationDialog_default = { "dialog": "ConfirmationDialog_dialog__MmIxM", "value": "ConfirmationDialog_value__NWExM" };
|
|
30684
30690
|
|
|
30685
30691
|
// src/components/ConfirmationDialog.tsx
|
|
30686
|
-
import { Fragment as Fragment4, jsx as
|
|
30692
|
+
import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
30687
30693
|
function ConfirmationDialog({
|
|
30688
30694
|
value,
|
|
30689
30695
|
confirmMessage,
|
|
@@ -30695,21 +30701,21 @@ function ConfirmationDialog({
|
|
|
30695
30701
|
const handleChange = (e) => {
|
|
30696
30702
|
setCanSave(e.target.value === value);
|
|
30697
30703
|
};
|
|
30698
|
-
return /* @__PURE__ */
|
|
30704
|
+
return /* @__PURE__ */ jsx36(
|
|
30699
30705
|
AlertDialog,
|
|
30700
30706
|
{
|
|
30701
30707
|
...props,
|
|
30702
30708
|
className: (0, import_classnames26.default)(ConfirmationDialog_default.dialog, className),
|
|
30703
30709
|
isConfirmDisabled: !canSave,
|
|
30704
30710
|
children: ({ close }) => {
|
|
30705
|
-
return /* @__PURE__ */
|
|
30711
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
30706
30712
|
typeof children === "function" ? children({ close }) : children,
|
|
30707
|
-
/* @__PURE__ */
|
|
30713
|
+
/* @__PURE__ */ jsxs19(Text, { children: [
|
|
30708
30714
|
confirmMessage || "Type the following value to confirm",
|
|
30709
30715
|
":"
|
|
30710
30716
|
] }),
|
|
30711
|
-
/* @__PURE__ */
|
|
30712
|
-
/* @__PURE__ */
|
|
30717
|
+
/* @__PURE__ */ jsx36("div", { className: ConfirmationDialog_default.value, children: value }),
|
|
30718
|
+
/* @__PURE__ */ jsx36(TextField, { autoFocus: true, "aria-label": "Confirmation", onChange: handleChange })
|
|
30713
30719
|
] });
|
|
30714
30720
|
}
|
|
30715
30721
|
}
|
|
@@ -30727,21 +30733,21 @@ var import_classnames27 = __toESM(require_classnames());
|
|
|
30727
30733
|
var Table_default = { "table": "Table_table__MjBhM", "header": "Table_header__YmVhM", "body": "Table_body__ODA0O", "row": "Table_row__MTk4Z", "column": "Table_column__YjdmZ", "cell": "Table_cell__OTQxZ", "start": "Table_start__YWFkM", "center": "Table_center__ZTFmN", "end": "Table_end__MDEyM" };
|
|
30728
30734
|
|
|
30729
30735
|
// src/components/Table.tsx
|
|
30730
|
-
import { jsx as
|
|
30736
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
30731
30737
|
function Table({ children, className, ...props }) {
|
|
30732
|
-
return /* @__PURE__ */
|
|
30738
|
+
return /* @__PURE__ */ jsx37($1910c06f0ca9905e$export$54ec01a60f47d33d, { ...props, className: (0, import_classnames27.default)(Table_default.table, className), "aria-label": "Table", children });
|
|
30733
30739
|
}
|
|
30734
30740
|
function TableHeader({ children, className, ...props }) {
|
|
30735
|
-
return /* @__PURE__ */
|
|
30741
|
+
return /* @__PURE__ */ jsx37($1910c06f0ca9905e$export$f850895b287ef28e, { ...props, className: (0, import_classnames27.default)(Table_default.header, className), children });
|
|
30736
30742
|
}
|
|
30737
30743
|
function TableBody({ children, className, ...props }) {
|
|
30738
|
-
return /* @__PURE__ */
|
|
30744
|
+
return /* @__PURE__ */ jsx37($1910c06f0ca9905e$export$76ccd210b9029917, { ...props, className: (0, import_classnames27.default)(Table_default.body, className), children });
|
|
30739
30745
|
}
|
|
30740
30746
|
function TableRow({ children, className, ...props }) {
|
|
30741
|
-
return /* @__PURE__ */
|
|
30747
|
+
return /* @__PURE__ */ jsx37($1910c06f0ca9905e$export$b59bdbef9ce70de2, { ...props, className: (0, import_classnames27.default)(Table_default.row, className), children });
|
|
30742
30748
|
}
|
|
30743
30749
|
function TableColumn({ children, className, alignment, ...props }) {
|
|
30744
|
-
return /* @__PURE__ */
|
|
30750
|
+
return /* @__PURE__ */ jsx37(
|
|
30745
30751
|
$1910c06f0ca9905e$export$816b5d811295e6bc,
|
|
30746
30752
|
{
|
|
30747
30753
|
...props,
|
|
@@ -30752,29 +30758,29 @@ function TableColumn({ children, className, alignment, ...props }) {
|
|
|
30752
30758
|
);
|
|
30753
30759
|
}
|
|
30754
30760
|
function TableCell({ children, className, alignment, ...props }) {
|
|
30755
|
-
return /* @__PURE__ */
|
|
30761
|
+
return /* @__PURE__ */ jsx37($1910c06f0ca9905e$export$f6f0c3fe4ec306ea, { ...props, className: (0, import_classnames27.default)(Table_default.cell, className, alignment && Table_default[alignment]), children });
|
|
30756
30762
|
}
|
|
30757
30763
|
|
|
30758
30764
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/DataTable.module.css
|
|
30759
30765
|
var DataTable_default = { "datatable": "DataTable_datatable__Nzg4N", "cell": "DataTable_cell__NjljZ" };
|
|
30760
30766
|
|
|
30761
30767
|
// src/components/DataTable.tsx
|
|
30762
|
-
import { jsx as
|
|
30768
|
+
import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
30763
30769
|
import { createElement as createElement7 } from "react";
|
|
30764
30770
|
function DataTable({ data = [], className, children, ...props }) {
|
|
30765
30771
|
const items = data.length && data?.[0]?.id === void 0 ? data.map((record, id) => ({ ...record, id })) : data;
|
|
30766
30772
|
const columns = Children2.map(children, (child) => {
|
|
30767
30773
|
return { ...child.props };
|
|
30768
30774
|
});
|
|
30769
|
-
return /* @__PURE__ */
|
|
30770
|
-
/* @__PURE__ */
|
|
30775
|
+
return /* @__PURE__ */ jsxs20(Table, { ...props, className: (0, import_classnames28.default)(DataTable_default.datatable, className), children: [
|
|
30776
|
+
/* @__PURE__ */ jsx38(TableHeader, { children: columns.map(({ id, label, as, hidden, ...columnProps }) => {
|
|
30771
30777
|
if (hidden) {
|
|
30772
30778
|
return null;
|
|
30773
30779
|
}
|
|
30774
30780
|
return /* @__PURE__ */ createElement7(TableColumn, { ...columnProps, key: id, id }, label);
|
|
30775
30781
|
}) }),
|
|
30776
|
-
/* @__PURE__ */
|
|
30777
|
-
return /* @__PURE__ */
|
|
30782
|
+
/* @__PURE__ */ jsx38(TableBody, { items, children: (row) => {
|
|
30783
|
+
return /* @__PURE__ */ jsx38(TableRow, { children: columns.map(({ id, as, children: children2, className: className2, ...cellProps }) => {
|
|
30778
30784
|
const value = typeof children2 === "function" ? children2(row, id) : children2 || row[id];
|
|
30779
30785
|
const Component = as || "div";
|
|
30780
30786
|
return /* @__PURE__ */ createElement7(TableCell, { ...cellProps, key: id, className: (0, import_classnames28.default)(DataTable_default.cell, className2) }, as ? createElement6(as, {}, value) : value);
|
|
@@ -30793,18 +30799,18 @@ var import_classnames29 = __toESM(require_classnames());
|
|
|
30793
30799
|
var Dots_default = { "dots": "Dots_dots__ZjYzY", "dot": "Dots_dot__OWM1M", "dots-blink": "Dots_dots-blink__ZTJjM" };
|
|
30794
30800
|
|
|
30795
30801
|
// src/components/Dots.tsx
|
|
30796
|
-
import { jsx as
|
|
30802
|
+
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
30797
30803
|
function Dots({ className, ...props }) {
|
|
30798
|
-
return /* @__PURE__ */
|
|
30799
|
-
/* @__PURE__ */
|
|
30800
|
-
/* @__PURE__ */
|
|
30801
|
-
/* @__PURE__ */
|
|
30804
|
+
return /* @__PURE__ */ jsxs21("div", { ...props, className: (0, import_classnames29.default)(Dots_default.dots, className), children: [
|
|
30805
|
+
/* @__PURE__ */ jsx39("div", { className: Dots_default.dot }),
|
|
30806
|
+
/* @__PURE__ */ jsx39("div", { className: Dots_default.dot }),
|
|
30807
|
+
/* @__PURE__ */ jsx39("div", { className: Dots_default.dot })
|
|
30802
30808
|
] });
|
|
30803
30809
|
}
|
|
30804
30810
|
|
|
30805
30811
|
// src/components/Grid.tsx
|
|
30806
30812
|
var import_classnames30 = __toESM(require_classnames());
|
|
30807
|
-
import { jsx as
|
|
30813
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
30808
30814
|
function Grid({
|
|
30809
30815
|
display = "grid",
|
|
30810
30816
|
justifyContent,
|
|
@@ -30837,7 +30843,7 @@ function Grid({
|
|
|
30837
30843
|
gridTemplateAreas: areas,
|
|
30838
30844
|
gridAutoFlow: autoFlow
|
|
30839
30845
|
});
|
|
30840
|
-
return /* @__PURE__ */
|
|
30846
|
+
return /* @__PURE__ */ jsx40(Box, { ...props, className: (0, import_classnames30.default)(className, classes), style: { ...styleProps, ...style }, children });
|
|
30841
30847
|
}
|
|
30842
30848
|
|
|
30843
30849
|
// src/components/Heading.tsx
|
|
@@ -30847,7 +30853,7 @@ var import_classnames31 = __toESM(require_classnames());
|
|
|
30847
30853
|
var Heading_default = { "heading": "Heading_heading__YjA1Y" };
|
|
30848
30854
|
|
|
30849
30855
|
// src/components/Heading.tsx
|
|
30850
|
-
import { jsx as
|
|
30856
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
30851
30857
|
function Heading({
|
|
30852
30858
|
size = "5",
|
|
30853
30859
|
weight,
|
|
@@ -30864,7 +30870,7 @@ function Heading({
|
|
|
30864
30870
|
fontWeight: weight,
|
|
30865
30871
|
letterSpacing: spacing
|
|
30866
30872
|
});
|
|
30867
|
-
return /* @__PURE__ */
|
|
30873
|
+
return /* @__PURE__ */ jsx41(
|
|
30868
30874
|
Box,
|
|
30869
30875
|
{
|
|
30870
30876
|
...props,
|
|
@@ -30882,7 +30888,7 @@ import { useRef as useRef8, useState as useState11, useEffect as useEffect9 } fr
|
|
|
30882
30888
|
var HoverTrigger_default = { "wrapper": "HoverTrigger_wrapper__ZDFiN" };
|
|
30883
30889
|
|
|
30884
30890
|
// src/components/HoverTrigger.tsx
|
|
30885
|
-
import { Fragment as Fragment5, jsx as
|
|
30891
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
30886
30892
|
var CLOSE_DELAY = 500;
|
|
30887
30893
|
function HoverTrigger({
|
|
30888
30894
|
isOpen,
|
|
@@ -30933,9 +30939,9 @@ function HoverTrigger({
|
|
|
30933
30939
|
}
|
|
30934
30940
|
}, closeDelay);
|
|
30935
30941
|
};
|
|
30936
|
-
return /* @__PURE__ */
|
|
30937
|
-
/* @__PURE__ */
|
|
30938
|
-
/* @__PURE__ */
|
|
30942
|
+
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
30943
|
+
/* @__PURE__ */ jsx42("div", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: triggerElement }),
|
|
30944
|
+
/* @__PURE__ */ jsx42(Popover, { isOpen: open, isNonModal: true, triggerRef, children: /* @__PURE__ */ jsx42(
|
|
30939
30945
|
"div",
|
|
30940
30946
|
{
|
|
30941
30947
|
className: HoverTrigger_default.wrapper,
|
|
@@ -30955,7 +30961,7 @@ import { useState as useState12, useCallback as useCallback2 } from "react";
|
|
|
30955
30961
|
var InlineEditField_default = { "edit": "InlineEditField_edit__NzdlN", "icon": "InlineEditField_icon__OTg4N" };
|
|
30956
30962
|
|
|
30957
30963
|
// src/components/InlineEditField.tsx
|
|
30958
|
-
import { jsx as
|
|
30964
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
30959
30965
|
function InlineEditField({
|
|
30960
30966
|
value: defaultValue = "",
|
|
30961
30967
|
defaultEdit,
|
|
@@ -30990,7 +30996,7 @@ function InlineEditField({
|
|
|
30990
30996
|
handleCancel();
|
|
30991
30997
|
}
|
|
30992
30998
|
};
|
|
30993
|
-
return /* @__PURE__ */
|
|
30999
|
+
return /* @__PURE__ */ jsxs23(
|
|
30994
31000
|
"div",
|
|
30995
31001
|
{
|
|
30996
31002
|
"aria-label": "Edit",
|
|
@@ -30999,8 +31005,8 @@ function InlineEditField({
|
|
|
30999
31005
|
onClick: handleEdit,
|
|
31000
31006
|
children: [
|
|
31001
31007
|
!edit && children,
|
|
31002
|
-
!edit && /* @__PURE__ */
|
|
31003
|
-
edit && /* @__PURE__ */
|
|
31008
|
+
!edit && /* @__PURE__ */ jsx43(Icon, { className: InlineEditField_default.icon, children: /* @__PURE__ */ jsx43(Icons.Edit, {}) }),
|
|
31009
|
+
edit && /* @__PURE__ */ jsx43(
|
|
31004
31010
|
TextField,
|
|
31005
31011
|
{
|
|
31006
31012
|
value,
|
|
@@ -31022,12 +31028,12 @@ var import_classnames33 = __toESM(require_classnames());
|
|
|
31022
31028
|
var Loading_default = { "loading": "Loading_loading__ODhhZ", "page": "Loading_page__NDVmN", "center": "Loading_center__Zjc5M", "inline": "Loading_inline__NTVmN" };
|
|
31023
31029
|
|
|
31024
31030
|
// src/components/Loading.tsx
|
|
31025
|
-
import { jsx as
|
|
31031
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
31026
31032
|
function Loading(props) {
|
|
31027
31033
|
const { size, position = "inline", icon = "spinner", className, ...domProps } = props;
|
|
31028
|
-
return /* @__PURE__ */
|
|
31029
|
-
icon === "dots" && /* @__PURE__ */
|
|
31030
|
-
icon === "spinner" && /* @__PURE__ */
|
|
31034
|
+
return /* @__PURE__ */ jsxs24("div", { ...domProps, className: (0, import_classnames33.default)(Loading_default.loading, className, Loading_default[position]), children: [
|
|
31035
|
+
icon === "dots" && /* @__PURE__ */ jsx44(Dots, {}),
|
|
31036
|
+
icon === "spinner" && /* @__PURE__ */ jsx44(Spinner, { size })
|
|
31031
31037
|
] });
|
|
31032
31038
|
}
|
|
31033
31039
|
|
|
@@ -31041,11 +31047,11 @@ var import_classnames34 = __toESM(require_classnames());
|
|
|
31041
31047
|
var MenuItem_default = { "item": "MenuItem_item__MjliN", "check": "MenuItem_check__OWE5Y" };
|
|
31042
31048
|
|
|
31043
31049
|
// src/components/MenuItem.tsx
|
|
31044
|
-
import { jsx as
|
|
31050
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
31045
31051
|
function MenuItem2({ children, className, ...props }) {
|
|
31046
|
-
return /* @__PURE__ */
|
|
31052
|
+
return /* @__PURE__ */ jsxs25($3674c52c6b3c5bce$export$2ce376c2cc3355c8, { ...props, className: (0, import_classnames34.default)(MenuItem_default.item, className), children: [
|
|
31047
31053
|
children,
|
|
31048
|
-
/* @__PURE__ */
|
|
31054
|
+
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx45(Icon, { className: MenuItem_default.check, children: /* @__PURE__ */ jsx45(Icons.Check, {}) }) })
|
|
31049
31055
|
] });
|
|
31050
31056
|
}
|
|
31051
31057
|
|
|
@@ -31053,13 +31059,13 @@ function MenuItem2({ children, className, ...props }) {
|
|
|
31053
31059
|
var Menu_default = { "menu": "Menu_menu__ZmM3M", "separator": "Menu_separator__NDRhY" };
|
|
31054
31060
|
|
|
31055
31061
|
// src/components/Menu.tsx
|
|
31056
|
-
import { jsx as
|
|
31062
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
31057
31063
|
function Menu({ items, className, children, ...props }) {
|
|
31058
|
-
return /* @__PURE__ */
|
|
31064
|
+
return /* @__PURE__ */ jsx46($3674c52c6b3c5bce$export$d9b273488cd8ce6f, { ...props, className: (0, import_classnames35.default)(Menu_default.menu, className), children: children || items?.map((item, index) => {
|
|
31059
31065
|
if (item === null) {
|
|
31060
|
-
return /* @__PURE__ */
|
|
31066
|
+
return /* @__PURE__ */ jsx46($431f98aba6844401$export$1ff3c3f08ae963c0, { className: Menu_default.separator }, index);
|
|
31061
31067
|
}
|
|
31062
|
-
return /* @__PURE__ */
|
|
31068
|
+
return /* @__PURE__ */ jsx46(MenuItem2, { id: item, children: item }, index);
|
|
31063
31069
|
}) });
|
|
31064
31070
|
}
|
|
31065
31071
|
|
|
@@ -31070,9 +31076,9 @@ var import_classnames36 = __toESM(require_classnames());
|
|
|
31070
31076
|
var Modal_default = { "overlay": "Modal_overlay__NDQ5M", "modal-fade": "Modal_modal-fade__ZWUyZ", "modal": "Modal_modal__ZmIxM", "modal-zoom": "Modal_modal-zoom__MDZmY" };
|
|
31071
31077
|
|
|
31072
31078
|
// src/components/Modal.tsx
|
|
31073
|
-
import { jsx as
|
|
31079
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
31074
31080
|
function Modal({ children, className, ...props }) {
|
|
31075
|
-
return /* @__PURE__ */
|
|
31081
|
+
return /* @__PURE__ */ jsx47($f3f84453ead64de5$export$8948f78d83984c69, { ...props, className: Modal_default.overlay, children: /* @__PURE__ */ jsx47(
|
|
31076
31082
|
$f3f84453ead64de5$export$2b77a92f1a5ad772,
|
|
31077
31083
|
{
|
|
31078
31084
|
className: (0, import_classnames36.default)(Modal_default.modal, className),
|
|
@@ -31098,14 +31104,14 @@ var useNavigationMenu = store3;
|
|
|
31098
31104
|
var NavigationMenu_default = { "nav": "NavigationMenu_nav__MzRiY", "item": "NavigationMenu_item__YTI0N", "icon": "NavigationMenu_icon__ZDczY" };
|
|
31099
31105
|
|
|
31100
31106
|
// src/components/NavigationMenu.tsx
|
|
31101
|
-
import { jsx as
|
|
31107
|
+
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
31102
31108
|
function NavigationMenu({
|
|
31103
31109
|
showArrow = true,
|
|
31104
31110
|
className,
|
|
31105
31111
|
children,
|
|
31106
31112
|
...props
|
|
31107
31113
|
}) {
|
|
31108
|
-
return /* @__PURE__ */
|
|
31114
|
+
return /* @__PURE__ */ jsx48("div", { ...props, className: (0, import_classnames37.default)(NavigationMenu_default.nav, className), children });
|
|
31109
31115
|
}
|
|
31110
31116
|
function NavigationMenuItem({
|
|
31111
31117
|
label,
|
|
@@ -31115,15 +31121,15 @@ function NavigationMenuItem({
|
|
|
31115
31121
|
}) {
|
|
31116
31122
|
const { activeMenu } = useNavigationMenu();
|
|
31117
31123
|
if (label) {
|
|
31118
|
-
return /* @__PURE__ */
|
|
31119
|
-
/* @__PURE__ */
|
|
31120
|
-
/* @__PURE__ */
|
|
31121
|
-
/* @__PURE__ */
|
|
31124
|
+
return /* @__PURE__ */ jsxs26(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
|
|
31125
|
+
/* @__PURE__ */ jsxs26("div", { ...props, className: (0, import_classnames37.default)(NavigationMenu_default.item, className), children: [
|
|
31126
|
+
/* @__PURE__ */ jsx48(Text, { children: label }),
|
|
31127
|
+
/* @__PURE__ */ jsx48(Icon, { rotate: 90, size: "xs", className: NavigationMenu_default.icon, children: /* @__PURE__ */ jsx48(Icons.Chevron, {}) })
|
|
31122
31128
|
] }),
|
|
31123
31129
|
children
|
|
31124
31130
|
] });
|
|
31125
31131
|
}
|
|
31126
|
-
return /* @__PURE__ */
|
|
31132
|
+
return /* @__PURE__ */ jsx48("div", { ...props, className: (0, import_classnames37.default)(NavigationMenu_default.item, className), children });
|
|
31127
31133
|
}
|
|
31128
31134
|
|
|
31129
31135
|
// src/components/PasswordField.tsx
|
|
@@ -31134,17 +31140,17 @@ var import_classnames38 = __toESM(require_classnames());
|
|
|
31134
31140
|
var PasswordField_default = { "icon": "PasswordField_icon__NDMyZ" };
|
|
31135
31141
|
|
|
31136
31142
|
// src/components/PasswordField.tsx
|
|
31137
|
-
import { jsx as
|
|
31143
|
+
import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
31138
31144
|
var PasswordField = forwardRef6(
|
|
31139
31145
|
({ label, className, ...props }, ref) => {
|
|
31140
31146
|
const [show, setShow] = useState13(false);
|
|
31141
31147
|
const type = show ? "text" : "password";
|
|
31142
31148
|
const handleShowPassword = () => setShow((state) => !state);
|
|
31143
|
-
return /* @__PURE__ */
|
|
31144
|
-
label && /* @__PURE__ */
|
|
31145
|
-
/* @__PURE__ */
|
|
31146
|
-
/* @__PURE__ */
|
|
31147
|
-
/* @__PURE__ */
|
|
31149
|
+
return /* @__PURE__ */ jsxs27($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, ref, className: (0, import_classnames38.default)(input_default.field, className), children: [
|
|
31150
|
+
label && /* @__PURE__ */ jsx49(Label, { children: label }),
|
|
31151
|
+
/* @__PURE__ */ jsxs27("div", { className: input_default.row, children: [
|
|
31152
|
+
/* @__PURE__ */ jsx49($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: input_default.input }),
|
|
31153
|
+
/* @__PURE__ */ jsx49(Icon, { onClick: handleShowPassword, className: (0, import_classnames38.default)(PasswordField_default.icon, input_default.icon), children: show ? /* @__PURE__ */ jsx49(Icons.EyeSlash, {}) : /* @__PURE__ */ jsx49(Icons.Eye, {}) })
|
|
31148
31154
|
] })
|
|
31149
31155
|
] });
|
|
31150
31156
|
}
|
|
@@ -31157,12 +31163,12 @@ var import_classnames39 = __toESM(require_classnames());
|
|
|
31157
31163
|
var ProgressBar_default = { "progressbar": "ProgressBar_progressbar__MTQwN", "track": "ProgressBar_track__YTM0O", "fill": "ProgressBar_fill__ZTkyN", "value": "ProgressBar_value__YTU3N" };
|
|
31158
31164
|
|
|
31159
31165
|
// src/components/ProgressBar.tsx
|
|
31160
|
-
import { Fragment as Fragment6, jsx as
|
|
31166
|
+
import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
31161
31167
|
function ProgressBar({ className, showValue, ...props }) {
|
|
31162
|
-
return /* @__PURE__ */
|
|
31163
|
-
return /* @__PURE__ */
|
|
31164
|
-
/* @__PURE__ */
|
|
31165
|
-
showValue && /* @__PURE__ */
|
|
31168
|
+
return /* @__PURE__ */ jsx50($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames39.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
|
|
31169
|
+
return /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
31170
|
+
/* @__PURE__ */ jsx50("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ jsx50("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
|
|
31171
|
+
showValue && /* @__PURE__ */ jsx50("div", { className: ProgressBar_default.value, children: valueText })
|
|
31166
31172
|
] });
|
|
31167
31173
|
} });
|
|
31168
31174
|
}
|
|
@@ -31174,16 +31180,16 @@ var import_classnames40 = __toESM(require_classnames());
|
|
|
31174
31180
|
var ProgressCircle_default = { "progresscircle": "ProgressCircle_progresscircle__NTQ3N", "track": "ProgressCircle_track__Mjk3Y", "fill": "ProgressCircle_fill__OWJlY", "value": "ProgressCircle_value__NzQ5Y" };
|
|
31175
31181
|
|
|
31176
31182
|
// src/components/ProgressCircle.tsx
|
|
31177
|
-
import { Fragment as Fragment7, jsx as
|
|
31183
|
+
import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
31178
31184
|
function ProgressCircle({ className, showValue, ...props }) {
|
|
31179
|
-
return /* @__PURE__ */
|
|
31185
|
+
return /* @__PURE__ */ jsx51($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames40.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
|
|
31180
31186
|
const radius = 45;
|
|
31181
31187
|
const circumference = radius * 2 * Math.PI;
|
|
31182
31188
|
const offset = circumference - percentage / 100 * circumference;
|
|
31183
|
-
return /* @__PURE__ */
|
|
31184
|
-
/* @__PURE__ */
|
|
31185
|
-
/* @__PURE__ */
|
|
31186
|
-
/* @__PURE__ */
|
|
31189
|
+
return /* @__PURE__ */ jsxs29(Fragment7, { children: [
|
|
31190
|
+
/* @__PURE__ */ jsxs29("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
31191
|
+
/* @__PURE__ */ jsx51("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
|
|
31192
|
+
/* @__PURE__ */ jsx51(
|
|
31187
31193
|
"circle",
|
|
31188
31194
|
{
|
|
31189
31195
|
className: ProgressCircle_default.fill,
|
|
@@ -31195,7 +31201,7 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
31195
31201
|
}
|
|
31196
31202
|
)
|
|
31197
31203
|
] }),
|
|
31198
|
-
showValue && /* @__PURE__ */
|
|
31204
|
+
showValue && /* @__PURE__ */ jsx51("label", { className: ProgressCircle_default.value, children: valueText })
|
|
31199
31205
|
] });
|
|
31200
31206
|
} });
|
|
31201
31207
|
}
|
|
@@ -31208,17 +31214,17 @@ var import_classnames41 = __toESM(require_classnames());
|
|
|
31208
31214
|
var RadioGroup_default = { "radiogroup": "RadioGroup_radiogroup__M2FmO", "radio": "RadioGroup_radio__NjdlY" };
|
|
31209
31215
|
|
|
31210
31216
|
// src/components/RadioGroup.tsx
|
|
31211
|
-
import { jsx as
|
|
31217
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
31212
31218
|
var RadioGroup = forwardRef7(
|
|
31213
31219
|
({ label, children, className, ...props }, ref) => {
|
|
31214
|
-
return /* @__PURE__ */
|
|
31215
|
-
label && /* @__PURE__ */
|
|
31220
|
+
return /* @__PURE__ */ jsxs30($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames41.default)(RadioGroup_default.radiogroup, className), children: [
|
|
31221
|
+
label && /* @__PURE__ */ jsx52(Label, { children: label }),
|
|
31216
31222
|
children
|
|
31217
31223
|
] });
|
|
31218
31224
|
}
|
|
31219
31225
|
);
|
|
31220
31226
|
function Radio({ children, className, ...props }) {
|
|
31221
|
-
return /* @__PURE__ */
|
|
31227
|
+
return /* @__PURE__ */ jsx52($b6c3ddc6086f204d$export$d7b12c4107be0d61, { ...props, className: (0, import_classnames41.default)(RadioGroup_default.radio, className), children });
|
|
31222
31228
|
}
|
|
31223
31229
|
|
|
31224
31230
|
// src/components/SearchField.tsx
|
|
@@ -31229,7 +31235,7 @@ var import_classnames42 = __toESM(require_classnames());
|
|
|
31229
31235
|
var SearchField_default = { "search": "SearchField_search__MmNlZ", "input": "SearchField_input__NTAwN", "close": "SearchField_close__NzZiM" };
|
|
31230
31236
|
|
|
31231
31237
|
// src/components/SearchField.tsx
|
|
31232
|
-
import { Fragment as Fragment8, jsx as
|
|
31238
|
+
import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
31233
31239
|
var SearchField = forwardRef8(
|
|
31234
31240
|
({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
|
|
31235
31241
|
const [search, setSearch] = useState14(value ?? "");
|
|
@@ -31250,24 +31256,24 @@ var SearchField = forwardRef8(
|
|
|
31250
31256
|
onSearch?.(searchValue);
|
|
31251
31257
|
}
|
|
31252
31258
|
}, [searchValue, delay, onSearch]);
|
|
31253
|
-
return /* @__PURE__ */
|
|
31254
|
-
return /* @__PURE__ */
|
|
31255
|
-
label && /* @__PURE__ */
|
|
31256
|
-
/* @__PURE__ */
|
|
31257
|
-
/* @__PURE__ */
|
|
31258
|
-
/* @__PURE__ */
|
|
31259
|
+
return /* @__PURE__ */ jsx53($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames42.default)(input_default.field, className), children: ({ state }) => {
|
|
31260
|
+
return /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
31261
|
+
label && /* @__PURE__ */ jsx53(Label, { children: label }),
|
|
31262
|
+
/* @__PURE__ */ jsxs31("div", { className: input_default.row, children: [
|
|
31263
|
+
/* @__PURE__ */ jsx53(Icons.MagnifyingGlass, { className: (0, import_classnames42.default)(SearchField_default.search, input_default.icon) }),
|
|
31264
|
+
/* @__PURE__ */ jsx53(
|
|
31259
31265
|
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
31260
31266
|
{
|
|
31261
31267
|
className: (0, import_classnames42.default)(SearchField_default.input, input_default.input),
|
|
31262
31268
|
onChange: handleChange
|
|
31263
31269
|
}
|
|
31264
31270
|
),
|
|
31265
|
-
state.value && /* @__PURE__ */
|
|
31271
|
+
state.value && /* @__PURE__ */ jsx53(
|
|
31266
31272
|
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
31267
31273
|
{
|
|
31268
31274
|
className: (0, import_classnames42.default)(SearchField_default.close, input_default.icon),
|
|
31269
31275
|
onPress: resetSearch,
|
|
31270
|
-
children: /* @__PURE__ */
|
|
31276
|
+
children: /* @__PURE__ */ jsx53(Icon, { children: /* @__PURE__ */ jsx53(Icons.Close, {}) })
|
|
31271
31277
|
}
|
|
31272
31278
|
)
|
|
31273
31279
|
] })
|
|
@@ -31284,7 +31290,7 @@ import { forwardRef as forwardRef9 } from "react";
|
|
|
31284
31290
|
var Select_default = { "button": "Select_button__YTM3Z", "list": "Select_list__MjJiN", "icon": "Select_icon__NzlhY" };
|
|
31285
31291
|
|
|
31286
31292
|
// src/components/Select.tsx
|
|
31287
|
-
import { jsx as
|
|
31293
|
+
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
31288
31294
|
var Select = forwardRef9(
|
|
31289
31295
|
({
|
|
31290
31296
|
children,
|
|
@@ -31300,7 +31306,7 @@ var Select = forwardRef9(
|
|
|
31300
31306
|
onSelectionChange?.(e);
|
|
31301
31307
|
onChange?.(e);
|
|
31302
31308
|
};
|
|
31303
|
-
return /* @__PURE__ */
|
|
31309
|
+
return /* @__PURE__ */ jsxs32(
|
|
31304
31310
|
$82d7e5349645de74$export$ef9b1a59e592288f,
|
|
31305
31311
|
{
|
|
31306
31312
|
...props,
|
|
@@ -31308,12 +31314,12 @@ var Select = forwardRef9(
|
|
|
31308
31314
|
className: (0, import_classnames43.default)(input_default.field, className),
|
|
31309
31315
|
onSelectionChange: handleChange,
|
|
31310
31316
|
children: [
|
|
31311
|
-
label && /* @__PURE__ */
|
|
31312
|
-
/* @__PURE__ */
|
|
31313
|
-
/* @__PURE__ */
|
|
31314
|
-
/* @__PURE__ */
|
|
31317
|
+
label && /* @__PURE__ */ jsx54(Label, { children: label }),
|
|
31318
|
+
/* @__PURE__ */ jsx54($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: (0, import_classnames43.default)(input_default.input, className), children: /* @__PURE__ */ jsxs32(Row, { justifyContent: "space-between", gap: "3", children: [
|
|
31319
|
+
/* @__PURE__ */ jsx54($82d7e5349645de74$export$e288731fd71264f0, {}),
|
|
31320
|
+
/* @__PURE__ */ jsx54("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx54(Icon, { rotate: 90, size: "xs", className: input_default.icon, children: /* @__PURE__ */ jsx54(Icons.Chevron, {}) }) })
|
|
31315
31321
|
] }) }),
|
|
31316
|
-
/* @__PURE__ */
|
|
31322
|
+
/* @__PURE__ */ jsx54(Popover, { children: /* @__PURE__ */ jsx54(List, { items, className: Select_default.list, children }) })
|
|
31317
31323
|
]
|
|
31318
31324
|
}
|
|
31319
31325
|
);
|
|
@@ -31328,18 +31334,18 @@ var import_classnames44 = __toESM(require_classnames());
|
|
|
31328
31334
|
var Slider_default = { "slider": "Slider_slider__ODQ1M", "header": "Slider_header__NmYzN", "track": "Slider_track__Y2M4O", "fill": "Slider_fill__MWM4N", "thumb": "Slider_thumb__NGU2Z" };
|
|
31329
31335
|
|
|
31330
31336
|
// src/components/Slider.tsx
|
|
31331
|
-
import { Fragment as Fragment9, jsx as
|
|
31337
|
+
import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
31332
31338
|
var Slider = forwardRef10(
|
|
31333
31339
|
({ className, showValue = true, label, ...props }, ref) => {
|
|
31334
|
-
return /* @__PURE__ */
|
|
31335
|
-
/* @__PURE__ */
|
|
31336
|
-
label && /* @__PURE__ */
|
|
31337
|
-
showValue && /* @__PURE__ */
|
|
31340
|
+
return /* @__PURE__ */ jsxs33($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames44.default)(Slider_default.slider, className), children: [
|
|
31341
|
+
/* @__PURE__ */ jsxs33("div", { className: Slider_default.header, children: [
|
|
31342
|
+
label && /* @__PURE__ */ jsx55(Label, { className: Slider_default.label, children: label }),
|
|
31343
|
+
showValue && /* @__PURE__ */ jsx55($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output })
|
|
31338
31344
|
] }),
|
|
31339
|
-
/* @__PURE__ */
|
|
31345
|
+
/* @__PURE__ */ jsx55($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
|
|
31340
31346
|
const isHorizontal = state.orientation === "horizontal";
|
|
31341
|
-
return /* @__PURE__ */
|
|
31342
|
-
/* @__PURE__ */
|
|
31347
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
31348
|
+
/* @__PURE__ */ jsx55(
|
|
31343
31349
|
"div",
|
|
31344
31350
|
{
|
|
31345
31351
|
className: Slider_default.fill,
|
|
@@ -31348,7 +31354,7 @@ var Slider = forwardRef10(
|
|
|
31348
31354
|
}
|
|
31349
31355
|
}
|
|
31350
31356
|
),
|
|
31351
|
-
/* @__PURE__ */
|
|
31357
|
+
/* @__PURE__ */ jsx55($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
|
|
31352
31358
|
] });
|
|
31353
31359
|
} })
|
|
31354
31360
|
] });
|
|
@@ -31362,11 +31368,11 @@ var import_classnames45 = __toESM(require_classnames());
|
|
|
31362
31368
|
var StatusLight_default = { "statuslight": "StatusLight_statuslight__NGIzM", "status": "StatusLight_status__NjQ5O", "bg": "StatusLight_bg__MDIxM", "success": "StatusLight_success__NGRjZ", "warning": "StatusLight_warning__MTFhZ", "error": "StatusLight_error__NzBjO", "active": "StatusLight_active__YTJhM", "inactive": "StatusLight_inactive__ZDZmN" };
|
|
31363
31369
|
|
|
31364
31370
|
// src/components/StatusLight.tsx
|
|
31365
|
-
import { jsx as
|
|
31371
|
+
import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
31366
31372
|
function StatusLight(props) {
|
|
31367
31373
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
31368
|
-
return /* @__PURE__ */
|
|
31369
|
-
/* @__PURE__ */
|
|
31374
|
+
return /* @__PURE__ */ jsxs34("div", { ...domProps, className: (0, import_classnames45.default)(StatusLight_default.statuslight, className), children: [
|
|
31375
|
+
/* @__PURE__ */ jsx56("div", { className: StatusLight_default.bg, children: /* @__PURE__ */ jsx56(
|
|
31370
31376
|
"div",
|
|
31371
31377
|
{
|
|
31372
31378
|
className: (0, import_classnames45.default)(StatusLight_default.status, StatusLight_default[variant]),
|
|
@@ -31385,13 +31391,13 @@ var import_classnames46 = __toESM(require_classnames());
|
|
|
31385
31391
|
var Switch_default = { "switch": "Switch_switch__YzA5O", "track": "Switch_track__MTM0M", "knob": "Switch_knob__OWM5N" };
|
|
31386
31392
|
|
|
31387
31393
|
// src/components/Switch.tsx
|
|
31388
|
-
import { Fragment as Fragment10, jsx as
|
|
31394
|
+
import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
31389
31395
|
var Switch = forwardRef11(
|
|
31390
31396
|
({ label, children, className, ...props }, ref) => {
|
|
31391
31397
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
31392
|
-
return /* @__PURE__ */
|
|
31393
|
-
label && /* @__PURE__ */
|
|
31394
|
-
/* @__PURE__ */
|
|
31398
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
31399
|
+
label && /* @__PURE__ */ jsx57(Label, { children: label }),
|
|
31400
|
+
/* @__PURE__ */ jsxs35(
|
|
31395
31401
|
$8e59e948500a8fe1$export$b5d5cf8927ab7262,
|
|
31396
31402
|
{
|
|
31397
31403
|
...props,
|
|
@@ -31399,7 +31405,7 @@ var Switch = forwardRef11(
|
|
|
31399
31405
|
ref,
|
|
31400
31406
|
className: (0, import_classnames46.default)(Switch_default.switch, className),
|
|
31401
31407
|
children: [
|
|
31402
|
-
/* @__PURE__ */
|
|
31408
|
+
/* @__PURE__ */ jsx57("div", { className: Switch_default.track, children: /* @__PURE__ */ jsx57("div", { className: Switch_default.knob }) }),
|
|
31403
31409
|
children
|
|
31404
31410
|
]
|
|
31405
31411
|
}
|
|
@@ -31412,18 +31418,18 @@ var Switch = forwardRef11(
|
|
|
31412
31418
|
var Tabs_default = { "tabs": "Tabs_tabs__ZmM4Z", "list": "Tabs_list__MGM4O", "quiet": "Tabs_quiet__YmI3N", "tab": "Tabs_tab__NWEyN" };
|
|
31413
31419
|
|
|
31414
31420
|
// src/components/Tabs.tsx
|
|
31415
|
-
import { jsx as
|
|
31421
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
31416
31422
|
function Tabs({ children, ...props }) {
|
|
31417
|
-
return /* @__PURE__ */
|
|
31423
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$b2539bed5023c21c, { ...props, className: Tabs_default.tabs, children });
|
|
31418
31424
|
}
|
|
31419
31425
|
function TabList({ children, ...props }) {
|
|
31420
|
-
return /* @__PURE__ */
|
|
31426
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$e51a686c67fdaa2d, { ...props, className: Tabs_default.list, children });
|
|
31421
31427
|
}
|
|
31422
31428
|
function Tab({ children, ...props }) {
|
|
31423
|
-
return /* @__PURE__ */
|
|
31429
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$3e41faf802a29e71, { ...props, className: Tabs_default.tab, children });
|
|
31424
31430
|
}
|
|
31425
31431
|
function TabPanel({ children, ...props }) {
|
|
31426
|
-
return /* @__PURE__ */
|
|
31432
|
+
return /* @__PURE__ */ jsx58($5e8ad37a45e1c704$export$3d96ec278d3efce4, { ...props, className: Tabs_default.panel, children });
|
|
31427
31433
|
}
|
|
31428
31434
|
|
|
31429
31435
|
// src/components/TextArea.tsx
|
|
@@ -31434,43 +31440,86 @@ import { forwardRef as forwardRef12 } from "react";
|
|
|
31434
31440
|
var TextArea_default = { "textarea": "TextArea_textarea__YzRiM", "resize-none": "TextArea_resize-none__ZTljZ", "resize-horizontal": "TextArea_resize-horizontal__NzgyN", "resize-vertical": "TextArea_resize-vertical__MTIxZ" };
|
|
31435
31441
|
|
|
31436
31442
|
// src/components/TextArea.tsx
|
|
31437
|
-
import { jsx as
|
|
31443
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
31438
31444
|
var TextArea = forwardRef12(
|
|
31439
31445
|
({ rows, cols, resize, className, style, children, ...props }, ref) => {
|
|
31440
|
-
return /* @__PURE__ */
|
|
31446
|
+
return /* @__PURE__ */ jsx59(
|
|
31441
31447
|
TextField,
|
|
31442
31448
|
{
|
|
31443
31449
|
...props,
|
|
31444
31450
|
ref,
|
|
31445
31451
|
className: (0, import_classnames47.default)(resize && TextArea_default[`resize-${resize}`]),
|
|
31446
31452
|
asChild: true,
|
|
31447
|
-
children: /* @__PURE__ */
|
|
31453
|
+
children: /* @__PURE__ */ jsx59($216918bed6669f72$export$f5c9f3c2c4054eec, { rows, cols, style: { ...style }, children })
|
|
31448
31454
|
}
|
|
31449
31455
|
);
|
|
31450
31456
|
}
|
|
31451
31457
|
);
|
|
31452
31458
|
|
|
31459
|
+
// src/components/ThemeButton.tsx
|
|
31460
|
+
var import_classnames48 = __toESM(require_classnames());
|
|
31461
|
+
|
|
31462
|
+
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/ThemeButton.module.css
|
|
31463
|
+
var ThemeButton_default = { "button": "ThemeButton_button__OWVmZ" };
|
|
31464
|
+
|
|
31465
|
+
// src/components/ThemeButton.tsx
|
|
31466
|
+
import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
31467
|
+
function ThemeButton({ className, variant = "quiet", ...props }) {
|
|
31468
|
+
const { theme, setTheme: setTheme2 } = useTheme();
|
|
31469
|
+
const transitions = useTransition(theme, {
|
|
31470
|
+
initial: { opacity: 1 },
|
|
31471
|
+
from: {
|
|
31472
|
+
opacity: 0,
|
|
31473
|
+
transform: `translateY(${theme === "light" ? "20px" : "-20px"}) scale(0.5)`
|
|
31474
|
+
},
|
|
31475
|
+
enter: { opacity: 1, transform: "translateY(0px) scale(1.0)" },
|
|
31476
|
+
leave: {
|
|
31477
|
+
opacity: 0,
|
|
31478
|
+
transform: `translateY(${theme === "light" ? "-20px" : "20px"}) scale(0.5)`
|
|
31479
|
+
}
|
|
31480
|
+
});
|
|
31481
|
+
function handleClick() {
|
|
31482
|
+
setTheme2(theme === "light" ? "dark" : "light");
|
|
31483
|
+
}
|
|
31484
|
+
return /* @__PURE__ */ jsxs36(
|
|
31485
|
+
Button,
|
|
31486
|
+
{
|
|
31487
|
+
...props,
|
|
31488
|
+
className: (0, import_classnames48.default)(ThemeButton_default.button, className),
|
|
31489
|
+
variant,
|
|
31490
|
+
onPress: handleClick,
|
|
31491
|
+
children: [
|
|
31492
|
+
transitions((style, item) => (
|
|
31493
|
+
// @ts-ignore
|
|
31494
|
+
/* @__PURE__ */ jsx60(animated.div, { style, children: /* @__PURE__ */ jsx60(Icon, { size: "sm", children: item === "light" ? /* @__PURE__ */ jsx60(Icons.Sun, {}) : /* @__PURE__ */ jsx60(Icons.Moon, {}) }) }, item)
|
|
31495
|
+
)),
|
|
31496
|
+
"\xA0"
|
|
31497
|
+
]
|
|
31498
|
+
}
|
|
31499
|
+
);
|
|
31500
|
+
}
|
|
31501
|
+
|
|
31453
31502
|
// src/components/Toggle.tsx
|
|
31454
31503
|
import { forwardRef as forwardRef13 } from "react";
|
|
31455
|
-
var
|
|
31504
|
+
var import_classnames49 = __toESM(require_classnames());
|
|
31456
31505
|
|
|
31457
31506
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/Toggle.module.css
|
|
31458
31507
|
var Toggle_default = { "toggle": "Toggle_toggle__NGNlM" };
|
|
31459
31508
|
|
|
31460
31509
|
// src/components/Toggle.tsx
|
|
31461
|
-
import { Fragment as Fragment11, jsx as
|
|
31510
|
+
import { Fragment as Fragment11, jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
31462
31511
|
var Toggle = forwardRef13(
|
|
31463
31512
|
({ label, children, className, ...props }, ref) => {
|
|
31464
31513
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
31465
|
-
return /* @__PURE__ */
|
|
31466
|
-
label && /* @__PURE__ */
|
|
31467
|
-
/* @__PURE__ */
|
|
31514
|
+
return /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
31515
|
+
label && /* @__PURE__ */ jsx61(Label, { children: label }),
|
|
31516
|
+
/* @__PURE__ */ jsx61(
|
|
31468
31517
|
$efde0372d7a700fe$export$d2b052e7b4be1756,
|
|
31469
31518
|
{
|
|
31470
31519
|
...props,
|
|
31471
31520
|
ref,
|
|
31472
31521
|
isSelected,
|
|
31473
|
-
className: (0,
|
|
31522
|
+
className: (0, import_classnames49.default)(Toggle_default.toggle, className),
|
|
31474
31523
|
children
|
|
31475
31524
|
}
|
|
31476
31525
|
)
|
|
@@ -31479,43 +31528,43 @@ var Toggle = forwardRef13(
|
|
|
31479
31528
|
);
|
|
31480
31529
|
|
|
31481
31530
|
// src/components/ToggleGroup.tsx
|
|
31482
|
-
var
|
|
31531
|
+
var import_classnames50 = __toESM(require_classnames());
|
|
31483
31532
|
|
|
31484
31533
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/ToggleGroup.module.css
|
|
31485
31534
|
var ToggleGroup_default = { "group": "ToggleGroup_group__NDAzY", "list": "ToggleGroup_list__ZDEwO", "item": "ToggleGroup_item__N2ZmN" };
|
|
31486
31535
|
|
|
31487
31536
|
// src/components/ToggleGroup.tsx
|
|
31488
|
-
import { jsx as
|
|
31537
|
+
import { jsx as jsx62, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
31489
31538
|
function ToggleGroup({ label, className, children, ...props }) {
|
|
31490
|
-
return /* @__PURE__ */
|
|
31491
|
-
label && /* @__PURE__ */
|
|
31492
|
-
/* @__PURE__ */
|
|
31539
|
+
return /* @__PURE__ */ jsxs38($eaf9e70818b436db$export$67ea30858aaf75e3, { ...props, className: (0, import_classnames50.default)(ToggleGroup_default.group, className), selectionBehavior: "toggle", children: [
|
|
31540
|
+
label && /* @__PURE__ */ jsx62(Label, { children: label }),
|
|
31541
|
+
/* @__PURE__ */ jsx62($eaf9e70818b436db$export$f9fef0f55402315b, { className: ToggleGroup_default.list, children })
|
|
31493
31542
|
] });
|
|
31494
31543
|
}
|
|
31495
31544
|
function ToggleGroupItem({ className, children, ...props }) {
|
|
31496
|
-
return /* @__PURE__ */
|
|
31545
|
+
return /* @__PURE__ */ jsx62($eaf9e70818b436db$export$3288d34c523a1192, { ...props, className: (0, import_classnames50.default)(ToggleGroup_default.item, className), children });
|
|
31497
31546
|
}
|
|
31498
31547
|
|
|
31499
31548
|
// src/components/Tooltip.tsx
|
|
31500
|
-
var
|
|
31549
|
+
var import_classnames51 = __toESM(require_classnames());
|
|
31501
31550
|
|
|
31502
31551
|
// css-modules:/Users/mikecao/Development/umami-software/react-zen/src/components/Tooltip.module.css
|
|
31503
31552
|
var Tooltip_default = { "tooltip": "Tooltip_tooltip__Y2Y2N", "arrow": "Tooltip_arrow__NzgwN", "slide": "Tooltip_slide__ODJjZ" };
|
|
31504
31553
|
|
|
31505
31554
|
// src/components/Tooltip.tsx
|
|
31506
|
-
import { jsx as
|
|
31555
|
+
import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
31507
31556
|
function Tooltip({ children, className, ...props }) {
|
|
31508
|
-
return /* @__PURE__ */
|
|
31509
|
-
/* @__PURE__ */
|
|
31557
|
+
return /* @__PURE__ */ jsxs39($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: (0, import_classnames51.default)(Tooltip_default.tooltip, className), children: [
|
|
31558
|
+
/* @__PURE__ */ jsx63($44f671af83e7d9e0$export$746d02f47f4d381, { className: Tooltip_default.arrow, children: /* @__PURE__ */ jsx63("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx63("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
31510
31559
|
children
|
|
31511
31560
|
] });
|
|
31512
31561
|
}
|
|
31513
31562
|
|
|
31514
31563
|
// src/components/ZenProvider.tsx
|
|
31515
|
-
import { jsx as
|
|
31564
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
31516
31565
|
function ZenProvider({ children, ...props }) {
|
|
31517
31566
|
const { toast } = props;
|
|
31518
|
-
return /* @__PURE__ */
|
|
31567
|
+
return /* @__PURE__ */ jsx64(ToastProvider, { ...toast, children });
|
|
31519
31568
|
}
|
|
31520
31569
|
export {
|
|
31521
31570
|
Accordion,
|
|
@@ -31592,6 +31641,7 @@ export {
|
|
|
31592
31641
|
Text,
|
|
31593
31642
|
TextArea,
|
|
31594
31643
|
TextField,
|
|
31644
|
+
ThemeButton,
|
|
31595
31645
|
Toast,
|
|
31596
31646
|
ToastProvider,
|
|
31597
31647
|
Toaster,
|