@planningcenter/tapestry 2.0.1-rc.1 → 2.1.0-rc.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,5 +1,4 @@
1
1
  import React from "react";
2
- import { BaseButtonElementProps } from "./BaseButton";
3
2
  export type DropdownButtonProps = {
4
3
  "aria-controls": string;
5
4
  "aria-expanded": boolean;
@@ -11,5 +10,5 @@ export declare function dropdownProps({ className }: {
11
10
  className: string;
12
11
  suffix: React.JSX.Element;
13
12
  };
14
- export declare function DropdownButton(props: BaseButtonElementProps & DropdownButtonProps): React.JSX.Element;
13
+ export declare const DropdownButton: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof import("./BaseButton").BaseButtonProps | "children"> & import("./BaseButton").BaseButtonProps & DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
15
14
  //# sourceMappingURL=DropdownButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/DropdownButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAc,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAEjE,MAAM,MAAM,mBAAmB,GAAG;IAChC,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAA;CACf,CAAA;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;;;EAKlE;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,sBAAsB,GAAG,mBAAmB,qBAGpD"}
1
+ {"version":3,"file":"DropdownButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/DropdownButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,EAAE,KAAK,CAAA;CACf,CAAA;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE;;;EAKlE;AAED,eAAO,MAAM,cAAc,yPAKzB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import Icon from '../../utilities/Icon.js';
2
2
  import classNames from 'classnames';
3
- import React from 'react';
3
+ import React, { forwardRef } from 'react';
4
4
  import { BaseButton } from './BaseButton.js';
5
5
 
6
6
  function dropdownProps({ className }) {
@@ -9,9 +9,10 @@ function dropdownProps({ className }) {
9
9
  suffix: React.createElement(Icon, { symbol: "general#down-caret", "aria-hidden": true }),
10
10
  };
11
11
  }
12
- function DropdownButton(props) {
13
- return React.createElement(BaseButton, { ...props, ...dropdownProps(props) });
14
- }
12
+ const DropdownButton = forwardRef((props, ref) => {
13
+ return React.createElement(BaseButton, { ref: ref, ...props, ...dropdownProps(props) });
14
+ });
15
+ DropdownButton.displayName = "DropdownButton";
15
16
 
16
17
  export { DropdownButton, dropdownProps };
17
18
  //# sourceMappingURL=DropdownButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton.js","sources":["../../../src/components/button/DropdownButton.tsx"],"sourcesContent":["import Icon from \"@utilities/Icon\"\nimport classNames from \"classnames\"\nimport React from \"react\"\n\nimport { BaseButton, BaseButtonElementProps } from \"./BaseButton\"\n\nexport type DropdownButtonProps = {\n \"aria-controls\": string\n \"aria-expanded\": boolean\n suffix?: never\n}\n\nexport function dropdownProps({ className }: { className?: string }) {\n return {\n className: classNames(className, \"tds-btn--dropdown\"),\n suffix: <Icon symbol=\"general#down-caret\" aria-hidden />,\n }\n}\n\nexport function DropdownButton(\n props: BaseButtonElementProps & DropdownButtonProps\n) {\n return <BaseButton {...props} {...dropdownProps(props)} />\n}\n"],"names":[],"mappings":";;;;;AAYgB,SAAA,aAAa,CAAC,EAAE,SAAS,EAA0B,EAAA;IACjE,OAAO;AACL,QAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,mBAAmB,CAAC;AACrD,QAAA,MAAM,EAAE,KAAC,CAAA,aAAA,CAAA,IAAI,IAAC,MAAM,EAAC,oBAAoB,EAAe,aAAA,EAAA,IAAA,EAAA,CAAA;KACzD,CAAA;AACH,CAAC;AAEK,SAAU,cAAc,CAC5B,KAAmD,EAAA;IAEnD,OAAO,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAA,GAAK,KAAK,EAAA,GAAM,aAAa,CAAC,KAAK,CAAC,EAAA,CAAI,CAAA;AAC5D;;;;"}
1
+ {"version":3,"file":"DropdownButton.js","sources":["../../../src/components/button/DropdownButton.tsx"],"sourcesContent":["import Icon from \"@utilities/Icon\"\nimport classNames from \"classnames\"\nimport React, { forwardRef } from \"react\"\n\nimport { BaseButton, BaseButtonElementProps } from \"./BaseButton\"\n\nexport type DropdownButtonProps = {\n \"aria-controls\": string\n \"aria-expanded\": boolean\n suffix?: never\n}\n\nexport function dropdownProps({ className }: { className?: string }) {\n return {\n className: classNames(className, \"tds-btn--dropdown\"),\n suffix: <Icon symbol=\"general#down-caret\" aria-hidden />,\n }\n}\n\nexport const DropdownButton = forwardRef<\n HTMLButtonElement,\n BaseButtonElementProps & DropdownButtonProps\n>((props, ref) => {\n return <BaseButton ref={ref} {...props} {...dropdownProps(props)} />\n})\n\nDropdownButton.displayName = \"DropdownButton\"\n"],"names":[],"mappings":";;;;;AAYgB,SAAA,aAAa,CAAC,EAAE,SAAS,EAA0B,EAAA;IACjE,OAAO;AACL,QAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,mBAAmB,CAAC;AACrD,QAAA,MAAM,EAAE,KAAC,CAAA,aAAA,CAAA,IAAI,IAAC,MAAM,EAAC,oBAAoB,EAAe,aAAA,EAAA,IAAA,EAAA,CAAA;KACzD,CAAA;AACH,CAAC;AAEY,MAAA,cAAc,GAAG,UAAU,CAGtC,CAAC,KAAK,EAAE,GAAG,KAAI;AACf,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,GAAM,aAAa,CAAC,KAAK,CAAC,GAAI,CAAA;AACtE,CAAC,EAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
@@ -1,5 +1,7 @@
1
1
  import React from "react";
2
2
  import { DropdownButtonProps } from "./DropdownButton";
3
- import { IconButtonProps } from "./IconButton";
4
- export declare function DropdownIconButton(props: IconButtonProps & DropdownButtonProps): React.JSX.Element;
3
+ export declare const DropdownIconButton: React.ForwardRefExoticComponent<Omit<import("./BaseButton").BaseButtonElementProps, "label"> & {
4
+ "aria-label": string;
5
+ icon: React.ReactNode;
6
+ } & DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
5
7
  //# sourceMappingURL=DropdownIconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/DropdownIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,mBAAmB,EAAiB,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAA;AAE1D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,eAAe,GAAG,mBAAmB,qBAG7C"}
1
+ {"version":3,"file":"DropdownIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/DropdownIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAiB,MAAM,kBAAkB,CAAA;AAGrE,eAAO,MAAM,kBAAkB;;;iEAK7B,CAAA"}
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import { dropdownProps } from './DropdownButton.js';
3
3
  import { IconButton } from './IconButton.js';
4
4
 
5
- function DropdownIconButton(props) {
6
- return React.createElement(IconButton, { ...props, ...dropdownProps(props) });
7
- }
5
+ const DropdownIconButton = forwardRef((props, ref) => {
6
+ return React.createElement(IconButton, { ref: ref, ...props, ...dropdownProps(props) });
7
+ });
8
+ DropdownIconButton.displayName = "DropdownIconButton";
8
9
 
9
10
  export { DropdownIconButton };
10
11
  //# sourceMappingURL=DropdownIconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownIconButton.js","sources":["../../../src/components/button/DropdownIconButton.tsx"],"sourcesContent":["import React from \"react\"\n\nimport { DropdownButtonProps, dropdownProps } from \"./DropdownButton\"\nimport { IconButton, IconButtonProps } from \"./IconButton\"\n\nexport function DropdownIconButton(\n props: IconButtonProps & DropdownButtonProps\n) {\n return <IconButton {...props} {...dropdownProps(props)} />\n}\n"],"names":[],"mappings":";;;;AAKM,SAAU,kBAAkB,CAChC,KAA4C,EAAA;IAE5C,OAAO,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAA,GAAK,KAAK,EAAA,GAAM,aAAa,CAAC,KAAK,CAAC,EAAA,CAAI,CAAA;AAC5D;;;;"}
1
+ {"version":3,"file":"DropdownIconButton.js","sources":["../../../src/components/button/DropdownIconButton.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\n\nimport { DropdownButtonProps, dropdownProps } from \"./DropdownButton\"\nimport { IconButton, IconButtonProps } from \"./IconButton\"\n\nexport const DropdownIconButton = forwardRef<\n HTMLButtonElement,\n IconButtonProps & DropdownButtonProps\n>((props, ref) => {\n return <IconButton ref={ref} {...props} {...dropdownProps(props)} />\n})\n\nDropdownIconButton.displayName = \"DropdownIconButton\"\n"],"names":[],"mappings":";;;;AAKa,MAAA,kBAAkB,GAAG,UAAU,CAG1C,CAAC,KAAK,EAAE,GAAG,KAAI;AACf,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,GAAM,aAAa,CAAC,KAAK,CAAC,GAAI,CAAA;AACtE,CAAC,EAAC;AAEF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB;;;;"}
@@ -14,5 +14,7 @@ export declare function needsAttentionProps({ className, needsAttention, }: {
14
14
  className: string | undefined;
15
15
  prefix?: undefined;
16
16
  };
17
- export declare function PageHeaderActionsDropdownButton({ needsAttention, className, ...props }: PageHeaderActionsDropdownButtonProps): React.JSX.Element;
17
+ export declare const PageHeaderActionsDropdownButton: React.ForwardRefExoticComponent<Omit<BaseButtonElementProps, "kind"> & DropdownButtonProps & {
18
+ needsAttention?: boolean;
19
+ } & React.RefAttributes<HTMLButtonElement>>;
18
20
  //# sourceMappingURL=PageHeaderActionsDropdownButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeaderActionsDropdownButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/PageHeaderActionsDropdownButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEtE,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,sBAAsB,EACtB,MAAM,CACP,GACC,mBAAmB,GAAG;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAEH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,cAAc,GACf,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;;;;;;EAWA;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,cAAc,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oCAAoC,qBAQtC"}
1
+ {"version":3,"file":"PageHeaderActionsDropdownButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/PageHeaderActionsDropdownButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAEtE,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,sBAAsB,EACtB,MAAM,CACP,GACC,mBAAmB,GAAG;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAEH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,cAAc,GACf,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;;;;;;EAWA;AAED,eAAO,MAAM,+BAA+B;qBAtBvB,OAAO;2CA2C3B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import classNames from 'classnames';
2
- import React from 'react';
2
+ import React, { forwardRef } from 'react';
3
3
  import { DropdownButton } from './DropdownButton.js';
4
4
 
5
5
  function needsAttentionProps({ className, needsAttention, }) {
@@ -12,9 +12,10 @@ function needsAttentionProps({ className, needsAttention, }) {
12
12
  className,
13
13
  };
14
14
  }
15
- function PageHeaderActionsDropdownButton({ needsAttention, className, ...props }) {
16
- return (React.createElement(DropdownButton, { ...props, kind: "secondary-page-header", ...needsAttentionProps({ className, needsAttention }) }));
17
- }
15
+ const PageHeaderActionsDropdownButton = forwardRef(({ needsAttention, className, ...props }, ref) => {
16
+ return (React.createElement(DropdownButton, { ref: ref, ...props, kind: "secondary-page-header", ...needsAttentionProps({ className, needsAttention }) }));
17
+ });
18
+ PageHeaderActionsDropdownButton.displayName = "PageHeaderActionsDropdownButton";
18
19
 
19
20
  export { PageHeaderActionsDropdownButton, needsAttentionProps };
20
21
  //# sourceMappingURL=PageHeaderActionsDropdownButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeaderActionsDropdownButton.js","sources":["../../../src/components/button/PageHeaderActionsDropdownButton.tsx"],"sourcesContent":["import classNames from \"classnames\"\nimport React from \"react\"\n\nimport { BaseButtonElementProps } from \"./BaseButton\"\nimport { DropdownButton, DropdownButtonProps } from \"./DropdownButton\"\n\nexport type PageHeaderActionsDropdownButtonProps = Omit<\n BaseButtonElementProps,\n \"kind\"\n> &\n DropdownButtonProps & {\n needsAttention?: boolean\n }\n\nexport function needsAttentionProps({\n className,\n needsAttention,\n}: {\n className?: string\n needsAttention?: boolean\n}) {\n return needsAttention\n ? {\n className: classNames(className, \"tds-btn--attention\"),\n prefix: (\n <span className=\"attention-icon\" aria-label=\"Needs attention!\" />\n ),\n }\n : {\n className,\n }\n}\n\nexport function PageHeaderActionsDropdownButton({\n needsAttention,\n className,\n ...props\n}: PageHeaderActionsDropdownButtonProps) {\n return (\n <DropdownButton\n {...props}\n kind=\"secondary-page-header\"\n {...needsAttentionProps({ className, needsAttention })}\n />\n )\n}\n"],"names":[],"mappings":";;;;SAcgB,mBAAmB,CAAC,EAClC,SAAS,EACT,cAAc,GAIf,EAAA;AACC,IAAA,OAAO,cAAc;AACnB,UAAE;AACE,YAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,oBAAoB,CAAC;YACtD,MAAM,GACJ,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAC,gBAAgB,EAAA,YAAA,EAAY,kBAAkB,EAAA,CAAG,CAClE;AACF,SAAA;AACH,UAAE;YACE,SAAS;SACV,CAAA;AACP,CAAC;AAEK,SAAU,+BAA+B,CAAC,EAC9C,cAAc,EACd,SAAS,EACT,GAAG,KAAK,EAC6B,EAAA;IACrC,QACE,oBAAC,cAAc,EAAA,EAAA,GACT,KAAK,EACT,IAAI,EAAC,uBAAuB,EAAA,GACxB,mBAAmB,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,EAAA,CACtD,EACH;AACH;;;;"}
1
+ {"version":3,"file":"PageHeaderActionsDropdownButton.js","sources":["../../../src/components/button/PageHeaderActionsDropdownButton.tsx"],"sourcesContent":["import classNames from \"classnames\"\nimport React, { forwardRef } from \"react\"\n\nimport { BaseButtonElementProps } from \"./BaseButton\"\nimport { DropdownButton, DropdownButtonProps } from \"./DropdownButton\"\n\nexport type PageHeaderActionsDropdownButtonProps = Omit<\n BaseButtonElementProps,\n \"kind\"\n> &\n DropdownButtonProps & {\n needsAttention?: boolean\n }\n\nexport function needsAttentionProps({\n className,\n needsAttention,\n}: {\n className?: string\n needsAttention?: boolean\n}) {\n return needsAttention\n ? {\n className: classNames(className, \"tds-btn--attention\"),\n prefix: (\n <span className=\"attention-icon\" aria-label=\"Needs attention!\" />\n ),\n }\n : {\n className,\n }\n}\n\nexport const PageHeaderActionsDropdownButton = forwardRef<\n HTMLButtonElement,\n PageHeaderActionsDropdownButtonProps\n>(\n (\n {\n needsAttention,\n className,\n ...props\n }: PageHeaderActionsDropdownButtonProps,\n ref\n ) => {\n return (\n <DropdownButton\n ref={ref}\n {...props}\n kind=\"secondary-page-header\"\n {...needsAttentionProps({ className, needsAttention })}\n />\n )\n }\n)\n\nPageHeaderActionsDropdownButton.displayName = \"PageHeaderActionsDropdownButton\"\n"],"names":[],"mappings":";;;;SAcgB,mBAAmB,CAAC,EAClC,SAAS,EACT,cAAc,GAIf,EAAA;AACC,IAAA,OAAO,cAAc;AACnB,UAAE;AACE,YAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,oBAAoB,CAAC;YACtD,MAAM,GACJ,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAC,gBAAgB,EAAA,YAAA,EAAY,kBAAkB,EAAA,CAAG,CAClE;AACF,SAAA;AACH,UAAE;YACE,SAAS;SACV,CAAA;AACP,CAAC;AAEY,MAAA,+BAA+B,GAAG,UAAU,CAIvD,CACE,EACE,cAAc,EACd,SAAS,EACT,GAAG,KAAK,EAC6B,EACvC,GAAG,KACD;IACF,QACE,KAAC,CAAA,aAAA,CAAA,cAAc,EACb,EAAA,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EACT,IAAI,EAAC,uBAAuB,EACxB,GAAA,mBAAmB,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,EACtD,CAAA,EACH;AACH,CAAC,EACF;AAED,+BAA+B,CAAC,WAAW,GAAG,iCAAiC;;;;"}
package/dist/unstable.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import './components/page-header/index.js';
2
2
  import './components/sidenav/index.js';
3
3
  import './components/button/Button.js';
4
- import 'classnames';
5
- import 'react';
6
- import './components/button/BaseButton.js';
4
+ import './components/button/DropdownButton.js';
5
+ import './components/button/DropdownIconButton.js';
7
6
  import './components/button/IconButton.js';
8
7
  import './components/button/LoadingButton.js';
8
+ import './components/button/PageHeaderActionsDropdownButton.js';
9
9
  import './components/link/IconLink.js';
10
10
  import './components/link/Link.js';
11
+ import 'react';
11
12
  export { Checkbox } from './components/checkbox/Checkbox.js';
12
13
  export { Banner } from './components/Banner/Banner.js';
13
14
  //# sourceMappingURL=unstable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unstable.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"unstable.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry",
3
- "version": "2.0.1-rc.1",
3
+ "version": "2.1.0-rc.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,5 +99,5 @@
99
99
  "classnames": "^2.5.1",
100
100
  "lodash": "^4.17.21"
101
101
  },
102
- "gitHead": "d8729bcf1c68f74df499dc723580337e766f4d53"
102
+ "gitHead": "c216d4bbbf90f7c437f62cc918a20141ed58322e"
103
103
  }