tinacms 2.1.0 → 2.1.1

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
@@ -19,10 +19,16 @@ import { FORM_ERROR, createForm, getIn } from "final-form";
19
19
  import { Field, Form as Form$1 } from "react-final-form";
20
20
  import PropTypes from "prop-types";
21
21
  import { Droppable, Draggable, DragDropContext } from "react-beautiful-dnd";
22
- import * as Popover$1 from "@radix-ui/react-popover";
22
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
23
23
  import * as pkg$1 from "react-color";
24
24
  import * as pkg from "color-string";
25
25
  import * as dropzone from "react-dropzone";
26
+ import { Slot } from "@radix-ui/react-slot";
27
+ import { cva } from "class-variance-authority";
28
+ import { clsx } from "clsx";
29
+ import { twMerge } from "tailwind-merge";
30
+ import { Command as Command$1 } from "cmdk";
31
+ import { Search } from "lucide-react";
26
32
  import get from "lodash.get";
27
33
  import moment from "moment";
28
34
  import { formatDistanceToNow } from "date-fns";
@@ -2435,7 +2441,7 @@ TinaField.propTypes = {
2435
2441
  Component: PropTypes.any.isRequired,
2436
2442
  children: PropTypes.any
2437
2443
  };
2438
- const Button = ({
2444
+ const Button$1 = ({
2439
2445
  variant = "secondary",
2440
2446
  as: Tag2 = "button",
2441
2447
  size = "medium",
@@ -2539,8 +2545,8 @@ function classNames(...classes) {
2539
2545
  return classes.filter(Boolean).join(" ");
2540
2546
  }
2541
2547
  const OverflowMenu$1 = ({ toolbarItems, className = "w-full" }) => {
2542
- return /* @__PURE__ */ React__default.createElement(Popover$1.Root, null, /* @__PURE__ */ React__default.createElement(
2543
- Popover$1.Trigger,
2548
+ return /* @__PURE__ */ React__default.createElement(PopoverPrimitive.Root, null, /* @__PURE__ */ React__default.createElement(
2549
+ PopoverPrimitive.Trigger,
2544
2550
  {
2545
2551
  className: `cursor-pointer relative justify-center inline-flex items-center p-3 text-sm font-medium focus:outline-1 focus:outline-blue-200 pointer-events-auto ${open ? `text-blue-400` : `text-gray-300 hover:text-blue-500`} ${className}}`
2546
2552
  },
@@ -2563,7 +2569,7 @@ const OverflowMenu$1 = ({ toolbarItems, className = "w-full" }) => {
2563
2569
  }
2564
2570
  )
2565
2571
  )
2566
- ), /* @__PURE__ */ React__default.createElement(Popover$1.Portal, null, /* @__PURE__ */ React__default.createElement(Popover$1.Content, { style: { zIndex: 2e4 }, align: "end" }, /* @__PURE__ */ React__default.createElement("div", { className: "mt-0 -mr-1 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 py-1" }, toolbarItems.map((toolbarItem) => {
2572
+ ), /* @__PURE__ */ React__default.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React__default.createElement(PopoverPrimitive.Content, { style: { zIndex: 2e4 }, align: "end" }, /* @__PURE__ */ React__default.createElement("div", { className: "mt-0 -mr-1 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 py-1" }, toolbarItems.map((toolbarItem) => {
2567
2573
  return /* @__PURE__ */ React__default.createElement(
2568
2574
  "span",
2569
2575
  {
@@ -2974,7 +2980,7 @@ const ResetForm = ({
2974
2980
  }) => {
2975
2981
  const [open2, setOpen] = React.useState(false);
2976
2982
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
2977
- Button,
2983
+ Button$1,
2978
2984
  {
2979
2985
  onClick: () => {
2980
2986
  setOpen((p) => !p);
@@ -2986,8 +2992,8 @@ const ResetForm = ({
2986
2992
  ), open2 && /* @__PURE__ */ React.createElement(ResetModal, { reset, close: () => setOpen(false) }));
2987
2993
  };
2988
2994
  const ResetModal = ({ close: close2, reset }) => {
2989
- return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Reset"), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", null, "Are you sure you want to reset all changes?")), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
2990
- Button,
2995
+ return /* @__PURE__ */ React.createElement(Modal, null, /* @__PURE__ */ React.createElement(ModalPopup, null, /* @__PURE__ */ React.createElement(ModalHeader, { close: close2 }, "Reset"), /* @__PURE__ */ React.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React.createElement("p", null, "Are you sure you want to reset all changes?")), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
2996
+ Button$1,
2991
2997
  {
2992
2998
  style: { flexGrow: 3 },
2993
2999
  variant: "primary",
@@ -3118,6 +3124,12 @@ const ActionButton = ({ className = "", ...props }) => /* @__PURE__ */ React.cre
3118
3124
  ...props
3119
3125
  }
3120
3126
  );
3127
+ function IoMdArrowDropdown(props) {
3128
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M128 192l128 128 128-128z" }, "child": [] }] })(props);
3129
+ }
3130
+ function IoMdArrowDropup(props) {
3131
+ return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M128 320l128-128 128 128z" }, "child": [] }] })(props);
3132
+ }
3121
3133
  function IoMdClose(props) {
3122
3134
  return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z" }, "child": [] }] })(props);
3123
3135
  }
@@ -3289,7 +3301,7 @@ const Swatch = ({
3289
3301
  !colorRGBA ? "Click to add color" : ColorFormatter[colorFormat].getLabel(colorRGBA)
3290
3302
  )
3291
3303
  );
3292
- const Popover = ({
3304
+ const Popover$1 = ({
3293
3305
  triggerBoundingBox,
3294
3306
  openTop,
3295
3307
  className = "",
@@ -3417,7 +3429,7 @@ const ColorPicker = ({
3417
3429
  colorFormat: getColorFormat
3418
3430
  }
3419
3431
  ), displayColorPicker && /* @__PURE__ */ React.createElement(FormPortal, null, ({ zIndexShift }) => /* @__PURE__ */ React.createElement(
3420
- Popover,
3432
+ Popover$1,
3421
3433
  {
3422
3434
  openTop,
3423
3435
  triggerBoundingBox,
@@ -3798,6 +3810,128 @@ const DeleteImageButton = ({
3798
3810
  return /* @__PURE__ */ React.createElement(IconButton, { variant: "white", className: "flex-none", onClick }, /* @__PURE__ */ React.createElement(TrashIcon, { className: "w-7 h-auto" }));
3799
3811
  };
3800
3812
  const ImageLoadingIndicator = () => /* @__PURE__ */ React.createElement("div", { className: "p-4 w-full min-h-[96px] flex flex-col justify-center items-center" }, /* @__PURE__ */ React.createElement(LoadingDots, null));
3813
+ function cn(...inputs) {
3814
+ return twMerge(clsx(inputs));
3815
+ }
3816
+ const buttonVariants = cva(
3817
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
3818
+ {
3819
+ variants: {
3820
+ variant: {
3821
+ outline: "border border-gray-200 bg-white hover:bg-white hover:text-accent-foreground"
3822
+ },
3823
+ size: {
3824
+ default: "h-10 px-4 py-2",
3825
+ sm: "h-9 rounded-md px-3",
3826
+ lg: "h-11 rounded-md px-8",
3827
+ icon: "h-10 w-10"
3828
+ }
3829
+ },
3830
+ defaultVariants: {
3831
+ variant: "outline",
3832
+ size: "default"
3833
+ }
3834
+ }
3835
+ );
3836
+ const Button = React.forwardRef(
3837
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
3838
+ const Comp = asChild ? Slot : "button";
3839
+ return /* @__PURE__ */ React.createElement(
3840
+ Comp,
3841
+ {
3842
+ className: cn(buttonVariants({ variant, size, className })),
3843
+ ref,
3844
+ ...props
3845
+ }
3846
+ );
3847
+ }
3848
+ );
3849
+ Button.displayName = "Button";
3850
+ const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
3851
+ Command$1,
3852
+ {
3853
+ ref,
3854
+ className: cn(
3855
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-popover-foreground",
3856
+ className
3857
+ ),
3858
+ ...props
3859
+ }
3860
+ ));
3861
+ Command.displayName = Command$1.displayName;
3862
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "" }, /* @__PURE__ */ React.createElement(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ React.createElement(
3863
+ Command$1.Input,
3864
+ {
3865
+ ref,
3866
+ className: cn(
3867
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
3868
+ className
3869
+ ),
3870
+ ...props
3871
+ }
3872
+ )));
3873
+ CommandInput.displayName = Command$1.Input.displayName;
3874
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
3875
+ Command$1.List,
3876
+ {
3877
+ ref,
3878
+ className: cn("overflow-x-hidden", className),
3879
+ ...props
3880
+ }
3881
+ ));
3882
+ CommandList.displayName = Command$1.List.displayName;
3883
+ const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ React.createElement(
3884
+ Command$1.Empty,
3885
+ {
3886
+ ref,
3887
+ className: "py-6 text-center text-sm",
3888
+ ...props
3889
+ }
3890
+ ));
3891
+ CommandEmpty.displayName = Command$1.Empty.displayName;
3892
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
3893
+ Command$1.Group,
3894
+ {
3895
+ ref,
3896
+ className: cn(
3897
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
3898
+ className
3899
+ ),
3900
+ ...props
3901
+ }
3902
+ ));
3903
+ CommandGroup.displayName = Command$1.Group.displayName;
3904
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
3905
+ Command$1.Item,
3906
+ {
3907
+ ref,
3908
+ className: cn(
3909
+ "hover:bg-slate-100 relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",
3910
+ className
3911
+ ),
3912
+ ...props
3913
+ }
3914
+ ));
3915
+ CommandItem.displayName = Command$1.Item.displayName;
3916
+ const Popover = PopoverPrimitive.Root;
3917
+ const PopoverTrigger = PopoverPrimitive.Trigger;
3918
+ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
3919
+ PopoverPrimitive.Content,
3920
+ {
3921
+ ref,
3922
+ style: { zIndex: 9999 },
3923
+ align,
3924
+ sideOffset,
3925
+ side: "bottom",
3926
+ className: cn(
3927
+ "rounded-md border bg-white p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
3928
+ "max-h-[30vh] overflow-y-auto",
3929
+ className
3930
+ ),
3931
+ ...props
3932
+ }
3933
+ )));
3934
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
3801
3935
  const useGetOptionSets = (cms, collections) => {
3802
3936
  const [optionSets, setOptionSets] = React.useState([]);
3803
3937
  const [loading, setLoading] = React.useState(true);
@@ -3817,8 +3951,9 @@ const useGetOptionSets = (cms, collections) => {
3817
3951
  id,
3818
3952
  }
3819
3953
  ...on Document {
3954
+ _values
3820
3955
  _internalSys: _sys {
3821
- title
3956
+ filename
3822
3957
  }
3823
3958
  }
3824
3959
  }
@@ -3852,41 +3987,78 @@ const useGetOptionSets = (cms, collections) => {
3852
3987
  }, [cms, collections]);
3853
3988
  return { optionSets, loading };
3854
3989
  };
3855
- const ReferenceSelect = ({
3990
+ const getFilename = (optionSets, value) => {
3991
+ const nodes = optionSets.flatMap(
3992
+ (optionSet) => optionSet.edges.map((edge) => edge.node)
3993
+ );
3994
+ const node = nodes.find((node2) => node2.id === value);
3995
+ return node ? node._internalSys.filename : null;
3996
+ };
3997
+ const ComboboxDemo = ({
3856
3998
  cms,
3857
3999
  input,
3858
4000
  field
3859
4001
  }) => {
4002
+ const [open2, setOpen] = React.useState(false);
4003
+ const [value, setValue] = React.useState(input.value);
4004
+ const [displayText, setDisplayText] = React.useState(null);
3860
4005
  const { optionSets, loading } = useGetOptionSets(cms, field.collections);
3861
- const ref = React.useRef(null);
3862
4006
  React.useEffect(() => {
3863
- if (ref.current && field.experimental_focusIntent) {
3864
- ref.current.focus();
3865
- }
3866
- }, [field.experimental_focusIntent, ref]);
4007
+ setDisplayText(getFilename(optionSets, value));
4008
+ input.onChange(value);
4009
+ }, [value, input, optionSets]);
3867
4010
  if (loading === true) {
3868
4011
  return /* @__PURE__ */ React.createElement(LoadingDots, { color: "var(--tina-color-primary)" });
3869
4012
  }
3870
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
3871
- "select",
4013
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Popover, { open: open2, onOpenChange: setOpen }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
4014
+ Button,
3872
4015
  {
3873
- ref,
3874
- id: input.name,
3875
- value: input.value,
3876
- onChange: input.onChange,
3877
- className: selectFieldClasses,
3878
- ...input
4016
+ variant: "outline",
4017
+ role: "combobox",
4018
+ "aria-expanded": open2,
4019
+ className: "w-52 justify-between"
3879
4020
  },
3880
- /* @__PURE__ */ React.createElement("option", { value: "" }, "Choose an option"),
3881
- optionSets.length > 0 && optionSets.map(({ collection, edges }) => /* @__PURE__ */ React.createElement("optgroup", { key: `${collection}-group`, label: collection }, edges.map(
3882
- ({
3883
- node: {
3884
- id,
3885
- _internalSys: { title }
3886
- }
3887
- }) => /* @__PURE__ */ React.createElement("option", { key: `${id}-option`, value: id }, title || id)
4021
+ /* @__PURE__ */ React.createElement("p", { className: "truncate" }, displayText ?? "Choose an option..."),
4022
+ open2 ? /* @__PURE__ */ React.createElement(IoMdArrowDropup, { size: 20 }) : /* @__PURE__ */ React.createElement(IoMdArrowDropdown, { size: 20 })
4023
+ )), /* @__PURE__ */ React.createElement(PopoverContent, { className: "p-0 relative" }, /* @__PURE__ */ React.createElement(
4024
+ Command,
4025
+ {
4026
+ filter: (value2, search) => {
4027
+ if (value2.includes(search))
4028
+ return 1;
4029
+ return 0;
4030
+ }
4031
+ },
4032
+ /* @__PURE__ */ React.createElement(CommandInput, { placeholder: "Search reference..." }),
4033
+ /* @__PURE__ */ React.createElement(CommandEmpty, null, "No reference found"),
4034
+ /* @__PURE__ */ React.createElement(CommandList, null, optionSets.length > 0 && optionSets.map(({ collection, edges }) => /* @__PURE__ */ React.createElement(
4035
+ CommandGroup,
4036
+ {
4037
+ key: `${collection}-group`,
4038
+ heading: collection
4039
+ },
4040
+ /* @__PURE__ */ React.createElement(CommandList, null, edges.map(
4041
+ ({
4042
+ node: {
4043
+ id,
4044
+ _internalSys: { filename },
4045
+ _values: { title, name }
4046
+ }
4047
+ }) => /* @__PURE__ */ React.createElement(
4048
+ CommandItem,
4049
+ {
4050
+ key: `${id}-option`,
4051
+ value: id || title,
4052
+ onSelect: () => {
4053
+ setValue(id);
4054
+ setOpen(false);
4055
+ }
4056
+ },
4057
+ /* @__PURE__ */ React.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React.createElement("span", { className: "font-semibold text-sm" }, title || name || id), (title || name) && /* @__PURE__ */ React.createElement("span", { className: "text-x" }, filename))
4058
+ )
4059
+ ))
3888
4060
  )))
3889
- ), /* @__PURE__ */ React.createElement(MdKeyboardArrowDown, { className: "absolute top-1/2 right-3 w-6 h-auto -translate-y-1/2 text-gray-300 group-hover:text-blue-500 transition duration-150 ease-out" }));
4061
+ ))));
3890
4062
  };
3891
4063
  const useGetNode = (cms, id) => {
3892
4064
  const [document2, setDocument] = React.useState(
@@ -3951,7 +4123,7 @@ const ReferenceLink = ({ cms, input }) => {
3951
4123
  "a",
3952
4124
  {
3953
4125
  href: `${tinaPreview ? `/${tinaPreview}/index.html#` : "/admin#"}/collections/${document2._sys.collection.name}/${document2._sys.breadcrumbs.join("/")}`,
3954
- className: "text-gray-700 hover:text-blue-500 flex items-center uppercase text-sm mt-2 mb-2 leading-none"
4126
+ className: "text-gray-700 hover:text-blue-500 inline-flex items-center uppercase text-sm mt-2 mb-2 leading-none"
3955
4127
  },
3956
4128
  /* @__PURE__ */ React.createElement(BiEdit, { className: "h-5 w-auto opacity-80 mr-2" }),
3957
4129
  "Edit in CMS"
@@ -3959,7 +4131,7 @@ const ReferenceLink = ({ cms, input }) => {
3959
4131
  };
3960
4132
  const Reference = ({ input, field }) => {
3961
4133
  const cms = useCMS();
3962
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "relative group" }, /* @__PURE__ */ React.createElement(ReferenceSelect, { cms, input, field })), /* @__PURE__ */ React.createElement(ReferenceLink, { cms, input }));
4134
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "relative group" }, /* @__PURE__ */ React.createElement(ComboboxDemo, { cms, input, field })), /* @__PURE__ */ React.createElement(ReferenceLink, { cms, input }));
3963
4135
  };
3964
4136
  const ButtonToggle = ({
3965
4137
  input,
@@ -6235,21 +6407,21 @@ class Datetime extends React__default.Component {
6235
6407
  return parsedDate;
6236
6408
  }
6237
6409
  getClassName() {
6238
- let cn = "rdt";
6410
+ let cn2 = "rdt";
6239
6411
  let props = this.props;
6240
6412
  let propCn = props.className;
6241
6413
  if (Array.isArray(propCn)) {
6242
- cn += " " + propCn.join(" ");
6414
+ cn2 += " " + propCn.join(" ");
6243
6415
  } else if (propCn) {
6244
- cn += " " + propCn;
6416
+ cn2 += " " + propCn;
6245
6417
  }
6246
6418
  if (!props.input) {
6247
- cn += " rdtStatic";
6419
+ cn2 += " rdtStatic";
6248
6420
  }
6249
6421
  if (this.isOpen()) {
6250
- cn += " rdtOpen";
6422
+ cn2 += " rdtOpen";
6251
6423
  }
6252
- return cn;
6424
+ return cn2;
6253
6425
  }
6254
6426
  isOpen() {
6255
6427
  return !this.props.input || (this.props.open === void 0 ? this.state.open : this.props.open);
@@ -6723,7 +6895,7 @@ const PasswordFieldComponent = wrapFieldsWithMeta(({ field, form, meta, input, c
6723
6895
  }
6724
6896
  }
6725
6897
  ), /* @__PURE__ */ React.createElement(
6726
- Button,
6898
+ Button$1,
6727
6899
  {
6728
6900
  variant: "secondary",
6729
6901
  disabled: password === void 0 && confirmPassword === void 0,
@@ -6883,7 +7055,7 @@ const BranchSwitcherLegacy = ({
6883
7055
  },
6884
7056
  "Learn more about moving to production with Tina Cloud."
6885
7057
  )), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement(
6886
- Button,
7058
+ Button$1,
6887
7059
  {
6888
7060
  href: "https://tina.io/docs/tina-cloud/",
6889
7061
  target: "_blank",
@@ -6904,7 +7076,7 @@ const BranchSwitcherLegacy = ({
6904
7076
  chooseBranch(branchName);
6905
7077
  }
6906
7078
  }
6907
- ) : /* @__PURE__ */ React.createElement("div", { className: "px-6 py-8 w-full h-full flex flex-col items-center justify-center" }, /* @__PURE__ */ React.createElement("p", { className: "text-base mb-4 text-center" }, "An error occurred while retrieving the branch list."), /* @__PURE__ */ React.createElement(Button, { className: "mb-4", onClick: refreshBranchList }, "Try again ", /* @__PURE__ */ React.createElement(BiRefresh, { className: "w-6 h-full ml-1 opacity-70" }))))));
7079
+ ) : /* @__PURE__ */ React.createElement("div", { className: "px-6 py-8 w-full h-full flex flex-col items-center justify-center" }, /* @__PURE__ */ React.createElement("p", { className: "text-base mb-4 text-center" }, "An error occurred while retrieving the branch list."), /* @__PURE__ */ React.createElement(Button$1, { className: "mb-4", onClick: refreshBranchList }, "Try again ", /* @__PURE__ */ React.createElement(BiRefresh, { className: "w-6 h-full ml-1 opacity-70" }))))));
6908
7080
  };
