@sps-woodland/page-title 8.50.2 → 8.51.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/README.md +26 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.js +10 -38
- package/lib/index.umd.cjs +3 -3
- package/lib/style.css +1 -1
- package/package.json +6 -7
- package/vite.config.mjs +6 -13
- package/lib/page-subtitle/PageSubtitle.css.d.ts +0 -2
- package/lib/page-subtitle/PageSubtitle.d.ts +0 -3
- package/lib/page-title/PageTitle.css.d.ts +0 -3
- package/lib/page-title/PageTitle.d.ts +0 -3
package/README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
1
|
## [@sps-woodland/page-title](https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/page-title#readme)
|
|
2
2
|
|
|
3
|
-
SPS Woodland Design System page title component
|
|
3
|
+
SPS Woodland Design System page title component.
|
|
4
|
+
|
|
5
|
+
> **Heads up — this is a wrapper package.** The component source now lives in
|
|
6
|
+
> [`@sps-woodland/core`](../react). This package re-exports from the
|
|
7
|
+
> mono-package so existing imports keep working, but new code should prefer the
|
|
8
|
+
> mono-package paths.
|
|
9
|
+
|
|
10
|
+
### Preferred imports (core)
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { PageTitle, PageSubtitle } from "@sps-woodland/core/page-title";
|
|
14
|
+
// or, if you only need the subtitle:
|
|
15
|
+
import { PageSubtitle } from "@sps-woodland/core/page-subtitle";
|
|
16
|
+
|
|
17
|
+
import "@sps-woodland/core/page-title/style.css";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`PageTitle` is barrel-only (the family name and the parent component share a
|
|
21
|
+
name). `PageSubtitle` also has its own flat subpath.
|
|
22
|
+
|
|
23
|
+
### Legacy imports (still supported)
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
27
|
+
import "@sps-woodland/page-title/style.css";
|
|
28
|
+
```
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,40 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { code as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
children: a,
|
|
7
|
-
className: o,
|
|
8
|
-
...i
|
|
9
|
-
}) {
|
|
10
|
-
const [[e], t] = m(a, [{ type: _ }]), d = e ? g(e, P) : "";
|
|
11
|
-
return /* @__PURE__ */ s.createElement("div", { className: l(b, o), ...i }, d, /* @__PURE__ */ s.createElement("div", { className: h }, t));
|
|
12
|
-
}
|
|
13
|
-
n.set(p, {
|
|
14
|
-
name: "Page Title"
|
|
15
|
-
});
|
|
16
|
-
var v = "pkg_sps-woodland_page-title__version_8_50_2__hash_30pzwb0", T = "pkg_sps-woodland_page-title__version_8_50_2__hash_30pzwb1";
|
|
17
|
-
function c({
|
|
18
|
-
children: a,
|
|
19
|
-
className: o,
|
|
20
|
-
...i
|
|
21
|
-
}) {
|
|
22
|
-
const e = u(a, (t) => t.type === _ ? [{
|
|
23
|
-
className: l(t.props.className, T)
|
|
24
|
-
}] : []);
|
|
25
|
-
return /* @__PURE__ */ s.createElement("div", { className: l(v, o), ...i }, e);
|
|
26
|
-
}
|
|
27
|
-
n.set(c, {
|
|
28
|
-
name: "Page Subtitle"
|
|
29
|
-
});
|
|
30
|
-
const w = {
|
|
31
|
-
components: [p, c],
|
|
1
|
+
import { PageTitle as t, PageSubtitle as o } from "@sps-woodland/core/page-title";
|
|
2
|
+
export * from "@sps-woodland/core/page-title";
|
|
3
|
+
import { code as e } from "@spscommerce/utils";
|
|
4
|
+
const a = {
|
|
5
|
+
components: [t, o],
|
|
32
6
|
examples: {
|
|
33
7
|
basic: {
|
|
34
8
|
label: "Basic",
|
|
35
9
|
examples: {
|
|
36
10
|
basic: {
|
|
37
|
-
react:
|
|
11
|
+
react: e`
|
|
38
12
|
import { PageTitle } from "@sps-woodland/page-title";
|
|
39
13
|
|
|
40
14
|
function Component() {
|
|
@@ -53,7 +27,7 @@ const w = {
|
|
|
53
27
|
label: "Subtitle",
|
|
54
28
|
examples: {
|
|
55
29
|
withSubtitle: {
|
|
56
|
-
react:
|
|
30
|
+
react: e`
|
|
57
31
|
import { PageTitle, PageSubtitle } from "@sps-woodland/page-title";
|
|
58
32
|
import { Icon } from "@sps-woodland/core";
|
|
59
33
|
|
|
@@ -74,11 +48,9 @@ const w = {
|
|
|
74
48
|
}
|
|
75
49
|
}
|
|
76
50
|
}
|
|
77
|
-
},
|
|
78
|
-
"Page Title":
|
|
51
|
+
}, l = {
|
|
52
|
+
"Page Title": a
|
|
79
53
|
};
|
|
80
54
|
export {
|
|
81
|
-
|
|
82
|
-
c as PageSubtitle,
|
|
83
|
-
p as PageTitle
|
|
55
|
+
l as MANIFEST
|
|
84
56
|
};
|
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,
|
|
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.pageTitle,e.utils))})(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,7 +9,7 @@
|
|
|
9
9
|
</PageTitle>
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
`}}},subtitle:{label:"Subtitle",examples:{withSubtitle:{react:
|
|
12
|
+
`}}},subtitle:{label:"Subtitle",examples:{withSubtitle:{react:i.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
|
-
`}}}}}};e.MANIFEST=
|
|
28
|
+
`}}}}}};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-
|
|
1
|
+
.pkg_sps-woodland_core__version_8_51_0__hash_6nwwl00{display:flex;flex-direction:row}.pkg_sps-woodland_core__version_8_51_0__hash_6nwwl01{color:#1f282c;display:flex;flex-direction:column;font-size:1.5rem;line-height:1.5rem}.pkg_sps-woodland_core__version_8_51_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__version_8_51_0__hash_14qi3ku0{color:#4b5356;font-size:1.125rem;line-height:1.125rem;margin-top:.25rem}.pkg_sps-woodland_core__version_8_51_0__hash_14qi3ku1{font-size:.75rem;line-height:1.125rem;margin-left:.25rem;margin-right:.25rem;margin-top:.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.
|
|
4
|
+
"version": "8.51.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",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"import": "./lib/index.js",
|
|
18
18
|
"default": "./lib/index.js"
|
|
19
19
|
},
|
|
20
|
+
"./style.css": "./lib/style.css",
|
|
20
21
|
"./lib/style.css": {
|
|
21
22
|
"import": "./lib/style.css",
|
|
22
23
|
"require": "./lib/style.css"
|
|
@@ -29,21 +30,19 @@
|
|
|
29
30
|
"@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
30
31
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
31
32
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
32
|
-
"@sps-woodland/core": "8.
|
|
33
|
-
"@sps-woodland/tokens": "8.50.2"
|
|
33
|
+
"@sps-woodland/core": "8.51.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "9.0.3",
|
|
37
|
-
"@vanilla-extract/css": "1.17.4",
|
|
38
37
|
"react": "16.14.0",
|
|
39
38
|
"react-dom": "16.14.0",
|
|
40
|
-
"@sps-woodland/core": "8.
|
|
41
|
-
"@sps-woodland/tokens": "8.50.2"
|
|
39
|
+
"@sps-woodland/core": "8.51.0"
|
|
42
40
|
},
|
|
43
41
|
"scripts": {
|
|
44
|
-
"build": "pnpm run build:js && pnpm run build:types",
|
|
42
|
+
"build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
|
|
45
43
|
"build:js": "vite build",
|
|
46
44
|
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
|
|
45
|
+
"build:css": "cp ../core/lib/page-title/style.css lib/style.css 2>/dev/null || echo 'page-title style.css not found, skipping'",
|
|
47
46
|
"watch": "vite build --watch",
|
|
48
47
|
"clean": "git clean -fdX",
|
|
49
48
|
"pub": "node ../../../scripts/publish-package.mjs"
|
package/vite.config.mjs
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
|
3
2
|
import { defineConfig } from "vite";
|
|
4
|
-
import { getVanillaExtractPluginProps } from "../../../scripts/vanilla-extract-plugin-props.mjs";
|
|
5
3
|
import pkg from "./package.json";
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
// Page-title is now a wrapper package that re-exports from @sps-woodland/core.
|
|
6
|
+
// No vanilla-extract needed - CSS is provided by the mono-package.
|
|
7
|
+
|
|
8
|
+
const peerDeps = pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [];
|
|
8
9
|
|
|
9
10
|
export default defineConfig({
|
|
10
|
-
plugins: [
|
|
11
|
-
vanillaExtractPlugin(
|
|
12
|
-
getVanillaExtractPluginProps({
|
|
13
|
-
packageName: pkg.name,
|
|
14
|
-
packageVersion,
|
|
15
|
-
})
|
|
16
|
-
),
|
|
17
|
-
],
|
|
18
11
|
build: {
|
|
19
12
|
lib: {
|
|
20
13
|
entry: path.resolve(__dirname, "src/index.ts"),
|
|
21
14
|
name: "PageTitle",
|
|
22
15
|
fileName: "index",
|
|
23
|
-
cssFileName: "style",
|
|
24
16
|
},
|
|
25
17
|
outDir: path.resolve(__dirname, "./lib"),
|
|
26
18
|
emptyOutDir: false,
|
|
27
19
|
rollupOptions: {
|
|
28
|
-
|
|
20
|
+
// External must match subpath imports like @sps-woodland/core/page-title
|
|
21
|
+
external: (id) => peerDeps.some((dep) => id === dep || id.startsWith(dep + "/")),
|
|
29
22
|
},
|
|
30
23
|
},
|
|
31
24
|
});
|