@ankhorage/zora 0.9.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 +12 -0
- package/README.md +80 -34
- 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/button/Button.js +3 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/types.d.ts +2 -1
- package/dist/components/button/types.d.ts.map +1 -1
- package/dist/components/button/types.js.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/card/Card.js +3 -1
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/card/types.d.ts +2 -1
- package/dist/components/card/types.d.ts.map +1 -1
- package/dist/components/card/types.js.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/heading/Heading.js +3 -1
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/heading/types.d.ts +2 -2
- package/dist/components/heading/types.d.ts.map +1 -1
- package/dist/components/heading/types.js.map +1 -1
- package/dist/components/icon/Icon.d.ts +4 -2
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +3 -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/icon-button/IconButton.js +3 -1
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/icon-button/types.d.ts +2 -1
- package/dist/components/icon-button/types.d.ts.map +1 -1
- package/dist/components/icon-button/types.js.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/text/Text.js +3 -1
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/text/types.d.ts +2 -2
- package/dist/components/text/types.d.ts.map +1 -1
- package/dist/components/text/types.js.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/panel/Panel.js +3 -1
- package/dist/patterns/panel/Panel.js.map +1 -1
- package/dist/patterns/panel/types.d.ts +2 -2
- package/dist/patterns/panel/types.d.ts.map +1 -1
- package/dist/patterns/panel/types.js.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/ZoraBaseProps.d.ts +18 -0
- package/dist/theme/ZoraBaseProps.d.ts.map +1 -0
- package/dist/theme/ZoraBaseProps.js +2 -0
- package/dist/theme/ZoraBaseProps.js.map +1 -0
- package/dist/theme/ZoraProvider.d.ts.map +1 -1
- package/dist/theme/ZoraProvider.js +8 -4
- package/dist/theme/ZoraProvider.js.map +1 -1
- package/dist/theme/ZoraThemeRuntimeContext.d.ts +9 -0
- package/dist/theme/ZoraThemeRuntimeContext.d.ts.map +1 -0
- package/dist/theme/ZoraThemeRuntimeContext.js +10 -0
- package/dist/theme/ZoraThemeRuntimeContext.js.map +1 -0
- package/dist/theme/ZoraThemeScope.d.ts +9 -0
- package/dist/theme/ZoraThemeScope.d.ts.map +1 -0
- package/dist/theme/ZoraThemeScope.js +41 -0
- package/dist/theme/ZoraThemeScope.js.map +1 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/resolveZoraScopedThemeId.d.ts +6 -0
- package/dist/theme/resolveZoraScopedThemeId.d.ts.map +1 -0
- package/dist/theme/resolveZoraScopedThemeId.js +15 -0
- package/dist/theme/resolveZoraScopedThemeId.js.map +1 -0
- package/dist/theme/withZoraThemeScope.d.ts +4 -0
- package/dist/theme/withZoraThemeScope.d.ts.map +1 -0
- package/dist/theme/withZoraThemeScope.js +16 -0
- package/dist/theme/withZoraThemeScope.js.map +1 -0
- package/package.json +1 -1
- package/src/components/badge/Badge.tsx +12 -1
- package/src/components/badge/types.ts +5 -4
- package/src/components/button/Button.tsx +11 -1
- package/src/components/button/types.ts +3 -4
- package/src/components/card/Card.tsx +6 -1
- package/src/components/card/types.ts +3 -1
- 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/heading/Heading.tsx +6 -1
- package/src/components/heading/types.ts +3 -2
- package/src/components/icon/Icon.tsx +7 -2
- package/src/components/icon-button/IconButton.tsx +6 -1
- package/src/components/icon-button/types.ts +2 -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/text/Text.tsx +6 -1
- package/src/components/text/types.ts +3 -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/panel/Panel.tsx +4 -1
- package/src/patterns/panel/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/ZoraBaseProps.ts +20 -0
- package/src/theme/ZoraProvider.tsx +9 -4
- package/src/theme/ZoraThemeRuntimeContext.tsx +18 -0
- package/src/theme/ZoraThemeScope.tsx +74 -0
- package/src/theme/index.ts +4 -0
- package/src/theme/resolveZoraScopedThemeId.test.ts +47 -0
- package/src/theme/resolveZoraScopedThemeId.ts +25 -0
- package/src/theme/themeScopeStructure.test.ts +220 -0
- package/src/theme/withZoraThemeScope.tsx +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a600848: Expands scoped theme support across public ZORA components, layouts, patterns, and foundation primitives through shared `themeId` and `mode` base props.
|
|
8
|
+
|
|
9
|
+
## 0.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 8ad107f: Adds nested ZORA theme scopes with shared `themeId` and `mode` base props so components can override theme context for themselves and their subtrees.
|
|
14
|
+
|
|
3
15
|
## 0.9.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -68,6 +68,52 @@ export function App() {
|
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
## Scoped themes
|
|
72
|
+
|
|
73
|
+
ZORA supports nested theme scopes. A component may set `mode` and, later,
|
|
74
|
+
`themeId`; everything inside inherits the nearest scope.
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import React from 'react';
|
|
78
|
+
import { Button, Heading, Panel, Text, ZoraProvider, type ZoraTheme } from '@ankhorage/zora';
|
|
79
|
+
|
|
80
|
+
export function App({ appTheme }: { appTheme: ZoraTheme }) {
|
|
81
|
+
return (
|
|
82
|
+
<ZoraProvider theme={appTheme} initialMode="light">
|
|
83
|
+
<Panel mode="dark">
|
|
84
|
+
<Heading>Studio panel</Heading>
|
|
85
|
+
<Text>Text inherits dark mode.</Text>
|
|
86
|
+
<Button>Also scoped.</Button>
|
|
87
|
+
</Panel>
|
|
88
|
+
</ZoraProvider>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`mode` and `themeId` are available on public ZORA components through `ZoraBaseProps`.
|
|
94
|
+
Use component props for local component/subtree overrides.
|
|
95
|
+
|
|
96
|
+
Use `ZoraThemeScope` when the scope is conceptual and does not belong to one specific component:
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
import React from 'react';
|
|
100
|
+
import { SidebarLayout, Text, ZoraProvider, ZoraThemeScope, type ZoraTheme } from '@ankhorage/zora';
|
|
101
|
+
|
|
102
|
+
export function App({ appTheme }: { appTheme: ZoraTheme }) {
|
|
103
|
+
return (
|
|
104
|
+
<ZoraProvider theme={appTheme} initialMode="light">
|
|
105
|
+
<ZoraThemeScope mode="dark">
|
|
106
|
+
<SidebarLayout sidebar={<Text>Sidebar</Text>}>
|
|
107
|
+
<Text>Everything inside uses dark mode.</Text>
|
|
108
|
+
</SidebarLayout>
|
|
109
|
+
</ZoraThemeScope>
|
|
110
|
+
</ZoraProvider>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`themeId` currently accepts the inherited theme id. Full theme registries arrive in a later phase.
|
|
116
|
+
|
|
71
117
|
## Foundation primitives
|
|
72
118
|
|
|
73
119
|
ZORA re-exports selected Surface foundation primitives for app-facing layout
|
|
@@ -122,21 +168,21 @@ responsive for mobile and web layouts.
|
|
|
122
168
|
|
|
123
169
|
ZORA props:
|
|
124
170
|
|
|
125
|
-
| Prop | Type | Default | Notes
|
|
126
|
-
| --------------- | ---------------------------------------- | ----------- |
|
|
127
|
-
| `children` | `React.ReactNode` | - | Primary content.
|
|
128
|
-
| `text` | `string` | - | Manifest-friendly content prop.
|
|
129
|
-
| `i18nKey` | `string` | - | Runtime-resolved fallback key when no content prop is provided.
|
|
130
|
-
| `level` | `HeadingLevel` | `2` | Semantic heading level from `1` through `6`.
|
|
131
|
-
| `size` | `Responsive<HeadingSize>` | level size | Visual scale: `display`, `h1` through `h6`.
|
|
132
|
-
| `tone` | `Responsive<HeadingTone>` | `'default'` | Semantic text color.
|
|
133
|
-
| `align` | `Responsive<HeadingAlign>` | - | Text alignment.
|
|
134
|
-
| `weight` | `Responsive<HeadingWeight>` | recipe | Optional structured weight override.
|
|
135
|
-
| `italic` | `boolean` | `false` | Italic style.
|
|
136
|
-
| `numberOfLines` | `number` | - | Native/web truncation line count.
|
|
137
|
-
| `ellipsizeMode` | `'head' \| 'middle' \| 'tail' \| 'clip'` | - | Truncation behavior.
|
|
138
|
-
| `selectable` | `boolean` | - | Allows text selection where supported.
|
|
139
|
-
| `testID` | `string` | - | Test id.
|
|
171
|
+
| Prop | Type | Default | Notes |
|
|
172
|
+
| --------------- | ---------------------------------------- | ----------- | --------------------------------------------------------------- |
|
|
173
|
+
| `children` | `React.ReactNode` | - | Primary content. |
|
|
174
|
+
| `text` | `string` | - | Manifest-friendly content prop. |
|
|
175
|
+
| `i18nKey` | `string` | - | Runtime-resolved fallback key when no content prop is provided. |
|
|
176
|
+
| `level` | `HeadingLevel` | `2` | Semantic heading level from `1` through `6`. |
|
|
177
|
+
| `size` | `Responsive<HeadingSize>` | level size | Visual scale: `display`, `h1` through `h6`. |
|
|
178
|
+
| `tone` | `Responsive<HeadingTone>` | `'default'` | Semantic text color. |
|
|
179
|
+
| `align` | `Responsive<HeadingAlign>` | - | Text alignment. |
|
|
180
|
+
| `weight` | `Responsive<HeadingWeight>` | recipe | Optional structured weight override. |
|
|
181
|
+
| `italic` | `boolean` | `false` | Italic style. |
|
|
182
|
+
| `numberOfLines` | `number` | - | Native/web truncation line count. |
|
|
183
|
+
| `ellipsizeMode` | `'head' \| 'middle' \| 'tail' \| 'clip'` | - | Truncation behavior. |
|
|
184
|
+
| `selectable` | `boolean` | - | Allows text selection where supported. |
|
|
185
|
+
| `testID` | `string` | - | Test id. |
|
|
140
186
|
|
|
141
187
|
No inherited props. `HeadingProps` is declared directly by ZORA to keep heading
|
|
142
188
|
usage structured and template-safe.
|
|
@@ -163,20 +209,20 @@ responsive props.
|
|
|
163
209
|
|
|
164
210
|
ZORA props:
|
|
165
211
|
|
|
166
|
-
| Prop | Type | Default | Notes
|
|
167
|
-
| --------------- | ---------------------------------------- | ----------- |
|
|
168
|
-
| `children` | `React.ReactNode` | - | Primary content.
|
|
169
|
-
| `text` | `string` | - | Manifest-friendly content prop.
|
|
170
|
-
| `i18nKey` | `string` | - | Runtime-resolved fallback key when no content prop is provided.
|
|
171
|
-
| `variant` | `Responsive<TextVariant>` | `'body'` | Typography recipe.
|
|
172
|
-
| `tone` | `Responsive<TextTone>` | `'default'` | Semantic text color.
|
|
173
|
-
| `align` | `Responsive<TextAlign>` | - | Text alignment.
|
|
174
|
-
| `weight` | `Responsive<TextWeight>` | recipe | Optional structured weight override.
|
|
175
|
-
| `italic` | `boolean` | `false` | Italic style.
|
|
176
|
-
| `numberOfLines` | `number` | - | Native/web truncation line count.
|
|
177
|
-
| `ellipsizeMode` | `'head' \| 'middle' \| 'tail' \| 'clip'` | - | Truncation behavior.
|
|
178
|
-
| `selectable` | `boolean` | - | Allows text selection where supported.
|
|
179
|
-
| `testID` | `string` | - | Test id.
|
|
212
|
+
| Prop | Type | Default | Notes |
|
|
213
|
+
| --------------- | ---------------------------------------- | ----------- | --------------------------------------------------------------- |
|
|
214
|
+
| `children` | `React.ReactNode` | - | Primary content. |
|
|
215
|
+
| `text` | `string` | - | Manifest-friendly content prop. |
|
|
216
|
+
| `i18nKey` | `string` | - | Runtime-resolved fallback key when no content prop is provided. |
|
|
217
|
+
| `variant` | `Responsive<TextVariant>` | `'body'` | Typography recipe. |
|
|
218
|
+
| `tone` | `Responsive<TextTone>` | `'default'` | Semantic text color. |
|
|
219
|
+
| `align` | `Responsive<TextAlign>` | - | Text alignment. |
|
|
220
|
+
| `weight` | `Responsive<TextWeight>` | recipe | Optional structured weight override. |
|
|
221
|
+
| `italic` | `boolean` | `false` | Italic style. |
|
|
222
|
+
| `numberOfLines` | `number` | - | Native/web truncation line count. |
|
|
223
|
+
| `ellipsizeMode` | `'head' \| 'middle' \| 'tail' \| 'clip'` | - | Truncation behavior. |
|
|
224
|
+
| `selectable` | `boolean` | - | Allows text selection where supported. |
|
|
225
|
+
| `testID` | `string` | - | Test id. |
|
|
180
226
|
|
|
181
227
|
No inherited props. `TextProps` is declared directly by ZORA to keep text
|
|
182
228
|
structured and template-safe.
|
|
@@ -1332,11 +1378,11 @@ Pass a theme seed to define your app theme:
|
|
|
1332
1378
|
|
|
1333
1379
|
ZORA props:
|
|
1334
1380
|
|
|
1335
|
-
| Prop | Type
|
|
1336
|
-
| ------------- |
|
|
1337
|
-
| `children` | `React.ReactNode`
|
|
1338
|
-
| `theme` | `ZoraTheme`
|
|
1339
|
-
| `initialMode` | `'light' \| 'dark'`
|
|
1381
|
+
| Prop | Type | Default | Notes |
|
|
1382
|
+
| ------------- | ------------------- | ------------------ | ------------------------------------- |
|
|
1383
|
+
| `children` | `React.ReactNode` | - | Required app content. |
|
|
1384
|
+
| `theme` | `ZoraTheme` | `zoraDefaultTheme` | App-facing theme seed for ZORA. |
|
|
1385
|
+
| `initialMode` | `'light' \| 'dark'` | `'light'` | Initial theme mode passed to Surface. |
|
|
1340
1386
|
|
|
1341
1387
|
Inherited props:
|
|
1342
1388
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BadgeProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const Badge: (props: BadgeProps) => React.ReactElement | null;
|
|
4
4
|
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAwB1C,eAAO,MAAM,KAAK,kDAAiC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Badge as SurfaceBadge } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { resolveBadgeRecipe } from '../../internal/recipes';
|
|
4
|
-
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
+
function BadgeInner({ themeId: _themeId, mode: _mode, children, tone, emphasis, size, ...props }) {
|
|
5
6
|
const recipe = resolveBadgeRecipe({ tone, emphasis, size });
|
|
6
7
|
return (<SurfaceBadge {...props} content={children} size={recipe.size} tone={recipe.tone} variant={recipe.variant}/>);
|
|
7
8
|
}
|
|
9
|
+
export const Badge = withZoraThemeScope(BadgeInner);
|
|
8
10
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,UAAU,CAAC,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,GAAG,KAAK,EACG;IACX,MAAM,MAAM,GAAG,kBAAkB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5D,OAAO,CACL,CAAC,YAAY,CACX,IAAI,KAAK,CAAC,CACV,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACxB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { Badge as SurfaceBadge } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveBadgeRecipe } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { BadgeProps } from './types';\n\nfunction BadgeInner({\n themeId: _themeId,\n mode: _mode,\n children,\n tone,\n emphasis,\n size,\n ...props\n}: BadgeProps) {\n const recipe = resolveBadgeRecipe({ tone, emphasis, size });\n\n return (\n <SurfaceBadge\n {...props}\n content={children}\n size={recipe.size}\n tone={recipe.tone}\n variant={recipe.variant}\n />\n );\n}\n\nexport const Badge = withZoraThemeScope(BadgeInner);\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { BadgeProps as SurfaceBadgeProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { ZoraBadgeEmphasis, ZoraControlSize, ZoraTone } from '../../internal/recipes';
|
|
4
|
-
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
export interface BadgeProps extends ZoraBaseProps, Omit<SurfaceBadgeProps, 'content' | 'size' | 'tone' | 'variant' | 'mode' | 'themeId'> {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
tone?: ZoraTone;
|
|
7
8
|
emphasis?: ZoraBadgeEmphasis;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/badge/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/badge/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,UACf,SACE,aAAa,EACb,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACvF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/badge/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeProps as SurfaceBadgeProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBadgeEmphasis, ZoraControlSize, ZoraTone } from '../../internal/recipes';\n\nexport interface BadgeProps
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/badge/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeProps as SurfaceBadgeProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBadgeEmphasis, ZoraControlSize, ZoraTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface BadgeProps\n extends\n ZoraBaseProps,\n Omit<SurfaceBadgeProps, 'content' | 'size' | 'tone' | 'variant' | 'mode' | 'themeId'> {\n children?: React.ReactNode;\n tone?: ZoraTone;\n emphasis?: ZoraBadgeEmphasis;\n size?: ZoraControlSize;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ButtonProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const Button: (props: ButtonProps) => React.ReactElement | null;
|
|
4
4
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiB3C,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Button as SurfaceButton } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { resolveButtonRecipe } from '../../internal/recipes';
|
|
4
|
-
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
|
+
function ButtonInner({ themeId: _themeId, mode: _mode, tone, emphasis, size, ...props }) {
|
|
5
6
|
const recipe = resolveButtonRecipe({ tone, emphasis, size });
|
|
6
7
|
return (<SurfaceButton {...props} size={recipe.size} tone={recipe.tone} variant={recipe.variant}/>);
|
|
7
8
|
}
|
|
9
|
+
export const Button = withZoraThemeScope(ButtonInner);
|
|
8
10
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,GAAG,KAAK,EACI;IACZ,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,CACL,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAG,CAC5F,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { Button as SurfaceButton } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveButtonRecipe } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ButtonProps } from './types';\n\nfunction ButtonInner({\n themeId: _themeId,\n mode: _mode,\n tone,\n emphasis,\n size,\n ...props\n}: ButtonProps) {\n const recipe = resolveButtonRecipe({ tone, emphasis, size });\n\n return (\n <SurfaceButton {...props} size={recipe.size} tone={recipe.tone} variant={recipe.variant} />\n );\n}\n\nexport const Button = withZoraThemeScope(ButtonInner);\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ButtonIconSpec, ButtonProps as SurfaceButtonProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { ZoraControlSize, ZoraEmphasis, ZoraTone } from '../../internal/recipes';
|
|
4
|
-
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
export interface ButtonProps extends ZoraBaseProps, Omit<SurfaceButtonProps, 'children' | 'size' | 'tone' | 'variant'> {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
tone?: ZoraTone;
|
|
7
8
|
emphasis?: ZoraEmphasis;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,WACf,SAAQ,aAAa,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACzF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec, ButtonProps as SurfaceButtonProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraControlSize, ZoraEmphasis, ZoraTone } from '../../internal/recipes';\n\nexport interface ButtonProps
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/button/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec, ButtonProps as SurfaceButtonProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraControlSize, ZoraEmphasis, ZoraTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ButtonProps\n extends ZoraBaseProps, Omit<SurfaceButtonProps, 'children' | 'size' | 'tone' | 'variant'> {\n children?: React.ReactNode;\n tone?: ZoraTone;\n emphasis?: ZoraEmphasis;\n size?: ZoraControlSize;\n leadingIcon?: ButtonIconSpec;\n trailingIcon?: ButtonIconSpec;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const Card: (props: CardProps) => React.ReactElement | null;
|
|
4
4
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAgEzC,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Box, Card as SurfaceCard, Stack } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { resolveCardVariant } from '../../internal/recipes';
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
5
|
import { Heading } from '../heading';
|
|
5
6
|
import { Text } from '../text';
|
|
6
|
-
|
|
7
|
+
function CardInner({ themeId: _themeId, mode: _mode, children, title, description, eyebrow, actions, footer, tone = 'default', compact = false, onPress, ...props }) {
|
|
7
8
|
const hasHeader = [eyebrow, title, description, actions].some((item) => item != null);
|
|
8
9
|
const hasFooter = footer !== undefined;
|
|
9
10
|
const gap = compact ? 's' : 'm';
|
|
@@ -31,4 +32,5 @@ export function Card({ children, title, description, eyebrow, actions, footer, t
|
|
|
31
32
|
</Stack>
|
|
32
33
|
</SurfaceCard>);
|
|
33
34
|
}
|
|
35
|
+
export const Card = withZoraThemeScope(CardInner);
|
|
34
36
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,IAAI,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Box, Card as SurfaceCard, Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { resolveCardVariant } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { CardProps } from './types';\n\nfunction CardInner({\n themeId: _themeId,\n mode: _mode,\n children,\n title,\n description,\n eyebrow,\n actions,\n footer,\n tone = 'default',\n compact = false,\n onPress,\n ...props\n}: CardProps) {\n const hasHeader = [eyebrow, title, description, actions].some((item) => item != null);\n const hasFooter = footer !== undefined;\n const gap = compact ? 's' : 'm';\n const isInteractive = Boolean(onPress) && !actions;\n\n return (\n <SurfaceCard\n {...props}\n onPress={isInteractive ? onPress : undefined}\n p={compact ? 'm' : 'l'}\n radius=\"l\"\n variant={resolveCardVariant(tone)}\n >\n <Stack gap={gap}>\n {hasHeader ? (\n <Stack\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n >\n <Box flex={1}>\n <Stack gap=\"xs\">\n {eyebrow ? (\n <Text tone=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n {title ? <Heading level={compact ? 4 : 3}>{title}</Heading> : null}\n {description ? (\n <Text tone=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n {actions ? <Box>{actions}</Box> : null}\n </Stack>\n ) : null}\n\n {children ? <Box>{children}</Box> : null}\n\n {hasFooter ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </SurfaceCard>\n );\n}\n\nexport const Card = withZoraThemeScope(CardInner);\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CardProps as SurfaceCardProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { ZoraCardTone } from '../../internal/recipes';
|
|
4
|
-
|
|
4
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
5
|
+
export interface CardProps extends ZoraBaseProps, Omit<SurfaceCardProps, 'children' | 'p' | 'radius' | 'variant'> {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
title?: React.ReactNode;
|
|
7
8
|
description?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,SACf,SAAQ,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,GAAG,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/card/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CardProps as SurfaceCardProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraCardTone } from '../../internal/recipes';\n\nexport interface CardProps
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/card/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CardProps as SurfaceCardProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraCardTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface CardProps\n extends ZoraBaseProps, Omit<SurfaceCardProps, 'children' | 'p' | 'radius' | 'variant'> {\n children?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n eyebrow?: React.ReactNode;\n actions?: React.ReactNode;\n footer?: React.ReactNode;\n tone?: ZoraCardTone;\n compact?: boolean;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Checkbox as SurfaceCheckbox } from '@ankhorage/surface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
|
+
function CheckboxInner({ themeId: _themeId, mode: _mode, ...props }) {
|
|
5
|
+
return <SurfaceCheckbox {...props}/>;
|
|
6
|
+
}
|
|
7
|
+
export const Checkbox = withZoraThemeScope(CheckboxInner);
|
|
8
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,aAAa,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAiB;IAChF,OAAO,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import { Checkbox as SurfaceCheckbox } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { CheckboxProps } from './types';\n\nfunction CheckboxInner({ themeId: _themeId, mode: _mode, ...props }: CheckboxProps) {\n return <SurfaceCheckbox {...props} />;\n}\n\nexport const Checkbox = withZoraThemeScope(CheckboxInner);\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CheckboxGroupProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const CheckboxGroup: <TValue extends string>(props: CheckboxGroupProps<TValue>) => React.ReactElement | null;
|
|
4
4
|
//# sourceMappingURL=CheckboxGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/CheckboxGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/CheckboxGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAoDvE,eAAO,MAAM,aAAa,GAlDE,MAAM,SAAS,MAAM,iEAkDkB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Checkbox, Stack } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
4
5
|
import { Text } from '../text';
|
|
5
|
-
|
|
6
|
+
function CheckboxGroupInner({ themeId: _themeId, mode: _mode, value, onValueChange, options, orientation = 'vertical', gap = 's', tone = 'primary', size = 'm', invalid = false, readOnly = false, disabled = false, testID, }) {
|
|
6
7
|
const selectedValues = new Set(value);
|
|
7
8
|
const isHorizontal = orientation === 'horizontal';
|
|
8
9
|
return (<View testID={testID} style={{
|
|
@@ -14,6 +15,7 @@ export function CheckboxGroup({ value, onValueChange, options, orientation = 've
|
|
|
14
15
|
</Stack>
|
|
15
16
|
</View>);
|
|
16
17
|
}
|
|
18
|
+
export const CheckboxGroup = withZoraThemeScope(CheckboxGroupInner);
|
|
17
19
|
function CheckboxGroupItem({ option, checked, disabled, invalid, readOnly, size, tone, value, onValueChange, }) {
|
|
18
20
|
return (<Checkbox checked={checked} disabled={disabled} invalid={invalid} readOnly={readOnly} size={size} tone={tone} testID={option.testID} onCheckedChange={(nextChecked) => {
|
|
19
21
|
const nextValue = nextChecked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../../src/components/checkbox/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../../src/components/checkbox/CheckboxGroup.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Checkbox, Stack } from '@ankhorage/surface';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Text } from '../text';\nimport type { CheckboxGroupOption, CheckboxGroupProps } from './types';\n\nfunction CheckboxGroupInner<TValue extends string>({\n themeId: _themeId,\n mode: _mode,\n value,\n onValueChange,\n options,\n orientation = 'vertical',\n gap = 's',\n tone = 'primary',\n size = 'm',\n invalid = false,\n readOnly = false,\n disabled = false,\n testID,\n}: CheckboxGroupProps<TValue>) {\n const selectedValues = new Set(value);\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <View\n testID={testID}\n style={{\n flexDirection: isHorizontal ? 'row' : 'column',\n flexWrap: isHorizontal ? 'wrap' : 'nowrap',\n }}\n >\n <Stack\n direction={isHorizontal ? 'row' : 'column'}\n gap={gap}\n wrap={isHorizontal ? 'wrap' : 'nowrap'}\n >\n {options.map((option) => (\n <CheckboxGroupItem\n key={option.value}\n option={option}\n checked={selectedValues.has(option.value)}\n disabled={disabled || option.disabled === true}\n invalid={invalid}\n readOnly={readOnly}\n size={size}\n tone={tone}\n value={value}\n onValueChange={onValueChange}\n />\n ))}\n </Stack>\n </View>\n );\n}\n\nexport const CheckboxGroup = withZoraThemeScope(CheckboxGroupInner);\n\nfunction CheckboxGroupItem<TValue extends string>({\n option,\n checked,\n disabled,\n invalid,\n readOnly,\n size,\n tone,\n value,\n onValueChange,\n}: {\n option: CheckboxGroupOption<TValue>;\n checked: boolean;\n disabled: boolean;\n invalid: boolean;\n readOnly: boolean;\n size: NonNullable<CheckboxGroupProps<TValue>['size']>;\n tone: NonNullable<CheckboxGroupProps<TValue>['tone']>;\n value: readonly TValue[];\n onValueChange: (value: TValue[]) => void;\n}) {\n return (\n <Checkbox\n checked={checked}\n disabled={disabled}\n invalid={invalid}\n readOnly={readOnly}\n size={size}\n tone={tone}\n testID={option.testID}\n onCheckedChange={(nextChecked) => {\n const nextValue = nextChecked\n ? [...value, option.value]\n : value.filter((currentValue) => currentValue !== option.value);\n\n onValueChange(nextValue);\n }}\n >\n <Stack gap=\"xs\">\n <Text>{option.label}</Text>\n {option.description ? (\n <Text variant=\"caption\" tone=\"muted\">\n {option.description}\n </Text>\n ) : null}\n </Stack>\n </Checkbox>\n );\n}\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
+
export { Checkbox } from './Checkbox';
|
|
1
2
|
export { CheckboxGroup } from './CheckboxGroup';
|
|
2
|
-
export type { CheckboxGroupOption, CheckboxGroupProps } from './types';
|
|
3
|
-
export type { CheckboxProps } from '@ankhorage/surface';
|
|
4
|
-
export { Checkbox } from '@ankhorage/surface';
|
|
3
|
+
export type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './types';
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { Checkbox } from './Checkbox';\nexport { CheckboxGroup } from './CheckboxGroup';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './types';\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { CheckboxProps } from '@ankhorage/surface';
|
|
1
|
+
import type { CheckboxProps as SurfaceCheckboxProps } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
|
+
import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
|
|
4
|
+
export interface CheckboxProps extends ZoraBaseProps, Omit<SurfaceCheckboxProps, 'mode' | 'themeId'> {
|
|
5
|
+
}
|
|
3
6
|
export interface CheckboxGroupOption<TValue extends string> {
|
|
4
7
|
value: TValue;
|
|
5
8
|
label: React.ReactNode;
|
|
@@ -7,7 +10,7 @@ export interface CheckboxGroupOption<TValue extends string> {
|
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
testID?: string;
|
|
9
12
|
}
|
|
10
|
-
export interface CheckboxGroupProps<TValue extends string> extends Pick<
|
|
13
|
+
export interface CheckboxGroupProps<TValue extends string> extends ZoraBaseProps, Pick<Omit<SurfaceCheckboxProps, 'mode' | 'themeId'>, 'tone' | 'size' | 'invalid' | 'readOnly' | 'disabled'> {
|
|
11
14
|
value: readonly TValue[];
|
|
12
15
|
onValueChange: (value: TValue[]) => void;
|
|
13
16
|
options: readonly CheckboxGroupOption<TValue>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,aACf,SAAQ,aAAa,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;CAAG;AAE1E,MAAM,WAAW,mBAAmB,CAAC,MAAM,SAAS,MAAM;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB,CAAC,MAAM,SAAS,MAAM,CACvD,SACE,aAAa,EACb,IAAI,CACF,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC,EAC9C,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CACtD;IACH,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;IAChD,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/checkbox/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CheckboxProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nexport interface CheckboxGroupOption<TValue extends string> {\n value: TValue;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n testID?: string;\n}\n\nexport interface CheckboxGroupProps<TValue extends string
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/checkbox/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CheckboxProps as SurfaceCheckboxProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface CheckboxProps\n extends ZoraBaseProps, Omit<SurfaceCheckboxProps, 'mode' | 'themeId'> {}\n\nexport interface CheckboxGroupOption<TValue extends string> {\n value: TValue;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n testID?: string;\n}\n\nexport interface CheckboxGroupProps<TValue extends string>\n extends\n ZoraBaseProps,\n Pick<\n Omit<SurfaceCheckboxProps, 'mode' | 'themeId'>,\n 'tone' | 'size' | 'invalid' | 'readOnly' | 'disabled'\n > {\n value: readonly TValue[];\n onValueChange: (value: TValue[]) => void;\n options: readonly CheckboxGroupOption<TValue>[];\n orientation?: 'horizontal' | 'vertical';\n gap?: 'xs' | 's' | 'm' | 'l';\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DrawerProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare const Drawer: (props: DrawerProps) => React.ReactElement | null;
|
|
4
4
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAK9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA+C3C,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Box, Drawer as SurfaceDrawer, Stack } from '@ankhorage/surface';
|
|
2
2
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
|
+
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
3
4
|
import { Heading } from '../heading';
|
|
4
5
|
import { Text } from '../text';
|
|
5
6
|
function useStableCallback(callback) {
|
|
@@ -11,7 +12,7 @@ function useStableCallback(callback) {
|
|
|
11
12
|
callbackRef.current?.();
|
|
12
13
|
}, []);
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
function DrawerInner({ themeId: _themeId, mode: _mode, children, title, description, footer, onDismiss, ...props }) {
|
|
15
16
|
const hasHeader = title != null || description != null;
|
|
16
17
|
const stableOnDismiss = useStableCallback(onDismiss);
|
|
17
18
|
return (<SurfaceDrawer {...props} onDismiss={stableOnDismiss}>
|
|
@@ -27,4 +28,5 @@ export function Drawer({ children, title, description, footer, onDismiss, ...pro
|
|
|
27
28
|
</Stack>
|
|
28
29
|
</SurfaceDrawer>);
|
|
29
30
|
}
|
|
31
|
+
export const Drawer = withZoraThemeScope(DrawerInner);
|
|
30
32
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,aAAa,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,iBAAiB,CAAC,QAAkC;IAC3D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAErC,SAAS,CAAC,GAAG,EAAE;QACb,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,WAAW,CAAC,GAAG,EAAE;QACtB,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,aAAa,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,SAAS,iBAAiB,CAAC,QAAkC;IAC3D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAErC,SAAS,CAAC,GAAG,EAAE;QACb,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,WAAW,CAAC,GAAG,EAAE;QACtB,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACI;IACZ,MAAM,SAAS,GAAG,KAAK,IAAI,IAAI,IAAI,WAAW,IAAI,IAAI,CAAC;IACvD,MAAM,eAAe,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAErD,OAAO,CACL,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CACnD;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CACb;YAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CACpD;YAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CACpC;gBAAA,CAAC,WAAW,CACd;cAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACR;QAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CACjD;QAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9C;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { Box, Drawer as SurfaceDrawer, Stack } from '@ankhorage/surface';\nimport React, { useCallback, useEffect, useRef } from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Heading } from '../heading';\nimport { Text } from '../text';\nimport type { DrawerProps } from './types';\n\nfunction useStableCallback(callback: (() => void) | undefined): (() => void) | undefined {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n return useCallback(() => {\n callbackRef.current?.();\n }, []);\n}\n\nfunction DrawerInner({\n themeId: _themeId,\n mode: _mode,\n children,\n title,\n description,\n footer,\n onDismiss,\n ...props\n}: DrawerProps) {\n const hasHeader = title != null || description != null;\n const stableOnDismiss = useStableCallback(onDismiss);\n\n return (\n <SurfaceDrawer {...props} onDismiss={stableOnDismiss}>\n <Stack gap=\"m\">\n {hasHeader ? (\n <Stack gap=\"xs\">\n {title ? <Heading level={3}>{title}</Heading> : null}\n {description ? (\n <Text tone=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n {children ? <Box flex={1}>{children}</Box> : null}\n {footer ? <Box pt=\"xs\">{footer}</Box> : null}\n </Stack>\n </SurfaceDrawer>\n );\n}\n\nexport const Drawer = withZoraThemeScope(DrawerInner);\n"]}
|