@jobber/components 6.103.2-JOB-135467-8ed574a.0 → 6.103.2-JOB-141426-1b49367.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/Autocomplete/index.cjs +11 -2
- package/dist/Autocomplete/index.mjs +11 -2
- package/dist/Autocomplete/useAutocomplete.d.ts +1 -0
- package/dist/Button/Button.d.ts +6 -757
- package/dist/Button-cjs.js +9 -15
- package/dist/Button-es.js +10 -16
- package/package.json +2 -2
|
@@ -225,6 +225,7 @@ function useAutocompleteListNav({ navigableCount, shouldResetActiveIndexOnClose,
|
|
|
225
225
|
// eslint-disable-next-line max-statements
|
|
226
226
|
function useAutocomplete(props) {
|
|
227
227
|
const { menu, emptyActions, getOptionLabel: getOptionLabelProp, isOptionEqualToValue, inputValue, onInputChange, value, onChange, multiple, openOnFocus = true, readOnly = false, debounce: debounceMs = 300, } = props;
|
|
228
|
+
const isClickingWithinRef = React.useRef(false);
|
|
228
229
|
// TODO: Clean up the types in these refs by enhancing the type system in useCallbackRef
|
|
229
230
|
const getOptionLabelPropRef = jobberHooks.useCallbackRef((opt) => getOptionLabelProp === null || getOptionLabelProp === void 0 ? void 0 : getOptionLabelProp(opt));
|
|
230
231
|
const getOptionLabel = React.useCallback((opt) => {
|
|
@@ -520,6 +521,9 @@ function useAutocomplete(props) {
|
|
|
520
521
|
const onInputBlur = React.useCallback(() => {
|
|
521
522
|
var _a, _b;
|
|
522
523
|
setInputFocused(false);
|
|
524
|
+
if (isClickingWithinRef.current) {
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
523
527
|
if (readOnly) {
|
|
524
528
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
525
529
|
return;
|
|
@@ -666,6 +670,7 @@ function useAutocomplete(props) {
|
|
|
666
670
|
activeIndex,
|
|
667
671
|
setActiveIndex,
|
|
668
672
|
listRef,
|
|
673
|
+
isClickingWithinRef,
|
|
669
674
|
// actions
|
|
670
675
|
onSelection,
|
|
671
676
|
onAction,
|
|
@@ -904,7 +909,7 @@ const AutocompleteRebuilt = React.forwardRef(AutocompleteRebuiltInternal);
|
|
|
904
909
|
function AutocompleteRebuiltInternal(props, forwardedRef) {
|
|
905
910
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
906
911
|
const { inputValue, placeholder, disabled, error, invalid, description, size: sizeProp, loading = false, } = props;
|
|
907
|
-
const { renderable, optionCount, persistentsHeaders, persistentsFooters, headerInteractiveCount, middleNavigableCount, getOptionLabel, isOptionSelected, refs, floatingStyles, context, getReferenceProps, getFloatingProps, getItemProps, activeIndex, open, listRef, onSelection, onAction, onInputChangeFromUser, onInputBlur, onInputFocus, onInputKeyDown, setReferenceElement, } = useAutocomplete(props);
|
|
912
|
+
const { renderable, optionCount, persistentsHeaders, persistentsFooters, headerInteractiveCount, middleNavigableCount, getOptionLabel, isOptionSelected, refs, floatingStyles, context, getReferenceProps, getFloatingProps, getItemProps, activeIndex, open, listRef, isClickingWithinRef, onSelection, onAction, onInputChangeFromUser, onInputBlur, onInputFocus, onInputKeyDown, setReferenceElement, } = useAutocomplete(props);
|
|
908
913
|
const listboxId = React.useId();
|
|
909
914
|
// Provides mount/unmount-aware transition styles for the floating element
|
|
910
915
|
const { isMounted, styles: transitionStyles } = floatingUi_react.useTransitionStyles(context, {
|
|
@@ -962,7 +967,11 @@ function AutocompleteRebuiltInternal(props, forwardedRef) {
|
|
|
962
967
|
style: Object.assign(Object.assign(Object.assign(Object.assign({}, floatingStyles), transitionStyles), (_b = props.UNSAFE_styles) === null || _b === void 0 ? void 0 : _b.menu), (menuWidth
|
|
963
968
|
? { width: menuWidth, maxWidth: menuWidth }
|
|
964
969
|
: {})),
|
|
965
|
-
}))
|
|
970
|
+
}), { onPointerDown: () => {
|
|
971
|
+
isClickingWithinRef.current = true;
|
|
972
|
+
}, onPointerUp: () => {
|
|
973
|
+
isClickingWithinRef.current = false;
|
|
974
|
+
} }),
|
|
966
975
|
React.createElement(PersistentRegion, { items: persistentsHeaders, position: "header", activeIndex: activeIndex, indexOffset: 0, listboxId: listboxId, getItemProps: getItemProps, listRef: listRef, customRenderHeader: props.customRenderHeader, customRenderFooter: props.customRenderFooter, onAction: onAction, className: classnames(styles$1.persistentHeader, (_c = props.UNSAFE_className) === null || _c === void 0 ? void 0 : _c.header), style: (_d = props.UNSAFE_styles) === null || _d === void 0 ? void 0 : _d.header }),
|
|
967
976
|
React.createElement("div", { className: styles$1.scrollRegion }, loading ? ((_e = props.customRenderLoading) !== null && _e !== void 0 ? _e : React.createElement(LoadingContent, null)) : (React.createElement(React.Fragment, null,
|
|
968
977
|
showEmptyStateMessage && (React.createElement(EmptyStateMessage, { emptyState: props.emptyStateMessage })),
|
|
@@ -223,6 +223,7 @@ function useAutocompleteListNav({ navigableCount, shouldResetActiveIndexOnClose,
|
|
|
223
223
|
// eslint-disable-next-line max-statements
|
|
224
224
|
function useAutocomplete(props) {
|
|
225
225
|
const { menu, emptyActions, getOptionLabel: getOptionLabelProp, isOptionEqualToValue, inputValue, onInputChange, value, onChange, multiple, openOnFocus = true, readOnly = false, debounce: debounceMs = 300, } = props;
|
|
226
|
+
const isClickingWithinRef = useRef(false);
|
|
226
227
|
// TODO: Clean up the types in these refs by enhancing the type system in useCallbackRef
|
|
227
228
|
const getOptionLabelPropRef = useCallbackRef((opt) => getOptionLabelProp === null || getOptionLabelProp === void 0 ? void 0 : getOptionLabelProp(opt));
|
|
228
229
|
const getOptionLabel = useCallback((opt) => {
|
|
@@ -518,6 +519,9 @@ function useAutocomplete(props) {
|
|
|
518
519
|
const onInputBlur = useCallback(() => {
|
|
519
520
|
var _a, _b;
|
|
520
521
|
setInputFocused(false);
|
|
522
|
+
if (isClickingWithinRef.current) {
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
521
525
|
if (readOnly) {
|
|
522
526
|
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
523
527
|
return;
|
|
@@ -664,6 +668,7 @@ function useAutocomplete(props) {
|
|
|
664
668
|
activeIndex,
|
|
665
669
|
setActiveIndex,
|
|
666
670
|
listRef,
|
|
671
|
+
isClickingWithinRef,
|
|
667
672
|
// actions
|
|
668
673
|
onSelection,
|
|
669
674
|
onAction,
|
|
@@ -902,7 +907,7 @@ const AutocompleteRebuilt = forwardRef(AutocompleteRebuiltInternal);
|
|
|
902
907
|
function AutocompleteRebuiltInternal(props, forwardedRef) {
|
|
903
908
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
904
909
|
const { inputValue, placeholder, disabled, error, invalid, description, size: sizeProp, loading = false, } = props;
|
|
905
|
-
const { renderable, optionCount, persistentsHeaders, persistentsFooters, headerInteractiveCount, middleNavigableCount, getOptionLabel, isOptionSelected, refs, floatingStyles, context, getReferenceProps, getFloatingProps, getItemProps, activeIndex, open, listRef, onSelection, onAction, onInputChangeFromUser, onInputBlur, onInputFocus, onInputKeyDown, setReferenceElement, } = useAutocomplete(props);
|
|
910
|
+
const { renderable, optionCount, persistentsHeaders, persistentsFooters, headerInteractiveCount, middleNavigableCount, getOptionLabel, isOptionSelected, refs, floatingStyles, context, getReferenceProps, getFloatingProps, getItemProps, activeIndex, open, listRef, isClickingWithinRef, onSelection, onAction, onInputChangeFromUser, onInputBlur, onInputFocus, onInputKeyDown, setReferenceElement, } = useAutocomplete(props);
|
|
906
911
|
const listboxId = React__default.useId();
|
|
907
912
|
// Provides mount/unmount-aware transition styles for the floating element
|
|
908
913
|
const { isMounted, styles: transitionStyles } = useTransitionStyles(context, {
|
|
@@ -960,7 +965,11 @@ function AutocompleteRebuiltInternal(props, forwardedRef) {
|
|
|
960
965
|
style: Object.assign(Object.assign(Object.assign(Object.assign({}, floatingStyles), transitionStyles), (_b = props.UNSAFE_styles) === null || _b === void 0 ? void 0 : _b.menu), (menuWidth
|
|
961
966
|
? { width: menuWidth, maxWidth: menuWidth }
|
|
962
967
|
: {})),
|
|
963
|
-
}))
|
|
968
|
+
}), { onPointerDown: () => {
|
|
969
|
+
isClickingWithinRef.current = true;
|
|
970
|
+
}, onPointerUp: () => {
|
|
971
|
+
isClickingWithinRef.current = false;
|
|
972
|
+
} }),
|
|
964
973
|
React__default.createElement(PersistentRegion, { items: persistentsHeaders, position: "header", activeIndex: activeIndex, indexOffset: 0, listboxId: listboxId, getItemProps: getItemProps, listRef: listRef, customRenderHeader: props.customRenderHeader, customRenderFooter: props.customRenderFooter, onAction: onAction, className: classnames(styles$1.persistentHeader, (_c = props.UNSAFE_className) === null || _c === void 0 ? void 0 : _c.header), style: (_d = props.UNSAFE_styles) === null || _d === void 0 ? void 0 : _d.header }),
|
|
965
974
|
React__default.createElement("div", { className: styles$1.scrollRegion }, loading ? ((_e = props.customRenderLoading) !== null && _e !== void 0 ? _e : React__default.createElement(LoadingContent, null)) : (React__default.createElement(React__default.Fragment, null,
|
|
966
975
|
showEmptyStateMessage && (React__default.createElement(EmptyStateMessage, { emptyState: props.emptyStateMessage })),
|
|
@@ -56,6 +56,7 @@ export declare function useAutocomplete<Value extends OptionLike, Multiple exten
|
|
|
56
56
|
activeIndex: number | null;
|
|
57
57
|
setActiveIndex: (index: number | null) => void;
|
|
58
58
|
listRef: React.MutableRefObject<(HTMLElement | null)[]>;
|
|
59
|
+
isClickingWithinRef: React.MutableRefObject<boolean>;
|
|
59
60
|
onSelection: (option: Value) => void;
|
|
60
61
|
onAction: (action: ActionConfig) => void;
|
|
61
62
|
onInputChangeFromUser: (val: string) => void;
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,761 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type ButtonProps } from "./Button.types";
|
|
3
3
|
import { ButtonIcon, ButtonLabel } from "./ButtonInternals";
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
10
|
-
readonly value?: string | undefined;
|
|
11
|
-
readonly id?: string | undefined;
|
|
12
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
13
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
14
|
-
readonly disabled?: boolean | undefined;
|
|
15
|
-
readonly UNSAFE_className?: {
|
|
16
|
-
container?: string;
|
|
17
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
18
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
19
|
-
} | undefined;
|
|
20
|
-
readonly UNSAFE_style?: {
|
|
21
|
-
container?: React.CSSProperties;
|
|
22
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
23
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
24
|
-
} | undefined;
|
|
25
|
-
readonly ariaLabel?: string | undefined;
|
|
26
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
27
|
-
readonly ariaControls?: string | undefined;
|
|
28
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
29
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
30
|
-
readonly fullWidth?: boolean | undefined;
|
|
31
|
-
readonly loading?: boolean | undefined;
|
|
32
|
-
to?: undefined;
|
|
33
|
-
url?: undefined;
|
|
34
|
-
role?: undefined;
|
|
35
|
-
readonly label: string;
|
|
36
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
37
|
-
readonly iconOnRight?: boolean | undefined;
|
|
38
|
-
readonly children?: never | undefined;
|
|
39
|
-
} | {
|
|
40
|
-
onClick?: undefined;
|
|
41
|
-
external?: undefined;
|
|
42
|
-
readonly name?: string | undefined;
|
|
43
|
-
submit: boolean;
|
|
44
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
45
|
-
readonly value?: string | undefined;
|
|
46
|
-
readonly id?: string | undefined;
|
|
47
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
48
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
49
|
-
readonly disabled?: boolean | undefined;
|
|
50
|
-
readonly UNSAFE_className?: {
|
|
51
|
-
container?: string;
|
|
52
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
53
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
54
|
-
} | undefined;
|
|
55
|
-
readonly UNSAFE_style?: {
|
|
56
|
-
container?: React.CSSProperties;
|
|
57
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
58
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
59
|
-
} | undefined;
|
|
60
|
-
readonly ariaLabel: string;
|
|
61
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
62
|
-
readonly ariaControls?: string | undefined;
|
|
63
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
64
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
65
|
-
readonly fullWidth?: boolean | undefined;
|
|
66
|
-
readonly loading?: boolean | undefined;
|
|
67
|
-
to?: undefined;
|
|
68
|
-
url?: undefined;
|
|
69
|
-
role?: undefined;
|
|
70
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
71
|
-
readonly iconOnRight?: boolean | undefined;
|
|
72
|
-
readonly label?: string | undefined;
|
|
73
|
-
readonly children?: never | undefined;
|
|
74
|
-
} | {
|
|
75
|
-
name?: undefined;
|
|
76
|
-
value?: undefined;
|
|
77
|
-
submit?: undefined;
|
|
78
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
79
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
80
|
-
readonly ariaControls?: string | undefined;
|
|
81
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
82
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
83
|
-
readonly disabled?: boolean | undefined;
|
|
84
|
-
readonly external?: boolean | undefined;
|
|
85
|
-
readonly fullWidth?: boolean | undefined;
|
|
86
|
-
readonly id?: string | undefined;
|
|
87
|
-
readonly loading?: boolean | undefined;
|
|
88
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
89
|
-
readonly ariaLabel?: string | undefined;
|
|
90
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
91
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
92
|
-
readonly UNSAFE_className?: {
|
|
93
|
-
container?: string;
|
|
94
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
95
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
96
|
-
} | undefined;
|
|
97
|
-
readonly UNSAFE_style?: {
|
|
98
|
-
container?: React.CSSProperties;
|
|
99
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
100
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
101
|
-
} | undefined;
|
|
102
|
-
role?: undefined;
|
|
103
|
-
to?: undefined;
|
|
104
|
-
readonly url?: string | undefined;
|
|
105
|
-
readonly label: string;
|
|
106
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
107
|
-
readonly iconOnRight?: boolean | undefined;
|
|
108
|
-
readonly children?: never | undefined;
|
|
109
|
-
} | {
|
|
110
|
-
name?: undefined;
|
|
111
|
-
value?: undefined;
|
|
112
|
-
submit?: undefined;
|
|
113
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
114
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
115
|
-
readonly ariaControls?: string | undefined;
|
|
116
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
117
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
118
|
-
readonly disabled?: boolean | undefined;
|
|
119
|
-
readonly external?: boolean | undefined;
|
|
120
|
-
readonly fullWidth?: boolean | undefined;
|
|
121
|
-
readonly id?: string | undefined;
|
|
122
|
-
readonly loading?: boolean | undefined;
|
|
123
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
124
|
-
readonly ariaLabel: string;
|
|
125
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
126
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
127
|
-
readonly UNSAFE_className?: {
|
|
128
|
-
container?: string;
|
|
129
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
130
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
131
|
-
} | undefined;
|
|
132
|
-
readonly UNSAFE_style?: {
|
|
133
|
-
container?: React.CSSProperties;
|
|
134
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
135
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
136
|
-
} | undefined;
|
|
137
|
-
role?: undefined;
|
|
138
|
-
to?: undefined;
|
|
139
|
-
readonly url?: string | undefined;
|
|
140
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
141
|
-
readonly iconOnRight?: boolean | undefined;
|
|
142
|
-
readonly label?: string | undefined;
|
|
143
|
-
readonly children?: never | undefined;
|
|
144
|
-
} | {
|
|
145
|
-
name?: undefined;
|
|
146
|
-
value?: undefined;
|
|
147
|
-
submit?: undefined;
|
|
148
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
149
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
150
|
-
readonly ariaControls?: string | undefined;
|
|
151
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
152
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
153
|
-
readonly disabled?: boolean | undefined;
|
|
154
|
-
readonly external?: boolean | undefined;
|
|
155
|
-
readonly fullWidth?: boolean | undefined;
|
|
156
|
-
readonly id?: string | undefined;
|
|
157
|
-
readonly loading?: boolean | undefined;
|
|
158
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
159
|
-
readonly ariaLabel?: string | undefined;
|
|
160
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
161
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
162
|
-
readonly UNSAFE_className?: {
|
|
163
|
-
container?: string;
|
|
164
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
165
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
166
|
-
} | undefined;
|
|
167
|
-
readonly UNSAFE_style?: {
|
|
168
|
-
container?: React.CSSProperties;
|
|
169
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
170
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
171
|
-
} | undefined;
|
|
172
|
-
role?: undefined;
|
|
173
|
-
url?: undefined;
|
|
174
|
-
readonly to?: import("history").LocationDescriptor<unknown> | ((location: import("history").Location<unknown>) => import("history").LocationDescriptor<unknown>) | undefined;
|
|
175
|
-
readonly label: string;
|
|
176
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
177
|
-
readonly iconOnRight?: boolean | undefined;
|
|
178
|
-
readonly children?: never | undefined;
|
|
179
|
-
} | {
|
|
180
|
-
name?: undefined;
|
|
181
|
-
value?: undefined;
|
|
182
|
-
submit?: undefined;
|
|
183
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
184
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
185
|
-
readonly ariaControls?: string | undefined;
|
|
186
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
187
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
188
|
-
readonly disabled?: boolean | undefined;
|
|
189
|
-
readonly external?: boolean | undefined;
|
|
190
|
-
readonly fullWidth?: boolean | undefined;
|
|
191
|
-
readonly id?: string | undefined;
|
|
192
|
-
readonly loading?: boolean | undefined;
|
|
193
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
194
|
-
readonly ariaLabel: string;
|
|
195
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
196
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
197
|
-
readonly UNSAFE_className?: {
|
|
198
|
-
container?: string;
|
|
199
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
200
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
201
|
-
} | undefined;
|
|
202
|
-
readonly UNSAFE_style?: {
|
|
203
|
-
container?: React.CSSProperties;
|
|
204
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
205
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
206
|
-
} | undefined;
|
|
207
|
-
role?: undefined;
|
|
208
|
-
url?: undefined;
|
|
209
|
-
readonly to?: import("history").LocationDescriptor<unknown> | ((location: import("history").Location<unknown>) => import("history").LocationDescriptor<unknown>) | undefined;
|
|
210
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
211
|
-
readonly iconOnRight?: boolean | undefined;
|
|
212
|
-
readonly label?: string | undefined;
|
|
213
|
-
readonly children?: never | undefined;
|
|
214
|
-
} | {
|
|
215
|
-
name?: undefined;
|
|
216
|
-
value?: undefined;
|
|
217
|
-
submit?: undefined;
|
|
218
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
219
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
220
|
-
readonly ariaControls?: string | undefined;
|
|
221
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
222
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
223
|
-
readonly disabled?: boolean | undefined;
|
|
224
|
-
readonly external?: boolean | undefined;
|
|
225
|
-
readonly fullWidth?: boolean | undefined;
|
|
226
|
-
readonly id?: string | undefined;
|
|
227
|
-
readonly loading?: boolean | undefined;
|
|
228
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
229
|
-
readonly ariaLabel?: string | undefined;
|
|
230
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
231
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
232
|
-
readonly UNSAFE_className?: {
|
|
233
|
-
container?: string;
|
|
234
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
235
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
236
|
-
} | undefined;
|
|
237
|
-
readonly UNSAFE_style?: {
|
|
238
|
-
container?: React.CSSProperties;
|
|
239
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
240
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
241
|
-
} | undefined;
|
|
242
|
-
to?: undefined;
|
|
243
|
-
url?: undefined;
|
|
244
|
-
readonly role?: string | undefined;
|
|
245
|
-
readonly label: string;
|
|
246
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
247
|
-
readonly iconOnRight?: boolean | undefined;
|
|
248
|
-
readonly children?: never | undefined;
|
|
249
|
-
} | {
|
|
250
|
-
name?: undefined;
|
|
251
|
-
value?: undefined;
|
|
252
|
-
submit?: undefined;
|
|
253
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
254
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
255
|
-
readonly ariaControls?: string | undefined;
|
|
256
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
257
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
258
|
-
readonly disabled?: boolean | undefined;
|
|
259
|
-
readonly external?: boolean | undefined;
|
|
260
|
-
readonly fullWidth?: boolean | undefined;
|
|
261
|
-
readonly id?: string | undefined;
|
|
262
|
-
readonly loading?: boolean | undefined;
|
|
263
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
264
|
-
readonly ariaLabel: string;
|
|
265
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
266
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
267
|
-
readonly UNSAFE_className?: {
|
|
268
|
-
container?: string;
|
|
269
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
270
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
271
|
-
} | undefined;
|
|
272
|
-
readonly UNSAFE_style?: {
|
|
273
|
-
container?: React.CSSProperties;
|
|
274
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
275
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
276
|
-
} | undefined;
|
|
277
|
-
to?: undefined;
|
|
278
|
-
url?: undefined;
|
|
279
|
-
readonly role?: string | undefined;
|
|
280
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
281
|
-
readonly iconOnRight?: boolean | undefined;
|
|
282
|
-
readonly label?: string | undefined;
|
|
283
|
-
readonly children?: never | undefined;
|
|
284
|
-
} | {
|
|
285
|
-
name?: undefined;
|
|
286
|
-
value?: undefined;
|
|
287
|
-
submit?: undefined;
|
|
288
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
289
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
290
|
-
readonly ariaControls?: string | undefined;
|
|
291
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
292
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
293
|
-
readonly disabled?: boolean | undefined;
|
|
294
|
-
readonly external?: boolean | undefined;
|
|
295
|
-
readonly fullWidth?: boolean | undefined;
|
|
296
|
-
readonly id?: string | undefined;
|
|
297
|
-
readonly loading?: boolean | undefined;
|
|
298
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
299
|
-
readonly ariaLabel?: string | undefined;
|
|
300
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
301
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
302
|
-
readonly UNSAFE_className?: {
|
|
303
|
-
container?: string;
|
|
304
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
305
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
306
|
-
} | undefined;
|
|
307
|
-
readonly UNSAFE_style?: {
|
|
308
|
-
container?: React.CSSProperties;
|
|
309
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
310
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
311
|
-
} | undefined;
|
|
312
|
-
role?: undefined;
|
|
313
|
-
to?: undefined;
|
|
314
|
-
readonly url?: string | undefined;
|
|
315
|
-
readonly label: string;
|
|
316
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
317
|
-
readonly iconOnRight?: boolean | undefined;
|
|
318
|
-
readonly children?: never | undefined;
|
|
319
|
-
} | {
|
|
320
|
-
name?: undefined;
|
|
321
|
-
value?: undefined;
|
|
322
|
-
submit?: undefined;
|
|
323
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
324
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
325
|
-
readonly ariaControls?: string | undefined;
|
|
326
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
327
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
328
|
-
readonly disabled?: boolean | undefined;
|
|
329
|
-
readonly external?: boolean | undefined;
|
|
330
|
-
readonly fullWidth?: boolean | undefined;
|
|
331
|
-
readonly id?: string | undefined;
|
|
332
|
-
readonly loading?: boolean | undefined;
|
|
333
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
334
|
-
readonly ariaLabel: string;
|
|
335
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
336
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
337
|
-
readonly UNSAFE_className?: {
|
|
338
|
-
container?: string;
|
|
339
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
340
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
341
|
-
} | undefined;
|
|
342
|
-
readonly UNSAFE_style?: {
|
|
343
|
-
container?: React.CSSProperties;
|
|
344
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
345
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
346
|
-
} | undefined;
|
|
347
|
-
role?: undefined;
|
|
348
|
-
to?: undefined;
|
|
349
|
-
readonly url?: string | undefined;
|
|
350
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
351
|
-
readonly iconOnRight?: boolean | undefined;
|
|
352
|
-
readonly label?: string | undefined;
|
|
353
|
-
readonly children?: never | undefined;
|
|
354
|
-
} | {
|
|
355
|
-
name?: undefined;
|
|
356
|
-
value?: undefined;
|
|
357
|
-
submit?: undefined;
|
|
358
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
359
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
360
|
-
readonly ariaControls?: string | undefined;
|
|
361
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
362
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
363
|
-
readonly disabled?: boolean | undefined;
|
|
364
|
-
readonly external?: boolean | undefined;
|
|
365
|
-
readonly fullWidth?: boolean | undefined;
|
|
366
|
-
readonly id?: string | undefined;
|
|
367
|
-
readonly loading?: boolean | undefined;
|
|
368
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
369
|
-
readonly ariaLabel?: string | undefined;
|
|
370
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
371
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
372
|
-
readonly UNSAFE_className?: {
|
|
373
|
-
container?: string;
|
|
374
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
375
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
376
|
-
} | undefined;
|
|
377
|
-
readonly UNSAFE_style?: {
|
|
378
|
-
container?: React.CSSProperties;
|
|
379
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
380
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
381
|
-
} | undefined;
|
|
382
|
-
role?: undefined;
|
|
383
|
-
url?: undefined;
|
|
384
|
-
readonly to?: import("history").LocationDescriptor<unknown> | ((location: import("history").Location<unknown>) => import("history").LocationDescriptor<unknown>) | undefined;
|
|
385
|
-
readonly label: string;
|
|
386
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
387
|
-
readonly iconOnRight?: boolean | undefined;
|
|
388
|
-
readonly children?: never | undefined;
|
|
389
|
-
} | {
|
|
390
|
-
name?: undefined;
|
|
391
|
-
value?: undefined;
|
|
392
|
-
submit?: undefined;
|
|
393
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
394
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
395
|
-
readonly ariaControls?: string | undefined;
|
|
396
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
397
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
398
|
-
readonly disabled?: boolean | undefined;
|
|
399
|
-
readonly external?: boolean | undefined;
|
|
400
|
-
readonly fullWidth?: boolean | undefined;
|
|
401
|
-
readonly id?: string | undefined;
|
|
402
|
-
readonly loading?: boolean | undefined;
|
|
403
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
404
|
-
readonly ariaLabel: string;
|
|
405
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
406
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
407
|
-
readonly UNSAFE_className?: {
|
|
408
|
-
container?: string;
|
|
409
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
410
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
411
|
-
} | undefined;
|
|
412
|
-
readonly UNSAFE_style?: {
|
|
413
|
-
container?: React.CSSProperties;
|
|
414
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
415
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
416
|
-
} | undefined;
|
|
417
|
-
role?: undefined;
|
|
418
|
-
url?: undefined;
|
|
419
|
-
readonly to?: import("history").LocationDescriptor<unknown> | ((location: import("history").Location<unknown>) => import("history").LocationDescriptor<unknown>) | undefined;
|
|
420
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
421
|
-
readonly iconOnRight?: boolean | undefined;
|
|
422
|
-
readonly label?: string | undefined;
|
|
423
|
-
readonly children?: never | undefined;
|
|
424
|
-
} | {
|
|
425
|
-
name?: undefined;
|
|
426
|
-
value?: undefined;
|
|
427
|
-
submit?: undefined;
|
|
428
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
429
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
430
|
-
readonly ariaControls?: string | undefined;
|
|
431
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
432
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
433
|
-
readonly disabled?: boolean | undefined;
|
|
434
|
-
readonly external?: boolean | undefined;
|
|
435
|
-
readonly fullWidth?: boolean | undefined;
|
|
436
|
-
readonly id?: string | undefined;
|
|
437
|
-
readonly loading?: boolean | undefined;
|
|
438
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
439
|
-
readonly ariaLabel?: string | undefined;
|
|
440
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
441
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
442
|
-
readonly UNSAFE_className?: {
|
|
443
|
-
container?: string;
|
|
444
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
445
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
446
|
-
} | undefined;
|
|
447
|
-
readonly UNSAFE_style?: {
|
|
448
|
-
container?: React.CSSProperties;
|
|
449
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
450
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
451
|
-
} | undefined;
|
|
452
|
-
to?: undefined;
|
|
453
|
-
url?: undefined;
|
|
454
|
-
readonly role?: string | undefined;
|
|
455
|
-
readonly label: string;
|
|
456
|
-
readonly icon?: import("@jobber/design").IconNames | undefined;
|
|
457
|
-
readonly iconOnRight?: boolean | undefined;
|
|
458
|
-
readonly children?: never | undefined;
|
|
459
|
-
} | {
|
|
460
|
-
name?: undefined;
|
|
461
|
-
value?: undefined;
|
|
462
|
-
submit?: undefined;
|
|
463
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
464
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
465
|
-
readonly ariaControls?: string | undefined;
|
|
466
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
467
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
468
|
-
readonly disabled?: boolean | undefined;
|
|
469
|
-
readonly external?: boolean | undefined;
|
|
470
|
-
readonly fullWidth?: boolean | undefined;
|
|
471
|
-
readonly id?: string | undefined;
|
|
472
|
-
readonly loading?: boolean | undefined;
|
|
473
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
474
|
-
readonly ariaLabel: string;
|
|
475
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
476
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
477
|
-
readonly UNSAFE_className?: {
|
|
478
|
-
container?: string;
|
|
479
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
480
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
481
|
-
} | undefined;
|
|
482
|
-
readonly UNSAFE_style?: {
|
|
483
|
-
container?: React.CSSProperties;
|
|
484
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
485
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
486
|
-
} | undefined;
|
|
487
|
-
to?: undefined;
|
|
488
|
-
url?: undefined;
|
|
489
|
-
readonly role?: string | undefined;
|
|
490
|
-
readonly icon: import("@jobber/design").IconNames;
|
|
491
|
-
readonly iconOnRight?: boolean | undefined;
|
|
492
|
-
readonly label?: string | undefined;
|
|
493
|
-
readonly children?: never | undefined;
|
|
494
|
-
} | {
|
|
495
|
-
icon?: undefined;
|
|
496
|
-
label?: undefined;
|
|
497
|
-
iconOnRight?: undefined;
|
|
498
|
-
onClick?: undefined;
|
|
499
|
-
external?: undefined;
|
|
500
|
-
readonly name?: string | undefined;
|
|
501
|
-
submit: boolean;
|
|
502
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
503
|
-
readonly value?: string | undefined;
|
|
504
|
-
readonly id?: string | undefined;
|
|
505
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
506
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
507
|
-
readonly disabled?: boolean | undefined;
|
|
508
|
-
readonly UNSAFE_className?: {
|
|
509
|
-
container?: string;
|
|
510
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
511
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
512
|
-
} | undefined;
|
|
513
|
-
readonly UNSAFE_style?: {
|
|
514
|
-
container?: React.CSSProperties;
|
|
515
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
516
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
517
|
-
} | undefined;
|
|
518
|
-
readonly ariaLabel?: string | undefined;
|
|
519
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
520
|
-
readonly ariaControls?: string | undefined;
|
|
521
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
522
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
523
|
-
readonly fullWidth?: boolean | undefined;
|
|
524
|
-
readonly loading?: boolean | undefined;
|
|
525
|
-
to?: undefined;
|
|
526
|
-
url?: undefined;
|
|
527
|
-
role?: undefined;
|
|
528
|
-
readonly children: React.ReactNode;
|
|
529
|
-
} | {
|
|
530
|
-
icon?: undefined;
|
|
531
|
-
label?: undefined;
|
|
532
|
-
iconOnRight?: undefined;
|
|
533
|
-
name?: undefined;
|
|
534
|
-
value?: undefined;
|
|
535
|
-
submit?: undefined;
|
|
536
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
537
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
538
|
-
readonly ariaControls?: string | undefined;
|
|
539
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
540
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
541
|
-
readonly disabled?: boolean | undefined;
|
|
542
|
-
readonly external?: boolean | undefined;
|
|
543
|
-
readonly fullWidth?: boolean | undefined;
|
|
544
|
-
readonly id?: string | undefined;
|
|
545
|
-
readonly loading?: boolean | undefined;
|
|
546
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
547
|
-
readonly ariaLabel?: string | undefined;
|
|
548
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
549
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
550
|
-
readonly UNSAFE_className?: {
|
|
551
|
-
container?: string;
|
|
552
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
553
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
554
|
-
} | undefined;
|
|
555
|
-
readonly UNSAFE_style?: {
|
|
556
|
-
container?: React.CSSProperties;
|
|
557
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
558
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
559
|
-
} | undefined;
|
|
560
|
-
role?: undefined;
|
|
561
|
-
to?: undefined;
|
|
562
|
-
readonly url?: string | undefined;
|
|
563
|
-
readonly children: React.ReactNode;
|
|
564
|
-
} | {
|
|
565
|
-
icon?: undefined;
|
|
566
|
-
label?: undefined;
|
|
567
|
-
iconOnRight?: undefined;
|
|
568
|
-
name?: undefined;
|
|
569
|
-
value?: undefined;
|
|
570
|
-
submit?: undefined;
|
|
571
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
572
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
573
|
-
readonly ariaControls?: string | undefined;
|
|
574
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
575
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
576
|
-
readonly disabled?: boolean | undefined;
|
|
577
|
-
readonly external?: boolean | undefined;
|
|
578
|
-
readonly fullWidth?: boolean | undefined;
|
|
579
|
-
readonly id?: string | undefined;
|
|
580
|
-
readonly loading?: boolean | undefined;
|
|
581
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
582
|
-
readonly ariaLabel?: string | undefined;
|
|
583
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
584
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
585
|
-
readonly UNSAFE_className?: {
|
|
586
|
-
container?: string;
|
|
587
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
588
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
589
|
-
} | undefined;
|
|
590
|
-
readonly UNSAFE_style?: {
|
|
591
|
-
container?: React.CSSProperties;
|
|
592
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
593
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
594
|
-
} | undefined;
|
|
595
|
-
role?: undefined;
|
|
596
|
-
url?: undefined;
|
|
597
|
-
readonly to?: import("history").LocationDescriptor<unknown> | ((location: import("history").Location<unknown>) => import("history").LocationDescriptor<unknown>) | undefined;
|
|
598
|
-
readonly children: React.ReactNode;
|
|
599
|
-
} | {
|
|
600
|
-
icon?: undefined;
|
|
601
|
-
label?: undefined;
|
|
602
|
-
iconOnRight?: undefined;
|
|
603
|
-
name?: undefined;
|
|
604
|
-
value?: undefined;
|
|
605
|
-
submit?: undefined;
|
|
606
|
-
readonly variation: Extract<import("./Button.types").ButtonVariation, "destructive">;
|
|
607
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
608
|
-
readonly ariaControls?: string | undefined;
|
|
609
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
610
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
611
|
-
readonly disabled?: boolean | undefined;
|
|
612
|
-
readonly external?: boolean | undefined;
|
|
613
|
-
readonly fullWidth?: boolean | undefined;
|
|
614
|
-
readonly id?: string | undefined;
|
|
615
|
-
readonly loading?: boolean | undefined;
|
|
616
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
617
|
-
readonly ariaLabel?: string | undefined;
|
|
618
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
619
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
620
|
-
readonly UNSAFE_className?: {
|
|
621
|
-
container?: string;
|
|
622
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
623
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
624
|
-
} | undefined;
|
|
625
|
-
readonly UNSAFE_style?: {
|
|
626
|
-
container?: React.CSSProperties;
|
|
627
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
628
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
629
|
-
} | undefined;
|
|
630
|
-
to?: undefined;
|
|
631
|
-
url?: undefined;
|
|
632
|
-
readonly role?: string | undefined;
|
|
633
|
-
readonly children: React.ReactNode;
|
|
634
|
-
} | {
|
|
635
|
-
icon?: undefined;
|
|
636
|
-
label?: undefined;
|
|
637
|
-
iconOnRight?: undefined;
|
|
638
|
-
name?: undefined;
|
|
639
|
-
value?: undefined;
|
|
640
|
-
submit?: undefined;
|
|
641
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
642
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
643
|
-
readonly ariaControls?: string | undefined;
|
|
644
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
645
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
646
|
-
readonly disabled?: boolean | undefined;
|
|
647
|
-
readonly external?: boolean | undefined;
|
|
648
|
-
readonly fullWidth?: boolean | undefined;
|
|
649
|
-
readonly id?: string | undefined;
|
|
650
|
-
readonly loading?: boolean | undefined;
|
|
651
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
652
|
-
readonly ariaLabel?: string | undefined;
|
|
653
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
654
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
655
|
-
readonly UNSAFE_className?: {
|
|
656
|
-
container?: string;
|
|
657
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
658
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
659
|
-
} | undefined;
|
|
660
|
-
readonly UNSAFE_style?: {
|
|
661
|
-
container?: React.CSSProperties;
|
|
662
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
663
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
664
|
-
} | undefined;
|
|
665
|
-
role?: undefined;
|
|
666
|
-
to?: undefined;
|
|
667
|
-
readonly url?: string | undefined;
|
|
668
|
-
readonly children: React.ReactNode;
|
|
669
|
-
} | {
|
|
670
|
-
icon?: undefined;
|
|
671
|
-
label?: undefined;
|
|
672
|
-
iconOnRight?: undefined;
|
|
673
|
-
name?: undefined;
|
|
674
|
-
value?: undefined;
|
|
675
|
-
submit?: undefined;
|
|
676
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
677
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
678
|
-
readonly ariaControls?: string | undefined;
|
|
679
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
680
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
681
|
-
readonly disabled?: boolean | undefined;
|
|
682
|
-
readonly external?: boolean | undefined;
|
|
683
|
-
readonly fullWidth?: boolean | undefined;
|
|
684
|
-
readonly id?: string | undefined;
|
|
685
|
-
readonly loading?: boolean | undefined;
|
|
686
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
687
|
-
readonly ariaLabel?: string | undefined;
|
|
688
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
689
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
690
|
-
readonly UNSAFE_className?: {
|
|
691
|
-
container?: string;
|
|
692
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
693
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
694
|
-
} | undefined;
|
|
695
|
-
readonly UNSAFE_style?: {
|
|
696
|
-
container?: React.CSSProperties;
|
|
697
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
698
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
699
|
-
} | undefined;
|
|
700
|
-
role?: undefined;
|
|
701
|
-
url?: undefined;
|
|
702
|
-
readonly to?: import("history").LocationDescriptor<unknown> | ((location: import("history").Location<unknown>) => import("history").LocationDescriptor<unknown>) | undefined;
|
|
703
|
-
readonly children: React.ReactNode;
|
|
704
|
-
} | {
|
|
705
|
-
icon?: undefined;
|
|
706
|
-
label?: undefined;
|
|
707
|
-
iconOnRight?: undefined;
|
|
708
|
-
name?: undefined;
|
|
709
|
-
value?: undefined;
|
|
710
|
-
submit?: undefined;
|
|
711
|
-
readonly variation?: import("./Button.types").ButtonVariation | undefined;
|
|
712
|
-
readonly type?: import("./Button.types").ButtonType | undefined;
|
|
713
|
-
readonly ariaControls?: string | undefined;
|
|
714
|
-
readonly ariaHaspopup?: boolean | undefined;
|
|
715
|
-
readonly ariaExpanded?: boolean | undefined;
|
|
716
|
-
readonly disabled?: boolean | undefined;
|
|
717
|
-
readonly external?: boolean | undefined;
|
|
718
|
-
readonly fullWidth?: boolean | undefined;
|
|
719
|
-
readonly id?: string | undefined;
|
|
720
|
-
readonly loading?: boolean | undefined;
|
|
721
|
-
readonly size?: import("./Button.types").ButtonSize | undefined;
|
|
722
|
-
readonly ariaLabel?: string | undefined;
|
|
723
|
-
onClick?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
724
|
-
onMouseDown?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined;
|
|
725
|
-
readonly UNSAFE_className?: {
|
|
726
|
-
container?: string;
|
|
727
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_className"];
|
|
728
|
-
buttonIcon?: import("..").IconProps["UNSAFE_className"];
|
|
729
|
-
} | undefined;
|
|
730
|
-
readonly UNSAFE_style?: {
|
|
731
|
-
container?: React.CSSProperties;
|
|
732
|
-
buttonLabel?: import("..").TypographyProps["UNSAFE_style"];
|
|
733
|
-
buttonIcon?: import("..").IconProps["UNSAFE_style"];
|
|
734
|
-
} | undefined;
|
|
735
|
-
to?: undefined;
|
|
736
|
-
url?: undefined;
|
|
737
|
-
readonly role?: string | undefined;
|
|
738
|
-
readonly children: React.ReactNode;
|
|
739
|
-
}) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
740
|
-
export declare const Button: {
|
|
741
|
-
(props: ButtonProps & {
|
|
742
|
-
url?: never;
|
|
743
|
-
to?: never;
|
|
744
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
745
|
-
}): ReturnType<typeof ButtonForwarded>;
|
|
746
|
-
(props: ButtonProps & {
|
|
747
|
-
url: string;
|
|
748
|
-
to?: never;
|
|
749
|
-
ref?: React.Ref<HTMLAnchorElement>;
|
|
750
|
-
}): ReturnType<typeof ButtonForwarded>;
|
|
751
|
-
(props: ButtonProps & {
|
|
752
|
-
to: string;
|
|
753
|
-
url?: never;
|
|
754
|
-
ref?: React.Ref<HTMLAnchorElement>;
|
|
755
|
-
}): ReturnType<typeof ButtonForwarded>;
|
|
756
|
-
(props: ButtonProps): ReturnType<typeof ButtonForwarded>;
|
|
757
|
-
} & {
|
|
758
|
-
Label: typeof ButtonLabel;
|
|
759
|
-
Icon: typeof ButtonIcon;
|
|
760
|
-
};
|
|
4
|
+
declare function Button(props: ButtonProps): React.JSX.Element;
|
|
5
|
+
declare namespace Button {
|
|
6
|
+
var Label: typeof ButtonLabel;
|
|
7
|
+
var Icon: typeof ButtonIcon;
|
|
8
|
+
}
|
|
761
9
|
export type { ButtonProps };
|
|
10
|
+
export { Button };
|
package/dist/Button-cjs.js
CHANGED
|
@@ -68,7 +68,12 @@ function ButtonLabel(_a) {
|
|
|
68
68
|
return (React.createElement(Typography.Typography, Object.assign({ element: element, fontWeight: fontWeight, fontFamily: fontFamily, size: getTypeSizes(size) }, props)));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
function Button(props) {
|
|
72
|
+
const { size } = props;
|
|
73
|
+
return (React.createElement(ButtonProvider, { size: size },
|
|
74
|
+
React.createElement(ButtonWrapper, Object.assign({}, props))));
|
|
75
|
+
}
|
|
76
|
+
function ButtonWrapper(props) {
|
|
72
77
|
const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, id, name, onClick, onMouseDown, loading, role, value, submit, to, url, UNSAFE_className = {}, UNSAFE_style = {}, children, } = props;
|
|
73
78
|
const { combined } = useButtonStyles(props);
|
|
74
79
|
const buttonType = submit ? "submit" : "button";
|
|
@@ -80,22 +85,11 @@ const ButtonWrapper = React.forwardRef((props, ref) => {
|
|
|
80
85
|
})), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-busy": loading, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
|
|
81
86
|
const buttonInternals = children || React.createElement(ButtonContent, Object.assign({}, props));
|
|
82
87
|
if (to) {
|
|
83
|
-
return (React.createElement(reactRouterDom.Link, Object.assign({}, tagProps, { to: to
|
|
88
|
+
return (React.createElement(reactRouterDom.Link, Object.assign({}, tagProps, { to: to }), buttonInternals));
|
|
84
89
|
}
|
|
85
90
|
const Tag = url ? "a" : "button";
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
89
|
-
ButtonWrapper.displayName = "ButtonWrapper";
|
|
90
|
-
const ButtonForwarded = React.forwardRef((props, ref) => {
|
|
91
|
-
const { size } = props;
|
|
92
|
-
return (React.createElement(ButtonProvider, { size: size },
|
|
93
|
-
React.createElement(ButtonWrapper, Object.assign({}, props, { ref: ref }))));
|
|
94
|
-
});
|
|
95
|
-
ButtonForwarded.displayName = "Button";
|
|
96
|
-
// Add function overloads for type-safe refs
|
|
97
|
-
const Button = ButtonForwarded;
|
|
98
|
-
// Attach namespace components (preserving existing API)
|
|
91
|
+
return React.createElement(Tag, Object.assign({}, tagProps), buttonInternals);
|
|
92
|
+
}
|
|
99
93
|
Button.Label = ButtonLabel;
|
|
100
94
|
Button.Icon = ButtonIcon;
|
|
101
95
|
|
package/dist/Button-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { createContext, useContext
|
|
1
|
+
import React__default, { createContext, useContext } from 'react';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
@@ -66,7 +66,12 @@ function ButtonLabel(_a) {
|
|
|
66
66
|
return (React__default.createElement(Typography, Object.assign({ element: element, fontWeight: fontWeight, fontFamily: fontFamily, size: getTypeSizes(size) }, props)));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
function Button(props) {
|
|
70
|
+
const { size } = props;
|
|
71
|
+
return (React__default.createElement(ButtonProvider, { size: size },
|
|
72
|
+
React__default.createElement(ButtonWrapper, Object.assign({}, props))));
|
|
73
|
+
}
|
|
74
|
+
function ButtonWrapper(props) {
|
|
70
75
|
const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, id, name, onClick, onMouseDown, loading, role, value, submit, to, url, UNSAFE_className = {}, UNSAFE_style = {}, children, } = props;
|
|
71
76
|
const { combined } = useButtonStyles(props);
|
|
72
77
|
const buttonType = submit ? "submit" : "button";
|
|
@@ -78,22 +83,11 @@ const ButtonWrapper = forwardRef((props, ref) => {
|
|
|
78
83
|
})), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-busy": loading, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
|
|
79
84
|
const buttonInternals = children || React__default.createElement(ButtonContent, Object.assign({}, props));
|
|
80
85
|
if (to) {
|
|
81
|
-
return (React__default.createElement(Link, Object.assign({}, tagProps, { to: to
|
|
86
|
+
return (React__default.createElement(Link, Object.assign({}, tagProps, { to: to }), buttonInternals));
|
|
82
87
|
}
|
|
83
88
|
const Tag = url ? "a" : "button";
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
87
|
-
ButtonWrapper.displayName = "ButtonWrapper";
|
|
88
|
-
const ButtonForwarded = forwardRef((props, ref) => {
|
|
89
|
-
const { size } = props;
|
|
90
|
-
return (React__default.createElement(ButtonProvider, { size: size },
|
|
91
|
-
React__default.createElement(ButtonWrapper, Object.assign({}, props, { ref: ref }))));
|
|
92
|
-
});
|
|
93
|
-
ButtonForwarded.displayName = "Button";
|
|
94
|
-
// Add function overloads for type-safe refs
|
|
95
|
-
const Button = ButtonForwarded;
|
|
96
|
-
// Attach namespace components (preserving existing API)
|
|
89
|
+
return React__default.createElement(Tag, Object.assign({}, tagProps), buttonInternals);
|
|
90
|
+
}
|
|
97
91
|
Button.Label = ButtonLabel;
|
|
98
92
|
Button.Icon = ButtonIcon;
|
|
99
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.103.2-JOB-
|
|
3
|
+
"version": "6.103.2-JOB-141426-1b49367.0+1b4936717",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -538,5 +538,5 @@
|
|
|
538
538
|
"> 1%",
|
|
539
539
|
"IE 10"
|
|
540
540
|
],
|
|
541
|
-
"gitHead": "
|
|
541
|
+
"gitHead": "1b4936717ac7e8c7caefc4145e02c79f7dbb7f56"
|
|
542
542
|
}
|