@planningcenter/tapestry-react 0.0.1-alpha.0 → 1.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/Button/Button.js +4 -4
- package/dist/cjs/Checkbox/Checkbox.js +2 -2
- package/dist/cjs/DataTable/DataTable.js +3 -3
- package/dist/cjs/DataTable/components/BodyRows.js +2 -2
- package/dist/cjs/DataTable/components/BodySubRows.js +2 -2
- package/dist/cjs/DataTable/components/CheckboxCell.js +10 -10
- package/dist/cjs/DataTable/components/Icon.js +1 -1
- package/dist/cjs/Radio/Radio.js +1 -1
- package/dist/cjs/ThemeProvider/ThemeProvider.js +2 -2
- package/dist/cjs/ThemeProvider/styles.js +4 -4
- package/dist/cjs/server.js +1 -1
- package/dist/cjs/system/split-styles.js +1 -1
- package/dist/esm/Button/Button.js +4 -4
- package/dist/esm/Checkbox/Checkbox.js +2 -2
- package/dist/esm/DataTable/DataTable.js +3 -3
- package/dist/esm/DataTable/components/BodyRows.js +2 -2
- package/dist/esm/DataTable/components/BodySubRows.js +2 -2
- package/dist/esm/DataTable/components/CheckboxCell.js +10 -10
- package/dist/esm/DataTable/components/Icon.js +1 -1
- package/dist/esm/Radio/Radio.js +1 -1
- package/dist/esm/ThemeProvider/ThemeProvider.js +2 -2
- package/dist/esm/ThemeProvider/styles.js +4 -4
- package/dist/esm/server.js +1 -1
- package/dist/esm/system/split-styles.js +1 -1
- package/package.json +1 -1
- package/src/Button/Button.tsx +4 -4
- package/src/Checkbox/Checkbox.js +2 -2
- package/src/Combobox/Combobox.mdx +1 -1
- package/src/DataTable/DataTable.js +3 -3
- package/src/DataTable/components/BodyRows.js +2 -2
- package/src/DataTable/components/BodySubRows.js +2 -2
- package/src/DataTable/components/CheckboxCell.js +10 -10
- package/src/DataTable/components/Icon.js +1 -1
- package/src/Input/InputLabel.js +1 -1
- package/src/Radio/Radio.js +1 -1
- package/src/ThemeProvider/ThemeProvider.tsx +2 -2
- package/src/ThemeProvider/styles.ts +6 -6
- package/src/server.js +1 -1
- package/src/system/README.md +2 -2
- package/src/system/split-styles.js +1 -1
|
@@ -233,13 +233,13 @@ function Button(_ref) {
|
|
|
233
233
|
if (icon && !(title || tooltip && tooltip.title)) {
|
|
234
234
|
var _useAccessibilityViol = (0, _useAccessibilityViolation.useAccessibilityViolation)( /*#__PURE__*/React.createElement(React.Fragment, null, "Icon only buttons must define either a", ' ', /*#__PURE__*/React.createElement(_Link["default"], {
|
|
235
235
|
external: true,
|
|
236
|
-
to: "https://ministrycentered.github.io/
|
|
236
|
+
to: "https://ministrycentered.github.io/tapestry-react/button#tooltip",
|
|
237
237
|
weight: 700
|
|
238
238
|
}, "tooltip"), ' ', "or", ' ', /*#__PURE__*/React.createElement(_Link["default"], {
|
|
239
239
|
external: true,
|
|
240
|
-
to: "https://ministrycentered.github.io/
|
|
240
|
+
to: "https://ministrycentered.github.io/tapestry-react/button#title",
|
|
241
241
|
weight: 700
|
|
242
|
-
}, "title"), ' ', "prop."), "
|
|
242
|
+
}, "title"), ' ', "prop."), "Tapestry-React: <Button/> icon only buttons must define either a \"tooltip\" or \"title\" prop for proper accessibility."),
|
|
243
243
|
tooltipProps = _useAccessibilityViol.tooltipProps,
|
|
244
244
|
wrapperProps = _useAccessibilityViol.wrapperProps;
|
|
245
245
|
|
|
@@ -248,7 +248,7 @@ function Button(_ref) {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
if (restProps['type'] === 'submit') {
|
|
251
|
-
throw Error("
|
|
251
|
+
throw Error("Tapestry-React: <Button/> does not support type=\"submit\" please add an explicit onClick handler.");
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -78,9 +78,9 @@ function Checkbox(_ref) {
|
|
|
78
78
|
|
|
79
79
|
var _useAccessibilityViol = (0, _useAccessibilityViolation.useAccessibilityViolation)( /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "Checkbox must define a", ' ', /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
80
80
|
external: true,
|
|
81
|
-
to: "https://ministrycentered.github.io/
|
|
81
|
+
to: "https://ministrycentered.github.io/tapestry-react/checkbox#label",
|
|
82
82
|
weight: 700
|
|
83
|
-
}, "label"), ' ', "through props or a parent element that is a label."), "
|
|
83
|
+
}, "label"), ' ', "through props or a parent element that is a label."), "Tapestry-React: <Checkbox/> must define a \"label\" prop or have a parent that renders a label for proper accessibility."),
|
|
84
84
|
tooltipProps = _useAccessibilityViol.tooltipProps,
|
|
85
85
|
wrapperProps = _useAccessibilityViol.wrapperProps;
|
|
86
86
|
|
|
@@ -205,7 +205,7 @@ var DataTable = function DataTable(props) {
|
|
|
205
205
|
style: isLoadingOrEmpty ? {
|
|
206
206
|
display: 'none'
|
|
207
207
|
} : undefined,
|
|
208
|
-
className: "
|
|
208
|
+
className: "tapestry-react-reset " + css({
|
|
209
209
|
position: 'relative'
|
|
210
210
|
})
|
|
211
211
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -226,7 +226,7 @@ var DataTable = function DataTable(props) {
|
|
|
226
226
|
column: column,
|
|
227
227
|
columnIndex: columnIndex,
|
|
228
228
|
columnSort: columnSort,
|
|
229
|
-
className: "
|
|
229
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantClassName, [column.css]))
|
|
230
230
|
});
|
|
231
231
|
}))), bodyToRender, hasFooterColumns && /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
232
|
ref: footerRef,
|
|
@@ -244,7 +244,7 @@ var DataTable = function DataTable(props) {
|
|
|
244
244
|
key: columnIndex,
|
|
245
245
|
role: "cell",
|
|
246
246
|
ref: getColumnRef(columnIndex + "." + (data.length + 1)),
|
|
247
|
-
className: "
|
|
247
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantClassName, [column.css]))
|
|
248
248
|
}, typeof column.footer === 'string' || /*#__PURE__*/_react["default"].isValidElement(column.footer) ? column.footer : column.footer ? /*#__PURE__*/_react["default"].createElement(column.footer, {
|
|
249
249
|
columnIndex: columnIndex
|
|
250
250
|
}) : null);
|
|
@@ -57,7 +57,7 @@ function BodyRows(_ref) {
|
|
|
57
57
|
ref: getColumnRef(columnIndex + "." + (rowIndex + 1)) // offset by 1 to account for header row
|
|
58
58
|
,
|
|
59
59
|
role: "cell",
|
|
60
|
-
className: "
|
|
60
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantStyles, [column.css]))
|
|
61
61
|
}, (0, _utils.getCell)(column.cell, {
|
|
62
62
|
columnIndex: columnIndex,
|
|
63
63
|
rowData: rowData,
|
|
@@ -83,7 +83,7 @@ function BodyRows(_ref) {
|
|
|
83
83
|
rowIndex: rowIndex,
|
|
84
84
|
keyboardShortcuts: keyboardShortcuts,
|
|
85
85
|
onRowClick: onRowClick,
|
|
86
|
-
className: "
|
|
86
|
+
className: "tapestry-react-reset " + css(rowVariantClassName)
|
|
87
87
|
}, (0, _utils.getRowLinkProps)({
|
|
88
88
|
getRowLink: getRowLink,
|
|
89
89
|
data: rowData,
|
|
@@ -71,7 +71,7 @@ var BodySubRows = function BodySubRows(_ref2) {
|
|
|
71
71
|
rowIndex: rowIndex,
|
|
72
72
|
keyboardShortcuts: keyboardShortcuts,
|
|
73
73
|
onRowClick: onRowClick,
|
|
74
|
-
className: "
|
|
74
|
+
className: "tapestry-react-reset " + css(rowVariantClassName)
|
|
75
75
|
}, (0, _utils.getRowLinkProps)({
|
|
76
76
|
getRowLink: getRowLink,
|
|
77
77
|
data: rowData,
|
|
@@ -90,7 +90,7 @@ var BodySubRows = function BodySubRows(_ref2) {
|
|
|
90
90
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
91
|
key: columnIndex,
|
|
92
92
|
ref: getColumnRef(columnIndex + "." + (parentRowIndex + 1) + "." + rowIndex),
|
|
93
|
-
className: "
|
|
93
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantClassName, [column.css]))
|
|
94
94
|
}, (0, _utils.getCell)(column.subCell !== undefined ? column.subCell : column.cell, {
|
|
95
95
|
columnIndex: columnIndex,
|
|
96
96
|
rowData: rowData,
|
|
@@ -27,12 +27,12 @@ var initialStyles = {
|
|
|
27
27
|
flexShrink: 0,
|
|
28
28
|
outline: 0,
|
|
29
29
|
cursor: 'pointer',
|
|
30
|
-
' .
|
|
30
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
31
31
|
transform: 'scale(1)',
|
|
32
32
|
transformOrigin: 'center center',
|
|
33
33
|
transition: 'all 180ms ease-out'
|
|
34
34
|
},
|
|
35
|
-
' .
|
|
35
|
+
' .tapestry-react-Checkbox-Minus, .tapestry-react-Checkbox-Checked ': {
|
|
36
36
|
fill: '#fff',
|
|
37
37
|
visibility: 'hidden',
|
|
38
38
|
transform: 'scale(0)',
|
|
@@ -40,21 +40,21 @@ var initialStyles = {
|
|
|
40
40
|
transition: 'all 180ms ease-out'
|
|
41
41
|
},
|
|
42
42
|
' &:hover, &:focus ': {
|
|
43
|
-
' .
|
|
43
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
44
44
|
transform: 'scale(1.125)'
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
' &:active ': {
|
|
48
|
-
' .
|
|
48
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
49
49
|
transform: 'scale(1)'
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
var checkedStyles = {
|
|
54
|
-
' .
|
|
54
|
+
' .tapestry-react-Checkbox-Checked ': scaleStyles
|
|
55
55
|
};
|
|
56
56
|
var indeterminateStyles = {
|
|
57
|
-
' .
|
|
57
|
+
' .tapestry-react-Checkbox-Minus ': scaleStyles
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
function CheckboxCell(_ref) {
|
|
@@ -96,19 +96,19 @@ function CheckboxCell(_ref) {
|
|
|
96
96
|
onKeyDown: function onKeyDown(event) {
|
|
97
97
|
return event.key === ' ' && handleChange(event);
|
|
98
98
|
},
|
|
99
|
-
className: "
|
|
99
|
+
className: "tapestry-react-reset tapestry-react-Checkbox",
|
|
100
100
|
css: cssStyles
|
|
101
101
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"].Path, {
|
|
102
102
|
name: iconPaths.fill,
|
|
103
|
-
className: "
|
|
103
|
+
className: "tapestry-react-reset tapestry-react-Checkbox-Fill",
|
|
104
104
|
fill: checked || indeterminate ? 'primary' : 'surfaceTertiary',
|
|
105
105
|
stroke: checked || indeterminate ? 'primary' : 'separatorSecondary'
|
|
106
106
|
}), /*#__PURE__*/_react["default"].createElement(_Icon["default"].Path, {
|
|
107
107
|
name: iconPaths.minus,
|
|
108
|
-
className: "
|
|
108
|
+
className: "tapestry-react-reset tapestry-react-Checkbox-Minus"
|
|
109
109
|
}), /*#__PURE__*/_react["default"].createElement(_Icon["default"].Path, {
|
|
110
110
|
name: iconPaths.checked,
|
|
111
|
-
className: "
|
|
111
|
+
className: "tapestry-react-reset tapestry-react-Checkbox-Checked"
|
|
112
112
|
}));
|
|
113
113
|
}
|
|
114
114
|
|
package/dist/cjs/Radio/Radio.js
CHANGED
|
@@ -109,7 +109,7 @@ function Radio(_ref) {
|
|
|
109
109
|
zIndex: 0,
|
|
110
110
|
opacity: 0
|
|
111
111
|
}), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
112
|
-
className: "
|
|
112
|
+
className: "tapestry-react-Radio-Icon",
|
|
113
113
|
size: size
|
|
114
114
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"].Path, {
|
|
115
115
|
name: iconPaths.fill,
|
|
@@ -35,9 +35,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
35
35
|
|
|
36
36
|
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) { (0, _defineProperty2["default"])(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; }
|
|
37
37
|
|
|
38
|
-
var STORAGE_KEY = '
|
|
38
|
+
var STORAGE_KEY = 'tapestry-react-theme';
|
|
39
39
|
var cache = (0, _cache["default"])({
|
|
40
|
-
key: '
|
|
40
|
+
key: 'tapestry-react',
|
|
41
41
|
prefix: function prefix(key) {
|
|
42
42
|
switch (key) {
|
|
43
43
|
case 'appearance':
|
|
@@ -15,7 +15,7 @@ var getRootStyles = function getRootStyles(styles) {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
var setRootStyles = function setRootStyles(styles) {
|
|
18
|
-
var styleElement = document.getElementById('
|
|
18
|
+
var styleElement = document.getElementById('tapestry-react-style');
|
|
19
19
|
var sheet = styleElement.sheet;
|
|
20
20
|
var styleString = getRootStyles(styles);
|
|
21
21
|
sheet.deleteRule(0);
|
|
@@ -25,16 +25,16 @@ var setRootStyles = function setRootStyles(styles) {
|
|
|
25
25
|
exports.setRootStyles = setRootStyles;
|
|
26
26
|
var defaultColorProperties = (0, _utils.objectToCSSProperties)('colors', (0, _system.flattenPalette)(_system.defaultTheme.colors));
|
|
27
27
|
exports.defaultColorProperties = defaultColorProperties;
|
|
28
|
-
var styleReset = ("\n" + getRootStyles(defaultColorProperties) + "\n\n.
|
|
28
|
+
var styleReset = ("\n" + getRootStyles(defaultColorProperties) + "\n\n.tapestry-react-reset {\n appearance: none;\n box-sizing: border-box;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n font-weight: 400;\n text-decoration: none;\n flex: 0 0 auto;\n min-width: 0px;\n min-height: 0px;\n padding: 0px;\n margin: 0px;\n border: 0px solid transparent;\n background-color: transparent;\n color: inherit;\n}\n\n.tapestry-react-reset::-moz-focus-inner {\n padding: 0px;\n border: 0px;\n}\n\n.tapestry-react-reset:focus:not(.focus-visible) {\n outline: 0px;\n}\n" // minify string
|
|
29
29
|
).replace(/\n/g, '').replace(/\s\s+/g, ' '); // we use our own global style implementation in place of Emotion Global
|
|
30
30
|
// so we can have more control over when styles are injected since multiple
|
|
31
31
|
// Providers can be used on a page
|
|
32
32
|
|
|
33
33
|
exports.styleReset = styleReset;
|
|
34
34
|
|
|
35
|
-
if (typeof window !== 'undefined' && !document.getElementById('
|
|
35
|
+
if (typeof window !== 'undefined' && !document.getElementById('tapestry-react-style')) {
|
|
36
36
|
var styleElement = document.createElement('style');
|
|
37
|
-
styleElement.id = '
|
|
37
|
+
styleElement.id = 'tapestry-react-style';
|
|
38
38
|
styleElement.innerHTML = styleReset;
|
|
39
39
|
document.head.insertAdjacentElement('afterbegin', styleElement);
|
|
40
40
|
}
|
package/dist/cjs/server.js
CHANGED
|
@@ -10,7 +10,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _ThemeProvider = _interopRequireDefault(require("./ThemeProvider"));
|
|
11
11
|
|
|
12
12
|
var styleElement = /*#__PURE__*/_react["default"].createElement("style", {
|
|
13
|
-
id: "
|
|
13
|
+
id: "tapestry-react-style",
|
|
14
14
|
dangerouslySetInnerHTML: {
|
|
15
15
|
__html: _ThemeProvider["default"].styleReset
|
|
16
16
|
}
|
|
@@ -46,7 +46,7 @@ function _default(_ref) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
return _objectSpread(_objectSpread({}, restProps), {}, {
|
|
49
|
-
className: className ? "
|
|
49
|
+
className: className ? "tapestry-react-reset " + className : "tapestry-react-reset",
|
|
50
50
|
css: function css(theme) {
|
|
51
51
|
var propStyles = {};
|
|
52
52
|
|
|
@@ -19,13 +19,13 @@ import Input from './Input';
|
|
|
19
19
|
|
|
20
20
|
var _ref2 = /*#__PURE__*/React.createElement(Link, {
|
|
21
21
|
external: true,
|
|
22
|
-
to: "https://ministrycentered.github.io/
|
|
22
|
+
to: "https://ministrycentered.github.io/tapestry-react/button#tooltip",
|
|
23
23
|
weight: 700
|
|
24
24
|
}, "tooltip");
|
|
25
25
|
|
|
26
26
|
var _ref3 = /*#__PURE__*/React.createElement(Link, {
|
|
27
27
|
external: true,
|
|
28
|
-
to: "https://ministrycentered.github.io/
|
|
28
|
+
to: "https://ministrycentered.github.io/tapestry-react/button#title",
|
|
29
29
|
weight: 700
|
|
30
30
|
}, "title");
|
|
31
31
|
|
|
@@ -224,7 +224,7 @@ export function Button(_ref) {
|
|
|
224
224
|
|
|
225
225
|
if (process.env.NODE_ENV !== 'production') {
|
|
226
226
|
if (icon && !(title || tooltip && tooltip.title)) {
|
|
227
|
-
var _useAccessibilityViol = useAccessibilityViolation( /*#__PURE__*/React.createElement(React.Fragment, null, "Icon only buttons must define either a", ' ', _ref2, ' ', "or", ' ', _ref3, ' ', "prop."), "
|
|
227
|
+
var _useAccessibilityViol = useAccessibilityViolation( /*#__PURE__*/React.createElement(React.Fragment, null, "Icon only buttons must define either a", ' ', _ref2, ' ', "or", ' ', _ref3, ' ', "prop."), "Tapestry-React: <Button/> icon only buttons must define either a \"tooltip\" or \"title\" prop for proper accessibility."),
|
|
228
228
|
tooltipProps = _useAccessibilityViol.tooltipProps,
|
|
229
229
|
wrapperProps = _useAccessibilityViol.wrapperProps;
|
|
230
230
|
|
|
@@ -233,7 +233,7 @@ export function Button(_ref) {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
if (restProps['type'] === 'submit') {
|
|
236
|
-
throw Error("
|
|
236
|
+
throw Error("Tapestry-React: <Button/> does not support type=\"submit\" please add an explicit onClick handler.");
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -20,7 +20,7 @@ var iconPaths = {
|
|
|
20
20
|
|
|
21
21
|
var _ref2 = /*#__PURE__*/React.createElement(Link, {
|
|
22
22
|
external: true,
|
|
23
|
-
to: "https://ministrycentered.github.io/
|
|
23
|
+
to: "https://ministrycentered.github.io/tapestry-react/checkbox#label",
|
|
24
24
|
weight: 700
|
|
25
25
|
}, "label");
|
|
26
26
|
|
|
@@ -60,7 +60,7 @@ function Checkbox(_ref) {
|
|
|
60
60
|
needsParentLabel = _useState3[0],
|
|
61
61
|
setNeedsParentLabel = _useState3[1];
|
|
62
62
|
|
|
63
|
-
var _useAccessibilityViol = useAccessibilityViolation( /*#__PURE__*/React.createElement(React.Fragment, null, "Checkbox must define a", ' ', _ref2, ' ', "through props or a parent element that is a label."), "
|
|
63
|
+
var _useAccessibilityViol = useAccessibilityViolation( /*#__PURE__*/React.createElement(React.Fragment, null, "Checkbox must define a", ' ', _ref2, ' ', "through props or a parent element that is a label."), "Tapestry-React: <Checkbox/> must define a \"label\" prop or have a parent that renders a label for proper accessibility."),
|
|
64
64
|
tooltipProps = _useAccessibilityViol.tooltipProps,
|
|
65
65
|
wrapperProps = _useAccessibilityViol.wrapperProps;
|
|
66
66
|
|
|
@@ -182,7 +182,7 @@ var DataTable = function DataTable(props) {
|
|
|
182
182
|
style: isLoadingOrEmpty ? {
|
|
183
183
|
display: 'none'
|
|
184
184
|
} : undefined,
|
|
185
|
-
className: "
|
|
185
|
+
className: "tapestry-react-reset " + css({
|
|
186
186
|
position: 'relative'
|
|
187
187
|
})
|
|
188
188
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -203,7 +203,7 @@ var DataTable = function DataTable(props) {
|
|
|
203
203
|
column: column,
|
|
204
204
|
columnIndex: columnIndex,
|
|
205
205
|
columnSort: columnSort,
|
|
206
|
-
className: "
|
|
206
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantClassName, [column.css]))
|
|
207
207
|
});
|
|
208
208
|
}))), bodyToRender, hasFooterColumns && /*#__PURE__*/React.createElement("div", {
|
|
209
209
|
ref: footerRef,
|
|
@@ -221,7 +221,7 @@ var DataTable = function DataTable(props) {
|
|
|
221
221
|
key: columnIndex,
|
|
222
222
|
role: "cell",
|
|
223
223
|
ref: getColumnRef(columnIndex + "." + (data.length + 1)),
|
|
224
|
-
className: "
|
|
224
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantClassName, [column.css]))
|
|
225
225
|
}, typeof column.footer === 'string' || /*#__PURE__*/React.isValidElement(column.footer) ? column.footer : column.footer ? /*#__PURE__*/React.createElement(column.footer, {
|
|
226
226
|
columnIndex: columnIndex
|
|
227
227
|
}) : null);
|
|
@@ -42,7 +42,7 @@ function BodyRows(_ref) {
|
|
|
42
42
|
ref: getColumnRef(columnIndex + "." + (rowIndex + 1)) // offset by 1 to account for header row
|
|
43
43
|
,
|
|
44
44
|
role: "cell",
|
|
45
|
-
className: "
|
|
45
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantStyles, [column.css]))
|
|
46
46
|
}, getCell(column.cell, {
|
|
47
47
|
columnIndex: columnIndex,
|
|
48
48
|
rowData: rowData,
|
|
@@ -68,7 +68,7 @@ function BodyRows(_ref) {
|
|
|
68
68
|
rowIndex: rowIndex,
|
|
69
69
|
keyboardShortcuts: keyboardShortcuts,
|
|
70
70
|
onRowClick: onRowClick,
|
|
71
|
-
className: "
|
|
71
|
+
className: "tapestry-react-reset " + css(rowVariantClassName)
|
|
72
72
|
}, getRowLinkProps({
|
|
73
73
|
getRowLink: getRowLink,
|
|
74
74
|
data: rowData,
|
|
@@ -58,7 +58,7 @@ var BodySubRows = function BodySubRows(_ref2) {
|
|
|
58
58
|
rowIndex: rowIndex,
|
|
59
59
|
keyboardShortcuts: keyboardShortcuts,
|
|
60
60
|
onRowClick: onRowClick,
|
|
61
|
-
className: "
|
|
61
|
+
className: "tapestry-react-reset " + css(rowVariantClassName)
|
|
62
62
|
}, getRowLinkProps({
|
|
63
63
|
getRowLink: getRowLink,
|
|
64
64
|
data: rowData,
|
|
@@ -77,7 +77,7 @@ var BodySubRows = function BodySubRows(_ref2) {
|
|
|
77
77
|
return /*#__PURE__*/React.createElement("div", {
|
|
78
78
|
key: columnIndex,
|
|
79
79
|
ref: getColumnRef(columnIndex + "." + (parentRowIndex + 1) + "." + rowIndex),
|
|
80
|
-
className: "
|
|
80
|
+
className: "tapestry-react-reset " + css([].concat(cellVariantClassName, [column.css]))
|
|
81
81
|
}, getCell(column.subCell !== undefined ? column.subCell : column.cell, {
|
|
82
82
|
columnIndex: columnIndex,
|
|
83
83
|
rowData: rowData,
|
|
@@ -15,12 +15,12 @@ var initialStyles = {
|
|
|
15
15
|
flexShrink: 0,
|
|
16
16
|
outline: 0,
|
|
17
17
|
cursor: 'pointer',
|
|
18
|
-
' .
|
|
18
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
19
19
|
transform: 'scale(1)',
|
|
20
20
|
transformOrigin: 'center center',
|
|
21
21
|
transition: 'all 180ms ease-out'
|
|
22
22
|
},
|
|
23
|
-
' .
|
|
23
|
+
' .tapestry-react-Checkbox-Minus, .tapestry-react-Checkbox-Checked ': {
|
|
24
24
|
fill: '#fff',
|
|
25
25
|
visibility: 'hidden',
|
|
26
26
|
transform: 'scale(0)',
|
|
@@ -28,21 +28,21 @@ var initialStyles = {
|
|
|
28
28
|
transition: 'all 180ms ease-out'
|
|
29
29
|
},
|
|
30
30
|
' &:hover, &:focus ': {
|
|
31
|
-
' .
|
|
31
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
32
32
|
transform: 'scale(1.125)'
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
' &:active ': {
|
|
36
|
-
' .
|
|
36
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
37
37
|
transform: 'scale(1)'
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
var checkedStyles = {
|
|
42
|
-
' .
|
|
42
|
+
' .tapestry-react-Checkbox-Checked ': scaleStyles
|
|
43
43
|
};
|
|
44
44
|
var indeterminateStyles = {
|
|
45
|
-
' .
|
|
45
|
+
' .tapestry-react-Checkbox-Minus ': scaleStyles
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
function CheckboxCell(_ref) {
|
|
@@ -85,19 +85,19 @@ function CheckboxCell(_ref) {
|
|
|
85
85
|
onKeyDown: function onKeyDown(event) {
|
|
86
86
|
return event.key === ' ' && handleChange(event);
|
|
87
87
|
},
|
|
88
|
-
className: "
|
|
88
|
+
className: "tapestry-react-reset tapestry-react-Checkbox",
|
|
89
89
|
css: cssStyles
|
|
90
90
|
}, /*#__PURE__*/React.createElement(Icon.Path, {
|
|
91
91
|
name: iconPaths.fill,
|
|
92
|
-
className: "
|
|
92
|
+
className: "tapestry-react-reset tapestry-react-Checkbox-Fill",
|
|
93
93
|
fill: checked || indeterminate ? 'primary' : 'surfaceTertiary',
|
|
94
94
|
stroke: checked || indeterminate ? 'primary' : 'separatorSecondary'
|
|
95
95
|
}), /*#__PURE__*/React.createElement(Icon.Path, {
|
|
96
96
|
name: iconPaths.minus,
|
|
97
|
-
className: "
|
|
97
|
+
className: "tapestry-react-reset tapestry-react-Checkbox-Minus"
|
|
98
98
|
}), /*#__PURE__*/React.createElement(Icon.Path, {
|
|
99
99
|
name: iconPaths.checked,
|
|
100
|
-
className: "
|
|
100
|
+
className: "tapestry-react-reset tapestry-react-Checkbox-Checked"
|
|
101
101
|
}));
|
|
102
102
|
}
|
|
103
103
|
|
package/dist/esm/Radio/Radio.js
CHANGED
|
@@ -91,7 +91,7 @@ function Radio(_ref) {
|
|
|
91
91
|
zIndex: 0,
|
|
92
92
|
opacity: 0
|
|
93
93
|
}), /*#__PURE__*/React.createElement(Icon, {
|
|
94
|
-
className: "
|
|
94
|
+
className: "tapestry-react-Radio-Icon",
|
|
95
95
|
size: size
|
|
96
96
|
}, /*#__PURE__*/React.createElement(Icon.Path, {
|
|
97
97
|
name: iconPaths.fill,
|
|
@@ -13,9 +13,9 @@ import defaultTheme from '../system/default-theme';
|
|
|
13
13
|
import { flattenPalette } from '../system';
|
|
14
14
|
import { objectToCSSProperties, shallowEqual } from '../utils';
|
|
15
15
|
import { setRootStyles, styleReset } from './styles';
|
|
16
|
-
var STORAGE_KEY = '
|
|
16
|
+
var STORAGE_KEY = 'tapestry-react-theme';
|
|
17
17
|
export var cache = createCache({
|
|
18
|
-
key: '
|
|
18
|
+
key: 'tapestry-react',
|
|
19
19
|
prefix: function prefix(key) {
|
|
20
20
|
switch (key) {
|
|
21
21
|
case 'appearance':
|
|
@@ -9,21 +9,21 @@ var getRootStyles = function getRootStyles(styles) {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export var setRootStyles = function setRootStyles(styles) {
|
|
12
|
-
var styleElement = document.getElementById('
|
|
12
|
+
var styleElement = document.getElementById('tapestry-react-style');
|
|
13
13
|
var sheet = styleElement.sheet;
|
|
14
14
|
var styleString = getRootStyles(styles);
|
|
15
15
|
sheet.deleteRule(0);
|
|
16
16
|
sheet.insertRule(styleString, 0);
|
|
17
17
|
};
|
|
18
18
|
export var defaultColorProperties = objectToCSSProperties('colors', flattenPalette(defaultTheme.colors));
|
|
19
|
-
export var styleReset = ("\n" + getRootStyles(defaultColorProperties) + "\n\n.
|
|
19
|
+
export var styleReset = ("\n" + getRootStyles(defaultColorProperties) + "\n\n.tapestry-react-reset {\n appearance: none;\n box-sizing: border-box;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n font-weight: 400;\n text-decoration: none;\n flex: 0 0 auto;\n min-width: 0px;\n min-height: 0px;\n padding: 0px;\n margin: 0px;\n border: 0px solid transparent;\n background-color: transparent;\n color: inherit;\n}\n\n.tapestry-react-reset::-moz-focus-inner {\n padding: 0px;\n border: 0px;\n}\n\n.tapestry-react-reset:focus:not(.focus-visible) {\n outline: 0px;\n}\n" // minify string
|
|
20
20
|
).replace(/\n/g, '').replace(/\s\s+/g, ' '); // we use our own global style implementation in place of Emotion Global
|
|
21
21
|
// so we can have more control over when styles are injected since multiple
|
|
22
22
|
// Providers can be used on a page
|
|
23
23
|
|
|
24
|
-
if (typeof window !== 'undefined' && !document.getElementById('
|
|
24
|
+
if (typeof window !== 'undefined' && !document.getElementById('tapestry-react-style')) {
|
|
25
25
|
var styleElement = document.createElement('style');
|
|
26
|
-
styleElement.id = '
|
|
26
|
+
styleElement.id = 'tapestry-react-style';
|
|
27
27
|
styleElement.innerHTML = styleReset;
|
|
28
28
|
document.head.insertAdjacentElement('afterbegin', styleElement);
|
|
29
29
|
}
|
package/dist/esm/server.js
CHANGED
|
@@ -37,7 +37,7 @@ export default function (_ref) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
return _objectSpread(_objectSpread({}, restProps), {}, {
|
|
40
|
-
className: className ? "
|
|
40
|
+
className: className ? "tapestry-react-reset " + className : "tapestry-react-reset",
|
|
41
41
|
css: function css(theme) {
|
|
42
42
|
var propStyles = {};
|
|
43
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/tapestry-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A collection of flexible React components to help you build resilient, accessible user interfaces quickly and effectively.",
|
|
5
5
|
"author": "Front End Systems Engineering <frontend@pco.bz>",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
package/src/Button/Button.tsx
CHANGED
|
@@ -278,7 +278,7 @@ export function Button({
|
|
|
278
278
|
Icon only buttons must define either a{' '}
|
|
279
279
|
<Link
|
|
280
280
|
external
|
|
281
|
-
to="https://ministrycentered.github.io/
|
|
281
|
+
to="https://ministrycentered.github.io/tapestry-react/button#tooltip"
|
|
282
282
|
weight={700}
|
|
283
283
|
>
|
|
284
284
|
tooltip
|
|
@@ -286,21 +286,21 @@ export function Button({
|
|
|
286
286
|
or{' '}
|
|
287
287
|
<Link
|
|
288
288
|
external
|
|
289
|
-
to="https://ministrycentered.github.io/
|
|
289
|
+
to="https://ministrycentered.github.io/tapestry-react/button#title"
|
|
290
290
|
weight={700}
|
|
291
291
|
>
|
|
292
292
|
title
|
|
293
293
|
</Link>{' '}
|
|
294
294
|
prop.
|
|
295
295
|
</>,
|
|
296
|
-
`
|
|
296
|
+
`Tapestry-React: <Button/> icon only buttons must define either a "tooltip" or "title" prop for proper accessibility.`
|
|
297
297
|
)
|
|
298
298
|
tooltip = tooltipProps
|
|
299
299
|
restProps = mergeProps(restProps, wrapperProps)
|
|
300
300
|
}
|
|
301
301
|
if (restProps['type'] === 'submit') {
|
|
302
302
|
throw Error(
|
|
303
|
-
`
|
|
303
|
+
`Tapestry-React: <Button/> does not support type="submit" please add an explicit onClick handler.`
|
|
304
304
|
)
|
|
305
305
|
}
|
|
306
306
|
}
|
package/src/Checkbox/Checkbox.js
CHANGED
|
@@ -105,14 +105,14 @@ function Checkbox({
|
|
|
105
105
|
Checkbox must define a{' '}
|
|
106
106
|
<Link
|
|
107
107
|
external
|
|
108
|
-
to="https://ministrycentered.github.io/
|
|
108
|
+
to="https://ministrycentered.github.io/tapestry-react/checkbox#label"
|
|
109
109
|
weight={700}
|
|
110
110
|
>
|
|
111
111
|
label
|
|
112
112
|
</Link>{' '}
|
|
113
113
|
through props or a parent element that is a label.
|
|
114
114
|
</>,
|
|
115
|
-
`
|
|
115
|
+
`Tapestry-React: <Checkbox/> must define a "label" prop or have a parent that renders a label for proper accessibility.`
|
|
116
116
|
)
|
|
117
117
|
useLayoutEffect(() => {
|
|
118
118
|
function findParent(node, findMatch) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Combobox
|
|
3
3
|
category: Forms
|
|
4
|
-
summary: Used for easily selecting a list of items that are paired with a text input. Composes [Combobox.Input](https://github.com/ministrycentered/
|
|
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
5
|
---
|
|
6
6
|
|
|
7
7
|
### Combobox
|
|
@@ -432,7 +432,7 @@ const DataTable = (props: Props) => {
|
|
|
432
432
|
<div
|
|
433
433
|
role={getRowLink ? undefined : 'grid'}
|
|
434
434
|
style={isLoadingOrEmpty ? { display: 'none' } : undefined}
|
|
435
|
-
className={`
|
|
435
|
+
className={`tapestry-react-reset ${css({ position: 'relative' })}`}
|
|
436
436
|
>
|
|
437
437
|
<div
|
|
438
438
|
ref={headerRef}
|
|
@@ -452,7 +452,7 @@ const DataTable = (props: Props) => {
|
|
|
452
452
|
column={column}
|
|
453
453
|
columnIndex={columnIndex}
|
|
454
454
|
columnSort={columnSort}
|
|
455
|
-
className={`
|
|
455
|
+
className={`tapestry-react-reset ${css([
|
|
456
456
|
...cellVariantClassName,
|
|
457
457
|
column.css,
|
|
458
458
|
])}`}
|
|
@@ -479,7 +479,7 @@ const DataTable = (props: Props) => {
|
|
|
479
479
|
key={columnIndex}
|
|
480
480
|
role="cell"
|
|
481
481
|
ref={getColumnRef(`${columnIndex}.${data.length + 1}`)}
|
|
482
|
-
className={`
|
|
482
|
+
className={`tapestry-react-reset ${css([
|
|
483
483
|
...cellVariantClassName,
|
|
484
484
|
column.css,
|
|
485
485
|
])}`}
|
|
@@ -38,7 +38,7 @@ function BodyRows({
|
|
|
38
38
|
key={columnIndex}
|
|
39
39
|
ref={getColumnRef(`${columnIndex}.${rowIndex + 1}`)} // offset by 1 to account for header row
|
|
40
40
|
role="cell"
|
|
41
|
-
className={`
|
|
41
|
+
className={`tapestry-react-reset ${css([...cellVariantStyles, column.css])}`}
|
|
42
42
|
>
|
|
43
43
|
{getCell(column.cell, {
|
|
44
44
|
columnIndex,
|
|
@@ -64,7 +64,7 @@ function BodyRows({
|
|
|
64
64
|
rowIndex,
|
|
65
65
|
keyboardShortcuts,
|
|
66
66
|
onRowClick,
|
|
67
|
-
className: `
|
|
67
|
+
className: `tapestry-react-reset ${css(rowVariantClassName)}`,
|
|
68
68
|
...getRowLinkProps({ getRowLink, data: rowData, isSubRow: false }),
|
|
69
69
|
}
|
|
70
70
|
const subRowData = getSubData ? getSubData(rowData) : null
|
|
@@ -57,7 +57,7 @@ const BodySubRows = ({
|
|
|
57
57
|
rowIndex={rowIndex}
|
|
58
58
|
keyboardShortcuts={keyboardShortcuts}
|
|
59
59
|
onRowClick={onRowClick}
|
|
60
|
-
className={`
|
|
60
|
+
className={`tapestry-react-reset ${css(rowVariantClassName)}`}
|
|
61
61
|
{...getRowLinkProps({ getRowLink, data: rowData, isSubRow: true })}
|
|
62
62
|
>
|
|
63
63
|
{columns.map((column, columnIndex) => {
|
|
@@ -77,7 +77,7 @@ const BodySubRows = ({
|
|
|
77
77
|
ref={getColumnRef(
|
|
78
78
|
`${columnIndex}.${parentRowIndex + 1}.${rowIndex}`
|
|
79
79
|
)}
|
|
80
|
-
className={`
|
|
80
|
+
className={`tapestry-react-reset ${css([
|
|
81
81
|
...cellVariantClassName,
|
|
82
82
|
column.css,
|
|
83
83
|
])}`}
|
|
@@ -18,12 +18,12 @@ const initialStyles = {
|
|
|
18
18
|
flexShrink: 0,
|
|
19
19
|
outline: 0,
|
|
20
20
|
cursor: 'pointer',
|
|
21
|
-
' .
|
|
21
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
22
22
|
transform: 'scale(1)',
|
|
23
23
|
transformOrigin: 'center center',
|
|
24
24
|
transition: 'all 180ms ease-out',
|
|
25
25
|
},
|
|
26
|
-
' .
|
|
26
|
+
' .tapestry-react-Checkbox-Minus, .tapestry-react-Checkbox-Checked ': {
|
|
27
27
|
fill: '#fff',
|
|
28
28
|
visibility: 'hidden',
|
|
29
29
|
transform: 'scale(0)',
|
|
@@ -31,23 +31,23 @@ const initialStyles = {
|
|
|
31
31
|
transition: 'all 180ms ease-out',
|
|
32
32
|
},
|
|
33
33
|
' &:hover, &:focus ': {
|
|
34
|
-
' .
|
|
34
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
35
35
|
transform: 'scale(1.125)',
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
' &:active ': {
|
|
39
|
-
' .
|
|
39
|
+
' .tapestry-react-Checkbox-Fill ': {
|
|
40
40
|
transform: 'scale(1)',
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const checkedStyles = {
|
|
46
|
-
' .
|
|
46
|
+
' .tapestry-react-Checkbox-Checked ': scaleStyles,
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
const indeterminateStyles = {
|
|
50
|
-
' .
|
|
50
|
+
' .tapestry-react-Checkbox-Minus ': scaleStyles,
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
function CheckboxCell({
|
|
@@ -87,22 +87,22 @@ function CheckboxCell({
|
|
|
87
87
|
onFocus={onFocus}
|
|
88
88
|
onClick={handleChange}
|
|
89
89
|
onKeyDown={(event) => event.key === ' ' && handleChange(event)}
|
|
90
|
-
className="
|
|
90
|
+
className="tapestry-react-reset tapestry-react-Checkbox"
|
|
91
91
|
css={cssStyles}
|
|
92
92
|
>
|
|
93
93
|
<Icon.Path
|
|
94
94
|
name={iconPaths.fill}
|
|
95
|
-
className="
|
|
95
|
+
className="tapestry-react-reset tapestry-react-Checkbox-Fill"
|
|
96
96
|
fill={checked || indeterminate ? 'primary' : 'surfaceTertiary'}
|
|
97
97
|
stroke={checked || indeterminate ? 'primary' : 'separatorSecondary'}
|
|
98
98
|
/>
|
|
99
99
|
<Icon.Path
|
|
100
100
|
name={iconPaths.minus}
|
|
101
|
-
className="
|
|
101
|
+
className="tapestry-react-reset tapestry-react-Checkbox-Minus"
|
|
102
102
|
/>
|
|
103
103
|
<Icon.Path
|
|
104
104
|
name={iconPaths.checked}
|
|
105
|
-
className="
|
|
105
|
+
className="tapestry-react-reset tapestry-react-Checkbox-Checked"
|
|
106
106
|
/>
|
|
107
107
|
</Icon>
|
|
108
108
|
)
|
package/src/Input/InputLabel.js
CHANGED
|
@@ -8,7 +8,7 @@ import { inputs, inputLabels } from './utils'
|
|
|
8
8
|
|
|
9
9
|
export type InputLabelProps = {
|
|
10
10
|
/**
|
|
11
|
-
* The `id` of the input to control. Compatible with all
|
|
11
|
+
* The `id` of the input to control. Compatible with all Tapestry-React form components.
|
|
12
12
|
*/
|
|
13
13
|
controls: string,
|
|
14
14
|
|
package/src/Radio/Radio.js
CHANGED
|
@@ -10,10 +10,10 @@ import { Theme } from '../index'
|
|
|
10
10
|
import { objectToCSSProperties, shallowEqual } from '../utils'
|
|
11
11
|
import { setRootStyles, styleReset } from './styles'
|
|
12
12
|
|
|
13
|
-
const STORAGE_KEY = '
|
|
13
|
+
const STORAGE_KEY = 'tapestry-react-theme'
|
|
14
14
|
|
|
15
15
|
export const cache = createCache({
|
|
16
|
-
key: '
|
|
16
|
+
key: 'tapestry-react',
|
|
17
17
|
prefix: (key) => {
|
|
18
18
|
switch (key) {
|
|
19
19
|
case 'appearance':
|
|
@@ -9,7 +9,7 @@ const getRootStyles = (styles) => {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const setRootStyles = (styles) => {
|
|
12
|
-
const styleElement = <HTMLStyleElement>document.getElementById('
|
|
12
|
+
const styleElement = <HTMLStyleElement>document.getElementById('tapestry-react-style')
|
|
13
13
|
const sheet = <CSSStyleSheet>styleElement.sheet
|
|
14
14
|
const styleString = getRootStyles(styles)
|
|
15
15
|
sheet.deleteRule(0)
|
|
@@ -24,7 +24,7 @@ export const defaultColorProperties = objectToCSSProperties(
|
|
|
24
24
|
export const styleReset = `
|
|
25
25
|
${getRootStyles(defaultColorProperties)}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.tapestry-react-reset {
|
|
28
28
|
appearance: none;
|
|
29
29
|
box-sizing: border-box;
|
|
30
30
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -40,12 +40,12 @@ ${getRootStyles(defaultColorProperties)}
|
|
|
40
40
|
color: inherit;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.
|
|
43
|
+
.tapestry-react-reset::-moz-focus-inner {
|
|
44
44
|
padding: 0px;
|
|
45
45
|
border: 0px;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.
|
|
48
|
+
.tapestry-react-reset:focus:not(.focus-visible) {
|
|
49
49
|
outline: 0px;
|
|
50
50
|
}
|
|
51
51
|
`
|
|
@@ -56,9 +56,9 @@ ${getRootStyles(defaultColorProperties)}
|
|
|
56
56
|
// we use our own global style implementation in place of Emotion Global
|
|
57
57
|
// so we can have more control over when styles are injected since multiple
|
|
58
58
|
// Providers can be used on a page
|
|
59
|
-
if (typeof window !== 'undefined' && !document.getElementById('
|
|
59
|
+
if (typeof window !== 'undefined' && !document.getElementById('tapestry-react-style')) {
|
|
60
60
|
const styleElement = document.createElement('style')
|
|
61
|
-
styleElement.id = '
|
|
61
|
+
styleElement.id = 'tapestry-react-style'
|
|
62
62
|
styleElement.innerHTML = styleReset
|
|
63
63
|
document.head.insertAdjacentElement('afterbegin', styleElement)
|
|
64
64
|
}
|
package/src/server.js
CHANGED
package/src/system/README.md
CHANGED
|
@@ -41,7 +41,7 @@ function Box(props) {
|
|
|
41
41
|
|
|
42
42
|
<small>See the [Box](../Box/Box.tsx) component for an actual implementation.</small>
|
|
43
43
|
|
|
44
|
-
The `splitStyles` function will also process any `mediaQueries` and `variants` props that are defined. See [Responsive](https://ministrycentered.github.io/
|
|
44
|
+
The `splitStyles` function will also process any `mediaQueries` and `variants` props that are defined. See [Responsive](https://ministrycentered.github.io/tapestry-react/responsive) and [Variants](https://ministrycentered.github.io/tapestry-react/variants) for more information and examples.
|
|
45
45
|
|
|
46
46
|
### Plugins
|
|
47
47
|
|
|
@@ -90,7 +90,7 @@ function StackView(props) {
|
|
|
90
90
|
A fork of the [CXS](https://github.com/cxs-css/cxs) library is available as an escape hatch if Emotion is performing poorly. This is specifically used to combat performance issues in intensive components like `DataTable`. This is done through a `useCss` hook exported from system:
|
|
91
91
|
|
|
92
92
|
```jsx
|
|
93
|
-
import { designSystem } from '@
|
|
93
|
+
import { designSystem } from '@planningcenter/tapestry-react'
|
|
94
94
|
function Box({ color, ...props }) {
|
|
95
95
|
const css = designSystem.useCss()
|
|
96
96
|
return <div className={css({ color })} {...props} />
|
|
@@ -26,7 +26,7 @@ export default function ({
|
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
28
|
...restProps,
|
|
29
|
-
className: className ? `
|
|
29
|
+
className: className ? `tapestry-react-reset ${className}` : `tapestry-react-reset`,
|
|
30
30
|
css: (theme) => {
|
|
31
31
|
const propStyles = {}
|
|
32
32
|
for (const prop in styleProps) {
|