@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
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import "./extra-entries.css";
|
|
2
2
|
import { G9StringKey, g9Haptic, getNumberSymbols, groupWhileTyping, normalizeToAscii, toNativeDigits } from "@g9tm/lynxcontrols-foundation";
|
|
3
3
|
import { memo, useEffect, useRef, useState } from "@lynx-js/react";
|
|
4
|
-
import {
|
|
4
|
+
import { useG9Anchor } from "../anchor/hooks.jsx";
|
|
5
|
+
import { g9ChildId, g9IdProps, g9RowStyle, g9TextStart, mergeStyle } from "../base/control.jsx";
|
|
5
6
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
6
7
|
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
7
8
|
import { G9Icon } from "../icon/icon.jsx";
|
|
9
|
+
import { G9Slot } from "../provider/direction-scope.jsx";
|
|
8
10
|
import { useG9Culture, useG9Direction, useG9Shape, useG9Strings } from "../provider/hooks.jsx";
|
|
9
11
|
import { G9Chip } from "../toggle/choice.jsx";
|
|
10
12
|
import { G9OutlinedField } from "./outlined-field.jsx";
|
|
@@ -26,11 +28,12 @@ function G9NumberEntry(props) {
|
|
|
26
28
|
const opts = {
|
|
27
29
|
numberingSystem: 'latin',
|
|
28
30
|
decimals: null != (_props_decimals = props.decimals) ? _props_decimals : 0,
|
|
29
|
-
allowNegative: true === props.allowNegative
|
|
31
|
+
allowNegative: true === props.allowNegative,
|
|
32
|
+
grouping: false !== props.grouping
|
|
30
33
|
};
|
|
31
34
|
const drawn = 'latin' === system ? null : {
|
|
32
35
|
digits: system,
|
|
33
|
-
group: getNumberSymbols(system).group,
|
|
36
|
+
group: false === props.grouping ? '' : getNumberSymbols(system).group,
|
|
34
37
|
decimal: (null != (_props_decimals1 = props.decimals) ? _props_decimals1 : 0) > 0 ? getNumberSymbols(system).decimal : ''
|
|
35
38
|
};
|
|
36
39
|
const format = (n)=>null === n ? '' : groupWhileTyping(String(n), String(n).length, opts).text;
|
|
@@ -271,19 +274,41 @@ function G9TagEntry(props) {
|
|
|
271
274
|
const G9FormField = memo(function(props) {
|
|
272
275
|
const dir = useG9Direction();
|
|
273
276
|
return <view className={`g9-form-field${props.className ? ` ${props.className}` : ''}`} {...g9IdProps(props.id)} style={mergeStyle(void 0, props.style)}>
|
|
274
|
-
<view className="g9-form-field__head" style={g9RowStyle(dir)}>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
277
|
+
{props.label || props.aside ? <view className="g9-form-field__head" style={g9RowStyle(dir)}>
|
|
278
|
+
{props.label ? <text className="g9-form-field__label" style={g9TextStart(dir)}>
|
|
279
|
+
{props.label}
|
|
280
|
+
{props.required ? <text className="g9-form-field__required"> *</text> : null}
|
|
281
|
+
</text> : <view className="g9-form-field__label"/>}
|
|
282
|
+
<G9Slot>{props.aside}</G9Slot>
|
|
283
|
+
</view> : null}
|
|
281
284
|
{props.children}
|
|
282
|
-
{props.error ? <text className="g9-form-field__error" accessibility-element={true} accessibility-label={props.error}>
|
|
285
|
+
{props.error ? <text className="g9-form-field__error" style={g9TextStart(dir)} accessibility-element={true} accessibility-label={props.error}>
|
|
283
286
|
{props.error}
|
|
284
|
-
</text> : props.hint ? <text className="g9-form-field__hint"
|
|
287
|
+
</text> : props.hint ? <text className="g9-form-field__hint" style={g9TextStart(dir)}>
|
|
288
|
+
{props.hint}
|
|
289
|
+
</text> : null}
|
|
285
290
|
</view>;
|
|
286
291
|
});
|
|
292
|
+
function NumKey(p) {
|
|
293
|
+
const press = ()=>{
|
|
294
|
+
if (p.disabled) return;
|
|
295
|
+
g9Haptic('tick');
|
|
296
|
+
p.onKey(p.k);
|
|
297
|
+
};
|
|
298
|
+
const anchor = useG9Anchor(p.id, {
|
|
299
|
+
kind: 'button',
|
|
300
|
+
label: ()=>p.label,
|
|
301
|
+
enabled: ()=>!p.disabled,
|
|
302
|
+
capabilities: {
|
|
303
|
+
activate: press
|
|
304
|
+
}
|
|
305
|
+
}, p.id ? {
|
|
306
|
+
domId: p.id
|
|
307
|
+
} : {});
|
|
308
|
+
return <view className={`g9-numpad__key${p.dark ? ' g9-numpad__key--dark' : ''}${p.disabled ? ' g9-numpad__key--off' : ''}`} style={p.look} {...anchor.props} bindtap={press} accessibility-element={true} accessibility-traits="button" accessibility-label={p.label}>
|
|
309
|
+
{p.children}
|
|
310
|
+
</view>;
|
|
311
|
+
}
|
|
287
312
|
const PAD = [
|
|
288
313
|
'1',
|
|
289
314
|
'2',
|
|
@@ -308,18 +333,28 @@ function G9NumPad(props) {
|
|
|
308
333
|
borderRadius: `${radius}px`
|
|
309
334
|
};
|
|
310
335
|
const backLabel = null != (_props_backLabel = props.backLabel) ? _props_backLabel : strings.get(G9StringKey.Delete);
|
|
311
|
-
const key = (k, label, a11y)=><
|
|
312
|
-
if (props.disabled) return;
|
|
313
|
-
g9Haptic('tick');
|
|
314
|
-
props.onKey(k);
|
|
315
|
-
}} accessibility-element={true} accessibility-traits="button" accessibility-label={a11y}>
|
|
336
|
+
const key = (k, label, a11y)=><NumKey key={k} k={k} id={g9ChildId(props.id, 'back' === k ? 'Back' : k)} dark={true === props.dark} disabled={true === props.disabled} look={look} label={a11y} onKey={props.onKey}>
|
|
316
337
|
{label}
|
|
317
|
-
</
|
|
338
|
+
</NumKey>;
|
|
318
339
|
const text1 = (s)=><text className={`g9-numpad__digit${props.dark ? ' g9-numpad__digit--dark' : ''}`}>{s}</text>;
|
|
319
340
|
const back = key('back', <G9Icon icon="arrowBack" size={22} color={props.dark ? '#FFFFFF' : 'var(--g9-text-primary)'}/>, backLabel);
|
|
320
341
|
const action = props.actionKey;
|
|
321
342
|
const actionOff = true === props.disabled || (null == action ? void 0 : action.disabled) === true || (null == action ? void 0 : action.busy) === true;
|
|
322
|
-
const
|
|
343
|
+
const actionId = action ? g9ChildId(props.id, 'Action') : void 0;
|
|
344
|
+
const actionAnchor = useG9Anchor(actionId, {
|
|
345
|
+
kind: 'button',
|
|
346
|
+
label: ()=>{
|
|
347
|
+
var _ref;
|
|
348
|
+
return null != (_ref = null == action ? void 0 : action.label) ? _ref : null;
|
|
349
|
+
},
|
|
350
|
+
enabled: ()=>!actionOff,
|
|
351
|
+
capabilities: {
|
|
352
|
+
activate: ()=>actionOff ? void 0 : null == action ? void 0 : action.onPress()
|
|
353
|
+
}
|
|
354
|
+
}, actionId ? {
|
|
355
|
+
domId: actionId
|
|
356
|
+
} : {});
|
|
357
|
+
const actionView = action ? <view key="action" className={`g9-numpad__key g9-numpad__key--action${actionOff ? ' g9-numpad__key--off' : ''}`} style={look} {...actionAnchor.props} bindtap={()=>{
|
|
323
358
|
if (actionOff) return;
|
|
324
359
|
g9Haptic('tick');
|
|
325
360
|
action.onPress();
|
package/dist/fields/fields.css
CHANGED
|
@@ -214,5 +214,26 @@
|
|
|
214
214
|
background-color: var(--g9-primary);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
.g9-field__affixes {
|
|
218
|
+
flex: auto;
|
|
219
|
+
align-items: center;
|
|
220
|
+
column-gap: 6px;
|
|
221
|
+
min-width: 0;
|
|
222
|
+
display: flex;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.g9-field__affixed {
|
|
226
|
+
flex: auto;
|
|
227
|
+
min-width: 0;
|
|
228
|
+
display: flex;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.g9-field__affix {
|
|
232
|
+
font-size: 14px;
|
|
233
|
+
font-family: var(--g9-font-text);
|
|
234
|
+
color: var(--g9-text-secondary);
|
|
235
|
+
flex-shrink: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
217
238
|
|
|
218
239
|
/*# sourceMappingURL=fields.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/fields/fields.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,uBAAuB;EACvB,sBAAsB;EACtB,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,oBAAoB;EACpB,mBAAmB;EACnB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAaA;EAVE,sBAAsB;EACtB,OAAO;EACP,uBAAuB;EACvB,aAAa;AACf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;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;AACf;;AAyBA;EAtBE,sCAAsC;AACxC;;AAyBA;EAtBE,iBAAiB;EACjB,+BAA+B;AACjC;;AAyBA;EAtBE,eAAe;EACf,gCAAgC;EAChC,6BAA6B;AAC/B;;AAyBA;EAtBE,8BAA8B;AAChC;;AAyBA;EAtBE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;AAChC;;AAyBA;EAtBE,eAAe;EACf,gCAAgC;EAChC,mCAAmC;EACnC,iBAAiB;AACnB;;AA0BA;EAvBE,kDAAkD;AACpD;;AA0BA;EAvBE,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;AAClB;;AA0BA;EAvBE,mBAAmB;EACnB,mBAAmB;EACnB,+BAA+B;EAC/B,uBAAuB;AACzB;;AA0BA;EAvBE,+BAA+B;EAC/B,mCAAmC;AACrC","sourcesContent":["/* Outlined fields (MAUI G9OutlinedFieldBase). Colours come from the theme variables; sizes from G9Metrics. */\n.g9-field {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-field__box {\n display: flex;\n flex-direction: column;\n position: relative;\n background-color: transparent;\n}\n\n.g9-field__outline {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-style: solid;\n pointer-events: none;\n}\n\n.g9-field__halo {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-style: solid;\n pointer-events: none;\n}\n\n.g9-field__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex: 1;\n}\n\n.g9-field__input {\n width: 100%;\n height: 100%;\n font-size: 15px;\n font-family: var(--g9-font-text);\n background-color: transparent;\n}\n\n/* The read-only value: a text line centred like the input's. */\n.g9-field__input--readonly {\n height: auto;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* MAUI 1.4.9 RestingPlaceholder: the hint inside an empty box (under an always-floated label, or placeholderInside),\n over the input where its text starts — the input's 15 px in TextTertiary; it never takes a touch. */\n.g9-field__hint {\n position: absolute;\n top: 0px;\n bottom: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n pointer-events: none;\n}\n\n.g9-field__hint--multiline {\n bottom: auto;\n justify-content: flex-start;\n}\n\n.g9-field__hint-text {\n width: 100%;\n font-size: 15px;\n font-family: var(--g9-font-text);\n text-overflow: ellipsis;\n}\n\n.g9-field__textarea {\n width: 100%;\n font-size: 15px;\n font-family: var(--g9-font-text);\n background-color: transparent;\n}\n\n.g9-field__slot {\n display: flex;\n position: absolute;\n align-items: center;\n justify-content: center;\n}\n\n.g9-field__label {\n position: absolute;\n height: 22px;\n line-height: 22px;\n padding-left: 4px;\n padding-right: 4px;\n background-color: transparent;\n transition-property: top, font-size, transform, color;\n transition-duration: 160ms;\n pointer-events: none;\n font-family: var(--g9-font-text);\n}\n\n/* Only a floated label sits on the outline: its notch paints the colour behind the field (a container that is not\n --g9-background sets --g9-field-notch-background; G9 sheets and popups do). At rest it paints nothing. */\n.g9-field__label--floated {\n background-color: var(--g9-field-notch-background, var(--g9-background));\n font-family: var(--g9-font-text);\n}\n\n.g9-field__footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 4px;\n padding-left: 14px;\n padding-right: 14px;\n}\n\n.g9-field__helper {\n flex: 1;\n font-size: 11.5px;\n font-family: var(--g9-font-text);\n}\n\n.g9-field__counter {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-field__busy {\n width: 18px;\n height: 18px;\n border-width: 2px;\n border-style: solid;\n border-radius: 9px;\n animation: g9-field-spin 800ms linear infinite;\n}\n\n@keyframes g9-field-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Disabled dims the field (MAUI DisabledDimAlpha) part by part: an opacity on the box itself renders it into a layer\n the size of the box on Android, which cut the floated label above it in half. The label takes the disabled colour\n instead, so its notch still hides the outline. */\n.g9-field--disabled .g9-field__outline,\n.g9-field--disabled .g9-field__halo,\n.g9-field--disabled .g9-field__content,\n.g9-field--disabled .g9-field__slot,\n.g9-field--disabled .g9-field__footer {\n opacity: 0.45;\n}\n\n/* PIN entry (MAUI G9PinEntry): the row is always left-to-right. */\n.g9-pin {\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n direction: ltr;\n}\n\n.g9-pin__cell {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n border-style: solid;\n border-width: 1.4px;\n border-radius: 10px;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-pin__cell--filled {\n border-color: var(--g9-primary-border);\n}\n\n.g9-pin__cell--active {\n border-width: 2px;\n border-color: var(--g9-primary);\n}\n\n.g9-pin__char {\n font-size: 22px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n}\n\n.g9-pin--disabled .g9-pin__char {\n color: var(--g9-text-disabled);\n}\n\n.g9-pin__placeholder {\n font-size: 22px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-pin__separator {\n font-size: 22px;\n font-family: var(--g9-font-text);\n margin-right: 6px;\n color: var(--g9-on-surface-variant);\n}\n\n/* appearance=\"filled\": a sunken box, no stroke at rest (the focus colour strokes it). */\n.g9-field__outline--filled {\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-pin--dots {\n column-gap: 14px;\n align-items: center;\n justify-content: center;\n}\n\n.g9-pin__dot {\n border-width: 1.5px;\n border-style: solid;\n border-color: var(--g9-outline);\n background-color: transparent;\n}\n\n.g9-pin__dot--filled {\n border-color: var(--g9-primary);\n background-color: var(--g9-primary);\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/fields/fields.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,uBAAuB;EACvB,sBAAsB;EACtB,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,oBAAoB;EACpB,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,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAyBA;EAtBE,mBAAmB;EACnB,mBAAmB;EACnB,uCAAuC;EACvC,mCAAmC;EACnC,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,iBAAiB;EACjB,aAAa;AACf;;AAyBA;EAtBE,sCAAsC;AACxC;;AAyBA;EAtBE,iBAAiB;EACjB,+BAA+B;AACjC;;AAyBA;EAtBE,eAAe;EACf,gCAAgC;EAChC,6BAA6B;AAC/B;;AAyBA;EAtBE,8BAA8B;AAChC;;AAyBA;EAtBE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;AAChC;;AAyBA;EAtBE,eAAe;EACf,gCAAgC;EAChC,mCAAmC;EACnC,iBAAiB;AACnB;;AA0BA;EAvBE,kDAAkD;AACpD;;AA0BA;EAvBE,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;AAClB;;AA0BA;EAvBE,mBAAmB;EACnB,mBAAmB;EACnB,+BAA+B;EAC/B,uBAAuB;AACzB;;AA0BA;EAvBE,+BAA+B;EAC/B,mCAAmC;AACrC;;AA2BA;EAxBE,UAAU;EACV,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,aAAa;AACf;;AA2BA;EAxBE,UAAU;EACV,YAAY;EACZ,aAAa;AACf;;AA2BA;EAxBE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;EAC/B,cAAc;AAChB","sourcesContent":["/* Outlined fields (MAUI G9OutlinedFieldBase). Colours come from the theme variables; sizes from G9Metrics. */\n.g9-field {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-field__box {\n display: flex;\n flex-direction: column;\n position: relative;\n background-color: transparent;\n}\n\n.g9-field__outline {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-style: solid;\n pointer-events: none;\n}\n\n.g9-field__halo {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-style: solid;\n pointer-events: none;\n}\n\n.g9-field__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex: 1;\n}\n\n.g9-field__input {\n width: 100%;\n height: 100%;\n font-size: 15px;\n font-family: var(--g9-font-text);\n background-color: transparent;\n}\n\n/* The read-only value: a text line centred like the input's. */\n.g9-field__input--readonly {\n height: auto;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* MAUI 1.4.9 RestingPlaceholder: the hint inside an empty box (under an always-floated label, or placeholderInside),\n over the input where its text starts — the input's 15 px in TextTertiary; it never takes a touch. */\n.g9-field__hint {\n position: absolute;\n top: 0px;\n bottom: 0px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n pointer-events: none;\n}\n\n.g9-field__hint--multiline {\n bottom: auto;\n justify-content: flex-start;\n}\n\n.g9-field__hint-text {\n width: 100%;\n font-size: 15px;\n font-family: var(--g9-font-text);\n text-overflow: ellipsis;\n}\n\n.g9-field__textarea {\n width: 100%;\n font-size: 15px;\n font-family: var(--g9-font-text);\n background-color: transparent;\n}\n\n.g9-field__slot {\n display: flex;\n position: absolute;\n align-items: center;\n justify-content: center;\n}\n\n.g9-field__label {\n position: absolute;\n height: 22px;\n line-height: 22px;\n padding-left: 4px;\n padding-right: 4px;\n background-color: transparent;\n transition-property: top, font-size, transform, color;\n transition-duration: 160ms;\n pointer-events: none;\n font-family: var(--g9-font-text);\n}\n\n/* Only a floated label sits on the outline: its notch paints the colour behind the field (a container that is not\n --g9-background sets --g9-field-notch-background; G9 sheets and popups do). At rest it paints nothing. */\n.g9-field__label--floated {\n background-color: var(--g9-field-notch-background, var(--g9-background));\n font-family: var(--g9-font-text);\n}\n\n.g9-field__footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 4px;\n padding-left: 14px;\n padding-right: 14px;\n}\n\n.g9-field__helper {\n flex: 1;\n font-size: 11.5px;\n font-family: var(--g9-font-text);\n}\n\n.g9-field__counter {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-field__busy {\n width: 18px;\n height: 18px;\n border-width: 2px;\n border-style: solid;\n border-radius: 9px;\n animation: g9-field-spin 800ms linear infinite;\n}\n\n@keyframes g9-field-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* Disabled dims the field (MAUI DisabledDimAlpha) part by part: an opacity on the box itself renders it into a layer\n the size of the box on Android, which cut the floated label above it in half. The label takes the disabled colour\n instead, so its notch still hides the outline. */\n.g9-field--disabled .g9-field__outline,\n.g9-field--disabled .g9-field__halo,\n.g9-field--disabled .g9-field__content,\n.g9-field--disabled .g9-field__slot,\n.g9-field--disabled .g9-field__footer {\n opacity: 0.45;\n}\n\n/* PIN entry (MAUI G9PinEntry): the row is always left-to-right. */\n.g9-pin {\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n direction: ltr;\n}\n\n.g9-pin__cell {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n border-style: solid;\n border-width: 1.4px;\n border-radius: 10px;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-pin__cell--filled {\n border-color: var(--g9-primary-border);\n}\n\n.g9-pin__cell--active {\n border-width: 2px;\n border-color: var(--g9-primary);\n}\n\n.g9-pin__char {\n font-size: 22px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n}\n\n.g9-pin--disabled .g9-pin__char {\n color: var(--g9-text-disabled);\n}\n\n.g9-pin__placeholder {\n font-size: 22px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-pin__separator {\n font-size: 22px;\n font-family: var(--g9-font-text);\n margin-right: 6px;\n color: var(--g9-on-surface-variant);\n}\n\n/* appearance=\"filled\": a sunken box, no stroke at rest (the focus colour strokes it). */\n.g9-field__outline--filled {\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-pin--dots {\n column-gap: 14px;\n align-items: center;\n justify-content: center;\n}\n\n.g9-pin__dot {\n border-width: 1.5px;\n border-style: solid;\n border-color: var(--g9-outline);\n background-color: transparent;\n}\n\n.g9-pin__dot--filled {\n border-color: var(--g9-primary);\n background-color: var(--g9-primary);\n}\n\n/* A prefix / suffix text beside the value inside the box (2.5.7). */\n.g9-field__affixes {\n display: flex;\n align-items: center;\n column-gap: 6px;\n flex: 1 1 auto;\n min-width: 0px;\n}\n\n.g9-field__affixed {\n display: flex;\n flex: 1 1 auto;\n min-width: 0px;\n}\n\n.g9-field__affix {\n flex-shrink: 0;\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n"],"sourceRoot":""}
|
|
@@ -86,6 +86,15 @@ export interface G9OutlinedFieldProps {
|
|
|
86
86
|
readonly onLeadingPress?: () => void;
|
|
87
87
|
/** Trailing icon tap when no built-in affordance claims it (MAUI `TrailingCommand`). */
|
|
88
88
|
readonly onTrailingPress?: () => void;
|
|
89
|
+
/** What the trailing icon says when it is a button (`onTrailingPress`: a checklist's «+»; G9Hub, 2.5.7). */
|
|
90
|
+
readonly trailingLabel?: string;
|
|
91
|
+
/** What the leading icon says when it is a button. */
|
|
92
|
+
readonly leadingLabel?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The browser's autofill hint on the web (`username`, `current-password`, `new-password`, `one-time-code`; G9Hub,
|
|
95
|
+
* 2.5.7): written on the input element. Native hosts ignore it.
|
|
96
|
+
*/
|
|
97
|
+
readonly autoComplete?: string;
|
|
89
98
|
/**
|
|
90
99
|
* `'outlined'` (default) a stroked box with a notched floating label; `'filled'` a sunken box without a stroke at
|
|
91
100
|
* rest (SAC/ShopManager/G9Hub plain fields), the focus colour as its stroke. `'plain'` (ShopManager's field): no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outlined-field.d.ts","sourceRoot":"","sources":["../../src/fields/outlined-field.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,KAAK,aAAa,EAAa,MAAM,+BAA+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E,yBAAyB,GAAG,SAAS,CAgQ3E"}
|
|
@@ -227,7 +227,10 @@ function G9OutlinedField(props) {
|
|
|
227
227
|
</view>
|
|
228
228
|
{hasLeading ? <view className="g9-field__slot g9-field__slot--leading" style={slotStyle(slot.leadingColumn, G9Metrics.LeadingIconSlotWidth, false)} catchtap={onLeadingTap} {...leadingActionable ? {
|
|
229
229
|
'accessibility-element': true,
|
|
230
|
-
'accessibility-traits': 'button'
|
|
230
|
+
'accessibility-traits': 'button',
|
|
231
|
+
...props.leadingLabel ? {
|
|
232
|
+
'accessibility-label': props.leadingLabel
|
|
233
|
+
} : {}
|
|
231
234
|
} : {}}>
|
|
232
235
|
<G9IconSlot {...leading} color={state.restingContentColor} size={iconSize}/>
|
|
233
236
|
</view> : null}
|
|
@@ -236,6 +239,8 @@ function G9OutlinedField(props) {
|
|
|
236
239
|
'accessibility-traits': 'button',
|
|
237
240
|
...(null == affordance ? void 0 : affordance.label) ? {
|
|
238
241
|
'accessibility-label': affordance.label
|
|
242
|
+
} : props.trailingLabel ? {
|
|
243
|
+
'accessibility-label': props.trailingLabel
|
|
239
244
|
} : {}
|
|
240
245
|
} : {}}>
|
|
241
246
|
{trailingContent}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-entry.d.ts","sourceRoot":"","sources":["../../src/fields/pin-entry.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pin-entry.d.ts","sourceRoot":"","sources":["../../src/fields/pin-entry.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAa,cAAc,EAAoC,MAAM,+BAA+B,CAAC;AAkB5G,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,CAAC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ACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,eAAe,IAAI,IAAI,CAAC;IACxB,yCAAyC;IACzC,KAAK,IAAI,IAAI,CAAC;IACd,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,iHAAiH;AACjH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAU3E;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE9E;AAoCD,oHAAoH;AACpH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAS1E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CASrG;AAgBD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,8GAgOtB,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useG9Anchor } from "../anchor/hooks.jsx";
|
|
2
2
|
import "./fields.css";
|
|
3
|
-
import { G9Metrics, G9PinEntryType, normalizeToAscii } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
+
import { G9Metrics, G9PinEntryType, normalizeToAscii, toNativeDigits } from "@g9tm/lynxcontrols-foundation";
|
|
4
4
|
import { KeyboardAwareTriggerContext } from "@lynx-js/lynx-ui-input";
|
|
5
5
|
import { forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from "@lynx-js/react";
|
|
6
6
|
import { startTimer } from "../base/timers.jsx";
|
|
7
7
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
8
8
|
import { g9KeyboardTargetProps } from "../host/keyboard.jsx";
|
|
9
|
+
import { G9CultureContext } from "../provider/contexts.jsx";
|
|
9
10
|
import { invokeNode, invokeNodeWhenReady } from "./use-text-input.jsx";
|
|
10
11
|
function parsePinGroupSizes(raw) {
|
|
11
12
|
if (null == raw || '' === raw.trim()) return [];
|
|
@@ -151,6 +152,8 @@ const G9PinEntry = forwardRef(function(props, ref) {
|
|
|
151
152
|
const keyboardAware = useContext(KeyboardAwareTriggerContext);
|
|
152
153
|
const type = null != (_props_type = props.type) ? _props_type : G9PinEntryType.Number;
|
|
153
154
|
const dots = 'dots' === props.appearance;
|
|
155
|
+
const culture = useContext(G9CultureContext);
|
|
156
|
+
const digits = (n)=>culture ? toNativeDigits(String(n), culture.culture.numberingSystem) : String(n);
|
|
154
157
|
const groups = dots ? [] : parsePinGroupSizes(props.groupSizes);
|
|
155
158
|
const cells = dots && void 0 !== props.maxLength ? Math.max(1, props.maxLength) : pinCellCount(null != (_props_length = props.length) ? _props_length : 4, groups);
|
|
156
159
|
const keyboard = false !== props.systemKeyboard;
|
|
@@ -226,6 +229,36 @@ const G9PinEntry = forwardRef(function(props, ref) {
|
|
|
226
229
|
return Array.from(latest.current).length === cells;
|
|
227
230
|
}
|
|
228
231
|
}));
|
|
232
|
+
const anchor = useG9Anchor(props.id, {
|
|
233
|
+
kind: 'entry',
|
|
234
|
+
label: ()=>{
|
|
235
|
+
var _props_accessibilityLabel;
|
|
236
|
+
return null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : null;
|
|
237
|
+
},
|
|
238
|
+
enabled: ()=>!props.disabled,
|
|
239
|
+
...type === G9PinEntryType.Password ? {
|
|
240
|
+
secret: true
|
|
241
|
+
} : {},
|
|
242
|
+
capabilities: {
|
|
243
|
+
getValue: ()=>latest.current,
|
|
244
|
+
setValue: (v)=>{
|
|
245
|
+
const next = filterPin(v, type, cells);
|
|
246
|
+
latest.current = next;
|
|
247
|
+
lastSeen.current = next;
|
|
248
|
+
setValue(next);
|
|
249
|
+
if (Array.from(next).length === cells && !completedFired.current) {
|
|
250
|
+
var _props_onComplete;
|
|
251
|
+
completedFired.current = true;
|
|
252
|
+
null == (_props_onComplete = props.onComplete) || _props_onComplete.call(props, next);
|
|
253
|
+
}
|
|
254
|
+
bump((n)=>n + 1);
|
|
255
|
+
return next;
|
|
256
|
+
},
|
|
257
|
+
focus: ()=>focus()
|
|
258
|
+
}
|
|
259
|
+
}, props.id ? {
|
|
260
|
+
domId: props.id
|
|
261
|
+
} : {});
|
|
229
262
|
const autoFocused = useRef(false);
|
|
230
263
|
useEffect(()=>{
|
|
231
264
|
if (props.autoFocus && !autoFocused.current && !props.disabled) {
|
|
@@ -285,7 +318,7 @@ const G9PinEntry = forwardRef(function(props, ref) {
|
|
|
285
318
|
inGroup = 0;
|
|
286
319
|
}
|
|
287
320
|
}
|
|
288
|
-
return <view {...g9KeyboardTargetProps} className={`g9-pin g9-dir-ltr${dots ? ' g9-pin--dots' : ''}${props.disabled ? ' g9-pin--disabled' : ''}${complete ? ' g9-pin--complete' : ''}${props.className ? ` ${props.className}` : ''}`} {...
|
|
321
|
+
return <view {...g9KeyboardTargetProps} className={`g9-pin g9-dir-ltr${dots ? ' g9-pin--dots' : ''}${props.disabled ? ' g9-pin--disabled' : ''}${complete ? ' g9-pin--complete' : ''}${props.className ? ` ${props.className}` : ''}`} {...anchor.props} accessibility-element={true} accessibility-label={`${props.accessibilityLabel ? `${props.accessibilityLabel}, ` : ''}${(null != (_props_progressLabel = props.progressLabel) ? _props_progressLabel : '{0} / {1}').replace('{0}', digits(chars.length)).replace('{1}', digits(cells))}`} bindtap={focus}>
|
|
289
322
|
{row}
|
|
290
323
|
{keyboard ? <input {...g9KeyboardTargetProps} ref={attach} className="g9-pin__input" android-fullscreen-mode={false} ignore-focus={true} confirm-type="done" disabled={true === props.disabled} maxlength={cells} ios-auto-correct={false} ios-spell-check={false} type={type === G9PinEntryType.Number || type === G9PinEntryType.Password ? 'number' : 'text'} style={hiddenInputStyle} bindinput={onInput} bindfocus={()=>{
|
|
291
324
|
var _keyboardAware_onInputFocused;
|
|
@@ -2,6 +2,10 @@ import { type G9TextInputHandle, type G9TextInputProps } from './use-text-input.
|
|
|
2
2
|
import type { G9TextValidator } from './validator.js';
|
|
3
3
|
/** Props of {@link G9TextEntry} (MAUI `G9TextEntry`). */
|
|
4
4
|
export interface G9TextEntryProps extends G9TextInputProps {
|
|
5
|
+
/** A text inside the box before the value at its reading start (a currency sign). */
|
|
6
|
+
readonly prefix?: string;
|
|
7
|
+
/** A text inside the box after the value at its reading end (a unit, «بار»; G9Hub, 2.5.7). */
|
|
8
|
+
readonly suffix?: string;
|
|
5
9
|
/** Eye toggle in the trailing slot while there is a value; pins the trailing icon right. Default false. */
|
|
6
10
|
readonly passwordToggle?: boolean;
|
|
7
11
|
/** Mask the value (until the eye reveals it); the text is pinned LTR. Default false. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-entry.d.ts","sourceRoot":"","sources":["../../src/fields/text-entry.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-entry.d.ts","sourceRoot":"","sources":["../../src/fields/text-entry.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAgB,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,yDAAyD;AACzD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,qFAAqF;IACrF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,2GAA2G;IAC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AAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,yGAqHzB,CAAC;AAIF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,gHAEtB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { G9KeyboardType, G9StringKey } from "@g9tm/lynxcontrols-foundation";
|
|
2
2
|
import { forwardRef, useImperativeHandle } from "@lynx-js/react";
|
|
3
|
-
import {
|
|
3
|
+
import { g9RowStyle } from "../base/control.jsx";
|
|
4
|
+
import { useG9Direction, useG9Settings, useG9Strings } from "../provider/hooks.jsx";
|
|
4
5
|
import { resolveEffectiveKeyboard, resolveInputElementType } from "./input-policy.jsx";
|
|
5
6
|
import { G9OutlinedField, resolveInnerHint } from "./outlined-field.jsx";
|
|
6
7
|
import { useTextInput } from "./use-text-input.jsx";
|
|
@@ -8,7 +9,7 @@ function shouldShowEntryMic(state) {
|
|
|
8
9
|
return state.available && !(state.passwordToggle && state.hasValue) && (state.listening || !state.hasValue);
|
|
9
10
|
}
|
|
10
11
|
const TextEntryBody = forwardRef(function(props, ref) {
|
|
11
|
-
var _props_validator, _props_keyboardType,
|
|
12
|
+
var _props_validator, _props_keyboardType, _ref, _props_variant_confirmType, _core_errorText, _props_variant_restingTone;
|
|
12
13
|
const glyphs = useG9Settings().glyphs;
|
|
13
14
|
const strings = useG9Strings();
|
|
14
15
|
const passwordToggle = true === props.passwordToggle;
|
|
@@ -50,6 +51,30 @@ const TextEntryBody = forwardRef(function(props, ref) {
|
|
|
50
51
|
};
|
|
51
52
|
const masked = true === props.isPassword && !core.passwordVisible;
|
|
52
53
|
const keyboard = resolveEffectiveKeyboard(core.inputType, null != (_props_keyboardType = props.keyboardType) ? _props_keyboardType : G9KeyboardType.Default);
|
|
54
|
+
const dir = useG9Direction();
|
|
55
|
+
const value = true !== props.readOnly || masked ? <input {...core.elementProps} className="g9-field__input" type={resolveInputElementType(core.inputType, keyboard, masked)} confirm-type={null != (_ref = null != (_props_variant_confirmType = props.variant.confirmType) ? _props_variant_confirmType : props.confirmType) ? _ref : 'done'} ios-spell-check={false !== props.isSpellCheckEnabled} ios-auto-correct={false !== props.isTextPredictionEnabled} style={{
|
|
56
|
+
direction: core.textDirection,
|
|
57
|
+
textAlign: 'code' === props.appearance ? 'center' : 'rtl' === core.textDirection ? 'right' : 'left',
|
|
58
|
+
...core.font ? {
|
|
59
|
+
fontFamily: core.font
|
|
60
|
+
} : {},
|
|
61
|
+
...'plain' === props.appearance ? {
|
|
62
|
+
fontSize: '17px'
|
|
63
|
+
} : {},
|
|
64
|
+
...'code' === props.appearance ? {
|
|
65
|
+
fontSize: '22px'
|
|
66
|
+
} : {},
|
|
67
|
+
color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)'
|
|
68
|
+
}}/> : <text className="g9-field__input g9-field__input--readonly" text-maxline="1" style={{
|
|
69
|
+
direction: core.textDirection,
|
|
70
|
+
textAlign: 'rtl' === core.textDirection ? 'right' : 'left',
|
|
71
|
+
...core.font ? {
|
|
72
|
+
fontFamily: core.font
|
|
73
|
+
} : {},
|
|
74
|
+
color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)'
|
|
75
|
+
}}>
|
|
76
|
+
{core.text}
|
|
77
|
+
</text>;
|
|
53
78
|
return <G9OutlinedField anchor={{
|
|
54
79
|
kind: 'entry',
|
|
55
80
|
label: ()=>{
|
|
@@ -71,29 +96,11 @@ const TextEntryBody = forwardRef(function(props, ref) {
|
|
|
71
96
|
}
|
|
72
97
|
}} {...props} hint={resolveInnerHint(props)} hasError={core.hasError} errorText={null != (_core_errorText = core.errorText) ? _core_errorText : null} forceTrailingIconRight={true === props.forceTrailingIconRight || passwordToggle} focused={core.focused} hasValue={core.hasValue} textLength={core.text.length} trailingAffordance={affordance} restingTone={null != (_props_variant_restingTone = props.variant.restingTone) ? _props_variant_restingTone : 'outline'} onFocusRequest={core.focus}>
|
|
73
98
|
{}
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
} : {},
|
|
80
|
-
color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)'
|
|
81
|
-
}}>
|
|
82
|
-
{core.text}
|
|
83
|
-
</text> : <input {...core.elementProps} className="g9-field__input" type={resolveInputElementType(core.inputType, keyboard, masked)} confirm-type={null != (_ref = null != (_props_variant_confirmType = props.variant.confirmType) ? _props_variant_confirmType : props.confirmType) ? _ref : 'done'} ios-spell-check={false !== props.isSpellCheckEnabled} ios-auto-correct={false !== props.isTextPredictionEnabled} style={{
|
|
84
|
-
direction: core.textDirection,
|
|
85
|
-
textAlign: 'code' === props.appearance ? 'center' : 'rtl' === core.textDirection ? 'right' : 'left',
|
|
86
|
-
...core.font ? {
|
|
87
|
-
fontFamily: core.font
|
|
88
|
-
} : {},
|
|
89
|
-
...'plain' === props.appearance ? {
|
|
90
|
-
fontSize: '17px'
|
|
91
|
-
} : {},
|
|
92
|
-
...'code' === props.appearance ? {
|
|
93
|
-
fontSize: '22px'
|
|
94
|
-
} : {},
|
|
95
|
-
color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)'
|
|
96
|
-
}}/>}
|
|
99
|
+
{props.prefix || props.suffix ? <view className="g9-field__affixes" style={g9RowStyle(dir)}>
|
|
100
|
+
{props.prefix ? <text className="g9-field__affix">{props.prefix}</text> : null}
|
|
101
|
+
<view className="g9-field__affixed">{value}</view>
|
|
102
|
+
{props.suffix ? <text className="g9-field__affix">{props.suffix}</text> : null}
|
|
103
|
+
</view> : value}
|
|
97
104
|
</G9OutlinedField>;
|
|
98
105
|
});
|
|
99
106
|
const entryVariant = {
|
|
@@ -140,8 +140,6 @@ export declare function useTextInput(props: G9TextInputProps, options: G9TextInp
|
|
|
140
140
|
inputType: G9InputType;
|
|
141
141
|
/** Element attributes and handlers shared by `<input>` and `<textarea>`. */
|
|
142
142
|
elementProps: {
|
|
143
|
-
'accessibility-element': boolean;
|
|
144
|
-
'accessibility-label': string;
|
|
145
143
|
'ignore-focus': boolean;
|
|
146
144
|
readonly: boolean;
|
|
147
145
|
disabled: boolean;
|
|
@@ -154,6 +152,9 @@ export declare function useTextInput(props: G9TextInputProps, options: G9TextInp
|
|
|
154
152
|
bindconfirm: () => void | undefined;
|
|
155
153
|
'g9-digits': G9NumberingSystem;
|
|
156
154
|
'g9-decimal-separator': string;
|
|
155
|
+
autocomplete?: string;
|
|
156
|
+
'accessibility-element': boolean;
|
|
157
|
+
'accessibility-label': string;
|
|
157
158
|
id?: string;
|
|
158
159
|
ref: (node: NodesRef | null) => void;
|
|
159
160
|
'data-g9keyboard': "target";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-text-input.d.ts","sourceRoot":"","sources":["../../src/fields/use-text-input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,cAAc,EACnB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAW/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,aAAa,CAAC;AAErE,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,cAAc,CAAC;AAElF,kCAAkC;AAClC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC;AAED,mHAAmH;AACnH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,sGAAsG;IACtG,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,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AAK,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IACpG,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C,sEAAsE;IACtE,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IACzC,iDAAiD;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,sBAAsB;;;;;;;;;;;;;;;;IAgPjF,4EAA4E;;;;;;2BAnItD;YAAE,MAAM,CAAC,EAAE,WAAW,CAAA;SAAE;;;;;;;;;;oBAnBnB,QAAQ,GAAG,IAAI;;;;;EA8K7C"}
|
|
@@ -270,6 +270,9 @@ function useTextInput(props, options) {
|
|
|
270
270
|
} : {},
|
|
271
271
|
'accessibility-element': true,
|
|
272
272
|
'accessibility-label': null != (_ref = null != (_ref1 = null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : props.label) ? _ref1 : props.placeholder) ? _ref : '',
|
|
273
|
+
...props.autoComplete ? {
|
|
274
|
+
autocomplete: props.autoComplete
|
|
275
|
+
} : {},
|
|
273
276
|
'ignore-focus': true,
|
|
274
277
|
readonly: true === props.readOnly,
|
|
275
278
|
disabled: true === props.disabled,
|
package/dist/header/app-bar.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface G9AppBarProps extends G9ControlBaseProps {
|
|
|
7
7
|
readonly title?: string;
|
|
8
8
|
/** A line under the title (ShopManager's place line: «تحویل به: …»). */
|
|
9
9
|
readonly subtitle?: string;
|
|
10
|
+
/** An icon before the subtitle at its reading start (the place line's map pin; 2.5.7). */
|
|
11
|
+
readonly subtitleIcon?: G9IconInput;
|
|
10
12
|
/** Shows a back control that calls this (it points the way the page came from in either direction). */
|
|
11
13
|
readonly onBack?: () => void;
|
|
12
14
|
/** Spoken name of the back control. Default the strings table's `back` (in the app's language). */
|
|
@@ -20,6 +22,10 @@ export interface G9AppBarProps extends G9ControlBaseProps {
|
|
|
20
22
|
readonly start?: ReactNode;
|
|
21
23
|
/** Round icon buttons or a menu at the end. */
|
|
22
24
|
readonly actions?: ReactNode;
|
|
25
|
+
/** Space between the actions in dp. Default 2 (G9Hub, 2.5.7). */
|
|
26
|
+
readonly actionsGap?: number;
|
|
27
|
+
/** Lines the bar title may take before «…». Default 1. */
|
|
28
|
+
readonly titleLines?: number;
|
|
23
29
|
/** `'start'` (default) or `'center'` title. */
|
|
24
30
|
readonly align?: 'start' | 'center';
|
|
25
31
|
/** No fill (over a hero image or the page colour). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-bar.d.ts","sourceRoot":"","sources":["../../src/header/app-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,kBAAkB,EAAuC,MAAM,iBAAiB,CAAC;AAE/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"app-bar.d.ts","sourceRoot":"","sources":["../../src/header/app-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,kBAAkB,EAAuC,MAAM,iBAAiB,CAAC;AAE/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD,iCAAiC;AACjC,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IACpC,uGAAuG;IACvG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,mGAAmG;IACnG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAChC,kFAAkF;IAClF,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACpC,sDAAsD;IACtD,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,qDAuHnB,CAAC"}
|
package/dist/header/app-bar.jsx
CHANGED
|
@@ -3,9 +3,11 @@ import { G9Glyph, G9StringKey, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
|
3
3
|
import { memo } from "@lynx-js/react";
|
|
4
4
|
import { g9ChildId, g9RowStyle, useG9Control } from "../base/control.jsx";
|
|
5
5
|
import { G9IconButton } from "../button/icon-button.jsx";
|
|
6
|
+
import { G9Icon } from "../icon/icon.jsx";
|
|
7
|
+
import { G9Slot } from "../provider/direction-scope.jsx";
|
|
6
8
|
import { useG9Direction, useG9SafeInsets, useG9Strings } from "../provider/hooks.jsx";
|
|
7
9
|
const G9AppBar = memo(function(props) {
|
|
8
|
-
var _props_height,
|
|
10
|
+
var _props_height, _props_titleLines, _props_backLabel;
|
|
9
11
|
const control = useG9Control(props, 'g9-app-bar');
|
|
10
12
|
const dir = useG9Direction();
|
|
11
13
|
const strings = useG9Strings();
|
|
@@ -15,16 +17,23 @@ const G9AppBar = memo(function(props) {
|
|
|
15
17
|
const centered = 'center' === props.align;
|
|
16
18
|
const align = centered ? 'center' : 'rtl' === dir ? 'right' : 'left';
|
|
17
19
|
const title = props.title && !props.large ? <view className={`g9-app-bar__titles${centered ? ' g9-app-bar__titles--center' : ''}`}>
|
|
18
|
-
<text className="g9-app-bar__title" text-maxline=
|
|
20
|
+
<text className="g9-app-bar__title" text-maxline={String(null != (_props_titleLines = props.titleLines) ? _props_titleLines : 1)} accessibility-element={true} accessibility-traits="header" accessibility-label={props.title} style={{
|
|
19
21
|
textAlign: align
|
|
20
22
|
}}>
|
|
21
23
|
{props.title}
|
|
22
24
|
</text>
|
|
23
|
-
{props.subtitle ? <
|
|
25
|
+
{props.subtitle ? props.subtitleIcon ? <view className="g9-app-bar__subtitle-row" style={g9RowStyle(dir)}>
|
|
26
|
+
<G9Icon icon={props.subtitleIcon} size={14} color="var(--g9-text-secondary)"/>
|
|
27
|
+
<text className="g9-app-bar__subtitle" text-maxline="1" accessibility-element={true} accessibility-label={props.subtitle} style={{
|
|
24
28
|
textAlign: align
|
|
25
29
|
}}>
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
{props.subtitle}
|
|
31
|
+
</text>
|
|
32
|
+
</view> : <text className="g9-app-bar__subtitle" text-maxline="1" accessibility-element={true} accessibility-label={props.subtitle} style={{
|
|
33
|
+
textAlign: align
|
|
34
|
+
}}>
|
|
35
|
+
{props.subtitle}
|
|
36
|
+
</text> : null}
|
|
28
37
|
</view> : null;
|
|
29
38
|
return <view className={`${control.className}${props.transparent ? ' g9-app-bar--transparent' : ''}`} {...control.idProps} style={control.rootStyle({
|
|
30
39
|
paddingTop: `${top}px`
|
|
@@ -45,11 +54,16 @@ const G9AppBar = memo(function(props) {
|
|
|
45
54
|
g9Haptic('tap');
|
|
46
55
|
null == (_props_onBack = props.onBack) || _props_onBack.call(props);
|
|
47
56
|
}} haptic={false}/> : null}
|
|
48
|
-
{
|
|
57
|
+
{props.start ? <G9Slot>{props.start}</G9Slot> : title}
|
|
49
58
|
{props.start && title ? title : null}
|
|
50
59
|
{!props.start && !title ? <view className="g9-app-bar__spacer"/> : null}
|
|
51
|
-
{props.actions ? <view className="g9-app-bar__actions" style={
|
|
52
|
-
|
|
60
|
+
{props.actions ? <view className="g9-app-bar__actions" style={{
|
|
61
|
+
...g9RowStyle(dir),
|
|
62
|
+
...void 0 !== props.actionsGap ? {
|
|
63
|
+
columnGap: `${props.actionsGap}px`
|
|
64
|
+
} : {}
|
|
65
|
+
}}>
|
|
66
|
+
<G9Slot>{props.actions}</G9Slot>
|
|
53
67
|
</view> : null}
|
|
54
68
|
</view>
|
|
55
69
|
{props.large && props.title ? <view className="g9-app-bar__large-block">
|