@ankhorage/zora 15.0.0 → 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 +6 -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/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/button/utils/resolveButtonThemeRecipe.d.ts +1 -1
- 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/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/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/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 +6 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- 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 +2 -2
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +14 -9
- 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 +3 -3
- package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +11 -9
- package/dist/registry.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/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/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 +1 -1
- package/src/audit.test.ts +8 -47
- package/src/constants.ts +5 -0
- package/src/featureManifest.test.ts +31 -2
- 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/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/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 +15 -12
- package/src/metadata/allowedChildren.ts +6 -0
- package/src/metadata/componentMeta.test.ts +18 -1
- package/src/metadata/componentMeta.ts +14 -9
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +3 -3
- package/src/patterns/theme-composer/ThemeComposer.tsx +6 -7
- package/src/registry.ts +11 -9
- package/src/showcaseCoverage.test.ts +6 -3
- package/src/theme/themeScopeStructure.test.ts +16 -11
- package/src/types/dialog.ts +15 -0
- package/src/{components/pagination/types.ts → types/pagination.ts} +5 -8
- package/src/types/rating.ts +9 -0
- package/src/types/search-input.ts +14 -0
- package/src/types/tabs.ts +25 -0
- package/src/types/toolbar.ts +9 -0
- 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/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/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/meta.ts +0 -10
- 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/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
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const tabsMeta: {
|
|
2
|
-
readonly name: "Tabs";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Navigation 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/tabs/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;;;;;CAOiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/tabs/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,iEAAiE;IACvE,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const tabsMeta = {\n name: 'Tabs',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Navigation component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import type { ZoraControlSize } from '../../internal/recipes';
|
|
4
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
-
export interface TabItem<TValue extends string = string> {
|
|
6
|
-
value: TValue;
|
|
7
|
-
label: ReactNode;
|
|
8
|
-
icon?: ButtonIconSpec;
|
|
9
|
-
badge?: ReactNode;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
testID?: string;
|
|
12
|
-
}
|
|
13
|
-
export type TabsVariant = 'underline' | 'pill' | 'segmented';
|
|
14
|
-
export interface TabsProps<TValue extends string = string> extends ZoraBaseProps {
|
|
15
|
-
value: TValue;
|
|
16
|
-
items: readonly TabItem<TValue>[];
|
|
17
|
-
onValueChange: (value: TValue) => void;
|
|
18
|
-
variant?: TabsVariant;
|
|
19
|
-
size?: ZoraControlSize;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,OAAO,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAE7D,MAAM,WAAW,SAAS,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;IAClC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/tabs/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { ReactNode } from 'react';\n\nimport type { ZoraControlSize } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface TabItem<TValue extends string = string> {\n value: TValue;\n label: ReactNode;\n icon?: ButtonIconSpec;\n badge?: ReactNode;\n disabled?: boolean;\n testID?: string;\n}\n\nexport type TabsVariant = 'underline' | 'pill' | 'segmented';\n\nexport interface TabsProps<TValue extends string = string> extends ZoraBaseProps {\n value: TValue;\n items: readonly TabItem<TValue>[];\n onValueChange: (value: TValue) => void;\n variant?: TabsVariant;\n size?: ZoraControlSize;\n disabled?: boolean;\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ToolbarProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Horizontal toolbar surface for grouping actions and controls.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export declare const Toolbar: (props: ToolbarProps) => React.ReactElement | null;
|
|
9
|
-
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAqC5C;;;;GAIG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Card } from '../../features/card/public';
|
|
3
|
-
import { Stack } from '../../features/layout/public';
|
|
4
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
-
function ToolbarInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, children, position = 'inline', floating = false, compact = true, testID, }) {
|
|
6
|
-
const isFixed = position === 'top' || position === 'bottom';
|
|
7
|
-
return (<Card compact={compact} tone={floating ? 'default' : 'subtle'} testID={testID} style={isFixed
|
|
8
|
-
? {
|
|
9
|
-
position: 'absolute',
|
|
10
|
-
[position]: 0,
|
|
11
|
-
zIndex: 10,
|
|
12
|
-
alignSelf: 'center',
|
|
13
|
-
}
|
|
14
|
-
: undefined}>
|
|
15
|
-
<Stack direction="row" gap="s" align="center">
|
|
16
|
-
{children}
|
|
17
|
-
</Stack>
|
|
18
|
-
</Card>);
|
|
19
|
-
}
|
|
20
|
-
/***
|
|
21
|
-
* Horizontal toolbar surface for grouping actions and controls.
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
export const Toolbar = withZoraThemeScope(ToolbarInner);
|
|
26
|
-
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,YAAY,CAAC,EACpB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EACR,QAAQ,GAAG,QAAQ,EACnB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,IAAI,EACd,MAAM,GACO;IACb,MAAM,OAAO,GAAG,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,QAAQ,CAAC;IAE5D,OAAO,CACL,CAAC,IAAI,CACH,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CACtC,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CACJ,OAAO;YACL,CAAC,CAAC;gBACE,QAAQ,EAAE,UAAU;gBACpB,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACb,MAAM,EAAE,EAAE;gBACV,SAAS,EAAE,QAAQ;aACpB;YACH,CAAC,CAAC,SACN,CAAC,CAED;MAAA,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAC3C;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Card } from '../../features/card/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ToolbarProps } from './types';\n\nfunction ToolbarInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n position = 'inline',\n floating = false,\n compact = true,\n testID,\n}: ToolbarProps) {\n const isFixed = position === 'top' || position === 'bottom';\n\n return (\n <Card\n compact={compact}\n tone={floating ? 'default' : 'subtle'}\n testID={testID}\n style={\n isFixed\n ? {\n position: 'absolute',\n [position]: 0,\n zIndex: 10,\n alignSelf: 'center',\n }\n : undefined\n }\n >\n <Stack direction=\"row\" gap=\"s\" align=\"center\">\n {children}\n </Stack>\n </Card>\n );\n}\n\n/***\n * Horizontal toolbar surface for grouping actions and controls.\n *\n \n */\nexport const Toolbar = withZoraThemeScope(ToolbarInner);\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ToolbarActionProps } from './types';
|
|
3
|
-
/***
|
|
4
|
-
* Convenience icon action for toolbars with active state styling.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export declare const ToolbarAction: (props: ToolbarActionProps) => React.ReactElement | null;
|
|
9
|
-
//# sourceMappingURL=ToolbarAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarAction.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/ToolbarAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkBlD;;;;GAIG;AACH,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconButton } from '../../features/button/public';
|
|
3
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
|
-
function ToolbarActionInner({ themeId: _themeId, mode: _mode, active, ...props }) {
|
|
5
|
-
return (<IconButton {...props} variant={active ? 'soft' : 'ghost'} color={active ? 'primary' : 'neutral'} size="m"/>);
|
|
6
|
-
}
|
|
7
|
-
/***
|
|
8
|
-
* Convenience icon action for toolbars with active state styling.
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export const ToolbarAction = withZoraThemeScope(ToolbarActionInner);
|
|
13
|
-
//# sourceMappingURL=ToolbarAction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarAction.js","sourceRoot":"","sources":["../../../src/components/toolbar/ToolbarAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,GAAG,KAAK,EACW;IACnB,OAAO,CACL,CAAC,UAAU,CACT,IAAI,KAAK,CAAC,CACV,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CACnC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACtC,IAAI,CAAC,GAAG,EACR,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { IconButton } from '../../features/button/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ToolbarActionProps } from './types';\n\nfunction ToolbarActionInner({\n themeId: _themeId,\n mode: _mode,\n active,\n ...props\n}: ToolbarActionProps) {\n return (\n <IconButton\n {...props}\n variant={active ? 'soft' : 'ghost'}\n color={active ? 'primary' : 'neutral'}\n size=\"m\"\n />\n );\n}\n\n/***\n * Convenience icon action for toolbars with active state styling.\n *\n \n */\nexport const ToolbarAction = withZoraThemeScope(ToolbarActionInner);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/toolbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC","sourcesContent":["export * from './Toolbar';\nexport * from './ToolbarAction';\nexport * from './types';\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const toolbarMeta: {
|
|
2
|
-
readonly name: "Toolbar";
|
|
3
|
-
readonly category: "component";
|
|
4
|
-
readonly directManifestNode: false;
|
|
5
|
-
readonly allowedChildren: readonly [];
|
|
6
|
-
readonly note: "Action bar component; not represented as a manifest node in v1.";
|
|
7
|
-
readonly props: {};
|
|
8
|
-
};
|
|
9
|
-
export declare const toolbarActionMeta: {
|
|
10
|
-
readonly name: "ToolbarAction";
|
|
11
|
-
readonly category: "component";
|
|
12
|
-
readonly directManifestNode: false;
|
|
13
|
-
readonly allowedChildren: readonly [];
|
|
14
|
-
readonly note: "Action bar item; not represented as a manifest node in v1.";
|
|
15
|
-
readonly props: {};
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;CAOc,CAAC;AAEvC,eAAO,MAAM,iBAAiB;;;;;;;CAOQ,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const toolbarMeta = {
|
|
2
|
-
name: 'Toolbar',
|
|
3
|
-
category: 'component',
|
|
4
|
-
directManifestNode: false,
|
|
5
|
-
allowedChildren: [],
|
|
6
|
-
note: 'Action bar component; not represented as a manifest node in v1.',
|
|
7
|
-
props: {},
|
|
8
|
-
};
|
|
9
|
-
export const toolbarActionMeta = {
|
|
10
|
-
name: 'ToolbarAction',
|
|
11
|
-
category: 'component',
|
|
12
|
-
directManifestNode: false,
|
|
13
|
-
allowedChildren: [],
|
|
14
|
-
note: 'Action bar item; not represented as a manifest node in v1.',
|
|
15
|
-
props: {},
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/toolbar/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,iEAAiE;IACvE,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,4DAA4D;IAClE,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const toolbarMeta = {\n name: 'Toolbar',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Action bar component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const toolbarActionMeta = {\n name: 'ToolbarAction',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Action bar item; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
-
export type ToolbarPosition = 'top' | 'bottom' | 'inline';
|
|
5
|
-
export interface ToolbarProps extends ZoraBaseProps {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
position?: ToolbarPosition;
|
|
8
|
-
floating?: boolean;
|
|
9
|
-
compact?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface ToolbarActionProps extends ZoraBaseProps {
|
|
12
|
-
label: string;
|
|
13
|
-
icon: ButtonIconSpec;
|
|
14
|
-
active?: boolean;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
onPress?: () => void;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/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,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/toolbar/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 type ToolbarPosition = 'top' | 'bottom' | 'inline';\n\nexport interface ToolbarProps extends ZoraBaseProps {\n children?: React.ReactNode;\n position?: ToolbarPosition;\n floating?: boolean;\n compact?: boolean;\n}\n\nexport interface ToolbarActionProps extends ZoraBaseProps {\n label: string;\n icon: ButtonIconSpec;\n active?: boolean;\n disabled?: boolean;\n onPress?: () => void;\n}\n"]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Modal as SurfaceModal } from '@ankhorage/surface';
|
|
2
|
-
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Box, Stack } from '../../features/layout/public';
|
|
5
|
-
import { Heading } from '../../features/typography/public';
|
|
6
|
-
import { Text } from '../../features/typography/public';
|
|
7
|
-
import { resolveDialogWidth } from '../../internal/recipes';
|
|
8
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
9
|
-
import type { ModalProps } from './types';
|
|
10
|
-
|
|
11
|
-
function useStableCallback(callback: (() => void) | undefined): (() => void) | undefined {
|
|
12
|
-
const callbackRef = useRef(callback);
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
callbackRef.current = callback;
|
|
16
|
-
}, [callback]);
|
|
17
|
-
|
|
18
|
-
return useCallback(() => {
|
|
19
|
-
callbackRef.current?.();
|
|
20
|
-
}, []);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function ModalInner({
|
|
24
|
-
themeId: _themeId,
|
|
25
|
-
mode: _mode,
|
|
26
|
-
children,
|
|
27
|
-
title,
|
|
28
|
-
description,
|
|
29
|
-
footer,
|
|
30
|
-
width = 'default',
|
|
31
|
-
onDismiss,
|
|
32
|
-
interactionPolicy,
|
|
33
|
-
...props
|
|
34
|
-
}: ModalProps) {
|
|
35
|
-
const hasHeader = title != null || description != null;
|
|
36
|
-
const stableOnDismiss = useStableCallback(onDismiss);
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<SurfaceModal {...props} onDismiss={stableOnDismiss} interactionPolicy={interactionPolicy}>
|
|
40
|
-
<Box maxWidth={resolveDialogWidth(width)} style={{ alignSelf: 'center', width: '100%' }}>
|
|
41
|
-
<Stack gap="m">
|
|
42
|
-
{hasHeader ? (
|
|
43
|
-
<Stack gap="xs">
|
|
44
|
-
{title ? <Heading level={3}>{title}</Heading> : null}
|
|
45
|
-
{description ? (
|
|
46
|
-
<Text emphasis="muted" variant="bodySmall">
|
|
47
|
-
{description}
|
|
48
|
-
</Text>
|
|
49
|
-
) : null}
|
|
50
|
-
</Stack>
|
|
51
|
-
) : null}
|
|
52
|
-
{children ? <Box>{children}</Box> : null}
|
|
53
|
-
{footer ? <Box pt="xs">{footer}</Box> : null}
|
|
54
|
-
</Stack>
|
|
55
|
-
</Box>
|
|
56
|
-
</SurfaceModal>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/***
|
|
61
|
-
* Modal dialog surface with header/content/footer slots.
|
|
62
|
-
*/
|
|
63
|
-
export const Modal = withZoraThemeScope(ModalInner);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
-
|
|
3
|
-
export const modalMeta = {
|
|
4
|
-
name: 'Modal',
|
|
5
|
-
category: 'component',
|
|
6
|
-
directManifestNode: false,
|
|
7
|
-
allowedChildren: [],
|
|
8
|
-
note: 'Overlay component; not represented as a manifest node in v1.',
|
|
9
|
-
props: {},
|
|
10
|
-
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ModalProps as SurfaceModalProps } from '@ankhorage/surface';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
|
|
4
|
-
import type { ZoraContentWidth } from '../../internal/recipes';
|
|
5
|
-
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
6
|
-
|
|
7
|
-
export interface ModalProps
|
|
8
|
-
extends
|
|
9
|
-
ZoraBaseProps,
|
|
10
|
-
Pick<Omit<SurfaceModalProps, 'mode' | 'themeId'>, 'closeOnBackdrop' | 'onDismiss' | 'visible'> {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
title?: React.ReactNode;
|
|
13
|
-
description?: React.ReactNode;
|
|
14
|
-
footer?: React.ReactNode;
|
|
15
|
-
width?: ZoraContentWidth;
|
|
16
|
-
}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Button } from '../../features/button/public';
|
|
4
|
-
import { Stack } from '../../features/layout/public';
|
|
5
|
-
import { Text } from '../../features/typography/public';
|
|
6
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
7
|
-
import type { PaginationProps } from './types';
|
|
8
|
-
|
|
9
|
-
type PaginationItem = number | 'ellipsis';
|
|
10
|
-
|
|
11
|
-
function clampInteger(value: number, min: number, max: number): number {
|
|
12
|
-
if (!Number.isFinite(value)) {
|
|
13
|
-
return min;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return Math.min(Math.max(Math.trunc(value), min), max);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function createRange(start: number, end: number): number[] {
|
|
20
|
-
if (end < start) {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return Array.from({ length: end - start + 1 }, (_, index) => start + index);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function normalizeCount(value: number | undefined, fallback: number): number {
|
|
28
|
-
if (value === undefined || !Number.isFinite(value)) {
|
|
29
|
-
return fallback;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return Math.max(0, Math.trunc(value));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function createPaginationItems({
|
|
36
|
-
page,
|
|
37
|
-
pageCount,
|
|
38
|
-
siblingCount,
|
|
39
|
-
boundaryCount,
|
|
40
|
-
compact,
|
|
41
|
-
}: {
|
|
42
|
-
page: number;
|
|
43
|
-
pageCount: number;
|
|
44
|
-
siblingCount: number;
|
|
45
|
-
boundaryCount: number;
|
|
46
|
-
compact: boolean;
|
|
47
|
-
}): readonly PaginationItem[] {
|
|
48
|
-
if (pageCount <= 0) {
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (compact) {
|
|
53
|
-
return [page];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const boundaries = createRange(1, Math.min(boundaryCount, pageCount));
|
|
57
|
-
const trailingBoundaries = createRange(Math.max(pageCount - boundaryCount + 1, 1), pageCount);
|
|
58
|
-
const siblings = createRange(
|
|
59
|
-
Math.max(page - siblingCount, 1),
|
|
60
|
-
Math.min(page + siblingCount, pageCount),
|
|
61
|
-
);
|
|
62
|
-
const pages = [...new Set([...boundaries, ...siblings, ...trailingBoundaries])].sort(
|
|
63
|
-
(left, right) => left - right,
|
|
64
|
-
);
|
|
65
|
-
const items: PaginationItem[] = [];
|
|
66
|
-
|
|
67
|
-
pages.forEach((nextPage, index) => {
|
|
68
|
-
const previousPage = pages[index - 1];
|
|
69
|
-
if (previousPage !== undefined && nextPage - previousPage > 1) {
|
|
70
|
-
items.push('ellipsis');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
items.push(nextPage);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
return items;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function PaginationInner({
|
|
80
|
-
themeId: _themeId,
|
|
81
|
-
mode: _mode,
|
|
82
|
-
page,
|
|
83
|
-
pageCount,
|
|
84
|
-
onPageChange,
|
|
85
|
-
disabled = false,
|
|
86
|
-
siblingCount = 1,
|
|
87
|
-
boundaryCount = 1,
|
|
88
|
-
showFirstLast = false,
|
|
89
|
-
previousLabel = 'Previous',
|
|
90
|
-
nextLabel = 'Next',
|
|
91
|
-
firstLabel = 'First',
|
|
92
|
-
lastLabel = 'Last',
|
|
93
|
-
compact = false,
|
|
94
|
-
testID,
|
|
95
|
-
interactionPolicy,
|
|
96
|
-
}: PaginationProps) {
|
|
97
|
-
const passive = interactionPolicy === 'passive';
|
|
98
|
-
const normalizedPageCount = Math.max(0, Math.trunc(Number.isFinite(pageCount) ? pageCount : 0));
|
|
99
|
-
const currentPage = clampInteger(page, 1, Math.max(normalizedPageCount, 1));
|
|
100
|
-
const safeSiblingCount = normalizeCount(siblingCount, 1);
|
|
101
|
-
const safeBoundaryCount = normalizeCount(boundaryCount, 1);
|
|
102
|
-
const items = createPaginationItems({
|
|
103
|
-
boundaryCount: safeBoundaryCount,
|
|
104
|
-
compact,
|
|
105
|
-
page: currentPage,
|
|
106
|
-
pageCount: normalizedPageCount,
|
|
107
|
-
siblingCount: safeSiblingCount,
|
|
108
|
-
});
|
|
109
|
-
const canGoPrevious = currentPage > 1;
|
|
110
|
-
const canGoNext = currentPage < normalizedPageCount;
|
|
111
|
-
const navigationDisabled = disabled || normalizedPageCount <= 1;
|
|
112
|
-
|
|
113
|
-
const changePage = (nextPage: number) => {
|
|
114
|
-
const clampedPage = clampInteger(nextPage, 1, Math.max(normalizedPageCount, 1));
|
|
115
|
-
if (passive || disabled || clampedPage === currentPage) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
onPageChange?.(clampedPage);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
return (
|
|
123
|
-
<Stack align="center" direction="row" gap="xs" testID={testID}>
|
|
124
|
-
{showFirstLast ? (
|
|
125
|
-
<Button
|
|
126
|
-
disabled={navigationDisabled || currentPage === 1}
|
|
127
|
-
interactionPolicy={interactionPolicy}
|
|
128
|
-
onPress={() => changePage(1)}
|
|
129
|
-
size="s"
|
|
130
|
-
testID={testID ? `${testID}-first` : undefined}
|
|
131
|
-
variant="ghost"
|
|
132
|
-
>
|
|
133
|
-
{firstLabel}
|
|
134
|
-
</Button>
|
|
135
|
-
) : null}
|
|
136
|
-
|
|
137
|
-
<Button
|
|
138
|
-
disabled={navigationDisabled || !canGoPrevious}
|
|
139
|
-
interactionPolicy={interactionPolicy}
|
|
140
|
-
onPress={() => changePage(currentPage - 1)}
|
|
141
|
-
size="s"
|
|
142
|
-
testID={testID ? `${testID}-previous` : undefined}
|
|
143
|
-
variant="ghost"
|
|
144
|
-
>
|
|
145
|
-
{previousLabel}
|
|
146
|
-
</Button>
|
|
147
|
-
|
|
148
|
-
{items.map((item, index) =>
|
|
149
|
-
item === 'ellipsis' ? (
|
|
150
|
-
<Text key={`ellipsis-${index}`} emphasis="muted" variant="bodySmall">
|
|
151
|
-
…
|
|
152
|
-
</Text>
|
|
153
|
-
) : (
|
|
154
|
-
<Button
|
|
155
|
-
color={item === currentPage ? 'primary' : 'neutral'}
|
|
156
|
-
disabled={disabled}
|
|
157
|
-
interactionPolicy={interactionPolicy}
|
|
158
|
-
key={item}
|
|
159
|
-
onPress={() => changePage(item)}
|
|
160
|
-
size="s"
|
|
161
|
-
testID={testID ? `${testID}-page-${item}` : undefined}
|
|
162
|
-
variant={item === currentPage ? 'solid' : 'ghost'}
|
|
163
|
-
>
|
|
164
|
-
{item}
|
|
165
|
-
</Button>
|
|
166
|
-
),
|
|
167
|
-
)}
|
|
168
|
-
|
|
169
|
-
<Button
|
|
170
|
-
disabled={navigationDisabled || !canGoNext}
|
|
171
|
-
interactionPolicy={interactionPolicy}
|
|
172
|
-
onPress={() => changePage(currentPage + 1)}
|
|
173
|
-
size="s"
|
|
174
|
-
testID={testID ? `${testID}-next` : undefined}
|
|
175
|
-
variant="ghost"
|
|
176
|
-
>
|
|
177
|
-
{nextLabel}
|
|
178
|
-
</Button>
|
|
179
|
-
|
|
180
|
-
{showFirstLast ? (
|
|
181
|
-
<Button
|
|
182
|
-
disabled={navigationDisabled || currentPage === normalizedPageCount}
|
|
183
|
-
interactionPolicy={interactionPolicy}
|
|
184
|
-
onPress={() => changePage(normalizedPageCount)}
|
|
185
|
-
size="s"
|
|
186
|
-
testID={testID ? `${testID}-last` : undefined}
|
|
187
|
-
variant="ghost"
|
|
188
|
-
>
|
|
189
|
-
{lastLabel}
|
|
190
|
-
</Button>
|
|
191
|
-
) : null}
|
|
192
|
-
</Stack>
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/***
|
|
197
|
-
* Pagination control for navigating between pages of results.
|
|
198
|
-
*/
|
|
199
|
-
export const Pagination = withZoraThemeScope(PaginationInner);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
-
|
|
3
|
-
export const paginationMeta = {
|
|
4
|
-
name: 'Pagination',
|
|
5
|
-
category: 'component',
|
|
6
|
-
directManifestNode: false,
|
|
7
|
-
allowedChildren: [],
|
|
8
|
-
note: 'Code-facing controlled pagination component; not represented as a manifest node in v1.',
|
|
9
|
-
props: {},
|
|
10
|
-
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Icon } from '../../features/icon/public';
|
|
4
|
-
import { Inline } from '../../foundation';
|
|
5
|
-
import { resolveIconSize } from '../../internal/recipes';
|
|
6
|
-
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
7
|
-
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
8
|
-
import { resolveRatingSegments } from './resolveRatingSegments';
|
|
9
|
-
import { type RatingProps, resolveRatingRole } from './types';
|
|
10
|
-
|
|
11
|
-
function RatingInner({
|
|
12
|
-
themeId: _themeId,
|
|
13
|
-
mode: _mode,
|
|
14
|
-
interactionPolicy: _interactionPolicy,
|
|
15
|
-
testID,
|
|
16
|
-
value,
|
|
17
|
-
max = 5,
|
|
18
|
-
color = 'warning',
|
|
19
|
-
size = 'm',
|
|
20
|
-
}: RatingProps) {
|
|
21
|
-
const { theme } = useZoraTheme();
|
|
22
|
-
const role = resolveRatingRole(theme, color);
|
|
23
|
-
const segments = resolveRatingSegments({ value, max });
|
|
24
|
-
const iconSize = resolveIconSize(size);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<Inline align="center" gap="xxs" testID={testID} wrap="nowrap">
|
|
28
|
-
{segments.map((segment, index) => {
|
|
29
|
-
const name =
|
|
30
|
-
segment === 'full' ? 'star' : segment === 'half' ? 'star-half' : 'star-outline';
|
|
31
|
-
const color = segment === 'empty' ? theme.semantics.content.muted : role.base;
|
|
32
|
-
|
|
33
|
-
return <Icon key={index} color={color} name={name} size={iconSize} />;
|
|
34
|
-
})}
|
|
35
|
-
</Inline>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/***
|
|
40
|
-
* Displays a star-based rating value with optional half steps.
|
|
41
|
-
*/
|
|
42
|
-
export const Rating = withZoraThemeScope(RatingInner);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ZoraComponentMeta } from '../../metadata';
|
|
2
|
-
|
|
3
|
-
export const ratingMeta = {
|
|
4
|
-
name: 'Rating',
|
|
5
|
-
category: 'component',
|
|
6
|
-
directManifestNode: false,
|
|
7
|
-
allowedChildren: [],
|
|
8
|
-
note: 'Feedback component; not represented as a manifest node in v1.',
|
|
9
|
-
props: {},
|
|
10
|
-
} as const satisfies ZoraComponentMeta;
|