@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/popover/popover.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./popover.css";
|
|
2
|
-
import { g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { G9StringKey, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
3
3
|
import { memo, useEffect, useMemo, useRef, useState } from "@lynx-js/react";
|
|
4
4
|
import { useG9Anchor } from "../anchor/hooks.jsx";
|
|
5
5
|
import { anchorRect, measureNode, windowRect } from "../anchor/measure.jsx";
|
|
@@ -8,7 +8,8 @@ import { useG9Keys } from "../commands/keys.jsx";
|
|
|
8
8
|
import { G9Keycap } from "../display/keycap.jsx";
|
|
9
9
|
import { useG9Back, useG9LayerItem } from "../host/hooks.jsx";
|
|
10
10
|
import { G9Icon } from "../icon/icon.jsx";
|
|
11
|
-
import {
|
|
11
|
+
import { useG9ListKeyboard } from "../list/keyboard.jsx";
|
|
12
|
+
import { useG9Core, useG9Direction, useG9Layout, useG9Strings } from "../provider/hooks.jsx";
|
|
12
13
|
import { computePopoverPosition } from "./position.jsx";
|
|
13
14
|
function G9OverlayRoot(props) {
|
|
14
15
|
const anchor = useG9Anchor(props.id, {
|
|
@@ -172,22 +173,81 @@ function G9Popover(props) {
|
|
|
172
173
|
});
|
|
173
174
|
return null;
|
|
174
175
|
}
|
|
176
|
+
function menuLevel(items, path) {
|
|
177
|
+
let level = items;
|
|
178
|
+
for (const key of path){
|
|
179
|
+
var _level_find;
|
|
180
|
+
const next = null == (_level_find = level.find((i)=>i.key === key)) ? void 0 : _level_find.items;
|
|
181
|
+
if (!next) break;
|
|
182
|
+
level = next;
|
|
183
|
+
}
|
|
184
|
+
return level;
|
|
185
|
+
}
|
|
175
186
|
const G9MenuList = memo(function(props) {
|
|
187
|
+
var _props_backLabel;
|
|
176
188
|
const dir = useG9Direction();
|
|
189
|
+
const strings = useG9Strings();
|
|
177
190
|
const tall = 'sheet' === props.density;
|
|
191
|
+
const [path, setPath] = useState([]);
|
|
192
|
+
const items = menuLevel(props.items, path);
|
|
193
|
+
const parent = path.length ? menuLevel(props.items, path.slice(0, -1)).find((i)=>i.key === path[path.length - 1]) : null;
|
|
194
|
+
const press = (item)=>{
|
|
195
|
+
g9Haptic('select');
|
|
196
|
+
if (item.items && item.items.length > 0) {
|
|
197
|
+
setPath([
|
|
198
|
+
...path,
|
|
199
|
+
item.key
|
|
200
|
+
]);
|
|
201
|
+
nav.setActive(0);
|
|
202
|
+
} else props.onSelect(item.key);
|
|
203
|
+
};
|
|
204
|
+
const nav = useG9ListKeyboard({
|
|
205
|
+
count: items.length,
|
|
206
|
+
enabled: true === props.keyboard,
|
|
207
|
+
wrap: true,
|
|
208
|
+
skip: (i)=>{
|
|
209
|
+
var _items_i;
|
|
210
|
+
return (null == (_items_i = items[i]) ? void 0 : _items_i.disabled) === true;
|
|
211
|
+
},
|
|
212
|
+
labelOf: (i)=>{
|
|
213
|
+
var _ref;
|
|
214
|
+
var _items_i;
|
|
215
|
+
return null != (_ref = null == (_items_i = items[i]) ? void 0 : _items_i.label) ? _ref : '';
|
|
216
|
+
},
|
|
217
|
+
onActivate: (i)=>{
|
|
218
|
+
const item = items[i];
|
|
219
|
+
if (item && !item.disabled) press(item);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
useG9Keys((e)=>{
|
|
223
|
+
if (!parent) return false;
|
|
224
|
+
const back = 'rtl' === dir ? 'ArrowRight' : 'ArrowLeft';
|
|
225
|
+
if (e.key !== back && 'Backspace' !== e.key) return false;
|
|
226
|
+
setPath(path.slice(0, -1));
|
|
227
|
+
nav.setActive(-1);
|
|
228
|
+
return true;
|
|
229
|
+
}, {
|
|
230
|
+
enabled: true === props.keyboard && null !== parent
|
|
231
|
+
});
|
|
178
232
|
return <view className="g9-menu-list" {...g9IdProps(props.id)}>
|
|
179
|
-
{
|
|
233
|
+
{parent ? <view className="g9-menu-item g9-menu-item--back" {...g9IdProps(g9ChildId(props.id, 'Back'))} style={{
|
|
234
|
+
...g9RowStyle(dir),
|
|
235
|
+
minHeight: `${tall ? 52 : 40}px`
|
|
236
|
+
}} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_props_backLabel = props.backLabel) ? _props_backLabel : strings.get(G9StringKey.Back)} bindtap={()=>setPath(path.slice(0, -1))}>
|
|
237
|
+
<G9Icon icon="arrowBack" size={18} color="var(--g9-text-secondary)"/>
|
|
238
|
+
<view className="g9-menu-item__text">
|
|
239
|
+
<text className="g9-menu-item__label g9-menu-item__label--back">{parent.label}</text>
|
|
240
|
+
</view>
|
|
241
|
+
</view> : null}
|
|
242
|
+
{items.map((item, index)=><view key={item.key} className="g9-menu-list__group">
|
|
180
243
|
{item.separatorBefore ? <view className="g9-menu-list__separator"/> : null}
|
|
181
|
-
<view className={`g9-menu-item${item.disabled ? ' g9-menu-item--disabled' : ''}`} {...g9IdProps(g9ChildId(props.id, item.key))} style={{
|
|
244
|
+
<view className={`g9-menu-item${item.disabled ? ' g9-menu-item--disabled' : ''}${index === nav.active ? ' g9-menu-item--active' : ''}`} {...g9IdProps(g9ChildId(props.id, item.key))} style={{
|
|
182
245
|
...g9RowStyle(dir),
|
|
183
246
|
minHeight: `${tall ? 52 : 40}px`
|
|
184
247
|
}} accessibility-element={true} accessibility-traits="button" accessibility-label={item.label} {...item.checked ? {
|
|
185
248
|
'accessibility-status': 'selected'
|
|
186
249
|
} : {}} {...item.disabled ? {} : {
|
|
187
|
-
bindtap: ()=>
|
|
188
|
-
g9Haptic('select');
|
|
189
|
-
props.onSelect(item.key);
|
|
190
|
-
}
|
|
250
|
+
bindtap: ()=>press(item)
|
|
191
251
|
}}>
|
|
192
252
|
{item.icon ? <G9Icon icon={item.icon} size={18} color={item.danger ? 'var(--g9-error)' : 'var(--g9-text-secondary)'}/> : null}
|
|
193
253
|
<view className="g9-menu-item__text">
|
|
@@ -198,6 +258,7 @@ const G9MenuList = memo(function(props) {
|
|
|
198
258
|
</view>
|
|
199
259
|
{item.shortcut ? <G9Keycap combo={item.shortcut}/> : null}
|
|
200
260
|
{item.checked ? <G9Icon icon="check" size={16} color="var(--g9-primary)"/> : null}
|
|
261
|
+
{item.items && item.items.length > 0 ? <G9Icon icon={'rtl' === dir ? 'chevronBack' : 'chevronForward'} size={16} color="var(--g9-text-tertiary)"/> : null}
|
|
201
262
|
</view>
|
|
202
263
|
</view>)}
|
|
203
264
|
</view>;
|
|
@@ -206,8 +267,8 @@ function G9Menu(props) {
|
|
|
206
267
|
const { wide } = useG9Layout();
|
|
207
268
|
const sheet = 'sheet' === props.mode || 'popover' !== props.mode && !wide;
|
|
208
269
|
const select = (k)=>{
|
|
209
|
-
props.onClose();
|
|
210
270
|
props.onSelect(k);
|
|
271
|
+
props.onClose();
|
|
211
272
|
};
|
|
212
273
|
if (sheet) return <G9ActionSheet open={props.open} onClose={props.onClose} {...props.title ? {
|
|
213
274
|
title: props.title
|
|
@@ -216,13 +277,13 @@ function G9Menu(props) {
|
|
|
216
277
|
} : {}} {...props.id ? {
|
|
217
278
|
id: props.id
|
|
218
279
|
} : {}}>
|
|
219
|
-
<G9MenuList items={props.items} onSelect={select} density="sheet" {...props.id ? {
|
|
280
|
+
<G9MenuList items={props.items} onSelect={select} keyboard={props.open} density="sheet" {...props.id ? {
|
|
220
281
|
id: `${props.id}_List`
|
|
221
282
|
} : {}}/>
|
|
222
283
|
</G9ActionSheet>;
|
|
223
284
|
const { items: _i, onSelect: _s, title: _t, mode: _m, cancelText: _c, ...pop } = props;
|
|
224
285
|
return <G9Popover {...pop} kind="menu">
|
|
225
|
-
<G9MenuList items={props.items} onSelect={select} {...props.id ? {
|
|
286
|
+
<G9MenuList items={props.items} onSelect={select} keyboard={props.open} {...props.id ? {
|
|
226
287
|
id: `${props.id}_List`
|
|
227
288
|
} : {}}/>
|
|
228
289
|
</G9Popover>;
|
|
@@ -288,4 +349,4 @@ function G9ContextMenu(props) {
|
|
|
288
349
|
} : {}}/>
|
|
289
350
|
</view>;
|
|
290
351
|
}
|
|
291
|
-
export { G9ActionSheet, G9ContextMenu, G9Menu, G9MenuList, G9OverlayRoot, G9Popover, g9Popovers, useG9OpenOverlay };
|
|
352
|
+
export { G9ActionSheet, G9ContextMenu, G9Menu, G9MenuList, G9OverlayRoot, G9Popover, g9Popovers, menuLevel, useG9OpenOverlay };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { G9AnchorRect } from '../anchor/registry.js';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The side and the alignment along it. `start`/`end` follow the reading direction. On a side (`start`, `end`) the
|
|
4
|
+
* alignment is vertical: `-start` lines the panel's top up with the anchor's top, `-end` its bottom with the anchor's
|
|
5
|
+
* bottom (G9Hub's notification centre beside the rail bell, 2.5.8); no suffix centres it.
|
|
6
|
+
*/
|
|
7
|
+
export type G9Placement = 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end' | 'start' | 'start-start' | 'start-end' | 'end' | 'end-start' | 'end-end';
|
|
4
8
|
/** What {@link computePopoverPosition} needs: the anchor rectangle, the panel size, the window and the wished placement. */
|
|
5
9
|
export interface G9PopoverPositionInput {
|
|
6
10
|
readonly anchor: G9AnchorRect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../src/popover/position.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../src/popover/position.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,KAAK,GACL,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,KAAK,GACL,WAAW,GACX,SAAS,CAAC;AAEd,4HAA4H;AAC5H,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC;IACjC,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IACvB,gEAAgE;IAChE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wHAAwH;AACxH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gGAAgG;IAChG,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;CACjC;AAiBD,wCAAwC;AACxC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB,CAyCvF"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
const OPPOSITE = {
|
|
2
|
+
top: 'bottom',
|
|
3
|
+
bottom: 'top',
|
|
4
|
+
start: 'end',
|
|
5
|
+
end: 'start'
|
|
6
|
+
};
|
|
1
7
|
function side(p) {
|
|
2
|
-
return p.
|
|
8
|
+
return p.split('-')[0];
|
|
3
9
|
}
|
|
4
10
|
function align(p) {
|
|
5
|
-
|
|
11
|
+
const a = p.split('-')[1];
|
|
12
|
+
return 'start' === a ? 'start' : 'end' === a ? 'end' : 'center';
|
|
6
13
|
}
|
|
7
|
-
const flip = (p)=>
|
|
14
|
+
const flip = (p)=>{
|
|
15
|
+
const [s, a] = p.split('-');
|
|
16
|
+
return a ? `${OPPOSITE[s]}-${a}` : OPPOSITE[s];
|
|
17
|
+
};
|
|
8
18
|
const clamp = (v, lo, hi)=>Math.max(lo, Math.min(hi, v));
|
|
9
19
|
function computePopoverPosition(input) {
|
|
10
20
|
var _input_offset, _input_margin, _input_placement;
|
|
@@ -38,7 +48,8 @@ function computePopoverPosition(input) {
|
|
|
38
48
|
} else {
|
|
39
49
|
const toRight = 'end' === finalSide !== rtl;
|
|
40
50
|
x = toRight ? a.x + a.width + offset : a.x - offset - width;
|
|
41
|
-
|
|
51
|
+
const al = align(placement);
|
|
52
|
+
y = 'start' === al ? a.y : 'end' === al ? a.y + a.height - h : a.y + a.height / 2 - h / 2;
|
|
42
53
|
}
|
|
43
54
|
x = clamp(x, vp.x + margin, vp.x + vp.width - margin - width);
|
|
44
55
|
y = clamp(y, vp.y + margin, vp.y + vp.height - margin - Math.min(h, maxHeight));
|
package/dist/popup/popup.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.g9-popup {
|
|
2
|
+
pointer-events: auto;
|
|
2
3
|
justify-content: center;
|
|
3
4
|
align-items: center;
|
|
4
5
|
display: flex;
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.g9-popup__scrim {
|
|
18
|
+
pointer-events: auto;
|
|
17
19
|
position: absolute;
|
|
18
20
|
top: 0;
|
|
19
21
|
bottom: 0;
|
|
@@ -22,6 +24,7 @@
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
.g9-popup__card {
|
|
27
|
+
pointer-events: auto;
|
|
25
28
|
border-style: solid;
|
|
26
29
|
border-width: 1px;
|
|
27
30
|
flex-direction: column;
|
package/dist/popup/popup.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/popup/popup.css"],"names":[],"mappings":"AAGA;EAFE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,eAAe;EACf,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;
|
|
1
|
+
{"version":3,"sources":["webpack://./src/popup/popup.css"],"names":[],"mappings":"AAGA;EAFE,oBAAoB;EACpB,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,eAAe;EACf,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,cAAc;AAChB;;AAMA;EAHE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;EACpB,mBAAmB;EACnB,iBAAiB;EACjB,sBAAsB;EACtB,eAAe;EACf,aAAa;AACf;;AAQA;EALE,sBAAsB;EACtB,aAAa;AACf;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,oBAAoB;EACpB,aAAa;AACf;;AASA;EANE,2CAA2C;EAC3C,WAAW;EACX,WAAW;AACb;;AAUA;EAPE,kBAAkB;EAClB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,kBAAkB;AACpB;;AAUA;EAPE,iBAAiB;EACjB,eAAe;AACjB;;AAUA;EAPE,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,eAAe;EACf,oCAAoC;EACpC,uBAAuB;EACvB,WAAW;EACX,gBAAgB;AAClB;;AAYA;EATE,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAaA;EAVE,eAAe;EACf,gCAAgC;EAChC,eAAe;EACf,iBAAiB;AACnB;;AAaA;EAVE,eAAe;AACjB;;AAcA;EAXE,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,aAAa;AACf;;AAcA;EAXE,sBAAsB;EACtB,oBAAoB;EACpB,UAAU;AACZ;;AAgBA;EAbE,mBAAmB;EACnB,mBAAmB;EACnB,WAAW;EACX,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,aAAa;AACf;;AAkBA;EAfE,YAAY;EACZ,gBAAgB;AAClB;;AAkBA;EAfE,mBAAmB;EACnB,mBAAmB;EACnB,uCAAuC;AACzC;;AAkBA;EAfE,WAAW;AACb;;AAkBA;EAfE,eAAe;EACf,oCAAoC;EACpC,gBAAgB;AAClB;;AAkBA;EAfE,sBAAsB;EACtB,aAAa;AACf;;AAkBA;EAfE,sBAAsB;EACtB,mBAAmB;EACnB,aAAa;AACf;;AAkBA;EAfE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;EAC/B,kBAAkB;AACpB;;AAkBA;EAfE,eAAe;EACf,gCAAgC;EAChC,sBAAsB;EACtB,eAAe;AACjB;;AAkBA;EAfE,mBAAmB;EACnB,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AAkBA;EAfE,mBAAmB;EACnB,iBAAiB;EACjB,+BAA+B;EAC/B,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,aAAa;AACf;;AAkBA;EAfE,iBAAiB;EACjB,eAAe;AACjB;;AAkBA;EAfE,+BAA+B;AACjC;;AAkBA;EAfE,mCAAmC;EACnC,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAkBA;EAfE,eAAe;EACf,gCAAgC;EAChC,2BAA2B;AAC7B","sourcesContent":["/* Fixed, not absolute: a G9 sheet is lynx-ui's `position: fixed` SheetView, which Lynx paints and hit-tests above\n every in-flow node, so an absolute popup over an open sheet was hidden and its buttons unreachable. The popup root\n is created per show, after the sheet, so it lands above it (2026-10-10). */\n.g9-popup {\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n /* an interactive surface in a pass-through layer (a browser inherits `none`; G9Hub, 2.5.8) */\n pointer-events: auto;\n}\n\n.g9-popup--placed {\n display: block;\n}\n\n.g9-popup__scrim {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n /* an interactive surface in a pass-through layer (a browser inherits `none`; G9Hub, 2.5.8) */\n pointer-events: auto;\n}\n\n.g9-popup__card {\n display: flex;\n flex-direction: column;\n border-width: 1px;\n border-style: solid;\n max-height: 90%;\n /* an interactive surface in a pass-through layer (a browser inherits `none`; G9Hub, 2.5.8) */\n pointer-events: auto;\n}\n\n.g9-popup__content {\n display: flex;\n flex-direction: column;\n}\n\n/* MAUI BuildG9PopupHeader: a row (icon tile, title; ColumnSpacing 10, 10 under it), then a 1 dp divider. */\n.g9-popup__header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding-bottom: 10px;\n}\n\n.g9-popup__divider {\n height: 1px;\n background-color: var(--g9-outline-variant);\n opacity: 0.5;\n}\n\n/* MAUI: a 30 dp tile, corner 8, the accent at 18 % behind a 17 dp icon. */\n.g9-popup__badge {\n width: 30px;\n height: 30px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n position: relative;\n}\n\n.g9-dir-rtl .g9-popup__badge {\n margin-right: 0px;\n margin-left: 10px;\n}\n\n.g9-popup__badge-tint {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n border-radius: 8px;\n opacity: 0.18;\n}\n\n.g9-popup__title {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n font-size: 17px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n text-overflow: ellipsis;\n}\n\n.g9-popup__close {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* MAUI BuildG9PopupBody: the message (or a custom body) inside Padding (0, 12, 0, 12). */\n.g9-popup__message {\n font-size: 15px;\n font-family: var(--g9-font-text);\n line-height: 22px;\n padding: 12px 0px;\n}\n\n.g9-popup__body {\n padding: 12px 0px;\n}\n\n/* MAUI BuildG9PopupFooter: Padding (0, 8, 0, 0), ColumnSpacing 8 (stacked: Spacing 8), buttons flush with the card. */\n.g9-popup__footer {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding-top: 8px;\n column-gap: 8px;\n}\n\n.g9-popup__footer--stacked {\n flex-direction: column;\n align-items: stretch;\n column-gap: 0px;\n row-gap: 8px;\n}\n\n/* MAUI CreateFooterButton: MinimumHeightRequest 48, corner 12. */\n.g9-popup__button {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n min-height: 48px;\n border-radius: 12px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n}\n\n.g9-popup__button--stacked {\n flex-grow: 0;\n flex-basis: auto;\n}\n\n.g9-popup__button--outline {\n border-width: 1.5px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n}\n\n.g9-popup__button--busy {\n opacity: 0.7;\n}\n\n.g9-popup__button-text {\n font-size: 15px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n}\n\n.g9-popup-input {\n display: flex;\n flex-direction: column;\n}\n\n.g9-popup-input__group {\n display: flex;\n flex-direction: column;\n margin-bottom: 10px;\n}\n\n.g9-popup-input__label {\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n margin-bottom: 6px;\n}\n\n.g9-popup-input__error {\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-error);\n margin-top: 4px;\n}\n\n.g9-popup-input__radio {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 40px;\n}\n\n.g9-popup-input__radio-ring {\n width: 20px;\n height: 20px;\n border-radius: 10px;\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-outline);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n}\n\n.g9-dir-rtl .g9-popup-input__radio-ring {\n margin-right: 0px;\n margin-left: 10px;\n}\n\n.g9-popup-input__radio--selected .g9-popup-input__radio-ring {\n border-color: var(--g9-primary);\n}\n\n.g9-popup-input__radio-dot {\n width: 10px;\n height: 10px;\n border-radius: 5px;\n background-color: var(--g9-primary);\n}\n\n.g9-popup-input__option-text {\n font-size: 15px;\n font-family: var(--g9-font-text);\n color: var(--g9-on-surface);\n}\n"],"sourceRoot":""}
|
|
@@ -10,4 +10,12 @@ export interface G9DirectionScopeProps {
|
|
|
10
10
|
* app inherits CSS direction. Its own layout is the app's (`className`, `style`).
|
|
11
11
|
*/
|
|
12
12
|
export declare function G9DirectionScope(props: G9DirectionScopeProps): ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* A slot of a G9 row that holds the app's content (internal): the content as it is, or — under
|
|
15
|
+
* `settings.layout.inheritedDirection` — in a `.g9-slot` row view in the culture's direction.
|
|
16
|
+
*/
|
|
17
|
+
export declare function G9Slot(props: {
|
|
18
|
+
readonly children?: ReactNode;
|
|
19
|
+
readonly className?: string;
|
|
20
|
+
}): ReactNode;
|
|
13
21
|
//# sourceMappingURL=direction-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction-scope.d.ts","sourceRoot":"","sources":["../../src/provider/direction-scope.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,yCAAyC;AACzC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAUxE"}
|
|
1
|
+
{"version":3,"file":"direction-scope.d.ts","sourceRoot":"","sources":["../../src/provider/direction-scope.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,yCAAyC;AACzC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAUxE;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAUvG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useG9Direction } from "./hooks.jsx";
|
|
1
|
+
import { useG9Direction, useG9Settings } from "./hooks.jsx";
|
|
2
2
|
function G9DirectionScope(props) {
|
|
3
3
|
var _props_style;
|
|
4
4
|
const dir = useG9Direction();
|
|
@@ -9,4 +9,15 @@ function G9DirectionScope(props) {
|
|
|
9
9
|
{props.children}
|
|
10
10
|
</view>;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
function G9Slot(props) {
|
|
13
|
+
const scoped = useG9Settings().layout.inheritedDirection;
|
|
14
|
+
const dir = useG9Direction();
|
|
15
|
+
if (void 0 === props.children || null === props.children || false === props.children) return null;
|
|
16
|
+
if (!scoped) return props.children;
|
|
17
|
+
return <view className={`g9-slot g9-dir-${dir}${props.className ? ` ${props.className}` : ''}`} style={{
|
|
18
|
+
direction: dir
|
|
19
|
+
}}>
|
|
20
|
+
{props.children}
|
|
21
|
+
</view>;
|
|
22
|
+
}
|
|
23
|
+
export { G9DirectionScope, G9Slot };
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { G9DirectionScope, type G9DirectionScopeProps } from './direction-scope.
|
|
|
4
4
|
export { type G9WindowInfo, useG9ActivityVisible, useG9Capability, useG9Core, useG9Culture, useG9CultureStore, useG9DesignRegistry, useG9Diagnostics, useG9Direction, useG9Executor, useG9Keyboard, useG9Layout, useG9OptionalService, useG9Preferences, useG9SafeInsets, useG9Service, useG9Settings, useG9Shape, useG9Strings, useG9Theme, useG9ThemeStore, useG9Window, } from './hooks.js';
|
|
5
5
|
export { G9KeepAlive, type G9KeepAliveProps } from './keep-alive.js';
|
|
6
6
|
export { type G9PreviewOverrides, G9Provider, type G9ProviderProps } from './provider.js';
|
|
7
|
-
export { type G9ExecutorSettings, type G9FieldSettings, type G9ImageRenderer, type G9PageLoadingSettings, type G9ResolvedSettings, type G9Settings, g9DefaultBackEventName, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings, } from './settings.js';
|
|
7
|
+
export { type G9ExecutorSettings, type G9FieldSettings, type G9ImageRenderer, type G9LayoutSettings, type G9PageLoadingSettings, type G9ResolvedSettings, type G9Settings, g9DefaultBackEventName, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings, } from './settings.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,KAAK,kBAAkB,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,KAAK,kBAAkB,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/provider/provider.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAMA;EAHE,cAAc;AAChB;;AAMA;EAHE,cAAc;AAChB;;AASA;EANE,uBAAuB;AACzB","sourcesContent":["/* G9Provider root: fills the LynxView and carries the theme variables (set inline / with setProperty). */\n.g9-provider {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n}\n\n/* direction does not inherit in Lynx (plan/specs/02 §2): every G9 root sets it; these are the provider's.\n The theme's font per script (LC-07) is `--g9-font-text`, which the provider writes for its root's direction\n (toShapeCssVariables): every G9 text reads it; in the stock theme it is never set and the platform's font stays. */\n.g9-dir-ltr {\n direction: ltr;\n}\n\n.g9-dir-rtl {\n direction: rtl;\n}\n\n/* Reduced motion (setG9MotionScale(0), the provider's `g9-motion-off`): every CSS transition of the kit ends at once, as\n the JS-timed motion does. Listed one by one (no universal selector); a new transition in a component belongs here too\n (provider-motion.test.ts checks); another package lists its own in its own stylesheet (progress-overlay.css). The infinite spinners keep turning: they say «busy», they move nothing a test waits for. */\n.g9-motion-off .g9-deferred__cover,\n.g9-motion-off .g9-progress__fill,\n.g9-motion-off .g9-expander__chevron,\n.g9-motion-off .g9-expander__clip,\n.g9-motion-off .g9-field__label,\n.g9-motion-off .g9-page-loading,\n.g9-motion-off .g9-toast__fill,\n.g9-motion-off .g9-switch__track,\n.g9-motion-off .g9-switch__thumb,\n.g9-motion-off .g9-chip,\n.g9-motion-off .g9-chip__check,\n.g9-motion-off .g9-press-s96,\n.g9-motion-off .g9-press-s96:active,\n.g9-motion-off .g9-press-s92,\n.g9-motion-off .g9-press-s92:active,\n.g9-motion-off .g9-press-s82,\n.g9-motion-off .g9-press-s82:active,\n.g9-motion-off .g9-press-s985,\n.g9-motion-off .g9-press-s985:active,\n.g9-motion-off .g9-press-s99,\n.g9-motion-off .g9-press-s99:active,\n.g9-motion-off .g9-press-o78,\n.g9-motion-off .g9-press-o78:active,\n.g9-motion-off .g9-press-o78b,\n.g9-motion-off .g9-press-o78b:active,\n.g9-motion-off .g9-press-card,\n.g9-motion-off .g9-press-card:active,\n.g9-motion-off .g9-card--down,\n.g9-motion-off .g9-list-row--pressable,\n.g9-motion-off .g9-step-slider__dot,\n.g9-motion-off .g9-shell__tab-bar,\n.g9-motion-off .g9-update-bar,\n.g9-motion-off .g9-scale__step,\n.g9-motion-off .g9-seg__indicator {\n transition-duration: 0ms;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/provider/provider.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAMA;EAHE,cAAc;AAChB;;AAMA;EAHE,cAAc;AAChB;;AASA;EANE,uBAAuB;AACzB;;AA4CA;EAzCE,mBAAmB;EACnB,cAAc;EACd,mBAAmB;EACnB,aAAa;AACf","sourcesContent":["/* G9Provider root: fills the LynxView and carries the theme variables (set inline / with setProperty). */\n.g9-provider {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n}\n\n/* direction does not inherit in Lynx (plan/specs/02 §2): every G9 root sets it; these are the provider's.\n The theme's font per script (LC-07) is `--g9-font-text`, which the provider writes for its root's direction\n (toShapeCssVariables): every G9 text reads it; in the stock theme it is never set and the platform's font stays. */\n.g9-dir-ltr {\n direction: ltr;\n}\n\n.g9-dir-rtl {\n direction: rtl;\n}\n\n/* Reduced motion (setG9MotionScale(0), the provider's `g9-motion-off`): every CSS transition of the kit ends at once, as\n the JS-timed motion does. Listed one by one (no universal selector); a new transition in a component belongs here too\n (provider-motion.test.ts checks); another package lists its own in its own stylesheet (progress-overlay.css). The infinite spinners keep turning: they say «busy», they move nothing a test waits for. */\n.g9-motion-off .g9-deferred__cover,\n.g9-motion-off .g9-progress__fill,\n.g9-motion-off .g9-expander__chevron,\n.g9-motion-off .g9-expander__clip,\n.g9-motion-off .g9-field__label,\n.g9-motion-off .g9-page-loading,\n.g9-motion-off .g9-toast__fill,\n.g9-motion-off .g9-switch__track,\n.g9-motion-off .g9-switch__thumb,\n.g9-motion-off .g9-chip,\n.g9-motion-off .g9-chip__check,\n.g9-motion-off .g9-press-s96,\n.g9-motion-off .g9-press-s96:active,\n.g9-motion-off .g9-press-s92,\n.g9-motion-off .g9-press-s92:active,\n.g9-motion-off .g9-press-s82,\n.g9-motion-off .g9-press-s82:active,\n.g9-motion-off .g9-press-s985,\n.g9-motion-off .g9-press-s985:active,\n.g9-motion-off .g9-press-s99,\n.g9-motion-off .g9-press-s99:active,\n.g9-motion-off .g9-press-o78,\n.g9-motion-off .g9-press-o78:active,\n.g9-motion-off .g9-press-o78b,\n.g9-motion-off .g9-press-o78b:active,\n.g9-motion-off .g9-press-card,\n.g9-motion-off .g9-press-card:active,\n.g9-motion-off .g9-card--down,\n.g9-motion-off .g9-list-row--pressable,\n.g9-motion-off .g9-step-slider__dot,\n.g9-motion-off .g9-shell__tab-bar,\n.g9-motion-off .g9-update-bar,\n.g9-motion-off .g9-scale__step,\n.g9-motion-off .g9-seg__indicator {\n transition-duration: 0ms;\n}\n\n/* A slot of a G9 row holding the app's content under `settings.layout.inheritedDirection` (2.5.7): a row in the\n culture's direction (set inline), sized by its content. */\n.g9-slot {\n display: flex;\n flex-direction: row;\n align-items: center;\n flex-shrink: 0;\n}\n"],"sourceRoot":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type G9Breakpoints, type G9Capabilities, type G9ColorScheme, type G9Culture, type G9CultureStore, type G9Diagnostics, type G9LayoutClass, type G9SafeInsets, type G9ShapeSet, type G9ThemeOptions, type G9ThemeStore, type G9TokenAliasMap } from '@g9tm/lynxcontrols-foundation';
|
|
1
|
+
import { type G9Breakpoints, type G9Capabilities, type G9ColorScheme, type G9Culture, type G9CultureStore, type G9Diagnostics, type G9LayoutClass, type G9ResolvedTheme, type G9SafeInsets, type G9ShapeSet, type G9ThemeOptions, type G9ThemeStore, type G9TokenAliasMap } from '@g9tm/lynxcontrols-foundation';
|
|
2
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
3
3
|
import { type G9Settings } from './settings.js';
|
|
4
4
|
import './provider.css';
|
|
@@ -60,6 +60,11 @@ export interface G9ProviderProps {
|
|
|
60
60
|
readonly map: G9TokenAliasMap;
|
|
61
61
|
readonly prefix?: string;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* More CSS variables computed from each theme the store paints (2.5.8: G9Hub's bubbles, glass, presence colours —
|
|
65
|
+
* `g9AppTokenVariables`), repainted with it the same way (only what changed, no render).
|
|
66
|
+
*/
|
|
67
|
+
readonly themeExtras?: (theme: G9ResolvedTheme) => Readonly<Record<string, string>>;
|
|
63
68
|
/** The diagnostics hub. Default: a hub the provider creates. */
|
|
64
69
|
readonly diagnostics?: G9Diagnostics;
|
|
65
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRo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AClH,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAC/B,kHAAkH;IAClH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9C,wHAAwH;IACxH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpF;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpF,gEAAgE;IAChE,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAyDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,CAiX5D"}
|
|
@@ -250,19 +250,39 @@ function G9Provider(props) {
|
|
|
250
250
|
const aliasVariables = useMemo(()=>props.tokenAliases ? aliasCssVariables(props.tokenAliases.map, props.tokenAliases.prefix) : {}, [
|
|
251
251
|
aliasKey
|
|
252
252
|
]);
|
|
253
|
+
const extras = useRef(props.themeExtras);
|
|
254
|
+
extras.current = props.themeExtras;
|
|
255
|
+
const extraVariables = (theme)=>{
|
|
256
|
+
const make = extras.current;
|
|
257
|
+
if (!make) return {};
|
|
258
|
+
try {
|
|
259
|
+
return make(theme);
|
|
260
|
+
} catch (error) {
|
|
261
|
+
diagnostics.log({
|
|
262
|
+
level: 'warning',
|
|
263
|
+
message: 'themeExtras failed.',
|
|
264
|
+
source: 'G9Provider',
|
|
265
|
+
error
|
|
266
|
+
});
|
|
267
|
+
return {};
|
|
268
|
+
}
|
|
269
|
+
};
|
|
253
270
|
const [initialVariables] = useState(()=>({
|
|
254
271
|
...aliasVariables,
|
|
255
|
-
...toRootCssVariables(themeStore.getSnapshot(), shapeStore.get(), culture.direction)
|
|
272
|
+
...toRootCssVariables(themeStore.getSnapshot(), shapeStore.get(), culture.direction),
|
|
273
|
+
...extraVariables(themeStore.getSnapshot())
|
|
256
274
|
}));
|
|
257
275
|
const [initialScheme] = useState(()=>themeStore.getSnapshot().scheme);
|
|
258
276
|
const applied = useRef({});
|
|
259
277
|
const [fallbackVariables, setFallbackVariables] = useState(null);
|
|
260
278
|
useEffect(()=>{
|
|
261
279
|
const apply = ()=>{
|
|
280
|
+
const snapshot = themeStore.getSnapshot();
|
|
262
281
|
const next = {
|
|
263
282
|
...initialVariables,
|
|
264
283
|
...applied.current,
|
|
265
|
-
...themeVariables(
|
|
284
|
+
...themeVariables(snapshot),
|
|
285
|
+
...extraVariables(snapshot)
|
|
266
286
|
};
|
|
267
287
|
const diff = changedVariables(applied.current, next);
|
|
268
288
|
applied.current = next;
|
|
@@ -71,6 +71,19 @@ export interface G9Settings {
|
|
|
71
71
|
readonly guide?: G9GuideSettings;
|
|
72
72
|
/** Where toasts stand and how they look (SAC: ink toasts, 420 wide and at the bottom on a desk). */
|
|
73
73
|
readonly toasts?: G9ToastSettings;
|
|
74
|
+
/** How the library's rows meet the app's CSS (2.5.7). */
|
|
75
|
+
readonly layout?: G9LayoutSettings;
|
|
76
|
+
}
|
|
77
|
+
/** App-wide layout settings. */
|
|
78
|
+
export interface G9LayoutSettings {
|
|
79
|
+
/**
|
|
80
|
+
* The app inherits CSS `direction` (`enableCSSInheritance` with direction in its list: G9Hub, SAC, Riskara). The
|
|
81
|
+
* library pins its own rows to `direction: ltr` (it orders them itself); with this on, every slot that holds the app's
|
|
82
|
+
* content inside such a row (a top bar's `start` and `actions`, a list row's `leading` and `trailing`, a section's
|
|
83
|
+
* `actions`, a form field's `aside`) gets the culture's direction back, in a row view (`.g9-slot`) — what
|
|
84
|
+
* `G9DirectionScope` does by hand. Default `false` (no extra view).
|
|
85
|
+
*/
|
|
86
|
+
readonly inheritedDirection?: boolean;
|
|
74
87
|
}
|
|
75
88
|
/** App-wide toast settings. */
|
|
76
89
|
export interface G9ToastSettings {
|
|
@@ -125,6 +138,7 @@ export interface G9ResolvedSettings {
|
|
|
125
138
|
readonly toggles: Required<G9ToggleSettings>;
|
|
126
139
|
readonly guide: G9GuideSettings;
|
|
127
140
|
readonly toasts: G9ToastSettings;
|
|
141
|
+
readonly layout: Required<G9LayoutSettings>;
|
|
128
142
|
}
|
|
129
143
|
/** MAUI `G9PageBase.PageLoadingDismissDelayMs` default. */
|
|
130
144
|
export declare const g9PageLoadingDismissDelayMs = 369;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/provider/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAA8B,KAAK,eAAe,EAAsB,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,kBAA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AAQ,CAAC,eAAe,CAAC,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAC7C;AAED,2DAA2D;AAC3D,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,4DAA4D;AAC5D,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAajD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,iBAAiB,CAAC,EAAE,kBAAkB,GACrC,kBAAkB,CAiCpB"}
|
|
@@ -14,7 +14,7 @@ function nonNegative(name, value, fallback) {
|
|
|
14
14
|
}
|
|
15
15
|
function resolveSettings(settings, fallbackIconFonts) {
|
|
16
16
|
var _s_backEventName, _s_pageLoading, _s_strings, _ref, _s_iconFonts, _loading_backgroundColor, _loading_spinnerColor, _s_executor, _ref1, _ref2, _s_guide, _s_toasts;
|
|
17
|
-
var _s_fields, _s_toggles;
|
|
17
|
+
var _s_fields, _s_toggles, _s_layout;
|
|
18
18
|
const s = null != settings ? settings : {};
|
|
19
19
|
const backEventName = null != (_s_backEventName = s.backEventName) ? _s_backEventName : g9DefaultBackEventName;
|
|
20
20
|
if ('string' != typeof backEventName || '' === backEventName.trim()) throw new G9Error('settings-invalid', 'backEventName must be a non-blank string.');
|
|
@@ -44,6 +44,9 @@ function resolveSettings(settings, fallbackIconFonts) {
|
|
|
44
44
|
guide: null != (_s_guide = s.guide) ? _s_guide : {},
|
|
45
45
|
toasts: Object.freeze({
|
|
46
46
|
...null != (_s_toasts = s.toasts) ? _s_toasts : {}
|
|
47
|
+
}),
|
|
48
|
+
layout: Object.freeze({
|
|
49
|
+
inheritedDirection: (null == (_s_layout = s.layout) ? void 0 : _s_layout.inheritedDirection) === true
|
|
47
50
|
})
|
|
48
51
|
});
|
|
49
52
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { coerceSliderRange, formatSliderValue, roundHalfEven, sliderBounds, sliderRatio, sliderValueAt, snapSliderValue, } from './math.js';
|
|
2
|
-
export { G9RangeSlider, type G9RangeSliderProps, type G9SliderBand, g9SliderMetrics, sliderKeyStep, } from './range-slider.js';
|
|
2
|
+
export { G9RangeSlider, type G9RangeSliderProps, type G9SliderBand, type G9SliderMark, g9SliderMetrics, sliderKeyStep, } from './range-slider.js';
|
|
3
3
|
export { G9StepSlider, type G9StepSliderProps } from './step-slider.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/range-slider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/range-slider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -118,6 +118,75 @@
|
|
|
118
118
|
color: var(--g9-text-secondary);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
.g9-slider__tick {
|
|
122
|
+
background-color: var(--g9-on-surface-variant);
|
|
123
|
+
opacity: .6;
|
|
124
|
+
border-radius: 2px;
|
|
125
|
+
width: 4px;
|
|
126
|
+
height: 4px;
|
|
127
|
+
margin-left: -2px;
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 12px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.g9-slider__tick--on {
|
|
133
|
+
background-color: var(--g9-on-primary);
|
|
134
|
+
opacity: .85;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.g9-slider__marks {
|
|
138
|
+
height: 16px;
|
|
139
|
+
margin-top: 18px;
|
|
140
|
+
position: relative;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.g9-slider__mark {
|
|
144
|
+
justify-content: center;
|
|
145
|
+
width: 96px;
|
|
146
|
+
margin-left: -48px;
|
|
147
|
+
display: flex;
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.g9-slider__mark-text {
|
|
153
|
+
text-align: center;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.g9-slider-field {
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
display: flex;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.g9-slider-field__head {
|
|
162
|
+
align-items: center;
|
|
163
|
+
column-gap: 8px;
|
|
164
|
+
padding: 0 16px;
|
|
165
|
+
display: flex;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.g9-slider-field__label {
|
|
169
|
+
min-width: 0;
|
|
170
|
+
font-size: 14px;
|
|
171
|
+
font-family: var(--g9-font-text);
|
|
172
|
+
color: var(--g9-text-primary);
|
|
173
|
+
flex: auto;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.g9-slider-field__value {
|
|
177
|
+
font-size: 14px;
|
|
178
|
+
font-family: var(--g9-font-text);
|
|
179
|
+
color: var(--g9-primary);
|
|
180
|
+
flex-shrink: 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.g9-slider-field__helper {
|
|
184
|
+
font-size: 12px;
|
|
185
|
+
font-family: var(--g9-font-text);
|
|
186
|
+
color: var(--g9-text-secondary);
|
|
187
|
+
padding: 0 16px;
|
|
188
|
+
}
|
|
189
|
+
|
|
121
190
|
.g9-step-slider {
|
|
122
191
|
flex-direction: column;
|
|
123
192
|
align-self: stretch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/range-slider/range-slider.css"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAKA;EAFE,2BAA2B;EAC3B,iBAAiB;AACnB;;AAKA;EAFE,YAAY;AACd;;AAKA;EAFE,uBAAuB;EACvB,YAAY;EACZ,aAAa;AACf;;AAOA;EAJE,2CAA2C;EAC3C,kBAAkB;EAClB,OAAO;EACP,WAAW;EACX,kBAAkB;AACpB;;AAOA;EAJE,mCAAmC;EACnC,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAQA;EALE,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;AACX;;AASA;EANE,WAAW;EACX,YAAY;AACd;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AASA;EANE,iBAAiB;AACnB;;AASA;EANE,2CAA2C;EAC3C,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,kBAAkB;EAClB,iBAAiB;EACjB,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,mCAAmC;AACrC;;AAWA;EARE,uBAAuB;EACvB,qBAAqB;EACrB,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AAWA;EARE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,+BAA+B;AACjC;;AAWA;EARE,mBAAmB;EACnB,8BAA8B;EAC9B,gBAAgB;EAChB,aAAa;AACf;;AAWA;EARE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;AACjC;;AAYA;EATE,sBAAsB;EACtB,mBAAmB;EACnB,WAAW;EACX,aAAa;AACf;;
|
|
1
|
+
{"version":3,"sources":["webpack://./src/range-slider/range-slider.css"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAKA;EAFE,2BAA2B;EAC3B,iBAAiB;AACnB;;AAKA;EAFE,YAAY;AACd;;AAKA;EAFE,uBAAuB;EACvB,YAAY;EACZ,aAAa;AACf;;AAOA;EAJE,2CAA2C;EAC3C,kBAAkB;EAClB,OAAO;EACP,WAAW;EACX,kBAAkB;AACpB;;AAOA;EAJE,mCAAmC;EACnC,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAQA;EALE,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;AACX;;AASA;EANE,WAAW;EACX,YAAY;AACd;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AASA;EANE,iBAAiB;AACnB;;AASA;EANE,2CAA2C;EAC3C,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,e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EAZE,mBAAmB;AACrB;;AAeA;EAZE,2BAA2B;AAC7B;;AAeA;EAZE,kDAAkD;EAClD,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,WAAW;AACb;;AAeA;EAZE,WAAW;EACX,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AAiBA;EAdE,2CAA2C;EAC3C,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,mCAAmC;AACrC;;AAiBA;EAdE,mCAAmC;AACrC;;AAiBA;EAdE,sBAAsB;AACxB;;AAiBA;EAdE,8BAA8B;EAC9B,WAAW;EACX,eAAe;EACf,aAAa;AACf;;AAiBA;EAdE,mBAAmB;AACrB;;AAiBA;EAdE,2BAA2B;AAC7B;;AAiBA;EAdE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;AAChC;;AAiBA;EAdE,+BAA+B;EAC/B,gBAAgB;EAChB,oCAAoC;AACtC","sourcesContent":[".g9-slider {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-left: 16px;\n padding-right: 16px;\n}\n\n/* MAUI G9RangeSliderDrawable with labels: the track's centre at SliderTrackY (52) of the 104 dp canvas — the room above\n is the drag tooltip's — and the end labels SliderLabelGap (18) under the thumb. Centring the column put the track at\n ~34 dp, 18 dp higher than MAUI's. */\n.g9-slider--labels {\n justify-content: flex-start;\n padding-top: 38px;\n}\n\n.g9-slider--disabled {\n opacity: 0.38;\n}\n\n.g9-slider__root {\n height: 28px;\n display: flex;\n justify-content: center;\n}\n\n/* lynx-ui SliderTrack: a 28 px flex row holding this view (the visible track) next to the fill and the thumbs, which\n position against the 28 px row. The track takes the row's width; the fill is the 8 px band at its centre. */\n.g9-slider__track {\n position: relative;\n flex: 1;\n height: 8px;\n border-radius: 4px;\n background-color: var(--g9-surface-variant);\n}\n\n.g9-slider__fill {\n position: absolute;\n top: 10px;\n left: 0px;\n right: 0px;\n height: 8px;\n border-radius: 4px;\n background-color: var(--g9-primary);\n}\n\n/* A `bands` stretch: the fill's band, under it. */\n.g9-slider__band {\n position: absolute;\n top: 10px;\n height: 8px;\n border-radius: 4px;\n}\n\n/* lynx-ui SliderThumb centres this view on the value (top 50 %, translate -50 %). */\n.g9-slider__thumb {\n width: 28px;\n height: 28px;\n}\n\n.g9-slider__thumb-dot {\n width: 28px;\n height: 28px;\n border-radius: 14px;\n border-width: 2.5px;\n border-style: solid;\n border-color: var(--g9-primary);\n background-color: var(--g9-surface);\n}\n\n.g9-slider__thumb-dot--active {\n border-width: 3px;\n}\n\n.g9-slider__tooltip {\n position: absolute;\n top: 4px;\n height: 26px;\n margin-left: -21px;\n min-width: 42px;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 13px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-inverse-surface);\n}\n\n.g9-slider__tooltip-text {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-inverse-on-surface);\n}\n\n/* MAUI 1.4.9 ShowThumbValues: each value above its thumb, always — a 100 px box centred on the thumb, its text at the\n box's bottom 18 px above the thumb (track 52 − radius 14 − gap 18 − 18 = 2 from the top), 12 px TextSecondary. */\n.g9-slider__thumb-value {\n position: absolute;\n top: 2px;\n width: 100px;\n height: 18px;\n margin-left: -50px;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n}\n\n.g9-slider__thumb-value-text {\n font-size: 12px;\n font-family: var(--g9-font-text);\n text-align: center;\n color: var(--g9-text-secondary);\n}\n\n.g9-slider__labels {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-top: 18px;\n}\n\n.g9-slider__label {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n/* `marks` (2.5.7): a 4 dp tick on the track's band at each point, on-primary over the chosen part. */\n.g9-slider__tick {\n position: absolute;\n top: 12px;\n width: 4px;\n height: 4px;\n margin-left: -2px;\n border-radius: 2px;\n background-color: var(--g9-on-surface-variant);\n opacity: 0.6;\n}\n\n.g9-slider__tick--on {\n background-color: var(--g9-on-primary);\n opacity: 0.85;\n}\n\n/* The marks' words, where the edge labels were: each in a 96 dp box centred on its point of the track's width. */\n.g9-slider__marks {\n position: relative;\n height: 16px;\n margin-top: 18px;\n}\n\n.g9-slider__mark {\n position: absolute;\n top: 0px;\n width: 96px;\n margin-left: -48px;\n display: flex;\n justify-content: center;\n}\n\n.g9-slider__mark-text {\n text-align: center;\n}\n\n/* `label` / `helperText` (2.5.7): the title row and the line under it, level with the track's ends. */\n.g9-slider-field {\n display: flex;\n flex-direction: column;\n}\n\n.g9-slider-field__head {\n display: flex;\n align-items: center;\n column-gap: 8px;\n padding: 0px 16px;\n}\n\n.g9-slider-field__label {\n flex: 1 1 auto;\n min-width: 0px;\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n}\n\n.g9-slider-field__value {\n flex-shrink: 0;\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-primary);\n}\n\n.g9-slider-field__helper {\n padding: 0px 16px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n/* G9StepSlider: dots on a rail, the chosen one larger */\n.g9-step-slider {\n display: flex;\n flex-direction: column;\n align-self: stretch;\n width: 100%;\n}\n\n.g9-step-slider__row {\n position: relative;\n display: flex;\n width: 100%;\n height: 28px;\n align-items: center;\n}\n\n.g9-step-slider__row--ltr {\n flex-direction: row;\n}\n\n.g9-step-slider__row--rtl {\n flex-direction: row-reverse;\n}\n\n.g9-step-slider__rail {\n position: absolute;\n left: 11px;\n right: 11px;\n top: 11px;\n height: 6px;\n border-radius: 3px;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-step-slider__seg {\n display: flex;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n height: 28px;\n align-items: center;\n justify-content: center;\n}\n\n.g9-step-slider__dot {\n width: 14px;\n height: 14px;\n border-radius: 7px;\n background-color: var(--g9-outline-variant);\n transition: transform 140ms ease-out;\n}\n\n.g9-step-slider__dot--on {\n background-color: var(--g9-primary);\n}\n\n.g9-step-slider__dot--current {\n transform: scale(1.85);\n}\n\n.g9-step-slider__labels {\n display: flex;\n width: 100%;\n justify-content: space-between;\n margin-top: 2px;\n}\n\n.g9-step-slider__labels--ltr {\n flex-direction: row;\n}\n\n.g9-step-slider__labels--rtl {\n flex-direction: row-reverse;\n}\n\n.g9-step-slider__label {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-step-slider__label--current {\n font-weight: 700;\n color: var(--g9-text-secondary);\n font-family: var(--g9-font-text-700);\n}\n"],"sourceRoot":""}
|