@umami/react-zen 0.116.0 → 0.118.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.mjs CHANGED
@@ -25996,7 +25996,7 @@ function FormButtons({ fill, children, ...props }) {
25996
25996
  }
25997
25997
 
25998
25998
  // src/components/forms/FormField.tsx
25999
- import { cloneElement as cloneElement2, forwardRef, Children } from "react";
25999
+ import { cloneElement as cloneElement2, Children } from "react";
26000
26000
  var import_classnames6 = __toESM(require_classnames());
26001
26001
 
26002
26002
  // css-modules:E:\dev\umami-react-zen\src\components\forms\FormField.module.css
@@ -26004,25 +26004,30 @@ var FormField_default = { "field": "FormField_field__YTM1N", "description": "For
26004
26004
 
26005
26005
  // src/components/forms/FormField.tsx
26006
26006
  import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
26007
- var FormField = forwardRef(
26008
- ({ name, description, label, rules, className, children, ...props }, ref) => {
26009
- const { formState, control } = useFormContext();
26010
- const { field } = useController({ name, control, rules });
26011
- const errors = formState?.errors || {};
26012
- const errorMessage = errors[name]?.message;
26013
- return /* @__PURE__ */ jsxs3("div", { ...props, ref, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
26014
- typeof children === "function" ? children(field) : Children.map(
26015
- children,
26016
- (child) => child ? cloneElement2(child, { ...field, label: child.props.label || label }) : null
26017
- ),
26018
- description && /* @__PURE__ */ jsx9("div", { className: FormField_default.description, children: description }),
26019
- errorMessage && /* @__PURE__ */ jsx9("div", { className: FormField_default.error, children: errorMessage })
26020
- ] });
26021
- }
26022
- );
26007
+ function FormField({
26008
+ name,
26009
+ description,
26010
+ label,
26011
+ rules,
26012
+ className,
26013
+ children,
26014
+ ...props
26015
+ }) {
26016
+ const { formState, control } = useFormContext();
26017
+ const { field } = useController({ name, control, rules });
26018
+ const errors = formState?.errors || {};
26019
+ const errorMessage = errors[name]?.message;
26020
+ return /* @__PURE__ */ jsxs3("div", { ...props, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
26021
+ typeof children === "function" ? children(field) : Children.map(
26022
+ children,
26023
+ (child) => child ? cloneElement2(child, { ...field, label: child.props.label || label }) : null
26024
+ ),
26025
+ description && /* @__PURE__ */ jsx9("div", { className: FormField_default.description, children: description }),
26026
+ errorMessage && /* @__PURE__ */ jsx9("div", { className: FormField_default.error, children: errorMessage })
26027
+ ] });
26028
+ }
26023
26029
 
26024
26030
  // src/components/Button.tsx
26025
- import { forwardRef as forwardRef2 } from "react";
26026
26031
  var import_classnames7 = __toESM(require_classnames());
26027
26032
 
26028
26033
  // css-modules:E:\dev\umami-react-zen\src\components\Button.module.css
