@multiplatform.one/components 7.81.2 → 7.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/appShell/AppShell.cjs +1 -9
- package/dist/cjs/appShell/AppShell.native.js +1 -9
- package/dist/cjs/appShell/AppShell.native.js.map +1 -1
- package/dist/cjs/appShell/BottomChromeClearance.cjs +41 -0
- package/dist/cjs/appShell/BottomChromeClearance.native.js +45 -0
- package/dist/cjs/appShell/BottomChromeClearance.native.js.map +1 -0
- package/dist/cjs/appShell/bottomChrome.cjs +1 -12
- package/dist/cjs/appShell/bottomChrome.native.js +1 -13
- package/dist/cjs/appShell/bottomChrome.native.js.map +1 -1
- package/dist/cjs/appShell/index.cjs +3 -1
- package/dist/cjs/appShell/index.native.js +2 -0
- package/dist/cjs/appShell/index.native.js.map +1 -1
- package/dist/cjs/code/CodeBlock/index.cjs +38 -31
- package/dist/cjs/code/CodeBlock/index.native.js +38 -31
- package/dist/cjs/code/CodeBlock/index.native.js.map +1 -1
- package/dist/cjs/layouts/EmptyState.cjs +9 -43
- package/dist/cjs/layouts/EmptyState.native.js +9 -45
- package/dist/cjs/layouts/EmptyState.native.js.map +1 -1
- package/dist/cjs/layouts/barTitleSpan.cjs +54 -0
- package/dist/cjs/layouts/barTitleSpan.native.js +78 -0
- package/dist/cjs/layouts/barTitleSpan.native.js.map +1 -0
- package/dist/cjs/layouts/page.cjs +134 -49
- package/dist/cjs/layouts/page.native.js +147 -53
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/esm/Accordion/index.native.js.map +1 -1
- package/dist/esm/AnimateHeight/index.native.js.map +1 -1
- package/dist/esm/Avatar/getInitials.native.js.map +1 -1
- package/dist/esm/Avatar/index.native.js.map +1 -1
- package/dist/esm/Badge/index.native.js.map +1 -1
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/Carousel/index.native.js.map +1 -1
- package/dist/esm/CheckGlyph/MenuCheckColumn.native.js.map +1 -1
- package/dist/esm/CheckGlyph/index.native.js.map +1 -1
- package/dist/esm/Chip/index.native.js.map +1 -1
- package/dist/esm/Collapsible.native.js.map +1 -1
- package/dist/esm/ContextMenu/index.native.js.map +1 -1
- package/dist/esm/CopyField/CopyMenuButton.native.js.map +1 -1
- package/dist/esm/CopyField/index.native.js.map +1 -1
- package/dist/esm/Dialog.native.js.map +1 -1
- package/dist/esm/Diff/diff.native.js.map +1 -1
- package/dist/esm/Diff/index.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/menuSettle.native.js.map +1 -1
- package/dist/esm/ElapsedProgress/index.native.js.map +1 -1
- package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
- package/dist/esm/Heading.native.js.map +1 -1
- package/dist/esm/Kbd/index.native.js.map +1 -1
- package/dist/esm/Kbd/keys.native.js.map +1 -1
- package/dist/esm/Lightbox/MediaControl.native.js.map +1 -1
- package/dist/esm/Lightbox/index.gnome.native.js.map +1 -1
- package/dist/esm/Lightbox/shared.native.js.map +1 -1
- package/dist/esm/Lightbox/useLightbox.native.js.map +1 -1
- package/dist/esm/MachineLiteral/index.native.js.map +1 -1
- package/dist/esm/Material/index.native.js.map +1 -1
- package/dist/esm/Meter/index.native.js.map +1 -1
- package/dist/esm/Meter/meter.native.js.map +1 -1
- package/dist/esm/OverflowRow/index.native.js.map +1 -1
- package/dist/esm/Pagination.native.js.map +1 -1
- package/dist/esm/Popover.native.js.map +1 -1
- package/dist/esm/ProgressSteps/index.native.js.map +1 -1
- package/dist/esm/Quote/index.native.js.map +1 -1
- package/dist/esm/SchemeToggle/index.native.js.map +1 -1
- package/dist/esm/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/esm/Separator/index.native.js.map +1 -1
- package/dist/esm/Sheet.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
- package/dist/esm/SheetModal/SheetNavigation.native.js.map +1 -1
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/esm/Skeleton/index.native.js.map +1 -1
- package/dist/esm/SkipLink/index.native.js.map +1 -1
- package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/esm/SortableList/index.native.js.map +1 -1
- package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/esm/SortableList/useUserOrder.native.js.map +1 -1
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Text.native.js.map +1 -1
- package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/esm/Toast/index.native.js.map +1 -1
- package/dist/esm/Toast/store.native.js.map +1 -1
- package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
- package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/esm/TreeSelect/index.native.js.map +1 -1
- package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
- package/dist/esm/Video/VideoFrame.native.js.map +1 -1
- package/dist/esm/Video/types.native.js.map +1 -1
- package/dist/esm/Wheel/index.native.js.map +1 -1
- package/dist/esm/Wizard/index.native.js.map +1 -1
- package/dist/esm/actions/ActionBar.native.js.map +1 -1
- package/dist/esm/actions/DangerSection.native.js.map +1 -1
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/actions/HeaderActions.native.js.map +1 -1
- package/dist/esm/actions/StandardAction.native.js.map +1 -1
- package/dist/esm/actions/devWarn.native.js.map +1 -1
- package/dist/esm/actions/index.native.js.map +1 -1
- package/dist/esm/actions/severity.native.js.map +1 -1
- package/dist/esm/appShell/AppShell.mjs +2 -10
- package/dist/esm/appShell/AppShell.mjs.map +1 -1
- package/dist/esm/appShell/AppShell.native.js +2 -10
- package/dist/esm/appShell/AppShell.native.js.map +1 -1
- package/dist/esm/appShell/BottomChromeClearance.mjs +16 -0
- package/dist/esm/appShell/BottomChromeClearance.mjs.map +1 -0
- package/dist/esm/appShell/BottomChromeClearance.native.js +17 -0
- package/dist/esm/appShell/BottomChromeClearance.native.js.map +1 -0
- package/dist/esm/appShell/Dock.native.js.map +1 -1
- package/dist/esm/appShell/MpoTabHost.native.js.map +1 -1
- package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/esm/appShell/Springboard.native.js.map +1 -1
- package/dist/esm/appShell/SystemBar.native.js.map +1 -1
- package/dist/esm/appShell/TabBar.native.js.map +1 -1
- package/dist/esm/appShell/appTile.native.js.map +1 -1
- package/dist/esm/appShell/bottomChrome.mjs +3 -13
- package/dist/esm/appShell/bottomChrome.mjs.map +1 -1
- package/dist/esm/appShell/bottomChrome.native.js +3 -14
- package/dist/esm/appShell/bottomChrome.native.js.map +1 -1
- package/dist/esm/appShell/index.mjs +2 -1
- package/dist/esm/appShell/index.mjs.map +1 -1
- package/dist/esm/appShell/index.native.js +2 -1
- package/dist/esm/appShell/index.native.js.map +1 -1
- package/dist/esm/charts/Axis.native.js.map +1 -1
- package/dist/esm/charts/BarChart.native.js.map +1 -1
- package/dist/esm/charts/ChartDataView.native.js.map +1 -1
- package/dist/esm/charts/ChartSurface.native.js.map +1 -1
- package/dist/esm/charts/LineChart.native.js.map +1 -1
- package/dist/esm/charts/PieChart.native.js.map +1 -1
- package/dist/esm/charts/Sparkline.native.js.map +1 -1
- package/dist/esm/charts/accessibility.native.js.map +1 -1
- package/dist/esm/charts/chartHeight.native.js.map +1 -1
- package/dist/esm/charts/composeChart.native.js.map +1 -1
- package/dist/esm/charts/index.native.js.map +1 -1
- package/dist/esm/charts/math.native.js.map +1 -1
- package/dist/esm/charts/series.native.js.map +1 -1
- package/dist/esm/charts/svg.native.js.map +1 -1
- package/dist/esm/charts/types.native.js.map +1 -1
- package/dist/esm/charts/useChartTheme.native.js.map +1 -1
- package/dist/esm/code/Code/index.native.js.map +1 -1
- package/dist/esm/code/CodeBlock/index.mjs +39 -32
- package/dist/esm/code/CodeBlock/index.mjs.map +1 -1
- package/dist/esm/code/CodeBlock/index.native.js +39 -32
- package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
- package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/esm/code/Highlighter/index.native.js.map +1 -1
- package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/esm/code/LogView.native.js.map +1 -1
- package/dist/esm/code/Pre/index.native.js.map +1 -1
- package/dist/esm/code/index.native.js.map +1 -1
- package/dist/esm/componentColors.native.js.map +1 -1
- package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
- package/dist/esm/feedback/copy.native.js.map +1 -1
- package/dist/esm/feedback/index.native.js.map +1 -1
- package/dist/esm/feedback/notify.native.js.map +1 -1
- package/dist/esm/feedback/route.native.js.map +1 -1
- package/dist/esm/feedback/store.native.js.map +1 -1
- package/dist/esm/formLayouts/FormLayouts.native.js.map +1 -1
- package/dist/esm/formLayouts/PreferencePanel.native.js.map +1 -1
- package/dist/esm/formLayouts/index.native.js.map +1 -1
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useClipboard.native.js.map +1 -1
- package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/esm/hooks/useHoldCue.native.js.map +1 -1
- package/dist/esm/icons/CheckRegular.native.js.map +1 -1
- package/dist/esm/icons/MinusRegular.native.js.map +1 -1
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/icons/lucide.native.js.map +1 -1
- package/dist/esm/icons/themed.native.js.map +1 -1
- package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/esm/images/Image/framing.native.js.map +1 -1
- package/dist/esm/images/Image/mediaRadius.native.js.map +1 -1
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/images/Image/types.native.js.map +1 -1
- package/dist/esm/images/index.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/knobImmuneExports.native.js.map +1 -1
- package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/esm/layouts/Debug/index.native.js.map +1 -1
- package/dist/esm/layouts/EmptyState.mjs +9 -43
- package/dist/esm/layouts/EmptyState.mjs.map +1 -1
- package/dist/esm/layouts/EmptyState.native.js +9 -45
- package/dist/esm/layouts/EmptyState.native.js.map +1 -1
- package/dist/esm/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
- package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/esm/layouts/StatusDot.native.js.map +1 -1
- package/dist/esm/layouts/StatusGlyphStrip.native.js.map +1 -1
- package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.native.js.map +1 -1
- package/dist/esm/layouts/barTitleSpan.mjs +27 -0
- package/dist/esm/layouts/barTitleSpan.mjs.map +1 -0
- package/dist/esm/layouts/barTitleSpan.native.js +48 -0
- package/dist/esm/layouts/barTitleSpan.native.js.map +1 -0
- package/dist/esm/layouts/bottomAccessory.native.js.map +1 -1
- package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/esm/layouts/index.native.js.map +1 -1
- package/dist/esm/layouts/page.mjs +136 -51
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +149 -55
- package/dist/esm/layouts/page.native.js.map +1 -1
- package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/esm/layouts/screenScroll.native.js.map +1 -1
- package/dist/esm/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/esm/layouts/sidebar.native.js.map +1 -1
- package/dist/esm/layouts/tags.native.js.map +1 -1
- package/dist/esm/layouts/timeline.native.js.map +1 -1
- package/dist/esm/layouts/toolbar.native.js.map +1 -1
- package/dist/esm/shared/actionScan.native.js.map +1 -1
- package/dist/esm/shared/i18n.native.js.map +1 -1
- package/dist/esm/shared/restoreRetries.native.js.map +1 -1
- package/dist/esm/shared/t.native.js.map +1 -1
- package/dist/esm/shared/textRidesText.native.js.map +1 -1
- package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/esm/surfaces.native.js.map +1 -1
- package/dist/esm/tamagui.native.js.map +1 -1
- package/dist/esm/testSetup.native.js.map +1 -1
- package/dist/esm/utils/setTinted.native.js.map +1 -1
- package/dist/esm/utils/unwrapText.native.js.map +1 -1
- package/dist/esm/views/Calendar.native.js.map +1 -1
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/ImageGrid.native.js.map +1 -1
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ListGroup.native.js.map +1 -1
- package/dist/esm/views/ListRow.native.js.map +1 -1
- package/dist/esm/views/Matrix.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.native.js.map +1 -1
- package/dist/esm/views/ShortcutCard.native.js.map +1 -1
- package/dist/esm/views/TreeView.native.js.map +1 -1
- package/dist/esm/views/calendarMath.native.js.map +1 -1
- package/dist/esm/views/ganttIntervals.native.js.map +1 -1
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/kanbanDnd.native.js.map +1 -1
- package/dist/esm/views/matrixMath.native.js.map +1 -1
- package/dist/esm/views/sameNameScope.native.js.map +1 -1
- package/dist/esm/views/treeViewDnd.native.js.map +1 -1
- package/dist/esm/views/treeViewLayout.native.js.map +1 -1
- package/dist/esm/views/treeViewMotion.native.js.map +1 -1
- package/dist/esm/views/treeViewReveal.native.js.map +1 -1
- package/dist/esm/views/usePageFlowLoadMore.native.js.map +1 -1
- package/dist/esm/views/widgetChrome.native.js.map +1 -1
- package/dist/jsx/appShell/AppShell.mjs +2 -10
- package/dist/jsx/appShell/AppShell.mjs.map +1 -1
- package/dist/jsx/appShell/AppShell.native.js +1 -9
- package/dist/jsx/appShell/AppShell.native.js.map +1 -1
- package/dist/jsx/appShell/BottomChromeClearance.mjs +16 -0
- package/dist/jsx/appShell/BottomChromeClearance.mjs.map +1 -0
- package/dist/jsx/appShell/BottomChromeClearance.native.js +45 -0
- package/dist/jsx/appShell/BottomChromeClearance.native.js.map +1 -0
- package/dist/jsx/appShell/bottomChrome.mjs +3 -13
- package/dist/jsx/appShell/bottomChrome.mjs.map +1 -1
- package/dist/jsx/appShell/bottomChrome.native.js +1 -13
- package/dist/jsx/appShell/bottomChrome.native.js.map +1 -1
- package/dist/jsx/appShell/index.mjs +2 -1
- package/dist/jsx/appShell/index.mjs.map +1 -1
- package/dist/jsx/appShell/index.native.js +2 -0
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.mjs +39 -32
- package/dist/jsx/code/CodeBlock/index.mjs.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +38 -31
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.mjs +9 -43
- package/dist/jsx/layouts/EmptyState.mjs.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js +9 -45
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/barTitleSpan.mjs +27 -0
- package/dist/jsx/layouts/barTitleSpan.mjs.map +1 -0
- package/dist/jsx/layouts/barTitleSpan.native.js +78 -0
- package/dist/jsx/layouts/barTitleSpan.native.js.map +1 -0
- package/dist/jsx/layouts/page.mjs +136 -51
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +147 -53
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/package.json +9 -9
- package/src/appShell/AppShell.spec.tsx +11 -7
- package/src/appShell/AppShell.tsx +2 -9
- package/src/appShell/BottomChromeClearance.spec.tsx +42 -0
- package/src/appShell/BottomChromeClearance.tsx +15 -0
- package/src/appShell/bottomChrome.ts +3 -24
- package/src/appShell/index.ts +1 -0
- package/src/code/CodeBlock/CodeBlock.copy.spec.tsx +13 -0
- package/src/code/CodeBlock/index.tsx +46 -30
- package/src/layouts/EmptyState.spec.tsx +2 -0
- package/src/layouts/EmptyState.tsx +6 -39
- package/src/layouts/PageHeader.stories.tsx +238 -38
- package/src/layouts/barTitleSpan.spec.ts +35 -0
- package/src/layouts/barTitleSpan.ts +44 -0
- package/src/layouts/glyphCentre.spec.tsx +218 -0
- package/src/layouts/navBar.spec.tsx +58 -2
- package/src/layouts/page.tsx +128 -45
- package/types/appShell/AppShell.d.ts.map +1 -1
- package/types/appShell/BottomChromeClearance.d.ts +10 -0
- package/types/appShell/BottomChromeClearance.d.ts.map +1 -0
- package/types/appShell/bottomChrome.d.ts +1 -11
- package/types/appShell/bottomChrome.d.ts.map +1 -1
- package/types/appShell/index.d.ts +1 -0
- package/types/appShell/index.d.ts.map +1 -1
- package/types/code/CodeBlock/index.d.ts.map +1 -1
- package/types/layouts/EmptyState.d.ts.map +1 -1
- package/types/layouts/barTitleSpan.d.ts +29 -0
- package/types/layouts/barTitleSpan.d.ts.map +1 -0
- package/types/layouts/page.d.ts +6 -1
- package/types/layouts/page.d.ts.map +1 -1
|
@@ -40,8 +40,9 @@ var import_theme = require("@multiplatform.one/theme");
|
|
|
40
40
|
var import_forms = require("@multiplatform.one/forms");
|
|
41
41
|
var import_react = require("@phosphor-icons/react");
|
|
42
42
|
var import_react2 = require("react");
|
|
43
|
+
var import_barTitleSpan = require("./barTitleSpan.cjs");
|
|
43
44
|
var import_tamagui = require("tamagui");
|
|
44
|
-
var
|
|
45
|
+
var import_BottomChromeClearance = require("../appShell/BottomChromeClearance.cjs");
|
|
45
46
|
var import_componentColors = require("../componentColors.cjs");
|
|
46
47
|
var import_useDirection = require("../hooks/useDirection.cjs");
|
|
47
48
|
var import_i18n = require("../shared/i18n.cjs");
|
|
@@ -194,7 +195,6 @@ function PageShell({
|
|
|
194
195
|
const scrollState = (0, import_screenScroll.useScreenScrollController)();
|
|
195
196
|
(0, import_screenScroll.useReportScreenScroll)(scrollState.state, Boolean(topBar));
|
|
196
197
|
const [accessories] = (0, import_react2.useState)(import_bottomAccessory.createBottomAccessoryStore);
|
|
197
|
-
const chromeInset = (0, import_bottomChrome.useBottomChromeInset)();
|
|
198
198
|
const inset = noPadding ? null : knobProps.panelPadding.padding;
|
|
199
199
|
const cap = maxWidth && !bleed ? maxWidth : null;
|
|
200
200
|
const inner = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
@@ -244,12 +244,9 @@ function PageShell({
|
|
|
244
244
|
children: scoped
|
|
245
245
|
});
|
|
246
246
|
};
|
|
247
|
-
const chromeClearance =
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
"aria-hidden": true,
|
|
251
|
-
"data-testid": "screen-chrome-clearance"
|
|
252
|
-
}) : null;
|
|
247
|
+
const chromeClearance = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_BottomChromeClearance.BottomChromeClearance, {
|
|
248
|
+
testID: "screen-chrome-clearance"
|
|
249
|
+
});
|
|
253
250
|
if (!scroll) {
|
|
254
251
|
return shell(/* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
255
252
|
flex: 1,
|
|
@@ -455,6 +452,94 @@ function PageSection({
|
|
|
455
452
|
}) : children]
|
|
456
453
|
});
|
|
457
454
|
}
|
|
455
|
+
function useBarTitleSpan() {
|
|
456
|
+
const none = {
|
|
457
|
+
x: 0,
|
|
458
|
+
width: 0
|
|
459
|
+
};
|
|
460
|
+
const [box, setBox] = (0, import_react2.useState)({
|
|
461
|
+
row: 0,
|
|
462
|
+
leading: none,
|
|
463
|
+
trailing: none,
|
|
464
|
+
title: 0
|
|
465
|
+
});
|
|
466
|
+
const set = (key, value) => setBox(prev => JSON.stringify(prev[key]) === JSON.stringify(value) ? prev : {
|
|
467
|
+
...prev,
|
|
468
|
+
[key]: value
|
|
469
|
+
});
|
|
470
|
+
const extent = event => {
|
|
471
|
+
const {
|
|
472
|
+
x,
|
|
473
|
+
width
|
|
474
|
+
} = event.nativeEvent.layout;
|
|
475
|
+
return {
|
|
476
|
+
x,
|
|
477
|
+
width
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
return {
|
|
481
|
+
span: (0, import_barTitleSpan.barTitleSpan)({
|
|
482
|
+
row: box.row,
|
|
483
|
+
title: box.title,
|
|
484
|
+
...(0, import_barTitleSpan.sideExtents)(box.row, box.leading, box.trailing)
|
|
485
|
+
}),
|
|
486
|
+
measureRow: event => set("row", Math.floor(extent(event).width)),
|
|
487
|
+
measureLeading: event => set("leading", extent(event)),
|
|
488
|
+
measureTrailing: event => set("trailing", extent(event)),
|
|
489
|
+
measureTitle: event => set("title", Math.ceil(extent(event).width))
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
function BarTitle({
|
|
493
|
+
title,
|
|
494
|
+
span,
|
|
495
|
+
onTitleWidth,
|
|
496
|
+
shown = true,
|
|
497
|
+
...rest
|
|
498
|
+
}) {
|
|
499
|
+
const {
|
|
500
|
+
knobProps
|
|
501
|
+
} = (0, import_theme.useResolvedKnobs)({
|
|
502
|
+
component: "ScreenToolbar"
|
|
503
|
+
});
|
|
504
|
+
const text = {
|
|
505
|
+
...knobProps.body,
|
|
506
|
+
fontWeight: "600",
|
|
507
|
+
color: "$color12",
|
|
508
|
+
numberOfLines: 1
|
|
509
|
+
};
|
|
510
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
511
|
+
children: [shown ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
512
|
+
position: "absolute",
|
|
513
|
+
top: 0,
|
|
514
|
+
left: 0,
|
|
515
|
+
opacity: 0,
|
|
516
|
+
pointerEvents: "none",
|
|
517
|
+
"aria-hidden": true,
|
|
518
|
+
onLayout: onTitleWidth,
|
|
519
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
520
|
+
...text,
|
|
521
|
+
children: title
|
|
522
|
+
})
|
|
523
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
524
|
+
position: "absolute",
|
|
525
|
+
top: 0,
|
|
526
|
+
bottom: 0,
|
|
527
|
+
left: span.left,
|
|
528
|
+
right: span.right,
|
|
529
|
+
alignItems: "center",
|
|
530
|
+
justifyContent: "center",
|
|
531
|
+
pointerEvents: "none",
|
|
532
|
+
"aria-hidden": !shown,
|
|
533
|
+
"data-bar-title": "",
|
|
534
|
+
opacity: shown ? 1 : 0,
|
|
535
|
+
...rest,
|
|
536
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
537
|
+
...text,
|
|
538
|
+
children: title
|
|
539
|
+
})
|
|
540
|
+
})]
|
|
541
|
+
});
|
|
542
|
+
}
|
|
458
543
|
function ScreenToolbar(props) {
|
|
459
544
|
const slot = (0, import_screenScroll.useTopBarSlot)();
|
|
460
545
|
return slot ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(PinnedTopBar, {
|
|
@@ -467,6 +552,7 @@ function ScreenToolbar(props) {
|
|
|
467
552
|
function InlineToolbar({
|
|
468
553
|
leading,
|
|
469
554
|
trailing,
|
|
555
|
+
title,
|
|
470
556
|
children,
|
|
471
557
|
...rest
|
|
472
558
|
}) {
|
|
@@ -475,6 +561,7 @@ function InlineToolbar({
|
|
|
475
561
|
} = (0, import_theme.useResolvedKnobs)({
|
|
476
562
|
component: "ScreenToolbar"
|
|
477
563
|
});
|
|
564
|
+
const titleSpan = useBarTitleSpan();
|
|
478
565
|
const insetToken = (0, import_pageHeadingScope.usePageChromeInset)();
|
|
479
566
|
const bleed = insetToken ? {
|
|
480
567
|
marginHorizontal: negateSpaceToken(insetToken)
|
|
@@ -486,8 +573,12 @@ function InlineToolbar({
|
|
|
486
573
|
"data-testid": "screen-toolbar",
|
|
487
574
|
justifyContent: "space-between",
|
|
488
575
|
alignItems: "center",
|
|
489
|
-
flexWrap: oneRow ? "nowrap" : "wrap",
|
|
576
|
+
flexWrap: oneRow || title ? "nowrap" : "wrap",
|
|
490
577
|
minHeight: import_theme.MIN_PRESS_TARGET,
|
|
578
|
+
...(title ? {
|
|
579
|
+
position: "relative",
|
|
580
|
+
onLayout: titleSpan.measureRow
|
|
581
|
+
} : null),
|
|
491
582
|
...bleed,
|
|
492
583
|
...(insetToken ? {
|
|
493
584
|
paddingHorizontal: insetToken
|
|
@@ -500,6 +591,9 @@ function InlineToolbar({
|
|
|
500
591
|
flexWrap: "wrap",
|
|
501
592
|
flexShrink: oneRow ? 1e3 : 1,
|
|
502
593
|
minWidth: 0,
|
|
594
|
+
...(title ? {
|
|
595
|
+
onLayout: titleSpan.measureLeading
|
|
596
|
+
} : null),
|
|
503
597
|
children: leading
|
|
504
598
|
}), children, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.IconButtonGroup, {
|
|
505
599
|
...knobProps.gap,
|
|
@@ -507,14 +601,22 @@ function InlineToolbar({
|
|
|
507
601
|
flexShrink: 1,
|
|
508
602
|
minWidth: 0,
|
|
509
603
|
justifyContent: "flex-end",
|
|
604
|
+
...(title ? {
|
|
605
|
+
onLayout: titleSpan.measureTrailing
|
|
606
|
+
} : null),
|
|
510
607
|
children: trailing
|
|
511
|
-
})
|
|
608
|
+
}), title ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(BarTitle, {
|
|
609
|
+
title,
|
|
610
|
+
span: titleSpan.span,
|
|
611
|
+
onTitleWidth: titleSpan.measureTitle
|
|
612
|
+
}) : null]
|
|
512
613
|
})
|
|
513
614
|
});
|
|
514
615
|
}
|
|
515
616
|
function PinnedTopBar({
|
|
516
617
|
leading,
|
|
517
618
|
trailing,
|
|
619
|
+
title: inlineTitle,
|
|
518
620
|
children,
|
|
519
621
|
slot,
|
|
520
622
|
...rest
|
|
@@ -527,21 +629,11 @@ function PinnedTopBar({
|
|
|
527
629
|
const {
|
|
528
630
|
scrolled,
|
|
529
631
|
collapsed,
|
|
530
|
-
title
|
|
632
|
+
title: largeTitle
|
|
531
633
|
} = (0, import_screenScroll.useScreenScroll)();
|
|
532
|
-
const
|
|
533
|
-
leading: 0,
|
|
534
|
-
trailing: 0
|
|
535
|
-
});
|
|
536
|
-
const measureSide = side => event => {
|
|
537
|
-
const width = Math.ceil(event.nativeEvent.layout.width);
|
|
538
|
-
setSides(prev => prev[side] === width ? prev : {
|
|
539
|
-
...prev,
|
|
540
|
-
[side]: width
|
|
541
|
-
});
|
|
542
|
-
};
|
|
634
|
+
const titleSpan = useBarTitleSpan();
|
|
543
635
|
const motion = (0, import_theme.transitionProps)(knobProps.motion.control);
|
|
544
|
-
const
|
|
636
|
+
const title = inlineTitle ?? largeTitle;
|
|
545
637
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme.Surface, {
|
|
546
638
|
bar: true,
|
|
547
639
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
@@ -564,6 +656,7 @@ function PinnedTopBar({
|
|
|
564
656
|
alignItems: "center",
|
|
565
657
|
flexWrap: "nowrap",
|
|
566
658
|
position: "relative",
|
|
659
|
+
onLayout: titleSpan.measureRow,
|
|
567
660
|
paddingHorizontal: slot.inset ?? knobProps.panelPadding.padding,
|
|
568
661
|
...knobProps.gap,
|
|
569
662
|
...rest,
|
|
@@ -572,7 +665,7 @@ function PinnedTopBar({
|
|
|
572
665
|
alignItems: "center",
|
|
573
666
|
flexShrink: 1e3,
|
|
574
667
|
minWidth: 0,
|
|
575
|
-
onLayout:
|
|
668
|
+
onLayout: titleSpan.measureLeading,
|
|
576
669
|
children: leading
|
|
577
670
|
}), children, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
578
671
|
flexGrow: 1
|
|
@@ -581,28 +674,14 @@ function PinnedTopBar({
|
|
|
581
674
|
flexShrink: 1,
|
|
582
675
|
minWidth: 0,
|
|
583
676
|
justifyContent: "flex-end",
|
|
584
|
-
onLayout:
|
|
677
|
+
onLayout: titleSpan.measureTrailing,
|
|
585
678
|
children: trailing
|
|
586
|
-
}), title ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
alignItems: "center",
|
|
593
|
-
justifyContent: "center",
|
|
594
|
-
pointerEvents: "none",
|
|
595
|
-
"aria-hidden": !collapsed,
|
|
596
|
-
"data-bar-title": "",
|
|
597
|
-
opacity: collapsed ? 1 : 0,
|
|
598
|
-
...motion,
|
|
599
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
600
|
-
...knobProps.body,
|
|
601
|
-
fontWeight: "600",
|
|
602
|
-
color: "$color12",
|
|
603
|
-
numberOfLines: 1,
|
|
604
|
-
children: title
|
|
605
|
-
})
|
|
679
|
+
}), title ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(BarTitle, {
|
|
680
|
+
title,
|
|
681
|
+
span: titleSpan.span,
|
|
682
|
+
onTitleWidth: titleSpan.measureTitle,
|
|
683
|
+
shown: Boolean(inlineTitle) || collapsed,
|
|
684
|
+
...motion
|
|
606
685
|
}) : null]
|
|
607
686
|
})
|
|
608
687
|
})
|
|
@@ -621,16 +700,22 @@ function useTopBarControl() {
|
|
|
621
700
|
};
|
|
622
701
|
}
|
|
623
702
|
const CARET_OPTICAL_INSET = 72 / 256;
|
|
624
|
-
|
|
703
|
+
const CARET_INK_OFFSET = 8 / 256;
|
|
704
|
+
function backCaret(Caret, inkSign) {
|
|
625
705
|
return function BackCaret({
|
|
626
706
|
size = 22,
|
|
627
707
|
color,
|
|
628
708
|
weight,
|
|
629
709
|
...stroke
|
|
630
710
|
}) {
|
|
711
|
+
const plated = (0, import_forms.useGlyphOnPlate)();
|
|
631
712
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
632
713
|
"data-back-caret": "",
|
|
633
|
-
|
|
714
|
+
...(plated ? {
|
|
715
|
+
x: inkSign * size * CARET_INK_OFFSET
|
|
716
|
+
} : {
|
|
717
|
+
marginInlineStart: -Math.round(size * CARET_OPTICAL_INSET)
|
|
718
|
+
}),
|
|
634
719
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Caret, {
|
|
635
720
|
size,
|
|
636
721
|
color,
|
|
@@ -640,8 +725,8 @@ function backCaret(Caret) {
|
|
|
640
725
|
});
|
|
641
726
|
};
|
|
642
727
|
}
|
|
643
|
-
const BackCaretLeft = backCaret(import_react.CaretLeftIcon);
|
|
644
|
-
const BackCaretRight = backCaret(import_react.CaretRightIcon);
|
|
728
|
+
const BackCaretLeft = backCaret(import_react.CaretLeftIcon, 1);
|
|
729
|
+
const BackCaretRight = backCaret(import_react.CaretRightIcon, -1);
|
|
645
730
|
function PageBackButton({
|
|
646
731
|
label,
|
|
647
732
|
...props
|
|
@@ -43,8 +43,9 @@ var import_theme = require("@multiplatform.one/theme");
|
|
|
43
43
|
var import_forms = require("@multiplatform.one/forms");
|
|
44
44
|
var import_react = require("@phosphor-icons/react");
|
|
45
45
|
var import_react2 = require("react");
|
|
46
|
+
var import_barTitleSpan = require("./barTitleSpan.native.js");
|
|
46
47
|
var import_tamagui = require("tamagui");
|
|
47
|
-
var
|
|
48
|
+
var import_BottomChromeClearance = require("../appShell/BottomChromeClearance.native.js");
|
|
48
49
|
var import_componentColors = require("../componentColors.native.js");
|
|
49
50
|
var import_useDirection = require("../hooks/useDirection.native.js");
|
|
50
51
|
var import_i18n = require("../shared/i18n.native.js");
|
|
@@ -200,7 +201,6 @@ function PageShell(param) {
|
|
|
200
201
|
var scrollState = (0, import_screenScroll.useScreenScrollController)();
|
|
201
202
|
(0, import_screenScroll.useReportScreenScroll)(scrollState.state, Boolean(topBar));
|
|
202
203
|
var [accessories] = (0, import_react2.useState)(import_bottomAccessory.createBottomAccessoryStore);
|
|
203
|
-
var chromeInset = (0, import_bottomChrome.useBottomChromeInset)();
|
|
204
204
|
var inset = noPadding ? null : knobProps.panelPadding.padding;
|
|
205
205
|
var cap = maxWidth && !bleed ? maxWidth : null;
|
|
206
206
|
var inner = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
@@ -254,12 +254,9 @@ function PageShell(param) {
|
|
|
254
254
|
children: scoped
|
|
255
255
|
});
|
|
256
256
|
};
|
|
257
|
-
var chromeClearance =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
"aria-hidden": true,
|
|
261
|
-
"data-testid": "screen-chrome-clearance"
|
|
262
|
-
}) : null;
|
|
257
|
+
var chromeClearance = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_BottomChromeClearance.BottomChromeClearance, {
|
|
258
|
+
testID: "screen-chrome-clearance"
|
|
259
|
+
});
|
|
263
260
|
if (!scroll) {
|
|
264
261
|
return shell(/* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
|
|
265
262
|
flex: 1,
|
|
@@ -476,6 +473,107 @@ function PageSection(param) {
|
|
|
476
473
|
}) : children]
|
|
477
474
|
});
|
|
478
475
|
}
|
|
476
|
+
function useBarTitleSpan() {
|
|
477
|
+
var none = {
|
|
478
|
+
x: 0,
|
|
479
|
+
width: 0
|
|
480
|
+
};
|
|
481
|
+
var [box, setBox] = (0, import_react2.useState)({
|
|
482
|
+
row: 0,
|
|
483
|
+
leading: none,
|
|
484
|
+
trailing: none,
|
|
485
|
+
title: 0
|
|
486
|
+
});
|
|
487
|
+
var set = function set2(key, value) {
|
|
488
|
+
return setBox(function (prev) {
|
|
489
|
+
return JSON.stringify(prev[key]) === JSON.stringify(value) ? prev : {
|
|
490
|
+
...prev,
|
|
491
|
+
[key]: value
|
|
492
|
+
};
|
|
493
|
+
});
|
|
494
|
+
};
|
|
495
|
+
var extent = function extent2(event) {
|
|
496
|
+
var {
|
|
497
|
+
x,
|
|
498
|
+
width
|
|
499
|
+
} = event.nativeEvent.layout;
|
|
500
|
+
return {
|
|
501
|
+
x,
|
|
502
|
+
width
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
return {
|
|
506
|
+
span: (0, import_barTitleSpan.barTitleSpan)({
|
|
507
|
+
row: box.row,
|
|
508
|
+
title: box.title,
|
|
509
|
+
...(0, import_barTitleSpan.sideExtents)(box.row, box.leading, box.trailing)
|
|
510
|
+
}),
|
|
511
|
+
measureRow: function measureRow(event) {
|
|
512
|
+
return set("row", Math.floor(extent(event).width));
|
|
513
|
+
},
|
|
514
|
+
measureLeading: function measureLeading(event) {
|
|
515
|
+
return set("leading", extent(event));
|
|
516
|
+
},
|
|
517
|
+
measureTrailing: function measureTrailing(event) {
|
|
518
|
+
return set("trailing", extent(event));
|
|
519
|
+
},
|
|
520
|
+
measureTitle: function measureTitle(event) {
|
|
521
|
+
return set("title", Math.ceil(extent(event).width));
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
function BarTitle(param) {
|
|
526
|
+
var {
|
|
527
|
+
title,
|
|
528
|
+
span,
|
|
529
|
+
onTitleWidth,
|
|
530
|
+
shown = true,
|
|
531
|
+
...rest
|
|
532
|
+
} = param;
|
|
533
|
+
var {
|
|
534
|
+
knobProps
|
|
535
|
+
} = (0, import_theme.useResolvedKnobs)({
|
|
536
|
+
component: "ScreenToolbar"
|
|
537
|
+
});
|
|
538
|
+
var text = {
|
|
539
|
+
...knobProps.body,
|
|
540
|
+
fontWeight: "600",
|
|
541
|
+
color: "$color12",
|
|
542
|
+
numberOfLines: 1
|
|
543
|
+
};
|
|
544
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
545
|
+
children: [shown ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
546
|
+
position: "absolute",
|
|
547
|
+
top: 0,
|
|
548
|
+
left: 0,
|
|
549
|
+
opacity: 0,
|
|
550
|
+
pointerEvents: "none",
|
|
551
|
+
"aria-hidden": true,
|
|
552
|
+
onLayout: onTitleWidth,
|
|
553
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
554
|
+
...text,
|
|
555
|
+
children: title
|
|
556
|
+
})
|
|
557
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
558
|
+
position: "absolute",
|
|
559
|
+
top: 0,
|
|
560
|
+
bottom: 0,
|
|
561
|
+
left: span.left,
|
|
562
|
+
right: span.right,
|
|
563
|
+
alignItems: "center",
|
|
564
|
+
justifyContent: "center",
|
|
565
|
+
pointerEvents: "none",
|
|
566
|
+
"aria-hidden": !shown,
|
|
567
|
+
"data-bar-title": "",
|
|
568
|
+
opacity: shown ? 1 : 0,
|
|
569
|
+
...rest,
|
|
570
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
571
|
+
...text,
|
|
572
|
+
children: title
|
|
573
|
+
})
|
|
574
|
+
})]
|
|
575
|
+
});
|
|
576
|
+
}
|
|
479
577
|
function ScreenToolbar(props) {
|
|
480
578
|
var slot = (0, import_screenScroll.useTopBarSlot)();
|
|
481
579
|
return slot ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(PinnedTopBar, {
|
|
@@ -489,6 +587,7 @@ function InlineToolbar(param) {
|
|
|
489
587
|
var {
|
|
490
588
|
leading,
|
|
491
589
|
trailing,
|
|
590
|
+
title,
|
|
492
591
|
children,
|
|
493
592
|
...rest
|
|
494
593
|
} = param;
|
|
@@ -497,6 +596,7 @@ function InlineToolbar(param) {
|
|
|
497
596
|
} = (0, import_theme.useResolvedKnobs)({
|
|
498
597
|
component: "ScreenToolbar"
|
|
499
598
|
});
|
|
599
|
+
var titleSpan = useBarTitleSpan();
|
|
500
600
|
var insetToken = (0, import_pageHeadingScope.usePageChromeInset)();
|
|
501
601
|
var bleed = insetToken ? {
|
|
502
602
|
marginHorizontal: negateSpaceToken(insetToken)
|
|
@@ -508,8 +608,12 @@ function InlineToolbar(param) {
|
|
|
508
608
|
"data-testid": "screen-toolbar",
|
|
509
609
|
justifyContent: "space-between",
|
|
510
610
|
alignItems: "center",
|
|
511
|
-
flexWrap: oneRow ? "nowrap" : "wrap",
|
|
611
|
+
flexWrap: oneRow || title ? "nowrap" : "wrap",
|
|
512
612
|
minHeight: import_theme.MIN_PRESS_TARGET,
|
|
613
|
+
...(title ? {
|
|
614
|
+
position: "relative",
|
|
615
|
+
onLayout: titleSpan.measureRow
|
|
616
|
+
} : null),
|
|
513
617
|
...bleed,
|
|
514
618
|
...(insetToken ? {
|
|
515
619
|
paddingHorizontal: insetToken
|
|
@@ -523,6 +627,9 @@ function InlineToolbar(param) {
|
|
|
523
627
|
// Shrink weight, not a size: the back label gives way before the actions wrap.
|
|
524
628
|
flexShrink: oneRow ? 1e3 : 1,
|
|
525
629
|
minWidth: 0,
|
|
630
|
+
...(title ? {
|
|
631
|
+
onLayout: titleSpan.measureLeading
|
|
632
|
+
} : null),
|
|
526
633
|
children: leading
|
|
527
634
|
}), children, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_forms.IconButtonGroup, {
|
|
528
635
|
...knobProps.gap,
|
|
@@ -530,8 +637,15 @@ function InlineToolbar(param) {
|
|
|
530
637
|
flexShrink: 1,
|
|
531
638
|
minWidth: 0,
|
|
532
639
|
justifyContent: "flex-end",
|
|
640
|
+
...(title ? {
|
|
641
|
+
onLayout: titleSpan.measureTrailing
|
|
642
|
+
} : null),
|
|
533
643
|
children: trailing
|
|
534
|
-
})
|
|
644
|
+
}), title ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(BarTitle, {
|
|
645
|
+
title,
|
|
646
|
+
span: titleSpan.span,
|
|
647
|
+
onTitleWidth: titleSpan.measureTitle
|
|
648
|
+
}) : null]
|
|
535
649
|
})
|
|
536
650
|
});
|
|
537
651
|
}
|
|
@@ -539,6 +653,7 @@ function PinnedTopBar(param) {
|
|
|
539
653
|
var {
|
|
540
654
|
leading,
|
|
541
655
|
trailing,
|
|
656
|
+
title: inlineTitle,
|
|
542
657
|
children,
|
|
543
658
|
slot,
|
|
544
659
|
...rest
|
|
@@ -552,25 +667,11 @@ function PinnedTopBar(param) {
|
|
|
552
667
|
var {
|
|
553
668
|
scrolled,
|
|
554
669
|
collapsed,
|
|
555
|
-
title
|
|
670
|
+
title: largeTitle
|
|
556
671
|
} = (0, import_screenScroll.useScreenScroll)();
|
|
557
|
-
var
|
|
558
|
-
leading: 0,
|
|
559
|
-
trailing: 0
|
|
560
|
-
});
|
|
561
|
-
var measureSide = function measureSide2(side) {
|
|
562
|
-
return function (event) {
|
|
563
|
-
var width = Math.ceil(event.nativeEvent.layout.width);
|
|
564
|
-
setSides(function (prev) {
|
|
565
|
-
return prev[side] === width ? prev : {
|
|
566
|
-
...prev,
|
|
567
|
-
[side]: width
|
|
568
|
-
};
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
};
|
|
672
|
+
var titleSpan = useBarTitleSpan();
|
|
572
673
|
var motion = (0, import_theme.transitionProps)(knobProps.motion.control);
|
|
573
|
-
var
|
|
674
|
+
var title = inlineTitle !== null && inlineTitle !== void 0 ? inlineTitle : largeTitle;
|
|
574
675
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme.Surface, {
|
|
575
676
|
bar: true,
|
|
576
677
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
@@ -594,6 +695,7 @@ function PinnedTopBar(param) {
|
|
|
594
695
|
flexWrap: "nowrap",
|
|
595
696
|
// The collapsed title is placed against this row, not the page.
|
|
596
697
|
position: "relative",
|
|
698
|
+
onLayout: titleSpan.measureRow,
|
|
597
699
|
paddingHorizontal: (_slot_inset = slot.inset) !== null && _slot_inset !== void 0 ? _slot_inset : knobProps.panelPadding.padding,
|
|
598
700
|
...knobProps.gap,
|
|
599
701
|
...rest,
|
|
@@ -602,7 +704,7 @@ function PinnedTopBar(param) {
|
|
|
602
704
|
alignItems: "center",
|
|
603
705
|
flexShrink: 1e3,
|
|
604
706
|
minWidth: 0,
|
|
605
|
-
onLayout:
|
|
707
|
+
onLayout: titleSpan.measureLeading,
|
|
606
708
|
children: leading
|
|
607
709
|
}), children,
|
|
608
710
|
/* Pushes the actions to the trailing edge (LC-102: no space-between)
|
|
@@ -615,28 +717,14 @@ function PinnedTopBar(param) {
|
|
|
615
717
|
flexShrink: 1,
|
|
616
718
|
minWidth: 0,
|
|
617
719
|
justifyContent: "flex-end",
|
|
618
|
-
onLayout:
|
|
720
|
+
onLayout: titleSpan.measureTrailing,
|
|
619
721
|
children: trailing
|
|
620
|
-
}), title ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
alignItems: "center",
|
|
627
|
-
justifyContent: "center",
|
|
628
|
-
pointerEvents: "none",
|
|
629
|
-
"aria-hidden": !collapsed,
|
|
630
|
-
"data-bar-title": "",
|
|
631
|
-
opacity: collapsed ? 1 : 0,
|
|
632
|
-
...motion,
|
|
633
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
634
|
-
...knobProps.body,
|
|
635
|
-
fontWeight: "600",
|
|
636
|
-
color: "$color12",
|
|
637
|
-
numberOfLines: 1,
|
|
638
|
-
children: title
|
|
639
|
-
})
|
|
722
|
+
}), title ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(BarTitle, {
|
|
723
|
+
title,
|
|
724
|
+
span: titleSpan.span,
|
|
725
|
+
onTitleWidth: titleSpan.measureTitle,
|
|
726
|
+
shown: Boolean(inlineTitle) || collapsed,
|
|
727
|
+
...motion
|
|
640
728
|
}) : null]
|
|
641
729
|
})
|
|
642
730
|
})
|
|
@@ -655,7 +743,8 @@ function useTopBarControl() {
|
|
|
655
743
|
};
|
|
656
744
|
}
|
|
657
745
|
var CARET_OPTICAL_INSET = 72 / 256;
|
|
658
|
-
|
|
746
|
+
var CARET_INK_OFFSET = 8 / 256;
|
|
747
|
+
function backCaret(Caret, inkSign) {
|
|
659
748
|
return function BackCaret(param) {
|
|
660
749
|
var {
|
|
661
750
|
size = 22,
|
|
@@ -663,9 +752,14 @@ function backCaret(Caret) {
|
|
|
663
752
|
weight,
|
|
664
753
|
...stroke
|
|
665
754
|
} = param;
|
|
755
|
+
var plated = (0, import_forms.useGlyphOnPlate)();
|
|
666
756
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
|
|
667
757
|
"data-back-caret": "",
|
|
668
|
-
|
|
758
|
+
...(plated ? {
|
|
759
|
+
x: inkSign * size * CARET_INK_OFFSET
|
|
760
|
+
} : {
|
|
761
|
+
marginInlineStart: -Math.round(size * CARET_OPTICAL_INSET)
|
|
762
|
+
}),
|
|
669
763
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Caret, {
|
|
670
764
|
size,
|
|
671
765
|
color,
|
|
@@ -675,8 +769,8 @@ function backCaret(Caret) {
|
|
|
675
769
|
});
|
|
676
770
|
};
|
|
677
771
|
}
|
|
678
|
-
var BackCaretLeft = backCaret(import_react.CaretLeftIcon);
|
|
679
|
-
var BackCaretRight = backCaret(import_react.CaretRightIcon);
|
|
772
|
+
var BackCaretLeft = backCaret(import_react.CaretLeftIcon, 1);
|
|
773
|
+
var BackCaretRight = backCaret(import_react.CaretRightIcon, -1);
|
|
680
774
|
function PageBackButton(param) {
|
|
681
775
|
var {
|
|
682
776
|
label,
|