@plusui/library 0.1.8 → 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.
Files changed (322) hide show
  1. package/cdn/components/accordion/accordion.js +3 -3
  2. package/cdn/components/accordion/index.js +3 -3
  3. package/cdn/components/accordion-group/accordion-group.js +3 -3
  4. package/cdn/components/accordion-group/index.js +3 -3
  5. package/cdn/components/alert/alert.js +4 -4
  6. package/cdn/components/alert/index.js +4 -4
  7. package/cdn/components/avatar/avatar.js +5 -5
  8. package/cdn/components/avatar/index.js +5 -5
  9. package/cdn/components/badge/badge.host.style.js +1 -1
  10. package/cdn/components/badge/badge.js +5 -5
  11. package/cdn/components/badge/index.js +5 -5
  12. package/cdn/components/base/index.js +2 -2
  13. package/cdn/components/base/tailwind-base.js +3 -3
  14. package/cdn/components/breadcrumb/breadcrumb.js +3 -3
  15. package/cdn/components/breadcrumb/index.js +3 -3
  16. package/cdn/components/breadcrumb-item/breadcrumb-item.js +4 -4
  17. package/cdn/components/breadcrumb-item/index.js +4 -4
  18. package/cdn/components/button/button.js +96 -17
  19. package/cdn/components/button/index.js +4 -4
  20. package/cdn/components/button-group/button-group.js +4 -4
  21. package/cdn/components/button-group/index.js +4 -4
  22. package/cdn/components/checkbox/checkbox.js +5 -5
  23. package/cdn/components/checkbox/index.js +5 -5
  24. package/cdn/components/checkbox-group/checkbox-group.js +3 -3
  25. package/cdn/components/checkbox-group/index.js +3 -3
  26. package/cdn/components/chip/chip.js +4 -4
  27. package/cdn/components/chip/index.js +4 -4
  28. package/cdn/components/divider/divider.js +4 -4
  29. package/cdn/components/divider/divider.style.js +1 -1
  30. package/cdn/components/divider/index.js +4 -4
  31. package/cdn/components/drawer/drawer.js +4 -4
  32. package/cdn/components/drawer/index.js +4 -4
  33. package/cdn/components/dropdown/dropdown.js +5 -5
  34. package/cdn/components/dropdown/index.js +5 -5
  35. package/cdn/components/dropdown-item/dropdown-item.js +5 -5
  36. package/cdn/components/dropdown-item/index.js +5 -5
  37. package/cdn/components/icon/icon.js +4 -4
  38. package/cdn/components/icon/index.js +3 -3
  39. package/cdn/components/index.js +8 -8
  40. package/cdn/components/input/index.js +6 -6
  41. package/cdn/components/input/input.js +6 -6
  42. package/cdn/components/link/index.js +3 -3
  43. package/cdn/components/link/link.js +3 -3
  44. package/cdn/components/list-box-item/index.js +4 -4
  45. package/cdn/components/list-box-item/list-box-item.js +4 -4
  46. package/cdn/components/modal/index.js +4 -4
  47. package/cdn/components/modal/modal.js +4 -4
  48. package/cdn/components/popconfirm/index.js +5 -5
  49. package/cdn/components/popconfirm/popconfirm.js +5 -5
  50. package/cdn/components/popover/index.js +5 -5
  51. package/cdn/components/popover/popover.js +5 -5
  52. package/cdn/components/radio/index.js +5 -5
  53. package/cdn/components/radio/radio.js +5 -5
  54. package/cdn/components/radio-group/index.js +3 -3
  55. package/cdn/components/radio-group/radio-group.js +3 -3
  56. package/cdn/components/rating/index.js +6 -6
  57. package/cdn/components/rating/rating.js +6 -6
  58. package/cdn/components/segmented-picker/index.js +3 -3
  59. package/cdn/components/segmented-picker/segmented-picker.component.js +3 -3
  60. package/cdn/components/segmented-picker-item/index.js +4 -4
  61. package/cdn/components/segmented-picker-item/segmented-picker-item.component.js +4 -4
  62. package/cdn/components/select/index.js +5 -5
  63. package/cdn/components/select/select.js +5 -5
  64. package/cdn/components/select-item/index.js +5 -5
  65. package/cdn/components/select-item/select-item.js +5 -5
  66. package/cdn/components/service/index.js +4 -4
  67. package/cdn/components/service/service.js +5 -5
  68. package/cdn/components/tab/index.js +4 -4
  69. package/cdn/components/tab/tab.js +4 -4
  70. package/cdn/components/tab-group/index.js +4 -4
  71. package/cdn/components/tab-group/tab-group.js +4 -4
  72. package/cdn/components/tab-panel/index.js +3 -3
  73. package/cdn/components/tab-panel/tab-panel.js +3 -3
  74. package/cdn/components/tag/index.js +4 -4
  75. package/cdn/components/tag/tag.js +4 -4
  76. package/cdn/components/text/index.js +3 -3
  77. package/cdn/components/text/text.js +3 -3
  78. package/cdn/components/textarea/index.js +6 -6
  79. package/cdn/components/textarea/textarea.js +6 -6
  80. package/cdn/components/toast/index.js +3 -3
  81. package/cdn/components/toast/toast.js +3 -3
  82. package/cdn/components/toast-container/index.js +4 -4
  83. package/cdn/components/toast-container/toast-container.js +4 -4
  84. package/cdn/components/toggle/index.js +7 -7
  85. package/cdn/components/toggle/toggle.js +7 -7
  86. package/cdn/components/tooltip/index.js +5 -5
  87. package/cdn/components/tooltip/tooltip.js +5 -5
  88. package/cdn/factory/tailwind-factory.js +7 -7
  89. package/cdn/floating-ui.dom-BYyWpmHF.js +1 -0
  90. package/{dist/floating-ui.dom-OBaMlALa.js → cdn/floating-ui.dom-BpzIshEG.js} +26 -14
  91. package/cdn/global-9t6v8EOl.js +31 -0
  92. package/cdn/global-CRwUv2yr.js +1 -0
  93. package/cdn/{if-defined-CQ5F5a3V.js → if-defined-CIB8OTrH.js} +1 -1
  94. package/cdn/{if-defined-D-m3dgRf.js → if-defined-DpyZ37D-.js} +1 -1
  95. package/cdn/lit-element-BNK__jO-.js +27 -0
  96. package/cdn/lit-element-CSuLHuHb.js +22 -0
  97. package/cdn/{live-BOAtKRUN.js → live-C1eBrEBV.js} +1 -1
  98. package/cdn/{live-Ba4FL2pG.js → live-CYp4nasd.js} +1 -1
  99. package/cdn/property-B8EDuyz_.js +7 -0
  100. package/cdn/{property-DiPQx9S3.js → property-Dz31PgR6.js} +2 -2
  101. package/{dist/state-D1d5Sfj8.js → cdn/state-BRspp5eU.js} +1 -1
  102. package/{dist/state-CURcf9xb.js → cdn/state-hFbsBSdV.js} +1 -1
  103. package/cdn/{style-map-Z-XBeQmS.js → style-map-BYRi_l0u.js} +1 -1
  104. package/{dist/style-map-DC_vNus2.js → cdn/style-map-Cgr6kXUm.js} +1 -1
  105. package/custom-elements.json +130 -1
  106. package/dist/components/accordion/accordion.d.ts +1 -1
  107. package/dist/components/accordion/accordion.js +2 -2
  108. package/dist/components/accordion/index.js +2 -2
  109. package/dist/components/accordion-group/accordion-group.d.ts +1 -1
  110. package/dist/components/accordion-group/accordion-group.js +2 -2
  111. package/dist/components/accordion-group/index.js +2 -2
  112. package/dist/components/alert/alert.d.ts +1 -1
  113. package/dist/components/alert/alert.js +3 -3
  114. package/dist/components/alert/index.js +3 -3
  115. package/dist/components/avatar/avatar.d.ts +1 -1
  116. package/dist/components/avatar/avatar.js +4 -4
  117. package/dist/components/avatar/index.js +4 -4
  118. package/dist/components/badge/badge.d.ts +1 -1
  119. package/dist/components/badge/badge.host.style.js +1 -1
  120. package/dist/components/badge/badge.js +4 -4
  121. package/dist/components/badge/index.js +4 -4
  122. package/dist/components/base/index.js +1 -1
  123. package/dist/components/base/tailwind-base.js +2 -2
  124. package/dist/components/breadcrumb/breadcrumb.d.ts +1 -1
  125. package/dist/components/breadcrumb/breadcrumb.js +2 -2
  126. package/dist/components/breadcrumb/index.js +2 -2
  127. package/dist/components/breadcrumb-item/breadcrumb-item.js +3 -3
  128. package/dist/components/breadcrumb-item/index.js +3 -3
  129. package/dist/components/button/button.d.ts +36 -1
  130. package/dist/components/button/button.d.ts.map +1 -1
  131. package/dist/components/button/button.js +95 -16
  132. package/dist/components/button/button.js.map +1 -1
  133. package/dist/components/button/index.js +3 -3
  134. package/dist/components/button-group/button-group.d.ts +1 -1
  135. package/dist/components/button-group/button-group.js +3 -3
  136. package/dist/components/button-group/index.js +3 -3
  137. package/dist/components/checkbox/checkbox.d.ts +1 -1
  138. package/dist/components/checkbox/checkbox.js +4 -4
  139. package/dist/components/checkbox/index.js +4 -4
  140. package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
  141. package/dist/components/checkbox-group/checkbox-group.js +2 -2
  142. package/dist/components/checkbox-group/index.js +2 -2
  143. package/dist/components/chip/chip.d.ts +1 -1
  144. package/dist/components/chip/chip.js +3 -3
  145. package/dist/components/chip/index.js +3 -3
  146. package/dist/components/divider/divider.d.ts +1 -1
  147. package/dist/components/divider/divider.js +3 -3
  148. package/dist/components/divider/divider.style.js +1 -1
  149. package/dist/components/divider/index.js +3 -3
  150. package/dist/components/drawer/drawer.d.ts +1 -1
  151. package/dist/components/drawer/drawer.js +3 -3
  152. package/dist/components/drawer/index.js +3 -3
  153. package/dist/components/dropdown/dropdown.d.ts +1 -1
  154. package/dist/components/dropdown/dropdown.js +4 -4
  155. package/dist/components/dropdown/index.js +4 -4
  156. package/dist/components/dropdown-item/dropdown-item.d.ts +1 -1
  157. package/dist/components/dropdown-item/dropdown-item.js +4 -4
  158. package/dist/components/dropdown-item/index.js +4 -4
  159. package/dist/components/icon/icon.d.ts +1 -1
  160. package/dist/components/icon/icon.js +4 -4
  161. package/dist/components/icon/index.js +3 -3
  162. package/dist/components/index.js +7 -7
  163. package/dist/components/input/index.js +5 -5
  164. package/dist/components/input/input.d.ts +1 -1
  165. package/dist/components/input/input.js +5 -5
  166. package/dist/components/link/index.js +2 -2
  167. package/dist/components/link/link.d.ts +1 -1
  168. package/dist/components/link/link.js +2 -2
  169. package/dist/components/list-box-item/index.js +3 -3
  170. package/dist/components/list-box-item/list-box-item.d.ts +1 -1
  171. package/dist/components/list-box-item/list-box-item.js +3 -3
  172. package/dist/components/modal/index.js +3 -3
  173. package/dist/components/modal/modal.d.ts +1 -1
  174. package/dist/components/modal/modal.js +3 -3
  175. package/dist/components/popconfirm/index.js +4 -4
  176. package/dist/components/popconfirm/popconfirm.d.ts +1 -1
  177. package/dist/components/popconfirm/popconfirm.js +4 -4
  178. package/dist/components/popover/index.js +4 -4
  179. package/dist/components/popover/popover.d.ts +1 -1
  180. package/dist/components/popover/popover.js +4 -4
  181. package/dist/components/radio/index.js +4 -4
  182. package/dist/components/radio/radio.d.ts +1 -1
  183. package/dist/components/radio/radio.js +4 -4
  184. package/dist/components/radio-group/index.js +2 -2
  185. package/dist/components/radio-group/radio-group.d.ts +1 -1
  186. package/dist/components/radio-group/radio-group.js +2 -2
  187. package/dist/components/rating/index.js +5 -5
  188. package/dist/components/rating/rating.d.ts +1 -1
  189. package/dist/components/rating/rating.js +5 -5
  190. package/dist/components/segmented-picker/index.js +2 -2
  191. package/dist/components/segmented-picker/segmented-picker.component.d.ts +1 -1
  192. package/dist/components/segmented-picker/segmented-picker.component.js +2 -2
  193. package/dist/components/segmented-picker-item/index.js +3 -3
  194. package/dist/components/segmented-picker-item/segmented-picker-item.component.d.ts +1 -1
  195. package/dist/components/segmented-picker-item/segmented-picker-item.component.js +3 -3
  196. package/dist/components/select/index.js +4 -4
  197. package/dist/components/select/select.d.ts +1 -1
  198. package/dist/components/select/select.js +4 -4
  199. package/dist/components/select-item/index.js +4 -4
  200. package/dist/components/select-item/select-item.d.ts +1 -1
  201. package/dist/components/select-item/select-item.js +4 -4
  202. package/dist/components/service/index.js +3 -3
  203. package/dist/components/service/service.d.ts +1 -1
  204. package/dist/components/service/service.js +4 -4
  205. package/dist/components/tab/index.js +3 -3
  206. package/dist/components/tab/tab.d.ts +1 -1
  207. package/dist/components/tab/tab.js +3 -3
  208. package/dist/components/tab-group/index.js +3 -3
  209. package/dist/components/tab-group/tab-group.d.ts +1 -1
  210. package/dist/components/tab-group/tab-group.js +3 -3
  211. package/dist/components/tab-panel/index.js +2 -2
  212. package/dist/components/tab-panel/tab-panel.d.ts +1 -1
  213. package/dist/components/tab-panel/tab-panel.js +2 -2
  214. package/dist/components/tag/index.js +3 -3
  215. package/dist/components/tag/tag.d.ts +1 -1
  216. package/dist/components/tag/tag.js +3 -3
  217. package/dist/components/text/index.js +2 -2
  218. package/dist/components/text/text.d.ts +1 -1
  219. package/dist/components/text/text.js +2 -2
  220. package/dist/components/textarea/index.js +5 -5
  221. package/dist/components/textarea/textarea.d.ts +1 -1
  222. package/dist/components/textarea/textarea.js +5 -5
  223. package/dist/components/toast/index.js +2 -2
  224. package/dist/components/toast/toast.js +2 -2
  225. package/dist/components/toast-container/index.js +3 -3
  226. package/dist/components/toast-container/toast-container.d.ts +1 -1
  227. package/dist/components/toast-container/toast-container.js +3 -3
  228. package/dist/components/toggle/index.js +6 -6
  229. package/dist/components/toggle/toggle.d.ts +2 -2
  230. package/dist/components/toggle/toggle.js +6 -6
  231. package/dist/components/tooltip/index.js +4 -4
  232. package/dist/components/tooltip/tooltip.d.ts +1 -1
  233. package/dist/components/tooltip/tooltip.js +4 -4
  234. package/dist/factory/tailwind-factory.d.ts.map +1 -1
  235. package/dist/factory/tailwind-factory.js +6 -6
  236. package/{cdn/floating-ui.dom-OBaMlALa.js → dist/floating-ui.dom-BpzIshEG.js} +26 -14
  237. package/dist/floating-ui.dom-BwkSoRW9.js +1 -0
  238. package/dist/{if-defined-D-m3dgRf.js → if-defined-DpyZ37D-.js} +1 -1
  239. package/dist/{if-defined-h3Ll_h1t.js → if-defined-DsURCocJ.js} +1 -1
  240. package/dist/index.css +1 -1
  241. package/dist/lit-element-BNK__jO-.js +27 -0
  242. package/dist/lit-element-DWht4T0R.js +22 -0
  243. package/dist/{live-BOAtKRUN.js → live-C1eBrEBV.js} +1 -1
  244. package/dist/{live-CoXrsQ3D.js → live-Cv3p2930.js} +1 -1
  245. package/dist/model/plus.d.ts.map +1 -1
  246. package/dist/property-D4Afnon0.js +7 -0
  247. package/dist/{property-DiPQx9S3.js → property-Dz31PgR6.js} +2 -2
  248. package/dist/{query-BFSYd3aM.js → query-JZZ8o83g.js} +1 -1
  249. package/dist/{query-assigned-elements-D29cbcky.js → query-assigned-elements-DeL5RNz8.js} +1 -1
  250. package/{cdn/state-D1d5Sfj8.js → dist/state-BRspp5eU.js} +1 -1
  251. package/{cdn/state-CoIPL7X5.js → dist/state-CxOUQRG2.js} +1 -1
  252. package/dist/{style-map-B8m-sO4m.js → style-map-BSFs8yH4.js} +1 -1
  253. package/{cdn/style-map-DC_vNus2.js → dist/style-map-Cgr6kXUm.js} +1 -1
  254. package/dist/styles/global.js +2 -2
  255. package/dist/utils/boolean-converter.d.ts.map +1 -1
  256. package/eslint/custom-element-eslint-rules.js +4 -0
  257. package/package.json +1 -1
  258. package/public/html/index.js +128 -37
  259. package/public/react/index.d.ts +100 -42
  260. package/public/react/index.js +310 -181
  261. package/react/PlusAccordion.js +9 -9
  262. package/react/PlusAccordionGroup.js +1 -3
  263. package/react/PlusAlert.js +9 -9
  264. package/react/PlusAvatar.js +1 -3
  265. package/react/PlusBadge.js +1 -3
  266. package/react/PlusBreadcrumb.js +1 -3
  267. package/react/PlusBreadcrumbItem.js +1 -3
  268. package/react/PlusButton.d.ts +23 -0
  269. package/react/PlusButton.js +22 -5
  270. package/react/PlusButtonGroup.js +1 -3
  271. package/react/PlusCheckbox.js +9 -17
  272. package/react/PlusCheckboxGroup.js +9 -9
  273. package/react/PlusChip.js +1 -3
  274. package/react/PlusDivider.js +9 -9
  275. package/react/PlusDrawer.js +1 -7
  276. package/react/PlusDropDownItem.js +9 -9
  277. package/react/PlusDropdown.js +9 -9
  278. package/react/PlusIcon.js +1 -3
  279. package/react/PlusInput.js +9 -14
  280. package/react/PlusLink.js +1 -3
  281. package/react/PlusListBoxItem.js +9 -9
  282. package/react/PlusModal.js +1 -7
  283. package/react/PlusPopconfirm.js +9 -9
  284. package/react/PlusPopover.js +9 -9
  285. package/react/PlusRadio.js +9 -12
  286. package/react/PlusRadioGroup.js +1 -3
  287. package/react/PlusRating.js +9 -12
  288. package/react/PlusSegmentedPicker.js +9 -9
  289. package/react/PlusSegmentedPickerItem.js +1 -3
  290. package/react/PlusSelect.js +9 -9
  291. package/react/PlusSelectItem.js +9 -9
  292. package/react/PlusService.js +1 -3
  293. package/react/PlusTab.js +1 -3
  294. package/react/PlusTabGroup.js +9 -9
  295. package/react/PlusTabPanel.js +1 -3
  296. package/react/PlusTag.js +1 -3
  297. package/react/PlusText.js +1 -3
  298. package/react/PlusTextarea.js +9 -14
  299. package/react/PlusToast.js +9 -9
  300. package/react/PlusToastContainer.js +1 -3
  301. package/react/PlusToggle.js +9 -14
  302. package/react/PlusTooltip.js +1 -3
  303. package/react/Tailwind.js +1 -3
  304. package/types/custom-element-jsx.d.ts +17 -0
  305. package/types/custom-element-solidjs.d.ts +17 -0
  306. package/types/custom-element-svelte.d.ts +17 -0
  307. package/types/custom-element-vuejs.d.ts +17 -0
  308. package/vscode.html-custom-data.json +35 -1
  309. package/web-types.json +65 -2
  310. package/cdn/floating-ui.dom-CXNHR8n2.js +0 -1
  311. package/cdn/global-CJbRDY6F.js +0 -31
  312. package/cdn/global-DTtsklIM.js +0 -1
  313. package/cdn/lit-element-ByzbtpGk.js +0 -27
  314. package/cdn/lit-element-DNNEDGnu.js +0 -23
  315. package/cdn/property-DLlzgs39.js +0 -7
  316. package/dist/floating-ui.dom-CpuNudqy.js +0 -1
  317. package/dist/lit-element-B3f5s1Hz.js +0 -23
  318. package/dist/lit-element-ByzbtpGk.js +0 -27
  319. package/dist/property-DLmwa-N3.js +0 -7
  320. /package/dist/{base-CWTcY3O3.js → base-2hF1n6hl.js} +0 -0
  321. /package/dist/{directive-CXHWwTfw.js → directive-DRRu7zbS.js} +0 -0
  322. /package/dist/{index-Bw06nX5-.js → index-Up-p3euZ.js} +0 -0
