@sps-woodland/action-bar 8.7.4 → 8.7.5

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.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const B=require("react"),S=require("@sps-woodland/buttons"),a=require("@sps-woodland/core"),h=require("@sps-woodland/tags"),r=require("@spscommerce/utils");function A(t){if(t&&t.__esModule)return 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=A(B);var f="_9yu2s95",b="_9yu2s97",w="_9yu2s96",g="_9yu2s91",v="_9yu2s92",x="_9yu2s93",C="_9yu2s94",y="_9yu2s90";function c({className:t,children:o,...n}){return e.createElement(a.Box,{className:a.cl(b,t),...n},o)}a.Metadata.set(c,{name:"ActionBarAdditionalContent",props:{}});function l({className:t,children:o,clearSelected:n,itemsSelected:s,itemsSelectedLabel:i,...m}){const{t:d}=e.useContext(a.I18nContext),[u,p]=a.selectChildren(o,[{type:c}]);return Number(s)>0?e.createElement("div",{className:a.cl(y,t),...m},e.createElement("div",{className:g},u,e.createElement("div",{className:v},e.createElement("div",{className:x},e.createElement(h.Tag,{kind:"info",className:C},s),i!=null?i:d("design-system:listActionBar.itemsSelected")),e.createElement("div",{className:f},p),e.createElement("div",{className:w},e.createElement(S.Button,{kind:"link",icon:"x",onPress:n},d("design-system:listActionBar.clearSelected")))))):e.createElement(e.Fragment,null)}a.Metadata.set(l,{name:"ActionBar",props:{clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"number | string",required:!0},itemsSelectedLabel:{type:"string",required:!1}}});const E={components:[l,c],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:r.code`
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`
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:r.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:i.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:r.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:i.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=l;exports.ActionBarAdditionalContent=c;exports.MANIFEST=I;
119
+ `}}}}},I={"Action Bar":E};exports.ActionBar=r;exports.ActionBarAdditionalContent=s;exports.MANIFEST=I;
package/lib/index.es.js CHANGED
@@ -1,48 +1,48 @@
1
- import * as t from "react";
1
+ import * as e from "react";
2
2
  import { Button as h } from "@sps-woodland/buttons";
3
- import { Metadata as l, Box as S, cl as d, I18nContext as A, selectChildren as f } from "@sps-woodland/core";
3
+ import { Metadata as r, Box as S, cl as l, I18nContext as A, selectChildren as f } from "@sps-woodland/core";
4
4
  import { Tag as b } from "@sps-woodland/tags";
5
- import { code as s } from "@spscommerce/utils";
6
- var x = "_9yu2s95", C = "_9yu2s97", w = "_9yu2s96", v = "_9yu2s91", E = "_9yu2s92", I = "_9yu2s93", k = "_9yu2s94", y = "_9yu2s90";
7
- function i({
8
- className: e,
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";
7
+ function s({
8
+ className: t,
9
9
  children: n,
10
10
  ...o
11
11
  }) {
12
- return /* @__PURE__ */ t.createElement(
12
+ return /* @__PURE__ */ e.createElement(
13
13
  S,
14
14
  {
15
- className: d(C, e),
15
+ className: l(C, t),
16
16
  ...o
17
17
  },
18
18
  n
19
19
  );
20
20
  }
21
- l.set(i, {
21
+ r.set(s, {
22
22
  name: "ActionBarAdditionalContent",
23
23
  props: {}
24
24
  });
25
- function m({
26
- className: e,
25
+ function d({
26
+ className: t,
27
27
  children: n,
28
28
  clearSelected: o,
29
- itemsSelected: c,
30
- itemsSelectedLabel: a,
29
+ itemsSelected: i,
30
+ itemsSelectedLabel: m,
31
31
  ...u
32
32
  }) {
33
- const { t: r } = t.useContext(A), [B, p] = f(n, [
34
- { type: i }
33
+ const { t: c } = e.useContext(A), [B, p] = f(n, [
34
+ { type: s }
35
35
  ]);
36
- return Number(c) > 0 ? /* @__PURE__ */ t.createElement(
36
+ return Number(i) > 0 ? /* @__PURE__ */ e.createElement(
37
37
  "div",
38
38
  {
39
- className: d(y, e),
39
+ className: l(y, t),
40
40
  ...u
41
41
  },
42
- /* @__PURE__ */ t.createElement("div", { className: v }, B, /* @__PURE__ */ t.createElement("div", { className: E }, /* @__PURE__ */ t.createElement("div", { className: I }, /* @__PURE__ */ t.createElement(b, { kind: "info", className: k }, c), a != null ? a : r("design-system:listActionBar.itemsSelected")), /* @__PURE__ */ t.createElement("div", { className: x }, p), /* @__PURE__ */ t.createElement("div", { className: w }, /* @__PURE__ */ t.createElement(h, { kind: "link", icon: "x", onPress: o }, r("design-system:listActionBar.clearSelected")))))
43
- ) : /* @__PURE__ */ t.createElement(t.Fragment, null);
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")))))
43
+ ) : /* @__PURE__ */ e.createElement(e.Fragment, null);
44
44
  }
45
- l.set(m, {
45
+ r.set(d, {
46
46
  name: "ActionBar",
47
47
  props: {
48
48
  clearSelected: {
@@ -60,11 +60,12 @@ l.set(m, {
60
60
  }
61
61
  });
62
62
  const g = {
63
- components: [m, i],
64
- description: () => /* @__PURE__ */ t.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."),
63
+ components: [d, s],
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: {
66
66
  general: {
67
67
  label: "General Usage",
68
+ // this will get overwritten in the docs site code
68
69
  description: ""
69
70
  },
70
71
  actionBar: {
@@ -72,7 +73,7 @@ const g = {
72
73
  description: "This example makes use of the Text Buttons + Icon Buttons + Basic Buttons Group.",
73
74
  examples: {
74
75
  basic: {
75
- react: s`
76
+ react: a`
76
77
  import { ActionBar } from "@sps-woodland/action-bar";
77
78
  import { Button } from "@sps-woodland/buttons";
78
79
  import { Vr } from "@sps-woodland/core";
@@ -127,7 +128,7 @@ const g = {
127
128
  description: "If needed, the text that appears next to the Tag indicating the number of items that have been selected can be customized.",
128
129
  examples: {
129
130
  basic: {
130
- react: s`
131
+ react: a`
131
132
  import { ActionBar } from "@sps-woodland/action-bar";
132
133
  import { Button } from "@sps-woodland/buttons";
133
134
 
@@ -175,7 +176,7 @@ const g = {
175
176
  description: "An Action Bar may contain additional content that is not part of the action buttons group, which is displayed above the main content.",
176
177
  examples: {
177
178
  basic: {
178
- react: s`
179
+ react: a`
179
180
  import { ActionBar, ActionBarAdditionalContent } from "@sps-woodland/action-bar";
180
181
  import { Button } from "@sps-woodland/buttons";
181
182
  import { Card } from "@sps-woodland/cards";
@@ -213,11 +214,11 @@ const g = {
213
214
  }
214
215
  }
215
216
  }
216
- }, P = {
217
+ }, R = {
217
218
  "Action Bar": g
218
219
  };
219
220
  export {
220
- m as ActionBar,
221
- i as ActionBarAdditionalContent,
222
- P as MANIFEST
221
+ d as ActionBar,
222
+ s as ActionBarAdditionalContent,
223
+ R as MANIFEST
223
224
  };
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- ._9yu2s90{background-color:oklch(100% 0 0);display:flex;bottom:0;position:fixed;justify-content:center;left:0;right:0;padding:.5rem;box-shadow:0 0 .25rem .25rem oklch(26.99% .015 226.65 / .1);z-index:99}._9yu2s91{display:flex;flex-direction:column;max-width:77.5rem;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
+ ._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:77.5rem;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}
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.7.4",
4
+ "version": "8.7.5",
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": "^6.12.1",
30
30
  "react": "^16.14.0",
31
31
  "react-dom": "^16.14.0",
32
- "@sps-woodland/buttons": "8.7.4",
33
- "@sps-woodland/core": "8.7.4",
34
- "@sps-woodland/tags": "8.7.4",
35
- "@sps-woodland/tokens": "8.7.4"
32
+ "@sps-woodland/buttons": "8.7.5",
33
+ "@sps-woodland/core": "8.7.5",
34
+ "@sps-woodland/tags": "8.7.5",
35
+ "@sps-woodland/tokens": "8.7.5"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@spscommerce/utils": "^6.12.1",
@@ -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.7.4",
44
- "@sps-woodland/core": "8.7.4",
45
- "@sps-woodland/tags": "8.7.4",
46
- "@sps-woodland/tokens": "8.7.4"
43
+ "@sps-woodland/buttons": "8.7.5",
44
+ "@sps-woodland/core": "8.7.5",
45
+ "@sps-woodland/tags": "8.7.5",
46
+ "@sps-woodland/tokens": "8.7.5"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "pnpm run build:js && pnpm run build:types",
File without changes