@g9tm/lynxcontrols 1.7.3 → 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.jsx +2 -4
- 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 +9 -0
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +10 -8
- 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
package/dist/tab-bar/tab-bar.jsx
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "./tab-bar.css";
|
|
2
|
+
import "../base/press.css";
|
|
2
3
|
import { g9Ms } from "@g9tm/lynxcontrols-foundation";
|
|
3
4
|
import { useEffect, useRef, useState } from "@lynx-js/react";
|
|
4
|
-
import { usePressVisual } from "../base/press.jsx";
|
|
5
|
+
import { useG9PressFeedback, usePressVisual } from "../base/press.jsx";
|
|
5
6
|
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
6
7
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
8
|
+
import { G9Badge } from "../display/status.jsx";
|
|
7
9
|
import { useG9Back } from "../host/hooks.jsx";
|
|
8
10
|
import { G9Icon } from "../icon/icon.jsx";
|
|
9
11
|
import { useG9Diagnostics, useG9Direction, useG9Strings, useG9Theme, useG9Window } from "../provider/hooks.jsx";
|
|
@@ -151,6 +153,9 @@ function G9TabBar(props) {
|
|
|
151
153
|
const floating = isCenterFloating && fab >= 0;
|
|
152
154
|
const fabCenterX = fab >= 0 ? tabBarFabCenterX(fab, slotCount, width, rtl, barStyle) : 0;
|
|
153
155
|
const indicatorSlot = tabBarIndicatorSlot(state, config);
|
|
156
|
+
const spring = 'spring' === props.indicatorMotion;
|
|
157
|
+
const pillSlotRef = useRef(null);
|
|
158
|
+
const pillMovesRef = useRef(0);
|
|
154
159
|
const overflowLabel = props.overflowText || strings.resolve('More') || 'More';
|
|
155
160
|
const overflowSelected = tabBarHasOverflow(items.length) && selectedIndex >= tabBarOverflowSlot;
|
|
156
161
|
const reserved = tabBarReservedHeight(state, config);
|
|
@@ -168,6 +173,10 @@ function G9TabBar(props) {
|
|
|
168
173
|
};
|
|
169
174
|
const fabShadow = tabBarFabShadowSvg(barStyle);
|
|
170
175
|
const visualSlot = (slot)=>rtl ? slotCount - 1 - slot : slot;
|
|
176
|
+
const pillSlot = indicatorSlot >= 0 ? visualSlot(slots.findIndex((s)=>'item' === s.kind ? s.index === indicatorSlot : indicatorSlot === tabBarOverflowSlot)) : 0;
|
|
177
|
+
if (null !== pillSlotRef.current && pillSlotRef.current !== pillSlot) pillMovesRef.current += 1;
|
|
178
|
+
pillSlotRef.current = pillSlot;
|
|
179
|
+
const pillMoves = pillMovesRef.current;
|
|
171
180
|
const slotViews = slots.map((slot, i)=>{
|
|
172
181
|
const isOverflow = 'overflow' === slot.kind;
|
|
173
182
|
const index = 'item' === slot.kind ? slot.index : -1;
|
|
@@ -208,15 +217,29 @@ function G9TabBar(props) {
|
|
|
208
217
|
opacity: floating ? 1 : 0,
|
|
209
218
|
transition: `opacity ${g9Ms(g9TabBarMetrics.centerStateDurationMs)}ms ease-out`
|
|
210
219
|
}}/> : null}
|
|
220
|
+
{}
|
|
221
|
+
{indicatorSlot >= 0 && metrics.showsSelectionIndicator ? <view className="g9-tab-bar__indicator-track" style={metrics.itemsHorizontalPadding > 0 ? {
|
|
222
|
+
left: `${metrics.itemsHorizontalPadding}px`,
|
|
223
|
+
right: `${metrics.itemsHorizontalPadding}px`
|
|
224
|
+
} : {}}>
|
|
225
|
+
{}
|
|
226
|
+
<view className="g9-tab-bar__indicator-cell" style={{
|
|
227
|
+
width: `${100 / slotCount}%`,
|
|
228
|
+
transform: `translateX(${100 * pillSlot}%)`,
|
|
229
|
+
transition: spring ? `transform ${g9Ms(Math.round(1.35 * g9TabBarMetrics.indicatorMoveDurationMs))}ms cubic-bezier(0.34, 1.36, 0.5, 1)` : `transform ${g9Ms(g9TabBarMetrics.indicatorMoveDurationMs)}ms cubic-bezier(0.215, 0.61, 0.355, 1)`
|
|
230
|
+
}}>
|
|
231
|
+
<view className={spring && pillMoves > 0 ? `g9-tab-bar__indicator g9-tab-bar__indicator--stretch${pillMoves % 2}` : 'g9-tab-bar__indicator'} style={{
|
|
232
|
+
top: `${g9TabBarMetrics.indicatorTopOffset + metrics.selectedItemNudgeY}px`,
|
|
233
|
+
...spring ? {
|
|
234
|
+
animationDuration: `${g9Ms(Math.round(1.35 * g9TabBarMetrics.indicatorMoveDurationMs))}ms`
|
|
235
|
+
} : {}
|
|
236
|
+
}}/>
|
|
237
|
+
</view>
|
|
238
|
+
</view> : null}
|
|
211
239
|
<view className="g9-tab-bar__slots" style={metrics.itemsHorizontalPadding > 0 ? {
|
|
212
240
|
left: `${metrics.itemsHorizontalPadding}px`,
|
|
213
241
|
right: `${metrics.itemsHorizontalPadding}px`
|
|
214
242
|
} : {}}>
|
|
215
|
-
{indicatorSlot >= 0 && metrics.showsSelectionIndicator ? <view className="g9-tab-bar__indicator" style={{
|
|
216
|
-
left: `${(visualSlot(slots.findIndex((s)=>'item' === s.kind ? s.index === indicatorSlot : indicatorSlot === tabBarOverflowSlot)) + 0.5) * 100 / slotCount}%`,
|
|
217
|
-
transition: `left ${g9Ms(g9TabBarMetrics.indicatorMoveDurationMs)}ms cubic-bezier(0.215, 0.61, 0.355, 1)`,
|
|
218
|
-
top: `${g9TabBarMetrics.indicatorTopOffset + metrics.selectedItemNudgeY}px`
|
|
219
|
-
}}/> : null}
|
|
220
243
|
{slotViews}
|
|
221
244
|
</view>
|
|
222
245
|
</view>
|
|
@@ -273,8 +296,9 @@ function G9TabBar(props) {
|
|
|
273
296
|
</view>;
|
|
274
297
|
}
|
|
275
298
|
function TabBarSlot(props) {
|
|
276
|
-
var _item_icon, _item_text, _item_text1;
|
|
277
|
-
const
|
|
299
|
+
var _item_icon, _item_text, _item_text1, _item_text2;
|
|
300
|
+
const slotDir = useG9Direction();
|
|
301
|
+
const press = useG9PressFeedback(PRESS, false);
|
|
278
302
|
const { item, selected, hidden, revealPose, metrics } = props;
|
|
279
303
|
const sculpted = 'sculpted' === metrics.style;
|
|
280
304
|
const color = sculpted ? selected ? 'var(--g9-primary)' : 'var(--g9-text-secondary)' : selected ? 'var(--g9-on-primary-container)' : 'var(--g9-on-surface-variant)';
|
|
@@ -291,24 +315,33 @@ function TabBarSlot(props) {
|
|
|
291
315
|
transform: `translateY(${g9TabBarMetrics.selectedItemTranslationY}px) scale(1)`,
|
|
292
316
|
transition: `opacity ${g9TabBarMetrics.selectedReturnRevealDurationMs}ms ease-out, transform ${g9TabBarMetrics.selectedReturnRevealDurationMs}ms ease-out`
|
|
293
317
|
};
|
|
294
|
-
return <view className={`g9-tab-bar__slot${selected ? ' g9-tab-bar__slot--selected' : ''}${hidden ? ' g9-tab-bar__slot--hidden' : ''}`} {...item.automationId ? {
|
|
318
|
+
return <view className={`g9-tab-bar__slot${selected ? ' g9-tab-bar__slot--selected' : ''}${hidden ? ' g9-tab-bar__slot--hidden' : ''}${press.className}`} {...item.automationId ? {
|
|
295
319
|
id: item.automationId
|
|
296
320
|
} : {}} style={{
|
|
297
321
|
order: props.order,
|
|
298
322
|
minWidth: `${g9TabBarMetrics.slotItemMinWidth}px`,
|
|
299
323
|
maxWidth: `${g9TabBarMetrics.slotItemMaxWidth}px`
|
|
300
|
-
}} accessibility-element accessibility-traits="button" accessibility-label={null != (_item_text = item.text) ? _item_text : ''} bindtap={hidden ? void 0 : props.onTap} {...press}>
|
|
324
|
+
}} accessibility-element accessibility-traits="button" accessibility-label={item.badge && true !== item.badge ? `${null != (_item_text = item.text) ? _item_text : ''} (${item.badge})` : null != (_item_text1 = item.text) ? _item_text1 : ''} bindtap={hidden ? void 0 : props.onTap} {...press.props}>
|
|
301
325
|
<view className="g9-tab-bar__slot-body" style={{
|
|
302
326
|
...pose,
|
|
303
327
|
rowGap: `${metrics.bottomContentSpacing}px`
|
|
304
328
|
}}>
|
|
305
|
-
<
|
|
329
|
+
<view className="g9-tab-bar__icon-box">
|
|
330
|
+
<G9Icon icon={icon} size={metrics.bottomIconSize} color={color}/>
|
|
331
|
+
{item.badge ? <view className={`g9-tab-bar__badge g9-tab-bar__badge--${slotDir}`}>
|
|
332
|
+
<G9Badge {...true === item.badge ? {
|
|
333
|
+
dot: true
|
|
334
|
+
} : {
|
|
335
|
+
value: item.badge
|
|
336
|
+
}}/>
|
|
337
|
+
</view> : null}
|
|
338
|
+
</view>
|
|
306
339
|
<text className="g9-tab-bar__label" text-maxline="1" style={{
|
|
307
340
|
color,
|
|
308
341
|
fontSize: `${metrics.bottomLabelFontSize}px`,
|
|
309
342
|
fontWeight: selected ? '700' : '400'
|
|
310
343
|
}}>
|
|
311
|
-
{null != (
|
|
344
|
+
{null != (_item_text2 = item.text) ? _item_text2 : ''}
|
|
312
345
|
</text>
|
|
313
346
|
</view>
|
|
314
347
|
</view>;
|
|
@@ -320,11 +353,14 @@ function MenuCell(props) {
|
|
|
320
353
|
const t = startTimer(()=>setShown(true), 16);
|
|
321
354
|
return ()=>stopTimer(t);
|
|
322
355
|
}, []);
|
|
323
|
-
const press =
|
|
356
|
+
const press = {
|
|
357
|
+
className: '',
|
|
358
|
+
props: usePressVisual(PRESS, false)
|
|
359
|
+
};
|
|
324
360
|
const bounce = easeOutBackCss(g9TabBarMetrics.fabPopBackCoefficient);
|
|
325
361
|
const color = props.selected ? 'var(--g9-on-primary)' : 'var(--g9-on-surface)';
|
|
326
362
|
const iconColor = props.onAccent ? 'var(--g9-on-primary)' : color;
|
|
327
|
-
return <view className={`${props.className}${props.selected ? ` ${props.className}--selected` : ''}`} {...props.item.automationId ? {
|
|
363
|
+
return <view className={`${props.className}${press.className}${props.selected ? ` ${props.className}--selected` : ''}`} {...props.item.automationId ? {
|
|
328
364
|
id: props.item.automationId
|
|
329
365
|
} : {}} accessibility-element accessibility-traits="button" accessibility-label={null != (_props_item_text = props.item.text) ? _props_item_text : ''} style={{
|
|
330
366
|
left: `${props.left}px`,
|
|
@@ -334,7 +370,7 @@ function MenuCell(props) {
|
|
|
334
370
|
opacity: shown ? 1 : 0,
|
|
335
371
|
transform: shown ? 'translate(0px, 0px) scale(1)' : `translate(${props.travelX}px, ${props.travelY}px) scale(${g9TabBarMetrics.fabIdleScaleMin})`,
|
|
336
372
|
transition: `opacity ${props.durationMs}ms ease-out ${props.delayMs}ms, transform ${props.durationMs}ms ${bounce} ${props.delayMs}ms`
|
|
337
|
-
}} bindtap={props.onTap} {...press}>
|
|
373
|
+
}} bindtap={props.onTap} {...press.props}>
|
|
338
374
|
<view className="g9-tab-bar__cell-accent">
|
|
339
375
|
<G9Icon icon={null != (_props_item_icon = props.item.icon) ? _props_item_icon : 'check'} size={props.iconSize} color={iconColor}/>
|
|
340
376
|
</view>
|
|
@@ -347,5 +383,3 @@ function MenuCell(props) {
|
|
|
347
383
|
</view>;
|
|
348
384
|
}
|
|
349
385
|
export { G9TabBar };
|
|
350
|
-
|
|
351
|
-
//# sourceMappingURL=tab-bar.jsx.map
|
package/dist/tabs/model.jsx
CHANGED
package/dist/tabs/tab-view.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './tabs.css';
|
|
2
|
+
import '../provider/keep-alive.css';
|
|
2
3
|
import type { G9SegmentInput } from '@g9tm/lynxcontrols-foundation';
|
|
3
4
|
import { type ReactNode } from '@lynx-js/react';
|
|
4
5
|
import { type G9TabBarPosition, type G9TabItem, type G9TabMode, type G9TabStyle } from './model.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-view.d.ts","sourceRoot":"","sources":["../../src/tabs/tab-view.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,KAAK,SAAS,EAAwC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"tab-view.d.ts","sourceRoot":"","sources":["../../src/tabs/tab-view.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,KAAK,SAAS,EAAwC,MAAM,gBAAgB,CAAC;AAWtF,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,UAAU,EAOhB,MAAM,SAAS,CAAC;AAEjB,kCAAkC;AAClC,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;IAC/D,2FAA2F;IAC3F,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,6GAA6G;IAC7G,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,sGAAsG;IACtG,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,uDAAuD;IACvD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,sEAAsE;IACtE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,iDAAiD;IACjD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,iHAAiH;IACjH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,2GAA2G;IAC3G,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,iGAAiG;IACjG,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAC/B,wGAAwG;IACxG,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,uFAAuF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,oFAAoF;IACpF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,uHAAuH;IACvH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACrD,4GAA4G;IAC5G,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,4FAA4F;IAC5F,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,CAmM1D"}
|
package/dist/tabs/tab-view.jsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./tabs.css";
|
|
2
|
+
import "../provider/keep-alive.css";
|
|
2
3
|
import { ViewPager } from "@lynx-js/lynx-ui-view-pager";
|
|
3
4
|
import { useEffect, useMemo, useRef, useState } from "@lynx-js/react";
|
|
4
5
|
import { useG9Anchor, useG9AnchorRegistry } from "../anchor/hooks.jsx";
|
|
@@ -8,6 +9,7 @@ import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
|
8
9
|
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
9
10
|
import { invokeNodeWhenReady } from "../fields/use-text-input.jsx";
|
|
10
11
|
import { G9IconSlot } from "../icon/slot.jsx";
|
|
12
|
+
import { G9Activity } from "../provider/activity.jsx";
|
|
11
13
|
import { useG9Culture, useG9Direction } from "../provider/hooks.jsx";
|
|
12
14
|
import { useG9Place } from "../route/hooks.jsx";
|
|
13
15
|
import { G9TabRealizer, effectiveTabIndex, g9TabViewMetrics, tabBadge, tabContentSlideFrom, tabKey, tabVisualOrder, thicknessCss } from "./model.jsx";
|
|
@@ -121,15 +123,16 @@ function G9TabView(props) {
|
|
|
121
123
|
const active = index === effective;
|
|
122
124
|
if (!realizer.isRealized(key)) return active && pending === key ? <Spinner/> : null;
|
|
123
125
|
const revealing = active && reveal.key === key && !reveal.settled;
|
|
126
|
+
const shown = active || swipe;
|
|
124
127
|
const style = {
|
|
125
|
-
display: active || swipe ? 'flex' : 'none',
|
|
126
128
|
transform: `translateX(${revealing ? reveal.from : 0}px)`,
|
|
127
129
|
opacity: revealing ? 0 : 1,
|
|
128
130
|
transition: revealing || swipe ? 'none' : `transform ${g9TabViewMetrics.contentTransitionMs}ms ease-out, opacity ${g9TabViewMetrics.contentTransitionMs}ms ease-out`
|
|
129
131
|
};
|
|
130
132
|
const content = 'function' == typeof item.content ? item.content() : item.content;
|
|
131
|
-
return <view key={key} className={`g9-tabs__panel${active ? ' g9-tabs__panel--active' : ''}`} style={style}>
|
|
132
|
-
{
|
|
133
|
+
return <view key={key} className={`g9-tabs__panel${active ? ' g9-tabs__panel--active' : ''}${shown ? '' : ' g9-kept--hidden'}`} style={style} user-interaction-enabled={shown}>
|
|
134
|
+
{}
|
|
135
|
+
<G9Activity mode={shown ? 'visible' : 'hidden'}>{content}</G9Activity>
|
|
133
136
|
</view>;
|
|
134
137
|
};
|
|
135
138
|
const frame = props.showFrame ? {
|
|
@@ -279,5 +282,3 @@ function TabBarStrip(props) {
|
|
|
279
282
|
</view>;
|
|
280
283
|
}
|
|
281
284
|
export { G9TabView };
|
|
282
|
-
|
|
283
|
-
//# sourceMappingURL=tab-view.jsx.map
|
package/dist/tabs/tabs.css
CHANGED
package/dist/tabs/tabs.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/tabs/tabs.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,UAAU;AACZ;;AAGA;EAAE,cAAc;EACd,WAAW;EACX,kBAAkB;AACpB;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,uCAAuC;EACvC,0CAA0C;AAC5C;;AAGA;EAAE,mBAAmB;EACnB,YAAY;AACd;;AAGA;EAAE,eAAe;AACjB;;AAGA;EAAE,kBAAkB;AACpB;;AAGA;EAAE,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,WAAW;AACb;;AAGA;EAAE,WAAW;EACX,YAAY;AACd;;AAGA;EAAE,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,QAAQ;EACR,aAAa;AACf;;AAGA;EAAE,eAAe;AACjB;;AAGA;EAAE,mCAAmC;EACnC,UAAU;EACV,kBAAkB;EAClB,SAAS;EACT,YAAY;EACZ,OAAO;AACT;;AAGA;EAAE,kBAAkB;EAClB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAGA;EAAE,yBAAyB;EACzB,eAAe;EACf,gBAAgB;AAClB;;AAGA;EAAE,oBAAoB;EACpB,UAAU;EACV,WAAW;AACb;;AAGA;EAAE,mBAAmB;EACnB,uBAAuB;EACvB,aAAa;EACb,aAAa;EACb,kBAAkB;EAClB,SAAS;AACX;;AAGA;EAAE,WAAW;EACX,aAAa;AACf;;AAIA;EADE,kBAAkB;EAClB,SAAS;EACT,OAAO;AACT;;AAIA;EADE,aAAa;EACb,kBAAkB;EAClB,QAAQ;EACR,WAAW;AACb;;AAIA;EADE,6CAA6C;EAC7C,0CAA0C;EAC1C,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAKA;EAFE,YAAY;EACZ,kBAAkB;EAClB,QAAQ;EACR,WAAW;EACX,OAAO;AACT;;AAKA;EAFE,sBAAsB;EACtB,OAAO;EACP,WAAW;
|
|
1
|
+
{"version":3,"sources":["webpack://./src/tabs/tabs.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,UAAU;AACZ;;AAGA;EAAE,cAAc;EACd,WAAW;EACX,kBAAkB;AACpB;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,uCAAuC;EACvC,0CAA0C;AAC5C;;AAGA;EAAE,mBAAmB;EACnB,YAAY;AACd;;AAGA;EAAE,eAAe;AACjB;;AAGA;EAAE,kBAAkB;AACpB;;AAGA;EAAE,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,WAAW;AACb;;AAGA;EAAE,WAAW;EACX,YAAY;AACd;;AAGA;EAAE,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,QAAQ;EACR,aAAa;AACf;;AAGA;EAAE,eAAe;AACjB;;AAGA;EAAE,mCAAmC;EACnC,UAAU;EACV,kBAAkB;EAClB,SAAS;EACT,YAAY;EACZ,OAAO;AACT;;AAGA;EAAE,kBAAkB;EAClB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAGA;EAAE,yBAAyB;EACzB,eAAe;EACf,gBAAgB;AAClB;;AAGA;EAAE,oBAAoB;EACpB,UAAU;EACV,WAAW;AACb;;AAGA;EAAE,mBAAmB;EACnB,uBAAuB;EACvB,aAAa;EACb,aAAa;EACb,kBAAkB;EAClB,SAAS;AACX;;AAGA;EAAE,WAAW;EACX,aAAa;AACf;;AAIA;EADE,kBAAkB;EAClB,SAAS;EACT,OAAO;AACT;;AAIA;EADE,aAAa;EACb,kBAAkB;EAClB,QAAQ;EACR,WAAW;AACb;;AAIA;EADE,6CAA6C;EAC7C,0CAA0C;EAC1C,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAKA;EAFE,YAAY;EACZ,kBAAkB;EAClB,QAAQ;EACR,WAAW;EACX,OAAO;AACT;;AAKA;EAFE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;AACf;;AAKA;EAFE,OAAO;EACP,YAAY;AACd;;AAKA;EAFE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;AACf;;AAKA;EAFE,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,gBAAgB;EAChB,aAAa;AACf","sourcesContent":["/* G9TabView (MAUI G9TabView): bar, sliding indicator, lazily realized bodies. No shadows (plan/specs/02 §2). */\n.g9-tabs {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tabs--header-only {\n flex: 0 0 auto;\n}\n\n.g9-tabs__bar {\n position: relative;\n width: 100%;\n flex-shrink: 0;\n}\n\n.g9-tabs__content {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.g9-tabs--underlined .g9-tabs__bar {\n border-top: 1px solid var(--g9-divider);\n border-bottom: 1px solid var(--g9-divider);\n}\n\n.g9-tabs--pill .g9-tabs__bar {\n border-radius: 26px;\n padding: 4px;\n}\n\n.g9-tabs--pill.g9-tabs--top .g9-tabs__content {\n margin-top: 8px;\n}\n\n.g9-tabs--pill.g9-tabs--bottom .g9-tabs__content {\n margin-bottom: 8px;\n}\n\n.g9-tabs__cells {\n position: relative;\n display: flex;\n flex-direction: row;\n height: 100%;\n width: 100%;\n}\n\n.g9-tabs__cells--scrollable {\n width: auto;\n}\n\n.g9-tabs__scroller {\n height: 100%;\n width: 100%;\n}\n\n.g9-tabs__cell {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 14px;\n}\n\n.g9-tabs__cell-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n\n.g9-tabs__label {\n font-size: 14px;\n}\n\n.g9-tabs__separator {\n position: absolute;\n left: 0;\n top: 12px;\n bottom: 12px;\n width: 1px;\n background-color: var(--g9-divider);\n}\n\n.g9-tabs__badge {\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tabs__badge-text {\n font-size: 11px;\n font-weight: 600;\n color: var(--g9-on-error);\n}\n\n.g9-tabs__badge-dot {\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n}\n\n.g9-tabs__underline {\n position: absolute;\n bottom: 0;\n height: 2.5px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n\n.g9-tabs__underline-fill,\n.g9-tabs__cell-underline {\n height: 2.5px;\n width: 100%;\n}\n\n.g9-tabs__cell-underline {\n position: absolute;\n left: 0;\n bottom: 0;\n}\n\n.g9-tabs__pill {\n position: absolute;\n top: 2px;\n bottom: 2px;\n display: flex;\n}\n\n.g9-tabs__pill-fill,\n.g9-tabs__cell-pill {\n width: 100%;\n height: 100%;\n border-radius: 18px;\n background-color: var(--g9-primary-container);\n border: 1px solid var(--g9-primary-border);\n}\n\n.g9-tabs__cell-pill {\n position: absolute;\n top: 2px;\n bottom: 2px;\n left: 0;\n height: auto;\n}\n\n.g9-tabs__panel {\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tabs__pager {\n flex: 1;\n height: 100%;\n}\n\n.g9-tabs__page {\n flex: 1;\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tabs__spinner {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 72px;\n width: 100%;\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/toast/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAQrB,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/toast/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAQrB,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAW9D,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,WAAW,EAEjB,MAAM,SAAS,CAAC;AAEjB,+FAA+F;AAC/F,eAAO,MAAM,cAAc;;;;EAAsE,CAAC;AAElG,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IACxF,2EAA2E;IAC3E,YAAY,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gFAAgF;IAChF,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,8DAA8D;IAC9D,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC5C,gEAAgE;IAChE,cAAc,IAAI,IAAI,CAAC;IACvB,yEAAyE;IACzE,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;IACzE,mBAAmB,IAAI,IAAI,CAAC;IAC5B,sDAAsD;IACtD,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;IACrH,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACnG,oBAAoB,IAAI,IAAI,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7C,gHAAgH;IAChH,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,uGAAuG;IACvG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,wEAAwE;IACxE,UAAU,IAAI,IAAI,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAoSD,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAGjE;AAED,kHAAkH;AAClH,wBAAgB,WAAW,IAAI,cAAc,CAE5C;AAED,wGAAwG;AACxG,wBAAgB,QAAQ,IAAI,cAAc,CAEzC"}
|
package/dist/toast/service.jsx
CHANGED
|
@@ -8,7 +8,7 @@ import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
|
8
8
|
import { useG9Host, useG9HostInsets } from "../host/hooks.jsx";
|
|
9
9
|
import { g9Hosts } from "../host/registry.jsx";
|
|
10
10
|
import { G9IconSlot } from "../icon/slot.jsx";
|
|
11
|
-
import { useG9Culture, useG9Direction, useG9Executor, useG9Settings, useG9Theme } from "../provider/hooks.jsx";
|
|
11
|
+
import { useG9Culture, useG9Direction, useG9Executor, useG9Layout, useG9Settings, useG9Theme, useG9Window } from "../provider/hooks.jsx";
|
|
12
12
|
import { G9ToastStore, g9ToastTimings } from "./store.jsx";
|
|
13
13
|
const g9ToastMetrics = Object.freeze({
|
|
14
14
|
edgeMargin: 16,
|
|
@@ -58,28 +58,30 @@ function ToastCard(props) {
|
|
|
58
58
|
});
|
|
59
59
|
const palette = useG9Theme().palette;
|
|
60
60
|
const [fillToken, onToken] = ACCENT[entry.type];
|
|
61
|
-
const fill = paletteColor(palette, fillToken);
|
|
62
|
-
const on = paletteColor(palette, onToken);
|
|
61
|
+
const fill = props.ink ? paletteColor(palette, 'InverseSurface') : paletteColor(palette, fillToken);
|
|
62
|
+
const on = props.ink ? paletteColor(palette, 'InverseOnSurface') : paletteColor(palette, onToken);
|
|
63
|
+
const iconColor = props.ink ? paletteColor(palette, fillToken) : on;
|
|
64
|
+
const onBase = props.ink ? 'InverseOnSurface' : onToken;
|
|
63
65
|
const icon = null != (_entry_icon = entry.icon) ? _entry_icon : 'success' === entry.type ? glyphs.success : 'warning' === entry.type ? glyphs.warning : 'error' === entry.type ? glyphs.error : glyphs.info;
|
|
64
66
|
const offset = props.bottom ? '12px' : '-12px';
|
|
65
67
|
const direction = useG9Direction();
|
|
66
68
|
return <view className={`g9-toast g9-toast--${entry.type} g9-toast--${entry.status}`} accessibility-element={true} accessibility-label={entry.message} style={{
|
|
67
69
|
...g9RowStyle(direction),
|
|
68
70
|
backgroundColor: fill,
|
|
69
|
-
borderColor: paletteColor(palette,
|
|
71
|
+
borderColor: paletteColor(palette, onBase, props.ink ? 0.12 : 0.35),
|
|
70
72
|
opacity: 'shown' === entry.status || 'entering' === entry.status ? 1 : 0,
|
|
71
73
|
transform: `translateY(${'leaving' === entry.status ? offset : '0px'})`,
|
|
72
74
|
transition: `opacity ${g9Ms('leaving' === entry.status ? g9ToastTimings.exitMs : g9ToastTimings.enterMs)}ms, transform ${g9Ms(g9ToastTimings.enterMs)}ms`
|
|
73
75
|
}}>
|
|
74
|
-
{entry.durationMs > 0 ? <ToastCountdown key={entry.refreshes} durationMs={entry.durationMs} color={paletteColor(palette,
|
|
75
|
-
<G9IconSlot icon={icon} size={20} color={
|
|
76
|
+
{entry.durationMs > 0 ? <ToastCountdown key={entry.refreshes} durationMs={entry.durationMs} color={paletteColor(palette, onBase, 0.14)} rtl={'rtl' === direction}/> : null}
|
|
77
|
+
<G9IconSlot icon={icon} size={20} color={iconColor}/>
|
|
76
78
|
<text className="g9-toast__message" style={{
|
|
77
79
|
color: on
|
|
78
80
|
}}>
|
|
79
81
|
{entry.message}
|
|
80
82
|
</text>
|
|
81
83
|
{entry.actionText ? <view className="g9-toast__action" accessibility-element={true} accessibility-traits="button" bindtap={action} style={{
|
|
82
|
-
backgroundColor: paletteColor(palette,
|
|
84
|
+
backgroundColor: paletteColor(palette, onBase, 0.16)
|
|
83
85
|
}}>
|
|
84
86
|
<text className="g9-toast__action-text" style={{
|
|
85
87
|
color: on
|
|
@@ -89,7 +91,7 @@ function ToastCard(props) {
|
|
|
89
91
|
</view> : null}
|
|
90
92
|
</view>;
|
|
91
93
|
}
|
|
92
|
-
function anchorStyle(position, top, bottom) {
|
|
94
|
+
function anchorStyle(position, top, bottom, centred) {
|
|
93
95
|
const m = `${g9ToastMetrics.edgeMargin}px`;
|
|
94
96
|
const style = {};
|
|
95
97
|
if (position.startsWith('top')) style.top = `${top}px`;
|
|
@@ -98,13 +100,18 @@ function anchorStyle(position, top, bottom) {
|
|
|
98
100
|
style.top = '0px';
|
|
99
101
|
style.bottom = '0px';
|
|
100
102
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
if (centred) {
|
|
104
|
+
style.left = `${centred.left}px`;
|
|
105
|
+
style.width = `${centred.width}px`;
|
|
106
|
+
} else {
|
|
107
|
+
style.left = m;
|
|
108
|
+
style.right = m;
|
|
109
|
+
}
|
|
103
110
|
return style;
|
|
104
111
|
}
|
|
105
112
|
function ToastLayer(props) {
|
|
106
113
|
var _ref;
|
|
107
|
-
var _sheets_service;
|
|
114
|
+
var _sheets_service, _settings_position, _settings_position1;
|
|
108
115
|
const { state, host } = props;
|
|
109
116
|
const sheets = host.getFeature('g9.sheets');
|
|
110
117
|
const sheetOpen = (null != (_ref = null == sheets ? void 0 : null == (_sheets_service = sheets.service) ? void 0 : _sheets_service.getOpenCount()) ? _ref : 0) > 0;
|
|
@@ -114,6 +121,16 @@ function ToastLayer(props) {
|
|
|
114
121
|
const culture = useG9Culture();
|
|
115
122
|
const rtl = 'rtl' === useG9Direction();
|
|
116
123
|
state.rtl = rtl;
|
|
124
|
+
const settings = useG9Settings().toasts;
|
|
125
|
+
const { wide } = useG9Layout();
|
|
126
|
+
const win = useG9Window();
|
|
127
|
+
state.position = wide ? null == (_settings_position = settings.position) ? void 0 : _settings_position.wide : null == (_settings_position1 = settings.position) ? void 0 : _settings_position1.phone;
|
|
128
|
+
const ink = 'ink' === settings.surface;
|
|
129
|
+
const wideWidth = wide && settings.wideWidth ? Math.min(settings.wideWidth, win.width - 2 * g9ToastMetrics.edgeMargin) : 0;
|
|
130
|
+
const centred = wideWidth > 0 ? {
|
|
131
|
+
left: Math.round((win.width - wideWidth) / 2),
|
|
132
|
+
width: wideWidth
|
|
133
|
+
} : null;
|
|
117
134
|
const executor = useG9Executor();
|
|
118
135
|
state.run = (action)=>void executor.run(()=>action(), {
|
|
119
136
|
source: 'G9Toast',
|
|
@@ -144,10 +161,10 @@ function ToastLayer(props) {
|
|
|
144
161
|
].map((position)=>{
|
|
145
162
|
const bottomStack = position.startsWith('bottom');
|
|
146
163
|
return <view key={position} className={`g9-toast-stack g9-toast-stack--${position}${bottomStack ? ' g9-toast-stack--bottom' : ''}`} event-through={true} style={{
|
|
147
|
-
...anchorStyle(position, top, bottom),
|
|
164
|
+
...anchorStyle(position, top, bottom, centred),
|
|
148
165
|
transition: glide
|
|
149
166
|
}}>
|
|
150
|
-
{snap.toasts.filter((t)=>t.position === position).map((t)=><ToastCard key={t.id} entry={t} store={store} bottom={bottomStack}/>)}
|
|
167
|
+
{snap.toasts.filter((t)=>t.position === position).map((t)=><ToastCard key={t.id} entry={t} store={store} bottom={bottomStack} ink={ink}/>)}
|
|
151
168
|
{snap.loadingToast && snap.loadingToast.position === position ? <view className="g9-toast g9-toast--loading" accessibility-label={snap.loadingToast.text}>
|
|
152
169
|
<G9ActivityIndicator running size={18}/>
|
|
153
170
|
<text className="g9-toast__message">{snap.loadingToast.text}</text>
|
|
@@ -194,7 +211,10 @@ function createToastService(host) {
|
|
|
194
211
|
var _state_run;
|
|
195
212
|
return null == (_state_run = state.run) ? void 0 : _state_run.call(state, action);
|
|
196
213
|
},
|
|
197
|
-
defaultPosition: ()=>
|
|
214
|
+
defaultPosition: ()=>{
|
|
215
|
+
var _state_position;
|
|
216
|
+
return null != (_state_position = state.position) ? _state_position : state.rtl ? 'bottomLeft' : 'bottomRight';
|
|
217
|
+
}
|
|
198
218
|
});
|
|
199
219
|
state.service = {
|
|
200
220
|
store,
|
|
@@ -234,5 +254,3 @@ function g9Toasts() {
|
|
|
234
254
|
return toastServiceOf(g9Hosts.require());
|
|
235
255
|
}
|
|
236
256
|
export { g9ToastMetrics, g9Toasts, toastServiceOf, useG9Toasts };
|
|
237
|
-
|
|
238
|
-
//# sourceMappingURL=service.jsx.map
|
package/dist/toast/store.jsx
CHANGED
|
@@ -352,5 +352,3 @@ function resolveToastPosition(position, rtl) {
|
|
|
352
352
|
return null != position ? position : rtl ? 'bottomLeft' : 'bottomRight';
|
|
353
353
|
}
|
|
354
354
|
export { G9ToastPosition, G9ToastStore, G9ToastType, g9DefaultToastOptions, g9MaxToastsPerStack, g9ToastTimings, resolveToastPosition };
|
|
355
|
-
|
|
356
|
-
//# sourceMappingURL=store.jsx.map
|
|
@@ -107,5 +107,3 @@ function checkMarkPath(progress, morph, size) {
|
|
|
107
107
|
}
|
|
108
108
|
const round = (n)=>Math.round(1000 * n) / 1000;
|
|
109
109
|
export { checkMarkPath, clamp01, fillAmount, firstArmLength, g9CheckFillPhaseEnd, g9CheckGeometry, g9CheckMarkPhaseStart, g9DashGeometry, markAmount, nextOnTap, resolveCheckMarkGeometry, secondArmLength, targetMorph, targetProgress, trimCheckMark };
|
|
110
|
-
|
|
111
|
-
//# sourceMappingURL=checkbox-math.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/toggle/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAe,KAAK,eAAe,EAA0B,MAAM,+BAA+B,CAAC;AAG1G,OAAO,EAAE,KAAK,kBAAkB,EAAyC,MAAM,iBAAiB,CAAC;AAOjG,iFAAiF;AACjF,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAC;AAEH,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAM5F;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CA6BhH;AAED,uDAAuD;AACvD,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,mDAAmD;IACnD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,2GAA2G;IAC3G,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,wEAAwE;IACxE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gGAAgG;IAChG,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/toggle/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAe,KAAK,eAAe,EAA0B,MAAM,+BAA+B,CAAC;AAG1G,OAAO,EAAE,KAAK,kBAAkB,EAAyC,MAAM,iBAAiB,CAAC;AAOjG,iFAAiF;AACjF,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAC;AAEH,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAM5F;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CA6BhH;AAED,uDAAuD;AACvD,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,mDAAmD;IACnD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,2GAA2G;IAC3G,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,wEAAwE;IACxE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gGAAgG;IAChG,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,8GAuItB,CAAC"}
|
package/dist/toggle/checkbox.jsx
CHANGED
|
@@ -40,7 +40,7 @@ function checkBoxSvg(progress, morph, colors, disabled) {
|
|
|
40
40
|
parts.push('</svg>');
|
|
41
41
|
return parts.join('');
|
|
42
42
|
}
|
|
43
|
-
const
|
|
43
|
+
const G9CheckBox = forwardRef(function(props, ref) {
|
|
44
44
|
var _props_defaultChecked, _props_defaultIndeterminate, _props_accessibilityLabel, _ref, _props_accessibilityLabel1;
|
|
45
45
|
const control = useG9Control(props, 'g9-checkbox', {
|
|
46
46
|
kind: 'toggle',
|
|
@@ -143,24 +143,22 @@ const checkbox_G9CheckBox = forwardRef(function(props, ref) {
|
|
|
143
143
|
const reserve = false !== props.reserveTouchTarget;
|
|
144
144
|
const text1 = props.text && '' !== props.text.trim() ? props.text : null;
|
|
145
145
|
const state = indeterminate ? strings.get(G9StringKey.PartiallyChecked) : checked ? strings.get(G9StringKey.Checked) : strings.get(G9StringKey.NotChecked);
|
|
146
|
-
return <view className={`${control.className}${text1 ? ' g9-checkbox--labelled' : ''}`} {...control.idProps} style={g9RowStyle(control.direction)} accessibility-element={true} accessibility-traits="button" accessibility-value={state} {...(null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : text1) ? {
|
|
146
|
+
return <view className={`${control.className}${text1 ? ' g9-checkbox--labelled' : ''}`} {...control.idProps} style={control.rootStyle(g9RowStyle(control.direction))} accessibility-element={true} accessibility-traits="button" accessibility-value={state} {...(null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : text1) ? {
|
|
147
147
|
'accessibility-label': null != (_ref = null != (_props_accessibilityLabel1 = props.accessibilityLabel) ? _props_accessibilityLabel1 : text1) ? _ref : ''
|
|
148
148
|
} : {}} bindtap={press}>
|
|
149
|
-
|
|
149
|
+
<view className={`g9-checkbox__slot${reserve ? ' g9-checkbox__slot--reserve' : ''}`} style={{
|
|
150
150
|
width: `${reserve ? g9CheckBoxMetrics.touchTarget : g9CheckBoxMetrics.box}px`
|
|
151
151
|
}}>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
<svg ref={svgRef} className="g9-checkbox__box" content={checkBoxSvg(drawn.current.progress, drawn.current.morph, colors, control.disabled)}/>
|
|
153
|
+
</view>
|
|
154
|
+
{text1 ? <text className="g9-checkbox__text" style={{
|
|
155
155
|
...g9TextStart(control.direction),
|
|
156
156
|
color: control.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)',
|
|
157
157
|
paddingTop: reserve ? '12px' : '0px',
|
|
158
158
|
paddingBottom: reserve ? '12px' : '0px'
|
|
159
159
|
}}>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
{text1}
|
|
161
|
+
</text> : null}
|
|
162
|
+
</view>;
|
|
163
163
|
});
|
|
164
|
-
export { checkBoxColors, checkBoxSvg,
|
|
165
|
-
|
|
166
|
-
//# sourceMappingURL=checkbox.jsx.map
|
|
164
|
+
export { G9CheckBox, checkBoxColors, checkBoxSvg, g9CheckBoxMetrics };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip-group.d.ts","sourceRoot":"","sources":["../../src/toggle/chip-group.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAK9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,kBAAkB,EAAkD,MAAM,iBAAiB,CAAC;AAE1G,OAAO,EAAE,KAAK,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AAK5E,yDAAyD;AACzD,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,iHAAiH;IACjH,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC/C,kCAAkC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAClD,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACtE,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1F,kFAAkF;IAClF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,oCAAoC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB;IAClB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,2DAA2D;IAC3D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,qBAAqB,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,uEAAuE;IACvE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;CAC9E;AAID;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"chip-group.d.ts","sourceRoot":"","sources":["../../src/toggle/chip-group.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAK9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,kBAAkB,EAAkD,MAAM,iBAAiB,CAAC;AAE1G,OAAO,EAAE,KAAK,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AAK5E,yDAAyD;AACzD,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,iHAAiH;IACjH,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC/C,kCAAkC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAClD,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACtE,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1F,kFAAkF;IAClF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,oCAAoC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB;IAClB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,2DAA2D;IAC3D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,qBAAqB,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,uEAAuE;IACvE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;CAC9E;AAID;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAgK9D"}
|
|
@@ -11,7 +11,10 @@ function G9ChipGroup(props) {
|
|
|
11
11
|
var _props_defaultSelectedKeys, _props_defaultSelectedKey, _props_chipHeight, _props_itemSpacing, _props_iconSize, _props_chipCornerRadius;
|
|
12
12
|
const control = useG9Control(props, 'g9-chip-group', {
|
|
13
13
|
kind: 'chips',
|
|
14
|
-
label: ()=>
|
|
14
|
+
label: ()=>{
|
|
15
|
+
var _props_accessibilityLabel;
|
|
16
|
+
return null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : props.items.filter((i)=>single ? key === selectionKey(i) : keys.includes(selectionKey(i))).map((i)=>i.text).join(', ');
|
|
17
|
+
},
|
|
15
18
|
capabilities: {
|
|
16
19
|
itemKeys: ()=>props.items.map((i)=>selectionKey(i)),
|
|
17
20
|
getValue: ()=>single ? null != key ? key : '' : keys.join(','),
|
|
@@ -100,18 +103,18 @@ function G9ChipGroup(props) {
|
|
|
100
103
|
{cells}
|
|
101
104
|
</view>);
|
|
102
105
|
}
|
|
103
|
-
return <view className={`${control.className} g9-chip-group--segmented`} {...control.idProps} style={{
|
|
106
|
+
return <view className={`${control.className} g9-chip-group--segmented`} {...control.idProps} style={control.rootStyle({
|
|
104
107
|
rowGap: `${spacing}px`
|
|
105
|
-
}}>
|
|
108
|
+
})}>
|
|
106
109
|
{rows}
|
|
107
110
|
</view>;
|
|
108
111
|
}
|
|
109
112
|
const scroll = 'singleLineScroll' === props.layoutMode;
|
|
110
|
-
return scroll ? <scroll-view className={`${control.className} g9-chip-group--scroll`} {...control.idProps} scroll-orientation="horizontal">
|
|
113
|
+
return scroll ? <scroll-view className={`${control.className} g9-chip-group--scroll`} {...control.idProps} style={control.rootStyle()} scroll-orientation="horizontal">
|
|
111
114
|
<view className="g9-chip-group__line" style={g9RowStyle(control.direction)}>
|
|
112
115
|
{chips}
|
|
113
116
|
</view>
|
|
114
|
-
</scroll-view> : <view className={`${control.className} g9-chip-group--wrap`} {...control.idProps} style={g9RowStyle(control.direction)}>
|
|
117
|
+
</scroll-view> : <view className={`${control.className} g9-chip-group--wrap`} {...control.idProps} style={control.rootStyle(g9RowStyle(control.direction))}>
|
|
115
118
|
{chips}
|
|
116
119
|
</view>;
|
|
117
120
|
}
|
|
@@ -159,5 +162,3 @@ function Chip(props) {
|
|
|
159
162
|
</view>;
|
|
160
163
|
}
|
|
161
164
|
export { G9ChipGroup };
|
|
162
|
-
|
|
163
|
-
//# sourceMappingURL=chip-group.jsx.map
|