@planningcenter/tapestry-react 4.11.6-rc.1 → 4.12.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.
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,cAAc,EAKf,MAAM,OAAO,CAAA;AAId,OAAO,UAAU,MAAM,eAAe,CAAA;AA0BtC,MAAM,MAAM,KAAK,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI;IAIpD,aAAa,CAAC,EAAE;QAAE,4BAA4B,CAAC,EAAE,QAAQ,CAAA;KAAE,CAAA;IAK3D,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAM5B,OAAO,CAAC,EAAE,KAAK,CAAC;QAKd,aAAa,CAAC,EAAE,OAAO,CAAA;QAOvB,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;QAE9D,GAAG,CAAC,EAAE,GAAG,CAAA;QAMT,oBAAoB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;QAKrC,MAAM,CAAC,EAAE,GAAG,CAAA;QAMZ,MAAM,CAAC,EAAE,GAAG,CAAA;QAKZ,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QAKpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;QAM7B,KAAK,CAAC,EAAE,MAAM,CAAA;QAKd,QAAQ,CAAC,EAAE,MAAM,CAAA;QAKjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QAMjB,QAAQ,CAAC,EAAE,OAAO,CAAA;QAMlB,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAM3B,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IA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E,GAAG,CAAC,CAAA;KAAE,KAAK,IAAI,CAClD,CAAA;IAKD,OAAO,CAAC,EAAE,OAAO,CAAA;IAKjB,YAAY,CAAC,EAAE,MAAM,CAAA;IAOrB,YAAY,CAAC,EAAE,QAAQ,CAAA;IAOvB,SAAS,CAAC,EAAE,QAAQ,CAAA;IAOpB,WAAW,CAAC,EAAE,QAAQ,CAAA;IAOtB,MAAM,CAAC,EAAE,QAAQ,CAAA;IAOjB,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,cAAc,CAAC,CAAA;IAOhE,UAAU,CAAC,EAAE,QAAQ,CAAA;IAOrB,SAAS,CAAC,EAAE,QAAQ,CAAA;IAKpB,UAAU,CAAC,EAAE,OAAO,CAAA;IAKpB,UAAU,CAAC,EAAE,MAAM,CAAA;IAKnB,OAAO,CAAC,EACJ;QACE,IAAI,CAAC,EAAE,MAAM,CAAA;QAKb,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAK5B,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAK3B,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAK/B,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAE9B,MAAM,CAAC,EAAE,MAAM,CAAA;QAKf,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAE9B,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GACD,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAA;CAC5B,CAAA;AAID,QAAA,MAAM,SAAS,uEA+Pd,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as o}from'./../ext/tslib/tslib.es6.js';import t,{useRef as r,useMemo as n,useImperativeHandle as a,Fragment as s}from"react";import i from"../DragDrop/DragDrop.js";import{useId as l}from"../hooks/use-id.js";import"mousetrap";import"../hooks/use-measure.js";import m from"../Pagination/Pagination.js";import{Spinner as c}from"../Spinner/Spinner.js";import{StackView as d}from"../StackView/StackView.js";import p from"../Summary/Summary.js";import"../system/colors/colors.js";import"polished";import{reorderArray as u}from"../utils.js";import"lodash/includes";import"@emotion/react";import"lodash/get";import"../system/default-theme.js";import"../system/style-names.js";import f from"../system/use-css.js";import g from"./components/BodyRows.js";import"../Icon/Icon.js";import"../VariantProvider/VariantProvider.js";import"../CheckboxGroup/CheckboxGroupContext.js";import"../designTokens/index.js";import"../Link/Link.js";import"../Tooltip/Tooltip.js";import"../Dropdown/Dropdown.js";import b from"./components/HeaderCell.js";import{useCollapsibleRows as h,CollapsibleRowsContext as y}from"./hooks/useCollapsibleRows.js";import v from"./hooks/useColumnSort.js";import j from"./hooks/useColumnWidths.js";import w from"./hooks/useScrollShadows.js";import S from"./hooks/useScrollSync.js";import k from"./hooks/useVariants.js";import C from"./utils/getParsedColumns.js";import"./utils/variants.js";var E={toggleAllSubRowsTooltipTitle:function(e){return e?"Close all sub rows":"Open all sub rows"}},R=[],D=function(D){var x,I=D.accessibility,P=void 0===I?E:I,N=D.innerBodyRef,T=D.canCollapseSubRows,V=void 0===T||T,O=D.columns,L=D.currentPage,W=D.data,B=D.dataTableRef,z=D.defaultSort,A=D.defaultAllSubRowsOpen,G=D.droppableId,H=D.empty,_=D.getRowId,q=void 0===_?function(e,o){return e.id||(void 0===G?o:"".concat(G,"-").concat(o))}:_,F=D.getRowLink,J=D.getSubData,K=D.hiddenColumnIds,M=void 0===K?R:K,Q=D.keyboardShortcuts,U=D.loading,X=D.loadingTitle,Y=D.onColumnSort,Z=D.onDragStart,$=D.onDragEnd,ee=D.onDrop,oe=D.onPageChange,te=D.onRowClick,re=D.onRowSort,ne=D.sourceOnly,ae=D.totalPages,se=D.variant,ie=void 0===se?{}:se,le=f(),me=l("table"),ce=i.useDragDrop(),de=U||W.length<=0,pe=r(),ue=r(),fe=r(),ge=[pe,ue],be=ne||re||ee,he=k(ie),ye=h(W,A),ve=Boolean(V&&J),je=n((function(){return C({accessibility:P,columns:O,draggable:be,hasSubRows:ve,hiddenColumnIds:M})}),[O,ve,M,be]),we=je.map(Object.keys).some((function(e){return e.some((function(e){return"footer"===e}))})),Se=j({bodyRef:ue,columns:je,data:W,headerRef:pe,loading:U}),ke=Se.columnWidths,Ce=Se.getColumnRef,Ee=v({defaultSort:z,onColumnSort:Y}),Re=w(ue),De={collapsibleRows:ye,columnWidths:ke,columns:je,data:W,draggable:be,getColumnRef:Ce,getRowId:q,getRowLink:F,getSubData:J,getVariant:he,keyboardShortcuts:Q,onRowClick:te};return we&&ge.push(fe),S.apply(void 0,ge),a(B,(function(){return ye})),"function"==typeof N&&N(ue),x=ce||be?t.createElement(i.Provider,{onDragEnd:function(e){var o=e.source,t=e.destination;re&&t&&re(u({endIndex:t.index,list:W,startIndex:o.index}))}},t.createElement(i.Droppable,{droppableId:void 0===G?me:G,sourceOnly:ne,onDragStart:Z,onDragEnd:$,onDrop:ee},(function(o){return t.createElement("div",e({className:le(he("body")),"data-dnd-ignore-scrollable":!0,ref:function(e){ue.current=e,o.innerRef(e)},role:"rowgroup"},o.droppableProps),t.createElement(g,e({},De)),o.placeholder)}))):t.createElement("div",{ref:ue,role:"rowgroup",className:le(he("body"))},t.createElement(g,e({},De))),t.createElement(s,null,de&&t.createElement(d,{grow:1,alignment:"center",distribution:"center",minHeight:"100%",paddingVertical:8},U?t.createElement(p,{image:t.createElement(c,{size:"xl"}),title:X}):H),t.createElement(y.Provider,{value:ye},t.createElement("div",{role:F?void 0:"grid",style:de?{display:"none"}:void 0,className:"tapestry-react-reset ".concat(le({position:"relative"}))},t.createElement("div",{ref:pe,role:"rowgroup",className:le(he("header"))},t.createElement("div",{role:"row",className:le(he("headerRow"))},je.map((function(e,r){var n=he("headerCell",{columnIndex:r,isSortable:e.sortable});return t.createElement(b,{key:r,cellRef:Ce("".concat(r,".0")),column:e,columnIndex:r,columnSort:Ee,className:"tapestry-react-reset ".concat(le(o(o([],n,!0),[e.css],!1)))})})))),x,we&&t.createElement("div",{ref:fe,role:"rowgroup",className:le(he("footer"))},t.createElement("div",{role:"row",className:le(he("footerRow"))},je.map((function(e,r){var n=he("footerCell",{columnIndex:r,isSortable:e.sortable});return t.createElement("div",{key:r,role:"cell",ref:Ce("".concat(r,".").concat(W.length+1)),className:"tapestry-react-reset ".concat(le(o(o([],n,!0),[e.css],!1)))},"string"==typeof e.footer||t.isValidElement(e.footer)?e.footer:e.footer?t.createElement(e.footer,{columnIndex:r}):null)})))),Re,t.createElement(m,{currentPage:L,totalPages:ae,onPageChange:oe,position:"sticky",bottom:0,zIndex:35,marginTop:"-1px",backgroundColor:"white",borderTopWidth:1,borderTopColor:"grey-3",className:le({"@media print":{position:"relative"}})}))))};export{D as default};
1
+ import{__assign as e,__spreadArray as o}from'./../ext/tslib/tslib.es6.js';import{token as r}from"@planningcenter/tapestry";import t,{useRef as n,useMemo as a,useImperativeHandle as s,Fragment as l}from"react";import i from"../DragDrop/DragDrop.js";import{useId as m}from"../hooks/use-id.js";import"mousetrap";import"../hooks/use-measure.js";import c from"../Pagination/Pagination.js";import{Spinner as d}from"../Spinner/Spinner.js";import{StackView as p}from"../StackView/StackView.js";import u from"../Summary/Summary.js";import"../system/colors/colors.js";import"polished";import{reorderArray as f}from"../utils.js";import"lodash/includes";import"@emotion/react";import"lodash/get";import"../system/default-theme.js";import"../system/style-names.js";import g from"../system/use-css.js";import b from"./components/BodyRows.js";import"../Icon/Icon.js";import"../VariantProvider/VariantProvider.js";import"../CheckboxGroup/CheckboxGroupContext.js";import"../designTokens/index.js";import"../Link/Link.js";import"../Tooltip/Tooltip.js";import"../Dropdown/Dropdown.js";import h from"./components/HeaderCell.js";import{useCollapsibleRows as y,CollapsibleRowsContext as v}from"./hooks/useCollapsibleRows.js";import j from"./hooks/useColumnSort.js";import w from"./hooks/useColumnWidths.js";import S from"./hooks/useScrollShadows.js";import k from"./hooks/useScrollSync.js";import C from"./hooks/useVariants.js";import E from"./utils/getParsedColumns.js";import"./utils/variants.js";var R={toggleAllSubRowsTooltipTitle:function(e){return e?"Close all sub rows":"Open all sub rows"}},D=[],x=function(x){var I,P=x.accessibility,N=void 0===P?R:P,T=x.innerBodyRef,V=x.canCollapseSubRows,O=void 0===V||V,L=x.columns,W=x.currentPage,B=x.data,z=x.dataTableRef,A=x.defaultSort,G=x.defaultAllSubRowsOpen,H=x.droppableId,_=x.empty,q=x.getRowId,F=void 0===q?function(e,o){return e.id||(void 0===H?o:"".concat(H,"-").concat(o))}:q,J=x.getRowLink,K=x.getSubData,M=x.hiddenColumnIds,Q=void 0===M?D:M,U=x.keyboardShortcuts,X=x.loading,Y=x.loadingTitle,Z=x.onColumnSort,$=x.onDragStart,ee=x.onDragEnd,oe=x.onDrop,re=x.onPageChange,te=x.onRowClick,ne=x.onRowSort,ae=x.sourceOnly,se=x.totalPages,le=x.variant,ie=void 0===le?{}:le,me=g(),ce=m("table"),de=i.useDragDrop(),pe=X||B.length<=0,ue=n(),fe=n(),ge=n(),be=[ue,fe],he=ae||ne||oe,ye=C(ie),ve=y(B,G),je=Boolean(O&&K),we=a((function(){return E({accessibility:N,columns:L,draggable:he,hasSubRows:je,hiddenColumnIds:Q})}),[L,je,Q,he]),Se=we.map(Object.keys).some((function(e){return e.some((function(e){return"footer"===e}))})),ke=w({bodyRef:fe,columns:we,data:B,headerRef:ue,loading:X}),Ce=ke.columnWidths,Ee=ke.getColumnRef,Re=j({defaultSort:A,onColumnSort:Z}),De=S(fe),xe={collapsibleRows:ve,columnWidths:Ce,columns:we,data:B,draggable:he,getColumnRef:Ee,getRowId:F,getRowLink:J,getSubData:K,getVariant:ye,keyboardShortcuts:U,onRowClick:te};return Se&&be.push(ge),k.apply(void 0,be),s(z,(function(){return ve})),"function"==typeof T&&T(fe),I=de||he?t.createElement(i.Provider,{onDragEnd:function(e){var o=e.source,r=e.destination;ne&&r&&ne(f({endIndex:r.index,list:B,startIndex:o.index}))}},t.createElement(i.Droppable,{droppableId:void 0===H?ce:H,sourceOnly:ae,onDragStart:$,onDragEnd:ee,onDrop:oe},(function(o){return t.createElement("div",e({className:me(ye("body")),"data-dnd-ignore-scrollable":!0,ref:function(e){fe.current=e,o.innerRef(e)},role:"rowgroup"},o.droppableProps),t.createElement(b,e({},xe)),o.placeholder)}))):t.createElement("div",{ref:fe,role:"rowgroup",className:me(ye("body"))},t.createElement(b,e({},xe))),t.createElement(l,null,pe&&t.createElement(p,{grow:1,alignment:"center",distribution:"center",minHeight:"100%",paddingVertical:8},X?t.createElement(u,{image:t.createElement(d,{size:"xl"}),title:Y}):_),t.createElement(v.Provider,{value:ve},t.createElement("div",{role:J?void 0:"grid",style:pe?{display:"none"}:void 0,className:"tapestry-react-reset ".concat(me({position:"relative"}))},t.createElement("div",{ref:ue,role:"rowgroup",className:me(ye("header"))},t.createElement("div",{role:"row",className:me(ye("headerRow"))},we.map((function(e,r){var n=ye("headerCell",{columnIndex:r,isSortable:e.sortable});return t.createElement(h,{key:r,cellRef:Ee("".concat(r,".0")),column:e,columnIndex:r,columnSort:Re,className:"tapestry-react-reset ".concat(me(o(o([],n,!0),[e.css],!1)))})})))),I,Se&&t.createElement("div",{ref:ge,role:"rowgroup",className:me(ye("footer"))},t.createElement("div",{role:"row",className:me(ye("footerRow"))},we.map((function(e,r){var n=ye("footerCell",{columnIndex:r,isSortable:e.sortable});return t.createElement("div",{key:r,role:"cell",ref:Ee("".concat(r,".").concat(B.length+1)),className:"tapestry-react-reset ".concat(me(o(o([],n,!0),[e.css],!1)))},"string"==typeof e.footer||t.isValidElement(e.footer)?e.footer:e.footer?t.createElement(e.footer,{columnIndex:r}):null)})))),De,t.createElement(c,{currentPage:W,totalPages:se,onPageChange:re,position:"sticky",bottom:0,zIndex:35,marginTop:"-1px",backgroundColor:r("--t-surface-color-card"),borderTopWidth:1,borderTopColor:"grey-3",className:me({"@media print":{position:"relative"}})}))))};export{x as default};
2
2
  //# sourceMappingURL=DataTable.js.map
