@g9tm/lynxcontrols 2.3.0 → 2.4.1
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/bin/g9lynx.mjs +103 -0
- package/bin/g9lynx.test.mjs +80 -0
- package/catalog/cards/DateTimeSheetBody.md +17 -0
- package/catalog/cards/G9ActionRow.md +11 -0
- package/catalog/cards/G9ActionSheet.md +14 -0
- package/catalog/cards/G9Activity.md +11 -0
- package/catalog/cards/G9ActivityIndicator.md +14 -0
- package/catalog/cards/G9AllocationInput.md +17 -0
- package/catalog/cards/G9Anchor.md +17 -0
- package/catalog/cards/G9AnimatedCheck.md +13 -0
- package/catalog/cards/G9AppBar.md +17 -0
- package/catalog/cards/G9AppShell.md +17 -0
- package/catalog/cards/G9Art.md +13 -0
- package/catalog/cards/G9Avatar.md +16 -0
- package/catalog/cards/G9Badge.md +15 -0
- package/catalog/cards/G9Bento.md +13 -0
- package/catalog/cards/G9Button.md +17 -0
- package/catalog/cards/G9CameFromMark.md +9 -0
- package/catalog/cards/G9Card.md +17 -0
- package/catalog/cards/G9CascadePanel.md +17 -0
- package/catalog/cards/G9CheckBox.md +17 -0
- package/catalog/cards/G9Chip.md +17 -0
- package/catalog/cards/G9ChipGroup.md +17 -0
- package/catalog/cards/G9ChoiceList.md +17 -0
- package/catalog/cards/G9Columns.md +13 -0
- package/catalog/cards/G9ComboBox.md +17 -0
- package/catalog/cards/G9CommandPalette.md +15 -0
- package/catalog/cards/G9Confetti.md +15 -0
- package/catalog/cards/G9ConnectionBanner.md +15 -0
- package/catalog/cards/G9ContextMenu.md +15 -0
- package/catalog/cards/G9CornerBadge.md +15 -0
- package/catalog/cards/G9CultureDateTimeLabel.md +16 -0
- package/catalog/cards/G9DateTimePicker.md +17 -0
- package/catalog/cards/G9DayStepper.md +17 -0
- package/catalog/cards/G9DeferredContent.md +17 -0
- package/catalog/cards/G9Delta.md +17 -0
- package/catalog/cards/G9DesignNode.md +13 -0
- package/catalog/cards/G9DesignScope.md +11 -0
- package/catalog/cards/G9DragList.md +15 -0
- package/catalog/cards/G9EdgePanel.md +17 -0
- package/catalog/cards/G9Editor.md +17 -0
- package/catalog/cards/G9EmptyState.md +17 -0
- package/catalog/cards/G9ErrorBoundary.md +13 -0
- package/catalog/cards/G9Expander.md +17 -0
- package/catalog/cards/G9FloatingOrb.md +17 -0
- package/catalog/cards/G9FormField.md +15 -0
- package/catalog/cards/G9HScroll.md +16 -0
- package/catalog/cards/G9HeaderActionButton.md +17 -0
- package/catalog/cards/G9HoldButton.md +17 -0
- package/catalog/cards/G9Host.md +17 -0
- package/catalog/cards/G9Icon.md +16 -0
- package/catalog/cards/G9IconButton.md +17 -0
- package/catalog/cards/G9IconRail.md +15 -0
- package/catalog/cards/G9IconSlot.md +17 -0
- package/catalog/cards/G9Image.md +17 -0
- package/catalog/cards/G9InlineMessage.md +16 -0
- package/catalog/cards/G9KeepAlive.md +11 -0
- package/catalog/cards/G9Keycap.md +13 -0
- package/catalog/cards/G9Kpi.md +17 -0
- package/catalog/cards/G9KpiGrid.md +12 -0
- package/catalog/cards/G9ListRow.md +17 -0
- package/catalog/cards/G9LiveBadge.md +11 -0
- package/catalog/cards/G9LiveDot.md +12 -0
- package/catalog/cards/G9LoadState.md +13 -0
- package/catalog/cards/G9LoadableSheetContent.md +17 -0
- package/catalog/cards/G9LockOverlay.md +15 -0
- package/catalog/cards/G9Menu.md +17 -0
- package/catalog/cards/G9MenuList.md +12 -0
- package/catalog/cards/G9NavCard.md +17 -0
- package/catalog/cards/G9NumPad.md +13 -0
- package/catalog/cards/G9NumberEntry.md +17 -0
- package/catalog/cards/G9OutlinedField.md +17 -0
- package/catalog/cards/G9OverlayRoot.md +12 -0
- package/catalog/cards/G9Page.md +17 -0
- package/catalog/cards/G9PageLoadingOverlay.md +12 -0
- package/catalog/cards/G9Pager.md +16 -0
- package/catalog/cards/G9Photo.md +17 -0
- package/catalog/cards/G9Picker.md +17 -0
- package/catalog/cards/G9PinEntry.md +17 -0
- package/catalog/cards/G9Place.md +17 -0
- package/catalog/cards/G9PlaceScroll.md +13 -0
- package/catalog/cards/G9PlusButton.md +17 -0
- package/catalog/cards/G9Popover.md +17 -0
- package/catalog/cards/G9PopupDragHandle.md +10 -0
- package/catalog/cards/G9PopupView.md +15 -0
- package/catalog/cards/G9Pressable.md +17 -0
- package/catalog/cards/G9ProcessingSheetContent.md +13 -0
- package/catalog/cards/G9ProgressBar.md +17 -0
- package/catalog/cards/G9ProgressRing.md +17 -0
- package/catalog/cards/G9Provider.md +17 -0
- package/catalog/cards/G9PullToRefresh.md +13 -0
- package/catalog/cards/G9RadioGroup.md +17 -0
- package/catalog/cards/G9RangeSlider.md +17 -0
- package/catalog/cards/G9RatingInput.md +17 -0
- package/catalog/cards/G9RevealText.md +15 -0
- package/catalog/cards/G9SafeButton.md +17 -0
- package/catalog/cards/G9SafeIconButton.md +17 -0
- package/catalog/cards/G9SaveBar.md +16 -0
- package/catalog/cards/G9ScaleInput.md +17 -0
- package/catalog/cards/G9ScrollSpyBar.md +12 -0
- package/catalog/cards/G9ScrollerScope.md +10 -0
- package/catalog/cards/G9SearchEntry.md +17 -0
- package/catalog/cards/G9Section.md +16 -0
- package/catalog/cards/G9SectionHeader.md +14 -0
- package/catalog/cards/G9Segmented.md +17 -0
- package/catalog/cards/G9Separator.md +17 -0
- package/catalog/cards/G9SettingsGroup.md +13 -0
- package/catalog/cards/G9Sheet.md +13 -0
- package/catalog/cards/G9SheetBackdropScope.md +10 -0
- package/catalog/cards/G9SheetFooter.md +10 -0
- package/catalog/cards/G9SheetFooterBar.md +11 -0
- package/catalog/cards/G9SheetFrame.md +17 -0
- package/catalog/cards/G9SheetHeader.md +11 -0
- package/catalog/cards/G9SheetScrollIndicator.md +10 -0
- package/catalog/cards/G9SheetScrollRegion.md +11 -0
- package/catalog/cards/G9SheetSkeleton.md +13 -0
- package/catalog/cards/G9ShimmerBand.md +10 -0
- package/catalog/cards/G9ShortcutList.md +11 -0
- package/catalog/cards/G9ShortcutsSheet.md +15 -0
- package/catalog/cards/G9SideNav.md +16 -0
- package/catalog/cards/G9Skeleton.md +13 -0
- package/catalog/cards/G9SkeletonPage.md +13 -0
- package/catalog/cards/G9SkeletonRows.md +13 -0
- package/catalog/cards/G9SplitPane.md +17 -0
- package/catalog/cards/G9StatusPill.md +17 -0
- package/catalog/cards/G9StepSlider.md +16 -0
- package/catalog/cards/G9StepTracker.md +13 -0
- package/catalog/cards/G9Stepper.md +17 -0
- package/catalog/cards/G9SuccessHeader.md +14 -0
- package/catalog/cards/G9Swatch.md +13 -0
- package/catalog/cards/G9SwipeGroup.md +11 -0
- package/catalog/cards/G9SwipeView.md +17 -0
- package/catalog/cards/G9Switch.md +17 -0
- package/catalog/cards/G9SwitchGroup.md +15 -0
- package/catalog/cards/G9SwitchRow.md +17 -0
- package/catalog/cards/G9TabBar.md +17 -0
- package/catalog/cards/G9TabView.md +17 -0
- package/catalog/cards/G9Tag.md +14 -0
- package/catalog/cards/G9TagEntry.md +16 -0
- package/catalog/cards/G9TextEntry.md +17 -0
- package/catalog/cards/G9ThemePreviewCard.md +15 -0
- package/catalog/cards/G9TimeEntry.md +17 -0
- package/catalog/cards/G9TimeSpanPicker.md +17 -0
- package/catalog/cards/G9TitleWithLine.md +13 -0
- package/catalog/cards/G9TopBar.md +13 -0
- package/catalog/cards/G9UnsavedBar.md +16 -0
- package/catalog/cards/G9UpdateBar.md +15 -0
- package/catalog/cards/G9VerticalIconTextButton.md +15 -0
- package/catalog/cards/G9VirtualList.md +17 -0
- package/catalog/cards/G9Wave.md +15 -0
- package/catalog/cards/G9WheelColumn.md +17 -0
- package/catalog/cards/PickerField.md +14 -0
- package/catalog/cards/PickerSheetHeader.md +12 -0
- package/catalog/cards/PopupFrame.md +15 -0
- package/catalog/cards/PopupInputForm.md +11 -0
- package/catalog/cards/SelectionValueIcon.md +12 -0
- package/catalog/cards/TimeSpanSheetBody.md +16 -0
- package/catalog/catalog.json +47936 -0
- package/catalog/index.md +159 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/anchor/index.d.ts +1 -1
- package/dist/anchor/index.d.ts.map +1 -1
- package/dist/anchor/registry.d.ts +5 -0
- package/dist/anchor/registry.d.ts.map +1 -1
- package/dist/base/base.css +1 -0
- package/dist/base/base.css.map +1 -1
- package/dist/button/button-variants.css +4 -0
- package/dist/button/button-variants.css.map +1 -1
- package/dist/button/button.css +12 -5
- package/dist/button/button.css.map +1 -1
- package/dist/button/variant-css.d.ts.map +1 -1
- package/dist/button/variant-css.jsx +2 -1
- package/dist/cascade/cascade.css +2 -1
- package/dist/cascade/cascade.css.map +1 -1
- package/dist/commands/commands.css +12 -6
- package/dist/commands/commands.css.map +1 -1
- package/dist/design/design.d.ts +39 -0
- package/dist/design/design.d.ts.map +1 -0
- package/dist/design/design.jsx +54 -0
- package/dist/design/index.d.ts +3 -0
- package/dist/design/index.d.ts.map +1 -0
- package/dist/design/index.jsx +2 -0
- package/dist/design/probe.d.ts +62 -0
- package/dist/design/probe.d.ts.map +1 -0
- package/dist/design/probe.jsx +141 -0
- package/dist/display/data-uri.d.ts +9 -0
- package/dist/display/data-uri.d.ts.map +1 -0
- package/dist/display/data-uri.jsx +56 -0
- package/dist/display/display.css +10 -3
- package/dist/display/display.css.map +1 -1
- package/dist/display/extras.css +8 -2
- package/dist/display/extras.css.map +1 -1
- package/dist/display/figures.css +28 -7
- package/dist/display/figures.css.map +1 -1
- package/dist/display/figures.d.ts +10 -0
- package/dist/display/figures.d.ts.map +1 -1
- package/dist/display/figures.jsx +28 -5
- package/dist/display/image.d.ts +9 -2
- package/dist/display/image.d.ts.map +1 -1
- package/dist/display/image.jsx +20 -6
- package/dist/display/keycap.css +1 -0
- package/dist/display/keycap.css.map +1 -1
- package/dist/display/motion-figures.css +4 -1
- package/dist/display/motion-figures.css.map +1 -1
- package/dist/display/separator.d.ts.map +1 -1
- package/dist/display/separator.jsx +1 -1
- package/dist/display/status.css +5 -0
- package/dist/display/status.css.map +1 -1
- package/dist/display/theme-preview.css +6 -3
- package/dist/display/theme-preview.css.map +1 -1
- package/dist/edge-panel/edge-panel.css +6 -3
- package/dist/edge-panel/edge-panel.css.map +1 -1
- package/dist/effects/effects.css +4 -2
- package/dist/effects/effects.css.map +1 -1
- package/dist/expander/expander.css +2 -1
- package/dist/expander/expander.css.map +1 -1
- package/dist/fields/extra-entries.css +14 -6
- package/dist/fields/extra-entries.css.map +1 -1
- package/dist/fields/fields.css +21 -10
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +3 -0
- package/dist/guide/guide.css +17 -5
- package/dist/guide/guide.css.map +1 -1
- package/dist/header/header.css +6 -2
- package/dist/header/header.css.map +1 -1
- package/dist/icon/icon.d.ts +9 -2
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +26 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/layout.css +15 -5
- package/dist/layout/layout.css.map +1 -1
- package/dist/layout/scrollers.d.ts +6 -0
- package/dist/layout/scrollers.d.ts.map +1 -1
- package/dist/layout/scrollers.jsx +5 -1
- package/dist/list/list.css +18 -8
- package/dist/list/list.css.map +1 -1
- package/dist/orb/orb.css +2 -1
- package/dist/orb/orb.css.map +1 -1
- package/dist/orb/orb.d.ts.map +1 -1
- package/dist/orb/orb.jsx +9 -4
- package/dist/pickers/day-stepper.css +2 -1
- package/dist/pickers/day-stepper.css.map +1 -1
- package/dist/pickers/pickers.css +19 -9
- package/dist/pickers/pickers.css.map +1 -1
- package/dist/plus-button/plus-button.css +2 -1
- package/dist/plus-button/plus-button.css.map +1 -1
- package/dist/popover/popover.css +9 -4
- package/dist/popover/popover.css.map +1 -1
- package/dist/popup/popup.css +11 -5
- package/dist/popup/popup.css.map +1 -1
- package/dist/popup/service.d.ts.map +1 -1
- package/dist/popup/service.jsx +5 -1
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts +25 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +48 -12
- package/dist/range-slider/range-slider.css +9 -4
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/selection/selection.css +10 -5
- package/dist/selection/selection.css.map +1 -1
- package/dist/sheet/frame.d.ts +15 -0
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +18 -6
- package/dist/sheet/header.d.ts.map +1 -1
- package/dist/sheet/header.jsx +5 -2
- package/dist/sheet/service.d.ts +5 -0
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +9 -6
- package/dist/sheet/sheet.css +1 -0
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/shell/shell.css +19 -8
- package/dist/shell/shell.css.map +1 -1
- package/dist/survey/survey.css +15 -7
- package/dist/survey/survey.css.map +1 -1
- package/dist/swipe/swipe.css +1 -0
- package/dist/swipe/swipe.css.map +1 -1
- package/dist/tab-bar/index.d.ts +1 -1
- package/dist/tab-bar/index.d.ts.map +1 -1
- package/dist/tab-bar/index.jsx +1 -1
- package/dist/tab-bar/model.d.ts +16 -0
- package/dist/tab-bar/model.d.ts.map +1 -1
- package/dist/tab-bar/model.jsx +19 -1
- package/dist/tab-bar/tab-bar.css +25 -1
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts +6 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +61 -11
- package/dist/tabs/tabs.css +3 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toast/toast.css +9 -4
- package/dist/toast/toast.css.map +1 -1
- package/dist/toggle/choice.css +15 -6
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/toggle.css +12 -6
- package/dist/toggle/toggle.css.map +1 -1
- package/package.json +16 -4
- package/skills/g9-lynx-app/SKILL.md +42 -0
- package/skills/g9-lynx-app/references/adaptive-layout.md +10 -0
- package/skills/g9-lynx-app/references/anchors-guide.md +9 -0
- package/skills/g9-lynx-app/references/catalog-index.md +80 -0
- package/skills/g9-lynx-app/references/common-mistakes.md +12 -0
- package/skills/g9-lynx-app/references/components/anchor.md +30 -0
- package/skills/g9-lynx-app/references/components/barcode-qr.md +19 -0
- package/skills/g9-lynx-app/references/components/barcode.md +37 -0
- package/skills/g9-lynx-app/references/components/base.md +35 -0
- package/skills/g9-lynx-app/references/components/button.md +125 -0
- package/skills/g9-lynx-app/references/components/calendar.md +128 -0
- package/skills/g9-lynx-app/references/components/cascade.md +19 -0
- package/skills/g9-lynx-app/references/components/charts.md +193 -0
- package/skills/g9-lynx-app/references/components/chat.md +98 -0
- package/skills/g9-lynx-app/references/components/commands.md +45 -0
- package/skills/g9-lynx-app/references/components/commerce.md +69 -0
- package/skills/g9-lynx-app/references/components/datagrid.md +19 -0
- package/skills/g9-lynx-app/references/components/deferred.md +19 -0
- package/skills/g9-lynx-app/references/components/design.md +27 -0
- package/skills/g9-lynx-app/references/components/display-1.md +193 -0
- package/skills/g9-lynx-app/references/components/display-2.md +196 -0
- package/skills/g9-lynx-app/references/components/display-3.md +122 -0
- package/skills/g9-lynx-app/references/components/edge-panel.md +19 -0
- package/skills/g9-lynx-app/references/components/effects.md +46 -0
- package/skills/g9-lynx-app/references/components/expander.md +19 -0
- package/skills/g9-lynx-app/references/components/fields.md +174 -0
- package/skills/g9-lynx-app/references/components/header.md +19 -0
- package/skills/g9-lynx-app/references/components/host.md +32 -0
- package/skills/g9-lynx-app/references/components/icon.md +64 -0
- package/skills/g9-lynx-app/references/components/intro-carousel.md +19 -0
- package/skills/g9-lynx-app/references/components/layout-1.md +188 -0
- package/skills/g9-lynx-app/references/components/layout-2.md +18 -0
- package/skills/g9-lynx-app/references/components/list.md +116 -0
- package/skills/g9-lynx-app/references/components/map.md +19 -0
- package/skills/g9-lynx-app/references/components/media.md +115 -0
- package/skills/g9-lynx-app/references/components/orb.md +37 -0
- package/skills/g9-lynx-app/references/components/pickers.md +185 -0
- package/skills/g9-lynx-app/references/components/pilot.md +40 -0
- package/skills/g9-lynx-app/references/components/plus-button.md +19 -0
- package/skills/g9-lynx-app/references/components/popover.md +94 -0
- package/skills/g9-lynx-app/references/components/popup.md +56 -0
- package/skills/g9-lynx-app/references/components/provider.md +43 -0
- package/skills/g9-lynx-app/references/components/range-slider.md +36 -0
- package/skills/g9-lynx-app/references/components/route.md +19 -0
- package/skills/g9-lynx-app/references/components/sheet.md +134 -0
- package/skills/g9-lynx-app/references/components/shell.md +98 -0
- package/skills/g9-lynx-app/references/components/survey.md +55 -0
- package/skills/g9-lynx-app/references/components/swipe.md +31 -0
- package/skills/g9-lynx-app/references/components/tab-bar.md +19 -0
- package/skills/g9-lynx-app/references/components/tabs.md +19 -0
- package/skills/g9-lynx-app/references/components/toggle.md +161 -0
- package/skills/g9-lynx-app/references/lists.md +13 -0
- package/skills/g9-lynx-app/references/localization-rtl.md +13 -0
- package/skills/g9-lynx-app/references/navigation-route.md +21 -0
- package/skills/g9-lynx-app/references/overlays.md +27 -0
- package/skills/g9-lynx-app/references/pilot.md +10 -0
- package/skills/g9-lynx-app/references/platform-rules.md +42 -0
- package/skills/g9-lynx-app/references/provider-and-host.md +37 -0
- package/skills/g9-lynx-app/references/theming.md +18 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/sheet` (generated)
|
|
2
|
+
|
|
3
|
+
# G9LoadableSheetContent
|
|
4
|
+
|
|
5
|
+
`import { G9LoadableSheetContent } from '@g9tm/lynxcontrols/sheet';`
|
|
6
|
+
|
|
7
|
+
Open-then-fill sheet body (MAUI `LoadableSheetContentView`): shows a loading state that fills the sheet's seeded height, loads once after the open motion (or at once with `loadWhileStaged`), cancels on close, and never a
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `children`: (data) => ReactNode
|
|
11
|
+
- `load`: (signal: G9AbortSignal) => void
|
|
12
|
+
- `skeleton?`: 'none' | 'formFields' | 'listRows' = "none"
|
|
13
|
+
- `onLoadFailed?`: (error: unknown) => void
|
|
14
|
+
- `onLoadingChange?`: (loading: boolean) => void
|
|
15
|
+
- `loadingHeight?`: number = 180
|
|
16
|
+
- `renderEmpty?`: () => ReactNode
|
|
17
|
+
- `renderError?`: (error) => ReactNode
|
|
18
|
+
|
|
19
|
+
Example: `<G9LoadableSheetContent children={children} load={load} />`
|
|
20
|
+
|
|
21
|
+
# G9ProcessingSheetContent
|
|
22
|
+
|
|
23
|
+
`import { G9ProcessingSheetContent } from '@g9tm/lynxcontrols/sheet';`
|
|
24
|
+
|
|
25
|
+
The body of a processing sheet (MAUI `ProcessingSheetContentView`): a 42 px spinner in a `loadingHeight` box, then the built body swapped in at once.
|
|
26
|
+
|
|
27
|
+
Props:
|
|
28
|
+
- `build`: (handle, signal) => ReactNode
|
|
29
|
+
- `handle?`: () => void
|
|
30
|
+
- `onError?`: (error: unknown, handle: G9SheetHandle) => void
|
|
31
|
+
- `loadingHeight?`: number = 160
|
|
32
|
+
|
|
33
|
+
Example: `<G9ProcessingSheetContent build={build} />`
|
|
34
|
+
|
|
35
|
+
# G9Sheet
|
|
36
|
+
|
|
37
|
+
`import { G9Sheet } from '@g9tm/lynxcontrols/sheet';`
|
|
38
|
+
|
|
39
|
+
Declarative sheet (the `G9Sheet` adapter): mounts the children as a sheet of the nearest host while `open`, keeps them live (re-renders update the sheet in place), and reports closes the sheet made itself through `onOpen
|
|
40
|
+
|
|
41
|
+
Props:
|
|
42
|
+
- `open`: boolean
|
|
43
|
+
- `children?`: ReactNode
|
|
44
|
+
- `onOpenChange?`: (open: boolean, reason: G9SheetCloseReason) => void
|
|
45
|
+
- `options?`: object
|
|
46
|
+
|
|
47
|
+
Example: `<G9Sheet open />`
|
|
48
|
+
|
|
49
|
+
# G9SheetBackdropScope
|
|
50
|
+
|
|
51
|
+
`import { G9SheetBackdropScope } from '@g9tm/lynxcontrols/sheet';`
|
|
52
|
+
|
|
53
|
+
Wrap the page region that should recede behind an open sheet (the settings' `backdropCardMode` decides when): scaled back, moved down and rounded, over the backdrop colour.
|
|
54
|
+
|
|
55
|
+
Props:
|
|
56
|
+
- `children?`: ReactNode
|
|
57
|
+
|
|
58
|
+
Example: `<G9SheetBackdropScope />`
|
|
59
|
+
|
|
60
|
+
# G9SheetFooter
|
|
61
|
+
|
|
62
|
+
`import { G9SheetFooter } from '@g9tm/lynxcontrols/sheet';`
|
|
63
|
+
|
|
64
|
+
The sheet footer: `footerBand`, else `footerView` in the band, else `footerButtons` in equal columns (3 per row by default), with a divider.
|
|
65
|
+
|
|
66
|
+
Props:
|
|
67
|
+
- `options`: object
|
|
68
|
+
|
|
69
|
+
Example: `<G9SheetFooter options={options} />`
|
|
70
|
+
|
|
71
|
+
# G9SheetFooterBar
|
|
72
|
+
|
|
73
|
+
`import { G9SheetFooterBar } from '@g9tm/lynxcontrols/sheet';`
|
|
74
|
+
|
|
75
|
+
The footer band (divider, padding, equal-width button columns); nothing at all without buttons (MAUI `SheetFooterBar` hides with no visible button).
|
|
76
|
+
|
|
77
|
+
Props:
|
|
78
|
+
- `buttons`: ReactNode
|
|
79
|
+
- `maxButtonsPerRow?`: number = 3
|
|
80
|
+
|
|
81
|
+
Example: `<G9SheetFooterBar buttons={buttons} />`
|
|
82
|
+
|
|
83
|
+
# G9SheetFrame
|
|
84
|
+
|
|
85
|
+
`import { G9SheetFrame } from '@g9tm/lynxcontrols/sheet';`
|
|
86
|
+
|
|
87
|
+
One sheet of the stack on lynx-ui `SheetRoot` (motion, drag, snap points from lynx-ui; G9 adds detent mapping, scrim, header/footer, deferred content, recede and results).
|
|
88
|
+
|
|
89
|
+
Props:
|
|
90
|
+
- `culture`: string
|
|
91
|
+
- `entry`: object
|
|
92
|
+
- `hostHeight`: number
|
|
93
|
+
- `hostWidth`: number
|
|
94
|
+
- `isTop`: boolean
|
|
95
|
+
- `memo`: object
|
|
96
|
+
- `settings`: object
|
|
97
|
+
- `stack`: object
|
|
98
|
+
|
|
99
|
+
Example: `<G9SheetFrame culture="culture" entry={entry} hostHeight={1} hostWidth={1} isTop memo={memo} settings={settings} stack={stack} topInset={1} />`
|
|
100
|
+
|
|
101
|
+
# G9SheetHeader
|
|
102
|
+
|
|
103
|
+
`import { G9SheetHeader } from '@g9tm/lynxcontrols/sheet';`
|
|
104
|
+
|
|
105
|
+
The three-slot sheet header (MAUI header template): leading back/close button (RTL-aware arrow, or × with `useCloseIcon`), the title (centre or near the back button), the trailing toolbar items; slot overrides `headerVie
|
|
106
|
+
|
|
107
|
+
Props:
|
|
108
|
+
- `onBack`: () => void
|
|
109
|
+
- `options`: object
|
|
110
|
+
|
|
111
|
+
Example: `<G9SheetHeader onBack={() => {}} options={options} />`
|
|
112
|
+
|
|
113
|
+
# G9SheetScrollIndicator
|
|
114
|
+
|
|
115
|
+
`import { G9SheetScrollIndicator } from '@g9tm/lynxcontrols/sheet';`
|
|
116
|
+
|
|
117
|
+
The thumb at the body's inline END (left in a right-to-left sheet), in the side inset; touches pass through.
|
|
118
|
+
|
|
119
|
+
Props:
|
|
120
|
+
- `model`: object
|
|
121
|
+
|
|
122
|
+
Example: `<G9SheetScrollIndicator model={model} />`
|
|
123
|
+
|
|
124
|
+
# G9SheetScrollRegion
|
|
125
|
+
|
|
126
|
+
`import { G9SheetScrollRegion } from '@g9tm/lynxcontrols/sheet';`
|
|
127
|
+
|
|
128
|
+
A vertical scroller as tall as its content, up to what the sheet's other parts leave free under its cap — measured, never estimated, however they change (a discount panel opening above, the keyboard shrinking the window)
|
|
129
|
+
|
|
130
|
+
Props:
|
|
131
|
+
- `children?`: ReactNode
|
|
132
|
+
- `max?`: number
|
|
133
|
+
|
|
134
|
+
Example: `<G9SheetScrollRegion />`
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/shell` (generated)
|
|
2
|
+
|
|
3
|
+
# G9AppShell
|
|
4
|
+
|
|
5
|
+
`import { G9AppShell } from '@g9tm/lynxcontrols/shell';`
|
|
6
|
+
|
|
7
|
+
The app's frame by window size (SAC StaffApp shell, Riskara Frame, G9Hub AppShell): phones get the tab bar (up to four destinations plus «more»), tablets an icon rail, desktops a side nav with a top bar.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `destinations`: object[]
|
|
11
|
+
- `onChange`: (key: K) => void
|
|
12
|
+
- `value`: string
|
|
13
|
+
- `children?`: ReactNode
|
|
14
|
+
- `moreText?`: string
|
|
15
|
+
- `brand?`: ReactNode
|
|
16
|
+
- `navFooter?`: ReactNode
|
|
17
|
+
- `navSearch?`: ReactNode
|
|
18
|
+
|
|
19
|
+
Example: `<G9AppShell destinations={destinations} onChange={() => {}} value="value" />`
|
|
20
|
+
|
|
21
|
+
# G9ConnectionBanner
|
|
22
|
+
|
|
23
|
+
`import { G9ConnectionBanner } from '@g9tm/lynxcontrols/shell';`
|
|
24
|
+
|
|
25
|
+
A slim line when the network is gone or coming back (G9Hub ConnectionBanner); a short «back online» then nothing.
|
|
26
|
+
|
|
27
|
+
Props:
|
|
28
|
+
- `offlineText`: string
|
|
29
|
+
- `reconnectingText`: string
|
|
30
|
+
- `status`: 'online' | 'offline' | 'reconnecting'
|
|
31
|
+
- `onRetry?`: () => void
|
|
32
|
+
- `backOnlineText?`: string
|
|
33
|
+
- `retryText?`: string
|
|
34
|
+
|
|
35
|
+
Example: `<G9ConnectionBanner offlineText="offlineText" reconnectingText="reconnectingText" status="online" />`
|
|
36
|
+
|
|
37
|
+
# G9IconRail
|
|
38
|
+
|
|
39
|
+
`import { G9IconRail } from '@g9tm/lynxcontrols/shell';`
|
|
40
|
+
|
|
41
|
+
The tablet rail (SAC IconRail, Riskara tablet frame): icons with short labels in a narrow column.
|
|
42
|
+
|
|
43
|
+
Props:
|
|
44
|
+
- `destinations`: object[]
|
|
45
|
+
- `onChange`: (key: K) => void
|
|
46
|
+
- `value`: string
|
|
47
|
+
- `footer?`: ReactNode
|
|
48
|
+
- `header?`: ReactNode
|
|
49
|
+
- `width?`: number = 72
|
|
50
|
+
|
|
51
|
+
Example: `<G9IconRail destinations={destinations} onChange={() => {}} value="value" />`
|
|
52
|
+
|
|
53
|
+
# G9SideNav
|
|
54
|
+
|
|
55
|
+
`import { G9SideNav } from '@g9tm/lynxcontrols/shell';`
|
|
56
|
+
|
|
57
|
+
The desktop side navigation (SAC SideNav, G9Hub AppShell side): grouped entries with icons and counts.
|
|
58
|
+
|
|
59
|
+
Props:
|
|
60
|
+
- `destinations`: object[]
|
|
61
|
+
- `onChange`: (key: K) => void
|
|
62
|
+
- `value`: string
|
|
63
|
+
- `footer?`: ReactNode
|
|
64
|
+
- `header?`: ReactNode
|
|
65
|
+
- `search?`: ReactNode
|
|
66
|
+
- `width?`: number = 232
|
|
67
|
+
|
|
68
|
+
Example: `<G9SideNav destinations={destinations} onChange={() => {}} value="value" />`
|
|
69
|
+
|
|
70
|
+
# G9TopBar
|
|
71
|
+
|
|
72
|
+
`import { G9TopBar } from '@g9tm/lynxcontrols/shell';`
|
|
73
|
+
|
|
74
|
+
The desktop global bar over the content (SAC TopBar, Riskara StatusStrip).
|
|
75
|
+
|
|
76
|
+
Props:
|
|
77
|
+
- `title?`: string
|
|
78
|
+
- `actions?`: ReactNode
|
|
79
|
+
- `start?`: ReactNode
|
|
80
|
+
- `height?`: number = 56
|
|
81
|
+
|
|
82
|
+
Example: `<G9TopBar />`
|
|
83
|
+
|
|
84
|
+
# G9UpdateBar
|
|
85
|
+
|
|
86
|
+
`import { G9UpdateBar } from '@g9tm/lynxcontrols/shell';`
|
|
87
|
+
|
|
88
|
+
«A new version is ready — restart» (SAC UpdatePrompt, live updates): a slim bar that slides down when shown.
|
|
89
|
+
|
|
90
|
+
Props:
|
|
91
|
+
- `actionText`: string
|
|
92
|
+
- `onAction`: () => void
|
|
93
|
+
- `shown`: boolean
|
|
94
|
+
- `text`: string
|
|
95
|
+
- `onDismiss?`: () => void
|
|
96
|
+
- `dismissText?`: string
|
|
97
|
+
|
|
98
|
+
Example: `<G9UpdateBar actionText="actionText" onAction={() => {}} shown text="Label" />`
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/survey` (generated)
|
|
2
|
+
|
|
3
|
+
# G9AllocationInput
|
|
4
|
+
|
|
5
|
+
`import { G9AllocationInput } from '@g9tm/lynxcontrols/survey';`
|
|
6
|
+
|
|
7
|
+
Share a total between options (Riskara Split «۱۰۰ سکه», budget splits): − and + per option, a stacked bar of the shares, what is left.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `options`: object[]
|
|
11
|
+
- `value?`: object
|
|
12
|
+
- `onChange?`: (value: Readonly<Record<K, number>>) => void
|
|
13
|
+
- `disabled?`: boolean = false
|
|
14
|
+
- `format?`: (units: number) => void
|
|
15
|
+
- `defaultValue?`: object
|
|
16
|
+
- `step?`: number = 5
|
|
17
|
+
- `total?`: number = 100
|
|
18
|
+
|
|
19
|
+
Example: `<G9AllocationInput options={options} />`
|
|
20
|
+
|
|
21
|
+
# G9ChoiceList
|
|
22
|
+
|
|
23
|
+
`import { G9ChoiceList } from '@g9tm/lynxcontrols/survey';`
|
|
24
|
+
|
|
25
|
+
Cards to choose from (Riskara check-up Single/Multi, ShopManager `choice`, onboarding questions): icon or art, label, a line under it; the chosen card is outlined in the brand colour and announced as selected.
|
|
26
|
+
|
|
27
|
+
Props:
|
|
28
|
+
- `options`: object[]
|
|
29
|
+
- `value?`: string[]
|
|
30
|
+
- `columns?`: number = 1
|
|
31
|
+
- `onChange?`: (keys: readonly K[]) => void
|
|
32
|
+
- `disabled?`: boolean = false
|
|
33
|
+
- `onPicked?`: (key: K) => void
|
|
34
|
+
- `defaultValue?`: string[]
|
|
35
|
+
- `max?`: number
|
|
36
|
+
|
|
37
|
+
Example: `<G9ChoiceList options={options} />`
|
|
38
|
+
|
|
39
|
+
# G9ScaleInput
|
|
40
|
+
|
|
41
|
+
`import { G9ScaleInput } from '@g9tm/lynxcontrols/survey';`
|
|
42
|
+
|
|
43
|
+
A Likert / 0–10 scale (Riskara Scale, satisfaction questions): one row of numbered targets, the ends labelled.
|
|
44
|
+
|
|
45
|
+
Props:
|
|
46
|
+
- `value?`: number
|
|
47
|
+
- `onChange?`: (value: number) => void
|
|
48
|
+
- `disabled?`: boolean = false
|
|
49
|
+
- `defaultValue?`: number
|
|
50
|
+
- `endLabels?`: string[]
|
|
51
|
+
- `max?`: number = 5
|
|
52
|
+
- `min?`: number = 1
|
|
53
|
+
- `accessibilityLabel?`: string
|
|
54
|
+
|
|
55
|
+
Example: `<G9ScaleInput />`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/swipe` (generated)
|
|
2
|
+
|
|
3
|
+
# G9SwipeGroup
|
|
4
|
+
|
|
5
|
+
`import { G9SwipeGroup } from '@g9tm/lynxcontrols/swipe';`
|
|
6
|
+
|
|
7
|
+
Scopes the one-open-row policy to a list (rows outside any group share one default group).
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `children?`: ReactNode
|
|
11
|
+
- `group?`: object
|
|
12
|
+
|
|
13
|
+
Example: `<G9SwipeGroup />`
|
|
14
|
+
|
|
15
|
+
# G9SwipeView
|
|
16
|
+
|
|
17
|
+
`import { G9SwipeView } from '@g9tm/lynxcontrols/swipe';`
|
|
18
|
+
|
|
19
|
+
A card row with swipe-to-reveal action panes on both edges (MAUI `G9SwipeView`).
|
|
20
|
+
|
|
21
|
+
Props:
|
|
22
|
+
- `children?`: ReactNode
|
|
23
|
+
- `onOpenChange?`: (side: "leading" | "trailing" | null) => void
|
|
24
|
+
- `cornerRadius?`: number = 14
|
|
25
|
+
- `cardContent?`: ReactNode
|
|
26
|
+
- `cardBackground?`: color
|
|
27
|
+
- `cardStroke?`: color
|
|
28
|
+
- `cardStrokeThickness?`: number
|
|
29
|
+
- `itemKey?`: string | number
|
|
30
|
+
|
|
31
|
+
Example: `<G9SwipeView />`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/tab-bar` (generated)
|
|
2
|
+
|
|
3
|
+
# G9TabBar
|
|
4
|
+
|
|
5
|
+
`import { G9TabBar } from '@g9tm/lynxcontrols/tab-bar';`
|
|
6
|
+
|
|
7
|
+
Bottom navigation with a floating action button (MAUI `G9TabBar`): the FAB rises out of a notch and fans out a horizontal sub-menu row; more than five items collapse behind a More trigger with a vertical overflow column;
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `items`: object[]
|
|
11
|
+
- `onCenterFloatingChange?`: (floating: boolean) => void
|
|
12
|
+
- `onFabOpenChange?`: (open: boolean) => void
|
|
13
|
+
- `onFabTapped?`: (args: G9TabBarFabTappedEventArgs) => void
|
|
14
|
+
- `onItemSelected?`: (args: G9TabBarClickContext) => void
|
|
15
|
+
- `onOverflowOpenChange?`: (open: boolean) => void
|
|
16
|
+
- `onSelectedIndexChange?`: (index: number) => void
|
|
17
|
+
- `overflowText?`: string
|
|
18
|
+
|
|
19
|
+
Example: `<G9TabBar items={items} />`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/tabs` (generated)
|
|
2
|
+
|
|
3
|
+
# G9TabView
|
|
4
|
+
|
|
5
|
+
`import { G9TabView } from '@g9tm/lynxcontrols/tabs';`
|
|
6
|
+
|
|
7
|
+
Tabs with a bar and lazily realized bodies (MAUI `G9TabView`).
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `items`: object[]
|
|
11
|
+
- `onSelectionChange?`: (index: number) => void
|
|
12
|
+
- `routeSegment?`: (key: string) => void
|
|
13
|
+
- `contentPadding?`: number | number[] = 10
|
|
14
|
+
- `frameCornerRadius?`: number = 0
|
|
15
|
+
- `indicatorColor?`: color
|
|
16
|
+
- `tabHeight?`: number = 52
|
|
17
|
+
- `tabStyle?`: 'pill' | 'underlined'
|
|
18
|
+
|
|
19
|
+
Example: `<G9TabView items={items} />`
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/toggle` (generated)
|
|
2
|
+
|
|
3
|
+
# G9CheckBox
|
|
4
|
+
|
|
5
|
+
`import { G9CheckBox } from '@g9tm/lynxcontrols/toggle';`
|
|
6
|
+
|
|
7
|
+
Tri-state check box (MAUI `G9CheckBox`, ADR-0028): tap toggles, indeterminate → checked, never into indeterminate.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `text?`: string
|
|
11
|
+
- `checked?`: boolean
|
|
12
|
+
- `onPress?`: (checked: boolean) => void
|
|
13
|
+
- `disabled?`: boolean = false
|
|
14
|
+
- `onCheckedChange?`: (checked: boolean) => void
|
|
15
|
+
- `onIndeterminateChange?`: (indeterminate: boolean) => void
|
|
16
|
+
- `defaultChecked?`: boolean
|
|
17
|
+
- `defaultIndeterminate?`: boolean
|
|
18
|
+
|
|
19
|
+
Example: `<G9CheckBox text="I agree" checked={agree} onCheckedChange={setAgree} />`
|
|
20
|
+
|
|
21
|
+
# G9Chip
|
|
22
|
+
|
|
23
|
+
`import { G9Chip } from '@g9tm/lynxcontrols/toggle';`
|
|
24
|
+
|
|
25
|
+
One chip (SAC Chip, G9Hub Chip, ShopManager chip): a filter, a choice, a removable tag.
|
|
26
|
+
|
|
27
|
+
Props:
|
|
28
|
+
- `text`: string
|
|
29
|
+
- `selected?`: boolean
|
|
30
|
+
- `size?`: 'sm' | 'md' | 'lg' = "md"
|
|
31
|
+
- `icon?`: icon
|
|
32
|
+
- `onPress?`: () => void
|
|
33
|
+
- `disabled?`: boolean = false
|
|
34
|
+
- `tone?`: 'primary' | 'info' | 'success' | 'warning' | 'error' | 'accent' | 'neutral' = "primary"
|
|
35
|
+
- `onRemove?`: () => void
|
|
36
|
+
|
|
37
|
+
Example: `<G9Chip text="Label" />`
|
|
38
|
+
|
|
39
|
+
# G9ChipGroup
|
|
40
|
+
|
|
41
|
+
`import { G9ChipGroup } from '@g9tm/lynxcontrols/toggle';`
|
|
42
|
+
|
|
43
|
+
Chip group (MAUI `G9ChipGroup`): single or multi selection by item identity, wrap or single-line scroll, colour transition (140 ms) and check mark (120 ms) in CSS, press pulse 0.94 on the main thread.
|
|
44
|
+
|
|
45
|
+
Props:
|
|
46
|
+
- `items`: object[]
|
|
47
|
+
- `disabled?`: boolean = false
|
|
48
|
+
- `selectionMode?`: 'multiSelection' | 'singleSelection' = "multiSelection"
|
|
49
|
+
- `onSelectedKeyChange?`: (key: string | null, item: G9SelectionItem<unknown> | null) => void
|
|
50
|
+
- `onSelectedKeysChange?`: (keys: readonly string[]) => void
|
|
51
|
+
- `onSelectionChange?`: (items: readonly G9SelectionItem<unknown>[]) => void
|
|
52
|
+
- `chipCornerRadius?`: number = 9
|
|
53
|
+
- `chipHeight?`: number = 36
|
|
54
|
+
|
|
55
|
+
Example: `<G9ChipGroup items={items} />`
|
|
56
|
+
|
|
57
|
+
# G9RadioGroup
|
|
58
|
+
|
|
59
|
+
`import { G9RadioGroup } from '@g9tm/lynxcontrols/toggle';`
|
|
60
|
+
|
|
61
|
+
One choice of several (G9Hub RadioGroup, mardomi Radio, payment and delivery options).
|
|
62
|
+
|
|
63
|
+
Props:
|
|
64
|
+
- `options`: object[]
|
|
65
|
+
- `value?`: string
|
|
66
|
+
- `onChange?`: (key: K) => void
|
|
67
|
+
- `disabled?`: boolean = false
|
|
68
|
+
- `appearance?`: 'list' | 'cards'
|
|
69
|
+
- `defaultValue?`: string
|
|
70
|
+
- `haptic?`: boolean | string | string | string | string | string | string | string | string | string
|
|
71
|
+
- `accessibilityLabel?`: string
|
|
72
|
+
|
|
73
|
+
Example: `<G9RadioGroup options={options} />`
|
|
74
|
+
|
|
75
|
+
# G9RatingInput
|
|
76
|
+
|
|
77
|
+
`import { G9RatingInput } from '@g9tm/lynxcontrols/toggle';`
|
|
78
|
+
|
|
79
|
+
Stars (ShopManager AfterDelivery Stars): each star a 44 dp target with its own label.
|
|
80
|
+
|
|
81
|
+
Props:
|
|
82
|
+
- `value?`: number
|
|
83
|
+
- `size?`: number
|
|
84
|
+
- `onChange?`: (value: number) => void
|
|
85
|
+
- `disabled?`: boolean = false
|
|
86
|
+
- `defaultValue?`: number
|
|
87
|
+
- `readOnly?`: boolean
|
|
88
|
+
- `haptic?`: boolean | string | string | string | string | string | string | string | string | string
|
|
89
|
+
- `labels?`: string[]
|
|
90
|
+
|
|
91
|
+
Example: `<G9RatingInput />`
|
|
92
|
+
|
|
93
|
+
# G9Segmented
|
|
94
|
+
|
|
95
|
+
`import { G9Segmented } from '@g9tm/lynxcontrols/toggle';`
|
|
96
|
+
|
|
97
|
+
A segmented control (SAC Seg + kit Segmented, ShopManager seg, G9Hub Segmented, Riskara Seg).
|
|
98
|
+
|
|
99
|
+
Props:
|
|
100
|
+
- `items`: object[]
|
|
101
|
+
- `value?`: string
|
|
102
|
+
- `size?`: 'sm' | 'md' | 'lg' = "md"
|
|
103
|
+
- `onChange?`: (key: K) => void
|
|
104
|
+
- `disabled?`: boolean = false
|
|
105
|
+
- `appearance?`: 'filled' | 'lift' | 'underline' = "lift"
|
|
106
|
+
- `defaultValue?`: string
|
|
107
|
+
- `fit?`: 'content' | 'equal'
|
|
108
|
+
|
|
109
|
+
Example: `<G9Segmented items={items} />`
|
|
110
|
+
|
|
111
|
+
# G9Stepper
|
|
112
|
+
|
|
113
|
+
`import { G9Stepper } from '@g9tm/lynxcontrols/toggle';`
|
|
114
|
+
|
|
115
|
+
− value + (SAC Stepper, ShopManager stepper and AddControl, mardomi Stepper), with an optional collapsed "add" state.
|
|
116
|
+
|
|
117
|
+
Props:
|
|
118
|
+
- `value?`: number
|
|
119
|
+
- `size?`: 'sm' | 'md' | 'lg' = "md"
|
|
120
|
+
- `onChange?`: (value: number) => void
|
|
121
|
+
- `disabled?`: boolean = false
|
|
122
|
+
- `format?`: (value: number) => void
|
|
123
|
+
- `block?`: boolean
|
|
124
|
+
- `defaultValue?`: number
|
|
125
|
+
- `collapsedAtMin?`: string | boolean | boolean
|
|
126
|
+
|
|
127
|
+
Example: `<G9Stepper />`
|
|
128
|
+
|
|
129
|
+
# G9Switch
|
|
130
|
+
|
|
131
|
+
`import { G9Switch } from '@g9tm/lynxcontrols/toggle';`
|
|
132
|
+
|
|
133
|
+
Switch (MAUI `G9Switch`): 56 × 32 track, 24 px thumb that stretches while travelling, 240 ms spring-like CSS transition, tick/dot track mark; RTL moves the "on" side to the left unless `toggles.switchMirrorInRtl` is fals
|
|
134
|
+
|
|
135
|
+
Props:
|
|
136
|
+
- `title?`: string
|
|
137
|
+
- `checked?`: boolean
|
|
138
|
+
- `disabled?`: boolean = false
|
|
139
|
+
- `onCheckedChange?`: (checked: boolean) => void
|
|
140
|
+
- `description?`: string
|
|
141
|
+
- `defaultChecked?`: boolean
|
|
142
|
+
- `isInFormRow?`: boolean = false
|
|
143
|
+
- `isRequired?`: boolean = false
|
|
144
|
+
|
|
145
|
+
Example: `<G9Switch isInFormRow title="Sync" checked={sync} onCheckedChange={setSync} />`
|
|
146
|
+
|
|
147
|
+
# G9SwitchGroup
|
|
148
|
+
|
|
149
|
+
`import { G9SwitchGroup } from '@g9tm/lynxcontrols/toggle';`
|
|
150
|
+
|
|
151
|
+
A vertical group of switches (MAUI `G9SwitchGroup`): counts its switches (nearest group only, as MAUI's direct children), optionally keeps one on and shows a live `active / total` status.
|
|
152
|
+
|
|
153
|
+
Props:
|
|
154
|
+
- `children?`: ReactNode
|
|
155
|
+
- `disabled?`: boolean = false
|
|
156
|
+
- `onActiveCountChange?`: (active: number, total: number) => void
|
|
157
|
+
- `minOneActive?`: boolean = false
|
|
158
|
+
- `showLiveStatus?`: boolean = false
|
|
159
|
+
- `accessibilityLabel?`: string
|
|
160
|
+
|
|
161
|
+
Example: `<G9SwitchGroup />`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Lists
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
<G9Page title="Orders" scroll={false}>
|
|
5
|
+
<G9VirtualList items={orders} getKey={(o) => o.id} renderItem={(o) => <G9ListRow title={o.name} />} />
|
|
6
|
+
</G9Page>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- **Long lists**: `G9VirtualList` (Lynx `<list>`, rows realized as they scroll); a short list is a plain column.
|
|
10
|
+
- **Rows**: `G9ListRow` (`title`, `subtitle`, `value`, `icon`, `trailing`, `onPress`), grouped in `G9SettingsGroup`.
|
|
11
|
+
- **Grids and tables**: `G9Columns` (columns from the layout class), `G9DataGrid` (`@g9tm/lynxcontrols-datagrid`).
|
|
12
|
+
- **Swipe actions**: `G9SwipeView` rows in a `G9SwipeGroup`; **pull to refresh**: `G9PullToRefresh`.
|
|
13
|
+
- Give each row a stable key and, where a test or a person acts on it, an `id`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Localization, RTL, calendars and digits
|
|
2
|
+
|
|
3
|
+
- **Culture**: `createCultureStore('fa-IR')` (Persian → RTL, the Persian calendar, Persian digits); switch with
|
|
4
|
+
`useG9CultureStore().setCulture('en')`. Readers: `useG9Culture()`, `useG9Direction()`.
|
|
5
|
+
- **Direction**: every G9 control mirrors itself. Your own rows: `style={g9RowStyle(direction)}`; your own text
|
|
6
|
+
alignment: `g9TextStart(direction)`; a `--rtl` modifier class for anything else. Never rely on CSS `direction`.
|
|
7
|
+
- **Digits and numbers**: `formatNumber(value, culture)`, `toNativeDigits(text, 'persian')`. A G9 field stores ASCII
|
|
8
|
+
digits and draws the culture's; a Latin number inside Persian text is a finding of G9AppPilot's watch.
|
|
9
|
+
- **Words**: the library's own words (OK, Cancel, Search…) come from string tables: pass `g9BuiltInStringTables` in
|
|
10
|
+
the provider's `settings.strings.tables`; the app's own words come from its own tables or code.
|
|
11
|
+
- **Fonts**: an Arabic-script font goes in `shape.fonts.arabic`; Arabic script never gets letter spacing.
|
|
12
|
+
- **Calendars**: the date pickers and the calendar package use the culture's calendar; values stay Gregorian
|
|
13
|
+
`G9LocalDateTime`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Navigation, the app shell, routes
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
<G9AppShell id="App.Shell" destinations={destinations} value={screen} onChange={setScreen} topBar={{ title: 'App' }}>
|
|
5
|
+
{screens.map((key) => (
|
|
6
|
+
<G9KeepAlive key={key} active={key === screen}>
|
|
7
|
+
<G9Place segment={{ kind: key }} layer="root" active={key === screen}>
|
|
8
|
+
<Screen name={key} />
|
|
9
|
+
</G9Place>
|
|
10
|
+
</G9KeepAlive>
|
|
11
|
+
))}
|
|
12
|
+
</G9AppShell>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **`G9AppShell`**: a tab bar on a phone (extra destinations go to «More» with `phoneOverflow`), a rail on a tablet,
|
|
16
|
+
a side nav on a desktop. `G9KeepAlive` keeps a visited screen mounted (a tab switch is a style change).
|
|
17
|
+
- **A screen**: `G9Page` with a `G9AppBar` header (`large` and `safeTop` on a phone: the status bar's inset).
|
|
18
|
+
- **Routes**: `createG9Router({ catalogue: createCatalogue(places), context, language })` passed as
|
|
19
|
+
`services.route`; each screen declares itself with `G9Place`. Then deep links and G9AppPilot's `g9.where` / `g9.go`
|
|
20
|
+
reach every place.
|
|
21
|
+
- **Tabs inside a screen**: `G9TabView`; a bottom bar on its own: `G9TabBar`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Overlays: sheets, popups, toasts, menus, the palette
|
|
2
|
+
|
|
3
|
+
All need a `G9Host` above them.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
const sheets = useG9Sheets();
|
|
7
|
+
const handle = sheets.show(<FarmDetails />, { title: 'Farm', showCloseButton: true });
|
|
8
|
+
const { reason } = await handle!.result; // closed, overlayTap, drag, …
|
|
9
|
+
sheets.show(() => <HeavyList />, { loadingSkeleton: 'listRows' }); // the body built after the sheet rises
|
|
10
|
+
const pick = await showSelectionSheet(sheets, { title: 'Crop', items, selectedItems: [current] });
|
|
11
|
+
|
|
12
|
+
const popups = useG9Popups();
|
|
13
|
+
await popups.showSuccess('Saved');
|
|
14
|
+
if (await popups.showConfirm('Discard the draft?', { type: 'warning' })) discard();
|
|
15
|
+
const form = await popups.showInput({ title: 'Name', fields: [g9PopupInputField.text('name', 'Name')] });
|
|
16
|
+
|
|
17
|
+
const toasts = useG9Toasts();
|
|
18
|
+
toasts.showToast('Item deleted', 'warning', { actionText: 'Undo', action: undo });
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- **Declarative**: `<G9Sheet open onOpenChange options={fitToContentSheetOptions()}>`;
|
|
22
|
+
`fullScreenModalSheetOptions(title)` for a full-screen editor.
|
|
23
|
+
- **Adaptive**: on a wide window a sheet presents as a dialog or a side panel; `G9Menu` (anchored by `anchorId`) is a
|
|
24
|
+
popover on a wide window and an action sheet on a phone (`G9ActionSheet` on its own); `G9ContextMenu` opens on a
|
|
25
|
+
long press; `G9CommandPalette` with `useG9Shortcut('mod+k', …)`.
|
|
26
|
+
- **Outside components**: `g9Sheets()`, `g9Popups()` reach the active host.
|
|
27
|
+
- **Back** closes the top overlay first. A popup's primary button stays at the reading end in both directions.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# G9AppPilot in an app
|
|
2
|
+
|
|
3
|
+
- `g9pilot.config.json` names the environments (`store`: nothing; `observe`: the watch, no transport; `support` /
|
|
4
|
+
`full`: the signed bridge). `G9_PILOT_ENV=<env>` selects one at build time; `pluginG9Pilot()`
|
|
5
|
+
(`@g9tm/lynxcontrols-pilot/rspeedy`) resolves it.
|
|
6
|
+
- Wrap the app inside its `G9Host` with `<G9PilotHost>`: in a store build it renders its children and costs nothing.
|
|
7
|
+
- The watch (`observe` and up) finds JS errors, controls without a name, translation keys on screen, controls cut by
|
|
8
|
+
the screen's edge, Latin digits in Persian text and long frames; on the web the page reads them through
|
|
9
|
+
`@g9tm/lynxcontrols-web` (`g9WebFindings`).
|
|
10
|
+
- A store build must never carry the bridge: `g9pilot-check` proves it on the bundle or the APK / IPA.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Lynx platform rules for an app
|
|
2
|
+
|
|
3
|
+
A ReactLynx app runs on Lynx, not in a browser — even when Lynx for Web draws it in one. These hold on every target
|
|
4
|
+
(Android, iOS, Windows, macOS, web).
|
|
5
|
+
|
|
6
|
+
## What does not exist
|
|
7
|
+
|
|
8
|
+
- **No `Intl`, `toLocale*`, `BigInt`, DOM, `window`, `document`, `localStorage` in the app's code.** Numbers, dates
|
|
9
|
+
and digits go through the culture (`formatNumber`, `toNativeDigits`, `useG9Culture`); preferences through the
|
|
10
|
+
provider's `services.preferences`.
|
|
11
|
+
- **No CSS `@media`.** A layout follows the provider's layout class (`useG9Layout`), which follows the LynxView's own
|
|
12
|
+
size, not the screen's.
|
|
13
|
+
- **Timers are identifiers of the bundle's scope** (`setTimeout(...)`), never `globalThis.setTimeout`; library code
|
|
14
|
+
uses `g9RuntimeTimers`. `lynx` is an identifier too, never `globalThis.lynx`.
|
|
15
|
+
|
|
16
|
+
## CSS on Lynx
|
|
17
|
+
|
|
18
|
+
- `direction` does not inherit, and some engines ignore it: a row mirrors through `g9RowStyle(direction)` or a
|
|
19
|
+
`--rtl` modifier class, text aligns with `g9TextStart`, never with `direction` alone.
|
|
20
|
+
- Prefer one class per selector; descendant selectors cost a match on every class change of an ancestor.
|
|
21
|
+
- Inline `var(--g9-…)` needs the build plugin: `plugins: [pluginReactLynx(), pluginG9Lynx()]` in `lynx.config.ts`
|
|
22
|
+
(`import { pluginG9Lynx } from '@g9tm/lynxcontrols/rspeedy'`).
|
|
23
|
+
- Import a stylesheet from the `.tsx` that renders it, never from a barrel file.
|
|
24
|
+
- A text does not inherit text styles from a `view`: set the font size, weight and colour on the text's own class.
|
|
25
|
+
- On Lynx Android the `flex: 1` shorthand may leave row children at their content width; give equal shares an
|
|
26
|
+
explicit `width`.
|
|
27
|
+
|
|
28
|
+
## Threads
|
|
29
|
+
|
|
30
|
+
ReactLynx renders the first screen on the main thread and hydrates on the background thread. A `'main thread'`
|
|
31
|
+
worklet calls only other `'main thread'` functions. Native modules (`NativeModules`) live on the background thread:
|
|
32
|
+
read them in effects or handlers, not during the first render.
|
|
33
|
+
|
|
34
|
+
## Fonts
|
|
35
|
+
|
|
36
|
+
A theme font (`shape.fonts`) must be a font the host has: register the font files (`@font-face` or the host's font
|
|
37
|
+
setup). Generic names (`serif`, `monospace`) are drawn in the default font on some Android engines.
|
|
38
|
+
|
|
39
|
+
## Evidence
|
|
40
|
+
|
|
41
|
+
A Node test compiles the code and paints nothing. After touching styles, layout, direction or timers, run the app on a
|
|
42
|
+
device, the desktop window or the browser, and look at the frames.
|