@hjmds/react 1.33.2 → 1.35.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.
Files changed (137) hide show
  1. package/dist/actions.d.ts +23 -2
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/actions.js +61 -6
  4. package/dist/actions.js.map +1 -1
  5. package/dist/advanced-display.d.ts +35 -2
  6. package/dist/advanced-display.d.ts.map +1 -1
  7. package/dist/advanced-display.js +28 -9
  8. package/dist/advanced-display.js.map +1 -1
  9. package/dist/anchor.d.ts +3 -1
  10. package/dist/anchor.d.ts.map +1 -1
  11. package/dist/anchor.js +5 -5
  12. package/dist/anchor.js.map +1 -1
  13. package/dist/auth-screen.d.ts.map +1 -1
  14. package/dist/auth-screen.js +5 -2
  15. package/dist/auth-screen.js.map +1 -1
  16. package/dist/avatar-blobatar-motion.d.ts.map +1 -1
  17. package/dist/avatar-blobatar-motion.js +2 -1
  18. package/dist/avatar-blobatar-motion.js.map +1 -1
  19. package/dist/avatar-blobatar.d.ts.map +1 -1
  20. package/dist/avatar-blobatar.js +2 -1
  21. package/dist/avatar-blobatar.js.map +1 -1
  22. package/dist/bottom-cta.d.ts +8 -1
  23. package/dist/bottom-cta.d.ts.map +1 -1
  24. package/dist/bottom-cta.js +6 -2
  25. package/dist/bottom-cta.js.map +1 -1
  26. package/dist/carousel-motion.d.ts.map +1 -1
  27. package/dist/carousel-motion.js +11 -2
  28. package/dist/carousel-motion.js.map +1 -1
  29. package/dist/carousel.d.ts +10 -0
  30. package/dist/carousel.d.ts.map +1 -1
  31. package/dist/carousel.js +23 -7
  32. package/dist/carousel.js.map +1 -1
  33. package/dist/collapsible.d.ts +6 -0
  34. package/dist/collapsible.d.ts.map +1 -1
  35. package/dist/collapsible.js +22 -20
  36. package/dist/collapsible.js.map +1 -1
  37. package/dist/collection-rail.d.ts +4 -4
  38. package/dist/collection-rail.d.ts.map +1 -1
  39. package/dist/collection-rail.js.map +1 -1
  40. package/dist/conversation-row.d.ts.map +1 -1
  41. package/dist/conversation-row.js +4 -1
  42. package/dist/conversation-row.js.map +1 -1
  43. package/dist/data-table.d.ts +2 -0
  44. package/dist/data-table.d.ts.map +1 -1
  45. package/dist/data-table.js +2 -2
  46. package/dist/data-table.js.map +1 -1
  47. package/dist/display.d.ts +60 -3
  48. package/dist/display.d.ts.map +1 -1
  49. package/dist/display.js +33 -10
  50. package/dist/display.js.map +1 -1
  51. package/dist/evidence.d.ts +1 -1
  52. package/dist/evidence.d.ts.map +1 -1
  53. package/dist/evidence.js +2 -1
  54. package/dist/evidence.js.map +1 -1
  55. package/dist/feedback.d.ts +5 -0
  56. package/dist/feedback.d.ts.map +1 -1
  57. package/dist/feedback.js +7 -5
  58. package/dist/feedback.js.map +1 -1
  59. package/dist/floating-action-button.js +1 -1
  60. package/dist/floating-action-button.js.map +1 -1
  61. package/dist/forms.d.ts.map +1 -1
  62. package/dist/forms.js +4 -4
  63. package/dist/forms.js.map +1 -1
  64. package/dist/image-choice.js +3 -3
  65. package/dist/image-choice.js.map +1 -1
  66. package/dist/index.d.ts +5 -4
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +5 -4
  69. package/dist/index.js.map +1 -1
  70. package/dist/internal/initial-focus.d.ts +6 -0
  71. package/dist/internal/initial-focus.d.ts.map +1 -1
  72. package/dist/internal/initial-focus.js +6 -0
  73. package/dist/internal/initial-focus.js.map +1 -1
  74. package/dist/internal/pending-content.d.ts +19 -0
  75. package/dist/internal/pending-content.d.ts.map +1 -0
  76. package/dist/internal/pending-content.js +34 -0
  77. package/dist/internal/pending-content.js.map +1 -0
  78. package/dist/internal/screen-footer.d.ts +4 -2
  79. package/dist/internal/screen-footer.d.ts.map +1 -1
  80. package/dist/internal/screen-footer.js +2 -2
  81. package/dist/internal/screen-footer.js.map +1 -1
  82. package/dist/internal.d.ts +9 -1
  83. package/dist/internal.d.ts.map +1 -1
  84. package/dist/internal.js +4 -0
  85. package/dist/internal.js.map +1 -1
  86. package/dist/navigation.d.ts.map +1 -1
  87. package/dist/navigation.js +58 -4
  88. package/dist/navigation.js.map +1 -1
  89. package/dist/number-field.d.ts.map +1 -1
  90. package/dist/number-field.js +4 -3
  91. package/dist/number-field.js.map +1 -1
  92. package/dist/overlays.d.ts +4 -0
  93. package/dist/overlays.d.ts.map +1 -1
  94. package/dist/overlays.js +46 -18
  95. package/dist/overlays.js.map +1 -1
  96. package/dist/public-exports.generated.d.ts +6 -0
  97. package/dist/public-exports.generated.d.ts.map +1 -1
  98. package/dist/public-exports.generated.js +18 -0
  99. package/dist/public-exports.generated.js.map +1 -1
  100. package/dist/screen-flows.d.ts +13 -6
  101. package/dist/screen-flows.d.ts.map +1 -1
  102. package/dist/screen-flows.js +26 -15
  103. package/dist/screen-flows.js.map +1 -1
  104. package/dist/screens.d.ts +19 -6
  105. package/dist/screens.d.ts.map +1 -1
  106. package/dist/screens.js +22 -11
  107. package/dist/screens.js.map +1 -1
  108. package/dist/selection.d.ts +22 -0
  109. package/dist/selection.d.ts.map +1 -1
  110. package/dist/selection.js +32 -9
  111. package/dist/selection.js.map +1 -1
  112. package/dist/shortcut-rail.d.ts +27 -0
  113. package/dist/shortcut-rail.d.ts.map +1 -0
  114. package/dist/shortcut-rail.js +37 -0
  115. package/dist/shortcut-rail.js.map +1 -0
  116. package/dist/steps.d.ts +5 -2
  117. package/dist/steps.d.ts.map +1 -1
  118. package/dist/steps.js +3 -3
  119. package/dist/steps.js.map +1 -1
  120. package/dist/styles.css +242 -61
  121. package/dist/styles.layered.css +242 -61
  122. package/dist/task-list.d.ts +3 -1
  123. package/dist/task-list.d.ts.map +1 -1
  124. package/dist/task-list.js +2 -2
  125. package/dist/task-list.js.map +1 -1
  126. package/dist/theme.d.ts.map +1 -1
  127. package/dist/theme.js +1 -0
  128. package/dist/theme.js.map +1 -1
  129. package/dist/time-picker.d.ts +9 -0
  130. package/dist/time-picker.d.ts.map +1 -0
  131. package/dist/time-picker.js +74 -0
  132. package/dist/time-picker.js.map +1 -0
  133. package/dist/top-bar.d.ts +4 -0
  134. package/dist/top-bar.d.ts.map +1 -1
  135. package/dist/top-bar.js +2 -2
  136. package/dist/top-bar.js.map +1 -1
  137. package/package.json +26 -15
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,GAIZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAoB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EACL,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,cAAc,GAwBf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM,EACN,UAAU,EACV,IAAI,GAYL,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,GAUV,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,IAAI,EAMJ,YAAY,GAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,MAAM,GAMP,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,GAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,MAAM,GAEP,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,GAGX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,UAAU,GAEX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,MAAM,GAaP,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,QAAQ,EACR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c,EAAE,gBAAgB,EAA+G,MAAM,kBAAkB,CAAC;AACnM,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAyB,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,WAAW,EAA+C,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAyC,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n HjmProvider,\n useHjmTheme,\n type HjmBrandPalette,\n type HjmProviderHost,\n type HjmProviderProps,\n} from \"./provider.js\";\n\nexport { TopBar, type TopBarProps } from \"./top-bar.js\";\nexport { BottomCTA, type BottomCTAAction, type BottomCTAProps } from \"./bottom-cta.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n IconButton,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport { Breadcrumb, type BreadcrumbProps } from \"./breadcrumb.js\";\nexport { Pagination, type PaginationProps } from \"./pagination.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n BottomNavigationInsetProvider,\n useBottomNavigationInset,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationInsetProviderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n AvatarGroup,\n type AvatarGroupProps,\n DescriptionList,\n Divider,\n List,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n ImmersiveOverlay,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type ImmersiveOverlayOpenChangeReason,\n type ImmersiveOverlayProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type SheetSize,\n type TooltipProps,\n} from \"./overlays.js\";\n\nexport { Carousel, PageIndicator, type CarouselProps, type CarouselLabels, type PageIndicatorProps } from \"./carousel.js\";\n\nexport { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance, type FloatingActionButtonProps } from \"./floating-action-button.js\";\n\nexport { Calendar, type CalendarProps, type CalendarMonthAction, type CalendarHandle, type CalendarOverflow } from \"./calendar.js\";\n\nexport { Anchor, type AnchorProps } from \"./anchor.js\";\n\nexport { Popover, type PopoverProps, type PopoverContentActions } from \"./popover.js\";\nexport { SidePanel, type SidePanelProps } from \"./side-panel.js\";\nexport { Splitter, type SplitterProps } from \"./splitter.js\";\nexport { Tour, type TourProps } from \"./tour.js\";\nexport { Tree, type TreeProps } from \"./tree.js\";\nexport { TransferList, type TransferListProps, type TransferListLabels } from \"./transfer-list.js\";\nexport { Mentions, type MentionsProps, type MentionCandidate } from \"./mentions.js\";\nexport { CommandPalette, type CommandPaletteProps } from \"./command-palette.js\";\nexport { Agreement, type AgreementProps } from \"./agreement.js\";\nexport { Top, type TopProps } from \"./top.js\";\nexport { Heading, type HeadingProps } from \"./heading.js\";\nexport { TextFormat, type TextFormatProps } from \"./text-formats.js\";\nexport { ClipboardButton, ClipboardIconButton, type ClipboardButtonProps, type ClipboardIconButtonProps } from \"./clipboard.js\";\nexport { ToggleGroup, type ToggleGroupProps } from \"./toggle-group.js\";\nexport { TagsInput, type TagsInputProps } from \"./tags-input.js\";\nexport { SkipNav, type SkipNavProps } from \"./skip-nav.js\";\nexport { BottomInfo, type BottomInfoProps } from \"./bottom-info.js\";\nexport { Sidebar, type SidebarProps } from \"./sidebar.js\";\nexport { DateRangePicker, type DateRangePickerProps } from \"./date-range.js\";\nexport {\n OverlayStackProvider,\n useOverlayStack,\n useDialog,\n useSheet,\n type OverlayStackApi,\n type OverlayStackProviderProps,\n type OverlayHandle,\n} from \"./overlay-stack.js\";\nexport { AuthProviderButton, type AuthProviderButtonProps } from \"./provider-button.js\";\nexport { AuthScreenLayout, AuthScreenHero, AuthScreenFooter, type AuthScreenLayoutProps, type AuthScreenHeroProps, type AuthScreenFooterProps, type AuthScreenPolicyLink } from \"./auth-screen.js\";\nexport { DataTable, type DataTableProps, type DataTableLabels } from \"./data-table.js\";\nexport { Collapsible, CollapsibleMarker, type CollapsibleProps } from \"./collapsible.js\";\nexport { ContextMenu, type ContextMenuItem, type ContextMenuProps } from \"./context-menu.js\";\nexport { Menubar, type MenubarProps } from \"./menubar.js\";\nexport { Asset, AssetGroup, type AssetProps, type AssetGroupProps } from \"./asset.js\";\n\nexport { StatusText, type StatusTextProps } from \"./status-text.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,GAIZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAoB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EACL,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,cAAc,GAwBf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM,EACN,UAAU,EAEV,UAAU,EACV,IAAI,GAaL,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,GAUV,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,IAAI,EAMJ,YAAY,GAGb,MAA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B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAuB,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAqB,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAA6B,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,QAAQ,GAIT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAgC,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAA+G,MAAM,kBAAkB,CAAC;AACnM,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAyB,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,WAAW,EAA+C,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAyC,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n HjmProvider,\n useHjmTheme,\n type HjmBrandPalette,\n type HjmProviderHost,\n type HjmProviderProps,\n} from \"./provider.js\";\n\nexport { TopBar, type TopBarProps } from \"./top-bar.js\";\nexport { BottomCTA, type BottomCTAAction, type BottomCTAProps } from \"./bottom-cta.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n ButtonLink,\n type ButtonLinkProps,\n IconButton,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonAppearance,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport { Breadcrumb, type BreadcrumbProps } from \"./breadcrumb.js\";\nexport { Pagination, type PaginationProps } from \"./pagination.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n BottomNavigationInsetProvider,\n useBottomNavigationInset,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationInsetProviderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n QuoteCard,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type QuoteCardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n AvatarGroup,\n type AvatarGroupProps,\n DescriptionList,\n Divider,\n List,\n ListSeparator,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type ListSeparatorProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n PendingContent,\n type PendingContentProps,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n ImmersiveOverlay,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type ImmersiveOverlayOpenChangeReason,\n type ImmersiveOverlayProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type SheetSize,\n type TooltipProps,\n} from \"./overlays.js\";\n\nexport { Carousel, PageIndicator, type CarouselProps, type CarouselLabels, type PageIndicatorProps } from \"./carousel.js\";\n\nexport { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance, type FloatingActionButtonProps } from \"./floating-action-button.js\";\n\nexport { Calendar, type CalendarProps, type CalendarMonthAction, type CalendarHandle, type CalendarOverflow } from \"./calendar.js\";\n\nexport { Anchor, type AnchorProps } from \"./anchor.js\";\n\nexport { Popover, type PopoverProps, type PopoverContentActions } from \"./popover.js\";\nexport { SidePanel, type SidePanelProps } from \"./side-panel.js\";\nexport { Splitter, type SplitterProps } from \"./splitter.js\";\nexport { Tour, type TourProps } from \"./tour.js\";\nexport { Tree, type TreeProps } from \"./tree.js\";\nexport { TransferList, type TransferListProps, type TransferListLabels } from \"./transfer-list.js\";\nexport { Mentions, type MentionsProps, type MentionCandidate } from \"./mentions.js\";\nexport { CommandPalette, type CommandPaletteProps } from \"./command-palette.js\";\nexport { Agreement, type AgreementProps } from \"./agreement.js\";\nexport { Top, type TopProps } from \"./top.js\";\nexport { Heading, type HeadingProps } from \"./heading.js\";\nexport { TextFormat, type TextFormatProps } from \"./text-formats.js\";\nexport { ClipboardButton, ClipboardIconButton, type ClipboardButtonProps, type ClipboardIconButtonProps } from \"./clipboard.js\";\nexport { ToggleGroup, type ToggleGroupProps } from \"./toggle-group.js\";\nexport { TagsInput, type TagsInputProps } from \"./tags-input.js\";\nexport { SkipNav, type SkipNavProps } from \"./skip-nav.js\";\nexport { BottomInfo, type BottomInfoProps } from \"./bottom-info.js\";\nexport { Sidebar, type SidebarProps } from \"./sidebar.js\";\nexport { DateRangePicker, type DateRangePickerProps } from \"./date-range.js\";\nexport {\n OverlayStackProvider,\n useOverlayStack,\n useDialog,\n useSheet,\n type OverlayStackApi,\n type OverlayStackProviderProps,\n type OverlayHandle,\n} from \"./overlay-stack.js\";\nexport { AuthProviderButton, type AuthProviderButtonProps } from \"./provider-button.js\";\nexport { AuthScreenLayout, AuthScreenHero, AuthScreenFooter, type AuthScreenLayoutProps, type AuthScreenHeroProps, type AuthScreenFooterProps, type AuthScreenPolicyLink } from \"./auth-screen.js\";\nexport { DataTable, type DataTableProps, type DataTableLabels } from \"./data-table.js\";\nexport { Collapsible, CollapsibleMarker, type CollapsibleProps } from \"./collapsible.js\";\nexport { ContextMenu, type ContextMenuItem, type ContextMenuProps } from \"./context-menu.js\";\nexport { Menubar, type MenubarProps } from \"./menubar.js\";\nexport { Asset, AssetGroup, type AssetProps, type AssetGroupProps } from \"./asset.js\";\n\nexport { StatusText, type StatusTextProps } from \"./status-text.js\";\n\nexport { TimePicker, type TimePickerProps } from \"./time-picker.js\";\n"]}
@@ -46,5 +46,11 @@ export declare function InitialFocusScope({ mode, children }: {
46
46
  }): import("react").JSX.Element;
