@firecms/ui 3.0.0-canary.133 → 3.0.0-canary.134

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.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("@radix-ui/react-collapsible"), require("clsx"), require("tailwind-merge"), require("date-fns/locale"), require("react-datepicker"), require("@radix-ui/react-checkbox"), require("material-icons/iconfont/filled.css"), require("@radix-ui/react-dialog"), require("react-dropzone"), require("@radix-ui/react-label"), require("react-fast-compare"), require("markdown-it"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-menubar"), require("@radix-ui/react-popover"), require("cmdk"), require("@radix-ui/react-separator"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-select"), require("react-dom"), require("@radix-ui/react-tooltip"), require("@radix-ui/react-tabs")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "@radix-ui/react-collapsible", "clsx", "tailwind-merge", "date-fns/locale", "react-datepicker", "@radix-ui/react-checkbox", "material-icons/iconfont/filled.css", "@radix-ui/react-dialog", "react-dropzone", "@radix-ui/react-label", "react-fast-compare", "markdown-it", "@radix-ui/react-dropdown-menu", "@radix-ui/react-menubar", "@radix-ui/react-popover", "cmdk", "@radix-ui/react-separator", "@radix-ui/react-radio-group", "@radix-ui/react-select", "react-dom", "@radix-ui/react-tooltip", "@radix-ui/react-tabs"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS UI"] = {}, global.jsxRuntime, global.React, global.Collapsible, global.clsx, global.tailwindMerge, global.locales, global.RDP, global.CheckboxPrimitive, null, global.DialogPrimitive, global.reactDropzone, global.LabelPrimitive, global.equal, global.MarkdownIt, global.DropdownMenu, global.MenubarPrimitive, global.PopoverPrimitive, global.cmdk, global.SeparatorPrimitive, global.RadioGroupPrimitive, global.SelectPrimitive, global.ReactDOM, global.TooltipPrimitive, global.TabsPrimitive));
3
- })(this, function(exports2, jsxRuntime, React, Collapsible, clsx, tailwindMerge, locales, RDP, CheckboxPrimitive, filled_css, DialogPrimitive, reactDropzone, LabelPrimitive, equal, MarkdownIt, DropdownMenu, MenubarPrimitive, PopoverPrimitive, cmdk, SeparatorPrimitive, RadioGroupPrimitive, SelectPrimitive, ReactDOM, TooltipPrimitive, TabsPrimitive) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("@radix-ui/react-collapsible"), require("clsx"), require("tailwind-merge"), require("date-fns/locale"), require("react-datepicker"), require("@radix-ui/react-checkbox"), require("material-icons/iconfont/filled.css"), require("@radix-ui/react-dialog"), require("@radix-ui/react-visually-hidden"), require("react-dropzone"), require("@radix-ui/react-label"), require("react-fast-compare"), require("markdown-it"), require("@radix-ui/react-dropdown-menu"), require("@radix-ui/react-menubar"), require("@radix-ui/react-popover"), require("cmdk"), require("@radix-ui/react-separator"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-select"), require("@radix-ui/react-slider"), require("@radix-ui/react-tooltip"), require("react-dom"), require("@radix-ui/react-tabs")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "@radix-ui/react-collapsible", "clsx", "tailwind-merge", "date-fns/locale", "react-datepicker", "@radix-ui/react-checkbox", "material-icons/iconfont/filled.css", "@radix-ui/react-dialog", "@radix-ui/react-visually-hidden", "react-dropzone", "@radix-ui/react-label", "react-fast-compare", "markdown-it", "@radix-ui/react-dropdown-menu", "@radix-ui/react-menubar", "@radix-ui/react-popover", "cmdk", "@radix-ui/react-separator", "@radix-ui/react-radio-group", "@radix-ui/react-select", "@radix-ui/react-slider", "@radix-ui/react-tooltip", "react-dom", "@radix-ui/react-tabs"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["FireCMS UI"] = {}, global.jsxRuntime, global.React, global.Collapsible, global.clsx, global.tailwindMerge, global.locales, global.RDP, global.CheckboxPrimitive, null, global.DialogPrimitive, global.VisuallyHidden, global.reactDropzone, global.LabelPrimitive, global.equal, global.MarkdownIt, global.DropdownMenu, global.MenubarPrimitive, global.PopoverPrimitive, global.cmdk, global.SeparatorPrimitive, global.RadioGroupPrimitive, global.SelectPrimitive, global.SliderPrimitive, global.TooltipPrimitive, global.ReactDOM, global.TabsPrimitive));
3
+ })(this, function(exports2, jsxRuntime, React, Collapsible, clsx, tailwindMerge, locales, RDP, CheckboxPrimitive, filled_css, DialogPrimitive, VisuallyHidden, reactDropzone, LabelPrimitive, equal, MarkdownIt, DropdownMenu, MenubarPrimitive, PopoverPrimitive, cmdk, SeparatorPrimitive, RadioGroupPrimitive, SelectPrimitive, SliderPrimitive, TooltipPrimitive, ReactDOM, TabsPrimitive) {
4
4
  "use strict";
5
5
  function _interopNamespaceDefault(e) {
6
6
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -24,6 +24,7 @@
24
24
  const RDP__namespace = /* @__PURE__ */ _interopNamespaceDefault(RDP);
25
25
  const CheckboxPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CheckboxPrimitive);
26
26
  const DialogPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DialogPrimitive);
27
+ const VisuallyHidden__namespace = /* @__PURE__ */ _interopNamespaceDefault(VisuallyHidden);
27
28
  const LabelPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(LabelPrimitive);
28
29
  const DropdownMenu__namespace = /* @__PURE__ */ _interopNamespaceDefault(DropdownMenu);
29
30
  const MenubarPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(MenubarPrimitive);
@@ -31,8 +32,9 @@
31
32
  const SeparatorPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SeparatorPrimitive);