@@ -34,6 +34,7 @@ type Props = {
34
34
  spinner?: boolean;
35
35
  title?: JSX.Element | string;
36
36
  triggerElement?: React.ReactElement | React.ElementType | string | React.ComponentClass<any, any> | React.FunctionComponent<any>;
37
+ triggerElementIsTapestryReact?: boolean;
37
38
  variant?: string;
38
39
  };
39
40
  type DropdownProps = Omit<ButtonProps, keyof Props | 'ref'> & Props;
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,EAEZ,SAAS,EACT,cAAc,EAEd,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,OAAO,CAAA;AAEd,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAA;AAG1D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,OAAO,IAA2B,MAAM,QAAQ,CAAA;AAChD,OAAO,IAA2B,MAAM,QAAQ,CAAA;AAEhD,KAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,KAAK,CAAA;IAGV,aAAa,CAAC,EAAE,OAAO,CAAA;IAGvB,WAAW,CAAC,EAAE,OAAO,CAAA;IAGrB,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAA;IAEjC,UAAU,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAGrC,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;IAE/C,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAA;IAG3C,QAAQ,CAAC,EAAE,GAAG,CAAA;IAGd,UAAU,CAAC,EAAE,OAA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AAK,CAAC,GAAG,KAAK,CAAA;AAEnE,cAAM,QAAS,SAAQ,SAAS,CAC9B,aAAa,EACb;IAAE,aAAa,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CACjD;IACC,MAAM,CAAC,IAAI,cAAO;IAElB,MAAM,CAAC,IAAI,cAAO;IAElB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,EAAE,WAAW,GAAG;QAAE,WAAW,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IAElD,MAAM,CAAC,YAAY;;;;MAIlB;gBAEW,KAAK,EAAE,KAAK;IASxB,WAAW,aAKV;IAED,YAAY,aAOX;IAED,aAAa,aAOZ;IAED,YAAY;;eAWX;IAED,MAAM;CAmNP;AAED,eAAe,QAAQ,CAAA;AACvB,YAAY,EAAE,aAAa,EAAE,CAAA"}
@@ -1,2 +1,2 @@
1
- import{__extends as e,__rest as o,__assign as n}from'./../ext/tslib/tslib.es6.js';import t,{cloneElement as r,createElement as i,Component as l}from"react";import{Button as p}from"../Button/Button.js";import a from"../FocusGroup/FocusGroup.js";import c from"../ItemList/ItemList.js";import u from"../ItemList/ItemListController.js";import"../ItemList/ItemListItem.js";import s from"../Menu/Menu.js";import{Popover as f}from"../Popover/Popover.js";import{generateId as m,cloneChildren as d}from"../utils.js";import v,{ITEM_DISPLAY_NAME as b}from"./Item.js";import g,{LINK_DISPLAY_NAME as h}from"./Link.js";var O=function(l){function O(e){var o=l.call(this,e)||this;return Object.defineProperty(o,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"itemList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"popover",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"openPopover",{enumerable:!0,configurable:!0,writable:!0,value:function(){o.props.onOpen&&o.props.onOpen(),o.setState({isPopoverOpen:!0})}}),Object.defineProperty(o,"closePopover",{enumerable:!0,configurable:!0,writable:!0,value:function(){o.props.onClose&&o.props.onClose(),o.props.forceOpen||o.setState({isPopoverOpen:!1})}}),Object.defineProperty(o,"togglePopover",{enumerable:!0,configurable:!0,writable:!0,value:function(){o.setState({preventBlur:!1}),o.state.isPopoverOpen?o.closePopover():o.openPopover()}}),Object.defineProperty(o,"handleSelect",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var t=n.node;o.props.closeOnSelect&&(o.itemList.clearHighlightedIndex(),o.closePopover(),o.popover.focusAnchor()),"A"===t.tagName&&"click"!==event.type?t.click():o.props.onSelect&&o.props.onSelect(e)}}),o.state={isPopoverOpen:e.defaultOpen||e.forceOpen,preventBlur:!1},o.id=m("dropdown"),o}return e(O,l),Object.defineProperty(O.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,l=this.props;l.forceOpen,l.closeOnSelect;var p=l.children;l.as,l.defaultOpen;var m=l.innerRef,v=l.keepInView,g=l.lockScrollWhileOpen,O=l.matchWidths,P=l.onClick;l.onClose,l.onKeyDown,l.onOpen;var w=l.onSearch,y=l.placement,j=l.popoverProps,I=l.renderTo,S=l.triggerElement,k=o(l,["forceOpen","closeOnSelect","children","as","defaultOpen","innerRef","keepInView","lockScrollWhileOpen","matchWidths","onClick","onClose","onKeyDown","onOpen","onSearch","placement","popoverProps","renderTo","triggerElement"]),B=this.state.isPopoverOpen,R=!k.icon&&!k.title,C=-1;return t.createElement(a,{onBlur:this.closePopover},(function(o){var l=o.requestBlur,a=o.setRef;return t.createElement(c,{ref:function(o){return e.itemList=o},onSelect:e.handleSelect},(function(o){var c=o.getItemByText,L=o.moveHighlightedIndex,x=o.selectHighlightedItem,D=o.setHighlightedIndex,E=o.stringSearch;return t.createElement(f,n({},j,{as:s,ref:function(o){e.popover=o},innerRef:function(o){a("".concat(e.id,"-popover"))(o)},role:"menu",tabIndex:-1,elevation:2,display:k.spinner?"none":void 0,onBlur:l,matchWidths:O,keepInView:v,lockScrollWhileOpen:g,placement:y,renderTo:I,open:B,onRequestClose:function(){e.closePopover(),e.popover.focusAnchor()},anchorElement:function(o){return t.createElement(u,null,(function(p){var u,s=p.getHighlightedItemId,f=n(((u={"aria-activedescendant":s(),"aria-expanded":B,"aria-haspopup":!0,"aria-owns":s(),cursor:k.disabled?"not-allowed":"pointer"})[R?"icon":"iconRight"]={name:B?"general.upCaret":"general.downCaret",size:"sm"},u.innerRef=function(n){"function"==typeof o.innerRef?o.innerRef(n):o.innerRef&&o.innerRef.current&&(o.innerRef.current=n),a("".concat(e.id,"-button"))(n),m&&m(n)},u.onBlur=function(o){e.state.preventBlur?e.setState({preventBlur:!1}):l(o)},u.onClick=function(o){e.togglePopover(),B||e.popover.focusAnchor(),P&&P(o)},u.onKeyDown=function(n){switch(o.onKeyDown(n),n.key){case"ArrowUp":n.preventDefault(),B?L(-1):(e.openPopover(),setTimeout((function(){L(-1)})));break;case"ArrowDown":n.preventDefault(),B?L(1):(e.openPopover(),setTimeout((function(){L(1)})));break;case"Enter":B&&(n.preventDefault(),x());break;case" ":n.preventDefault(),e.togglePopover();break;default:w?w(n):E(n).then((function(e){var o=c(e);o&&D(o.props.index)}))}},u.onMouseDown=function(){e.setState({preventBlur:!0})},u.tabIndex=0,u.title=R?"arrow down":k.title,u),k);return t.isValidElement(S)?r(S,f):i(S,f)}))}}),d(p,(function(e){return e.type.displayName===b||e.type.displayName===h?{index:++C}:{}})))}))}))}}),Object.defineProperty(O,"Item",{enumerable:!0,configurable:!0,writable:!0,value:v}),Object.defineProperty(O,"Link",{enumerable:!0,configurable:!0,writable:!0,value:g}),Object.defineProperty(O,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{closeOnSelect:!0,defaultOpen:!1,triggerElement:p}}),O}(l);export{O as default};
1
+ import{__extends as e,__rest as o,__assign as t}from'./../ext/tslib/tslib.es6.js';import r,{cloneElement as n,createElement as i,Component as l}from"react";import{Button as a}from"../Button/Button.js";import p from"../FocusGroup/FocusGroup.js";import c from"../ItemList/ItemList.js";import s from"../ItemList/ItemListController.js";import"../ItemList/ItemListItem.js";import u from"../Menu/Menu.js";import{Popover as f}from"../Popover/Popover.js";import{generateId as m,cloneChildren as d}from"../utils.js";import v,{ITEM_DISPLAY_NAME as b}from"./Item.js";import g,{LINK_DISPLAY_NAME as h}from"./Link.js";var O=function(l){function O(e){var o=l.call(this,e)||this;return Object.defineProperty(o,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"itemList",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"popover",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(o,"openPopover",{enumerable:!0,configurable:!0,writable:!0,value:function(){o.props.onOpen&&o.props.onOpen(),o.setState({isPopoverOpen:!0})}}),Object.defineProperty(o,"closePopover",{enumerable:!0,configurable:!0,writable:!0,value:function(){o.props.onClose&&o.props.onClose(),o.props.forceOpen||o.setState({isPopoverOpen:!1})}}),Object.defineProperty(o,"togglePopover",{enumerable:!0,configurable:!0,writable:!0,value:function(){o.setState({preventBlur:!1}),o.state.isPopoverOpen?o.closePopover():o.openPopover()}}),Object.defineProperty(o,"handleSelect",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t){var r=t.node;o.props.closeOnSelect&&(o.itemList.clearHighlightedIndex(),o.closePopover(),o.popover.focusAnchor()),"A"===r.tagName&&"click"!==event.type?r.click():o.props.onSelect&&o.props.onSelect(e)}}),o.state={isPopoverOpen:e.defaultOpen||e.forceOpen||!1,preventBlur:!1},o.id=m("dropdown"),o}return e(O,l),Object.defineProperty(O.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,l=this.props;l.forceOpen,l.closeOnSelect;var a=l.children;l.as,l.defaultOpen;var m=l.innerRef,v=l.keepInView,g=l.lockScrollWhileOpen,O=l.matchWidths,P=l.onClick;l.onClose,l.onKeyDown,l.onOpen;var w=l.onSearch,y=l.placement,I=l.popoverProps,j=l.renderTo,S=l.triggerElement,k=l.triggerElementIsTapestryReact,R=void 0===k||k,B=o(l,["forceOpen","closeOnSelect","children","as","defaultOpen","innerRef","keepInView","lockScrollWhileOpen","matchWidths","onClick","onClose","onKeyDown","onOpen","onSearch","placement","popoverProps","renderTo","triggerElement","triggerElementIsTapestryReact"]),E=this.state.isPopoverOpen,C=!B.icon&&!B.title,L=-1;return r.createElement(p,{onBlur:this.closePopover},(function(o){var l=o.requestBlur,p=o.setRef;return r.createElement(c,{ref:function(o){return e.itemList=o},onSelect:e.handleSelect},(function(o){var c=o.getItemByText,k=o.moveHighlightedIndex,x=o.selectHighlightedItem,D=o.setHighlightedIndex,T=o.stringSearch;return r.createElement(f,t({},I,{as:u,ref:function(o){e.popover=o},innerRef:function(o){p("".concat(e.id,"-popover"))(o)},role:"menu",tabIndex:-1,elevation:2,display:B.spinner?"none":void 0,onBlur:l,matchWidths:O,keepInView:v,lockScrollWhileOpen:g,placement:y,renderTo:j,open:E,onRequestClose:function(){e.closePopover(),e.popover.focusAnchor()},anchorElement:function(o){return r.createElement(s,null,(function(a){var s,u=a.getHighlightedItemId,f=C?"arrow down":B.title,d=function(t){"function"==typeof o.innerRef?o.innerRef(t):o.innerRef&&o.innerRef.current&&(o.innerRef.current=t),p("".concat(e.id,"-button"))(t),m&&m(t)},v={"aria-activedescendant":u(),"aria-expanded":E,"aria-haspopup":!0,"aria-owns":u(),onBlur:function(o){e.state.preventBlur?e.setState({preventBlur:!1}):l(o)},onClick:function(o){e.togglePopover(),E||e.popover.focusAnchor(),P&&P(o)},onKeyDown:function(t){switch(o.onKeyDown(t),t.key){case"ArrowUp":t.preventDefault(),E?k(-1):(e.openPopover(),setTimeout((function(){k(-1)})));break;case"ArrowDown":t.preventDefault(),E?k(1):(e.openPopover(),setTimeout((function(){k(1)})));break;case"Enter":E&&(t.preventDefault(),x());break;case" ":t.preventDefault(),e.togglePopover();break;default:w?w(t):T(t).then((function(e){var o=c(e);o&&D(o.props.index)}))}},onMouseDown:function(){e.setState({preventBlur:!0})},tabIndex:0},b=((s={cursor:B.disabled?"not-allowed":"pointer"})[C?"icon":"iconRight"]={name:E?"general.upCaret":"general.downCaret",size:"sm"},s.innerRef=d,s.title=f,s),g=t(t({},I&&"id"in I?{"aria-controls":I.id}:void 0),{ref:d}),h=t(t(t({},v),R?b:g),B);return r.isValidElement(S)?n(S,h):i(S,h)}))}}),d(a,(function(e){return e.type.displayName===b||e.type.displayName===h?{index:++L}:{}})))}))}))}}),Object.defineProperty(O,"Item",{enumerable:!0,configurable:!0,writable:!0,value:v}),Object.defineProperty(O,"Link",{enumerable:!0,configurable:!0,writable:!0,value:g}),Object.defineProperty(O,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{closeOnSelect:!0,defaultOpen:!1,triggerElement:a}}),O}(l);export{O as default};
2
2
  //# sourceMappingURL=Dropdown.js.map
