@planningcenter/tapestry 0.5.0-rc.1 → 0.5.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @planningcenter/tapestry
2
+
3
+ `@planningcenter/tapestry` is a library developed to provide tools to aid in designing Planning Center apps.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @planningcenter/tapestry
9
+ ```
10
+
11
+ ## Adding types for using Web Components in React
12
+
13
+ If you are using Web Components in React and want to have TypeScript populate the types,
14
+ add `"@planningcenter/tapestry/react-types"` to `compilerOptions.types` in your tsconfig:
15
+
16
+ ```json
17
+ {
18
+ "compilerOptions": {
19
+ "types": ["@planningcenter/tapestry/react-types"]
20
+ }
21
+ }
22
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry",
3
- "version": "0.5.0-rc.1",
3
+ "version": "0.5.0-rc.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,8 @@
23
23
  "react-dom": "^17 || ^18 || ^19"
24
24
  },
25
25
  "files": [
26
- "dist"
26
+ "dist",
27
+ "react-types"
27
28
  ],
28
29
  "main": "./dist/index.js",
29
30
  "exports": {
@@ -72,13 +73,14 @@
72
73
  "react-syntax-highlighter": "^15.5.0",
73
74
  "rimraf": "^6.0.1",
74
75
  "rollup": "^4.22.4",
76
+ "rollup-plugin-copy": "^3.5.0",
75
77
  "rollup-plugin-node-externals": "^7.1.3",
76
78
  "rollup-plugin-postcss": "^4.0.2",
77
79
  "rollup-plugin-rename-node-modules": "^1.3.1",
78
80
  "shadow-dom-testing-library": "^1.11.3",
79
81
  "storybook": "^8.2.9",
80
82
  "style-dictionary": "^4.2.0",
81
- "tapestry-wc": "^0.5.0-rc.1",
83
+ "tapestry-wc": "^0.5.0-rc.2",
82
84
  "typescript": "^5.5.3",
83
85
  "vitest": "^3.0.0"
84
86
  },
@@ -99,5 +101,5 @@
99
101
  }
100
102
  }
101
103
  },
102
- "gitHead": "0af88b5d5a7ef165496e64cc0a25e1aed2d3c8b2"
104
+ "gitHead": "aa28cf3c687d0e1e4e0610c09d0ba91e52b4fc44"
103
105
  }
@@ -0,0 +1,69 @@
1
+ import React from 'react'
2
+
3
+ declare global {
4
+ namespace JSX {
5
+ interface IntrinsicElements {
6
+ /**
7
+ * The page header displays the title and any additional metadata and navigation.
8
+ * @example How to use it
9
+ * ```html
10
+ * <tds-page-header>
11
+ * <h1 slot="primary">Title</h1>
12
+ * <div slot="actions">
13
+ * <button>Button</button>
14
+ * </div>
15
+ * </tds-page-header>
16
+ * ```
17
+ * @slot primary - The primary slot is the main content of the page header. It will be displayed prominently. For simple pages, providing a h1 will suffice.
18
+ * @slot actions - Additional content (typically actions) that complements the primary slot.
19
+ * @slot navigation - For page header with navigation, this slot is for the nav.
20
+ * @cssprop --tds-page-header-background-color Background color of the header.
21
+ * @cssprop --tds-page-header-color Color of any meta text.
22
+ * @cssprop --tds-page-header-headline Color of the page header h1.
23
+ * @cssprop --tds-page-header-padding-x Horizontal padding of the header.
24
+ * @cssprop --tds-page-header-padding-y Vertical padding of the header.
25
+ */
26
+ "tds-page-header": {
27
+ /**
28
+ * Indicates whether the page header is inactive or not.
29
+ * When set to true, the page header is visually inactive
30
+ * @prop {boolean} inactive - Controls the inactive state of the page. Defaults to false.
31
+ */
32
+ "inactive"?: boolean
33
+ } & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
34
+ /**
35
+ * A container for page header nav.
36
+ * @slot (default) - Used for instances of tds-page-header-nav-item
37
+ */
38
+ "tds-page-header-nav": {
39
+ } & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
40
+ /**
41
+ * Individual navigation item for the page header contained within a `tds-page-header-nav` component.
42
+ * @slot (default) - The content of the tab. Accepts text, or if required a button or anchor element.
43
+ * @cssprop --tds-page-header-nav-item-background-color-disabled {var(--t-fill-color-neutral-080)} - Background color for the disabled tab.
44
+ * @cssprop --tds-page-header-nav-item-background-color-hover {var(--t-fill-color-neutral-080)} - Background color for the tab on hover.
45
+ * @cssprop --tds-page-header-nav-item-background-color-selected {var(--t-fill-color-neutral-100)} - Background color for the active tab.
46
+ * @cssprop --tds-page-header-nav-item-color {var(--t-text-color-default-secondary)} - Default color for the tab.
47
+ * @cssprop --tds-page-header-nav-item-color-disabled {var(--t-text-color-default-disabled)} - Color for the disabled tab.
48
+ * @cssprop --tds-page-header-nav-item-color-hover {var(--t-text-color-interaction-primary)} - Color for the tab on hover.
49
+ * @cssprop --tds-page-header-nav-item-color-selected {var(--t-text-color-default-primary)} - Color for the active tab.
50
+ * @cssprop --tds-page-header-nav-item-padding-x {12px} - Horizontal padding for the tab.
51
+ * @cssprop --tds-page-header-nav-item-padding-y {0} - Vertical padding for the tab.
52
+ */
53
+ "tds-page-header-nav-item": {
54
+ /**
55
+ * If `true` the tab is disabled.
56
+ */
57
+ "disabled"?: boolean
58
+ /**
59
+ * Optional URL for the tab if it should be a link.
60
+ */
61
+ "href"?: string
62
+ /**
63
+ * If `true` the tab is selected.
64
+ */
65
+ "selected"?: boolean
66
+ } & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
67
+ }
68
+ }
69
+ }