@jobber/components 2.86.0 → 2.86.1
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/CHANGELOG.md +8 -0
- package/dist/Autocomplete/Autocomplete.d.ts +47 -47
- package/dist/Autocomplete/Menu.d.ts +9 -9
- package/dist/Autocomplete/Option.d.ts +15 -15
- package/dist/Autocomplete/index.d.ts +2 -2
- package/dist/Autocomplete/index.js +215 -211
- package/dist/Avatar/Avatar.d.ts +37 -37
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +7 -74
- package/dist/Avatar/utilities.d.ts +1 -1
- package/dist/Avatar-cfd04e86.js +82 -0
- package/dist/Banner/Banner.d.ts +19 -19
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +67 -65
- package/dist/Button/Button.d.ts +64 -64
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +9 -53
- package/dist/Button-5b2f1636.js +60 -0
- package/dist/ButtonDismiss/ButtonDismiss.d.ts +7 -7
- package/dist/ButtonDismiss/index.d.ts +1 -1
- package/dist/ButtonDismiss/index.js +10 -15
- package/dist/ButtonDismiss-4cde8f7c.js +15 -0
- package/dist/Card/Card.d.ts +31 -31
- package/dist/Card/CardClickable.d.ts +12 -12
- package/dist/Card/index.d.ts +1 -1
- package/dist/Card/index.js +7 -61
- package/dist/Card-368e01a3.js +68 -0
- package/dist/Checkbox/Checkbox.d.ts +52 -52
- package/dist/Checkbox/index.d.ts +1 -1
- package/dist/Checkbox/index.js +34 -32
- package/dist/Chips/Chip.d.ts +8 -8
- package/dist/Chips/ChipDismissible.d.ts +7 -7
- package/dist/Chips/ChipTypes.d.ts +59 -59
- package/dist/Chips/Chips.d.ts +2 -2
- package/dist/Chips/ChipsTypes.d.ts +82 -82
- package/dist/Chips/InternalChip.d.ts +2 -2
- package/dist/Chips/InternalChipAffix.d.ts +10 -10
- package/dist/Chips/InternalChipButton.d.ts +10 -10
- package/dist/Chips/InternalChipDismissible/InternalChipDismissible.d.ts +2 -2
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleInput.d.ts +2 -2
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleTypes.d.ts +13 -13
- package/dist/Chips/InternalChipDismissible/hooks/index.d.ts +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissible.d.ts +15 -15
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +28 -28
- package/dist/Chips/InternalChipDismissible/hooks/useRepositionMenu.d.ts +16 -16
- package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +2 -2
- package/dist/Chips/InternalChipDismissible/index.d.ts +1 -1
- package/dist/Chips/InternalChipMultiSelect.d.ts +4 -4
- package/dist/Chips/InternalChipSingleSelect.d.ts +4 -4
- package/dist/Chips/index.d.ts +3 -3
- package/dist/Chips/index.js +493 -491
- package/dist/Chips/utils/mdxUtils.d.ts +9 -9
- package/dist/ConfirmationModal/ConfirmationModal.d.ts +62 -62
- package/dist/ConfirmationModal/index.d.ts +1 -1
- package/dist/ConfirmationModal/index.js +20 -109
- package/dist/ConfirmationModal-b7ef110f.js +103 -0
- package/dist/Content/Content.d.ts +13 -13
- package/dist/Content/index.d.ts +1 -1
- package/dist/Content/index.js +5 -19
- package/dist/Content-18de5fbb.js +26 -0
- package/dist/Countdown/Countdown.d.ts +31 -31
- package/dist/Countdown/computeTimeUnit.d.ts +3 -3
- package/dist/Countdown/index.d.ts +1 -1
- package/dist/Countdown/index.js +63 -61
- package/dist/DataDump/DataDump.d.ts +20 -20
- package/dist/DataDump/index.d.ts +1 -1
- package/dist/DataDump/index.js +18 -17
- package/dist/DatePicker/DatePicker.d.ts +50 -50
- package/dist/DatePicker/DatePickerActivator.d.ts +12 -12
- package/dist/DatePicker/DatePickerCustomHeader.d.ts +2 -2
- package/dist/DatePicker/index.d.ts +1 -1
- package/dist/DatePicker/index.js +13 -97
- package/dist/DatePicker/useFocusOnSelectedDate.d.ts +5 -5
- package/dist/DatePicker-ad6f8630.js +103 -0
- package/dist/DescriptionList/DescriptionList.d.ts +10 -10
- package/dist/DescriptionList/index.d.ts +1 -1
- package/dist/DescriptionList/index.js +16 -15
- package/dist/Disclosure/Disclosure.d.ts +20 -20
- package/dist/Disclosure/index.d.ts +1 -1
- package/dist/Disclosure/index.js +32 -31
- package/dist/Divider/Divider.d.ts +16 -16
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +19 -17
- package/dist/Drawer/Drawer.d.ts +13 -13
- package/dist/Drawer/DrawerGrid.d.ts +6 -6
- package/dist/Drawer/index.d.ts +2 -2
- package/dist/Drawer/index.js +39 -37
- package/dist/Emphasis/Emphasis.d.ts +11 -11
- package/dist/Emphasis/index.d.ts +1 -1
- package/dist/Emphasis/index.js +7 -17
- package/dist/Emphasis-fd845639.js +21 -0
- package/dist/FeatureSwitch/FeatureSwitch.d.ts +51 -51
- package/dist/FeatureSwitch/index.d.ts +1 -1
- package/dist/FeatureSwitch/index.js +57 -55
- package/dist/Form/Form.d.ts +18 -18
- package/dist/Form/index.d.ts +1 -1
- package/dist/Form/index.js +58 -57
- package/dist/FormField/FormField.d.ts +2 -2
- package/dist/FormField/FormFieldAffix.d.ts +13 -13
- package/dist/FormField/FormFieldDescription.d.ts +6 -6
- package/dist/FormField/FormFieldPostFix.d.ts +5 -5
- package/dist/FormField/FormFieldTypes.d.ts +160 -160
- package/dist/FormField/FormFieldWrapper.d.ts +9 -9
- package/dist/FormField/index.d.ts +2 -2
- package/dist/FormField/index.js +15 -208
- package/dist/FormField-a92c7bac.js +213 -0
- package/dist/FormatDate/FormatDate.d.ts +12 -12
- package/dist/FormatDate/index.d.ts +1 -1
- package/dist/FormatDate/index.js +24 -23
- package/dist/FormatEmail/FormatEmail.d.ts +8 -8
- package/dist/FormatEmail/index.d.ts +1 -1
- package/dist/FormatEmail/index.js +12 -10
- package/dist/FormatFile/FormatFile.d.ts +30 -30
- package/dist/FormatFile/FormatFileDeleteButton.d.ts +6 -6
- package/dist/FormatFile/InternalThumbnail.d.ts +9 -9
- package/dist/FormatFile/index.d.ts +1 -1
- package/dist/FormatFile/index.js +21 -112
- package/dist/FormatFile-5391d4cf.js +112 -0
- package/dist/FormatRelativeDateTime/FormatRelativeDateTime.d.ts +11 -11
- package/dist/FormatRelativeDateTime/index.d.ts +1 -1
- package/dist/FormatRelativeDateTime/index.js +64 -63
- package/dist/FormatTime/FormatTime.d.ts +15 -15
- package/dist/FormatTime/index.d.ts +1 -1
- package/dist/FormatTime/index.js +28 -27
- package/dist/Gallery/Gallery.d.ts +2 -2
- package/dist/Gallery/GalleryTypes.d.ts +31 -31
- package/dist/Gallery/index.d.ts +1 -1
- package/dist/Gallery/index.js +82 -80
- package/dist/Heading/Heading.d.ts +14 -14
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +7 -53
- package/dist/Heading-56750113.js +57 -0
- package/dist/Icon/Icon.d.ts +22 -22
- package/dist/Icon/index.d.ts +1 -1
- package/dist/Icon/index.js +4 -35
- package/dist/Icon-d5ad1a6d.js +41 -0
- package/dist/InlineLabel/InlineLabel.d.ts +17 -17
- package/dist/InlineLabel/index.d.ts +1 -1
- package/dist/InlineLabel/index.js +20 -18
- package/dist/InputAvatar/InputAvatar.d.ts +22 -22
- package/dist/InputAvatar/index.d.ts +1 -1
- package/dist/InputAvatar/index.js +57 -56
- package/dist/InputDate/InputDate.d.ts +19 -19
- package/dist/InputDate/index.d.ts +1 -1
- package/dist/InputDate/index.js +34 -33
- package/dist/InputEmail/InputEmail.d.ts +5 -5
- package/dist/InputEmail/index.d.ts +1 -1
- package/dist/InputEmail/index.js +29 -28
- package/dist/InputFile/InputFile.d.ts +121 -121
- package/dist/InputFile/index.d.ts +1 -1
- package/dist/InputFile/index.js +15 -168
- package/dist/InputFile-b5cf90c3.js +174 -0
- package/dist/InputGroup/InputGroup.d.ts +11 -11
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +24 -22
- package/dist/InputNumber/InputNumber.d.ts +11 -11
- package/dist/InputNumber/index.d.ts +1 -1
- package/dist/InputNumber/index.js +52 -51
- package/dist/InputPassword/InputPassword.d.ts +12 -12
- package/dist/InputPassword/index.d.ts +1 -1
- package/dist/InputPassword/index.js +28 -27
- package/dist/InputText/InputText.d.ts +29 -29
- package/dist/InputText/index.d.ts +1 -1
- package/dist/InputText/index.js +15 -95
- package/dist/InputText-cb3be15c.js +91 -0
- package/dist/InputTime/InputTime.d.ts +2 -2
- package/dist/InputTime/InputTimeProps.d.ts +18 -18
- package/dist/InputTime/InputTimeSafari.d.ts +2 -2
- package/dist/InputTime/civilTimeConversions.d.ts +3 -3
- package/dist/InputTime/index.d.ts +1 -1
- package/dist/InputTime/index.js +402 -257
- package/dist/InputValidation/InputValidation.d.ts +8 -8
- package/dist/InputValidation/index.d.ts +1 -1
- package/dist/InputValidation/index.js +8 -24
- package/dist/InputValidation-24d3621a.js +28 -0
- package/dist/LightBox/LightBox.d.ts +37 -37
- package/dist/LightBox/index.d.ts +1 -1
- package/dist/LightBox/index.js +6 -34
- package/dist/LightBox-b893b656.js +42 -0
- package/dist/List/List.d.ts +11 -11
- package/dist/List/ListItem.d.ts +54 -54
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +76 -74
- package/dist/Markdown/Markdown.d.ts +17 -17
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +12 -64
- package/dist/Markdown-69986c49.js +68 -0
- package/dist/Menu/Menu.d.ts +46 -46
- package/dist/Menu/index.d.ts +1 -1
- package/dist/Menu/index.js +13 -128
- package/dist/Menu-6a392af6.js +134 -0
- package/dist/Modal/Modal.d.ts +22 -22
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Modal/index.js +14 -127
- package/dist/Modal/useFocusTrap.d.ts +10 -10
- package/dist/Modal-aaaaf2df.js +132 -0
- package/dist/Page/Page.d.ts +59 -59
- package/dist/Page/index.d.ts +1 -1
- package/dist/Page/index.js +63 -61
- package/dist/Popover/Popover.d.ts +26 -26
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +49 -48
- package/dist/ProgressBar/ProgressBar.d.ts +18 -18
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +5 -22
- package/dist/ProgressBar-e9a49129.js +29 -0
- package/dist/RadioGroup/RadioGroup.d.ts +27 -27
- package/dist/RadioGroup/RadioOption.d.ts +34 -34
- package/dist/RadioGroup/index.d.ts +2 -2
- package/dist/RadioGroup/index.js +38 -37
- package/dist/RecurringSelect/CurrentRecurrenceComponent.d.ts +8 -8
- package/dist/RecurringSelect/RecurringSelect.d.ts +8 -8
- package/dist/RecurringSelect/components/DayOfMonthSelect.d.ts +8 -8
- package/dist/RecurringSelect/components/MonthlyDayOfWeekSelect.d.ts +8 -8
- package/dist/RecurringSelect/components/MonthlySelect.d.ts +8 -8
- package/dist/RecurringSelect/components/WeeklySelect.d.ts +8 -8
- package/dist/RecurringSelect/components/index.d.ts +4 -4
- package/dist/RecurringSelect/index.d.ts +2 -2
- package/dist/RecurringSelect/types.d.ts +65 -65
- package/dist/Select/Option.d.ts +17 -17
- package/dist/Select/Select.d.ts +10 -10
- package/dist/Select/index.d.ts +2 -2
- package/dist/Select/index.js +20 -19
- package/dist/Spinner/Spinner.d.ts +15 -15
- package/dist/Spinner/index.d.ts +1 -1
- package/dist/Spinner/index.js +5 -19
- package/dist/Spinner-18d3dee6.js +26 -0
- package/dist/StatusLabel/StatusLabel.d.ts +25 -25
- package/dist/StatusLabel/index.d.ts +1 -1
- package/dist/StatusLabel/index.js +21 -19
- package/dist/Switch/Switch.d.ts +14 -14
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +7 -53
- package/dist/Switch-d2bec677.js +60 -0
- package/dist/Table/Body.d.ts +6 -6
- package/dist/Table/Cells/Cell.d.ts +7 -7
- package/dist/Table/Cells/CellCurrency.d.ts +8 -8
- package/dist/Table/Cells/CellNumeric.d.ts +4 -4
- package/dist/Table/Footer.d.ts +6 -6
- package/dist/Table/Header.d.ts +6 -6
- package/dist/Table/Row.d.ts +6 -6
- package/dist/Table/Table.d.ts +6 -6
- package/dist/Table/index.d.ts +8 -8
- package/dist/Table/index.js +41 -39
- package/dist/Tabs/Tabs.d.ts +19 -19
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tabs/index.js +69 -67
- package/dist/Text/Text.d.ts +9 -9
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +7 -29
- package/dist/Text-9bc093e9.js +32 -0
- package/dist/Toast/Toast.d.ts +17 -17
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +93 -93
- package/dist/Toast/showToast.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +10 -10
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +11 -110
- package/dist/Tooltip/useTooltipPositioning.d.ts +18 -18
- package/dist/Tooltip-4396164d.js +116 -0
- package/dist/Typography/Typography.d.ts +38 -38
- package/dist/Typography/index.d.ts +1 -1
- package/dist/Typography/index.js +6 -57
- package/dist/Typography-7e542a72.js +64 -0
- package/dist/{chunk-17e02351.js → style-inject.es-dcee06b6.js} +0 -0
- package/dist/{chunk-b67af3cb.js → tslib.es6-5b50eb8e.js} +0 -0
- package/package.json +5 -7
- package/rollup.config.js +28 -3
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { XOR } from "ts-xor";
|
|
3
|
-
interface BaseCheckboxProps {
|
|
4
|
-
/**
|
|
5
|
-
* Determines if the checkbox is checked or not.
|
|
6
|
-
*/
|
|
7
|
-
readonly checked?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Initial checked value of the checkbox. Only use this when you need to
|
|
10
|
-
* pre-populate the checked attribute that is not controlled by the component's
|
|
11
|
-
* state. If a state is controlling it, use the `checked` prop instead.
|
|
12
|
-
*/
|
|
13
|
-
readonly defaultChecked?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Disables the checkbox.
|
|
16
|
-
*/
|
|
17
|
-
readonly disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* When `true` the checkbox to appears in indeterminate.
|
|
20
|
-
*
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
|
-
readonly indeterminate?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Checkbox input name
|
|
26
|
-
*/
|
|
27
|
-
readonly name?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Value of the checkbox.
|
|
30
|
-
*/
|
|
31
|
-
readonly value?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Further description of the label
|
|
34
|
-
*/
|
|
35
|
-
readonly description?: string;
|
|
36
|
-
onChange?(newValue: boolean): void;
|
|
37
|
-
}
|
|
38
|
-
interface CheckboxLabelProps extends BaseCheckboxProps {
|
|
39
|
-
/**
|
|
40
|
-
* Label that shows up beside the checkbox.
|
|
41
|
-
*/
|
|
42
|
-
readonly label?: string;
|
|
43
|
-
}
|
|
44
|
-
interface CheckboxChildrenProps extends BaseCheckboxProps {
|
|
45
|
-
/**
|
|
46
|
-
* Component children, which shows up as a label
|
|
47
|
-
*/
|
|
48
|
-
readonly children?: ReactElement;
|
|
49
|
-
}
|
|
50
|
-
declare type CheckboxProps = XOR<CheckboxLabelProps, CheckboxChildrenProps>;
|
|
51
|
-
export declare function Checkbox({ checked, defaultChecked, disabled, label, name, value, indeterminate, description, children, onChange, }: CheckboxProps): JSX.Element;
|
|
52
|
-
export {};
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { XOR } from "ts-xor";
|
|
3
|
+
interface BaseCheckboxProps {
|
|
4
|
+
/**
|
|
5
|
+
* Determines if the checkbox is checked or not.
|
|
6
|
+
*/
|
|
7
|
+
readonly checked?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Initial checked value of the checkbox. Only use this when you need to
|
|
10
|
+
* pre-populate the checked attribute that is not controlled by the component's
|
|
11
|
+
* state. If a state is controlling it, use the `checked` prop instead.
|
|
12
|
+
*/
|
|
13
|
+
readonly defaultChecked?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Disables the checkbox.
|
|
16
|
+
*/
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When `true` the checkbox to appears in indeterminate.
|
|
20
|
+
*
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
readonly indeterminate?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Checkbox input name
|
|
26
|
+
*/
|
|
27
|
+
readonly name?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Value of the checkbox.
|
|
30
|
+
*/
|
|
31
|
+
readonly value?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Further description of the label
|
|
34
|
+
*/
|
|
35
|
+
readonly description?: string;
|
|
36
|
+
onChange?(newValue: boolean): void;
|
|
37
|
+
}
|
|
38
|
+
interface CheckboxLabelProps extends BaseCheckboxProps {
|
|
39
|
+
/**
|
|
40
|
+
* Label that shows up beside the checkbox.
|
|
41
|
+
*/
|
|
42
|
+
readonly label?: string;
|
|
43
|
+
}
|
|
44
|
+
interface CheckboxChildrenProps extends BaseCheckboxProps {
|
|
45
|
+
/**
|
|
46
|
+
* Component children, which shows up as a label
|
|
47
|
+
*/
|
|
48
|
+
readonly children?: ReactElement;
|
|
49
|
+
}
|
|
50
|
+
declare type CheckboxProps = XOR<CheckboxLabelProps, CheckboxChildrenProps>;
|
|
51
|
+
export declare function Checkbox({ checked, defaultChecked, disabled, label, name, value, indeterminate, description, children, onChange, }: CheckboxProps): JSX.Element;
|
|
52
|
+
export {};
|
package/dist/Checkbox/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Checkbox } from "./Checkbox";
|
|
1
|
+
export { Checkbox } from "./Checkbox";
|
package/dist/Checkbox/index.js
CHANGED
|
@@ -2,44 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
-
|
|
7
|
-
require('../chunk-b67af3cb.js');
|
|
8
5
|
var React = require('react');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
require('../
|
|
13
|
-
var index$1 = require('../Text/index.js');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var styleInject_es = require('../style-inject.es-dcee06b6.js');
|
|
8
|
+
var Icon = require('../Icon-d5ad1a6d.js');
|
|
9
|
+
var Text = require('../Text-9bc093e9.js');
|
|
14
10
|
require('@jobber/design');
|
|
15
|
-
|
|
11
|
+
require('../Typography-7e542a72.js');
|
|
12
|
+
require('../tslib.es6-5b50eb8e.js');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
16
18
|
|
|
17
19
|
var css = "._2y-hp0B8BHvB6C7hj0uluY {\n display: inline-block;\n}\n\n._36KUbFCcSPE7xHQsQ4PC2D {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n}\n\n.Kvt2p9_Z8Ln_jkPQEYuMI {\n cursor: not-allowed;\n}\n\n._3MnEDfs7rk_9yjl2XNHSuc {\n position: relative;\n}\n\n.MEL3ANaAvLYMAoMbYSmCb {\n /* Hide checkbox on UI but not screen readers and still allow focus state */\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(100%);\n clip-path: inset(100%);\n white-space: nowrap;\n}\n\n._1T-pYuzX7l9EyzvIri_U22 {\n display: -ms-flexbox;\n display: flex;\n width: var(--space-base);\n height: var(--space-base);\n box-sizing: border-box;\n border: var(--border-thick) solid var(--color-interactive);\n border-radius: var(--radius-base);\n background-color: var(--color-surface);\n transition: all 200ms;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.Kvt2p9_Z8Ln_jkPQEYuMI ._1T-pYuzX7l9EyzvIri_U22 {\n border-color: var(--color-disabled--secondary);\n}\n\n.Kvt2p9_Z8Ln_jkPQEYuMI p {\n color: var(--color-disabled);\n}\n\n.Kvt2p9_Z8Ln_jkPQEYuMI ._1T-pYuzX7l9EyzvIri_U22 > * {\n opacity: 0;\n}\n\n.MEL3ANaAvLYMAoMbYSmCb._3TAyEYP42fVPKOg97qm5Ue + ._1T-pYuzX7l9EyzvIri_U22,\n.MEL3ANaAvLYMAoMbYSmCb:checked + ._1T-pYuzX7l9EyzvIri_U22 {\n border-color: var(--color-interactive);\n background-color: var(--color-interactive);\n}\n\n.MEL3ANaAvLYMAoMbYSmCb:focus + ._1T-pYuzX7l9EyzvIri_U22 {\n box-shadow: var(--shadow-focus);\n}\n\n.Kvt2p9_Z8Ln_jkPQEYuMI .MEL3ANaAvLYMAoMbYSmCb._3TAyEYP42fVPKOg97qm5Ue + ._1T-pYuzX7l9EyzvIri_U22,\n.Kvt2p9_Z8Ln_jkPQEYuMI .MEL3ANaAvLYMAoMbYSmCb:checked + ._1T-pYuzX7l9EyzvIri_U22 {\n border-color: var(--color-disabled--secondary);\n background-color: var(--color-disabled--secondary);\n}\n\n.Kvt2p9_Z8Ln_jkPQEYuMI .MEL3ANaAvLYMAoMbYSmCb._3TAyEYP42fVPKOg97qm5Ue + ._1T-pYuzX7l9EyzvIri_U22 > *,\n.Kvt2p9_Z8Ln_jkPQEYuMI .MEL3ANaAvLYMAoMbYSmCb:checked + ._1T-pYuzX7l9EyzvIri_U22 > * {\n opacity: 1;\n}\n\n.C10gHWu17R4Nw-PFWmtvT {\n margin: 0 var(--space-small);\n}\n\n._1wsib2K8k6XRKTFbeIeq4n {\n margin-bottom: var(--space-small);\n padding-left: var(--space-large);\n}\n";
|
|
18
20
|
var styles = {"checkbox":"_2y-hp0B8BHvB6C7hj0uluY","wrapper":"_36KUbFCcSPE7xHQsQ4PC2D","disabled":"Kvt2p9_Z8Ln_jkPQEYuMI","checkHolder":"_3MnEDfs7rk_9yjl2XNHSuc","input":"MEL3ANaAvLYMAoMbYSmCb","checkBox":"_1T-pYuzX7l9EyzvIri_U22","indeterminate":"_3TAyEYP42fVPKOg97qm5Ue","label":"C10gHWu17R4Nw-PFWmtvT","description":"_1wsib2K8k6XRKTFbeIeq4n"};
|
|
19
|
-
|
|
21
|
+
styleInject_es.styleInject(css);
|
|
20
22
|
|
|
21
|
-
function Checkbox(_a) {
|
|
22
|
-
var _b;
|
|
23
|
-
var checked = _a.checked, defaultChecked = _a.defaultChecked, disabled = _a.disabled, label = _a.label, name = _a.name, value = _a.value, _c = _a.indeterminate, indeterminate = _c === void 0 ? false : _c, description = _a.description, children = _a.children, onChange = _a.onChange;
|
|
24
|
-
var wrapperClassName =
|
|
25
|
-
var inputClassName =
|
|
26
|
-
_b[styles.indeterminate] = indeterminate,
|
|
27
|
-
_b));
|
|
28
|
-
var iconName = indeterminate ? "minus2" : "checkmark";
|
|
29
|
-
var labelText = label ? React__default.createElement(
|
|
30
|
-
return (React__default.createElement("div", { className: styles.checkbox },
|
|
31
|
-
React__default.createElement("label", { className: wrapperClassName },
|
|
32
|
-
React__default.createElement("span", { className: styles.checkHolder },
|
|
33
|
-
React__default.createElement("input", { type: "checkbox", checked: checked, defaultChecked: defaultChecked, className: inputClassName, "aria-label": label, onChange: handleChange, value: value, name: name, disabled: disabled }),
|
|
34
|
-
React__default.createElement("span", { className: styles.checkBox },
|
|
35
|
-
React__default.createElement(
|
|
36
|
-
labelText && React__default.createElement("span", { className: styles.label }, labelText)),
|
|
37
|
-
description && (React__default.createElement("div", { className: styles.description },
|
|
38
|
-
React__default.createElement(
|
|
39
|
-
function handleChange(event) {
|
|
40
|
-
var newChecked = event.currentTarget.checked;
|
|
41
|
-
onChange && onChange(newChecked);
|
|
42
|
-
}
|
|
23
|
+
function Checkbox(_a) {
|
|
24
|
+
var _b;
|
|
25
|
+
var checked = _a.checked, defaultChecked = _a.defaultChecked, disabled = _a.disabled, label = _a.label, name = _a.name, value = _a.value, _c = _a.indeterminate, indeterminate = _c === void 0 ? false : _c, description = _a.description, children = _a.children, onChange = _a.onChange;
|
|
26
|
+
var wrapperClassName = classnames__default["default"](styles.wrapper, disabled && styles.disabled);
|
|
27
|
+
var inputClassName = classnames__default["default"](styles.input, (_b = {},
|
|
28
|
+
_b[styles.indeterminate] = indeterminate,
|
|
29
|
+
_b));
|
|
30
|
+
var iconName = indeterminate ? "minus2" : "checkmark";
|
|
31
|
+
var labelText = label ? React__default["default"].createElement(Text.Text, null, label) : children;
|
|
32
|
+
return (React__default["default"].createElement("div", { className: styles.checkbox },
|
|
33
|
+
React__default["default"].createElement("label", { className: wrapperClassName },
|
|
34
|
+
React__default["default"].createElement("span", { className: styles.checkHolder },
|
|
35
|
+
React__default["default"].createElement("input", { type: "checkbox", checked: checked, defaultChecked: defaultChecked, className: inputClassName, "aria-label": label, onChange: handleChange, value: value, name: name, disabled: disabled }),
|
|
36
|
+
React__default["default"].createElement("span", { className: styles.checkBox },
|
|
37
|
+
React__default["default"].createElement(Icon.Icon, { name: iconName, size: "small", color: "white" }))),
|
|
38
|
+
labelText && React__default["default"].createElement("span", { className: styles.label }, labelText)),
|
|
39
|
+
description && (React__default["default"].createElement("div", { className: styles.description },
|
|
40
|
+
React__default["default"].createElement(Text.Text, { variation: "subdued", size: "small" }, description)))));
|
|
41
|
+
function handleChange(event) {
|
|
42
|
+
var newChecked = event.currentTarget.checked;
|
|
43
|
+
onChange && onChange(newChecked);
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
exports.Checkbox = Checkbox;
|
package/dist/Chips/Chip.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { InternalChipProps } from "./ChipTypes";
|
|
2
|
-
export interface ChipProps extends Pick<InternalChipProps, "label" | "prefix" | "disabled" | "invalid"> {
|
|
3
|
-
/**
|
|
4
|
-
* The value that gets returned on the `<Chips>`'s onChange callback.
|
|
5
|
-
*/
|
|
6
|
-
readonly value: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function Chip(props: ChipProps): JSX.Element;
|
|
1
|
+
import { InternalChipProps } from "./ChipTypes";
|
|
2
|
+
export interface ChipProps extends Pick<InternalChipProps, "label" | "prefix" | "disabled" | "invalid"> {
|
|
3
|
+
/**
|
|
4
|
+
* The value that gets returned on the `<Chips>`'s onChange callback.
|
|
5
|
+
*/
|
|
6
|
+
readonly value: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Chip(props: ChipProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MouseEvent } from "react";
|
|
2
|
-
import { InternalChipProps } from "./ChipTypes";
|
|
3
|
-
interface ChipDismissibleProps extends Pick<InternalChipProps, "label" | "disabled" | "invalid" | "prefix" | "onClick"> {
|
|
4
|
-
onRequestRemove(event: MouseEvent<HTMLDivElement>): void;
|
|
5
|
-
}
|
|
6
|
-
export declare function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestRemove, }: ChipDismissibleProps): JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
import { MouseEvent } from "react";
|
|
2
|
+
import { InternalChipProps } from "./ChipTypes";
|
|
3
|
+
interface ChipDismissibleProps extends Pick<InternalChipProps, "label" | "disabled" | "invalid" | "prefix" | "onClick"> {
|
|
4
|
+
onRequestRemove(event: MouseEvent<HTMLDivElement>): void;
|
|
5
|
+
}
|
|
6
|
+
export declare function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestRemove, }: ChipDismissibleProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { KeyboardEvent, MouseEvent, ReactElement } from "react";
|
|
2
|
-
import { ChipButtonProps } from "./InternalChipButton";
|
|
3
|
-
import { AvatarProps } from "../Avatar";
|
|
4
|
-
import { IconProps } from "../Icon";
|
|
5
|
-
export interface InternalChipProps {
|
|
6
|
-
/**
|
|
7
|
-
* Label of the chip.
|
|
8
|
-
*/
|
|
9
|
-
readonly label: string;
|
|
10
|
-
/**
|
|
11
|
-
* Changes the style of the chip to look different than the default.
|
|
12
|
-
*/
|
|
13
|
-
readonly active?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Makes the chip look and feel uninteractable.
|
|
16
|
-
*/
|
|
17
|
-
readonly disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Highlights the chip red.
|
|
20
|
-
*/
|
|
21
|
-
readonly invalid?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Adds an avatar or icon on the left side of the label.
|
|
24
|
-
*
|
|
25
|
-
* Size props on both components are overwritten on render.
|
|
26
|
-
*
|
|
27
|
-
* **Example**
|
|
28
|
-
*```jsx
|
|
29
|
-
* <Chip prefix={<Avatar initials="JBR" />} />
|
|
30
|
-
* <Chip prefix={<Icon name="quote" />} />
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
readonly prefix?: ReactElement<AvatarProps | IconProps>;
|
|
34
|
-
/**
|
|
35
|
-
* Adds a component on the right side of the label.
|
|
36
|
-
*/
|
|
37
|
-
readonly suffix?: ReactElement<IconProps | ChipButtonProps>;
|
|
38
|
-
/**
|
|
39
|
-
* The label for the interactive chip element for voice over
|
|
40
|
-
*/
|
|
41
|
-
readonly ariaLabel?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Allows the chip to be focused.
|
|
44
|
-
*
|
|
45
|
-
* **NOTE**: Clickable chips are focusable by default so you don't need to
|
|
46
|
-
* specify this prop.
|
|
47
|
-
*
|
|
48
|
-
* This has the same effect as HTML [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex).
|
|
49
|
-
*/
|
|
50
|
-
readonly tabIndex?: number;
|
|
51
|
-
/**
|
|
52
|
-
* Callback when the chip itself gets clicked.
|
|
53
|
-
*/
|
|
54
|
-
onClick?(event: MouseEvent<HTMLDivElement | HTMLInputElement | HTMLButtonElement>): void;
|
|
55
|
-
/**
|
|
56
|
-
* Callback for keyboard interaction with chips (e.g., chip deletion).
|
|
57
|
-
*/
|
|
58
|
-
onKeyDown?(event: KeyboardEvent<HTMLDivElement | HTMLButtonElement>): void;
|
|
59
|
-
}
|
|
1
|
+
import { KeyboardEvent, MouseEvent, ReactElement } from "react";
|
|
2
|
+
import { ChipButtonProps } from "./InternalChipButton";
|
|
3
|
+
import { AvatarProps } from "../Avatar";
|
|
4
|
+
import { IconProps } from "../Icon";
|
|
5
|
+
export interface InternalChipProps {
|
|
6
|
+
/**
|
|
7
|
+
* Label of the chip.
|
|
8
|
+
*/
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/**
|
|
11
|
+
* Changes the style of the chip to look different than the default.
|
|
12
|
+
*/
|
|
13
|
+
readonly active?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Makes the chip look and feel uninteractable.
|
|
16
|
+
*/
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Highlights the chip red.
|
|
20
|
+
*/
|
|
21
|
+
readonly invalid?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Adds an avatar or icon on the left side of the label.
|
|
24
|
+
*
|
|
25
|
+
* Size props on both components are overwritten on render.
|
|
26
|
+
*
|
|
27
|
+
* **Example**
|
|
28
|
+
*```jsx
|
|
29
|
+
* <Chip prefix={<Avatar initials="JBR" />} />
|
|
30
|
+
* <Chip prefix={<Icon name="quote" />} />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
readonly prefix?: ReactElement<AvatarProps | IconProps>;
|
|
34
|
+
/**
|
|
35
|
+
* Adds a component on the right side of the label.
|
|
36
|
+
*/
|
|
37
|
+
readonly suffix?: ReactElement<IconProps | ChipButtonProps>;
|
|
38
|
+
/**
|
|
39
|
+
* The label for the interactive chip element for voice over
|
|
40
|
+
*/
|
|
41
|
+
readonly ariaLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Allows the chip to be focused.
|
|
44
|
+
*
|
|
45
|
+
* **NOTE**: Clickable chips are focusable by default so you don't need to
|
|
46
|
+
* specify this prop.
|
|
47
|
+
*
|
|
48
|
+
* This has the same effect as HTML [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex).
|
|
49
|
+
*/
|
|
50
|
+
readonly tabIndex?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Callback when the chip itself gets clicked.
|
|
53
|
+
*/
|
|
54
|
+
onClick?(event: MouseEvent<HTMLDivElement | HTMLInputElement | HTMLButtonElement>): void;
|
|
55
|
+
/**
|
|
56
|
+
* Callback for keyboard interaction with chips (e.g., chip deletion).
|
|
57
|
+
*/
|
|
58
|
+
onKeyDown?(event: KeyboardEvent<HTMLDivElement | HTMLButtonElement>): void;
|
|
59
|
+
}
|
package/dist/Chips/Chips.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChipsProps } from "./ChipsTypes";
|
|
2
|
-
export declare function Chips(props: ChipsProps): JSX.Element;
|
|
1
|
+
import { ChipsProps } from "./ChipsTypes";
|
|
2
|
+
export declare function Chips(props: ChipsProps): JSX.Element;
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { MouseEvent, ReactElement } from "react";
|
|
2
|
-
import { XOR } from "ts-xor";
|
|
3
|
-
import { ChipProps } from "./Chip";
|
|
4
|
-
interface ChipFoundationProps {
|
|
5
|
-
readonly children: ReactElement<ChipProps>[];
|
|
6
|
-
/**
|
|
7
|
-
* Change the interaction on the chip.
|
|
8
|
-
*/
|
|
9
|
-
readonly type?: "singleselect" | "multiselect" | "dismissible";
|
|
10
|
-
/**
|
|
11
|
-
* Determines which chip gets highlighted.
|
|
12
|
-
*/
|
|
13
|
-
readonly selected?: string | string[];
|
|
14
|
-
/**
|
|
15
|
-
* Callback whenever a chip is clicked. This returns a new value of
|
|
16
|
-
* selected chips.
|
|
17
|
-
*
|
|
18
|
-
* @param value
|
|
19
|
-
*/
|
|
20
|
-
onChange(value?: string | string[]): void;
|
|
21
|
-
/**
|
|
22
|
-
* Callback when a specific chip is clicked
|
|
23
|
-
*
|
|
24
|
-
* @param event
|
|
25
|
-
* @param clickedChipValue - The value of the chip that was clicked
|
|
26
|
-
*/
|
|
27
|
-
onClick?(event: MouseEvent<HTMLDivElement | HTMLInputElement | HTMLButtonElement>, clickedChipValue?: string): void;
|
|
28
|
-
}
|
|
29
|
-
export interface ChipSingleSelectProps extends ChipFoundationProps {
|
|
30
|
-
readonly type?: "singleselect";
|
|
31
|
-
readonly selected?: string;
|
|
32
|
-
onChange(value?: string): void;
|
|
33
|
-
/**
|
|
34
|
-
* The Chip's radio input name.
|
|
35
|
-
*
|
|
36
|
-
* @link https://www.w3schools.com/tags/att_input_name.asp
|
|
37
|
-
*/
|
|
38
|
-
readonly name?: string;
|
|
39
|
-
}
|
|
40
|
-
export interface ChipMultiSelectProps extends ChipFoundationProps {
|
|
41
|
-
readonly type: "multiselect";
|
|
42
|
-
readonly selected: string[];
|
|
43
|
-
onChange(value: string[]): void;
|
|
44
|
-
}
|
|
45
|
-
export interface ChipDismissibleProps extends ChipFoundationProps {
|
|
46
|
-
readonly type: "dismissible";
|
|
47
|
-
readonly selected: string[];
|
|
48
|
-
onChange(value: string[]): void;
|
|
49
|
-
/**
|
|
50
|
-
* Use a custom activator to trigger the Chip option selector
|
|
51
|
-
*/
|
|
52
|
-
readonly activator?: ReactElement;
|
|
53
|
-
/**
|
|
54
|
-
* Adds a loading indicator
|
|
55
|
-
*/
|
|
56
|
-
readonly isLoadingMore?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Callback when the user selects the custom option instead of the available
|
|
59
|
-
* chips.
|
|
60
|
-
*
|
|
61
|
-
* If not implemented, it won't allow custom add.
|
|
62
|
-
*
|
|
63
|
-
* @param value
|
|
64
|
-
*/
|
|
65
|
-
onCustomAdd?(value: string): void;
|
|
66
|
-
/**
|
|
67
|
-
* Callback when a user types a word that filters the options. Use this when
|
|
68
|
-
* you need to query new options from the database based on the search value.
|
|
69
|
-
*
|
|
70
|
-
* @param searchValue - The input value
|
|
71
|
-
*/
|
|
72
|
-
onSearch?(searchValue: string): void;
|
|
73
|
-
/**
|
|
74
|
-
* Callback when the user scrolls at the end of the chip option list. Use this
|
|
75
|
-
* to load more options from the database.
|
|
76
|
-
*
|
|
77
|
-
* @param searchValue - The input value
|
|
78
|
-
*/
|
|
79
|
-
onLoadMore?(searchValue: string): void;
|
|
80
|
-
}
|
|
81
|
-
export declare type ChipsProps = XOR<ChipSingleSelectProps, XOR<ChipMultiSelectProps, ChipDismissibleProps>>;
|
|
82
|
-
export {};
|
|
1
|
+
import { MouseEvent, ReactElement } from "react";
|
|
2
|
+
import { XOR } from "ts-xor";
|
|
3
|
+
import { ChipProps } from "./Chip";
|
|
4
|
+
interface ChipFoundationProps {
|
|
5
|
+
readonly children: ReactElement<ChipProps>[];
|
|
6
|
+
/**
|
|
7
|
+
* Change the interaction on the chip.
|
|
8
|
+
*/
|
|
9
|
+
readonly type?: "singleselect" | "multiselect" | "dismissible";
|
|
10
|
+
/**
|
|
11
|
+
* Determines which chip gets highlighted.
|
|
12
|
+
*/
|
|
13
|
+
readonly selected?: string | string[];
|
|
14
|
+
/**
|
|
15
|
+
* Callback whenever a chip is clicked. This returns a new value of
|
|
16
|
+
* selected chips.
|
|
17
|
+
*
|
|
18
|
+
* @param value
|
|
19
|
+
*/
|
|
20
|
+
onChange(value?: string | string[]): void;
|
|
21
|
+
/**
|
|
22
|
+
* Callback when a specific chip is clicked
|
|
23
|
+
*
|
|
24
|
+
* @param event
|
|
25
|
+
* @param clickedChipValue - The value of the chip that was clicked
|
|
26
|
+
*/
|
|
27
|
+
onClick?(event: MouseEvent<HTMLDivElement | HTMLInputElement | HTMLButtonElement>, clickedChipValue?: string): void;
|
|
28
|
+
}
|
|
29
|
+
export interface ChipSingleSelectProps extends ChipFoundationProps {
|
|
30
|
+
readonly type?: "singleselect";
|
|
31
|
+
readonly selected?: string;
|
|
32
|
+
onChange(value?: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* The Chip's radio input name.
|
|
35
|
+
*
|
|
36
|
+
* @link https://www.w3schools.com/tags/att_input_name.asp
|
|
37
|
+
*/
|
|
38
|
+
readonly name?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ChipMultiSelectProps extends ChipFoundationProps {
|
|
41
|
+
readonly type: "multiselect";
|
|
42
|
+
readonly selected: string[];
|
|
43
|
+
onChange(value: string[]): void;
|
|
44
|
+
}
|
|
45
|
+
export interface ChipDismissibleProps extends ChipFoundationProps {
|
|
46
|
+
readonly type: "dismissible";
|
|
47
|
+
readonly selected: string[];
|
|
48
|
+
onChange(value: string[]): void;
|
|
49
|
+
/**
|
|
50
|
+
* Use a custom activator to trigger the Chip option selector
|
|
51
|
+
*/
|
|
52
|
+
readonly activator?: ReactElement;
|
|
53
|
+
/**
|
|
54
|
+
* Adds a loading indicator
|
|
55
|
+
*/
|
|
56
|
+
readonly isLoadingMore?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Callback when the user selects the custom option instead of the available
|
|
59
|
+
* chips.
|
|
60
|
+
*
|
|
61
|
+
* If not implemented, it won't allow custom add.
|
|
62
|
+
*
|
|
63
|
+
* @param value
|
|
64
|
+
*/
|
|
65
|
+
onCustomAdd?(value: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Callback when a user types a word that filters the options. Use this when
|
|
68
|
+
* you need to query new options from the database based on the search value.
|
|
69
|
+
*
|
|
70
|
+
* @param searchValue - The input value
|
|
71
|
+
*/
|
|
72
|
+
onSearch?(searchValue: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback when the user scrolls at the end of the chip option list. Use this
|
|
75
|
+
* to load more options from the database.
|
|
76
|
+
*
|
|
77
|
+
* @param searchValue - The input value
|
|
78
|
+
*/
|
|
79
|
+
onLoadMore?(searchValue: string): void;
|
|
80
|
+
}
|
|
81
|
+
export declare type ChipsProps = XOR<ChipSingleSelectProps, XOR<ChipMultiSelectProps, ChipDismissibleProps>>;
|
|
82
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InternalChipProps } from "./ChipTypes";
|
|
2
|
-
export declare function InternalChip({ label, active, disabled, invalid, prefix, suffix, tabIndex, ariaLabel, onClick, onKeyDown, }: InternalChipProps): JSX.Element;
|
|
1
|
+
import { InternalChipProps } from "./ChipTypes";
|
|
2
|
+
export declare function InternalChip({ label, active, disabled, invalid, prefix, suffix, tabIndex, ariaLabel, onClick, onKeyDown, }: InternalChipProps): JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { ChipButtonProps } from "./InternalChipButton";
|
|
3
|
-
import { InternalChipProps } from "./ChipTypes";
|
|
4
|
-
import { AvatarProps } from "../Avatar";
|
|
5
|
-
import { IconProps } from "../Icon";
|
|
6
|
-
interface InternalChipAffixProps extends Pick<InternalChipProps, "active" | "invalid" | "disabled"> {
|
|
7
|
-
readonly affix?: ReactElement<AvatarProps | IconProps | ChipButtonProps>;
|
|
8
|
-
}
|
|
9
|
-
export declare function InternalChipAffix({ affix, active, invalid, disabled, }: InternalChipAffixProps): JSX.Element;
|
|
10
|
-
export {};
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { ChipButtonProps } from "./InternalChipButton";
|
|
3
|
+
import { InternalChipProps } from "./ChipTypes";
|
|
4
|
+
import { AvatarProps } from "../Avatar";
|
|
5
|
+
import { IconProps } from "../Icon";
|
|
6
|
+
interface InternalChipAffixProps extends Pick<InternalChipProps, "active" | "invalid" | "disabled"> {
|
|
7
|
+
readonly affix?: ReactElement<AvatarProps | IconProps | ChipButtonProps>;
|
|
8
|
+
}
|
|
9
|
+
export declare function InternalChipAffix({ affix, active, invalid, disabled, }: InternalChipAffixProps): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MouseEvent } from "react";
|
|
2
|
-
import { IconNames } from "@jobber/design";
|
|
3
|
-
export interface ChipButtonProps {
|
|
4
|
-
readonly icon: IconNames;
|
|
5
|
-
readonly invalid?: boolean;
|
|
6
|
-
readonly disabled?: boolean;
|
|
7
|
-
readonly label: string;
|
|
8
|
-
onClick(event: MouseEvent<HTMLDivElement>): void;
|
|
9
|
-
}
|
|
10
|
-
export declare function InternalChipButton({ icon, invalid, disabled, label, onClick, }: ChipButtonProps): JSX.Element;
|
|
1
|
+
import { MouseEvent } from "react";
|
|
2
|
+
import { IconNames } from "@jobber/design";
|
|
3
|
+
export interface ChipButtonProps {
|
|
4
|
+
readonly icon: IconNames;
|
|
5
|
+
readonly invalid?: boolean;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
onClick(event: MouseEvent<HTMLDivElement>): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function InternalChipButton({ icon, invalid, disabled, label, onClick, }: ChipButtonProps): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InternalChipDismissibleProps } from "./InternalChipDismissibleTypes";
|
|
2
|
-
export declare function InternalChipDismissible(props: InternalChipDismissibleProps): JSX.Element;
|
|
1
|
+
import { InternalChipDismissibleProps } from "./InternalChipDismissibleTypes";
|
|
2
|
+
export declare function InternalChipDismissible(props: InternalChipDismissibleProps): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChipDismissibleInputProps } from "./InternalChipDismissibleTypes";
|
|
2
|
-
export declare function InternalChipDismissibleInput(props: ChipDismissibleInputProps): JSX.Element;
|
|
1
|
+
import { ChipDismissibleInputProps } from "./InternalChipDismissibleTypes";
|
|
2
|
+
export declare function InternalChipDismissibleInput(props: ChipDismissibleInputProps): JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ChipProps } from "../Chip";
|
|
3
|
-
import { ChipDismissibleProps } from "../ChipsTypes";
|
|
4
|
-
export declare type InternalChipDismissibleProps = Omit<ChipDismissibleProps, "type">;
|
|
5
|
-
export interface ChipDismissibleInputProps extends Pick<InternalChipDismissibleProps, "activator" | "isLoadingMore" | "onSearch" | "onLoadMore"> {
|
|
6
|
-
readonly attachTo: React.RefObject<Element | null>;
|
|
7
|
-
readonly options: ChipProps[];
|
|
8
|
-
onCustomOptionSelect?(value: string): void;
|
|
9
|
-
onOptionSelect(value: string): void;
|
|
10
|
-
}
|
|
11
|
-
export interface ChipDismissibleInputOptionProps extends ChipProps {
|
|
12
|
-
readonly custom: boolean;
|
|
13
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChipProps } from "../Chip";
|
|
3
|
+
import { ChipDismissibleProps } from "../ChipsTypes";
|
|
4
|
+
export declare type InternalChipDismissibleProps = Omit<ChipDismissibleProps, "type">;
|
|
5
|
+
export interface ChipDismissibleInputProps extends Pick<InternalChipDismissibleProps, "activator" | "isLoadingMore" | "onSearch" | "onLoadMore"> {
|
|
6
|
+
readonly attachTo: React.RefObject<Element | null>;
|
|
7
|
+
readonly options: ChipProps[];
|
|
8
|
+
onCustomOptionSelect?(value: string): void;
|
|
9
|
+
onOptionSelect(value: string): void;
|
|
10
|
+
}
|
|
11
|
+
export interface ChipDismissibleInputOptionProps extends ChipProps {
|
|
12
|
+
readonly custom: boolean;
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./useInternalChipDismissible";
|
|
2
|
-
export * from "./useInternalChipDismissibleInput";
|
|
3
|
-
export * from "./useInView";
|
|
4
|
-
export * from "./useRepositionMenu";
|
|
5
|
-
export * from "./useScrollToActive";
|
|
1
|
+
export * from "./useInternalChipDismissible";
|
|
2
|
+
export * from "./useInternalChipDismissibleInput";
|
|
3
|
+
export * from "./useInView";
|
|
4
|
+
export * from "./useRepositionMenu";
|
|
5
|
+
export * from "./useScrollToActive";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare function useInView<T extends Element>(): {
|
|
3
|
-
ref: import("react").RefObject<T>;
|
|
4
|
-
isInView: boolean;
|
|
5
|
-
};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useInView<T extends Element>(): {
|
|
3
|
+
ref: import("react").RefObject<T>;
|
|
4
|
+
isInView: boolean;
|
|
5
|
+
};
|