47
47
  /** Registers a text field with the nearest scope. `preference` is the field's public `initialFocusTarget`. */
48
48
  export declare function useInitialFocusTarget(element: RefObject<HTMLElement | null>, preference: boolean | undefined): void;
49
+ /** Page footer inputs are bottom-anchored, so entry must not open their keyboard (2026-10-18 user request).
50
+ * Keep the boundary through nested screens; a separately opened overlay owns its own focus policy.
51
+ */
52
+ export declare function BottomEntryFocusBoundary({ children }: {
53
+ children: ReactNode;
54
+ }): import("react").JSX.Element;
49
55
  export {};
50
56
  //# sourceMappingURL=initial-focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"initial-focus.d.ts","sourceRoot":"","sources":["../../src/internal/initial-focus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6F,KAAK,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3K,OAAO,EAA0E,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/H,OAAO,EAAoC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,OAAO,IAAI,WAAW,GAAG,IAAI,CAAC;IAAC,SAAS,IAAI,OAAO,CAAA;CAAE,CAAC;AACrH,KAAK,QAAQ,GAAG;IAAE,SAAS,IAAI,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,IAAI,CAAA;CAAE,CAAC;AAC9F,qGAAqG;AACrG,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,CAAC;AAoC5D,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,aAAa,GAAG,IAA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,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,QAe5G;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAE7E"}
