@orfium/ictinus 4.55.0-next.3 → 4.55.0-next.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/components/Avatar/Avatar.js +1 -1
- package/dist/components/Avatar/Avatar.style.js +7 -7
- package/dist/components/Avatar/Avatar.tokens.js +1 -1
- package/dist/components/Avatar/AvatarStack/AvatarStack.style.js +7 -7
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.style.js +1 -1
- package/dist/components/Button/Button.tokens.js +1 -0
- package/dist/components/Button/ButtonLoader/ButtonLoader.js +1 -1
- package/dist/components/Button/ButtonLoader/ButtonLoader.style.js +1 -5
- package/dist/components/ButtonBase/ButtonBase.js +1 -1
- package/dist/components/ButtonBase/ButtonBase.style.js +1 -1
- package/dist/components/DatePicker/OverlayComponent/OverlayComponent.js +1 -1
- package/dist/components/DatePicker/OverlayComponent/components/MonthWrapper/MonthWrapper.js +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalContent/ModalContent.js +1 -1
- package/dist/components/Notification/NotificationVisual/NotificationVisual.js +1 -1
- package/dist/components/Notification/Snackbar/Snackbar.js +1 -1
- package/dist/components/Notification/subcomponents/CompactNotification/CompactNotification.js +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Table/components/RenderRowOrNestedRow/components/ExpandedButtonCell/ExpandedButtonCell.js +1 -1
- package/dist/components/TopAppBar/components/UserMenu/UserMenu.js +1 -1
- package/dist/components/Typography/Typography.js +1 -0
- package/dist/components/Typography/Typography.style.js +85 -0
- package/dist/index.d.ts +74 -62
- package/dist/theme/states/states.tokens.js +1 -0
- package/dist/theme/tokens/utils.js +1 -1
- package/package.json +1 -1
- package/dist/components/ButtonBase/config.js +0 -1
- package/dist/components/ButtonBase/utils.js +0 -1
- package/dist/components/IconButton/IconButton.style.js +0 -1
- package/dist/hooks/useLoading.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"@emotion/react/jsx-runtime";import r from"../../hooks/useTheme.js";import e,{useMemo as a}from"react";import s from"../Icon/Icon.js";import{avatarStyle as t}from"./Avatar.style.js";import i from"./Avatar.tokens.js";const c=e.forwardRef((({src:e="",size:c=1,color:m="blue",className:l,dataTestPrefixId:n="",children:d},f)=>{const p=r(),v=i(p),u=a((()=>e?o("img",{src:e},void 0):!e&&d?d:o(s,{color:v.color.getForegroundColor(m),name:"userAvatar",size:parseFloat(v.iconSize[c])},void 0)),[d,m,c,e,v.color,v.iconSize]);return o("div",Object.assign({ref:f,className:l,css:t({size:c,color:m}),"data-testid":`${n}_avatar`},{children:u}),void 0)}));c.displayName="Avatar";export{c as default};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{css as o}from"@emotion/react";import{flex as e}from"../../theme/functions.js";import r from"./Avatar.tokens.js";const t=({size:t,color:i})=>s=>o`
|
|
1
|
+
import{css as o}from"@emotion/react";import{flex as e}from"../../theme/functions.js";import r from"./Avatar.tokens.js";const t=({size:t,color:i})=>s=>{const n=r(s);return o`
|
|
2
2
|
${e};
|
|
3
|
-
width: ${
|
|
4
|
-
height: ${
|
|
3
|
+
width: ${n.size[t]};
|
|
4
|
+
height: ${n.size[t]};
|
|
5
5
|
border-radius: ${s.globals.borderRadius.get("7")};
|
|
6
6
|
border: ${s.globals.borderWidth.get("1")} solid;
|
|
7
7
|
border-color: ${s.tokens.palette.get("accents.lightPurple.main")};
|
|
8
8
|
box-sizing: border-box;
|
|
9
|
-
background-color: ${
|
|
10
|
-
color: ${
|
|
9
|
+
background-color: ${n.color.getBackgroundColor(i)};
|
|
10
|
+
color: ${n.color.getForegroundColor(i)};
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
position: relative;
|
|
13
|
-
font-size: ${
|
|
13
|
+
font-size: ${n.fontSize[t]};
|
|
14
14
|
font-weight: ${s.globals.typography.weights.get("medium")};
|
|
15
15
|
align-items: center;
|
|
16
16
|
flex-shrink: 0;
|
|
@@ -22,4 +22,4 @@ import{css as o}from"@emotion/react";import{flex as e}from"../../theme/functions
|
|
|
22
22
|
width: 100%;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
`};export{t as avatarStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{rem as g}from"../../theme/utils.js";const t=g=>.8*parseFloat(g),s=t=>g(.8*parseFloat(t)),l=g=>({size:{1:g.globals.sizing.get("5"),2:g.globals.sizing.get("6"),3:g.globals.sizing.get("9"),4:g.globals.sizing.get("12"),5:g.globals.sizing.get("15"),6:g.globals.sizing.get("18")},iconSize:{1:g.globals.sizing.get("5",t),2:g.globals.sizing.get("6",t),3:g.globals.sizing.get("9",t),4:g.globals.sizing.get("12",t),5:g.globals.sizing.get("15",t),6:g.globals.sizing.get("18",t)},avatarStackSize:{1:g.globals.sizing.get("5",s),2:g.globals.sizing.get("6",s),3:g.globals.sizing.get("9",s),4:g.globals.sizing.get("12",s),5:g.globals.sizing.get("15",s),6:g.globals.sizing.get("18",s)},color:{getBackgroundColor:t=>g.tokens.palette.get(`accents.${t}.main`),getForegroundColor:t=>g.tokens.palette.get(`accents.${t}.contrast`)},fontSize:{1:g.globals.typography.fontSizes.get("1"),2:g.globals.typography.fontSizes.get("2"),3:g.globals.typography.fontSizes.get("3"),4:g.globals.typography.fontSizes.get("4"),5:g.globals.typography.fontSizes.get("8"),6:g.globals.typography.fontSizes.get("10")}});export{l as default};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{css as t}from"@emotion/react";import{flex as
|
|
2
|
-
${
|
|
1
|
+
import{css as t}from"@emotion/react";import{flex as e}from"../../../theme/functions.js";import i from"../Avatar.tokens.js";const o=({size:o})=>r=>{const n=i(r);return t`
|
|
2
|
+
${e};
|
|
3
3
|
|
|
4
4
|
div:last-child {
|
|
5
|
-
width: ${
|
|
5
|
+
width: ${n.size[o]};
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
z-index: ${
|
|
9
|
-
width: ${
|
|
10
|
-
|
|
7
|
+
`},r=({zIndex:e,size:o})=>r=>{const n=i(r);return t`
|
|
8
|
+
z-index: ${e};
|
|
9
|
+
width: ${n.avatarStackSize[o]};
|
|
10
|
+
`};export{o as avatarStackStyle,r as avatarWrapperStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o,jsxs as r}from"@emotion/react/jsx-runtime";import t from"../../hooks/useTheme.js";import i from"react";import e from"./Button.tokens.js";import n from"../ButtonBase/ButtonBase.js";import{buttonSpanStyle as s}from"./Button.style.js";import a from"../Avatar/Avatar.js";import c from"../Icon/Icon.js";const m=i.forwardRef(((i,m)=>{const{type:l="primary",iconLeftName:d,iconRightName:p,avatar:f,children:u,onClick:v,isLoading:j}=i,h=["primary","secondary","tertiary"].includes(l)&&f,y=t(),B=e(y);return o(n,Object.assign({},i,{ref:m,isLoading:j,onClick:v},{children:r("span",Object.assign({css:s()},{children:[h&&o(a,Object.assign({src:null==f?void 0:f.src},{children:null==f?void 0:f.label}),void 0),d&&!h&&o(c,{name:d,color:B.color[l].textColor},void 0),o("span",{children:u},void 0),p&&o(c,{name:p,color:B.color[l].textColor},void 0)]}),void 0)}),void 0)}));m.displayName="Button";export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e=()=>e=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.globals.spacing.get("4")});export{e as buttonSpanStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>({size:e.globals.sizing.get("5"),spacing:{textButton:{padding:e.globals.spacing.get("4"),paddingVertical:e.globals.spacing.get("4"),paddingHorizontal:e.globals.spacing.get("6")},iconButton:{padding:e.globals.spacing.get("4")}},borderRadius:{text:e.globals.borderRadius.get("2"),wrapper:e.globals.borderRadius.get("0"),icon:e.globals.borderRadius.get("5")},borderWidth:{1:e.globals.borderWidth.get("1"),2:e.globals.borderWidth.get("2")},color:{primary:{borderColor:e.tokens.borderColor.get("decorative.transparent"),textColor:e.tokens.textColor.get("inverted.primary")},secondary:{borderColor:e.tokens.borderColor.get("decorative.transparent"),textColor:e.tokens.textColor.get("light.active")},tertiary:{borderColor:e.tokens.borderColor.get("decorative.transparent"),borderColorSegmented:e.tokens.borderColor.get("decorative.light.muted"),textColor:e.tokens.textColor.get("light.active")},invertedAlt:{borderColor:e.tokens.borderColor.get("decorative.transparent"),textColor:e.tokens.textColor.get("inverted.active")},danger:{borderColor:e.tokens.borderColor.get("decorative.transparent"),textColor:e.tokens.textColor.get("light.error")},inverted:{borderColor:e.tokens.borderColor.get("decorative.transparent"),textColor:e.tokens.textColor.get("light.primary")}}});export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"@emotion/react/jsx-runtime";import{loaderWrapperStyle as s,barWrapperStyle as d,barStyle as i}from"./ButtonLoader.style.js";const e=({dataTestId:e})=>t("div",Object.assign({css:s(),"data-testid":e},{children:t("div",Object.assign({css:d()},{children:t("div",{css:i()},void 0)}),void 0)}),void 0);e.displayName="ButtonLoader";export{e as default};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import{css as t}from"@emotion/react";import{
|
|
2
|
-
width: ${m?e(m):"auto"};
|
|
3
|
-
${o};
|
|
4
|
-
justify-content: center;
|
|
5
|
-
`;export{m as centralizedLoader};
|
|
1
|
+
import{css as t,keyframes as o}from"@emotion/react";import{rem as e}from"../../../theme/utils.js";import i from"../Button.tokens.js";const r=()=>t({width:"100%",position:"absolute"}),n=()=>o=>{const r=i(o);return t({width:"100%",height:e(4),overflow:"hidden",borderTopLeftRadius:r.borderRadius.text,borderTopRightRadius:r.borderRadius.text,position:"relative",":before":{content:'""',width:"100%",height:e(2),background:o.utils.getColor("magenta",150),display:"block"}})},d=()=>{const i=o({from:{left:"-50%"},to:{left:"100%"}});return t({width:"50%",background:"linear-gradient(270deg, #F814E1 0.02%, #4945EE 100%)",height:e(2),position:"absolute",bottom:"0",top:"0",animation:`${i} 1.5s infinite`})};export{d as barStyle,n as barWrapperStyle,r as loaderWrapperStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"@emotion/react/jsx-runtime";import
|
|
1
|
+
import{jsxs as t,jsx as o}from"@emotion/react/jsx-runtime";import s from"react";import{generateTestDataId as i}from"../../utils/helpers.js";import{buttonWrapperStyle as e,buttonBaseStyle as r}from"./ButtonBase.style.js";import a from"../Button/ButtonLoader/ButtonLoader.js";import n from"../Typography/Typography.js";const d=s.forwardRef(((s,d)=>{const{type:l="primary",isBlock:c=!1,isDisabled:p=!1,isLoading:m=!1,isIconButton:u=!1,shape:B="circle",children:y,dataTestId:f="",dataTestPrefixId:b="",htmlType:h="button",onClick:j,onBlur:g,sx:T}=s,k=`${b}button`;return t("div",Object.assign({css:e({isBlock:c})},{children:[m&&!p&&o(a,{dataTestId:k},void 0),o("button",Object.assign({ref:d,type:h,"data-testid":i(k,f),css:r({type:l,isLoading:m,isBlock:c,isDisabled:p,isIconButton:u,shape:B,sx:T}),onClick:t=>{j&&j(t)},onBlur:g,disabled:p},{children:u?y:o(n,Object.assign({type:"label02"},{children:y}),void 0)}),void 0)]}),void 0)}));d.displayName="ButtonBase";export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css as o}from"@emotion/react";import
|
|
1
|
+
import{css as o}from"@emotion/react";import t from"../../theme/states/states.tokens.js";import i from"../Button/Button.tokens.js";const n=({isBlock:t})=>o({position:"relative",width:t?"100%":"fit-content"}),r=({type:n="primary",isBlock:r,isLoading:e,isDisabled:s,isIconButton:a,shape:d,sx:c})=>l=>{const b=i(l),u=t(l),g={color:b.color[n].textColor,width:r?"100%":void 0,backgroundColor:u[e?"active":"inactive"].backgroundColor[n],padding:a?b.spacing.iconButton.padding:`${b.spacing.textButton.paddingVertical} ${b.spacing.textButton.paddingHorizontal}`,borderRadius:a&&"circle"===d?b.borderRadius.icon:b.borderRadius.text,border:"none",cursor:"pointer",transition:"background-color,border 150ms linear",":focus-visible:not(:disabled)":u.focus,":disabled":u.disabled,":hover:not(:disabled)":{backgroundColor:u.hover.backgroundColor[n]},":active:not(:disabled)":{backgroundColor:u.active.backgroundColor[n]}},p=e&&!s?{pointerEvents:"none"}:{};return o(Object.assign(Object.assign(Object.assign({},g),p),null==c?void 0:c.container))};export{r as buttonBaseStyle,n as buttonWrapperStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as t}from"@emotion/react/jsx-runtime";import*as s from"react";import{useState as o,useCallback as i}from"react";import n from"../../Button/Button.js";import{currentDay as r}from"../utils.js";import a from"./components/MonthWrapper/MonthWrapper.js";import{overlayWrapperStyle as c,optionsWrapperStyle as d,optionStyle as l,buttonsMonthsWrapperStyle as m,monthsWrapperStyle as h,buttonsWrapperStyle as p}from"./OverlayComponent.style.js";var v=s.memo((({selectedOption:s,setSelectedOption:v=(()=>{}),isRangePicker:b=!1,extraOptions:g=[],onDaySelect:j,selectedDays:f,disabledDates:D,onCancel:O=(()=>{}),onApply:y=(()=>{})})=>{const[k,u]=o(r),[w,A]=o(r),C=i(((e="back")=>{u((t=>t.month(t.month()+("forward"===e?1:-1)))),A((t=>t.month(t.month()+("forward"===e?1:-1))))}),[k,w]);return e("div",Object.assign({css:c()},{children:[g.length>0&&b&&t("div",Object.assign({css:d()},{children:g.map((e=>t("div",Object.assign({css:l({isSelected:s===e.value}),onClick:()=>v(e.value)},{children:e.label}),e.value)))}),void 0),e("div",Object.assign({css:m({isRangePicker:b})},{children:[e("div",Object.assign({css:h({isRangePicker:b})},{children:[t(a,{date:k,onDaySelect:j,selectedDays:f,setDate:u,handleArrow:C,showedArrows:b?"left":"both",disabledDates:D,isRangePicker:b},void 0),b&&t(a,{date:w.month(w.month()+1),onDaySelect:j,selectedDays:f,setDate:A,handleArrow:C,showedArrows:b?"right":"both",disabledDates:D,isRangePicker:b},void 0)]}),void 0),!b&&e("div",Object.assign({css:p()},{children:[t(n,Object.assign({onClick:O},{children:"Cancel"}),void 0),t(n,Object.assign({onClick:y,isDisabled:Boolean(!f.from||!f.to)},{children:"Apply"}),void 0)]}),void 0)]}),void 0)]}),void 0)}));export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"@emotion/react/jsx-runtime";import t from"../../../../../hooks/useTheme.js";import i from"lodash/range.js";import r,{useState as n,useMemo as s}from"react";import a from"../../../Month/Month.js";import{monthWrapperStyle as
|
|
1
|
+
import{jsx as e,jsxs as o}from"@emotion/react/jsx-runtime";import t from"../../../../../hooks/useTheme.js";import i from"lodash/range.js";import r,{useState as n,useMemo as s}from"react";import a from"../../../Month/Month.js";import{monthWrapperStyle as c,monthHeaderWrapperStyle as l,monthHeaderNavigationIconWrapperStyle as d,monthHeaderTitleWrapperStyle as m,monthHeaderTitleStyle as h}from"./MonthWrapper.style.js";import v from"../../../../Button/Button.js";import g from"../../../../Icon/Icon.js";import f from"../../../../Select/components/SelectMenu/SelectMenu.js";import p from"../../../../utils/ClickAwayListener/ClickAwayListener.js";var u=r.memo((({setDate:u,onDaySelect:j=(()=>{}),selectedDays:M,date:b,handleArrow:k=(()=>{}),showedArrows:Y="both",disabledDates:y,isRangePicker:O=!1})=>{const[D,w]=n(!1),C=t(),S=s((()=>function(e){const o=(new Date).getFullYear()+10,t=(new Date).getFullYear()-10;return i(t,o).map((o=>({value:o.toString(),label:`${e.format("MMMM")} ${o.toString()}`})))}(b)),[b]);return e(r.Fragment,{children:o("div",Object.assign({css:c()},{children:[o("div",Object.assign({css:l()},{children:[("left"===Y||"both"===Y)&&e("div",Object.assign({onClick:()=>k("back"),css:d({position:"left"})},{children:e(g,{name:"chevronSmallLeft",color:C.utils.getColor("darkGrey",850),size:25},void 0)}),void 0),o(p,Object.assign({onClick:()=>{w(!1)}},{children:[o("div",Object.assign({css:m({isRangePicker:O})},{children:[e("div",Object.assign({css:h({isRangePicker:O})},{children:O?o("div",{children:[b.format("MMMM")," ",b.format("YYYY")]},void 0):o(v,Object.assign({onClick:()=>w(!D),iconRightName:"triangleDown"},{children:[b.format("MMMM")," ",b.format("YYYY")]}),void 0)}),void 0),D&&e(f,{filteredOptions:S,handleOptionClick:e=>{u(b.year(Number(e.value))),w(!1)},selectedOption:b.format("YYYY")},void 0)]}),void 0),("right"===Y||"both"===Y)&&e("div",Object.assign({onClick:()=>k("forward"),css:d({position:"right"})},{children:e(g,{name:"chevronSmallRight",color:C.utils.getColor("darkGrey",850),size:25},void 0)}),void 0)]}),void 0)]}),void 0),e(a,{year:b.year(),month:b.month(),onDaySelect:j,selectedDays:M,disabledDates:y},void 0)]}),void 0)},void 0)}));export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"@emotion/react/jsx-runtime";import
|
|
1
|
+
import{jsx as o}from"@emotion/react/jsx-runtime";import t from"../../hooks/useTheme.js";import r from"react";import e from"../Button/Button.tokens.js";import n from"../Icon/Icon.js";import s from"../ButtonBase/ButtonBase.js";const i=r.forwardRef(((r,i)=>{const{name:a,type:m="primary",shape:c="circle",dataTestPrefixId:f}=r,p=t(),d=e(p).color[m].textColor;return o(s,Object.assign({},r,{ref:i,isIconButton:!0,shape:c,dataTestPrefixId:f?`${f}-icon-`:"icon-"},{children:o(n,{name:a,color:d},void 0)}),void 0)}));i.displayName="IconButton";export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as i}from"@emotion/react/jsx-runtime";import o from"../../hooks/useTheme.js";import e from"lodash/isEmpty.js";import*as s from"react";import r from"../Button/Button.js";import n from"../utils/ClickAwayListener/ClickAwayListener.js";import{optionsStyle as a}from"../utils/DropdownOptions/index.js";import{wrapperStyle as m}from"./Menu.style.js";import l from"../List/List.js";const d=d=>{const{items:c,onSelect:p,buttonText:u="More",menuPosition:f="left",buttonType:v="primary",rightIconName:j,isDisabled:h=!1,leftIconName:b,avatar:y,dataTestId:g}=d,[k,O]=s.useState(!1),C=o();return t(n,Object.assign({onClick:()=>O(!1)},{children:i("div",Object.assign({css:m(),"data-testid":g},{children:[t(r,Object.assign({type:v,onClick:()=>O(!k),isDisabled:h,iconRightName:j,iconLeftName:b,avatar:e(y)?void 0:{src:null==y?void 0:y.src,label:null==y?void 0:y.letter}},{children:t("span",{children:u},void 0)}),void 0),k&&t("div",Object.assign({css:a({menuPosition:f})(C)},{children:c&&t(l,{data:c,rowSize:"small",handleOptionClick:t=>{O(!1),p(t)}},void 0)}),void 0)]}),void 0)}),void 0)};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as t}from"@emotion/react/jsx-runtime";import{useEffect as e}from"react";import s from"../../hooks/useEscape.js";import{generateTestDataId as i}from"../../utils/helpers.js";import d from"../Card/Card.js";import n from"../IconButton/IconButton.js";import r from"../utils/ClickAwayListener/ClickAwayListener.js";import{backgroundContainer as a,cardSizing as c,closeContainer as l,modalContainer as m}from"./Modal.style.js";import j from"./ModalContent/ModalContent.js";const p=({isOpen:p=!1,onClose:v,dataTestId:f,children:u,contentProps:C,isContentPadded:h=!0})=>(s((()=>{v()})),e((()=>(p&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="unset"})),[p]),p?o("div",Object.assign({css:a,"data-testid":i("modal-container",f)},{children:o(r,Object.assign({onClick:v},{children:o("div",Object.assign({css:c},{children:t(d,Object.assign({elevated:"02",radius:"3"},{children:[o("div",Object.assign({css:l},{children:o(n,{type:"tertiary",name:"close",onClick:v,dataTestId:"modal-close"},void 0)}),void 0),o("div",Object.assign({css:m({isContentPadded:h})},{children:C?o(j,Object.assign({},C),void 0):u}),void 0)]}),void 0)}),void 0)}),void 0)}),void 0):null);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"@emotion/react/jsx-runtime";import{generateTestDataId as
|
|
1
|
+
import{jsxs as e,jsx as t}from"@emotion/react/jsx-runtime";import{generateTestDataId as o}from"../../../utils/helpers.js";import s from"../../Button/Button.js";import{modalContentContainer as a,labelContainer as d,headingContainer as i,messageContainer as n,actionsContainer as c}from"./ModalContent.style.js";const r=({label:r,heading:l,message:m,primaryCTA:g,primaryCTALabel:h,secondaryCTA:j,secondaryCTALabel:p,dataTestId:b})=>e("div",Object.assign({role:"dialog",css:a,"data-testid":o("modal-content",b)},{children:[Boolean(r)&&t("p",Object.assign({css:d},{children:r}),void 0),t("h5",Object.assign({css:i,"data-testid":o("modal-content-header",b)},{children:l}),void 0),t("p",Object.assign({css:n,"data-testid":o("modal-content-message",b)},{children:m}),void 0),e("div",Object.assign({css:c},{children:[Boolean(j&&p)&&t(s,Object.assign({onClick:j,dataTestId:"modal-content-secondaryCTA"},{children:p}),void 0),Boolean(g&&h)&&t(s,Object.assign({onClick:g,dataTestId:"modal-content-primaryCTA"},{children:h}),void 0)]}),void 0)]}),void 0);export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as s}from"@emotion/react/jsx-runtime";import{generateTestDataId as t}from"../../../utils/helpers.js";import e from"../../Button/Button.js";import{boldMessageContainer as
|
|
1
|
+
import{jsxs as i,jsx as s}from"@emotion/react/jsx-runtime";import{generateTestDataId as t}from"../../../utils/helpers.js";import e from"../../Button/Button.js";import{boldMessageContainer as r,actionsContainer as o,actionContainer as a}from"../Notification.style.js";import{visualContainer as c,descriptionContainer as d}from"./NotificationVisual.style.js";const n=({title:n,primaryCTALabel:l="OK",primaryCTA:v,secondaryCTALabel:m="Cancel",secondaryCTA:j,description:p,dataTestId:y})=>i("div",Object.assign({css:c()},{children:[s("div",Object.assign({css:r()},{children:n}),void 0),s("div",Object.assign({css:d()},{children:p}),void 0),i("div",Object.assign({css:o()},{children:[s("div",Object.assign({css:a(),"data-testid":t("visual-secondary",y)},{children:s(e,Object.assign({type:"tertiary",onClick:j},{children:m}),void 0)}),void 0),s("div",Object.assign({css:a(),"data-testid":t("visual-primary",y)},{children:s(e,Object.assign({type:"tertiary",onClick:v},{children:l}),void 0)}),void 0)]}),void 0)]}),void 0);export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as i,jsx as s}from"@emotion/react/jsx-runtime";import e from"../../../hooks/useTheme.js";import{generateTestDataId as t}from"../../../utils/helpers.js";import o from"../../Button/Button.js";import{iconContainer as c,boldMessageContainer as r,actionContainer as n,actionsContainer as a}from"../Notification.style.js";import{typeToIconName as d}from"../subcomponents/CompactNotification/CompactNotification.js";import{cardContainer as l,topContainer as m,infoContainer as v,descriptionContainer as p}from"./Snackbar.style.js";import b from"../../Icon/Icon.js";const j=({message:j,type:y,styleType:h="elevated",primaryCTALabel:g="OK",primaryCTA:f,secondaryCTALabel:O="Cancel",secondaryCTA:C,description:k,closeCTA:u,dataTestId:T})=>{const{utils:A}=e();return i("div",Object.assign({css:l(y,h),"notification-type":"snackbar"},{children:[i("div",Object.assign({css:m()},{children:[i("div",Object.assign({css:v()},{children:[s("div",Object.assign({css:c()},{children:s(b,{name:d(y),color:y,size:20},void 0)}),void 0),s("div",Object.assign({css:r()},{children:j}),void 0)]}),void 0),s("span",Object.assign({css:n(),onClick:u,"data-testid":t("snackbar-close",T)},{children:s(b,{name:"close",color:A.getColor("lightGrey",650),size:20},void 0)}),void 0)]}),void 0),s("div",Object.assign({css:p()},{children:k}),void 0),i("div",Object.assign({css:a()},{children:[s("div",Object.assign({css:n(),"data-testid":t("snackbar-secondary",T)},{children:s(o,Object.assign({type:"tertiary",onClick:C},{children:O}),void 0)}),void 0),s("div",Object.assign({css:n(),"data-testid":t("snackbar-primary",T)},{children:s(o,Object.assign({type:"tertiary",onClick:f},{children:g}),void 0)}),void 0)]}),void 0)]}),void 0)};export{j as default};
|
package/dist/components/Notification/subcomponents/CompactNotification/CompactNotification.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t}from"@emotion/react/jsx-runtime";import s from"../../../../hooks/useTheme.js";import{generateTestDataId as e}from"../../../../utils/helpers.js";import o from"../../../Button/Button.js";import
|
|
1
|
+
import{jsxs as i,jsx as t}from"@emotion/react/jsx-runtime";import s from"../../../../hooks/useTheme.js";import{generateTestDataId as e}from"../../../../utils/helpers.js";import o from"../../../Button/Button.js";import a from"../../../Icon/Icon.js";import{iconContainer as n,actionContainer as r}from"../../Notification.style.js";import{notificationsContainer as c,infoContainer as d,headContainer as l,messageContainer as m,actionsContainer as p,primaryActionContainer as v}from"./CompactNotification.style.js";const j=i=>"warning"===i?"alert":i,f=({hasIcon:f=!1,message:g,variant:h,type:b,styleType:y="elevated",primaryCTALabel:u,primaryCTA:O,closeCTA:C,title:T,dataTestId:I})=>{const{utils:k}=s();return i("div",Object.assign({css:c(b,y),"data-testid":e(h,I)},"banner"==h&&{"notification-type":"banner"},{children:[i("div",Object.assign({css:d()},{children:[f&&t("div",Object.assign({css:n()},{children:t(a,{name:j(b),color:b,size:20},void 0)}),void 0),"banner"===h&&t("div",Object.assign({css:l(),"data-testid":e(`${h}-title`,I)},{children:T}),void 0),t("div",Object.assign({css:m(),"data-testid":e(`${h}-message`,I)},{children:g}),void 0)]}),void 0),i("div",Object.assign({css:p()},{children:[O&&u&&t(o,Object.assign({type:"tertiary",css:v(),onClick:O,"data-testid":e("notification-primary",I)},{children:u}),void 0),C&&t("span",Object.assign({css:r(),onClick:C,"data-testid":e("notification-close",I)},{children:t(a,{name:"close",color:k.getColor("lightGrey",650),size:20},void 0)}),void 0)]}),void 0)]}),void 0)};export{f as default,j as typeToIconName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as i}from"@emotion/react/jsx-runtime";import s from"../../hooks/useEscape.js";import o from"react";import{generateTestDataId as t}from"../../utils/helpers.js";import{backdropStyle as r,overlayStyle as a,closeIconContainer as c,contentStyle as n}from"./Overlay.style.js";import d from"../IconButton/IconButton.js";import l from"../utils/ClickAwayListener/ClickAwayListener.js";const h=({anchor:e,size:i})=>"top"===e||"bottom"===e?{display:"flex",height:i,width:"100%"}:{display:"flex",height:"100%",width:i},m=o.forwardRef((({isOpen:o,onClose:m,anchor:p="left",size:f,dataTestId:v,children:y},j)=>(s((()=>{m()})),e("div",Object.assign({css:r({isOpen:o,anchor:p}),"data-testid":t("overlay-container",v)},{children:e(l,Object.assign({onClick:()=>m(),cssStyles:h({anchor:p,size:f})},{children:i("div",Object.assign({ref:j,css:a({isOpen:o,anchor:p})},{children:[e("div",Object.assign({css:c()},{children:e(d,{type:"tertiary",name:"close",onClick:m,dataTestId:"overlay-close"},void 0)}),void 0),e("div",Object.assign({css:n()},{children:y}),void 0)]}),void 0)}),void 0)}),void 0))));m.displayName="Overlay";export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as a}from"@emotion/react/jsx-runtime";import i from"../../hooks/usePagination.js";import t from"../../hooks/useTheme.js";import o from"../IconButton/IconButton.js";const n=({page:n=1,count:r,onChange:s=(()=>{}),isEnhancedPaginationVisible:g=!1,isNextPageDisabled:l,isPrevPageDisabled:d})=>{const c=t(),{currentPage:m,hasNextPage:p,hasPrevPage:v,navigateToFirstPage:P,navigateToLastPage:h,navigateToNextPage:u,navigateToPrevPage:f}=i({page:n,count:r,onChange:s});return e("div",Object.assign({css:{flex:1,display:"flex",alignItems:"center",justifyContent:"space-between",color:c.utils.getColor("darkGrey",850),"> *":{padding:c.globals.spacing.get("4")}}},{children:[g&&a(o,{name:"arrowToLeft",onClick:P,type:"tertiary",isDisabled:d||!v},void 0),a(o,{name:"arrowLeft",type:"tertiary",onClick:f,isDisabled:d||!v},void 0),e("div",{children:["Page ",m," of ",r]},void 0),a(o,{name:"arrowRight",type:"tertiary",onClick:u,isDisabled:l||!p},void 0),g&&a(o,{name:"arrowToRight",type:"tertiary",onClick:h,isDisabled:l||!p},void 0)]}),void 0)};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import t from"../../../../../../hooks/useBreakpoints.js";import o from"../../../../../../hooks/useTheme.js";import i from"react";import n from"../../../TableCell/TableCell.js";import s from"../../../../../IconButton/IconButton.js";var r=i.memo((({isExpandedExists:i,isChecked:r,toggleIsChecked:a,actionWidth:d,dataTestIdPrefix:l,rowIndex:c,index:m})=>{const p=o(),g=t(),f=d?`${d}%`:g.des1920?"5%":"7%";return i?e(n,Object.assign({width:f,dataTestIdPrefix:l,rowIndex:c,index:m},{children:e("div",{children:e("div",Object.assign({css:{display:"flex",justifyContent:"center",padding:`${p.globals.spacing.get("3")} ${p.globals.spacing.get("4")}`}},{children:e("div",Object.assign({css:{transition:"0.3s all ease-in-out",transformOrigin:"center",width:"fit-content",transform:`rotate(${r?"180":"0"}deg)`},onClick:e=>e.stopPropagation()},{children:e(s,{
|
|
1
|
+
import{jsx as e}from"@emotion/react/jsx-runtime";import t from"../../../../../../hooks/useBreakpoints.js";import o from"../../../../../../hooks/useTheme.js";import i from"react";import n from"../../../TableCell/TableCell.js";import s from"../../../../../IconButton/IconButton.js";var r=i.memo((({isExpandedExists:i,isChecked:r,toggleIsChecked:a,actionWidth:d,dataTestIdPrefix:l,rowIndex:c,index:m})=>{const p=o(),g=t(),f=d?`${d}%`:g.des1920?"5%":"7%";return i?e(n,Object.assign({width:f,dataTestIdPrefix:l,rowIndex:c,index:m},{children:e("div",{children:e("div",Object.assign({css:{display:"flex",justifyContent:"center",padding:`${p.globals.spacing.get("3")} ${p.globals.spacing.get("4")}`}},{children:e("div",Object.assign({css:{transition:"0.3s all ease-in-out",transformOrigin:"center",width:"fit-content",transform:`rotate(${r?"180":"0"}deg)`},onClick:e=>e.stopPropagation()},{children:e(s,{type:"tertiary",name:"chevronSmallDown",onClick:a,dataTestId:"expanded-button"},void 0)}),void 0)}),void 0)},void 0)}),void 0):null}));export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import t from"../../../Menu/Menu.js";import r from"./UserMenu.style.js";const
|
|
1
|
+
import{jsx as e}from"@emotion/react/jsx-runtime";import t from"../../../Menu/Menu.js";import r from"./UserMenu.style.js";const o=({items:o,userAvatar:a,userName:n,onSelect:s,isDark:i=!1})=>e(t,{items:o,color:i?"neutralBlack-500":"neutralWhite-100",buttonText:e("span",Object.assign({css:r.buttonTextStyle},{children:n}),void 0),buttonType:"tertiary",rightIconName:"chevronLargeDown",avatar:a,onSelect:s,dataTestId:"userMenu"},void 0);export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"@emotion/react/jsx-runtime";import{typographyWrapper as n}from"./Typography.style.js";const i=e=>"headline01"===e?"h1":"headline02"===e?"h2":"headline03"===e?"h3":"headline04"===e?"h4":"headline05"===e?"h5":e.includes("title")?"h6":e.includes("label")?"span":(e.includes("body"),"p"),t=({type:t="body01",component:l,children:o})=>{const d=l||i(t);return e(d,Object.assign({css:n({type:t})},{children:o}),void 0)};export{t as default,i as detectComponentBasedOnType};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import{css as t}from"@emotion/react";const g=({type:g})=>e=>({headline01:t`
|
|
2
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
3
|
+
line-height: ${e.globals.typography.lineHeights.get("10")};
|
|
4
|
+
font-size: ${e.globals.typography.fontSizes.get("9")};
|
|
5
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
6
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("0")};
|
|
7
|
+
`,headline02:t`
|
|
8
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
9
|
+
line-height: ${e.globals.typography.lineHeights.get("9")};
|
|
10
|
+
font-size: ${e.globals.typography.fontSizes.get("8")};
|
|
11
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
12
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("0")};
|
|
13
|
+
`,headline03:t`
|
|
14
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
15
|
+
line-height: ${e.globals.typography.lineHeights.get("8")};
|
|
16
|
+
font-size: ${e.globals.typography.fontSizes.get("7")};
|
|
17
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
18
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("0")};
|
|
19
|
+
`,headline04:t`
|
|
20
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
21
|
+
line-height: ${e.globals.typography.lineHeights.get("7")};
|
|
22
|
+
font-size: ${e.globals.typography.fontSizes.get("6")};
|
|
23
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
24
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("0")};
|
|
25
|
+
`,headline05:t`
|
|
26
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
27
|
+
line-height: ${e.globals.typography.lineHeights.get("6")};
|
|
28
|
+
font-size: ${e.globals.typography.fontSizes.get("5")};
|
|
29
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
30
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("0")};
|
|
31
|
+
`,title01:t`
|
|
32
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
33
|
+
line-height: ${e.globals.typography.lineHeights.get("5")};
|
|
34
|
+
font-size: ${e.globals.typography.fontSizes.get("4")};
|
|
35
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
36
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("1")};
|
|
37
|
+
`,title02:t`
|
|
38
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
39
|
+
line-height: ${e.globals.typography.lineHeights.get("4")};
|
|
40
|
+
font-size: ${e.globals.typography.fontSizes.get("3")};
|
|
41
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
42
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("1")};
|
|
43
|
+
`,title03:t`
|
|
44
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
45
|
+
line-height: ${e.globals.typography.lineHeights.get("3")};
|
|
46
|
+
font-size: ${e.globals.typography.fontSizes.get("1")};
|
|
47
|
+
font-weight: ${e.globals.typography.weights.get("bold")};
|
|
48
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("2")};
|
|
49
|
+
`,label01:t`
|
|
50
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
51
|
+
line-height: ${e.globals.typography.lineHeights.get("5")};
|
|
52
|
+
font-size: ${e.globals.typography.fontSizes.get("4")};
|
|
53
|
+
font-weight: ${e.globals.typography.weights.get("medium")};
|
|
54
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("1")};
|
|
55
|
+
`,label02:t`
|
|
56
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
57
|
+
line-height: ${e.globals.typography.lineHeights.get("4")};
|
|
58
|
+
font-size: ${e.globals.typography.fontSizes.get("3")};
|
|
59
|
+
font-weight: ${e.globals.typography.weights.get("medium")};
|
|
60
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("2")};
|
|
61
|
+
`,label03:t`
|
|
62
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
63
|
+
line-height: ${e.globals.typography.lineHeights.get("3")};
|
|
64
|
+
font-size: ${e.globals.typography.fontSizes.get("1")};
|
|
65
|
+
font-weight: ${e.globals.typography.weights.get("medium")};
|
|
66
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("2")};
|
|
67
|
+
`,body01:t`
|
|
68
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
69
|
+
line-height: ${e.globals.typography.lineHeights.get("5")};
|
|
70
|
+
font-size: ${e.globals.typography.fontSizes.get("4")};
|
|
71
|
+
font-weight: ${e.globals.typography.weights.get("regular")};
|
|
72
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("2")};
|
|
73
|
+
`,body02:t`
|
|
74
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
75
|
+
line-height: ${e.globals.typography.lineHeights.get("4")};
|
|
76
|
+
font-size: ${e.globals.typography.fontSizes.get("3")};
|
|
77
|
+
font-weight: ${e.globals.typography.weights.get("regular")};
|
|
78
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("2")};
|
|
79
|
+
`,body03:t`
|
|
80
|
+
font-family: ${e.globals.typography.fontFamilies.get("roboto")};
|
|
81
|
+
line-height: ${e.globals.typography.lineHeights.get("3")};
|
|
82
|
+
font-size: ${e.globals.typography.fontSizes.get("1")};
|
|
83
|
+
font-weight: ${e.globals.typography.weights.get("regular")};
|
|
84
|
+
letter-spacing: ${e.globals.typography.letterSpacings.get("2")};
|
|
85
|
+
`}[g]);export{g as typographyWrapper};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,24 +4,25 @@ import * as _emotion_react from '@emotion/react';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default, { ButtonHTMLAttributes, MouseEvent as MouseEvent$1, ChangeEvent, InputHTMLAttributes, ReactNode, FC } from 'react';
|
|
6
6
|
import { TestProps as TestProps$1, TestId as TestId$1 } from 'utils/types';
|
|
7
|
-
import { ClickHandler } from 'hooks/useLoading';
|
|
8
|
-
import { CommonButtonProps as CommonButtonProps$1, EventProps as EventProps$1 } from 'utils/common';
|
|
9
7
|
import * as _emotion_serialize from '@emotion/serialize';
|
|
10
8
|
import { CSSObject } from '@emotion/serialize';
|
|
9
|
+
import { ButtonTypes as ButtonTypes$1, PrimitiveButtonTypes } from 'components/Button/Button.types';
|
|
10
|
+
import { IconButtonShape as IconButtonShape$1 } from 'components/IconButton';
|
|
11
|
+
import { ButtonBaseProps as ButtonBaseProps$1 } from 'components/ButtonBase/ButtonBase';
|
|
12
|
+
import { CommonButtonProps as CommonButtonProps$1, EventProps } from 'utils/common';
|
|
13
|
+
import { AvatarProps as AvatarProps$1, AvatarColors as AvatarColors$1 } from 'components/Avatar';
|
|
14
|
+
import { AcceptedIconNames as AcceptedIconNames$1 } from 'components/Icon';
|
|
11
15
|
import { Elevation as Elevation$1 } from 'index';
|
|
12
16
|
import { SpacingKey as SpacingKey$1 } from 'theme/globals/spacing';
|
|
13
17
|
import { Dayjs } from 'utils/date';
|
|
14
|
-
import { AcceptedIconNames as AcceptedIconNames$
|
|
18
|
+
import { AcceptedIconNames as AcceptedIconNames$2 } from 'components/Icon/types';
|
|
15
19
|
import { TextInputBaseProps } from 'components/TextInputBase';
|
|
16
20
|
import { LocationState, Location } from 'history';
|
|
17
21
|
import { match } from 'react-router';
|
|
18
22
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
19
23
|
import { ReactComponentLike } from 'prop-types';
|
|
20
|
-
import { ButtonBaseProps as ButtonBaseProps$1 } from 'components/ButtonBase/ButtonBase';
|
|
21
24
|
import { FilterOption as FilterOption$1 } from 'components/Filter/types';
|
|
22
25
|
import { SelectOption as SelectOption$1 } from 'components/Select/Select';
|
|
23
|
-
import { AcceptedColorComponentTypes as AcceptedColorComponentTypes$1 } from 'utils/themeFunctions';
|
|
24
|
-
import { AvatarColors as AvatarColors$1 } from 'components/Avatar';
|
|
25
26
|
import { TextFieldProps as TextFieldProps$1 } from 'components/TextField/TextField';
|
|
26
27
|
import { ThemeConfig, Theme as Theme$1 } from 'theme';
|
|
27
28
|
|
|
@@ -854,11 +855,6 @@ declare type ColorShapeFromComponent = {
|
|
|
854
855
|
shade: typeof colorShades[number];
|
|
855
856
|
};
|
|
856
857
|
|
|
857
|
-
/** A generic type for native events */
|
|
858
|
-
declare type EventProps = {
|
|
859
|
-
onClick?: () => void;
|
|
860
|
-
onBlur?: () => void;
|
|
861
|
-
};
|
|
862
858
|
declare type CommonButtonProps = Partial<Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'css' | 'onBlur' | 'onClick' | 'type' | 'disabled'>>;
|
|
863
859
|
declare type DivProps = Partial<Omit<React.HTMLProps<HTMLDivElement>, 'size' | 'css'>>;
|
|
864
860
|
|
|
@@ -922,48 +918,85 @@ declare type TestProps = {
|
|
|
922
918
|
dataTestPrefixId?: string;
|
|
923
919
|
};
|
|
924
920
|
|
|
925
|
-
declare const buttonSizes: readonly ["lg", "md", "sm"];
|
|
926
|
-
|
|
927
921
|
declare type EventButtonProps = {
|
|
928
922
|
onClick?: (event: ClickEvent) => void;
|
|
929
923
|
onBlur?: () => void;
|
|
930
924
|
};
|
|
931
925
|
declare type ButtonBaseProps = {
|
|
932
|
-
/**
|
|
933
|
-
type?:
|
|
934
|
-
/** the color of the button based on our colors eg. red-500 */
|
|
935
|
-
color?: string;
|
|
936
|
-
/** This property define the size of the button. Defaults to 'md' */
|
|
937
|
-
size?: typeof buttonSizes[number];
|
|
926
|
+
/** The type of the button */
|
|
927
|
+
type?: ButtonTypes$1;
|
|
938
928
|
/** This property will make the button fit to its parent width. Defaults to false */
|
|
939
929
|
isBlock?: boolean;
|
|
940
|
-
/** Property indicating if the component is
|
|
941
|
-
isFilled?: boolean;
|
|
942
|
-
/** Property indicating if the component is async and loading */
|
|
930
|
+
/** Property indicating if the component is loading */
|
|
943
931
|
isLoading?: boolean;
|
|
944
|
-
/** Property indicating if the component is transparent with a color based on the type */
|
|
945
|
-
isTransparent?: boolean;
|
|
946
|
-
/** An optional boolean to show if the button is icon */
|
|
947
|
-
isIconButton?: boolean;
|
|
948
|
-
/** An optional icon to put on the right of the button */
|
|
949
|
-
iconRight?: React__default.Component | JSX.Element | null;
|
|
950
|
-
/** An optional icon to put on the left of the button */
|
|
951
|
-
iconLeft?: React__default.Component | JSX.Element | null;
|
|
952
932
|
/** Define if the button is in disabled state */
|
|
953
933
|
isDisabled?: boolean;
|
|
934
|
+
/** Define if the button is an icon button */
|
|
935
|
+
isIconButton?: boolean;
|
|
936
|
+
/** Define the radius type of the icon button */
|
|
937
|
+
shape?: IconButtonShape$1;
|
|
954
938
|
/** Defines the button type */
|
|
955
|
-
|
|
939
|
+
htmlType?: 'submit' | 'reset' | 'button';
|
|
956
940
|
/** Sx prop to override specific properties */
|
|
957
941
|
sx?: {
|
|
958
942
|
container?: CSSObject;
|
|
959
943
|
};
|
|
960
944
|
} & TestProps & EventButtonProps & CommonButtonProps;
|
|
961
945
|
|
|
962
|
-
declare type
|
|
963
|
-
|
|
946
|
+
declare type AcceptedIconNames = 'account' | 'actions' | 'add' | 'alert' | 'analytics' | 'analyticsVideos' | 'ancient' | 'arrowDown' | 'arrowLeft' | 'arrowRight' | 'arrowToLeft' | 'arrowToRight' | 'artist' | 'asset' | 'assetMatching' | 'auto' | 'broadcast' | 'calendarEmpty' | 'calendarFilled' | 'catalog' | 'catalogOverview' | 'catalogFiles' | 'chatBubble' | 'check' | 'checkedList' | 'checkmark' | 'chevronExtraSmallDown' | 'chevronExtraSmallLeft' | 'chevronExtraSmallRight' | 'chevronExtraSmallUp' | 'chevronLargeDown' | 'chevronLargeLeft' | 'chevronLargeRight' | 'chevronLargeUp' | 'chevronSmallDown' | 'chevronSmallLeft' | 'chevronSmallRight' | 'chevronSmallUp' | 'claimList' | 'clock' | 'close' | 'closeTag' | 'cmsProcess' | 'composition' | 'compositionV2' | 'confirmedMatches' | 'conflicts' | 'concert' | 'dashboard' | 'dataset' | 'delete' | 'delivery' | 'details' | 'digitalUse' | 'distribution' | 'dotsVertical' | 'download' | 'duplicate' | 'duplicate2' | 'earnings' | 'earnings2' | 'edit' | 'entities' | 'error' | 'expenses' | 'externalLink' | 'externalLinkV2' | 'fatArrowDown' | 'fatArrowLeft' | 'fatArrowRight' | 'fatArrowUp' | 'file' | 'financialChart' | 'generatedReports' | 'genericFile' | 'genericOrdering' | 'globalItem' | 'heartFill' | 'heartStroke' | 'help' | 'hourglass' | 'income' | 'infoFilled' | 'info' | 'issues' | 'keyword' | 'legalFiles' | 'linked' | 'lock' | 'mail' | 'manual' | 'menu' | 'microphone' | 'minus' | 'moreOptionsHorizontal' | 'moreOptionsVertical' | 'musicNote' | 'myEarnings' | 'notifications' | 'notifications2' | 'oneWay' | 'others' | 'ownershipValidation' | 'pageFirst' | 'pageLast' | 'percentage' | 'plus' | 'policies' | 'process' | 'processManagement' | 'publicPerformance' | 'publisher' | 'recording' | 'recordLabel' | 'recordLabelV2' | 'referenceFile' | 'relations' | 'restore' | 'result' | 'royaltyShares' | 'search' | 'searchMusic' | 'searchThunder' | 'settings' | 'sight' | 'sortAscending' | 'sortDescending' | 'stamp' | 'statements' | 'success' | 'television' | 'thunder' | 'ticTacToeArrow' | 'timeOut' | 'training' | 'triangleDown' | 'triangleLeft' | 'triangleRight' | 'triangleUp' | 'trophy' | 'TVCinema' | 'TVRadio' | 'update' | 'upload' | 'user' | 'userAvatar' | 'users' | 'users2' | 'videoConfirmation' | 'view' | 'warning' | 'works' | 'writer' | 'youtube' | 'refresh' | 'star' | 'pause' | 'resume' | 'restart' | 'entity' | 'playCount' | 'processedLogs' | 'proposed' | 'unpaired' | 'unpairedV2' | 'clockOutlined' | 'userCheck';
|
|
947
|
+
|
|
948
|
+
declare type IconButtonShape = 'circle' | 'square';
|
|
949
|
+
declare type IconButtonProps = Omit<ButtonBaseProps$1, 'type' | 'isBlock' | 'isLoading' | 'isIconButton'> & {
|
|
950
|
+
/** This property defines the type of the IconButton */
|
|
951
|
+
type?: PrimitiveButtonTypes;
|
|
952
|
+
/** This property defines witch icon to use */
|
|
953
|
+
name: AcceptedIconNames;
|
|
954
|
+
/** This property defines the shape of the IconButton */
|
|
955
|
+
shape?: IconButtonShape;
|
|
956
|
+
};
|
|
957
|
+
declare const IconButton: React__default.ForwardRefExoticComponent<Omit<ButtonBaseProps$1, "type" | "isLoading" | "isBlock" | "isIconButton"> & {
|
|
958
|
+
/** This property defines the type of the IconButton */
|
|
959
|
+
type?: PrimitiveButtonTypes | undefined;
|
|
960
|
+
/** This property defines witch icon to use */
|
|
961
|
+
name: AcceptedIconNames;
|
|
962
|
+
/** This property defines the shape of the IconButton */
|
|
963
|
+
shape?: IconButtonShape | undefined;
|
|
964
|
+
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
965
|
+
|
|
966
|
+
/** All button types. Used by Button component */
|
|
967
|
+
declare type ButtonTypes = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'inverted' | 'invertedAlt';
|
|
968
|
+
|
|
969
|
+
declare type ButtonProps = ButtonBaseProps & TestProps$1 & CommonButtonProps$1 & {
|
|
970
|
+
/** An optional icon to put on the right of the button */
|
|
971
|
+
iconRightName?: AcceptedIconNames$1;
|
|
972
|
+
/** An optional icon to put on the left of the button */
|
|
973
|
+
iconLeftName?: AcceptedIconNames$1;
|
|
974
|
+
/** An optional avatar to put on the left of the button */
|
|
975
|
+
avatar?: Pick<AvatarProps$1, 'src' | 'color'> & {
|
|
976
|
+
label?: string;
|
|
977
|
+
};
|
|
964
978
|
};
|
|
965
|
-
declare
|
|
966
|
-
|
|
979
|
+
declare const Button: React__default.ForwardRefExoticComponent<{
|
|
980
|
+
type?: ButtonTypes | undefined;
|
|
981
|
+
isBlock?: boolean | undefined;
|
|
982
|
+
isLoading?: boolean | undefined;
|
|
983
|
+
isDisabled?: boolean | undefined;
|
|
984
|
+
isIconButton?: boolean | undefined;
|
|
985
|
+
shape?: IconButtonShape | undefined;
|
|
986
|
+
htmlType?: "button" | "reset" | "submit" | undefined;
|
|
987
|
+
sx?: {
|
|
988
|
+
container?: _emotion_serialize.CSSObject | undefined;
|
|
989
|
+
} | undefined;
|
|
990
|
+
} & TestProps$1 & EventButtonProps & Partial<Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size" | "onClick" | "css" | "onBlur" | "disabled">> & {
|
|
991
|
+
/** An optional icon to put on the right of the button */
|
|
992
|
+
iconRightName?: AcceptedIconNames$1 | undefined;
|
|
993
|
+
/** An optional icon to put on the left of the button */
|
|
994
|
+
iconLeftName?: AcceptedIconNames$1 | undefined;
|
|
995
|
+
/** An optional avatar to put on the left of the button */
|
|
996
|
+
avatar?: (Pick<AvatarProps$1, "color" | "src"> & {
|
|
997
|
+
label?: string | undefined;
|
|
998
|
+
}) | undefined;
|
|
999
|
+
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
967
1000
|
|
|
968
1001
|
declare type CardProps = {
|
|
969
1002
|
/** Elevation of Card */
|
|
@@ -1089,8 +1122,6 @@ declare type ChipProps = ChipBaseProps & TestProps & CommonButtonProps;
|
|
|
1089
1122
|
|
|
1090
1123
|
declare const Chip: React__default.ForwardRefExoticComponent<ChipBaseProps & TestProps & Partial<Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "size" | "onClick" | "css" | "onBlur" | "disabled">> & React__default.RefAttributes<HTMLButtonElement | HTMLDivElement>>;
|
|
1091
1124
|
|
|
1092
|
-
declare type AcceptedIconNames = 'account' | 'actions' | 'add' | 'alert' | 'analytics' | 'analyticsVideos' | 'ancient' | 'arrowDown' | 'arrowLeft' | 'arrowRight' | 'arrowToLeft' | 'arrowToRight' | 'artist' | 'asset' | 'assetMatching' | 'auto' | 'broadcast' | 'calendarEmpty' | 'calendarFilled' | 'catalog' | 'catalogOverview' | 'catalogFiles' | 'chatBubble' | 'check' | 'checkedList' | 'checkmark' | 'chevronExtraSmallDown' | 'chevronExtraSmallLeft' | 'chevronExtraSmallRight' | 'chevronExtraSmallUp' | 'chevronLargeDown' | 'chevronLargeLeft' | 'chevronLargeRight' | 'chevronLargeUp' | 'chevronSmallDown' | 'chevronSmallLeft' | 'chevronSmallRight' | 'chevronSmallUp' | 'claimList' | 'clock' | 'close' | 'closeTag' | 'cmsProcess' | 'composition' | 'compositionV2' | 'confirmedMatches' | 'conflicts' | 'concert' | 'dashboard' | 'dataset' | 'delete' | 'delivery' | 'details' | 'digitalUse' | 'distribution' | 'dotsVertical' | 'download' | 'duplicate' | 'duplicate2' | 'earnings' | 'earnings2' | 'edit' | 'entities' | 'error' | 'expenses' | 'externalLink' | 'externalLinkV2' | 'fatArrowDown' | 'fatArrowLeft' | 'fatArrowRight' | 'fatArrowUp' | 'file' | 'financialChart' | 'generatedReports' | 'genericFile' | 'genericOrdering' | 'globalItem' | 'heartFill' | 'heartStroke' | 'help' | 'hourglass' | 'income' | 'infoFilled' | 'info' | 'issues' | 'keyword' | 'legalFiles' | 'linked' | 'lock' | 'mail' | 'manual' | 'menu' | 'microphone' | 'minus' | 'moreOptionsHorizontal' | 'moreOptionsVertical' | 'musicNote' | 'myEarnings' | 'notifications' | 'notifications2' | 'oneWay' | 'others' | 'ownershipValidation' | 'pageFirst' | 'pageLast' | 'percentage' | 'plus' | 'policies' | 'process' | 'processManagement' | 'publicPerformance' | 'publisher' | 'recording' | 'recordLabel' | 'recordLabelV2' | 'referenceFile' | 'relations' | 'restore' | 'result' | 'royaltyShares' | 'search' | 'searchMusic' | 'searchThunder' | 'settings' | 'sight' | 'sortAscending' | 'sortDescending' | 'stamp' | 'statements' | 'success' | 'television' | 'thunder' | 'ticTacToeArrow' | 'timeOut' | 'training' | 'triangleDown' | 'triangleLeft' | 'triangleRight' | 'triangleUp' | 'trophy' | 'TVCinema' | 'TVRadio' | 'update' | 'upload' | 'user' | 'userAvatar' | 'users' | 'users2' | 'videoConfirmation' | 'view' | 'warning' | 'works' | 'writer' | 'youtube' | 'refresh' | 'star' | 'pause' | 'resume' | 'restart' | 'entity' | 'playCount' | 'processedLogs' | 'proposed' | 'unpaired' | 'unpairedV2' | 'clockOutlined' | 'userCheck';
|
|
1093
|
-
|
|
1094
1125
|
declare type OwnProps = {
|
|
1095
1126
|
/** This property defines witch icon to use */
|
|
1096
1127
|
name: AcceptedIconNames;
|
|
@@ -1147,8 +1178,8 @@ declare const TextField: React__default.ForwardRefExoticComponent<{
|
|
|
1147
1178
|
} & {
|
|
1148
1179
|
label?: string | undefined; /** The id of the text field that will be used as for in label too */
|
|
1149
1180
|
placeholder?: string | undefined;
|
|
1150
|
-
leftIcon?: JSX.Element | AcceptedIconNames$
|
|
1151
|
-
rightIcon?: JSX.Element | AcceptedIconNames$
|
|
1181
|
+
leftIcon?: JSX.Element | AcceptedIconNames$2 | null | undefined;
|
|
1182
|
+
rightIcon?: JSX.Element | AcceptedIconNames$2 | null | undefined;
|
|
1152
1183
|
isRequired?: boolean | undefined;
|
|
1153
1184
|
isDisabled?: boolean | undefined;
|
|
1154
1185
|
isLocked?: boolean | undefined;
|
|
@@ -1389,7 +1420,7 @@ declare type DrawerMenuItem = {
|
|
|
1389
1420
|
url: string;
|
|
1390
1421
|
state?: Record<string, any> | null;
|
|
1391
1422
|
isVisible: boolean;
|
|
1392
|
-
iconName: AcceptedIconNames$
|
|
1423
|
+
iconName: AcceptedIconNames$2;
|
|
1393
1424
|
isActive?<Params extends {
|
|
1394
1425
|
[K in keyof Params]?: string;
|
|
1395
1426
|
}, S = LocationState>(match: match<Params> | null, location: Location<S>): boolean;
|
|
@@ -1472,19 +1503,6 @@ declare type ExpandCollapseProps = SharedProps & (InternalProps | ExternalProps)
|
|
|
1472
1503
|
|
|
1473
1504
|
declare const ExpandCollapse: (props: ExpandCollapseProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1474
1505
|
|
|
1475
|
-
declare type IconButtonProps = Omit<ButtonBaseProps$1, 'isIconButton' | 'iconLeft' | 'iconRight'> & {
|
|
1476
|
-
/** Property indicating the size of the icon. Defaults to 16 */
|
|
1477
|
-
iconSize?: number;
|
|
1478
|
-
/** This property defines witch icon to use */
|
|
1479
|
-
name: AcceptedIconNames;
|
|
1480
|
-
} & TestProps & EventProps;
|
|
1481
|
-
declare const IconButton: React__default.ForwardRefExoticComponent<Omit<ButtonBaseProps$1, "isIconButton" | "iconRight" | "iconLeft"> & {
|
|
1482
|
-
/** Property indicating the size of the icon. Defaults to 16 */
|
|
1483
|
-
iconSize?: number | undefined;
|
|
1484
|
-
/** This property defines witch icon to use */
|
|
1485
|
-
name: AcceptedIconNames;
|
|
1486
|
-
} & TestProps & EventProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
1487
|
-
|
|
1488
1506
|
declare type LabelProps = {
|
|
1489
1507
|
/** If the label has error */
|
|
1490
1508
|
hasError?: boolean;
|
|
@@ -1568,10 +1586,6 @@ declare type MenuProps = {
|
|
|
1568
1586
|
color?: string;
|
|
1569
1587
|
/** Items that are being declared as menu options */
|
|
1570
1588
|
items?: string[];
|
|
1571
|
-
/** This property define the size of the button. Defaults to 'md' */
|
|
1572
|
-
size?: 'lg' | 'md' | 'sm';
|
|
1573
|
-
/** Property indicating if the component is filled with a color based on the type */
|
|
1574
|
-
isFilled?: boolean;
|
|
1575
1589
|
/** Returns the items selected on the menu */
|
|
1576
1590
|
selectedItem?: string | null;
|
|
1577
1591
|
/** A callback that is being triggered when an items has been clicked */
|
|
@@ -1583,20 +1597,18 @@ declare type MenuProps = {
|
|
|
1583
1597
|
/** Menu position when open */
|
|
1584
1598
|
menuPosition?: MenuPositionAllowed;
|
|
1585
1599
|
/** The type of the button - defaults to "primary" */
|
|
1586
|
-
buttonType?:
|
|
1600
|
+
buttonType?: ButtonTypes$1;
|
|
1587
1601
|
/** The name of the icon on the right area of menu button */
|
|
1588
1602
|
rightIconName?: AcceptedIconNames;
|
|
1589
1603
|
/** The name of the icon on the left area of menu button */
|
|
1590
1604
|
leftIconName?: AcceptedIconNames;
|
|
1591
|
-
/** The size of the icon on the menu button */
|
|
1592
|
-
iconSize?: number;
|
|
1593
1605
|
/** You can define the avatar properties here for src or letter if none then the user icon will be displayed if the object is not empty */
|
|
1594
1606
|
avatar?: {
|
|
1595
1607
|
src: string;
|
|
1596
1608
|
letter: string;
|
|
1597
1609
|
color?: AvatarColors$1;
|
|
1598
1610
|
};
|
|
1599
|
-
} & TestProps & EventProps
|
|
1611
|
+
} & TestProps & EventProps;
|
|
1600
1612
|
declare const Menu: React.FC<MenuProps>;
|
|
1601
1613
|
|
|
1602
1614
|
declare type ModalContentProps = {
|
|
@@ -2115,4 +2127,4 @@ declare const useTheme: () => _emotion_react.Theme;
|
|
|
2115
2127
|
|
|
2116
2128
|
declare const useEscape: (onEscape: () => void) => void;
|
|
2117
2129
|
|
|
2118
|
-
export { AcceptedColorComponentTypes, AcceptedIconNames, AnchorType, Avatar, AvatarColors, AvatarProps, AvatarSizes, AvatarStack, BackgroundColorProps, Banner, BannerProps, BarChart, BaseColorProps, BorderProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonStyleProps, Card, CardProps, Cell, CheckBox, CheckboxProps, Chip, ChipBaseProps, ChipProps, ContentComponent, DateFormatType, DatePicker, DatePickerProps, DisabledDates, DonutChart, Drawer, DrawerMenuItem, DrawerProps, Elevation, ExpandCollapse, ExpandCollapseProps, ExtendedColumn, ExternalProps, ExtraOption, Filter, FilterOption, FilterProps, FilterType, HoverBorderProps, INTERACTIVE, Icon, IconButton, IconButtonProps, IconProps, InlineNotification, InlineNotificationProps, InternalProps, Label, LabelProps, LineChart, _default$1 as List, ListItemType, ListProps, ListRowSize, Loader, LoaderProps, LoaderType, MAX, MIN, Menu, MenuProps, Modal, NotificationStyleType, NotificationTypes, NotificationVariants, NotificationVisual, NotificationVisualProps, NotificationsContainer, NotificationsContainerPositions, NotificationsContainerProps, Overlay, OverlayProps, Overrides, OwnProps, Pagination, PaginationProps, Palette, READ_ONLY, Radio, RadioGroup, RadioGroupProps, RadioProps, Row, STEP_WITH_INCREMENTS, SearchField, SearchFieldProps, Select, SelectHandlerType, SelectOption, SelectOptionValues, SelectProps, Selection, SharedProps, Slider, SliderProps, Snackbar, SnackbarProps, Sort, SortingOrder, Spacing, StyleType, Switch, SwitchProps, _default as Table, TableProps, TableType, TextArea, TextAreaProps, TextField, TextFieldProps, Theme, ThemeProvider, ThemeProviderProps, Toast, ToastProps, Tooltip, TooltipPlacement, TooltipProps, TooltipSize, TopAppBarProps, TopAppBar as TopNavBar, TruncatedContent, TruncatedContentProps, Typography, elevation_d as elevation, extraOptions, globalStyles, isNotificationTypes,
|
|
2130
|
+
export { AcceptedColorComponentTypes, AcceptedIconNames, AnchorType, Avatar, AvatarColors, AvatarProps, AvatarSizes, AvatarStack, BackgroundColorProps, Banner, BannerProps, BarChart, BaseColorProps, BorderProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, ButtonStyleProps, Card, CardProps, Cell, CheckBox, CheckboxProps, Chip, ChipBaseProps, ChipProps, ContentComponent, DateFormatType, DatePicker, DatePickerProps, DisabledDates, DonutChart, Drawer, DrawerMenuItem, DrawerProps, Elevation, ExpandCollapse, ExpandCollapseProps, ExtendedColumn, ExternalProps, ExtraOption, Filter, FilterOption, FilterProps, FilterType, HoverBorderProps, INTERACTIVE, Icon, IconButton, IconButtonProps, IconButtonShape, IconProps, InlineNotification, InlineNotificationProps, InternalProps, Label, LabelProps, LineChart, _default$1 as List, ListItemType, ListProps, ListRowSize, Loader, LoaderProps, LoaderType, MAX, MIN, Menu, MenuProps, Modal, NotificationStyleType, NotificationTypes, NotificationVariants, NotificationVisual, NotificationVisualProps, NotificationsContainer, NotificationsContainerPositions, NotificationsContainerProps, Overlay, OverlayProps, Overrides, OwnProps, Pagination, PaginationProps, Palette, READ_ONLY, Radio, RadioGroup, RadioGroupProps, RadioProps, Row, STEP_WITH_INCREMENTS, SearchField, SearchFieldProps, Select, SelectHandlerType, SelectOption, SelectOptionValues, SelectProps, Selection, SharedProps, Slider, SliderProps, Snackbar, SnackbarProps, Sort, SortingOrder, Spacing, StyleType, Switch, SwitchProps, _default as Table, TableProps, TableType, TextArea, TextAreaProps, TextField, TextFieldProps, Theme, ThemeProvider, ThemeProviderProps, Toast, ToastProps, Tooltip, TooltipPlacement, TooltipProps, TooltipSize, TopAppBarProps, TopAppBar as TopNavBar, TruncatedContent, TruncatedContentProps, Typography, elevation_d as elevation, extraOptions, globalStyles, isNotificationTypes, overrides_d as overrides, palette_d as palette, queriesKeys, queriesSizes, spacing_d as spacing, styleType, defaultTheme as themeConfig, functions_d as themeFunctions, typography_d as typography, useBreakpoints, useEscape, useTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=t=>({focus:{outline:`${t.tokens.borderColor.get("interactive.focused")} auto ${t.globals.borderWidth.get("2")}`},disabled:{opacity:t.globals.opacity.get("4"),cursor:"not-allowed"},inactive:{backgroundColor:{primary:t.tokens.palette.get("systemic.light.primary.main"),secondary:t.tokens.palette.get("systemic.light.secondary.main"),tertiary:t.tokens.palette.get("systemic.light.tertiary.light"),danger:t.tokens.palette.get("systemic.error.main"),inverted:t.tokens.palette.get("systemic.inverted.primary.main"),invertedAlt:t.tokens.palette.get("systemic.inverted.tertiary.light")}},active:{backgroundColor:{primary:t.tokens.palette.get("systemic.light.primary.dark"),secondary:t.tokens.palette.get("systemic.light.secondary.dark"),tertiary:t.tokens.palette.get("systemic.light.tertiary.dark"),danger:t.tokens.palette.get("systemic.error.main"),inverted:t.tokens.palette.get("systemic.inverted.primary.dark"),invertedAlt:t.tokens.palette.get("systemic.inverted.tertiary.dark")}},hover:{backgroundColor:{primary:t.tokens.palette.get("systemic.light.primary.light"),secondary:t.tokens.palette.get("systemic.light.secondary.light"),tertiary:t.tokens.palette.get("systemic.light.tertiary.main"),danger:t.tokens.palette.get("systemic.error.light"),inverted:t.tokens.palette.get("systemic.inverted.primary.light"),invertedAlt:t.tokens.palette.get("systemic.inverted.tertiary.main")}}});export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"lodash/get.js";import o from"lodash/isEmpty.js";import r from"../globals/index.js";const l=o=>{const{type:l}=o;return"color"===l?(o=>{const{value:l}=o;if(l.startsWith("{colors.")){const o=l.slice(1,-1).split("."),s=o[1],e=Number(o[2]);return
|
|
1
|
+
import t from"lodash/get.js";import o from"lodash/isEmpty.js";import r from"../globals/index.js";const l=o=>{const{type:l}=o;return"color"===l?(o=>{const{value:l}=o;if(l.startsWith("{colors.")){const o=l.slice(1,-1).split("."),s=o[1],e=Number(o[2]);return"neutral"===s||"gradient"===s?t(r.colors,[s,o[2]],""):t(r.colors.flat,[s,e],"")}return l})(o):(o=>{var l,s;const{value:e}=o,i=e.slice(1,-1).split("."),n=i[0],u=i[1];return null!==(s=null===(l=t(r,n))||void 0===l?void 0:l.get(u))&&void 0!==s?s:""})(o)},s=r=>s=>{if(null==r?void 0:r.value)return l(r);const e=s.split("."),i=t(r,e,{});return o(i)?"":l(i)};export{s as getTokensValue};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={sizes:{lg:56,md:46,sm:36,default:46},fontSize:{sm:13,default:"4"},types:{link:{color:{name:"blue",shade:550}},outlined:{border:{width:1}}}};export{e as buttonConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"lodash/isEmpty.js";import{getColorFromType as r}from"../../utils/themeFunctions.js";import{buttonConfig as t}from"./config.js";const e=(t,e,s,n)=>"link"===s?"transparent":e&&!o(e)?t.utils.getColor(e.color,e.shade):n&&s?r(s,t):"transparent",s=({type:o,isBackgroundTransparent:r,backGroundColor:e,calculatedColor:s,theme:n})=>{if("link"===o){const o=t.types.link.color;return n.utils.getColor(o.name,o.shade)}return r?e:n.utils.getAAColorFromSwatches(s.color,s.shade)};export{s as calculateButtonColor,e as defineBackgroundColor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{heightBasedOnSize as t}from"../ButtonBase/ButtonBase.style.js";const e=({size:e})=>({container:{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",padding:0,width:t(e||"default")}});export{e as sxProp};
|
package/dist/hooks/useLoading.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as n,useCallback as o}from"react";const r=(r,t=!1)=>{const[e,a]=n(t),c=o((n=>{a(n)}),[a]);return{isLoading:e,handleAsyncOperation:o((n=>{r&&r(c,n)}),[c,r])}};export{r as useLoading};
|