freemium-ui 2.0.0-beta.54 → 2.0.0-beta.56

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 CHANGED
@@ -2122,9 +2122,9 @@ const{__scopeCheckbox:r,forceMount:a,...o}=t,i=Es("CheckboxIndicator",r)
2122
2122
  `,Ts=({isRequired:t,isErrored:n,className:r,readOnly:a,label:o,...i})=>{
2123
2123
  const l=qt();return e.createElement(As,null,e.createElement(ks,{
2124
2124
  className:`CheckboxRoot ${r??""}`.trim(),required:t,"aria-invalid":n,
2125
- "aria-label":o,"aria-required":t,"aria-readonly":a,"aria-disabled":i.disabled,
2126
- ...i},e.createElement(Ls,{className:"CheckboxIndicator"
2127
- },"indeterminate"===i.checked?e.createElement(Dr,{
2125
+ "aria-label":o||"Checkbox","aria-required":t,"aria-readonly":a,
2126
+ "aria-disabled":i.disabled,...i},e.createElement(Ls,{
2127
+ className:"CheckboxIndicator"},"indeterminate"===i.checked?e.createElement(Dr,{
2128
2128
  className:"toggle-indeterminate",width:8,height:6,fill:l.colors.common.accent
2129
2129
  }):e.createElement(xr,{className:"toggle-on",width:8,height:6,
2130
2130
  fill:l.colors.common.accent}))),o&&e.createElement(Br,{
@@ -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;
@@ -16419,27 +16422,29 @@ index:r})
16419
16422
  fill:I.colors.common.accent})))})))),E&&_&&e.createElement(ws,null,_))
16420
16423
  },exports.Popover=CI,
16421
16424
  exports.PopoverClose=wI,exports.Radio=({checked:t,className:n,disabled:r,id:a,isRequired:o,label:i,name:l,readOnly:c,...s})=>e.createElement(MI,{
16422
- className:`RadioGroupRoot ${n??""}`.trim(),id:a,name:l,"aria-label":i,
16423
- value:t?"default":"",required:o,disabled:r,"aria-readonly":c,...s
16424
- },e.createElement(SI,null,e.createElement(EI,{checked:t,"aria-checked":t,
16425
- className:"RadioGroupItem",disabled:r,"aria-readonly":c,value:"default",
16426
- id:"default"},e.createElement(xI,{className:"RadioGroupIndicator"
16427
- })),i&&e.createElement(Br,{className:"RadioLabel",disabled:r,"aria-readonly":c,
16428
- "aria-label":i,htmlFor:a
16429
- },i,i&&o&&e.createElement(jr,null,"*")))),exports.RadioGroup=({options:t,defaultValue:n,idAccessor:r="id",nameAccessor:a="name",onChange:o,className:i,id:l,isErrored:c,errorText:s,disabled:u,isRequired:d,label:h,readOnly:p,value:f,...m})=>e.createElement(zI,null,h&&e.createElement(Fr,{
16425
+ className:`RadioGroupRoot ${n??""}`.trim(),id:a,name:l,
16426
+ "aria-label":i||"Radio button",value:t?"default":"",required:o,disabled:r,
16427
+ "aria-readonly":c,...s},e.createElement(SI,null,e.createElement(EI,{checked:t,
16428
+ "aria-checked":t,className:"RadioGroupItem",disabled:r,"aria-readonly":c,
16429
+ value:"default",id:"default"},e.createElement(xI,{
16430
+ className:"RadioGroupIndicator"})),i&&e.createElement(Br,{
16431
+ className:"RadioLabel",disabled:r,"aria-readonly":c,"aria-label":i,htmlFor:a
16432
+ },i,i&&o&&e.createElement(jr,null,"*")))),
16433
+ exports.RadioGroup=({options:t,defaultValue:n,idAccessor:r="id",nameAccessor:a="name",onChange:o,className:i,id:l,isErrored:c,errorText:s,disabled:u,isRequired:d,label:h,readOnly:p,value:f,...m})=>e.createElement(zI,null,h&&e.createElement(Fr,{
16430
16434
  id:l,className:"input-label"
16431
16435
  },h,h&&d&&e.createElement(jr,null,"*")),e.createElement(MI,{defaultValue:n,
16432
- value:f,onValueChange:e=>{p||u||o?.(e)},"aria-readonly":p,id:l,"aria-label":h,
16433
- "aria-labelledby":l,className:`RadioGroupRoot ${i??""}`.trim(),...m
16434
- },t?.map((t=>e.createElement(SI,{key:t?.[r],className:"RadioContainer"
16435
- },e.createElement(EI,{className:"RadioGroupItem",disabled:t.disabled,
16436
- value:t?.[r],id:t?.[r],"aria-label":t?.[a]},e.createElement(xI,{
16437
- className:"RadioGroupIndicator"})),e.createElement(Br,{className:"RadioLabel",
16438
- disabled:t.disabled,htmlFor:t?.[r]
16439
- },t?.[a]))))),c&&s&&e.createElement(ws,null,s)),
16440
- exports.RadixMenuItem=Tc,exports.RadixSelectItem=nh,
16441
- exports.Reorder=yF,exports.RequiredIndicator=jr,
16442
- exports.StyledLabel=Fr,exports.Table=t=>{
16436
+ value:f,onValueChange:e=>{p||u||o?.(e)},"aria-readonly":p,id:l,
16437
+ "aria-label":h||"Radio Group","aria-labelledby":h?l:void 0,
16438
+ className:`RadioGroupRoot ${i??""}`.trim(),...m},t?.map((t=>e.createElement(SI,{
16439
+ key:t?.[r],className:"RadioContainer"},e.createElement(EI,{
16440
+ className:"RadioGroupItem",disabled:t.disabled,value:t?.[r],id:t?.[r],
16441
+ "aria-label":t?.[a]},e.createElement(xI,{className:"RadioGroupIndicator"
16442
+ })),e.createElement(Br,{className:"RadioLabel",disabled:t.disabled,
16443
+ htmlFor:t?.[r]
16444
+ },t?.[a]))))),c&&s&&e.createElement(ws,null,s)),exports.RadixMenuItem=Tc,
16445
+ exports.RadixSelectItem=nh,
16446
+ exports.Reorder=yF,exports.RequiredIndicator=jr,exports.StyledLabel=Fr,
16447
+ exports.Table=t=>{
16443
16448
  const{data:n,columns:a,showFooter:o=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,showTableOnLoading:g,hideLoaderOnTopPagination:y,hideActions:b,count:w,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!0,hideBottomPagination:S,rowMenuOptions:_,onPreviousPageClick:H,onNextPageClick:D,disableRowSelect:V,hideSelectAllInTable:L,onSelectAllRows:A,onRowSelect:k,onMenuOptionSelect:T,onRowClick:R,columnOrder:P,setColumnOrder:I,setHiddenColumns:O,hiddenColumns:N,selectedRowIds:F={},setSelectedRowIds:B,dataKey:j="id",cellPropGetter:$,setPageIndex:U,rowPropGetter:Y}=t,W=qt(),[G,K]=e.useState(!v),q={
16444
16449
  accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
16445
16450
  display:e=>e,group:e=>e},Z=-1===w||void 0===w,X=e.useMemo((()=>[...V?[]:[{
@@ -16530,12 +16535,12 @@ onClick:()=>{ce?.(Math.ceil(n.length/fe)-1)},disabled:l||c
16530
16535
  se()},disabled:!ae()||l||c},">"),e.createElement(wa,{variant:"secondary",
16531
16536
  onClick:()=>{ue()},disabled:!ae()||l||c
16532
16537
  },">>"))))))))),!v&&G&&p&&e.createElement(xB,null,p)))
16533
- },exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",onChange:a,defaultValue:o,renderTabsContent:i,value:l})=>e.createElement(cj,{
16534
- className:"TabsRoot",value:l,defaultValue:o,onValueChange:a
16535
- },e.createElement(uj,{className:"TabsList","aria-label":"Manage your account"
16538
+ },exports.Tabs=({options:t=[],idAccessor:n="id",nameAccessor:r="name",onChange:a,defaultValue:o,label:i,renderTabsContent:l,value:c})=>e.createElement(cj,{
16539
+ className:"TabsRoot",value:c,defaultValue:o,onValueChange:a
16540
+ },e.createElement(uj,{className:"TabsList","aria-label":i
16536
16541
  },t.map((t=>e.createElement(dj,{className:"TabsTrigger",value:t?.[n]
16537
16542
  },t?.[r])))),t.map((t=>e.createElement(sj,{className:"TabsContent",value:t?.[n]
16538
- },i?i(t):null)))),
16543
+ },l?l(t):null)))),
16539
16544
  exports.TabsContent=sj,exports.TabsList=uj,exports.TabsRoot=cj,
16540
16545
  exports.TabsTrigger=dj,
16541
16546
  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
  /**
package/index.js CHANGED
@@ -2131,9 +2131,9 @@ pointerEvents:"none",...e.style}})))})))`
2131
2131
  `,au=({isRequired:e,isErrored:n,className:r,readOnly:a,label:o,...i})=>{
2132
2132
  const l=vn();return t.createElement(nu,null,t.createElement(ru,{
2133
2133
  className:`CheckboxRoot ${r??""}`.trim(),required:e,"aria-invalid":n,
2134
- "aria-label":o,"aria-required":e,"aria-readonly":a,"aria-disabled":i.disabled,
2135
- ...i},t.createElement(tu,{className:"CheckboxIndicator"
2136
- },"indeterminate"===i.checked?t.createElement(qr,{
2134
+ "aria-label":o||"Checkbox","aria-required":e,"aria-readonly":a,
2135
+ "aria-disabled":i.disabled,...i},t.createElement(tu,{
2136
+ className:"CheckboxIndicator"},"indeterminate"===i.checked?t.createElement(qr,{
2137
2137
  className:"toggle-indeterminate",width:8,height:6,fill:l.colors.common.accent
2138
2138
  }):t.createElement(Ur,{className:"toggle-on",width:8,height:6,
2139
2139
  fill:l.colors.common.accent}))),o&&t.createElement(ca,{
@@ -12948,24 +12948,24 @@ onInteractOutside:()=>u?.(),side:g,align:o,sideOffset:8,avoidCollisions:l
12948
12948
  display: flex;
12949
12949
  align-items: center;
12950
12950
  `,iO=({checked:e,className:n,disabled:r,id:a,isRequired:o,label:i,name:l,readOnly:c,...s})=>t.createElement(nO,{
12951
- className:`RadioGroupRoot ${n??""}`.trim(),id:a,name:l,"aria-label":i,
12952
- value:e?"default":"",required:o,disabled:r,"aria-readonly":c,...s
12953
- },t.createElement(oO,null,t.createElement(aO,{checked:e,"aria-checked":e,
12954
- className:"RadioGroupItem",disabled:r,"aria-readonly":c,value:"default",
12955
- id:"default"},t.createElement(rO,{className:"RadioGroupIndicator"
12956
- })),i&&t.createElement(ca,{className:"RadioLabel",disabled:r,"aria-readonly":c,
12957
- "aria-label":i,htmlFor:a
12951
+ className:`RadioGroupRoot ${n??""}`.trim(),id:a,name:l,
12952
+ "aria-label":i||"Radio button",value:e?"default":"",required:o,disabled:r,
12953
+ "aria-readonly":c,...s},t.createElement(oO,null,t.createElement(aO,{checked:e,
12954
+ "aria-checked":e,className:"RadioGroupItem",disabled:r,"aria-readonly":c,
12955
+ value:"default",id:"default"},t.createElement(rO,{
12956
+ className:"RadioGroupIndicator"})),i&&t.createElement(ca,{
12957
+ className:"RadioLabel",disabled:r,"aria-readonly":c,"aria-label":i,htmlFor:a
12958
12958
  },i,i&&o&&t.createElement(sa,null,"*")))),lO=({options:e,defaultValue:n,idAccessor:r="id",nameAccessor:a="name",onChange:o,className:i,id:l,isErrored:c,errorText:s,disabled:u,isRequired:d,label:h,readOnly:p,value:f,...m})=>t.createElement(tO,null,h&&t.createElement(la,{
12959
12959
  id:l,className:"input-label"
12960
12960
  },h,h&&d&&t.createElement(sa,null,"*")),t.createElement(nO,{defaultValue:n,
12961
- value:f,onValueChange:e=>{p||u||o?.(e)},"aria-readonly":p,id:l,"aria-label":h,
12962
- "aria-labelledby":l,className:`RadioGroupRoot ${i??""}`.trim(),...m
12963
- },e?.map((e=>t.createElement(oO,{key:e?.[r],className:"RadioContainer"
12964
- },t.createElement(aO,{className:"RadioGroupItem",disabled:e.disabled,
12965
- value:e?.[r],id:e?.[r],"aria-label":e?.[a]},t.createElement(rO,{
12966
- className:"RadioGroupIndicator"})),t.createElement(ca,{className:"RadioLabel",
12967
- disabled:e.disabled,htmlFor:e?.[r]
12968
- },e?.[a]))))),c&&s&&t.createElement($s,null,s))
12961
+ value:f,onValueChange:e=>{p||u||o?.(e)},"aria-readonly":p,id:l,
12962
+ "aria-label":h||"Radio Group","aria-labelledby":h?l:void 0,
12963
+ className:`RadioGroupRoot ${i??""}`.trim(),...m},e?.map((e=>t.createElement(oO,{
12964
+ key:e?.[r],className:"RadioContainer"},t.createElement(aO,{
12965
+ className:"RadioGroupItem",disabled:e.disabled,value:e?.[r],id:e?.[r],
12966
+ "aria-label":e?.[a]},t.createElement(rO,{className:"RadioGroupIndicator"
12967
+ })),t.createElement(ca,{className:"RadioLabel",disabled:e.disabled,
12968
+ htmlFor:e?.[r]},e?.[a]))))),c&&s&&t.createElement($s,null,s))
12969
12969
  ;const cO="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement
12970
12970
  ;function sO(e){const t=Object.prototype.toString.call(e)
12971
12971
  ;return"[object Window]"===t||"[object global]"===t}function uO(e){
@@ -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,renderTabsContent:i,value:l})=>t.createElement($j,{
15772
- className:"TabsRoot",value:l,defaultValue:o,onValueChange:a
15773
- },t.createElement(Yj,{className:"TabsList","aria-label":"Manage your account"
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
- },i?i(e):null)))),Kj=t.createContext({toasts:[],windowState:"focus",
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.0-beta.54",
3
+ "version": "2.0.0-beta.56",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",