@@ -188,4 +188,10 @@ export function useInitialFocusTarget(element, preference) {
188
188
  }, mounted);
189
189
  }, [registry, preference, element]);
190
190
  }
191
+ /** Page footer inputs are bottom-anchored, so entry must not open their keyboard (2026-10-18 user request).
192
+ * Keep the boundary through nested screens; a separately opened overlay owns its own focus policy.
193
+ */
194
+ export function BottomEntryFocusBoundary({ children }) {
195
+ return _jsx(EntryFocusEnabledContext.Provider, { value: false, children: _jsx(InitialFocusContext.Provider, { value: null, children: children }) });
196
+ }
191
197
  //# sourceMappingURL=initial-focus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"initial-focus.js","sourceRoot":"","sources":["../../src/internal/initial-focus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAiG,MAAM,yCAAyC,CAAC;AAC3K,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAkC,MAAM,OAAO,CAAC;AAC/H,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAoB,MAAM,aAAa,CAAC;AAOjF;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,aAAa,CAAkB,IAAI,CAAC,CAAC;AACjE,kGAAkG;AAClG,MAAM,wBAAwB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;AACrD,mHAAmH;AACnH,MAAM,iBAAiB,GAAG,aAAa,CAAuB,IAAI,CAAC,CAAC;AAGpE;;;;GAIG;AACH,MAAM,YAAY,GAAG,IAAI,OAAO,EAAmC,CAAC;AAEpE;;;GAGG;AACH,SAAS,iBAAiB,CAAC,MAA8B;IACvD,OAAO,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAA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AgH;IAChH,MAAM,KAAK,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC1C,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,QAAQ;YAAE,OAAO,SAAS,CAAC;QAChC,iHAAiH;QACjH,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC;QACvC,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC;QACvC,OAAO,QAAQ,CAAC,QAAQ,CAAC;YACvB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO;YAChE,4DAA4D;YAC5D,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,GAAG,OAAO,CAAC,OAA0D,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;SACzJ,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import { resolveEntryFocus, type EntryFocusEvent, type EntryFocusPhase, type InitialFocusCandidate, type InitialFocusMode } from \"@hjmds/design-contracts/screen-patterns\";\nimport { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef, type ReactNode, type RefObject } from \"react\";\nimport { getTopModal, subscribeModalClose, type ActiveModal } from \"../modal.js\";\n\ntype Entry = { order: number; preference: boolean | undefined; element(): HTMLElement | null; focusable(): boolean };\ntype Registry = { nextOrder(): number; register(entry: Entry, mounted: boolean): () => void };\n/** The overlay's own entry on the shared modal stack while it is active (set by `useModalFocus`). */\nexport type ModalLayerRef = { current: ActiveModal | null };\n\n/**\n * Nearest screen/overlay scope that chooses the field focused on entry (rules: screen-patterns `resolveEntryFocus`,\n * shared with Native). Fields register by context, the same model as Native, instead of the scope querying the DOM; a\n * scope with mode \"none\" still owns its fields so they never reach an outer scope.\n */\nconst InitialFocusContext = createContext<Registry | null>(null);\n// A bottom sheet owns this boundary, including ScreenLayout/marked fields nested inside its body.\nconst EntryFocusEnabledContext = createContext(true);\n/** Layer of the enclosing HJM overlay; null on the page itself. A ScreenLayout inside a sheet uses the sheet's. */\nconst ModalLayerContext = createContext<ModalLayerRef | null>(null);\n\ntype NestedScope = { enter(): HTMLElement | null; settle(): void };\n/**\n * Screen scopes rendered inside an HJM overlay, keyed by that overlay's layer. Their fields register with the screen,\n * not the overlay, so the overlay's activation asks them for the entry field instead of focusing its first control\n * over them (BurnTok search: a ScreenLayout in a Sheet left focus on the close button, 2026-10-18).\n */\nconst nestedScopes = new WeakMap<ModalLayerRef, Set<NestedScope>>();\n\n/**\n * Product modals (not on the HJM stack) layered above the scope. A product modal that contains the scope's own fields\n * wraps the screen rather than covering it, so it does not block (BurnTok search overlay, 2026-10-18).\n */\nfunction productModalAbove(fields: readonly HTMLElement[]): boolean {\n return [...document.querySelectorAll('[aria-modal=\"true\"], dialog[open]')]\n .some(modal => !fields.some(field => modal.contains(field)));\n}\n\nfunction isEditable(element: Element | null): boolean {\n return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement\n || (element instanceof HTMLElement && element.isContentEditable);\n}\n\ntype Candidate = InitialFocusCandidate & { entry: Entry };\nexport type InitialFocusScopeHandle = Readonly<{\n registry: Registry;\n layer: ModalLayerRef | null;\n enabled: boolean;\n /**\n * Overlays only: runs entry when the modal activates and returns the field for `useModalFocus` to focus. `explicit`\n * means the overlay already has an `initialFocusRef`, so entry settles without choosing a field.\n */\n enter(explicit: boolean): HTMLElement | null;\n}>;\n\n/**\n * Screen scopes enter on mount (Web has no enter transition to wait for); overlays pass `layer` and enter through\n * `useModalFocus`. User pointer, key, wheel or touch input while no modal is above the scope ends the entry window.\n */\nexport function useInitialFocusScope({ mode, active = true, layer: ownLayer, enabled = true }: { mode: InitialFocusMode; active?: boolean; layer?: ModalLayerRef; enabled?: boolean }): InitialFocusScopeHandle {\n const inherited = useContext(ModalLayerContext);\n const inheritedEnabled = useContext(EntryFocusEnabledContext);\n // A separate overlay owns its policy; ordinary nested screens inherit their enclosing sheet's policy.\n const entryFocusEnabled = enabled && (ownLayer !== undefined || inheritedEnabled);\n const enabledRef = useRef(entryFocusEnabled); enabledRef.current = entryFocusEnabled;\n const layer = ownLayer ?? inherited;\n const overlay = ownLayer !== undefined;\n const modeRef = useRef(mode); modeRef.current = mode;\n const state = useRef({ phase: \"inactive\" as EntryFocusPhase, entries: new Set<Entry>(), fresh: new Set<Entry>(), counter: 0, flushQueued: false });\n\n const scope = useMemo(() => {\n const s = state.current;\n const blocked = () => {\n const own = layer?.current ?? null;\n // Inside an HJM overlay that is not on the stack yet: its activation runs this scope's entry (`nestedScopes`).\n if (layer !== null && own === null) return true;\n const top = getTopModal();\n if (top) return top !== own;\n // A product's own modal above the page still covers it; overlay content is portaled outside product markup.\n if (layer !== null) return false;\n const fields = [...s.entries].map(entry => entry.element()).filter((element): element is HTMLElement => element !== null);\n return productModalAbove(fields);\n };\n const dispatch = (event: EntryFocusEvent<Candidate> | { kind: \"register\"; entry: Entry }): HTMLElement | null => {\n if (!enabledRef.current) return null;\n const candidates: Candidate[] = [...s.entries].map(entry => ({ entry, order: entry.order, preference: entry.preference, focusable: entry.focusable() }));\n const resolved = event.kind === \"register\" && \"entry\" in event\n ? { kind: \"register\" as const, field: candidates.find(candidate => candidate.entry === event.entry)! }\n : event as EntryFocusEvent<Candidate>;\n const result = resolveEntryFocus(s.phase, resolved, { mode: modeRef.current, candidates, blocked: blocked(), textEntryFocused: isEditable(document.activeElement) });\n s.phase = result.phase;\n return result.target?.entry.element() ?? null;\n };\n const focus = (target: HTMLElement | null) => target?.focus({ preventScroll: true });\n // Fields mounting in one commit are judged together.\n const flush = () => {\n s.flushQueued = false;\n const fresh = [...s.fresh].filter(entry => s.entries.has(entry)).sort((a, b) => a.order - b.order);\n s.fresh.clear();\n const field = fresh.find(entry => entry.preference === true) ?? fresh[0];\n if (field) focus(dispatch({ kind: \"register\", entry: field }));\n };\n const registry: Registry = {\n nextOrder: () => s.counter++,\n register(entry, mounted) {\n s.entries.add(entry);\n if (mounted) { s.fresh.add(entry); if (!s.flushQueued) { s.flushQueued = true; queueMicrotask(flush); } }\n return () => { s.entries.delete(entry); s.fresh.delete(entry); };\n },\n };\n const settle = () => { s.phase = \"settled\"; };\n const enter = (explicit: boolean) => {\n s.fresh.clear();\n const nested = overlay && layer ? [...(nestedScopes.get(layer) ?? [])] : [];\n if (explicit) { settle(); for (const scope of nested) scope.settle(); return null; }\n // A user can open a menu before the deferred entry runs. Never reset their settled entry window.\n if (s.phase === \"settled\") return null;\n if (s.phase === \"inactive\") dispatch({ kind: \"activate\" });\n const own = dispatch({ kind: s.phase === \"open\" ? \"unblock\" : \"enter\" });\n if (own) return own;\n for (const scope of nested) { const target = scope.enter(); if (target) return target; }\n return null;\n };\n return { registry, layer, dispatch, focus, enter, settle };\n }, [layer, overlay]);\n\n useEffect(() => {\n if (!active) { scope.dispatch({ kind: \"deactivate\" }); return undefined; }\n // Observe interaction immediately; deferring activation too would lose a click before the entry microtask.\n scope.dispatch({ kind: \"activate\" });\n // After every effect of this commit, so a modal opening in the same commit (an app-root consent dialog) is\n // already on the stack and blocks entry instead of taking focus away and handing it back later.\n let cancelled = false;\n if (!overlay) queueMicrotask(() => { if (!cancelled) scope.focus(scope.enter(false)); });\n // A screen inside an overlay that activates later enters when the overlay does (see `enter`).\n let nested: Set<NestedScope> | undefined;\n const nestedEntry: NestedScope = { enter: () => scope.enter(false), settle: scope.settle };\n if (!overlay && scope.layer) {\n nested = nestedScopes.get(scope.layer) ?? new Set();\n nestedScopes.set(scope.layer, nested);\n nested.add(nestedEntry);\n }\n const interact = () => { scope.dispatch({ kind: \"interact\" }); };\n const events = [\"pointerdown\", \"click\", \"contextmenu\", \"keydown\", \"wheel\", \"touchstart\"] as const;\n for (const type of events) document.addEventListener(type, interact, true);\n // A modal above closed (after its return focus ran): retry a pending entry.\n const unsubscribe = subscribeModalClose(() => scope.focus(scope.dispatch({ kind: \"unblock\" })));\n return () => {\n cancelled = true;\n nested?.delete(nestedEntry);\n for (const type of events) document.removeEventListener(type, interact, true);\n unsubscribe();\n scope.dispatch({ kind: \"deactivate\" });\n };\n }, [active, overlay, scope, entryFocusEnabled]);\n\n return useMemo(() => ({ registry: scope.registry, layer: scope.layer, enter: scope.enter, enabled: entryFocusEnabled }), [scope, entryFocusEnabled]);\n}\n\nexport function InitialFocusProvider({ scope, children }: { scope: InitialFocusScopeHandle; children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={scope.enabled}><ModalLayerContext.Provider value={scope.layer}><InitialFocusContext.Provider value={scope.registry}>{children}</InitialFocusContext.Provider></ModalLayerContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n\n/** Screen scope: focuses the chosen field on mount, never over a field the user is in or under an open modal. */\nexport function InitialFocusScope({ mode, children }: { mode: InitialFocusMode; children: ReactNode }) {\n const scope = useInitialFocusScope({ mode });\n return <InitialFocusProvider scope={scope}>{children}</InitialFocusProvider>;\n}\n\n/** Registers a text field with the nearest scope. `preference` is the field's public `initialFocusTarget`. */\nexport function useInitialFocusTarget(element: RefObject<HTMLElement | null>, preference: boolean | undefined) {\n const registry = useContext(InitialFocusContext);\n // Tree order is fixed at first registration, so changing `preference` later does not move the field to the end.\n const order = useRef<number | null>(null);\n useLayoutEffect(() => {\n if (!registry) return undefined;\n // Only the first registration of this field instance counts as \"appeared\"; a later `preference` change does not.\n const mounted = order.current === null;\n order.current ??= registry.nextOrder();\n return registry.register({\n order: order.current, preference, element: () => element.current,\n // Disabled and read-only fields are never focused on entry.\n focusable: () => { const node = element.current as (HTMLInputElement | HTMLTextAreaElement | null); return !!node && !node.disabled && !node.readOnly; },\n }, mounted);\n }, [registry, preference, element]);\n}\n"]}
