@planningcenter/tapestry 4.15.1-rc.0 → 4.15.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.
- package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/components/combo-box/ComboBox.js +4 -1
- package/dist/components/combo-box/ComboBox.js.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.js +3 -1
- package/dist/components/dropdown/Dropdown.js.map +1 -1
- package/dist/components/tag/Tag.d.ts.map +1 -1
- package/dist/components/tag/Tag.js +12 -5
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/tag/TagContent.d.ts +5 -3
- package/dist/components/tag/TagContent.d.ts.map +1 -1
- package/dist/components/tag/TagContent.js +5 -4
- package/dist/components/tag/TagContent.js.map +1 -1
- package/dist/components/tag/TagListItem.d.ts +17 -0
- package/dist/components/tag/TagListItem.d.ts.map +1 -0
- package/dist/components/tag/TagListItem.js +17 -0
- package/dist/components/tag/TagListItem.js.map +1 -0
- package/dist/components/tag/useTagMenu.d.ts +24 -14
- package/dist/components/tag/useTagMenu.d.ts.map +1 -1
- package/dist/components/tag/useTagMenu.js +35 -18
- package/dist/components/tag/useTagMenu.js.map +1 -1
- package/dist/components/tag-group/TagGroup.d.ts +51 -0
- package/dist/components/tag-group/TagGroup.d.ts.map +1 -0
- package/dist/components/tag-group/TagGroup.js +49 -0
- package/dist/components/tag-group/TagGroup.js.map +1 -0
- package/dist/components/tag-group/index.d.ts +4 -0
- package/dist/components/tag-group/index.d.ts.map +1 -0
- package/dist/reactRender.css +1627 -1558
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +1627 -1558
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/tapestryMount.css +1627 -1558
- package/dist/tapestryMount.css.map +1 -1
- package/dist/tapestryMountLegacy.css +1627 -1558
- package/dist/tapestryMountLegacy.css.map +1 -1
- package/dist/unstable.css +75 -6
- package/dist/unstable.css.map +1 -1
- package/dist/unstable.d.ts +2 -0
- package/dist/unstable.d.ts.map +1 -1
- package/dist/unstable.js +1 -0
- package/dist/unstable.js.map +1 -1
- package/docs/components/tag-group.md +48 -0
- package/docs/components/tag.md +6 -1
- package/docs/llms.txt +3 -0
- package/package.json +2 -2
package/dist/unstable.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { ToggleIconButton } from "./components/button/ToggleIconButton";
|
|
|
4
4
|
export * from "./components/DataTable";
|
|
5
5
|
export type { TagColor, TagElementProps, TagOption, TagProps, TagVariant, } from "./components/tag";
|
|
6
6
|
export { Tag } from "./components/tag";
|
|
7
|
+
export type { TagGroupElementProps, TagGroupItem, TagGroupProps, } from "./components/tag-group";
|
|
8
|
+
export { TagGroup } from "./components/tag-group";
|
|
7
9
|
export * from "./index";
|
|
8
10
|
export { type ReactNativeTokens, reactNativeTokens, } from "@planningcenter/tapestry-tokens/react-native-tokens";
|
|
9
11
|
//# sourceMappingURL=unstable.d.ts.map
|
package/dist/unstable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unstable.d.ts","sourceRoot":"","sources":["../src/unstable.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,cAAc,wBAAwB,CAAA;AACtC,YAAY,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,QAAQ,EACR,UAAU,GACX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,cAAc,SAAS,CAAA;AACvB,OAAO,EACL,KAAK,iBAAiB,EACtB,iBAAiB,GAClB,MAAM,qDAAqD,CAAA"}
|
|
1
|
+
{"version":3,"file":"unstable.d.ts","sourceRoot":"","sources":["../src/unstable.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,cAAc,wBAAwB,CAAA;AACtC,YAAY,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,QAAQ,EACR,UAAU,GACX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,aAAa,GACd,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,cAAc,SAAS,CAAA;AACvB,OAAO,EACL,KAAK,iBAAiB,EACtB,iBAAiB,GAClB,MAAM,qDAAqD,CAAA"}
|
package/dist/unstable.js
CHANGED
|
@@ -10,6 +10,7 @@ export { scopedFilter } from './components/DataTable/scopedFilter.js';
|
|
|
10
10
|
export { textFilter } from './components/DataTable/textFilter.js';
|
|
11
11
|
export { useSavedViewsClient } from './components/DataTable/useSavedViewsClient.js';
|
|
12
12
|
export { Tag } from './components/tag/Tag.js';
|
|
13
|
+
export { TagGroup } from './components/tag-group/TagGroup.js';
|
|
13
14
|
import './components/page-header/index.js';
|
|
14
15
|
import './components/sidenav/index.js';
|
|
15
16
|
import './components/checkbox/tds-indeterminate.js';
|
package/dist/unstable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unstable.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unstable.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
use_when:
|
|
3
|
+
- showing several values for one named field, like the neighborhoods in a filter
|
|
4
|
+
- letting people remove those values, or pick more from a menu
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TagGroup
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
|
|
11
|
+
- **Do** give the group a `label` that names the field, like “Neighborhood”.
|
|
12
|
+
- **Do** set `onChange` when people can remove values. Each Tag then shows a ✕.
|
|
13
|
+
- **Do** add `options` when people can also pick more values. The group name becomes a menu button.
|
|
14
|
+
- **Do** set the style once with the group’s `variant`. It applies to the group name and every Tag.
|
|
15
|
+
- **Don’t** put the Tags of a TagGroup in your own `ul` list. The group is already a list for screen readers.
|
|
16
|
+
- **Don’t** use a TagGroup for one value that is not part of a field. Use a Tag.
|
|
17
|
+
|
|
18
|
+
## Guidelines
|
|
19
|
+
|
|
20
|
+
### When to use
|
|
21
|
+
|
|
22
|
+
- Use to show the values of one field together, after a name that says what they are.
|
|
23
|
+
- Use when people need to see, remove or add values in place, without opening a form.
|
|
24
|
+
|
|
25
|
+
> **Tag or TagGroup?**
|
|
26
|
+
>
|
|
27
|
+
> A Tag shows one value. A TagGroup shows a group name and the values of one field, and it lets people remove values or pick more.
|
|
28
|
+
|
|
29
|
+
### Content
|
|
30
|
+
|
|
31
|
+
- The `label` is the group name. It comes before the Tags.
|
|
32
|
+
- An optional `icon` goes before the group name.
|
|
33
|
+
- Each value in `value` is one Tag. Its `name` is the Tag’s text.
|
|
34
|
+
|
|
35
|
+
### Color
|
|
36
|
+
|
|
37
|
+
- Each value can have its own `color`. The default is `neutral`.
|
|
38
|
+
- The group name is always `neutral`.
|
|
39
|
+
- `variant` sets the style of the group name and every Tag. The default is `subtle`.
|
|
40
|
+
|
|
41
|
+
### Behavior
|
|
42
|
+
|
|
43
|
+
- Screen readers read each Tag as “{label}: {name}”, like “Neighborhood: Nob Hill”.
|
|
44
|
+
- With `options`, Tab goes to the group name first, then to the Tag list.
|
|
45
|
+
- In the Tag list, the arrow keys move between Tags. Delete or Backspace removes the focused Tag. The ✕ is not a Tab stop.
|
|
46
|
+
- Enter, Space, the down arrow and the up arrow open the menu. It opens below the group name, and focus moves to the first checked option. The menu stays open while values are checked and unchecked. A new value goes at the end of the list.
|
|
47
|
+
- When a menu is open, one click on another menu button closes it and opens the other menu.
|
|
48
|
+
- The group renders nothing when it has no values. This also happens when the menu closes with no values checked.
|
package/docs/components/tag.md
CHANGED
|
@@ -14,6 +14,7 @@ use_when:
|
|
|
14
14
|
- **Do** use `onDismiss` when people can remove the value. Use `options` when they can change it to another value. A Tag can have both.
|
|
15
15
|
- **Don’t** give a Tag an `icon` and also a ✕ or a menu. The icons compete. The types do not allow it.
|
|
16
16
|
- **Don’t** use a Tag as a button or a link. A Tag itself does nothing when it is pressed.
|
|
17
|
+
- **Don’t** show the values of one field as a list of Tags, like the neighborhoods in a filter. Use a TagGroup.
|
|
17
18
|
|
|
18
19
|
## Guidelines
|
|
19
20
|
|
|
@@ -33,9 +34,13 @@ use_when:
|
|
|
33
34
|
- Put two or more Tags in a list (`ul` and `li`). Screen readers then read each Tag as its own item.
|
|
34
35
|
- You do not need to add `role="list"`. Safari drops list semantics when `list-style: none` is set, but it still reads each Tag as its own item.
|
|
35
36
|
|
|
37
|
+
> **Tag or TagGroup?**
|
|
38
|
+
>
|
|
39
|
+
> A Tag shows one value. A TagGroup shows a group name and the values of one field, and it lets people remove values or pick more.
|
|
40
|
+
|
|
36
41
|
### Behavior
|
|
37
42
|
|
|
38
43
|
- A Tag itself is not focusable. The ✕ and the menu button are Tab stops.
|
|
39
44
|
- The ✕ is named “Remove {label}: {name}”. The menu button is named “Change {label}: {name}”.
|
|
40
|
-
-
|
|
45
|
+
- Enter, Space, the down arrow and the up arrow open the menu. It opens below the menu button, and focus moves to the current option. A pick closes the menu. Escape also closes it, and focus goes back to the menu button.
|
|
41
46
|
- When a menu is open, one click on another Tag’s menu button closes it and opens the other menu.
|
package/docs/llms.txt
CHANGED
|
@@ -75,6 +75,9 @@ Before building UI, find the component whose "use when" matches what you're buil
|
|
|
75
75
|
- [Sidenav](components/sidenav.md): secondary navigation within one page header tab, like a person’s profile sections; a list of pages or views down the side of a page
|
|
76
76
|
- `import { Sidenav } from "@planningcenter/tapestry"`
|
|
77
77
|
- Props: ../dist/components/sidenav/Sidenav.d.ts
|
|
78
|
+
- [TagGroup](components/tag-group.md): showing several values for one named field, like the neighborhoods in a filter; letting people remove those values, or pick more from a menu
|
|
79
|
+
- `import { TagGroup } from "@planningcenter/tapestry/unstable"`
|
|
80
|
+
- Props: ../dist/components/tag-group/TagGroup.d.ts
|
|
78
81
|
- [Tag](components/tag.md): showing a short value, like a status or a category; showing a value that people can remove or change in place
|
|
79
82
|
- `import { Tag } from "@planningcenter/tapestry/unstable"`
|
|
80
83
|
- Props: ../dist/components/tag/Tag.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/tapestry",
|
|
3
|
-
"version": "4.15.1
|
|
3
|
+
"version": "4.15.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"react-stately": "3.49.0",
|
|
144
144
|
"use-sync-external-store": "^1.7.0"
|
|
145
145
|
},
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "2e7d7903a07e3fd018b040fd0b06208be637520a"
|
|
147
147
|
}
|