6909
7081
  const getFilteredBranchList$1 = (branchList, filter, currentBranchName) => {
6910
7082
  const filteredBranchList = branchList.filter(
@@ -6989,7 +7161,7 @@ const CreateBranch = ({ currentBranch, newBranchName, onCreateBranch, setNewBran
6989
7161
  onChange: (e) => setNewBranchName(e.target.value)
6990
7162
  }
6991
7163
  ), /* @__PURE__ */ React.createElement(
6992
- Button,
7164
+ Button$1,
6993
7165
  {
6994
7166
  className: "flex-0 flex items-center gap-2 whitespace-nowrap",
6995
7167
  size: "medium",
@@ -7119,7 +7291,7 @@ const EditoralBranchSwitcher = ({
7119
7291
  },
7120
7292
  "Learn more about moving to production with Tina Cloud."
7121
7293
  )), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement(
7122
- Button,
7294
+ Button$1,
7123
7295
  {
7124
7296
  href: "https://tina.io/docs/tina-cloud/",
7125
7297
  target: "_blank",
@@ -7147,7 +7319,7 @@ const EditoralBranchSwitcher = ({
7147
7319
  chooseBranch(branchName);
7148
7320
  }
7149
7321
  }
7150
- ) : /* @__PURE__ */ React.createElement("div", { className: "px-6 py-8 w-full h-full flex flex-col items-center justify-center" }, /* @__PURE__ */ React.createElement("p", { className: "text-base mb-4 text-center" }, "An error occurred while retrieving the branch list."), /* @__PURE__ */ React.createElement(Button, { className: "mb-4", onClick: refreshBranchList }, "Try again ", /* @__PURE__ */ React.createElement(BiRefresh, { className: "w-6 h-full ml-1 opacity-70" }))))));
7322
+ ) : /* @__PURE__ */ React.createElement("div", { className: "px-6 py-8 w-full h-full flex flex-col items-center justify-center" }, /* @__PURE__ */ React.createElement("p", { className: "text-base mb-4 text-center" }, "An error occurred while retrieving the branch list."), /* @__PURE__ */ React.createElement(Button$1, { className: "mb-4", onClick: refreshBranchList }, "Try again ", /* @__PURE__ */ React.createElement(BiRefresh, { className: "w-6 h-full ml-1 opacity-70" }))))));
7151
7323
  };
