@multiplatform.one/components 7.57.0 → 7.59.0
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/Card.cjs +2 -0
- package/dist/cjs/Card.native.js +3 -0
- package/dist/cjs/Card.native.js.map +1 -1
- package/dist/cjs/DropdownMenu/index.cjs +16 -3
- package/dist/cjs/DropdownMenu/index.native.js +21 -3
- package/dist/cjs/DropdownMenu/index.native.js.map +1 -1
- package/dist/cjs/SheetModal/SheetHeader.cjs +53 -0
- package/dist/cjs/SheetModal/SheetHeader.native.js +57 -0
- package/dist/cjs/SheetModal/SheetHeader.native.js.map +1 -0
- package/dist/cjs/SheetModal/index.cjs +11 -4
- package/dist/cjs/SheetModal/index.native.js +7 -1
- package/dist/cjs/SheetModal/index.native.js.map +1 -1
- package/dist/cjs/actions/DangerSection.cjs +73 -0
- package/dist/cjs/actions/DangerSection.native.js +77 -0
- package/dist/cjs/actions/DangerSection.native.js.map +1 -0
- package/dist/cjs/actions/HeaderActions.cjs +98 -0
- package/dist/cjs/actions/HeaderActions.native.js +114 -0
- package/dist/cjs/actions/HeaderActions.native.js.map +1 -0
- package/dist/cjs/actions/index.cjs +7 -1
- package/dist/cjs/actions/index.native.js +7 -1
- package/dist/cjs/actions/index.native.js.map +1 -1
- package/dist/cjs/layouts/page.cjs +3 -1
- package/dist/cjs/layouts/page.native.js +2 -0
- package/dist/cjs/layouts/page.native.js.map +1 -1
- package/dist/cjs/layouts/tags.cjs +5 -8
- package/dist/cjs/layouts/tags.native.js +9 -6
- package/dist/cjs/layouts/tags.native.js.map +1 -1
- package/dist/cjs/surfaces.cjs +2 -0
- package/dist/cjs/surfaces.native.js +3 -0
- package/dist/cjs/surfaces.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/Card.mjs +3 -1
- package/dist/esm/Card.mjs.map +1 -1
- package/dist/esm/Card.native.js +4 -1
- package/dist/esm/Card.native.js.map +1 -1
- package/dist/esm/Carousel/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/index.native.js.map +1 -1
- package/dist/esm/Dialog.native.js.map +1 -1
- package/dist/esm/DotIndicator/index.native.js.map +1 -1
- package/dist/esm/DropdownMenu/index.mjs +15 -3
- package/dist/esm/DropdownMenu/index.mjs.map +1 -1
- package/dist/esm/DropdownMenu/index.native.js +20 -3
- package/dist/esm/DropdownMenu/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/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/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.mjs +28 -0
- package/dist/esm/SheetModal/SheetHeader.mjs.map +1 -0
- package/dist/esm/SheetModal/SheetHeader.native.js +29 -0
- package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -0
- package/dist/esm/SheetModal/detents.native.js.map +1 -1
- package/dist/esm/SheetModal/index.mjs +11 -4
- package/dist/esm/SheetModal/index.mjs.map +1 -1
- package/dist/esm/SheetModal/index.native.js +7 -1
- package/dist/esm/SheetModal/index.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/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.mjs +48 -0
- package/dist/esm/actions/DangerSection.mjs.map +1 -0
- package/dist/esm/actions/DangerSection.native.js +49 -0
- package/dist/esm/actions/DangerSection.native.js.map +1 -0
- package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
- package/dist/esm/actions/HeaderActions.mjs +71 -0
- package/dist/esm/actions/HeaderActions.mjs.map +1 -0
- package/dist/esm/actions/HeaderActions.native.js +84 -0
- package/dist/esm/actions/HeaderActions.native.js.map +1 -0
- package/dist/esm/actions/devWarn.native.js.map +1 -1
- package/dist/esm/actions/index.mjs +3 -1
- package/dist/esm/actions/index.mjs.map +1 -1
- package/dist/esm/actions/index.native.js +3 -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/Dock.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/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.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/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/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/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/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.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/ViewSwitcher.native.js.map +1 -1
- package/dist/esm/layouts/attachments.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 +2 -0
- package/dist/esm/layouts/page.mjs.map +1 -1
- package/dist/esm/layouts/page.native.js +2 -0
- 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.mjs +5 -8
- package/dist/esm/layouts/tags.mjs.map +1 -1
- package/dist/esm/layouts/tags.native.js +9 -6
- 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.mjs +3 -1
- package/dist/esm/surfaces.mjs.map +1 -1
- package/dist/esm/surfaces.native.js +4 -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/Matrix.native.js.map +1 -1
- package/dist/esm/views/ReportBuilder.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/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/jsx/Accordion/index.native.js +1 -1
- package/dist/jsx/Accordion/index.native.js.map +1 -1
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/AnimateHeight/index.native.js.map +1 -1
- package/dist/jsx/Avatar/getInitials.native.js.map +1 -1
- package/dist/jsx/Avatar/index.native.js.map +1 -1
- package/dist/jsx/Badge/index.native.js.map +1 -1
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/Card.mjs +3 -1
- package/dist/jsx/Card.mjs.map +1 -1
- package/dist/jsx/Card.native.js +3 -0
- package/dist/jsx/Card.native.js.map +1 -1
- package/dist/jsx/CardFooter.native.js.map +1 -1
- package/dist/jsx/CardHeader.native.js.map +1 -1
- package/dist/jsx/Carousel/index.native.js +2 -2
- package/dist/jsx/Carousel/index.native.js.map +1 -1
- package/dist/jsx/Chip/index.native.js.map +1 -1
- package/dist/jsx/Collapsible.native.js.map +1 -1
- package/dist/jsx/ContextMenu/index.native.js.map +1 -1
- package/dist/jsx/CopyField/index.native.js.map +1 -1
- package/dist/jsx/Dialog.native.js.map +1 -1
- package/dist/jsx/DotIndicator/index.native.js.map +1 -1
- package/dist/jsx/DropdownMenu/index.mjs +15 -3
- package/dist/jsx/DropdownMenu/index.mjs.map +1 -1
- package/dist/jsx/DropdownMenu/index.native.js +21 -3
- package/dist/jsx/DropdownMenu/index.native.js.map +1 -1
- package/dist/jsx/ErrorBoundary/index.native.js.map +1 -1
- package/dist/jsx/Heading.native.js.map +1 -1
- package/dist/jsx/Meter/index.native.js +1 -1
- package/dist/jsx/Meter/index.native.js.map +1 -1
- package/dist/jsx/Meter/meter.native.js.map +1 -1
- package/dist/jsx/OverflowRow/index.native.js +1 -1
- package/dist/jsx/OverflowRow/index.native.js.map +1 -1
- package/dist/jsx/Pagination.native.js +1 -1
- package/dist/jsx/Pagination.native.js.map +1 -1
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/ProgressSteps/index.native.js.map +1 -1
- package/dist/jsx/Quote/index.native.js.map +1 -1
- package/dist/jsx/ScrollView/revealFocusedField.native.js.map +1 -1
- package/dist/jsx/Separator/index.native.js.map +1 -1
- package/dist/jsx/Sheet.native.js.map +1 -1
- package/dist/jsx/SheetModal/SheetHeader.mjs +28 -0
- package/dist/jsx/SheetModal/SheetHeader.mjs.map +1 -0
- package/dist/jsx/SheetModal/SheetHeader.native.js +57 -0
- package/dist/jsx/SheetModal/SheetHeader.native.js.map +1 -0
- package/dist/jsx/SheetModal/detents.native.js.map +1 -1
- package/dist/jsx/SheetModal/index.mjs +11 -4
- package/dist/jsx/SheetModal/index.mjs.map +1 -1
- package/dist/jsx/SheetModal/index.native.js +7 -1
- package/dist/jsx/SheetModal/index.native.js.map +1 -1
- package/dist/jsx/SheetModal/useSheetFrameFocus.native.js.map +1 -1
- package/dist/jsx/Skeleton/index.native.js.map +1 -1
- package/dist/jsx/SkipLink/index.native.js.map +1 -1
- package/dist/jsx/SortableList/SortableHandle.native.js.map +1 -1
- package/dist/jsx/SortableList/index.native.js.map +1 -1
- package/dist/jsx/SortableList/useSortableRows.native.js.map +1 -1
- package/dist/jsx/Tabs/index.native.js +1 -1
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Text.native.js.map +1 -1
- package/dist/jsx/ThemePresetPicker/index.native.js +2 -2
- package/dist/jsx/ThemePresetPicker/index.native.js.map +1 -1
- package/dist/jsx/Toast/index.native.js.map +1 -1
- package/dist/jsx/Toast/store.native.js.map +1 -1
- package/dist/jsx/Tooltip/nativePress.native.js.map +1 -1
- package/dist/jsx/Tooltip/tooltipShared.native.js.map +1 -1
- package/dist/jsx/TreeSelect/index.native.js +1 -1
- package/dist/jsx/TreeSelect/index.native.js.map +1 -1
- package/dist/jsx/TreeSelect/treeSelectModel.native.js.map +1 -1
- package/dist/jsx/Video/PlayerChrome.native.js.map +1 -1
- package/dist/jsx/Video/VideoFrame.native.js.map +1 -1
- package/dist/jsx/Video/types.native.js.map +1 -1
- package/dist/jsx/Wheel/index.native.js.map +1 -1
- package/dist/jsx/Wizard/index.native.js +2 -2
- package/dist/jsx/Wizard/index.native.js.map +1 -1
- package/dist/jsx/actions/ActionBar.native.js.map +1 -1
- package/dist/jsx/actions/DangerSection.mjs +48 -0
- package/dist/jsx/actions/DangerSection.mjs.map +1 -0
- package/dist/jsx/actions/DangerSection.native.js +77 -0
- package/dist/jsx/actions/DangerSection.native.js.map +1 -0
- package/dist/jsx/actions/DestructiveAction.native.js.map +1 -1
- package/dist/jsx/actions/HeaderActions.mjs +71 -0
- package/dist/jsx/actions/HeaderActions.mjs.map +1 -0
- package/dist/jsx/actions/HeaderActions.native.js +114 -0
- package/dist/jsx/actions/HeaderActions.native.js.map +1 -0
- package/dist/jsx/actions/devWarn.native.js.map +1 -1
- package/dist/jsx/actions/index.mjs +3 -1
- package/dist/jsx/actions/index.mjs.map +1 -1
- package/dist/jsx/actions/index.native.js +7 -1
- package/dist/jsx/actions/index.native.js.map +1 -1
- package/dist/jsx/actions/severity.native.js.map +1 -1
- package/dist/jsx/appShell/Dock.native.js.map +1 -1
- package/dist/jsx/appShell/ScopeMenu.native.js.map +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js +1 -1
- package/dist/jsx/appShell/SettingsSplit.native.js.map +1 -1
- package/dist/jsx/appShell/Springboard.native.js +1 -1
- package/dist/jsx/appShell/Springboard.native.js.map +1 -1
- package/dist/jsx/appShell/SystemBar.native.js.map +1 -1
- package/dist/jsx/appShell/TabBar.native.js +1 -1
- package/dist/jsx/appShell/TabBar.native.js.map +1 -1
- package/dist/jsx/appShell/appTile.native.js +1 -1
- package/dist/jsx/appShell/appTile.native.js.map +1 -1
- package/dist/jsx/appShell/index.native.js.map +1 -1
- package/dist/jsx/charts/Axis.native.js.map +1 -1
- package/dist/jsx/charts/BarChart.native.js.map +1 -1
- package/dist/jsx/charts/ChartDataView.native.js +1 -1
- package/dist/jsx/charts/ChartDataView.native.js.map +1 -1
- package/dist/jsx/charts/ChartSurface.native.js.map +1 -1
- package/dist/jsx/charts/LineChart.native.js.map +1 -1
- package/dist/jsx/charts/PieChart.native.js.map +1 -1
- package/dist/jsx/charts/Sparkline.native.js.map +1 -1
- package/dist/jsx/charts/accessibility.native.js.map +1 -1
- package/dist/jsx/charts/chartHeight.native.js.map +1 -1
- package/dist/jsx/charts/composeChart.native.js.map +1 -1
- package/dist/jsx/charts/index.native.js.map +1 -1
- package/dist/jsx/charts/math.native.js.map +1 -1
- package/dist/jsx/charts/series.native.js.map +1 -1
- package/dist/jsx/charts/svg.native.js.map +1 -1
- package/dist/jsx/charts/types.native.js.map +1 -1
- package/dist/jsx/charts/useChartTheme.native.js.map +1 -1
- package/dist/jsx/code/Code/index.native.js.map +1 -1
- package/dist/jsx/code/CodeBlock/index.native.js +7 -7
- package/dist/jsx/code/CodeBlock/index.native.js.map +1 -1
- package/dist/jsx/code/HighlightedCode/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/index.native.js.map +1 -1
- package/dist/jsx/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
- package/dist/jsx/code/Pre/index.native.js.map +1 -1
- package/dist/jsx/code/index.native.js +5 -5
- package/dist/jsx/code/index.native.js.map +1 -1
- package/dist/jsx/componentColors.native.js.map +1 -1
- package/dist/jsx/feedback/ConfirmDialog.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +2 -2
- package/dist/jsx/feedback/NotifyHost.native.js.map +1 -1
- package/dist/jsx/feedback/copy.native.js.map +1 -1
- package/dist/jsx/feedback/index.native.js.map +1 -1
- package/dist/jsx/feedback/notify.native.js.map +1 -1
- package/dist/jsx/feedback/route.native.js.map +1 -1
- package/dist/jsx/feedback/store.native.js.map +1 -1
- package/dist/jsx/hooks/index.native.js +1 -1
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useClipboard.native.js.map +1 -1
- package/dist/jsx/hooks/useDocumentTitle.native.js.map +1 -1
- package/dist/jsx/icons/CheckRegular.native.js.map +1 -1
- package/dist/jsx/icons/MinusRegular.native.js.map +1 -1
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/icons/lucide.native.js.map +1 -1
- package/dist/jsx/icons/themed.native.js.map +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js +1 -1
- package/dist/jsx/images/Image/ImageFrame.native.js.map +1 -1
- package/dist/jsx/images/Image/index.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js +1 -1
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/images/Image/types.native.js.map +1 -1
- package/dist/jsx/images/index.native.js.map +1 -1
- package/dist/jsx/index.native.js +32 -32
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/knobImmuneExports.native.js.map +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +2 -2
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/layouts/Debug/index.native.js.map +1 -1
- package/dist/jsx/layouts/EmptyState.native.js.map +1 -1
- package/dist/jsx/layouts/IdentityPlate.native.js.map +1 -1
- package/dist/jsx/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
- package/dist/jsx/layouts/PageTemplates.native.js.map +1 -1
- package/dist/jsx/layouts/PaneScaffold.native.js.map +1 -1
- package/dist/jsx/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
- package/dist/jsx/layouts/StatusDot.native.js.map +1 -1
- package/dist/jsx/layouts/ViewSwitcher.native.js.map +1 -1
- package/dist/jsx/layouts/attachments.native.js +1 -1
- package/dist/jsx/layouts/attachments.native.js.map +1 -1
- package/dist/jsx/layouts/breadcrumbs.native.js.map +1 -1
- package/dist/jsx/layouts/index.native.js +3 -3
- package/dist/jsx/layouts/index.native.js.map +1 -1
- package/dist/jsx/layouts/page.mjs +2 -0
- package/dist/jsx/layouts/page.mjs.map +1 -1
- package/dist/jsx/layouts/page.native.js +4 -2
- package/dist/jsx/layouts/page.native.js.map +1 -1
- package/dist/jsx/layouts/pageHeadingScope.native.js.map +1 -1
- package/dist/jsx/layouts/screenScroll.native.js.map +1 -1
- package/dist/jsx/layouts/shellSidebarSlot.native.js.map +1 -1
- package/dist/jsx/layouts/sidebar.native.js +1 -1
- package/dist/jsx/layouts/sidebar.native.js.map +1 -1
- package/dist/jsx/layouts/tags.mjs +5 -8
- package/dist/jsx/layouts/tags.mjs.map +1 -1
- package/dist/jsx/layouts/tags.native.js +11 -8
- package/dist/jsx/layouts/tags.native.js.map +1 -1
- package/dist/jsx/layouts/timeline.native.js +2 -2
- package/dist/jsx/layouts/timeline.native.js.map +1 -1
- package/dist/jsx/layouts/toolbar.native.js +1 -1
- package/dist/jsx/layouts/toolbar.native.js.map +1 -1
- package/dist/jsx/shared/actionScan.native.js.map +1 -1
- package/dist/jsx/shared/i18n.native.js.map +1 -1
- package/dist/jsx/shared/restoreRetries.native.js.map +1 -1
- package/dist/jsx/shared/t.native.js.map +1 -1
- package/dist/jsx/shared/textRidesText.native.js.map +1 -1
- package/dist/jsx/shared/useReturnFocusOnClose.native.js.map +1 -1
- package/dist/jsx/surfaces.mjs +3 -1
- package/dist/jsx/surfaces.mjs.map +1 -1
- package/dist/jsx/surfaces.native.js +4 -1
- package/dist/jsx/surfaces.native.js.map +1 -1
- package/dist/jsx/tamagui.native.js +1 -1
- package/dist/jsx/tamagui.native.js.map +1 -1
- package/dist/jsx/testSetup.native.js.map +1 -1
- package/dist/jsx/utils/setTinted.native.js.map +1 -1
- package/dist/jsx/utils/unwrapText.native.js.map +1 -1
- package/dist/jsx/views/Calendar.native.js +1 -1
- package/dist/jsx/views/Calendar.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +2 -2
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/Gantt.native.js +2 -2
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/ImageGrid.native.js +1 -1
- package/dist/jsx/views/ImageGrid.native.js.map +1 -1
- package/dist/jsx/views/Kanban.native.js +1 -1
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/Matrix.native.js +2 -2
- package/dist/jsx/views/Matrix.native.js.map +1 -1
- package/dist/jsx/views/ReportBuilder.native.js +2 -2
- package/dist/jsx/views/ReportBuilder.native.js.map +1 -1
- package/dist/jsx/views/TreeView.native.js.map +1 -1
- package/dist/jsx/views/calendarMath.native.js.map +1 -1
- package/dist/jsx/views/ganttIntervals.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.native.js +1 -1
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/kanbanDnd.native.js.map +1 -1
- package/dist/jsx/views/matrixMath.native.js.map +1 -1
- package/dist/jsx/views/treeViewDnd.native.js.map +1 -1
- package/dist/jsx/views/treeViewLayout.native.js.map +1 -1
- package/dist/jsx/views/treeViewMotion.native.js.map +1 -1
- package/dist/jsx/views/treeViewReveal.native.js.map +1 -1
- package/package.json +9 -9
- package/src/Card.tsx +8 -2
- package/src/DropdownMenu/index.tsx +31 -4
- package/src/SheetModal/SheetHeader.tsx +30 -0
- package/src/SheetModal/SheetModal.menus.spec.tsx +247 -0
- package/src/SheetModal/SheetModal.stories.tsx +113 -1
- package/src/SheetModal/index.native.tsx +7 -1
- package/src/SheetModal/index.tsx +20 -4
- package/src/actions/DangerSection.spec.tsx +45 -0
- package/src/actions/DangerSection.tsx +52 -0
- package/src/actions/HeaderActions.spec.tsx +84 -0
- package/src/actions/HeaderActions.tsx +90 -0
- package/src/actions/index.ts +10 -0
- package/src/elevatedGround.spec.tsx +71 -0
- package/src/layouts/IdentityPlate.stories.tsx +20 -1
- package/src/layouts/Tags.stories.tsx +42 -0
- package/src/layouts/page.tsx +3 -0
- package/src/layouts/tags-trigger.spec.tsx +6 -0
- package/src/layouts/tags.tsx +7 -6
- package/src/surfaces.tsx +3 -1
- package/types/Card.d.ts.map +1 -1
- package/types/DropdownMenu/index.d.ts +5 -0
- package/types/DropdownMenu/index.d.ts.map +1 -1
- package/types/SheetModal/SheetHeader.d.ts +13 -0
- package/types/SheetModal/SheetHeader.d.ts.map +1 -0
- package/types/SheetModal/index.d.ts +7 -1
- package/types/SheetModal/index.d.ts.map +1 -1
- package/types/SheetModal/index.native.d.ts +1 -1
- package/types/SheetModal/index.native.d.ts.map +1 -1
- package/types/actions/DangerSection.d.ts +15 -0
- package/types/actions/DangerSection.d.ts.map +1 -0
- package/types/actions/HeaderActions.d.ts +42 -0
- package/types/actions/HeaderActions.d.ts.map +1 -0
- package/types/actions/index.d.ts +2 -0
- package/types/actions/index.d.ts.map +1 -1
- package/types/layouts/page.d.ts +6 -0
- package/types/layouts/page.d.ts.map +1 -1
- package/types/layouts/tags.d.ts.map +1 -1
- package/types/surfaces.d.ts.map +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LC-262 DIRECT-ACTIONS (FZ-7830): destructive actions sit in a Danger section
|
|
3
|
+
* at the end of the content, set apart, and confirm by name before they run.
|
|
4
|
+
*/
|
|
5
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
6
|
+
import { fireEvent, waitFor, within } from "@testing-library/react";
|
|
7
|
+
import { describe, expect, it, vi } from "vitest";
|
|
8
|
+
import { componentColors } from "../componentColors";
|
|
9
|
+
import { DangerSection } from "./DangerSection";
|
|
10
|
+
import { DestructiveAction } from "./DestructiveAction";
|
|
11
|
+
|
|
12
|
+
describe("DangerSection (LC-262)", () => {
|
|
13
|
+
it("is a group named by its red-ink heading, set apart by a rule", () => {
|
|
14
|
+
const result = renderWithProviders(
|
|
15
|
+
<DangerSection>
|
|
16
|
+
<DestructiveAction verb="Uninstall" noun="keycloak" severity="medium" onAction={() => {}} />
|
|
17
|
+
</DangerSection>,
|
|
18
|
+
);
|
|
19
|
+
const group = result.getByRole("group", { name: "Danger zone" });
|
|
20
|
+
expect(group.getAttribute("data-testid")).toBe("danger-section");
|
|
21
|
+
expect(group.className).toContain("mp-hairline-t");
|
|
22
|
+
const heading = result.getByRole("heading", { name: "Danger zone" });
|
|
23
|
+
expect(componentColors.semantic.error).toBe("$red11");
|
|
24
|
+
expect(heading.className).toMatch(/_col-red11/);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Uninstall asks first, naming the action, and runs only on confirm", async () => {
|
|
28
|
+
const onAction = vi.fn();
|
|
29
|
+
const result = renderWithProviders(
|
|
30
|
+
<DangerSection>
|
|
31
|
+
<DestructiveAction verb="Uninstall" noun="keycloak" severity="medium" onAction={onAction} />
|
|
32
|
+
</DangerSection>,
|
|
33
|
+
);
|
|
34
|
+
fireEvent.click(result.getByRole("button", { name: /Uninstall keycloak/ }));
|
|
35
|
+
await waitFor(() => expect(document.querySelector('[role="alertdialog"]')).toBeTruthy());
|
|
36
|
+
expect(onAction).not.toHaveBeenCalled();
|
|
37
|
+
const dialog = document.querySelector('[role="alertdialog"]') as HTMLElement;
|
|
38
|
+
const confirm = within(dialog)
|
|
39
|
+
.queryAllByRole("button")
|
|
40
|
+
.find((b) => (b.textContent ?? "").trim() === "Uninstall");
|
|
41
|
+
expect(confirm).toBeTruthy();
|
|
42
|
+
fireEvent.click(confirm!);
|
|
43
|
+
await waitFor(() => expect(onAction).toHaveBeenCalledTimes(1));
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { hairline, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { YStack, type YStackProps } from "tamagui";
|
|
5
|
+
import { componentColors } from "../componentColors";
|
|
6
|
+
import { useTranslation } from "../shared/i18n";
|
|
7
|
+
import { Paragraph } from "../Text";
|
|
8
|
+
|
|
9
|
+
export interface DangerSectionProps extends Omit<YStackProps, "children"> {
|
|
10
|
+
/** Defaults to "Danger zone". */
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
/** The destructive actions: `DestructiveAction`s, each with its confirm. */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Where a sheet's or page's destructive actions live (LC-262 DIRECT-ACTIONS):
|
|
18
|
+
* the last group of its content, set apart by a rule and a red-ink heading,
|
|
19
|
+
* never mixed into a menu. Each action confirms by name before it runs.
|
|
20
|
+
*/
|
|
21
|
+
export function DangerSection({ title, children, ...rest }: DangerSectionProps) {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
const { knobProps } = useResolvedKnobs({ component: "PageSection" });
|
|
24
|
+
const headingId = useId();
|
|
25
|
+
return (
|
|
26
|
+
<YStack
|
|
27
|
+
role="group"
|
|
28
|
+
aria-labelledby={headingId}
|
|
29
|
+
data-testid="danger-section"
|
|
30
|
+
{...hairline.top}
|
|
31
|
+
borderColor={componentColors.divider}
|
|
32
|
+
paddingTop={knobProps.gap.gap}
|
|
33
|
+
{...knobProps.gapSm}
|
|
34
|
+
{...rest}
|
|
35
|
+
>
|
|
36
|
+
<Paragraph
|
|
37
|
+
id={headingId}
|
|
38
|
+
role="heading"
|
|
39
|
+
aria-level={3}
|
|
40
|
+
margin={0}
|
|
41
|
+
{...knobProps.body}
|
|
42
|
+
fontWeight="600"
|
|
43
|
+
color={componentColors.semantic.error}
|
|
44
|
+
>
|
|
45
|
+
{title ?? t("Danger zone")}
|
|
46
|
+
</Paragraph>
|
|
47
|
+
<YStack alignItems="flex-start" {...knobProps.gapSm}>
|
|
48
|
+
{children}
|
|
49
|
+
</YStack>
|
|
50
|
+
</YStack>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LC-262 DIRECT-ACTIONS (FZ-7830): a sheet's frequent actions are visible icon
|
|
3
|
+
* buttons, each named for assistive tech, and "…" appears only past three.
|
|
4
|
+
*/
|
|
5
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
6
|
+
import {
|
|
7
|
+
ArrowClockwiseIcon,
|
|
8
|
+
CloudArrowUpIcon,
|
|
9
|
+
ScrollIcon,
|
|
10
|
+
StopIcon,
|
|
11
|
+
TerminalIcon,
|
|
12
|
+
} from "@phosphor-icons/react";
|
|
13
|
+
import { fireEvent, waitFor, within } from "@testing-library/react";
|
|
14
|
+
import { describe, expect, it, vi } from "vitest";
|
|
15
|
+
import { Paragraph } from "../Text";
|
|
16
|
+
import { SheetModal } from "../SheetModal";
|
|
17
|
+
import { HeaderActions, HEADER_ACTIONS_MAX, splitHeaderActions } from "./HeaderActions";
|
|
18
|
+
|
|
19
|
+
const stop = vi.fn();
|
|
20
|
+
const restart = vi.fn();
|
|
21
|
+
const two = [
|
|
22
|
+
{ icon: StopIcon, label: "Stop", onPress: stop },
|
|
23
|
+
{ icon: ArrowClockwiseIcon, label: "Restart", onPress: restart },
|
|
24
|
+
];
|
|
25
|
+
const five = [
|
|
26
|
+
...two,
|
|
27
|
+
{ icon: ScrollIcon, label: "Logs", onPress: vi.fn() },
|
|
28
|
+
{ icon: TerminalIcon, label: "Shell", onPress: vi.fn() },
|
|
29
|
+
{ icon: CloudArrowUpIcon, label: "Back up", onPress: vi.fn() },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
describe("splitHeaderActions (LC-262)", () => {
|
|
33
|
+
it("shows up to three actions, and past three gives the last slot to the overflow", () => {
|
|
34
|
+
expect(HEADER_ACTIONS_MAX).toBe(3);
|
|
35
|
+
expect(splitHeaderActions([1, 2])).toEqual({ visible: [1, 2], overflow: [] });
|
|
36
|
+
expect(splitHeaderActions([1, 2, 3])).toEqual({ visible: [1, 2, 3], overflow: [] });
|
|
37
|
+
expect(splitHeaderActions([1, 2, 3, 4, 5])).toEqual({ visible: [1, 2], overflow: [3, 4, 5] });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe("HeaderActions (LC-262)", () => {
|
|
42
|
+
it("renders each frequent action as a named icon button, with no overflow menu", () => {
|
|
43
|
+
const result = renderWithProviders(<HeaderActions actions={two} />);
|
|
44
|
+
const buttons = result.getAllByRole("button");
|
|
45
|
+
expect(buttons.map((b) => b.getAttribute("aria-label"))).toEqual(["Stop", "Restart"]);
|
|
46
|
+
expect(buttons.every((b) => (b.textContent ?? "").trim() === "")).toBe(true);
|
|
47
|
+
fireEvent.click(result.getByRole("button", { name: "Restart" }));
|
|
48
|
+
expect(restart).toHaveBeenCalledTimes(1);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("past three, shows two and puts the rest behind More actions, each row with its glyph", async () => {
|
|
52
|
+
const result = renderWithProviders(<HeaderActions actions={five} />);
|
|
53
|
+
const labels = result.getAllByRole("button").map((b) => b.getAttribute("aria-label"));
|
|
54
|
+
expect(labels).toEqual(["Stop", "Restart", "More actions"]);
|
|
55
|
+
fireEvent.click(result.getByRole("button", { name: "More actions" }));
|
|
56
|
+
await waitFor(() => expect(document.querySelectorAll('[role="menuitem"]').length).toBe(3));
|
|
57
|
+
for (const row of Array.from(document.querySelectorAll('[role="menuitem"]'))) {
|
|
58
|
+
expect(row.querySelector("svg")).toBeTruthy();
|
|
59
|
+
}
|
|
60
|
+
// An icon trigger is not echoed as the menu's first row (LC-262).
|
|
61
|
+
expect(document.querySelector("[data-fp-trigger-row]")).toBeNull();
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("sits in the sheet header's trailing area, and the sheet stays named by its title", async () => {
|
|
65
|
+
renderWithProviders(
|
|
66
|
+
<SheetModal
|
|
67
|
+
open
|
|
68
|
+
onOpenChange={() => {}}
|
|
69
|
+
header={<Paragraph>keycloak</Paragraph>}
|
|
70
|
+
headerActions={<HeaderActions actions={two} />}
|
|
71
|
+
>
|
|
72
|
+
<Paragraph>Body</Paragraph>
|
|
73
|
+
</SheetModal>,
|
|
74
|
+
);
|
|
75
|
+
await waitFor(() =>
|
|
76
|
+
expect(document.querySelector('[data-testid="sheet-modal-header-actions"]')).toBeTruthy(),
|
|
77
|
+
);
|
|
78
|
+
const slot = document.querySelector('[data-testid="sheet-modal-header-actions"]')!;
|
|
79
|
+
expect(within(slot as HTMLElement).getAllByRole("button").length).toBe(2);
|
|
80
|
+
const dialog = document.querySelector('[role="dialog"]')!;
|
|
81
|
+
const title = document.getElementById(dialog.getAttribute("aria-labelledby") ?? "");
|
|
82
|
+
expect(title?.textContent).toBe("keycloak");
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { DotsThreeIcon } from "@phosphor-icons/react";
|
|
2
|
+
import { createElement, isValidElement, type ComponentType, type ReactNode } from "react";
|
|
3
|
+
import { XStack } from "tamagui";
|
|
4
|
+
import { DropdownMenu } from "../DropdownMenu";
|
|
5
|
+
import { PageBarButton } from "../layouts/page";
|
|
6
|
+
import { useTranslation } from "../shared/i18n";
|
|
7
|
+
import { Tooltip } from "../Tooltip";
|
|
8
|
+
|
|
9
|
+
type Glyph = ReactNode | ComponentType<{ size?: number; color?: string }>;
|
|
10
|
+
|
|
11
|
+
export interface HeaderAction {
|
|
12
|
+
/** Stable key (defaults to the label). */
|
|
13
|
+
key?: string;
|
|
14
|
+
/** The action's glyph: a bare tinted icon (LC-176). */
|
|
15
|
+
icon: Glyph;
|
|
16
|
+
/** The action's name: its accessibility label and tooltip (LC-260). */
|
|
17
|
+
label: string;
|
|
18
|
+
onPress: () => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface HeaderActionsProps {
|
|
23
|
+
actions: HeaderAction[];
|
|
24
|
+
/**
|
|
25
|
+
* Most controls the row shows. Past it, the last slot becomes "…" holding
|
|
26
|
+
* the rest. Defaults to `HEADER_ACTIONS_MAX` (3).
|
|
27
|
+
*/
|
|
28
|
+
max?: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** The most icon buttons a header shows before "…" takes the last slot (LC-262). */
|
|
32
|
+
export const HEADER_ACTIONS_MAX = 3;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Which actions show as icon buttons and which go behind "…": all of them when
|
|
36
|
+
* they fit, else the first `max - 1` and "…" for the rest.
|
|
37
|
+
*/
|
|
38
|
+
export function splitHeaderActions<T>(actions: T[], max = HEADER_ACTIONS_MAX) {
|
|
39
|
+
if (actions.length <= max) return { visible: actions, overflow: [] as T[] };
|
|
40
|
+
const shown = Math.max(0, max - 1);
|
|
41
|
+
return { visible: actions.slice(0, shown), overflow: actions.slice(shown) };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function glyphNode(icon: Glyph): ReactNode {
|
|
45
|
+
if (icon == null || isValidElement(icon)) return icon as ReactNode;
|
|
46
|
+
if (typeof icon === "function" || (typeof icon === "object" && "$$typeof" in icon)) {
|
|
47
|
+
return createElement(icon as ComponentType);
|
|
48
|
+
}
|
|
49
|
+
return icon as ReactNode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A sheet's or page's frequent actions as visible icon buttons (LC-262
|
|
54
|
+
* DIRECT-ACTIONS): each a bare glyph with its name as accessibility label and
|
|
55
|
+
* tooltip. "…" appears only for overflow past `max`. Destructive actions never
|
|
56
|
+
* go here; they sit in a `DangerSection`.
|
|
57
|
+
*/
|
|
58
|
+
export function HeaderActions({ actions, max = HEADER_ACTIONS_MAX }: HeaderActionsProps) {
|
|
59
|
+
const { t } = useTranslation();
|
|
60
|
+
const { visible, overflow } = splitHeaderActions(actions, max);
|
|
61
|
+
const last = visible.length - 1;
|
|
62
|
+
return (
|
|
63
|
+
<XStack testID="header-actions" alignItems="center">
|
|
64
|
+
{visible.map((action, index) => (
|
|
65
|
+
<Tooltip key={action.key ?? action.label} content={action.label}>
|
|
66
|
+
<PageBarButton
|
|
67
|
+
icon={action.icon as never}
|
|
68
|
+
aria-label={action.label}
|
|
69
|
+
onPress={action.onPress}
|
|
70
|
+
disabled={action.disabled}
|
|
71
|
+
{...(overflow.length === 0 && index === last ? { edge: "end" as const } : null)}
|
|
72
|
+
/>
|
|
73
|
+
</Tooltip>
|
|
74
|
+
))}
|
|
75
|
+
{overflow.length ? (
|
|
76
|
+
<DropdownMenu
|
|
77
|
+
items={overflow.map((action) => ({
|
|
78
|
+
key: action.key ?? action.label,
|
|
79
|
+
label: action.label,
|
|
80
|
+
icon: glyphNode(action.icon),
|
|
81
|
+
disabled: action.disabled,
|
|
82
|
+
onSelect: action.onPress,
|
|
83
|
+
}))}
|
|
84
|
+
>
|
|
85
|
+
<PageBarButton icon={DotsThreeIcon} aria-label={t("More actions")} edge="end" />
|
|
86
|
+
</DropdownMenu>
|
|
87
|
+
) : null}
|
|
88
|
+
</XStack>
|
|
89
|
+
);
|
|
90
|
+
}
|
package/src/actions/index.ts
CHANGED
|
@@ -16,6 +16,16 @@ export {
|
|
|
16
16
|
|
|
17
17
|
export { ActionBar, type ActionBarAlign, type ActionBarProps } from "./ActionBar";
|
|
18
18
|
|
|
19
|
+
export {
|
|
20
|
+
HeaderActions,
|
|
21
|
+
HEADER_ACTIONS_MAX,
|
|
22
|
+
splitHeaderActions,
|
|
23
|
+
type HeaderAction,
|
|
24
|
+
type HeaderActionsProps,
|
|
25
|
+
} from "./HeaderActions";
|
|
26
|
+
|
|
27
|
+
export { DangerSection, type DangerSectionProps } from "./DangerSection";
|
|
28
|
+
|
|
19
29
|
export {
|
|
20
30
|
actionDevWarn,
|
|
21
31
|
__resetActionDevWarnSeen,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*
|
|
4
|
+
* FZ-7944. A Panel or an elevated Card that paints the dark elevated tint
|
|
5
|
+
* (`$color4`) marks its content elevated, so a neutral Button on it washes one
|
|
6
|
+
* step up (`$color5`) instead of vanishing into the ground. Nested under a
|
|
7
|
+
* painted parent they paint no tint, and the content wash stays.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { Button } from "@multiplatform.one/forms";
|
|
11
|
+
import { createDefaultThemeConfig } from "@multiplatform.one/theme";
|
|
12
|
+
import { cleanup, render, screen } from "@testing-library/react";
|
|
13
|
+
import type { ReactElement } from "react";
|
|
14
|
+
import { TamaguiProvider, YStack } from "tamagui";
|
|
15
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
16
|
+
import { Card, Panel } from "./surfaces";
|
|
17
|
+
|
|
18
|
+
afterEach(cleanup);
|
|
19
|
+
|
|
20
|
+
const houseConfig = createDefaultThemeConfig();
|
|
21
|
+
|
|
22
|
+
function darkRender(ui: ReactElement) {
|
|
23
|
+
return render(
|
|
24
|
+
<TamaguiProvider config={houseConfig.tamagui} defaultTheme="dark" disableInjectCSS>
|
|
25
|
+
<YStack backgroundColor="$background">{ui}</YStack>
|
|
26
|
+
</TamaguiProvider>,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function restFill(label: string): string[] {
|
|
31
|
+
const el = screen.getByText(label).closest("[role=button]") as HTMLElement;
|
|
32
|
+
return Array.from(el.classList).filter(
|
|
33
|
+
(c) => c.startsWith("_bg-") && !/^_bg-0(hover|active|focus|press)/.test(c),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
describe("FZ-7944: frames that paint the elevated ground", () => {
|
|
38
|
+
it("an unnested Panel and elevated Card step the dark wash up", () => {
|
|
39
|
+
darkRender(
|
|
40
|
+
<>
|
|
41
|
+
<Panel>
|
|
42
|
+
<Button>InPanel</Button>
|
|
43
|
+
</Panel>
|
|
44
|
+
<Card tier="elevated">
|
|
45
|
+
<Button>InElevatedCard</Button>
|
|
46
|
+
</Card>
|
|
47
|
+
<Card>
|
|
48
|
+
<Button>InContentCard</Button>
|
|
49
|
+
</Card>
|
|
50
|
+
</>,
|
|
51
|
+
);
|
|
52
|
+
expect(restFill("InPanel")).toEqual(["_bg-color5"]);
|
|
53
|
+
expect(restFill("InElevatedCard")).toEqual(["_bg-color5"]);
|
|
54
|
+
expect(restFill("InContentCard")).toEqual(["_bg-color4"]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("nested under a painted parent they paint no tint and keep the content wash", () => {
|
|
58
|
+
darkRender(
|
|
59
|
+
<Card>
|
|
60
|
+
<Panel>
|
|
61
|
+
<Button>NestedPanel</Button>
|
|
62
|
+
</Panel>
|
|
63
|
+
<Card tier="elevated">
|
|
64
|
+
<Button>NestedElevatedCard</Button>
|
|
65
|
+
</Card>
|
|
66
|
+
</Card>,
|
|
67
|
+
);
|
|
68
|
+
expect(restFill("NestedPanel")).toEqual(["_bg-color4"]);
|
|
69
|
+
expect(restFill("NestedElevatedCard")).toEqual(["_bg-color4"]);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
2
2
|
import { DescriptionList } from "@multiplatform.one/forms";
|
|
3
3
|
import {
|
|
4
|
+
ArrowClockwiseIcon,
|
|
4
5
|
ArrowsClockwiseIcon,
|
|
5
6
|
BuildingsIcon,
|
|
6
7
|
CubeIcon,
|
|
7
8
|
HardDrivesIcon,
|
|
8
9
|
PackageIcon,
|
|
9
10
|
StackIcon,
|
|
11
|
+
StopIcon,
|
|
10
12
|
TagIcon,
|
|
11
13
|
TreeStructureIcon,
|
|
12
14
|
} from "@phosphor-icons/react";
|
|
13
15
|
import { useState } from "react";
|
|
14
16
|
import { YStack } from "tamagui";
|
|
17
|
+
import { DangerSection } from "../actions/DangerSection";
|
|
18
|
+
import { DestructiveAction } from "../actions/DestructiveAction";
|
|
19
|
+
import { HeaderActions } from "../actions/HeaderActions";
|
|
15
20
|
import { Avatar } from "../Avatar";
|
|
16
21
|
import { Card } from "../Card";
|
|
17
22
|
import { SheetModal } from "../SheetModal";
|
|
@@ -68,10 +73,13 @@ export const Main: Story = {
|
|
|
68
73
|
|
|
69
74
|
const image = "registry.selfhostedcloud.org/shc/keycloak:26.6.1@sha256:9f2c41a7e0b3";
|
|
70
75
|
|
|
76
|
+
const noop = () => {};
|
|
77
|
+
|
|
71
78
|
/**
|
|
72
79
|
* The SHC stack sheet without its Overview tab. Clay on round 2: "I told you
|
|
73
80
|
* no overview section". The facts the Overview held ride the plate, and the
|
|
74
|
-
* first tab is the stack's services.
|
|
81
|
+
* first tab is the stack's services. Stop and Restart are icon buttons in the
|
|
82
|
+
* header and Uninstall sits in the Danger section at the end (LC-262).
|
|
75
83
|
*/
|
|
76
84
|
function StackSheet() {
|
|
77
85
|
const [open, setOpen] = useState(true);
|
|
@@ -89,6 +97,14 @@ function StackSheet() {
|
|
|
89
97
|
facts={facts}
|
|
90
98
|
/>
|
|
91
99
|
}
|
|
100
|
+
headerActions={
|
|
101
|
+
<HeaderActions
|
|
102
|
+
actions={[
|
|
103
|
+
{ icon: StopIcon, label: "Stop", onPress: noop },
|
|
104
|
+
{ icon: ArrowClockwiseIcon, label: "Restart", onPress: noop },
|
|
105
|
+
]}
|
|
106
|
+
/>
|
|
107
|
+
}
|
|
92
108
|
>
|
|
93
109
|
<Tabs
|
|
94
110
|
defaultValue="services"
|
|
@@ -138,6 +154,9 @@ function StackSheet() {
|
|
|
138
154
|
},
|
|
139
155
|
]}
|
|
140
156
|
/>
|
|
157
|
+
<DangerSection>
|
|
158
|
+
<DestructiveAction verb="Uninstall" noun="keycloak" severity="medium" onAction={noop} />
|
|
159
|
+
</DangerSection>
|
|
141
160
|
</SheetModal>
|
|
142
161
|
</YStack>
|
|
143
162
|
);
|
|
@@ -93,6 +93,48 @@ Empty.parameters = {
|
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
+
const manyTags: TagItem[] = [
|
|
97
|
+
"engineering",
|
|
98
|
+
"beta-tester",
|
|
99
|
+
"admin",
|
|
100
|
+
"design",
|
|
101
|
+
"ops",
|
|
102
|
+
"frontend",
|
|
103
|
+
"backend",
|
|
104
|
+
"mobile",
|
|
105
|
+
"release",
|
|
106
|
+
"security",
|
|
107
|
+
"billing",
|
|
108
|
+
"support",
|
|
109
|
+
"analytics",
|
|
110
|
+
"growth",
|
|
111
|
+
"onboarding",
|
|
112
|
+
"infrastructure",
|
|
113
|
+
"documentation",
|
|
114
|
+
"qa",
|
|
115
|
+
"research",
|
|
116
|
+
"partners",
|
|
117
|
+
].map((label) => ({ id: label, label }));
|
|
118
|
+
|
|
119
|
+
export const Counts = () => (
|
|
120
|
+
<YStack gap="$6" width="100%">
|
|
121
|
+
{[1, 5, 20].map((count) => (
|
|
122
|
+
<YStack key={count} gap="$2" data-tags-count={count}>
|
|
123
|
+
<Text fontWeight="600">{`${count} ${count === 1 ? "tag" : "tags"}`}</Text>
|
|
124
|
+
<TagsPlayground initialTags={manyTags.slice(0, count)} />
|
|
125
|
+
</YStack>
|
|
126
|
+
))}
|
|
127
|
+
</YStack>
|
|
128
|
+
);
|
|
129
|
+
Counts.parameters = {
|
|
130
|
+
docs: {
|
|
131
|
+
description: {
|
|
132
|
+
story:
|
|
133
|
+
"One, five and twenty tags. The add trigger and input follow the last chip and wrap to the next line when the row is full.",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
|
|
96
138
|
export const AllStates = () => (
|
|
97
139
|
<YStack gap="$6" width="100%" maxWidth={480}>
|
|
98
140
|
<YStack gap="$2">
|
package/src/layouts/page.tsx
CHANGED
|
@@ -722,6 +722,8 @@ export function PageBarButton(props: PageBarButtonProps) {
|
|
|
722
722
|
const control = useTopBarControl();
|
|
723
723
|
return <Button {...control} data-top-bar-control="action" {...props} />;
|
|
724
724
|
}
|
|
725
|
+
// A menu opened from it is attached with no echo row (LC-262).
|
|
726
|
+
PageBarButton.iconOnly = true;
|
|
725
727
|
|
|
726
728
|
/**
|
|
727
729
|
* The page's "…" overflow trigger: the bar's icon-action recipe. Pass
|
|
@@ -738,3 +740,4 @@ export function PageMenuButton(props: Omit<ButtonProps, "children" | "icon">) {
|
|
|
738
740
|
/>
|
|
739
741
|
);
|
|
740
742
|
}
|
|
743
|
+
PageMenuButton.iconOnly = true;
|
|
@@ -129,6 +129,12 @@ describe("Tags Add Tag trigger (chip-scale)", () => {
|
|
|
129
129
|
expect(getComputedStyle(screen.getByText("urgent")).lineHeight).toBe("21px");
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
+
it("trigger wrapper is not a Tamagui group, whose web container query collapses its width (FZ-8018)", () => {
|
|
133
|
+
renderTags();
|
|
134
|
+
const trigger = screen.getByLabelText("Add Tag");
|
|
135
|
+
expect(classesByPrefix(trigger, ["t_group_"])).toEqual([]);
|
|
136
|
+
});
|
|
137
|
+
|
|
132
138
|
it("clicking the trigger opens the add-tag panel", async () => {
|
|
133
139
|
renderTags();
|
|
134
140
|
fireEvent.click(screen.getByLabelText("Add Tag"));
|
package/src/layouts/tags.tsx
CHANGED
|
@@ -181,6 +181,7 @@ export function Tags({
|
|
|
181
181
|
const [inputValue, setInputValue] = useState("");
|
|
182
182
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
183
183
|
const [addKbFocus, setAddKbFocus] = useState(false);
|
|
184
|
+
const [addPressed, setAddPressed] = useState(false);
|
|
184
185
|
const [activeIndex, setActiveIndex] = useState(-1);
|
|
185
186
|
const [kbNav, setKbNav] = useState(false);
|
|
186
187
|
|
|
@@ -557,7 +558,6 @@ export function Tags({
|
|
|
557
558
|
{canAdd && (
|
|
558
559
|
<Popover.Trigger asChild>
|
|
559
560
|
<AddTagTarget
|
|
560
|
-
group={"addTag" as unknown as undefined}
|
|
561
561
|
role="button"
|
|
562
562
|
aria-label={addTagLabel}
|
|
563
563
|
tabIndex={0}
|
|
@@ -576,6 +576,8 @@ export function Tags({
|
|
|
576
576
|
e.stopPropagation?.();
|
|
577
577
|
openAdd();
|
|
578
578
|
}}
|
|
579
|
+
onPressIn={() => setAddPressed(true)}
|
|
580
|
+
onPressOut={() => setAddPressed(false)}
|
|
579
581
|
onFocus={() => {
|
|
580
582
|
if (wasKeyboardFocus()) setAddKbFocus(true);
|
|
581
583
|
}}
|
|
@@ -593,14 +595,13 @@ export function Tags({
|
|
|
593
595
|
size={chipSize}
|
|
594
596
|
{...chipFrameGeometry(chipSize)}
|
|
595
597
|
variant="outline"
|
|
596
|
-
backgroundColor="transparent"
|
|
598
|
+
backgroundColor={addPressed ? componentColors.interactive.active : "transparent"}
|
|
597
599
|
{...knobProps.borderRadius}
|
|
598
600
|
borderColor={componentColors.interactive.border}
|
|
599
601
|
gap={small ? 0 : "$1"}
|
|
600
|
-
hoverStyle={
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}}
|
|
602
|
+
hoverStyle={
|
|
603
|
+
addPressed ? undefined : { backgroundColor: componentColors.interactive.hover }
|
|
604
|
+
}
|
|
604
605
|
{...(addKbFocus ? ensureFocusVisibleRing() : { outlineWidth: 0 })}
|
|
605
606
|
>
|
|
606
607
|
<PlusIcon size={chipIconSize(chipSize)} />
|
package/src/surfaces.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { withOverlayStack } from "@multiplatform.one/forms";
|
|
|
2
2
|
import {
|
|
3
3
|
transitionProps,
|
|
4
4
|
Surface,
|
|
5
|
+
SurfaceContext,
|
|
5
6
|
DialogContent,
|
|
6
7
|
PopoverContent as ThemePopoverContent,
|
|
7
8
|
useResolvedKnobs,
|
|
@@ -108,6 +109,7 @@ export const Panel = forwardRef<TamaguiElement, PanelProps>(function Panel(
|
|
|
108
109
|
ref,
|
|
109
110
|
) {
|
|
110
111
|
const { knobProps } = useResolvedKnobs({ component: "Panel", size });
|
|
112
|
+
const parentPainted = SurfaceContext.useStyledContext().painted ?? false;
|
|
111
113
|
const viewProps = {
|
|
112
114
|
ref,
|
|
113
115
|
...knobProps.elevatedSurface,
|
|
@@ -118,7 +120,7 @@ export const Panel = forwardRef<TamaguiElement, PanelProps>(function Panel(
|
|
|
118
120
|
};
|
|
119
121
|
return (
|
|
120
122
|
<View {...viewProps}>
|
|
121
|
-
<Surface size={size} painted>
|
|
123
|
+
<Surface size={size} painted elevated={!parentPainted}>
|
|
122
124
|
{children}
|
|
123
125
|
</Surface>
|
|
124
126
|
</View>
|
package/types/Card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAEL,KAAK,SAAS,IAAI,gBAAgB,EAClC,KAAK,UAAU,EAEhB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC/D,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAoBpD,iBAAS,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAgB,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CA2C1E;AAWD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAElC,eAAO,MAAM,IAAI;;;CAGf,CAAC"}
|
|
@@ -81,6 +81,11 @@ declare const ItemRow: import("tamagui").TamaguiComponent<import("@tamagui/web")
|
|
|
81
81
|
selected?: boolean | undefined;
|
|
82
82
|
}, import("@tamagui/web").StaticConfigPublic>;
|
|
83
83
|
declare const SeparatorLine: import("tamagui").TamaguiComponent<import("@tamagui/web").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
|
|
84
|
+
/**
|
|
85
|
+
* A trigger that shows only a glyph: an `icon` and no label children, or a
|
|
86
|
+
* component marked `iconOnly` (PageMenuButton, PageBarButton).
|
|
87
|
+
*/
|
|
88
|
+
export declare function isIconTrigger(trigger: ReactNode): boolean;
|
|
84
89
|
declare function DropdownMenuRoot({ children, items, open: openProp, defaultOpen, onOpenChange, placement, maxHeight, closeOnSelect, size, triggerSizing, anchorMode, triggerRow, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
85
90
|
export interface DropdownMenuTriggerProps {
|
|
86
91
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The sheet's header row: what the sheet is about, and its frequent actions as
|
|
4
|
+
* icon buttons in the trailing area (LC-262 DIRECT-ACTIONS), never hidden in a
|
|
5
|
+
* menu.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SheetHeader({ header, actions, titleId, }: {
|
|
8
|
+
header?: ReactNode;
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
/** Names the sheet: on the header content alone, so the actions stay out of it. */
|
|
11
|
+
titleId?: string;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=SheetHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SheetHeader.d.ts","sourceRoot":"","sources":["../../src/SheetModal/SheetHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,OAAO,EACP,OAAO,GACR,EAAE;IACD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,2CAYA"}
|
|
@@ -15,6 +15,12 @@ export interface SheetModalProps {
|
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
/** Fixed content above the (scrollable) body, e.g. the sheet title. */
|
|
17
17
|
header?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The sheet's frequent actions, as icon buttons in the header's trailing
|
|
20
|
+
* area (LC-262 DIRECT-ACTIONS): `HeaderActions`. Destructive actions go in a
|
|
21
|
+
* `DangerSection` at the end of the body instead.
|
|
22
|
+
*/
|
|
23
|
+
headerActions?: ReactNode;
|
|
18
24
|
/**
|
|
19
25
|
* Percent snap point. Web: the Sheet's snap point. Native: a drag detent.
|
|
20
26
|
* Omitted: the sheet opens at its content's height, capped at the large
|
|
@@ -32,5 +38,5 @@ export interface SheetModalProps {
|
|
|
32
38
|
*/
|
|
33
39
|
fill?: boolean;
|
|
34
40
|
}
|
|
35
|
-
export declare function SheetModal({ open, onOpenChange, children, header, snapPoint, scrollable, fill, }: SheetModalProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function SheetModal({ open, onOpenChange, children, header: headerContent, headerActions, snapPoint, scrollable, fill, }: SheetModalProps): import("react/jsx-runtime").JSX.Element;
|
|
36
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SheetModal/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SheetModal/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOjE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkCD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EAAE,aAAa,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,IAAY,GACb,EAAE,eAAe,2CA8FjB"}
|