@planningcenter/tapestry-react 0.0.1-alpha.0 → 1.2.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.
Files changed (65) hide show
  1. package/dist/cjs/ActionsDropdown/ActionsDropdown.js +9 -8
  2. package/dist/cjs/Button/Button.js +4 -4
  3. package/dist/cjs/Checkbox/Checkbox.js +2 -2
  4. package/dist/cjs/DataTable/DataTable.js +3 -3
  5. package/dist/cjs/DataTable/components/BodyRows.js +2 -2
  6. package/dist/cjs/DataTable/components/BodySubRows.js +2 -2
  7. package/dist/cjs/DataTable/components/CheckboxCell.js +10 -10
  8. package/dist/cjs/DataTable/components/Icon.js +1 -1
  9. package/dist/cjs/NumberField/NumberField.js +19 -10
  10. package/dist/cjs/Page/PageActions.js +5 -0
  11. package/dist/cjs/Page/PageHeader.js +17 -21
  12. package/dist/cjs/Page/PageTab.js +11 -2
  13. package/dist/cjs/Page/PageTabList.js +5 -10
  14. package/dist/cjs/Page/PageTitle.js +3 -2
  15. package/dist/cjs/Page/PageToolbar.js +30 -6
  16. package/dist/cjs/Radio/Radio.js +1 -1
  17. package/dist/cjs/ThemeProvider/ThemeProvider.js +2 -2
  18. package/dist/cjs/ThemeProvider/styles.js +4 -4
  19. package/dist/cjs/server.js +1 -1
  20. package/dist/cjs/system/split-styles.js +1 -1
  21. package/dist/esm/ActionsDropdown/ActionsDropdown.js +9 -8
  22. package/dist/esm/Button/Button.js +4 -4
  23. package/dist/esm/Checkbox/Checkbox.js +2 -2
  24. package/dist/esm/DataTable/DataTable.js +3 -3
  25. package/dist/esm/DataTable/components/BodyRows.js +2 -2
  26. package/dist/esm/DataTable/components/BodySubRows.js +2 -2
  27. package/dist/esm/DataTable/components/CheckboxCell.js +10 -10
  28. package/dist/esm/DataTable/components/Icon.js +1 -1
  29. package/dist/esm/NumberField/NumberField.js +19 -10
  30. package/dist/esm/Page/PageActions.js +5 -0
  31. package/dist/esm/Page/PageHeader.js +17 -18
  32. package/dist/esm/Page/PageTab.js +10 -2
  33. package/dist/esm/Page/PageTabList.js +5 -8
  34. package/dist/esm/Page/PageTitle.js +3 -2
  35. package/dist/esm/Page/PageToolbar.js +28 -6
  36. package/dist/esm/Radio/Radio.js +1 -1
  37. package/dist/esm/ThemeProvider/ThemeProvider.js +2 -2
  38. package/dist/esm/ThemeProvider/styles.js +4 -4
  39. package/dist/esm/server.js +1 -1
  40. package/dist/esm/system/split-styles.js +1 -1
  41. package/package.json +1 -1
  42. package/src/ActionsDropdown/ActionsDropdown.tsx +8 -7
  43. package/src/Button/Button.tsx +4 -4
  44. package/src/Checkbox/Checkbox.js +2 -2
  45. package/src/Combobox/Combobox.mdx +1 -1
  46. package/src/DataTable/DataTable.js +3 -3
  47. package/src/DataTable/components/BodyRows.js +2 -2
  48. package/src/DataTable/components/BodySubRows.js +2 -2
  49. package/src/DataTable/components/CheckboxCell.js +10 -10
  50. package/src/DataTable/components/Icon.js +1 -1
  51. package/src/Input/InputLabel.js +1 -1
  52. package/src/NumberField/NumberField.js +19 -9
  53. package/src/Page/Page.mdx +56 -1
  54. package/src/Page/PageActions.js +12 -1
  55. package/src/Page/PageHeader.js +19 -25
  56. package/src/Page/PageTab.js +15 -1
  57. package/src/Page/PageTabList.js +10 -8
  58. package/src/Page/PageTitle.js +9 -1
  59. package/src/Page/PageToolbar.js +29 -6
  60. package/src/Radio/Radio.js +1 -1
  61. package/src/ThemeProvider/ThemeProvider.tsx +2 -2
  62. package/src/ThemeProvider/styles.ts +6 -6
  63. package/src/server.js +1 -1
  64. package/src/system/README.md +2 -2
  65. package/src/system/split-styles.js +1 -1
