@jobber/components 7.14.1 → 7.14.3
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/Button/Button.d.ts +2 -1
- package/dist/Button-cjs.js +2 -1
- package/dist/Button-es.js +2 -1
- package/dist/DatePicker-cjs.js +2 -2
- package/dist/DatePicker-es.js +2 -2
- package/dist/docs/Button/Button.md +5 -2
- package/dist/styles.css +7 -2
- package/package.json +2 -2
package/dist/Button/Button.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ import React from "react";
|
|
|
2
2
|
import type { ButtonProps } from "./Button.types";
|
|
3
3
|
import { ButtonIcon, ButtonLabel } from "./ButtonInternals";
|
|
4
4
|
type ButtonElement = HTMLAnchorElement | HTMLButtonElement;
|
|
5
|
-
type ButtonRuntimeProps = ButtonProps & React.HTMLAttributes<ButtonElement> & {
|
|
5
|
+
type ButtonRuntimeProps = ButtonProps & Pick<React.HTMLAttributes<ButtonElement>, "aria-controls" | "aria-haspopup" | "aria-expanded" | "aria-label" | "onKeyDown" | "onKeyUp" | "onFocus" | "onBlur" | "onPointerDown" | "onPointerUp" | "onPointerEnter" | "onPointerLeave" | "onMouseEnter" | "onMouseLeave" | "onTouchStart" | "onTouchEnd" | "onContextMenu" | "tabIndex" | "title"> & {
|
|
6
6
|
readonly className?: string;
|
|
7
7
|
readonly ref?: React.Ref<ButtonElement>;
|
|
8
8
|
readonly style?: React.CSSProperties;
|
|
9
|
+
readonly [key: `data-${string}`]: unknown;
|
|
9
10
|
};
|
|
10
11
|
declare function Button(props: ButtonRuntimeProps): React.JSX.Element;
|
|
11
12
|
declare namespace Button {
|
package/dist/Button-cjs.js
CHANGED
|
@@ -80,7 +80,8 @@ function ButtonWrapper(props) {
|
|
|
80
80
|
const { combined } = useButtonStyles(props);
|
|
81
81
|
const isLinkButton = Boolean(url || to);
|
|
82
82
|
const buttonClassNames = classnames(combined, UNSAFE_className.container, className);
|
|
83
|
-
const
|
|
83
|
+
const dataAttributes = Object.fromEntries(Object.entries(rest).filter(([key]) => key.startsWith("data-")));
|
|
84
|
+
const sharedTagProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, dataAttributes), { className: buttonClassNames, id, style: Object.assign(Object.assign({}, style), UNSAFE_style.container) }), (!disabled && {
|
|
84
85
|
onClick: (event) => {
|
|
85
86
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
86
87
|
},
|
package/dist/Button-es.js
CHANGED
|
@@ -78,7 +78,8 @@ function ButtonWrapper(props) {
|
|
|
78
78
|
const { combined } = useButtonStyles(props);
|
|
79
79
|
const isLinkButton = Boolean(url || to);
|
|
80
80
|
const buttonClassNames = classnames(combined, UNSAFE_className.container, className);
|
|
81
|
-
const
|
|
81
|
+
const dataAttributes = Object.fromEntries(Object.entries(rest).filter(([key]) => key.startsWith("data-")));
|
|
82
|
+
const sharedTagProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, dataAttributes), { className: buttonClassNames, id, style: Object.assign(Object.assign({}, style), UNSAFE_style.container) }), (!disabled && {
|
|
82
83
|
onClick: (event) => {
|
|
83
84
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
84
85
|
},
|
package/dist/DatePicker-cjs.js
CHANGED
|
@@ -12758,7 +12758,7 @@ function DatePicker({ onChange, onMonthChange, onOpenChange, activator, inline,
|
|
|
12758
12758
|
const { pickerRef } = useEscapeKeyToCloseDatePicker(open, ref, focusOnSelectedDate, renderInsidePortal);
|
|
12759
12759
|
const { handleChange, handleCalendarOpen, handleCalendarClose } = useDatePickerHandlers(onChange, setOpen, onOpenChange, smartAutofocus !== null && smartAutofocus !== void 0 ? smartAutofocus : true, focusOnSelectedDate);
|
|
12760
12760
|
jobberHooks.useRefocusOnActivator(smartAutofocus ? open : false);
|
|
12761
|
-
return (React.createElement("div", { className: wrapperClassName, ref: ref,
|
|
12761
|
+
return (React.createElement("div", { className: wrapperClassName, ref: ref, onKeyDown: event => {
|
|
12762
12762
|
// Stop Escape from bubbling to parent floating elements (e.g. Modal).
|
|
12763
12763
|
if (event.key === "Escape" && open) {
|
|
12764
12764
|
event.stopPropagation();
|
|
@@ -12809,7 +12809,7 @@ function useEscapeKeyToCloseDatePicker(open, ref, focusOnSelectedDate, isPortall
|
|
|
12809
12809
|
function DatePickerPortal({ portalId }) {
|
|
12810
12810
|
const nodeId = floatingUi_react.useFloatingNodeId();
|
|
12811
12811
|
const parentNodeId = floatingUi_react.useFloatingParentNodeId();
|
|
12812
|
-
const portalDiv = React.createElement("div", { id: portalId, className: styles.portalContainer });
|
|
12812
|
+
const portalDiv = (React.createElement("div", { id: portalId, className: styles.portalContainer, "data-elevation": "elevated" }));
|
|
12813
12813
|
if (parentNodeId) {
|
|
12814
12814
|
return (React.createElement(floatingUi_react.FloatingTree, null,
|
|
12815
12815
|
React.createElement(floatingUi_react.FloatingNode, { id: nodeId },
|
package/dist/DatePicker-es.js
CHANGED
|
@@ -12756,7 +12756,7 @@ function DatePicker({ onChange, onMonthChange, onOpenChange, activator, inline,
|
|
|
12756
12756
|
const { pickerRef } = useEscapeKeyToCloseDatePicker(open, ref, focusOnSelectedDate, renderInsidePortal);
|
|
12757
12757
|
const { handleChange, handleCalendarOpen, handleCalendarClose } = useDatePickerHandlers(onChange, setOpen, onOpenChange, smartAutofocus !== null && smartAutofocus !== void 0 ? smartAutofocus : true, focusOnSelectedDate);
|
|
12758
12758
|
useRefocusOnActivator(smartAutofocus ? open : false);
|
|
12759
|
-
return (React__default.createElement("div", { className: wrapperClassName, ref: ref,
|
|
12759
|
+
return (React__default.createElement("div", { className: wrapperClassName, ref: ref, onKeyDown: event => {
|
|
12760
12760
|
// Stop Escape from bubbling to parent floating elements (e.g. Modal).
|
|
12761
12761
|
if (event.key === "Escape" && open) {
|
|
12762
12762
|
event.stopPropagation();
|
|
@@ -12807,7 +12807,7 @@ function useEscapeKeyToCloseDatePicker(open, ref, focusOnSelectedDate, isPortall
|
|
|
12807
12807
|
function DatePickerPortal({ portalId }) {
|
|
12808
12808
|
const nodeId = useFloatingNodeId();
|
|
12809
12809
|
const parentNodeId = useFloatingParentNodeId();
|
|
12810
|
-
const portalDiv = React__default.createElement("div", { id: portalId, className: styles.portalContainer });
|
|
12810
|
+
const portalDiv = (React__default.createElement("div", { id: portalId, className: styles.portalContainer, "data-elevation": "elevated" }));
|
|
12811
12811
|
if (parentNodeId) {
|
|
12812
12812
|
return (React__default.createElement(FloatingTree, null,
|
|
12813
12813
|
React__default.createElement(FloatingNode, { id: nodeId },
|
|
@@ -908,6 +908,7 @@ export const styles = StyleSheet.create({
|
|
|
908
908
|
| `ariaExpanded` | `boolean` | No | — | |
|
|
909
909
|
| `ariaHaspopup` | `boolean` | No | — | |
|
|
910
910
|
| `ariaLabel` | `string` | No | — | |
|
|
911
|
+
| `className` | `string` | No | — | |
|
|
911
912
|
| `disabled` | `boolean` | No | — | |
|
|
912
913
|
| `external` | `boolean` | No | — | |
|
|
913
914
|
| `fullWidth` | `boolean` | No | — | |
|
|
@@ -917,10 +918,12 @@ export const styles = StyleSheet.create({
|
|
|
917
918
|
| `label` | `string` | No | — | |
|
|
918
919
|
| `loading` | `boolean` | No | — | |
|
|
919
920
|
| `name` | `string` | No | — | |
|
|
920
|
-
| `onClick` | `(
|
|
921
|
-
| `onMouseDown` | `(
|
|
921
|
+
| `onClick` | `(event: MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void` | No | — | |
|
|
922
|
+
| `onMouseDown` | `(event: MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void` | No | — | |
|
|
922
923
|
| `ref` | `Ref<ButtonElement>` | No | — | |
|
|
924
|
+
| `role` | `string` | No | — | Used to override the default button role. |
|
|
923
925
|
| `size` | `ButtonSize` | No | — | |
|
|
926
|
+
| `style` | `CSSProperties` | No | — | |
|
|
924
927
|
| `submit` | `boolean` | No | — | Allows the button to submit a form |
|
|
925
928
|
| `to` | `LocationDescriptor<unknown> | ((location: Location<unknown>) => LocationDescriptor<unknown>)` | No | — | **Deprecated**: to will be removed in the next major version @deprecated |
|
|
926
929
|
| `type` | `ButtonType` | No | — | |
|
package/dist/styles.css
CHANGED
|
@@ -8788,8 +8788,7 @@ h2.react-datepicker__current-month {
|
|
|
8788
8788
|
.Ma55F5Y-XhE- .react-datepicker__header {
|
|
8789
8789
|
padding: 0;
|
|
8790
8790
|
border-bottom: none;
|
|
8791
|
-
background:
|
|
8792
|
-
background: var(--color-surface);
|
|
8791
|
+
background-color: transparent;
|
|
8793
8792
|
}
|
|
8794
8793
|
|
|
8795
8794
|
.Epg-Ub8Dn9A- {
|
|
@@ -8835,6 +8834,12 @@ h2.react-datepicker__current-month {
|
|
|
8835
8834
|
background: var(--color-interactive--background);
|
|
8836
8835
|
}
|
|
8837
8836
|
|
|
8837
|
+
.Ma55F5Y-XhE- .react-datepicker__day--outside-month:last-child,
|
|
8838
|
+
.Ma55F5Y-XhE- .react-datepicker__day--outside-month:last-child:hover {
|
|
8839
|
+
border-radius: 0 0 calc(4px + (4px / 2)) 0;
|
|
8840
|
+
border-radius: 0 0 calc(var(--radius-small) + (var(--radius-small) / 2)) 0;
|
|
8841
|
+
}
|
|
8842
|
+
|
|
8838
8843
|
.Ma55F5Y-XhE- .react-datepicker__day--disabled {
|
|
8839
8844
|
color: hsl(0, 0%, 58%);
|
|
8840
8845
|
color: var(--color-disabled);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "7.14.
|
|
3
|
+
"version": "7.14.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -583,5 +583,5 @@
|
|
|
583
583
|
"> 1%",
|
|
584
584
|
"IE 10"
|
|
585
585
|
],
|
|
586
|
-
"gitHead": "
|
|
586
|
+
"gitHead": "f1b2b9d6af409fb6ba45e91396ca75d2ac223eac"
|
|
587
587
|
}
|