@umami/react-zen 0.131.0 → 0.133.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/dist/index.css +8 -8
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +122 -116
- package/dist/index.mjs +111 -105
- package/package.json +1 -1
- package/styles.css +8 -8
package/dist/index.mjs
CHANGED
|
@@ -26242,55 +26242,70 @@ function FormField({
|
|
|
26242
26242
|
}) {
|
|
26243
26243
|
const context = useFormContext();
|
|
26244
26244
|
const { formState, control } = context;
|
|
26245
|
-
const controller = useController({ name, control, rules });
|
|
26246
|
-
const { field } = controller;
|
|
26247
26245
|
const errors = formState?.errors || {};
|
|
26248
26246
|
const errorMessage = errors[name]?.message;
|
|
26249
26247
|
return /* @__PURE__ */ jsxs6("div", { ...props, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
|
|
26250
|
-
|
|
26251
|
-
|
|
26252
|
-
|
|
26253
|
-
|
|
26248
|
+
/* @__PURE__ */ jsx13(FormController, { name, control, rules, children: ({ field }) => {
|
|
26249
|
+
return Children.map(
|
|
26250
|
+
typeof children === "function" ? children({ ...context }) : children,
|
|
26251
|
+
(child) => child ? cloneElement2(child, { ...field, label: child.props.label || label }) : null
|
|
26252
|
+
);
|
|
26253
|
+
} }),
|
|
26254
26254
|
description && /* @__PURE__ */ jsx13("div", { className: FormField_default.description, children: description }),
|
|
26255
26255
|
errorMessage && /* @__PURE__ */ jsx13("div", { className: FormField_default.error, children: errorMessage })
|
|
26256
26256
|
] });
|
|
26257
26257
|
}
|
|
26258
26258
|
|
|
26259
26259
|
// src/components/forms/FormFieldArray.tsx
|
|
26260
|
+
var import_classnames8 = __toESM(require_classnames());
|
|
26261
|
+
|
|
26262
|
+
// src/components/Label.tsx
|
|
26260
26263
|
var import_classnames7 = __toESM(require_classnames());
|
|
26261
|
-
|
|
26264
|
+
|
|
26265
|
+
// css-modules:E:\dev\umami-react-zen\src\components\Label.module.css
|
|
26266
|
+
var Label_default = { "label": "Label_label__YWE3M" };
|
|
26267
|
+
|
|
26268
|
+
// src/components/Label.tsx
|
|
26269
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
26270
|
+
function Label2({ className, ...props }) {
|
|
26271
|
+
return /* @__PURE__ */ jsx14($01b77f81d0f07f68$export$b04be29aa201d4f5, { ...props, className: (0, import_classnames7.default)(Label_default.label, className) });
|
|
26272
|
+
}
|
|
26273
|
+
|
|
26274
|
+
// src/components/forms/FormFieldArray.tsx
|
|
26275
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26262
26276
|
function FormFieldArray({
|
|
26263
26277
|
name,
|
|
26264
26278
|
description,
|
|
26265
26279
|
label,
|
|
26280
|
+
rules,
|
|
26266
26281
|
className,
|
|
26267
26282
|
children,
|
|
26268
26283
|
...props
|
|
26269
26284
|
}) {
|
|
26270
26285
|
const context = useFormContext();
|
|
26271
|
-
const {
|
|
26286
|
+
const { formState, control } = context;
|
|
26272
26287
|
const fieldProps = useFieldArray({
|
|
26273
26288
|
control,
|
|
26274
26289
|
name
|
|
26275
26290
|
});
|
|
26276
26291
|
const errors = formState?.errors || {};
|
|
26277
26292
|
const errorMessage = errors[name]?.message;
|
|
26278
|
-
return /* @__PURE__ */ jsxs7("div", { ...props, className: (0,
|
|
26279
|
-
label && /* @__PURE__ */
|
|
26280
|
-
description && /* @__PURE__ */
|
|
26281
|
-
errorMessage && /* @__PURE__ */
|
|
26282
|
-
children({ context, ...fieldProps })
|
|
26293
|
+
return /* @__PURE__ */ jsxs7("div", { ...props, className: (0, import_classnames8.default)(FormField_default.input, className), children: [
|
|
26294
|
+
label && /* @__PURE__ */ jsx15(Label2, { children: label }),
|
|
26295
|
+
description && /* @__PURE__ */ jsx15("div", { className: FormField_default.description, children: description }),
|
|
26296
|
+
errorMessage && /* @__PURE__ */ jsx15("div", { className: FormField_default.error, children: errorMessage }),
|
|
26297
|
+
children({ ...context, ...fieldProps })
|
|
26283
26298
|
] });
|
|
26284
26299
|
}
|
|
26285
26300
|
|
|
26286
26301
|
// src/components/Button.tsx
|
|
26287
|
-
var
|
|
26302
|
+
var import_classnames9 = __toESM(require_classnames());
|
|
26288
26303
|
|
|
26289
26304
|
// css-modules:E:\dev\umami-react-zen\src\components\Button.module.css
|
|
26290
26305
|
var Button_default = { "button": "Button_button__YTAxZ", "primary": "Button_primary__NDFlY", "outline": "Button_outline__ZjQ3O", "quiet": "Button_quiet__ZWYwN", "danger": "Button_danger__YTg1M", "sm": "Button_sm__ZTAwM", "md": "Button_md__MDNjZ", "lg": "Button_lg__Njc0N", "xl": "Button_xl__MmUxM" };
|
|
26291
26306
|
|
|
26292
26307
|
// src/components/Button.tsx
|
|
26293
|
-
import { jsx as
|
|
26308
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
26294
26309
|
function Button2({
|
|
26295
26310
|
variant = "secondary",
|
|
26296
26311
|
size = "md",
|
|
@@ -26302,12 +26317,12 @@ function Button2({
|
|
|
26302
26317
|
}) {
|
|
26303
26318
|
const Component = asChild ? Slot : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
|
|
26304
26319
|
const buttonProps = Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? { preventFocusOnPress } : void 0;
|
|
26305
|
-
return /* @__PURE__ */
|
|
26320
|
+
return /* @__PURE__ */ jsx16(
|
|
26306
26321
|
Component,
|
|
26307
26322
|
{
|
|
26308
26323
|
...props,
|
|
26309
26324
|
...buttonProps,
|
|
26310
|
-
className: (0,
|
|
26325
|
+
className: (0, import_classnames9.default)(
|
|
26311
26326
|
Button_default.button,
|
|
26312
26327
|
className,
|
|
26313
26328
|
variant && Button_default[variant],
|
|
@@ -26319,44 +26334,44 @@ function Button2({
|
|
|
26319
26334
|
}
|
|
26320
26335
|
|
|
26321
26336
|
// src/components/forms/FormResetButton.tsx
|
|
26322
|
-
import { jsx as
|
|
26337
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
26323
26338
|
function FormResetButton({ values = {}, children, onPress, ...props }) {
|
|
26324
26339
|
const { reset } = useFormContext();
|
|
26325
26340
|
const handleReset = (e) => {
|
|
26326
26341
|
reset(values);
|
|
26327
26342
|
onPress?.(e);
|
|
26328
26343
|
};
|
|
26329
|
-
return /* @__PURE__ */
|
|
26344
|
+
return /* @__PURE__ */ jsx17(Button2, { ...props, type: "reset", onPress: handleReset, children });
|
|
26330
26345
|
}
|
|
26331
26346
|
|
|
26332
26347
|
// src/components/Spinner.tsx
|
|
26333
|
-
var
|
|
26348
|
+
var import_classnames10 = __toESM(require_classnames());
|
|
26334
26349
|
|
|
26335
26350
|
// css-modules:E:\dev\umami-react-zen\src\components\Spinner.module.css
|
|
26336
26351
|
var Spinner_default = { "spinner": "Spinner_spinner__MmRhN", "spinner-rotate": "Spinner_spinner-rotate__MDI2M", "track": "Spinner_track__ODIyN", "fill": "Spinner_fill__OGY5Y", "spinner-dash": "Spinner_spinner-dash__ZDE2N", "size-sm": "Spinner_size-sm__YWEwM", "size-md": "Spinner_size-md__NThiM", "size-lg": "Spinner_size-lg__MDEzN", "size-xl": "Spinner_size-xl__ZTNkN", "quiet": "Spinner_quiet__ZGJlM", "disabled": "Spinner_disabled__YjdjY" };
|
|
26337
26352
|
|
|
26338
26353
|
// src/components/Spinner.tsx
|
|
26339
|
-
import { jsx as
|
|
26354
|
+
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26340
26355
|
function Spinner(props) {
|
|
26341
26356
|
const { size = "lg", quiet, className, isDisabled, ...domProps } = props;
|
|
26342
|
-
return /* @__PURE__ */
|
|
26357
|
+
return /* @__PURE__ */ jsx18(
|
|
26343
26358
|
"div",
|
|
26344
26359
|
{
|
|
26345
26360
|
...domProps,
|
|
26346
|
-
className: (0,
|
|
26361
|
+
className: (0, import_classnames10.default)(Spinner_default.spinner, className, Spinner_default[`size-${size}`], {
|
|
26347
26362
|
[Spinner_default.quiet]: quiet,
|
|
26348
26363
|
[Spinner_default.disabled]: isDisabled
|
|
26349
26364
|
}),
|
|
26350
26365
|
children: /* @__PURE__ */ jsxs8("svg", { viewBox: "25 25 50 50", children: [
|
|
26351
|
-
/* @__PURE__ */
|
|
26352
|
-
/* @__PURE__ */
|
|
26366
|
+
/* @__PURE__ */ jsx18("circle", { className: Spinner_default.track, cx: "50", cy: "50", r: "20" }),
|
|
26367
|
+
/* @__PURE__ */ jsx18("circle", { className: Spinner_default.fill, cx: "50", cy: "50", r: "20" })
|
|
26353
26368
|
] })
|
|
26354
26369
|
}
|
|
26355
26370
|
);
|
|
26356
26371
|
}
|
|
26357
26372
|
|
|
26358
26373
|
// src/components/LoadingButton.tsx
|
|
26359
|
-
import { jsx as
|
|
26374
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26360
26375
|
function LoadingButton({
|
|
26361
26376
|
isLoading,
|
|
26362
26377
|
isDisabled,
|
|
@@ -26365,13 +26380,13 @@ function LoadingButton({
|
|
|
26365
26380
|
...props
|
|
26366
26381
|
}) {
|
|
26367
26382
|
return /* @__PURE__ */ jsxs9(Button2, { ...props, isDisabled, children: [
|
|
26368
|
-
isLoading && /* @__PURE__ */
|
|
26383
|
+
isLoading && /* @__PURE__ */ jsx19(Icon2, { size: "sm", children: /* @__PURE__ */ jsx19(Spinner, { isDisabled }) }),
|
|
26369
26384
|
showText && children
|
|
26370
26385
|
] });
|
|
26371
26386
|
}
|
|
26372
26387
|
|
|
26373
26388
|
// src/components/forms/FormSubmitButton.tsx
|
|
26374
|
-
import { jsx as
|
|
26389
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
26375
26390
|
function FormSubmitButton({
|
|
26376
26391
|
variant = "primary",
|
|
26377
26392
|
isDisabled,
|
|
@@ -26382,7 +26397,7 @@ function FormSubmitButton({
|
|
|
26382
26397
|
const {
|
|
26383
26398
|
formState: { isDirty, isValid, isSubmitting, isSubmitted, isSubmitSuccessful }
|
|
26384
26399
|
} = useFormContext();
|
|
26385
|
-
return /* @__PURE__ */
|
|
26400
|
+
return /* @__PURE__ */ jsx20(
|
|
26386
26401
|
LoadingButton,
|
|
26387
26402
|
{
|
|
26388
26403
|
...props,
|
|
@@ -26396,13 +26411,13 @@ function FormSubmitButton({
|
|
|
26396
26411
|
}
|
|
26397
26412
|
|
|
26398
26413
|
// src/components/toast/Toast.tsx
|
|
26399
|
-
var
|
|
26414
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
26400
26415
|
|
|
26401
26416
|
// css-modules:E:\dev\umami-react-zen\src\components\toast\Toast.module.css
|
|
26402
26417
|
var Toast_default = { "toast": "Toast_toast__ODE0M", "icon": "Toast_icon__ZmRlO", "title": "Toast_title__OGFiM", "description": "Toast_description__OTAxY", "action": "Toast_action__YzYxM", "close": "Toast_close__ZmMzM", "success": "Toast_success__Y2ZhZ", "error": "Toast_error__YzE0Y" };
|
|
26403
26418
|
|
|
26404
26419
|
// src/components/toast/Toast.tsx
|
|
26405
|
-
import { jsx as
|
|
26420
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
26406
26421
|
var TOAST_CLOSE_ACTION = "close";
|
|
26407
26422
|
function Toast({
|
|
26408
26423
|
id,
|
|
@@ -26417,11 +26432,11 @@ function Toast({
|
|
|
26417
26432
|
...props
|
|
26418
26433
|
}) {
|
|
26419
26434
|
const hasActions = actions?.length > 0;
|
|
26420
|
-
return /* @__PURE__ */ jsxs10("div", { ...props, className: (0,
|
|
26421
|
-
title && /* @__PURE__ */
|
|
26422
|
-
message && /* @__PURE__ */
|
|
26435
|
+
return /* @__PURE__ */ jsxs10("div", { ...props, className: (0, import_classnames11.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
|
|
26436
|
+
title && /* @__PURE__ */ jsx21("div", { className: Toast_default.title, children: title }),
|
|
26437
|
+
message && /* @__PURE__ */ jsx21("div", { className: Toast_default.description, children: message }),
|
|
26423
26438
|
hasActions && actions.map((action) => {
|
|
26424
|
-
return /* @__PURE__ */
|
|
26439
|
+
return /* @__PURE__ */ jsx21(
|
|
26425
26440
|
Button2,
|
|
26426
26441
|
{
|
|
26427
26442
|
variant: "outline",
|
|
@@ -26432,7 +26447,7 @@ function Toast({
|
|
|
26432
26447
|
action
|
|
26433
26448
|
);
|
|
26434
26449
|
}),
|
|
26435
|
-
!hasActions && allowClose && /* @__PURE__ */
|
|
26450
|
+
!hasActions && allowClose && /* @__PURE__ */ jsx21(
|
|
26436
26451
|
Icon2,
|
|
26437
26452
|
{
|
|
26438
26453
|
"aria-hidden": true,
|
|
@@ -26440,7 +26455,7 @@ function Toast({
|
|
|
26440
26455
|
size: "sm",
|
|
26441
26456
|
className: Toast_default.close,
|
|
26442
26457
|
onClick: () => onClose?.(TOAST_CLOSE_ACTION),
|
|
26443
|
-
children: /* @__PURE__ */
|
|
26458
|
+
children: /* @__PURE__ */ jsx21(X, {})
|
|
26444
26459
|
}
|
|
26445
26460
|
)
|
|
26446
26461
|
] });
|
|
@@ -30020,7 +30035,7 @@ var host = createHost(primitives, {
|
|
|
30020
30035
|
var animated = host.animated;
|
|
30021
30036
|
|
|
30022
30037
|
// src/components/toast/Toaster.tsx
|
|
30023
|
-
var
|
|
30038
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
30024
30039
|
import { useEffect as useEffect6, useState as useState5 } from "react";
|
|
30025
30040
|
|
|
30026
30041
|
// node_modules/.pnpm/zustand@5.0.5_@types+react@_a1d6b7db10f76afd26403e7782bb5bbf/node_modules/zustand/esm/vanilla.mjs
|
|
@@ -30072,12 +30087,12 @@ import { useContext as useContext4 } from "react";
|
|
|
30072
30087
|
|
|
30073
30088
|
// src/components/toast/ToastProvider.tsx
|
|
30074
30089
|
import { createContext as createContext2 } from "react";
|
|
30075
|
-
import { jsx as
|
|
30090
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
30076
30091
|
var ToastContext = createContext2({});
|
|
30077
30092
|
function ToastProvider({ children, ...props }) {
|
|
30078
30093
|
return /* @__PURE__ */ jsxs11(ToastContext.Provider, { value: props, children: [
|
|
30079
30094
|
children,
|
|
30080
|
-
/* @__PURE__ */
|
|
30095
|
+
/* @__PURE__ */ jsx22(Toaster, { ...props })
|
|
30081
30096
|
] });
|
|
30082
30097
|
}
|
|
30083
30098
|
|
|
@@ -30115,7 +30130,7 @@ function useToast() {
|
|
|
30115
30130
|
var Toaster_default = { "toaster": "Toaster_toaster__OGJjM", "position-top": "Toaster_position-top__Y2YyM", "position-top-right": "Toaster_position-top-right__Y2I1Y", "position-top-left": "Toaster_position-top-left__ZGZlM", "position-bottom": "Toaster_position-bottom__NjJmM", "position-bottom-right": "Toaster_position-bottom-right__MGVjY", "position-bottom-left": "Toaster_position-bottom-left__ODBhZ", "position-left": "Toaster_position-left__MWMzM", "position-right": "Toaster_position-right__YWYzZ" };
|
|
30116
30131
|
|
|
30117
30132
|
// src/components/toast/Toaster.tsx
|
|
30118
|
-
import { jsx as
|
|
30133
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
30119
30134
|
function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
30120
30135
|
const { toasts } = useToast();
|
|
30121
30136
|
const [hovered, setHovered] = useState5(false);
|
|
@@ -30147,17 +30162,17 @@ function Toaster({ duration = 0, position = "bottom-right" }) {
|
|
|
30147
30162
|
};
|
|
30148
30163
|
}
|
|
30149
30164
|
}, [duration, toasts, hovered]);
|
|
30150
|
-
return /* @__PURE__ */
|
|
30165
|
+
return /* @__PURE__ */ jsx23(
|
|
30151
30166
|
"div",
|
|
30152
30167
|
{
|
|
30153
|
-
className: (0,
|
|
30168
|
+
className: (0, import_classnames12.default)(Toaster_default.toaster, Toaster_default[`position-${position}`]),
|
|
30154
30169
|
onMouseEnter: () => setHovered(true),
|
|
30155
30170
|
onMouseLeave: () => setHovered(false),
|
|
30156
30171
|
children: transitions((style, item) => {
|
|
30157
30172
|
const { id, ...props } = item;
|
|
30158
30173
|
return (
|
|
30159
30174
|
// @ts-ignore
|
|
30160
|
-
/* @__PURE__ */
|
|
30175
|
+
/* @__PURE__ */ jsx23(animated.div, { style, children: /* @__PURE__ */ jsx23(Toast, { ...props, id, onClose: () => removeToast(id) }) }, id)
|
|
30161
30176
|
);
|
|
30162
30177
|
})
|
|
30163
30178
|
}
|
|
@@ -30204,16 +30219,16 @@ function useTheme(defaultTheme) {
|
|
|
30204
30219
|
|
|
30205
30220
|
// src/components/Accordion.tsx
|
|
30206
30221
|
import { useState as useState7 } from "react";
|
|
30207
|
-
var
|
|
30222
|
+
var import_classnames14 = __toESM(require_classnames());
|
|
30208
30223
|
|
|
30209
30224
|
// src/components/Text.tsx
|
|
30210
|
-
var
|
|
30225
|
+
var import_classnames13 = __toESM(require_classnames());
|
|
30211
30226
|
|
|
30212
30227
|
// css-modules:E:\dev\umami-react-zen\src\components\Text.module.css
|
|
30213
30228
|
var Text_default = { "truncate": "Text_truncate__NjQ2M", "italic": "Text_italic__MmI4Y", "underline": "Text_underline__MzZmN", "strikethrough": "Text_strikethrough__ZTg3Y" };
|
|
30214
30229
|
|
|
30215
30230
|
// src/components/Text.tsx
|
|
30216
|
-
import { jsx as
|
|
30231
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
30217
30232
|
function Text({
|
|
30218
30233
|
color,
|
|
30219
30234
|
size,
|
|
@@ -30243,11 +30258,11 @@ function Text({
|
|
|
30243
30258
|
textTransform: transform,
|
|
30244
30259
|
color
|
|
30245
30260
|
});
|
|
30246
|
-
return /* @__PURE__ */
|
|
30261
|
+
return /* @__PURE__ */ jsx24(
|
|
30247
30262
|
Component,
|
|
30248
30263
|
{
|
|
30249
30264
|
...props,
|
|
30250
|
-
className: (0,
|
|
30265
|
+
className: (0, import_classnames13.default)(
|
|
30251
30266
|
Text_default.text,
|
|
30252
30267
|
className,
|
|
30253
30268
|
classes,
|
|
@@ -30266,9 +30281,9 @@ function Text({
|
|
|
30266
30281
|
var Accordion_default = { "accordion": "Accordion_accordion__ODg3O", "item": "Accordion_item__ZDU3Z", "button": "Accordion_button__MTRiY", "icon": "Accordion_icon__NDMwM", "panel": "Accordion_panel__OTQ4M", "expanded": "Accordion_expanded__ODY0N" };
|
|
30267
30282
|
|
|
30268
30283
|
// src/components/Accordion.tsx
|
|
30269
|
-
import { jsx as
|
|
30284
|
+
import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
30270
30285
|
function Accordion({ className, children, ...props }) {
|
|
30271
|
-
return /* @__PURE__ */
|
|
30286
|
+
return /* @__PURE__ */ jsx25($28f4fd908f0de97f$export$944aceb4f8c89f10, { ...props, className: (0, import_classnames14.default)(Accordion_default.accordion, className), children });
|
|
30272
30287
|
}
|
|
30273
30288
|
function AccordionItem({
|
|
30274
30289
|
defaultExpanded,
|
|
@@ -30285,39 +30300,39 @@ function AccordionItem({
|
|
|
30285
30300
|
$28f4fd908f0de97f$export$74a362b31437ec83,
|
|
30286
30301
|
{
|
|
30287
30302
|
...props,
|
|
30288
|
-
className: (0,
|
|
30303
|
+
className: (0, import_classnames14.default)(Accordion_default.item, className),
|
|
30289
30304
|
onExpandedChange: handleExpandedChange,
|
|
30290
30305
|
children: [
|
|
30291
30306
|
/* @__PURE__ */ jsxs12(Button2, { slot: "trigger", className: Accordion_default.button, children: [
|
|
30292
|
-
/* @__PURE__ */
|
|
30293
|
-
/* @__PURE__ */
|
|
30307
|
+
/* @__PURE__ */ jsx25(Text, { children: trigger }),
|
|
30308
|
+
/* @__PURE__ */ jsx25(Icon2, { className: Accordion_default.icon, size: "xs", children: /* @__PURE__ */ jsx25(ChevronRight, {}) })
|
|
30294
30309
|
] }),
|
|
30295
|
-
/* @__PURE__ */
|
|
30310
|
+
/* @__PURE__ */ jsx25($28f4fd908f0de97f$export$feabaa331e1d464c, { className: (0, import_classnames14.default)(Accordion_default.panel, expanded && Accordion_default.expanded), children: panel })
|
|
30296
30311
|
]
|
|
30297
30312
|
}
|
|
30298
30313
|
);
|
|
30299
30314
|
}
|
|
30300
30315
|
|
|
30301
30316
|
// src/components/AlertDialog.tsx
|
|
30302
|
-
var
|
|
30317
|
+
var import_classnames16 = __toESM(require_classnames());
|
|
30303
30318
|
|
|
30304
30319
|
// src/components/Dialog.tsx
|
|
30305
|
-
var
|
|
30320
|
+
var import_classnames15 = __toESM(require_classnames());
|
|
30306
30321
|
|
|
30307
30322
|
// css-modules:E:\dev\umami-react-zen\src\components\Dialog.module.css
|
|
30308
30323
|
var Dialog_default = { "dialog": "Dialog_dialog__YzZhN", "title": "Dialog_title__NjZlN", "modal": "Dialog_modal__YjEzN", "menu": "Dialog_menu__ZmFhN", "sheet": "Dialog_sheet__NzkxM" };
|
|
30309
30324
|
|
|
30310
30325
|
// src/components/Dialog.tsx
|
|
30311
|
-
import { Fragment as Fragment2, jsx as
|
|
30326
|
+
import { Fragment as Fragment2, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
30312
30327
|
function Dialog2({ title, variant = "modal", children, className, ...props }) {
|
|
30313
|
-
return /* @__PURE__ */
|
|
30328
|
+
return /* @__PURE__ */ jsx26(
|
|
30314
30329
|
$de32f1b87079253c$export$3ddf2d174ce01153,
|
|
30315
30330
|
{
|
|
30316
30331
|
...props,
|
|
30317
|
-
className: (0,
|
|
30332
|
+
className: (0, import_classnames15.default)(Dialog_default.dialog, variant && Dialog_default[variant], className),
|
|
30318
30333
|
children: (dialogProps) => {
|
|
30319
30334
|
return /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
30320
|
-
title && /* @__PURE__ */
|
|
30335
|
+
title && /* @__PURE__ */ jsx26("div", { className: Dialog_default.title, children: title }),
|
|
30321
30336
|
typeof children === "function" ? children(dialogProps) : children
|
|
30322
30337
|
] });
|
|
30323
30338
|
}
|
|
@@ -30326,16 +30341,16 @@ function Dialog2({ title, variant = "modal", children, className, ...props }) {
|
|
|
30326
30341
|
}
|
|
30327
30342
|
|
|
30328
30343
|
// src/components/Column.tsx
|
|
30329
|
-
import { jsx as
|
|
30344
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
30330
30345
|
function Column({ reverse, children, ...props }) {
|
|
30331
|
-
return /* @__PURE__ */
|
|
30346
|
+
return /* @__PURE__ */ jsx27(Flexbox, { ...props, direction: reverse ? "column-reverse" : "column", children });
|
|
30332
30347
|
}
|
|
30333
30348
|
|
|
30334
30349
|
// css-modules:E:\dev\umami-react-zen\src\components\AlertDialog.module.css
|
|
30335
30350
|
var AlertDialog_default = { "dialog": "AlertDialog_dialog__OTkwN", "title": "AlertDialog_title__ZGIwY" };
|
|
30336
30351
|
|
|
30337
30352
|
// src/components/AlertDialog.tsx
|
|
30338
|
-
import { jsx as
|
|
30353
|
+
import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
30339
30354
|
function AlertDialog({
|
|
30340
30355
|
title,
|
|
30341
30356
|
description,
|
|
@@ -30357,12 +30372,12 @@ function AlertDialog({
|
|
|
30357
30372
|
onCancel?.();
|
|
30358
30373
|
close();
|
|
30359
30374
|
};
|
|
30360
|
-
return /* @__PURE__ */
|
|
30375
|
+
return /* @__PURE__ */ jsx28(Dialog2, { ...props, title, className: (0, import_classnames16.default)(AlertDialog_default.dialog, className), children: ({ close }) => {
|
|
30361
30376
|
return /* @__PURE__ */ jsxs14(Column, { gap: "4", children: [
|
|
30362
30377
|
typeof children === "function" ? children({ close }) : children,
|
|
30363
30378
|
/* @__PURE__ */ jsxs14(Row, { gap: "3", justifyContent: "end", children: [
|
|
30364
|
-
/* @__PURE__ */
|
|
30365
|
-
/* @__PURE__ */
|
|
30379
|
+
/* @__PURE__ */ jsx28(Button2, { onPress: () => handleClose(close), children: cancelLabel }),
|
|
30380
|
+
/* @__PURE__ */ jsx28(
|
|
30366
30381
|
Button2,
|
|
30367
30382
|
{
|
|
30368
30383
|
variant: isDanger ? "danger" : "primary",
|
|
@@ -30380,32 +30395,32 @@ function AlertDialog({
|
|
|
30380
30395
|
var Blockquote_default = { "blockquote": "Blockquote_blockquote__MzZmO" };
|
|
30381
30396
|
|
|
30382
30397
|
// src/components/Blockquote.tsx
|
|
30383
|
-
import { jsx as
|
|
30398
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
30384
30399
|
function Blockquote({ asChild, children }) {
|
|
30385
30400
|
const Component = asChild ? Slot : "blockquote";
|
|
30386
|
-
return /* @__PURE__ */
|
|
30401
|
+
return /* @__PURE__ */ jsx29(Component, { className: Blockquote_default.blockquote, children });
|
|
30387
30402
|
}
|
|
30388
30403
|
|
|
30389
30404
|
// src/components/Breadcrumbs.tsx
|
|
30390
|
-
var
|
|
30405
|
+
var import_classnames17 = __toESM(require_classnames());
|
|
30391
30406
|
|
|
30392
30407
|
// css-modules:E:\dev\umami-react-zen\src\components\Breadcrumbs.module.css
|
|
30393
30408
|
var Breadcrumbs_default = { "breadcrumbs": "Breadcrumbs_breadcrumbs__OTJlN", "breadcrumb": "Breadcrumbs_breadcrumb__YjU2O", "icon": "Breadcrumbs_icon__MWFiY" };
|
|
30394
30409
|
|
|
30395
30410
|
// src/components/Breadcrumbs.tsx
|
|
30396
|
-
import { jsx as
|
|
30411
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
30397
30412
|
function Breadcrumbs2({ children, className, ...props }) {
|
|
30398
|
-
return /* @__PURE__ */
|
|
30413
|
+
return /* @__PURE__ */ jsx30($778035c5624f61e7$export$2dc68d50d56fbbd, { ...props, className: (0, import_classnames17.default)(Breadcrumbs_default.breadcrumbs, className), children });
|
|
30399
30414
|
}
|
|
30400
30415
|
function Breadcrumb2({ children, className, ...props }) {
|
|
30401
|
-
return /* @__PURE__ */ jsxs15($778035c5624f61e7$export$dabcc1ec9dd9d1cc, { ...props, className: (0,
|
|
30416
|
+
return /* @__PURE__ */ jsxs15($778035c5624f61e7$export$dabcc1ec9dd9d1cc, { ...props, className: (0, import_classnames17.default)(Breadcrumbs_default.breadcrumb, className), children: [
|
|
30402
30417
|
children,
|
|
30403
|
-
/* @__PURE__ */
|
|
30418
|
+
/* @__PURE__ */ jsx30(Icon2, { className: Breadcrumbs_default.icon, size: "xs", children: /* @__PURE__ */ jsx30(ChevronRight, {}) })
|
|
30404
30419
|
] });
|
|
30405
30420
|
}
|
|
30406
30421
|
|
|
30407
30422
|
// src/components/Calendar.tsx
|
|
30408
|
-
var
|
|
30423
|
+
var import_classnames18 = __toESM(require_classnames());
|
|
30409
30424
|
|
|
30410
30425
|
// src/lib/date.ts
|
|
30411
30426
|
function toCalendarDate(date) {
|
|
@@ -30418,7 +30433,7 @@ function toCalendarDate(date) {
|
|
|
30418
30433
|
var Calendar_default = { "calendar": "Calendar_calendar__ZDMwM", "header": "Calendar_header__ZDE0Y", "heading": "Calendar_heading__MTk3Z", "button": "Calendar_button__MmIyO", "headerCell": "Calendar_headerCell__MjEwY", "cell": "Calendar_cell__MTc4M" };
|
|
30419
30434
|
|
|
30420
30435
|
// src/components/Calendar.tsx
|
|
30421
|
-
import { jsx as
|
|
30436
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
30422
30437
|
function Calendar2({
|
|
30423
30438
|
className,
|
|
30424
30439
|
value,
|
|
@@ -30440,17 +30455,17 @@ function Calendar2({
|
|
|
30440
30455
|
minValue: toCalendarDate(minValue),
|
|
30441
30456
|
maxValue: toCalendarDate(maxValue),
|
|
30442
30457
|
defaultValue: toCalendarDate(defaultValue),
|
|
30443
|
-
className: (0,
|
|
30458
|
+
className: (0, import_classnames18.default)(Calendar_default.calendar, className),
|
|
30444
30459
|
onChange: handleChange,
|
|
30445
30460
|
children: [
|
|
30446
30461
|
/* @__PURE__ */ jsxs16("header", { className: Calendar_default.header, children: [
|
|
30447
|
-
/* @__PURE__ */
|
|
30448
|
-
/* @__PURE__ */
|
|
30449
|
-
/* @__PURE__ */
|
|
30462
|
+
/* @__PURE__ */ jsx31(Button2, { slot: "previous", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ jsx31(Icon2, { rotate: 180, children: /* @__PURE__ */ jsx31(ChevronRight, {}) }) }),
|
|
30463
|
+
/* @__PURE__ */ jsx31($5cb03073d3f54797$export$a8a3e93435678ff9, { className: Calendar_default.heading }),
|
|
30464
|
+
/* @__PURE__ */ jsx31(Button2, { slot: "next", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ jsx31(Icon2, { children: /* @__PURE__ */ jsx31(ChevronRight, {}) }) })
|
|
30450
30465
|
] }),
|
|
30451
30466
|
/* @__PURE__ */ jsxs16($dfd62f934fc76fed$export$5bd780d491cfc46c, { children: [
|
|
30452
|
-
/* @__PURE__ */
|
|
30453
|
-
/* @__PURE__ */
|
|
30467
|
+
/* @__PURE__ */ jsx31($dfd62f934fc76fed$export$22e2d15eaa4d2377, { children: (day) => /* @__PURE__ */ jsx31($dfd62f934fc76fed$export$ad2135cac3a11b3d, { className: Calendar_default.headerCell, children: day }) }),
|
|
30468
|
+
/* @__PURE__ */ jsx31($dfd62f934fc76fed$export$e11f8ba65d857bff, { className: Calendar_default.body, children: (date) => /* @__PURE__ */ jsx31($dfd62f934fc76fed$export$5d847498420df57b, { className: Calendar_default.cell, date }) })
|
|
30454
30469
|
] })
|
|
30455
30470
|
]
|
|
30456
30471
|
}
|
|
@@ -30458,24 +30473,24 @@ function Calendar2({
|
|
|
30458
30473
|
}
|
|
30459
30474
|
|
|
30460
30475
|
// src/components/Checkbox.tsx
|
|
30461
|
-
var
|
|
30476
|
+
var import_classnames19 = __toESM(require_classnames());
|
|
30462
30477
|
|
|
30463
30478
|
// css-modules:E:\dev\umami-react-zen\src\components\Checkbox.module.css
|
|
30464
30479
|
var Checkbox_default = { "checkbox": "Checkbox_checkbox__OTliN", "box": "Checkbox_box__M2E3Z", "icon": "Checkbox_icon__ODgyZ" };
|
|
30465
30480
|
|
|
30466
30481
|
// src/components/Checkbox.tsx
|
|
30467
|
-
import { Fragment as Fragment3, jsx as
|
|
30482
|
+
import { Fragment as Fragment3, jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
30468
30483
|
function Checkbox2({ label, className, children, ...props }) {
|
|
30469
30484
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
30470
|
-
return /* @__PURE__ */
|
|
30485
|
+
return /* @__PURE__ */ jsx32(
|
|
30471
30486
|
$bc237834342dbd75$export$48513f6b9f8ce62d,
|
|
30472
30487
|
{
|
|
30473
30488
|
...props,
|
|
30474
30489
|
isSelected,
|
|
30475
|
-
className: (0,
|
|
30490
|
+
className: (0, import_classnames19.default)(Checkbox_default.checkbox, className),
|
|
30476
30491
|
children: ({ isIndeterminate, isSelected: isSelected2 }) => {
|
|
30477
30492
|
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
30478
|
-
/* @__PURE__ */
|
|
30493
|
+
/* @__PURE__ */ jsx32("div", { className: Checkbox_default.box, children: /* @__PURE__ */ jsx32(Icon2, { className: Checkbox_default.icon, size: "sm", children: isIndeterminate ? /* @__PURE__ */ jsx32(Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx32(Check, {}) : null }) }),
|
|
30479
30494
|
children
|
|
30480
30495
|
] });
|
|
30481
30496
|
}
|
|
@@ -30487,20 +30502,20 @@ function Checkbox2({ label, className, children, ...props }) {
|
|
|
30487
30502
|
var Code_default = { "code": "Code_code__NmYxN" };
|
|
30488
30503
|
|
|
30489
30504
|
// src/components/Code.tsx
|
|
30490
|
-
import { jsx as
|
|
30505
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
30491
30506
|
function Code({ asChild, children }) {
|
|
30492
30507
|
const Component = asChild ? Slot : "code";
|
|
30493
|
-
return /* @__PURE__ */
|
|
30508
|
+
return /* @__PURE__ */ jsx33(Component, { className: Code_default.code, children });
|
|
30494
30509
|
}
|
|
30495
30510
|
|
|
30496
30511
|
// src/components/Container.tsx
|
|
30497
|
-
var
|
|
30512
|
+
var import_classnames20 = __toESM(require_classnames());
|
|
30498
30513
|
|
|
30499
30514
|
// css-modules:E:\dev\umami-react-zen\src\components\Container.module.css
|
|
30500
30515
|
var Container_default = { "container": "Container_container__ZWU0Y", "centered": "Container_centered__OTM1M", "fluid": "Container_fluid__NTBhY" };
|
|
30501
30516
|
|
|
30502
30517
|
// src/components/Container.tsx
|
|
30503
|
-
import { jsx as
|
|
30518
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
30504
30519
|
function Container({
|
|
30505
30520
|
isCentered = true,
|
|
30506
30521
|
isFluid,
|
|
@@ -30508,11 +30523,11 @@ function Container({
|
|
|
30508
30523
|
children,
|
|
30509
30524
|
...props
|
|
30510
30525
|
}) {
|
|
30511
|
-
return /* @__PURE__ */
|
|
30526
|
+
return /* @__PURE__ */ jsx34(
|
|
30512
30527
|
Box,
|
|
30513
30528
|
{
|
|
30514
30529
|
...props,
|
|
30515
|
-
className: (0,
|
|
30530
|
+
className: (0, import_classnames20.default)(
|
|
30516
30531
|
Container_default.container,
|
|
30517
30532
|
className,
|
|
30518
30533
|
isCentered && Container_default.centered,
|
|
@@ -30531,18 +30546,6 @@ import { useState as useState10 } from "react";
|
|
|
30531
30546
|
import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
30532
30547
|
var import_classnames22 = __toESM(require_classnames());
|
|
30533
30548
|
|
|
30534
|
-
// src/components/Label.tsx
|
|
30535
|
-
var import_classnames20 = __toESM(require_classnames());
|
|
30536
|
-
|
|
30537
|
-
// css-modules:E:\dev\umami-react-zen\src\components\Label.module.css
|
|
30538
|
-
var Label_default = { "label": "Label_label__YWE3M" };
|
|
30539
|
-
|
|
30540
|
-
// src/components/Label.tsx
|
|
30541
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
30542
|
-
function Label2({ className, ...props }) {
|
|
30543
|
-
return /* @__PURE__ */ jsx34($01b77f81d0f07f68$export$b04be29aa201d4f5, { ...props, className: (0, import_classnames20.default)(Label_default.label, className) });
|
|
30544
|
-
}
|
|
30545
|
-
|
|
30546
30549
|
// src/components/CopyButton.tsx
|
|
30547
30550
|
var import_classnames21 = __toESM(require_classnames());
|
|
30548
30551
|
import { useState as useState8, useRef as useRef7 } from "react";
|
|
@@ -31432,6 +31435,7 @@ function SearchField2({
|
|
|
31432
31435
|
value,
|
|
31433
31436
|
defaultValue = "",
|
|
31434
31437
|
delay = 0,
|
|
31438
|
+
onChange,
|
|
31435
31439
|
onSearch,
|
|
31436
31440
|
className,
|
|
31437
31441
|
...props
|
|
@@ -31443,10 +31447,12 @@ function SearchField2({
|
|
|
31443
31447
|
if (delay === 0 || value2 === "") {
|
|
31444
31448
|
onSearch?.(value2);
|
|
31445
31449
|
}
|
|
31450
|
+
onChange?.(value2);
|
|
31446
31451
|
};
|
|
31447
31452
|
const resetSearch = () => {
|
|
31448
31453
|
setSearch("");
|
|
31449
31454
|
onSearch?.("");
|
|
31455
|
+
onChange?.("");
|
|
31450
31456
|
};
|
|
31451
31457
|
useEffect12(() => {
|
|
31452
31458
|
if (delay > 0) {
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -3363,6 +3363,14 @@ li {
|
|
|
3363
3363
|
font-weight: 600;
|
|
3364
3364
|
}
|
|
3365
3365
|
|
|
3366
|
+
/* virtual-css:css:eaf2e0c53cba41d4256ca460ee0d2b3e */
|
|
3367
|
+
.Label_label__YWE3M {
|
|
3368
|
+
font-size: var(--font-size);
|
|
3369
|
+
color: var(--font-color);
|
|
3370
|
+
font-weight: var(--font-weight-bold);
|
|
3371
|
+
line-height: 2.5;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3366
3374
|
/* virtual-css:css:616ae3b49446388ff62e911490fa55d8 */
|
|
3367
3375
|
.Button_button__YTAxZ {
|
|
3368
3376
|
display: flex;
|
|
@@ -3945,14 +3953,6 @@ body a.Button_button__YTAxZ {
|
|
|
3945
3953
|
}
|
|
3946
3954
|
}
|
|
3947
3955
|
|
|
3948
|
-
/* virtual-css:css:eaf2e0c53cba41d4256ca460ee0d2b3e */
|
|
3949
|
-
.Label_label__YWE3M {
|
|
3950
|
-
font-size: var(--font-size);
|
|
3951
|
-
color: var(--font-color);
|
|
3952
|
-
font-weight: var(--font-weight-bold);
|
|
3953
|
-
line-height: 2.5;
|
|
3954
|
-
}
|
|
3955
|
-
|
|
3956
3956
|
/* virtual-css:css:814f767aeadf5e17bfb63509d2206999 */
|
|
3957
3957
|
.CopyButton_icon__YTM2Y {
|
|
3958
3958
|
animation: CopyButton_copy-button__MjY1M 200ms;
|