@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.
- package/dist/cjs/ActionsDropdown/ActionsDropdown.js +3 -3
- package/dist/cjs/Badge/Badge.js +41 -26
- package/dist/cjs/Badge/Status.js +2 -2
- package/dist/cjs/Calendar/Calendar.js +5 -3
- package/dist/cjs/Card/Card.js +2 -0
- package/dist/cjs/Checkbox/Checkbox.js +3 -3
- package/dist/cjs/ChurchCenterStatus/ChurchCenterStatus.js +4 -4
- package/dist/cjs/ColumnView/ColumnView.js +5 -2
- package/dist/cjs/Combobox/ComboboxPopover.js +2 -2
- package/dist/cjs/DataTable/components/CheckboxCell.js +4 -4
- package/dist/cjs/DataTable/components/ColumnPicker.js +6 -5
- package/dist/cjs/DataTable/hooks/useColumnSort.js +1 -1
- package/dist/cjs/DataTable/utils/getParsedColumns.js +4 -4
- package/dist/cjs/DateField/DateField.js +1 -1
- package/dist/cjs/Drawer/Drawer.js +4 -1
- package/dist/cjs/Dropdown/Dropdown.js +1 -1
- package/dist/cjs/Dropdown/Link.js +3 -1
- package/dist/cjs/EditActions/EditActions.js +9 -3
- package/dist/cjs/FieldSet/FieldSet.js +24 -10
- package/dist/cjs/FilterLayout/FilterLayout.js +2 -1
- package/dist/cjs/Form/Form.js +1 -1
- package/dist/cjs/GridView/GridView.js +6 -4
- package/dist/cjs/Group/Group.js +8 -3
- package/dist/cjs/HeadingUppercase/HeadingUppercase.js +2 -2
- package/dist/cjs/HelperDrawer/HelperDrawer.js +1 -1
- package/dist/cjs/Highlight/Highlight.js +11 -5
- package/dist/cjs/Icon/Status.js +4 -4
- package/dist/cjs/Input/InputBox.js +1 -1
- package/dist/cjs/List/ListItem.js +1 -1
- package/dist/cjs/Menu/Heading.js +1 -0
- package/dist/cjs/Pagination/Pagination.js +4 -2
- package/dist/cjs/Progress/Progress.js +12 -6
- package/dist/cjs/Radio/Radio.js +2 -2
- package/dist/cjs/RangeSlider/RangeSlider.js +10 -4
- package/dist/cjs/Scrim/Scrim.js +2 -2
- package/dist/cjs/Section/Section.js +14 -6
- package/dist/cjs/Select/Option.js +1 -1
- package/dist/cjs/Select/Select.js +1 -1
- package/dist/cjs/Sortable/SortableItem.js +1 -1
- package/dist/cjs/StackView/StackView.js +5 -5
- package/dist/cjs/StepperField/StepperField.js +9 -6
- package/dist/cjs/StepperProgress/StepperProgress.js +9 -5
- package/dist/cjs/Table/ColumnPicker.js +1 -1
- package/dist/cjs/Table/DragHandle.js +1 -1
- package/dist/cjs/Table/NavigationArrow.js +1 -1
- package/dist/cjs/Table/SubRowToggleCell.js +1 -1
- package/dist/cjs/Table/Table.js +1 -1
- package/dist/cjs/Tabs/Tab.js +1 -0
- package/dist/cjs/TileView/TileView.js +1 -1
- package/dist/cjs/TokenInput/DefaultToken.js +1 -1
- package/dist/cjs/Wizard/Wizard.js +2 -1
- package/dist/cjs/WrapView/WrapView.js +2 -27
- package/dist/cjs/hooks/use-accessibility-violation.js +1 -1
- package/dist/cjs/system/default-theme.js +8 -3
- package/dist/esm/ActionsDropdown/ActionsDropdown.js +3 -3
- package/dist/esm/Badge/Badge.js +42 -27
- package/dist/esm/Badge/Status.js +2 -2
- package/dist/esm/Calendar/Calendar.js +5 -3
- package/dist/esm/Card/Card.js +2 -3
- package/dist/esm/Checkbox/Checkbox.js +3 -3
- package/dist/esm/ChurchCenterStatus/ChurchCenterStatus.js +4 -4
- package/dist/esm/ColumnView/ColumnView.js +4 -2
- package/dist/esm/Combobox/ComboboxPopover.js +2 -2
- package/dist/esm/DataTable/components/CheckboxCell.js +4 -4
- package/dist/esm/DataTable/components/ColumnPicker.js +6 -5
- package/dist/esm/DataTable/hooks/useColumnSort.js +1 -1
- package/dist/esm/DataTable/utils/getParsedColumns.js +4 -4
- package/dist/esm/DateField/DateField.js +1 -1
- package/dist/esm/Drawer/Drawer.js +3 -1
- package/dist/esm/Dropdown/Dropdown.js +1 -1
- package/dist/esm/Dropdown/Link.js +3 -1
- package/dist/esm/EditActions/EditActions.js +8 -3
- package/dist/esm/FieldSet/FieldSet.js +22 -10
- package/dist/esm/FilterLayout/FilterLayout.js +2 -1
- package/dist/esm/Form/Form.js +1 -1
- package/dist/esm/GridView/GridView.js +5 -4
- package/dist/esm/Group/Group.js +8 -3
- package/dist/esm/HeadingUppercase/HeadingUppercase.js +3 -3
- package/dist/esm/HelperDrawer/HelperDrawer.js +1 -1
- package/dist/esm/Highlight/Highlight.js +9 -5
- package/dist/esm/Icon/Status.js +4 -4
- package/dist/esm/Input/InputBox.js +1 -1
- package/dist/esm/List/ListItem.js +1 -1
- package/dist/esm/Menu/Heading.js +1 -0
- package/dist/esm/Pagination/Pagination.js +4 -2
- package/dist/esm/Progress/Progress.js +10 -6
- package/dist/esm/Radio/Radio.js +2 -2
- package/dist/esm/RangeSlider/RangeSlider.js +8 -4
- package/dist/esm/Scrim/Scrim.js +2 -2
- package/dist/esm/Section/Section.js +12 -6
- package/dist/esm/Select/Option.js +1 -1
- package/dist/esm/Select/Select.js +1 -1
- package/dist/esm/Sortable/SortableItem.js +1 -1
- package/dist/esm/StackView/StackView.js +4 -5
- package/dist/esm/StepperField/StepperField.js +10 -7
- package/dist/esm/StepperProgress/StepperProgress.js +8 -5
- package/dist/esm/Table/ColumnPicker.js +1 -1
- package/dist/esm/Table/DragHandle.js +1 -1
- package/dist/esm/Table/NavigationArrow.js +1 -1
- package/dist/esm/Table/SubRowToggleCell.js +1 -1
- package/dist/esm/Table/Table.js +1 -1
- package/dist/esm/Tabs/Tab.js +1 -0
- package/dist/esm/TileView/TileView.js +1 -1
- package/dist/esm/TokenInput/DefaultToken.js +1 -1
- package/dist/esm/Wizard/Wizard.js +2 -1
- package/dist/esm/WrapView/WrapView.js +2 -28
- package/dist/esm/hooks/use-accessibility-violation.js +1 -1
- package/dist/esm/system/default-theme.js +6 -2
- package/dist/types/Alert/Alert.d.ts +3 -0
- package/dist/types/Box/Box.d.ts +11 -2
- package/dist/types/Button/Button.d.ts +9 -1
- package/dist/types/Button/Input.d.ts +1 -1
- package/dist/types/Card/Card.d.ts +8 -1
- package/dist/types/GridView/GridView.d.ts +16 -4
- package/dist/types/Scrim/Scrim.d.ts +6 -1
- package/dist/types/StackView/StackView.d.ts +11 -0
- package/dist/types/Text/Text.d.ts +12 -0
- package/dist/types/TileView/TileView.d.ts +15 -7
- package/dist/types/WrapView/WrapView.d.ts +2 -1
- package/package.json +3 -2
- package/src/ActionsDropdown/ActionsDropdown.tsx +3 -3
- package/src/Alert/Alert.mdx +1 -0
- package/src/Alert/Alert.tsx +5 -0
- package/src/Avatar/Avatar.mdx +1 -0
- package/src/Badge/Badge.js +66 -25
- package/src/Badge/Badge.mdx +2 -1
- package/src/Badge/Status.js +2 -2
- package/src/Badge/Status.mdx +1 -0
- package/src/Box/Box.mdx +2 -1
- package/src/Box/Box.tsx +13 -2
- package/src/Button/Button.mdx +4 -3
- package/src/Button/Button.tsx +11 -0
- package/src/Button/Input.mdx +2 -2
- package/src/Calendar/Calendar.js +8 -3
- package/src/Calendar/Calendar.mdx +1 -0
- package/src/Card/Card.mdx +1 -0
- package/src/Card/Card.tsx +7 -1
- package/src/Checkbox/Checkbox.js +8 -3
- package/src/Checkbox/Checkbox.mdx +1 -0
- package/src/CheckboxCard/CheckboxCard.js +26 -1
- package/src/CheckboxCard/CheckboxCard.mdx +1 -0
- package/src/CheckboxGroup/CheckboxGroup.js +6 -0
- package/src/CheckboxGroup/CheckboxGroup.mdx +1 -0
- package/src/ChurchCenterStatus/ChurchCenterStatus.mdx +1 -0
- package/src/ChurchCenterStatus/ChurchCenterStatus.tsx +4 -4
- package/src/Collapse/Collapse.js +2 -0
- package/src/ColumnView/ColumnView.js +7 -3
- package/src/ColumnView/ColumnView.mdx +1 -0
- package/src/Combobox/Combobox.js +11 -1
- package/src/Combobox/Combobox.mdx +2 -1
- package/src/Combobox/ComboboxPopover.js +2 -2
- package/src/DataTable/DataTable.js +48 -0
- package/src/DataTable/DataTable.mdx +2 -2
- package/src/DataTable/components/CheckboxCell.js +5 -4
- package/src/DataTable/components/ColumnPicker.js +4 -4
- package/src/DataTable/hooks/useColumnSort.js +1 -1
- package/src/DataTable/utils/getParsedColumns.js +4 -4
- package/src/DateField/DateField.js +11 -1
- package/src/DateField/DateField.mdx +1 -0
- package/src/Divider/Divider.mdx +1 -0
- package/src/DragDrop/DragDrop.mdx +23 -9
- package/src/Drawer/Drawer.js +3 -0
- package/src/Drawer/Drawer.mdx +2 -1
- package/src/Dropdown/Dropdown.js +49 -3
- package/src/Dropdown/Dropdown.mdx +3 -2
- package/src/Dropdown/Link.js +3 -1
- package/src/EditActions/EditActions.js +18 -3
- package/src/EditActions/EditActions.mdx +1 -0
- package/src/Field/Field.js +15 -0
- package/src/Field/Field.mdx +1 -0
- package/src/FieldSet/FieldSet.js +35 -11
- package/src/FieldSet/FieldSet.mdx +1 -0
- package/src/FilterLayout/FilterLayout.mdx +1 -0
- package/src/FilterLayout/FilterLayout.tsx +4 -1
- package/src/Form/Form.js +1 -1
- package/src/Form/Form.mdx +26 -24
- package/src/GridView/GridView.mdx +2 -1
- package/src/GridView/GridView.tsx +27 -8
- package/src/Group/Group.mdx +8 -7
- package/src/Group/Group.tsx +6 -1
- package/src/Heading/Heading.js +6 -2
- package/src/Heading/Heading.mdx +1 -0
- package/src/HeadingUppercase/HeadingUppercase.js +9 -5
- package/src/HeadingUppercase/HeadingUppercase.mdx +1 -0
- package/src/HelperDrawer/HelperDrawer.js +10 -2
- package/src/HelperDrawer/HelperDrawer.mdx +1 -0
- package/src/Highlight/Highlight.js +6 -2
- package/src/Highlight/Highlight.mdx +1 -0
- package/src/Icon/Icon.js +6 -0
- package/src/Icon/Icon.mdx +42 -37
- package/src/Icon/Status.js +4 -4
- package/src/Input/Inline.js +11 -1
- package/src/Input/Inline.mdx +2 -1
- package/src/Input/Input.js +119 -1
- package/src/Input/Input.mdx +1 -6
- package/src/Input/InputBox.js +41 -1
- package/src/Input/InputBox.mdx +1 -0
- package/src/Input/InputField.js +32 -0
- package/src/Input/InputField.mdx +1 -0
- package/src/Input/InputLabel.mdx +1 -0
- package/src/Link/Link.js +10 -0
- package/src/Link/Link.mdx +2 -1
- package/src/LinkList/LinkList.js +7 -1
- package/src/LinkList/LinkList.mdx +1 -0
- package/src/List/List.js +25 -1
- package/src/List/List.mdx +1 -0
- package/src/List/ListItem.js +1 -1
- package/src/Logo/Logo.js +10 -1
- package/src/Logo/Logo.mdx +1 -0
- package/src/Menu/Heading.js +1 -0
- package/src/Menu/Menu.js +7 -1
- package/src/Menu/Menu.mdx +2 -1
- package/src/Modal/Modal.js +1 -0
- package/src/Modal/Modal.mdx +1 -0
- package/src/NumberField/NumberField.js +19 -0
- package/src/Page/Page.mdx +1 -1
- package/src/PagerView/PagerView.js +1 -0
- package/src/PagerView/PagerView.mdx +9 -8
- package/src/Pagination/Pagination.js +2 -2
- package/src/Pagination/Pagination.mdx +1 -0
- package/src/Progress/Progress.js +8 -3
- package/src/Progress/Progress.mdx +1 -0
- package/src/Radio/Radio.js +4 -2
- package/src/Radio/Radio.mdx +1 -0
- package/src/RangeSlider/RangeSlider.js +11 -2
- package/src/RangeSlider/RangeSlider.mdx +13 -10
- package/src/ScreenReader/ScreenReader.js +6 -1
- package/src/ScreenReader/ScreenReader.mdx +1 -0
- package/src/Scrim/Scrim.mdx +1 -0
- package/src/Scrim/Scrim.tsx +8 -2
- package/src/Section/Section.js +15 -3
- package/src/Section/Section.mdx +1 -0
- package/src/SegmentedControl/SegmentedControl.mdx +3 -2
- package/src/SegmentedTabs/SegmentedTabs.js +2 -0
- package/src/SegmentedTabs/SegmentedTabs.mdx +1 -0
- package/src/Select/Option.js +1 -1
- package/src/Select/Select.js +63 -2
- package/src/Select/Select.mdx +1 -0
- package/src/Sidebar/Sidebar.js +7 -1
- package/src/Sidebar/Sidebar.mdx +1 -0
- package/src/Sortable/SortableItem.js +1 -1
- package/src/Spinner/Spinner.mdx +1 -0
- package/src/StackView/StackView.mdx +17 -1
- package/src/StackView/StackView.tsx +23 -8
- package/src/StepperField/StepperField.js +35 -6
- package/src/StepperField/StepperField.mdx +2 -2
- package/src/StepperProgress/StepperProgress.js +9 -10
- package/src/StepperProgress/StepperProgress.mdx +1 -0
- package/src/Summary/Summary.mdx +1 -0
- package/src/Tab/Tab.mdx +1 -0
- package/src/Table/ColumnPicker.js +1 -1
- package/src/Table/DragHandle.js +1 -1
- package/src/Table/NavigationArrow.js +1 -1
- package/src/Table/SubRowToggleCell.js +1 -1
- package/src/Table/Table.js +1 -1
- package/src/Table/Table.mdx +2 -2
- package/src/Tabs/Tab.js +1 -0
- package/src/Tabs/Tabs.js +5 -0
- package/src/Tabs/Tabs.mdx +1 -0
- package/src/Text/Text.mdx +1 -0
- package/src/Text/Text.tsx +12 -0
- package/src/TextArea/TextArea.js +7 -1
- package/src/TextArea/TextArea.mdx +1 -0
- package/src/TileView/TileView.mdx +1 -0
- package/src/TileView/TileView.tsx +17 -3
- package/src/TimeField/TimeField.mdx +1 -0
- package/src/TokenInput/DefaultToken.js +1 -1
- package/src/TokenInput/TokenInput.js +12 -6
- package/src/TokenInput/TokenInput.mdx +1 -0
- package/src/Toolbar/Toolbar.mdx +1 -0
- package/src/Tooltip/Tooltip.js +39 -0
- package/src/Tooltip/Tooltip.mdx +4 -3
- package/src/Wizard/Wizard.js +1 -1
- package/src/Wizard/Wizard.mdx +7 -2
- package/src/WrapView/WrapView.mdx +1 -0
- package/src/WrapView/WrapView.tsx +6 -28
- package/src/hooks/use-accessibility-violation.tsx +1 -1
- package/src/system/default-theme.ts +7 -2
- package/dist/cjs/icons.js +0 -126
- package/dist/esm/icons.js +0 -121
- package/src/icons.js +0 -121
package/src/Input/InputLabel.mdx
CHANGED
|
@@ -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="
|
|
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
|
package/src/LinkList/LinkList.js
CHANGED
|
@@ -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
|
-
|
|
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"
|
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
package/src/List/ListItem.js
CHANGED
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
|
-
|
|
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
package/src/Menu/Heading.js
CHANGED
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
|
-
|
|
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
|
)
|
package/src/Modal/Modal.js
CHANGED
package/src/Modal/Modal.mdx
CHANGED
|
@@ -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
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: PagerView
|
|
3
3
|
category: Layout
|
|
4
|
-
summary: Allows paging between views. Use with the
|
|
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: '
|
|
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: '
|
|
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 ? '
|
|
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 ? '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
135
|
+
icon={{ name: 'general.rightChevron', size: 'xs' }}
|
|
136
136
|
tooltip={{ title: 'Next Page' }}
|
|
137
137
|
variant="naked"
|
|
138
138
|
shrink={0}
|
package/src/Progress/Progress.js
CHANGED
|
@@ -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(
|
|
18
|
-
const {
|
|
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
|
-
{...
|
|
34
|
+
{...themeProps}
|
|
30
35
|
>
|
|
31
36
|
<Box
|
|
32
37
|
position="absolute"
|
package/src/Radio/Radio.js
CHANGED
|
@@ -10,8 +10,8 @@ import VariantProvider from '../VariantProvider'
|
|
|
10
10
|
import { useThemeValue } from '../system'
|
|
11
11
|
|
|
12
12
|
const iconPaths = {
|
|
13
|
-
fill: '
|
|
14
|
-
checked: '
|
|
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
|
*/
|
package/src/Radio/Radio.mdx
CHANGED
|
@@ -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
|
-
{...
|
|
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
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<Icon
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
```
|
package/src/Scrim/Scrim.mdx
CHANGED
package/src/Scrim/Scrim.tsx
CHANGED
|
@@ -2,7 +2,13 @@ import * as React from 'react'
|
|
|
2
2
|
|
|
3
3
|
import StackView from '../StackView'
|
|
4
4
|
|
|
5
|
-
|
|
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}
|
package/src/Section/Section.js
CHANGED
|
@@ -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" {...
|
|
34
|
+
<StackView as="section" {...themeProps}>
|
|
28
35
|
<Toolbar
|
|
29
|
-
title={
|
|
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>
|
package/src/Section/Section.mdx
CHANGED