@@ -182,7 +182,7 @@ var DataTable = function DataTable(props) {
182
182
  style: isLoadingOrEmpty ? {
183
183
  display: 'none'
184
184
  } : undefined,
185
- className: "uikit-reset " + css({
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: "uikit-reset " + css([].concat(cellVariantClassName, [column.css]))
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: "uikit-reset " + css([].concat(cellVariantClassName, [column.css]))
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: "uikit-reset " + css([].concat(cellVariantStyles, [column.css]))
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: "uikit-reset " + css(rowVariantClassName)
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: "uikit-reset " + css(rowVariantClassName)
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: "uikit-reset " + css([].concat(cellVariantClassName, [column.css]))
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
- ' .ui-kit-Checkbox-Fill ': {
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
- ' .ui-kit-Checkbox-Minus, .ui-kit-Checkbox-Checked ': {
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
- ' .ui-kit-Checkbox-Fill ': {
31
+ ' .tapestry-react-Checkbox-Fill ': {
32
32
  transform: 'scale(1.125)'
33
33
  }
34
34
  },
35
35
  ' &:active ': {
36
- ' .ui-kit-Checkbox-Fill ': {
36
+ ' .tapestry-react-Checkbox-Fill ': {
37
37
  transform: 'scale(1)'
38
38
  }
39
39
  }
40
40
  };
41
41
  var checkedStyles = {
42
- ' .ui-kit-Checkbox-Checked ': scaleStyles
42
+ ' .tapestry-react-Checkbox-Checked ': scaleStyles
43
43
  };
44
44
  var indeterminateStyles = {
45
- ' .ui-kit-Checkbox-Minus ': scaleStyles
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: "uikit-reset ui-kit-Checkbox",
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: "uikit-reset ui-kit-Checkbox-Fill",
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: "uikit-reset ui-kit-Checkbox-Minus"
97
+ className: "tapestry-react-reset tapestry-react-Checkbox-Minus"
98
98
  }), /*#__PURE__*/React.createElement(Icon.Path, {
99
99
  name: iconPaths.checked,
100
- className: "uikit-reset ui-kit-Checkbox-Checked"
100
+ className: "tapestry-react-reset tapestry-react-Checkbox-Checked"
101
101
  }));
102
102
  }
103
103
 
@@ -36,7 +36,7 @@ function Icon(_ref) {
36
36
  width: iconSize,
37
37
  height: iconSize,
38
38
  fill: themeColor,
39
- className: "uikit-reset",
39
+ className: "tapestry-react-reset",
40
40
  children: childrenToRender
41
41
  }, props));
42
42
  }
