@sanity/ui 5.0.0-alpha.5 → 5.0.0-alpha.7
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.d.ts +92 -47
- package/dist/index.js +327 -209
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +8 -2
- package/src/components/checkbox/Checkbox.tsx +1 -1
- package/src/components/{modal/Modal.tsx → dialog/Dialog.tsx} +33 -38
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +29 -0
- package/src/components/index.css +2 -1
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +28 -0
- package/src/components/radio/Radio.tsx +1 -1
- package/src/components/switch/Switch.tsx +1 -1
- package/src/components/tooltip/Tooltip.tsx +59 -55
- package/src/components/tooltip/tooltip.css +19 -40
- package/src/components/tooltip/tooltip.props.ts +16 -8
- package/src/components/tooltip-group/TooltipGroup.tsx +2 -5
- package/src/css/classes/generic/placement.css +31 -0
- package/src/css/tokens/semantic.css +4 -0
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.ts +4 -1
- package/src/polyfills.ts +15 -0
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/version.ts +2 -2
- package/src/components/modal/modal.css +0 -49
- package/src/components/modal/modal.props.ts +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { isSupported, apply } from "dialog-closedby-polyfill";
|
|
3
|
+
typeof HTMLButtonElement < "u" && !("interestForElement" in HTMLButtonElement.prototype) && import("interestfor");
|
|
4
|
+
typeof HTMLDialogElement < "u" && !isSupported() && apply();
|
|
5
|
+
//# sourceMappingURL=polyfills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfills.js","sources":["../src/polyfills.ts"],"sourcesContent":["import {\n apply as applyClosedByPolyfill,\n isSupported as isClosedBySupported,\n} from 'dialog-closedby-polyfill'\n\nif (\n typeof HTMLButtonElement !== 'undefined' &&\n !('interestForElement' in HTMLButtonElement.prototype)\n) {\n void import('interestfor')\n}\n\nif (typeof HTMLDialogElement !== 'undefined' && !isClosedBySupported()) {\n applyClosedByPolyfill()\n}\n"],"names":["HTMLButtonElement","prototype","HTMLDialogElement","isClosedBySupported","applyClosedByPolyfill"],"mappings":";;AAME,OAAOA,oBAAsB,OAC7B,EAAE,wBAAwBA,kBAAkBC,cAEvC,OAAO,aAAa;AAGvB,OAAOC,oBAAsB,OAAe,CAACC,YAAAA,KAC/CC,MAAAA;"}
|