linear-react-components-ui 1.1.24-beta.1 → 1.1.24-beta.11
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/lib/BaseMask-0c14ef51.d.ts +24 -0
- package/lib/Cnpj-bde01dd0.d.ts +18 -0
- package/lib/Cpf-3fa496ad.d.ts +18 -0
- package/lib/Phone-2bb0b397.d.ts +18 -0
- package/lib/ZipCode-09460e18.d.ts +13 -0
- package/lib/alerts/AlertProvider.js +1 -2
- package/lib/alerts/BaseAlert.js +1 -1
- package/lib/alerts/Message.js +2 -3
- package/lib/alerts/withAlert.js +1 -2
- package/lib/assets/styles/button.scss +1 -1
- package/lib/assets/styles/calendar.scss +137 -32
- package/lib/assets/styles/datepicker2.scss +8 -10
- package/lib/assets/styles/dialog.scss +1 -1
- package/lib/assets/styles/fieldset.scss +1 -1
- package/lib/assets/styles/file.scss +8 -0
- package/lib/assets/styles/filefield.scss +42 -0
- package/lib/assets/styles/gridlayout.scss +20 -19
- package/lib/assets/styles/multiSelect.scss +6 -6
- package/lib/assets/styles/numberfield.scss +18 -0
- package/lib/assets/styles/radiofield.scss +185 -0
- package/lib/assets/styles/selectfield.scss +6 -4
- package/lib/assets/styles/table.scss +6 -0
- package/lib/assets/styles/tabs.scss +6 -2
- package/lib/assets/styles/textfield.scss +66 -28
- package/lib/avatar/index.js +9 -11
- package/lib/badge/index.js +4 -4
- package/lib/buttons/Button.js +1 -2
- package/lib/buttons/DangerButton.js +1 -1
- package/lib/buttons/DefaultButton.js +6 -15
- package/lib/buttons/InfoButton.js +1 -1
- package/lib/buttons/PrimaryButton.js +1 -1
- package/lib/buttons/SuccessButton.js +1 -1
- package/lib/buttons/WarningButton.js +1 -1
- package/lib/buttons/button_container/index.js +1 -1
- package/lib/buttons/split_button/index.js +2 -2
- package/lib/calendar/base/helpers.js +2 -2
- package/lib/calendar/base/index.js +123 -44
- package/lib/checkbox/index.js +2 -3
- package/lib/dialog/Custom.js +2 -3
- package/lib/dialog/Question.js +5 -4
- package/lib/dialog/base/Content.js +5 -6
- package/lib/dialog/base/Header.js +3 -4
- package/lib/dialog/base/index.js +33 -23
- package/lib/dialog/form/index.js +52 -12
- package/lib/dialog/types.d.ts +4 -0
- package/lib/dialog/wizard/index.js +1 -2
- package/lib/dialog/wizard/progressbar.js +1 -1
- package/lib/dialog/wizard/step.js +1 -1
- package/lib/dialog/wizard/useWizard.js +1 -2
- package/lib/drawer/Content.js +1 -2
- package/lib/drawer/Drawer.js +6 -7
- package/lib/drawer/Header.js +2 -3
- package/lib/dropdown/Popup.js +7 -7
- package/lib/dropdown/helper.js +1 -1
- package/lib/dropdown/withDropdown.js +3 -4
- package/lib/fieldset/index.js +8 -9
- package/lib/form/Field.js +2 -3
- package/lib/form/FieldArray.js +2 -3
- package/lib/form/FieldNumber.js +4 -5
- package/lib/form/FieldPeriod.js +3 -4
- package/lib/form/index.js +3 -4
- package/lib/form/withFieldHOC.js +1 -2
- package/lib/form/withFormSecurity.js +1 -2
- package/lib/form2/helpers.js +1 -1
- package/lib/form2/index.d.ts +1 -1
- package/lib/form2/types.d.ts +7 -3
- package/lib/form2/useForm/index.js +22 -15
- package/lib/gridlayout/GridCol.js +5 -5
- package/lib/gridlayout/GridRow.js +1 -4
- package/lib/hint/index.js +1 -7
- package/lib/icons/helper.d.ts +16 -0
- package/lib/icons/helper.js +16 -0
- package/lib/icons/index.js +9 -9
- package/lib/index-19761a50.d.ts +26 -0
- package/lib/index-208e7f62.d.ts +44 -0
- package/lib/index-35ba9ed8.d.ts +15 -0
- package/lib/index-3b70931d.d.ts +44 -0
- package/lib/index-7dfa8924.d.ts +22 -0
- package/lib/index-9e576346.d.ts +23 -0
- package/lib/index-ecafc8c6.d.ts +30 -0
- package/lib/index-efe0a0e4.d.ts +41 -0
- package/lib/inputs/base/InputTextBase.js +9 -8
- package/lib/inputs/base/helpers.js +3 -7
- package/lib/inputs/base/types.d.ts +1 -1
- package/lib/inputs/color/index.js +2 -3
- package/lib/inputs/date/Dropdown.js +6 -4
- package/lib/inputs/date/index.js +31 -19
- package/lib/inputs/errorMessage/index.js +2 -3
- package/lib/inputs/file/DefaultFile.js +31 -31
- package/lib/inputs/file/DragDropFile.js +18 -17
- package/lib/inputs/file/File.js +6 -5
- package/lib/inputs/file/FileButtonSettings.js +0 -1
- package/lib/inputs/file/index.js +0 -1
- package/lib/inputs/inputHOC.js +1 -2
- package/lib/inputs/mask/BaseMask.js +1 -2
- package/lib/inputs/mask/Cnpj.js +1 -2
- package/lib/inputs/mask/Cpf.js +1 -2
- package/lib/inputs/multiSelect/ActionButtons.js +1 -2
- package/lib/inputs/multiSelect/Dropdown.js +12 -12
- package/lib/inputs/multiSelect/helper.js +2 -1
- package/lib/inputs/multiSelect/index.js +28 -11
- package/lib/inputs/number/BaseNumber.js +1 -1
- package/lib/inputs/number/index.js +3 -3
- package/lib/inputs/period/Dropdown.js +7 -4
- package/lib/inputs/period/PeriodList.js +1 -1
- package/lib/inputs/period/helper.js +1 -3
- package/lib/inputs/period/index.js +66 -40
- package/lib/inputs/period/types.d.ts +4 -1
- package/lib/inputs/search/index.js +8 -5
- package/lib/inputs/select/ActionButtons.js +1 -1
- package/lib/inputs/select/Dropdown.js +3 -4
- package/lib/inputs/select/helper.js +13 -10
- package/lib/inputs/select/multiple/Selecteds.js +2 -2
- package/lib/inputs/select/multiple/index.js +14 -11
- package/lib/inputs/select/simple/index.js +19 -13
- package/lib/inputs/textarea/index.js +1 -1
- package/lib/inputs/types.d.ts +1 -0
- package/lib/inputs2/checkboxfield/index.d.ts +1 -1
- package/lib/inputs2/checkboxfield/index.js +18 -15
- package/lib/inputs2/colorfield/index.d.ts +2 -2
- package/lib/inputs2/colorfield/index.js +5 -5
- package/lib/inputs2/date/base/constants.js +2 -1
- package/lib/inputs2/date/base/index.js +6 -8
- package/lib/inputs2/date/datefield/calendarbox.d.ts +1 -1
- package/lib/inputs2/date/datefield/calendarbox.js +3 -2
- package/lib/inputs2/date/datefield/context.d.ts +1 -0
- package/lib/inputs2/date/datefield/index.d.ts +1 -0
- package/lib/inputs2/date/datefield/index.js +44 -33
- package/lib/inputs2/date/datefield/triggers.js +1 -2
- package/lib/inputs2/date/datefield/types.d.ts +2 -0
- package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +1 -1
- package/lib/inputs2/date/dateperiodfield/calendarbox.js +8 -6
- package/lib/inputs2/date/dateperiodfield/context.d.ts +1 -0
- package/lib/inputs2/date/dateperiodfield/index.d.ts +1 -0
- package/lib/inputs2/date/dateperiodfield/index.js +66 -48
- package/lib/inputs2/date/dateperiodfield/triggers.js +19 -14
- package/lib/inputs2/date/dateperiodfield/types.d.ts +2 -0
- package/lib/inputs2/date/helpers.d.ts +1 -0
- package/lib/inputs2/date/types.d.ts +2 -1
- package/lib/inputs2/{number/Number.d.ts → filefield/index.d.ts} +2 -2
- package/lib/inputs2/filefield/index.js +174 -0
- package/lib/inputs2/index.d.ts +20 -14
- package/lib/inputs2/index.js +10 -11
- package/lib/inputs2/mask/BaseMask.d.ts +2 -2
- package/lib/inputs2/mask/BaseMask.js +7 -7
- package/lib/inputs2/mask/Cnpj.d.ts +3 -3
- package/lib/inputs2/mask/Cnpj.js +4 -5
- package/lib/inputs2/mask/Cpf.d.ts +3 -3
- package/lib/inputs2/mask/Cpf.js +4 -5
- package/lib/inputs2/mask/Phone.d.ts +3 -3
- package/lib/inputs2/mask/Phone.js +1 -2
- package/lib/inputs2/mask/ZipCode.d.ts +3 -3
- package/lib/inputs2/mask/ZipCode.js +1 -2
- package/lib/inputs2/numberfield/currency.d.ts +13 -0
- package/lib/inputs2/numberfield/currency.js +91 -0
- package/lib/inputs2/numberfield/decimal.d.ts +13 -0
- package/lib/inputs2/{number/BaseNumber.js → numberfield/decimal.js} +57 -58
- package/lib/inputs2/numberfield/helpers.d.ts +30 -0
- package/lib/inputs2/numberfield/helpers.js +53 -0
- package/lib/inputs2/numberfield/index.d.ts +12 -0
- package/lib/inputs2/numberfield/index.js +104 -0
- package/lib/inputs2/numberfield/types.d.ts +36 -0
- package/lib/inputs2/numberfield/types.js +5 -0
- package/lib/inputs2/{number/BaseNumber.d.ts → radiofield/index.d.ts} +4 -5
- package/lib/inputs2/radiofield/index.js +144 -0
- package/lib/inputs2/radiofield/types.d.ts +33 -0
- package/lib/inputs2/radiofield/types.js +5 -0
- package/lib/inputs2/selectfield/context.d.ts +1 -0
- package/lib/inputs2/selectfield/index.d.ts +2 -1
- package/lib/inputs2/selectfield/index.js +118 -58
- package/lib/inputs2/selectfield/item.d.ts +2 -1
- package/lib/inputs2/selectfield/item.js +8 -4
- package/lib/inputs2/selectfield/listbox.d.ts +1 -1
- package/lib/inputs2/selectfield/listbox.js +24 -10
- package/lib/inputs2/selectfield/options.d.ts +9 -0
- package/lib/inputs2/selectfield/options.js +26 -0
- package/lib/inputs2/selectfield/search.d.ts +1 -1
- package/lib/inputs2/selectfield/search.js +3 -4
- package/lib/inputs2/selectfield/selections.d.ts +1 -1
- package/lib/inputs2/selectfield/selections.js +3 -2
- package/lib/inputs2/selectfield/triggers.js +17 -8
- package/lib/inputs2/selectfield/types.d.ts +0 -1
- package/lib/inputs2/slot/index.d.ts +2 -2
- package/lib/inputs2/{number/Decimal.d.ts → textareafield/index.d.ts} +2 -5
- package/lib/inputs2/textareafield/index.js +194 -0
- package/lib/inputs2/textfield/index.d.ts +1 -1
- package/lib/inputs2/textfield/index.js +18 -17
- package/lib/labelMessages/index.js +4 -6
- package/lib/labels/DefaultLabel.js +2 -6
- package/lib/labels/label_container/index.js +1 -1
- package/lib/list/Header.js +1 -1
- package/lib/list/Item.js +10 -12
- package/lib/list/index.js +2 -4
- package/lib/menus/float/MenuItem.js +3 -4
- package/lib/menus/float/SubMenuContainer.js +2 -3
- package/lib/menus/float/index.js +1 -1
- package/lib/menus/sidenav/ExpandMenu.js +1 -1
- package/lib/menus/sidenav/MenuLink.js +1 -2
- package/lib/menus/sidenav/NavMenuGroup.js +2 -3
- package/lib/menus/sidenav/NavMenuItem.js +10 -9
- package/lib/menus/sidenav/NavSubMenuItem.js +2 -3
- package/lib/menus/sidenav/helpers.js +1 -1
- package/lib/menus/sidenav/index.js +6 -7
- package/lib/menus/sidenav/popup_menu_search/index.js +1 -2
- package/lib/panel/Content.js +9 -8
- package/lib/panel/Default.js +3 -4
- package/lib/panel/Header.js +4 -5
- package/lib/permissionValidations.js +1 -1
- package/lib/popover/PopoverText.js +1 -2
- package/lib/popover/index.js +1 -1
- package/lib/progress/Bar.js +6 -6
- package/lib/radio/index.js +3 -4
- package/lib/shortcuts/index.js +1 -1
- package/lib/skeleton/SkeletonContainer.js +1 -2
- package/lib/skeleton/index.js +1 -4
- package/lib/spinner/index.js +3 -4
- package/lib/split/Split.js +2 -3
- package/lib/split/SplitSide.js +4 -5
- package/lib/table/Body.js +4 -5
- package/lib/table/Header.js +9 -7
- package/lib/table/HeaderColumn.js +2 -3
- package/lib/table/Row.js +4 -5
- package/lib/table/RowColumn.js +2 -3
- package/lib/table/index.js +20 -16
- package/lib/table/types.d.ts +1 -0
- package/lib/tabs/DropdownTabs.js +2 -3
- package/lib/tabs/Menu.js +1 -1
- package/lib/tabs/MenuTabs.js +4 -9
- package/lib/tabs/Panel.js +8 -7
- package/lib/tabs/context.js +7 -5
- package/lib/tabs/index.js +3 -4
- package/lib/textContent/index.js +2 -3
- package/lib/toolbar/ButtonBar.js +2 -3
- package/lib/toolbar/LabelBar.js +1 -2
- package/lib/toolbar/index.js +1 -1
- package/lib/tooltip/TooltipContent.js +8 -9
- package/lib/tooltip/useTooltip.js +8 -8
- package/lib/treetable/Body.js +2 -3
- package/lib/treetable/Header.js +3 -4
- package/lib/treetable/Row.js +9 -10
- package/lib/treeview/Header.js +1 -1
- package/lib/treeview/Node.js +5 -6
- package/lib/treeview/index.js +5 -6
- package/lib/uitour/index.js +9 -8
- package/package.json +1 -1
- package/lib/BaseMask-04df8f20.d.ts +0 -24
- package/lib/BaseNumber-c609c5a0.d.ts +0 -23
- package/lib/Cnpj-5471cb1f.d.ts +0 -18
- package/lib/Cpf-71c4f0f4.d.ts +0 -18
- package/lib/Currency-38d14ff7.d.ts +0 -18
- package/lib/Decimal-85d45244.d.ts +0 -13
- package/lib/Number-db3c092d.d.ts +0 -20
- package/lib/Phone-4c4142e4.d.ts +0 -18
- package/lib/ZipCode-dc7dd4da.d.ts +0 -13
- package/lib/calendar/base/Day.d.ts +0 -8
- package/lib/calendar/base/Day.js +0 -36
- package/lib/calendar/base/Month.d.ts +0 -8
- package/lib/calendar/base/Month.js +0 -39
- package/lib/calendar/base/Week.d.ts +0 -8
- package/lib/calendar/base/Week.js +0 -35
- package/lib/index-379b7504.d.ts +0 -44
- package/lib/index-7cb5e8b3.d.ts +0 -41
- package/lib/index-809a7899.d.ts +0 -23
- package/lib/index-de21a05e.d.ts +0 -23
- package/lib/inputs2/number/Currency.d.ts +0 -11
- package/lib/inputs2/number/Currency.js +0 -47
- package/lib/inputs2/number/Decimal.js +0 -36
- package/lib/inputs2/number/Number.js +0 -49
- package/lib/inputs2/number/format_number.d.ts +0 -5
- package/lib/inputs2/number/format_number.js +0 -29
|
@@ -13,8 +13,7 @@ var constants = _interopRequireWildcard(require("../../../internals/constants"))
|
|
|
13
13
|
var _helper = require("../helper");
|
|
14
14
|
var _InputTextBase = _interopRequireDefault(require("../../base/InputTextBase"));
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
function
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
17
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
18
|
const SimpleSelect = props => {
|
|
20
19
|
const {
|
|
@@ -55,7 +54,7 @@ const SimpleSelect = props => {
|
|
|
55
54
|
const [onDenied, setOnDeniedSelect] = (0, _react.useState)();
|
|
56
55
|
const [isTyping, setIsTyping] = (0, _react.useState)(false);
|
|
57
56
|
const dropdownRef = (0, _react.useRef)(null);
|
|
58
|
-
const componentId =
|
|
57
|
+
const componentId = "select-component-".concat(name, "-").concat(uuid.v1());
|
|
59
58
|
const componentRef = (0, _react.useRef)(null);
|
|
60
59
|
const selectWrapper = (0, _react.useRef)();
|
|
61
60
|
const gridElement = (0, _react.useRef)();
|
|
@@ -64,18 +63,20 @@ const SimpleSelect = props => {
|
|
|
64
63
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
65
64
|
};
|
|
66
65
|
const onClickOutside = event => {
|
|
66
|
+
var _selectWrapper$curren, _dropdownRef$current;
|
|
67
67
|
const {
|
|
68
68
|
target
|
|
69
69
|
} = event;
|
|
70
|
-
if (target !== selectWrapper.current && !selectWrapper.current
|
|
70
|
+
if (target !== selectWrapper.current && !((_selectWrapper$curren = selectWrapper.current) !== null && _selectWrapper$curren !== void 0 && _selectWrapper$curren.contains(target)) && !((_dropdownRef$current = dropdownRef.current) !== null && _dropdownRef$current !== void 0 && _dropdownRef$current.contains(target))) {
|
|
71
71
|
setOpened(false);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
const onMouseMove = event => {
|
|
75
|
+
var _dropdownRef$current2, _dropdownRef$current3;
|
|
75
76
|
const target = event.target;
|
|
76
|
-
const idDropdown = dropdownRef.current
|
|
77
|
+
const idDropdown = ((_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : (_dropdownRef$current3 = _dropdownRef$current2.parentElement) === null || _dropdownRef$current3 === void 0 ? void 0 : _dropdownRef$current3.id) || '';
|
|
77
78
|
const dropdownElement = document.getElementById(idDropdown);
|
|
78
|
-
const keepDropdownOpen = Boolean(dropdownElement
|
|
79
|
+
const keepDropdownOpen = Boolean(dropdownElement === null || dropdownElement === void 0 ? void 0 : dropdownElement.contains(target));
|
|
79
80
|
setInsideComponent(keepDropdownOpen);
|
|
80
81
|
};
|
|
81
82
|
const getSelectEvent = selectedEvent => ({
|
|
@@ -115,6 +116,7 @@ const SimpleSelect = props => {
|
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
const onSelect = selectedDropdown => {
|
|
119
|
+
var _dropdownRef$current4;
|
|
118
120
|
if (!selectedDropdown) return;
|
|
119
121
|
setSelected(selectedDropdown);
|
|
120
122
|
if (descriptionKeyIsString) setInputText(selectedDropdown[descriptionKey]);else setInputText(descriptionKey(selectedDropdown));
|
|
@@ -124,7 +126,7 @@ const SimpleSelect = props => {
|
|
|
124
126
|
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
125
127
|
setOpened(false);
|
|
126
128
|
});
|
|
127
|
-
dropdownRef.current
|
|
129
|
+
(_dropdownRef$current4 = dropdownRef.current) === null || _dropdownRef$current4 === void 0 ? void 0 : _dropdownRef$current4.focus();
|
|
128
130
|
};
|
|
129
131
|
const onOpenClose = () => {
|
|
130
132
|
setOpened(prevState => !prevState);
|
|
@@ -160,7 +162,8 @@ const SimpleSelect = props => {
|
|
|
160
162
|
const onInputKeyDown = e => {
|
|
161
163
|
if (e.keyCode) {
|
|
162
164
|
if ((e.keyCode === constants.keyCodes.ENTER || e.key === constants.keys.TAB) && selected && opened) {
|
|
163
|
-
|
|
165
|
+
var _e$preventDefault;
|
|
166
|
+
if (e.keyCode === constants.keyCodes.ENTER) (_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
|
|
164
167
|
onSelect(selected);
|
|
165
168
|
} else if ([constants.keyCodes.ARROW_UP, constants.keyCodes.ARROW_DOWN].includes(e.keyCode)) {
|
|
166
169
|
if (!opened) setOpened(true);
|
|
@@ -168,7 +171,7 @@ const SimpleSelect = props => {
|
|
|
168
171
|
if (e.keyCode === constants.keyCodes.ARROW_DOWN) {
|
|
169
172
|
index = dataCombo && index === dataCombo.length - 1 ? 0 : index + 1;
|
|
170
173
|
} else {
|
|
171
|
-
index = dataCombo && index === 0 ? dataCombo
|
|
174
|
+
index = dataCombo && index === 0 ? (dataCombo === null || dataCombo === void 0 ? void 0 : dataCombo.length) - 1 : index - 1;
|
|
172
175
|
}
|
|
173
176
|
setSelected(dataCombo[index]);
|
|
174
177
|
if (descriptionKeyIsString) setInputText(dataCombo[index][descriptionKey]);
|
|
@@ -205,7 +208,7 @@ const SimpleSelect = props => {
|
|
|
205
208
|
}, []);
|
|
206
209
|
(0, _react.useEffect)(() => {
|
|
207
210
|
if (gridLayout) {
|
|
208
|
-
const gridEl = document.querySelector(
|
|
211
|
+
const gridEl = document.querySelector("#".concat(componentId, ">.-withinput.grid-container"));
|
|
209
212
|
if (gridElement.current !== gridEl && gridEl) gridElement.current = gridEl;
|
|
210
213
|
}
|
|
211
214
|
}, [gridLayout]);
|
|
@@ -213,7 +216,10 @@ const SimpleSelect = props => {
|
|
|
213
216
|
if (dataSourceWithAllOptions.length > 0) {
|
|
214
217
|
let newCurrent = null;
|
|
215
218
|
if (value || value === 0) {
|
|
216
|
-
newCurrent = dataSourceWithAllOptions.find(i =>
|
|
219
|
+
newCurrent = dataSourceWithAllOptions.find(i => {
|
|
220
|
+
var _i$idKey;
|
|
221
|
+
return (value || value === 0) && ((_i$idKey = i[idKey]) === null || _i$idKey === void 0 ? void 0 : _i$idKey.toString().toLowerCase()) === (value === null || value === void 0 ? void 0 : value.toString().toLowerCase());
|
|
222
|
+
});
|
|
217
223
|
} else if (dataSourceWithAllOptions.length > 0 && selectFirstOnEnter) {
|
|
218
224
|
newCurrent = dataSourceWithAllOptions[0];
|
|
219
225
|
}
|
|
@@ -270,8 +276,8 @@ const SimpleSelect = props => {
|
|
|
270
276
|
onClick: onFocus,
|
|
271
277
|
onKeyDown: onInputKeyDown,
|
|
272
278
|
customClassForLabel: customClassForLabel,
|
|
273
|
-
customClassForWrapper:
|
|
274
|
-
customClassForInputContent:
|
|
279
|
+
customClassForWrapper: "selectwrapper ".concat((undigitable || searchOnDropdown || shouldBeReadOnly()) && ' -undigitable', " ").concat(customClassForWrapper),
|
|
280
|
+
customClassForInputContent: "multiselect ".concat(customClassForInputContent),
|
|
275
281
|
inputBaseRef: r => {
|
|
276
282
|
selectWrapper.current = r;
|
|
277
283
|
},
|
package/lib/inputs/types.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ interface ISearchProps extends IBaseProps {
|
|
|
31
31
|
rounded?: boolean;
|
|
32
32
|
inputRef?: MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
33
33
|
style?: CSSProperties;
|
|
34
|
+
drawerFilterIsOpened?: boolean;
|
|
34
35
|
}
|
|
35
36
|
interface IDropdownProps {
|
|
36
37
|
children: ReactNode | ReactNode[];
|
|
@@ -4,4 +4,4 @@ import '../../@types/ColorStyles.js';
|
|
|
4
4
|
import '../../tooltip/types.js';
|
|
5
5
|
import '../../@types/Position.js';
|
|
6
6
|
import '../../@types/PermissionAttr.js';
|
|
7
|
-
export { C as CheckboxFieldInputProps, I as Input } from '../../index-
|
|
7
|
+
export { C as CheckboxFieldInputProps, I as Input } from '../../index-efe0a0e4.js';
|
|
@@ -14,14 +14,14 @@ var _popover = _interopRequireWildcard(require("../../popover"));
|
|
|
14
14
|
var _tooltip = require("../../tooltip");
|
|
15
15
|
var _permissionValidations = require("../../permissionValidations");
|
|
16
16
|
const _excluded = ["name", "label", "errors", "onChange", "size", "onDeniedActions", "permissionAttr", "variant", "customClass", "customClassLabel", "customClassWrapper", "labelUppercase", "rounded", "customClassInputContainer", "skeletonize", "hintPosition", "gridLayout", "themePopover", "popoverAlign", "tooltip", "tooltipPosition", "tooltipWidth"];
|
|
17
|
-
function
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21
20
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
22
21
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
23
22
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
24
23
|
const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
24
|
+
var _props$checked, _props$hint;
|
|
25
25
|
const {
|
|
26
26
|
name,
|
|
27
27
|
label,
|
|
@@ -54,14 +54,14 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
54
54
|
hideContent,
|
|
55
55
|
unvisible
|
|
56
56
|
} = onDenied;
|
|
57
|
-
const inputId = _react.default.useMemo(() => props.id ||
|
|
57
|
+
const inputId = _react.default.useMemo(() => props.id || "checkboxfield-".concat(name), [props.id, name]);
|
|
58
58
|
const inputRootRef = _react.default.useRef(null);
|
|
59
|
-
const isChecked = props.checked
|
|
60
|
-
const hasLabel = !_lodash.default.isEmpty(props
|
|
59
|
+
const isChecked = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : Boolean(props.value);
|
|
60
|
+
const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
|
|
61
61
|
const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
|
|
62
62
|
const isDisabled = Boolean(props.disabled || onDenied.disabled);
|
|
63
|
-
const hasHintMessages = Boolean(props.hint
|
|
64
|
-
const hasValidationErrors = Boolean(errors
|
|
63
|
+
const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
|
|
64
|
+
const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
|
|
65
65
|
const handleOnChange = _react.default.useCallback(event => {
|
|
66
66
|
if (isReadOnly || isDisabled) return;
|
|
67
67
|
Object.defineProperty(event.target, 'value', {
|
|
@@ -70,18 +70,19 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
70
70
|
enumerable: true,
|
|
71
71
|
configurable: true
|
|
72
72
|
});
|
|
73
|
-
onChange
|
|
73
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
74
74
|
}, [isReadOnly, isDisabled, onChange]);
|
|
75
75
|
if (unvisible || hideContent) return null;
|
|
76
76
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
|
|
77
77
|
cols: gridLayout
|
|
78
78
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
79
79
|
ref: inputRootRef,
|
|
80
|
-
|
|
80
|
+
"data-testid": "test-chebox-field-root",
|
|
81
|
+
className: "checkbox-field-root ".concat(customClassWrapper),
|
|
81
82
|
"data-state-error": hasValidationErrors
|
|
82
83
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
83
84
|
"data-state-skeletonize": skeletonize,
|
|
84
|
-
className:
|
|
85
|
+
className: "container ".concat(customClassInputContainer)
|
|
85
86
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
86
87
|
className: "input-root"
|
|
87
88
|
}, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
@@ -90,8 +91,9 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
90
91
|
name: name,
|
|
91
92
|
readOnly: isReadOnly,
|
|
92
93
|
disabled: isDisabled,
|
|
93
|
-
className:
|
|
94
|
+
className: "input ".concat(customClass),
|
|
94
95
|
tabIndex: !isReadOnly ? 0 : -1,
|
|
96
|
+
"data-testid": "test-checkbox-field-input",
|
|
95
97
|
"data-state-size": size,
|
|
96
98
|
"data-state-error": hasValidationErrors,
|
|
97
99
|
"data-state-variant": variant,
|
|
@@ -107,11 +109,12 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
107
109
|
name: "checkmark",
|
|
108
110
|
colorStyle: "default"
|
|
109
111
|
})), hasLabel && /*#__PURE__*/_react.default.createElement("label", {
|
|
110
|
-
className:
|
|
112
|
+
className: "label ".concat(customClassLabel),
|
|
111
113
|
title: label,
|
|
112
114
|
htmlFor: inputId,
|
|
113
115
|
"aria-readonly": isReadOnly,
|
|
114
116
|
"aria-disabled": isDisabled,
|
|
117
|
+
"data-testid": "test-checkbox-field-label",
|
|
115
118
|
"data-state-skeletonize": skeletonize,
|
|
116
119
|
"data-state-disabled": isDisabled,
|
|
117
120
|
"data-state-read-only": isReadOnly,
|
|
@@ -123,7 +126,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
123
126
|
align: popoverAlign,
|
|
124
127
|
iconColor: "#03bde2"
|
|
125
128
|
}, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, {
|
|
126
|
-
text: props
|
|
129
|
+
text: props === null || props === void 0 ? void 0 : props.hint
|
|
127
130
|
}))), hintPosition === 'below' && /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
128
131
|
customClass: "hint",
|
|
129
132
|
description: props.hint,
|
|
@@ -134,8 +137,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
134
137
|
className: "error",
|
|
135
138
|
"data-state-skeletonize": skeletonize,
|
|
136
139
|
"aria-describedby": String(name).concat('-errors')
|
|
137
|
-
}, errors
|
|
138
|
-
key:
|
|
140
|
+
}, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
141
|
+
key: "".concat(index + 1, "-").concat(error)
|
|
139
142
|
}, error, "\xA0"))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
|
|
140
143
|
targetRef: inputRootRef,
|
|
141
144
|
text: tooltip,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
export { LeftSlot, RightSlot } from '../slot/index.js';
|
|
3
|
-
import '../../index-
|
|
4
|
-
export { C as ColorFieldInputProps, I as Input } from '../../index-
|
|
3
|
+
import '../../index-3b70931d.js';
|
|
4
|
+
export { C as ColorFieldInputProps, I as Input } from '../../index-9e576346.js';
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/ColorStyles.js';
|
|
7
7
|
import '../../@types/Position.js';
|
|
@@ -23,8 +23,7 @@ var TextField = _interopRequireWildcard(require("../textfield"));
|
|
|
23
23
|
var _buttons = _interopRequireDefault(require("../../../lib/buttons"));
|
|
24
24
|
var _permissionValidations = require("../../../lib/permissionValidations");
|
|
25
25
|
const _excluded = ["name", "isTypeText", "defaultValue", "onChange", "permissionAttr", "onDeniedActions"];
|
|
26
|
-
function
|
|
27
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
28
27
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
28
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
30
29
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
@@ -64,15 +63,16 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
64
63
|
const handleTextInputChange = e => {
|
|
65
64
|
const newValue = e.target.value;
|
|
66
65
|
syncColorValues(newValue);
|
|
67
|
-
onChange
|
|
66
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
68
67
|
};
|
|
69
68
|
const handleColorInputChange = e => {
|
|
70
69
|
const newValue = e.target.value;
|
|
71
70
|
syncColorValues(newValue);
|
|
72
|
-
onChange
|
|
71
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
73
72
|
};
|
|
74
73
|
const onPaletteButtonClick = () => {
|
|
75
|
-
|
|
74
|
+
var _inputRefColor$curren;
|
|
75
|
+
(_inputRefColor$curren = inputRefColor.current) === null || _inputRefColor$curren === void 0 ? void 0 : _inputRefColor$curren.click();
|
|
76
76
|
};
|
|
77
77
|
_react.default.useLayoutEffect(() => {
|
|
78
78
|
syncColorValues(String(defaultValue));
|
|
@@ -10,7 +10,8 @@ const useCalendarPosition = (calendarBoxOpen, containerRef) => {
|
|
|
10
10
|
const [calendarBoxStyles, setCalendarBoxStyles] = _react.default.useState({});
|
|
11
11
|
_react.default.useEffect(() => {
|
|
12
12
|
const updatePosition = () => {
|
|
13
|
-
|
|
13
|
+
var _containerRef$current;
|
|
14
|
+
const selectPositionOnScreen = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect();
|
|
14
15
|
if (selectPositionOnScreen) {
|
|
15
16
|
const {
|
|
16
17
|
top,
|
|
@@ -13,8 +13,7 @@ const _excluded = ["children", "customClassWrapper", "hasValidationErrors"],
|
|
|
13
13
|
_excluded3 = ["children", "skeletonize", "customClassInputContainer"],
|
|
14
14
|
_excluded4 = ["customClass"],
|
|
15
15
|
_excluded5 = ["children", "isReadOnly", "isDisabled", "skeletonize", "inputFieldId", "calendarBoxOpen", "showCalendarButton", "showClearButton", "onClearSelectedDate", "onClickTriggerCalendar", "hasValidDateSelection", "hasValidPeriodSelected", "clearButtonTestId", "calendarButtonTestId"];
|
|
16
|
-
function
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
18
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
19
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
@@ -29,7 +28,7 @@ const Root = exports.Root = /*#__PURE__*/_react.default.forwardRef((props, ref)
|
|
|
29
28
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, rest, {
|
|
30
29
|
ref: ref,
|
|
31
30
|
"data-state-error": hasValidationErrors,
|
|
32
|
-
className:
|
|
31
|
+
className: "date-field-root ".concat(customClassWrapper)
|
|
33
32
|
}), children);
|
|
34
33
|
});
|
|
35
34
|
Root.displayName = 'BaseDateRoot';
|
|
@@ -52,7 +51,7 @@ const Label = exports.Label = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
52
51
|
rest = _objectWithoutProperties(props, _excluded2);
|
|
53
52
|
return /*#__PURE__*/_react.default.createElement("span", _extends({}, rest, {
|
|
54
53
|
ref: ref,
|
|
55
|
-
className:
|
|
54
|
+
className: "root-label ".concat(customClassLabel),
|
|
56
55
|
"data-state-skeletonize": skeletonize
|
|
57
56
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
58
57
|
className: "label",
|
|
@@ -83,7 +82,7 @@ const Container = exports.Container = /*#__PURE__*/_react.default.forwardRef((pr
|
|
|
83
82
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, rest, {
|
|
84
83
|
ref: ref,
|
|
85
84
|
"data-state-skeletonize": skeletonize,
|
|
86
|
-
className:
|
|
85
|
+
className: "container ".concat(customClassInputContainer)
|
|
87
86
|
}), children);
|
|
88
87
|
});
|
|
89
88
|
Container.displayName = 'BaseDateContainer';
|
|
@@ -98,7 +97,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
98
97
|
type: "text",
|
|
99
98
|
role: "combobox",
|
|
100
99
|
"aria-haspopup": "true",
|
|
101
|
-
className:
|
|
100
|
+
className: "input ".concat(customClass),
|
|
102
101
|
"aria-autocomplete": "list"
|
|
103
102
|
}));
|
|
104
103
|
});
|
|
@@ -148,8 +147,7 @@ const Triggers = exports.Triggers = /*#__PURE__*/_react.default.forwardRef((prop
|
|
|
148
147
|
"aria-controls": inputFieldId,
|
|
149
148
|
"data-state-read-only": isReadOnly,
|
|
150
149
|
"data-state-visible": showClearButton,
|
|
151
|
-
"data-state-valid-date-selected": hasValidDateSelection,
|
|
152
|
-
"data-state-valid-period-selected": hasValidPeriodSelected,
|
|
150
|
+
"data-state-valid-date-selected": hasValidDateSelection || hasValidPeriodSelected,
|
|
153
151
|
onClick: handleOnClickClear,
|
|
154
152
|
onMouseDown: event => {
|
|
155
153
|
event.preventDefault();
|
|
@@ -2,6 +2,6 @@ import React__default from 'react';
|
|
|
2
2
|
|
|
3
3
|
interface DateFieldCalendarBoxProps extends React__default.ComponentProps<'div'> {
|
|
4
4
|
}
|
|
5
|
-
declare const CalendarBox: React__default.ForwardRefExoticComponent<Pick<DateFieldCalendarBoxProps, "slot" | "style" | "title" | "
|
|
5
|
+
declare const CalendarBox: React__default.ForwardRefExoticComponent<Pick<DateFieldCalendarBoxProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
|
|
7
7
|
export { CalendarBox, DateFieldCalendarBoxProps };
|
|
@@ -30,7 +30,8 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
|
|
|
30
30
|
} = (0, _constants.useCalendarPosition)(calendarBoxOpen, dateContainerRef);
|
|
31
31
|
const weeks = (0, _helpers.generateCalendarWeeks)(calendarDisplayDate);
|
|
32
32
|
const handleOnMouseDown = event => {
|
|
33
|
-
|
|
33
|
+
var _event$preventDefault;
|
|
34
|
+
event === null || event === void 0 ? void 0 : (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);
|
|
34
35
|
};
|
|
35
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
37
|
ref: ref,
|
|
@@ -72,7 +73,7 @@ const CalendarBox = exports.CalendarBox = /*#__PURE__*/_react.default.forwardRef
|
|
|
72
73
|
className: "date-calendar-box-days-of-week"
|
|
73
74
|
}, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, _moment.default.weekdaysShort(true).map((day, idx) => /*#__PURE__*/_react.default.createElement("th", {
|
|
74
75
|
role: "columnheader",
|
|
75
|
-
key:
|
|
76
|
+
key: "day-of-week-".concat(idx + 1)
|
|
76
77
|
}, day))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
77
78
|
className: "date-calendar-box-grid-of-days"
|
|
78
79
|
}, /*#__PURE__*/_react.default.createElement("table", {
|
|
@@ -6,6 +6,7 @@ import '../../../@types/ColorStyles.js';
|
|
|
6
6
|
import '../../../tooltip/types.js';
|
|
7
7
|
import '../../../@types/Position.js';
|
|
8
8
|
import '../../../@types/PermissionAttr.js';
|
|
9
|
+
import '../types.js';
|
|
9
10
|
|
|
10
11
|
declare const DateFieldContext: React__default.Context<DateFieldContextProps>;
|
|
11
12
|
declare const useDateFieldContext: () => DateFieldContextProps;
|