32
33
  const RadioGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadioGroupPrimitive);
33
34
  const SelectPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SelectPrimitive);
34
- const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
35
+ const SliderPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SliderPrimitive);
35
36
  const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
37
+ const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
36
38
  const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
37
39
  const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
38
40
  const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-slate-100 focus:dark:bg-gray-800 focus:dark:bg-opacity-60";
@@ -41,9 +43,9 @@
41
43
  const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-slate-100 dark:bg-gray-800 dark:bg-opacity-0";
42
44
  const fieldBackgroundDisabledMixin = "dark:bg-gray-800 bg-opacity-50 dark:bg-opacity-90";
43
45
  const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-gray-700 dark:hover:bg-opacity-40";
44
- const defaultBorderMixin = "border-gray-100 dark:border-gray-800 dark:border-opacity-80";
45
- const paperMixin = "bg-white rounded-md dark:bg-gray-950 border dark:border-gray-800 dark:border-opacity-80 border-gray-100";
46
- const cardMixin = "bg-white border border-gray-100 dark:border-transparent rounded-md dark:bg-gray-950 dark:border-gray-800 dark:border-opacity-50 m-1 -p-1";
46
+ const defaultBorderMixin = "border-gray-200 border-opacity-40 dark:border-gray-700 dark:border-opacity-50";
47
+ const paperMixin = "bg-white rounded-md dark:bg-gray-950 border border-gray-200 border-opacity-40 dark:border-gray-700 dark:border-opacity-50";
48
+ const cardMixin = "bg-white border border-gray-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-gray-950 dark:border-gray-700 dark:border-opacity-50 m-1 -p-1";
47
49
  const cardClickableMixin = "hover:bg-primary-bg dark:hover:bg-primary-bg hover:bg-opacity-20 dark:hover:bg-opacity-20 hover:ring-2 hover:ring-primary cursor-pointer";
48
50
  const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
49
51
  function cls(...classes) {
@@ -13757,7 +13759,7 @@
13757
13759
  }
13758
13760
  );
13759
13761
  });
13760
- const defaultVariantMapping = {
13762
+ const typographyVariants = {
13761
13763
  h1: "h1",
13762
13764
  h2: "h2",
13763
13765
  h3: "h3",
@@ -13823,12 +13825,12 @@
13823
13825
  noWrap = false,
13824
13826
  paragraph = false,
13825
13827
  variant = "body1",
13826
- variantMapping = defaultVariantMapping,
13828
+ variantMapping = typographyVariants,
13827
13829
  style,
13828
13830
  onClick,
13829
13831
  ...other
13830
13832
  }) {
13831
- const Component = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
13833
+ const Component = component || (paragraph ? "p" : variantMapping[variant] || typographyVariants[variant]) || "span";
13832
13834
  const classes = cls(
13833
13835
  variantToClasses[variant],
13834
13836
  color ? colorToClasses[color] : "",
@@ -14944,6 +14946,27 @@
14944
14946
  }
14945
14947
  );
14946
14948
  }
14949
+ function DialogTitle({
14950
+ children,
14951
+ hidden,
14952
+ className,
14953
+ variant = "h4",
14954
+ ...props
14955
+ }) {
14956
+ const title = /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
14957
+ Typography,
14958
+ {
14959
+ variant,
14960
+ className,
14961
+ ...props,
14962
+ children
14963
+ }
14964
+ ) });
14965
+ if (hidden) {
14966
+ return /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden__namespace.Root, { children: title });
14967
+ }
14968
+ return title;
14969
+ }
14947
14970
  function ExpandablePanel({
14948
14971
  title,
14949
14972
  children,
@@ -15018,7 +15041,7 @@
15018
15041
  Collapsible__namespace.Trigger,
15019
15042
  {
15020
15043
  className: cls(
15021
- "rounded flex items-center justify-between w-full min-h-[52px]",
15044
+ "rounded-t flex items-center justify-between w-full min-h-[52px]",
15022
15045
  "hover:bg-slate-200 hover:bg-opacity-20 dark:hover:bg-gray-800 dark:hover:bg-opacity-20",
15023
15046
  invisible ? "border-b px-2" : "p-4",
15024
15047
  invisible && defaultBorderMixin,
@@ -16198,6 +16221,88 @@
16198
16221
  children
16199
16222
  ] });
16200
16223
  }