@@ -14,6 +14,7 @@ export type PopoverProps<E = any> = StyleProps & {
14
14
  onRequestClose?: () => void;
15
15
  open: boolean;
16
16
  placement?: Placement;
17
+ refAsInnerRef?: boolean;
17
18
  relativeTo?: any;
18
19
  renderTo?: HTMLElement | string;
19
20
  shouldFlip?: boolean;
@@ -65,6 +66,7 @@ export declare const Popover: React.ForwardRefExoticComponent<Pick<React.CSSProp
65
66
  onRequestClose?: () => void;
66
67
  open: boolean;
67
68
  placement?: Placement;
69
+ refAsInnerRef?: boolean;
68
70
  relativeTo?: any;
69
71
  renderTo?: HTMLElement | string;
70
72
  shouldFlip?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAa/B,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG;IAK/C,aAAa,EACT,KAAK,CAA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.js";import{Portal as u}from"../Portal/Portal.js";import{useThemeProps as i}from"../system/utils.js";import{lockScroll as c}from"../utils.js";import f from"./rewireTabOrder.js";import{getFixedParent as l,getModifiers as s}from"./utils.js";var p=o.forwardRef((function(p,m){var a=p.anchorElement,d=p.as,v=void 0===d?t:d,R=p.innerRef,h=p.keepInView,y=void 0===h||h,w=p.lockScrollWhileOpen,E=p.matchWidths,j=p.offset,I=void 0===j?8:j,D=p.open,K=p.onKeyDown,k=p.onRequestClose,x=p.placement,T=void 0===x?"bottom":x,W=p.relativeTo,b=p.renderTo,P=p.shouldFlip,z=void 0!==P&&P,F=e(p,["anchorElement","as","innerRef","keepInView","lockScrollWhileOpen","matchWidths","offset","open","onKeyDown","onRequestClose","placement","relativeTo","renderTo","shouldFlip"]),O=i("popover",F),S=O.zIndex,V=void 0===S?1e4:S,q=e(O,["zIndex"]),B=o.useRef(null),C=o.useRef(null),g=o.useRef(null),A=o.useRef(null),H=o.useState(b),N=H[0],_=H[1],G=function(){C.current&&(C.current.destroy(),C.current=null),A.current&&(A.current(),A.current=null),g.current&&(g.current(),g.current=null)},J=function(e){"Escape"===e.key&&k&&(D&&e.nativeEvent.stopImmediatePropagation(),k()),K&&K(e)};return o.useEffect((function(){return function(){!1===D&&G()}}),[D]),o.useEffect((function(){D&&C.current&&C.current.update()})),o.useEffect((function(){void 0===N&&a&&_(l(a))}),[a]),o.useImperativeHandle(m,(function(){return{focusAnchor:function(){B.current&&B.current.focus&&B.current.focus()}}})),o.createElement(u,{renderTo:N},"function"==typeof a?a({innerRef:function(e){return B.current=e},onKeyDown:J}):o.cloneElement(a,{innerRef:function(e){var n;B.current=e,"function"==typeof a.props.innerRef?a.props.innerRef(e):(null===(n=a.props.innerRef)||void 0===n?void 0:n.current)&&(a.props.innerRef.current=e)},onKeyDown:function(e){J(e),a.props.onKeyDown&&a.props.onKeyDown(e)}}),D?o.createElement(v,n({innerRef:function(e){if(e){if(null===C.current){var n=W?W.current||W:B.current;C.current=r(n,e,{modifiers:s({keepInView:y,matchWidths:E,offset:I,shouldFlip:z}),placement:T}),A.current&&A.current(),A.current=f(e),w&&(g.current&&g.current(),g.current=c(e))}}else G();"function"==typeof R?R(e):(null==R?void 0:R.current)&&(R.current=e)},onKeyDown:function(e){J(e),K&&K(e)},style:{zIndex:V},width:"auto"},q)):null)}));p.displayName="Popover";export{p as Popover};
1
+ import{__rest as e,__assign as r}from'./../ext/tslib/tslib.es6.js';import{createPopper as n}from"@popperjs/core";import*as o from"react";import{Box as t}from"../Box/Box.js";import{Portal as u}from"../Portal/Portal.js";import{useThemeProps as c}from"../system/utils.js";import{lockScroll as i}from"../utils.js";import f from"./rewireTabOrder.js";import{getFixedParent as l,getModifiers as s}from"./utils.js";var p=o.forwardRef((function(p,a){var m,d,v=p.anchorElement,h=p.as,y=void 0===h?t:h,w=p.innerRef,R=p.keepInView,E=void 0===R||R,I=p.lockScrollWhileOpen,j=p.matchWidths,D=p.offset,K=void 0===D?8:D,k=p.open,x=p.onKeyDown,T=p.onRequestClose,W=p.placement,b=void 0===W?"bottom":W,P=p.relativeTo,z=p.renderTo,A=p.shouldFlip,F=void 0!==A&&A,O=p.refAsInnerRef,S=void 0===O||O,V=e(p,["anchorElement","as","innerRef","keepInView","lockScrollWhileOpen","matchWidths","offset","open","onKeyDown","onRequestClose","placement","relativeTo","renderTo","shouldFlip","refAsInnerRef"]),q=c("popover",V),B=q.zIndex,C=void 0===B?1e4:B,g=e(q,["zIndex"]),H=o.useRef(null),N=o.useRef(null),_=o.useRef(null),G=o.useRef(null),J=o.useState(z),L=J[0],M=J[1],Q=function(){N.current&&(N.current.destroy(),N.current=null),G.current&&(G.current(),G.current=null),_.current&&(_.current(),_.current=null)},U=function(e){"Escape"===e.key&&T&&(k&&e.nativeEvent.stopImmediatePropagation(),T()),x&&x(e)};o.useEffect((function(){return function(){!1===k&&Q()}}),[k]),o.useEffect((function(){k&&N.current&&N.current.update()})),o.useEffect((function(){void 0===L&&v&&M(l(v))}),[v]),o.useImperativeHandle(a,(function(){return{focusAnchor:function(){H.current&&H.current.focus&&H.current.focus()}}}));var X=S?"innerRef":"ref";return o.createElement(u,{renderTo:L},"function"==typeof v?v(((m={onKeyDown:U})[X]=function(e){return H.current=e},m)):o.cloneElement(v,((d={onKeyDown:function(e){U(e),v.props.onKeyDown&&v.props.onKeyDown(e)}})[X]=function(e){var r;H.current=e,"function"==typeof v.props[X]?v.props[X](e):(null===(r=v.props[X])||void 0===r?void 0:r.current)&&(v.props[X].current=e)},d)),k?o.createElement(y,r({innerRef:function(e){if(e){if(null===N.current){var r=P?P.current||P:H.current;N.current=n(r,e,{modifiers:s({keepInView:E,matchWidths:j,offset:K,shouldFlip:F}),placement:b}),G.current&&G.current(),G.current=f(e),I&&(_.current&&_.current(),_.current=i(e))}}else Q();"function"==typeof w?w(e):(null==w?void 0:w.current)&&(w.current=e)},onKeyDown:function(e){U(e),x&&x(e)},style:{zIndex:C},width:"auto"},g)):null)}));p.displayName="Popover";export{p as Popover};
2
2
  //# sourceMappingURL=Popover.js.map
@@ -1,2 +1,2 @@
1
- import{__extends as e,__assign as t,__rest as r,__spreadArray as o}from'./../ext/tslib/tslib.es6.js';import{Global as n}from"@emotion/react";import i from"lodash/camelCase";import l from"lodash/snakeCase";import a,{Children as u,Fragment as c,PureComponent as d}from"react";import{Button as s}from"../Button/Button.js";import m from"../DragDrop/DragDrop.js";import f from"../HeadingUppercase/HeadingUppercase.js";import{useHover as p}from"../hooks/use-hover.js";import"mousetrap";import"../hooks/use-measure.js";import g from"../Pagination/Pagination.js";import{Spinner as b}from"../Spinner/Spinner.js";import{StackView as h}from"../StackView/StackView.js";import v from"../Summary/Summary.js";import{reorderArray as S,range as w}from"../utils.js";import y from"../vendor/react-measure/Measure.js";import"../vendor/react-measure/Viewport.js";import C from"./AvatarCell.js";import j from"./BodyCell.js";import R from"./BodyInnerCell.js";import P from"./BodyRow.js";import O from"./CheckboxCell.js";import k from"./ColumnPicker.js";import I from"./DateCell.js";import D from"./DragCell.js";import H from"./DragHandle.js";import x from"./HeaderCell.js";import E from"./HeaderInnerCell.js";import A from"./SubRowToggleCell.js";import T from"./TableBase.js";import W from"./TableWrapper.js";var M="undefined"!=typeof window&&window.CSS&&window.CSS.supports;function B(e){var t=e.children,r=p(),o=r.hover;return t({bindHover:r.hoverProps,isHover:o})}var z=function(d){function p(e){var r=d.call(this,e)||this;return Object.defineProperty(r,"handleSortStart",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.setState({isSorting:!0})}}),Object.defineProperty(r,"handleSortEnd",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.source,o=e.destination;r.setState({isSorting:!1}),r.props.onRowSort(S({endIndex:o.index,list:r.props.data,startIndex:t.index}))}}),Object.defineProperty(r,"handleColumnSort",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var o=r.getDefaultSort(r.props);r.setState((function(n){var i=t({},n.currentSort);if(i.columnId===e?i.direction=p.getOppositeSortDirection(i.direction):(i.columnId=e,i.direction=r.props.defaultSortDirection),i.order=r.getSortOrder({columnId:i.columnId,direction:i.direction}),r.props.onColumnSort){var l=i.columnId?i:o;r.props.onColumnSort(l)}return{currentSort:i}}))}}),Object.defineProperty(r,"getBodyCellMouseHandlers",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.props.highlightColumnOnHover?{onMouseOut:function(){r.setState({highlightedColumnIndex:null})},onMouseOver:function(){r.setState({highlightedColumnIndex:e})}}:{}}}),Object.defineProperty(r,"isAnySubRowOpen",{enumerable:!0,configurable:!0,writable:!0,value:function(){return r.state.openSubRowIndices.length>0}}),Object.defineProperty(r,"handleSubRowToggleAll",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.setState({openSubRowIndices:r.state.openSubRowIndices.length>0?[]:w(0,r.props.data.length)})}}),Object.defineProperty(r,"isSubRowOpen",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.state.openSubRowIndices.indexOf(e)>-1}}),Object.defineProperty(r,"handleSubRowToggle",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.setState((function(t){var r=o([],t.openSubRowIndices,!0),n=r.indexOf(e);return n>-1?r.splice(n,1):r.push(e),{openSubRowIndices:r}}))}}),Object.defineProperty(r,"handleMeasure",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=r.getColumns(),n=(t.length-1)/2,i=0;r.props.subRowData&&(i+=48),r.props.onRowSort&&(i+=48);var l=e?t.map((function(t,r){var o=e["".concat(r,"-0")];return o?o.height:0})):[],a=e?Math.max.apply(Math,o(o([],l,!0),[r.props.compactHeader?32:48],!1)):null,u=e?Object.keys(e).reduce((function(r,o){var n=o.split("-")[0],i=e[o],l=t[n];if(l){var a=l.width||i.width;r[n]||(r[n]=[]),r[n].push(a)}return r}),[]).map((function(e){return Math.max.apply(Math,e)})):[],c=e?u.reduce((function(e,t,r){return e+t}),i):null,d=M?t.reduce((function(e,t,r){return t.sticky&&(r<n?e.left+=u[r]:e.right+=u[r]),e}),{left:i,right:0}):{left:0,right:0};r.setState({columnWidths:u,getLeftOffset:function(e,t){return M&&e.sticky&&t<n?u.reduce((function(e,r,o){return o<t?e+r:e}),i)||i:void 0},getRightOffset:function(e,t){return M&&e.sticky&&t>=n?u.reduce((function(e,r,o){return o>t?e+r:e}),0)||0:void 0},headerHeight:a,headerHeights:l,offsets:d,rowWidth:c})}}),r.state={columnWidths:[],currentSort:r.getDefaultSort(e),getLeftOffset:function(){return null},getRightOffset:function(){return null},headerHeight:-1,headerHeights:[],highlightedColumnIndex:null,isSorting:!1,offsets:{left:0,right:0},openSubRowIndices:[],rowWidth:-1},r}return e(p,d),Object.defineProperty(p,"getOppositeSortDirection",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===p.ASC?p.DESC:p.ASC}}),Object.defineProperty(p,"getIconDirection",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===p.ASC?"general.upCaret":"general.downCaret"}}),Object.defineProperty(p.prototype,"getSortOrder",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.columnId,r=e.direction;return"".concat(r===p.ASC?"":"-").concat(l(t))}}),Object.defineProperty(p.prototype,"parseSortOrder",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t="-"===e[0];return{columnId:i(t?e.substring(1):e),direction:t?p.DESC:p.ASC}}}),Object.defineProperty(p.prototype,"getDefaultSort",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=e.defaultSortColumnId,o=e.defaultSortDirection,n=e.defaultSortOrder,i=n?this.parseSortOrder(n):{columnId:r,direction:o};return t(t({},i),{order:this.getSortOrder(i)})}}),Object.defineProperty(p.prototype,"getColumns",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return this.props.columns.filter((function(t){return"object"==typeof t&&null!=t&&(t.alwaysVisible||-1===e.props.hiddenColumnIds.indexOf(t.id))})).map((function(e){e.alwaysVisible;var t=e.cell,o=e.divider,n=e.header,i=e.id,l=e.label,a=e.sortable,u=e.sticky,c=e.subRowCell,d=e.truncate,s=e.vertical,m=e.width;return{cell:t,columnProps:r(e,["alwaysVisible","cell","divider","header","id","label","sortable","sticky","subRowCell","truncate","vertical","width"]),divider:o,header:n,id:i,label:l,sortable:a,sticky:u,subRowCell:c,truncate:d,vertical:s,width:m}}))}}),Object.defineProperty(p.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,i=this.props,l=i.caption;i.children;var d=i.columnDividers;i.columns;var S=i.compactHeader,w=i.currentPage,C=i.data,O=void 0===C?[]:C;i.defaultSortColumnId;var k=i.defaultSortDirection;i.defaultSortOrder;var I=i.empty,M=i.getRowLink,z=i.headerColor;i.hiddenColumnIds,i.highlightColumnOnHover,i.innerRef;var V=i.keyboardShortcuts;i.layout;var L=i.loading,U=i.loadingTitle,K=i.minHeight,N=i.minRowHeight;i.onColumnSort;var _=i.onPageChange,q=i.onRowSort,F=i.rowDividers,G=i.subRowData,J=i.totalPages,Q=r(i,["caption","children","columnDividers","columns","compactHeader","currentPage","data","defaultSortColumnId","defaultSortDirection","defaultSortOrder","empty","getRowLink","headerColor","hiddenColumnIds","highlightColumnOnHover","innerRef","keyboardShortcuts","layout","loading","loadingTitle","minHeight","minRowHeight","onColumnSort","onPageChange","onRowSort","rowDividers","subRowData","totalPages"]),X=this.state,Y=X.highlightedColumnIndex,Z=X.currentSort,$=X.isSorting,ee=X.headerHeight,te=X.columnWidths,re=X.rowWidth,oe=X.offsets,ne=X.getLeftOffset,ie=X.getRightOffset,le=this.getColumns(),ae=L||O.length<=0;return a.createElement(W,t({},Q,{position:"relative"}),a.createElement(n,{styles:{html:{userSelect:this.state.isSorting?"none":null}}}),ae?a.createElement(h,{grow:1,alignment:"center",distribution:"center",minHeight:K,paddingVertical:8},L?a.createElement(v,{image:a.createElement(b,{size:"xl",color:"primary"}),title:U}):I):a.createElement(y,{updateOnMeasure:!1,onMeasure:this.handleMeasure},(function(r){var n=r.measureRef,i=u.toArray(o([G&&a.createElement(A,{toggled:e.isAnySubRowOpen(),height:ee+"px",onClick:e.handleSubRowToggleAll}),q&&a.createElement(D,{role:"columnheader",height:ee+"px",backgroundColor:"inherit"})],le.map((function(r,o){return a.createElement(B,{key:o},(function(i){var l=i.bindHover,u=i.isHover,c=te[o],d=t(t(t({},r.columnProps),l),{cursor:r.sortable?"pointer":"default",justifyContent:r.vertical?"start":r.columnProps.justifyContent,onClick:function(t){r.sortable&&e.handleColumnSort(r.id),r.columnProps&&r.columnProps.onClick&&r.columnProps.onClick(t)},position:r.sticky?"sticky":"relative",style:{height:r.vertical?ee+16:ee,left:ne(r,o),right:ie(r,o),width:c},zIndex:r.sticky?35:r.columnProps.zIndex});return r.sortable&&(d["aria-sort"]=Z.columnId===r.id?"ASC"===Z.direction?"ascending":"descending":"none"),a.createElement(x,t({},d),a.createElement(E,{innerRef:n("".concat(o,"-0")),height:S?4:6,transform:r.vertical&&"translate(".concat(r.width/2,"px, ").concat(16,"px) rotate(-90deg)")},"string"==typeof r.header?a.createElement(f,{truncate:!0,color:"grey-7",fontSize:S?"11px":"12px",cursor:r.sortable?"pointer":"default"},r.header):"function"==typeof r.header?r.header(o):r.header,r.sortable&&a.createElement(s,{title:"sort table",theme:!1,icon:{name:p.getIconDirection(Z.columnId===r.id?Z.direction:k)},size:"xs",opacity:Z.columnId===r.id?1:u?.35:0})))}))})),!0)),g=function(r,o){var i=o.subRowProps,l=void 0===i?{}:i,c=o.shouldRenderSubRowData,s=o.shouldRenderSubRowToggle,m=void 0!==s&&s;return Object.keys(r).map((function(o,i){var s=e.isSubRowOpen(i),f=r[o],p={index:i,key:i,keyboardShortcuts:V,onRowSort:q,row:f,rowIndex:i,style:{minWidth:re}},b={};if(M){var h=function(){var e=M(f);"string"==typeof e&&(window.location=e)};b.tabIndex=0,b.role="link",b.cursor="pointer",b.focus={backgroundColor:"hsla(0,0%,97%,1)"},b.hover={backgroundColor:"hsla(0,0%,97%,1)"},b.onClick=h,b.onKeyDown=function(e){"Enter"===e.key&&h()}}return $&&(b.pointerEvents="none"),(F&&0!==i||m)&&(b.borderTopWidth=1),[a.createElement(P,t({},p,b,l),(function(r){var o=r.isRowHovered,l=r.dragHandleProps;return u.toArray([G&&(m?a.createElement(A,{contentsHidden:!0}):a.createElement(A,{toggled:s,rowIndex:i,onClick:function(t){t.stopPropagation(),e.handleSubRowToggle(i)}})),q&&a.createElement(D,t({},l),a.createElement(H,null)),le.map((function(r,l){var u=te[l],c=m&&void 0!==r.subRowCell?r.subRowCell:r.cell;return a.createElement(j,t({key:l},r.columnProps,e.getBodyCellMouseHandlers(l),{position:r.sticky?"sticky":void 0,justifyContent:r.vertical?"center":r.columnProps.justifyContent,minHeight:m?5:N,borderColor:"grey-3",borderLeftWidth:!1!==r.divider&&(d&&(q||0!==l)?1:void 0),backgroundColor:Y===l?"grey-0":"inherit",color:m?"grey-9":"black",zIndex:r.sticky?35:void 0,style:t({left:ne(r,l),right:ie(r,l),width:u},r.columnProps.style)}),a.createElement(R,{innerRef:void 0===r.width?n("".concat(l,"-").concat(i+1),{formula:function(e){return{width:e.offsetWidth}}}):null,column:r,justifyContent:r.vertical?"center":r.columnProps.justifyContent},c&&("string"==typeof c?f[c]:c(f,{columnIndex:l,isRowHovered:o,rowIndex:i}))))}))])})),c&&s?g(G(f),{shouldRenderSubRowData:!1,shouldRenderSubRowToggle:!0,subRowProps:{backgroundColor:"hsla(0,0%,99%,1)"}}):null]}))},b=function(e){return a.createElement(T,t({},e,{columnWidths:o([G&&48,q&&48],te,!0).filter(Boolean),rowWidth:re,minHeight:K,offsets:oe,caption:l,header:i,headerColor:z,headerHeight:ee,body:g(O,{shouldRenderSubRowData:!!G})}))};return q?a.createElement(m.Provider,{onDragStart:e.handleSortStart,onDragEnd:e.handleSortEnd},a.createElement(m.Droppable,{droppableId:"table"},(function(e){return a.createElement(c,null,b(t({innerRef:e.innerRef},e.droppableProps)),e.placeholder)}))):b({})})),!ae&&a.createElement(g,{currentPage:w,totalPages:J,onPageChange:_,position:"sticky",bottom:0,zIndex:35,marginTop:"-1px",backgroundColor:"surface",borderTopWidth:1,borderTopColor:"grey-3",css:{"@media print":{position:"relative"}}}))}}),Object.defineProperty(p,"ColumnPicker",{enumerable:!0,configurable:!0,writable:!0,value:k}),Object.defineProperty(p,"AvatarCell",{enumerable:!0,configurable:!0,writable:!0,value:C}),Object.defineProperty(p,"CheckboxCell",{enumerable:!0,configurable:!0,writable:!0,value:O}),Object.defineProperty(p,"DateCell",{enumerable:!0,configurable:!0,writable:!0,value:I}),Object.defineProperty(p,"ASC",{enumerable:!0,configurable:!0,writable:!0,value:"ASC"}),Object.defineProperty(p,"DESC",{enumerable:!0,configurable:!0,writable:!0,value:"DESC"}),Object.defineProperty(p,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{currentPage:0,defaultSortColumnId:null,defaultSortDirection:p.ASC,defaultSortOrder:null,empty:"No results",headerColor:"grey-0",hiddenColumnIds:[],minHeight:48,minRowHeight:8,onPageChange:function(){return null},rowDividers:!0,totalPages:0}}),p}(d);export{z as default};
1
+ import{__extends as e,__assign as t,__rest as r,__spreadArray as o}from'./../ext/tslib/tslib.es6.js';import{Global as n}from"@emotion/react";import i from"lodash/camelCase";import l from"lodash/snakeCase";import a,{Children as u,Fragment as c,PureComponent as d}from"react";import{Button as s}from"../Button/Button.js";import m from"../DragDrop/DragDrop.js";import f from"../HeadingUppercase/HeadingUppercase.js";import{useHover as p}from"../hooks/use-hover.js";import"mousetrap";import"../hooks/use-measure.js";import g from"../Pagination/Pagination.js";import{Spinner as b}from"../Spinner/Spinner.js";import{StackView as h}from"../StackView/StackView.js";import v from"../Summary/Summary.js";import{reorderArray as S,range as w}from"../utils.js";import y from"../vendor/react-measure/Measure.js";import"../vendor/react-measure/Viewport.js";import C from"./AvatarCell.js";import j from"./BodyCell.js";import R from"./BodyInnerCell.js";import P from"./BodyRow.js";import O from"./CheckboxCell.js";import k from"./ColumnPicker.js";import I from"./DateCell.js";import D from"./DragCell.js";import H from"./DragHandle.js";import x from"./HeaderCell.js";import E from"./HeaderInnerCell.js";import A from"./SubRowToggleCell.js";import T from"./TableBase.js";import W from"./TableWrapper.js";var M="undefined"!=typeof window&&window.CSS&&window.CSS.supports;function B(e){var t=e.children,r=p(),o=r.hover;return t({bindHover:r.hoverProps,isHover:o})}var z=function(d){function p(e){var r=d.call(this,e)||this;return Object.defineProperty(r,"handleSortStart",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.setState({isSorting:!0})}}),Object.defineProperty(r,"handleSortEnd",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.source,o=e.destination;r.setState({isSorting:!1}),r.props.onRowSort(S({endIndex:o.index,list:r.props.data,startIndex:t.index}))}}),Object.defineProperty(r,"handleColumnSort",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var o=r.getDefaultSort(r.props);r.setState((function(n){var i=t({},n.currentSort);if(i.columnId===e?i.direction=p.getOppositeSortDirection(i.direction):(i.columnId=e,i.direction=r.props.defaultSortDirection),i.order=r.getSortOrder({columnId:i.columnId,direction:i.direction}),r.props.onColumnSort){var l=i.columnId?i:o;r.props.onColumnSort(l)}return{currentSort:i}}))}}),Object.defineProperty(r,"getBodyCellMouseHandlers",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.props.highlightColumnOnHover?{onMouseOut:function(){r.setState({highlightedColumnIndex:null})},onMouseOver:function(){r.setState({highlightedColumnIndex:e})}}:{}}}),Object.defineProperty(r,"isAnySubRowOpen",{enumerable:!0,configurable:!0,writable:!0,value:function(){return r.state.openSubRowIndices.length>0}}),Object.defineProperty(r,"handleSubRowToggleAll",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.setState({openSubRowIndices:r.state.openSubRowIndices.length>0?[]:w(0,r.props.data.length)})}}),Object.defineProperty(r,"isSubRowOpen",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.state.openSubRowIndices.indexOf(e)>-1}}),Object.defineProperty(r,"handleSubRowToggle",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.setState((function(t){var r=o([],t.openSubRowIndices,!0),n=r.indexOf(e);return n>-1?r.splice(n,1):r.push(e),{openSubRowIndices:r}}))}}),Object.defineProperty(r,"handleMeasure",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=r.getColumns(),n=(t.length-1)/2,i=0;r.props.subRowData&&(i+=48),r.props.onRowSort&&(i+=48);var l=e?t.map((function(t,r){var o=e["".concat(r,"-0")];return o?o.height:0})):[],a=e?Math.max.apply(Math,o(o([],l,!0),[r.props.compactHeader?32:48],!1)):null,u=e?Object.keys(e).reduce((function(r,o){var n=o.split("-")[0],i=e[o],l=t[n];if(l){var a=l.width||i.width;r[n]||(r[n]=[]),r[n].push(a)}return r}),[]).map((function(e){return Math.max.apply(Math,e)})):[],c=e?u.reduce((function(e,t,r){return e+t}),i):null,d=M?t.reduce((function(e,t,r){return t.sticky&&(r<n?e.left+=u[r]:e.right+=u[r]),e}),{left:i,right:0}):{left:0,right:0};r.setState({columnWidths:u,getLeftOffset:function(e,t){return M&&e.sticky&&t<n?u.reduce((function(e,r,o){return o<t?e+r:e}),i)||i:void 0},getRightOffset:function(e,t){return M&&e.sticky&&t>=n?u.reduce((function(e,r,o){return o>t?e+r:e}),0)||0:void 0},headerHeight:a,headerHeights:l,offsets:d,rowWidth:c})}}),r.state={columnWidths:[],currentSort:r.getDefaultSort(e),getLeftOffset:function(){return null},getRightOffset:function(){return null},headerHeight:-1,headerHeights:[],highlightedColumnIndex:null,isSorting:!1,offsets:{left:0,right:0},openSubRowIndices:[],rowWidth:-1},r}return e(p,d),Object.defineProperty(p,"getOppositeSortDirection",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===p.ASC?p.DESC:p.ASC}}),Object.defineProperty(p,"getIconDirection",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===p.ASC?"general.upCaret":"general.downCaret"}}),Object.defineProperty(p.prototype,"getSortOrder",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.columnId,r=e.direction;return"".concat(r===p.ASC?"":"-").concat(l(t))}}),Object.defineProperty(p.prototype,"parseSortOrder",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t="-"===e[0];return{columnId:i(t?e.substring(1):e),direction:t?p.DESC:p.ASC}}}),Object.defineProperty(p.prototype,"getDefaultSort",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=e.defaultSortColumnId,o=e.defaultSortDirection,n=e.defaultSortOrder,i=n?this.parseSortOrder(n):{columnId:r,direction:o};return t(t({},i),{order:this.getSortOrder(i)})}}),Object.defineProperty(p.prototype,"getColumns",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return this.props.columns.filter((function(t){return"object"==typeof t&&null!=t&&(t.alwaysVisible||-1===e.props.hiddenColumnIds.indexOf(t.id))})).map((function(e){e.alwaysVisible;var t=e.cell,o=e.divider,n=e.header,i=e.id,l=e.label,a=e.sortable,u=e.sticky,c=e.subRowCell,d=e.truncate,s=e.vertical,m=e.width;return{cell:t,columnProps:r(e,["alwaysVisible","cell","divider","header","id","label","sortable","sticky","subRowCell","truncate","vertical","width"]),divider:o,header:n,id:i,label:l,sortable:a,sticky:u,subRowCell:c,truncate:d,vertical:s,width:m}}))}}),Object.defineProperty(p.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,i=this.props,l=i.caption;i.children;var d=i.columnDividers;i.columns;var S=i.compactHeader,w=i.currentPage,C=i.data,O=void 0===C?[]:C;i.defaultSortColumnId;var k=i.defaultSortDirection;i.defaultSortOrder;var I=i.empty,M=i.getRowLink,z=i.headerColor;i.hiddenColumnIds,i.highlightColumnOnHover,i.innerRef;var V=i.keyboardShortcuts;i.layout;var L=i.loading,U=i.loadingTitle,K=i.minHeight,N=i.minRowHeight;i.onColumnSort;var _=i.onPageChange,q=i.onRowSort,F=i.rowDividers,G=i.subRowData,J=i.totalPages,Q=r(i,["caption","children","columnDividers","columns","compactHeader","currentPage","data","defaultSortColumnId","defaultSortDirection","defaultSortOrder","empty","getRowLink","headerColor","hiddenColumnIds","highlightColumnOnHover","innerRef","keyboardShortcuts","layout","loading","loadingTitle","minHeight","minRowHeight","onColumnSort","onPageChange","onRowSort","rowDividers","subRowData","totalPages"]),X=this.state,Y=X.highlightedColumnIndex,Z=X.currentSort,$=X.isSorting,ee=X.headerHeight,te=X.columnWidths,re=X.rowWidth,oe=X.offsets,ne=X.getLeftOffset,ie=X.getRightOffset,le=this.getColumns(),ae=L||O.length<=0;return a.createElement(W,t({},Q,{position:"relative"}),a.createElement(n,{styles:{html:{userSelect:this.state.isSorting?"none":null}}}),ae?a.createElement(h,{grow:1,alignment:"center",distribution:"center",minHeight:K,paddingVertical:8},L?a.createElement(v,{image:a.createElement(b,{size:"xl",color:"primary"}),title:U}):I):a.createElement(y,{updateOnMeasure:!1,onMeasure:this.handleMeasure},(function(r){var n=r.measureRef,i=u.toArray(o([G&&a.createElement(A,{toggled:e.isAnySubRowOpen(),height:ee+"px",onClick:e.handleSubRowToggleAll}),q&&a.createElement(D,{role:"columnheader",height:ee+"px",backgroundColor:"inherit"})],le.map((function(r,o){return a.createElement(B,{key:o},(function(i){var l=i.bindHover,u=i.isHover,c=te[o],d=t(t(t({},r.columnProps),l),{cursor:r.sortable?"pointer":"default",justifyContent:r.vertical?"start":r.columnProps.justifyContent,onClick:function(t){r.sortable&&e.handleColumnSort(r.id),r.columnProps&&r.columnProps.onClick&&r.columnProps.onClick(t)},position:r.sticky?"sticky":"relative",style:{height:r.vertical?ee+16:ee,left:ne(r,o),right:ie(r,o),width:c},zIndex:r.sticky?35:r.columnProps.zIndex});return r.sortable&&(d["aria-sort"]=Z.columnId===r.id?"ASC"===Z.direction?"ascending":"descending":"none"),a.createElement(x,t({},d),a.createElement(E,{innerRef:n("".concat(o,"-0")),height:S?4:6,transform:r.vertical&&"translate(".concat(r.width/2,"px, ").concat(16,"px) rotate(-90deg)")},"string"==typeof r.header?a.createElement(f,{truncate:!0,color:"grey-7",fontSize:S?"11px":"12px",cursor:r.sortable?"pointer":"default"},r.header):"function"==typeof r.header?r.header(o):r.header,r.sortable&&a.createElement(s,{title:"sort table",theme:!1,icon:{name:p.getIconDirection(Z.columnId===r.id?Z.direction:k)},size:"xs",opacity:Z.columnId===r.id?1:u?.35:0})))}))})),!0)),g=function(r,o){var i=o.subRowProps,l=void 0===i?{}:i,c=o.shouldRenderSubRowData,s=o.shouldRenderSubRowToggle,m=void 0!==s&&s;return Object.keys(r).map((function(o,i){var s=e.isSubRowOpen(i),f=r[o],p={index:i,key:i,keyboardShortcuts:V,onRowSort:q,row:f,rowIndex:i,style:{minWidth:re}},b={};if(M){var h=function(){var e=M(f);"string"==typeof e&&(window.location=e)};b.tabIndex=0,b.role="link",b.cursor="pointer",b.focus={backgroundColor:"hsla(0,0%,97%,1)"},b.hover={backgroundColor:"hsla(0,0%,97%,1)"},b.onClick=h,b.onKeyDown=function(e){"Enter"===e.key&&h()}}return $&&(b.pointerEvents="none"),(F&&0!==i||m)&&(b.borderTopWidth=1),[a.createElement(P,t({},p,b,l),(function(r){var o=r.isRowHovered,l=r.dragHandleProps;return u.toArray([G&&(m?a.createElement(A,{contentsHidden:!0}):a.createElement(A,{toggled:s,rowIndex:i,onClick:function(t){t.stopPropagation(),e.handleSubRowToggle(i)}})),q&&a.createElement(D,t({},l),a.createElement(H,null)),le.map((function(r,l){var u=te[l],c=m&&void 0!==r.subRowCell?r.subRowCell:r.cell;return a.createElement(j,t({key:l},r.columnProps,e.getBodyCellMouseHandlers(l),{position:r.sticky?"sticky":void 0,justifyContent:r.vertical?"center":r.columnProps.justifyContent,minHeight:m?5:N,borderColor:"grey-3",borderLeftWidth:!1!==r.divider&&(d&&(q||0!==l)?1:void 0),backgroundColor:Y===l?"grey-0":"inherit",color:m?"grey-9":"foreground",zIndex:r.sticky?35:void 0,style:t({left:ne(r,l),right:ie(r,l),width:u},r.columnProps.style)}),a.createElement(R,{innerRef:void 0===r.width?n("".concat(l,"-").concat(i+1),{formula:function(e){return{width:e.offsetWidth}}}):null,column:r,justifyContent:r.vertical?"center":r.columnProps.justifyContent},c&&("string"==typeof c?f[c]:c(f,{columnIndex:l,isRowHovered:o,rowIndex:i}))))}))])})),c&&s?g(G(f),{shouldRenderSubRowData:!1,shouldRenderSubRowToggle:!0,subRowProps:{backgroundColor:"hsla(0,0%,99%,1)"}}):null]}))},b=function(e){return a.createElement(T,t({},e,{columnWidths:o([G&&48,q&&48],te,!0).filter(Boolean),rowWidth:re,minHeight:K,offsets:oe,caption:l,header:i,headerColor:z,headerHeight:ee,body:g(O,{shouldRenderSubRowData:!!G})}))};return q?a.createElement(m.Provider,{onDragStart:e.handleSortStart,onDragEnd:e.handleSortEnd},a.createElement(m.Droppable,{droppableId:"table"},(function(e){return a.createElement(c,null,b(t({innerRef:e.innerRef},e.droppableProps)),e.placeholder)}))):b({})})),!ae&&a.createElement(g,{currentPage:w,totalPages:J,onPageChange:_,position:"sticky",bottom:0,zIndex:35,marginTop:"-1px",backgroundColor:"surface",borderTopWidth:1,borderTopColor:"grey-3",css:{"@media print":{position:"relative"}}}))}}),Object.defineProperty(p,"ColumnPicker",{enumerable:!0,configurable:!0,writable:!0,value:k}),Object.defineProperty(p,"AvatarCell",{enumerable:!0,configurable:!0,writable:!0,value:C}),Object.defineProperty(p,"CheckboxCell",{enumerable:!0,configurable:!0,writable:!0,value:O}),Object.defineProperty(p,"DateCell",{enumerable:!0,configurable:!0,writable:!0,value:I}),Object.defineProperty(p,"ASC",{enumerable:!0,configurable:!0,writable:!0,value:"ASC"}),Object.defineProperty(p,"DESC",{enumerable:!0,configurable:!0,writable:!0,value:"DESC"}),Object.defineProperty(p,"defaultProps",{enumerable:!0,configurable:!0,writable:!0,value:{currentPage:0,defaultSortColumnId:null,defaultSortDirection:p.ASC,defaultSortOrder:null,empty:"No results",headerColor:"grey-0",hiddenColumnIds:[],minHeight:48,minRowHeight:8,onPageChange:function(){return null},rowDividers:!0,totalPages:0}}),p}(d);export{z as default};
2
2
  //# sourceMappingURL=Table.js.map
