freemium-ui 2.0.0-beta.55 → 2.0.0-beta.57
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 +22 -17
- package/index.d.ts +8 -3
- package/index.js +22 -17
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -15555,6 +15555,8 @@ id:u,tabIndex:0},l,{ref:n,style:{...t.style,
|
|
|
15555
15555
|
animationDuration:h.current?"0s":void 0}}),r&&i)))
|
|
15556
15556
|
})),cj=on(nj)``,sj=on(lj)``,uj=on(oj)`
|
|
15557
15557
|
border-bottom: 1px solid #f5f7f9;
|
|
15558
|
+
display: flex;
|
|
15559
|
+
flex-wrap: nowrap;
|
|
15558
15560
|
`,dj=on(ij)`
|
|
15559
15561
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
15560
15562
|
background-color: unset;
|
|
@@ -15564,6 +15566,7 @@ animationDuration:h.current?"0s":void 0}}),r&&i)))
|
|
|
15564
15566
|
font-weight: 400;
|
|
15565
15567
|
font-size: 14px;
|
|
15566
15568
|
line-height: 20px;
|
|
15569
|
+
white-space: nowrap;
|
|
15567
15570
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
15568
15571
|
border-bottom: 2px solid transparent;
|
|
15569
15572
|
border-radius: 4px 4px 0 0;
|
|
@@ -15837,7 +15840,7 @@ const jj=Ej,$j=Hj,Uj=kj,Yj=Tj,Wj=on(Cj)``;on.div`
|
|
|
15837
15840
|
}
|
|
15838
15841
|
`,Jj=on.div`
|
|
15839
15842
|
display: flex;
|
|
15840
|
-
align-items:
|
|
15843
|
+
align-items: center;
|
|
15841
15844
|
padding: 16px;
|
|
15842
15845
|
gap: 16px;
|
|
15843
15846
|
`,e$=on.div`
|
|
@@ -15871,20 +15874,22 @@ fill:n.colors.text.semantic.warning}))},o$=t=>{const n=qt()
|
|
|
15871
15874
|
fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{
|
|
15872
15875
|
fillRule:"evenodd",clipRule:"evenodd",
|
|
15873
15876
|
d:"M8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16C12.4183 16 16 12.4183 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0ZM8 14.6C4.35492 14.6 1.4 11.6451 1.4 8C1.4 4.35492 4.35492 1.4 8 1.4C11.6451 1.4 14.6 4.35492 14.6 8C14.5945 11.6428 11.6428 14.5945 8 14.6ZM9 8L10.82 6.17L10.83 6.18C11.1061 5.90386 11.1061 5.45614 10.83 5.18C10.5539 4.90386 10.1061 4.90386 9.83 5.18L8 7L6.18 5.17C5.90386 4.89386 5.45614 4.89386 5.18 5.17C4.90386 5.44614 4.90386 5.89386 5.18 6.17L7 8L5.17 9.82C4.89386 10.0961 4.89386 10.5439 5.17 10.82C5.44614 11.0961 5.89386 11.0961 6.17 10.82L8 9L9.83 10.83C10.1061 11.1061 10.5539 11.1061 10.83 10.83C11.1061 10.5539 11.1061 10.1061 10.83 9.83L9 8Z",
|
|
15874
|
-
fill:n.colors.text.semantic.error}))},i$=({index:t,...
|
|
15875
|
-
const
|
|
15877
|
+
fill:n.colors.text.semantic.error}))},i$=({index:t,showProgress:n=!0,...r})=>{
|
|
15878
|
+
const a=qt(),{updateToasts:o,windowState:i}=e.useContext(hj)??{},l=e.useRef(null)
|
|
15876
15879
|
;return e.createElement(e.Fragment,null,e.createElement(qj,{role:"alert",
|
|
15877
|
-
"aria-live":"polite",ref:
|
|
15878
|
-
className:`ToastRoot Toast-${
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
fill:
|
|
15885
|
-
|
|
15880
|
+
"aria-live":"polite",ref:l,toastType:r.type,toastIndex:t,
|
|
15881
|
+
className:`ToastRoot Toast-${r.id??""}`.trim(),
|
|
15882
|
+
duration:r.fixed?1/0:r.delay??3e3,onOpenChange:e=>{
|
|
15883
|
+
e||o((e=>e.filter((e=>e.id!==r.id))))}},n&&e.createElement(e$,{
|
|
15884
|
+
className:"ToastProgress",windowState:i,toastType:r.type,
|
|
15885
|
+
delay:r.delay??(r.fixed?1/0:3e3)
|
|
15886
|
+
}),e.createElement(Jj,null,r.customIcon?e.createElement(e.Fragment,null,r.customIcon):e.createElement(e.Fragment,null,"success"===r.type&&e.createElement(r$,{
|
|
15887
|
+
fill:a.colors.text.semantic.success}),"warning"===r.type&&e.createElement(a$,{
|
|
15888
|
+
fill:a.colors.text.semantic.warning}),"error"===r.type&&e.createElement(o$,{
|
|
15889
|
+
fill:a.colors.text.semantic.error})),e.createElement(Zj,{className:"ToastTitle"
|
|
15890
|
+
},r.text),e.createElement(Xj,{className:"ToastAction",asChild:!0,
|
|
15886
15891
|
altText:"Close","aria-label":"Close"
|
|
15887
|
-
},e.createElement(Zr,null,e.createElement(Mr,{fill:
|
|
15892
|
+
},e.createElement(Zr,null,e.createElement(Mr,{fill:a.colors.text.primary}))))))
|
|
15888
15893
|
},l$=()=>{const n=((t=gF())=>{
|
|
15889
15894
|
const n=`ui-${t}`,{isBrowser:r}=t$(),[a,o]=e.useState(r?n$(n):null)
|
|
15890
15895
|
;return e.useEffect((()=>{const e=document.querySelector(`#${n}`),t=e||n$(n)
|
|
@@ -16532,12 +16537,12 @@ onClick:()=>{ce?.(Math.ceil(n.length/fe)-1)},disabled:l||c
|
|
|
16532
16537
|
se()},disabled:!ae()||l||c},">"),e.createElement(wa,{variant:"secondary",
|
|
16533
16538
|
onClick:()=>{ue()},disabled:!ae()||l||c
|
|
16534
16539
|
},">>"))))))))),!v&&G&&p&&e.createElement(xB,null,p)))
|
|
16535
|
-
},exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",onChange:a,defaultValue:o,
|
|
16536
|
-
className:"TabsRoot",value:
|
|
16537
|
-
},e.createElement(uj,{className:"TabsList","aria-label":
|
|
16540
|
+
},exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",onChange:a,defaultValue:o,label:i,renderTabsContent:l,value:c})=>e.createElement(cj,{
|
|
16541
|
+
className:"TabsRoot",value:c,defaultValue:o,onValueChange:a
|
|
16542
|
+
},e.createElement(uj,{className:"TabsList","aria-label":i
|
|
16538
16543
|
},t.map((t=>e.createElement(dj,{className:"TabsTrigger",value:t?.[n]
|
|
16539
16544
|
},t?.[r])))),t.map((t=>e.createElement(sj,{className:"TabsContent",value:t?.[n]
|
|
16540
|
-
},
|
|
16545
|
+
},l?l(t):null)))),
|
|
16541
16546
|
exports.TabsContent=sj,exports.TabsList=uj,exports.TabsRoot=cj,
|
|
16542
16547
|
exports.TabsTrigger=dj,
|
|
16543
16548
|
exports.Tag=Hv,exports.TextArea=qm,exports.ThemeProvider=t=>e.createElement(Zt,{
|
package/index.d.ts
CHANGED
|
@@ -1231,6 +1231,7 @@ type TabsProps<T extends TabsItemProps = TabsItemProps> = {
|
|
|
1231
1231
|
* Id accessor of tabes
|
|
1232
1232
|
*/
|
|
1233
1233
|
idAccessor?: string;
|
|
1234
|
+
label?: string;
|
|
1234
1235
|
/**
|
|
1235
1236
|
* Name accessor of tabes
|
|
1236
1237
|
*/
|
|
@@ -1253,7 +1254,7 @@ type TabsProps<T extends TabsItemProps = TabsItemProps> = {
|
|
|
1253
1254
|
/**
|
|
1254
1255
|
* Tabs component is used to show a set of tabs to the user. It is used to show different sections of content in a single view. It can be used to show different categories of content.
|
|
1255
1256
|
*/
|
|
1256
|
-
declare const Tabs: <T extends TabsItemProps>({ options, idAccessor, nameAccessor, onChange, defaultValue, renderTabsContent, value, }: TabsProps<T>) => react__default.JSX.Element;
|
|
1257
|
+
declare const Tabs: <T extends TabsItemProps>({ options, idAccessor, nameAccessor, onChange, defaultValue, label, renderTabsContent, value, }: TabsProps<T>) => react__default.JSX.Element;
|
|
1257
1258
|
|
|
1258
1259
|
interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
1259
1260
|
/**
|
|
@@ -1481,11 +1482,15 @@ interface ToastType {
|
|
|
1481
1482
|
*/
|
|
1482
1483
|
customIcon?: React.ReactNode;
|
|
1483
1484
|
/**
|
|
1484
|
-
*
|
|
1485
|
+
* fixed toast on the screen
|
|
1486
|
+
* @default false
|
|
1487
|
+
*
|
|
1485
1488
|
*/
|
|
1486
1489
|
fixed?: boolean;
|
|
1487
1490
|
/**
|
|
1488
|
-
*
|
|
1491
|
+
* shows progress bar in the toast
|
|
1492
|
+
* takes delay as the duration
|
|
1493
|
+
* @default true
|
|
1489
1494
|
*/
|
|
1490
1495
|
showProgress?: boolean;
|
|
1491
1496
|
}
|
package/index.js
CHANGED
|
@@ -15748,6 +15748,8 @@ id:d,tabIndex:0},c,{ref:t,style:{...e.style,
|
|
|
15748
15748
|
animationDuration:p.current?"0s":void 0}}),n&&l)))
|
|
15749
15749
|
})),$j=En(Rj)``,Uj=En(jj)``,Yj=En(Fj)`
|
|
15750
15750
|
border-bottom: 1px solid #f5f7f9;
|
|
15751
|
+
display: flex;
|
|
15752
|
+
flex-wrap: nowrap;
|
|
15751
15753
|
`,Wj=En(Bj)`
|
|
15752
15754
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
15753
15755
|
background-color: unset;
|
|
@@ -15757,6 +15759,7 @@ animationDuration:p.current?"0s":void 0}}),n&&l)))
|
|
|
15757
15759
|
font-weight: 400;
|
|
15758
15760
|
font-size: 14px;
|
|
15759
15761
|
line-height: 20px;
|
|
15762
|
+
white-space: nowrap;
|
|
15760
15763
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
15761
15764
|
border-bottom: 2px solid transparent;
|
|
15762
15765
|
border-radius: 4px 4px 0 0;
|
|
@@ -15768,12 +15771,12 @@ animationDuration:p.current?"0s":void 0}}),n&&l)))
|
|
|
15768
15771
|
color: ${({theme:e})=>e.colors.text.link};
|
|
15769
15772
|
border-color: ${({theme:e})=>e.colors.text.link};
|
|
15770
15773
|
}
|
|
15771
|
-
`,Gj=({options:e=[],idAccessor:n="id",nameAccessor:r="name",onChange:a,defaultValue:o,
|
|
15772
|
-
className:"TabsRoot",value:
|
|
15773
|
-
},t.createElement(Yj,{className:"TabsList","aria-label":
|
|
15774
|
+
`,Gj=({options:e=[],idAccessor:n="id",nameAccessor:r="name",onChange:a,defaultValue:o,label:i,renderTabsContent:l,value:c})=>t.createElement($j,{
|
|
15775
|
+
className:"TabsRoot",value:c,defaultValue:o,onValueChange:a
|
|
15776
|
+
},t.createElement(Yj,{className:"TabsList","aria-label":i
|
|
15774
15777
|
},e.map((e=>t.createElement(Wj,{className:"TabsTrigger",value:e?.[n]
|
|
15775
15778
|
},e?.[r])))),e.map((e=>t.createElement(Uj,{className:"TabsContent",value:e?.[n]
|
|
15776
|
-
},
|
|
15779
|
+
},l?l(e):null)))),Kj=t.createContext({toasts:[],windowState:"focus",
|
|
15777
15780
|
addToast:()=>{},updateToasts:()=>{}
|
|
15778
15781
|
}),qj="ToastProvider",[Zj,Xj,Qj]=Fn("Toast"),[Jj,e$]=Ln("Toast",[Qj]),[t$,n$]=Jj(qj),r$=e=>{
|
|
15779
15782
|
const{__scopeToast:t,label:n="Notification",duration:a=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:s}=e,[u,d]=m(null),[h,p]=m(0),f=r(!1),v=r(!1)
|
|
@@ -16028,7 +16031,7 @@ const x$=l$,S$=u$,E$=m$,_$=v$,H$=En(r$)``;En.div`
|
|
|
16028
16031
|
}
|
|
16029
16032
|
`,I$=En.div`
|
|
16030
16033
|
display: flex;
|
|
16031
|
-
align-items:
|
|
16034
|
+
align-items: center;
|
|
16032
16035
|
padding: 16px;
|
|
16033
16036
|
gap: 16px;
|
|
16034
16037
|
`,P$=En.div`
|
|
@@ -16062,20 +16065,22 @@ fill:n.colors.text.semantic.warning}))},B$=e=>{const n=vn()
|
|
|
16062
16065
|
fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{
|
|
16063
16066
|
fillRule:"evenodd",clipRule:"evenodd",
|
|
16064
16067
|
d:"M8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16C12.4183 16 16 12.4183 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0ZM8 14.6C4.35492 14.6 1.4 11.6451 1.4 8C1.4 4.35492 4.35492 1.4 8 1.4C11.6451 1.4 14.6 4.35492 14.6 8C14.5945 11.6428 11.6428 14.5945 8 14.6ZM9 8L10.82 6.17L10.83 6.18C11.1061 5.90386 11.1061 5.45614 10.83 5.18C10.5539 4.90386 10.1061 4.90386 9.83 5.18L8 7L6.18 5.17C5.90386 4.89386 5.45614 4.89386 5.18 5.17C4.90386 5.44614 4.90386 5.89386 5.18 6.17L7 8L5.17 9.82C4.89386 10.0961 4.89386 10.5439 5.17 10.82C5.44614 11.0961 5.89386 11.0961 6.17 10.82L8 9L9.83 10.83C10.1061 11.1061 10.5539 11.1061 10.83 10.83C11.1061 10.5539 11.1061 10.1061 10.83 9.83L9 8Z",
|
|
16065
|
-
fill:n.colors.text.semantic.error}))},j$=({index:e,...
|
|
16066
|
-
const
|
|
16068
|
+
fill:n.colors.text.semantic.error}))},j$=({index:e,showProgress:n=!0,...r})=>{
|
|
16069
|
+
const a=vn(),{updateToasts:o,windowState:i}=t.useContext(Kj)??{},l=t.useRef(null)
|
|
16067
16070
|
;return t.createElement(t.Fragment,null,t.createElement(L$,{role:"alert",
|
|
16068
|
-
"aria-live":"polite",ref:
|
|
16069
|
-
className:`ToastRoot Toast-${
|
|
16070
|
-
onOpenChange:e=>{
|
|
16071
|
-
|
|
16072
|
-
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
fill:
|
|
16076
|
-
|
|
16071
|
+
"aria-live":"polite",ref:l,toastType:r.type,toastIndex:e,
|
|
16072
|
+
className:`ToastRoot Toast-${r.id??""}`.trim(),
|
|
16073
|
+
duration:r.fixed?1/0:r.delay??3e3,onOpenChange:e=>{
|
|
16074
|
+
e||o((e=>e.filter((e=>e.id!==r.id))))}},n&&t.createElement(P$,{
|
|
16075
|
+
className:"ToastProgress",windowState:i,toastType:r.type,
|
|
16076
|
+
delay:r.delay??(r.fixed?1/0:3e3)
|
|
16077
|
+
}),t.createElement(I$,null,r.customIcon?t.createElement(t.Fragment,null,r.customIcon):t.createElement(t.Fragment,null,"success"===r.type&&t.createElement(N$,{
|
|
16078
|
+
fill:a.colors.text.semantic.success}),"warning"===r.type&&t.createElement(F$,{
|
|
16079
|
+
fill:a.colors.text.semantic.warning}),"error"===r.type&&t.createElement(B$,{
|
|
16080
|
+
fill:a.colors.text.semantic.error})),t.createElement(A$,{className:"ToastTitle"
|
|
16081
|
+
},r.text),t.createElement(k$,{className:"ToastAction",asChild:!0,
|
|
16077
16082
|
altText:"Close","aria-label":"Close"
|
|
16078
|
-
},t.createElement(ga,null,t.createElement($r,{fill:
|
|
16083
|
+
},t.createElement(ga,null,t.createElement($r,{fill:a.colors.text.primary}))))))
|
|
16079
16084
|
},$$=()=>{const e=((e=XF())=>{
|
|
16080
16085
|
const t=`ui-${e}`,{isBrowser:n}=R$(),[r,a]=m(n?O$(t):null);return f((()=>{
|
|
16081
16086
|
const e=document.querySelector(`#${t}`),n=e||O$(t)
|