freemium-ui 2.0.0-beta.52 → 2.0.0-beta.53
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/index.cjs.js +17 -12
- package/index.d.ts +5 -1
- package/index.js +17 -12
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -983,7 +983,11 @@ variant:n,weight:r,ref:o,...a},t))),ma=on.div`
|
|
|
983
983
|
display: flex;
|
|
984
984
|
align-items: center;
|
|
985
985
|
gap: 4px;
|
|
986
|
-
justify-content:
|
|
986
|
+
justify-content: ${({align:e})=>e};
|
|
987
|
+
& .alert-icon {
|
|
988
|
+
margin-right: 4px;
|
|
989
|
+
min-width: 18px;
|
|
990
|
+
}
|
|
987
991
|
`,ga={error:Sr,success:_r,info:Hr,warning:Er},ya={large:{height:"45px",
|
|
988
992
|
size:"16px"},mini:{height:"24px",size:"12px"},normal:{height:"32px",size:"14px"}
|
|
989
993
|
},ba=on.button`
|
|
@@ -16229,17 +16233,18 @@ onValueChange:c,...u},i.map((i=>e.createElement(Tr,{key:i?.[t],
|
|
|
16229
16233
|
className:"AccordionItem",value:i?.[t],disabled:i?.disabled
|
|
16230
16234
|
},e.createElement(Or,{hideIcon:a
|
|
16231
16235
|
},o?o(i):i?.[n]),e.createElement(Nr,null,r?r(i):null))))),
|
|
16232
|
-
exports.Alert=({
|
|
16233
|
-
const
|
|
16234
|
-
c>0&&(
|
|
16235
|
-
"string"==typeof
|
|
16236
|
-
}),[]),
|
|
16237
|
-
"aria-describedby":"string"==typeof
|
|
16238
|
-
},e.createElement(va,
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
},e.createElement(
|
|
16236
|
+
exports.Alert=({onClose:t,children:n,level:r,onDisappear:a,data:o,icon:i,overideClassName:l,timeout:c=0,canDismiss:s=!0,alignContent:u="center",...d})=>{
|
|
16237
|
+
const h=qt(),p=ga[r],[f,m]=e.useState(!0);return e.useEffect((()=>{
|
|
16238
|
+
c>0&&(f||m(!0),setTimeout((()=>{m(!1),a?.()}),c))}),[c]),e.useEffect((()=>{
|
|
16239
|
+
"string"==typeof n||"string"==typeof o?.message||d["aria-describedby"]||console.warn("The `aria-describedby` prop is required when the children of the Alert are not a string. This is to ensure that assistive technologies can announce the content of the alert. Please provide a valid `aria-describedby` prop to the Alert component.")
|
|
16240
|
+
}),[]),f?e.createElement(ma,{level:r,role:"alert",
|
|
16241
|
+
"aria-describedby":"string"==typeof o?.message?o.message:void 0,...d
|
|
16242
|
+
},e.createElement(va,{align:u},i??e.createElement(p,{className:"alert-icon",
|
|
16243
|
+
fill:h.colors.text.semantic[r]
|
|
16244
|
+
}),o?.message?e.createElement(fa,null,o.message):n,o?.linkText&&e.createElement(Ur,{
|
|
16245
|
+
target:"_blank",rel:"noreferrer",href:o?.href??"#"
|
|
16246
|
+
},o.linkText)),s&&e.createElement($r,{onClick:()=>{m(!1),t?.()}
|
|
16247
|
+
},e.createElement(Mr,{fill:h.colors.text.primary}))):null
|
|
16243
16248
|
},exports.BoxedRadio=({options:t,defaultValue:n,idAccessor:r="id",onChange:a,isErrored:o,errorText:i,disabled:l=!1,getTextContent:c,className:s,id:u,isRequired:d,readOnly:h,itemComponent:p,label:f,value:m,customIndicator:v,...g})=>e.createElement(us,{
|
|
16244
16249
|
className:"StyledBoxedRadio"},f&&e.createElement(Fr,{htmlFor:u,
|
|
16245
16250
|
className:"input-label"},f,d&&e.createElement(jr,null,"*")),e.createElement(ds,{
|
package/index.d.ts
CHANGED
|
@@ -121,12 +121,16 @@ interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
121
121
|
* @default getAlertIcon(level)
|
|
122
122
|
**/
|
|
123
123
|
icon?: React.ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* Alignment of the content in the alert
|
|
126
|
+
*/
|
|
127
|
+
alignContent?: 'flex-start' | 'center' | 'flex-end';
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
/**
|
|
127
131
|
* Alert displays an alert on the user interface and enables displaying additional information to the context of the page.
|
|
128
132
|
*/
|
|
129
|
-
declare const Alert: ({
|
|
133
|
+
declare const Alert: ({ onClose, children, level, onDisappear, data, icon, overideClassName, timeout, canDismiss, alignContent, ...props }: AlertProps) => react__default.JSX.Element | null;
|
|
130
134
|
|
|
131
135
|
type ButtonSizeKey = 'mini' | 'normal' | 'large';
|
|
132
136
|
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link';
|
package/index.js
CHANGED
|
@@ -979,19 +979,24 @@ variant:n,weight:r,ref:o,...a},e))),Pa=En.div`
|
|
|
979
979
|
display: flex;
|
|
980
980
|
align-items: center;
|
|
981
981
|
gap: 4px;
|
|
982
|
-
justify-content:
|
|
982
|
+
justify-content: ${({align:e})=>e};
|
|
983
|
+
& .alert-icon {
|
|
984
|
+
margin-right: 4px;
|
|
985
|
+
min-width: 18px;
|
|
986
|
+
}
|
|
983
987
|
`,Oa={error:Wr,success:Gr,info:Kr,warning:Yr
|
|
984
|
-
},Na=({
|
|
985
|
-
const
|
|
986
|
-
c>0&&(
|
|
987
|
-
"string"==typeof
|
|
988
|
-
}),[]),
|
|
989
|
-
"aria-describedby":"string"==typeof
|
|
990
|
-
},t.createElement(Ra,
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
},t.createElement(
|
|
988
|
+
},Na=({onClose:e,children:n,level:r,onDisappear:a,data:o,icon:i,overideClassName:l,timeout:c=0,canDismiss:s=!0,alignContent:u="center",...d})=>{
|
|
989
|
+
const h=vn(),p=Oa[r],[f,m]=t.useState(!0);return t.useEffect((()=>{
|
|
990
|
+
c>0&&(f||m(!0),setTimeout((()=>{m(!1),a?.()}),c))}),[c]),t.useEffect((()=>{
|
|
991
|
+
"string"==typeof n||"string"==typeof o?.message||d["aria-describedby"]||console.warn("The `aria-describedby` prop is required when the children of the Alert are not a string. This is to ensure that assistive technologies can announce the content of the alert. Please provide a valid `aria-describedby` prop to the Alert component.")
|
|
992
|
+
}),[]),f?t.createElement(Pa,{level:r,role:"alert",
|
|
993
|
+
"aria-describedby":"string"==typeof o?.message?o.message:void 0,...d
|
|
994
|
+
},t.createElement(Ra,{align:u},i??t.createElement(p,{className:"alert-icon",
|
|
995
|
+
fill:h.colors.text.semantic[r]
|
|
996
|
+
}),o?.message?t.createElement(Ia,null,o.message):n,o?.linkText&&t.createElement(da,{
|
|
997
|
+
target:"_blank",rel:"noreferrer",href:o?.href??"#"
|
|
998
|
+
},o.linkText)),s&&t.createElement(ua,{onClick:()=>{m(!1),e?.()}
|
|
999
|
+
},t.createElement($r,{fill:h.colors.text.primary}))):null},Fa={large:{
|
|
995
1000
|
height:"45px",size:"16px"},mini:{height:"24px",size:"12px"},normal:{
|
|
996
1001
|
height:"32px",size:"14px"}},Ba=En.button`
|
|
997
1002
|
font-weight: ${({theme:e})=>e.typography.fontWeight["semi-bold"]};
|