@sps-woodland/action-bar 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 CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),S=require("@sps-woodland/buttons"),a=require("@sps-woodland/core"),h=require("@sps-woodland/tags"),i=require("@spscommerce/utils");function f(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,c.get?c:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const e=f(p);var A="_9yu2s95",b="_9yu2s97",g="_9yu2s96",x="_9yu2s91",C="_9yu2s92",w="_9yu2s93",y="_9yu2s94",v="_9yu2s90";function s({className:t,children:o,...n}){return e.createElement(a.Box,{className:a.cl(b,t),...n},o)}a.Metadata.set(s,{name:"ActionBarAdditionalContent",props:{}});function r({className:t,children:o,clearSelected:n,itemsSelected:c,itemsSelectedLabel:d,...m}){const{t:l}=e.useContext(a.I18nContext),[u,B]=a.selectChildren(o,[{type:s}]);return Number(c)>0?e.createElement("div",{className:a.cl(v,t),...m},e.createElement("div",{className:x},u,e.createElement("div",{className:C},e.createElement("div",{className:w},e.createElement(h.Tag,{kind:"info",className:y},c),d??l("design-system:listActionBar.itemsSelected")),e.createElement("div",{className:A},B),e.createElement("div",{className:g},e.createElement(S.Button,{kind:"link",icon:"x",onPress:n},l("design-system:listActionBar.clearSelected")))))):e.createElement(e.Fragment,null)}a.Metadata.set(r,{name:"ActionBar",props:{clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"number | string",required:!0},itemsSelectedLabel:{type:"string",required:!1}}});const E={components:[r,s],description:()=>e.createElement("p",null,"The Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),examples:{general:{label:"General Usage",description:""},actionBar:{label:"Action Bar",description:"This example makes use of the Text Buttons + Icon Buttons + Basic Buttons Group.",examples:{basic:{react:i.code`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),B=require("@sps-woodland/buttons"),a=require("@sps-woodland/core"),h=require("@sps-woodland/tags"),c=require("@spscommerce/utils");function S(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const e=S(_);var b="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s95",f="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s97",A="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s96",g="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s91",w="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s92",v="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s93",k="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s94",x="pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s90";function i({className:t,children:o,...n}){return e.createElement(a.Box,{className:a.cl(f,t),...n},o)}a.Metadata.set(i,{name:"ActionBarAdditionalContent",props:{}});function r({className:t,children:o,clearSelected:n,itemsSelected:s,itemsSelectedLabel:d,...m}){const{t:l}=e.useContext(a.I18nContext),[u,p]=a.selectChildren(o,[{type:i}]);return Number(s)>0?e.createElement("div",{className:a.cl(x,t),...m},e.createElement("div",{className:g},u,e.createElement("div",{className:w},e.createElement("div",{className:v},e.createElement(h.Tag,{kind:"info",className:k},s),d??l("design-system:listActionBar.itemsSelected")),e.createElement("div",{className:b},p),e.createElement("div",{className:A},e.createElement(B.Button,{kind:"link",icon:"x",onPress:n},l("design-system:listActionBar.clearSelected")))))):e.createElement(e.Fragment,null)}a.Metadata.set(r,{name:"ActionBar",props:{clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"number | string",required:!0},itemsSelectedLabel:{type:"string",required:!1}}});const C={components:[r,i],description:()=>e.createElement("p",null,"The Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),examples:{general:{label:"General Usage",description:""},actionBar:{label:"Action Bar",description:"This example makes use of the Text Buttons + Icon Buttons + Basic Buttons Group.",examples:{basic:{react:c.code`
2
2
  import { ActionBar } from "@sps-woodland/action-bar";
3
3
  import { Button } from "@sps-woodland/buttons";
4
4
  import { Vr } from "@sps-woodland/core";
@@ -44,7 +44,7 @@
44
44
  </ActionBar>
45
45
  </>
46
46
  }
47
- `}}},customLabel:{label:'Custom "Items Selected" Label',description:"If needed, the text that appears next to the Tag indicating the number of items that have been selected can be customized.",examples:{basic:{react:i.code`
47
+ `}}},customLabel:{label:'Custom "Items Selected" Label',description:"If needed, the text that appears next to the Tag indicating the number of items that have been selected can be customized.",examples:{basic:{react:c.code`
48
48
  import { ActionBar } from "@sps-woodland/action-bar";
49
49
  import { Button } from "@sps-woodland/buttons";
50
50
 
@@ -83,7 +83,7 @@
83
83
  </ActionBar>
84
84
  </>
85
85
  }
86
- `}}},addlContent:{label:"Additional Content",description:"An Action Bar may contain additional content that is not part of the action buttons group, which is displayed above the main content.",examples:{basic:{react:i.code`
86
+ `}}},addlContent:{label:"Additional Content",description:"An Action Bar may contain additional content that is not part of the action buttons group, which is displayed above the main content.",examples:{basic:{react:c.code`
87
87
  import { ActionBar, ActionBarAdditionalContent } from "@sps-woodland/action-bar";
88
88
  import { Button } from "@sps-woodland/buttons";
89
89
  import { Card } from "@sps-woodland/cards";
@@ -116,4 +116,4 @@
116
116
  </ActionBar>
117
117
  </>
118
118
  }
119
- `}}}}},I={"Action Bar":E};exports.ActionBar=r;exports.ActionBarAdditionalContent=s;exports.MANIFEST=I;
119
+ `}}}}},y={"Action Bar":C};exports.ActionBar=r;exports.ActionBarAdditionalContent=i;exports.MANIFEST=y;
package/lib/index.es.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import * as e from "react";
2
- import { Button as h } from "@sps-woodland/buttons";
3
- import { Metadata as r, Box as S, cl as l, I18nContext as A, selectChildren as f } from "@sps-woodland/core";
4
- import { Tag as b } from "@sps-woodland/tags";
2
+ import { Button as B } from "@sps-woodland/buttons";
3
+ import { Metadata as r, Box as h, cl as l, I18nContext as S, selectChildren as b } from "@sps-woodland/core";
4
+ import { Tag as A } from "@sps-woodland/tags";
5
5
  import { code as a } from "@spscommerce/utils";
6
- var x = "_9yu2s95", C = "_9yu2s97", w = "_9yu2s96", E = "_9yu2s91", v = "_9yu2s92", I = "_9yu2s93", k = "_9yu2s94", y = "_9yu2s90";
6
+ var f = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s95", w = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s97", v = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s96", k = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s91", x = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s92", g = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s93", C = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s94", E = "pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s90";
7
7
  function s({
8
8
  className: t,
9
9
  children: n,
10
10
  ...o
11
11
  }) {
12
12
  return /* @__PURE__ */ e.createElement(
13
- S,
13
+ h,
14
14
  {
15
- className: l(C, t),
15
+ className: l(w, t),
16
16
  ...o
17
17
  },
18
18
  n
@@ -30,16 +30,16 @@ function d({
30
30
  itemsSelectedLabel: m,
31
31
  ...u
32
32
  }) {
33
- const { t: c } = e.useContext(A), [B, p] = f(n, [
33
+ const { t: c } = e.useContext(S), [p, _] = b(n, [
34
34
  { type: s }
35
35
  ]);
36
36
  return Number(i) > 0 ? /* @__PURE__ */ e.createElement(
37
37
  "div",
38
38
  {
39
- className: l(y, t),
39
+ className: l(E, t),
40
40
  ...u
41
41
  },
42
- /* @__PURE__ */ e.createElement("div", { className: E }, B, /* @__PURE__ */ e.createElement("div", { className: v }, /* @__PURE__ */ e.createElement("div", { className: I }, /* @__PURE__ */ e.createElement(b, { kind: "info", className: k }, i), m ?? c("design-system:listActionBar.itemsSelected")), /* @__PURE__ */ e.createElement("div", { className: x }, p), /* @__PURE__ */ e.createElement("div", { className: w }, /* @__PURE__ */ e.createElement(h, { kind: "link", icon: "x", onPress: o }, c("design-system:listActionBar.clearSelected")))))
42
+ /* @__PURE__ */ e.createElement("div", { className: k }, p, /* @__PURE__ */ e.createElement("div", { className: x }, /* @__PURE__ */ e.createElement("div", { className: g }, /* @__PURE__ */ e.createElement(A, { kind: "info", className: C }, i), m ?? c("design-system:listActionBar.itemsSelected")), /* @__PURE__ */ e.createElement("div", { className: f }, _), /* @__PURE__ */ e.createElement("div", { className: v }, /* @__PURE__ */ e.createElement(B, { kind: "link", icon: "x", onPress: o }, c("design-system:listActionBar.clearSelected")))))
43
43
  ) : /* @__PURE__ */ e.createElement(e.Fragment, null);
44
44
  }
45
45
  r.set(d, {
@@ -59,7 +59,7 @@ r.set(d, {
59
59
  }
60
60
  }
61
61
  });
62
- const g = {
62
+ const I = {
63
63
  components: [d, s],
64
64
  description: () => /* @__PURE__ */ e.createElement("p", null, "The Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),
65
65
  examples: {
@@ -215,7 +215,7 @@ const g = {
215
215
  }
216
216
  }
217
217
  }, R = {
218
- "Action Bar": g
218
+ "Action Bar": I
219
219
  };
220
220
  export {
221
221
  d as ActionBar,
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- ._9yu2s90{background-color:#fff;display:flex;bottom:0;position:fixed;justify-content:center;left:0;right:0;padding:.5rem;box-shadow:0 0 .25rem .25rem #1f282c1a;z-index:99}._9yu2s91{display:flex;flex-direction:column;max-width:1280px;padding-left:1.25rem;padding-right:1.25rem;width:100%}._9yu2s92{height:2rem;display:flex;align-items:center;width:100%}._9yu2s93{flex:1}._9yu2s94{margin-right:.25rem}._9yu2s95{display:flex;flex:2;align-items:center;justify-content:center}._9yu2s96{flex:1;text-align:right}._9yu2s97{margin-bottom:.5rem}
1
+ .pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s90{background-color:#fff;display:flex;bottom:0;position:fixed;justify-content:center;left:0;right:0;padding:.5rem;box-shadow:0 0 .25rem .25rem #1f282c1a;z-index:99}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s91{display:flex;flex-direction:column;max-width:1280px;padding-left:1.25rem;padding-right:1.25rem;width:100%}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s92{height:2rem;display:flex;align-items:center;width:100%}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s93{flex:1}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s94{margin-right:.25rem}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s95{display:flex;flex:2;align-items:center;justify-content:center}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s96{flex:1;text-align:right}.pkg_sps-woodland_action-bar__version_8_17_2__hash_9yu2s97{margin-bottom:.5rem}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sps-woodland/action-bar",
3
3
  "description": "SPS Woodland Design System Action Bar component",
4
- "version": "8.17.0",
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/action-bar",
@@ -29,10 +29,10 @@
29
29
  "@spscommerce/utils": "^7.0.0",
30
30
  "react": "^16.14.0",
31
31
  "react-dom": "^16.14.0",
32
- "@sps-woodland/buttons": "8.17.0",
33
- "@sps-woodland/core": "8.17.0",
34
- "@sps-woodland/tags": "8.17.0",
35
- "@sps-woodland/tokens": "8.17.0"
32
+ "@sps-woodland/buttons": "8.17.2",
33
+ "@sps-woodland/core": "8.17.2",
34
+ "@sps-woodland/tags": "8.17.2",
35
+ "@sps-woodland/tokens": "8.17.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@spscommerce/utils": "^7.0.0",
@@ -40,10 +40,10 @@
40
40
  "@vanilla-extract/recipes": "^0.2.5",
41
41
  "react": "^16.14.0",
42
42
  "react-dom": "^16.14.0",
43
- "@sps-woodland/buttons": "8.17.0",
44
- "@sps-woodland/core": "8.17.0",
45
- "@sps-woodland/tags": "8.17.0",
46
- "@sps-woodland/tokens": "8.17.0"
43
+ "@sps-woodland/buttons": "8.17.2",
44
+ "@sps-woodland/core": "8.17.2",
45
+ "@sps-woodland/tags": "8.17.2",
46
+ "@sps-woodland/tokens": "8.17.2"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "pnpm run build:js && pnpm run build:types",
package/vite.config.mjs CHANGED
@@ -1,11 +1,22 @@
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
+
9
+ console.log({ packageVersion });
10
+
7
11
  export default defineConfig({
8
- plugins: [vanillaExtractPlugin()],
12
+ plugins: [
13
+ vanillaExtractPlugin(
14
+ getVanillaExtractPluginProps({
15
+ packageName: pkg.name,
16
+ packageVersion,
17
+ })
18
+ ),
19
+ ],
9
20
  build: {
10
21
  lib: {
11
22
  entry: path.resolve(__dirname, "src/index.ts"),