@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/dist/esm/Badge/Badge.js
CHANGED
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
+
|
|
3
9
|
import React, { cloneElement } from 'react';
|
|
4
10
|
import Box from '../Box';
|
|
5
|
-
import { getForegroundColor, useBoxSize } from '../system';
|
|
11
|
+
import { getForegroundColor, useBoxSize, useThemeProps } from '../system';
|
|
6
12
|
import StackView from '../StackView';
|
|
7
13
|
import Text from '../Text';
|
|
8
14
|
import { stopPropagationClick } from '../utils';
|
|
9
15
|
|
|
10
16
|
function Badge(_ref) {
|
|
11
17
|
var children = _ref.children,
|
|
12
|
-
_ref$color = _ref.color,
|
|
13
|
-
color = _ref$color === void 0 ? {
|
|
14
|
-
foreground: 'foreground',
|
|
15
|
-
background: 'surfaceTertiary'
|
|
16
|
-
} : _ref$color,
|
|
17
18
|
renderLeft = _ref.renderLeft,
|
|
18
19
|
renderRight = _ref.renderRight,
|
|
19
20
|
onClick = _ref.onClick,
|
|
20
|
-
_ref$radius = _ref.radius,
|
|
21
|
-
radius = _ref$radius === void 0 ? 3 : _ref$radius,
|
|
22
|
-
_ref$size = _ref.size,
|
|
23
|
-
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
24
|
-
square = _ref.square,
|
|
25
21
|
title = _ref.title,
|
|
26
|
-
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "
|
|
22
|
+
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "renderLeft", "renderRight", "onClick", "title"]);
|
|
23
|
+
|
|
24
|
+
var _useThemeProps = useThemeProps('badge', restProps),
|
|
25
|
+
_useThemeProps$color = _useThemeProps.color,
|
|
26
|
+
color = _useThemeProps$color === void 0 ? {
|
|
27
|
+
foreground: 'foreground',
|
|
28
|
+
background: 'surfaceTertiary'
|
|
29
|
+
} : _useThemeProps$color,
|
|
30
|
+
_useThemeProps$radius = _useThemeProps.radius,
|
|
31
|
+
radius = _useThemeProps$radius === void 0 ? 3 : _useThemeProps$radius,
|
|
32
|
+
_useThemeProps$size = _useThemeProps.size,
|
|
33
|
+
size = _useThemeProps$size === void 0 ? 'md' : _useThemeProps$size,
|
|
34
|
+
_useThemeProps$square = _useThemeProps.square,
|
|
35
|
+
square = _useThemeProps$square === void 0 ? false : _useThemeProps$square,
|
|
36
|
+
themeProps = _objectWithoutPropertiesLoose(_useThemeProps, ["color", "radius", "size", "square"]);
|
|
37
|
+
|
|
38
|
+
var badgeProps = _objectSpread({
|
|
39
|
+
color: color,
|
|
40
|
+
radius: radius,
|
|
41
|
+
size: size,
|
|
42
|
+
square: square
|
|
43
|
+
}, themeProps);
|
|
44
|
+
|
|
45
|
+
badgeProps.backgroundColor = color.background || color;
|
|
46
|
+
badgeProps.color = color.foreground || getForegroundColor(color);
|
|
27
47
|
|
|
28
|
-
var _useBoxSize = useBoxSize(size),
|
|
48
|
+
var _useBoxSize = useBoxSize(badgeProps.size),
|
|
29
49
|
boxSize = _useBoxSize.boxSize,
|
|
30
50
|
fontSize = _useBoxSize.fontSize,
|
|
31
51
|
lineHeight = _useBoxSize.lineHeight,
|
|
@@ -40,34 +60,29 @@ function Badge(_ref) {
|
|
|
40
60
|
color: 'inherit'
|
|
41
61
|
};
|
|
42
62
|
|
|
43
|
-
if (square || radius === 'circle') {
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
if (badgeProps.square || badgeProps.radius === 'circle') {
|
|
64
|
+
badgeProps.width = boxSize;
|
|
65
|
+
badgeProps.height = boxSize;
|
|
46
66
|
}
|
|
47
67
|
|
|
48
|
-
if (radius === 'circle') {
|
|
68
|
+
if (badgeProps.radius === 'circle') {
|
|
49
69
|
textStyle.position = 'absolute';
|
|
50
70
|
textStyle.top = '50%';
|
|
51
71
|
textStyle.left = '50%';
|
|
52
72
|
textStyle.transform = 'translate(-50%, -50%)';
|
|
53
73
|
}
|
|
54
74
|
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
badgeProps.paddingLeft = renderLeft ? boxSize + 0.5 : badgeProps.radius === 'pill' ? paddingHorizontal : paddingHorizontalDense;
|
|
76
|
+
badgeProps.paddingRight = renderRight ? boxSize + 0.5 : badgeProps.radius === 'pill' ? paddingHorizontal : paddingHorizontalDense;
|
|
57
77
|
return /*#__PURE__*/React.createElement(StackView, _extends({
|
|
58
78
|
inline: true,
|
|
59
79
|
axis: "horizontal",
|
|
60
80
|
alignment: "center",
|
|
61
81
|
distribution: "center",
|
|
62
|
-
radius: radius,
|
|
63
82
|
fontSize: fontSize,
|
|
64
83
|
lineHeight: lineHeight,
|
|
65
84
|
minHeight: boxSize,
|
|
66
|
-
paddingLeft: spacingLeft,
|
|
67
|
-
paddingRight: spacingRight,
|
|
68
85
|
paddingVertical: paddingVertical,
|
|
69
|
-
backgroundColor: color.background || color,
|
|
70
|
-
color: color.foreground || getForegroundColor(color),
|
|
71
86
|
fill: "currentColor",
|
|
72
87
|
textAlign: "center",
|
|
73
88
|
position: "relative",
|
|
@@ -77,7 +92,7 @@ function Badge(_ref) {
|
|
|
77
92
|
backgroundColor: 'highlightSecondary'
|
|
78
93
|
},
|
|
79
94
|
onClick: stopPropagationClick(onClick)
|
|
80
|
-
},
|
|
95
|
+
}, badgeProps), renderLeft && /*#__PURE__*/React.createElement(Box, {
|
|
81
96
|
display: "flex",
|
|
82
97
|
alignItems: "center",
|
|
83
98
|
justifyContent: "center",
|
|
@@ -87,7 +102,7 @@ function Badge(_ref) {
|
|
|
87
102
|
top: 0,
|
|
88
103
|
left: 0
|
|
89
104
|
}, typeof renderLeft === 'string' ? renderLeft : /*#__PURE__*/cloneElement(renderLeft, {
|
|
90
|
-
size: renderLeft.props && renderLeft.props.size || size
|
|
105
|
+
size: renderLeft.props && renderLeft.props.size || badgeProps.size
|
|
91
106
|
})), typeof title === 'undefined' ? children : /*#__PURE__*/React.createElement(Text, textStyle, title), renderRight && /*#__PURE__*/React.createElement(Box, {
|
|
92
107
|
display: "flex",
|
|
93
108
|
alignItems: "center",
|
|
@@ -98,7 +113,7 @@ function Badge(_ref) {
|
|
|
98
113
|
top: 0,
|
|
99
114
|
right: 0
|
|
100
115
|
}, typeof renderRight === 'string' ? renderRight : /*#__PURE__*/cloneElement(renderRight, {
|
|
101
|
-
size: renderRight.props && renderRight.props.size || size
|
|
116
|
+
size: renderRight.props && renderRight.props.size || badgeProps.size
|
|
102
117
|
})));
|
|
103
118
|
}
|
|
104
119
|
|
package/dist/esm/Badge/Status.js
CHANGED
|
@@ -179,7 +179,8 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref, calendarRef) {
|
|
|
179
179
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
180
180
|
title: "Previous month",
|
|
181
181
|
icon: {
|
|
182
|
-
name: '
|
|
182
|
+
name: 'general.leftChevron',
|
|
183
|
+
size: "xxs"
|
|
183
184
|
},
|
|
184
185
|
disabled: isYearsView ? currentYear <= minYear : isSameMonth(currentDate, minDate),
|
|
185
186
|
onClick: function onClick() {
|
|
@@ -190,7 +191,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref, calendarRef) {
|
|
|
190
191
|
title: 'Today'
|
|
191
192
|
},
|
|
192
193
|
icon: {
|
|
193
|
-
name: '
|
|
194
|
+
name: 'tapestry.radio1'
|
|
194
195
|
},
|
|
195
196
|
onClick: function onClick() {
|
|
196
197
|
return setDate(TODAY, true);
|
|
@@ -198,7 +199,8 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref, calendarRef) {
|
|
|
198
199
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
199
200
|
title: "Next month",
|
|
200
201
|
icon: {
|
|
201
|
-
name: '
|
|
202
|
+
name: 'general.rightChevron',
|
|
203
|
+
size: "xxs"
|
|
202
204
|
},
|
|
203
205
|
disabled: isYearsView ? currentYear >= maxYear : isSameMonth(currentDate, maxDate),
|
|
204
206
|
onClick: function onClick() {
|
package/dist/esm/Card/Card.js
CHANGED
|
@@ -4,8 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { useThemeValue } from '../system';
|
|
5
5
|
import { StackView } from '../StackView';
|
|
6
6
|
import { cloneChildren } from '../utils';
|
|
7
|
-
|
|
8
|
-
function Section(_ref) {
|
|
7
|
+
export function Section(_ref) {
|
|
9
8
|
var subdued = _ref.subdued,
|
|
10
9
|
restProps = _objectWithoutPropertiesLoose(_ref, ["subdued"]);
|
|
11
10
|
|
|
@@ -15,7 +14,6 @@ function Section(_ref) {
|
|
|
15
14
|
backgroundColor: subdued ? 'surfaceSecondary' : undefined
|
|
16
15
|
}, restProps));
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
export function Card(_ref2) {
|
|
20
18
|
var children = _ref2.children,
|
|
21
19
|
subdued = _ref2.subdued,
|
|
@@ -41,4 +39,5 @@ export function Card(_ref2) {
|
|
|
41
39
|
return child.props.radius === undefined ? firstChild ? (_ref4 = {}, _ref4["radius" + (restProps.axis === 'horizontal' ? 'Left' : 'Top')] = radius - 1, _ref4) : lastChild ? (_ref5 = {}, _ref5["radius" + (restProps.axis === 'horizontal' ? 'Right' : 'Bottom')] = radius - 1, _ref5) : {} : {};
|
|
42
40
|
}) : children);
|
|
43
41
|
}
|
|
42
|
+
Section.displayName = 'Card.Section';
|
|
44
43
|
Card.Section = Section;
|
|
@@ -13,9 +13,9 @@ import { useThemeValue } from '../system';
|
|
|
13
13
|
import { useAccessibilityViolation } from '../hooks/use-accessibility-violation';
|
|
14
14
|
import { mergeProps } from '../utils';
|
|
15
15
|
var iconPaths = {
|
|
16
|
-
fill: '
|
|
17
|
-
minus: '
|
|
18
|
-
checked: '
|
|
16
|
+
fill: 'tapestry.checkbox0',
|
|
17
|
+
minus: 'tapestry.checkbox1',
|
|
18
|
+
checked: 'tapestry.checkbox2'
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
var _ref2 = /*#__PURE__*/React.createElement(Link, {
|
|
@@ -68,10 +68,10 @@ export function ChurchCenterStatus(_ref) {
|
|
|
68
68
|
var hasLinks = showSettingsLink || ccEnabled && ccPublishingEnabled || !!renderPopoverFooter();
|
|
69
69
|
|
|
70
70
|
var icon = _objectSpread({
|
|
71
|
-
check: '
|
|
72
|
-
exclamationTriangle: '
|
|
73
|
-
external: '
|
|
74
|
-
x: '
|
|
71
|
+
check: 'general.check',
|
|
72
|
+
exclamationTriangle: 'general.exclamationTriangle',
|
|
73
|
+
external: 'general.newWindow',
|
|
74
|
+
x: 'general.x'
|
|
75
75
|
}, icons);
|
|
76
76
|
|
|
77
77
|
return /*#__PURE__*/React.createElement(StackView, _extends({
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import React, { Children } from 'react';
|
|
4
4
|
import StackView from '../StackView';
|
|
5
|
+
import { spacingValue } from '../system';
|
|
5
6
|
|
|
6
7
|
function Column() {
|
|
7
8
|
return null;
|
|
@@ -14,6 +15,7 @@ function ColumnView(props) {
|
|
|
14
15
|
spacing = props.spacing,
|
|
15
16
|
restProps = _objectWithoutPropertiesLoose(props, ["children", "sizes", "spacing"]);
|
|
16
17
|
|
|
18
|
+
var parsedSpacing = spacingValue(spacing);
|
|
17
19
|
var sortedColumns = Children.toArray(children).sort(function (a, b) {
|
|
18
20
|
return (a.props.order || 0) - (b.props.order || 0);
|
|
19
21
|
}).reduce(function (columns, cell, index) {
|
|
@@ -37,8 +39,8 @@ function ColumnView(props) {
|
|
|
37
39
|
basis: size === 'auto' ? '100%' : size.basis || size,
|
|
38
40
|
shrink: size === 'auto' ? 1 : size.shrink || 0,
|
|
39
41
|
grow: size === 'auto' ? 1 : size.grow || 0,
|
|
40
|
-
marginLeft: index === 0 ? null :
|
|
41
|
-
spacing:
|
|
42
|
+
marginLeft: index === 0 ? null : parsedSpacing,
|
|
43
|
+
spacing: parsedSpacing
|
|
42
44
|
}, column.map(function (cell) {
|
|
43
45
|
return cell.props.children;
|
|
44
46
|
}));
|
|
@@ -201,14 +201,14 @@ var ComboboxPopover = /*#__PURE__*/function (_Component) {
|
|
|
201
201
|
renderRight: closeButton ? /*#__PURE__*/React.createElement(Button, _extends({
|
|
202
202
|
disabled: disabled,
|
|
203
203
|
icon: {
|
|
204
|
-
name: '
|
|
204
|
+
name: 'general.x'
|
|
205
205
|
},
|
|
206
206
|
title: "close options",
|
|
207
207
|
theme: false
|
|
208
208
|
}, closeButton)) : dropdownButton ? /*#__PURE__*/React.createElement(Button, {
|
|
209
209
|
disabled: disabled,
|
|
210
210
|
icon: {
|
|
211
|
-
name: isPopoverOpen ? '
|
|
211
|
+
name: isPopoverOpen ? 'general.x' : 'general.downCaret'
|
|
212
212
|
},
|
|
213
213
|
title: isPopoverOpen ? 'close options' : 'open options',
|
|
214
214
|
theme: false,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
|
-
import Icon from '
|
|
3
|
+
import Icon from '../../Icon';
|
|
4
4
|
var iconPaths = {
|
|
5
|
-
fill: '
|
|
6
|
-
minus: '
|
|
7
|
-
checked: '
|
|
5
|
+
fill: 'tapestry.checkbox0',
|
|
6
|
+
minus: 'tapestry.checkbox1',
|
|
7
|
+
checked: 'tapestry.checkbox2'
|
|
8
8
|
};
|
|
9
9
|
var scaleStyles = {
|
|
10
10
|
visibility: 'visible',
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import Dropdown from '../../Dropdown';
|
|
6
5
|
import Text from '../../Text';
|
|
7
|
-
import Checkbox from '
|
|
6
|
+
import Checkbox from '../../Checkbox';
|
|
8
7
|
|
|
9
8
|
var noop = function noop() {
|
|
10
9
|
return null;
|
|
@@ -22,7 +21,7 @@ function ColumnPicker(_ref) {
|
|
|
22
21
|
return /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
23
22
|
variant: "outline",
|
|
24
23
|
icon: {
|
|
25
|
-
name: '
|
|
24
|
+
name: 'general.threeVerticalBars'
|
|
26
25
|
},
|
|
27
26
|
tooltip: {
|
|
28
27
|
title: 'Filter Columns'
|
|
@@ -52,7 +51,9 @@ function ColumnPicker(_ref) {
|
|
|
52
51
|
value: column.id
|
|
53
52
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
54
53
|
checked: hiddenColumnIds.indexOf(column.id) === -1,
|
|
55
|
-
onChange: noop
|
|
54
|
+
onChange: noop,
|
|
55
|
+
label: null,
|
|
56
|
+
size: "md"
|
|
56
57
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
57
58
|
marginLeft: 1
|
|
58
59
|
}, column.label || column.header));
|
|
@@ -8,7 +8,7 @@ import { useCallback, useState } from 'react';
|
|
|
8
8
|
export var SORT_ASC = 'ASC';
|
|
9
9
|
export var SORT_DESC = 'DESC';
|
|
10
10
|
export function getIconDirection(direction) {
|
|
11
|
-
return direction === SORT_ASC ? '
|
|
11
|
+
return direction === SORT_ASC ? 'general.upCaret' : 'general.downCaret';
|
|
12
12
|
}
|
|
13
13
|
export function getOppositeSortDirection(direction) {
|
|
14
14
|
return direction === SORT_ASC ? SORT_DESC : SORT_ASC;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import Box from '../../Box';
|
|
4
4
|
import Tooltip from '../../Tooltip';
|
|
5
5
|
import { useCollapsibleRowsStore, useSubRowOpen, useAnySubRowsOpen } from '../hooks/useCollapsibleRows';
|
|
6
|
-
import Icon from '
|
|
6
|
+
import Icon from '../../Icon';
|
|
7
7
|
var buttonStyles = {
|
|
8
8
|
appearance: 'none',
|
|
9
9
|
display: 'flex',
|
|
@@ -45,7 +45,7 @@ function CollapseHeader(_ref) {
|
|
|
45
45
|
callbacks.toggleAllSubRows();
|
|
46
46
|
}
|
|
47
47
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
48
|
-
name: "
|
|
48
|
+
name: "general.downCaret",
|
|
49
49
|
size: "sm",
|
|
50
50
|
style: {
|
|
51
51
|
transform: anySubRowsOpen ? undefined : 'rotate(-90deg)',
|
|
@@ -68,7 +68,7 @@ function CollapseCell(_ref2) {
|
|
|
68
68
|
callbacks.toggleSubRowAtIndex(rowIndex);
|
|
69
69
|
}
|
|
70
70
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
71
|
-
name: "
|
|
71
|
+
name: "general.downCaret",
|
|
72
72
|
size: "sm",
|
|
73
73
|
style: {
|
|
74
74
|
transform: isSubRowOpen ? undefined : 'rotate(-90deg)',
|
|
@@ -119,7 +119,7 @@ function getParsedColumns(_ref3) {
|
|
|
119
119
|
return event.preventDefault();
|
|
120
120
|
}
|
|
121
121
|
}, _dragHandleProps), /*#__PURE__*/React.createElement(Icon, {
|
|
122
|
-
name: "
|
|
122
|
+
name: "general.dragHandle",
|
|
123
123
|
size: "sm",
|
|
124
124
|
color: "foregroundTertiary",
|
|
125
125
|
style: {
|
|
@@ -2,12 +2,14 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import StackView from '../StackView';
|
|
5
|
+
import { useThemeValue } from '../system';
|
|
5
6
|
|
|
6
7
|
function DrawerContents(_ref) {
|
|
7
8
|
var shouldClose = _ref.shouldClose,
|
|
8
9
|
onClose = _ref.onClose,
|
|
9
10
|
restProps = _objectWithoutPropertiesLoose(_ref, ["shouldClose", "onClose"]);
|
|
10
11
|
|
|
12
|
+
var themeProps = useThemeValue('drawer');
|
|
11
13
|
var ref = useRef(null);
|
|
12
14
|
|
|
13
15
|
var _useState = useState(false),
|
|
@@ -51,7 +53,7 @@ function DrawerContents(_ref) {
|
|
|
51
53
|
boxShadow: "-6px 0px 6px -4px rgba(150,150,150,0.25)",
|
|
52
54
|
backgroundColor: "surfaceTertiary",
|
|
53
55
|
transition: "transform 240ms ease-out"
|
|
54
|
-
}, restProps));
|
|
56
|
+
}, themeProps, restProps));
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
function Drawer(props) {
|
|
@@ -177,7 +177,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
177
177
|
'aria-haspopup': true,
|
|
178
178
|
'aria-expanded': isPopoverOpen
|
|
179
179
|
}, _objectSpread2[arrowIconOnly ? 'icon' : 'iconRight'] = {
|
|
180
|
-
name: isPopoverOpen ? '
|
|
180
|
+
name: isPopoverOpen ? 'general.upCaret' : 'general.downCaret',
|
|
181
181
|
size: 'sm'
|
|
182
182
|
}, _objectSpread2.title = arrowIconOnly ? 'arrow down' : restProps.title, _objectSpread2.tabIndex = 0, _objectSpread2.cursor = 'pointer', _objectSpread2.onBlur = requestBlur, _objectSpread2.onClick = function onClick() {
|
|
183
183
|
_this2.togglePopover();
|
|
@@ -17,6 +17,8 @@ var Link = /*#__PURE__*/function (_Component) {
|
|
|
17
17
|
|
|
18
18
|
var _proto = Link.prototype;
|
|
19
19
|
|
|
20
|
+
// Graphql wasn't picking up the correct displayName when this was
|
|
21
|
+
// assigned to LINK_DISPLAY_NAME, but using a string works
|
|
20
22
|
_proto.render = function render() {
|
|
21
23
|
var _this$props = this.props,
|
|
22
24
|
disabled = _this$props.disabled,
|
|
@@ -62,6 +64,6 @@ var Link = /*#__PURE__*/function (_Component) {
|
|
|
62
64
|
return Link;
|
|
63
65
|
}(Component);
|
|
64
66
|
|
|
65
|
-
_defineProperty(Link, "displayName",
|
|
67
|
+
_defineProperty(Link, "displayName", 'Dropdown.Link');
|
|
66
68
|
|
|
67
69
|
export default Link;
|
|
@@ -4,6 +4,7 @@ import React, { Children, useEffect, useState } from 'react';
|
|
|
4
4
|
import Button from '../Button';
|
|
5
5
|
import StackView from '../StackView';
|
|
6
6
|
import { useDocumentEvent, useFocus, useHover } from '../hooks';
|
|
7
|
+
import { useThemeProps } from '../system';
|
|
7
8
|
|
|
8
9
|
function EditActions(_ref) {
|
|
9
10
|
var display = _ref.display,
|
|
@@ -33,6 +34,10 @@ function EditActions(_ref) {
|
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
36
|
|
|
37
|
+
var _useThemeProps = useThemeProps('editActions', restProps),
|
|
38
|
+
buttonProps = _useThemeProps.buttonProps,
|
|
39
|
+
themeProps = _objectWithoutPropertiesLoose(_useThemeProps, ["buttonProps"]);
|
|
40
|
+
|
|
36
41
|
useEffect(function () {
|
|
37
42
|
if (loading === false) {
|
|
38
43
|
setShowCheck(true);
|
|
@@ -54,11 +59,11 @@ function EditActions(_ref) {
|
|
|
54
59
|
onClick: on ? undefined : function () {
|
|
55
60
|
return setOn(true);
|
|
56
61
|
}
|
|
57
|
-
}, focusProps, hoverProps,
|
|
62
|
+
}, focusProps, hoverProps, themeProps), Children.toArray(on ? edit : display), /*#__PURE__*/React.createElement(Button, _extends({
|
|
58
63
|
grow: 0,
|
|
59
64
|
title: on ? 'Close' : 'Edit',
|
|
60
65
|
icon: {
|
|
61
|
-
name: showCheck ? '
|
|
66
|
+
name: showCheck ? 'general.check' : on ? 'general.x' : 'general.pencil',
|
|
62
67
|
color: showCheck ? 'green' : undefined
|
|
63
68
|
},
|
|
64
69
|
tooltip: {
|
|
@@ -73,7 +78,7 @@ function EditActions(_ref) {
|
|
|
73
78
|
spinner: on && loading ? {
|
|
74
79
|
color: 'primary'
|
|
75
80
|
} : undefined
|
|
76
|
-
}));
|
|
81
|
+
}, buttonProps)));
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
export default EditActions;
|
|
@@ -1,36 +1,48 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
+
|
|
3
9
|
import React from 'react';
|
|
4
10
|
import Heading from '../Heading';
|
|
5
11
|
import StackView from '../StackView';
|
|
6
12
|
import TileView from '../TileView';
|
|
7
13
|
import Toolbar from '../Toolbar';
|
|
14
|
+
import { useThemeProps } from '../system';
|
|
8
15
|
|
|
9
16
|
function FieldSet(_ref) {
|
|
10
17
|
var children = _ref.children,
|
|
11
|
-
_ref$minCellWidth = _ref.minCellWidth,
|
|
12
|
-
minCellWidth = _ref$minCellWidth === void 0 ? 16 : _ref$minCellWidth,
|
|
13
|
-
_ref$spacing = _ref.spacing,
|
|
14
|
-
spacing = _ref$spacing === void 0 ? 1 : _ref$spacing,
|
|
15
18
|
helpContent = _ref.helpContent,
|
|
16
19
|
legend = _ref.legend,
|
|
17
|
-
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "
|
|
20
|
+
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "helpContent", "legend"]);
|
|
21
|
+
|
|
22
|
+
var _useThemeProps = useThemeProps('fieldset', _objectSpread({}, restProps)),
|
|
23
|
+
headingProps = _useThemeProps.headingProps,
|
|
24
|
+
tileViewProps = _useThemeProps.tileViewProps,
|
|
25
|
+
_useThemeProps$spacin = _useThemeProps.spacing,
|
|
26
|
+
spacing = _useThemeProps$spacin === void 0 ? 1 : _useThemeProps$spacin,
|
|
27
|
+
_useThemeProps$minCel = _useThemeProps.minCellWidth,
|
|
28
|
+
minCellWidth = _useThemeProps$minCel === void 0 ? 16 : _useThemeProps$minCel,
|
|
29
|
+
themeProps = _objectWithoutPropertiesLoose(_useThemeProps, ["headingProps", "tileViewProps", "spacing", "minCellWidth"]);
|
|
18
30
|
|
|
19
31
|
return /*#__PURE__*/React.createElement(StackView, _extends({
|
|
20
32
|
as: "fieldset",
|
|
21
33
|
padding: 0,
|
|
22
34
|
margin: 2
|
|
23
|
-
}, restProps), /*#__PURE__*/React.createElement(Toolbar, {
|
|
24
|
-
title: /*#__PURE__*/React.createElement(Heading, {
|
|
35
|
+
}, themeProps, restProps), /*#__PURE__*/React.createElement(Toolbar, {
|
|
36
|
+
title: /*#__PURE__*/React.createElement(Heading, _extends({
|
|
25
37
|
as: "legend",
|
|
26
38
|
level: 4
|
|
27
|
-
}, legend),
|
|
39
|
+
}, headingProps), legend),
|
|
28
40
|
helpContent: helpContent,
|
|
29
41
|
marginBottom: 1
|
|
30
|
-
}), /*#__PURE__*/React.createElement(TileView, {
|
|
42
|
+
}), /*#__PURE__*/React.createElement(TileView, _extends({
|
|
31
43
|
minCellWidth: minCellWidth,
|
|
32
44
|
spacing: spacing
|
|
33
|
-
}, children));
|
|
45
|
+
}, tileViewProps), children));
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
export default FieldSet;
|
|
@@ -57,7 +57,8 @@ export function FilterLayout(props) {
|
|
|
57
57
|
title: "Filter",
|
|
58
58
|
"aria-label": sidebarOpen ? 'close filter' : 'open filter',
|
|
59
59
|
iconRight: {
|
|
60
|
-
name: sidebarOpen ? '
|
|
60
|
+
name: sidebarOpen ? 'general.leftChevron' : 'general.threeReducingHorizontalBars',
|
|
61
|
+
size: sidebarOpen ? 'xs' : 'md'
|
|
61
62
|
},
|
|
62
63
|
onClick: toggleSidebar
|
|
63
64
|
}), /*#__PURE__*/React.createElement(Box, {
|
package/dist/esm/Form/Form.js
CHANGED
|
@@ -110,7 +110,7 @@ var Form = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
editButtonProps: {
|
|
111
111
|
disabled: isSubmitting,
|
|
112
112
|
icon: isEditing ? undefined : {
|
|
113
|
-
name: 'pencil'
|
|
113
|
+
name: 'general.pencil'
|
|
114
114
|
},
|
|
115
115
|
onClick: function onClick() {
|
|
116
116
|
// bail out if we've already triggered a submit in onBlur
|
|
@@ -12,6 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
import { jsx } from '@emotion/core';
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import splitStyles from '../system/split-styles';
|
|
15
|
+
import { spacingValue } from '../system';
|
|
15
16
|
import { useVariant } from '../VariantProvider';
|
|
16
17
|
|
|
17
18
|
function getTemplateValue(value) {
|
|
@@ -64,15 +65,15 @@ var gridViewPlugin = {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
if (columnSpacing !== undefined && styles.gridColumnGap === undefined) {
|
|
67
|
-
styles.gridColumnGap = columnSpacing
|
|
68
|
+
styles.gridColumnGap = spacingValue(columnSpacing);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
if (rowSpacing !== undefined && styles.gridRowGap === undefined) {
|
|
71
|
-
styles.gridRowGap = rowSpacing
|
|
72
|
+
styles.gridRowGap = spacingValue(rowSpacing);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
if (spacing !== undefined && styles.
|
|
75
|
-
styles.
|
|
75
|
+
if (spacing !== undefined && styles.gap === undefined) {
|
|
76
|
+
styles.gap = spacingValue(spacing);
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
return styles;
|
package/dist/esm/Group/Group.js
CHANGED
|
@@ -23,14 +23,19 @@ export function Group(_ref) {
|
|
|
23
23
|
var isHorizontalLayout = axis === 'horizontal';
|
|
24
24
|
var startRadius = isHorizontalLayout ? 'radiusLeft' : 'radiusTop';
|
|
25
25
|
var endRadius = isHorizontalLayout ? 'radiusRight' : 'radiusBottom';
|
|
26
|
+
var marginBottom = isHorizontalLayout ? 0 : '-1px';
|
|
27
|
+
var marginRight = isHorizontalLayout ? '-1px' : 0;
|
|
26
28
|
return /*#__PURE__*/React.createElement(StackView, _extends({
|
|
27
|
-
axis: axis
|
|
28
|
-
spacing: -0.125
|
|
29
|
+
axis: axis
|
|
29
30
|
}, restProps), cloneChildren(children, function (child, _ref2) {
|
|
30
31
|
var _objectSpread2;
|
|
31
32
|
|
|
32
33
|
var firstChild = _ref2.firstChild,
|
|
33
34
|
lastChild = _ref2.lastChild;
|
|
34
|
-
return _objectSpread(_objectSpread({}, childProps), {}, (_objectSpread2 = {}, _objectSpread2[startRadius] = firstChild ? radiusValue : 0, _objectSpread2[endRadius] = lastChild ? radiusValue : 0, _objectSpread2)
|
|
35
|
+
return _objectSpread(_objectSpread(_objectSpread({}, childProps), {}, (_objectSpread2 = {}, _objectSpread2[startRadius] = firstChild ? radiusValue : 0, _objectSpread2[endRadius] = lastChild ? radiusValue : 0, _objectSpread2), !lastChild && {
|
|
36
|
+
marginBottom: marginBottom
|
|
37
|
+
}), !lastChild && {
|
|
38
|
+
marginRight: marginRight
|
|
39
|
+
});
|
|
35
40
|
}));
|
|
36
41
|
}
|
|
@@ -2,13 +2,13 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Text from '../Text';
|
|
5
|
-
import {
|
|
5
|
+
import { useThemeProps } from '../system';
|
|
6
6
|
|
|
7
7
|
function HeadingUppercase(_ref) {
|
|
8
8
|
var children = _ref.children,
|
|
9
9
|
restProps = _objectWithoutPropertiesLoose(_ref, ["children"]);
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var themeProps = useThemeProps('HeadingUppercase', restProps);
|
|
12
12
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
13
13
|
as: "span",
|
|
14
14
|
uppercase: true,
|
|
@@ -18,7 +18,7 @@ function HeadingUppercase(_ref) {
|
|
|
18
18
|
color: "foregroundSecondary",
|
|
19
19
|
shrink: 0,
|
|
20
20
|
margin: 0
|
|
21
|
-
},
|
|
21
|
+
}, themeProps), children);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export default HeadingUppercase;
|