@g9tm/lynxcontrols 2.5.6 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/cards/G9AppBar.md +1 -1
- package/catalog/cards/G9AppearancePage.md +17 -0
- package/catalog/cards/G9Badge.md +1 -1
- package/catalog/cards/G9Button.md +2 -2
- package/catalog/cards/G9Card.md +1 -1
- package/catalog/cards/G9CarryContexts.md +10 -0
- package/catalog/cards/G9CheckBox.md +1 -1
- package/catalog/cards/G9Chip.md +1 -1
- package/catalog/cards/G9ChipStrip.md +16 -0
- package/catalog/cards/G9CodeBlock.md +17 -0
- package/catalog/cards/G9CommandPalette.md +3 -1
- package/catalog/cards/G9ConnectionBanner.md +1 -1
- package/catalog/cards/G9ContrastPanel.md +15 -0
- package/catalog/cards/G9DashboardCustomizeSheet.md +17 -0
- package/catalog/cards/G9DashboardGrid.md +17 -0
- package/catalog/cards/G9DragList.md +4 -2
- package/catalog/cards/G9Editor.md +1 -1
- package/catalog/cards/G9ErrorBoundary.md +3 -2
- package/catalog/cards/G9FormField.md +2 -2
- package/catalog/cards/G9ListRow.md +1 -1
- package/catalog/cards/G9Menu.md +1 -1
- package/catalog/cards/G9MenuList.md +2 -0
- package/catalog/cards/G9NotificationCenter.md +17 -0
- package/catalog/cards/G9NotificationCenterPanel.md +17 -0
- package/catalog/cards/G9PathNavigator.md +13 -0
- package/catalog/cards/G9PersonalThemeSheet.md +17 -0
- package/catalog/cards/G9Popover.md +1 -1
- package/catalog/cards/G9Provider.md +1 -1
- package/catalog/cards/G9RangeSlider.md +2 -2
- package/catalog/cards/G9ReaderSheet.md +17 -0
- package/catalog/cards/G9ReaderView.md +17 -0
- package/catalog/cards/G9SafeButton.md +2 -2
- package/catalog/cards/G9SearchEntry.md +1 -1
- package/catalog/cards/G9SecretValue.md +17 -0
- package/catalog/cards/G9ShortcutList.md +4 -0
- package/catalog/cards/G9ShortcutsSheet.md +3 -1
- package/catalog/cards/G9StatusPill.md +1 -1
- package/catalog/cards/G9Stepper.md +1 -1
- package/catalog/cards/G9SwitchRow.md +1 -1
- package/catalog/cards/G9Tag.md +1 -1
- package/catalog/cards/G9TextEntry.md +1 -1
- package/catalog/cards/G9UpdateBar.md +2 -1
- package/catalog/cards/G9VirtualList.md +1 -1
- package/catalog/cards/G9WallpaperSwatch.md +16 -0
- package/catalog/cards/G9WidgetSkeleton.md +9 -0
- package/catalog/cards/G9WidgetSlot.md +13 -0
- package/catalog/cards/PopupFrame.md +2 -2
- package/catalog/catalog.json +9460 -2155
- package/catalog/index.md +20 -3
- package/dist/.tsbuildinfo +1 -1
- package/dist/appearance/appearance.css +264 -0
- package/dist/appearance/appearance.css.map +1 -0
- package/dist/appearance/appearance.d.ts +148 -0
- package/dist/appearance/appearance.d.ts.map +1 -0
- package/dist/appearance/appearance.jsx +604 -0
- package/dist/appearance/index.d.ts +2 -0
- package/dist/appearance/index.d.ts.map +1 -0
- package/dist/appearance/index.jsx +1 -0
- package/dist/base/control.d.ts +15 -0
- package/dist/base/control.d.ts.map +1 -1
- package/dist/base/control.jsx +13 -1
- package/dist/base/index.d.ts +1 -1
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.jsx +1 -1
- package/dist/base/selection-item.d.ts +5 -0
- package/dist/base/selection-item.d.ts.map +1 -1
- package/dist/button/button.css +4 -0
- package/dist/button/button.css.map +1 -1
- package/dist/cascade/cascade.css +2 -0
- package/dist/cascade/cascade.css.map +1 -1
- package/dist/commands/commands.css +46 -0
- package/dist/commands/commands.css.map +1 -1
- package/dist/commands/index.d.ts +2 -2
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.jsx +2 -2
- package/dist/commands/keys.d.ts +15 -1
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.jsx +20 -1
- package/dist/commands/palette.d.ts +73 -7
- package/dist/commands/palette.d.ts.map +1 -1
- package/dist/commands/palette.jsx +174 -20
- package/dist/dashboard/dashboard.css +101 -0
- package/dist/dashboard/dashboard.css.map +1 -0
- package/dist/dashboard/dashboard.d.ts +73 -0
- package/dist/dashboard/dashboard.d.ts.map +1 -0
- package/dist/dashboard/dashboard.jsx +297 -0
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.jsx +2 -0
- package/dist/dashboard/model.d.ts +53 -0
- package/dist/dashboard/model.d.ts.map +1 -0
- package/dist/dashboard/model.jsx +76 -0
- package/dist/display/code.css +109 -0
- package/dist/display/code.css.map +1 -0
- package/dist/display/code.d.ts +43 -0
- package/dist/display/code.d.ts.map +1 -0
- package/dist/display/code.jsx +101 -0
- package/dist/display/extras.d.ts +7 -2
- package/dist/display/extras.d.ts.map +1 -1
- package/dist/display/extras.jsx +13 -4
- package/dist/display/figures.d.ts.map +1 -1
- package/dist/display/figures.jsx +10 -2
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.jsx +1 -0
- package/dist/display/motion-figures.css +2 -0
- package/dist/display/motion-figures.css.map +1 -1
- package/dist/display/motion-figures.d.ts.map +1 -1
- package/dist/display/motion-figures.jsx +14 -7
- package/dist/display/status.d.ts +1 -1
- package/dist/display/status.d.ts.map +1 -1
- package/dist/display/status.jsx +15 -3
- package/dist/display/theme-preview.css +4 -0
- package/dist/display/theme-preview.css.map +1 -1
- package/dist/effects/effects.d.ts.map +1 -1
- package/dist/effects/effects.jsx +8 -1
- package/dist/fields/extra-entries.css +1 -0
- package/dist/fields/extra-entries.css.map +1 -1
- package/dist/fields/extra-entries.d.ts +4 -1
- package/dist/fields/extra-entries.d.ts.map +1 -1
- package/dist/fields/extra-entries.jsx +54 -19
- package/dist/fields/fields.css +21 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/outlined-field.d.ts +9 -0
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +6 -1
- package/dist/fields/pin-entry.d.ts.map +1 -1
- package/dist/fields/pin-entry.jsx +36 -3
- package/dist/fields/text-entry.d.ts +4 -0
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +32 -25
- package/dist/fields/use-text-input.d.ts +3 -2
- package/dist/fields/use-text-input.d.ts.map +1 -1
- package/dist/fields/use-text-input.jsx +3 -0
- package/dist/header/app-bar.d.ts +6 -0
- package/dist/header/app-bar.d.ts.map +1 -1
- package/dist/header/app-bar.jsx +22 -8
- package/dist/header/header.css +14 -0
- package/dist/header/header.css.map +1 -1
- package/dist/host/bottom-overlays.d.ts +5 -0
- package/dist/host/bottom-overlays.d.ts.map +1 -1
- package/dist/host/bottom-overlays.jsx +17 -1
- package/dist/host/carry-contexts.d.ts +28 -0
- package/dist/host/carry-contexts.d.ts.map +1 -0
- package/dist/host/carry-contexts.jsx +76 -0
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +5 -1
- package/dist/host/index.d.ts +2 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.jsx +2 -0
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +13 -9
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/containers.d.ts.map +1 -1
- package/dist/layout/containers.jsx +2 -1
- package/dist/layout/layout.css +7 -0
- package/dist/layout/layout.css.map +1 -1
- package/dist/list/gestures.d.ts +39 -6
- package/dist/list/gestures.d.ts.map +1 -1
- package/dist/list/gestures.jsx +284 -89
- package/dist/list/index.d.ts +3 -2
- package/dist/list/index.d.ts.map +1 -1
- package/dist/list/index.jsx +2 -1
- package/dist/list/keyboard.d.ts +50 -0
- package/dist/list/keyboard.d.ts.map +1 -0
- package/dist/list/keyboard.jsx +117 -0
- package/dist/list/list.css +50 -5
- package/dist/list/list.css.map +1 -1
- package/dist/list/rows.d.ts +13 -1
- package/dist/list/rows.d.ts.map +1 -1
- package/dist/list/rows.jsx +42 -23
- package/dist/list/virtual-list.d.ts +27 -1
- package/dist/list/virtual-list.d.ts.map +1 -1
- package/dist/list/virtual-list.jsx +49 -4
- package/dist/notifications/index.d.ts +3 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.jsx +2 -0
- package/dist/notifications/model.d.ts +47 -0
- package/dist/notifications/model.d.ts.map +1 -0
- package/dist/notifications/model.jsx +51 -0
- package/dist/notifications/notification-center.d.ts +98 -0
- package/dist/notifications/notification-center.d.ts.map +1 -0
- package/dist/notifications/notification-center.jsx +424 -0
- package/dist/notifications/notifications.css +266 -0
- package/dist/notifications/notifications.css.map +1 -0
- package/dist/orb/orb.css +2 -0
- package/dist/orb/orb.css.map +1 -1
- package/dist/pickers/pickers.css +15 -0
- package/dist/pickers/pickers.css.map +1 -1
- package/dist/plus-button/plus-button.css +2 -0
- package/dist/plus-button/plus-button.css.map +1 -1
- package/dist/plus-button/plus-button.d.ts.map +1 -1
- package/dist/plus-button/plus-button.jsx +2 -1
- package/dist/popover/popover.css +23 -1
- package/dist/popover/popover.css.map +1 -1
- package/dist/popover/popover.d.ts +14 -0
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/popover/popover.jsx +73 -12
- package/dist/popover/position.d.ts +6 -2
- package/dist/popover/position.d.ts.map +1 -1
- package/dist/popover/position.jsx +15 -4
- package/dist/popup/popup.css +3 -0
- package/dist/popup/popup.css.map +1 -1
- package/dist/provider/direction-scope.d.ts +8 -0
- package/dist/provider/direction-scope.d.ts.map +1 -1
- package/dist/provider/direction-scope.jsx +13 -2
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/provider.css +7 -0
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts +6 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +22 -2
- package/dist/provider/settings.d.ts +14 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +4 -1
- package/dist/range-slider/index.d.ts +1 -1
- package/dist/range-slider/index.d.ts.map +1 -1
- package/dist/range-slider/range-slider.css +69 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.d.ts +22 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -1
- package/dist/range-slider/range-slider.jsx +34 -5
- package/dist/reader/index.d.ts +2 -0
- package/dist/reader/index.d.ts.map +1 -0
- package/dist/reader/index.jsx +1 -0
- package/dist/reader/reader.css +74 -0
- package/dist/reader/reader.css.map +1 -0
- package/dist/reader/reader.d.ts +76 -0
- package/dist/reader/reader.d.ts.map +1 -0
- package/dist/reader/reader.jsx +149 -0
- package/dist/route/index.d.ts +2 -0
- package/dist/route/index.d.ts.map +1 -1
- package/dist/route/index.jsx +2 -0
- package/dist/route/path-navigator.css +42 -0
- package/dist/route/path-navigator.css.map +1 -0
- package/dist/route/path-navigator.d.ts +25 -0
- package/dist/route/path-navigator.d.ts.map +1 -0
- package/dist/route/path-navigator.jsx +98 -0
- package/dist/route/path-router.d.ts +162 -0
- package/dist/route/path-router.d.ts.map +1 -0
- package/dist/route/path-router.jsx +327 -0
- package/dist/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +23 -10
- package/dist/selection/selection.css +18 -1
- package/dist/selection/selection.css.map +1 -1
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +9 -8
- package/dist/sheet/options.d.ts +6 -1
- package/dist/sheet/options.d.ts.map +1 -1
- package/dist/sheet/options.jsx +2 -1
- package/dist/sheet/panel-frame.d.ts.map +1 -1
- package/dist/sheet/panel-frame.jsx +5 -4
- package/dist/sheet/sizing.d.ts +3 -3
- package/dist/sheet/sizing.d.ts.map +1 -1
- package/dist/sheet/sizing.jsx +1 -0
- package/dist/shell/shell.css +18 -1
- package/dist/shell/shell.css.map +1 -1
- package/dist/shell/shell.d.ts +10 -1
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/shell.jsx +13 -9
- package/dist/survey/survey.css +15 -0
- package/dist/survey/survey.css.map +1 -1
- package/dist/survey/survey.d.ts +6 -0
- package/dist/survey/survey.d.ts.map +1 -1
- package/dist/survey/survey.jsx +24 -6
- package/dist/swipe/swipe.css +2 -0
- package/dist/swipe/swipe.css.map +1 -1
- package/dist/tab-bar/flat.d.ts.map +1 -1
- package/dist/tab-bar/flat.jsx +53 -38
- package/dist/tab-bar/tab-bar.css +2 -0
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +28 -6
- package/dist/tabs/tab-view.jsx +10 -3
- package/dist/tabs/tabs.css +5 -0
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/service.d.ts.map +1 -1
- package/dist/toast/service.jsx +18 -5
- package/dist/toast/store.d.ts +22 -0
- package/dist/toast/store.d.ts.map +1 -1
- package/dist/toast/store.jsx +35 -3
- package/dist/toast/toast.css +22 -0
- package/dist/toast/toast.css.map +1 -1
- package/dist/toggle/checkbox.d.ts +5 -0
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +7 -2
- package/dist/toggle/choice.css +35 -0
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/choice.d.ts +45 -0
- package/dist/toggle/choice.d.ts.map +1 -1
- package/dist/toggle/choice.jsx +97 -23
- package/dist/toggle/index.d.ts +1 -1
- package/dist/toggle/index.d.ts.map +1 -1
- package/dist/toggle/index.jsx +1 -1
- package/package.json +22 -2
- package/skills/g9-lynx-app/references/catalog-index.md +24 -8
- package/skills/g9-lynx-app/references/components/appearance.md +70 -0
- package/skills/g9-lynx-app/references/components/barcode.md +1 -1
- package/skills/g9-lynx-app/references/components/button.md +4 -4
- package/skills/g9-lynx-app/references/components/calendar-1.md +205 -0
- package/skills/g9-lynx-app/references/components/calendar-2.md +36 -0
- package/skills/g9-lynx-app/references/components/canvas.md +33 -0
- package/skills/g9-lynx-app/references/components/chat-1.md +199 -0
- package/skills/g9-lynx-app/references/components/chat-2.md +119 -0
- package/skills/g9-lynx-app/references/components/commands.md +10 -2
- package/skills/g9-lynx-app/references/components/commerce.md +1 -1
- package/skills/g9-lynx-app/references/components/dashboard.md +61 -0
- package/skills/g9-lynx-app/references/components/display-1.md +22 -21
- package/skills/g9-lynx-app/references/components/display-2.md +36 -39
- package/skills/g9-lynx-app/references/components/display-3.md +41 -2
- package/skills/g9-lynx-app/references/components/fields.md +5 -5
- package/skills/g9-lynx-app/references/components/header.md +1 -1
- package/skills/g9-lynx-app/references/components/host.md +11 -0
- package/skills/g9-lynx-app/references/components/layout-1.md +1 -1
- package/skills/g9-lynx-app/references/components/list.md +7 -5
- package/skills/g9-lynx-app/references/components/map.md +19 -1
- package/skills/g9-lynx-app/references/components/media-1.md +203 -0
- package/skills/g9-lynx-app/references/components/media-2.md +66 -0
- package/skills/g9-lynx-app/references/components/notifications.md +37 -0
- package/skills/g9-lynx-app/references/components/popover.md +4 -2
- package/skills/g9-lynx-app/references/components/popup.md +2 -2
- package/skills/g9-lynx-app/references/components/projects.md +73 -0
- package/skills/g9-lynx-app/references/components/provider.md +1 -1
- package/skills/g9-lynx-app/references/components/range-slider.md +2 -2
- package/skills/g9-lynx-app/references/components/reader.md +37 -0
- package/skills/g9-lynx-app/references/components/richtext.md +54 -0
- package/skills/g9-lynx-app/references/components/route.md +14 -0
- package/skills/g9-lynx-app/references/components/shell.md +3 -2
- package/skills/g9-lynx-app/references/components/toggle.md +20 -3
- package/skills/g9-lynx-app/references/provider-and-host.md +4 -3
- package/skills/g9-lynx-app/references/components/calendar.md +0 -128
- package/skills/g9-lynx-app/references/components/chat.md +0 -98
- package/skills/g9-lynx-app/references/components/media.md +0 -115
package/dist/toggle/choice.jsx
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import "./choice.css";
|
|
2
|
-
import { g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
-
import { memo } from "@lynx-js/react";
|
|
4
|
-
import { g9ChildId, g9IdProps, g9RowStyle, useG9Control } from "../base/control.jsx";
|
|
2
|
+
import { G9StringKey, g9Haptic, toNativeDigits } from "@g9tm/lynxcontrols-foundation";
|
|
3
|
+
import { memo, useContext, useEffect, useRef } from "@lynx-js/react";
|
|
4
|
+
import { g9ChildId, g9IdProps, g9Paragraph, g9RowStyle, g9SelectedA11y, g9TextStart, useG9Control } from "../base/control.jsx";
|
|
5
5
|
import { useG9Press } from "../base/press.jsx";
|
|
6
6
|
import { useG9SharedHeights } from "../base/sizing.jsx";
|
|
7
7
|
import { toneColors } from "../base/tone.jsx";
|
|
8
8
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
9
|
+
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
10
|
+
import { invokeNodeWhenReady } from "../fields/use-text-input.jsx";
|
|
9
11
|
import { G9Icon } from "../icon/icon.jsx";
|
|
12
|
+
import { G9CultureContext } from "../provider/contexts.jsx";
|
|
13
|
+
import { useG9Direction, useG9Strings } from "../provider/hooks.jsx";
|
|
10
14
|
const tick = (kind)=>{
|
|
11
15
|
if (false !== kind) g9Haptic(null != kind ? kind : 'tick');
|
|
12
16
|
};
|
|
@@ -16,7 +20,8 @@ const CHIP_H = {
|
|
|
16
20
|
lg: 40
|
|
17
21
|
};
|
|
18
22
|
const G9Chip = memo(function(props) {
|
|
19
|
-
var _props_appearance, _props_tone, _props_size, _props_accessibilityLabel;
|
|
23
|
+
var _props_appearance, _props_tone, _props_size, _ref, _props_accessibilityLabel;
|
|
24
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
20
25
|
const selected = true === props.selected;
|
|
21
26
|
const control = useG9Control(props, 'g9-chip2', {
|
|
22
27
|
kind: 'button',
|
|
@@ -44,7 +49,11 @@ const G9Chip = memo(function(props) {
|
|
|
44
49
|
const c = selected ? on : off;
|
|
45
50
|
const shared = useG9SharedHeights();
|
|
46
51
|
const h = shared ? 'lg' === props.size ? shared.md : shared.sm : CHIP_H[null != (_props_size = props.size) ? _props_size : 'md'];
|
|
47
|
-
|
|
52
|
+
const culture = useContext(G9CultureContext);
|
|
53
|
+
const count = void 0 !== props.count && props.count > 0 ? toNativeDigits(props.count > 99 ? '99+' : String(props.count), null != (_ref = null == culture ? void 0 : culture.culture.numberingSystem) ? _ref : 'latin') : null;
|
|
54
|
+
return <view className={`${control.className}${'dashed' === appearance && !selected ? ' g9-chip2--dashed' : ''}`} {...control.idProps} {...props.nodeRef ? {
|
|
55
|
+
ref: props.nodeRef
|
|
56
|
+
} : {}} style={control.rootStyle({
|
|
48
57
|
...g9RowStyle(control.direction),
|
|
49
58
|
height: `${h}px`,
|
|
50
59
|
borderRadius: `${h / 2}px`,
|
|
@@ -52,14 +61,23 @@ const G9Chip = memo(function(props) {
|
|
|
52
61
|
borderColor: selected ? on.border : 'dashed' === appearance ? 'var(--g9-primary)' : off.border,
|
|
53
62
|
paddingLeft: `${props.onRemove ? 8 : 12}px`,
|
|
54
63
|
paddingRight: `${props.onRemove ? 8 : 12}px`
|
|
55
|
-
})} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : props.text}
|
|
56
|
-
{props.icon ? <G9Icon icon={props.icon} size={h <= 26 ? 13 : 15} color={c.foreground}/> : null}
|
|
64
|
+
})} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_accessibilityLabel = props.accessibilityLabel) ? _props_accessibilityLabel : count ? `${props.text}, ${count}` : props.text} {...g9SelectedA11y(selected, selectedWord)} bindtap={press}>
|
|
65
|
+
{void 0 !== props.leading ? props.leading : props.icon ? <G9Icon icon={props.icon} size={h <= 26 ? 13 : 15} color={c.foreground}/> : null}
|
|
57
66
|
<text className="g9-chip2__text" style={{
|
|
58
67
|
color: 'dashed' !== appearance || selected ? c.foreground : 'var(--g9-primary)',
|
|
59
68
|
fontSize: `${h <= 26 ? 12 : 13}px`
|
|
60
69
|
}}>
|
|
61
70
|
{props.text}
|
|
62
71
|
</text>
|
|
72
|
+
{count ? <view className="g9-chip2__count" style={{
|
|
73
|
+
backgroundColor: selected ? 'rgba(255,255,255,0.24)' : 'var(--g9-surface-container-highest)'
|
|
74
|
+
}}>
|
|
75
|
+
<text className="g9-chip2__count-text" style={{
|
|
76
|
+
color: c.foreground
|
|
77
|
+
}}>
|
|
78
|
+
{count}
|
|
79
|
+
</text>
|
|
80
|
+
</view> : null}
|
|
63
81
|
{props.onRemove ? <view className="g9-chip2__remove" catchtap={()=>{
|
|
64
82
|
var _props_onRemove;
|
|
65
83
|
tick(props.haptic);
|
|
@@ -69,6 +87,50 @@ const G9Chip = memo(function(props) {
|
|
|
69
87
|
</view> : null}
|
|
70
88
|
</view>;
|
|
71
89
|
});
|
|
90
|
+
function G9ChipStrip(props) {
|
|
91
|
+
const dir = useG9Direction();
|
|
92
|
+
const nodes = useRef({});
|
|
93
|
+
useEffect(()=>{
|
|
94
|
+
var _nodes_current_props_value;
|
|
95
|
+
if (null === props.value) return;
|
|
96
|
+
invokeNodeWhenReady({
|
|
97
|
+
current: null != (_nodes_current_props_value = nodes.current[props.value]) ? _nodes_current_props_value : null
|
|
98
|
+
}, 'scrollIntoView', {
|
|
99
|
+
scrollIntoViewOptions: {
|
|
100
|
+
behavior: 'smooth',
|
|
101
|
+
block: 'nearest',
|
|
102
|
+
inline: 'center'
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}, [
|
|
106
|
+
props.value
|
|
107
|
+
]);
|
|
108
|
+
return <scroll-view className={`g9-chip-strip${props.className ? ` ${props.className}` : ''}`} scroll-orientation="horizontal" {...g9IdProps(props.id)}>
|
|
109
|
+
<view className="g9-chip-strip__row" style={g9RowStyle(dir)}>
|
|
110
|
+
{props.items.map((it)=><G9Chip key={it.key} {...props.id ? {
|
|
111
|
+
id: g9ChildId(props.id, it.key)
|
|
112
|
+
} : {}} text={it.text} {...it.icon ? {
|
|
113
|
+
icon: it.icon
|
|
114
|
+
} : {}} {...void 0 !== it.count ? {
|
|
115
|
+
count: it.count
|
|
116
|
+
} : {}} {...it.disabled ? {
|
|
117
|
+
disabled: true
|
|
118
|
+
} : {}} selected={it.key === props.value} {...props.size ? {
|
|
119
|
+
size: props.size
|
|
120
|
+
} : {}} {...props.appearance ? {
|
|
121
|
+
appearance: props.appearance
|
|
122
|
+
} : {}} {...props.tone ? {
|
|
123
|
+
tone: props.tone
|
|
124
|
+
} : {}} {...void 0 !== props.haptic ? {
|
|
125
|
+
haptic: props.haptic
|
|
126
|
+
} : {}} nodeRef={(n)=>{
|
|
127
|
+
nodes.current[it.key] = n;
|
|
128
|
+
}} onPress={()=>{
|
|
129
|
+
if (it.key !== props.value) props.onChange(it.key);
|
|
130
|
+
}}/>)}
|
|
131
|
+
</view>
|
|
132
|
+
</scroll-view>;
|
|
133
|
+
}
|
|
72
134
|
const SEG_H = {
|
|
73
135
|
sm: 32,
|
|
74
136
|
md: 40,
|
|
@@ -142,6 +204,7 @@ function G9Segmented(props) {
|
|
|
142
204
|
</view>;
|
|
143
205
|
}
|
|
144
206
|
const Segment = memo(function(p) {
|
|
207
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
145
208
|
const press = useG9Press(p.onTap, {
|
|
146
209
|
blocked: p.blocked,
|
|
147
210
|
source: 'G9Segmented',
|
|
@@ -158,10 +221,10 @@ const Segment = memo(function(p) {
|
|
|
158
221
|
return <view className={`g9-seg__item${'content' === p.fit ? ' g9-seg__item--content' : ''}${'underline' === p.appearance ? ' g9-seg__item--underline' : ''}${p.blocked ? ' g9-seg__item--disabled' : ''}`} {...g9IdProps(p.id)} style={{
|
|
159
222
|
...paint,
|
|
160
223
|
borderRadius: 'underline' === p.appearance ? '0px' : `${(p.height - 6) / 2}px`
|
|
161
|
-
}} accessibility-element={true} accessibility-traits="button" accessibility-label={p.item.label}
|
|
224
|
+
}} accessibility-element={true} accessibility-traits="button" accessibility-label={p.item.label} {...g9SelectedA11y(p.on, selectedWord)} bindtap={press}>
|
|
162
225
|
<view className="g9-seg__line">
|
|
163
226
|
{p.item.icon ? <G9Icon icon={p.item.icon} size={15} color={fg}/> : null}
|
|
164
|
-
<text className={`g9-seg__label${p.on ? ' g9-seg__label--on' : ''}`} style={{
|
|
227
|
+
<text className={`g9-seg__label${p.on ? ' g9-seg__label--on' : ''}`} text-maxline="1" style={{
|
|
165
228
|
color: fg
|
|
166
229
|
}}>
|
|
167
230
|
{p.item.label}
|
|
@@ -176,7 +239,7 @@ const Segment = memo(function(p) {
|
|
|
176
239
|
</text>
|
|
177
240
|
</view> : null}
|
|
178
241
|
</view>
|
|
179
|
-
{p.item.sub ? <text className="g9-seg__sub" style={{
|
|
242
|
+
{p.item.sub ? <text className="g9-seg__sub" text-maxline="1" style={{
|
|
180
243
|
color: fg
|
|
181
244
|
}}>
|
|
182
245
|
{p.item.sub}
|
|
@@ -225,19 +288,24 @@ function G9RadioGroup(props) {
|
|
|
225
288
|
</view>;
|
|
226
289
|
}
|
|
227
290
|
const RadioRow = memo(function(p) {
|
|
291
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
228
292
|
const press = useG9Press(p.onTap, {
|
|
229
293
|
blocked: p.blocked,
|
|
230
294
|
source: 'G9RadioGroup',
|
|
231
295
|
guardMs: 0
|
|
232
296
|
});
|
|
233
|
-
return <view className={`g9-radio${p.cards ? ' g9-radio--card' : ''}${p.cards && p.on ? ' g9-radio--card-on' : ''}${p.blocked ? ' g9-radio--disabled' : ''}`} {...g9IdProps(p.id)} style={g9RowStyle(p.direction)} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option.label}
|
|
297
|
+
return <view className={`g9-radio${p.cards ? ' g9-radio--card' : ''}${p.cards && p.on ? ' g9-radio--card-on' : ''}${p.blocked ? ' g9-radio--disabled' : ''}`} {...g9IdProps(p.id)} style={g9RowStyle(p.direction)} flatten={false} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option.label} {...g9SelectedA11y(p.on, selectedWord)} bindtap={press}>
|
|
234
298
|
<view className={`g9-radio__mark${p.on ? ' g9-radio__mark--on' : ''}`}>
|
|
235
299
|
{p.on ? <view className="g9-radio__dot"/> : null}
|
|
236
300
|
</view>
|
|
237
301
|
{p.option.icon ? <G9Icon icon={p.option.icon} size={20} color="var(--g9-text-secondary)"/> : null}
|
|
238
302
|
<view className="g9-radio__body">
|
|
239
|
-
<text className="g9-radio__label"
|
|
240
|
-
|
|
303
|
+
<text className="g9-radio__label" style={g9TextStart(p.direction)}>
|
|
304
|
+
{g9Paragraph(p.option.label, p.direction)}
|
|
305
|
+
</text>
|
|
306
|
+
{p.option.description ? <text className="g9-radio__desc" style={g9TextStart(p.direction)}>
|
|
307
|
+
{g9Paragraph(p.option.description, p.direction)}
|
|
308
|
+
</text> : null}
|
|
241
309
|
</view>
|
|
242
310
|
</view>;
|
|
243
311
|
});
|
|
@@ -296,14 +364,16 @@ function G9Stepper(props) {
|
|
|
296
364
|
});
|
|
297
365
|
const collapsed = void 0 !== props.collapsedAtMin && false !== props.collapsedAtMin && value <= min;
|
|
298
366
|
const text1 = props.format ? props.format(value) : String(value);
|
|
299
|
-
const removes = value - step < min + 1e-9
|
|
367
|
+
const removes = !!props.collapsedAtMin && (void 0 !== props.collapseBelow ? value - step < props.collapseBelow - 1e-9 : value - step < min + 1e-9);
|
|
300
368
|
if (collapsed) {
|
|
301
|
-
var _props_increaseLabel1;
|
|
369
|
+
var _props_addLabel, _props_increaseLabel1;
|
|
302
370
|
return <view className={`${control.className} g9-stepper--add${props.block ? ' g9-stepper--block' : ''}`} {...control.idProps} style={control.rootStyle({
|
|
303
371
|
height: `${h}px`,
|
|
304
372
|
borderRadius: `${h / 2}px`
|
|
305
|
-
})} accessibility-element={true} accessibility-traits="button" accessibility-label={'string' == typeof props.collapsedAtMin ? props.collapsedAtMin : null != (_props_increaseLabel1 = props.increaseLabel) ? _props_increaseLabel1 : '+'}
|
|
306
|
-
|
|
373
|
+
})} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_addLabel = props.addLabel) ? _props_addLabel : 'string' == typeof props.collapsedAtMin ? props.collapsedAtMin : null != (_props_increaseLabel1 = props.increaseLabel) ? _props_increaseLabel1 : '+'} {...props.busy ? {
|
|
374
|
+
'accessibility-status': 'busy'
|
|
375
|
+
} : {}} bindtap={props.busy ? void 0 : plus}>
|
|
376
|
+
{props.busy ? <G9ActivityIndicator running={true} size={16} color="var(--g9-on-primary)"/> : <G9Icon icon="plus" size={16} color="var(--g9-on-primary)"/>}
|
|
307
377
|
{'string' == typeof props.collapsedAtMin ? <text className="g9-stepper__add-text">{props.collapsedAtMin}</text> : null}
|
|
308
378
|
</view>;
|
|
309
379
|
}
|
|
@@ -322,19 +392,22 @@ function G9Stepper(props) {
|
|
|
322
392
|
...tray ? {
|
|
323
393
|
borderRadius: `${btn / 2}px`
|
|
324
394
|
} : {}
|
|
325
|
-
}} accessibility-element={true} accessibility-traits="button" accessibility-label={removes && void 0 !== props.removeLabel ? props.removeLabel : null != (_props_decreaseLabel = props.decreaseLabel) ? _props_decreaseLabel : '−'} bindtap={minus}>
|
|
395
|
+
}} accessibility-element={true} accessibility-traits="button" accessibility-label={removes && void 0 !== props.removeLabel ? props.removeLabel : null != (_props_decreaseLabel = props.decreaseLabel) ? _props_decreaseLabel : '−'} bindtap={props.busy ? void 0 : minus}>
|
|
326
396
|
<G9Icon icon={removes ? 'delete' : 'minus'} size={16} color="var(--g9-text-primary)"/>
|
|
327
397
|
</view>
|
|
328
|
-
<text className={`g9-stepper__value${tray ? ' g9-stepper__value--tray' : ''}`} accessibility-label={'function' == typeof props.valueLabel ? props.valueLabel(value) : null != (_props_valueLabel = props.valueLabel) ? _props_valueLabel : text1}
|
|
329
|
-
|
|
398
|
+
<text className={`g9-stepper__value${tray ? ' g9-stepper__value--tray' : ''}`} accessibility-label={'function' == typeof props.valueLabel ? props.valueLabel(value) : null != (_props_valueLabel = props.valueLabel) ? _props_valueLabel : text1} {...props.busy ? {
|
|
399
|
+
'accessibility-status': 'busy'
|
|
400
|
+
} : {}}>
|
|
401
|
+
{props.busy ? '' : text1}
|
|
330
402
|
</text>
|
|
403
|
+
{props.busy ? <G9ActivityIndicator running={true} size={16} color="var(--g9-text-primary)" className="g9-stepper__busy"/> : null}
|
|
331
404
|
<view className={`g9-stepper__btn${tray ? ' g9-stepper__btn--tray' : ''}${value >= max ? ' g9-stepper__btn--off' : ''}`} {...g9IdProps(g9ChildId(props.id, 'Plus'))} style={{
|
|
332
405
|
width: `${btn}px`,
|
|
333
406
|
height: `${btn}px`,
|
|
334
407
|
...tray ? {
|
|
335
408
|
borderRadius: `${btn / 2}px`
|
|
336
409
|
} : {}
|
|
337
|
-
}} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_increaseLabel = props.increaseLabel) ? _props_increaseLabel : '+'} bindtap={plus}>
|
|
410
|
+
}} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_increaseLabel = props.increaseLabel) ? _props_increaseLabel : '+'} bindtap={props.busy ? void 0 : plus}>
|
|
338
411
|
<G9Icon icon="plus" size={16} color="var(--g9-text-primary)"/>
|
|
339
412
|
</view>
|
|
340
413
|
</view>;
|
|
@@ -342,6 +415,7 @@ function G9Stepper(props) {
|
|
|
342
415
|
const STAR = (fill, stroke)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2.8l2.85 5.78 6.38.93-4.62 4.5 1.09 6.35L12 17.36l-5.7 3 1.09-6.35-4.62-4.5 6.38-.93z" fill="${fill}" stroke="${stroke}" stroke-width="1.5" stroke-linejoin="round"/></svg>`;
|
|
343
416
|
function G9RatingInput(props) {
|
|
344
417
|
var _props_max, _props_defaultValue, _props_size;
|
|
418
|
+
const selectedWord = useG9Strings().get(G9StringKey.Selected);
|
|
345
419
|
const max = null != (_props_max = props.max) ? _props_max : 5;
|
|
346
420
|
const [value, setValue] = useControllableState({
|
|
347
421
|
value: props.value,
|
|
@@ -379,7 +453,7 @@ function G9RatingInput(props) {
|
|
|
379
453
|
return <view key={n} className="g9-rating__star" {...g9IdProps(g9ChildId(props.id, String(n)))} style={{
|
|
380
454
|
width: `${Math.max(44, size)}px`,
|
|
381
455
|
height: `${Math.max(44, size)}px`
|
|
382
|
-
}} accessibility-element={!props.readOnly} accessibility-traits="button" accessibility-label={null != (_ref = null == (_props_labels = props.labels) ? void 0 : _props_labels[i]) ? _ref : String(n)}
|
|
456
|
+
}} accessibility-element={!props.readOnly} accessibility-traits="button" accessibility-label={null != (_ref = null == (_props_labels = props.labels) ? void 0 : _props_labels[i]) ? _ref : String(n)} {...g9SelectedA11y(on, selectedWord)} {...props.readOnly || control.disabled ? {} : {
|
|
383
457
|
bindtap: ()=>{
|
|
384
458
|
tick(props.haptic);
|
|
385
459
|
setValue(n === value ? n - 1 : n);
|
|
@@ -393,4 +467,4 @@ function G9RatingInput(props) {
|
|
|
393
467
|
})}
|
|
394
468
|
</view>;
|
|
395
469
|
}
|
|
396
|
-
export { G9Chip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper };
|
|
470
|
+
export { G9Chip, G9ChipStrip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper };
|
package/dist/toggle/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { checkBoxColors, checkBoxSvg, G9CheckBox, type G9CheckBoxColors, type G9CheckBoxHandle, type G9CheckBoxProps, g9CheckBoxMetrics, } from './checkbox.js';
|
|
2
2
|
export { checkMarkPath, clamp01, fillAmount, firstArmLength, type G9CheckMarkGeometry, type G9CheckMarkTrim, g9CheckFillPhaseEnd, g9CheckGeometry, g9CheckMarkPhaseStart, g9DashGeometry, markAmount, nextOnTap, resolveCheckMarkGeometry, secondArmLength, targetMorph, targetProgress, trimCheckMark, } from './checkbox-math.js';
|
|
3
3
|
export { G9ChipGroup, type G9ChipGroupProps } from './chip-group.js';
|
|
4
|
-
export { G9Chip, type G9ChipProps, G9RadioGroup, type G9RadioGroupProps, type G9RadioOption, G9RatingInput, type G9RatingInputProps, G9Segmented, type G9SegmentedProps, type G9SegmentItem, G9Stepper, type G9StepperProps, } from './choice.js';
|
|
4
|
+
export { G9Chip, type G9ChipProps, G9ChipStrip, type G9ChipStripItem, type G9ChipStripProps, G9RadioGroup, type G9RadioGroupProps, type G9RadioOption, G9RatingInput, type G9RatingInputProps, G9Segmented, type G9SegmentedProps, type G9SegmentItem, G9Stepper, type G9StepperProps, } from './choice.js';
|
|
5
5
|
export { G9Switch, G9SwitchGroup, type G9SwitchGroupProps, type G9SwitchHandle, type G9SwitchProps } from './switch.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,OAAO,EACP,UAAU,EACV,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,OAAO,EACP,UAAU,EACV,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,cAAc,EACd,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/toggle/index.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { G9CheckBox, checkBoxColors, checkBoxSvg, g9CheckBoxMetrics } from "./checkbox.jsx";
|
|
2
2
|
export { checkMarkPath, clamp01, fillAmount, firstArmLength, g9CheckFillPhaseEnd, g9CheckGeometry, g9CheckMarkPhaseStart, g9DashGeometry, markAmount, nextOnTap, resolveCheckMarkGeometry, secondArmLength, targetMorph, targetProgress, trimCheckMark } from "./checkbox-math.jsx";
|
|
3
3
|
export { G9ChipGroup } from "./chip-group.jsx";
|
|
4
|
-
export { G9Chip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper } from "./choice.jsx";
|
|
4
|
+
export { G9Chip, G9ChipStrip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper } from "./choice.jsx";
|
|
5
5
|
export { G9Switch, G9SwitchGroup } from "./switch.jsx";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8",
|
|
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",
|
|
@@ -23,11 +23,21 @@
|
|
|
23
23
|
"types": "./dist/guide/index.d.ts",
|
|
24
24
|
"default": "./dist/guide/index.jsx"
|
|
25
25
|
},
|
|
26
|
+
"./reader": {
|
|
27
|
+
"source": "./src/reader/index.ts",
|
|
28
|
+
"types": "./dist/reader/index.d.ts",
|
|
29
|
+
"default": "./dist/reader/index.jsx"
|
|
30
|
+
},
|
|
26
31
|
"./route": {
|
|
27
32
|
"source": "./src/route/index.ts",
|
|
28
33
|
"types": "./dist/route/index.d.ts",
|
|
29
34
|
"default": "./dist/route/index.jsx"
|
|
30
35
|
},
|
|
36
|
+
"./appearance": {
|
|
37
|
+
"source": "./src/appearance/index.ts",
|
|
38
|
+
"types": "./dist/appearance/index.d.ts",
|
|
39
|
+
"default": "./dist/appearance/index.jsx"
|
|
40
|
+
},
|
|
31
41
|
"./base": {
|
|
32
42
|
"source": "./src/base/index.ts",
|
|
33
43
|
"types": "./dist/base/index.d.ts",
|
|
@@ -43,6 +53,11 @@
|
|
|
43
53
|
"types": "./dist/host/index.d.ts",
|
|
44
54
|
"default": "./dist/host/index.jsx"
|
|
45
55
|
},
|
|
56
|
+
"./dashboard": {
|
|
57
|
+
"source": "./src/dashboard/index.ts",
|
|
58
|
+
"types": "./dist/dashboard/index.d.ts",
|
|
59
|
+
"default": "./dist/dashboard/index.jsx"
|
|
60
|
+
},
|
|
46
61
|
"./deferred": {
|
|
47
62
|
"source": "./src/deferred/index.ts",
|
|
48
63
|
"types": "./dist/deferred/index.d.ts",
|
|
@@ -182,6 +197,11 @@
|
|
|
182
197
|
"types": "./dist/effects/index.d.ts",
|
|
183
198
|
"default": "./dist/effects/index.jsx"
|
|
184
199
|
},
|
|
200
|
+
"./notifications": {
|
|
201
|
+
"source": "./src/notifications/index.ts",
|
|
202
|
+
"types": "./dist/notifications/index.d.ts",
|
|
203
|
+
"default": "./dist/notifications/index.jsx"
|
|
204
|
+
},
|
|
185
205
|
"./orb": {
|
|
186
206
|
"source": "./src/orb/index.ts",
|
|
187
207
|
"types": "./dist/orb/index.d.ts",
|
|
@@ -214,7 +234,7 @@
|
|
|
214
234
|
"build": "rslib build"
|
|
215
235
|
},
|
|
216
236
|
"dependencies": {
|
|
217
|
-
"@g9tm/lynxcontrols-foundation": "2.5.
|
|
237
|
+
"@g9tm/lynxcontrols-foundation": "2.5.8"
|
|
218
238
|
},
|
|
219
239
|
"peerDependencies": {
|
|
220
240
|
"@lynx-js/react": ">=0.129.3 <0.130.0",
|
|
@@ -10,7 +10,11 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
10
10
|
|
|
11
11
|
## @g9tm/lynxcontrols-calendar
|
|
12
12
|
|
|
13
|
-
- `@g9tm/lynxcontrols-calendar`: G9AgendaView, G9DateInput, G9MiniMonth, G9MonthDayPicker, G9MonthView, G9RepeatPicker, G9TimeGrid, G9ZonePicker → `components/calendar.md`
|
|
13
|
+
- `@g9tm/lynxcontrols-calendar`: G9AgendaView, G9BirthdayField, G9DateInput, G9EventCard, G9FindTime, G9MiniMonth, G9MonthDayPicker, G9MonthView, G9RepeatPicker, G9TimeGrid, G9TimeListPicker, G9TodayWidget, G9WorkingHoursEditor, G9ZonePicker → `components/calendar-1.md`, `components/calendar-2.md`
|
|
14
|
+
|
|
15
|
+
## @g9tm/lynxcontrols-canvas
|
|
16
|
+
|
|
17
|
+
- `@g9tm/lynxcontrols-canvas`: G9Canvas, G9CanvasStylePanel → `components/canvas.md`
|
|
14
18
|
|
|
15
19
|
## @g9tm/lynxcontrols-charts
|
|
16
20
|
|
|
@@ -18,7 +22,7 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
18
22
|
|
|
19
23
|
## @g9tm/lynxcontrols-chat
|
|
20
24
|
|
|
21
|
-
- `@g9tm/lynxcontrols-chat`: G9ChatComposer, G9ChatThread, G9ConversationRow, G9EmojiPicker, G9MessageBubble, G9TypingDots → `components/chat.md`
|
|
25
|
+
- `@g9tm/lynxcontrols-chat`: G9ChatComposer, G9ChatThread, G9ConversationRow, G9EmojiLibrary, G9EmojiPicker, G9FileCard, G9GifPicker, G9LinkPreview, G9MessageBubble, G9MessageMenu, G9MessageMeta, G9MessageText, G9PersonPicker, G9PinnedBar, G9ReactionBar, G9SlashSuggestions, G9StickerPicker, G9TypingDots → `components/chat-1.md`, `components/chat-2.md`
|
|
22
26
|
|
|
23
27
|
## @g9tm/lynxcontrols-commerce
|
|
24
28
|
|
|
@@ -27,22 +31,25 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
27
31
|
## @g9tm/lynxcontrols
|
|
28
32
|
|
|
29
33
|
- `@g9tm/lynxcontrols/anchor`: G9Anchor, G9ScrollerScope → `components/anchor.md`
|
|
34
|
+
- `@g9tm/lynxcontrols/appearance`: G9AppearancePage, G9ContrastPanel, G9PersonalThemeSheet, G9WallpaperSwatch → `components/appearance.md`
|
|
30
35
|
- `@g9tm/lynxcontrols/base`: G9CornerBadge, G9Pressable → `components/base.md`
|
|
31
36
|
- `@g9tm/lynxcontrols/button`: G9Button, G9HeaderActionButton, G9IconButton, G9NavCard, G9SafeButton, G9SafeIconButton, G9VerticalIconTextButton → `components/button.md`
|
|
32
37
|
- `@g9tm/lynxcontrols/cascade`: G9CascadePanel → `components/cascade.md`
|
|
33
38
|
- `@g9tm/lynxcontrols/commands`: G9CommandPalette, G9ShortcutList, G9ShortcutsSheet → `components/commands.md`
|
|
39
|
+
- `@g9tm/lynxcontrols/dashboard`: G9DashboardCustomizeSheet, G9DashboardGrid, G9WidgetSkeleton, G9WidgetSlot → `components/dashboard.md`
|
|
34
40
|
- `@g9tm/lynxcontrols/deferred`: G9DeferredContent → `components/deferred.md`
|
|
35
41
|
- `@g9tm/lynxcontrols/design`: G9DesignNode, G9DesignScope → `components/design.md`
|
|
36
|
-
- `@g9tm/lynxcontrols/display`: G9ActivityIndicator, G9Avatar, G9Badge, G9CameFromMark, G9CultureDateTimeLabel, G9Delta, G9EmptyState, G9ErrorBoundary, G9Image, G9InlineMessage, G9Keycap, G9Kpi, G9KpiGrid, G9LiveBadge, G9LiveDot, G9LoadState, G9LockOverlay, G9Photo, G9ProgressBar, G9ProgressRing, G9RevealText, G9Separator, G9SheetSkeleton, G9ShimmerBand, G9Skeleton, G9SkeletonPage, G9SkeletonRows, G9StatusPill, G9StepTracker, G9Tag, G9ThemePreviewCard, G9TitleWithLine, G9Wave → `components/display-1.md`, `components/display-2.md`, `components/display-3.md`
|
|
42
|
+
- `@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`
|
|
37
43
|
- `@g9tm/lynxcontrols/edge-panel`: G9EdgePanel → `components/edge-panel.md`
|
|
38
44
|
- `@g9tm/lynxcontrols/effects`: G9AnimatedCheck, G9Confetti, G9SuccessHeader → `components/effects.md`
|
|
39
45
|
- `@g9tm/lynxcontrols/expander`: G9Expander → `components/expander.md`
|
|
40
46
|
- `@g9tm/lynxcontrols/fields`: G9Editor, G9FormField, G9NumberEntry, G9NumPad, G9OutlinedField, G9PinEntry, G9SearchEntry, G9TagEntry, G9TextEntry, G9TimeEntry → `components/fields.md`
|
|
41
47
|
- `@g9tm/lynxcontrols/header`: G9AppBar → `components/header.md`
|
|
42
|
-
- `@g9tm/lynxcontrols/host`: G9Host, G9PageLoadingOverlay → `components/host.md`
|
|
48
|
+
- `@g9tm/lynxcontrols/host`: G9CarryContexts, G9Host, G9PageLoadingOverlay → `components/host.md`
|
|
43
49
|
- `@g9tm/lynxcontrols/icon`: G9Art, G9Icon, G9IconSlot, G9Swatch → `components/icon.md`
|
|
44
50
|
- `@g9tm/lynxcontrols/layout`: G9ActionRow, G9Bento, G9Card, G9Columns, G9HScroll, G9Page, G9PlaceScroll, G9SaveBar, G9ScrollSpyBar, G9Section, G9SectionHeader, G9SplitPane, G9UnsavedBar → `components/layout-1.md`, `components/layout-2.md`
|
|
45
51
|
- `@g9tm/lynxcontrols/list`: G9DragList, G9ListRow, G9Pager, G9PullToRefresh, G9SettingsGroup, G9SwitchRow, G9VirtualList → `components/list.md`
|
|
52
|
+
- `@g9tm/lynxcontrols/notifications`: G9NotificationCenter, G9NotificationCenterPanel → `components/notifications.md`
|
|
46
53
|
- `@g9tm/lynxcontrols/orb`: G9FloatingOrb, G9HoldButton → `components/orb.md`
|
|
47
54
|
- `@g9tm/lynxcontrols/pickers`: DateTimeSheetBody, G9ComboBox, G9DateTimePicker, G9DayStepper, G9Picker, G9TimeSpanPicker, G9WheelColumn, PickerField, PickerSheetHeader, SelectionValueIcon, TimeSpanSheetBody → `components/pickers.md`
|
|
48
55
|
- `@g9tm/lynxcontrols/plus-button`: G9PlusButton → `components/plus-button.md`
|
|
@@ -50,14 +57,15 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
50
57
|
- `@g9tm/lynxcontrols/popup`: G9PopupDragHandle, G9PopupView, PopupFrame, PopupInputForm → `components/popup.md`
|
|
51
58
|
- `@g9tm/lynxcontrols/provider`: G9Activity, G9DirectionScope, G9KeepAlive, G9Provider → `components/provider.md`
|
|
52
59
|
- `@g9tm/lynxcontrols/range-slider`: G9RangeSlider, G9StepSlider → `components/range-slider.md`
|
|
53
|
-
- `@g9tm/lynxcontrols/
|
|
60
|
+
- `@g9tm/lynxcontrols/reader`: G9ReaderSheet, G9ReaderView → `components/reader.md`
|
|
61
|
+
- `@g9tm/lynxcontrols/route`: G9PathNavigator, G9Place → `components/route.md`
|
|
54
62
|
- `@g9tm/lynxcontrols/sheet`: G9LoadableSheetContent, G9ProcessingSheetContent, G9Sheet, G9SheetBackdropScope, G9SheetFooter, G9SheetFooterBar, G9SheetFrame, G9SheetHeader, G9SheetScrollIndicator, G9SheetScrollRegion → `components/sheet.md`
|
|
55
63
|
- `@g9tm/lynxcontrols/shell`: G9AppShell, G9ConnectionBanner, G9IconRail, G9SideNav, G9TopBar, G9UpdateBar → `components/shell.md`
|
|
56
64
|
- `@g9tm/lynxcontrols/survey`: G9AllocationInput, G9ChoiceList, G9ScaleInput → `components/survey.md`
|
|
57
65
|
- `@g9tm/lynxcontrols/swipe`: G9SwipeGroup, G9SwipeView → `components/swipe.md`
|
|
58
66
|
- `@g9tm/lynxcontrols/tab-bar`: G9FlatTabBar, G9TabBar → `components/tab-bar.md`
|
|
59
67
|
- `@g9tm/lynxcontrols/tabs`: G9TabView → `components/tabs.md`
|
|
60
|
-
- `@g9tm/lynxcontrols/toggle`: G9CheckBox, G9Chip, G9ChipGroup, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper, G9Switch, G9SwitchGroup → `components/toggle.md`
|
|
68
|
+
- `@g9tm/lynxcontrols/toggle`: G9CheckBox, G9Chip, G9ChipGroup, G9ChipStrip, G9RadioGroup, G9RatingInput, G9Segmented, G9Stepper, G9Switch, G9SwitchGroup → `components/toggle.md`
|
|
61
69
|
|
|
62
70
|
## @g9tm/lynxcontrols-datagrid
|
|
63
71
|
|
|
@@ -69,12 +77,20 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
69
77
|
|
|
70
78
|
## @g9tm/lynxcontrols-map
|
|
71
79
|
|
|
72
|
-
- `@g9tm/lynxcontrols-map`: G9StaticMap → `components/map.md`
|
|
80
|
+
- `@g9tm/lynxcontrols-map`: G9Map, G9StaticMap → `components/map.md`
|
|
73
81
|
|
|
74
82
|
## @g9tm/lynxcontrols-media
|
|
75
83
|
|
|
76
|
-
- `@g9tm/lynxcontrols-media`: G9BlurhashView, G9DropZone, G9ImageCropper, G9Lightbox, G9MediaGrid, G9MediaPager, G9VoicePlayer → `components/media.md`
|
|
84
|
+
- `@g9tm/lynxcontrols-media`: G9BlurhashView, G9CallControls, G9CallStage, G9CallTileView, G9Captcha, G9ClipPlayer, G9DropZone, G9ImageCropper, G9IncomingCall, G9Lightbox, G9MediaGrid, G9MediaPager, G9QualityBars, G9SelfPip, G9VideoNote, G9VoicePlayer → `components/media-1.md`, `components/media-2.md`
|
|
77
85
|
|
|
78
86
|
## @g9tm/lynxcontrols-pilot
|
|
79
87
|
|
|
80
88
|
- `@g9tm/lynxcontrols-pilot`: G9PilotHost, G9PilotMask, G9PilotPanel → `components/pilot.md`
|
|
89
|
+
|
|
90
|
+
## @g9tm/lynxcontrols-projects
|
|
91
|
+
|
|
92
|
+
- `@g9tm/lynxcontrols-projects`: G9Board, G9RuleBuilder, G9TaskCard, G9Timeline → `components/projects.md`
|
|
93
|
+
|
|
94
|
+
## @g9tm/lynxcontrols-richtext
|
|
95
|
+
|
|
96
|
+
- `@g9tm/lynxcontrols-richtext`: G9RichLines, G9RichText, G9RichTextEditor → `components/richtext.md`
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/appearance` (generated)
|
|
2
|
+
|
|
3
|
+
# G9AppearancePage
|
|
4
|
+
|
|
5
|
+
`import { G9AppearancePage } from '@g9tm/lynxcontrols/appearance';`
|
|
6
|
+
|
|
7
|
+
Settings → Appearance: mode, themes, accent, wallpaper, text size, density, effects.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `onChange`: (settings: G9AppearanceSettings) => void
|
|
11
|
+
- `settings`: object
|
|
12
|
+
- `systemScheme`: 'light' | 'dark'
|
|
13
|
+
- `themes`: object[]
|
|
14
|
+
- `onCreateTheme?`: () => void
|
|
15
|
+
- `onEditTheme?`: (theme: G9ThemeDefinition) => void
|
|
16
|
+
- `accents?`: object[]
|
|
17
|
+
- `language?`: string
|
|
18
|
+
|
|
19
|
+
Example: `<G9AppearancePage onChange={() => {}} settings={settings} systemScheme="light" themes={themes} />`
|
|
20
|
+
|
|
21
|
+
# G9ContrastPanel
|
|
22
|
+
|
|
23
|
+
`import { G9ContrastPanel } from '@g9tm/lynxcontrols/appearance';`
|
|
24
|
+
|
|
25
|
+
A palette's contrast report: a sample, the ratio, AA / AAA and a fix for each failing pair.
|
|
26
|
+
|
|
27
|
+
Props:
|
|
28
|
+
- `palette`: object
|
|
29
|
+
- `onFix?`: (foreground: string, value: string) => void
|
|
30
|
+
- `onlyFailures?`: boolean
|
|
31
|
+
- `pairs?`: object[]
|
|
32
|
+
- `rules?`: object[]
|
|
33
|
+
- `words?`: object
|
|
34
|
+
|
|
35
|
+
Example: `<G9ContrastPanel palette={palette} />`
|
|
36
|
+
|
|
37
|
+
# G9PersonalThemeSheet
|
|
38
|
+
|
|
39
|
+
`import { G9PersonalThemeSheet } from '@g9tm/lynxcontrols/appearance';`
|
|
40
|
+
|
|
41
|
+
The personal theme editor: base, accent, surfaces, mode, wallpaper, a live preview and its contrast.
|
|
42
|
+
|
|
43
|
+
Props:
|
|
44
|
+
- `bases`: object[]
|
|
45
|
+
- `onClose`: () => void
|
|
46
|
+
- `onSave`: (theme: G9ThemeDefinition, draft: G9PersonalThemeDraft) => void
|
|
47
|
+
- `open`: boolean
|
|
48
|
+
- `onDelete?`: (id: string) => void
|
|
49
|
+
- `onExport?`: (theme: G9ThemeDefinition) => void
|
|
50
|
+
- `accents?`: object[]
|
|
51
|
+
- `draft?`: object
|
|
52
|
+
|
|
53
|
+
Example: `<G9PersonalThemeSheet bases={bases} onClose={() => {}} onSave={() => {}} open />`
|
|
54
|
+
|
|
55
|
+
# G9WallpaperSwatch
|
|
56
|
+
|
|
57
|
+
`import { G9WallpaperSwatch } from '@g9tm/lynxcontrols/appearance';`
|
|
58
|
+
|
|
59
|
+
A wallpaper as a small swatch in the palette's colours, with its name and a ring when chosen.
|
|
60
|
+
|
|
61
|
+
Props:
|
|
62
|
+
- `palette`: object
|
|
63
|
+
- `scheme`: 'light' | 'dark'
|
|
64
|
+
- `wallpaper`: object
|
|
65
|
+
- `label?`: string
|
|
66
|
+
- `selected?`: boolean
|
|
67
|
+
- `onPress?`: () => void
|
|
68
|
+
- `height?`: number = 56
|
|
69
|
+
|
|
70
|
+
Example: `<G9WallpaperSwatch palette={palette} scheme="light" wallpaper={wallpaper} />`
|
|
@@ -14,7 +14,7 @@ Props:
|
|
|
14
14
|
- `onValueChange?`: (value: string, details: { readonly source: G9BarcodeValueSource; }) => void
|
|
15
15
|
- `disabled?`: boolean = false
|
|
16
16
|
- `confirmType?`: 'search' | 'done' | 'send' | 'go' | 'next' = "done"
|
|
17
|
-
- `inputType?`: 'number' | '
|
|
17
|
+
- `inputType?`: 'number' | 'custom' | 'default' | 'email' | 'phone' | 'url' | 'letters' | 'decimal' | 'signedNumber' | 'signedDecimal' | 'lettersAndNumbers' | 'lettersNumbersSpace' | 'persianLetters' | 'persianLettersAndNumbers' | 'multilingualLettersAndNumbers' | 'noSpecialChars' = "default"
|
|
18
18
|
|
|
19
19
|
Example: `<G9BarcodeTextEntry />`
|
|
20
20
|
|
|
@@ -9,11 +9,11 @@ Text button (MAUI `G9Button`): variant fill (gradient for the solid variants), 1
|
|
|
9
9
|
Props:
|
|
10
10
|
- `text?`: string
|
|
11
11
|
- `variant?`: 'text' | 'primary' | 'default' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
12
|
-
- `size?`: 'small' | '
|
|
12
|
+
- `size?`: 'small' | 'large' | 'medium' | 'hero' = "medium"
|
|
13
13
|
- `leadingIcon?`: icon
|
|
14
14
|
- `onPress?`: () => void
|
|
15
15
|
- `disabled?`: boolean = false
|
|
16
|
-
- `fontAttributes?`: '
|
|
16
|
+
- `fontAttributes?`: 'none' | 'bold' | 'italic' | 'boldItalic' = "bold"
|
|
17
17
|
- `loadingText?`: string
|
|
18
18
|
|
|
19
19
|
Example: `<G9Button text="Cancel" variant="outline" />`
|
|
@@ -81,11 +81,11 @@ Button with guarded execution (MAUI `G9SafeButton`): a tap calls `onPress`, then
|
|
|
81
81
|
Props:
|
|
82
82
|
- `text?`: string
|
|
83
83
|
- `variant?`: 'text' | 'primary' | 'default' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
84
|
-
- `size?`: 'small' | '
|
|
84
|
+
- `size?`: 'small' | 'large' | 'medium' | 'hero' = "medium"
|
|
85
85
|
- `leadingIcon?`: icon
|
|
86
86
|
- `onPress?`: () => void
|
|
87
87
|
- `disabled?`: boolean = false
|
|
88
|
-
- `fontAttributes?`: '
|
|
88
|
+
- `fontAttributes?`: 'none' | 'bold' | 'italic' | 'boldItalic' = "bold"
|
|
89
89
|
- `onExecute?`: (context: G9SafeRunContext) => void
|
|
90
90
|
|
|
91
91
|
Example: `<G9SafeButton />`
|