@sps-woodland/page-title 7.16.8 → 7.17.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.cjs.js +4 -30
- package/lib/index.es.js +27 -69
- package/package.json +5 -5
package/lib/index.cjs.js
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react"),t=require("@sps-woodland/core"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react"),t=require("@sps-woodland/core"),s=require("@spscommerce/utils");function m(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return o.default=e,Object.freeze(o)}const i=m(d);var g="_14vazzb0",p="_14vazzb2",b="_14vazzb1";function n({children:e,className:o,...a}){const[[l],r]=t.selectChildren(e,[{type:t.Icon}]),u=l?t.addClassName(l,p):"";return i.createElement("div",{className:t.cl(g,o),...a},u,i.createElement("div",{className:b},r))}t.Metadata.set(n,{name:"Page Title"});var P="_30pzwb0",T="_30pzwb1";function c({children:e,className:o,...a}){const l=t.modChildren(e,r=>r.type===t.Icon?[{className:t.cl(r.props.className,T)}]:[]);return i.createElement("div",{className:t.cl(P,o),...a},l)}t.Metadata.set(c,{name:"Page Subtitle"});const _={components:[n,c],examples:{basic:{label:"Basic",examples:{basic:{react:s.code`
|
|
2
2
|
import { PageTitle } from "@sps-woodland/page-title";
|
|
3
3
|
|
|
4
|
-
function Component() {
|
|
5
|
-
return (
|
|
6
|
-
<PageTitle>
|
|
7
|
-
Cabela's Purchase Order #123456789012
|
|
8
|
-
</PageTitle>
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
`}}},withIcon:{label:"With Icon",examples:{withIcon:{react:r.code`
|
|
12
|
-
import { PageTitle } from "@sps-woodland/page-title";
|
|
13
|
-
import { Icon } from "@sps-woodland/core";
|
|
14
|
-
|
|
15
4
|
function Component() {
|
|
16
5
|
return (
|
|
17
6
|
<PageTitle>
|
|
@@ -20,22 +9,7 @@
|
|
|
20
9
|
</PageTitle>
|
|
21
10
|
);
|
|
22
11
|
}
|
|
23
|
-
`}}},
|
|
24
|
-
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
25
|
-
import { Icon } from "@sps-woodland/core";
|
|
26
|
-
|
|
27
|
-
function Component() {
|
|
28
|
-
return (
|
|
29
|
-
<PageTitle>
|
|
30
|
-
Cabela's Purchase Order #123456789012
|
|
31
|
-
<PageSubtitle>Cabela's
|
|
32
|
-
<Icon icon="outgoing" />
|
|
33
|
-
MacNeil Automotive Parts
|
|
34
|
-
</PageSubtitle>
|
|
35
|
-
</PageTitle>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
`}}},withSubtitleAndIcon:{label:"With Subtitle And Icon",examples:{withSubtitleAndIcon:{react:r.code`
|
|
12
|
+
`}}},subtitle:{label:"Subtitle",examples:{withSubtitle:{react:s.code`
|
|
39
13
|
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
40
14
|
import { Icon } from "@sps-woodland/core";
|
|
41
15
|
|
|
@@ -45,10 +19,10 @@
|
|
|
45
19
|
<Icon aria-hidden="true" icon="status-error" color="red-medium" size="lg"/>
|
|
46
20
|
Cabela's Purchase Order #123456789012
|
|
47
21
|
<PageSubtitle>
|
|
48
|
-
Cabela's <Icon aria-hidden="true" icon="outgoing" />
|
|
49
22
|
MacNeil Automotive Parts
|
|
23
|
+
<Icon icon="outgoing" />
|
|
50
24
|
</PageSubtitle>
|
|
51
25
|
</PageTitle>
|
|
52
26
|
);
|
|
53
27
|
}
|
|
54
|
-
`}}}}},f={"Page Title":
|
|
28
|
+
`}}}}},f={"Page Title":_};exports.MANIFEST=f;exports.PageSubtitle=c;exports.PageTitle=n;
|
package/lib/index.es.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import { code as
|
|
4
|
-
var P = "_14vazzb0", T = "_14vazzb2",
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { Metadata as n, selectChildren as u, Icon as c, addClassName as g, cl as r, modChildren as b } from "@sps-woodland/core";
|
|
3
|
+
import { code as s } from "@spscommerce/utils";
|
|
4
|
+
var P = "_14vazzb0", T = "_14vazzb2", v = "_14vazzb1";
|
|
5
5
|
function m({
|
|
6
|
-
children:
|
|
7
|
-
className:
|
|
6
|
+
children: a,
|
|
7
|
+
className: o,
|
|
8
8
|
...l
|
|
9
9
|
}) {
|
|
10
|
-
const [[e], t] = u(
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
className: r(P,
|
|
10
|
+
const [[e], t] = u(a, [{ type: c }]), p = e ? g(e, T) : "";
|
|
11
|
+
return /* @__PURE__ */ i.createElement("div", {
|
|
12
|
+
className: r(P, o),
|
|
13
13
|
...l
|
|
14
|
-
}, p, /* @__PURE__ */
|
|
15
|
-
className:
|
|
14
|
+
}, p, /* @__PURE__ */ i.createElement("div", {
|
|
15
|
+
className: v
|
|
16
16
|
}, t));
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
n.set(m, {
|
|
19
19
|
name: "Page Title"
|
|
20
20
|
});
|
|
21
|
-
var
|
|
21
|
+
var S = "_30pzwb0", _ = "_30pzwb1";
|
|
22
22
|
function d({
|
|
23
|
-
children:
|
|
24
|
-
className:
|
|
23
|
+
children: a,
|
|
24
|
+
className: o,
|
|
25
25
|
...l
|
|
26
26
|
}) {
|
|
27
|
-
const e = b(
|
|
28
|
-
className: r(t.props.className,
|
|
27
|
+
const e = b(a, (t) => t.type === c ? [{
|
|
28
|
+
className: r(t.props.className, _)
|
|
29
29
|
}] : []);
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
className: r(
|
|
30
|
+
return /* @__PURE__ */ i.createElement("div", {
|
|
31
|
+
className: r(S, o),
|
|
32
32
|
...l
|
|
33
33
|
}, e);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
n.set(d, {
|
|
36
36
|
name: "Page Subtitle"
|
|
37
37
|
});
|
|
38
38
|
const f = {
|
|
@@ -42,28 +42,9 @@ const f = {
|
|
|
42
42
|
label: "Basic",
|
|
43
43
|
examples: {
|
|
44
44
|
basic: {
|
|
45
|
-
react:
|
|
45
|
+
react: s`
|
|
46
46
|
import { PageTitle } from "@sps-woodland/page-title";
|
|
47
47
|
|
|
48
|
-
function Component() {
|
|
49
|
-
return (
|
|
50
|
-
<PageTitle>
|
|
51
|
-
Cabela's Purchase Order #123456789012
|
|
52
|
-
</PageTitle>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
`
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
withIcon: {
|
|
60
|
-
label: "With Icon",
|
|
61
|
-
examples: {
|
|
62
|
-
withIcon: {
|
|
63
|
-
react: a`
|
|
64
|
-
import { PageTitle } from "@sps-woodland/page-title";
|
|
65
|
-
import { Icon } from "@sps-woodland/core";
|
|
66
|
-
|
|
67
48
|
function Component() {
|
|
68
49
|
return (
|
|
69
50
|
<PageTitle>
|
|
@@ -76,34 +57,11 @@ const f = {
|
|
|
76
57
|
}
|
|
77
58
|
}
|
|
78
59
|
},
|
|
79
|
-
|
|
80
|
-
label: "
|
|
60
|
+
subtitle: {
|
|
61
|
+
label: "Subtitle",
|
|
81
62
|
examples: {
|
|
82
63
|
withSubtitle: {
|
|
83
|
-
react:
|
|
84
|
-
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
85
|
-
import { Icon } from "@sps-woodland/core";
|
|
86
|
-
|
|
87
|
-
function Component() {
|
|
88
|
-
return (
|
|
89
|
-
<PageTitle>
|
|
90
|
-
Cabela's Purchase Order #123456789012
|
|
91
|
-
<PageSubtitle>Cabela's
|
|
92
|
-
<Icon icon="outgoing" />
|
|
93
|
-
MacNeil Automotive Parts
|
|
94
|
-
</PageSubtitle>
|
|
95
|
-
</PageTitle>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
`
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
withSubtitleAndIcon: {
|
|
103
|
-
label: "With Subtitle And Icon",
|
|
104
|
-
examples: {
|
|
105
|
-
withSubtitleAndIcon: {
|
|
106
|
-
react: a`
|
|
64
|
+
react: s`
|
|
107
65
|
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
108
66
|
import { Icon } from "@sps-woodland/core";
|
|
109
67
|
|
|
@@ -113,8 +71,8 @@ const f = {
|
|
|
113
71
|
<Icon aria-hidden="true" icon="status-error" color="red-medium" size="lg"/>
|
|
114
72
|
Cabela's Purchase Order #123456789012
|
|
115
73
|
<PageSubtitle>
|
|
116
|
-
Cabela's <Icon aria-hidden="true" icon="outgoing" />
|
|
117
74
|
MacNeil Automotive Parts
|
|
75
|
+
<Icon icon="outgoing" />
|
|
118
76
|
</PageSubtitle>
|
|
119
77
|
</PageTitle>
|
|
120
78
|
);
|
|
@@ -124,11 +82,11 @@ const f = {
|
|
|
124
82
|
}
|
|
125
83
|
}
|
|
126
84
|
}
|
|
127
|
-
},
|
|
85
|
+
}, I = {
|
|
128
86
|
"Page Title": f
|
|
129
87
|
};
|
|
130
88
|
export {
|
|
131
|
-
|
|
89
|
+
I as MANIFEST,
|
|
132
90
|
d as PageSubtitle,
|
|
133
91
|
m as PageTitle
|
|
134
92
|
};
|
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": "7.
|
|
4
|
+
"version": "7.17.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",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"@spscommerce/utils": "^6.12.1",
|
|
30
30
|
"react": "^16.14.0",
|
|
31
31
|
"react-dom": "^16.14.0",
|
|
32
|
-
"@sps-woodland/core": "7.
|
|
33
|
-
"@sps-woodland/tokens": "7.
|
|
32
|
+
"@sps-woodland/core": "7.17.0",
|
|
33
|
+
"@sps-woodland/tokens": "7.17.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "^6.12.1",
|
|
37
37
|
"@vanilla-extract/css": "^1.9.3",
|
|
38
38
|
"react": "^16.14.0",
|
|
39
39
|
"react-dom": "^16.14.0",
|
|
40
|
-
"@sps-woodland/core": "7.
|
|
41
|
-
"@sps-woodland/tokens": "7.
|
|
40
|
+
"@sps-woodland/core": "7.17.0",
|
|
41
|
+
"@sps-woodland/tokens": "7.17.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "pnpm run build:js && pnpm run build:types",
|