linear-react-components-ui 1.1.25-rc.2 → 1.1.26-beta-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/@types/Align.d.ts +2 -4
- package/lib/@types/ButtonTypes.d.ts +1 -3
- package/lib/@types/ColorStyles.d.ts +1 -3
- package/lib/@types/DataCombo.d.ts +1 -3
- package/lib/@types/Icon.d.ts +2 -5
- package/lib/@types/LabelStyles.d.ts +1 -3
- package/lib/@types/Period.d.ts +1 -3
- package/lib/@types/PermissionAttr.d.ts +2 -4
- package/lib/@types/PointerEvents.d.ts +1 -3
- package/lib/@types/Position.d.ts +1 -3
- package/lib/@types/PositionAlert.d.ts +1 -3
- package/lib/@types/Size.d.ts +1 -3
- package/lib/@types/SizePixels.d.ts +1 -3
- package/lib/@types/StorageMock.d.ts +1 -3
- package/lib/alerts/AlertContainer.d.ts +2 -8
- package/lib/alerts/AlertContainer.js +55 -71
- package/lib/alerts/AlertProvider.d.ts +3 -9
- package/lib/alerts/AlertProvider.js +32 -65
- package/lib/alerts/BaseAlert.d.ts +3 -9
- package/lib/alerts/BaseAlert.js +15 -31
- package/lib/alerts/Message.d.ts +3 -9
- package/lib/alerts/Message.js +65 -112
- package/lib/alerts/alert.spec.d.ts +0 -0
- package/lib/alerts/helpers.d.ts +3 -9
- package/lib/alerts/helpers.js +5 -9
- package/lib/alerts/index.d.ts +4 -11
- package/lib/alerts/index.js +6 -16
- package/lib/alerts/types.d.ts +10 -14
- package/lib/alerts/withAlert.d.ts +4 -9
- package/lib/alerts/withAlert.js +9 -23
- package/lib/assets/BaseAlert.css +1 -0
- package/lib/assets/Content.css +1 -0
- package/lib/assets/DefaultFile.css +1 -0
- package/lib/assets/Drawer.css +1 -0
- package/lib/assets/InputTextBase.css +1 -0
- package/lib/assets/button.css +1 -0
- package/lib/assets/gridlayout.css +1 -0
- package/lib/assets/index.css +1 -0
- package/lib/assets/index10.css +1 -0
- package/lib/assets/index11.css +1 -0
- package/lib/assets/index12.css +1 -0
- package/lib/assets/index13.css +1 -0
- package/lib/assets/index14.css +1 -0
- package/lib/assets/index15.css +1 -0
- package/lib/assets/index16.css +1 -0
- package/lib/assets/index17.css +1 -0
- package/lib/assets/index18.css +1 -0
- package/lib/assets/index19.css +1 -0
- package/lib/assets/index2.css +1 -0
- package/lib/assets/index20.css +1 -0
- package/lib/assets/index21.css +1 -0
- package/lib/assets/index22.css +1 -0
- package/lib/assets/index23.css +1 -0
- package/lib/assets/index24.css +1 -0
- package/lib/assets/index25.css +1 -0
- package/lib/assets/index26.css +1 -0
- package/lib/assets/index27.css +1 -0
- package/lib/assets/index28.css +1 -0
- package/lib/assets/index29.css +1 -0
- package/lib/assets/index3.css +1 -0
- package/lib/assets/index4.css +1 -0
- package/lib/assets/index5.css +1 -0
- package/lib/assets/index6.css +1 -0
- package/lib/assets/index7.css +1 -0
- package/lib/assets/index8.css +1 -0
- package/lib/assets/index9.css +1 -0
- package/lib/assets/label.css +1 -0
- package/lib/assets/noPermission.css +1 -0
- package/lib/assets/panel.css +1 -0
- package/lib/assets/radio.css +1 -0
- package/lib/assets/skeleton.css +1 -0
- package/lib/assets/table.css +1 -0
- package/lib/assets/tabs.css +1 -0
- package/lib/assets/toolbar.css +1 -0
- package/lib/assets/withDropdown.css +1 -0
- package/lib/avatar/avatar.spec.d.ts +1 -0
- package/lib/avatar/index.d.ts +3 -9
- package/lib/avatar/index.js +75 -89
- package/lib/avatar/types.d.ts +4 -8
- package/lib/badge/badge.spec.d.ts +1 -0
- package/lib/badge/index.d.ts +3 -6
- package/lib/badge/index.js +24 -28
- package/lib/badge/types.d.ts +1 -4
- package/lib/buttons/ActivateButton.d.ts +3 -11
- package/lib/buttons/ActivateButton.js +6 -14
- package/lib/buttons/AddButton.d.ts +3 -11
- package/lib/buttons/AddButton.js +7 -18
- package/lib/buttons/Button.d.ts +3 -11
- package/lib/buttons/Button.js +7 -22
- package/lib/buttons/ButtonGroups.d.ts +2 -4
- package/lib/buttons/ButtonGroups.js +4 -16
- package/lib/buttons/CancelButton.d.ts +3 -11
- package/lib/buttons/CancelButton.js +5 -22
- package/lib/buttons/DangerButton.d.ts +3 -11
- package/lib/buttons/DangerButton.js +5 -22
- package/lib/buttons/DefaultButton.d.ts +3 -11
- package/lib/buttons/DefaultButton.js +123 -171
- package/lib/buttons/DestroyButton.d.ts +3 -11
- package/lib/buttons/DestroyButton.js +6 -21
- package/lib/buttons/EditButton.d.ts +3 -11
- package/lib/buttons/EditButton.js +6 -14
- package/lib/buttons/InactivateButton.d.ts +3 -11
- package/lib/buttons/InactivateButton.js +6 -14
- package/lib/buttons/InfoButton.d.ts +3 -11
- package/lib/buttons/InfoButton.js +5 -22
- package/lib/buttons/PrimaryButton.d.ts +3 -11
- package/lib/buttons/PrimaryButton.js +5 -22
- package/lib/buttons/RestoreButton.d.ts +3 -11
- package/lib/buttons/RestoreButton.js +6 -14
- package/lib/buttons/SaveButton.d.ts +3 -11
- package/lib/buttons/SaveButton.js +5 -22
- package/lib/buttons/SuccessButton.d.ts +3 -11
- package/lib/buttons/SuccessButton.js +5 -22
- package/lib/buttons/WarningButton.d.ts +3 -11
- package/lib/buttons/WarningButton.js +5 -22
- package/lib/buttons/button_container/index.d.ts +4 -6
- package/lib/buttons/button_container/index.js +16 -28
- package/lib/buttons/buttons.spec.d.ts +0 -0
- package/lib/buttons/index.d.ts +17 -26
- package/lib/buttons/index.js +33 -108
- package/lib/buttons/split_button/index.d.ts +3 -11
- package/lib/buttons/split_button/index.js +56 -59
- package/lib/buttons/types.d.ts +8 -15
- package/lib/calendar/DangerCalendar.d.ts +3 -8
- package/lib/calendar/DangerCalendar.js +5 -17
- package/lib/calendar/InfoCalendar.d.ts +3 -8
- package/lib/calendar/InfoCalendar.js +5 -17
- package/lib/calendar/PrimaryCalendar.d.ts +3 -8
- package/lib/calendar/PrimaryCalendar.js +5 -17
- package/lib/calendar/SuccessCalendar.d.ts +3 -8
- package/lib/calendar/SuccessCalendar.js +5 -17
- package/lib/calendar/WarningCalendar.d.ts +3 -8
- package/lib/calendar/WarningCalendar.js +5 -17
- package/lib/calendar/base/Day.d.ts +3 -0
- package/lib/calendar/base/Day.js +27 -0
- package/lib/calendar/base/Month.d.ts +3 -0
- package/lib/calendar/base/Month.js +25 -0
- package/lib/calendar/base/Week.d.ts +3 -0
- package/lib/calendar/base/Week.js +23 -0
- package/lib/calendar/base/helpers.d.ts +15 -18
- package/lib/calendar/base/helpers.js +87 -96
- package/lib/calendar/base/index.d.ts +3 -8
- package/lib/calendar/base/index.js +100 -195
- package/lib/calendar/calendar.spec.d.ts +0 -0
- package/lib/calendar/index.d.ts +8 -14
- package/lib/calendar/index.js +14 -44
- package/lib/calendar/types.d.ts +5 -8
- package/lib/checkbox/checkbox.spec.d.ts +1 -0
- package/lib/checkbox/index.d.ts +4 -8
- package/lib/checkbox/index.js +31 -145
- package/lib/checkbox/types.d.ts +5 -7
- package/lib/chunks/index.CmrLK9Qe.js +675 -0
- package/lib/chunks/index.D5f6Ow9V.js +89 -0
- package/lib/chunks/index.Da--18GT.js +669 -0
- package/lib/chunks/index.yztgndLc.js +206 -0
- package/lib/chunks/jsx-runtime.CYK1ROHF.js +445 -0
- package/lib/chunks/tabs.Cvj2MJH6.js +246 -0
- package/lib/chunks/v1.CDXKvGzE.js +41 -0
- package/lib/dialog/Alert.d.ts +3 -9
- package/lib/dialog/Alert.js +22 -31
- package/lib/dialog/Custom.d.ts +3 -9
- package/lib/dialog/Custom.js +31 -54
- package/lib/dialog/Error.d.ts +3 -9
- package/lib/dialog/Error.js +22 -31
- package/lib/dialog/Information.d.ts +3 -9
- package/lib/dialog/Information.js +22 -31
- package/lib/dialog/Question.d.ts +3 -9
- package/lib/dialog/Question.js +59 -58
- package/lib/dialog/Warning.d.ts +3 -9
- package/lib/dialog/Warning.js +22 -31
- package/lib/dialog/base/Content.d.ts +3 -9
- package/lib/dialog/base/Content.js +5 -22
- package/lib/dialog/base/Footer.d.ts +3 -9
- package/lib/dialog/base/Footer.js +5 -12
- package/lib/dialog/base/Header.d.ts +3 -9
- package/lib/dialog/base/Header.js +6 -57
- package/lib/dialog/base/index.d.ts +5 -10
- package/lib/dialog/base/index.js +8 -210
- package/lib/dialog/base/style.d.ts +7 -0
- package/lib/dialog/dialog.spec.d.ts +0 -0
- package/lib/dialog/form/index.d.ts +5 -10
- package/lib/dialog/form/index.js +14 -84
- package/lib/dialog/index.d.ts +9 -16
- package/lib/dialog/index.js +16 -51
- package/lib/dialog/types.d.ts +16 -21
- package/lib/dialog/wizard/index.d.ts +9 -13
- package/lib/dialog/wizard/index.js +14 -80
- package/lib/dialog/wizard/progressbar.d.ts +2 -5
- package/lib/dialog/wizard/progressbar.js +5 -38
- package/lib/dialog/wizard/step.d.ts +2 -9
- package/lib/dialog/wizard/step.js +5 -22
- package/lib/dialog/wizard/useWizard.d.ts +2 -9
- package/lib/dialog/wizard/useWizard.js +26 -42
- package/lib/dialog/wizard/wizard.spec.d.ts +0 -0
- package/lib/drawer/Content.d.ts +3 -10
- package/lib/drawer/Content.js +10 -25
- package/lib/drawer/Drawer.d.ts +4 -10
- package/lib/drawer/Drawer.js +68 -142
- package/lib/drawer/Drawer.spec.d.ts +1 -0
- package/lib/drawer/Header.d.ts +3 -10
- package/lib/drawer/Header.js +40 -73
- package/lib/drawer/helpers.d.ts +4 -10
- package/lib/drawer/helpers.js +5 -10
- package/lib/drawer/index.d.ts +5 -12
- package/lib/drawer/index.js +10 -25
- package/lib/drawer/types.d.ts +7 -12
- package/lib/dropdown/Popup.d.ts +3 -6
- package/lib/dropdown/Popup.js +45 -86
- package/lib/dropdown/dropdown.spec.d.ts +1 -0
- package/lib/dropdown/helper.d.ts +2 -4
- package/lib/dropdown/helper.js +7 -15
- package/lib/dropdown/types.d.ts +7 -10
- package/lib/dropdown/withDropdown.d.ts +7 -8
- package/lib/dropdown/withDropdown.js +50 -88
- package/lib/fieldset/fieldset.spec.d.ts +1 -0
- package/lib/fieldset/index.d.ts +3 -8
- package/lib/fieldset/index.js +49 -81
- package/lib/fieldset/types.d.ts +5 -8
- package/lib/form/Field.d.ts +2 -14
- package/lib/form/Field.js +66 -129
- package/lib/form/FieldArray.d.ts +2 -14
- package/lib/form/FieldArray.js +83 -96
- package/lib/form/FieldNumber.d.ts +2 -14
- package/lib/form/FieldNumber.js +42 -75
- package/lib/form/FieldPeriod.d.ts +2 -14
- package/lib/form/FieldPeriod.js +57 -94
- package/lib/form/form.spec.d.ts +0 -0
- package/lib/form/helpers.d.ts +8 -19
- package/lib/form/helpers.js +23 -48
- package/lib/form/index.d.ts +8 -18
- package/lib/form/index.js +153 -299
- package/lib/form/types.d.ts +23 -45
- package/lib/form/withFieldHOC.d.ts +4 -14
- package/lib/form/withFieldHOC.js +47 -67
- package/lib/form/withFormSecurity.d.ts +6 -15
- package/lib/form/withFormSecurity.js +31 -53
- package/lib/gridlayout/GridCol.d.ts +3 -6
- package/lib/gridlayout/GridCol.js +24 -32
- package/lib/gridlayout/GridRow.d.ts +3 -6
- package/lib/gridlayout/GridRow.js +22 -32
- package/lib/gridlayout/gridLayout.spec.d.ts +1 -0
- package/lib/gridlayout/index.d.ts +4 -8
- package/lib/gridlayout/index.js +6 -16
- package/lib/gridlayout/types.d.ts +3 -6
- package/lib/hint/helpers.d.ts +1 -3
- package/lib/hint/helpers.js +8 -21
- package/lib/hint/hint.spec.d.ts +1 -0
- package/lib/hint/index.d.ts +3 -7
- package/lib/hint/index.js +25 -33
- package/lib/hint/types.d.ts +2 -5
- package/lib/icons/helper.d.ts +1 -2
- package/lib/icons/helper.js +748 -324
- package/lib/icons/icons.spec.d.ts +1 -0
- package/lib/icons/index.d.ts +3 -12
- package/lib/icons/index.js +58 -70
- package/lib/icons/types.d.ts +8 -11
- package/lib/index.d.ts +10 -39
- package/lib/index.js +27 -69
- package/lib/inputs/base/InputTextBase.d.ts +3 -11
- package/lib/inputs/base/InputTextBase.js +259 -257
- package/lib/inputs/base/Label.d.ts +3 -11
- package/lib/inputs/base/Label.js +30 -33
- package/lib/inputs/base/base.spec.d.ts +1 -0
- package/lib/inputs/base/helpers.d.ts +6 -13
- package/lib/inputs/base/helpers.js +25 -43
- package/lib/inputs/base/types.d.ts +9 -14
- package/lib/inputs/color/color_input.spec.d.ts +0 -0
- package/lib/inputs/color/index.d.ts +3 -7
- package/lib/inputs/color/index.js +73 -90
- package/lib/inputs/color/types.d.ts +2 -5
- package/lib/inputs/date/Dialog.d.ts +3 -13
- package/lib/inputs/date/Dialog.js +16 -24
- package/lib/inputs/date/Dropdown.d.ts +3 -13
- package/lib/inputs/date/Dropdown.js +15 -36
- package/lib/inputs/date/date.spec.d.ts +1 -0
- package/lib/inputs/date/helpers.d.ts +2 -34
- package/lib/inputs/date/helpers.js +9 -47
- package/lib/inputs/date/index.d.ts +3 -13
- package/lib/inputs/date/index.js +168 -277
- package/lib/inputs/date/types.d.ts +6 -14
- package/lib/inputs/errorMessage/error.spec.d.ts +1 -0
- package/lib/inputs/errorMessage/index.d.ts +4 -16
- package/lib/inputs/errorMessage/index.js +15 -25
- package/lib/inputs/file/DefaultFile.d.ts +3 -13
- package/lib/inputs/file/DefaultFile.js +68 -77
- package/lib/inputs/file/DragDropFile.d.ts +3 -13
- package/lib/inputs/file/DragDropFile.js +183 -264
- package/lib/inputs/file/File.d.ts +3 -13
- package/lib/inputs/file/File.js +42 -60
- package/lib/inputs/file/FileButtonSettings.d.ts +3 -13
- package/lib/inputs/file/FileButtonSettings.js +20 -32
- package/lib/inputs/file/filefield.spec.d.ts +1 -0
- package/lib/inputs/file/helpers.d.ts +2 -13
- package/lib/inputs/file/helpers.js +9 -19
- package/lib/inputs/file/index.d.ts +5 -16
- package/lib/inputs/file/index.js +8 -24
- package/lib/inputs/file/types.d.ts +8 -16
- package/lib/inputs/inputHOC.d.ts +4 -16
- package/lib/inputs/inputHOC.js +21 -41
- package/lib/inputs/mask/BaseMask.d.ts +3 -12
- package/lib/inputs/mask/BaseMask.js +2626 -147
- package/lib/inputs/mask/Cnpj.d.ts +3 -12
- package/lib/inputs/mask/Cnpj.js +35 -55
- package/lib/inputs/mask/Cpf.d.ts +3 -12
- package/lib/inputs/mask/Cpf.js +33 -54
- package/lib/inputs/mask/Phone.d.ts +3 -12
- package/lib/inputs/mask/Phone.js +8 -18
- package/lib/inputs/mask/ZipCode.d.ts +3 -12
- package/lib/inputs/mask/ZipCode.js +6 -14
- package/lib/inputs/mask/helpers.d.ts +52 -15
- package/lib/inputs/mask/helpers.js +62 -118
- package/lib/inputs/mask/index.d.ts +7 -17
- package/lib/inputs/mask/index.js +12 -37
- package/lib/inputs/mask/input_mask.spec.d.ts +0 -0
- package/lib/inputs/mask/types.d.ts +9 -16
- package/lib/inputs/multiSelect/ActionButtons.d.ts +3 -13
- package/lib/inputs/multiSelect/ActionButtons.js +49 -50
- package/lib/inputs/multiSelect/Dropdown.d.ts +3 -13
- package/lib/inputs/multiSelect/Dropdown.js +133 -132
- package/lib/inputs/multiSelect/helper.d.ts +2 -12
- package/lib/inputs/multiSelect/helper.js +9 -18
- package/lib/inputs/multiSelect/index.d.ts +3 -13
- package/lib/inputs/multiSelect/index.js +133 -211
- package/lib/inputs/multiSelect/multiSelect.spec.d.ts +1 -0
- package/lib/inputs/multiSelect/types.d.ts +7 -15
- package/lib/inputs/number/BaseNumber.d.ts +3 -17
- package/lib/inputs/number/BaseNumber.js +39 -70
- package/lib/inputs/number/Currency.d.ts +3 -17
- package/lib/inputs/number/Currency.js +14 -28
- package/lib/inputs/number/Decimal.d.ts +3 -17
- package/lib/inputs/number/Decimal.js +6 -11
- package/lib/inputs/number/format_number.d.ts +3 -5
- package/lib/inputs/number/format_number.js +8 -28
- package/lib/inputs/number/index.d.ts +6 -19
- package/lib/inputs/number/index.js +35 -61
- package/lib/inputs/number/numberfield.spec.d.ts +1 -0
- package/lib/inputs/number/types.d.ts +8 -19
- package/lib/inputs/period/Dialog.d.ts +3 -14
- package/lib/inputs/period/Dialog.js +16 -25
- package/lib/inputs/period/Dropdown.d.ts +3 -14
- package/lib/inputs/period/Dropdown.js +16 -34
- package/lib/inputs/period/PeriodList.d.ts +3 -14
- package/lib/inputs/period/PeriodList.js +26 -58
- package/lib/inputs/period/helper.d.ts +5 -16
- package/lib/inputs/period/helper.js +26 -57
- package/lib/inputs/period/index.d.ts +3 -14
- package/lib/inputs/period/index.js +322 -518
- package/lib/inputs/period/types.d.ts +13 -22
- package/lib/inputs/search/index.d.ts +3 -16
- package/lib/inputs/search/index.js +76 -129
- package/lib/inputs/search/search_input.spec.d.ts +1 -0
- package/lib/inputs/select/ActionButtons.d.ts +3 -16
- package/lib/inputs/select/ActionButtons.js +47 -37
- package/lib/inputs/select/Dropdown.d.ts +3 -16
- package/lib/inputs/select/Dropdown.js +116 -111
- package/lib/inputs/select/helper.d.ts +7 -21
- package/lib/inputs/select/helper.js +48 -106
- package/lib/inputs/select/index.d.ts +3 -13
- package/lib/inputs/select/index.js +28 -41
- package/lib/inputs/select/multiple/Selecteds.d.ts +3 -13
- package/lib/inputs/select/multiple/Selecteds.js +20 -26
- package/lib/inputs/select/multiple/index.d.ts +3 -13
- package/lib/inputs/select/multiple/index.js +187 -276
- package/lib/inputs/select/select.spec.d.ts +1 -0
- package/lib/inputs/select/simple/index.d.ts +3 -13
- package/lib/inputs/select/simple/index.js +205 -290
- package/lib/inputs/select/types.d.ts +14 -21
- package/lib/inputs/text/index.d.ts +3 -12
- package/lib/inputs/text/index.js +6 -13
- package/lib/inputs/text/textfield.spec.d.ts +1 -0
- package/lib/inputs/text/types.d.ts +7 -11
- package/lib/inputs/textarea/index.d.ts +3 -12
- package/lib/inputs/textarea/index.js +17 -24
- package/lib/inputs/textarea/textarea.spec.d.ts +1 -0
- package/lib/inputs/textarea/types.d.ts +2 -11
- package/lib/inputs/types.d.ts +17 -25
- package/lib/internals/colorStyles.d.ts +1 -2
- package/lib/internals/colorStyles.js +9 -13
- package/lib/internals/constants.d.ts +2 -7
- package/lib/internals/constants.js +5 -11
- package/lib/internals/types.d.ts +6 -9
- package/lib/internals/withTooltip.d.ts +6 -10
- package/lib/internals/withTooltip.js +61 -158
- package/lib/labelMessages/index.d.ts +3 -9
- package/lib/labelMessages/index.js +46 -58
- package/lib/labelMessages/labelMessages.spec.d.ts +1 -0
- package/lib/labelMessages/types.d.ts +3 -7
- package/lib/labels/DangerLabel.d.ts +3 -11
- package/lib/labels/DangerLabel.js +5 -17
- package/lib/labels/DefaultLabel.d.ts +3 -11
- package/lib/labels/DefaultLabel.js +39 -53
- package/lib/labels/InfoLabel.d.ts +3 -11
- package/lib/labels/InfoLabel.js +5 -17
- package/lib/labels/PrimaryLabel.d.ts +3 -11
- package/lib/labels/PrimaryLabel.js +5 -17
- package/lib/labels/SuccessLabel.d.ts +3 -11
- package/lib/labels/SuccessLabel.js +5 -17
- package/lib/labels/WarningLabel.d.ts +3 -11
- package/lib/labels/WarningLabel.js +5 -17
- package/lib/labels/index.d.ts +9 -18
- package/lib/labels/index.js +17 -52
- package/lib/labels/label.spec.d.ts +1 -0
- package/lib/labels/label_container/index.d.ts +4 -6
- package/lib/labels/label_container/index.js +11 -21
- package/lib/labels/types.d.ts +5 -9
- package/lib/list/Header.d.ts +3 -10
- package/lib/list/Header.js +7 -22
- package/lib/list/Item.d.ts +3 -10
- package/lib/list/Item.js +12 -161
- package/lib/list/Separator.d.ts +2 -3
- package/lib/list/Separator.js +5 -12
- package/lib/list/helpers.d.ts +4 -10
- package/lib/list/helpers.js +10 -14
- package/lib/list/index.d.ts +7 -13
- package/lib/list/index.js +91 -172
- package/lib/list/list.spec.d.ts +1 -0
- package/lib/list/types.d.ts +10 -14
- package/lib/menus/float/MenuItem.d.ts +3 -9
- package/lib/menus/float/MenuItem.js +54 -65
- package/lib/menus/float/SubMenuContainer.d.ts +29 -0
- package/lib/menus/float/float-menu.spec.d.ts +0 -0
- package/lib/menus/float/helpers.d.ts +4 -9
- package/lib/menus/float/helpers.js +5 -10
- package/lib/menus/float/index.d.ts +6 -40
- package/lib/menus/float/index.js +88 -64
- package/lib/menus/float/types.d.ts +5 -9
- package/lib/menus/index.d.ts +2 -12
- package/lib/menus/index.js +4 -9
- package/lib/menus/sidenav/ExpandMenu.d.ts +3 -12
- package/lib/menus/sidenav/ExpandMenu.js +14 -24
- package/lib/menus/sidenav/MenuLink.d.ts +3 -12
- package/lib/menus/sidenav/MenuLink.js +15 -27
- package/lib/menus/sidenav/NavMenuGroup.d.ts +3 -12
- package/lib/menus/sidenav/NavMenuGroup.js +16 -25
- package/lib/menus/sidenav/NavMenuItem.d.ts +3 -12
- package/lib/menus/sidenav/NavMenuItem.js +110 -140
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +3 -12
- package/lib/menus/sidenav/NavSubMenuItem.js +22 -42
- package/lib/menus/sidenav/helpers.d.ts +5 -13
- package/lib/menus/sidenav/helpers.js +9 -17
- package/lib/menus/sidenav/index.d.ts +8 -16
- package/lib/menus/sidenav/index.js +122 -178
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +3 -12
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +18 -25
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +4 -12
- package/lib/menus/sidenav/popup_menu_search/index.js +83 -109
- package/lib/menus/sidenav/sidenav.spec.d.ts +1 -0
- package/lib/menus/sidenav/types.d.ts +18 -23
- package/lib/noPermission/index.d.ts +2 -3
- package/lib/noPermission/index.js +11 -23
- package/lib/panel/Content.d.ts +3 -10
- package/lib/panel/Content.js +42 -78
- package/lib/panel/DangerPanel.d.ts +3 -10
- package/lib/panel/DangerPanel.js +7 -15
- package/lib/panel/Default.d.ts +3 -10
- package/lib/panel/Default.js +38 -63
- package/lib/panel/Header.d.ts +3 -10
- package/lib/panel/Header.js +40 -73
- package/lib/panel/InfoPanel.d.ts +3 -10
- package/lib/panel/InfoPanel.js +7 -15
- package/lib/panel/PrimaryPanel.d.ts +3 -10
- package/lib/panel/PrimaryPanel.js +7 -15
- package/lib/panel/SuccessPanel.d.ts +3 -10
- package/lib/panel/SuccessPanel.js +7 -15
- package/lib/panel/ToolBar.d.ts +3 -10
- package/lib/panel/ToolBar.js +5 -21
- package/lib/panel/WarningPanel.d.ts +3 -10
- package/lib/panel/WarningPanel.js +7 -15
- package/lib/panel/helpers.d.ts +5 -11
- package/lib/panel/helpers.js +11 -24
- package/lib/panel/index.d.ts +10 -18
- package/lib/panel/index.js +19 -59
- package/lib/panel/panel.spec.d.ts +0 -0
- package/lib/panel/types.d.ts +11 -15
- package/lib/permissionValidations.d.ts +4 -6
- package/lib/permissionValidations.js +37 -54
- package/lib/popover/PopoverText.d.ts +4 -11
- package/lib/popover/PopoverText.js +7 -20
- package/lib/popover/PopoverTitle.d.ts +3 -11
- package/lib/popover/PopoverTitle.js +4 -16
- package/lib/popover/index.d.ts +6 -13
- package/lib/popover/index.js +55 -65
- package/lib/popover/popover.spec.d.ts +1 -0
- package/lib/popover/types.d.ts +8 -12
- package/lib/progress/Bar.d.ts +3 -6
- package/lib/progress/Bar.js +39 -71
- package/lib/progress/index.d.ts +5 -7
- package/lib/progress/index.js +20 -37
- package/lib/progress/progress.spec.d.ts +1 -0
- package/lib/progress/types.d.ts +4 -7
- package/lib/radio/index.d.ts +3 -11
- package/lib/radio/index.js +94 -112
- package/lib/radio/radio.spec.d.ts +1 -0
- package/lib/radio/types.d.ts +3 -6
- package/lib/shortcuts/index.d.ts +3 -7
- package/lib/shortcuts/index.js +8 -27
- package/lib/shortcuts/shortcuts.spec.d.ts +0 -0
- package/lib/shortcuts/types.d.ts +2 -5
- package/lib/skeleton/SkeletonContainer.d.ts +3 -7
- package/lib/skeleton/SkeletonContainer.js +8 -22
- package/lib/skeleton/index.d.ts +5 -8
- package/lib/skeleton/index.js +23 -52
- package/lib/skeleton/types.d.ts +3 -6
- package/lib/spinner/SpinnerLoading.d.ts +3 -7
- package/lib/spinner/SpinnerLoading.js +17 -219
- package/lib/spinner/index.d.ts +3 -7
- package/lib/spinner/index.js +38 -57
- package/lib/spinner/spinner.spec.d.ts +1 -0
- package/lib/spinner/types.d.ts +5 -8
- package/lib/split/Split.d.ts +3 -6
- package/lib/split/Split.js +172 -275
- package/lib/split/SplitSide.d.ts +3 -6
- package/lib/split/SplitSide.js +17 -40
- package/lib/split/helpers.d.ts +4 -6
- package/lib/split/helpers.js +5 -10
- package/lib/split/index.d.ts +4 -8
- package/lib/split/index.js +6 -17
- package/lib/split/split.spec.d.ts +0 -0
- package/lib/split/types.d.ts +3 -6
- package/lib/table/Body.d.ts +3 -6
- package/lib/table/Body.js +56 -68
- package/lib/table/Header.d.ts +3 -6
- package/lib/table/Header.js +38 -86
- package/lib/table/HeaderColumn.d.ts +3 -6
- package/lib/table/HeaderColumn.js +27 -52
- package/lib/table/Row.d.ts +3 -6
- package/lib/table/Row.js +51 -75
- package/lib/table/RowColumn.d.ts +3 -6
- package/lib/table/RowColumn.js +41 -76
- package/lib/table/helpers.d.ts +6 -7
- package/lib/table/helpers.js +7 -15
- package/lib/table/index.d.ts +9 -11
- package/lib/table/index.js +105 -154
- package/lib/table/table.spec.d.ts +1 -0
- package/lib/table/types.d.ts +8 -12
- package/lib/tabs/DropdownTabs.d.ts +3 -11
- package/lib/tabs/DropdownTabs.js +78 -84
- package/lib/tabs/Menu.d.ts +3 -11
- package/lib/tabs/Menu.js +50 -46
- package/lib/tabs/MenuTabs.d.ts +4 -11
- package/lib/tabs/MenuTabs.js +87 -93
- package/lib/tabs/Panel.d.ts +3 -11
- package/lib/tabs/Panel.js +48 -80
- package/lib/tabs/context.d.ts +4 -12
- package/lib/tabs/context.js +63 -124
- package/lib/tabs/index.d.ts +5 -12
- package/lib/tabs/index.js +66 -74
- package/lib/tabs/tabHelpers.d.ts +7 -10
- package/lib/tabs/tabHelpers.js +39 -63
- package/lib/tabs/tabs.spec.d.ts +0 -0
- package/lib/tabs/types.d.ts +14 -24
- package/lib/tabs/useTabs.d.ts +1 -11
- package/lib/tabs/useTabs.js +8 -11
- package/lib/textContent/index.d.ts +6 -10
- package/lib/textContent/index.js +34 -37
- package/lib/textContent/textContent.spec.d.ts +1 -0
- package/lib/toolbar/ButtonBar.d.ts +3 -12
- package/lib/toolbar/ButtonBar.js +60 -63
- package/lib/toolbar/LabelBar.d.ts +3 -12
- package/lib/toolbar/LabelBar.js +40 -55
- package/lib/toolbar/Separator.d.ts +2 -3
- package/lib/toolbar/Separator.js +5 -12
- package/lib/toolbar/ToolBarGroup.d.ts +3 -12
- package/lib/toolbar/ToolBarGroup.js +4 -18
- package/lib/toolbar/helpers.d.ts +3 -12
- package/lib/toolbar/helpers.js +5 -9
- package/lib/toolbar/index.d.ts +8 -16
- package/lib/toolbar/index.js +32 -64
- package/lib/toolbar/toolbar.spec.d.ts +1 -0
- package/lib/toolbar/types.d.ts +11 -15
- package/lib/tooltip/index.d.ts +4 -6
- package/lib/tooltip/index.js +37 -61
- package/lib/tooltip/tooltip.spec.d.ts +1 -0
- package/lib/tooltip/types.d.ts +2 -4
- package/lib/treetable/Body.d.ts +2 -3
- package/lib/treetable/Body.js +33 -32
- package/lib/treetable/Header.d.ts +2 -3
- package/lib/treetable/Header.js +25 -23
- package/lib/treetable/Row.d.ts +3 -7
- package/lib/treetable/Row.js +152 -232
- package/lib/treetable/helpers.d.ts +4 -9
- package/lib/treetable/helpers.js +23 -30
- package/lib/treetable/index.d.ts +4 -8
- package/lib/treetable/index.js +17 -27
- package/lib/treeview/Header.d.ts +3 -7
- package/lib/treeview/Header.js +7 -20
- package/lib/treeview/Node.d.ts +3 -7
- package/lib/treeview/Node.js +173 -235
- package/lib/treeview/constants.d.ts +3 -7
- package/lib/treeview/constants.js +5 -9
- package/lib/treeview/index.d.ts +6 -9
- package/lib/treeview/index.js +177 -312
- package/lib/treeview/treeview.spec.d.ts +0 -0
- package/lib/treeview/types.d.ts +12 -14
- package/lib/uitour/helpers.d.ts +1 -2
- package/lib/uitour/helpers.js +9 -12
- package/lib/uitour/index.d.ts +4 -7
- package/lib/uitour/index.js +167 -236
- package/lib/uitour/types.d.ts +7 -10
- package/lib/uitour/uitour.spec.d.ts +0 -0
- package/package.json +37 -58
- package/lib/@types/Align.js +0 -5
- package/lib/@types/ButtonTypes.js +0 -5
- package/lib/@types/ColorStyles.js +0 -5
- package/lib/@types/DataCombo.js +0 -5
- package/lib/@types/Icon.js +0 -5
- package/lib/@types/LabelStyles.js +0 -5
- package/lib/@types/Period.js +0 -5
- package/lib/@types/PermissionAttr.js +0 -5
- package/lib/@types/PointerEvents.js +0 -5
- package/lib/@types/Position.js +0 -5
- package/lib/@types/PositionAlert.js +0 -5
- package/lib/@types/Size.js +0 -5
- package/lib/@types/SizePixels.js +0 -5
- package/lib/@types/StorageMock.js +0 -5
- package/lib/alerts/types.js +0 -5
- package/lib/assets/fonts/Roboto-Black.woff +0 -0
- package/lib/assets/fonts/Roboto-Black.woff2 +0 -0
- package/lib/assets/fonts/Roboto-Bold.woff +0 -0
- package/lib/assets/fonts/Roboto-Bold.woff2 +0 -0
- package/lib/assets/fonts/Roboto-Light.woff +0 -0
- package/lib/assets/fonts/Roboto-Light.woff2 +0 -0
- package/lib/assets/fonts/Roboto-Medium.woff +0 -0
- package/lib/assets/fonts/Roboto-Medium.woff2 +0 -0
- package/lib/assets/fonts/Roboto-Regular.woff +0 -0
- package/lib/assets/fonts/Roboto-Regular.woff2 +0 -0
- package/lib/assets/fonts/Roboto-Thin.woff +0 -0
- package/lib/assets/fonts/Roboto-Thin.woff2 +0 -0
- package/lib/assets/fonts/TitilliumWeb-Black.woff +0 -0
- package/lib/assets/fonts/TitilliumWeb-Black.woff2 +0 -0
- package/lib/assets/fonts/TitilliumWeb-Bold.woff +0 -0
- package/lib/assets/fonts/TitilliumWeb-Bold.woff2 +0 -0
- package/lib/assets/fonts/TitilliumWeb-ExtraLight.woff +0 -0
- package/lib/assets/fonts/TitilliumWeb-ExtraLight.woff2 +0 -0
- package/lib/assets/fonts/TitilliumWeb-Light.woff +0 -0
- package/lib/assets/fonts/TitilliumWeb-Light.woff2 +0 -0
- package/lib/assets/fonts/TitilliumWeb-Regular.woff +0 -0
- package/lib/assets/fonts/TitilliumWeb-Regular.woff2 +0 -0
- package/lib/assets/fonts/TitilliumWeb-SemiBold.woff +0 -0
- package/lib/assets/fonts/TitilliumWeb-SemiBold.woff2 +0 -0
- package/lib/assets/images/logo.png +0 -0
- package/lib/assets/styles/alerts.scss +0 -149
- package/lib/assets/styles/avatar.scss +0 -42
- package/lib/assets/styles/badge.scss +0 -48
- package/lib/assets/styles/button.scss +0 -373
- package/lib/assets/styles/calendar.scss +0 -311
- package/lib/assets/styles/checkbox.scss +0 -108
- package/lib/assets/styles/colorpicker.scss +0 -17
- package/lib/assets/styles/colors.scss +0 -144
- package/lib/assets/styles/commons.scss +0 -138
- package/lib/assets/styles/datepicker.scss +0 -36
- package/lib/assets/styles/dialog.scss +0 -200
- package/lib/assets/styles/drawers.scss +0 -159
- package/lib/assets/styles/dropdown.scss +0 -179
- package/lib/assets/styles/effects.scss +0 -821
- package/lib/assets/styles/error.scss +0 -9
- package/lib/assets/styles/fieldset.scss +0 -96
- package/lib/assets/styles/file.scss +0 -229
- package/lib/assets/styles/floatMenu.scss +0 -15
- package/lib/assets/styles/fonts.scss +0 -86
- package/lib/assets/styles/form.scss +0 -23
- package/lib/assets/styles/gridlayout.scss +0 -2054
- package/lib/assets/styles/hint.scss +0 -30
- package/lib/assets/styles/icon.scss +0 -42
- package/lib/assets/styles/input.scss +0 -156
- package/lib/assets/styles/label.scss +0 -118
- package/lib/assets/styles/labelMessages.scss +0 -81
- package/lib/assets/styles/list.scss +0 -124
- package/lib/assets/styles/multiSelect.scss +0 -125
- package/lib/assets/styles/noPermission.scss +0 -25
- package/lib/assets/styles/numbers.scss +0 -5
- package/lib/assets/styles/panel.scss +0 -95
- package/lib/assets/styles/periodpicker.scss +0 -109
- package/lib/assets/styles/popover.scss +0 -44
- package/lib/assets/styles/progress.scss +0 -72
- package/lib/assets/styles/radio.scss +0 -156
- package/lib/assets/styles/search.scss +0 -13
- package/lib/assets/styles/select.scss +0 -159
- package/lib/assets/styles/shortcuts.scss +0 -59
- package/lib/assets/styles/sidenav.scss +0 -409
- package/lib/assets/styles/skeleton.scss +0 -48
- package/lib/assets/styles/spinner.scss +0 -34
- package/lib/assets/styles/split.scss +0 -80
- package/lib/assets/styles/table.scss +0 -185
- package/lib/assets/styles/tabs.scss +0 -304
- package/lib/assets/styles/textContent.scss +0 -9
- package/lib/assets/styles/toolbar.scss +0 -74
- package/lib/assets/styles/tooltip.scss +0 -95
- package/lib/assets/styles/treetable.scss +0 -100
- package/lib/assets/styles/treeview.scss +0 -112
- package/lib/assets/styles/uitour.scss +0 -112
- package/lib/assets/styles/wizard.scss +0 -186
- package/lib/avatar/types.js +0 -5
- package/lib/badge/types.js +0 -5
- package/lib/buttons/types.js +0 -5
- package/lib/calendar/types.js +0 -5
- package/lib/checkbox/types.js +0 -5
- package/lib/dialog/base/style.js +0 -13
- package/lib/dialog/types.js +0 -5
- package/lib/drawer/types.js +0 -5
- package/lib/dropdown/types.js +0 -5
- package/lib/fieldset/types.js +0 -5
- package/lib/form/types.js +0 -5
- package/lib/gridlayout/types.js +0 -5
- package/lib/hint/types.js +0 -5
- package/lib/icons/types.js +0 -5
- package/lib/inputs/base/types.js +0 -5
- package/lib/inputs/color/types.js +0 -5
- package/lib/inputs/date/types.js +0 -5
- package/lib/inputs/file/types.js +0 -5
- package/lib/inputs/mask/types.js +0 -5
- package/lib/inputs/multiSelect/types.js +0 -5
- package/lib/inputs/number/types.js +0 -5
- package/lib/inputs/period/types.js +0 -5
- package/lib/inputs/select/types.js +0 -5
- package/lib/inputs/text/types.js +0 -5
- package/lib/inputs/textarea/types.js +0 -5
- package/lib/inputs/types.js +0 -5
- package/lib/internals/types.js +0 -5
- package/lib/labelMessages/types.js +0 -5
- package/lib/labels/types.js +0 -5
- package/lib/list/types.js +0 -5
- package/lib/menus/float/SubMenuContainer.js +0 -77
- package/lib/menus/float/types.js +0 -5
- package/lib/menus/sidenav/types.js +0 -5
- package/lib/panel/types.js +0 -5
- package/lib/popover/types.js +0 -5
- package/lib/progress/types.js +0 -5
- package/lib/radio/types.js +0 -5
- package/lib/shortcuts/types.js +0 -5
- package/lib/skeleton/types.js +0 -5
- package/lib/spinner/types.js +0 -5
- package/lib/split/types.js +0 -5
- package/lib/table/types.js +0 -5
- package/lib/tabs/types.js +0 -5
- package/lib/toolbar/types.js +0 -5
- package/lib/tooltip/types.js +0 -5
- package/lib/treetable/types.d.js +0 -5
- package/lib/treeview/types.js +0 -5
- package/lib/types.d-b477e076.d.ts +0 -47
- package/lib/uitour/types.js +0 -5
package/lib/tabs/context.js
CHANGED
|
@@ -1,129 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const [selectedTabId, setSelectedTabId] = _react.default.useState(selectedTab);
|
|
29
|
-
const [containerWidth, setContainerWidth] = (0, _react.useState)(() => {
|
|
30
|
-
return container.current?.clientWidth ?? 0;
|
|
31
|
-
});
|
|
32
|
-
const [tabs, setTabs] = (0, _react.useState)((0, _tabHelpers.getTabs)(tabsProp));
|
|
33
|
-
const menuRef = (0, _react.useRef)(null);
|
|
34
|
-
const menuSize = (menuRef.current?.clientWidth ?? 0) - 38 - (firstTabIdent ? 15 : 0);
|
|
35
|
-
const tabsWidth = (0, _react.useMemo)(() => {
|
|
36
|
-
if (typeof tabsWidthProp === 'string') return tabsWidthProp === 'auto' ? 100 : parseInt(tabsWidthProp) || 100;
|
|
37
|
-
return tabsWidthProp;
|
|
38
|
-
}, [tabsWidthProp]);
|
|
39
|
-
const maxTabs = Math.round(menuSize / tabsWidth);
|
|
40
|
-
if (selectedTab && selectedTab !== selectedTabId) {
|
|
41
|
-
setSelectedTabId(selectedTab);
|
|
42
|
-
}
|
|
43
|
-
if (tabs.length > 0 && selectedTabId === null) {
|
|
44
|
-
setSelectedTabId(tabs[0]?.id);
|
|
45
|
-
}
|
|
46
|
-
const dropdownTabs = (0, _react.useMemo)(() => {
|
|
47
|
-
if (menuSize === 0) return [];
|
|
48
|
-
return tabs.slice(maxTabs);
|
|
49
|
-
}, [tabs, maxTabs, containerWidth]);
|
|
50
|
-
const menuTabs = (0, _react.useMemo)(() => {
|
|
51
|
-
return tabs.slice(0, maxTabs);
|
|
52
|
-
}, [tabs, maxTabs, containerWidth]);
|
|
53
|
-
const tabsCount = tabs.length;
|
|
54
|
-
const updateTabs = (0, _react.useCallback)(tabId => {
|
|
55
|
-
const tabInDropdownIndex = dropdownTabs.findIndex(tab => tab.id === tabId);
|
|
56
|
-
if (tabInDropdownIndex !== -1) {
|
|
57
|
-
const tabIndex = tabs.findIndex(tab => tab.id === tabId);
|
|
58
|
-
const tabInDropdown = dropdownTabs[tabInDropdownIndex];
|
|
59
|
-
setTabs(prevState => {
|
|
60
|
-
prevState.splice(tabIndex, 1);
|
|
61
|
-
return [tabInDropdown, ...prevState];
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}, [setTabs, menuTabs, tabs, dropdownTabs]);
|
|
65
|
-
const selectTab = (0, _react.useCallback)(tabId => {
|
|
66
|
-
if (!keepTabOriginalPosition) updateTabs(tabId);
|
|
67
|
-
setSelectedTabId(tabId);
|
|
68
|
-
if (onTabChange) {
|
|
69
|
-
onTabChange(tabId);
|
|
1
|
+
import { j as G } from "../chunks/jsx-runtime.CYK1ROHF.js";
|
|
2
|
+
import H, { createContext as J, useState as B, useRef as K, useMemo as I, useCallback as x, useEffect as C } from "react";
|
|
3
|
+
import D from "lodash";
|
|
4
|
+
import { getTabs as E } from "./tabHelpers.js";
|
|
5
|
+
const L = J({});
|
|
6
|
+
function X({
|
|
7
|
+
children: M,
|
|
8
|
+
tabs: b,
|
|
9
|
+
container: d,
|
|
10
|
+
selectedTab: f = null,
|
|
11
|
+
onTabChange: T,
|
|
12
|
+
onTabClose: p,
|
|
13
|
+
tabsWidth: c,
|
|
14
|
+
firstTabIdent: O = !1,
|
|
15
|
+
keepTabOriginalPosition: W = !0
|
|
16
|
+
}) {
|
|
17
|
+
var y, _;
|
|
18
|
+
const [o, l] = H.useState(f), [w, R] = B(() => {
|
|
19
|
+
var e;
|
|
20
|
+
return ((e = d.current) == null ? void 0 : e.clientWidth) ?? 0;
|
|
21
|
+
}), [t, a] = B(E(b)), v = K(null), h = (((y = v.current) == null ? void 0 : y.clientWidth) ?? 0) - 38 - (O ? 15 : 0), k = I(() => typeof c == "string" ? c === "auto" ? 100 : parseInt(c) || 100 : c, [c]), m = Math.round(h / k);
|
|
22
|
+
f && f !== o && l(f), t.length > 0 && o === null && l((_ = t[0]) == null ? void 0 : _.id);
|
|
23
|
+
const u = I(() => h === 0 ? [] : t.slice(m), [t, m, w]), z = I(() => t.slice(0, m), [t, m, w]), q = t.length, S = x((e) => {
|
|
24
|
+
const n = u.findIndex((r) => r.id === e);
|
|
25
|
+
if (n !== -1) {
|
|
26
|
+
const r = t.findIndex((i) => i.id === e), s = u[n];
|
|
27
|
+
a((i) => (i.splice(r, 1), [s, ...i]));
|
|
70
28
|
}
|
|
71
|
-
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
29
|
+
}, [a, z, t, u]), g = x((e) => {
|
|
30
|
+
W || S(e), l(e), T && T(e);
|
|
31
|
+
}, [T, l, S]), A = x((e) => {
|
|
32
|
+
const n = t.findIndex((s) => s.id === e), r = n === 0 ? t[n + 1] : t[n - 1];
|
|
33
|
+
o === e && g(r.id), n !== -1 && a((s) => (s.splice(n, 1), s)), p && p(String(e));
|
|
34
|
+
}, [p, t, u, o]), j = x((e) => {
|
|
35
|
+
R(e.width);
|
|
36
|
+
}, [R]);
|
|
37
|
+
return C(() => {
|
|
38
|
+
const e = E(b);
|
|
39
|
+
if (e !== t) {
|
|
40
|
+
const n = D.differenceBy(e, t, "id"), r = D.differenceBy(t, e, "id").map((s) => s.id);
|
|
41
|
+
a((s) => {
|
|
42
|
+
let i = s;
|
|
43
|
+
return r && (i = i.filter((F) => !r.includes(F.id))), [...i, ...n];
|
|
82
44
|
});
|
|
83
45
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, [onTabClose, tabs, dropdownTabs, selectedTabId]);
|
|
88
|
-
const onResizeContainer = (0, _react.useCallback)(contentRect => {
|
|
89
|
-
setContainerWidth(contentRect.width);
|
|
90
|
-
}, [setContainerWidth]);
|
|
91
|
-
(0, _react.useEffect)(() => {
|
|
92
|
-
const newTabs = (0, _tabHelpers.getTabs)(tabsProp);
|
|
93
|
-
if (newTabs !== tabs) {
|
|
94
|
-
const includedTabs = _lodash.default.differenceBy(newTabs, tabs, 'id');
|
|
95
|
-
const excludedTabsIds = _lodash.default.differenceBy(tabs, newTabs, 'id').map(tab => tab.id);
|
|
96
|
-
setTabs(prevState => {
|
|
97
|
-
let currentTabs = prevState;
|
|
98
|
-
if (excludedTabsIds) {
|
|
99
|
-
currentTabs = currentTabs.filter(tab => !excludedTabsIds.includes(tab.id));
|
|
100
|
-
}
|
|
101
|
-
return [...currentTabs, ...includedTabs];
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}, [tabsProp]);
|
|
105
|
-
(0, _react.useEffect)(() => {
|
|
106
|
-
const resizeObserver = new ResizeObserver(_ref2 => {
|
|
107
|
-
let [entry] = _ref2;
|
|
108
|
-
onResizeContainer(entry.contentRect);
|
|
46
|
+
}, [b]), C(() => {
|
|
47
|
+
const e = new ResizeObserver(([n]) => {
|
|
48
|
+
j(n.contentRect);
|
|
109
49
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
resizeObserver.disconnect();
|
|
50
|
+
return d.current && e.observe(d.current), () => {
|
|
51
|
+
e.disconnect();
|
|
113
52
|
};
|
|
114
|
-
}, [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
53
|
+
}, [d.current, j]), /* @__PURE__ */ G.jsx(L.Provider, { value: {
|
|
54
|
+
tabs: t,
|
|
55
|
+
menuTabs: z,
|
|
56
|
+
dropdownTabs: u,
|
|
57
|
+
containerWidth: w,
|
|
58
|
+
tabsCount: q,
|
|
59
|
+
selectTab: g,
|
|
60
|
+
selectedTabId: o,
|
|
61
|
+
removeTab: A,
|
|
62
|
+
menuRef: v
|
|
63
|
+
}, children: M });
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
L as TabsContext,
|
|
67
|
+
X as TabsProvider
|
|
68
|
+
};
|
package/lib/tabs/index.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { ITabsPros } from './types
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import '../@types/PermissionAttr.js';
|
|
7
|
-
import '../@types/Icon.js';
|
|
8
|
-
import '../icons/helper.js';
|
|
9
|
-
|
|
10
|
-
declare const Tabs: ({ toolbar, children, firstTabIdent, handlerTabClick, handlerCloseTab, style, tabMenuSize, tabMenuAlign, tabMenuPosition, customClassForToolBar, tabsWidth, tabsWithError, keepPanelsInOrder, ...props }: ITabsPros) => JSX.Element;
|
|
11
|
-
|
|
12
|
-
export { Tabs as default };
|
|
1
|
+
import { default as TabPanel } from './Panel';
|
|
2
|
+
import { ITabsPros } from './types';
|
|
3
|
+
declare const Tabs: ({ toolbar, toolBarRef, children, firstTabIdent, handlerTabClick, handlerCloseTab, style, tabMenuSize, tabMenuAlign, tabMenuPosition, customClassForToolBar, tabsWidth, ...props }: ITabsPros) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Tabs;
|
|
5
|
+
export { TabPanel };
|
package/lib/tabs/index.js
CHANGED
|
@@ -1,76 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
import { j as r } from "../chunks/jsx-runtime.CYK1ROHF.js";
|
|
2
|
+
import { useRef as R, useMemo as T, Fragment as n } from "react";
|
|
3
|
+
import b from "./Menu.js";
|
|
4
|
+
import { default as z } from "./Panel.js";
|
|
5
|
+
import { tabsClass as C } from "./tabHelpers.js";
|
|
6
|
+
import "../chunks/tabs.Cvj2MJH6.js";
|
|
7
|
+
import { TabsProvider as g } from "./context.js";
|
|
8
|
+
const q = ({
|
|
9
|
+
toolbar: f,
|
|
10
|
+
toolBarRef: h,
|
|
11
|
+
children: e,
|
|
12
|
+
firstTabIdent: t,
|
|
13
|
+
handlerTabClick: l,
|
|
14
|
+
handlerCloseTab: p,
|
|
15
|
+
style: u = {},
|
|
16
|
+
tabMenuSize: c = "default",
|
|
17
|
+
tabMenuAlign: x = "left",
|
|
18
|
+
tabMenuPosition: o = "top",
|
|
19
|
+
customClassForToolBar: j = "",
|
|
20
|
+
tabsWidth: s = "auto",
|
|
21
|
+
...i
|
|
22
|
+
}) => {
|
|
23
|
+
const a = R(null), d = T(() => {
|
|
24
|
+
const m = /* @__PURE__ */ r.jsx(
|
|
25
|
+
b,
|
|
26
|
+
{
|
|
27
|
+
toolbar: f,
|
|
28
|
+
tabWidth: s,
|
|
29
|
+
customClassForToolBar: j,
|
|
30
|
+
tabMenuSize: c,
|
|
31
|
+
tabMenuAlign: x,
|
|
32
|
+
firstTabIdent: t
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
return o === "top" || o === "left" ? /* @__PURE__ */ r.jsxs(n, { children: [
|
|
36
|
+
m,
|
|
37
|
+
e
|
|
38
|
+
] }) : /* @__PURE__ */ r.jsxs(n, { children: [
|
|
39
|
+
e,
|
|
40
|
+
m
|
|
41
|
+
] });
|
|
42
|
+
}, [e, o]);
|
|
43
|
+
return /* @__PURE__ */ r.jsx(
|
|
44
|
+
g,
|
|
45
|
+
{
|
|
46
|
+
tabs: e,
|
|
47
|
+
container: a,
|
|
48
|
+
onTabChange: l,
|
|
49
|
+
onTabClose: p,
|
|
50
|
+
tabsWidth: s,
|
|
51
|
+
firstTabIdent: t,
|
|
52
|
+
...i,
|
|
53
|
+
children: /* @__PURE__ */ r.jsx(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
ref: a,
|
|
57
|
+
className: C(o),
|
|
58
|
+
style: u,
|
|
59
|
+
children: d
|
|
60
|
+
}
|
|
61
|
+
)
|
|
59
62
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
onTabChange: handlerTabClick,
|
|
66
|
-
onTabClose: handlerCloseTab,
|
|
67
|
-
tabsWidth: tabsWidth,
|
|
68
|
-
firstTabIdent: firstTabIdent,
|
|
69
|
-
keepPanelsInOrder: keepPanelsInOrder
|
|
70
|
-
}, props), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
-
ref: containerRef,
|
|
72
|
-
className: (0, _tabHelpers.tabsClass)(tabMenuPosition),
|
|
73
|
-
style: style
|
|
74
|
-
}, content));
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
z as TabPanel,
|
|
67
|
+
q as default
|
|
75
68
|
};
|
|
76
|
-
var _default = exports.default = Tabs;
|
package/lib/tabs/tabHelpers.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Position } from '../@types/Position
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
declare
|
|
6
|
-
declare function
|
|
7
|
-
declare function menuStyles(tabMenuAlign: Position): {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Position } from '../@types/Position';
|
|
3
|
+
export declare function getCurrentThreshold(scrollableElement: HTMLDivElement, scrollThreshold: number): number;
|
|
4
|
+
export declare const getTabs: (tabsProp: React.ReactNode) => any[];
|
|
5
|
+
export declare function tabsClass(tabMenuPosition: Exclude<Position, 'center'>): string;
|
|
6
|
+
export declare function menuStyles(tabMenuAlign: Position): {
|
|
8
7
|
justifyContent: string;
|
|
9
8
|
};
|
|
10
|
-
declare const onDeniedOptions: string[];
|
|
11
|
-
|
|
12
|
-
export { getCurrentThreshold, getTabs, menuStyles, onDeniedOptions, tabsClass };
|
|
9
|
+
export declare const onDeniedOptions: string[];
|
package/lib/tabs/tabHelpers.js
CHANGED
|
@@ -1,70 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.menuStyles = menuStyles;
|
|
9
|
-
exports.onDeniedOptions = void 0;
|
|
10
|
-
exports.tabsClass = tabsClass;
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _permissionValidations = require("../permissionValidations");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
15
|
-
function getCurrentThreshold(scrollableElement, scrollThreshold) {
|
|
16
|
-
const MIN_THRESHOLD = 0;
|
|
17
|
-
const MAX_THRESHOLD = 1;
|
|
18
|
-
if (scrollThreshold < MIN_THRESHOLD) return MIN_THRESHOLD;
|
|
19
|
-
if (scrollThreshold > MAX_THRESHOLD) return MAX_THRESHOLD;
|
|
20
|
-
const {
|
|
21
|
-
scrollHeight,
|
|
22
|
-
clientHeight
|
|
23
|
-
} = scrollableElement;
|
|
24
|
-
const offsetHeight = scrollHeight - clientHeight;
|
|
25
|
-
const calculatedScrollThreshold = Math.round(scrollHeight * scrollThreshold);
|
|
26
|
-
const maxScrollThreshold = Math.round(offsetHeight - offsetHeight * 0.3);
|
|
27
|
-
return Math.min(calculatedScrollThreshold, maxScrollThreshold);
|
|
1
|
+
import i from "react";
|
|
2
|
+
import { OPTIONS_ON_DENIED as r } from "../permissionValidations.js";
|
|
3
|
+
function h(t, n) {
|
|
4
|
+
if (n < 0) return 0;
|
|
5
|
+
if (n > 1) return 1;
|
|
6
|
+
const { scrollHeight: o, clientHeight: u } = t, s = o - u, c = Math.round(o * n), f = Math.round(s - s * 0.3);
|
|
7
|
+
return Math.min(c, f);
|
|
28
8
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
const p = (t) => (i.Children.map(t, (e) => {
|
|
10
|
+
if (!e || !i.isValidElement(e)) return null;
|
|
11
|
+
const { children: l, ...o } = e.props;
|
|
12
|
+
return o;
|
|
13
|
+
}) || []).filter((e) => !e.hidden), a = {
|
|
14
|
+
top: "",
|
|
15
|
+
left: "menu-left",
|
|
16
|
+
bottom: "menu-bottom",
|
|
17
|
+
right: "menu-right"
|
|
37
18
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
exports.getTabs = getTabs;
|
|
43
|
-
const positionsMenuClass = {
|
|
44
|
-
top: '',
|
|
45
|
-
left: 'menu-left',
|
|
46
|
-
bottom: 'menu-bottom',
|
|
47
|
-
right: 'menu-right'
|
|
48
|
-
};
|
|
49
|
-
function tabsClass(tabMenuPosition) {
|
|
50
|
-
let cssClass = 'tabs-component ';
|
|
51
|
-
cssClass += positionsMenuClass[tabMenuPosition];
|
|
52
|
-
return cssClass;
|
|
19
|
+
function b(t) {
|
|
20
|
+
let n = "tabs-component ";
|
|
21
|
+
return n += a[t], n;
|
|
53
22
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
top: 'flex-start',
|
|
61
|
-
right: 'flex-end',
|
|
62
|
-
bottom: 'flex-end',
|
|
63
|
-
center: 'center'
|
|
23
|
+
const m = {
|
|
24
|
+
left: "flex-start",
|
|
25
|
+
top: "flex-start",
|
|
26
|
+
right: "flex-end",
|
|
27
|
+
bottom: "flex-end",
|
|
28
|
+
center: "center"
|
|
64
29
|
};
|
|
65
|
-
function
|
|
30
|
+
function M(t) {
|
|
66
31
|
return {
|
|
67
|
-
justifyContent:
|
|
32
|
+
justifyContent: m[t]
|
|
68
33
|
};
|
|
69
34
|
}
|
|
70
|
-
const
|
|
35
|
+
const O = [
|
|
36
|
+
r.disabled,
|
|
37
|
+
r.unvisible,
|
|
38
|
+
r.hideContent
|
|
39
|
+
];
|
|
40
|
+
export {
|
|
41
|
+
h as getCurrentThreshold,
|
|
42
|
+
p as getTabs,
|
|
43
|
+
M as menuStyles,
|
|
44
|
+
O as onDeniedOptions,
|
|
45
|
+
b as tabsClass
|
|
46
|
+
};
|
|
File without changes
|
package/lib/tabs/types.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Size } from '../@types/Size
|
|
3
|
-
import { Position } from '../@types/Position
|
|
4
|
-
import { PermissionAttr } from '../@types/PermissionAttr
|
|
5
|
-
import { IconNames } from '../@types/Icon
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type TabsContextType = {
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { Size } from '../@types/Size';
|
|
3
|
+
import { Position } from '../@types/Position';
|
|
4
|
+
import { PermissionAttr } from '../@types/PermissionAttr';
|
|
5
|
+
import { IconNames } from '../@types/Icon';
|
|
6
|
+
export type TabsContextType = {
|
|
9
7
|
tabs: TabProps[];
|
|
10
8
|
menuTabs: TabProps[];
|
|
11
9
|
dropdownTabs: TabProps[];
|
|
@@ -15,9 +13,8 @@ type TabsContextType = {
|
|
|
15
13
|
containerWidth: number;
|
|
16
14
|
tabsCount: number;
|
|
17
15
|
menuRef: RefObject<HTMLUListElement>;
|
|
18
|
-
keepPanelsInOrder?: Array<string | number>;
|
|
19
16
|
};
|
|
20
|
-
interface TabsProviderProps {
|
|
17
|
+
export interface TabsProviderProps {
|
|
21
18
|
children: React.ReactNode;
|
|
22
19
|
tabs: React.ReactNode;
|
|
23
20
|
container: RefObject<HTMLDivElement>;
|
|
@@ -26,10 +23,9 @@ interface TabsProviderProps {
|
|
|
26
23
|
onTabChange?: (tabId: string | number) => void;
|
|
27
24
|
onTabClose?: (tabId: string) => void;
|
|
28
25
|
firstTabIdent?: boolean;
|
|
29
|
-
keepPanelsInOrder?: Array<string | number>;
|
|
30
26
|
keepTabOriginalPosition?: boolean;
|
|
31
27
|
}
|
|
32
|
-
interface ITabsPros {
|
|
28
|
+
export interface ITabsPros {
|
|
33
29
|
style?: CSSProperties;
|
|
34
30
|
toolbar?: ReactElement;
|
|
35
31
|
toolBarRef?: (value: HTMLDivElement | null) => void;
|
|
@@ -43,14 +39,12 @@ interface ITabsPros {
|
|
|
43
39
|
handlerCloseTab?: (id?: string, idx?: string) => void;
|
|
44
40
|
customClassForToolBar?: string;
|
|
45
41
|
tabsWidth?: string | number;
|
|
46
|
-
tabsWithError?: Array<string | number>;
|
|
47
|
-
keepPanelsInOrder?: Array<string | number>;
|
|
48
42
|
keepTabOriginalPosition?: boolean;
|
|
49
43
|
}
|
|
50
|
-
interface TabProps {
|
|
44
|
+
export interface TabProps {
|
|
51
45
|
id: string | number;
|
|
52
46
|
title: string;
|
|
53
|
-
iconAlign?: Extract<Position, 'left' | '
|
|
47
|
+
iconAlign?: Extract<Position, 'left' | 'right'>;
|
|
54
48
|
iconName?: IconNames;
|
|
55
49
|
icon?: ReactElement;
|
|
56
50
|
disabled?: boolean;
|
|
@@ -63,10 +57,9 @@ interface TabProps {
|
|
|
63
57
|
tooltipWidth?: string | number;
|
|
64
58
|
closeable?: boolean;
|
|
65
59
|
tabsLength?: number;
|
|
66
|
-
tabsWithError?: Array<string | number>;
|
|
67
60
|
}
|
|
68
|
-
interface MenuProps {
|
|
69
|
-
toolbar?: ReactElement
|
|
61
|
+
export interface MenuProps {
|
|
62
|
+
toolbar?: ReactElement<any>;
|
|
70
63
|
customClass?: string;
|
|
71
64
|
customClassForToolBar?: string;
|
|
72
65
|
tabWidth?: string | number;
|
|
@@ -77,11 +70,10 @@ interface MenuProps {
|
|
|
77
70
|
tabMenuSize?: Size;
|
|
78
71
|
handlerClick?: (id?: string) => void;
|
|
79
72
|
handlerRemovePanel?: (id?: string, idx?: number, bool?: boolean) => void;
|
|
80
|
-
tabsWithError?: Array<string | number>;
|
|
81
73
|
}
|
|
82
|
-
interface DropdownProps extends MenuProps {
|
|
74
|
+
export interface DropdownProps extends MenuProps {
|
|
83
75
|
}
|
|
84
|
-
interface PanelProps {
|
|
76
|
+
export interface PanelProps {
|
|
85
77
|
id?: string;
|
|
86
78
|
icon?: ReactElement;
|
|
87
79
|
title?: string;
|
|
@@ -101,5 +93,3 @@ interface PanelProps {
|
|
|
101
93
|
onEndReachedThreshold?: number;
|
|
102
94
|
style?: CSSProperties;
|
|
103
95
|
}
|
|
104
|
-
|
|
105
|
-
export { DropdownProps, ITabsPros, MenuProps, PanelProps, TabProps, TabsContextType, TabsProviderProps };
|
package/lib/tabs/useTabs.d.ts
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import 'react';
|
|
3
|
-
import '../@types/Size.js';
|
|
4
|
-
import '../@types/Position.js';
|
|
5
|
-
import '../@types/PermissionAttr.js';
|
|
6
|
-
import '../@types/Icon.js';
|
|
7
|
-
import '../icons/helper.js';
|
|
8
|
-
|
|
9
|
-
declare function useTabs(): TabsContextType;
|
|
10
|
-
|
|
11
|
-
export { useTabs };
|
|
1
|
+
export declare function useTabs(): import('./types').TabsContextType;
|
package/lib/tabs/useTabs.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function useTabs() {
|
|
10
|
-
return (0, _react.useContext)(_context.TabsContext);
|
|
11
|
-
}
|
|
1
|
+
import { useContext as t } from "react";
|
|
2
|
+
import { TabsContext as o } from "./context.js";
|
|
3
|
+
function n() {
|
|
4
|
+
return t(o);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
n as useTabs
|
|
8
|
+
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { WithTooltipProps } from '../internals/types
|
|
3
|
-
|
|
4
|
-
import '../@types/Position.js';
|
|
5
|
-
|
|
6
|
-
interface TextContentProps extends React__default.HTMLAttributes<HTMLElement>, WithTooltipProps {
|
|
1
|
+
import { default as React, MutableRefObject } from 'react';
|
|
2
|
+
import { WithTooltipProps } from '../internals/types';
|
|
3
|
+
interface TextContentProps extends React.HTMLAttributes<HTMLElement>, WithTooltipProps {
|
|
7
4
|
as?: 'span' | 'strong' | 'p';
|
|
8
5
|
label?: string | string[];
|
|
9
6
|
styleForLabel?: object;
|
|
@@ -12,11 +9,10 @@ interface TextContentProps extends React__default.HTMLAttributes<HTMLElement>, W
|
|
|
12
9
|
disabled?: boolean;
|
|
13
10
|
targetRef?: (ref: HTMLSpanElement | null) => void;
|
|
14
11
|
labelRef?: MutableRefObject<HTMLSpanElement | null>;
|
|
15
|
-
onHoverLabel?: (e:
|
|
12
|
+
onHoverLabel?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
|
|
16
13
|
}
|
|
17
14
|
declare const _default: {
|
|
18
|
-
(props: TextContentProps &
|
|
15
|
+
(props: TextContentProps & React.RefAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
19
16
|
displayName: string;
|
|
20
17
|
};
|
|
21
|
-
|
|
22
|
-
export { _default as default };
|
|
18
|
+
export default _default;
|