@soul-refiner/design-system 2.14.133 → 2.14.134

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),r=require("../../iconography/avatar/avatar.js");require("../../iconography/icon/icon.js");var o=require("../../../icons/arrow/chevron_down.js"),t=require("../../../icons/arrow/chevron_up.js"),n=require("react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(require("styled-components"));const s=i.default.div`
2
+ "use strict";var e=require("react/jsx-runtime"),r=require("../../iconography/avatar/avatar.js");require("../../iconography/icon/icon.js");var a=require("../../../icons/arrow/chevron_down.js"),o=require("../../../icons/arrow/chevron_up.js"),t=require("react");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(require("styled-components"));const s=i.default.div`
3
3
  position: relative;
4
4
  display: inline-block;
5
5
  `,c=i.default.div`
@@ -55,4 +55,4 @@
55
55
  `,p=i.default.span`
56
56
  font-size: 14px;
57
57
  color: black;
58
- `;exports.AccountSelector=({selectedOption:a,options:i,onOptionChange:v,size:x=24,showChevron:g=!1,className:h})=>{const[f,b]=n.useState(!1),m=n.useRef(null);n.useEffect(()=>{const e=e=>{m.current&&!m.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);return e.jsxs(s,{className:h,ref:m,children:[e.jsxs(c,{onClick:()=>{i.length<=1||b(!f)},children:[e.jsx(r.Avatar,{image:a?.avatar||"/images/default_avatar.png",size:x}),g&&i.length>1&&e.jsx(d,{children:f?e.jsx(t.ChevronUp,{}):e.jsx(o.ChevronDown,{})})]}),f&&e.jsx(l,{children:i.map(o=>e.jsxs(u,{onClick:()=>{return e=o.value,v(e),void b(!1);var e},$isSelected:a?.value===o.value,children:[e.jsx(r.Avatar,{image:o.avatar,size:32}),e.jsx(p,{children:o.name})]},o.id))})]})};
58
+ `;exports.AccountSelector=({selectedOption:n,options:i,onOptionChange:v,size:x=24,showChevron:g=!1,className:h})=>{const[f,m]=t.useState(!1),b=t.useRef(null);t.useEffect(()=>{const e=e=>{b.current&&!b.current.contains(e.target)&&m(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);return e.jsxs(s,{className:h,ref:b,children:[e.jsxs(c,{onClick:()=>{i.length<=1||m(!f)},children:[n?.avatar&&"/images/default_avatar.png"!==n.avatar?e.jsx(r.Avatar,{image:n.avatar,size:x}):e.jsx(r.Avatar.Initials,{name:n?.name||"U",size:x,sx:x<=32?"font-size: 12px;":""}),g&&i.length>1&&e.jsx(d,{children:f?e.jsx(o.ChevronUp,{}):e.jsx(a.ChevronDown,{})})]}),f&&e.jsx(l,{children:i.map(a=>e.jsxs(u,{onClick:()=>{return e=a.value,v(e),void m(!1);var e},$isSelected:n?.value===a.value,children:[a.avatar&&"/images/default_avatar.png"!==a.avatar?e.jsx(r.Avatar,{image:a.avatar,size:32}):e.jsx(r.Avatar.Initials,{name:a.name||"U",size:32,sx:"font-size: 12px;"}),e.jsx(p,{children:a.name})]},a.id))})]})};
@@ -1 +1 @@
1
- {"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../../../../../src/components/actions/AccountSelector/selector.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,+EAOzB,oBAAoB,4CA0DtB,CAAC"}
1
+ {"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../../../../../src/components/actions/AccountSelector/selector.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,+EAOzB,oBAAoB,4CAyEtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "2.14.133",
3
+ "version": "2.14.134",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "license": "MIT",