@g9tm/lynxcontrols 2.5.6 → 2.5.8
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/catalog/cards/G9AppBar.md +1 -1
- package/catalog/cards/G9AppearancePage.md +17 -0
- package/catalog/cards/G9Badge.md +1 -1
- package/catalog/cards/G9Button.md +2 -2
- package/catalog/cards/G9Card.md +1 -1
- package/catalog/cards/G9CarryContexts.md +10 -0
- package/catalog/cards/G9CheckBox.md +1 -1
- package/catalog/cards/G9Chip.md +1 -1
- package/catalog/cards/G9ChipStrip.md +16 -0
- package/catalog/cards/G9CodeBlock.md +17 -0
- package/catalog/cards/G9CommandPalette.md +3 -1
- package/catalog/cards/G9ConnectionBanner.md +1 -1
- package/catalog/cards/G9ContrastPanel.md +15 -0
- package/catalog/cards/G9DashboardCustomizeSheet.md +17 -0
- package/catalog/cards/G9DashboardGrid.md +17 -0
- package/catalog/cards/G9DragList.md +4 -2
- package/catalog/cards/G9Editor.md +1 -1
- package/catalog/cards/G9ErrorBoundary.md +3 -2
- package/catalog/cards/G9FormField.md +2 -2
- package/catalog/cards/G9ListRow.md +1 -1
- package/catalog/cards/G9Menu.md +1 -1
- package/catalog/cards/G9MenuList.md +2 -0
- package/catalog/cards/G9NotificationCenter.md +17 -0
- package/catalog/cards/G9NotificationCenterPanel.md +17 -0
- package/catalog/cards/G9PathNavigator.md +13 -0
- package/catalog/cards/G9PersonalThemeSheet.md +17 -0
- package/catalog/cards/G9Popover.md +1 -1
- package/catalog/cards/G9Provider.md +1 -1
- package/catalog/cards/G9RangeSlider.md +2 -2
- package/catalog/cards/G9ReaderSheet.md +17 -0
- package/catalog/cards/G9ReaderView.md +17 -0
- package/catalog/cards/G9SafeButton.md +2 -2
- package/catalog/cards/G9SearchEntry.md +1 -1
- package/catalog/cards/G9SecretValue.md +17 -0
- package/catalog/cards/G9ShortcutList.md +4 -0
- package/catalog/cards/G9ShortcutsSheet.md +3 -1
- package/catalog/cards/G9StatusPill.md +1 -1
- package/catalog/cards/G9Stepper.md +1 -1
- package/catalog/cards/G9SwitchRow.md +1 -1
- package/catalog/cards/G9Tag.md +1 -1
- package/catalog/cards/G9TextEntry.md +1 -1
- package/catalog/cards/G9UpdateBar.md +2 -1
- package/catalog/cards/G9VirtualList.md +1 -1
- package/catalog/cards/G9WallpaperSwatch.md +16 -0
- package/catalog/cards/G9WidgetSkeleton.md +9 -0
- package/catalog/cards/G9WidgetSlot.md +13 -0
- package/catalog/cards/PopupFrame.md +2 -2
- package/catalog/catalog.json +9460 -2155
- package/catalog/index.md +20 -3
- package/dist/.tsbuildinfo +1 -1
- package/dist/appearance/appearance.css +264 -0
- package/dist/appearance/appearance.css.map +1 -0
- package/dist/appearance/appearance.d.ts +148 -0
- package/dist/appearance/appearance.d.ts.map +1 -0
- package/dist/appearance/appearance.jsx +604 -0
- package/dist/appearance/index.d.ts +2 -0
- package/dist/appearance/index.d.ts.map +1 -0
- package/dist/appearance/index.jsx +1 -0
- package/dist/base/control.d.ts +15 -0
- package/dist/base/control.d.ts.map +1 -1
- package/dist/base/control.jsx +13 -1
- package/dist/base/index.d.ts +1 -1
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.jsx +1 -1
- package/dist/base/selection-item.d.ts +5 -0
- package/dist/base/selection-item.d.ts.map +1 -1
- package/dist/button/button.css +4 -0
- package/dist/button/button.css.map +1 -1
- package/dist/cascade/cascade.css +2 -0
- package/dist/cascade/cascade.css.map +1 -1
- package/dist/commands/commands.css +46 -0
- package/dist/commands/commands.css.map +1 -1
- package/dist/commands/index.d.ts +2 -2
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.jsx +2 -2
- package/dist/commands/keys.d.ts +15 -1
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.jsx +20 -1
- package/dist/commands/palette.d.ts +73 -7
- package/dist/commands/palette.d.ts.map +1 -1
- package/dist/commands/palette.jsx +174 -20
- package/dist/dashboard/dashboard.css +101 -0
- package/dist/dashboard/dashboard.css.map +1 -0
- package/dist/dashboard/dashboard.d.ts +73 -0
- package/dist/dashboard/dashboard.d.ts.map +1 -0
- package/dist/dashboard/dashboard.jsx +297 -0
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.jsx +2 -0
- package/dist/dashboard/model.d.ts +53 -0
- package/dist/dashboard/model.d.ts.map +1 -0
- package/dist/dashboard/model.jsx +76 -0
- package/dist/display/code.css +109 -0
- package/dist/display/code.css.map +1 -0
- package/dist/display/code.d.ts +43 -0
- package/dist/display/code.d.ts.map +1 -0
- package/dist/display/code.jsx +101 -0
- package/dist/display/extras.d.ts +7 -2
- package/dist/display/extras.d.ts.map +1 -1
- package/dist/display/extras.jsx +13 -4
- package/dist/display/figures.d.ts.map +1 -1
- package/dist/display/figures.jsx +10 -2
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.jsx +1 -0
- package/dist/display/motion-figures.css +2 -0
- package/dist/display/motion-figures.css.map +1 -1
- package/dist/display/motion-figures.d.ts.map +1 -1
- package/dist/display/motion-figures.jsx +14 -7
- package/dist/display/status.d.ts +1 -1
- package/dist/display/status.d.ts.map +1 -1
- package/dist/display/status.jsx +15 -3
- package/dist/display/theme-preview.css +4 -0
- package/dist/display/theme-preview.css.map +1 -1
- package/dist/effects/effects.d.ts.map +1 -1
- package/dist/effects/effects.jsx +8 -1
- package/dist/fields/extra-entries.css +1 -0
- package/dist/fields/extra-entries.css.map +1 -1
- package/dist/fields/extra-entries.d.ts +4 -1
- package/dist/fields/extra-entries.d.ts.map +1 -1
- package/dist/fields/extra-entries.jsx +54 -19
- package/dist/fields/fields.css +21 -0
- package/dist/fields/fields.css.map +1 -1
- 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 +6 -1
- package/dist/fields/pin-entry.d.ts.map +1 -1
- package/dist/fields/pin-entry.jsx +36 -3
- package/dist/fields/text-entry.d.ts +4 -0
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +32 -25
- package/dist/fields/use-text-input.d.ts +3 -2
- package/dist/fields/use-text-input.d.ts.map +1 -1
- package/dist/fields/use-text-input.jsx +3 -0
- package/dist/header/app-bar.d.ts +6 -0
- package/dist/header/app-bar.d.ts.map +1 -1
- package/dist/header/app-bar.jsx +22 -8
- package/dist/header/header.css +14 -0
- package/dist/header/header.css.map +1 -1
- package/dist/host/bottom-overlays.d.ts +5 -0
- package/dist/host/bottom-overlays.d.ts.map +1 -1
- package/dist/host/bottom-overlays.jsx +17 -1
- package/dist/host/carry-contexts.d.ts +28 -0
- package/dist/host/carry-contexts.d.ts.map +1 -0
- package/dist/host/carry-contexts.jsx +76 -0
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +5 -1
- package/dist/host/index.d.ts +2 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.jsx +2 -0
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +13 -9
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/containers.d.ts.map +1 -1
- package/dist/layout/containers.jsx +2 -1
- package/dist/layout/layout.css +7 -0
- package/dist/layout/layout.css.map +1 -1
- package/dist/list/gestures.d.ts +39 -6
- package/dist/list/gestures.d.ts.map +1 -1
- package/dist/list/gestures.jsx +284 -89
- package/dist/list/index.d.ts +3 -2
- package/dist/list/index.d.ts.map +1 -1
- package/dist/list/index.jsx +2 -1
- package/dist/list/keyboard.d.ts +50 -0
- package/dist/list/keyboard.d.ts.map +1 -0
- package/dist/list/keyboard.jsx +117 -0
- package/dist/list/list.css +50 -5
- package/dist/list/list.css.map +1 -1
- package/dist/list/rows.d.ts +13 -1
- package/dist/list/rows.d.ts.map +1 -1
- package/dist/list/rows.jsx +42 -23
- package/dist/list/virtual-list.d.ts +27 -1
- package/dist/list/virtual-list.d.ts.map +1 -1
- package/dist/list/virtual-list.jsx +49 -4
- package/dist/notifications/index.d.ts +3 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.jsx +2 -0
- package/dist/notifications/model.d.ts +47 -0
- package/dist/notifications/model.d.ts.map +1 -0
- package/dist/notifications/model.jsx +51 -0
- package/dist/notifications/notification-center.d.ts +98 -0
- package/dist/notifications/notification-center.d.ts.map +1 -0
- package/dist/notifications/notification-center.jsx +424 -0
- package/dist/notifications/notifications.css +266 -0
- package/dist/notifications/notifications.css.map +1 -0
- package/dist/orb/orb.css +2 -0
- package/dist/orb/orb.css.map +1 -1
- package/dist/pickers/pickers.css +15 -0
- package/dist/pickers/pickers.css.map +1 -1
- package/dist/plus-button/plus-button.css +2 -0
- package/dist/plus-button/plus-button.css.map +1 -1
- package/dist/plus-button/plus-button.d.ts.map +1 -1
- package/dist/plus-button/plus-button.jsx +2 -1
- package/dist/popover/popover.css +23 -1
- package/dist/popover/popover.css.map +1 -1
- package/dist/popover/popover.d.ts +14 -0
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/popover/popover.jsx +73 -12
- package/dist/popover/position.d.ts +6 -2
- package/dist/popover/position.d.ts.map +1 -1
- package/dist/popover/position.jsx +15 -4
- package/dist/popup/popup.css +3 -0
- package/dist/popup/popup.css.map +1 -1
- package/dist/provider/direction-scope.d.ts +8 -0
- package/dist/provider/direction-scope.d.ts.map +1 -1
- package/dist/provider/direction-scope.jsx +13 -2
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/provider.css +7 -0
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts +6 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +22 -2
- package/dist/provider/settings.d.ts +14 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +4 -1
- package/dist/range-slider/index.d.ts +1 -1
- package/dist/range-slider/index.d.ts.map +1 -1
- package/dist/range-slider/range-slider.css +69 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.d.ts +22 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -1
- package/dist/range-slider/range-slider.jsx +34 -5
- package/dist/reader/index.d.ts +2 -0
- package/dist/reader/index.d.ts.map +1 -0
- package/dist/reader/index.jsx +1 -0
- package/dist/reader/reader.css +74 -0
- package/dist/reader/reader.css.map +1 -0
- package/dist/reader/reader.d.ts +76 -0
- package/dist/reader/reader.d.ts.map +1 -0
- package/dist/reader/reader.jsx +149 -0
- package/dist/route/index.d.ts +2 -0
- package/dist/route/index.d.ts.map +1 -1
- package/dist/route/index.jsx +2 -0
- package/dist/route/path-navigator.css +42 -0
- package/dist/route/path-navigator.css.map +1 -0
- package/dist/route/path-navigator.d.ts +25 -0
- package/dist/route/path-navigator.d.ts.map +1 -0
- package/dist/route/path-navigator.jsx +98 -0
- package/dist/route/path-router.d.ts +162 -0
- package/dist/route/path-router.d.ts.map +1 -0
- package/dist/route/path-router.jsx +327 -0
- package/dist/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +23 -10
- package/dist/selection/selection.css +18 -1
- package/dist/selection/selection.css.map +1 -1
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +9 -8
- package/dist/sheet/options.d.ts +6 -1
- package/dist/sheet/options.d.ts.map +1 -1
- package/dist/sheet/options.jsx +2 -1
- package/dist/sheet/panel-frame.d.ts.map +1 -1
- package/dist/sheet/panel-frame.jsx +5 -4
- package/dist/sheet/sizing.d.ts +3 -3
- package/dist/sheet/sizing.d.ts.map +1 -1
- package/dist/sheet/sizing.jsx +1 -0
- package/dist/shell/shell.css +18 -1
- package/dist/shell/shell.css.map +1 -1
- package/dist/shell/shell.d.ts +10 -1
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/shell.jsx +13 -9
- package/dist/survey/survey.css +15 -0
- package/dist/survey/survey.css.map +1 -1
- package/dist/survey/survey.d.ts +6 -0
- package/dist/survey/survey.d.ts.map +1 -1
- package/dist/survey/survey.jsx +24 -6
- package/dist/swipe/swipe.css +2 -0
- package/dist/swipe/swipe.css.map +1 -1
- package/dist/tab-bar/flat.d.ts.map +1 -1
- package/dist/tab-bar/flat.jsx +53 -38
- package/dist/tab-bar/tab-bar.css +2 -0
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +28 -6
- package/dist/tabs/tab-view.jsx +10 -3
- package/dist/tabs/tabs.css +5 -0
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/service.d.ts.map +1 -1
- package/dist/toast/service.jsx +18 -5
- package/dist/toast/store.d.ts +22 -0
- package/dist/toast/store.d.ts.map +1 -1
- package/dist/toast/store.jsx +35 -3
- package/dist/toast/toast.css +22 -0
- package/dist/toast/toast.css.map +1 -1
- package/dist/toggle/checkbox.d.ts +5 -0
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +7 -2
- package/dist/toggle/choice.css +35 -0
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/choice.d.ts +45 -0
- package/dist/toggle/choice.d.ts.map +1 -1
- package/dist/toggle/choice.jsx +97 -23
- package/dist/toggle/index.d.ts +1 -1
- package/dist/toggle/index.d.ts.map +1 -1
- package/dist/toggle/index.jsx +1 -1
- package/package.json +22 -2
- package/skills/g9-lynx-app/references/catalog-index.md +24 -8
- package/skills/g9-lynx-app/references/components/appearance.md +70 -0
- package/skills/g9-lynx-app/references/components/barcode.md +1 -1
- package/skills/g9-lynx-app/references/components/button.md +4 -4
- package/skills/g9-lynx-app/references/components/calendar-1.md +205 -0
- package/skills/g9-lynx-app/references/components/calendar-2.md +36 -0
- package/skills/g9-lynx-app/references/components/canvas.md +33 -0
- package/skills/g9-lynx-app/references/components/chat-1.md +199 -0
- package/skills/g9-lynx-app/references/components/chat-2.md +119 -0
- package/skills/g9-lynx-app/references/components/commands.md +10 -2
- package/skills/g9-lynx-app/references/components/commerce.md +1 -1
- package/skills/g9-lynx-app/references/components/dashboard.md +61 -0
- package/skills/g9-lynx-app/references/components/display-1.md +22 -21
- package/skills/g9-lynx-app/references/components/display-2.md +36 -39
- package/skills/g9-lynx-app/references/components/display-3.md +41 -2
- package/skills/g9-lynx-app/references/components/fields.md +5 -5
- package/skills/g9-lynx-app/references/components/header.md +1 -1
- package/skills/g9-lynx-app/references/components/host.md +11 -0
- package/skills/g9-lynx-app/references/components/layout-1.md +1 -1
- package/skills/g9-lynx-app/references/components/list.md +7 -5
- package/skills/g9-lynx-app/references/components/map.md +19 -1
- package/skills/g9-lynx-app/references/components/media-1.md +203 -0
- package/skills/g9-lynx-app/references/components/media-2.md +66 -0
- package/skills/g9-lynx-app/references/components/notifications.md +37 -0
- package/skills/g9-lynx-app/references/components/popover.md +4 -2
- package/skills/g9-lynx-app/references/components/popup.md +2 -2
- package/skills/g9-lynx-app/references/components/projects.md +73 -0
- package/skills/g9-lynx-app/references/components/provider.md +1 -1
- package/skills/g9-lynx-app/references/components/range-slider.md +2 -2
- package/skills/g9-lynx-app/references/components/reader.md +37 -0
- package/skills/g9-lynx-app/references/components/richtext.md +54 -0
- package/skills/g9-lynx-app/references/components/route.md +14 -0
- package/skills/g9-lynx-app/references/components/shell.md +3 -2
- package/skills/g9-lynx-app/references/components/toggle.md +20 -3
- package/skills/g9-lynx-app/references/provider-and-host.md +4 -3
- package/skills/g9-lynx-app/references/components/calendar.md +0 -128
- package/skills/g9-lynx-app/references/components/chat.md +0 -98
- package/skills/g9-lynx-app/references/components/media.md +0 -115
package/dist/survey/survey.jsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./survey.css";
|
|
2
|
-
import { formatNumber, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { G9StringKey, formatNumber, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
3
3
|
import { memo } from "@lynx-js/react";
|
|
4
4
|
import { G9HorizontalStripContext } from "../anchor/context.jsx";
|
|
5
|
-
import { g9ChildId, g9IdProps, g9RowStyle, useG9Control } from "../base/control.jsx";
|
|
5
|
+
import { g9ChildId, g9IdProps, g9RowStyle, g9SelectedA11y, useG9Control } from "../base/control.jsx";
|
|
6
6
|
import { toneColors } from "../base/tone.jsx";
|
|
7
7
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
8
8
|
import { G9Icon } from "../icon/icon.jsx";
|
|
9
|
-
import { useG9Culture } from "../provider/hooks.jsx";
|
|
9
|
+
import { useG9Culture, useG9Strings } from "../provider/hooks.jsx";
|
|
10
10
|
function G9ChoiceList(props) {
|
|
11
11
|
var _props_defaultValue, _props_columns;
|
|
12
12
|
const [value, setValue] = useControllableState({
|
|
@@ -64,11 +64,21 @@ function G9ChoiceList(props) {
|
|
|
64
64
|
</view>)}
|
|
65
65
|
</view>;
|
|
66
66
|
}
|
|
67
|
+
function optionSpeech(o) {
|
|
68
|
+
if (o.accessibilityLabel) return o.accessibilityLabel;
|
|
69
|
+
return [
|
|
70
|
+
o.badge,
|
|
71
|
+
o.label,
|
|
72
|
+
o.description,
|
|
73
|
+
o.detail
|
|
74
|
+
].filter((x)=>!!x).join(', ');
|
|
75
|
+
}
|
|
67
76
|
const ChoiceCard = memo(function(p) {
|
|
77
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
68
78
|
const align = {
|
|
69
79
|
textAlign: 'rtl' === p.dir ? 'right' : 'left'
|
|
70
80
|
};
|
|
71
|
-
return <view className={`g9-choice${p.on ? ' g9-choice--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option
|
|
81
|
+
return <view className={`g9-choice${p.on ? ' g9-choice--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={optionSpeech(p.option)} {...g9SelectedA11y(p.on, selectedWord)}>
|
|
72
82
|
{p.option.art}
|
|
73
83
|
<view className="g9-choice__line" style={g9RowStyle(p.dir)}>
|
|
74
84
|
{p.option.icon ? <G9Icon icon={p.option.icon} size={22} color={p.on ? 'var(--g9-primary)' : 'var(--g9-text-secondary)'}/> : null}
|
|
@@ -76,6 +86,9 @@ const ChoiceCard = memo(function(p) {
|
|
|
76
86
|
direction: 'ltr',
|
|
77
87
|
alignItems: 'rtl' === p.dir ? 'flex-end' : 'flex-start'
|
|
78
88
|
}}>
|
|
89
|
+
{p.option.badge ? <text className="g9-choice__badge" style={align}>
|
|
90
|
+
{p.option.badge}
|
|
91
|
+
</text> : null}
|
|
79
92
|
<text className="g9-choice__label" style={align}>
|
|
80
93
|
{p.option.label}
|
|
81
94
|
</text>
|
|
@@ -87,6 +100,9 @@ const ChoiceCard = memo(function(p) {
|
|
|
87
100
|
}}>
|
|
88
101
|
{p.option.description}
|
|
89
102
|
</text> : null}
|
|
103
|
+
{p.option.detail ? <text className="g9-choice__detail" style={align}>
|
|
104
|
+
{p.option.detail}
|
|
105
|
+
</text> : null}
|
|
90
106
|
</view>
|
|
91
107
|
<view className={`g9-choice__mark${p.multiple ? ' g9-choice__mark--square' : ''}${p.on ? ' g9-choice__mark--on' : ''}`}>
|
|
92
108
|
{p.on ? <G9Icon icon="check" size={14} color="var(--g9-on-primary)"/> : null}
|
|
@@ -95,8 +111,9 @@ const ChoiceCard = memo(function(p) {
|
|
|
95
111
|
</view>;
|
|
96
112
|
});
|
|
97
113
|
const ChoicePill = memo(function(p) {
|
|
114
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
98
115
|
const tone = p.option.descriptionTone && !p.on ? toneColors(p.option.descriptionTone, 'plain').foreground : null;
|
|
99
|
-
return <view className={`g9-choice-pill${p.on ? ' g9-choice-pill--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option
|
|
116
|
+
return <view className={`g9-choice-pill${p.on ? ' g9-choice-pill--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={optionSpeech(p.option)} {...g9SelectedA11y(p.on, selectedWord)}>
|
|
100
117
|
{p.option.icon ? <G9Icon icon={p.option.icon} size={18} color={p.on ? 'var(--g9-on-primary)' : 'var(--g9-text-secondary)'}/> : null}
|
|
101
118
|
<text className={`g9-choice-pill__label${p.on ? ' g9-choice-pill__label--on' : ''}`}>{p.option.label}</text>
|
|
102
119
|
{p.option.description ? <text className={`g9-choice-pill__description${p.on ? " g9-choice-pill__description--on" : ''}`} {...tone ? {
|
|
@@ -110,6 +127,7 @@ const ChoicePill = memo(function(p) {
|
|
|
110
127
|
});
|
|
111
128
|
function G9ScaleInput(props) {
|
|
112
129
|
var _props_min, _props_max, _props_defaultValue;
|
|
130
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
113
131
|
const culture = useG9Culture();
|
|
114
132
|
const min = null != (_props_min = props.min) ? _props_min : 1;
|
|
115
133
|
const max = null != (_props_max = props.max) ? _props_max : 5;
|
|
@@ -146,7 +164,7 @@ function G9ScaleInput(props) {
|
|
|
146
164
|
{steps.map((n)=><view key={n} className={`g9-scale__step${value === n ? ' g9-scale__step--on' : ''}`} {...g9IdProps(g9ChildId(props.id, String(n)))} bindtap={()=>{
|
|
147
165
|
g9Haptic('tick');
|
|
148
166
|
setValue(n);
|
|
149
|
-
}} accessibility-element={true} accessibility-traits="button" accessibility-label={String(n)}
|
|
167
|
+
}} accessibility-element={true} accessibility-traits="button" accessibility-label={String(n)} {...g9SelectedA11y(value === n, selectedWord)}>
|
|
150
168
|
<text className={`g9-scale__num${value === n ? ' g9-scale__num--on' : ''}`}>
|
|
151
169
|
{formatNumber(n, {
|
|
152
170
|
numberingSystem: culture.numberingSystem
|
package/dist/swipe/swipe.css
CHANGED
package/dist/swipe/swipe.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/swipe/swipe.css"],"names":[],"mappings":"AACA;EAAE,WAAW;EACX,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAGA;EAAE,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;EACnB,QAAQ;EACR,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,eAAe;EACf,gCAAgC;
|
|
1
|
+
{"version":3,"sources":["webpack://./src/swipe/swipe.css"],"names":[],"mappings":"AACA;EAAE,WAAW;EACX,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAGA;EAAE,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;EACnB,QAAQ;EACR,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,eAAe;EACf,gCAAgC;EAChC,uBAAuB;EACvB,gBAAgB;AAClB;;AAIA;EADE,WAAW;EACX,kBAAkB;AACpB","sourcesContent":["/* G9SwipeView (MAUI G9SwipeView): a clipped card; action panes behind an opaque body that slides. */\n.g9-swipe {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n\n.g9-swipe__pane {\n position: absolute;\n top: 0;\n bottom: 0;\n display: flex;\n flex-direction: row;\n}\n\n.g9-swipe__action {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n}\n\n.g9-swipe__action-text {\n font-size: 12px;\n font-family: var(--g9-font-text);\n /* a text-maxline text on Android draws its other lines out of the box unless it clips (2.5.8) */\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-swipe__body {\n position: relative;\n width: 100%;\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../src/tab-bar/flat.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../src/tab-bar/flat.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAShD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,iHAAiH;AACjH,eAAO,MAAM,mBAAmB;;;;;;;;;;;EAW9B,CAAC;AAIH,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAyD5D"}
|
package/dist/tab-bar/flat.jsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
-
import {
|
|
1
|
+
import { G9StringKey, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { useG9Anchor } from "../anchor/hooks.jsx";
|
|
3
|
+
import { g9RowStyle, g9SelectedA11y } from "../base/control.jsx";
|
|
3
4
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
4
5
|
import { G9Badge } from "../display/status.jsx";
|
|
5
6
|
import { G9Icon } from "../icon/icon.jsx";
|
|
6
|
-
import { useG9Diagnostics, useG9Direction, useG9SafeInsets } from "../provider/hooks.jsx";
|
|
7
|
+
import { useG9Diagnostics, useG9Direction, useG9SafeInsets, useG9Strings } from "../provider/hooks.jsx";
|
|
7
8
|
import { resolveTabBarFabIndex } from "./model.jsx";
|
|
8
9
|
const g9FlatTabBarMetrics = Object.freeze({
|
|
9
10
|
band: 20,
|
|
@@ -68,43 +69,57 @@ function G9FlatTabBar(props) {
|
|
|
68
69
|
paddingRight: `${F.sidePadding}px`
|
|
69
70
|
}}>
|
|
70
71
|
{items.map((item, index)=>{
|
|
71
|
-
var _item_automationId
|
|
72
|
-
|
|
73
|
-
const raised = index === fab;
|
|
74
|
-
const icon = on && item.selectedIcon || item.icon || 'check';
|
|
75
|
-
return <view key={null != (_item_automationId = item.automationId) ? _item_automationId : `${index}`} className="g9-tab-flat__item" {...item.automationId ? {
|
|
76
|
-
id: item.automationId
|
|
77
|
-
} : {}} bindtap={()=>tap(index)} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_item_text = item.text) ? _item_text : ''} accessibility-status={on ? 'selected' : ''}>
|
|
78
|
-
{raised ? <view className={`g9-tab-flat__disc${on ? ' g9-tab-flat__disc--on' : ''}`} style={{
|
|
79
|
-
width: `${F.discSize}px`,
|
|
80
|
-
height: `${F.discSize}px`,
|
|
81
|
-
borderRadius: `${F.discSize / 2}px`,
|
|
82
|
-
borderWidth: `${F.discRing}px`,
|
|
83
|
-
marginTop: `-${F.band + 8}px`
|
|
84
|
-
}}>
|
|
85
|
-
<G9Icon icon={icon} size={F.discIconSize} color="var(--g9-on-primary)"/>
|
|
86
|
-
</view> : <view className={`g9-tab-flat__pill${on ? ' g9-tab-flat__pill--on' : ''}`} style={{
|
|
87
|
-
width: `${F.pillWidth}px`,
|
|
88
|
-
height: `${F.pillHeight}px`,
|
|
89
|
-
borderRadius: `${F.pillHeight / 2}px`
|
|
90
|
-
}}>
|
|
91
|
-
<G9Icon icon={icon} size={F.iconSize} color={on ? 'var(--g9-primary)' : 'var(--g9-text-secondary)'}/>
|
|
92
|
-
{item.badge ? <view className={`g9-tab-flat__badge g9-tab-flat__badge--${dir}`}>
|
|
93
|
-
<G9Badge {...true === item.badge ? {
|
|
94
|
-
dot: true
|
|
95
|
-
} : {
|
|
96
|
-
value: item.badge
|
|
97
|
-
}}/>
|
|
98
|
-
</view> : null}
|
|
99
|
-
</view>}
|
|
100
|
-
{item.text ? <text className={`g9-tab-flat__label${on ? ' g9-tab-flat__label--on' : ''}`} text-maxline="1" style={raised ? {
|
|
101
|
-
marginTop: '6px'
|
|
102
|
-
} : {}}>
|
|
103
|
-
{item.text}
|
|
104
|
-
</text> : null}
|
|
105
|
-
</view>;
|
|
72
|
+
var _item_automationId;
|
|
73
|
+
return <FlatTab key={null != (_item_automationId = item.automationId) ? _item_automationId : `${index}`} item={item} on={index === selected} raised={index === fab} dir={dir} onTap={()=>tap(index)}/>;
|
|
106
74
|
})}
|
|
107
75
|
</view>
|
|
108
76
|
</view>;
|
|
109
77
|
}
|
|
78
|
+
function FlatTab(props) {
|
|
79
|
+
var _item_text;
|
|
80
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
81
|
+
const { item, on, raised, dir } = props;
|
|
82
|
+
const icon = on && item.selectedIcon || item.icon || 'check';
|
|
83
|
+
const anchor = useG9Anchor(item.automationId, {
|
|
84
|
+
kind: 'tab',
|
|
85
|
+
label: ()=>{
|
|
86
|
+
var _item_text;
|
|
87
|
+
return null != (_item_text = item.text) ? _item_text : null;
|
|
88
|
+
},
|
|
89
|
+
capabilities: {
|
|
90
|
+
activate: ()=>props.onTap()
|
|
91
|
+
}
|
|
92
|
+
}, item.automationId ? {
|
|
93
|
+
domId: item.automationId
|
|
94
|
+
} : {});
|
|
95
|
+
return <view className="g9-tab-flat__item" {...anchor.props} bindtap={props.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_item_text = item.text) ? _item_text : ''} {...g9SelectedA11y(on, selectedWord)}>
|
|
96
|
+
{raised ? <view className={`g9-tab-flat__disc${on ? ' g9-tab-flat__disc--on' : ''}`} style={{
|
|
97
|
+
width: `${F.discSize}px`,
|
|
98
|
+
height: `${F.discSize}px`,
|
|
99
|
+
borderRadius: `${F.discSize / 2}px`,
|
|
100
|
+
borderWidth: `${F.discRing}px`,
|
|
101
|
+
marginTop: `-${F.band + 8}px`
|
|
102
|
+
}}>
|
|
103
|
+
<G9Icon icon={icon} size={F.discIconSize} color="var(--g9-on-primary)"/>
|
|
104
|
+
</view> : <view className={`g9-tab-flat__pill${on ? ' g9-tab-flat__pill--on' : ''}`} style={{
|
|
105
|
+
width: `${F.pillWidth}px`,
|
|
106
|
+
height: `${F.pillHeight}px`,
|
|
107
|
+
borderRadius: `${F.pillHeight / 2}px`
|
|
108
|
+
}}>
|
|
109
|
+
<G9Icon icon={icon} size={F.iconSize} color={on ? 'var(--g9-primary)' : 'var(--g9-text-secondary)'}/>
|
|
110
|
+
{item.badge ? <view className={`g9-tab-flat__badge g9-tab-flat__badge--${dir}`}>
|
|
111
|
+
<G9Badge {...true === item.badge ? {
|
|
112
|
+
dot: true
|
|
113
|
+
} : {
|
|
114
|
+
value: item.badge
|
|
115
|
+
}}/>
|
|
116
|
+
</view> : null}
|
|
117
|
+
</view>}
|
|
118
|
+
{item.text ? <text className={`g9-tab-flat__label${on ? ' g9-tab-flat__label--on' : ''}`} text-maxline="1" style={raised ? {
|
|
119
|
+
marginTop: '6px'
|
|
120
|
+
} : {}}>
|
|
121
|
+
{item.text}
|
|
122
|
+
</text> : null}
|
|
123
|
+
</view>;
|
|
124
|
+
}
|
|
110
125
|
export { G9FlatTabBar, g9FlatTabBarMetrics };
|
package/dist/tab-bar/tab-bar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/tab-bar/tab-bar.css"],"names":[],"mappings":"AAGA;EAFE,WAAW;EACX,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAMA;EAHE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,WAAW;AACb;;AAMA;EAHE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAUA;EAPE,cAAc;EACd,mBAAmB;EACnB,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Z;;AA4BA;EAzBE,SAAS;AACX;;AA4BA;EAzBE,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AA4BA;EAzBE,yCAAyC;AAC3C;;AA4BA;EAzBE,eAAe;EACf,iBAAiB;EACjB,oCAAoC;EACpC,+BAA+B;EAC/B,eAAe;EACf,gBAAgB;AAClB;;AA4BA;EAzBE,oCAAoC;EACpC,qCAAqC;EACrC,gBAAgB;AAClB","sourcesContent":["/* G9TabBar (MAUI G9TabBar): chrome with a notch, floating FAB, sub-menu row, overflow column. Classic: flat glass,\n no shadow. Sculpted (g9-tab-bar--sculpted): the shadow is painted inside the chrome and FAB SVGs, never box-shadow\n (plan/specs/02 §2). Sizes that differ per style are set inline from g9TabBarStyleMetrics. */\n.g9-tab-bar {\n position: relative;\n width: 100%;\n overflow: visible;\n}\n\n/* safeBottom: the band under the bar, as tall as the bottom safe inset (its padding inline) */\n.g9-tab-bar__safe {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tab-bar__backdrop {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__chrome {\n position: absolute;\n left: 14px;\n right: 14px;\n bottom: 14px;\n height: 62px;\n}\n\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 62px;\n}\n\n/* The slots are placed by `order` (mirrored in RTL by the component), so the row itself is always laid out left to\n right: a browser inherits `direction: rtl` and mirrored the row a second time — the items stood reversed while the\n indicator stood at the right slot (LC-17, Lynx for Web). The native engines do not inherit it; this states it. */\n.g9-tab-bar__slots {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n flex-direction: row;\n direction: ltr;\n}\n\n.g9-tab-bar__indicator-track {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n}\n\n/* one slot wide, moved by transform (tab-bar.tsx) */\n.g9-tab-bar__indicator-cell {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__indicator {\n position: absolute;\n left: 50%;\n width: 48px;\n height: 32px;\n margin-left: -24px;\n border-radius: 13px;\n background-color: var(--g9-primary-container);\n}\n\n/* indicatorMotion=\"spring\": the pill stretches on the way; two names so each move restarts the keyframe */\n.g9-tab-bar__indicator--stretch0 {\n animation-name: g9-tab-pill-stretch-a;\n animation-timing-function: ease-out;\n}\n\n.g9-tab-bar__indicator--stretch1 {\n animation-name: g9-tab-pill-stretch-b;\n animation-timing-function: ease-out;\n}\n\n@keyframes g9-tab-pill-stretch-a {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n@keyframes g9-tab-pill-stretch-b {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n/* Each slot is an equal share of the bar (its width, inline), as the indicator moves by. */\n.g9-tab-bar__slot {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n}\n\n.g9-tab-bar__slot-body {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__label {\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* The labels' twins, each measuring its label's real width: one row out of sight, no room limit, never touched. */\n.g9-tab-bar__measure {\n position: absolute;\n left: 0;\n top: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n opacity: 0;\n}\n\n.g9-tab-bar__label--measure {\n white-space: nowrap;\n text-overflow: clip;\n}\n\n.g9-tab-bar__fab {\n position: absolute;\n width: 72px;\n height: 72px;\n border-radius: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__fab-inner {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__fab-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* The FAB disc's shadow: painted first, so the disc covers it; larger than the FAB box on every side. */\n.g9-tab-bar__fab-shadow {\n position: absolute;\n}\n\n/* Paint only: the chrome and shadow SVGs never take a touch (the Sculpted ones reach 14 px past their boxes, where a\n tap belongs to the backdrop or the page). Items, the FAB box and the backdrop handle every tap. */\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched,\n.g9-tab-bar__fab-shadow {\n pointer-events: none;\n}\n\n.g9-tab-bar__submenu {\n position: absolute;\n overflow: visible;\n}\n\n.g9-tab-bar__overflow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 56px;\n overflow: visible;\n}\n\n.g9-tab-bar__submenu-cell,\n.g9-tab-bar__overflow-item {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border-radius: 18px;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__cell-accent {\n width: 44px;\n height: 44px;\n border-radius: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-bar__overflow-item .g9-tab-bar__cell-accent {\n width: 32px;\n height: 32px;\n background-color: transparent;\n}\n\n.g9-tab-bar__cell-label {\n margin-top: 1px;\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* Sculpted (MAUI 1.4.0): the chrome and FAB SVGs carry their shadows past their boxes; the FAB box is a transparent\n tap target around the flat primary disc; menu cells use the opaque bar surface, sub-menu accents are solid primary. */\n.g9-tab-bar--sculpted .g9-tab-bar__chrome,\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n overflow: visible;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n background-color: transparent;\n border-width: 0;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell,\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item {\n background-color: var(--g9-card-background);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell .g9-tab-bar__cell-accent {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__icon-box {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__badge {\n position: absolute;\n top: -5px;\n}\n\n/* the reading direction, explicit: Lynx does not inherit `direction`, so a logical property inside a page reads LTR */\n.g9-tab-bar__badge--ltr {\n right: -10px;\n}\n\n.g9-tab-bar__badge--rtl {\n left: -10px;\n}\n\n/* The flat bar (2.5.6): a transparent band on top for the raised disc, then the full-width surface bar. */\n.g9-tab-flat {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n width: 100%;\n}\n\n.g9-tab-flat__bar {\n display: flex;\n align-items: flex-start;\n padding-top: 8px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-tab-flat__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n min-width: 0px;\n}\n\n.g9-tab-flat__pill {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-flat__pill--on {\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-flat__badge {\n position: absolute;\n top: -2px;\n}\n\n.g9-tab-flat__badge--ltr {\n right: 4px;\n}\n\n.g9-tab-flat__badge--rtl {\n left: 4px;\n}\n\n.g9-tab-flat__disc {\n display: flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-color: var(--g9-surface);\n background-color: var(--g9-primary);\n}\n\n.g9-tab-flat__disc--on {\n border-color: var(--g9-primary-container);\n}\n\n.g9-tab-flat__label {\n margin-top: 4px;\n font-size: 11px;\n line-height: 14px;\n font-family: var(--g9-font-text-500);\n font-weight: 500;\n color: var(--g9-text-secondary);\n}\n\n.g9-tab-flat__label--on {\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/tab-bar/tab-bar.css"],"names":[],"mappings":"AAGA;EAFE,WAAW;EACX,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAMA;EAHE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,WAAW;AACb;;AAMA;EAHE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAUA;EAPE,cAAc;EACd,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAWA;EARE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;AACT;;AAWA;EARE,6CAA6C;EAC7C,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,SAAS;AACX;;AAYA;EATE,qCAAqC;EACrC,mCAAmC;AACrC;;AAYA;EATE,qCAAqC;EACrC,mCAAmC;AACrC;;AAYA;EATE;IACE,oBAAoB;EACtB;;EAEA;IACE,uBAAuB;EACzB;;EAEA;IACE,oBAAoB;EACtB;AACF;;AAUA;EAPE;IACE,oBAAoB;EACtB;;EAEA;IACE,uBAAuB;EACzB;;EAEA;IACE,oBAAoB;EACtB;AACF;;AASA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,eAAe;AACjB;;AAmBA;EAhBE,2CAA2C;AAC7C;;AAoBA;EAjBE,mCAAmC;AACrC;;AAwBA;EArBE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAwBA;EArBE,kBAAkB;EAClB,SAAS;AACX;;AAyBA;EAtBE,YAAY;AACd;;AAyBA;EAtBE,WAAW;AACb;;AA0BA;EAvBE,sBAAsB;EACtB,yBAAyB;EACzB,WAAW;EACX,aAAa;AACf;;AA0BA;EAvBE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,mCAAmC;EACnC,uBAAuB;EACvB,gBAAgB;EAChB,aAAa;AACf;;AA0BA;EAvBE,sBAAsB;EACtB,WAAW;EACX,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AA4BA;EAzBE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AA4BA;EAzBE,6CAA6C;AAC/C;;AA4BA;EAzBE,kBAAkB;EAClB,SAAS;AACX;;AA4BA;EAzBE,UAAU;AACZ;;AA4BA;EAzBE,SAAS;AACX;;AA4BA;EAzBE,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AA4BA;EAzBE,yCAAyC;AAC3C;;AA4BA;EAzBE,eAAe;EACf,iBAAiB;EACjB,oCAAoC;EACpC,+BAA+B;EAC/B,uBAAuB;EACvB,eAAe;EACf,gBAAgB;EAChB,gBAAgB;AAClB;;AA6BA;EA1BE,oCAAoC;EACpC,qCAAqC;EACrC,gBAAgB;AAClB","sourcesContent":["/* G9TabBar (MAUI G9TabBar): chrome with a notch, floating FAB, sub-menu row, overflow column. Classic: flat glass,\n no shadow. Sculpted (g9-tab-bar--sculpted): the shadow is painted inside the chrome and FAB SVGs, never box-shadow\n (plan/specs/02 §2). Sizes that differ per style are set inline from g9TabBarStyleMetrics. */\n.g9-tab-bar {\n position: relative;\n width: 100%;\n overflow: visible;\n}\n\n/* safeBottom: the band under the bar, as tall as the bottom safe inset (its padding inline) */\n.g9-tab-bar__safe {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tab-bar__backdrop {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__chrome {\n position: absolute;\n left: 14px;\n right: 14px;\n bottom: 14px;\n height: 62px;\n}\n\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 62px;\n}\n\n/* The slots are placed by `order` (mirrored in RTL by the component), so the row itself is always laid out left to\n right: a browser inherits `direction: rtl` and mirrored the row a second time — the items stood reversed while the\n indicator stood at the right slot (LC-17, Lynx for Web). The native engines do not inherit it; this states it. */\n.g9-tab-bar__slots {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n flex-direction: row;\n direction: ltr;\n}\n\n.g9-tab-bar__indicator-track {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n}\n\n/* one slot wide, moved by transform (tab-bar.tsx) */\n.g9-tab-bar__indicator-cell {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__indicator {\n position: absolute;\n left: 50%;\n width: 48px;\n height: 32px;\n margin-left: -24px;\n border-radius: 13px;\n background-color: var(--g9-primary-container);\n}\n\n/* indicatorMotion=\"spring\": the pill stretches on the way; two names so each move restarts the keyframe */\n.g9-tab-bar__indicator--stretch0 {\n animation-name: g9-tab-pill-stretch-a;\n animation-timing-function: ease-out;\n}\n\n.g9-tab-bar__indicator--stretch1 {\n animation-name: g9-tab-pill-stretch-b;\n animation-timing-function: ease-out;\n}\n\n@keyframes g9-tab-pill-stretch-a {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n@keyframes g9-tab-pill-stretch-b {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n/* Each slot is an equal share of the bar (its width, inline), as the indicator moves by. */\n.g9-tab-bar__slot {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n}\n\n.g9-tab-bar__slot-body {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__label {\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* The labels' twins, each measuring its label's real width: one row out of sight, no room limit, never touched. */\n.g9-tab-bar__measure {\n position: absolute;\n left: 0;\n top: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n opacity: 0;\n}\n\n.g9-tab-bar__label--measure {\n white-space: nowrap;\n text-overflow: clip;\n}\n\n.g9-tab-bar__fab {\n position: absolute;\n width: 72px;\n height: 72px;\n border-radius: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__fab-inner {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__fab-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* The FAB disc's shadow: painted first, so the disc covers it; larger than the FAB box on every side. */\n.g9-tab-bar__fab-shadow {\n position: absolute;\n}\n\n/* Paint only: the chrome and shadow SVGs never take a touch (the Sculpted ones reach 14 px past their boxes, where a\n tap belongs to the backdrop or the page). Items, the FAB box and the backdrop handle every tap. */\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched,\n.g9-tab-bar__fab-shadow {\n pointer-events: none;\n}\n\n.g9-tab-bar__submenu {\n position: absolute;\n overflow: visible;\n}\n\n.g9-tab-bar__overflow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 56px;\n overflow: visible;\n}\n\n.g9-tab-bar__submenu-cell,\n.g9-tab-bar__overflow-item {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border-radius: 18px;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__cell-accent {\n width: 44px;\n height: 44px;\n border-radius: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-bar__overflow-item .g9-tab-bar__cell-accent {\n width: 32px;\n height: 32px;\n background-color: transparent;\n}\n\n.g9-tab-bar__cell-label {\n margin-top: 1px;\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* Sculpted (MAUI 1.4.0): the chrome and FAB SVGs carry their shadows past their boxes; the FAB box is a transparent\n tap target around the flat primary disc; menu cells use the opaque bar surface, sub-menu accents are solid primary. */\n.g9-tab-bar--sculpted .g9-tab-bar__chrome,\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n overflow: visible;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n background-color: transparent;\n border-width: 0;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell,\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item {\n background-color: var(--g9-card-background);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell .g9-tab-bar__cell-accent {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__icon-box {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__badge {\n position: absolute;\n top: -5px;\n}\n\n/* the reading direction, explicit: Lynx does not inherit `direction`, so a logical property inside a page reads LTR */\n.g9-tab-bar__badge--ltr {\n right: -10px;\n}\n\n.g9-tab-bar__badge--rtl {\n left: -10px;\n}\n\n/* The flat bar (2.5.6): a transparent band on top for the raised disc, then the full-width surface bar. */\n.g9-tab-flat {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n width: 100%;\n}\n\n.g9-tab-flat__bar {\n display: flex;\n align-items: flex-start;\n padding-top: 8px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-tab-flat__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n min-width: 0px;\n}\n\n.g9-tab-flat__pill {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-flat__pill--on {\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-flat__badge {\n position: absolute;\n top: -2px;\n}\n\n.g9-tab-flat__badge--ltr {\n right: 4px;\n}\n\n.g9-tab-flat__badge--rtl {\n left: 4px;\n}\n\n.g9-tab-flat__disc {\n display: flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-color: var(--g9-surface);\n background-color: var(--g9-primary);\n}\n\n.g9-tab-flat__disc--on {\n border-color: var(--g9-primary-container);\n}\n\n.g9-tab-flat__label {\n margin-top: 4px;\n font-size: 11px;\n line-height: 14px;\n font-family: var(--g9-font-text-500);\n font-weight: 500;\n color: var(--g9-text-secondary);\n /* a text-maxline text on Android draws its other lines out of the box unless it clips (2.5.8) */\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tab-flat__label--on {\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar.d.ts","sourceRoot":"","sources":["../../src/tab-bar/tab-bar.tsx"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,gBAAgB,CAAC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E,OAAO,CAAC;IAClC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,6GAA6G;IAC7G,QAAQ,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAC9C,sGAAsG;IACtG,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,kGAAkG;IAClG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,iCAAiC,KAAK,IAAI,CAAC;IAC5E;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC/F;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAeD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAGxD"}
|
package/dist/tab-bar/tab-bar.jsx
CHANGED
|
@@ -3,6 +3,7 @@ import "./tab-bar.css";
|
|
|
3
3
|
import "../base/press.css";
|
|
4
4
|
import { g9Ms } from "@g9tm/lynxcontrols-foundation";
|
|
5
5
|
import { useEffect, useRef, useState } from "@lynx-js/react";
|
|
6
|
+
import { useG9Anchor } from "../anchor/hooks.jsx";
|
|
6
7
|
import { useG9PressFeedback, usePressVisual } from "../base/press.jsx";
|
|
7
8
|
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
8
9
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
@@ -352,6 +353,19 @@ function TabBarSlot(props) {
|
|
|
352
353
|
const slotDir = useG9Direction();
|
|
353
354
|
const press = useG9PressFeedback(PRESS, false);
|
|
354
355
|
const { item, selected, hidden, revealPose, metrics } = props;
|
|
356
|
+
const anchor = useG9Anchor(item.automationId, {
|
|
357
|
+
kind: 'tab',
|
|
358
|
+
label: ()=>{
|
|
359
|
+
var _item_text;
|
|
360
|
+
return null != (_item_text = item.text) ? _item_text : null;
|
|
361
|
+
},
|
|
362
|
+
enabled: ()=>!hidden,
|
|
363
|
+
capabilities: {
|
|
364
|
+
activate: ()=>props.onTap()
|
|
365
|
+
}
|
|
366
|
+
}, item.automationId ? {
|
|
367
|
+
domId: item.automationId
|
|
368
|
+
} : {});
|
|
355
369
|
const sculpted = 'sculpted' === metrics.style;
|
|
356
370
|
const color = sculpted ? selected ? 'var(--g9-primary)' : 'var(--g9-text-secondary)' : selected ? 'var(--g9-on-primary-container)' : 'var(--g9-on-surface-variant)';
|
|
357
371
|
const icon = sculpted && selected && void 0 !== item.selectedIcon ? item.selectedIcon : null != (_item_icon = item.icon) ? _item_icon : 'check';
|
|
@@ -370,9 +384,7 @@ function TabBarSlot(props) {
|
|
|
370
384
|
transform: `translateY(${g9TabBarMetrics.selectedItemTranslationY}px) scale(1)`,
|
|
371
385
|
transition: `opacity ${g9TabBarMetrics.selectedReturnRevealDurationMs}ms ease-out, transform ${g9TabBarMetrics.selectedReturnRevealDurationMs}ms ease-out`
|
|
372
386
|
};
|
|
373
|
-
return <view className={`g9-tab-bar__slot${selected ? ' g9-tab-bar__slot--selected' : ''}${hidden ? ' g9-tab-bar__slot--hidden' : ''}${press.className}`} {...
|
|
374
|
-
id: item.automationId
|
|
375
|
-
} : {}} style={{
|
|
387
|
+
return <view className={`g9-tab-bar__slot${selected ? ' g9-tab-bar__slot--selected' : ''}${hidden ? ' g9-tab-bar__slot--hidden' : ''}${press.className}`} {...anchor.props} style={{
|
|
376
388
|
order: props.order,
|
|
377
389
|
width: `${props.share}%`
|
|
378
390
|
}} accessibility-element accessibility-traits="button" accessibility-label={item.badge && true !== item.badge ? `${null != (_item_text1 = item.text) ? _item_text1 : ''} (${item.badge})` : null != (_item_text2 = item.text) ? _item_text2 : ''} bindtap={hidden ? void 0 : props.onTap} {...press.props}>
|
|
@@ -406,6 +418,18 @@ function TabBarSlot(props) {
|
|
|
406
418
|
function MenuCell(props) {
|
|
407
419
|
var _props_item_text, _props_item_icon, _props_item_text1;
|
|
408
420
|
const [shown, setShown] = useState(false);
|
|
421
|
+
const anchor = useG9Anchor(props.item.automationId, {
|
|
422
|
+
kind: 'tab',
|
|
423
|
+
label: ()=>{
|
|
424
|
+
var _props_item_text;
|
|
425
|
+
return null != (_props_item_text = props.item.text) ? _props_item_text : null;
|
|
426
|
+
},
|
|
427
|
+
capabilities: {
|
|
428
|
+
activate: ()=>props.onTap()
|
|
429
|
+
}
|
|
430
|
+
}, props.item.automationId ? {
|
|
431
|
+
domId: props.item.automationId
|
|
432
|
+
} : {});
|
|
409
433
|
useEffect(()=>{
|
|
410
434
|
const t = startTimer(()=>setShown(true), 16);
|
|
411
435
|
return ()=>stopTimer(t);
|
|
@@ -417,9 +441,7 @@ function MenuCell(props) {
|
|
|
417
441
|
const bounce = easeOutBackCss(g9TabBarMetrics.fabPopBackCoefficient);
|
|
418
442
|
const color = props.selected ? 'var(--g9-on-primary)' : 'var(--g9-on-surface)';
|
|
419
443
|
const iconColor = props.onAccent ? 'var(--g9-on-primary)' : color;
|
|
420
|
-
return <view className={`${props.className}${press.className}${props.selected ? ` ${props.className}--selected` : ''}`} {...props.item.
|
|
421
|
-
id: props.item.automationId
|
|
422
|
-
} : {}} accessibility-element accessibility-traits="button" accessibility-label={null != (_props_item_text = props.item.text) ? _props_item_text : ''} style={{
|
|
444
|
+
return <view className={`${props.className}${press.className}${props.selected ? ` ${props.className}--selected` : ''}`} {...anchor.props} accessibility-element accessibility-traits="button" accessibility-label={null != (_props_item_text = props.item.text) ? _props_item_text : ''} style={{
|
|
423
445
|
left: `${props.left}px`,
|
|
424
446
|
bottom: `${props.bottom}px`,
|
|
425
447
|
width: `${props.size}px`,
|
package/dist/tabs/tab-view.jsx
CHANGED
|
@@ -280,11 +280,18 @@ function TabBarStrip(props) {
|
|
|
280
280
|
backgroundColor: null != (_props_background = props.background) ? _props_background : pill ? 'var(--g9-surface-container-low)' : 'transparent'
|
|
281
281
|
};
|
|
282
282
|
return <view className="g9-tabs__bar" style={barStyle}>
|
|
283
|
-
{
|
|
283
|
+
{}
|
|
284
|
+
{fixed ? <view className="g9-tabs__cells" style={{
|
|
285
|
+
direction: 'ltr'
|
|
286
|
+
}}>
|
|
284
287
|
{slider}
|
|
285
288
|
{cells}
|
|
286
|
-
</view> : <scroll-view className="g9-tabs__scroller" scroll-orientation="horizontal"
|
|
287
|
-
|
|
289
|
+
</view> : <scroll-view className="g9-tabs__scroller" scroll-orientation="horizontal" style={{
|
|
290
|
+
direction: 'ltr'
|
|
291
|
+
}}>
|
|
292
|
+
<view className={`g9-tabs__cells g9-tabs__cells--scrollable${'rtl' === direction ? ' g9-tabs__cells--end' : ''}`} style={{
|
|
293
|
+
direction: 'ltr'
|
|
294
|
+
}}>
|
|
288
295
|
<G9HorizontalStripContext.Provider value={true}>{cells}</G9HorizontalStripContext.Provider>
|
|
289
296
|
</view>
|
|
290
297
|
</scroll-view>}
|
package/dist/tabs/tabs.css
CHANGED
package/dist/tabs/tabs.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/tabs/tabs.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,UAAU;AACZ;;AAGA;EAAE,cAAc;EACd,WAAW;EACX,kBAAkB;AACpB;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,uCAAuC;EACvC,0CAA0C;AAC5C;;AAGA;EAAE,mBAAmB;EACnB,YAAY;AACd;;AAGA;EAAE,eAAe;AACjB;;AAGA;EAAE,kBAAkB;AACpB;;AAGA;EAAE,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,WAAW;AACb;;
|
|
1
|
+
{"version":3,"sources":["webpack://./src/tabs/tabs.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,UAAU;AACZ;;AAGA;EAAE,cAAc;EACd,WAAW;EACX,kBAAkB;AACpB;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAGA;EAAE,uCAAuC;EACvC,0CAA0C;AAC5C;;AAGA;EAAE,mBAAmB;EACnB,YAAY;AACd;;AAGA;EAAE,eAAe;AACjB;;AAGA;EAAE,kBAAkB;AACpB;;AAGA;EAAE,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,WAAW;AACb;;AAIA;EADE,yBAAyB;EACzB,eAAe;AACjB;;AAIA;EADE,WAAW;EACX,YAAY;AACd;;AAIA;EADE,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,aAAa;EACb,kBAAkB;AACpB;;AAIA;EADE,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,QAAQ;EACR,aAAa;AACf;;AAIA;EADE,eAAe;EACf,gCAAgC;AAClC;;AAIA;EADE,mCAAmC;EACnC,UAAU;EACV,kBAAkB;EAClB,SAAS;EACT,YAAY;EACZ,OAAO;AACT;;AAIA;EADE,kBAAkB;EAClB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAIA;EADE,eAAe;EACf,oCAAoC;EACpC,yBAAyB;EACzB,gBAAgB;AAClB;;AAIA;EADE,oBAAoB;EACpB,UAAU;EACV,WAAW;AACb;;AAIA;EADE,mBAAmB;EACnB,uBAAuB;EACvB,aAAa;EACb,aAAa;EACb,kBAAkB;EAClB,SAAS;AACX;;AAIA;EADE,WAAW;EACX,aAAa;AACf;;AAKA;EAFE,kBAAkB;EAClB,SAAS;EACT,OAAO;AACT;;AAKA;EAFE,aAAa;EACb,kBAAkB;EAClB,QAAQ;EACR,WAAW;AACb;;AAKA;EAFE,6CAA6C;EAC7C,0CAA0C;EAC1C,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAMA;EAHE,YAAY;EACZ,kBAAkB;EAClB,QAAQ;EACR,WAAW;EACX,OAAO;AACT;;AAMA;EAHE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;AACf;;AAMA;EAHE,OAAO;EACP,YAAY;AACd;;AAMA;EAHE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;AACf;;AAMA;EAHE,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,gBAAgB;EAChB,aAAa;AACf","sourcesContent":["/* G9TabView (MAUI G9TabView): bar, sliding indicator, lazily realized bodies. No shadows (plan/specs/02 §2). */\n.g9-tabs {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tabs--header-only {\n flex: 0 0 auto;\n}\n\n.g9-tabs__bar {\n position: relative;\n width: 100%;\n flex-shrink: 0;\n}\n\n.g9-tabs__content {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.g9-tabs--underlined .g9-tabs__bar {\n border-top: 1px solid var(--g9-divider);\n border-bottom: 1px solid var(--g9-divider);\n}\n\n.g9-tabs--pill .g9-tabs__bar {\n border-radius: 26px;\n padding: 4px;\n}\n\n.g9-tabs--pill.g9-tabs--top .g9-tabs__content {\n margin-top: 8px;\n}\n\n.g9-tabs--pill.g9-tabs--bottom .g9-tabs__content {\n margin-bottom: 8px;\n}\n\n.g9-tabs__cells {\n position: relative;\n display: flex;\n flex-direction: row;\n height: 100%;\n width: 100%;\n}\n\n.g9-tabs__cells--scrollable {\n width: auto;\n}\n\n/* RTL: cells that do not fill the bar sit at its right (its reading start); wider ones scroll as before (2.5.7). */\n.g9-tabs__cells--end {\n min-width: 100%;\n justify-content: flex-end;\n}\n\n.g9-tabs__scroller {\n height: 100%;\n width: 100%;\n}\n\n.g9-tabs__cell {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 14px;\n}\n\n.g9-tabs__cell-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n\n.g9-tabs__label {\n font-size: 14px;\n font-family: var(--g9-font-text);\n}\n\n.g9-tabs__separator {\n position: absolute;\n left: 0;\n top: 12px;\n bottom: 12px;\n width: 1px;\n background-color: var(--g9-divider);\n}\n\n.g9-tabs__badge {\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tabs__badge-text {\n font-size: 11px;\n font-family: var(--g9-font-text-600);\n font-weight: 600;\n color: var(--g9-on-error);\n}\n\n.g9-tabs__badge-dot {\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n}\n\n.g9-tabs__underline {\n position: absolute;\n bottom: 0;\n height: 2.5px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n\n.g9-tabs__underline-fill,\n.g9-tabs__cell-underline {\n height: 2.5px;\n width: 100%;\n}\n\n.g9-tabs__cell-underline {\n position: absolute;\n left: 0;\n bottom: 0;\n}\n\n.g9-tabs__pill {\n position: absolute;\n top: 2px;\n bottom: 2px;\n display: flex;\n}\n\n.g9-tabs__pill-fill,\n.g9-tabs__cell-pill {\n width: 100%;\n height: 100%;\n border-radius: 18px;\n background-color: var(--g9-primary-container);\n border: 1px solid var(--g9-primary-border);\n}\n\n.g9-tabs__cell-pill {\n position: absolute;\n top: 2px;\n bottom: 2px;\n left: 0;\n height: auto;\n}\n\n.g9-tabs__panel {\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tabs__pager {\n flex: 1;\n height: 100%;\n}\n\n.g9-tabs__page {\n flex: 1;\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tabs__spinner {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 72px;\n width: 100%;\n}\n"],"sourceRoot":""}
|
package/dist/toast/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { type G9ToastService, g9ToastMetrics, g9Toasts, toastServiceOf, useG9Toasts } from './service.js';
|
|
2
|
-
export { type G9LoaderState, type G9LoadingLease, type G9LoadingToastState, type G9ProgressToastState, type G9ToastEntry, type G9ToastHandle, type G9ToastOptions, G9ToastPosition, type G9ToastSnapshot, G9ToastStore, type G9ToastStoreConfig, G9ToastType, g9DefaultToastOptions, g9MaxToastsPerStack, g9ToastTimings, resolveToastPosition, } from './store.js';
|
|
2
|
+
export { type G9LoaderState, type G9LoadingLease, type G9LoadingToastState, type G9ProgressToastState, type G9ToastEntry, type G9ToastHandle, type G9ToastOptions, G9ToastPosition, type G9ToastSnapshot, G9ToastStore, type G9ToastStoreConfig, G9ToastType, type G9ToastUpdate, g9DefaultToastOptions, g9MaxToastsPerStack, g9ToastTimings, resolveToastPosition, } from './store.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvG,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,kBAAkB,EACvB,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvG,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,aAAa,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/toast/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AASrB,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAW9D,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,WAAW,EAEjB,MAAM,SAAS,CAAC;AAEjB,+FAA+F;AAC/F,eAAO,MAAM,cAAc;;;;EAAsE,CAAC;AAElG,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IACxF,2EAA2E;IAC3E,YAAY,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gFAAgF;IAChF,WAAW,CAAC,IAAI,CAAC,EAAE,MA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kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,uGAAuG;IACvG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,wEAAwE;IACxE,UAAU,IAAI,IAAI,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AA2TD,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAGjE;AAED,kHAAkH;AAClH,wBAAgB,WAAW,IAAI,cAAc,CAE5C;AAED,wGAAwG;AACxG,wBAAgB,QAAQ,IAAI,cAAc,CAEzC"}
|
package/dist/toast/service.jsx
CHANGED
|
@@ -66,7 +66,9 @@ function ToastCard(props) {
|
|
|
66
66
|
const icon = null != (_entry_icon = entry.icon) ? _entry_icon : 'success' === entry.type ? glyphs.success : 'warning' === entry.type ? glyphs.warning : 'error' === entry.type ? glyphs.error : glyphs.info;
|
|
67
67
|
const offset = props.bottom ? '12px' : '-12px';
|
|
68
68
|
const direction = useG9Direction();
|
|
69
|
-
return <view className={`g9-toast g9-toast--${entry.type} g9-toast--${entry.status}`} accessibility-element={true} accessibility-label={entry.message}
|
|
69
|
+
return <view className={`g9-toast g9-toast--${entry.type} g9-toast--${entry.status}`} accessibility-element={true} accessibility-label={entry.detail ? `${entry.message}. ${entry.detail}` : entry.message} {...entry.loading ? {
|
|
70
|
+
'accessibility-status': 'busy'
|
|
71
|
+
} : {}} style={{
|
|
70
72
|
...g9RowStyle(direction),
|
|
71
73
|
backgroundColor: fill,
|
|
72
74
|
borderColor: paletteColor(palette, onBase, props.ink ? 0.12 : 0.35),
|
|
@@ -75,12 +77,23 @@ function ToastCard(props) {
|
|
|
75
77
|
transition: `opacity ${g9Ms('leaving' === entry.status ? g9ToastTimings.exitMs : g9ToastTimings.enterMs)}ms, transform ${g9Ms(g9ToastTimings.enterMs)}ms`
|
|
76
78
|
}}>
|
|
77
79
|
{entry.durationMs > 0 ? <ToastCountdown key={entry.refreshes} durationMs={entry.durationMs} color={paletteColor(palette, onBase, 0.14)} rtl={'rtl' === direction}/> : null}
|
|
78
|
-
<G9IconSlot icon={icon} size={20} color={iconColor}/>
|
|
79
|
-
<
|
|
80
|
+
{entry.loading ? <G9ActivityIndicator running={true} size={20} color={iconColor}/> : <G9IconSlot icon={icon} size={20} color={iconColor}/>}
|
|
81
|
+
{entry.detail ? <view className="g9-toast__texts">
|
|
82
|
+
<text className="g9-toast__message g9-toast__message--stacked" style={{
|
|
80
83
|
color: on
|
|
81
84
|
}}>
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
{entry.message}
|
|
86
|
+
</text>
|
|
87
|
+
<text className="g9-toast__detail" style={{
|
|
88
|
+
color: on
|
|
89
|
+
}}>
|
|
90
|
+
{entry.detail}
|
|
91
|
+
</text>
|
|
92
|
+
</view> : <text className="g9-toast__message" style={{
|
|
93
|
+
color: on
|
|
94
|
+
}}>
|
|
95
|
+
{entry.message}
|
|
96
|
+
</text>}
|
|
84
97
|
{entry.actionText ? <view className="g9-toast__action" accessibility-element={true} accessibility-traits="button" bindtap={action} style={{
|
|
85
98
|
backgroundColor: paletteColor(palette, onBase, 0.16)
|
|
86
99
|
}}>
|
package/dist/toast/store.d.ts
CHANGED
|
@@ -32,6 +32,18 @@ export interface G9ToastOptions {
|
|
|
32
32
|
readonly actionText?: string | null;
|
|
33
33
|
/** Runs once when the action button is tapped (through the provider's safe executor). */
|
|
34
34
|
readonly action?: (() => unknown) | null;
|
|
35
|
+
/** A second, smaller line under the message (an error's detail; G9Hub, 2.5.8). */
|
|
36
|
+
readonly detail?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* A spinner in place of the icon, and no auto-dismiss unless `durationMs` says so: a loading toast that its handle's
|
|
39
|
+
* `update` later turns into the result (`toast.promise`).
|
|
40
|
+
*/
|
|
41
|
+
readonly loading?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** What {@link G9ToastHandle.update} changes on a live toast; the rest stays. */
|
|
44
|
+
export interface G9ToastUpdate extends Omit<G9ToastOptions, 'position'> {
|
|
45
|
+
readonly message?: string;
|
|
46
|
+
readonly type?: G9ToastType;
|
|
35
47
|
}
|
|
36
48
|
/** Default toast options (MAUI `G9ToastOptions.Default`). */
|
|
37
49
|
export declare const g9DefaultToastOptions: Readonly<Required<Pick<G9ToastOptions, 'durationMs'>>>;
|
|
@@ -54,6 +66,10 @@ export interface G9ToastEntry {
|
|
|
54
66
|
readonly icon: G9IconInput;
|
|
55
67
|
readonly actionText: string | null;
|
|
56
68
|
readonly hasAction: boolean;
|
|
69
|
+
/** The second line, or null. */
|
|
70
|
+
readonly detail: string | null;
|
|
71
|
+
/** Working: a spinner instead of the icon. */
|
|
72
|
+
readonly loading: boolean;
|
|
57
73
|
readonly status: 'entering' | 'shown' | 'leaving';
|
|
58
74
|
/** Bumped when an identical toast collapsed into this one (its lifetime restarted). */
|
|
59
75
|
readonly refreshes: number;
|
|
@@ -98,6 +114,11 @@ export interface G9LoadingLease {
|
|
|
98
114
|
export interface G9ToastHandle {
|
|
99
115
|
readonly id: number;
|
|
100
116
|
dismiss(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Changes the toast in place — message, type, detail, icon, action, loading, duration (its countdown restarts with the
|
|
119
|
+
* new `durationMs`, or with the type's default when a loading toast becomes a result). Nothing after it left.
|
|
120
|
+
*/
|
|
121
|
+
update(patch: G9ToastUpdate): void;
|
|
101
122
|
/** Settles when the toast left the screen. */
|
|
102
123
|
readonly closed: Promise<void>;
|
|
103
124
|
}
|
|
@@ -162,6 +183,7 @@ export declare class G9ToastStore {
|
|
|
162
183
|
/** The host unmounted. */
|
|
163
184
|
dispose(): void;
|
|
164
185
|
private handle;
|
|
186
|
+
private update;
|
|
165
187
|
private arm;
|
|
166
188
|
private leave;
|
|
167
189
|
private hold;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot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