@plusui/library 0.1.9 → 0.1.10
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/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 +5 -5
- package/cdn/components/checkbox/index.js +5 -5
- 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 +8 -8
- package/cdn/components/input/index.js +6 -6
- package/cdn/components/input/input.js +6 -6
- 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 +6 -6
- package/cdn/components/rating/rating.js +6 -6
- 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 +5 -5
- 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 +4 -4
- package/cdn/components/service/service.js +5 -5
- 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 +3 -3
- package/cdn/components/toast/toast.js +3 -3
- package/cdn/components/toast-container/index.js +4 -4
- package/cdn/components/toast-container/toast-container.js +4 -4
- package/cdn/components/toggle/index.js +7 -7
- package/cdn/components/toggle/toggle.js +7 -7
- 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-CXNHR8n2.js +1 -0
- package/{dist/floating-ui.dom-BpzIshEG.js → cdn/floating-ui.dom-OBaMlALa.js} +14 -26
- package/cdn/global-Dle97gC_.js +31 -0
- package/cdn/global-X3icUTt-.js +1 -0
- package/cdn/{if-defined-CIB8OTrH.js → if-defined-CQ5F5a3V.js} +1 -1
- package/cdn/{if-defined-DpyZ37D-.js → if-defined-D-m3dgRf.js} +1 -1
- package/cdn/lit-element-ByzbtpGk.js +27 -0
- package/cdn/lit-element-DNNEDGnu.js +23 -0
- package/cdn/{live-C1eBrEBV.js → live-BOAtKRUN.js} +1 -1
- package/cdn/{live-CYp4nasd.js → live-Ba4FL2pG.js} +1 -1
- package/cdn/property-DLlzgs39.js +7 -0
- package/cdn/{property-Dz31PgR6.js → property-DiPQx9S3.js} +2 -2
- package/{dist/state-CxOUQRG2.js → cdn/state-CoIPL7X5.js} +1 -1
- package/{dist/state-BRspp5eU.js → cdn/state-D1d5Sfj8.js} +1 -1
- package/{dist/style-map-Cgr6kXUm.js → cdn/style-map-DC_vNus2.js} +1 -1
- package/cdn/{style-map-BYRi_l0u.js → style-map-Z-XBeQmS.js} +1 -1
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.js +2 -2
- 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/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/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/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/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/index.js +2 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -3
- 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/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/index.js +3 -3
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +4 -4
- package/dist/components/checkbox/index.js +4 -4
- 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/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/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.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/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/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/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/index.js +3 -3
- package/dist/components/index.js +7 -7
- 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/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/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/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/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/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/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-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/rating/index.js +5 -5
- package/dist/components/rating/rating.d.ts +1 -1
- package/dist/components/rating/rating.js +5 -5
- 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-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/select/index.js +4 -4
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.js +4 -4
- 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/service/index.js +3 -3
- package/dist/components/service/service.d.ts +1 -1
- package/dist/components/service/service.js +4 -4
- 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-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-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/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/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/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/toast/index.js +2 -2
- package/dist/components/toast/toast.js +2 -2
- package/dist/components/toast-container/index.js +3 -3
- package/dist/components/toast-container/toast-container.d.ts +1 -1
- package/dist/components/toast-container/toast-container.js +3 -3
- package/dist/components/toggle/index.js +6 -6
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/toggle/toggle.js +6 -6
- 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/factory/tailwind-factory.d.ts.map +1 -1
- package/dist/factory/tailwind-factory.js +6 -6
- package/{cdn/floating-ui.dom-BpzIshEG.js → dist/floating-ui.dom-OBaMlALa.js} +14 -26
- package/dist/floating-ui.dom-_GkhANzD.js +1 -0
- package/dist/{if-defined-DpyZ37D-.js → if-defined-D-m3dgRf.js} +1 -1
- package/dist/{if-defined-DsURCocJ.js → if-defined-DGS5gjjQ.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/lit-element-ByzbtpGk.js +27 -0
- package/dist/lit-element-Dgkfbcpf.js +23 -0
- package/dist/{live-C1eBrEBV.js → live-BOAtKRUN.js} +1 -1
- package/dist/{live-Cv3p2930.js → live-BYcLnFf4.js} +1 -1
- package/dist/model/plus.d.ts.map +1 -1
- package/dist/property-9ul_Onp_.js +7 -0
- package/dist/{property-Dz31PgR6.js → property-DiPQx9S3.js} +2 -2
- package/dist/{query-JZZ8o83g.js → query-Co-yxXZN.js} +1 -1
- package/dist/{query-assigned-elements-DeL5RNz8.js → query-assigned-elements-mjJwkuSO.js} +1 -1
- package/{cdn/state-BRspp5eU.js → dist/state-D1d5Sfj8.js} +1 -1
- package/{cdn/state-hFbsBSdV.js → dist/state-Dh2QiBIS.js} +1 -1
- package/dist/{style-map-BSFs8yH4.js → style-map-BSpqx7tU.js} +1 -1
- package/{cdn/style-map-Cgr6kXUm.js → dist/style-map-DC_vNus2.js} +1 -1
- package/dist/styles/global.js +2 -2
- package/dist/utils/boolean-converter.d.ts.map +1 -1
- package/package.json +7 -7
- package/public/html/index.js +24 -36
- package/public/react/index.d.ts +42 -42
- package/public/react/index.js +166 -197
- package/react/PlusAccordion.js +9 -9
- package/react/PlusAccordionGroup.js +3 -1
- package/react/PlusAlert.js +9 -9
- package/react/PlusAvatar.js +3 -1
- package/react/PlusBadge.js +3 -1
- package/react/PlusBreadcrumb.js +3 -1
- package/react/PlusBreadcrumbItem.js +3 -1
- package/react/PlusButton.js +3 -1
- package/react/PlusButtonGroup.js +3 -1
- package/react/PlusCheckbox.js +17 -9
- package/react/PlusCheckboxGroup.js +9 -9
- package/react/PlusChip.js +3 -1
- package/react/PlusDivider.js +9 -9
- package/react/PlusDrawer.js +7 -1
- package/react/PlusDropDownItem.js +9 -9
- package/react/PlusDropdown.js +9 -9
- package/react/PlusIcon.js +3 -1
- package/react/PlusInput.js +14 -9
- package/react/PlusLink.js +3 -1
- package/react/PlusListBoxItem.js +9 -9
- package/react/PlusModal.js +7 -1
- package/react/PlusPopconfirm.js +9 -9
- package/react/PlusPopover.js +9 -9
- package/react/PlusRadio.js +12 -9
- package/react/PlusRadioGroup.js +3 -1
- package/react/PlusRating.js +12 -9
- package/react/PlusSegmentedPicker.js +9 -9
- package/react/PlusSegmentedPickerItem.js +3 -1
- package/react/PlusSelect.js +9 -9
- package/react/PlusSelectItem.js +9 -9
- package/react/PlusService.js +3 -1
- package/react/PlusTab.js +3 -1
- package/react/PlusTabGroup.js +9 -9
- package/react/PlusTabPanel.js +3 -1
- package/react/PlusTag.js +3 -1
- package/react/PlusText.js +3 -1
- package/react/PlusTextarea.js +14 -9
- package/react/PlusToast.js +9 -9
- package/react/PlusToastContainer.js +3 -1
- package/react/PlusToggle.js +14 -9
- package/react/PlusTooltip.js +3 -1
- package/react/Tailwind.js +3 -1
- package/web-types.json +1 -1
- package/cdn/floating-ui.dom-BYyWpmHF.js +0 -1
- package/cdn/global-9t6v8EOl.js +0 -31
- package/cdn/global-CRwUv2yr.js +0 -1
- package/cdn/lit-element-BNK__jO-.js +0 -27
- package/cdn/lit-element-CSuLHuHb.js +0 -22
- package/cdn/property-B8EDuyz_.js +0 -7
- package/dist/floating-ui.dom-BwkSoRW9.js +0 -1
- package/dist/lit-element-BNK__jO-.js +0 -27
- package/dist/lit-element-DWht4T0R.js +0 -22
- package/dist/property-D4Afnon0.js +0 -7
- /package/dist/{base-2hF1n6hl.js → base-CvHlJm-R.js} +0 -0
- /package/dist/{directive-DRRu7zbS.js → directive-D9Pmr9u1.js} +0 -0
- /package/dist/{index-Up-p3euZ.js → index-awy0rvvf.js} +0 -0
package/react/PlusAccordion.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/accordion/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -17,17 +22,12 @@ export const PlusAccordion = forwardRef((props, forwardedRef) => {
|
|
|
17
22
|
/** Event listeners - run once */
|
|
18
23
|
useEventListener(ref, "plus-accordion-toggle", props.onPlusAccordionToggle);
|
|
19
24
|
|
|
25
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
26
|
+
|
|
20
27
|
return React.createElement(
|
|
21
28
|
"plus-accordion",
|
|
22
29
|
{
|
|
23
|
-
ref
|
|
24
|
-
ref.current = node;
|
|
25
|
-
if (typeof forwardedRef === "function") {
|
|
26
|
-
forwardedRef(node);
|
|
27
|
-
} else if (forwardedRef) {
|
|
28
|
-
forwardedRef.current = node;
|
|
29
|
-
}
|
|
30
|
-
},
|
|
30
|
+
ref,
|
|
31
31
|
...filteredProps,
|
|
32
32
|
size: props.size,
|
|
33
33
|
class: props.className,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/accordion-group/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusAccordionGroup = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { multi, kind, size, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
+
|
|
7
9
|
return React.createElement(
|
|
8
10
|
"plus-accordion-group",
|
|
9
11
|
{
|
package/react/PlusAlert.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/alert/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -22,17 +27,12 @@ export const PlusAlert = forwardRef((props, forwardedRef) => {
|
|
|
22
27
|
/** Event listeners - run once */
|
|
23
28
|
useEventListener(ref, "plus-dismiss", props.onPlusDismiss);
|
|
24
29
|
|
|
30
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
31
|
+
|
|
25
32
|
return React.createElement(
|
|
26
33
|
"plus-alert",
|
|
27
34
|
{
|
|
28
|
-
ref
|
|
29
|
-
ref.current = node;
|
|
30
|
-
if (typeof forwardedRef === "function") {
|
|
31
|
-
forwardedRef(node);
|
|
32
|
-
} else if (forwardedRef) {
|
|
33
|
-
forwardedRef.current = node;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
35
|
+
ref,
|
|
36
36
|
...filteredProps,
|
|
37
37
|
kind: props.kind,
|
|
38
38
|
size: props.size,
|
package/react/PlusAvatar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/avatar/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusAvatar = forwardRef((props, forwardedRef) => {
|
|
@@ -14,6 +14,8 @@ export const PlusAvatar = forwardRef((props, forwardedRef) => {
|
|
|
14
14
|
...filteredProps
|
|
15
15
|
} = props;
|
|
16
16
|
|
|
17
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
+
|
|
17
19
|
return React.createElement(
|
|
18
20
|
"plus-avatar",
|
|
19
21
|
{
|
package/react/PlusBadge.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/badge/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusBadge = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { status, size, orientation, offset, content, ...filteredProps } =
|
|
6
6
|
props;
|
|
7
7
|
|
|
8
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
9
|
+
|
|
8
10
|
return React.createElement(
|
|
9
11
|
"plus-badge",
|
|
10
12
|
{
|
package/react/PlusBreadcrumb.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/breadcrumb/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusBreadcrumb = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { kind, separator, size, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
+
|
|
7
9
|
return React.createElement(
|
|
8
10
|
"plus-breadcrumb",
|
|
9
11
|
{
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/breadcrumb-item/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusBreadcrumbItem = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { href, prefixIcon, suffixIcon, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
+
|
|
7
9
|
return React.createElement(
|
|
8
10
|
"plus-breadcrumb-item",
|
|
9
11
|
{
|
package/react/PlusButton.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/button/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusButton = forwardRef((props, forwardedRef) => {
|
|
@@ -18,6 +18,8 @@ export const PlusButton = forwardRef((props, forwardedRef) => {
|
|
|
18
18
|
...filteredProps
|
|
19
19
|
} = props;
|
|
20
20
|
|
|
21
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
22
|
+
|
|
21
23
|
return React.createElement(
|
|
22
24
|
"plus-button",
|
|
23
25
|
{
|
package/react/PlusButtonGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/button-group/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusButtonGroup = forwardRef((props, forwardedRef) => {
|
|
@@ -13,6 +13,8 @@ export const PlusButtonGroup = forwardRef((props, forwardedRef) => {
|
|
|
13
13
|
...filteredProps
|
|
14
14
|
} = props;
|
|
15
15
|
|
|
16
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
17
|
+
|
|
16
18
|
return React.createElement(
|
|
17
19
|
"plus-button-group",
|
|
18
20
|
{
|
package/react/PlusCheckbox.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/checkbox/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -21,17 +26,20 @@ export const PlusCheckbox = forwardRef((props, forwardedRef) => {
|
|
|
21
26
|
useEventListener(ref, "plus-focus", props.onPlusFocus);
|
|
22
27
|
useEventListener(ref, "plus-blur", props.onPlusBlur);
|
|
23
28
|
|
|
29
|
+
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
30
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
31
|
+
formResetCallback: () => ref.current.formResetCallback(),
|
|
32
|
+
formDisabledCallback: (disabled) =>
|
|
33
|
+
ref.current.formDisabledCallback(disabled),
|
|
34
|
+
click: () => ref.current.click(),
|
|
35
|
+
focus: (options) => ref.current.focus(options),
|
|
36
|
+
blur: () => ref.current.blur(),
|
|
37
|
+
}));
|
|
38
|
+
|
|
24
39
|
return React.createElement(
|
|
25
40
|
"plus-checkbox",
|
|
26
41
|
{
|
|
27
|
-
ref
|
|
28
|
-
ref.current = node;
|
|
29
|
-
if (typeof forwardedRef === "function") {
|
|
30
|
-
forwardedRef(node);
|
|
31
|
-
} else if (forwardedRef) {
|
|
32
|
-
forwardedRef.current = node;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
42
|
+
ref,
|
|
35
43
|
...filteredProps,
|
|
36
44
|
name: props.name,
|
|
37
45
|
size: props.size,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/checkbox-group/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -9,17 +14,12 @@ export const PlusCheckboxGroup = forwardRef((props, forwardedRef) => {
|
|
|
9
14
|
/** Event listeners - run once */
|
|
10
15
|
useEventListener(ref, "plus-change", props.onPlusChange);
|
|
11
16
|
|
|
17
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
+
|
|
12
19
|
return React.createElement(
|
|
13
20
|
"plus-checkbox-group",
|
|
14
21
|
{
|
|
15
|
-
ref
|
|
16
|
-
ref.current = node;
|
|
17
|
-
if (typeof forwardedRef === "function") {
|
|
18
|
-
forwardedRef(node);
|
|
19
|
-
} else if (forwardedRef) {
|
|
20
|
-
forwardedRef.current = node;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
22
|
+
ref,
|
|
23
23
|
...filteredProps,
|
|
24
24
|
value: props.value,
|
|
25
25
|
size: props.size,
|
package/react/PlusChip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/chip/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusChip = forwardRef((props, forwardedRef) => {
|
|
@@ -14,6 +14,8 @@ export const PlusChip = forwardRef((props, forwardedRef) => {
|
|
|
14
14
|
...filteredProps
|
|
15
15
|
} = props;
|
|
16
16
|
|
|
17
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
+
|
|
17
19
|
return React.createElement(
|
|
18
20
|
"plus-chip",
|
|
19
21
|
{
|
package/react/PlusDivider.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/divider/index.js";
|
|
3
8
|
import { useProperties } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -16,17 +21,12 @@ export const PlusDivider = forwardRef((props, forwardedRef) => {
|
|
|
16
21
|
/** Properties - run whenever a property has changed */
|
|
17
22
|
useProperties(ref, "hasContent", props.hasContent);
|
|
18
23
|
|
|
24
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
25
|
+
|
|
19
26
|
return React.createElement(
|
|
20
27
|
"plus-divider",
|
|
21
28
|
{
|
|
22
|
-
ref
|
|
23
|
-
ref.current = node;
|
|
24
|
-
if (typeof forwardedRef === "function") {
|
|
25
|
-
forwardedRef(node);
|
|
26
|
-
} else if (forwardedRef) {
|
|
27
|
-
forwardedRef.current = node;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
29
|
+
ref,
|
|
30
30
|
...filteredProps,
|
|
31
31
|
orientation: props.orientation,
|
|
32
32
|
kind: props.kind,
|
package/react/PlusDrawer.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/drawer/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusDrawer = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { isOpen, size, orientation, animationDuration, ...filteredProps } =
|
|
6
6
|
props;
|
|
7
7
|
|
|
8
|
+
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
9
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
10
|
+
hide: () => ref.current.hide(),
|
|
11
|
+
show: () => ref.current.show(),
|
|
12
|
+
}));
|
|
13
|
+
|
|
8
14
|
return React.createElement(
|
|
9
15
|
"plus-drawer",
|
|
10
16
|
{
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/dropdown-item/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -9,17 +14,12 @@ export const PlusDropDownItem = forwardRef((props, forwardedRef) => {
|
|
|
9
14
|
/** Event listeners - run once */
|
|
10
15
|
useEventListener(ref, "click", props.onClick);
|
|
11
16
|
|
|
17
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
+
|
|
12
19
|
return React.createElement(
|
|
13
20
|
"plus-dropdown-item",
|
|
14
21
|
{
|
|
15
|
-
ref
|
|
16
|
-
ref.current = node;
|
|
17
|
-
if (typeof forwardedRef === "function") {
|
|
18
|
-
forwardedRef(node);
|
|
19
|
-
} else if (forwardedRef) {
|
|
20
|
-
forwardedRef.current = node;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
22
|
+
ref,
|
|
23
23
|
...filteredProps,
|
|
24
24
|
size: props.size,
|
|
25
25
|
text: props.text,
|
package/react/PlusDropdown.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/dropdown/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -15,17 +20,12 @@ export const PlusDropdown = forwardRef((props, forwardedRef) => {
|
|
|
15
20
|
props.onPlusDropdownSelectedItem,
|
|
16
21
|
);
|
|
17
22
|
|
|
23
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
24
|
+
|
|
18
25
|
return React.createElement(
|
|
19
26
|
"plus-dropdown",
|
|
20
27
|
{
|
|
21
|
-
ref
|
|
22
|
-
ref.current = node;
|
|
23
|
-
if (typeof forwardedRef === "function") {
|
|
24
|
-
forwardedRef(node);
|
|
25
|
-
} else if (forwardedRef) {
|
|
26
|
-
forwardedRef.current = node;
|
|
27
|
-
}
|
|
28
|
-
},
|
|
28
|
+
ref,
|
|
29
29
|
...filteredProps,
|
|
30
30
|
size: props.size,
|
|
31
31
|
status: props.status,
|
package/react/PlusIcon.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/icon/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusIcon = forwardRef((props, forwardedRef) => {
|
|
5
5
|
const { iconName, iconStyle, size, label, ...filteredProps } = props;
|
|
6
6
|
|
|
7
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
8
|
+
|
|
7
9
|
return React.createElement(
|
|
8
10
|
"plus-icon",
|
|
9
11
|
{
|
package/react/PlusInput.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/input/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -47,17 +52,17 @@ export const PlusInput = forwardRef((props, forwardedRef) => {
|
|
|
47
52
|
useEventListener(ref, "plus-password-toggle", props.onPlusPasswordToggle);
|
|
48
53
|
useEventListener(ref, "plus-invalid", props.onPlusInvalid);
|
|
49
54
|
|
|
55
|
+
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
56
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
57
|
+
checkValidity: () => ref.current.checkValidity(),
|
|
58
|
+
reportValidity: () => ref.current.reportValidity(),
|
|
59
|
+
setCustomValidity: (message) => ref.current.setCustomValidity(message),
|
|
60
|
+
}));
|
|
61
|
+
|
|
50
62
|
return React.createElement(
|
|
51
63
|
"plus-input",
|
|
52
64
|
{
|
|
53
|
-
ref
|
|
54
|
-
ref.current = node;
|
|
55
|
-
if (typeof forwardedRef === "function") {
|
|
56
|
-
forwardedRef(node);
|
|
57
|
-
} else if (forwardedRef) {
|
|
58
|
-
forwardedRef.current = node;
|
|
59
|
-
}
|
|
60
|
-
},
|
|
65
|
+
ref,
|
|
61
66
|
...filteredProps,
|
|
62
67
|
type: props.type,
|
|
63
68
|
name: props.name,
|
package/react/PlusLink.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/link/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusLink = forwardRef((props, forwardedRef) => {
|
|
@@ -16,6 +16,8 @@ export const PlusLink = forwardRef((props, forwardedRef) => {
|
|
|
16
16
|
...filteredProps
|
|
17
17
|
} = props;
|
|
18
18
|
|
|
19
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
20
|
+
|
|
19
21
|
return React.createElement(
|
|
20
22
|
"plus-link",
|
|
21
23
|
{
|
package/react/PlusListBoxItem.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/list-box-item/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -9,17 +14,12 @@ export const PlusListBoxItem = forwardRef((props, forwardedRef) => {
|
|
|
9
14
|
/** Event listeners - run once */
|
|
10
15
|
useEventListener(ref, "click", props.onClick);
|
|
11
16
|
|
|
17
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
+
|
|
12
19
|
return React.createElement(
|
|
13
20
|
"plus-list-box-item",
|
|
14
21
|
{
|
|
15
|
-
ref
|
|
16
|
-
ref.current = node;
|
|
17
|
-
if (typeof forwardedRef === "function") {
|
|
18
|
-
forwardedRef(node);
|
|
19
|
-
} else if (forwardedRef) {
|
|
20
|
-
forwardedRef.current = node;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
22
|
+
ref,
|
|
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 } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/modal/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusModal = forwardRef((props, forwardedRef) => {
|
|
@@ -12,6 +12,12 @@ 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
|
+
|
|
15
21
|
return React.createElement(
|
|
16
22
|
"plus-modal",
|
|
17
23
|
{
|
package/react/PlusPopconfirm.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/popconfirm/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -27,17 +32,12 @@ export const PlusPopconfirm = forwardRef((props, forwardedRef) => {
|
|
|
27
32
|
);
|
|
28
33
|
useEventListener(ref, "plus-popconfirm-cancel", props.onPlusPopconfirmCancel);
|
|
29
34
|
|
|
35
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
36
|
+
|
|
30
37
|
return React.createElement(
|
|
31
38
|
"plus-popconfirm",
|
|
32
39
|
{
|
|
33
|
-
ref
|
|
34
|
-
ref.current = node;
|
|
35
|
-
if (typeof forwardedRef === "function") {
|
|
36
|
-
forwardedRef(node);
|
|
37
|
-
} else if (forwardedRef) {
|
|
38
|
-
forwardedRef.current = node;
|
|
39
|
-
}
|
|
40
|
-
},
|
|
40
|
+
ref,
|
|
41
41
|
...filteredProps,
|
|
42
42
|
size: props.size,
|
|
43
43
|
orientation: props.orientation,
|
package/react/PlusPopover.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/popover/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -22,17 +27,12 @@ export const PlusPopover = forwardRef((props, forwardedRef) => {
|
|
|
22
27
|
useEventListener(ref, "plus-popover-close", props.onPlusPopoverClose);
|
|
23
28
|
useEventListener(ref, "plus-popover-dismiss", props.onPlusPopoverDismiss);
|
|
24
29
|
|
|
30
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
31
|
+
|
|
25
32
|
return React.createElement(
|
|
26
33
|
"plus-popover",
|
|
27
34
|
{
|
|
28
|
-
ref
|
|
29
|
-
ref.current = node;
|
|
30
|
-
if (typeof forwardedRef === "function") {
|
|
31
|
-
forwardedRef(node);
|
|
32
|
-
} else if (forwardedRef) {
|
|
33
|
-
forwardedRef.current = node;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
35
|
+
ref,
|
|
36
36
|
...filteredProps,
|
|
37
37
|
size: props.size,
|
|
38
38
|
orientation: props.orientation,
|
package/react/PlusRadio.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/radio/index.js";
|
|
3
8
|
import { useEventListener, useProperties } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -24,17 +29,15 @@ export const PlusRadio = forwardRef((props, forwardedRef) => {
|
|
|
24
29
|
/** Properties - run whenever a property has changed */
|
|
25
30
|
useProperties(ref, "hasFocus", props.hasFocus);
|
|
26
31
|
|
|
32
|
+
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
33
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
34
|
+
handleChange: () => ref.current.handleChange(),
|
|
35
|
+
}));
|
|
36
|
+
|
|
27
37
|
return React.createElement(
|
|
28
38
|
"plus-radio",
|
|
29
39
|
{
|
|
30
|
-
ref
|
|
31
|
-
ref.current = node;
|
|
32
|
-
if (typeof forwardedRef === "function") {
|
|
33
|
-
forwardedRef(node);
|
|
34
|
-
} else if (forwardedRef) {
|
|
35
|
-
forwardedRef.current = node;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
40
|
+
ref,
|
|
38
41
|
...filteredProps,
|
|
39
42
|
size: props.size,
|
|
40
43
|
text: props.text,
|
package/react/PlusRadioGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useImperativeHandle } from "react";
|
|
2
2
|
import "../dist/components/radio-group/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusRadioGroup = forwardRef((props, forwardedRef) => {
|
|
@@ -13,6 +13,8 @@ export const PlusRadioGroup = forwardRef((props, forwardedRef) => {
|
|
|
13
13
|
...filteredProps
|
|
14
14
|
} = props;
|
|
15
15
|
|
|
16
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
17
|
+
|
|
16
18
|
return React.createElement(
|
|
17
19
|
"plus-radio-group",
|
|
18
20
|
{
|
package/react/PlusRating.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/rating/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -24,17 +29,15 @@ export const PlusRating = forwardRef((props, forwardedRef) => {
|
|
|
24
29
|
useEventListener(ref, "plus-change", props.onPlusChange);
|
|
25
30
|
useEventListener(ref, "plus-hover", props.onPlusHover);
|
|
26
31
|
|
|
32
|
+
/** Methods - uses `useImperativeHandle` hook to pass ref to component */
|
|
33
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
34
|
+
reportValidity: () => ref.current.reportValidity(),
|
|
35
|
+
}));
|
|
36
|
+
|
|
27
37
|
return React.createElement(
|
|
28
38
|
"plus-rating",
|
|
29
39
|
{
|
|
30
|
-
ref
|
|
31
|
-
ref.current = node;
|
|
32
|
-
if (typeof forwardedRef === "function") {
|
|
33
|
-
forwardedRef(node);
|
|
34
|
-
} else if (forwardedRef) {
|
|
35
|
-
forwardedRef.current = node;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
40
|
+
ref,
|
|
38
41
|
...filteredProps,
|
|
39
42
|
value: props.value,
|
|
40
43
|
max: props.max,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
useEffect,
|
|
6
|
+
} from "react";
|
|
2
7
|
import "../dist/components/segmented-picker/index.js";
|
|
3
8
|
import { useEventListener } from "./react-utils.js";
|
|
4
9
|
|
|
@@ -13,17 +18,12 @@ export const PlusSegmentedPicker = forwardRef((props, forwardedRef) => {
|
|
|
13
18
|
props.onPlusSegmentedPickerItemChanged,
|
|
14
19
|
);
|
|
15
20
|
|
|
21
|
+
useImperativeHandle(forwardedRef, () => ({}));
|
|
22
|
+
|
|
16
23
|
return React.createElement(
|
|
17
24
|
"plus-segmented-picker",
|
|
18
25
|
{
|
|
19
|
-
ref
|
|
20
|
-
ref.current = node;
|
|
21
|
-
if (typeof forwardedRef === "function") {
|
|
22
|
-
forwardedRef(node);
|
|
23
|
-
} else if (forwardedRef) {
|
|
24
|
-
forwardedRef.current = node;
|
|
25
|
-
}
|
|
26
|
-
},
|
|
26
|
+
ref,
|
|
27
27
|
...filteredProps,
|
|
28
28
|
status: props.status,
|
|
29
29
|
shape: props.shape,
|