@planningcenter/tapestry-react 2.9.0-rc.3 → 2.9.0-rc.4

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.
@@ -198,9 +198,9 @@ function Button(_ref) {
198
198
  buttonProps.hover = undefined;
199
199
  buttonProps.active = undefined;
200
200
  } else {
201
- buttonProps.focus = {
201
+ buttonProps.focus = _objectSpread(_objectSpread({}, buttonProps.focus), {}, {
202
202
  zIndex: 5
203
- };
203
+ });
204
204
  buttonProps.cursor = 'pointer';
205
205
  buttonProps.touchAction = 'manipulation';
206
206
  buttonProps.onClick = onClick;
@@ -250,7 +250,7 @@ function Button(_ref) {
250
250
  if (restProps.as) {
251
251
  buttonProps.to = to; // remove type if it is not a button
252
252
 
253
- if (restProps.as !== "button") {
253
+ if (restProps.as !== 'button') {
254
254
  buttonProps = _objectSpread(_objectSpread({}, buttonProps), {}, {
255
255
  type: null
256
256
  });
@@ -275,7 +275,7 @@ function Button(_ref) {
275
275
  restProps = (0, _utils.mergeProps)(restProps, wrapperProps);
276
276
  }
277
277
 
278
- if (buttonProps.type && restProps.as && restProps.as !== "button") {
278
+ if (buttonProps.type && restProps.as && restProps.as !== 'button') {
279
279
  console.log("Tapestry-React: <Button/> type prop is only supported by <button> and not <" + restProps.as + ">.");
280
280
  }
281
281
  }
@@ -191,9 +191,9 @@ export function Button(_ref) {
191
191
  buttonProps.hover = undefined;
192
192
  buttonProps.active = undefined;
193
193
  } else {
194
- buttonProps.focus = {
194
+ buttonProps.focus = _objectSpread(_objectSpread({}, buttonProps.focus), {}, {
195
195
  zIndex: 5
196
- };
196
+ });
197
197
  buttonProps.cursor = 'pointer';
198
198
  buttonProps.touchAction = 'manipulation';
199
199
  buttonProps.onClick = onClick;
@@ -243,7 +243,7 @@ export function Button(_ref) {
243
243
  if (restProps.as) {
244
244
  buttonProps.to = to; // remove type if it is not a button
245
245
 
246
- if (restProps.as !== "button") {
246
+ if (restProps.as !== 'button') {
247
247
  buttonProps = _objectSpread(_objectSpread({}, buttonProps), {}, {
248
248
  type: null
249
249
  });
@@ -260,7 +260,7 @@ export function Button(_ref) {
260
260
  restProps = mergeProps(restProps, wrapperProps);
261
261
  }
262
262
 
263
- if (buttonProps.type && restProps.as && restProps.as !== "button") {
263
+ if (buttonProps.type && restProps.as && restProps.as !== 'button') {
264
264
  console.log("Tapestry-React: <Button/> type prop is only supported by <button> and not <" + restProps.as + ">.");
265
265
  }
266
266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry-react",
3
- "version": "2.9.0-rc.3",
3
+ "version": "2.9.0-rc.4",
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",
@@ -258,7 +258,7 @@ export function Button({
258
258
  buttonProps.opacity = 0.65
259
259
  buttonProps['aria-disabled'] = true
260
260
  buttonProps.cursor = 'not-allowed'
261
- buttonProps.onClick = (event) => event.preventDefault()
261
+ buttonProps.onClick = (event) => event.preventDefault()
262
262
  buttonProps.onKeyDown = (event) => {
263
263
  if (event.key === 'Enter' || event.key === ' ') {
264
264
  event.preventDefault()
@@ -271,7 +271,7 @@ export function Button({
271
271
  buttonProps.hover = undefined
272
272
  buttonProps.active = undefined
273
273
  } else {
274
- buttonProps.focus = { zIndex: 5 }
274
+ buttonProps.focus = { ...buttonProps.focus, zIndex: 5 }
275
275
  buttonProps.cursor = 'pointer'
276
276
  buttonProps.touchAction = 'manipulation'
277
277
  buttonProps.onClick = onClick
@@ -323,7 +323,7 @@ export function Button({
323
323
  buttonProps.to = to
324
324
 
325
325
  // remove type if it is not a button
326
- if ((restProps as any).as !== "button") {
326
+ if ((restProps as any).as !== 'button') {
327
327
  buttonProps = {
328
328
  ...buttonProps,
329
329
  type: null,
@@ -362,10 +362,12 @@ export function Button({
362
362
  if (
363
363
  buttonProps.type &&
364
364
  (restProps as any).as &&
365
- (restProps as any).as !== "button"
365
+ (restProps as any).as !== 'button'
366
366
  ) {
367
367
  console.log(
368
- `Tapestry-React: <Button/> type prop is only supported by <button> and not <${(restProps as any).as}>.`
368
+ `Tapestry-React: <Button/> type prop is only supported by <button> and not <${
369
+ (restProps as any).as
370
+ }>.`
369
371
  )
370
372
  }
371
373
  }