16224
+ function SliderThumb(props) {
16225
+ return /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { open: props.hovered, children: [
16226
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
16227
+ SliderPrimitive__namespace.Thumb,
16228
+ {
16229
+ className: cls(
16230
+ {
16231
+ "border-primary bg-primary hover:bg-primary-dark focus-visible:ring-4 focus-visible:ring-primary outline-none focus-visible:ring-opacity-50": !props.props.disabled,
16232
+ "border-slate-300 bg-slate-300 dark:border-gray-700 dark:bg-gray-700": props.props.disabled
16233
+ },
16234
+ props.classes,
16235
+ "focus:ring-8 focus:ring-primary focus:ring-opacity-75",
16236
+ "hover:ring-8 hover:ring-primary hover:ring-opacity-75",
16237
+ "block rounded-full transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50"
16238
+ )
16239
+ }
16240
+ ) }),
16241
+ /* @__PURE__ */ jsxRuntime.jsx(
16242
+ TooltipPrimitive__namespace.Content,
16243
+ {
16244
+ side: "top",
16245
+ sideOffset: 5,
16246
+ className: cls(
16247
+ "TooltipContent",
16248
+ "max-w-lg leading-relaxed",
16249
+ "z-50 rounded px-3 py-2 text-xs leading-none bg-slate-700 dark:bg-slate-800 bg-opacity-90 font-medium text-slate-50 shadow-2xl select-none duration-400 ease-in transform opacity-100"
16250
+ ),
16251
+ children: props.props.value?.[props.index]
16252
+ }
16253
+ )
16254
+ ] });
16255
+ }
16256
+ const Slider = React__namespace.forwardRef(({
16257
+ className,
16258
+ size = "regular",
16259
+ ...props
16260
+ }, ref) => {
16261
+ const [hovered, setHovered] = React__namespace.useState(false);
16262
+ const thumbSizeClasses = size === "small" ? "h-4 w-4" : "h-6 w-6";
16263
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(
16264
+ SliderPrimitive__namespace.Root,
16265
+ {
16266
+ ref,
16267
+ onMouseEnter: () => setHovered(true),
16268
+ onMouseLeave: () => setHovered(false),
16269
+ className: cls(
16270
+ "relative flex w-full touch-none select-none items-center",
16271
+ className
16272
+ ),
16273
+ ...props,
16274
+ children: [
16275
+ /* @__PURE__ */ jsxRuntime.jsx(
16276
+ SliderPrimitive__namespace.Track,
16277
+ {
16278
+ style: { height: size === "small" ? 4 : 8 },
16279
+ className: "relative w-full grow overflow-hidden rounded-full bg-slate-300 bg-opacity-40 dark:bg-gray-700 dark:bg-opacity-40",
16280
+ children: /* @__PURE__ */ jsxRuntime.jsx(
16281
+ SliderPrimitive__namespace.Range,
16282
+ {
16283
+ className: cls("absolute h-full", {
16284
+ "bg-primary": !props.disabled,
16285
+ "bg-slate-300 dark:bg-gray-700": props.disabled
16286
+ })
16287
+ }
16288
+ )
16289
+ }
16290
+ ),
16291
+ (props.value ?? [0]).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
16292
+ SliderThumb,
16293
+ {
16294
+ index,
16295
+ props,
16296
+ hovered,
16297
+ classes: thumbSizeClasses
16298
+ },
16299
+ index
16300
+ ))
16301
+ ]
16302
+ }
16303
+ ) });
16304
+ });
16305
+ Slider.displayName = "Slider";
16201
16306
  const Sheet = ({
16202
16307
  children,
16203
16308
  side = "right",
@@ -16233,6 +16338,7 @@
16233
16338
  DialogPrimitive__namespace.Root,
16234
16339
  {
16235
16340
  open: displayed || open,
16341
+ modal,
16236
16342
  onOpenChange,
16237
16343
  children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Portal, { children: [
16238
16344
  /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { autoFocus: true, tabIndex: 0, children: title ?? "Sheet" }),
@@ -17935,6 +18041,7 @@
17935
18041
  exports2.Dialog = Dialog;
17936
18042
  exports2.DialogActions = DialogActions;
17937
18043
  exports2.DialogContent = DialogContent;
18044
+ exports2.DialogTitle = DialogTitle;
17938
18045
  exports2.DialogsIcon = DialogsIcon;
17939
18046
  exports2.DialpadIcon = DialpadIcon;
17940
18047
  exports2.DiamondIcon = DiamondIcon;
@@ -19899,6 +20006,7 @@
19899
20006
  exports2.SleepIcon = SleepIcon;
19900
20007
  exports2.SleepScoreIcon = SleepScoreIcon;
19901
20008
  exports2.SlideLibraryIcon = SlideLibraryIcon;
20009
+ exports2.Slider = Slider;
19902
20010
  exports2.SlidersIcon = SlidersIcon;
19903
20011
  exports2.SlideshowIcon = SlideshowIcon;
19904
20012
  exports2.SlowMotionVideoIcon = SlowMotionVideoIcon;