@g9tm/lynxcontrols 1.7.3 → 2.2.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/countdown.d.ts +36 -0
- package/dist/effects/countdown.d.ts.map +1 -0
- package/dist/effects/countdown.jsx +93 -0
- 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 +3 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.jsx +2 -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.d.ts +1 -1
- package/dist/guide/confirm-sheet.d.ts.map +1 -1
- package/dist/guide/confirm-sheet.jsx +6 -26
- 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 +66 -0
- package/dist/orb/orb.d.ts.map +1 -0
- package/dist/orb/orb.jsx +189 -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.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +31 -4
- 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/host/host.jsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { G9Error, g9Ms } from "@g9tm/lynxcontrols-foundation";
|
|
2
2
|
import { OverlayView } from "@lynx-js/lynx-ui-overlay";
|
|
3
3
|
import { Fragment, createContext, memo, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "@lynx-js/react";
|
|
4
|
+
import { G9AnchorLayerContext } from "../anchor/context.jsx";
|
|
4
5
|
import { useStableCallback } from "../base/use-stable-callback.jsx";
|
|
6
|
+
import { G9Activity } from "../provider/activity.jsx";
|
|
5
7
|
import { G9KeyboardContext } from "../provider/contexts.jsx";
|
|
6
8
|
import { useG9Core, useG9SafeInsets, useG9Settings } from "../provider/hooks.jsx";
|
|
7
9
|
import { useG9Place } from "../route/hooks.jsx";
|
|
@@ -17,19 +19,34 @@ const G9HostInsetsContext = createContext(null);
|
|
|
17
19
|
const G9HostReadinessContext = createContext(null);
|
|
18
20
|
const OVERLAY_LAYERS = g9LayerOrder.filter((layer)=>'content' !== layer);
|
|
19
21
|
let hostSequence = 0;
|
|
22
|
+
const POPUP_ANCHORS = Object.freeze({
|
|
23
|
+
layer: 'popup'
|
|
24
|
+
});
|
|
25
|
+
const FLOATING_ANCHORS = Object.freeze({
|
|
26
|
+
layer: 'floating'
|
|
27
|
+
});
|
|
28
|
+
const LAYER_ANCHORS = Object.freeze({
|
|
29
|
+
edgePanel: FLOATING_ANCHORS,
|
|
30
|
+
popups: POPUP_ANCHORS,
|
|
31
|
+
feedback: FLOATING_ANCHORS,
|
|
32
|
+
floating: FLOATING_ANCHORS,
|
|
33
|
+
guide: FLOATING_ANCHORS
|
|
34
|
+
});
|
|
20
35
|
const HostLayer = memo(function(props) {
|
|
21
36
|
const { hostId, store, layer, container } = props;
|
|
22
37
|
const entries = useSyncExternalStore((listener)=>store.subscribe(layer, listener), ()=>store.getSnapshot(layer));
|
|
23
38
|
if (0 === entries.length) return null;
|
|
24
39
|
const className = `g9-host__layer g9-host__layer--${layer}`;
|
|
25
|
-
const
|
|
40
|
+
const listed = entries.map((entry)=><Fragment key={entry.key}>{entry.element}</Fragment>);
|
|
41
|
+
const anchorLayer = LAYER_ANCHORS[layer];
|
|
42
|
+
const items = anchorLayer ? <G9AnchorLayerContext.Provider value={anchorLayer}>{listed}</G9AnchorLayerContext.Provider> : listed;
|
|
26
43
|
if ('overlay' === container) return <OverlayView container="window" className={className} id={`${hostId}-${layer}`}>
|
|
27
44
|
{items}
|
|
28
45
|
</OverlayView>;
|
|
29
46
|
return <view className={className}>{items}</view>;
|
|
30
47
|
});
|
|
31
48
|
function G9Host(props) {
|
|
32
|
-
var _props_active, _props_name, _props_layerContainers, _props_dismissKeyboardOnTapOutside, _ref, _ref1, _props_background, _ref2;
|
|
49
|
+
var _props_active, _props_name, _props_layerContainers, _props_dismissKeyboardOnTapOutside, _ref, _ref1, _props_background, _ref2, _ref3, _ref4;
|
|
33
50
|
const core = useG9Core();
|
|
34
51
|
const settings = useG9Settings();
|
|
35
52
|
const parent = useContext(G9HostContext);
|
|
@@ -76,7 +93,19 @@ function G9Host(props) {
|
|
|
76
93
|
const features = new Map();
|
|
77
94
|
let released = false;
|
|
78
95
|
let contentEffect = null;
|
|
96
|
+
let claims = 0;
|
|
79
97
|
const effectListeners = new Set();
|
|
98
|
+
const notifyEffect = ()=>{
|
|
99
|
+
for (const listener of [
|
|
100
|
+
...effectListeners
|
|
101
|
+
])listener();
|
|
102
|
+
};
|
|
103
|
+
const subscribeEffect = (listener)=>{
|
|
104
|
+
effectListeners.add(listener);
|
|
105
|
+
return ()=>{
|
|
106
|
+
effectListeners.delete(listener);
|
|
107
|
+
};
|
|
108
|
+
};
|
|
80
109
|
const readiness = createHostReadiness({
|
|
81
110
|
cover: null != (_props_loadingCover = props.loadingCover) ? _props_loadingCover : true,
|
|
82
111
|
manualRelease: null != (_props_manualRelease = props.manualRelease) ? _props_manualRelease : false,
|
|
@@ -128,20 +157,25 @@ function G9Host(props) {
|
|
|
128
157
|
setContentEffect (effect) {
|
|
129
158
|
if (released || contentEffect === effect) return;
|
|
130
159
|
contentEffect = effect;
|
|
131
|
-
|
|
132
|
-
...effectListeners
|
|
133
|
-
])listener();
|
|
160
|
+
notifyEffect();
|
|
134
161
|
},
|
|
135
|
-
getContentEffect: ()=>contentEffect
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
162
|
+
getContentEffect: ()=>contentEffect,
|
|
163
|
+
subscribeContentEffect: subscribeEffect,
|
|
164
|
+
claimContentEffect () {
|
|
165
|
+
claims++;
|
|
166
|
+
notifyEffect();
|
|
167
|
+
let given = false;
|
|
140
168
|
return ()=>{
|
|
141
|
-
|
|
169
|
+
if (given) return;
|
|
170
|
+
given = true;
|
|
171
|
+
claims--;
|
|
172
|
+
notifyEffect();
|
|
142
173
|
};
|
|
143
|
-
}
|
|
144
|
-
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const effectStore = {
|
|
177
|
+
subscribe: subscribeEffect,
|
|
178
|
+
getSnapshot: ()=>claims > 0 ? null : contentEffect
|
|
145
179
|
};
|
|
146
180
|
return {
|
|
147
181
|
handle,
|
|
@@ -222,9 +256,10 @@ function G9Host(props) {
|
|
|
222
256
|
<view className="g9-host__content" style={{
|
|
223
257
|
backgroundColor: null != (_props_background = props.background) ? _props_background : 'var(--g9-background)',
|
|
224
258
|
transform: effect ? `translateY(${effect.translateY}px) scale(${effect.scale})` : 'translateY(0px) scale(1)',
|
|
225
|
-
|
|
259
|
+
borderRadius: `${null != (_ref2 = null == effect ? void 0 : effect.radius) ? _ref2 : 0}px`,
|
|
260
|
+
transition: `transform ${g9Ms(null != (_ref3 = null == effect ? void 0 : effect.durationMs) ? _ref3 : 300)}ms ease-out, border-radius ${g9Ms(null != (_ref4 = null == effect ? void 0 : effect.durationMs) ? _ref4 : 300)}ms ease-out`
|
|
226
261
|
}}>
|
|
227
|
-
{props.children}
|
|
262
|
+
<G9Activity mode={active ? 'visible' : 'hidden'}>{props.children}</G9Activity>
|
|
228
263
|
</view>
|
|
229
264
|
{OVERLAY_LAYERS.map((layer)=>{
|
|
230
265
|
var _containers_layer;
|
|
@@ -237,5 +272,3 @@ function G9Host(props) {
|
|
|
237
272
|
</G9HostContext.Provider>;
|
|
238
273
|
}
|
|
239
274
|
export { G9Host, G9HostContext, G9HostInsetsContext, G9HostReadinessContext };
|
|
240
|
-
|
|
241
|
-
//# sourceMappingURL=host.jsx.map
|
package/dist/host/keyboard.jsx
CHANGED
package/dist/host/layers.jsx
CHANGED
package/dist/host/readiness.jsx
CHANGED
package/dist/host/registry.d.ts
CHANGED
|
@@ -59,6 +59,13 @@ export interface G9HostHandle {
|
|
|
59
59
|
setContentEffect(effect: G9HostContentEffect | null): void;
|
|
60
60
|
/** The current content effect (`null` = identity). */
|
|
61
61
|
getContentEffect(): G9HostContentEffect | null;
|
|
62
|
+
/** Called when the content effect changes. */
|
|
63
|
+
subscribeContentEffect(listener: () => void): () => void;
|
|
64
|
+
/**
|
|
65
|
+
* A region takes the content effect instead of the whole page (`G9SheetBackdropScope`: the page recedes, the tab bar
|
|
66
|
+
* stays). While claimed the host's content stays still; the returned function gives it back.
|
|
67
|
+
*/
|
|
68
|
+
claimContentEffect(): () => void;
|
|
62
69
|
}
|
|
63
70
|
/** A transform of the page content (see {@link G9HostHandle.setContentEffect}). */
|
|
64
71
|
export interface G9HostContentEffect {
|
|
@@ -67,6 +74,8 @@ export interface G9HostContentEffect {
|
|
|
67
74
|
readonly durationMs: number;
|
|
68
75
|
/** Colour shown around the receded page. */
|
|
69
76
|
readonly backdropColor?: string;
|
|
77
|
+
/** Corner radius of the receded page (iOS card presentation). Default 0. */
|
|
78
|
+
readonly radius?: number;
|
|
70
79
|
}
|
|
71
80
|
/** Listener of {@link G9HostRegistry.subscribe}. */
|
|
72
81
|
export type G9HostListener = (host: G9HostHandle | null) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/host/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,mGAAmG;AACnG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MA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9C,sBAAsB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IACzD;;;OAGG;IACH,kBAAkB,IAAI,MAAM,IAAI,CAAC;CAClC;AAED,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,oDAAoD;AACpD,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;AAEjE;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,mHAAmH;IACnH,MAAM,IAAI,YAAY,GAAG,IAAI,CAAC;IAC9B,4GAA4G;IAC5G,OAAO,IAAI,YAAY,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,IAAI,CAAC;IAChD,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AA8CD,6GAA6G;AAC7G,eAAO,MAAM,OAAO,EAAE,cAsBrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;mBACR,YAAY,GAAG,IAAI;mBAOnB,YAAY,GAAG,IAAI;wBAUd,YAAY,GAAG,IAAI;iBAM1B,YAAY,GAAG,IAAI;CAMjC,CAAC"}
|
package/dist/host/registry.jsx
CHANGED
package/dist/icon/icon.d.ts
CHANGED
|
@@ -42,6 +42,22 @@ export interface G9IconProps {
|
|
|
42
42
|
readonly accessibilityLabel?: string;
|
|
43
43
|
readonly className?: string;
|
|
44
44
|
}
|
|
45
|
+
/** Props of {@link G9Art}. */
|
|
46
|
+
export interface G9ArtProps {
|
|
47
|
+
/** The SVG document; `currentColor` in it becomes `color`. Its viewBox gives the width for a height. */
|
|
48
|
+
readonly svg: string;
|
|
49
|
+
/** Height in px (the width follows the viewBox). Default 44. */
|
|
50
|
+
readonly height?: number;
|
|
51
|
+
/** A literal colour or a theme token (`var(--g9-primary)`). Default the primary text colour. */
|
|
52
|
+
readonly color?: string;
|
|
53
|
+
readonly accessibilityLabel?: string;
|
|
54
|
+
readonly className?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* An illustration or a logo drawn in the theme (SAC `Art` / `Logo`): any viewBox, `currentColor` painted with a theme
|
|
58
|
+
* token resolved to its value (SVG content cannot read CSS variables). Lynx draws no line elements: use paths.
|
|
59
|
+
*/
|
|
60
|
+
export declare const G9Art: import("react").NamedExoticComponent<G9ArtProps>;
|
|
45
61
|
/** The default bitmap renderer (MAUI `G9ImageFactory.DefaultFactory`): `<image>` with aspect fill, or SVG content. */
|
|
46
62
|
export declare function renderDefaultImage(source: G9ImageSource, size: number): ReactNode;
|
|
47
63
|
/** Renders `source` through the provider's `imageRenderer` setting, or the default (MAUI `G9ImageFactory.Create`). */
|
package/dist/icon/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,OAAO,EAEZ,KAAK,MAAM,IAAI,WAAW,EAC1B,KAAK,aAAa,EAQnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAqD,MAAM,gBAAgB,CAAC;AAGzG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,YAAY,CAAC;AAEpB,0DAA0D;AAC1D,eAA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AAa,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAWjF;AAED,sHAAsH;AACtH,wBAAgB,kBAAkB,IAAI,eAAe,CAEpD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,mDAsEjB,CAAC"}
|
package/dist/icon/icon.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { G9Error, createGlyphSvgCache, cssVariableName, fontIconText, isFontIcon, isG9Glyph, isIconEmpty, toIcon } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
-
import { memo, useContext, useMemo, useSyncExternalStore } from "@lynx-js/react";
|
|
3
|
-
import {
|
|
1
|
+
import { G9Error, createGlyphSvgCache, cssVariableName, findPackIcon, fontIconText, isFontIcon, isG9Glyph, isIconEmpty, packIconSvg, toIcon } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { memo, useContext, useMemo, useRef, useSyncExternalStore } from "@lynx-js/react";
|
|
3
|
+
import { subscribeThemeAndActivity } from "../provider/activity.jsx";
|
|
4
|
+
import { G9ActivityContext, G9CoreContext, G9CultureContext, G9SettingsContext } from "../provider/contexts.jsx";
|
|
4
5
|
import "./icon.css";
|
|
5
6
|
const g9IconDefaultSize = 20;
|
|
6
7
|
const g9IconDefaultColor = '#000000';
|
|
@@ -12,8 +13,14 @@ function resolveIcon(input, registry) {
|
|
|
12
13
|
if (!registry) throw new G9Error('icon-unknown', `"${input}" is not a G9Glyph; icon-font names need a G9Provider registry.`);
|
|
13
14
|
return registry.parse(input);
|
|
14
15
|
}
|
|
16
|
+
let tokenByVariable = null;
|
|
15
17
|
function tokenValue(theme, variable) {
|
|
16
|
-
|
|
18
|
+
if (!tokenByVariable) {
|
|
19
|
+
tokenByVariable = new Map();
|
|
20
|
+
for (const token of Object.keys(theme.palette))tokenByVariable.set(cssVariableName(token), token);
|
|
21
|
+
}
|
|
22
|
+
const token = tokenByVariable.get(variable);
|
|
23
|
+
return token ? theme.palette[token] : void 0;
|
|
17
24
|
}
|
|
18
25
|
const noStore = {
|
|
19
26
|
subscribe: ()=>()=>{},
|
|
@@ -23,15 +30,44 @@ function useResolvedColor(color, store) {
|
|
|
23
30
|
var _TOKEN_exec;
|
|
24
31
|
const variable = null == (_TOKEN_exec = TOKEN.exec(color)) ? void 0 : _TOKEN_exec[1];
|
|
25
32
|
const source = store && variable ? store : noStore;
|
|
26
|
-
const
|
|
33
|
+
const activity = useContext(G9ActivityContext);
|
|
34
|
+
const shown = useRef(null);
|
|
35
|
+
const subscribe = useMemo(()=>subscribeThemeAndActivity(source.subscribe, activity), [
|
|
36
|
+
source,
|
|
37
|
+
activity
|
|
38
|
+
]);
|
|
39
|
+
const resolved = useSyncExternalStore(subscribe, ()=>{
|
|
27
40
|
var _tokenValue;
|
|
41
|
+
if (!activity.visible() && null !== shown.current) return shown.current;
|
|
28
42
|
const theme = source.getSnapshot();
|
|
29
43
|
return theme && variable ? null != (_tokenValue = tokenValue(theme, variable)) ? _tokenValue : null : null;
|
|
30
44
|
});
|
|
45
|
+
shown.current = resolved;
|
|
31
46
|
if (!variable) return color;
|
|
32
47
|
if (null === resolved) throw new G9Error('icon-color', store ? `${color} is not a G9 theme colour token.` : `${color} needs a G9Provider theme to resolve.`);
|
|
33
48
|
return resolved;
|
|
34
49
|
}
|
|
50
|
+
const G9Art = memo(function(props) {
|
|
51
|
+
var _props_color, _props_height, _props_className;
|
|
52
|
+
const core = useContext(G9CoreContext);
|
|
53
|
+
const color = useResolvedColor(null != (_props_color = props.color) ? _props_color : 'var(--g9-text-primary)', null == core ? void 0 : core.themeStore);
|
|
54
|
+
const height = null != (_props_height = props.height) ? _props_height : 44;
|
|
55
|
+
const box = /viewBox="\s*[-\d.]+[\s,]+[-\d.]+[\s,]+([\d.]+)[\s,]+([\d.]+)\s*"/.exec(props.svg);
|
|
56
|
+
const width = box ? Math.round(height * Number(box[1]) / Math.max(1e-6, Number(box[2]))) : height;
|
|
57
|
+
const content = useMemo(()=>props.svg.replace(/currentColor/g, color), [
|
|
58
|
+
props.svg,
|
|
59
|
+
color
|
|
60
|
+
]);
|
|
61
|
+
return <svg className={null != (_props_className = props.className) ? _props_className : 'g9-art'} content={content} style={{
|
|
62
|
+
width: `${width}px`,
|
|
63
|
+
height: `${height}px`
|
|
64
|
+
}} {...props.accessibilityLabel ? {
|
|
65
|
+
'accessibility-element': true,
|
|
66
|
+
'accessibility-label': props.accessibilityLabel
|
|
67
|
+
} : {
|
|
68
|
+
'accessibility-element': false
|
|
69
|
+
}}/>;
|
|
70
|
+
});
|
|
35
71
|
function renderDefaultImage(source, size) {
|
|
36
72
|
const style = {
|
|
37
73
|
width: `${size}px`,
|
|
@@ -45,8 +81,8 @@ function useG9ImageRenderer() {
|
|
|
45
81
|
var _useContext;
|
|
46
82
|
return null != (_ref = null == (_useContext = useContext(G9SettingsContext)) ? void 0 : _useContext.imageRenderer) ? _ref : renderDefaultImage;
|
|
47
83
|
}
|
|
48
|
-
const
|
|
49
|
-
var _props_size, _props_weight, _props_color;
|
|
84
|
+
const G9Icon = memo(function(props) {
|
|
85
|
+
var _props_size, _props_weight, _props_color, _props_mirrorInRtl;
|
|
50
86
|
const core = useContext(G9CoreContext);
|
|
51
87
|
const settings = useContext(G9SettingsContext);
|
|
52
88
|
const culture = useContext(G9CultureContext);
|
|
@@ -54,18 +90,23 @@ const icon_G9Icon = memo(function(props) {
|
|
|
54
90
|
const size = null != (_props_size = props.size) ? _props_size : g9IconDefaultSize;
|
|
55
91
|
const weight = null != (_props_weight = props.weight) ? _props_weight : 1;
|
|
56
92
|
const rawColor = null != (_props_color = props.color) ? _props_color : g9IconDefaultColor;
|
|
57
|
-
const
|
|
93
|
+
const pack = useMemo(()=>'string' != typeof props.icon || isG9Glyph(props.icon) ? null : findPackIcon(props.icon), [
|
|
94
|
+
props.icon
|
|
95
|
+
]);
|
|
96
|
+
const icon = useMemo(()=>pack ? null : resolveIcon(props.icon, null == settings ? void 0 : settings.iconFonts), [
|
|
97
|
+
pack,
|
|
58
98
|
props.icon,
|
|
59
99
|
null == settings ? void 0 : settings.iconFonts
|
|
60
100
|
]);
|
|
61
101
|
const glyph = icon && 'glyph' in icon ? icon.glyph : void 0;
|
|
62
|
-
const color = useResolvedColor(glyph ? rawColor : '', null == core ? void 0 : core.themeStore);
|
|
63
|
-
const svg1 = useMemo(()=>glyph && 'none' !== glyph ? g9IconSvgCache.svg(glyph, color, weight) : void 0, [
|
|
102
|
+
const color = useResolvedColor(glyph || pack ? rawColor : '', null == core ? void 0 : core.themeStore);
|
|
103
|
+
const svg1 = useMemo(()=>pack ? packIconSvg(pack, color, weight) : glyph && 'none' !== glyph ? g9IconSvgCache.svg(glyph, color, weight) : void 0, [
|
|
104
|
+
pack,
|
|
64
105
|
glyph,
|
|
65
106
|
color,
|
|
66
107
|
weight
|
|
67
108
|
]);
|
|
68
|
-
const mirrored =
|
|
109
|
+
const mirrored = (null != (_props_mirrorInRtl = props.mirrorInRtl) ? _props_mirrorInRtl : (null == pack ? void 0 : pack.mirror) === true) && (null == culture ? void 0 : culture.culture.direction) === 'rtl';
|
|
69
110
|
const box = {
|
|
70
111
|
width: `${size}px`,
|
|
71
112
|
height: `${size}px`,
|
|
@@ -110,6 +151,4 @@ const icon_G9Icon = memo(function(props) {
|
|
|
110
151
|
{content}
|
|
111
152
|
</view>;
|
|
112
153
|
});
|
|
113
|
-
export { g9IconDefaultColor, g9IconDefaultSize, g9IconSvgCache,
|
|
114
|
-
|
|
115
|
-
//# sourceMappingURL=icon.jsx.map
|
|
154
|
+
export { G9Art, G9Icon, g9IconDefaultColor, g9IconDefaultSize, g9IconSvgCache, renderDefaultImage, useG9ImageRenderer };
|
package/dist/icon/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { G9Icon, type G9IconInput, type G9IconProps, g9IconDefaultColor, g9IconDefaultSize, g9IconSvgCache, renderDefaultImage, useG9ImageRenderer, } from './icon.js';
|
|
1
|
+
export { G9Art, type G9ArtProps, G9Icon, type G9IconInput, type G9IconProps, g9IconDefaultColor, g9IconDefaultSize, g9IconSvgCache, renderDefaultImage, useG9ImageRenderer, } from './icon.js';
|
|
2
2
|
export { G9IconSlot, type G9IconSlotInput, type G9IconSlotProps, hasIconSlot, iconSlotSignature, resolveIconImageSource, } from './slot.js';
|
|
3
3
|
export { G9Swatch, type G9SwatchProps, g9SwatchDefaultSize } from './swatch.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/icon/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/icon/index.jsx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { G9Icon, g9IconDefaultColor, g9IconDefaultSize, g9IconSvgCache, renderDefaultImage, useG9ImageRenderer } from "./icon.jsx";
|
|
1
|
+
export { G9Art, G9Icon, g9IconDefaultColor, g9IconDefaultSize, g9IconSvgCache, renderDefaultImage, useG9ImageRenderer } from "./icon.jsx";
|
|
2
2
|
export { G9IconSlot, hasIconSlot, iconSlotSignature, resolveIconImageSource } from "./slot.jsx";
|
|
3
3
|
export { G9Swatch, g9SwatchDefaultSize } from "./swatch.jsx";
|
package/dist/icon/slot.jsx
CHANGED
package/dist/icon/swatch.jsx
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,22 +2,31 @@ export type * from './anchor/index.js';
|
|
|
2
2
|
export type * from './base/index.js';
|
|
3
3
|
export type * from './button/index.js';
|
|
4
4
|
export type * from './cascade/index.js';
|
|
5
|
+
export type * from './commands/index.js';
|
|
5
6
|
export type * from './deferred/index.js';
|
|
6
7
|
export type * from './display/index.js';
|
|
7
8
|
export type * from './edge-panel/index.js';
|
|
9
|
+
export type * from './effects/index.js';
|
|
8
10
|
export type * from './expander/index.js';
|
|
9
11
|
export type * from './fields/index.js';
|
|
10
12
|
export type * from './guide/index.js';
|
|
13
|
+
export type * from './header/index.js';
|
|
11
14
|
export type * from './host/index.js';
|
|
12
15
|
export type * from './icon/index.js';
|
|
16
|
+
export type * from './layout/index.js';
|
|
17
|
+
export type * from './list/index.js';
|
|
18
|
+
export type * from './orb/index.js';
|
|
13
19
|
export type * from './pickers/index.js';
|
|
14
20
|
export type * from './plus-button/index.js';
|
|
21
|
+
export type * from './popover/index.js';
|
|
15
22
|
export type * from './popup/index.js';
|
|
16
23
|
export type * from './provider/index.js';
|
|
17
24
|
export type * from './range-slider/index.js';
|
|
18
25
|
export type * from './route/index.js';
|
|
19
26
|
export type * from './selection/index.js';
|
|
20
27
|
export type * from './sheet/index.js';
|
|
28
|
+
export type * from './shell/index.js';
|
|
29
|
+
export type * from './survey/index.js';
|
|
21
30
|
export type * from './swipe/index.js';
|
|
22
31
|
export type * from './tab-bar/index.js';
|
|
23
32
|
export type * from './tabs/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import './layout.css';
|
|
2
|
+
import { type ReactNode } from '@lynx-js/react';
|
|
3
|
+
import { type G9ControlBaseProps, type G9StyleProp } from '../base/control.js';
|
|
4
|
+
import { type G9IconInput } from '../icon/icon.js';
|
|
5
|
+
interface Common {
|
|
6
|
+
readonly id?: string;
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
readonly style?: G9StyleProp;
|
|
9
|
+
}
|
|
10
|
+
/** Props of {@link G9Card}. */
|
|
11
|
+
export interface G9CardProps extends G9ControlBaseProps {
|
|
12
|
+
/** `'outlined'` (default), `'filled'` (sunken), `'elevated'` (raised surface), `'glass'` (translucent, Riskara). */
|
|
13
|
+
readonly appearance?: 'outlined' | 'filled' | 'elevated' | 'glass';
|
|
14
|
+
/** Padding in dp. Default 16. */
|
|
15
|
+
readonly padding?: number;
|
|
16
|
+
/** Makes the card a target with the delayed press feedback of a card (SAC Target `pressable`). */
|
|
17
|
+
readonly onPress?: () => void;
|
|
18
|
+
/** A soft glow in this colour (Riskara Card `glow`). */
|
|
19
|
+
readonly glow?: string;
|
|
20
|
+
/** A 3 dp status edge on the leading side in this colour (SAC Edge). */
|
|
21
|
+
readonly edge?: string;
|
|
22
|
+
/** Rises in after this many ms (staggered lists). Default none. */
|
|
23
|
+
readonly enterDelay?: number;
|
|
24
|
+
readonly children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A card (every app's Card/Panel surface). Pressable cards show their press only after 70 ms and drop it on any move,
|
|
28
|
+
* so a scroll that starts on a card never flashes it (SAC Target) — the touch state lives in one element's class.
|
|
29
|
+
*/
|
|
30
|
+
export declare function G9Card(props: G9CardProps): ReactNode;
|
|
31
|
+
/** Props of {@link G9Section}. */
|
|
32
|
+
export interface G9SectionProps extends Common {
|
|
33
|
+
readonly title?: string;
|
|
34
|
+
readonly subtitle?: string;
|
|
35
|
+
readonly icon?: G9IconInput;
|
|
36
|
+
/** At the end of the title row (a link, an action button). */
|
|
37
|
+
readonly actions?: ReactNode;
|
|
38
|
+
/** In a card (default true: SAC Section, kit Panel) or bare (a page section, ShopManager Section). */
|
|
39
|
+
readonly card?: boolean;
|
|
40
|
+
/** Content padding inside the card. Default 16. */
|
|
41
|
+
readonly padding?: number;
|
|
42
|
+
readonly children?: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
/** A titled block of a page or form (SAC Section/Panel, ShopManager Section, Riskara SectionHead, G9Hub SettingsGroup). */
|
|
45
|
+
export declare function G9Section(props: G9SectionProps): ReactNode;
|
|
46
|
+
/** Props of {@link G9SectionHeader}. */
|
|
47
|
+
export interface G9SectionHeaderProps extends Common {
|
|
48
|
+
readonly title: string;
|
|
49
|
+
readonly subtitle?: string;
|
|
50
|
+
readonly icon?: G9IconInput;
|
|
51
|
+
readonly actions?: ReactNode;
|
|
52
|
+
/** A text action at the end (`«همه»`). */
|
|
53
|
+
readonly action?: {
|
|
54
|
+
readonly text: string;
|
|
55
|
+
readonly onPress: () => void;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** A section's title row: icon, title, a line under it, and an action at the end. */
|
|
59
|
+
export declare const G9SectionHeader: import("react").NamedExoticComponent<G9SectionHeaderProps>;
|
|
60
|
+
/** Props of {@link G9Columns}. */
|
|
61
|
+
export interface G9ColumnsProps extends Common {
|
|
62
|
+
/** Side by side from this layout up; stacked below. Default `'tablet'`. */
|
|
63
|
+
readonly from?: 'tablet' | 'desktop';
|
|
64
|
+
/** Default 16. */
|
|
65
|
+
readonly gap?: number;
|
|
66
|
+
/** Relative widths (`[2, 1]`); default equal. */
|
|
67
|
+
readonly weights?: readonly number[];
|
|
68
|
+
readonly children?: ReactNode;
|
|
69
|
+
}
|
|
70
|
+
/** Form or content columns on wide windows, one column on narrow ones (SAC Cols). Re-renders only on a class change. */
|
|
71
|
+
export declare function G9Columns(props: G9ColumnsProps): ReactNode;
|
|
72
|
+
/** Props of {@link G9Bento}. */
|
|
73
|
+
export interface G9BentoProps extends Common {
|
|
74
|
+
/** Each child's share of a 12-column row (`[8, 4]`, `[4, 4, 4]`). */
|
|
75
|
+
readonly spans: readonly number[];
|
|
76
|
+
/** Stack below this layout. Default `'tablet'` (stacked on phones). */
|
|
77
|
+
readonly stackBelow?: 'tablet' | 'desktop';
|
|
78
|
+
readonly gap?: number;
|
|
79
|
+
readonly children?: ReactNode;
|
|
80
|
+
}
|
|
81
|
+
/** A responsive bento row (Riskara Bento): children share 12 columns on wide windows, stack on narrow ones. */
|
|
82
|
+
export declare function G9Bento(props: G9BentoProps): ReactNode;
|
|
83
|
+
/** Props of {@link G9ActionRow}. */
|
|
84
|
+
export interface G9ActionRowProps extends Common {
|
|
85
|
+
/** Space above. Default 12. */
|
|
86
|
+
readonly top?: number;
|
|
87
|
+
readonly children?: ReactNode;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The main action(s) of a form or page (SAC ActionRow): on a desk at the end at their own width (a page-wide bar reads
|
|
91
|
+
* as a banner, not a button); on a phone full width for the thumb.
|
|
92
|
+
*/
|
|
93
|
+
export declare function G9ActionRow(props: G9ActionRowProps): ReactNode;
|
|
94
|
+
/** Props of {@link G9UnsavedBar}. */
|
|
95
|
+
export interface G9UnsavedBarProps extends Common {
|
|
96
|
+
/** Shown only while there are changes. */
|
|
97
|
+
readonly dirty: boolean;
|
|
98
|
+
readonly busy?: boolean;
|
|
99
|
+
readonly message: string;
|
|
100
|
+
readonly saveText: string;
|
|
101
|
+
readonly onSave: () => void;
|
|
102
|
+
readonly discardText?: string;
|
|
103
|
+
readonly onDiscard?: () => void;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A bar that appears while a form has unsaved changes (G9Hub UnsavedBar, SAC SaveBar): the message, discard, save. It
|
|
107
|
+
* rises from the bottom (transform only) and says nothing when the form is clean.
|
|
108
|
+
*/
|
|
109
|
+
export declare function G9UnsavedBar(props: G9UnsavedBarProps): ReactNode;
|
|
110
|
+
/** SAC's name for {@link G9UnsavedBar} (the same control). */
|
|
111
|
+
export declare const G9SaveBar: typeof G9UnsavedBar;
|
|
112
|
+
export {};
|
|
113
|
+
//# sourceMappingURL=containers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../../src/layout/containers.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAkB,KAAK,SAAS,EAAoB,MAAM,gBAAgB,CAAC;AAClF,OAAO,EACL,KAAK,kBAAkB,EACvB,KA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