1
+ {"version":3,"file":"initial-focus.js","sourceRoot":"","sources":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AAI,CAAC,QAAQ,CAAC,CAAC,CAAC;SACzJ,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,QAAQ,EAA2B;IAC5E,OAAO,KAAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAE,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAAG,QAAQ,GAAgC,GAAoC,CAAC;AACnL,CAAC","sourcesContent":["import { resolveEntryFocus, type EntryFocusEvent, type EntryFocusPhase, type InitialFocusCandidate, type InitialFocusMode } from \"@hjmds/design-contracts/screen-patterns\";\nimport { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef, type ReactNode, type RefObject } from \"react\";\nimport { getTopModal, subscribeModalClose, type ActiveModal } from \"../modal.js\";\n\ntype Entry = { order: number; preference: boolean | undefined; element(): HTMLElement | null; focusable(): boolean };\ntype Registry = { nextOrder(): number; register(entry: Entry, mounted: boolean): () => void };\n/** The overlay's own entry on the shared modal stack while it is active (set by `useModalFocus`). */\nexport type ModalLayerRef = { current: ActiveModal | null };\n\n/**\n * Nearest screen/overlay scope that chooses the field focused on entry (rules: screen-patterns `resolveEntryFocus`,\n * shared with Native). Fields register by context, the same model as Native, instead of the scope querying the DOM; a\n * scope with mode \"none\" still owns its fields so they never reach an outer scope.\n */\nconst InitialFocusContext = createContext<Registry | null>(null);\n// A bottom sheet owns this boundary, including ScreenLayout/marked fields nested inside its body.\nconst EntryFocusEnabledContext = createContext(true);\n/** Layer of the enclosing HJM overlay; null on the page itself. A ScreenLayout inside a sheet uses the sheet's. */\nconst ModalLayerContext = createContext<ModalLayerRef | null>(null);\n\ntype NestedScope = { enter(): HTMLElement | null; settle(): void };\n/**\n * Screen scopes rendered inside an HJM overlay, keyed by that overlay's layer. Their fields register with the screen,\n * not the overlay, so the overlay's activation asks them for the entry field instead of focusing its first control\n * over them (BurnTok search: a ScreenLayout in a Sheet left focus on the close button, 2026-10-18).\n */\nconst nestedScopes = new WeakMap<ModalLayerRef, Set<NestedScope>>();\n\n/**\n * Product modals (not on the HJM stack) layered above the scope. A product modal that contains the scope's own fields\n * wraps the screen rather than covering it, so it does not block (BurnTok search overlay, 2026-10-18).\n */\nfunction productModalAbove(fields: readonly HTMLElement[]): boolean {\n return [...document.querySelectorAll('[aria-modal=\"true\"], dialog[open]')]\n .some(modal => !fields.some(field => modal.contains(field)));\n}\n\nfunction isEditable(element: Element | null): boolean {\n return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement\n || (element instanceof HTMLElement && element.isContentEditable);\n}\n\ntype Candidate = InitialFocusCandidate & { entry: Entry };\nexport type InitialFocusScopeHandle = Readonly<{\n registry: Registry;\n layer: ModalLayerRef | null;\n enabled: boolean;\n /**\n * Overlays only: runs entry when the modal activates and returns the field for `useModalFocus` to focus. `explicit`\n * means the overlay already has an `initialFocusRef`, so entry settles without choosing a field.\n */\n enter(explicit: boolean): HTMLElement | null;\n}>;\n\n/**\n * Screen scopes enter on mount (Web has no enter transition to wait for); overlays pass `layer` and enter through\n * `useModalFocus`. User pointer, key, wheel or touch input while no modal is above the scope ends the entry window.\n */\nexport function useInitialFocusScope({ mode, active = true, layer: ownLayer, enabled = true }: { mode: InitialFocusMode; active?: boolean; layer?: ModalLayerRef; enabled?: boolean }): InitialFocusScopeHandle {\n const inherited = useContext(ModalLayerContext);\n const inheritedEnabled = useContext(EntryFocusEnabledContext);\n // A separate overlay owns its policy; ordinary nested screens inherit their enclosing sheet's policy.\n const entryFocusEnabled = enabled && (ownLayer !== undefined || inheritedEnabled);\n const enabledRef = useRef(entryFocusEnabled); enabledRef.current = entryFocusEnabled;\n const layer = ownLayer ?? inherited;\n const overlay = ownLayer !== undefined;\n const modeRef = useRef(mode); modeRef.current = mode;\n const state = useRef({ phase: \"inactive\" as EntryFocusPhase, entries: new Set<Entry>(), fresh: new Set<Entry>(), counter: 0, flushQueued: false });\n\n const scope = useMemo(() => {\n const s = state.current;\n const blocked = () => {\n const own = layer?.current ?? null;\n // Inside an HJM overlay that is not on the stack yet: its activation runs this scope's entry (`nestedScopes`).\n if (layer !== null && own === null) return true;\n const top = getTopModal();\n if (top) return top !== own;\n // A product's own modal above the page still covers it; overlay content is portaled outside product markup.\n if (layer !== null) return false;\n const fields = [...s.entries].map(entry => entry.element()).filter((element): element is HTMLElement => element !== null);\n return productModalAbove(fields);\n };\n const dispatch = (event: EntryFocusEvent<Candidate> | { kind: \"register\"; entry: Entry }): HTMLElement | null => {\n if (!enabledRef.current) return null;\n const candidates: Candidate[] = [...s.entries].map(entry => ({ entry, order: entry.order, preference: entry.preference, focusable: entry.focusable() }));\n const resolved = event.kind === \"register\" && \"entry\" in event\n ? { kind: \"register\" as const, field: candidates.find(candidate => candidate.entry === event.entry)! }\n : event as EntryFocusEvent<Candidate>;\n const result = resolveEntryFocus(s.phase, resolved, { mode: modeRef.current, candidates, blocked: blocked(), textEntryFocused: isEditable(document.activeElement) });\n s.phase = result.phase;\n return result.target?.entry.element() ?? null;\n };\n const focus = (target: HTMLElement | null) => target?.focus({ preventScroll: true });\n // Fields mounting in one commit are judged together.\n const flush = () => {\n s.flushQueued = false;\n const fresh = [...s.fresh].filter(entry => s.entries.has(entry)).sort((a, b) => a.order - b.order);\n s.fresh.clear();\n const field = fresh.find(entry => entry.preference === true) ?? fresh[0];\n if (field) focus(dispatch({ kind: \"register\", entry: field }));\n };\n const registry: Registry = {\n nextOrder: () => s.counter++,\n register(entry, mounted) {\n s.entries.add(entry);\n if (mounted) { s.fresh.add(entry); if (!s.flushQueued) { s.flushQueued = true; queueMicrotask(flush); } }\n return () => { s.entries.delete(entry); s.fresh.delete(entry); };\n },\n };\n const settle = () => { s.phase = \"settled\"; };\n const enter = (explicit: boolean) => {\n s.fresh.clear();\n const nested = overlay && layer ? [...(nestedScopes.get(layer) ?? [])] : [];\n if (explicit) { settle(); for (const scope of nested) scope.settle(); return null; }\n // A user can open a menu before the deferred entry runs. Never reset their settled entry window.\n if (s.phase === \"settled\") return null;\n if (s.phase === \"inactive\") dispatch({ kind: \"activate\" });\n const own = dispatch({ kind: s.phase === \"open\" ? \"unblock\" : \"enter\" });\n if (own) return own;\n for (const scope of nested) { const target = scope.enter(); if (target) return target; }\n return null;\n };\n return { registry, layer, dispatch, focus, enter, settle };\n }, [layer, overlay]);\n\n useEffect(() => {\n if (!active) { scope.dispatch({ kind: \"deactivate\" }); return undefined; }\n // Observe interaction immediately; deferring activation too would lose a click before the entry microtask.\n scope.dispatch({ kind: \"activate\" });\n // After every effect of this commit, so a modal opening in the same commit (an app-root consent dialog) is\n // already on the stack and blocks entry instead of taking focus away and handing it back later.\n let cancelled = false;\n if (!overlay) queueMicrotask(() => { if (!cancelled) scope.focus(scope.enter(false)); });\n // A screen inside an overlay that activates later enters when the overlay does (see `enter`).\n let nested: Set<NestedScope> | undefined;\n const nestedEntry: NestedScope = { enter: () => scope.enter(false), settle: scope.settle };\n if (!overlay && scope.layer) {\n nested = nestedScopes.get(scope.layer) ?? new Set();\n nestedScopes.set(scope.layer, nested);\n nested.add(nestedEntry);\n }\n const interact = () => { scope.dispatch({ kind: \"interact\" }); };\n const events = [\"pointerdown\", \"click\", \"contextmenu\", \"keydown\", \"wheel\", \"touchstart\"] as const;\n for (const type of events) document.addEventListener(type, interact, true);\n // A modal above closed (after its return focus ran): retry a pending entry.\n const unsubscribe = subscribeModalClose(() => scope.focus(scope.dispatch({ kind: \"unblock\" })));\n return () => {\n cancelled = true;\n nested?.delete(nestedEntry);\n for (const type of events) document.removeEventListener(type, interact, true);\n unsubscribe();\n scope.dispatch({ kind: \"deactivate\" });\n };\n }, [active, overlay, scope, entryFocusEnabled]);\n\n return useMemo(() => ({ registry: scope.registry, layer: scope.layer, enter: scope.enter, enabled: entryFocusEnabled }), [scope, entryFocusEnabled]);\n}\n\nexport function InitialFocusProvider({ scope, children }: { scope: InitialFocusScopeHandle; children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={scope.enabled}><ModalLayerContext.Provider value={scope.layer}><InitialFocusContext.Provider value={scope.registry}>{children}</InitialFocusContext.Provider></ModalLayerContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n\n/** Screen scope: focuses the chosen field on mount, never over a field the user is in or under an open modal. */\nexport function InitialFocusScope({ mode, children }: { mode: InitialFocusMode; children: ReactNode }) {\n const scope = useInitialFocusScope({ mode });\n return <InitialFocusProvider scope={scope}>{children}</InitialFocusProvider>;\n}\n\n/** Registers a text field with the nearest scope. `preference` is the field's public `initialFocusTarget`. */\nexport function useInitialFocusTarget(element: RefObject<HTMLElement | null>, preference: boolean | undefined) {\n const registry = useContext(InitialFocusContext);\n // Tree order is fixed at first registration, so changing `preference` later does not move the field to the end.\n const order = useRef<number | null>(null);\n useLayoutEffect(() => {\n if (!registry) return undefined;\n // Only the first registration of this field instance counts as \"appeared\"; a later `preference` change does not.\n const mounted = order.current === null;\n order.current ??= registry.nextOrder();\n return registry.register({\n order: order.current, preference, element: () => element.current,\n // Disabled and read-only fields are never focused on entry.\n focusable: () => { const node = element.current as (HTMLInputElement | HTMLTextAreaElement | null); return !!node && !node.disabled && !node.readOnly; },\n }, mounted);\n }, [registry, preference, element]);\n}\n\n/** Page footer inputs are bottom-anchored, so entry must not open their keyboard (2026-10-18 user request).\n * Keep the boundary through nested screens; a separately opened overlay owns its own focus policy.\n */\nexport function BottomEntryFocusBoundary({ children }: { children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={false}><InitialFocusContext.Provider value={null}>{children}</InitialFocusContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { type HTMLAttributes, type ReactNode, type Ref } from "react";
2
+ import type { HjmCompositionStyleProp } from "../composition-style.js";
3
+ export type PendingContentProps = Readonly<{
4
+ pending: boolean;
5
+ label: string;
6
+ children: ReactNode;
7
+ layoutStyle?: HjmCompositionStyleProp;
8
+ }>;
9
+ /** Shared host for the public region and AuthScreen's focus-managed action block. */
10
+ export declare function PendingContentHost({ pending, label, children, layoutStyle, className, contentProps, indicatorClassName }: PendingContentProps & {
11
+ className?: string;
12
+ contentProps?: HTMLAttributes<HTMLDivElement> & {
13
+ ref?: Ref<HTMLDivElement>;
14
+ };
15
+ indicatorClassName?: string;
16
+ }): import("react").JSX.Element;
17
+ /** Keep controls mounted and preserve their last ready height while a single centered spinner replaces them. */
18
+ export declare function PendingContent(props: PendingContentProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=pending-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-content.d.ts","sourceRoot":"","sources":["../../src/internal/pending-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACzG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGvE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC,CAAC;AAEH,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,EACvH,mBAAmB,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;KAAE,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,+BAwBzJ;AAED,gHAAgH;AAChH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAA+C"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useLayoutEffect, useRef, useState } from "react";
3
+ import { Spinner } from "./spinner.js";
4
+ /** Shared host for the public region and AuthScreen's focus-managed action block. */
5
+ export function PendingContentHost({ pending, label, children, layoutStyle, className, contentProps, indicatorClassName }) {
6
+ const content = useRef(null);
7
+ const [height, setHeight] = useState();
8
+ useLayoutEffect(() => {
9
+ if (pending || !content.current)
10
+ return;
11
+ const node = content.current;
12
+ const measure = () => { const next = node.getBoundingClientRect().height; if (next > 0)
13
+ setHeight(next); };
14
+ measure();
15
+ if (typeof ResizeObserver === "undefined")
16
+ return;
17
+ const observer = new ResizeObserver(measure);
18
+ observer.observe(node);
19
+ return () => observer.disconnect();
20
+ }, [pending]);
21
+ if (pending && !label.trim())
22
+ throw new TypeError("PendingContent requires a non-empty pending label");
23
+ return _jsxs("div", { className: className, "aria-busy": pending || undefined, style: { ...layoutStyle, position: "relative", width: "100%", ...(pending && height ? { height } : {}) }, children: [_jsx("div", { ...contentProps, ref: node => {
24
+ content.current = node;
25
+ const ref = contentProps?.ref;
26
+ if (typeof ref === "function")
27
+ ref(node);
28
+ else if (ref)
29
+ ref.current = node;
30
+ }, inert: pending, "aria-hidden": pending || undefined, style: pending ? { visibility: "hidden" } : undefined, children: children }), pending ? _jsx("div", { className: indicatorClassName, style: { position: "absolute", inset: 0, display: "grid", placeItems: "center", pointerEvents: "none" }, children: _jsx(Spinner, { label: label }) }) : null] });
31
+ }
32
+ /** Keep controls mounted and preserve their last ready height while a single centered spinner replaces them. */
33
+ export function PendingContent(props) { return _jsx(PendingContentHost, { ...props }); }
34
+ //# sourceMappingURL=pending-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pending-content.js","sourceRoot":"","sources":["../../src/internal/pending-content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM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,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,aACxG,iBAAS,YAAY,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;oBACjC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;oBACvB,MAAM,GAAG,GAAG,YAAY,EAAE,GAAG,CAAC;oBAC9B,IAAI,OAAO,GAAG,KAAK,UAAU;wBAAE,GAAG,CAAC,IAAI,CAAC,CAAC;yBAAM,IAAI,GAAG;wBAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;gBAC7E,CAAC,EAAE,KAAK,EAAE,OAAO,iBAAe,OAAO,IAAI,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,YAAG,QAAQ,GAAO,EAC5H,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YACpJ,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI,GACrB,CAAC,CAAC,CAAC,IAAI,IACT,CAAC;AACT,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,cAAc,CAAC,KAA0B,IAAI,OAAO,KAAC,kBAAkB,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC","sourcesContent":["import { useLayoutEffect, useRef, useState, type HTMLAttributes, type ReactNode, type Ref } from \"react\";\nimport type { HjmCompositionStyleProp } from \"../composition-style.js\";\nimport { Spinner } from \"./spinner.js\";\n\nexport type PendingContentProps = Readonly<{\n pending: boolean;\n label: string;\n children: ReactNode;\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/** Shared host for the public region and AuthScreen's focus-managed action block. */\nexport function PendingContentHost({ pending, label, children, layoutStyle, className, contentProps, indicatorClassName }:\n PendingContentProps & { className?: string; contentProps?: HTMLAttributes<HTMLDivElement> & { ref?: Ref<HTMLDivElement> }; indicatorClassName?: string }) {\n const content = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<number>();\n useLayoutEffect(() => {\n if (pending || !content.current) return;\n const node = content.current;\n const measure = () => { const next = node.getBoundingClientRect().height; if (next > 0) setHeight(next); };\n measure();\n if (typeof ResizeObserver === \"undefined\") return;\n const observer = new ResizeObserver(measure); observer.observe(node);\n return () => observer.disconnect();\n }, [pending]);\n if (pending && !label.trim()) throw new TypeError(\"PendingContent requires a non-empty pending label\");\n return <div className={className} aria-busy={pending || undefined}\n style={{ ...layoutStyle, position: \"relative\", width: \"100%\", ...(pending && height ? { height } : {}) }}>\n <div {...contentProps} ref={node => {\n content.current = node;\n const ref = contentProps?.ref;\n if (typeof ref === \"function\") ref(node); else if (ref) ref.current = node;\n }} inert={pending} aria-hidden={pending || undefined} style={pending ? { visibility: \"hidden\" } : undefined}>{children}</div>\n {pending ? <div className={indicatorClassName} style={{ position: \"absolute\", inset: 0, display: \"grid\", placeItems: \"center\", pointerEvents: \"none\" }}>\n <Spinner label={label} />\n </div> : null}\n </div>;\n}\n\n/** Keep controls mounted and preserve their last ready height while a single centered spinner replaces them. */\nexport function PendingContent(props: PendingContentProps) { return <PendingContentHost {...props} />; }\n"]}
@@ -1,7 +1,9 @@
1
1
  /**
2
- * True inside ScreenLayout's footer. The footer already owns the bar chrome (top border, screen padding, safe area), so
2
+ * Set inside a padded ScreenLayout or Sheet footer. The parent owns the bar chrome and safe area, so
3
3
  * BottomCTA placed there renders only its copy and actions; drawing its own bar too doubled the border, inset the
4
4
  * buttons twice and (Native) added a shadowed surface inside the footer (2026-10-17 screen review, common-screen-shell).
5
5
  */
6
- export declare const ScreenFooterContext: import("react").Context<boolean>;
6
+ export declare const ScreenFooterContext: import("react").Context<Readonly<{
7
+ bottomPadding: string;
8
+ }> | null>;
7
9
  //# sourceMappingURL=screen-footer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen-footer.d.ts","sourceRoot":"","sources":["../../src/internal/screen-footer.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,kCAAuB,CAAC"}
1
+ {"version":3,"file":"screen-footer.d.ts","sourceRoot":"","sources":["../../src/internal/screen-footer.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;mBAA2C,MAAM;UAAiB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { createContext } from "react";
2
2
  /**
3
- * True inside ScreenLayout's footer. The footer already owns the bar chrome (top border, screen padding, safe area), so
3
+ * Set inside a padded ScreenLayout or Sheet footer. The parent owns the bar chrome and safe area, so
4
4
  * BottomCTA placed there renders only its copy and actions; drawing its own bar too doubled the border, inset the
5
5
  * buttons twice and (Native) added a shadowed surface inside the footer (2026-10-17 screen review, common-screen-shell).
6
6
  */
7
- export const ScreenFooterContext = createContext(false);
7
+ export const ScreenFooterContext = createContext(null);
8
8
  //# sourceMappingURL=screen-footer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen-footer.js","sourceRoot":"","sources":["../../src/internal/screen-footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import { createContext } from \"react\";\n\n/**\n * True inside ScreenLayout's footer. The footer already owns the bar chrome (top border, screen padding, safe area), so\n * BottomCTA placed there renders only its copy and actions; drawing its own bar too doubled the border, inset the\n * buttons twice and (Native) added a shadowed surface inside the footer (2026-10-17 screen review, common-screen-shell).\n */\nexport const ScreenFooterContext = createContext(false);\n"]}
1
+ {"version":3,"file":"screen-footer.js","sourceRoot":"","sources":["../../src/internal/screen-footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAA6C,IAAI,CAAC,CAAC","sourcesContent":["import { createContext } from \"react\";\n\n/**\n * Set inside a padded ScreenLayout or Sheet footer. The parent owns the bar chrome and safe area, so\n * BottomCTA placed there renders only its copy and actions; drawing its own bar too doubled the border, inset the\n * buttons twice and (Native) added a shadowed surface inside the footer (2026-10-17 screen review, common-screen-shell).\n */\nexport const ScreenFooterContext = createContext<Readonly<{ bottomPadding: string }> | null>(null);\n"]}
@@ -1,5 +1,7 @@
1
1
  import type { HjmDesignProfile } from "@hjmds/design-contracts/design-profile";
2
- import { type Dispatch, type Ref, type SetStateAction } from "react";
2
+ import { type AriaAttributes, type Dispatch, type Ref, type SetStateAction } from "react";
3
+ /** ARIA's string "false" is valid; grammar/spelling express invalid input just like true. */
4
+ export declare function isAriaInvalid(value: AriaAttributes["aria-invalid"]): boolean;
3
5
  export declare function classNames(...values: readonly (string | false | null | undefined)[]): string | undefined;
4
6
  export declare function assignRef<Element>(ref: Ref<Element> | undefined, value: Element | null): void;
5
7
  export declare function composeRefs<Element>(...refs: readonly (Ref<Element> | undefined)[]): (value: Element | null) => void;
@@ -16,6 +18,12 @@ export declare function useWindowWidth(): number;
16
18
  export declare function useElementWidth<Element extends HTMLElement>(externalRef?: Ref<Element>): readonly [number | undefined, (node: Element | null) => void];
17
19
  export declare const DesignProfileContext: import("react").Context<Readonly<{
18
20
  id: string;
21
+ controls?: Readonly<{
22
+ button?: Readonly<{
23
+ appearance: import("@hjmds/design-contracts/recipes/base").ButtonAppearance;
24
+ shape: import("@hjmds/design-contracts/recipes/base").ButtonShape;
25
+ }>;
26
+ }>;
19
27
  palette: Readonly<Record<import("@hjmds/design-contracts/colors").ResolvedTheme, Readonly<import("@hjmds/design-contracts/colors").ThemeColors>>>;
20
28
  tokens: Readonly<{
21
29
  radius: Readonly<Record<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E,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnC,CAAC,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,EAC1C,KAAK,EACL,YAAY,EACZ,QAAQ,GACT,EAAE,wBAAwB,CAAC,KAAK,CAAC,GAAG,SAAS;IAC5C,KAAK;IACL,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CAChC,CAiBA;AAeD,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED,wBAAgB,eAAe,CAAC,OAAO,SAAS,WAAW,EACzD,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,GACzB,SAAS,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC,CAyB/D;AAID,eAAO,MAAM,oBAAoB;;;cA1DR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;eAoBf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;eAsC8E,CAAC;AAC3F,wBAAgB,wBAAwB,IAAI,gBAAgB,GAAG,SAAS,CAEvE"}
package/dist/internal.js CHANGED
@@ -1,4 +1,8 @@
1
1
  import { createContext, useContext, useCallback, useEffect, useState, useSyncExternalStore, } from "react";
2
+ /** ARIA's string "false" is valid; grammar/spelling express invalid input just like true. */
3
+ export function isAriaInvalid(value) {
4
+ return value === true || (typeof value === "string" && value !== "false");
5
+ }
2
6
  export function classNames(...values) {
3
7
  const result = values.filter(Boolean).join(" ");
4
8
  return result.length > 0 ? result : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,oBAAoB,GAIrB,MAAM,OAAO,CAAC;AAEf,MAAM,UAAU,UAAU,CACxB,GAAG,MAAsD;IAEzD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC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AO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5C,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CAAC,KAAK,EAAE,GAAG,CAAU,CAAC;AAC/B,CAAC;AAED,kFAAkF;AAClF,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAC3F,MAAM,UAAU,wBAAwB;IACtC,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import type { HjmDesignProfile } from \"@hjmds/design-contracts/design-profile\";\nimport {\n createContext,\n useContext,\n useCallback,\n useEffect,\n useState,\n useSyncExternalStore,\n type Dispatch,\n type Ref,\n type SetStateAction,\n} from \"react\";\n\nexport function classNames(\n ...values: readonly (string | false | null | undefined)[]\n): string | undefined {\n const result = values.filter(Boolean).join(\" \");\n return result.length > 0 ? result : undefined;\n}\n\nexport function assignRef<Element>(ref: Ref<Element> | undefined, value: Element | null): void {\n if (typeof ref === \"function\") ref(value);\n else if (ref) ref.current = value;\n}\n\nexport function composeRefs<Element>(\n ...refs: readonly (Ref<Element> | undefined)[]\n): (value: Element | null) => void {\n return (value) => {\n for (const ref of refs) assignRef(ref, value);\n };\n}\n\ntype ControllableStateOptions<Value> = Readonly<{\n value?: Value;\n defaultValue: Value;\n onChange?: (value: Value) => void;\n}>;\n\nexport function useControllableState<Value>({\n value,\n defaultValue,\n onChange,\n}: ControllableStateOptions<Value>): readonly [\n Value,\n Dispatch<SetStateAction<Value>>,\n] {\n const [internalValue, setInternalValue] = useState(defaultValue);\n const controlled = value !== undefined;\n const currentValue = controlled ? value : internalValue;\n\n const setValue: Dispatch<SetStateAction<Value>> = useCallback(\n (next) => {\n const resolved = typeof next === \"function\"\n ? (next as (previous: Value) => Value)(currentValue)\n : next;\n if (!controlled) setInternalValue(resolved);\n if (!Object.is(resolved, currentValue)) onChange?.(resolved);\n },\n [controlled, currentValue, onChange],\n );\n\n return [currentValue, setValue] as const;\n}\n\nfunction subscribeWindowResize(callback: () => void): () => void {\n window.addEventListener(\"resize\", callback);\n return () => window.removeEventListener(\"resize\", callback);\n}\n\nfunction getWindowWidth(): number {\n return window.innerWidth;\n}\n\nfunction getServerWindowWidth(): number {\n return 0;\n}\n\nexport function useWindowWidth(): number {\n return useSyncExternalStore(\n subscribeWindowResize,\n getWindowWidth,\n getServerWindowWidth,\n );\n}\n\nexport function useElementWidth<Element extends HTMLElement>(\n externalRef?: Ref<Element>,\n): readonly [number | undefined, (node: Element | null) => void] {\n const [node, setNode] = useState<Element | null>(null);\n const [width, setWidth] = useState<number>();\n const ref = useCallback(\n (nextNode: Element | null) => {\n setNode(nextNode);\n assignRef(externalRef, nextNode);\n },\n [externalRef],\n );\n\n useEffect(() => {\n if (!node) return;\n const update = () => setWidth(node.getBoundingClientRect().width);\n update();\n if (typeof ResizeObserver === \"undefined\") {\n window.addEventListener(\"resize\", update);\n return () => window.removeEventListener(\"resize\", update);\n }\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [node]);\n\n return [width, ref] as const;\n}\n\n// This existing helper module is already used by provider and granular selection.\n// Keeping resolved data here avoids importing provider recipes or all preset packs.\nexport const DesignProfileContext = createContext<HjmDesignProfile | undefined>(undefined);\nexport function useDesignProfileDefaults(): HjmDesignProfile | undefined {\n return useContext(DesignProfileContext);\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,E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AAG,EAAE;QACb,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,EAAE,CAAC;QACT,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE,CAAC;YAC1C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC1C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5C,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CAAC,KAAK,EAAE,GAAG,CAAU,CAAC;AAC/B,CAAC;AAED,kFAAkF;AAClF,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAC3F,MAAM,UAAU,wBAAwB;IACtC,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import type { HjmDesignProfile } from \"@hjmds/design-contracts/design-profile\";\nimport {\n createContext,\n useContext,\n useCallback,\n useEffect,\n useState,\n useSyncExternalStore,\n type AriaAttributes,\n type Dispatch,\n type Ref,\n type SetStateAction,\n} from \"react\";\n\n/** ARIA's string \"false\" is valid; grammar/spelling express invalid input just like true. */\nexport function isAriaInvalid(value: AriaAttributes[\"aria-invalid\"]): boolean {\n return value === true || (typeof value === \"string\" && value !== \"false\");\n}\n\nexport function classNames(\n ...values: readonly (string | false | null | undefined)[]\n): string | undefined {\n const result = values.filter(Boolean).join(\" \");\n return result.length > 0 ? result : undefined;\n}\n\nexport function assignRef<Element>(ref: Ref<Element> | undefined, value: Element | null): void {\n if (typeof ref === \"function\") ref(value);\n else if (ref) ref.current = value;\n}\n\nexport function composeRefs<Element>(\n ...refs: readonly (Ref<Element> | undefined)[]\n): (value: Element | null) => void {\n return (value) => {\n for (const ref of refs) assignRef(ref, value);\n };\n}\n\ntype ControllableStateOptions<Value> = Readonly<{\n value?: Value;\n defaultValue: Value;\n onChange?: (value: Value) => void;\n}>;\n\nexport function useControllableState<Value>({\n value,\n defaultValue,\n onChange,\n}: ControllableStateOptions<Value>): readonly [\n Value,\n Dispatch<SetStateAction<Value>>,\n] {\n const [internalValue, setInternalValue] = useState(defaultValue);\n const controlled = value !== undefined;\n const currentValue = controlled ? value : internalValue;\n\n const setValue: Dispatch<SetStateAction<Value>> = useCallback(\n (next) => {\n const resolved = typeof next === \"function\"\n ? (next as (previous: Value) => Value)(currentValue)\n : next;\n if (!controlled) setInternalValue(resolved);\n if (!Object.is(resolved, currentValue)) onChange?.(resolved);\n },\n [controlled, currentValue, onChange],\n );\n\n return [currentValue, setValue] as const;\n}\n\nfunction subscribeWindowResize(callback: () => void): () => void {\n window.addEventListener(\"resize\", callback);\n return () => window.removeEventListener(\"resize\", callback);\n}\n\nfunction getWindowWidth(): number {\n return window.innerWidth;\n}\n\nfunction getServerWindowWidth(): number {\n return 0;\n}\n\nexport function useWindowWidth(): number {\n return useSyncExternalStore(\n subscribeWindowResize,\n getWindowWidth,\n getServerWindowWidth,\n );\n}\n\nexport function useElementWidth<Element extends HTMLElement>(\n externalRef?: Ref<Element>,\n): readonly [number | undefined, (node: Element | null) => void] {\n const [node, setNode] = useState<Element | null>(null);\n const [width, setWidth] = useState<number>();\n const ref = useCallback(\n (nextNode: Element | null) => {\n setNode(nextNode);\n assignRef(externalRef, nextNode);\n },\n [externalRef],\n );\n\n useEffect(() => {\n if (!node) return;\n const update = () => setWidth(node.getBoundingClientRect().width);\n update();\n if (typeof ResizeObserver === \"undefined\") {\n window.addEventListener(\"resize\", update);\n return () => window.removeEventListener(\"resize\", update);\n }\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [node]);\n\n return [width, ref] as const;\n}\n\n// This existing helper module is already used by provider and granular selection.\n// Keeping resolved data here avoids importing provider recipes or all preset packs.\nexport const DesignProfileContext = createContext<HjmDesignProfile | undefined>(undefined);\nexport function useDesignProfileDefaults(): HjmDesignProfile | undefined {\n return useContext(DesignProfileContext);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../src/navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,gBAAgB,EAA8C,KAAK,cAAc,EAA2B,MAAM,0CAA0C,CAAC;AAErM,YAAY,EAAE,cAAc,EAAE,CAAC;AAC/B,OAAO,EAKL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,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ACnD,CACI,QAAQ,CAAC;IACP,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC,GACF,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B,CAAC,CACL,CAAC;AAEJ,+FAA+F;AAC/F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,sCAmD5C;AAED,eAAO,MAAM,IAAI,sGAoWf,CAAC"}
@@ -124,15 +124,42 @@ export const Tabs = forwardRef(function Tabs(props, ref) {
124
124
  const [visited, setVisited] = useState(() => new Set([value]));
125
125
  const tabRefs = useRef(new Map());
126
126
  const focusedTabRef = useRef(null);
127
- const generatedId = useId().replaceAll(":", "");
128
- const baseId = id ?? `hjm-${generatedId}`;
127
+ const stripDrag = useRef(null);
128
+ const suppressDragClick = useRef(false);
129
+ const itemOrder = JSON.stringify(items.map(item => item.id));
129
130
  const theme = useOptionalHjmTheme();
130
131
  const direction = directionProp ?? theme?.environment.direction ?? tabsBehaviorDefaults.direction;
132
+ // Native touch scrolling already works; mouse dragging needs an explicit path
133
+ // so narrow desktop previews can reach the same offscreen tabs without selecting them.
134
+ useLayoutEffect(() => {
135
+ if (overflow !== "scroll" || orientation !== "horizontal")
136
+ return;
137
+ const tab = tabRefs.current.get(value);
138
+ const list = tab?.parentElement;
139
+ if (!tab || !list)
140
+ return;
141
+ const reveal = () => {
142
+ const rect = tab.getBoundingClientRect(), viewport = list.getBoundingClientRect();
143
+ if (rect.left < viewport.left)
144
+ list.scrollLeft += rect.left - viewport.left;
145
+ else if (rect.right > viewport.right)
146
+ list.scrollLeft += rect.right - viewport.right;
147
+ };
148
+ reveal();
149
+ // Responsive widths and translated labels can hide an unchanged selection.
150
+ // Adjust only the rail, preserving page scroll and deliberate manual browsing.
151
+ const observer = new ResizeObserver(reveal);
152
+ observer.observe(list);
153
+ for (const node of tabRefs.current.values())
154
+ observer.observe(node);
155
+ return () => observer.disconnect();
156
+ }, [value, overflow, orientation, itemOrder, direction]);
157
+ const generatedId = useId().replaceAll(":", "");
158
+ const baseId = id ?? `hjm-${generatedId}`;
131
159
  const appearance = resolveTabsAppearance(suppliedAppearance, theme?.designProfile?.interactions.selectionMotion, orientation);
132
160
  const movingIndicator = appearance !== "standard" || (orientation === "horizontal" && swipePosition !== undefined);
133
161
  // Recreated label/panel elements must not cancel motion on unrelated draft edits;
134
162
  // resize observation covers their geometry, while stable IDs detect reordering.
135
- const itemOrder = JSON.stringify(items.map(item => item.id));
136
163
  const indicatorRef = useRef(null);
137
164
  const previousIndicator = useRef(null);
138
165
  const interruptedIndicator = useRef(null);
@@ -273,7 +300,34 @@ export const Tabs = forwardRef(function Tabs(props, ref) {
273
300
  }
274
301
  };
275
302
  const panelId = (value) => getTabPanelId(baseId, value, panelMode);
276
- return (_jsxs("div", { ...rest, style: { ...rest.style, ...layoutStyle }, ref: ref, id: baseId, className: classNames("hjm-tabs", className), "data-size": size, "data-layout": layout, "data-overflow": overflow, "data-appearance": appearance, "data-indicator": indicator, "data-indicator-motion": movingIndicator ? "moving" : "static", "data-orientation": orientation, "data-mount-policy": mountPolicy, "data-panel-mode": panelMode, "data-state": "ready", dir: direction, children: [_jsxs("div", { className: "hjm-tabs__list", role: "tablist", "aria-label": label, "aria-orientation": orientation, children: [movingIndicator ? _jsx("span", { ref: indicatorRef, "aria-hidden": "true", className: classNames("hjm-tabs__indicator", appearance === "gooey" && "hjm-tabs__gooey") }) : null, items.map((item) => {
303
+ return (_jsxs("div", { ...rest, style: { ...rest.style, ...layoutStyle }, ref: ref, id: baseId, className: classNames("hjm-tabs", className), "data-size": size, "data-layout": layout, "data-overflow": overflow, "data-appearance": appearance, "data-indicator": indicator, "data-indicator-motion": movingIndicator ? "moving" : "static", "data-orientation": orientation, "data-mount-policy": mountPolicy, "data-panel-mode": panelMode, "data-state": "ready", dir: direction, children: [_jsxs("div", { className: "hjm-tabs__list", onPointerDown: (event) => {
304
+ suppressDragClick.current = false;
305
+ if (event.pointerType !== "mouse" || event.button !== 0 || overflow !== "scroll" || orientation !== "horizontal")
306
+ return;
307
+ stripDrag.current = { pointer: event.pointerId, x: event.clientX, start: event.currentTarget.scrollLeft, moved: false };
308
+ }, onPointerMove: (event) => {
309
+ const drag = stripDrag.current;
310
+ if (!drag || drag.pointer !== event.pointerId || event.buttons !== 1)
311
+ return;
312
+ const delta = event.clientX - drag.x;
313
+ if (!drag.moved && Math.abs(delta) < 5)
314
+ return;
315
+ drag.moved = true;
316
+ suppressDragClick.current = true;
317
+ event.currentTarget.setPointerCapture(event.pointerId);
318
+ event.preventDefault();
319
+ event.currentTarget.scrollLeft = drag.start - delta;
320
+ }, onPointerUp: (event) => {
321
+ stripDrag.current = null;
322
+ if (event.currentTarget.hasPointerCapture(event.pointerId))
323
+ event.currentTarget.releasePointerCapture(event.pointerId);
324
+ }, onPointerCancel: () => { stripDrag.current = null; suppressDragClick.current = false; }, onLostPointerCapture: () => { stripDrag.current = null; }, onClickCapture: (event) => {
325
+ if (!suppressDragClick.current)
326
+ return;
327
+ suppressDragClick.current = false;
328
+ event.preventDefault();
329
+ event.stopPropagation();
330
+ }, role: "tablist", "aria-label": label, "aria-orientation": orientation, children: [movingIndicator ? _jsx("span", { ref: indicatorRef, "aria-hidden": "true", className: classNames("hjm-tabs__indicator", appearance === "gooey" && "hjm-tabs__gooey") }) : null, items.map((item) => {
277
331
  const selected = item.id === value;
278
332
  const tabId = getTabId(baseId, item.id);
279
333
  const leadingSize = iconRecipe.sizes[tabsRecipe.icon.glyph];