@telia-ace/widget-components-area 1.1.8-rc.0 → 1.1.8-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.
@@ -6,7 +6,7 @@ import { genericComponentStyling as T, Component as v } from "@telia-ace/widget-
6
6
  import { TransitionComponent as q, Grid as P, useComponentDescriptor as F, useRenderState as H, useContext as I, 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";
7
7
  import { appendClassNames as y, Logger as ie } from "@telia-ace/widget-utilities";
8
8
  import { forwardRef as se, useCallback as ae } from "react";
9
- import { A as l } from "./index-e910f9f7.mjs";
9
+ import { A as l } from "./index-ca543402.mjs";
10
10
  const le = se(
11
11
  ({ children: e, className: t, renderState: o, animation: i, ...f }, s) => o ? /* @__PURE__ */ n(
12
12
  q,
@@ -83,7 +83,7 @@ const le = se(
83
83
  animation: u,
84
84
  hidden: i === c.hidden,
85
85
  ref: M
86
- }, g = (() => u !== "none" ? /* @__PURE__ */ n(w.Provider, { value: h, children: /* @__PURE__ */ n(le, { ...$, children: a.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }) : i === c.closed ? null : /* @__PURE__ */ n(w.Provider, { value: h, children: /* @__PURE__ */ n(pe, { ...$, "aria-live": "polite", children: a.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }))();
86
+ }, g = (() => u !== "none" ? /* @__PURE__ */ n(w.Provider, { value: h, children: /* @__PURE__ */ n(le, { ...$, children: a.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }) : i === c.closed ? null : /* @__PURE__ */ n(w.Provider, { value: h, children: /* @__PURE__ */ n(pe, { ...$, children: a.map((r) => /* @__PURE__ */ n(v, { id: r.id, branch: "default" }, r.id)) }) }))();
87
87
  if (p === l.Static)
88
88
  return g;
89
89
  const x = /* @__PURE__ */ G(
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),w=require("@emotion/react"),u=require("@emotion/styled"),c=require("@telia-ace/widget-core"),f=require("@telia-ace/widget-types-grid"),t=require("@telia-ace/widget-ui"),h=require("@telia-ace/widget-utilities"),v=require("react"),d=require("./index-2f9d69ff.js"),G=v.forwardRef(({children:e,className:n,renderState:i,animation:o,...C},a)=>i?r.jsx(t.TransitionComponent,{mountOnEnter:i!==c.WidgetRenderState.hidden,timeout:200,in:i===c.WidgetRenderState.open,transitions:o,unmountOnExit:i===c.WidgetRenderState.closed,children:(l,m)=>r.jsx(L,{...C,animationCss:m,"data-state":l,ref:a,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"),w=require("@emotion/react"),u=require("@emotion/styled"),c=require("@telia-ace/widget-core"),f=require("@telia-ace/widget-types-grid"),t=require("@telia-ace/widget-ui"),h=require("@telia-ace/widget-utilities"),v=require("react"),d=require("./index-d68cb848.js"),G=v.forwardRef(({children:e,className:n,renderState:i,animation:o,...C},a)=>i?r.jsx(t.TransitionComponent,{mountOnEnter:i!==c.WidgetRenderState.hidden,timeout:200,in:i===c.WidgetRenderState.open,transitions:o,unmountOnExit:i===c.WidgetRenderState.closed,children:(l,m)=>r.jsx(L,{...C,animationCss:m,"data-state":l,ref:a,className:h.appendClassNames("humany-animated-area",n),children:e})}):null),L=u(t.Grid)`
2
2
  ${f.genericComponentStyling}
3
3
  ${e=>!!e.animationCss&&e.animationCss}
4
4
  ${e=>!!e.scrollableCss&&e.scrollableCss}
@@ -10,7 +10,7 @@
10
10
  visibility: collapse;
11
11
  pointer-events: none;
12
12
  `};
13
- `,U=({className:e,...n})=>{const{name:i}=t.useComponentDescriptor(),o=t.useRenderState(),C=t.useContext(),a=t.useProperties(),l=t.useChildren(),m=t.useContainer(),{gap:T="0"}=C,{columns:x=1,animation:p="none",scrollable:q=!1,mode:g=d.AreaMode.Static,trigger:A={},fullScreen:R,header:P,...M}=a,{size:W=24,symbol:b,label:$,ariaLabel:D,...N}=A,[z,B]=t.useScroll(q),O=v.useCallback(s=>{const{events:E}=m.get("$widget");return E.dispatch("widget:area-rendered",{name:i,properties:a,element:s}),B.current=s,s},[a,o]);if(!l.length)return t.createEmptyComponent(m,{...n,className:h.appendClassNames(e,"humany-area")});const j={...n,className:h.appendClassNames(e,"humany-area",`humany-area-${i}`),scrollableCss:z,...M,columns:x,gap:T,renderState:o,animation:p,hidden:o===c.WidgetRenderState.hidden,ref:O},y=(()=>p!=="none"?r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(G,{...j,children:l.map(s=>r.jsx(f.Component,{id:s.id,branch:"default"},s.id))})}):o===c.WidgetRenderState.closed?null:r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(I,{...j,"aria-live":"polite",children:l.map(s=>r.jsx(f.Component,{id:s.id,branch:"default"},s.id))})}))();if(g===d.AreaMode.Static)return y;const S=r.jsxs(k,{className:"humany-area-trigger",title:D,...t.filterCssProps(N),children:[$&&r.jsx(F,{children:$}),b&&r.jsx(H,{symbol:b,size:W})]});if(g===d.AreaMode.Dropdown)return r.jsx(t.Dropdown,{trigger:S,children:y});if(g===d.AreaMode.Drawer){const s=Object.values(t.DrawerAnimationType).includes(p)&&{type:p}||void 0;return r.jsx(t.Drawer,{header:P,animation:s,fullScreen:R,trigger:S,children:y})}return g===d.AreaMode.Modal&&h.Logger.warn("modal area not implemented"),null},k=u(t.Button)`
13
+ `,U=({className:e,...n})=>{const{name:i}=t.useComponentDescriptor(),o=t.useRenderState(),C=t.useContext(),a=t.useProperties(),l=t.useChildren(),m=t.useContainer(),{gap:T="0"}=C,{columns:x=1,animation:g="none",scrollable:q=!1,mode:p=d.AreaMode.Static,trigger:A={},fullScreen:R,header:P,...M}=a,{size:W=24,symbol:b,label:$,ariaLabel:D,...N}=A,[z,B]=t.useScroll(q),O=v.useCallback(s=>{const{events:E}=m.get("$widget");return E.dispatch("widget:area-rendered",{name:i,properties:a,element:s}),B.current=s,s},[a,o]);if(!l.length)return t.createEmptyComponent(m,{...n,className:h.appendClassNames(e,"humany-area")});const j={...n,className:h.appendClassNames(e,"humany-area",`humany-area-${i}`),scrollableCss:z,...M,columns:x,gap:T,renderState:o,animation:g,hidden:o===c.WidgetRenderState.hidden,ref:O},y=(()=>g!=="none"?r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(G,{...j,children:l.map(s=>r.jsx(f.Component,{id:s.id,branch:"default"},s.id))})}):o===c.WidgetRenderState.closed?null:r.jsx(t.ColumnContext.Provider,{value:x,children:r.jsx(I,{...j,children:l.map(s=>r.jsx(f.Component,{id:s.id,branch:"default"},s.id))})}))();if(p===d.AreaMode.Static)return y;const S=r.jsxs(k,{className:"humany-area-trigger",title:D,...t.filterCssProps(N),children:[$&&r.jsx(F,{children:$}),b&&r.jsx(H,{symbol:b,size:W})]});if(p===d.AreaMode.Dropdown)return r.jsx(t.Dropdown,{trigger:S,children:y});if(p===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 p===d.AreaMode.Modal&&h.Logger.warn("modal area not implemented"),null},k=u(t.Button)`
14
14
  display: flex;
15
15
  align-items: inherit;
16
16
  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-6f7f5fe8.mjs"),
6
+ import("./area-2730550b.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-60396262.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-b1abdc0c.js")),n=>{});exports.AreaComponent=o;exports.AreaMode=r;
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index-2f9d69ff.js");require("@telia-ace/widget-ui");module.exports=e.AreaComponent;
1
+ "use strict";const e=require("./index-d68cb848.js");require("@telia-ace/widget-ui");module.exports=e.AreaComponent;
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as t } from "./index-e910f9f7.mjs";
1
+ import { a as t } from "./index-ca543402.mjs";
2
2
  import "@telia-ace/widget-ui";
3
3
  export {
4
4
  t as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-area",
3
- "version": "1.1.8-rc.0",
3
+ "version": "1.1.8-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.1.8-rc.0",
14
- "@telia-ace/widget-types-grid": "^1.1.8-rc.0",
15
- "@telia-ace/widget-ui": "^1.1.8-rc.0",
16
- "@telia-ace/widget-utilities": "^1.1.8-rc.0",
13
+ "@telia-ace/widget-core": "^1.1.8-rc.2",
14
+ "@telia-ace/widget-types-grid": "^1.1.8-rc.2",
15
+ "@telia-ace/widget-ui": "^1.1.8-rc.2",
16
+ "@telia-ace/widget-utilities": "^1.1.8-rc.2",
17
17
  "@webprovisions/platform": "^1.1.3"
18
18
  },
19
19
  "peerDependencies": {