@g9tm/lynxcontrols 2.5.7 → 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/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/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/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/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/G9Tag.md +1 -1
- package/catalog/cards/G9TextEntry.md +1 -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 +6947 -479
- package/catalog/index.md +18 -2
- 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/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/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/theme-preview.css +4 -0
- package/dist/display/theme-preview.css.map +1 -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 +2 -0
- package/dist/fields/extra-entries.d.ts.map +1 -1
- package/dist/fields/extra-entries.jsx +3 -2
- package/dist/header/header.css +2 -0
- package/dist/header/header.css.map +1 -1
- package/dist/host/carry-contexts.d.ts.map +1 -1
- package/dist/host/carry-contexts.jsx +22 -8
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/layout.css +2 -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 +28 -5
- package/dist/list/list.css.map +1 -1
- package/dist/list/rows.d.ts.map +1 -1
- package/dist/list/rows.jsx +3 -3
- 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/provider.d.ts +6 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +22 -2
- 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.css +2 -0
- 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 +12 -1
- package/dist/shell/shell.css.map +1 -1
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/shell.jsx +7 -5
- package/dist/survey/survey.d.ts.map +1 -1
- package/dist/survey/survey.jsx +9 -6
- package/dist/swipe/swipe.css +2 -0
- package/dist/swipe/swipe.css.map +1 -1
- package/dist/tab-bar/flat.jsx +5 -4
- package/dist/tab-bar/tab-bar.css +2 -0
- package/dist/tab-bar/tab-bar.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/choice.css +27 -0
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/choice.d.ts +36 -0
- package/dist/toggle/choice.d.ts.map +1 -1
- package/dist/toggle/choice.jsx +77 -13
- 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 +22 -6
- 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/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 +3 -3
- package/skills/g9-lynx-app/references/components/layout-1.md +1 -1
- package/skills/g9-lynx-app/references/components/list.md +5 -3
- 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/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 +1 -1
- package/skills/g9-lynx-app/references/components/toggle.md +18 -1
- package/skills/g9-lynx-app/references/components/calendar.md +0 -128
- package/skills/g9-lynx-app/references/components/chat.md +0 -98
- package/skills/g9-lynx-app/references/components/media.md +0 -115
package/dist/toast/store.d.ts
CHANGED
|
@@ -32,6 +32,18 @@ export interface G9ToastOptions {
|
|
|
32
32
|
readonly actionText?: string | null;
|
|
33
33
|
/** Runs once when the action button is tapped (through the provider's safe executor). */
|
|
34
34
|
readonly action?: (() => unknown) | null;
|
|
35
|
+
/** A second, smaller line under the message (an error's detail; G9Hub, 2.5.8). */
|
|
36
|
+
readonly detail?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* A spinner in place of the icon, and no auto-dismiss unless `durationMs` says so: a loading toast that its handle's
|
|
39
|
+
* `update` later turns into the result (`toast.promise`).
|
|
40
|
+
*/
|
|
41
|
+
readonly loading?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** What {@link G9ToastHandle.update} changes on a live toast; the rest stays. */
|
|
44
|
+
export interface G9ToastUpdate extends Omit<G9ToastOptions, 'position'> {
|
|
45
|
+
readonly message?: string;
|
|
46
|
+
readonly type?: G9ToastType;
|
|
35
47
|
}
|
|
36
48
|
/** Default toast options (MAUI `G9ToastOptions.Default`). */
|
|
37
49
|
export declare const g9DefaultToastOptions: Readonly<Required<Pick<G9ToastOptions, 'durationMs'>>>;
|
|
@@ -54,6 +66,10 @@ export interface G9ToastEntry {
|
|
|
54
66
|
readonly icon: G9IconInput;
|
|
55
67
|
readonly actionText: string | null;
|
|
56
68
|
readonly hasAction: boolean;
|
|
69
|
+
/** The second line, or null. */
|
|
70
|
+
readonly detail: string | null;
|
|
71
|
+
/** Working: a spinner instead of the icon. */
|
|
72
|
+
readonly loading: boolean;
|
|
57
73
|
readonly status: 'entering' | 'shown' | 'leaving';
|
|
58
74
|
/** Bumped when an identical toast collapsed into this one (its lifetime restarted). */
|
|
59
75
|
readonly refreshes: number;
|
|
@@ -98,6 +114,11 @@ export interface G9LoadingLease {
|
|
|
98
114
|
export interface G9ToastHandle {
|
|
99
115
|
readonly id: number;
|
|
100
116
|
dismiss(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Changes the toast in place — message, type, detail, icon, action, loading, duration (its countdown restarts with the
|
|
119
|
+
* new `durationMs`, or with the type's default when a loading toast becomes a result). Nothing after it left.
|
|
120
|
+
*/
|
|
121
|
+
update(patch: G9ToastUpdate): void;
|
|
101
122
|
/** Settles when the toast left the screen. */
|
|
102
123
|
readonly closed: Promise<void>;
|
|
103
124
|
}
|
|
@@ -162,6 +183,7 @@ export declare class G9ToastStore {
|
|
|
162
183
|
/** The host unmounted. */
|
|
163
184
|
dispose(): void;
|
|
164
185
|
private handle;
|
|
186
|
+
private update;
|
|
165
187
|
private arm;
|
|
166
188
|
private leave;
|
|
167
189
|
private hold;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/toast/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhD,uCAAuC;AACvC,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE,6CAA6C;AAC7C,eAAO,MAAM,eAAe;;;;;;;;;;CAUlB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF,oDAAoD;AACpD,MAAM,WAAW,cAAc;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC3C,qDAAqD;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,yFAAyF;IACzF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/toast/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhD,uCAAuC;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IAKP,2GAA2G;IAC3G,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAW7F,eAAe,IAAI,IAAI;IAMvB,sHAAsH;IACtH,mBAAmB,CAAC,OAAO,UAAO,GAAG,IAAI;IAMzC,oGAAoG;IACpG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAM5D,sFAAsF;IACtF,UAAU,IAAI,IAAI;IASlB,0BAA0B;IAC1B,OAAO,IAAI,IAAI;IAaf,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,MAAM;IA4Bd,OAAO,CAAC,GAAG;IAWX,OAAO,CAAC,KAAK;IAab,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,KAAK;IAYb,OAAO,CAAC,IAAI;CAIb;AAMD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,OAAO,GAAG,eAAe,CAEhH"}
|
package/dist/toast/store.jsx
CHANGED
|
@@ -47,13 +47,13 @@ class G9ToastStore {
|
|
|
47
47
|
return ()=>this.listeners.delete(listener);
|
|
48
48
|
}
|
|
49
49
|
show(message, type = 'information', options = {}) {
|
|
50
|
-
var _options_position, _options_durationMs;
|
|
50
|
+
var _options_position, _options_durationMs, _options_detail;
|
|
51
51
|
const position = null != (_options_position = options.position) ? _options_position : this.config.defaultPosition();
|
|
52
52
|
const hasAction = !!options.actionText && !!options.action;
|
|
53
|
-
const duration = null != (_options_durationMs = options.durationMs) ? _options_durationMs : g9DefaultToastOptions.durationMs;
|
|
53
|
+
const duration = null != (_options_durationMs = options.durationMs) ? _options_durationMs : options.loading ? 0 : g9DefaultToastOptions.durationMs;
|
|
54
54
|
const stack = this.records.filter((r)=>r.entry.position === position && 'leaving' !== r.entry.status);
|
|
55
55
|
const newest = stack[stack.length - 1];
|
|
56
|
-
if (!this.disposed && newest && !hasAction && isPlain(newest) && newest.entry.message === message && newest.entry.type === type) {
|
|
56
|
+
if (!this.disposed && newest && !hasAction && !options.loading && !options.detail && isPlain(newest) && newest.entry.message === message && newest.entry.type === type) {
|
|
57
57
|
newest.entry = {
|
|
58
58
|
...newest.entry,
|
|
59
59
|
refreshes: newest.entry.refreshes + 1,
|
|
@@ -75,6 +75,8 @@ class G9ToastStore {
|
|
|
75
75
|
icon: options.icon,
|
|
76
76
|
actionText: hasAction ? options.actionText : null,
|
|
77
77
|
hasAction,
|
|
78
|
+
detail: null != (_options_detail = options.detail) ? _options_detail : null,
|
|
79
|
+
loading: true === options.loading,
|
|
78
80
|
status: 'entering',
|
|
79
81
|
refreshes: 0,
|
|
80
82
|
durationMs: duration
|
|
@@ -90,6 +92,7 @@ class G9ToastStore {
|
|
|
90
92
|
return {
|
|
91
93
|
id: record.entry.id,
|
|
92
94
|
dismiss: ()=>{},
|
|
95
|
+
update: ()=>{},
|
|
93
96
|
closed: done
|
|
94
97
|
};
|
|
95
98
|
}
|
|
@@ -228,11 +231,40 @@ class G9ToastStore {
|
|
|
228
231
|
return {
|
|
229
232
|
id: record.entry.id,
|
|
230
233
|
dismiss: ()=>this.leave(record),
|
|
234
|
+
update: (patch)=>this.update(record, patch),
|
|
231
235
|
closed: Promise.resolve()
|
|
232
236
|
};
|
|
233
237
|
}
|
|
238
|
+
update(record, patch) {
|
|
239
|
+
var _patch_loading, _patch_durationMs, _patch_message, _patch_type, _patch_detail;
|
|
240
|
+
if ('leaving' === record.entry.status || !this.records.includes(record)) return;
|
|
241
|
+
const loading = null != (_patch_loading = patch.loading) ? _patch_loading : void 0 !== patch.type ? false : record.entry.loading;
|
|
242
|
+
const duration = null != (_patch_durationMs = patch.durationMs) ? _patch_durationMs : record.entry.loading && !loading ? g9DefaultToastOptions.durationMs : record.durationMs;
|
|
243
|
+
const actionText = void 0 !== patch.actionText ? patch.actionText : record.entry.actionText;
|
|
244
|
+
const action = void 0 !== patch.action ? patch.action : record.action;
|
|
245
|
+
const hasAction = !!actionText && !!action;
|
|
246
|
+
record.entry = {
|
|
247
|
+
...record.entry,
|
|
248
|
+
message: null != (_patch_message = patch.message) ? _patch_message : record.entry.message,
|
|
249
|
+
type: null != (_patch_type = patch.type) ? _patch_type : record.entry.type,
|
|
250
|
+
icon: void 0 !== patch.icon ? patch.icon : record.entry.icon,
|
|
251
|
+
detail: void 0 !== patch.detail ? null != (_patch_detail = patch.detail) ? _patch_detail : null : record.entry.detail,
|
|
252
|
+
loading,
|
|
253
|
+
actionText: hasAction ? actionText : null,
|
|
254
|
+
hasAction,
|
|
255
|
+
refreshes: record.entry.refreshes + 1,
|
|
256
|
+
durationMs: duration
|
|
257
|
+
};
|
|
258
|
+
record.action = hasAction ? action : null;
|
|
259
|
+
record.actionRan = false;
|
|
260
|
+
record.durationMs = duration;
|
|
261
|
+
this.arm(record);
|
|
262
|
+
this.emit();
|
|
263
|
+
}
|
|
234
264
|
arm(record) {
|
|
235
265
|
if (null !== record.timer) this.config.clearTimer(record.timer);
|
|
266
|
+
record.timer = null;
|
|
267
|
+
if (record.durationMs <= 0) return;
|
|
236
268
|
record.timer = this.config.setTimer(()=>{
|
|
237
269
|
record.timer = null;
|
|
238
270
|
this.leave(record);
|
package/dist/toast/toast.css
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
border-width: 1px;
|
|
32
32
|
border-color: var(--g9-outline-variant);
|
|
33
33
|
background-color: var(--g9-surface);
|
|
34
|
+
pointer-events: auto;
|
|
34
35
|
border-radius: 10px;
|
|
35
36
|
flex-direction: row;
|
|
36
37
|
align-items: center;
|
|
@@ -133,6 +134,7 @@
|
|
|
133
134
|
|
|
134
135
|
.g9-loader__scrim {
|
|
135
136
|
background-color: var(--g9-scrim);
|
|
137
|
+
pointer-events: auto;
|
|
136
138
|
position: absolute;
|
|
137
139
|
top: 0;
|
|
138
140
|
bottom: 0;
|
|
@@ -160,5 +162,25 @@
|
|
|
160
162
|
margin-top: 12px;
|
|
161
163
|
}
|
|
162
164
|
|
|
165
|
+
.g9-toast__texts {
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
flex-shrink: 1;
|
|
168
|
+
min-width: 0;
|
|
169
|
+
margin-left: 10px;
|
|
170
|
+
margin-right: 10px;
|
|
171
|
+
display: flex;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.g9-toast__message--stacked {
|
|
175
|
+
margin-left: 0;
|
|
176
|
+
margin-right: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.g9-toast__detail {
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
font-family: var(--g9-font-text);
|
|
182
|
+
opacity: .8;
|
|
183
|
+
}
|
|
184
|
+
|
|
163
185
|
|
|
164
186
|
/*# sourceMappingURL=toast.css.map */
|
package/dist/toast/toast.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/toast/toast.css"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,sBAAsB;EACtB,2BAA2B;EAC3B,oBAAoB;EACpB,aAAa;EACb,eAAe;AACjB;;AAMA;EAHE,8BAA8B;AAChC;;AAMA;EAHE,uBAAuB;AACzB;;AAQA;EALE,kBAAkB;AACpB;;AASA;EANE,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;
|
|
1
|
+
{"version":3,"sources":["webpack://./src/toast/toast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AuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAWA;EARE,iCAAiC;EACjC,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAYA;EATE,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,2CAA2C;EAC3C,mBAAmB;EACnB,sBAAsB;EACtB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;AACf;;AAYA;EATE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,mCAAmC;EACnC,gBAAgB;AAClB;;AAaA;EAVE,sBAAsB;EACtB,cAAc;EACd,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;EAClB,aAAa;AACf;;AAaA;EAVE,cAAc;EACd,eAAe;AACjB;;AAaA;EAVE,eAAe;EACf,gCAAgC;EAChC,WAAW;AACb","sourcesContent":[".g9-toast-layer {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n}\n\n/* Fixed (like .g9-popup): a stack exists only while it holds toasts, so it is created after any open sheet — lynx-ui's\n `position: fixed` SheetView — and lands above it instead of under it. Every stack spans the width between the edge\n margins and its toasts FILL it (MAUI ApplyInlineG9ToastPosition: HorizontalOptions = Fill; the position only picks\n top / middle / bottom). The compact loading toast stays centred (MAUI: Center). */\n.g9-toast-stack {\n position: fixed;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n}\n\n.g9-toast-stack--bottom {\n flex-direction: column-reverse;\n}\n\n.g9-toast-stack--middleLeft,\n.g9-toast-stack--middleCenter,\n.g9-toast-stack--middleRight {\n justify-content: center;\n}\n\n.g9-toast--loading {\n align-self: center;\n}\n\n/* MAUI G9ToastHelper.BuildInlineToastView: radius 10, padding 14 / 12, filled with the type's colour (inline style). */\n.g9-toast {\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 48px;\n padding: 12px 14px;\n margin-top: 4px;\n margin-bottom: 4px;\n border-radius: 10px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n overflow: hidden;\n position: relative;\n /* an interactive surface in a pass-through layer (a browser inherits `none`; G9Hub, 2.5.8) */\n pointer-events: auto;\n}\n\n.g9-toast__message {\n flex-shrink: 1;\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-on-surface);\n margin-left: 10px;\n margin-right: 10px;\n}\n\n.g9-toast__detail {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n margin-left: 10px;\n margin-right: 10px;\n}\n\n/* The lifetime countdown (MAUI's fill layer): grows from the reading start, behind the content. */\n.g9-toast__countdown {\n position: absolute;\n top: 0px;\n bottom: 0px;\n left: 0px;\n right: 0px;\n border-radius: 10px;\n}\n\n.g9-toast__action {\n border-radius: 6px;\n margin-left: 10px;\n margin-right: 10px;\n height: 32px;\n padding-left: 8px;\n padding-right: 8px;\n display: flex;\n align-items: center;\n}\n\n.g9-toast__action-text {\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n}\n\n.g9-toast--progress {\n min-width: 240px;\n}\n\n.g9-toast__fill {\n position: absolute;\n top: 0px;\n bottom: 0px;\n left: 0px;\n right: 0px;\n background-color: var(--g9-primary);\n opacity: 0.34;\n transition: transform 250ms;\n}\n\n.g9-toast__progress-text {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.g9-toast__pill {\n padding: 2px 8px;\n border-radius: 10px;\n background-color: var(--g9-primary-container);\n}\n\n.g9-toast__pill-text {\n font-size: 12px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n\n.g9-loader {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-loader__scrim {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: var(--g9-scrim);\n /* an interactive surface in a pass-through layer (a browser inherits `none`; G9Hub, 2.5.8) */\n pointer-events: auto;\n}\n\n.g9-loader__card {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 20px 24px;\n border-radius: 14px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-inverse-surface);\n}\n\n.g9-loader__text {\n margin-top: 12px;\n font-size: 14px;\n font-family: var(--g9-font-text);\n text-align: center;\n color: var(--g9-inverse-on-surface);\n}\n\n/* A toast's message over its detail (2.5.8). */\n.g9-toast__texts {\n display: flex;\n flex-direction: column;\n flex-shrink: 1;\n min-width: 0px;\n margin-left: 10px;\n margin-right: 10px;\n}\n\n.g9-toast__message--stacked {\n margin-left: 0px;\n margin-right: 0px;\n}\n\n.g9-toast__detail {\n font-size: 12px;\n font-family: var(--g9-font-text);\n opacity: 0.8;\n}\n"],"sourceRoot":""}
|
package/dist/toggle/choice.css
CHANGED
|
@@ -282,5 +282,32 @@
|
|
|
282
282
|
display: flex;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
.g9-chip2__count {
|
|
286
|
+
border-radius: 9px;
|
|
287
|
+
justify-content: center;
|
|
288
|
+
align-items: center;
|
|
289
|
+
min-width: 18px;
|
|
290
|
+
height: 18px;
|
|
291
|
+
padding: 0 5px;
|
|
292
|
+
display: flex;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.g9-chip2__count-text {
|
|
296
|
+
font-size: 11px;
|
|
297
|
+
font-weight: 700;
|
|
298
|
+
font-family: var(--g9-font-text-700);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.g9-chip-strip {
|
|
302
|
+
width: 100%;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.g9-chip-strip__row {
|
|
306
|
+
align-items: center;
|
|
307
|
+
column-gap: 8px;
|
|
308
|
+
padding: 4px 16px;
|
|
309
|
+
display: flex;
|
|
310
|
+
}
|
|
311
|
+
|
|
285
312
|
|
|
286
313
|
/*# sourceMappingURL=choice.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/toggle/choice.css"],"names":[],"mappings":"AACA;EAAE,mBAAmB;EACnB,iBAAiB;EACjB,cAAc;EACd,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAGA;EAAE,oBAAoB;AACtB;;AAGA;EAAE,mBAAmB;EACnB,gBAAgB;EAChB,oCAAoC;AACtC;;AAGA;EAAE,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,kDAAkD;EAClD,oBAAoB;EACpB,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAGA;EAAE,0BAA0B;EAC1B,wBAAwB;EACxB,sCAAsC;EACtC,uBAAuB;EACvB,UAAU;AACZ;;AAGA;EAAE,oDAAoD;EACpD,kBAAkB;EAClB,QAAQ;EACR,WAAW;AACb;;AAGA;EAAE,mCAAmC;EACnC,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;AACzC;;AAGA;EAAE,mCAAmC;AACrC;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAGA;EAAE,UAAU;AACZ;;AAGA;EAAE,8BAA8B;AAChC;;AAKA;EAFE,YAAY;AACd;;AAKA;EAFE,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,eAAe;EACf,aAAa;AACf;;AAKA;EAFE,eAAe;EACf,oCAAoC;EACpC,mBAAmB;EACnB,uBAAuB;EACvB,cAAc;EACd,YAAY;EACZ,gBAAgB;EAChB,gBAAgB;AAClB;;AAMA;EAHE,gBAAgB;EAChB,oCAAoC;AACtC;;AAMA;EAHE,eAAe;EACf,gCAAgC;EAChC,WAAW;EACX,uBAAuB;EACvB,eAAe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AAY;AACd;;AAOA;EAJE,6CAA6C;AAC/C;;AAOA;EAJE,mCAAmC;AACrC;;AAOA;EAJE,eAAe;EACf,oCAAoC;EACpC,qCAAqC;EACrC,gBAAgB;AAClB;;AAOA;EAJE,kBAAkB;EAClB,eAAe;EACf,eAAe;EACf,oCAAoC;EACpC,6BAA6B;EAC7B,gBAAgB;AAClB;;AAOA;EAJE,mBAAmB;EACnB,aAAa;AACf;;AAOA;EAJE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf","sourcesContent":["/* G9Chip, G9Segmented, G9RadioGroup, G9Stepper, G9RatingInput. */\n.g9-chip2 {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n border-style: solid;\n border-width: 1px;\n column-gap: 5px;\n}\n\n.g9-chip2--dashed {\n border-style: dashed;\n}\n\n.g9-chip2__text {\n font-weight: 600;\n white-space: nowrap;\n font-family: var(--g9-font-text-600);\n}\n\n.g9-chip2__remove {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: 11px;\n}\n\n.g9-seg {\n display: flex;\n position: relative;\n align-items: stretch;\n padding: 3px;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-seg--underline {\n padding: 0px;\n background-color: transparent;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--g9-divider);\n}\n\n.g9-seg__indicator {\n position: absolute;\n top: 3px;\n bottom: 3px;\n transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-seg__indicator--lift {\n background-color: var(--g9-surface);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n}\n\n.g9-seg__indicator--filled {\n background-color: var(--g9-primary);\n}\n\n.g9-seg__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n min-width: 0px;\n padding: 0px 8px;\n}\n\n.g9-seg__item--content {\n flex: 1 1 auto;\n}\n\n.g9-seg__item--underline {\n border-bottom-width: 2px;\n border-bottom-style: solid;\n border-bottom-color: transparent;\n}\n\n.g9-seg__item--disabled {\n opacity: 0.38;\n}\n\n.g9-seg__line {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 5px;\n max-width: 100%;\n min-width: 0px;\n}\n\n.g9-seg__label {\n font-size: 14px;\n font-family: var(--g9-font-text-500);\n font-weight: 500;\n white-space: nowrap;\n /* a label longer than its segment ends in «…» instead of spilling into the next (G9Hub, 2.5.7) */\n flex-shrink: 1;\n min-width: 0px;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.g9-seg__label--on {\n font-weight: 700;\n font-family: var(--g9-font-text-700);\n}\n\n.g9-seg__sub {\n font-size: 11px;\n font-family: var(--g9-font-text);\n opacity: 0.8;\n max-width: 100%;\n text-overflow: ellipsis;\n}\n\n.g9-seg__count {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0px 5px;\n border-radius: 9px;\n}\n\n.g9-seg__count-text {\n font-size: 11px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n}\n\n.g9-radio-group {\n display: flex;\n flex-direction: column;\n}\n\n.g9-radio {\n display: flex;\n align-items: center;\n min-height: 48px;\n column-gap: 12px;\n padding: 6px 0px;\n}\n\n.g9-radio--card {\n padding: 12px 14px;\n border-radius: var(--g9-radius-card);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-radio--card-on {\n border-width: 2px;\n border-color: var(--g9-primary);\n background-color: var(--g9-primary-container);\n}\n\n.g9-radio--disabled {\n opacity: 0.38;\n}\n\n.g9-radio__mark {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: 11px;\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-outline);\n flex-shrink: 0;\n}\n\n.g9-radio__mark--on {\n border-color: var(--g9-primary);\n}\n\n.g9-radio__dot {\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: var(--g9-primary);\n}\n\n.g9-radio__body {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-radio__label {\n font-size: 15px;\n font-family: var(--g9-font-text);\n line-height: 24px;\n color: var(--g9-text-primary);\n}\n\n.g9-radio__desc {\n font-size: 12px;\n font-family: var(--g9-font-text);\n line-height: 20px;\n color: var(--g9-text-secondary);\n}\n\n.g9-stepper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n align-self: flex-start;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-stepper--block {\n align-self: stretch;\n}\n\n.g9-stepper--add {\n display: flex;\n flex-direction: row;\n justify-content: center;\n padding: 0px 14px;\n column-gap: 6px;\n background-color: var(--g9-primary);\n}\n\n.g9-stepper__add-text {\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary);\n}\n\n.g9-stepper__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-stepper__btn--off {\n opacity: 0.35;\n}\n\n/* the tray look (appearance 'tray'): the pill in the primary container, round surface buttons inside, a bold count */\n.g9-stepper--tray {\n background-color: var(--g9-primary-container);\n}\n\n.g9-stepper__btn--tray {\n background-color: var(--g9-surface);\n}\n\n.g9-stepper__value--tray {\n font-size: 17px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n\n.g9-stepper__value {\n min-width: 28px;\n text-align: center;\n font-size: 15px;\n font-family: var(--g9-font-text-800);\n font-weight: 800;\n color: var(--g9-text-primary);\n}\n\n.g9-rating {\n display: flex;\n align-items: center;\n}\n\n.g9-rating__star {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/toggle/choice.css"],"names":[],"mappings":"AACA;EAAE,mBAAmB;EACnB,iBAAiB;EACjB,cAAc;EACd,sBAAsB;EACtB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAGA;EAAE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;EACnB,aAAa;AACf;;AAOA;EAJE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AAQA;EALE,kBAAkB;EAClB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AAQA;EALE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;AACtC;;AASA;EANE,WAAW;AACb;;AASA;EANE,mBAAmB;EACnB,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf","sourcesContent":["/* G9Chip, G9Segmented, G9RadioGroup, G9Stepper, G9RatingInput. */\n.g9-chip2 {\n display: flex;\n align-items: center;\n align-self: flex-start;\n flex-shrink: 0;\n border-style: solid;\n border-width: 1px;\n column-gap: 5px;\n}\n\n.g9-chip2--dashed {\n border-style: dashed;\n}\n\n.g9-chip2__text {\n font-weight: 600;\n white-space: nowrap;\n font-family: var(--g9-font-text-600);\n}\n\n.g9-chip2__remove {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: 11px;\n}\n\n.g9-seg {\n display: flex;\n position: relative;\n align-items: stretch;\n padding: 3px;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-seg--underline {\n padding: 0px;\n background-color: transparent;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--g9-divider);\n}\n\n.g9-seg__indicator {\n position: absolute;\n top: 3px;\n bottom: 3px;\n transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-seg__indicator--lift {\n background-color: var(--g9-surface);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n}\n\n.g9-seg__indicator--filled {\n background-color: var(--g9-primary);\n}\n\n.g9-seg__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n min-width: 0px;\n padding: 0px 8px;\n}\n\n.g9-seg__item--content {\n flex: 1 1 auto;\n}\n\n.g9-seg__item--underline {\n border-bottom-width: 2px;\n border-bottom-style: solid;\n border-bottom-color: transparent;\n}\n\n.g9-seg__item--disabled {\n opacity: 0.38;\n}\n\n.g9-seg__line {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 5px;\n max-width: 100%;\n min-width: 0px;\n}\n\n.g9-seg__label {\n font-size: 14px;\n font-family: var(--g9-font-text-500);\n font-weight: 500;\n white-space: nowrap;\n /* a label longer than its segment ends in «…» instead of spilling into the next (G9Hub, 2.5.7) */\n flex-shrink: 1;\n min-width: 0px;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.g9-seg__label--on {\n font-weight: 700;\n font-family: var(--g9-font-text-700);\n}\n\n.g9-seg__sub {\n font-size: 11px;\n font-family: var(--g9-font-text);\n opacity: 0.8;\n max-width: 100%;\n text-overflow: ellipsis;\n}\n\n.g9-seg__count {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0px 5px;\n border-radius: 9px;\n}\n\n.g9-seg__count-text {\n font-size: 11px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n}\n\n.g9-radio-group {\n display: flex;\n flex-direction: column;\n}\n\n.g9-radio {\n display: flex;\n align-items: center;\n min-height: 48px;\n column-gap: 12px;\n padding: 6px 0px;\n}\n\n.g9-radio--card {\n padding: 12px 14px;\n border-radius: var(--g9-radius-card);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-radio--card-on {\n border-width: 2px;\n border-color: var(--g9-primary);\n background-color: var(--g9-primary-container);\n}\n\n.g9-radio--disabled {\n opacity: 0.38;\n}\n\n.g9-radio__mark {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: 11px;\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-outline);\n flex-shrink: 0;\n}\n\n.g9-radio__mark--on {\n border-color: var(--g9-primary);\n}\n\n.g9-radio__dot {\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: var(--g9-primary);\n}\n\n.g9-radio__body {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-radio__label {\n font-size: 15px;\n font-family: var(--g9-font-text);\n line-height: 24px;\n color: var(--g9-text-primary);\n}\n\n.g9-radio__desc {\n font-size: 12px;\n font-family: var(--g9-font-text);\n line-height: 20px;\n color: var(--g9-text-secondary);\n}\n\n.g9-stepper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n align-self: flex-start;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-stepper--block {\n align-self: stretch;\n}\n\n.g9-stepper--add {\n display: flex;\n flex-direction: row;\n justify-content: center;\n padding: 0px 14px;\n column-gap: 6px;\n background-color: var(--g9-primary);\n}\n\n.g9-stepper__add-text {\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary);\n}\n\n.g9-stepper__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-stepper__btn--off {\n opacity: 0.35;\n}\n\n/* the tray look (appearance 'tray'): the pill in the primary container, round surface buttons inside, a bold count */\n.g9-stepper--tray {\n background-color: var(--g9-primary-container);\n}\n\n.g9-stepper__btn--tray {\n background-color: var(--g9-surface);\n}\n\n.g9-stepper__value--tray {\n font-size: 17px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n\n.g9-stepper__value {\n min-width: 28px;\n text-align: center;\n font-size: 15px;\n font-family: var(--g9-font-text-800);\n font-weight: 800;\n color: var(--g9-text-primary);\n}\n\n.g9-rating {\n display: flex;\n align-items: center;\n}\n\n.g9-rating__star {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* A chip's count (2.5.8). */\n.g9-chip2__count {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0px 5px;\n border-radius: 9px;\n}\n\n.g9-chip2__count-text {\n font-size: 11px;\n font-weight: 700;\n font-family: var(--g9-font-text-700);\n}\n\n/* G9ChipStrip: one scrolling line (2.5.8). */\n.g9-chip-strip {\n width: 100%;\n}\n\n.g9-chip-strip__row {\n display: flex;\n align-items: center;\n column-gap: 8px;\n padding: 4px 16px;\n}\n"],"sourceRoot":""}
|
package/dist/toggle/choice.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type G9HapticKind } from '@g9tm/lynxcontrols-foundation';
|
|
|
3
3
|
import { type ReactNode } from '@lynx-js/react';
|
|
4
4
|
import { type G9ControlBaseProps } from '../base/control.js';
|
|
5
5
|
import { type G9Tone } from '../base/tone.js';
|
|
6
|
+
import { type G9NodeRef } from '../fields/use-text-input.js';
|
|
6
7
|
import { type G9IconInput } from '../icon/icon.js';
|
|
7
8
|
/** Props of {@link G9Chip}. */
|
|
8
9
|
export interface G9ChipProps extends G9ControlBaseProps {
|
|
@@ -20,9 +21,44 @@ export interface G9ChipProps extends G9ControlBaseProps {
|
|
|
20
21
|
/** Shows an ✕ that calls this (a tag that can be removed). */
|
|
21
22
|
readonly onRemove?: () => void;
|
|
22
23
|
readonly haptic?: G9HapticKind | false;
|
|
24
|
+
/** A count inside the chip after its label (unread in a folder; G9Hub, 2.5.8): culture digits, 99+ past 99, none at 0. */
|
|
25
|
+
readonly count?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Anything at the chip's start instead of the icon: a person's avatar in a picked-people chip (G9PersonPicker). Sized
|
|
28
|
+
* by the app; keep it within the chip's height.
|
|
29
|
+
*/
|
|
30
|
+
readonly leading?: ReactNode;
|
|
31
|
+
/** The chip's node, to scroll it into view (G9ChipStrip does). */
|
|
32
|
+
readonly nodeRef?: (node: G9NodeRef | null) => void;
|
|
23
33
|
}
|
|
24
34
|
/** One chip (SAC Chip, G9Hub Chip, ShopManager chip): a filter, a choice, a removable tag. Never wraps its label. */
|
|
25
35
|
export declare const G9Chip: import("react").NamedExoticComponent<G9ChipProps>;
|
|
36
|
+
/** One chip of a {@link G9ChipStrip}. */
|
|
37
|
+
export interface G9ChipStripItem<K extends string = string> {
|
|
38
|
+
readonly key: K;
|
|
39
|
+
readonly text: string;
|
|
40
|
+
readonly icon?: G9IconInput;
|
|
41
|
+
readonly count?: number;
|
|
42
|
+
readonly disabled?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Props of {@link G9ChipStrip}. */
|
|
45
|
+
export interface G9ChipStripProps<K extends string = string> {
|
|
46
|
+
readonly items: readonly G9ChipStripItem<K>[];
|
|
47
|
+
readonly value: K | null;
|
|
48
|
+
readonly onChange: (key: K) => void;
|
|
49
|
+
/** Its chips are `<id>_<key>`. */
|
|
50
|
+
readonly id?: string;
|
|
51
|
+
readonly className?: string;
|
|
52
|
+
readonly size?: G9ChipProps['size'];
|
|
53
|
+
readonly appearance?: G9ChipProps['appearance'];
|
|
54
|
+
readonly tone?: G9Tone;
|
|
55
|
+
readonly haptic?: G9HapticKind | false;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* One scrolling line of chips with one chosen (G9Hub's folder tabs: all, unread, mentions, my folders with their
|
|
59
|
+
* unread counts; 2.5.8): the chosen chip scrolls into view whenever it changes, in reading order.
|
|
60
|
+
*/
|
|
61
|
+
export declare function G9ChipStrip<K extends string = string>(props: G9ChipStripProps<K>): ReactNode;
|
|
26
62
|
/** One segment. */
|
|
27
63
|
export interface G9SegmentItem<K extends string = string> {
|
|
28
64
|
readonly key: K;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choice.d.ts","sourceRoot":"","sources":["../../src/toggle/choice.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"choice.d.ts","sourceRoot":"","sources":["../../src/toggle/choice.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,YAAY,EAAyC,MAAM,+BAA+B,CAAC;AACzG,OAAO,EAAQ,KAAK,SAAS,EAAiC,MAAM,gBAAgB,CAAC;AACrF,OAAO,EACL,KAA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,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,wDAAwD;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;CACxC;AAKD,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAiElE"}
|
package/dist/toggle/choice.jsx
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import "./choice.css";
|
|
2
|
-
import { g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
-
import { memo } from "@lynx-js/react";
|
|
4
|
-
import { g9ChildId, g9IdProps, g9RowStyle, g9TextStart, useG9Control } from "../base/control.jsx";
|
|
2
|
+
import { G9StringKey, g9Haptic, toNativeDigits } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
+
import { memo, useContext, useEffect, useRef } from "@lynx-js/react";
|
|
4
|
+
import { g9ChildId, g9IdProps, g9Paragraph, g9RowStyle, g9SelectedA11y, g9TextStart, useG9Control } from "../base/control.jsx";
|
|
5
5
|
import { useG9Press } from "../base/press.jsx";
|
|
6
6
|
import { useG9SharedHeights } from "../base/sizing.jsx";
|
|
7
7
|
import { toneColors } from "../base/tone.jsx";
|
|
8
8
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
9
9
|
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
10
|
+
import { invokeNodeWhenReady } from "../fields/use-text-input.jsx";
|
|
10
11
|
import { G9Icon } from "../icon/icon.jsx";
|
|
12
|
+
import { G9CultureContext } from "../provider/contexts.jsx";
|
|
13
|
+
import { useG9Direction, useG9Strings } from "../provider/hooks.jsx";
|
|
11
14
|
const tick = (kind)=>{
|
|
12
15
|
if (false !== kind) g9Haptic(null != kind ? kind : 'tick');
|
|
13
16
|
};
|
|
@@ -17,7 +20,8 @@ const CHIP_H = {
|
|
|
17
20
|
lg: 40
|
|
18
21
|
};
|
|
19
22
|
const G9Chip = memo(function(props) {
|
|
20
|
-
var _props_appearance, _props_tone, _props_size, _props_accessibilityLabel;
|
|
23
|
+
var _props_appearance, _props_tone, _props_size, _ref, _props_accessibilityLabel;
|
|
24
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
21
25
|
const selected = true === props.selected;
|
|
22
26
|
const control = useG9Control(props, 'g9-chip2', {
|
|
23
27
|
kind: 'button',
|
|
@@ -45,7 +49,11 @@ const G9Chip = memo(function(props) {
|
|
|
45
49
|
const c = selected ? on : off;
|
|
46
50
|
const shared = useG9SharedHeights();
|
|
47
51
|
const h = shared ? 'lg' === props.size ? shared.md : shared.sm : CHIP_H[null != (_props_size = props.size) ? _props_size : 'md'];
|
|
48
|
-
|
|
52
|
+
const culture = useContext(G9CultureContext);
|
|
53
|
+
const count = void 0 !== props.count && props.count > 0 ? toNativeDigits(props.count > 99 ? '99+' : String(props.count), null != (_ref = null == culture ? void 0 : culture.culture.numberingSystem) ? _ref : 'latin') : null;
|
|
54
|
+
return <view className={`${control.className}${'dashed' === appearance && !selected ? ' g9-chip2--dashed' : ''}`} {...control.idProps} {...props.nodeRef ? {
|
|
55
|
+
ref: props.nodeRef
|
|
56
|
+
} : {}} style={control.rootStyle({
|
|
49
57
|
...g9RowStyle(control.direction),
|
|
50
58
|
height: `${h}px`,
|
|
51
59
|
borderRadius: `${h / 2}px`,
|
|
@@ -53,14 +61,23 @@ const G9Chip = memo(function(props) {
|
|
|
53
61
|
borderColor: selected ? on.border : 'dashed' === appearance ? 'var(--g9-primary)' : off.border,
|
|
54
62
|
paddingLeft: `${props.onRemove ? 8 : 12}px`,
|
|
55
63
|
paddingRight: `${props.onRemove ? 8 : 12}px`
|
|
56
|
-
})} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : props.text}
|
|
57
|
-
{props.icon ? <G9Icon icon={props.icon} size={h <= 26 ? 13 : 15} color={c.foreground}/> : null}
|
|
64
|
+
})} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : count ? `${props.text}, ${count}` : props.text} {...g9SelectedA11y(selected, selectedWord)} bindtap={press}>
|
|
65
|
+
{void 0 !== props.leading ? props.leading : props.icon ? <G9Icon icon={props.icon} size={h <= 26 ? 13 : 15} color={c.foreground}/> : null}
|
|
58
66
|
<text className="g9-chip2__text" style={{
|
|
59
67
|
color: 'dashed' !== appearance || selected ? c.foreground : 'var(--g9-primary)',
|
|
60
68
|
fontSize: `${h <= 26 ? 12 : 13}px`
|
|
61
69
|
}}>
|
|
62
70
|
{props.text}
|
|
63
71
|
</text>
|
|
72
|
+
{count ? <view className="g9-chip2__count" style={{
|
|
73
|
+
backgroundColor: selected ? 'rgba(255,255,255,0.24)' : 'var(--g9-surface-container-highest)'
|
|
74
|
+
}}>
|
|
75
|
+
<text className="g9-chip2__count-text" style={{
|
|
76
|
+
color: c.foreground
|
|
77
|
+
}}>
|
|
78
|
+
{count}
|
|
79
|
+
</text>
|
|
80
|
+
</view> : null}
|
|
64
81
|
{props.onRemove ? <view className="g9-chip2__remove" catchtap={()=>{
|
|
65
82
|
var _props_onRemove;
|
|
66
83
|
tick(props.haptic);
|
|
@@ -70,6 +87,50 @@ const G9Chip = memo(function(props) {
|
|
|
70
87
|
</view> : null}
|
|
71
88
|
</view>;
|
|
72
89
|
});
|
|
90
|
+
function G9ChipStrip(props) {
|
|
91
|
+
const dir = useG9Direction();
|
|
92
|
+
const nodes = useRef({});
|
|
93
|
+
useEffect(()=>{
|
|
94
|
+
var _nodes_current_props_value;
|
|
95
|
+
if (null === props.value) return;
|
|
96
|
+
invokeNodeWhenReady({
|
|
97
|
+
current: null != (_nodes_current_props_value = nodes.current[props.value]) ? _nodes_current_props_value : null
|
|
98
|
+
}, 'scrollIntoView', {
|
|
99
|
+
scrollIntoViewOptions: {
|
|
100
|
+
behavior: 'smooth',
|
|
101
|
+
block: 'nearest',
|
|
102
|
+
inline: 'center'
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}, [
|
|
106
|
+
props.value
|
|
107
|
+
]);
|
|
108
|
+
return <scroll-view className={`g9-chip-strip${props.className ? ` ${props.className}` : ''}`} scroll-orientation="horizontal" {...g9IdProps(props.id)}>
|
|
109
|
+
<view className="g9-chip-strip__row" style={g9RowStyle(dir)}>
|
|
110
|
+
{props.items.map((it)=><G9Chip key={it.key} {...props.id ? {
|
|
111
|
+
id: g9ChildId(props.id, it.key)
|
|
112
|
+
} : {}} text={it.text} {...it.icon ? {
|
|
113
|
+
icon: it.icon
|
|
114
|
+
} : {}} {...void 0 !== it.count ? {
|
|
115
|
+
count: it.count
|
|
116
|
+
} : {}} {...it.disabled ? {
|
|
117
|
+
disabled: true
|
|
118
|
+
} : {}} selected={it.key === props.value} {...props.size ? {
|
|
119
|
+
size: props.size
|
|
120
|
+
} : {}} {...props.appearance ? {
|
|
121
|
+
appearance: props.appearance
|
|
122
|
+
} : {}} {...props.tone ? {
|
|
123
|
+
tone: props.tone
|
|
124
|
+
} : {}} {...void 0 !== props.haptic ? {
|
|
125
|
+
haptic: props.haptic
|
|
126
|
+
} : {}} nodeRef={(n)=>{
|
|
127
|
+
nodes.current[it.key] = n;
|
|
128
|
+
}} onPress={()=>{
|
|
129
|
+
if (it.key !== props.value) props.onChange(it.key);
|
|
130
|
+
}}/>)}
|
|
131
|
+
</view>
|
|
132
|
+
</scroll-view>;
|
|
133
|
+
}
|
|
73
134
|
const SEG_H = {
|
|
74
135
|
sm: 32,
|
|
75
136
|
md: 40,
|
|
@@ -143,6 +204,7 @@ function G9Segmented(props) {
|
|
|
143
204
|
</view>;
|
|
144
205
|
}
|
|
145
206
|
const Segment = memo(function(p) {
|
|
207
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
146
208
|
const press = useG9Press(p.onTap, {
|
|
147
209
|
blocked: p.blocked,
|
|
148
210
|
source: 'G9Segmented',
|
|
@@ -159,7 +221,7 @@ const Segment = memo(function(p) {
|
|
|
159
221
|
return <view className={`g9-seg__item${'content' === p.fit ? ' g9-seg__item--content' : ''}${'underline' === p.appearance ? ' g9-seg__item--underline' : ''}${p.blocked ? ' g9-seg__item--disabled' : ''}`} {...g9IdProps(p.id)} style={{
|
|
160
222
|
...paint,
|
|
161
223
|
borderRadius: 'underline' === p.appearance ? '0px' : `${(p.height - 6) / 2}px`
|
|
162
|
-
}} accessibility-element={true} accessibility-traits="button" accessibility-label={p.item.label}
|
|
224
|
+
}} accessibility-element={true} accessibility-traits="button" accessibility-label={p.item.label} {...g9SelectedA11y(p.on, selectedWord)} bindtap={press}>
|
|
163
225
|
<view className="g9-seg__line">
|
|
164
226
|
{p.item.icon ? <G9Icon icon={p.item.icon} size={15} color={fg}/> : null}
|
|
165
227
|
<text className={`g9-seg__label${p.on ? ' g9-seg__label--on' : ''}`} text-maxline="1" style={{
|
|
@@ -226,22 +288,23 @@ function G9RadioGroup(props) {
|
|
|
226
288
|
</view>;
|
|
227
289
|
}
|
|
228
290
|
const RadioRow = memo(function(p) {
|
|
291
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
229
292
|
const press = useG9Press(p.onTap, {
|
|
230
293
|
blocked: p.blocked,
|
|
231
294
|
source: 'G9RadioGroup',
|
|
232
295
|
guardMs: 0
|
|
233
296
|
});
|
|
234
|
-
return <view className={`g9-radio${p.cards ? ' g9-radio--card' : ''}${p.cards && p.on ? ' g9-radio--card-on' : ''}${p.blocked ? ' g9-radio--disabled' : ''}`} {...g9IdProps(p.id)} style={g9RowStyle(p.direction)} flatten={false} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option.label}
|
|
297
|
+
return <view className={`g9-radio${p.cards ? ' g9-radio--card' : ''}${p.cards && p.on ? ' g9-radio--card-on' : ''}${p.blocked ? ' g9-radio--disabled' : ''}`} {...g9IdProps(p.id)} style={g9RowStyle(p.direction)} flatten={false} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option.label} {...g9SelectedA11y(p.on, selectedWord)} bindtap={press}>
|
|
235
298
|
<view className={`g9-radio__mark${p.on ? ' g9-radio__mark--on' : ''}`}>
|
|
236
299
|
{p.on ? <view className="g9-radio__dot"/> : null}
|
|
237
300
|
</view>
|
|
238
301
|
{p.option.icon ? <G9Icon icon={p.option.icon} size={20} color="var(--g9-text-secondary)"/> : null}
|
|
239
302
|
<view className="g9-radio__body">
|
|
240
303
|
<text className="g9-radio__label" style={g9TextStart(p.direction)}>
|
|
241
|
-
{p.option.label}
|
|
304
|
+
{g9Paragraph(p.option.label, p.direction)}
|
|
242
305
|
</text>
|
|
243
306
|
{p.option.description ? <text className="g9-radio__desc" style={g9TextStart(p.direction)}>
|
|
244
|
-
{p.option.description}
|
|
307
|
+
{g9Paragraph(p.option.description, p.direction)}
|
|
245
308
|
</text> : null}
|
|
246
309
|
</view>
|
|
247
310
|
</view>;
|
|
@@ -352,6 +415,7 @@ function G9Stepper(props) {
|
|
|
352
415
|
const STAR = (fill, stroke)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2.8l2.85 5.78 6.38.93-4.62 4.5 1.09 6.35L12 17.36l-5.7 3 1.09-6.35-4.62-4.5 6.38-.93z" fill="${fill}" stroke="${stroke}" stroke-width="1.5" stroke-linejoin="round"/></svg>`;
|
|
353
416
|
function G9RatingInput(props) {
|
|
354
417
|
var _props_max, _props_defaultValue, _props_size;
|
|
418
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
355
419
|
const max = null != (_props_max = props.max) ? _props_max : 5;
|
|
356
420
|
const [value, setValue] = useControllableState({
|
|
357
421
|
value: props.value,
|
|
@@ -389,7 +453,7 @@ function G9RatingInput(props) {
|
|
|
389
453
|
return <view key={n} className="g9-rating__star" {...g9IdProps(g9ChildId(props.id, String(n)))} style={{
|
|
390
454
|
width: `${Math.max(44, size)}px`,
|
|
391
455
|
height: `${Math.max(44, size)}px`
|
|
392
|
-
}} accessibility-element={!props.readOnly} accessibility-traits="button" accessibility-label={null != (_ref = null == (_props_labels = props.labels) ? void 0 : _props_labels[i]) ? _ref : String(n)}
|
|
456
|
+
}} accessibility-element={!props.readOnly} accessibility-traits="button" accessibility-label={null != (_ref = null == (_props_labels = props.labels) ? void 0 : _props_labels[i]) ? _ref : String(n)} {...g9SelectedA11y(on, selectedWord)} {...props.readOnly || control.disabled ? {} : {
|
|
393
457
|
bindtap: ()=>{
|
|
394
458
|
tick(props.haptic);
|
|
395
459
|
setValue(n === value ? n - 1 : n);
|
|
@@ -403,4 +467,4 @@ function G9RatingInput(props) {
|
|
|
403
467
|
})}
|
|
404
468
|
</view>;
|
|
405
469
|
}
|
|
406
|
-
export { G9Chip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper };
|
|
470
|
+
export { G9Chip, G9ChipStrip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper };
|
package/dist/toggle/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { checkBoxColors, checkBoxSvg, G9CheckBox, type G9CheckBoxColors, type G9CheckBoxHandle, type G9CheckBoxProps, g9CheckBoxMetrics, } from './checkbox.js';
|
|
2
2
|
export { checkMarkPath, clamp01, fillAmount, firstArmLength, type G9CheckMarkGeometry, type G9CheckMarkTrim, g9CheckFillPhaseEnd, g9CheckGeometry, g9CheckMarkPhaseStart, g9DashGeometry, markAmount, nextOnTap, resolveCheckMarkGeometry, secondArmLength, targetMorph, targetProgress, trimCheckMark, } from './checkbox-math.js';
|
|
3
3
|
export { G9ChipGroup, type G9ChipGroupProps } from './chip-group.js';
|
|
4
|
-
export { G9Chip, type G9ChipProps, G9RadioGroup, type G9RadioGroupProps, type G9RadioOption, G9RatingInput, type G9RatingInputProps, G9Segmented, type G9SegmentedProps, type G9SegmentItem, G9Stepper, type G9StepperProps, } from './choice.js';
|
|
4
|
+
export { G9Chip, type G9ChipProps, G9ChipStrip, type G9ChipStripItem, type G9ChipStripProps, G9RadioGroup, type G9RadioGroupProps, type G9RadioOption, G9RatingInput, type G9RatingInputProps, G9Segmented, type G9SegmentedProps, type G9SegmentItem, G9Stepper, type G9StepperProps, } from './choice.js';
|
|
5
5
|
export { G9Switch, G9SwitchGroup, type G9SwitchGroupProps, type G9SwitchHandle, type G9SwitchProps } from './switch.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,OAAO,EACP,UAAU,EACV,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,OAAO,EACP,UAAU,EACV,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/toggle/index.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { G9CheckBox, checkBoxColors, checkBoxSvg, g9CheckBoxMetrics } from "./checkbox.jsx";
|
|
2
2
|
export { checkMarkPath, clamp01, fillAmount, firstArmLength, g9CheckFillPhaseEnd, g9CheckGeometry, g9CheckMarkPhaseStart, g9DashGeometry, markAmount, nextOnTap, resolveCheckMarkGeometry, secondArmLength, targetMorph, targetProgress, trimCheckMark } from "./checkbox-math.jsx";
|
|
3
3
|
export { G9ChipGroup } from "./chip-group.jsx";
|
|
4
|
-
export { G9Chip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper } from "./choice.jsx";
|
|
4
|
+
export { G9Chip, G9ChipStrip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper } from "./choice.jsx";
|
|
5
5
|
export { G9Switch, G9SwitchGroup } from "./switch.jsx";
|