linear-react-components-ui 1.1.24-beta.8 → 1.1.24-rc.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/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/calendar.scss +137 -32
- package/lib/assets/styles/datepicker2.scss +4 -1
- package/lib/assets/styles/file.scss +8 -0
- 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 +5 -14
- 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 +2 -3
- package/lib/dialog/base/Header.js +3 -4
- package/lib/dialog/base/index.js +10 -9
- package/lib/dialog/form/index.js +6 -6
- 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 +5 -6
- 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 +0 -4
- package/lib/form2/useForm/index.js +17 -13
- package/lib/gridlayout/GridCol.js +5 -5
- package/lib/gridlayout/GridRow.js +1 -4
- package/lib/hint/index.js +1 -7
- package/lib/icons/index.js +9 -9
- package/lib/index-4b31b471.d.ts +15 -0
- package/lib/index-8a0c7463.d.ts +41 -0
- package/lib/index-9203efed.d.ts +26 -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/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 +11 -11
- package/lib/inputs/multiSelect/helper.js +2 -1
- package/lib/inputs/multiSelect/index.js +10 -9
- 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 +2 -3
- 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/inputs2/checkboxfield/index.d.ts +1 -1
- package/lib/inputs2/checkboxfield/index.js +15 -15
- package/lib/inputs2/colorfield/index.js +5 -5
- package/lib/inputs2/date/base/constants.js +2 -1
- package/lib/inputs2/date/base/index.js +7 -7
- package/lib/inputs2/date/datefield/calendarbox.d.ts +1 -1
- package/lib/inputs2/date/datefield/calendarbox.js +3 -2
- package/lib/inputs2/date/datefield/index.js +37 -28
- package/lib/inputs2/date/datefield/triggers.js +1 -2
- package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +1 -1
- package/lib/inputs2/date/dateperiodfield/calendarbox.js +8 -6
- package/lib/inputs2/date/dateperiodfield/index.js +61 -44
- package/lib/inputs2/date/dateperiodfield/triggers.js +19 -14
- package/lib/inputs2/filefield/index.js +33 -27
- package/lib/inputs2/index.d.ts +3 -3
- package/lib/inputs2/index.js +1 -2
- package/lib/inputs2/mask/BaseMask.js +7 -7
- package/lib/inputs2/mask/Cnpj.js +4 -5
- package/lib/inputs2/mask/Cpf.js +4 -5
- package/lib/inputs2/mask/Phone.js +1 -2
- package/lib/inputs2/mask/ZipCode.js +1 -2
- package/lib/inputs2/numberfield/currency.js +6 -6
- package/lib/inputs2/numberfield/decimal.js +6 -6
- package/lib/inputs2/numberfield/index.js +6 -6
- package/lib/inputs2/radiofield/index.d.ts +1 -1
- package/lib/inputs2/radiofield/index.js +14 -13
- package/lib/inputs2/selectfield/index.d.ts +1 -1
- package/lib/inputs2/selectfield/index.js +71 -54
- package/lib/inputs2/selectfield/item.d.ts +1 -1
- package/lib/inputs2/selectfield/item.js +4 -4
- package/lib/inputs2/selectfield/listbox.d.ts +1 -1
- package/lib/inputs2/selectfield/listbox.js +7 -4
- package/lib/inputs2/selectfield/options.d.ts +1 -1
- 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 +6 -5
- package/lib/inputs2/slot/index.d.ts +2 -2
- package/lib/inputs2/textareafield/index.js +21 -18
- package/lib/inputs2/textfield/index.js +15 -14
- 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 +2 -8
- 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 +1 -2
- 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/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-118afd58.d.ts +0 -26
- package/lib/index-8f540f57.d.ts +0 -41
- package/lib/index-b2ef36a6.d.ts +0 -15
|
@@ -5,6 +5,6 @@ interface SelectFieldSelectionsProps extends React__default.ComponentProps<'div'
|
|
|
5
5
|
isReadOnly: boolean;
|
|
6
6
|
listOfOptionsToSelect: Map<string, string>;
|
|
7
7
|
}
|
|
8
|
-
declare const Selections: React__default.ForwardRefExoticComponent<Pick<SelectFieldSelectionsProps, "
|
|
8
|
+
declare const Selections: React__default.ForwardRefExoticComponent<Pick<SelectFieldSelectionsProps, "key" | "style" | "children" | "slot" | "title" | "className" | "align" | "onClick" | "color" | "hidden" | "id" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "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" | "isDisabled" | "isReadOnly" | "listOfOptionsToSelect"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
|
|
10
10
|
export { SelectFieldSelectionsProps, Selections };
|
|
@@ -46,6 +46,7 @@ const ItemSelected = props => {
|
|
|
46
46
|
})));
|
|
47
47
|
};
|
|
48
48
|
const Selections = exports.Selections = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
49
|
+
var _ref;
|
|
49
50
|
const {
|
|
50
51
|
isDisabled,
|
|
51
52
|
isReadOnly,
|
|
@@ -57,9 +58,9 @@ const Selections = exports.Selections = /*#__PURE__*/_react.default.forwardRef((
|
|
|
57
58
|
isMultipleDefault,
|
|
58
59
|
handleOnChange
|
|
59
60
|
} = (0, _context.useSelectFieldContext)();
|
|
60
|
-
const hasValuesSelected = Boolean([...valueSelect]
|
|
61
|
+
const hasValuesSelected = Boolean((_ref = [...valueSelect]) === null || _ref === void 0 ? void 0 : _ref.length);
|
|
61
62
|
const handleRemoveItemSelected = (value, label) => {
|
|
62
|
-
handleOnChange
|
|
63
|
+
handleOnChange === null || handleOnChange === void 0 ? void 0 : handleOnChange(value, label, true);
|
|
63
64
|
};
|
|
64
65
|
if (!hasValuesSelected) return null;
|
|
65
66
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
@@ -9,8 +9,7 @@ var _icons = _interopRequireDefault(require("../../icons"));
|
|
|
9
9
|
var _buttons = _interopRequireDefault(require("../../buttons"));
|
|
10
10
|
var _list = _interopRequireWildcard(require("../../list"));
|
|
11
11
|
var _context = require("./context");
|
|
12
|
-
function
|
|
13
|
-
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; }
|
|
12
|
+
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); }
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
const Triggers = () => {
|
|
16
15
|
const {
|
|
@@ -26,7 +25,7 @@ const Triggers = () => {
|
|
|
26
25
|
isMultipleSelect,
|
|
27
26
|
isMultipleWithCheckboxes
|
|
28
27
|
} = (0, _context.useSelectFieldContext)();
|
|
29
|
-
const hasOptionsItens = Boolean(optionItens
|
|
28
|
+
const hasOptionsItens = Boolean(optionItens === null || optionItens === void 0 ? void 0 : optionItens.length);
|
|
30
29
|
const hasConditionToShowOptionsButton = !isMultipleSelect && hasOptionsItens || isMultipleWithCheckboxes;
|
|
31
30
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
|
|
32
31
|
"data-testid": "test-select-field-trigger-clear",
|
|
@@ -69,7 +68,8 @@ const Triggers = () => {
|
|
|
69
68
|
leftIconName: "checkboxChecked",
|
|
70
69
|
text: "Marcar Todos",
|
|
71
70
|
onMouseDown: event => {
|
|
72
|
-
|
|
71
|
+
var _event$preventDefault;
|
|
72
|
+
event === null || event === void 0 ? void 0 : (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);
|
|
73
73
|
},
|
|
74
74
|
onClick: () => {
|
|
75
75
|
handleCheckMultiple(true);
|
|
@@ -80,7 +80,8 @@ const Triggers = () => {
|
|
|
80
80
|
leftIconName: "checkboxUnchecked",
|
|
81
81
|
text: "Desmarcar Todos",
|
|
82
82
|
onMouseDown: event => {
|
|
83
|
-
|
|
83
|
+
var _event$preventDefault2;
|
|
84
|
+
event === null || event === void 0 ? void 0 : (_event$preventDefault2 = event.preventDefault) === null || _event$preventDefault2 === void 0 ? void 0 : _event$preventDefault2.call(event);
|
|
84
85
|
},
|
|
85
86
|
onClick: () => {
|
|
86
87
|
handleCheckMultiple(false);
|
|
@@ -8,7 +8,7 @@ interface SlotProps extends React__default.ComponentProps<'div'> {
|
|
|
8
8
|
children: React__default.ReactNode;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const LeftSlot: React__default.ForwardRefExoticComponent<Pick<SlotProps, "
|
|
12
|
-
declare const RightSlot: React__default.ForwardRefExoticComponent<Pick<SlotProps, "
|
|
11
|
+
declare const LeftSlot: React__default.ForwardRefExoticComponent<Pick<SlotProps, "key" | "style" | "children" | "slot" | "title" | "className" | "align" | "onClick" | "disabled" | "color" | "hidden" | "id" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "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>>;
|
|
12
|
+
declare const RightSlot: React__default.ForwardRefExoticComponent<Pick<SlotProps, "key" | "style" | "children" | "slot" | "title" | "className" | "align" | "onClick" | "disabled" | "color" | "hidden" | "id" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "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" | "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>>;
|
|
13
13
|
|
|
14
14
|
export { LeftSlot, RightSlot, SlotPosition, SlotProps };
|
|
@@ -28,14 +28,14 @@ var _popover = _interopRequireWildcard(require("../../popover"));
|
|
|
28
28
|
var _permissionValidations = require("../../permissionValidations");
|
|
29
29
|
var _slot = require("../slot");
|
|
30
30
|
const _excluded = ["name", "label", "errors", "children", "maxLength", "onDeniedActions", "permissionAttr", "customClass", "customClassLabel", "customClassWrapper", "customClassInputContainer", "textAlign", "labelUppercase", "skeletonize", "hintPosition", "gridLayout", "themePopover", "popoverAlign", "tooltip", "tooltipPosition", "tooltipWidth", "hint"];
|
|
31
|
-
function
|
|
32
|
-
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; }
|
|
31
|
+
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); }
|
|
33
32
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
34
33
|
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); }
|
|
35
34
|
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; }
|
|
36
35
|
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; }
|
|
37
36
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
38
37
|
const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
38
|
+
var _props$hint;
|
|
39
39
|
const {
|
|
40
40
|
name,
|
|
41
41
|
label,
|
|
@@ -71,12 +71,12 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
71
71
|
const inputRef = _react.default.useRef(null);
|
|
72
72
|
const counterRef = _react.default.useRef(null);
|
|
73
73
|
const textAreaInternalRef = _react.default.useRef(null);
|
|
74
|
-
const hasLabel = !_lodash.default.isEmpty(props
|
|
74
|
+
const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
|
|
75
75
|
const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
|
|
76
76
|
const isDisabled = Boolean(props.disabled || onDenied.disabled);
|
|
77
|
-
const hasHintMessages = Boolean(props.hint
|
|
77
|
+
const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
|
|
78
78
|
const hintMustBeOnLabel = hintPosition === 'onLabelRight';
|
|
79
|
-
const hasValidationErrors = Boolean(errors
|
|
79
|
+
const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
|
|
80
80
|
const hasMaxLengthCondition = Boolean(maxLength);
|
|
81
81
|
const {
|
|
82
82
|
leftSlotElements,
|
|
@@ -86,8 +86,9 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
86
86
|
const right = [];
|
|
87
87
|
_react.default.Children.map(children, (childElement, index) => {
|
|
88
88
|
if (/*#__PURE__*/_react.default.isValidElement(childElement)) {
|
|
89
|
+
var _childElement$key;
|
|
89
90
|
const clonedChild = /*#__PURE__*/_react.default.cloneElement(childElement, {
|
|
90
|
-
key: childElement.key
|
|
91
|
+
key: (_childElement$key = childElement.key) !== null && _childElement$key !== void 0 ? _childElement$key : "slot-".concat(index),
|
|
91
92
|
disabled: isDisabled,
|
|
92
93
|
'aria-disabled': isDisabled
|
|
93
94
|
});
|
|
@@ -100,24 +101,26 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
100
101
|
rightSlotElements: right
|
|
101
102
|
};
|
|
102
103
|
}, [children, isDisabled]);
|
|
103
|
-
const hasLeftSlotElements = Boolean(leftSlotElements
|
|
104
|
-
const hasRightSlotElements = Boolean(rightSlotElements
|
|
104
|
+
const hasLeftSlotElements = Boolean(leftSlotElements === null || leftSlotElements === void 0 ? void 0 : leftSlotElements.length);
|
|
105
|
+
const hasRightSlotElements = Boolean(rightSlotElements === null || rightSlotElements === void 0 ? void 0 : rightSlotElements.length);
|
|
105
106
|
const handleOnInputData = event => {
|
|
106
107
|
const target = event.target;
|
|
107
108
|
const currentLength = target.value.length;
|
|
108
109
|
if (counterRef.current) {
|
|
109
|
-
counterRef.current.textContent =
|
|
110
|
+
counterRef.current.textContent = "".concat(currentLength, "/").concat(maxLength);
|
|
110
111
|
/**
|
|
111
112
|
* Cálculo faz referência ao tamanho do espaço ocupado do contador de caracteres.
|
|
112
113
|
* Isso evita quebra de layout da interface.
|
|
113
114
|
*/
|
|
114
|
-
counterRef.current.style.width =
|
|
115
|
+
counterRef.current.style.width = "".concat(_lodash.default.toNumber(maxLength === null || maxLength === void 0 ? void 0 : maxLength.toString().length) * 7 * 2 + 6, "px");
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
_react.default.useEffect(() => {
|
|
118
|
-
|
|
119
|
+
var _textAreaInternalRef$;
|
|
120
|
+
textAreaInternalRef === null || textAreaInternalRef === void 0 ? void 0 : (_textAreaInternalRef$ = textAreaInternalRef.current) === null || _textAreaInternalRef$ === void 0 ? void 0 : _textAreaInternalRef$.addEventListener('input', handleOnInputData);
|
|
119
121
|
return () => {
|
|
120
|
-
|
|
122
|
+
var _textAreaInternalRef$2;
|
|
123
|
+
textAreaInternalRef === null || textAreaInternalRef === void 0 ? void 0 : (_textAreaInternalRef$2 = textAreaInternalRef.current) === null || _textAreaInternalRef$2 === void 0 ? void 0 : _textAreaInternalRef$2.removeEventListener('input', handleOnInputData);
|
|
121
124
|
};
|
|
122
125
|
}, []);
|
|
123
126
|
if (unvisible || hideContent) return null;
|
|
@@ -125,10 +128,10 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
125
128
|
cols: gridLayout
|
|
126
129
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
127
130
|
ref: inputRef,
|
|
128
|
-
className:
|
|
131
|
+
className: "text-field-root ".concat(customClassWrapper),
|
|
129
132
|
"data-state-error": hasValidationErrors
|
|
130
133
|
}, hasLabel && /*#__PURE__*/_react.default.createElement("span", {
|
|
131
|
-
className:
|
|
134
|
+
className: "root-label ".concat(customClassLabel),
|
|
132
135
|
"data-state-skeletonize": skeletonize
|
|
133
136
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
134
137
|
className: "label",
|
|
@@ -147,14 +150,14 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
147
150
|
text: hint
|
|
148
151
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
149
152
|
"data-state-skeletonize": skeletonize,
|
|
150
|
-
className:
|
|
153
|
+
className: "container ".concat(customClassInputContainer)
|
|
151
154
|
}, hasLeftSlotElements && !skeletonize && leftSlotElements, /*#__PURE__*/_react.default.createElement("textarea", _extends({
|
|
152
155
|
ref: (0, _helpers.mergeRefs)(ref, textAreaInternalRef),
|
|
153
156
|
id: name,
|
|
154
157
|
readOnly: isReadOnly,
|
|
155
158
|
disabled: isDisabled,
|
|
156
159
|
maxLength: maxLength,
|
|
157
|
-
className:
|
|
160
|
+
className: "input ".concat(customClass),
|
|
158
161
|
tabIndex: !isReadOnly ? 0 : -1,
|
|
159
162
|
placeholder: rest.placeholder,
|
|
160
163
|
"data-state-error": hasValidationErrors,
|
|
@@ -179,8 +182,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
179
182
|
className: "error",
|
|
180
183
|
"data-state-skeletonize": skeletonize,
|
|
181
184
|
"aria-describedby": String(name).concat('-errors')
|
|
182
|
-
}, errors
|
|
183
|
-
key:
|
|
185
|
+
}, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
186
|
+
key: "".concat(index + 1, "-").concat(error)
|
|
184
187
|
}, error, "\xA0"))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
|
|
185
188
|
targetRef: inputRef,
|
|
186
189
|
text: tooltip,
|
|
@@ -27,13 +27,13 @@ var _slot = require("../slot");
|
|
|
27
27
|
var _tooltip = require("../../tooltip");
|
|
28
28
|
const _excluded = ["type", "name", "label", "errors", "children", "onDeniedActions", "permissionAttr", "customClass", "customClassLabel", "customClassWrapper", "customClassInputContainer", "textAlign", "labelUppercase", "skeletonize", "hintPosition", "gridLayout", "themePopover", "popoverAlign", "tooltip", "tooltipPosition", "tooltipWidth", "hint"];
|
|
29
29
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
30
|
-
function
|
|
31
|
-
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; }
|
|
30
|
+
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); }
|
|
32
31
|
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); }
|
|
33
32
|
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; }
|
|
34
33
|
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; }
|
|
35
34
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
36
35
|
const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
36
|
+
var _props$hint;
|
|
37
37
|
const {
|
|
38
38
|
type = 'text',
|
|
39
39
|
name,
|
|
@@ -67,11 +67,11 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
67
67
|
unvisible
|
|
68
68
|
} = onDenied;
|
|
69
69
|
const inputRef = (0, _react.useRef)(null);
|
|
70
|
-
const hasLabel = !_lodash.default.isEmpty(props
|
|
70
|
+
const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
|
|
71
71
|
const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
|
|
72
72
|
const isDisabled = Boolean(props.disabled || onDenied.disabled);
|
|
73
|
-
const hasHintMessages = Boolean(props.hint
|
|
74
|
-
const hasValidationErrors = Boolean(errors
|
|
73
|
+
const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
|
|
74
|
+
const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
|
|
75
75
|
const {
|
|
76
76
|
leftSlotElements,
|
|
77
77
|
rightSlotElements
|
|
@@ -80,8 +80,9 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
80
80
|
const right = [];
|
|
81
81
|
_react.default.Children.map(children, (childElement, index) => {
|
|
82
82
|
if (/*#__PURE__*/_react.default.isValidElement(childElement)) {
|
|
83
|
+
var _childElement$key;
|
|
83
84
|
const clonedChild = /*#__PURE__*/_react.default.cloneElement(childElement, {
|
|
84
|
-
key: childElement.key
|
|
85
|
+
key: (_childElement$key = childElement.key) !== null && _childElement$key !== void 0 ? _childElement$key : "slot-".concat(index),
|
|
85
86
|
disabled: isDisabled,
|
|
86
87
|
'aria-disabled': isDisabled
|
|
87
88
|
});
|
|
@@ -94,17 +95,17 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
94
95
|
rightSlotElements: right
|
|
95
96
|
};
|
|
96
97
|
}, [children, isDisabled]);
|
|
97
|
-
const hasLeftSlotElements = Boolean(leftSlotElements
|
|
98
|
-
const hasRightSlotElements = Boolean(rightSlotElements
|
|
98
|
+
const hasLeftSlotElements = Boolean(leftSlotElements === null || leftSlotElements === void 0 ? void 0 : leftSlotElements.length);
|
|
99
|
+
const hasRightSlotElements = Boolean(rightSlotElements === null || rightSlotElements === void 0 ? void 0 : rightSlotElements.length);
|
|
99
100
|
if (unvisible || hideContent) return null;
|
|
100
101
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
|
|
101
102
|
cols: gridLayout
|
|
102
103
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
103
104
|
ref: inputRef,
|
|
104
|
-
className:
|
|
105
|
+
className: "text-field-root ".concat(customClassWrapper),
|
|
105
106
|
"data-state-error": hasValidationErrors
|
|
106
107
|
}, hasLabel && /*#__PURE__*/_react.default.createElement("span", {
|
|
107
|
-
className:
|
|
108
|
+
className: "root-label ".concat(customClassLabel),
|
|
108
109
|
"data-state-skeletonize": skeletonize
|
|
109
110
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
110
111
|
className: "label",
|
|
@@ -123,14 +124,14 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
123
124
|
text: hint
|
|
124
125
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
126
|
"data-state-skeletonize": skeletonize,
|
|
126
|
-
className:
|
|
127
|
+
className: "container ".concat(customClassInputContainer)
|
|
127
128
|
}, hasLeftSlotElements && !skeletonize && leftSlotElements, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
128
129
|
ref: ref,
|
|
129
130
|
id: name,
|
|
130
131
|
type: type,
|
|
131
132
|
readOnly: isReadOnly,
|
|
132
133
|
disabled: isDisabled,
|
|
133
|
-
className:
|
|
134
|
+
className: "input ".concat(customClass),
|
|
134
135
|
tabIndex: !isReadOnly ? 0 : -1,
|
|
135
136
|
placeholder: rest.placeholder,
|
|
136
137
|
"data-state-error": hasValidationErrors,
|
|
@@ -147,8 +148,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
|
|
|
147
148
|
className: "error",
|
|
148
149
|
"data-state-skeletonize": skeletonize,
|
|
149
150
|
"aria-describedby": String(name).concat('-errors')
|
|
150
|
-
}, errors
|
|
151
|
-
key:
|
|
151
|
+
}, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
152
|
+
key: "".concat(index + 1, "-").concat(error)
|
|
152
153
|
}, error, "\xA0"))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
|
|
153
154
|
targetRef: inputRef,
|
|
154
155
|
text: tooltip,
|
|
@@ -8,8 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _icons = _interopRequireDefault(require("../icons"));
|
|
9
9
|
require("../assets/styles/labelMessages.scss");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
function
|
|
12
|
-
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; }
|
|
11
|
+
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); }
|
|
13
12
|
const LabelMessages = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
style = {},
|
|
@@ -25,8 +24,7 @@ const LabelMessages = _ref => {
|
|
|
25
24
|
showCloseButton = false
|
|
26
25
|
} = _ref;
|
|
27
26
|
const [closed, setClosed] = (0, _react.useState)(false);
|
|
28
|
-
const getClass = () =>
|
|
29
|
-
${square && '-square'} ${flat && '-flat'}`;
|
|
27
|
+
const getClass = () => "labelmessages-component -".concat(type, " ").concat(customClass, "\n ").concat(square && '-square', " ").concat(flat && '-flat');
|
|
30
28
|
const getIcon = () => {
|
|
31
29
|
if (icon) {
|
|
32
30
|
return icon;
|
|
@@ -35,14 +33,14 @@ const LabelMessages = _ref => {
|
|
|
35
33
|
name: iconName,
|
|
36
34
|
size: 16,
|
|
37
35
|
color: "#ffffff",
|
|
38
|
-
customClass:
|
|
36
|
+
customClass: "-".concat(type, "svg")
|
|
39
37
|
});
|
|
40
38
|
}
|
|
41
39
|
return null;
|
|
42
40
|
};
|
|
43
41
|
if (closed || !visible) return null;
|
|
44
42
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
-
className:
|
|
43
|
+
className: "".concat(getClass(), " ").concat(customClass),
|
|
46
44
|
style: style
|
|
47
45
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
46
|
className: "labelmessagesitem text"
|
|
@@ -9,8 +9,7 @@ var _icons = _interopRequireDefault(require("../icons"));
|
|
|
9
9
|
var _permissionValidations = require("../permissionValidations");
|
|
10
10
|
var _tooltip = require("../tooltip");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
function
|
|
13
|
-
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; }
|
|
12
|
+
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); }
|
|
14
13
|
const DefaultLabel = _ref => {
|
|
15
14
|
let {
|
|
16
15
|
style,
|
|
@@ -33,10 +32,7 @@ const DefaultLabel = _ref => {
|
|
|
33
32
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
34
33
|
const [onDenied] = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr));
|
|
35
34
|
const labelRef = (0, _react.useRef)(null);
|
|
36
|
-
const getClass = () =>
|
|
37
|
-
${skeletonize ? '-skeletonized' : ''}
|
|
38
|
-
${size ? `-${size}` : ''}
|
|
39
|
-
${iconAlign ? `icon-${iconAlign}` : ''}`;
|
|
35
|
+
const getClass = () => "label-component ".concat(className, " ").concat(customClass, " ").concat(bordered ? '-bordered' : '', " ").concat(disabled ? '-disabled' : '', "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(size ? "-".concat(size) : '', "\n ").concat(iconAlign ? "icon-".concat(iconAlign) : '');
|
|
40
36
|
const getIcon = () => {
|
|
41
37
|
if (icon) {
|
|
42
38
|
return icon;
|
package/lib/list/Header.js
CHANGED
|
@@ -14,7 +14,7 @@ const Header = _ref => {
|
|
|
14
14
|
customClass
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
17
|
-
className:
|
|
17
|
+
className: "list-header ".concat(customClass),
|
|
18
18
|
style: style
|
|
19
19
|
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
20
20
|
className: "title"
|
package/lib/list/Item.js
CHANGED
|
@@ -14,8 +14,7 @@ var constants = _interopRequireWildcard(require("../internals/constants"));
|
|
|
14
14
|
var _permissionValidations = require("../permissionValidations");
|
|
15
15
|
var _tooltip = require("../tooltip");
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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 _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
|
const Item = props => {
|
|
21
20
|
const {
|
|
@@ -62,8 +61,7 @@ const Item = props => {
|
|
|
62
61
|
const disabledByPermission = onDenied.disabled;
|
|
63
62
|
const shouldDisable = () => disabled || onDenied.disabled;
|
|
64
63
|
const disabledIconColor = 'rgb(193, 193, 193)';
|
|
65
|
-
const getClass = () =>
|
|
66
|
-
${displayCheckbox && 'list-checkbox'}`;
|
|
64
|
+
const getClass = () => "item ".concat(customClass, " ").concat(separator && 'list-separator', " ").concat(shouldDisable() && 'disabled', "\n ").concat(displayCheckbox && 'list-checkbox');
|
|
67
65
|
const getIcon = (iconName, icon) => {
|
|
68
66
|
const noIconDisabledByPermission = !icon && !displayCheckbox && !leftElement && !leftIconName && !leftIcon && onDenied.disabled;
|
|
69
67
|
if (icon) {
|
|
@@ -94,7 +92,8 @@ const Item = props => {
|
|
|
94
92
|
handleOnSelectItem(e);
|
|
95
93
|
if (url) {
|
|
96
94
|
if (target === '_blank') {
|
|
97
|
-
|
|
95
|
+
var _window$open;
|
|
96
|
+
(_window$open = window.open(url, '_blank')) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
98
97
|
} else {
|
|
99
98
|
navigate(url);
|
|
100
99
|
}
|
|
@@ -138,8 +137,7 @@ const Item = props => {
|
|
|
138
137
|
},
|
|
139
138
|
onMouseDown: onMouseDown,
|
|
140
139
|
style: style,
|
|
141
|
-
className:
|
|
142
|
-
${itemId && selectedItemId === itemId ? '-activedlist' : ''}`
|
|
140
|
+
className: "item-container ".concat(hovered && 'hovered', "\n ").concat(itemId && selectedItemId === itemId ? '-activedlist' : '')
|
|
143
141
|
}, getProps(), {
|
|
144
142
|
key: itemId
|
|
145
143
|
}), url && !shouldDisable() && /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
@@ -147,15 +145,15 @@ const Item = props => {
|
|
|
147
145
|
to: url,
|
|
148
146
|
target: target
|
|
149
147
|
}), (displayCheckbox || leftElement || leftIconName || leftIcon) && /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
className:
|
|
148
|
+
className: "".concat(getClass(), " -icon-left")
|
|
151
149
|
}, renderCheckBox, leftElement, getIcon(leftIconName, leftIcon)), (text || subText || children) && /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
-
className:
|
|
150
|
+
className: "".concat(getClass())
|
|
153
151
|
}, text && /*#__PURE__*/_react.default.createElement("p", {
|
|
154
|
-
className:
|
|
152
|
+
className: "".concat(text && 'text')
|
|
155
153
|
}, text), subText && /*#__PURE__*/_react.default.createElement("p", {
|
|
156
|
-
className:
|
|
154
|
+
className: "".concat(subText && 'subtext')
|
|
157
155
|
}, subText), children), (rightIconName || rightIcon || rightElement || disabledByPermission) && /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
-
className:
|
|
156
|
+
className: "".concat(getClass(), " -icon-right")
|
|
159
157
|
}, getIcon(rightIconName, rightIcon), rightElement)), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
|
|
160
158
|
targetRef: itemRef,
|
|
161
159
|
text: tooltip,
|
package/lib/list/index.js
CHANGED
|
@@ -31,8 +31,7 @@ require("../assets/styles/list.scss");
|
|
|
31
31
|
var _helpers = require("./helpers");
|
|
32
32
|
var _skeleton = _interopRequireDefault(require("../skeleton"));
|
|
33
33
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
34
|
-
function
|
|
35
|
-
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; }
|
|
34
|
+
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); }
|
|
36
35
|
const List = props => {
|
|
37
36
|
const {
|
|
38
37
|
children,
|
|
@@ -175,8 +174,7 @@ const List = props => {
|
|
|
175
174
|
"data-testid": "list-component",
|
|
176
175
|
style: style,
|
|
177
176
|
ref: listRef,
|
|
178
|
-
className:
|
|
179
|
-
${customClass} ${!transparent && '-listbackground'}`
|
|
177
|
+
className: "list-component ".concat(condensed && '-condensed', "\n ").concat(customClass, " ").concat(!transparent && '-listbackground')
|
|
180
178
|
}, newChildren));
|
|
181
179
|
};
|
|
182
180
|
var _default = exports.default = List;
|
|
@@ -11,8 +11,7 @@ var _withDropdown = require("../../dropdown/withDropdown");
|
|
|
11
11
|
var _buttons = _interopRequireDefault(require("../../buttons"));
|
|
12
12
|
var _helpers = _interopRequireDefault(require("./helpers"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function
|
|
15
|
-
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; }
|
|
14
|
+
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); }
|
|
16
15
|
const MenuItem = _ref => {
|
|
17
16
|
let {
|
|
18
17
|
title,
|
|
@@ -29,7 +28,7 @@ const MenuItem = _ref => {
|
|
|
29
28
|
const dropdownContext = (0, _react.useContext)(_withDropdown.WithDropdownContext);
|
|
30
29
|
const handleOnClick = () => {
|
|
31
30
|
if (onClick) {
|
|
32
|
-
onClick(dropdownContext
|
|
31
|
+
onClick(dropdownContext === null || dropdownContext === void 0 ? void 0 : dropdownContext.handleDropdownClose);
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
34
|
if (dropdownContext) dropdownContext.handleDropdownClose();
|
|
@@ -37,7 +36,7 @@ const MenuItem = _ref => {
|
|
|
37
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
37
|
className: "floatmenuitem"
|
|
39
38
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
-
className:
|
|
39
|
+
className: "".concat(customClassMenuItem, " -items")
|
|
41
40
|
}, !_lodash.default.isEmpty(dropdownMenu) && !onClick && /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
42
41
|
customClass: "floatmenudropdown",
|
|
43
42
|
iconName: "more1",
|