@pibit.ai/cure-design-system 0.3.8 → 0.3.10
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/applications/loading-indicator/loading-indicator.d.ts +19 -0
- package/dist/applications/loading-indicator/loading-indicator.d.ts.map +1 -0
- package/dist/applications/loading-indicator/loading-indicator.js +172 -0
- package/dist/hooks/use-resize-observer.d.ts +25 -0
- package/dist/hooks/use-resize-observer.d.ts.map +1 -0
- package/dist/hooks/use-resize-observer.js +25 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -42
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.js +442 -0
- package/dist/node_modules/@react-aria/i18n/dist/context.js +10 -0
- package/dist/node_modules/@react-aria/i18n/dist/useCollator.js +11 -0
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.js +36 -0
- package/dist/node_modules/@react-aria/i18n/dist/useFilter.js +35 -0
- package/dist/node_modules/@react-aria/i18n/dist/utils.js +44 -0
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.js +18 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +62 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.js +5 -0
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.js +49 -0
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +27 -0
- package/dist/node_modules/@react-aria/utils/dist/ShadowTreeWalker.js +130 -0
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
- package/dist/node_modules/@react-aria/utils/dist/isElementVisible.js +25 -0
- package/dist/node_modules/@react-aria/utils/dist/isFocusable.js +37 -0
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
- package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
- package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
- package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.js +35 -0
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
- package/dist/node_modules/@react-stately/data/dist/useListData.js +212 -0
- package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +59 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +47 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +277 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +67 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +28 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +131 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +43 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +23 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +27 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +39 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +60 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +44 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +21 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +63 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +66 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +52 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +38 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +13 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +16 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +20 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +24 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +27 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +30 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +6 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +28 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +106 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +133 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +109 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +30 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +98 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +46 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +49 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +30 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +69 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +75 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +24 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +41 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +24 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +36 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +623 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +247 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +65 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +141 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +42 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +51 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +5 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js +215 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +24 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +49 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +24 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +70 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +11 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +9 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +18 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +32 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +15 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +6 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js +6 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +29 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +6 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +8 -0
- package/dist/patterns/tree-view/tree-view.d.ts.map +1 -1
- package/dist/patterns/tree-view/tree-view.js +32 -38
- package/dist/primitives/button/button-utility.d.ts +43 -0
- package/dist/primitives/button/button-utility.d.ts.map +1 -0
- package/dist/primitives/button/button-utility.js +79 -0
- package/dist/primitives/button/index.d.ts +2 -1
- package/dist/primitives/button/index.d.ts.map +1 -1
- package/dist/primitives/custom-icon/custom-icon.d.ts +14 -0
- package/dist/primitives/custom-icon/custom-icon.d.ts.map +1 -0
- package/dist/primitives/custom-icon/custom-icon.js +29 -0
- package/dist/primitives/custom-icon/icons/Placeholder.d.ts +10 -0
- package/dist/primitives/custom-icon/icons/Placeholder.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/Placeholder.js +39 -0
- package/dist/primitives/custom-icon/icons/activity-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/activity-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/activity-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/activity-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/activity-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/activity-solid.js +43 -0
- package/dist/primitives/custom-icon/icons/ai-extraction.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/ai-extraction.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/ai-extraction.js +42 -0
- package/dist/primitives/custom-icon/icons/apps.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/apps.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/apps.js +54 -0
- package/dist/primitives/custom-icon/icons/arrows-rl.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/arrows-rl.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/arrows-rl.js +34 -0
- package/dist/primitives/custom-icon/icons/auto-number.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/auto-number.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/auto-number.js +34 -0
- package/dist/primitives/custom-icon/icons/branch-01.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/branch-01.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/branch-01.js +34 -0
- package/dist/primitives/custom-icon/icons/branch-02.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/branch-02.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/branch-02.js +34 -0
- package/dist/primitives/custom-icon/icons/branch.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/branch.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/branch.js +31 -0
- package/dist/primitives/custom-icon/icons/calendar.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/calendar.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/calendar.js +42 -0
- package/dist/primitives/custom-icon/icons/callable.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/callable.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/callable.js +31 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-outline.js +46 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid.js +31 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid1.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid1.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/check-circle-broken-solid1.js +43 -0
- package/dist/primitives/custom-icon/icons/clear-cure.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/clear-cure.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/clear-cure.js +44 -0
- package/dist/primitives/custom-icon/icons/code-node.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/code-node.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/code-node.js +33 -0
- package/dist/primitives/custom-icon/icons/collapse-left.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/collapse-left.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/collapse-left.js +34 -0
- package/dist/primitives/custom-icon/icons/collapse-right.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/collapse-right.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/collapse-right.js +34 -0
- package/dist/primitives/custom-icon/icons/file-04-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-04-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-04-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/file-04-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-04-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-04-solid.js +33 -0
- package/dist/primitives/custom-icon/icons/file-edit.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-edit.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-edit.js +34 -0
- package/dist/primitives/custom-icon/icons/file-manager.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/file-manager.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/file-manager.js +31 -0
- package/dist/primitives/custom-icon/icons/formula.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/formula.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/formula.js +34 -0
- package/dist/primitives/custom-icon/icons/grid-plus.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/grid-plus.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/grid-plus.js +34 -0
- package/dist/primitives/custom-icon/icons/high.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/high.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/high.js +34 -0
- package/dist/primitives/custom-icon/icons/http-endpoint.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/http-endpoint.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/http-endpoint.js +31 -0
- package/dist/primitives/custom-icon/icons/if-else.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/if-else.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/if-else.js +31 -0
- package/dist/primitives/custom-icon/icons/integer.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/integer.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/integer.js +34 -0
- package/dist/primitives/custom-icon/icons/loop.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/loop.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/loop.js +56 -0
- package/dist/primitives/custom-icon/icons/low.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/low.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/low.js +34 -0
- package/dist/primitives/custom-icon/icons/mail-01-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/mail-01-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/mail-01-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/mail-01-solid.js +40 -0
- package/dist/primitives/custom-icon/icons/medium.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/medium.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/medium.js +34 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-outline.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-outline.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-outline.js +34 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/message-dots-square-solid.js +36 -0
- package/dist/primitives/custom-icon/icons/navigate.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/navigate.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/navigate.js +34 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-closed.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-closed.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-closed.js +31 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-open.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-open.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/nesting-arrow-open.js +31 -0
- package/dist/primitives/custom-icon/icons/object-manager.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/object-manager.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/object-manager.js +56 -0
- package/dist/primitives/custom-icon/icons/pibit-ai-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/pibit-ai-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/pibit-ai-solid.js +36 -0
- package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/plus-circle-solid.js +36 -0
- package/dist/primitives/custom-icon/icons/radio.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/radio.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/radio.js +47 -0
- package/dist/primitives/custom-icon/icons/resize.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/resize.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/resize.js +34 -0
- package/dist/primitives/custom-icon/icons/stop-circle.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/stop-circle.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/stop-circle.js +42 -0
- package/dist/primitives/custom-icon/icons/submission.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/submission.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/submission.js +31 -0
- package/dist/primitives/custom-icon/icons/swap.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/swap.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/swap.js +34 -0
- package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-down-solid.js +40 -0
- package/dist/primitives/custom-icon/icons/thumbs-down.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-down.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-down.js +34 -0
- package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-up-solid.js +40 -0
- package/dist/primitives/custom-icon/icons/thumbs-up.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/thumbs-up.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/thumbs-up.js +34 -0
- package/dist/primitives/custom-icon/icons/variable-node.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/variable-node.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/variable-node.js +42 -0
- package/dist/primitives/custom-icon/icons/webhook.d.ts +6 -0
- package/dist/primitives/custom-icon/icons/webhook.d.ts.map +1 -0
- package/dist/primitives/custom-icon/icons/webhook.js +47 -0
- package/dist/primitives/custom-icon/index.d.ts +3 -0
- package/dist/primitives/custom-icon/index.d.ts.map +1 -0
- package/dist/primitives/custom-icon/registry.d.ts +110 -0
- package/dist/primitives/custom-icon/registry.d.ts.map +1 -0
- package/dist/primitives/custom-icon/registry.js +111 -0
- package/dist/primitives/heading/heading.d.ts +1 -1
- package/dist/primitives/input/hint-text.d.ts +15 -0
- package/dist/primitives/input/hint-text.d.ts.map +1 -0
- package/dist/primitives/input/hint-text.js +31 -0
- package/dist/primitives/input/input.d.ts +72 -27
- package/dist/primitives/input/input.d.ts.map +1 -1
- package/dist/primitives/input/input.js +385 -74
- package/dist/primitives/input/label.d.ts +15 -0
- package/dist/primitives/input/label.d.ts.map +1 -0
- package/dist/primitives/input/label.js +56 -0
- package/dist/primitives/select/ExpandableSearchInput.d.ts +15 -0
- package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -0
- package/dist/primitives/select/ExpandableSearchInput.js +115 -0
- package/dist/primitives/select/SearchInput.d.ts +26 -0
- package/dist/primitives/select/SearchInput.d.ts.map +1 -0
- package/dist/primitives/select/SearchInput.js +136 -0
- package/dist/primitives/select/combobox.d.ts +14 -0
- package/dist/primitives/select/combobox.d.ts.map +1 -0
- package/dist/primitives/select/combobox.js +231 -0
- package/dist/primitives/select/index.d.ts +6 -0
- package/dist/primitives/select/index.d.ts.map +1 -0
- package/dist/primitives/select/multi-select.d.ts +46 -0
- package/dist/primitives/select/multi-select.d.ts.map +1 -0
- package/dist/primitives/select/multi-select.js +306 -0
- package/dist/primitives/select/popover.d.ts +7 -0
- package/dist/primitives/select/popover.d.ts.map +1 -0
- package/dist/primitives/select/popover.js +23 -0
- package/dist/primitives/select/searchable-select.d.ts +35 -0
- package/dist/primitives/select/searchable-select.d.ts.map +1 -0
- package/dist/primitives/select/searchable-select.js +239 -0
- package/dist/primitives/select/select-item.d.ts +8 -0
- package/dist/primitives/select/select-item.d.ts.map +1 -0
- package/dist/primitives/select/select-item.js +108 -0
- package/dist/primitives/select/select-native.d.ts +14 -0
- package/dist/primitives/select/select-native.d.ts.map +1 -0
- package/dist/primitives/select/select.d.ts +61 -0
- package/dist/primitives/select/select.d.ts.map +1 -0
- package/dist/primitives/select/select.js +208 -0
- package/dist/primitives/tags/base-components/tag-close-x.d.ts +9 -0
- package/dist/primitives/tags/base-components/tag-close-x.d.ts.map +1 -0
- package/dist/primitives/tags/base-components/tag-close-x.js +35 -0
- package/dist/primitives/text/text.d.ts +1 -1
- package/dist/primitives/tooltip/index.d.ts +2 -0
- package/dist/primitives/tooltip/index.d.ts.map +1 -0
- package/dist/primitives/tooltip/tooltip.d.ts +35 -0
- package/dist/primitives/tooltip/tooltip.d.ts.map +1 -0
- package/dist/primitives/tooltip/tooltip.js +104 -0
- package/dist/styles/components.css +1 -1
- package/package.json +1 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import a, { useContext as s, useState as l, useRef as f } from "react";
|
|
2
|
+
const c = {
|
|
3
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
4
|
+
current: 0
|
|
5
|
+
}, $ = /* @__PURE__ */ a.createContext(c), p = /* @__PURE__ */ a.createContext(!1);
|
|
6
|
+
let v = !!(typeof window < "u" && window.document && window.document.createElement), d = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
function S(t = !1) {
|
|
8
|
+
let e = s($), r = f(null);
|
|
9
|
+
if (r.current === null && !t) {
|
|
10
|
+
var n, u;
|
|
11
|
+
let o = (u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || u === void 0 || (n = u.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
|
|
12
|
+
if (o) {
|
|
13
|
+
let i = d.get(o);
|
|
14
|
+
i == null ? d.set(o, {
|
|
15
|
+
id: e.current,
|
|
16
|
+
state: o.memoizedState
|
|
17
|
+
}) : o.memoizedState !== i.state && (e.current = i.id, d.delete(o));
|
|
18
|
+
}
|
|
19
|
+
r.current = ++e.current;
|
|
20
|
+
}
|
|
21
|
+
return r.current;
|
|
22
|
+
}
|
|
23
|
+
function x(t) {
|
|
24
|
+
let e = s($);
|
|
25
|
+
e === c && !v && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
26
|
+
let r = S(!!t), n = e === c && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
|
27
|
+
return t || `${n}-${r}`;
|
|
28
|
+
}
|
|
29
|
+
function b(t) {
|
|
30
|
+
let e = a.useId(), [r] = l(y()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${c.prefix}`;
|
|
31
|
+
return t || `${n}-${e}`;
|
|
32
|
+
}
|
|
33
|
+
a.useId;
|
|
34
|
+
function m() {
|
|
35
|
+
return !1;
|
|
36
|
+
}
|
|
37
|
+
function w() {
|
|
38
|
+
return !0;
|
|
39
|
+
}
|
|
40
|
+
function g(t) {
|
|
41
|
+
return () => {
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function y() {
|
|
45
|
+
return typeof a.useSyncExternalStore == "function" ? a.useSyncExternalStore(g, m, w) : s(p);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
y as useIsSSR
|
|
49
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isShadowRoot as f } from "./domHelpers.js";
|
|
2
|
+
import { shadowDOM as o } from "../../../@react-stately/flags/dist/import.js";
|
|
3
|
+
function n(t, a) {
|
|
4
|
+
if (!o()) return a && t ? t.contains(a) : !1;
|
|
5
|
+
if (!t || !a) return !1;
|
|
6
|
+
let e = a;
|
|
7
|
+
for (; e !== null; ) {
|
|
8
|
+
if (e === t) return !0;
|
|
9
|
+
e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
|
|
10
|
+
}
|
|
11
|
+
return !1;
|
|
12
|
+
}
|
|
13
|
+
const s = (t = document) => {
|
|
14
|
+
var a;
|
|
15
|
+
if (!o()) return t.activeElement;
|
|
16
|
+
let e = t.activeElement;
|
|
17
|
+
for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
|
|
18
|
+
return e;
|
|
19
|
+
};
|
|
20
|
+
function d(t) {
|
|
21
|
+
return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
s as getActiveElement,
|
|
25
|
+
d as getEventTarget,
|
|
26
|
+
n as nodeContains
|
|
27
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { nodeContains as l } from "./DOMFunctions.js";
|
|
2
|
+
import { shadowDOM as h } from "../../../@react-stately/flags/dist/import.js";
|
|
3
|
+
class u {
|
|
4
|
+
get currentNode() {
|
|
5
|
+
return this._currentNode;
|
|
6
|
+
}
|
|
7
|
+
set currentNode(t) {
|
|
8
|
+
if (!l(this.root, t)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
|
|
9
|
+
const e = [];
|
|
10
|
+
let r = t, o = t;
|
|
11
|
+
for (this._currentNode = t; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
12
|
+
const s = r, n = this._doc.createTreeWalker(s, this.whatToShow, {
|
|
13
|
+
acceptNode: this._acceptNode
|
|
14
|
+
});
|
|
15
|
+
e.push(n), n.currentNode = o, this._currentSetFor.add(n), r = o = s.host;
|
|
16
|
+
} else r = r.parentNode;
|
|
17
|
+
const i = this._doc.createTreeWalker(this.root, this.whatToShow, {
|
|
18
|
+
acceptNode: this._acceptNode
|
|
19
|
+
});
|
|
20
|
+
e.push(i), i.currentNode = o, this._currentSetFor.add(i), this._walkerStack = e;
|
|
21
|
+
}
|
|
22
|
+
get doc() {
|
|
23
|
+
return this._doc;
|
|
24
|
+
}
|
|
25
|
+
firstChild() {
|
|
26
|
+
let t = this.currentNode, e = this.nextNode();
|
|
27
|
+
return l(t, e) ? (e && (this.currentNode = e), e) : (this.currentNode = t, null);
|
|
28
|
+
}
|
|
29
|
+
lastChild() {
|
|
30
|
+
let e = this._walkerStack[0].lastChild();
|
|
31
|
+
return e && (this.currentNode = e), e;
|
|
32
|
+
}
|
|
33
|
+
nextNode() {
|
|
34
|
+
const t = this._walkerStack[0].nextNode();
|
|
35
|
+
if (t) {
|
|
36
|
+
if (t.shadowRoot) {
|
|
37
|
+
var e;
|
|
38
|
+
let o;
|
|
39
|
+
if (typeof this.filter == "function" ? o = this.filter(t) : !((e = this.filter) === null || e === void 0) && e.acceptNode && (o = this.filter.acceptNode(t)), o === NodeFilter.FILTER_ACCEPT)
|
|
40
|
+
return this.currentNode = t, t;
|
|
41
|
+
let i = this.nextNode();
|
|
42
|
+
return i && (this.currentNode = i), i;
|
|
43
|
+
}
|
|
44
|
+
return t && (this.currentNode = t), t;
|
|
45
|
+
} else if (this._walkerStack.length > 1) {
|
|
46
|
+
this._walkerStack.shift();
|
|
47
|
+
let r = this.nextNode();
|
|
48
|
+
return r && (this.currentNode = r), r;
|
|
49
|
+
} else return null;
|
|
50
|
+
}
|
|
51
|
+
previousNode() {
|
|
52
|
+
const t = this._walkerStack[0];
|
|
53
|
+
if (t.currentNode === t.root) {
|
|
54
|
+
if (this._currentSetFor.has(t))
|
|
55
|
+
if (this._currentSetFor.delete(t), this._walkerStack.length > 1) {
|
|
56
|
+
this._walkerStack.shift();
|
|
57
|
+
let o = this.previousNode();
|
|
58
|
+
return o && (this.currentNode = o), o;
|
|
59
|
+
} else return null;
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const e = t.previousNode();
|
|
63
|
+
if (e) {
|
|
64
|
+
if (e.shadowRoot) {
|
|
65
|
+
var r;
|
|
66
|
+
let i;
|
|
67
|
+
if (typeof this.filter == "function" ? i = this.filter(e) : !((r = this.filter) === null || r === void 0) && r.acceptNode && (i = this.filter.acceptNode(e)), i === NodeFilter.FILTER_ACCEPT)
|
|
68
|
+
return e && (this.currentNode = e), e;
|
|
69
|
+
let s = this.lastChild();
|
|
70
|
+
return s && (this.currentNode = s), s;
|
|
71
|
+
}
|
|
72
|
+
return e && (this.currentNode = e), e;
|
|
73
|
+
} else if (this._walkerStack.length > 1) {
|
|
74
|
+
this._walkerStack.shift();
|
|
75
|
+
let o = this.previousNode();
|
|
76
|
+
return o && (this.currentNode = o), o;
|
|
77
|
+
} else return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated
|
|
81
|
+
*/
|
|
82
|
+
nextSibling() {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated
|
|
87
|
+
*/
|
|
88
|
+
previousSibling() {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated
|
|
93
|
+
*/
|
|
94
|
+
parentNode() {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
constructor(t, e, r, o) {
|
|
98
|
+
this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (s) => {
|
|
99
|
+
if (s.nodeType === Node.ELEMENT_NODE) {
|
|
100
|
+
const d = s.shadowRoot;
|
|
101
|
+
if (d) {
|
|
102
|
+
const a = this._doc.createTreeWalker(d, this.whatToShow, {
|
|
103
|
+
acceptNode: this._acceptNode
|
|
104
|
+
});
|
|
105
|
+
return this._walkerStack.unshift(a), NodeFilter.FILTER_ACCEPT;
|
|
106
|
+
} else {
|
|
107
|
+
var n;
|
|
108
|
+
if (typeof this.filter == "function") return this.filter(s);
|
|
109
|
+
if (!((n = this.filter) === null || n === void 0) && n.acceptNode) return this.filter.acceptNode(s);
|
|
110
|
+
if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return NodeFilter.FILTER_SKIP;
|
|
114
|
+
}, this._doc = t, this.root = e, this.filter = o ?? null, this.whatToShow = r ?? NodeFilter.SHOW_ALL, this._currentNode = e, this._walkerStack.unshift(t.createTreeWalker(e, r, this._acceptNode));
|
|
115
|
+
const i = e.shadowRoot;
|
|
116
|
+
if (i) {
|
|
117
|
+
const s = this._doc.createTreeWalker(i, this.whatToShow, {
|
|
118
|
+
acceptNode: this._acceptNode
|
|
119
|
+
});
|
|
120
|
+
this._walkerStack.unshift(s);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function w(c, t, e, r) {
|
|
125
|
+
return h() ? new u(c, t, e, r) : c.createTreeWalker(t, e, r);
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
u as ShadowTreeWalker,
|
|
129
|
+
w as createShadowTreeWalker
|
|
130
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const t = (o) => {
|
|
2
|
+
var n;
|
|
3
|
+
return (n = o == null ? void 0 : o.ownerDocument) !== null && n !== void 0 ? n : document;
|
|
4
|
+
}, e = (o) => o && "window" in o && o.window === o ? o : t(o).defaultView || window;
|
|
5
|
+
function d(o) {
|
|
6
|
+
return o !== null && typeof o == "object" && "nodeType" in o && typeof o.nodeType == "number";
|
|
7
|
+
}
|
|
8
|
+
function c(o) {
|
|
9
|
+
return d(o) && o.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in o;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
t as getOwnerDocument,
|
|
13
|
+
e as getOwnerWindow,
|
|
14
|
+
c as isShadowRoot
|
|
15
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function f(l) {
|
|
2
|
+
if (c()) l.focus({
|
|
3
|
+
preventScroll: !0
|
|
4
|
+
});
|
|
5
|
+
else {
|
|
6
|
+
let e = n(l);
|
|
7
|
+
l.focus(), s(e);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
let r = null;
|
|
11
|
+
function c() {
|
|
12
|
+
if (r == null) {
|
|
13
|
+
r = !1;
|
|
14
|
+
try {
|
|
15
|
+
document.createElement("div").focus({
|
|
16
|
+
get preventScroll() {
|
|
17
|
+
return r = !0, !0;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
} catch {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return r;
|
|
24
|
+
}
|
|
25
|
+
function n(l) {
|
|
26
|
+
let e = l.parentNode, o = [], t = document.scrollingElement || document.documentElement;
|
|
27
|
+
for (; e instanceof HTMLElement && e !== t; )
|
|
28
|
+
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && o.push({
|
|
29
|
+
element: e,
|
|
30
|
+
scrollTop: e.scrollTop,
|
|
31
|
+
scrollLeft: e.scrollLeft
|
|
32
|
+
}), e = e.parentNode;
|
|
33
|
+
return t instanceof HTMLElement && o.push({
|
|
34
|
+
element: t,
|
|
35
|
+
scrollTop: t.scrollTop,
|
|
36
|
+
scrollLeft: t.scrollLeft
|
|
37
|
+
}), o;
|
|
38
|
+
}
|
|
39
|
+
function s(l) {
|
|
40
|
+
for (let { element: e, scrollTop: o, scrollLeft: t } of l)
|
|
41
|
+
e.scrollTop = o, e.scrollLeft = t;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
f as focusWithoutScrolling
|
|
45
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getOwnerWindow as d } from "./domHelpers.js";
|
|
2
|
+
const c = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
3
|
+
function p(i) {
|
|
4
|
+
const t = d(i);
|
|
5
|
+
if (!(i instanceof t.HTMLElement) && !(i instanceof t.SVGElement)) return !1;
|
|
6
|
+
let { display: o, visibility: e } = i.style, a = o !== "none" && e !== "hidden" && e !== "collapse";
|
|
7
|
+
if (a) {
|
|
8
|
+
const { getComputedStyle: r } = i.ownerDocument.defaultView;
|
|
9
|
+
let { display: n, visibility: s } = r(i);
|
|
10
|
+
a = n !== "none" && s !== "hidden" && s !== "collapse";
|
|
11
|
+
}
|
|
12
|
+
return a;
|
|
13
|
+
}
|
|
14
|
+
function u(i, t) {
|
|
15
|
+
return !i.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
16
|
+
!i.hasAttribute("data-react-aria-prevent-focus") && (i.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? i.hasAttribute("open") : !0);
|
|
17
|
+
}
|
|
18
|
+
function f(i, t) {
|
|
19
|
+
return c ? i.checkVisibility({
|
|
20
|
+
visibilityProperty: !0
|
|
21
|
+
}) && !i.closest("[data-react-aria-prevent-focus]") : i.nodeName !== "#comment" && p(i) && u(i, t) && (!i.parentElement || f(i.parentElement, i));
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
f as isElementVisible
|
|
25
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { isElementVisible as n } from "./isElementVisible.js";
|
|
2
|
+
const t = [
|
|
3
|
+
"input:not([disabled]):not([type=hidden])",
|
|
4
|
+
"select:not([disabled])",
|
|
5
|
+
"textarea:not([disabled])",
|
|
6
|
+
"button:not([disabled])",
|
|
7
|
+
"a[href]",
|
|
8
|
+
"area[href]",
|
|
9
|
+
"summary",
|
|
10
|
+
"iframe",
|
|
11
|
+
"object",
|
|
12
|
+
"embed",
|
|
13
|
+
"audio[controls]",
|
|
14
|
+
"video[controls]",
|
|
15
|
+
'[contenteditable]:not([contenteditable^="false"])',
|
|
16
|
+
"permission"
|
|
17
|
+
], o = t.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
18
|
+
t.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
19
|
+
const i = t.join(':not([hidden]):not([tabindex="-1"]),');
|
|
20
|
+
function r(b) {
|
|
21
|
+
return b.matches(o) && n(b) && !a(b);
|
|
22
|
+
}
|
|
23
|
+
function s(b) {
|
|
24
|
+
return b.matches(i) && n(b) && !a(b);
|
|
25
|
+
}
|
|
26
|
+
function a(b) {
|
|
27
|
+
let e = b;
|
|
28
|
+
for (; e != null; ) {
|
|
29
|
+
if (e instanceof e.ownerDocument.defaultView.HTMLElement && e.inert) return !0;
|
|
30
|
+
e = e.parentElement;
|
|
31
|
+
}
|
|
32
|
+
return !1;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
r as isFocusable,
|
|
36
|
+
s as isTabbable
|
|
37
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { focusWithoutScrolling as f } from "./focusWithoutScrolling.js";
|
|
2
|
+
import { isFirefox as p, isWebKit as K, isMac as l, isIPad as $ } from "./platform.js";
|
|
3
|
+
import "react";
|
|
4
|
+
function o(e, c, d = !0) {
|
|
5
|
+
var t, a;
|
|
6
|
+
let { metaKey: i, ctrlKey: n, altKey: s, shiftKey: r } = c;
|
|
7
|
+
p() && (!((a = window.event) === null || a === void 0 || (t = a.type) === null || t === void 0) && t.startsWith("key")) && e.target === "_blank" && (l() ? i = !0 : n = !0);
|
|
8
|
+
let y = K() && l() && !$() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
9
|
+
keyIdentifier: "Enter",
|
|
10
|
+
metaKey: i,
|
|
11
|
+
ctrlKey: n,
|
|
12
|
+
altKey: s,
|
|
13
|
+
shiftKey: r
|
|
14
|
+
}) : new MouseEvent("click", {
|
|
15
|
+
metaKey: i,
|
|
16
|
+
ctrlKey: n,
|
|
17
|
+
altKey: s,
|
|
18
|
+
shiftKey: r,
|
|
19
|
+
detail: 1,
|
|
20
|
+
bubbles: !0,
|
|
21
|
+
cancelable: !0
|
|
22
|
+
});
|
|
23
|
+
o.isOpening = d, f(e), e.dispatchEvent(y), o.isOpening = !1;
|
|
24
|
+
}
|
|
25
|
+
o.isOpening = !1;
|
|
26
|
+
export {
|
|
27
|
+
o as openLink
|
|
28
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function a(t) {
|
|
2
|
+
var n;
|
|
3
|
+
if (typeof window > "u" || window.navigator == null) return !1;
|
|
4
|
+
let o = (n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.brands;
|
|
5
|
+
return Array.isArray(o) && o.some((s) => t.test(s.brand)) || t.test(window.navigator.userAgent);
|
|
6
|
+
}
|
|
7
|
+
function r(t) {
|
|
8
|
+
var n;
|
|
9
|
+
return typeof window < "u" && window.navigator != null ? t.test(((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.platform) || window.navigator.platform) : !1;
|
|
10
|
+
}
|
|
11
|
+
function e(t) {
|
|
12
|
+
if (process.env.NODE_ENV === "test") return t;
|
|
13
|
+
let n = null;
|
|
14
|
+
return () => (n == null && (n = t()), n);
|
|
15
|
+
}
|
|
16
|
+
const i = e(function() {
|
|
17
|
+
return r(/^Mac/i);
|
|
18
|
+
}), c = e(function() {
|
|
19
|
+
return r(/^iPhone/i);
|
|
20
|
+
}), u = e(function() {
|
|
21
|
+
return r(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
22
|
+
i() && navigator.maxTouchPoints > 1;
|
|
23
|
+
}), d = e(function() {
|
|
24
|
+
return c() || u();
|
|
25
|
+
});
|
|
26
|
+
e(function() {
|
|
27
|
+
return i() || d();
|
|
28
|
+
});
|
|
29
|
+
const f = e(function() {
|
|
30
|
+
return a(/AppleWebKit/i) && !$();
|
|
31
|
+
}), $ = e(function() {
|
|
32
|
+
return a(/Chrome/i);
|
|
33
|
+
}), l = e(function() {
|
|
34
|
+
return a(/Android/i);
|
|
35
|
+
}), w = e(function() {
|
|
36
|
+
return a(/Firefox/i);
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
l as isAndroid,
|
|
40
|
+
$ as isChrome,
|
|
41
|
+
w as isFirefox,
|
|
42
|
+
d as isIOS,
|
|
43
|
+
u as isIPad,
|
|
44
|
+
c as isIPhone,
|
|
45
|
+
i as isMac,
|
|
46
|
+
f as isWebKit
|
|
47
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
let r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
2
|
+
function o() {
|
|
3
|
+
if (typeof window > "u") return;
|
|
4
|
+
function t(e) {
|
|
5
|
+
return "propertyName" in e;
|
|
6
|
+
}
|
|
7
|
+
let d = (e) => {
|
|
8
|
+
if (!t(e) || !e.target) return;
|
|
9
|
+
let n = r.get(e.target);
|
|
10
|
+
n || (n = /* @__PURE__ */ new Set(), r.set(e.target, n), e.target.addEventListener("transitioncancel", i, {
|
|
11
|
+
once: !0
|
|
12
|
+
})), n.add(e.propertyName);
|
|
13
|
+
}, i = (e) => {
|
|
14
|
+
if (!t(e) || !e.target) return;
|
|
15
|
+
let n = r.get(e.target);
|
|
16
|
+
if (n && (n.delete(e.propertyName), n.size === 0 && (e.target.removeEventListener("transitioncancel", i), r.delete(e.target)), r.size === 0)) {
|
|
17
|
+
for (let s of a) s();
|
|
18
|
+
a.clear();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
document.body.addEventListener("transitionrun", d), document.body.addEventListener("transitionend", i);
|
|
22
|
+
}
|
|
23
|
+
typeof document < "u" && (document.readyState !== "loading" ? o() : document.addEventListener("DOMContentLoaded", o));
|
|
24
|
+
function c() {
|
|
25
|
+
for (const [t] of r)
|
|
26
|
+
"isConnected" in t && !t.isConnected && r.delete(t);
|
|
27
|
+
}
|
|
28
|
+
function f(t) {
|
|
29
|
+
requestAnimationFrame(() => {
|
|
30
|
+
c(), r.size === 0 ? t() : a.add(t);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
f as runAfterTransition
|
|
35
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { useState as K, useMemo as x } from "react";
|
|
2
|
+
function g(s) {
|
|
3
|
+
let { initialItems: f = [], initialSelectedKeys: d, getKey: r = (o) => {
|
|
4
|
+
var m;
|
|
5
|
+
return (m = o.id) !== null && m !== void 0 ? m : o.key;
|
|
6
|
+
}, filter: t, initialFilterText: e = "" } = s, [l, i] = K({
|
|
7
|
+
items: f,
|
|
8
|
+
selectedKeys: d === "all" ? "all" : new Set(d || []),
|
|
9
|
+
filterText: e
|
|
10
|
+
}), n = x(() => t ? l.items.filter((o) => t(o, l.filterText)) : l.items, [
|
|
11
|
+
l.items,
|
|
12
|
+
l.filterText,
|
|
13
|
+
t
|
|
14
|
+
]);
|
|
15
|
+
return {
|
|
16
|
+
...l,
|
|
17
|
+
items: n,
|
|
18
|
+
...S({
|
|
19
|
+
getKey: r
|
|
20
|
+
}, i),
|
|
21
|
+
getItem(o) {
|
|
22
|
+
return l.items.find((m) => r(m) === o);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function S(s, f) {
|
|
27
|
+
let { cursor: d, getKey: r } = s;
|
|
28
|
+
return {
|
|
29
|
+
setSelectedKeys(t) {
|
|
30
|
+
f((e) => ({
|
|
31
|
+
...e,
|
|
32
|
+
selectedKeys: t
|
|
33
|
+
}));
|
|
34
|
+
},
|
|
35
|
+
addKeysToSelection(t) {
|
|
36
|
+
f((e) => e.selectedKeys === "all" ? e : t === "all" ? {
|
|
37
|
+
...e,
|
|
38
|
+
selectedKeys: "all"
|
|
39
|
+
} : {
|
|
40
|
+
...e,
|
|
41
|
+
selectedKeys: /* @__PURE__ */ new Set([
|
|
42
|
+
...e.selectedKeys,
|
|
43
|
+
...t
|
|
44
|
+
])
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
removeKeysFromSelection(t) {
|
|
48
|
+
f((e) => {
|
|
49
|
+
if (t === "all") return {
|
|
50
|
+
...e,
|
|
51
|
+
selectedKeys: /* @__PURE__ */ new Set()
|
|
52
|
+
};
|
|
53
|
+
let l = e.selectedKeys === "all" ? new Set(e.items.map(r)) : new Set(e.selectedKeys);
|
|
54
|
+
for (let i of t) l.delete(i);
|
|
55
|
+
return {
|
|
56
|
+
...e,
|
|
57
|
+
selectedKeys: l
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
setFilterText(t) {
|
|
62
|
+
f((e) => ({
|
|
63
|
+
...e,
|
|
64
|
+
filterText: t
|
|
65
|
+
}));
|
|
66
|
+
},
|
|
67
|
+
insert(t, ...e) {
|
|
68
|
+
f((l) => u(l, t, ...e));
|
|
69
|
+
},
|
|
70
|
+
insertBefore(t, ...e) {
|
|
71
|
+
f((l) => {
|
|
72
|
+
let i = l.items.findIndex((n) => (r == null ? void 0 : r(n)) === t);
|
|
73
|
+
if (i === -1)
|
|
74
|
+
if (l.items.length === 0) i = 0;
|
|
75
|
+
else return l;
|
|
76
|
+
return u(l, i, ...e);
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
insertAfter(t, ...e) {
|
|
80
|
+
f((l) => {
|
|
81
|
+
let i = l.items.findIndex((n) => (r == null ? void 0 : r(n)) === t);
|
|
82
|
+
if (i === -1)
|
|
83
|
+
if (l.items.length === 0) i = 0;
|
|
84
|
+
else return l;
|
|
85
|
+
return u(l, i + 1, ...e);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
prepend(...t) {
|
|
89
|
+
f((e) => u(e, 0, ...t));
|
|
90
|
+
},
|
|
91
|
+
append(...t) {
|
|
92
|
+
f((e) => u(e, e.items.length, ...t));
|
|
93
|
+
},
|
|
94
|
+
remove(...t) {
|
|
95
|
+
f((e) => {
|
|
96
|
+
let l = new Set(t), i = e.items.filter((o) => !l.has(r(o))), n = "all";
|
|
97
|
+
if (e.selectedKeys !== "all") {
|
|
98
|
+
n = new Set(e.selectedKeys);
|
|
99
|
+
for (let o of t) n.delete(o);
|
|
100
|
+
}
|
|
101
|
+
return d == null && i.length === 0 && (n = /* @__PURE__ */ new Set()), {
|
|
102
|
+
...e,
|
|
103
|
+
items: i,
|
|
104
|
+
selectedKeys: n
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
removeSelectedItems() {
|
|
109
|
+
f((t) => {
|
|
110
|
+
if (t.selectedKeys === "all") return {
|
|
111
|
+
...t,
|
|
112
|
+
items: [],
|
|
113
|
+
selectedKeys: /* @__PURE__ */ new Set()
|
|
114
|
+
};
|
|
115
|
+
let e = t.selectedKeys, l = t.items.filter((i) => !e.has(r(i)));
|
|
116
|
+
return {
|
|
117
|
+
...t,
|
|
118
|
+
items: l,
|
|
119
|
+
selectedKeys: /* @__PURE__ */ new Set()
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
move(t, e) {
|
|
124
|
+
f((l) => {
|
|
125
|
+
let i = l.items.findIndex((m) => r(m) === t);
|
|
126
|
+
if (i === -1) return l;
|
|
127
|
+
let n = l.items.slice(), [o] = n.splice(i, 1);
|
|
128
|
+
return n.splice(e, 0, o), {
|
|
129
|
+
...l,
|
|
130
|
+
items: n
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
moveBefore(t, e) {
|
|
135
|
+
f((l) => {
|
|
136
|
+
let i = l.items.findIndex((m) => r(m) === t);
|
|
137
|
+
if (i === -1) return l;
|
|
138
|
+
let o = (Array.isArray(e) ? e : [
|
|
139
|
+
...e
|
|
140
|
+
]).map((m) => l.items.findIndex((c) => r(c) === m)).sort((m, c) => m - c);
|
|
141
|
+
return y(l, o, i);
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
moveAfter(t, e) {
|
|
145
|
+
f((l) => {
|
|
146
|
+
let i = l.items.findIndex((m) => r(m) === t);
|
|
147
|
+
if (i === -1) return l;
|
|
148
|
+
let o = (Array.isArray(e) ? e : [
|
|
149
|
+
...e
|
|
150
|
+
]).map((m) => l.items.findIndex((c) => r(c) === m)).sort((m, c) => m - c);
|
|
151
|
+
return y(l, o, i + 1);
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
update(t, e) {
|
|
155
|
+
f((l) => {
|
|
156
|
+
let i = l.items.findIndex((o) => r(o) === t);
|
|
157
|
+
if (i === -1) return l;
|
|
158
|
+
let n;
|
|
159
|
+
return typeof e == "function" ? n = e(l.items[i]) : n = e, {
|
|
160
|
+
...l,
|
|
161
|
+
items: [
|
|
162
|
+
...l.items.slice(0, i),
|
|
163
|
+
n,
|
|
164
|
+
...l.items.slice(i + 1)
|
|
165
|
+
]
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function u(s, f, ...d) {
|
|
172
|
+
return {
|
|
173
|
+
...s,
|
|
174
|
+
items: [
|
|
175
|
+
...s.items.slice(0, f),
|
|
176
|
+
...d,
|
|
177
|
+
...s.items.slice(f)
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function y(s, f, d) {
|
|
182
|
+
d -= f.filter((e) => e < d).length;
|
|
183
|
+
let r = f.map((e) => ({
|
|
184
|
+
from: e,
|
|
185
|
+
to: d++
|
|
186
|
+
}));
|
|
187
|
+
for (let e = 0; e < r.length; e++) {
|
|
188
|
+
let l = r[e].from;
|
|
189
|
+
for (let i = e; i < r.length; i++)
|
|
190
|
+
r[i].from > l && r[i].from--;
|
|
191
|
+
}
|
|
192
|
+
for (let e = 0; e < r.length; e++) {
|
|
193
|
+
let l = r[e];
|
|
194
|
+
for (let i = r.length - 1; i > e; i--) {
|
|
195
|
+
let n = r[i];
|
|
196
|
+
n.from < l.to ? l.to++ : n.from++;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
let t = s.items.slice();
|
|
200
|
+
for (let e of r) {
|
|
201
|
+
let [l] = t.splice(e.from, 1);
|
|
202
|
+
t.splice(e.to, 0, l);
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
...s,
|
|
206
|
+
items: t
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export {
|
|
210
|
+
S as createListActions,
|
|
211
|
+
g as useListData
|
|
212
|
+
};
|