@@ -26030,35 +26035,32 @@ var Button_default = { "button": "Button_button__NDYwM", "primary": "Button_prim
26030
26035
 
26031
26036
  // src/components/Button.tsx
26032
26037
  import { jsx as jsx10 } from "react/jsx-runtime";
26033
- var Button2 = forwardRef2(
26034
- ({
26035
- variant = "secondary",
26036
- size = "md",
26037
- asChild,
26038
- preventFocusOnPress = true,
26039
- className,
26040
- children,
26041
- ...props
26042
- }, ref) => {
26043
- const Component = asChild ? Slot : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
26044
- const buttonProps = Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? { preventFocusOnPress } : void 0;
26045
- return /* @__PURE__ */ jsx10(
26046
- Component,
26047
- {
26048
- ...props,
26049
- ...buttonProps,
26050
- ref,
26051
- className: (0, import_classnames7.default)(
26052
- Button_default.button,
26053
- className,
26054
- variant && Button_default[variant],
26055
- size && Button_default[size]
26056
- ),
26057
- children
26058
- }
26059
- );
26060
- }
26061
- );
26038
+ function Button2({
26039
+ variant = "secondary",
26040
+ size = "md",
26041
+ asChild,
26042
+ preventFocusOnPress = true,
26043
+ className,
26044
+ children,
26045
+ ...props
26046
+ }) {
26047
+ const Component = asChild ? Slot : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
26048
+ const buttonProps = Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? { preventFocusOnPress } : void 0;
26049
+ return /* @__PURE__ */ jsx10(
26050
+ Component,
26051
+ {
26052
+ ...props,
26053
+ ...buttonProps,
26054
+ className: (0, import_classnames7.default)(
26055
+ Button_default.button,
26056
+ className,
26057
+ variant && Button_default[variant],
26058
+ size && Button_default[size]
26059
+ ),
26060
+ children
26061
+ }
26062
+ );
26063
+ }
26062
26064
 
26063
26065
  // src/components/forms/FormResetButton.tsx
26064
26066
  import { jsx as jsx11 } from "react/jsx-runtime";
@@ -27182,7 +27184,7 @@ import { useContext as useContext2, useMemo, useRef as useRef6 } from "react";
27182
27184
 
27183
27185
  // node_modules/.pnpm/@react-spring+animated@9.7.5_react@19.1.0/node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs
27184
27186
  import * as React4 from "react";
27185
- import { forwardRef as forwardRef3, useRef as useRef5, useCallback, useEffect as useEffect5 } from "react";
27187
+ import { forwardRef, useRef as useRef5, useCallback, useEffect as useEffect5 } from "react";
27186
27188
  var $node = Symbol.for("Animated:node");
27187
27189
  var isAnimated = (value) => !!value && value[$node] === value;
27188
27190
  var getAnimated = (owner) => owner && owner[$node];
@@ -27369,7 +27371,7 @@ var withAnimated = (Component, host2) => {
27369
27371
  // re-rendered on every animation frame.
27370
27372
  !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent
27371
27373
  );
27372
- return forwardRef3((givenProps, givenRef) => {
27374
+ return forwardRef((givenProps, givenRef) => {
27373
27375
  const instanceRef = useRef5(null);
27374
27376
  const ref = hasInstance && // eslint-disable-next-line react-hooks/rules-of-hooks
27375
27377
  useCallback(
@@ -29756,7 +29758,7 @@ var animated = host.animated;
29756
29758
  var import_classnames10 = __toESM(require_classnames());
29757
29759
  import { useEffect as useEffect6, useState as useState5 } from "react";
29758
29760
 
29759
- // node_modules/.pnpm/zustand@5.0.4_@types+react@_42140c18b55ae1e0eb4a005a18cf040e/node_modules/zustand/esm/vanilla.mjs
29761
+ // node_modules/.pnpm/zustand@5.0.5_@types+react@_a1d6b7db10f76afd26403e7782bb5bbf/node_modules/zustand/esm/vanilla.mjs
29760
29762
  var createStoreImpl = (createState) => {
29761
29763
  let state;
29762
29764
  const listeners = /* @__PURE__ */ new Set();
@@ -29780,7 +29782,7 @@ var createStoreImpl = (createState) => {
29780
29782
  };
29781
29783
  var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
29782
29784
 
29783
- // node_modules/.pnpm/zustand@5.0.4_@types+react@_42140c18b55ae1e0eb4a005a18cf040e/node_modules/zustand/esm/react.mjs
29785
+ // node_modules/.pnpm/zustand@5.0.5_@types+react@_a1d6b7db10f76afd26403e7782bb5bbf/node_modules/zustand/esm/react.mjs
29784
29786
  import React6 from "react";
29785
29787
  var identity = (arg) => arg;
29786
29788
  function useStore(api, selector = identity) {
@@ -30184,9 +30186,6 @@ function Calendar2({
30184
30186
  );
30185
30187
  }
30186
30188
 
30187
- // src/components/Checkbox.tsx
30188
- import { forwardRef as forwardRef4 } from "react";
30189
-
30190
30189
  // node_modules/.pnpm/react-icons@5.5.0_react@19.1.0/node_modules/react-icons/im/index.mjs
30191
30190
  function ImCheckmark(props) {
30192
30191
  return GenIcon({ "tag": "svg", "attr": { "version": "1.1", "viewBox": "0 0 16 16" }, "child": [{ "tag": "path", "attr": { "d": "M13.5 2l-7.5 7.5-3.5-3.5-2.5 2.5 6 6 10-10z" }, "child": [] }] })(props);
@@ -30200,26 +30199,23 @@ var Checkbox_default = { "checkbox": "Checkbox_checkbox__OTliN", "box": "Checkbo
30200
30199
 
30201
30200
  // src/components/Checkbox.tsx
30202
30201
  import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
30203
- var Checkbox2 = forwardRef4(
30204
- ({ label, className, children, ...props }, ref) => {
30205
- const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
30206
- return /* @__PURE__ */ jsx25(
30207
- $bc237834342dbd75$export$48513f6b9f8ce62d,
30208
- {
30209
- ...props,
30210
- ref,
30211
- isSelected,
30212
- className: (0, import_classnames17.default)(Checkbox_default.checkbox, className),
30213
- children: ({ isIndeterminate, isSelected: isSelected2 }) => {
30214
- return /* @__PURE__ */ jsxs13(Fragment3, { children: [
30215
- /* @__PURE__ */ jsx25("div", { className: Checkbox_default.box, children: /* @__PURE__ */ jsx25(Icon, { className: Checkbox_default.icon, size: "xs", children: isIndeterminate ? /* @__PURE__ */ jsx25(Icons.Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx25(ImCheckmark, {}) : null }) }),
30216
- children
30217
- ] });
30218
- }
30202
+ function Checkbox2({ label, className, children, ...props }) {
30203
+ const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
30204
+ return /* @__PURE__ */ jsx25(
30205
+ $bc237834342dbd75$export$48513f6b9f8ce62d,
30206
+ {
30207
+ ...props,
30208
+ isSelected,
30209
+ className: (0, import_classnames17.default)(Checkbox_default.checkbox, className),
30210
+ children: ({ isIndeterminate, isSelected: isSelected2 }) => {
30211
+ return /* @__PURE__ */ jsxs13(Fragment3, { children: [
30212
+ /* @__PURE__ */ jsx25("div", { className: Checkbox_default.box, children: /* @__PURE__ */ jsx25(Icon, { className: Checkbox_default.icon, size: "xs", children: isIndeterminate ? /* @__PURE__ */ jsx25(Icons.Minus, {}) : isSelected2 ? /* @__PURE__ */ jsx25(ImCheckmark, {}) : null }) }),
30213
+ children
30214
+ ] });
30219
30215
  }
30220
- );
30221
- }
30222
- );
30216
+ }
30217
+ );
30218
+ }
30223
30219
 
30224
30220
  // css-modules:E:\dev\umami-react-zen\src\components\Code.module.css
30225
30221
  var Code_default = { "code": "Code_code__NmYxN" };
@@ -30266,7 +30262,7 @@ var import_classnames22 = __toESM(require_classnames());
30266
30262
  import { useState as useState10 } from "react";
30267
30263
 
30268
30264
  // src/components/TextField.tsx
30269
- import { useEffect as useEffect9, useState as useState9, forwardRef as forwardRef5 } from "react";
30265
+ import { useEffect as useEffect9, useState as useState9 } from "react";
30270
30266
  var import_classnames21 = __toESM(require_classnames());
30271
30267
 
30272
30268
  // src/components/Label.tsx
@@ -30313,55 +30309,52 @@ var TextField_default = { "allowCopy": "TextField_allowCopy__Y2RhY", "icon": "Te
30313
30309
 
30314
30310
  // src/components/TextField.tsx
30315
30311
  import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
30316
- var TextField2 = forwardRef5(
30317
- ({
30318
- value,
30319
- defaultValue,
30320
- label,
30321
- placeholder,
30322
- allowCopy,
30323
- asChild,
30324
- className,
30325
- onChange,
30326
- children,
30327
- ...props
30328
- }, ref) => {
30329
- const [inputValue, setInputValue] = useState9(defaultValue || value);
30330
- const Component = asChild ? Slot : $3985021b0ad6602f$export$f5b8910cec6cf069;
30331
- const handleChange = (e) => {
30332
- setInputValue(e.target.value);
30333
- return onChange?.(e);
30334
- };
30335
- useEffect9(() => {
30336
- setInputValue(value);
30337
- }, [value]);
30338
- return /* @__PURE__ */ jsxs14(
30339
- $bcdf0525bf22703d$export$2c73285ae9390cec,
30340
- {
30341
- "aria-label": "Text",
30342
- ...props,
30343
- ref,
30344
- value: inputValue,
30345
- className: (0, import_classnames21.default)(input_default.field, className),
30346
- children: [
30347
- label && /* @__PURE__ */ jsx30(Label2, { children: label }),
30348
- /* @__PURE__ */ jsxs14("div", { className: input_default.row, children: [
30349
- /* @__PURE__ */ jsx30(
30350
- Component,
30351
- {
30352
- className: (0, import_classnames21.default)(TextField_default.input, input_default.input, allowCopy && TextField_default.allowCopy),
30353
- placeholder,
30354
- onChange: handleChange,
30355
- children
30356
- }
30357
- ),
30358
- allowCopy && /* @__PURE__ */ jsx30(CopyButton, { className: (0, import_classnames21.default)(TextField_default.icon, input_default.icon), value: inputValue })
30359
- ] })
30360
- ]
30361
- }
30362
- );
30363
- }
30364
- );
30312
+ function TextField2({
30313
+ value,
30314
+ defaultValue,
30315
+ label,
30316
+ placeholder,
30317
+ allowCopy,
30318
+ asChild,
30319
+ className,
30320
+ onChange,
30321
+ children,
30322
+ ...props
30323
+ }) {
30324
+ const [inputValue, setInputValue] = useState9(defaultValue || value);
30325
+ const Component = asChild ? Slot : $3985021b0ad6602f$export$f5b8910cec6cf069;
30326
+ const handleChange = (e) => {
30327
+ setInputValue(e.target.value);
30328
+ return onChange?.(e);
30329
+ };
30330
+ useEffect9(() => {
30331
+ setInputValue(value);
30332
+ }, [value]);
30333
+ return /* @__PURE__ */ jsxs14(
30334
+ $bcdf0525bf22703d$export$2c73285ae9390cec,
30335
+ {
30336
+ "aria-label": "Text",
30337
+ ...props,
30338
+ value: inputValue,
30339
+ className: (0, import_classnames21.default)(input_default.field, className),
30340
+ children: [
30341
+ label && /* @__PURE__ */ jsx30(Label2, { children: label }),
30342
+ /* @__PURE__ */ jsxs14("div", { className: input_default.row, children: [
30343
+ /* @__PURE__ */ jsx30(
30344
+ Component,
30345
+ {
30346
+ className: (0, import_classnames21.default)(TextField_default.input, input_default.input, allowCopy && TextField_default.allowCopy),
30347
+ placeholder,
30348
+ onChange: handleChange,
30349
+ children
30350
+ }
30351
+ ),
30352
+ allowCopy && /* @__PURE__ */ jsx30(CopyButton, { className: (0, import_classnames21.default)(TextField_default.icon, input_default.icon), value: inputValue })
30353
+ ] })
30354
+ ]
30355
+ }
30356
+ );
30357
+ }
30365
30358
 
30366
30359
  // css-modules:E:\dev\umami-react-zen\src\components\ConfirmationDialog.module.css
30367
30360
  var ConfirmationDialog_default = { "dialog": "ConfirmationDialog_dialog__Mzg4M", "value": "ConfirmationDialog_value__YzhjZ" };
@@ -30958,21 +30951,16 @@ import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
30958
30951
  function Menu2({ className, children, ...props }) {
30959
30952
  return /* @__PURE__ */ jsx44($3674c52c6b3c5bce$export$d9b273488cd8ce6f, { ...props, className: (0, import_classnames34.default)(Menu_default.menu, className), children });
30960
30953
  }
30961
- function MenuItem2({ children, className, ...props }) {
30954
+ function MenuItem2({ showChecked = false, children, className, ...props }) {
30962
30955
  return /* @__PURE__ */ jsxs23($3674c52c6b3c5bce$export$2ce376c2cc3355c8, { ...props, className: (0, import_classnames34.default)(Menu_default.item, className), children: [
30963
30956
  children,
30964
- /* @__PURE__ */ jsx44("div", { "aria-hidden": "true", className: Menu_default.check, children: /* @__PURE__ */ jsx44(Icon, { children: /* @__PURE__ */ jsx44(Icons.Check, {}) }) })
30957
+ showChecked && /* @__PURE__ */ jsx44("div", { "aria-hidden": "true", className: Menu_default.check, children: /* @__PURE__ */ jsx44(Icon, { children: /* @__PURE__ */ jsx44(Icons.Check, {}) }) })
30965
30958
  ] });
30966
30959
  }
30967
30960
  function MenuSeparator({ className, ...props }) {
30968
30961
  return /* @__PURE__ */ jsx44($431f98aba6844401$export$1ff3c3f08ae963c0, { ...props, className: (0, import_classnames34.default)(Menu_default.separator, className) });
30969
30962
  }
30970
- function MenuSection({
30971
- title,
30972
- className,
30973
- children,
30974
- ...props
30975
- }) {
30963
+ function MenuSection({ title, className, children, ...props }) {
30976
30964
  return /* @__PURE__ */ jsxs23($3674c52c6b3c5bce$export$4b1545b4f2016d26, { ...props, className: (0, import_classnames34.default)(Menu_default.section, className), children: [
30977
30965
  title && /* @__PURE__ */ jsx44($72a5793c14baf454$export$8b251419efc915eb, { className: Menu_default.header, children: title }),
30978
30966
  children
@@ -31064,7 +31052,7 @@ function NavMenuItem({ isSelected, className, children, ...props }) {
31064
31052
  }
31065
31053
 
31066
31054
  // src/components/PasswordField.tsx
31067
- import { useState as useState15, forwardRef as forwardRef6 } from "react";
31055
+ import { useState as useState15 } from "react";
31068
31056
  var import_classnames38 = __toESM(require_classnames());
31069
31057
 
31070
31058
  // css-modules:E:\dev\umami-react-zen\src\components\PasswordField.module.css
@@ -31072,20 +31060,18 @@ var PasswordField_default = { "icon": "PasswordField_icon__NTRlM" };
31072
31060
 
31073
31061
  // src/components/PasswordField.tsx
31074
31062
  import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
31075
- var PasswordField = forwardRef6(
31076
- ({ label, className, ...props }, ref) => {
31077
- const [show, setShow] = useState15(false);
31078
- const type = show ? "text" : "password";
31079
- const handleShowPassword = () => setShow((state) => !state);
31080
- return /* @__PURE__ */ jsxs25($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, ref, className: (0, import_classnames38.default)(input_default.field, className), children: [
31081
- label && /* @__PURE__ */ jsx48(Label2, { children: label }),
31082
- /* @__PURE__ */ jsxs25("div", { className: input_default.row, children: [
31083
- /* @__PURE__ */ jsx48($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: input_default.input }),
31084
- /* @__PURE__ */ jsx48(Icon, { onClick: handleShowPassword, className: (0, import_classnames38.default)(PasswordField_default.icon, input_default.icon), children: show ? /* @__PURE__ */ jsx48(Icons.EyeSlash, {}) : /* @__PURE__ */ jsx48(Icons.Eye, {}) })
31085
- ] })
31086
- ] });
31087
- }
31088
- );
31063
+ function PasswordField({ label, className, ...props }) {
31064
+ const [show, setShow] = useState15(false);
31065
+ const type = show ? "text" : "password";
31066
+ const handleShowPassword = () => setShow((state) => !state);
31067
+ return /* @__PURE__ */ jsxs25($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, className: (0, import_classnames38.default)(input_default.field, className), children: [
31068
+ label && /* @__PURE__ */ jsx48(Label2, { children: label }),
31069
+ /* @__PURE__ */ jsxs25("div", { className: input_default.row, children: [
31070
+ /* @__PURE__ */ jsx48($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: input_default.input }),
31071
+ /* @__PURE__ */ jsx48(Icon, { onClick: handleShowPassword, className: (0, import_classnames38.default)(PasswordField_default.icon, input_default.icon), children: show ? /* @__PURE__ */ jsx48(Icons.EyeSlash, {}) : /* @__PURE__ */ jsx48(Icons.Eye, {}) })
31072
+ ] })
31073
+ ] });
31074
+ }
31089
31075
 
31090
31076
  // src/components/Popover.tsx
31091
31077
  var import_classnames39 = __toESM(require_classnames());
@@ -31150,7 +31136,6 @@ function ProgressCircle({ className, showValue, ...props }) {
31150
31136
  }
31151
31137
 
31152
31138
  // src/components/RadioGroup.tsx
31153
- import { forwardRef as forwardRef7 } from "react";
31154
31139
  var import_classnames42 = __toESM(require_classnames());
31155
31140
 
31156
31141
  // css-modules:E:\dev\umami-react-zen\src\components\RadioGroup.module.css
@@ -31158,20 +31143,18 @@ var RadioGroup_default = { "radiogroup": "RadioGroup_radiogroup__ZjI3O", "radio"
31158
31143
 
31159
31144
  // src/components/RadioGroup.tsx
31160
31145
  import { jsx as jsx52, jsxs as jsxs28 } from "react/jsx-runtime";
31161
- var RadioGroup2 = forwardRef7(
31162
- ({ label, children, className, ...props }, ref) => {
31163
- return /* @__PURE__ */ jsxs28($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames42.default)(RadioGroup_default.radiogroup, className), children: [
31164
- label && /* @__PURE__ */ jsx52(Label2, { children: label }),
31165
- children
31166
- ] });
31167
- }
31168
- );
31146
+ function RadioGroup2({ label, children, className, ...props }) {
31147
+ return /* @__PURE__ */ jsxs28($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, className: (0, import_classnames42.default)(RadioGroup_default.radiogroup, className), children: [
31148
+ label && /* @__PURE__ */ jsx52(Label2, { children: label }),
31149
+ children
31150
+ ] });
31151
+ }
31169
31152
  function Radio2({ children, className, ...props }) {
31170
31153
  return /* @__PURE__ */ jsx52($b6c3ddc6086f204d$export$d7b12c4107be0d61, { ...props, className: (0, import_classnames42.default)(RadioGroup_default.radio, className), children });
31171
31154
  }
31172
31155
 
31173
31156
  // src/components/SearchField.tsx
31174
- import { useState as useState16, useEffect as useEffect12, forwardRef as forwardRef8 } from "react";
31157
+ import { useState as useState16, useEffect as useEffect12 } from "react";
31175
31158
  var import_classnames43 = __toESM(require_classnames());
31176
31159
 
31177
31160
  // css-modules:E:\dev\umami-react-zen\src\components\SearchField.module.css
@@ -31179,136 +31162,138 @@ var SearchField_default = { "search": "SearchField_search__MzkwY", "input": "Sea
31179
31162
 
31180
31163
  // src/components/SearchField.tsx
31181
31164
  import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
31182
- var SearchField2 = forwardRef8(
31183
- ({ label, placeholder, value, delay = 0, onSearch, className, ...props }, ref) => {
31184
- const [search, setSearch] = useState16(value ?? "");
31185
- const searchValue = useDebounce(search, delay);
31186
- const handleChange = (value2) => {
31187
- setSearch(value2);
31188
- if (delay === 0 || value2 === "") {
31189
- onSearch?.(value2);
31190
- }
31191
- };
31192
- const resetSearch = () => {
31193
- setSearch("");
31194
- onSearch?.("");
31195
- };
31196
- useEffect12(() => {
31197
- if (delay > 0) {
31198
- onSearch?.(searchValue);
31199
- }
31200
- }, [searchValue, delay]);
31201
- return /* @__PURE__ */ jsx53(
31202
- $440f4836bcb56932$export$b94867ecbd698f21,
31203
- {
31204
- "aria-label": "Search",
31205
- ...props,
31206
- ref,
31207
- className: (0, import_classnames43.default)(input_default.field, className),
31208
- onChange: handleChange,
31209
- children: ({ state }) => {
31210
- return /* @__PURE__ */ jsxs29(Fragment9, { children: [
31211
- label && /* @__PURE__ */ jsx53(Label2, { children: label }),
31212
- /* @__PURE__ */ jsxs29("div", { className: input_default.row, children: [
31213
- /* @__PURE__ */ jsx53(Icon, { className: (0, import_classnames43.default)(SearchField_default.search, input_default.icon), children: /* @__PURE__ */ jsx53(Icons.MagnifyingGlass, {}) }),
31214
- /* @__PURE__ */ jsx53(
31215
- $3985021b0ad6602f$export$f5b8910cec6cf069,
31216
- {
31217
- className: (0, import_classnames43.default)(SearchField_default.input, input_default.input),
31218
- placeholder
31219
- }
31220
- ),
31221
- state.value && /* @__PURE__ */ jsx53(
31222
- $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
31223
- {
31224
- className: (0, import_classnames43.default)(SearchField_default.close, input_default.icon),
31225
- onPress: resetSearch,
31226
- children: /* @__PURE__ */ jsx53(Icon, { size: "sm", children: /* @__PURE__ */ jsx53(Icons.Close, {}) })
31227
- }
31228
- )
31229
- ] })
31230
- ] });
31231
- }
31232
- }
31233
- );
31234
- }
31235
- );
31236
-
31237
- // src/components/Select.tsx
31238
- import { forwardRef as forwardRef9, useState as useState17 } from "react";
31239
- import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
31240
- var Select2 = forwardRef9(
31241
- ({
31242
- items = [],
31243
- value,
31244
- defaultValue,
31245
- label,
31246
- isLoading,
31247
- allowSearch,
31248
- searchValue,
31249
- searchDelay,
31250
- onSearch,
31251
- onSelectionChange,
31252
- onChange,
31253
- buttonProps,
31254
- listProps,
31255
- popoverProps,
31256
- renderValue,
31257
- className,
31258
- children,
31259
- ...props
31260
- }, ref) => {
31261
- const [search, setSearch] = useState17("");
31262
- const handleChange = (e) => {
31263
- onSelectionChange?.(e);
31264
- onChange?.(e);
31265
- };
31266
- const handleSearch = (value2) => {
31267
- setSearch(value2);
31165
+ function SearchField2({
31166
+ label,
31167
+ placeholder,
31168
+ value,
31169
+ delay = 0,
31170
+ onSearch,
31171
+ className,
31172
+ ...props
31173
+ }) {
31174
+ const [search, setSearch] = useState16(value ?? "");
31175
+ const searchValue = useDebounce(search, delay);
31176
+ const handleChange = (value2) => {
31177
+ setSearch(value2);
31178
+ if (delay === 0 || value2 === "") {
31268
31179
  onSearch?.(value2);
31269
- };
31270
- return /* @__PURE__ */ jsxs30(
31271
- $82d7e5349645de74$export$ef9b1a59e592288f,
31272
- {
31273
- "aria-label": "Select",
31274
- ...props,
31275
- ref,
31276
- selectedKey: value,
31277
- defaultSelectedKey: defaultValue,
31278
- onSelectionChange: handleChange,
31279
- children: [
31280
- label && /* @__PURE__ */ jsx54(Label2, { children: label }),
31281
- /* @__PURE__ */ jsx54(Button2, { variant: "outline", ...buttonProps, children: /* @__PURE__ */ jsxs30(Row, { justifyContent: "space-between", gap: "3", children: [
31282
- /* @__PURE__ */ jsx54($82d7e5349645de74$export$e288731fd71264f0, { children: renderValue }),
31283
- /* @__PURE__ */ jsx54("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx54(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ jsx54(Icons.Chevron, {}) }) })
31284
- ] }) }),
31285
- /* @__PURE__ */ jsx54(Popover2, { ...popoverProps, children: /* @__PURE__ */ jsx54(Column, { children: /* @__PURE__ */ jsxs30(Box, { padding: "2", border: true, borderRadius: true, backgroundColor: true, shadow: "3", children: [
31286
- allowSearch && /* @__PURE__ */ jsx54(Box, { marginBottom: "2", children: /* @__PURE__ */ jsx54(
31287
- SearchField2,
31180
+ }
31181
+ };
31182
+ const resetSearch = () => {
31183
+ setSearch("");
31184
+ onSearch?.("");
31185
+ };
31186
+ useEffect12(() => {
31187
+ if (delay > 0) {
31188
+ onSearch?.(searchValue);
31189
+ }
31190
+ }, [searchValue, delay]);
31191
+ return /* @__PURE__ */ jsx53(
31192
+ $440f4836bcb56932$export$b94867ecbd698f21,
31193
+ {
31194
+ ...props,
31195
+ "aria-label": "Search",
31196
+ className: (0, import_classnames43.default)(input_default.field, className),
31197
+ onChange: handleChange,
31198
+ children: ({ state }) => {
31199
+ return /* @__PURE__ */ jsxs29(Fragment9, { children: [
31200
+ label && /* @__PURE__ */ jsx53(Label2, { children: label }),
31201
+ /* @__PURE__ */ jsxs29("div", { className: input_default.row, children: [
31202
+ /* @__PURE__ */ jsx53(Icon, { className: (0, import_classnames43.default)(SearchField_default.search, input_default.icon), children: /* @__PURE__ */ jsx53(Icons.MagnifyingGlass, {}) }),
31203
+ /* @__PURE__ */ jsx53(
31204
+ $3985021b0ad6602f$export$f5b8910cec6cf069,
31288
31205
  {
31289
- value: search,
31290
- onSearch: handleSearch,
31291
- delay: searchDelay,
31292
- defaultValue: searchValue,
31293
- autoFocus: true
31206
+ className: (0, import_classnames43.default)(SearchField_default.input, input_default.input),
31207
+ placeholder
31294
31208
  }
31295
- ) }),
31296
- isLoading && /* @__PURE__ */ jsx54(Loading, { icon: "dots", position: "center", size: "sm" }),
31297
- /* @__PURE__ */ jsx54(
31298
- List,
31209
+ ),
31210
+ state.value && /* @__PURE__ */ jsx53(
31211
+ $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
31299
31212
  {
31300
- ...listProps,
31301
- items,
31302
- style: { ...listProps?.style, display: isLoading ? "none" : void 0 },
31303
- children
31213
+ className: (0, import_classnames43.default)(SearchField_default.close, input_default.icon),
31214
+ onPress: resetSearch,
31215
+ children: /* @__PURE__ */ jsx53(Icon, { size: "sm", children: /* @__PURE__ */ jsx53(Icons.Close, {}) })
31304
31216
  }
31305
31217
  )
31306
- ] }) }) })
31307
- ]
31218
+ ] })
31219
+ ] });
31308
31220
  }
31309
- );
31310
- }
31311
- );
31221
+ }
31222
+ );
31223
+ }
31224
+
31225
+ // src/components/Select.tsx
31226
+ import { useState as useState17 } from "react";
31227
+ import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
31228
+ function Select2({
31229
+ items = [],
31230
+ value,
31231
+ defaultValue,
31232
+ label,
31233
+ isLoading,
31234
+ allowSearch,
31235
+ searchValue,
31236
+ searchDelay,
31237
+ onSearch,
31238
+ onSelectionChange,
31239
+ onChange,
31240
+ buttonProps,
31241
+ listProps,
31242
+ popoverProps,
31243
+ renderValue,
31244
+ className,
31245
+ children,
31246
+ ...props
31247
+ }) {
31248
+ const [search, setSearch] = useState17("");
31249
+ const handleChange = (e) => {
31250
+ onSelectionChange?.(e);
31251
+ onChange?.(e);
31252
+ };
31253
+ const handleSearch = (value2) => {
31254
+ setSearch(value2);
31255
+ onSearch?.(value2);
31256
+ };
31257
+ return /* @__PURE__ */ jsxs30(
31258
+ $82d7e5349645de74$export$ef9b1a59e592288f,
31259
+ {
31260
+ "aria-label": "Select",
31261
+ ...props,
31262
+ selectedKey: value,
31263
+ defaultSelectedKey: defaultValue,
31264
+ onSelectionChange: handleChange,
31265
+ children: [
31266
+ label && /* @__PURE__ */ jsx54(Label2, { children: label }),
31267
+ /* @__PURE__ */ jsx54(Button2, { variant: "outline", ...buttonProps, children: /* @__PURE__ */ jsxs30(Row, { justifyContent: "space-between", gap: "3", children: [
31268
+ /* @__PURE__ */ jsx54($82d7e5349645de74$export$e288731fd71264f0, { children: renderValue }),
31269
+ /* @__PURE__ */ jsx54("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx54(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ jsx54(Icons.Chevron, {}) }) })
31270
+ ] }) }),
31271
+ /* @__PURE__ */ jsx54(Popover2, { ...popoverProps, children: /* @__PURE__ */ jsx54(Column, { children: /* @__PURE__ */ jsxs30(Box, { padding: "2", border: true, borderRadius: true, backgroundColor: true, shadow: "3", children: [
31272
+ allowSearch && /* @__PURE__ */ jsx54(Box, { marginBottom: "2", children: /* @__PURE__ */ jsx54(
31273
+ SearchField2,
31274
+ {
31275
+ value: search,
31276
+ onSearch: handleSearch,
31277
+ delay: searchDelay,
31278
+ defaultValue: searchValue,
31279
+ autoFocus: true
31280
+ }
31281
+ ) }),
31282
+ isLoading && /* @__PURE__ */ jsx54(Loading, { icon: "dots", position: "center", size: "sm" }),
31283
+ /* @__PURE__ */ jsx54(
31284
+ List,
31285
+ {
31286
+ ...listProps,
31287
+ items,
31288
+ style: { ...listProps?.style, display: isLoading ? "none" : void 0 },
31289
+ children
31290
+ }
31291
+ )
31292
+ ] }) }) })
31293
+ ]
31294
+ }
31295
+ );
31296
+ }
31312
31297
 
31313
31298
  // src/components/Sidebar.tsx
31314
31299
  var import_classnames44 = __toESM(require_classnames());
@@ -31394,7 +31379,6 @@ function SidebarItem({
31394
31379
  }
31395
31380
 
31396
31381
  // src/components/Slider.tsx
31397
- import { forwardRef as forwardRef10 } from "react";
31398
31382
  var import_classnames45 = __toESM(require_classnames());
31399
31383
 
31400
31384
  // css-modules:E:\dev\umami-react-zen\src\components\Slider.module.css
@@ -31402,31 +31386,29 @@ var Slider_default = { "slider": "Slider_slider__MjBhO", "header": "Slider_heade
31402
31386
 
31403
31387
  // src/components/Slider.tsx
31404
31388
  import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
31405
- var Slider2 = forwardRef10(
31406
- ({ className, showValue = true, label, ...props }, ref) => {
31407
- return /* @__PURE__ */ jsxs32($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames45.default)(Slider_default.slider, className), children: [
31408
- /* @__PURE__ */ jsxs32("div", { className: Slider_default.header, children: [
31409
- label && /* @__PURE__ */ jsx56(Label2, { className: Slider_default.label, children: label }),
31410
- showValue && /* @__PURE__ */ jsx56($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output })
31411
- ] }),
31412
- /* @__PURE__ */ jsx56($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
31413
- const isHorizontal = state.orientation === "horizontal";
31414
- return /* @__PURE__ */ jsxs32(Fragment10, { children: [
31415
- /* @__PURE__ */ jsx56(
31416
- "div",
31417
- {
31418
- className: Slider_default.fill,
31419
- style: {
31420
- [isHorizontal ? "width" : "height"]: (isHorizontal ? state.getThumbPercent(0) : 1 - state.getThumbPercent(0)) * 100 + "%"
31421
- }
31389
+ function Slider2({ className, showValue = true, label, ...props }) {
31390
+ return /* @__PURE__ */ jsxs32($6f909507e6374d18$export$472062a354075cee, { ...props, className: (0, import_classnames45.default)(Slider_default.slider, className), children: [
31391
+ /* @__PURE__ */ jsxs32("div", { className: Slider_default.header, children: [
31392
+ label && /* @__PURE__ */ jsx56(Label2, { className: Slider_default.label, children: label }),
31393
+ showValue && /* @__PURE__ */ jsx56($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output })
31394
+ ] }),
31395
+ /* @__PURE__ */ jsx56($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
31396
+ const isHorizontal = state.orientation === "horizontal";
31397
+ return /* @__PURE__ */ jsxs32(Fragment10, { children: [
31398
+ /* @__PURE__ */ jsx56(
31399
+ "div",
31400
+ {
31401
+ className: Slider_default.fill,
31402
+ style: {
31403
+ [isHorizontal ? "width" : "height"]: (isHorizontal ? state.getThumbPercent(0) : 1 - state.getThumbPercent(0)) * 100 + "%"
31422
31404
  }
31423
- ),
31424
- /* @__PURE__ */ jsx56($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
31425
- ] });
31426
- } })
31427
- ] });
31428
- }
31429
- );
31405
+ }
31406
+ ),
31407
+ /* @__PURE__ */ jsx56($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
31408
+ ] });
31409
+ } })
31410
+ ] });
31411
+ }
31430
31412
 
31431
31413
  // src/components/StatusLight.tsx
31432
31414
  var import_classnames46 = __toESM(require_classnames());
@@ -31451,7 +31433,6 @@ function StatusLight(props) {
31451
31433
  }
31452
31434
 
31453
31435
  // src/components/Switch.tsx
31454
- import { forwardRef as forwardRef11 } from "react";
31455
31436
  var import_classnames47 = __toESM(require_classnames());
31456
31437
 
31457
31438
  // css-modules:E:\dev\umami-react-zen\src\components\Switch.module.css
@@ -31459,27 +31440,24 @@ var Switch_default = { "switch": "Switch_switch__NzI0O", "track": "Switch_track_
31459
31440
 
31460
31441
  // src/components/Switch.tsx
31461
31442
  import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
31462
- var Switch2 = forwardRef11(
31463
- ({ label, children, className, ...props }, ref) => {
31464
- const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
31465
- return /* @__PURE__ */ jsxs34(Fragment11, { children: [
31466
- label && /* @__PURE__ */ jsx58(Label2, { children: label }),
31467
- /* @__PURE__ */ jsxs34(
31468
- $8e59e948500a8fe1$export$b5d5cf8927ab7262,
31469
- {
31470
- ...props,
31471
- isSelected,
31472
- ref,
31473
- className: (0, import_classnames47.default)(Switch_default.switch, className),
31474
- children: [
31475
- /* @__PURE__ */ jsx58("div", { className: Switch_default.track, children: /* @__PURE__ */ jsx58("div", { className: Switch_default.knob }) }),
31476
- children
31477
- ]
31478
- }
31479
- )
31480
- ] });
31481
- }
31482
- );
31443
+ function Switch2({ label, children, className, ...props }) {
31444
+ const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
31445
+ return /* @__PURE__ */ jsxs34(Fragment11, { children: [
31446
+ label && /* @__PURE__ */ jsx58(Label2, { children: label }),
31447
+ /* @__PURE__ */ jsxs34(
31448
+ $8e59e948500a8fe1$export$b5d5cf8927ab7262,
31449
+ {
31450
+ ...props,
31451
+ isSelected,
31452
+ className: (0, import_classnames47.default)(Switch_default.switch, className),
31453
+ children: [
31454
+ /* @__PURE__ */ jsx58("div", { className: Switch_default.track, children: /* @__PURE__ */ jsx58("div", { className: Switch_default.knob }) }),
31455
+ children
31456
+ ]
31457
+ }
31458
+ )
31459
+ ] });
31460
+ }
31483
31461
 
31484
31462
  // css-modules:E:\dev\umami-react-zen\src\components\Tabs.module.css
31485
31463
  var Tabs_default = { "tabs": "Tabs_tabs__OWVjO", "list": "Tabs_list__YWRjM", "tab": "Tabs_tab__ZjgwM", "quiet": "Tabs_quiet__ZTQ1O" };
@@ -31501,27 +31479,23 @@ function TabPanel2({ children, ...props }) {
31501
31479
 
31502
31480
  // src/components/TextArea.tsx
31503
31481
  var import_classnames48 = __toESM(require_classnames());
31504
- import { forwardRef as forwardRef12 } from "react";
31505
31482
 
31506
31483
  // css-modules:E:\dev\umami-react-zen\src\components\TextArea.module.css
31507
31484
  var TextArea_default = { "textarea": "TextArea_textarea__MTk5Y", "resize-none": "TextArea_resize-none__OTJhY", "resize-horizontal": "TextArea_resize-horizontal__YWIyZ", "resize-vertical": "TextArea_resize-vertical__NTM3O" };
31508
31485
 
31509
31486
  // src/components/TextArea.tsx
31510
31487
  import { jsx as jsx60 } from "react/jsx-runtime";
31511
- var TextArea2 = forwardRef12(
31512
- ({ rows, cols, resize, className, style, children, ...props }, ref) => {
31513
- return /* @__PURE__ */ jsx60(
31514
- TextField2,
31515
- {
31516
- ...props,
31517
- ref,
31518
- className: (0, import_classnames48.default)(resize && TextArea_default[`resize-${resize}`]),
31519
- asChild: true,
31520
- children: /* @__PURE__ */ jsx60($216918bed6669f72$export$f5c9f3c2c4054eec, { rows, cols, style: { ...style }, children })
31521
- }
31522
- );
31523
- }
31524
- );
31488
+ function TextArea2({
31489
+ rows,
31490
+ cols,
31491
+ resize,
31492
+ className,
31493
+ style,
31494
+ children,
31495
+ ...props
31496
+ }) {
31497
+ return /* @__PURE__ */ jsx60(TextField2, { ...props, className: (0, import_classnames48.default)(resize && TextArea_default[`resize-${resize}`]), asChild: true, children: /* @__PURE__ */ jsx60($216918bed6669f72$export$f5c9f3c2c4054eec, { rows, cols, style: { ...style }, children }) });
31498
+ }
31525
31499
 
31526
31500
  // src/components/ThemeButton.tsx
31527
31501
  var import_classnames49 = __toESM(require_classnames());
@@ -31574,7 +31548,6 @@ function ThemeButton({
31574
31548
  }
31575
31549
 
31576
31550
  // src/components/Toggle.tsx
31577
- import { forwardRef as forwardRef13 } from "react";
31578
31551
  var import_classnames50 = __toESM(require_classnames());
31579
31552
 
31580
31553
  // css-modules:E:\dev\umami-react-zen\src\components\Toggle.module.css
@@ -31582,24 +31555,21 @@ var Toggle_default = { "toggle": "Toggle_toggle__OWVjZ" };
31582
31555
 
31583
31556
  // src/components/Toggle.tsx
31584
31557
  import { Fragment as Fragment12, jsx as jsx62, jsxs as jsxs36 } from "react/jsx-runtime";
31585
- var Toggle = forwardRef13(
31586
- ({ label, children, className, ...props }, ref) => {
31587
- const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
31588
- return /* @__PURE__ */ jsxs36(Fragment12, { children: [
31589
- label && /* @__PURE__ */ jsx62(Label2, { children: label }),
31590
- /* @__PURE__ */ jsx62(
31591
- $efde0372d7a700fe$export$d2b052e7b4be1756,
31592
- {
31593
- ...props,
31594
- ref,
31595
- isSelected,
31596
- className: (0, import_classnames50.default)(Toggle_default.toggle, className),
31597
- children
31598
- }
31599
- )
31600
- ] });
31601
- }
31602
- );
31558
+ function Toggle({ label, children, className, ...props }) {
31559
+ const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
31560
+ return /* @__PURE__ */ jsxs36(Fragment12, { children: [
31561
+ label && /* @__PURE__ */ jsx62(Label2, { children: label }),
31562
+ /* @__PURE__ */ jsx62(
31563
+ $efde0372d7a700fe$export$d2b052e7b4be1756,
31564
+ {
31565
+ ...props,
31566
+ isSelected,
31567
+ className: (0, import_classnames50.default)(Toggle_default.toggle, className),
31568
+ children
31569
+ }
31570
+ )
31571
+ ] });
31572
+ }
31603
31573
 
31604
31574
  // src/components/ToggleGroup.tsx
31605
31575
  var import_classnames51 = __toESM(require_classnames());