@worldresources/wri-design-systems 2.148.2 → 2.148.3
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/dist/index.cjs.js +4 -2
- package/dist/index.esm.js +4 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
width: 100%;
|
|
298
298
|
margin-left: ${i?"8px":"0"};
|
|
299
299
|
margin-right: ${a?"8px":"0"};
|
|
300
|
-
`),children:[t.jsxs("div",{css:le,children:[t.jsx("p",{className:"ds-menu-item-label",children:n.label}),n.command?t.jsx(e.Menu.ItemCommand,{"aria-label":`Shortcut ${n.command}`,children:n.command}):null]}),n.caption?t.jsx("p",{className:"ds-menu-item-caption",children:n.caption}):null]}),n.endIcon]})}),o?null:t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var i,a},de=({label:r,items:o,groups:i,onSelect:a,customTrigger:s})=>{const[l,c]=n.useState(!1);return t.jsxs(e.Menu.Root,{onSelect:({value:e})=>a&&a(e),onOpenChange:({open:e})=>c(e),open:l,children:[t.jsx(e.Menu.Trigger,{css:oe,asChild:!0,children:s||t.jsxs("button",{type:"button",children:[r,t.jsx(k,{marginLeft:"6px",rotate:l?"180":"0",height:"14px",width:"14px"})]})}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsxs(e.Menu.Content,{css:ie,role:"menu","aria-label":r||"Menu",children:[o?.map(((r,i)=>{if(r.submenu){const[o,s]=n.useState(!1);return t.jsxs(e.Menu.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>a&&a(e),onOpenChange:({open:e})=>s(e),open:o,children:[t.jsxs(e.Menu.TriggerItem,{css:ae,role:"menuitem","aria-haspopup":"true","aria-expanded":o?"true":"false",children:[r.label,
|
|
300
|
+
`),children:[t.jsxs("div",{css:le,children:[t.jsx("p",{className:"ds-menu-item-label",children:n.label}),n.command?t.jsx(e.Menu.ItemCommand,{"aria-label":`Shortcut ${n.command}`,children:n.command}):null]}),n.caption?t.jsx("p",{className:"ds-menu-item-caption",children:n.caption}):null]}),n.endIcon]})}),o?null:t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var i,a},de=({label:r,items:o,groups:i,onSelect:a,customTrigger:s})=>{const[l,c]=n.useState(!1);return t.jsxs(e.Menu.Root,{onSelect:({value:e})=>a&&a(e),onOpenChange:({open:e})=>c(e),open:l,children:[t.jsx(e.Menu.Trigger,{css:oe,asChild:!0,children:s||t.jsxs("button",{type:"button",children:[r,t.jsx(k,{marginLeft:"6px",rotate:l?"180":"0",height:"14px",width:"14px"})]})}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsxs(e.Menu.Content,{css:ie,role:"menu","aria-label":r||"Menu",children:[o?.map(((r,i)=>{if(r.submenu){const[o,s]=n.useState(!1);return t.jsxs(e.Menu.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>a&&a(e),onOpenChange:({open:e})=>s(e),open:o,children:[t.jsxs(e.Menu.TriggerItem,{css:ae,role:"menuitem","aria-haspopup":"true","aria-expanded":o?"true":"false",children:[r.label,t.jsx(k,{rotate:"270",color:"var(--chakra-colors-neutral-700)"})]}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsx(e.Menu.Content,{css:ie,role:"menu","aria-label":`${r.label} submenu`,children:r.submenu.map(((e,n)=>t.jsx(ue,{item:e,isLast:n===(r.submenu?.length||0)-1},e.value)))})})})]},`${r.value}-${i}`)}return t.jsx(ue,{item:r,isLast:i===o.length-1},`${r.value}-${i}`)})),i?.map(((r,o)=>t.jsxs(n.Fragment,{children:[t.jsxs(e.Menu.ItemGroup,{role:"group","aria-labelledby":`group-${o}`,children:[t.jsx(e.Menu.ItemGroupLabel,{id:`group-${o}`,css:ce,children:r.title}),r.items?.map((e=>t.jsx(ue,{item:e,isLast:i.length-1===o},e.value)))]}),o!==i.length-1?t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"}):null]},r.title)))]})})})]})},pe=e=>r.css`
|
|
301
301
|
position: relative;
|
|
302
302
|
|
|
303
303
|
.toolbar-overflow-menu {
|
|
@@ -1883,6 +1883,7 @@
|
|
|
1883
1883
|
border: 1px solid ${p("neutral",300)};
|
|
1884
1884
|
border-radius: 4px;
|
|
1885
1885
|
box-shadow: 0px 1px 2px 0px #0000000d;
|
|
1886
|
+
background-color: ${p("neutral",100)};
|
|
1886
1887
|
`,Ko=r.css`
|
|
1887
1888
|
padding: 6px 8px;
|
|
1888
1889
|
align-items: center;
|
|
@@ -1926,6 +1927,7 @@
|
|
|
1926
1927
|
display: flex;
|
|
1927
1928
|
gap: 12px;
|
|
1928
1929
|
border-bottom: 1px solid ${p("neutral",300)};
|
|
1930
|
+
background-color: ${p("neutral",100)};
|
|
1929
1931
|
`,ti=r.css`
|
|
1930
1932
|
display: flex;
|
|
1931
1933
|
flex-direction: column;
|
|
@@ -3317,7 +3319,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3317
3319
|
color: ${p("error",100)};
|
|
3318
3320
|
`,$f=(e,t)=>r.css`
|
|
3319
3321
|
width: 100%;
|
|
3320
|
-
|
|
3322
|
+
max-width: ${"small"===e?"234px":"320px"};
|
|
3321
3323
|
border-radius: 4px;
|
|
3322
3324
|
padding: ${"small"===e?"8px 8px 12px 8px":"8px 12px 12px 12px"};
|
|
3323
3325
|
display: flex;
|
package/dist/index.esm.js
CHANGED
|
@@ -297,7 +297,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
297
297
|
width: 100%;
|
|
298
298
|
margin-left: ${n?"8px":"0"};
|
|
299
299
|
margin-right: ${r?"8px":"0"};
|
|
300
|
-
`),children:[B("div",{css:pt,children:[F("p",{className:"ds-menu-item-label",children:e.label}),e.command?F(a.ItemCommand,{"aria-label":`Shortcut ${e.command}`,children:e.command}):null]}),e.caption?F("p",{className:"ds-menu-item-caption",children:e.caption}):null]}),e.endIcon]})}),t?null:F(a.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var n,r},gt=({label:e,items:t,groups:n,onSelect:r,customTrigger:i})=>{const[o,s]=U(!1);return B(a.Root,{onSelect:({value:e})=>r&&r(e),onOpenChange:({open:e})=>s(e),open:o,children:[F(a.Trigger,{css:st,asChild:!0,children:i||B("button",{type:"button",children:[e,F(Re,{marginLeft:"6px",rotate:o?"180":"0",height:"14px",width:"14px"})]})}),F(l,{children:F(a.Positioner,{children:B(a.Content,{css:ct,role:"menu","aria-label":e||"Menu",children:[t?.map(((e,n)=>{if(e.submenu){const[t,i]=U(!1);return B(a.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>r&&r(e),onOpenChange:({open:e})=>i(e),open:t,children:[B(a.TriggerItem,{css:dt,role:"menuitem","aria-haspopup":"true","aria-expanded":t?"true":"false",children:[e.label,
|
|
300
|
+
`),children:[B("div",{css:pt,children:[F("p",{className:"ds-menu-item-label",children:e.label}),e.command?F(a.ItemCommand,{"aria-label":`Shortcut ${e.command}`,children:e.command}):null]}),e.caption?F("p",{className:"ds-menu-item-caption",children:e.caption}):null]}),e.endIcon]})}),t?null:F(a.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var n,r},gt=({label:e,items:t,groups:n,onSelect:r,customTrigger:i})=>{const[o,s]=U(!1);return B(a.Root,{onSelect:({value:e})=>r&&r(e),onOpenChange:({open:e})=>s(e),open:o,children:[F(a.Trigger,{css:st,asChild:!0,children:i||B("button",{type:"button",children:[e,F(Re,{marginLeft:"6px",rotate:o?"180":"0",height:"14px",width:"14px"})]})}),F(l,{children:F(a.Positioner,{children:B(a.Content,{css:ct,role:"menu","aria-label":e||"Menu",children:[t?.map(((e,n)=>{if(e.submenu){const[t,i]=U(!1);return B(a.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>r&&r(e),onOpenChange:({open:e})=>i(e),open:t,children:[B(a.TriggerItem,{css:dt,role:"menuitem","aria-haspopup":"true","aria-expanded":t?"true":"false",children:[e.label,F(Re,{rotate:"270",color:"var(--chakra-colors-neutral-700)"})]}),F(l,{children:F(a.Positioner,{children:F(a.Content,{css:ct,role:"menu","aria-label":`${e.label} submenu`,children:e.submenu.map(((t,n)=>F(ft,{item:t,isLast:n===(e.submenu?.length||0)-1},t.value)))})})})]},`${e.value}-${n}`)}return F(ft,{item:e,isLast:n===t.length-1},`${e.value}-${n}`)})),n?.map(((e,t)=>B(q.Fragment,{children:[B(a.ItemGroup,{role:"group","aria-labelledby":`group-${t}`,children:[F(a.ItemGroupLabel,{id:`group-${t}`,css:ht,children:e.title}),e.items?.map((e=>F(ft,{item:e,isLast:n.length-1===t},e.value)))]}),t!==n.length-1?F(a.Separator,{borderColor:"var(--chakra-colors-neutral-300)"}):null]},e.title)))]})})})]})},vt=e=>ae`
|
|
301
301
|
position: relative;
|
|
302
302
|
|
|
303
303
|
.toolbar-overflow-menu {
|
|
@@ -1932,6 +1932,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1932
1932
|
border: 1px solid ${ve("neutral",300)};
|
|
1933
1933
|
border-radius: 4px;
|
|
1934
1934
|
box-shadow: 0px 1px 2px 0px #0000000d;
|
|
1935
|
+
background-color: ${ve("neutral",100)};
|
|
1935
1936
|
`,xa=ae`
|
|
1936
1937
|
padding: 6px 8px;
|
|
1937
1938
|
align-items: center;
|
|
@@ -1975,6 +1976,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1975
1976
|
display: flex;
|
|
1976
1977
|
gap: 12px;
|
|
1977
1978
|
border-bottom: 1px solid ${ve("neutral",300)};
|
|
1979
|
+
background-color: ${ve("neutral",100)};
|
|
1978
1980
|
`,$a=ae`
|
|
1979
1981
|
display: flex;
|
|
1980
1982
|
flex-direction: column;
|
|
@@ -3379,7 +3381,7 @@ function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3379
3381
|
color: ${ve("error",100)};
|
|
3380
3382
|
`,cv=({hasNotification:e,notificationCount:t,label:n})=>{const[r,i]=U(!1);X((()=>{const e=()=>{window.innerWidth<1024?i(!0):i(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const o=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})();let a="16px";return t&&t>99?a="28px":t&&t>9&&(a="22px"),B("div",r?{css:nv,role:"status","aria-live":"polite",children:[B("div",{css:rv(),children:[F(ze,{color:"currentColor",height:"16px",width:"16px"}),!e||t||n?null:F("div",{css:iv,"aria-hidden":!0})]}),n?F("p",{children:n}):null,o.length>0?F("div",{css:lv,children:F("p",{css:sv,"aria-label":`${t} unread message`,children:o})}):null]}:{css:nv,role:"status","aria-live":"polite",children:[n?F("p",{children:n}):null,B("div",{css:rv(a),children:[o.length>0?F("div",{css:ov,children:F("p",{css:av,"aria-label":`${t} unread message`,children:o})}):null,e&&!t?F("div",{css:iv,"aria-hidden":!0}):null,F(ze,{color:"currentColor",height:"16px",width:"16px"})]})]})},dv=(e,t)=>ae`
|
|
3381
3383
|
width: 100%;
|
|
3382
|
-
|
|
3384
|
+
max-width: ${"small"===e?"234px":"320px"};
|
|
3383
3385
|
border-radius: 4px;
|
|
3384
3386
|
padding: ${"small"===e?"8px 8px 12px 8px":"8px 12px 12px 12px"};
|
|
3385
3387
|
display: flex;
|