@@ -11,6 +11,7 @@ export type TooltipProps = StyleProps & {
11
11
  openDelay?: number;
12
12
  placement?: Placement;
13
13
  popoverProps?: object;
14
+ refAsInnerRef?: boolean;
14
15
  renderTo?: HTMLElement | string;
15
16
  title?: any;
16
17
  triggerOnFocus?: boolean;
@@ -61,6 +62,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<React.CSSProperties
61
62
  openDelay?: number;
62
63
  placement?: Placement;
63
64
  popoverProps?: object;
65
+ refAsInnerRef?: boolean;
64
66
  renderTo?: string | HTMLElement;
65
67
  title?: any;
66
68
  triggerOnFocus?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,KAQN,MAAM,OAAO,CAAA;AAId,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGzC,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IACtC,EAAE,CAAC,EAAE,EAAE,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AA;IAOvB,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IAK/B,KAAK,CAAC,EAAE,GAAG,CAAA;IAKX,cAAc,CAAC,EAAE,OAAO,CAAA;IAKxB,cAAc,CAAC,EAAE,OAAO,CAAA;IAMxB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqLD,wBAAkC"}
@@ -1,2 +1,2 @@
1
- import{__rest as e,__assign as o}from'./../ext/tslib/tslib.es6.js';import{token as n}from"@planningcenter/tapestry";import r from"mitt";import t,{forwardRef as u,useRef as i,useState as l,useEffect as c,useImperativeHandle as s,Children as m,cloneElement as p}from"react";import{Popover as a}from"../Popover/Popover.js";import"../system/colors/colors.js";import"polished";import{pageViewChange as f,composeEvents as d}from"../utils.js";import"lodash/includes";import{useThemeProps as v}from"../system/utils.js";import"../system/style-names.js";import"../system/default-theme.js";import"@emotion/react";import"../system/cxs.js";var T=r(),O=null,g=!1;var y=u((function(r,u){var y=v("tooltip",r),E=y.children,M=y.openDelay,P=void 0===M?500:M,I=y.closeDelay,L=void 0===I?300:I,h=y.defaultOpen,j=void 0!==h&&h,S=y.keepInView,_=void 0===S||S,x=y.placement,z=y.popoverProps,D=y.renderTo,w=y.title,F=y.triggerOnFocus,b=void 0===F||F,k=y.triggerOnHover,C=void 0===k||k,V=y.zIndex,H=void 0===V?1e4:V,N=e(y,["children","openDelay","closeDelay","defaultOpen","keepInView","placement","popoverProps","renderTo","title","triggerOnFocus","triggerOnHover","zIndex"]),B=i(!0),U=i(!1),A=i(null),q=i(null),G=l(j),J=G[0],K=G[1];c((function(){var e=f((function(e){return setTimeout((function(){return B.current=e}))}));return T.on("CLOSE_OPEN_TOOLTIPS",R),function(){T.off("CLOSE_OPEN_TOOLTIPS",R),clearTimeout(A.current),clearTimeout(q.current),e()}}),[]);var Q=function(){clearTimeout(q.current),q.current=null,K(!0)},R=function(){clearTimeout(A.current),A.current=null,K(!1)},W=function(){K(!J)};s(u,(function(){return{close:R,open:Q,toggle:W}})),c((function(){!1===b&&R()}),[b]),c((function(){!1===C&&R()}),[C]);var X=function(){clearTimeout(O),null===A.current&&(clearTimeout(q.current),q.current=null,!1===J&&(T.emit("CLOSE_OPEN_TOOLTIPS"),A.current=setTimeout((function(){return Q()}),g?0:P)))},Y=function(){g=!0,O=setTimeout((function(){g=!1}),500),null===q.current&&(clearTimeout(A.current),A.current=null,q.current=setTimeout((function(){return R()}),L))},Z=m.only(E),$=Z.props,ee=$.onFocus,oe=$.onBlur,ne=$.onMouseEnter,re=$.onMouseLeave,te=$.onMouseDown,ue=$.onMouseUp;return w?(b&&(N.onFocus=d((function(){B.current&&!U.current&&Q()}),ee),N.onBlur=d(R,oe),N.onMouseDown=d((function(){U.current=!0,R()}),te),N.onMouseUp=d((function(){U.current=!1}),ue)),C&&(N.onMouseEnter=d(X,ne),N.onMouseLeave=d(Y,re)),t.createElement(a,o({shouldFlip:!0,paddingHorizontal:n("--t-spacing-1"),paddingVertical:n("--t-spacing-half"),fontSize:n("--t-font-size-sm"),textAlign:"center",radius:n("--t-border-radius-md"),backgroundColor:n("--t-fill-color-tooltip-primary"),color:"#fff",zIndex:H},z,{anchorElement:p(Z,N),onMouseEnter:X,onMouseLeave:Y,keepInView:_,placement:x,renderTo:D,open:J}),w)):p(Z,N)}));export{y as default};
1
+ import{__rest as e,__assign as n}from'./../ext/tslib/tslib.es6.js';import{token as o}from"@planningcenter/tapestry";import r from"mitt";import t,{forwardRef as u,useRef as i,useState as l,useEffect as c,useImperativeHandle as s,Children as m,cloneElement as p}from"react";import{Popover as a}from"../Popover/Popover.js";import"../system/colors/colors.js";import"polished";import{pageViewChange as f,composeEvents as d}from"../utils.js";import"lodash/includes";import{useThemeProps as v}from"../system/utils.js";import"../system/style-names.js";import"../system/default-theme.js";import"@emotion/react";import"../system/cxs.js";var T=r(),O=null,g=!1;var y=u((function(r,u){var y=v("tooltip",r),I=y.children,E=y.openDelay,M=void 0===E?500:E,P=y.closeDelay,L=void 0===P?300:P,h=y.defaultOpen,j=void 0!==h&&h,S=y.keepInView,_=void 0===S||S,x=y.placement,z=y.popoverProps,D=y.renderTo,w=y.title,F=y.triggerOnFocus,b=void 0===F||F,k=y.triggerOnHover,A=void 0===k||k,C=y.zIndex,V=void 0===C?1e4:C,H=y.refAsInnerRef,N=void 0===H||H,R=e(y,["children","openDelay","closeDelay","defaultOpen","keepInView","placement","popoverProps","renderTo","title","triggerOnFocus","triggerOnHover","zIndex","refAsInnerRef"]),B=i(!0),U=i(!1),q=i(null),G=i(null),J=l(j),K=J[0],Q=J[1];c((function(){var e=f((function(e){return setTimeout((function(){return B.current=e}))}));return T.on("CLOSE_OPEN_TOOLTIPS",X),function(){T.off("CLOSE_OPEN_TOOLTIPS",X),clearTimeout(q.current),clearTimeout(G.current),e()}}),[]);var W=function(){clearTimeout(G.current),G.current=null,Q(!0)},X=function(){clearTimeout(q.current),q.current=null,Q(!1)},Y=function(){Q(!K)};s(u,(function(){return{close:X,open:W,toggle:Y}})),c((function(){!1===b&&X()}),[b]),c((function(){!1===A&&X()}),[A]);var Z=function(){clearTimeout(O),null===q.current&&(clearTimeout(G.current),G.current=null,!1===K&&(T.emit("CLOSE_OPEN_TOOLTIPS"),q.current=setTimeout((function(){return W()}),g?0:M)))},$=function(){g=!0,O=setTimeout((function(){g=!1}),500),null===G.current&&(clearTimeout(q.current),q.current=null,G.current=setTimeout((function(){return X()}),L))},ee=m.only(I),ne=ee.props,oe=ne.onFocus,re=ne.onBlur,te=ne.onMouseEnter,ue=ne.onMouseLeave,ie=ne.onMouseDown,le=ne.onMouseUp;return w?(b&&(R.onFocus=d((function(){B.current&&!U.current&&W()}),oe),R.onBlur=d(X,re),R.onMouseDown=d((function(){U.current=!0,X()}),ie),R.onMouseUp=d((function(){U.current=!1}),le)),A&&(R.onMouseEnter=d(Z,te),R.onMouseLeave=d($,ue)),t.createElement(a,n({shouldFlip:!0,paddingHorizontal:o("--t-spacing-1"),paddingVertical:o("--t-spacing-half"),fontSize:o("--t-font-size-sm"),textAlign:"center",radius:o("--t-border-radius-md"),backgroundColor:o("--t-fill-color-tooltip-primary"),color:"#fff",zIndex:V},z,{anchorElement:p(ee,R),onMouseEnter:Z,onMouseLeave:$,keepInView:_,placement:x,renderTo:D,open:K,refAsInnerRef:N}),w)):p(ee,R)}));export{y as default};
2
2
  //# sourceMappingURL=Tooltip.js.map
@@ -97,10 +97,10 @@ export declare const buttonThemes: {
97
97
  backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-default)";
98
98
  stroke: string;
99
99
  hover: {
100
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-hover)";
100
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-hover)";
101
101
  };
