@sps-woodland/key-value-set 8.20.17 → 8.21.1
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.es.js → index.js} +2 -2
- package/lib/{index.cjs.js → index.umd.cjs} +9 -9
- package/lib/style.css +1 -1
- package/package.json +10 -10
- package/vite.config.mjs +2 -2
|
@@ -54,7 +54,7 @@ var b = (t, n, l) => {
|
|
|
54
54
|
for (var [S, f] of t.compoundVariants)
|
|
55
55
|
b(S, a, t.defaultVariants) && (l += " " + f);
|
|
56
56
|
return l;
|
|
57
|
-
}, g = v({ defaultClassName: "pkg_sps-woodland_key-value-
|
|
57
|
+
}, g = v({ defaultClassName: "pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj1", variantClassNames: { inline: { true: "pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
58
58
|
function y({
|
|
59
59
|
children: t,
|
|
60
60
|
className: n,
|
|
@@ -72,7 +72,7 @@ p.set(y, {
|
|
|
72
72
|
inline: { type: "boolean", default: "false" }
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
var I = "pkg_sps-woodland_key-value-
|
|
75
|
+
var I = "pkg_sps-woodland_key-value-set__version_8_21_1__hash_18tyj090";
|
|
76
76
|
function V({
|
|
77
77
|
children: t,
|
|
78
78
|
itemKey: n,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
(function(r,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@sps-woodland/core"),require("react"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core","react","@spscommerce/utils"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.KeyValueSet={},r.core,r.React,r.utils))})(this,function(r,o,V,u){"use strict";function K(t){const n=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(n,a,l.get?l:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const e=K(V);function h(t,n,a){return n in t?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a,t}function p(t,n){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),a.push.apply(a,l)}return a}function y(t){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?p(Object(a),!0).forEach(function(l){h(t,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):p(Object(a)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(a,l))})}return t}var b=(t,n,a)=>{for(var l of Object.keys(t)){var s;if(t[l]!==((s=n[l])!==null&&s!==void 0?s:a[l]))return!1}return!0},E=t=>n=>{var a=t.defaultClassName,l=y(y({},t.defaultVariants),n);for(var s in l){var d,f=(d=l[s])!==null&&d!==void 0?d:t.defaultVariants[s];if(f!=null){var i=f;typeof i=="boolean"&&(i=i===!0?"true":"false");var S=t.variantClassNames[s][i];S&&(a+=" "+S)}}for(var[w,T]of t.compoundVariants)b(w,l,t.defaultVariants)&&(a+=" "+T);return a},v=E({defaultClassName:"pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj1",variantClassNames:{inline:{true:"pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj0"}},defaultVariants:{},compoundVariants:[]});function m({children:t,className:n,inline:a,...l}){return e.createElement("div",{className:o.cl(v({inline:a}),n),...l},t)}o.Metadata.set(m,{name:"KeyValueSet",props:{inline:{type:"boolean",default:"false"}}});var g="pkg_sps-woodland_key-value-set__version_8_21_1__hash_18tyj090";function c({children:t,itemKey:n,...a}){const l=o.useChildTestIdAttrBuilder(a);return e.createElement(e.Fragment,null,e.createElement("span",{className:g,...l("key")},n),e.createElement("span",{...a},t))}o.Metadata.set(c,{name:"KeyValueSetItem",props:{itemKey:{type:"React.ReactNode | (() => React.ReactNode)",required:!0}}});const I={"Key Value Sets":{description:()=>e.createElement("p",null,"Key Value Sets consist of a title and value, or values, paired together visually. They are ideal for displaying details (a value or values) that require additional context (title)."),components:[m,c],examples:{vertical:{label:"Vertical Key Value Sets",description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Use:"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Vertical containers such as a side bar or general card")),e.createElement("h5",null,"Do Not Use:"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"In Table cells or Description Lists")),e.createElement("h5",null,"Usage Rules"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Titles must be written in Title Case"),e.createElement("li",{className:"mb-2"},"Values can be written in Sentence Case or Title Case as best suits the content"),e.createElement("li",{className:"mb-2"},"Titles or Values can include hyperlinks and/or icons",e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Icons should always appear on the left before any text content"))),e.createElement("li",{className:"mb-2"},"Values can include tags"),e.createElement("li",{className:"mb-2"},"Can include multiple values on additional lines"))),examples:{standard:{description:()=>e.createElement("h4",null,"Standard"),react:u.code`
|
|
2
2
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
3
3
|
|
|
4
4
|
function Component() {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</KeyValueSet>
|
|
11
11
|
)
|
|
12
12
|
}
|
|
13
|
-
`},multipleValues:{description:()=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Multiple Values"),e.createElement("p",null,e.createElement("b",null,"Note:")," There is no limit to the number of values that can be listed, but extensive lists should be avoided.")),react:
|
|
13
|
+
`},multipleValues:{description:()=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Multiple Values"),e.createElement("p",null,e.createElement("b",null,"Note:")," There is no limit to the number of values that can be listed, but extensive lists should be avoided.")),react:u.code`
|
|
14
14
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
15
15
|
|
|
16
16
|
function Component() {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</KeyValueSet>
|
|
25
25
|
)
|
|
26
26
|
}
|
|
27
|
-
`},secondaryValues:{description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Secondary Values"),e.createElement("p",null,e.createElement("b",null,"Note:")," When using a secondary value (styled in lighter grey text) the number of values listed should be limited to two (2).")),react:
|
|
27
|
+
`},secondaryValues:{description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Secondary Values"),e.createElement("p",null,e.createElement("b",null,"Note:")," When using a secondary value (styled in lighter grey text) the number of values listed should be limited to two (2).")),react:u.code`
|
|
28
28
|
import { Box } from "@sps-woodland/core";
|
|
29
29
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
30
30
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</KeyValueSet>
|
|
39
39
|
)
|
|
40
40
|
}
|
|
41
|
-
`},tags:{description:({NavigateTo:t})=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Tags"),e.createElement("p",null,e.createElement("b",null,"Note:")," Tags can appear inline or on individual lines as the length of content requires. Reference the ",e.createElement(t,{to:"tags"},"Tag")," component for spacing rules.")),react:
|
|
41
|
+
`},tags:{description:({NavigateTo:t})=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Tags"),e.createElement("p",null,e.createElement("b",null,"Note:")," Tags can appear inline or on individual lines as the length of content requires. Reference the ",e.createElement(t,{to:"tags"},"Tag")," component for spacing rules.")),react:u.code`
|
|
42
42
|
import { SpsTag } from "@spscommerce/ds-react";
|
|
43
43
|
import { Box } from "@sps-woodland/core";
|
|
44
44
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
</KeyValueSet>
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
|
-
`},hyperlinksAndIcons:{description:()=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Hyperlinks & Icons"),e.createElement("p",null,e.createElement("b",null,"Note:")," Icons and Hyperlinks can be used independently of one another.")),react:
|
|
58
|
+
`},hyperlinksAndIcons:{description:()=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Hyperlinks & Icons"),e.createElement("p",null,e.createElement("b",null,"Note:")," Icons and Hyperlinks can be used independently of one another.")),react:u.code`
|
|
59
59
|
import { Box } from "@sps-woodland/core";
|
|
60
60
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
</KeyValueSet>
|
|
70
70
|
)
|
|
71
71
|
}
|
|
72
|
-
`}}},horizontal:{label:"Horizontal Key Value Sets",description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Use:"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Horizontal containers such as a content row")),e.createElement("h5",null,"Do Not Use:"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"In Table cells or Description Lists")),e.createElement("h5",null,"Usage Rules"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Titles must be written in Title Case"),e.createElement("li",{className:"mb-2"},"Values can be written in Sentence Case or Title Case as best suits the content"),e.createElement("li",{className:"mb-2"},"Titles or Values can include hyperlinks and/or icons",e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Icons should always appear on the left before any text content"))),e.createElement("li",{className:"mb-2"},"Can be used individually or stacked on top of one another",e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"When stacking, the value lists should share a common category or theme"))))),examples:{standard:{description:()=>e.createElement("h4",null,"Standard"),react:
|
|
72
|
+
`}}},horizontal:{label:"Horizontal Key Value Sets",description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Use:"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Horizontal containers such as a content row")),e.createElement("h5",null,"Do Not Use:"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"In Table cells or Description Lists")),e.createElement("h5",null,"Usage Rules"),e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Titles must be written in Title Case"),e.createElement("li",{className:"mb-2"},"Values can be written in Sentence Case or Title Case as best suits the content"),e.createElement("li",{className:"mb-2"},"Titles or Values can include hyperlinks and/or icons",e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"Icons should always appear on the left before any text content"))),e.createElement("li",{className:"mb-2"},"Can be used individually or stacked on top of one another",e.createElement("ul",null,e.createElement("li",{className:"mb-2"},"When stacking, the value lists should share a common category or theme"))))),examples:{standard:{description:()=>e.createElement("h4",null,"Standard"),react:u.code`
|
|
73
73
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
74
74
|
|
|
75
75
|
function Component() {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
</KeyValueSet>
|
|
82
82
|
)
|
|
83
83
|
}
|
|
84
|
-
`},stacked:{description:()=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Stacked"),e.createElement("p",null,e.createElement("b",null,"Note:")," There is no limit to the number of stacked listings, but more than three in a single container should be avoided."),e.createElement("p",null,e.createElement("b",null,"Note:")," Titles are right-aligned in the horizontal Key Value Sets to optimize scanability of the values.")),react:
|
|
84
|
+
`},stacked:{description:()=>e.createElement(e.Fragment,null,e.createElement("h4",null,"Stacked"),e.createElement("p",null,e.createElement("b",null,"Note:")," There is no limit to the number of stacked listings, but more than three in a single container should be avoided."),e.createElement("p",null,e.createElement("b",null,"Note:")," Titles are right-aligned in the horizontal Key Value Sets to optimize scanability of the values.")),react:u.code`
|
|
85
85
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
86
86
|
|
|
87
87
|
function Component() {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
)
|
|
105
105
|
}
|
|
106
|
-
`},withLinks:{description:()=>e.createElement("h4",null,"With Links"),react:
|
|
106
|
+
`},withLinks:{description:()=>e.createElement("h4",null,"With Links"),react:u.code`
|
|
107
107
|
import { KeyValueSet, KeyValueSetItem } from "@sps-woodland/key-value-set";
|
|
108
108
|
|
|
109
109
|
function Component() {
|
|
@@ -125,4 +125,4 @@
|
|
|
125
125
|
</div>
|
|
126
126
|
)
|
|
127
127
|
}
|
|
128
|
-
`}}}}}
|
|
128
|
+
`}}}}}};r.KeyValueSet=m,r.KeyValueSetItem=c,r.MANIFEST=I,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-woodland_key-value-
|
|
1
|
+
.pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj0{grid-template-columns:auto auto}.pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj1{column-gap:.5rem;display:inline-grid;font-size:.75rem;line-height:1.125rem}.pkg_sps-woodland_key-value-set__version_8_21_1__hash_18tyj090{font-weight:600}.pkg_sps-woodland_key-value-set__version_8_21_1__hash_1i7enhj0 .pkg_sps-woodland_key-value-set__version_8_21_1__hash_18tyj090{text-align:right}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/key-value-set",
|
|
3
3
|
"description": "SPS Woodland Design System key value set component",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.21.1",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/key-value-set",
|
|
8
8
|
"homepage": "https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/key-value-set#readme",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"module": "./lib/index.
|
|
11
|
-
"main": "./lib/index.cjs
|
|
10
|
+
"module": "./lib/index.js",
|
|
11
|
+
"main": "./lib/index.umd.cjs",
|
|
12
12
|
"types": "./lib/index.d.ts",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"default": "./lib/index.
|
|
15
|
+
"require": "./lib/index.umd.cjs",
|
|
16
|
+
"import": "./lib/index.js",
|
|
17
|
+
"default": "./lib/index.js",
|
|
18
18
|
"types": "./lib/index.d.ts"
|
|
19
19
|
},
|
|
20
20
|
"./lib/style.css": {
|
|
@@ -29,8 +29,8 @@
|
|
|
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.
|
|
33
|
-
"@sps-woodland/tokens": "8.
|
|
32
|
+
"@sps-woodland/core": "8.21.1",
|
|
33
|
+
"@sps-woodland/tokens": "8.21.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "^7.0.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@vanilla-extract/recipes": "^0.2.5",
|
|
39
39
|
"react": "^16.14.0",
|
|
40
40
|
"react-dom": "^16.14.0",
|
|
41
|
-
"@sps-woodland/core": "8.
|
|
42
|
-
"@sps-woodland/tokens": "8.
|
|
41
|
+
"@sps-woodland/core": "8.21.1",
|
|
42
|
+
"@sps-woodland/tokens": "8.21.1"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "pnpm run build:js && pnpm run build:types",
|
package/vite.config.mjs
CHANGED
|
@@ -18,8 +18,8 @@ export default defineConfig({
|
|
|
18
18
|
build: {
|
|
19
19
|
lib: {
|
|
20
20
|
entry: path.resolve(__dirname, "src/index.ts"),
|
|
21
|
-
|
|
22
|
-
fileName:
|
|
21
|
+
name: "KeyValueSet",
|
|
22
|
+
fileName: "index",
|
|
23
23
|
},
|
|
24
24
|
outDir: path.resolve(__dirname, "./lib"),
|
|
25
25
|
emptyOutDir: false,
|