@g9tm/lynxcontrols 2.5.5 → 2.5.7
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 +2 -2
- package/catalog/cards/G9Avatar.md +2 -1
- package/catalog/cards/G9CarryContexts.md +10 -0
- package/catalog/cards/G9CheckBox.md +1 -1
- package/catalog/cards/G9ChoiceList.md +1 -1
- package/catalog/cards/G9ConnectionBanner.md +4 -2
- package/catalog/cards/G9FlatTabBar.md +17 -0
- package/catalog/cards/G9FormField.md +2 -2
- package/catalog/cards/G9IconSlot.md +1 -1
- package/catalog/cards/G9ListRow.md +1 -1
- package/catalog/cards/G9RangeSlider.md +2 -2
- package/catalog/cards/G9Stepper.md +1 -1
- package/catalog/cards/G9SwitchRow.md +1 -1
- package/catalog/cards/G9UpdateBar.md +2 -1
- package/catalog/catalog.json +2418 -650
- package/catalog/index.md +5 -3
- package/dist/.tsbuildinfo +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.d.ts +4 -0
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.jsx +8 -2
- package/dist/button/icon-button.d.ts +2 -0
- package/dist/button/icon-button.d.ts.map +1 -1
- package/dist/button/icon-button.jsx +3 -1
- package/dist/display/figures.d.ts +13 -0
- package/dist/display/figures.d.ts.map +1 -1
- package/dist/display/figures.jsx +53 -14
- 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/effects/effects.css +6 -0
- package/dist/effects/effects.css.map +1 -1
- package/dist/effects/effects.d.ts +9 -0
- package/dist/effects/effects.d.ts.map +1 -1
- package/dist/effects/effects.jsx +55 -1
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +3 -0
- package/dist/fields/extra-entries.d.ts +2 -1
- package/dist/fields/extra-entries.d.ts.map +1 -1
- package/dist/fields/extra-entries.jsx +51 -17
- package/dist/fields/fields.css +21 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/outlined-field.d.ts +14 -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 +33 -26
- 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 +13 -1
- package/dist/header/app-bar.d.ts.map +1 -1
- package/dist/header/app-bar.jsx +31 -11
- package/dist/header/header.css +12 -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 +62 -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.css +0 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +15 -10
- package/dist/icon/slot.d.ts +2 -0
- package/dist/icon/slot.d.ts.map +1 -1
- package/dist/icon/slot.jsx +2 -0
- package/dist/layout/containers.d.ts.map +1 -1
- package/dist/layout/containers.jsx +2 -1
- package/dist/layout/layout.css +5 -0
- package/dist/layout/layout.css.map +1 -1
- package/dist/layout/scroll-spy.d.ts.map +1 -1
- package/dist/layout/scroll-spy.jsx +4 -2
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.d.ts.map +1 -1
- package/dist/list/index.jsx +1 -1
- package/dist/list/list.css +28 -0
- 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 +39 -20
- package/dist/list/virtual-list.d.ts +52 -1
- package/dist/list/virtual-list.d.ts.map +1 -1
- package/dist/list/virtual-list.jsx +123 -18
- 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/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/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +23 -10
- package/dist/selection/selection.css +16 -1
- package/dist/selection/selection.css.map +1 -1
- package/dist/shell/shell.css +7 -0
- package/dist/shell/shell.css.map +1 -1
- package/dist/shell/shell.d.ts +24 -3
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/shell.jsx +12 -9
- package/dist/survey/survey.css +71 -0
- package/dist/survey/survey.css.map +1 -1
- package/dist/survey/survey.d.ts +15 -0
- package/dist/survey/survey.d.ts.map +1 -1
- package/dist/survey/survey.jsx +45 -2
- package/dist/tab-bar/flat.d.ts +18 -0
- package/dist/tab-bar/flat.d.ts.map +1 -0
- package/dist/tab-bar/flat.jsx +124 -0
- package/dist/tab-bar/index.d.ts +1 -0
- package/dist/tab-bar/index.d.ts.map +1 -1
- package/dist/tab-bar/index.jsx +1 -0
- package/dist/tab-bar/metrics.d.ts +8 -2
- package/dist/tab-bar/metrics.d.ts.map +1 -1
- package/dist/tab-bar/metrics.jsx +12 -1
- package/dist/tab-bar/tab-bar.css +77 -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 +32 -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/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 +8 -0
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/choice.d.ts +11 -0
- package/dist/toggle/choice.d.ts.map +1 -1
- package/dist/toggle/choice.jsx +25 -14
- package/package.json +2 -2
- package/skills/g9-lynx-app/references/catalog-index.md +3 -3
- package/skills/g9-lynx-app/references/components/barcode.md +3 -3
- package/skills/g9-lynx-app/references/components/charts.md +1 -1
- package/skills/g9-lynx-app/references/components/commerce.md +5 -5
- package/skills/g9-lynx-app/references/components/display-1.md +2 -1
- package/skills/g9-lynx-app/references/components/fields.md +2 -2
- package/skills/g9-lynx-app/references/components/header.md +2 -2
- package/skills/g9-lynx-app/references/components/host.md +11 -0
- package/skills/g9-lynx-app/references/components/icon.md +1 -1
- package/skills/g9-lynx-app/references/components/list.md +2 -2
- package/skills/g9-lynx-app/references/components/map.md +19 -1
- package/skills/g9-lynx-app/references/components/range-slider.md +2 -2
- package/skills/g9-lynx-app/references/components/shell.md +6 -3
- package/skills/g9-lynx-app/references/components/survey.md +1 -1
- package/skills/g9-lynx-app/references/components/tab-bar.md +18 -0
- package/skills/g9-lynx-app/references/components/toggle.md +2 -2
- package/skills/g9-lynx-app/references/provider-and-host.md +8 -0
|
@@ -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";
|
|
@@ -271,19 +273,41 @@ function G9TagEntry(props) {
|
|
|
271
273
|
const G9FormField = memo(function(props) {
|
|
272
274
|
const dir = useG9Direction();
|
|
273
275
|
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
|
-
|
|
276
|
+
{props.label || props.aside ? <view className="g9-form-field__head" style={g9RowStyle(dir)}>
|
|
277
|
+
{props.label ? <text className="g9-form-field__label" style={g9TextStart(dir)}>
|
|
278
|
+
{props.label}
|
|
279
|
+
{props.required ? <text className="g9-form-field__required"> *</text> : null}
|
|
280
|
+
</text> : <view className="g9-form-field__label"/>}
|
|
281
|
+
<G9Slot>{props.aside}</G9Slot>
|
|
282
|
+
</view> : null}
|
|
281
283
|
{props.children}
|
|
282
|
-
{props.error ? <text className="g9-form-field__error" accessibility-element={true} accessibility-label={props.error}>
|
|
284
|
+
{props.error ? <text className="g9-form-field__error" style={g9TextStart(dir)} accessibility-element={true} accessibility-label={props.error}>
|
|
283
285
|
{props.error}
|
|
284
|
-
</text> : props.hint ? <text className="g9-form-field__hint"
|
|
286
|
+
</text> : props.hint ? <text className="g9-form-field__hint" style={g9TextStart(dir)}>
|
|
287
|
+
{props.hint}
|
|
288
|
+
</text> : null}
|
|
285
289
|
</view>;
|
|
286
290
|
});
|
|
291
|
+
function NumKey(p) {
|
|
292
|
+
const press = ()=>{
|
|
293
|
+
if (p.disabled) return;
|
|
294
|
+
g9Haptic('tick');
|
|
295
|
+
p.onKey(p.k);
|
|
296
|
+
};
|
|
297
|
+
const anchor = useG9Anchor(p.id, {
|
|
298
|
+
kind: 'button',
|
|
299
|
+
label: ()=>p.label,
|
|
300
|
+
enabled: ()=>!p.disabled,
|
|
301
|
+
capabilities: {
|
|
302
|
+
activate: press
|
|
303
|
+
}
|
|
304
|
+
}, p.id ? {
|
|
305
|
+
domId: p.id
|
|
306
|
+
} : {});
|
|
307
|
+
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}>
|
|
308
|
+
{p.children}
|
|
309
|
+
</view>;
|
|
310
|
+
}
|
|
287
311
|
const PAD = [
|
|
288
312
|
'1',
|
|
289
313
|
'2',
|
|
@@ -308,18 +332,28 @@ function G9NumPad(props) {
|
|
|
308
332
|
borderRadius: `${radius}px`
|
|
309
333
|
};
|
|
310
334
|
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}>
|
|
335
|
+
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
336
|
{label}
|
|
317
|
-
</
|
|
337
|
+
</NumKey>;
|
|
318
338
|
const text1 = (s)=><text className={`g9-numpad__digit${props.dark ? ' g9-numpad__digit--dark' : ''}`}>{s}</text>;
|
|
319
339
|
const back = key('back', <G9Icon icon="arrowBack" size={22} color={props.dark ? '#FFFFFF' : 'var(--g9-text-primary)'}/>, backLabel);
|
|
320
340
|
const action = props.actionKey;
|
|
321
341
|
const actionOff = true === props.disabled || (null == action ? void 0 : action.disabled) === true || (null == action ? void 0 : action.busy) === true;
|
|
322
|
-
const
|
|
342
|
+
const actionId = action ? g9ChildId(props.id, 'Action') : void 0;
|
|
343
|
+
const actionAnchor = useG9Anchor(actionId, {
|
|
344
|
+
kind: 'button',
|
|
345
|
+
label: ()=>{
|
|
346
|
+
var _ref;
|
|
347
|
+
return null != (_ref = null == action ? void 0 : action.label) ? _ref : null;
|
|
348
|
+
},
|
|
349
|
+
enabled: ()=>!actionOff,
|
|
350
|
+
capabilities: {
|
|
351
|
+
activate: ()=>actionOff ? void 0 : null == action ? void 0 : action.onPress()
|
|
352
|
+
}
|
|
353
|
+
}, actionId ? {
|
|
354
|
+
domId: actionId
|
|
355
|
+
} : {});
|
|
356
|
+
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
357
|
if (actionOff) return;
|
|
324
358
|
g9Haptic('tick');
|
|
325
359
|
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;;AAaA;EAVE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gCAAgC;EAChC,uBAAuB;AACzB;;AAcA;EAXE,uBAAuB;EACvB,YAAY;EACZ,gCAAgC;AAClC;;AAgBA;EAbE,oBAAoB;EACpB,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAgBA;EAbE,2BAA2B;EAC3B,YAAY;AACd;;AAgBA;EAbE,WAAW;EACX,eAAe;EACf,gCAAgC;EAChC,uBAAuB;AACzB;;AAgBA;EAbE,WAAW;EACX,eAAe;EACf,gCAAgC;EAChC,uBAAuB;AACzB;;AAgBA;EAbE,uBAAuB;EACvB,mBAAmB;EACnB,aAA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BAAmB;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,mBAAmB;EACnB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAaA;EAVE,sBAAsB;EACtB,OAAO;EACP,uBAAuB;EACvB,aAAa;AACf;;AAaA;EAVE,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gCAAgC;EAChC,uBAAuB;AACzB;;AAcA;EAXE,uBAAuB;EACvB,YAAY;EACZ,gCAAgC;AAClC;;AAgBA;EAbE,oBAAoB;EACpB,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAgBA;EAbE,2BAA2B;EAC3B,YAAY;AACd;;AAgBA;EAbE,WAAW;EACX,eAAe;EACf,gCAA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,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":""}
|
|
@@ -25,6 +25,11 @@ export interface G9OutlinedFieldProps {
|
|
|
25
25
|
* else the placeholder (a field is named by its label; ShopManager, 2.5.5).
|
|
26
26
|
*/
|
|
27
27
|
readonly accessibilityLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* A secret value that is not a password (an enrol code, a tester code): automation never reads it out and a masked
|
|
30
|
+
* screenshot blacks it out, without passing an `anchor` of your own (ShopManager, 2.5.6). A password field is one.
|
|
31
|
+
*/
|
|
32
|
+
readonly secret?: boolean;
|
|
28
33
|
/** Helper line under the field; replaced by `errorText` while the field has an error. */
|
|
29
34
|
readonly helperText?: string | null;
|
|
30
35
|
/** Error message, shown (in the error colour) while `hasError`. */
|
|
@@ -81,6 +86,15 @@ export interface G9OutlinedFieldProps {
|
|
|
81
86
|
readonly onLeadingPress?: () => void;
|
|
82
87
|
/** Trailing icon tap when no built-in affordance claims it (MAUI `TrailingCommand`). */
|
|
83
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;
|
|
84
98
|
/**
|
|
85
99
|
* `'outlined'` (default) a stroked box with a notched floating label; `'filled'` a sunken box without a stroke at
|
|
86
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+B,CAAC;AACtG,OAAO,E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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,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IA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c,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;IAC3G,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,wFAAwF;IACxF,QAAQ,CAAC,UAAU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B,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: ()=>{
|
|
@@ -57,7 +82,7 @@ const TextEntryBody = forwardRef(function(props, ref) {
|
|
|
57
82
|
return null != (_props_label = props.label) ? _props_label : props.placeholder;
|
|
58
83
|
},
|
|
59
84
|
enabled: ()=>!props.disabled,
|
|
60
|
-
...true === props.isPassword ? {
|
|
85
|
+
...true === props.isPassword || true === props.secret ? {
|
|
61
86
|
secret: true
|
|
62
87
|
} : {},
|
|
63
88
|
capabilities: {
|
|
@@ -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,oB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QAAQ,SAAI,GACX,IAAI,CAGN;AASD,uCAAuC;AACvC,MAAM,WAAW,sBAAsB;IACrC,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,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
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import './header.css';
|
|
2
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
3
3
|
import { type G9ControlBaseProps } from '../base/control.js';
|
|
4
|
+
import type { G9IconInput } from '../icon/icon.js';
|
|
4
5
|
/** Props of {@link G9AppBar}. */
|
|
5
6
|
export interface G9AppBarProps extends G9ControlBaseProps {
|
|
6
7
|
readonly title?: string;
|
|
7
8
|
/** A line under the title (ShopManager's place line: «تحویل به: …»). */
|
|
8
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;
|
|
9
12
|
/** Shows a back control that calls this (it points the way the page came from in either direction). */
|
|
10
13
|
readonly onBack?: () => void;
|
|
11
|
-
/** Spoken name of the back control. Default `'
|
|
14
|
+
/** Spoken name of the back control. Default the strings table's `back` (in the app's language). */
|
|
12
15
|
readonly backLabel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The back control's icon, drawn for left-to-right (a chevron `‹`): mirrored in right-to-left. Default the
|
|
18
|
+
* direction-aware back arrow (ShopManager, 2.5.6).
|
|
19
|
+
*/
|
|
20
|
+
readonly backIcon?: G9IconInput;
|
|
13
21
|
/** Instead of the title: a brand mark (ShopManager BrandMark), a search field. */
|
|
14
22
|
readonly start?: ReactNode;
|
|
15
23
|
/** Round icon buttons or a menu at the end. */
|
|
16
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;
|
|
17
29
|
/** `'start'` (default) or `'center'` title. */
|
|
18
30
|
readonly align?: 'start' | 'center';
|
|
19
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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;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
|
@@ -1,29 +1,39 @@
|
|
|
1
1
|
import "./header.css";
|
|
2
|
-
import { G9Glyph, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
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 {
|
|
6
|
+
import { G9Icon } from "../icon/icon.jsx";
|
|
7
|
+
import { G9Slot } from "../provider/direction-scope.jsx";
|
|
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();
|
|
13
|
+
const strings = useG9Strings();
|
|
11
14
|
const insets = useG9SafeInsets();
|
|
12
15
|
const top = false === props.safeTop ? 0 : insets.top;
|
|
13
16
|
const h = null != (_props_height = props.height) ? _props_height : 56;
|
|
14
17
|
const centered = 'center' === props.align;
|
|
15
18
|
const align = centered ? 'center' : 'rtl' === dir ? 'right' : 'left';
|
|
16
19
|
const title = props.title && !props.large ? <view className={`g9-app-bar__titles${centered ? ' g9-app-bar__titles--center' : ''}`}>
|
|
17
|
-
<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={{
|
|
18
21
|
textAlign: align
|
|
19
22
|
}}>
|
|
20
23
|
{props.title}
|
|
21
24
|
</text>
|
|
22
|
-
{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={{
|
|
23
28
|
textAlign: align
|
|
24
29
|
}}>
|
|
25
|
-
|
|
26
|
-
|
|
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}
|
|
27
37
|
</view> : null;
|
|
28
38
|
return <view className={`${control.className}${props.transparent ? ' g9-app-bar--transparent' : ''}`} {...control.idProps} style={control.rootStyle({
|
|
29
39
|
paddingTop: `${top}px`
|
|
@@ -34,16 +44,26 @@ const G9AppBar = memo(function(props) {
|
|
|
34
44
|
}}>
|
|
35
45
|
{props.onBack ? <G9IconButton {...props.id ? {
|
|
36
46
|
id: g9ChildId(props.id, 'Back')
|
|
37
|
-
} : {}}
|
|
47
|
+
} : {}} {...void 0 !== props.backIcon ? {
|
|
48
|
+
icon: props.backIcon,
|
|
49
|
+
iconMirrorInRtl: true
|
|
50
|
+
} : {
|
|
51
|
+
icon: 'rtl' === dir ? G9Glyph.ArrowForward : G9Glyph.ArrowBack
|
|
52
|
+
}} isGhost buttonSize={40} minimumTouchTarget={44} accessibilityText={null != (_props_backLabel = props.backLabel) ? _props_backLabel : strings.get(G9StringKey.Back)} onPress={()=>{
|
|
38
53
|
var _props_onBack;
|
|
39
54
|
g9Haptic('tap');
|
|
40
55
|
null == (_props_onBack = props.onBack) || _props_onBack.call(props);
|
|
41
56
|
}} haptic={false}/> : null}
|
|
42
|
-
{
|
|
57
|
+
{props.start ? <G9Slot>{props.start}</G9Slot> : title}
|
|
43
58
|
{props.start && title ? title : null}
|
|
44
59
|
{!props.start && !title ? <view className="g9-app-bar__spacer"/> : null}
|
|
45
|
-
{props.actions ? <view className="g9-app-bar__actions" style={
|
|
46
|
-
|
|
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>
|
|
47
67
|
</view> : null}
|
|
48
68
|
</view>
|
|
49
69
|
{props.large && props.title ? <view className="g9-app-bar__large-block">
|