@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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';
|
|
2
|
+
|
|
3
|
+
import { Inline } from '../../../../foundation';
|
|
4
|
+
import type { ZoraColor } from '../../../../internal/recipes';
|
|
5
|
+
import { resolveIconSize } from '../../../../internal/recipes';
|
|
6
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
7
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
8
|
+
import type { RatingProps } from '../../../../types/rating';
|
|
9
|
+
import { Icon } from '../../../icon/public';
|
|
10
|
+
import { resolveRatingSegments } from '../../utils/resolveRatingSegments';
|
|
11
|
+
|
|
12
|
+
/*** Displays a read-only star rating with optional half steps. */
|
|
13
|
+
export const Rating = withZoraThemeScope(RatingInner);
|
|
14
|
+
|
|
15
|
+
/*** Resolves rating visuals from the active ZORA theme. */
|
|
16
|
+
function RatingInner({
|
|
17
|
+
themeId: _themeId,
|
|
18
|
+
mode: _mode,
|
|
19
|
+
interactionPolicy: _interactionPolicy,
|
|
20
|
+
testID,
|
|
21
|
+
value,
|
|
22
|
+
max = 5,
|
|
23
|
+
color = 'warning',
|
|
24
|
+
size = 'm',
|
|
25
|
+
}: RatingProps) {
|
|
26
|
+
const { theme } = useZoraTheme();
|
|
27
|
+
const role = resolveRatingRole(theme, color);
|
|
28
|
+
const segments = resolveRatingSegments({ value, max });
|
|
29
|
+
const iconSize = resolveIconSize(size);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Inline align="center" gap="xxs" testID={testID} wrap="nowrap">
|
|
33
|
+
{segments.map((segment, index) => {
|
|
34
|
+
const name =
|
|
35
|
+
segment === 'full' ? 'star' : segment === 'half' ? 'star-half' : 'star-outline';
|
|
36
|
+
const segmentColor = segment === 'empty' ? theme.semantics.content.muted : role.base;
|
|
37
|
+
return (
|
|
38
|
+
<Icon key={`${index}-${segment}`} color={segmentColor} name={name} size={iconSize} />
|
|
39
|
+
);
|
|
40
|
+
})}
|
|
41
|
+
</Inline>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*** Resolves the semantic theme role for a ZORA rating color. */
|
|
46
|
+
function resolveRatingRole(theme: SurfaceTheme, color: ZoraColor): RoleSemantics {
|
|
47
|
+
switch (color) {
|
|
48
|
+
case 'secondary':
|
|
49
|
+
return theme.semantics.secondary;
|
|
50
|
+
case 'tertiary':
|
|
51
|
+
return theme.semantics.accent;
|
|
52
|
+
case 'quaternary':
|
|
53
|
+
return theme.semantics.highlight;
|
|
54
|
+
case 'error':
|
|
55
|
+
return theme.semantics.error;
|
|
56
|
+
case 'info':
|
|
57
|
+
return theme.semantics.info;
|
|
58
|
+
case 'primary':
|
|
59
|
+
return theme.semantics.action.primary;
|
|
60
|
+
case 'danger':
|
|
61
|
+
return theme.semantics.action.danger;
|
|
62
|
+
case 'success':
|
|
63
|
+
return theme.semantics.success;
|
|
64
|
+
case 'warning':
|
|
65
|
+
return theme.semantics.warning;
|
|
66
|
+
case 'neutral':
|
|
67
|
+
default:
|
|
68
|
+
return theme.semantics.action.neutral;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata/types';
|
|
2
|
+
|
|
3
|
+
export const ratingMeta = {
|
|
4
|
+
name: 'Rating',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [],
|
|
8
|
+
description: 'Displays a read-only star-based rating value.',
|
|
9
|
+
blueprint: { label: 'Rating', defaultProps: { color: 'warning', max: 5, size: 'm', value: 4.5 } },
|
|
10
|
+
bindings: {
|
|
11
|
+
props: {
|
|
12
|
+
value: {
|
|
13
|
+
label: 'Value',
|
|
14
|
+
description: 'Current rating value.',
|
|
15
|
+
value: { type: 'number' },
|
|
16
|
+
acceptsFallback: true,
|
|
17
|
+
acceptsTransforms: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
value: { type: 'number', category: 'Data', label: 'Value' },
|
|
23
|
+
max: { type: 'number', category: 'Data', label: 'Maximum', default: 5 },
|
|
24
|
+
color: {
|
|
25
|
+
type: 'enum',
|
|
26
|
+
category: 'Style',
|
|
27
|
+
label: 'Color',
|
|
28
|
+
enum: [
|
|
29
|
+
'neutral',
|
|
30
|
+
'primary',
|
|
31
|
+
'secondary',
|
|
32
|
+
'tertiary',
|
|
33
|
+
'quaternary',
|
|
34
|
+
'success',
|
|
35
|
+
'warning',
|
|
36
|
+
'danger',
|
|
37
|
+
'error',
|
|
38
|
+
'info',
|
|
39
|
+
],
|
|
40
|
+
default: 'warning',
|
|
41
|
+
},
|
|
42
|
+
size: { type: 'enum', category: 'Style', label: 'Size', enum: ['s', 'm', 'l'], default: 'm' },
|
|
43
|
+
},
|
|
44
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { resolveRatingSegments } from './resolveRatingSegments';
|
|
4
|
+
|
|
5
|
+
describe('resolveRatingSegments', () => {
|
|
6
|
+
it('supports full and half values', () => {
|
|
7
|
+
expect(resolveRatingSegments({ max: 5, value: 4.5 })).toEqual([
|
|
8
|
+
'full',
|
|
9
|
+
'full',
|
|
10
|
+
'full',
|
|
11
|
+
'full',
|
|
12
|
+
'half',
|
|
13
|
+
]);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('clamps values to the rating range', () => {
|
|
17
|
+
expect(resolveRatingSegments({ max: 3, value: -1 })).toEqual(['empty', 'empty', 'empty']);
|
|
18
|
+
expect(resolveRatingSegments({ max: 2, value: 4 })).toEqual(['full', 'full']);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type RatingSegment = 'empty' | 'full' | 'half';
|
|
2
|
+
|
|
3
|
+
/*** Resolves a numeric rating into full, half, and empty visual segments. */
|
|
4
|
+
export function resolveRatingSegments({ value, max }: ResolveRatingSegmentsInput): RatingSegment[] {
|
|
5
|
+
const normalizedMax = Math.max(0, Math.trunc(Number.isFinite(max) ? max : 0));
|
|
6
|
+
const normalizedValue = Math.min(Math.max(Number.isFinite(value) ? value : 0, 0), normalizedMax);
|
|
7
|
+
|
|
8
|
+
return Array.from({ length: normalizedMax }, (_, index) => {
|
|
9
|
+
const remaining = normalizedValue - index;
|
|
10
|
+
if (remaining >= 1) return 'full';
|
|
11
|
+
if (remaining >= 0.5) return 'half';
|
|
12
|
+
return 'empty';
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ResolveRatingSegmentsInput {
|
|
17
|
+
value: number;
|
|
18
|
+
max: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Tab as SurfaceTab } from '@ankhorage/surface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import type { TabProps } from '../../../../types/tabs';
|
|
6
|
+
import { TabsInteractionPolicyContext } from '../../composition/TabsInteractionPolicyContext';
|
|
7
|
+
|
|
8
|
+
/*** Renders one labeled selectable tab backed by Surface accessibility semantics. */
|
|
9
|
+
export const Tab = withZoraThemeScope(TabInner);
|
|
10
|
+
|
|
11
|
+
/*** Resolves inherited interaction policy before delegating tab behavior to Surface. */
|
|
12
|
+
function TabInner({
|
|
13
|
+
themeId: _themeId,
|
|
14
|
+
mode: _mode,
|
|
15
|
+
interactionPolicy,
|
|
16
|
+
label,
|
|
17
|
+
...props
|
|
18
|
+
}: TabProps) {
|
|
19
|
+
const inheritedInteractionPolicy = React.use(TabsInteractionPolicyContext);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<SurfaceTab {...props} interactionPolicy={interactionPolicy ?? inheritedInteractionPolicy}>
|
|
23
|
+
{label}
|
|
24
|
+
</SurfaceTab>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TabList as SurfaceTabList } from '@ankhorage/surface';
|
|
2
|
+
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { TabListProps } from '../../../../types/tabs';
|
|
5
|
+
|
|
6
|
+
/*** Renders the accessible list of tabs for a Tabs composition. */
|
|
7
|
+
export const TabList = withZoraThemeScope(TabListInner);
|
|
8
|
+
|
|
9
|
+
/*** Delegates tablist semantics and keyboard navigation to Surface. */
|
|
10
|
+
function TabListInner({
|
|
11
|
+
themeId: _themeId,
|
|
12
|
+
mode: _mode,
|
|
13
|
+
interactionPolicy: _interactionPolicy,
|
|
14
|
+
children,
|
|
15
|
+
testID,
|
|
16
|
+
}: TabListProps) {
|
|
17
|
+
return <SurfaceTabList testID={testID}>{children}</SurfaceTabList>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TabPanel as SurfaceTabPanel } from '@ankhorage/surface';
|
|
2
|
+
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { TabPanelProps } from '../../../../types/tabs';
|
|
5
|
+
|
|
6
|
+
/*** Renders content associated with one selected Tab. */
|
|
7
|
+
export const TabPanel = withZoraThemeScope(TabPanelInner);
|
|
8
|
+
|
|
9
|
+
/*** Delegates tabpanel visibility and accessibility linkage to Surface. */
|
|
10
|
+
function TabPanelInner({
|
|
11
|
+
themeId: _themeId,
|
|
12
|
+
mode: _mode,
|
|
13
|
+
interactionPolicy: _interactionPolicy,
|
|
14
|
+
children,
|
|
15
|
+
value,
|
|
16
|
+
testID,
|
|
17
|
+
}: TabPanelProps) {
|
|
18
|
+
return (
|
|
19
|
+
<SurfaceTabPanel testID={testID} value={value}>
|
|
20
|
+
{children}
|
|
21
|
+
</SurfaceTabPanel>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Tabs as SurfaceTabs } from '@ankhorage/surface';
|
|
2
|
+
|
|
3
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
+
import type { TabsProps } from '../../../../types/tabs';
|
|
5
|
+
import { TabsInteractionPolicyContext } from '../../composition/TabsInteractionPolicyContext';
|
|
6
|
+
|
|
7
|
+
/*** Provides accessible tab state and interaction policy through the Surface Tabs primitive. */
|
|
8
|
+
export const Tabs = withZoraThemeScope(TabsInner);
|
|
9
|
+
|
|
10
|
+
/*** Connects ZORA tab composition to the Surface tab state owner. */
|
|
11
|
+
function TabsInner({
|
|
12
|
+
themeId: _themeId,
|
|
13
|
+
mode: _mode,
|
|
14
|
+
interactionPolicy = 'enabled',
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}: TabsProps) {
|
|
18
|
+
return (
|
|
19
|
+
<TabsInteractionPolicyContext value={interactionPolicy}>
|
|
20
|
+
<SurfaceTabs {...props}>{children}</SurfaceTabs>
|
|
21
|
+
</TabsInteractionPolicyContext>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { TabListProps, TabPanelProps, TabProps, TabsProps } from '../../types/tabs';
|
|
2
|
+
export { Tab } from './adapters/inbound/Tab';
|
|
3
|
+
export { TabList } from './adapters/inbound/TabList';
|
|
4
|
+
export { TabPanel } from './adapters/inbound/TabPanel';
|
|
5
|
+
export { Tabs } from './adapters/inbound/Tabs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata/types';
|
|
2
|
+
|
|
3
|
+
export const tabListMeta = {
|
|
4
|
+
name: 'TabList',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: ['Tab'],
|
|
8
|
+
description: 'Accessible list of selectable tabs.',
|
|
9
|
+
props: {},
|
|
10
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata/types';
|
|
2
|
+
|
|
3
|
+
export const tabMeta = {
|
|
4
|
+
name: 'Tab',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [],
|
|
8
|
+
description: 'One labeled selectable tab within a TabList.',
|
|
9
|
+
blueprint: { label: 'Tab', defaultProps: { label: 'Tab', value: 'tab' } },
|
|
10
|
+
props: {
|
|
11
|
+
value: { type: 'string', category: 'State', label: 'Value' },
|
|
12
|
+
label: { type: 'string', category: 'Content', label: 'Label' },
|
|
13
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled' },
|
|
14
|
+
},
|
|
15
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
|
|
2
|
+
import type { ZoraComponentMeta } from '../../metadata/types';
|
|
3
|
+
|
|
4
|
+
export const tabPanelMeta = {
|
|
5
|
+
name: 'TabPanel',
|
|
6
|
+
category: 'component',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
9
|
+
description: 'Content panel associated with one Tab value.',
|
|
10
|
+
props: {
|
|
11
|
+
value: { type: 'string', category: 'State', label: 'Value' },
|
|
12
|
+
},
|
|
13
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata/types';
|
|
2
|
+
|
|
3
|
+
export const tabsMeta = {
|
|
4
|
+
name: 'Tabs',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: ['TabList', 'TabPanel'],
|
|
8
|
+
description: 'Owns the active value for an accessible tablist and its panels.',
|
|
9
|
+
events: {
|
|
10
|
+
valueChange: {
|
|
11
|
+
label: 'Value change',
|
|
12
|
+
eventType: 'tabs.valueChange',
|
|
13
|
+
payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
bindings: {
|
|
17
|
+
props: {
|
|
18
|
+
value: {
|
|
19
|
+
label: 'Value',
|
|
20
|
+
description: 'Current active tab value.',
|
|
21
|
+
value: { type: 'string' },
|
|
22
|
+
acceptsFallback: true,
|
|
23
|
+
acceptsTransforms: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
events: {
|
|
27
|
+
valueChange: {
|
|
28
|
+
label: 'Value change',
|
|
29
|
+
description: 'Runs when the active tab changes.',
|
|
30
|
+
payload: {
|
|
31
|
+
eventType: 'tabs.valueChange',
|
|
32
|
+
fields: [{ path: 'value', type: 'string', label: 'Value' }],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
value: { type: 'string', category: 'State', label: 'Value' },
|
|
39
|
+
defaultValue: { type: 'string', category: 'State', label: 'Default value' },
|
|
40
|
+
},
|
|
41
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
2
|
+
import type { ToolbarProps } from '../../../../types/toolbar';
|
|
3
|
+
import { Card } from '../../../card/public';
|
|
4
|
+
import { Stack } from '../../../layout/public';
|
|
5
|
+
|
|
6
|
+
/*** Renders a visible horizontal group of contextual actions and controls. */
|
|
7
|
+
export const Toolbar = withZoraThemeScope(ToolbarInner);
|
|
8
|
+
|
|
9
|
+
/*** Applies toolbar presentation without owning page placement. */
|
|
10
|
+
function ToolbarInner({
|
|
11
|
+
themeId: _themeId,
|
|
12
|
+
mode: _mode,
|
|
13
|
+
interactionPolicy,
|
|
14
|
+
children,
|
|
15
|
+
floating = false,
|
|
16
|
+
compact = true,
|
|
17
|
+
testID,
|
|
18
|
+
}: ToolbarProps) {
|
|
19
|
+
return (
|
|
20
|
+
<Card
|
|
21
|
+
compact={compact}
|
|
22
|
+
interactionPolicy={interactionPolicy}
|
|
23
|
+
tone={floating ? 'default' : 'subtle'}
|
|
24
|
+
testID={testID}
|
|
25
|
+
>
|
|
26
|
+
<Stack align="center" direction="row" gap="s">
|
|
27
|
+
{children}
|
|
28
|
+
</Stack>
|
|
29
|
+
</Card>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../metadata/types';
|
|
2
|
+
|
|
3
|
+
export const toolbarMeta = {
|
|
4
|
+
name: 'Toolbar',
|
|
5
|
+
category: 'component',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [
|
|
8
|
+
'Button',
|
|
9
|
+
'IconButton',
|
|
10
|
+
'SearchInput',
|
|
11
|
+
'Select',
|
|
12
|
+
'Chip',
|
|
13
|
+
'ChipGroup',
|
|
14
|
+
'Text',
|
|
15
|
+
'Divider',
|
|
16
|
+
],
|
|
17
|
+
description:
|
|
18
|
+
'Visible horizontal group of contextual actions and controls; layout owns placement.',
|
|
19
|
+
blueprint: { label: 'Toolbar', defaultProps: { compact: true, floating: false } },
|
|
20
|
+
props: {
|
|
21
|
+
floating: { type: 'boolean', category: 'Style', label: 'Floating', default: false },
|
|
22
|
+
compact: { type: 'boolean', category: 'Layout', label: 'Compact', default: true },
|
|
23
|
+
},
|
|
24
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -3,14 +3,8 @@ import { join } from 'node:path';
|
|
|
3
3
|
|
|
4
4
|
import { describe, expect, it } from 'bun:test';
|
|
5
5
|
|
|
6
|
-
const textSource = readFileSync(
|
|
7
|
-
|
|
8
|
-
'utf8',
|
|
9
|
-
);
|
|
10
|
-
const headingSource = readFileSync(
|
|
11
|
-
join(import.meta.dir, '../features/typography/adapters/inbound/Heading.tsx'),
|
|
12
|
-
'utf8',
|
|
13
|
-
);
|
|
6
|
+
const textSource = readFileSync(join(import.meta.dir, 'adapters/inbound/Text.tsx'), 'utf8');
|
|
7
|
+
const headingSource = readFileSync(join(import.meta.dir, 'adapters/inbound/Heading.tsx'), 'utf8');
|
|
14
8
|
|
|
15
9
|
describe('content fallback ownership', () => {
|
|
16
10
|
it('keeps Text free of translation context coupling', () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Modal } from '../../../../components/modal';
|
|
4
3
|
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
4
|
import type { UploadAsset, UploaderProps, UploadType } from '../../../../types/upload';
|
|
6
5
|
import { Button } from '../../../button/public';
|
|
6
|
+
import { Dialog } from '../../../dialog/public';
|
|
7
7
|
import { FormField } from '../../../form/public';
|
|
8
8
|
import { Icon } from '../../../icon/public';
|
|
9
9
|
import { Image } from '../../../image/public';
|
|
@@ -288,7 +288,7 @@ function UploaderInner({
|
|
|
288
288
|
</FormField>
|
|
289
289
|
|
|
290
290
|
{canPreviewImage ? (
|
|
291
|
-
<
|
|
291
|
+
<Dialog
|
|
292
292
|
closeOnBackdrop
|
|
293
293
|
interactionPolicy={interactionPolicy}
|
|
294
294
|
onDismiss={() => setPreviewOpen(false)}
|
|
@@ -308,7 +308,7 @@ function UploaderInner({
|
|
|
308
308
|
</Button>
|
|
309
309
|
</Stack>
|
|
310
310
|
</Stack>
|
|
311
|
-
</
|
|
311
|
+
</Dialog>
|
|
312
312
|
) : null}
|
|
313
313
|
</>
|
|
314
314
|
);
|
package/src/index.ts
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
export type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';
|
|
2
|
-
export { Breadcrumbs } from './components/breadcrumbs';
|
|
3
|
-
export type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';
|
|
4
|
-
export { DropdownMenu, Menu } from './components/menu';
|
|
5
|
-
export type { ModalProps } from './components/modal';
|
|
6
|
-
export { Modal } from './components/modal';
|
|
7
|
-
export type { PaginationProps } from './components/pagination';
|
|
8
|
-
export { Pagination } from './components/pagination';
|
|
9
|
-
export type { RatingProps } from './components/rating';
|
|
10
|
-
export { Rating } from './components/rating';
|
|
11
|
-
export type { SearchBarProps } from './components/search-bar';
|
|
12
|
-
export { SearchBar } from './components/search-bar';
|
|
13
|
-
export type { SelectOption, SelectProps } from './components/select';
|
|
14
|
-
export { Select } from './components/select';
|
|
15
|
-
export type { TabItem, TabsProps, TabsVariant } from './components/tabs';
|
|
16
|
-
export { Tabs } from './components/tabs';
|
|
17
|
-
export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';
|
|
18
|
-
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
19
1
|
export { ZORA_CORE_PLUGIN } from './corePlugin';
|
|
20
2
|
export { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
|
|
21
3
|
export {
|
|
@@ -31,7 +13,7 @@ export {
|
|
|
31
13
|
ActivityIndicator,
|
|
32
14
|
type ActivityIndicatorProps,
|
|
33
15
|
} from './features/activity-indicator/public';
|
|
34
|
-
export type { AppBarMode,
|
|
16
|
+
export type { AppBarMode, AppBarOverflowMenu, AppBarProps } from './features/app-bar/public';
|
|
35
17
|
export { AppBar } from './features/app-bar/public';
|
|
36
18
|
export type {
|
|
37
19
|
AuthFormBaseProps,
|
|
@@ -70,6 +52,12 @@ export type { BadgeProps } from './features/badge/public';
|
|
|
70
52
|
export { Badge } from './features/badge/public';
|
|
71
53
|
export type { BottomSheetProps } from './features/bottom-sheet/public';
|
|
72
54
|
export { BottomSheet } from './features/bottom-sheet/public';
|
|
55
|
+
export {
|
|
56
|
+
type BreadcrumbItem,
|
|
57
|
+
type BreadcrumbPressEvent,
|
|
58
|
+
Breadcrumbs,
|
|
59
|
+
type BreadcrumbsProps,
|
|
60
|
+
} from './features/breadcrumbs/public';
|
|
73
61
|
export type { ButtonProps } from './features/button/public';
|
|
74
62
|
export type {
|
|
75
63
|
ButtonGroupAlign,
|
|
@@ -116,6 +104,7 @@ export {
|
|
|
116
104
|
type DatePickerProps,
|
|
117
105
|
type DatePickerValue,
|
|
118
106
|
} from './features/date-picker/public';
|
|
107
|
+
export { Dialog, type DialogProps } from './features/dialog/public';
|
|
119
108
|
export {
|
|
120
109
|
EmptyState,
|
|
121
110
|
type EmptyStateAction,
|
|
@@ -161,6 +150,8 @@ export {
|
|
|
161
150
|
type RadioGroupProps,
|
|
162
151
|
type RadioProps,
|
|
163
152
|
} from './features/form/radio/public';
|
|
153
|
+
export { SearchInput, type SearchInputProps } from './features/form/search-input/public';
|
|
154
|
+
export { Select, type SelectOption, type SelectProps } from './features/form/select/public';
|
|
164
155
|
export {
|
|
165
156
|
TextInput,
|
|
166
157
|
type TextInputProps,
|
|
@@ -219,12 +210,20 @@ export type {
|
|
|
219
210
|
} from './features/list/public';
|
|
220
211
|
export { FlatList, SectionList } from './features/list/public';
|
|
221
212
|
export { MissingElement, type MissingElementProps } from './features/missing-element/public';
|
|
213
|
+
export { Pagination, type PaginationProps } from './features/pagination/public';
|
|
214
|
+
export {
|
|
215
|
+
PopoverMenu,
|
|
216
|
+
type PopoverMenuAction,
|
|
217
|
+
type PopoverMenuActionIntent,
|
|
218
|
+
type PopoverMenuProps,
|
|
219
|
+
} from './features/popover-menu/public';
|
|
222
220
|
export {
|
|
223
221
|
Progress,
|
|
224
222
|
type ProgressProps,
|
|
225
223
|
ProgressRing,
|
|
226
224
|
type ProgressRingProps,
|
|
227
225
|
} from './features/progress/public';
|
|
226
|
+
export { Rating, type RatingProps } from './features/rating/public';
|
|
228
227
|
export {
|
|
229
228
|
Skeleton,
|
|
230
229
|
SkeletonCard,
|
|
@@ -240,6 +239,16 @@ export {
|
|
|
240
239
|
} from './features/skeleton/public';
|
|
241
240
|
export type { SurfaceProps, SurfaceVariant } from './features/surface/public';
|
|
242
241
|
export { Surface } from './features/surface/public';
|
|
242
|
+
export {
|
|
243
|
+
Tab,
|
|
244
|
+
TabList,
|
|
245
|
+
type TabListProps,
|
|
246
|
+
TabPanel,
|
|
247
|
+
type TabPanelProps,
|
|
248
|
+
type TabProps,
|
|
249
|
+
Tabs,
|
|
250
|
+
type TabsProps,
|
|
251
|
+
} from './features/tabs/public';
|
|
243
252
|
export {
|
|
244
253
|
TimePicker,
|
|
245
254
|
type TimePickerProps,
|
|
@@ -253,6 +262,7 @@ export type {
|
|
|
253
262
|
ToastStatus,
|
|
254
263
|
} from './features/toast/public';
|
|
255
264
|
export { Toast, ToastProvider, useToast } from './features/toast/public';
|
|
265
|
+
export { Toolbar, type ToolbarProps } from './features/toolbar/public';
|
|
256
266
|
export type {
|
|
257
267
|
HeadingAlign,
|
|
258
268
|
HeadingColor,
|