@torpor/ui 0.1.7 → 0.2.0
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/CHANGELOG.md +35 -0
- package/dist/Accordion/Accordion.torp +2 -2
- package/dist/Accordion/AccordionContent.torp +2 -2
- package/dist/Accordion/AccordionHeader.torp +2 -2
- package/dist/Accordion/AccordionItem.torp +2 -2
- package/dist/Accordion/AccordionTrigger.torp +2 -2
- package/dist/Accordion/index.d.ts +92 -0
- package/dist/Breadcrumb/Breadcrumb.torp +33 -0
- package/dist/Breadcrumb/BreadcrumbItem.torp +19 -0
- package/dist/Breadcrumb/BreadcrumbSeparator.torp +16 -0
- package/dist/Breadcrumb/index.d.ts +56 -0
- package/dist/Breadcrumb/index.js +14 -0
- package/dist/Calendar/Calendar.torp +265 -0
- package/dist/Calendar/CalendarDay.torp +67 -0
- package/dist/Calendar/CalendarTypes.ts +22 -0
- package/dist/Calendar/index.d.ts +38 -0
- package/dist/Calendar/index.js +10 -0
- package/dist/Calendar/index.js.map +1 -0
- package/dist/Dialog/Dialog.torp +3 -3
- package/dist/Dialog/DialogBody.torp +2 -2
- package/dist/Dialog/DialogButton.torp +2 -2
- package/dist/Dialog/DialogFooter.torp +2 -2
- package/dist/Dialog/DialogHeader.torp +2 -2
- package/dist/Dialog/index.d.ts +92 -0
- package/dist/Disclosure/Disclosure.torp +69 -0
- package/dist/Disclosure/DisclosureContent.torp +36 -0
- package/dist/Disclosure/DisclosureHeader.torp +34 -0
- package/dist/Disclosure/DisclosureTrigger.torp +36 -0
- package/dist/Disclosure/DisclosureTypes.ts +14 -0
- package/dist/Disclosure/index.d.ts +74 -0
- package/dist/Disclosure/index.js +18 -0
- package/dist/Disclosure/index.js.map +1 -0
- package/{src/Offscreen/Offscreen.torp → dist/Drawer/Drawer.torp} +10 -19
- package/dist/Drawer/index.d.ts +20 -0
- package/dist/Drawer/index.js +6 -0
- package/dist/Drawer/index.js.map +1 -0
- package/dist/Menu/Menu.torp +160 -0
- package/dist/Menu/MenuButton.torp +53 -0
- package/dist/Menu/MenuCheck.torp +70 -0
- package/dist/Menu/MenuGroup.torp +19 -0
- package/dist/Menu/MenuIndicator.torp +29 -0
- package/dist/Menu/MenuPopout.torp +71 -0
- package/dist/Menu/MenuPopoutContent.torp +74 -0
- package/dist/Menu/MenuPopoutTrigger.torp +117 -0
- package/dist/Menu/MenuRadio.torp +88 -0
- package/dist/Menu/MenuRadioGroup.torp +86 -0
- package/dist/Menu/MenuSeparator.torp +14 -0
- package/dist/Menu/MenuTypes.ts +58 -0
- package/dist/Menu/index.d.ts +200 -0
- package/dist/Menu/index.js +46 -0
- package/dist/Menu/index.js.map +1 -0
- package/dist/MenuBar/MenuBar.torp +150 -0
- package/dist/MenuBar/MenuBarItem.torp +104 -0
- package/dist/MenuBar/MenuBarItemContent.torp +108 -0
- package/dist/MenuBar/MenuBarItemTrigger.torp +89 -0
- package/dist/MenuBar/MenuBarTypes.ts +36 -0
- package/dist/MenuBar/index.d.ts +74 -0
- package/dist/MenuBar/index.js +18 -0
- package/dist/MenuBar/index.js.map +1 -0
- package/dist/NavMenu/NavMenu.torp +2 -2
- package/dist/NavMenu/NavMenuButton.torp +2 -2
- package/dist/NavMenu/NavMenuElement.torp +2 -2
- package/dist/NavMenu/NavMenuGroup.torp +2 -2
- package/dist/NavMenu/NavMenuGroupHeader.torp +2 -2
- package/dist/NavMenu/NavMenuLink.torp +2 -2
- package/dist/NavMenu/NavMenuPopout.torp +2 -2
- package/dist/NavMenu/NavMenuPopoutButton.torp +3 -3
- package/dist/NavMenu/NavMenuPopoutContent.torp +29 -27
- package/dist/NavMenu/NavMenuSeparator.torp +2 -2
- package/dist/NavMenu/index.d.ts +182 -0
- package/dist/Notification/Notification.torp +48 -0
- package/dist/Notification/NotificationClose.torp +28 -0
- package/dist/Notification/NotificationContainer.torp +14 -0
- package/dist/Notification/NotificationContent.torp +13 -0
- package/dist/Notification/NotificationTypes.ts +5 -0
- package/dist/Notification/index.d.ts +74 -0
- package/dist/Notification/index.js +36 -0
- package/dist/Notification/index.js.map +1 -0
- package/dist/Notification/showNotification.ts +30 -0
- package/dist/Popover/Popover.torp +2 -2
- package/dist/Popover/PopoverContent.torp +31 -28
- package/dist/Popover/PopoverContentAnchored.torp +39 -38
- package/dist/Popover/PopoverContentContextual.torp +39 -36
- package/dist/Popover/PopoverOverlay.torp +3 -3
- package/dist/Popover/PopoverTrigger.torp +2 -2
- package/dist/Popover/PopoverTriggerContextual.torp +2 -2
- package/dist/Popover/PopoverTriggerHover.torp +3 -3
- package/dist/Popover/index.d.ts +146 -0
- package/dist/TabGroup/TabContent.torp +2 -2
- package/dist/TabGroup/TabGroup.torp +2 -2
- package/dist/TabGroup/TabHeader.torp +2 -2
- package/dist/TabGroup/TabList.torp +2 -2
- package/dist/TabGroup/TabTrigger.torp +2 -2
- package/dist/TabGroup/index.d.ts +92 -0
- package/dist/icons/ArrowDown.torp +15 -0
- package/dist/icons/ArrowLeft.torp +15 -0
- package/dist/icons/ArrowRight.torp +15 -0
- package/dist/icons/ArrowUp.torp +15 -0
- package/dist/icons/Bars.torp +17 -0
- package/dist/icons/Check.torp +15 -0
- package/dist/icons/ChevronDown.torp +15 -0
- package/dist/icons/ChevronLeft.torp +15 -0
- package/dist/icons/ChevronRight.torp +15 -0
- package/dist/icons/ChevronUp.torp +15 -0
- package/dist/icons/Cross.torp +16 -0
- package/dist/icons/Loading.torp +16 -0
- package/dist/icons/Minus.torp +15 -0
- package/dist/icons/Plus.torp +16 -0
- package/dist/icons/index.d.ts +254 -0
- package/dist/icons/index.js +58 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/{motion.d.cts → index.d.ts} +2 -2
- package/dist/metafile-esm.json +1 -1
- package/dist/motion/fade.ts +7 -0
- package/dist/motion/index.d.ts +2 -0
- package/dist/{motion.js → motion/index.js} +1 -1
- package/dist/motion/index.js.map +1 -0
- package/dist/mount/index.d.ts +2 -0
- package/dist/utils/dateUtils.ts +244 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/setPopoverPosition.ts +4 -0
- package/package.json +50 -34
- package/scripts/postbuild.ts +42 -5
- package/src/Accordion/Accordion.torp +2 -2
- package/src/Accordion/AccordionContent.torp +2 -2
- package/src/Accordion/AccordionHeader.torp +2 -2
- package/src/Accordion/AccordionItem.torp +2 -2
- package/src/Accordion/AccordionTrigger.torp +2 -2
- package/src/Breadcrumb/Breadcrumb.torp +33 -0
- package/src/Breadcrumb/BreadcrumbItem.torp +19 -0
- package/src/Breadcrumb/BreadcrumbSeparator.torp +16 -0
- package/src/Breadcrumb/index.ts +5 -0
- package/src/Calendar/Calendar.torp +265 -0
- package/src/Calendar/CalendarDay.torp +67 -0
- package/src/Calendar/CalendarTypes.ts +22 -0
- package/src/Calendar/index.ts +4 -0
- package/src/Dialog/Dialog.torp +3 -3
- package/src/Dialog/DialogBody.torp +2 -2
- package/src/Dialog/DialogButton.torp +2 -2
- package/src/Dialog/DialogFooter.torp +2 -2
- package/src/Dialog/DialogHeader.torp +2 -2
- package/src/Disclosure/Disclosure.torp +69 -0
- package/src/Disclosure/DisclosureContent.torp +36 -0
- package/src/Disclosure/DisclosureHeader.torp +34 -0
- package/src/Disclosure/DisclosureTrigger.torp +36 -0
- package/src/Disclosure/DisclosureTypes.ts +14 -0
- package/src/Disclosure/index.ts +6 -0
- package/{dist/Offscreen/Offscreen.torp → src/Drawer/Drawer.torp} +10 -19
- package/src/Drawer/index.ts +3 -0
- package/src/Menu/Menu.torp +160 -0
- package/src/Menu/MenuButton.torp +53 -0
- package/src/Menu/MenuCheck.torp +70 -0
- package/src/Menu/MenuGroup.torp +19 -0
- package/src/Menu/MenuIndicator.torp +29 -0
- package/src/Menu/MenuPopout.torp +71 -0
- package/src/Menu/MenuPopoutContent.torp +74 -0
- package/src/Menu/MenuPopoutTrigger.torp +117 -0
- package/src/Menu/MenuRadio.torp +88 -0
- package/src/Menu/MenuRadioGroup.torp +86 -0
- package/src/Menu/MenuSeparator.torp +14 -0
- package/src/Menu/MenuTypes.ts +58 -0
- package/src/Menu/index.ts +25 -0
- package/src/MenuBar/MenuBar.torp +150 -0
- package/src/MenuBar/MenuBarItem.torp +104 -0
- package/src/MenuBar/MenuBarItemContent.torp +108 -0
- package/src/MenuBar/MenuBarItemTrigger.torp +89 -0
- package/src/MenuBar/MenuBarTypes.ts +36 -0
- package/src/MenuBar/index.ts +6 -0
- package/src/NavMenu/NavMenu.torp +2 -2
- package/src/NavMenu/NavMenuButton.torp +2 -2
- package/src/NavMenu/NavMenuElement.torp +2 -2
- package/src/NavMenu/NavMenuGroup.torp +2 -2
- package/src/NavMenu/NavMenuGroupHeader.torp +2 -2
- package/src/NavMenu/NavMenuLink.torp +2 -2
- package/src/NavMenu/NavMenuPopout.torp +2 -2
- package/src/NavMenu/NavMenuPopoutButton.torp +3 -3
- package/src/NavMenu/NavMenuPopoutContent.torp +29 -27
- package/src/NavMenu/NavMenuSeparator.torp +2 -2
- package/src/Notification/Notification.torp +48 -0
- package/src/Notification/NotificationClose.torp +28 -0
- package/src/Notification/NotificationContainer.torp +14 -0
- package/src/Notification/NotificationContent.torp +13 -0
- package/src/Notification/NotificationTypes.ts +5 -0
- package/src/Notification/index.ts +13 -0
- package/src/Notification/showNotification.ts +30 -0
- package/src/Popover/Popover.torp +2 -2
- package/src/Popover/PopoverContent.torp +31 -28
- package/src/Popover/PopoverContentAnchored.torp +39 -38
- package/src/Popover/PopoverContentContextual.torp +39 -36
- package/src/Popover/PopoverOverlay.torp +3 -3
- package/src/Popover/PopoverTrigger.torp +2 -2
- package/src/Popover/PopoverTriggerContextual.torp +2 -2
- package/src/Popover/PopoverTriggerHover.torp +3 -3
- package/src/Slider/Slider.torp +83 -0
- package/src/Slider/index.ts +3 -0
- package/src/TabGroup/TabContent.torp +2 -2
- package/src/TabGroup/TabGroup.torp +2 -2
- package/src/TabGroup/TabHeader.torp +2 -2
- package/src/TabGroup/TabList.torp +2 -2
- package/src/TabGroup/TabTrigger.torp +2 -2
- package/src/icons/ArrowDown.torp +15 -0
- package/src/icons/ArrowLeft.torp +15 -0
- package/src/icons/ArrowRight.torp +15 -0
- package/src/icons/ArrowUp.torp +15 -0
- package/src/icons/Bars.torp +17 -0
- package/src/icons/Check.torp +15 -0
- package/src/icons/ChevronDown.torp +15 -0
- package/src/icons/ChevronLeft.torp +15 -0
- package/src/icons/ChevronRight.torp +15 -0
- package/src/icons/ChevronUp.torp +15 -0
- package/src/icons/Cross.torp +16 -0
- package/src/icons/Loading.torp +16 -0
- package/src/icons/Minus.torp +15 -0
- package/src/icons/Plus.torp +16 -0
- package/src/icons/index.ts +31 -0
- package/src/motion/fade.ts +2 -2
- package/src/motion/index.ts +3 -0
- package/src/utils/dateUtils.ts +244 -0
- package/src/utils/setPopoverPosition.ts +4 -0
- package/test/Breadcrumb/accessibility.test.ts +29 -0
- package/test/Breadcrumb/basic.test.ts +17 -0
- package/test/Breadcrumb/components/BreadcrumbTest.torp +15 -0
- package/test/Calendar/components/CalendarTest.torp +9 -0
- package/test/Calendar/default.test.ts +18 -0
- package/test/Dialog/components/DialogAccessibility.torp +5 -5
- package/test/Disclosure/accessibility.test.ts +30 -0
- package/test/Disclosure/components/DisclosureTest.torp +17 -0
- package/test/Disclosure/default.test.ts +15 -0
- package/test/Disclosure/toggle.test.ts +19 -0
- package/test/Menu/accessibility.test.ts +82 -0
- package/test/Menu/basic.test.ts +57 -0
- package/test/Menu/components/MenuAccessibility.torp +59 -0
- package/test/Menu/components/MenuBasic.torp +58 -0
- package/test/MenuBar/accessibility.test.ts +86 -0
- package/test/MenuBar/basic.test.ts +21 -0
- package/test/MenuBar/components/MenuBarAccessibility.torp +34 -0
- package/test/MenuBar/components/MenuBarBasic.torp +25 -0
- package/test/Notification/accessibility.test.ts +21 -0
- package/test/Notification/components/CustomNotification.torp +14 -0
- package/test/Notification/components/NotificationAccessibility.torp +14 -0
- package/test/Notification/components/NotificationFunction.torp +20 -0
- package/test/Notification/components/NotificationVariable.torp +22 -0
- package/test/Notification/function.test.ts +25 -0
- package/test/Notification/variable.test.ts +25 -0
- package/test/Popover/components/CustomDialog.torp +25 -0
- package/test/Popover/components/PromptFunction.torp +19 -0
- package/test/Popover/components/PromptVariable.torp +38 -0
- package/test/Popover/function.test.ts +26 -0
- package/test/Popover/variable.test.ts +27 -0
- package/tsup.config.ts +12 -4
- package/dist/Accordion/index.cjs +0 -53
- package/dist/Accordion/index.cjs.map +0 -1
- package/dist/Dialog/index.cjs +0 -53
- package/dist/Dialog/index.cjs.map +0 -1
- package/dist/NavMenu/index.cjs +0 -78
- package/dist/NavMenu/index.cjs.map +0 -1
- package/dist/Offscreen/index.cjs +0 -33
- package/dist/Offscreen/index.cjs.map +0 -1
- package/dist/Offscreen/index.js +0 -6
- package/dist/Popover/index.cjs +0 -222
- package/dist/Popover/index.cjs.map +0 -1
- package/dist/TabGroup/index.cjs +0 -53
- package/dist/TabGroup/index.cjs.map +0 -1
- package/dist/metafile-cjs.json +0 -1
- package/dist/motion.cjs +0 -34
- package/dist/motion.cjs.map +0 -1
- package/dist/motion.d.ts +0 -6
- package/dist/motion.js.map +0 -1
- package/src/Accordion.ts +0 -7
- package/src/Dialog.ts +0 -7
- package/src/NavMenu.ts +0 -23
- package/src/Offscreen/index.ts +0 -3
- package/src/Popover.ts +0 -29
- package/src/TabGroup.ts +0 -7
- package/src/motion.ts +0 -3
- /package/dist/{Offscreen → Breadcrumb}/index.js.map +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { type SlotRender } from "@torpor/view";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
6
|
+
* @param $parent -- The parent node.
|
|
7
|
+
* @param $anchor -- The node to mount the component before.
|
|
8
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
9
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
10
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
11
|
+
*/
|
|
12
|
+
declare function NavMenu(
|
|
13
|
+
$parent: ParentNode,
|
|
14
|
+
$anchor: Node | null,
|
|
15
|
+
$props: any,
|
|
16
|
+
$context?: Record<PropertyKey, any>,
|
|
17
|
+
$slots?: Record<string, SlotRender>,
|
|
18
|
+
): void;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
24
|
+
* @param $parent -- The parent node.
|
|
25
|
+
* @param $anchor -- The node to mount the component before.
|
|
26
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
27
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
28
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
29
|
+
*/
|
|
30
|
+
declare function NavMenuButton(
|
|
31
|
+
$parent: ParentNode,
|
|
32
|
+
$anchor: Node | null,
|
|
33
|
+
$props: any,
|
|
34
|
+
$context?: Record<PropertyKey, any>,
|
|
35
|
+
$slots?: Record<string, SlotRender>,
|
|
36
|
+
): void;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
42
|
+
* @param $parent -- The parent node.
|
|
43
|
+
* @param $anchor -- The node to mount the component before.
|
|
44
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
45
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
46
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
47
|
+
*/
|
|
48
|
+
declare function NavMenuElement(
|
|
49
|
+
$parent: ParentNode,
|
|
50
|
+
$anchor: Node | null,
|
|
51
|
+
$props: any,
|
|
52
|
+
$context?: Record<PropertyKey, any>,
|
|
53
|
+
$slots?: Record<string, SlotRender>,
|
|
54
|
+
): void;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
60
|
+
* @param $parent -- The parent node.
|
|
61
|
+
* @param $anchor -- The node to mount the component before.
|
|
62
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
63
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
64
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
65
|
+
*/
|
|
66
|
+
declare function NavMenuGroup(
|
|
67
|
+
$parent: ParentNode,
|
|
68
|
+
$anchor: Node | null,
|
|
69
|
+
$props: any,
|
|
70
|
+
$context?: Record<PropertyKey, any>,
|
|
71
|
+
$slots?: Record<string, SlotRender>,
|
|
72
|
+
): void;
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
78
|
+
* @param $parent -- The parent node.
|
|
79
|
+
* @param $anchor -- The node to mount the component before.
|
|
80
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
81
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
82
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
83
|
+
*/
|
|
84
|
+
declare function NavMenuGroupHeader(
|
|
85
|
+
$parent: ParentNode,
|
|
86
|
+
$anchor: Node | null,
|
|
87
|
+
$props: any,
|
|
88
|
+
$context?: Record<PropertyKey, any>,
|
|
89
|
+
$slots?: Record<string, SlotRender>,
|
|
90
|
+
): void;
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
96
|
+
* @param $parent -- The parent node.
|
|
97
|
+
* @param $anchor -- The node to mount the component before.
|
|
98
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
99
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
100
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
101
|
+
*/
|
|
102
|
+
declare function NavMenuLink(
|
|
103
|
+
$parent: ParentNode,
|
|
104
|
+
$anchor: Node | null,
|
|
105
|
+
$props: any,
|
|
106
|
+
$context?: Record<PropertyKey, any>,
|
|
107
|
+
$slots?: Record<string, SlotRender>,
|
|
108
|
+
): void;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
114
|
+
* @param $parent -- The parent node.
|
|
115
|
+
* @param $anchor -- The node to mount the component before.
|
|
116
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
117
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
118
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
119
|
+
*/
|
|
120
|
+
declare function NavMenuPopout(
|
|
121
|
+
$parent: ParentNode,
|
|
122
|
+
$anchor: Node | null,
|
|
123
|
+
$props: any,
|
|
124
|
+
$context?: Record<PropertyKey, any>,
|
|
125
|
+
$slots?: Record<string, SlotRender>,
|
|
126
|
+
): void;
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
132
|
+
* @param $parent -- The parent node.
|
|
133
|
+
* @param $anchor -- The node to mount the component before.
|
|
134
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
135
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
136
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
137
|
+
*/
|
|
138
|
+
declare function NavMenuPopoutButton(
|
|
139
|
+
$parent: ParentNode,
|
|
140
|
+
$anchor: Node | null,
|
|
141
|
+
$props: any,
|
|
142
|
+
$context?: Record<PropertyKey, any>,
|
|
143
|
+
$slots?: Record<string, SlotRender>,
|
|
144
|
+
): void;
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
150
|
+
* @param $parent -- The parent node.
|
|
151
|
+
* @param $anchor -- The node to mount the component before.
|
|
152
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
153
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
154
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
155
|
+
*/
|
|
156
|
+
declare function NavMenuPopoutContent(
|
|
157
|
+
$parent: ParentNode,
|
|
158
|
+
$anchor: Node | null,
|
|
159
|
+
$props: any,
|
|
160
|
+
$context?: Record<PropertyKey, any>,
|
|
161
|
+
$slots?: Record<string, SlotRender>,
|
|
162
|
+
): void;
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
168
|
+
* @param $parent -- The parent node.
|
|
169
|
+
* @param $anchor -- The node to mount the component before.
|
|
170
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
171
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
172
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
173
|
+
*/
|
|
174
|
+
declare function NavMenuSeparator(
|
|
175
|
+
$parent: ParentNode,
|
|
176
|
+
$anchor: Node | null,
|
|
177
|
+
$props: any,
|
|
178
|
+
$context?: Record<PropertyKey, any>,
|
|
179
|
+
$slots?: Record<string, SlotRender>,
|
|
180
|
+
): void;
|
|
181
|
+
|
|
182
|
+
export { NavMenu, NavMenuButton, NavMenuElement, NavMenuGroup, NavMenuGroupHeader, NavMenuLink, NavMenuPopout, NavMenuPopoutButton, NavMenuPopoutContent, NavMenuSeparator };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { NotificationContextName, type NotificationContext } from "./NotificationTypes";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An element that displays a brief, important message in a way that attracts
|
|
5
|
+
* the user's attention without interrupting the user's task.
|
|
6
|
+
*
|
|
7
|
+
* See [the WAI ARIA guidelines for Alerts](https://www.w3.org/WAI/ARIA/apg/patterns/alert/).
|
|
8
|
+
*
|
|
9
|
+
* @prop {boolean} visible -- Whether the notification is visible
|
|
10
|
+
* @prop {number | undefined} duration -- The duration, in milliseconds, to keep the notification visible
|
|
11
|
+
* @prop {() => void} onclose -- Raised when the notification has closed, either after the duration has elapsed, or when the user has pressed the close button
|
|
12
|
+
*/
|
|
13
|
+
export default function Notification($props) {
|
|
14
|
+
$props.visible ??= true;
|
|
15
|
+
$props.duration ??= 5000;
|
|
16
|
+
|
|
17
|
+
// Set the context to pass down to items
|
|
18
|
+
let context: NotificationContext = {
|
|
19
|
+
closeNotification
|
|
20
|
+
};
|
|
21
|
+
$context[NotificationContextName] = context;
|
|
22
|
+
|
|
23
|
+
$mount(() => {
|
|
24
|
+
if ($props.duration) {
|
|
25
|
+
setTimeout(closeNotification, $props.duration);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
function closeNotification() {
|
|
30
|
+
$props.visible = false;
|
|
31
|
+
|
|
32
|
+
if ($props.onclose) {
|
|
33
|
+
$props.onclose();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@render {
|
|
38
|
+
@if ($props.visible) {
|
|
39
|
+
<div
|
|
40
|
+
{$props.id}
|
|
41
|
+
class={`torp-notification ${$props.class ?? ""}`.trim()}
|
|
42
|
+
role="alert"
|
|
43
|
+
>
|
|
44
|
+
<slot />
|
|
45
|
+
</div>
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NotificationContextName, type NotificationContext } from "./NotificationTypes";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The button that a user can press to close this Notification.
|
|
5
|
+
*/
|
|
6
|
+
export default function NotificationClose() {
|
|
7
|
+
// Get stuff out of the NotificationContext
|
|
8
|
+
const context = $context[NotificationContextName] as NotificationContext;
|
|
9
|
+
if (!context) {
|
|
10
|
+
throw new Error("NotificationClose must be contained within a Notification");
|
|
11
|
+
}
|
|
12
|
+
const { closeNotification } = context;
|
|
13
|
+
|
|
14
|
+
function handleClick() {
|
|
15
|
+
closeNotification();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@render {
|
|
19
|
+
<button
|
|
20
|
+
{$props.id}
|
|
21
|
+
class={`torp-notification-close ${$props.class ?? ""}`.trim()}
|
|
22
|
+
type="button"
|
|
23
|
+
onclick={handleClick}
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</button>
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The container for one or more Notifications, which can be used to position
|
|
3
|
+
* the notifications inside the viewport.
|
|
4
|
+
*/
|
|
5
|
+
export default function NotificationContainer() {
|
|
6
|
+
@render {
|
|
7
|
+
<div
|
|
8
|
+
{$props.id}
|
|
9
|
+
class={`torp-notification-container ${$props.class ?? ""}`.trim()}
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type SlotRender } from "@torpor/view";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
6
|
+
* @param $parent -- The parent node.
|
|
7
|
+
* @param $anchor -- The node to mount the component before.
|
|
8
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
9
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
10
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
11
|
+
*/
|
|
12
|
+
declare function Notification(
|
|
13
|
+
$parent: ParentNode,
|
|
14
|
+
$anchor: Node | null,
|
|
15
|
+
$props,
|
|
16
|
+
$context?: Record<PropertyKey, any>,
|
|
17
|
+
$slots?: Record<string, SlotRender>,
|
|
18
|
+
): void;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
24
|
+
* @param $parent -- The parent node.
|
|
25
|
+
* @param $anchor -- The node to mount the component before.
|
|
26
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
27
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
28
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
29
|
+
*/
|
|
30
|
+
declare function NotificationClose(
|
|
31
|
+
$parent: ParentNode,
|
|
32
|
+
$anchor: Node | null,
|
|
33
|
+
$props?: Record<PropertyKey, any>,
|
|
34
|
+
$context?: Record<PropertyKey, any>,
|
|
35
|
+
$slots?: Record<string, SlotRender>,
|
|
36
|
+
): void;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
42
|
+
* @param $parent -- The parent node.
|
|
43
|
+
* @param $anchor -- The node to mount the component before.
|
|
44
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
45
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
46
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
47
|
+
*/
|
|
48
|
+
declare function NotificationContainer(
|
|
49
|
+
$parent: ParentNode,
|
|
50
|
+
$anchor: Node | null,
|
|
51
|
+
$props?: Record<PropertyKey, any>,
|
|
52
|
+
$context?: Record<PropertyKey, any>,
|
|
53
|
+
$slots?: Record<string, SlotRender>,
|
|
54
|
+
): void;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Mounts or hydrates the component into the supplied parent node.
|
|
60
|
+
* @param $parent -- The parent node.
|
|
61
|
+
* @param $anchor -- The node to mount the component before.
|
|
62
|
+
* @param $props -- The values that have been passed into the component as properties.
|
|
63
|
+
* @param $context -- Values that have been passed into the component from its ancestors.
|
|
64
|
+
* @param $slots -- Functions for rendering children into slot nodes within the component.
|
|
65
|
+
*/
|
|
66
|
+
declare function NotificationContent(
|
|
67
|
+
$parent: ParentNode,
|
|
68
|
+
$anchor: Node | null,
|
|
69
|
+
$props?: Record<PropertyKey, any>,
|
|
70
|
+
$context?: Record<PropertyKey, any>,
|
|
71
|
+
$slots?: Record<string, SlotRender>,
|
|
72
|
+
): void;
|
|
73
|
+
|
|
74
|
+
export { Notification, NotificationClose, NotificationContainer, NotificationContent };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/Notification/Notification.torp
|
|
2
|
+
import Notification_default from "./Notification.torp";
|
|
3
|
+
|
|
4
|
+
// src/Notification/NotificationClose.torp
|
|
5
|
+
import NotificationClose_default from "./NotificationClose.torp";
|
|
6
|
+
|
|
7
|
+
// src/Notification/NotificationContainer.torp
|
|
8
|
+
import NotificationContainer_default from "./NotificationContainer.torp";
|
|
9
|
+
|
|
10
|
+
// src/Notification/NotificationContent.torp
|
|
11
|
+
import NotificationContent_default from "./NotificationContent.torp";
|
|
12
|
+
|
|
13
|
+
// src/Notification/showNotification.ts
|
|
14
|
+
import { mount } from "@torpor/view";
|
|
15
|
+
function showNotification(notification, props, target) {
|
|
16
|
+
if (!target) {
|
|
17
|
+
target = document.getElementsByClassName("torp-notification-container")[0];
|
|
18
|
+
if (!target) {
|
|
19
|
+
throw new Error("No notification container found");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
var fragment = document.createDocumentFragment();
|
|
23
|
+
while (target.firstChild) {
|
|
24
|
+
fragment.append(target.firstChild);
|
|
25
|
+
}
|
|
26
|
+
mount(target, notification, props);
|
|
27
|
+
target.prepend(fragment);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
Notification_default as Notification,
|
|
31
|
+
NotificationClose_default as NotificationClose,
|
|
32
|
+
NotificationContainer_default as NotificationContainer,
|
|
33
|
+
NotificationContent_default as NotificationContent,
|
|
34
|
+
showNotification
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Notification/showNotification.ts"],"sourcesContent":["import { mount } from \"@torpor/view\";\n\n/**\n * Shows a notification component in code.\n * @param notification The notification component\n * @param props The properties for the notification component\n * @param target The target element to show the notification in\n */\nexport default function showNotification(notification: any, props: any, target?: Element): void {\n\tif (!target) {\n\t\t// Put the notification in the first NotificationContainer, or the\n\t\t// document body if there are no NotificationContainers\n\t\ttarget = document.getElementsByClassName(\"torp-notification-container\")[0];\n\t\tif (!target) {\n\t\t\tthrow new Error(\"No notification container found\");\n\t\t}\n\t}\n\n\t// HACK: Should allow mounting in a non-empty container\n\t// Move existing nodes into a fragment, and add them back after mounting\n\tvar fragment = document.createDocumentFragment();\n\twhile (target.firstChild) {\n\t\tfragment.append(target.firstChild);\n\t}\n\n\t// Create the notification\n\tmount(target, notification, props);\n\n\ttarget.prepend(fragment);\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,aAAa;AAQP,SAAR,iBAAkC,cAAmB,OAAY,QAAwB;AAC/F,MAAI,CAAC,QAAQ;AAGZ,aAAS,SAAS,uBAAuB,6BAA6B,EAAE,CAAC;AACzE,QAAI,CAAC,QAAQ;AACZ,YAAM,IAAI,MAAM,iCAAiC;AAAA,IAClD;AAAA,EACD;AAIA,MAAI,WAAW,SAAS,uBAAuB;AAC/C,SAAO,OAAO,YAAY;AACzB,aAAS,OAAO,OAAO,UAAU;AAAA,EAClC;AAGA,QAAM,QAAQ,cAAc,KAAK;AAEjC,SAAO,QAAQ,QAAQ;AACxB;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { mount } from "@torpor/view";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shows a notification component in code.
|
|
5
|
+
* @param notification The notification component
|
|
6
|
+
* @param props The properties for the notification component
|
|
7
|
+
* @param target The target element to show the notification in
|
|
8
|
+
*/
|
|
9
|
+
export default function showNotification(notification: any, props: any, target?: Element): void {
|
|
10
|
+
if (!target) {
|
|
11
|
+
// Put the notification in the first NotificationContainer, or the
|
|
12
|
+
// document body if there are no NotificationContainers
|
|
13
|
+
target = document.getElementsByClassName("torp-notification-container")[0];
|
|
14
|
+
if (!target) {
|
|
15
|
+
throw new Error("No notification container found");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// HACK: Should allow mounting in a non-empty container
|
|
20
|
+
// Move existing nodes into a fragment, and add them back after mounting
|
|
21
|
+
var fragment = document.createDocumentFragment();
|
|
22
|
+
while (target.firstChild) {
|
|
23
|
+
fragment.append(target.firstChild);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Create the notification
|
|
27
|
+
mount(target, notification, props);
|
|
28
|
+
|
|
29
|
+
target.prepend(fragment);
|
|
30
|
+
}
|
|
@@ -7,6 +7,8 @@ import { PopoverContextName, type PopoverContext } from "./PopoverTypes";
|
|
|
7
7
|
*/
|
|
8
8
|
export default function PopoverContent($props: any) {
|
|
9
9
|
let div: HTMLDivElement;
|
|
10
|
+
let shown = false;
|
|
11
|
+
let closeOnClick = false;
|
|
10
12
|
|
|
11
13
|
// Get stuff out of the PopoverContext
|
|
12
14
|
const context = $context[PopoverContextName] as PopoverContext;
|
|
@@ -15,37 +17,37 @@ export default function PopoverContent($props: any) {
|
|
|
15
17
|
}
|
|
16
18
|
let $state = context.state;
|
|
17
19
|
|
|
18
|
-
let closeOnClick = false;
|
|
19
|
-
|
|
20
|
-
let first = true;
|
|
21
20
|
$run(() => {
|
|
22
|
-
|
|
21
|
+
if (!$state.visible) {
|
|
22
|
+
hide();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
function show() {
|
|
27
|
+
shown = true;
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
// HACK: Because this Popover could be shown with a click, we need to wait for another mousedown
|
|
30
|
+
// before we close on click. Otherwise the click immediately bubbles to the document
|
|
31
|
+
closeOnClick = false;
|
|
32
|
+
addDocumentEvent("mousedown", handleDocumentMouseDown);
|
|
33
|
+
addDocumentEvent("click", handleDocumentClick);
|
|
34
|
+
|
|
35
|
+
if (context.focusFirstElement) {
|
|
36
|
+
context.focusFirstElement();
|
|
27
37
|
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function hide() {
|
|
41
|
+
if (!shown) return;
|
|
28
42
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// Wait for the content div to be shown, set its position, and listen for window resize to re-position
|
|
36
|
-
//await tick();
|
|
37
|
-
if (context.focusFirstElement) {
|
|
38
|
-
context.focusFirstElement();
|
|
39
|
-
}
|
|
40
|
-
} else {
|
|
41
|
-
removeDocumentEvent("mousedown", handleDocumentMouseDown);
|
|
42
|
-
removeDocumentEvent("click", handleDocumentClick);
|
|
43
|
-
// Focus the anchor element per WAI guidelines
|
|
44
|
-
if (context.anchorElement?.focus) {
|
|
45
|
-
context.anchorElement.focus();
|
|
46
|
-
}
|
|
43
|
+
removeDocumentEvent("mousedown", handleDocumentMouseDown);
|
|
44
|
+
removeDocumentEvent("click", handleDocumentClick);
|
|
45
|
+
|
|
46
|
+
// Focus the anchor element per WAI guidelines
|
|
47
|
+
if (context.anchorElement?.focus) {
|
|
48
|
+
context.anchorElement.focus();
|
|
47
49
|
}
|
|
48
|
-
}
|
|
50
|
+
}
|
|
49
51
|
|
|
50
52
|
function handleDocumentMouseDown() {
|
|
51
53
|
closeOnClick = true;
|
|
@@ -65,11 +67,12 @@ export default function PopoverContent($props: any) {
|
|
|
65
67
|
@render {
|
|
66
68
|
@if ($state.visible) {
|
|
67
69
|
<div
|
|
68
|
-
|
|
70
|
+
{$props.id}
|
|
69
71
|
class={`torp-popover-content ${$props.class ?? ""}`.trim()}
|
|
70
72
|
&ref={div}
|
|
73
|
+
onmount={show}
|
|
71
74
|
>
|
|
72
|
-
|
|
75
|
+
<slot />
|
|
73
76
|
</div>
|
|
74
77
|
}
|
|
75
78
|
}
|
|
@@ -17,7 +17,7 @@ export default function PopoverContentAnchored($props: any) {
|
|
|
17
17
|
$props.alignment ??= "center";
|
|
18
18
|
|
|
19
19
|
let div: HTMLDivElement;
|
|
20
|
-
|
|
20
|
+
let shown = false;
|
|
21
21
|
let closeOnClick = false;
|
|
22
22
|
|
|
23
23
|
// Get stuff out of the PopoverContext
|
|
@@ -27,42 +27,45 @@ export default function PopoverContentAnchored($props: any) {
|
|
|
27
27
|
}
|
|
28
28
|
let $state = context.state;
|
|
29
29
|
|
|
30
|
-
let first = true;
|
|
31
30
|
$run(() => {
|
|
32
|
-
|
|
31
|
+
if (!$state.visible) {
|
|
32
|
+
hide();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
function show() {
|
|
37
|
+
shown = true;
|
|
38
|
+
|
|
39
|
+
// HACK: Because this Popover could be shown with a click, we need to wait for another mousedown
|
|
40
|
+
// before we close on click. Otherwise the click immediately bubbles to the document
|
|
41
|
+
closeOnClick = false;
|
|
42
|
+
addDocumentEvent("mousedown", handleDocumentMouseDown);
|
|
43
|
+
addDocumentEvent("click", handleDocumentClick);
|
|
44
|
+
|
|
45
|
+
// Set the position and listen for window resize and scroll to reset the position
|
|
46
|
+
setPosition();
|
|
47
|
+
const scrollParent = getScrollParent(context.anchorElement)
|
|
48
|
+
scrollParent.addEventListener("resize", setPosition);
|
|
49
|
+
scrollParent.addEventListener("scroll", setPosition);
|
|
50
|
+
if (context.focusFirstElement) {
|
|
51
|
+
context.focusFirstElement();
|
|
37
52
|
}
|
|
53
|
+
}
|
|
38
54
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const scrollParent = getScrollParent(context.anchorElement)
|
|
52
|
-
scrollParent.addEventListener("resize", setPosition);
|
|
53
|
-
scrollParent.addEventListener("scroll", setPosition);
|
|
54
|
-
} else {
|
|
55
|
-
removeDocumentEvent("mousedown", handleDocumentMouseDown);
|
|
56
|
-
removeDocumentEvent("click", handleDocumentClick);
|
|
57
|
-
// Stop listening for window resize and focus the anchor element per WAI guidelines
|
|
58
|
-
const scrollParent = getScrollParent(context.anchorElement)
|
|
59
|
-
scrollParent.removeEventListener("resize", setPosition);
|
|
60
|
-
scrollParent.removeEventListener("scroll", setPosition);
|
|
61
|
-
if (context.anchorElement?.focus) {
|
|
62
|
-
context.anchorElement.focus();
|
|
63
|
-
}
|
|
55
|
+
function hide() {
|
|
56
|
+
if (!shown) return;
|
|
57
|
+
|
|
58
|
+
removeDocumentEvent("mousedown", handleDocumentMouseDown);
|
|
59
|
+
removeDocumentEvent("click", handleDocumentClick);
|
|
60
|
+
|
|
61
|
+
// Stop listening for window resize and focus the anchor element per WAI guidelines
|
|
62
|
+
const scrollParent = getScrollParent(context.anchorElement)
|
|
63
|
+
scrollParent.removeEventListener("resize", setPosition);
|
|
64
|
+
scrollParent.removeEventListener("scroll", setPosition);
|
|
65
|
+
if (context.anchorElement?.focus) {
|
|
66
|
+
context.anchorElement.focus();
|
|
64
67
|
}
|
|
65
|
-
}
|
|
68
|
+
}
|
|
66
69
|
|
|
67
70
|
function handleDocumentMouseDown() {
|
|
68
71
|
closeOnClick = true;
|
|
@@ -85,20 +88,18 @@ export default function PopoverContentAnchored($props: any) {
|
|
|
85
88
|
throw new Error("PopoverContentAnchored must have an anchor element");
|
|
86
89
|
}
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
setPopoverPosition(context.anchorElement, div, $props.side, $props.alignment);
|
|
90
|
-
}
|
|
91
|
+
setPopoverPosition(context.anchorElement, div, $props.side, $props.alignment);
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
@render {
|
|
94
95
|
@if ($state.visible) {
|
|
95
96
|
<div
|
|
96
|
-
|
|
97
|
+
{$props.id}
|
|
97
98
|
class={`torp-popover-content-anchored ${$props.class ?? ""}`.trim()}
|
|
98
99
|
&ref={div}
|
|
99
|
-
|
|
100
|
+
onmount={show}
|
|
100
101
|
>
|
|
101
|
-
|
|
102
|
+
<slot />
|
|
102
103
|
</div>
|
|
103
104
|
}
|
|
104
105
|
}
|