@plusui/library 0.1.7 → 0.1.9
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 +96 -17
- 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 +9 -32
- 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-BYyWpmHF.js +1 -0
- package/{dist/floating-ui.dom-OBaMlALa.js → cdn/floating-ui.dom-BpzIshEG.js} +26 -14
- package/cdn/global-9t6v8EOl.js +31 -0
- package/cdn/global-CRwUv2yr.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-DpLenR_7.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/custom-elements.json +146 -17
- 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 +36 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +95 -16
- package/dist/components/button/button.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/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 +5 -5
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/link/link.js +8 -31
- 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/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-OBaMlALa.js → dist/floating-ui.dom-BpzIshEG.js} +26 -14
- package/dist/floating-ui.dom-BwkSoRW9.js +1 -0
- package/dist/{if-defined-D-m3dgRf.js → if-defined-DpyZ37D-.js} +1 -1
- package/dist/{if-defined-BqqyuCxY.js → if-defined-DsURCocJ.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/lit-element-BNK__jO-.js +27 -0
- package/dist/lit-element-DWht4T0R.js +22 -0
- package/dist/{live-BOAtKRUN.js → live-C1eBrEBV.js} +1 -1
- package/dist/{live-BNfnKF_Y.js → live-Cv3p2930.js} +1 -1
- package/dist/model/plus.d.ts.map +1 -1
- package/dist/property-D4Afnon0.js +7 -0
- package/dist/{property-DiPQx9S3.js → property-Dz31PgR6.js} +2 -2
- package/dist/{query-CVOEqTwZ.js → query-JZZ8o83g.js} +1 -1
- package/dist/{query-assigned-elements-DJRb4jjx.js → query-assigned-elements-DeL5RNz8.js} +1 -1
- package/{cdn/state-D1d5Sfj8.js → dist/state-BRspp5eU.js} +1 -1
- package/{cdn/state-CoIPL7X5.js → dist/state-CxOUQRG2.js} +1 -1
- package/dist/{style-map-qGL3ZsOU.js → style-map-BSFs8yH4.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/utils/boolean-converter.d.ts.map +1 -1
- package/eslint/custom-element-eslint-rules.js +4 -0
- package/package.json +1 -1
- package/public/html/index.js +134 -66
- package/public/react/index.d.ts +104 -46
- package/public/react/index.js +316 -210
- 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.d.ts +23 -0
- package/react/PlusButton.js +22 -5
- 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/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/types/custom-element-jsx.d.ts +21 -4
- package/types/custom-element-solidjs.d.ts +21 -4
- package/types/custom-element-svelte.d.ts +21 -4
- package/types/custom-element-vuejs.d.ts +21 -4
- package/vscode.html-custom-data.json +35 -1
- package/web-types.json +73 -10
- package/cdn/floating-ui.dom-CXNHR8n2.js +0 -1
- package/cdn/global-CJbRDY6F.js +0 -31
- package/cdn/global-DTtsklIM.js +0 -1
- 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-CZIJTgi0.js +0 -1
- package/dist/lit-element-ByzbtpGk.js +0 -27
- package/dist/lit-element-DnJ0sDh6.js +0 -23
- package/dist/property-CEzGATrA.js +0 -7
- /package/dist/{base-D0AOfeIR.js → base-2hF1n6hl.js} +0 -0
- /package/dist/{directive-CfWt2y3W.js → directive-DRRu7zbS.js} +0 -0
- /package/dist/{index-Dz2VbYPM.js → index-Up-p3euZ.js} +0 -0
package/react/PlusAccordion.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/accordion/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -22,12 +17,17 @@ export const PlusAccordion = forwardRef((props, forwardedRef) => {
|
|
|
22
17
|
/** Event listeners - run once */
|
|
23
18
|
useEventListener(ref, "plus-accordion-toggle", props.onPlusAccordionToggle);
|
|
24
19
|
|
|
25
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
26
|
-
|
|
27
20
|
return React.createElement(
|
|
28
21
|
"plus-accordion",
|
|
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
|
class: props.className,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } 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
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-accordion-group",
|
|
11
9
|
{
|
package/react/PlusAlert.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/alert/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -27,12 +22,17 @@ export const PlusAlert = forwardRef((props, forwardedRef) => {
|
|
|
27
22
|
/** Event listeners - run once */
|
|
28
23
|
useEventListener(ref, "plus-dismiss", props.onPlusDismiss);
|
|
29
24
|
|
|
30
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
31
|
-
|
|
32
25
|
return React.createElement(
|
|
33
26
|
"plus-alert",
|
|
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
|
kind: props.kind,
|
|
38
38
|
size: props.size,
|
package/react/PlusAvatar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/avatar/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusAvatar = forwardRef((props, forwardedRef) => {
|
|
@@ -14,8 +14,6 @@ export const PlusAvatar = forwardRef((props, forwardedRef) => {
|
|
|
14
14
|
...filteredProps
|
|
15
15
|
} = props;
|
|
16
16
|
|
|
17
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
-
|
|
19
17
|
return React.createElement(
|
|
20
18
|
"plus-avatar",
|
|
21
19
|
{
|
package/react/PlusBadge.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } 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
|
-
|
|
10
8
|
return React.createElement(
|
|
11
9
|
"plus-badge",
|
|
12
10
|
{
|
package/react/PlusBreadcrumb.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } 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
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-breadcrumb",
|
|
11
9
|
{
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } 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
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-breadcrumb-item",
|
|
11
9
|
{
|
package/react/PlusButton.d.ts
CHANGED
|
@@ -28,6 +28,10 @@ export interface PlusButtonProps
|
|
|
28
28
|
/** undefined */
|
|
29
29
|
fullWidth?: boolean;
|
|
30
30
|
|
|
31
|
+
/** When true, link opens in new tab with secure attributes
|
|
32
|
+
Automatically sets target="_blank" and rel="noopener noreferrer" */
|
|
33
|
+
external?: boolean;
|
|
34
|
+
|
|
31
35
|
/** Determines the visual style of the button
|
|
32
36
|
- filled: Solid background color
|
|
33
37
|
- outlined: Transparent background with border
|
|
@@ -50,6 +54,25 @@ export interface PlusButtonProps
|
|
|
50
54
|
- lg: Large size */
|
|
51
55
|
size?: PlusButtonElement["size"];
|
|
52
56
|
|
|
57
|
+
/** When provided, renders as an anchor link instead of a button */
|
|
58
|
+
href?: PlusButtonElement["href"];
|
|
59
|
+
|
|
60
|
+
/** Specifies where to display the linked URL
|
|
61
|
+
Common values: _blank, _self, _parent, _top */
|
|
62
|
+
target?: PlusButtonElement["target"];
|
|
63
|
+
|
|
64
|
+
/** Specifies the relationship between the current document and the linked document
|
|
65
|
+
Common values: nofollow, noopener, noreferrer */
|
|
66
|
+
rel?: PlusButtonElement["rel"];
|
|
67
|
+
|
|
68
|
+
/** Sets the link to download the target URL instead of navigating
|
|
69
|
+
Optional value specifies the suggested filename */
|
|
70
|
+
download?: PlusButtonElement["download"];
|
|
71
|
+
|
|
72
|
+
/** Specifies the button type for form interactions
|
|
73
|
+
Only applies when rendering as a button (no href) */
|
|
74
|
+
type?: PlusButtonElement["type"];
|
|
75
|
+
|
|
53
76
|
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
54
77
|
className?: string;
|
|
55
78
|
|
package/react/PlusButton.js
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/button/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusButton = forwardRef((props, forwardedRef) => {
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const {
|
|
6
|
+
disabled,
|
|
7
|
+
loading,
|
|
8
|
+
fullWidth,
|
|
9
|
+
external,
|
|
10
|
+
kind,
|
|
11
|
+
status,
|
|
12
|
+
size,
|
|
13
|
+
href,
|
|
14
|
+
target,
|
|
15
|
+
rel,
|
|
16
|
+
download,
|
|
17
|
+
type,
|
|
18
|
+
...filteredProps
|
|
19
|
+
} = props;
|
|
9
20
|
|
|
10
21
|
return React.createElement(
|
|
11
22
|
"plus-button",
|
|
@@ -14,6 +25,11 @@ export const PlusButton = forwardRef((props, forwardedRef) => {
|
|
|
14
25
|
kind: props.kind,
|
|
15
26
|
status: props.status,
|
|
16
27
|
size: props.size,
|
|
28
|
+
href: props.href,
|
|
29
|
+
target: props.target,
|
|
30
|
+
rel: props.rel,
|
|
31
|
+
download: props.download,
|
|
32
|
+
type: props.type,
|
|
17
33
|
class: props.className,
|
|
18
34
|
exportparts: props.exportparts,
|
|
19
35
|
for: props.htmlFor,
|
|
@@ -22,6 +38,7 @@ export const PlusButton = forwardRef((props, forwardedRef) => {
|
|
|
22
38
|
disabled: props.disabled ? "" : undefined,
|
|
23
39
|
loading: props.loading ? "" : undefined,
|
|
24
40
|
"full-width": props.fullWidth ? "" : undefined,
|
|
41
|
+
external: props.external ? "" : undefined,
|
|
25
42
|
style: { ...props.style },
|
|
26
43
|
},
|
|
27
44
|
props.children,
|
package/react/PlusButtonGroup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/button-group/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusButtonGroup = forwardRef((props, forwardedRef) => {
|
|
@@ -13,8 +13,6 @@ export const PlusButtonGroup = forwardRef((props, forwardedRef) => {
|
|
|
13
13
|
...filteredProps
|
|
14
14
|
} = props;
|
|
15
15
|
|
|
16
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
17
|
-
|
|
18
16
|
return React.createElement(
|
|
19
17
|
"plus-button-group",
|
|
20
18
|
{
|
package/react/PlusCheckbox.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/checkbox/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -26,20 +21,17 @@ export const PlusCheckbox = forwardRef((props, forwardedRef) => {
|
|
|
26
21
|
useEventListener(ref, "plus-focus", props.onPlusFocus);
|
|
27
22
|
useEventListener(ref, "plus-blur", props.onPlusBlur);
|
|
28
23
|
|
|
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
|
-
|
|
39
24
|
return React.createElement(
|
|
40
25
|
"plus-checkbox",
|
|
41
26
|
{
|
|
42
|
-
ref
|
|
27
|
+
ref: (node) => {
|
|
28
|
+
ref.current = node;
|
|
29
|
+
if (typeof forwardedRef === "function") {
|
|
30
|
+
forwardedRef(node);
|
|
31
|
+
} else if (forwardedRef) {
|
|
32
|
+
forwardedRef.current = node;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
43
35
|
...filteredProps,
|
|
44
36
|
name: props.name,
|
|
45
37
|
size: props.size,
|
|
@@ -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/checkbox-group/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -14,12 +9,17 @@ export const PlusCheckboxGroup = forwardRef((props, forwardedRef) => {
|
|
|
14
9
|
/** Event listeners - run once */
|
|
15
10
|
useEventListener(ref, "plus-change", props.onPlusChange);
|
|
16
11
|
|
|
17
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
-
|
|
19
12
|
return React.createElement(
|
|
20
13
|
"plus-checkbox-group",
|
|
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
|
value: props.value,
|
|
25
25
|
size: props.size,
|
package/react/PlusChip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import "../dist/components/chip/index.js";
|
|
3
3
|
|
|
4
4
|
export const PlusChip = forwardRef((props, forwardedRef) => {
|
|
@@ -14,8 +14,6 @@ export const PlusChip = forwardRef((props, forwardedRef) => {
|
|
|
14
14
|
...filteredProps
|
|
15
15
|
} = props;
|
|
16
16
|
|
|
17
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
18
|
-
|
|
19
17
|
return React.createElement(
|
|
20
18
|
"plus-chip",
|
|
21
19
|
{
|
package/react/PlusDivider.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/divider/index.js";
|
|
8
3
|
import { useProperties } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -21,12 +16,17 @@ export const PlusDivider = forwardRef((props, forwardedRef) => {
|
|
|
21
16
|
/** Properties - run whenever a property has changed */
|
|
22
17
|
useProperties(ref, "hasContent", props.hasContent);
|
|
23
18
|
|
|
24
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
25
|
-
|
|
26
19
|
return React.createElement(
|
|
27
20
|
"plus-divider",
|
|
28
21
|
{
|
|
29
|
-
ref
|
|
22
|
+
ref: (node) => {
|
|
23
|
+
ref.current = node;
|
|
24
|
+
if (typeof forwardedRef === "function") {
|
|
25
|
+
forwardedRef(node);
|
|
26
|
+
} else if (forwardedRef) {
|
|
27
|
+
forwardedRef.current = node;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
30
|
...filteredProps,
|
|
31
31
|
orientation: props.orientation,
|
|
32
32
|
kind: props.kind,
|
package/react/PlusDrawer.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } 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
|
-
|
|
14
8
|
return React.createElement(
|
|
15
9
|
"plus-drawer",
|
|
16
10
|
{
|
|
@@ -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/dropdown-item/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -14,12 +9,17 @@ export const PlusDropDownItem = 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-dropdown-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/PlusDropdown.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/dropdown/index.js";
|
|
8
3
|
import { useEventListener } from "./react-utils.js";
|
|
9
4
|
|
|
@@ -20,12 +15,17 @@ export const PlusDropdown = forwardRef((props, forwardedRef) => {
|
|
|
20
15
|
props.onPlusDropdownSelectedItem,
|
|
21
16
|
);
|
|
22
17
|
|
|
23
|
-
useImperativeHandle(forwardedRef, () => ({}));
|
|
24
|
-
|
|
25
18
|
return React.createElement(
|
|
26
19
|
"plus-dropdown",
|
|
27
20
|
{
|
|
28
|
-
ref
|
|
21
|
+
ref: (node) => {
|
|
22
|
+
ref.current = node;
|
|
23
|
+
if (typeof forwardedRef === "function") {
|
|
24
|
+
forwardedRef(node);
|
|
25
|
+
} else if (forwardedRef) {
|
|
26
|
+
forwardedRef.current = node;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
29
|
...filteredProps,
|
|
30
30
|
size: props.size,
|
|
31
31
|
status: props.status,
|
package/react/PlusIcon.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } 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
|
-
|
|
9
7
|
return React.createElement(
|
|
10
8
|
"plus-icon",
|
|
11
9
|
{
|
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
|
|
|
@@ -52,17 +47,17 @@ export const PlusInput = forwardRef((props, forwardedRef) => {
|
|
|
52
47
|
useEventListener(ref, "plus-password-toggle", props.onPlusPasswordToggle);
|
|
53
48
|
useEventListener(ref, "plus-invalid", props.onPlusInvalid);
|
|
54
49
|
|
|
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
|
-
|
|
62
50
|
return React.createElement(
|
|
63
51
|
"plus-input",
|
|
64
52
|
{
|
|
65
|
-
ref
|
|
53
|
+
ref: (node) => {
|
|
54
|
+
ref.current = node;
|
|
55
|
+
if (typeof forwardedRef === "function") {
|
|
56
|
+
forwardedRef(node);
|
|
57
|
+
} else if (forwardedRef) {
|
|
58
|
+
forwardedRef.current = node;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
66
61
|
...filteredProps,
|
|
67
62
|
type: props.type,
|
|
68
63
|
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
|
{
|