@ankhorage/zora 14.0.0 → 14.0.1
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 +176 -6
- package/dist/features/app-bar/adapters/inbound/AppBar.d.ts +5 -0
- package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -0
- package/dist/features/app-bar/adapters/inbound/AppBar.js +91 -0
- package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -0
- package/dist/{components/app-bar/meta.d.ts → features/app-bar/appBarMeta.d.ts} +1 -1
- package/dist/features/app-bar/appBarMeta.d.ts.map +1 -0
- package/dist/{components/app-bar/meta.js → features/app-bar/appBarMeta.js} +1 -1
- package/dist/features/app-bar/appBarMeta.js.map +1 -0
- package/dist/features/app-bar/public.d.ts +3 -0
- package/dist/features/app-bar/public.d.ts.map +1 -0
- package/dist/features/app-bar/public.js +2 -0
- package/dist/features/app-bar/public.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.d.ts +0 -2
- package/dist/layout/settings-layout/SettingsLayout.d.ts.map +1 -1
- package/dist/layout/settings-layout/SettingsLayout.js +1 -3
- package/dist/layout/settings-layout/SettingsLayout.js.map +1 -1
- package/dist/metadata/componentMeta.js +1 -1
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/reader/ReaderSurface.js +1 -1
- package/dist/patterns/reader/ReaderSurface.js.map +1 -1
- package/dist/registry.js +1 -1
- package/dist/registry.js.map +1 -1
- package/dist/{components/app-bar/types.d.ts → types/app-bar.d.ts} +2 -2
- package/dist/types/app-bar.d.ts.map +1 -0
- package/dist/types/app-bar.js +2 -0
- package/dist/types/app-bar.js.map +1 -0
- package/package.json +1 -1
- package/src/features/app-bar/adapters/inbound/AppBar.tsx +176 -0
- package/src/features/app-bar/public.ts +2 -0
- package/src/index.ts +2 -2
- package/src/interactionPolicy.test.ts +7 -3
- package/src/layout/settings-layout/SettingsLayout.tsx +1 -3
- package/src/metadata/componentMeta.ts +1 -1
- package/src/patterns/reader/ReaderSurface.tsx +1 -1
- package/src/registry.ts +1 -1
- package/src/theme/themeScopeStructure.test.ts +2 -2
- package/src/{components/app-bar/types.ts → types/app-bar.ts} +1 -1
- package/dist/components/app-bar/AppBar.d.ts +0 -7
- package/dist/components/app-bar/AppBar.d.ts.map +0 -1
- package/dist/components/app-bar/AppBar.js +0 -67
- package/dist/components/app-bar/AppBar.js.map +0 -1
- package/dist/components/app-bar/index.d.ts +0 -3
- package/dist/components/app-bar/index.d.ts.map +0 -1
- package/dist/components/app-bar/index.js +0 -3
- package/dist/components/app-bar/index.js.map +0 -1
- package/dist/components/app-bar/meta.d.ts.map +0 -1
- package/dist/components/app-bar/meta.js.map +0 -1
- package/dist/components/app-bar/types.d.ts.map +0 -1
- package/dist/components/app-bar/types.js +0 -2
- package/dist/components/app-bar/types.js.map +0 -1
- package/src/components/app-bar/AppBar.tsx +0 -140
- package/src/components/app-bar/index.ts +0 -2
- /package/src/{components/app-bar/meta.ts → features/app-bar/appBarMeta.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsLayout.js","sourceRoot":"","sources":["../../../src/layout/settings-layout/SettingsLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SettingsLayout.js","sourceRoot":"","sources":["../../../src/layout/settings-layout/SettingsLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,SAAS,mBAAmB,CAAC,EAC3B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,GACc;IACpB,OAAO,CACL,EACE;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAG,CAAC,CAAC,CAAC,IAAI,CACjF;MAAA,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CACrB;QAAA,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,aAAa,CAC5D;MAAA,EAAE,MAAM,CACV;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { AppBar } from '../../features/app-bar/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Screen } from '../screen';\nimport { SidebarLayout } from '../sidebar-layout';\nimport type { SettingsLayoutProps } from './types';\n\nfunction SettingsLayoutInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n title,\n description,\n sidebar,\n children,\n actions,\n testID,\n}: SettingsLayoutProps) {\n return (\n <>\n {title ? <AppBar actions={actions} subtitle={description} title={title} /> : null}\n <Screen testID={testID}>\n <SidebarLayout sidebar={sidebar}>{children}</SidebarLayout>\n </Screen>\n </>\n );\n}\n\n/***\n * Settings page layout with app bar, sidebar, and scrollable content area.\n */\nexport const SettingsLayout = withZoraThemeScope(SettingsLayoutInner);\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { appBarMeta } from '../components/app-bar/meta';
|
|
2
1
|
import { breadcrumbsMeta } from '../components/breadcrumbs/meta';
|
|
3
2
|
import { dropdownMenuMeta, menuMeta } from '../components/menu/meta';
|
|
4
3
|
import { modalMeta } from '../components/modal/meta';
|
|
@@ -11,6 +10,7 @@ import { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';
|
|
|
11
10
|
import { accordionItemMeta } from '../features/accordion/accordionItemMeta';
|
|
12
11
|
import { accordionMeta } from '../features/accordion/accordionMeta';
|
|
13
12
|
import { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';
|
|
13
|
+
import { appBarMeta } from '../features/app-bar/appBarMeta';
|
|
14
14
|
import { forgotPasswordFormMeta } from '../features/auth/forgotPasswordFormMeta';
|
|
15
15
|
import { oauthProviderButtonMeta } from '../features/auth/oauthProviderButtonMeta';
|
|
16
16
|
import { oauthProviderListMeta } from '../features/auth/oauthProviderListMeta';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentMeta.js","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,iB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arMeta } from '../components/app-bar/meta';\nimport { breadcrumbsMeta } from '../components/breadcrumbs/meta';\nimport { dropdownMenuMeta, menuMeta } from '../components/menu/meta';\nimport { modalMeta } from '../components/modal/meta';\nimport { paginationMeta } from '../components/pagination/meta';\nimport { ratingMeta } from '../components/rating/meta';\nimport { searchBarMeta } from '../components/search-bar/meta';\nimport { selectMeta } from '../components/select/meta';\nimport { tabsMeta } from '../components/tabs/meta';\nimport { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';\nimport { accordionItemMeta } from '../features/accordion/accordionItemMeta';\nimport { accordionMeta } from '../features/accordion/accordionMeta';\nimport { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';\nimport { forgotPasswordFormMeta } from '../features/auth/forgotPasswordFormMeta';\nimport { oauthProviderButtonMeta } from '../features/auth/oauthProviderButtonMeta';\nimport { oauthProviderListMeta } from '../features/auth/oauthProviderListMeta';\nimport { otpFormMeta } from '../features/auth/otpFormMeta';\nimport { signInFormMeta } from '../features/auth/signInFormMeta';\nimport { signUpFormMeta } from '../features/auth/signUpFormMeta';\nimport { avatarGroupMeta } from '../features/avatar/avatarGroupMeta';\nimport { avatarMeta } from '../features/avatar/avatarMeta';\nimport { badgeMeta } from '../features/badge/badgeMeta';\nimport { bottomSheetMeta } from '../features/bottom-sheet/bottomSheetMeta';\nimport { buttonGroupMeta } from '../features/button/buttonGroupMeta';\nimport { buttonMeta } from '../features/button/buttonMeta';\nimport { iconButtonMeta } from '../features/button/iconButtonMeta';\nimport { cardMeta } from '../features/card/cardMeta';\nimport { mediaCardMeta } from '../features/card/mediaCardMeta';\nimport { metricCardMeta } from '../features/card/metricCardMeta';\nimport { postCardMeta } from '../features/card/postCardMeta';\nimport { productCardMeta } from '../features/card/productCardMeta';\nimport { chipGroupMeta } from '../features/chip/chipGroupMeta';\nimport { chipMeta } from '../features/chip/chipMeta';\nimport { dataTableMeta } from '../features/data-table/dataTableMeta';\nimport { datePickerMeta } from '../features/date-picker/datePickerMeta';\nimport { emptyStateMeta } from '../features/empty-state/emptyStateMeta';\nimport { checkboxGroupMeta, checkboxMeta } from '../features/form/checkbox/checkboxMeta';\nimport { formActionsMeta } from '../features/form/formActionsMeta';\nimport { formErrorMeta } from '../features/form/formErrorMeta';\nimport { formFieldMeta } from '../features/form/formFieldMeta';\nimport { formMeta } from '../features/form/formMeta';\nimport { radioGroupMeta, radioMeta } from '../features/form/radio/radioMeta';\nimport { textInputMeta } from '../features/form/text-input/textInputMeta';\nimport { gradientMeta } from '../features/gradient/gradientMeta';\nimport { heroMeta } from '../features/hero/heroMeta';\nimport { iconMeta } from '../features/icon/iconMeta';\nimport { imageMeta } from '../features/image/imageMeta';\nimport { keyboardAvoidingViewMeta } from '../features/keyboard-avoiding-view/keyboardAvoidingViewMeta';\nimport { boxMeta } from '../features/layout/boxMeta';\nimport { containerMeta } from '../features/layout/containerMeta';\nimport { contentRailMeta } from '../features/layout/contentRailMeta';\nimport { dividerMeta } from '../features/layout/dividerMeta';\nimport { gridMeta } from '../features/layout/gridMeta';\nimport { stackMeta } from '../features/layout/stackMeta';\nimport { flatListMeta } from '../features/list/flatListMeta';\nimport { sectionListMeta } from '../features/list/sectionListMeta';\nimport { missingElementMeta } from '../features/missing-element/missingElementMeta';\nimport { progressMeta, progressRingMeta } from '../features/progress/progressMeta';\nimport {\n skeletonCardMeta,\n skeletonListMeta,\n skeletonMeta,\n skeletonTextMeta,\n} from '../features/skeleton/skeletonMeta';\nimport { surfaceMeta } from '../features/surface/surfaceMeta';\nimport { timePickerMeta } from '../features/time-picker/timePickerMeta';\nimport { toastMeta } from '../features/toast/toastMeta';\nimport { toastProviderMeta } from '../features/toast/toastProviderMeta';\nimport { headingMeta } from '../features/typography/headingMeta';\nimport { textMeta } from '../features/typography/textMeta';\nimport { uploaderMeta } from '../features/uploader/uploaderMeta';\nimport { foundationMetas } from '../foundation/meta';\nimport { appShellMeta } from '../layout/app-shell/meta';\nimport { screenMeta } from '../layout/screen/meta';\nimport { screenSectionMeta } from '../layout/screen-section/meta';\nimport { settingsLayoutMeta } from '../layout/settings-layout/meta';\nimport { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';\nimport { topbarLayoutMeta } from '../layout/topbar-layout/meta';\nimport { chatListItemMeta } from '../patterns/chat-list-item/meta';\nimport { collectionEditorMeta } from '../patterns/collection-editor/meta';\nimport { confirmDialogMeta } from '../patterns/confirm-dialog/meta';\nimport { filterBarMeta } from '../patterns/filter-bar/meta';\nimport { inspectorFieldMeta } from '../patterns/inspector-field/meta';\nimport { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';\nimport { messageBubbleMeta } from '../patterns/message-bubble/meta';\nimport { noticeMeta } from '../patterns/notice/meta';\nimport { panelMeta } from '../patterns/panel/meta';\nimport { readerSurfaceMeta } from '../patterns/reader/meta';\nimport {\n barcodeScannerViewMeta,\n cameraPermissionViewMeta,\n scanOverlayMeta,\n} from '../patterns/scanner/meta';\nimport { sectionHeaderMeta } from '../patterns/section-header/meta';\nimport { selectableItemMeta, selectionProviderMeta } from '../patterns/selection/meta';\nimport { settingsRowMeta } from '../patterns/settings-row/meta';\nimport { switchFieldMeta } from '../patterns/switch-field/meta';\nimport { themeComposerMeta } from '../patterns/theme-composer/meta';\nimport { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';\nimport { timelineMeta } from '../patterns/timeline/meta';\nimport { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';\nimport { themeModeToggleMeta } from '../theme/ThemeModeToggle.meta';\nimport { finalizeFeatureMetadata } from '../utils/finalizeFeatureMetadata';\nimport type { ZoraComponentMetaRegistry } from './types';\n\nexport const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMetadata({\n ...foundationMetas,\n Accordion: accordionMeta,\n AccordionItem: accordionItemMeta,\n ActivityIndicator: activityIndicatorMeta,\n Box: boxMeta,\n Container: containerMeta,\n Stack: stackMeta,\n Grid: gridMeta,\n Divider: dividerMeta,\n Surface: surfaceMeta,\n AppBar: appBarMeta,\n Avatar: avatarMeta,\n AvatarGroup: avatarGroupMeta,\n Badge: badgeMeta,\n Breadcrumbs: breadcrumbsMeta,\n Button: buttonMeta,\n ButtonGroup: buttonGroupMeta,\n Card: cardMeta,\n Checkbox: checkboxMeta,\n CheckboxGroup: checkboxGroupMeta,\n Chip: chipMeta,\n ChipGroup: chipGroupMeta,\n DataTable: dataTableMeta,\n DatePicker: datePickerMeta,\n DropdownMenu: dropdownMenuMeta,\n Form: formMeta,\n FormActions: formActionsMeta,\n FormError: formErrorMeta,\n FormField: formFieldMeta,\n Gradient: gradientMeta,\n Heading: headingMeta,\n Icon: iconMeta,\n IconButton: iconButtonMeta,\n Image: imageMeta,\n KeyboardAvoidingView: keyboardAvoidingViewMeta,\n TextInput: textInputMeta,\n MediaCard: mediaCardMeta,\n Menu: menuMeta,\n MetricCard: metricCardMeta,\n Modal: modalMeta,\n Pagination: paginationMeta,\n Progress: progressMeta,\n ProgressRing: progressRingMeta,\n Radio: radioMeta,\n RadioGroup: radioGroupMeta,\n Rating: ratingMeta,\n SearchBar: searchBarMeta,\n Select: selectMeta,\n Skeleton: skeletonMeta,\n SkeletonCard: skeletonCardMeta,\n SkeletonList: skeletonListMeta,\n SkeletonText: skeletonTextMeta,\n Tabs: tabsMeta,\n Text: textMeta,\n TimePicker: timePickerMeta,\n Toast: toastMeta,\n ToastProvider: toastProviderMeta,\n Toolbar: toolbarMeta,\n ToolbarAction: toolbarActionMeta,\n Uploader: uploaderMeta,\n BottomSheet: bottomSheetMeta,\n FlatList: flatListMeta,\n SectionList: sectionListMeta,\n ThemeModeToggle: themeModeToggleMeta,\n AppShell: appShellMeta,\n Screen: screenMeta,\n ScreenSection: screenSectionMeta,\n SettingsLayout: settingsLayoutMeta,\n SidebarLayout: sidebarLayoutMeta,\n TopbarLayout: topbarLayoutMeta,\n ForgotPasswordForm: forgotPasswordFormMeta,\n OAuthProviderButton: oauthProviderButtonMeta,\n OAuthProviderList: oauthProviderListMeta,\n OtpForm: otpFormMeta,\n SignInForm: signInFormMeta,\n SignUpForm: signUpFormMeta,\n ChatListItem: chatListItemMeta,\n CollectionEditor: collectionEditorMeta,\n ConfirmDialog: confirmDialogMeta,\n ContentRail: contentRailMeta,\n EmptyState: emptyStateMeta,\n FilterBar: filterBarMeta,\n Hero: heroMeta,\n InspectorField: inspectorFieldMeta,\n List: listMeta,\n ListRow: listRowMeta,\n ListSection: listSectionMeta,\n MessageBubble: messageBubbleMeta,\n MissingElement: missingElementMeta,\n Notice: noticeMeta,\n Panel: panelMeta,\n PostCard: postCardMeta,\n ProductCard: productCardMeta,\n ReaderSurface: readerSurfaceMeta,\n BarcodeScannerView: barcodeScannerViewMeta,\n CameraPermissionView: cameraPermissionViewMeta,\n ScanOverlay: scanOverlayMeta,\n SectionHeader: sectionHeaderMeta,\n SelectableItem: selectableItemMeta,\n SelectionProvider: selectionProviderMeta,\n SettingsRow: settingsRowMeta,\n SwitchField: switchFieldMeta,\n ThemeComposer: themeComposerMeta,\n PaletteItem: paletteItemMeta,\n TileGrid: tileGridMeta,\n Timeline: timelineMeta,\n TreeItem: treeItemMeta,\n TreeView: treeViewMeta,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"componentMeta.js","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;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,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;CACvB,CAAC,CAAC","sourcesContent":["import { breadcrumbsMeta } from '../components/breadcrumbs/meta';\nimport { dropdownMenuMeta, menuMeta } from '../components/menu/meta';\nimport { modalMeta } from '../components/modal/meta';\nimport { paginationMeta } from '../components/pagination/meta';\nimport { ratingMeta } from '../components/rating/meta';\nimport { searchBarMeta } from '../components/search-bar/meta';\nimport { selectMeta } from '../components/select/meta';\nimport { tabsMeta } from '../components/tabs/meta';\nimport { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';\nimport { accordionItemMeta } from '../features/accordion/accordionItemMeta';\nimport { accordionMeta } from '../features/accordion/accordionMeta';\nimport { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';\nimport { appBarMeta } from '../features/app-bar/appBarMeta';\nimport { forgotPasswordFormMeta } from '../features/auth/forgotPasswordFormMeta';\nimport { oauthProviderButtonMeta } from '../features/auth/oauthProviderButtonMeta';\nimport { oauthProviderListMeta } from '../features/auth/oauthProviderListMeta';\nimport { otpFormMeta } from '../features/auth/otpFormMeta';\nimport { signInFormMeta } from '../features/auth/signInFormMeta';\nimport { signUpFormMeta } from '../features/auth/signUpFormMeta';\nimport { avatarGroupMeta } from '../features/avatar/avatarGroupMeta';\nimport { avatarMeta } from '../features/avatar/avatarMeta';\nimport { badgeMeta } from '../features/badge/badgeMeta';\nimport { bottomSheetMeta } from '../features/bottom-sheet/bottomSheetMeta';\nimport { buttonGroupMeta } from '../features/button/buttonGroupMeta';\nimport { buttonMeta } from '../features/button/buttonMeta';\nimport { iconButtonMeta } from '../features/button/iconButtonMeta';\nimport { cardMeta } from '../features/card/cardMeta';\nimport { mediaCardMeta } from '../features/card/mediaCardMeta';\nimport { metricCardMeta } from '../features/card/metricCardMeta';\nimport { postCardMeta } from '../features/card/postCardMeta';\nimport { productCardMeta } from '../features/card/productCardMeta';\nimport { chipGroupMeta } from '../features/chip/chipGroupMeta';\nimport { chipMeta } from '../features/chip/chipMeta';\nimport { dataTableMeta } from '../features/data-table/dataTableMeta';\nimport { datePickerMeta } from '../features/date-picker/datePickerMeta';\nimport { emptyStateMeta } from '../features/empty-state/emptyStateMeta';\nimport { checkboxGroupMeta, checkboxMeta } from '../features/form/checkbox/checkboxMeta';\nimport { formActionsMeta } from '../features/form/formActionsMeta';\nimport { formErrorMeta } from '../features/form/formErrorMeta';\nimport { formFieldMeta } from '../features/form/formFieldMeta';\nimport { formMeta } from '../features/form/formMeta';\nimport { radioGroupMeta, radioMeta } from '../features/form/radio/radioMeta';\nimport { textInputMeta } from '../features/form/text-input/textInputMeta';\nimport { gradientMeta } from '../features/gradient/gradientMeta';\nimport { heroMeta } from '../features/hero/heroMeta';\nimport { iconMeta } from '../features/icon/iconMeta';\nimport { imageMeta } from '../features/image/imageMeta';\nimport { keyboardAvoidingViewMeta } from '../features/keyboard-avoiding-view/keyboardAvoidingViewMeta';\nimport { boxMeta } from '../features/layout/boxMeta';\nimport { containerMeta } from '../features/layout/containerMeta';\nimport { contentRailMeta } from '../features/layout/contentRailMeta';\nimport { dividerMeta } from '../features/layout/dividerMeta';\nimport { gridMeta } from '../features/layout/gridMeta';\nimport { stackMeta } from '../features/layout/stackMeta';\nimport { flatListMeta } from '../features/list/flatListMeta';\nimport { sectionListMeta } from '../features/list/sectionListMeta';\nimport { missingElementMeta } from '../features/missing-element/missingElementMeta';\nimport { progressMeta, progressRingMeta } from '../features/progress/progressMeta';\nimport {\n skeletonCardMeta,\n skeletonListMeta,\n skeletonMeta,\n skeletonTextMeta,\n} from '../features/skeleton/skeletonMeta';\nimport { surfaceMeta } from '../features/surface/surfaceMeta';\nimport { timePickerMeta } from '../features/time-picker/timePickerMeta';\nimport { toastMeta } from '../features/toast/toastMeta';\nimport { toastProviderMeta } from '../features/toast/toastProviderMeta';\nimport { headingMeta } from '../features/typography/headingMeta';\nimport { textMeta } from '../features/typography/textMeta';\nimport { uploaderMeta } from '../features/uploader/uploaderMeta';\nimport { foundationMetas } from '../foundation/meta';\nimport { appShellMeta } from '../layout/app-shell/meta';\nimport { screenMeta } from '../layout/screen/meta';\nimport { screenSectionMeta } from '../layout/screen-section/meta';\nimport { settingsLayoutMeta } from '../layout/settings-layout/meta';\nimport { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';\nimport { topbarLayoutMeta } from '../layout/topbar-layout/meta';\nimport { chatListItemMeta } from '../patterns/chat-list-item/meta';\nimport { collectionEditorMeta } from '../patterns/collection-editor/meta';\nimport { confirmDialogMeta } from '../patterns/confirm-dialog/meta';\nimport { filterBarMeta } from '../patterns/filter-bar/meta';\nimport { inspectorFieldMeta } from '../patterns/inspector-field/meta';\nimport { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';\nimport { messageBubbleMeta } from '../patterns/message-bubble/meta';\nimport { noticeMeta } from '../patterns/notice/meta';\nimport { panelMeta } from '../patterns/panel/meta';\nimport { readerSurfaceMeta } from '../patterns/reader/meta';\nimport {\n barcodeScannerViewMeta,\n cameraPermissionViewMeta,\n scanOverlayMeta,\n} from '../patterns/scanner/meta';\nimport { sectionHeaderMeta } from '../patterns/section-header/meta';\nimport { selectableItemMeta, selectionProviderMeta } from '../patterns/selection/meta';\nimport { settingsRowMeta } from '../patterns/settings-row/meta';\nimport { switchFieldMeta } from '../patterns/switch-field/meta';\nimport { themeComposerMeta } from '../patterns/theme-composer/meta';\nimport { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';\nimport { timelineMeta } from '../patterns/timeline/meta';\nimport { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';\nimport { themeModeToggleMeta } from '../theme/ThemeModeToggle.meta';\nimport { finalizeFeatureMetadata } from '../utils/finalizeFeatureMetadata';\nimport type { ZoraComponentMetaRegistry } from './types';\n\nexport const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMetadata({\n ...foundationMetas,\n Accordion: accordionMeta,\n AccordionItem: accordionItemMeta,\n ActivityIndicator: activityIndicatorMeta,\n Box: boxMeta,\n Container: containerMeta,\n Stack: stackMeta,\n Grid: gridMeta,\n Divider: dividerMeta,\n Surface: surfaceMeta,\n AppBar: appBarMeta,\n Avatar: avatarMeta,\n AvatarGroup: avatarGroupMeta,\n Badge: badgeMeta,\n Breadcrumbs: breadcrumbsMeta,\n Button: buttonMeta,\n ButtonGroup: buttonGroupMeta,\n Card: cardMeta,\n Checkbox: checkboxMeta,\n CheckboxGroup: checkboxGroupMeta,\n Chip: chipMeta,\n ChipGroup: chipGroupMeta,\n DataTable: dataTableMeta,\n DatePicker: datePickerMeta,\n DropdownMenu: dropdownMenuMeta,\n Form: formMeta,\n FormActions: formActionsMeta,\n FormError: formErrorMeta,\n FormField: formFieldMeta,\n Gradient: gradientMeta,\n Heading: headingMeta,\n Icon: iconMeta,\n IconButton: iconButtonMeta,\n Image: imageMeta,\n KeyboardAvoidingView: keyboardAvoidingViewMeta,\n TextInput: textInputMeta,\n MediaCard: mediaCardMeta,\n Menu: menuMeta,\n MetricCard: metricCardMeta,\n Modal: modalMeta,\n Pagination: paginationMeta,\n Progress: progressMeta,\n ProgressRing: progressRingMeta,\n Radio: radioMeta,\n RadioGroup: radioGroupMeta,\n Rating: ratingMeta,\n SearchBar: searchBarMeta,\n Select: selectMeta,\n Skeleton: skeletonMeta,\n SkeletonCard: skeletonCardMeta,\n SkeletonList: skeletonListMeta,\n SkeletonText: skeletonTextMeta,\n Tabs: tabsMeta,\n Text: textMeta,\n TimePicker: timePickerMeta,\n Toast: toastMeta,\n ToastProvider: toastProviderMeta,\n Toolbar: toolbarMeta,\n ToolbarAction: toolbarActionMeta,\n Uploader: uploaderMeta,\n BottomSheet: bottomSheetMeta,\n FlatList: flatListMeta,\n SectionList: sectionListMeta,\n ThemeModeToggle: themeModeToggleMeta,\n AppShell: appShellMeta,\n Screen: screenMeta,\n ScreenSection: screenSectionMeta,\n SettingsLayout: settingsLayoutMeta,\n SidebarLayout: sidebarLayoutMeta,\n TopbarLayout: topbarLayoutMeta,\n ForgotPasswordForm: forgotPasswordFormMeta,\n OAuthProviderButton: oauthProviderButtonMeta,\n OAuthProviderList: oauthProviderListMeta,\n OtpForm: otpFormMeta,\n SignInForm: signInFormMeta,\n SignUpForm: signUpFormMeta,\n ChatListItem: chatListItemMeta,\n CollectionEditor: collectionEditorMeta,\n ConfirmDialog: confirmDialogMeta,\n ContentRail: contentRailMeta,\n EmptyState: emptyStateMeta,\n FilterBar: filterBarMeta,\n Hero: heroMeta,\n InspectorField: inspectorFieldMeta,\n List: listMeta,\n ListRow: listRowMeta,\n ListSection: listSectionMeta,\n MessageBubble: messageBubbleMeta,\n MissingElement: missingElementMeta,\n Notice: noticeMeta,\n Panel: panelMeta,\n PostCard: postCardMeta,\n ProductCard: productCardMeta,\n ReaderSurface: readerSurfaceMeta,\n BarcodeScannerView: barcodeScannerViewMeta,\n CameraPermissionView: cameraPermissionViewMeta,\n ScanOverlay: scanOverlayMeta,\n SectionHeader: sectionHeaderMeta,\n SelectableItem: selectableItemMeta,\n SelectionProvider: selectionProviderMeta,\n SettingsRow: settingsRowMeta,\n SwitchField: switchFieldMeta,\n ThemeComposer: themeComposerMeta,\n PaletteItem: paletteItemMeta,\n TileGrid: tileGridMeta,\n Timeline: timelineMeta,\n TreeItem: treeItemMeta,\n TreeView: treeViewMeta,\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AppBar } from '../../
|
|
2
|
+
import { AppBar } from '../../features/app-bar/public';
|
|
3
3
|
import { IconButton } from '../../features/button/public';
|
|
4
4
|
import { Box, Stack } from '../../features/layout/public';
|
|
5
5
|
import { Progress } from '../../features/progress/public';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReaderSurface.js","sourceRoot":"","sources":["../../../src/patterns/reader/ReaderSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAA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,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAClF;UAAA,CAAC,eAAe,CAClB;QAAA,EAAE,GAAG,CAEL;;QAAA,CAAC,UAAU,CAAC,CAAC,CAAC,CACZ,CAAC,YAAY,CACX,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { AppBar } from '../../components/app-bar';\nimport { IconButton } from '../../features/button/public';\nimport { Box, Stack } from '../../features/layout/public';\nimport { Progress } from '../../features/progress/public';\nimport { Surface } from '../../features/surface/public';\nimport { Text } from '../../features/typography/public';\nimport { Center, Inline } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveReaderProgress } from './resolveReaderProgress';\nimport type { ReaderStatus, ReaderSurfaceProps } from './types';\n\nfunction resolvePageLabel(page: number | undefined, pageCount: number | undefined): string | null {\n if (page === undefined || !Number.isFinite(page)) return null;\n if (pageCount === undefined || !Number.isFinite(pageCount)) return `Page ${page}`;\n return `Page ${page} of ${pageCount}`;\n}\n\nfunction resolveCanGoPrevious({\n canGoPrevious,\n page,\n}: Pick<ReaderSurfaceProps, 'canGoPrevious' | 'page'>): boolean {\n if (canGoPrevious !== undefined) return canGoPrevious;\n return page === undefined || page > 1;\n}\n\nfunction resolveCanGoNext({\n canGoNext,\n page,\n pageCount,\n}: Pick<ReaderSurfaceProps, 'canGoNext' | 'page' | 'pageCount'>): boolean {\n if (canGoNext !== undefined) return canGoNext;\n return page === undefined || pageCount === undefined || page < pageCount;\n}\n\nfunction ReaderEmptyState({\n status,\n loadingLabel,\n errorTitle,\n unavailableTitle,\n}: {\n status: ReaderStatus;\n loadingLabel: string;\n errorTitle: string;\n unavailableTitle: string;\n}) {\n const title =\n status === 'loading' ? loadingLabel : status === 'error' ? errorTitle : unavailableTitle;\n\n return (\n <Center flex={1} minHeight={360} p=\"l\">\n <Text align=\"center\" emphasis=\"muted\" variant=\"bodySmall\">\n {title}\n </Text>\n </Center>\n );\n}\n\nfunction invokeReaderAction(action: (() => void | Promise<void>) | undefined): void {\n void action?.();\n}\n\nfunction ReaderHeader({\n interactionPolicy,\n title,\n subtitle,\n contentsLabel,\n appearanceLabel,\n highlightLabel,\n highlighted,\n headerActions,\n onOpenContents,\n onOpenAppearance,\n onToggleHighlight,\n}: Pick<\n ReaderSurfaceProps,\n | 'interactionPolicy'\n | 'title'\n | 'subtitle'\n | 'contentsLabel'\n | 'appearanceLabel'\n | 'highlightLabel'\n | 'highlighted'\n | 'headerActions'\n | 'onOpenContents'\n | 'onOpenAppearance'\n | 'onToggleHighlight'\n>) {\n const actions =\n onOpenContents || onOpenAppearance || onToggleHighlight || headerActions ? (\n <Inline align=\"center\" gap=\"xs\" wrap=\"nowrap\">\n {onOpenContents ? (\n <IconButton\n icon={{ name: 'list-outline' }}\n interactionPolicy={interactionPolicy}\n label={contentsLabel ?? 'Table of contents'}\n onPress={() => invokeReaderAction(onOpenContents)}\n size=\"l\"\n />\n ) : null}\n {onOpenAppearance ? (\n <IconButton\n icon={{ name: 'text-outline' }}\n interactionPolicy={interactionPolicy}\n label={appearanceLabel ?? 'Reading appearance'}\n onPress={() => invokeReaderAction(onOpenAppearance)}\n size=\"l\"\n />\n ) : null}\n {onToggleHighlight ? (\n <IconButton\n color={highlighted ? 'primary' : 'neutral'}\n icon={{ name: highlighted ? 'bookmark' : 'bookmark-outline' }}\n interactionPolicy={interactionPolicy}\n label={highlightLabel ?? 'Toggle highlight'}\n onPress={() => invokeReaderAction(onToggleHighlight)}\n size=\"l\"\n />\n ) : null}\n {headerActions}\n </Inline>\n ) : undefined;\n\n return (\n <AppBar\n actions={actions}\n divider\n interactionPolicy={interactionPolicy}\n safeAreaTop\n subtitle={subtitle}\n title={title}\n />\n );\n}\n\nfunction ReaderFooter({\n interactionPolicy,\n status,\n page,\n pageCount,\n progress,\n canGoPrevious,\n canGoNext,\n chapterLabel,\n pageLabel,\n previousPageLabel,\n nextPageLabel,\n footerActions,\n onPreviousPage,\n onNextPage,\n}: Pick<\n ReaderSurfaceProps,\n | 'interactionPolicy'\n | 'status'\n | 'page'\n | 'pageCount'\n | 'progress'\n | 'canGoPrevious'\n | 'canGoNext'\n | 'chapterLabel'\n | 'pageLabel'\n | 'previousPageLabel'\n | 'nextPageLabel'\n | 'footerActions'\n | 'onPreviousPage'\n | 'onNextPage'\n>) {\n const { theme } = useZoraTheme();\n const resolvedProgress = resolveReaderProgress({ progress, page, pageCount });\n const resolvedPageLabel = pageLabel ?? resolvePageLabel(page, pageCount);\n const previousEnabled =\n status === 'ready' && Boolean(onPreviousPage) && resolveCanGoPrevious({ canGoPrevious, page });\n const nextEnabled =\n status === 'ready' && Boolean(onNextPage) && resolveCanGoNext({ canGoNext, page, pageCount });\n\n return (\n <Stack\n bg={theme.semantics.surface.raised}\n borderColor={theme.semantics.neutral.divider}\n borderWidth={1}\n gap=\"s\"\n p=\"m\"\n >\n <Progress value={resolvedProgress} max={1} size=\"s\" />\n <Stack align=\"center\" direction=\"row\" gap=\"m\" justify=\"space-between\" wrap=\"nowrap\">\n <IconButton\n disabled={!previousEnabled}\n icon={{ name: 'chevron-back' }}\n interactionPolicy={interactionPolicy}\n label={previousPageLabel ?? 'Previous page'}\n onPress={() => invokeReaderAction(onPreviousPage)}\n size=\"l\"\n />\n <Box flex={1} minWidth={0}>\n <Stack align=\"center\" gap=\"xs\">\n {chapterLabel ? (\n <Text\n align=\"center\"\n ellipsizeMode=\"tail\"\n numberOfLines={1}\n variant=\"label\"\n weight=\"semiBold\"\n >\n {chapterLabel}\n </Text>\n ) : null}\n {resolvedPageLabel ? (\n <Text\n accessibilityLiveRegion=\"polite\"\n align=\"center\"\n emphasis=\"muted\"\n variant=\"caption\"\n >\n {resolvedPageLabel}\n </Text>\n ) : null}\n </Stack>\n </Box>\n <IconButton\n disabled={!nextEnabled}\n icon={{ name: 'chevron-forward' }}\n interactionPolicy={interactionPolicy}\n label={nextPageLabel ?? 'Next page'}\n onPress={() => invokeReaderAction(onNextPage)}\n size=\"l\"\n />\n </Stack>\n {footerActions ? <Box>{footerActions}</Box> : null}\n </Stack>\n );\n}\n\nfunction ReaderSurfaceInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n source: _source,\n format: _format,\n location: _location,\n status = 'idle',\n page,\n pageCount,\n progress,\n canGoPrevious,\n canGoNext,\n title,\n subtitle,\n chapterLabel,\n pageLabel,\n previousPageLabel = 'Previous page',\n nextPageLabel = 'Next page',\n contentsLabel = 'Table of contents',\n appearanceLabel = 'Reading appearance',\n highlightLabel = 'Toggle highlight',\n loadingLabel = 'Loading document…',\n errorTitle = 'Unable to open this document.',\n unavailableTitle = 'Reader preview unavailable.',\n showChrome = true,\n readerColorScheme: _readerColorScheme = 'system',\n fontScale: _fontScale = 1,\n lineHeight: _lineHeight = 'normal',\n highlighted = false,\n viewport,\n headerActions,\n footerActions,\n onPreviousPage,\n onNextPage,\n onLocationChange: _onLocationChange,\n onOpenContents,\n onOpenAppearance,\n onToggleHighlight,\n onOpenExternalLink: _onOpenExternalLink,\n onReaderError: _onReaderError,\n testID,\n}: ReaderSurfaceProps) {\n const { theme } = useZoraTheme();\n\n const viewportContent =\n viewport && status !== 'error' ? (\n viewport\n ) : (\n <ReaderEmptyState\n errorTitle={errorTitle}\n loadingLabel={loadingLabel}\n status={status}\n unavailableTitle={unavailableTitle}\n />\n );\n\n return (\n <Surface\n radius=\"l\"\n testID={testID}\n variant=\"default\"\n style={{ minHeight: 480, overflow: 'hidden' }}\n >\n <Stack flex={1} gap={0}>\n {showChrome ? (\n <ReaderHeader\n appearanceLabel={appearanceLabel}\n contentsLabel={contentsLabel}\n headerActions={headerActions}\n highlightLabel={highlightLabel}\n highlighted={highlighted}\n interactionPolicy={interactionPolicy}\n onOpenAppearance={onOpenAppearance}\n onOpenContents={onOpenContents}\n onToggleHighlight={onToggleHighlight}\n subtitle={subtitle}\n title={title}\n />\n ) : null}\n\n <Box bg={theme.semantics.surface.default} flex={1} minHeight={360} overflow=\"hidden\">\n {viewportContent}\n </Box>\n\n {showChrome ? (\n <ReaderFooter\n canGoNext={canGoNext}\n canGoPrevious={canGoPrevious}\n chapterLabel={chapterLabel}\n footerActions={footerActions}\n interactionPolicy={interactionPolicy}\n nextPageLabel={nextPageLabel}\n onNextPage={onNextPage}\n onPreviousPage={onPreviousPage}\n page={page}\n pageCount={pageCount}\n pageLabel={pageLabel}\n previousPageLabel={previousPageLabel}\n progress={progress}\n status={status}\n />\n ) : null}\n </Stack>\n </Surface>\n );\n}\n\n/***\n * Adapter-neutral reader shell for EPUB and PDF experiences.\n *\n * Supply the actual renderer through `viewport`; ZORA owns only the reader\n * chrome, controlled state, progress, accessible controls, and normalized\n * adapter callbacks.\n */\nexport const ReaderSurface = withZoraThemeScope(ReaderSurfaceInner);\n"]}
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C,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,EACb,CACH,CAAC,CAAC,CAAC,IAAI,CAER;;QAAA,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAClF;UAAA,CAAC,eAAe,CAClB;QAAA,EAAE,GAAG,CAEL;;QAAA,CAAC,UAAU,CAAC,CAAC,CAAC,CACZ,CAAC,YAAY,CACX,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { AppBar } from '../../features/app-bar/public';\nimport { IconButton } from '../../features/button/public';\nimport { Box, Stack } from '../../features/layout/public';\nimport { Progress } from '../../features/progress/public';\nimport { Surface } from '../../features/surface/public';\nimport { Text } from '../../features/typography/public';\nimport { Center, Inline } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveReaderProgress } from './resolveReaderProgress';\nimport type { ReaderStatus, ReaderSurfaceProps } from './types';\n\nfunction resolvePageLabel(page: number | undefined, pageCount: number | undefined): string | null {\n if (page === undefined || !Number.isFinite(page)) return null;\n if (pageCount === undefined || !Number.isFinite(pageCount)) return `Page ${page}`;\n return `Page ${page} of ${pageCount}`;\n}\n\nfunction resolveCanGoPrevious({\n canGoPrevious,\n page,\n}: Pick<ReaderSurfaceProps, 'canGoPrevious' | 'page'>): boolean {\n if (canGoPrevious !== undefined) return canGoPrevious;\n return page === undefined || page > 1;\n}\n\nfunction resolveCanGoNext({\n canGoNext,\n page,\n pageCount,\n}: Pick<ReaderSurfaceProps, 'canGoNext' | 'page' | 'pageCount'>): boolean {\n if (canGoNext !== undefined) return canGoNext;\n return page === undefined || pageCount === undefined || page < pageCount;\n}\n\nfunction ReaderEmptyState({\n status,\n loadingLabel,\n errorTitle,\n unavailableTitle,\n}: {\n status: ReaderStatus;\n loadingLabel: string;\n errorTitle: string;\n unavailableTitle: string;\n}) {\n const title =\n status === 'loading' ? loadingLabel : status === 'error' ? errorTitle : unavailableTitle;\n\n return (\n <Center flex={1} minHeight={360} p=\"l\">\n <Text align=\"center\" emphasis=\"muted\" variant=\"bodySmall\">\n {title}\n </Text>\n </Center>\n );\n}\n\nfunction invokeReaderAction(action: (() => void | Promise<void>) | undefined): void {\n void action?.();\n}\n\nfunction ReaderHeader({\n interactionPolicy,\n title,\n subtitle,\n contentsLabel,\n appearanceLabel,\n highlightLabel,\n highlighted,\n headerActions,\n onOpenContents,\n onOpenAppearance,\n onToggleHighlight,\n}: Pick<\n ReaderSurfaceProps,\n | 'interactionPolicy'\n | 'title'\n | 'subtitle'\n | 'contentsLabel'\n | 'appearanceLabel'\n | 'highlightLabel'\n | 'highlighted'\n | 'headerActions'\n | 'onOpenContents'\n | 'onOpenAppearance'\n | 'onToggleHighlight'\n>) {\n const actions =\n onOpenContents || onOpenAppearance || onToggleHighlight || headerActions ? (\n <Inline align=\"center\" gap=\"xs\" wrap=\"nowrap\">\n {onOpenContents ? (\n <IconButton\n icon={{ name: 'list-outline' }}\n interactionPolicy={interactionPolicy}\n label={contentsLabel ?? 'Table of contents'}\n onPress={() => invokeReaderAction(onOpenContents)}\n size=\"l\"\n />\n ) : null}\n {onOpenAppearance ? (\n <IconButton\n icon={{ name: 'text-outline' }}\n interactionPolicy={interactionPolicy}\n label={appearanceLabel ?? 'Reading appearance'}\n onPress={() => invokeReaderAction(onOpenAppearance)}\n size=\"l\"\n />\n ) : null}\n {onToggleHighlight ? (\n <IconButton\n color={highlighted ? 'primary' : 'neutral'}\n icon={{ name: highlighted ? 'bookmark' : 'bookmark-outline' }}\n interactionPolicy={interactionPolicy}\n label={highlightLabel ?? 'Toggle highlight'}\n onPress={() => invokeReaderAction(onToggleHighlight)}\n size=\"l\"\n />\n ) : null}\n {headerActions}\n </Inline>\n ) : undefined;\n\n return (\n <AppBar\n actions={actions}\n divider\n interactionPolicy={interactionPolicy}\n safeAreaTop\n subtitle={subtitle}\n title={title}\n />\n );\n}\n\nfunction ReaderFooter({\n interactionPolicy,\n status,\n page,\n pageCount,\n progress,\n canGoPrevious,\n canGoNext,\n chapterLabel,\n pageLabel,\n previousPageLabel,\n nextPageLabel,\n footerActions,\n onPreviousPage,\n onNextPage,\n}: Pick<\n ReaderSurfaceProps,\n | 'interactionPolicy'\n | 'status'\n | 'page'\n | 'pageCount'\n | 'progress'\n | 'canGoPrevious'\n | 'canGoNext'\n | 'chapterLabel'\n | 'pageLabel'\n | 'previousPageLabel'\n | 'nextPageLabel'\n | 'footerActions'\n | 'onPreviousPage'\n | 'onNextPage'\n>) {\n const { theme } = useZoraTheme();\n const resolvedProgress = resolveReaderProgress({ progress, page, pageCount });\n const resolvedPageLabel = pageLabel ?? resolvePageLabel(page, pageCount);\n const previousEnabled =\n status === 'ready' && Boolean(onPreviousPage) && resolveCanGoPrevious({ canGoPrevious, page });\n const nextEnabled =\n status === 'ready' && Boolean(onNextPage) && resolveCanGoNext({ canGoNext, page, pageCount });\n\n return (\n <Stack\n bg={theme.semantics.surface.raised}\n borderColor={theme.semantics.neutral.divider}\n borderWidth={1}\n gap=\"s\"\n p=\"m\"\n >\n <Progress value={resolvedProgress} max={1} size=\"s\" />\n <Stack align=\"center\" direction=\"row\" gap=\"m\" justify=\"space-between\" wrap=\"nowrap\">\n <IconButton\n disabled={!previousEnabled}\n icon={{ name: 'chevron-back' }}\n interactionPolicy={interactionPolicy}\n label={previousPageLabel ?? 'Previous page'}\n onPress={() => invokeReaderAction(onPreviousPage)}\n size=\"l\"\n />\n <Box flex={1} minWidth={0}>\n <Stack align=\"center\" gap=\"xs\">\n {chapterLabel ? (\n <Text\n align=\"center\"\n ellipsizeMode=\"tail\"\n numberOfLines={1}\n variant=\"label\"\n weight=\"semiBold\"\n >\n {chapterLabel}\n </Text>\n ) : null}\n {resolvedPageLabel ? (\n <Text\n accessibilityLiveRegion=\"polite\"\n align=\"center\"\n emphasis=\"muted\"\n variant=\"caption\"\n >\n {resolvedPageLabel}\n </Text>\n ) : null}\n </Stack>\n </Box>\n <IconButton\n disabled={!nextEnabled}\n icon={{ name: 'chevron-forward' }}\n interactionPolicy={interactionPolicy}\n label={nextPageLabel ?? 'Next page'}\n onPress={() => invokeReaderAction(onNextPage)}\n size=\"l\"\n />\n </Stack>\n {footerActions ? <Box>{footerActions}</Box> : null}\n </Stack>\n );\n}\n\nfunction ReaderSurfaceInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n source: _source,\n format: _format,\n location: _location,\n status = 'idle',\n page,\n pageCount,\n progress,\n canGoPrevious,\n canGoNext,\n title,\n subtitle,\n chapterLabel,\n pageLabel,\n previousPageLabel = 'Previous page',\n nextPageLabel = 'Next page',\n contentsLabel = 'Table of contents',\n appearanceLabel = 'Reading appearance',\n highlightLabel = 'Toggle highlight',\n loadingLabel = 'Loading document…',\n errorTitle = 'Unable to open this document.',\n unavailableTitle = 'Reader preview unavailable.',\n showChrome = true,\n readerColorScheme: _readerColorScheme = 'system',\n fontScale: _fontScale = 1,\n lineHeight: _lineHeight = 'normal',\n highlighted = false,\n viewport,\n headerActions,\n footerActions,\n onPreviousPage,\n onNextPage,\n onLocationChange: _onLocationChange,\n onOpenContents,\n onOpenAppearance,\n onToggleHighlight,\n onOpenExternalLink: _onOpenExternalLink,\n onReaderError: _onReaderError,\n testID,\n}: ReaderSurfaceProps) {\n const { theme } = useZoraTheme();\n\n const viewportContent =\n viewport && status !== 'error' ? (\n viewport\n ) : (\n <ReaderEmptyState\n errorTitle={errorTitle}\n loadingLabel={loadingLabel}\n status={status}\n unavailableTitle={unavailableTitle}\n />\n );\n\n return (\n <Surface\n radius=\"l\"\n testID={testID}\n variant=\"default\"\n style={{ minHeight: 480, overflow: 'hidden' }}\n >\n <Stack flex={1} gap={0}>\n {showChrome ? (\n <ReaderHeader\n appearanceLabel={appearanceLabel}\n contentsLabel={contentsLabel}\n headerActions={headerActions}\n highlightLabel={highlightLabel}\n highlighted={highlighted}\n interactionPolicy={interactionPolicy}\n onOpenAppearance={onOpenAppearance}\n onOpenContents={onOpenContents}\n onToggleHighlight={onToggleHighlight}\n subtitle={subtitle}\n title={title}\n />\n ) : null}\n\n <Box bg={theme.semantics.surface.default} flex={1} minHeight={360} overflow=\"hidden\">\n {viewportContent}\n </Box>\n\n {showChrome ? (\n <ReaderFooter\n canGoNext={canGoNext}\n canGoPrevious={canGoPrevious}\n chapterLabel={chapterLabel}\n footerActions={footerActions}\n interactionPolicy={interactionPolicy}\n nextPageLabel={nextPageLabel}\n onNextPage={onNextPage}\n onPreviousPage={onPreviousPage}\n page={page}\n pageCount={pageCount}\n pageLabel={pageLabel}\n previousPageLabel={previousPageLabel}\n progress={progress}\n status={status}\n />\n ) : null}\n </Stack>\n </Surface>\n );\n}\n\n/***\n * Adapter-neutral reader shell for EPUB and PDF experiences.\n *\n * Supply the actual renderer through `viewport`; ZORA owns only the reader\n * chrome, controlled state, progress, accessible controls, and normalized\n * adapter callbacks.\n */\nexport const ReaderSurface = withZoraThemeScope(ReaderSurfaceInner);\n"]}
|
package/dist/registry.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AppBar } from './components/app-bar';
|
|
2
1
|
import { Breadcrumbs } from './components/breadcrumbs';
|
|
3
2
|
import { DropdownMenu, Menu } from './components/menu';
|
|
4
3
|
import { Modal } from './components/modal';
|
|
@@ -10,6 +9,7 @@ import { Tabs } from './components/tabs';
|
|
|
10
9
|
import { Toolbar, ToolbarAction } from './components/toolbar';
|
|
11
10
|
import { Accordion, AccordionItem } from './features/accordion/public';
|
|
12
11
|
import { ActivityIndicator } from './features/activity-indicator/public';
|
|
12
|
+
import { AppBar } from './features/app-bar/public';
|
|
13
13
|
import { ForgotPasswordForm, OAuthProviderButton, OAuthProviderList, OtpForm, SignInForm, SignUpForm, } from './features/auth/public';
|
|
14
14
|
import { Avatar } from './features/avatar/public';
|
|
15
15
|
import { AvatarGroup } from './features/avatar/public';
|
package/dist/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;A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ACV,YAAY;IACZ,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,UAAU;IACV,SAAS;IACT,IAAI;IACJ,cAAc;IACd,IAAI;IACJ,OAAO;IACP,WAAW;IACX,aAAa;IACb,cAAc;IACd,MAAM;IACN,KAAK;IACL,QAAQ;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;CACgC,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport { AppBar } from './components/app-bar';\nimport { Breadcrumbs } from './components/breadcrumbs';\nimport { DropdownMenu, Menu } from './components/menu';\nimport { Modal } from './components/modal';\nimport { Pagination } from './components/pagination';\nimport { Rating } from './components/rating';\nimport { SearchBar } from './components/search-bar';\nimport { Select } from './components/select';\nimport { Tabs } from './components/tabs';\nimport { Toolbar, ToolbarAction } from './components/toolbar';\nimport { Accordion, AccordionItem } from './features/accordion/public';\nimport { ActivityIndicator } from './features/activity-indicator/public';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from './features/auth/public';\nimport { Avatar } from './features/avatar/public';\nimport { AvatarGroup } from './features/avatar/public';\nimport { Badge } from './features/badge/public';\nimport { BottomSheet } from './features/bottom-sheet/public';\nimport { Button } from './features/button/public';\nimport { ButtonGroup } from './features/button/public';\nimport { IconButton } from './features/button/public';\nimport { Card } from './features/card/public';\nimport { MediaCard } from './features/card/public';\nimport { MetricCard } from './features/card/public';\nimport { PostCard } from './features/card/public';\nimport { ProductCard } from './features/card/public';\nimport { Chip } from './features/chip/public';\nimport { ChipGroup } from './features/chip/public';\nimport { DataTable } from './features/data-table/public';\nimport { DatePicker } from './features/date-picker/public';\nimport { EmptyState } from './features/empty-state/public';\nimport { Checkbox, CheckboxGroup } from './features/form/checkbox/public';\nimport { Form, FormActions, FormError, FormField } from './features/form/public';\nimport { Radio, RadioGroup } from './features/form/radio/public';\nimport { TextInput } from './features/form/text-input/public';\nimport { Gradient } from './features/gradient/public';\nimport { Hero } from './features/hero/public';\nimport { Icon } from './features/icon/public';\nimport { Image } from './features/image/public';\nimport { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';\nimport { Box, Container, Divider, Grid, Stack } from './features/layout/public';\nimport { ContentRail } from './features/layout/public';\nimport { FlatList, SectionList } from './features/list/public';\nimport { MissingElement } from './features/missing-element/public';\nimport { Progress, ProgressRing } from './features/progress/public';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './features/skeleton/public';\nimport { Surface } from './features/surface/public';\nimport { TimePicker } from './features/time-picker/public';\nimport { Toast } from './features/toast/public';\nimport { Heading } from './features/typography/public';\nimport { Text } from './features/typography/public';\nimport { Uploader } from './features/uploader/public';\nimport { Center, Inline, Show, Spacer } from './foundation';\nimport { AppShell } from './layout/app-shell';\nimport { Screen } from './layout/screen';\nimport { ScreenSection } from './layout/screen-section';\nimport { SettingsLayout } from './layout/settings-layout';\nimport { SidebarLayout } from './layout/sidebar-layout';\nimport { TopbarLayout } from './layout/topbar-layout';\nimport { ChatListItem } from './patterns/chat-list-item';\nimport { CollectionEditor } from './patterns/collection-editor';\nimport { ConfirmDialog } from './patterns/confirm-dialog';\nimport { FilterBar } from './patterns/filter-bar';\nimport { InspectorField } from './patterns/inspector-field';\nimport { List, ListRow, ListSection } from './patterns/list';\nimport { MessageBubble } from './patterns/message-bubble';\nimport { Notice } from './patterns/notice';\nimport { Panel } from './patterns/panel';\nimport { ReaderSurface } from './patterns/reader';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nimport { SectionHeader } from './patterns/section-header';\nimport { SelectableItem } from './patterns/selection';\nimport { SettingsRow } from './patterns/settings-row';\nimport { SwitchField } from './patterns/switch-field';\nimport { ThemeComposer } from './patterns/theme-composer';\nimport { PaletteItem, TileGrid } from './patterns/tile-grid';\nimport { Timeline } from './patterns/timeline';\nimport { TreeItem, TreeView } from './patterns/tree-view';\nimport { ThemeModeToggle } from './theme/ThemeModeToggle';\n\nexport type ZoraComponentRegistry = Readonly<Record<string, React.ElementType>>;\n\ntype ComponentPropsFor<K extends keyof typeof _ZORA_COMPONENT_REGISTRY> = React.ComponentProps<\n (typeof _ZORA_COMPONENT_REGISTRY)[K]\n>;\n\ntype AcceptsSurfaceInteractionPolicyProps<P> = 'interactionPolicy' extends keyof P\n ? InteractionPolicyProps extends Pick<P, 'interactionPolicy'>\n ? Pick<P, 'interactionPolicy'> extends InteractionPolicyProps\n ? true\n : false\n : false\n : false;\n\ntype RegistryInteractionPolicyContract = {\n [K in keyof typeof _ZORA_COMPONENT_REGISTRY]: AcceptsSurfaceInteractionPolicyProps<\n ComponentPropsFor<K>\n >;\n};\n\ntype _AssertTrue<T extends true> = T;\ntype _RegistryInteractionPolicyCheck = _AssertTrue<\n RegistryInteractionPolicyContract[keyof typeof _ZORA_COMPONENT_REGISTRY]\n>;\n\nconst _ZORA_COMPONENT_REGISTRY = {\n Accordion,\n AccordionItem,\n ActivityIndicator,\n AppBar,\n Avatar,\n AvatarGroup,\n Badge,\n Breadcrumbs,\n Button,\n ButtonGroup,\n Card,\n Checkbox,\n CheckboxGroup,\n Chip,\n ChipGroup,\n DataTable,\n DatePicker,\n DropdownMenu,\n Form,\n FormActions,\n FormError,\n FormField,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n KeyboardAvoidingView,\n TextInput,\n MediaCard,\n Menu,\n MetricCard,\n Modal,\n Pagination,\n Progress,\n ProgressRing,\n Radio,\n RadioGroup,\n Rating,\n SearchBar,\n Select,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n Tabs,\n Text,\n TimePicker,\n Toast,\n Toolbar,\n ToolbarAction,\n Uploader,\n BottomSheet,\n FlatList,\n SectionList,\n ThemeModeToggle,\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n SettingsLayout,\n SidebarLayout,\n TopbarLayout,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ConfirmDialog,\n ContentRail,\n EmptyState,\n FilterBar,\n Hero,\n InspectorField,\n List,\n ListRow,\n ListSection,\n MessageBubble,\n MissingElement,\n Notice,\n Panel,\n PostCard,\n ProductCard,\n ReaderSurface,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n SettingsRow,\n SwitchField,\n ThemeComposer,\n PaletteItem,\n TileGrid,\n Timeline,\n TreeItem,\n TreeView,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC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P,WAAW;IACX,aAAa;IACb,cAAc;IACd,MAAM;IACN,KAAK;IACL,QAAQ;IACR,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,oBAAoB;IACpB,WAAW;IACX,aAAa;IACb,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;CACgC,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAA0B,wBAAwB,CAAC","sourcesContent":["import type { InteractionPolicyProps } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport { Breadcrumbs } from './components/breadcrumbs';\nimport { DropdownMenu, Menu } from './components/menu';\nimport { Modal } from './components/modal';\nimport { Pagination } from './components/pagination';\nimport { Rating } from './components/rating';\nimport { SearchBar } from './components/search-bar';\nimport { Select } from './components/select';\nimport { Tabs } from './components/tabs';\nimport { Toolbar, ToolbarAction } from './components/toolbar';\nimport { Accordion, AccordionItem } from './features/accordion/public';\nimport { ActivityIndicator } from './features/activity-indicator/public';\nimport { AppBar } from './features/app-bar/public';\nimport {\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n} from './features/auth/public';\nimport { Avatar } from './features/avatar/public';\nimport { AvatarGroup } from './features/avatar/public';\nimport { Badge } from './features/badge/public';\nimport { BottomSheet } from './features/bottom-sheet/public';\nimport { Button } from './features/button/public';\nimport { ButtonGroup } from './features/button/public';\nimport { IconButton } from './features/button/public';\nimport { Card } from './features/card/public';\nimport { MediaCard } from './features/card/public';\nimport { MetricCard } from './features/card/public';\nimport { PostCard } from './features/card/public';\nimport { ProductCard } from './features/card/public';\nimport { Chip } from './features/chip/public';\nimport { ChipGroup } from './features/chip/public';\nimport { DataTable } from './features/data-table/public';\nimport { DatePicker } from './features/date-picker/public';\nimport { EmptyState } from './features/empty-state/public';\nimport { Checkbox, CheckboxGroup } from './features/form/checkbox/public';\nimport { Form, FormActions, FormError, FormField } from './features/form/public';\nimport { Radio, RadioGroup } from './features/form/radio/public';\nimport { TextInput } from './features/form/text-input/public';\nimport { Gradient } from './features/gradient/public';\nimport { Hero } from './features/hero/public';\nimport { Icon } from './features/icon/public';\nimport { Image } from './features/image/public';\nimport { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';\nimport { Box, Container, Divider, Grid, Stack } from './features/layout/public';\nimport { ContentRail } from './features/layout/public';\nimport { FlatList, SectionList } from './features/list/public';\nimport { MissingElement } from './features/missing-element/public';\nimport { Progress, ProgressRing } from './features/progress/public';\nimport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './features/skeleton/public';\nimport { Surface } from './features/surface/public';\nimport { TimePicker } from './features/time-picker/public';\nimport { Toast } from './features/toast/public';\nimport { Heading } from './features/typography/public';\nimport { Text } from './features/typography/public';\nimport { Uploader } from './features/uploader/public';\nimport { Center, Inline, Show, Spacer } from './foundation';\nimport { AppShell } from './layout/app-shell';\nimport { Screen } from './layout/screen';\nimport { ScreenSection } from './layout/screen-section';\nimport { SettingsLayout } from './layout/settings-layout';\nimport { SidebarLayout } from './layout/sidebar-layout';\nimport { TopbarLayout } from './layout/topbar-layout';\nimport { ChatListItem } from './patterns/chat-list-item';\nimport { CollectionEditor } from './patterns/collection-editor';\nimport { ConfirmDialog } from './patterns/confirm-dialog';\nimport { FilterBar } from './patterns/filter-bar';\nimport { InspectorField } from './patterns/inspector-field';\nimport { List, ListRow, ListSection } from './patterns/list';\nimport { MessageBubble } from './patterns/message-bubble';\nimport { Notice } from './patterns/notice';\nimport { Panel } from './patterns/panel';\nimport { ReaderSurface } from './patterns/reader';\nimport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nimport { SectionHeader } from './patterns/section-header';\nimport { SelectableItem } from './patterns/selection';\nimport { SettingsRow } from './patterns/settings-row';\nimport { SwitchField } from './patterns/switch-field';\nimport { ThemeComposer } from './patterns/theme-composer';\nimport { PaletteItem, TileGrid } from './patterns/tile-grid';\nimport { Timeline } from './patterns/timeline';\nimport { TreeItem, TreeView } from './patterns/tree-view';\nimport { ThemeModeToggle } from './theme/ThemeModeToggle';\n\nexport type ZoraComponentRegistry = Readonly<Record<string, React.ElementType>>;\n\ntype ComponentPropsFor<K extends keyof typeof _ZORA_COMPONENT_REGISTRY> = React.ComponentProps<\n (typeof _ZORA_COMPONENT_REGISTRY)[K]\n>;\n\ntype AcceptsSurfaceInteractionPolicyProps<P> = 'interactionPolicy' extends keyof P\n ? InteractionPolicyProps extends Pick<P, 'interactionPolicy'>\n ? Pick<P, 'interactionPolicy'> extends InteractionPolicyProps\n ? true\n : false\n : false\n : false;\n\ntype RegistryInteractionPolicyContract = {\n [K in keyof typeof _ZORA_COMPONENT_REGISTRY]: AcceptsSurfaceInteractionPolicyProps<\n ComponentPropsFor<K>\n >;\n};\n\ntype _AssertTrue<T extends true> = T;\ntype _RegistryInteractionPolicyCheck = _AssertTrue<\n RegistryInteractionPolicyContract[keyof typeof _ZORA_COMPONENT_REGISTRY]\n>;\n\nconst _ZORA_COMPONENT_REGISTRY = {\n Accordion,\n AccordionItem,\n ActivityIndicator,\n AppBar,\n Avatar,\n AvatarGroup,\n Badge,\n Breadcrumbs,\n Button,\n ButtonGroup,\n Card,\n Checkbox,\n CheckboxGroup,\n Chip,\n ChipGroup,\n DataTable,\n DatePicker,\n DropdownMenu,\n Form,\n FormActions,\n FormError,\n FormField,\n Gradient,\n Heading,\n Icon,\n IconButton,\n Image,\n KeyboardAvoidingView,\n TextInput,\n MediaCard,\n Menu,\n MetricCard,\n Modal,\n Pagination,\n Progress,\n ProgressRing,\n Radio,\n RadioGroup,\n Rating,\n SearchBar,\n Select,\n Skeleton,\n SkeletonCard,\n SkeletonList,\n SkeletonText,\n Tabs,\n Text,\n TimePicker,\n Toast,\n Toolbar,\n ToolbarAction,\n Uploader,\n BottomSheet,\n FlatList,\n SectionList,\n ThemeModeToggle,\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n AppShell,\n Screen,\n ScreenSection,\n SettingsLayout,\n SidebarLayout,\n TopbarLayout,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n SignInForm,\n SignUpForm,\n ChatListItem,\n CollectionEditor,\n ConfirmDialog,\n ContentRail,\n EmptyState,\n FilterBar,\n Hero,\n InspectorField,\n List,\n ListRow,\n ListSection,\n MessageBubble,\n MissingElement,\n Notice,\n Panel,\n PostCard,\n ProductCard,\n ReaderSurface,\n BarcodeScannerView,\n CameraPermissionView,\n ScanOverlay,\n SectionHeader,\n SelectableItem,\n SettingsRow,\n SwitchField,\n ThemeComposer,\n PaletteItem,\n TileGrid,\n Timeline,\n TreeItem,\n TreeView,\n} as const satisfies ZoraComponentRegistry;\n\nexport const ZORA_COMPONENT_REGISTRY: ZoraComponentRegistry = _ZORA_COMPONENT_REGISTRY;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import type { ZoraBaseProps } from '
|
|
3
|
+
import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
|
|
4
4
|
export type AppBarMode = {
|
|
5
5
|
type: 'default';
|
|
6
6
|
} | {
|
|
@@ -28,4 +28,4 @@ export interface AppBarProps extends ZoraBaseProps {
|
|
|
28
28
|
safeAreaTop?: boolean;
|
|
29
29
|
divider?: boolean;
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=app-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-bar.d.ts","sourceRoot":"","sources":["../../src/types/app-bar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEN,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-bar.js","sourceRoot":"","sources":["../../src/types/app-bar.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../theme/ZoraBaseProps';\n\nexport type AppBarMode =\n | {\n type: 'default';\n }\n | {\n type: 'selection';\n label: string;\n count?: number;\n onCancel: () => void;\n cancelLabel?: string;\n cancelIcon?: ButtonIconSpec;\n };\n\nexport interface AppBarOverflowAction {\n onPress: () => void;\n label?: string;\n icon?: ButtonIconSpec;\n disabled?: boolean;\n}\n\nexport interface AppBarProps extends ZoraBaseProps {\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n leading?: React.ReactNode;\n actions?: React.ReactNode;\n overflow?: AppBarOverflowAction;\n appMode?: AppBarMode;\n children?: React.ReactNode;\n safeAreaTop?: boolean;\n divider?: boolean;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "14.0.
|
|
4
|
+
"version": "14.0.1",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { AppBar as SurfaceAppBar, type ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { Inline } from '../../../../foundation';
|
|
5
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
6
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
7
|
+
import type { AppBarMode, AppBarOverflowAction, AppBarProps } from '../../../../types/app-bar';
|
|
8
|
+
import { IconButton } from '../../../button/public';
|
|
9
|
+
import { Box, Stack } from '../../../layout/public';
|
|
10
|
+
import { Heading, Text } from '../../../typography/public';
|
|
11
|
+
|
|
12
|
+
const DEFAULT_CANCEL_ICON = { name: 'close-outline' } satisfies ButtonIconSpec;
|
|
13
|
+
const DEFAULT_OVERFLOW_ICON = { name: 'ellipsis-vertical' } satisfies ButtonIconSpec;
|
|
14
|
+
|
|
15
|
+
/*** Resolves the effective AppBar mode. */
|
|
16
|
+
function resolveMode(mode: AppBarMode | undefined): AppBarMode {
|
|
17
|
+
return mode ?? { type: 'default' };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*** Formats the active selection label with its optional count. */
|
|
21
|
+
function resolveSelectionLabel({ count, label }: { count?: number; label: string }): string {
|
|
22
|
+
if (count === undefined) return label;
|
|
23
|
+
return `${label} (${count})`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/*** Resolves the accessible label for the overflow action. */
|
|
27
|
+
function resolveOverflowLabel(overflow: AppBarOverflowAction): string {
|
|
28
|
+
return overflow.label ?? 'More options';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*** Resolves the accessible label for leaving selection mode. */
|
|
32
|
+
function resolveCancelLabel(mode: Extract<AppBarMode, { type: 'selection' }>): string {
|
|
33
|
+
return mode.cancelLabel ?? 'Cancel selection';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*** Renders a top app bar with title/subtitle and optional leading/trailing actions. */
|
|
37
|
+
export const AppBar = withZoraThemeScope(AppBarInner);
|
|
38
|
+
|
|
39
|
+
/*** Composes the opinionated ZORA AppBar over the Surface layout primitive. */
|
|
40
|
+
function AppBarInner({
|
|
41
|
+
themeId: _themeId,
|
|
42
|
+
mode: _mode,
|
|
43
|
+
title,
|
|
44
|
+
subtitle,
|
|
45
|
+
leading,
|
|
46
|
+
actions,
|
|
47
|
+
overflow,
|
|
48
|
+
appMode,
|
|
49
|
+
children,
|
|
50
|
+
safeAreaTop = true,
|
|
51
|
+
divider = true,
|
|
52
|
+
testID,
|
|
53
|
+
interactionPolicy,
|
|
54
|
+
}: AppBarProps) {
|
|
55
|
+
const { theme } = useZoraTheme();
|
|
56
|
+
const resolvedMode = resolveMode(appMode);
|
|
57
|
+
const isSelectionMode = resolvedMode.type === 'selection';
|
|
58
|
+
const resolvedLeading = leading ?? resolveSelectionLeading(resolvedMode, interactionPolicy);
|
|
59
|
+
const overflowButton = resolveOverflowButton(overflow, interactionPolicy);
|
|
60
|
+
const resolvedTrailing = resolveTrailing(actions, overflowButton);
|
|
61
|
+
const resolvedCenter = resolveCenter({
|
|
62
|
+
children,
|
|
63
|
+
isSelectionMode,
|
|
64
|
+
resolvedMode,
|
|
65
|
+
subtitle,
|
|
66
|
+
title,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<SurfaceAppBar
|
|
71
|
+
bg={isSelectionMode ? theme.semantics.action.primary.softBg : undefined}
|
|
72
|
+
divider={divider}
|
|
73
|
+
leading={resolvedLeading}
|
|
74
|
+
safeAreaTop={safeAreaTop}
|
|
75
|
+
testID={testID}
|
|
76
|
+
trailing={resolvedTrailing}
|
|
77
|
+
>
|
|
78
|
+
{resolvedCenter ? <Box style={{ minWidth: 0 }}>{resolvedCenter}</Box> : null}
|
|
79
|
+
</SurfaceAppBar>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/*** Resolves the selection action shown at the leading edge. */
|
|
84
|
+
function resolveSelectionLeading(
|
|
85
|
+
mode: AppBarMode,
|
|
86
|
+
interactionPolicy: AppBarProps['interactionPolicy'],
|
|
87
|
+
): React.ReactNode | undefined {
|
|
88
|
+
if (mode.type !== 'selection') return undefined;
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<IconButton
|
|
92
|
+
color="neutral"
|
|
93
|
+
icon={mode.cancelIcon ?? DEFAULT_CANCEL_ICON}
|
|
94
|
+
interactionPolicy={interactionPolicy}
|
|
95
|
+
label={resolveCancelLabel(mode)}
|
|
96
|
+
onPress={mode.onCancel}
|
|
97
|
+
size="m"
|
|
98
|
+
variant="ghost"
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*** Resolves the optional overflow action. */
|
|
104
|
+
function resolveOverflowButton(
|
|
105
|
+
overflow: AppBarOverflowAction | undefined,
|
|
106
|
+
interactionPolicy: AppBarProps['interactionPolicy'],
|
|
107
|
+
): React.ReactNode {
|
|
108
|
+
if (!overflow?.onPress) return null;
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<IconButton
|
|
112
|
+
color="neutral"
|
|
113
|
+
disabled={overflow.disabled}
|
|
114
|
+
icon={overflow.icon ?? DEFAULT_OVERFLOW_ICON}
|
|
115
|
+
interactionPolicy={interactionPolicy}
|
|
116
|
+
label={resolveOverflowLabel(overflow)}
|
|
117
|
+
onPress={overflow.onPress}
|
|
118
|
+
size="m"
|
|
119
|
+
variant="ghost"
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/*** Composes trailing actions and overflow controls. */
|
|
125
|
+
function resolveTrailing(
|
|
126
|
+
actions: React.ReactNode,
|
|
127
|
+
overflowButton: React.ReactNode,
|
|
128
|
+
): React.ReactNode {
|
|
129
|
+
if (!actions && !overflowButton) return undefined;
|
|
130
|
+
return (
|
|
131
|
+
<Inline align="center" gap="s" wrap="nowrap">
|
|
132
|
+
{actions}
|
|
133
|
+
{overflowButton}
|
|
134
|
+
</Inline>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/*** Resolves the center content for default and selection modes. */
|
|
139
|
+
function resolveCenter({
|
|
140
|
+
children,
|
|
141
|
+
isSelectionMode,
|
|
142
|
+
resolvedMode,
|
|
143
|
+
subtitle,
|
|
144
|
+
title,
|
|
145
|
+
}: {
|
|
146
|
+
children: React.ReactNode;
|
|
147
|
+
isSelectionMode: boolean;
|
|
148
|
+
resolvedMode: AppBarMode;
|
|
149
|
+
subtitle: React.ReactNode;
|
|
150
|
+
title: React.ReactNode;
|
|
151
|
+
}): React.ReactNode {
|
|
152
|
+
if (children !== undefined) return children;
|
|
153
|
+
if (isSelectionMode && resolvedMode.type === 'selection') {
|
|
154
|
+
return (
|
|
155
|
+
<Text emphasis="default" numberOfLines={1} variant="label" weight="semiBold">
|
|
156
|
+
{resolveSelectionLabel(resolvedMode)}
|
|
157
|
+
</Text>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
if (title == null && subtitle == null) return null;
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
<Stack gap="xs">
|
|
164
|
+
{title != null ? (
|
|
165
|
+
<Heading ellipsizeMode="tail" level={3} numberOfLines={1} size="h5">
|
|
166
|
+
{title}
|
|
167
|
+
</Heading>
|
|
168
|
+
) : null}
|
|
169
|
+
{subtitle != null ? (
|
|
170
|
+
<Text ellipsizeMode="tail" emphasis="muted" numberOfLines={1} variant="bodySmall">
|
|
171
|
+
{subtitle}
|
|
172
|
+
</Text>
|
|
173
|
+
) : null}
|
|
174
|
+
</Stack>
|
|
175
|
+
);
|
|
176
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';
|
|
2
|
-
export { AppBar } from './components/app-bar';
|
|
3
1
|
export type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';
|
|
4
2
|
export { Breadcrumbs } from './components/breadcrumbs';
|
|
5
3
|
export type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';
|
|
@@ -33,6 +31,8 @@ export {
|
|
|
33
31
|
ActivityIndicator,
|
|
34
32
|
type ActivityIndicatorProps,
|
|
35
33
|
} from './features/activity-indicator/public';
|
|
34
|
+
export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './features/app-bar/public';
|
|
35
|
+
export { AppBar } from './features/app-bar/public';
|
|
36
36
|
export type {
|
|
37
37
|
AuthFormBaseProps,
|
|
38
38
|
AuthIdentifierKind,
|
|
@@ -22,6 +22,10 @@ function readComponent(...segments: string[]): string {
|
|
|
22
22
|
return readSource(join('components', ...segments));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
function readFeature(...segments: string[]): string {
|
|
26
|
+
return readSource(join('features', ...segments));
|
|
27
|
+
}
|
|
28
|
+
|
|
25
29
|
function readPattern(...segments: string[]): string {
|
|
26
30
|
return readSource(join('patterns', ...segments));
|
|
27
31
|
}
|
|
@@ -37,7 +41,7 @@ describe('InteractionPolicy declaration', () => {
|
|
|
37
41
|
test('no duplicate local InteractionPolicy type declarations in ZORA source', () => {
|
|
38
42
|
const files = [
|
|
39
43
|
readSource('theme/ZoraBaseProps.ts'),
|
|
40
|
-
|
|
44
|
+
readSource('types/app-bar.ts'),
|
|
41
45
|
readComponent('breadcrumbs', 'types.ts'),
|
|
42
46
|
readSource('types/empty-state.ts'),
|
|
43
47
|
readSource('types/hero.ts'),
|
|
@@ -75,11 +79,11 @@ describe('Surface wrapper propagation', () => {
|
|
|
75
79
|
|
|
76
80
|
describe('AppBar', () => {
|
|
77
81
|
test('forwards interactionPolicy to internal IconButtons', () => {
|
|
78
|
-
const source =
|
|
82
|
+
const source = readFeature('app-bar', 'adapters', 'inbound', 'AppBar.tsx');
|
|
79
83
|
|
|
80
84
|
expect(source).not.toMatch(/interactionPolicy:\s*_interactionPolicy/);
|
|
81
85
|
expect(source).toMatch(
|
|
82
|
-
/<IconButton[\s\S]*?interactionPolicy=\{interactionPolicy\}[\s\S]*?onPress=\{
|
|
86
|
+
/<IconButton[\s\S]*?interactionPolicy=\{interactionPolicy\}[\s\S]*?onPress=\{mode\.onCancel\}/,
|
|
83
87
|
);
|
|
84
88
|
expect(source).toMatch(
|
|
85
89
|
/<IconButton[\s\S]*?interactionPolicy=\{interactionPolicy\}[\s\S]*?onPress=\{overflow\.onPress\}/,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { AppBar } from '../../
|
|
3
|
+
import { AppBar } from '../../features/app-bar/public';
|
|
4
4
|
import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
|
|
5
5
|
import { Screen } from '../screen';
|
|
6
6
|
import { SidebarLayout } from '../sidebar-layout';
|
|
@@ -29,7 +29,5 @@ function SettingsLayoutInner({
|
|
|
29
29
|
|
|
30
30
|
/***
|
|
31
31
|
* Settings page layout with app bar, sidebar, and scrollable content area.
|
|
32
|
-
*
|
|
33
|
-
|
|
34
32
|
*/
|
|
35
33
|
export const SettingsLayout = withZoraThemeScope(SettingsLayoutInner);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { appBarMeta } from '../components/app-bar/meta';
|
|
2
1
|
import { breadcrumbsMeta } from '../components/breadcrumbs/meta';
|
|
3
2
|
import { dropdownMenuMeta, menuMeta } from '../components/menu/meta';
|
|
4
3
|
import { modalMeta } from '../components/modal/meta';
|
|
@@ -11,6 +10,7 @@ import { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';
|
|
|
11
10
|
import { accordionItemMeta } from '../features/accordion/accordionItemMeta';
|
|
12
11
|
import { accordionMeta } from '../features/accordion/accordionMeta';
|
|
13
12
|
import { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';
|
|
13
|
+
import { appBarMeta } from '../features/app-bar/appBarMeta';
|
|
14
14
|
import { forgotPasswordFormMeta } from '../features/auth/forgotPasswordFormMeta';
|
|
15
15
|
import { oauthProviderButtonMeta } from '../features/auth/oauthProviderButtonMeta';
|
|
16
16
|
import { oauthProviderListMeta } from '../features/auth/oauthProviderListMeta';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { AppBar } from '../../
|
|
3
|
+
import { AppBar } from '../../features/app-bar/public';
|
|
4
4
|
import { IconButton } from '../../features/button/public';
|
|
5
5
|
import { Box, Stack } from '../../features/layout/public';
|
|
6
6
|
import { Progress } from '../../features/progress/public';
|