@overmap-ai/blocks 1.0.40-alpha.4 → 1.0.40-icon-fix.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/LuIcon/LuIcon.d.ts +4 -6
- package/dist/LuIcon/index.d.ts +1 -1
- package/dist/LuIcon/typings.d.ts +2 -2
- package/dist/Overlay/Close.d.ts +5 -0
- package/dist/Overlay/Content.d.ts +6 -0
- package/dist/Overlay/Description.d.ts +5 -0
- package/dist/Overlay/Root.d.ts +5 -0
- package/dist/Overlay/Title.d.ts +5 -0
- package/dist/Overlay/Trigger.d.ts +5 -0
- package/dist/Overlay/cva.d.ts +1 -0
- package/dist/Overlay/index.d.ts +15 -0
- package/dist/Rating/Item.d.ts +6 -0
- package/dist/Rating/ItemIndicator.d.ts +5 -0
- package/dist/Rating/Root.d.ts +8 -0
- package/dist/Rating/context.d.ts +9 -0
- package/dist/Rating/index.d.ts +9 -0
- package/dist/blocks.js +138 -10
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +139 -11
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/blocks.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@radix-ui/react-alert-dialog"), require("react/jsx-runtime"), require("class-variance-authority"), require("react"), require("@radix-ui/react-avatar"), require("@radix-ui/react-checkbox"), require("react-responsive"), require("cmdk"), require("@radix-ui/react-dialog"), require("react-day-picker"), require("lucide-react
|
|
3
|
-
})(this, function(exports2, RadixAlertDialog, jsxRuntime, classVarianceAuthority, react, RadixAvatar, RadixCheckbox, reactResponsive, cmdk, RadixDialog, reactDayPicker,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@radix-ui/react-alert-dialog"), require("react/jsx-runtime"), require("class-variance-authority"), require("react"), require("@radix-ui/react-avatar"), require("@radix-ui/react-checkbox"), require("react-responsive"), require("cmdk"), require("@radix-ui/react-dialog"), require("react-day-picker"), require("lucide-react"), require("@radix-ui/react-hover-card"), require("react-transition-group"), require("react-dom"), require("@radix-ui/react-slot"), require("@floating-ui/react"), require("@radix-ui/react-separator"), require("@radix-ui/react-one-time-password-field"), require("react-error-boundary"), require("@radix-ui/react-popover"), require("@radix-ui/react-progress"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-toggle-group"), require("@radix-ui/react-tabs"), require("@radix-ui/react-slider"), require("@radix-ui/react-switch"), require("@radix-ui/react-toast"), require("@radix-ui/react-toggle"), require("@radix-ui/react-tooltip")) : typeof define === "function" && define.amd ? define(["exports", "@radix-ui/react-alert-dialog", "react/jsx-runtime", "class-variance-authority", "react", "@radix-ui/react-avatar", "@radix-ui/react-checkbox", "react-responsive", "cmdk", "@radix-ui/react-dialog", "react-day-picker", "lucide-react", "@radix-ui/react-hover-card", "react-transition-group", "react-dom", "@radix-ui/react-slot", "@floating-ui/react", "@radix-ui/react-separator", "@radix-ui/react-one-time-password-field", "react-error-boundary", "@radix-ui/react-popover", "@radix-ui/react-progress", "@radix-ui/react-radio-group", "@radix-ui/react-toggle-group", "@radix-ui/react-tabs", "@radix-ui/react-slider", "@radix-ui/react-switch", "@radix-ui/react-toast", "@radix-ui/react-toggle", "@radix-ui/react-tooltip"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.blocks = {}, global.RadixAlertDialog, global.jsxRuntime, global.classVarianceAuthority, global.react, global.RadixAvatar, global.RadixCheckbox, global.reactResponsive, global.cmdk, global.RadixDialog, global.reactDayPicker, global.lucideReact, global.RadixHoverCard, global.reactTransitionGroup, global.ReactDOM, global.reactSlot, global.react$1, global.RadixSeparator, global.RadixOneTimePasswordField, global.reactErrorBoundary, global.RadixPopover, global.RadixProgress, global.RadixRadioGroup, global.RadixToggleGroup, global.RadixTabs, global.RadixSlider, global.RadixSwitch, global.RadixToast, global.Toggle, global.RadixTooltip));
|
|
3
|
+
})(this, function(exports2, RadixAlertDialog, jsxRuntime, classVarianceAuthority, react, RadixAvatar, RadixCheckbox, reactResponsive, cmdk, RadixDialog, reactDayPicker, lucideReact, RadixHoverCard, reactTransitionGroup, ReactDOM, reactSlot, react$1, RadixSeparator, RadixOneTimePasswordField, reactErrorBoundary, RadixPopover, RadixProgress, RadixRadioGroup, RadixToggleGroup, RadixTabs, RadixSlider, RadixSwitch, RadixToast, Toggle, RadixTooltip) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -1655,21 +1655,21 @@
|
|
|
1655
1655
|
PageTriggerItem: CommandMenuPageTriggerItem
|
|
1656
1656
|
};
|
|
1657
1657
|
const LuIcon = react.memo((props) => {
|
|
1658
|
-
const { ref, icon, className, size = "1em", ...rest } = props;
|
|
1659
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1658
|
+
const { ref, icon: Icon, className, size = "1em", ...rest } = props;
|
|
1659
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Icon, { ref, className: classVarianceAuthority.cx("shrink-0", className), size, ...rest });
|
|
1660
1660
|
});
|
|
1661
1661
|
LuIcon.displayName = "LuIcon";
|
|
1662
1662
|
const Chevron = (props) => {
|
|
1663
1663
|
const { orientation, ...rest } = props;
|
|
1664
1664
|
switch (orientation) {
|
|
1665
1665
|
case "up":
|
|
1666
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
1666
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.ChevronUp, ...rest });
|
|
1667
1667
|
case "down":
|
|
1668
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
1668
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.ChevronDown, ...rest });
|
|
1669
1669
|
case "left":
|
|
1670
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
1670
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.ChevronLeft, ...rest });
|
|
1671
1671
|
default:
|
|
1672
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
1672
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.ChevronRight, ...rest });
|
|
1673
1673
|
}
|
|
1674
1674
|
};
|
|
1675
1675
|
const rootCva = classVarianceAuthority.cva(["relative", "size-max"], {
|
|
@@ -4091,8 +4091,10 @@
|
|
|
4091
4091
|
[getActiveItem, getFirstGroup, getFirstItem, getLastGroup, getLastItem, getNextGroup, getNextItem, onKeyDown]
|
|
4092
4092
|
);
|
|
4093
4093
|
react.useEffect(() => {
|
|
4094
|
+
var _a;
|
|
4094
4095
|
const firstItem = getFirstItem(internalRef.current);
|
|
4095
4096
|
if (!firstItem) return;
|
|
4097
|
+
(_a = internalRef.current) == null ? void 0 : _a.focus();
|
|
4096
4098
|
setActiveItemId(firstItem.getAttribute(ITEM_SELECTOR));
|
|
4097
4099
|
}, [getFirstItem]);
|
|
4098
4100
|
const contextValue = react.useMemo(
|
|
@@ -4287,6 +4289,62 @@
|
|
|
4287
4289
|
Input: OneTimePasswordFieldInput,
|
|
4288
4290
|
Root: OneTimePasswordFieldRoot
|
|
4289
4291
|
};
|
|
4292
|
+
const OverlayClose = react.memo((props) => {
|
|
4293
|
+
const { ref, ...rest } = props;
|
|
4294
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Close, { ref, ...rest });
|
|
4295
|
+
});
|
|
4296
|
+
OverlayClose.displayName = "OverlayClose";
|
|
4297
|
+
const overlayContentCva = classVarianceAuthority.cva([
|
|
4298
|
+
"fixed",
|
|
4299
|
+
"inset-0",
|
|
4300
|
+
"bg-(--color-background)",
|
|
4301
|
+
"data-[state='closed']:animate-out",
|
|
4302
|
+
"data-[state='closed']:fade-out-0",
|
|
4303
|
+
"data-[state='closed']:zoom-out-95",
|
|
4304
|
+
"data-[state='open']:animate-in",
|
|
4305
|
+
"data-[state='open']:fade-in-0",
|
|
4306
|
+
"data-[state='open']:zoom-in-95"
|
|
4307
|
+
]);
|
|
4308
|
+
const OverlayContent = react.memo((props) => {
|
|
4309
|
+
const { ref, container, className, ...rest } = props;
|
|
4310
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4311
|
+
RadixDialog__namespace.Content,
|
|
4312
|
+
{
|
|
4313
|
+
className: classVarianceAuthority.cx(overlayContentCva(), className),
|
|
4314
|
+
ref,
|
|
4315
|
+
"data-floating-content": "",
|
|
4316
|
+
...rest
|
|
4317
|
+
}
|
|
4318
|
+
) });
|
|
4319
|
+
});
|
|
4320
|
+
OverlayContent.displayName = "OverlayContent";
|
|
4321
|
+
const OverlayDescription = react.memo((props) => {
|
|
4322
|
+
const { ref, ...rest } = props;
|
|
4323
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Description, { ref, ...rest });
|
|
4324
|
+
});
|
|
4325
|
+
OverlayDescription.displayName = "OverlayDescription";
|
|
4326
|
+
const OverlayRoot = react.memo((props) => {
|
|
4327
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Root, { ...props });
|
|
4328
|
+
});
|
|
4329
|
+
OverlayRoot.displayName = "OverlayRoot";
|
|
4330
|
+
const OverlayTitle = react.memo((props) => {
|
|
4331
|
+
const { ref, ...rest } = props;
|
|
4332
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Title, { ref, ...rest });
|
|
4333
|
+
});
|
|
4334
|
+
OverlayTitle.displayName = "OverlayTitle";
|
|
4335
|
+
const OverlayTrigger = react.memo((props) => {
|
|
4336
|
+
const { ref, ...rest } = props;
|
|
4337
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Trigger, { ref, ...rest });
|
|
4338
|
+
});
|
|
4339
|
+
OverlayTrigger.displayName = "OverlayTrigger";
|
|
4340
|
+
const Overlay = {
|
|
4341
|
+
Root: OverlayRoot,
|
|
4342
|
+
Content: OverlayContent,
|
|
4343
|
+
Title: OverlayTitle,
|
|
4344
|
+
Description: OverlayDescription,
|
|
4345
|
+
Trigger: OverlayTrigger,
|
|
4346
|
+
Close: OverlayClose
|
|
4347
|
+
};
|
|
4290
4348
|
const centerStyles = { placeSelf: "center" };
|
|
4291
4349
|
const ErrorFallback = react.memo((props) => {
|
|
4292
4350
|
const { absoluteCentering, message = "Something went wrong", onRetry } = props;
|
|
@@ -4299,9 +4357,9 @@
|
|
|
4299
4357
|
}, [onRetry, resetBoundary]);
|
|
4300
4358
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full gap-2", style: outerFlexStyles, children: [
|
|
4301
4359
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexGrow: 1 } }),
|
|
4302
|
-
/* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
4360
|
+
/* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.AlertTriangle, size: height, style: centerStyles }),
|
|
4303
4361
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { lineHeight: height, ...centerStyles }, children: message }),
|
|
4304
|
-
/* @__PURE__ */ jsxRuntime.jsx(IconButton, { "aria-label": "Try again", variant: "soft", onClick: handleRetry, style: centerStyles, children: /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
4362
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconButton, { "aria-label": "Try again", variant: "soft", onClick: handleRetry, style: centerStyles, children: /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.RotateCcw, size: height }) }),
|
|
4305
4363
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexGrow: 1 } })
|
|
4306
4364
|
] });
|
|
4307
4365
|
});
|
|
@@ -4650,6 +4708,65 @@
|
|
|
4650
4708
|
Item: RadioGroupItem,
|
|
4651
4709
|
Root: RadioGroupRoot
|
|
4652
4710
|
};
|
|
4711
|
+
const RatingRootContext = react.createContext({});
|
|
4712
|
+
const RatingItemContext = react.createContext({});
|
|
4713
|
+
const RatingItem = react.memo((props) => {
|
|
4714
|
+
const { ref, children, value, ...rest } = props;
|
|
4715
|
+
const { value: activeValue } = react.use(RatingRootContext);
|
|
4716
|
+
const active = !!activeValue && value <= activeValue;
|
|
4717
|
+
const contextValue = react.useMemo(() => ({ value }), [value]);
|
|
4718
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixRadioGroup__namespace.Item, { ref, value: value.toString(), "data-active": active, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(RatingItemContext, { value: contextValue, children }) });
|
|
4719
|
+
});
|
|
4720
|
+
RatingItem.displayName = "RatingItem";
|
|
4721
|
+
const RatingItemIndicator = react.memo((props) => {
|
|
4722
|
+
const { ref, children, forceMount, ...rest } = props;
|
|
4723
|
+
const { value: activeValue } = react.use(RatingRootContext);
|
|
4724
|
+
const { value } = react.use(RatingItemContext);
|
|
4725
|
+
const active = !!activeValue && value <= activeValue;
|
|
4726
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4727
|
+
RadixRadioGroup__namespace.Indicator,
|
|
4728
|
+
{
|
|
4729
|
+
ref,
|
|
4730
|
+
forceMount: forceMount ?? (active || void 0),
|
|
4731
|
+
"data-active": active,
|
|
4732
|
+
...rest,
|
|
4733
|
+
children
|
|
4734
|
+
}
|
|
4735
|
+
);
|
|
4736
|
+
});
|
|
4737
|
+
RatingItemIndicator.displayName = "RatingItemIndicator";
|
|
4738
|
+
const RatingRoot = react.memo((props) => {
|
|
4739
|
+
const { ref, children, defaultValue, value: controlledValue, onValueChange, ...rest } = props;
|
|
4740
|
+
const [value, setValue] = useControlledState(defaultValue ?? null, controlledValue, onValueChange);
|
|
4741
|
+
const handleValueChange = react.useCallback(
|
|
4742
|
+
(value2) => {
|
|
4743
|
+
setValue(parseInt(value2));
|
|
4744
|
+
},
|
|
4745
|
+
[setValue]
|
|
4746
|
+
);
|
|
4747
|
+
const contextValue = react.useMemo(
|
|
4748
|
+
() => ({
|
|
4749
|
+
value
|
|
4750
|
+
}),
|
|
4751
|
+
[value]
|
|
4752
|
+
);
|
|
4753
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4754
|
+
RadixRadioGroup__namespace.Root,
|
|
4755
|
+
{
|
|
4756
|
+
ref,
|
|
4757
|
+
value: value ? value.toString() : null,
|
|
4758
|
+
onValueChange: handleValueChange,
|
|
4759
|
+
...rest,
|
|
4760
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RatingRootContext, { value: contextValue, children })
|
|
4761
|
+
}
|
|
4762
|
+
);
|
|
4763
|
+
});
|
|
4764
|
+
RatingRoot.displayName = "RatingRoot";
|
|
4765
|
+
const Rating = {
|
|
4766
|
+
Item: RatingItem,
|
|
4767
|
+
ItemIndicator: RatingItemIndicator,
|
|
4768
|
+
Root: RatingRoot
|
|
4769
|
+
};
|
|
4653
4770
|
const segmentedControlRootCva = classVarianceAuthority.cva(
|
|
4654
4771
|
["shrink-0", "transition-colors", "inline-flex", "box-border", "min-w-max", "text-center"],
|
|
4655
4772
|
{
|
|
@@ -5918,7 +6035,7 @@
|
|
|
5918
6035
|
action && /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Action, { className: "w-max", altText: action.altText, asChild: true, children: action.content })
|
|
5919
6036
|
] })
|
|
5920
6037
|
] }),
|
|
5921
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { size, "aria-label": "Close", variant: "ghost", accentColor, children: /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon:
|
|
6038
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { size, "aria-label": "Close", variant: "ghost", accentColor, children: /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.X }) }) })
|
|
5922
6039
|
]
|
|
5923
6040
|
}
|
|
5924
6041
|
);
|
|
@@ -6522,6 +6639,13 @@
|
|
|
6522
6639
|
exports2.OneTimePasswordFieldHiddenInput = OneTimePasswordFieldHiddenInput;
|
|
6523
6640
|
exports2.OneTimePasswordFieldInput = OneTimePasswordFieldInput;
|
|
6524
6641
|
exports2.OneTimePasswordFieldRoot = OneTimePasswordFieldRoot;
|
|
6642
|
+
exports2.Overlay = Overlay;
|
|
6643
|
+
exports2.OverlayClose = OverlayClose;
|
|
6644
|
+
exports2.OverlayContent = OverlayContent;
|
|
6645
|
+
exports2.OverlayDescription = OverlayDescription;
|
|
6646
|
+
exports2.OverlayRoot = OverlayRoot;
|
|
6647
|
+
exports2.OverlayTitle = OverlayTitle;
|
|
6648
|
+
exports2.OverlayTrigger = OverlayTrigger;
|
|
6525
6649
|
exports2.OvermapErrorBoundary = OvermapErrorBoundary;
|
|
6526
6650
|
exports2.Popover = Popover;
|
|
6527
6651
|
exports2.PopoverArrow = PopoverArrow;
|
|
@@ -6535,6 +6659,10 @@
|
|
|
6535
6659
|
exports2.RadioGroupIndicator = RadioGroupIndicator;
|
|
6536
6660
|
exports2.RadioGroupItem = RadioGroupItem;
|
|
6537
6661
|
exports2.RadioGroupRoot = RadioGroupRoot;
|
|
6662
|
+
exports2.Rating = Rating;
|
|
6663
|
+
exports2.RatingItem = RatingItem;
|
|
6664
|
+
exports2.RatingItemIndicator = RatingItemIndicator;
|
|
6665
|
+
exports2.RatingRoot = RatingRoot;
|
|
6538
6666
|
exports2.SegmentedControl = SegmentedControl;
|
|
6539
6667
|
exports2.SegmentedControlItem = SegmentedControlItem;
|
|
6540
6668
|
exports2.SegmentedControlRoot = SegmentedControlRoot;
|