@umami/react-zen 0.254.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.mjs CHANGED
@@ -3604,7 +3604,7 @@ var InputGroupTextarea = forwardRef(
3604
3604
  );
3605
3605
  InputGroupTextarea.displayName = "InputGroupTextarea";
3606
3606
  var labelClasses = [
3607
- "flex items-center gap-2 text-sm leading-none font-medium select-none",
3607
+ "flex items-center gap-2 text-sm leading-none font-semibold select-none",
3608
3608
  "peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
3609
3609
  "group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50"
3610
3610
  ];
@@ -3651,7 +3651,7 @@ var Autocomplete = forwardRef(
3651
3651
  onValueChange?.(value, details);
3652
3652
  if (!details.isCanceled) onChange?.(value);
3653
3653
  },
3654
- children: /* @__PURE__ */ jsxs("div", { "data-slot": "autocomplete", className: cn("relative flex flex-col gap-1", className), children: [
3654
+ children: /* @__PURE__ */ jsxs("div", { "data-slot": "autocomplete", className: cn("relative flex flex-col gap-2", className), children: [
3655
3655
  label && /* @__PURE__ */ jsx(Label, { htmlFor: inputId, children: label }),
3656
3656
  /* @__PURE__ */ jsxs(InputGroup, { children: [
3657
3657
  /* @__PURE__ */ jsx(
@@ -4439,7 +4439,7 @@ var checkboxStyles = tv({
4439
4439
  "flex items-center justify-center text-current",
4440
4440
  "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5"
4441
4441
  ],
4442
- label: "cursor-pointer peer-disabled:cursor-default peer-disabled:opacity-50"
4442
+ label: "cursor-pointer font-normal peer-disabled:cursor-default peer-disabled:opacity-50"
4443
4443
  }
4444
4444
  });
4445
4445
  function Checkbox({
@@ -4777,7 +4777,7 @@ function List({
4777
4777
  }
4778
4778
  ) });
4779
4779
  if (label) {
4780
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
4780
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
4781
4781
  /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
4782
4782
  listbox
4783
4783
  ] });
@@ -5027,7 +5027,7 @@ function ComboBox({
5027
5027
  onValueChange?.(next, details);
5028
5028
  onChange?.(next);
5029
5029
  },
5030
- children: /* @__PURE__ */ jsxs("div", { "data-slot": "combobox", className: cn("relative flex flex-col gap-1", className), children: [
5030
+ children: /* @__PURE__ */ jsxs("div", { "data-slot": "combobox", className: cn("relative flex flex-col gap-2", className), children: [
5031
5031
  label && /* @__PURE__ */ jsx(Label, { htmlFor: inputId, children: label }),
5032
5032
  /* @__PURE__ */ jsxs(Combobox.InputGroup, { render: /* @__PURE__ */ jsx(InputGroup, {}), children: [
5033
5033
  /* @__PURE__ */ jsx(
@@ -5415,9 +5415,9 @@ function CopyButton({ value, timeout = TIMEOUT, className, ...props }) {
5415
5415
  );
5416
5416
  }
5417
5417
  var fieldOrientationClasses = {
5418
- vertical: "flex-col gap-1 *:w-full [&>.sr-only]:w-auto",
5418
+ vertical: "flex-col gap-2 *:w-full [&>.sr-only]:w-auto",
5419
5419
  horizontal: "flex-row items-center gap-2 has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto",
5420
- 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"
5420
+ 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"
5421
5421
  };
5422
5422
  var Field = forwardRef(
5423
5423
  ({ orientation = "vertical", className, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -5679,7 +5679,7 @@ var TextField = forwardRef(function TextField2({
5679
5679
  if (!label && !description && !error) {
5680
5680
  return input;
5681
5681
  }
5682
- return /* @__PURE__ */ jsxs(Field$1.Root, { "data-slot": "text-field", className: "flex flex-col gap-1", children: [
5682
+ return /* @__PURE__ */ jsxs(Field$1.Root, { "data-slot": "text-field", className: "flex flex-col gap-2", children: [
5683
5683
  label && /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
5684
5684
  input,
5685
5685
  description && /* @__PURE__ */ jsx(FieldDescription, { id: descriptionId, children: description }),
@@ -6751,7 +6751,7 @@ function DatePicker({
6751
6751
  onChange?.(nextDate);
6752
6752
  setOpen(false);
6753
6753
  };
6754
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), "data-slot": "date-picker", children: [
6754
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), "data-slot": "date-picker", children: [
6755
6755
  label && /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
6756
6756
  /* @__PURE__ */ jsxs(Popover$1.Root, { open, onOpenChange: setOpen, children: [
6757
6757
  /* @__PURE__ */ jsx(
@@ -7200,7 +7200,7 @@ function FormField({
7200
7200
  const { control } = context;
7201
7201
  const { invalid, error } = context.getFieldState(name);
7202
7202
  const describedBy = [description && descriptionId, invalid && errorId].filter(Boolean).join(" ") || void 0;
7203
- return /* @__PURE__ */ jsxs(Column, { ...props, gap: "1", className, children: [
7203
+ return /* @__PURE__ */ jsxs(Column, { ...props, gap: "2", className, children: [
7204
7204
  label && /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
7205
7205
  /* @__PURE__ */ jsx(FormController, { name, control, rules, children: ({ field }) => {
7206
7206
  return Children.map(
@@ -7243,7 +7243,7 @@ function FormFieldArray({
7243
7243
  register(name, rules);
7244
7244
  const errors = formState?.errors || {};
7245
7245
  const errorMessage = errors[name]?.message;
7246
- return /* @__PURE__ */ jsxs(Column, { ...props, gap: "1", className, children: [
7246
+ return /* @__PURE__ */ jsxs(Column, { ...props, gap: "2", className, children: [
7247
7247
  label && /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
7248
7248
  description && /* @__PURE__ */ jsx(Text, { color: "muted", children: description }),
7249
7249
  errorMessage && /* @__PURE__ */ jsx(Text, { role: "alert", className: "text-status-error", children: errorMessage }),
@@ -7824,7 +7824,7 @@ function Meter({
7824
7824
  max: maxValue,
7825
7825
  format: formatOptions,
7826
7826
  "data-slot": "meter",
7827
- className: cn("flex flex-col gap-1 w-full", className),
7827
+ className: cn("flex flex-col gap-2 w-full", className),
7828
7828
  children: [
7829
7829
  (label || showValue) && /* @__PURE__ */ jsxs("div", { "data-slot": "meter-header", className: "flex items-center justify-between gap-3", children: [
7830
7830
  label && /* @__PURE__ */ jsx(Meter$1.Label, { "data-slot": "meter-label", render: /* @__PURE__ */ jsx(Label, {}), children: label }),
@@ -7996,7 +7996,7 @@ var NumberField = forwardRef(function NumberField2({
7996
7996
  required: isRequired ?? required,
7997
7997
  format: formatOptions ?? format,
7998
7998
  onValueChange: (value) => onChange?.(value),
7999
- className: cn("flex flex-col gap-1", className),
7999
+ className: cn("flex flex-col gap-2", className),
8000
8000
  children: [
8001
8001
  label && /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
8002
8002
  /* @__PURE__ */ jsxs(
@@ -8081,7 +8081,7 @@ var OTPField = forwardRef(function OTPField2({
8081
8081
  }, ref) {
8082
8082
  const fieldId = useFieldId(id);
8083
8083
  const labelId = `${fieldId}-label`;
8084
- return /* @__PURE__ */ jsxs("div", { "data-slot": "otp-field", className: "flex flex-col gap-1", children: [
8084
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "otp-field", className: "flex flex-col gap-2", children: [
8085
8085
  label && /* @__PURE__ */ jsx(Label, { id: labelId, htmlFor: `${fieldId}-0`, children: label }),
8086
8086
  /* @__PURE__ */ jsx(
8087
8087
  OTPField$1.Root,
@@ -8454,7 +8454,7 @@ var PasswordField = forwardRef(
8454
8454
  ) })
8455
8455
  ] });
8456
8456
  if (label) {
8457
- return /* @__PURE__ */ jsxs("div", { "data-slot": "password-field", className: "flex flex-col gap-1", children: [
8457
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "password-field", className: "flex flex-col gap-2", children: [
8458
8458
  /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
8459
8459
  input
8460
8460
  ] });
@@ -8767,7 +8767,12 @@ function Radio({ children, className, isDisabled, id, ...props }) {
8767
8767
  Radio$1.Indicator,
8768
8768
  {
8769
8769
  "data-slot": "radio-indicator",
8770
- className: "size-2 rounded-full bg-primary data-unchecked:hidden"
8770
+ keepMounted: true,
8771
+ className: cn(
8772
+ "size-2 rounded-full bg-primary",
8773
+ "transition-[transform,opacity] duration-200 ease-out motion-reduce:transition-none",
8774
+ "data-unchecked:scale-0 data-unchecked:opacity-0"
8775
+ )
8771
8776
  }
8772
8777
  )
8773
8778
  }
@@ -8776,7 +8781,7 @@ function Radio({ children, className, isDisabled, id, ...props }) {
8776
8781
  Label,
8777
8782
  {
8778
8783
  htmlFor: fieldId,
8779
- className: "cursor-pointer peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
8784
+ className: "cursor-pointer font-normal peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
8780
8785
  children
8781
8786
  }
8782
8787
  ) : null
@@ -8925,7 +8930,7 @@ var SearchField = forwardRef(function SearchField2({
8925
8930
  ) })
8926
8931
  ] });
8927
8932
  if (label) {
8928
- return /* @__PURE__ */ jsxs("div", { "data-slot": "search-field", className: "flex flex-col gap-1", children: [
8933
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "search-field", className: "flex flex-col gap-2", children: [
8929
8934
  /* @__PURE__ */ jsx(Label, { htmlFor: fieldId, children: label }),
8930
8935
  input
8931
8936
  ] });
@@ -9000,7 +9005,7 @@ function Select({
9000
9005
  const useScrollArea = maxHeight !== void 0 && !isFullscreen;
9001
9006
  const mergedTriggerProps = { ...buttonProps, ...triggerProps };
9002
9007
  const { className: triggerClassName2, ...restTriggerProps } = mergedTriggerProps;
9003
- return /* @__PURE__ */ jsx("div", { "data-slot": "select", className: cn("flex flex-col gap-1", className), children: /* @__PURE__ */ jsxs(
9008
+ return /* @__PURE__ */ jsx("div", { "data-slot": "select", className: cn("flex flex-col gap-2", className), children: /* @__PURE__ */ jsxs(
9004
9009
  Select$1.Root,
9005
9010
  {
9006
9011
  ...props,
@@ -9550,7 +9555,7 @@ function Switch({
9550
9555
  Label,
9551
9556
  {
9552
9557
  htmlFor: fieldId,
9553
- className: "cursor-pointer peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
9558
+ className: "cursor-pointer font-normal peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50",
9554
9559
  children: labelContent
9555
9560
  }
9556
9561
  ) : null
@@ -9692,7 +9697,7 @@ function TagGroup({ label, children, className, onRemove, ...props }) {
9692
9697
  allowsRemoving: !!onRemove,
9693
9698
  remove: (key) => onRemove?.(/* @__PURE__ */ new Set([key]))
9694
9699
  },
9695
- children: /* @__PURE__ */ jsxs("div", { ...props, "data-slot": "tag-group", className: cn("flex flex-col gap-1", className), children: [
9700
+ children: /* @__PURE__ */ jsxs("div", { ...props, "data-slot": "tag-group", className: cn("flex flex-col gap-2", className), children: [
9696
9701
  label && /* @__PURE__ */ jsx(Label, { children: label }),
9697
9702
  /* @__PURE__ */ jsx("ul", { "data-slot": "tag-group-list", className: "flex list-none flex-wrap gap-1 p-0 m-0", children })
9698
9703
  ] })
@@ -9961,7 +9966,7 @@ function Toggle({
9961
9966
  }
9962
9967
  );
9963
9968
  if (label) {
9964
- return /* @__PURE__ */ jsxs("div", { className: "inline-flex flex-col gap-1", children: [
9969
+ return /* @__PURE__ */ jsxs("div", { className: "inline-flex flex-col gap-2", children: [
9965
9970
  /* @__PURE__ */ jsx(Label, { id: labelId, children: label }),
9966
9971
  toggle
9967
9972
  ] });
@@ -10021,7 +10026,7 @@ function ToggleGroup({
10021
10026
  }
10022
10027
  ) });
10023
10028
  if (label) {
10024
- return /* @__PURE__ */ jsxs("div", { className: "inline-flex flex-col gap-1", children: [
10029
+ return /* @__PURE__ */ jsxs("div", { className: "inline-flex flex-col gap-2", children: [
10025
10030
  /* @__PURE__ */ jsx(Label, { id: labelId, children: label }),
10026
10031
  group
10027
10032
  ] });