@povio/ui 3.4.0-rc.44 → 3.4.0-rc.45
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/{Accordion-DonRhvvW.d.ts → Accordion-UtY7wEp-.d.ts} +2 -1
- package/dist/{ActionModal-CKS0t-n3.d.ts → ActionModal-CzM2hcr0.d.ts} +1 -1
- package/dist/{Autocomplete-CLcRRdiL.d.ts → Autocomplete-B9GmXJF4.d.ts} +3 -2
- package/dist/{Breadcrumbs-C46_H95J.d.ts → Breadcrumbs-BLBMJpe1.d.ts} +3 -2
- package/dist/{Button-D0M9lMOR.d.ts → Button-DZZporg_.d.ts} +3 -3
- package/dist/{Checkbox-DC_1l0o7.d.ts → Checkbox-JJwUwUxc.d.ts} +1 -1
- package/dist/{CheckboxGroup-DnWeRs5l.d.ts → CheckboxGroup-Cw-SKIqN.d.ts} +2 -2
- package/dist/{DatePicker-KFZRDJfS.d.ts → DatePicker-DAd7ncHf.d.ts} +3 -3
- package/dist/{DatePickerInput-B7yVoI9Y.d.ts → DatePickerInput-CusTFCKQ.d.ts} +3 -3
- package/dist/{DateRangePicker-DcZ1l894.d.ts → DateRangePicker-CMbIzR3m.d.ts} +4 -4
- package/dist/{DateTimePicker-DWlstLhf.d.ts → DateTimePicker-Dc6_5X1V.d.ts} +4 -4
- package/dist/{FileUpload-Czof_aOb.d.ts → FileUpload-B7gn4UwN.d.ts} +1 -1
- package/dist/{FileUploadContainer--YlhZO19.d.ts → FileUploadContainer-C4PRM8Io.d.ts} +1 -1
- package/dist/{Form-Cnm0yRXZ.d.ts → Form-CQRpe7ZJ.d.ts} +1 -1
- package/dist/{FormField-Iy2O8A4g.d.ts → FormField-BuKYUy28.d.ts} +1 -1
- package/dist/{IconButton-CUpL6CsP.d.ts → IconButton-Drlnq7ik.d.ts} +2 -2
- package/dist/{InlineIconButton-AQ8SViM3.d.ts → InlineIconButton-C7_CmWFj.d.ts} +3 -3
- package/dist/{InputContent-jcMfOzpN.d.ts → InputContent-DguS6x2Q.d.ts} +2 -2
- package/dist/{InputUpload-D-C-886F.d.ts → InputUpload-BZqamXus.d.ts} +2 -2
- package/dist/{Inputs-Cm1abCeb.d.ts → Inputs-NL0LZbhc.d.ts} +1 -1
- package/dist/{Link-CKi4C00S.d.ts → Link-D85-7S3h.d.ts} +1 -1
- package/dist/{Menu-BHpiqpJ9.d.ts → Menu-DzTYbIHz.d.ts} +2 -2
- package/dist/{MenuItem-DLKC94Qs.d.ts → MenuItem-DVFyNRhi.d.ts} +1 -1
- package/dist/{Modal-BfN_MfR-.d.ts → Modal-4GP9tQLf.d.ts} +1 -1
- package/dist/{NumberInput-BIRmzsPb.d.ts → NumberInput-DjuZmkzv.d.ts} +3 -3
- package/dist/{NumberRangeInput-1ic7kLIS.d.ts → NumberRangeInput-DKVN5j9j.d.ts} +2 -2
- package/dist/{Pagination-uuqyFAu_.d.ts → Pagination-fLbLp_Ro.d.ts} +1 -1
- package/dist/{PaginationList-CmZBILfU.d.ts → PaginationList-DKYcaO7E.d.ts} +1 -1
- package/dist/{PasswordInput-DNUEWDEM.d.ts → PasswordInput-TIBbZOFu.d.ts} +1 -1
- package/dist/{Pill-vCBJdOTY.d.ts → Pill-BuC3w3xn.d.ts} +1 -1
- package/dist/{PillButton-CEF431l4.d.ts → PillButton-JjV_kJ6L.d.ts} +1 -1
- package/dist/{QuerySelect-vWifN5XC.d.ts → QuerySelect--pihqb-N.d.ts} +4 -3
- package/dist/{RadioGroup-Dd7xBSCW.d.ts → RadioGroup-Bp77H9AM.d.ts} +2 -2
- package/dist/{ResponsivePopover-BmURECUv.d.ts → ResponsivePopover-C76oaVmY.d.ts} +1 -1
- package/dist/{Segment-BZdZb436.d.ts → Segment-AtakFKus.d.ts} +3 -2
- package/dist/{Select-Bm2C6tHz.d.ts → Select-ChzbiDjh.d.ts} +3 -2
- package/dist/{SelectBase-DD8_4B-r.d.ts → SelectBase-DKJuFnvX.d.ts} +3 -3
- package/dist/{Slider-C6UeThGK.d.ts → Slider-BmoZiiSt.d.ts} +2 -2
- package/dist/{SplitButton-CR4psHKW.d.ts → SplitButton-BEYV4IPB.d.ts} +3 -3
- package/dist/{Tag-DUvBTljf.d.ts → Tag-BfmQ9BIV.d.ts} +1 -1
- package/dist/{TextArea-B8Yvkkxr.d.ts → TextArea-CbZ9kNwo.d.ts} +2 -2
- package/dist/{TextButton-cigitfeH.d.ts → TextButton-BZxhaNnh.d.ts} +3 -3
- package/dist/{TextEditor-DILzgUAj.d.ts → TextEditor-KzRofqtx.d.ts} +1 -1
- package/dist/{TextInput-Df0Pkuk-.d.ts → TextInput-ChVYCxjg.d.ts} +3 -3
- package/dist/{TimePicker-BcAaXiku.d.ts → TimePicker-CMhURRER.d.ts} +2 -2
- package/dist/{Toggle-Ca_t66zh.d.ts → Toggle-pQ0-MbwL.d.ts} +1 -1
- package/dist/{ToggleButton-3lINwoaV.d.ts → ToggleButton-DRTGhnjR.d.ts} +2 -2
- package/dist/{Tooltip-D1oFPqFF.d.ts → Tooltip-BxixKjWm.d.ts} +1 -1
- package/dist/{autocomplete-CIDaulwN.d.ts → autocomplete-BY74KiVw.d.ts} +4 -3
- package/dist/button-COs7mrbm.d.ts +1 -0
- package/dist/{checkbox-4smu5B-h.d.ts → checkbox-DLczwKKs.d.ts} +1 -1
- package/dist/{checkbox-group-C55R3YH5.d.ts → checkbox-group-DT7hMwsc.d.ts} +1 -1
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/action-modal.d.ts +1 -1
- package/dist/components/autocomplete/react-aria.js +1 -1
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/breadcrumb/react-aria.js +1 -1
- package/dist/components/breadcrumbs/react-aria.js +1 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/cell/react-aria.js +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/collection/react-aria.js +1 -1
- package/dist/components/color-swatch-picker/react-aria.js +1 -1
- package/dist/components/color-swatch-picker-item/react-aria.js +1 -1
- package/dist/components/column/react-aria.js +1 -1
- package/dist/components/column-resizer/react-aria.js +1 -1
- package/dist/components/combo-box/react-aria.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-range-picker.d.ts +1 -1
- package/dist/components/date-time-picker.d.ts +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload.d.ts +2 -2
- package/dist/components/focusable/react-aria.js +1 -1
- package/dist/components/form-field.d.ts +1 -1
- package/dist/components/grid-list/react-aria.js +1 -1
- package/dist/components/grid-list-header/react-aria.js +1 -1
- package/dist/components/grid-list-item/react-aria.js +1 -1
- package/dist/components/grid-list-load-more-item/react-aria.js +1 -1
- package/dist/components/grid-list-section/react-aria.js +1 -1
- package/dist/components/header/react-aria.js +1 -1
- package/dist/components/i18n-provider/react-aria.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/inline-icon-button.d.ts +1 -1
- package/dist/components/input-upload.d.ts +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/list-box/react-aria.js +1 -1
- package/dist/components/list-box-item/react-aria.js +1 -1
- package/dist/components/list-box-load-more-item/react-aria.js +1 -1
- package/dist/components/list-box-section/react-aria.js +1 -1
- package/dist/components/menu/react-aria.js +1 -1
- package/dist/components/menu-item/react-aria.js +1 -1
- package/dist/components/menu-section/react-aria.js +1 -1
- package/dist/components/menu.d.ts +2 -2
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/number-input.d.ts +1 -1
- package/dist/components/number-range-input.d.ts +1 -1
- package/dist/components/pagination-list.d.ts +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/password-input.d.ts +1 -1
- package/dist/components/pill-button.d.ts +1 -1
- package/dist/components/pill.d.ts +1 -1
- package/dist/components/pressable/react-aria.js +1 -1
- package/dist/components/query-autocomplete.d.ts +2 -2
- package/dist/components/query-select.d.ts +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/resizable-table-container/react-aria.js +1 -1
- package/dist/components/responsive-popover.d.ts +1 -1
- package/dist/components/router-provider/react-aria.js +1 -1
- package/dist/components/row/react-aria.js +1 -1
- package/dist/components/section/react-aria.js +1 -1
- package/dist/components/segment.d.ts +2 -2
- package/dist/components/select/react-aria.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/separator/react-aria.js +1 -1
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/ssr-provider/react-aria.js +1 -1
- package/dist/components/submenu-trigger/react-aria.js +1 -1
- package/dist/components/tab/react-aria.js +1 -1
- package/dist/components/tab-list/react-aria.js +1 -1
- package/dist/components/tab-panels/react-aria.js +1 -1
- package/dist/components/table/react-aria.js +1 -1
- package/dist/components/table-body/react-aria.js +1 -1
- package/dist/components/table-header/react-aria.js +1 -1
- package/dist/components/table-load-more-item/react-aria.js +1 -1
- package/dist/components/tabs/react-aria.js +1 -1
- package/dist/components/tag/react-aria.js +1 -1
- package/dist/components/tag-group/react-aria.js +1 -1
- package/dist/components/tag-list/react-aria.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-button.d.ts +1 -1
- package/dist/components/text-input.d.ts +1 -1
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/toast/react-aria.js +1 -1
- package/dist/components/toast-content/react-aria.js +1 -1
- package/dist/components/toast-list/react-aria.js +1 -1
- package/dist/components/toast-region/react-aria.js +1 -1
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toolbar/react-aria.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tree/react-aria.js +1 -1
- package/dist/components/tree-item/react-aria.js +1 -1
- package/dist/components/tree-item-content/react-aria.js +1 -1
- package/dist/components/tree-load-more-item/react-aria.js +1 -1
- package/dist/components/virtualizer/react-aria.js +1 -1
- package/dist/components/visually-hidden/react-aria.js +1 -1
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/{confirmation.context-D_kJeU8m.d.ts → confirmation.context-CuufQTQR.d.ts} +1 -1
- package/dist/{date-picker-D2W1Bor7.d.ts → date-picker-CuNJV9nJ.d.ts} +1 -1
- package/dist/{date-range-picker-Cm0OPO-n.d.ts → date-range-picker-CJOhtloN.d.ts} +1 -1
- package/dist/{date-time-picker-QcvD8deo.d.ts → date-time-picker-MIDzdeQN.d.ts} +1 -1
- package/dist/{dynamicInputs-DhCSXGpC.d.ts → dynamicInputs-2kB0x8BT.d.ts} +70 -70
- package/dist/{file-upload-Ba6NwH0N.d.ts → file-upload-C0kwtd3Z.d.ts} +2 -2
- package/dist/{fileUpload.types-ZUblxJUi.d.ts → fileUpload.types-DFg9wCbc.d.ts} +3 -3
- package/dist/{index-DCUSluLL.d.ts → index-CXUySbXH.d.ts} +110 -1
- package/dist/index.d.ts +66 -66
- package/dist/{input-upload-BxRgcRt4.d.ts → input-upload-CFcsHAOE.d.ts} +1 -1
- package/dist/{link.context-C1RcdC0i.d.ts → link.context-BUxUXeo6.d.ts} +1 -1
- package/dist/{number-input-BoUfnoR2.d.ts → number-input-DhLfHuVP.d.ts} +1 -1
- package/dist/{number-range-input-BkHzkO1m.d.ts → number-range-input-CLsMdwqJ.d.ts} +1 -1
- package/dist/{password-input-BPAjcIly.d.ts → password-input--nSBPzos.d.ts} +1 -1
- package/dist/{query-autocomplete-Dh1Yeu4p.d.ts → query-autocomplete-vHRKodn0.d.ts} +2 -2
- package/dist/{query-select-7lNZcE_x.d.ts → query-select-CvoVhXu1.d.ts} +4 -3
- package/dist/{queryAutocomplete.types-D7SmWVq-.d.ts → queryAutocomplete.types-Cn4fe0OX.d.ts} +3 -3
- package/dist/{radio-group-DmilCTsI.d.ts → radio-group-rmH66jpI.d.ts} +1 -1
- package/dist/rhf/autocomplete.d.ts +2 -2
- package/dist/rhf/checkbox-group.d.ts +2 -2
- package/dist/rhf/checkbox.d.ts +2 -2
- package/dist/rhf/date-picker.d.ts +2 -2
- package/dist/rhf/date-range-picker.d.ts +2 -2
- package/dist/rhf/date-time-picker.d.ts +2 -2
- package/dist/rhf/file-upload.d.ts +2 -2
- package/dist/rhf/input-upload.d.ts +2 -2
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/number-input.d.ts +2 -2
- package/dist/rhf/number-range-input.d.ts +2 -2
- package/dist/rhf/password-input.d.ts +2 -2
- package/dist/rhf/query-autocomplete.d.ts +1 -1
- package/dist/rhf/query-select.d.ts +1 -1
- package/dist/rhf/radio-group.d.ts +2 -2
- package/dist/rhf/segment.d.ts +2 -2
- package/dist/rhf/select.d.ts +2 -2
- package/dist/rhf/slider.d.ts +2 -2
- package/dist/rhf/text-area.d.ts +2 -2
- package/dist/rhf/text-editor.d.ts +2 -2
- package/dist/rhf/text-input.d.ts +2 -2
- package/dist/rhf/time-picker.d.ts +2 -2
- package/dist/rhf/toggle.d.ts +2 -2
- package/dist/rhf.d.ts +66 -66
- package/dist/{segment-BOELlo1K.d.ts → segment-e0jd1JbP.d.ts} +3 -2
- package/dist/{segment.types-BYTmg69p.d.ts → segment.types-DUstTZeA.d.ts} +2 -1
- package/dist/{select-CD3fNAgK.d.ts → select-Bvt1d_ly.d.ts} +4 -3
- package/dist/{slider-tx1tub5d.d.ts → slider-CRnAZyb_.d.ts} +1 -1
- package/dist/tanstack/autocomplete.d.ts +1 -1
- package/dist/tanstack/checkbox-group.d.ts +1 -1
- package/dist/tanstack/checkbox.d.ts +1 -1
- package/dist/tanstack/date-picker.d.ts +1 -1
- package/dist/tanstack/date-range-picker.d.ts +1 -1
- package/dist/tanstack/date-time-picker.d.ts +1 -1
- package/dist/tanstack/file-upload.d.ts +2 -2
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/input-upload.d.ts +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/number-input.d.ts +1 -1
- package/dist/tanstack/number-range-input.d.ts +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/query-select.d.ts +1 -1
- package/dist/tanstack/radio-group.d.ts +1 -1
- package/dist/tanstack/segment.d.ts +2 -2
- package/dist/tanstack/select.d.ts +1 -1
- package/dist/tanstack/slider.d.ts +1 -1
- package/dist/tanstack/text-area.d.ts +1 -1
- package/dist/tanstack/text-editor.d.ts +1 -1
- package/dist/tanstack/text-input.d.ts +1 -1
- package/dist/tanstack/time-picker.d.ts +1 -1
- package/dist/tanstack/toggle.d.ts +1 -1
- package/dist/tanstack.d.ts +50 -50
- package/dist/{text-area-kb2PxyJb.d.ts → text-area-KsaEQpPz.d.ts} +1 -1
- package/dist/{text-editor-CDECpKqj.d.ts → text-editor-CYU0teJy.d.ts} +1 -1
- package/dist/text-editor.d.ts +1 -1
- package/dist/{text-input-VqRJ0y7Y.d.ts → text-input-dZeNDTtP.d.ts} +1 -1
- package/dist/{time-picker-CZLL-OEe.d.ts → time-picker-CcHlAJUk.d.ts} +1 -1
- package/dist/{toggle-DK5CDOtt.d.ts → toggle-BGOUUhAG.d.ts} +1 -1
- package/dist/{types-ZbFfCz06.d.ts → types-CaqW-yY5.d.ts} +20 -27
- package/dist/types-Dugk_Mie.d.ts +581 -0
- package/package.json +23 -1
- package/dist/button-BQmy1LZS.d.ts +0 -1
- package/dist/types-BT18i837.d.ts +0 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useTreeItem as _}from"react-aria";import"react-stately";function v(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function y(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const b={},x=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=b[t];return n||(n=r(y.bind(null,t)),b[t]=n),n}});
|
|
1
|
+
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useTreeItem as _}from"react-aria";import"react-stately";function v(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function y(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const b={},x=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=b[t];return n||(n=r(y.bind(null,t)),b[t]=n),n}});var S=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},C=class extends S{filter(e,t,n){let[r,i]=O(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},w=class extends S{};w.type=`header`;var T=class extends S{};T.type=`loader`;var E=class extends C{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};E.type=`item`;var D=class extends C{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};D.type=`section`;function O(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function k(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;const A=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const j=n(null);function M(e){var t;return t=class extends S{},t.type=e,t}function N(t,n,r,i,s,c){typeof t==`string`&&(t=M(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(j);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(j.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function P(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(h);if(!o(A)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return N(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(h.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const F={CollectionRoot({collection:e,renderDropIndicator:t}){return I(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return I(e,t,n)}};function I(t,n,r){return k({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,L(t,n,r))}})}function L(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const R=n(F),z=n(null);var B=class extends S{};B.type=`content`;const V=P(B,function(t){let n=o(H),r=v({children:t.children,values:n});return e.createElement(R.Provider,{value:F},r.children)}),H=n(null);var U=class extends S{};U.type=`item`,P(T,function(t,n,r){let{isVirtualized:i}=o(R),a=o(z),{isLoading:d,onLoadMore:f,scrollOffset:h,...y}=t,b=c(null),S=s(()=>({onLoadMore:f,collection:a?.collection,sentinelRef:b,scrollOffset:h}),[f,h,a?.collection]);p(S,b),n=m(n);let{rowProps:C,gridCellProps:w}=_({node:r},a,n),T=C[`aria-level`]||1,E={role:`row`,"aria-level":C[`aria-level`]},D=v({...y,id:void 0,children:r.rendered,defaultClassName:`react-aria-TreeLoader`,values:{level:T}}),O={};return i&&(O={display:`contents`}),e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:u(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:b,style:{position:`absolute`,height:1,width:1}})),d&&D.children&&e.createElement(x.div,{ref:n,...g(l(t),E),...D,"data-level":T},e.createElement(`div`,{...w,style:O},D.children)))});export{V as TreeItemContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useTreeItem as _}from"react-aria";import"react-stately";function v(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function y(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const b={},x=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=b[t];return n||(n=r(y.bind(null,t)),b[t]=n),n}});
|
|
1
|
+
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p,useObjectRef as m}from"@react-aria/utils";import{FocusableContext as h}from"@react-aria/interactions";import"react-dom";import{mergeProps as g,useTreeItem as _}from"react-aria";import"react-stately";function v(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function y(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const b={},x=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=b[t];return n||(n=r(y.bind(null,t)),b[t]=n),n}});var S=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},C=class extends S{filter(e,t,n){let[r,i]=O(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},w=class extends S{};w.type=`header`;var T=class extends S{};T.type=`loader`;var E=class extends C{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};E.type=`item`;var D=class extends C{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};D.type=`section`;function O(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function k(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;const A=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const j=n(null);function M(e){var t;return t=class extends S{},t.type=e,t}function N(t,n,r,i,s,c){typeof t==`string`&&(t=M(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(j);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(j.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function P(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(h);if(!o(A)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return N(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(h.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const F={CollectionRoot({collection:e,renderDropIndicator:t}){return I(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return I(e,t,n)}};function I(t,n,r){return k({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,L(t,n,r))}})}function L(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const R=n(F),z=n(null);var B=class extends S{};B.type=`content`;var V=class extends S{};V.type=`item`;const H=P(T,function(t,n,r){let{isVirtualized:i}=o(R),a=o(z),{isLoading:d,onLoadMore:f,scrollOffset:h,...y}=t,b=c(null),S=s(()=>({onLoadMore:f,collection:a?.collection,sentinelRef:b,scrollOffset:h}),[f,h,a?.collection]);p(S,b),n=m(n);let{rowProps:C,gridCellProps:w}=_({node:r},a,n),T=C[`aria-level`]||1,E={role:`row`,"aria-level":C[`aria-level`]},D=v({...y,id:void 0,children:r.rendered,defaultClassName:`react-aria-TreeLoader`,values:{level:T}}),O={};return i&&(O={display:`contents`}),e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:u(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:b,style:{position:`absolute`,height:1,width:1}})),d&&D.children&&e.createElement(x.div,{ref:n,...g(l(t),E),...D,"data-level":T},e.createElement(`div`,{...w,style:O},D.children)))});export{H as TreeLoadMoreItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,isValidElement as r,useCallback as i,useContext as a,useEffect as o,useMemo as s,useRef as c,useState as l}from"react";import{useEffectEvent as u,useEvent as d,useLayoutEffect as f,useResizeObserver as p}from"@react-aria/utils";import{useLocale as m}from"@react-aria/i18n";import{flushSync as h}from"react-dom";function g(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}const _={CollectionRoot({collection:e,renderDropIndicator:t}){return v(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return v(e,t,n)}};function v(t,n,r){return g({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,y(t,n,r))}})}function y(e,n,i){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=i({type:`item`,key:a.key,dropPosition:`after`});r(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const b=n(_);var x=class e{copy(){return new e(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}constructor(e=0,t=0){this.x=e,this.y=t}},S=class e{get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new x(this.x,this.y)}get topRight(){return new x(this.maxX,this.y)}get bottomLeft(){return new x(this.x,this.maxY)}get bottomRight(){return new x(this.maxX,this.maxY)}intersects(e){return this.area>0&&e.area>0&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(t){let n=Math.min(this.x,t.x),r=Math.min(this.y,t.y),i=Math.max(this.maxX,t.maxX)-n,a=Math.max(this.maxY,t.maxY)-r;return new e(n,r,i,a)}intersection(t){if(!this.intersects(t))return new e(0,0,0,0);let n=Math.max(this.x,t.x),r=Math.max(this.y,t.y);return new e(n,r,Math.min(this.maxX,t.maxX)-n,Math.min(this.maxY,t.maxY)-r)}copy(){return new e(this.x,this.y,this.width,this.height)}constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}},C=class e{copy(){return new e(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}};let w=0;var T=class{prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new D(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}constructor(e,t){this.virtualizer=e,this.key=++w,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}},E=class extends T{constructor(e){super(e,`root`)}},D=class extends T{constructor(e,t,n){super(e,n),this.parent=t}};function O(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var k=class{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;if(e.height+=t,this.velocity.y<0&&(e.y-=t),this.velocity.x!==0){let t=this.visibleRect.width/3;e.width+=t,this.velocity.x<0&&(e.x-=t)}return e}constructor(){this.startTime=0,this.velocity=new x(0,0),this.visibleRect=new S}},A=class{isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;t!=null;){let n=this.layout.getLayoutInfo(t);if(!n||n.parentKey==null)break;if(t=n.parentKey,t===e)return!0}return!1}getParentView(e){return e.parentKey==null?this._rootView:this._visibleViews.get(e.parentKey)}getReusableView(e){let t=this.getParentView(e).getReusableView(e.type);return t.layoutInfo=e,this._renderView(t),t}_renderView(e){if(e.layoutInfo){let{type:t,key:n,content:r}=e.layoutInfo;e.content=r||this.collection.getItem(n),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let n=t==null?null:this._renderedContent.get(t);if(n!=null)return n;let r=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,r),r}keyAtPoint(e){let t=new S(e.x,e.y,1,1),n=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let e of n)if(e.rect.intersects(t))return e.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,n=e.contentChanged?0:t.x,r=e.contentChanged?0:t.y;if(n=Math.max(0,Math.min(this.contentSize.width-t.width,n)),r=Math.max(0,Math.min(this.contentSize.height-t.height,r)),n!==t.x||r!==t.y){let e=new S(n,r,t.width,t.height);this.delegate.setVisibleRect(e)}else this.updateSubviews()}getVisibleLayoutInfos(){let e;e=this._overscanManager.getOverscannedRect();let t=this.layout.getVisibleLayoutInfos(e),n=new Map;for(let e of t)n.set(e.key,e);return n}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[n,r]of this._visibleViews){let i=e.get(n);(!i||r.parent!==this.getParentView(i))&&(this._visibleViews.delete(n),r.parent.reuseChild(r),t.add(r))}for(let[n,r]of e){let e=this._visibleViews.get(n);if(!e)e=this.getReusableView(r),e.parent.children.add(e),this._visibleViews.set(n,e),t.delete(e);else{e.layoutInfo=r;let t=this.collection.getItem(r.key);e.content!==t&&(e.content!=null&&this._renderedContent.delete(e.content),this._renderView(e))}}for(let e of t)e.parent.children.delete(e),e.parent.reusableViews.clear();if(!this._isScrolling)for(let t of e.keys()){let e=this._visibleViews.get(t);e.parent.children.delete(e),e.parent.children.add(e)}}render(e){let t=this,n=!1,r=!1,i=!1,a=!1,o=!1,s=!1;return e.collection!==this.collection&&(t.collection=e.collection,n=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,n=!0),e.persistedKeys&&!O(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,s=!0),this.visibleRect.equals(e.visibleRect)||(this._overscanManager.setVisibleRect(e.visibleRect),this.layout.shouldInvalidate(e.visibleRect,this.visibleRect)?(r=!e.visibleRect.pointEquals(this.visibleRect),i=!e.visibleRect.sizeEquals(this.visibleRect),n=!0):s=!0,t.visibleRect=e.visibleRect),e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(i||=e.invalidationContext.sizeChanged||!1,r||=e.invalidationContext.offsetChanged||!1,a||=e.invalidationContext.itemSizeChanged||!1,o||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),n||=a||i||r||o),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(s=!0)),n?this.relayout({offsetChanged:r,sizeChanged:i,itemSizeChanged:a,layoutOptionsChanged:o,layoutOptions:this._invalidationContext.layoutOptions}):s&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){this.layout.updateItemSize&&this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new C,this.visibleRect=new S,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new E(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new k}};const j=typeof document<`u`?e.useLayoutEffect:()=>{};function M(e){let[t,n]=l(new S(0,0,0,0)),[r,a]=l(!1),[o,u]=l({}),d=c(!1),[f]=l(()=>new A({collection:e.collection,layout:e.layout,delegate:{setVisibleRect(e){n(e),d.current=!0},renderView:e.renderView,invalidate:u}}));j(()=>{d.current&&(d.current=!1,e.onVisibleRectChange(t))});let p=s(()=>e.layoutOptions==null?o:{...o,layoutOptions:e.layoutOptions},[o,e.layoutOptions]),m=f.render({layout:e.layout,collection:e.collection,persistedKeys:e.persistedKeys,layoutOptions:e.layoutOptions,visibleRect:t,invalidationContext:p,isScrolling:r}),h=f.contentSize,g=i(()=>{a(!0)},[]),_=i(()=>{a(!1)},[]);return s(()=>({virtualizer:f,visibleViews:m,setVisibleRect:n,contentSize:h,isScrolling:r,startScrolling:g,endScrolling:_}),[f,m,n,h,r,g,_])}let N=null;function P(e=!1){if(N===null||e){let e=document.createElement(`div`),t=e.style;t.width=`50px`,t.height=`50px`,t.overflow=`scroll`,t.direction=`rtl`;let n=document.createElement(`div`),r=n.style;return r.width=`100px`,r.height=`100px`,e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?N=`positive-descending`:(e.scrollLeft=1,N=e.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(e),N}return N}function F(e,t){let{scrollLeft:n}=e;if(t===`rtl`){let{scrollWidth:t,clientWidth:r}=e;switch(P()){case`negative`:n=-n;break;case`positive-descending`:n=t-r-n}}return n}function I(e,t){let{contentSize:n,onVisibleRectChange:r,innerStyle:a,onScrollStart:s,onScrollEnd:g,scrollDirection:_=`both`,...v}=e,y=c({scrollTop:0,scrollLeft:0,scrollEndTime:0,scrollTimeout:null,width:0,height:0,isScrolling:!1}).current,{direction:b}=m(),[x,C]=l(!1),w=i(t=>{t.target===t.currentTarget&&(e.onScroll&&e.onScroll(t),h(()=>{let e=t.currentTarget.scrollTop,i=F(t.currentTarget,b);y.scrollTop=Math.max(0,Math.min(e,n.height-y.height)),y.scrollLeft=Math.max(0,Math.min(i,n.width-y.width)),r(new S(y.scrollLeft,y.scrollTop,y.width,y.height)),y.isScrolling||(y.isScrolling=!0,C(!0),window.dispatchEvent(new Event(`tk.disconnect-observer`)),s&&s());let a=Date.now();y.scrollEndTime<=a+50&&(y.scrollEndTime=a+300,y.scrollTimeout!=null&&clearTimeout(y.scrollTimeout),y.scrollTimeout=setTimeout(()=>{y.isScrolling=!1,C(!1),y.scrollTimeout=null,window.dispatchEvent(new Event(`tk.connect-observer`)),g&&g()},300))}))},[e,b,y,n,r,s,g]);d(t,`scroll`,w),o(()=>()=>{y.scrollTimeout!=null&&clearTimeout(y.scrollTimeout),y.isScrolling&&window.dispatchEvent(new Event(`tk.connect-observer`))},[]);let T=c(!1),E=i(e=>{let n=t.current;if(!n||T.current)return;T.current=!0,Object.getOwnPropertyNames(window.HTMLElement.prototype).includes(`clientWidth`),Object.getOwnPropertyNames(window.HTMLElement.prototype).includes(`clientHeight`);let i=n.clientWidth,a=n.clientHeight,o=i,s=a;(y.width!==o||y.height!==s)&&(y.width=o,y.height=s,e(()=>{r(new S(y.scrollLeft,y.scrollTop,o,s))}),(i!==n.clientWidth||a!==n.clientHeight)&&(y.width=n.clientWidth,y.height=n.clientHeight,e(()=>{r(new S(y.scrollLeft,y.scrollTop,y.width,y.height))}))),T.current=!1},[t,y,r]),D=u(E),O=c(null),[k,A]=l({});f(()=>{if(!T.current&&(O.current==null||!n.equals(O.current)))if(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`){A({}),O.current=n;return}else queueMicrotask(()=>D(h));O.current=n}),f(()=>{D(e=>e())},[k]);let j=i(()=>{E(h)},[E]);p({ref:t,box:`border-box`,onResize:j});let M={padding:0,...v.style};return _===`horizontal`?(M.overflowX=`auto`,M.overflowY=`hidden`):_===`vertical`||n.width===y.width?(M.overflowY=`auto`,M.overflowX=`hidden`):M.overflow=`auto`,a={width:Number.isFinite(n.width)?n.width:void 0,height:Number.isFinite(n.height)?n.height:void 0,pointerEvents:x?`none`:`auto`,position:`relative`,...a},{isScrolling:x,scrollViewProps:{...v,style:M},contentProps:{role:`presentation`,style:a}}}function L(e){let{layoutInfo:t,virtualizer:n,ref:r}=e,a=t?.key,o=i(()=>{if(a!=null&&r.current){let e=R(r.current);n.updateItemSize(a,e)}},[n,a,r]);return f(()=>{t?.estimatedSize&&o()}),{updateSize:o}}function R(e){let t=e.style.height;e.style.height=``;let n=new C(e.scrollWidth,e.scrollHeight);return e.style.height=t,n}function z(t){let{style:n,className:r,layoutInfo:i,virtualizer:a,parent:o,children:s}=t,{direction:l}=m(),u=c(null);return L({layoutInfo:i,virtualizer:a,ref:u}),e.createElement(`div`,{role:`presentation`,ref:u,className:r,style:{...V(i,l,o),...n}},s)}let B=new WeakMap;function V(e,t,n){let r=t===`rtl`?`right`:`left`,i=B.get(e);if(i&&i[r]!=null){if(!n)return i;let t=e.rect.y-n.rect.y,a=e.rect.x-n.rect.x;if(i.top===t&&i[r]===a)return i}let a={top:e.rect.y-(n&&!(n.allowOverflow&&e.isSticky)?n.rect.y:0),[r]:e.rect.x-(n&&!(n.allowOverflow&&e.isSticky)?n.rect.x:0),width:e.rect.width,height:e.rect.height};Object.entries(a).forEach(([e,t])=>{Number.isFinite(t)||(a[e]=void 0)});let o={position:e.isSticky?`sticky`:`absolute`,display:e.isSticky?`inline-block`:void 0,overflow:e.allowOverflow?`visible`:`hidden`,opacity:e.opacity,zIndex:e.zIndex,transform:e.transform??void 0,contain:`size layout style`,...a};return B.set(e,o),o}const H=n(null),U=n(null);function W(t){let{children:n,layout:r,layoutOptions:i}=t,a=s(()=>typeof r==`function`?new r:r,[r]),o=s(()=>({isVirtualized:!0,layoutDelegate:a,dropTargetDelegate:a.getDropTargetFromPoint?a:void 0,CollectionRoot:G,CollectionBranch:K}),[a]);return e.createElement(b.Provider,{value:o},e.createElement(U.Provider,{value:{layout:a,layoutOptions:i}},n))}function G({collection:t,persistedKeys:n,scrollRef:r,renderDropIndicator:i}){let{layout:o,layoutOptions:c}=a(U),l=o.useLayoutOptions?.call(o),u=M({layout:o,collection:t,renderView:(e,t)=>t?.render?.call(t,t),onVisibleRectChange(e){let t=r?.current;t&&(t.scrollLeft=e.x,t.scrollTop=e.y)},persistedKeys:n,layoutOptions:s(()=>c&&l?{...c,...l}:c||l,[c,l])}),{contentProps:d}=I({onVisibleRectChange:u.setVisibleRect,contentSize:u.contentSize,onScrollStart:u.startScrolling,onScrollEnd:u.endScrolling},r);return e.createElement(`div`,d,e.createElement(H.Provider,{value:u},q(null,u.visibleViews,i)))}function K({parent:e,renderDropIndicator:t}){let n=a(H).virtualizer.getVisibleView(e.key);return q(n,Array.from(n.children),t)}function q(e,t,n){return t.map(t=>J(e,t,n))}function J(t,n,r){let i=e.createElement(z,{key:n.key,layoutInfo:n.layoutInfo,virtualizer:n.virtualizer,parent:t?.layoutInfo},n.rendered),{collection:a,layout:o}=n.virtualizer,s=n.content;return s?.type===`item`&&r&&o.getDropTargetLayoutInfo&&(i=e.createElement(e.Fragment,{key:n.key},Y(t,n,{type:`item`,key:n.content.key,dropPosition:`before`},r),i,y(a,s,e=>Y(t,n,e,r)))),i}function Y(t,n,r,i){let a=i(r);if(a){let i=n.virtualizer.layout.getDropTargetLayoutInfo(r);a=e.createElement(z,{layoutInfo:i,virtualizer:n.virtualizer,parent:t?.layoutInfo},a)}return a}export{W as Virtualizer};
|
|
1
|
+
import e,{cloneElement as t,createContext as n,isValidElement as r,useCallback as i,useContext as a,useEffect as o,useMemo as s,useRef as c,useState as l}from"react";import{useEffectEvent as u,useEvent as d,useLayoutEffect as f,useResizeObserver as p}from"@react-aria/utils";import{flushSync as m}from"react-dom";import{useLocale as h}from"@react-aria/i18n";function g(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}const _={CollectionRoot({collection:e,renderDropIndicator:t}){return v(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return v(e,t,n)}};function v(t,n,r){return g({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,y(t,n,r))}})}function y(e,n,i){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=i({type:`item`,key:a.key,dropPosition:`after`});r(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const b=n(_);var x=class e{copy(){return new e(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}constructor(e=0,t=0){this.x=e,this.y=t}},S=class e{get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new x(this.x,this.y)}get topRight(){return new x(this.maxX,this.y)}get bottomLeft(){return new x(this.x,this.maxY)}get bottomRight(){return new x(this.maxX,this.maxY)}intersects(e){return this.area>0&&e.area>0&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(t){let n=Math.min(this.x,t.x),r=Math.min(this.y,t.y),i=Math.max(this.maxX,t.maxX)-n,a=Math.max(this.maxY,t.maxY)-r;return new e(n,r,i,a)}intersection(t){if(!this.intersects(t))return new e(0,0,0,0);let n=Math.max(this.x,t.x),r=Math.max(this.y,t.y);return new e(n,r,Math.min(this.maxX,t.maxX)-n,Math.min(this.maxY,t.maxY)-r)}copy(){return new e(this.x,this.y,this.width,this.height)}constructor(e=0,t=0,n=0,r=0){this.x=e,this.y=t,this.width=n,this.height=r}},C=class e{copy(){return new e(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0)}};let w=0;var T=class{prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new D(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e)}constructor(e,t){this.virtualizer=e,this.key=++w,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}},E=class extends T{constructor(e){super(e,`root`)}},D=class extends T{constructor(e,t,n){super(e,n),this.parent=t}};function O(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var k=class{setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;if(e.height+=t,this.velocity.y<0&&(e.y-=t),this.velocity.x!==0){let t=this.visibleRect.width/3;e.width+=t,this.velocity.x<0&&(e.x-=t)}return e}constructor(){this.startTime=0,this.velocity=new x(0,0),this.visibleRect=new S}},A=class{isPersistedKey(e){if(this.persistedKeys.has(e))return!0;for(let t of this.persistedKeys)for(;t!=null;){let n=this.layout.getLayoutInfo(t);if(!n||n.parentKey==null)break;if(t=n.parentKey,t===e)return!0}return!1}getParentView(e){return e.parentKey==null?this._rootView:this._visibleViews.get(e.parentKey)}getReusableView(e){let t=this.getParentView(e).getReusableView(e.type);return t.layoutInfo=e,this._renderView(t),t}_renderView(e){if(e.layoutInfo){let{type:t,key:n,content:r}=e.layoutInfo;e.content=r||this.collection.getItem(n),e.rendered=this._renderContent(t,e.content)}}_renderContent(e,t){let n=t==null?null:this._renderedContent.get(t);if(n!=null)return n;let r=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,r),r}keyAtPoint(e){let t=new S(e.x,e.y,1,1),n=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let e of n)if(e.rect.intersects(t))return e.key;return null}relayout(e={}){this.layout.update(e),this.contentSize=this.layout.getContentSize();let t=this.visibleRect,n=e.contentChanged?0:t.x,r=e.contentChanged?0:t.y;if(n=Math.max(0,Math.min(this.contentSize.width-t.width,n)),r=Math.max(0,Math.min(this.contentSize.height-t.height,r)),n!==t.x||r!==t.y){let e=new S(n,r,t.width,t.height);this.delegate.setVisibleRect(e)}else this.updateSubviews()}getVisibleLayoutInfos(){let e;e=this._overscanManager.getOverscannedRect();let t=this.layout.getVisibleLayoutInfos(e),n=new Map;for(let e of t)n.set(e.key,e);return n}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[n,r]of this._visibleViews){let i=e.get(n);(!i||r.parent!==this.getParentView(i))&&(this._visibleViews.delete(n),r.parent.reuseChild(r),t.add(r))}for(let[n,r]of e){let e=this._visibleViews.get(n);if(!e)e=this.getReusableView(r),e.parent.children.add(e),this._visibleViews.set(n,e),t.delete(e);else{e.layoutInfo=r;let t=this.collection.getItem(r.key);e.content!==t&&(e.content!=null&&this._renderedContent.delete(e.content),this._renderView(e))}}for(let e of t)e.parent.children.delete(e),e.parent.reusableViews.clear();if(!this._isScrolling)for(let t of e.keys()){let e=this._visibleViews.get(t);e.parent.children.delete(e),e.parent.children.add(e)}}render(e){let t=this,n=!1,r=!1,i=!1,a=!1,o=!1,s=!1;return e.collection!==this.collection&&(t.collection=e.collection,n=!0),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,n=!0),e.persistedKeys&&!O(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,s=!0),this.visibleRect.equals(e.visibleRect)||(this._overscanManager.setVisibleRect(e.visibleRect),this.layout.shouldInvalidate(e.visibleRect,this.visibleRect)?(r=!e.visibleRect.pointEquals(this.visibleRect),i=!e.visibleRect.sizeEquals(this.visibleRect),n=!0):s=!0,t.visibleRect=e.visibleRect),e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(i||=e.invalidationContext.sizeChanged||!1,r||=e.invalidationContext.offsetChanged||!1,a||=e.invalidationContext.itemSizeChanged||!1,o||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),n||=a||i||r||o),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(s=!0)),n?this.relayout({offsetChanged:r,sizeChanged:i,itemSizeChanged:a,layoutOptionsChanged:o,layoutOptions:this._invalidationContext.layoutOptions}):s&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e)}updateItemSize(e,t){this.layout.updateItemSize&&this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:!0})}constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new C,this.visibleRect=new S,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new E(this),this._isScrolling=!1,this._invalidationContext={},this._overscanManager=new k}};const j=typeof document<`u`?e.useLayoutEffect:()=>{};function M(e){let[t,n]=l(new S(0,0,0,0)),[r,a]=l(!1),[o,u]=l({}),d=c(!1),[f]=l(()=>new A({collection:e.collection,layout:e.layout,delegate:{setVisibleRect(e){n(e),d.current=!0},renderView:e.renderView,invalidate:u}}));j(()=>{d.current&&(d.current=!1,e.onVisibleRectChange(t))});let p=s(()=>e.layoutOptions==null?o:{...o,layoutOptions:e.layoutOptions},[o,e.layoutOptions]),m=f.render({layout:e.layout,collection:e.collection,persistedKeys:e.persistedKeys,layoutOptions:e.layoutOptions,visibleRect:t,invalidationContext:p,isScrolling:r}),h=f.contentSize,g=i(()=>{a(!0)},[]),_=i(()=>{a(!1)},[]);return s(()=>({virtualizer:f,visibleViews:m,setVisibleRect:n,contentSize:h,isScrolling:r,startScrolling:g,endScrolling:_}),[f,m,n,h,r,g,_])}let N=null;function P(e=!1){if(N===null||e){let e=document.createElement(`div`),t=e.style;t.width=`50px`,t.height=`50px`,t.overflow=`scroll`,t.direction=`rtl`;let n=document.createElement(`div`),r=n.style;return r.width=`100px`,r.height=`100px`,e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?N=`positive-descending`:(e.scrollLeft=1,N=e.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(e),N}return N}function F(e,t){let{scrollLeft:n}=e;if(t===`rtl`){let{scrollWidth:t,clientWidth:r}=e;switch(P()){case`negative`:n=-n;break;case`positive-descending`:n=t-r-n}}return n}function I(e,t){let{contentSize:n,onVisibleRectChange:r,innerStyle:a,onScrollStart:s,onScrollEnd:g,scrollDirection:_=`both`,...v}=e,y=c({scrollTop:0,scrollLeft:0,scrollEndTime:0,scrollTimeout:null,width:0,height:0,isScrolling:!1}).current,{direction:b}=h(),[x,C]=l(!1),w=i(t=>{t.target===t.currentTarget&&(e.onScroll&&e.onScroll(t),m(()=>{let e=t.currentTarget.scrollTop,i=F(t.currentTarget,b);y.scrollTop=Math.max(0,Math.min(e,n.height-y.height)),y.scrollLeft=Math.max(0,Math.min(i,n.width-y.width)),r(new S(y.scrollLeft,y.scrollTop,y.width,y.height)),y.isScrolling||(y.isScrolling=!0,C(!0),window.dispatchEvent(new Event(`tk.disconnect-observer`)),s&&s());let a=Date.now();y.scrollEndTime<=a+50&&(y.scrollEndTime=a+300,y.scrollTimeout!=null&&clearTimeout(y.scrollTimeout),y.scrollTimeout=setTimeout(()=>{y.isScrolling=!1,C(!1),y.scrollTimeout=null,window.dispatchEvent(new Event(`tk.connect-observer`)),g&&g()},300))}))},[e,b,y,n,r,s,g]);d(t,`scroll`,w),o(()=>()=>{y.scrollTimeout!=null&&clearTimeout(y.scrollTimeout),y.isScrolling&&window.dispatchEvent(new Event(`tk.connect-observer`))},[]);let T=c(!1),E=i(e=>{let n=t.current;if(!n||T.current)return;T.current=!0,Object.getOwnPropertyNames(window.HTMLElement.prototype).includes(`clientWidth`),Object.getOwnPropertyNames(window.HTMLElement.prototype).includes(`clientHeight`);let i=n.clientWidth,a=n.clientHeight,o=i,s=a;(y.width!==o||y.height!==s)&&(y.width=o,y.height=s,e(()=>{r(new S(y.scrollLeft,y.scrollTop,o,s))}),(i!==n.clientWidth||a!==n.clientHeight)&&(y.width=n.clientWidth,y.height=n.clientHeight,e(()=>{r(new S(y.scrollLeft,y.scrollTop,y.width,y.height))}))),T.current=!1},[t,y,r]),D=u(E),O=c(null),[k,A]=l({});f(()=>{if(!T.current&&(O.current==null||!n.equals(O.current)))if(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`){A({}),O.current=n;return}else queueMicrotask(()=>D(m));O.current=n}),f(()=>{D(e=>e())},[k]);let j=i(()=>{E(m)},[E]);p({ref:t,box:`border-box`,onResize:j});let M={padding:0,...v.style};return _===`horizontal`?(M.overflowX=`auto`,M.overflowY=`hidden`):_===`vertical`||n.width===y.width?(M.overflowY=`auto`,M.overflowX=`hidden`):M.overflow=`auto`,a={width:Number.isFinite(n.width)?n.width:void 0,height:Number.isFinite(n.height)?n.height:void 0,pointerEvents:x?`none`:`auto`,position:`relative`,...a},{isScrolling:x,scrollViewProps:{...v,style:M},contentProps:{role:`presentation`,style:a}}}function L(e){let{layoutInfo:t,virtualizer:n,ref:r}=e,a=t?.key,o=i(()=>{if(a!=null&&r.current){let e=R(r.current);n.updateItemSize(a,e)}},[n,a,r]);return f(()=>{t?.estimatedSize&&o()}),{updateSize:o}}function R(e){let t=e.style.height;e.style.height=``;let n=new C(e.scrollWidth,e.scrollHeight);return e.style.height=t,n}function z(t){let{style:n,className:r,layoutInfo:i,virtualizer:a,parent:o,children:s}=t,{direction:l}=h(),u=c(null);return L({layoutInfo:i,virtualizer:a,ref:u}),e.createElement(`div`,{role:`presentation`,ref:u,className:r,style:{...V(i,l,o),...n}},s)}let B=new WeakMap;function V(e,t,n){let r=t===`rtl`?`right`:`left`,i=B.get(e);if(i&&i[r]!=null){if(!n)return i;let t=e.rect.y-n.rect.y,a=e.rect.x-n.rect.x;if(i.top===t&&i[r]===a)return i}let a={top:e.rect.y-(n&&!(n.allowOverflow&&e.isSticky)?n.rect.y:0),[r]:e.rect.x-(n&&!(n.allowOverflow&&e.isSticky)?n.rect.x:0),width:e.rect.width,height:e.rect.height};Object.entries(a).forEach(([e,t])=>{Number.isFinite(t)||(a[e]=void 0)});let o={position:e.isSticky?`sticky`:`absolute`,display:e.isSticky?`inline-block`:void 0,overflow:e.allowOverflow?`visible`:`hidden`,opacity:e.opacity,zIndex:e.zIndex,transform:e.transform??void 0,contain:`size layout style`,...a};return B.set(e,o),o}const H=n(null),U=n(null);function W(t){let{children:n,layout:r,layoutOptions:i}=t,a=s(()=>typeof r==`function`?new r:r,[r]),o=s(()=>({isVirtualized:!0,layoutDelegate:a,dropTargetDelegate:a.getDropTargetFromPoint?a:void 0,CollectionRoot:G,CollectionBranch:K}),[a]);return e.createElement(b.Provider,{value:o},e.createElement(U.Provider,{value:{layout:a,layoutOptions:i}},n))}function G({collection:t,persistedKeys:n,scrollRef:r,renderDropIndicator:i}){let{layout:o,layoutOptions:c}=a(U),l=o.useLayoutOptions?.call(o),u=M({layout:o,collection:t,renderView:(e,t)=>t?.render?.call(t,t),onVisibleRectChange(e){let t=r?.current;t&&(t.scrollLeft=e.x,t.scrollTop=e.y)},persistedKeys:n,layoutOptions:s(()=>c&&l?{...c,...l}:c||l,[c,l])}),{contentProps:d}=I({onVisibleRectChange:u.setVisibleRect,contentSize:u.contentSize,onScrollStart:u.startScrolling,onScrollEnd:u.endScrolling},r);return e.createElement(`div`,d,e.createElement(H.Provider,{value:u},q(null,u.visibleViews,i)))}function K({parent:e,renderDropIndicator:t}){let n=a(H).virtualizer.getVisibleView(e.key);return q(n,Array.from(n.children),t)}function q(e,t,n){return t.map(t=>J(e,t,n))}function J(t,n,r){let i=e.createElement(z,{key:n.key,layoutInfo:n.layoutInfo,virtualizer:n.virtualizer,parent:t?.layoutInfo},n.rendered),{collection:a,layout:o}=n.virtualizer,s=n.content;return s?.type===`item`&&r&&o.getDropTargetLayoutInfo&&(i=e.createElement(e.Fragment,{key:n.key},Y(t,n,{type:`item`,key:n.content.key,dropPosition:`before`},r),i,y(a,s,e=>Y(t,n,e,r)))),i}function Y(t,n,r,i){let a=i(r);if(a){let i=n.virtualizer.layout.getDropTargetLayoutInfo(r);a=e.createElement(z,{layoutInfo:i,virtualizer:n.virtualizer,parent:t?.layoutInfo},a)}return a}export{W as Virtualizer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{VisuallyHidden as e}from"react-aria";import"react-stately";export{e as VisuallyHidden};
|
|
1
|
+
import{VisuallyHidden as e}from"react-aria";import"react-stately";import"@react-aria/dnd";export{e as VisuallyHidden};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Confirmation } from "../confirmation.context-
|
|
1
|
+
import { t as Confirmation } from "../confirmation.context-CuufQTQR.js";
|
|
2
2
|
export { Confirmation };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as LinkNavigationProps } from "../Link-
|
|
2
|
-
import { t as LinkContext } from "../link.context-
|
|
1
|
+
import { n as LinkNavigationProps } from "../Link-D85-7S3h.js";
|
|
2
|
+
import { t as LinkContext } from "../link.context-BUxUXeo6.js";
|
|
3
3
|
export { LinkContext, type LinkNavigationProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-
|
|
1
|
+
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-CMbIzR3m.js";
|
|
2
2
|
import { t as UIConfig } from "../uiConfig.context-Bjb9TQ6Y.js";
|
|
3
3
|
export { type DateRangeRelativeOption, type DateRangeResolvedValue, UIConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DatePickerProps } from "./DatePicker-
|
|
1
|
+
import { r as DatePickerProps } from "./DatePicker-DAd7ncHf.js";
|
|
2
2
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
3
3
|
import { t as FireBlurOnChangeProps } from "./fieldAdapter-C4sDFC8f.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DateRangePickerProps } from "./DateRangePicker-
|
|
1
|
+
import { r as DateRangePickerProps } from "./DateRangePicker-CMbIzR3m.js";
|
|
2
2
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
3
3
|
import { t as FireBlurOnChangeProps } from "./fieldAdapter-C4sDFC8f.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DateTimePickerProps } from "./DateTimePicker-
|
|
1
|
+
import { r as DateTimePickerProps } from "./DateTimePicker-Dc6_5X1V.js";
|
|
2
2
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
3
3
|
import { t as FireBlurOnChangeProps } from "./fieldAdapter-C4sDFC8f.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { d as PopoverProps
|
|
1
|
+
import { k as Key } from "./types-Dugk_Mie.js";
|
|
2
|
+
import { d as PopoverProps } from "./types-CaqW-yY5.js";
|
|
3
3
|
import { n as StyleMergeUtils, t as UIOverrides } from "./uiOverrides.context-BdokYcGO.js";
|
|
4
|
-
import "./Link-
|
|
5
|
-
import "./Breadcrumbs-
|
|
4
|
+
import "./Link-D85-7S3h.js";
|
|
5
|
+
import "./Breadcrumbs-BLBMJpe1.js";
|
|
6
6
|
import "./typography.cva-7RYwLrA7.js";
|
|
7
7
|
import "./button.cva-zMNkoZH8.js";
|
|
8
|
-
import "./IconButton-
|
|
9
|
-
import "./InlineIconButton-
|
|
8
|
+
import "./IconButton-Drlnq7ik.js";
|
|
9
|
+
import "./InlineIconButton-C7_CmWFj.js";
|
|
10
10
|
import "./pillButton.cva-Da0WFN39.js";
|
|
11
|
-
import "./PillButton-
|
|
12
|
-
import { r as MenuProps } from "./Menu-
|
|
13
|
-
import "./SplitButton-
|
|
14
|
-
import "./Button-
|
|
15
|
-
import "./TextButton-
|
|
16
|
-
import "./ToggleButton-
|
|
11
|
+
import "./PillButton-JjV_kJ6L.js";
|
|
12
|
+
import { r as MenuProps } from "./Menu-DzTYbIHz.js";
|
|
13
|
+
import "./SplitButton-BEYV4IPB.js";
|
|
14
|
+
import "./Button-DZZporg_.js";
|
|
15
|
+
import "./TextButton-BZxhaNnh.js";
|
|
16
|
+
import "./ToggleButton-DRTGhnjR.js";
|
|
17
17
|
import { c as UIForm, n as FieldValues$1, r as FormInstance } from "./form.binding-Cu03pQ8Y.js";
|
|
18
18
|
import "./checkbox.cva-Caaf2Ysq.js";
|
|
19
|
-
import { a as ControlledCheckboxProps } from "./Checkbox-
|
|
20
|
-
import "./FormField-
|
|
19
|
+
import { a as ControlledCheckboxProps } from "./Checkbox-JJwUwUxc.js";
|
|
20
|
+
import "./FormField-BuKYUy28.js";
|
|
21
21
|
import "./input.cva-CfgCOIQW.js";
|
|
22
|
-
import { r as ControlledCheckboxGroupProps } from "./CheckboxGroup-
|
|
23
|
-
import "./FileUpload-
|
|
24
|
-
import "./FileUploadContainer
|
|
25
|
-
import "./InputUpload-
|
|
26
|
-
import { r as NumberInputComponent } from "./NumberInput-
|
|
27
|
-
import { t as ControlledNumberRangeInputProps } from "./NumberRangeInput-
|
|
28
|
-
import { r as TextInputComponent } from "./TextInput-
|
|
29
|
-
import { t as ControlledPasswordInputProps } from "./PasswordInput-
|
|
30
|
-
import { t as ControlledTextAreaProps } from "./TextArea-
|
|
22
|
+
import { r as ControlledCheckboxGroupProps } from "./CheckboxGroup-Cw-SKIqN.js";
|
|
23
|
+
import "./FileUpload-B7gn4UwN.js";
|
|
24
|
+
import "./FileUploadContainer-C4PRM8Io.js";
|
|
25
|
+
import "./InputUpload-BZqamXus.js";
|
|
26
|
+
import { r as NumberInputComponent } from "./NumberInput-DjuZmkzv.js";
|
|
27
|
+
import { t as ControlledNumberRangeInputProps } from "./NumberRangeInput-DKVN5j9j.js";
|
|
28
|
+
import { r as TextInputComponent } from "./TextInput-ChVYCxjg.js";
|
|
29
|
+
import { t as ControlledPasswordInputProps } from "./PasswordInput-TIBbZOFu.js";
|
|
30
|
+
import { t as ControlledTextAreaProps } from "./TextArea-CbZ9kNwo.js";
|
|
31
31
|
import "./radio.cva-9lpsise2.js";
|
|
32
|
-
import { s as SelectItem, t as DefaultInitialSelectItem } from "./SelectBase-
|
|
32
|
+
import { s as SelectItem, t as DefaultInitialSelectItem } from "./SelectBase-DKJuFnvX.js";
|
|
33
33
|
import { n as HasRequiredProperty } from "./common-UBFya8WY.js";
|
|
34
|
-
import { n as AutocompleteProps, r as ControlledAutocompleteProps } from "./Autocomplete-
|
|
35
|
-
import { n as QueryFn, t as QueryAutocompleteProps } from "./queryAutocomplete.types-
|
|
36
|
-
import { r as SelectProps, t as ControlledSelectProps } from "./Select-
|
|
37
|
-
import { n as QuerySelectProps, r as QueryFn$1 } from "./QuerySelect-
|
|
38
|
-
import { t as ControlledSliderProps } from "./Slider-
|
|
34
|
+
import { n as AutocompleteProps, r as ControlledAutocompleteProps } from "./Autocomplete-B9GmXJF4.js";
|
|
35
|
+
import { n as QueryFn, t as QueryAutocompleteProps } from "./queryAutocomplete.types-Cn4fe0OX.js";
|
|
36
|
+
import { r as SelectProps, t as ControlledSelectProps } from "./Select-ChzbiDjh.js";
|
|
37
|
+
import { n as QuerySelectProps, r as QueryFn$1 } from "./QuerySelect--pihqb-N.js";
|
|
38
|
+
import { t as ControlledSliderProps } from "./Slider-BmoZiiSt.js";
|
|
39
39
|
import "./toggle.cva-2CGLc8aa.js";
|
|
40
|
-
import { t as ControlledToggleProps } from "./Toggle-
|
|
41
|
-
import "./Modal-
|
|
40
|
+
import { t as ControlledToggleProps } from "./Toggle-pQ0-MbwL.js";
|
|
41
|
+
import "./Modal-4GP9tQLf.js";
|
|
42
42
|
import "./Typography-BiHrVFpz.js";
|
|
43
|
-
import "./ActionModal-
|
|
43
|
+
import "./ActionModal-CzM2hcr0.js";
|
|
44
44
|
import "./BottomSheet.lazy-DT02808T.js";
|
|
45
45
|
import "./Drawer-DnSLe85M.js";
|
|
46
|
-
import "./ResponsivePopover-
|
|
47
|
-
import "./Tooltip-
|
|
46
|
+
import "./ResponsivePopover-C76oaVmY.js";
|
|
47
|
+
import "./Tooltip-BxixKjWm.js";
|
|
48
48
|
import "./TooltipEllipsis-Di9Dvd4x.js";
|
|
49
|
-
import "./PaginationList-
|
|
50
|
-
import "./Pagination-
|
|
49
|
+
import "./PaginationList-DKYcaO7E.js";
|
|
50
|
+
import "./Pagination-fLbLp_Ro.js";
|
|
51
51
|
import "./Alert-C0GAvkdO.js";
|
|
52
52
|
import "./Loader-Sbr1b0iU.js";
|
|
53
53
|
import "./toast.cva-C1ZPw_oP.js";
|
|
54
54
|
import "./Toast-DL8_g0WV.js";
|
|
55
55
|
import "./useToast-q70ayd29.js";
|
|
56
|
-
import "./Pill-
|
|
57
|
-
import "./Tag-
|
|
58
|
-
import "./Accordion-
|
|
59
|
-
import "./confirmation.context-
|
|
60
|
-
import { t as ControlledDatePickerProps } from "./DatePicker-
|
|
61
|
-
import { t as ControlledDateRangePickerProps } from "./DateRangePicker-
|
|
62
|
-
import { t as ControlledDateTimePickerProps } from "./DateTimePicker-
|
|
56
|
+
import "./Pill-BuC3w3xn.js";
|
|
57
|
+
import "./Tag-BfmQ9BIV.js";
|
|
58
|
+
import "./Accordion-UtY7wEp-.js";
|
|
59
|
+
import "./confirmation.context-CuufQTQR.js";
|
|
60
|
+
import { t as ControlledDatePickerProps } from "./DatePicker-DAd7ncHf.js";
|
|
61
|
+
import { t as ControlledDateRangePickerProps } from "./DateRangePicker-CMbIzR3m.js";
|
|
62
|
+
import { t as ControlledDateTimePickerProps } from "./DateTimePicker-Dc6_5X1V.js";
|
|
63
63
|
import "./date-time.utils-Cu9TVj46.js";
|
|
64
64
|
import "./lucide-react-BJRvqSeV.js";
|
|
65
|
-
import "./link.context-
|
|
66
|
-
import "./MenuItem-
|
|
65
|
+
import "./link.context-BUxUXeo6.js";
|
|
66
|
+
import "./MenuItem-DVFyNRhi.js";
|
|
67
67
|
import "./ProgressBar-DG-ClG9v.js";
|
|
68
|
-
import { t as Autocomplete } from "./autocomplete-
|
|
69
|
-
import { t as Checkbox } from "./checkbox-
|
|
70
|
-
import { t as CheckboxGroup } from "./checkbox-group-
|
|
71
|
-
import { n as DatePicker } from "./date-picker-
|
|
72
|
-
import { n as DateRangePicker } from "./date-range-picker-
|
|
73
|
-
import { n as DateTimePicker } from "./date-time-picker-
|
|
74
|
-
import "./file-upload-
|
|
75
|
-
import "./input-upload-
|
|
76
|
-
import { n as NumberInput } from "./number-input-
|
|
77
|
-
import { n as NumberRangeInput } from "./number-range-input-
|
|
78
|
-
import { n as PasswordInput } from "./password-input
|
|
79
|
-
import { t as QueryAutocomplete } from "./query-autocomplete-
|
|
80
|
-
import { t as QuerySelect } from "./query-select-
|
|
81
|
-
import "./radio-group-
|
|
82
|
-
import "./segment.types-
|
|
83
|
-
import { n as Segment } from "./segment-
|
|
84
|
-
import { n as Select } from "./select-
|
|
85
|
-
import { n as Slider } from "./slider-
|
|
86
|
-
import { n as TextArea } from "./text-area-
|
|
87
|
-
import "./text-editor-
|
|
88
|
-
import { n as TextInput } from "./text-input-
|
|
89
|
-
import { t as ControlledTimePickerProps } from "./TimePicker-
|
|
90
|
-
import { n as TimePicker } from "./time-picker-
|
|
91
|
-
import { n as Toggle } from "./toggle-
|
|
68
|
+
import { t as Autocomplete } from "./autocomplete-BY74KiVw.js";
|
|
69
|
+
import { t as Checkbox } from "./checkbox-DLczwKKs.js";
|
|
70
|
+
import { t as CheckboxGroup } from "./checkbox-group-DT7hMwsc.js";
|
|
71
|
+
import { n as DatePicker } from "./date-picker-CuNJV9nJ.js";
|
|
72
|
+
import { n as DateRangePicker } from "./date-range-picker-CJOhtloN.js";
|
|
73
|
+
import { n as DateTimePicker } from "./date-time-picker-MIDzdeQN.js";
|
|
74
|
+
import "./file-upload-C0kwtd3Z.js";
|
|
75
|
+
import "./input-upload-CFcsHAOE.js";
|
|
76
|
+
import { n as NumberInput } from "./number-input-DhLfHuVP.js";
|
|
77
|
+
import { n as NumberRangeInput } from "./number-range-input-CLsMdwqJ.js";
|
|
78
|
+
import { n as PasswordInput } from "./password-input--nSBPzos.js";
|
|
79
|
+
import { t as QueryAutocomplete } from "./query-autocomplete-vHRKodn0.js";
|
|
80
|
+
import { t as QuerySelect } from "./query-select-CvoVhXu1.js";
|
|
81
|
+
import "./radio-group-rmH66jpI.js";
|
|
82
|
+
import "./segment.types-DUstTZeA.js";
|
|
83
|
+
import { n as Segment } from "./segment-e0jd1JbP.js";
|
|
84
|
+
import { n as Select } from "./select-Bvt1d_ly.js";
|
|
85
|
+
import { n as Slider } from "./slider-CRnAZyb_.js";
|
|
86
|
+
import { n as TextArea } from "./text-area-KsaEQpPz.js";
|
|
87
|
+
import "./text-editor-CYU0teJy.js";
|
|
88
|
+
import { n as TextInput } from "./text-input-dZeNDTtP.js";
|
|
89
|
+
import { t as ControlledTimePickerProps } from "./TimePicker-CMhURRER.js";
|
|
90
|
+
import { n as TimePicker } from "./time-picker-CcHlAJUk.js";
|
|
91
|
+
import { n as Toggle } from "./toggle-BGOUUhAG.js";
|
|
92
92
|
import "./Stepper-JUO4MbZx.js";
|
|
93
93
|
import "./useTableNav-aDO5L4da.js";
|
|
94
94
|
import "./router.context-BOYRh2p9.js";
|
|
@@ -97,7 +97,7 @@ import "./uiConfig.context-Bjb9TQ6Y.js";
|
|
|
97
97
|
import "./useFilters-BxRScJdn.js";
|
|
98
98
|
import "./useLocalStorage-DGsBUCT6.js";
|
|
99
99
|
import "./useTranslationMemo-Dy3p6m1g.js";
|
|
100
|
-
import { t as Segment$1 } from "./Segment-
|
|
100
|
+
import { t as Segment$1 } from "./Segment-AtakFKus.js";
|
|
101
101
|
import { ComponentProps, DependencyList, EffectCallback, JSXElementConstructor, KeyboardEvent, ReactElement, ReactNode, RefObject, SetStateAction, SyntheticEvent } from "react";
|
|
102
102
|
import { BrowserNativeObject, ExtractObjects, FieldValues, NestedValue, SubmitErrorHandler, SubmitHandler, UseFormProps, UseFormReturn } from "react-hook-form";
|
|
103
103
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as FileUploadBaseProps } from "./fileUpload.types-
|
|
2
|
-
import "./FileUpload-
|
|
1
|
+
import { n as FileUploadBaseProps } from "./fileUpload.types-DFg9wCbc.js";
|
|
2
|
+
import "./FileUpload-B7gn4UwN.js";
|
|
3
3
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
5
5
|
//#region src/entries/rhf/file-upload.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as DropZoneProps, o as FileTriggerProps } from "./types-
|
|
2
|
-
import { r as ButtonProps } from "./Button-
|
|
1
|
+
import { a as DropZoneProps, o as FileTriggerProps } from "./types-CaqW-yY5.js";
|
|
2
|
+
import { r as ButtonProps } from "./Button-DZZporg_.js";
|
|
3
3
|
import { n as FieldValues } from "./form.binding-Cu03pQ8Y.js";
|
|
4
4
|
import { t as ControlProps } from "./form.types-qEwMTXTZ.js";
|
|
5
|
-
import { n as FormFieldProps } from "./FormField-
|
|
5
|
+
import { n as FormFieldProps } from "./FormField-BuKYUy28.js";
|
|
6
6
|
import { ReactNode, Ref } from "react";
|
|
7
7
|
//#region src/types/error-handling.d.ts
|
|
8
8
|
type GeneralErrorCodes = "DATA_VALIDATION_ERROR" | "NETWORK_ERROR" | "CANCELED_ERROR" | "INTERNAL_ERROR" | "UNKNOWN_ERROR";
|
|
@@ -26,6 +26,15 @@ interface DOMProps {
|
|
|
26
26
|
*/
|
|
27
27
|
id?: string;
|
|
28
28
|
}
|
|
29
|
+
interface FocusableDOMProps extends DOMProps {
|
|
30
|
+
/**
|
|
31
|
+
* Whether to exclude the element from the sequential tab order. If true,
|
|
32
|
+
* the element will not be focusable via the keyboard by tabbing. This should
|
|
33
|
+
* be avoided except in rare scenarios where an alternative means of accessing
|
|
34
|
+
* the element or its functionality via the keyboard is available.
|
|
35
|
+
*/
|
|
36
|
+
excludeFromTabOrder?: boolean;
|
|
37
|
+
}
|
|
29
38
|
interface InputDOMProps {
|
|
30
39
|
/**
|
|
31
40
|
* The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).
|
|
@@ -175,11 +184,101 @@ interface GlobalDOMEvents<T = Element> {
|
|
|
175
184
|
onTransitionStartCapture?: TransitionEventHandler<T> | undefined;
|
|
176
185
|
}
|
|
177
186
|
//#endregion
|
|
187
|
+
//#region ../../node_modules/.bun/@react-types+shared@3.33.0+83d5fd7b249dbeef/node_modules/@react-types/shared/src/inputs.d.ts
|
|
188
|
+
type ValidationState = 'valid' | 'invalid';
|
|
189
|
+
interface ValidationResult {
|
|
190
|
+
/** Whether the input value is invalid. */
|
|
191
|
+
isInvalid: boolean;
|
|
192
|
+
/** The current error messages for the input if it is invalid, otherwise an empty array. */
|
|
193
|
+
validationErrors: string[];
|
|
194
|
+
/** The native validation details for the input. */
|
|
195
|
+
validationDetails: ValidityState;
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
178
198
|
//#region ../../node_modules/.bun/@react-types+shared@3.33.0+83d5fd7b249dbeef/node_modules/@react-types/shared/src/selection.d.ts
|
|
179
199
|
type SelectionMode = 'none' | 'single' | 'multiple';
|
|
180
200
|
type SelectionBehavior = 'toggle' | 'replace';
|
|
181
201
|
//#endregion
|
|
202
|
+
//#region ../../node_modules/.bun/@react-types+shared@3.33.0+83d5fd7b249dbeef/node_modules/@react-types/shared/src/dnd.d.ts
|
|
203
|
+
interface DragDropEvent {
|
|
204
|
+
/** The x coordinate of the event, relative to the target element. */
|
|
205
|
+
x: number;
|
|
206
|
+
/** The y coordinate of the event, relative to the target element. */
|
|
207
|
+
y: number;
|
|
208
|
+
}
|
|
209
|
+
type DropOperation = 'copy' | 'link' | 'move' | 'cancel';
|
|
210
|
+
interface DropEnterEvent extends DragDropEvent {
|
|
211
|
+
/** The event type. */
|
|
212
|
+
type: 'dropenter';
|
|
213
|
+
}
|
|
214
|
+
interface DropMoveEvent extends DragDropEvent {
|
|
215
|
+
/** The event type. */
|
|
216
|
+
type: 'dropmove';
|
|
217
|
+
}
|
|
218
|
+
interface DropActivateEvent extends DragDropEvent {
|
|
219
|
+
/** The event type. */
|
|
220
|
+
type: 'dropactivate';
|
|
221
|
+
}
|
|
222
|
+
interface DropExitEvent extends DragDropEvent {
|
|
223
|
+
/** The event type. */
|
|
224
|
+
type: 'dropexit';
|
|
225
|
+
}
|
|
226
|
+
interface TextDropItem {
|
|
227
|
+
/** The item kind. */
|
|
228
|
+
kind: 'text';
|
|
229
|
+
/**
|
|
230
|
+
* The drag types available for this item.
|
|
231
|
+
* These are often mime types, but may be custom app-specific types.
|
|
232
|
+
*/
|
|
233
|
+
types: Set<string>;
|
|
234
|
+
/** Returns the data for the given type as a string. */
|
|
235
|
+
getText(type: string): Promise<string>;
|
|
236
|
+
}
|
|
237
|
+
interface FileDropItem {
|
|
238
|
+
/** The item kind. */
|
|
239
|
+
kind: 'file';
|
|
240
|
+
/** The file type (usually a mime type). */
|
|
241
|
+
type: string;
|
|
242
|
+
/** The file name. */
|
|
243
|
+
name: string;
|
|
244
|
+
/** Returns the contents of the file as a blob. */
|
|
245
|
+
getFile(): Promise<File>;
|
|
246
|
+
/** Returns the contents of the file as a string. */
|
|
247
|
+
getText(): Promise<string>;
|
|
248
|
+
}
|
|
249
|
+
interface DirectoryDropItem {
|
|
250
|
+
/** The item kind. */
|
|
251
|
+
kind: 'directory';
|
|
252
|
+
/** The directory name. */
|
|
253
|
+
name: string;
|
|
254
|
+
/** Returns the entries contained within the directory. */
|
|
255
|
+
getEntries(): AsyncIterable<FileDropItem | DirectoryDropItem>;
|
|
256
|
+
}
|
|
257
|
+
type DropItem = TextDropItem | FileDropItem | DirectoryDropItem;
|
|
258
|
+
interface DropEvent extends DragDropEvent {
|
|
259
|
+
/** The event type. */
|
|
260
|
+
type: 'drop';
|
|
261
|
+
/** The drop operation that should occur. */
|
|
262
|
+
dropOperation: DropOperation;
|
|
263
|
+
/** The dropped items. */
|
|
264
|
+
items: DropItem[];
|
|
265
|
+
}
|
|
266
|
+
interface DragTypes {
|
|
267
|
+
/** Returns whether the drag contains data of the given type. */
|
|
268
|
+
has(type: string | symbol): boolean;
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
182
271
|
//#region ../../node_modules/.bun/@react-types+shared@3.33.0+83d5fd7b249dbeef/node_modules/@react-types/shared/src/events.d.ts
|
|
272
|
+
// Event bubbling can be problematic in real-world applications, so the default for React Spectrum components
|
|
273
|
+
// is not to propagate. This can be overridden by calling continuePropagation() on the event.
|
|
274
|
+
type BaseEvent<T extends SyntheticEvent> = T & {
|
|
275
|
+
/**
|
|
276
|
+
* Use continuePropagation.
|
|
277
|
+
* @deprecated */
|
|
278
|
+
stopPropagation(): void;
|
|
279
|
+
continuePropagation(): void;
|
|
280
|
+
};
|
|
281
|
+
type KeyboardEvent$1 = BaseEvent<KeyboardEvent<any>>;
|
|
183
282
|
type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';
|
|
184
283
|
interface PressEvent {
|
|
185
284
|
/** The type of press event being fired. */
|
|
@@ -220,6 +319,12 @@ interface HoverEvent {
|
|
|
220
319
|
/** The target element of the hover event. */
|
|
221
320
|
target: HTMLElement;
|
|
222
321
|
}
|
|
322
|
+
interface KeyboardEvents {
|
|
323
|
+
/** Handler that is called when a key is pressed. */
|
|
324
|
+
onKeyDown?: (e: KeyboardEvent$1) => void;
|
|
325
|
+
/** Handler that is called when a key is released. */
|
|
326
|
+
onKeyUp?: (e: KeyboardEvent$1) => void;
|
|
327
|
+
}
|
|
223
328
|
interface FocusEvents<Target = Element> {
|
|
224
329
|
/** Handler that is called when the element receives focus. */
|
|
225
330
|
onFocus?: (e: FocusEvent<Target>) => void;
|
|
@@ -260,10 +365,14 @@ interface PressEvents {
|
|
|
260
365
|
*/
|
|
261
366
|
onClick?: (e: MouseEvent<FocusableElement>) => void;
|
|
262
367
|
}
|
|
368
|
+
interface FocusableProps<Target = Element> extends FocusEvents<Target>, KeyboardEvents {
|
|
369
|
+
/** Whether the element should receive focus on render. */
|
|
370
|
+
autoFocus?: boolean;
|
|
371
|
+
}
|
|
263
372
|
//#endregion
|
|
264
373
|
//#region ../../node_modules/.bun/@react-types+shared@3.33.0+83d5fd7b249dbeef/node_modules/@react-types/shared/src/refs.d.ts
|
|
265
374
|
interface RefObject$1<T> {
|
|
266
375
|
current: T;
|
|
267
376
|
}
|
|
268
377
|
//#endregion
|
|
269
|
-
export {
|
|
378
|
+
export { InputDOMProps as C, GlobalDOMAttributes as S, AriaLabelingProps as _, PressEvents as a, FocusableDOMProps as b, DropEnterEvent as c, DropMoveEvent as d, DropOperation as f, ValidationState as g, ValidationResult as h, HoverEvents as i, DropEvent as l, SelectionMode as m, FocusEvents as n, DragTypes as o, SelectionBehavior as p, FocusableProps as r, DropActivateEvent as s, RefObject$1 as t, DropExitEvent as u, DOMAttributes$1 as v, LinkDOMProps as w, FocusableElement as x, DOMProps as y };
|