@umami/react-zen 0.60.0 → 0.61.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
@@ -25627,9 +25627,6 @@ function useForm(props = {}) {
25627
25627
  // src/components/forms/Form.tsx
25628
25628
  var import_classnames5 = __toESM(require_classnames());
25629
25629
 
25630
- // css-modules:E:\dev\umami-react-zen\src\components\forms\Form.module.css
25631
- var Form_default = { "form": "Form_form__ZjMwZ", "text": "Form_text__NDc1Y", "icon": "Form_icon__ZGE1Z" };
25632
-
25633
25630
  // src/components/AlertBanner.tsx
25634
25631
  var import_classnames2 = __toESM(require_classnames());
25635
25632
  import { createElement } from "react";
@@ -25926,7 +25923,7 @@ var Icons = {
25926
25923
  };
25927
25924
 
25928
25925
  // css-modules:E:\dev\umami-react-zen\src\components\AlertBanner.module.css
25929
- var AlertBanner_default = { "banner": "AlertBanner_banner__NTQ1Y", "message": "AlertBanner_message__NDNiZ", "title": "AlertBanner_title__ZWUwM", "close": "AlertBanner_close__MzEwM", "error": "AlertBanner_error__YWZmN", "info": "AlertBanner_info__ZmE3M", "start": "AlertBanner_start__MTRkZ", "end": "AlertBanner_end__MWIwO", "center": "AlertBanner_center__OTkwZ" };
25926
+ var AlertBanner_default = { "banner": "AlertBanner_banner__NDQ0Z", "message": "AlertBanner_message__MzQ3Y", "title": "AlertBanner_title__MDI0M", "close": "AlertBanner_close__YzE5M", "error": "AlertBanner_error__NDVmM", "start": "AlertBanner_start__YTlmZ", "end": "AlertBanner_end__ZmJlM", "center": "AlertBanner_center__Y2ZmN" };
25930
25927
 
25931
25928
  // src/components/AlertBanner.tsx
25932
25929
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
@@ -25953,7 +25950,7 @@ function AlertBanner({
25953
25950
  align && AlertBanner_default[align]
25954
25951
  ),
25955
25952
  children: [
25956
- (icon || variant) && /* @__PURE__ */ jsx2(Icon, { size: "md", children: variant ? createElement(AlertIcons[variant]) : icon }),
25953
+ (icon || variant) && /* @__PURE__ */ jsx2(Icon, { size: "sm", children: variant ? createElement(AlertIcons[variant]) : icon }),
25957
25954
  /* @__PURE__ */ jsxs("div", { className: AlertBanner_default.message, children: [
25958
25955
  title && /* @__PURE__ */ jsx2("div", { className: AlertBanner_default.title, children: title }),
25959
25956
  description && /* @__PURE__ */ jsx2("div", { className: AlertBanner_default.description, children: description })
@@ -26250,6 +26247,9 @@ function Column({ reverse, children, ...props }) {
26250
26247
  return /* @__PURE__ */ jsx5(Flexbox, { ...props, direction: reverse ? "column-reverse" : "column", children });
26251
26248
  }
26252
26249
 
26250
+ // css-modules:E:\dev\umami-react-zen\src\components\forms\Form.module.css
26251
+ var Form_default = { "form": "Form_form__ZjMwZ", "text": "Form_text__NDc1Y", "icon": "Form_icon__ZGE1Z" };
26252
+
26253
26253
  // src/components/forms/Form.tsx
26254
26254
  import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
26255
26255
  function Form({
@@ -26310,7 +26310,7 @@ function Form({
26310
26310
  {
26311
26311
  variant: "error",
26312
26312
  align: "center",
26313
- description: error instanceof Error ? error?.message : error
26313
+ title: error instanceof Error ? error?.message : error
26314
26314
  }
26315
26315
  ),
26316
26316
  /* @__PURE__ */ jsx6(
@@ -26335,7 +26335,7 @@ function Row({ reverse, children, ...props }) {
26335
26335
 
26336
26336
  // src/components/forms/FormButtons.tsx
26337
26337
  import { jsx as jsx8 } from "react/jsx-runtime";
26338
- function FormButtons({ children, ...props }) {
26338
+ function FormButtons({ fill, children, ...props }) {
26339
26339
  return /* @__PURE__ */ jsx8(Row, { paddingTop: "3", gap: "3", justifyContent: "flex-end", ...props, children });
26340
26340
  }
26341
26341
 
@@ -26344,7 +26344,7 @@ import { cloneElement as cloneElement2, forwardRef, Children } from "react";
26344
26344
  var import_classnames6 = __toESM(require_classnames());
26345
26345
 
26346
26346
  // css-modules:E:\dev\umami-react-zen\src\components\forms\FormField.module.css
26347
- var FormField_default = { "field": "FormField_field__NzY5Y", "description": "FormField_description__OGY3Y", "error": "FormField_error__NmEzO" };
26347
+ var FormField_default = { "field": "FormField_field__YTM1N", "description": "FormField_description__ZjFiM", "error": "FormField_error__NWZhM" };
26348
26348
 
26349
26349
  // src/components/forms/FormField.tsx
26350
26350
  import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -26453,9 +26453,9 @@ function LoadingButton({ isLoading, children, ...props }) {
26453
26453
  import { jsx as jsx14 } from "react/jsx-runtime";
26454
26454
  function FormSubmitButton({
26455
26455
  variant = "primary",
26456
- children,
26457
- disabled,
26456
+ isDisabled,
26458
26457
  isLoading,
26458
+ children,
26459
26459
  ...props
26460
26460
  }) {
26461
26461
  const {
@@ -26467,7 +26467,7 @@ function FormSubmitButton({
26467
26467
  ...props,
26468
26468
  type: "submit",
26469
26469
  variant,
26470
- disabled: disabled !== void 0 ? disabled : !isDirty || !isValid || isSubmitting || isSubmitted,
26470
+ disabled: isDisabled !== void 0 ? isDisabled : !isDirty || !isValid || isSubmitting || isSubmitted,
26471
26471
  isLoading: isLoading !== void 0 ? isLoading : isValid && isSubmitSuccessful && (isSubmitting || isSubmitted),
26472
26472
  children
26473
26473
  }
@@ -26476,7 +26476,6 @@ function FormSubmitButton({
26476
26476
 
26477
26477
  // src/components/toast/Toast.tsx
26478
26478
  var import_classnames9 = __toESM(require_classnames());
26479
- import { createElement as createElement2 } from "react";
26480
26479
 
26481
26480
  // css-modules:E:\dev\umami-react-zen\src\components\toast\Toast.module.css
26482
26481
  var Toast_default = { "toast": "Toast_toast__YjU0N", "icon": "Toast_icon__YmFhZ", "title": "Toast_title__OGRhM", "description": "Toast_description__MDBkN", "action": "Toast_action__MjUxO", "close": "Toast_close__ZDVjN", "info": "Toast_info__ZDRhY", "error": "Toast_error__NmEwO" };
@@ -26484,10 +26483,6 @@ var Toast_default = { "toast": "Toast_toast__YjU0N", "icon": "Toast_icon__YmFhZ"
26484
26483
  // src/components/toast/Toast.tsx
26485
26484
  import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
26486
26485
  var TOAST_CLOSE_ACTION = "close";
26487
- var icons = {
26488
- info: Icons.Info,
26489
- error: Icons.Alert
26490
- };
26491
26486
  function Toast({
26492
26487
  id,
26493
26488
  message,
@@ -26502,7 +26497,6 @@ function Toast({
26502
26497
  }) {
26503
26498
  const hasActions = actions?.length > 0;
26504
26499
  return /* @__PURE__ */ jsxs6("div", { ...props, className: (0, import_classnames9.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
26505
- /* @__PURE__ */ jsx15(Icon, { className: Toast_default.icon, size: "md", children: variant && createElement2(icons[variant]) }),
26506
26500
  title && /* @__PURE__ */ jsx15("div", { className: Toast_default.title, children: title }),
26507
26501
  message && /* @__PURE__ */ jsx15("div", { className: Toast_default.description, children: message }),
26508
26502
  hasActions && actions.map((action) => {
@@ -26681,12 +26675,12 @@ function eachSafely(values, each2) {
26681
26675
  }
26682
26676
 
26683
26677
  // node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs
26678
+ import { useRef } from "react";
26679
+ import { useState } from "react";
26684
26680
  import { useRef as useRef2 } from "react";
26685
- import { useState as useState2 } from "react";
26686
- import { useRef as useRef22 } from "react";
26687
- import { useEffect as useEffect3, useLayoutEffect } from "react";
26688
- import { useEffect as useEffect22, useRef as useRef3, useState as useState22 } from "react";
26689
- import { useEffect as useEffect32 } from "react";
26681
+ import { useEffect as useEffect2, useLayoutEffect } from "react";
26682
+ import { useEffect as useEffect22, useRef as useRef3, useState as useState2 } from "react";
26683
+ import { useEffect as useEffect3 } from "react";
26690
26684
  import { useEffect as useEffect4, useRef as useRef4 } from "react";
26691
26685
  import { useState as useState3 } from "react";
26692
26686
  var __defProp2 = Object.defineProperty;
@@ -27448,9 +27442,9 @@ function isAnimatedString(value) {
27448
27442
  return is.str(value) && (value[0] == "#" || /\d/.test(value) || // Do not identify a CSS variable as an AnimatedString if its SSR
27449
27443
  !isSSR() && cssVariableRegex.test(value) || value in (colors || {}));
27450
27444
  }
27451
- var useIsomorphicLayoutEffect = isSSR() ? useEffect3 : useLayoutEffect;
27445
+ var useIsomorphicLayoutEffect = isSSR() ? useEffect2 : useLayoutEffect;
27452
27446
  var useIsMounted = () => {
27453
- const isMounted = useRef22(false);
27447
+ const isMounted = useRef2(false);
27454
27448
  useIsomorphicLayoutEffect(() => {
27455
27449
  isMounted.current = true;
27456
27450
  return () => {
@@ -27460,7 +27454,7 @@ var useIsMounted = () => {
27460
27454
  return isMounted;
27461
27455
  };
27462
27456
  function useForceUpdate() {
27463
- const update3 = useState2()[1];
27457
+ const update3 = useState()[1];
27464
27458
  const isMounted = useIsMounted();
27465
27459
  return () => {
27466
27460
  if (isMounted.current) {
@@ -27469,7 +27463,7 @@ function useForceUpdate() {
27469
27463
  };
27470
27464
  }
27471
27465
  function useMemoOne(getResult, inputs) {
27472
- const [initial] = useState22(
27466
+ const [initial] = useState2(
27473
27467
  () => ({
27474
27468
  inputs,
27475
27469
  result: getResult()
@@ -27510,7 +27504,7 @@ function areInputsEqual(next, prev) {
27510
27504
  }
27511
27505
  return true;
27512
27506
  }
27513
- var useOnce = (effect) => useEffect32(effect, emptyDeps);
27507
+ var useOnce = (effect) => useEffect3(effect, emptyDeps);
27514
27508
  var emptyDeps = [];
27515
27509
  function usePrev(value) {
27516
27510
  const prevRef = useRef4();
@@ -27827,8 +27821,8 @@ import * as React5 from "react";
27827
27821
  import { useContext } from "react";
27828
27822
  import { useState as useState4 } from "react";
27829
27823
  import * as React22 from "react";
27830
- import { useContext as useContext3, useRef as useRef23, useMemo as useMemo2 } from "react";
27831
- import { useRef as useRef32, useState as useState23 } from "react";
27824
+ import { useContext as useContext3, useRef as useRef22, useMemo as useMemo2 } from "react";
27825
+ import { useRef as useRef32, useState as useState22 } from "react";
27832
27826
  function callProp(value, ...args) {
27833
27827
  return is.fun(value) ? value(...args) : value;
27834
27828
  }
@@ -29392,7 +29386,7 @@ function useTransition(data, props, deps) {
29392
29386
  );
29393
29387
  const items = toArray(data);
29394
29388
  const transitions = [];
29395
- const usedTransitions = useRef23(null);
29389
+ const usedTransitions = useRef22(null);
29396
29390
  const prevTransitions = reset ? null : usedTransitions.current;
29397
29391
  useIsomorphicLayoutEffect(() => {
29398
29392
  usedTransitions.current = transitions;
@@ -29463,8 +29457,8 @@ function useTransition(data, props, deps) {
29463
29457
  const forceUpdate = useForceUpdate();
29464
29458
  const defaultProps = getDefaultProps(props);
29465
29459
  const changes = /* @__PURE__ */ new Map();
29466
- const exitingTransitions = useRef23(/* @__PURE__ */ new Map());
29467
- const forceChange = useRef23(false);
29460
+ const exitingTransitions = useRef22(/* @__PURE__ */ new Map());
29461
+ const forceChange = useRef22(false);
29468
29462
  each(transitions, (t, i) => {
29469
29463
  const key = t.key;
29470
29464
  const prevPhase = t.phase;
@@ -30150,10 +30144,10 @@ import { useContext as useContext4 } from "react";
30150
30144
  import { createContext as createContext2 } from "react";
30151
30145
  import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
30152
30146
  var ToastContext = createContext2({});
30153
- function ToastProvider({ children, ...config2 }) {
30154
- return /* @__PURE__ */ jsxs7(ToastContext.Provider, { value: config2, children: [
30147
+ function ToastProvider({ children, ...props }) {
30148
+ return /* @__PURE__ */ jsxs7(ToastContext.Provider, { value: props, children: [
30155
30149
  children,
30156
- /* @__PURE__ */ jsx16(Toaster, { ...config2 })
30150
+ /* @__PURE__ */ jsx16(Toaster, { ...props })
30157
30151
  ] });
30158
30152
  }
30159
30153
 
@@ -30517,7 +30511,7 @@ var Checkbox = forwardRef4(
30517
30511
  );
30518
30512
 
30519
30513
  // css-modules:E:\dev\umami-react-zen\src\components\Code.module.css
30520
- var Code_default = { "code": "Code_code__OGIyN" };
30514
+ var Code_default = { "code": "Code_code__YTUzN" };
30521
30515
 
30522
30516
  // src/components/Code.tsx
30523
30517
  import { jsx as jsx26 } from "react/jsx-runtime";
@@ -30668,10 +30662,10 @@ function CopyButton({ value, timeout = TIMEOUT, className, children, ...props })
30668
30662
  }
30669
30663
 
30670
30664
  // css-modules:E:\dev\umami-react-zen\src\components\styles\input.module.css
30671
- var input_default = { "field": "input_field__ZTk4Z", "row": "input_row__ZGY2N", "input": "input_input__ODNmN", "icon": "input_icon__MTEwY" };
30665
+ var input_default = { "field": "input_field__Zjk2M", "row": "input_row__NTFhN", "input": "input_input__NTExY", "icon": "input_icon__ZGI5Y" };
30672
30666
 
30673
30667
  // css-modules:E:\dev\umami-react-zen\src\components\TextField.module.css
30674
- var TextField_default = { "allowCopy": "TextField_allowCopy__Yjc3Y", "icon": "TextField_icon__OWIxY" };
30668
+ var TextField_default = { "allowCopy": "TextField_allowCopy__NmUxY", "icon": "TextField_icon__OTcxO" };
30675
30669
 
30676
30670
  // src/components/TextField.tsx
30677
30671
  import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
@@ -30763,7 +30757,7 @@ function ConfirmationDialog({
30763
30757
 
30764
30758
  // src/components/DataTable.tsx
30765
30759
  var import_classnames27 = __toESM(require_classnames());
30766
- import { Children as Children2, createElement as createElement6 } from "react";
30760
+ import { Children as Children2, createElement as createElement5 } from "react";
30767
30761
 
30768
30762
  // src/components/Table.tsx
30769
30763
  var import_classnames26 = __toESM(require_classnames());
@@ -30785,27 +30779,27 @@ function TableBody({ children, className, ...props }) {
30785
30779
  function TableRow({ children, className, ...props }) {
30786
30780
  return /* @__PURE__ */ jsx35($1910c06f0ca9905e$export$b59bdbef9ce70de2, { ...props, className: (0, import_classnames26.default)(Table_default.row, className), children });
30787
30781
  }
30788
- function TableColumn({ children, className, alignment, ...props }) {
30782
+ function TableColumn({ children, className, align, ...props }) {
30789
30783
  return /* @__PURE__ */ jsx35(
30790
30784
  $1910c06f0ca9905e$export$816b5d811295e6bc,
30791
30785
  {
30792
30786
  ...props,
30793
- className: (0, import_classnames26.default)(Table_default.column, className, alignment && Table_default[alignment]),
30787
+ className: (0, import_classnames26.default)(Table_default.column, className, align && Table_default[align]),
30794
30788
  isRowHeader: true,
30795
30789
  children
30796
30790
  }
30797
30791
  );
30798
30792
  }
30799
- function TableCell({ children, className, alignment, ...props }) {
30800
- return /* @__PURE__ */ jsx35($1910c06f0ca9905e$export$f6f0c3fe4ec306ea, { ...props, className: (0, import_classnames26.default)(Table_default.cell, className, alignment && Table_default[alignment]), children });
30793
+ function TableCell({ children, className, align, ...props }) {
30794
+ return /* @__PURE__ */ jsx35($1910c06f0ca9905e$export$f6f0c3fe4ec306ea, { ...props, className: (0, import_classnames26.default)(Table_default.cell, className, align && Table_default[align]), children });
30801
30795
  }
30802
30796
 
30803
30797
  // css-modules:E:\dev\umami-react-zen\src\components\DataTable.module.css
30804
- var DataTable_default = { "datatable": "DataTable_datatable__MWRkN", "cell": "DataTable_cell__MmMyM" };
30798
+ var DataTable_default = { "datatable": "DataTable_datatable__ZmQ3Z", "cell": "DataTable_cell__NzZlM", "hidden": "DataTable_hidden__M2MxN" };
30805
30799
 
30806
30800
  // src/components/DataTable.tsx
30807
30801
  import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
30808
- import { createElement as createElement7 } from "react";
30802
+ import { createElement as createElement6 } from "react";
30809
30803
  function DataTable({ data = [], className, children, ...props }) {
30810
30804
  const items = data.length && data?.[0]?.id === void 0 ? data.map((record, id) => ({ ...record, id })) : data;
30811
30805
  const columns = Children2.map(children, (child) => {
@@ -30816,13 +30810,20 @@ function DataTable({ data = [], className, children, ...props }) {
30816
30810
  if (hidden) {
30817
30811
  return null;
30818
30812
  }
30819
- return /* @__PURE__ */ createElement7(TableColumn, { ...columnProps, key: id, id }, label);
30813
+ return /* @__PURE__ */ createElement6(TableColumn, { ...columnProps, key: id, id }, label);
30820
30814
  }) }),
30821
30815
  /* @__PURE__ */ jsx36(TableBody, { items, children: (row) => {
30822
- return /* @__PURE__ */ jsx36(TableRow, { children: columns.map(({ id, as, children: children2, className: className2, ...cellProps }) => {
30823
- const value = typeof children2 === "function" ? children2(row, id) : children2 || row[id];
30824
- const Component = as || "div";
30825
- return /* @__PURE__ */ createElement7(TableCell, { ...cellProps, key: id, className: (0, import_classnames27.default)(DataTable_default.cell, className2) }, as ? createElement6(as, {}, value) : value);
30816
+ return /* @__PURE__ */ jsx36(TableRow, { children: columns.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
30817
+ const value = typeof children2 === "function" ? children2(row) : children2 || row[id];
30818
+ return /* @__PURE__ */ createElement6(
30819
+ TableCell,
30820
+ {
30821
+ ...cellProps,
30822
+ key: id,
30823
+ className: (0, import_classnames27.default)(DataTable_default.cell, className2, hidden && DataTable_default.hidden)
30824
+ },
30825
+ as ? createElement5(as, {}, value) : value
30826
+ );
30826
30827
  }) });
30827
30828
  } })
30828
30829
  ] });
@@ -31119,7 +31120,7 @@ function Loading(props) {
31119
31120
  var import_classnames34 = __toESM(require_classnames());
31120
31121
 
31121
31122
  // css-modules:E:\dev\umami-react-zen\src\components\Menu.module.css
31122
- var Menu_default = { "menu": "Menu_menu__YWZhN", "separator": "Menu_separator__MzA3M", "section": "Menu_section__OGY0Z", "header": "Menu_header__NjgyY", "item": "Menu_item__NWNhZ", "check": "Menu_check__M2IyM" };
31123
+ var Menu_default = { "menu": "Menu_menu__YmUyN", "separator": "Menu_separator__NDFlO", "section": "Menu_section__YjJjY", "header": "Menu_header__NDVjN", "item": "Menu_item__YjBiN", "check": "Menu_check__YmVhZ" };
31123
31124
 
31124
31125
  // src/components/Menu.tsx
31125
31126
  import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
@@ -31313,7 +31314,7 @@ import { useState as useState15, useEffect as useEffect11, forwardRef as forward
31313
31314
  var import_classnames41 = __toESM(require_classnames());
31314
31315
 
31315
31316
  // css-modules:E:\dev\umami-react-zen\src\components\SearchField.module.css
31316
- var SearchField_default = { "search": "SearchField_search__N2VmN", "input": "SearchField_input__MTQ2Y", "close": "SearchField_close__MmUwM" };
31317
+ var SearchField_default = { "search": "SearchField_search__MzkwY", "input": "SearchField_input__OGFiY", "close": "SearchField_close__NmJkM" };
31317
31318
 
31318
31319
  // src/components/SearchField.tsx
31319
31320
  import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
@@ -31321,8 +31322,7 @@ var SearchField = forwardRef8(
31321
31322
  ({ label, placeholder, value, delay = 0, onSearch, className, ...props }, ref) => {
31322
31323
  const [search, setSearch] = useState15(value ?? "");
31323
31324
  const searchValue = useDebounce(search, delay);
31324
- const handleChange = (e) => {
31325
- const { value: value2 } = e.target;
31325
+ const handleChange = (value2) => {
31326
31326
  setSearch(value2);
31327
31327
  if (delay === 0 || value2 === "") {
31328
31328
  onSearch?.(value2);
@@ -31336,31 +31336,39 @@ var SearchField = forwardRef8(
31336
31336
  if (delay > 0) {
31337
31337
  onSearch?.(searchValue);
31338
31338
  }
31339
- }, [searchValue, delay, onSearch]);
31340
- return /* @__PURE__ */ jsx51($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames41.default)(input_default.field, className), children: ({ state }) => {
31341
- return /* @__PURE__ */ jsxs29(Fragment8, { children: [
31342
- label && /* @__PURE__ */ jsx51(Label, { children: label }),
31343
- /* @__PURE__ */ jsxs29("div", { className: input_default.row, children: [
31344
- /* @__PURE__ */ jsx51(Icons.MagnifyingGlass, { className: (0, import_classnames41.default)(SearchField_default.search, input_default.icon) }),
31345
- /* @__PURE__ */ jsx51(
31346
- $3985021b0ad6602f$export$f5b8910cec6cf069,
31347
- {
31348
- className: (0, import_classnames41.default)(SearchField_default.input, input_default.input),
31349
- placeholder,
31350
- onChange: handleChange
31351
- }
31352
- ),
31353
- state.value && /* @__PURE__ */ jsx51(
31354
- $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
31355
- {
31356
- className: (0, import_classnames41.default)(SearchField_default.close, input_default.icon),
31357
- onPress: resetSearch,
31358
- children: /* @__PURE__ */ jsx51(Icon, { children: /* @__PURE__ */ jsx51(Icons.Close, {}) })
31359
- }
31360
- )
31361
- ] })
31362
- ] });
31363
- } });
31339
+ }, [searchValue, delay]);
31340
+ return /* @__PURE__ */ jsx51(
31341
+ $440f4836bcb56932$export$b94867ecbd698f21,
31342
+ {
31343
+ ...props,
31344
+ ref,
31345
+ className: (0, import_classnames41.default)(input_default.field, className),
31346
+ onChange: handleChange,
31347
+ children: ({ state }) => {
31348
+ return /* @__PURE__ */ jsxs29(Fragment8, { children: [
31349
+ label && /* @__PURE__ */ jsx51(Label, { children: label }),
31350
+ /* @__PURE__ */ jsxs29("div", { className: input_default.row, children: [
31351
+ /* @__PURE__ */ jsx51(Icon, { className: (0, import_classnames41.default)(SearchField_default.search, input_default.icon), children: /* @__PURE__ */ jsx51(Icons.MagnifyingGlass, {}) }),
31352
+ /* @__PURE__ */ jsx51(
31353
+ $3985021b0ad6602f$export$f5b8910cec6cf069,
31354
+ {
31355
+ className: (0, import_classnames41.default)(SearchField_default.input, input_default.input),
31356
+ placeholder
31357
+ }
31358
+ ),
31359
+ state.value && /* @__PURE__ */ jsx51(
31360
+ $d2b4bc8c273e7be6$export$353f5b6fc5456de1,
31361
+ {
31362
+ className: (0, import_classnames41.default)(SearchField_default.close, input_default.icon),
31363
+ onPress: resetSearch,
31364
+ children: /* @__PURE__ */ jsx51(Icon, { size: "sm", children: /* @__PURE__ */ jsx51(Icons.Close, {}) })
31365
+ }
31366
+ )
31367
+ ] })
31368
+ ] });
31369
+ }
31370
+ }
31371
+ );
31364
31372
  }
31365
31373
  );
31366
31374
 
@@ -31688,8 +31696,11 @@ function Tooltip({ children, className, ...props }) {
31688
31696
 
31689
31697
  // src/components/ZenProvider.tsx
31690
31698
  import { jsx as jsx63 } from "react/jsx-runtime";
31699
+ var defaultToastCofig = {
31700
+ duration: 3e3
31701
+ };
31691
31702
  function ZenProvider({ children, ...props }) {
31692
- const { toast } = props;
31703
+ const { toast = defaultToastCofig } = props;
31693
31704
  return /* @__PURE__ */ jsx63(ToastProvider, { ...toast, children });
31694
31705
  }
31695
31706
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/react-zen",
3
- "version": "0.60.0",
3
+ "version": "0.61.0",
4
4
  "description": "React components built by Umami",
5
5
  "author": "Umami <hello@umami.is>",
6
6
  "license": "MIT",