@qualcomm-ui/react-core 1.0.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/LICENSE.txt +31 -0
- package/dist/accordion/accordion-context.d.ts +5 -0
- package/dist/accordion/accordion-context.d.ts.map +1 -0
- package/dist/accordion/index.d.ts +3 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/index.js.map +7 -0
- package/dist/accordion/use-accordion.d.ts +10 -0
- package/dist/accordion/use-accordion.d.ts.map +1 -0
- package/dist/avatar/avatar-context.d.ts +3 -0
- package/dist/avatar/avatar-context.d.ts.map +1 -0
- package/dist/avatar/index.d.ts +3 -0
- package/dist/avatar/index.d.ts.map +1 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/index.js.map +7 -0
- package/dist/avatar/use-avatar.d.ts +7 -0
- package/dist/avatar/use-avatar.d.ts.map +1 -0
- package/dist/checkbox/checkbox-context.d.ts +5 -0
- package/dist/checkbox/checkbox-context.d.ts.map +1 -0
- package/dist/checkbox/index.d.ts +3 -0
- package/dist/checkbox/index.d.ts.map +1 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/index.js.map +7 -0
- package/dist/checkbox/use-checkbox.d.ts +13 -0
- package/dist/checkbox/use-checkbox.d.ts.map +1 -0
- package/dist/classes/index.d.ts +2 -0
- package/dist/classes/index.d.ts.map +1 -0
- package/dist/classes/index.js +2 -0
- package/dist/classes/index.js.map +7 -0
- package/dist/classes/state-classes.d.ts +4 -0
- package/dist/classes/state-classes.d.ts.map +1 -0
- package/dist/collapsible/collapsible-context.d.ts +3 -0
- package/dist/collapsible/collapsible-context.d.ts.map +1 -0
- package/dist/collapsible/core-collapsible.d.ts +43 -0
- package/dist/collapsible/core-collapsible.d.ts.map +1 -0
- package/dist/collapsible/index.d.ts +12 -0
- package/dist/collapsible/index.d.ts.map +1 -0
- package/dist/collapsible/index.js +2 -0
- package/dist/collapsible/index.js.map +7 -0
- package/dist/collection/index.d.ts +3 -0
- package/dist/collection/index.d.ts.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +7 -0
- package/dist/collection/use-async-list-collection.d.ts +38 -0
- package/dist/collection/use-async-list-collection.d.ts.map +1 -0
- package/dist/collection/use-list-collection.d.ts +88 -0
- package/dist/collection/use-list-collection.d.ts.map +1 -0
- package/dist/combobox/combobox-context.d.ts +3 -0
- package/dist/combobox/combobox-context.d.ts.map +1 -0
- package/dist/combobox/combobox-item-context.d.ts +3 -0
- package/dist/combobox/combobox-item-context.d.ts.map +1 -0
- package/dist/combobox/combobox-item-group-context.d.ts +3 -0
- package/dist/combobox/combobox-item-group-context.d.ts.map +1 -0
- package/dist/combobox/core-combobox.d.ts +62 -0
- package/dist/combobox/core-combobox.d.ts.map +1 -0
- package/dist/combobox/index.d.ts +26 -0
- package/dist/combobox/index.d.ts.map +1 -0
- package/dist/combobox/index.js +2 -0
- package/dist/combobox/index.js.map +7 -0
- package/dist/context/create-guarded-context.d.ts +19 -0
- package/dist/context/create-guarded-context.d.ts.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +2 -0
- package/dist/context/index.js.map +7 -0
- package/dist/context/use-context-id.d.ts +29 -0
- package/dist/context/use-context-id.d.ts.map +1 -0
- package/dist/descendants/index.d.ts +2 -0
- package/dist/descendants/index.d.ts.map +1 -0
- package/dist/descendants/index.js +2 -0
- package/dist/descendants/index.js.map +7 -0
- package/dist/descendants/use-descendants.d.ts +10 -0
- package/dist/descendants/use-descendants.d.ts.map +1 -0
- package/dist/dialog/core-dialog.d.ts +81 -0
- package/dist/dialog/core-dialog.d.ts.map +1 -0
- package/dist/dialog/dialog-context.d.ts +3 -0
- package/dist/dialog/dialog-context.d.ts.map +1 -0
- package/dist/dialog/index.d.ts +17 -0
- package/dist/dialog/index.d.ts.map +1 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog/index.js.map +7 -0
- package/dist/dom/get-valid-children.d.ts +9 -0
- package/dist/dom/get-valid-children.d.ts.map +1 -0
- package/dist/dom/index.d.ts +10 -0
- package/dist/dom/index.d.ts.map +1 -0
- package/dist/dom/index.js +2 -0
- package/dist/dom/index.js.map +7 -0
- package/dist/dom/is-action-element.d.ts +2 -0
- package/dist/dom/is-action-element.d.ts.map +1 -0
- package/dist/dom/use-clickable.d.ts +52 -0
- package/dist/dom/use-clickable.d.ts.map +1 -0
- package/dist/dom/use-event-listeners.d.ts +9 -0
- package/dist/dom/use-event-listeners.d.ts.map +1 -0
- package/dist/dom/use-grouped-children.d.ts +21 -0
- package/dist/dom/use-grouped-children.d.ts.map +1 -0
- package/dist/dom/use-intersection-observer.d.ts +72 -0
- package/dist/dom/use-intersection-observer.d.ts.map +1 -0
- package/dist/dom/use-mutation-observer.d.ts +12 -0
- package/dist/dom/use-mutation-observer.d.ts.map +1 -0
- package/dist/dom/use-real-shape.d.ts +9 -0
- package/dist/dom/use-real-shape.d.ts.map +1 -0
- package/dist/dom/use-sizes.d.ts +20 -0
- package/dist/dom/use-sizes.d.ts.map +1 -0
- package/dist/effects/index.d.ts +8 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.js +2 -0
- package/dist/effects/index.js.map +7 -0
- package/dist/effects/use-debounce.d.ts +8 -0
- package/dist/effects/use-debounce.d.ts.map +1 -0
- package/dist/effects/use-effect-once.d.ts +2 -0
- package/dist/effects/use-effect-once.d.ts.map +1 -0
- package/dist/effects/use-enhanced-effect.d.ts +6 -0
- package/dist/effects/use-enhanced-effect.d.ts.map +1 -0
- package/dist/effects/use-event-callback.d.ts +8 -0
- package/dist/effects/use-event-callback.d.ts.map +1 -0
- package/dist/effects/use-on-destroy-when.d.ts +14 -0
- package/dist/effects/use-on-destroy-when.d.ts.map +1 -0
- package/dist/effects/use-on-destroy.d.ts +12 -0
- package/dist/effects/use-on-destroy.d.ts.map +1 -0
- package/dist/effects/use-safe-layout-effect.d.ts +3 -0
- package/dist/effects/use-safe-layout-effect.d.ts.map +1 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +2 -0
- package/dist/events/index.js.map +7 -0
- package/dist/events/use-event.d.ts +12 -0
- package/dist/events/use-event.d.ts.map +1 -0
- package/dist/field/field-context.d.ts +5 -0
- package/dist/field/field-context.d.ts.map +1 -0
- package/dist/field/fieldset-context.d.ts +10 -0
- package/dist/field/fieldset-context.d.ts.map +1 -0
- package/dist/field/index.d.ts +5 -0
- package/dist/field/index.d.ts.map +1 -0
- package/dist/field/index.js +2 -0
- package/dist/field/index.js.map +7 -0
- package/dist/field/use-field.d.ts +9 -0
- package/dist/field/use-field.d.ts.map +1 -0
- package/dist/field/use-fieldset.d.ts +4 -0
- package/dist/field/use-fieldset.d.ts.map +1 -0
- package/dist/highlight/highlight-text.d.ts +6 -0
- package/dist/highlight/highlight-text.d.ts.map +1 -0
- package/dist/highlight/index.d.ts +3 -0
- package/dist/highlight/index.d.ts.map +1 -0
- package/dist/highlight/index.js +2 -0
- package/dist/highlight/index.js.map +7 -0
- package/dist/highlight/use-highlight.d.ts +6 -0
- package/dist/highlight/use-highlight.d.ts.map +1 -0
- package/dist/inline-notification/core-inline-notification.d.ts +25 -0
- package/dist/inline-notification/core-inline-notification.d.ts.map +1 -0
- package/dist/inline-notification/index.d.ts +11 -0
- package/dist/inline-notification/index.d.ts.map +1 -0
- package/dist/inline-notification/index.js +2 -0
- package/dist/inline-notification/index.js.map +7 -0
- package/dist/inline-notification/inline-notification-context.d.ts +3 -0
- package/dist/inline-notification/inline-notification-context.d.ts.map +1 -0
- package/dist/inline-notification/use-inline-notification.d.ts +4 -0
- package/dist/inline-notification/use-inline-notification.d.ts.map +1 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/index.d.ts.map +1 -0
- package/dist/locale/index.js +2 -0
- package/dist/locale/index.js.map +7 -0
- package/dist/locale/locale-context.d.ts +3 -0
- package/dist/locale/locale-context.d.ts.map +1 -0
- package/dist/locale/use-filter.d.ts +7 -0
- package/dist/locale/use-filter.d.ts.map +1 -0
- package/dist/lorem-ipsum/index.d.ts +2 -0
- package/dist/lorem-ipsum/index.d.ts.map +1 -0
- package/dist/lorem-ipsum/index.js +2 -0
- package/dist/lorem-ipsum/index.js.map +7 -0
- package/dist/lorem-ipsum/lorem-ipsum.d.ts +10 -0
- package/dist/lorem-ipsum/lorem-ipsum.d.ts.map +1 -0
- package/dist/lucide/icon.types.d.ts +15 -0
- package/dist/lucide/icon.types.d.ts.map +1 -0
- package/dist/lucide/index.d.ts +2 -0
- package/dist/lucide/index.d.ts.map +1 -0
- package/dist/lucide/index.js +1 -0
- package/dist/lucide/index.js.map +7 -0
- package/dist/machine/index.d.ts +9 -0
- package/dist/machine/index.d.ts.map +1 -0
- package/dist/machine/index.js +2 -0
- package/dist/machine/index.js.map +7 -0
- package/dist/machine/normalize-props.d.ts +2 -0
- package/dist/machine/normalize-props.d.ts.map +1 -0
- package/dist/machine/use-bindable-id-collection.d.ts +3 -0
- package/dist/machine/use-bindable-id-collection.d.ts.map +1 -0
- package/dist/machine/use-bindable-id.d.ts +3 -0
- package/dist/machine/use-bindable-id.d.ts.map +1 -0
- package/dist/machine/use-bindable.d.ts +3 -0
- package/dist/machine/use-bindable.d.ts.map +1 -0
- package/dist/machine/use-machine.d.ts +11 -0
- package/dist/machine/use-machine.d.ts.map +1 -0
- package/dist/machine/use-optional-content-id.d.ts +11 -0
- package/dist/machine/use-optional-content-id.d.ts.map +1 -0
- package/dist/machine/use-prop.d.ts +15 -0
- package/dist/machine/use-prop.d.ts.map +1 -0
- package/dist/machine/use-track.d.ts +2 -0
- package/dist/machine/use-track.d.ts.map +1 -0
- package/dist/menu/index.d.ts +8 -0
- package/dist/menu/index.d.ts.map +1 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/index.js.map +7 -0
- package/dist/menu/menu-context.d.ts +16 -0
- package/dist/menu/menu-context.d.ts.map +1 -0
- package/dist/menu/menu-item-context.d.ts +4 -0
- package/dist/menu/menu-item-context.d.ts.map +1 -0
- package/dist/menu/menu-item-group-context.d.ts +4 -0
- package/dist/menu/menu-item-group-context.d.ts.map +1 -0
- package/dist/menu/menu-machine-context.d.ts +4 -0
- package/dist/menu/menu-machine-context.d.ts.map +1 -0
- package/dist/menu/menu-trigger-context.d.ts +3 -0
- package/dist/menu/menu-trigger-context.d.ts.map +1 -0
- package/dist/menu/use-menu-item.d.ts +38 -0
- package/dist/menu/use-menu-item.d.ts.map +1 -0
- package/dist/menu/use-menu.d.ts +22 -0
- package/dist/menu/use-menu.d.ts.map +1 -0
- package/dist/number-input/core-number-input.d.ts +57 -0
- package/dist/number-input/core-number-input.d.ts.map +1 -0
- package/dist/number-input/index.d.ts +16 -0
- package/dist/number-input/index.d.ts.map +1 -0
- package/dist/number-input/index.js +2 -0
- package/dist/number-input/index.js.map +7 -0
- package/dist/number-input/number-input-context.d.ts +3 -0
- package/dist/number-input/number-input-context.d.ts.map +1 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.d.ts.map +1 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/index.js.map +7 -0
- package/dist/pagination/pagination-context.d.ts +3 -0
- package/dist/pagination/pagination-context.d.ts.map +1 -0
- package/dist/pagination/use-pagination.d.ts +25 -0
- package/dist/pagination/use-pagination.d.ts.map +1 -0
- package/dist/password-input/index.d.ts +3 -0
- package/dist/password-input/index.d.ts.map +1 -0
- package/dist/password-input/index.js +2 -0
- package/dist/password-input/index.js.map +7 -0
- package/dist/password-input/password-input-context.d.ts +3 -0
- package/dist/password-input/password-input-context.d.ts.map +1 -0
- package/dist/password-input/use-password-input.d.ts +12 -0
- package/dist/password-input/use-password-input.d.ts.map +1 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.d.ts.map +1 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/index.js.map +7 -0
- package/dist/popover/popover-context.d.ts +3 -0
- package/dist/popover/popover-context.d.ts.map +1 -0
- package/dist/popover/use-popover.d.ts +12 -0
- package/dist/popover/use-popover.d.ts.map +1 -0
- package/dist/portal/index.d.ts +3 -0
- package/dist/portal/index.d.ts.map +1 -0
- package/dist/portal/index.js +2 -0
- package/dist/portal/index.js.map +7 -0
- package/dist/portal/portal-context.d.ts +10 -0
- package/dist/portal/portal-context.d.ts.map +1 -0
- package/dist/portal/portal.d.ts +19 -0
- package/dist/portal/portal.d.ts.map +1 -0
- package/dist/position/index.d.ts +2 -0
- package/dist/position/index.d.ts.map +1 -0
- package/dist/position/index.js +1 -0
- package/dist/position/index.js.map +7 -0
- package/dist/position/position.types.d.ts +2 -0
- package/dist/position/position.types.d.ts.map +1 -0
- package/dist/presence/index.d.ts +5 -0
- package/dist/presence/index.d.ts.map +1 -0
- package/dist/presence/index.js +2 -0
- package/dist/presence/index.js.map +7 -0
- package/dist/presence/presence-context.d.ts +3 -0
- package/dist/presence/presence-context.d.ts.map +1 -0
- package/dist/presence/presence.d.ts +11 -0
- package/dist/presence/presence.d.ts.map +1 -0
- package/dist/presence/render-strategy.d.ts +3 -0
- package/dist/presence/render-strategy.d.ts.map +1 -0
- package/dist/presence/use-presence.d.ts +18 -0
- package/dist/presence/use-presence.d.ts.map +1 -0
- package/dist/progress/core-progress.d.ts +53 -0
- package/dist/progress/core-progress.d.ts.map +1 -0
- package/dist/progress/index.d.ts +14 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/index.js.map +7 -0
- package/dist/progress/progress-context.d.ts +3 -0
- package/dist/progress/progress-context.d.ts.map +1 -0
- package/dist/progress-ring/core-progress-ring.d.ts +45 -0
- package/dist/progress-ring/core-progress-ring.d.ts.map +1 -0
- package/dist/progress-ring/index.d.ts +14 -0
- package/dist/progress-ring/index.d.ts.map +1 -0
- package/dist/progress-ring/index.js +2 -0
- package/dist/progress-ring/index.js.map +7 -0
- package/dist/progress-ring/progress-ring-context.d.ts +3 -0
- package/dist/progress-ring/progress-ring-context.d.ts.map +1 -0
- package/dist/props/index.d.ts +2 -0
- package/dist/props/index.d.ts.map +1 -0
- package/dist/props/index.js +2 -0
- package/dist/props/index.js.map +7 -0
- package/dist/props/use-previous-props.d.ts +2 -0
- package/dist/props/use-previous-props.d.ts.map +1 -0
- package/dist/radio/index.d.ts +3 -0
- package/dist/radio/index.d.ts.map +1 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/index.js.map +7 -0
- package/dist/radio/radio-context.d.ts +4 -0
- package/dist/radio/radio-context.d.ts.map +1 -0
- package/dist/radio/use-radio.d.ts +14 -0
- package/dist/radio/use-radio.d.ts.map +1 -0
- package/dist/refs/compose-refs.d.ts +5 -0
- package/dist/refs/compose-refs.d.ts.map +1 -0
- package/dist/refs/get-child-ref.d.ts +4 -0
- package/dist/refs/get-child-ref.d.ts.map +1 -0
- package/dist/refs/index.d.ts +5 -0
- package/dist/refs/index.d.ts.map +1 -0
- package/dist/refs/index.js +2 -0
- package/dist/refs/index.js.map +7 -0
- package/dist/refs/set-ref.d.ts +15 -0
- package/dist/refs/set-ref.d.ts.map +1 -0
- package/dist/refs/use-merged-ref.d.ts +9 -0
- package/dist/refs/use-merged-ref.d.ts.map +1 -0
- package/dist/segmented-control/index.d.ts +3 -0
- package/dist/segmented-control/index.d.ts.map +1 -0
- package/dist/segmented-control/index.js +2 -0
- package/dist/segmented-control/index.js.map +7 -0
- package/dist/segmented-control/segmented-control-context.d.ts +3 -0
- package/dist/segmented-control/segmented-control-context.d.ts.map +1 -0
- package/dist/segmented-control/use-segmented-control.d.ts +7 -0
- package/dist/segmented-control/use-segmented-control.d.ts.map +1 -0
- package/dist/select/core-select.d.ts +29 -0
- package/dist/select/core-select.d.ts.map +1 -0
- package/dist/select/index.d.ts +16 -0
- package/dist/select/index.d.ts.map +1 -0
- package/dist/select/index.js +2 -0
- package/dist/select/index.js.map +7 -0
- package/dist/select/select-context.d.ts +4 -0
- package/dist/select/select-context.d.ts.map +1 -0
- package/dist/select/use-select.d.ts +7 -0
- package/dist/select/use-select.d.ts.map +1 -0
- package/dist/side-nav/core-side-nav.d.ts +39 -0
- package/dist/side-nav/core-side-nav.d.ts.map +1 -0
- package/dist/side-nav/index.d.ts +14 -0
- package/dist/side-nav/index.d.ts.map +1 -0
- package/dist/side-nav/index.js +2 -0
- package/dist/side-nav/index.js.map +7 -0
- package/dist/side-nav/side-nav-context.d.ts +3 -0
- package/dist/side-nav/side-nav-context.d.ts.map +1 -0
- package/dist/slider/index.d.ts +3 -0
- package/dist/slider/index.d.ts.map +1 -0
- package/dist/slider/index.js +2 -0
- package/dist/slider/index.js.map +7 -0
- package/dist/slider/slider-context.d.ts +4 -0
- package/dist/slider/slider-context.d.ts.map +1 -0
- package/dist/slider/use-slider.d.ts +22 -0
- package/dist/slider/use-slider.d.ts.map +1 -0
- package/dist/state/controlled-open.d.ts +23 -0
- package/dist/state/controlled-open.d.ts.map +1 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +3 -0
- package/dist/state/index.js.map +7 -0
- package/dist/state/use-controlled-id.d.ts +8 -0
- package/dist/state/use-controlled-id.d.ts.map +1 -0
- package/dist/state/use-controlled-state.d.ts +35 -0
- package/dist/state/use-controlled-state.d.ts.map +1 -0
- package/dist/switch/index.d.ts +3 -0
- package/dist/switch/index.d.ts.map +1 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/index.js.map +7 -0
- package/dist/switch/switch-context.d.ts +3 -0
- package/dist/switch/switch-context.d.ts.map +1 -0
- package/dist/switch/use-switch.d.ts +9 -0
- package/dist/switch/use-switch.d.ts.map +1 -0
- package/dist/system/index.d.ts +5 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/index.js +2 -0
- package/dist/system/index.js.map +7 -0
- package/dist/system/polymorphic-as-element.d.ts +20 -0
- package/dist/system/polymorphic-as-element.d.ts.map +1 -0
- package/dist/system/polymorphic-element.d.ts +13 -0
- package/dist/system/polymorphic-element.d.ts.map +1 -0
- package/dist/system/system.types.d.ts +69 -0
- package/dist/system/system.types.d.ts.map +1 -0
- package/dist/system/system.utils.d.ts +31 -0
- package/dist/system/system.utils.d.ts.map +1 -0
- package/dist/tabs/core-tabs.d.ts +60 -0
- package/dist/tabs/core-tabs.d.ts.map +1 -0
- package/dist/tabs/index.d.ts +16 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/index.js.map +7 -0
- package/dist/tabs/tab-prop-context.d.ts +3 -0
- package/dist/tabs/tab-prop-context.d.ts.map +1 -0
- package/dist/tabs/tabs-context.d.ts +3 -0
- package/dist/tabs/tabs-context.d.ts.map +1 -0
- package/dist/text-area/index.d.ts +2 -0
- package/dist/text-area/index.d.ts.map +1 -0
- package/dist/text-area/index.js +1 -0
- package/dist/text-area/index.js.map +7 -0
- package/dist/text-input/index.d.ts +3 -0
- package/dist/text-input/index.d.ts.map +1 -0
- package/dist/text-input/index.js +2 -0
- package/dist/text-input/index.js.map +7 -0
- package/dist/text-input/text-input-context.d.ts +3 -0
- package/dist/text-input/text-input-context.d.ts.map +1 -0
- package/dist/text-input/use-text-input.d.ts +10 -0
- package/dist/text-input/use-text-input.d.ts.map +1 -0
- package/dist/toast/core-toast.d.ts +35 -0
- package/dist/toast/core-toast.d.ts.map +1 -0
- package/dist/toast/index.d.ts +13 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/index.js.map +7 -0
- package/dist/toast/toast-context.d.ts +3 -0
- package/dist/toast/toast-context.d.ts.map +1 -0
- package/dist/toast/toaster.d.ts +19 -0
- package/dist/toast/toaster.d.ts.map +1 -0
- package/dist/tooltip/index.d.ts +3 -0
- package/dist/tooltip/index.d.ts.map +1 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip/index.js.map +7 -0
- package/dist/tooltip/tooltip-context.d.ts +3 -0
- package/dist/tooltip/tooltip-context.d.ts.map +1 -0
- package/dist/tooltip/use-tooltip.d.ts +9 -0
- package/dist/tooltip/use-tooltip.d.ts.map +1 -0
- package/dist/transitions/get-transition-props.d.ts +25 -0
- package/dist/transitions/get-transition-props.d.ts.map +1 -0
- package/dist/transitions/index.d.ts +3 -0
- package/dist/transitions/index.d.ts.map +1 -0
- package/dist/transitions/index.js +2 -0
- package/dist/transitions/index.js.map +7 -0
- package/dist/transitions/transitions.types.d.ts +119 -0
- package/dist/transitions/transitions.types.d.ts.map +1 -0
- package/dist/tree/core-tree.d.ts +63 -0
- package/dist/tree/core-tree.d.ts.map +1 -0
- package/dist/tree/index.d.ts +20 -0
- package/dist/tree/index.d.ts.map +1 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/index.js.map +7 -0
- package/dist/tree/tree-context.d.ts +7 -0
- package/dist/tree/tree-context.d.ts.map +1 -0
- package/dist/tree/tree-node-context.d.ts +4 -0
- package/dist/tree/tree-node-context.d.ts.map +1 -0
- package/dist/tree/use-tree.d.ts +5 -0
- package/dist/tree/use-tree.d.ts.map +1 -0
- package/dist/tsbuildinfo +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/refs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function i(...r){return t=>{let o=[];for(let e of r)if(typeof e=="function"){let n=e(t);typeof n=="function"&&o.push(n)}else e&&(e.current=t);if(o.length)return()=>{for(let e of o)e()}}}function s(r){return r?.ref}function f(r,t){typeof r=="function"?r(t):r&&(r.current=t)}import{useMemo as u}from"react";function c(r,t){if(r!=null){if(typeof r=="function"){r(t);return}try{r.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref`)}}}function R(...r){return t=>{r.forEach(o=>{c(o,t)})}}function a(...r){return u(()=>r.every(t=>t==null)?null:t=>{r.forEach(o=>{f(o,t)})},r)}export{c as assignRef,i as composeRefs,s as getChildRef,R as mergeRefs,f as setRef,a as useMergedRef};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/refs/compose-refs.ts", "../../src/refs/get-child-ref.ts", "../../src/refs/set-ref.ts", "../../src/refs/use-merged-ref.ts"],
|
|
4
|
+
"sourcesContent": ["export function composeRefs(...refs) {\n return node => {\n const cleanUps = [];\n for (const ref of refs) {\n if (typeof ref === \"function\") {\n const cb = ref(node);\n if (typeof cb === \"function\") {\n cleanUps.push(cb);\n }\n } else if (ref) {\n ref.current = node;\n }\n }\n if (cleanUps.length) {\n return () => {\n for (const cleanUp of cleanUps) {\n cleanUp();\n }\n };\n }\n };\n}", "export function getChildRef(children) {\n return children?.ref;\n}", "export function setRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "import { useMemo } from \"react\";\nimport { setRef } from \"./set-ref\";\nexport function assignRef(ref, value) {\n if (ref == null) {\n return;\n }\n if (typeof ref === \"function\") {\n ref(value);\n return;\n }\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(`Cannot assign value '${value}' to ref`);\n }\n}\nexport function mergeRefs(...refs) {\n return node => {\n refs.forEach(ref => {\n assignRef(ref, node);\n });\n };\n}\nexport function useMergedRef(...refs) {\n return useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref_0 => {\n setRef(ref_0, instance);\n });\n };\n }, refs);\n}"],
|
|
5
|
+
"mappings": "AAAO,SAASA,KAAeC,EAAM,CACnC,OAAOC,GAAQ,CACb,IAAMC,EAAW,CAAC,EAClB,QAAWC,KAAOH,EAChB,GAAI,OAAOG,GAAQ,WAAY,CAC7B,IAAMC,EAAKD,EAAIF,CAAI,EACf,OAAOG,GAAO,YAChBF,EAAS,KAAKE,CAAE,CAEpB,MAAWD,IACTA,EAAI,QAAUF,GAGlB,GAAIC,EAAS,OACX,MAAO,IAAM,CACX,QAAWG,KAAWH,EACpBG,EAAQ,CAEZ,CAEJ,CACF,CCrBO,SAASC,EAAYC,EAAU,CACpC,OAAOA,GAAU,GACnB,CCFO,SAASC,EAAOC,EAAKC,EAAO,CAC7B,OAAOD,GAAQ,WACjBA,EAAIC,CAAK,EACAD,IACTA,EAAI,QAAUC,EAElB,CCNA,OAAS,WAAAC,MAAe,QAEjB,SAASC,EAAUC,EAAKC,EAAO,CACpC,GAAID,GAAO,KAGX,IAAI,OAAOA,GAAQ,WAAY,CAC7BA,EAAIC,CAAK,EACT,MACF,CACA,GAAI,CACFD,EAAI,QAAUC,CAChB,MAAgB,CACd,MAAM,IAAI,MAAM,wBAAwBA,CAAK,UAAU,CACzD,EACF,CACO,SAASC,KAAaC,EAAM,CACjC,OAAOC,GAAQ,CACbD,EAAK,QAAQH,GAAO,CAClBD,EAAUC,EAAKI,CAAI,CACrB,CAAC,CACH,CACF,CACO,SAASC,KAAgBF,EAAM,CACpC,OAAOG,EAAQ,IACTH,EAAK,MAAMH,GAAOA,GAAO,IAAI,EACxB,KAEFO,GAAY,CACjBJ,EAAK,QAAQK,GAAS,CACpBC,EAAOD,EAAOD,CAAQ,CACxB,CAAC,CACH,EACCJ,CAAI,CACT",
|
|
6
|
+
"names": ["composeRefs", "refs", "node", "cleanUps", "ref", "cb", "cleanUp", "getChildRef", "children", "setRef", "ref", "value", "useMemo", "assignRef", "ref", "value", "mergeRefs", "refs", "node", "useMergedRef", "useMemo", "instance", "ref_0", "setRef"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* passes {value} to {ref}
|
|
4
|
+
*
|
|
5
|
+
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
6
|
+
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
7
|
+
* https://github.com/mui/material-ui/issues/13539
|
|
8
|
+
*
|
|
9
|
+
* Useful if you want to expose the ref of an inner component to the public API
|
|
10
|
+
* while still using it inside the component.
|
|
11
|
+
*
|
|
12
|
+
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setRef<T>(ref: RefObject<T | null> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
15
|
+
//# sourceMappingURL=set-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-ref.d.ts","sourceRoot":"","sources":["../../src/refs/set-ref.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAEpC;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5E,KAAK,EAAE,CAAC,GAAG,IAAI,GACd,IAAI,CAMN"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref, type RefCallback, type RefObject } from "react";
|
|
2
|
+
export type ReactRef<T> = RefCallback<T> | RefObject<T>;
|
|
3
|
+
export declare function assignRef<T = any>(ref: ReactRef<T> | null | undefined, value: T): void;
|
|
4
|
+
export declare function mergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
|
|
5
|
+
/**
|
|
6
|
+
* This hook combines multiple refs into a single callbackRef.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useMergedRef<Instance>(...refs: Array<Ref<Instance> | undefined>): RefCallback<Instance> | null;
|
|
9
|
+
//# sourceMappingURL=use-merged-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-merged-ref.d.ts","sourceRoot":"","sources":["../../src/refs/use-merged-ref.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,GAAG,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAA;AAIzE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;AAEvD,wBAAgB,SAAS,CAAC,CAAC,GAAG,GAAG,EAC/B,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EACnC,KAAK,EAAE,CAAC,GACP,IAAI,CAeN;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,IAC9D,MAAM,CAAC,GAAG,IAAI,KAAG,IAAI,CAK9B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EACnC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,GACxC,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,CAmB9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/segmented-control/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createGuardedContext as v}from"@qualcomm-ui/react-core/context";var[$,h]=v({hookName:"useSegmentedControlContext",providerName:"<SegmentedControlContextProvider>",strict:!0});import{c as S}from"react/compiler-runtime";import{createSegmentedControlApi as N,segmentedControlMachine as P}from"@qualcomm-ui/core/segmented-control";import{useCheckbox as V}from"@qualcomm-ui/react-core/checkbox";import{normalizeProps as D,useMachine as I}from"@qualcomm-ui/react-core/machine";function q(m){let e=S(2),i=I(P,m),t;return e[0]!==i?(t=N(i,D),e[0]=i,e[1]=t):t=e[1],t}function w(m){let e=S(22),{disabled:i,value:t}=m,{defaultValue:a,dir:c,disabled:b,getItemBindings:u,getName:C,handleChange:f,value:g}=h(),o;e[0]!==g||e[1]!==t?(o=g?.includes(t),e[0]=g,e[1]=t,e[2]=o):o=e[2];let n;e[3]!==a||e[4]!==t?(n=a?.includes(t),e[3]=a,e[4]=t,e[5]=n):n=e[5];let p=b||i,r;e[6]!==C?(r=C(),e[6]=C,e[7]=r):r=e[7];let l;e[8]!==f||e[9]!==t?(l=k=>{f(t,k)},e[8]=f,e[9]=t,e[10]=l):l=e[10];let s;e[11]!==c||e[12]!==o||e[13]!==n||e[14]!==p||e[15]!==r||e[16]!==l||e[17]!==t?(s={checked:o,defaultChecked:n,dir:c,disabled:p,name:r,onCheckedChange:l,value:t},e[11]=c,e[12]=o,e[13]=n,e[14]=p,e[15]=r,e[16]=l,e[17]=t,e[18]=s):s=e[18];let x=V(s),d;return e[19]!==x||e[20]!==u?(d={checkboxContext:x,getItemBindings:u},e[19]=x,e[20]=u,e[21]=d):d=e[21],d}export{$ as SegmentedControlContextProvider,q as useSegmentedControl,h as useSegmentedControlContext,w as useSegmentedControlItem};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/segmented-control/segmented-control-context.ts", "../../src/segmented-control/use-segmented-control.ts"],
|
|
4
|
+
"sourcesContent": ["import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [SegmentedControlContextProvider, useSegmentedControlContext] = createGuardedContext({\n hookName: \"useSegmentedControlContext\",\n providerName: \"<SegmentedControlContextProvider>\",\n strict: true\n});", "import { c as _c } from \"react/compiler-runtime\";\nimport { createSegmentedControlApi, segmentedControlMachine } from \"@qualcomm-ui/core/segmented-control\";\nimport { useCheckbox } from \"@qualcomm-ui/react-core/checkbox\";\nimport { normalizeProps, useMachine } from \"@qualcomm-ui/react-core/machine\";\nimport { useSegmentedControlContext } from \"./segmented-control-context\";\nexport function useSegmentedControl(props) {\n const $ = _c(2);\n const machine = useMachine(segmentedControlMachine, props);\n let t0;\n if ($[0] !== machine) {\n t0 = createSegmentedControlApi(machine, normalizeProps);\n $[0] = machine;\n $[1] = t0;\n } else {\n t0 = $[1];\n }\n return t0;\n}\nexport function useSegmentedControlItem(t0) {\n const $ = _c(22);\n const {\n disabled,\n value\n } = t0;\n const {\n defaultValue: groupDefaultValue,\n dir,\n disabled: groupDisabled,\n getItemBindings,\n getName,\n handleChange,\n value: groupValue\n } = useSegmentedControlContext();\n let t1;\n if ($[0] !== groupValue || $[1] !== value) {\n t1 = groupValue?.includes(value);\n $[0] = groupValue;\n $[1] = value;\n $[2] = t1;\n } else {\n t1 = $[2];\n }\n let t2;\n if ($[3] !== groupDefaultValue || $[4] !== value) {\n t2 = groupDefaultValue?.includes(value);\n $[3] = groupDefaultValue;\n $[4] = value;\n $[5] = t2;\n } else {\n t2 = $[5];\n }\n const t3 = groupDisabled || disabled;\n let t4;\n if ($[6] !== getName) {\n t4 = getName();\n $[6] = getName;\n $[7] = t4;\n } else {\n t4 = $[7];\n }\n let t5;\n if ($[8] !== handleChange || $[9] !== value) {\n t5 = next => {\n handleChange(value, next);\n };\n $[8] = handleChange;\n $[9] = value;\n $[10] = t5;\n } else {\n t5 = $[10];\n }\n let t6;\n if ($[11] !== dir || $[12] !== t1 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 || $[17] !== value) {\n t6 = {\n checked: t1,\n defaultChecked: t2,\n dir,\n disabled: t3,\n name: t4,\n onCheckedChange: t5,\n value\n };\n $[11] = dir;\n $[12] = t1;\n $[13] = t2;\n $[14] = t3;\n $[15] = t4;\n $[16] = t5;\n $[17] = value;\n $[18] = t6;\n } else {\n t6 = $[18];\n }\n const checkboxContext = useCheckbox(t6);\n let t7;\n if ($[19] !== checkboxContext || $[20] !== getItemBindings) {\n t7 = {\n checkboxContext,\n getItemBindings\n };\n $[19] = checkboxContext;\n $[20] = getItemBindings;\n $[21] = t7;\n } else {\n t7 = $[21];\n }\n return t7;\n}"],
|
|
5
|
+
"mappings": "AAAA,OAAS,wBAAAA,MAA4B,kCAC9B,GAAM,CAACC,EAAiCC,CAA0B,EAAIF,EAAqB,CAChG,SAAU,6BACV,aAAc,oCACd,OAAQ,EACV,CAAC,ECLD,OAAS,KAAKG,MAAU,yBACxB,OAAS,6BAAAC,EAA2B,2BAAAC,MAA+B,sCACnE,OAAS,eAAAC,MAAmB,mCAC5B,OAAS,kBAAAC,EAAgB,cAAAC,MAAkB,kCAEpC,SAASC,EAAoBC,EAAO,CACzC,IAAMC,EAAIC,EAAG,CAAC,EACRC,EAAUC,EAAWC,EAAyBL,CAAK,EACrDM,EACJ,OAAIL,EAAE,CAAC,IAAME,GACXG,EAAKC,EAA0BJ,EAASK,CAAc,EACtDP,EAAE,CAAC,EAAIE,EACPF,EAAE,CAAC,EAAIK,GAEPA,EAAKL,EAAE,CAAC,EAEHK,CACT,CACO,SAASG,EAAwBH,EAAI,CAC1C,IAAML,EAAIC,EAAG,EAAE,EACT,CACJ,SAAAQ,EACA,MAAAC,CACF,EAAIL,EACE,CACJ,aAAcM,EACd,IAAAC,EACA,SAAUC,EACV,gBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,MAAOC,CACT,EAAIC,EAA2B,EAC3BC,EACAnB,EAAE,CAAC,IAAMiB,GAAcjB,EAAE,CAAC,IAAMU,GAClCS,EAAKF,GAAY,SAASP,CAAK,EAC/BV,EAAE,CAAC,EAAIiB,EACPjB,EAAE,CAAC,EAAIU,EACPV,EAAE,CAAC,EAAImB,GAEPA,EAAKnB,EAAE,CAAC,EAEV,IAAIoB,EACApB,EAAE,CAAC,IAAMW,GAAqBX,EAAE,CAAC,IAAMU,GACzCU,EAAKT,GAAmB,SAASD,CAAK,EACtCV,EAAE,C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,EACR1B,EAAE,EAAE,EAAIc,EACRd,EAAE,EAAE,EAAI4B,GAERA,EAAK5B,EAAE,EAAE,EAEJ4B,CACT",
|
|
6
|
+
"names": ["createGuardedContext", "SegmentedControlContextProvider", "useSegmentedControlContext", "_c", "createSegmentedControlApi", "segmentedControlMachine", "useCheckbox", "normalizeProps", "useMachine", "useSegmentedControl", "props", "$", "_c", "machine", "useMachine", "segmentedControlMachine", "t0", "createSegmentedControlApi", "normalizeProps", "useSegmentedControlItem", "disabled", "value", "groupDefaultValue", "dir", "groupDisabled", "getItemBindings", "getName", "handleChange", "groupValue", "useSegmentedControlContext", "t1", "t2", "t3", "t4", "t5", "next", "t6", "checkboxContext", "useCheckbox", "t7"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SegmentedControlApi } from "@qualcomm-ui/core/segmented-control";
|
|
2
|
+
export declare const SegmentedControlContextProvider: import("react").Provider<SegmentedControlApi>, useSegmentedControlContext: (requireContext?: boolean) => SegmentedControlApi;
|
|
3
|
+
//# sourceMappingURL=segmented-control-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control-context.d.ts","sourceRoot":"","sources":["../../src/segmented-control/segmented-control-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,qCAAqC,CAAA;AAG5E,eAAO,MAAO,+BAA+B,iDAAE,0BAA0B,mDAKrE,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SegmentedControlApi, type SegmentedControlApiProps, type SegmentedControlItemApiProps } from "@qualcomm-ui/core/segmented-control";
|
|
2
|
+
export declare function useSegmentedControl(props: SegmentedControlApiProps): SegmentedControlApi;
|
|
3
|
+
export declare function useSegmentedControlItem({ disabled, value, }: SegmentedControlItemApiProps): {
|
|
4
|
+
checkboxContext: import("@qualcomm-ui/core/checkbox").CheckboxApi;
|
|
5
|
+
getItemBindings: (id: import("node_modules/@qualcomm-ui/utils/src/attributes").IdParam) => import("@qualcomm-ui/core/segmented-control").SegmentedControlItemBindings;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=use-segmented-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-segmented-control.d.ts","sourceRoot":"","sources":["../../src/segmented-control/use-segmented-control.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EAElC,MAAM,qCAAqC,CAAA;AAM5C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,wBAAwB,GAC9B,mBAAmB,CAGrB;AAED,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,KAAK,GACN,EAAE,4BAA4B;;;EA2B9B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactElement } from "react";
|
|
2
|
+
import { type PresenceApiProps } from "@qualcomm-ui/core/presence";
|
|
3
|
+
import { type ItemProps, type SelectApiProps } from "@qualcomm-ui/core/select";
|
|
4
|
+
import { type ElementRenderProp, type IdProp } from "@qualcomm-ui/react-core/system";
|
|
5
|
+
export interface CoreSelectRootProps extends SelectApiProps, PresenceApiProps, Omit<ElementRenderProp<"div">, "defaultValue" | "dir" | "onSelect"> {
|
|
6
|
+
}
|
|
7
|
+
export declare function CoreSelectRoot({ children, ...props }: CoreSelectRootProps): ReactElement;
|
|
8
|
+
export interface CoreSelectContentProps extends ElementRenderProp<"div">, IdProp {
|
|
9
|
+
}
|
|
10
|
+
export declare function CoreSelectContent({ children, id, ...props }: CoreSelectContentProps): ReactElement;
|
|
11
|
+
export interface CoreSelectHiddenSelectProps extends ComponentPropsWithRef<"select">, IdProp {
|
|
12
|
+
}
|
|
13
|
+
export declare function CoreSelectHiddenSelect({ id, ...props }: CoreSelectHiddenSelectProps): ReactElement;
|
|
14
|
+
export interface CoreSelectPositionerProps extends ElementRenderProp<"div">, IdProp {
|
|
15
|
+
}
|
|
16
|
+
export declare function CoreSelectPositioner({ children, id, ...props }: CoreSelectPositionerProps): ReactElement | null;
|
|
17
|
+
export interface CoreSelectControlProps extends ElementRenderProp<"div">, IdProp {
|
|
18
|
+
}
|
|
19
|
+
export declare function CoreSelectControl({ children, id, ...props }: CoreSelectControlProps): ReactElement;
|
|
20
|
+
export interface CoreSelectItemProps extends ElementRenderProp<"div">, ItemProps {
|
|
21
|
+
}
|
|
22
|
+
export declare function CoreSelectItem({ children, ...props }: CoreSelectItemProps): ReactElement;
|
|
23
|
+
export interface CoreSelectItemTextProps extends ElementRenderProp<"span"> {
|
|
24
|
+
}
|
|
25
|
+
export declare function CoreSelectItemText({ children, ...props }: CoreSelectItemTextProps): ReactElement;
|
|
26
|
+
export interface CoreSelectItemIndicatorProps extends ElementRenderProp<"span"> {
|
|
27
|
+
}
|
|
28
|
+
export declare function CoreSelectItemIndicator({ children, ...props }: CoreSelectItemIndicatorProps): ReactElement;
|
|
29
|
+
//# sourceMappingURL=core-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-select.d.ts","sourceRoot":"","sources":["../../src/select/core-select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,qBAAqB,EAAE,YAAY,EAAC,MAAM,OAAO,CAAA;AAE9D,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,cAAc,EAGpB,MAAM,0BAA0B,CAAA;AASjC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAEZ,MAAM,gCAAgC,CAAA;AAUvC,MAAM,WAAW,mBACf,SAAQ,cAAc,EACpB,gBAAgB,EAChB,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,KAAK,GAAG,UAAU,CAAC;CAAG;AAE1E,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,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R,GAAG,KAAK,EACT,EAAE,4BAA4B,GAAG,YAAY,CAa7C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CoreSelectContent, type CoreSelectContentProps, CoreSelectControl, type CoreSelectControlProps, CoreSelectHiddenSelect, type CoreSelectHiddenSelectProps, CoreSelectItem, CoreSelectItemIndicator, type CoreSelectItemIndicatorProps, type CoreSelectItemProps, CoreSelectItemText, type CoreSelectItemTextProps, CoreSelectPositioner, type CoreSelectPositionerProps, CoreSelectRoot, type CoreSelectRootProps } from "./core-select";
|
|
2
|
+
export * from "./select-context";
|
|
3
|
+
export * from "./use-select";
|
|
4
|
+
export type { CoreSelectRootProps, CoreSelectContentProps, CoreSelectHiddenSelectProps, CoreSelectPositionerProps, CoreSelectControlProps, CoreSelectItemProps, CoreSelectItemTextProps, CoreSelectItemIndicatorProps, };
|
|
5
|
+
type CoreSelectComponent = {
|
|
6
|
+
Content: typeof CoreSelectContent;
|
|
7
|
+
Control: typeof CoreSelectControl;
|
|
8
|
+
HiddenSelect: typeof CoreSelectHiddenSelect;
|
|
9
|
+
Item: typeof CoreSelectItem;
|
|
10
|
+
ItemIndicator: typeof CoreSelectItemIndicator;
|
|
11
|
+
ItemText: typeof CoreSelectItemText;
|
|
12
|
+
Positioner: typeof CoreSelectPositioner;
|
|
13
|
+
Root: typeof CoreSelectRoot;
|
|
14
|
+
};
|
|
15
|
+
export declare const CoreSelect: CoreSelectComponent;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,cAAc,EACd,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,cAAc,EACd,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAA;AAEtB,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAE5B,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,GAC7B,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,YAAY,EAAE,OAAO,sBAAsB,CAAA;IAC3C,IAAI,EAAE,OAAO,cAAc,CAAA;IAC3B,aAAa,EAAE,OAAO,uBAAuB,CAAA;IAC7C,QAAQ,EAAE,OAAO,kBAAkB,CAAA;IACnC,UAAU,EAAE,OAAO,oBAAoB,CAAA;IACvC,IAAI,EAAE,OAAO,cAAc,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,mBASxB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as i,jsxs as R}from"react/jsx-runtime";import{splitPresenceProps as E}from"@qualcomm-ui/core/presence";import{createSelectApi as j,selectMachine as k,splitSelectProps as L}from"@qualcomm-ui/core/select";import{useOnDestroy as g,useOnDestroyWhen as M}from"@qualcomm-ui/react-core/effects";import{normalizeProps as _,useMachine as z}from"@qualcomm-ui/react-core/machine";import{PresenceContextProvider as A,usePresence as G,usePresenceContext as W}from"@qualcomm-ui/react-core/presence";import{useControlledId as u}from"@qualcomm-ui/react-core/state";import{PolymorphicElement as d}from"@qualcomm-ui/react-core/system";import{mergeProps as l}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext as f}from"@qualcomm-ui/react-core/context";var[P,s]=f({hookName:"useSelectContext",providerName:"<SelectContextProvider>",strict:!0}),[I,S]=f({hookName:"useSelectContext",providerName:"<SelectContextProvider>",strict:!0});function v(e){let{children:t,...o}=e,[n,c]=E(o),[r,p]=L(c),a=z(k,r),m=j(a,_),N=G(l({present:m.open},n)),O=l(m.getRootBindings({id:u(r.id)}),p);return i(P,{value:m,children:i(A,{value:N,children:i(d,{as:"div",...O,children:t})})})}function h(e){let{children:t,id:o,...n}=e,c=s(),r=l(c.getContentBindings({id:u(o),onDestroy:g()}),n);return i(d,{as:"div",...r,children:t})}function y(e){let{id:t,...o}=e,n=s(),c=n.empty,r=n.hiddenSelectOptions,p=l(n.getHiddenSelectBindings({id:u(t),onDestroy:g()}),o);return R("select",{...p,children:[c&&i("option",{value:""}),r.map($)]})}function $(e){return i("option",{disabled:e.disabled,value:e.value,children:e.label},e.value)}function B(e){let{children:t,id:o,...n}=e,c=s(),r=W(),p=u(o),a=M(r.unmounted);if(r.unmounted)return null;let m=l(c.getPositionerBindings({id:p,onDestroy:a}),n);return i(d,{as:"div",...m,children:t})}function D(e){let{children:t,id:o,...n}=e,c=s(),r=l(c.getControlBindings({id:u(o),onDestroy:g()}),n);return i(d,{as:"div",...r,children:t})}function T(e){let{children:t,...o}=e,n=s(),c=n.getItemState(o),r=l(n.getItemBindings(c),o);return i(d,{as:"div",...r,children:i(I,{value:c,children:t})})}function H(e){let{children:t,...o}=e,n=s(),c=S(),r=l(n.getItemTextBindings(c),o);return i(d,{as:"span",...r,children:t})}function b(e){let{children:t,...o}=e,n=s(),c=S(),r=l(n.getItemIndicatorBindings(c),o);return i(d,{as:"span",...r,children:t})}import{c as q}from"react/compiler-runtime";import{useOnDestroy as x}from"@qualcomm-ui/react-core/effects";import{useControlledId as C}from"@qualcomm-ui/react-core/state";function ie(e){return s().getClearTriggerBindings({id:C(e.id),onDestroy:x()})}function le(e){return s().getLabelBindings({id:C(e.id),onDestroy:x()})}function de(e){return s().getHintBindings({id:C(e.id),onDestroy:x()})}function pe(e){return s().getErrorTextBindings({id:C(e.id),onDestroy:x()})}function me(){let e=q(2),t=s(),o;return e[0]!==t?(o=t.getIndicatorBindings(),e[0]=t,e[1]=o):o=e[1],o}var Ce={Content:h,Control:D,HiddenSelect:y,Item:T,ItemIndicator:b,ItemText:H,Positioner:B,Root:v};export{Ce as CoreSelect,P as SelectContextProvider,I as SelectItemContextProvider,ie as useSelectClearTrigger,s as useSelectContext,pe as useSelectErrorText,de as useSelectHint,me as useSelectIndicator,S as useSelectItemContext,le as useSelectLabel};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/select/core-select.tsx", "../../src/select/select-context.ts", "../../src/select/use-select.ts", "../../src/select/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { splitPresenceProps } from \"@qualcomm-ui/core/presence\";\nimport { createSelectApi, selectMachine, splitSelectProps } from \"@qualcomm-ui/core/select\";\nimport { useOnDestroy, useOnDestroyWhen } from \"@qualcomm-ui/react-core/effects\";\nimport { normalizeProps, useMachine } from \"@qualcomm-ui/react-core/machine\";\nimport { PresenceContextProvider, usePresence, usePresenceContext } from \"@qualcomm-ui/react-core/presence\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { PolymorphicElement } from \"@qualcomm-ui/react-core/system\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { SelectContextProvider, SelectItemContextProvider, useSelectContext, useSelectItemContext } from \"./select-context\";\nexport function CoreSelectRoot(t0) {\n const {\n children,\n ...props\n } = t0;\n const [presenceProps, otherProps] = splitPresenceProps(props);\n const [selectProps, localProps] = splitSelectProps(otherProps);\n const config = useMachine(selectMachine, selectProps);\n const context = createSelectApi(config, normalizeProps);\n const presence = usePresence(mergeProps({\n present: context.open\n }, presenceProps));\n const mergedProps = mergeProps(context.getRootBindings({\n id: useControlledId(selectProps.id)\n }), localProps);\n return jsx(SelectContextProvider, {\n value: context,\n children: jsx(PresenceContextProvider, {\n value: presence,\n children: jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n })\n })\n });\n}\nexport function CoreSelectContent(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const mergedProps = mergeProps(selectContext.getContentBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}\nexport function CoreSelectHiddenSelect(t0) {\n const {\n id,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const empty = selectContext.empty;\n const options = selectContext.hiddenSelectOptions;\n const mergedProps = mergeProps(selectContext.getHiddenSelectBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsxs(\"select\", {\n ...mergedProps,\n children: [empty && jsx(\"option\", {\n value: \"\"\n }), options.map(_temp)]\n });\n}\nfunction _temp(opt) {\n return jsx(\"option\", {\n disabled: opt.disabled,\n value: opt.value,\n children: opt.label\n }, opt.value);\n}\nexport function CoreSelectPositioner(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const presence = usePresenceContext();\n const controlledId = useControlledId(id);\n const onDestroy = useOnDestroyWhen(presence.unmounted);\n if (presence.unmounted) {\n return null;\n }\n const mergedProps = mergeProps(selectContext.getPositionerBindings({\n id: controlledId,\n onDestroy\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}\nexport function CoreSelectControl(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const mergedProps = mergeProps(selectContext.getControlBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children\n });\n}\nexport function CoreSelectItem(t0) {\n const {\n children,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const itemContext = selectContext.getItemState(props);\n const mergedProps = mergeProps(selectContext.getItemBindings(itemContext), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps,\n children: jsx(SelectItemContextProvider, {\n value: itemContext,\n children\n })\n });\n}\nexport function CoreSelectItemText(t0) {\n const {\n children,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const context = useSelectItemContext();\n const mergedProps = mergeProps(selectContext.getItemTextBindings(context), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}\nexport function CoreSelectItemIndicator(t0) {\n const {\n children,\n ...props\n } = t0;\n const selectContext = useSelectContext();\n const context = useSelectItemContext();\n const mergedProps = mergeProps(selectContext.getItemIndicatorBindings(context), props);\n return jsx(PolymorphicElement, {\n as: \"span\",\n ...mergedProps,\n children\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [SelectContextProvider, useSelectContext] = createGuardedContext({\n hookName: \"useSelectContext\",\n providerName: \"<SelectContextProvider>\",\n strict: true\n});\nexport const [SelectItemContextProvider, useSelectItemContext] = createGuardedContext({\n hookName: \"useSelectContext\",\n providerName: \"<SelectContextProvider>\",\n strict: true\n});", "import { c as _c } from \"react/compiler-runtime\";\nimport { useOnDestroy } from \"@qualcomm-ui/react-core/effects\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { useSelectContext } from \"./select-context\";\nexport function useSelectClearTrigger(props) {\n const context = useSelectContext();\n return context.getClearTriggerBindings({\n id: useControlledId(props.id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSelectLabel(props) {\n const context = useSelectContext();\n return context.getLabelBindings({\n id: useControlledId(props.id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSelectHint(props) {\n const context = useSelectContext();\n return context.getHintBindings({\n id: useControlledId(props.id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSelectErrorText(props) {\n const context = useSelectContext();\n return context.getErrorTextBindings({\n id: useControlledId(props.id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSelectIndicator() {\n const $ = _c(2);\n const context = useSelectContext();\n let t0;\n if ($[0] !== context) {\n t0 = context.getIndicatorBindings();\n $[0] = context;\n $[1] = t0;\n } else {\n t0 = $[1];\n }\n return t0;\n}", "import { CoreSelectContent, CoreSelectControl, CoreSelectHiddenSelect, CoreSelectItem, CoreSelectItemIndicator, CoreSelectItemText, CoreSelectPositioner, CoreSelectRoot } from \"./core-select\";\nexport * from \"./select-context\";\nexport * from \"./use-select\";\nexport const CoreSelect = {\n Content: CoreSelectContent,\n Control: CoreSelectControl,\n HiddenSelect: CoreSelectHiddenSelect,\n Item: CoreSelectItem,\n ItemIndicator: CoreSelectItemIndicator,\n ItemText: CoreSelectItemText,\n Positioner: CoreSelectPositioner,\n Root: CoreSelectRoot\n};"],
|
|
5
|
+
"mappings": "AAAA,OAAS,OAAAA,EAAK,QAAAC,MAAY,oBAC1B,OAAS,sBAAAC,MAA0B,6BACnC,OAAS,mBAAAC,EAAiB,iBAAAC,EAAe,oBAAAC,MAAwB,2BACjE,OAAS,gBAAAC,EAAc,oBAAAC,MAAwB,kCAC/C,OAAS,kBAAAC,EAAgB,cAAAC,MAAkB,kCAC3C,OAAS,2BAAAC,EAAyB,eAAAC,EAAa,sBAAAC,MAA0B,mCACzE,OAAS,mBAAAC,MAAuB,gCAChC,OAAS,sBAAAC,MAA0B,iCACnC,OAAS,cAAAC,MAAkB,iCCR3B,OAAS,wBAAAC,MAA4B,kCAC9B,GAAM,CAACC,EAAuBC,CAAgB,EAAIF,EAAqB,CAC5E,SAAU,mBACV,aAAc,0BACd,OAAQ,EACV,CAAC,EACY,CAACG,EAA2BC,CAAoB,EAAIJ,EAAqB,CACpF,SAAU,mBACV,aAAc,0BACd,OAAQ,EACV,CAAC,EDAM,SAASK,EAAeC,EAAI,CACjC,GAAM,CACJ,SAAAC,EACA,GAAGC,CACL,EAAIF,EACE,CAACG,EAAeC,CAAU,EAAIC,EAAmBH,CAAK,EACtD,CAACI,EAAaC,CAAU,EAAIC,EAAiBJ,CAAU,EACvDK,EAASC,EAAW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,IAAMC,GAAa,CACxB,QAASC,EACT,QAASC,EACT,aAAcC,EACd,KAAMC,EACN,cAAeC,EACf,SAAUC,EACV,WAAYC,EACZ,KAAMC,CACR",
|
|
6
|
+
"names": ["jsx", "jsxs", "splitPresenceProps", "createSelectApi", "selectMachine", "splitSelectProps", "useOnDestroy", "useOnDestroyWhen", "normalizeProps", "useMachine", "PresenceContextProvider", "usePresence", "usePresenceContext", "useControlledId", "PolymorphicElement", "mergeProps", "createGuardedContext", "SelectContextProvider", "useSelectContext", "SelectItemContextProvider", "useSelectItemContext", "CoreSelectRoot", "t0", "children", "props", "presenceProps", "otherProps", "splitPresenceProps", "selectProps", "localProps", "splitSelectProps", "config", "useMachine", "selectMachine", "context", "createSelectApi", "normalizeProps", "presence", "usePresence", "mergeProps", "mergedProps", "useControlledId", "jsx", "SelectContextProvider", "PresenceContextProvider", "PolymorphicElement", "CoreSelectContent", "id", "selectContext", "useSelectContext", "useOnDestroy", "CoreSelectHiddenSelect", "empty", "options", "jsxs", "_temp", "opt", "CoreSelectPositioner", "usePresenceContext", "controlledId", "onDestroy", "useOnDestroyWhen", "CoreSelectControl", "CoreSelectItem", "itemContext", "SelectItemContextProvider", "CoreSelectItemText", "useSelectItemContext", "CoreSelectItemIndicator", "_c", "useOnDestroy", "useControlledId", "useSelectClearTrigger", "props", "useSelectContext", "useControlledId", "useOnDestroy", "useSelectLabel", "useSelectHint", "useSelectErrorText", "useSelectIndicator", "$", "_c", "context", "t0", "CoreSelect", "CoreSelectContent", "CoreSelectControl", "CoreSelectHiddenSelect", "CoreSelectItem", "CoreSelectItemIndicator", "CoreSelectItemText", "CoreSelectPositioner", "CoreSelectRoot"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ItemState, SelectApi } from "@qualcomm-ui/core/select";
|
|
2
|
+
export declare const SelectContextProvider: import("react").Provider<SelectApi<any>>, useSelectContext: (requireContext?: boolean) => SelectApi<any>;
|
|
3
|
+
export declare const SelectItemContextProvider: import("react").Provider<ItemState>, useSelectItemContext: (requireContext?: boolean) => ItemState;
|
|
4
|
+
//# sourceMappingURL=select-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-context.d.ts","sourceRoot":"","sources":["../../src/select/select-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAGlE,eAAO,MAAO,qBAAqB,4CAAE,gBAAgB,8CAKjD,CAAA;AAEJ,eAAO,MAAO,yBAAyB,uCAAE,oBAAoB,yCAKzD,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IdProp } from "@qualcomm-ui/react-core/system";
|
|
2
|
+
export declare function useSelectClearTrigger(props: IdProp): import("@qualcomm-ui/core/select").SelectClearTriggerBindings;
|
|
3
|
+
export declare function useSelectLabel(props: IdProp): import("@qualcomm-ui/core/select").SelectLabelBindings;
|
|
4
|
+
export declare function useSelectHint(props: IdProp): import("@qualcomm-ui/core/select").SelectHintBindings;
|
|
5
|
+
export declare function useSelectErrorText(props: IdProp): import("@qualcomm-ui/core/select").SelectErrorTextBindings;
|
|
6
|
+
export declare function useSelectIndicator(): import("@qualcomm-ui/core/select").SelectIndicatorBindings;
|
|
7
|
+
//# sourceMappingURL=use-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-select.d.ts","sourceRoot":"","sources":["../../src/select/use-select.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,gCAAgC,CAAA;AAI1D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,iEAMlD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,0DAM3C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,yDAM1C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,8DAM/C;AAED,wBAAgB,kBAAkB,+DAGjC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type RenderStrategyApiProps } from "@qualcomm-ui/core/presence";
|
|
3
|
+
import { type SideNavApi, type SideNavApiProps } from "@qualcomm-ui/core/side-nav";
|
|
4
|
+
import type { TreeApiProps } from "@qualcomm-ui/core/tree";
|
|
5
|
+
import { type ElementRenderProp, type IdProp, type RenderProp } from "@qualcomm-ui/react-core/system";
|
|
6
|
+
import type { TreeNode } from "@qualcomm-ui/utils/collection";
|
|
7
|
+
export interface CoreSideNavRootProps<T = TreeNode> extends SideNavApiProps, Omit<TreeApiProps<T>, "checkedValue" | "defaultCheckedValue" | "onCheckedValueChange">, RenderStrategyApiProps, IdProp, Omit<ElementRenderProp<"div">, "dir"> {
|
|
8
|
+
}
|
|
9
|
+
export declare function CoreSideNavRoot<T = TreeNode>({ children, id, ...props }: CoreSideNavRootProps<T>): ReactElement;
|
|
10
|
+
export interface CoreSideNavTriggerProps extends IdProp, ElementRenderProp<"button"> {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The trigger that opens and closes the side navigation.
|
|
14
|
+
*/
|
|
15
|
+
export declare function CoreSideNavTrigger({ children, id, ...props }: CoreSideNavTriggerProps): ReactElement;
|
|
16
|
+
export interface CoreSideNavContextProps {
|
|
17
|
+
/**
|
|
18
|
+
* {@link
|
|
19
|
+
* https://react-next.qui.qualcomm.com/render-props#render-prop
|
|
20
|
+
* Render Prop}
|
|
21
|
+
*
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
children: RenderProp<SideNavApi>;
|
|
25
|
+
}
|
|
26
|
+
export declare function CoreSideNavContext({ children, }: CoreSideNavContextProps): ReactNode;
|
|
27
|
+
export interface CoreSideNavHeaderProps extends ElementRenderProp<"div"> {
|
|
28
|
+
}
|
|
29
|
+
export declare function CoreSideNavHeader(props: CoreSideNavHeaderProps): ReactElement;
|
|
30
|
+
export interface CoreSideNavHeaderLogoProps extends ElementRenderProp<"div"> {
|
|
31
|
+
}
|
|
32
|
+
export declare function CoreSideNavHeaderLogo({ ...props }: CoreSideNavHeaderLogoProps): ReactElement;
|
|
33
|
+
export interface CoreSideNavHeaderTitleProps extends ElementRenderProp<"div"> {
|
|
34
|
+
}
|
|
35
|
+
export declare function CoreSideNavHeaderTitle({ ...props }: CoreSideNavHeaderTitleProps): ReactElement;
|
|
36
|
+
export interface CoreSideNavHeaderActionProps extends ElementRenderProp<"button"> {
|
|
37
|
+
}
|
|
38
|
+
export declare function CoreSideNavHeaderAction({ ...props }: CoreSideNavHeaderActionProps): ReactElement;
|
|
39
|
+
//# sourceMappingURL=core-side-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-side-nav.d.ts","sourceRoot":"","sources":["../../src/side-nav/core-side-nav.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,eAAe,EAGrB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAA;AAKxD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAEX,KAAK,UAAU,EAEhB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAA;AAK3D,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,QAAQ,CAChD,SAAQ,eAAe,EACrB,IAAI,CACF,YAAY,CAAC,CAAC,CAAC,EACf,cAAc,GAAG,qBAAqB,GAAG,sBAAsB,CAChE,EACD,sBAAsB,EACtB,MAAM,EACN,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;CAAG;AAE5C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oreSideNavHeaderLogo, type CoreSideNavHeaderLogoProps, type CoreSideNavHeaderProps, CoreSideNavHeaderTitle, type CoreSideNavHeaderTitleProps, CoreSideNavRoot, type CoreSideNavRootProps, CoreSideNavTrigger, type CoreSideNavTriggerProps } from "./core-side-nav";
|
|
2
|
+
export * from "./side-nav-context";
|
|
3
|
+
export type { CoreSideNavRootProps, CoreSideNavTriggerProps, CoreSideNavContextProps, CoreSideNavHeaderProps, CoreSideNavHeaderLogoProps, CoreSideNavHeaderTitleProps, CoreSideNavHeaderActionProps, };
|
|
4
|
+
type CoreSideNavComponent = {
|
|
5
|
+
Context: typeof CoreSideNavContext;
|
|
6
|
+
Header: typeof CoreSideNavHeader;
|
|
7
|
+
HeaderAction: typeof CoreSideNavHeaderAction;
|
|
8
|
+
HeaderLogo: typeof CoreSideNavHeaderLogo;
|
|
9
|
+
HeaderTitle: typeof CoreSideNavHeaderTitle;
|
|
10
|
+
Root: typeof CoreSideNavRoot;
|
|
11
|
+
Trigger: typeof CoreSideNavTrigger;
|
|
12
|
+
};
|
|
13
|
+
export declare const CoreSideNav: CoreSideNavComponent;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/side-nav/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,eAAe,EACf,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAA;AAExB,cAAc,oBAAoB,CAAA;AAElC,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,GAC7B,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,OAAO,kBAAkB,CAAA;IAClC,MAAM,EAAE,OAAO,iBAAiB,CAAA;IAChC,YAAY,EAAE,OAAO,uBAAuB,CAAA;IAC5C,UAAU,EAAE,OAAO,qBAAqB,CAAA;IACxC,WAAW,EAAE,OAAO,sBAAsB,CAAA;IAC1C,IAAI,EAAE,OAAO,eAAe,CAAA;IAC5B,OAAO,EAAE,OAAO,kBAAkB,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,oBAQzB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as g}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{splitRenderStrategyProps as A}from"@qualcomm-ui/core/presence";import{createSideNavApi as B,sideNavMachine as L,splitSideNavProps as b}from"@qualcomm-ui/core/side-nav";import{useOnDestroy as D}from"@qualcomm-ui/react-core/effects";import{normalizeProps as M,useMachine as V}from"@qualcomm-ui/react-core/machine";import{RenderStrategyPropsProvider as $}from"@qualcomm-ui/react-core/presence";import{useControlledId as N}from"@qualcomm-ui/react-core/state";import{PolymorphicElement as a,renderProp as j}from"@qualcomm-ui/react-core/system";import{CoreTree as k}from"@qualcomm-ui/react-core/tree";import{mergeProps as s}from"@qualcomm-ui/utils/merge-props";import{createGuardedContext as y}from"@qualcomm-ui/react-core/context";var[v,d]=y({hookName:"useSideNavContext",providerName:"<SideNavContextProvider>",strict:!0});function C(t){let{children:e,id:r,...o}=t,[i,c]=A(o),[H,h]=b(c),T=V(L,H),p=B(T,M),m=s(p.getRootBindings({id:N(r)}),{shouldHideNode:R=>!p.open&&R.depth>1},h);return n($,{value:i,children:n(v,{value:p,children:n(k.Root,{...m,expandedValue:p.open?m.expandedValue:[],children:e})})})}function l(t){let{children:e,id:r,...o}=t,i=d(),c=s(i.getTriggerBindings({id:N(r),onDestroy:D()}),o);return n(a,{as:"button",...c,children:e})}function u(t){let e=g(3),{children:r}=t,o=d(),i;return e[0]!==r||e[1]!==o?(i=j(r,o),e[0]=r,e[1]=o,e[2]=i):i=e[2],i}function x(t){let e=g(3),r=d(),o;if(e[0]!==t||e[1]!==r){let i=s(r.getHeaderBindings(),t);o=n(a,{as:"div",...i}),e[0]=t,e[1]=r,e[2]=o}else o=e[2];return o}function S(t){let{...e}=t,r=d(),o=s(r.getHeaderLogoBindings(),e);return n(a,{as:"div",...o})}function f(t){let{...e}=t,r=d(),o=s(r.getHeaderTitleBindings(),e);return n(a,{as:"div",...o})}function P(t){let{...e}=t,r=d(),o=s(r.getHeaderActionBindings(),e);return n(a,{as:"button",...o})}var Z={Context:u,Header:x,HeaderAction:P,HeaderLogo:S,HeaderTitle:f,Root:C,Trigger:l};export{Z as CoreSideNav,v as SideNavContextProvider,d as useSideNavContext};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/side-nav/core-side-nav.tsx", "../../src/side-nav/side-nav-context.ts", "../../src/side-nav/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { c as _c } from \"react/compiler-runtime\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { splitRenderStrategyProps } from \"@qualcomm-ui/core/presence\";\nimport { createSideNavApi, sideNavMachine, splitSideNavProps } from \"@qualcomm-ui/core/side-nav\";\nimport { useOnDestroy } from \"@qualcomm-ui/react-core/effects\";\nimport { normalizeProps, useMachine } from \"@qualcomm-ui/react-core/machine\";\nimport { RenderStrategyPropsProvider } from \"@qualcomm-ui/react-core/presence\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { PolymorphicElement, renderProp } from \"@qualcomm-ui/react-core/system\";\nimport { CoreTree } from \"@qualcomm-ui/react-core/tree\";\nimport { mergeProps } from \"@qualcomm-ui/utils/merge-props\";\nimport { SideNavContextProvider, useSideNavContext } from \"./side-nav-context\";\nexport function CoreSideNavRoot(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const [renderStrategyProps, localSideNavProps] = splitRenderStrategyProps(props);\n const [sideNavigationApiProps, localProps] = splitSideNavProps(localSideNavProps);\n const machine = useMachine(sideNavMachine, sideNavigationApiProps);\n const api = createSideNavApi(machine, normalizeProps);\n const mergedProps = mergeProps(api.getRootBindings({\n id: useControlledId(id)\n }), {\n shouldHideNode: node => !api.open && node.depth > 1\n }, localProps);\n return jsx(RenderStrategyPropsProvider, {\n value: renderStrategyProps,\n children: jsx(SideNavContextProvider, {\n value: api,\n children: jsx(CoreTree.Root, {\n ...mergedProps,\n expandedValue: api.open ? mergedProps.expandedValue : [],\n children\n })\n })\n });\n}\nexport function CoreSideNavTrigger(t0) {\n const {\n children,\n id,\n ...props\n } = t0;\n const context = useSideNavContext();\n const mergedProps = mergeProps(context.getTriggerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n }), props);\n return jsx(PolymorphicElement, {\n as: \"button\",\n ...mergedProps,\n children\n });\n}\nexport function CoreSideNavContext(t0) {\n const $ = _c(3);\n const {\n children\n } = t0;\n const context = useSideNavContext();\n let t1;\n if ($[0] !== children || $[1] !== context) {\n t1 = renderProp(children, context);\n $[0] = children;\n $[1] = context;\n $[2] = t1;\n } else {\n t1 = $[2];\n }\n return t1;\n}\nexport function CoreSideNavHeader(props) {\n const $ = _c(3);\n const sideNavContext = useSideNavContext();\n let t0;\n if ($[0] !== props || $[1] !== sideNavContext) {\n const mergedProps = mergeProps(sideNavContext.getHeaderBindings(), props);\n t0 = jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n $[0] = props;\n $[1] = sideNavContext;\n $[2] = t0;\n } else {\n t0 = $[2];\n }\n return t0;\n}\nexport function CoreSideNavHeaderLogo(t0) {\n const {\n ...props\n } = t0;\n const sideNavContext = useSideNavContext();\n const mergedProps = mergeProps(sideNavContext.getHeaderLogoBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreSideNavHeaderTitle(t0) {\n const {\n ...props\n } = t0;\n const sideNavContext = useSideNavContext();\n const mergedProps = mergeProps(sideNavContext.getHeaderTitleBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"div\",\n ...mergedProps\n });\n}\nexport function CoreSideNavHeaderAction(t0) {\n const {\n ...props\n } = t0;\n const sideNavContext = useSideNavContext();\n const mergedProps = mergeProps(sideNavContext.getHeaderActionBindings(), props);\n return jsx(PolymorphicElement, {\n as: \"button\",\n ...mergedProps\n });\n}", "import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [SideNavContextProvider, useSideNavContext] = createGuardedContext({\n hookName: \"useSideNavContext\",\n providerName: \"<SideNavContextProvider>\",\n strict: true\n});", "import { CoreSideNavContext, CoreSideNavHeader, CoreSideNavHeaderAction, CoreSideNavHeaderLogo, CoreSideNavHeaderTitle, CoreSideNavRoot, CoreSideNavTrigger } from \"./core-side-nav\";\nexport * from \"./side-nav-context\";\nexport const CoreSideNav = {\n Context: CoreSideNavContext,\n Header: CoreSideNavHeader,\n HeaderAction: CoreSideNavHeaderAction,\n HeaderLogo: CoreSideNavHeaderLogo,\n HeaderTitle: CoreSideNavHeaderTitle,\n Root: CoreSideNavRoot,\n Trigger: CoreSideNavTrigger\n};"],
|
|
5
|
+
"mappings": "AAAA,OAAS,KAAKA,MAAU,yBACxB,OAAS,OAAAC,MAAW,oBACpB,OAAS,4BAAAC,MAAgC,6BACzC,OAAS,oBAAAC,EAAkB,kBAAAC,EAAgB,qBAAAC,MAAyB,6BACpE,OAAS,gBAAAC,MAAoB,kCAC7B,OAAS,kBAAAC,EAAgB,cAAAC,MAAkB,kCAC3C,OAAS,+BAAAC,MAAmC,mCAC5C,OAAS,mBAAAC,MAAuB,gCAChC,OAAS,sBAAAC,EAAoB,cAAAC,MAAkB,iCAC/C,OAAS,YAAAC,MAAgB,+BACzB,OAAS,cAAAC,MAAkB,iCCV3B,OAAS,wBAAAC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,CEzHO,IAAMuB,EAAc,CACzB,QAASC,EACT,OAAQC,EACR,aAAcC,EACd,WAAYC,EACZ,YAAaC,EACb,KAAMC,EACN,QAASC,CACX",
|
|
6
|
+
"names": ["_c", "jsx", "splitRenderStrategyProps", "createSideNavApi", "sideNavMachine", "splitSideNavProps", "useOnDestroy", "normalizeProps", "useMachine", "RenderStrategyPropsProvider", "useControlledId", "PolymorphicElement", "renderProp", "CoreTree", "mergeProps", "createGuardedContext", "SideNavContextProvider", "useSideNavContext", "CoreSideNavRoot", "t0", "children", "id", "props", "renderStrategyProps", "localSideNavProps", "splitRenderStrategyProps", "sideNavigationApiProps", "localProps", "splitSideNavProps", "machine", "useMachine", "sideNavMachine", "api", "createSideNavApi", "normalizeProps", "mergedProps", "mergeProps", "useControlledId", "node", "jsx", "RenderStrategyPropsProvider", "SideNavContextProvider", "CoreTree", "CoreSideNavTrigger", "context", "useSideNavContext", "useOnDestroy", "PolymorphicElement", "CoreSideNavContext", "$", "_c", "t1", "renderProp", "CoreSideNavHeader", "sideNavContext", "CoreSideNavHeaderLogo", "CoreSideNavHeaderTitle", "CoreSideNavHeaderAction", "CoreSideNav", "CoreSideNavContext", "CoreSideNavHeader", "CoreSideNavHeaderAction", "CoreSideNavHeaderLogo", "CoreSideNavHeaderTitle", "CoreSideNavRoot", "CoreSideNavTrigger"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-nav-context.d.ts","sourceRoot":"","sources":["../../src/side-nav/side-nav-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,4BAA4B,CAAA;AAG1D,eAAO,MAAO,sBAAsB,wCAAE,iBAAiB,0CAKnD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slider/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createGuardedContext as l}from"@qualcomm-ui/react-core/context";var[y,o]=l({hookName:"useSliderContext",providerName:"<SliderContextProvider>",strict:!0}),[D,p]=l({hookName:"useSliderThumbContext",providerName:"<SliderThumbContextProvider>",strict:!0});import{c as a}from"react/compiler-runtime";import{createSliderApi as g,sliderMachine as m}from"@qualcomm-ui/core/slider";import{useOnDestroy as r}from"@qualcomm-ui/react-core/effects";import{normalizeProps as f,useMachine as S}from"@qualcomm-ui/react-core/machine";import{useControlledId as i}from"@qualcomm-ui/react-core/state";function P(e){let t=a(2),n=S(m,e),s;return t[0]!==n?(s=g(n,f),t[0]=n,t[1]=s):s=t[1],s}function H(e){let{id:t}=e;return o().getLabelBindings({id:i(t),onDestroy:r()})}function N(e){let{id:t}=e;return o().getHintBindings({id:i(t),onDestroy:r()})}function G(e){let{id:t}=e;return o().getErrorTextBindings({id:i(t),onDestroy:r()})}function I(e){let{id:t}=e;return o().getValueTextBindings({id:i(t),onDestroy:r()})}function E(e){let{id:t}=e;return o().getControlBindings({id:i(t),onDestroy:r()})}function L(e){let{id:t}=e;return o().getTrackBindings({id:i(t),onDestroy:r()})}function R(e){let{id:t}=e;return o().getRangeBindings({id:i(t),onDestroy:r()})}function V(e){let t=a(3),{id:n,...s}=e,x=o(),d=x.getThumbBindings({id:i(n),...s,onDestroy:r()}),u=x.value[s.index],c;return t[0]!==d||t[1]!==u?(c={bindings:d,value:u},t[0]=d,t[1]=u,t[2]=c):c=t[2],c}function $(e){let{id:t}=e,n=o(),s=p();return n.getHiddenInputBindings({id:i(t),...s,onDestroy:r()})}function z(e){let{id:t,value:n}=e;return o().getMarkerBindings({id:i(t),onDestroy:r(),value:n})}function A(e){let{id:t}=e;return o().getMarkerGroupBindings({id:i(t),onDestroy:r()})}function O(e){let{id:t}=e;return o().getMinMarkerBindings({id:i(t),onDestroy:r()})}function _(e){let{id:t}=e;return o().getMaxMarkerBindings({id:i(t),onDestroy:r()})}export{y as SliderContextProvider,D as SliderThumbContextProvider,P as useSlider,o as useSliderContext,E as useSliderControl,G as useSliderErrorText,$ as useSliderHiddenInput,N as useSliderHint,H as useSliderLabel,z as useSliderMarker,A as useSliderMarkerGroup,_ as useSliderMaxMarker,O as useSliderMinMarker,R as useSliderRange,V as useSliderThumb,p as useSliderThumbContext,L as useSliderTrack,I as useSliderValueText};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/slider/slider-context.ts", "../../src/slider/use-slider.ts"],
|
|
4
|
+
"sourcesContent": ["import { createGuardedContext } from \"@qualcomm-ui/react-core/context\";\nexport const [SliderContextProvider, useSliderContext] = createGuardedContext({\n hookName: \"useSliderContext\",\n providerName: \"<SliderContextProvider>\",\n strict: true\n});\nexport const [SliderThumbContextProvider, useSliderThumbContext] = createGuardedContext({\n hookName: \"useSliderThumbContext\",\n providerName: \"<SliderThumbContextProvider>\",\n strict: true\n});", "import { c as _c } from \"react/compiler-runtime\";\nimport { createSliderApi, sliderMachine } from \"@qualcomm-ui/core/slider\";\nimport { useOnDestroy } from \"@qualcomm-ui/react-core/effects\";\nimport { normalizeProps, useMachine } from \"@qualcomm-ui/react-core/machine\";\nimport { useControlledId } from \"@qualcomm-ui/react-core/state\";\nimport { useSliderContext, useSliderThumbContext } from \"./slider-context\";\nexport function useSlider(props) {\n const $ = _c(2);\n const config = useMachine(sliderMachine, props);\n let t0;\n if ($[0] !== config) {\n t0 = createSliderApi(config, normalizeProps);\n $[0] = config;\n $[1] = t0;\n } else {\n t0 = $[1];\n }\n return t0;\n}\nexport function useSliderLabel(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getLabelBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderHint(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getHintBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderErrorText(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getErrorTextBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderValueText(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getValueTextBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderControl(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getControlBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderTrack(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getTrackBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderRange(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getRangeBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderThumb(t0) {\n const $ = _c(3);\n const {\n id,\n ...thumbProps\n } = t0;\n const context = useSliderContext();\n const t1 = context.getThumbBindings({\n id: useControlledId(id),\n ...thumbProps,\n onDestroy: useOnDestroy()\n });\n const t2 = context.value[thumbProps.index];\n let t3;\n if ($[0] !== t1 || $[1] !== t2) {\n t3 = {\n bindings: t1,\n value: t2\n };\n $[0] = t1;\n $[1] = t2;\n $[2] = t3;\n } else {\n t3 = $[2];\n }\n return t3;\n}\nexport function useSliderHiddenInput(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n const thumbContext = useSliderThumbContext();\n return context.getHiddenInputBindings({\n id: useControlledId(id),\n ...thumbContext,\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderMarker(t0) {\n const {\n id,\n value\n } = t0;\n const context = useSliderContext();\n return context.getMarkerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy(),\n value\n });\n}\nexport function useSliderMarkerGroup(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getMarkerGroupBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderMinMarker(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getMinMarkerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}\nexport function useSliderMaxMarker(t0) {\n const {\n id\n } = t0;\n const context = useSliderContext();\n return context.getMaxMarkerBindings({\n id: useControlledId(id),\n onDestroy: useOnDestroy()\n });\n}"],
|
|
5
|
+
"mappings": "AAAA,OAAS,wBAAAA,MAA4B,kCAC9B,GAAM,CAACC,EAAuBC,CAAgB,EAAIF,EAAqB,CAC5E,SAAU,mBACV,aAAc,0BACd,OAAQ,EACV,CAAC,EACY,CAACG,EAA4BC,CAAqB,EAAIJ,EAAqB,CACtF,SAAU,wBACV,aAAc,+BACd,OAAQ,EACV,CAAC,ECVD,OAAS,KAAKK,MAAU,yBACxB,OAAS,mBAAAC,EAAiB,iBAAAC,MAAqB,2BAC/C,OAAS,gBAAAC,MAAoB,kCAC7B,OAAS,kBAAAC,EAAgB,cAAAC,MAAkB,kCAC3C,OAAS,mBAAAC,MAAuB,gCAEzB,SAASC,EAAUC,EAAO,CAC/B,IAAMC,EAAIC,EAAG,CAAC,EACRC,EAASC,EAAWC,EAAeL,CAAK,EAC1CM,EACJ,OAAIL,EAAE,CAAC,IAAME,GACXG,EAAKC,EAAgBJ,EAAQK,CAAc,EAC3CP,EAAE,CAAC,EAAIE,EACPF,EAAE,CAAC,EAAIK,GAEPA,EAAKL,EAAE,CAAC,EAEHK,CACT,CACO,SAASG,EAAeH,EAAI,CACjC,GAAM,CACJ,GAAAI,CACF,EAAIJ,EAEJ,OADgBK,EAAiB,EAClB,iBAAiB,CAC9B,GAAIC,EAAgBF,CAAE,EACtB,UAAWG,EAAa,CAC1B,CAAC,CACH,CACO,SAASC,EAAcR,EAAI,CAChC,GAAM,CACJ,GAAAI,CACF,EAAIJ,EAEJ,OADgBK,EAAiB,EAClB,gBAAgB,CAC7B,GAAIC,EAAgBF,CAAE,EACtB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T,EACAvB,EAAE,CAAC,EAAIsB,EACPtB,EAAE,CAAC,EAAIuB,EACPvB,EAAE,CAAC,EAAIwB,GAEPA,EAAKxB,EAAE,CAAC,EAEHwB,CACT,CACO,SAASC,EAAqBpB,EAAI,CACvC,GAAM,CACJ,GAAAI,CACF,EAAIJ,EACEgB,EAAUX,EAAiB,EAC3BgB,EAAeC,EAAsB,EAC3C,OAAON,EAAQ,uBAAuB,CACpC,GAAIV,EAAgBF,CAAE,EACtB,GAAGiB,EACH,UAAWd,EAAa,CAC1B,CAAC,CACH,CACO,SAASgB,EAAgBvB,EAAI,CAClC,GAAM,CACJ,GAAAI,EACA,MAAAoB,CACF,EAAIxB,EAEJ,OADgBK,EAAiB,EAClB,kBAAkB,CAC/B,GAAIC,EAAgBF,CAAE,EACtB,UAAWG,EAAa,EACxB,MAAAiB,CACF,CAAC,CACH,CACO,SAASC,EAAqBzB,EAAI,CACvC,GAAM,CACJ,GAAAI,CACF,EAAIJ,EAEJ,OADgBK,EAAiB,EAClB,uBAAuB,CACpC,GAAIC,EAAgBF,CAAE,EACtB,UAAWG,EAAa,CAC1B,CAAC,CACH,CACO,SAASmB,EAAmB1B,EAAI,CACrC,GAAM,CACJ,GAAAI,CACF,EAAIJ,EAEJ,OADgBK,EAAiB,EAClB,qBAAqB,CAClC,GAAIC,EAAgBF,CAAE,EACtB,UAAWG,EAAa,CAC1B,CAAC,CACH,CACO,SAASoB,EAAmB3B,EAAI,CACrC,GAAM,CACJ,GAAAI,CACF,EAAIJ,EAEJ,OADgBK,EAAiB,EAClB,qBAAqB,CAClC,GAAIC,EAAgBF,CAAE,EACtB,UAAWG,EAAa,CAC1B,CAAC,CACH",
|
|
6
|
+
"names": ["createGuardedContext", "SliderContextProvider", "useSliderContext", "SliderThumbContextProvider", "useSliderThumbContext", "_c", "createSliderApi", "sliderMachine", "useOnDestroy", "normalizeProps", "useMachine", "useControlledId", "useSlider", "props", "$", "_c", "config", "useMachine", "sliderMachine", "t0", "createSliderApi", "normalizeProps", "useSliderLabel", "id", "useSliderContext", "useControlledId", "useOnDestroy", "useSliderHint", "useSliderErrorText", "useSliderValueText", "useSliderControl", "useSliderTrack", "useSliderRange", "useSliderThumb", "thumbProps", "context", "t1", "t2", "t3", "useSliderHiddenInput", "thumbContext", "useSliderThumbContext", "useSliderMarker", "value", "useSliderMarkerGroup", "useSliderMinMarker", "useSliderMaxMarker"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SliderApi, ThumbProps } from "@qualcomm-ui/core/slider";
|
|
2
|
+
export declare const SliderContextProvider: import("react").Provider<SliderApi>, useSliderContext: (requireContext?: boolean) => SliderApi;
|
|
3
|
+
export declare const SliderThumbContextProvider: import("react").Provider<ThumbProps>, useSliderThumbContext: (requireContext?: boolean) => ThumbProps;
|
|
4
|
+
//# sourceMappingURL=slider-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider-context.d.ts","sourceRoot":"","sources":["../../src/slider/slider-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAA;AAGnE,eAAO,MAAO,qBAAqB,uCAAE,gBAAgB,yCAKjD,CAAA;AAEJ,eAAO,MAAO,0BAA0B,wCAAE,qBAAqB,0CAK3D,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type SliderApi, type SliderApiProps, type SliderControlBindings, type SliderErrorTextBindings, type SliderHiddenInputBindings, type SliderHintBindings, type SliderLabelBindings, type SliderMarkerBindings, type SliderMarkerGroupBindings, type SliderMaxMarkerBindings, type SliderMinMarkerBindings, type SliderRangeBindings, type SliderThumbBindings, type SliderTrackBindings, type SliderValueTextBindings, type ThumbProps } from "@qualcomm-ui/core/slider";
|
|
2
|
+
import type { IdProp } from "@qualcomm-ui/react-core/system";
|
|
3
|
+
export declare function useSlider(props: SliderApiProps): SliderApi;
|
|
4
|
+
export declare function useSliderLabel({ id }: IdProp): SliderLabelBindings;
|
|
5
|
+
export declare function useSliderHint({ id }: IdProp): SliderHintBindings;
|
|
6
|
+
export declare function useSliderErrorText({ id }: IdProp): SliderErrorTextBindings;
|
|
7
|
+
export declare function useSliderValueText({ id }: IdProp): SliderValueTextBindings;
|
|
8
|
+
export declare function useSliderControl({ id }: IdProp): SliderControlBindings;
|
|
9
|
+
export declare function useSliderTrack({ id }: IdProp): SliderTrackBindings;
|
|
10
|
+
export declare function useSliderRange({ id }: IdProp): SliderRangeBindings;
|
|
11
|
+
export declare function useSliderThumb({ id, ...thumbProps }: IdProp & ThumbProps): {
|
|
12
|
+
bindings: SliderThumbBindings;
|
|
13
|
+
value: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function useSliderHiddenInput({ id }: IdProp): SliderHiddenInputBindings;
|
|
16
|
+
export declare function useSliderMarker({ id, value, }: IdProp & {
|
|
17
|
+
value: number;
|
|
18
|
+
}): SliderMarkerBindings;
|
|
19
|
+
export declare function useSliderMarkerGroup({ id }: IdProp): SliderMarkerGroupBindings;
|
|
20
|
+
export declare function useSliderMinMarker({ id }: IdProp): SliderMinMarkerBindings;
|
|
21
|
+
export declare function useSliderMaxMarker({ id }: IdProp): SliderMaxMarkerBindings;
|
|
22
|
+
//# sourceMappingURL=use-slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-slider.d.ts","sourceRoot":"","sources":["../../src/slider/use-slider.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KA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AE,MAAM,GAAG,uBAAuB,CAMxE;AAED,wBAAgB,kBAAkB,CAAC,EAAC,EAAE,EAAC,EAAE,MAAM,GAAG,uBAAuB,CAMxE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SyntheticEvent } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Callback fired when panel visibility changes.
|
|
4
|
+
*
|
|
5
|
+
* @param isOpen The updated state. If `true`, the panel is visible.
|
|
6
|
+
* @param event the DOM event that triggered the change.
|
|
7
|
+
*/
|
|
8
|
+
export type OnControlledOpenChange = (isOpen: boolean, event?: SyntheticEvent) => void;
|
|
9
|
+
export interface ControlledOpen {
|
|
10
|
+
/**
|
|
11
|
+
* The default value when uncontrolled.
|
|
12
|
+
*/
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Callback fired when panel visibility changes.
|
|
16
|
+
*/
|
|
17
|
+
onOpenChange?: OnControlledOpenChange;
|
|
18
|
+
/**
|
|
19
|
+
* The controlled state for the component's visibility.
|
|
20
|
+
*/
|
|
21
|
+
open?: boolean;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=controlled-open.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controlled-open.d.ts","sourceRoot":"","sources":["../../src/state/controlled-open.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,MAAM,EAAE,OAAO,EACf,KAAK,CAAC,EAAE,cAAc,KACnB,IAAI,CAAA;AAET,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,sBAAsB,CAAA;IAErC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{useId as p}from"react";function I(e){let t=p();return e||t}import{useCallback as h,useEffect as v,useRef as b,useState as g}from"react";function E({controlled:e,defaultValue:t,delayCallback:c,name:n,onChangeProp:i,state:r="value"}){let{current:o}=b(e!==void 0),[u,d]=g(t),f=o?e:u;process.env.NODE_ENV!=="production"&&v(()=>{o!==(e!==void 0)&&console.error([`QUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components"].join(`
|
|
2
|
+
`))},[r,n,e]);let a=h((l,...m)=>{let s=()=>i?.(l,...m);c?setTimeout(s):s(),o||d(l)},[]);return[f,a]}export{I as useControlledId,E as useControlledState};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/state/use-controlled-id.ts", "../../src/state/use-controlled-state.ts"],
|
|
4
|
+
"sourcesContent": ["import { useId } from \"react\";\nexport function useControlledId(override) {\n const id = useId();\n return override || id;\n}", "import { useCallback, useEffect, useRef, useState } from \"react\";\nexport function useControlledState({\n controlled,\n defaultValue: defaultProp,\n delayCallback,\n name,\n onChangeProp,\n state = \"value\"\n}) {\n const {\n current: isControlled\n } = useRef(controlled !== void 0);\n const [valueState, setValue] = useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== \"production\") {\n useEffect(() => {\n if (isControlled !== (controlled !== void 0)) {\n console.error([`QUI: A component is changing the ${isControlled ? \"\" : \"un\"}controlled ${state} state of ${name} to be ${isControlled ? \"un\" : \"\"}controlled.`, \"Elements should not switch from uncontrolled to controlled (or vice versa).\", `Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`, \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", \"More info: https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components\"].join(\"\\n\"));\n }\n }, [state, name, controlled]);\n }\n const setValueIfUncontrolled = useCallback((newValue, ...rest) => {\n const callback = () => onChangeProp?.(newValue, ...rest);\n if (delayCallback) {\n setTimeout(callback);\n } else {\n callback();\n }\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}"],
|
|
5
|
+
"mappings": "AAAA,OAAS,SAAAA,MAAa,QACf,SAASC,EAAgBC,EAAU,CACxC,IAAMC,EAAKH,EAAM,EACjB,OAAOE,GAAYC,CACrB,CCJA,OAAS,eAAAC,EAAa,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QAClD,SAASC,EAAmB,CACjC,WAAAC,EACA,aAAcC,EACd,cAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAAC,EAAQ,OACV,EAAG,CACD,GAAM,CACJ,QAASC,CACX,EAAIT,EAAOG,IAAe,MAAM,EAC1B,CAACO,EAAYC,CAAQ,EAAIV,EAASG,CAAW,EAC7CQ,EAAQH,EAAeN,EAAaO,EACtC,QAAQ,IAAI,WAAa,cAC3BX,EAAU,IAAM,CACVU,KAAkBN,IAAe,SACnC,QAAQ,MAAM,CAAC,oCAAoCM,EAAe,GAAK,IAAI,cAAcD,CAAK,aAAaF,CAAI,UAAUG,EAAe,KAAO,EAAE,cAAe,8EAA+E,qDAAqDH,CAAI,8CAA+C,6HAA8H,4GAA4G,EAAE,KAAK;AAAA,CAAI,CAAC,CAEjlB,EAAG,CAACE,EAAOF,EAAMH,CAAU,CAAC,EAE9B,IAAMU,EAAyBf,EAAY,CAACgB,KAAaC,IAAS,CAChE,IAAMC,EAAW,IAAMT,IAAeO,EAAU,GAAGC,CAAI,EACnDV,EACF,WAAWW,CAAQ,EAEnBA,EAAS,EAENP,GACHE,EAASG,CAAQ,CAErB,EAAG,CAAC,CAAC,EACL,MAAO,CAACF,EAAOC,CAAsB,CACvC",
|
|
6
|
+
"names": ["useId", "useControlledId", "override", "id", "useCallback", "useEffect", "useRef", "useState", "useControlledState", "controlled", "defaultProp", "delayCallback", "name", "onChangeProp", "state", "isControlled", "valueState", "setValue", "value", "setValueIfUncontrolled", "newValue", "rest", "callback"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the provided id. If the id is omitted, returns a unique identifier as a
|
|
3
|
+
* fallback. This is often used by components that need a unique identifier for an
|
|
4
|
+
* element (like inputs for accessibility). If the user supplies an ID, we account
|
|
5
|
+
* for that. Otherwise, a unique identifier is created.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useControlledId(override?: string): string;
|
|
8
|
+
//# sourceMappingURL=use-controlled-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-controlled-id.d.ts","sourceRoot":"","sources":["../../src/state/use-controlled-id.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAIzD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface UseControlledState<T> {
|
|
2
|
+
/**
|
|
3
|
+
* The controlled value.
|
|
4
|
+
*/
|
|
5
|
+
controlled: T | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* The default value.
|
|
8
|
+
*/
|
|
9
|
+
defaultValue: T | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* If true, delay the state callback by one tick.
|
|
12
|
+
*/
|
|
13
|
+
delayCallback?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The name of this instance. Used in error logging.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* The optional onChange callback.
|
|
20
|
+
*/
|
|
21
|
+
onChangeProp?: (value: T, ...rest: any[]) => void;
|
|
22
|
+
/**
|
|
23
|
+
* The name of the value. Used in error logging.
|
|
24
|
+
*/
|
|
25
|
+
state?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Forked from MUI. This hook gives us the ability to control state while also
|
|
29
|
+
* letting the user pass in their own state control props. If the user doesn't pass
|
|
30
|
+
* in a value, the component is uncontrolled. This hook ensures that the state is
|
|
31
|
+
* still tracked when uncontrolled.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useControlledState<State, SetState = (newValue: State, ...extraParams: any[]) => void>({ controlled, defaultValue: defaultProp, delayCallback, name, onChangeProp, state, }: UseControlledState<State>): [State | undefined, SetState];
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=use-controlled-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-controlled-state.d.ts","sourceRoot":"","sources":["../../src/state/use-controlled-state.ts"],"names":[],"mappings":"AAMA,UAAU,kBAAkB,CAAC,CAAC;IAC5B;;OAEG;IACH,UAAU,EAAE,CAAC,GAAG,SAAS,CAAA;IAEzB;;OAEG;IACH,YAAY,EAAE,CAAC,GAAG,SAAS,CAAA;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAEjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EACL,QAAQ,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,GAAG,EAAE,KAAK,IAAI,EAC3D,EACA,UAAU,EACV,YAAY,EAAE,WAAW,EACzB,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,KAAe,GAChB,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,SAAS,EAAE,QAAQ,CAAC,CA2C3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createGuardedContext as u}from"@qualcomm-ui/react-core/context";var[f,n]=u({hookName:"useSwitchContext",providerName:"<SwitchContextProvider>",strict:!0});import{c as i}from"react/compiler-runtime";import{createSwitchApi as x,switchMachine as d}from"@qualcomm-ui/core/switch";import{useOnDestroy as c}from"@qualcomm-ui/react-core/effects";import{normalizeProps as m,useMachine as p}from"@qualcomm-ui/react-core/machine";import{useControlledId as s}from"@qualcomm-ui/react-core/state";function b(e){let t=i(2),o=p(d,e),r;return t[0]!==o?(r=x(o,m),t[0]=o,t[1]=r):r=t[1],r}function y(e){let{id:t}=e;return n().getLabelBindings({id:s(t),onDestroy:c()})}function D(e){let{id:t}=e;return n().getHiddenInputBindings({id:s(t),onDestroy:c()})}function T(){let e=i(2),t=n(),o;return e[0]!==t?(o=t.getControlBindings(),e[0]=t,e[1]=o):o=e[1],o}function v(){let e=i(2),t=n(),o;return e[0]!==t?(o=t.getThumbBindings(),e[0]=t,e[1]=o):o=e[1],o}function I(e){let{id:t}=e;return n().getErrorTextBindings({id:s(t),onDestroy:c()})}export{f as SwitchContextProvider,b as useSwitch,n as useSwitchContext,T as useSwitchControl,I as useSwitchErrorText,D as useSwitchHiddenInput,y as useSwitchLabel,v as useSwitchThumb};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|