@telia-ace/widget-components-area 1.3.41-rc.0 → 1.3.41-rc.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.
@@ -3,10 +3,10 @@ import { css as S } from "@emotion/react";
3
3
  import m from "@emotion/styled";
4
4
  import { WidgetRenderState as c } from "@telia-ace/widget-core";
5
5
  import { genericComponentStyling as T, Component as v } from "@telia-ace/widget-types-grid";
6
- import { TransitionComponent as G, Grid as P, useComponentDescriptor as I, useRenderState as F, useContext as H, useProperties as J, useChildren as K, useContainer as Q, useScroll as U, createEmptyComponent as V, ColumnContext as w, filterCssProps as X, Dropdown as Y, DrawerAnimationType as Z, Drawer as _, Button as ee, filterCssPropsStyle as te, paddedBorderTabStyle as ne, Text as re, SymbolBadge as oe } from "@telia-ace/widget-ui";
6
+ import { TransitionComponent as G, Grid as P, useComponentDescriptor as I, useRenderState as F, useContext as H, useProperties as J, useChildren as K, useContainer as Q, useScroll as U, createEmptyComponent as V, ColumnContext as w, filterCssProps as X, Dropdown as Y, DrawerAnimationType as Z, Drawer as _, filterCssPropsStyle as ee, paddedBorderTabStyle as te, Button as ne, Text as re, SymbolBadge as oe } from "@telia-ace/widget-ui";
7
7
  import { appendClassNames as y, Logger as ie } from "@telia-ace/widget-utilities";
8
8
  import { forwardRef as se, useEffect as ae, useCallback as le } from "react";
