@plusui/library 0.1.0 → 0.1.3
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/cdn/components/accordion/accordion.js +3 -3
- package/cdn/components/accordion/index.js +3 -3
- package/cdn/components/accordion-group/accordion-group.js +3 -3
- package/cdn/components/accordion-group/index.js +3 -3
- package/cdn/components/alert/alert.js +4 -4
- package/cdn/components/alert/index.js +4 -4
- package/cdn/components/avatar/avatar.js +5 -5
- package/cdn/components/avatar/index.js +5 -5
- package/cdn/components/badge/badge.host.style.js +1 -1
- package/cdn/components/badge/badge.js +5 -5
- package/cdn/components/badge/index.js +5 -5
- package/cdn/components/base/index.js +2 -2
- package/cdn/components/base/tailwind-base.js +3 -3
- package/cdn/components/breadcrumb/breadcrumb.js +3 -3
- package/cdn/components/breadcrumb/index.js +3 -3
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +4 -4
- package/cdn/components/breadcrumb-item/index.js +4 -4
- package/cdn/components/button/button.js +4 -4
- package/cdn/components/button/button.style.js +1 -1
- package/cdn/components/button/index.js +4 -4
- package/cdn/components/button-group/button-group.js +4 -4
- package/cdn/components/button-group/index.js +4 -4
- package/cdn/components/checkbox/checkbox.js +6 -6
- package/cdn/components/checkbox/index.js +6 -6
- package/cdn/components/checkbox-group/checkbox-group.js +3 -3
- package/cdn/components/checkbox-group/index.js +3 -3
- package/cdn/components/chip/chip.js +4 -4
- package/cdn/components/chip/index.js +4 -4
- package/cdn/components/divider/divider.js +4 -4
- package/cdn/components/divider/divider.style.js +1 -1
- package/cdn/components/divider/index.js +4 -4
- package/cdn/components/drawer/drawer.js +4 -4
- package/cdn/components/drawer/index.js +4 -4
- package/cdn/components/dropdown/dropdown.js +5 -5
- package/cdn/components/dropdown/index.js +5 -5
- package/cdn/components/dropdown-item/dropdown-item.js +5 -5
- package/cdn/components/dropdown-item/index.js +5 -5
- package/cdn/components/icon/icon.js +4 -4
- package/cdn/components/icon/index.js +3 -3
- package/cdn/components/index.js +9 -9
- package/cdn/components/input/index.js +6 -6
- package/cdn/components/input/input.js +6 -6
- package/cdn/components/input/input.style.js +1 -2
- package/cdn/components/link/index.js +3 -3
- package/cdn/components/link/link.js +3 -3
- package/cdn/components/list-box-item/index.js +4 -4
- package/cdn/components/list-box-item/list-box-item.js +4 -4
- package/cdn/components/modal/index.js +4 -4
- package/cdn/components/modal/modal.js +4 -4
- package/cdn/components/popconfirm/index.js +5 -5
- package/cdn/components/popconfirm/popconfirm.js +5 -5
- package/cdn/components/popover/index.js +5 -5
- package/cdn/components/popover/popover.js +5 -5
- package/cdn/components/radio/index.js +5 -5
- package/cdn/components/radio/radio.js +5 -5
- package/cdn/components/radio-group/index.js +3 -3
- package/cdn/components/radio-group/radio-group.js +3 -3
- package/cdn/components/rating/index.js +7 -7
- package/cdn/components/rating/rating.js +7 -7
- package/cdn/components/segmented-picker/index.js +3 -3
- package/cdn/components/segmented-picker/segmented-picker.component.js +3 -3
- package/cdn/components/segmented-picker-item/index.js +4 -4
- package/cdn/components/segmented-picker-item/segmented-picker-item.component.js +4 -4
- package/cdn/components/select/index.js +5 -5
- package/cdn/components/select/select.js +16 -5
- package/cdn/components/select/select.style.js +1 -1
- package/cdn/components/select-item/index.js +5 -5
- package/cdn/components/select-item/select-item.js +5 -5
- package/cdn/components/service/index.js +5 -5
- package/cdn/components/service/service.js +6 -6
- package/cdn/components/svg-icon/icons.js +1 -1
- package/cdn/components/svg-icon/index.js +3 -3
- package/cdn/components/svg-icon/svg-icon.js +4 -4
- package/cdn/components/tab/index.js +4 -4
- package/cdn/components/tab/tab.js +4 -4
- package/cdn/components/tab-group/index.js +4 -4
- package/cdn/components/tab-group/tab-group.js +4 -4
- package/cdn/components/tab-panel/index.js +3 -3
- package/cdn/components/tab-panel/tab-panel.js +3 -3
- package/cdn/components/tag/index.js +4 -4
- package/cdn/components/tag/tag.js +4 -4
- package/cdn/components/text/index.js +3 -3
- package/cdn/components/text/text.js +3 -3
- package/cdn/components/textarea/index.js +6 -6
- package/cdn/components/textarea/textarea.js +6 -6
- package/cdn/components/toast/index.js +4 -4
- package/cdn/components/toast/toast.js +4 -4
- package/cdn/components/toast-container/index.js +5 -5
- package/cdn/components/toast-container/toast-container.js +5 -5
- package/cdn/components/toggle/index.js +8 -8
- package/cdn/components/toggle/toggle.js +8 -8
- package/cdn/components/tooltip/index.js +5 -5
- package/cdn/components/tooltip/tooltip.js +5 -5
- package/cdn/factory/tailwind-factory.js +7 -7
- package/cdn/floating-ui.dom-BYyWpmHF.js +1 -0
- package/{dist/floating-ui.dom-OBaMlALa.js → cdn/floating-ui.dom-BpzIshEG.js} +26 -14
- package/cdn/global-CvNEUQeA.js +31 -0
- package/cdn/global-DePk2FdN.js +1 -0
- package/cdn/{if-defined-CQ5F5a3V.js → if-defined-CIB8OTrH.js} +1 -1
- package/cdn/{if-defined-D-m3dgRf.js → if-defined-DpyZ37D-.js} +1 -1
- package/cdn/lit-element-BNK__jO-.js +27 -0
- package/cdn/lit-element-CSuLHuHb.js +22 -0
- package/cdn/{live-BOAtKRUN.js → live-C1eBrEBV.js} +1 -1
- package/cdn/{live-Ba4FL2pG.js → live-CYp4nasd.js} +1 -1
- package/cdn/property-B8EDuyz_.js +7 -0
- package/cdn/{property-DiPQx9S3.js → property-Dz31PgR6.js} +2 -2
- package/{dist/state-D1d5Sfj8.js → cdn/state-BRspp5eU.js} +1 -1
- package/{dist/state-D6IyB_n5.js → cdn/state-hFbsBSdV.js} +1 -1
- package/cdn/{style-map-Z-XBeQmS.js → style-map-BYRi_l0u.js} +1 -1
- package/{dist/style-map-DC_vNus2.js → cdn/style-map-Cgr6kXUm.js} +1 -1
- package/{dist/unsafe-html-BhmP6ONc.js → cdn/unsafe-html-BXTWMFA8.js} +1 -1
- package/cdn/{unsafe-html-rEfV9uY8.js → unsafe-html-CFzahWAO.js} +1 -1
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.js +2 -2
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/components/accordion-group/accordion-group.js +2 -2
- package/dist/components/accordion-group/accordion-group.js.map +1 -1
- package/dist/components/accordion-group/index.js +2 -2
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +3 -3
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/index.js +3 -3
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.js +4 -4
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/index.js +4 -4
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.host.style.js +1 -1
- package/dist/components/badge/badge.js +4 -4
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/badge/index.js +4 -4
- package/dist/components/base/index.js +1 -1
- package/dist/components/base/tailwind-base.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/index.js +2 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -3
- package/dist/components/breadcrumb-item/breadcrumb-item.js.map +1 -1
- package/dist/components/breadcrumb-item/index.js +3 -3
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +3 -3
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/button.style.js +1 -1
- package/dist/components/button/button.style.js.map +1 -1
- package/dist/components/button/index.js +3 -3
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/button-group/button-group.js +3 -3
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/button-group/index.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +5 -5
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox/index.js +5 -5
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +2 -2
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/index.js +2 -2
- package/dist/components/chip/chip.d.ts +1 -1
- package/dist/components/chip/chip.js +3 -3
- package/dist/components/chip/chip.js.map +1 -1
- package/dist/components/chip/index.js +3 -3
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/divider/divider.js +3 -3
- package/dist/components/divider/divider.js.map +1 -1
- package/dist/components/divider/divider.style.js +1 -1
- package/dist/components/divider/index.js +3 -3
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.js +3 -3
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/drawer/index.js +3 -3
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.js +4 -4
- package/dist/components/dropdown/dropdown.js.map +1 -1
- package/dist/components/dropdown/index.js +4 -4
- package/dist/components/dropdown-item/dropdown-item.d.ts +1 -1
- package/dist/components/dropdown-item/dropdown-item.js +4 -4
- package/dist/components/dropdown-item/dropdown-item.js.map +1 -1
- package/dist/components/dropdown-item/index.js +4 -4
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/icon/icon.js +4 -4
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/icon/index.js +3 -3
- package/dist/components/index.js +8 -8
- package/dist/components/input/index.js +5 -5
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.js +5 -5
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input/input.style.js +1 -2
- package/dist/components/input/input.style.js.map +1 -1
- package/dist/components/link/index.js +2 -2
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/link/link.js +2 -2
- package/dist/components/link/link.js.map +1 -1
- package/dist/components/list-box-item/index.js +3 -3
- package/dist/components/list-box-item/list-box-item.d.ts +1 -1
- package/dist/components/list-box-item/list-box-item.js +3 -3
- package/dist/components/list-box-item/list-box-item.js.map +1 -1
- package/dist/components/modal/index.js +3 -3
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/modal.js +3 -3
- package/dist/components/modal/modal.js.map +1 -1
- package/dist/components/popconfirm/index.js +4 -4
- package/dist/components/popconfirm/popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.js +4 -4
- package/dist/components/popconfirm/popconfirm.js.map +1 -1
- package/dist/components/popover/index.js +4 -4
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/index.js +4 -4
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +4 -4
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radio-group/radio-group.d.ts +1 -1
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/rating/index.js +6 -6
- package/dist/components/rating/rating.d.ts +1 -1
- package/dist/components/rating/rating.js +6 -6
- package/dist/components/rating/rating.js.map +1 -1
- package/dist/components/segmented-picker/index.js +2 -2
- package/dist/components/segmented-picker/segmented-picker.component.d.ts +1 -1
- package/dist/components/segmented-picker/segmented-picker.component.js +2 -2
- package/dist/components/segmented-picker/segmented-picker.component.js.map +1 -1
- package/dist/components/segmented-picker-item/index.js +3 -3
- package/dist/components/segmented-picker-item/segmented-picker-item.component.d.ts +1 -1
- package/dist/components/segmented-picker-item/segmented-picker-item.component.js +3 -3
- package/dist/components/segmented-picker-item/segmented-picker-item.component.js.map +1 -1
- package/dist/components/select/index.js +4 -4
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +15 -4
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.style.js +1 -1
- package/dist/components/select/select.style.js.map +1 -1
- package/dist/components/select-item/index.js +4 -4
- package/dist/components/select-item/select-item.d.ts +1 -1
- package/dist/components/select-item/select-item.js +4 -4
- package/dist/components/select-item/select-item.js.map +1 -1
- package/dist/components/service/index.js +4 -4
- package/dist/components/service/service.d.ts +1 -1
- package/dist/components/service/service.js +5 -5
- package/dist/components/service/service.js.map +1 -1
- package/dist/components/svg-icon/icons.js +1 -1
- package/dist/components/svg-icon/index.js +3 -3
- package/dist/components/svg-icon/svg-icon.d.ts +1 -1
- package/dist/components/svg-icon/svg-icon.js +4 -4
- package/dist/components/svg-icon/svg-icon.js.map +1 -1
- package/dist/components/tab/index.js +3 -3
- package/dist/components/tab/tab.d.ts +1 -1
- package/dist/components/tab/tab.js +3 -3
- package/dist/components/tab/tab.js.map +1 -1
- package/dist/components/tab-group/index.js +3 -3
- package/dist/components/tab-group/tab-group.d.ts +1 -1
- package/dist/components/tab-group/tab-group.js +3 -3
- package/dist/components/tab-group/tab-group.js.map +1 -1
- package/dist/components/tab-panel/index.js +2 -2
- package/dist/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/components/tab-panel/tab-panel.js +2 -2
- package/dist/components/tab-panel/tab-panel.js.map +1 -1
- package/dist/components/tag/index.js +3 -3
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/tag/tag.js +3 -3
- package/dist/components/tag/tag.js.map +1 -1
- package/dist/components/text/index.js +2 -2
- package/dist/components/text/text.d.ts +1 -1
- package/dist/components/text/text.js +2 -2
- package/dist/components/text/text.js.map +1 -1
- package/dist/components/textarea/index.js +5 -5
- package/dist/components/textarea/textarea.d.ts +1 -1
- package/dist/components/textarea/textarea.js +5 -5
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/toast/index.js +3 -3
- package/dist/components/toast/toast.js +3 -3
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toast-container/index.js +4 -4
- package/dist/components/toast-container/toast-container.d.ts +1 -1
- package/dist/components/toast-container/toast-container.js +4 -4
- package/dist/components/toast-container/toast-container.js.map +1 -1
- package/dist/components/toggle/index.js +7 -7
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/toggle/toggle.js +7 -7
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/index.js +4 -4
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/factory/tailwind-factory.d.ts.map +1 -1
- package/dist/factory/tailwind-factory.js +6 -6
- package/{cdn/floating-ui.dom-OBaMlALa.js → dist/floating-ui.dom-BpzIshEG.js} +26 -14
- package/dist/floating-ui.dom-CC_JVmd9.js +1 -0
- package/dist/{if-defined-DZx5z3Rt.js → if-defined-ByWlXMXY.js} +1 -1
- package/dist/{if-defined-D-m3dgRf.js → if-defined-DpyZ37D-.js} +1 -1
- package/dist/index.css +2 -2
- package/dist/lit-element-B7kcWHze.js +22 -0
- package/dist/lit-element-BNK__jO-.js +27 -0
- package/dist/{live-BOAtKRUN.js → live-C1eBrEBV.js} +1 -1
- package/dist/{live-Cq6acxyl.js → live-pVFa0Jqn.js} +1 -1
- package/dist/model/plus.d.ts.map +1 -1
- package/dist/property-Bb1Db6at.js +7 -0
- package/dist/{property-DiPQx9S3.js → property-Dz31PgR6.js} +2 -2
- package/dist/{query-M3XxJAZy.js → query-RRtZCxQ7.js} +1 -1
- package/dist/{query-assigned-elements-DBAPT3sj.js → query-assigned-elements-BjEeiBhg.js} +1 -1
- package/{cdn/state-D1d5Sfj8.js → dist/state-BRspp5eU.js} +1 -1
- package/{cdn/state-CoIPL7X5.js → dist/state-CQcls-Yf.js} +1 -1
- package/dist/{style-map-CTYAtfNA.js → style-map-BRcUXxgF.js} +1 -1
- package/{cdn/style-map-DC_vNus2.js → dist/style-map-Cgr6kXUm.js} +1 -1
- package/dist/styles/global.js +2 -2
- package/dist/styles/theme/dark.js +2 -2
- package/dist/styles/theme/light.js +2 -2
- package/{cdn/unsafe-html-BhmP6ONc.js → dist/unsafe-html-BXTWMFA8.js} +1 -1
- package/dist/{unsafe-html-B4iHxNlq.js → unsafe-html-CglCgc9K.js} +1 -1
- package/package.json +6 -23
- package/react/PlusAccordion.js +9 -9
- package/react/PlusAccordionGroup.js +1 -3
- package/react/PlusAlert.js +9 -9
- package/react/PlusAvatar.js +1 -3
- package/react/PlusBadge.js +1 -3
- package/react/PlusBreadcrumb.js +1 -3
- package/react/PlusBreadcrumbItem.js +1 -3
- package/react/PlusButton.js +1 -3
- package/react/PlusButtonGroup.js +1 -3
- package/react/PlusCheckbox.js +9 -17
- package/react/PlusCheckboxGroup.js +9 -9
- package/react/PlusChip.js +1 -3
- package/react/PlusDivider.js +9 -9
- package/react/PlusDrawer.js +1 -7
- package/react/PlusDropDownItem.js +9 -9
- package/react/PlusDropdown.js +9 -9
- package/react/PlusIcon.js +1 -3
- package/react/PlusInput.js +9 -14
- package/react/PlusLink.js +1 -3
- package/react/PlusListBoxItem.js +9 -9
- package/react/PlusModal.js +1 -7
- package/react/PlusPopconfirm.js +9 -9
- package/react/PlusPopover.js +9 -9
- package/react/PlusRadio.js +9 -12
- package/react/PlusRadioGroup.js +1 -3
- package/react/PlusRating.js +9 -12
- package/react/PlusSegmentedPicker.js +9 -9
- package/react/PlusSegmentedPickerItem.js +1 -3
- package/react/PlusSelect.js +9 -9
- package/react/PlusSelectItem.js +9 -9
- package/react/PlusService.js +1 -3
- package/react/PlusSvgIcon.js +1 -3
- package/react/PlusTab.js +1 -3
- package/react/PlusTabGroup.js +9 -9
- package/react/PlusTabPanel.js +1 -3
- package/react/PlusTag.js +1 -3
- package/react/PlusText.js +1 -3
- package/react/PlusTextarea.js +9 -14
- package/react/PlusToast.js +9 -9
- package/react/PlusToastContainer.js +1 -3
- package/react/PlusToggle.js +9 -14
- package/react/PlusTooltip.js +1 -3
- package/react/Tailwind.js +1 -3
- package/web-types.json +1 -1
- package/cdn/floating-ui.dom-CXNHR8n2.js +0 -1
- package/cdn/global--d79_U21.js +0 -1
- package/cdn/global-Dh9axYQH.js +0 -31
- package/cdn/lit-element-ByzbtpGk.js +0 -27
- package/cdn/lit-element-DNNEDGnu.js +0 -23
- package/cdn/property-DLlzgs39.js +0 -7
- package/dist/floating-ui.dom-D3XJuCC4.js +0 -1
- package/dist/lit-element-ByzbtpGk.js +0 -27
- package/dist/lit-element-DWUSmjFy.js +0 -23
- package/dist/property-BbhdtSvA.js +0 -7
- /package/dist/{base-BqsGesSl.js → base-DxcUbjR1.js} +0 -0
- /package/dist/{directive-CaeGQrCm.js → directive-BnoBrrxd.js} +0 -0
- /package/dist/{index-exQ3KYY9.js → index-DHCwMC4J.js} +0 -0
package/react/PlusInput.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/input/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -53,17 +48,17 @@ export const PlusInput = forwardRef((props, forwardedRef) => {
|
|
|
53
48
|
useEventListener(ref, "plus-password-toggle", props.onPlusPasswordToggle);
|
|
54
49
|
useEventListener(ref, "plus-invalid", props.onPlusInvalid);
|
|
55
50
|
|
|
56
|
-
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
57
|
-
useImperativeHandle(forwardedRef, () => ({
|
|
58
|
-
checkValidity: () => ref.current.checkValidity(),
|
|
59
|
-
reportValidity: () => ref.current.reportValidity(),
|
|
60
|
-
setCustomValidity: (message) => ref.current.setCustomValidity(message),
|
|
61
|
-
}));
|
|
62
|
-
|
|
63
51
|
return React.createElement(
|
|
64
52
|
"plus-input",
|
|
65
53
|
{
|
|
66
|
-
ref
|
|
54
|
+
ref: (node) => {
|
|
55
|
+
ref.current = node;
|
|
56
|
+
if (typeof forwardedRef === "function") {
|
|
57
|
+
forwardedRef(node);
|
|
58
|
+
} else if (forwardedRef) {
|
|
59
|
+
forwardedRef.current = node;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
67
62
|
...filteredProps,
|
|
68
63
|
type: props.type,
|
|
69
64
|
name: props.name,
|
package/react/PlusLink.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/link/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusLink = forwardRef((props, forwardedRef) => {
|
|
@@ -16,8 +16,6 @@ export const PlusLink = forwardRef((props, forwardedRef) => {
|
|
|
16
16
|
...filteredProps
|
|
17
17
|
} = props;
|
|
18
18
|
|
|
19
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
20
|
-
|
|
21
19
|
return React.createElement(
|
|
22
20
|
"plus-link",
|
|
23
21
|
{
|
package/react/PlusListBoxItem.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/list-box-item/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -14,12 +9,17 @@ export const PlusListBoxItem = forwardRef((props, forwardedRef) => {
|
|
|
14
9
|
/** Event listeners - run once */
|
|
15
10
|
useEventListener(ref, "click", props.onClick);
|
|
16
11
|
|
|
17
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
-
|
|
19
12
|
return React.createElement(
|
|
20
13
|
"plus-list-box-item",
|
|
21
14
|
{
|
|
22
|
-
ref
|
|
15
|
+
ref: (node) => {
|
|
16
|
+
ref.current = node;
|
|
17
|
+
if (typeof forwardedRef === "function") {
|
|
18
|
+
forwardedRef(node);
|
|
19
|
+
} else if (forwardedRef) {
|
|
20
|
+
forwardedRef.current = node;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
23
|
...filteredProps,
|
|
24
24
|
size: props.size,
|
|
25
25
|
text: props.text,
|
package/react/PlusModal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/modal/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusModal = forwardRef((props, forwardedRef) => {
|
|
@@ -12,12 +12,6 @@ export const PlusModal = forwardRef((props, forwardedRef) => {
|
|
|
12
12
|
...filteredProps
|
|
13
13
|
} = props;
|
|
14
14
|
|
|
15
|
-
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
16
|
-
useImperativeHandle(forwardedRef, () => ({
|
|
17
|
-
hide: () => ref.current.hide(),
|
|
18
|
-
show: () => ref.current.show(),
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
15
|
return React.createElement(
|
|
22
16
|
"plus-modal",
|
|
23
17
|
{
|
package/react/PlusPopconfirm.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/popconfirm/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -32,12 +27,17 @@ export const PlusPopconfirm = forwardRef((props, forwardedRef) => {
|
|
|
32
27
|
);
|
|
33
28
|
useEventListener(ref, "plus-popconfirm-cancel", props.onPlusPopconfirmCancel);
|
|
34
29
|
|
|
35
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
36
|
-
|
|
37
30
|
return React.createElement(
|
|
38
31
|
"plus-popconfirm",
|
|
39
32
|
{
|
|
40
|
-
ref
|
|
33
|
+
ref: (node) => {
|
|
34
|
+
ref.current = node;
|
|
35
|
+
if (typeof forwardedRef === "function") {
|
|
36
|
+
forwardedRef(node);
|
|
37
|
+
} else if (forwardedRef) {
|
|
38
|
+
forwardedRef.current = node;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
41
|
...filteredProps,
|
|
42
42
|
size: props.size,
|
|
43
43
|
orientation: props.orientation,
|
package/react/PlusPopover.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/popover/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -27,12 +22,17 @@ export const PlusPopover = forwardRef((props, forwardedRef) => {
|
|
|
27
22
|
useEventListener(ref, "plus-popover-close", props.onPlusPopoverClose);
|
|
28
23
|
useEventListener(ref, "plus-popover-dismiss", props.onPlusPopoverDismiss);
|
|
29
24
|
|
|
30
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
31
|
-
|
|
32
25
|
return React.createElement(
|
|
33
26
|
"plus-popover",
|
|
34
27
|
{
|
|
35
|
-
ref
|
|
28
|
+
ref: (node) => {
|
|
29
|
+
ref.current = node;
|
|
30
|
+
if (typeof forwardedRef === "function") {
|
|
31
|
+
forwardedRef(node);
|
|
32
|
+
} else if (forwardedRef) {
|
|
33
|
+
forwardedRef.current = node;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
36
|
...filteredProps,
|
|
37
37
|
size: props.size,
|
|
38
38
|
orientation: props.orientation,
|
package/react/PlusRadio.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/radio/index.js";
|
|
8
3
|
import { useEventListener, useProperties } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -29,15 +24,17 @@ export const PlusRadio = forwardRef((props, forwardedRef) => {
|
|
|
29
24
|
/** Properties - run whenever a property has changed */
|
|
30
25
|
useProperties(ref, "hasFocus", props.hasFocus);
|
|
31
26
|
|
|
32
|
-
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
33
|
-
useImperativeHandle(forwardedRef, () => ({
|
|
34
|
-
handleChange: () => ref.current.handleChange(),
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
27
|
return React.createElement(
|
|
38
28
|
"plus-radio",
|
|
39
29
|
{
|
|
40
|
-
ref
|
|
30
|
+
ref: (node) => {
|
|
31
|
+
ref.current = node;
|
|
32
|
+
if (typeof forwardedRef === "function") {
|
|
33
|
+
forwardedRef(node);
|
|
34
|
+
} else if (forwardedRef) {
|
|
35
|
+
forwardedRef.current = node;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
41
38
|
...filteredProps,
|
|
42
39
|
size: props.size,
|
|
43
40
|
text: props.text,
|
package/react/PlusRadioGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/radio-group/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusRadioGroup = forwardRef((props, forwardedRef) => {
|
|
@@ -13,8 +13,6 @@ export const PlusRadioGroup = forwardRef((props, forwardedRef) => {
|
|
|
13
13
|
...filteredProps
|
|
14
14
|
} = props;
|
|
15
15
|
|
|
16
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
17
|
-
|
|
18
16
|
return React.createElement(
|
|
19
17
|
"plus-radio-group",
|
|
20
18
|
{
|
package/react/PlusRating.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/rating/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -29,15 +24,17 @@ export const PlusRating = forwardRef((props, forwardedRef) => {
|
|
|
29
24
|
useEventListener(ref, "plus-change", props.onPlusChange);
|
|
30
25
|
useEventListener(ref, "plus-hover", props.onPlusHover);
|
|
31
26
|
|
|
32
|
-
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
33
|
-
useImperativeHandle(forwardedRef, () => ({
|
|
34
|
-
reportValidity: () => ref.current.reportValidity(),
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
27
|
return React.createElement(
|
|
38
28
|
"plus-rating",
|
|
39
29
|
{
|
|
40
|
-
ref
|
|
30
|
+
ref: (node) => {
|
|
31
|
+
ref.current = node;
|
|
32
|
+
if (typeof forwardedRef === "function") {
|
|
33
|
+
forwardedRef(node);
|
|
34
|
+
} else if (forwardedRef) {
|
|
35
|
+
forwardedRef.current = node;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
41
38
|
...filteredProps,
|
|
42
39
|
value: props.value,
|
|
43
40
|
max: props.max,
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/segmented-picker/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -18,12 +13,17 @@ export const PlusSegmentedPicker = forwardRef((props, forwardedRef) => {
|
|
|
18
13
|
props.onPlusSegmentedPickerItemChanged,
|
|
19
14
|
);
|
|
20
15
|
|
|
21
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
22
|
-
|
|
23
16
|
return React.createElement(
|
|
24
17
|
"plus-segmented-picker",
|
|
25
18
|
{
|
|
26
|
-
ref
|
|
19
|
+
ref: (node) => {
|
|
20
|
+
ref.current = node;
|
|
21
|
+
if (typeof forwardedRef === "function") {
|
|
22
|
+
forwardedRef(node);
|
|
23
|
+
} else if (forwardedRef) {
|
|
24
|
+
forwardedRef.current = node;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
27
|
...filteredProps,
|
|
28
28
|
status: props.status,
|
|
29
29
|
shape: props.shape,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/segmented-picker-item/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusSegmentedPickerItem = forwardRef((props, forwardedRef) => {
|
|
@@ -13,8 +13,6 @@ export const PlusSegmentedPickerItem = forwardRef((props, forwardedRef) => {
|
|
|
13
13
|
...filteredProps
|
|
14
14
|
} = props;
|
|
15
15
|
|
|
16
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
17
|
-
|
|
18
16
|
return React.createElement(
|
|
19
17
|
"plus-segmented-picker-item",
|
|
20
18
|
{
|
package/react/PlusSelect.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/select/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -31,12 +26,17 @@ export const PlusSelect = forwardRef((props, forwardedRef) => {
|
|
|
31
26
|
props.onPlusSelectSelectedItem,
|
|
32
27
|
);
|
|
33
28
|
|
|
34
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
35
|
-
|
|
36
29
|
return React.createElement(
|
|
37
30
|
"plus-select",
|
|
38
31
|
{
|
|
39
|
-
ref
|
|
32
|
+
ref: (node) => {
|
|
33
|
+
ref.current = node;
|
|
34
|
+
if (typeof forwardedRef === "function") {
|
|
35
|
+
forwardedRef(node);
|
|
36
|
+
} else if (forwardedRef) {
|
|
37
|
+
forwardedRef.current = node;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
40
|
...filteredProps,
|
|
41
41
|
size: props.size,
|
|
42
42
|
placeholder: props.placeholder,
|
package/react/PlusSelectItem.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/select-item/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -14,12 +9,17 @@ export const PlusSelectItem = forwardRef((props, forwardedRef) => {
|
|
|
14
9
|
/** Event listeners - run once */
|
|
15
10
|
useEventListener(ref, "click", props.onClick);
|
|
16
11
|
|
|
17
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
-
|
|
19
12
|
return React.createElement(
|
|
20
13
|
"plus-select-item",
|
|
21
14
|
{
|
|
22
|
-
ref
|
|
15
|
+
ref: (node) => {
|
|
16
|
+
ref.current = node;
|
|
17
|
+
if (typeof forwardedRef === "function") {
|
|
18
|
+
forwardedRef(node);
|
|
19
|
+
} else if (forwardedRef) {
|
|
20
|
+
forwardedRef.current = node;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
23
|
...filteredProps,
|
|
24
24
|
size: props.size,
|
|
25
25
|
text: props.text,
|
package/react/PlusService.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/service/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusService = forwardRef((props, forwardedRef) => {
|
|
5
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
6
|
-
|
|
7
5
|
return React.createElement(
|
|
8
6
|
"plus-service",
|
|
9
7
|
{
|
package/react/PlusSvgIcon.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/svg-icon/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusSvgIcon = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { iconName, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-svg-icon",
|
|
11
9
|
{
|
package/react/PlusTab.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/tab/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusTab = forwardRef((props, forwardedRef) => {
|
|
@@ -16,8 +16,6 @@ export const PlusTab = forwardRef((props, forwardedRef) => {
|
|
|
16
16
|
...filteredProps
|
|
17
17
|
} = props;
|
|
18
18
|
|
|
19
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
20
|
-
|
|
21
19
|
return React.createElement(
|
|
22
20
|
"plus-tab",
|
|
23
21
|
{
|
package/react/PlusTabGroup.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/tab-group/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -22,12 +17,17 @@ export const PlusTabGroup = forwardRef((props, forwardedRef) => {
|
|
|
22
17
|
/** Event listeners - run once */
|
|
23
18
|
useEventListener(ref, "plus-tabs-change", props.onPlusTabsChange);
|
|
24
19
|
|
|
25
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
26
|
-
|
|
27
20
|
return React.createElement(
|
|
28
21
|
"plus-tab-group",
|
|
29
22
|
{
|
|
30
|
-
ref
|
|
23
|
+
ref: (node) => {
|
|
24
|
+
ref.current = node;
|
|
25
|
+
if (typeof forwardedRef === "function") {
|
|
26
|
+
forwardedRef(node);
|
|
27
|
+
} else if (forwardedRef) {
|
|
28
|
+
forwardedRef.current = node;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
31
|
...filteredProps,
|
|
32
32
|
size: props.size,
|
|
33
33
|
orientation: props.orientation,
|
package/react/PlusTabPanel.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/tab-panel/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusTabPanel = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { active, value, panelClass, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-tab-panel",
|
|
11
9
|
{
|
package/react/PlusTag.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/tag/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusTag = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { invert, status, size, radius, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-tag",
|
|
11
9
|
{
|
package/react/PlusText.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/text/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusText = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { kind, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-text",
|
|
11
9
|
{
|
package/react/PlusTextarea.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/textarea/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -38,17 +33,17 @@ export const PlusTextarea = forwardRef((props, forwardedRef) => {
|
|
|
38
33
|
useEventListener(ref, "plus-blur", props.onPlusBlur);
|
|
39
34
|
useEventListener(ref, "plus-invalid", props.onPlusInvalid);
|
|
40
35
|
|
|
41
|
-
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
42
|
-
useImperativeHandle(forwardedRef, () => ({
|
|
43
|
-
checkValidity: () => ref.current.checkValidity(),
|
|
44
|
-
reportValidity: () => ref.current.reportValidity(),
|
|
45
|
-
setCustomValidity: (message) => ref.current.setCustomValidity(message),
|
|
46
|
-
}));
|
|
47
|
-
|
|
48
36
|
return React.createElement(
|
|
49
37
|
"plus-textarea",
|
|
50
38
|
{
|
|
51
|
-
ref
|
|
39
|
+
ref: (node) => {
|
|
40
|
+
ref.current = node;
|
|
41
|
+
if (typeof forwardedRef === "function") {
|
|
42
|
+
forwardedRef(node);
|
|
43
|
+
} else if (forwardedRef) {
|
|
44
|
+
forwardedRef.current = node;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
52
47
|
...filteredProps,
|
|
53
48
|
name: props.name,
|
|
54
49
|
value: props.value,
|
package/react/PlusToast.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/toast/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -24,12 +19,17 @@ export const PlusToast = forwardRef((props, forwardedRef) => {
|
|
|
24
19
|
/** Event listeners - run once */
|
|
25
20
|
useEventListener(ref, "plus-close", props.onPlusClose);
|
|
26
21
|
|
|
27
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
28
|
-
|
|
29
22
|
return React.createElement(
|
|
30
23
|
"plus-toast",
|
|
31
24
|
{
|
|
32
|
-
ref
|
|
25
|
+
ref: (node) => {
|
|
26
|
+
ref.current = node;
|
|
27
|
+
if (typeof forwardedRef === "function") {
|
|
28
|
+
forwardedRef(node);
|
|
29
|
+
} else if (forwardedRef) {
|
|
30
|
+
forwardedRef.current = node;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
33
|
...filteredProps,
|
|
34
34
|
size: props.size,
|
|
35
35
|
kind: props.kind,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/toast-container/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusToastContainer = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { position, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-toast-container",
|
|
11
9
|
{
|
package/react/PlusToggle.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
forwardRef,
|
|
3
|
-
useImperativeHandle,
|
|
4
|
-
useRef,
|
|
5
|
-
useEffect,
|
|
6
|
-
} from "react";
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
7
2
|
import "../dist/components/toggle/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -40,17 +35,17 @@ export const PlusToggle = forwardRef((props, forwardedRef) => {
|
|
|
40
35
|
useEventListener(ref, "plus-blur", props.onPlusBlur);
|
|
41
36
|
useEventListener(ref, "plus-invalid", props.onPlusInvalid);
|
|
42
37
|
|
|
43
|
-
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
44
|
-
useImperativeHandle(forwardedRef, () => ({
|
|
45
|
-
checkValidity: () => ref.current.checkValidity(),
|
|
46
|
-
reportValidity: () => ref.current.reportValidity(),
|
|
47
|
-
setCustomValidity: (message) => ref.current.setCustomValidity(message),
|
|
48
|
-
}));
|
|
49
|
-
|
|
50
38
|
return React.createElement(
|
|
51
39
|
"plus-toggle",
|
|
52
40
|
{
|
|
53
|
-
ref
|
|
41
|
+
ref: (node) => {
|
|
42
|
+
ref.current = node;
|
|
43
|
+
if (typeof forwardedRef === "function") {
|
|
44
|
+
forwardedRef(node);
|
|
45
|
+
} else if (forwardedRef) {
|
|
46
|
+
forwardedRef.current = node;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
54
49
|
...filteredProps,
|
|
55
50
|
name: props.name,
|
|
56
51
|
value: props.value,
|
package/react/PlusTooltip.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/tooltip/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusTooltip = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { size, message, trigger, orientation, hideDelay, ...filteredProps } =
|
|
6
6
|
props;
|
|
7
7
|
|
|
8
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
9
|
-
|
|
10
8
|
return React.createElement(
|
|
11
9
|
"plus-tooltip",
|
|
12
10
|
{
|
package/react/Tailwind.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components//index.js";
|
|
3
3
|
|
|
4
4
|
export const Tailwind = forwardRef((props, forwardedRef) => {
|
|
5
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
6
|
-
|
|
7
5
|
return React.createElement(
|
|
8
6
|
"undefined",
|
|
9
7
|
{
|
package/web-types.json
CHANGED