@g9tm/lynxcontrols 1.7.2 → 2.1.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/README.md +12 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/anchor/context.jsx +0 -2
- package/dist/anchor/hooks.d.ts.map +1 -1
- package/dist/anchor/hooks.jsx +6 -4
- package/dist/anchor/measure.jsx +0 -2
- package/dist/anchor/registry.d.ts +12 -2
- package/dist/anchor/registry.d.ts.map +1 -1
- package/dist/anchor/registry.jsx +11 -3
- package/dist/anchor/scroll.jsx +0 -2
- package/dist/base/control.d.ts +18 -2
- package/dist/base/control.d.ts.map +1 -1
- package/dist/base/control.jsx +16 -9
- package/dist/base/corner-badge.jsx +0 -2
- package/dist/base/disposer.jsx +0 -2
- package/dist/base/index.d.ts +3 -2
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.jsx +3 -2
- package/dist/base/press.css +83 -0
- package/dist/base/press.css.map +1 -0
- package/dist/base/press.d.ts +13 -2
- package/dist/base/press.d.ts.map +1 -1
- package/dist/base/press.jsx +49 -5
- package/dist/base/pressable.d.ts +10 -1
- package/dist/base/pressable.d.ts.map +1 -1
- package/dist/base/pressable.jsx +13 -8
- package/dist/base/selection-item.jsx +0 -2
- package/dist/base/timers.jsx +0 -2
- package/dist/base/tone.d.ts +15 -0
- package/dist/base/tone.d.ts.map +1 -0
- package/dist/base/tone.jsx +71 -0
- package/dist/base/use-controllable-state.jsx +0 -2
- package/dist/base/use-stable-callback.jsx +0 -2
- package/dist/button/button-variants.css +236 -0
- package/dist/button/button-variants.css.map +1 -0
- package/dist/button/button.css +21 -0
- package/dist/button/button.css.map +1 -1
- package/dist/button/button.d.ts +13 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.jsx +51 -38
- package/dist/button/header-action-button.d.ts +1 -0
- package/dist/button/header-action-button.d.ts.map +1 -1
- package/dist/button/header-action-button.jsx +6 -7
- package/dist/button/icon-button.d.ts +11 -1
- package/dist/button/icon-button.d.ts.map +1 -1
- package/dist/button/icon-button.jsx +21 -17
- package/dist/button/nav-card.d.ts +1 -0
- package/dist/button/nav-card.d.ts.map +1 -1
- package/dist/button/nav-card.jsx +6 -7
- package/dist/button/safe-tap.jsx +0 -2
- package/dist/button/safe.jsx +3 -5
- package/dist/button/variant-css.d.ts +8 -0
- package/dist/button/variant-css.d.ts.map +1 -0
- package/dist/button/variant-css.jsx +47 -0
- package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
- package/dist/button/vertical-icon-text-button.jsx +1 -3
- package/dist/button/visuals.d.ts +7 -1
- package/dist/button/visuals.d.ts.map +1 -1
- package/dist/button/visuals.jsx +5 -5
- package/dist/cascade/cascade-panel.jsx +0 -2
- package/dist/cascade/model.jsx +0 -2
- package/dist/commands/commands.css +167 -0
- package/dist/commands/commands.css.map +1 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.jsx +2 -0
- package/dist/commands/keys.d.ts +22 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.jsx +119 -0
- package/dist/commands/palette.d.ts +62 -0
- package/dist/commands/palette.d.ts.map +1 -0
- package/dist/commands/palette.jsx +175 -0
- package/dist/deferred/deferred-content.jsx +2 -4
- package/dist/deferred/readiness-signal.jsx +0 -2
- package/dist/display/activity-indicator.jsx +0 -2
- package/dist/display/culture-date-time-label.jsx +1 -3
- package/dist/display/extras.css +117 -0
- package/dist/display/extras.css.map +1 -0
- package/dist/display/extras.d.ts +65 -0
- package/dist/display/extras.d.ts.map +1 -0
- package/dist/display/extras.jsx +118 -0
- package/dist/display/figures-index.d.ts +3 -0
- package/dist/display/figures-index.d.ts.map +1 -0
- package/dist/display/figures-index.jsx +2 -0
- package/dist/display/figures.css +249 -0
- package/dist/display/figures.css.map +1 -0
- package/dist/display/figures.d.ts +132 -0
- package/dist/display/figures.d.ts.map +1 -0
- package/dist/display/figures.jsx +223 -0
- package/dist/display/image.css +46 -0
- package/dist/display/image.css.map +1 -0
- package/dist/display/image.d.ts +32 -0
- package/dist/display/image.d.ts.map +1 -0
- package/dist/display/image.jsx +49 -0
- package/dist/display/index.d.ts +6 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.jsx +6 -0
- package/dist/display/keycap.css +32 -0
- package/dist/display/keycap.css.map +1 -0
- package/dist/display/keycap.d.ts +20 -0
- package/dist/display/keycap.d.ts.map +1 -0
- package/dist/display/keycap.jsx +17 -0
- package/dist/display/motion-figures.css +168 -0
- package/dist/display/motion-figures.css.map +1 -0
- package/dist/display/motion-figures.d.ts +155 -0
- package/dist/display/motion-figures.d.ts.map +1 -0
- package/dist/display/motion-figures.jsx +246 -0
- package/dist/display/progress-bar.jsx +1 -3
- package/dist/display/separator.d.ts.map +1 -1
- package/dist/display/separator.jsx +2 -4
- package/dist/display/shimmer.jsx +0 -2
- package/dist/display/skeleton.css +72 -0
- package/dist/display/skeleton.css.map +1 -0
- package/dist/display/status.css +111 -0
- package/dist/display/status.css.map +1 -0
- package/dist/display/status.d.ts +67 -0
- package/dist/display/status.d.ts.map +1 -0
- package/dist/display/status.jsx +117 -0
- package/dist/display/theme-preview.css +244 -0
- package/dist/display/theme-preview.css.map +1 -0
- package/dist/display/theme-preview.d.ts +19 -0
- package/dist/display/theme-preview.d.ts.map +1 -0
- package/dist/display/theme-preview.jsx +89 -0
- package/dist/display/title-with-line.d.ts.map +1 -1
- package/dist/display/title-with-line.jsx +2 -4
- package/dist/edge-panel/edge-panel.jsx +0 -2
- package/dist/edge-panel/helper.jsx +0 -2
- package/dist/edge-panel/types.jsx +0 -2
- package/dist/effects/effects.css +94 -0
- package/dist/effects/effects.css.map +1 -0
- package/dist/effects/effects.d.ts +83 -0
- package/dist/effects/effects.d.ts.map +1 -0
- package/dist/effects/effects.jsx +183 -0
- package/dist/effects/index.d.ts +2 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.jsx +1 -0
- package/dist/expander/expander.d.ts +1 -0
- package/dist/expander/expander.d.ts.map +1 -1
- package/dist/expander/expander.jsx +22 -23
- package/dist/fields/dictation.jsx +0 -2
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +5 -6
- package/dist/fields/extra-entries.css +133 -0
- package/dist/fields/extra-entries.css.map +1 -0
- package/dist/fields/extra-entries.d.ts +98 -0
- package/dist/fields/extra-entries.d.ts.map +1 -0
- package/dist/fields/extra-entries.jsx +323 -0
- package/dist/fields/fields.css +4 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/index.d.ts +4 -3
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.jsx +1 -0
- package/dist/fields/input-policy.jsx +0 -2
- package/dist/fields/notch.jsx +0 -2
- package/dist/fields/outlined-field.d.ts +14 -0
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +12 -10
- package/dist/fields/pin-entry.d.ts.map +1 -1
- package/dist/fields/pin-entry.jsx +11 -13
- package/dist/fields/search-entry.jsx +2 -4
- package/dist/fields/slot-layout.jsx +0 -2
- package/dist/fields/text-entry.jsx +2 -4
- package/dist/fields/use-dictation.jsx +0 -2
- package/dist/fields/use-text-input.d.ts +1 -1
- package/dist/fields/use-text-input.jsx +0 -2
- package/dist/fields/validator.jsx +0 -2
- package/dist/guide/confirm-sheet.jsx +0 -2
- package/dist/guide/journey.jsx +0 -2
- package/dist/guide/placement.jsx +0 -2
- package/dist/guide/service.jsx +0 -2
- package/dist/guide/settings.jsx +0 -2
- package/dist/header/app-bar.d.ts +35 -0
- package/dist/header/app-bar.d.ts.map +1 -0
- package/dist/header/app-bar.jsx +64 -0
- package/dist/header/header.css +79 -0
- package/dist/header/header.css.map +1 -0
- package/dist/header/index.d.ts +2 -0
- package/dist/header/index.d.ts.map +1 -0
- package/dist/header/index.jsx +1 -0
- package/dist/host/back.jsx +0 -2
- package/dist/host/hooks.jsx +0 -2
- package/dist/host/host.css +1 -0
- package/dist/host/host.css.map +1 -1
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +50 -17
- package/dist/host/keyboard.jsx +0 -2
- package/dist/host/layers.jsx +0 -2
- package/dist/host/page-loading-overlay.jsx +0 -2
- package/dist/host/readiness.jsx +0 -2
- package/dist/host/registry.d.ts +9 -0
- package/dist/host/registry.d.ts.map +1 -1
- package/dist/host/registry.jsx +0 -2
- package/dist/icon/icon.d.ts +16 -0
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +53 -14
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.d.ts.map +1 -1
- package/dist/icon/index.jsx +1 -1
- package/dist/icon/slot.jsx +0 -2
- package/dist/icon/swatch.jsx +0 -2
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/containers.d.ts +113 -0
- package/dist/layout/containers.d.ts.map +1 -0
- package/dist/layout/containers.jsx +195 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.jsx +3 -0
- package/dist/layout/layout.css +361 -0
- package/dist/layout/layout.css.map +1 -0
- package/dist/layout/scroll-spy.d.ts +18 -0
- package/dist/layout/scroll-spy.d.ts.map +1 -0
- package/dist/layout/scroll-spy.jsx +38 -0
- package/dist/layout/scrollers.d.ts +96 -0
- package/dist/layout/scrollers.d.ts.map +1 -0
- package/dist/layout/scrollers.jsx +208 -0
- package/dist/list/gestures.d.ts +40 -0
- package/dist/list/gestures.d.ts.map +1 -0
- package/dist/list/gestures.jsx +142 -0
- package/dist/list/index.d.ts +4 -0
- package/dist/list/index.d.ts.map +1 -0
- package/dist/list/index.jsx +3 -0
- package/dist/list/list.css +194 -0
- package/dist/list/list.css.map +1 -0
- package/dist/list/rows.d.ts +69 -0
- package/dist/list/rows.d.ts.map +1 -0
- package/dist/list/rows.jsx +105 -0
- package/dist/list/virtual-list.d.ts +94 -0
- package/dist/list/virtual-list.d.ts.map +1 -0
- package/dist/list/virtual-list.jsx +159 -0
- package/dist/orb/hold-button.d.ts +26 -0
- package/dist/orb/hold-button.d.ts.map +1 -0
- package/dist/orb/hold-button.jsx +33 -0
- package/dist/orb/hold.d.ts +36 -0
- package/dist/orb/hold.d.ts.map +1 -0
- package/dist/orb/hold.jsx +76 -0
- package/dist/orb/index.d.ts +5 -0
- package/dist/orb/index.d.ts.map +1 -0
- package/dist/orb/index.jsx +4 -0
- package/dist/orb/model.d.ts +42 -0
- package/dist/orb/model.d.ts.map +1 -0
- package/dist/orb/model.jsx +42 -0
- package/dist/orb/orb.css +81 -0
- package/dist/orb/orb.css.map +1 -0
- package/dist/orb/orb.d.ts +61 -0
- package/dist/orb/orb.d.ts.map +1 -0
- package/dist/orb/orb.jsx +171 -0
- package/dist/pickers/combo-box.jsx +0 -2
- package/dist/pickers/date-time-picker.jsx +0 -2
- package/dist/pickers/date-time.jsx +0 -2
- package/dist/pickers/day-stepper.css +43 -0
- package/dist/pickers/day-stepper.css.map +1 -0
- package/dist/pickers/day-stepper.d.ts +31 -0
- package/dist/pickers/day-stepper.d.ts.map +1 -0
- package/dist/pickers/day-stepper.jsx +60 -0
- package/dist/pickers/index.d.ts +1 -0
- package/dist/pickers/index.d.ts.map +1 -1
- package/dist/pickers/index.jsx +1 -0
- package/dist/pickers/picker-sheet.jsx +0 -2
- package/dist/pickers/picker.d.ts +11 -0
- package/dist/pickers/picker.d.ts.map +1 -1
- package/dist/pickers/picker.jsx +53 -9
- package/dist/pickers/timespan-picker.jsx +0 -2
- package/dist/pickers/timespan.jsx +0 -2
- package/dist/pickers/trigger.jsx +0 -2
- package/dist/pickers/wheel-column.jsx +0 -2
- package/dist/plus-button/model.jsx +0 -2
- package/dist/plus-button/plus-button.jsx +0 -2
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.d.ts.map +1 -0
- package/dist/popover/index.jsx +2 -0
- package/dist/popover/popover.css +183 -0
- package/dist/popover/popover.css.map +1 -0
- package/dist/popover/popover.d.ts +139 -0
- package/dist/popover/popover.d.ts.map +1 -0
- package/dist/popover/popover.jsx +291 -0
- package/dist/popover/position.d.ts +35 -0
- package/dist/popover/position.d.ts.map +1 -0
- package/dist/popover/position.jsx +53 -0
- package/dist/popup/frame.jsx +0 -2
- package/dist/popup/input-form.jsx +0 -2
- package/dist/popup/input.jsx +0 -2
- package/dist/popup/popup-view.jsx +0 -2
- package/dist/popup/queue.jsx +0 -2
- package/dist/popup/service.jsx +0 -2
- package/dist/popup/types.jsx +0 -2
- package/dist/provider/activity.d.ts +13 -0
- package/dist/provider/activity.d.ts.map +1 -0
- package/dist/provider/activity.jsx +55 -0
- package/dist/provider/contexts.d.ts +32 -1
- package/dist/provider/contexts.d.ts.map +1 -1
- package/dist/provider/contexts.jsx +7 -3
- package/dist/provider/global-events.jsx +0 -2
- package/dist/provider/hooks.d.ts +16 -2
- package/dist/provider/hooks.d.ts.map +1 -1
- package/dist/provider/hooks.jsx +35 -7
- package/dist/provider/index.d.ts +4 -2
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.jsx +3 -1
- package/dist/provider/keep-alive.css +19 -0
- package/dist/provider/keep-alive.css.map +1 -0
- package/dist/provider/keep-alive.d.ts +23 -0
- package/dist/provider/keep-alive.d.ts.map +1 -0
- package/dist/provider/keep-alive.jsx +9 -0
- package/dist/provider/provider.css +1 -1
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts +13 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +128 -15
- package/dist/provider/settings.d.ts +23 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +5 -4
- package/dist/provider/theme-css.d.ts +1 -1
- package/dist/provider/theme-css.d.ts.map +1 -1
- package/dist/provider/theme-css.jsx +21 -10
- package/dist/provider/theme-root.d.ts.map +1 -1
- package/dist/provider/theme-root.jsx +7 -5
- package/dist/provider/theme.css +72 -0
- package/dist/provider/theme.css.map +1 -1
- package/dist/range-slider/index.d.ts +1 -0
- package/dist/range-slider/index.d.ts.map +1 -1
- package/dist/range-slider/index.jsx +1 -0
- package/dist/range-slider/math.jsx +0 -2
- package/dist/range-slider/range-slider.css +82 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.jsx +0 -2
- package/dist/range-slider/step-slider.d.ts +18 -0
- package/dist/range-slider/step-slider.d.ts.map +1 -0
- package/dist/range-slider/step-slider.jsx +55 -0
- package/dist/route/hooks.jsx +0 -2
- package/dist/route/router.jsx +0 -2
- package/dist/selection/model.jsx +0 -2
- package/dist/selection/selection-sheet.jsx +0 -2
- package/dist/selection/use-selection-model.jsx +0 -2
- package/dist/selection/window.jsx +0 -2
- package/dist/sheet/backdrop-scope.d.ts +14 -0
- package/dist/sheet/backdrop-scope.d.ts.map +1 -0
- package/dist/sheet/backdrop-scope.jsx +25 -0
- package/dist/sheet/context.d.ts +22 -0
- package/dist/sheet/context.d.ts.map +1 -0
- package/dist/sheet/context.jsx +7 -0
- package/dist/sheet/frame.d.ts +2 -17
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +23 -19
- package/dist/sheet/gesture.jsx +1 -3
- package/dist/sheet/handoff.jsx +0 -2
- package/dist/sheet/header.jsx +3 -3
- package/dist/sheet/height-memo.jsx +0 -2
- package/dist/sheet/index.d.ts +2 -0
- package/dist/sheet/index.d.ts.map +1 -1
- package/dist/sheet/index.jsx +2 -0
- package/dist/sheet/loadable.jsx +0 -2
- package/dist/sheet/motion.jsx +0 -2
- package/dist/sheet/options.d.ts +17 -0
- package/dist/sheet/options.d.ts.map +1 -1
- package/dist/sheet/options.jsx +2 -3
- package/dist/sheet/panel-frame.css +204 -0
- package/dist/sheet/panel-frame.css.map +1 -0
- package/dist/sheet/panel-frame.d.ts +16 -0
- package/dist/sheet/panel-frame.d.ts.map +1 -0
- package/dist/sheet/panel-frame.jsx +103 -0
- package/dist/sheet/processing.jsx +0 -2
- package/dist/sheet/scroll-indicator.jsx +0 -2
- package/dist/sheet/scroll-region.d.ts +19 -0
- package/dist/sheet/scroll-region.d.ts.map +1 -0
- package/dist/sheet/scroll-region.jsx +58 -0
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +23 -9
- package/dist/sheet/sheet.css +33 -0
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/sheet/sheet.jsx +0 -2
- package/dist/sheet/sizing.d.ts +3 -3
- package/dist/sheet/sizing.jsx +0 -2
- package/dist/sheet/stack.jsx +0 -2
- package/dist/shell/index.d.ts +2 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.jsx +1 -0
- package/dist/shell/shell.css +342 -0
- package/dist/shell/shell.css.map +1 -0
- package/dist/shell/shell.d.ts +121 -0
- package/dist/shell/shell.d.ts.map +1 -0
- package/dist/shell/shell.jsx +214 -0
- package/dist/survey/index.d.ts +2 -0
- package/dist/survey/index.d.ts.map +1 -0
- package/dist/survey/index.jsx +1 -0
- package/dist/survey/survey.css +204 -0
- package/dist/survey/survey.css.map +1 -0
- package/dist/survey/survey.d.ts +76 -0
- package/dist/survey/survey.d.ts.map +1 -0
- package/dist/survey/survey.jsx +205 -0
- package/dist/swipe/model.jsx +0 -2
- package/dist/swipe/swipe-view.jsx +0 -2
- package/dist/tab-bar/metrics.jsx +20 -22
- package/dist/tab-bar/model.d.ts +2 -0
- package/dist/tab-bar/model.d.ts.map +1 -1
- package/dist/tab-bar/model.jsx +10 -6
- package/dist/tab-bar/tab-bar.css +74 -0
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts +7 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +51 -17
- package/dist/tabs/model.jsx +0 -2
- package/dist/tabs/tab-view.d.ts +1 -0
- package/dist/tabs/tab-view.d.ts.map +1 -1
- package/dist/tabs/tab-view.jsx +6 -5
- package/dist/tabs/tabs.css +1 -0
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toast/service.d.ts.map +1 -1
- package/dist/toast/service.jsx +34 -16
- package/dist/toast/store.jsx +0 -2
- package/dist/toggle/checkbox-math.jsx +0 -2
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +10 -12
- package/dist/toggle/chip-group.d.ts.map +1 -1
- package/dist/toggle/chip-group.jsx +8 -7
- package/dist/toggle/choice.css +254 -0
- package/dist/toggle/choice.css.map +1 -0
- package/dist/toggle/choice.d.ts +125 -0
- package/dist/toggle/choice.d.ts.map +1 -0
- package/dist/toggle/choice.jsx +367 -0
- package/dist/toggle/index.d.ts +2 -1
- package/dist/toggle/index.d.ts.map +1 -1
- package/dist/toggle/index.jsx +1 -0
- package/dist/toggle/switch.d.ts.map +1 -1
- package/dist/toggle/switch.jsx +8 -11
- package/package.json +126 -16
- package/tailwind/index.d.ts +13 -0
- package/tailwind/index.mjs +87 -0
- package/tailwind/index.test.mjs +24 -0
- package/tailwind/tokens.mjs +98 -0
- package/dist/anchor/context.jsx.map +0 -1
- package/dist/anchor/hooks.jsx.map +0 -1
- package/dist/anchor/measure.jsx.map +0 -1
- package/dist/anchor/registry.jsx.map +0 -1
- package/dist/anchor/scroll.jsx.map +0 -1
- package/dist/base/control.jsx.map +0 -1
- package/dist/base/corner-badge.jsx.map +0 -1
- package/dist/base/disposer.jsx.map +0 -1
- package/dist/base/press.jsx.map +0 -1
- package/dist/base/pressable.jsx.map +0 -1
- package/dist/base/selection-item.jsx.map +0 -1
- package/dist/base/timers.jsx.map +0 -1
- package/dist/base/use-controllable-state.jsx.map +0 -1
- package/dist/base/use-stable-callback.jsx.map +0 -1
- package/dist/button/button.jsx.map +0 -1
- package/dist/button/header-action-button.jsx.map +0 -1
- package/dist/button/icon-button.jsx.map +0 -1
- package/dist/button/nav-card.jsx.map +0 -1
- package/dist/button/safe-tap.jsx.map +0 -1
- package/dist/button/safe.jsx.map +0 -1
- package/dist/button/vertical-icon-text-button.jsx.map +0 -1
- package/dist/button/visuals.jsx.map +0 -1
- package/dist/cascade/cascade-panel.jsx.map +0 -1
- package/dist/cascade/model.jsx.map +0 -1
- package/dist/deferred/deferred-content.jsx.map +0 -1
- package/dist/deferred/readiness-signal.jsx.map +0 -1
- package/dist/display/activity-indicator.jsx.map +0 -1
- package/dist/display/culture-date-time-label.jsx.map +0 -1
- package/dist/display/progress-bar.jsx.map +0 -1
- package/dist/display/separator.jsx.map +0 -1
- package/dist/display/shimmer.jsx.map +0 -1
- package/dist/display/title-with-line.jsx.map +0 -1
- package/dist/edge-panel/edge-panel.jsx.map +0 -1
- package/dist/edge-panel/helper.jsx.map +0 -1
- package/dist/edge-panel/types.jsx.map +0 -1
- package/dist/expander/expander.jsx.map +0 -1
- package/dist/fields/dictation.jsx.map +0 -1
- package/dist/fields/editor.jsx.map +0 -1
- package/dist/fields/input-policy.jsx.map +0 -1
- package/dist/fields/notch.jsx.map +0 -1
- package/dist/fields/outlined-field.jsx.map +0 -1
- package/dist/fields/pin-entry.jsx.map +0 -1
- package/dist/fields/search-entry.jsx.map +0 -1
- package/dist/fields/slot-layout.jsx.map +0 -1
- package/dist/fields/text-entry.jsx.map +0 -1
- package/dist/fields/use-dictation.jsx.map +0 -1
- package/dist/fields/use-text-input.jsx.map +0 -1
- package/dist/fields/validator.jsx.map +0 -1
- package/dist/guide/confirm-sheet.jsx.map +0 -1
- package/dist/guide/journey.jsx.map +0 -1
- package/dist/guide/placement.jsx.map +0 -1
- package/dist/guide/service.jsx.map +0 -1
- package/dist/guide/settings.jsx.map +0 -1
- package/dist/host/back.jsx.map +0 -1
- package/dist/host/hooks.jsx.map +0 -1
- package/dist/host/host.jsx.map +0 -1
- package/dist/host/keyboard.jsx.map +0 -1
- package/dist/host/layers.jsx.map +0 -1
- package/dist/host/page-loading-overlay.jsx.map +0 -1
- package/dist/host/readiness.jsx.map +0 -1
- package/dist/host/registry.jsx.map +0 -1
- package/dist/icon/icon.jsx.map +0 -1
- package/dist/icon/slot.jsx.map +0 -1
- package/dist/icon/swatch.jsx.map +0 -1
- package/dist/pickers/combo-box.jsx.map +0 -1
- package/dist/pickers/date-time-picker.jsx.map +0 -1
- package/dist/pickers/date-time.jsx.map +0 -1
- package/dist/pickers/picker-sheet.jsx.map +0 -1
- package/dist/pickers/picker.jsx.map +0 -1
- package/dist/pickers/timespan-picker.jsx.map +0 -1
- package/dist/pickers/timespan.jsx.map +0 -1
- package/dist/pickers/trigger.jsx.map +0 -1
- package/dist/pickers/wheel-column.jsx.map +0 -1
- package/dist/plus-button/model.jsx.map +0 -1
- package/dist/plus-button/plus-button.jsx.map +0 -1
- package/dist/popup/frame.jsx.map +0 -1
- package/dist/popup/input-form.jsx.map +0 -1
- package/dist/popup/input.jsx.map +0 -1
- package/dist/popup/popup-view.jsx.map +0 -1
- package/dist/popup/queue.jsx.map +0 -1
- package/dist/popup/service.jsx.map +0 -1
- package/dist/popup/types.jsx.map +0 -1
- package/dist/provider/contexts.jsx.map +0 -1
- package/dist/provider/global-events.jsx.map +0 -1
- package/dist/provider/hooks.jsx.map +0 -1
- package/dist/provider/provider.jsx.map +0 -1
- package/dist/provider/settings.jsx.map +0 -1
- package/dist/provider/theme-css.jsx.map +0 -1
- package/dist/provider/theme-root.jsx.map +0 -1
- package/dist/range-slider/math.jsx.map +0 -1
- package/dist/range-slider/range-slider.jsx.map +0 -1
- package/dist/route/hooks.jsx.map +0 -1
- package/dist/route/router.jsx.map +0 -1
- package/dist/selection/model.jsx.map +0 -1
- package/dist/selection/selection-sheet.jsx.map +0 -1
- package/dist/selection/use-selection-model.jsx.map +0 -1
- package/dist/selection/window.jsx.map +0 -1
- package/dist/sheet/frame.jsx.map +0 -1
- package/dist/sheet/gesture.jsx.map +0 -1
- package/dist/sheet/handoff.jsx.map +0 -1
- package/dist/sheet/header.jsx.map +0 -1
- package/dist/sheet/height-memo.jsx.map +0 -1
- package/dist/sheet/loadable.jsx.map +0 -1
- package/dist/sheet/motion.jsx.map +0 -1
- package/dist/sheet/options.jsx.map +0 -1
- package/dist/sheet/processing.jsx.map +0 -1
- package/dist/sheet/scroll-indicator.jsx.map +0 -1
- package/dist/sheet/service.jsx.map +0 -1
- package/dist/sheet/sheet.jsx.map +0 -1
- package/dist/sheet/sizing.jsx.map +0 -1
- package/dist/sheet/stack.jsx.map +0 -1
- package/dist/swipe/model.jsx.map +0 -1
- package/dist/swipe/swipe-view.jsx.map +0 -1
- package/dist/tab-bar/metrics.jsx.map +0 -1
- package/dist/tab-bar/model.jsx.map +0 -1
- package/dist/tab-bar/tab-bar.jsx.map +0 -1
- package/dist/tabs/model.jsx.map +0 -1
- package/dist/tabs/tab-view.jsx.map +0 -1
- package/dist/toast/service.jsx.map +0 -1
- package/dist/toast/store.jsx.map +0 -1
- package/dist/toggle/checkbox-math.jsx.map +0 -1
- package/dist/toggle/checkbox.jsx.map +0 -1
- package/dist/toggle/chip-group.jsx.map +0 -1
- package/dist/toggle/switch.jsx.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const g9OrbTuckShare = 0.35;
|
|
2
|
+
const g9OrbDragSlop = 6;
|
|
3
|
+
function g9OrbClampTop(top, b) {
|
|
4
|
+
const min = b.insetTop + b.margin;
|
|
5
|
+
const max = Math.max(min, b.height - b.insetBottom - b.margin - b.size);
|
|
6
|
+
return Math.min(max, Math.max(min, top));
|
|
7
|
+
}
|
|
8
|
+
function g9OrbLeft(place, b, visible) {
|
|
9
|
+
if (place.tucked) return 'left' === place.side ? visible - b.size : b.width - visible;
|
|
10
|
+
return 'left' === place.side ? b.margin : b.width - b.margin - b.size;
|
|
11
|
+
}
|
|
12
|
+
function g9OrbSnap(left, top, b) {
|
|
13
|
+
const side = left + b.size / 2 < b.width / 2 ? 'left' : 'right';
|
|
14
|
+
const past = 'left' === side ? -left : left + b.size - b.width;
|
|
15
|
+
return {
|
|
16
|
+
side,
|
|
17
|
+
top: g9OrbClampTop(top, b),
|
|
18
|
+
tucked: past >= b.size * g9OrbTuckShare
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function g9OrbDefaultPlace(side, b) {
|
|
22
|
+
return {
|
|
23
|
+
side,
|
|
24
|
+
top: g9OrbClampTop((b.height - b.size) / 2, b),
|
|
25
|
+
tucked: false
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const remembered = new Map();
|
|
29
|
+
function g9OrbRemembered(key) {
|
|
30
|
+
var _remembered_get;
|
|
31
|
+
return key ? null != (_remembered_get = remembered.get(key)) ? _remembered_get : null : null;
|
|
32
|
+
}
|
|
33
|
+
function g9OrbRemember(key, place) {
|
|
34
|
+
if (!key) return;
|
|
35
|
+
if (place) remembered.set(key, place);
|
|
36
|
+
else remembered.delete(key);
|
|
37
|
+
}
|
|
38
|
+
function g9HoldProgress(elapsedMs, delayMs, durationMs) {
|
|
39
|
+
if (durationMs <= 0) return elapsedMs >= delayMs ? 1 : 0;
|
|
40
|
+
return Math.min(1, Math.max(0, (elapsedMs - delayMs) / durationMs));
|
|
41
|
+
}
|
|
42
|
+
export { g9HoldProgress, g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap, g9OrbTuckShare };
|
package/dist/orb/orb.css
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.g9-orb {
|
|
2
|
+
justify-content: center;
|
|
3
|
+
align-items: center;
|
|
4
|
+
display: flex;
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
overflow: visible;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.g9-orb__face {
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
display: flex;
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
right: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.g9-orb__liquid-mask {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
display: flex;
|
|
25
|
+
position: absolute;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.g9-orb__liquid {
|
|
30
|
+
opacity: .82;
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
right: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.g9-orb__accessory {
|
|
39
|
+
align-items: center;
|
|
40
|
+
display: flex;
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 0;
|
|
43
|
+
bottom: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.g9-hold-button {
|
|
47
|
+
background-color: var(--g9-surface-container-high);
|
|
48
|
+
border-style: solid;
|
|
49
|
+
border-width: 1px;
|
|
50
|
+
border-color: var(--g9-outline-variant);
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
display: flex;
|
|
54
|
+
position: relative;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.g9-hold-button--disabled {
|
|
59
|
+
opacity: .38;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.g9-hold-button__fill {
|
|
63
|
+
opacity: .28;
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
right: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.g9-hold-button__text {
|
|
72
|
+
color: var(--g9-on-surface);
|
|
73
|
+
text-align: center;
|
|
74
|
+
padding-left: 16px;
|
|
75
|
+
padding-right: 16px;
|
|
76
|
+
font-size: 15px;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/*# sourceMappingURL=orb.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./src/orb/orb.css"],"names":[],"mappings":"AACA;EAAE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,iBAAiB;AACnB;;AAGA;EAAE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,oBAAoB;EACpB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAIA;EADE,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAKA;EAFE,kDAAkD;EAClD,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAKA;EAFE,YAAY;AACd;;AAKA;EAFE,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAKA;EAFE,2BAA2B;EAC3B,kBAAkB;EAClB,kBAAkB;EAClB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;AAClB","sourcesContent":["/* G9FloatingOrb: positioned by its transform only (one compositor property while it settles or is dragged). */\n.g9-orb {\n position: absolute;\n left: 0;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: visible;\n}\n\n.g9-orb__face {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* The hold's liquid, clipped to the disc; it rises by its transform (a CSS transition, no frame loop). */\n.g9-orb__liquid-mask {\n position: absolute;\n overflow: hidden;\n display: flex;\n pointer-events: none;\n}\n\n.g9-orb__liquid {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n opacity: 0.82;\n}\n\n.g9-orb__accessory {\n position: absolute;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n}\n\n/* G9HoldButton: neutral at rest; a light fill grows from the leading edge only under a finger. */\n.g9-hold-button {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n background-color: var(--g9-surface-container-high);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n}\n\n.g9-hold-button--disabled {\n opacity: 0.38;\n}\n\n.g9-hold-button__fill {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n opacity: 0.28;\n}\n\n.g9-hold-button__text {\n font-size: 15px;\n font-weight: 600;\n color: var(--g9-on-surface);\n padding-left: 16px;\n padding-right: 16px;\n text-align: center;\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import './orb.css';
|
|
2
|
+
import { type ReactNode } from '@lynx-js/react';
|
|
3
|
+
import { type G9StyleProp } from '../base/control.js';
|
|
4
|
+
import { type G9HoldOptions } from './hold.js';
|
|
5
|
+
import { type G9OrbSide } from './model.js';
|
|
6
|
+
/** The orb's hold-to-act (a stop, a delete): its colour and the hold options. */
|
|
7
|
+
export interface G9OrbHold extends G9HoldOptions {
|
|
8
|
+
/** The liquid's colour. Default `var(--g9-error)`. */
|
|
9
|
+
readonly color?: string;
|
|
10
|
+
}
|
|
11
|
+
/** What the orb's content is told about the press (to dim a label, show «hold…»). */
|
|
12
|
+
export interface G9OrbContentState {
|
|
13
|
+
readonly holding: boolean;
|
|
14
|
+
readonly tucked: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** Props of {@link G9FloatingOrb}. */
|
|
17
|
+
export interface G9FloatingOrbProps {
|
|
18
|
+
/** Logical id (`Tracking.Orb`); the element carries the selector-safe one. */
|
|
19
|
+
readonly id?: string;
|
|
20
|
+
/** The physical side it first appears on (the culture never mirrors it). Default `'right'`. */
|
|
21
|
+
readonly side?: G9OrbSide;
|
|
22
|
+
/** Remembers where the operator left it, for the app session (several orbs: one key each). */
|
|
23
|
+
readonly placeKey?: string;
|
|
24
|
+
/** The square touch box, in dp. Default 84. */
|
|
25
|
+
readonly size?: number;
|
|
26
|
+
/** The disc inside the box (the hold's liquid is clipped to it), in dp. Default 60. */
|
|
27
|
+
readonly discSize?: number;
|
|
28
|
+
/** Gap to the screen edge at rest. Default 14. */
|
|
29
|
+
readonly margin?: number;
|
|
30
|
+
/** How much of the disc a tucked orb leaves showing. Default 12. */
|
|
31
|
+
readonly tuckedVisible?: number;
|
|
32
|
+
/** Kept free at the top (status bar, a toolbar) and the bottom (the tab bar). Default 0. */
|
|
33
|
+
readonly insetTop?: number;
|
|
34
|
+
readonly insetBottom?: number;
|
|
35
|
+
/** Out of sight AND out of hit-testing (an orb at opacity 0 would still take taps). */
|
|
36
|
+
readonly hidden?: boolean;
|
|
37
|
+
/** A tap (not on a tucked orb: that tap brings it back). */
|
|
38
|
+
readonly onTap?: () => void;
|
|
39
|
+
/** Hold-to-act on the orb itself; absent = a press is only ever a tap. */
|
|
40
|
+
readonly hold?: G9OrbHold | null;
|
|
41
|
+
/** Shown beside the orb toward the middle of the screen (a «Follow» chip); hidden while tucked. */
|
|
42
|
+
readonly accessory?: ReactNode;
|
|
43
|
+
/** The disc's face; a function gets the press state. */
|
|
44
|
+
readonly children?: ReactNode | ((state: G9OrbContentState) => ReactNode);
|
|
45
|
+
/** Spoken description. */
|
|
46
|
+
readonly accessibilityLabel?: string;
|
|
47
|
+
readonly className?: string;
|
|
48
|
+
readonly style?: G9StyleProp;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A control that floats over a page and the operator can move: drag it anywhere — it snaps to the nearer side along the
|
|
52
|
+
* edge, remembered for the app session; push it past the edge — it tucks, a sliver of the disc left showing, and a tap
|
|
53
|
+
* brings it back; tap it; optionally HOLD it to act (a red liquid rises in the disc, a tick each second). MAUI's
|
|
54
|
+
* TrackingOrbView and SyncOrbView gestures, as one control.
|
|
55
|
+
*
|
|
56
|
+
* Cost: the drag runs on the MAIN THREAD — each move sets the box's transform there, no React render and no bridge
|
|
57
|
+
* call per move; JS hears the gesture's start, its first move and its end. The hold is one timeout plus a 1 s interval
|
|
58
|
+
* while a finger is down; the liquid is a CSS transition. Nothing runs while the orb is idle.
|
|
59
|
+
*/
|
|
60
|
+
export declare const G9FloatingOrb: import("react").NamedExoticComponent<G9FloatingOrbProps>;
|
|
61
|
+
//# sourceMappingURL=orb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orb.d.ts","sourceRoot":"","sources":["../../src/orb/orb.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,EAAQ,KAAK,SAAS,EAAwD,MAAM,gBAAgB,CAAC;AAE5G,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,QAAQ,CAAC;AACvD,OAAO,EAGL,KAAK,SAAS,EAQf,MAAM,SAAS,CAAC;AAEjB,iFAAiF;AACjF,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,sDAAsD;IACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,qFAAqF;AACrF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,4DAA4D;IAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,mGAAmG;IACnG,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAC;IAC1E,0BAA0B;IAC1B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;CAC9B;AAQD;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,0DAmJxB,CAAC"}
|
package/dist/orb/orb.jsx
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import "./orb.css";
|
|
2
|
+
import { memo, runOnBackground, useMainThreadRef, useMemo, useState } from "@lynx-js/react";
|
|
3
|
+
import { g9IdProps, mergeStyle } from "../base/control.jsx";
|
|
4
|
+
import { useG9Window } from "../provider/hooks.jsx";
|
|
5
|
+
import { useG9Hold } from "./hold.jsx";
|
|
6
|
+
import { g9OrbClampTop, g9OrbDefaultPlace, g9OrbDragSlop, g9OrbLeft, g9OrbRemember, g9OrbRemembered, g9OrbSnap } from "./model.jsx";
|
|
7
|
+
const SETTLE_MS = 220;
|
|
8
|
+
function noopMT() {
|
|
9
|
+
'main thread';
|
|
10
|
+
}
|
|
11
|
+
const G9FloatingOrb = memo(function(props) {
|
|
12
|
+
var _props_size, _props_discSize, _props_tuckedVisible, _ref, _ref1, _props_accessibilityLabel, _props_hold_color;
|
|
13
|
+
var _props_hold, _props_hold1, _props_hold2;
|
|
14
|
+
const window = useG9Window();
|
|
15
|
+
const size = null != (_props_size = props.size) ? _props_size : 84;
|
|
16
|
+
const disc = Math.min(size, null != (_props_discSize = props.discSize) ? _props_discSize : 60);
|
|
17
|
+
const visible = null != (_props_tuckedVisible = props.tuckedVisible) ? _props_tuckedVisible : 12;
|
|
18
|
+
const bounds = useMemo(()=>{
|
|
19
|
+
var _props_margin, _props_insetTop, _props_insetBottom;
|
|
20
|
+
return {
|
|
21
|
+
width: window.width,
|
|
22
|
+
height: window.height,
|
|
23
|
+
size,
|
|
24
|
+
margin: null != (_props_margin = props.margin) ? _props_margin : 14,
|
|
25
|
+
insetTop: null != (_props_insetTop = props.insetTop) ? _props_insetTop : 0,
|
|
26
|
+
insetBottom: null != (_props_insetBottom = props.insetBottom) ? _props_insetBottom : 0
|
|
27
|
+
};
|
|
28
|
+
}, [
|
|
29
|
+
window.width,
|
|
30
|
+
window.height,
|
|
31
|
+
size,
|
|
32
|
+
props.margin,
|
|
33
|
+
props.insetTop,
|
|
34
|
+
props.insetBottom
|
|
35
|
+
]);
|
|
36
|
+
const [place, setPlace] = useState(()=>{
|
|
37
|
+
var _g9OrbRemembered, _props_side;
|
|
38
|
+
return null != (_g9OrbRemembered = g9OrbRemembered(props.placeKey)) ? _g9OrbRemembered : g9OrbDefaultPlace(null != (_props_side = props.side) ? _props_side : 'right', bounds);
|
|
39
|
+
});
|
|
40
|
+
const atRest = {
|
|
41
|
+
side: place.side,
|
|
42
|
+
top: g9OrbClampTop(place.top, bounds),
|
|
43
|
+
tucked: place.tucked
|
|
44
|
+
};
|
|
45
|
+
const left = g9OrbLeft(atRest, bounds, visible);
|
|
46
|
+
const holdEnabled = !!props.hold && false !== props.hold.enabled && !atRest.tucked && !props.hidden;
|
|
47
|
+
const hold = useG9Hold({
|
|
48
|
+
durationMs: null != (_ref = null == (_props_hold = props.hold) ? void 0 : _props_hold.durationMs) ? _ref : 5000,
|
|
49
|
+
delayMs: null != (_ref1 = null == (_props_hold1 = props.hold) ? void 0 : _props_hold1.delayMs) ? _ref1 : 300,
|
|
50
|
+
enabled: holdEnabled,
|
|
51
|
+
onComplete: ()=>{
|
|
52
|
+
var _props_hold;
|
|
53
|
+
return null == (_props_hold = props.hold) ? void 0 : _props_hold.onComplete();
|
|
54
|
+
},
|
|
55
|
+
...(null == (_props_hold2 = props.hold) ? void 0 : _props_hold2.onTick) ? {
|
|
56
|
+
onTick: props.hold.onTick
|
|
57
|
+
} : {}
|
|
58
|
+
});
|
|
59
|
+
const gesture = useMainThreadRef({
|
|
60
|
+
x: 0,
|
|
61
|
+
y: 0,
|
|
62
|
+
moved: false,
|
|
63
|
+
active: false
|
|
64
|
+
});
|
|
65
|
+
const box = useMainThreadRef(null);
|
|
66
|
+
const restX = left;
|
|
67
|
+
const restY = atRest.top;
|
|
68
|
+
const onPress = ()=>hold.press();
|
|
69
|
+
const onDragStart = ()=>hold.cancel();
|
|
70
|
+
const onDragEnd = (x, y)=>{
|
|
71
|
+
const next = g9OrbSnap(x, y, bounds);
|
|
72
|
+
g9OrbRemember(props.placeKey, next);
|
|
73
|
+
setPlace(next);
|
|
74
|
+
};
|
|
75
|
+
const onRelease = ()=>{
|
|
76
|
+
var _props_onTap;
|
|
77
|
+
const kind = hold.release();
|
|
78
|
+
if ('tap' !== kind) return;
|
|
79
|
+
if (atRest.tucked) {
|
|
80
|
+
const back = {
|
|
81
|
+
...atRest,
|
|
82
|
+
tucked: false
|
|
83
|
+
};
|
|
84
|
+
g9OrbRemember(props.placeKey, back);
|
|
85
|
+
setPlace(back);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
null == (_props_onTap = props.onTap) || _props_onTap.call(props);
|
|
89
|
+
};
|
|
90
|
+
const onCancel = ()=>hold.cancel();
|
|
91
|
+
const hidden = true === props.hidden;
|
|
92
|
+
function startMT(e) {
|
|
93
|
+
'main thread';
|
|
94
|
+
gesture.current = {
|
|
95
|
+
x: e.detail.x,
|
|
96
|
+
y: e.detail.y,
|
|
97
|
+
moved: false,
|
|
98
|
+
active: true
|
|
99
|
+
};
|
|
100
|
+
runOnBackground(onPress)();
|
|
101
|
+
}
|
|
102
|
+
function moveMT(e) {
|
|
103
|
+
'main thread';
|
|
104
|
+
var _box_current;
|
|
105
|
+
const g = gesture.current;
|
|
106
|
+
if (!g.active) return;
|
|
107
|
+
const dx = e.detail.x - g.x;
|
|
108
|
+
const dy = e.detail.y - g.y;
|
|
109
|
+
if (!g.moved) {
|
|
110
|
+
if (Math.abs(dx) < g9OrbDragSlop && Math.abs(dy) < g9OrbDragSlop) return;
|
|
111
|
+
g.moved = true;
|
|
112
|
+
runOnBackground(onDragStart)();
|
|
113
|
+
}
|
|
114
|
+
null == (_box_current = box.current) || _box_current.setStyleProperties({
|
|
115
|
+
transition: 'none',
|
|
116
|
+
transform: `translate(${restX + dx}px, ${restY + dy}px)`
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function endMT(e) {
|
|
120
|
+
'main thread';
|
|
121
|
+
const g = gesture.current;
|
|
122
|
+
if (!g.active) return;
|
|
123
|
+
g.active = false;
|
|
124
|
+
if (g.moved) runOnBackground(onDragEnd)(restX + e.detail.x - g.x, restY + e.detail.y - g.y);
|
|
125
|
+
else runOnBackground(onRelease)();
|
|
126
|
+
}
|
|
127
|
+
function cancelMT() {
|
|
128
|
+
'main thread';
|
|
129
|
+
gesture.current.active = false;
|
|
130
|
+
runOnBackground(onCancel)();
|
|
131
|
+
}
|
|
132
|
+
const content = 'function' == typeof props.children ? props.children({
|
|
133
|
+
holding: hold.holding,
|
|
134
|
+
tucked: atRest.tucked
|
|
135
|
+
}) : props.children;
|
|
136
|
+
const accessoryOnLeft = 'right' === atRest.side;
|
|
137
|
+
return <view {...g9IdProps(props.id)} main-thread:ref={box} className={`g9-orb${props.className ? ` ${props.className}` : ''}`} accessibility-element accessibility-label={null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : ''} event-through={false} consume-slide-event={[
|
|
138
|
+
[
|
|
139
|
+
-180,
|
|
140
|
+
180
|
|
141
|
+
]
|
|
142
|
+
]} main-thread:bindtouchstart={hidden ? noopMT : startMT} main-thread:bindtouchmove={hidden ? noopMT : moveMT} main-thread:bindtouchend={hidden ? noopMT : endMT} main-thread:bindtouchcancel={hidden ? noopMT : cancelMT} style={mergeStyle({
|
|
143
|
+
width: `${size}px`,
|
|
144
|
+
height: `${size}px`,
|
|
145
|
+
transform: `translate(${left}px, ${atRest.top}px)`,
|
|
146
|
+
transition: `transform ${SETTLE_MS}ms ease-out, opacity ${SETTLE_MS}ms ease-out`,
|
|
147
|
+
opacity: hidden ? '0' : '1',
|
|
148
|
+
pointerEvents: hidden ? 'none' : 'auto'
|
|
149
|
+
}, props.style)}>
|
|
150
|
+
<view className="g9-orb__face">{content}</view>
|
|
151
|
+
{props.hold ? <view className="g9-orb__liquid-mask" style={{
|
|
152
|
+
width: `${disc}px`,
|
|
153
|
+
height: `${disc}px`,
|
|
154
|
+
borderRadius: `${disc / 2}px`
|
|
155
|
+
}}>
|
|
156
|
+
<view className="g9-orb__liquid" style={{
|
|
157
|
+
backgroundColor: null != (_props_hold_color = props.hold.color) ? _props_hold_color : 'var(--g9-error)',
|
|
158
|
+
transform: hold.holding ? 'translateY(0%)' : 'translateY(100%)',
|
|
159
|
+
transition: hold.holding ? `transform ${hold.fillMs}ms linear` : 'transform 180ms ease-in'
|
|
160
|
+
}}/>
|
|
161
|
+
</view> : null}
|
|
162
|
+
{props.accessory && !atRest.tucked && !hidden ? <view className="g9-orb__accessory" style={accessoryOnLeft ? {
|
|
163
|
+
right: `${size + 6}px`
|
|
164
|
+
} : {
|
|
165
|
+
left: `${size + 6}px`
|
|
166
|
+
}}>
|
|
167
|
+
{props.accessory}
|
|
168
|
+
</view> : null}
|
|
169
|
+
</view>;
|
|
170
|
+
});
|
|
171
|
+
export { G9FloatingOrb };
|
|
@@ -126,5 +126,3 @@ function formatPickerValue(value, culture, options = {}) {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
export { asDateTime, clampPickerValue, compareDateTime, composePickerValue, dayWheelItems, formatPickerValue, g9YearWindowRadius, hourWheelItems, minuteWheelItems, monthWheelItems, normalizePickerBounds, pickerParts, resolvePickerCalendar, yearWheelItems, yearWindow };
|
|
129
|
-
|
|
130
|
-
//# sourceMappingURL=date-time.jsx.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.g9-day-stepper {
|
|
2
|
+
flex-direction: column;
|
|
3
|
+
row-gap: 8px;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.g9-day-stepper__row {
|
|
8
|
+
align-items: center;
|
|
9
|
+
column-gap: 8px;
|
|
10
|
+
display: flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.g9-day-stepper__arrow {
|
|
14
|
+
background-color: var(--g9-surface-container-high);
|
|
15
|
+
border-radius: 22px;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
width: 44px;
|
|
19
|
+
height: 44px;
|
|
20
|
+
display: flex;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.g9-day-stepper__arrow--off {
|
|
24
|
+
opacity: .35;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.g9-day-stepper__day {
|
|
28
|
+
text-align: center;
|
|
29
|
+
color: var(--g9-text-primary);
|
|
30
|
+
flex: 1;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.g9-day-stepper__shortcuts {
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
gap: 6px;
|
|
39
|
+
display: flex;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/*# sourceMappingURL=day-stepper.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./src/pickers/day-stepper.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAGA;EAAE,kDAAkD;EAClD,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,YAAY;AACd;;AAGA;EAAE,kBAAkB;EAClB,6BAA6B;EAC7B,OAAO;EACP,eAAe;EACf,gBAAgB;AAClB;;AAGA;EAAE,eAAe;EACf,uBAAuB;EACvB,QAAQ;EACR,aAAa;AACf","sourcesContent":["/* G9DayStepper. */\n.g9-day-stepper {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n}\n\n.g9-day-stepper__row {\n display: flex;\n align-items: center;\n column-gap: 8px;\n}\n\n.g9-day-stepper__arrow {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 22px;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-day-stepper__arrow--off {\n opacity: 0.35;\n}\n\n.g9-day-stepper__day {\n flex: 1;\n text-align: center;\n font-size: 16px;\n font-weight: 700;\n color: var(--g9-text-primary);\n}\n\n.g9-day-stepper__shortcuts {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n justify-content: center;\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import './day-stepper.css';
|
|
2
|
+
import { type G9LocalDate } from '@g9tm/lynxcontrols-foundation';
|
|
3
|
+
import type { ReactNode } from '@lynx-js/react';
|
|
4
|
+
import { type G9ControlBaseProps } from '../base/control.js';
|
|
5
|
+
/** A quick jump under the day (`'today'`, `'tomorrow'`, `'nextWeek'`) with its label. */
|
|
6
|
+
export interface G9DayShortcut {
|
|
7
|
+
readonly key: string;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
/** Days from today. */
|
|
10
|
+
readonly offset: number;
|
|
11
|
+
}
|
|
12
|
+
/** Props of {@link G9DayStepper}. */
|
|
13
|
+
export interface G9DayStepperProps extends G9ControlBaseProps {
|
|
14
|
+
readonly value?: G9LocalDate;
|
|
15
|
+
readonly defaultValue?: G9LocalDate;
|
|
16
|
+
readonly onChange?: (day: G9LocalDate) => void;
|
|
17
|
+
/** Today (from the provider's clock in the app). Required: renders stay pure. */
|
|
18
|
+
readonly today: G9LocalDate;
|
|
19
|
+
readonly min?: G9LocalDate;
|
|
20
|
+
readonly max?: G9LocalDate;
|
|
21
|
+
/** Day text pattern. Default `'dddd d MMMM'` (in the culture's calendar: «چهارشنبه ۲۷ آبان»). */
|
|
22
|
+
readonly pattern?: string;
|
|
23
|
+
/** Chips under the day. Default none. */
|
|
24
|
+
readonly shortcuts?: readonly G9DayShortcut[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* One day with back/forward and quick jumps (SAC EventsPage DatePick, reservation days): the calendar of the culture on
|
|
28
|
+
* screen, an ISO-able `G9LocalDate` underneath; the arrows point the reading direction's way.
|
|
29
|
+
*/
|
|
30
|
+
export declare function G9DayStepper(props: G9DayStepperProps): ReactNode;
|
|
31
|
+
//# sourceMappingURL=day-stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"day-stepper.d.ts","sourceRoot":"","sources":["../../src/pickers/day-stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAKL,KAAK,WAAW,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,kBAAkB,EAAkD,MAAM,iBAAiB,CAAC;AAM1G,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uBAAuB;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,qCAAqC;AACrC,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAC3B,iGAAiG;IACjG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAwEhE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "./day-stepper.css";
|
|
2
|
+
import { G9Glyph, addDays, compareLocal, formatLocalDateTime, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
+
import { g9ChildId, g9IdProps, g9RowStyle, useG9Control } from "../base/control.jsx";
|
|
4
|
+
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
5
|
+
import { G9Icon } from "../icon/icon.jsx";
|
|
6
|
+
import { useG9Culture } from "../provider/hooks.jsx";
|
|
7
|
+
import { G9Chip } from "../toggle/choice.jsx";
|
|
8
|
+
function G9DayStepper(props) {
|
|
9
|
+
var _props_defaultValue, _props_pattern;
|
|
10
|
+
var _props_shortcuts;
|
|
11
|
+
const culture = useG9Culture();
|
|
12
|
+
const [day, setDay] = useControllableState({
|
|
13
|
+
value: props.value,
|
|
14
|
+
defaultValue: null != (_props_defaultValue = props.defaultValue) ? _props_defaultValue : props.today,
|
|
15
|
+
onChange: props.onChange,
|
|
16
|
+
name: 'G9DayStepper.value'
|
|
17
|
+
});
|
|
18
|
+
const inRange = (d)=>(!props.min || compareLocal(d, props.min) >= 0) && (!props.max || compareLocal(d, props.max) <= 0);
|
|
19
|
+
const go = (d)=>{
|
|
20
|
+
if (!inRange(d)) return;
|
|
21
|
+
g9Haptic('tick');
|
|
22
|
+
setDay(d);
|
|
23
|
+
};
|
|
24
|
+
const control = useG9Control(props, 'g9-day-stepper', {
|
|
25
|
+
kind: 'picker',
|
|
26
|
+
label: ()=>{
|
|
27
|
+
var _props_accessibilityLabel, _props_pattern;
|
|
28
|
+
return null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : formatLocalDateTime(day, null != (_props_pattern = props.pattern) ? _props_pattern : 'dddd d MMMM', culture);
|
|
29
|
+
},
|
|
30
|
+
capabilities: {
|
|
31
|
+
getValue: ()=>`${day.year}-${String(day.month).padStart(2, '0')}-${String(day.day).padStart(2, '0')}`
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const rtl = 'rtl' === control.direction;
|
|
35
|
+
const prev = addDays(day, -1);
|
|
36
|
+
const next = addDays(day, 1);
|
|
37
|
+
const text1 = formatLocalDateTime(day, null != (_props_pattern = props.pattern) ? _props_pattern : 'dddd d MMMM', culture);
|
|
38
|
+
return <view className={control.className} {...control.idProps} style={control.rootStyle()}>
|
|
39
|
+
<view className="g9-day-stepper__row" style={g9RowStyle(control.direction)}>
|
|
40
|
+
<view className={`g9-day-stepper__arrow${inRange(prev) ? '' : ' g9-day-stepper__arrow--off'}`} {...g9IdProps(g9ChildId(props.id, 'Prev'))} bindtap={()=>go(prev)} accessibility-element={true} accessibility-traits="button" accessibility-label="‹">
|
|
41
|
+
<G9Icon icon={rtl ? G9Glyph.ChevronRight : G9Glyph.ChevronLeft} size={20} color="var(--g9-text-primary)"/>
|
|
42
|
+
</view>
|
|
43
|
+
<text className="g9-day-stepper__day" accessibility-element={true} accessibility-label={text1}>
|
|
44
|
+
{text1}
|
|
45
|
+
</text>
|
|
46
|
+
<view className={`g9-day-stepper__arrow${inRange(next) ? '' : ' g9-day-stepper__arrow--off'}`} {...g9IdProps(g9ChildId(props.id, 'Next'))} bindtap={()=>go(next)} accessibility-element={true} accessibility-traits="button" accessibility-label="›">
|
|
47
|
+
<G9Icon icon={rtl ? G9Glyph.ChevronLeft : G9Glyph.ChevronRight} size={20} color="var(--g9-text-primary)"/>
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
{(null == (_props_shortcuts = props.shortcuts) ? void 0 : _props_shortcuts.length) ? <view className="g9-day-stepper__shortcuts" style={g9RowStyle(control.direction)}>
|
|
51
|
+
{props.shortcuts.map((s)=>{
|
|
52
|
+
const d = addDays(props.today, s.offset);
|
|
53
|
+
return <G9Chip key={s.key} {...props.id ? {
|
|
54
|
+
id: g9ChildId(props.id, s.key)
|
|
55
|
+
} : {}} text={s.label} size="sm" selected={0 === compareLocal(d, day)} onPress={()=>go(d)}/>;
|
|
56
|
+
})}
|
|
57
|
+
</view> : null}
|
|
58
|
+
</view>;
|
|
59
|
+
}
|
|
60
|
+
export { G9DayStepper };
|
package/dist/pickers/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { G9ComboBox, type G9ComboBoxProps, g9ComboMaxChips, sameSelectionKeys } from './combo-box.js';
|
|
2
2
|
export { asDateTime, clampPickerValue, compareDateTime, composePickerValue, dayWheelItems, formatPickerValue, type G9PickerFormatOptions, type G9WheelItem, g9YearWindowRadius, hourWheelItems, minuteWheelItems, monthWheelItems, normalizePickerBounds, pickerParts, resolvePickerCalendar, yearWheelItems, yearWindow, } from './date-time.js';
|
|
3
3
|
export { DateTimeSheetBody, G9DateTimePicker, type G9DateTimePickerProps, g9YearWindowStep } from './date-time-picker.js';
|
|
4
|
+
export { type G9DayShortcut, G9DayStepper, type G9DayStepperProps } from './day-stepper.js';
|
|
4
5
|
export { G9Picker, type G9PickerProps } from './picker.js';
|
|
5
6
|
export { type G9PickerSheetBodyProps, PickerSheetHeader, showPickerSheet } from './picker-sheet.js';
|
|
6
7
|
export { composeTimeSpan, formatTimeSpan, type G9TimeSpanParts, G9TimeSpanPickerMode, g9TimeSpanDefaultMaxDays, g9TimeSpanMaxYears, timeSpanDepth, timeSpanParts, } from './timespan.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pickers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvH,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,KAAK,sBAAsB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EACL,eAAe,EACf,cAAc,EACd,KAAK,eAAe,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EACL,KAAK,kBAAkB,EACvB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GACb,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pickers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvH,OAAO,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,KAAK,sBAAsB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EACL,eAAe,EACf,cAAc,EACd,KAAK,eAAe,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EACL,KAAK,kBAAkB,EACvB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GACb,MAAM,gBAAgB,CAAC"}
|
package/dist/pickers/index.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { G9ComboBox, g9ComboMaxChips, sameSelectionKeys } from "./combo-box.jsx";
|
|
2
2
|
export { asDateTime, clampPickerValue, compareDateTime, composePickerValue, dayWheelItems, formatPickerValue, g9YearWindowRadius, hourWheelItems, minuteWheelItems, monthWheelItems, normalizePickerBounds, pickerParts, resolvePickerCalendar, yearWheelItems, yearWindow } from "./date-time.jsx";
|
|
3
3
|
export { DateTimeSheetBody, G9DateTimePicker, g9YearWindowStep } from "./date-time-picker.jsx";
|
|
4
|
+
export { G9DayStepper } from "./day-stepper.jsx";
|
|
4
5
|
export { G9Picker } from "./picker.jsx";
|
|
5
6
|
export { PickerSheetHeader, showPickerSheet } from "./picker-sheet.jsx";
|
|
6
7
|
export { G9TimeSpanPickerMode, composeTimeSpan, formatTimeSpan, g9TimeSpanDefaultMaxDays, g9TimeSpanMaxYears, timeSpanDepth, timeSpanParts } from "./timespan.jsx";
|
package/dist/pickers/picker.d.ts
CHANGED
|
@@ -13,6 +13,17 @@ export interface G9PickerProps<T extends G9SelectionItem = G9SelectionItem> exte
|
|
|
13
13
|
readonly onValueChange?: (key: string | null, item: T | null) => void;
|
|
14
14
|
/** Sheet title; default the label, else the placeholder (MAUI `SheetTitle`). */
|
|
15
15
|
readonly sheetTitle?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* A search box over the rows (G9Hub ZoneSelect: ~420 time zones). The sheet renders a window of the matches either
|
|
18
|
+
* way (60 rows, more as it scrolls), so a long list stays cheap. Default false.
|
|
19
|
+
*/
|
|
20
|
+
readonly searchable?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* `'auto'` (default): on a wide window (tablet, desktop) a short list (≤ 40 rows, no search) drops down under the
|
|
23
|
+
* box as a menu as wide as it (G9Hub Select); on a phone the selection sheet. `'never'` always the sheet (MAUI);
|
|
24
|
+
* `'always'` the menu everywhere.
|
|
25
|
+
*/
|
|
26
|
+
readonly dropdown?: 'auto' | 'never' | 'always';
|
|
16
27
|
/**
|
|
17
28
|
* Default true (MAUI `RestoreOnCancel`): a dismissed sheet puts back the value the picker had when it opened (if it
|
|
18
29
|
* changed meanwhile) and reports `onSelectionCancelled`. False leaves the current value and reports nothing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picker.d.ts","sourceRoot":"","sources":["../../src/pickers/picker.tsx"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"picker.d.ts","sourceRoot":"","sources":["../../src/pickers/picker.tsx"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,KAAK,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AAM5E,OAAO,EAAE,KAAK,kBAAkB,EAAkD,MAAM,WAAW,CAAC;AAEpG,iCAAiC;AACjC,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,CAAE,SAAQ,kBAAkB;IACpG,uGAAuG;IACvG,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACjC,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,gGAAgG;IAChG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,gFAAgF;IAChF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,mHAAmH;IACnH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5C,wGAAwG;IACxG,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5C;AAID;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CA6GxG"}
|