9
- import { A as l } from "./index-7fc9ef83.mjs";
9
+ import { A as l } from "./index-B0bvuHPd.mjs";
10
10
  const ce = se(
11
11
  ({ children: e, className: t, renderState: o, animation: s, ...d }, a) => (ae(() => {
12
12
  if (o === "open") {
@@ -94,7 +94,7 @@ const ce = se(
94
94
  animation: p,
95
95
  hidden: s === c.hidden,
96
96
  ref: M
97
- }, h = (() => p !== "none" ? /* @__PURE__ */ n(w.Provider, { value: g, children: /* @__PURE__ */ n(ce, { ...$, children: i.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }) : s === c.closed ? null : /* @__PURE__ */ n(w.Provider, { value: g, children: /* @__PURE__ */ n(fe, { ...$, children: i.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }))();
97
+ }, h = p !== "none" ? /* @__PURE__ */ n(w.Provider, { value: g, children: /* @__PURE__ */ n(ce, { ...$, children: i.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }) : s === c.closed ? null : /* @__PURE__ */ n(w.Provider, { value: g, children: /* @__PURE__ */ n(fe, { ...$, children: i.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) });
98
98
  if (f === l.Static)
99
99
  return h;
100
100
  const x = /* @__PURE__ */ q(
@@ -127,13 +127,13 @@ const ce = se(
127
127
  );
128
128
  }
129
129
  return f === l.Modal && ie.warn("modal area not implemented"), null;
130
- }, de = m(ee)`
130
+ }, de = m(ne)`
131
131
  display: flex;
132
132
  align-items: inherit;
133
133
  align-self: center;
134
134
  width: fit-content;
135
135
  height: fit-content;
136
- ${te}
136
+ ${ee}
137
137
 
138
138
  ${(e) => e.theme.fonts && `
139
139
  font-family: ${e.theme.fonts.type};
@@ -141,7 +141,7 @@ const ce = se(
141
141
  `}
142
142
 
143
143
  &:focus-visible {
144
- ${ne};
144
+ ${te};
145
145
  }
146
146
  `, ue = m(re)`
147
147
  margin: 0 ${(e) => {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("@emotion/react"),u=require("@emotion/styled"),c=require("@telia-ace/widget-core"),C=require("@telia-ace/widget-types-grid"),t=require("@telia-ace/widget-ui"),h=require("@telia-ace/widget-utilities"),b=require("react"),d=require("./index-a2bac2d5.js"),G=b.forwardRef(({children:e,className:n,renderState:i,animation:a,...m},l)=>(b.useEffect(()=>{if(i==="open"){const o=document.querySelector(`[data-node-id='${m.id}']`);o&&o.focus()}}),i?r.jsx(t.TransitionComponent,{mountOnEnter:i!==c.WidgetRenderState.hidden,timeout:200,in:i===c.WidgetRenderState.open,transitions:a,unmountOnExit:i===c.WidgetRenderState.closed,children:(o,p)=>r.jsx(L,{...m,tabIndex:"-1",animationCss:p,"data-state":o,ref:l,className:h.appendClassNames("humany-animated-area",n),children:e})}):null)),L=u(t.Grid)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("@emotion/react"),u=require("@emotion/styled"),c=require("@telia-ace/widget-core"),C=require("@telia-ace/widget-types-grid"),t=require("@telia-ace/widget-ui"),h=require("@telia-ace/widget-utilities"),b=require("react"),d=require("./index-CWPZwxU2.js"),G=b.forwardRef(({children:e,className:n,renderState:i,animation:a,...m},l)=>(b.useEffect(()=>{if(i==="open"){const o=document.querySelector(`[data-node-id='${m.id}']`);o&&o.focus()}}),i?r.jsx(t.TransitionComponent,{mountOnEnter:i!==c.WidgetRenderState.hidden,timeout:200,in:i===c.WidgetRenderState.open,transitions:a,unmountOnExit:i===c.WidgetRenderState.closed,children:(o,p)=>r.jsx(L,{...m,tabIndex:"-1",animationCss:p,"data-state":o,ref:l,className:h.appendClassNames("humany-animated-area",n),children:e})}):null)),L=u(t.Grid)`
2
2
  ${C.genericComponentStyling}
3
3
  ${e=>!!e.animationCss&&e.animationCss}
4
4
  ${e=>!!e.scrollableCss&&e.scrollableCss}
@@ -13,7 +13,7 @@
13
13
  visibility: collapse;
14
14
  pointer-events: none;
15
15
  `};
16
- `,U=({className:e,...n})=>{const{name:i}=t.useComponentDescriptor(),a=t.useRenderState(),m=t.useContext(),l=t.useProperties(),o=t.useChildren(),p=t.useContainer(),{gap:q="0"}=m,{columns:x=1,animation:g="none",scrollable:T=!1,mode:f=d.AreaMode.Static,trigger:A={},fullScreen:R,header:P,...M}=l,{size:W=24,symbol:$,label:j,ariaLabel:D,...N}=A,[z,B]=t.useScroll(T),E=b.useCallback(s=>{const{events:O}=p.get("$widget");return O.dispatch("widget:area-rendered",{name:i,properties:l,element:s}),B.current=s,s},[l,a]);if(!o.length)return t.createEmptyComponent(p,{...n,className:h.appendClassNames(e,"humany-area")});const w={...n,className:h.appendClassNames(e,"humany-area",`humany-area-${i}`),scrollableCss:z,...M,columns:x,gap:q,renderState:a,animation:g,hidden:a===c.WidgetRenderState.hidden,ref:E},y=(()=>g!=="none"?r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(G,{...w,children:o.map(s=>r.jsx(C.Component,{id:s.id,branch:"default"},s.id))})}):a===c.WidgetRenderState.closed?null:r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(H,{...w,children:o.map(s=>r.jsx(C.Component,{id:s.id,branch:"default"},s.id))})}))();if(f===d.AreaMode.Static)return y;const S=r.jsxs(k,{className:"humany-area-trigger",title:D,...t.filterCssProps(N),children:[j&&r.jsx(I,{children:j}),$&&r.jsx(F,{symbol:$,size:W})]});if(f===d.AreaMode.Dropdown)return r.jsx(t.Dropdown,{trigger:S,children:y});if(f===d.AreaMode.Drawer){const s=Object.values(t.DrawerAnimationType).includes(g)&&{type:g}||void 0;return r.jsx(t.Drawer,{header:P,animation:s,fullScreen:R,trigger:S,children:y})}return f===d.AreaMode.Modal&&h.Logger.warn("modal area not implemented"),null},k=u(t.Button)`
16
+ `,U=({className:e,...n})=>{const{name:i}=t.useComponentDescriptor(),a=t.useRenderState(),m=t.useContext(),l=t.useProperties(),o=t.useChildren(),p=t.useContainer(),{gap:q="0"}=m,{columns:x=1,animation:g="none",scrollable:T=!1,mode:f=d.AreaMode.Static,trigger:A={},fullScreen:R,header:P,...M}=l,{size:W=24,symbol:$,label:j,ariaLabel:D,...N}=A,[z,B]=t.useScroll(T),E=b.useCallback(s=>{const{events:O}=p.get("$widget");return O.dispatch("widget:area-rendered",{name:i,properties:l,element:s}),B.current=s,s},[l,a]);if(!o.length)return t.createEmptyComponent(p,{...n,className:h.appendClassNames(e,"humany-area")});const w={...n,className:h.appendClassNames(e,"humany-area",`humany-area-${i}`),scrollableCss:z,...M,columns:x,gap:q,renderState:a,animation:g,hidden:a===c.WidgetRenderState.hidden,ref:E},y=g!=="none"?r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(G,{...w,children:o.map(s=>r.jsx(C.Component,{id:s.id,branch:"default"},s.id))})}):a===c.WidgetRenderState.closed?null:r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(H,{...w,children:o.map(s=>r.jsx(C.Component,{id:s.id,branch:"default"},s.id))})});if(f===d.AreaMode.Static)return y;const S=r.jsxs(k,{className:"humany-area-trigger",title:D,...t.filterCssProps(N),children:[j&&r.jsx(I,{children:j}),$&&r.jsx(F,{symbol:$,size:W})]});if(f===d.AreaMode.Dropdown)return r.jsx(t.Dropdown,{trigger:S,children:y});if(f===d.AreaMode.Drawer){const s=Object.values(t.DrawerAnimationType).includes(g)&&{type:g}||void 0;return r.jsx(t.Drawer,{header:P,animation:s,fullScreen:R,trigger:S,children:y})}return f===d.AreaMode.Modal&&h.Logger.warn("modal area not implemented"),null},k=u(t.Button)`
17
17
  display: flex;
18
18
  align-items: inherit;
19
19
  align-self: center;
@@ -3,7 +3,7 @@ var o = /* @__PURE__ */ ((r) => (r.Static = "static", r.Drawer = "drawer", r.Dro
3
3
  const p = (r) => t(
4
4
  r,
5
5
  "area",
6
- import("./area-f9d028bf.mjs"),
6
+ import("./area-CZoTvAjY.mjs"),
7
7
  (a) => {
8
8
  }
9
9
  );
@@ -1 +1 @@
1
- "use strict";const t=require("@telia-ace/widget-ui");var r=(e=>(e.Static="static",e.Drawer="drawer",e.Dropdown="dropdown",e.Modal="modal",e))(r||{});const o=e=>t.createReactComponent(e,"area",Promise.resolve().then(()=>require("./area-f075309d.js")),n=>{});exports.AreaComponent=o;exports.AreaMode=r;
1
+ "use strict";const t=require("@telia-ace/widget-ui");var r=(e=>(e.Static="static",e.Drawer="drawer",e.Dropdown="dropdown",e.Modal="modal",e))(r||{});const o=e=>t.createReactComponent(e,"area",Promise.resolve().then(()=>require("./area-DyI3HP8x.js")),n=>{});exports.AreaComponent=o;exports.AreaMode=r;
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index-a2bac2d5.js");require("@telia-ace/widget-ui");module.exports=e.AreaComponent;
1
+ "use strict";const e=require("./index-CWPZwxU2.js");module.exports=e.AreaComponent;
package/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { a as t } from "./index-7fc9ef83.mjs";
2
- import "@telia-ace/widget-ui";
1
+ import { a as f } from "./index-B0bvuHPd.mjs";
3
2
  export {
4
- t as default
3
+ f as default
5
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-area",
3
- "version": "1.3.41-rc.0",
3
+ "version": "1.3.41-rc.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -10,10 +10,10 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@telia-ace/widget-core": "^1.3.41-rc.0",
14
- "@telia-ace/widget-types-grid": "^1.3.41-rc.0",
15
- "@telia-ace/widget-ui": "^1.3.41-rc.0",
16
- "@telia-ace/widget-utilities": "^1.3.41-rc.0",
13
+ "@telia-ace/widget-core": "^1.3.41-rc.2",
14
+ "@telia-ace/widget-types-grid": "^1.3.41-rc.2",
15
+ "@telia-ace/widget-ui": "^1.3.41-rc.2",
16
+ "@telia-ace/widget-utilities": "^1.3.41-rc.2",
17
17
  "@webprovisions/platform": "^1.1.3"
18
18
  },
19
19
  "peerDependencies": {