@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 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../../src/features/form/select/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export type { SelectOption, SelectProps } from '../../../types/select';\nexport { Select } from './adapters/inbound/Select';\n"]}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
export declare const selectMeta: {
|
|
2
|
+
readonly name: "Select";
|
|
3
|
+
readonly category: "component";
|
|
4
|
+
readonly description: "Single-value form selection with Popover presentation on web and BottomSheet presentation on native.";
|
|
5
|
+
readonly directManifestNode: true;
|
|
6
|
+
readonly allowedChildren: readonly [];
|
|
7
|
+
readonly blueprint: {
|
|
8
|
+
readonly label: "Select";
|
|
9
|
+
readonly defaultProps: {
|
|
10
|
+
readonly label: "Option";
|
|
11
|
+
readonly placeholder: "Select";
|
|
12
|
+
readonly defaultValue: "option-b";
|
|
13
|
+
readonly options: readonly [{
|
|
14
|
+
readonly value: "option-a";
|
|
15
|
+
readonly label: "First option";
|
|
16
|
+
}, {
|
|
17
|
+
readonly value: "option-b";
|
|
18
|
+
readonly label: "Second option";
|
|
19
|
+
}, {
|
|
20
|
+
readonly value: "option-c";
|
|
21
|
+
readonly label: "Third option";
|
|
22
|
+
}];
|
|
23
|
+
readonly disabled: false;
|
|
24
|
+
readonly readOnly: false;
|
|
25
|
+
readonly invalid: false;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly bindings: {
|
|
29
|
+
readonly props: {
|
|
30
|
+
readonly value: {
|
|
31
|
+
readonly label: "Value";
|
|
32
|
+
readonly description: "Currently selected option value.";
|
|
33
|
+
readonly value: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
};
|
|
36
|
+
readonly acceptsFallback: true;
|
|
37
|
+
readonly acceptsTransforms: true;
|
|
38
|
+
};
|
|
39
|
+
readonly disabled: {
|
|
40
|
+
readonly label: "Disabled";
|
|
41
|
+
readonly description: "Whether the select is disabled.";
|
|
42
|
+
readonly value: {
|
|
43
|
+
readonly type: "boolean";
|
|
44
|
+
};
|
|
45
|
+
readonly acceptsFallback: true;
|
|
46
|
+
readonly acceptsTransforms: true;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly events: {
|
|
50
|
+
readonly valueChange: {
|
|
51
|
+
readonly label: "Value change";
|
|
52
|
+
readonly description: "Runs when the selected option value changes.";
|
|
53
|
+
readonly payload: {
|
|
54
|
+
readonly eventType: "select.valueChange";
|
|
55
|
+
readonly fields: readonly [{
|
|
56
|
+
readonly path: "value";
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly label: "Value";
|
|
59
|
+
}];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly events: {
|
|
65
|
+
readonly valueChange: {
|
|
66
|
+
readonly label: "Value change";
|
|
67
|
+
readonly eventType: "select.valueChange";
|
|
68
|
+
readonly description: "Emitted when the selected option value changes.";
|
|
69
|
+
readonly payloadFields: readonly [{
|
|
70
|
+
readonly path: "value";
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
readonly label: "Value";
|
|
73
|
+
}];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly props: {
|
|
77
|
+
readonly defaultValue: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly category: "State";
|
|
80
|
+
readonly label: "Initial value";
|
|
81
|
+
readonly authoring: {
|
|
82
|
+
readonly authority: "instance";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
readonly value: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly category: "State";
|
|
88
|
+
readonly label: "Value";
|
|
89
|
+
readonly authoring: {
|
|
90
|
+
readonly authority: "instance";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
readonly options: {
|
|
94
|
+
readonly type: "array";
|
|
95
|
+
readonly category: "Content";
|
|
96
|
+
readonly label: "Options";
|
|
97
|
+
readonly itemSchema: readonly [{
|
|
98
|
+
readonly key: "value";
|
|
99
|
+
readonly schema: {
|
|
100
|
+
readonly type: "string";
|
|
101
|
+
readonly category: "Content";
|
|
102
|
+
readonly label: "Value";
|
|
103
|
+
};
|
|
104
|
+
}, {
|
|
105
|
+
readonly key: "label";
|
|
106
|
+
readonly schema: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly category: "Content";
|
|
109
|
+
readonly label: "Label";
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
readonly key: "disabled";
|
|
113
|
+
readonly schema: {
|
|
114
|
+
readonly type: "boolean";
|
|
115
|
+
readonly category: "State";
|
|
116
|
+
readonly label: "Disabled";
|
|
117
|
+
readonly default: false;
|
|
118
|
+
};
|
|
119
|
+
}];
|
|
120
|
+
readonly authoring: {
|
|
121
|
+
readonly authority: "instance";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly label: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly category: "Content";
|
|
127
|
+
readonly label: "Label";
|
|
128
|
+
readonly authoring: {
|
|
129
|
+
readonly authority: "instance";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
readonly helperText: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
readonly category: "Content";
|
|
135
|
+
readonly label: "Helper text";
|
|
136
|
+
readonly authoring: {
|
|
137
|
+
readonly authority: "instance";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly errorText: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
readonly category: "Content";
|
|
143
|
+
readonly label: "Error text";
|
|
144
|
+
readonly authoring: {
|
|
145
|
+
readonly authority: "instance";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
readonly placeholder: {
|
|
149
|
+
readonly type: "string";
|
|
150
|
+
readonly category: "Content";
|
|
151
|
+
readonly label: "Placeholder";
|
|
152
|
+
readonly default: "Select";
|
|
153
|
+
readonly authoring: {
|
|
154
|
+
readonly authority: "instance";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
readonly required: {
|
|
158
|
+
readonly type: "boolean";
|
|
159
|
+
readonly category: "State";
|
|
160
|
+
readonly label: "Required";
|
|
161
|
+
readonly default: false;
|
|
162
|
+
readonly authoring: {
|
|
163
|
+
readonly authority: "instance";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly disabled: {
|
|
167
|
+
readonly type: "boolean";
|
|
168
|
+
readonly category: "State";
|
|
169
|
+
readonly label: "Disabled";
|
|
170
|
+
readonly default: false;
|
|
171
|
+
readonly authoring: {
|
|
172
|
+
readonly authority: "instance";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
readonly readOnly: {
|
|
176
|
+
readonly type: "boolean";
|
|
177
|
+
readonly category: "State";
|
|
178
|
+
readonly label: "Read only";
|
|
179
|
+
readonly default: false;
|
|
180
|
+
readonly authoring: {
|
|
181
|
+
readonly authority: "instance";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
readonly invalid: {
|
|
185
|
+
readonly type: "boolean";
|
|
186
|
+
readonly category: "State";
|
|
187
|
+
readonly label: "Invalid";
|
|
188
|
+
readonly default: false;
|
|
189
|
+
readonly authoring: {
|
|
190
|
+
readonly authority: "instance";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=selectMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectMeta.d.ts","sourceRoot":"","sources":["../../../../src/features/form/select/selectMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJe,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
export const selectMeta = {
|
|
2
|
+
name: 'Select',
|
|
3
|
+
category: 'component',
|
|
4
|
+
description: 'Single-value form selection with Popover presentation on web and BottomSheet presentation on native.',
|
|
5
|
+
directManifestNode: true,
|
|
6
|
+
allowedChildren: [],
|
|
7
|
+
blueprint: {
|
|
8
|
+
label: 'Select',
|
|
9
|
+
defaultProps: {
|
|
10
|
+
label: 'Option',
|
|
11
|
+
placeholder: 'Select',
|
|
12
|
+
defaultValue: 'option-b',
|
|
13
|
+
options: [
|
|
14
|
+
{ value: 'option-a', label: 'First option' },
|
|
15
|
+
{ value: 'option-b', label: 'Second option' },
|
|
16
|
+
{ value: 'option-c', label: 'Third option' },
|
|
17
|
+
],
|
|
18
|
+
disabled: false,
|
|
19
|
+
readOnly: false,
|
|
20
|
+
invalid: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
bindings: {
|
|
24
|
+
props: {
|
|
25
|
+
value: {
|
|
26
|
+
label: 'Value',
|
|
27
|
+
description: 'Currently selected option value.',
|
|
28
|
+
value: { type: 'string' },
|
|
29
|
+
acceptsFallback: true,
|
|
30
|
+
acceptsTransforms: true,
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
label: 'Disabled',
|
|
34
|
+
description: 'Whether the select is disabled.',
|
|
35
|
+
value: { type: 'boolean' },
|
|
36
|
+
acceptsFallback: true,
|
|
37
|
+
acceptsTransforms: true,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
events: {
|
|
41
|
+
valueChange: {
|
|
42
|
+
label: 'Value change',
|
|
43
|
+
description: 'Runs when the selected option value changes.',
|
|
44
|
+
payload: {
|
|
45
|
+
eventType: 'select.valueChange',
|
|
46
|
+
fields: [{ path: 'value', type: 'string', label: 'Value' }],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
events: {
|
|
52
|
+
valueChange: {
|
|
53
|
+
label: 'Value change',
|
|
54
|
+
eventType: 'select.valueChange',
|
|
55
|
+
description: 'Emitted when the selected option value changes.',
|
|
56
|
+
payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
defaultValue: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
category: 'State',
|
|
63
|
+
label: 'Initial value',
|
|
64
|
+
authoring: { authority: 'instance' },
|
|
65
|
+
},
|
|
66
|
+
value: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
category: 'State',
|
|
69
|
+
label: 'Value',
|
|
70
|
+
authoring: { authority: 'instance' },
|
|
71
|
+
},
|
|
72
|
+
options: {
|
|
73
|
+
type: 'array',
|
|
74
|
+
category: 'Content',
|
|
75
|
+
label: 'Options',
|
|
76
|
+
itemSchema: [
|
|
77
|
+
{
|
|
78
|
+
key: 'value',
|
|
79
|
+
schema: { type: 'string', category: 'Content', label: 'Value' },
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: 'label',
|
|
83
|
+
schema: { type: 'string', category: 'Content', label: 'Label' },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: 'disabled',
|
|
87
|
+
schema: {
|
|
88
|
+
type: 'boolean',
|
|
89
|
+
category: 'State',
|
|
90
|
+
label: 'Disabled',
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
authoring: { authority: 'instance' },
|
|
96
|
+
},
|
|
97
|
+
label: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
category: 'Content',
|
|
100
|
+
label: 'Label',
|
|
101
|
+
authoring: { authority: 'instance' },
|
|
102
|
+
},
|
|
103
|
+
helperText: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
category: 'Content',
|
|
106
|
+
label: 'Helper text',
|
|
107
|
+
authoring: { authority: 'instance' },
|
|
108
|
+
},
|
|
109
|
+
errorText: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
category: 'Content',
|
|
112
|
+
label: 'Error text',
|
|
113
|
+
authoring: { authority: 'instance' },
|
|
114
|
+
},
|
|
115
|
+
placeholder: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
category: 'Content',
|
|
118
|
+
label: 'Placeholder',
|
|
119
|
+
default: 'Select',
|
|
120
|
+
authoring: { authority: 'instance' },
|
|
121
|
+
},
|
|
122
|
+
required: {
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
category: 'State',
|
|
125
|
+
label: 'Required',
|
|
126
|
+
default: false,
|
|
127
|
+
authoring: { authority: 'instance' },
|
|
128
|
+
},
|
|
129
|
+
disabled: {
|
|
130
|
+
type: 'boolean',
|
|
131
|
+
category: 'State',
|
|
132
|
+
label: 'Disabled',
|
|
133
|
+
default: false,
|
|
134
|
+
authoring: { authority: 'instance' },
|
|
135
|
+
},
|
|
136
|
+
readOnly: {
|
|
137
|
+
type: 'boolean',
|
|
138
|
+
category: 'State',
|
|
139
|
+
label: 'Read only',
|
|
140
|
+
default: false,
|
|
141
|
+
authoring: { authority: 'instance' },
|
|
142
|
+
},
|
|
143
|
+
invalid: {
|
|
144
|
+
type: 'boolean',
|
|
145
|
+
category: 'State',
|
|
146
|
+
label: 'Invalid',
|
|
147
|
+
default: false,
|
|
148
|
+
authoring: { authority: 'instance' },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=selectMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectMeta.js","sourceRoot":"","sources":["../../../../src/features/form/select/selectMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,QAAQ,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AAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,YAAY;YACnB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,QAAQ;YACjB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../../metadata';\n\nexport const selectMeta = {\n name: 'Select',\n category: 'component',\n description:\n 'Single-value form selection with Popover presentation on web and BottomSheet presentation on native.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Select',\n defaultProps: {\n label: 'Option',\n placeholder: 'Select',\n defaultValue: 'option-b',\n options: [\n { value: 'option-a', label: 'First option' },\n { value: 'option-b', label: 'Second option' },\n { value: 'option-c', label: 'Third option' },\n ],\n disabled: false,\n readOnly: false,\n invalid: false,\n },\n },\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Currently selected option value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the select is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the selected option value changes.',\n payload: {\n eventType: 'select.valueChange',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'select.valueChange',\n description: 'Emitted when the selected option value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n defaultValue: {\n type: 'string',\n category: 'State',\n label: 'Initial value',\n authoring: { authority: 'instance' },\n },\n value: {\n type: 'string',\n category: 'State',\n label: 'Value',\n authoring: { authority: 'instance' },\n },\n options: {\n type: 'array',\n category: 'Content',\n label: 'Options',\n itemSchema: [\n {\n key: 'value',\n schema: { type: 'string', category: 'Content', label: 'Value' },\n },\n {\n key: 'label',\n schema: { type: 'string', category: 'Content', label: 'Label' },\n },\n {\n key: 'disabled',\n schema: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n },\n },\n ],\n authoring: { authority: 'instance' },\n },\n label: {\n type: 'string',\n category: 'Content',\n label: 'Label',\n authoring: { authority: 'instance' },\n },\n helperText: {\n type: 'string',\n category: 'Content',\n label: 'Helper text',\n authoring: { authority: 'instance' },\n },\n errorText: {\n type: 'string',\n category: 'Content',\n label: 'Error text',\n authoring: { authority: 'instance' },\n },\n placeholder: {\n type: 'string',\n category: 'Content',\n label: 'Placeholder',\n default: 'Select',\n authoring: { authority: 'instance' },\n },\n required: {\n type: 'boolean',\n category: 'State',\n label: 'Required',\n default: false,\n authoring: { authority: 'instance' },\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n default: false,\n authoring: { authority: 'instance' },\n },\n readOnly: {\n type: 'boolean',\n category: 'State',\n label: 'Read only',\n default: false,\n authoring: { authority: 'instance' },\n },\n invalid: {\n type: 'boolean',\n category: 'State',\n label: 'Invalid',\n default: false,\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -3,7 +3,7 @@ export declare const gradientMeta: {
|
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly description: "Renders a host-backed gradient container for nested manifest content.";
|
|
5
5
|
readonly directManifestNode: true;
|
|
6
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
7
7
|
readonly blueprint: {
|
|
8
8
|
readonly label: "Gradient";
|
|
9
9
|
};
|
|
@@ -2,7 +2,7 @@ export declare const keyboardAvoidingViewMeta: {
|
|
|
2
2
|
readonly name: "KeyboardAvoidingView";
|
|
3
3
|
readonly category: "layout";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Keyboard avoiding view";
|
|
8
8
|
readonly defaultProps: {
|
|
@@ -2,7 +2,7 @@ export declare const boxMeta: {
|
|
|
2
2
|
readonly name: "Box";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly bg: {
|
|
8
8
|
readonly type: "color";
|
|
@@ -2,7 +2,7 @@ export declare const containerMeta: {
|
|
|
2
2
|
readonly name: "Container";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
[k: string]: {
|
|
8
8
|
readonly type: "spacing";
|
|
@@ -2,7 +2,7 @@ export declare const gridMeta: {
|
|
|
2
2
|
readonly name: "Grid";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly cols: {
|
|
8
8
|
readonly type: "number";
|
|
@@ -2,7 +2,7 @@ export declare const stackMeta: {
|
|
|
2
2
|
readonly name: "Stack";
|
|
3
3
|
readonly category: "foundation";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly props: {
|
|
7
7
|
readonly direction: {
|
|
8
8
|
readonly type: "enum";
|
|
@@ -5,7 +5,7 @@ export declare const flatListMeta: {
|
|
|
5
5
|
readonly blueprint: {
|
|
6
6
|
readonly label: "Flat list";
|
|
7
7
|
};
|
|
8
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
8
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
9
9
|
readonly description: "Virtualized children. Put node.repeat on this list for keyed data and item bindings; bind selection on the child Button/Card press event. Bound the list viewport and avoid nesting in a same-direction ScrollView.";
|
|
10
10
|
readonly events: {
|
|
11
11
|
readonly visibleItemsChange: {
|
|
@@ -109,6 +109,6 @@ export declare const sectionListMeta: {
|
|
|
109
109
|
};
|
|
110
110
|
readonly category: "layout";
|
|
111
111
|
readonly directManifestNode: true;
|
|
112
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
112
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
113
113
|
};
|
|
114
114
|
//# sourceMappingURL=sectionListMeta.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PaginationProps } from '../../../../types/pagination';
|
|
3
|
+
/*** Renders controls for navigating between pages of a finite result set. */
|
|
4
|
+
export declare const Pagination: (props: PaginationProps) => React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../../src/features/pagination/adapters/inbound/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAOpE,6EAA6E;AAC7E,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
3
|
+
import { Button } from '../../../button/public';
|
|
4
|
+
import { Stack } from '../../../layout/public';
|
|
5
|
+
import { Text } from '../../../typography/public';
|
|
6
|
+
import { resolvePaginationPage } from '../../utils/resolvePaginationPage';
|
|
7
|
+
import { resolvePaginationState } from '../../utils/resolvePaginationState';
|
|
8
|
+
/*** Renders controls for navigating between pages of a finite result set. */
|
|
9
|
+
export const Pagination = withZoraThemeScope(PaginationInner);
|
|
10
|
+
/*** Connects normalized pagination state to visible page navigation controls. */
|
|
11
|
+
function PaginationInner({ themeId: _themeId, mode: _mode, page, pageCount, onPageChange, disabled = false, siblingCount = 1, boundaryCount = 1, showFirstLast = false, previousLabel = 'Previous', nextLabel = 'Next', firstLabel = 'First', lastLabel = 'Last', compact = false, testID, interactionPolicy, }) {
|
|
12
|
+
const passive = interactionPolicy === 'passive';
|
|
13
|
+
const state = resolvePaginationState({ boundaryCount, compact, page, pageCount, siblingCount });
|
|
14
|
+
const canGoPrevious = state.currentPage > 1;
|
|
15
|
+
const canGoNext = state.currentPage < state.pageCount;
|
|
16
|
+
const navigationDisabled = disabled || state.pageCount <= 1;
|
|
17
|
+
const changePage = React.useCallback((nextPage) => {
|
|
18
|
+
const clampedPage = resolvePaginationPage(nextPage, state.pageCount);
|
|
19
|
+
if (passive || disabled || clampedPage === state.currentPage)
|
|
20
|
+
return;
|
|
21
|
+
onPageChange?.(clampedPage);
|
|
22
|
+
}, [disabled, onPageChange, passive, state.currentPage, state.pageCount]);
|
|
23
|
+
return (<Stack align="center" direction="row" gap="xs" testID={testID}>
|
|
24
|
+
{showFirstLast ? (<Button disabled={navigationDisabled || state.currentPage === 1} interactionPolicy={interactionPolicy} onPress={() => changePage(1)} size="s" testID={testID ? `${testID}-first` : undefined} variant="ghost">
|
|
25
|
+
{firstLabel}
|
|
26
|
+
</Button>) : null}
|
|
27
|
+
<Button disabled={navigationDisabled || !canGoPrevious} interactionPolicy={interactionPolicy} onPress={() => changePage(state.currentPage - 1)} size="s" testID={testID ? `${testID}-previous` : undefined} variant="ghost">
|
|
28
|
+
{previousLabel}
|
|
29
|
+
</Button>
|
|
30
|
+
{state.items.map((item, index) => item === 'ellipsis' ? (<Text key={`ellipsis-${index}`} emphasis="muted" variant="bodySmall">
|
|
31
|
+
…
|
|
32
|
+
</Text>) : (<Button color={item === state.currentPage ? 'primary' : 'neutral'} disabled={disabled} interactionPolicy={interactionPolicy} key={item} onPress={() => changePage(item)} size="s" testID={testID ? `${testID}-page-${item}` : undefined} variant={item === state.currentPage ? 'solid' : 'ghost'}>
|
|
33
|
+
{item}
|
|
34
|
+
</Button>))}
|
|
35
|
+
<Button disabled={navigationDisabled || !canGoNext} interactionPolicy={interactionPolicy} onPress={() => changePage(state.currentPage + 1)} size="s" testID={testID ? `${testID}-next` : undefined} variant="ghost">
|
|
36
|
+
{nextLabel}
|
|
37
|
+
</Button>
|
|
38
|
+
{showFirstLast ? (<Button disabled={navigationDisabled || state.currentPage === state.pageCount} interactionPolicy={interactionPolicy} onPress={() => changePage(state.pageCount)} size="s" testID={testID ? `${testID}-last` : undefined} variant="ghost">
|
|
39
|
+
{lastLabel}
|
|
40
|
+
</Button>) : null}
|
|
41
|
+
</Stack>);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../../../src/features/pagination/adapters/inbound/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA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I,CAAC,GAAG,CACR,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9C,OAAO,CAAC,OAAO,CAEf;QAAA,CAAC,SAAS,CACZ;MAAA,EAAE,MAAM,CACR;MAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,kBAAkB,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,SAAS,CAAC,CACtE,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAC3C,IAAI,CAAC,GAAG,CACR,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9C,OAAO,CAAC,OAAO,CAEf;UAAA,CAAC,SAAS,CACZ;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { PaginationProps } from '../../../../types/pagination';\nimport { Button } from '../../../button/public';\nimport { Stack } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\nimport { resolvePaginationPage } from '../../utils/resolvePaginationPage';\nimport { resolvePaginationState } from '../../utils/resolvePaginationState';\n\n/*** Renders controls for navigating between pages of a finite result set. */\nexport const Pagination = withZoraThemeScope(PaginationInner);\n\n/*** Connects normalized pagination state to visible page navigation controls. */\nfunction PaginationInner({\n themeId: _themeId,\n mode: _mode,\n page,\n pageCount,\n onPageChange,\n disabled = false,\n siblingCount = 1,\n boundaryCount = 1,\n showFirstLast = false,\n previousLabel = 'Previous',\n nextLabel = 'Next',\n firstLabel = 'First',\n lastLabel = 'Last',\n compact = false,\n testID,\n interactionPolicy,\n}: PaginationProps) {\n const passive = interactionPolicy === 'passive';\n const state = resolvePaginationState({ boundaryCount, compact, page, pageCount, siblingCount });\n const canGoPrevious = state.currentPage > 1;\n const canGoNext = state.currentPage < state.pageCount;\n const navigationDisabled = disabled || state.pageCount <= 1;\n\n const changePage = React.useCallback(\n (nextPage: number) => {\n const clampedPage = resolvePaginationPage(nextPage, state.pageCount);\n if (passive || disabled || clampedPage === state.currentPage) return;\n onPageChange?.(clampedPage);\n },\n [disabled, onPageChange, passive, state.currentPage, state.pageCount],\n );\n\n return (\n <Stack align=\"center\" direction=\"row\" gap=\"xs\" testID={testID}>\n {showFirstLast ? (\n <Button\n disabled={navigationDisabled || state.currentPage === 1}\n interactionPolicy={interactionPolicy}\n onPress={() => changePage(1)}\n size=\"s\"\n testID={testID ? `${testID}-first` : undefined}\n variant=\"ghost\"\n >\n {firstLabel}\n </Button>\n ) : null}\n <Button\n disabled={navigationDisabled || !canGoPrevious}\n interactionPolicy={interactionPolicy}\n onPress={() => changePage(state.currentPage - 1)}\n size=\"s\"\n testID={testID ? `${testID}-previous` : undefined}\n variant=\"ghost\"\n >\n {previousLabel}\n </Button>\n {state.items.map((item, index) =>\n item === 'ellipsis' ? (\n <Text key={`ellipsis-${index}`} emphasis=\"muted\" variant=\"bodySmall\">\n …\n </Text>\n ) : (\n <Button\n color={item === state.currentPage ? 'primary' : 'neutral'}\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n key={item}\n onPress={() => changePage(item)}\n size=\"s\"\n testID={testID ? `${testID}-page-${item}` : undefined}\n variant={item === state.currentPage ? 'solid' : 'ghost'}\n >\n {item}\n </Button>\n ),\n )}\n <Button\n disabled={navigationDisabled || !canGoNext}\n interactionPolicy={interactionPolicy}\n onPress={() => changePage(state.currentPage + 1)}\n size=\"s\"\n testID={testID ? `${testID}-next` : undefined}\n variant=\"ghost\"\n >\n {nextLabel}\n </Button>\n {showFirstLast ? (\n <Button\n disabled={navigationDisabled || state.currentPage === state.pageCount}\n interactionPolicy={interactionPolicy}\n onPress={() => changePage(state.pageCount)}\n size=\"s\"\n testID={testID ? `${testID}-last` : undefined}\n variant=\"ghost\"\n >\n {lastLabel}\n </Button>\n ) : null}\n </Stack>\n );\n}\n"]}
|