@aracna/react 1.0.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 (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -0
  3. package/declarations/definitions/props.d.ts +211 -0
  4. package/declarations/definitions/types.d.ts +9 -0
  5. package/declarations/functions/create.base.element.component.d.ts +6 -0
  6. package/declarations/functions/create.element.component.d.ts +5 -0
  7. package/declarations/functions/create.floating.element.component.d.ts +6 -0
  8. package/declarations/functions/create.focus.trap.element.component.d.ts +6 -0
  9. package/declarations/functions/create.form.field.element.component.d.ts +6 -0
  10. package/declarations/functions/forward.ref.d.ts +8 -0
  11. package/declarations/hooks/use.aracna.element.d.ts +19 -0
  12. package/declarations/hooks/use.event.listener.d.ts +4 -0
  13. package/declarations/hooks/use.safe.ref.d.ts +3 -0
  14. package/declarations/hooks/use.window.event.listener.d.ts +2 -0
  15. package/declarations/index.d.ts +12 -0
  16. package/definitions/props.d.ts +211 -0
  17. package/definitions/types.d.ts +9 -0
  18. package/functions/create.base.element.component.d.ts +6 -0
  19. package/functions/create.base.element.component.js +1 -0
  20. package/functions/create.element.component.d.ts +5 -0
  21. package/functions/create.element.component.js +1 -0
  22. package/functions/create.floating.element.component.d.ts +6 -0
  23. package/functions/create.floating.element.component.js +1 -0
  24. package/functions/create.focus.trap.element.component.d.ts +6 -0
  25. package/functions/create.focus.trap.element.component.js +1 -0
  26. package/functions/create.form.field.element.component.d.ts +6 -0
  27. package/functions/create.form.field.element.component.js +1 -0
  28. package/functions/forward.ref.d.ts +8 -0
  29. package/functions/forward.ref.js +1 -0
  30. package/hooks/use.aracna.element.d.ts +19 -0
  31. package/hooks/use.aracna.element.js +1 -0
  32. package/hooks/use.event.listener.d.ts +4 -0
  33. package/hooks/use.event.listener.js +1 -0
  34. package/hooks/use.safe.ref.d.ts +3 -0
  35. package/hooks/use.safe.ref.js +1 -0
  36. package/hooks/use.window.event.listener.d.ts +2 -0
  37. package/hooks/use.window.event.listener.js +1 -0
  38. package/index.cjs +1 -0
  39. package/index.d.ts +780 -0
  40. package/index.js +1 -0
  41. package/package.json +46 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Dario Sechi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ ![NPM](https://img.shields.io/npm/l/@aracna/react)
2
+ ![npm (scoped)](https://img.shields.io/npm/v/@aracna/react)
3
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=coverage)](https://sonarcloud.io/summary/new_code?id=aracna_react)
4
+ [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=aracna_react)
5
+ [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=aracna_react)
6
+ [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=aracna_react)
7
+ [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=aracna_react)
8
+ [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=aracna_react)
9
+ [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=aracna_react)
10
+ [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=aracna_react&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=aracna_react)
11
+
12
+ # Aracna React
13
+
14
+ This library contains a collection of functions and hooks to make your react development experience smoother.
15
+
16
+ ### Documentation
17
+
18
+ You can find the react documentation on the [Aracna Website](https://aracna.dariosechi.it).
@@ -0,0 +1,211 @@
1
+ import type { AccordionButtonElementAttributes, AccordionButtonElementEventMap, AccordionElementAttributes, AccordionElementEventMap, AccordionHeaderElementAttributes, AccordionHeaderElementEventMap, AccordionPanelElementAttributes, AccordionPanelElementEventMap, AccordionSectionElementAttributes, AccordionSectionElementEventMap, AlertDialogDescriptionElementAttributes, AlertDialogDescriptionElementEventMap, AlertDialogElementAttributes, AlertDialogElementEventMap, AlertDialogLabelElementAttributes, AlertDialogLabelElementEventMap, AlertElementAttributes, AlertElementEventMap, AriaAccordionButtonElementAttributes, AriaAccordionButtonElementEventMap, AriaAccordionElementAttributes, AriaAccordionElementEventMap, AriaAccordionHeaderElementAttributes, AriaAccordionHeaderElementEventMap, AriaAccordionPanelElementAttributes, AriaAccordionPanelElementEventMap, AriaAccordionSectionElementAttributes, AriaAccordionSectionElementEventMap, AriaAlertDialogDescriptionElementAttributes, AriaAlertDialogDescriptionElementEventMap, AriaAlertDialogElementAttributes, AriaAlertDialogElementEventMap, AriaAlertDialogLabelElementAttributes, AriaAlertDialogLabelElementEventMap, AriaAlertElementAttributes, AriaAlertElementEventMap, AriaBreadcrumbElementAttributes, AriaBreadcrumbElementEventMap, AriaBreadcrumbItemElementAttributes, AriaBreadcrumbItemElementEventMap, AriaBreadcrumbListElementAttributes, AriaBreadcrumbListElementEventMap, AriaButtonElementAttributes, AriaButtonElementEventMap, AriaCarouselElementAttributes, AriaCarouselElementEventMap, AriaCarouselNextSlideControlElementAttributes, AriaCarouselNextSlideControlElementEventMap, AriaCarouselPreviousSlideControlElementAttributes, AriaCarouselPreviousSlideControlElementEventMap, AriaCarouselRotationControlElementAttributes, AriaCarouselRotationControlElementEventMap, AriaCarouselSlideElementAttributes, AriaCarouselSlideElementEventMap, AriaCarouselSlidesElementAttributes, AriaCarouselSlidesElementEventMap, AriaCarouselTabElementAttributes, AriaCarouselTabElementEventMap, AriaCarouselTabsElementAttributes, AriaCarouselTabsElementEventMap, AriaCheckBoxElementAttributes, AriaCheckBoxElementEventMap, AriaComboBoxButtonElementAttributes, AriaComboBoxButtonElementEventMap, AriaComboBoxElementAttributes, AriaComboBoxElementEventMap, AriaComboBoxGroupElementAttributes, AriaComboBoxGroupElementEventMap, AriaComboBoxInputElementAttributes, AriaComboBoxInputElementEventMap, AriaComboBoxListElementAttributes, AriaComboBoxListElementEventMap, AriaComboBoxOptionElementAttributes, AriaComboBoxOptionElementEventMap, AriaDialogDescriptionElementAttributes, AriaDialogDescriptionElementEventMap, AriaDialogElementAttributes, AriaDialogElementEventMap, AriaDialogLabelElementAttributes, AriaDialogLabelElementEventMap, AriaDisclosureButtonElementAttributes, AriaDisclosureButtonElementEventMap, AriaDisclosureElementAttributes, AriaDisclosureElementEventMap, AriaDisclosurePanelElementAttributes, AriaDisclosurePanelElementEventMap, AriaDisclosureSectionElementAttributes, AriaDisclosureSectionElementEventMap, AriaFeedArticleDescriptionElementAttributes, AriaFeedArticleDescriptionElementEventMap, AriaFeedArticleElementAttributes, AriaFeedArticleElementEventMap, AriaFeedArticleLabelElementAttributes, AriaFeedArticleLabelElementEventMap, AriaFeedElementAttributes, AriaFeedElementEventMap, AriaLinkElementAttributes, AriaLinkElementEventMap, AriaListBoxElementAttributes, AriaListBoxElementEventMap, AriaListBoxOptionElementAttributes, AriaListBoxOptionElementEventMap, AriaMenuButtonElementAttributes, AriaMenuButtonElementEventMap, AriaMenuElementAttributes, AriaMenuElementEventMap, AriaMenuItemElementAttributes, AriaMenuItemElementEventMap, AriaMenuSubMenuElementAttributes, AriaMenuSubMenuElementEventMap, AriaMeterElementAttributes, AriaMeterElementEventMap, AriaRadioButtonElementAttributes, AriaRadioButtonElementEventMap, AriaRadioGroupElementAttributes, AriaRadioGroupElementEventMap, AriaSliderElementAttributes, AriaSliderElementEventMap, AriaSliderThumbElementAttributes, AriaSliderThumbElementEventMap, AriaSwitchElementAttributes, AriaSwitchElementEventMap, AriaTabsElementAttributes, AriaTabsElementEventMap, AriaTabsPanelElementAttributes, AriaTabsPanelElementEventMap, AriaTabsTabElementAttributes, AriaTabsTabElementEventMap, AriaTooltipArrowElementAttributes, AriaTooltipArrowElementEventMap, AriaTooltipContentElementAttributes, AriaTooltipContentElementEventMap, AriaTooltipElementAttributes, AriaTooltipElementEventMap, AriaTooltipTriggerElementAttributes, AriaTooltipTriggerElementEventMap, AvatarElementAttributes, AvatarElementEventMap, BadgeElementAttributes, BadgeElementEventMap, BreadcrumbElementAttributes, BreadcrumbElementEventMap, BreadcrumbItemElementAttributes, BreadcrumbItemElementEventMap, BreadcrumbListElementAttributes, BreadcrumbListElementEventMap, ButtonElementAttributes, ButtonElementEventMap, ButtonGroupElementAttributes, ButtonGroupElementEventMap, CarouselElementAttributes, CarouselElementEventMap, CarouselNextSlideControlElementAttributes, CarouselNextSlideControlElementEventMap, CarouselPreviousSlideControlElementAttributes, CarouselPreviousSlideControlElementEventMap, CarouselRotationControlElementAttributes, CarouselRotationControlElementEventMap, CarouselSlideElementAttributes, CarouselSlideElementEventMap, CarouselSlidesElementAttributes, CarouselSlidesElementEventMap, CarouselTabElementAttributes, CarouselTabElementEventMap, CarouselTabsElementAttributes, CarouselTabsElementEventMap, CheckBoxElementAttributes, CheckBoxElementEventMap, ChipElementAttributes, ChipElementEventMap, DialogDescriptionElementAttributes, DialogDescriptionElementEventMap, DialogElementAttributes, DialogElementEventMap, DialogLabelElementAttributes, DialogLabelElementEventMap, DisclosureButtonElementAttributes, DisclosureButtonElementEventMap, DisclosureElementAttributes, DisclosureElementEventMap, DisclosurePanelElementAttributes, DisclosurePanelElementEventMap, DisclosureSectionElementAttributes, DisclosureSectionElementEventMap, DividerElementAttributes, DividerElementEventMap, FeedArticleDescriptionElementAttributes, FeedArticleDescriptionElementEventMap, FeedArticleElementAttributes, FeedArticleElementEventMap, FeedArticleLabelElementAttributes, FeedArticleLabelElementEventMap, FeedElementAttributes, FeedElementEventMap, FormElementAttributes, FormElementEventMap, IconElementAttributes, IconElementEventMap, ImageElementAttributes, ImageElementEventMap, InputElementAttributes, InputElementEventMap, InputFileElementAttributes, InputFileElementEventMap, ListElementAttributes, ListElementEventMap, ListItemElementAttributes, ListItemElementEventMap, MenuButtonElementAttributes, MenuButtonElementEventMap, MenuElementAttributes, MenuElementEventMap, MenuItemElementAttributes, MenuItemElementEventMap, MenuSubMenuElementAttributes, MenuSubMenuElementEventMap, MeterElementAttributes, MeterElementEventMap, NavigationBarElementAttributes, NavigationBarElementEventMap, NavigationBarItemElementAttributes, NavigationBarItemElementEventMap, NavigationRailElementAttributes, NavigationRailElementEventMap, NavigationRailItemElementAttributes, NavigationRailItemElementEventMap, RadioButtonElementAttributes, RadioButtonElementEventMap, RadioGroupElementAttributes, RadioGroupElementEventMap, SelectButtonElementAttributes, SelectButtonElementEventMap, SelectElementAttributes, SelectElementEventMap, SelectGroupElementAttributes, SelectGroupElementEventMap, SelectInputElementAttributes, SelectInputElementEventMap, SelectListElementAttributes, SelectListElementEventMap, SelectOptionElementAttributes, SelectOptionElementEventMap, SliderElementAttributes, SliderElementEventMap, SliderThumbElementAttributes, SliderThumbElementEventMap, SwitchElementAttributes, SwitchElementEventMap, TabsElementAttributes, TabsElementEventMap, TabsPanelElementAttributes, TabsPanelElementEventMap, TabsTabElementAttributes, TabsTabElementEventMap, TextAreaElementAttributes, TextAreaElementEventMap, TooltipArrowElementAttributes, TooltipArrowElementEventMap, TooltipContentElementAttributes, TooltipContentElementEventMap, TooltipElementAttributes, TooltipElementEventMap, TooltipTriggerElementAttributes, TooltipTriggerElementEventMap } from '@aracna/web';
2
+ import type { AvatarElement } from '@aracna/web-components/elements/data/avatar.element';
3
+ import type { BadgeElement } from '@aracna/web-components/elements/data/badge.element';
4
+ import type { CarouselElement, CarouselNextSlideControlElement, CarouselPreviousSlideControlElement, CarouselRotationControlElement, CarouselSlideElement, CarouselSlidesElement, CarouselTabElement, CarouselTabsElement } from '@aracna/web-components/elements/data/carousel.element';
5
+ import type { ChipElement } from '@aracna/web-components/elements/data/chip.element';
6
+ import type { FeedArticleDescriptionElement, FeedArticleElement, FeedArticleLabelElement, FeedElement } from '@aracna/web-components/elements/data/feed.element';
7
+ import type { IconElement } from '@aracna/web-components/elements/data/icon.element';
8
+ import type { ImageElement } from '@aracna/web-components/elements/data/image.element';
9
+ import type { ListElement, ListItemElement } from '@aracna/web-components/elements/data/list.element';
10
+ import type { TooltipArrowElement, TooltipContentElement, TooltipElement, TooltipTriggerElement } from '@aracna/web-components/elements/data/tooltip.element';
11
+ import type { AlertDialogDescriptionElement, AlertDialogElement, AlertDialogLabelElement } from '@aracna/web-components/elements/feedback/alert.dialog.element';
12
+ import type { AlertElement } from '@aracna/web-components/elements/feedback/alert.element';
13
+ import type { DialogDescriptionElement, DialogElement, DialogLabelElement } from '@aracna/web-components/elements/feedback/dialog.element';
14
+ import type { MeterElement } from '@aracna/web-components/elements/feedback/meter.element';
15
+ import type { ButtonElement } from '@aracna/web-components/elements/input/button.element';
16
+ import type { ButtonGroupElement } from '@aracna/web-components/elements/input/button.group.element';
17
+ import type { CheckBoxElement } from '@aracna/web-components/elements/input/check.box.element';
18
+ import type { FormElement } from '@aracna/web-components/elements/input/form.element';
19
+ import type { InputElement } from '@aracna/web-components/elements/input/input.element';
20
+ import type { InputFileElement } from '@aracna/web-components/elements/input/input.file.element';
21
+ import type { RadioButtonElement, RadioGroupElement } from '@aracna/web-components/elements/input/radio.group.element';
22
+ import type { SelectButtonElement, SelectElement, SelectGroupElement, SelectInputElement, SelectListElement, SelectOptionElement } from '@aracna/web-components/elements/input/select.element';
23
+ import type { SliderElement, SliderThumbElement } from '@aracna/web-components/elements/input/slider.element';
24
+ import type { SwitchElement } from '@aracna/web-components/elements/input/switch.element';
25
+ import type { TextAreaElement } from '@aracna/web-components/elements/input/text.area.element';
26
+ import type { DividerElement } from '@aracna/web-components/elements/layout/divider.element';
27
+ import type { BreadcrumbElement, BreadcrumbItemElement, BreadcrumbListElement } from '@aracna/web-components/elements/navigation/breadcrumb.element';
28
+ import type { MenuButtonElement, MenuElement, MenuItemElement, MenuSubMenuElement } from '@aracna/web-components/elements/navigation/menu.element';
29
+ import type { NavigationBarElement, NavigationBarItemElement } from '@aracna/web-components/elements/navigation/navigation.bar.element';
30
+ import type { NavigationRailElement, NavigationRailItemElement } from '@aracna/web-components/elements/navigation/navigation.rail.element';
31
+ import type { TabsElement, TabsPanelElement, TabsTabElement } from '@aracna/web-components/elements/navigation/tabs.element';
32
+ import type { AccordionButtonElement, AccordionElement, AccordionHeaderElement, AccordionPanelElement, AccordionSectionElement } from '@aracna/web-components/elements/surface/accordion.element';
33
+ import type { DisclosureButtonElement, DisclosureElement, DisclosurePanelElement, DisclosureSectionElement } from '@aracna/web-components/elements/surface/disclosure.element';
34
+ import type { AriaAccordionButtonElement, AriaAccordionElement, AriaAccordionHeaderElement, AriaAccordionPanelElement, AriaAccordionSectionElement } from '@aracna/web-components/elements/aria/aria.accordion.element';
35
+ import type { AriaAlertDialogDescriptionElement, AriaAlertDialogElement, AriaAlertDialogLabelElement } from '@aracna/web-components/elements/aria/aria.alert.dialog.element';
36
+ import type { AriaAlertElement } from '@aracna/web-components/elements/aria/aria.alert.element';
37
+ import type { AriaBreadcrumbElement, AriaBreadcrumbItemElement, AriaBreadcrumbListElement } from '@aracna/web-components/elements/aria/aria.breadcrumb.element';
38
+ import type { AriaButtonElement } from '@aracna/web-components/elements/aria/aria.button.element';
39
+ import type { AriaCarouselElement, AriaCarouselNextSlideControlElement, AriaCarouselPreviousSlideControlElement, AriaCarouselRotationControlElement, AriaCarouselSlideElement, AriaCarouselSlidesElement, AriaCarouselTabElement, AriaCarouselTabsElement } from '@aracna/web-components/elements/aria/aria.carousel.element';
40
+ import type { AriaCheckBoxElement } from '@aracna/web-components/elements/aria/aria.check.box.element';
41
+ import type { AriaComboBoxButtonElement, AriaComboBoxElement, AriaComboBoxGroupElement, AriaComboBoxInputElement, AriaComboBoxListElement, AriaComboBoxOptionElement } from '@aracna/web-components/elements/aria/aria.combo.box.element';
42
+ import type { AriaDialogDescriptionElement, AriaDialogElement, AriaDialogLabelElement } from '@aracna/web-components/elements/aria/aria.dialog.element';
43
+ import type { AriaDisclosureButtonElement, AriaDisclosureElement, AriaDisclosurePanelElement, AriaDisclosureSectionElement } from '@aracna/web-components/elements/aria/aria.disclosure.element';
44
+ import type { AriaFeedArticleDescriptionElement, AriaFeedArticleElement, AriaFeedArticleLabelElement, AriaFeedElement } from '@aracna/web-components/elements/aria/aria.feed.element';
45
+ import type { AriaLinkElement } from '@aracna/web-components/elements/aria/aria.link.element';
46
+ import type { AriaListBoxElement, AriaListBoxOptionElement } from '@aracna/web-components/elements/aria/aria.list.box.element';
47
+ import type { AriaMenuButtonElement, AriaMenuElement, AriaMenuItemElement, AriaMenuSubMenuElement } from '@aracna/web-components/elements/aria/aria.menu.element';
48
+ import type { AriaMeterElement } from '@aracna/web-components/elements/aria/aria.meter.element';
49
+ import type { AriaRadioButtonElement, AriaRadioGroupElement } from '@aracna/web-components/elements/aria/aria.radio.group.element';
50
+ import type { AriaSliderElement, AriaSliderThumbElement } from '@aracna/web-components/elements/aria/aria.slider.element';
51
+ import type { AriaSwitchElement } from '@aracna/web-components/elements/aria/aria.switch.element';
52
+ import type { AriaTabsElement, AriaTabsPanelElement, AriaTabsTabElement } from '@aracna/web-components/elements/aria/aria.tabs.element';
53
+ import type { AriaTooltipArrowElement, AriaTooltipContentElement, AriaTooltipElement, AriaTooltipTriggerElement } from '@aracna/web-components/elements/aria/aria.tooltip.element';
54
+ import type { ElementComponentProps } from './types';
55
+ /**
56
+ * ARIA Props
57
+ */
58
+ /** */
59
+ export declare type AriaAccordionProps = ElementComponentProps<AriaAccordionElement, AriaAccordionElementAttributes, AriaAccordionElementEventMap>;
60
+ export declare type AriaAccordionButtonProps = ElementComponentProps<AriaAccordionButtonElement, AriaAccordionButtonElementAttributes, AriaAccordionButtonElementEventMap>;
61
+ export declare type AriaAccordionHeaderProps = ElementComponentProps<AriaAccordionHeaderElement, AriaAccordionHeaderElementAttributes, AriaAccordionHeaderElementEventMap>;
62
+ export declare type AriaAccordionPanelProps = ElementComponentProps<AriaAccordionPanelElement, AriaAccordionPanelElementAttributes, AriaAccordionPanelElementEventMap>;
63
+ export declare type AriaAccordionSectionProps = ElementComponentProps<AriaAccordionSectionElement, AriaAccordionSectionElementAttributes, AriaAccordionSectionElementEventMap>;
64
+ export declare type AriaAlertProps = ElementComponentProps<AriaAlertElement, AriaAlertElementAttributes, AriaAlertElementEventMap>;
65
+ export declare type AriaAlertDialogProps = ElementComponentProps<AriaAlertDialogElement, AriaAlertDialogElementAttributes, AriaAlertDialogElementEventMap>;
66
+ export declare type AriaAlertDialogDescriptionProps = ElementComponentProps<AriaAlertDialogDescriptionElement, AriaAlertDialogDescriptionElementAttributes, AriaAlertDialogDescriptionElementEventMap>;
67
+ export declare type AriaAlertDialogLabelProps = ElementComponentProps<AriaAlertDialogLabelElement, AriaAlertDialogLabelElementAttributes, AriaAlertDialogLabelElementEventMap>;
68
+ export declare type AriaBreadcrumbProps = ElementComponentProps<AriaBreadcrumbElement, AriaBreadcrumbElementAttributes, AriaBreadcrumbElementEventMap>;
69
+ export declare type AriaBreadcrumbListProps = ElementComponentProps<AriaBreadcrumbListElement, AriaBreadcrumbListElementAttributes, AriaBreadcrumbListElementEventMap>;
70
+ export declare type AriaBreadcrumbItemProps = ElementComponentProps<AriaBreadcrumbItemElement, AriaBreadcrumbItemElementAttributes, AriaBreadcrumbItemElementEventMap>;
71
+ export declare type AriaButtonProps = ElementComponentProps<AriaButtonElement, AriaButtonElementAttributes, AriaButtonElementEventMap>;
72
+ export declare type AriaCarouselProps = ElementComponentProps<AriaCarouselElement, AriaCarouselElementAttributes, AriaCarouselElementEventMap>;
73
+ export declare type AriaCarouselNextSlideControlProps = ElementComponentProps<AriaCarouselNextSlideControlElement, AriaCarouselNextSlideControlElementAttributes, AriaCarouselNextSlideControlElementEventMap>;
74
+ export declare type AriaCarouselPreviousSlideControlProps = ElementComponentProps<AriaCarouselPreviousSlideControlElement, AriaCarouselPreviousSlideControlElementAttributes, AriaCarouselPreviousSlideControlElementEventMap>;
75
+ export declare type AriaCarouselRotationControlProps = ElementComponentProps<AriaCarouselRotationControlElement, AriaCarouselRotationControlElementAttributes, AriaCarouselRotationControlElementEventMap>;
76
+ export declare type AriaCarouselSlideProps = ElementComponentProps<AriaCarouselSlideElement, AriaCarouselSlideElementAttributes, AriaCarouselSlideElementEventMap>;
77
+ export declare type AriaCarouselSlidesProps = ElementComponentProps<AriaCarouselSlidesElement, AriaCarouselSlidesElementAttributes, AriaCarouselSlidesElementEventMap>;
78
+ export declare type AriaCarouselTabProps = ElementComponentProps<AriaCarouselTabElement, AriaCarouselTabElementAttributes, AriaCarouselTabElementEventMap>;
79
+ export declare type AriaCarouselTabsProps = ElementComponentProps<AriaCarouselTabsElement, AriaCarouselTabsElementAttributes, AriaCarouselTabsElementEventMap>;
80
+ export declare type AriaCheckBoxProps = ElementComponentProps<AriaCheckBoxElement, AriaCheckBoxElementAttributes, AriaCheckBoxElementEventMap>;
81
+ export declare type AriaComboBoxProps = ElementComponentProps<AriaComboBoxElement, AriaComboBoxElementAttributes<AriaComboBoxOptionElement>, AriaComboBoxElementEventMap>;
82
+ export declare type AriaComboBoxButtonProps = ElementComponentProps<AriaComboBoxButtonElement, AriaComboBoxButtonElementAttributes, AriaComboBoxButtonElementEventMap>;
83
+ export declare type AriaComboBoxGroupProps = ElementComponentProps<AriaComboBoxGroupElement, AriaComboBoxGroupElementAttributes, AriaComboBoxGroupElementEventMap>;
84
+ export declare type AriaComboBoxInputProps = ElementComponentProps<AriaComboBoxInputElement, AriaComboBoxInputElementAttributes, AriaComboBoxInputElementEventMap>;
85
+ export declare type AriaComboBoxListProps = ElementComponentProps<AriaComboBoxListElement, AriaComboBoxListElementAttributes, AriaComboBoxListElementEventMap>;
86
+ export declare type AriaComboBoxOptionProps = ElementComponentProps<AriaComboBoxOptionElement, AriaComboBoxOptionElementAttributes, AriaComboBoxOptionElementEventMap>;
87
+ export declare type AriaDialogProps = ElementComponentProps<AriaDialogElement, AriaDialogElementAttributes, AriaDialogElementEventMap>;
88
+ export declare type AriaDialogDescriptionProps = ElementComponentProps<AriaDialogDescriptionElement, AriaDialogDescriptionElementAttributes, AriaDialogDescriptionElementEventMap>;
89
+ export declare type AriaDialogLabelProps = ElementComponentProps<AriaDialogLabelElement, AriaDialogLabelElementAttributes, AriaDialogLabelElementEventMap>;
90
+ export declare type AriaDisclosureProps = ElementComponentProps<AriaDisclosureElement, AriaDisclosureElementAttributes, AriaDisclosureElementEventMap>;
91
+ export declare type AriaDisclosureButtonProps = ElementComponentProps<AriaDisclosureButtonElement, AriaDisclosureButtonElementAttributes, AriaDisclosureButtonElementEventMap>;
92
+ export declare type AriaDisclosurePanelProps = ElementComponentProps<AriaDisclosurePanelElement, AriaDisclosurePanelElementAttributes, AriaDisclosurePanelElementEventMap>;
93
+ export declare type AriaDisclosureSectionProps = ElementComponentProps<AriaDisclosureSectionElement, AriaDisclosureSectionElementAttributes, AriaDisclosureSectionElementEventMap>;
94
+ export declare type AriaFeedProps = ElementComponentProps<AriaFeedElement, AriaFeedElementAttributes, AriaFeedElementEventMap>;
95
+ export declare type AriaFeedArticleProps = ElementComponentProps<AriaFeedArticleElement, AriaFeedArticleElementAttributes, AriaFeedArticleElementEventMap>;
96
+ export declare type AriaFeedArticleDescriptionProps = ElementComponentProps<AriaFeedArticleDescriptionElement, AriaFeedArticleDescriptionElementAttributes, AriaFeedArticleDescriptionElementEventMap>;
97
+ export declare type AriaFeedArticleLabelProps = ElementComponentProps<AriaFeedArticleLabelElement, AriaFeedArticleLabelElementAttributes, AriaFeedArticleLabelElementEventMap>;
98
+ export declare type AriaLinkProps = ElementComponentProps<AriaLinkElement, AriaLinkElementAttributes, AriaLinkElementEventMap>;
99
+ export declare type AriaListBoxProps = ElementComponentProps<AriaListBoxElement, AriaListBoxElementAttributes<AriaListBoxOptionElement>, AriaListBoxElementEventMap>;
100
+ export declare type AriaListBoxOptionProps = ElementComponentProps<AriaListBoxOptionElement, AriaListBoxOptionElementAttributes, AriaListBoxOptionElementEventMap>;
101
+ export declare type AriaMenuProps = ElementComponentProps<AriaMenuElement, AriaMenuElementAttributes<AriaMenuItemElement>, AriaMenuElementEventMap>;
102
+ export declare type AriaMenuButtonProps = ElementComponentProps<AriaMenuButtonElement, AriaMenuButtonElementAttributes, AriaMenuButtonElementEventMap>;
103
+ export declare type AriaMenuItemProps = ElementComponentProps<AriaMenuItemElement, AriaMenuItemElementAttributes, AriaMenuItemElementEventMap>;
104
+ export declare type AriaMenuSubMenuProps = ElementComponentProps<AriaMenuSubMenuElement, AriaMenuSubMenuElementAttributes, AriaMenuSubMenuElementEventMap>;
105
+ export declare type AriaMeterProps = ElementComponentProps<AriaMeterElement, AriaMeterElementAttributes, AriaMeterElementEventMap>;
106
+ export declare type AriaRadioButtonProps = ElementComponentProps<AriaRadioButtonElement, AriaRadioButtonElementAttributes, AriaRadioButtonElementEventMap>;
107
+ export declare type AriaRadioGroupProps = ElementComponentProps<AriaRadioGroupElement, AriaRadioGroupElementAttributes, AriaRadioGroupElementEventMap>;
108
+ export declare type AriaSliderProps = ElementComponentProps<AriaSliderElement, AriaSliderElementAttributes, AriaSliderElementEventMap>;
109
+ export declare type AriaSliderThumbProps = ElementComponentProps<AriaSliderThumbElement, AriaSliderThumbElementAttributes, AriaSliderThumbElementEventMap>;
110
+ export declare type AriaSwitchProps = ElementComponentProps<AriaSwitchElement, AriaSwitchElementAttributes, AriaSwitchElementEventMap>;
111
+ export declare type AriaTabsProps = ElementComponentProps<AriaTabsElement, AriaTabsElementAttributes, AriaTabsElementEventMap>;
112
+ export declare type AriaTabsPanelProps = ElementComponentProps<AriaTabsPanelElement, AriaTabsPanelElementAttributes, AriaTabsPanelElementEventMap>;
113
+ export declare type AriaTabsTabProps = ElementComponentProps<AriaTabsTabElement, AriaTabsTabElementAttributes, AriaTabsTabElementEventMap>;
114
+ export declare type AriaTooltipProps = ElementComponentProps<AriaTooltipElement, AriaTooltipElementAttributes, AriaTooltipElementEventMap>;
115
+ export declare type AriaTooltipArrowProps = ElementComponentProps<AriaTooltipArrowElement, AriaTooltipArrowElementAttributes, AriaTooltipArrowElementEventMap>;
116
+ export declare type AriaTooltipContentProps = ElementComponentProps<AriaTooltipContentElement, AriaTooltipContentElementAttributes, AriaTooltipContentElementEventMap>;
117
+ export declare type AriaTooltipTriggerProps = ElementComponentProps<AriaTooltipTriggerElement, AriaTooltipTriggerElementAttributes, AriaTooltipTriggerElementEventMap>;
118
+ /**
119
+ * Data Props
120
+ */
121
+ /** */
122
+ export declare type AvatarProps = ElementComponentProps<AvatarElement, AvatarElementAttributes, AvatarElementEventMap>;
123
+ export declare type BadgeProps = ElementComponentProps<BadgeElement, BadgeElementAttributes, BadgeElementEventMap>;
124
+ export declare type CarouselProps = ElementComponentProps<CarouselElement, CarouselElementAttributes, CarouselElementEventMap>;
125
+ export declare type CarouselNextSlideControlProps = ElementComponentProps<CarouselNextSlideControlElement, CarouselNextSlideControlElementAttributes, CarouselNextSlideControlElementEventMap>;
126
+ export declare type CarouselPreviousSlideControlProps = ElementComponentProps<CarouselPreviousSlideControlElement, CarouselPreviousSlideControlElementAttributes, CarouselPreviousSlideControlElementEventMap>;
127
+ export declare type CarouselRotationControlProps = ElementComponentProps<CarouselRotationControlElement, CarouselRotationControlElementAttributes, CarouselRotationControlElementEventMap>;
128
+ export declare type CarouselSlideProps = ElementComponentProps<CarouselSlideElement, CarouselSlideElementAttributes, CarouselSlideElementEventMap>;
129
+ export declare type CarouselSlidesProps = ElementComponentProps<CarouselSlidesElement, CarouselSlidesElementAttributes, CarouselSlidesElementEventMap>;
130
+ export declare type CarouselTabProps = ElementComponentProps<CarouselTabElement, CarouselTabElementAttributes, CarouselTabElementEventMap>;
131
+ export declare type CarouselTabsProps = ElementComponentProps<CarouselTabsElement, CarouselTabsElementAttributes, CarouselTabsElementEventMap>;
132
+ export declare type ChipProps = ElementComponentProps<ChipElement, ChipElementAttributes, ChipElementEventMap>;
133
+ export declare type FeedProps = ElementComponentProps<FeedElement, FeedElementAttributes, FeedElementEventMap>;
134
+ export declare type FeedArticleProps = ElementComponentProps<FeedArticleElement, FeedArticleElementAttributes, FeedArticleElementEventMap>;
135
+ export declare type FeedArticleDescriptionProps = ElementComponentProps<FeedArticleDescriptionElement, FeedArticleDescriptionElementAttributes, FeedArticleDescriptionElementEventMap>;
136
+ export declare type FeedArticleLabelProps = ElementComponentProps<FeedArticleLabelElement, FeedArticleLabelElementAttributes, FeedArticleLabelElementEventMap>;
137
+ export declare type IconProps = ElementComponentProps<IconElement, IconElementAttributes, IconElementEventMap>;
138
+ export declare type ImageProps = ElementComponentProps<ImageElement, ImageElementAttributes, ImageElementEventMap>;
139
+ export declare type ListProps = ElementComponentProps<ListElement, ListElementAttributes, ListElementEventMap>;
140
+ export declare type ListItemProps = ElementComponentProps<ListItemElement, ListItemElementAttributes, ListItemElementEventMap>;
141
+ export declare type TooltipProps = ElementComponentProps<TooltipElement, TooltipElementAttributes, TooltipElementEventMap>;
142
+ export declare type TooltipArrowProps = ElementComponentProps<TooltipArrowElement, TooltipArrowElementAttributes, TooltipArrowElementEventMap>;
143
+ export declare type TooltipContentProps = ElementComponentProps<TooltipContentElement, TooltipContentElementAttributes, TooltipContentElementEventMap>;
144
+ export declare type TooltipTriggerProps = ElementComponentProps<TooltipTriggerElement, TooltipTriggerElementAttributes, TooltipTriggerElementEventMap>;
145
+ /**
146
+ * Feedback Props
147
+ */
148
+ /** */
149
+ export declare type AlertProps = ElementComponentProps<AlertElement, AlertElementAttributes, AlertElementEventMap>;
150
+ export declare type AlertDialogProps = ElementComponentProps<AlertDialogElement, AlertDialogElementAttributes, AlertDialogElementEventMap>;
151
+ export declare type AlertDialogDescriptionProps = ElementComponentProps<AlertDialogDescriptionElement, AlertDialogDescriptionElementAttributes, AlertDialogDescriptionElementEventMap>;
152
+ export declare type AlertDialogLabelProps = ElementComponentProps<AlertDialogLabelElement, AlertDialogLabelElementAttributes, AlertDialogLabelElementEventMap>;
153
+ export declare type DialogProps = ElementComponentProps<DialogElement, DialogElementAttributes, DialogElementEventMap>;
154
+ export declare type DialogDescriptionProps = ElementComponentProps<DialogDescriptionElement, DialogDescriptionElementAttributes, DialogDescriptionElementEventMap>;
155
+ export declare type DialogLabelProps = ElementComponentProps<DialogLabelElement, DialogLabelElementAttributes, DialogLabelElementEventMap>;
156
+ export declare type MeterProps = ElementComponentProps<MeterElement, MeterElementAttributes, MeterElementEventMap>;
157
+ /**
158
+ * Input Props
159
+ */
160
+ /** */
161
+ export declare type ButtonProps = ElementComponentProps<ButtonElement, ButtonElementAttributes, ButtonElementEventMap>;
162
+ export declare type ButtonGroupProps = ElementComponentProps<ButtonGroupElement, ButtonGroupElementAttributes, ButtonGroupElementEventMap>;
163
+ export declare type CheckBoxProps = ElementComponentProps<CheckBoxElement, CheckBoxElementAttributes, CheckBoxElementEventMap>;
164
+ export declare type FormProps = ElementComponentProps<FormElement, FormElementAttributes, FormElementEventMap>;
165
+ export declare type InputProps = ElementComponentProps<InputElement, InputElementAttributes, InputElementEventMap>;
166
+ export declare type InputFileProps = ElementComponentProps<InputFileElement, InputFileElementAttributes, InputFileElementEventMap>;
167
+ export declare type RadioButtonProps = ElementComponentProps<RadioButtonElement, RadioButtonElementAttributes, RadioButtonElementEventMap>;
168
+ export declare type RadioGroupProps = ElementComponentProps<RadioGroupElement, RadioGroupElementAttributes, RadioGroupElementEventMap>;
169
+ export declare type SelectProps = ElementComponentProps<SelectElement, SelectElementAttributes<SelectOptionElement>, SelectElementEventMap>;
170
+ export declare type SelectButtonProps = ElementComponentProps<SelectButtonElement, SelectButtonElementAttributes, SelectButtonElementEventMap>;
171
+ export declare type SelectGroupProps = ElementComponentProps<SelectGroupElement, SelectGroupElementAttributes, SelectGroupElementEventMap>;
172
+ export declare type SelectInputProps = ElementComponentProps<SelectInputElement, SelectInputElementAttributes, SelectInputElementEventMap>;
173
+ export declare type SelectListProps = ElementComponentProps<SelectListElement, SelectListElementAttributes, SelectListElementEventMap>;
174
+ export declare type SelectOptionProps = ElementComponentProps<SelectOptionElement, SelectOptionElementAttributes, SelectOptionElementEventMap>;
175
+ export declare type SliderProps = ElementComponentProps<SliderElement, SliderElementAttributes, SliderElementEventMap>;
176
+ export declare type SliderThumbProps = ElementComponentProps<SliderThumbElement, SliderThumbElementAttributes, SliderThumbElementEventMap>;
177
+ export declare type SwitchProps = ElementComponentProps<SwitchElement, SwitchElementAttributes, SwitchElementEventMap>;
178
+ export declare type TextAreaProps = ElementComponentProps<TextAreaElement, TextAreaElementAttributes, TextAreaElementEventMap>;
179
+ /**
180
+ * Layout Props
181
+ */
182
+ export declare type DividerProps = ElementComponentProps<DividerElement, DividerElementAttributes, DividerElementEventMap>;
183
+ /**
184
+ * Navigation Props
185
+ */
186
+ export declare type BreadcrumbProps = ElementComponentProps<BreadcrumbElement, BreadcrumbElementAttributes, BreadcrumbElementEventMap>;
187
+ export declare type BreadcrumbListProps = ElementComponentProps<BreadcrumbListElement, BreadcrumbListElementAttributes, BreadcrumbListElementEventMap>;
188
+ export declare type BreadcrumbItemProps = ElementComponentProps<BreadcrumbItemElement, BreadcrumbItemElementAttributes, BreadcrumbItemElementEventMap>;
189
+ export declare type MenuProps = ElementComponentProps<MenuElement, MenuElementAttributes<MenuItemElement>, MenuElementEventMap>;
190
+ export declare type MenuButtonProps = ElementComponentProps<MenuButtonElement, MenuButtonElementAttributes, MenuButtonElementEventMap>;
191
+ export declare type MenuItemProps = ElementComponentProps<MenuItemElement, MenuItemElementAttributes, MenuItemElementEventMap>;
192
+ export declare type MenuSubMenuProps = ElementComponentProps<MenuSubMenuElement, MenuSubMenuElementAttributes, MenuSubMenuElementEventMap>;
193
+ export declare type NavigationBarProps = ElementComponentProps<NavigationBarElement, NavigationBarElementAttributes, NavigationBarElementEventMap>;
194
+ export declare type NavigationBarItemProps = ElementComponentProps<NavigationBarItemElement, NavigationBarItemElementAttributes, NavigationBarItemElementEventMap>;
195
+ export declare type NavigationRailProps = ElementComponentProps<NavigationRailElement, NavigationRailElementAttributes, NavigationRailElementEventMap>;
196
+ export declare type NavigationRailItemProps = ElementComponentProps<NavigationRailItemElement, NavigationRailItemElementAttributes, NavigationRailItemElementEventMap>;
197
+ export declare type TabsProps = ElementComponentProps<TabsElement, TabsElementAttributes, TabsElementEventMap>;
198
+ export declare type TabsPanelProps = ElementComponentProps<TabsPanelElement, TabsPanelElementAttributes, TabsPanelElementEventMap>;
199
+ export declare type TabsTabProps = ElementComponentProps<TabsTabElement, TabsTabElementAttributes, TabsTabElementEventMap>;
200
+ /**
201
+ * Surface Props
202
+ */
203
+ export declare type AccordionProps = ElementComponentProps<AccordionElement, AccordionElementAttributes, AccordionElementEventMap>;
204
+ export declare type AccordionButtonProps = ElementComponentProps<AccordionButtonElement, AccordionButtonElementAttributes, AccordionButtonElementEventMap>;
205
+ export declare type AccordionHeaderProps = ElementComponentProps<AccordionHeaderElement, AccordionHeaderElementAttributes, AccordionHeaderElementEventMap>;
206
+ export declare type AccordionPanelProps = ElementComponentProps<AccordionPanelElement, AccordionPanelElementAttributes, AccordionPanelElementEventMap>;
207
+ export declare type AccordionSectionProps = ElementComponentProps<AccordionSectionElement, AccordionSectionElementAttributes, AccordionSectionElementEventMap>;
208
+ export declare type DisclosureProps = ElementComponentProps<DisclosureElement, DisclosureElementAttributes, DisclosureElementEventMap>;
209
+ export declare type DisclosureButtonProps = ElementComponentProps<DisclosureButtonElement, DisclosureButtonElementAttributes, DisclosureButtonElementEventMap>;
210
+ export declare type DisclosurePanelProps = ElementComponentProps<DisclosurePanelElement, DisclosurePanelElementAttributes, DisclosurePanelElementEventMap>;
211
+ export declare type DisclosureSectionProps = ElementComponentProps<DisclosureSectionElement, DisclosureSectionElementAttributes, DisclosureSectionElementEventMap>;
@@ -0,0 +1,9 @@
1
+ import { PascalCase } from '@aracna/core';
2
+ import type { DOMElement, ForwardedRef, HTMLAttributes, RefAttributes } from 'react';
3
+ export declare type ElementComponent<Element extends HTMLElement, Props extends HTMLAttributes<Element> = {}> = (props: Props, ref: ForwardedRef<Element>) => DOMElement<Props, Element>;
4
+ export declare type ElementComponentAttributes = Record<PropertyKey, any>;
5
+ export declare type ElementComponentEvents = Record<PropertyKey, any>;
6
+ export declare type ElementComponentProps<Element extends HTMLElement, Attributes extends ElementComponentAttributes = ElementComponentAttributes, Events extends ElementComponentEvents = ElementComponentEvents> = HTMLAttributes<Element> & RefAttributes<Element> & MapComponentAttributes<Attributes | Events>;
7
+ export declare type MapComponentAttributes<T extends ElementComponentAttributes> = {
8
+ [key in keyof T as key extends string ? (T[key] extends Event ? `on${PascalCase<key>}` : key) : key]?: T[key] extends Event ? (event: T[key]) => any : T[key];
9
+ };
@@ -0,0 +1,6 @@
1
+ import { KeyOf } from '@aracna/core';
2
+ import { BaseElementAttributes, BaseElementEventMap } from '@aracna/web';
3
+ import { ElementComponent, ElementComponentProps } from '../definitions/types';
4
+ export declare function createBaseElementComponent<Element extends HTMLElementTagNameMap[Key], Attributes extends BaseElementAttributes = BaseElementAttributes, Events extends BaseElementEventMap = BaseElementEventMap, Props extends ElementComponentProps<Element, Attributes, Events> = ElementComponentProps<Element, Attributes, Events>, Key extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap>(tag: Key, element: {
5
+ new (): Element;
6
+ }, events?: KeyOf.Shallow<Events>[]): ElementComponent<Element, Props>;
@@ -0,0 +1,5 @@
1
+ import { KeyOf } from '@aracna/core';
2
+ import { ElementComponent, ElementComponentAttributes, ElementComponentEvents, ElementComponentProps } from '../definitions/types';
3
+ export declare function createElementComponent<Element extends HTMLElementTagNameMap[Key], Attributes extends ElementComponentAttributes = {}, Events extends ElementComponentEvents = {}, Props extends ElementComponentProps<Element, Attributes, Events> = ElementComponentProps<Element, Attributes, Events>, Key extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap>(tag: Key, element: {
4
+ new (): Element;
5
+ }, events?: KeyOf.Shallow<Events>[]): ElementComponent<Element, Props>;
@@ -0,0 +1,6 @@
1
+ import { KeyOf } from '@aracna/core';
2
+ import { FloatingElementAttributes, FloatingElementEventMap } from '@aracna/web';
3
+ import { ElementComponent, ElementComponentProps } from '../definitions/types';
4
+ export declare function createFloatingElementComponent<Element extends HTMLElementTagNameMap[Key], Attributes extends FloatingElementAttributes = FloatingElementAttributes, Events extends FloatingElementEventMap = FloatingElementEventMap, Props extends ElementComponentProps<Element, Attributes, Events> = ElementComponentProps<Element, Attributes, Events>, Key extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap>(tag: Key, element: {
5
+ new (): Element;
6
+ }, events?: KeyOf.Shallow<Events>[]): ElementComponent<Element, Props>;
@@ -0,0 +1,6 @@
1
+ import { KeyOf } from '@aracna/core';
2
+ import { FocusTrapElementAttributes, FocusTrapElementEventMap } from '@aracna/web';
3
+ import { ElementComponent, ElementComponentProps } from '../definitions/types';
4
+ export declare function createFocusTrapElementComponent<Element extends HTMLElementTagNameMap[Key], Attributes extends FocusTrapElementAttributes = FocusTrapElementAttributes, Events extends FocusTrapElementEventMap = FocusTrapElementEventMap, Props extends ElementComponentProps<Element, Attributes, Events> = ElementComponentProps<Element, Attributes, Events>, Key extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap>(tag: Key, element: {
5
+ new (): Element;
6
+ }, events?: KeyOf.Shallow<Events>[]): ElementComponent<Element, Props>;
@@ -0,0 +1,6 @@
1
+ import { KeyOf } from '@aracna/core';
2
+ import { FormFieldElementAttributes, FormFieldElementEventMap } from '@aracna/web';
3
+ import { ElementComponent, ElementComponentProps } from '../definitions/types';
4
+ export declare function createFormFieldElementComponent<Element extends HTMLElementTagNameMap[Key], Attributes extends FormFieldElementAttributes = FormFieldElementAttributes, Events extends FormFieldElementEventMap = FormFieldElementEventMap, Props extends ElementComponentProps<Element, Attributes, Events> = ElementComponentProps<Element, Attributes, Events>, Key extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap>(tag: Key, element: {
5
+ new (): Element;
6
+ }, events?: KeyOf.Shallow<Events>[]): ElementComponent<Element, Props>;
@@ -0,0 +1,8 @@
1
+ import { ForwardedRef, ReactElement } from 'react';
2
+ declare type ForwardRefRenderFunction<T, P = {}> = (props: P, ref: ForwardedRef<T>) => ReactElement<P>;
3
+ declare type NullableForwardRefRenderFunction<T, P = {}> = (props: P, ref: ForwardedRef<T>) => ReactElement<P> | null;
4
+ declare type ForwardRefExoticComponent<P = {}> = (props: P) => ReactElement;
5
+ declare type NullableForwardRefExoticComponent<P = {}> = (props: P) => ReactElement<P> | null;
6
+ declare function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<P>;
7
+ declare function forwardRef<T, P = {}>(render: NullableForwardRefRenderFunction<T, P>): NullableForwardRefExoticComponent<P>;
8
+ export { forwardRef };
@@ -0,0 +1,19 @@
1
+ import { MutableRefObject } from 'react';
2
+ interface Options {
3
+ attribute?: {
4
+ blacklist?: string[];
5
+ dispatch?: boolean;
6
+ whitelist?: string[];
7
+ };
8
+ state?: {
9
+ blacklist?: string[];
10
+ dispatch?: boolean;
11
+ whitelist?: string[];
12
+ };
13
+ }
14
+ interface ReturnInterface<K extends keyof HTMLElementTagNameMap> {
15
+ element: HTMLElementTagNameMap[K] | null;
16
+ ref: MutableRefObject<HTMLElementTagNameMap[K] | null>;
17
+ }
18
+ export declare function useComponent<K extends keyof HTMLElementTagNameMap>(options?: Options): ReturnInterface<K>;
19
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DependencyList, MutableRefObject } from 'react';
2
+ export declare function useEventListener<T extends Element, E extends Event, K extends keyof HTMLElementEventMap>(ref: MutableRefObject<T | null>, type: K, listener: (event: HTMLElementEventMap[K]) => any, deps?: DependencyList): void;
3
+ export declare function useEventListener<T extends Element, E extends Event, K extends keyof SVGElementEventMap>(ref: MutableRefObject<T | null>, type: K, listener: (event: SVGElementEventMap[K]) => any, deps?: DependencyList): void;
4
+ export declare function useEventListener<T extends Element, E extends Event>(ref: MutableRefObject<T | null>, type: string, listener: (event: E) => any, deps?: DependencyList): void;
@@ -0,0 +1,3 @@
1
+ import { MutableRefObject } from 'react';
2
+ export declare function useSafeRef<K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions): MutableRefObject<HTMLElementTagNameMap[K]>;
3
+ export declare function useSafeRef<K extends keyof SVGElementTagNameMap>(tagName: K, options?: ElementCreationOptions): MutableRefObject<SVGElementTagNameMap[K]>;
@@ -0,0 +1,2 @@
1
+ import { DependencyList } from 'react';
2
+ export declare function useWindowEventListener<K extends keyof WindowEventMap>(type: K, listener: (event: WindowEventMap[K]) => any, deps?: DependencyList): void;
@@ -0,0 +1,12 @@
1
+ export * from './definitions/props';
2
+ export * from './definitions/types';
3
+ export * from './functions/create.base.element.component';
4
+ export * from './functions/create.element.component';
5
+ export * from './functions/create.floating.element.component';
6
+ export * from './functions/create.focus.trap.element.component';
7
+ export * from './functions/create.form.field.element.component';
8
+ export * from './functions/forward.ref';
9
+ export * from './hooks/use.aracna.element';
10
+ export * from './hooks/use.event.listener';
11
+ export * from './hooks/use.safe.ref';
12
+ export * from './hooks/use.window.event.listener';