@agregio-solutions/design-system 1.62.0 → 1.63.1
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/design-system.cjs
CHANGED
|
@@ -514,7 +514,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[xo]+=1);const Nm=s.createCont
|
|
|
514
514
|
width: ${Y.extraLarge};
|
|
515
515
|
height: ${Y.extraLarge};
|
|
516
516
|
}
|
|
517
|
-
`;function _d({size:e="medium"}){if(e==="small")return m.jsx(xl,{"data-size":e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M13 8.0437C13 7.05479 12.7068 6.0881 12.1573 5.26585C11.6079 4.4436 10.827 3.80274 9.91342 3.4243C8.99979 3.04587 7.99445 2.94685 7.02455 3.13977C6.05464 3.3327 5.16373 3.8089 4.46447 4.50817C3.7652 5.20743 3.289 6.09834 3.09607 7.06825C2.90315 8.03815 3.00216 9.04349 3.3806 9.95712C3.75904 10.8707 4.3999 11.6516 5.22215 12.201C6.04439 12.7505 7.01109 13.0437 8 13.0437",stroke:"var(--color-content-neutral-primary)",strokeWidth:"2"})});if(e==="medium")return m.jsx(xl,{"data-size":e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M21 12.0437C21 10.2637 20.4722 8.52361 19.4832 7.04357C18.4943 5.56353 17.0887 4.40997 15.4442 3.72879C13.7996 3.0476 11.99 2.86937 10.2442 3.21663C8.49836 3.5639 6.89471 4.42107 5.63604 5.67974C4.37737 6.93841 3.5202 8.54206 3.17293 10.2879C2.82567 12.0337 3.0039 13.8433 3.68508 15.4879C4.36627 17.1324 5.51983 18.538 6.99987 19.5269C8.47991 20.5159 10.22 21.0437 12 21.0437",stroke:"var(--color-content-neutral-primary)",strokeWidth:"2"})});if(e==="large")return m.jsx(xl,{"data-size":e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M29 16.0437C29 13.4725 28.2376 10.9591 26.8091 8.82129C25.3806 6.68345 23.3503 5.01721 20.9749 4.03327C18.5994 3.04933 15.9856 2.79188 13.4638 3.29349C10.9421 3.7951 8.62569 5.03323 6.80761 6.85131C4.98953 8.6694 3.7514 10.9858 3.24979 13.5075C2.74818 16.0293 3.00563 18.6431 3.98957 21.0186C4.97351 23.394 6.63975 25.4243 8.77759 26.8528C10.9154 28.2813 13.4288 29.0437 16 29.0437",stroke:"var(--color-content-neutral-primary)",strokeWidth:"2"})})}function Ae({text:e,mode:t="primary",size:n="medium",nature:r="action",iconLeft:a,iconRight:o,type:u,onClick:i,disabled:l,fullWidth:d,isLoading:f,href:c,...
|
|
517
|
+
`;function _d({size:e="medium"}){if(e==="small")return m.jsx(xl,{"data-size":e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M13 8.0437C13 7.05479 12.7068 6.0881 12.1573 5.26585C11.6079 4.4436 10.827 3.80274 9.91342 3.4243C8.99979 3.04587 7.99445 2.94685 7.02455 3.13977C6.05464 3.3327 5.16373 3.8089 4.46447 4.50817C3.7652 5.20743 3.289 6.09834 3.09607 7.06825C2.90315 8.03815 3.00216 9.04349 3.3806 9.95712C3.75904 10.8707 4.3999 11.6516 5.22215 12.201C6.04439 12.7505 7.01109 13.0437 8 13.0437",stroke:"var(--color-content-neutral-primary)",strokeWidth:"2"})});if(e==="medium")return m.jsx(xl,{"data-size":e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M21 12.0437C21 10.2637 20.4722 8.52361 19.4832 7.04357C18.4943 5.56353 17.0887 4.40997 15.4442 3.72879C13.7996 3.0476 11.99 2.86937 10.2442 3.21663C8.49836 3.5639 6.89471 4.42107 5.63604 5.67974C4.37737 6.93841 3.5202 8.54206 3.17293 10.2879C2.82567 12.0337 3.0039 13.8433 3.68508 15.4879C4.36627 17.1324 5.51983 18.538 6.99987 19.5269C8.47991 20.5159 10.22 21.0437 12 21.0437",stroke:"var(--color-content-neutral-primary)",strokeWidth:"2"})});if(e==="large")return m.jsx(xl,{"data-size":e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M29 16.0437C29 13.4725 28.2376 10.9591 26.8091 8.82129C25.3806 6.68345 23.3503 5.01721 20.9749 4.03327C18.5994 3.04933 15.9856 2.79188 13.4638 3.29349C10.9421 3.7951 8.62569 5.03323 6.80761 6.85131C4.98953 8.6694 3.7514 10.9858 3.24979 13.5075C2.74818 16.0293 3.00563 18.6431 3.98957 21.0186C4.97351 23.394 6.63975 25.4243 8.77759 26.8528C10.9154 28.2813 13.4288 29.0437 16 29.0437",stroke:"var(--color-content-neutral-primary)",strokeWidth:"2"})})}function Ae({text:e,mode:t="primary",size:n="medium",nature:r="action",iconLeft:a,iconRight:o,type:u,onClick:i,disabled:l,fullWidth:d,isLoading:f,href:c,target:p,...h}){const g=e==null||e==="";if(g&&!a&&!o)throw new Error("You must provide a text or an icon");if(a&&o)throw new Error("You can't provide both an iconLeft and an iconRight");const v=c?pD:fD;return m.jsxs(v,{...h,type:u||"button","data-size":n,"data-nature":r,"data-mode":t,"data-has-icon-left":!!a||f,"data-has-icon-right":!!o,"data-has-no-text":g,"data-fullwidth":d,onPress:i,isDisabled:l||f,href:c,target:p,children:[m.jsx(hD,{iconLeft:a,isLoading:f,size:n}),!g&&m.jsx(j9,{"data-size":n,children:e}),m.jsx(vD,{iconRight:o,text:e,isLoading:f,size:n})]})}function hD({iconLeft:e,isLoading:t,size:n}){if(t){const r=n==="small"?"small":"medium";return m.jsx(_d,{size:r})}return e?m.jsx(V9,{name:e,"data-size":n}):null}function vD({iconRight:e,text:t,isLoading:n,size:r}){return n&&!t||!e?null:m.jsx(V9,{name:e,"data-size":r})}function gD({children:e,title:t,description:n,unmountOnExit:r=!1,defaultExpanded:a=!1,isExpanded:o,onExpandedChange:u,isDisabled:i=!1,className:l,style:d,nature:f="default",noPadding:c=!1,withBottomCloseButton:p=!1}){const h=et(bD);return m.jsx(aD,{defaultExpanded:a,isExpanded:o,onExpandedChange:u,isDisabled:i,className:l,style:d,"data-nature":f,"data-no-padding":c,children:({isExpanded:g})=>{const v=r&&!g;return m.jsxs(m.Fragment,{children:[m.jsxs(oD,{children:[m.jsxs(uD,{slot:"trigger","data-open":g,"data-disabled":i,"data-nature":f,children:[m.jsx(iD,{slot:"trigger",children:t}),m.jsx(lD,{name:g?"minimize":"add"})]}),n&&m.jsx(sD,{"data-disabled":i,children:n})]}),m.jsx(dD,{"data-padding":!c,children:v?null:m.jsx(m.Fragment,{children:e})}),g&&p&&m.jsx(cD,{children:m.jsx(Ae,{slot:"trigger",text:h.close,mode:"tertiary",size:"small",iconLeft:"expand_less"})})]})}})}const bD={en:{close:"Close"},fr:{close:"Fermer"}},yD=M.span`
|
|
518
518
|
display: flex;
|
|
519
519
|
align-items: center;
|
|
520
520
|
justify-content: center;
|
package/dist/design-system.js
CHANGED
|
@@ -23002,31 +23002,33 @@ function Ne({
|
|
|
23002
23002
|
fullWidth: s,
|
|
23003
23003
|
isLoading: c,
|
|
23004
23004
|
href: d,
|
|
23005
|
-
|
|
23005
|
+
target: f,
|
|
23006
|
+
...p
|
|
23006
23007
|
}) {
|
|
23007
|
-
const
|
|
23008
|
-
if (
|
|
23008
|
+
const m = e == null || e === "";
|
|
23009
|
+
if (m && !a && !o)
|
|
23009
23010
|
throw new Error("You must provide a text or an icon");
|
|
23010
23011
|
if (a && o)
|
|
23011
23012
|
throw new Error("You can't provide both an iconLeft and an iconRight");
|
|
23012
23013
|
return /* @__PURE__ */ q(
|
|
23013
23014
|
d ? bD : gD,
|
|
23014
23015
|
{
|
|
23015
|
-
...
|
|
23016
|
+
...p,
|
|
23016
23017
|
type: u || "button",
|
|
23017
23018
|
"data-size": n,
|
|
23018
23019
|
"data-nature": r,
|
|
23019
23020
|
"data-mode": t,
|
|
23020
23021
|
"data-has-icon-left": !!a || c,
|
|
23021
23022
|
"data-has-icon-right": !!o,
|
|
23022
|
-
"data-has-no-text":
|
|
23023
|
+
"data-has-no-text": m,
|
|
23023
23024
|
"data-fullwidth": s,
|
|
23024
23025
|
onPress: i,
|
|
23025
23026
|
isDisabled: l || c,
|
|
23026
23027
|
href: d,
|
|
23028
|
+
target: f,
|
|
23027
23029
|
children: [
|
|
23028
23030
|
/* @__PURE__ */ v($D, { iconLeft: a, isLoading: c, size: n }),
|
|
23029
|
-
!
|
|
23031
|
+
!m && /* @__PURE__ */ v(G9, { "data-size": n, children: e }),
|
|
23030
23032
|
/* @__PURE__ */ v(
|
|
23031
23033
|
xD,
|
|
23032
23034
|
{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IconName } from '../Icon';
|
|
2
2
|
import { ButtonProps } from 'react-aria-components';
|
|
3
|
+
import { HTMLAttributeAnchorTarget } from 'react';
|
|
3
4
|
export type Props = Omit<ButtonProps, "onPress" | "isDisabled" | "children"> & {
|
|
4
5
|
/**
|
|
5
6
|
* Handler that is called when the press is released over the target.
|
|
@@ -48,5 +49,9 @@ export type Props = Omit<ButtonProps, "onPress" | "isDisabled" | "children"> & {
|
|
|
48
49
|
* Give an href to render the button as an anchor tag instead (using your configured router, see RouterProvider component)
|
|
49
50
|
*/
|
|
50
51
|
href?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Give a target attribute to use when href is provided
|
|
54
|
+
*/
|
|
55
|
+
target?: HTMLAttributeAnchorTarget;
|
|
51
56
|
};
|
|
52
|
-
export default function Button({ text, mode, size, nature, iconLeft, iconRight, type, onClick, disabled, fullWidth, isLoading, href, ...reactAriaButtonProps }: Props): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export default function Button({ text, mode, size, nature, iconLeft, iconRight, type, onClick, disabled, fullWidth, isLoading, href, target, ...reactAriaButtonProps }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type Props = {
|
|
2
|
+
export type Props = {
|
|
3
3
|
/**
|
|
4
4
|
* The title of the page.
|
|
5
5
|
*/
|
|
@@ -53,4 +53,3 @@ type Props = {
|
|
|
53
53
|
style?: React.CSSProperties;
|
|
54
54
|
};
|
|
55
55
|
export default function Header({ title, subtitle, tagComponent, logo, onGoBack, breadcrumbsComponent, helperIconComponent, notificationIconComponent, additionalActions, tabsComponent, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
export {};
|
package/package.json
CHANGED