@planningcenter/tapestry-react 1.4.0 → 2.0.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.
Files changed (281) hide show
  1. package/dist/cjs/ActionsDropdown/ActionsDropdown.js +3 -3
  2. package/dist/cjs/Badge/Badge.js +41 -26
  3. package/dist/cjs/Badge/Status.js +2 -2
  4. package/dist/cjs/Calendar/Calendar.js +5 -3
  5. package/dist/cjs/Card/Card.js +2 -0
  6. package/dist/cjs/Checkbox/Checkbox.js +3 -3
  7. package/dist/cjs/ChurchCenterStatus/ChurchCenterStatus.js +4 -4
  8. package/dist/cjs/ColumnView/ColumnView.js +5 -2
  9. package/dist/cjs/Combobox/ComboboxPopover.js +2 -2
  10. package/dist/cjs/DataTable/components/CheckboxCell.js +4 -4
  11. package/dist/cjs/DataTable/components/ColumnPicker.js +6 -5
  12. package/dist/cjs/DataTable/hooks/useColumnSort.js +1 -1
  13. package/dist/cjs/DataTable/utils/getParsedColumns.js +4 -4
  14. package/dist/cjs/DateField/DateField.js +1 -1
  15. package/dist/cjs/Drawer/Drawer.js +4 -1
  16. package/dist/cjs/Dropdown/Dropdown.js +1 -1
  17. package/dist/cjs/Dropdown/Link.js +3 -1
  18. package/dist/cjs/EditActions/EditActions.js +9 -3
  19. package/dist/cjs/FieldSet/FieldSet.js +24 -10
  20. package/dist/cjs/FilterLayout/FilterLayout.js +2 -1
  21. package/dist/cjs/Form/Form.js +1 -1
  22. package/dist/cjs/GridView/GridView.js +6 -4
  23. package/dist/cjs/Group/Group.js +8 -3
  24. package/dist/cjs/HeadingUppercase/HeadingUppercase.js +2 -2
  25. package/dist/cjs/HelperDrawer/HelperDrawer.js +1 -1
  26. package/dist/cjs/Highlight/Highlight.js +11 -5
  27. package/dist/cjs/Icon/Status.js +4 -4
  28. package/dist/cjs/Input/InputBox.js +1 -1
  29. package/dist/cjs/List/ListItem.js +1 -1
  30. package/dist/cjs/Menu/Heading.js +1 -0
  31. package/dist/cjs/Pagination/Pagination.js +4 -2
  32. package/dist/cjs/Progress/Progress.js +12 -6
  33. package/dist/cjs/Radio/Radio.js +2 -2
  34. package/dist/cjs/RangeSlider/RangeSlider.js +10 -4
  35. package/dist/cjs/Scrim/Scrim.js +2 -2
  36. package/dist/cjs/Section/Section.js +14 -6
  37. package/dist/cjs/Select/Option.js +1 -1
  38. package/dist/cjs/Select/Select.js +1 -1
  39. package/dist/cjs/Sortable/SortableItem.js +1 -1
  40. package/dist/cjs/StackView/StackView.js +5 -5
  41. package/dist/cjs/StepperField/StepperField.js +9 -6
  42. package/dist/cjs/StepperProgress/StepperProgress.js +9 -5
  43. package/dist/cjs/Table/ColumnPicker.js +1 -1
  44. package/dist/cjs/Table/DragHandle.js +1 -1
  45. package/dist/cjs/Table/NavigationArrow.js +1 -1
  46. package/dist/cjs/Table/SubRowToggleCell.js +1 -1
  47. package/dist/cjs/Table/Table.js +1 -1
  48. package/dist/cjs/Tabs/Tab.js +1 -0
  49. package/dist/cjs/TileView/TileView.js +1 -1
  50. package/dist/cjs/TokenInput/DefaultToken.js +1 -1
  51. package/dist/cjs/Wizard/Wizard.js +2 -1
  52. package/dist/cjs/WrapView/WrapView.js +2 -27
  53. package/dist/cjs/hooks/use-accessibility-violation.js +1 -1
  54. package/dist/cjs/system/default-theme.js +8 -3
  55. package/dist/esm/ActionsDropdown/ActionsDropdown.js +3 -3
  56. package/dist/esm/Badge/Badge.js +42 -27
  57. package/dist/esm/Badge/Status.js +2 -2
  58. package/dist/esm/Calendar/Calendar.js +5 -3
  59. package/dist/esm/Card/Card.js +2 -3
  60. package/dist/esm/Checkbox/Checkbox.js +3 -3
  61. package/dist/esm/ChurchCenterStatus/ChurchCenterStatus.js +4 -4
  62. package/dist/esm/ColumnView/ColumnView.js +4 -2
  63. package/dist/esm/Combobox/ComboboxPopover.js +2 -2
  64. package/dist/esm/DataTable/components/CheckboxCell.js +4 -4
  65. package/dist/esm/DataTable/components/ColumnPicker.js +6 -5
  66. package/dist/esm/DataTable/hooks/useColumnSort.js +1 -1
  67. package/dist/esm/DataTable/utils/getParsedColumns.js +4 -4
  68. package/dist/esm/DateField/DateField.js +1 -1
  69. package/dist/esm/Drawer/Drawer.js +3 -1
  70. package/dist/esm/Dropdown/Dropdown.js +1 -1
  71. package/dist/esm/Dropdown/Link.js +3 -1
  72. package/dist/esm/EditActions/EditActions.js +8 -3
  73. package/dist/esm/FieldSet/FieldSet.js +22 -10
  74. package/dist/esm/FilterLayout/FilterLayout.js +2 -1
  75. package/dist/esm/Form/Form.js +1 -1
  76. package/dist/esm/GridView/GridView.js +5 -4
  77. package/dist/esm/Group/Group.js +8 -3
  78. package/dist/esm/HeadingUppercase/HeadingUppercase.js +3 -3
  79. package/dist/esm/HelperDrawer/HelperDrawer.js +1 -1
  80. package/dist/esm/Highlight/Highlight.js +9 -5
  81. package/dist/esm/Icon/Status.js +4 -4
  82. package/dist/esm/Input/InputBox.js +1 -1
  83. package/dist/esm/List/ListItem.js +1 -1
  84. package/dist/esm/Menu/Heading.js +1 -0
  85. package/dist/esm/Pagination/Pagination.js +4 -2
  86. package/dist/esm/Progress/Progress.js +10 -6
  87. package/dist/esm/Radio/Radio.js +2 -2
  88. package/dist/esm/RangeSlider/RangeSlider.js +8 -4
  89. package/dist/esm/Scrim/Scrim.js +2 -2
  90. package/dist/esm/Section/Section.js +12 -6
  91. package/dist/esm/Select/Option.js +1 -1
  92. package/dist/esm/Select/Select.js +1 -1
  93. package/dist/esm/Sortable/SortableItem.js +1 -1
  94. package/dist/esm/StackView/StackView.js +4 -5
  95. package/dist/esm/StepperField/StepperField.js +10 -7
  96. package/dist/esm/StepperProgress/StepperProgress.js +8 -5
  97. package/dist/esm/Table/ColumnPicker.js +1 -1
  98. package/dist/esm/Table/DragHandle.js +1 -1
  99. package/dist/esm/Table/NavigationArrow.js +1 -1
  100. package/dist/esm/Table/SubRowToggleCell.js +1 -1
  101. package/dist/esm/Table/Table.js +1 -1
  102. package/dist/esm/Tabs/Tab.js +1 -0
  103. package/dist/esm/TileView/TileView.js +1 -1
  104. package/dist/esm/TokenInput/DefaultToken.js +1 -1
  105. package/dist/esm/Wizard/Wizard.js +2 -1
  106. package/dist/esm/WrapView/WrapView.js +2 -28
  107. package/dist/esm/hooks/use-accessibility-violation.js +1 -1
  108. package/dist/esm/system/default-theme.js +6 -2
  109. package/dist/types/Alert/Alert.d.ts +3 -0
  110. package/dist/types/Box/Box.d.ts +11 -2
  111. package/dist/types/Button/Button.d.ts +9 -1
  112. package/dist/types/Button/Input.d.ts +1 -1
  113. package/dist/types/Card/Card.d.ts +8 -1
  114. package/dist/types/GridView/GridView.d.ts +16 -4
  115. package/dist/types/Scrim/Scrim.d.ts +6 -1
  116. package/dist/types/StackView/StackView.d.ts +11 -0
  117. package/dist/types/Text/Text.d.ts +12 -0
  118. package/dist/types/TileView/TileView.d.ts +15 -7
  119. package/dist/types/WrapView/WrapView.d.ts +2 -1
  120. package/package.json +3 -2
  121. package/src/ActionsDropdown/ActionsDropdown.tsx +3 -3
  122. package/src/Alert/Alert.mdx +1 -0
  123. package/src/Alert/Alert.tsx +5 -0
  124. package/src/Avatar/Avatar.mdx +1 -0
  125. package/src/Badge/Badge.js +66 -25
  126. package/src/Badge/Badge.mdx +2 -1
  127. package/src/Badge/Status.js +2 -2
  128. package/src/Badge/Status.mdx +1 -0
  129. package/src/Box/Box.mdx +2 -1
  130. package/src/Box/Box.tsx +13 -2
  131. package/src/Button/Button.mdx +4 -3
  132. package/src/Button/Button.tsx +11 -0
  133. package/src/Button/Input.mdx +2 -2
  134. package/src/Calendar/Calendar.js +8 -3
  135. package/src/Calendar/Calendar.mdx +1 -0
  136. package/src/Card/Card.mdx +1 -0
  137. package/src/Card/Card.tsx +7 -1
  138. package/src/Checkbox/Checkbox.js +8 -3
  139. package/src/Checkbox/Checkbox.mdx +1 -0
  140. package/src/CheckboxCard/CheckboxCard.js +26 -1
  141. package/src/CheckboxCard/CheckboxCard.mdx +1 -0
  142. package/src/CheckboxGroup/CheckboxGroup.js +6 -0
  143. package/src/CheckboxGroup/CheckboxGroup.mdx +1 -0
  144. package/src/ChurchCenterStatus/ChurchCenterStatus.mdx +1 -0
  145. package/src/ChurchCenterStatus/ChurchCenterStatus.tsx +4 -4
  146. package/src/Collapse/Collapse.js +2 -0
  147. package/src/ColumnView/ColumnView.js +7 -3
  148. package/src/ColumnView/ColumnView.mdx +1 -0
  149. package/src/Combobox/Combobox.js +11 -1
  150. package/src/Combobox/Combobox.mdx +2 -1
  151. package/src/Combobox/ComboboxPopover.js +2 -2
  152. package/src/DataTable/DataTable.js +48 -0
  153. package/src/DataTable/DataTable.mdx +2 -2
  154. package/src/DataTable/components/CheckboxCell.js +5 -4
  155. package/src/DataTable/components/ColumnPicker.js +4 -4
  156. package/src/DataTable/hooks/useColumnSort.js +1 -1
  157. package/src/DataTable/utils/getParsedColumns.js +4 -4
  158. package/src/DateField/DateField.js +11 -1
  159. package/src/DateField/DateField.mdx +1 -0
  160. package/src/Divider/Divider.mdx +1 -0
  161. package/src/DragDrop/DragDrop.mdx +23 -9
  162. package/src/Drawer/Drawer.js +3 -0
  163. package/src/Drawer/Drawer.mdx +2 -1
  164. package/src/Dropdown/Dropdown.js +49 -3
  165. package/src/Dropdown/Dropdown.mdx +3 -2
  166. package/src/Dropdown/Link.js +3 -1
  167. package/src/EditActions/EditActions.js +18 -3
  168. package/src/EditActions/EditActions.mdx +1 -0
  169. package/src/Field/Field.js +15 -0
  170. package/src/Field/Field.mdx +1 -0
  171. package/src/FieldSet/FieldSet.js +35 -11
  172. package/src/FieldSet/FieldSet.mdx +1 -0
  173. package/src/FilterLayout/FilterLayout.mdx +1 -0
  174. package/src/FilterLayout/FilterLayout.tsx +4 -1
  175. package/src/Form/Form.js +1 -1
  176. package/src/Form/Form.mdx +26 -24
  177. package/src/GridView/GridView.mdx +2 -1
  178. package/src/GridView/GridView.tsx +27 -8
  179. package/src/Group/Group.mdx +8 -7
  180. package/src/Group/Group.tsx +6 -1
  181. package/src/Heading/Heading.js +6 -2
  182. package/src/Heading/Heading.mdx +1 -0
  183. package/src/HeadingUppercase/HeadingUppercase.js +9 -5
  184. package/src/HeadingUppercase/HeadingUppercase.mdx +1 -0
  185. package/src/HelperDrawer/HelperDrawer.js +10 -2
  186. package/src/HelperDrawer/HelperDrawer.mdx +1 -0
  187. package/src/Highlight/Highlight.js +6 -2
  188. package/src/Highlight/Highlight.mdx +1 -0
  189. package/src/Icon/Icon.js +6 -0
  190. package/src/Icon/Icon.mdx +42 -37
  191. package/src/Icon/Status.js +4 -4
  192. package/src/Input/Inline.js +11 -1
  193. package/src/Input/Inline.mdx +2 -1
  194. package/src/Input/Input.js +119 -1
  195. package/src/Input/Input.mdx +1 -6
  196. package/src/Input/InputBox.js +41 -1
  197. package/src/Input/InputBox.mdx +1 -0
  198. package/src/Input/InputField.js +32 -0
  199. package/src/Input/InputField.mdx +1 -0
  200. package/src/Input/InputLabel.mdx +1 -0
  201. package/src/Link/Link.js +10 -0
  202. package/src/Link/Link.mdx +2 -1
  203. package/src/LinkList/LinkList.js +7 -1
  204. package/src/LinkList/LinkList.mdx +1 -0
  205. package/src/List/List.js +25 -1
  206. package/src/List/List.mdx +1 -0
  207. package/src/List/ListItem.js +1 -1
  208. package/src/Logo/Logo.js +10 -1
  209. package/src/Logo/Logo.mdx +1 -0
  210. package/src/Menu/Heading.js +1 -0
  211. package/src/Menu/Menu.js +7 -1
  212. package/src/Menu/Menu.mdx +2 -1
  213. package/src/Modal/Modal.js +1 -0
  214. package/src/Modal/Modal.mdx +1 -0
  215. package/src/NumberField/NumberField.js +19 -0
  216. package/src/Page/Page.mdx +1 -1
  217. package/src/PagerView/PagerView.js +1 -0
  218. package/src/PagerView/PagerView.mdx +9 -8
  219. package/src/Pagination/Pagination.js +2 -2
  220. package/src/Pagination/Pagination.mdx +1 -0
  221. package/src/Progress/Progress.js +8 -3
  222. package/src/Progress/Progress.mdx +1 -0
  223. package/src/Radio/Radio.js +4 -2
  224. package/src/Radio/Radio.mdx +1 -0
  225. package/src/RangeSlider/RangeSlider.js +11 -2
  226. package/src/RangeSlider/RangeSlider.mdx +13 -10
  227. package/src/ScreenReader/ScreenReader.js +6 -1
  228. package/src/ScreenReader/ScreenReader.mdx +1 -0
  229. package/src/Scrim/Scrim.mdx +1 -0
  230. package/src/Scrim/Scrim.tsx +8 -2
  231. package/src/Section/Section.js +15 -3
  232. package/src/Section/Section.mdx +1 -0
  233. package/src/SegmentedControl/SegmentedControl.mdx +3 -2
  234. package/src/SegmentedTabs/SegmentedTabs.js +2 -0
  235. package/src/SegmentedTabs/SegmentedTabs.mdx +1 -0
  236. package/src/Select/Option.js +1 -1
  237. package/src/Select/Select.js +63 -2
  238. package/src/Select/Select.mdx +1 -0
  239. package/src/Sidebar/Sidebar.js +7 -1
  240. package/src/Sidebar/Sidebar.mdx +1 -0
  241. package/src/Sortable/SortableItem.js +1 -1
  242. package/src/Spinner/Spinner.mdx +1 -0
  243. package/src/StackView/StackView.mdx +17 -1
  244. package/src/StackView/StackView.tsx +23 -8
  245. package/src/StepperField/StepperField.js +35 -6
  246. package/src/StepperField/StepperField.mdx +2 -2
  247. package/src/StepperProgress/StepperProgress.js +9 -10
  248. package/src/StepperProgress/StepperProgress.mdx +1 -0
  249. package/src/Summary/Summary.mdx +1 -0
  250. package/src/Tab/Tab.mdx +1 -0
  251. package/src/Table/ColumnPicker.js +1 -1
  252. package/src/Table/DragHandle.js +1 -1
  253. package/src/Table/NavigationArrow.js +1 -1
  254. package/src/Table/SubRowToggleCell.js +1 -1
  255. package/src/Table/Table.js +1 -1
  256. package/src/Table/Table.mdx +2 -2
  257. package/src/Tabs/Tab.js +1 -0
  258. package/src/Tabs/Tabs.js +5 -0
  259. package/src/Tabs/Tabs.mdx +1 -0
  260. package/src/Text/Text.mdx +1 -0
  261. package/src/Text/Text.tsx +12 -0
  262. package/src/TextArea/TextArea.js +7 -1
  263. package/src/TextArea/TextArea.mdx +1 -0
  264. package/src/TileView/TileView.mdx +1 -0
  265. package/src/TileView/TileView.tsx +17 -3
  266. package/src/TimeField/TimeField.mdx +1 -0
  267. package/src/TokenInput/DefaultToken.js +1 -1
  268. package/src/TokenInput/TokenInput.js +12 -6
  269. package/src/TokenInput/TokenInput.mdx +1 -0
  270. package/src/Toolbar/Toolbar.mdx +1 -0
  271. package/src/Tooltip/Tooltip.js +39 -0
  272. package/src/Tooltip/Tooltip.mdx +4 -3
  273. package/src/Wizard/Wizard.js +1 -1
  274. package/src/Wizard/Wizard.mdx +7 -2
  275. package/src/WrapView/WrapView.mdx +1 -0
  276. package/src/WrapView/WrapView.tsx +6 -28
  277. package/src/hooks/use-accessibility-violation.tsx +1 -1
  278. package/src/system/default-theme.ts +7 -2
  279. package/dist/cjs/icons.js +0 -126
  280. package/dist/esm/icons.js +0 -121
  281. package/src/icons.js +0 -121
