@worldresources/wri-design-systems 2.180.2 → 2.181.0-react-19-beta.0
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/README.md +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +1 -1
- package/package.json +10 -14
package/README.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -2970,7 +2970,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2970
2970
|
button {
|
|
2971
2971
|
width: calc(48% - 24px);
|
|
2972
2972
|
}
|
|
2973
|
-
`,ff=({theme:e="light",navigationSection:r,utilitySection:o,actionsSection:i,linkRouter:a,isOpen:s,setIsOpen:l,pathname:c})=>{const[u,d]=n.useState(void 0),[p,h]=n.useState(-1),f=n.useRef(null),x=n.useRef([]),g=a;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:rf(s),children:s&&t.jsxs("div",{css:of,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[o?t.jsx("div",{css:af(e),children:o?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,r?t.jsx("div",{css:sf,children:r.map(((e,n)=>e.link?t.jsx(g,{to:e.link,href:e.link,onClick:()=>{d(void 0),h(-1),l(!1)},css:cf(c===e.link),children:e.label},e.label):t.jsxs("button",{css:uf,type:"button",ref:e=>x.current[n]=e,onClick:()=>{e.items&&(d(e),h(n),setTimeout((()=>{f.current?.focus()}),100))},children:[e.label,e.items?t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),i?t.jsx("div",{css:hf,children:i.map((e=>t.jsx(b,{...e,onClick:t=>{e?.onClick?.(t),d(void 0),h(-1),l(!1)}},e.ariaLabel)))}):null]})}),t.jsx("div",{css:df(!!u?.items),children:u?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:pf,children:[t.jsxs("button",{type:"button",onClick:()=>{d(void 0),h(-1),x.current[p]?.focus()},"aria-label":"Go back",css:nf(e),ref:f,children:[t.jsx($,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),u?.label]}),t.jsxs("button",{type:"button",onClick:()=>{d(void 0),h(-1),l(!1)},"aria-label":"Close menu",css:nf(e),children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:lf,children:u?.items?.map((e=>t.jsx(g,{to:e.link,href:e.link,css:cf(),onClick:()=>{d(void 0),h(-1),l(!1)},children:e.label},e.label)))})]}):null})]})},xf=1023,gf=r.css`
|
|
2973
|
+
`,ff=({theme:e="light",navigationSection:r,utilitySection:o,actionsSection:i,linkRouter:a,isOpen:s,setIsOpen:l,pathname:c})=>{const[u,d]=n.useState(void 0),[p,h]=n.useState(-1),f=n.useRef(null),x=n.useRef([]),g=a;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:rf(s),children:s&&t.jsxs("div",{css:of,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[o?t.jsx("div",{css:af(e),children:o?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,r?t.jsx("div",{css:sf,children:r.map(((e,n)=>e.link?t.jsx(g,{to:e.link,href:e.link,onClick:()=>{d(void 0),h(-1),l(!1)},css:cf(c===e.link),children:e.label},e.label):t.jsxs("button",{css:uf,type:"button",ref:e=>{x.current[n]=e},onClick:()=>{e.items&&(d(e),h(n),setTimeout((()=>{f.current?.focus()}),100))},children:[e.label,e.items?t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),i?t.jsx("div",{css:hf,children:i.map((e=>t.jsx(b,{...e,onClick:t=>{e?.onClick?.(t),d(void 0),h(-1),l(!1)}},e.ariaLabel)))}):null]})}),t.jsx("div",{css:df(!!u?.items),children:u?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:pf,children:[t.jsxs("button",{type:"button",onClick:()=>{d(void 0),h(-1),x.current[p]?.focus()},"aria-label":"Go back",css:nf(e),ref:f,children:[t.jsx($,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),u?.label]}),t.jsxs("button",{type:"button",onClick:()=>{d(void 0),h(-1),l(!1)},"aria-label":"Close menu",css:nf(e),children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:lf,children:u?.items?.map((e=>t.jsx(g,{to:e.link,href:e.link,css:cf(),onClick:()=>{d(void 0),h(-1),l(!1)},children:e.label},e.label)))})]}):null})]})},xf=1023,gf=r.css`
|
|
2974
2974
|
width: 64px;
|
|
2975
2975
|
height: 100%;
|
|
2976
2976
|
z-index: 100;
|
package/dist/index.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ type TooltipProps = {
|
|
|
137
137
|
closeDelay?: number;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
declare const Tooltip: ({ children, content, showArrow, disabled, position, variant, portalRef, openDelay, closeDelay, }: TooltipProps) => string | number | boolean | Iterable<React$1.ReactNode> | _emotion_react_jsx_runtime.JSX.Element | null | undefined;
|
|
140
|
+
declare const Tooltip: ({ children, content, showArrow, disabled, position, variant, portalRef, openDelay, closeDelay, }: TooltipProps) => string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | _emotion_react_jsx_runtime.JSX.Element | null | undefined;
|
|
141
141
|
|
|
142
142
|
type CheckboxProps = Omit<Checkbox$1.RootProps, 'size' | 'variant' | 'colorPalette' | 'icon' | 'iconColor' | 'iconSize' | 'spacing' | 'invalid'> & {
|
|
143
143
|
name?: string;
|
|
@@ -480,7 +480,7 @@ type MapPopUpProps = {
|
|
|
480
480
|
open: boolean;
|
|
481
481
|
onOpenChange: (open: boolean) => void;
|
|
482
482
|
/** The element that the modal/connector should point to */
|
|
483
|
-
anchorRef: React.RefObject<
|
|
483
|
+
anchorRef: React.RefObject<HTMLButtonElement | null>;
|
|
484
484
|
header: React.ReactNode;
|
|
485
485
|
content: React.ReactNode;
|
|
486
486
|
footer?: React.ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -3027,7 +3027,7 @@ function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3027
3027
|
button {
|
|
3028
3028
|
width: calc(48% - 24px);
|
|
3029
3029
|
}
|
|
3030
|
-
`,Kg=({theme:e="light",navigationSection:t,utilitySection:n,actionsSection:r,linkRouter:o,isOpen:i,setIsOpen:a,pathname:l})=>{const[s,c]=J(void 0),[d,u]=J(-1),p=Q(null),h=Q([]),f=o;return q(U,{children:[G("div",{css:Hg(i),children:i&&q("div",{css:Bg,children:[q("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[n?G("div",{css:Fg(e),children:n?.map((e=>G("div",{className:"ds-utility-item",children:e})))}):null,t?G("div",{css:Zg,children:t.map(((e,t)=>e.link?G(f,{to:e.link,href:e.link,onClick:()=>{c(void 0),u(-1),a(!1)},css:qg(l===e.link),children:e.label},e.label):q("button",{css:Gg,type:"button",ref:e=>h.current[t]=e,onClick:()=>{e.items&&(c(e),u(t),setTimeout((()=>{p.current?.focus()}),100))},children:[e.label,e.items?G(Me,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),r?G("div",{css:Yg,children:r.map((e=>G(Le,{...e,onClick:t=>{e?.onClick?.(t),c(void 0),u(-1),a(!1)}},e.ariaLabel)))}):null]})}),G("div",{css:Ug(!!s?.items),children:s?.items?q(U,{children:[q("div",{css:Xg,children:[q("button",{type:"button",onClick:()=>{c(void 0),u(-1),h.current[d]?.focus()},"aria-label":"Go back",css:zg(e),ref:p,children:[G(Me,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),s?.label]}),q("button",{type:"button",onClick:()=>{c(void 0),u(-1),a(!1)},"aria-label":"Close menu",css:zg(e),children:["Close",G(Ne,{height:"16px",width:"16px"})]})]}),G("div",{css:Wg,children:s?.items?.map((e=>G(f,{to:e.link,href:e.link,css:qg(),onClick:()=>{c(void 0),u(-1),a(!1)},children:e.label},e.label)))})]}):null})]})},Jg=1023,Qg=({variant:e="default",theme:t="light",logo:n,linkRouter:r,pathname:o,navigationSection:i,utilitySection:a,actionsSection:l,maxWidth:s,fixed:c,onNavbarHeightChange:d,backgroundColor:u})=>{const p=Q(null),h=Q(null),f=Q(null),[g,v]=J(!1),[m,x]=J(-1),[b,y]=J("undefined"!=typeof window&&window?.innerWidth<=Jg),[w,C]=J(!1),$=r,k=ie((()=>{if(h.current&&p.current&&f.current){const e=p.current.getBoundingClientRect(),t=h.current.getBoundingClientRect(),n=f.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Jg||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>Jg&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),x(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),x(-1)):(d?.(48),v(!1),x(-1)),g&&(window.innerWidth<=Jg||n.right>=t.left?(y(!0),d?.(48)):(y(!1),d?.(96)))}}),[m,g]);ee((()=>(k(),window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k)})),[k]);const S="condensed"===e;return q("nav",{css:Tg(g&&!b,c,u,t,S),children:[q("div",{css:_g(g&&!b,s,S),children:[q("div",{css:Mg(g&&!b||"dark"===t,S),ref:p,children:[n?G("div",{ref:f,css:Dg,children:n}):null,G("div",{css:Ng(g),children:i?.map((e=>e.link?G($,{to:e.link,href:e.link,css:jg(o===e.link,t),children:e.label},e.label):G(Pt,{theme:t,label:e.label,items:e.items||[]},e.label)))})]}),G("div",{css:Vg(S),ref:h,children:b?q("button",{type:"button",onClick:()=>C(!w),"aria-label":"Open menu",css:zg(t),children:[w?"Close":"Menu",G(w?Ne:at,{height:"16px",width:"16px"})]}):q(U,{children:[G("div",{css:Vg(S),children:a?.map(((e,t)=>G("div",{css:Ig(g),children:e},t)))}),l?.length?G("div",{css:Ag(g),children:l.map((e=>G(Le,{...e},e.ariaLabel)))}):null]})})]}),g&&!b?G("div",{css:Pg(t,S),children:i?.map((e=>e.link?G($,{to:e.link,href:e.link,css:jg(o===e.link,t),children:e.label},e.label):G(Pt,{theme:t,label:e.label,items:e.items||[]},e.label)))}):null,b?G(Kg,{theme:t,navigationSection:i,utilitySection:a,actionsSection:l,linkRouter:r,isOpen:w,setIsOpen:C,pathname:o}):null]})},ev=de`
|
|
3030
|
+
`,Kg=({theme:e="light",navigationSection:t,utilitySection:n,actionsSection:r,linkRouter:o,isOpen:i,setIsOpen:a,pathname:l})=>{const[s,c]=J(void 0),[d,u]=J(-1),p=Q(null),h=Q([]),f=o;return q(U,{children:[G("div",{css:Hg(i),children:i&&q("div",{css:Bg,children:[q("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[n?G("div",{css:Fg(e),children:n?.map((e=>G("div",{className:"ds-utility-item",children:e})))}):null,t?G("div",{css:Zg,children:t.map(((e,t)=>e.link?G(f,{to:e.link,href:e.link,onClick:()=>{c(void 0),u(-1),a(!1)},css:qg(l===e.link),children:e.label},e.label):q("button",{css:Gg,type:"button",ref:e=>{h.current[t]=e},onClick:()=>{e.items&&(c(e),u(t),setTimeout((()=>{p.current?.focus()}),100))},children:[e.label,e.items?G(Me,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),r?G("div",{css:Yg,children:r.map((e=>G(Le,{...e,onClick:t=>{e?.onClick?.(t),c(void 0),u(-1),a(!1)}},e.ariaLabel)))}):null]})}),G("div",{css:Ug(!!s?.items),children:s?.items?q(U,{children:[q("div",{css:Xg,children:[q("button",{type:"button",onClick:()=>{c(void 0),u(-1),h.current[d]?.focus()},"aria-label":"Go back",css:zg(e),ref:p,children:[G(Me,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),s?.label]}),q("button",{type:"button",onClick:()=>{c(void 0),u(-1),a(!1)},"aria-label":"Close menu",css:zg(e),children:["Close",G(Ne,{height:"16px",width:"16px"})]})]}),G("div",{css:Wg,children:s?.items?.map((e=>G(f,{to:e.link,href:e.link,css:qg(),onClick:()=>{c(void 0),u(-1),a(!1)},children:e.label},e.label)))})]}):null})]})},Jg=1023,Qg=({variant:e="default",theme:t="light",logo:n,linkRouter:r,pathname:o,navigationSection:i,utilitySection:a,actionsSection:l,maxWidth:s,fixed:c,onNavbarHeightChange:d,backgroundColor:u})=>{const p=Q(null),h=Q(null),f=Q(null),[g,v]=J(!1),[m,x]=J(-1),[b,y]=J("undefined"!=typeof window&&window?.innerWidth<=Jg),[w,C]=J(!1),$=r,k=ie((()=>{if(h.current&&p.current&&f.current){const e=p.current.getBoundingClientRect(),t=h.current.getBoundingClientRect(),n=f.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=Jg||window.innerWidth<=m?(d?.(96),v(!0)):window.innerWidth>Jg&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),x(window.innerWidth)):window.innerWidth>m&&(d?.(48),v(!1),x(-1)):(d?.(48),v(!1),x(-1)),g&&(window.innerWidth<=Jg||n.right>=t.left?(y(!0),d?.(48)):(y(!1),d?.(96)))}}),[m,g]);ee((()=>(k(),window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k)})),[k]);const S="condensed"===e;return q("nav",{css:Tg(g&&!b,c,u,t,S),children:[q("div",{css:_g(g&&!b,s,S),children:[q("div",{css:Mg(g&&!b||"dark"===t,S),ref:p,children:[n?G("div",{ref:f,css:Dg,children:n}):null,G("div",{css:Ng(g),children:i?.map((e=>e.link?G($,{to:e.link,href:e.link,css:jg(o===e.link,t),children:e.label},e.label):G(Pt,{theme:t,label:e.label,items:e.items||[]},e.label)))})]}),G("div",{css:Vg(S),ref:h,children:b?q("button",{type:"button",onClick:()=>C(!w),"aria-label":"Open menu",css:zg(t),children:[w?"Close":"Menu",G(w?Ne:at,{height:"16px",width:"16px"})]}):q(U,{children:[G("div",{css:Vg(S),children:a?.map(((e,t)=>G("div",{css:Ig(g),children:e},t)))}),l?.length?G("div",{css:Ag(g),children:l.map((e=>G(Le,{...e},e.ariaLabel)))}):null]})})]}),g&&!b?G("div",{css:Pg(t,S),children:i?.map((e=>e.link?G($,{to:e.link,href:e.link,css:jg(o===e.link,t),children:e.label},e.label):G(Pt,{theme:t,label:e.label,items:e.items||[]},e.label)))}):null,b?G(Kg,{theme:t,navigationSection:i,utilitySection:a,actionsSection:l,linkRouter:r,isOpen:w,setIsOpen:C,pathname:o}):null]})},ev=de`
|
|
3031
3031
|
width: 64px;
|
|
3032
3032
|
height: 100%;
|
|
3033
3033
|
z-index: 100;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldresources/wri-design-systems",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.181.0-react-19-beta.0",
|
|
4
4
|
"description": "WRI UI Library",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@chakra-ui/storybook-addon": "^5.2.5",
|
|
46
46
|
"@chromatic-com/storybook": "^1.9.0",
|
|
47
47
|
"@emotion/react": "^11.14.0",
|
|
48
|
+
"@floating-ui/react": "^0.27.16",
|
|
48
49
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
49
50
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
50
51
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -63,19 +64,20 @@
|
|
|
63
64
|
"@testing-library/user-event": "^13.5.0",
|
|
64
65
|
"@types/jest": "^27.5.2",
|
|
65
66
|
"@types/node": "^16.18.112",
|
|
66
|
-
"@types/react": "^
|
|
67
|
-
"@types/react-dom": "^
|
|
67
|
+
"@types/react": "^19.0.1",
|
|
68
|
+
"@types/react-dom": "^19.0.1",
|
|
68
69
|
"eslint-config-airbnb": "^19.0.4",
|
|
69
70
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
70
71
|
"eslint-config-prettier": "^9.1.0",
|
|
71
72
|
"eslint-plugin-storybook": "^0.9.0",
|
|
72
73
|
"prettier": "^3.3.3",
|
|
73
74
|
"prop-types": "^15.8.1",
|
|
74
|
-
"react": "^
|
|
75
|
-
"react-dom": "^
|
|
75
|
+
"react": "^19.0.1",
|
|
76
|
+
"react-dom": "^19.0.1",
|
|
76
77
|
"react-draggable": "^4.4.6",
|
|
77
78
|
"react-router-dom": "^7.1.5",
|
|
78
79
|
"react-scripts": "5.0.1",
|
|
80
|
+
"react-spring-bottom-sheet": "^3.4.1",
|
|
79
81
|
"rollup": "^4.34.8",
|
|
80
82
|
"rollup-plugin-dts": "^6.1.1",
|
|
81
83
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
@@ -89,19 +91,13 @@
|
|
|
89
91
|
"peerDependencies": {
|
|
90
92
|
"@chakra-ui/react": "^3.14.2",
|
|
91
93
|
"@emotion/react": "^11.14.0",
|
|
92
|
-
"react": "^
|
|
93
|
-
"react-dom": "^
|
|
94
|
+
"react": "^19.0.1",
|
|
95
|
+
"react-dom": "^19.0.1"
|
|
94
96
|
},
|
|
95
97
|
"repository": {
|
|
96
98
|
"type": "git",
|
|
97
99
|
"url": "git+https://github.com/wri/wri-design-systems.git"
|
|
98
100
|
},
|
|
99
101
|
"author": "WRI",
|
|
100
|
-
"license": "MIT"
|
|
101
|
-
"dependencies": {
|
|
102
|
-
"@chakra-ui/charts": "^3.30.0",
|
|
103
|
-
"@floating-ui/react": "^0.27.16",
|
|
104
|
-
"react-spring-bottom-sheet": "^3.4.1",
|
|
105
|
-
"recharts": "^3.6.0"
|
|
106
|
-
}
|
|
102
|
+
"license": "MIT"
|
|
107
103
|
}
|