102
102
  active: {
103
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-active)";
103
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-active)";
104
104
  };
105
105
  disabled: {
106
106
  color: "var(--t-text-color-default-disabled)";
@@ -133,10 +133,10 @@ export declare const buttonThemes: {
133
133
  backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-default)";
134
134
  stroke: string;
135
135
  hover: {
136
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-hover)";
136
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-hover)";
137
137
  };
138
138
  active: {
139
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-active)";
139
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-active)";
140
140
  };
141
141
  disabled: {
142
142
  color: "var(--t-text-color-default-disabled)";
@@ -169,10 +169,10 @@ export declare const buttonThemes: {
169
169
  backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-default)";
170
170
  stroke: string;
171
171
  hover: {
172
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-hover)";
172
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-hover)";
173
173
  };
174
174
  active: {
175
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-active)";
175
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-active)";
176
176
  };
177
177
  disabled: {
178
178
  color: "var(--t-text-color-default-disabled)";
@@ -1,2 +1,2 @@
1
- import{token as o}from"@planningcenter/tapestry";var l={fill:{backgroundColor:o("--t-fill-color-button-interaction-solid-disabled"),color:o("--t-text-color-default-disabled"),opacity:1},naked:{color:o("--t-text-color-default-disabled"),opacity:1},outline:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-disabled"),color:o("--t-text-color-default-disabled"),opacity:1,stroke:o("--t-border-color-button-neutral")}},r={color:o("--t-text-color-status-neutral"),backgroundColor:o("--t-fill-color-button-neutral-responsive-header-default"),stroke:"transparent",hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:{color:o("--t-text-color-default-disabled"),backgroundColor:o("--t-fill-color-button-neutral-responsive-header-disabled"),borderColor:o("--t-fill-color-button-neutral-responsive-header-disabled"),opacity:1},mediaQueries:{"@media (min-width: 600px)":{color:o("--t-text-color-status-neutral"),backgroundColor:"var(--local-page-header-button-background-color, transparent)",boxShadow:"inset 0px 0px 0px 1px var(--t-border-color-button-neutral)",hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:l.outline}}},t={dark:{fill:{active:{backgroundColor:"dark-2"},backgroundColor:"dark-0",color:"dark-9",hover:{backgroundColor:"dark-1"},disabled:l.fill},naked:{active:{backgroundColor:"dark-1"},color:"dark-9",hover:{backgroundColor:"dark-0"},disabled:l.naked},outline:{active:{backgroundColor:"dark-1"},color:"dark-9",hover:{backgroundColor:"dark-0"},stroke:"dark-3",disabled:l.outline}},default:{fill:{backgroundColor:o("--t-fill-color-button-neutral-solid-default"),color:o("--t-text-color-status-neutral"),hover:{backgroundColor:o("--t-fill-color-button-neutral-solid-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-solid-active")},disabled:l.fill},naked:{color:o("--t-text-color-status-neutral"),hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:l.naked},outline:{color:o("--t-text-color-status-neutral"),stroke:o("--t-border-color-button-neutral"),hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:l.outline}},secondaryPageHeader:{fill:r,naked:r,outline:r},error:{fill:{backgroundColor:o("--t-fill-color-button-delete-solid-default"),color:o("--t-text-color-default-inverted"),hover:{backgroundColor:o("--t-fill-color-button-delete-solid-hover")},active:{backgroundColor:o("--t-fill-color-button-delete-solid-active")},disabled:l.fill},naked:{color:o("--t-text-color-status-error"),hover:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-active")},disabled:l.naked},outline:{color:o("--t-text-color-status-error"),stroke:o("--t-border-color-button-delete"),hover:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-active")},disabled:l.outline}},info:{fill:{active:{backgroundColor:"blue-3"},backgroundColor:"blue-5",color:"light-9",hover:{backgroundColor:"blue-4"},disabled:l.fill},naked:{active:{backgroundColor:"blue-1"},color:"blue-5",hover:{backgroundColor:"blue-0"},disabled:l.naked},outline:{active:{backgroundColor:"blue-1"},color:"blue-5",hover:{backgroundColor:"blue-0"},stroke:"blue-5",disabled:l.outline}},light:{fill:{active:{backgroundColor:"light-3"},backgroundColor:"light-1",color:"white",hover:{backgroundColor:"light-2"},disabled:l.fill},naked:{active:{backgroundColor:"light-1"},color:"light-9",hover:{backgroundColor:"light-0"},disabled:l.naked},outline:{active:{backgroundColor:"light-1"},color:"white",hover:{backgroundColor:"light-0"},stroke:"light-3",disabled:l.outline}},primary:{fill:{backgroundColor:o("--t-fill-color-button-interaction-solid-default"),color:o("--t-text-color-default-inverted"),hover:{backgroundColor:o("--t-fill-color-button-interaction-solid-hover")},active:{backgroundColor:o("--t-fill-color-button-interaction-solid-active")},disabled:l.fill},naked:{color:o("--t-text-color-interaction-primary"),hover:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-active")},disabled:l.naked},outline:{color:o("--t-text-color-interaction-primary"),stroke:o("--t-border-color-button-info"),hover:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-active")},disabled:l.outline}},success:{fill:{active:{backgroundColor:"success-darker"},backgroundColor:"success",color:"white",hover:{backgroundColor:"success-dark"},disabled:l.fill},naked:{active:{backgroundColor:"success-lighter"},color:"success",hover:{backgroundColor:"success-lightest"},disabled:l.naked},outline:{active:{backgroundColor:"success-lighter"},color:"success",hover:{backgroundColor:"success-lightest"},stroke:"success",disabled:l.outline}},warning:{fill:{active:{backgroundColor:"yellow-3"},backgroundColor:"yellow-5",color:"dark-9",hover:{backgroundColor:"yellow-4"},disabled:l.fill},naked:{active:{backgroundColor:"yellow-1"},color:"yellow-9",hover:{backgroundColor:"yellow-0"},disabled:l.naked},outline:{active:{backgroundColor:"yellow-1"},color:"yellow-9",hover:{backgroundColor:"yellow-0"},stroke:"yellow-5",disabled:l.outline}},white:{fill:{active:{backgroundColor:"grey-1"},backgroundColor:"white",color:"primary",hover:{backgroundColor:"grey-0"},disabled:l.fill},naked:{active:{backgroundColor:"light-1"},color:"white",hover:{backgroundColor:"light-0"},disabled:l.naked},outline:{active:{backgroundColor:"light-1"},color:"white",hover:{backgroundColor:"light-0"},stroke:"white",disabled:l.outline}}};export{t as buttonThemes};
1
+ import{token as o}from"@planningcenter/tapestry";var l={fill:{backgroundColor:o("--t-fill-color-button-interaction-solid-disabled"),color:o("--t-text-color-default-disabled"),opacity:1},naked:{color:o("--t-text-color-default-disabled"),opacity:1},outline:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-disabled"),color:o("--t-text-color-default-disabled"),opacity:1,stroke:o("--t-border-color-button-neutral")}},r={color:o("--t-text-color-status-neutral"),backgroundColor:o("--t-fill-color-button-neutral-responsive-header-default"),stroke:"transparent",hover:{backgroundColor:o("--t-fill-color-button-neutral-responsive-header-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-responsive-header-active")},disabled:{color:o("--t-text-color-default-disabled"),backgroundColor:o("--t-fill-color-button-neutral-responsive-header-disabled"),borderColor:o("--t-fill-color-button-neutral-responsive-header-disabled"),opacity:1},mediaQueries:{"@media (min-width: 600px)":{color:o("--t-text-color-status-neutral"),backgroundColor:"var(--local-page-header-button-background-color, transparent)",boxShadow:"inset 0px 0px 0px 1px var(--t-border-color-button-neutral)",hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:l.outline}}},e={dark:{fill:{active:{backgroundColor:"dark-2"},backgroundColor:"dark-0",color:"dark-9",hover:{backgroundColor:"dark-1"},disabled:l.fill},naked:{active:{backgroundColor:"dark-1"},color:"dark-9",hover:{backgroundColor:"dark-0"},disabled:l.naked},outline:{active:{backgroundColor:"dark-1"},color:"dark-9",hover:{backgroundColor:"dark-0"},stroke:"dark-3",disabled:l.outline}},default:{fill:{backgroundColor:o("--t-fill-color-button-neutral-solid-default"),color:o("--t-text-color-status-neutral"),hover:{backgroundColor:o("--t-fill-color-button-neutral-solid-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-solid-active")},disabled:l.fill},naked:{color:o("--t-text-color-status-neutral"),hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:l.naked},outline:{color:o("--t-text-color-status-neutral"),stroke:o("--t-border-color-button-neutral"),hover:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-neutral-outline-dim-active")},disabled:l.outline}},secondaryPageHeader:{fill:r,naked:r,outline:r},error:{fill:{backgroundColor:o("--t-fill-color-button-delete-solid-default"),color:o("--t-text-color-default-inverted"),hover:{backgroundColor:o("--t-fill-color-button-delete-solid-hover")},active:{backgroundColor:o("--t-fill-color-button-delete-solid-active")},disabled:l.fill},naked:{color:o("--t-text-color-status-error"),hover:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-active")},disabled:l.naked},outline:{color:o("--t-text-color-status-error"),stroke:o("--t-border-color-button-delete"),hover:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-delete-outline-dim-active")},disabled:l.outline}},info:{fill:{active:{backgroundColor:"blue-3"},backgroundColor:"blue-5",color:"light-9",hover:{backgroundColor:"blue-4"},disabled:l.fill},naked:{active:{backgroundColor:"blue-1"},color:"blue-5",hover:{backgroundColor:"blue-0"},disabled:l.naked},outline:{active:{backgroundColor:"blue-1"},color:"blue-5",hover:{backgroundColor:"blue-0"},stroke:"blue-5",disabled:l.outline}},light:{fill:{active:{backgroundColor:"light-3"},backgroundColor:"light-1",color:"white",hover:{backgroundColor:"light-2"},disabled:l.fill},naked:{active:{backgroundColor:"light-1"},color:"light-9",hover:{backgroundColor:"light-0"},disabled:l.naked},outline:{active:{backgroundColor:"light-1"},color:"white",hover:{backgroundColor:"light-0"},stroke:"light-3",disabled:l.outline}},primary:{fill:{backgroundColor:o("--t-fill-color-button-interaction-solid-default"),color:o("--t-text-color-default-inverted"),hover:{backgroundColor:o("--t-fill-color-button-interaction-solid-hover")},active:{backgroundColor:o("--t-fill-color-button-interaction-solid-active")},disabled:l.fill},naked:{color:o("--t-text-color-interaction-primary"),hover:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-active")},disabled:l.naked},outline:{color:o("--t-text-color-interaction-primary"),stroke:o("--t-border-color-button-info"),hover:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-hover")},active:{backgroundColor:o("--t-fill-color-button-interaction-outline-dim-active")},disabled:l.outline}},success:{fill:{active:{backgroundColor:"success-darker"},backgroundColor:"success",color:"white",hover:{backgroundColor:"success-dark"},disabled:l.fill},naked:{active:{backgroundColor:"success-lighter"},color:"success",hover:{backgroundColor:"success-lightest"},disabled:l.naked},outline:{active:{backgroundColor:"success-lighter"},color:"success",hover:{backgroundColor:"success-lightest"},stroke:"success",disabled:l.outline}},warning:{fill:{active:{backgroundColor:"yellow-3"},backgroundColor:"yellow-5",color:"dark-9",hover:{backgroundColor:"yellow-4"},disabled:l.fill},naked:{active:{backgroundColor:"yellow-1"},color:"yellow-9",hover:{backgroundColor:"yellow-0"},disabled:l.naked},outline:{active:{backgroundColor:"yellow-1"},color:"yellow-9",hover:{backgroundColor:"yellow-0"},stroke:"yellow-5",disabled:l.outline}},white:{fill:{active:{backgroundColor:"grey-1"},backgroundColor:"white",color:"primary",hover:{backgroundColor:"grey-0"},disabled:l.fill},naked:{active:{backgroundColor:"light-1"},color:"white",hover:{backgroundColor:"light-0"},disabled:l.naked},outline:{active:{backgroundColor:"light-1"},color:"white",hover:{backgroundColor:"light-0"},stroke:"white",disabled:l.outline}}};export{e as buttonThemes};
2
2
  //# sourceMappingURL=button-themes.js.map
