@graphcommerce/next-ui 8.1.0-canary.8 → 9.0.0-canary.100
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/ActionCard/ActionCard.tsx +66 -39
- package/ActionCard/ActionCardAccordion.tsx +2 -1
- package/ActionCard/ActionCardLayout.tsx +1 -1
- package/ActionCard/ActionCardList.tsx +11 -10
- package/ActionCard/index.ts +0 -1
- package/Blog/BlogAuthor/BlogAuthor.tsx +2 -4
- package/Blog/BlogListItem/BlogListItem.tsx +2 -4
- package/Blog/BlogTags/BlogTag.tsx +4 -1
- package/Breadcrumbs/Breadcrumbs.tsx +195 -0
- package/Breadcrumbs/BreadcrumbsJsonLd.tsx +13 -0
- package/Breadcrumbs/BreadcrumbsList.tsx +101 -0
- package/Breadcrumbs/BreadcrumbsPopper.tsx +48 -0
- package/Breadcrumbs/index.ts +4 -0
- package/Breadcrumbs/jsonLdBreadcrumb.tsx +19 -0
- package/Breadcrumbs/types.ts +11 -0
- package/CHANGELOG.md +341 -98
- package/Config.graphqls +5 -0
- package/Document/DocumentBodyEnd.tsx +7 -0
- package/Document/DocumentBodyStart.tsx +7 -0
- package/Document/DocumentHeadEnd.tsx +7 -0
- package/Document/DocumentHeadStart.tsx +7 -0
- package/Document/index.ts +4 -0
- package/Footer/Footer.tsx +1 -1
- package/FramerScroller/SidebarGallery.tsx +54 -27
- package/FullPageMessage/FullPageMessage.tsx +1 -0
- package/Intl/DateTimeFormat/DateFormat.tsx +10 -0
- package/Intl/DateTimeFormat/DateTimeFormat.tsx +20 -0
- package/Intl/DateTimeFormat/TimeFormat.tsx +10 -0
- package/Intl/DateTimeFormat/index.ts +3 -0
- package/Intl/DateTimeFormat/toDate.ts +16 -0
- package/Intl/DisplayNames/DisplayNames.tsx +22 -0
- package/Intl/DisplayNames/index.ts +1 -0
- package/Intl/ListFormat.tsx +33 -0
- package/Intl/NumberFormat/CurrencyFormat.tsx +191 -0
- package/Intl/NumberFormat/NumberFormat.tsx +24 -0
- package/Intl/NumberFormat/PercentFormat.tsx +5 -0
- package/Intl/NumberFormat/UnitFormat.tsx +59 -0
- package/Intl/NumberFormat/index.ts +4 -0
- package/Intl/RelativeTimeFormat/RelativeTimeFormat.tsx +34 -0
- package/Intl/RelativeTimeFormat/RelativeToTimeFormat.tsx +35 -0
- package/Intl/RelativeTimeFormat/index.ts +2 -0
- package/Intl/RelativeTimeFormat/relativeTimeFormatAutoUnit.ts +23 -0
- package/Intl/index.ts +11 -0
- package/JsonLd/JsonLd.tsx +3 -2
- package/Layout/components/LayoutHeader.tsx +30 -10
- package/Layout/components/LayoutHeaderBack.tsx +20 -9
- package/Layout/components/LayoutHeaderClose.tsx +8 -2
- package/Layout/components/LayoutTitle.tsx +0 -5
- package/LayoutDefault/components/LayoutDefault.tsx +15 -13
- package/LazyHydrate/LazyHydrate.tsx +19 -3
- package/Overlay/components/OverlayBase.tsx +31 -6
- package/Overlay/components/OverlayHeader.tsx +27 -0
- package/Overlay/components/index.ts +1 -0
- package/PageLoadIndicator/PageLoadIndicator.tsx +25 -14
- package/PageMeta/PageMeta.tsx +1 -71
- package/PageMeta/canonicalize.ts +78 -0
- package/Pagination/PaginationExtended.tsx +103 -0
- package/Snackbar/MessageSnackbarImpl.tsx +60 -19
- package/Styles/responsiveVal.tsx +4 -5
- package/Styles/withEmotionCache.tsx +2 -2
- package/Theme/DarkLightModeThemeProvider.tsx +41 -19
- package/Theme/MuiButton.ts +11 -3
- package/TimeAgo/TimeAgo.tsx +3 -0
- package/hooks/index.ts +2 -1
- package/hooks/memoDeep.ts +38 -0
- package/hooks/useDateTimeFormat.ts +4 -4
- package/hooks/{useSsr.ts → useIsSsr.ts} +3 -0
- package/hooks/useLocale.ts +2 -2
- package/hooks/useNumberFormat.ts +4 -3
- package/hooks/useStorefrontConfig.ts +1 -9
- package/hooks/useUrlQuery.ts +6 -4
- package/icons.ts +55 -0
- package/index.ts +11 -2
- package/package.json +14 -14
- package/server.ts +9 -0
- package/utils/cssFlags.tsx +53 -0
- package/utils/getCssFlagInitScript.tsx +20 -0
- package/utils/normalizeLocale.ts +26 -0
- package/utils/robots.ts +41 -0
- package/utils/sitemap.ts +47 -0
- package/utils/storefrontConfig.ts +8 -0
- package/ActionCard/ActionCardListForm.tsx +0 -88
- package/icons/index.ts +0 -48
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Box, Popper } from '@mui/material'
|
|
2
|
+
import { BreadcrumbsList } from './BreadcrumbsList'
|
|
3
|
+
import type { BreadcrumbsType } from './types'
|
|
4
|
+
|
|
5
|
+
export type BreadcrumbsPopperType = BreadcrumbsType & {
|
|
6
|
+
anchorElement: HTMLButtonElement | null
|
|
7
|
+
showDesktopAmount?: number
|
|
8
|
+
showMobileAmount?: number
|
|
9
|
+
onClose: () => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function BreadcrumbsPopper(props: BreadcrumbsPopperType) {
|
|
13
|
+
const { anchorElement, breadcrumbs, showDesktopAmount, showMobileAmount, onClose } = props
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Popper
|
|
17
|
+
anchorEl={anchorElement}
|
|
18
|
+
open={Boolean(anchorElement)}
|
|
19
|
+
disablePortal
|
|
20
|
+
placement='bottom-start'
|
|
21
|
+
modifiers={[
|
|
22
|
+
{ name: 'offset', options: { offset: [0, 10] } },
|
|
23
|
+
{
|
|
24
|
+
name: 'preventOverflow',
|
|
25
|
+
enabled: true,
|
|
26
|
+
options: { altBoundary: false, padding: 10 },
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
sx={(theme) => ({
|
|
30
|
+
maxWidth: {
|
|
31
|
+
md: `calc(100vw - ${theme.spacings.xxl} * 2)`,
|
|
32
|
+
xs: `calc(100vw - ${theme.page.horizontal} * 2)`,
|
|
33
|
+
},
|
|
34
|
+
zIndex: 100,
|
|
35
|
+
})}
|
|
36
|
+
>
|
|
37
|
+
<Box>
|
|
38
|
+
<BreadcrumbsList
|
|
39
|
+
autoFocus={Boolean(anchorElement)}
|
|
40
|
+
breadcrumbs={breadcrumbs}
|
|
41
|
+
showDesktopAmount={showDesktopAmount}
|
|
42
|
+
showMobileAmount={showMobileAmount}
|
|
43
|
+
onClose={onClose}
|
|
44
|
+
/>
|
|
45
|
+
</Box>
|
|
46
|
+
</Popper>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NextRouter } from 'next/router'
|
|
2
|
+
import type { BreadcrumbList } from 'schema-dts'
|
|
3
|
+
import { canonicalize } from '../PageMeta/canonicalize'
|
|
4
|
+
import type { BreadcrumbsType } from './types'
|
|
5
|
+
|
|
6
|
+
export function jsonLdBreadcrumb(
|
|
7
|
+
breadcrumbs: BreadcrumbsType['breadcrumbs'],
|
|
8
|
+
router: NextRouter,
|
|
9
|
+
): BreadcrumbList {
|
|
10
|
+
return {
|
|
11
|
+
'@type': 'BreadcrumbList',
|
|
12
|
+
itemListElement: breadcrumbs.map(({ name, href }, index) => ({
|
|
13
|
+
'@type': 'ListItem',
|
|
14
|
+
position: index + 1,
|
|
15
|
+
name,
|
|
16
|
+
item: canonicalize(router, href),
|
|
17
|
+
})),
|
|
18
|
+
}
|
|
19
|
+
}
|