@ankhorage/zora 0.10.0 → 0.11.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 +23 -2
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +3 -1
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/badge/types.d.ts +2 -1
- package/dist/components/badge/types.d.ts.map +1 -1
- package/dist/components/badge/types.js.map +1 -1
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +4 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +8 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.js +3 -1
- package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +2 -3
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox/types.d.ts +5 -2
- package/dist/components/checkbox/types.d.ts.map +1 -1
- package/dist/components/checkbox/types.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +3 -1
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/drawer/types.d.ts +2 -1
- package/dist/components/drawer/types.d.ts.map +1 -1
- package/dist/components/drawer/types.js.map +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/Form.d.ts.map +1 -1
- package/dist/components/form/Form.js +3 -1
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/FormActions.d.ts +1 -1
- package/dist/components/form/FormActions.d.ts.map +1 -1
- package/dist/components/form/FormActions.js +3 -1
- package/dist/components/form/FormActions.js.map +1 -1
- package/dist/components/form/FormError.d.ts +1 -1
- package/dist/components/form/FormError.d.ts.map +1 -1
- package/dist/components/form/FormError.js +6 -3
- package/dist/components/form/FormError.js.map +1 -1
- package/dist/components/form/FormField.d.ts +1 -1
- package/dist/components/form/FormField.d.ts.map +1 -1
- package/dist/components/form/FormField.js +5 -3
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/types.d.ts +6 -9
- package/dist/components/form/types.d.ts.map +1 -1
- package/dist/components/form/types.js.map +1 -1
- package/dist/components/heading/Heading.d.ts +1 -1
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/icon/Icon.d.ts +2 -2
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon-button/IconButton.d.ts +1 -1
- package/dist/components/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +5 -2
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/input/types.d.ts +2 -1
- package/dist/components/input/types.d.ts.map +1 -1
- package/dist/components/input/types.js.map +1 -1
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +3 -1
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/types.d.ts +2 -1
- package/dist/components/modal/types.d.ts.map +1 -1
- package/dist/components/modal/types.js.map +1 -1
- package/dist/components/radio/Radio.d.ts +4 -0
- package/dist/components/radio/Radio.d.ts.map +1 -0
- package/dist/components/radio/Radio.js +8 -0
- package/dist/components/radio/Radio.js.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +1 -1
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +3 -1
- package/dist/components/radio/RadioGroup.js.map +1 -1
- package/dist/components/radio/index.d.ts +2 -3
- package/dist/components/radio/index.d.ts.map +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/types.d.ts +5 -2
- package/dist/components/radio/types.d.ts.map +1 -1
- package/dist/components/radio/types.js.map +1 -1
- package/dist/components/select/Select.d.ts +1 -1
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +6 -3
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/types.d.ts +2 -2
- package/dist/components/select/types.d.ts.map +1 -1
- package/dist/components/select/types.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +6 -3
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/types.d.ts +2 -2
- package/dist/components/tabs/types.d.ts.map +1 -1
- package/dist/components/tabs/types.js.map +1 -1
- package/dist/components/text/Text.d.ts +1 -1
- package/dist/components/text/Text.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.d.ts +1 -1
- package/dist/components/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +5 -2
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/types.d.ts +2 -1
- package/dist/components/textarea/types.d.ts.map +1 -1
- package/dist/components/textarea/types.js.map +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.d.ts.map +1 -1
- package/dist/components/toolbar/Toolbar.js +3 -1
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/components/toolbar/ToolbarAction.d.ts +1 -1
- package/dist/components/toolbar/ToolbarAction.d.ts.map +1 -1
- package/dist/components/toolbar/ToolbarAction.js +3 -1
- package/dist/components/toolbar/ToolbarAction.js.map +1 -1
- package/dist/components/toolbar/types.d.ts +3 -4
- package/dist/components/toolbar/types.d.ts.map +1 -1
- package/dist/components/toolbar/types.js.map +1 -1
- package/dist/foundation/Box.d.ts +7 -0
- package/dist/foundation/Box.d.ts.map +1 -0
- package/dist/foundation/Box.js +8 -0
- package/dist/foundation/Box.js.map +1 -0
- package/dist/foundation/Center.d.ts +7 -0
- package/dist/foundation/Center.d.ts.map +1 -0
- package/dist/foundation/Center.js +8 -0
- package/dist/foundation/Center.js.map +1 -0
- package/dist/foundation/Container.d.ts +7 -0
- package/dist/foundation/Container.d.ts.map +1 -0
- package/dist/foundation/Container.js +8 -0
- package/dist/foundation/Container.js.map +1 -0
- package/dist/foundation/Divider.d.ts +7 -0
- package/dist/foundation/Divider.d.ts.map +1 -0
- package/dist/foundation/Divider.js +8 -0
- package/dist/foundation/Divider.js.map +1 -0
- package/dist/foundation/Grid.d.ts +7 -0
- package/dist/foundation/Grid.d.ts.map +1 -0
- package/dist/foundation/Grid.js +8 -0
- package/dist/foundation/Grid.js.map +1 -0
- package/dist/foundation/Inline.d.ts +7 -0
- package/dist/foundation/Inline.d.ts.map +1 -0
- package/dist/foundation/Inline.js +8 -0
- package/dist/foundation/Inline.js.map +1 -0
- package/dist/foundation/Show.d.ts +7 -0
- package/dist/foundation/Show.d.ts.map +1 -0
- package/dist/foundation/Show.js +8 -0
- package/dist/foundation/Show.js.map +1 -0
- package/dist/foundation/Spacer.d.ts +7 -0
- package/dist/foundation/Spacer.d.ts.map +1 -0
- package/dist/foundation/Spacer.js +8 -0
- package/dist/foundation/Spacer.js.map +1 -0
- package/dist/foundation/Stack.d.ts +7 -0
- package/dist/foundation/Stack.d.ts.map +1 -0
- package/dist/foundation/Stack.js +8 -0
- package/dist/foundation/Stack.js.map +1 -0
- package/dist/foundation/Surface.d.ts +8 -0
- package/dist/foundation/Surface.d.ts.map +1 -0
- package/dist/foundation/Surface.js +8 -0
- package/dist/foundation/Surface.js.map +1 -0
- package/dist/foundation/index.d.ts +20 -2
- package/dist/foundation/index.d.ts.map +1 -1
- package/dist/foundation/index.js +10 -1
- package/dist/foundation/index.js.map +1 -1
- package/dist/layout/app-shell/AppShell.d.ts +1 -1
- package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
- package/dist/layout/app-shell/AppShell.js +3 -1
- package/dist/layout/app-shell/AppShell.js.map +1 -1
- package/dist/layout/app-shell/types.d.ts +2 -2
- package/dist/layout/app-shell/types.d.ts.map +1 -1
- package/dist/layout/app-shell/types.js.map +1 -1
- package/dist/layout/auth-layout/AuthLayout.d.ts +1 -1
- package/dist/layout/auth-layout/AuthLayout.d.ts.map +1 -1
- package/dist/layout/auth-layout/AuthLayout.js +3 -1
- package/dist/layout/auth-layout/AuthLayout.js.map +1 -1
- package/dist/layout/auth-layout/types.d.ts +2 -2
- package/dist/layout/auth-layout/types.d.ts.map +1 -1
- package/dist/layout/auth-layout/types.js.map +1 -1
- package/dist/layout/page/Page.d.ts +1 -1
- package/dist/layout/page/Page.d.ts.map +1 -1
- package/dist/layout/page/Page.js +3 -1
- package/dist/layout/page/Page.js.map +1 -1
- package/dist/layout/page/types.d.ts +2 -2
- package/dist/layout/page/types.d.ts.map +1 -1
- package/dist/layout/page/types.js.map +1 -1
- package/dist/layout/page-header/PageHeader.d.ts +1 -1
- package/dist/layout/page-header/PageHeader.d.ts.map +1 -1
- package/dist/layout/page-header/PageHeader.js +3 -1
- package/dist/layout/page-header/PageHeader.js.map +1 -1
- package/dist/layout/page-header/types.d.ts +2 -2
- package/dist/layout/page-header/types.d.ts.map +1 -1
- package/dist/layout/page-header/types.js.map +1 -1
- package/dist/layout/page-section/PageSection.d.ts +1 -1
- package/dist/layout/page-section/PageSection.d.ts.map +1 -1
- package/dist/layout/page-section/PageSection.js +3 -1
- package/dist/layout/page-section/PageSection.js.map +1 -1
- package/dist/layout/page-section/types.d.ts +2 -2
- package/dist/layout/page-section/types.d.ts.map +1 -1
- package/dist/layout/page-section/types.js.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.d.ts +1 -1
- package/dist/layout/settings-layout/SettingsLayout.d.ts.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.js +3 -1
- package/dist/layout/settings-layout/SettingsLayout.js.map +1 -1
- package/dist/layout/settings-layout/types.d.ts +2 -2
- package/dist/layout/settings-layout/types.d.ts.map +1 -1
- package/dist/layout/settings-layout/types.js.map +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.d.ts.map +1 -1
- package/dist/layout/sidebar-layout/SidebarLayout.js +3 -1
- package/dist/layout/sidebar-layout/SidebarLayout.js.map +1 -1
- package/dist/layout/sidebar-layout/types.d.ts +2 -2
- package/dist/layout/sidebar-layout/types.d.ts.map +1 -1
- package/dist/layout/sidebar-layout/types.js.map +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.d.ts +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.d.ts.map +1 -1
- package/dist/layout/topbar-layout/TopbarLayout.js +3 -1
- package/dist/layout/topbar-layout/TopbarLayout.js.map +1 -1
- package/dist/layout/topbar-layout/types.d.ts +2 -2
- package/dist/layout/topbar-layout/types.d.ts.map +1 -1
- package/dist/layout/topbar-layout/types.js.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.d.ts +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +1 -1
- package/dist/patterns/auth/ForgotPasswordForm.js +3 -1
- package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/patterns/auth/OtpForm.d.ts +1 -1
- package/dist/patterns/auth/OtpForm.d.ts.map +1 -1
- package/dist/patterns/auth/OtpForm.js +3 -1
- package/dist/patterns/auth/OtpForm.js.map +1 -1
- package/dist/patterns/auth/SignInForm.d.ts +1 -1
- package/dist/patterns/auth/SignInForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignInForm.js +3 -1
- package/dist/patterns/auth/SignInForm.js.map +1 -1
- package/dist/patterns/auth/SignUpForm.d.ts +1 -1
- package/dist/patterns/auth/SignUpForm.d.ts.map +1 -1
- package/dist/patterns/auth/SignUpForm.js +3 -1
- package/dist/patterns/auth/SignUpForm.js.map +1 -1
- package/dist/patterns/auth/types.d.ts +2 -2
- package/dist/patterns/auth/types.d.ts.map +1 -1
- package/dist/patterns/auth/types.js.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.d.ts +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.d.ts.map +1 -1
- package/dist/patterns/collection-editor/CollectionEditor.js +3 -1
- package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
- package/dist/patterns/collection-editor/types.d.ts +2 -2
- package/dist/patterns/collection-editor/types.d.ts.map +1 -1
- package/dist/patterns/collection-editor/types.js.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
- package/dist/patterns/confirm-dialog/types.d.ts +2 -2
- package/dist/patterns/confirm-dialog/types.d.ts.map +1 -1
- package/dist/patterns/confirm-dialog/types.js.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.d.ts.map +1 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js +3 -1
- package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
- package/dist/patterns/disclosure-section/types.d.ts +2 -2
- package/dist/patterns/disclosure-section/types.d.ts.map +1 -1
- package/dist/patterns/disclosure-section/types.js.map +1 -1
- package/dist/patterns/empty-state/EmptyState.d.ts +1 -1
- package/dist/patterns/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/patterns/empty-state/EmptyState.js +3 -1
- package/dist/patterns/empty-state/EmptyState.js.map +1 -1
- package/dist/patterns/empty-state/types.d.ts +2 -2
- package/dist/patterns/empty-state/types.d.ts.map +1 -1
- package/dist/patterns/empty-state/types.js.map +1 -1
- package/dist/patterns/form-field/FormField.d.ts +1 -1
- package/dist/patterns/form-field/FormField.d.ts.map +1 -1
- package/dist/patterns/form-field/FormField.js +3 -1
- package/dist/patterns/form-field/FormField.js.map +1 -1
- package/dist/patterns/form-field/types.d.ts +2 -1
- package/dist/patterns/form-field/types.d.ts.map +1 -1
- package/dist/patterns/form-field/types.js.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.d.ts +1 -1
- package/dist/patterns/inspector-field/InspectorField.d.ts.map +1 -1
- package/dist/patterns/inspector-field/InspectorField.js +3 -1
- package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
- package/dist/patterns/inspector-field/types.d.ts +2 -2
- package/dist/patterns/inspector-field/types.d.ts.map +1 -1
- package/dist/patterns/inspector-field/types.js.map +1 -1
- package/dist/patterns/notice/Notice.d.ts +1 -1
- package/dist/patterns/notice/Notice.d.ts.map +1 -1
- package/dist/patterns/notice/Notice.js +3 -1
- package/dist/patterns/notice/Notice.js.map +1 -1
- package/dist/patterns/notice/types.d.ts +2 -2
- package/dist/patterns/notice/types.d.ts.map +1 -1
- package/dist/patterns/notice/types.js.map +1 -1
- package/dist/patterns/panel/Panel.d.ts +1 -1
- package/dist/patterns/panel/Panel.d.ts.map +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +1 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.js +3 -1
- package/dist/patterns/responsive-panel/ResponsivePanel.js.map +1 -1
- package/dist/patterns/responsive-panel/types.d.ts +2 -2
- package/dist/patterns/responsive-panel/types.d.ts.map +1 -1
- package/dist/patterns/responsive-panel/types.js.map +1 -1
- package/dist/patterns/section-header/SectionHeader.d.ts +1 -1
- package/dist/patterns/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/patterns/section-header/SectionHeader.js +3 -1
- package/dist/patterns/section-header/SectionHeader.js.map +1 -1
- package/dist/patterns/section-header/types.d.ts +2 -2
- package/dist/patterns/section-header/types.d.ts.map +1 -1
- package/dist/patterns/section-header/types.js.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.d.ts +1 -1
- package/dist/patterns/settings-row/SettingsRow.d.ts.map +1 -1
- package/dist/patterns/settings-row/SettingsRow.js +3 -1
- package/dist/patterns/settings-row/SettingsRow.js.map +1 -1
- package/dist/patterns/settings-row/types.d.ts +2 -2
- package/dist/patterns/settings-row/types.d.ts.map +1 -1
- package/dist/patterns/settings-row/types.js.map +1 -1
- package/dist/patterns/switch-field/SwitchField.d.ts +1 -1
- package/dist/patterns/switch-field/SwitchField.d.ts.map +1 -1
- package/dist/patterns/switch-field/SwitchField.js +3 -1
- package/dist/patterns/switch-field/SwitchField.js.map +1 -1
- package/dist/patterns/switch-field/types.d.ts +2 -2
- package/dist/patterns/switch-field/types.d.ts.map +1 -1
- package/dist/patterns/switch-field/types.js.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.d.ts +1 -1
- package/dist/patterns/tile-grid/PaletteItem.d.ts.map +1 -1
- package/dist/patterns/tile-grid/PaletteItem.js +6 -3
- package/dist/patterns/tile-grid/PaletteItem.js.map +1 -1
- package/dist/patterns/tile-grid/TileGrid.d.ts +1 -1
- package/dist/patterns/tile-grid/TileGrid.d.ts.map +1 -1
- package/dist/patterns/tile-grid/TileGrid.js +3 -1
- package/dist/patterns/tile-grid/TileGrid.js.map +1 -1
- package/dist/patterns/tile-grid/types.d.ts +3 -4
- package/dist/patterns/tile-grid/types.d.ts.map +1 -1
- package/dist/patterns/tile-grid/types.js.map +1 -1
- package/dist/patterns/tree-view/TreeItem.d.ts +3 -2
- package/dist/patterns/tree-view/TreeItem.d.ts.map +1 -1
- package/dist/patterns/tree-view/TreeItem.js +4 -2
- package/dist/patterns/tree-view/TreeItem.js.map +1 -1
- package/dist/patterns/tree-view/TreeView.d.ts +1 -1
- package/dist/patterns/tree-view/TreeView.d.ts.map +1 -1
- package/dist/patterns/tree-view/TreeView.js +3 -1
- package/dist/patterns/tree-view/TreeView.js.map +1 -1
- package/dist/patterns/tree-view/types.d.ts +2 -2
- package/dist/patterns/tree-view/types.d.ts.map +1 -1
- package/dist/patterns/tree-view/types.js.map +1 -1
- package/dist/theme/withZoraThemeScope.d.ts +1 -1
- package/dist/theme/withZoraThemeScope.d.ts.map +1 -1
- package/dist/theme/withZoraThemeScope.js +2 -2
- package/dist/theme/withZoraThemeScope.js.map +1 -1
- package/package.json +1 -1
- package/src/components/badge/Badge.tsx +12 -1
- package/src/components/badge/types.ts +5 -4
- package/src/components/checkbox/Checkbox.tsx +11 -0
- package/src/components/checkbox/CheckboxGroup.tsx +6 -1
- package/src/components/checkbox/index.ts +2 -3
- package/src/components/checkbox/types.ts +13 -5
- package/src/components/drawer/Drawer.tsx +13 -1
- package/src/components/drawer/types.ts +9 -4
- package/src/components/form/Form.tsx +6 -1
- package/src/components/form/FormActions.tsx +6 -1
- package/src/components/form/FormError.tsx +7 -3
- package/src/components/form/FormField.tsx +24 -3
- package/src/components/form/types.ts +12 -12
- package/src/components/icon/Icon.tsx +1 -1
- package/src/components/input/Input.tsx +13 -2
- package/src/components/input/types.ts +8 -4
- package/src/components/modal/Modal.tsx +6 -1
- package/src/components/modal/types.ts +5 -4
- package/src/components/radio/Radio.tsx +11 -0
- package/src/components/radio/RadioGroup.tsx +6 -1
- package/src/components/radio/index.ts +2 -3
- package/src/components/radio/types.ts +12 -5
- package/src/components/select/Select.tsx +9 -3
- package/src/components/select/types.ts +3 -2
- package/src/components/tabs/Tabs.tsx +9 -3
- package/src/components/tabs/types.ts +2 -2
- package/src/components/textarea/Textarea.tsx +13 -2
- package/src/components/textarea/types.ts +8 -4
- package/src/components/toolbar/Toolbar.tsx +6 -1
- package/src/components/toolbar/ToolbarAction.tsx +9 -1
- package/src/components/toolbar/types.ts +4 -4
- package/src/foundation/Box.tsx +13 -0
- package/src/foundation/Center.tsx +16 -0
- package/src/foundation/Container.tsx +17 -0
- package/src/foundation/Divider.tsx +17 -0
- package/src/foundation/Grid.tsx +13 -0
- package/src/foundation/Inline.tsx +16 -0
- package/src/foundation/Show.tsx +13 -0
- package/src/foundation/Spacer.tsx +16 -0
- package/src/foundation/Stack.tsx +13 -0
- package/src/foundation/Surface.tsx +20 -0
- package/src/foundation/index.test.ts +2 -2
- package/src/foundation/index.ts +20 -25
- package/src/layout/app-shell/AppShell.tsx +6 -1
- package/src/layout/app-shell/types.ts +3 -2
- package/src/layout/auth-layout/AuthLayout.tsx +6 -1
- package/src/layout/auth-layout/types.ts +3 -2
- package/src/layout/page/Page.tsx +12 -1
- package/src/layout/page/types.ts +2 -2
- package/src/layout/page-header/PageHeader.tsx +6 -1
- package/src/layout/page-header/types.ts +3 -2
- package/src/layout/page-section/PageSection.tsx +12 -1
- package/src/layout/page-section/types.ts +3 -2
- package/src/layout/settings-layout/SettingsLayout.tsx +6 -1
- package/src/layout/settings-layout/types.ts +3 -2
- package/src/layout/sidebar-layout/SidebarLayout.tsx +6 -1
- package/src/layout/sidebar-layout/types.ts +3 -2
- package/src/layout/topbar-layout/TopbarLayout.tsx +11 -1
- package/src/layout/topbar-layout/types.ts +3 -2
- package/src/patterns/auth/ForgotPasswordForm.tsx +6 -1
- package/src/patterns/auth/OtpForm.tsx +6 -1
- package/src/patterns/auth/SignInForm.tsx +6 -1
- package/src/patterns/auth/SignUpForm.tsx +6 -1
- package/src/patterns/auth/types.ts +2 -2
- package/src/patterns/collection-editor/CollectionEditor.tsx +6 -1
- package/src/patterns/collection-editor/types.ts +3 -2
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +6 -1
- package/src/patterns/confirm-dialog/types.ts +2 -2
- package/src/patterns/disclosure-section/DisclosureSection.tsx +6 -1
- package/src/patterns/disclosure-section/types.ts +3 -2
- package/src/patterns/empty-state/EmptyState.tsx +6 -1
- package/src/patterns/empty-state/types.ts +2 -2
- package/src/patterns/form-field/FormField.tsx +12 -1
- package/src/patterns/form-field/types.ts +9 -4
- package/src/patterns/inspector-field/InspectorField.tsx +11 -1
- package/src/patterns/inspector-field/types.ts +3 -2
- package/src/patterns/notice/Notice.tsx +6 -1
- package/src/patterns/notice/types.ts +2 -2
- package/src/patterns/responsive-panel/ResponsivePanel.tsx +6 -1
- package/src/patterns/responsive-panel/types.ts +3 -2
- package/src/patterns/section-header/SectionHeader.tsx +6 -1
- package/src/patterns/section-header/types.ts +3 -2
- package/src/patterns/settings-row/SettingsRow.tsx +6 -1
- package/src/patterns/settings-row/types.ts +3 -2
- package/src/patterns/switch-field/SwitchField.tsx +6 -1
- package/src/patterns/switch-field/types.ts +3 -2
- package/src/patterns/tile-grid/PaletteItem.tsx +9 -3
- package/src/patterns/tile-grid/TileGrid.tsx +6 -1
- package/src/patterns/tile-grid/types.ts +4 -4
- package/src/patterns/tree-view/TreeItem.tsx +10 -3
- package/src/patterns/tree-view/TreeView.tsx +6 -1
- package/src/patterns/tree-view/types.ts +3 -2
- package/src/theme/themeScopeStructure.test.ts +186 -65
- package/src/theme/withZoraThemeScope.tsx +8 -7
|
@@ -10,7 +10,9 @@ export interface CollectionEditorRenderItemProps<TItem> {
|
|
|
10
10
|
canMoveDown: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
14
|
+
|
|
15
|
+
export interface CollectionEditorProps<TItem> extends ZoraBaseProps {
|
|
14
16
|
title?: React.ReactNode;
|
|
15
17
|
description?: React.ReactNode;
|
|
16
18
|
items: readonly TItem[];
|
|
@@ -21,5 +23,4 @@ export interface CollectionEditorProps<TItem> {
|
|
|
21
23
|
addLabel?: React.ReactNode;
|
|
22
24
|
emptyLabel?: React.ReactNode;
|
|
23
25
|
disabled?: boolean;
|
|
24
|
-
testID?: string;
|
|
25
26
|
}
|
|
@@ -3,9 +3,12 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Button } from '../../components/button';
|
|
5
5
|
import { Modal } from '../../components/modal';
|
|
6
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
7
|
import type { ConfirmDialogProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function ConfirmDialogInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
visible,
|
|
10
13
|
title,
|
|
11
14
|
description,
|
|
@@ -44,3 +47,5 @@ export function ConfirmDialog({
|
|
|
44
47
|
</Modal>
|
|
45
48
|
);
|
|
46
49
|
}
|
|
50
|
+
|
|
51
|
+
export const ConfirmDialog = withZoraThemeScope(ConfirmDialogInner);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
3
|
import type { ZoraEmphasis, ZoraTone } from '../../internal/recipes';
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
5
|
|
|
5
|
-
export interface ConfirmDialogProps {
|
|
6
|
+
export interface ConfirmDialogProps extends ZoraBaseProps {
|
|
6
7
|
visible: boolean;
|
|
7
8
|
title: React.ReactNode;
|
|
8
9
|
description?: React.ReactNode;
|
|
@@ -15,5 +16,4 @@ export interface ConfirmDialogProps {
|
|
|
15
16
|
closeOnBackdrop?: boolean;
|
|
16
17
|
onConfirm?: () => void;
|
|
17
18
|
onCancel?: () => void;
|
|
18
|
-
testID?: string;
|
|
19
19
|
}
|
|
@@ -2,10 +2,13 @@ import { Box, Stack } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { IconButton } from '../../components/icon-button';
|
|
5
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
6
|
import { Panel } from '../panel';
|
|
6
7
|
import type { DisclosureSectionProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function DisclosureSectionInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
title,
|
|
10
13
|
description,
|
|
11
14
|
icon,
|
|
@@ -59,3 +62,5 @@ export function DisclosureSection({
|
|
|
59
62
|
</Panel>
|
|
60
63
|
);
|
|
61
64
|
}
|
|
65
|
+
|
|
66
|
+
export const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
|
|
6
|
+
export interface DisclosureSectionProps extends ZoraBaseProps {
|
|
5
7
|
title: ReactNode;
|
|
6
8
|
description?: ReactNode;
|
|
7
9
|
icon?: ButtonIconSpec;
|
|
@@ -11,5 +13,4 @@ export interface DisclosureSectionProps {
|
|
|
11
13
|
actions?: ReactNode;
|
|
12
14
|
children?: ReactNode;
|
|
13
15
|
disabled?: boolean;
|
|
14
|
-
testID?: string;
|
|
15
16
|
}
|
|
@@ -3,9 +3,12 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Button } from '../../components/button';
|
|
5
5
|
import { Card } from '../../components/card';
|
|
6
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
7
|
import type { EmptyStateProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function EmptyStateInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
title,
|
|
10
13
|
description,
|
|
11
14
|
eyebrow,
|
|
@@ -51,3 +54,5 @@ export function EmptyState({
|
|
|
51
54
|
</Card>
|
|
52
55
|
);
|
|
53
56
|
}
|
|
57
|
+
|
|
58
|
+
export const EmptyState = withZoraThemeScope(EmptyStateInner);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
3
|
import type { ZoraEmphasis, ZoraTone } from '../../internal/recipes';
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
5
|
|
|
5
6
|
export interface EmptyStateAction {
|
|
6
7
|
label: React.ReactNode;
|
|
@@ -9,12 +10,11 @@ export interface EmptyStateAction {
|
|
|
9
10
|
emphasis?: ZoraEmphasis;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export interface EmptyStateProps {
|
|
13
|
+
export interface EmptyStateProps extends ZoraBaseProps {
|
|
13
14
|
title: React.ReactNode;
|
|
14
15
|
description?: React.ReactNode;
|
|
15
16
|
eyebrow?: React.ReactNode;
|
|
16
17
|
primaryAction?: EmptyStateAction;
|
|
17
18
|
secondaryAction?: EmptyStateAction;
|
|
18
19
|
footer?: React.ReactNode;
|
|
19
|
-
testID?: string;
|
|
20
20
|
}
|
|
@@ -2,9 +2,18 @@ import { Field, Stack } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { Text } from '../../components/text';
|
|
5
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
6
|
import type { FormFieldProps } from './types';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
function FormFieldInner({
|
|
9
|
+
themeId: _themeId,
|
|
10
|
+
mode: _mode,
|
|
11
|
+
label,
|
|
12
|
+
description,
|
|
13
|
+
helperText,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}: FormFieldProps) {
|
|
8
17
|
return (
|
|
9
18
|
<Field
|
|
10
19
|
{...props}
|
|
@@ -26,3 +35,5 @@ export function FormField({ label, description, helperText, children, ...props }
|
|
|
26
35
|
</Field>
|
|
27
36
|
);
|
|
28
37
|
}
|
|
38
|
+
|
|
39
|
+
export const FormField = withZoraThemeScope(FormFieldInner);
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { FieldProps as SurfaceFieldProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
|
|
6
|
+
export interface FormFieldProps
|
|
7
|
+
extends
|
|
8
|
+
ZoraBaseProps,
|
|
9
|
+
Pick<
|
|
10
|
+
Omit<SurfaceFieldProps, 'mode' | 'themeId'>,
|
|
11
|
+
'children' | 'disabled' | 'errorText' | 'invalid' | 'readOnly' | 'required'
|
|
12
|
+
> {
|
|
8
13
|
label: React.ReactNode;
|
|
9
14
|
description?: React.ReactNode;
|
|
10
15
|
helperText?: React.ReactNode;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { Box, Stack } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
5
|
import { FormField } from '../form-field';
|
|
5
6
|
import type { InspectorFieldProps } from './types';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
function InspectorFieldInner({
|
|
9
|
+
themeId: _themeId,
|
|
10
|
+
mode: _mode,
|
|
11
|
+
label,
|
|
12
|
+
control,
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}: InspectorFieldProps) {
|
|
8
16
|
return (
|
|
9
17
|
<FormField {...props} label={label}>
|
|
10
18
|
<Stack direction="row" gap="s" align="center">
|
|
@@ -14,3 +22,5 @@ export function InspectorField({ label, control, children, ...props }: Inspector
|
|
|
14
22
|
</FormField>
|
|
15
23
|
);
|
|
16
24
|
}
|
|
25
|
+
|
|
26
|
+
export const InspectorField = withZoraThemeScope(InspectorFieldInner);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
|
|
5
|
+
export interface InspectorFieldProps extends ZoraBaseProps {
|
|
4
6
|
label: ReactNode;
|
|
5
7
|
description?: ReactNode;
|
|
6
8
|
helperText?: ReactNode;
|
|
@@ -11,5 +13,4 @@ export interface InspectorFieldProps {
|
|
|
11
13
|
readOnly?: boolean;
|
|
12
14
|
control?: ReactNode;
|
|
13
15
|
children?: ReactNode;
|
|
14
|
-
testID?: string;
|
|
15
16
|
}
|
|
@@ -3,9 +3,12 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Badge } from '../../components/badge';
|
|
5
5
|
import { Card } from '../../components/card';
|
|
6
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
7
|
import type { NoticeProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function NoticeInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
title,
|
|
10
13
|
description,
|
|
11
14
|
children,
|
|
@@ -28,3 +31,5 @@ export function Notice({
|
|
|
28
31
|
</Card>
|
|
29
32
|
);
|
|
30
33
|
}
|
|
34
|
+
|
|
35
|
+
export const Notice = withZoraThemeScope(NoticeInner);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
3
|
import type { ZoraTone } from '../../internal/recipes';
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
5
|
|
|
5
|
-
export interface NoticeProps {
|
|
6
|
+
export interface NoticeProps extends ZoraBaseProps {
|
|
6
7
|
title: React.ReactNode;
|
|
7
8
|
description?: React.ReactNode;
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
actions?: React.ReactNode;
|
|
10
11
|
tone?: ZoraTone;
|
|
11
|
-
testID?: string;
|
|
12
12
|
}
|
|
@@ -2,10 +2,13 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { Drawer } from '../../components/drawer';
|
|
4
4
|
import { Modal } from '../../components/modal';
|
|
5
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
6
|
import { Panel } from '../panel';
|
|
6
7
|
import type { ResponsivePanelProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function ResponsivePanelInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
title,
|
|
10
13
|
description,
|
|
11
14
|
actions,
|
|
@@ -68,3 +71,5 @@ export function ResponsivePanel({
|
|
|
68
71
|
</Panel>
|
|
69
72
|
);
|
|
70
73
|
}
|
|
74
|
+
|
|
75
|
+
export const ResponsivePanel = withZoraThemeScope(ResponsivePanelInner);
|
|
@@ -4,7 +4,9 @@ export type ResponsivePanelSide = 'left' | 'right';
|
|
|
4
4
|
export type ResponsivePanelDesktopMode = 'inline' | 'floating';
|
|
5
5
|
export type ResponsivePanelMobileMode = 'drawer' | 'modal';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
8
|
+
|
|
9
|
+
export interface ResponsivePanelProps extends ZoraBaseProps {
|
|
8
10
|
title?: React.ReactNode;
|
|
9
11
|
description?: React.ReactNode;
|
|
10
12
|
actions?: React.ReactNode;
|
|
@@ -16,5 +18,4 @@ export interface ResponsivePanelProps {
|
|
|
16
18
|
desktopMode?: ResponsivePanelDesktopMode;
|
|
17
19
|
mobileMode?: ResponsivePanelMobileMode;
|
|
18
20
|
compact?: boolean;
|
|
19
|
-
testID?: string;
|
|
20
21
|
}
|
|
@@ -3,9 +3,12 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Heading } from '../../components/heading';
|
|
5
5
|
import { Text } from '../../components/text';
|
|
6
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
7
|
import type { SectionHeaderProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function SectionHeaderInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
title,
|
|
10
13
|
description,
|
|
11
14
|
eyebrow,
|
|
@@ -39,3 +42,5 @@ export function SectionHeader({
|
|
|
39
42
|
</Stack>
|
|
40
43
|
);
|
|
41
44
|
}
|
|
45
|
+
|
|
46
|
+
export const SectionHeader = withZoraThemeScope(SectionHeaderInner);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
|
|
5
|
+
export interface SectionHeaderProps extends ZoraBaseProps {
|
|
4
6
|
title: React.ReactNode;
|
|
5
7
|
description?: React.ReactNode;
|
|
6
8
|
eyebrow?: React.ReactNode;
|
|
7
9
|
actions?: React.ReactNode;
|
|
8
|
-
testID?: string;
|
|
9
10
|
}
|
|
@@ -3,9 +3,12 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Card } from '../../components/card';
|
|
5
5
|
import { Text } from '../../components/text';
|
|
6
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
7
|
import type { SettingsRowProps } from './types';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
function SettingsRowInner({
|
|
10
|
+
themeId: _themeId,
|
|
11
|
+
mode: _mode,
|
|
9
12
|
title,
|
|
10
13
|
description,
|
|
11
14
|
meta,
|
|
@@ -39,3 +42,5 @@ export function SettingsRow({
|
|
|
39
42
|
</Card>
|
|
40
43
|
);
|
|
41
44
|
}
|
|
45
|
+
|
|
46
|
+
export const SettingsRow = withZoraThemeScope(SettingsRowInner);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
|
|
5
|
+
interface SettingsRowBaseProps extends ZoraBaseProps {
|
|
4
6
|
title: React.ReactNode;
|
|
5
7
|
description?: React.ReactNode;
|
|
6
8
|
meta?: React.ReactNode;
|
|
7
9
|
disabled?: boolean;
|
|
8
|
-
testID?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
interface SettingsRowPressableProps {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Switch } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
5
|
import { SettingsRow } from '../settings-row';
|
|
5
6
|
import type { SwitchFieldProps } from './types';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
function SwitchFieldInner({
|
|
9
|
+
themeId: _themeId,
|
|
10
|
+
mode: _mode,
|
|
8
11
|
label,
|
|
9
12
|
description,
|
|
10
13
|
value,
|
|
@@ -22,3 +25,5 @@ export function SwitchField({
|
|
|
22
25
|
/>
|
|
23
26
|
);
|
|
24
27
|
}
|
|
28
|
+
|
|
29
|
+
export const SwitchField = withZoraThemeScope(SwitchFieldInner);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
|
|
5
|
+
export interface SwitchFieldProps extends ZoraBaseProps {
|
|
4
6
|
label: ReactNode;
|
|
5
7
|
description?: ReactNode;
|
|
6
8
|
value: boolean;
|
|
7
9
|
onValueChange: (value: boolean) => void;
|
|
8
10
|
disabled?: boolean;
|
|
9
|
-
testID?: string;
|
|
10
11
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { Box
|
|
1
|
+
import { Box } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { Card } from '../../components/card';
|
|
5
5
|
import { Heading } from '../../components/heading';
|
|
6
6
|
import { Text } from '../../components/text';
|
|
7
|
+
import { useZoraTheme } from '../../theme/useZoraTheme';
|
|
8
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
7
9
|
import type { PaletteItemProps } from './types';
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
function PaletteItemInner({
|
|
12
|
+
themeId: _themeId,
|
|
13
|
+
mode: _mode,
|
|
10
14
|
title,
|
|
11
15
|
description,
|
|
12
16
|
icon,
|
|
@@ -16,7 +20,7 @@ export function PaletteItem({
|
|
|
16
20
|
onPress,
|
|
17
21
|
testID,
|
|
18
22
|
}: PaletteItemProps) {
|
|
19
|
-
const { theme } =
|
|
23
|
+
const { theme } = useZoraTheme();
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
26
|
<Card
|
|
@@ -49,3 +53,5 @@ export function PaletteItem({
|
|
|
49
53
|
</Card>
|
|
50
54
|
);
|
|
51
55
|
}
|
|
56
|
+
|
|
57
|
+
export const PaletteItem = withZoraThemeScope(PaletteItemInner);
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Box } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
5
|
import type { TileGridProps } from './types';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
function TileGridInner({
|
|
8
|
+
themeId: _themeId,
|
|
9
|
+
mode: _mode,
|
|
7
10
|
children,
|
|
8
11
|
columns = 'responsive',
|
|
9
12
|
compact = false,
|
|
@@ -42,3 +45,5 @@ export function TileGrid({
|
|
|
42
45
|
</Box>
|
|
43
46
|
);
|
|
44
47
|
}
|
|
48
|
+
|
|
49
|
+
export const TileGrid = withZoraThemeScope(TileGridInner);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
|
|
6
|
+
export interface TileGridProps extends ZoraBaseProps {
|
|
5
7
|
children?: ReactNode;
|
|
6
8
|
columns?: number | 'responsive';
|
|
7
9
|
compact?: boolean;
|
|
8
|
-
testID?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export interface PaletteItemProps {
|
|
12
|
+
export interface PaletteItemProps extends ZoraBaseProps {
|
|
12
13
|
title: ReactNode;
|
|
13
14
|
description?: ReactNode;
|
|
14
15
|
icon?: ButtonIconSpec;
|
|
@@ -16,5 +17,4 @@ export interface PaletteItemProps {
|
|
|
16
17
|
selected?: boolean;
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
onPress?: () => void;
|
|
19
|
-
testID?: string;
|
|
20
20
|
}
|
|
@@ -2,10 +2,12 @@ import { Box, Stack } from '@ankhorage/surface';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { IconButton } from '../../components/icon-button';
|
|
5
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
6
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
7
|
import { SettingsRow } from '../settings-row';
|
|
6
8
|
import type { TreeItemNode, TreeItemRenderProps } from './types';
|
|
7
9
|
|
|
8
|
-
interface TreeItemProps<TId extends string = string> {
|
|
10
|
+
interface TreeItemProps<TId extends string = string> extends ZoraBaseProps {
|
|
9
11
|
node: TreeItemNode<TId>;
|
|
10
12
|
depth: number;
|
|
11
13
|
selectedId?: TId;
|
|
@@ -15,7 +17,9 @@ interface TreeItemProps<TId extends string = string> {
|
|
|
15
17
|
renderItem?: (props: TreeItemRenderProps<TId>) => React.ReactNode;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
function TreeItemInner<TId extends string = string>({
|
|
21
|
+
themeId: _themeId,
|
|
22
|
+
mode: _mode,
|
|
19
23
|
node,
|
|
20
24
|
depth,
|
|
21
25
|
selectedId,
|
|
@@ -23,6 +27,7 @@ export function TreeItem<TId extends string = string>({
|
|
|
23
27
|
onSelect,
|
|
24
28
|
onToggleExpand,
|
|
25
29
|
renderItem,
|
|
30
|
+
testID,
|
|
26
31
|
}: TreeItemProps<TId>) {
|
|
27
32
|
const hasChildren = node.children !== undefined && node.children.length > 0;
|
|
28
33
|
const isExpanded = expandedIds.includes(node.id);
|
|
@@ -63,7 +68,7 @@ export function TreeItem<TId extends string = string>({
|
|
|
63
68
|
};
|
|
64
69
|
|
|
65
70
|
return (
|
|
66
|
-
<Box>
|
|
71
|
+
<Box testID={testID}>
|
|
67
72
|
<Box style={{ paddingLeft: depth * 16 }}>{renderContent()}</Box>
|
|
68
73
|
{hasChildren && isExpanded ? (
|
|
69
74
|
<Box>
|
|
@@ -84,3 +89,5 @@ export function TreeItem<TId extends string = string>({
|
|
|
84
89
|
</Box>
|
|
85
90
|
);
|
|
86
91
|
}
|
|
92
|
+
|
|
93
|
+
export const TreeItem = withZoraThemeScope(TreeItemInner);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Stack } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
5
|
import { TreeItem } from './TreeItem';
|
|
5
6
|
import type { TreeViewProps } from './types';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
function TreeViewInner<TId extends string = string>({
|
|
9
|
+
themeId: _themeId,
|
|
10
|
+
mode: _mode,
|
|
8
11
|
nodes,
|
|
9
12
|
selectedId,
|
|
10
13
|
expandedIds: controlledExpandedIds,
|
|
@@ -48,3 +51,5 @@ export function TreeView<TId extends string = string>({
|
|
|
48
51
|
</Stack>
|
|
49
52
|
);
|
|
50
53
|
}
|
|
54
|
+
|
|
55
|
+
export const TreeView = withZoraThemeScope(TreeViewInner);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
|
|
4
6
|
export interface TreeItemNode<TId extends string = string> {
|
|
5
7
|
id: TId;
|
|
6
8
|
label: ReactNode;
|
|
@@ -19,7 +21,7 @@ export interface TreeItemRenderProps<TId extends string = string> {
|
|
|
19
21
|
hasChildren: boolean;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
export interface TreeViewProps<TId extends string = string> {
|
|
24
|
+
export interface TreeViewProps<TId extends string = string> extends ZoraBaseProps {
|
|
23
25
|
nodes: readonly TreeItemNode<TId>[];
|
|
24
26
|
selectedId?: TId;
|
|
25
27
|
expandedIds?: readonly TId[];
|
|
@@ -27,5 +29,4 @@ export interface TreeViewProps<TId extends string = string> {
|
|
|
27
29
|
onSelect?: (id: TId) => void;
|
|
28
30
|
onExpandedChange?: (ids: readonly TId[]) => void;
|
|
29
31
|
renderItem?: (props: TreeItemRenderProps<TId>) => ReactNode;
|
|
30
|
-
testID?: string;
|
|
31
32
|
}
|