@g9tm/lynxcontrols 2.8.3 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/catalog/cards/G9Avatar.md +1 -1
- package/catalog/cards/G9Badge.md +1 -1
- package/catalog/cards/G9Button.md +1 -1
- package/catalog/cards/G9Chip.md +1 -1
- package/catalog/cards/G9ChipStrip.md +1 -1
- package/catalog/cards/G9ContextMenu.md +4 -2
- package/catalog/cards/G9DragChip.md +10 -0
- package/catalog/cards/G9DragSource.md +17 -0
- package/catalog/cards/G9DropTarget.md +15 -0
- package/catalog/cards/G9EmptyState.md +1 -1
- package/catalog/cards/G9IconButton.md +2 -2
- package/catalog/cards/G9InlineMessage.md +1 -1
- package/catalog/cards/G9KeyCapture.md +10 -0
- package/catalog/cards/G9Kpi.md +1 -1
- package/catalog/cards/G9ListRow.md +1 -1
- package/catalog/cards/G9LiveBadge.md +1 -1
- package/catalog/cards/G9LiveDot.md +1 -1
- package/catalog/cards/G9ProgressBar.md +1 -1
- package/catalog/cards/G9ProgressRing.md +1 -1
- package/catalog/cards/G9SafeButton.md +1 -1
- package/catalog/cards/G9SafeIconButton.md +2 -2
- package/catalog/cards/G9StatusPill.md +1 -1
- package/catalog/cards/G9StepTracker.md +1 -1
- package/catalog/cards/G9SwitchRow.md +1 -1
- package/catalog/cards/G9Tag.md +1 -1
- package/catalog/catalog.json +1129 -69
- package/catalog/index.md +6 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.jsx +1 -1
- package/dist/commands/keys.d.ts +32 -1
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.jsx +92 -3
- package/dist/desktop/index.d.ts +3 -0
- package/dist/desktop/index.d.ts.map +1 -0
- package/dist/desktop/index.jsx +2 -0
- package/dist/desktop/keys.d.ts +26 -0
- package/dist/desktop/keys.d.ts.map +1 -0
- package/dist/desktop/keys.jsx +30 -0
- package/dist/desktop/window.d.ts +18 -0
- package/dist/desktop/window.d.ts.map +1 -0
- package/dist/desktop/window.jsx +28 -0
- package/dist/fields/editor.d.ts +7 -0
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +3 -1
- package/dist/fields/index.d.ts +1 -0
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.jsx +1 -0
- package/dist/fields/line-direction.d.ts +13 -0
- package/dist/fields/line-direction.d.ts.map +1 -0
- package/dist/fields/line-direction.jsx +15 -0
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +3 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/pointer/drag-session.d.ts +72 -0
- package/dist/pointer/drag-session.d.ts.map +1 -0
- package/dist/pointer/drag-session.jsx +148 -0
- package/dist/pointer/drag.d.ts +78 -0
- package/dist/pointer/drag.d.ts.map +1 -0
- package/dist/pointer/drag.jsx +186 -0
- package/dist/pointer/index.d.ts +5 -0
- package/dist/pointer/index.d.ts.map +1 -0
- package/dist/pointer/index.jsx +4 -0
- package/dist/pointer/point.d.ts +36 -0
- package/dist/pointer/point.d.ts.map +1 -0
- package/dist/pointer/point.jsx +34 -0
- package/dist/pointer/pointer.css +62 -0
- package/dist/pointer/pointer.css.map +1 -0
- package/dist/pointer/secondary.d.ts +54 -0
- package/dist/pointer/secondary.d.ts.map +1 -0
- package/dist/pointer/secondary.jsx +86 -0
- package/dist/popover/popover.d.ts +26 -2
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/popover/popover.jsx +47 -20
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/settings.d.ts +11 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +3 -2
- package/package.json +12 -2
- package/skills/g9-lynx-app/SKILL.md +8 -0
- package/skills/g9-lynx-app/references/catalog-index.md +11 -0
- package/skills/g9-lynx-app/references/components/button.md +6 -6
- package/skills/g9-lynx-app/references/components/code-editor.md +19 -0
- package/skills/g9-lynx-app/references/components/code-log.md +19 -0
- package/skills/g9-lynx-app/references/components/desktop.md +12 -0
- package/skills/g9-lynx-app/references/components/display-1.md +4 -4
- package/skills/g9-lynx-app/references/components/display-2.md +5 -5
- package/skills/g9-lynx-app/references/components/display-3.md +3 -3
- package/skills/g9-lynx-app/references/components/graph.md +19 -0
- package/skills/g9-lynx-app/references/components/list.md +2 -2
- package/skills/g9-lynx-app/references/components/media-photo-editor.md +3 -3
- package/skills/g9-lynx-app/references/components/pointer.md +46 -0
- package/skills/g9-lynx-app/references/components/popover.md +4 -2
- package/skills/g9-lynx-app/references/components/toggle.md +2 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { g9Haptic, isContextMenuKey } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { useRef } from "@lynx-js/react";
|
|
3
|
+
import { measureNode } from "../anchor/measure.jsx";
|
|
4
|
+
import { useStableCallback } from "../base/use-stable-callback.jsx";
|
|
5
|
+
import { useG9Keys } from "../commands/keys.jsx";
|
|
6
|
+
import { g9PointerPoint, isSecondaryPress } from "./point.jsx";
|
|
7
|
+
function keyEventOf(e) {
|
|
8
|
+
var _ref;
|
|
9
|
+
var _e_detail, _e_detail1;
|
|
10
|
+
const key = null != (_ref = null == e ? void 0 : e.key) ? _ref : null == e ? void 0 : null == (_e_detail = e.detail) ? void 0 : _e_detail.key;
|
|
11
|
+
if ('string' != typeof key || !key) return null;
|
|
12
|
+
return {
|
|
13
|
+
key,
|
|
14
|
+
...(null == e ? void 0 : e.shiftKey) || (null == e ? void 0 : null == (_e_detail1 = e.detail) ? void 0 : _e_detail1.shiftKey) ? {
|
|
15
|
+
shift: true
|
|
16
|
+
} : {},
|
|
17
|
+
...(null == e ? void 0 : e.ctrlKey) ? {
|
|
18
|
+
ctrl: true
|
|
19
|
+
} : {},
|
|
20
|
+
...(null == e ? void 0 : e.altKey) ? {
|
|
21
|
+
alt: true
|
|
22
|
+
} : {},
|
|
23
|
+
...(null == e ? void 0 : e.metaKey) ? {
|
|
24
|
+
meta: true
|
|
25
|
+
} : {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const pointRect = (x, y)=>({
|
|
29
|
+
x,
|
|
30
|
+
y,
|
|
31
|
+
width: 0,
|
|
32
|
+
height: 0
|
|
33
|
+
});
|
|
34
|
+
function useG9SecondaryAction(onAction, options = {}) {
|
|
35
|
+
var _options_enabled, _options_keyboard;
|
|
36
|
+
const node = useRef(null);
|
|
37
|
+
const run = useStableCallback(onAction);
|
|
38
|
+
const enabled = null != (_options_enabled = options.enabled) ? _options_enabled : true;
|
|
39
|
+
const keyboard = null != (_options_keyboard = options.keyboard) ? _options_keyboard : 'focus';
|
|
40
|
+
const fromElement = (source)=>{
|
|
41
|
+
measureNode(node.current).then((r)=>{
|
|
42
|
+
if (r) run({
|
|
43
|
+
source,
|
|
44
|
+
anchor: r
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
useG9Keys((e)=>{
|
|
49
|
+
if (!isContextMenuKey(e)) return false;
|
|
50
|
+
fromElement('keyboard');
|
|
51
|
+
return true;
|
|
52
|
+
}, {
|
|
53
|
+
enabled: enabled && 'global' === keyboard
|
|
54
|
+
});
|
|
55
|
+
const ref = (n)=>{
|
|
56
|
+
node.current = n;
|
|
57
|
+
};
|
|
58
|
+
if (!enabled) return {
|
|
59
|
+
ref
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
ref,
|
|
63
|
+
bindmousedown: (e)=>{
|
|
64
|
+
if (!isSecondaryPress(e)) return;
|
|
65
|
+
const p = g9PointerPoint(e);
|
|
66
|
+
if (p) run({
|
|
67
|
+
source: 'mouse',
|
|
68
|
+
anchor: pointRect(p.x, p.y)
|
|
69
|
+
});
|
|
70
|
+
else fromElement('mouse');
|
|
71
|
+
},
|
|
72
|
+
...false === options.longPress ? {} : {
|
|
73
|
+
bindlongpress: ()=>{
|
|
74
|
+
if (false !== options.haptic) g9Haptic('impact');
|
|
75
|
+
fromElement('touch');
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
...'focus' === keyboard ? {
|
|
79
|
+
bindkeydown: (e)=>{
|
|
80
|
+
const k = keyEventOf(e);
|
|
81
|
+
if (k && isContextMenuKey(k)) fromElement('keyboard');
|
|
82
|
+
}
|
|
83
|
+
} : {}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export { keyEventOf, useG9SecondaryAction };
|
|
@@ -4,6 +4,7 @@ import type { NodesRef } from '@lynx-js/types';
|
|
|
4
4
|
import type { G9AnchorRect } from '../anchor/registry.js';
|
|
5
5
|
import { type G9StyleProp } from '../base/control.js';
|
|
6
6
|
import { type G9IconInput } from '../icon/icon.js';
|
|
7
|
+
import { type G9SecondarySource } from '../pointer/secondary.js';
|
|
7
8
|
import { type G9Placement } from './position.js';
|
|
8
9
|
/** An open popover-like overlay, as automation sees it (G9AppPilot's layer model: `popup` layer). */
|
|
9
10
|
export interface G9OpenPopover {
|
|
@@ -124,6 +125,15 @@ export interface G9MenuProps extends Omit<G9PopoverProps, 'children' | 'kind'> {
|
|
|
124
125
|
readonly mode?: 'auto' | 'popover' | 'sheet';
|
|
125
126
|
/** Cancel row text of the action sheet. */
|
|
126
127
|
readonly cancelText?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Opens at this point of the LynxView (2.9.0): where a right click happened (`useG9SecondaryAction`). Wins over
|
|
130
|
+
* `anchorId` / `anchorNode` / `anchorRect`, and a menu at a point is always the popover form (a pointer means a
|
|
131
|
+
* desktop or a mouse) unless `mode` is `'sheet'`.
|
|
132
|
+
*/
|
|
133
|
+
readonly anchorPoint?: {
|
|
134
|
+
readonly x: number;
|
|
135
|
+
readonly y: number;
|
|
136
|
+
};
|
|
127
137
|
}
|
|
128
138
|
/** A menu (G9Hub Menu): a popover by the anchor on wide windows, an action sheet from the bottom on phones. */
|
|
129
139
|
export declare function G9Menu(props: G9MenuProps): ReactNode;
|
|
@@ -147,10 +157,24 @@ export interface G9ContextMenuProps {
|
|
|
147
157
|
readonly onSelect: (key: string) => void;
|
|
148
158
|
readonly title?: string;
|
|
149
159
|
readonly disabled?: boolean;
|
|
150
|
-
|
|
160
|
+
/** Told how it opened (2.9.0): `'touch'` (a long press), `'mouse'` (the right button) or `'keyboard'`. */
|
|
161
|
+
readonly onOpen?: (source: G9SecondarySource) => void;
|
|
162
|
+
/** The right mouse button opens it at the pointer (desktop, the web). Default true. */
|
|
163
|
+
readonly secondaryClick?: boolean;
|
|
164
|
+
/** A long press opens it on touch. Default true. */
|
|
165
|
+
readonly longPress?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* The context-menu key and Shift+F10: `'focus'` (default) when the child has the keyboard focus, `'global'` while
|
|
168
|
+
* mounted (the app's selected item), `'off'`.
|
|
169
|
+
*/
|
|
170
|
+
readonly keyboard?: 'focus' | 'global' | 'off';
|
|
151
171
|
readonly id?: string;
|
|
152
172
|
readonly children?: ReactNode;
|
|
153
173
|
}
|
|
154
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* A context menu on its child (G9Hub ContextMenu, a message, a row): a long press on touch (a light haptic, the menu by
|
|
176
|
+
* the child), the right mouse button on a desktop (the menu at the pointer, 2.9.0) and the context-menu key or
|
|
177
|
+
* Shift+F10 (the menu by the child).
|
|
178
|
+
*/
|
|
155
179
|
export declare function G9ContextMenu(props: G9ContextMenuProps): ReactNode;
|
|
156
180
|
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAQ,KAAK,SAAS,EAAwC,MAAM,gBAAgB,CAAC;AAC5F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,KAAK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GG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CA2ClE;AAID,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,0GAA0G;IAC1G,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,uFAAuF;IACvF,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,oDAAoD;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAmClE"}
|
package/dist/popover/popover.jsx
CHANGED
|
@@ -9,6 +9,7 @@ import { G9Keycap } from "../display/keycap.jsx";
|
|
|
9
9
|
import { useG9Back, useG9LayerItem } from "../host/hooks.jsx";
|
|
10
10
|
import { G9Icon } from "../icon/icon.jsx";
|
|
11
11
|
import { useG9ListKeyboard } from "../list/keyboard.jsx";
|
|
12
|
+
import { useG9SecondaryAction } from "../pointer/secondary.jsx";
|
|
12
13
|
import { useG9Core, useG9Direction, useG9Layout, useG9SafeInsets, useG9Strings } from "../provider/hooks.jsx";
|
|
13
14
|
import { computePopoverPosition } from "./position.jsx";
|
|
14
15
|
function G9OverlayRoot(props) {
|
|
@@ -274,8 +275,19 @@ const G9MenuList = memo(function(props) {
|
|
|
274
275
|
</view>;
|
|
275
276
|
});
|
|
276
277
|
function G9Menu(props) {
|
|
278
|
+
var _pop_placement;
|
|
277
279
|
const { wide } = useG9Layout();
|
|
278
|
-
const
|
|
280
|
+
const point = props.anchorPoint;
|
|
281
|
+
const pointRect = useMemo(()=>point ? {
|
|
282
|
+
x: point.x,
|
|
283
|
+
y: point.y,
|
|
284
|
+
width: 0,
|
|
285
|
+
height: 0
|
|
286
|
+
} : void 0, [
|
|
287
|
+
null == point ? void 0 : point.x,
|
|
288
|
+
null == point ? void 0 : point.y
|
|
289
|
+
]);
|
|
290
|
+
const sheet = 'sheet' === props.mode || 'popover' !== props.mode && !wide && !point;
|
|
279
291
|
const select = (k)=>{
|
|
280
292
|
props.onSelect(k);
|
|
281
293
|
props.onClose();
|
|
@@ -291,8 +303,11 @@ function G9Menu(props) {
|
|
|
291
303
|
id: `${props.id}_List`
|
|
292
304
|
} : {}}/>
|
|
293
305
|
</G9ActionSheet>;
|
|
294
|
-
const { items: _i, onSelect: _s, title: _t, mode: _m, cancelText: _c, ...pop } = props;
|
|
295
|
-
return <G9Popover {...pop}
|
|
306
|
+
const { items: _i, onSelect: _s, title: _t, mode: _m, cancelText: _c, anchorPoint: _p, ...pop } = props;
|
|
307
|
+
return <G9Popover {...pop} {...pointRect ? {
|
|
308
|
+
anchorRect: pointRect,
|
|
309
|
+
placement: null != (_pop_placement = pop.placement) ? _pop_placement : 'bottom-start'
|
|
310
|
+
} : {}} kind="menu">
|
|
296
311
|
<G9MenuList items={props.items} onSelect={select} keyboard={props.open} {...props.id ? {
|
|
297
312
|
id: `${props.id}_List`
|
|
298
313
|
} : {}}/>
|
|
@@ -337,25 +352,37 @@ function G9ActionSheet(props) {
|
|
|
337
352
|
return null;
|
|
338
353
|
}
|
|
339
354
|
function G9ContextMenu(props) {
|
|
355
|
+
var _props_keyboard;
|
|
340
356
|
const [isOpen, setOpen] = useState(false);
|
|
341
|
-
const [
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
357
|
+
const [at, setAt] = useState(null);
|
|
358
|
+
const secondary = useG9SecondaryAction((a)=>{
|
|
359
|
+
var _props_onOpen;
|
|
360
|
+
setAt({
|
|
361
|
+
rect: a.anchor,
|
|
362
|
+
point: 'mouse' === a.source && 0 === a.anchor.width && 0 === a.anchor.height
|
|
363
|
+
});
|
|
364
|
+
setOpen(true);
|
|
365
|
+
null == (_props_onOpen = props.onOpen) || _props_onOpen.call(props, a.source);
|
|
366
|
+
}, {
|
|
367
|
+
enabled: !props.disabled,
|
|
368
|
+
...false === props.longPress ? {
|
|
369
|
+
longPress: false
|
|
370
|
+
} : {},
|
|
371
|
+
keyboard: null != (_props_keyboard = props.keyboard) ? _props_keyboard : 'focus'
|
|
372
|
+
});
|
|
373
|
+
const { ref, ...bind } = secondary;
|
|
374
|
+
return <view className="g9-context-menu" {...g9IdProps(props.id)} ref={ref} {...false === props.secondaryClick ? {
|
|
375
|
+
...bind,
|
|
376
|
+
bindmousedown: void 0
|
|
377
|
+
} : bind}>
|
|
356
378
|
{props.children}
|
|
357
|
-
<G9Menu open={isOpen} onClose={()=>setOpen(false)} items={props.items} onSelect={props.onSelect} {...
|
|
358
|
-
|
|
379
|
+
<G9Menu open={isOpen} onClose={()=>setOpen(false)} items={props.items} onSelect={props.onSelect} {...at ? at.point ? {
|
|
380
|
+
anchorPoint: {
|
|
381
|
+
x: at.rect.x,
|
|
382
|
+
y: at.rect.y
|
|
383
|
+
}
|
|
384
|
+
} : {
|
|
385
|
+
anchorRect: at.rect
|
|
359
386
|
} : {}} {...props.title ? {
|
|
360
387
|
title: props.title
|
|
361
388
|
} : {}} {...props.id ? {
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export { G9DirectionScope, type G9DirectionScopeProps } from './direction-scope.
|
|
|
4
4
|
export { type G9WindowInfo, useG9ActivityVisible, useG9Capability, useG9Core, useG9Culture, useG9CultureStore, useG9DesignRegistry, useG9Diagnostics, useG9Direction, useG9Executor, useG9Keyboard, useG9Layout, useG9OptionalService, useG9Preferences, useG9SafeInsets, useG9Service, useG9Settings, useG9Shape, useG9Strings, useG9Theme, useG9ThemeStore, useG9Window, useG9Word, } from './hooks.js';
|
|
5
5
|
export { G9KeepAlive, type G9KeepAliveProps } from './keep-alive.js';
|
|
6
6
|
export { type G9PreviewOverrides, G9Provider, type G9ProviderProps } from './provider.js';
|
|
7
|
-
export { type G9CounterFormat, type G9CounterOrder, type G9ExecutorSettings, type G9FieldSettings, type G9ImageRenderer, type G9LayoutSettings, type G9PageLoadingSettings, type G9ResolvedSettings, type G9Settings, g9DefaultBackEventName, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings, } from './settings.js';
|
|
7
|
+
export { type G9CounterFormat, type G9CounterOrder, type G9ExecutorSettings, type G9FieldSettings, type G9ImageRenderer, type G9LayoutSettings, type G9LineDirection, type G9PageLoadingSettings, type G9ResolvedSettings, type G9Settings, g9DefaultBackEventName, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings, } from './settings.js';
|
|
8
8
|
export { g9TextFocus, useG9TextFocused, useG9TextFocusReport } from './text-focus.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,KAAK,kBAAkB,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,EACX,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,KAAK,kBAAkB,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -134,7 +134,18 @@ export interface G9FieldSettings {
|
|
|
134
134
|
* «باقیمانده: ۳۹۸۸» (G9Didban, 2.8.2). Isolate it yourself when it mixes digits with right-to-left text.
|
|
135
135
|
*/
|
|
136
136
|
readonly counterFormat?: G9CounterFormat;
|
|
137
|
+
/**
|
|
138
|
+
* How each line of a multi-line field (G9Editor, G9ChatComposer) takes its direction. `'native'` (default): as Android
|
|
139
|
+
* and iOS do, from the line's FIRST strong letter — «Didban رو تست کردم» reads left to right. `'majority'`: from MOST
|
|
140
|
+
* of its letters, so a Persian line sits right-to-left and an English one left-to-right in the same box while typing;
|
|
141
|
+
* digits, marks, URLs, paths and `code` do not vote, a line without a vote takes the field's direction, and an RLM /
|
|
142
|
+
* LRM at a line's start chooses by hand (G9Didban, 2.8.4). A field's own `lineDirection` overrides it. Needs the
|
|
143
|
+
* host's `G9InputBehaviors` (lynxcontrols-native); see the fields guide for each platform.
|
|
144
|
+
*/
|
|
145
|
+
readonly lineDirection?: G9LineDirection;
|
|
137
146
|
}
|
|
147
|
+
/** How a multi-line field's lines take their direction (see {@link G9FieldSettings.lineDirection}). */
|
|
148
|
+
export type G9LineDirection = 'native' | 'majority';
|
|
138
149
|
/** The order of a right-to-left field's character counter (see {@link G9FieldSettings.counterOrder}). */
|
|
139
150
|
export type G9CounterOrder = 'reading' | 'leftToRight';
|
|
140
151
|
/** A field's character counter text (see {@link G9FieldSettings.counterFormat}). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/provider/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAA8B,KAAK,eAAe,EAAsB,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,kBAAkB,CAAC;AAE9E,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAEhD,iHAAiH;AACjH,MAAM,WAAW,qBAAqB;IACpC,2GAA2G;IAC3G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,sFAAsF;IACtF,QAAQ,CAAC,YAAY,CA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_backgroundColor, _loading_spinnerColor, _s_executor, _ref1, _ref2, _s_guide, _s_toasts;
|
|
17
|
-
var _s_fields, _s_fields1, _s_fields2, _s_toggles, _s_layout;
|
|
17
|
+
var _s_fields, _s_fields1, _s_fields2, _s_fields3, _s_toggles, _s_layout;
|
|
18
18
|
const s = null != settings ? settings : {};
|
|
19
19
|
const backEventName = null != (_s_backEventName = s.backEventName) ? _s_backEventName : g9DefaultBackEventName;
|
|
20
20
|
if ('string' != typeof backEventName || '' === backEventName.trim()) throw new G9Error('settings-invalid', 'backEventName must be a non-blank string.');
|
|
@@ -36,7 +36,8 @@ function resolveSettings(settings, fallbackIconFonts) {
|
|
|
36
36
|
fields: Object.freeze({
|
|
37
37
|
highlightFilledValue: null != (_ref1 = null == (_s_fields = s.fields) ? void 0 : _s_fields.highlightFilledValue) ? _ref1 : true,
|
|
38
38
|
counterOrder: (null == (_s_fields1 = s.fields) ? void 0 : _s_fields1.counterOrder) === 'leftToRight' ? 'leftToRight' : 'reading',
|
|
39
|
-
|
|
39
|
+
lineDirection: (null == (_s_fields2 = s.fields) ? void 0 : _s_fields2.lineDirection) === 'majority' ? 'majority' : 'native',
|
|
40
|
+
...'function' == typeof (null == (_s_fields3 = s.fields) ? void 0 : _s_fields3.counterFormat) ? {
|
|
40
41
|
counterFormat: s.fields.counterFormat
|
|
41
42
|
} : {}
|
|
42
43
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -187,6 +187,16 @@
|
|
|
187
187
|
"types": "./dist/popover/index.d.ts",
|
|
188
188
|
"default": "./dist/popover/index.jsx"
|
|
189
189
|
},
|
|
190
|
+
"./pointer": {
|
|
191
|
+
"source": "./src/pointer/index.ts",
|
|
192
|
+
"types": "./dist/pointer/index.d.ts",
|
|
193
|
+
"default": "./dist/pointer/index.jsx"
|
|
194
|
+
},
|
|
195
|
+
"./desktop": {
|
|
196
|
+
"source": "./src/desktop/index.ts",
|
|
197
|
+
"types": "./dist/desktop/index.d.ts",
|
|
198
|
+
"default": "./dist/desktop/index.jsx"
|
|
199
|
+
},
|
|
190
200
|
"./commands": {
|
|
191
201
|
"source": "./src/commands/index.ts",
|
|
192
202
|
"types": "./dist/commands/index.d.ts",
|
|
@@ -234,7 +244,7 @@
|
|
|
234
244
|
"build": "rslib build"
|
|
235
245
|
},
|
|
236
246
|
"dependencies": {
|
|
237
|
-
"@g9tm/lynxcontrols-foundation": "2.
|
|
247
|
+
"@g9tm/lynxcontrols-foundation": "2.9.0"
|
|
238
248
|
},
|
|
239
249
|
"peerDependencies": {
|
|
240
250
|
"@lynx-js/react": ">=0.129.3 <0.130.0",
|
|
@@ -36,6 +36,14 @@ disagree, trust `node_modules/@g9tm/lynxcontrols*/catalog/catalog.json` and the
|
|
|
36
36
|
3. **Use the library before writing your own**: a control, a token (`g9Token('Primary')`) or a culture function
|
|
37
37
|
(`formatNumber`, `toNativeDigits`) exists for most needs; give every control a person or a test acts on an `id`.
|
|
38
38
|
|
|
39
|
+
## Clean up at the end
|
|
40
|
+
|
|
41
|
+
Always (the owner, 2026-12-03: old temp files and test Docker images filled drive C and the machine crashed): every
|
|
42
|
+
temporary thing a task makes is removed before the task is reported done — temp files and folders (`%TEMP%`, `/tmp`,
|
|
43
|
+
scratch packs and tarballs), extra git worktrees, scratch apps, the Docker containers, images, volumes and build cache
|
|
44
|
+
it created, and the processes it started (dev servers, watchers, emulators). Remove only what you made, never another
|
|
45
|
+
session's; say in the report what was removed and what could not be.
|
|
46
|
+
|
|
39
47
|
## How the references are made
|
|
40
48
|
|
|
41
49
|
The hand-written files say how to use the library; `references/catalog-index.md` and `references/components/` are
|
|
@@ -24,6 +24,11 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
24
24
|
|
|
25
25
|
- `@g9tm/lynxcontrols-chat`: G9AckBar, G9ChatComposer, G9ChatThread, G9ConversationRow, G9EditHistorySheet, G9EmojiLibrary, G9EmojiPicker, G9FileCard, G9GifPicker, G9KudosDialog, G9LinkPreview, G9MessageBubble, G9MessageMenu, G9MessageMeta, G9MessageText, G9PersonPicker, G9PinnedBar, G9PollCard, G9PollComposer, G9ReactionBar, G9SchedulePicker, G9SlashSuggestions, G9StickerPicker, G9SystemPill, G9ThreadSearch, G9TypingDots → `components/chat-1.md`, `components/chat-2.md`, `components/chat-3.md`
|
|
26
26
|
|
|
27
|
+
## @g9tm/lynxcontrols-code
|
|
28
|
+
|
|
29
|
+
- `@g9tm/lynxcontrols-code/editor`: G9CodeEditor → `components/code-editor.md`
|
|
30
|
+
- `@g9tm/lynxcontrols-code/log`: G9LogView → `components/code-log.md`
|
|
31
|
+
|
|
27
32
|
## @g9tm/lynxcontrols-commerce
|
|
28
33
|
|
|
29
34
|
- `@g9tm/lynxcontrols-commerce`: G9MiniCartBar, G9PriceTag, G9ProductTile, G9QuantityControl → `components/commerce.md`
|
|
@@ -39,6 +44,7 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
39
44
|
- `@g9tm/lynxcontrols/dashboard`: G9DashboardCustomizeSheet, G9DashboardGrid, G9WidgetSkeleton, G9WidgetSlot → `components/dashboard.md`
|
|
40
45
|
- `@g9tm/lynxcontrols/deferred`: G9DeferredContent → `components/deferred.md`
|
|
41
46
|
- `@g9tm/lynxcontrols/design`: G9DesignNode, G9DesignScope → `components/design.md`
|
|
47
|
+
- `@g9tm/lynxcontrols/desktop`: G9KeyCapture → `components/desktop.md`
|
|
42
48
|
- `@g9tm/lynxcontrols/display`: G9ActivityIndicator, G9Avatar, G9Badge, G9CameFromMark, G9CodeBlock, G9CultureDateTimeLabel, G9Delta, G9EmptyState, G9ErrorBoundary, G9Image, G9InlineMessage, G9Keycap, G9Kpi, G9KpiGrid, G9LiveBadge, G9LiveDot, G9LoadState, G9LockOverlay, G9Photo, G9ProgressBar, G9ProgressRing, G9RevealText, G9SecretValue, G9Separator, G9SheetSkeleton, G9ShimmerBand, G9Skeleton, G9SkeletonPage, G9SkeletonRows, G9StatusPill, G9StepTracker, G9Tag, G9ThemePreviewCard, G9TitleWithLine, G9Wave → `components/display-1.md`, `components/display-2.md`, `components/display-3.md`
|
|
43
49
|
- `@g9tm/lynxcontrols/edge-panel`: G9EdgePanel → `components/edge-panel.md`
|
|
44
50
|
- `@g9tm/lynxcontrols/effects`: G9AnimatedCheck, G9Confetti, G9SuccessHeader → `components/effects.md`
|
|
@@ -53,6 +59,7 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
53
59
|
- `@g9tm/lynxcontrols/orb`: G9FloatingOrb, G9HoldButton → `components/orb.md`
|
|
54
60
|
- `@g9tm/lynxcontrols/pickers`: DateTimeSheetBody, G9ComboBox, G9DateTimePicker, G9DayStepper, G9Picker, G9TimeSpanPicker, G9WheelColumn, PickerField, PickerSheetHeader, SelectionValueIcon, TimeSpanSheetBody → `components/pickers.md`
|
|
55
61
|
- `@g9tm/lynxcontrols/plus-button`: G9PlusButton → `components/plus-button.md`
|
|
62
|
+
- `@g9tm/lynxcontrols/pointer`: G9DragChip, G9DragSource, G9DropTarget → `components/pointer.md`
|
|
56
63
|
- `@g9tm/lynxcontrols/popover`: G9ActionSheet, G9ContextMenu, G9Menu, G9MenuList, G9OverlayRoot, G9Popover, G9Tooltip → `components/popover.md`
|
|
57
64
|
- `@g9tm/lynxcontrols/popup`: G9PopupDragHandle, G9PopupView, PopupFrame, PopupInputForm → `components/popup.md`
|
|
58
65
|
- `@g9tm/lynxcontrols/provider`: G9Activity, G9DirectionScope, G9KeepAlive, G9Provider → `components/provider.md`
|
|
@@ -71,6 +78,10 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
71
78
|
|
|
72
79
|
- `@g9tm/lynxcontrols-datagrid`: G9DataGrid → `components/datagrid.md`
|
|
73
80
|
|
|
81
|
+
## @g9tm/lynxcontrols-graph
|
|
82
|
+
|
|
83
|
+
- `@g9tm/lynxcontrols-graph`: G9GraphCanvas → `components/graph.md`
|
|
84
|
+
|
|
74
85
|
## @g9tm/lynxcontrols-intro-carousel
|
|
75
86
|
|
|
76
87
|
- `@g9tm/lynxcontrols-intro-carousel`: G9IntroCarousel → `components/intro-carousel.md`
|
|
@@ -8,7 +8,7 @@ Text button (MAUI `G9Button`): variant fill (gradient for the solid variants), 1
|
|
|
8
8
|
|
|
9
9
|
Props:
|
|
10
10
|
- `text?`: string
|
|
11
|
-
- `variant?`: '
|
|
11
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
12
12
|
- `size?`: 'small' | 'large' | 'medium' | 'hero' = "medium"
|
|
13
13
|
- `leadingIcon?`: icon
|
|
14
14
|
- `onPress?`: () => void
|
|
@@ -43,12 +43,12 @@ Example: `<G9HeaderActionButton />`
|
|
|
43
43
|
Square icon button (MAUI `G9IconButton`): one icon, variant/ghost fill, optional circle, corner badge that is never dimmed (opacity applies to the frame only), loading spinner, minimum touch target.
|
|
44
44
|
|
|
45
45
|
Props:
|
|
46
|
-
- `variant?`: '
|
|
46
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "surface"
|
|
47
47
|
- `size?`: 'sm' | 'md' | 'lg'
|
|
48
48
|
- `icon?`: icon
|
|
49
49
|
- `onPress?`: () => void
|
|
50
50
|
- `disabled?`: boolean = false
|
|
51
|
-
- `activeVariant?`: '
|
|
51
|
+
- `activeVariant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "tonal"
|
|
52
52
|
- `badgeText?`: string
|
|
53
53
|
- `badgeColor?`: color = "var(--g9-error)"
|
|
54
54
|
|
|
@@ -80,7 +80,7 @@ Button with guarded execution (MAUI `G9SafeButton`): a tap calls `onPress`, then
|
|
|
80
80
|
|
|
81
81
|
Props:
|
|
82
82
|
- `text?`: string
|
|
83
|
-
- `variant?`: '
|
|
83
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
84
84
|
- `size?`: 'small' | 'large' | 'medium' | 'hero' = "medium"
|
|
85
85
|
- `leadingIcon?`: icon
|
|
86
86
|
- `onPress?`: () => void
|
|
@@ -97,12 +97,12 @@ Example: `<G9SafeButton />`
|
|
|
97
97
|
Icon button with guarded execution (MAUI `G9SafeIconButton`); see `G9SafeButton`.
|
|
98
98
|
|
|
99
99
|
Props:
|
|
100
|
-
- `variant?`: '
|
|
100
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "surface"
|
|
101
101
|
- `size?`: 'sm' | 'md' | 'lg'
|
|
102
102
|
- `icon?`: icon
|
|
103
103
|
- `onPress?`: () => void
|
|
104
104
|
- `disabled?`: boolean = false
|
|
105
|
-
- `activeVariant?`: '
|
|
105
|
+
- `activeVariant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "tonal"
|
|
106
106
|
- `onExecute?`: (context: G9SafeRunContext) => void
|
|
107
107
|
- `onResult?`: (result: G9SafeRunResult<unknown>) => void
|
|
108
108
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols-code/editor` (generated)
|
|
2
|
+
|
|
3
|
+
# G9CodeEditor
|
|
4
|
+
|
|
5
|
+
`import { G9CodeEditor } from '@g9tm/lynxcontrols-code/editor';`
|
|
6
|
+
|
|
7
|
+
Editable monospace text with line numbers, colours, marks, find, undo / redo; only the visible lines are drawn.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `value?`: string
|
|
11
|
+
- `onChange?`: (change: G9TextChange) => void
|
|
12
|
+
- `onValueChange?`: (value: string) => void
|
|
13
|
+
- `onCopy?`: (text: string) => void
|
|
14
|
+
- `fontSize?`: number = 13
|
|
15
|
+
- `lineHeight?`: number = 20
|
|
16
|
+
- `tabSize?`: number = 2
|
|
17
|
+
- `defaultValue?`: string
|
|
18
|
+
|
|
19
|
+
Example: `<G9CodeEditor />`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols-code/log` (generated)
|
|
2
|
+
|
|
3
|
+
# G9LogView
|
|
4
|
+
|
|
5
|
+
`import { G9LogView } from '@g9tm/lynxcontrols-code/log';`
|
|
6
|
+
|
|
7
|
+
A live, virtualised log: follows the end, pauses on scroll-up, filters by level and search, copies selected rows.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `store`: object
|
|
11
|
+
- `onActivate?`: (entry: G9LogEntry) => void
|
|
12
|
+
- `onCopy?`: (text: string) => void
|
|
13
|
+
- `onLevelsChange?`: (levels: G9LogLevel[]) => void
|
|
14
|
+
- `onQueryChange?`: (query: string) => void
|
|
15
|
+
- `onSelectionChange?`: (entries: G9LogEntry[]) => void
|
|
16
|
+
- `levelColors?`: object
|
|
17
|
+
- `rowHeight?`: number = 22
|
|
18
|
+
|
|
19
|
+
Example: `<G9LogView store={store} />`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/desktop` (generated)
|
|
2
|
+
|
|
3
|
+
# G9KeyCapture
|
|
4
|
+
|
|
5
|
+
`import { G9KeyCapture } from '@g9tm/lynxcontrols/desktop';`
|
|
6
|
+
|
|
7
|
+
Hears the keys pressed anywhere inside (desktop: Lynxtron) and hands them to the page's key handlers.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `children?`: ReactNode
|
|
11
|
+
|
|
12
|
+
Example: `<G9KeyCapture />`
|
|
@@ -26,7 +26,7 @@ Props:
|
|
|
26
26
|
- `size?`: number | string | string | string | string | string = "md"
|
|
27
27
|
- `icon?`: icon
|
|
28
28
|
- `shape?`: 'circle' | 'squircle'
|
|
29
|
-
- `tone?`: '
|
|
29
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
30
30
|
- `gradient?`: boolean
|
|
31
31
|
- `image?`: string
|
|
32
32
|
- `ring?`: string
|
|
@@ -42,7 +42,7 @@ A count or a dot (G9Hub Counter/Badge, tab and bell counts).
|
|
|
42
42
|
Props:
|
|
43
43
|
- `value?`: string | number
|
|
44
44
|
- `appearance?`: 'solid' | 'outline' | 'plain' | 'soft' = "solid"
|
|
45
|
-
- `tone?`: '
|
|
45
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "error"
|
|
46
46
|
- `dot?`: boolean
|
|
47
47
|
- `hideZero?`: boolean = true
|
|
48
48
|
- `max?`: number = 99
|
|
@@ -125,7 +125,7 @@ Props:
|
|
|
125
125
|
- `icon?`: icon = "search"
|
|
126
126
|
- `message?`: string
|
|
127
127
|
- `compact?`: boolean
|
|
128
|
-
- `tone?`: '
|
|
128
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
129
129
|
- `art?`: ReactNode
|
|
130
130
|
- `action?`: object
|
|
131
131
|
|
|
@@ -175,7 +175,7 @@ Props:
|
|
|
175
175
|
- `title?`: string
|
|
176
176
|
- `children?`: ReactNode
|
|
177
177
|
- `icon?`: icon
|
|
178
|
-
- `tone?`: '
|
|
178
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "info"
|
|
179
179
|
- `onDismiss?`: () => void
|
|
180
180
|
- `action?`: object
|
|
181
181
|
|
|
@@ -11,7 +11,7 @@ Props:
|
|
|
11
11
|
- `value`: string
|
|
12
12
|
- `icon?`: icon
|
|
13
13
|
- `onPress?`: () => void
|
|
14
|
-
- `tone?`: '
|
|
14
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
15
15
|
- `loading?`: boolean
|
|
16
16
|
- `trend?`: ReactNode
|
|
17
17
|
- `delta?`: object
|
|
@@ -39,7 +39,7 @@ Example: `<G9KpiGrid />`
|
|
|
39
39
|
|
|
40
40
|
Props:
|
|
41
41
|
- `text`: string
|
|
42
|
-
- `tone?`: '
|
|
42
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
43
43
|
|
|
44
44
|
Example: `<G9LiveBadge text="Label" />`
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ A live dot with an expanding ring (Riskara Pulse, «online», a running sync).
|
|
|
51
51
|
|
|
52
52
|
Props:
|
|
53
53
|
- `size?`: number = 8
|
|
54
|
-
- `tone?`: '
|
|
54
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "success"
|
|
55
55
|
- `pulse?`: boolean = true
|
|
56
56
|
|
|
57
57
|
Example: `<G9LiveDot />`
|
|
@@ -114,7 +114,7 @@ Props:
|
|
|
114
114
|
- `value?`: number = 0
|
|
115
115
|
- `disabled?`: boolean = false
|
|
116
116
|
- `labelPlacement?`: 'none' | 'above' | 'end' = "none"
|
|
117
|
-
- `progressType?`: '
|
|
117
|
+
- `progressType?`: 'error' | 'primary' | 'success' | 'warning' = "primary"
|
|
118
118
|
- `barHeight?`: number = 10
|
|
119
119
|
- `cornerRadius?`: number = 999
|
|
120
120
|
- `flat?`: boolean
|
|
@@ -132,7 +132,7 @@ Props:
|
|
|
132
132
|
- `value`: number
|
|
133
133
|
- `children?`: ReactNode
|
|
134
134
|
- `size?`: number = 72
|
|
135
|
-
- `tone?`: '
|
|
135
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "primary"
|
|
136
136
|
- `trackColor?`: color
|
|
137
137
|
- `color?`: color
|
|
138
138
|
- `thickness?`: number = 6
|