@@ -109,10 +109,10 @@ declare const defaultTheme: {
109
109
  backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-default)";
110
110
  stroke: string;
111
111
  hover: {
112
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-hover)";
112
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-hover)";
113
113
  };
114
114
  active: {
115
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-active)";
115
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-active)";
116
116
  };
117
117
  disabled: {
118
118
  color: "var(--t-text-color-default-disabled)";
@@ -145,10 +145,10 @@ declare const defaultTheme: {
145
145
  backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-default)";
146
146
  stroke: string;
147
147
  hover: {
148
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-hover)";
148
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-hover)";
149
149
  };
150
150
  active: {
151
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-active)";
151
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-active)";
152
152
  };
153
153
  disabled: {
154
154
  color: "var(--t-text-color-default-disabled)";
@@ -181,10 +181,10 @@ declare const defaultTheme: {
181
181
  backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-default)";
182
182
  stroke: string;
183
183
  hover: {
184
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-hover)";
184
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-hover)";
185
185
  };
186
186
  active: {
187
- backgroundColor: "var(--t-fill-color-button-neutral-outline-dim-active)";
187
+ backgroundColor: "var(--t-fill-color-button-neutral-responsive-header-active)";
188
188
  };
189
189
  disabled: {
190
190
  color: "var(--t-text-color-default-disabled)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry-react",
3
- "version": "4.11.6-rc.1",
3
+ "version": "4.12.0",
4
4
  "description": "A collection of flexible React components to help you build resilient, accessible user interfaces quickly and effectively.",
5
5
  "author": "Front End Systems Engineering <frontend@pco.bz>",
6
6
  "main": "./dist/index.js",
@@ -76,9 +76,9 @@
76
76
  "typescript": "^5.3.3"
77
77
  },
78
78
  "dependencies": {
79
- "@planningcenter/icons": "^15.25.3",
79
+ "@planningcenter/icons": "^15.25.5",
80
80
  "@planningcenter/react-beautiful-dnd": "^13.4.0",
81
- "@planningcenter/tapestry": "^2.0.0",
81
+ "@planningcenter/tapestry": "^2.1.0",
82
82
  "@popmotion/popcorn": "^0.4.4",
83
83
  "@popperjs/core": "^2.11.6",
84
84
  "@react-hook/window-size": "^3.1.1",