@@ -134,12 +134,25 @@ var NumberField = /*#__PURE__*/function (_Component) {
134
134
  maxValue = _this$getParsedValues5.maxValue;
135
135
 
136
136
  if (_this.props.pad) {
137
- var targetValue = event.target.value === '' ? event.target.value : parseFloat(event.target.value);
137
+ var deleteKeyPressed = event.target.value === '';
138
+ var targetValue = deleteKeyPressed ? event.target.value : parseFloat(event.target.value);
138
139
 
139
- if (targetValue !== '') {
140
- var nextValue = _this.clampValue(targetValue);
140
+ if (deleteKeyPressed) {
141
+ var nextValue = ("" + _this.props.value).slice(0, -1);
141
142
 
142
- if (_this.props.moveFocusOnMax && nextValue / maxValue > 0.1) {
143
+ _this.props.onChange(padNumber(nextValue, _this.props.pad));
144
+ } else {
145
+ var _nextValue = _this.clampValue(targetValue);
146
+
147
+ var paddedValue = parseFloat("" + _this.props.value + targetValue);
148
+
149
+ if (!_this.firstTouch && !isNaN(targetValue) && _this.isValueValid(paddedValue)) {
150
+ _nextValue = paddedValue;
151
+ }
152
+
153
+ _this.firstTouch = false;
154
+
155
+ if (_this.props.moveFocusOnMax && _nextValue / maxValue > 0.1) {
143
156
  var _getTabbableSiblings = getTabbableSiblings(event.target),
144
157
  next = _getTabbableSiblings.next;
145
158
 
@@ -150,11 +163,7 @@ var NumberField = /*#__PURE__*/function (_Component) {
150
163
  }
151
164
  }
152
165
 
153
- _this.firstTouch = false;
154
-
155
- _this.changeIfValid(nextValue);
156
- } else {
157
- _this.props.onChange('');
166
+ _this.changeIfValid(_nextValue);
158
167
  }
159
168
  } else {
160
169
  _this.props.onChange(event.target.value);
@@ -219,7 +228,7 @@ var NumberField = /*#__PURE__*/function (_Component) {
219
228
  textOverflow: undefined,
220
229
  autoComplete: 'off',
221
230
  value: numberValue,
222
- highlightOnInteraction: highlightOnInteraction,
231
+ highlightOnInteraction: highlightOnInteraction || pad,
223
232
  onBlur: this.handleBlur,
224
233
  onInput: this.handleInput,
225
234
  onKeyDown: this.handleKeyDown
@@ -4,7 +4,12 @@ import StackView from '../StackView';
4
4
 
5
5
  function PageActions(props) {
6
6
  return /*#__PURE__*/React.createElement(StackView, _extends({
7
+ alignment: "center",
8
+ alignSelf: "end",
7
9
  axis: "horizontal",
10
+ distribution: "end",
11
+ flex: "1",
12
+ paddingBottom: 2,
8
13
  spacing: 1
9
14
  }, props));
10
15
  }
@@ -1,9 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- import React, { Children } from 'react';
3
+ import React from 'react';
4
4
  import { useThemeValue } from '../system';
5
5
  import StackView from '../StackView';
6
- import { PAGE_TABLIST_DISPLAY_NAME } from './PageTabList';
7
6
 
8
7
  function PageHeader(_ref) {
9
8
  var children = _ref.children,
@@ -11,24 +10,24 @@ function PageHeader(_ref) {
11
10
  restProps = _objectWithoutPropertiesLoose(_ref, ["children", "toolbar"]);
12
11
 
13
12
  var themeProps = useThemeValue('pageHeader');
14
- var tabsPresent = toolbar ? Children.toArray(toolbar.props.children).some(function (child) {
15
- return child && child.type.displayName === PAGE_TABLIST_DISPLAY_NAME;
16
- }) : false;
17
- var childrenToRender = toolbar ? children ? Children.toArray([/*#__PURE__*/React.createElement(StackView, {
18
- axis: "horizontal",
19
- alignment: "center",
20
- width: "100%"
21
- }, children), toolbar]) : toolbar : children;
22
13
  return /*#__PURE__*/React.createElement(StackView, _extends({
23
14
  as: "header",
24
- axis: children && toolbar ? 'vertical' : 'horizontal',
25
- alignment: children && toolbar ? 'start' : 'center',
26
- paddingHorizontal: 3,
27
- paddingTop: 1.5,
28
- paddingBottom: tabsPresent ? null : 1.5,
29
- spacing: 1.5,
30
- backgroundColor: "primary-light"
31
- }, themeProps, restProps), childrenToRender);
15
+ axis: "vertical",
16
+ backgroundColor: "primary-light",
17
+ paddingHorizontal: 2,
18
+ minHeight: 8,
19
+ mediaQueries: {
20
+ sm: {
21
+ paddingHorizontal: 3
22
+ }
23
+ },
24
+ spacing: 0
25
+ }, themeProps, restProps), children && /*#__PURE__*/React.createElement(StackView, {
26
+ alignment: "center",
27
+ axis: "horizontal",
28
+ paddingTop: 2,
29
+ width: "100%"
30
+ }, children), toolbar);
32
31
  }
33
32
 
34
33
  export default PageHeader;
@@ -1,11 +1,19 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import React from 'react';
3
3
  import Tab from '../Tab';
4
+ import { useThemeValue } from '../system';
4
5
 
5
6
  function PageTab(props) {
6
- return /*#__PURE__*/React.createElement(Tab, _extends({}, props, {
7
+ var themeProps = useThemeValue('pageTab');
8
+ return /*#__PURE__*/React.createElement(Tab, _extends({
9
+ mediaQueries: {
10
+ sm: {
11
+ paddingHorizontal: 3
12
+ }
13
+ },
14
+ paddingHorizontal: 1.5,
7
15
  size: "lg"
8
- }));
16
+ }, themeProps, props));
9
17
  }
10
18
 
11
19
  export default PageTab;
@@ -1,14 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import React from 'react';
3
3
  import StackView from '../StackView';
4
- export var PAGE_TABLIST_DISPLAY_NAME = 'PageTabList';
5
-
6
- function PageTabList(props) {
4
+ export default function PageTabList(props) {
7
5
  return /*#__PURE__*/React.createElement(StackView, _extends({
8
6
  axis: "horizontal",
9
- spacing: 0.5
7
+ paddingTop: 2,
8
+ spacing: 0.5,
9
+ alignSelf: "end"
10
10
  }, props));
11
- }
12
-
13
- PageTabList.displayName = PAGE_TABLIST_DISPLAY_NAME;
14
- export default PageTabList;
11
+ }
@@ -6,8 +6,9 @@ import Heading from '../Heading';
6
6
  function PageTitle(props) {
7
7
  var themeProps = useThemeValue('pageTitle');
8
8
  return /*#__PURE__*/React.createElement(Heading, _extends({
9
- level: 2,
10
- color: "white"
9
+ color: "white",
10
+ fontSize: "25px",
11
+ level: 2
11
12
  }, themeProps, props));
12
13
  }
13
14
 
@@ -1,14 +1,36 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
1
3
  import React from 'react';
2
4
  import StackView from '../StackView';
5
+ import { useThemeValue } from '../system';
3
6
 
4
7
  function PageToolbar(_ref) {
5
- var children = _ref.children;
6
- return /*#__PURE__*/React.createElement(StackView, {
7
- grow: 1,
8
+ var _mediaQueries;
9
+
10
+ var stackBelow = _ref.stackBelow,
11
+ restProps = _objectWithoutPropertiesLoose(_ref, ["stackBelow"]);
12
+
13
+ var themeBreakpoints = useThemeValue('breakpoints');
14
+ var breakpoint = Object.keys(themeBreakpoints).includes(stackBelow) ? stackBelow : 'sm';
15
+ var stackProps = stackBelow ? {
16
+ axis: 'vertical',
17
+ alignment: 'stretch',
18
+ spacing: 2,
19
+ mediaQueries: (_mediaQueries = {}, _mediaQueries[breakpoint] = {
20
+ axis: 'horizontal',
21
+ alignment: 'center',
22
+ paddingBottom: 0,
23
+ spacing: 0
24
+ }, _mediaQueries)
25
+ } : null;
26
+ return /*#__PURE__*/React.createElement(StackView, _extends({
27
+ alignment: "center",
8
28
  axis: "horizontal",
9
- alignment: "start",
10
- distribution: "space-between"
11
- }, children);
29
+ distribution: "space-between",
30
+ flex: 1,
31
+ spacing: 2,
32
+ width: "100%"
33
+ }, stackProps, restProps));
12
34
  }
13
35
 
14
36
  export default PageToolbar;
@@ -91,7 +91,7 @@ function Radio(_ref) {
91
91
  zIndex: 0,
92
92
  opacity: 0
93
93
  }), /*#__PURE__*/React.createElement(Icon, {
94
- className: "ui-kit-Radio-Icon",
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 = 'ui-kit-theme';
16
+ var STORAGE_KEY = 'tapestry-react-theme';
17
17
  export var cache = createCache({
18
- key: 'uikit',
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('uikit-style');
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.uikit-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.uikit-reset::-moz-focus-inner {\n padding: 0px;\n border: 0px;\n}\n\n.uikit-reset:focus:not(.focus-visible) {\n outline: 0px;\n}\n" // minify string
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('uikit-style')) {
24
+ if (typeof window !== 'undefined' && !document.getElementById('tapestry-react-style')) {
25
25
  var styleElement = document.createElement('style');
26
- styleElement.id = 'uikit-style';
26
+ styleElement.id = 'tapestry-react-style';
27
27
  styleElement.innerHTML = styleReset;
28
28
  document.head.insertAdjacentElement('afterbegin', styleElement);
29
29
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import ThemeProvider from './ThemeProvider';
3
3
  export var styleElement = /*#__PURE__*/React.createElement("style", {
4
- id: "uikit-style",
4
+ id: "tapestry-react-style",
5
5
  dangerouslySetInnerHTML: {
6
6
  __html: ThemeProvider.styleReset
7
7
  }
@@ -37,7 +37,7 @@ export default function (_ref) {
37
37
  }
38
38
 
39
39
  return _objectSpread(_objectSpread({}, restProps), {}, {
40
- className: className ? "uikit-reset " + className : "uikit-reset",
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": "0.0.1-alpha.0",
3
+ "version": "1.2.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",
@@ -60,10 +60,10 @@ export function ActionsDropdown({
60
60
  defaultButtonProps = defaultTheme.button.themes.primary.fill,
61
61
  duplicates,
62
62
  duplicatesButtonProps = {
63
- color: 'white',
64
- backgroundColor: 'hsl(25deg 79% 57%)',
65
- hover: { backgroundColor: 'hsl(25deg 80% 54%)' },
66
- active: { backgroundColor: 'hsl(25deg 82% 51%)' },
63
+ backgroundColor: 'hsl(42deg 87% 94%)',
64
+ color: 'hsl(0deg 0% 24%)',
65
+ hover: { backgroundColor: 'hsl(42deg 87% 90%)' },
66
+ active: { backgroundColor: 'hsl(42deg 87% 87%)' },
67
67
  },
68
68
  inactive,
69
69
  inactiveButtonProps = {
@@ -82,8 +82,9 @@ export function ActionsDropdown({
82
82
  iconLeft={
83
83
  hasDuplicates || hasInactiveDate
84
84
  ? {
85
+ color: hasDuplicates ? '#E6A714' : 'white',
85
86
  name: hasDuplicates ? 'exclamation-triangle-filled' : 'inactive',
86
- size: 'lg',
87
+ size: 'md',
87
88
  }
88
89
  : undefined
89
90
  }
@@ -104,9 +105,9 @@ export function ActionsDropdown({
104
105
  <>
105
106
  <StackView axis="horizontal" padding={2} spacing={1}>
106
107
  <Icon
107
- name="exclamation-triangle-filled"
108
- color="#e8833a"
108
+ color="#E6A714"
109
109
  marginTop="3px"
110
+ name="exclamation-triangle-filled"
110
111
  />
111
112
  <Text size={4}>
112
113
  There {duplicates.amount > 1 ? 'are' : 'is'} {duplicates.amount}{' '}
@@ -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/ui-kit/button#tooltip"
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/ui-kit/button#title"
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
- `UIKit: <Button/> icon only buttons must define either a "tooltip" or "title" prop for proper accessibility.`
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
- `UIKit: <Button/> does not support type="submit" please add an explicit onClick handler.`
303
+ `Tapestry-React: <Button/> does not support type="submit" please add an explicit onClick handler.`
304
304
  )
305
305
  }
306
306
  }
@@ -105,14 +105,14 @@ function Checkbox({
105
105
  Checkbox must define a{' '}
106
106
  <Link
107
107
  external
108
- to="https://ministrycentered.github.io/ui-kit/checkbox#label"
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
- `UIKit: <Checkbox/> must define a "label" prop or have a parent that renders a label for proper accessibility.`
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/ui-kit/blob/master/packages/ui-kit/src/Combobox/ComboboxInput.js) and [Popover](/popover).
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={`uikit-reset ${css({ position: 'relative' })}`}
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={`uikit-reset ${css([
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={`uikit-reset ${css([
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={`uikit-reset ${css([...cellVariantStyles, column.css])}`}
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: `uikit-reset ${css(rowVariantClassName)}`,
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={`uikit-reset ${css(rowVariantClassName)}`}
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={`uikit-reset ${css([
80
+ className={`tapestry-react-reset ${css([
81
81
  ...cellVariantClassName,
82
82
  column.css,
83
83
  ])}`}