@planningcenter/tapestry-react 1.4.0 → 2.0.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/useCollapsibleRows.js +1 -1
- 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/Dropdown.test.js +194 -19
- 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 +10 -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/Modal/Modal.test.js +156 -0
- package/dist/cjs/Pagination/Pagination.js +4 -2
- package/dist/cjs/Popover/Popover.js +4 -0
- package/dist/cjs/Popover/Popover.test.js +65 -0
- package/dist/cjs/Popover/rewireTabOrder.js +13 -30
- 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 +10 -1
- package/dist/cjs/Sidebar/Sidebar.js +4 -3
- 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 +4 -6
- package/dist/cjs/Tabs/Tab.js +1 -0
- package/dist/cjs/ThemeProvider/ThemeProvider.js +5 -5
- 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/hooks/useConstant.js +23 -0
- package/dist/cjs/system/default-theme.js +8 -3
- package/dist/cjs/system/utils.js +2 -2
- package/dist/cjs/utils.js +3 -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/useCollapsibleRows.js +1 -1
- 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/Dropdown.test.js +158 -17
- 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 +10 -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/Modal/Modal.test.js +122 -0
- package/dist/esm/Pagination/Pagination.js +4 -2
- package/dist/esm/Popover/Popover.js +4 -0
- package/dist/esm/Popover/Popover.test.js +51 -0
- package/dist/esm/Popover/rewireTabOrder.js +13 -33
- 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 +10 -1
- package/dist/esm/Sidebar/Sidebar.js +4 -2
- 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 +2 -3
- package/dist/esm/Tabs/Tab.js +1 -0
- package/dist/esm/ThemeProvider/ThemeProvider.js +1 -1
- 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/hooks/useConstant.js +15 -0
- package/dist/esm/system/default-theme.js +6 -2
- package/dist/esm/system/utils.js +1 -1
- package/dist/esm/utils.js +3 -3
- 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/Dropdown/Dropdown.test.d.ts +1 -1
- package/dist/types/GridView/GridView.d.ts +16 -4
- package/dist/types/Group/Group.d.ts +5 -1
- package/dist/types/Modal/Modal.test.d.ts +1 -0
- package/dist/types/Popover/Popover.test.d.ts +1 -0
- 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/dist/types/hooks/useConstant.d.ts +1 -0
- package/package.json +16 -24
- 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/useCollapsibleRows.js +1 -1
- 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/Dropdown.test.tsx +128 -17
- 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 +12 -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/Modal/Modal.test.tsx +113 -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/Popover/Popover.test.tsx +62 -0
- package/src/Popover/Popover.tsx +3 -0
- package/src/Popover/rewireTabOrder.ts +24 -42
- 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 +69 -2
- package/src/Select/Select.mdx +1 -0
- package/src/Sidebar/Sidebar.js +14 -6
- 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 +2 -3
- 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/ThemeProvider/ThemeProvider.tsx +1 -1
- 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/hooks/useConstant.ts +17 -0
- package/src/system/default-theme.ts +7 -2
- package/src/system/utils.js +1 -1
- package/src/utils.js +3 -3
- package/src/utils.test.js +29 -0
- package/dist/cjs/icons.js +0 -126
- package/dist/esm/icons.js +0 -121
- package/src/icons.js +0 -121
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
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { render, screen } from '@testing-library/react'
|
|
3
|
+
import userEvent from '@testing-library/user-event'
|
|
4
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
5
|
+
import Dropdown from '../Dropdown'
|
|
6
|
+
import Select from '../Select'
|
|
7
|
+
import { Button, Heading, Modal, ThemeProvider } from '../'
|
|
8
|
+
import { noop } from 'lodash'
|
|
9
|
+
|
|
10
|
+
describe('Modal', () => {
|
|
11
|
+
const TestModal = () => {
|
|
12
|
+
const [open, setOpen] = useState(false)
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<ThemeProvider>
|
|
16
|
+
<>
|
|
17
|
+
<Button
|
|
18
|
+
data-testid="modal-toggle"
|
|
19
|
+
onClick={() => setOpen(!open)}
|
|
20
|
+
title="Toggle modal"
|
|
21
|
+
/>
|
|
22
|
+
<Modal open={open} onRequestClose={() => setOpen(false)}>
|
|
23
|
+
<Heading data-testid="modal-header">Hello</Heading>
|
|
24
|
+
<Dropdown>
|
|
25
|
+
{[1, 2, 3].map((n) => (
|
|
26
|
+
<Dropdown.Item data-testid={`dropdown-item-${n}`} key={n}>
|
|
27
|
+
{n}
|
|
28
|
+
</Dropdown.Item>
|
|
29
|
+
))}
|
|
30
|
+
</Dropdown>
|
|
31
|
+
<Select onChange={noop}>
|
|
32
|
+
{[1, 2, 3].map((n) => (
|
|
33
|
+
<Select.Option
|
|
34
|
+
data-testid={`select-option-${n}`}
|
|
35
|
+
key={n}
|
|
36
|
+
value={n}
|
|
37
|
+
>
|
|
38
|
+
{n}
|
|
39
|
+
</Select.Option>
|
|
40
|
+
))}
|
|
41
|
+
</Select>
|
|
42
|
+
</Modal>
|
|
43
|
+
</>
|
|
44
|
+
</ThemeProvider>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
describe('Keyboard navigation', () => {
|
|
49
|
+
it('should close modal on escape keypress (dropdown button has focus)', () => {
|
|
50
|
+
render(<TestModal />)
|
|
51
|
+
expect(screen.queryByTestId('modal-header')).toBeNull()
|
|
52
|
+
userEvent.click(screen.getByTestId('modal-toggle'))
|
|
53
|
+
expect(screen.getByTestId('modal-header')).toBeInTheDocument()
|
|
54
|
+
userEvent.keyboard(`{esc}`)
|
|
55
|
+
expect(screen.queryByTestId('modal-header')).toBeNull()
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('should not close modal when escape key closes a dropdown within modal', () => {
|
|
59
|
+
render(<TestModal />)
|
|
60
|
+
userEvent.click(screen.getByTestId('modal-toggle'))
|
|
61
|
+
const [, dropdown] = screen.getAllByRole('button')
|
|
62
|
+
expect(dropdown).toHaveFocus()
|
|
63
|
+
userEvent.keyboard('{arrowdown}')
|
|
64
|
+
userEvent.keyboard(`{esc}`)
|
|
65
|
+
expect(screen.getByTestId('modal-header')).toBeInTheDocument()
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it('should close dropdown on escape & close modal on subsequent escape', () => {
|
|
69
|
+
render(<TestModal />)
|
|
70
|
+
userEvent.click(screen.getByTestId('modal-toggle'))
|
|
71
|
+
userEvent.keyboard('{arrowdown}')
|
|
72
|
+
userEvent.keyboard(`{esc}`)
|
|
73
|
+
expect(screen.getByTestId('modal-header')).toBeInTheDocument()
|
|
74
|
+
userEvent.keyboard(`{esc}`)
|
|
75
|
+
expect(screen.queryByTestId('modal-header')).toBeNull()
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
it('should hide select popover on escape, but select remains in dom', () => {
|
|
79
|
+
render(<TestModal />)
|
|
80
|
+
userEvent.click(screen.getByTestId('modal-toggle'))
|
|
81
|
+
userEvent.tab()
|
|
82
|
+
userEvent.keyboard('{arrowdown}')
|
|
83
|
+
userEvent.keyboard(`{esc}`)
|
|
84
|
+
expect(screen.queryByTestId('select-option-1')).toBeInTheDocument()
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
it('should hide select popover on escape, close (unmount) select popover on subsequent escape, persist modal', () => {
|
|
88
|
+
render(<TestModal />)
|
|
89
|
+
userEvent.click(screen.getByTestId('modal-toggle'))
|
|
90
|
+
userEvent.tab()
|
|
91
|
+
userEvent.keyboard('{arrowdown}')
|
|
92
|
+
userEvent.keyboard(`{esc}`)
|
|
93
|
+
expect(screen.queryByTestId('select-option-1')).toBeInTheDocument()
|
|
94
|
+
userEvent.keyboard(`{esc}`)
|
|
95
|
+
expect(screen.queryByTestId('select-option-1')).toBeNull()
|
|
96
|
+
expect(screen.queryByTestId('modal-header')).toBeInTheDocument()
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
it('should hide select popover on escape, close (unmount) select popover on subsequent escape, close modal on subsequent escape', () => {
|
|
100
|
+
render(<TestModal />)
|
|
101
|
+
userEvent.click(screen.getByTestId('modal-toggle'))
|
|
102
|
+
userEvent.tab()
|
|
103
|
+
userEvent.keyboard('{arrowdown}')
|
|
104
|
+
userEvent.keyboard(`{esc}`)
|
|
105
|
+
expect(screen.queryByTestId('select-option-1')).toBeInTheDocument()
|
|
106
|
+
userEvent.keyboard(`{esc}`)
|
|
107
|
+
expect(screen.queryByTestId('select-option-1')).toBeNull()
|
|
108
|
+
expect(screen.queryByTestId('modal-header')).toBeInTheDocument()
|
|
109
|
+
userEvent.keyboard(`{esc}`)
|
|
110
|
+
expect(screen.queryByTestId('modal-header')).toBeNull()
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
})
|
|
@@ -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}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { render, screen } from '@testing-library/react'
|
|
3
|
+
import userEvent from '@testing-library/user-event'
|
|
4
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
5
|
+
import { Box, Text, Button, Popover } from '..'
|
|
6
|
+
|
|
7
|
+
const PopBasic = ({ children }) => {
|
|
8
|
+
const [open, setOpen] = useState(false)
|
|
9
|
+
return (
|
|
10
|
+
<Box id="container">
|
|
11
|
+
<Popover
|
|
12
|
+
open={open}
|
|
13
|
+
offset={1}
|
|
14
|
+
renderTo="#container"
|
|
15
|
+
anchorElement={
|
|
16
|
+
<Button
|
|
17
|
+
title="Toggle"
|
|
18
|
+
onClick={() => setOpen(!open)}
|
|
19
|
+
id="anchor-element"
|
|
20
|
+
/>
|
|
21
|
+
}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</Popover>
|
|
25
|
+
</Box>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe('Popover', () => {
|
|
30
|
+
it('should not render string in closed Popover', () => {
|
|
31
|
+
const string = 'Test Text'
|
|
32
|
+
render(
|
|
33
|
+
<PopBasic>
|
|
34
|
+
<Text>{string}</Text>
|
|
35
|
+
</PopBasic>
|
|
36
|
+
)
|
|
37
|
+
expect(screen.queryByText(string)).toBeNull()
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('should render string in open Popover', () => {
|
|
41
|
+
const string = 'Test Text'
|
|
42
|
+
render(
|
|
43
|
+
<PopBasic>
|
|
44
|
+
<Text>{string}</Text>
|
|
45
|
+
</PopBasic>
|
|
46
|
+
)
|
|
47
|
+
const openPopover = screen.getByRole('button')
|
|
48
|
+
userEvent.click(openPopover)
|
|
49
|
+
expect(screen.getByText(string)).toBeInTheDocument()
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it('should focus open button on click', () => {
|
|
53
|
+
render(
|
|
54
|
+
<PopBasic>
|
|
55
|
+
<Box />
|
|
56
|
+
</PopBasic>
|
|
57
|
+
)
|
|
58
|
+
const openPopover = screen.getByRole('button')
|
|
59
|
+
userEvent.click(openPopover)
|
|
60
|
+
expect(openPopover).toHaveFocus()
|
|
61
|
+
})
|
|
62
|
+
})
|
package/src/Popover/Popover.tsx
CHANGED
|
@@ -176,6 +176,9 @@ export const Popover = React.forwardRef(
|
|
|
176
176
|
}
|
|
177
177
|
const requestClose = (event) => {
|
|
178
178
|
if (event.key === 'Escape' && onRequestClose) {
|
|
179
|
+
if (open) {
|
|
180
|
+
event.nativeEvent.stopImmediatePropagation()
|
|
181
|
+
}
|
|
179
182
|
onRequestClose()
|
|
180
183
|
}
|
|
181
184
|
if (onKeyDown) {
|
|
@@ -33,24 +33,19 @@ class RewireTabOrder {
|
|
|
33
33
|
this.lastFocusableElement = this.tabbables[this.tabbables.length - 1]
|
|
34
34
|
this.originalActiveElement = document.activeElement as HTMLElement
|
|
35
35
|
this.nextActiveElement = getNextActiveElement(this.originalActiveElement)
|
|
36
|
+
|
|
36
37
|
this.originalActiveElement.addEventListener(
|
|
37
38
|
'keydown',
|
|
38
39
|
this.moveFocusToTargetFromTriggerElement
|
|
39
40
|
)
|
|
40
41
|
this.firstFocusableElement.addEventListener(
|
|
41
42
|
'keydown',
|
|
42
|
-
this.
|
|
43
|
+
this.moveFocusToTargetFromFirstElement
|
|
44
|
+
)
|
|
45
|
+
this.lastFocusableElement.addEventListener(
|
|
46
|
+
'keydown',
|
|
47
|
+
this.moveFocusToTargetFromLastElement
|
|
43
48
|
)
|
|
44
|
-
if (this.nextActiveElement) {
|
|
45
|
-
this.nextActiveElement.addEventListener(
|
|
46
|
-
'keydown',
|
|
47
|
-
this.moveFocusToTargetFromNextElement
|
|
48
|
-
)
|
|
49
|
-
this.lastFocusableElement.addEventListener(
|
|
50
|
-
'keydown',
|
|
51
|
-
this.moveFocusFromTargetToNextElement
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
destroy() {
|
|
@@ -63,57 +58,44 @@ class RewireTabOrder {
|
|
|
63
58
|
)
|
|
64
59
|
this.firstFocusableElement.removeEventListener(
|
|
65
60
|
'keydown',
|
|
66
|
-
this.
|
|
61
|
+
this.moveFocusToTargetFromFirstElement
|
|
62
|
+
)
|
|
63
|
+
this.lastFocusableElement.removeEventListener(
|
|
64
|
+
'keydown',
|
|
65
|
+
this.moveFocusToTargetFromLastElement
|
|
67
66
|
)
|
|
68
|
-
if (this.nextActiveElement) {
|
|
69
|
-
this.nextActiveElement.removeEventListener(
|
|
70
|
-
'keydown',
|
|
71
|
-
this.moveFocusToTargetFromNextElement
|
|
72
|
-
)
|
|
73
|
-
this.lastFocusableElement.removeEventListener(
|
|
74
|
-
'keydown',
|
|
75
|
-
this.moveFocusFromTargetToNextElement
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
focusOriginalActiveElement = () => {
|
|
81
|
-
this.originalActiveElement.focus()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
focusNextActiveElement = () => {
|
|
85
|
-
this.nextActiveElement.focus()
|
|
86
67
|
}
|
|
87
68
|
|
|
88
69
|
moveFocusToTargetFromTriggerElement = (event) => {
|
|
89
70
|
if (!event.shiftKey && event.keyCode === TAB_KEY) {
|
|
90
71
|
event.preventDefault()
|
|
91
|
-
this.
|
|
72
|
+
if (this.tabbables.includes(this.nextActiveElement)) {
|
|
73
|
+
this.nextActiveElement.focus()
|
|
74
|
+
} else {
|
|
75
|
+
this.firstFocusableElement.focus()
|
|
76
|
+
}
|
|
92
77
|
}
|
|
93
78
|
}
|
|
94
79
|
|
|
95
|
-
|
|
80
|
+
moveFocusToTargetFromFirstElement = (event) => {
|
|
96
81
|
if (
|
|
97
82
|
event.target === this.firstFocusableElement &&
|
|
98
83
|
event.shiftKey &&
|
|
99
84
|
event.keyCode === TAB_KEY
|
|
100
85
|
) {
|
|
101
|
-
event.preventDefault()
|
|
102
|
-
this.originalActiveElement.focus()
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
moveFocusToTargetFromNextElement = (event) => {
|
|
107
|
-
if (event.shiftKey && event.keyCode === TAB_KEY) {
|
|
108
86
|
event.preventDefault()
|
|
109
87
|
this.lastFocusableElement.focus()
|
|
110
88
|
}
|
|
111
89
|
}
|
|
112
90
|
|
|
113
|
-
|
|
114
|
-
if (
|
|
91
|
+
moveFocusToTargetFromLastElement = (event) => {
|
|
92
|
+
if (
|
|
93
|
+
event.target === this.lastFocusableElement &&
|
|
94
|
+
!event.shiftKey &&
|
|
95
|
+
event.keyCode === TAB_KEY
|
|
96
|
+
) {
|
|
115
97
|
event.preventDefault()
|
|
116
|
-
this.
|
|
98
|
+
this.firstFocusableElement.focus()
|
|
117
99
|
}
|
|
118
100
|
}
|
|
119
101
|
}
|
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
|
*/
|