@@ -2,6 +2,7 @@
2
2
  title: Input.InputLabel
3
3
  category: Forms
4
4
  summary: Provides accessibility as well as usability improvements for mouse users by allowing the user to click the <InputLabel/> component to focus the respective control. This mimics the browsers native label tag, but allows use with custom components like <Select/>.
5
+ propsSummary: Accepts [Text](/text) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
package/src/Link/Link.js CHANGED
@@ -23,6 +23,16 @@ type Props = {
23
23
  * Show an underline when hovering link. Defaults to `true`.
24
24
  */
25
25
  underline: boolean,
26
+
27
+ /**
28
+ * Accepts hover styles.
29
+ */
30
+ hover?: object,
31
+
32
+ /**
33
+ * Accepts hover styles.
34
+ */
35
+ focus?: object,
26
36
  }
27
37
 
28
38
  function Link({
package/src/Link/Link.mdx CHANGED
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Link
3
3
  category: General
4
+ propsSummary: Accepts [Text](/text) props.
4
5
  ---
5
6
 
6
7
  ```jsx live
@@ -18,7 +19,7 @@ render(
18
19
  alignment="center"
19
20
  padding={1}
20
21
  backgroundColor="primary"
21
- spacing={<Icon name="caret-right" color="white" marginHorizontal={0.25} />}
22
+ spacing={<Icon name="general.rightChevron" size="xs" color="white" marginHorizontal={0.5} />}
22
23
  >
23
24
  <Link to="#" color="white">
24
25
  First Church Of Carlsbad
@@ -1,10 +1,16 @@
1
+ // @flow
1
2
  import React from 'react'
2
3
 
3
4
  import Divider from '../Divider'
4
5
  import Link from '../Link'
5
6
  import StackView from '../StackView'
6
7
 
7
- function LinkList({ links, ...restProps }) {
8
+ type Props = {
9
+ /** Accepts an array of objects that specify the `name` and `url` for each link. */
10
+ links?: array,
11
+ }
12
+
13
+ function LinkList({ links, ...restProps }: Props) {
8
14
  return (
9
15
  <StackView
10
16
  axis="horizontal"
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: LinkList
3
3
  category: General
4
+ propsSummary: Accepts [StackView](/stackview) props.
4
5
  ---
5
6
 
6
7
  ```jsx live
package/src/List/List.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @flow
1
2
  import React from 'react'
2
3
 
3
4
  import StackView from '../StackView'
@@ -5,6 +6,29 @@ import { cloneChildren } from '../utils'
5
6
 
6
7
  import ListItem from './ListItem'
7
8
 
9
+ type Props = {
10
+ /** Can accept any HTML element or custom component, but most often takes the `List.Item` component. */
11
+ children?: React.ReactNode,
12
+
13
+ /** When set this will add a 1px border top and bottom, along with the `borderColor`. */
14
+ border?: Boolean,
15
+
16
+ /** Defaults to "separatorTertiary". */
17
+ borderColor?: string,
18
+
19
+ /** Adds a dividing line between the List's children. (Defaults to true). */
20
+ divider?: Boolean,
21
+
22
+ /** Defaults to "separatorTertiary". */
23
+ dividerColor?: string,
24
+
25
+ /**
26
+ * `(index) => {}`
27
+ *
28
+ * Passes a callback function to the list's children. If the child is `List.Item` it will display a remove button and execute the callback. */
29
+ onItemRemoveRequest?: Function,
30
+ }
31
+
8
32
  function List({
9
33
  border,
10
34
  borderColor = 'separatorTertiary',
@@ -13,7 +37,7 @@ function List({
13
37
  dividerColor = 'separatorTertiary',
14
38
  onItemRemoveRequest,
15
39
  ...restProps
16
- }) {
40
+ }: Props) {
17
41
  if (border) {
18
42
  restProps.borderTopWidth = 1
19
43
  restProps.borderTopColor = borderColor
package/src/List/List.mdx CHANGED
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: List
3
3
  category: General
4
+ propsSummary: Accepts [StackView](/stackview) props.
4
5
  ---
5
6
 
6
7
  ```jsx live
@@ -24,7 +24,7 @@ function ListItem({
24
24
  {children}
25
25
  {onRemoveRequest && (
26
26
  <Button
27
- icon={{ name: 'remove-circle-filled' }}
27
+ icon={{ name: 'general.minusCircle' }}
28
28
  title={removeTitle}
29
29
  size="sm"
30
30
  theme="error"
package/src/Logo/Logo.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @flow
1
2
  import React from 'react'
2
3
 
3
4
  import Box from '../Box'
@@ -79,7 +80,15 @@ const type = {
79
80
  },
80
81
  }
81
82
 
82
- const Logo = ({ name, markOnly, ...restProps }) => {
83
+ type Props = {
84
+ /** Accepts `"services"` or `"music-stand"`. */
85
+ name?: string,
86
+
87
+ /** Only displays the "iconmark" portion of the logo and not the wordmark. */
88
+ markOnly?: Boolean,
89
+ }
90
+
91
+ const Logo = ({ name, markOnly, ...restProps }: Props) => {
83
92
  if (markOnly) {
84
93
  return (
85
94
  <Box
package/src/Logo/Logo.mdx CHANGED
@@ -2,6 +2,7 @@
2
2
  title: Logo
3
3
  category: General
4
4
  summary: Generates an SVG for the respective app's logo which includes the mark and/or type.
5
+ propsSummary: Accepts [Box](/box) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -15,4 +15,5 @@ function Heading({ children, ...restProps }) {
15
15
  )
16
16
  }
17
17
 
18
+ Heading.displayName = 'Menu.Heading'
18
19
  export default Heading
package/src/Menu/Menu.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @flow
1
2
  import React from 'react'
2
3
 
3
4
  import Card from '../Card'
@@ -5,7 +6,12 @@ import Card from '../Card'
5
6
  import Heading from './Heading'
6
7
  import Item from './Item'
7
8
 
8
- function Menu(props) {
9
+ export type Props = {
10
+ /** Often wraps `Menu.Item` and `Menu.Heading` components. */
11
+ children?: any,
12
+ }
13
+
14
+ function Menu(props: Props) {
9
15
  return (
10
16
  <Card
11
17
  paddingVertical={0.5}
package/src/Menu/Menu.mdx CHANGED
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Menu
3
3
  category: General
4
+ propsSummary: Accepts [Card](/card) props.
4
5
  ---
5
6
 
6
7
  ```jsx live
@@ -19,7 +20,7 @@ render(
19
20
  <Menu.Item isHighlighted>Can be highlighted</Menu.Item>
20
21
  <Menu.Item>Should be used as a child of Menu</Menu.Item>
21
22
  <Menu.Item>
22
- <Icon name="person" marginRight={1} /> Add icons and other things
23
+ <Icon name="general.person" marginRight={1} /> Add icons and other things
23
24
  </Menu.Item>
24
25
  </Menu>
25
26
  )
@@ -7,6 +7,7 @@ import { useDocumentEvent } from '../hooks'
7
7
  import { trapFocus } from '../utils'
8
8
 
9
9
  export type ModalProps = {
10
+ children?: any,
10
11
  /**
11
12
  * Close the modal when clicking outside of it.
12
13
  */
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Modal
3
3
  category: Overlays
4
+ propsSummary: Accepts [Box](/box) props.
4
5
  ---
5
6
 
6
7
  ```jsx live
@@ -5,6 +5,10 @@ import InputField from '../Input/InputField'
5
5
  import { padNumber, getTabbableSiblings } from '../utils'
6
6
 
7
7
  type Props = {
8
+ /**
9
+ * Render custom component or HTML element tag. (Defaults to a [InputField](/input.inputfield) component.). */
10
+ as?: any,
11
+
8
12
  /**
9
13
  * An array of keys to ignore when pushed.
10
14
  * ex: ["ArrowUp", "ArrowDown"].
@@ -29,11 +33,23 @@ type Props = {
29
33
  */
30
34
  onChange: (value: string) => null,
31
35
 
36
+ /**
37
+ * Maps to the input's `onBlur` prop.
38
+ */
39
+ onBlur?: () => null,
40
+
41
+ onKeyDown?: Function,
42
+
32
43
  /**
33
44
  * The amount of 0s to pad the value with.
34
45
  */
35
46
  pad: number,
36
47
 
48
+ /**
49
+ * Forces the input text to stay fully selected while interacting with it.
50
+ */
51
+ highlightOnInteraction: boolean,
52
+
37
53
  /**
38
54
  * String to display when value is empty.
39
55
  */
@@ -49,6 +65,9 @@ type Props = {
49
65
  * The value of the input.
50
66
  */
51
67
  value: number,
68
+
69
+ autoWidth: boolean,
70
+ moveFocusOnMax: boolean,
52
71
  }
53
72
 
54
73
  const MIN_VALUE = -Infinity
package/src/Page/Page.mdx CHANGED
@@ -102,7 +102,7 @@ render(
102
102
  }
103
103
  >
104
104
  <StackView axis="horizontal" alignment="center" spacing={2}>
105
- <Icon name="person" size="xxl" color="white" />
105
+ <Icon name="general.person" size="xxl" color="white" />
106
106
  <StackView>
107
107
  <Heading level={5} color="light-7">
108
108
  Steingard Tests > Sunday
@@ -48,6 +48,7 @@ function parseTrackValue(value) {
48
48
  const PageViewContext = createContext({})
49
49
 
50
50
  export type Props = {
51
+ children?: any,
51
52
  /**
52
53
  * Which axis the track moves on. Defaults to `horizontal`.
53
54
  */
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  title: PagerView
3
3
  category: Layout
4
- summary: Allows paging between views. Use with the `useRovingIndex` hook to control the [activeViewIndex](#activeViewIndex).
4
+ summary: Allows paging between views. Use with the [useRovingIndex](https://github.com/ministrycentered/tapestry-react/blob/next/packages/tapestry-react/src/hooks/use-roving-index.js) hook to control the [activeViewIndex](#activeViewIndex).
5
+ propsSummary: Accepts [StackView](/stackview) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -45,14 +46,14 @@ render(() => {
45
46
  <StackView axis="horizontal" distribution="center" spacing={1}>
46
47
  <Button
47
48
  title="Prev"
48
- icon={{ name: 'caret-left' }}
49
+ icon={{ name: 'general.leftChevron', size: 'sm' }}
49
50
  radius="circle"
50
51
  disabled={moveBackwardDisabled}
51
52
  onClick={() => moveActiveIndex(-1)}
52
53
  />
53
54
  <Button
54
55
  title="Next"
55
- icon={{ name: 'caret-right' }}
56
+ icon={{ name: 'general.rightChevron', size: 'sm' }}
56
57
  radius="circle"
57
58
  disabled={moveForwardDisabled}
58
59
  onClick={() => moveActiveIndex(1)}
@@ -83,7 +84,7 @@ function Arrangement({ expanded, expandOrShrink }) {
83
84
  actions={
84
85
  <Button
85
86
  title={expanded ? 'show single-view' : 'show multi-view'}
86
- icon={{ name: expanded ? 'caret-shrink' : 'caret-grow' }}
87
+ icon={{ name: expanded ? 'general.twoInwardChevrons' : 'general.twoOutwardChevrons' }}
87
88
  variant="naked"
88
89
  onClick={expandOrShrink}
89
90
  />
@@ -99,10 +100,10 @@ function Key({ name, expanded, expandOrShrink }) {
99
100
  <Toolbar
100
101
  title={name}
101
102
  actions={[
102
- <Button title="edit" icon={{ name: 'pencil' }} variant="naked" />,
103
+ <Button title="edit" icon={{ name: 'general.pencil' }} variant="naked" />,
103
104
  <Button
104
105
  title={expanded ? 'show single-view' : 'show multi-view'}
105
- icon={{ name: expanded ? 'caret-shrink' : 'caret-grow' }}
106
+ icon={{ name: expanded ? 'general.twoInwardChevrons' : 'general.twoOutwardChevrons' }}
106
107
  variant="naked"
107
108
  onClick={expandOrShrink}
108
109
  />,
@@ -157,7 +158,7 @@ render(() => {
157
158
  <GridView columns="auto 1fr auto" spacing={1}>
158
159
  <Button
159
160
  title="Prev"
160
- icon={{ name: 'caret-left' }}
161
+ icon={{ name: 'general.leftChevron', size: 'sm' }}
161
162
  radius="circle"
162
163
  disabled={moveBackwardDisabled}
163
164
  onClick={() => moveActiveIndex(-1)}
@@ -187,7 +188,7 @@ render(() => {
187
188
  </StackView>
188
189
  <Button
189
190
  title="Next"
190
- icon={{ name: 'caret-right' }}
191
+ icon={{ name: 'general.rightChevron', size: 'sm' }}
191
192
  radius="circle"
192
193
  disabled={moveForwardDisabled}
193
194
  onClick={() => moveActiveIndex(1)}
@@ -123,7 +123,7 @@ class Pagination extends Component<PaginationProps> {
123
123
  <Button
124
124
  onClick={onPageChange.bind(null, currentPage - 1)}
125
125
  disabled={currentPage === 1}
126
- icon={{ name: 'caret-left' }}
126
+ icon={{ name: 'general.leftChevron', size: 'xs' }}
127
127
  tooltip={{ title: 'Previous Page' }}
128
128
  variant="naked"
129
129
  shrink={0}
@@ -132,7 +132,7 @@ class Pagination extends Component<PaginationProps> {
132
132
  <Button
133
133
  onClick={onPageChange.bind(null, currentPage + 1)}
134
134
  disabled={currentPage === totalPages}
135
- icon={{ name: 'caret-right' }}
135
+ icon={{ name: 'general.rightChevron', size: 'xs' }}
136
136
  tooltip={{ title: 'Next Page' }}
137
137
  variant="naked"
138
138
  shrink={0}
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Pagination
3
3
  category: General
4
+ propsSummary: Accepts [StackView](/stackview) props.
4
5
  ---
5
6
 
6
7
  ```jsx live
@@ -2,6 +2,7 @@
2
2
  import React from 'react'
3
3
 
4
4
  import Box from '../Box'
5
+ import { useThemeProps } from '../system'
5
6
 
6
7
  export type Props = {
7
8
  /**
@@ -14,8 +15,12 @@ export type Props = {
14
15
  activeColor?: string,
15
16
  }
16
17
 
17
- function Progress(props: Props) {
18
- const { value, activeColor = 'primary', ...restProps } = props
18
+ function Progress({ value, ...restProps }: Props) {
19
+ const { activeColor = 'primary', ...themeProps } = useThemeProps(
20
+ 'progress',
21
+ restProps
22
+ )
23
+
19
24
  return (
20
25
  <Box
21
26
  role="progressbar"
@@ -26,7 +31,7 @@ function Progress(props: Props) {
26
31
  position="relative"
27
32
  overflow="hidden"
28
33
  backgroundColor="grey-3"
29
- {...restProps}
34
+ {...themeProps}
30
35
  >
31
36
  <Box
32
37
  position="absolute"
@@ -2,6 +2,7 @@
2
2
  title: Progress
3
3
  category: Indicators
4
4
  summary: Display progress towards the completion of a task. Composes [Box](/box).
5
+ propsSummary: Accepts [Box](/box) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -10,8 +10,8 @@ import VariantProvider from '../VariantProvider'
10
10
  import { useThemeValue } from '../system'
11
11
 
12
12
  const iconPaths = {
13
- fill: 'radio-0',
14
- checked: 'radio-1',
13
+ fill: 'tapestry.radio0',
14
+ checked: 'tapestry.radio1',
15
15
  }
16
16
 
17
17
  export type Props = {
@@ -25,6 +25,8 @@ export type Props = {
25
25
  */
26
26
  label?: string,
27
27
 
28
+ id?: string | number,
29
+
28
30
  /**
29
31
  * Checks the radio.
30
32
  */
@@ -2,6 +2,7 @@
2
2
  title: Radio
3
3
  category: Forms
4
4
  summary: Use radios to present a list of options where users can only make a single selection.
5
+ propsSummary: Accepts [StackView](/stackview) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -4,6 +4,7 @@ import { clamp, snap } from '@popmotion/popcorn'
4
4
 
5
5
  import Box from '../Box'
6
6
  import { useMeasure } from '../hooks'
7
+ import { useThemeProps } from '../system'
7
8
 
8
9
  export type Props = {
9
10
  /**
@@ -34,6 +35,10 @@ export type Props = {
34
35
  progress?: Object,
35
36
  thumb?: Object,
36
37
  },
38
+ /**
39
+ * Prevents the slider from being used and lowers its opacity.
40
+ */
41
+ disabled?: boolean,
37
42
  }
38
43
 
39
44
  function RangeSlider(props: Props) {
@@ -44,10 +49,14 @@ function RangeSlider(props: Props) {
44
49
  disabled,
45
50
  value,
46
51
  onChange,
47
- variant = {},
48
52
  ...restProps
49
53
  } = props
50
54
 
55
+ const { variant = {}, ...themeProps } = useThemeProps(
56
+ 'rangeSlider',
57
+ restProps
58
+ )
59
+
51
60
  const snapTo = snap(step)
52
61
  const sliderRef = useRef()
53
62
  const trackRef = useRef()
@@ -185,7 +194,7 @@ function RangeSlider(props: Props) {
185
194
  opacity={disabled ? 0.65 : undefined}
186
195
  onMouseDown={disabled ? undefined : handleTrackPointerDown}
187
196
  onTouchStart={disabled ? undefined : handleTrackPointerDown}
188
- {...restProps}
197
+ {...themeProps}
189
198
  >
190
199
  <Box
191
200
  innerRef={trackRef}
@@ -2,6 +2,7 @@
2
2
  title: RangeSlider
3
3
  category: Forms
4
4
  summary: Allow the user to specify a numeric value which must be no less than a minimum value and no more than a maximum value. Composes [Box](/box).
5
+ propsSummary: Accepts [Box](/box) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -9,16 +10,18 @@ render(() => {
9
10
  const [volume, setVolume] = React.useState(50)
10
11
  const muted = volume === 0
11
12
  return (
12
- <StackView axis="horizontal" alignment="center" width="25%" spacing={1}>
13
- <Icon>
14
- <Icon.Path name="volume-0" />
15
- <Icon.Path name="volume-1" visible={muted} />
16
- <Icon.Path name="volume-2" visible={!muted} />
17
- <Icon.Path name="volume-3" visible={!muted && volume > 50} />
18
- </Icon>
19
- <RangeSlider value={volume} onChange={setVolume} />
20
- <Text>{volume}</Text>
21
- </StackView>
13
+ <ThemeProvider theme={{ icons }}>
14
+ <StackView axis="horizontal" alignment="center" width="25%" spacing={1}>
15
+ <Icon>
16
+ <Icon.Path name="services.volume0" />
17
+ <Icon.Path name="services.volume1" visible={muted} />
18
+ <Icon.Path name="services.volume2" visible={!muted} />
19
+ <Icon.Path name="services.volume3" visible={!muted && volume > 50} />
20
+ </Icon>
21
+ <RangeSlider value={volume} onChange={setVolume} />
22
+ <Text>{volume}</Text>
23
+ </StackView>
24
+ </ThemeProvider>
22
25
  )
23
26
  })
24
27
  ```
@@ -1,8 +1,13 @@
1
+ // @flow
1
2
  import React from 'react'
2
3
 
3
4
  import Box from '../Box'
4
5
 
5
- function ScreenReader(props) {
6
+ export type Props = {
7
+ children?: any,
8
+ }
9
+
10
+ function ScreenReader(props: Props) {
6
11
  return (
7
12
  <Box
8
13
  css={{
@@ -2,6 +2,7 @@
2
2
  title: ScreenReader
3
3
  category: General
4
4
  summary: Use to display screen reader only content.
5
+ propsSummary: Accepts [Box](/box) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -2,6 +2,7 @@
2
2
  title: Scrim
3
3
  category: Overlays
4
4
  summary: Scrims are used to display focused content like alerts, modals, or media previews.
5
+ propsSummary: Accepts [StackView](/stackview) props.
5
6
  ---
6
7
 
7
8
  ```jsx live
@@ -2,7 +2,13 @@ import * as React from 'react'
2
2
 
3
3
  import StackView from '../StackView'
4
4
 
5
- const Scrim = React.forwardRef(function (props, ref) {
5
+ type ScrimProps = {
6
+ /** Gain access to the internal ref. */
7
+ ref?: any,
8
+ children?: any,
9
+ }
10
+
11
+ const Scrim = React.forwardRef(function (props: ScrimProps,) {
6
12
  React.useLayoutEffect(() => {
7
13
  document.body.style.overflow = 'hidden'
8
14
  return () => {
@@ -11,7 +17,7 @@ const Scrim = React.forwardRef(function (props, ref) {
11
17
  }, [])
12
18
  return (
13
19
  <StackView
14
- innerRef={ref}
20
+ innerRef={props.ref}
15
21
  position="fixed"
16
22
  top={0}
17
23
  right={0}
@@ -5,6 +5,7 @@ import type { ChildrenArray } from 'react'
5
5
  import Heading from '../Heading'
6
6
  import Toolbar from '../Toolbar'
7
7
  import StackView from '../StackView'
8
+ import { useThemeProps } from '../system'
8
9
 
9
10
  import type { ToolbarProps } from '../Toolbar'
10
11
 
@@ -16,17 +17,27 @@ function Section({
16
17
  actions = [],
17
18
  children,
18
19
  count,
19
- countColor,
20
20
  helpContent,
21
21
  onStatusClearRequest,
22
22
  status,
23
23
  title,
24
24
  ...restProps
25
25
  }: SectionProps) {
26
+ const {
27
+ countColor,
28
+ headingProps,
29
+ toolbarProps,
30
+ ...themeProps
31
+ } = useThemeProps('section', restProps)
32
+
26
33
  return (
27
- <StackView as="section" {...restProps}>
34
+ <StackView as="section" {...themeProps}>
28
35
  <Toolbar
29
- title={<Heading level={3}>{title}</Heading>}
36
+ title={
37
+ <Heading level={3} {...headingProps}>
38
+ {title}
39
+ </Heading>
40
+ }
30
41
  helpContent={helpContent}
31
42
  actions={actions}
32
43
  count={count}
@@ -34,6 +45,7 @@ function Section({
34
45
  status={status}
35
46
  onStatusClearRequest={onStatusClearRequest}
36
47
  marginBottom={2}
48
+ {...toolbarProps}
37
49
  />
38
50
  {children}
39
51
  </StackView>
@@ -2,6 +2,7 @@
2
2
  title: Section
3
3
  category: General
4
4
  summary: Sections are used within `Page` components to break up content into sections that always display a `Toolbar` at the top.
5
+ propsSummary: Accepts [StackView](/stackview) props.
5
6
  ---
6
7
 
7
8
  ```jsx live