@@ -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, useImperativeHandle } from "react";
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
  {
@@ -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
 
@@ -32,12 +27,17 @@ export const PlusSelect = forwardRef((props, forwardedRef) => {
32
27
  props.onPlusSelectSelectedItem,
33
28
  );
34
29
 
35
- useImperativeHandle(forwardedRef, () => ({}));
36
-
37
30
  return React.createElement(
38
31
  "plus-select",
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
  placeholder: props.placeholder,
@@ -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,
@@ -1,9 +1,7 @@
1
- import React, { forwardRef, useImperativeHandle } from "react";
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/PlusTab.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, useImperativeHandle } from "react";
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
  {
@@ -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,
@@ -1,11 +1,9 @@
1
- import React, { forwardRef, useImperativeHandle } from "react";
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, useImperativeHandle } from "react";
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, useImperativeHandle } from "react";
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
  {
@@ -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,
@@ -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, useImperativeHandle } from "react";
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
  {
@@ -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
 
@@ -39,17 +34,17 @@ export const PlusToggle = forwardRef((props, forwardedRef) => {
39
34
  useEventListener(ref, "plus-blur", props.onPlusBlur);
40
35
  useEventListener(ref, "plus-invalid", props.onPlusInvalid);
41
36
 
42
- /** Methods - uses `useImperativeHandle` hook to pass ref to component */
43
- useImperativeHandle(forwardedRef, () => ({
44
- checkValidity: () => ref.current.checkValidity(),
45
- reportValidity: () => ref.current.reportValidity(),
46
- setCustomValidity: (message) => ref.current.setCustomValidity(message),
47
- }));
48
-
49
37
  return React.createElement(
50
38
  "plus-toggle",
51
39
  {
52
- ref,
40
+ ref: (node) => {
41
+ ref.current = node;
42
+ if (typeof forwardedRef === "function") {
43
+ forwardedRef(node);
44
+ } else if (forwardedRef) {
45
+ forwardedRef.current = node;
46
+ }
47
+ },
53
48
  ...filteredProps,
54
49
  name: props.name,
55
50
  value: props.value,
@@ -1,12 +1,10 @@
1
- import React, { forwardRef, useImperativeHandle } from "react";
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, useImperativeHandle } from "react";
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
  {
@@ -111,6 +111,23 @@ export type PlusButtonProps = {
111
111
  loading?: boolean;
112
112
  /** */
113
113
  "full-width"?: boolean;
114
+ /** When provided, renders as an anchor link instead of a button */
115
+ href?: string | undefined;
116
+ /** Specifies where to display the linked URL
117
+ Common values: _blank, _self, _parent, _top */
118
+ target?: string | undefined;
119
+ /** Specifies the relationship between the current document and the linked document
120
+ Common values: nofollow, noopener, noreferrer */
121
+ rel?: string | undefined;
122
+ /** Sets the link to download the target URL instead of navigating
123
+ Optional value specifies the suggested filename */
124
+ download?: string | undefined;
125
+ /** When true, link opens in new tab with secure attributes
126
+ Automatically sets target="_blank" and rel="noopener noreferrer" */
127
+ external?: boolean;
128
+ /** Specifies the button type for form interactions
129
+ Only applies when rendering as a button (no href) */
130
+ type?: "button" | "submit" | "reset";
114
131
  };
115
132
 
116
133
  export type PlusButtonGroupProps = {
@@ -115,6 +115,23 @@ type PlusButtonProps = {
115
115
  loading?: boolean;
116
116
  /** */
117
117
  "full-width"?: boolean;
118
+ /** When provided, renders as an anchor link instead of a button */
119
+ href?: string | undefined;
120
+ /** Specifies where to display the linked URL
121
+ Common values: _blank, _self, _parent, _top */
122
+ target?: string | undefined;
123
+ /** Specifies the relationship between the current document and the linked document
124
+ Common values: nofollow, noopener, noreferrer */
125
+ rel?: string | undefined;
126
+ /** Sets the link to download the target URL instead of navigating
127
+ Optional value specifies the suggested filename */
128
+ download?: string | undefined;
129
+ /** When true, link opens in new tab with secure attributes
130
+ Automatically sets target="_blank" and rel="noopener noreferrer" */
131
+ external?: boolean;
132
+ /** Specifies the button type for form interactions
133
+ Only applies when rendering as a button (no href) */
134
+ type?: "button" | "submit" | "reset";
118
135
  } & JSX.DirectiveFunctionAttributes<PlusButton> &
119
136
  JSX.OnAttributes<PlusButton> &
120
137
  JSX.OnCaptureAttributes<PlusButton>;
@@ -88,6 +88,23 @@ type PlusButtonProps = {
88
88
  loading?: boolean;
89
89
  /** */
90
90
  "full-width"?: boolean;
91
+ /** When provided, renders as an anchor link instead of a button */
92
+ href?: string | undefined;
93
+ /** Specifies where to display the linked URL
94
+ Common values: _blank, _self, _parent, _top */
95
+ target?: string | undefined;
96
+ /** Specifies the relationship between the current document and the linked document
97
+ Common values: nofollow, noopener, noreferrer */
98
+ rel?: string | undefined;
99
+ /** Sets the link to download the target URL instead of navigating
100
+ Optional value specifies the suggested filename */
101
+ download?: string | undefined;
102
+ /** When true, link opens in new tab with secure attributes
103
+ Automatically sets target="_blank" and rel="noopener noreferrer" */
104
+ external?: boolean;
105
+ /** Specifies the button type for form interactions
106
+ Only applies when rendering as a button (no href) */
107
+ type?: "button" | "submit" | "reset";
91
108
  };
92
109
 
93
110
  type PlusButtonGroupProps = {
@@ -51,6 +51,23 @@ type PlusButtonProps = {
51
51
  loading?: boolean;
52
52
  /** */
53
53
  "full-width"?: boolean;
54
+ /** When provided, renders as an anchor link instead of a button */
55
+ href?: string | undefined;
56
+ /** Specifies where to display the linked URL
57
+ Common values: _blank, _self, _parent, _top */
58
+ target?: string | undefined;
59
+ /** Specifies the relationship between the current document and the linked document
60
+ Common values: nofollow, noopener, noreferrer */
61
+ rel?: string | undefined;
62
+ /** Sets the link to download the target URL instead of navigating
63
+ Optional value specifies the suggested filename */
64
+ download?: string | undefined;
65
+ /** When true, link opens in new tab with secure attributes
66
+ Automatically sets target="_blank" and rel="noopener noreferrer" */
67
+ external?: boolean;
68
+ /** Specifies the button type for form interactions
69
+ Only applies when rendering as a button (no href) */
70
+ type?: "button" | "submit" | "reset";
54
71
  };
55
72
 
56
73
  type PlusButtonGroupProps = {
@@ -94,7 +94,41 @@
94
94
  "description": "Shows loading spinner and disables interaction",
95
95
  "values": []
96
96
  },
97
- { "name": "full-width", "values": [] }
97
+ { "name": "full-width", "values": [] },
98
+ {
99
+ "name": "href",
100
+ "description": "When provided, renders as an anchor link instead of a button",
101
+ "values": []
102
+ },
103
+ {
104
+ "name": "target",
105
+ "description": "Specifies where to display the linked URL\nCommon values: _blank, _self, _parent, _top",
106
+ "values": []
107
+ },
108
+ {
109
+ "name": "rel",
110
+ "description": "Specifies the relationship between the current document and the linked document\nCommon values: nofollow, noopener, noreferrer",
111
+ "values": []
112
+ },
113
+ {
114
+ "name": "download",
115
+ "description": "Sets the link to download the target URL instead of navigating\nOptional value specifies the suggested filename",
116
+ "values": []
117
+ },
118
+ {
119
+ "name": "external",
120
+ "description": "When true, link opens in new tab with secure attributes\nAutomatically sets target=\"_blank\" and rel=\"noopener noreferrer\"",
121
+ "values": []
122
+ },
123
+ {
124
+ "name": "type",
125
+ "description": "Specifies the button type for form interactions\nOnly applies when rendering as a button (no href)",
126
+ "values": [
127
+ { "name": "button" },
128
+ { "name": "submit" },
129
+ { "name": "reset" }
130
+ ]
131
+ }
98
132
  ],
99
133
  "references": []
100
134
  },
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@plusui/library",
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -151,6 +151,39 @@
151
151
  {
152
152
  "name": "full-width",
153
153
  "value": { "type": "boolean", "default": "false" }
154
+ },
155
+ {
156
+ "name": "href",
157
+ "description": "When provided, renders as an anchor link instead of a button",
158
+ "value": { "type": "string | undefined", "default": "undefined" }
159
+ },
160
+ {
161
+ "name": "target",
162
+ "description": "Specifies where to display the linked URL\nCommon values: _blank, _self, _parent, _top",
163
+ "value": { "type": "string | undefined", "default": "undefined" }
164
+ },
165
+ {
166
+ "name": "rel",
167
+ "description": "Specifies the relationship between the current document and the linked document\nCommon values: nofollow, noopener, noreferrer",
168
+ "value": { "type": "string | undefined", "default": "undefined" }
169
+ },
170
+ {
171
+ "name": "download",
172
+ "description": "Sets the link to download the target URL instead of navigating\nOptional value specifies the suggested filename",
173
+ "value": { "type": "string | undefined", "default": "undefined" }
174
+ },
175
+ {
176
+ "name": "external",
177
+ "description": "When true, link opens in new tab with secure attributes\nAutomatically sets target=\"_blank\" and rel=\"noopener noreferrer\"",
178
+ "value": { "type": "boolean", "default": "false" }
179
+ },
180
+ {
181
+ "name": "type",
182
+ "description": "Specifies the button type for form interactions\nOnly applies when rendering as a button (no href)",
183
+ "value": {
184
+ "type": "'button' | 'submit' | 'reset'",
185
+ "default": "'button'"
186
+ }
154
187
  }
155
188
  ],
156
189
  "events": [],
@@ -181,7 +214,37 @@
181
214
  "description": "Shows loading spinner and disables interaction",
182
215
  "type": "boolean"
183
216
  },
184
- { "name": "fullWidth", "type": "boolean" }
217
+ { "name": "fullWidth", "type": "boolean" },
218
+ {
219
+ "name": "href",
220
+ "description": "When provided, renders as an anchor link instead of a button",
221
+ "type": "string | undefined"
222
+ },
223
+ {
224
+ "name": "target",
225
+ "description": "Specifies where to display the linked URL\nCommon values: _blank, _self, _parent, _top",
226
+ "type": "string | undefined"
227
+ },
228
+ {
229
+ "name": "rel",
230
+ "description": "Specifies the relationship between the current document and the linked document\nCommon values: nofollow, noopener, noreferrer",
231
+ "type": "string | undefined"
232
+ },
233
+ {
234
+ "name": "download",
235
+ "description": "Sets the link to download the target URL instead of navigating\nOptional value specifies the suggested filename",
236
+ "type": "string | undefined"
237
+ },
238
+ {
239
+ "name": "external",
240
+ "description": "When true, link opens in new tab with secure attributes\nAutomatically sets target=\"_blank\" and rel=\"noopener noreferrer\"",
241
+ "type": "boolean"
242
+ },
243
+ {
244
+ "name": "type",
245
+ "description": "Specifies the button type for form interactions\nOnly applies when rendering as a button (no href)",
246
+ "type": "'button' | 'submit' | 'reset'"
247
+ }
185
248
  ],
186
249
  "events": []
187
250
  }