@rpcbase/ui 0.231.0 → 0.233.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/components/FilesUploadField/index.d.ts +2 -1
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/components/I18nField/index.d.ts.map +1 -1
- package/dist/index11.js +291 -278
- package/dist/index11.js.map +1 -1
- package/dist/index151.js +4 -4
- package/dist/index156.js +1 -1
- package/dist/index157.js +1 -1
- package/dist/index164.js +1 -1
- package/dist/index165.js +6 -6
- package/dist/index167.js +1 -1
- package/dist/index169.js +1 -1
- package/dist/index172.js +3 -3
- package/dist/index175.js +1 -1
- package/dist/index176.js +4 -4
- package/dist/index182.js +1 -1
- package/dist/index184.js +12 -12
- package/dist/index187.js +5 -5
- package/dist/index189.js +3 -3
- package/dist/index190.js +1 -1
- package/dist/index193.js +3 -3
- package/dist/index194.js +5 -5
- package/dist/index256.js +14 -20
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +146 -58
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +30 -6
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +9 -11
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +44 -46
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +12 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +43 -28
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +93 -14
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +86 -5
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +105 -21
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +51 -50
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +11 -25
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +37 -41
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +8 -39
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +117 -45
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +17 -20
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +14 -69
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +3 -17
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +36 -11
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +20 -27
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +9 -13
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +8 -18
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +20 -37
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +59 -255
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +6 -278
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +10 -67
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +47 -96
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +4 -84
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +29 -3
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +15 -28
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +5 -16
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +22 -35
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +51 -16
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +25 -3
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +41 -26
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +38 -27
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +45 -4
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +20 -78
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +65 -264
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +17 -11
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +11 -10
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +26 -24
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +13 -16
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +15 -122
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +36 -5
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +260 -38
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +275 -62
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +68 -13
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +99 -7
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +83 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +29 -10
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +15 -6
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +34 -133
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +15 -398
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +3 -52
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +26 -11
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +27 -10
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +4 -14
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +75 -151
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +267 -28
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +11 -9
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +11 -49
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +25 -11
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +15 -43
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +119 -89
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +5 -86
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +39 -104
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +60 -47
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +13 -11
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +7 -37
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +5 -8
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +3 -3
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +10 -9
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +7 -116
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +133 -17
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +398 -14
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +51 -35
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +11 -20
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +11 -8
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +3 -3
- package/dist/index346.js +2 -2
- package/dist/index348.js +8 -8
- package/dist/index349.js +3 -3
- package/dist/index350.js +2 -2
- package/dist/index351.js +5 -5
- package/dist/index353.js +1 -1
- package/dist/index362.js +21 -4
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +4 -12
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +11 -16
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +16 -5
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +5 -20
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +19 -43
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +40 -13
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +17 -4
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +4 -200
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +197 -74
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +77 -20
- package/dist/index372.js.map +1 -1
- package/dist/index374.js +3 -3
- package/dist/index375.js +1 -1
- package/dist/index376.js +3 -3
- package/dist/index378.js +2 -2
- package/dist/index380.js +1 -1
- package/dist/index381.js +2 -2
- package/dist/index407.js +1 -1
- package/dist/index411.js +1 -1
- package/dist/index413.js +1 -1
- package/dist/index414.js +2 -2
- package/dist/index417.js +1 -1
- package/dist/index418.js +1 -1
- package/dist/index421.js +1 -1
- package/dist/index422.js +1 -1
- package/dist/index423.js +16 -2
- package/dist/index423.js.map +1 -1
- package/dist/index424.js +29 -2
- package/dist/index424.js.map +1 -1
- package/dist/index425.js +13 -2
- package/dist/index425.js.map +1 -1
- package/dist/index426.js +7 -2
- package/dist/index426.js.map +1 -1
- package/dist/index427.js +2 -16
- package/dist/index427.js.map +1 -1
- package/dist/index428.js +2 -29
- package/dist/index428.js.map +1 -1
- package/dist/index429.js +2 -13
- package/dist/index429.js.map +1 -1
- package/dist/index430.js +2 -7
- package/dist/index430.js.map +1 -1
- package/dist/index44.js +1 -1
- package/dist/index45.js +2 -2
- package/dist/index49.js +28 -28
- package/dist/index50.js +21 -21
- package/dist/index51.js +1 -1
- package/dist/index52.js +8 -8
- package/dist/index53.js +2 -2
- package/dist/index55.js +17 -17
- package/dist/index56.js +4 -4
- package/dist/index57.js +3 -3
- package/dist/index58.js +7 -7
- package/dist/index59.js +4 -4
- package/dist/index60.js +12 -12
- package/dist/index61.js +2 -2
- package/dist/index62.js +2 -2
- package/dist/index70.js +1 -1
- package/dist/index71.js +1 -1
- package/dist/index74.js +2 -6
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +2 -8
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +5 -5
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +8 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +6 -2
- package/dist/index78.js.map +1 -1
- package/dist/index8.js +525 -517
- package/dist/index8.js.map +1 -1
- package/package.json +1 -1
package/dist/index303.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index303.js","sources":["../../../node_modules/@base-ui/react/esm/utils/styles.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nconst DISABLE_SCROLLBAR_CLASS_NAME = 'base-ui-disable-scrollbar';\nexport const styleDisableScrollbar = {\n className: DISABLE_SCROLLBAR_CLASS_NAME,\n getElement(nonce) {\n return /*#__PURE__*/_jsx(\"style\", {\n nonce: nonce,\n href: DISABLE_SCROLLBAR_CLASS_NAME,\n precedence: \"base-ui:low\",\n children: `.${DISABLE_SCROLLBAR_CLASS_NAME}{scrollbar-width:none}.${DISABLE_SCROLLBAR_CLASS_NAME}::-webkit-scrollbar{display:none}`\n });\n }\n};\nif (process.env.NODE_ENV !== \"production\") styleDisableScrollbar.getElement.displayName = \"styleDisableScrollbar.getElement\";"],"names":["DISABLE_SCROLLBAR_CLASS_NAME","styleDisableScrollbar","nonce","_jsx"],"mappings":";AACA,MAAMA,IAA+B,6BACxBC,IAAwB;AAAA,EACnC,WAAWD;AAAA,EACX,WAAWE,GAAO;AAChB,WAAoBC,gBAAAA,EAAAA,IAAK,SAAS;AAAA,MAChC,OAAOD;AAAA,MACP,MAAMF;AAAA,MACN,YAAY;AAAA,MACZ,UAAU,IAAIA,CAA4B,0BAA0BA,CAA4B;AAAA,IACtG,CAAK;AAAA,EACH;AACF;AACI,QAAQ,IAAI,aAAa,iBAAcC,EAAsB,WAAW,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index303.js","sources":["../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { contains } from \"../utils/element.js\";\nimport { stopEvent } from \"../utils/event.js\";\nimport { isElementVisible } from \"../utils/composite.js\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(context, props) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const dataRef = store.context.dataRef;\n const open = store.useState('open');\n const {\n listRef,\n elementsRef,\n activeIndex,\n onMatch: onMatchProp,\n onTypingChange,\n enabled = true,\n resetMs = 750,\n selectedIndex = null\n } = props;\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n if (!open && selectedIndex !== null) {\n return;\n }\n timeout.clear();\n matchIndexRef.current = null;\n if (stringRef.current !== '') {\n stringRef.current = '';\n }\n }, [open, selectedIndex, timeout]);\n useIsoLayoutEffect(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n }, [open, selectedIndex, activeIndex]);\n const setTypingChange = useStableCallback(value => {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange?.(value);\n }\n } else if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange?.(value);\n }\n });\n const onKeyDown = useStableCallback(event => {\n function isVisible(index) {\n const element = elementsRef?.current[index];\n return !element || isElementVisible(element);\n }\n function getMatchingIndex(list, string, startIndex = 0) {\n if (list.length === 0) {\n return -1;\n }\n const normalizedStartIndex = (startIndex % list.length + list.length) % list.length;\n const lowerString = string.toLocaleLowerCase();\n for (let offset = 0; offset < list.length; offset += 1) {\n const index = (normalizedStartIndex + offset) % list.length;\n const text = list[index];\n if (!text?.toLocaleLowerCase().startsWith(lowerString) || !isVisible(index)) {\n continue;\n }\n return index;\n }\n return -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && event.key === ' ') {\n // Space should continue the in-progress typeahead session.\n stopEvent(event);\n setTypingChange(true);\n }\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, stringRef.current) === -1 && event.key !== ' ') {\n setTypingChange(false);\n }\n }\n if (listContent == null ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Capture whether this is a new typing session before mutating the string.\n const isNewSession = stringRef.current === '';\n if (isNewSession) {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => text ? text[0]?.toLocaleLowerCase() !== text[1]?.toLocaleLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n });\n\n // Compute the starting index for this search.\n // If this is a new typing session (string is empty), base it on the current\n // selection/active item; otherwise continue from the last matched index.\n const prevIndex = isNewSession ? selectedIndex ?? activeIndex ?? -1 : prevIndexRef.current;\n const startIndex = (prevIndex ?? 0) + 1;\n const index = getMatchingIndex(listContent, stringRef.current, startIndex);\n if (index !== -1) {\n onMatchProp?.(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n });\n const onBlur = useStableCallback(event => {\n const next = event.relatedTarget;\n const currentDomReferenceElement = store.select('domReferenceElement');\n const currentFloatingElement = store.select('floatingElement');\n const withinReference = contains(currentDomReferenceElement, next);\n const withinFloating = contains(currentFloatingElement, next);\n\n // Keep the session if focus moves within the composite (reference <-> floating).\n if (withinReference || withinFloating) {\n return;\n }\n\n // End the current typing session when focus leaves the composite entirely.\n timeout.clear();\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n });\n const reference = React.useMemo(() => ({\n onKeyDown,\n onBlur\n }), [onKeyDown, onBlur]);\n const floating = React.useMemo(() => {\n return {\n onKeyDown,\n onBlur\n };\n }, [onKeyDown, onBlur]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}"],"names":["useTypeahead","context","props","store","dataRef","open","listRef","elementsRef","activeIndex","onMatchProp","onTypingChange","enabled","resetMs","selectedIndex","timeout","useTimeout","stringRef","React","prevIndexRef","matchIndexRef","useIsoLayoutEffect","setTypingChange","useStableCallback","value","onKeyDown","event","isVisible","index","element","isElementVisible","getMatchingIndex","list","string","startIndex","normalizedStartIndex","lowerString","offset","listContent","stopEvent","isNewSession","text","onBlur","next","currentDomReferenceElement","currentFloatingElement","withinReference","contains","withinFloating","reference","floating"],"mappings":";;;;;;;AAcO,SAASA,EAAaC,GAASC,GAAO;AAC3C,QAAMC,IAAQ,eAAeF,IAAUA,EAAQ,YAAYA,GACrDG,IAAUD,EAAM,QAAQ,SACxBE,IAAOF,EAAM,SAAS,MAAM,GAC5B;AAAA,IACJ,SAAAG;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAASC;AAAA,IACT,gBAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,SAAAC,IAAU;AAAA,IACV,eAAAC,IAAgB;AAAA,EACpB,IAAMX,GACEY,IAAUC,EAAU,GACpBC,IAAYC,EAAM,OAAO,EAAE,GAC3BC,IAAeD,EAAM,OAAOJ,KAAiBL,KAAe,EAAE,GAC9DW,IAAgBF,EAAM,OAAO,IAAI;AACvC,EAAAG,EAAmB,MAAM;AACvB,IAAI,CAACf,KAAQQ,MAAkB,SAG/BC,EAAQ,MAAK,GACbK,EAAc,UAAU,MACpBH,EAAU,YAAY,OACxBA,EAAU,UAAU;AAAA,EAExB,GAAG,CAACX,GAAMQ,GAAeC,CAAO,CAAC,GACjCM,EAAmB,MAAM;AAEvB,IAAIf,KAAQW,EAAU,YAAY,OAChCE,EAAa,UAAUL,KAAiBL,KAAe;AAAA,EAE3D,GAAG,CAACH,GAAMQ,GAAeL,CAAW,CAAC;AACrC,QAAMa,IAAkBC,EAAkB,CAAAC,MAAS;AACjD,IAAIA,IACGnB,EAAQ,QAAQ,WACnBA,EAAQ,QAAQ,SAASmB,GACzBb,IAAiBa,CAAK,KAEfnB,EAAQ,QAAQ,WACzBA,EAAQ,QAAQ,SAASmB,GACzBb,IAAiBa,CAAK;AAAA,EAE1B,CAAC,GACKC,IAAYF,EAAkB,CAAAG,MAAS;AAC3C,aAASC,EAAUC,GAAO;AACxB,YAAMC,IAAUrB,GAAa,QAAQoB,CAAK;AAC1C,aAAO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MAAAI,EAAU,UAAU,IACpBE,EAAa,UAAUC,EAAc,SACrCE,EAAgB,EAAK;AAAA,IACvB,CAAC;AAMD,UAAMY,MADYM,IAAe1B,KAAiBL,KAAe,KAAKU,EAAa,YAClD,KAAK,GAChCS,IAAQG,EAAiBO,GAAarB,EAAU,SAASiB,CAAU;AACzE,IAAIN,MAAU,MACZlB,IAAckB,CAAK,GACnBR,EAAc,UAAUQ,KACfF,EAAM,QAAQ,QACvBT,EAAU,UAAU,IACpBK,EAAgB,EAAK;AAAA,EAEzB,CAAC,GACKoB,IAASnB,EAAkB,CAAAG,MAAS;AACxC,UAAMiB,IAAOjB,EAAM,eACbkB,IAA6BxC,EAAM,OAAO,qBAAqB,GAC/DyC,IAAyBzC,EAAM,OAAO,iBAAiB,GACvD0C,IAAkBC,EAASH,GAA4BD,CAAI,GAC3DK,IAAiBD,EAASF,GAAwBF,CAAI;AAG5D,IAAIG,KAAmBE,MAKvBjC,EAAQ,MAAK,GACbE,EAAU,UAAU,IACpBE,EAAa,UAAUC,EAAc,SACrCE,EAAgB,EAAK;AAAA,EACvB,CAAC,GACK2B,IAAY/B,EAAM,QAAQ,OAAO;AAAA,IACrC,WAAAO;AAAA,IACA,QAAAiB;AAAA,EACJ,IAAM,CAACjB,GAAWiB,CAAM,CAAC,GACjBQ,IAAWhC,EAAM,QAAQ,OACtB;AAAA,IACL,WAAAO;AAAA,IACA,QAAAiB;AAAA,EACN,IACK,CAACjB,GAAWiB,CAAM,CAAC;AACtB,SAAOxB,EAAM,QAAQ,MAAMN,IAAU;AAAA,IACnC,WAAAqC;AAAA,IACA,UAAAC;AAAA,EACJ,IAAM,CAAA,GAAI,CAACtC,GAASqC,GAAWC,CAAQ,CAAC;AACxC;","x_google_ignoreList":[0]}
|
package/dist/index304.js
CHANGED
|
@@ -1,11 +1,103 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { mergeObjects as y } from "./index340.js";
|
|
2
|
+
const o = {};
|
|
3
|
+
function j(t, n, e, r, c) {
|
|
4
|
+
if (!e && !r && !c && !t)
|
|
5
|
+
return u(n);
|
|
6
|
+
let f = u(t);
|
|
7
|
+
return n && (f = i(f, n)), e && (f = i(f, e)), r && (f = i(f, r)), c && (f = i(f, c)), f;
|
|
8
|
+
}
|
|
9
|
+
function w(t) {
|
|
10
|
+
if (t.length === 0)
|
|
11
|
+
return o;
|
|
12
|
+
if (t.length === 1)
|
|
13
|
+
return u(t[0]);
|
|
14
|
+
let n = u(t[0]);
|
|
15
|
+
for (let e = 1; e < t.length; e += 1)
|
|
16
|
+
n = i(n, t[e]);
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
19
|
+
function u(t) {
|
|
20
|
+
return l(t) ? {
|
|
21
|
+
...s(t, o)
|
|
22
|
+
} : m(t);
|
|
23
|
+
}
|
|
24
|
+
function i(t, n) {
|
|
25
|
+
return l(n) ? s(n, t) : U(t, n);
|
|
26
|
+
}
|
|
27
|
+
function m(t) {
|
|
28
|
+
const n = {
|
|
29
|
+
...t
|
|
30
|
+
};
|
|
31
|
+
for (const e in n) {
|
|
32
|
+
const r = n[e];
|
|
33
|
+
a(e, r) && (n[e] = v(r));
|
|
34
|
+
}
|
|
35
|
+
return n;
|
|
36
|
+
}
|
|
37
|
+
function U(t, n) {
|
|
38
|
+
if (!n)
|
|
39
|
+
return t;
|
|
40
|
+
for (const e in n) {
|
|
41
|
+
const r = n[e];
|
|
42
|
+
switch (e) {
|
|
43
|
+
case "style": {
|
|
44
|
+
t[e] = y(t.style, r);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case "className": {
|
|
48
|
+
t[e] = M(t.className, r);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
default:
|
|
52
|
+
a(e, r) ? t[e] = A(t[e], r) : t[e] = r;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return t;
|
|
56
|
+
}
|
|
57
|
+
function a(t, n) {
|
|
58
|
+
const e = t.charCodeAt(0), r = t.charCodeAt(1), c = t.charCodeAt(2);
|
|
59
|
+
return e === 111 && r === 110 && c >= 65 && c <= 90 && (typeof n == "function" || typeof n > "u");
|
|
60
|
+
}
|
|
61
|
+
function l(t) {
|
|
62
|
+
return typeof t == "function";
|
|
63
|
+
}
|
|
64
|
+
function s(t, n) {
|
|
65
|
+
return l(t) ? t(n) : t ?? o;
|
|
66
|
+
}
|
|
67
|
+
function A(t, n) {
|
|
68
|
+
return n ? t ? (...e) => {
|
|
69
|
+
const r = e[0];
|
|
70
|
+
if (I(r)) {
|
|
71
|
+
const f = r;
|
|
72
|
+
E(f);
|
|
73
|
+
const b = n(...e);
|
|
74
|
+
return f.baseUIHandlerPrevented || t?.(...e), b;
|
|
75
|
+
}
|
|
76
|
+
const c = n(...e);
|
|
77
|
+
return t?.(...e), c;
|
|
78
|
+
} : v(n) : t;
|
|
79
|
+
}
|
|
80
|
+
function v(t) {
|
|
81
|
+
return t && ((...n) => {
|
|
82
|
+
const e = n[0];
|
|
83
|
+
return I(e) && E(e), t(...n);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function E(t) {
|
|
87
|
+
return t.preventBaseUIHandler = () => {
|
|
88
|
+
t.baseUIHandlerPrevented = !0;
|
|
89
|
+
}, t;
|
|
90
|
+
}
|
|
91
|
+
function M(t, n) {
|
|
92
|
+
return n ? t ? n + " " + t : n : t;
|
|
93
|
+
}
|
|
94
|
+
function I(t) {
|
|
95
|
+
return t != null && typeof t == "object" && "nativeEvent" in t;
|
|
6
96
|
}
|
|
7
97
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
98
|
+
E as makeEventPreventable,
|
|
99
|
+
M as mergeClassNames,
|
|
100
|
+
j as mergeProps,
|
|
101
|
+
w as mergePropsN
|
|
10
102
|
};
|
|
11
103
|
//# sourceMappingURL=index304.js.map
|
package/dist/index304.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index304.js","sources":["../../../node_modules/@base-ui/react/esm/toolbar/root/ToolbarRootContext.js"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToolbarRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarRootContext.displayName = \"ToolbarRootContext\";\nexport function useToolbarRootContext(optional) {\n const context = React.useContext(ToolbarRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : _formatErrorMessage(69));\n }\n return context;\n}"],"names":["ToolbarRootContext","React","useToolbarRootContext","optional"],"mappings":";AAIY,MAACA,IAAkC,gBAAAC,EAAM,cAAc,MAAS;AACxE,QAAQ,IAAI,aAAa,iBAAcD,EAAmB,cAAc;AACrE,SAASE,EAAsBC,GAAU;AAK9C,SAJgBF,EAAM,WAAWD,CAAkB;AAKrD;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index304.js","sources":["../../../node_modules/@base-ui/react/esm/merge-props/mergeProps.js"],"sourcesContent":["import { mergeObjects } from '@base-ui/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/* eslint-disable id-denylist */\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n *\n * Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).\n * For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing\n * by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),\n * all handlers always execute without prevention capability.\n *\n * The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).\n * The `style` prop is merged with rightmost styles overwriting the prior ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (that is, we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param a Props object to merge.\n * @param b Props object to merge. The function will overwrite conflicting props from `a`.\n * @param c Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param d Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param e Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @returns The merged props.\n * @public\n */\n\nexport function mergeProps(a, b, c, d, e) {\n if (!c && !d && !e && !a) {\n return createInitialMergedProps(b);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(a);\n if (b) {\n merged = mergeInto(merged, b);\n }\n if (c) {\n merged = mergeInto(merged, c);\n }\n if (d) {\n merged = mergeInto(merged, d);\n }\n if (e) {\n merged = mergeInto(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\n/**\n * Merges an arbitrary number of React props using the same logic as {@link mergeProps}.\n * This function accepts an array of props instead of individual arguments.\n *\n * This has slightly lower performance than {@link mergeProps} due to accepting an array\n * instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or\n * fewer prop sets for better performance.\n *\n * @param props Array of props to merge.\n * @returns The merged props.\n * @see mergeProps\n * @public\n */\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return createInitialMergedProps(props[0]);\n }\n\n // We need to mutably own `merged`.\n let merged = createInitialMergedProps(props[0]);\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeInto(merged, props[i]);\n }\n return merged;\n}\nfunction createInitialMergedProps(inputProps) {\n if (isPropsGetter(inputProps)) {\n // Getter-returned handlers intentionally keep their existing semantics.\n return {\n ...resolvePropsGetter(inputProps, EMPTY_PROPS)\n };\n }\n return copyInitialProps(inputProps);\n}\nfunction mergeInto(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return resolvePropsGetter(inputProps, merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\nfunction copyInitialProps(inputProps) {\n const copiedProps = {\n ...inputProps\n };\n\n // `copiedProps` is our fresh own-object copy, so iterating with `for...in` is safe here.\n // eslint-disable-next-line guard-for-in\n for (const propName in copiedProps) {\n const propValue = copiedProps[propName];\n if (isEventHandler(propName, propValue)) {\n copiedProps[propName] = wrapEventHandler(propValue);\n }\n }\n return copiedProps;\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction resolvePropsGetter(inputProps, previousProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(previousProps);\n }\n return inputProps ?? EMPTY_PROPS;\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return wrapEventHandler(theirHandler);\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(...args);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(...args);\n }\n return result;\n }\n const result = theirHandler(...args);\n ourHandler?.(...args);\n return result;\n };\n}\nfunction wrapEventHandler(handler) {\n if (!handler) {\n return handler;\n }\n return (...args) => {\n const event = args[0];\n if (isSyntheticEvent(event)) {\n makeEventPreventable(event);\n }\n return handler(...args);\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}"],"names":["EMPTY_PROPS","mergeProps","a","b","c","d","e","createInitialMergedProps","merged","mergeInto","mergePropsN","props","i","inputProps","isPropsGetter","resolvePropsGetter","copyInitialProps","mutablyMergeInto","copiedProps","propName","propValue","isEventHandler","wrapEventHandler","mergedProps","externalProps","externalPropValue","mergeObjects","mergeClassNames","mergeEventHandlers","key","value","code0","code1","code2","previousProps","ourHandler","theirHandler","args","event","isSyntheticEvent","baseUIEvent","makeEventPreventable","result","handler","ourClassName","theirClassName"],"mappings":";AACA,MAAMA,IAAc,CAAA;AAiCb,SAASC,EAAWC,GAAGC,GAAGC,GAAGC,GAAGC,GAAG;AACxC,MAAI,CAACF,KAAK,CAACC,KAAK,CAACC,KAAK,CAACJ;AACrB,WAAOK,EAAyBJ,CAAC;AAInC,MAAIK,IAASD,EAAyBL,CAAC;AACvC,SAAIC,MACFK,IAASC,EAAUD,GAAQL,CAAC,IAE1BC,MACFI,IAASC,EAAUD,GAAQJ,CAAC,IAE1BC,MACFG,IAASC,EAAUD,GA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EAAM,uBAAuB,MAAM;AACjC,IAAAA,EAAM,yBAAyB;AAAA,EACjC,GACOA;AACT;AACO,SAASX,EAAgBiB,GAAcC,GAAgB;AAC5D,SAAIA,IACED,IAEKC,IAAiB,MAAMD,IAEzBC,IAEFD;AACT;AACA,SAASL,EAAiBD,GAAO;AAC/B,SAAOA,KAAS,QAAQ,OAAOA,KAAU,YAAY,iBAAiBA;AACxE;","x_google_ignoreList":[0]}
|
package/dist/index305.js
CHANGED
|
@@ -1,9 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useStore as r } from "./index299.js";
|
|
2
|
+
class n {
|
|
3
|
+
/**
|
|
4
|
+
* The current state of the store.
|
|
5
|
+
* This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
|
|
6
|
+
* To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
|
|
7
|
+
* The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
|
|
8
|
+
*
|
|
9
|
+
* Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
|
|
10
|
+
*/
|
|
11
|
+
// Internal state to handle recursive `setState()` calls
|
|
12
|
+
constructor(t) {
|
|
13
|
+
this.state = t, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Registers a listener that will be called whenever the store's state changes.
|
|
17
|
+
*
|
|
18
|
+
* @param fn The listener function to be called on state changes.
|
|
19
|
+
* @returns A function to unsubscribe the listener.
|
|
20
|
+
*/
|
|
21
|
+
subscribe = (t) => (this.listeners.add(t), () => {
|
|
22
|
+
this.listeners.delete(t);
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Returns the current state of the store.
|
|
26
|
+
*/
|
|
27
|
+
getSnapshot = () => this.state;
|
|
28
|
+
/**
|
|
29
|
+
* Updates the entire store's state and notifies all registered listeners.
|
|
30
|
+
*
|
|
31
|
+
* @param newState The new state to set for the store.
|
|
32
|
+
*/
|
|
33
|
+
setState(t) {
|
|
34
|
+
if (this.state === t)
|
|
35
|
+
return;
|
|
36
|
+
this.state = t, this.updateTick += 1;
|
|
37
|
+
const s = this.updateTick;
|
|
38
|
+
for (const e of this.listeners) {
|
|
39
|
+
if (s !== this.updateTick)
|
|
40
|
+
return;
|
|
41
|
+
e(t);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Merges the provided changes into the current state and notifies listeners if there are changes.
|
|
46
|
+
*
|
|
47
|
+
* @param changes An object containing the changes to apply to the current state.
|
|
48
|
+
*/
|
|
49
|
+
update(t) {
|
|
50
|
+
for (const s in t)
|
|
51
|
+
if (!Object.is(this.state[s], t[s])) {
|
|
52
|
+
this.setState({
|
|
53
|
+
...this.state,
|
|
54
|
+
...t
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
|
|
61
|
+
*
|
|
62
|
+
* @param key The key in the store's state to update.
|
|
63
|
+
* @param value The new value to set for the specified key.
|
|
64
|
+
*/
|
|
65
|
+
set(t, s) {
|
|
66
|
+
Object.is(this.state[t], s) || this.setState({
|
|
67
|
+
...this.state,
|
|
68
|
+
[t]: s
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Gives the state a new reference and updates all registered listeners.
|
|
73
|
+
*/
|
|
74
|
+
notifyAll() {
|
|
75
|
+
const t = {
|
|
76
|
+
...this.state
|
|
77
|
+
};
|
|
78
|
+
this.setState(t);
|
|
79
|
+
}
|
|
80
|
+
use(t, s, e, i) {
|
|
81
|
+
return r(this, t, s, e, i);
|
|
82
|
+
}
|
|
5
83
|
}
|
|
6
84
|
export {
|
|
7
|
-
|
|
85
|
+
n as Store
|
|
8
86
|
};
|
|
9
87
|
//# sourceMappingURL=index305.js.map
|
package/dist/index305.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index305.js","sources":["../../../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index305.js","sources":["../../../node_modules/@base-ui/utils/esm/store/Store.js"],"sourcesContent":["import { useStore } from \"./useStore.js\";\n/**\n * A data store implementation that allows subscribing to state changes and updating the state.\n * It uses an observer pattern to notify subscribers when the state changes.\n */\nexport class Store {\n /**\n * The current state of the store.\n * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.\n * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).\n * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.\n *\n * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.\n */\n\n // Internal state to handle recursive `setState()` calls\n\n constructor(state) {\n this.state = state;\n this.listeners = new Set();\n this.updateTick = 0;\n }\n\n /**\n * Registers a listener that will be called whenever the store's state changes.\n *\n * @param fn The listener function to be called on state changes.\n * @returns A function to unsubscribe the listener.\n */\n subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n\n /**\n * Returns the current state of the store.\n */\n getSnapshot = () => {\n return this.state;\n };\n\n /**\n * Updates the entire store's state and notifies all registered listeners.\n *\n * @param newState The new state to set for the store.\n */\n setState(newState) {\n if (this.state === newState) {\n return;\n }\n this.state = newState;\n this.updateTick += 1;\n const currentTick = this.updateTick;\n for (const listener of this.listeners) {\n if (currentTick !== this.updateTick) {\n // If the tick has changed, a recursive `setState` call has been made,\n // and it has already notified all listeners.\n return;\n }\n listener(newState);\n }\n }\n\n /**\n * Merges the provided changes into the current state and notifies listeners if there are changes.\n *\n * @param changes An object containing the changes to apply to the current state.\n */\n update(changes) {\n for (const key in changes) {\n if (!Object.is(this.state[key], changes[key])) {\n this.setState({\n ...this.state,\n ...changes\n });\n return;\n }\n }\n }\n\n /**\n * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.\n *\n * @param key The key in the store's state to update.\n * @param value The new value to set for the specified key.\n */\n set(key, value) {\n if (!Object.is(this.state[key], value)) {\n this.setState({\n ...this.state,\n [key]: value\n });\n }\n }\n\n /**\n * Gives the state a new reference and updates all registered listeners.\n */\n notifyAll() {\n const newState = {\n ...this.state\n };\n this.setState(newState);\n }\n use(selector, a1, a2, a3) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useStore(this, selector, a1, a2, a3);\n }\n}"],"names":["Store","state","fn","newState","currentTick","listener","changes","key","value","selector","a1","a2","a3","useStore"],"mappings":";AAKO,MAAMA,EAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYjB,YAAYC,GAAO;AACjB,SAAK,QAAQA,GACb,KAAK,YAAY,oBAAI,IAAG,GACxB,KAAK,aAAa;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,YAAY,CAAAC,OACV,KAAK,UAAU,IAAIA,CAAE,GACd,MAAM;AACX,SAAK,UAAU,OAAOA,CAAE;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA,EAMF,cAAc,MACL,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQd,SAASC,GAAU;AACjB,QAAI,KAAK,UAAUA;AACjB;AAEF,SAAK,QAAQA,GACb,KAAK,cAAc;AACnB,UAAMC,IAAc,KAAK;AACzB,eAAWC,KAAY,KAAK,WAAW;AACrC,UAAID,MAAgB,KAAK;AAGvB;AAEF,MAAAC,EAASF,CAAQ;AAAA,IACnB;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAOG,GAAS;AACd,eAAWC,KAAOD;AAChB,UAAI,CAAC,OAAO,GAAG,KAAK,MAAMC,CAAG,GAAGD,EAAQC,CAAG,CAAC,GAAG;AAC7C,aAAK,SAAS;AAAA,UACZ,GAAG,KAAK;AAAA,UACR,GAAGD;AAAA,QACb,CAAS;AACD;AAAA,MACF;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAIC,GAAKC,GAAO;AACd,IAAK,OAAO,GAAG,KAAK,MAAMD,CAAG,GAAGC,CAAK,KACnC,KAAK,SAAS;AAAA,MACZ,GAAG,KAAK;AAAA,MACR,CAACD,CAAG,GAAGC;AAAA,IACf,CAAO;AAAA,EAEL;AAAA;AAAA;AAAA;AAAA,EAKA,YAAY;AACV,UAAML,IAAW;AAAA,MACf,GAAG,KAAK;AAAA,IACd;AACI,SAAK,SAASA,CAAQ;AAAA,EACxB;AAAA,EACA,IAAIM,GAAUC,GAAIC,GAAIC,GAAI;AAExB,WAAOC,EAAS,MAAMJ,GAAUC,GAAIC,GAAIC,CAAE;AAAA,EAC5C;AACF;","x_google_ignoreList":[0]}
|
package/dist/index306.js
CHANGED
package/dist/index306.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index306.js","sources":["../../../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index306.js","sources":["../../../node_modules/@base-ui/utils/esm/owner.js"],"sourcesContent":["export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}"],"names":["ownerDocument","node"],"mappings":"AACO,SAASA,EAAcC,GAAM;AAClC,SAAOA,GAAM,iBAAiB;AAChC;","x_google_ignoreList":[0]}
|
package/dist/index307.js
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { useRefWithInit as c } from "./index280.js";
|
|
2
|
+
import { useOnMount as u } from "./index366.js";
|
|
3
|
+
const t = 0;
|
|
4
|
+
class r {
|
|
5
|
+
static create() {
|
|
6
|
+
return new r();
|
|
7
|
+
}
|
|
8
|
+
currentId = t;
|
|
9
|
+
/**
|
|
10
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
11
|
+
*/
|
|
12
|
+
start(s, i) {
|
|
13
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
14
|
+
this.currentId = t, i();
|
|
15
|
+
}, s);
|
|
16
|
+
}
|
|
17
|
+
isStarted() {
|
|
18
|
+
return this.currentId !== t;
|
|
19
|
+
}
|
|
20
|
+
clear = () => {
|
|
21
|
+
this.currentId !== t && (clearTimeout(this.currentId), this.currentId = t);
|
|
22
|
+
};
|
|
23
|
+
disposeEffect = () => this.clear;
|
|
24
|
+
}
|
|
25
|
+
function a() {
|
|
26
|
+
const e = c(r.create).current;
|
|
27
|
+
return u(e.disposeEffect), e;
|
|
9
28
|
}
|
|
10
29
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
30
|
+
r as Timeout,
|
|
31
|
+
a as useTimeout
|
|
13
32
|
};
|
|
14
33
|
//# sourceMappingURL=index307.js.map
|
package/dist/index307.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index307.js","sources":["../../../node_modules/@base-ui/
|
|
1
|
+
{"version":3,"file":"index307.js","sources":["../../../node_modules/@base-ui/utils/esm/useTimeout.js"],"sourcesContent":["'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nconst EMPTY = 0;\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = EMPTY;\n fn();\n }, delay); /* Node.js types are enabled in development */\n }\n isStarted() {\n return this.currentId !== EMPTY;\n }\n clear = () => {\n if (this.currentId !== EMPTY) {\n clearTimeout(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\n\n/**\n * A `setTimeout` with automatic cleanup and guard.\n */\nexport function useTimeout() {\n const timeout = useRefWithInit(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}"],"names":["EMPTY","Timeout","delay","fn","useTimeout","timeout","useRefWithInit","useOnMount"],"mappings":";;AAIA,MAAMA,IAAQ;AACP,MAAMC,EAAQ;AAAA,EACnB,OAAO,SAAS;AACd,WAAO,IAAIA,EAAO;AAAA,EACpB;AAAA,EACA,YAAYD;AAAA;AAAA;AAAA;AAAA,EAKZ,MAAME,GAAOC,GAAI;AACf,SAAK,MAAK,GACV,KAAK,YAAY,WAAW,MAAM;AAChC,WAAK,YAAYH,GACjBG,EAAE;AAAA,IACJ,GAAGD,CAAK;AAAA,EACV;AAAA,EACA,YAAY;AACV,WAAO,KAAK,cAAcF;AAAA,EAC5B;AAAA,EACA,QAAQ,MAAM;AACZ,IAAI,KAAK,cAAcA,MACrB,aAAa,KAAK,SAAS,GAC3B,KAAK,YAAYA;AAAA,EAErB;AAAA,EACA,gBAAgB,MACP,KAAK;AAEhB;AAKO,SAASI,IAAa;AAC3B,QAAMC,IAAUC,EAAeL,EAAQ,MAAM,EAAE;AAC/C,SAAAM,EAAWF,EAAQ,aAAa,GACzBA;AACT;","x_google_ignoreList":[0]}
|
package/dist/index308.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import * as t from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { NOOP as e } from "./index286.js";
|
|
3
|
+
const o = /* @__PURE__ */ t.createContext({
|
|
4
|
+
controlId: void 0,
|
|
5
|
+
registerControlId: e,
|
|
6
|
+
labelId: void 0,
|
|
7
|
+
setLabelId: e,
|
|
8
|
+
messageIds: [],
|
|
9
|
+
setMessageIds: e,
|
|
10
|
+
getDescriptionProps: (n) => n
|
|
11
|
+
});
|
|
12
|
+
process.env.NODE_ENV !== "production" && (o.displayName = "LabelableContext");
|
|
13
|
+
function r() {
|
|
14
|
+
return t.useContext(o);
|
|
6
15
|
}
|
|
7
16
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
17
|
+
o as LabelableContext,
|
|
18
|
+
r as useLabelableContext
|
|
10
19
|
};
|
|
11
20
|
//# sourceMappingURL=index308.js.map
|
package/dist/index308.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index308.js","sources":["../../../node_modules/@base-ui/react/esm/internals/
|
|
1
|
+
{"version":3,"file":"index308.js","sources":["../../../node_modules/@base-ui/react/esm/internals/labelable-provider/LabelableContext.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../noop.js\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n registerControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}"],"names":["LabelableContext","React","NOOP","externalProps","useLabelableContext"],"mappings":";;AAQY,MAACA,IAAgC,gBAAAC,EAAM,cAAc;AAAA,EAC/D,WAAW;AAAA,EACX,mBAAmBC;AAAA,EACnB,SAAS;AAAA,EACT,YAAYA;AAAA,EACZ,YAAY,CAAA;AAAA,EACZ,eAAeA;AAAA,EACf,qBAAqB,CAAAC,MAAiBA;AACxC,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcH,EAAiB,cAAc;AACnE,SAASI,IAAsB;AACpC,SAAOH,EAAM,WAAWD,CAAgB;AAC1C;","x_google_ignoreList":[0]}
|
package/dist/index309.js
CHANGED
|
@@ -1,137 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
overflowX: r,
|
|
31
|
-
overflowY: c,
|
|
32
|
-
display: e
|
|
33
|
-
} = b(t);
|
|
34
|
-
return /auto|scroll|overlay|hidden|clip/.test(n + c + r) && e !== "inline" && e !== "contents";
|
|
35
|
-
}
|
|
36
|
-
function _(t) {
|
|
37
|
-
return /^(table|td|th)$/.test(a(t));
|
|
38
|
-
}
|
|
39
|
-
function T(t) {
|
|
40
|
-
try {
|
|
41
|
-
if (t.matches(":popover-open"))
|
|
42
|
-
return !0;
|
|
43
|
-
} catch {
|
|
1
|
+
import { FieldControlDataAttributes as e } from "./index363.js";
|
|
2
|
+
const t = {
|
|
3
|
+
badInput: !1,
|
|
4
|
+
customError: !1,
|
|
5
|
+
patternMismatch: !1,
|
|
6
|
+
rangeOverflow: !1,
|
|
7
|
+
rangeUnderflow: !1,
|
|
8
|
+
stepMismatch: !1,
|
|
9
|
+
tooLong: !1,
|
|
10
|
+
tooShort: !1,
|
|
11
|
+
typeMismatch: !1,
|
|
12
|
+
valid: null,
|
|
13
|
+
valueMissing: !1
|
|
14
|
+
}, a = {
|
|
15
|
+
valid: null,
|
|
16
|
+
touched: !1,
|
|
17
|
+
dirty: !1,
|
|
18
|
+
filled: !1,
|
|
19
|
+
focused: !1
|
|
20
|
+
}, f = {
|
|
21
|
+
disabled: !1,
|
|
22
|
+
...a
|
|
23
|
+
}, i = {
|
|
24
|
+
valid(l) {
|
|
25
|
+
return l === null ? null : l ? {
|
|
26
|
+
[e.valid]: ""
|
|
27
|
+
} : {
|
|
28
|
+
[e.invalid]: ""
|
|
29
|
+
};
|
|
44
30
|
}
|
|
45
|
-
|
|
46
|
-
return t.matches(":modal");
|
|
47
|
-
} catch {
|
|
48
|
-
return !1;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const v = /transform|translate|scale|rotate|perspective|filter/, C = /paint|layout|strict|content/, o = (t) => !!t && t !== "none";
|
|
52
|
-
let s;
|
|
53
|
-
function D(t) {
|
|
54
|
-
const n = h(t) ? b(t) : t;
|
|
55
|
-
return o(n.transform) || o(n.translate) || o(n.scale) || o(n.rotate) || o(n.perspective) || !R() && (o(n.backdropFilter) || o(n.filter)) || v.test(n.willChange || "") || C.test(n.contain || "");
|
|
56
|
-
}
|
|
57
|
-
function W(t) {
|
|
58
|
-
let n = f(t);
|
|
59
|
-
for (; g(n) && !N(n); ) {
|
|
60
|
-
if (D(n))
|
|
61
|
-
return n;
|
|
62
|
-
if (T(n))
|
|
63
|
-
return null;
|
|
64
|
-
n = f(n);
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
function R() {
|
|
69
|
-
return s == null && (s = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), s;
|
|
70
|
-
}
|
|
71
|
-
function N(t) {
|
|
72
|
-
return /^(html|body|#document)$/.test(a(t));
|
|
73
|
-
}
|
|
74
|
-
function b(t) {
|
|
75
|
-
return i(t).getComputedStyle(t);
|
|
76
|
-
}
|
|
77
|
-
function $(t) {
|
|
78
|
-
return h(t) ? {
|
|
79
|
-
scrollLeft: t.scrollLeft,
|
|
80
|
-
scrollTop: t.scrollTop
|
|
81
|
-
} : {
|
|
82
|
-
scrollLeft: t.scrollX,
|
|
83
|
-
scrollTop: t.scrollY
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function f(t) {
|
|
87
|
-
if (a(t) === "html")
|
|
88
|
-
return t;
|
|
89
|
-
const n = (
|
|
90
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
91
|
-
t.assignedSlot || // DOM Element detected.
|
|
92
|
-
t.parentNode || // ShadowRoot detected.
|
|
93
|
-
p(t) && t.host || // Fallback.
|
|
94
|
-
L(t)
|
|
95
|
-
);
|
|
96
|
-
return p(n) ? n.host : n;
|
|
97
|
-
}
|
|
98
|
-
function S(t) {
|
|
99
|
-
const n = f(t);
|
|
100
|
-
return N(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : g(n) && y(n) ? n : S(n);
|
|
101
|
-
}
|
|
102
|
-
function w(t, n, r) {
|
|
103
|
-
var c;
|
|
104
|
-
n === void 0 && (n = []), r === void 0 && (r = !0);
|
|
105
|
-
const e = S(t), E = e === ((c = t.ownerDocument) == null ? void 0 : c.body), l = i(e);
|
|
106
|
-
if (E) {
|
|
107
|
-
const d = k(l);
|
|
108
|
-
return n.concat(l, l.visualViewport || [], y(e) ? e : [], d && r ? w(d) : []);
|
|
109
|
-
} else
|
|
110
|
-
return n.concat(e, w(e, [], r));
|
|
111
|
-
}
|
|
112
|
-
function k(t) {
|
|
113
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
114
|
-
}
|
|
31
|
+
};
|
|
115
32
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
S as getNearestOverflowAncestor,
|
|
121
|
-
a as getNodeName,
|
|
122
|
-
$ as getNodeScroll,
|
|
123
|
-
w as getOverflowAncestors,
|
|
124
|
-
f as getParentNode,
|
|
125
|
-
i as getWindow,
|
|
126
|
-
D as isContainingBlock,
|
|
127
|
-
h as isElement,
|
|
128
|
-
g as isHTMLElement,
|
|
129
|
-
N as isLastTraversableNode,
|
|
130
|
-
m as isNode,
|
|
131
|
-
y as isOverflowElement,
|
|
132
|
-
p as isShadowRoot,
|
|
133
|
-
_ as isTableElement,
|
|
134
|
-
T as isTopLayer,
|
|
135
|
-
R as isWebKit
|
|
33
|
+
f as DEFAULT_FIELD_ROOT_STATE,
|
|
34
|
+
a as DEFAULT_FIELD_STATE_ATTRIBUTES,
|
|
35
|
+
t as DEFAULT_VALIDITY_STATE,
|
|
36
|
+
i as fieldValidityMapping
|
|
136
37
|
};
|
|
137
38
|
//# sourceMappingURL=index309.js.map
|
package/dist/index309.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index309.js","sources":["../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n"],"names":["hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","value","isElement","isHTMLElement","isShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","isTableElement","isTopLayer","willChangeRe","containRe","isNotNone","isWebKitValue","isContainingBlock","elementOrCss","css","isWebKit","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrame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AAOA,EAAI,UAAU,OAAO,eAAeA,EAAI,MAAM,IAAIA,EAAI,eAAe;AAC9E;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index309.js","sources":["../../../node_modules/@base-ui/react/esm/internals/field-constants/constants.js"],"sourcesContent":["import { FieldControlDataAttributes } from \"../../field/control/FieldControlDataAttributes.js\";\nexport const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const DEFAULT_FIELD_STATE_ATTRIBUTES = {\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n};\nexport const DEFAULT_FIELD_ROOT_STATE = {\n disabled: false,\n ...DEFAULT_FIELD_STATE_ATTRIBUTES\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n [FieldControlDataAttributes.valid]: ''\n };\n }\n return {\n [FieldControlDataAttributes.invalid]: ''\n };\n }\n};"],"names":["DEFAULT_VALIDITY_STATE","DEFAULT_FIELD_STATE_ATTRIBUTES","DEFAULT_FIELD_ROOT_STATE","fieldValidityMapping","value","FieldControlDataAttributes"],"mappings":";AACY,MAACA,IAAyB;AAAA,EACpC,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAAA,EACd,OAAO;AAAA,EACP,cAAc;AAChB,GACaC,IAAiC;AAAA,EAC5C,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AACX,GACaC,IAA2B;AAAA,EACtC,UAAU;AAAA,EACV,GAAGD;AACL,GACaE,IAAuB;AAAA,EAClC,MAAMC,GAAO;AACX,WAAIA,MAAU,OACL,OAELA,IACK;AAAA,MACL,CAACC,EAA2B,KAAK,GAAG;AAAA,IAC5C,IAEW;AAAA,MACL,CAACA,EAA2B,OAAO,GAAG;AAAA,IAC5C;AAAA,EACE;AACF;","x_google_ignoreList":[0]}
|