@sps-woodland/page-title 8.55.2 → 8.56.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/lib/index.js +45 -2
- package/lib/index.umd.cjs +28 -2
- package/lib/style.css +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PageTitle as t, PageSubtitle as
|
|
1
|
+
import { PageTitle as t, PageSubtitle as i } from "@sps-woodland/core/page-title";
|
|
2
2
|
export * from "@sps-woodland/core/page-title";
|
|
3
3
|
import { code as e } from "@spscommerce/utils";
|
|
4
4
|
const a = {
|
|
5
|
-
components: [t,
|
|
5
|
+
components: [t, i],
|
|
6
6
|
examples: {
|
|
7
7
|
basic: {
|
|
8
8
|
label: "Basic",
|
|
@@ -23,6 +23,49 @@ const a = {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
element: {
|
|
27
|
+
label: "Heading Level",
|
|
28
|
+
examples: {
|
|
29
|
+
headingLevel: {
|
|
30
|
+
description: "PageTitle renders an h1 by default. Use the as prop to match the heading level to the position of the title in the page outline, or use div for a title that is not a heading.",
|
|
31
|
+
react: e`
|
|
32
|
+
import { PageTitle } from "@sps-woodland/page-title";
|
|
33
|
+
|
|
34
|
+
function Component() {
|
|
35
|
+
return <PageTitle as="h2">Cabela's Purchase Order #123456789012</PageTitle>;
|
|
36
|
+
}
|
|
37
|
+
`
|
|
38
|
+
},
|
|
39
|
+
provider: {
|
|
40
|
+
description: "Wrap a region in HeadingLevelProvider to set the heading level for every PageTitle inside it that has no as prop. An as prop on a PageTitle overrides the provider.",
|
|
41
|
+
react: e`
|
|
42
|
+
import { PageTitle, HeadingLevelProvider } from "@sps-woodland/page-title";
|
|
43
|
+
|
|
44
|
+
function Component() {
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<PageTitle>Cabela's Purchase Order #123456789012</PageTitle>
|
|
48
|
+
<HeadingLevelProvider level={2}>
|
|
49
|
+
<PageTitle>Line Items</PageTitle>
|
|
50
|
+
<PageTitle as="h3">Shipping</PageTitle>
|
|
51
|
+
</HeadingLevelProvider>
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
`
|
|
56
|
+
},
|
|
57
|
+
div: {
|
|
58
|
+
description: 'Use as="div" for a title that is not a heading. The title renders without a heading element.',
|
|
59
|
+
react: e`
|
|
60
|
+
import { PageTitle } from "@sps-woodland/page-title";
|
|
61
|
+
|
|
62
|
+
function Component() {
|
|
63
|
+
return <PageTitle as="div">Cabela's Purchase Order #123456789012</PageTitle>;
|
|
64
|
+
}
|
|
65
|
+
`
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
26
69
|
subtitle: {
|
|
27
70
|
label: "Subtitle",
|
|
28
71
|
examples: {
|
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@sps-woodland/core/page-title"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core/page-title","@spscommerce/utils"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.PageTitle={},e.spsWoodlandCorePageTitle,e.spscommerceUtils))})(this,(function(e,t,i){"use strict";const
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@sps-woodland/core/page-title"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core/page-title","@spscommerce/utils"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.PageTitle={},e.spsWoodlandCorePageTitle,e.spscommerceUtils))})(this,(function(e,t,i){"use strict";const a={"Page Title":{components:[t.PageTitle,t.PageSubtitle],examples:{basic:{label:"Basic",examples:{basic:{react:i.code`
|
|
2
2
|
import { PageTitle } from "@sps-woodland/page-title";
|
|
3
3
|
|
|
4
4
|
function Component() {
|
|
@@ -9,6 +9,32 @@
|
|
|
9
9
|
</PageTitle>
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
+
`}}},element:{label:"Heading Level",examples:{headingLevel:{description:"PageTitle renders an h1 by default. Use the as prop to match the heading level to the position of the title in the page outline, or use div for a title that is not a heading.",react:i.code`
|
|
13
|
+
import { PageTitle } from "@sps-woodland/page-title";
|
|
14
|
+
|
|
15
|
+
function Component() {
|
|
16
|
+
return <PageTitle as="h2">Cabela's Purchase Order #123456789012</PageTitle>;
|
|
17
|
+
}
|
|
18
|
+
`},provider:{description:"Wrap a region in HeadingLevelProvider to set the heading level for every PageTitle inside it that has no as prop. An as prop on a PageTitle overrides the provider.",react:i.code`
|
|
19
|
+
import { PageTitle, HeadingLevelProvider } from "@sps-woodland/page-title";
|
|
20
|
+
|
|
21
|
+
function Component() {
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
<PageTitle>Cabela's Purchase Order #123456789012</PageTitle>
|
|
25
|
+
<HeadingLevelProvider level={2}>
|
|
26
|
+
<PageTitle>Line Items</PageTitle>
|
|
27
|
+
<PageTitle as="h3">Shipping</PageTitle>
|
|
28
|
+
</HeadingLevelProvider>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
`},div:{description:'Use as="div" for a title that is not a heading. The title renders without a heading element.',react:i.code`
|
|
33
|
+
import { PageTitle } from "@sps-woodland/page-title";
|
|
34
|
+
|
|
35
|
+
function Component() {
|
|
36
|
+
return <PageTitle as="div">Cabela's Purchase Order #123456789012</PageTitle>;
|
|
37
|
+
}
|
|
12
38
|
`}}},subtitle:{label:"Subtitle",examples:{withSubtitle:{react:i.code`
|
|
13
39
|
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
14
40
|
import { Icon } from "@sps-woodland/core";
|
|
@@ -25,4 +51,4 @@
|
|
|
25
51
|
</PageTitle>
|
|
26
52
|
);
|
|
27
53
|
}
|
|
28
|
-
`}}}}}};e.MANIFEST=
|
|
54
|
+
`}}}}}};e.MANIFEST=a,Object.keys(t).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:()=>t[o]})}),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-woodland_core__family_page-
|
|
1
|
+
.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku0{color:#4b5356;font-size:1.125rem;line-height:1.125rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku1{font-size:.75rem;line-height:1.125rem;margin-left:.25rem;margin-right:.25rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl00{display:flex;flex-direction:row}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl01{color:#1f282c;display:flex;flex-direction:column;font-size:1.5rem;line-height:1.5rem}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl02{align-self:flex-start;font-size:1.125rem;line-height:1.5rem;margin-right:.25rem;margin-top:.1875rem}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl03{color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/page-title",
|
|
3
3
|
"description": "SPS Woodland Design System page title component",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.56.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/page-title",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
31
31
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
32
32
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
33
|
-
"@sps-woodland/core": "8.
|
|
33
|
+
"@sps-woodland/core": "8.56.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "9.1.1",
|
|
37
37
|
"react": "16.14.0",
|
|
38
38
|
"react-dom": "16.14.0",
|
|
39
|
-
"@sps-woodland/core": "8.
|
|
39
|
+
"@sps-woodland/core": "8.56.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
|