@g9tm/lynxcontrols 0.0.0-stage → 1.4.2
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 +29 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/base/base.css +16 -0
- package/dist/base/base.css.map +1 -0
- package/dist/base/control.d.ts +68 -0
- package/dist/base/control.d.ts.map +1 -0
- package/dist/base/control.jsx +36 -0
- package/dist/base/control.jsx.map +1 -0
- package/dist/base/corner-badge.d.ts +35 -0
- package/dist/base/corner-badge.d.ts.map +1 -0
- package/dist/base/corner-badge.jsx +45 -0
- package/dist/base/corner-badge.jsx.map +1 -0
- package/dist/base/disposer.d.ts +28 -0
- package/dist/base/disposer.d.ts.map +1 -0
- package/dist/base/disposer.jsx +61 -0
- package/dist/base/disposer.jsx.map +1 -0
- package/dist/base/index.d.ts +10 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.jsx +9 -0
- package/dist/base/press.d.ts +38 -0
- package/dist/base/press.d.ts.map +1 -0
- package/dist/base/press.jsx +73 -0
- package/dist/base/press.jsx.map +1 -0
- package/dist/base/pressable.d.ts +25 -0
- package/dist/base/pressable.d.ts.map +1 -0
- package/dist/base/pressable.jsx +38 -0
- package/dist/base/pressable.jsx.map +1 -0
- package/dist/base/selection-item.d.ts +29 -0
- package/dist/base/selection-item.d.ts.map +1 -0
- package/dist/base/selection-item.jsx +6 -0
- package/dist/base/selection-item.jsx.map +1 -0
- package/dist/base/timers.d.ts +7 -0
- package/dist/base/timers.d.ts.map +1 -0
- package/dist/base/timers.jsx +10 -0
- package/dist/base/timers.jsx.map +1 -0
- package/dist/base/use-controllable-state.d.ts +30 -0
- package/dist/base/use-controllable-state.d.ts.map +1 -0
- package/dist/base/use-controllable-state.jsx +49 -0
- package/dist/base/use-controllable-state.jsx.map +1 -0
- package/dist/base/use-stable-callback.d.ts +8 -0
- package/dist/base/use-stable-callback.d.ts.map +1 -0
- package/dist/base/use-stable-callback.jsx +12 -0
- package/dist/base/use-stable-callback.jsx.map +1 -0
- package/dist/button/button.css +162 -0
- package/dist/button/button.css.map +1 -0
- package/dist/button/button.d.ts +52 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/button.jsx +88 -0
- package/dist/button/button.jsx.map +1 -0
- package/dist/button/header-action-button.d.ts +34 -0
- package/dist/button/header-action-button.d.ts.map +1 -0
- package/dist/button/header-action-button.jsx +51 -0
- package/dist/button/header-action-button.jsx.map +1 -0
- package/dist/button/icon-button.d.ts +46 -0
- package/dist/button/icon-button.d.ts.map +1 -0
- package/dist/button/icon-button.jsx +69 -0
- package/dist/button/icon-button.jsx.map +1 -0
- package/dist/button/index.d.ts +9 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/index.jsx +8 -0
- package/dist/button/nav-card.d.ts +58 -0
- package/dist/button/nav-card.d.ts.map +1 -0
- package/dist/button/nav-card.jsx +96 -0
- package/dist/button/nav-card.jsx.map +1 -0
- package/dist/button/safe-tap.d.ts +27 -0
- package/dist/button/safe-tap.d.ts.map +1 -0
- package/dist/button/safe-tap.jsx +46 -0
- package/dist/button/safe-tap.jsx.map +1 -0
- package/dist/button/safe.d.ts +84 -0
- package/dist/button/safe.d.ts.map +1 -0
- package/dist/button/safe.jsx +116 -0
- package/dist/button/safe.jsx.map +1 -0
- package/dist/button/vertical-icon-text-button.d.ts +18 -0
- package/dist/button/vertical-icon-text-button.d.ts.map +1 -0
- package/dist/button/vertical-icon-text-button.jsx +21 -0
- package/dist/button/vertical-icon-text-button.jsx.map +1 -0
- package/dist/button/visuals.d.ts +53 -0
- package/dist/button/visuals.d.ts.map +1 -0
- package/dist/button/visuals.jsx +92 -0
- package/dist/button/visuals.jsx.map +1 -0
- package/dist/cascade/cascade-panel.d.ts +80 -0
- package/dist/cascade/cascade-panel.d.ts.map +1 -0
- package/dist/cascade/cascade-panel.jsx +179 -0
- package/dist/cascade/cascade-panel.jsx.map +1 -0
- package/dist/cascade/cascade.css +70 -0
- package/dist/cascade/cascade.css.map +1 -0
- package/dist/cascade/index.d.ts +3 -0
- package/dist/cascade/index.d.ts.map +1 -0
- package/dist/cascade/index.jsx +2 -0
- package/dist/cascade/model.d.ts +68 -0
- package/dist/cascade/model.d.ts.map +1 -0
- package/dist/cascade/model.jsx +161 -0
- package/dist/cascade/model.jsx.map +1 -0
- package/dist/deferred/deferred-content.d.ts +82 -0
- package/dist/deferred/deferred-content.d.ts.map +1 -0
- package/dist/deferred/deferred-content.jsx +263 -0
- package/dist/deferred/deferred-content.jsx.map +1 -0
- package/dist/deferred/deferred.css +62 -0
- package/dist/deferred/deferred.css.map +1 -0
- package/dist/deferred/index.d.ts +3 -0
- package/dist/deferred/index.d.ts.map +1 -0
- package/dist/deferred/index.jsx +2 -0
- package/dist/deferred/readiness-signal.d.ts +16 -0
- package/dist/deferred/readiness-signal.d.ts.map +1 -0
- package/dist/deferred/readiness-signal.jsx +29 -0
- package/dist/deferred/readiness-signal.jsx.map +1 -0
- package/dist/display/activity-indicator.d.ts +21 -0
- package/dist/display/activity-indicator.d.ts.map +1 -0
- package/dist/display/activity-indicator.jsx +22 -0
- package/dist/display/activity-indicator.jsx.map +1 -0
- package/dist/display/culture-date-time-label.d.ts +64 -0
- package/dist/display/culture-date-time-label.d.ts.map +1 -0
- package/dist/display/culture-date-time-label.jsx +73 -0
- package/dist/display/culture-date-time-label.jsx.map +1 -0
- package/dist/display/display.css +217 -0
- package/dist/display/display.css.map +1 -0
- package/dist/display/index.d.ts +7 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.jsx +6 -0
- package/dist/display/progress-bar.d.ts +38 -0
- package/dist/display/progress-bar.d.ts.map +1 -0
- package/dist/display/progress-bar.jsx +57 -0
- package/dist/display/progress-bar.jsx.map +1 -0
- package/dist/display/separator.d.ts +30 -0
- package/dist/display/separator.d.ts.map +1 -0
- package/dist/display/separator.jsx +55 -0
- package/dist/display/separator.jsx.map +1 -0
- package/dist/display/shimmer.d.ts +41 -0
- package/dist/display/shimmer.d.ts.map +1 -0
- package/dist/display/shimmer.jsx +41 -0
- package/dist/display/shimmer.jsx.map +1 -0
- package/dist/display/title-with-line.d.ts +13 -0
- package/dist/display/title-with-line.d.ts.map +1 -0
- package/dist/display/title-with-line.jsx +21 -0
- package/dist/display/title-with-line.jsx.map +1 -0
- package/dist/edge-panel/edge-panel.css +132 -0
- package/dist/edge-panel/edge-panel.css.map +1 -0
- package/dist/edge-panel/edge-panel.d.ts +87 -0
- package/dist/edge-panel/edge-panel.d.ts.map +1 -0
- package/dist/edge-panel/edge-panel.jsx +326 -0
- package/dist/edge-panel/edge-panel.jsx.map +1 -0
- package/dist/edge-panel/helper.d.ts +27 -0
- package/dist/edge-panel/helper.d.ts.map +1 -0
- package/dist/edge-panel/helper.jsx +118 -0
- package/dist/edge-panel/helper.jsx.map +1 -0
- package/dist/edge-panel/index.d.ts +4 -0
- package/dist/edge-panel/index.d.ts.map +1 -0
- package/dist/edge-panel/index.jsx +3 -0
- package/dist/edge-panel/types.d.ts +155 -0
- package/dist/edge-panel/types.d.ts.map +1 -0
- package/dist/edge-panel/types.jsx +139 -0
- package/dist/edge-panel/types.jsx.map +1 -0
- package/dist/expander/expander.css +54 -0
- package/dist/expander/expander.css.map +1 -0
- package/dist/expander/expander.d.ts +46 -0
- package/dist/expander/expander.d.ts.map +1 -0
- package/dist/expander/expander.jsx +112 -0
- package/dist/expander/expander.jsx.map +1 -0
- package/dist/expander/index.d.ts +2 -0
- package/dist/expander/index.d.ts.map +1 -0
- package/dist/expander/index.jsx +1 -0
- package/dist/fields/dictation.d.ts +43 -0
- package/dist/fields/dictation.d.ts.map +1 -0
- package/dist/fields/dictation.jsx +124 -0
- package/dist/fields/dictation.jsx.map +1 -0
- package/dist/fields/editor.d.ts +26 -0
- package/dist/fields/editor.d.ts.map +1 -0
- package/dist/fields/editor.jsx +46 -0
- package/dist/fields/editor.jsx.map +1 -0
- package/dist/fields/fields.css +164 -0
- package/dist/fields/fields.css.map +1 -0
- package/dist/fields/index.d.ts +13 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.jsx +12 -0
- package/dist/fields/input-policy.d.ts +48 -0
- package/dist/fields/input-policy.d.ts.map +1 -0
- package/dist/fields/input-policy.jsx +215 -0
- package/dist/fields/input-policy.jsx.map +1 -0
- package/dist/fields/notch.d.ts +10 -0
- package/dist/fields/notch.d.ts.map +1 -0
- package/dist/fields/notch.jsx +9 -0
- package/dist/fields/notch.jsx.map +1 -0
- package/dist/fields/outlined-field.d.ts +152 -0
- package/dist/fields/outlined-field.d.ts.map +1 -0
- package/dist/fields/outlined-field.jsx +199 -0
- package/dist/fields/outlined-field.jsx.map +1 -0
- package/dist/fields/pin-entry.d.ts +65 -0
- package/dist/fields/pin-entry.d.ts.map +1 -0
- package/dist/fields/pin-entry.jsx +294 -0
- package/dist/fields/pin-entry.jsx.map +1 -0
- package/dist/fields/search-entry.d.ts +35 -0
- package/dist/fields/search-entry.d.ts.map +1 -0
- package/dist/fields/search-entry.jsx +118 -0
- package/dist/fields/search-entry.jsx.map +1 -0
- package/dist/fields/slot-layout.d.ts +33 -0
- package/dist/fields/slot-layout.d.ts.map +1 -0
- package/dist/fields/slot-layout.jsx +33 -0
- package/dist/fields/slot-layout.jsx.map +1 -0
- package/dist/fields/text-entry.d.ts +62 -0
- package/dist/fields/text-entry.d.ts.map +1 -0
- package/dist/fields/text-entry.jsx +82 -0
- package/dist/fields/text-entry.jsx.map +1 -0
- package/dist/fields/use-dictation.d.ts +34 -0
- package/dist/fields/use-dictation.d.ts.map +1 -0
- package/dist/fields/use-dictation.jsx +80 -0
- package/dist/fields/use-dictation.jsx.map +1 -0
- package/dist/fields/use-text-input.d.ts +150 -0
- package/dist/fields/use-text-input.d.ts.map +1 -0
- package/dist/fields/use-text-input.jsx +247 -0
- package/dist/fields/use-text-input.jsx.map +1 -0
- package/dist/fields/validator.d.ts +14 -0
- package/dist/fields/validator.d.ts.map +1 -0
- package/dist/fields/validator.jsx +20 -0
- package/dist/fields/validator.jsx.map +1 -0
- package/dist/host/back.d.ts +42 -0
- package/dist/host/back.d.ts.map +1 -0
- package/dist/host/back.jsx +47 -0
- package/dist/host/back.jsx.map +1 -0
- package/dist/host/hooks.d.ts +90 -0
- package/dist/host/hooks.d.ts.map +1 -0
- package/dist/host/hooks.jsx +166 -0
- package/dist/host/hooks.jsx.map +1 -0
- package/dist/host/host.css +81 -0
- package/dist/host/host.css.map +1 -0
- package/dist/host/host.d.ts +70 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.jsx +229 -0
- package/dist/host/host.jsx.map +1 -0
- package/dist/host/index.d.ts +9 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.jsx +8 -0
- package/dist/host/keyboard.d.ts +24 -0
- package/dist/host/keyboard.d.ts.map +1 -0
- package/dist/host/keyboard.jsx +28 -0
- package/dist/host/keyboard.jsx.map +1 -0
- package/dist/host/layers.d.ts +69 -0
- package/dist/host/layers.d.ts.map +1 -0
- package/dist/host/layers.jsx +111 -0
- package/dist/host/layers.jsx.map +1 -0
- package/dist/host/page-loading-overlay.d.ts +17 -0
- package/dist/host/page-loading-overlay.d.ts.map +1 -0
- package/dist/host/page-loading-overlay.jsx +16 -0
- package/dist/host/page-loading-overlay.jsx.map +1 -0
- package/dist/host/readiness.d.ts +57 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.jsx +138 -0
- package/dist/host/readiness.jsx.map +1 -0
- package/dist/host/registry.d.ts +106 -0
- package/dist/host/registry.d.ts.map +1 -0
- package/dist/host/registry.jsx +93 -0
- package/dist/host/registry.jsx.map +1 -0
- package/dist/icon/icon.css +39 -0
- package/dist/icon/icon.css.map +1 -0
- package/dist/icon/icon.d.ts +57 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.jsx +115 -0
- package/dist/icon/icon.jsx.map +1 -0
- package/dist/icon/index.d.ts +4 -0
- package/dist/icon/index.d.ts.map +1 -0
- package/dist/icon/index.jsx +3 -0
- package/dist/icon/slot.d.ts +45 -0
- package/dist/icon/slot.d.ts.map +1 -0
- package/dist/icon/slot.jsx +61 -0
- package/dist/icon/slot.jsx.map +1 -0
- package/dist/icon/swatch.d.ts +29 -0
- package/dist/icon/swatch.d.ts.map +1 -0
- package/dist/icon/swatch.jsx +25 -0
- package/dist/icon/swatch.jsx.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.jsx +1 -0
- package/dist/pickers/combo-box.d.ts +42 -0
- package/dist/pickers/combo-box.d.ts.map +1 -0
- package/dist/pickers/combo-box.jsx +129 -0
- package/dist/pickers/combo-box.jsx.map +1 -0
- package/dist/pickers/date-time-picker.d.ts +63 -0
- package/dist/pickers/date-time-picker.d.ts.map +1 -0
- package/dist/pickers/date-time-picker.jsx +141 -0
- package/dist/pickers/date-time-picker.jsx.map +1 -0
- package/dist/pickers/date-time.d.ts +82 -0
- package/dist/pickers/date-time.d.ts.map +1 -0
- package/dist/pickers/date-time.jsx +130 -0
- package/dist/pickers/date-time.jsx.map +1 -0
- package/dist/pickers/index.d.ts +10 -0
- package/dist/pickers/index.d.ts.map +1 -0
- package/dist/pickers/index.jsx +9 -0
- package/dist/pickers/picker-sheet.d.ts +21 -0
- package/dist/pickers/picker-sheet.d.ts.map +1 -0
- package/dist/pickers/picker-sheet.jsx +61 -0
- package/dist/pickers/picker-sheet.jsx.map +1 -0
- package/dist/pickers/picker.d.ts +32 -0
- package/dist/pickers/picker.d.ts.map +1 -0
- package/dist/pickers/picker.jsx +72 -0
- package/dist/pickers/picker.jsx.map +1 -0
- package/dist/pickers/pickers.css +219 -0
- package/dist/pickers/pickers.css.map +1 -0
- package/dist/pickers/timespan-picker.d.ts +36 -0
- package/dist/pickers/timespan-picker.d.ts.map +1 -0
- package/dist/pickers/timespan-picker.jsx +99 -0
- package/dist/pickers/timespan-picker.jsx.map +1 -0
- package/dist/pickers/timespan.d.ts +38 -0
- package/dist/pickers/timespan.d.ts.map +1 -0
- package/dist/pickers/timespan.jsx +49 -0
- package/dist/pickers/timespan.jsx.map +1 -0
- package/dist/pickers/trigger.d.ts +34 -0
- package/dist/pickers/trigger.d.ts.map +1 -0
- package/dist/pickers/trigger.jsx +77 -0
- package/dist/pickers/trigger.jsx.map +1 -0
- package/dist/pickers/wheel-column.d.ts +32 -0
- package/dist/pickers/wheel-column.d.ts.map +1 -0
- package/dist/pickers/wheel-column.jsx +99 -0
- package/dist/pickers/wheel-column.jsx.map +1 -0
- package/dist/plus-button/index.d.ts +3 -0
- package/dist/plus-button/index.d.ts.map +1 -0
- package/dist/plus-button/index.jsx +2 -0
- package/dist/plus-button/model.d.ts +65 -0
- package/dist/plus-button/model.d.ts.map +1 -0
- package/dist/plus-button/model.jsx +86 -0
- package/dist/plus-button/model.jsx.map +1 -0
- package/dist/plus-button/plus-button.css +67 -0
- package/dist/plus-button/plus-button.css.map +1 -0
- package/dist/plus-button/plus-button.d.ts +38 -0
- package/dist/plus-button/plus-button.d.ts.map +1 -0
- package/dist/plus-button/plus-button.jsx +155 -0
- package/dist/plus-button/plus-button.jsx.map +1 -0
- package/dist/popup/frame.d.ts +101 -0
- package/dist/popup/frame.d.ts.map +1 -0
- package/dist/popup/frame.jsx +252 -0
- package/dist/popup/frame.jsx.map +1 -0
- package/dist/popup/index.d.ts +8 -0
- package/dist/popup/index.d.ts.map +1 -0
- package/dist/popup/index.jsx +7 -0
- package/dist/popup/input-form.d.ts +35 -0
- package/dist/popup/input-form.d.ts.map +1 -0
- package/dist/popup/input-form.jsx +160 -0
- package/dist/popup/input-form.jsx.map +1 -0
- package/dist/popup/input.d.ts +175 -0
- package/dist/popup/input.d.ts.map +1 -0
- package/dist/popup/input.jsx +176 -0
- package/dist/popup/input.jsx.map +1 -0
- package/dist/popup/popup-view.d.ts +25 -0
- package/dist/popup/popup-view.d.ts.map +1 -0
- package/dist/popup/popup-view.jsx +67 -0
- package/dist/popup/popup-view.jsx.map +1 -0
- package/dist/popup/popup.css +203 -0
- package/dist/popup/popup.css.map +1 -0
- package/dist/popup/queue.d.ts +90 -0
- package/dist/popup/queue.d.ts.map +1 -0
- package/dist/popup/queue.jsx +309 -0
- package/dist/popup/queue.jsx.map +1 -0
- package/dist/popup/service.d.ts +60 -0
- package/dist/popup/service.d.ts.map +1 -0
- package/dist/popup/service.jsx +350 -0
- package/dist/popup/service.jsx.map +1 -0
- package/dist/popup/types.d.ts +222 -0
- package/dist/popup/types.d.ts.map +1 -0
- package/dist/popup/types.jsx +218 -0
- package/dist/popup/types.jsx.map +1 -0
- package/dist/provider/contexts.d.ts +41 -0
- package/dist/provider/contexts.d.ts.map +1 -0
- package/dist/provider/contexts.jsx +11 -0
- package/dist/provider/contexts.jsx.map +1 -0
- package/dist/provider/global-events.d.ts +8 -0
- package/dist/provider/global-events.d.ts.map +1 -0
- package/dist/provider/global-events.jsx +17 -0
- package/dist/provider/global-events.jsx.map +1 -0
- package/dist/provider/hooks.d.ts +49 -0
- package/dist/provider/hooks.d.ts.map +1 -0
- package/dist/provider/hooks.jsx +72 -0
- package/dist/provider/hooks.jsx.map +1 -0
- package/dist/provider/index.d.ts +5 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.jsx +3 -0
- package/dist/provider/provider.css +18 -0
- package/dist/provider/provider.css.map +1 -0
- package/dist/provider/provider.d.ts +51 -0
- package/dist/provider/provider.d.ts.map +1 -0
- package/dist/provider/provider.jsx +290 -0
- package/dist/provider/provider.jsx.map +1 -0
- package/dist/provider/settings.d.ts +99 -0
- package/dist/provider/settings.d.ts.map +1 -0
- package/dist/provider/settings.jsx +45 -0
- package/dist/provider/settings.jsx.map +1 -0
- package/dist/provider/theme-css.d.ts +12 -0
- package/dist/provider/theme-css.d.ts.map +1 -0
- package/dist/provider/theme-css.jsx +19 -0
- package/dist/provider/theme-css.jsx.map +1 -0
- package/dist/provider/theme-root.d.ts +10 -0
- package/dist/provider/theme-root.d.ts.map +1 -0
- package/dist/provider/theme-root.jsx +24 -0
- package/dist/provider/theme-root.jsx.map +1 -0
- package/dist/provider/theme.css +473 -0
- package/dist/provider/theme.css.map +1 -0
- package/dist/range-slider/index.d.ts +3 -0
- package/dist/range-slider/index.d.ts.map +1 -0
- package/dist/range-slider/index.jsx +2 -0
- package/dist/range-slider/math.d.ts +23 -0
- package/dist/range-slider/math.d.ts.map +1 -0
- package/dist/range-slider/math.jsx +71 -0
- package/dist/range-slider/math.jsx.map +1 -0
- package/dist/range-slider/range-slider.css +90 -0
- package/dist/range-slider/range-slider.css.map +1 -0
- package/dist/range-slider/range-slider.d.ts +52 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -0
- package/dist/range-slider/range-slider.jsx +159 -0
- package/dist/range-slider/range-slider.jsx.map +1 -0
- package/dist/selection/index.d.ts +5 -0
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/selection/index.jsx +3 -0
- package/dist/selection/model.d.ts +53 -0
- package/dist/selection/model.d.ts.map +1 -0
- package/dist/selection/model.jsx +69 -0
- package/dist/selection/model.jsx.map +1 -0
- package/dist/selection/selection-sheet.d.ts +80 -0
- package/dist/selection/selection-sheet.d.ts.map +1 -0
- package/dist/selection/selection-sheet.jsx +366 -0
- package/dist/selection/selection-sheet.jsx.map +1 -0
- package/dist/selection/selection.css +76 -0
- package/dist/selection/selection.css.map +1 -0
- package/dist/selection/use-selection-model.d.ts +9 -0
- package/dist/selection/use-selection-model.d.ts.map +1 -0
- package/dist/selection/use-selection-model.jsx +22 -0
- package/dist/selection/use-selection-model.jsx.map +1 -0
- package/dist/sheet/frame.d.ts +47 -0
- package/dist/sheet/frame.d.ts.map +1 -0
- package/dist/sheet/frame.jsx +270 -0
- package/dist/sheet/frame.jsx.map +1 -0
- package/dist/sheet/gesture.d.ts +51 -0
- package/dist/sheet/gesture.d.ts.map +1 -0
- package/dist/sheet/gesture.jsx +107 -0
- package/dist/sheet/gesture.jsx.map +1 -0
- package/dist/sheet/handoff.d.ts +32 -0
- package/dist/sheet/handoff.d.ts.map +1 -0
- package/dist/sheet/handoff.jsx +33 -0
- package/dist/sheet/handoff.jsx.map +1 -0
- package/dist/sheet/header.d.ts +46 -0
- package/dist/sheet/header.d.ts.map +1 -0
- package/dist/sheet/header.jsx +158 -0
- package/dist/sheet/header.jsx.map +1 -0
- package/dist/sheet/height-memo.d.ts +47 -0
- package/dist/sheet/height-memo.d.ts.map +1 -0
- package/dist/sheet/height-memo.jsx +100 -0
- package/dist/sheet/height-memo.jsx.map +1 -0
- package/dist/sheet/index.d.ts +12 -0
- package/dist/sheet/index.d.ts.map +1 -0
- package/dist/sheet/index.jsx +11 -0
- package/dist/sheet/loadable.d.ts +35 -0
- package/dist/sheet/loadable.d.ts.map +1 -0
- package/dist/sheet/loadable.jsx +65 -0
- package/dist/sheet/loadable.jsx.map +1 -0
- package/dist/sheet/motion.d.ts +59 -0
- package/dist/sheet/motion.d.ts.map +1 -0
- package/dist/sheet/motion.jsx +59 -0
- package/dist/sheet/motion.jsx.map +1 -0
- package/dist/sheet/options.d.ts +252 -0
- package/dist/sheet/options.d.ts.map +1 -0
- package/dist/sheet/options.jsx +92 -0
- package/dist/sheet/options.jsx.map +1 -0
- package/dist/sheet/processing.d.ts +22 -0
- package/dist/sheet/processing.d.ts.map +1 -0
- package/dist/sheet/processing.jsx +66 -0
- package/dist/sheet/processing.jsx.map +1 -0
- package/dist/sheet/service.d.ts +55 -0
- package/dist/sheet/service.d.ts.map +1 -0
- package/dist/sheet/service.jsx +143 -0
- package/dist/sheet/service.jsx.map +1 -0
- package/dist/sheet/sheet.css +246 -0
- package/dist/sheet/sheet.css.map +1 -0
- package/dist/sheet/sheet.d.ts +19 -0
- package/dist/sheet/sheet.d.ts.map +1 -0
- package/dist/sheet/sheet.jsx +40 -0
- package/dist/sheet/sheet.jsx.map +1 -0
- package/dist/sheet/sizing.d.ts +87 -0
- package/dist/sheet/sizing.d.ts.map +1 -0
- package/dist/sheet/sizing.jsx +159 -0
- package/dist/sheet/sizing.jsx.map +1 -0
- package/dist/sheet/stack.d.ts +161 -0
- package/dist/sheet/stack.d.ts.map +1 -0
- package/dist/sheet/stack.jsx +378 -0
- package/dist/sheet/stack.jsx.map +1 -0
- package/dist/swipe/index.d.ts +3 -0
- package/dist/swipe/index.d.ts.map +1 -0
- package/dist/swipe/index.jsx +2 -0
- package/dist/swipe/model.d.ts +72 -0
- package/dist/swipe/model.d.ts.map +1 -0
- package/dist/swipe/model.jsx +66 -0
- package/dist/swipe/model.jsx.map +1 -0
- package/dist/swipe/swipe-view.d.ts +40 -0
- package/dist/swipe/swipe-view.d.ts.map +1 -0
- package/dist/swipe/swipe-view.jsx +163 -0
- package/dist/swipe/swipe-view.jsx.map +1 -0
- package/dist/swipe/swipe.css +34 -0
- package/dist/swipe/swipe.css.map +1 -0
- package/dist/tab-bar/index.d.ts +4 -0
- package/dist/tab-bar/index.d.ts.map +1 -0
- package/dist/tab-bar/index.jsx +3 -0
- package/dist/tab-bar/metrics.d.ts +230 -0
- package/dist/tab-bar/metrics.d.ts.map +1 -0
- package/dist/tab-bar/metrics.jsx +221 -0
- package/dist/tab-bar/metrics.jsx.map +1 -0
- package/dist/tab-bar/model.d.ts +170 -0
- package/dist/tab-bar/model.d.ts.map +1 -0
- package/dist/tab-bar/model.jsx +349 -0
- package/dist/tab-bar/model.jsx.map +1 -0
- package/dist/tab-bar/tab-bar.css +173 -0
- package/dist/tab-bar/tab-bar.css.map +1 -0
- package/dist/tab-bar/tab-bar.d.ts +61 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -0
- package/dist/tab-bar/tab-bar.jsx +346 -0
- package/dist/tab-bar/tab-bar.jsx.map +1 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.jsx +2 -0
- package/dist/tabs/model.d.ts +83 -0
- package/dist/tabs/model.d.ts.map +1 -0
- package/dist/tabs/model.jsx +113 -0
- package/dist/tabs/model.jsx.map +1 -0
- package/dist/tabs/tab-view.d.ts +47 -0
- package/dist/tabs/tab-view.d.ts.map +1 -0
- package/dist/tabs/tab-view.jsx +227 -0
- package/dist/tabs/tab-view.jsx.map +1 -0
- package/dist/tabs/tabs.css +182 -0
- package/dist/tabs/tabs.css.map +1 -0
- package/dist/toast/index.d.ts +3 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.jsx +2 -0
- package/dist/toast/service.d.ts +48 -0
- package/dist/toast/service.d.ts.map +1 -0
- package/dist/toast/service.jsx +238 -0
- package/dist/toast/service.jsx.map +1 -0
- package/dist/toast/store.d.ts +176 -0
- package/dist/toast/store.d.ts.map +1 -0
- package/dist/toast/store.jsx +355 -0
- package/dist/toast/store.jsx.map +1 -0
- package/dist/toast/toast.css +159 -0
- package/dist/toast/toast.css.map +1 -0
- package/dist/toggle/checkbox-math.d.ts +52 -0
- package/dist/toggle/checkbox-math.d.ts.map +1 -0
- package/dist/toggle/checkbox-math.jsx +111 -0
- package/dist/toggle/checkbox-math.jsx.map +1 -0
- package/dist/toggle/checkbox.d.ts +56 -0
- package/dist/toggle/checkbox.d.ts.map +1 -0
- package/dist/toggle/checkbox.jsx +152 -0
- package/dist/toggle/checkbox.jsx.map +1 -0
- package/dist/toggle/chip-group.d.ts +50 -0
- package/dist/toggle/chip-group.d.ts.map +1 -0
- package/dist/toggle/chip-group.jsx +107 -0
- package/dist/toggle/chip-group.jsx.map +1 -0
- package/dist/toggle/index.d.ts +5 -0
- package/dist/toggle/index.d.ts.map +1 -0
- package/dist/toggle/index.jsx +4 -0
- package/dist/toggle/switch.d.ts +52 -0
- package/dist/toggle/switch.d.ts.map +1 -0
- package/dist/toggle/switch.jsx +192 -0
- package/dist/toggle/switch.jsx.map +1 -0
- package/dist/toggle/toggle.css +188 -0
- package/dist/toggle/toggle.css.map +1 -0
- package/package.json +155 -4
- package/rspeedy/index.d.ts +21 -0
- package/rspeedy/index.mjs +75 -0
- package/rspeedy/index.test.mjs +52 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import './button.css';
|
|
2
|
+
import { type G9ImageSource } from '@g9tm/lynxcontrols-foundation';
|
|
3
|
+
import type { ReactNode } from '@lynx-js/react';
|
|
4
|
+
import { type G9ControlBaseProps } from '../base/control.js';
|
|
5
|
+
import type { G9IconInput } from '../icon/icon.js';
|
|
6
|
+
/** Props of {@link G9NavCard} (MAUI `G9NavCard`). */
|
|
7
|
+
export interface G9NavCardProps extends G9ControlBaseProps {
|
|
8
|
+
readonly title?: string | null;
|
|
9
|
+
readonly subtitle?: string | null;
|
|
10
|
+
/** Icon and icon-tile tint. Default the primary colour. Must be a colour literal (it is mixed). */
|
|
11
|
+
readonly accentColor?: string | null;
|
|
12
|
+
readonly iconEmoji?: string | null;
|
|
13
|
+
readonly icon?: G9IconInput;
|
|
14
|
+
readonly iconPath?: string | null;
|
|
15
|
+
readonly iconImage?: G9ImageSource | null;
|
|
16
|
+
/** Trailing chevron (forward in LTR, back in RTL). Default true. */
|
|
17
|
+
readonly showChevron?: boolean;
|
|
18
|
+
readonly valueText?: string | null;
|
|
19
|
+
/** Value colour; default error when destructive, else tertiary text. */
|
|
20
|
+
readonly valueColor?: string | null;
|
|
21
|
+
/** Coming-soon badge instead of value and chevron; presses do nothing. Default false. */
|
|
22
|
+
readonly isComingSoon?: boolean;
|
|
23
|
+
/** Badge text; default the localized `comingSoon`. */
|
|
24
|
+
readonly comingSoonText?: string | null;
|
|
25
|
+
readonly iconBadgeText?: string | null;
|
|
26
|
+
readonly showIconBadgeDot?: boolean;
|
|
27
|
+
readonly iconBadgeColor?: string | null;
|
|
28
|
+
/** Default true. */
|
|
29
|
+
readonly mirrorBadgeTextInRtl?: boolean;
|
|
30
|
+
/** Replaces the whole trailing area (value, chevron, coming-soon badge). */
|
|
31
|
+
readonly trailing?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* A small node on the title's line, right after the title (a count pill, an unread dot, a "6/10"; MAUI 1.4.0
|
|
34
|
+
* `TitleAccessoryView`). It does not take over the trailing area, so the chevron, value and coming-soon badge keep
|
|
35
|
+
* working beside it. A long title truncates; the accessory never does. Unset keeps the title layout as it was.
|
|
36
|
+
*/
|
|
37
|
+
readonly titleAccessory?: ReactNode;
|
|
38
|
+
/** Title (and default value colour) in the error colour. Default false. */
|
|
39
|
+
readonly isDestructive?: boolean;
|
|
40
|
+
/** Tint the card background with the accent (88 % surface). Default false. */
|
|
41
|
+
readonly useAccentSurface?: boolean;
|
|
42
|
+
/** Accent used only for the background tint. */
|
|
43
|
+
readonly cardAccentColor?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Paint the icon tile solid in the accent with an `OnPrimary` icon instead of the pastel tile with an accent icon
|
|
46
|
+
* (MAUI 1.4.0 `UseFilledIconChip`): the one primary row of a list. Pair with `useAccentSurface`. Default false.
|
|
47
|
+
*/
|
|
48
|
+
readonly useFilledIconChip?: boolean;
|
|
49
|
+
/** The press (MAUI `Tapped` + `Command`); not while disabled or coming soon. */
|
|
50
|
+
readonly onPress?: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Navigation row card (MAUI `G9NavCard`): icon tile (pastel, or filled with `useFilledIconChip`) with optional corner
|
|
54
|
+
* badge, title (with an optional `titleAccessory` after it)/subtitle, value text, chevron or coming-soon badge, or a
|
|
55
|
+
* custom trailing node. Press: scale 0.985 (70 ms) → 1 (120 ms); hover on desktop.
|
|
56
|
+
*/
|
|
57
|
+
export declare function G9NavCard(props: G9NavCardProps): ReactNode;
|
|
58
|
+
//# sourceMappingURL=nav-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-card.d.ts","sourceRoot":"","sources":["../../src/button/nav-card.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAe,KAAK,aAAa,EAAuC,MAAM,+BAA+B,CAAC;AACrH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,kBAAkB,EAAyC,MAAM,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,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,gDAAgD;IAChD,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,CAgH1D"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import "./button.css";
|
|
2
|
+
import { G9StringKey, formatColor, mix, resolveThemeColor } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
+
import { g9RowStyle, g9TextStart, useG9Control } from "../base/control.jsx";
|
|
4
|
+
import { G9CornerBadge } from "../base/corner-badge.jsx";
|
|
5
|
+
import { useG9Press, usePressVisual } from "../base/press.jsx";
|
|
6
|
+
import { G9IconSlot, hasIconSlot } from "../icon/slot.jsx";
|
|
7
|
+
import { useG9Settings, useG9Strings, useG9Theme } from "../provider/hooks.jsx";
|
|
8
|
+
function G9NavCard(props) {
|
|
9
|
+
var _props_accessibilityLabel, _props_accessibilityLabel1, _props_valueColor;
|
|
10
|
+
const control = useG9Control(props, 'g9-nav-card');
|
|
11
|
+
const palette = useG9Theme().palette;
|
|
12
|
+
const glyphs = useG9Settings().glyphs;
|
|
13
|
+
const strings = useG9Strings();
|
|
14
|
+
const soon = true === props.isComingSoon;
|
|
15
|
+
const destructive = true === props.isDestructive;
|
|
16
|
+
const accent = props.accentColor ? resolveThemeColor(props.accentColor, palette) : palette.Primary;
|
|
17
|
+
const cardAccent = props.cardAccentColor ? resolveThemeColor(props.cardAccentColor, palette) : accent;
|
|
18
|
+
const surface = props.useAccentSurface ? formatColor(mix(cardAccent, palette.Surface, 0.88)) : palette.Surface;
|
|
19
|
+
const press = useG9Press(props.onPress, {
|
|
20
|
+
blocked: control.disabled || soon,
|
|
21
|
+
source: 'G9NavCard'
|
|
22
|
+
});
|
|
23
|
+
const visual = usePressVisual({
|
|
24
|
+
property: 'scale',
|
|
25
|
+
rest: 1,
|
|
26
|
+
pressed: 0.985,
|
|
27
|
+
inMs: 70,
|
|
28
|
+
outMs: 120
|
|
29
|
+
}, control.disabled || soon);
|
|
30
|
+
const icon = {
|
|
31
|
+
emoji: props.iconEmoji,
|
|
32
|
+
icon: props.icon,
|
|
33
|
+
imagePath: props.iconPath,
|
|
34
|
+
image: props.iconImage
|
|
35
|
+
};
|
|
36
|
+
const subtitle = props.subtitle && '' !== props.subtitle.trim() ? props.subtitle : null;
|
|
37
|
+
const value = props.valueText && '' !== props.valueText.trim() ? props.valueText : null;
|
|
38
|
+
const soonText = props.comingSoonText && '' !== props.comingSoonText.trim() ? props.comingSoonText : strings.get(G9StringKey.ComingSoon);
|
|
39
|
+
const label = [
|
|
40
|
+
props.title,
|
|
41
|
+
subtitle
|
|
42
|
+
].filter(Boolean).join(', ');
|
|
43
|
+
const filledChip = true === props.useFilledIconChip;
|
|
44
|
+
const title = props.title ? <text className="g9-nav-card__title" text-maxline="1" style={{
|
|
45
|
+
color: destructive ? palette.Error : palette.TextPrimary,
|
|
46
|
+
...g9TextStart(control.direction)
|
|
47
|
+
}}>
|
|
48
|
+
{props.title}
|
|
49
|
+
</text> : null;
|
|
50
|
+
return <view className={control.className} {...control.idProps} style={{
|
|
51
|
+
backgroundColor: surface,
|
|
52
|
+
...g9RowStyle(control.direction)
|
|
53
|
+
}} {...void 0 === props.trailing ? {
|
|
54
|
+
'accessibility-element': true,
|
|
55
|
+
'accessibility-traits': 'button',
|
|
56
|
+
...(null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : label) ? {
|
|
57
|
+
'accessibility-label': null != (_props_accessibilityLabel1 = props.accessibilityLabel) ? _props_accessibilityLabel1 : label
|
|
58
|
+
} : {},
|
|
59
|
+
...soon ? {
|
|
60
|
+
'accessibility-value': soonText
|
|
61
|
+
} : value ? {
|
|
62
|
+
'accessibility-value': value
|
|
63
|
+
} : {}
|
|
64
|
+
} : {}} bindtap={press} {...visual}>
|
|
65
|
+
{hasIconSlot(icon) ? <view className="g9-nav-card__tile" style={{
|
|
66
|
+
backgroundColor: filledChip ? accent : formatColor(mix(accent, palette.Surface, 0.82))
|
|
67
|
+
}}>
|
|
68
|
+
<G9IconSlot {...icon} size={props.iconEmoji ? 22 : 18} color={filledChip ? palette.OnPrimary : accent}/>
|
|
69
|
+
<G9CornerBadge text={props.iconBadgeText} dot={true === props.showIconBadgeDot} color={props.iconBadgeColor} mirrorTextInRtl={false !== props.mirrorBadgeTextInRtl}/>
|
|
70
|
+
</view> : null}
|
|
71
|
+
<view className="g9-nav-card__text">
|
|
72
|
+
{void 0 === props.titleAccessory || null === props.titleAccessory ? title : <view className="g9-nav-card__title-row" style={g9RowStyle(control.direction)}>
|
|
73
|
+
{title}
|
|
74
|
+
<view className="g9-nav-card__title-accessory">{props.titleAccessory}</view>
|
|
75
|
+
</view>}
|
|
76
|
+
{subtitle ? <text className="g9-nav-card__subtitle" text-maxline="1" style={g9TextStart(control.direction)}>
|
|
77
|
+
{subtitle}
|
|
78
|
+
</text> : null}
|
|
79
|
+
</view>
|
|
80
|
+
{void 0 !== props.trailing ? <view className="g9-nav-card__trailing" style={g9RowStyle(control.direction)}>
|
|
81
|
+
{props.trailing}
|
|
82
|
+
</view> : <view className="g9-nav-card__trailing" style={g9RowStyle(control.direction)}>
|
|
83
|
+
{value && !soon ? <text className="g9-nav-card__value" text-maxline="1" style={{
|
|
84
|
+
color: null != (_props_valueColor = props.valueColor) ? _props_valueColor : destructive ? palette.Error : palette.TextTertiary
|
|
85
|
+
}}>
|
|
86
|
+
{value}
|
|
87
|
+
</text> : null}
|
|
88
|
+
{soon ? <view className="g9-nav-card__soon">
|
|
89
|
+
<text className="g9-nav-card__soon-text">{soonText}</text>
|
|
90
|
+
</view> : false !== props.showChevron ? <G9IconSlot icon={'rtl' === control.direction ? glyphs.chevronBack : glyphs.chevronForward} size={24} color={palette.TextTertiary}/> : null}
|
|
91
|
+
</view>}
|
|
92
|
+
</view>;
|
|
93
|
+
}
|
|
94
|
+
export { G9NavCard };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=nav-card.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button/nav-card.jsx","sources":["../../src/button/nav-card.tsx"],"sourcesContent":["import './button.css';\nimport { formatColor, type G9ImageSource, G9StringKey, mix, resolveThemeColor } from '@g9tm/lynxcontrols-foundation';\nimport type { ReactNode } from '@lynx-js/react';\nimport { type G9ControlBaseProps, g9RowStyle, g9TextStart, useG9Control } from '../base/control';\nimport { G9CornerBadge } from '../base/corner-badge';\nimport { useG9Press, usePressVisual } from '../base/press';\nimport type { G9IconInput } from '../icon/icon';\nimport { G9IconSlot, hasIconSlot } from '../icon/slot';\nimport { useG9Settings, useG9Strings, useG9Theme } from '../provider/hooks';\n\n/** Props of {@link G9NavCard} (MAUI `G9NavCard`). */\nexport interface G9NavCardProps extends G9ControlBaseProps {\n readonly title?: string | null;\n readonly subtitle?: string | null;\n /** Icon and icon-tile tint. Default the primary colour. Must be a colour literal (it is mixed). */\n readonly accentColor?: string | null;\n readonly iconEmoji?: string | null;\n readonly icon?: G9IconInput;\n readonly iconPath?: string | null;\n readonly iconImage?: G9ImageSource | null;\n /** Trailing chevron (forward in LTR, back in RTL). Default true. */\n readonly showChevron?: boolean;\n readonly valueText?: string | null;\n /** Value colour; default error when destructive, else tertiary text. */\n readonly valueColor?: string | null;\n /** Coming-soon badge instead of value and chevron; presses do nothing. Default false. */\n readonly isComingSoon?: boolean;\n /** Badge text; default the localized `comingSoon`. */\n readonly comingSoonText?: string | null;\n readonly iconBadgeText?: string | null;\n readonly showIconBadgeDot?: boolean;\n readonly iconBadgeColor?: string | null;\n /** Default true. */\n readonly mirrorBadgeTextInRtl?: boolean;\n /** Replaces the whole trailing area (value, chevron, coming-soon badge). */\n readonly trailing?: ReactNode;\n /**\n * A small node on the title's line, right after the title (a count pill, an unread dot, a \"6/10\"; MAUI 1.4.0\n * `TitleAccessoryView`). It does not take over the trailing area, so the chevron, value and coming-soon badge keep\n * working beside it. A long title truncates; the accessory never does. Unset keeps the title layout as it was.\n */\n readonly titleAccessory?: ReactNode;\n /** Title (and default value colour) in the error colour. Default false. */\n readonly isDestructive?: boolean;\n /** Tint the card background with the accent (88 % surface). Default false. */\n readonly useAccentSurface?: boolean;\n /** Accent used only for the background tint. */\n readonly cardAccentColor?: string | null;\n /**\n * Paint the icon tile solid in the accent with an `OnPrimary` icon instead of the pastel tile with an accent icon\n * (MAUI 1.4.0 `UseFilledIconChip`): the one primary row of a list. Pair with `useAccentSurface`. Default false.\n */\n readonly useFilledIconChip?: boolean;\n /** The press (MAUI `Tapped` + `Command`); not while disabled or coming soon. */\n readonly onPress?: () => void;\n}\n\n/**\n * Navigation row card (MAUI `G9NavCard`): icon tile (pastel, or filled with `useFilledIconChip`) with optional corner\n * badge, title (with an optional `titleAccessory` after it)/subtitle, value text, chevron or coming-soon badge, or a\n * custom trailing node. Press: scale 0.985 (70 ms) → 1 (120 ms); hover on desktop.\n */\nexport function G9NavCard(props: G9NavCardProps): ReactNode {\n const control = useG9Control(props, 'g9-nav-card');\n const palette = useG9Theme().palette;\n const glyphs = useG9Settings().glyphs;\n const strings = useG9Strings();\n const soon = props.isComingSoon === true;\n const destructive = props.isDestructive === true;\n // A theme reference (`var(--g9-success)`) is resolved against the live palette: the accent is mixed below, and a\n // CSS variable cannot be mixed.\n const accent = props.accentColor ? resolveThemeColor(props.accentColor, palette) : palette.Primary;\n const cardAccent = props.cardAccentColor ? resolveThemeColor(props.cardAccentColor, palette) : accent;\n const surface = props.useAccentSurface ? formatColor(mix(cardAccent, palette.Surface, 0.88)) : palette.Surface;\n const press = useG9Press(props.onPress, { blocked: control.disabled || soon, source: 'G9NavCard' });\n const visual = usePressVisual(\n { property: 'scale', rest: 1, pressed: 0.985, inMs: 70, outMs: 120 },\n control.disabled || soon,\n );\n const icon = { emoji: props.iconEmoji, icon: props.icon, imagePath: props.iconPath, image: props.iconImage };\n const subtitle = props.subtitle && props.subtitle.trim() !== '' ? props.subtitle : null;\n const value = props.valueText && props.valueText.trim() !== '' ? props.valueText : null;\n const soonText =\n props.comingSoonText && props.comingSoonText.trim() !== ''\n ? props.comingSoonText\n : strings.get(G9StringKey.ComingSoon);\n const label = [props.title, subtitle].filter(Boolean).join(', ');\n const filledChip = props.useFilledIconChip === true;\n const title = props.title ? (\n <text\n className=\"g9-nav-card__title\"\n text-maxline=\"1\"\n style={{ color: destructive ? palette.Error : palette.TextPrimary, ...g9TextStart(control.direction) }}\n >\n {props.title}\n </text>\n ) : null;\n return (\n <view\n className={control.className}\n {...control.idProps}\n style={{ backgroundColor: surface, ...g9RowStyle(control.direction) }}\n {...(props.trailing === undefined\n ? {\n 'accessibility-element': true,\n 'accessibility-traits': 'button',\n ...((props.accessibilityLabel ?? label)\n ? { 'accessibility-label': props.accessibilityLabel ?? label }\n : {}),\n ...(soon ? { 'accessibility-value': soonText } : value ? { 'accessibility-value': value } : {}),\n }\n : {})}\n bindtap={press}\n {...visual}\n >\n {hasIconSlot(icon) ? (\n <view\n className=\"g9-nav-card__tile\"\n style={{ backgroundColor: filledChip ? accent : formatColor(mix(accent, palette.Surface, 0.82)) }}\n >\n <G9IconSlot {...icon} size={props.iconEmoji ? 22 : 18} color={filledChip ? palette.OnPrimary : accent} />\n <G9CornerBadge\n text={props.iconBadgeText}\n dot={props.showIconBadgeDot === true}\n color={props.iconBadgeColor}\n mirrorTextInRtl={props.mirrorBadgeTextInRtl !== false}\n />\n </view>\n ) : null}\n <view className=\"g9-nav-card__text\">\n {props.titleAccessory === undefined || props.titleAccessory === null ? (\n title\n ) : (\n <view className=\"g9-nav-card__title-row\" style={g9RowStyle(control.direction)}>\n {title}\n <view className=\"g9-nav-card__title-accessory\">{props.titleAccessory}</view>\n </view>\n )}\n {subtitle ? (\n <text className=\"g9-nav-card__subtitle\" text-maxline=\"1\" style={g9TextStart(control.direction)}>\n {subtitle}\n </text>\n ) : null}\n </view>\n {props.trailing !== undefined ? (\n <view className=\"g9-nav-card__trailing\" style={g9RowStyle(control.direction)}>\n {props.trailing}\n </view>\n ) : (\n <view className=\"g9-nav-card__trailing\" style={g9RowStyle(control.direction)}>\n {value && !soon ? (\n <text\n className=\"g9-nav-card__value\"\n text-maxline=\"1\"\n style={{ color: props.valueColor ?? (destructive ? palette.Error : palette.TextTertiary) }}\n >\n {value}\n </text>\n ) : null}\n {soon ? (\n <view className=\"g9-nav-card__soon\">\n <text className=\"g9-nav-card__soon-text\">{soonText}</text>\n </view>\n ) : props.showChevron !== false ? (\n <G9IconSlot\n icon={control.direction === 'rtl' ? glyphs.chevronBack : glyphs.chevronForward}\n size={24}\n color={palette.TextTertiary}\n />\n ) : null}\n </view>\n )}\n </view>\n );\n}\n"],"names":["G9NavCard","props","_props_accessibilityLabel","_props_accessibilityLabel1","_props_valueColor","control","useG9Control","palette","useG9Theme","glyphs","useG9Settings","strings","useG9Strings","soon","destructive","accent","resolveThemeColor","cardAccent","surface","formatColor","mix","press","useG9Press","visual","usePressVisual","icon","subtitle","value","soonText","G9StringKey","label","Boolean","filledChip","title","text","g9TextStart","view","g9RowStyle","undefined","hasIconSlot","G9IconSlot","G9CornerBadge"],"mappings":";;;;;;;AA8DO,SAASA,UAAUC,KAAqB;QA4C9BC,2BACwBC,4BA+CXC;IA3F5B,MAAMC,UAAUC,aAAaL,OAAO;IACpC,MAAMM,UAAUC,aAAa,OAAO;IACpC,MAAMC,SAASC,gBAAgB,MAAM;IACrC,MAAMC,UAAUC;IAChB,MAAMC,OAAOZ,AAAuB,SAAvBA,MAAM,YAAY;IAC/B,M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
|
2
|
+
/** Options of {@link useSafeTap} (MAUI `G9SafeTapBehavior`). */
|
|
3
|
+
export interface G9SafeTapOptions {
|
|
4
|
+
/** Taps needed to run (double tap = 2); taps further apart than `multiTapWindowMs` restart the count. Default 1. */
|
|
5
|
+
readonly numberOfTapsRequired?: number;
|
|
6
|
+
/** Max gap between the taps of a multi-tap. Default 300 ms. */
|
|
7
|
+
readonly multiTapWindowMs?: number;
|
|
8
|
+
/** Default true. */
|
|
9
|
+
readonly enableThrottle?: boolean;
|
|
10
|
+
/** Default one key per hook instance. */
|
|
11
|
+
readonly throttleKey?: string;
|
|
12
|
+
/** Default 369 ms. */
|
|
13
|
+
readonly throttleIntervalMs?: number;
|
|
14
|
+
/** Default `'G9SafeTapBehavior'`. */
|
|
15
|
+
readonly source?: string;
|
|
16
|
+
/** Default true. */
|
|
17
|
+
readonly showErrorPopup?: boolean;
|
|
18
|
+
/** `false` ignores taps (MAUI `CanExecute`). Default true. */
|
|
19
|
+
readonly canExecute?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A guarded tap for any element (MAUI `G9SafeTapBehavior`): returns a `bindtap` handler that runs `action` through the
|
|
23
|
+
* provider's safe executor (throttle, one run at a time, errors to diagnostics and the popup). No busy state and no
|
|
24
|
+
* visual feedback, as in MAUI. `numberOfTapsRequired` is read on every tap (MAUI read it once at attach).
|
|
25
|
+
*/
|
|
26
|
+
export declare function useSafeTap(action: ((context: G9SafeRunContext) => unknown) | null | undefined, options?: G9SafeTapOptions): () => void;
|
|
27
|
+
//# sourceMappingURL=safe-tap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-tap.d.ts","sourceRoot":"","sources":["../../src/button/safe-tap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,oHAAoH;IACpH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,oBAAoB;IACpB,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,yCAAyC;IACzC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB;IACtB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,qCAAqC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAID;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EACnE,OAAO,GAAE,gBAAqB,GAC7B,MAAM,IAAI,CAwBZ"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useRef } from "@lynx-js/react";
|
|
2
|
+
import { useG9Executor } from "../provider/hooks.jsx";
|
|
3
|
+
let counter = 0;
|
|
4
|
+
function useSafeTap(action, options = {}) {
|
|
5
|
+
const executor = useG9Executor();
|
|
6
|
+
const key = useRef(null);
|
|
7
|
+
if (null === key.current) key.current = `G9SafeTapBehavior:${++counter}`;
|
|
8
|
+
const taps = useRef({
|
|
9
|
+
count: 0,
|
|
10
|
+
last: 0
|
|
11
|
+
});
|
|
12
|
+
return ()=>{
|
|
13
|
+
var _options_numberOfTapsRequired, _options_throttleKey, _options_source;
|
|
14
|
+
if (!action || false === options.canExecute) return;
|
|
15
|
+
const required = Math.max(1, Math.floor(null != (_options_numberOfTapsRequired = options.numberOfTapsRequired) ? _options_numberOfTapsRequired : 1));
|
|
16
|
+
if (required > 1) {
|
|
17
|
+
var _options_multiTapWindowMs;
|
|
18
|
+
const now = Date.now();
|
|
19
|
+
const window = null != (_options_multiTapWindowMs = options.multiTapWindowMs) ? _options_multiTapWindowMs : 300;
|
|
20
|
+
taps.current = now - taps.current.last <= window ? {
|
|
21
|
+
count: taps.current.count + 1,
|
|
22
|
+
last: now
|
|
23
|
+
} : {
|
|
24
|
+
count: 1,
|
|
25
|
+
last: now
|
|
26
|
+
};
|
|
27
|
+
if (taps.current.count < required) return;
|
|
28
|
+
taps.current = {
|
|
29
|
+
count: 0,
|
|
30
|
+
last: 0
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
executor.runSafe(action, {
|
|
34
|
+
throttleKey: null != (_options_throttleKey = options.throttleKey) ? _options_throttleKey : key.current,
|
|
35
|
+
enableThrottle: false !== options.enableThrottle,
|
|
36
|
+
...void 0 !== options.throttleIntervalMs ? {
|
|
37
|
+
throttleIntervalMs: options.throttleIntervalMs
|
|
38
|
+
} : {},
|
|
39
|
+
source: null != (_options_source = options.source) ? _options_source : 'G9SafeTapBehavior',
|
|
40
|
+
showErrorPopup: false !== options.showErrorPopup
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export { useSafeTap };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=safe-tap.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button/safe-tap.jsx","sources":["../../src/button/safe-tap.ts"],"sourcesContent":["import type { G9SafeRunContext } from '@g9tm/lynxcontrols-foundation';\nimport { useRef } from '@lynx-js/react';\nimport { useG9Executor } from '../provider/hooks';\n\n/** Options of {@link useSafeTap} (MAUI `G9SafeTapBehavior`). */\nexport interface G9SafeTapOptions {\n /** Taps needed to run (double tap = 2); taps further apart than `multiTapWindowMs` restart the count. Default 1. */\n readonly numberOfTapsRequired?: number;\n /** Max gap between the taps of a multi-tap. Default 300 ms. */\n readonly multiTapWindowMs?: number;\n /** Default true. */\n readonly enableThrottle?: boolean;\n /** Default one key per hook instance. */\n readonly throttleKey?: string;\n /** Default 369 ms. */\n readonly throttleIntervalMs?: number;\n /** Default `'G9SafeTapBehavior'`. */\n readonly source?: string;\n /** Default true. */\n readonly showErrorPopup?: boolean;\n /** `false` ignores taps (MAUI `CanExecute`). Default true. */\n readonly canExecute?: boolean;\n}\n\nlet counter = 0;\n\n/**\n * A guarded tap for any element (MAUI `G9SafeTapBehavior`): returns a `bindtap` handler that runs `action` through the\n * provider's safe executor (throttle, one run at a time, errors to diagnostics and the popup). No busy state and no\n * visual feedback, as in MAUI. `numberOfTapsRequired` is read on every tap (MAUI read it once at attach).\n */\nexport function useSafeTap(\n action: ((context: G9SafeRunContext) => unknown) | null | undefined,\n options: G9SafeTapOptions = {},\n): () => void {\n const executor = useG9Executor();\n const key = useRef<string | null>(null);\n if (key.current === null) key.current = `G9SafeTapBehavior:${++counter}`;\n const taps = useRef<{ count: number; last: number }>({ count: 0, last: 0 });\n return () => {\n if (!action || options.canExecute === false) return;\n const required = Math.max(1, Math.floor(options.numberOfTapsRequired ?? 1));\n if (required > 1) {\n const now = Date.now();\n const window = options.multiTapWindowMs ?? 300;\n taps.current =\n now - taps.current.last <= window ? { count: taps.current.count + 1, last: now } : { count: 1, last: now };\n if (taps.current.count < required) return;\n taps.current = { count: 0, last: 0 };\n }\n executor.runSafe(action, {\n throttleKey: options.throttleKey ?? (key.current as string),\n enableThrottle: options.enableThrottle !== false,\n ...(options.throttleIntervalMs !== undefined ? { throttleIntervalMs: options.throttleIntervalMs } : {}),\n source: options.source ?? 'G9SafeTapBehavior',\n showErrorPopup: options.showErrorPopup !== false,\n });\n };\n}\n"],"names":["counter","useSafeTap","action","options","executor","useG9Executor","key","useRef","taps","_options_numberOfTapsRequired","_options_throttleKey","_options_source","required","Math","_options_multiTapWindowMs","now","Date","window","undefined"],"mappings":";;AAwBA,IAAIA,UAAU;AAOP,SAASC,WACdC,MAAmE,EACnEC,UAA4B,CAAC,CAAC;IAE9B,MAAMC,W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A,QAAQ,cAAc;QACxC;IACF;AACF"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type G9SafeRunContext, type G9SafeRunResult } from '@g9tm/lynxcontrols-foundation';
|
|
2
|
+
import { type G9ButtonProps } from './button.js';
|
|
3
|
+
import { type G9IconButtonProps } from './icon-button.js';
|
|
4
|
+
/** MAUI `G9SafeButtonType`: a subset of the button variants. */
|
|
5
|
+
export declare const G9SafeButtonType: {
|
|
6
|
+
readonly Primary: "primary";
|
|
7
|
+
readonly Default: "default";
|
|
8
|
+
readonly Secondary: "secondary";
|
|
9
|
+
readonly Info: "info";
|
|
10
|
+
readonly Success: "success";
|
|
11
|
+
readonly Warning: "warning";
|
|
12
|
+
readonly Error: "error";
|
|
13
|
+
readonly Surface: "surface";
|
|
14
|
+
readonly Outline: "outline";
|
|
15
|
+
};
|
|
16
|
+
export type G9SafeButtonType = (typeof G9SafeButtonType)[keyof typeof G9SafeButtonType];
|
|
17
|
+
/** The guarded action: `onExecute` (specs/03 §4). */
|
|
18
|
+
export type G9SafeExecuteHandler = (context: G9SafeRunContext) => unknown;
|
|
19
|
+
/** Options of the guarded execution shared by the safe buttons (MAUI `G9SafeExecution`). */
|
|
20
|
+
export interface G9SafeExecutionProps {
|
|
21
|
+
/** The guarded action (MAUI `SafeCommand` / `SafeClickedCallbackAsync` / `SafeClickedAsync`). */
|
|
22
|
+
readonly onExecute?: G9SafeExecuteHandler;
|
|
23
|
+
/** More guarded handlers, awaited in order after `onExecute` (MAUI `SafeClickedAsync` subscribers). */
|
|
24
|
+
readonly onExecuteHandlers?: ReadonlyArray<G9SafeExecuteHandler>;
|
|
25
|
+
/** Guarded execution on; false: a tap only calls `onPress`. Default true. */
|
|
26
|
+
readonly enableSafeExecution?: boolean;
|
|
27
|
+
/** Block presses (dim 0.38) while busy. Default true. */
|
|
28
|
+
readonly disableWhileLoading?: boolean;
|
|
29
|
+
/** Show the spinner while busy. Default true. */
|
|
30
|
+
readonly showSpinnerWhileLoading?: boolean;
|
|
31
|
+
/** Diagnostics source. Default `'G9SafeButton'` / `'G9SafeIconButton'`. */
|
|
32
|
+
readonly source?: string;
|
|
33
|
+
/** Error popup message for an unexpected error. Default the localized `unexpectedError`. */
|
|
34
|
+
readonly errorMessage?: string;
|
|
35
|
+
/** Error popup title. Default the localized `error`. */
|
|
36
|
+
readonly errorTitle?: string;
|
|
37
|
+
/** Show the error popup. Default true. */
|
|
38
|
+
readonly showErrorPopup?: boolean;
|
|
39
|
+
/** Double-tap throttle. Default true. */
|
|
40
|
+
readonly enableThrottle?: boolean;
|
|
41
|
+
/** Throttle/concurrency key. Default one per instance. */
|
|
42
|
+
readonly throttleKey?: string;
|
|
43
|
+
/** Throttle interval. Default 369 ms. */
|
|
44
|
+
readonly throttleIntervalMs?: number;
|
|
45
|
+
/** Delay before the action starts (and before busy shows). Default 0. */
|
|
46
|
+
readonly busyDelayMs?: number;
|
|
47
|
+
/** `false` blocks the button and dims it (MAUI `Command.CanExecute`). Default true. */
|
|
48
|
+
readonly canExecute?: boolean;
|
|
49
|
+
/** Each guarded run's result (completed, skipped, cancelled, failed). */
|
|
50
|
+
readonly onResult?: (result: G9SafeRunResult<unknown>) => void;
|
|
51
|
+
}
|
|
52
|
+
/** Imperative handle of the safe buttons. */
|
|
53
|
+
export interface G9SafeButtonHandle {
|
|
54
|
+
/** MAUI `SetLoadingState`: drives the spinner (when shown) and the block (when `disableWhileLoading`). */
|
|
55
|
+
setLoadingState(loading: boolean): void;
|
|
56
|
+
/** Runs the guarded action as a tap would (without `onPress`). */
|
|
57
|
+
execute(): Promise<G9SafeRunResult<unknown> | null>;
|
|
58
|
+
}
|
|
59
|
+
/** The guarded execution state machine of the safe buttons (one shared executor, specs/03 §4). */
|
|
60
|
+
export declare function useSafeExecution(props: G9SafeExecutionProps, defaultSource: string): {
|
|
61
|
+
busy: boolean;
|
|
62
|
+
loading: boolean;
|
|
63
|
+
blocked: boolean;
|
|
64
|
+
execute: () => Promise<G9SafeRunResult<unknown> | null>;
|
|
65
|
+
setLoadingState: (loading: boolean) => void;
|
|
66
|
+
};
|
|
67
|
+
/** Props of {@link G9SafeButton} (MAUI `G9SafeButton`). */
|
|
68
|
+
export interface G9SafeButtonProps extends G9ButtonProps, G9SafeExecutionProps {
|
|
69
|
+
/** Variant through the MAUI enum; when unset, `variant` (default primary) applies, as MAUI's never-applied default. */
|
|
70
|
+
readonly buttonType?: G9SafeButtonType;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Button with guarded execution (MAUI `G9SafeButton`): a tap calls `onPress`, then runs `onExecute` (and
|
|
74
|
+
* `onExecuteHandlers`) through the provider's safe executor: throttle (369 ms per key), one run at a time, optional
|
|
75
|
+
* delay, busy spinner + block while running, errors to diagnostics and the error popup, never thrown into the UI.
|
|
76
|
+
* Unmounting cancels the run.
|
|
77
|
+
*/
|
|
78
|
+
export declare const G9SafeButton: import("react").ForwardRefExoticComponent<G9SafeButtonProps & import("react").RefAttributes<G9SafeButtonHandle>>;
|
|
79
|
+
/** Props of {@link G9SafeIconButton} (MAUI `G9SafeIconButton`). */
|
|
80
|
+
export interface G9SafeIconButtonProps extends G9IconButtonProps, G9SafeExecutionProps {
|
|
81
|
+
}
|
|
82
|
+
/** Icon button with guarded execution (MAUI `G9SafeIconButton`); see {@link G9SafeButton}. */
|
|
83
|
+
export declare const G9SafeIconButton: import("react").ForwardRefExoticComponent<G9SafeIconButtonProps & import("react").RefAttributes<G9SafeButtonHandle>>;
|
|
84
|
+
//# sourceMappingURL=safe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe.d.ts","sourceRoot":"","sources":["../../src/button/safe.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM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EAAE,OAAO,CAAC;IAC9B,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,0GAA0G;IAC1G,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC,kEAAkE;IAClE,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;CACrD;AAID,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM;;;;mBAiBvD,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;+BAqCrC,OAAO;EAErC;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAkB,SAAQ,aAAa,EAAE,oBAAoB;IAC5E,uHAAuH;IACvH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACxC;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,kHAmBxB,CAAC;AAEF,mEAAmE;AACnE,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,EAAE,oBAAoB;CAAG;AAEzF,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB,sHAgB5B,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { createAbortController } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "@lynx-js/react";
|
|
3
|
+
import { useG9Executor } from "../provider/hooks.jsx";
|
|
4
|
+
import { G9Button } from "./button.jsx";
|
|
5
|
+
import { G9IconButton } from "./icon-button.jsx";
|
|
6
|
+
const G9SafeButtonType = {
|
|
7
|
+
Primary: 'primary',
|
|
8
|
+
Default: 'default',
|
|
9
|
+
Secondary: 'secondary',
|
|
10
|
+
Info: 'info',
|
|
11
|
+
Success: 'success',
|
|
12
|
+
Warning: 'warning',
|
|
13
|
+
Error: 'error',
|
|
14
|
+
Surface: 'surface',
|
|
15
|
+
Outline: 'outline'
|
|
16
|
+
};
|
|
17
|
+
let instanceCounter = 0;
|
|
18
|
+
function useSafeExecution(props, defaultSource) {
|
|
19
|
+
const executor = useG9Executor();
|
|
20
|
+
const [busy, setBusy] = useState(false);
|
|
21
|
+
const key = useRef(null);
|
|
22
|
+
if (null === key.current) key.current = `${defaultSource}:${++instanceCounter}`;
|
|
23
|
+
const mount = useRef(null);
|
|
24
|
+
if (null === mount.current) mount.current = createAbortController();
|
|
25
|
+
const executing = useRef(false);
|
|
26
|
+
const latest = useRef(props);
|
|
27
|
+
latest.current = props;
|
|
28
|
+
useEffect(()=>{
|
|
29
|
+
const controller = mount.current;
|
|
30
|
+
return ()=>controller.abort();
|
|
31
|
+
}, []);
|
|
32
|
+
const showSpinner = false !== props.showSpinnerWhileLoading;
|
|
33
|
+
const blocked = busy && false !== props.disableWhileLoading || false === props.canExecute;
|
|
34
|
+
const execute = async ()=>{
|
|
35
|
+
var _p_onExecuteHandlers;
|
|
36
|
+
const p = latest.current;
|
|
37
|
+
if (false === p.enableSafeExecution || executing.current) return null;
|
|
38
|
+
const handlers = [
|
|
39
|
+
...p.onExecute ? [
|
|
40
|
+
p.onExecute
|
|
41
|
+
] : [],
|
|
42
|
+
...null != (_p_onExecuteHandlers = p.onExecuteHandlers) ? _p_onExecuteHandlers : []
|
|
43
|
+
];
|
|
44
|
+
if (0 === handlers.length) return null;
|
|
45
|
+
executing.current = true;
|
|
46
|
+
try {
|
|
47
|
+
var _p_throttleKey, _p_source;
|
|
48
|
+
var _p_onResult;
|
|
49
|
+
const result = await executor.run(async (context)=>{
|
|
50
|
+
for (const handler of handlers)await handler(context);
|
|
51
|
+
}, {
|
|
52
|
+
throttleKey: null != (_p_throttleKey = p.throttleKey) ? _p_throttleKey : key.current,
|
|
53
|
+
enableThrottle: false !== p.enableThrottle,
|
|
54
|
+
...void 0 !== p.throttleIntervalMs ? {
|
|
55
|
+
throttleIntervalMs: p.throttleIntervalMs
|
|
56
|
+
} : {},
|
|
57
|
+
...void 0 !== p.busyDelayMs ? {
|
|
58
|
+
busyDelayMs: p.busyDelayMs
|
|
59
|
+
} : {},
|
|
60
|
+
...void 0 !== p.errorMessage ? {
|
|
61
|
+
errorMessage: p.errorMessage
|
|
62
|
+
} : {},
|
|
63
|
+
...void 0 !== p.errorTitle ? {
|
|
64
|
+
errorTitle: p.errorTitle
|
|
65
|
+
} : {},
|
|
66
|
+
source: null != (_p_source = p.source) ? _p_source : defaultSource,
|
|
67
|
+
showErrorPopup: false !== p.showErrorPopup,
|
|
68
|
+
setBusy: (b)=>{
|
|
69
|
+
if (!mount.current.signal.aborted) setBusy(b);
|
|
70
|
+
},
|
|
71
|
+
signal: mount.current.signal
|
|
72
|
+
});
|
|
73
|
+
null == (_p_onResult = p.onResult) || _p_onResult.call(p, result);
|
|
74
|
+
return result;
|
|
75
|
+
} finally{
|
|
76
|
+
executing.current = false;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
busy,
|
|
81
|
+
loading: busy && showSpinner,
|
|
82
|
+
blocked,
|
|
83
|
+
execute,
|
|
84
|
+
setLoadingState: (loading)=>setBusy(loading)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
const safe_G9SafeButton = forwardRef(function(props, ref) {
|
|
88
|
+
var _ref, _props_buttonType;
|
|
89
|
+
const safe = useSafeExecution(props, 'G9SafeButton');
|
|
90
|
+
useImperativeHandle(ref, ()=>({
|
|
91
|
+
setLoadingState: safe.setLoadingState,
|
|
92
|
+
execute: safe.execute
|
|
93
|
+
}));
|
|
94
|
+
const variant = null != (_ref = null != (_props_buttonType = props.buttonType) ? _props_buttonType : props.variant) ? _ref : 'primary';
|
|
95
|
+
const onPress = ()=>{
|
|
96
|
+
var _props_onPress;
|
|
97
|
+
null == (_props_onPress = props.onPress) || _props_onPress.call(props);
|
|
98
|
+
safe.execute();
|
|
99
|
+
};
|
|
100
|
+
return <G9Button {...props} variant={variant} isLoading={true === props.isLoading || safe.loading} blocked={true === props.blocked || safe.blocked} onPress={onPress}/>;
|
|
101
|
+
});
|
|
102
|
+
const safe_G9SafeIconButton = forwardRef(function(props, ref) {
|
|
103
|
+
const safe = useSafeExecution(props, 'G9SafeIconButton');
|
|
104
|
+
useImperativeHandle(ref, ()=>({
|
|
105
|
+
setLoadingState: safe.setLoadingState,
|
|
106
|
+
execute: safe.execute
|
|
107
|
+
}));
|
|
108
|
+
return <G9IconButton {...props} isLoading={true === props.isLoading || safe.loading} blocked={true === props.blocked || safe.blocked} onPress={()=>{
|
|
109
|
+
var _props_onPress;
|
|
110
|
+
null == (_props_onPress = props.onPress) || _props_onPress.call(props);
|
|
111
|
+
safe.execute();
|
|
112
|
+
}}/>;
|
|
113
|
+
});
|
|
114
|
+
export { G9SafeButtonType, safe_G9SafeButton as G9SafeButton, safe_G9SafeIconButton as G9SafeIconButton, useSafeExecution };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=safe.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button/safe.jsx","sources":["../../src/button/safe.tsx"],"sourcesContent":["import {\n createAbortController,\n type G9AbortController,\n type G9AbortSignal,\n type G9ButtonVariant,\n type G9SafeRunContext,\n type G9SafeRunResult,\n} from '@g9tm/lynxcontrols-foundation';\nimport { forwardRef, type ReactNode, useEffect, useImperativeHandle, useRef, useState } from '@lynx-js/react';\nimport { useG9Executor } from '../provider/hooks';\nimport { G9Button, type G9ButtonProps } from './button';\nimport { G9IconButton, type G9IconButtonProps } from './icon-button';\n\n/** MAUI `G9SafeButtonType`: a subset of the button variants. */\nexport const G9SafeButtonType = {\n Primary: 'primary',\n Default: 'default',\n Secondary: 'secondary',\n Info: 'info',\n Success: 'success',\n Warning: 'warning',\n Error: 'error',\n Surface: 'surface',\n Outline: 'outline',\n} as const;\nexport type G9SafeButtonType = (typeof G9SafeButtonType)[keyof typeof G9SafeButtonType];\n\n/** The guarded action: `onExecute` (specs/03 §4). */\nexport type G9SafeExecuteHandler = (context: G9SafeRunContext) => unknown;\n\n/** Options of the guarded execution shared by the safe buttons (MAUI `G9SafeExecution`). */\nexport interface G9SafeExecutionProps {\n /** The guarded action (MAUI `SafeCommand` / `SafeClickedCallbackAsync` / `SafeClickedAsync`). */\n readonly onExecute?: G9SafeExecuteHandler;\n /** More guarded handlers, awaited in order after `onExecute` (MAUI `SafeClickedAsync` subscribers). */\n readonly onExecuteHandlers?: ReadonlyArray<G9SafeExecuteHandler>;\n /** Guarded execution on; false: a tap only calls `onPress`. Default true. */\n readonly enableSafeExecution?: boolean;\n /** Block presses (dim 0.38) while busy. Default true. */\n readonly disableWhileLoading?: boolean;\n /** Show the spinner while busy. Default true. */\n readonly showSpinnerWhileLoading?: boolean;\n /** Diagnostics source. Default `'G9SafeButton'` / `'G9SafeIconButton'`. */\n readonly source?: string;\n /** Error popup message for an unexpected error. Default the localized `unexpectedError`. */\n readonly errorMessage?: string;\n /** Error popup title. Default the localized `error`. */\n readonly errorTitle?: string;\n /** Show the error popup. Default true. */\n readonly showErrorPopup?: boolean;\n /** Double-tap throttle. Default true. */\n readonly enableThrottle?: boolean;\n /** Throttle/concurrency key. Default one per instance. */\n readonly throttleKey?: string;\n /** Throttle interval. Default 369 ms. */\n readonly throttleIntervalMs?: number;\n /** Delay before the action starts (and before busy shows). Default 0. */\n readonly busyDelayMs?: number;\n /** `false` blocks the button and dims it (MAUI `Command.CanExecute`). Default true. */\n readonly canExecute?: boolean;\n /** Each guarded run's result (completed, skipped, cancelled, failed). */\n readonly onResult?: (result: G9SafeRunResult<unknown>) => void;\n}\n\n/** Imperative handle of the safe buttons. */\nexport interface G9SafeButtonHandle {\n /** MAUI `SetLoadingState`: drives the spinner (when shown) and the block (when `disableWhileLoading`). */\n setLoadingState(loading: boolean): void;\n /** Runs the guarded action as a tap would (without `onPress`). */\n execute(): Promise<G9SafeRunResult<unknown> | null>;\n}\n\nlet instanceCounter = 0;\n\n/** The guarded execution state machine of the safe buttons (one shared executor, specs/03 §4). */\nexport function useSafeExecution(props: G9SafeExecutionProps, defaultSource: string) {\n const executor = useG9Executor();\n const [busy, setBusy] = useState(false);\n const key = useRef<string | null>(null);\n if (key.current === null) key.current = `${defaultSource}:${++instanceCounter}`;\n const mount = useRef<G9AbortController | null>(null);\n if (mount.current === null) mount.current = createAbortController();\n const executing = useRef(false);\n const latest = useRef(props);\n latest.current = props;\n useEffect(() => {\n const controller = mount.current as G9AbortController;\n return () => controller.abort();\n }, []);\n\n const showSpinner = props.showSpinnerWhileLoading !== false;\n const blocked = (busy && props.disableWhileLoading !== false) || props.canExecute === false;\n const execute = async (): Promise<G9SafeRunResult<unknown> | null> => {\n const p = latest.current;\n if (p.enableSafeExecution === false || executing.current) return null;\n const handlers = [...(p.onExecute ? [p.onExecute] : []), ...(p.onExecuteHandlers ?? [])];\n if (handlers.length === 0) return null;\n executing.current = true;\n try {\n const result = await executor.run(\n async (context) => {\n for (const handler of handlers) await handler(context);\n },\n {\n throttleKey: p.throttleKey ?? (key.current as string),\n enableThrottle: p.enableThrottle !== false,\n ...(p.throttleIntervalMs !== undefined ? { throttleIntervalMs: p.throttleIntervalMs } : {}),\n ...(p.busyDelayMs !== undefined ? { busyDelayMs: p.busyDelayMs } : {}),\n ...(p.errorMessage !== undefined ? { errorMessage: p.errorMessage } : {}),\n ...(p.errorTitle !== undefined ? { errorTitle: p.errorTitle } : {}),\n source: p.source ?? defaultSource,\n showErrorPopup: p.showErrorPopup !== false,\n setBusy: (b) => {\n if (!(mount.current as G9AbortController).signal.aborted) setBusy(b);\n },\n signal: (mount.current as G9AbortController).signal as G9AbortSignal,\n },\n );\n p.onResult?.(result);\n return result;\n } finally {\n executing.current = false;\n }\n };\n return {\n busy,\n loading: busy && showSpinner,\n blocked,\n execute,\n setLoadingState: (loading: boolean) => setBusy(loading),\n };\n}\n\n/** Props of {@link G9SafeButton} (MAUI `G9SafeButton`). */\nexport interface G9SafeButtonProps extends G9ButtonProps, G9SafeExecutionProps {\n /** Variant through the MAUI enum; when unset, `variant` (default primary) applies, as MAUI's never-applied default. */\n readonly buttonType?: G9SafeButtonType;\n}\n\n/**\n * Button with guarded execution (MAUI `G9SafeButton`): a tap calls `onPress`, then runs `onExecute` (and\n * `onExecuteHandlers`) through the provider's safe executor: throttle (369 ms per key), one run at a time, optional\n * delay, busy spinner + block while running, errors to diagnostics and the error popup, never thrown into the UI.\n * Unmounting cancels the run.\n */\nexport const G9SafeButton = forwardRef<G9SafeButtonHandle, G9SafeButtonProps>(\n function G9SafeButton(props, ref): ReactNode {\n const safe = useSafeExecution(props, 'G9SafeButton');\n useImperativeHandle(ref, () => ({ setLoadingState: safe.setLoadingState, execute: safe.execute }));\n const variant: G9ButtonVariant = props.buttonType ?? props.variant ?? 'primary';\n const onPress = () => {\n props.onPress?.();\n void safe.execute();\n };\n return (\n <G9Button\n {...props}\n variant={variant}\n isLoading={props.isLoading === true || safe.loading}\n blocked={props.blocked === true || safe.blocked}\n onPress={onPress}\n />\n );\n },\n);\n\n/** Props of {@link G9SafeIconButton} (MAUI `G9SafeIconButton`). */\nexport interface G9SafeIconButtonProps extends G9IconButtonProps, G9SafeExecutionProps {}\n\n/** Icon button with guarded execution (MAUI `G9SafeIconButton`); see {@link G9SafeButton}. */\nexport const G9SafeIconButton = forwardRef<G9SafeButtonHandle, G9SafeIconButtonProps>(\n function G9SafeIconButton(props, ref): ReactNode {\n const safe = useSafeExecution(props, 'G9SafeIconButton');\n useImperativeHandle(ref, () => ({ setLoadingState: safe.setLoadingState, execute: safe.execute }));\n return (\n <G9IconButton\n {...props}\n isLoading={props.isLoading === true || safe.loading}\n blocked={props.blocked === true || safe.blocked}\n onPress={() => {\n props.onPress?.();\n void safe.execute();\n }}\n />\n );\n },\n);\n"],"names":["G9SafeButtonType","instanceCounter","useSafeExecution","props","defaultSource","executor","useG9Executor","busy","setBusy","useState","key","useRef","mount","createAbortController","executing","latest","useEffect","controller","showSpinner","blocked","execute","_p_onExecuteHandlers","p","handlers","_p_throttleKey","_p_source","result","context","handler","undefined","b","loading","G9SafeButton","forwardRef","ref","_ref","safe","useImperativeHandle","variant","onPress","G9Button","G9SafeIconButton","G9IconButton"],"mappings":";;;;;AAcO,MAAMA,mBAAmB;IAC9B,SAAS;IACT,SAAS;IACT,WAAW;IACX,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;IACP,SAAS;IACT,SAAS;AACX;AAgDA,IAAIC,kBAAkB;AAGf,SAASC,iBAAiBC,KAA2B,EAAEC,aAAqB;IACjF,MAAMC,WAAWC;IACjB,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAS;IACjC,MAAMC,MAAMC,OAAsB;IAClC,IAAID,AAAgB,SAAhBA,IAAI,OAAO,EAAWA,IAAI,OAAO,GAAG,GAAGN,cAAc,CAAC,EAAE,EAAEH,iBAAiB;IAC/E,MAAMW,QAAQD,OAAiC;IAC/C,IAAIC,AAAkB,SAAlBA,MAAM,OAAO,EAAWA,MAAM,OAAO,GAAGC;IAC5C,MAAMC,YAAYH,OAAO;IACzB,MAAMI,SAASJ,OAAOR;IACtBY,OAAO,OAAO,GAAGZ;IACjBa,UAAU;QACR,MAAMC,aAAaL,MAAM,OAAO;QAChC,OAAO,IAAMK,WAAW,KAAK;IAC/B,GAAG,EAAE;IAEL,MAAMC,cAAcf,AAAkC,UAAlCA,MAAM,uBAAuB;IACjD,MAAMgB,UAAWZ,QAAQJ,AAA8B,UAA9BA,MAAM,mBAAmB,IAAeA,AAAqB,UAArBA,MAAM,UAAU;IACjF,MAAMiB,UAAU;YAG+CC;QAF7D,MAAMC,IAAIP,OAAO,OAAO;QACxB,IAAIO,AAA0B,UAA1BA,EAAE,mBAAmB,IAAcR,UAAU,OAAO,EAAE,OAAO;QACjE,MAAMS,WAAW;eAAKD,EAAE,SAAS,GAAG;gBAACA,EAAE,SAAS;aAAC,GAAG,EAAE;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@
|
|
|
1
|
+
import './button.css';
|
|
2
|
+
import type { G9ImageSource } from '@g9tm/lynxcontrols-foundation';
|
|
3
|
+
import type { ReactNode } from '@lynx-js/react';
|
|
4
|
+
import { type G9ControlBaseProps } from '../base/control.js';
|
|
5
|
+
/** Props of {@link G9VerticalIconTextButton} (MAUI `G9VerticalIconTextButton`). */
|
|
6
|
+
export interface G9VerticalIconTextButtonProps extends G9ControlBaseProps {
|
|
7
|
+
readonly image?: G9ImageSource | null;
|
|
8
|
+
readonly text?: string | null;
|
|
9
|
+
/** Image box size. Default 32. */
|
|
10
|
+
readonly imageSize?: number;
|
|
11
|
+
readonly onPress?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Image over a centred label in a bordered tile (MAUI `G9VerticalIconTextButton`). Unlike MAUI (its image and label
|
|
15
|
+
* took the touch), the press is on the root and honours `disabled` and the 300 ms guard.
|
|
16
|
+
*/
|
|
17
|
+
export declare function G9VerticalIconTextButton(props: G9VerticalIconTextButtonProps): ReactNode;
|
|
18
|
+
//# sourceMappingURL=vertical-icon-text-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertical-icon-text-button.d.ts","sourceRoot":"","sources":["../../src/button/vertical-icon-text-button.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,kBAAkB,EAAgB,MAAM,iBAAiB,CAAC;AAIxE,mFAAmF;AACnF,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kCAAkC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,SAAS,CAkBxF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./button.css";
|
|
2
|
+
import { useG9Control } from "../base/control.jsx";
|
|
3
|
+
import { useG9Press } from "../base/press.jsx";
|
|
4
|
+
import { G9IconSlot } from "../icon/slot.jsx";
|
|
5
|
+
function G9VerticalIconTextButton(props) {
|
|
6
|
+
var _props_accessibilityLabel, _ref, _props_accessibilityLabel1, _props_imageSize;
|
|
7
|
+
const control = useG9Control(props, 'g9-vertical-button');
|
|
8
|
+
const press = useG9Press(props.onPress, {
|
|
9
|
+
blocked: control.disabled,
|
|
10
|
+
source: 'G9VerticalIconTextButton'
|
|
11
|
+
});
|
|
12
|
+
return <view className={control.className} {...control.idProps} accessibility-element={true} accessibility-traits="button" {...(null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : props.text) ? {
|
|
13
|
+
'accessibility-label': null != (_ref = null != (_props_accessibilityLabel1 = props.accessibilityLabel) ? _props_accessibilityLabel1 : props.text) ? _ref : ''
|
|
14
|
+
} : {}} bindtap={press}>
|
|
15
|
+
{props.image ? <G9IconSlot image={props.image} size={null != (_props_imageSize = props.imageSize) ? _props_imageSize : 32}/> : null}
|
|
16
|
+
{props.text ? <text className="g9-vertical-button__text">{props.text}</text> : null}
|
|
17
|
+
</view>;
|
|
18
|
+
}
|
|
19
|
+
export { G9VerticalIconTextButton };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=vertical-icon-text-button.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button/vertical-icon-text-button.jsx","sources":["../../src/button/vertical-icon-text-button.tsx"],"sourcesContent":["import './button.css';\nimport type { G9ImageSource } from '@g9tm/lynxcontrols-foundation';\nimport type { ReactNode } from '@lynx-js/react';\nimport { type G9ControlBaseProps, useG9Control } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { G9IconSlot } from '../icon/slot';\n\n/** Props of {@link G9VerticalIconTextButton} (MAUI `G9VerticalIconTextButton`). */\nexport interface G9VerticalIconTextButtonProps extends G9ControlBaseProps {\n readonly image?: G9ImageSource | null;\n readonly text?: string | null;\n /** Image box size. Default 32. */\n readonly imageSize?: number;\n readonly onPress?: () => void;\n}\n\n/**\n * Image over a centred label in a bordered tile (MAUI `G9VerticalIconTextButton`). Unlike MAUI (its image and label\n * took the touch), the press is on the root and honours `disabled` and the 300 ms guard.\n */\nexport function G9VerticalIconTextButton(props: G9VerticalIconTextButtonProps): ReactNode {\n const control = useG9Control(props, 'g9-vertical-button');\n const press = useG9Press(props.onPress, { blocked: control.disabled, source: 'G9VerticalIconTextButton' });\n return (\n <view\n className={control.className}\n {...control.idProps}\n accessibility-element={true}\n accessibility-traits=\"button\"\n {...((props.accessibilityLabel ?? props.text)\n ? { 'accessibility-label': props.accessibilityLabel ?? props.text ?? '' }\n : {})}\n bindtap={press}\n >\n {props.image ? <G9IconSlot image={props.image} size={props.imageSize ?? 32} /> : null}\n {props.text ? <text className=\"g9-vertical-button__text\">{props.text}</text> : null}\n </view>\n );\n}\n"],"names":["G9VerticalIconTextButton","props","_props_accessibilityLabel","_ref","_props_imageSize","control","useG9Control","press","useG9Press","view","G9IconSlot","text"],"mappings":";;;;AAoBO,SAASA,yBAAyBC,KAAoC;QASjEC,2BACuBC,MAAAA,4BAIwBC;IAbzD,MAAMC,UAAUC,aAAaL,OAAO;IACpC,MAAMM,QAAQC,WAAWP,MAAM,OAAO,EAAE;QAAE,SAASI,QAAQ,QAAQ;QAAE,QAAQ;IAA2B;IACxG,QACGI,KACC,WAAWJ,QAAQ,SAAS,GAC3B,GAAGA,QAAQ,OAAO,EACnB,uBAAuB,MACvB,qBAAqB,UACpB,GAAI,AAAC,SAAAH,CAAAA,4BAAAA,MAAM,kBAAkB,AAAD,IAAvBA,4BAA4BD,MAAM,IAAI,AAAD,IACvC;QAAE,uBAAuB,QAAAE,CAAAA,OAAAA,QAAAA,CAAAA,6BAAAA,MAAM,kBAAkB,AAAD,IAAvBA,6BAA4BF,MAAM,IAAI,AAAD,IAArCE,OAA0C;IAAG,IACtE,CAAC,CAAC,EACN,SAASI,OACV;MACC,CAACN,MAAM,KAAK,IAAIS,WAAW,OAAOT,MAAM,KAAK,EAAE,MAAM,QAAAG,CAAAA,mBAAAA,MAAM,SAAS,AAAD,IAAdA,mBAAmB,QAAS,KAAK;MACtF,CAACH,MAAM,IAAI,IAAIU,KAAK,UAAU,4BAA4BV,MAAM,IAAI,GAAGU,QAAQ,KAAK;IACtF,EAAEF;AAEN"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type G9ButtonVariant, type G9ControlSize, type G9PaletteValues } from '@g9tm/lynxcontrols-foundation';
|
|
2
|
+
/** What a button paints (MAUI `G9Visuals.ButtonVisualResult` + the stroke/opacity rules of G9Button/G9IconButton). */
|
|
3
|
+
export interface G9ButtonPaint {
|
|
4
|
+
/** CSS `background` (a colour or a vertical gradient). */
|
|
5
|
+
readonly background: string;
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly stroke: string;
|
|
8
|
+
readonly strokeWidth: number;
|
|
9
|
+
/** 0.38 when not effectively enabled, 0.70 while loading, else 1. */
|
|
10
|
+
readonly opacity: number;
|
|
11
|
+
}
|
|
12
|
+
/** Inputs of {@link resolveButtonPaint}. */
|
|
13
|
+
export interface G9ButtonPaintInput {
|
|
14
|
+
readonly variant: G9ButtonVariant;
|
|
15
|
+
readonly palette: G9PaletteValues;
|
|
16
|
+
/** `IsEnabled && !blocked`. */
|
|
17
|
+
readonly enabled: boolean;
|
|
18
|
+
readonly loading: boolean;
|
|
19
|
+
readonly baseBackgroundColor?: string | null | undefined;
|
|
20
|
+
readonly textColor?: string | null | undefined;
|
|
21
|
+
/** `'button'`: tonal has a 1.5 stroke; `'icon'`: only outline/text do (MAUI G9IconButton). */
|
|
22
|
+
readonly kind: 'button' | 'icon';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolves the paint of a button (MAUI `G9Button.OnApplyVisuals` / `G9IconButton.OnApplyVisuals`):
|
|
26
|
+
* - variant colours from `resolveButtonVariant`; the gradient only while enabled and not loading;
|
|
27
|
+
* - `baseBackgroundColor`: fully transparent → no fill, no border; otherwise a flat fill, contrasting text and a
|
|
28
|
+
* darkened border (stroke 1 when visible);
|
|
29
|
+
* - `textColor` always wins for text/icon/spinner;
|
|
30
|
+
* - stroke 1.5 for outline/text (and tonal on `G9Button`), else 0.
|
|
31
|
+
* A colour that is not a parseable literal (e.g. a `var(--…)` token) is used as given: flat fill, the variant's text
|
|
32
|
+
* colour unless `textColor` is set, and no derived border.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveButtonPaint(input: G9ButtonPaintInput): G9ButtonPaint;
|
|
35
|
+
/** Size preset of `G9Button` (MAUI `ApplySizePreset`). */
|
|
36
|
+
export interface G9ButtonSizePreset {
|
|
37
|
+
readonly height: number;
|
|
38
|
+
readonly paddingHorizontal: number;
|
|
39
|
+
readonly paddingVertical: number;
|
|
40
|
+
readonly fontSize: number;
|
|
41
|
+
/** Hero buttons fill the width. */
|
|
42
|
+
readonly fill: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** MAUI G9Button size presets: small 36 / medium 44 / large 48 / hero 52. */
|
|
45
|
+
export declare function buttonSizePreset(size: G9ControlSize): G9ButtonSizePreset;
|
|
46
|
+
/** MAUI `FontAttributes`. */
|
|
47
|
+
export type G9FontAttributes = 'none' | 'bold' | 'italic' | 'boldItalic';
|
|
48
|
+
/** CSS for {@link G9FontAttributes}. */
|
|
49
|
+
export declare function fontAttributesStyle(attributes: G9FontAttributes): {
|
|
50
|
+
fontWeight: 'bold' | 'normal';
|
|
51
|
+
fontStyle: 'italic' | 'normal';
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=visuals.d.ts.map
|