@umami/react-zen 0.253.0 → 0.255.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.js CHANGED
@@ -3627,7 +3627,7 @@ var InputGroupTextarea = react.forwardRef(
3627
3627
  );
3628
3628
  InputGroupTextarea.displayName = "InputGroupTextarea";
3629
3629
  var labelClasses = [
3630
- "flex items-center gap-2 text-sm leading-none font-medium select-none",
3630
+ "flex items-center gap-2 text-sm leading-none font-semibold select-none",
3631
3631
  "peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
3632
3632
  "group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50"
3633
3633
  ];
@@ -3674,7 +3674,7 @@ var Autocomplete = react.forwardRef(
3674
3674
  onValueChange?.(value, details);
3675
3675
  if (!details.isCanceled) onChange?.(value);
3676
3676
  },
3677
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "autocomplete", className: cn.cn("relative flex flex-col gap-1", className), children: [
3677
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "autocomplete", className: cn.cn("relative flex flex-col gap-2", className), children: [
3678
3678
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, children: label }),
3679
3679
  /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { children: [
3680
3680
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4462,7 +4462,7 @@ var checkboxStyles = tailwindVariants.tv({
4462
4462
  "flex items-center justify-center text-current",
4463
4463
  "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5"
4464
4464
  ],
4465
- label: "cursor-pointer peer-disabled:cursor-default peer-disabled:opacity-50"
4465
+ label: "cursor-pointer font-normal peer-disabled:cursor-default peer-disabled:opacity-50"
4466
4466
  }
4467
4467
  });
4468
4468
  function Checkbox({
@@ -4800,7 +4800,7 @@ function List({
4800
4800
  }
4801
4801
  ) });
4802
4802
  if (label) {
4803
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
4803
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
4804
4804
  /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
4805
4805
  listbox
4806
4806
  ] });
