@ankhorage/zora 14.0.1 → 16.0.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -1
- package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
- package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -1
- package/dist/features/app-bar/adapters/inbound/AppBar.js +28 -27
- package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -1
- package/dist/features/app-bar/public.d.ts +1 -1
- package/dist/features/app-bar/public.d.ts.map +1 -1
- package/dist/features/app-bar/public.js.map +1 -1
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/bottom-sheet/public.d.ts +2 -2
- package/dist/features/bottom-sheet/public.d.ts.map +1 -1
- package/dist/features/bottom-sheet/public.js +1 -1
- package/dist/features/bottom-sheet/public.js.map +1 -1
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.d.ts +5 -0
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.d.ts.map +1 -0
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.js +81 -0
- package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.js.map +1 -0
- package/dist/features/breadcrumbs/breadcrumbsMeta.d.ts +119 -0
- package/dist/features/breadcrumbs/breadcrumbsMeta.d.ts.map +1 -0
- package/dist/features/breadcrumbs/breadcrumbsMeta.js +94 -0
- package/dist/features/breadcrumbs/breadcrumbsMeta.js.map +1 -0
- package/dist/features/breadcrumbs/public.d.ts +3 -0
- package/dist/features/breadcrumbs/public.d.ts.map +1 -0
- package/dist/features/breadcrumbs/public.js +2 -0
- package/dist/features/breadcrumbs/public.js.map +1 -0
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.d.ts.map +1 -1
- package/dist/features/data-table/adapters/inbound/DataTable.js +4 -2
- package/dist/features/data-table/adapters/inbound/DataTable.js.map +1 -1
- package/dist/features/dialog/adapters/inbound/Dialog.d.ts +5 -0
- package/dist/features/dialog/adapters/inbound/Dialog.d.ts.map +1 -0
- package/dist/features/dialog/adapters/inbound/Dialog.js +45 -0
- package/dist/features/dialog/adapters/inbound/Dialog.js.map +1 -0
- package/dist/features/dialog/dialogMeta.d.ts +87 -0
- package/dist/features/dialog/dialogMeta.d.ts.map +1 -0
- package/dist/features/dialog/dialogMeta.js +59 -0
- package/dist/features/dialog/dialogMeta.js.map +1 -0
- package/dist/features/dialog/public.d.ts +3 -0
- package/dist/features/dialog/public.d.ts.map +1 -0
- package/dist/features/dialog/public.js +2 -0
- package/dist/features/dialog/public.js.map +1 -0
- package/dist/features/form/formFieldMeta.d.ts +1 -1
- package/dist/features/form/formFieldMeta.d.ts.map +1 -1
- package/dist/features/form/formFieldMeta.js +8 -1
- package/dist/features/form/formFieldMeta.js.map +1 -1
- package/dist/features/form/radio/utils/resolveRadioGroupThemeRecipe.d.ts +1 -1
- package/dist/features/form/search-input/adapters/inbound/SearchInput.d.ts +4 -0
- package/dist/features/form/search-input/adapters/inbound/SearchInput.d.ts.map +1 -0
- package/dist/{components/search-bar/SearchBar.js → features/form/search-input/adapters/inbound/SearchInput.js} +8 -10
- package/dist/features/form/search-input/adapters/inbound/SearchInput.js.map +1 -0
- package/dist/features/form/search-input/public.d.ts +3 -0
- package/dist/features/form/search-input/public.d.ts.map +1 -0
- package/dist/features/form/search-input/public.js +2 -0
- package/dist/features/form/search-input/public.js.map +1 -0
- package/dist/features/form/search-input/searchInputMeta.d.ts +126 -0
- package/dist/features/form/search-input/searchInputMeta.d.ts.map +1 -0
- package/dist/features/form/search-input/searchInputMeta.js +67 -0
- package/dist/features/form/search-input/searchInputMeta.js.map +1 -0
- package/dist/features/form/select/adapters/inbound/Select.d.ts +2 -0
- package/dist/features/form/select/adapters/inbound/Select.d.ts.map +1 -0
- package/dist/features/form/select/adapters/inbound/Select.js +2 -0
- package/dist/features/form/select/adapters/inbound/Select.js.map +1 -0
- package/dist/features/form/select/adapters/inbound/Select.native.d.ts +5 -0
- package/dist/features/form/select/adapters/inbound/Select.native.d.ts.map +1 -0
- package/dist/features/form/select/adapters/inbound/Select.native.js +42 -0
- package/dist/features/form/select/adapters/inbound/Select.native.js.map +1 -0
- package/dist/features/form/select/adapters/inbound/Select.web.d.ts +5 -0
- package/dist/features/form/select/adapters/inbound/Select.web.d.ts.map +1 -0
- package/dist/features/form/select/adapters/inbound/Select.web.js +31 -0
- package/dist/features/form/select/adapters/inbound/Select.web.js.map +1 -0
- package/dist/features/form/select/composition/SelectField.d.ts +10 -0
- package/dist/features/form/select/composition/SelectField.d.ts.map +1 -0
- package/dist/features/form/select/composition/SelectField.js +8 -0
- package/dist/features/form/select/composition/SelectField.js.map +1 -0
- package/dist/features/form/select/composition/SelectOptionRow.d.ts +12 -0
- package/dist/features/form/select/composition/SelectOptionRow.d.ts.map +1 -0
- package/dist/features/form/select/composition/SelectOptionRow.js +9 -0
- package/dist/features/form/select/composition/SelectOptionRow.js.map +1 -0
- package/dist/features/form/select/composition/SelectTrigger.d.ts +10 -0
- package/dist/features/form/select/composition/SelectTrigger.d.ts.map +1 -0
- package/dist/features/form/select/composition/SelectTrigger.js +9 -0
- package/dist/features/form/select/composition/SelectTrigger.js.map +1 -0
- package/dist/features/form/select/composition/useSelectController.d.ts +8 -0
- package/dist/features/form/select/composition/useSelectController.d.ts.map +1 -0
- package/dist/features/form/select/composition/useSelectController.js +15 -0
- package/dist/features/form/select/composition/useSelectController.js.map +1 -0
- package/dist/features/form/select/public.d.ts +3 -0
- package/dist/features/form/select/public.d.ts.map +1 -0
- package/dist/features/form/select/public.js +2 -0
- package/dist/features/form/select/public.js.map +1 -0
- package/dist/features/form/select/selectMeta.d.ts +195 -0
- package/dist/features/form/select/selectMeta.d.ts.map +1 -0
- package/dist/features/form/select/selectMeta.js +152 -0
- package/dist/features/form/select/selectMeta.js.map +1 -0
- package/dist/features/gradient/gradientMeta.d.ts +1 -1
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
- package/dist/features/layout/boxMeta.d.ts +1 -1
- package/dist/features/layout/containerMeta.d.ts +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/stackMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/pagination/adapters/inbound/Pagination.d.ts +5 -0
- package/dist/features/pagination/adapters/inbound/Pagination.d.ts.map +1 -0
- package/dist/features/pagination/adapters/inbound/Pagination.js +43 -0
- package/dist/features/pagination/adapters/inbound/Pagination.js.map +1 -0
- package/dist/features/pagination/paginationMeta.d.ts +118 -0
- package/dist/features/pagination/paginationMeta.d.ts.map +1 -0
- package/dist/features/pagination/paginationMeta.js +53 -0
- package/dist/features/pagination/paginationMeta.js.map +1 -0
- package/dist/features/pagination/public.d.ts +3 -0
- package/dist/features/pagination/public.d.ts.map +1 -0
- package/dist/features/pagination/public.js +2 -0
- package/dist/features/pagination/public.js.map +1 -0
- package/dist/features/pagination/utils/resolvePaginationPage.d.ts +3 -0
- package/dist/features/pagination/utils/resolvePaginationPage.d.ts.map +1 -0
- package/dist/features/pagination/utils/resolvePaginationPage.js +7 -0
- package/dist/features/pagination/utils/resolvePaginationPage.js.map +1 -0
- package/dist/features/pagination/utils/resolvePaginationState.d.ts +17 -0
- package/dist/features/pagination/utils/resolvePaginationState.d.ts.map +1 -0
- package/dist/features/pagination/utils/resolvePaginationState.js +34 -0
- package/dist/features/pagination/utils/resolvePaginationState.js.map +1 -0
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts +5 -0
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts.map +1 -0
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js +43 -0
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js.map +1 -0
- package/dist/features/popover-menu/popoverMenuMeta.d.ts +9 -0
- package/dist/features/popover-menu/popoverMenuMeta.d.ts.map +1 -0
- package/dist/features/popover-menu/popoverMenuMeta.js +9 -0
- package/dist/features/popover-menu/popoverMenuMeta.js.map +1 -0
- package/dist/features/popover-menu/public.d.ts +3 -0
- package/dist/features/popover-menu/public.d.ts.map +1 -0
- package/dist/features/popover-menu/public.js +2 -0
- package/dist/features/popover-menu/public.js.map +1 -0
- package/dist/features/rating/adapters/inbound/Rating.d.ts +4 -0
- package/dist/features/rating/adapters/inbound/Rating.d.ts.map +1 -0
- package/dist/features/rating/adapters/inbound/Rating.js +49 -0
- package/dist/features/rating/adapters/inbound/Rating.js.map +1 -0
- package/dist/features/rating/public.d.ts +3 -0
- package/dist/features/rating/public.d.ts.map +1 -0
- package/dist/features/rating/public.js +2 -0
- package/dist/features/rating/public.js.map +1 -0
- package/dist/features/rating/ratingMeta.d.ts +57 -0
- package/dist/features/rating/ratingMeta.d.ts.map +1 -0
- package/dist/features/rating/ratingMeta.js +43 -0
- package/dist/features/rating/ratingMeta.js.map +1 -0
- package/dist/features/rating/utils/resolveRatingSegments.d.ts +9 -0
- package/dist/features/rating/utils/resolveRatingSegments.d.ts.map +1 -0
- package/dist/features/rating/utils/resolveRatingSegments.js +14 -0
- package/dist/features/rating/utils/resolveRatingSegments.js.map +1 -0
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/features/tabs/adapters/inbound/Tab.d.ts +5 -0
- package/dist/features/tabs/adapters/inbound/Tab.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/Tab.js +14 -0
- package/dist/features/tabs/adapters/inbound/Tab.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/TabList.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/TabList.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/TabList.js +9 -0
- package/dist/features/tabs/adapters/inbound/TabList.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/TabPanel.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/TabPanel.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/TabPanel.js +11 -0
- package/dist/features/tabs/adapters/inbound/TabPanel.js.map +1 -0
- package/dist/features/tabs/adapters/inbound/Tabs.d.ts +4 -0
- package/dist/features/tabs/adapters/inbound/Tabs.d.ts.map +1 -0
- package/dist/features/tabs/adapters/inbound/Tabs.js +12 -0
- package/dist/features/tabs/adapters/inbound/Tabs.js.map +1 -0
- package/dist/features/tabs/composition/TabsInteractionPolicyContext.d.ts +3 -0
- package/dist/features/tabs/composition/TabsInteractionPolicyContext.d.ts.map +1 -0
- package/dist/features/tabs/composition/TabsInteractionPolicyContext.js +3 -0
- package/dist/features/tabs/composition/TabsInteractionPolicyContext.js.map +1 -0
- package/dist/features/tabs/public.d.ts +6 -0
- package/dist/features/tabs/public.d.ts.map +1 -0
- package/dist/features/tabs/public.js +5 -0
- package/dist/features/tabs/public.js.map +1 -0
- package/dist/features/tabs/tabListMeta.d.ts +9 -0
- package/dist/features/tabs/tabListMeta.d.ts.map +1 -0
- package/dist/features/tabs/tabListMeta.js +9 -0
- package/dist/features/tabs/tabListMeta.js.map +1 -0
- package/dist/features/tabs/tabMeta.d.ts +32 -0
- package/dist/features/tabs/tabMeta.d.ts.map +1 -0
- package/dist/features/tabs/tabMeta.js +14 -0
- package/dist/features/tabs/tabMeta.js.map +1 -0
- package/dist/features/tabs/tabPanelMeta.d.ts +15 -0
- package/dist/features/tabs/tabPanelMeta.d.ts.map +1 -0
- package/dist/features/tabs/tabPanelMeta.js +12 -0
- package/dist/features/tabs/tabPanelMeta.js.map +1 -0
- package/dist/features/tabs/tabsMeta.d.ts +58 -0
- package/dist/features/tabs/tabsMeta.d.ts.map +1 -0
- package/dist/features/tabs/tabsMeta.js +40 -0
- package/dist/features/tabs/tabsMeta.js.map +1 -0
- package/dist/features/toolbar/adapters/inbound/Toolbar.d.ts +4 -0
- package/dist/features/toolbar/adapters/inbound/Toolbar.d.ts.map +1 -0
- package/dist/features/toolbar/adapters/inbound/Toolbar.js +14 -0
- package/dist/features/toolbar/adapters/inbound/Toolbar.js.map +1 -0
- package/dist/features/toolbar/public.d.ts +3 -0
- package/dist/features/toolbar/public.d.ts.map +1 -0
- package/dist/features/toolbar/public.js +2 -0
- package/dist/features/toolbar/public.js.map +1 -0
- package/dist/features/toolbar/toolbarMeta.d.ts +29 -0
- package/dist/features/toolbar/toolbarMeta.d.ts.map +1 -0
- package/dist/features/toolbar/toolbarMeta.js +22 -0
- package/dist/features/toolbar/toolbarMeta.js.map +1 -0
- package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts +1 -1
- package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js +3 -3
- package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
- package/dist/index.d.ts +10 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/layout/screen/meta.d.ts +1 -1
- package/dist/layout/screen-section/meta.d.ts +1 -1
- package/dist/metadata/allowedChildren.d.ts +3 -3
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +6 -0
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +3 -4
- package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
- package/dist/metadata/bindableComponentMeta.js +1 -2
- package/dist/metadata/bindableComponentMeta.js.map +1 -1
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +18 -14
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -3
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/meta.d.ts +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/patterns/theme-composer/ThemeComposer.d.ts.map +1 -1
- package/dist/patterns/theme-composer/ThemeComposer.js +4 -4
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +15 -14
- package/dist/registry.js.map +1 -1
- package/dist/types/app-bar.d.ts +6 -3
- package/dist/types/app-bar.d.ts.map +1 -1
- package/dist/types/app-bar.js.map +1 -1
- package/dist/{components/breadcrumbs/types.d.ts → types/breadcrumbs.d.ts} +8 -6
- package/dist/types/breadcrumbs.d.ts.map +1 -0
- package/dist/types/breadcrumbs.js +2 -0
- package/dist/types/breadcrumbs.js.map +1 -0
- package/dist/types/data-table.d.ts +2 -2
- package/dist/types/data-table.d.ts.map +1 -1
- package/dist/types/data-table.js.map +1 -1
- package/dist/types/dialog.d.ts +14 -0
- package/dist/types/dialog.d.ts.map +1 -0
- package/dist/types/dialog.js +2 -0
- package/dist/types/dialog.js.map +1 -0
- package/dist/types/pagination.d.ts +16 -0
- package/dist/types/pagination.d.ts.map +1 -0
- package/dist/types/pagination.js +2 -0
- package/dist/types/pagination.js.map +1 -0
- package/dist/types/popover-menu.d.ts +24 -0
- package/dist/types/popover-menu.d.ts.map +1 -0
- package/dist/types/popover-menu.js +2 -0
- package/dist/types/popover-menu.js.map +1 -0
- package/dist/types/rating.d.ts +9 -0
- package/dist/types/rating.d.ts.map +1 -0
- package/dist/types/rating.js +2 -0
- package/dist/types/rating.js.map +1 -0
- package/dist/types/search-input.d.ts +14 -0
- package/dist/types/search-input.d.ts.map +1 -0
- package/dist/types/search-input.js +2 -0
- package/dist/types/search-input.js.map +1 -0
- package/dist/types/select.d.ts +22 -0
- package/dist/types/select.d.ts.map +1 -0
- package/dist/types/select.js +2 -0
- package/dist/types/select.js.map +1 -0
- package/dist/types/tabs.d.ts +21 -0
- package/dist/types/tabs.d.ts.map +1 -0
- package/dist/types/tabs.js +2 -0
- package/dist/types/tabs.js.map +1 -0
- package/dist/types/toolbar.d.ts +8 -0
- package/dist/types/toolbar.d.ts.map +1 -0
- package/dist/types/toolbar.js +2 -0
- package/dist/types/toolbar.js.map +1 -0
- package/package.json +2 -4
- package/src/audit.test.ts +8 -47
- package/src/constants.ts +5 -0
- package/src/featureManifest.test.ts +31 -2
- package/src/features/app-bar/adapters/inbound/AppBar.tsx +50 -42
- package/src/features/app-bar/public.ts +1 -1
- package/src/features/bottom-sheet/public.test.ts +10 -1
- package/src/features/bottom-sheet/public.ts +9 -1
- package/src/features/breadcrumbs/adapters/inbound/Breadcrumbs.tsx +179 -0
- package/src/features/breadcrumbs/breadcrumbsMeta.ts +95 -0
- package/src/features/breadcrumbs/public.test.ts +22 -0
- package/src/features/breadcrumbs/public.ts +6 -0
- package/src/features/data-table/adapters/inbound/DataTable.tsx +9 -5
- package/src/features/dialog/adapters/inbound/Dialog.tsx +70 -0
- package/src/features/dialog/dialogMeta.ts +60 -0
- package/src/features/dialog/public.ts +2 -0
- package/src/features/form/formFieldMeta.ts +8 -1
- package/src/{components/search-bar/SearchBar.tsx → features/form/search-input/adapters/inbound/SearchInput.tsx} +10 -15
- package/src/features/form/search-input/public.ts +2 -0
- package/src/features/form/search-input/searchInputMeta.ts +68 -0
- package/src/features/form/select/adapters/inbound/Select.native.tsx +78 -0
- package/src/features/form/select/adapters/inbound/Select.tsx +1 -0
- package/src/features/form/select/adapters/inbound/Select.web.tsx +63 -0
- package/src/features/form/select/composition/SelectField.tsx +27 -0
- package/src/features/form/select/composition/SelectOptionRow.tsx +36 -0
- package/src/features/form/select/composition/SelectTrigger.tsx +32 -0
- package/src/features/form/select/composition/useSelectController.ts +21 -0
- package/src/features/form/select/public.test.ts +25 -0
- package/src/features/form/select/public.ts +2 -0
- package/src/features/form/select/selectMeta.ts +154 -0
- package/src/features/pagination/adapters/inbound/Pagination.tsx +116 -0
- package/src/features/pagination/paginationMeta.ts +54 -0
- package/src/features/pagination/public.ts +2 -0
- package/src/features/pagination/utils/resolvePaginationPage.ts +6 -0
- package/src/features/pagination/utils/resolvePaginationState.test.ts +29 -0
- package/src/features/pagination/utils/resolvePaginationState.ts +70 -0
- package/src/features/popover-menu/adapters/inbound/PopoverMenu.tsx +60 -0
- package/src/{components/rating/meta.ts → features/popover-menu/popoverMenuMeta.ts} +3 -3
- package/src/features/popover-menu/public.test.ts +11 -0
- package/src/features/popover-menu/public.ts +6 -0
- package/src/features/rating/adapters/inbound/Rating.tsx +70 -0
- package/src/features/rating/public.ts +2 -0
- package/src/features/rating/ratingMeta.ts +44 -0
- package/src/features/rating/utils/resolveRatingSegments.test.ts +20 -0
- package/src/features/rating/utils/resolveRatingSegments.ts +19 -0
- package/src/features/tabs/adapters/inbound/Tab.tsx +26 -0
- package/src/features/tabs/adapters/inbound/TabList.tsx +18 -0
- package/src/features/tabs/adapters/inbound/TabPanel.tsx +23 -0
- package/src/features/tabs/adapters/inbound/Tabs.tsx +23 -0
- package/src/features/tabs/composition/TabsInteractionPolicyContext.ts +4 -0
- package/src/features/tabs/public.ts +5 -0
- package/src/features/tabs/tabListMeta.ts +10 -0
- package/src/features/tabs/tabMeta.ts +15 -0
- package/src/features/tabs/tabPanelMeta.ts +13 -0
- package/src/features/tabs/tabsMeta.ts +41 -0
- package/src/features/toolbar/adapters/inbound/Toolbar.tsx +31 -0
- package/src/features/toolbar/public.ts +2 -0
- package/src/features/toolbar/toolbarMeta.ts +24 -0
- package/src/{components → features/typography}/contentFallback.test.ts +2 -8
- package/src/features/uploader/adapters/inbound/Uploader.tsx +3 -3
- package/src/index.ts +29 -19
- package/src/interactionPolicy.test.ts +19 -21
- package/src/metadata/allowedChildren.ts +6 -0
- package/src/metadata/bindableComponentMeta.test.ts +8 -0
- package/src/metadata/bindableComponentMeta.ts +1 -2
- package/src/metadata/componentMeta.test.ts +21 -1
- package/src/metadata/componentMeta.ts +18 -14
- package/src/nativePeerContract.test.ts +5 -19
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +3 -3
- package/src/patterns/theme-composer/ThemeComposer.tsx +7 -8
- package/src/platformAcceptance.test.ts +1 -1
- package/src/registry.ts +15 -14
- package/src/showcaseCoverage.test.ts +6 -3
- package/src/theme/themeScopeStructure.test.ts +24 -14
- package/src/types/app-bar.ts +6 -3
- package/src/{components/breadcrumbs/types.ts → types/breadcrumbs.ts} +8 -5
- package/src/types/data-table.ts +2 -2
- package/src/types/dialog.ts +15 -0
- package/src/{components/pagination/types.ts → types/pagination.ts} +5 -8
- package/src/types/popover-menu.ts +31 -0
- package/src/types/rating.ts +9 -0
- package/src/types/search-input.ts +14 -0
- package/src/{components/select/types.ts → types/select.ts} +11 -3
- package/src/types/tabs.ts +25 -0
- package/src/types/toolbar.ts +9 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +0 -7
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts.map +0 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +0 -80
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +0 -1
- package/dist/components/breadcrumbs/index.d.ts +0 -3
- package/dist/components/breadcrumbs/index.d.ts.map +0 -1
- package/dist/components/breadcrumbs/index.js +0 -2
- package/dist/components/breadcrumbs/index.js.map +0 -1
- package/dist/components/breadcrumbs/meta.d.ts +0 -9
- package/dist/components/breadcrumbs/meta.d.ts.map +0 -1
- package/dist/components/breadcrumbs/meta.js +0 -9
- package/dist/components/breadcrumbs/meta.js.map +0 -1
- package/dist/components/breadcrumbs/types.d.ts.map +0 -1
- package/dist/components/breadcrumbs/types.js +0 -2
- package/dist/components/breadcrumbs/types.js.map +0 -1
- package/dist/components/menu/DropdownMenu.d.ts +0 -7
- package/dist/components/menu/DropdownMenu.d.ts.map +0 -1
- package/dist/components/menu/DropdownMenu.js +0 -9
- package/dist/components/menu/DropdownMenu.js.map +0 -1
- package/dist/components/menu/Menu.d.ts +0 -7
- package/dist/components/menu/Menu.d.ts.map +0 -1
- package/dist/components/menu/Menu.js +0 -46
- package/dist/components/menu/Menu.js.map +0 -1
- package/dist/components/menu/index.d.ts +0 -4
- package/dist/components/menu/index.d.ts.map +0 -1
- package/dist/components/menu/index.js +0 -3
- package/dist/components/menu/index.js.map +0 -1
- package/dist/components/menu/meta.d.ts +0 -17
- package/dist/components/menu/meta.d.ts.map +0 -1
- package/dist/components/menu/meta.js +0 -17
- package/dist/components/menu/meta.js.map +0 -1
- package/dist/components/menu/types.d.ts +0 -22
- package/dist/components/menu/types.d.ts.map +0 -1
- package/dist/components/menu/types.js +0 -2
- package/dist/components/menu/types.js.map +0 -1
- package/dist/components/modal/Modal.d.ts +0 -7
- package/dist/components/modal/Modal.d.ts.map +0 -1
- package/dist/components/modal/Modal.js +0 -39
- package/dist/components/modal/Modal.js.map +0 -1
- package/dist/components/modal/index.d.ts +0 -3
- package/dist/components/modal/index.d.ts.map +0 -1
- package/dist/components/modal/index.js +0 -2
- package/dist/components/modal/index.js.map +0 -1
- package/dist/components/modal/meta.d.ts +0 -9
- package/dist/components/modal/meta.d.ts.map +0 -1
- package/dist/components/modal/meta.js +0 -9
- package/dist/components/modal/meta.js.map +0 -1
- package/dist/components/modal/types.d.ts +0 -12
- package/dist/components/modal/types.d.ts.map +0 -1
- package/dist/components/modal/types.js +0 -2
- package/dist/components/modal/types.js.map +0 -1
- package/dist/components/pagination/Pagination.d.ts +0 -7
- package/dist/components/pagination/Pagination.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.js +0 -96
- package/dist/components/pagination/Pagination.js.map +0 -1
- package/dist/components/pagination/index.d.ts +0 -3
- package/dist/components/pagination/index.d.ts.map +0 -1
- package/dist/components/pagination/index.js +0 -2
- package/dist/components/pagination/index.js.map +0 -1
- package/dist/components/pagination/meta.d.ts +0 -9
- package/dist/components/pagination/meta.d.ts.map +0 -1
- package/dist/components/pagination/meta.js +0 -9
- package/dist/components/pagination/meta.js.map +0 -1
- package/dist/components/pagination/types.d.ts +0 -18
- package/dist/components/pagination/types.d.ts.map +0 -1
- package/dist/components/pagination/types.js +0 -2
- package/dist/components/pagination/types.js.map +0 -1
- package/dist/components/rating/Rating.d.ts +0 -7
- package/dist/components/rating/Rating.d.ts.map +0 -1
- package/dist/components/rating/Rating.js +0 -26
- package/dist/components/rating/Rating.js.map +0 -1
- package/dist/components/rating/index.d.ts +0 -3
- package/dist/components/rating/index.d.ts.map +0 -1
- package/dist/components/rating/index.js +0 -2
- package/dist/components/rating/index.js.map +0 -1
- package/dist/components/rating/meta.d.ts +0 -9
- package/dist/components/rating/meta.d.ts.map +0 -1
- package/dist/components/rating/meta.js +0 -9
- package/dist/components/rating/meta.js.map +0 -1
- package/dist/components/rating/resolveRatingSegments.d.ts +0 -7
- package/dist/components/rating/resolveRatingSegments.d.ts.map +0 -1
- package/dist/components/rating/resolveRatingSegments.js +0 -22
- package/dist/components/rating/resolveRatingSegments.js.map +0 -1
- package/dist/components/rating/types.d.ts +0 -11
- package/dist/components/rating/types.d.ts.map +0 -1
- package/dist/components/rating/types.js +0 -26
- package/dist/components/rating/types.js.map +0 -1
- package/dist/components/search-bar/SearchBar.d.ts +0 -7
- package/dist/components/search-bar/SearchBar.d.ts.map +0 -1
- package/dist/components/search-bar/SearchBar.js.map +0 -1
- package/dist/components/search-bar/index.d.ts +0 -3
- package/dist/components/search-bar/index.d.ts.map +0 -1
- package/dist/components/search-bar/index.js +0 -2
- package/dist/components/search-bar/index.js.map +0 -1
- package/dist/components/search-bar/meta.d.ts +0 -9
- package/dist/components/search-bar/meta.d.ts.map +0 -1
- package/dist/components/search-bar/meta.js +0 -9
- package/dist/components/search-bar/meta.js.map +0 -1
- package/dist/components/search-bar/types.d.ts +0 -14
- package/dist/components/search-bar/types.d.ts.map +0 -1
- package/dist/components/search-bar/types.js +0 -2
- package/dist/components/search-bar/types.js.map +0 -1
- package/dist/components/select/Select.d.ts +0 -7
- package/dist/components/select/Select.d.ts.map +0 -1
- package/dist/components/select/Select.js +0 -32
- package/dist/components/select/Select.js.map +0 -1
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js +0 -3
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/meta.d.ts +0 -9
- package/dist/components/select/meta.d.ts.map +0 -1
- package/dist/components/select/meta.js +0 -9
- package/dist/components/select/meta.js.map +0 -1
- package/dist/components/select/types.d.ts +0 -14
- package/dist/components/select/types.d.ts.map +0 -1
- package/dist/components/select/types.js +0 -2
- package/dist/components/select/types.js.map +0 -1
- package/dist/components/tabs/Tabs.d.ts +0 -9
- package/dist/components/tabs/Tabs.d.ts.map +0 -1
- package/dist/components/tabs/Tabs.js +0 -59
- package/dist/components/tabs/Tabs.js.map +0 -1
- package/dist/components/tabs/index.d.ts +0 -3
- package/dist/components/tabs/index.d.ts.map +0 -1
- package/dist/components/tabs/index.js +0 -3
- package/dist/components/tabs/index.js.map +0 -1
- package/dist/components/tabs/meta.d.ts +0 -9
- package/dist/components/tabs/meta.d.ts.map +0 -1
- package/dist/components/tabs/meta.js +0 -9
- package/dist/components/tabs/meta.js.map +0 -1
- package/dist/components/tabs/types.d.ts +0 -22
- package/dist/components/tabs/types.d.ts.map +0 -1
- package/dist/components/tabs/types.js +0 -2
- package/dist/components/tabs/types.js.map +0 -1
- package/dist/components/toolbar/Toolbar.d.ts +0 -9
- package/dist/components/toolbar/Toolbar.d.ts.map +0 -1
- package/dist/components/toolbar/Toolbar.js +0 -26
- package/dist/components/toolbar/Toolbar.js.map +0 -1
- package/dist/components/toolbar/ToolbarAction.d.ts +0 -9
- package/dist/components/toolbar/ToolbarAction.d.ts.map +0 -1
- package/dist/components/toolbar/ToolbarAction.js +0 -13
- package/dist/components/toolbar/ToolbarAction.js.map +0 -1
- package/dist/components/toolbar/index.d.ts +0 -4
- package/dist/components/toolbar/index.d.ts.map +0 -1
- package/dist/components/toolbar/index.js +0 -4
- package/dist/components/toolbar/index.js.map +0 -1
- package/dist/components/toolbar/meta.d.ts +0 -17
- package/dist/components/toolbar/meta.d.ts.map +0 -1
- package/dist/components/toolbar/meta.js +0 -17
- package/dist/components/toolbar/meta.js.map +0 -1
- package/dist/components/toolbar/types.d.ts +0 -18
- package/dist/components/toolbar/types.d.ts.map +0 -1
- package/dist/components/toolbar/types.js +0 -2
- package/dist/components/toolbar/types.js.map +0 -1
- package/src/components/breadcrumbs/Breadcrumbs.tsx +0 -147
- package/src/components/breadcrumbs/index.ts +0 -2
- package/src/components/breadcrumbs/meta.ts +0 -10
- package/src/components/menu/DropdownMenu.tsx +0 -11
- package/src/components/menu/Menu.tsx +0 -59
- package/src/components/menu/index.ts +0 -3
- package/src/components/menu/meta.ts +0 -19
- package/src/components/menu/types.ts +0 -31
- package/src/components/modal/Modal.tsx +0 -63
- package/src/components/modal/index.ts +0 -2
- package/src/components/modal/meta.ts +0 -10
- package/src/components/modal/types.ts +0 -16
- package/src/components/pagination/Pagination.tsx +0 -199
- package/src/components/pagination/index.ts +0 -2
- package/src/components/pagination/meta.ts +0 -10
- package/src/components/rating/Rating.tsx +0 -42
- package/src/components/rating/index.ts +0 -2
- package/src/components/rating/resolveRatingSegments.test.ts +0 -60
- package/src/components/rating/resolveRatingSegments.ts +0 -34
- package/src/components/rating/types.ts +0 -37
- package/src/components/search-bar/index.ts +0 -2
- package/src/components/search-bar/meta.ts +0 -10
- package/src/components/search-bar/types.ts +0 -14
- package/src/components/select/Select.tsx +0 -67
- package/src/components/select/index.ts +0 -2
- package/src/components/select/meta.ts +0 -10
- package/src/components/tabs/Tabs.tsx +0 -129
- package/src/components/tabs/index.ts +0 -2
- package/src/components/tabs/meta.ts +0 -10
- package/src/components/tabs/types.ts +0 -25
- package/src/components/toolbar/Toolbar.tsx +0 -48
- package/src/components/toolbar/ToolbarAction.tsx +0 -28
- package/src/components/toolbar/index.ts +0 -3
- package/src/components/toolbar/meta.ts +0 -19
- package/src/components/toolbar/types.ts +0 -21
|
@@ -44,7 +44,6 @@ const themeScopeSource = readSource('ZoraThemeScope.tsx');
|
|
|
44
44
|
const hocSource = readSource('withZoraThemeScope.tsx');
|
|
45
45
|
|
|
46
46
|
const scopeGuardDirs = [
|
|
47
|
-
join(srcDir, 'components'),
|
|
48
47
|
join(srcDir, 'patterns'),
|
|
49
48
|
join(srcDir, 'layout'),
|
|
50
49
|
join(srcDir, 'foundation'),
|
|
@@ -60,6 +59,7 @@ const scopedComponentFiles = [
|
|
|
60
59
|
join(srcDir, 'features', 'accordion', 'adapters', 'inbound', 'Accordion.tsx'),
|
|
61
60
|
join(srcDir, 'features', 'accordion', 'adapters', 'inbound', 'AccordionItem.tsx'),
|
|
62
61
|
join(srcDir, 'features', 'badge', 'adapters', 'inbound', 'Badge.tsx'),
|
|
62
|
+
join(srcDir, 'features', 'breadcrumbs', 'adapters', 'inbound', 'Breadcrumbs.tsx'),
|
|
63
63
|
join(srcDir, 'features', 'button', 'adapters', 'inbound', 'Button.tsx'),
|
|
64
64
|
join(srcDir, 'features', 'button', 'adapters', 'inbound', 'ButtonGroup.tsx'),
|
|
65
65
|
join(srcDir, 'features', 'card', 'adapters', 'inbound', 'Card.tsx'),
|
|
@@ -67,29 +67,35 @@ const scopedComponentFiles = [
|
|
|
67
67
|
join(srcDir, 'features', 'card', 'adapters', 'inbound', 'MetricCard.tsx'),
|
|
68
68
|
join(srcDir, 'features', 'date-picker', 'adapters', 'inbound', 'DatePicker.native.tsx'),
|
|
69
69
|
join(srcDir, 'features', 'date-picker', 'adapters', 'inbound', 'DatePicker.web.tsx'),
|
|
70
|
+
join(srcDir, 'features', 'dialog', 'adapters', 'inbound', 'Dialog.tsx'),
|
|
70
71
|
join(srcDir, 'features', 'form', 'checkbox', 'adapters', 'inbound', 'Checkbox.tsx'),
|
|
71
72
|
join(srcDir, 'features', 'form', 'checkbox', 'adapters', 'inbound', 'CheckboxGroup.tsx'),
|
|
72
73
|
join(srcDir, 'features', 'form', 'adapters', 'inbound', 'Form.tsx'),
|
|
73
74
|
join(srcDir, 'features', 'form', 'adapters', 'inbound', 'FormActions.tsx'),
|
|
74
75
|
join(srcDir, 'features', 'form', 'adapters', 'inbound', 'FormError.tsx'),
|
|
75
76
|
join(srcDir, 'features', 'form', 'adapters', 'inbound', 'FormField.tsx'),
|
|
77
|
+
join(srcDir, 'features', 'form', 'search-input', 'adapters', 'inbound', 'SearchInput.tsx'),
|
|
78
|
+
join(srcDir, 'features', 'form', 'select', 'adapters', 'inbound', 'Select.native.tsx'),
|
|
79
|
+
join(srcDir, 'features', 'form', 'select', 'adapters', 'inbound', 'Select.web.tsx'),
|
|
76
80
|
join(srcDir, 'features', 'typography', 'adapters', 'inbound', 'Heading.tsx'),
|
|
77
81
|
join(srcDir, 'features', 'icon', 'adapters', 'inbound', 'Icon.tsx'),
|
|
78
82
|
join(srcDir, 'features', 'button', 'adapters', 'inbound', 'IconButton.tsx'),
|
|
79
83
|
join(srcDir, 'features', 'form', 'text-input', 'adapters', 'inbound', 'TextInput.tsx'),
|
|
80
|
-
join(srcDir, '
|
|
84
|
+
join(srcDir, 'features', 'pagination', 'adapters', 'inbound', 'Pagination.tsx'),
|
|
85
|
+
join(srcDir, 'features', 'popover-menu', 'adapters', 'inbound', 'PopoverMenu.tsx'),
|
|
81
86
|
join(srcDir, 'features', 'progress', 'adapters', 'inbound', 'Progress.tsx'),
|
|
82
87
|
join(srcDir, 'features', 'form', 'radio', 'adapters', 'inbound', 'Radio.tsx'),
|
|
83
88
|
join(srcDir, 'features', 'form', 'radio', 'adapters', 'inbound', 'RadioGroup.tsx'),
|
|
84
|
-
join(srcDir, '
|
|
85
|
-
join(srcDir, '
|
|
86
|
-
join(srcDir, '
|
|
89
|
+
join(srcDir, 'features', 'rating', 'adapters', 'inbound', 'Rating.tsx'),
|
|
90
|
+
join(srcDir, 'features', 'tabs', 'adapters', 'inbound', 'Tab.tsx'),
|
|
91
|
+
join(srcDir, 'features', 'tabs', 'adapters', 'inbound', 'TabList.tsx'),
|
|
92
|
+
join(srcDir, 'features', 'tabs', 'adapters', 'inbound', 'TabPanel.tsx'),
|
|
93
|
+
join(srcDir, 'features', 'tabs', 'adapters', 'inbound', 'Tabs.tsx'),
|
|
87
94
|
join(srcDir, 'features', 'time-picker', 'adapters', 'inbound', 'TimePicker.native.tsx'),
|
|
88
95
|
join(srcDir, 'features', 'time-picker', 'adapters', 'inbound', 'TimePicker.web.tsx'),
|
|
89
96
|
join(srcDir, 'features', 'toast', 'adapters', 'inbound', 'Toast.tsx'),
|
|
97
|
+
join(srcDir, 'features', 'toolbar', 'adapters', 'inbound', 'Toolbar.tsx'),
|
|
90
98
|
join(srcDir, 'features', 'typography', 'adapters', 'inbound', 'Text.tsx'),
|
|
91
|
-
join(srcDir, 'components', 'toolbar', 'Toolbar.tsx'),
|
|
92
|
-
join(srcDir, 'components', 'toolbar', 'ToolbarAction.tsx'),
|
|
93
99
|
|
|
94
100
|
join(srcDir, 'layout', 'app-shell', 'AppShell.tsx'),
|
|
95
101
|
join(srcDir, 'layout', 'screen', 'Screen.tsx'),
|
|
@@ -137,6 +143,7 @@ const scopedPropTypeFiles = [
|
|
|
137
143
|
join(srcDir, 'types', 'app-bar.ts'),
|
|
138
144
|
join(srcDir, 'types', 'accordion.ts'),
|
|
139
145
|
join(srcDir, 'types', 'badge.ts'),
|
|
146
|
+
join(srcDir, 'types', 'breadcrumbs.ts'),
|
|
140
147
|
join(srcDir, 'types', 'button.ts'),
|
|
141
148
|
join(srcDir, 'types', 'button-group.ts'),
|
|
142
149
|
join(srcDir, 'types', 'card.ts'),
|
|
@@ -144,21 +151,24 @@ const scopedPropTypeFiles = [
|
|
|
144
151
|
join(srcDir, 'types', 'metric-card.ts'),
|
|
145
152
|
join(srcDir, 'types', 'checkbox.ts'),
|
|
146
153
|
join(srcDir, 'types', 'date-picker.ts'),
|
|
154
|
+
join(srcDir, 'types', 'dialog.ts'),
|
|
147
155
|
join(srcDir, 'types', 'form.ts'),
|
|
148
156
|
join(srcDir, 'types', 'heading.ts'),
|
|
149
157
|
join(srcDir, 'types', 'icon.ts'),
|
|
150
158
|
join(srcDir, 'types', 'icon-button.ts'),
|
|
151
|
-
join(srcDir, 'types', '
|
|
152
|
-
join(srcDir, '
|
|
159
|
+
join(srcDir, 'types', 'pagination.ts'),
|
|
160
|
+
join(srcDir, 'types', 'popover-menu.ts'),
|
|
153
161
|
join(srcDir, 'types', 'progress.ts'),
|
|
154
162
|
join(srcDir, 'types', 'radio.ts'),
|
|
155
|
-
join(srcDir, '
|
|
156
|
-
join(srcDir, '
|
|
157
|
-
join(srcDir, '
|
|
163
|
+
join(srcDir, 'types', 'rating.ts'),
|
|
164
|
+
join(srcDir, 'types', 'search-input.ts'),
|
|
165
|
+
join(srcDir, 'types', 'select.ts'),
|
|
166
|
+
join(srcDir, 'types', 'tabs.ts'),
|
|
167
|
+
join(srcDir, 'types', 'text-input.ts'),
|
|
158
168
|
join(srcDir, 'types', 'text.ts'),
|
|
159
169
|
join(srcDir, 'types', 'time-picker.ts'),
|
|
160
170
|
join(srcDir, 'types', 'toast.ts'),
|
|
161
|
-
join(srcDir, '
|
|
171
|
+
join(srcDir, 'types', 'toolbar.ts'),
|
|
162
172
|
|
|
163
173
|
join(srcDir, 'layout', 'app-shell', 'types.ts'),
|
|
164
174
|
join(srcDir, 'layout', 'screen', 'types.ts'),
|
|
@@ -194,7 +204,7 @@ describe('theme scope structure', () => {
|
|
|
194
204
|
it('implements nested scopes without nesting Surface ThemeProvider', () => {
|
|
195
205
|
expect(themeScopeSource).toMatch(/<ThemeContext\s+value=/u);
|
|
196
206
|
expect(themeScopeSource).toMatch(/createTheme\(/u);
|
|
197
|
-
expect(themeScopeSource).not.toMatch(
|
|
207
|
+
expect(themeScopeSource).not.toMatch(/<ThemeProvider\b/u);
|
|
198
208
|
});
|
|
199
209
|
|
|
200
210
|
it('wraps components only when mode/themeId overrides are present', () => {
|
package/src/types/app-bar.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
4
|
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
5
|
+
import type { PopoverMenuAction } from './popover-menu';
|
|
5
6
|
|
|
6
7
|
export type AppBarMode =
|
|
7
8
|
| {
|
|
@@ -16,11 +17,13 @@ export type AppBarMode =
|
|
|
16
17
|
cancelIcon?: ButtonIconSpec;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
export interface
|
|
20
|
-
|
|
20
|
+
export interface AppBarOverflowMenu {
|
|
21
|
+
actions: readonly PopoverMenuAction[];
|
|
21
22
|
label?: string;
|
|
22
23
|
icon?: ButtonIconSpec;
|
|
23
24
|
disabled?: boolean;
|
|
25
|
+
closeOnSelect?: boolean;
|
|
26
|
+
onDismiss?: () => void;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export interface AppBarProps extends ZoraBaseProps {
|
|
@@ -28,7 +31,7 @@ export interface AppBarProps extends ZoraBaseProps {
|
|
|
28
31
|
subtitle?: React.ReactNode;
|
|
29
32
|
leading?: React.ReactNode;
|
|
30
33
|
actions?: React.ReactNode;
|
|
31
|
-
overflow?:
|
|
34
|
+
overflow?: AppBarOverflowMenu;
|
|
32
35
|
appMode?: AppBarMode;
|
|
33
36
|
children?: React.ReactNode;
|
|
34
37
|
safeAreaTop?: boolean;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
-
import type React from 'react';
|
|
3
2
|
|
|
4
|
-
import type { ZoraBaseProps } from '
|
|
3
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
5
4
|
|
|
6
5
|
export interface BreadcrumbItem {
|
|
7
6
|
id: string;
|
|
8
|
-
label:
|
|
7
|
+
label: string;
|
|
9
8
|
icon?: ButtonIconSpec;
|
|
10
|
-
onPress?: () => void;
|
|
11
9
|
disabled?: boolean;
|
|
12
10
|
}
|
|
13
11
|
|
|
12
|
+
export interface BreadcrumbPressEvent {
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
14
16
|
export interface BreadcrumbsProps extends ZoraBaseProps {
|
|
15
17
|
items: readonly BreadcrumbItem[];
|
|
16
|
-
separator?:
|
|
18
|
+
separator?: string;
|
|
17
19
|
maxItems?: number;
|
|
18
20
|
compact?: boolean;
|
|
19
21
|
disabled?: boolean;
|
|
22
|
+
onItemPress?: (event: BreadcrumbPressEvent) => void;
|
|
20
23
|
testID?: string;
|
|
21
24
|
}
|
package/src/types/data-table.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
import type { MenuActionIntent } from '../components/menu';
|
|
5
4
|
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
5
|
+
import type { PopoverMenuActionIntent } from './popover-menu';
|
|
6
6
|
|
|
7
7
|
export type DataTableColumnAlign = 'start' | 'center' | 'end';
|
|
8
8
|
export type DataTableDensity = 'comfortable' | 'compact';
|
|
@@ -36,7 +36,7 @@ export interface DataTableRowAction<TRow extends object> {
|
|
|
36
36
|
title: React.ReactNode;
|
|
37
37
|
description?: React.ReactNode;
|
|
38
38
|
icon?: ButtonIconSpec;
|
|
39
|
-
intent?:
|
|
39
|
+
intent?: PopoverMenuActionIntent;
|
|
40
40
|
disabled?: boolean;
|
|
41
41
|
onPress?: (row: TRow) => void;
|
|
42
42
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { ZoraContentWidth } from '../internal/recipes';
|
|
4
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
5
|
+
|
|
6
|
+
export interface DialogProps extends ZoraBaseProps {
|
|
7
|
+
visible: boolean;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
closeOnBackdrop?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
description?: React.ReactNode;
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
width?: ZoraContentWidth;
|
|
15
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
1
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
4
2
|
|
|
5
3
|
export interface PaginationProps extends ZoraBaseProps {
|
|
6
4
|
page: number;
|
|
@@ -10,10 +8,9 @@ export interface PaginationProps extends ZoraBaseProps {
|
|
|
10
8
|
siblingCount?: number;
|
|
11
9
|
boundaryCount?: number;
|
|
12
10
|
showFirstLast?: boolean;
|
|
13
|
-
previousLabel?:
|
|
14
|
-
nextLabel?:
|
|
15
|
-
firstLabel?:
|
|
16
|
-
lastLabel?:
|
|
11
|
+
previousLabel?: string;
|
|
12
|
+
nextLabel?: string;
|
|
13
|
+
firstLabel?: string;
|
|
14
|
+
lastLabel?: string;
|
|
17
15
|
compact?: boolean;
|
|
18
|
-
testID?: string;
|
|
19
16
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ButtonIconSpec,
|
|
3
|
+
PopoverAnchorRenderProps,
|
|
4
|
+
PopoverMenuActionIntent as SurfacePopoverMenuActionIntent,
|
|
5
|
+
} from '@ankhorage/surface';
|
|
6
|
+
import type React from 'react';
|
|
7
|
+
|
|
8
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
9
|
+
|
|
10
|
+
export type PopoverMenuActionIntent = SurfacePopoverMenuActionIntent;
|
|
11
|
+
|
|
12
|
+
export interface PopoverMenuAction {
|
|
13
|
+
id: string;
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
icon?: ButtonIconSpec;
|
|
17
|
+
leading?: React.ReactNode;
|
|
18
|
+
trailing?: React.ReactNode;
|
|
19
|
+
intent?: PopoverMenuActionIntent;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
onPress?: () => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface PopoverMenuProps extends ZoraBaseProps {
|
|
26
|
+
trigger: (controls: PopoverAnchorRenderProps) => React.ReactNode;
|
|
27
|
+
actions: readonly PopoverMenuAction[];
|
|
28
|
+
onDismiss?: () => void;
|
|
29
|
+
closeOnSelect?: boolean;
|
|
30
|
+
testID?: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ZoraColor, ZoraControlSize } from '../internal/recipes';
|
|
2
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
3
|
+
|
|
4
|
+
export interface RatingProps extends ZoraBaseProps {
|
|
5
|
+
value: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
color?: ZoraColor;
|
|
8
|
+
size?: ZoraControlSize;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ZoraControlSize } from '../internal/recipes';
|
|
2
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
3
|
+
|
|
4
|
+
export interface SearchInputProps extends ZoraBaseProps {
|
|
5
|
+
value?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
onSubmit?: (value: string) => void;
|
|
9
|
+
onClear?: () => void;
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
size?: ZoraControlSize;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ZoraBaseProps } from '
|
|
1
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
2
2
|
|
|
3
3
|
export interface SelectOption<TValue extends string = string> {
|
|
4
4
|
value: TValue;
|
|
@@ -7,9 +7,17 @@ export interface SelectOption<TValue extends string = string> {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface SelectProps<TValue extends string = string> extends ZoraBaseProps {
|
|
10
|
-
value
|
|
10
|
+
value?: TValue;
|
|
11
|
+
defaultValue?: TValue;
|
|
11
12
|
options: readonly SelectOption<TValue>[];
|
|
12
|
-
onValueChange
|
|
13
|
+
onValueChange?: (value: TValue) => void;
|
|
14
|
+
label?: string;
|
|
15
|
+
helperText?: string;
|
|
16
|
+
errorText?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
required?: boolean;
|
|
13
19
|
disabled?: boolean;
|
|
20
|
+
readOnly?: boolean;
|
|
14
21
|
invalid?: boolean;
|
|
22
|
+
testID?: string;
|
|
15
23
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
4
|
+
|
|
5
|
+
export interface TabsProps extends ZoraBaseProps {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TabListProps extends ZoraBaseProps {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface TabProps extends ZoraBaseProps {
|
|
17
|
+
value: string;
|
|
18
|
+
label: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TabPanelProps extends ZoraBaseProps {
|
|
23
|
+
value: string;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BreadcrumbsProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Renders a breadcrumb trail for hierarchical navigation.
|
|
5
|
-
*/
|
|
6
|
-
export declare const Breadcrumbs: (props: BreadcrumbsProps) => React.ReactElement | null;
|
|
7
|
-
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAsIhE;;GAEG;AACH,eAAO,MAAM,WAAW,wDAAuC,CAAC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from '../../features/button/public';
|
|
3
|
-
import { Icon } from '../../features/icon/public';
|
|
4
|
-
import { Text } from '../../features/typography/public';
|
|
5
|
-
import { Inline } from '../../foundation';
|
|
6
|
-
import { resolveIconSize } from '../../internal/recipes';
|
|
7
|
-
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
8
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
9
|
-
function normalizeMaxItems(value) {
|
|
10
|
-
if (value === undefined || !Number.isFinite(value)) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
return Math.max(0, Math.trunc(value));
|
|
14
|
-
}
|
|
15
|
-
function createRenderItems(items, maxItems) {
|
|
16
|
-
if (maxItems === undefined || maxItems === 0 || items.length <= maxItems || maxItems < 3) {
|
|
17
|
-
return items.map((item) => ({ item, type: 'item' }));
|
|
18
|
-
}
|
|
19
|
-
const [firstItem] = items;
|
|
20
|
-
if (firstItem === undefined) {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
const trailingCount = maxItems - 2;
|
|
24
|
-
const trailingItems = items.slice(items.length - trailingCount);
|
|
25
|
-
return [
|
|
26
|
-
{ item: firstItem, type: 'item' },
|
|
27
|
-
{ type: 'ellipsis' },
|
|
28
|
-
...trailingItems.map((item) => ({ item, type: 'item' })),
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
function renderSeparator(separator) {
|
|
32
|
-
return (<Text emphasis="muted" variant="bodySmall">
|
|
33
|
-
{separator}
|
|
34
|
-
</Text>);
|
|
35
|
-
}
|
|
36
|
-
function BreadcrumbLabel({ item, compact }) {
|
|
37
|
-
const { theme } = useZoraTheme();
|
|
38
|
-
return (<Inline align="center" gap="xs" wrap="nowrap">
|
|
39
|
-
{item.icon ? (<Icon {...item.icon} color={theme.semantics.content.muted} size={resolveIconSize(compact ? 's' : 'm')}/>) : null}
|
|
40
|
-
<Text emphasis="muted" variant={compact ? 'caption' : 'bodySmall'}>
|
|
41
|
-
{item.label}
|
|
42
|
-
</Text>
|
|
43
|
-
</Inline>);
|
|
44
|
-
}
|
|
45
|
-
function BreadcrumbsInner({ themeId: _themeId, mode: _mode, interactionPolicy, items, separator = '/', maxItems, compact = false, disabled = false, testID, }) {
|
|
46
|
-
const normalizedMaxItems = normalizeMaxItems(maxItems);
|
|
47
|
-
const renderItems = createRenderItems(items, normalizedMaxItems);
|
|
48
|
-
const currentItemId = items.at(-1)?.id;
|
|
49
|
-
if (items.length === 0) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
return (<Inline align="center" gap={compact ? 'xs' : 's'} testID={testID} wrap="wrap">
|
|
53
|
-
{renderItems.map((renderItem, index) => {
|
|
54
|
-
const isLastRenderedItem = index === renderItems.length - 1;
|
|
55
|
-
const showSeparator = !isLastRenderedItem;
|
|
56
|
-
if (renderItem.type === 'ellipsis') {
|
|
57
|
-
return (<React.Fragment key="ellipsis">
|
|
58
|
-
<Text emphasis="muted" variant={compact ? 'caption' : 'bodySmall'}>
|
|
59
|
-
…
|
|
60
|
-
</Text>
|
|
61
|
-
{showSeparator ? renderSeparator(separator) : null}
|
|
62
|
-
</React.Fragment>);
|
|
63
|
-
}
|
|
64
|
-
const { item } = renderItem;
|
|
65
|
-
const current = item.id === currentItemId;
|
|
66
|
-
const interactive = !current && !disabled && !item.disabled && Boolean(item.onPress);
|
|
67
|
-
return (<React.Fragment key={item.id}>
|
|
68
|
-
{interactive ? (<Button color="neutral" interactionPolicy={interactionPolicy} leadingIcon={item.icon} onPress={item.onPress} size={compact ? 's' : 'm'} testID={testID ? `${testID}-item-${item.id}` : undefined} variant="ghost">
|
|
69
|
-
{item.label}
|
|
70
|
-
</Button>) : (<BreadcrumbLabel item={item} compact={compact}/>)}
|
|
71
|
-
{showSeparator ? renderSeparator(separator) : null}
|
|
72
|
-
</React.Fragment>);
|
|
73
|
-
})}
|
|
74
|
-
</Inline>);
|
|
75
|
-
}
|
|
76
|
-
/***
|
|
77
|
-
* Renders a breadcrumb trail for hierarchical navigation.
|
|
78
|
-
*/
|
|
79
|
-
export const Breadcrumbs = withZoraThemeScope(BreadcrumbsInner);
|
|
80
|
-
//# sourceMappingURL=Breadcrumbs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../../../src/components/breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAYpE,SAAS,iBAAiB,CAAC,KAAyB;IAClD,IAAI,K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AAC,CAC3B;YAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,MAAM,CACL,KAAK,CAAC,SAAS,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACvB,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CACtB,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAC1B,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,SAAS,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CACzD,OAAO,CAAC,OAAO,CAEf;gBAAA,CAAC,IAAI,CAAC,KAAK,CACb;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,CACF,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAG,CAClD,CACD;YAAA,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CACpD;UAAA,EAAE,KAAK,CAAC,QAAQ,CAAC,CAClB,CAAC;QACJ,CAAC,CAAC,CACJ;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Icon } from '../../features/icon/public';\nimport { Text } from '../../features/typography/public';\nimport { Inline } from '../../foundation';\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { BreadcrumbItem, BreadcrumbsProps } from './types';\n\ntype BreadcrumbRenderItem =\n | {\n item: BreadcrumbItem;\n type: 'item';\n }\n | {\n type: 'ellipsis';\n };\n\nfunction normalizeMaxItems(value: number | undefined): number | undefined {\n if (value === undefined || !Number.isFinite(value)) {\n return undefined;\n }\n\n return Math.max(0, Math.trunc(value));\n}\n\nfunction createRenderItems(\n items: readonly BreadcrumbItem[],\n maxItems: number | undefined,\n): readonly BreadcrumbRenderItem[] {\n if (maxItems === undefined || maxItems === 0 || items.length <= maxItems || maxItems < 3) {\n return items.map((item) => ({ item, type: 'item' }));\n }\n\n const [firstItem] = items;\n if (firstItem === undefined) {\n return [];\n }\n\n const trailingCount = maxItems - 2;\n const trailingItems = items.slice(items.length - trailingCount);\n\n return [\n { item: firstItem, type: 'item' },\n { type: 'ellipsis' },\n ...trailingItems.map((item) => ({ item, type: 'item' }) satisfies BreadcrumbRenderItem),\n ];\n}\n\nfunction renderSeparator(separator: React.ReactNode) {\n return (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {separator}\n </Text>\n );\n}\n\nfunction BreadcrumbLabel({ item, compact }: { item: BreadcrumbItem; compact: boolean }) {\n const { theme } = useZoraTheme();\n\n return (\n <Inline align=\"center\" gap=\"xs\" wrap=\"nowrap\">\n {item.icon ? (\n <Icon\n {...item.icon}\n color={theme.semantics.content.muted}\n size={resolveIconSize(compact ? 's' : 'm')}\n />\n ) : null}\n <Text emphasis=\"muted\" variant={compact ? 'caption' : 'bodySmall'}>\n {item.label}\n </Text>\n </Inline>\n );\n}\n\nfunction BreadcrumbsInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n items,\n separator = '/',\n maxItems,\n compact = false,\n disabled = false,\n testID,\n}: BreadcrumbsProps) {\n const normalizedMaxItems = normalizeMaxItems(maxItems);\n const renderItems = createRenderItems(items, normalizedMaxItems);\n const currentItemId = items.at(-1)?.id;\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <Inline align=\"center\" gap={compact ? 'xs' : 's'} testID={testID} wrap=\"wrap\">\n {renderItems.map((renderItem, index) => {\n const isLastRenderedItem = index === renderItems.length - 1;\n const showSeparator = !isLastRenderedItem;\n\n if (renderItem.type === 'ellipsis') {\n return (\n <React.Fragment key=\"ellipsis\">\n <Text emphasis=\"muted\" variant={compact ? 'caption' : 'bodySmall'}>\n …\n </Text>\n {showSeparator ? renderSeparator(separator) : null}\n </React.Fragment>\n );\n }\n\n const { item } = renderItem;\n const current = item.id === currentItemId;\n const interactive = !current && !disabled && !item.disabled && Boolean(item.onPress);\n\n return (\n <React.Fragment key={item.id}>\n {interactive ? (\n <Button\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n leadingIcon={item.icon}\n onPress={item.onPress}\n size={compact ? 's' : 'm'}\n testID={testID ? `${testID}-item-${item.id}` : undefined}\n variant=\"ghost\"\n >\n {item.label}\n </Button>\n ) : (\n <BreadcrumbLabel item={item} compact={compact} />\n )}\n {showSeparator ? renderSeparator(separator) : null}\n </React.Fragment>\n );\n })}\n </Inline>\n );\n}\n\n/***\n * Renders a breadcrumb trail for hierarchical navigation.\n */\nexport const Breadcrumbs = withZoraThemeScope(BreadcrumbsInner);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { Breadcrumbs } from './Breadcrumbs';\nexport type { BreadcrumbItem, BreadcrumbsProps } from './types';\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const breadcrumbsMeta: {
|
|
2
|
-
readonly name: "Breadcrumbs";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Code-facing route hierarchy component; not represented as a manifest node in v1.";
|
|
7
|
-
readonly props: {};
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;CAOU,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const breadcrumbsMeta = {
|
|
2
|
-
name: 'Breadcrumbs',
|
|
3
|
-
category: 'component',
|
|
4
|
-
directManifestNode: false,
|
|
5
|
-
allowedChildren: [],
|
|
6
|
-
note: 'Code-facing route hierarchy component; not represented as a manifest node in v1.',
|
|
7
|
-
props: {},
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/breadcrumbs/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,kFAAkF;IACxF,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const breadcrumbsMeta = {\n name: 'Breadcrumbs',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Code-facing route hierarchy component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumbs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/breadcrumbs/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface BreadcrumbItem {\n id: string;\n label: React.ReactNode;\n icon?: ButtonIconSpec;\n onPress?: () => void;\n disabled?: boolean;\n}\n\nexport interface BreadcrumbsProps extends ZoraBaseProps {\n items: readonly BreadcrumbItem[];\n separator?: React.ReactNode;\n maxItems?: number;\n compact?: boolean;\n disabled?: boolean;\n testID?: string;\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DropdownMenuProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Convenience wrapper for rendering a `Menu` as a dropdown.
|
|
5
|
-
*/
|
|
6
|
-
export declare function DropdownMenu(props: DropdownMenuProps): React.JSX.Element;
|
|
7
|
-
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAEpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC7B,CAAC","sourcesContent":["import React from 'react';\n\nimport { Menu } from './Menu';\nimport type { DropdownMenuProps } from './types';\n\n/***\n * Convenience wrapper for rendering a `Menu` as a dropdown.\n */\nexport function DropdownMenu(props: DropdownMenuProps) {\n return <Menu {...props} />;\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MenuProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Presents a list of actions as a menu with optional icons and intent styling.
|
|
5
|
-
*/
|
|
6
|
-
export declare const Menu: (props: MenuProps) => React.ReactElement | null;
|
|
7
|
-
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAC;AA+CrD;;GAEG;AACH,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Menu as SurfaceMenu } from '@ankhorage/surface';
|
|
2
|
-
import React, { useMemo } from 'react';
|
|
3
|
-
import { Icon } from '../../features/icon/public';
|
|
4
|
-
import { Box } from '../../features/layout/public';
|
|
5
|
-
import { resolveIconSize } from '../../internal/recipes';
|
|
6
|
-
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
7
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
8
|
-
function renderActionLeading(action, iconColor) {
|
|
9
|
-
if (action.leading) {
|
|
10
|
-
return action.leading;
|
|
11
|
-
}
|
|
12
|
-
if (!action.icon) {
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
|
-
return <Icon {...action.icon} color={iconColor} size={resolveIconSize('s')}/>;
|
|
16
|
-
}
|
|
17
|
-
function renderActionTrailing(action) {
|
|
18
|
-
if (!action.trailing) {
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
return <Box>{action.trailing}</Box>;
|
|
22
|
-
}
|
|
23
|
-
function toSurfaceAction(action, iconColor) {
|
|
24
|
-
return {
|
|
25
|
-
activate: action.onPress,
|
|
26
|
-
description: action.description,
|
|
27
|
-
disabled: action.disabled,
|
|
28
|
-
id: action.id,
|
|
29
|
-
intent: action.intent,
|
|
30
|
-
leading: renderActionLeading(action, iconColor),
|
|
31
|
-
selected: action.selected,
|
|
32
|
-
title: action.title,
|
|
33
|
-
trailing: renderActionTrailing(action),
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function MenuInner({ themeId: _themeId, mode: _mode, actions, onDismiss, ...props }) {
|
|
37
|
-
const { theme } = useZoraTheme();
|
|
38
|
-
const iconColor = theme.semantics.content.muted;
|
|
39
|
-
const surfaceActions = useMemo(() => actions.map((action) => toSurfaceAction(action, iconColor)), [actions, iconColor]);
|
|
40
|
-
return <SurfaceMenu {...props} actions={surfaceActions} dismiss={onDismiss}/>;
|
|
41
|
-
}
|
|
42
|
-
/***
|
|
43
|
-
* Presents a list of actions as a menu with optional icons and intent styling.
|
|
44
|
-
*/
|
|
45
|
-
export const Menu = withZoraThemeScope(MenuInner);
|
|
46
|
-
//# sourceMappingURL=Menu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAwC,MAAM,oBAAoB,CAAC;AAC/F,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,mBAAmB,CAAC,MAAkB,EAAE,SAAiB;IAChE,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,EAAG,CAAC;AACjF,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAkB;IAC9C,IAAI,CAAC,M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AAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Menu as SurfaceMenu, type MenuAction as SurfaceMenuAction } from '@ankhorage/surface';\nimport React, { useMemo } from 'react';\n\nimport { Icon } from '../../features/icon/public';\nimport { Box } from '../../features/layout/public';\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { MenuAction, MenuProps } from './types';\n\nfunction renderActionLeading(action: MenuAction, iconColor: string) {\n if (action.leading) {\n return action.leading;\n }\n\n if (!action.icon) {\n return undefined;\n }\n\n return <Icon {...action.icon} color={iconColor} size={resolveIconSize('s')} />;\n}\n\nfunction renderActionTrailing(action: MenuAction) {\n if (!action.trailing) {\n return undefined;\n }\n\n return <Box>{action.trailing}</Box>;\n}\n\nfunction toSurfaceAction(action: MenuAction, iconColor: string): SurfaceMenuAction {\n return {\n activate: action.onPress,\n description: action.description,\n disabled: action.disabled,\n id: action.id,\n intent: action.intent,\n leading: renderActionLeading(action, iconColor),\n selected: action.selected,\n title: action.title,\n trailing: renderActionTrailing(action),\n };\n}\n\nfunction MenuInner({ themeId: _themeId, mode: _mode, actions, onDismiss, ...props }: MenuProps) {\n const { theme } = useZoraTheme();\n const iconColor = theme.semantics.content.muted;\n const surfaceActions = useMemo(\n () => actions.map((action) => toSurfaceAction(action, iconColor)),\n [actions, iconColor],\n );\n\n return <SurfaceMenu {...props} actions={surfaceActions} dismiss={onDismiss} />;\n}\n\n/***\n * Presents a list of actions as a menu with optional icons and intent styling.\n */\nexport const Menu = withZoraThemeScope(MenuInner);\n"]}
|