@planningcenter/tapestry-react 4.0.0 → 4.0.1

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.
@@ -0,0 +1,2 @@
1
+ import{__rest as t,__assign as e}from'./../ext/tslib/tslib.es6.js';import o from"react";import{Box as s}from"../Box/Box.js";import"../system/colors/colors.js";import"polished";import"../utils.js";import{useThemeProps as r}from"../system/utils.js";import"../system/style-names.js";import"lodash";import"@planningcenter/icons/paths/general";import"@planningcenter/icons/paths/tapestry";import"lodash/includes";import"@emotion/react";import"../system/cxs.js";function i(i){var a=r("tabs.tabPanel",i),m=a.activeId,l=t(a,["activeId"]);return o.createElement(s,e({role:"tabpanel",id:"".concat(m,"-panel"),"aria-labelledby":m,tabIndex:0},l))}export{i as default};
2
+ //# sourceMappingURL=TabPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabPanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import TabList from './TabList';
3
- import TabPanel from './TabPanels';
4
- import Tab from './Tab';
5
3
  import TabPanels from './TabPanels';
4
+ import Tab from './Tab';
5
+ import TabPanel from './TabPanel';
6
6
  type Props = {
7
7
  children?: React.ReactNode;
8
8
  activeIndex?: number;
@@ -13,7 +13,7 @@ declare function Tabs(props: Props): JSX.Element;
13
13
  declare namespace Tabs {
14
14
  var Tab: typeof import("./Tab").default;
15
15
  var TabList: typeof import("./TabList").default;
16
- var TabPanel: typeof import("./TabPanels").default;
16
+ var TabPanel: typeof import("./TabPanel").default;
17
17
  var TabPanels: typeof import("./TabPanels").default;
18
18
  }
19
19
  declare const _default: typeof Tabs & {
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAMtE,OAAO,OAAiC,MAAM,WAAW,CAAA;AACzD,OAAO,QAAoC,MAAM,aAAa,CAAA;AAC9D,OAAO,GAAG,MAAM,OAAO,CAAA;AACvB,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,KAAK,KAAK,GAAG;IAIX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAK1B,WAAW,CAAC,EAAE,MAAM,CAAA;IAIpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAM3B,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CAAA;AAED,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,eAsFzB;kBAtFQ,IAAI;;;;;;;SA8FN,UAAU;aACN,cAAc;cACb,eAAe;eACd,gBAAgB;;AAJ7B,wBAKC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAMtE,OAAO,OAAiC,MAAM,WAAW,CAAA;AACzD,OAAO,SAAqC,MAAM,aAAa,CAAA;AAC/D,OAAO,GAAG,MAAM,OAAO,CAAA;AACvB,OAAO,QAAQ,MAAM,YAAY,CAAA;AAEjC,KAAK,KAAK,GAAG;IAIX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAK1B,WAAW,CAAC,EAAE,MAAM,CAAA;IAIpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAM3B,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CAAA;AAED,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,eAsFzB;kBAtFQ,IAAI;;;;;;;SA8FN,UAAU;aACN,cAAc;cACb,eAAe;eACd,gBAAgB;;AAJ7B,wBAKC"}
package/dist/Tabs/Tabs.js CHANGED
@@ -1,2 +1,2 @@
1
- import{__rest as e,__assign as t}from'./../ext/tslib/tslib.es6.js';import n,{useState as r,useRef as i,useCallback as o,Children as s}from"react";import{StackView as a}from"../StackView/StackView.js";import{generateId as l}from"../utils.js";import"../system/colors/colors.js";import"polished";import{useThemeProps as c}from"../system/utils.js";import"../system/style-names.js";import"lodash";import"@planningcenter/icons/paths/general";import"@planningcenter/icons/paths/tapestry";import"lodash/includes";import"@emotion/react";import"../system/cxs.js";import m,{TABLIST_DISPLAY_NAME as u}from"./TabList.js";import p,{TABPANELS_DISPLAY_NAME as d}from"./TabPanels.js";import f from"./Tab.js";function b(m){var p=c("tabs",m),f=p.activeIndex,b=void 0===f?null:f,v=p.children,h=p.defaultActiveIndex,y=void 0===h?0:h,j=p.onChange,x=e(p,["activeIndex","children","defaultActiveIndex","onChange"]),T=l("tabs"),g=r(y),I=g[0],A=g[1],E=i(null),P=o((function(e){j&&j(e),null===b&&A(e)}),[j,b,A]),S=o((function(){return null===b?I:b}),[b,I]),k=o((function(e,t){var n=E.current.children.length,r=e+t;r<0?r=n-1:r>=n&&(r=0);var i=E.current.children[r];return"true"===i.getAttribute("aria-disabled")?k(r,t):i}),[E]),w=o((function(e){var t=k(S(),e);t&&t.focus()}),[k,S]);return n.createElement(a,t({innerRef:function(e){e&&(E.current=e.querySelector('[role="tablist"]'))}},x),s.map(v,(function(e,t){return e&&e.type.displayName===u?n.cloneElement(e,{id:T,activeIndex:S(),moveTabFocus:w,setActiveIndex:P}):e&&e.type.displayName===d?n.cloneElement(e,{id:T,activeIndex:S()}):e})))}b.Tab=f,b.TabList=m,b.TabPanel=p,b.TabPanels=p;export{b as default};
1
+ import{__rest as e,__assign as t}from'./../ext/tslib/tslib.es6.js';import n,{useState as r,useRef as i,useCallback as o,Children as s}from"react";import{StackView as a}from"../StackView/StackView.js";import{generateId as l}from"../utils.js";import"../system/colors/colors.js";import"polished";import{useThemeProps as m}from"../system/utils.js";import"../system/style-names.js";import"lodash";import"@planningcenter/icons/paths/general";import"@planningcenter/icons/paths/tapestry";import"lodash/includes";import"@emotion/react";import"../system/cxs.js";import c,{TABLIST_DISPLAY_NAME as p}from"./TabList.js";import u,{TABPANELS_DISPLAY_NAME as d}from"./TabPanels.js";import f from"./Tab.js";import b from"./TabPanel.js";function v(c){var u=m("tabs",c),f=u.activeIndex,b=void 0===f?null:f,v=u.children,h=u.defaultActiveIndex,j=void 0===h?0:h,y=u.onChange,x=e(u,["activeIndex","children","defaultActiveIndex","onChange"]),T=l("tabs"),g=r(j),I=g[0],A=g[1],P=i(null),E=o((function(e){y&&y(e),null===b&&A(e)}),[y,b,A]),S=o((function(){return null===b?I:b}),[b,I]),k=o((function(e,t){var n=P.current.children.length,r=e+t;r<0?r=n-1:r>=n&&(r=0);var i=P.current.children[r];return"true"===i.getAttribute("aria-disabled")?k(r,t):i}),[P]),w=o((function(e){var t=k(S(),e);t&&t.focus()}),[k,S]);return n.createElement(a,t({innerRef:function(e){e&&(P.current=e.querySelector('[role="tablist"]'))}},x),s.map(v,(function(e,t){return e&&e.type.displayName===p?n.cloneElement(e,{id:T,activeIndex:S(),moveTabFocus:w,setActiveIndex:E}):e&&e.type.displayName===d?n.cloneElement(e,{id:T,activeIndex:S()}):e})))}v.Tab=f,v.TabList=c,v.TabPanel=b,v.TabPanels=u;export{v as default};
2
2
  //# sourceMappingURL=Tabs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry-react",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
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",