@@ -4830,7 +4830,7 @@ function ListItem({
4830
4830
  className: listItem({ className }),
4831
4831
  children: [
4832
4832
  /* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemText, { children }),
4833
- showCheckmark && /* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) }) })
4833
+ showCheckmark && /* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { className: "flex shrink-0 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) }) })
4834
4834
  ]
4835
4835
  }
4836
4836
  );
@@ -4846,7 +4846,7 @@ function ListItem({
4846
4846
  className: listItem({ className }),
4847
4847
  children: [
4848
4848
  children,
4849
- showCheckmark && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) }) })
4849
+ showCheckmark && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.ItemIndicator, { className: "flex shrink-0 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Check, {}) }) })
4850
4850
  ]
4851
4851
  }
4852
4852
  );
@@ -5050,7 +5050,7 @@ function ComboBox({
5050
5050
  onValueChange?.(next, details);
5051
5051
  onChange?.(next);
5052
5052
  },
5053
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "combobox", className: cn.cn("relative flex flex-col gap-1", className), children: [
5053
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "combobox", className: cn.cn("relative flex flex-col gap-2", className), children: [
5054
5054
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, children: label }),
5055
5055
  /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.InputGroup, { render: /* @__PURE__ */ jsxRuntime.jsx(InputGroup, {}), children: [
5056
5056
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5438,9 +5438,9 @@ function CopyButton({ value, timeout = TIMEOUT, className, ...props }) {
5438
5438
  );
5439
5439
  }
5440
5440
  var fieldOrientationClasses = {
5441
- vertical: "flex-col gap-1 *:w-full [&>.sr-only]:w-auto",
5441
+ vertical: "flex-col gap-2 *:w-full [&>.sr-only]:w-auto",
5442
5442
  horizontal: "flex-row items-center gap-2 has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto",
5443
- responsive: "flex-col gap-1 *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:gap-2 @md/field-group:*:w-auto"
5443
+ responsive: "flex-col gap-2 *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:gap-2 @md/field-group:*:w-auto"
5444
5444
  };
5445
5445
  var Field = react.forwardRef(
5446
5446
  ({ orientation = "vertical", className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -5702,7 +5702,7 @@ var TextField = react.forwardRef(function TextField2({
5702
5702
  if (!label && !description && !error) {
5703
5703
  return input;
5704
5704
  }
5705
- return /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Root, { "data-slot": "text-field", className: "flex flex-col gap-1", children: [
5705
+ return /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Root, { "data-slot": "text-field", className: "flex flex-col gap-2", children: [
5706
5706
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
5707
5707
  input,
5708
5708
  description && /* @__PURE__ */ jsxRuntime.jsx(FieldDescription, { id: descriptionId, children: description }),
@@ -6774,7 +6774,7 @@ function DatePicker({
6774
6774
  onChange?.(nextDate);
6775
6775
  setOpen(false);
6776
6776
  };
6777
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("flex flex-col gap-1", className), "data-slot": "date-picker", children: [
6777
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn.cn("flex flex-col gap-2", className), "data-slot": "date-picker", children: [
6778
6778
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
6779
6779
  /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Root, { open, onOpenChange: setOpen, children: [
6780
6780
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7223,7 +7223,7 @@ function FormField({
7223
7223
  const { control } = context;
7224
7224
  const { invalid, error } = context.getFieldState(name);
7225
7225
  const describedBy = [description && descriptionId, invalid && errorId].filter(Boolean).join(" ") || void 0;
7226
- return /* @__PURE__ */ jsxRuntime.jsxs(Column, { ...props, gap: "1", className, children: [
7226
+ return /* @__PURE__ */ jsxRuntime.jsxs(Column, { ...props, gap: "2", className, children: [
7227
7227
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
7228
7228
  /* @__PURE__ */ jsxRuntime.jsx(FormController, { name, control, rules, children: ({ field }) => {
7229
7229
  return react.Children.map(
@@ -7266,7 +7266,7 @@ function FormFieldArray({
7266
7266
  register(name, rules);
7267
7267
  const errors = formState?.errors || {};
7268
7268
  const errorMessage = errors[name]?.message;
7269
- return /* @__PURE__ */ jsxRuntime.jsxs(Column, { ...props, gap: "1", className, children: [
7269
+ return /* @__PURE__ */ jsxRuntime.jsxs(Column, { ...props, gap: "2", className, children: [
7270
7270
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
7271
7271
  description && /* @__PURE__ */ jsxRuntime.jsx(Text, { color: "muted", children: description }),
7272
7272
  errorMessage && /* @__PURE__ */ jsxRuntime.jsx(Text, { role: "alert", className: "text-status-error", children: errorMessage }),
@@ -7847,7 +7847,7 @@ function Meter({
7847
7847
  max: maxValue,
7848
7848
  format: formatOptions,
7849
7849
  "data-slot": "meter",
7850
- className: cn.cn("flex flex-col gap-1 w-full", className),
7850
+ className: cn.cn("flex flex-col gap-2 w-full", className),
7851
7851
  children: [
7852
7852
  (label || showValue) && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "meter-header", className: "flex items-center justify-between gap-3", children: [
7853
7853
  label && /* @__PURE__ */ jsxRuntime.jsx(meter.Meter.Label, { "data-slot": "meter-label", render: /* @__PURE__ */ jsxRuntime.jsx(Label, {}), children: label }),
@@ -8019,7 +8019,7 @@ var NumberField = react.forwardRef(function NumberField2({
8019
8019
  required: isRequired ?? required,
8020
8020
  format: formatOptions ?? format,
8021
8021
  onValueChange: (value) => onChange?.(value),
8022
- className: cn.cn("flex flex-col gap-1", className),
8022
+ className: cn.cn("flex flex-col gap-2", className),
8023
8023
  children: [
8024
8024
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
8025
8025
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -8104,7 +8104,7 @@ var OTPField = react.forwardRef(function OTPField2({
8104
8104
  }, ref) {
8105
8105
  const fieldId = useFieldId(id);
8106
8106
  const labelId = `${fieldId}-label`;
8107
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "otp-field", className: "flex flex-col gap-1", children: [
8107
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "otp-field", className: "flex flex-col gap-2", children: [
8108
8108
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, htmlFor: `${fieldId}-0`, children: label }),
8109
8109
  /* @__PURE__ */ jsxRuntime.jsx(
8110
8110
  otpField.OTPField.Root,
@@ -8477,7 +8477,7 @@ var PasswordField = react.forwardRef(
8477
8477
  ) })
8478
8478
  ] });
8479
8479
  if (label) {
8480
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "password-field", className: "flex flex-col gap-1", children: [
8480
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "password-field", className: "flex flex-col gap-2", children: [
8481
8481
  /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
8482
8482
  input
8483
8483
  ] });
@@ -8790,7 +8790,12 @@ function Radio({ children, className, isDisabled, id, ...props }) {
8790
8790
  radio.Radio.Indicator,
8791
8791
  {
8792
8792
  "data-slot": "radio-indicator",
8793
- className: "size-2 rounded-full bg-primary data-unchecked:hidden"
8793
+ keepMounted: true,
8794
+ className: cn.cn(
8795
+ "size-2 rounded-full bg-primary",
8796
+ "transition-[transform,opacity] duration-200 ease-out motion-reduce:transition-none",
8797
+ "data-unchecked:scale-0 data-unchecked:opacity-0"
8798
+ )
8794
8799
  }
8795
8800
  )
8796
8801
  }
@@ -8799,7 +8804,7 @@ function Radio({ children, className, isDisabled, id, ...props }) {
8799
8804
  Label,
8800
8805
  {
8801
8806
  htmlFor: fieldId,
8802
- className: "cursor-pointer peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
8807
+ className: "cursor-pointer font-normal peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
8803
8808
  children
8804
8809
  }
8805
8810
  ) : null
@@ -8948,7 +8953,7 @@ var SearchField = react.forwardRef(function SearchField2({
8948
8953
  ) })
8949
8954
  ] });
8950
8955
  if (label) {
8951
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "search-field", className: "flex flex-col gap-1", children: [
8956
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "search-field", className: "flex flex-col gap-2", children: [
8952
8957
  /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: fieldId, children: label }),
8953
8958
  input
8954
8959
  ] });
@@ -9023,7 +9028,7 @@ function Select({
9023
9028
  const useScrollArea = maxHeight !== void 0 && !isFullscreen;
9024
9029
  const mergedTriggerProps = { ...buttonProps, ...triggerProps };
9025
9030
  const { className: triggerClassName2, ...restTriggerProps } = mergedTriggerProps;
9026
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "select", className: cn.cn("flex flex-col gap-1", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
9031
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "select", className: cn.cn("flex flex-col gap-2", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
9027
9032
  select.Select.Root,
9028
9033
  {
9029
9034
  ...props,
@@ -9074,7 +9079,14 @@ function Select({
9074
9079
  }
9075
9080
  }
9076
9081
  ),
9077
- showIcon && /* @__PURE__ */ jsxRuntime.jsx(select.Select.Icon, { "data-slot": "select-icon", className: "text-fg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronDown, {}) }) })
9082
+ showIcon && /* @__PURE__ */ jsxRuntime.jsx(
9083
+ select.Select.Icon,
9084
+ {
9085
+ "data-slot": "select-icon",
9086
+ className: "flex shrink-0 items-center justify-center text-fg-muted",
9087
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": "true", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.ChevronDown, {}) })
9088
+ }
9089
+ )
9078
9090
  ]
9079
9091
  }
9080
9092
  ),
@@ -9566,7 +9578,7 @@ function Switch({
9566
9578
  Label,
9567
9579
  {
9568
9580
  htmlFor: fieldId,
9569
- className: "cursor-pointer peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
9581
+ className: "cursor-pointer font-normal peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
9570
9582
  children: labelContent
9571
9583
  }
9572
9584
  ) : null
@@ -9708,7 +9720,7 @@ function TagGroup({ label, children, className, onRemove, ...props }) {
9708
9720
  allowsRemoving: !!onRemove,
9709
9721
  remove: (key) => onRemove?.(/* @__PURE__ */ new Set([key]))
9710
9722
  },
9711
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, "data-slot": "tag-group", className: cn.cn("flex flex-col gap-1", className), children: [
9723
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props, "data-slot": "tag-group", className: cn.cn("flex flex-col gap-2", className), children: [
9712
9724
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: label }),
9713
9725
  /* @__PURE__ */ jsxRuntime.jsx("ul", { "data-slot": "tag-group-list", className: "flex list-none flex-wrap gap-1 p-0 m-0", children })
9714
9726
  ] })
@@ -9977,7 +9989,7 @@ function Toggle({
9977
9989
  }
9978
9990
  );
9979
9991
  if (label) {
9980
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-1", children: [
9992
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-2", children: [
9981
9993
  /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
9982
9994
  toggle$1
9983
9995
  ] });
@@ -10037,7 +10049,7 @@ function ToggleGroup({
10037
10049
  }
10038
10050
  ) });
10039
10051
  if (label) {
10040
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-1", children: [
10052
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col gap-2", children: [
10041
10053
  /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, children: label }),
10042
10054
  group
10043
10055
  ] });