@planningcenter/tapestry-react 1.2.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/Button/Button.js +6 -1
- 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 +29 -16
- 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/Field/Field.js +1 -0
- 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 +4 -2
- package/dist/cjs/Menu/Item.js +5 -5
- 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/Button/Button.js +6 -1
- 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 +27 -15
- 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/Field/Field.js +1 -0
- 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 +4 -2
- package/dist/esm/Menu/Item.js +5 -5
- 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/ChurchCenterStatus/ChurchCenterStatus.d.ts +15 -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 +4 -3
- 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 +17 -1
- 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 +19 -0
- package/src/ChurchCenterStatus/ChurchCenterStatus.tsx +52 -20
- 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 +16 -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 +7 -1
- package/src/Menu/Item.js +5 -5
- 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
|
@@ -6,11 +6,17 @@ import { shallowEqual } from '../utils'
|
|
|
6
6
|
import CheckboxGroupContext from './CheckboxGroupContext'
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
|
+
children: any,
|
|
9
10
|
/**
|
|
10
11
|
* Accepts an array of strings that match the corresponding `Checkbox` values that should be checked.
|
|
11
12
|
*/
|
|
12
13
|
value: Array<string>,
|
|
13
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Maps to the corresponding `Checkbox` name prop.
|
|
17
|
+
*/
|
|
18
|
+
name: string,
|
|
19
|
+
|
|
14
20
|
/**
|
|
15
21
|
* Callback when any child `Checkbox` fires its `onChange` callback. Receives new array of values.
|
|
16
22
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: ChurchCenterStatus
|
|
3
3
|
category: General
|
|
4
|
+
propsSummary: Accepts [StackView](/stackview) props.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
```jsx live
|
|
@@ -59,6 +60,24 @@ render(
|
|
|
59
60
|
)
|
|
60
61
|
```
|
|
61
62
|
|
|
63
|
+
```jsx live
|
|
64
|
+
render(
|
|
65
|
+
<ChurchCenterStatus
|
|
66
|
+
ccAppEnabled
|
|
67
|
+
ccPublishingEnabled={false}
|
|
68
|
+
ccWebEnabled
|
|
69
|
+
description="On Church Center, people can browse and register for events."
|
|
70
|
+
destinationLabel="event list"
|
|
71
|
+
productUrl="#product"
|
|
72
|
+
renderPopoverFooter={(buttonProps) => (
|
|
73
|
+
<Button title="Another link!" {...buttonProps} />
|
|
74
|
+
)}
|
|
75
|
+
settingsUrl="#settings"
|
|
76
|
+
showSettingsLink={false}
|
|
77
|
+
/>
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
62
81
|
## Custom icons
|
|
63
82
|
|
|
64
83
|
To use the Planning Center General set of icons, import the general set to your theme and define the overrides with the `icons` prop.
|
|
@@ -8,6 +8,11 @@ import StackView from '../StackView'
|
|
|
8
8
|
import Text from '../Text'
|
|
9
9
|
|
|
10
10
|
type ChurchCenterStatusProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Pass props to the Dropdown buttons.
|
|
13
|
+
*/
|
|
14
|
+
buttonProps?: object
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* Determines status of Church Center App.
|
|
13
18
|
*/
|
|
@@ -53,13 +58,26 @@ type ChurchCenterStatusProps = {
|
|
|
53
58
|
*/
|
|
54
59
|
productUrl: string
|
|
55
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Render nodes at the end of the popover. `buttonProps` is passed as an argument
|
|
63
|
+
* and can be spread on any `<Button />` component to match the style of the other
|
|
64
|
+
* popover links.
|
|
65
|
+
*/
|
|
66
|
+
renderPopoverFooter: Function
|
|
67
|
+
|
|
56
68
|
/**
|
|
57
69
|
* Where the browser should navigate when settings button is pressed.
|
|
58
70
|
*/
|
|
59
71
|
settingsUrl: string
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Toggle the settings link display.
|
|
75
|
+
*/
|
|
76
|
+
showSettingsLink?: boolean
|
|
60
77
|
}
|
|
61
78
|
|
|
62
79
|
export function ChurchCenterStatus({
|
|
80
|
+
buttonProps: passedButtonProps = {},
|
|
63
81
|
ccAppEnabled = false,
|
|
64
82
|
ccPublishingEnabled = false,
|
|
65
83
|
ccWebEnabled = false,
|
|
@@ -69,7 +87,9 @@ export function ChurchCenterStatus({
|
|
|
69
87
|
dropdownProps = {},
|
|
70
88
|
icons,
|
|
71
89
|
productUrl,
|
|
90
|
+
renderPopoverFooter = () => {},
|
|
72
91
|
settingsUrl,
|
|
92
|
+
showSettingsLink = true,
|
|
73
93
|
...props
|
|
74
94
|
}: ChurchCenterStatusProps) {
|
|
75
95
|
const buttonProps: any = {
|
|
@@ -78,15 +98,20 @@ export function ChurchCenterStatus({
|
|
|
78
98
|
paddingHorizontal: 2,
|
|
79
99
|
radius: 0,
|
|
80
100
|
variant: 'naked',
|
|
101
|
+
...passedButtonProps,
|
|
81
102
|
}
|
|
82
103
|
|
|
83
104
|
const ccEnabled = ccAppEnabled || ccWebEnabled
|
|
105
|
+
const hasLinks =
|
|
106
|
+
showSettingsLink ||
|
|
107
|
+
(ccEnabled && ccPublishingEnabled) ||
|
|
108
|
+
!!renderPopoverFooter()
|
|
84
109
|
|
|
85
110
|
const icon = {
|
|
86
|
-
check: '
|
|
87
|
-
exclamationTriangle: '
|
|
88
|
-
external: '
|
|
89
|
-
x: '
|
|
111
|
+
check: 'general.check',
|
|
112
|
+
exclamationTriangle: 'general.exclamationTriangle',
|
|
113
|
+
external: 'general.newWindow',
|
|
114
|
+
x: 'general.x',
|
|
90
115
|
...icons,
|
|
91
116
|
}
|
|
92
117
|
|
|
@@ -142,25 +167,32 @@ export function ChurchCenterStatus({
|
|
|
142
167
|
</StackView>
|
|
143
168
|
)}
|
|
144
169
|
</StackView>
|
|
145
|
-
<Divider margin={0.5} />
|
|
170
|
+
{hasLinks && <Divider margin={0.5} />}
|
|
146
171
|
<StackView>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
172
|
+
{showSettingsLink && (
|
|
173
|
+
<Button
|
|
174
|
+
external
|
|
175
|
+
title="Update settings"
|
|
176
|
+
to={settingsUrl}
|
|
177
|
+
{...buttonProps}
|
|
178
|
+
/>
|
|
179
|
+
)}
|
|
153
180
|
{ccEnabled && ccPublishingEnabled && (
|
|
154
|
-
<Button
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
color
|
|
158
|
-
name
|
|
159
|
-
marginLeft
|
|
160
|
-
size
|
|
161
|
-
|
|
162
|
-
|
|
181
|
+
<Button
|
|
182
|
+
external
|
|
183
|
+
iconRight={{
|
|
184
|
+
color: 'primary',
|
|
185
|
+
name: icon.external,
|
|
186
|
+
marginLeft: 1,
|
|
187
|
+
size: 'xs',
|
|
188
|
+
}}
|
|
189
|
+
title={`Visit ${destinationLabel}`}
|
|
190
|
+
to={productUrl}
|
|
191
|
+
{...buttonProps}
|
|
192
|
+
as="a"
|
|
193
|
+
/>
|
|
163
194
|
)}
|
|
195
|
+
{renderPopoverFooter(buttonProps)}
|
|
164
196
|
</StackView>
|
|
165
197
|
</Dropdown>
|
|
166
198
|
</StackView>
|
package/src/Collapse/Collapse.js
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
import React, { Children } from 'react'
|
|
3
3
|
|
|
4
4
|
import StackView from '../StackView'
|
|
5
|
+
import { spacingValue } from '../system'
|
|
5
6
|
|
|
6
7
|
function Column() {
|
|
7
8
|
return null
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export type Props = {
|
|
12
|
+
/** Often wraps the `ColumnView.Column` component. */
|
|
13
|
+
children?: any,
|
|
11
14
|
/** The amount of columns to be rendered. */
|
|
12
15
|
sizes?: Array<
|
|
13
16
|
| {
|
|
@@ -19,11 +22,12 @@ export type Props = {
|
|
|
19
22
|
| string
|
|
20
23
|
>,
|
|
21
24
|
/** The amount of space between columns. */
|
|
22
|
-
spacing?: number,
|
|
25
|
+
spacing?: number | string,
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
function ColumnView(props: Props) {
|
|
26
29
|
const { children, sizes = [], spacing, ...restProps } = props
|
|
30
|
+
const parsedSpacing = spacingValue(spacing)
|
|
27
31
|
const sortedColumns = Children.toArray(children)
|
|
28
32
|
.sort((a, b) => (a.props.order || 0) - (b.props.order || 0))
|
|
29
33
|
.reduce((columns, cell, index) => {
|
|
@@ -45,8 +49,8 @@ function ColumnView(props: Props) {
|
|
|
45
49
|
basis={size === 'auto' ? '100%' : size.basis || size}
|
|
46
50
|
shrink={size === 'auto' ? 1 : size.shrink || 0}
|
|
47
51
|
grow={size === 'auto' ? 1 : size.grow || 0}
|
|
48
|
-
marginLeft={index === 0 ? null :
|
|
49
|
-
spacing={
|
|
52
|
+
marginLeft={index === 0 ? null : parsedSpacing}
|
|
53
|
+
spacing={parsedSpacing}
|
|
50
54
|
>
|
|
51
55
|
{column.map((cell) => cell.props.children)}
|
|
52
56
|
</StackView>
|
package/src/Combobox/Combobox.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @flow
|
|
1
2
|
import React, { Component } from 'react'
|
|
2
3
|
|
|
3
4
|
import Box from '../Box'
|
|
@@ -8,7 +9,16 @@ import ComboboxItem from './ComboboxItem'
|
|
|
8
9
|
import ComboboxItems from './ComboboxItems'
|
|
9
10
|
import ComboboxPopover from './ComboboxPopover'
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
type ComboboxProps = {
|
|
13
|
+
/**
|
|
14
|
+
* Usually takes `Combobox.Input`, `Combobox.Items` and `Combobox.Item` components.
|
|
15
|
+
*/
|
|
16
|
+
children: any,
|
|
17
|
+
onSelect: Function,
|
|
18
|
+
selectedValue: any,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class Combobox extends Component<ComboboxProps> {
|
|
12
22
|
static Input = ComboboxInput
|
|
13
23
|
|
|
14
24
|
static Item = ComboboxItem
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
title: Combobox
|
|
3
3
|
category: Forms
|
|
4
4
|
summary: Used for easily selecting a list of items that are paired with a text input. Composes [Combobox.Input](https://github.com/ministrycentered/tapestry-react/blob/master/packages/tapestry-react/src/Combobox/ComboboxInput.js) and [Popover](/popover).
|
|
5
|
+
propsSummary: Accepts [Box](/box) props.
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
### Combobox
|
|
@@ -57,7 +58,7 @@ function App() {
|
|
|
57
58
|
>
|
|
58
59
|
<Combobox.Input
|
|
59
60
|
autoFocus
|
|
60
|
-
renderLeft={<Icon name="search" />}
|
|
61
|
+
renderLeft={<Icon name="general.search" />}
|
|
61
62
|
placeholder="Search by name, email, or phone number"
|
|
62
63
|
value={value}
|
|
63
64
|
onClear={value.length > 0 ? () => setValue('') : null}
|
|
@@ -188,7 +188,7 @@ class ComboboxPopover extends Component<Props> {
|
|
|
188
188
|
closeButton ? (
|
|
189
189
|
<Button
|
|
190
190
|
disabled={disabled}
|
|
191
|
-
icon={{ name: '
|
|
191
|
+
icon={{ name: 'general.x' }}
|
|
192
192
|
title="close options"
|
|
193
193
|
theme={false}
|
|
194
194
|
{...closeButton}
|
|
@@ -197,7 +197,7 @@ class ComboboxPopover extends Component<Props> {
|
|
|
197
197
|
<Button
|
|
198
198
|
disabled={disabled}
|
|
199
199
|
icon={{
|
|
200
|
-
name: isPopoverOpen ? '
|
|
200
|
+
name: isPopoverOpen ? 'general.x' : 'general.downCaret',
|
|
201
201
|
}}
|
|
202
202
|
title={
|
|
203
203
|
isPopoverOpen ? 'close options' : 'open options'
|
|
@@ -41,6 +41,11 @@ export type Props = {
|
|
|
41
41
|
*/
|
|
42
42
|
innerBodyRef?: Function,
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Ref that is passed to `useImperativeHandle` which in turn returns `useCollapsibleRows.
|
|
46
|
+
*/
|
|
47
|
+
dataTableRef?: any,
|
|
48
|
+
|
|
44
49
|
/**
|
|
45
50
|
* Controls whether or not sub-rows can be collapsed.
|
|
46
51
|
*/
|
|
@@ -193,6 +198,32 @@ export type Props = {
|
|
|
193
198
|
*/
|
|
194
199
|
keyboardShortcuts?: Object<Function>,
|
|
195
200
|
|
|
201
|
+
/**
|
|
202
|
+
* `onDragStart: (event) => void`
|
|
203
|
+
*
|
|
204
|
+
* Called at the start of a child `Draggable` drag.
|
|
205
|
+
*/
|
|
206
|
+
onDragStart?: Function,
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* `onDragEnd: (event) => void`
|
|
210
|
+
*
|
|
211
|
+
* Called at the end of a child `Draggable` drag.
|
|
212
|
+
*/
|
|
213
|
+
onDragEnd?: Function,
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* `onDrop: (event) => void`
|
|
217
|
+
*
|
|
218
|
+
* This function will be called when a `Draggable` has been dropped. Returns the `onDragEnd` event with any `Draggable` `data` attached.
|
|
219
|
+
*/
|
|
220
|
+
onDrop?: Function,
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* This prop controls whether or not the droppable can receive and reorder draggables. If true, draggables may move outside the droppable, but not added.
|
|
224
|
+
*/
|
|
225
|
+
sourceOnly?: boolean,
|
|
226
|
+
|
|
196
227
|
/**
|
|
197
228
|
* Puts the table in a loading state and shows a spinner in the middle of the table.
|
|
198
229
|
*/
|
|
@@ -261,6 +292,23 @@ export type Props = {
|
|
|
261
292
|
bodySubCell?: Object | Function,
|
|
262
293
|
}
|
|
263
294
|
| Array<Object | boolean>,
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Current visible page number for pagination
|
|
298
|
+
*/
|
|
299
|
+
currentPage: number,
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* `(nextPage: number) => undefined`
|
|
303
|
+
*
|
|
304
|
+
* Callback when new page is requested for pagination.
|
|
305
|
+
*/
|
|
306
|
+
onPageChange: Function,
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Total available pages for pagination.
|
|
310
|
+
*/
|
|
311
|
+
totalPages: number,
|
|
264
312
|
}
|
|
265
313
|
|
|
266
314
|
const defaultHiddenColumnIds = []
|
|
@@ -279,7 +279,7 @@ const columns = [
|
|
|
279
279
|
{
|
|
280
280
|
label: 'Age',
|
|
281
281
|
id: 'age',
|
|
282
|
-
header: <Icon name="person" />,
|
|
282
|
+
header: <Icon name="general.person" />,
|
|
283
283
|
cell: 'age',
|
|
284
284
|
css: {
|
|
285
285
|
justifyContent: 'center',
|
|
@@ -330,7 +330,7 @@ render(function () {
|
|
|
330
330
|
/>
|
|
331
331
|
<Button
|
|
332
332
|
title="Condensed"
|
|
333
|
-
iconRight={condensed ? { name: '
|
|
333
|
+
iconRight={condensed ? { name: 'general.check' } : undefined}
|
|
334
334
|
variant="outline"
|
|
335
335
|
onClick={() => setCondensed(!condensed)}
|
|
336
336
|
/>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useCallback } from 'react'
|
|
2
2
|
|
|
3
|
-
import Icon from '
|
|
3
|
+
import Icon from '../../Icon'
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
const iconPaths = {
|
|
6
|
-
fill: '
|
|
7
|
-
minus: '
|
|
8
|
-
checked: '
|
|
7
|
+
fill: 'tapestry.checkbox0',
|
|
8
|
+
minus: 'tapestry.checkbox1',
|
|
9
|
+
checked: 'tapestry.checkbox2',
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
const scaleStyles = {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
// import Checkbox from '../../Checkbox'
|
|
4
3
|
import Dropdown from '../../Dropdown'
|
|
5
4
|
import Text from '../../Text'
|
|
6
|
-
|
|
7
|
-
import Checkbox from './CheckboxCell'
|
|
5
|
+
import Checkbox from '../../Checkbox'
|
|
8
6
|
|
|
9
7
|
const noop = () => null
|
|
10
8
|
|
|
@@ -17,7 +15,7 @@ function ColumnPicker({
|
|
|
17
15
|
return (
|
|
18
16
|
<Dropdown
|
|
19
17
|
variant="outline"
|
|
20
|
-
icon={{ name: '
|
|
18
|
+
icon={{ name: 'general.threeVerticalBars' }}
|
|
21
19
|
tooltip={{ title: 'Filter Columns' }}
|
|
22
20
|
placement="bottom-end"
|
|
23
21
|
closeOnSelect={false}
|
|
@@ -40,6 +38,8 @@ function ColumnPicker({
|
|
|
40
38
|
<Checkbox
|
|
41
39
|
checked={hiddenColumnIds.indexOf(column.id) === -1}
|
|
42
40
|
onChange={noop}
|
|
41
|
+
label={null}
|
|
42
|
+
size="md"
|
|
43
43
|
/>
|
|
44
44
|
<Text marginLeft={1}>{column.label || column.header}</Text>
|
|
45
45
|
</Dropdown.Item>
|
|
@@ -4,7 +4,7 @@ export const SORT_ASC = 'ASC'
|
|
|
4
4
|
export const SORT_DESC = 'DESC'
|
|
5
5
|
|
|
6
6
|
export function getIconDirection(direction) {
|
|
7
|
-
return direction === SORT_ASC ? '
|
|
7
|
+
return direction === SORT_ASC ? 'general.upCaret' : 'general.downCaret'
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function getOppositeSortDirection(direction) {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useAnySubRowsOpen,
|
|
9
9
|
} from '../hooks/useCollapsibleRows'
|
|
10
10
|
|
|
11
|
-
import Icon from '
|
|
11
|
+
import Icon from '../../Icon'
|
|
12
12
|
|
|
13
13
|
const buttonStyles = {
|
|
14
14
|
appearance: 'none',
|
|
@@ -50,7 +50,7 @@ function CollapseHeader({ accessibility }) {
|
|
|
50
50
|
}}
|
|
51
51
|
>
|
|
52
52
|
<Icon
|
|
53
|
-
name="
|
|
53
|
+
name="general.downCaret"
|
|
54
54
|
size="sm"
|
|
55
55
|
style={{
|
|
56
56
|
transform: anySubRowsOpen ? undefined : 'rotate(-90deg)',
|
|
@@ -75,7 +75,7 @@ function CollapseCell({ rowIndex }) {
|
|
|
75
75
|
}}
|
|
76
76
|
>
|
|
77
77
|
<Icon
|
|
78
|
-
name="
|
|
78
|
+
name="general.downCaret"
|
|
79
79
|
size="sm"
|
|
80
80
|
style={{
|
|
81
81
|
transform: isSubRowOpen ? undefined : 'rotate(-90deg)',
|
|
@@ -121,7 +121,7 @@ function getParsedColumns({
|
|
|
121
121
|
{..._dragHandleProps}
|
|
122
122
|
>
|
|
123
123
|
<Icon
|
|
124
|
-
name="
|
|
124
|
+
name="general.dragHandle"
|
|
125
125
|
size="sm"
|
|
126
126
|
color="foregroundTertiary"
|
|
127
127
|
style={{ cursor: 'grab' }}
|
|
@@ -46,6 +46,16 @@ export type DateFieldProps = {
|
|
|
46
46
|
*/
|
|
47
47
|
value: Date,
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Locks external scrollbars when open.
|
|
51
|
+
*/
|
|
52
|
+
lockScrollWhileOpen?: boolean,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Attempts to keep popover in view clipping edges if too large.
|
|
56
|
+
*/
|
|
57
|
+
keepInView?: boolean,
|
|
58
|
+
|
|
49
59
|
/**
|
|
50
60
|
* Accepts any valid [Popover](/popover) props.
|
|
51
61
|
*/
|
|
@@ -140,7 +150,7 @@ class DateField extends Component<DateFieldProps> {
|
|
|
140
150
|
readOnly
|
|
141
151
|
value={value ? format(value, formatValue) : ''}
|
|
142
152
|
renderRight={
|
|
143
|
-
<Icon name="calendar" color="foregroundTertiary" />
|
|
153
|
+
<Icon name="general.calendar" color="foregroundTertiary" />
|
|
144
154
|
}
|
|
145
155
|
onClick={this.togglePopover}
|
|
146
156
|
onBlur={requestBlur}
|
package/src/Divider/Divider.mdx
CHANGED
|
@@ -6,12 +6,12 @@ summary: Custom components that wrap [react-beautiful-dnd](https://github.com/at
|
|
|
6
6
|
|
|
7
7
|
```jsx live
|
|
8
8
|
const navigationItems = [
|
|
9
|
-
{ icon: '
|
|
10
|
-
{ icon: 'person', name: 'Profile' },
|
|
11
|
-
{ icon: '
|
|
12
|
-
{ icon: '
|
|
13
|
-
{ icon: 'calendar', name: 'Events' },
|
|
14
|
-
{ icon: 'search', name: 'Search' },
|
|
9
|
+
{ icon: 'general.outlinedLocationPin', name: 'Home' },
|
|
10
|
+
{ icon: 'general.person', name: 'Profile' },
|
|
11
|
+
{ icon: 'general.checkCircle', name: 'Check-In' },
|
|
12
|
+
{ icon: 'general.twoPeople', name: 'Groups' },
|
|
13
|
+
{ icon: 'general.calendar', name: 'Events' },
|
|
14
|
+
{ icon: 'general.search', name: 'Search' },
|
|
15
15
|
]
|
|
16
16
|
function Item({
|
|
17
17
|
icon,
|
|
@@ -24,6 +24,20 @@ function Item({
|
|
|
24
24
|
...restProps
|
|
25
25
|
}) {
|
|
26
26
|
const { hover, hoverProps } = hooks.useHover()
|
|
27
|
+
|
|
28
|
+
const actions = {
|
|
29
|
+
add: {
|
|
30
|
+
icon: "general.plusCircle",
|
|
31
|
+
color: "success",
|
|
32
|
+
label: "Add",
|
|
33
|
+
},
|
|
34
|
+
remove: {
|
|
35
|
+
icon: "general.minusCircle",
|
|
36
|
+
color: "error",
|
|
37
|
+
label: "Remove",
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
return (
|
|
28
42
|
<Card
|
|
29
43
|
axis="horizontal"
|
|
@@ -40,10 +54,10 @@ function Item({
|
|
|
40
54
|
<Icon name={icon} color="grey-7" />
|
|
41
55
|
<Text grow={1}>{name}</Text>
|
|
42
56
|
<Button
|
|
43
|
-
title={type
|
|
57
|
+
title={actions.[type].label}
|
|
44
58
|
icon={{
|
|
45
|
-
name:
|
|
46
|
-
color: type
|
|
59
|
+
name: actions.[type].icon,
|
|
60
|
+
color: actions.[type].color,
|
|
47
61
|
}}
|
|
48
62
|
variant="naked"
|
|
49
63
|
opacity={hover && hoverEnabled ? 1 : 0}
|
package/src/Drawer/Drawer.js
CHANGED
|
@@ -8,8 +8,10 @@ import React, {
|
|
|
8
8
|
} from 'react'
|
|
9
9
|
|
|
10
10
|
import StackView from '../StackView'
|
|
11
|
+
import { useThemeValue } from '../system'
|
|
11
12
|
|
|
12
13
|
function DrawerContents({ shouldClose, onClose, ...restProps }) {
|
|
14
|
+
const themeProps = useThemeValue('drawer')
|
|
13
15
|
const ref = useRef(null)
|
|
14
16
|
const [show, setShow] = useState(false)
|
|
15
17
|
|
|
@@ -51,6 +53,7 @@ function DrawerContents({ shouldClose, onClose, ...restProps }) {
|
|
|
51
53
|
boxShadow="-6px 0px 6px -4px rgba(150,150,150,0.25)"
|
|
52
54
|
backgroundColor="surfaceTertiary"
|
|
53
55
|
transition="transform 240ms ease-out"
|
|
56
|
+
{...themeProps}
|
|
54
57
|
{...restProps}
|
|
55
58
|
/>
|
|
56
59
|
)
|
package/src/Drawer/Drawer.mdx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
title: Drawer
|
|
3
3
|
category: General
|
|
4
4
|
summary: Use to add collapsible navigation items or content anchored to the right side of the screen.
|
|
5
|
+
propsSummary: Accepts [StackView](/stackview) props.
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
```jsx live
|
|
@@ -26,7 +27,7 @@ render(() => {
|
|
|
26
27
|
>
|
|
27
28
|
<Button
|
|
28
29
|
title="close drawer"
|
|
29
|
-
icon={{ name: '
|
|
30
|
+
icon={{ name: 'general.x', color: 'primary' }}
|
|
30
31
|
variant="naked"
|
|
31
32
|
onClick={() => setOpen(false)}
|
|
32
33
|
/>
|