freemium-ui 2.0.91 → 2.1.0-alpha.0
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/lib/Accordion-Ccv-p2G6.js +134 -0
- package/lib/Accordion.d.ts +56 -0
- package/lib/Accordion.js +7 -0
- package/lib/Alert-BtEbkVK1.js +52 -0
- package/lib/Alert.d.ts +66 -0
- package/lib/Alert.js +6 -0
- package/lib/AutoComplete-DF33_uur.js +608 -0
- package/lib/AutoComplete.d.ts +105 -0
- package/lib/AutoComplete.js +14 -0
- package/lib/BoxedRadio-D5Kiintm.js +75 -0
- package/lib/BoxedRadio.d.ts +61 -0
- package/lib/BoxedRadio.js +10 -0
- package/lib/Button-Bd1O8_k7.js +34 -0
- package/lib/Button.d.ts +34 -0
- package/lib/Button.js +2 -0
- package/lib/ButtonDropdown-BZvCwUDe.js +37 -0
- package/lib/ButtonDropdown.d.ts +82 -0
- package/lib/ButtonDropdown.js +11 -0
- package/lib/Calendar-C0xW_pPO.js +32 -0
- package/lib/Calendar.d.ts +25 -0
- package/lib/Calendar.js +2 -0
- package/lib/Checkbox-By1CgFUJ.js +66 -0
- package/lib/Checkbox.d.ts +28 -0
- package/lib/Checkbox.js +7 -0
- package/lib/ChevronUp-BWiG3XYd.js +7 -0
- package/lib/Combination-AmN1Cqrf.js +210 -0
- package/lib/Confirmation-49GhlyzQ.js +66 -0
- package/lib/Confirmation.d.ts +72 -0
- package/lib/Confirmation.js +8 -0
- package/lib/Cross-CIeKwtq6.js +7 -0
- package/lib/CustomizeColumns-BSF8e_we.js +865 -0
- package/lib/Drawer-CnmXL5_B.js +33 -0
- package/lib/Drawer.d.ts +50 -0
- package/lib/Drawer.js +8 -0
- package/lib/Dropdown-D59u6zOt.js +89 -0
- package/lib/Dropdown.d.ts +162 -0
- package/lib/Dropdown.js +15 -0
- package/lib/ErrorText-Uvye7uop.js +8 -0
- package/lib/Info-BsILbpCG.js +9 -0
- package/lib/Input.d.ts +66 -0
- package/lib/Input.js +5 -0
- package/lib/Loader-b8lHCp4N.js +13 -0
- package/lib/Loader.d.ts +21 -0
- package/lib/Loader.js +3 -0
- package/lib/Menu-DoE00Mg-.js +19 -0
- package/lib/Menu.d.ts +80 -0
- package/lib/Menu.js +11 -0
- package/lib/Modal-D5RJHnbn.js +51 -0
- package/lib/Modal.d.ts +51 -0
- package/lib/Modal.js +7 -0
- package/lib/MultiSelectDropdown-DblSkVpv.js +84 -0
- package/lib/MultiSelectDropdown.d.ts +116 -0
- package/lib/MultiSelectDropdown.js +14 -0
- package/lib/Pickers.d.ts +94 -0
- package/lib/Pickers.js +16 -0
- package/lib/Popover-BU73-g73.js +90 -0
- package/lib/Popover.d.ts +94 -0
- package/lib/Popover.js +8 -0
- package/lib/QuillEditor.d.ts +29 -0
- package/lib/QuillEditor.js +3369 -0
- package/lib/Radio.d.ts +69 -0
- package/lib/Radio.js +10 -0
- package/lib/RadioGroup-DM_Y48_b.js +42 -0
- package/lib/Reorder-DUSHsq7i.js +697 -0
- package/lib/Reorder.d.ts +36 -0
- package/lib/Reorder.js +5 -0
- package/lib/SortDropdown-B0SSCJX6.js +17 -0
- package/lib/SortDropdown.d.ts +47 -0
- package/lib/SortDropdown.js +10 -0
- package/lib/Table-cidceyn5.js +117 -0
- package/lib/Table.d.ts +95 -0
- package/lib/Table.js +18 -0
- package/lib/Tabs-j1c7ybY-.js +50 -0
- package/lib/Tabs.d.ts +68 -0
- package/lib/Tabs.js +6 -0
- package/lib/Tag-Cu75ReQP.js +49 -0
- package/lib/Tag.d.ts +50 -0
- package/lib/Tag.js +4 -0
- package/lib/TextArea--fiwZ_QM.js +98 -0
- package/lib/ThemeProvider-bWL8hyYA.js +7 -0
- package/lib/ThemeProvider.d.ts +158 -0
- package/lib/ThemeProvider.js +9 -0
- package/lib/TickIcon-BJqSAG4_.js +7 -0
- package/lib/TimePicker-7Uqb3xJn.js +6598 -0
- package/lib/Toast.d.ts +61 -0
- package/lib/Toast.js +10 -0
- package/lib/ToastProvider-CMk1PSzB.js +264 -0
- package/lib/Toggle-BGV7Nc6t.js +59 -0
- package/lib/Toggle.d.ts +35 -0
- package/lib/Toggle.js +6 -0
- package/lib/Tooltip-DU_ATFRB.js +127 -0
- package/lib/Tooltip.d.ts +53 -0
- package/lib/Tooltip.js +8 -0
- package/lib/Typography-BcAppjDF.js +11 -0
- package/lib/Typography.d.ts +20 -0
- package/lib/Typography.js +2 -0
- package/lib/WorkspaceTable-BV5zccyt.js +100 -0
- package/lib/WorkspaceTable.d.ts +85 -0
- package/lib/WorkspaceTable.js +18 -0
- package/lib/_commonjsHelpers-fGXyuM93.js +4 -0
- package/lib/allPaths-DKtiSqHL.js +19 -0
- package/lib/allPathsLoader-Drb6xO2O.js +5 -0
- package/lib/index-B9EcTy5B.js +46 -0
- package/lib/index-BPxkexqj.js +60 -0
- package/lib/index-BROhcSiX.js +8 -0
- package/lib/index-BT1o947S.js +8 -0
- package/lib/index-BY9lf-do.js +2 -0
- package/lib/index-BdTXfGkV.js +24 -0
- package/lib/index-BnDw8kbT.js +135 -0
- package/lib/index-BrF1HKA1.js +338 -0
- package/lib/index-BxNZ3C71.js +4 -0
- package/lib/index-ByHJlnsx.js +26 -0
- package/lib/index-COoRg_pp.js +55 -0
- package/lib/index-CeIB4COQ.js +10 -0
- package/lib/index-Cjkk7z9c.js +19 -0
- package/lib/index-D6iTv28r.js +607 -0
- package/lib/index-D8E8s0tV.js +60 -0
- package/lib/index-DtILdK5l.js +48 -0
- package/lib/index-DtzckyT3.js +4 -0
- package/lib/index-Dy5ztCxm.js +27 -0
- package/lib/index-KMLwCm58.js +607 -0
- package/lib/index-_WvIFKTM.js +6 -0
- package/lib/index.d.ts +1826 -1842
- package/lib/index.js +54 -17049
- package/lib/isTypedArray-DN-UDJh5.js +89 -0
- package/lib/keyframes-PnzFl0I5.js +20 -0
- package/lib/package.json +133 -3
- package/lib/rollup.config.d.ts.map +1 -0
- package/lib/splitPathsBySizeLoader-Cm_vHo5k.js +23 -0
- package/lib/styled-components.browser.esm-Bq2p-e5F.js +479 -0
- package/lib/styles-BbwNLGy3.js +177 -0
- package/lib/styles-BlCCKAZq.js +1192 -0
- package/lib/use-toasts-GqvPVmSy.js +5 -0
- package/package.json +148 -12
- package/buildspec.yml +0 -22
- package/freemium-ui-2.0.91.tgz +0 -0
- package/lib/index.cjs.js +0 -17225
package/lib/Tooltip.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
import { TooltipProviderProps, TooltipProps as TooltipProps$1, TooltipArrowProps } from '@radix-ui/react-tooltip';
|
|
4
|
+
|
|
5
|
+
type TooltipPosition = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
6
|
+
type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
+
type TooltipAlign = 'start' | 'end' | 'center';
|
|
8
|
+
interface TooltipProps {
|
|
9
|
+
/**
|
|
10
|
+
* HTML to be rendered in the tooltip
|
|
11
|
+
*/
|
|
12
|
+
html?: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
/**
|
|
14
|
+
* String to be rendered in the tooltip
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The position of the tooltip
|
|
19
|
+
*/
|
|
20
|
+
position: TooltipPosition;
|
|
21
|
+
delay?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the arrow,
|
|
24
|
+
*/
|
|
25
|
+
arrow?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether disabled select
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Class name of tooltip
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
/**
|
|
36
|
+
* The children or label
|
|
37
|
+
*/
|
|
38
|
+
replaceChild?: boolean;
|
|
39
|
+
tabIndex?: number;
|
|
40
|
+
children?: React.ReactNode | string | null;
|
|
41
|
+
providerProps?: TooltipProviderProps;
|
|
42
|
+
rootProps?: TooltipProps$1;
|
|
43
|
+
arrowProps?: TooltipArrowProps;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Tooltip component is used to show a tooltip to the user.
|
|
48
|
+
* It is used to show additional information or actions.
|
|
49
|
+
* It can be used to show a hint, a warning, or any other content.
|
|
50
|
+
*/
|
|
51
|
+
declare const Tooltip: ({ position, label, html, style, children, className, disabled, delay, arrow, providerProps, rootProps, }: TooltipProps) => React$1.JSX.Element;
|
|
52
|
+
|
|
53
|
+
export { Tooltip, type TooltipAlign, type TooltipPosition, type TooltipProps, type TooltipSide };
|
package/lib/Tooltip.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export{T as Tooltip}from"./Tooltip-DU_ATFRB.js"
|
|
2
|
+
;import"./styled-components.browser.esm-Bq2p-e5F.js";import"react"
|
|
3
|
+
;import"./index-D8E8s0tV.js";import"./index-ByHJlnsx.js";import"react-dom"
|
|
4
|
+
;import"./index-BnDw8kbT.js";import"./keyframes-PnzFl0I5.js"
|
|
5
|
+
;import"./index-CeIB4COQ.js";import"./index-BdTXfGkV.js"
|
|
6
|
+
;import"./index-COoRg_pp.js";import"./index-BxNZ3C71.js"
|
|
7
|
+
;import"./index-BrF1HKA1.js";import"./index-BROhcSiX.js"
|
|
8
|
+
;import"./index-Dy5ztCxm.js";import"./index-_WvIFKTM.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{u as n,_ as t,a as e,b as r}from"./styled-components.browser.esm-Bq2p-e5F.js"
|
|
2
|
+
;import i from"react"
|
|
3
|
+
;var o,a=n.span(o||(o=t(["\n direction: ",";\n color: ",";\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n text-transform: ",";\n -webkit-font-smoothing: antialiased;\n"],["\n direction: ",";\n color: ",";\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n text-transform: ",";\n -webkit-font-smoothing: antialiased;\n"])),(function(n){
|
|
4
|
+
return n.theme.direction}),(function(n){return n.theme.colors.text.primary
|
|
5
|
+
}),(function(n){return n.theme.typography.fontFamily}),(function(n){
|
|
6
|
+
var t=n.theme,e=n.weight;return t.typography.fontWeight[e]}),(function(n){
|
|
7
|
+
var t=n.theme,e=n.variant;return t.typography[e].fontSize}),(function(n){
|
|
8
|
+
var t=n.theme,e=n.variant;return t.typography[e].lineHeight}),(function(n){
|
|
9
|
+
return"caption"===n.variant?"uppercase":"none"})),f=i.forwardRef((function(n,t){
|
|
10
|
+
var o=n.children,f=n.variant,h=void 0===f?"primary":f,m=n.weight,c=void 0===m?"regular":m,s=e(n,["children","variant","weight"])
|
|
11
|
+
;return i.createElement(a,r({variant:h,weight:c,ref:t},s),o)}));export{f as T};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
|
|
4
|
+
type TypographyWeightType = 'regular' | 'bold' | 'semi-bold';
|
|
5
|
+
type TypographyVariantType = 'primary' | 'secondary' | 'heading' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'caption';
|
|
6
|
+
interface TypographyProps extends React.HtmlHTMLAttributes<HTMLSpanElement> {
|
|
7
|
+
/**
|
|
8
|
+
* The children or label
|
|
9
|
+
*/
|
|
10
|
+
children?: React.ReactNode | string;
|
|
11
|
+
variant?: TypographyVariantType;
|
|
12
|
+
weight?: TypographyWeightType;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Typography component is used to show text to the user. It can be used to show a heading, a paragraph, or any other text.
|
|
17
|
+
*/
|
|
18
|
+
declare const Typography: React$1.ForwardRefExoticComponent<TypographyProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
19
|
+
|
|
20
|
+
export { Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import{e,c as n,b as t}from"./styled-components.browser.esm-Bq2p-e5F.js"
|
|
2
|
+
;import a from"react"
|
|
3
|
+
;import{u as l,T as o,a as i,b as r,c,d as s,C as u,e as m,f as d,g,h as p,S as f,i as E,j as h,k as v,l as b,m as C,n as y,o as S,p as w,B as k,q as P,r as x,s as M,t as I,v as N,M as O,w as R}from"./CustomizeColumns-BSF8e_we.js"
|
|
4
|
+
;import{B as F}from"./Button-Bd1O8_k7.js"
|
|
5
|
+
;import{C as j}from"./Checkbox-By1CgFUJ.js"
|
|
6
|
+
;import{L as T}from"./Loader-b8lHCp4N.js";import{M as D}from"./Menu-DoE00Mg-.js"
|
|
7
|
+
;import"./styles-BbwNLGy3.js";import{P as A}from"./Popover-BU73-g73.js"
|
|
8
|
+
;import{T as z}from"./Typography-BcAppjDF.js";var B=function(B){
|
|
9
|
+
var L,G=B.data,H=B.columns,V=B.showFooter,W=void 0!==V&&V,q=B.infoComponent,K=B.isLoading,$=B.isFetching,J=B.emptyComponent,Q=B.loadingComponent,U=B.headerComponent,X=B.filterComponent,Y=B.hideTableOnEmpty,Z=B.hideTopPagination,_=B.hideFilters,ee=B.isFilterOpenByDefault,ne=void 0===ee||ee,te=B.showTableOnLoading,ae=B.hideLoaderOnTopPagination,le=B.showWorkspaceActions,oe=B.count,ie=B.isWSOpen,re=void 0===ie||ie,ce=B.pageIndex,se=void 0===ce?0:ce,ue=B.pageSize,me=void 0===ue?20:ue,de=B.enablePreviousPage,ge=B.enableNextPage,pe=B.hideColumnSettings,fe=void 0===pe||pe,Ee=B.hideBottomPagination,he=B.rowMenuOptions,ve=B.onPreviousPageClick,be=B.isDisableActionMenu,Ce=void 0!==be&&be,ye=B.onNextPageClick,Se=B.disableRowSelect,we=B.hideSelectAllInTable,ke=B.onSelectAllRows,Pe=B.onRowSelect,xe=B.onMenuOptionSelect,Me=B.onRowClick,Ie=B.columnOrder,Ne=B.setColumnOrder,Oe=B.setHiddenColumns,Re=B.hiddenColumns,Fe=B.selectedRowIds,je=void 0===Fe?{}:Fe
|
|
10
|
+
;B.isDisableSortDropdown
|
|
11
|
+
;var Te=B.setSelectedRowIds,De=B.dataKey,Ae=void 0===De?"id":De,ze=B.cellPropGetter,Be=B.setPageIndex,Le=B.rowPropGetter,Ge=B.translationTexts,He=e(),Ve=a.useState(!!ne),We=Ve[0]
|
|
12
|
+
;Ve[1];var qe=N(),Ke=-1===oe||void 0===oe,$e=a.useMemo((function(){
|
|
13
|
+
return n(n(n([],Se?[]:[{id:"select",header:function(e){var n=e.table
|
|
14
|
+
;return we?a.createElement("div",{className:"table-checkbox-header"
|
|
15
|
+
}):a.createElement(j,t({className:"table-checkbox"},{
|
|
16
|
+
checked:n.getIsSomeRowsSelected()?"indeterminate":n.getIsAllRowsSelected(),
|
|
17
|
+
indeterminate:n.getIsSomeRowsSelected(),onCheckedChange:function(e){
|
|
18
|
+
n.toggleAllPageRowsSelected(!0===e),null==ke||ke(!0===e)}}))},cell:function(e){
|
|
19
|
+
var n=e.row;return a.createElement(j,t({className:"table-checkbox"},{
|
|
20
|
+
checked:n.getIsSelected(),disabled:!n.getCanSelect(),
|
|
21
|
+
indeterminate:n.getIsSomeSelected(),onCheckedChange:function(e){
|
|
22
|
+
n.toggleSelected(!0===e),null==Pe||Pe(n.original,!0===e)}}))}
|
|
23
|
+
}],!0),H.map((function(e){var n;return qe.accessor(e.id,{header:e.Header,
|
|
24
|
+
id:null!==(n=e.id)&&void 0!==n?n:e.Header,cell:function(n){
|
|
25
|
+
return e.accessorFn(n.row.original)}})})),!0),he?[{id:"rowMenuOptions",
|
|
26
|
+
header:function(){return a.createElement("div",{id:"more-actions-header"})},
|
|
27
|
+
cell:function(e){var n=e.row;return a.createElement(D,{
|
|
28
|
+
trigger:a.createElement(O,{className:"more-actions",fill:"currentcolor"}),
|
|
29
|
+
disableMenu:Ce,options:he(n.original)||[],onSelect:function(e){
|
|
30
|
+
e.id&&(null==xe||xe(e.id,n.original))},side:"bottom",
|
|
31
|
+
align:"rtl"===He.direction?"start":"end"})}}]:[],!0)
|
|
32
|
+
}),[H,Se,we,He.colors.text.primary]),Je=a.useMemo((function(){var e={}
|
|
33
|
+
;return H.forEach((function(n){e[n.id]=!(null!=Re?Re:[]).includes(n.id)})),e
|
|
34
|
+
}),[H,Re]),Qe=a.useMemo((function(){return{pageIndex:se,pageSize:me}
|
|
35
|
+
}),[me,se]),Ue=l({data:G,columns:$e,getRowId:function(e){var n
|
|
36
|
+
;return null!==(n=null==e?void 0:e[Ae])&&void 0!==n?n:"id"},getCoreRowModel:R(),
|
|
37
|
+
state:{columnOrder:Ie,columnVisibility:Je,rowSelection:je,pagination:Qe},
|
|
38
|
+
initialState:{columnPinning:{left:["select"],right:["rowMenuOptions"]}},
|
|
39
|
+
onPaginationChange:function(e){var n=Qe
|
|
40
|
+
;n="function"==typeof e?e(Qe):e,null==Be||Be(n.pageIndex)},
|
|
41
|
+
onColumnVisibilityChange:function(e){var n=Je
|
|
42
|
+
;n="function"==typeof e?e(Je):e,null==Oe||Oe(Object.keys(n).filter((function(e){
|
|
43
|
+
return!n[e]})))},onColumnOrderChange:function(e){var n=null!=Ie?Ie:[]
|
|
44
|
+
;n="function"==typeof e?e(null!=Ie?Ie:[]):e,null==Ne||Ne(n)},
|
|
45
|
+
onRowSelectionChange:function(e){var n=je
|
|
46
|
+
;n="function"==typeof e?e(je):e,null==Te||Te(n)},enableRowSelection:!0,
|
|
47
|
+
manualPagination:!0,rowCount:Ke?-1:oe
|
|
48
|
+
}),Xe=Ue.getPageCount,Ye=Ue.getRowModel,Ze=Ue.getState,_e=Ue.getCanNextPage,en=Ue.getCanPreviousPage,nn=Ue.getPageOptions,tn=Ue.previousPage,an=Ue.setPageIndex,ln=Ue.nextPage,on=Ue.lastPage,rn=Ue.firstPage,cn=Ye().rows,sn=Ze().pagination,un=sn.pageIndex,mn=sn.pageSize,dn=un*mn+(un<Xe()-1?mn:cn.length),gn=Ue.getAllColumns().filter((function(e){
|
|
49
|
+
return e.getIsVisible()})).length+(Se?0:1)+(he?1:0);return a.createElement(o,{
|
|
50
|
+
className:"TableContainer"},le&&a.createElement(i,{className:"table-actions"
|
|
51
|
+
},a.createElement(r,{className:"table-header-component"
|
|
52
|
+
},null!=U?U:null),!!re&&a.createElement(c,{
|
|
53
|
+
className:"table-header-dropdown-pagination"},a.createElement(s,{
|
|
54
|
+
className:"pagination-actions"
|
|
55
|
+
},!Z&&a.createElement(a.Fragment,null,a.createElement(z,{variant:"primary",
|
|
56
|
+
className:"pagination-text"},K&&!ae?a.createElement(T,{size:"small"
|
|
57
|
+
}):a.createElement(a.Fragment,null,G.length>0?"".concat(un*mn+1," - ").concat(dn," ").concat((null==Ge?void 0:Ge.of)||"of"," ").concat(Ke?"".concat(cn.length>0?"".concat((null==Ge?void 0:Ge.many)||"Many"):"-"):null!==(L=null!=oe?oe:cn.length)&&void 0!==L?L:"-"):null)),a.createElement(F,{
|
|
58
|
+
variant:"secondary",className:"table-pagination-button",onClick:function(e){
|
|
59
|
+
null==ve||ve(),Ke||tn()},disabled:Ke?!de:!en()||K||$},a.createElement(u,{
|
|
60
|
+
fill:He.colors.text.primary})),a.createElement(F,{variant:"secondary",
|
|
61
|
+
className:"table-pagination-button",onClick:function(e){null==ye||ye(),Ke||ln()
|
|
62
|
+
},disabled:Ke?!ge:!_e()||K||$},a.createElement(m,{fill:He.colors.text.primary
|
|
63
|
+
})))))),!!re&&a.createElement(d,null,a.createElement(g,{
|
|
64
|
+
className:"table-wrapper"
|
|
65
|
+
},q&&a.createElement(p,null,q),K&&!te?a.createElement(a.Fragment,null,Q):a.createElement(a.Fragment,null,0===cn.length&&Y?a.createElement(a.Fragment,null,J):a.createElement(f,null,a.createElement(E,null,!fe&&a.createElement(A,{
|
|
66
|
+
align:"end",avoidCollisions:!0,side:"top",trigger:a.createElement(h,{
|
|
67
|
+
fill:"currentcolor"})},a.createElement(v,{table:Ue
|
|
68
|
+
})),a.createElement(b,null,Ue.getHeaderGroups().map((function(e){
|
|
69
|
+
return a.createElement(C,{key:e.id},e.headers.map((function(e){
|
|
70
|
+
return a.createElement(y,{key:e.id
|
|
71
|
+
},e.isPlaceholder?null:S(e.column.columnDef.header,e.getContext()))})))
|
|
72
|
+
}))),a.createElement(w,null,$&&!K&&a.createElement(k,null,a.createElement(T,null)),cn.map((function(e){
|
|
73
|
+
return a.createElement(C,t({key:e.id,$isSelected:e.getIsSelected()
|
|
74
|
+
},null==Le?void 0:Le(e.original)),e.getVisibleCells().map((function(n){
|
|
75
|
+
return a.createElement(P,t({key:n.id,onClick:function(){
|
|
76
|
+
null==Me||Me(e.original,n.column.columnDef)}
|
|
77
|
+
},null==ze?void 0:ze(n)),S(n.column.columnDef.cell,n.getContext()))})))
|
|
78
|
+
}))),W&&a.createElement(x,null,Ue.getFooterGroups().map((function(e){
|
|
79
|
+
return a.createElement(C,{key:e.id},e.headers.map((function(e){
|
|
80
|
+
return a.createElement(y,{key:e.id
|
|
81
|
+
},e.isPlaceholder?null:S(e.column.columnDef.footer,e.getContext()))})))
|
|
82
|
+
}))),!Ee&&a.createElement(x,null,a.createElement(C,null,a.createElement(y,{
|
|
83
|
+
colSpan:gn},a.createElement(M,{className:"table-pagination"},a.createElement(F,{
|
|
84
|
+
variant:"secondary",onClick:function(){rn()},disabled:!en()||K||$
|
|
85
|
+
},"<<"),a.createElement(F,{variant:"secondary",onClick:function(){tn()},
|
|
86
|
+
disabled:!en()||K||$
|
|
87
|
+
},"<"),un+1>2&&a.createElement(a.Fragment,null,a.createElement(F,{
|
|
88
|
+
variant:"secondary",onClick:function(){rn()},disabled:K||$
|
|
89
|
+
},"1"),un+1-3!=0&&a.createElement(F,{variant:"secondary",disabled:!0
|
|
90
|
+
},"...")),nn().map((function(e){
|
|
91
|
+
return[e-2,e-1,e,e+1,e+2].includes(un+1)&&a.createElement(F,{key:e,
|
|
92
|
+
variant:"secondary",className:un+1===e+1?"active":"",onClick:function(){
|
|
93
|
+
null==an||an(e)},disabled:K||$},e+1)
|
|
94
|
+
})),un+2<Math.ceil(G.length/mn)-2&&a.createElement(a.Fragment,null,un+2+3!==Math.ceil(G.length/mn)&&a.createElement(F,{
|
|
95
|
+
variant:"secondary",disabled:!0},"..."),a.createElement(F,{variant:"secondary",
|
|
96
|
+
onClick:function(){null==an||an(Math.ceil(G.length/mn)-1)},disabled:K||$
|
|
97
|
+
},Math.ceil(G.length/mn))),a.createElement(F,{variant:"secondary",
|
|
98
|
+
onClick:function(){ln()},disabled:!_e()||K||$},">"),a.createElement(F,{
|
|
99
|
+
variant:"secondary",onClick:function(){on()},disabled:!_e()||K||$
|
|
100
|
+
},">>"))))))))),!_&&We&&X&&a.createElement(I,null,X)))};export{B as W};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import react from 'react';
|
|
3
|
+
import { CoreOptions, ColumnDef, Cell, RowSelectionState } from '@tanstack/react-table';
|
|
4
|
+
import { MenuItemProps as MenuItemProps$1 } from '@radix-ui/react-dropdown-menu';
|
|
5
|
+
|
|
6
|
+
type MenuItemProps = MenuItemProps$1 & {
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type WorkspaceRowDataType = {
|
|
11
|
+
[key in string]: any;
|
|
12
|
+
};
|
|
13
|
+
interface FuiTableColumnType<T extends WorkspaceRowDataType> {
|
|
14
|
+
id: string;
|
|
15
|
+
Header: string;
|
|
16
|
+
accessorFn: (row: T) => React.ReactNode | string | null;
|
|
17
|
+
disableSortBy?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface WorkspaceTableProps<T extends WorkspaceRowDataType> {
|
|
20
|
+
/**
|
|
21
|
+
* How large should the button be?
|
|
22
|
+
*/
|
|
23
|
+
data: CoreOptions<T>['data'];
|
|
24
|
+
columns: FuiTableColumnType<T>[];
|
|
25
|
+
count?: number;
|
|
26
|
+
pageSize?: number;
|
|
27
|
+
pageIndex?: number;
|
|
28
|
+
enablePreviousPage?: boolean;
|
|
29
|
+
enableNextPage?: boolean;
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
isFetching?: boolean;
|
|
32
|
+
showFooter?: boolean;
|
|
33
|
+
hideColumnSettings?: boolean;
|
|
34
|
+
hideTableOnEmpty?: boolean;
|
|
35
|
+
hideTopPagination?: boolean;
|
|
36
|
+
hideFilters?: boolean;
|
|
37
|
+
showTableOnLoading?: boolean;
|
|
38
|
+
hideLoaderOnTopPagination?: boolean;
|
|
39
|
+
showWorkspaceActions?: boolean;
|
|
40
|
+
hideSelectAllInTable?: boolean;
|
|
41
|
+
isWSOpen?: boolean;
|
|
42
|
+
isDisableActionMenu?: boolean;
|
|
43
|
+
hideBottomPagination?: boolean;
|
|
44
|
+
disableRowSelect?: boolean;
|
|
45
|
+
infoComponent?: React.ReactElement;
|
|
46
|
+
filterComponent?: React.ReactElement;
|
|
47
|
+
isDisableSortDropdown?: boolean | null;
|
|
48
|
+
isFilterOpenByDefault?: boolean | null;
|
|
49
|
+
emptyComponent?: React.ReactElement;
|
|
50
|
+
loadingComponent?: React.ReactElement;
|
|
51
|
+
headerComponent?: React.ReactElement;
|
|
52
|
+
translationTexts?: Record<string, any> | null;
|
|
53
|
+
onNextPageClick?: () => void;
|
|
54
|
+
onPreviousPageClick?: () => void;
|
|
55
|
+
onSelectAllRows?: (checked: boolean) => void;
|
|
56
|
+
onRowSelect?: (row: T, checked: boolean) => void;
|
|
57
|
+
rowMenuOptions?: (RowDataType: T) => MenuItemProps[];
|
|
58
|
+
onMenuOptionSelect?: (optionId: string, row: T) => void;
|
|
59
|
+
onRowClick?: (row: T, column: ColumnDef<T, unknown>) => void;
|
|
60
|
+
dataKey?: string;
|
|
61
|
+
rowPropGetter?: (row: T) => React.HTMLAttributes<HTMLTableRowElement>;
|
|
62
|
+
cellPropGetter?: (cell: Cell<T, unknown>) => React.HTMLAttributes<HTMLTableCellElement>;
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated
|
|
65
|
+
*/
|
|
66
|
+
tableOptions?: any;
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated
|
|
69
|
+
*/
|
|
70
|
+
loaderStyles?: React.CSSProperties;
|
|
71
|
+
setPageIndex?: (pageIndex: number) => void | React.Dispatch<React.SetStateAction<number>>;
|
|
72
|
+
hiddenColumns?: string[];
|
|
73
|
+
setHiddenColumns?: (hiddenColumns: string[]) => void | React.Dispatch<React.SetStateAction<string[]>>;
|
|
74
|
+
columnOrder?: string[];
|
|
75
|
+
setColumnOrder?: (columnOrder: string[]) => void | React.Dispatch<React.SetStateAction<string[]>>;
|
|
76
|
+
selectedRowIds?: RowSelectionState;
|
|
77
|
+
setSelectedRowIds?: (selectedRowIds: RowSelectionState) => void | React.Dispatch<React.SetStateAction<RowSelectionState>>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Table component is used to display data in a tabular format. It is used to show data in a structured manner. It can be used to show data in a grid format.
|
|
82
|
+
*/
|
|
83
|
+
declare const WorkspaceTable: <T extends WorkspaceRowDataType = WorkspaceRowDataType>(props: WorkspaceTableProps<T>) => react.JSX.Element;
|
|
84
|
+
|
|
85
|
+
export { type WorkspaceRowDataType, WorkspaceTable, type WorkspaceTableProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export{W as WorkspaceTable}from"./WorkspaceTable-BV5zccyt.js"
|
|
2
|
+
;import"./styled-components.browser.esm-Bq2p-e5F.js";import"react"
|
|
3
|
+
;import"./CustomizeColumns-BSF8e_we.js";import"./index-D8E8s0tV.js"
|
|
4
|
+
;import"./index-ByHJlnsx.js";import"react-dom";import"./index-BnDw8kbT.js"
|
|
5
|
+
;import"./keyframes-PnzFl0I5.js";import"./ChevronUp-BWiG3XYd.js"
|
|
6
|
+
;import"./Button-Bd1O8_k7.js";import"./Checkbox-By1CgFUJ.js"
|
|
7
|
+
;import"./index-BdTXfGkV.js";import"./index-CeIB4COQ.js"
|
|
8
|
+
;import"./index-DtzckyT3.js";import"./index-BROhcSiX.js"
|
|
9
|
+
;import"./index-Dy5ztCxm.js";import"./TickIcon-BJqSAG4_.js"
|
|
10
|
+
;import"./Cross-CIeKwtq6.js";import"./TextArea--fiwZ_QM.js"
|
|
11
|
+
;import"./ErrorText-Uvye7uop.js";import"./Popover-BU73-g73.js"
|
|
12
|
+
;import"./index-COoRg_pp.js";import"./Combination-AmN1Cqrf.js"
|
|
13
|
+
;import"./index-BxNZ3C71.js";import"./index-BrF1HKA1.js"
|
|
14
|
+
;import"./Reorder-DUSHsq7i.js";import"./index-BT1o947S.js"
|
|
15
|
+
;import"./Typography-BcAppjDF.js";import"./Loader-b8lHCp4N.js"
|
|
16
|
+
;import"./Menu-DoE00Mg-.js";import"./styles-BbwNLGy3.js"
|
|
17
|
+
;import"./index-Cjkk7z9c.js";import"./index-BY9lf-do.js"
|
|
18
|
+
;import"./index-DtILdK5l.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}
|
|
2
|
+
;function o(e){
|
|
3
|
+
return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e
|
|
4
|
+
}export{e as c,o as g};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{I as r}from"./index-D6iTv28r.js";import{I as i}from"./index-KMLwCm58.js"
|
|
2
|
+
;import{p as o,I as t}from"./TimePicker-7Uqb3xJn.js"
|
|
3
|
+
;import"./styled-components.browser.esm-Bq2p-e5F.js";import"react"
|
|
4
|
+
;import"./index-BT1o947S.js";import"./index-BnDw8kbT.js"
|
|
5
|
+
;import"./index-D8E8s0tV.js";import"./index-ByHJlnsx.js";import"react-dom"
|
|
6
|
+
;import"./keyframes-PnzFl0I5.js";import"./ErrorText-Uvye7uop.js"
|
|
7
|
+
;import"./Button-Bd1O8_k7.js";import"./_commonjsHelpers-fGXyuM93.js"
|
|
8
|
+
;import"./isTypedArray-DN-UDJh5.js";import"./styles-BlCCKAZq.js"
|
|
9
|
+
;import"./index-CeIB4COQ.js";import"./index-BdTXfGkV.js"
|
|
10
|
+
;import"./index-Cjkk7z9c.js";import"./index-BY9lf-do.js"
|
|
11
|
+
;import"./index-COoRg_pp.js";import"./Combination-AmN1Cqrf.js"
|
|
12
|
+
;import"./index-BxNZ3C71.js";import"./index-BrF1HKA1.js"
|
|
13
|
+
;import"./index-BROhcSiX.js";import"./index-DtzckyT3.js"
|
|
14
|
+
;import"./index-_WvIFKTM.js";import"./ChevronUp-BWiG3XYd.js"
|
|
15
|
+
;import"./Dropdown-D59u6zOt.js";import"./Cross-CIeKwtq6.js"
|
|
16
|
+
;import"./TickIcon-BJqSAG4_.js";import"./TextArea--fiwZ_QM.js"
|
|
17
|
+
;import"./Loader-b8lHCp4N.js";function s(s,m){var p=o(s)
|
|
18
|
+
;return m===t.STANDARD?r[p]:i[p]}function m(r){return o(r)}
|
|
19
|
+
export{r as IconSvgPaths16,i as IconSvgPaths20,s as getIconPaths,m as iconNameToPathsRecordKey};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{g as t,i as r}from"./styled-components.browser.esm-Bq2p-e5F.js"
|
|
2
|
+
;import"react";var e=function(e,o){return t(void 0,void 0,void 0,(function(){
|
|
3
|
+
return r(this,(function(t){switch(t.label){case 0:
|
|
4
|
+
return[4,import("./allPaths-DKtiSqHL.js")];case 1:
|
|
5
|
+
return[2,(0,t.sent().getIconPaths)(e,o)]}}))}))};export{e as allPathsLoader};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{_ as e,a as o,$ as r}from"./index-ByHJlnsx.js"
|
|
2
|
+
;import{forwardRef as n,createElement as a,useRef as t,useEffect as d,useState as i}from"react"
|
|
3
|
+
;import{a as s,$ as c}from"./index-CeIB4COQ.js"
|
|
4
|
+
;import{$ as u}from"./index-BdTXfGkV.js"
|
|
5
|
+
;import{$ as l,a as p,b as m}from"./index-DtILdK5l.js"
|
|
6
|
+
;import{$ as b}from"./index-BY9lf-do.js";import{$ as f}from"./index-BROhcSiX.js"
|
|
7
|
+
;import{$ as v}from"./index-DtzckyT3.js";import{$ as k}from"./index-Dy5ztCxm.js"
|
|
8
|
+
;const h="Radio",[y,w]=u(h),[C,_]=y(h),g=n(((n,d)=>{
|
|
9
|
+
const{__scopeRadio:s,name:u,checked:l=!1,required:p,disabled:m,value:b="on",onCheck:f,...v}=n,[k,h]=i(null),y=r(d,(e=>h(e))),w=t(!1),_=!k||Boolean(k.closest("form"))
|
|
10
|
+
;return a(C,{scope:s,checked:l,disabled:m},a(o.button,e({type:"button",
|
|
11
|
+
role:"radio","aria-checked":l,"data-state":j(l),"data-disabled":m?"":void 0,
|
|
12
|
+
disabled:m,value:b},v,{ref:y,onClick:c(n.onClick,(e=>{
|
|
13
|
+
l||null==f||f(),_&&(w.current=e.isPropagationStopped(),
|
|
14
|
+
w.current||e.stopPropagation())}))})),_&&a(R,{control:k,bubbles:!w.current,
|
|
15
|
+
name:u,value:b,checked:l,required:p,disabled:m,style:{
|
|
16
|
+
transform:"translateX(-100%)"}}))})),x=n(((r,n)=>{
|
|
17
|
+
const{__scopeRadio:t,forceMount:d,...i}=r,s=_("RadioIndicator",t);return a(k,{
|
|
18
|
+
present:d||s.checked},a(o.span,e({"data-state":j(s.checked),
|
|
19
|
+
"data-disabled":s.disabled?"":void 0},i,{ref:n})))})),R=o=>{
|
|
20
|
+
const{control:r,checked:n,bubbles:i=!0,...s}=o,c=t(null),u=v(n),l=f(r)
|
|
21
|
+
;return d((()=>{
|
|
22
|
+
const e=c.current,o=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(o,"checked").set
|
|
23
|
+
;if(u!==n&&r){const o=new Event("click",{bubbles:i})
|
|
24
|
+
;r.call(e,n),e.dispatchEvent(o)}}),[u,n,i]),a("input",e({type:"radio",
|
|
25
|
+
"aria-hidden":!0,defaultChecked:n},s,{tabIndex:-1,ref:c,style:{...o.style,...l,
|
|
26
|
+
position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function j(e){
|
|
27
|
+
return e?"checked":"unchecked"}
|
|
28
|
+
const E=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],$="RadioGroup",[q,L]=u($,[l,w]),G=l(),A=w(),[D,I]=q($),P=n(((r,n)=>{
|
|
29
|
+
const{__scopeRadioGroup:t,name:d,defaultValue:i,value:c,required:u=!1,disabled:l=!1,orientation:m,dir:f,loop:v=!0,onValueChange:k,...h}=r,y=G(t),w=b(f),[C,_]=s({
|
|
30
|
+
prop:c,defaultProp:i,onChange:k});return a(D,{scope:t,name:d,required:u,
|
|
31
|
+
disabled:l,value:C,onValueChange:_},a(p,e({asChild:!0},y,{orientation:m,dir:w,
|
|
32
|
+
loop:v}),a(o.div,e({role:"radiogroup","aria-required":u,"aria-orientation":m,
|
|
33
|
+
"data-disabled":l?"":void 0,dir:w},h,{ref:n}))))})),V=n(((o,n)=>{
|
|
34
|
+
const{__scopeRadioGroup:i,disabled:s,...u}=o,l=I("RadioGroupItem",i),p=l.disabled||s,b=G(i),f=A(i),v=t(null),k=r(n,v),h=l.value===u.value,y=t(!1)
|
|
35
|
+
;return d((()=>{const e=e=>{E.includes(e.key)&&(y.current=!0)
|
|
36
|
+
},o=()=>y.current=!1
|
|
37
|
+
;return document.addEventListener("keydown",e),document.addEventListener("keyup",o),
|
|
38
|
+
()=>{
|
|
39
|
+
document.removeEventListener("keydown",e),document.removeEventListener("keyup",o)
|
|
40
|
+
}}),[]),a(m,e({asChild:!0},b,{focusable:!p,active:h}),a(g,e({disabled:p,
|
|
41
|
+
required:l.required,checked:h},f,u,{name:l.name,ref:k,
|
|
42
|
+
onCheck:()=>l.onValueChange(u.value),onKeyDown:c((e=>{
|
|
43
|
+
"Enter"===e.key&&e.preventDefault()})),onFocus:c(u.onFocus,(()=>{var e
|
|
44
|
+
;y.current&&(null===(e=v.current)||void 0===e||e.click())}))})))
|
|
45
|
+
})),F=n(((o,r)=>{const{__scopeRadioGroup:n,...t}=o,d=A(n);return a(x,e({},d,t,{
|
|
46
|
+
ref:r}))}));export{P as $,F as a,V as b};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{_ as o,$ as e,a as n,b as t}from"./index-ByHJlnsx.js"
|
|
2
|
+
;import{forwardRef as r,createElement as a,useRef as s,useEffect as i,Fragment as l,useCallback as c,Children as u}from"react"
|
|
3
|
+
;import{$ as p,a as d}from"./index-CeIB4COQ.js"
|
|
4
|
+
;import{$ as f,a as g}from"./index-BdTXfGkV.js"
|
|
5
|
+
;import{$ as D}from"./index-BxNZ3C71.js"
|
|
6
|
+
;import{$ as m,a as _}from"./index-COoRg_pp.js"
|
|
7
|
+
;import{h as v,$ as C,a as O,R as h}from"./Combination-AmN1Cqrf.js"
|
|
8
|
+
;import{$ as b}from"./index-Dy5ztCxm.js"
|
|
9
|
+
;const F="Dialog",[I,y]=f(F),[P,A]=I(F),M="DialogPortal",[R,$]=I(M,{
|
|
10
|
+
forceMount:void 0}),j="DialogOverlay",x=r(((e,n)=>{
|
|
11
|
+
const t=$(j,e.__scopeDialog),{forceMount:r=t.forceMount,...s}=e,i=A(j,e.__scopeDialog)
|
|
12
|
+
;return i.modal?a(b,{present:r||i.open},a(E,o({},s,{ref:n}))):null
|
|
13
|
+
})),E=r(((e,r)=>{const{__scopeDialog:s,...i}=e,l=A(j,s);return a(h,{as:t,
|
|
14
|
+
allowPinchZoom:!0,shards:[l.contentRef]},a(n.div,o({"data-state":B(l.open)},i,{
|
|
15
|
+
ref:r,style:{pointerEvents:"auto",...i.style}})))
|
|
16
|
+
})),w="DialogContent",T=r(((e,n)=>{
|
|
17
|
+
const t=$(w,e.__scopeDialog),{forceMount:r=t.forceMount,...s}=e,i=A(w,e.__scopeDialog)
|
|
18
|
+
;return a(b,{present:r||i.open},i.modal?a(k,o({},s,{ref:n})):a(N,o({},s,{ref:n
|
|
19
|
+
})))})),k=r(((n,t)=>{
|
|
20
|
+
const r=A(w,n.__scopeDialog),l=s(null),c=e(t,r.contentRef,l);return i((()=>{
|
|
21
|
+
const o=l.current;if(o)return v(o)}),[]),a(K,o({},n,{ref:c,trapFocus:r.open,
|
|
22
|
+
disableOutsidePointerEvents:!0,onCloseAutoFocus:p(n.onCloseAutoFocus,(o=>{var e
|
|
23
|
+
;o.preventDefault(),null===(e=r.triggerRef.current)||void 0===e||e.focus()})),
|
|
24
|
+
onPointerDownOutside:p(n.onPointerDownOutside,(o=>{
|
|
25
|
+
const e=o.detail.originalEvent,n=0===e.button&&!0===e.ctrlKey
|
|
26
|
+
;(2===e.button||n)&&o.preventDefault()})),
|
|
27
|
+
onFocusOutside:p(n.onFocusOutside,(o=>o.preventDefault()))}))})),N=r(((e,n)=>{
|
|
28
|
+
const t=A(w,e.__scopeDialog),r=s(!1),i=s(!1);return a(K,o({},e,{ref:n,
|
|
29
|
+
trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var n,a
|
|
30
|
+
;(null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,o),
|
|
31
|
+
o.defaultPrevented)||(r.current||null===(a=t.triggerRef.current)||void 0===a||a.focus(),
|
|
32
|
+
o.preventDefault());r.current=!1,i.current=!1},onInteractOutside:o=>{var n,a
|
|
33
|
+
;null===(n=e.onInteractOutside)||void 0===n||n.call(e,o),
|
|
34
|
+
o.defaultPrevented||(r.current=!0,
|
|
35
|
+
"pointerdown"===o.detail.originalEvent.type&&(i.current=!0));const s=o.target
|
|
36
|
+
;(null===(a=t.triggerRef.current)||void 0===a?void 0:a.contains(s))&&o.preventDefault(),
|
|
37
|
+
"focusin"===o.detail.originalEvent.type&&i.current&&o.preventDefault()}}))
|
|
38
|
+
})),K=r(((n,t)=>{
|
|
39
|
+
const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,...p}=n,d=A(w,r),f=s(null),g=e(t,f)
|
|
40
|
+
;return C(),a(l,null,a(O,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,
|
|
41
|
+
onUnmountAutoFocus:u},a(m,o({role:"dialog",id:d.contentId,
|
|
42
|
+
"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,
|
|
43
|
+
"data-state":B(d.open)},p,{ref:g,onDismiss:()=>d.onOpenChange(!1)}))),!1)
|
|
44
|
+
})),S="DialogTitle",U=r(((e,t)=>{const{__scopeDialog:r,...s}=e,i=A(S,r)
|
|
45
|
+
;return a(n.h2,o({id:i.titleId},s,{ref:t}))
|
|
46
|
+
})),W="DialogDescription",Z=r(((e,t)=>{const{__scopeDialog:r,...s}=e,i=A(W,r)
|
|
47
|
+
;return a(n.p,o({id:i.descriptionId},s,{ref:t}))
|
|
48
|
+
})),q="DialogClose",z=r(((e,t)=>{const{__scopeDialog:r,...s}=e,i=A(q,r)
|
|
49
|
+
;return a(n.button,o({type:"button"},s,{ref:t,
|
|
50
|
+
onClick:p(e.onClick,(()=>i.onOpenChange(!1)))}))}));function B(o){
|
|
51
|
+
return o?"open":"closed"}const[G,H]=g("DialogTitleWarning",{contentName:w,
|
|
52
|
+
titleName:S,docsSlug:"dialog"}),J=o=>{
|
|
53
|
+
const{__scopeDialog:e,children:n,open:t,defaultOpen:r,onOpenChange:i,modal:l=!0}=o,u=s(null),p=s(null),[f=!1,g]=d({
|
|
54
|
+
prop:t,defaultProp:r,onChange:i});return a(P,{scope:e,triggerRef:u,contentRef:p,
|
|
55
|
+
contentId:D(),titleId:D(),descriptionId:D(),open:f,onOpenChange:g,
|
|
56
|
+
onOpenToggle:c((()=>g((o=>!o))),[g]),modal:l},n)},L=o=>{
|
|
57
|
+
const{__scopeDialog:e,forceMount:n,children:t,container:r}=o,s=A(M,e)
|
|
58
|
+
;return a(R,{scope:e,forceMount:n},u.map(t,(o=>a(b,{present:n||s.open},a(_,{
|
|
59
|
+
asChild:!0,container:r},o)))))},Q=x,V=T,X=U,Y=Z,oo=z
|
|
60
|
+
;export{y as $,J as a,L as b,Q as c,G as d,V as e,X as f,Y as g,oo as h};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{useState as e}from"react";import{c as r}from"./index-BdTXfGkV.js"
|
|
2
|
+
;function i(i){const[t,o]=e(void 0);return r((()=>{if(i){o({width:i.offsetWidth,
|
|
3
|
+
height:i.offsetHeight});const e=new ResizeObserver((e=>{
|
|
4
|
+
if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let t,s
|
|
5
|
+
;if("borderBoxSize"in r){const e=r.borderBoxSize,i=Array.isArray(e)?e[0]:e
|
|
6
|
+
;t=i.inlineSize,s=i.blockSize}else t=i.offsetWidth,s=i.offsetHeight;o({width:t,
|
|
7
|
+
height:s})}));return e.observe(i,{box:"border-box"}),()=>e.unobserve(i)}
|
|
8
|
+
o(void 0)}),[i]),t}export{i as $};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as o}from"./styled-components.browser.esm-Bq2p-e5F.js"
|
|
2
|
+
;import{p as e}from"./index-BnDw8kbT.js"
|
|
3
|
+
;o(o(o({},e.common),e.primary),e.secondary);var n=function(){
|
|
4
|
+
return Math.random().toString(32).slice(2,10)},r="fui:debug",t=function(){
|
|
5
|
+
if("undefined"==typeof window||!window||"undefined"==typeof localStorage||!localStorage)return{}
|
|
6
|
+
;var o=localStorage.getItem(r);return JSON.parse(null!=o?o:"{}")
|
|
7
|
+
}(),a=function(o,e){t.log&&console.log("".concat(r,":").concat(o),e)}
|
|
8
|
+
;export{a,n as g};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{createContext as n,useMemo as e,createElement as o,useContext as r,useRef as t,useEffect as c,useLayoutEffect as u}from"react"
|
|
2
|
+
;function s(t,c){const u=n(c);function s(n){
|
|
3
|
+
const{children:r,...t}=n,c=e((()=>t),Object.values(t));return o(u.Provider,{
|
|
4
|
+
value:c},r)}return s.displayName=t+"Provider",[s,function(n){const e=r(u)
|
|
5
|
+
;if(e)return e;if(void 0!==c)return c
|
|
6
|
+
;throw new Error(`\`${n}\` must be used within \`${t}\``)}]}function i(t,c=[]){
|
|
7
|
+
let u=[];const s=()=>{const o=u.map((e=>n(e)));return function(n){
|
|
8
|
+
const r=(null==n?void 0:n[t])||o;return e((()=>({[`__scope${t}`]:{...n,[t]:r}
|
|
9
|
+
})),[n,r])}};return s.scopeName=t,[function(c,s){const i=n(s),l=u.length
|
|
10
|
+
;function a(n){
|
|
11
|
+
const{scope:r,children:c,...u}=n,s=(null==r?void 0:r[t][l])||i,a=e((()=>u),Object.values(u))
|
|
12
|
+
;return o(s.Provider,{value:a},c)}
|
|
13
|
+
return u=[...u,s],a.displayName=c+"Provider",[a,function(n,e){
|
|
14
|
+
const o=(null==e?void 0:e[t][l])||i,u=r(o);if(u)return u;if(void 0!==s)return s
|
|
15
|
+
;throw new Error(`\`${n}\` must be used within \`${c}\``)}]},l(s,...c)]}
|
|
16
|
+
function l(...n){const o=n[0];if(1===n.length)return o;const r=()=>{
|
|
17
|
+
const r=n.map((n=>({useScope:n(),scopeName:n.scopeName})));return function(n){
|
|
18
|
+
const t=r.reduce(((e,{useScope:o,scopeName:r})=>({...e,...o(n)[`__scope${r}`]
|
|
19
|
+
})),{});return e((()=>({[`__scope${o.scopeName}`]:t})),[t])}}
|
|
20
|
+
;return r.scopeName=o.scopeName,r}function a(n){const o=t(n);return c((()=>{
|
|
21
|
+
o.current=n})),e((()=>(...n)=>{var e
|
|
22
|
+
;return null===(e=o.current)||void 0===e?void 0:e.call(o,...n)}),[])}
|
|
23
|
+
const d=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?u:()=>{}
|
|
24
|
+
;export{i as $,s as a,a as b,d as c};
|