@umami/react-zen 0.65.0 → 0.66.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 +143 -83
- package/dist/index.d.ts +109 -93
- package/dist/index.js +181 -109
- package/dist/index.mjs +138 -66
- package/package.json +4 -4
- package/styles.css +143 -83
package/dist/index.mjs
CHANGED
|
@@ -27273,7 +27273,7 @@ import { forwardRef as forwardRef2 } from "react";
|
|
|
27273
27273
|
var import_classnames7 = __toESM(require_classnames());
|
|
27274
27274
|
|
|
27275
27275
|
// css-modules:E:\dev\umami-react-zen\src\components\Button.module.css
|
|
27276
|
-
var Button_default = { "button": "
|
|
27276
|
+
var Button_default = { "button": "Button_button__NDYwM", "primary": "Button_primary__OWE0M", "outline": "Button_outline__NTQyN", "quiet": "Button_quiet__NDFjM", "danger": "Button_danger__NDUzM", "sm": "Button_sm__NTVjM", "md": "Button_md__NDE4O", "lg": "Button_lg__NTU4O", "xl": "Button_xl__NjFkM" };
|
|
27277
27277
|
|
|
27278
27278
|
// src/components/Button.tsx
|
|
27279
27279
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
@@ -27281,8 +27281,8 @@ var Button2 = forwardRef2(
|
|
|
27281
27281
|
({
|
|
27282
27282
|
variant = "secondary",
|
|
27283
27283
|
size = "md",
|
|
27284
|
-
preventFocusOnPress = true,
|
|
27285
27284
|
asChild,
|
|
27285
|
+
preventFocusOnPress = true,
|
|
27286
27286
|
className,
|
|
27287
27287
|
children,
|
|
27288
27288
|
...props
|
|
@@ -27322,18 +27322,19 @@ function FormResetButton({ values = {}, children, onPress, ...props }) {
|
|
|
27322
27322
|
var import_classnames8 = __toESM(require_classnames());
|
|
27323
27323
|
|
|
27324
27324
|
// css-modules:E:\dev\umami-react-zen\src\components\Spinner.module.css
|
|
27325
|
-
var Spinner_default = { "spinner": "
|
|
27325
|
+
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" };
|
|
27326
27326
|
|
|
27327
27327
|
// src/components/Spinner.tsx
|
|
27328
27328
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
27329
27329
|
function Spinner(props) {
|
|
27330
|
-
const { size = "lg", quiet, className, ...domProps } = props;
|
|
27330
|
+
const { size = "lg", quiet, className, isDisabled, ...domProps } = props;
|
|
27331
27331
|
return /* @__PURE__ */ jsx12(
|
|
27332
27332
|
"div",
|
|
27333
27333
|
{
|
|
27334
27334
|
...domProps,
|
|
27335
27335
|
className: (0, import_classnames8.default)(Spinner_default.spinner, className, Spinner_default[`size-${size}`], {
|
|
27336
|
-
[Spinner_default.quiet]: quiet
|
|
27336
|
+
[Spinner_default.quiet]: quiet,
|
|
27337
|
+
[Spinner_default.disabled]: isDisabled
|
|
27337
27338
|
}),
|
|
27338
27339
|
children: /* @__PURE__ */ jsxs4("svg", { viewBox: "25 25 50 50", children: [
|
|
27339
27340
|
/* @__PURE__ */ jsx12("circle", { className: Spinner_default.track, cx: "50", cy: "50", r: "20" }),
|
|
@@ -27345,10 +27346,16 @@ function Spinner(props) {
|
|
|
27345
27346
|
|
|
27346
27347
|
// src/components/LoadingButton.tsx
|
|
27347
27348
|
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
27348
|
-
function LoadingButton({
|
|
27349
|
-
|
|
27350
|
-
|
|
27351
|
-
|
|
27349
|
+
function LoadingButton({
|
|
27350
|
+
isLoading,
|
|
27351
|
+
isDisabled,
|
|
27352
|
+
showText = true,
|
|
27353
|
+
children,
|
|
27354
|
+
...props
|
|
27355
|
+
}) {
|
|
27356
|
+
return /* @__PURE__ */ jsxs5(Button2, { ...props, isDisabled, children: [
|
|
27357
|
+
isLoading && /* @__PURE__ */ jsx13(Icon, { size: "sm", children: /* @__PURE__ */ jsx13(Spinner, { isDisabled }) }),
|
|
27358
|
+
showText && children
|
|
27352
27359
|
] });
|
|
27353
27360
|
}
|
|
27354
27361
|
|
|
@@ -27364,7 +27371,6 @@ function FormSubmitButton({
|
|
|
27364
27371
|
const {
|
|
27365
27372
|
formState: { isDirty, isValid, isSubmitting, isSubmitted, isSubmitSuccessful }
|
|
27366
27373
|
} = useFormContext();
|
|
27367
|
-
console.log({ isDirty, isValid, isSubmitting, isSubmitted, isSubmitSuccessful });
|
|
27368
27374
|
return /* @__PURE__ */ jsx14(
|
|
27369
27375
|
LoadingButton,
|
|
27370
27376
|
{
|
|
@@ -31441,19 +31447,30 @@ function Code({ asChild, children }) {
|
|
|
31441
31447
|
var import_classnames21 = __toESM(require_classnames());
|
|
31442
31448
|
|
|
31443
31449
|
// src/components/List.tsx
|
|
31450
|
+
import { Fragment as Fragment4 } from "react";
|
|
31444
31451
|
var import_classnames19 = __toESM(require_classnames());
|
|
31445
31452
|
|
|
31446
31453
|
// css-modules:E:\dev\umami-react-zen\src\components\List.module.css
|
|
31447
|
-
var List_default = { "list": "
|
|
31454
|
+
var List_default = { "list": "List_list__MDIxN", "separator": "List_separator__YWY4N", "section": "List_section__NWU0Y", "header": "List_header__Yzg0Y", "item": "List_item__NjEyN", "check": "List_check__MTNlZ" };
|
|
31448
31455
|
|
|
31449
31456
|
// src/components/List.tsx
|
|
31450
31457
|
import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
31451
|
-
function List({
|
|
31452
|
-
|
|
31453
|
-
|
|
31454
|
-
|
|
31455
|
-
|
|
31456
|
-
|
|
31458
|
+
function List({
|
|
31459
|
+
items,
|
|
31460
|
+
idProperty = "id",
|
|
31461
|
+
labelProperty = "label",
|
|
31462
|
+
separatorProperty = "separatpr",
|
|
31463
|
+
className,
|
|
31464
|
+
children,
|
|
31465
|
+
...props
|
|
31466
|
+
}) {
|
|
31467
|
+
return /* @__PURE__ */ jsx28($eed445e0843c11d0$export$41f133550aa26f48, { ...props, items, className: (0, import_classnames19.default)(List_default.list, className), children: children || items?.map((item) => {
|
|
31468
|
+
const id = item[idProperty] || item.toString();
|
|
31469
|
+
const label = item[labelProperty] || item.toString();
|
|
31470
|
+
return /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
31471
|
+
item[separatorProperty] && /* @__PURE__ */ jsx28($431f98aba6844401$export$1ff3c3f08ae963c0, { className: List_default.separator }),
|
|
31472
|
+
/* @__PURE__ */ jsx28(ListItem, { id, className: List_default.item, children: label })
|
|
31473
|
+
] }, id);
|
|
31457
31474
|
}) });
|
|
31458
31475
|
}
|
|
31459
31476
|
function ListItem({ children, className, ...props }) {
|
|
@@ -31579,7 +31596,7 @@ function CopyButton({ value, timeout = TIMEOUT, className, children, ...props })
|
|
|
31579
31596
|
}
|
|
31580
31597
|
|
|
31581
31598
|
// css-modules:E:\dev\umami-react-zen\src\components\styles\input.module.css
|
|
31582
|
-
var input_default = { "field": "
|
|
31599
|
+
var input_default = { "field": "input_field__ZGEyY", "row": "input_row__YTllZ", "input": "input_input__ZTAzN", "icon": "input_icon__YjcxZ" };
|
|
31583
31600
|
|
|
31584
31601
|
// css-modules:E:\dev\umami-react-zen\src\components\TextField.module.css
|
|
31585
31602
|
var TextField_default = { "allowCopy": "TextField_allowCopy__Y2RhY", "icon": "TextField_icon__MWVlN" };
|
|
@@ -31639,7 +31656,7 @@ var TextField2 = forwardRef5(
|
|
|
31639
31656
|
var ConfirmationDialog_default = { "dialog": "ConfirmationDialog_dialog__Mzg4M", "value": "ConfirmationDialog_value__YzhjZ" };
|
|
31640
31657
|
|
|
31641
31658
|
// src/components/ConfirmationDialog.tsx
|
|
31642
|
-
import { Fragment as
|
|
31659
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
31643
31660
|
function ConfirmationDialog({
|
|
31644
31661
|
value,
|
|
31645
31662
|
confirmMessage,
|
|
@@ -31658,7 +31675,7 @@ function ConfirmationDialog({
|
|
|
31658
31675
|
className: (0, import_classnames26.default)(ConfirmationDialog_default.dialog, className),
|
|
31659
31676
|
isConfirmDisabled: !canSave,
|
|
31660
31677
|
children: ({ close }) => {
|
|
31661
|
-
return /* @__PURE__ */ jsxs17(
|
|
31678
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
31662
31679
|
typeof children === "function" ? children({ close }) : children,
|
|
31663
31680
|
/* @__PURE__ */ jsxs17(Text, { children: [
|
|
31664
31681
|
confirmMessage || "Type the following value to confirm",
|
|
@@ -31894,7 +31911,7 @@ import { useRef as useRef8, useState as useState12, useEffect as useEffect11 } f
|
|
|
31894
31911
|
var HoverTrigger_default = { "wrapper": "HoverTrigger_wrapper__NGFlN" };
|
|
31895
31912
|
|
|
31896
31913
|
// src/components/HoverTrigger.tsx
|
|
31897
|
-
import { Fragment as
|
|
31914
|
+
import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
31898
31915
|
var CLOSE_DELAY = 500;
|
|
31899
31916
|
function HoverTrigger({
|
|
31900
31917
|
isOpen,
|
|
@@ -31945,7 +31962,7 @@ function HoverTrigger({
|
|
|
31945
31962
|
}
|
|
31946
31963
|
}, closeDelay);
|
|
31947
31964
|
};
|
|
31948
|
-
return /* @__PURE__ */ jsxs21(
|
|
31965
|
+
return /* @__PURE__ */ jsxs21(Fragment6, { children: [
|
|
31949
31966
|
/* @__PURE__ */ jsx43("div", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: triggerElement }),
|
|
31950
31967
|
/* @__PURE__ */ jsx43(Popover2, { isOpen: open, isNonModal: true, triggerRef, children: /* @__PURE__ */ jsx43(
|
|
31951
31968
|
"div",
|
|
@@ -32093,12 +32110,7 @@ var Menu_default = { "menu": "Menu_menu__YmUyN", "separator": "Menu_separator__N
|
|
|
32093
32110
|
// src/components/Menu.tsx
|
|
32094
32111
|
import { jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
32095
32112
|
function Menu2({ items, className, children, ...props }) {
|
|
32096
|
-
return /* @__PURE__ */ jsx47($3674c52c6b3c5bce$export$d9b273488cd8ce6f, { ...props, className: (0, import_classnames37.default)(Menu_default.menu, className), children
|
|
32097
|
-
if (item === null) {
|
|
32098
|
-
return /* @__PURE__ */ jsx47($431f98aba6844401$export$1ff3c3f08ae963c0, { className: Menu_default.separator }, index);
|
|
32099
|
-
}
|
|
32100
|
-
return /* @__PURE__ */ jsx47(MenuItem2, { id: item, children: item }, index);
|
|
32101
|
-
}) });
|
|
32113
|
+
return /* @__PURE__ */ jsx47($3674c52c6b3c5bce$export$d9b273488cd8ce6f, { ...props, className: (0, import_classnames37.default)(Menu_default.menu, className), children });
|
|
32102
32114
|
}
|
|
32103
32115
|
function MenuItem2({ children, className, ...props }) {
|
|
32104
32116
|
return /* @__PURE__ */ jsxs24($3674c52c6b3c5bce$export$2ce376c2cc3355c8, { ...props, className: (0, import_classnames37.default)(Menu_default.item, className), children: [
|
|
@@ -32213,10 +32225,10 @@ var import_classnames41 = __toESM(require_classnames());
|
|
|
32213
32225
|
var ProgressBar_default = { "progressbar": "ProgressBar_progressbar__YzdlO", "track": "ProgressBar_track__YzgzY", "fill": "ProgressBar_fill__ZTJlM", "value": "ProgressBar_value__NDk1Z" };
|
|
32214
32226
|
|
|
32215
32227
|
// src/components/ProgressBar.tsx
|
|
32216
|
-
import { Fragment as
|
|
32228
|
+
import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
32217
32229
|
function ProgressBar2({ className, showValue, ...props }) {
|
|
32218
32230
|
return /* @__PURE__ */ jsx51($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames41.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
|
|
32219
|
-
return /* @__PURE__ */ jsxs27(
|
|
32231
|
+
return /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
32220
32232
|
/* @__PURE__ */ jsx51("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ jsx51("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
|
|
32221
32233
|
showValue && /* @__PURE__ */ jsx51("div", { className: ProgressBar_default.value, children: valueText })
|
|
32222
32234
|
] });
|
|
@@ -32230,13 +32242,13 @@ var import_classnames42 = __toESM(require_classnames());
|
|
|
32230
32242
|
var ProgressCircle_default = { "progresscircle": "ProgressCircle_progresscircle__NGMyY", "track": "ProgressCircle_track__YzY2M", "fill": "ProgressCircle_fill__ZmMzM", "value": "ProgressCircle_value__YjM0Y" };
|
|
32231
32243
|
|
|
32232
32244
|
// src/components/ProgressCircle.tsx
|
|
32233
|
-
import { Fragment as
|
|
32245
|
+
import { Fragment as Fragment8, jsx as jsx52, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
32234
32246
|
function ProgressCircle({ className, showValue, ...props }) {
|
|
32235
32247
|
return /* @__PURE__ */ jsx52($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames42.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
|
|
32236
32248
|
const radius = 45;
|
|
32237
32249
|
const circumference = radius * 2 * Math.PI;
|
|
32238
32250
|
const offset = circumference - percentage / 100 * circumference;
|
|
32239
|
-
return /* @__PURE__ */ jsxs28(
|
|
32251
|
+
return /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
32240
32252
|
/* @__PURE__ */ jsxs28("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
32241
32253
|
/* @__PURE__ */ jsx52("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
|
|
32242
32254
|
/* @__PURE__ */ jsx52(
|
|
@@ -32285,7 +32297,7 @@ var import_classnames44 = __toESM(require_classnames());
|
|
|
32285
32297
|
var SearchField_default = { "search": "SearchField_search__MzkwY", "input": "SearchField_input__OGFiY", "close": "SearchField_close__NmJkM" };
|
|
32286
32298
|
|
|
32287
32299
|
// src/components/SearchField.tsx
|
|
32288
|
-
import { Fragment as
|
|
32300
|
+
import { Fragment as Fragment9, jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
32289
32301
|
var SearchField2 = forwardRef8(
|
|
32290
32302
|
({ label, placeholder, value, delay = 0, onSearch, className, ...props }, ref) => {
|
|
32291
32303
|
const [search, setSearch] = useState16(value ?? "");
|
|
@@ -32313,7 +32325,7 @@ var SearchField2 = forwardRef8(
|
|
|
32313
32325
|
className: (0, import_classnames44.default)(input_default.field, className),
|
|
32314
32326
|
onChange: handleChange,
|
|
32315
32327
|
children: ({ state }) => {
|
|
32316
|
-
return /* @__PURE__ */ jsxs30(
|
|
32328
|
+
return /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
32317
32329
|
label && /* @__PURE__ */ jsx54(Label2, { children: label }),
|
|
32318
32330
|
/* @__PURE__ */ jsxs30("div", { className: input_default.row, children: [
|
|
32319
32331
|
/* @__PURE__ */ jsx54(Icon, { className: (0, import_classnames44.default)(SearchField_default.search, input_default.icon), children: /* @__PURE__ */ jsx54(Icons.MagnifyingGlass, {}) }),
|
|
@@ -32345,19 +32357,25 @@ var import_classnames45 = __toESM(require_classnames());
|
|
|
32345
32357
|
import { forwardRef as forwardRef9 } from "react";
|
|
32346
32358
|
|
|
32347
32359
|
// css-modules:E:\dev\umami-react-zen\src\components\Select.module.css
|
|
32348
|
-
var Select_default = { "button": "
|
|
32360
|
+
var Select_default = { "button": "Select_button__ZGY1Y", "popover": "Select_popover__MTQ1Y", "list": "Select_list__MDYyZ", "icon": "Select_icon__N2M0O", "search": "Select_search__MWQwM" };
|
|
32349
32361
|
|
|
32350
32362
|
// src/components/Select.tsx
|
|
32351
32363
|
import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
32352
32364
|
var Select2 = forwardRef9(
|
|
32353
32365
|
({
|
|
32354
|
-
children,
|
|
32355
32366
|
items = [],
|
|
32356
32367
|
value,
|
|
32357
32368
|
label,
|
|
32358
|
-
|
|
32369
|
+
isLoading,
|
|
32370
|
+
allowSearch,
|
|
32371
|
+
searchDelay,
|
|
32372
|
+
onSearch,
|
|
32359
32373
|
onSelectionChange,
|
|
32360
32374
|
onChange,
|
|
32375
|
+
listProps,
|
|
32376
|
+
popoverProps,
|
|
32377
|
+
className,
|
|
32378
|
+
children,
|
|
32361
32379
|
...props
|
|
32362
32380
|
}, ref) => {
|
|
32363
32381
|
const handleChange = (e) => {
|
|
@@ -32377,7 +32395,27 @@ var Select2 = forwardRef9(
|
|
|
32377
32395
|
/* @__PURE__ */ jsx55($82d7e5349645de74$export$e288731fd71264f0, {}),
|
|
32378
32396
|
/* @__PURE__ */ jsx55("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx55(Icon, { rotate: 90, size: "xs", className: input_default.icon, children: /* @__PURE__ */ jsx55(Icons.Chevron, {}) }) })
|
|
32379
32397
|
] }) }),
|
|
32380
|
-
/* @__PURE__ */ jsx55(Popover2, { children: /* @__PURE__ */
|
|
32398
|
+
/* @__PURE__ */ jsx55(Popover2, { ...popoverProps, children: /* @__PURE__ */ jsxs31(Column, { className: Select_default.popover, children: [
|
|
32399
|
+
allowSearch && /* @__PURE__ */ jsx55(
|
|
32400
|
+
SearchField2,
|
|
32401
|
+
{
|
|
32402
|
+
className: Select_default.search,
|
|
32403
|
+
onSearch,
|
|
32404
|
+
delay: searchDelay,
|
|
32405
|
+
autoFocus: true
|
|
32406
|
+
}
|
|
32407
|
+
),
|
|
32408
|
+
isLoading && /* @__PURE__ */ jsx55(Loading, { icon: "dots", position: "center", size: "sm" }),
|
|
32409
|
+
/* @__PURE__ */ jsx55(
|
|
32410
|
+
List,
|
|
32411
|
+
{
|
|
32412
|
+
...listProps,
|
|
32413
|
+
className: (0, import_classnames45.default)(Select_default.list, listProps?.className),
|
|
32414
|
+
style: { ...listProps?.style, display: isLoading ? "none" : void 0 },
|
|
32415
|
+
children
|
|
32416
|
+
}
|
|
32417
|
+
)
|
|
32418
|
+
] }) })
|
|
32381
32419
|
]
|
|
32382
32420
|
}
|
|
32383
32421
|
);
|
|
@@ -32389,47 +32427,81 @@ var import_classnames46 = __toESM(require_classnames());
|
|
|
32389
32427
|
import { createContext as createContext4, useContext as useContext6 } from "react";
|
|
32390
32428
|
|
|
32391
32429
|
// css-modules:E:\dev\umami-react-zen\src\components\SideNav.module.css
|
|
32392
|
-
var SideNav_default = { "sidenav": "
|
|
32430
|
+
var SideNav_default = { "sidenav": "SideNav_sidenav__M2NlY", "header": "SideNav_header__NGU1Y", "name": "SideNav_name__OTM0N", "section": "SideNav_section__MTUxM", "title": "SideNav_title__YTg5O", "content": "SideNav_content__MjczM", "item": "SideNav_item__ZTlkN", "label": "SideNav_label__NDU1N", "collapsed": "SideNav_collapsed__YzExM", "muted": "SideNav_muted__MmRlM", "selected": "SideNav_selected__ZjY4N", "variant-quiet": "SideNav_variant-quiet__OTZlN", "variant-1": "SideNav_variant-1__NjVmN", "variant-2": "SideNav_variant-2__NWZjM", "variant-3": "SideNav_variant-3__ZDE4O", "noborder": "SideNav_noborder__YTJjO" };
|
|
32393
32431
|
|
|
32394
32432
|
// src/components/SideNav.tsx
|
|
32395
32433
|
import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
32396
32434
|
var SideNavContext = createContext4(null);
|
|
32397
|
-
function SideNav({
|
|
32398
|
-
|
|
32435
|
+
function SideNav({
|
|
32436
|
+
variant = "1",
|
|
32437
|
+
isCollapsed,
|
|
32438
|
+
muteItems = true,
|
|
32439
|
+
showBorder = true,
|
|
32440
|
+
className,
|
|
32441
|
+
children,
|
|
32442
|
+
...props
|
|
32443
|
+
}) {
|
|
32444
|
+
return /* @__PURE__ */ jsx56(SideNavContext.Provider, { value: { isCollapsed }, children: /* @__PURE__ */ jsx56(
|
|
32445
|
+
Column,
|
|
32446
|
+
{
|
|
32447
|
+
...props,
|
|
32448
|
+
className: (0, import_classnames46.default)(
|
|
32449
|
+
SideNav_default.sidenav,
|
|
32450
|
+
isCollapsed && SideNav_default.collapsed,
|
|
32451
|
+
muteItems && SideNav_default.muted,
|
|
32452
|
+
variant && SideNav_default[`variant-${variant}`],
|
|
32453
|
+
!showBorder && SideNav_default.noborder,
|
|
32454
|
+
className
|
|
32455
|
+
),
|
|
32456
|
+
children
|
|
32457
|
+
}
|
|
32458
|
+
) });
|
|
32459
|
+
}
|
|
32460
|
+
function SideNavSection({
|
|
32461
|
+
title,
|
|
32462
|
+
children
|
|
32463
|
+
}) {
|
|
32464
|
+
return /* @__PURE__ */ jsxs32(Column, { className: SideNav_default.section, children: [
|
|
32465
|
+
title && /* @__PURE__ */ jsx56("div", { className: SideNav_default.title, children: title }),
|
|
32466
|
+
/* @__PURE__ */ jsx56("div", { className: SideNav_default.content, children })
|
|
32467
|
+
] });
|
|
32399
32468
|
}
|
|
32400
32469
|
function SideNavHeader({
|
|
32401
|
-
|
|
32470
|
+
label,
|
|
32402
32471
|
icon,
|
|
32403
|
-
|
|
32472
|
+
className,
|
|
32473
|
+
children,
|
|
32474
|
+
...props
|
|
32404
32475
|
}) {
|
|
32405
|
-
return /* @__PURE__ */ jsxs32(
|
|
32476
|
+
return /* @__PURE__ */ jsxs32(Row, { ...props, className: (0, import_classnames46.default)(SideNav_default.header, className), children: [
|
|
32406
32477
|
icon && /* @__PURE__ */ jsx56(Icon, { size: "sm", children: icon }),
|
|
32407
|
-
/* @__PURE__ */ jsx56("div", { className: (0, import_classnames46.default)(SideNav_default.name, SideNav_default.label), children:
|
|
32478
|
+
/* @__PURE__ */ jsx56("div", { className: (0, import_classnames46.default)(SideNav_default.name, SideNav_default.label), children: label }),
|
|
32408
32479
|
children
|
|
32409
32480
|
] });
|
|
32410
32481
|
}
|
|
32411
|
-
function SideNavSection({ title, children }) {
|
|
32412
|
-
return /* @__PURE__ */ jsxs32("div", { className: SideNav_default.section, children: [
|
|
32413
|
-
title && /* @__PURE__ */ jsx56("div", { className: SideNav_default.title, children: title }),
|
|
32414
|
-
/* @__PURE__ */ jsx56("div", { className: SideNav_default.content, children })
|
|
32415
|
-
] });
|
|
32416
|
-
}
|
|
32417
32482
|
function SideNavItem({
|
|
32418
32483
|
label,
|
|
32419
32484
|
icon,
|
|
32485
|
+
isSelected,
|
|
32420
32486
|
className,
|
|
32487
|
+
children,
|
|
32421
32488
|
...props
|
|
32422
32489
|
}) {
|
|
32423
32490
|
const { isCollapsed } = useContext6(SideNavContext);
|
|
32424
|
-
|
|
32425
|
-
|
|
32426
|
-
|
|
32427
|
-
|
|
32428
|
-
|
|
32429
|
-
|
|
32430
|
-
|
|
32431
|
-
|
|
32432
|
-
|
|
32491
|
+
return /* @__PURE__ */ jsxs32($4e3b923658d69c60$export$8c610744efcf8a1d, { delay: 0, closeDelay: 0, isDisabled: !isCollapsed, children: [
|
|
32492
|
+
/* @__PURE__ */ jsx56($f645667febf57a63$export$35a3bebf7ef2d934, { children: /* @__PURE__ */ jsxs32(
|
|
32493
|
+
Row,
|
|
32494
|
+
{
|
|
32495
|
+
...props,
|
|
32496
|
+
className: (0, import_classnames46.default)(SideNav_default.item, className, isSelected && SideNav_default.selected),
|
|
32497
|
+
children: [
|
|
32498
|
+
icon && /* @__PURE__ */ jsx56(Icon, { size: "sm", children: icon }),
|
|
32499
|
+
label && /* @__PURE__ */ jsx56(Text, { className: (0, import_classnames46.default)(SideNav_default.label), children: label }),
|
|
32500
|
+
children
|
|
32501
|
+
]
|
|
32502
|
+
}
|
|
32503
|
+
) }),
|
|
32504
|
+
/* @__PURE__ */ jsx56(Tooltip2, { placement: "right", children: label })
|
|
32433
32505
|
] });
|
|
32434
32506
|
}
|
|
32435
32507
|
|
|
@@ -32441,7 +32513,7 @@ var import_classnames47 = __toESM(require_classnames());
|
|
|
32441
32513
|
var Slider_default = { "slider": "Slider_slider__MjBhO", "header": "Slider_header__ZTE2M", "track": "Slider_track__ODk5M", "fill": "Slider_fill__YzdhM", "thumb": "Slider_thumb__NGEzM" };
|
|
32442
32514
|
|
|
32443
32515
|
// src/components/Slider.tsx
|
|
32444
|
-
import { Fragment as
|
|
32516
|
+
import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
32445
32517
|
var Slider2 = forwardRef10(
|
|
32446
32518
|
({ className, showValue = true, label, ...props }, ref) => {
|
|
32447
32519
|
return /* @__PURE__ */ jsxs33($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames47.default)(Slider_default.slider, className), children: [
|
|
@@ -32451,7 +32523,7 @@ var Slider2 = forwardRef10(
|
|
|
32451
32523
|
] }),
|
|
32452
32524
|
/* @__PURE__ */ jsx57($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
|
|
32453
32525
|
const isHorizontal = state.orientation === "horizontal";
|
|
32454
|
-
return /* @__PURE__ */ jsxs33(
|
|
32526
|
+
return /* @__PURE__ */ jsxs33(Fragment10, { children: [
|
|
32455
32527
|
/* @__PURE__ */ jsx57(
|
|
32456
32528
|
"div",
|
|
32457
32529
|
{
|
|
@@ -32498,11 +32570,11 @@ var import_classnames49 = __toESM(require_classnames());
|
|
|
32498
32570
|
var Switch_default = { "switch": "Switch_switch__NzI0O", "track": "Switch_track__ZWU0O", "knob": "Switch_knob__YjFmZ" };
|
|
32499
32571
|
|
|
32500
32572
|
// src/components/Switch.tsx
|
|
32501
|
-
import { Fragment as
|
|
32573
|
+
import { Fragment as Fragment11, jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
32502
32574
|
var Switch2 = forwardRef11(
|
|
32503
32575
|
({ label, children, className, ...props }, ref) => {
|
|
32504
32576
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
32505
|
-
return /* @__PURE__ */ jsxs35(
|
|
32577
|
+
return /* @__PURE__ */ jsxs35(Fragment11, { children: [
|
|
32506
32578
|
label && /* @__PURE__ */ jsx59(Label2, { children: label }),
|
|
32507
32579
|
/* @__PURE__ */ jsxs35(
|
|
32508
32580
|
$8e59e948500a8fe1$export$b5d5cf8927ab7262,
|
|
@@ -32621,11 +32693,11 @@ var import_classnames52 = __toESM(require_classnames());
|
|
|
32621
32693
|
var Toggle_default = { "toggle": "Toggle_toggle__OWVjZ" };
|
|
32622
32694
|
|
|
32623
32695
|
// src/components/Toggle.tsx
|
|
32624
|
-
import { Fragment as
|
|
32696
|
+
import { Fragment as Fragment12, jsx as jsx63, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
32625
32697
|
var Toggle = forwardRef13(
|
|
32626
32698
|
({ label, children, className, ...props }, ref) => {
|
|
32627
32699
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
32628
|
-
return /* @__PURE__ */ jsxs37(
|
|
32700
|
+
return /* @__PURE__ */ jsxs37(Fragment12, { children: [
|
|
32629
32701
|
label && /* @__PURE__ */ jsx63(Label2, { children: label }),
|
|
32630
32702
|
/* @__PURE__ */ jsx63(
|
|
32631
32703
|
$efde0372d7a700fe$export$d2b052e7b4be1756,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/react-zen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.66.0",
|
|
4
4
|
"description": "React components built by Umami",
|
|
5
5
|
"author": "Umami <hello@umami.is>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"dev": "next dev -p
|
|
23
|
+
"dev": "next dev -p 9001 --turbo",
|
|
24
24
|
"build": "next build",
|
|
25
25
|
"start": "next start",
|
|
26
26
|
"lint": "next lint",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/react": "^19.0.9",
|
|
74
74
|
"@types/react-dom": "^19.0.3",
|
|
75
75
|
"@umami/esbuild-plugin-css-modules": "0.4.0",
|
|
76
|
-
"@umami/shiso": "^0.
|
|
76
|
+
"@umami/shiso": "^0.50.0",
|
|
77
77
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
78
78
|
"babel-plugin-syntax-hermes-parser": "^0.26.0",
|
|
79
79
|
"dts-bundle": "^0.7.3",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"esbuild-css-modules-plugin": "^3.1.2",
|
|
82
82
|
"esbuild-plugin-svgr": "^3.1.0",
|
|
83
83
|
"esbuild-postcss": "^0.0.4",
|
|
84
|
-
"eslint": "^
|
|
84
|
+
"eslint": "^8.16.0",
|
|
85
85
|
"eslint-config-next": "15.2.2",
|
|
86
86
|
"eslint-config-prettier": "^10.1.1",
|
|
87
87
|
"eslint-import-resolver-alias": "^1.1.2",
|