@servicetitan/anvil2 1.2.5 → 1.2.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/Alert-2e4d9ed5.js +89 -0
- package/Alert-2e4d9ed5.js.map +1 -0
- package/Alert-94c37437.cjs +2 -0
- package/Alert-94c37437.cjs.map +1 -0
- package/Alert.cjs +1 -1
- package/Alert.css +1 -1
- package/Alert.js +1 -1
- package/{Announcement-d04009ea.js → Announcement-1db4ac33.js} +18 -17
- package/Announcement-1db4ac33.js.map +1 -0
- package/Announcement-2058bd02.cjs +2 -0
- package/Announcement-2058bd02.cjs.map +1 -0
- package/Announcement.cjs +1 -1
- package/Announcement.js +1 -1
- package/Avatar.cjs +1 -1
- package/Avatar.js +1 -1
- package/Badge-b8764640.cjs +2 -0
- package/Badge-b8764640.cjs.map +1 -0
- package/Badge-df96f15a.js +45 -0
- package/Badge-df96f15a.js.map +1 -0
- package/Badge.cjs +1 -1
- package/Badge.js +1 -1
- package/Button-30b35802.cjs +2 -0
- package/Button-30b35802.cjs.map +1 -0
- package/Button-3b93bd5d.js +289 -0
- package/Button-3b93bd5d.js.map +1 -0
- package/Button.cjs +1 -1
- package/Button.css +1 -1
- package/Button.js +27 -27
- package/ButtonCompound.cjs +1 -1
- package/ButtonCompound.js +27 -27
- package/ButtonLink.cjs +1 -1
- package/ButtonLink.js +27 -27
- package/ButtonToggle.cjs +1 -1
- package/ButtonToggle.js +27 -27
- package/{Calendar-073dc10d.js → Calendar-cbfe3c06.js} +390 -368
- package/{Calendar-073dc10d.js.map → Calendar-cbfe3c06.js.map} +1 -1
- package/{Calendar-706f41ff.cjs → Calendar-ec151b3b.cjs} +2 -2
- package/{Calendar-706f41ff.cjs.map → Calendar-ec151b3b.cjs.map} +1 -1
- package/Calendar.cjs +1 -1
- package/Calendar.js +1 -1
- package/{Card-92ebca1f.cjs → Card-20628287.cjs} +2 -2
- package/{Card-92ebca1f.cjs.map → Card-20628287.cjs.map} +1 -1
- package/{Card-33f3ad0a.js → Card-bb358803.js} +6 -6
- package/{Card-33f3ad0a.js.map → Card-bb358803.js.map} +1 -1
- package/Card.cjs +1 -1
- package/Card.js +1 -1
- package/{Checkbox-d503c3b6.js → Checkbox-3de9628c.js} +24 -24
- package/Checkbox-3de9628c.js.map +1 -0
- package/Checkbox-d325d851.cjs +2 -0
- package/Checkbox-d325d851.cjs.map +1 -0
- package/Checkbox.cjs +1 -1
- package/Checkbox.js +1 -1
- package/{Chip-b52e1bd7.cjs → Chip-95370241.cjs} +2 -2
- package/{Chip-b52e1bd7.cjs.map → Chip-95370241.cjs.map} +1 -1
- package/{Chip-a8eb2656.js → Chip-c0f71a26.js} +15 -15
- package/Chip-c0f71a26.js.map +1 -0
- package/Chip.cjs +1 -1
- package/Chip.js +1 -1
- package/Combobox.cjs +1 -1
- package/Combobox.js +27 -27
- package/Details.cjs +1 -1
- package/Details.js +27 -27
- package/Dialog.cjs +1 -1
- package/Dialog.cjs.map +1 -1
- package/Dialog.js +36 -36
- package/Divider-6646eeb8.cjs +2 -0
- package/Divider-6646eeb8.cjs.map +1 -0
- package/Divider-b3bff73a.js +74 -0
- package/Divider-b3bff73a.js.map +1 -0
- package/Divider.cjs +1 -1
- package/Divider.css +1 -1
- package/Divider.js +1 -1
- package/{Drawer-f68286e8.js → Drawer-9775ed75.js} +65 -46
- package/Drawer-9775ed75.js.map +1 -0
- package/Drawer-dff5abf1.cjs +2 -0
- package/Drawer-dff5abf1.cjs.map +1 -0
- package/Drawer.cjs +1 -1
- package/Drawer.js +1 -1
- package/{Flex-4b128a0e.cjs → Flex-971b5295.cjs} +2 -2
- package/{Flex-4b128a0e.cjs.map → Flex-971b5295.cjs.map} +1 -1
- package/{Flex-f6e67921.js → Flex-d338e855.js} +2 -2
- package/{Flex-f6e67921.js.map → Flex-d338e855.js.map} +1 -1
- package/Flex.cjs +1 -1
- package/Flex.js +1 -1
- package/{Grid-8226f7a1.cjs → Grid-37ded954.cjs} +2 -2
- package/{Grid-8226f7a1.cjs.map → Grid-37ded954.cjs.map} +1 -1
- package/{Grid-992de375.js → Grid-5bad450f.js} +4 -4
- package/{Grid-992de375.js.map → Grid-5bad450f.js.map} +1 -1
- package/Grid.cjs +1 -1
- package/Grid.js +1 -1
- package/{Helper-74a1f07f-6cf9865b.cjs → Helper-74a1f07f-30e4fd46.cjs} +2 -2
- package/{Helper-74a1f07f-6cf9865b.cjs.map → Helper-74a1f07f-30e4fd46.cjs.map} +1 -1
- package/{Helper-74a1f07f-067ae3f7.js → Helper-74a1f07f-60547798.js} +3 -3
- package/{Helper-74a1f07f-067ae3f7.js.map → Helper-74a1f07f-60547798.js.map} +1 -1
- package/{Icon-ae9b951b.cjs → Icon-43ce0e6c.cjs} +2 -2
- package/{Icon-ae9b951b.cjs.map → Icon-43ce0e6c.cjs.map} +1 -1
- package/{Icon-fa8f3dc8.js → Icon-b443eea4.js} +8 -8
- package/Icon-b443eea4.js.map +1 -0
- package/Icon.cjs +1 -1
- package/Icon.js +1 -1
- package/Link.cjs +1 -1
- package/Link.js +27 -27
- package/ListView-43bbc290.cjs +2 -0
- package/ListView-43bbc290.cjs.map +1 -0
- package/{ListView-1f75e2de.js → ListView-482c54ad.js} +100 -100
- package/ListView-482c54ad.js.map +1 -0
- package/ListView.cjs +1 -1
- package/ListView.js +1 -1
- package/Listbox-8c610bf2.cjs +2 -0
- package/Listbox-8c610bf2.cjs.map +1 -0
- package/{Listbox-cdf02568.js → Listbox-b110c64d.js} +68 -68
- package/Listbox-b110c64d.js.map +1 -0
- package/Listbox.cjs +1 -1
- package/Listbox.js +1 -1
- package/Menu.cjs +1 -1
- package/Menu.js +1 -1
- package/Overflow.cjs +1 -1
- package/Overflow.js +27 -27
- package/Popover.cjs +1 -1
- package/Popover.cjs.map +1 -1
- package/Popover.d.ts +1 -22
- package/Popover.js +49 -49
- package/Popover.js.map +1 -1
- package/{ProgressBar-5f350a3f.js → ProgressBar-91240dab.js} +94 -92
- package/ProgressBar-91240dab.js.map +1 -0
- package/ProgressBar-b25b2493.cjs +2 -0
- package/ProgressBar-b25b2493.cjs.map +1 -0
- package/ProgressBar.cjs +1 -1
- package/ProgressBar.js +1 -1
- package/{Radio-4189b000.js → Radio-a747c89a.js} +13 -13
- package/Radio-a747c89a.js.map +1 -0
- package/Radio-ed00ea9d.cjs +2 -0
- package/Radio-ed00ea9d.cjs.map +1 -0
- package/Radio.cjs +1 -1
- package/Radio.js +1 -1
- package/{SideNav-e92d850f.js → SideNav-b5ef91d4.js} +118 -118
- package/SideNav-b5ef91d4.js.map +1 -0
- package/{SideNav-6de704fd.cjs → SideNav-dbcdf7cb.cjs} +6 -6
- package/SideNav-dbcdf7cb.cjs.map +1 -0
- package/SideNav.cjs +1 -1
- package/SideNav.js +1 -1
- package/{SrOnly-0c13a721.js → SrOnly-864bd4cb.js} +3 -3
- package/SrOnly-864bd4cb.js.map +1 -0
- package/SrOnly-88e8fca6.cjs +2 -0
- package/SrOnly-88e8fca6.cjs.map +1 -0
- package/SrOnly.cjs +1 -1
- package/SrOnly.js +1 -1
- package/Stepper-7c787b24.js +391 -0
- package/Stepper-7c787b24.js.map +1 -0
- package/Stepper-e08b9998.cjs +2 -0
- package/Stepper-e08b9998.cjs.map +1 -0
- package/Stepper.cjs +1 -1
- package/Stepper.d.ts +2 -2
- package/Stepper.js +4 -4
- package/{Switch-b0a37fc1.js → Switch-39010760.js} +21 -21
- package/{Switch-b0a37fc1.js.map → Switch-39010760.js.map} +1 -1
- package/Switch-c0bea091.cjs +2 -0
- package/{Switch-285b3272.cjs.map → Switch-c0bea091.cjs.map} +1 -1
- package/Switch.cjs +1 -1
- package/Switch.js +1 -1
- package/Tab-0bcbe9c7.cjs +10 -0
- package/Tab-0bcbe9c7.cjs.map +1 -0
- package/Tab-f636d6c5.js +422 -0
- package/Tab-f636d6c5.js.map +1 -0
- package/Tab.cjs +1 -1
- package/Tab.js +1 -1
- package/{Text-4c30916c.js → Text-465104f6.js} +46 -46
- package/Text-465104f6.js.map +1 -0
- package/Text-631c229a.cjs +2 -0
- package/Text-631c229a.cjs.map +1 -0
- package/Text.cjs +1 -1
- package/Text.js +1 -1
- package/TextField.cjs +1 -1
- package/TextField.js +27 -27
- package/Textarea.cjs +1 -1
- package/Textarea.js +27 -27
- package/{Toast-f15e9d36.js → Toast-36679136.js} +82 -66
- package/Toast-36679136.js.map +1 -0
- package/{Toast-834c85cd.cjs → Toast-44e3ff94.cjs} +5 -5
- package/Toast-44e3ff94.cjs.map +1 -0
- package/Toast.cjs +1 -1
- package/Toast.js +1 -1
- package/Tooltip.cjs +1 -1
- package/Tooltip.js +29 -29
- package/anvil2.cjs +1 -1
- package/anvil2.d.ts +3 -23
- package/anvil2.js +27 -27
- package/{index-8ee9499c.js → index-1dc4c6d3.js} +667 -605
- package/{index-8ee9499c.js.map → index-1dc4c6d3.js.map} +1 -1
- package/{index-dfb6272f.cjs → index-25ea279e.cjs} +5 -5
- package/{index-dfb6272f.cjs.map → index-25ea279e.cjs.map} +1 -1
- package/index-afacb017-0ced4668.cjs +2 -0
- package/index-afacb017-0ced4668.cjs.map +1 -0
- package/{index-098ca719-3c14c40c.js → index-afacb017-e81aec1d.js} +71 -68
- package/index-afacb017-e81aec1d.js.map +1 -0
- package/index-f91265d9-04a0345c.cjs +2 -0
- package/index-f91265d9-04a0345c.cjs.map +1 -0
- package/index-f91265d9-3d747651.js +121 -0
- package/index-f91265d9-3d747651.js.map +1 -0
- package/index3.css +1 -1
- package/{motion-9462a11a.js → motion-a0a946d6.js} +1696 -1638
- package/motion-a0a946d6.js.map +1 -0
- package/motion-dae3950e.cjs +2 -0
- package/motion-dae3950e.cjs.map +1 -0
- package/package.json +3 -4
- package/use-reduced-motion-a766a46b.cjs +2 -0
- package/use-reduced-motion-a766a46b.cjs.map +1 -0
- package/{use-reduced-motion-fa02c531.js → use-reduced-motion-b359504d.js} +11 -11
- package/use-reduced-motion-b359504d.js.map +1 -0
- package/useAccessibleColor.cjs +1 -1
- package/useAccessibleColor.js +27 -27
- package/useLinkStyles.cjs +1 -1
- package/useLinkStyles.js +27 -27
- package/useMergeRefs.cjs +1 -1
- package/useMergeRefs.js +27 -27
- package/usePrefersColorScheme.cjs +1 -1
- package/usePrefersColorScheme.js +27 -27
- package/useSwipe.cjs +1 -1
- package/useSwipe.js +27 -27
- package/Alert-6336e146.cjs +0 -2
- package/Alert-6336e146.cjs.map +0 -1
- package/Alert-6faa0b05.js +0 -88
- package/Alert-6faa0b05.js.map +0 -1
- package/Announcement-d04009ea.js.map +0 -1
- package/Announcement-fff87b68.cjs +0 -2
- package/Announcement-fff87b68.cjs.map +0 -1
- package/Badge-0073b5a1.cjs +0 -2
- package/Badge-0073b5a1.cjs.map +0 -1
- package/Badge-f761458c.js +0 -35
- package/Badge-f761458c.js.map +0 -1
- package/Button-268ba8a9.cjs +0 -2
- package/Button-268ba8a9.cjs.map +0 -1
- package/Button-d05507c5.js +0 -289
- package/Button-d05507c5.js.map +0 -1
- package/Checkbox-d503c3b6.js.map +0 -1
- package/Checkbox-edf070c3.cjs +0 -2
- package/Checkbox-edf070c3.cjs.map +0 -1
- package/Chip-a8eb2656.js.map +0 -1
- package/Divider-86c1f4ea.cjs +0 -2
- package/Divider-86c1f4ea.cjs.map +0 -1
- package/Divider-edca965e.js +0 -74
- package/Divider-edca965e.js.map +0 -1
- package/Drawer-6c2a6e0c.cjs +0 -2
- package/Drawer-6c2a6e0c.cjs.map +0 -1
- package/Drawer-f68286e8.js.map +0 -1
- package/Icon-fa8f3dc8.js.map +0 -1
- package/ListView-14d80585.cjs +0 -2
- package/ListView-14d80585.cjs.map +0 -1
- package/ListView-1f75e2de.js.map +0 -1
- package/Listbox-306a8d62.cjs +0 -2
- package/Listbox-306a8d62.cjs.map +0 -1
- package/Listbox-cdf02568.js.map +0 -1
- package/ProgressBar-29d21945.cjs +0 -2
- package/ProgressBar-29d21945.cjs.map +0 -1
- package/ProgressBar-5f350a3f.js.map +0 -1
- package/Radio-4189b000.js.map +0 -1
- package/Radio-abd4d3fd.cjs +0 -2
- package/Radio-abd4d3fd.cjs.map +0 -1
- package/SideNav-6de704fd.cjs.map +0 -1
- package/SideNav-e92d850f.js.map +0 -1
- package/SrOnly-0c13a721.js.map +0 -1
- package/SrOnly-ecf7240b.cjs +0 -2
- package/SrOnly-ecf7240b.cjs.map +0 -1
- package/Stepper-e776cc28.cjs +0 -2
- package/Stepper-e776cc28.cjs.map +0 -1
- package/Stepper-fa554908.js +0 -390
- package/Stepper-fa554908.js.map +0 -1
- package/Switch-285b3272.cjs +0 -2
- package/Tab-1934a4ca.js +0 -448
- package/Tab-1934a4ca.js.map +0 -1
- package/Tab-ad70a0a5.cjs +0 -10
- package/Tab-ad70a0a5.cjs.map +0 -1
- package/Text-4c30916c.js.map +0 -1
- package/Text-ed02cc62.cjs +0 -2
- package/Text-ed02cc62.cjs.map +0 -1
- package/Toast-834c85cd.cjs.map +0 -1
- package/Toast-f15e9d36.js.map +0 -1
- package/index-098ca719-3c14c40c.js.map +0 -1
- package/index-098ca719-8e068129.cjs +0 -2
- package/index-098ca719-8e068129.cjs.map +0 -1
- package/index-da56edbc-372336bd.js +0 -120
- package/index-da56edbc-372336bd.js.map +0 -1
- package/index-da56edbc-53f59f54.cjs +0 -2
- package/index-da56edbc-53f59f54.cjs.map +0 -1
- package/motion-9462a11a.js.map +0 -1
- package/motion-ee26ec15.cjs +0 -2
- package/motion-ee26ec15.cjs.map +0 -1
- package/use-reduced-motion-00575ab2.cjs +0 -2
- package/use-reduced-motion-00575ab2.cjs.map +0 -1
- package/use-reduced-motion-fa02c531.js.map +0 -1
- /package/{index-098ca719.css → index-afacb017.css} +0 -0
- /package/{index-da56edbc.css → index-f91265d9.css} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react"),i=typeof document<"u",c=new Set;function d(e,n,r){e||c.has(n)||(console.warn(n),r&&console.warn(r),c.add(n))}const o={current:null},t={current:!1};function u(){if(t.current=!0,!!i)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),n=()=>o.current=e.matches;e.addListener(n),n()}else o.current=!1}function a(){!t.current&&u();const[e]=s.useState(o.current);return process.env.NODE_ENV!=="production"&&d(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),e}exports.hasReducedMotionListener=t;exports.initPrefersReducedMotion=u;exports.isBrowser=i;exports.prefersReducedMotion=o;exports.useReducedMotion=a;exports.warnOnce=d;
|
|
2
|
-
//# sourceMappingURL=use-reduced-motion-00575ab2.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-reduced-motion-00575ab2.cjs","sources":["../node_modules/framer-motion/dist/es/utils/is-browser.mjs","../node_modules/framer-motion/dist/es/utils/warn-once.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs"],"sourcesContent":["const isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","const warned = new Set();\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { warnOnce };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { useState } from 'react';\nimport { initPrefersReducedMotion } from './index.mjs';\nimport { warnOnce } from '../warn-once.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion();\n const [shouldReduceMotion] = useState(prefersReducedMotion.current);\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\n\nexport { useReducedMotion };\n"],"names":["isBrowser","warned","warnOnce","condition","message","element","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","useReducedMotion","shouldReduceMotion","useState"],"mappings":"sCAAMA,EAAY,OAAO,SAAa,ICAhCC,EAAS,IAAI,IACnB,SAASC,EAASC,EAAWC,EAASC,EAAS,CACvCF,GAAaF,EAAO,IAAIG,CAAO,IAEnC,QAAQ,KAAKA,CAAO,EAChBC,GACA,QAAQ,KAAKA,CAAO,EACxBJ,EAAO,IAAIG,CAAO,EACtB,CCPK,MAACE,EAAuB,CAAE,QAAS,IAAO,EACzCC,EAA2B,CAAE,QAAS,EAAK,ECCjD,SAASC,GAA2B,CAEhC,GADAD,EAAyB,QAAU,GAC/B,EAACP,EAEL,GAAI,OAAO,WAAY,CACnB,MAAMS,EAAmB,OAAO,WAAW,0BAA0B,EAC/DC,EAA8B,IAAOJ,EAAqB,QAAUG,EAAiB,QAC3FA,EAAiB,YAAYC,CAA2B,EACxDA,GACH,MAEGJ,EAAqB,QAAU,EAEvC,CCeA,SAASK,GAAmB,CAIxB,CAACJ,EAAyB,SAAWC,IACrC,KAAM,CAACI,CAAkB,EAAIC,EAAQ,SAACP,EAAqB,OAAO,EAClE,OAAI,QAAQ,IAAI,WAAa,cACzBJ,EAASU,IAAuB,GAAM,wFAAwF,EAK3HA,CACX","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-reduced-motion-fa02c531.js","sources":["../node_modules/framer-motion/dist/es/utils/is-browser.mjs","../node_modules/framer-motion/dist/es/utils/warn-once.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs"],"sourcesContent":["const isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","const warned = new Set();\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { warnOnce };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { useState } from 'react';\nimport { initPrefersReducedMotion } from './index.mjs';\nimport { warnOnce } from '../warn-once.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion();\n const [shouldReduceMotion] = useState(prefersReducedMotion.current);\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\n\nexport { useReducedMotion };\n"],"names":["isBrowser","warned","warnOnce","condition","message","element","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","useReducedMotion","shouldReduceMotion","useState"],"mappings":";AAAK,MAACA,IAAY,OAAO,WAAa,KCAhCC,IAAS,oBAAI;AACnB,SAASC,EAASC,GAAWC,GAASC,GAAS;AAC3C,EAAIF,KAAaF,EAAO,IAAIG,CAAO,MAEnC,QAAQ,KAAKA,CAAO,GAChBC,KACA,QAAQ,KAAKA,CAAO,GACxBJ,EAAO,IAAIG,CAAO;AACtB;ACPK,MAACE,IAAuB,EAAE,SAAS,KAAO,GACzCC,IAA2B,EAAE,SAAS,GAAK;ACCjD,SAASC,IAA2B;AAEhC,MADAD,EAAyB,UAAU,IAC/B,EAACP;AAEL,QAAI,OAAO,YAAY;AACnB,YAAMS,IAAmB,OAAO,WAAW,0BAA0B,GAC/DC,IAA8B,MAAOJ,EAAqB,UAAUG,EAAiB;AAC3F,MAAAA,EAAiB,YAAYC,CAA2B,GACxDA;IACH;AAEG,MAAAJ,EAAqB,UAAU;AAEvC;ACeA,SAASK,IAAmB;AAIxB,GAACJ,EAAyB,WAAWC;AACrC,QAAM,CAACI,CAAkB,IAAIC,EAASP,EAAqB,OAAO;AAClE,SAAI,QAAQ,IAAI,aAAa,gBACzBJ,EAASU,MAAuB,IAAM,wFAAwF,GAK3HA;AACX;","x_google_ignoreList":[0,1,2,3,4]}
|
|
File without changes
|
|
File without changes
|