7152
7324
  const getFilteredBranchList = (branchList, search, currentBranchName, filter = "all") => {
7153
7325
  const filteredBranchList = branchList.filter(
@@ -7201,7 +7373,7 @@ const BranchCreator = ({ setViewState, handleCreateBranch, currentBranch }) => {
7201
7373
  onChange: (e) => setBranchName(e.target.value)
7202
7374
  }
7203
7375
  ))), /* @__PURE__ */ React.createElement("div", { className: "w-full flex justify-between gap-4 items-center" }, /* @__PURE__ */ React.createElement(
7204
- Button,
7376
+ Button$1,
7205
7377
  {
7206
7378
  style: { flexGrow: 1 },
7207
7379
  onClick: () => {
@@ -7210,7 +7382,7 @@ const BranchCreator = ({ setViewState, handleCreateBranch, currentBranch }) => {
7210
7382
  },
7211
7383
  "Cancel"
7212
7384
  ), /* @__PURE__ */ React.createElement(
7213
- Button,
7385
+ Button$1,
7214
7386
  {
7215
7387
  variant: "primary",
7216
7388
  type: "submit",
@@ -7311,7 +7483,7 @@ const BranchSelector = ({
7311
7483
  }
7312
7484
  ))),
7313
7485
  /* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, indexingStatus === "complete" && !isCurrentBranch && /* @__PURE__ */ React.createElement(
7314
- Button,
7486
+ Button$1,
7315
7487
  {
7316
7488
  variant: "white",
7317
7489
  size: "custom",
@@ -8282,7 +8454,7 @@ const NoFormsPlaceholder = () => /* @__PURE__ */ React.createElement(
8282
8454
  /* @__PURE__ */ React.createElement(Emoji$1, { className: "pb-5" }, "🔎"),
8283
8455
  /* @__PURE__ */ React.createElement("p", { className: "block pb-5" }, "Looks like there's ", /* @__PURE__ */ React.createElement("br", null), "nothing to edit on ", /* @__PURE__ */ React.createElement("br", null), "this page."),
8284
8456
  /* @__PURE__ */ React.createElement("p", { className: "block" }, /* @__PURE__ */ React.createElement(
8285
- Button,
8457
+ Button$1,
8286
8458
  {
8287
8459
  href: "https://tina.io/docs/tinacms-context/",
8288
8460
  target: "_blank",
@@ -8801,7 +8973,7 @@ const EventsList = ({ cms }) => {
8801
8973
  /* @__PURE__ */ React.createElement("span", { className: "w-full block text-gray-300 text-xs mt-0.5" }, time)
8802
8974
  ));
8803
8975
  }).flat())), loading && /* @__PURE__ */ React.createElement("div", { className: "text-sm text-gray-400 text-center" }, "Loading..."), error && /* @__PURE__ */ React.createElement("div", null, "Error: ", error.message), /* @__PURE__ */ React.createElement("div", { className: "text-center flex-1" }, /* @__PURE__ */ React.createElement(
8804
- Button,
8976
+ Button$1,
8805
8977
  {
8806
8978
  onClick: () => {
8807
8979
  setExistingEvents(events);
@@ -9351,7 +9523,7 @@ const Sidebar$1 = ({
9351
9523
  )
9352
9524
  },
9353
9525
  /* @__PURE__ */ React.createElement("div", { className: "absolute top-8 right-0 transform translate-x-full overflow-hidden" }, /* @__PURE__ */ React.createElement(
9354
- Button,
9526
+ Button$1,
9355
9527
  {
9356
9528
  rounded: "right",
9357
9529
  variant: "secondary",
@@ -9425,7 +9597,7 @@ const SidebarHeader = ({
9425
9597
  const branch = (_h = (_g = cms.api) == null ? void 0 : _g.tina) == null ? void 0 : _h.branch;
9426
9598
  const previewUrl = typeof previewFunction === "function" ? (_i = previewFunction({ branch })) == null ? void 0 : _i.url : null;
9427
9599
  return /* @__PURE__ */ React.createElement("div", { className: "flex-grow-0 w-full overflow-visible z-20" }, isLocalMode && /* @__PURE__ */ React.createElement(LocalWarning, null), !isLocalMode && /* @__PURE__ */ React.createElement(BillingWarning, null), /* @__PURE__ */ React.createElement("div", { className: "mt-4 -mb-14 w-full flex gap-3 items-center justify-between pointer-events-none" }, displayMenuButton && /* @__PURE__ */ React.createElement(
9428
- Button,
9600
+ Button$1,
9429
9601
  {
9430
9602
  rounded: "right",
9431
9603
  variant: "white",
@@ -9451,7 +9623,7 @@ const SidebarHeader = ({
9451
9623
  className: `flex items-center pointer-events-auto transition-opacity duration-150 ease-in-out -mr-px`
9452
9624
  },
9453
9625
  /* @__PURE__ */ React.createElement(
9454
- Button,
9626
+ Button$1,
9455
9627
  {
9456
9628
  rounded: "left",
9457
9629
  variant: "white",
@@ -9461,7 +9633,7 @@ const SidebarHeader = ({
9461
9633
  },
9462
9634
  /* @__PURE__ */ React.createElement(MdOutlineArrowBackIos, { className: "h-[18px] w-auto -mr-1 text-blue-500" })
9463
9635
  ),
9464
- /* @__PURE__ */ React.createElement(Button, { rounded: "custom", variant: "white", onClick: toggleFullscreen }, displayState === "fullscreen" ? (
9636
+ /* @__PURE__ */ React.createElement(Button$1, { rounded: "custom", variant: "white", onClick: toggleFullscreen }, displayState === "fullscreen" ? (
9465
9637
  // BiCollapseAlt
9466
9638
  /* @__PURE__ */ React.createElement(
9467
9639
  "svg",
@@ -9530,7 +9702,7 @@ const SidebarCollectionLink = ({
9530
9702
  const EditButton = ({}) => {
9531
9703
  const { displayState, toggleSidebarOpen } = React.useContext(SidebarContext);
9532
9704
  return /* @__PURE__ */ React.createElement(
9533
- Button,
9705
+ Button$1,
9534
9706
  {
9535
9707
  rounded: "right",
9536
9708
  variant: "primary",
@@ -9616,7 +9788,7 @@ function CursorPaginator({
9616
9788
  hasPrev,
9617
9789
  variant = "white"
9618
9790
  }) {
9619
- return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex flex-shrink-0 justify-end gap-2 items-center" }, /* @__PURE__ */ React__default.createElement(Button, { variant, disabled: !hasPrev, onClick: navigatePrev }, /* @__PURE__ */ React__default.createElement(BiLeftArrowAlt, { className: "w-6 h-full mr-2 opacity-70" }), " Previous"), /* @__PURE__ */ React__default.createElement(Button, { variant, disabled: !hasNext, onClick: navigateNext }, "Next ", /* @__PURE__ */ React__default.createElement(BiRightArrowAlt, { className: "w-6 h-full ml-2 opacity-70" })));
9791
+ return /* @__PURE__ */ React__default.createElement("div", { className: "w-full flex flex-shrink-0 justify-end gap-2 items-center" }, /* @__PURE__ */ React__default.createElement(Button$1, { variant, disabled: !hasPrev, onClick: navigatePrev }, /* @__PURE__ */ React__default.createElement(BiLeftArrowAlt, { className: "w-6 h-full mr-2 opacity-70" }), " Previous"), /* @__PURE__ */ React__default.createElement(Button$1, { variant, disabled: !hasNext, onClick: navigateNext }, "Next ", /* @__PURE__ */ React__default.createElement(BiRightArrowAlt, { className: "w-6 h-full ml-2 opacity-70" })));
9620
9792
  }
9621
9793
  function ListMediaItem({ item, onClick, active }) {
9622
9794
  let FileIcon = BiFile;
@@ -9751,8 +9923,8 @@ const DeleteModal$1 = ({
9751
9923
  deleteFunc,
9752
9924
  filename
9753
9925
  }) => {
9754
- return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("p", null, "Are you sure you want to delete ", /* @__PURE__ */ React__default.createElement("strong", null, filename), "?")), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
9755
- Button,
9926
+ return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("p", null, "Are you sure you want to delete ", /* @__PURE__ */ React__default.createElement("strong", null, filename), "?")), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
9927
+ Button$1,
9756
9928
  {
9757
9929
  style: { flexGrow: 3 },
9758
9930
  variant: "danger",
@@ -9774,8 +9946,8 @@ const NewFolderModal = ({ onSubmit, close: close2 }) => {
9774
9946
  required: true,
9775
9947
  onChange: (e) => setFolderName(e.target.value)
9776
9948
  }
9777
- )), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
9778
- Button,
9949
+ )), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
9950
+ Button$1,
9779
9951
  {
9780
9952
  disabled: !folderName,
9781
9953
  style: { flexGrow: 3 },
@@ -10083,7 +10255,7 @@ function MediaPicker({
10083
10255
  close: () => setNewFolderModalOpen(false)
10084
10256
  }
10085
10257
  ), /* @__PURE__ */ React__default.createElement(MediaPickerWrap, null, /* @__PURE__ */ React__default.createElement(SyncStatusContainer, null, /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-wrap items-center bg-gray-50 border-b border-gray-150 gap-4 py-3 px-5 shadow-sm flex-shrink-0" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-1 items-center gap-4" }, /* @__PURE__ */ React__default.createElement(ViewModeToggle, { viewMode, setViewMode }), /* @__PURE__ */ React__default.createElement(Breadcrumb$1, { directory, setDirectory })), cms.media.store.isStatic ? null : /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-wrap items-center gap-4" }, /* @__PURE__ */ React__default.createElement(
10086
- Button,
10258
+ Button$1,
10087
10259
  {
10088
10260
  busy: false,
10089
10261
  variant: "white",
@@ -10093,7 +10265,7 @@ function MediaPicker({
10093
10265
  "Refresh",
10094
10266
  /* @__PURE__ */ React__default.createElement(IoMdRefresh, { className: "w-6 h-full ml-2 opacity-70 text-blue-500" })
10095
10267
  ), /* @__PURE__ */ React__default.createElement(
10096
- Button,
10268
+ Button$1,
10097
10269
  {
10098
10270
  busy: false,
10099
10271
  variant: "white",
@@ -10185,7 +10357,7 @@ const ActiveItemPreview = ({
10185
10357
  alt: activeItem.filename
10186
10358
  }
10187
10359
  )) : /* @__PURE__ */ React__default.createElement("span", { className: "p-3 border border-gray-100 rounded-md overflow-hidden bg-gray-50 shadow" }, /* @__PURE__ */ React__default.createElement(BiFile, { className: "w-14 h-auto fill-gray-300" })), /* @__PURE__ */ React__default.createElement("div", { className: "grow h-full w-full shrink flex flex-col gap-3 items-start justify-start" }, /* @__PURE__ */ React__default.createElement(CopyField, { value: absoluteImgURL(activeItem.src), label: "URL" })), /* @__PURE__ */ React__default.createElement("div", { className: "shrink-0 w-full flex flex-col justify-end items-start" }, /* @__PURE__ */ React__default.createElement("div", { className: "flex w-full gap-3" }, selectMediaItem && /* @__PURE__ */ React__default.createElement(
10188
- Button,
10360
+ Button$1,
10189
10361
  {
10190
10362
  size: "medium",
10191
10363
  variant: "primary",
@@ -10195,7 +10367,7 @@ const ActiveItemPreview = ({
10195
10367
  "Insert",
10196
10368
  /* @__PURE__ */ React__default.createElement(BiArrowToBottom, { className: "ml-1 -mr-0.5 w-6 h-auto text-white opacity-70" })
10197
10369
  ), allowDelete && /* @__PURE__ */ React__default.createElement(
10198
- Button,
10370
+ Button$1,
10199
10371
  {
10200
10372
  variant: "white",
10201
10373
  size: "medium",
@@ -10209,7 +10381,7 @@ const ActiveItemPreview = ({
10209
10381
  };
10210
10382
  const UploadButton = ({ onClick, uploading }) => {
10211
10383
  return /* @__PURE__ */ React__default.createElement(
10212
- Button,
10384
+ Button$1,
10213
10385
  {
10214
10386
  variant: "primary",
10215
10387
  size: "custom",
@@ -10431,7 +10603,7 @@ function UpdatePassword(props) {
10431
10603
  required: true
10432
10604
  }
10433
10605
  )), result && /* @__PURE__ */ React__default.createElement("div", { className: "text-center text-sm text-gray-500" }, result), err && /* @__PURE__ */ React__default.createElement("div", { className: "text-center text-sm text-red-500" }, err), /* @__PURE__ */ React__default.createElement(
10434
- Button,
10606
+ Button$1,
10435
10607
  {
10436
10608
  onClick: updatePassword,
10437
10609
  disabled: err,
@@ -10783,7 +10955,7 @@ function Alerts2({ alerts }) {
10783
10955
  " ",
10784
10956
  "Error"
10785
10957
  ), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("div", { className: "tina-prose" }, /* @__PURE__ */ React__default.createElement(AlertMessage, null))), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement("div", { className: "flex-1" }), /* @__PURE__ */ React__default.createElement(
10786
- Button,
10958
+ Button$1,
10787
10959
  {
10788
10960
  style: { flexGrow: 1 },
10789
10961
  onClick: () => {
@@ -11082,7 +11254,7 @@ const BranchBanner = () => {
11082
11254
  className: `w-full bg-white flex items-center gap-2 -mb-px border-b border-gray-100 py-3 pr-4 pl-20 xl:pl-4`
11083
11255
  },
11084
11256
  /* @__PURE__ */ React.createElement(
11085
- Button,
11257
+ Button$1,
11086
11258
  {
11087
11259
  variant: isProtected ? "primary" : "white",
11088
11260
  size: "small",
@@ -11104,7 +11276,7 @@ const BranchBanner = () => {
11104
11276
  )
11105
11277
  ),
11106
11278
  previewUrl && /* @__PURE__ */ React.createElement(
11107
- Button,
11279
+ Button$1,
11108
11280
  {
11109
11281
  variant: "white",
11110
11282
  size: "small",
@@ -11320,7 +11492,7 @@ const FormBuilder = ({
11320
11492
  },
11321
11493
  tinaForm.buttons.reset
11322
11494
  ), /* @__PURE__ */ React.createElement(
11323
- Button,
11495
+ Button$1,
11324
11496
  {
11325
11497
  onClick: safeHandleSubmit,
11326
11498
  disabled: !canSubmit,
@@ -11447,8 +11619,8 @@ const CreateBranchModel = ({
11447
11619
  setNewBranchName(formatBranchName(e.target.value));
11448
11620
  }
11449
11621
  }
11450
- ), error && /* @__PURE__ */ React.createElement("div", { className: "mt-2 text-sm text-red-700" }, error)), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button, { style: { flexGrow: 1 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
11451
- Button,
11622
+ ), error && /* @__PURE__ */ React.createElement("div", { className: "mt-2 text-sm text-red-700" }, error)), /* @__PURE__ */ React.createElement(ModalActions, null, /* @__PURE__ */ React.createElement(Button$1, { style: { flexGrow: 1 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React.createElement(
11623
+ Button$1,
11452
11624
  {
11453
11625
  variant: "primary",
11454
11626
  style: { flexGrow: 2 },
@@ -12424,7 +12596,7 @@ const LinkForm = (props) => {
12424
12596
  props.onClose();
12425
12597
  }, [editor, formValues]);
12426
12598
  const UpdateLink = React__default.useCallback(
12427
- () => /* @__PURE__ */ React__default.createElement(Button, { variant: "primary", onClick: handleUpdate }, "Update Link"),
12599
+ () => /* @__PURE__ */ React__default.createElement(Button$1, { variant: "primary", onClick: handleUpdate }, "Update Link"),
12428
12600
  [handleUpdate]
12429
12601
  );
12430
12602
  return /* @__PURE__ */ React__default.createElement(
@@ -27524,7 +27696,7 @@ const AsyncButton = ({ name, primary, action }) => {
27524
27696
  }
27525
27697
  }, [action, setSubmitting, mounted]);
27526
27698
  return /* @__PURE__ */ React__default.createElement(
27527
- Button,
27699
+ Button$1,
27528
27700
  {
27529
27701
  "data-test": name.replace(/\s/g, "-").toLowerCase(),
27530
27702
  variant: primary ? "primary" : "secondary",
@@ -28898,7 +29070,7 @@ const Sidebar = ({ cms }) => {
28898
29070
  )
28899
29071
  },
28900
29072
  /* @__PURE__ */ React__default.createElement("div", { className: "absolute top-8 right-0 transform translate-x-full overflow-hidden" }, /* @__PURE__ */ React__default.createElement(
28901
- Button,
29073
+ Button$1,
28902
29074
  {
28903
29075
  rounded: "right",
28904
29076
  variant: "secondary",
@@ -28932,7 +29104,7 @@ const Sidebar = ({ cms }) => {
28932
29104
  }
28933
29105
  )
28934
29106
  )), !renderDesktopNav && /* @__PURE__ */ React__default.createElement(
28935
- Button,
29107
+ Button$1,
28936
29108
  {
28937
29109
  rounded: "right",
28938
29110
  variant: "secondary",
@@ -29129,7 +29301,7 @@ const FullscreenError = ({
29129
29301
  title = "Error",
29130
29302
  errorMessage = "It looks like something went wrong."
29131
29303
  }) => {
29132
- return /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col justify-center items-center h-screen bg-gray-100" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-red-500 text-4xl mb-6 flex items-center" }, /* @__PURE__ */ React__default.createElement(BiError, { className: "w-12 h-auto fill-current text-red-400 opacity-70 mr-1" }), " ", title), /* @__PURE__ */ React__default.createElement("p", { className: "text-gray-700 text-xl mb-8" }, errorMessage), /* @__PURE__ */ React__default.createElement(Button, { variant: "danger", onClick: () => window.location.reload() }, /* @__PURE__ */ React__default.createElement(BiSync, { className: "w-7 h-auto fill-current opacity-70 mr-1" }), " Reload"));
29304
+ return /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col justify-center items-center h-screen bg-gray-100" }, /* @__PURE__ */ React__default.createElement("div", { className: "text-red-500 text-4xl mb-6 flex items-center" }, /* @__PURE__ */ React__default.createElement(BiError, { className: "w-12 h-auto fill-current text-red-400 opacity-70 mr-1" }), " ", title), /* @__PURE__ */ React__default.createElement("p", { className: "text-gray-700 text-xl mb-8" }, errorMessage), /* @__PURE__ */ React__default.createElement(Button$1, { variant: "danger", onClick: () => window.location.reload() }, /* @__PURE__ */ React__default.createElement(BiSync, { className: "w-7 h-auto fill-current opacity-70 mr-1" }), " Reload"));
29133
29305
  };
29134
29306
  const useGetCollection = (cms, collectionName, includeDocuments = true, folder, after = "", sortKey, filterArgs) => {
29135
29307
  const api = new TinaAdminApi(cms);
@@ -29994,7 +30166,7 @@ const SearchInput = ({
29994
30166
  }
29995
30167
  }
29996
30168
  )), /* @__PURE__ */ React__default.createElement("div", { className: "flex w-full md:w-auto gap-3" }, /* @__PURE__ */ React__default.createElement(
29997
- Button,
30169
+ Button$1,
29998
30170
  {
29999
30171
  onClick: () => {
30000
30172
  setSearch(searchInput);
@@ -30006,7 +30178,7 @@ const SearchInput = ({
30006
30178
  "Search ",
30007
30179
  /* @__PURE__ */ React__default.createElement(BiSearch, { className: "w-5 h-full ml-1.5 opacity-70" })
30008
30180
  ), search && searchLoaded && /* @__PURE__ */ React__default.createElement(
30009
- Button,
30181
+ Button$1,
30010
30182
  {
30011
30183
  onClick: () => {
30012
30184
  setSearch("");
@@ -30076,8 +30248,8 @@ const NoDocumentsPlaceholder = () => {
30076
30248
  return /* @__PURE__ */ React__default.createElement("div", { className: "text-center px-5 py-3 flex flex-col items-center justify-center shadow border border-gray-100 bg-gray-50 border-b border-gray-200 w-full max-w-full rounded-lg" }, /* @__PURE__ */ React__default.createElement("p", { className: "text-base italic font-medium text-gray-300" }, "No documents found."));
30077
30249
  };
30078
30250
  const DeleteModal = ({ close: close2, deleteFunc, filename }) => {
30079
- return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("p", null, `Are you sure you want to delete ${filename}?`)), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
30080
- Button,
30251
+ return /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, { close: close2 }, "Delete ", filename), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("p", null, `Are you sure you want to delete ${filename}?`)), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
30252
+ Button$1,
30081
30253
  {
30082
30254
  style: { flexGrow: 3 },
30083
30255
  variant: "danger",
@@ -30102,8 +30274,8 @@ const FolderModal = ({
30102
30274
  value: folderName,
30103
30275
  onChange: (event) => setFolderName(event.target.value)
30104
30276
  }
30105
- ))), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
30106
- Button,
30277
+ ))), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
30278
+ Button$1,
30107
30279
  {
30108
30280
  style: { flexGrow: 3 },
30109
30281
  variant: "primary",
@@ -30129,8 +30301,8 @@ const RenameModal = ({
30129
30301
  value: newRelativePath,
30130
30302
  onChange: (event) => setNewRelativePath(event.target.value)
30131
30303
  }
30132
- ))), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
30133
- Button,
30304
+ ))), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement(Button$1, { style: { flexGrow: 2 }, onClick: close2 }, "Cancel"), /* @__PURE__ */ React__default.createElement(
30305
+ Button$1,
30134
30306
  {
30135
30307
  style: { flexGrow: 3 },
30136
30308
  variant: "primary",
@@ -30928,7 +31100,7 @@ const CheckSchema = ({
30928
31100
  }
30929
31101
  }, [cms, JSON.stringify(schemaJson || {}), url]);
30930
31102
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, schemaMissingError ? /* @__PURE__ */ React__default.createElement(Modal, null, /* @__PURE__ */ React__default.createElement(PopupModal, null, /* @__PURE__ */ React__default.createElement(ModalHeader, null, "Branch Not Found"), /* @__PURE__ */ React__default.createElement(ModalBody, { padded: true }, /* @__PURE__ */ React__default.createElement("div", { className: "tina-prose" }, "The current branch (", /* @__PURE__ */ React__default.createElement("span", { className: "font-bold" }, currentBranch), ") has either been merged or deleted.")), /* @__PURE__ */ React__default.createElement(ModalActions, null, /* @__PURE__ */ React__default.createElement("div", { className: "flex-1" }), /* @__PURE__ */ React__default.createElement(
30931
- Button,
31103
+ Button$1,
30932
31104
  {
30933
31105
  style: { flexGrow: 1 },
30934
31106
  className: "w-full",
@@ -31232,7 +31404,7 @@ export {
31232
31404
  BranchDataProvider,
31233
31405
  BranchSwitcher,
31234
31406
  BranchSwitcherPlugin,
31235
- Button,
31407
+ Button$1 as Button,
31236
31408
  ButtonToggle,
31237
31409
  ButtonToggleField,
31238
31410
  ButtonToggleFieldPlugin,