@sps-woodland/page-title 8.17.0 → 8.17.2
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 +3 -3
- package/lib/index.es.js +23 -23
- package/lib/style.css +1 -1
- package/package.json +5 -5
- package/vite.config.mjs +11 -2
package/lib/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),e=require("@sps-woodland/core"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),e=require("@sps-woodland/core"),c=require("@spscommerce/utils");function p(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,l.get?l:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const n=p(d);var u="pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb0",g="pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb2",m="pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb1";function r({children:t,className:o,...a}){const[[l],i]=e.selectChildren(t,[{type:e.Icon}]),_=l?e.addClassName(l,g):"";return n.createElement("div",{className:e.cl(u,o),...a},_,n.createElement("div",{className:m},i))}e.Metadata.set(r,{name:"Page Title"});var b="pkg_sps-woodland_page-title__version_8_17_2__hash_30pzwb0",P="pkg_sps-woodland_page-title__version_8_17_2__hash_30pzwb1";function s({children:t,className:o,...a}){const l=e.modChildren(t,i=>i.type===e.Icon?[{className:e.cl(i.props.className,P)}]:[]);return n.createElement("div",{className:e.cl(b,o),...a},l)}e.Metadata.set(s,{name:"Page Subtitle"});const v={components:[r,s],examples:{basic:{label:"Basic",examples:{basic:{react:c.code`
|
|
2
2
|
import { PageTitle } from "@sps-woodland/page-title";
|
|
3
3
|
|
|
4
4
|
function Component() {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</PageTitle>
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
`}}},subtitle:{label:"Subtitle",examples:{withSubtitle:{react:
|
|
12
|
+
`}}},subtitle:{label:"Subtitle",examples:{withSubtitle:{react:c.code`
|
|
13
13
|
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
14
14
|
import { Icon } from "@sps-woodland/core";
|
|
15
15
|
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
</PageTitle>
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
|
-
`}}}}},
|
|
28
|
+
`}}}}},T={"Page Title":v};exports.MANIFEST=T;exports.PageSubtitle=s;exports.PageTitle=r;
|
package/lib/index.es.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import { code as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { Metadata as n, selectChildren as m, Icon as _, addClassName as g, cl as l, modChildren as u } from "@sps-woodland/core";
|
|
3
|
+
import { code as r } from "@spscommerce/utils";
|
|
4
|
+
var b = "pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb0", h = "pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb2", P = "pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb1";
|
|
5
|
+
function p({
|
|
6
6
|
children: a,
|
|
7
7
|
className: o,
|
|
8
8
|
...i
|
|
9
9
|
}) {
|
|
10
|
-
const [[e], t] =
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
const [[e], t] = m(a, [{ type: _ }]), d = e ? g(e, h) : "";
|
|
11
|
+
return /* @__PURE__ */ s.createElement("div", { className: l(b, o), ...i }, d, /* @__PURE__ */ s.createElement("div", { className: P }, t));
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
n.set(p, {
|
|
14
14
|
name: "Page Title"
|
|
15
15
|
});
|
|
16
|
-
var
|
|
17
|
-
function
|
|
16
|
+
var v = "pkg_sps-woodland_page-title__version_8_17_2__hash_30pzwb0", T = "pkg_sps-woodland_page-title__version_8_17_2__hash_30pzwb1";
|
|
17
|
+
function c({
|
|
18
18
|
children: a,
|
|
19
19
|
className: o,
|
|
20
20
|
...i
|
|
21
21
|
}) {
|
|
22
|
-
const e =
|
|
23
|
-
className: l(t.props.className,
|
|
22
|
+
const e = u(a, (t) => t.type === _ ? [{
|
|
23
|
+
className: l(t.props.className, T)
|
|
24
24
|
}] : []);
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ s.createElement("div", { className: l(v, o), ...i }, e);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
n.set(c, {
|
|
28
28
|
name: "Page Subtitle"
|
|
29
29
|
});
|
|
30
|
-
const
|
|
31
|
-
components: [
|
|
30
|
+
const w = {
|
|
31
|
+
components: [p, c],
|
|
32
32
|
examples: {
|
|
33
33
|
basic: {
|
|
34
34
|
label: "Basic",
|
|
35
35
|
examples: {
|
|
36
36
|
basic: {
|
|
37
|
-
react:
|
|
37
|
+
react: r`
|
|
38
38
|
import { PageTitle } from "@sps-woodland/page-title";
|
|
39
39
|
|
|
40
40
|
function Component() {
|
|
@@ -53,7 +53,7 @@ const z = {
|
|
|
53
53
|
label: "Subtitle",
|
|
54
54
|
examples: {
|
|
55
55
|
withSubtitle: {
|
|
56
|
-
react:
|
|
56
|
+
react: r`
|
|
57
57
|
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
58
58
|
import { Icon } from "@sps-woodland/core";
|
|
59
59
|
|
|
@@ -74,11 +74,11 @@ const z = {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
},
|
|
78
|
-
"Page Title":
|
|
77
|
+
}, z = {
|
|
78
|
+
"Page Title": w
|
|
79
79
|
};
|
|
80
80
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
z as MANIFEST,
|
|
82
|
+
c as PageSubtitle,
|
|
83
|
+
p as PageTitle
|
|
84
84
|
};
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb0{display:flex;flex-direction:row}.pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb1{color:#1f282c;display:flex;flex-direction:column;font-size:1.5rem;line-height:1.5rem}.pkg_sps-woodland_page-title__version_8_17_2__hash_14vazzb2{align-self:flex-start;font-size:1.125rem;line-height:1.5rem;margin-right:.25rem}.pkg_sps-woodland_page-title__version_8_17_2__hash_30pzwb0{color:#4b5356;font-size:1.125rem;line-height:1.125rem;margin-top:.25rem}.pkg_sps-woodland_page-title__version_8_17_2__hash_30pzwb1{font-size:.75rem;line-height:1.125rem;margin-left:.25rem;margin-right:.25rem}
|
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.17.
|
|
4
|
+
"version": "8.17.2",
|
|
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": "^7.0.0",
|
|
30
30
|
"react": "^16.14.0",
|
|
31
31
|
"react-dom": "^16.14.0",
|
|
32
|
-
"@sps-woodland/core": "8.17.
|
|
33
|
-
"@sps-woodland/tokens": "8.17.
|
|
32
|
+
"@sps-woodland/core": "8.17.2",
|
|
33
|
+
"@sps-woodland/tokens": "8.17.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "^7.0.0",
|
|
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": "8.17.
|
|
41
|
-
"@sps-woodland/tokens": "8.17.
|
|
40
|
+
"@sps-woodland/core": "8.17.2",
|
|
41
|
+
"@sps-woodland/tokens": "8.17.2"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "pnpm run build:js && pnpm run build:types",
|
package/vite.config.mjs
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
|
3
3
|
import { defineConfig } from "vite";
|
|
4
|
-
|
|
4
|
+
import { getVanillaExtractPluginProps } from "../../../scripts/vanilla-extract-plugin-props.mjs";
|
|
5
5
|
import pkg from "./package.json";
|
|
6
6
|
|
|
7
|
+
const packageVersion = process.env.PREDICTED_VERSION || pkg.version;
|
|
8
|
+
|
|
7
9
|
export default defineConfig({
|
|
8
|
-
plugins: [
|
|
10
|
+
plugins: [
|
|
11
|
+
vanillaExtractPlugin(
|
|
12
|
+
getVanillaExtractPluginProps({
|
|
13
|
+
packageName: pkg.name,
|
|
14
|
+
packageVersion,
|
|
15
|
+
})
|
|
16
|
+
),
|
|
17
|
+
],
|
|
9
18
|
build: {
|
|
10
19
|
lib: {
|
|
11
20
|
entry: path.resolve(__dirname, "src/index.ts"),
|