@g9tm/lynxcontrols 2.6.9 → 2.6.10
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/catalog.json +36 -3
- package/catalog/index.md +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/fields/extra-entries.d.ts.map +1 -1
- package/dist/fields/extra-entries.jsx +10 -1
- package/dist/fields/fields.css +1 -1
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/pin-entry.d.ts.map +1 -1
- package/dist/fields/pin-entry.jsx +4 -0
- package/dist/fields/use-text-input.d.ts.map +1 -1
- package/dist/fields/use-text-input.jsx +4 -0
- package/dist/layout/containers.d.ts.map +1 -1
- package/dist/layout/containers.jsx +6 -1
- package/dist/layout/layout.css +0 -5
- package/dist/layout/layout.css.map +1 -1
- package/dist/layout/scrollers.d.ts.map +1 -1
- package/dist/layout/scrollers.jsx +6 -2
- package/dist/list/list.css +6 -2
- package/dist/list/list.css.map +1 -1
- package/dist/list/rows.d.ts.map +1 -1
- package/dist/list/rows.jsx +6 -2
- package/dist/list/virtual-list.d.ts.map +1 -1
- package/dist/list/virtual-list.jsx +6 -3
- package/dist/pickers/wheel-column.d.ts.map +1 -1
- package/dist/pickers/wheel-column.jsx +17 -3
- package/dist/popover/popover.d.ts +4 -1
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/popover/popover.jsx +12 -2
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.jsx +1 -0
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +12 -0
- package/dist/provider/text-focus.d.ts +20 -0
- package/dist/provider/text-focus.d.ts.map +1 -0
- package/dist/provider/text-focus.jsx +33 -0
- package/dist/provider/theme.css +2 -0
- package/dist/provider/theme.css.map +1 -1
- package/dist/route/path-navigator.d.ts.map +1 -1
- package/dist/route/path-navigator.jsx +9 -3
- package/dist/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +2 -1
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +59 -35
- package/dist/sheet/sheet.css +9 -1
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +6 -2
- package/package.json +2 -2
package/dist/sheet/frame.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./sheet.css";
|
|
2
2
|
import { createAbortController, formatColor, g9Ms, resolveThemeColor, tryParseColor, withAlpha } from "@g9tm/lynxcontrols-foundation";
|
|
3
3
|
import { SheetBackdrop, SheetContent, SheetRoot, SheetView } from "@lynx-js/lynx-ui-sheet";
|
|
4
|
-
import { useEffect, useMemo, useRef, useState } from "@lynx-js/react";
|
|
4
|
+
import { runOnMainThread, useEffect, useMainThreadRef, useMemo, useRef, useState } from "@lynx-js/react";
|
|
5
5
|
import { G9AnchorLayerContext } from "../anchor/context.jsx";
|
|
6
6
|
import { g9IdProps } from "../base/control.jsx";
|
|
7
7
|
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
@@ -200,6 +200,25 @@ function G9SheetFrame(props) {
|
|
|
200
200
|
resting,
|
|
201
201
|
layout.fit
|
|
202
202
|
]);
|
|
203
|
+
const anchor = useMainThreadRef(null);
|
|
204
|
+
const [anchorStyle] = useState(()=>({
|
|
205
|
+
height: `${props.hostHeight}px`
|
|
206
|
+
}));
|
|
207
|
+
const anchorHeight = useRef(props.hostHeight);
|
|
208
|
+
function setAnchorHeightMT(height) {
|
|
209
|
+
'main thread';
|
|
210
|
+
var _anchor_current;
|
|
211
|
+
null == (_anchor_current = anchor.current) || _anchor_current.setStyleProperties({
|
|
212
|
+
height: `${height}px`
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
useEffect(()=>{
|
|
216
|
+
if (Math.abs(anchorHeight.current - props.hostHeight) < 1) return;
|
|
217
|
+
anchorHeight.current = props.hostHeight;
|
|
218
|
+
runOnMainThread(setAnchorHeightMT)(props.hostHeight);
|
|
219
|
+
}, [
|
|
220
|
+
props.hostHeight
|
|
221
|
+
]);
|
|
203
222
|
const lastHostHeight = useRef(props.hostHeight);
|
|
204
223
|
useEffect(()=>{
|
|
205
224
|
var _rootRef_current;
|
|
@@ -257,7 +276,10 @@ function G9SheetFrame(props) {
|
|
|
257
276
|
perSheetClose: null != o.closeAnimationDurationMs,
|
|
258
277
|
sizeScaled: settings.sizeScaledAnimationDuration
|
|
259
278
|
});
|
|
279
|
+
const bodyGap = o.showToolbar && false !== o.useStandardBodyTopGap;
|
|
260
280
|
const content = <view className={`g9-sheet__content${false === o.scrollBody && layout.fillBody ? ' g9-sheet__content--fill' : ''}`} key={entry.version} bindlayoutchange={onBodyLayout}>
|
|
281
|
+
{}
|
|
282
|
+
{bodyGap && false !== o.scrollBody ? <view className="g9-sheet__body-gap"/> : null}
|
|
261
283
|
{body}
|
|
262
284
|
{!revealed ? placeholder : null}
|
|
263
285
|
{covering ? <view className="g9-sheet__cover" style={{
|
|
@@ -309,13 +331,14 @@ function G9SheetFrame(props) {
|
|
|
309
331
|
]} catchtouchmove={noop}/>
|
|
310
332
|
</SheetBackdrop> : null}
|
|
311
333
|
{}
|
|
312
|
-
<
|
|
313
|
-
<
|
|
334
|
+
<view className={`g9-sheet__anchor${modal ? '' : ' g9-sheet__anchor--passthrough'}`} style={anchorStyle} main-thread:ref={anchor}>
|
|
335
|
+
<SheetContent className={`g9-sheet g9-sheet--${entry.status}${layout.fit ? ' g9-sheet--fit' : ''}`} style={platformSheetConstraints(o)} innerStyle={sheetInnerStyle} {...motion}>
|
|
336
|
+
<G9SheetGestureFrame refs={gesture} canDrag={!layout.dragDisabled} bodyDrags={false !== o.scrollingExpandsSheet} className="g9-sheet__frame" style={{
|
|
314
337
|
...recede,
|
|
315
338
|
transition: g9SheetRecedeTransition()
|
|
316
339
|
}}>
|
|
317
|
-
|
|
318
|
-
|
|
340
|
+
{}
|
|
341
|
+
<view className={`g9-sheet__surface g9-dir-${dir}`} event-through={false} {...g9IdProps(o.automationId)} style={{
|
|
319
342
|
backgroundColor: surface,
|
|
320
343
|
borderTopLeftRadius: `${corner}px`,
|
|
321
344
|
borderTopRightRadius: `${corner}px`,
|
|
@@ -323,28 +346,28 @@ function G9SheetFrame(props) {
|
|
|
323
346
|
paddingBottom: `${bottomPadding}px`,
|
|
324
347
|
...notch
|
|
325
348
|
}}>
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
349
|
+
<G9SheetContextProvider value={contextValue}>
|
|
350
|
+
<G9AnchorLayerContext.Provider value={anchorLayer}>
|
|
351
|
+
{}
|
|
352
|
+
<view className="g9-sheet__chrome-top" flatten={false} consume-slide-event={[
|
|
330
353
|
[
|
|
331
354
|
-180,
|
|
332
355
|
180
|
|
333
356
|
]
|
|
334
357
|
]} bindlayoutchange={onChromeTopLayout}>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
358
|
+
{layout.showHandle || layout.fullScreen && o.showToolbar && false !== o.showFullScreenDragHandle && !layout.dragDisabled ? <view className="g9-sheet__grabber-area">
|
|
359
|
+
<view className="g9-sheet__grabber"/>
|
|
360
|
+
</view> : null}
|
|
361
|
+
<G9SheetHeader options={o} onBack={()=>void stack.requestBack(entry.id, 'toolbarButton')}/>
|
|
362
|
+
{bodyGap && false === o.scrollBody ? <view className="g9-sheet__body-gap"/> : null}
|
|
363
|
+
</view>
|
|
364
|
+
{false === o.scrollBody ? <view className={`g9-sheet__body ${layout.fillBody ? 'g9-sheet__body--static g9-sheet__body--fill' : 'g9-sheet__body--static-fit'}`} style={{
|
|
342
365
|
padding: `${pad}px`,
|
|
343
366
|
...steadyStyle
|
|
344
367
|
}}>
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
368
|
+
{content}
|
|
369
|
+
</view> : indicator.current ? <view className={`g9-sheet__body-frame${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}>
|
|
370
|
+
<scroll-view className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`} scroll-orientation="vertical" main-thread:ref={gesture.body} main-thread:bindscroll={phone ? bodyGesture.onScrollMT : void 0} main-thread:bindtouchstart={bodyGesture.onTouchStartMT} scroll-event-throttle={16} {...endProps} bindscroll={(e)=>{
|
|
348
371
|
var _ref;
|
|
349
372
|
var _e_detail, _indicator_current;
|
|
350
373
|
return null == (_indicator_current = indicator.current) ? void 0 : _indicator_current.setTop(null != (_ref = null == (_e_detail = e.detail) ? void 0 : _e_detail.scrollTop) ? _ref : 0);
|
|
@@ -359,35 +382,36 @@ function G9SheetFrame(props) {
|
|
|
359
382
|
} : {},
|
|
360
383
|
...steadyStyle
|
|
361
384
|
}}>
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
385
|
+
{content}
|
|
386
|
+
</scroll-view>
|
|
387
|
+
<G9SheetScrollIndicator model={indicator.current}/>
|
|
388
|
+
</view> : <scroll-view className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`} scroll-orientation="vertical" main-thread:ref={gesture.body} main-thread:bindscroll={phone ? bodyGesture.onScrollMT : void 0} main-thread:bindtouchstart={bodyGesture.onTouchStartMT} {...endProps} style={{
|
|
366
389
|
padding: `${pad}px`,
|
|
367
390
|
...null !== maxBody ? {
|
|
368
391
|
maxHeight: `${maxBody}px`
|
|
369
392
|
} : {},
|
|
370
393
|
...steadyStyle
|
|
371
394
|
}}>
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
395
|
+
{content}
|
|
396
|
+
</scroll-view>}
|
|
397
|
+
<view className="g9-sheet__footer-slot" flatten={false} consume-slide-event={[
|
|
375
398
|
[
|
|
376
399
|
-180,
|
|
377
400
|
180
|
|
378
401
|
]
|
|
379
402
|
]} bindlayoutchange={onFooterLayout}>
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
403
|
+
<G9SheetFooter options={o}/>
|
|
404
|
+
</view>
|
|
405
|
+
</G9AnchorLayerContext.Provider>
|
|
406
|
+
</G9SheetContextProvider>
|
|
407
|
+
</view>
|
|
408
|
+
{}
|
|
409
|
+
<view className="g9-sheet__skirt" style={{
|
|
387
410
|
backgroundColor: surface
|
|
388
411
|
}}/>
|
|
389
|
-
|
|
390
|
-
|
|
412
|
+
</G9SheetGestureFrame>
|
|
413
|
+
</SheetContent>
|
|
414
|
+
</view>
|
|
391
415
|
</SheetView>
|
|
392
416
|
</SheetRoot>;
|
|
393
417
|
}
|
package/dist/sheet/sheet.css
CHANGED
|
@@ -23,7 +23,15 @@
|
|
|
23
23
|
right: 0;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.g9-
|
|
26
|
+
.g9-sheet__anchor {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
right: 0;
|
|
31
|
+
overflow: visible;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.g9-sheet__view--passthrough, .g9-sheet__anchor--passthrough {
|
|
27
35
|
pointer-events: none;
|
|
28
36
|
}
|
|
29
37
|
|
package/dist/sheet/sheet.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,oBAAoB;EACpB,QAAQ;EACR,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;AACT;;AAKA;EAFE,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,oBAAoB;AACtB;;AAMA;EAHE,oBAAoB;AACtB;;AAMA;EAHE,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,g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,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB","sourcesContent":["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* The layer's height, measured (service.tsx): a childless, zero-width, full-height box no sheet event passes through. */\n.g9-sheet-stack__probe {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n/* The drag-catcher inside the dim (frame.tsx): fills it, takes the slides the platform would hand to the page behind. */\n.g9-sheet__scrim-catch {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.g9-sheet__scrim--covered .g9-sheet__scrim-catch {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n/* The grabber, header and body gap, measured as one: a fit sheet's cap includes them (MAUI). */\n.g9-sheet__chrome-top {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* MAUI UseStandardBodyTopGap: SheetHeaderVerticalGap under the header (10, or the app's scaled value). */\n.g9-sheet__body-gap {\n height: var(--g9-layout-sheet-header-vertical-gap, 10px);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n/* scrollIndicator: 'always' — the scroller and its thumb (scroll-indicator.tsx). The frame takes the body's place. */\n.g9-sheet__body-frame {\n display: flex;\n flex-direction: column;\n flex-shrink: 1;\n position: relative;\n}\n\n.g9-sheet__scroll-thumb {\n position: absolute;\n background-color: var(--g9-on-surface-variant);\n opacity: 0.45;\n pointer-events: none;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n/* scrollBody: false in a fit sheet — as tall as the content (which sizes its own scrolling part: G9SheetScrollRegion) */\n.g9-sheet__body--static-fit {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n font-family: var(--g9-font-text-700);\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n\n/* G9SheetScrollRegion: never shrinks under its siblings (native Lynx has no min-height:auto) */\n.g9-sheet-region {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-region__content {\n display: flex;\n flex-direction: column;\n}\n\n/* G9SheetBackdropScope: the region that recedes behind a sheet */\n.g9-backdrop-scope {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-backdrop-scope__content {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n overflow: hidden;\n background-color: var(--g9-background);\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,oBAAoB;EACpB,QAAQ;EACR,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;AACT;;AAKA;EAFE,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,QAAQ;EACR,iBAAiB;AACnB;;AAQA;EALE,oBAAoB;AACtB;;AAaA;EAVE,oBAAoB;AACtB;;AAaA;EAVE,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,gBAAgB;AAClB;;AAcA;EAXE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,iBAAiB;AACnB;;AAcA;EAXE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,gBAAgB;AAClB;;AAeA;EAZE,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAeA;EAZE,oBAAoB;EACpB,kBAAkB;E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ClB,aAAa;AACf;;AA0BA;EAvBE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AA0BA;EAvBE,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AA0BA;EAvBE,mBAAmB;EACnB,yBAAyB;EACzB,mBAAmB;EACnB,aAAa;AACf;;AA0BA;EAvBE,yBAAyB;AAC3B;;AA0BA;EAvBE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AA0BA;EAvBE,cAAc;AAChB;;AA0BA;EAvBE,2BAA2B;EAC3B,mBAAmB;EACnB,aAAa;AACf;;AA0BA;EAvBE,0BAA0B;EAC1B,uBAAuB;EACvB,iBAAiB;EACjB,oCAAoC;AACtC;;AA0BA;EAvBE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AA2BA;EAxBE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AA2BA;EAxBE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,sBAAsB;EACtB,YAAY;EACZ,kBAAkB;EAClB,aAAa;AACf;;AA2BA;EAxBE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AA6BA;EA1BE,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf;;AA8BA;EA3BE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AA8BA;EA3BE,sBAAsB;EACtB,aAAa;AACf;;AA+BA;EA5BE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,aAAa;AACf;;AA+BA;EA5BE,sCAAsC;EACtC,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB","sourcesContent":["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* The layer's height, measured (service.tsx): a childless, zero-width, full-height box no sheet event passes through. */\n.g9-sheet-stack__probe {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* The box the sheet hangs from (frame.tsx): the height lynx-ui's offsets were computed for, so a layer that shrinks\n under it (a host's IME padding) moves no sheet until the re-snap. Overflow stays visible: the view clips, as before. */\n.g9-sheet__anchor {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n overflow: visible;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n/* A non-modal sheet's anchor spans the layer too: it lets every touch through like the view around it. */\n.g9-sheet__anchor--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n/* The drag-catcher inside the dim (frame.tsx): fills it, takes the slides the platform would hand to the page behind. */\n.g9-sheet__scrim-catch {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.g9-sheet__scrim--covered .g9-sheet__scrim-catch {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n/* The grabber, header and body gap, measured as one: a fit sheet's cap includes them (MAUI). */\n.g9-sheet__chrome-top {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* MAUI UseStandardBodyTopGap: SheetHeaderVerticalGap under the header (10, or the app's scaled value). */\n.g9-sheet__body-gap {\n height: var(--g9-layout-sheet-header-vertical-gap, 10px);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n/* scrollIndicator: 'always' — the scroller and its thumb (scroll-indicator.tsx). The frame takes the body's place. */\n.g9-sheet__body-frame {\n display: flex;\n flex-direction: column;\n flex-shrink: 1;\n position: relative;\n}\n\n.g9-sheet__scroll-thumb {\n position: absolute;\n background-color: var(--g9-on-surface-variant);\n opacity: 0.45;\n pointer-events: none;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n/* scrollBody: false in a fit sheet — as tall as the content (which sizes its own scrolling part: G9SheetScrollRegion) */\n.g9-sheet__body--static-fit {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n font-family: var(--g9-font-text-700);\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n\n/* G9SheetScrollRegion: never shrinks under its siblings (native Lynx has no min-height:auto) */\n.g9-sheet-region {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-region__content {\n display: flex;\n flex-direction: column;\n}\n\n/* G9SheetBackdropScope: the region that recedes behind a sheet */\n.g9-backdrop-scope {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-backdrop-scope__content {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n overflow: hidden;\n background-color: var(--g9-background);\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/toggle/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAe,KAAK,eAAe,EAA0B,MAAM,+BAA+B,CAAC;AAG1G,OAAO,EAAE,KAAK,kBAAkB,EAAyC,MAAM,iBAAiB,CAAC;AAOjG,iFAAiF;AACjF,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAC;AAEH,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAM5F;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,GAAG,M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B,6DAA6D;IAC7D,MAAM,IAAI,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,8GAgJtB,CAAC"}
|
package/dist/toggle/checkbox.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./toggle.css";
|
|
2
2
|
import { G9StringKey, formatColor, withAlpha } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from "@lynx-js/react";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "@lynx-js/react";
|
|
4
4
|
import { g9RowStyle, g9TextStart, useG9Control } from "../base/control.jsx";
|
|
5
5
|
import { useG9Press } from "../base/press.jsx";
|
|
6
6
|
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
@@ -79,6 +79,7 @@ const G9CheckBox = forwardRef(function(props, ref) {
|
|
|
79
79
|
progress: progressTarget,
|
|
80
80
|
morph: morphTarget
|
|
81
81
|
});
|
|
82
|
+
const [rest, setRest] = useState(drawn.current);
|
|
82
83
|
const frame = useRef(null);
|
|
83
84
|
const latest = useRef({
|
|
84
85
|
colors,
|
|
@@ -113,6 +114,9 @@ const G9CheckBox = forwardRef(function(props, ref) {
|
|
|
113
114
|
}).exec();
|
|
114
115
|
} catch {}
|
|
115
116
|
frame.current = p < 1 || q < 1 ? startTimer(step, 16) : null;
|
|
117
|
+
if (null === frame.current) setRest({
|
|
118
|
+
...drawn.current
|
|
119
|
+
});
|
|
116
120
|
};
|
|
117
121
|
if (null !== frame.current) stopTimer(frame.current);
|
|
118
122
|
step();
|
|
@@ -154,7 +158,7 @@ const G9CheckBox = forwardRef(function(props, ref) {
|
|
|
154
158
|
<view className={`g9-checkbox__slot${reserve ? ' g9-checkbox__slot--reserve' : ''}`} style={{
|
|
155
159
|
width: `${reserve ? g9CheckBoxMetrics.touchTarget : g9CheckBoxMetrics.box}px`
|
|
156
160
|
}}>
|
|
157
|
-
<svg ref={svgRef} className="g9-checkbox__box" content={checkBoxSvg(
|
|
161
|
+
<svg ref={svgRef} className="g9-checkbox__box" content={checkBoxSvg(rest.progress, rest.morph, colors, control.disabled)}/>
|
|
158
162
|
</view>
|
|
159
163
|
{text1 ? <text className="g9-checkbox__text" style={{
|
|
160
164
|
...g9TextStart(control.direction),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
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",
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"build": "rslib build"
|
|
235
235
|
},
|
|
236
236
|
"dependencies": {
|
|
237
|
-
"@g9tm/lynxcontrols-foundation": "2.6.
|
|
237
|
+
"@g9tm/lynxcontrols-foundation": "2.6.10"
|
|
238
238
|
},
|
|
239
239
|
"peerDependencies": {
|
|
240
240
|
"@lynx-js/react": ">=0.129.3 <0.130.0",
|