@jobber/components 6.101.4 → 6.101.5-JOB-140604-4487daa.55
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/Autocomplete.types.d.ts +11 -51
- package/dist/Autocomplete/components/MenuList.d.ts +3 -2
- package/dist/Autocomplete/components/PersistentRegion.d.ts +3 -2
- package/dist/Autocomplete/hooks/useAutocompleteListNav.d.ts +3 -2
- package/dist/Autocomplete/index.cjs +95 -51
- package/dist/Autocomplete/index.mjs +97 -53
- package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +14 -1
- package/dist/Autocomplete/useAutocomplete.d.ts +4 -3
- package/dist/Autocomplete/utils/interactionUtils.d.ts +14 -0
- package/dist/Card-cjs.js +1 -1
- package/dist/Card-es.js +1 -1
- package/dist/Checkbox/Checkbox.rebuilt.d.ts +2 -2
- package/dist/Checkbox/Checkbox.types.d.ts +24 -18
- package/dist/Checkbox/index.cjs +9 -2
- package/dist/Checkbox/index.mjs +9 -2
- package/dist/Chip/Chip.d.ts +1 -2
- package/dist/Chip/hooks/useChildComponent.d.ts +4 -3
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip-cjs.js +5 -4
- package/dist/Chip-es.js +5 -4
- package/dist/ChipDismissible-cjs.js +4 -4
- package/dist/ChipDismissible-es.js +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
- package/dist/Chips/index.cjs +2 -2
- package/dist/Chips/index.mjs +2 -2
- package/dist/Combobox/Combobox.d.ts +2 -1
- package/dist/Combobox/Combobox.types.d.ts +2 -2
- package/dist/Combobox/ComboboxProvider.d.ts +3 -3
- package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +2 -1
- package/dist/Combobox/hooks/useCombobox.d.ts +1 -1
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +2 -2
- package/dist/Combobox/hooks/useComboboxContent.d.ts +2 -1
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +1 -1
- package/dist/ComboboxActivator-cjs.js +2 -2
- package/dist/ComboboxActivator-es.js +3 -3
- package/dist/ComboboxTrigger-cjs.js +1 -1
- package/dist/ComboboxTrigger-es.js +2 -2
- package/dist/DataList/DataList.types.d.ts +2 -2
- package/dist/DataList/DataList.utils.d.ts +2 -2
- package/dist/DataList/components/DataListHeader/index.cjs +1 -0
- package/dist/DataList/components/DataListHeader/index.mjs +1 -0
- package/dist/DataList/components/DataListHeaderTile/components/DataListSortingOptions.d.ts +2 -2
- package/dist/DataList/components/DataListItem/DataListItemInternal.d.ts +2 -2
- package/dist/DataList/components/DataListItem/index.cjs +1 -0
- package/dist/DataList/components/DataListItem/index.mjs +1 -0
- package/dist/DataList/components/DataListItems/index.cjs +1 -0
- package/dist/DataList/components/DataListItems/index.mjs +1 -0
- package/dist/DataList/components/DataListLayout/index.cjs +1 -0
- package/dist/DataList/components/DataListLayout/index.mjs +1 -0
- package/dist/DataList/components/DataListSearch/index.cjs +2 -12
- package/dist/DataList/components/DataListSearch/index.mjs +2 -12
- package/dist/DataList/hooks/useGetItemActions.d.ts +1 -1
- package/dist/DataList/index.cjs +1 -8
- package/dist/DataList/index.mjs +1 -8
- package/dist/DataListActions-cjs.js +4 -2
- package/dist/DataListActions-es.js +4 -2
- package/dist/DataListItem-cjs.js +8 -7
- package/dist/DataListItem-es.js +9 -8
- package/dist/DataListSort-cjs.js +1 -1
- package/dist/DataListSort-es.js +2 -2
- package/dist/DataTable/SortIcon.d.ts +2 -1
- package/dist/DataTable/components/DataTableSortableHeader.d.ts +1 -1
- package/dist/DataTable/index.cjs +3 -2
- package/dist/DataTable/index.mjs +3 -2
- package/dist/DatePicker/DatePicker.d.ts +5 -1
- package/dist/DatePicker/index.cjs +2 -2
- package/dist/DatePicker/index.mjs +2 -2
- package/dist/DatePicker/useFocusOnSelectedDate.d.ts +1 -2
- package/dist/DatePicker-cjs.js +4 -2
- package/dist/DatePicker-es.js +5 -3
- package/dist/FormField/FormFieldAffix.d.ts +2 -2
- package/dist/FormField/FormFieldTypes.d.ts +3 -5
- package/dist/FormField/FormFieldWrapper.d.ts +5 -1
- package/dist/FormField/hooks/useFormFieldFocus.d.ts +1 -1
- package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +9 -4
- package/dist/FormField-cjs.js +35 -31
- package/dist/FormField-es.js +35 -31
- package/dist/InputDate/InputDate.types.d.ts +12 -7
- package/dist/InputDate/index.cjs +35 -12
- package/dist/InputDate/index.mjs +35 -12
- package/dist/InputDate/useInputDateActivatorActions.d.ts +4 -8
- package/dist/InputEmail/InputEmail.types.d.ts +10 -20
- package/dist/InputEmail/hooks/useInputEmailActions.d.ts +10 -4
- package/dist/InputEmail/index.cjs +43 -60
- package/dist/InputEmail/index.mjs +44 -61
- package/dist/InputFile-cjs.js +5 -2
- package/dist/InputFile-es.js +5 -2
- package/dist/InputGroup-cjs.js +5 -2
- package/dist/InputGroup-es.js +5 -2
- package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +7 -15
- package/dist/InputNumber/index.cjs +7 -5
- package/dist/InputNumber/index.mjs +7 -5
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +12 -28
- package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +9 -4
- package/dist/InputPhoneNumber/index.cjs +37 -36
- package/dist/InputPhoneNumber/index.mjs +38 -37
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/InputText.types.d.ts +30 -25
- package/dist/InputText/index.cjs +54 -62
- package/dist/InputText/index.mjs +55 -63
- package/dist/InputText/useInputTextActions.d.ts +11 -5
- package/dist/InputText/useTextAreaResize.d.ts +2 -2
- package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
- package/dist/InputTime/InputTime.types.d.ts +13 -4
- package/dist/InputTime/hooks/useInputTimeActions.d.ts +21 -0
- package/dist/InputTime/index.cjs +90 -30
- package/dist/InputTime/index.mjs +93 -33
- package/dist/InternalChipDismissible-cjs.js +3 -3
- package/dist/InternalChipDismissible-es.js +4 -4
- package/dist/List/index.cjs +2 -2
- package/dist/List/index.mjs +2 -2
- package/dist/Menu/Menu.d.ts +2 -4
- package/dist/Menu/Menu.types.d.ts +21 -5
- package/dist/Menu-cjs.js +9 -9
- package/dist/Menu-es.js +9 -9
- package/dist/Modal/Modal.types.d.ts +3 -3
- package/dist/Modal/ModalContext.rebuilt.d.ts +2 -2
- package/dist/MultiSelect/DropDownMenu.d.ts +1 -1
- package/dist/MultiSelect/index.cjs +1 -0
- package/dist/MultiSelect/index.mjs +1 -0
- package/dist/MultiSelect-cjs.js +13 -7
- package/dist/MultiSelect-es.js +13 -7
- package/dist/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/RadioGroup/RadioOption.d.ts +1 -1
- package/dist/RecurringSelect/index.cjs +3 -2
- package/dist/RecurringSelect/index.mjs +3 -2
- package/dist/Select/Select.types.d.ts +7 -3
- package/dist/Select/hooks/useSelectActions.d.ts +5 -5
- package/dist/Select/index.cjs +27 -42
- package/dist/Select/index.mjs +29 -44
- package/dist/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/Tabs/hooks/useTabsOverflow.d.ts +2 -2
- package/dist/Tabs-cjs.js +4 -2
- package/dist/Tabs-es.js +5 -3
- package/dist/Tooltip/useTooltipPositioning.d.ts +1 -1
- package/dist/_baseEach-cjs.js +12 -12
- package/dist/_baseEach-es.js +1 -1
- package/dist/_baseFlatten-cjs.js +2 -2
- package/dist/_baseFlatten-es.js +1 -1
- package/dist/{_baseGet-cjs.js → _getAllKeys-cjs.js} +181 -181
- package/dist/{_baseGet-es.js → _getAllKeys-es.js} +182 -182
- package/dist/debounce-es.js +1 -1
- package/dist/filterDataAttributes-cjs.js +26 -0
- package/dist/filterDataAttributes-es.js +24 -0
- package/dist/floating-ui.react-cjs.js +115 -0
- package/dist/floating-ui.react-es.js +115 -1
- package/dist/helpers-cjs.js +1 -1
- package/dist/helpers-es.js +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.mjs +3 -2
- package/dist/omit-cjs.js +14 -14
- package/dist/omit-es.js +1 -1
- package/dist/sharedHelpers/filterDataAttributes.d.ts +17 -0
- package/dist/sharedHelpers/types.d.ts +231 -0
- package/dist/showToast-cjs.js +2 -2
- package/dist/showToast-es.js +2 -2
- package/dist/styles.css +32 -23
- package/dist/useChildComponent-cjs.js +1 -1
- package/dist/useChildComponent-es.js +1 -1
- package/dist/useScrollToActive-cjs.js +3 -3
- package/dist/useScrollToActive-es.js +2 -2
- package/dist/utils/mergeRefs.d.ts +2 -2
- package/package.json +2 -2
- package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +0 -32
- package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +0 -71
- package/dist/InputText/useInputTextFormField.d.ts +0 -352
- package/dist/Select/hooks/useSelectFormField.d.ts +0 -34
package/dist/styles.css
CHANGED
|
@@ -99,11 +99,13 @@
|
|
|
99
99
|
padding: var(--space-small) 0 var(--space-smaller) var(--space-small);
|
|
100
100
|
border-bottom: 1px solid hsl(200, 13%, 87%);
|
|
101
101
|
border-bottom: var(--border-base) solid var(--color-border);
|
|
102
|
+
cursor: default;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
.Twgjn26oldE- {
|
|
105
106
|
padding: 8px 16px;
|
|
106
107
|
padding: var(--space-small) var(--space-base);
|
|
108
|
+
cursor: default;
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
.mc1-CEwZtHE- {
|
|
@@ -132,6 +134,7 @@
|
|
|
132
134
|
.vxk57ZhP8GU- {
|
|
133
135
|
padding: 8px 0 4px 8px;
|
|
134
136
|
padding: var(--space-small) 0 var(--space-smaller) var(--space-small);
|
|
137
|
+
cursor: default;
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
.j4h-0Mxa5gk- {
|
|
@@ -2427,6 +2430,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
2427
2430
|
|
|
2428
2431
|
display: block;
|
|
2429
2432
|
width: 100%;
|
|
2433
|
+
box-sizing: border-box;
|
|
2430
2434
|
border: 1px solid hsl(200, 13%, 87%);
|
|
2431
2435
|
border: var(--card--border);
|
|
2432
2436
|
border-radius: 8px;
|
|
@@ -2460,11 +2464,18 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
2460
2464
|
.Iilm5Uhxo50-::before {
|
|
2461
2465
|
content: " ";
|
|
2462
2466
|
display: block;
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2467
|
+
position: relative;
|
|
2468
|
+
top: 1px;
|
|
2469
|
+
top: var(--border-base);
|
|
2470
|
+
height: calc(0.375rem - 1px * 2);
|
|
2471
|
+
height: calc(0.375rem - var(--border-base) * 2);
|
|
2472
|
+
box-shadow: 0 0 0 1px var(--card--accent-color);
|
|
2473
|
+
box-shadow: 0 0 0 var(--border-base) var(--card--accent-color);
|
|
2474
|
+
margin: 0 0 calc(1px * 2);
|
|
2475
|
+
margin: 0 0 calc(var(--border-base) * 2);
|
|
2466
2476
|
border-radius: 8px 8px 0 0;
|
|
2467
2477
|
border-radius: var(--radius-base) var(--radius-base) 0 0;
|
|
2478
|
+
background-color: var(--card--accent-color);
|
|
2468
2479
|
}
|
|
2469
2480
|
|
|
2470
2481
|
.Vppn4k0fBsc- {
|
|
@@ -6393,10 +6404,9 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
6393
6404
|
-webkit-transform: translateY(0) scale(1);
|
|
6394
6405
|
transform: translateY(0) scale(1);
|
|
6395
6406
|
}
|
|
6396
|
-
.-hmXAsAfH9U- {
|
|
6397
6407
|
|
|
6398
6408
|
/* options */
|
|
6399
|
-
option {
|
|
6409
|
+
.-hmXAsAfH9U- option {
|
|
6400
6410
|
padding: 4px 0;
|
|
6401
6411
|
padding: var(--space-smaller) 0;
|
|
6402
6412
|
color: hsl(198, 35%, 21%);
|
|
@@ -6406,16 +6416,16 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
6406
6416
|
cursor: pointer;
|
|
6407
6417
|
}
|
|
6408
6418
|
|
|
6409
|
-
option:hover,
|
|
6410
|
-
option:focus,
|
|
6411
|
-
option:focus-visible,
|
|
6412
|
-
option:checked {
|
|
6419
|
+
.-hmXAsAfH9U- option:hover,
|
|
6420
|
+
.-hmXAsAfH9U- option:focus,
|
|
6421
|
+
.-hmXAsAfH9U- option:focus-visible,
|
|
6422
|
+
.-hmXAsAfH9U- option:checked {
|
|
6413
6423
|
background-color: hsl(53, 21%, 93%);
|
|
6414
6424
|
background-color: var(--color-surface--hover);
|
|
6415
6425
|
}
|
|
6416
6426
|
|
|
6417
6427
|
/* optgroup headers */
|
|
6418
|
-
optgroup {
|
|
6428
|
+
.-hmXAsAfH9U- optgroup {
|
|
6419
6429
|
padding: 8px 0 0 0;
|
|
6420
6430
|
padding: var(--space-small) 0 0 0;
|
|
6421
6431
|
color: hsl(197, 90%, 12%);
|
|
@@ -6430,36 +6440,35 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
6430
6440
|
}
|
|
6431
6441
|
|
|
6432
6442
|
/* Divider directly under the group label */
|
|
6433
|
-
optgroup option:first-child {
|
|
6443
|
+
.-hmXAsAfH9U- optgroup option:first-child {
|
|
6434
6444
|
border-top: 1px solid hsl(200, 13%, 87%);
|
|
6435
6445
|
border-top: var(--border-base) solid var(--color-border);
|
|
6436
6446
|
}
|
|
6437
6447
|
|
|
6438
6448
|
/* Disabled groups and their options */
|
|
6439
|
-
optgroup[disabled] {
|
|
6449
|
+
.-hmXAsAfH9U- optgroup[disabled] {
|
|
6440
6450
|
color: hsl(0, 0%, 58%);
|
|
6441
6451
|
color: var(--color-disabled);
|
|
6442
6452
|
}
|
|
6443
|
-
optgroup[disabled] option,
|
|
6444
|
-
option[disabled] {
|
|
6453
|
+
.-hmXAsAfH9U- optgroup[disabled] option,
|
|
6454
|
+
.-hmXAsAfH9U- option[disabled] {
|
|
6445
6455
|
color: hsl(0, 0%, 58%);
|
|
6446
6456
|
color: var(--color-disabled);
|
|
6447
6457
|
cursor: default;
|
|
6448
6458
|
}
|
|
6449
6459
|
|
|
6450
|
-
optgroup[disabled] option:focus,
|
|
6451
|
-
optgroup[disabled] option:focus-visible,
|
|
6452
|
-
optgroup[disabled] option:checked,
|
|
6453
|
-
optgroup[disabled] option:hover,
|
|
6454
|
-
option[disabled]:focus,
|
|
6455
|
-
option[disabled]:focus-visible,
|
|
6456
|
-
option[disabled]:checked,
|
|
6457
|
-
option[disabled]:hover {
|
|
6460
|
+
.-hmXAsAfH9U- optgroup[disabled] option:focus,
|
|
6461
|
+
.-hmXAsAfH9U- optgroup[disabled] option:focus-visible,
|
|
6462
|
+
.-hmXAsAfH9U- optgroup[disabled] option:checked,
|
|
6463
|
+
.-hmXAsAfH9U- optgroup[disabled] option:hover,
|
|
6464
|
+
.-hmXAsAfH9U- option[disabled]:focus,
|
|
6465
|
+
.-hmXAsAfH9U- option[disabled]:focus-visible,
|
|
6466
|
+
.-hmXAsAfH9U- option[disabled]:checked,
|
|
6467
|
+
.-hmXAsAfH9U- option[disabled]:hover {
|
|
6458
6468
|
background-color: transparent;
|
|
6459
6469
|
}
|
|
6460
6470
|
|
|
6461
6471
|
/* Animate the chevron rotation for the provided postfix class */
|
|
6462
|
-
}
|
|
6463
6472
|
.-hmXAsAfH9U- + ._5ST4c1fXDYU- svg {
|
|
6464
6473
|
transition: -webkit-transform 100ms;
|
|
6465
6474
|
transition: -webkit-transform var(--timing-quick);
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns the first React Child that receives `true` from isCorrectComponent
|
|
7
7
|
* @param children React Children
|
|
8
|
-
* @param isCorrectComponent a function that accepts a
|
|
8
|
+
* @param isCorrectComponent a function that accepts a ReactElement and returns a boolean.
|
|
9
9
|
* @returns The first child component that returns true on isCorrectComponent
|
|
10
10
|
*/
|
|
11
11
|
function useChildComponent(children, isCorrectComponent) {
|
|
@@ -3,7 +3,7 @@ import React__default, { useMemo, isValidElement } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns the first React Child that receives `true` from isCorrectComponent
|
|
5
5
|
* @param children React Children
|
|
6
|
-
* @param isCorrectComponent a function that accepts a
|
|
6
|
+
* @param isCorrectComponent a function that accepts a ReactElement and returns a boolean.
|
|
7
7
|
* @returns The first child component that returns true on isCorrectComponent
|
|
8
8
|
*/
|
|
9
9
|
function useChildComponent(children, isCorrectComponent) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var _commonjsHelpers = require('./_commonjsHelpers-cjs.js');
|
|
5
5
|
var _baseFlatten = require('./_baseFlatten-cjs.js');
|
|
6
|
-
var
|
|
6
|
+
var _getAllKeys = require('./_getAllKeys-cjs.js');
|
|
7
7
|
var _baseEach = require('./_baseEach-cjs.js');
|
|
8
8
|
var isTypedArray = require('./isTypedArray-cjs.js');
|
|
9
9
|
var isSymbol$1 = require('./isSymbol-cjs.js');
|
|
@@ -148,8 +148,8 @@ function compareMultiple$1(object, other, orders) {
|
|
|
148
148
|
|
|
149
149
|
var _compareMultiple = compareMultiple$1;
|
|
150
150
|
|
|
151
|
-
var arrayMap =
|
|
152
|
-
baseGet =
|
|
151
|
+
var arrayMap = _getAllKeys._arrayMap,
|
|
152
|
+
baseGet = _getAllKeys._baseGet,
|
|
153
153
|
baseIteratee = _baseEach._baseIteratee,
|
|
154
154
|
baseMap = _baseMap,
|
|
155
155
|
baseSortBy = _baseSortBy,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React__default, { useState, useId, useEffect, useRef } from 'react';
|
|
2
2
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
|
|
3
3
|
import { _ as _baseFlatten } from './_baseFlatten-es.js';
|
|
4
|
-
import { a as _arrayMap, b as _baseGet } from './
|
|
4
|
+
import { a as _arrayMap, b as _baseGet } from './_getAllKeys-es.js';
|
|
5
5
|
import { _ as _baseEach, a as _baseIteratee } from './_baseEach-es.js';
|
|
6
6
|
import { b as isArrayLike_1, k as _baseUnary, a as isArray_1 } from './isTypedArray-es.js';
|
|
7
7
|
import { i as isSymbol_1 } from './isSymbol-es.js';
|
|
8
8
|
import { i as identity_1 } from './identity-es.js';
|
|
9
9
|
import { _ as _baseRest, a as _isIterateeCall } from './_isIterateeCall-es.js';
|
|
10
10
|
import { useLiveAnnounce } from '@jobber/hooks';
|
|
11
|
-
import {
|
|
11
|
+
import { a as debounce } from './debounce-es.js';
|
|
12
12
|
import { I as Icon } from './Icon-es.js';
|
|
13
13
|
import { u as useFloating, o as offset, f as flip, c as size, b as autoUpdate } from './floating-ui.react-es.js';
|
|
14
14
|
import { c as calculateMaxHeight } from './maxHeight-es.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LegacyRef,
|
|
1
|
+
import type { LegacyRef, RefCallback, RefObject } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Given an array of refs, merge them into a single ref callback.
|
|
4
4
|
* This is useful for cases where you need to pass a multiple refs to a component.
|
|
5
5
|
*/
|
|
6
|
-
export declare function mergeRefs<T = unknown>(refs: Array<
|
|
6
|
+
export declare function mergeRefs<T = unknown>(refs: Array<RefObject<T> | LegacyRef<T> | undefined | null>): RefCallback<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.101.
|
|
3
|
+
"version": "6.101.5-JOB-140604-4487daa.55+4487daa56",
|
|
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": "4487daa56640c85a2198bde0b6296c4a290f623a"
|
|
542
542
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from "react";
|
|
2
|
-
export interface UseInputEmailFormFieldProps {
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly name: string;
|
|
5
|
-
readonly disabled?: boolean;
|
|
6
|
-
readonly autofocus?: boolean;
|
|
7
|
-
readonly error?: string;
|
|
8
|
-
readonly inline?: boolean;
|
|
9
|
-
readonly description?: ReactNode;
|
|
10
|
-
readonly invalid?: boolean;
|
|
11
|
-
readonly value?: string;
|
|
12
|
-
readonly handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
-
readonly handleBlur: (event?: FocusEvent<HTMLInputElement>) => void;
|
|
14
|
-
readonly handleFocus: (event: FocusEvent<HTMLInputElement>) => void;
|
|
15
|
-
readonly handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
16
|
-
}
|
|
17
|
-
export interface UseInputEmailFormFieldReturn {
|
|
18
|
-
readonly fieldProps: {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly name: string;
|
|
21
|
-
readonly disabled?: boolean;
|
|
22
|
-
readonly autofocus?: boolean;
|
|
23
|
-
readonly onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
-
readonly onBlur: (event?: FocusEvent<HTMLInputElement>) => void;
|
|
25
|
-
readonly onFocus: (event: FocusEvent<HTMLInputElement>) => void;
|
|
26
|
-
readonly onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
27
|
-
readonly value?: string;
|
|
28
|
-
readonly "aria-describedby"?: string;
|
|
29
|
-
};
|
|
30
|
-
readonly descriptionIdentifier: string;
|
|
31
|
-
}
|
|
32
|
-
export declare function useInputEmailFormField({ id, name, disabled, autofocus, description, inline, value, handleChange, handleBlur, handleFocus, handleKeyDown, error, ...rest }: UseInputEmailFormFieldProps): UseInputEmailFormFieldReturn;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { ChangeEvent, FocusEvent, KeyboardEvent, ReactNode } from "react";
|
|
2
|
-
export interface useInputPhoneFormFieldProps {
|
|
3
|
-
/**
|
|
4
|
-
* The html id for the field
|
|
5
|
-
*/
|
|
6
|
-
readonly id: string;
|
|
7
|
-
/**
|
|
8
|
-
* The auto-generated name for the html input field if a nameProp is not provided
|
|
9
|
-
*/
|
|
10
|
-
readonly name: string;
|
|
11
|
-
/**
|
|
12
|
-
* The error message for the field
|
|
13
|
-
*/
|
|
14
|
-
readonly error?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Adjusts the form field to go inline with a content. This also silences the
|
|
17
|
-
* given `validations` prop. You'd have to used the `onValidate` prop to
|
|
18
|
-
* capture the message and render it somewhere else using the
|
|
19
|
-
* `InputValidation` component.
|
|
20
|
-
*/
|
|
21
|
-
readonly inline?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Further description of the input, can be used for a hint.
|
|
24
|
-
*/
|
|
25
|
-
readonly description?: ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
* Callback for when the field value changes
|
|
28
|
-
*/
|
|
29
|
-
handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
30
|
-
/**
|
|
31
|
-
* Callback for when the field loses focus
|
|
32
|
-
*/
|
|
33
|
-
handleBlur: () => void;
|
|
34
|
-
/**
|
|
35
|
-
* Callback for when the field gains focus
|
|
36
|
-
*/
|
|
37
|
-
handleFocus: (event: FocusEvent<HTMLInputElement>) => void;
|
|
38
|
-
/**
|
|
39
|
-
* Callback for when keydown event is triggered on the field
|
|
40
|
-
*/
|
|
41
|
-
handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
42
|
-
readonly invalid?: boolean;
|
|
43
|
-
readonly disabled?: boolean;
|
|
44
|
-
readonly autofocus?: boolean;
|
|
45
|
-
readonly value?: string;
|
|
46
|
-
readonly readonly?: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface UseInputPhoneFormFieldReturn {
|
|
49
|
-
fieldProps: React.InputHTMLAttributes<HTMLInputElement>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Provides the props for the html fields rendered by the html input.
|
|
53
|
-
* DO not repeat this pattern. We are doing this as a proof of concept relating to the refactoring of Form inputs to see what can be removed.
|
|
54
|
-
*/
|
|
55
|
-
export declare function useInputPhoneFormField({ id, name, description, inline, handleChange, handleBlur, handleFocus, handleKeyDown, error, disabled, autofocus, value, readonly, ...rest }: useInputPhoneFormFieldProps): {
|
|
56
|
-
fieldProps: {
|
|
57
|
-
readOnly: boolean | undefined;
|
|
58
|
-
"aria-describedby"?: string | undefined;
|
|
59
|
-
id: string;
|
|
60
|
-
name: string;
|
|
61
|
-
disabled: boolean | undefined;
|
|
62
|
-
autoFocus: boolean | undefined;
|
|
63
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
64
|
-
onBlur: () => void;
|
|
65
|
-
onFocus: (event: FocusEvent<HTMLInputElement>) => void;
|
|
66
|
-
onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
67
|
-
value: string | undefined;
|
|
68
|
-
invalid: string | undefined;
|
|
69
|
-
};
|
|
70
|
-
descriptionIdentifier: string;
|
|
71
|
-
};
|