@worldresources/wri-design-systems 2.148.2 → 2.148.4
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 +7 -4
- package/dist/index.esm.js +7 -4
- 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;
|
|
@@ -2160,7 +2162,6 @@
|
|
|
2160
2162
|
|
|
2161
2163
|
&:focus-visible {
|
|
2162
2164
|
outline: 2px solid ${p("primary",700)};
|
|
2163
|
-
outline-offset: 2px;
|
|
2164
2165
|
box-shadow: 0px 2px 4px -2px #0000001a;
|
|
2165
2166
|
box-shadow: 0px 4px 6px -1px #0000001a;
|
|
2166
2167
|
box-shadow:
|
|
@@ -2278,10 +2279,12 @@
|
|
|
2278
2279
|
border: 1px solid ${p("neutral",300)};
|
|
2279
2280
|
`,ea=r.css`
|
|
2280
2281
|
padding: 16px;
|
|
2282
|
+
|
|
2281
2283
|
cursor: pointer;
|
|
2282
2284
|
border-bottom: 1px solid ${p("neutral",300)};
|
|
2283
2285
|
&:focus-visible {
|
|
2284
|
-
outline-
|
|
2286
|
+
outline-offset: -2px;
|
|
2287
|
+
outline: 2px solid ${p("primary",700)};
|
|
2285
2288
|
}
|
|
2286
2289
|
&:hover {
|
|
2287
2290
|
box-shadow: 0px 2px 4px -2px #0000001a;
|
|
@@ -3317,7 +3320,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3317
3320
|
color: ${p("error",100)};
|
|
3318
3321
|
`,$f=(e,t)=>r.css`
|
|
3319
3322
|
width: 100%;
|
|
3320
|
-
|
|
3323
|
+
max-width: ${"small"===e?"234px":"320px"};
|
|
3321
3324
|
border-radius: 4px;
|
|
3322
3325
|
padding: ${"small"===e?"8px 8px 12px 8px":"8px 12px 12px 12px"};
|
|
3323
3326
|
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;
|
|
@@ -2216,7 +2218,6 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2216
2218
|
|
|
2217
2219
|
&:focus-visible {
|
|
2218
2220
|
outline: 2px solid ${ve("primary",700)};
|
|
2219
|
-
outline-offset: 2px;
|
|
2220
2221
|
box-shadow: 0px 2px 4px -2px #0000001a;
|
|
2221
2222
|
box-shadow: 0px 4px 6px -1px #0000001a;
|
|
2222
2223
|
box-shadow:
|
|
@@ -2334,10 +2335,12 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2334
2335
|
border: 1px solid ${ve("neutral",300)};
|
|
2335
2336
|
`,Rl=ae`
|
|
2336
2337
|
padding: 16px;
|
|
2338
|
+
|
|
2337
2339
|
cursor: pointer;
|
|
2338
2340
|
border-bottom: 1px solid ${ve("neutral",300)};
|
|
2339
2341
|
&:focus-visible {
|
|
2340
|
-
outline-
|
|
2342
|
+
outline-offset: -2px;
|
|
2343
|
+
outline: 2px solid ${ve("primary",700)};
|
|
2341
2344
|
}
|
|
2342
2345
|
&:hover {
|
|
2343
2346
|
box-shadow: 0px 2px 4px -2px #0000001a;
|
|
@@ -3379,7 +3382,7 @@ function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3379
3382
|
color: ${ve("error",100)};
|
|
3380
3383
|
`,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
3384
|
width: 100%;
|
|
3382
|
-
|
|
3385
|
+
max-width: ${"small"===e?"234px":"320px"};
|
|
3383
3386
|
border-radius: 4px;
|
|
3384
3387
|
padding: ${"small"===e?"8px 8px 12px 8px":"8px 12px 12px 12px"};
|
|
3385
3388
|
display: flex;
|