@torpor/ui 0.1.7 → 0.2.1
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 +47 -0
- package/dist/Accordion/Accordion.torp +25 -13
- package/dist/Accordion/AccordionContent.torp +15 -8
- package/dist/Accordion/AccordionHeader.torp +16 -7
- package/dist/Accordion/AccordionItem.torp +24 -10
- package/dist/Accordion/AccordionTrigger.torp +16 -8
- package/dist/Accordion/AccordionTypes.ts +2 -0
- package/dist/Accordion/index.d.ts +157 -0
- package/dist/Breadcrumb/Breadcrumb.torp +42 -0
- package/dist/Breadcrumb/BreadcrumbItem.torp +28 -0
- package/dist/Breadcrumb/BreadcrumbSeparator.torp +25 -0
- package/dist/Breadcrumb/index.d.ts +84 -0
- package/dist/Breadcrumb/index.js +14 -0
- package/dist/Calendar/Calendar.torp +273 -0
- package/dist/Calendar/CalendarDay.torp +75 -0
- package/dist/Calendar/CalendarTypes.ts +22 -0
- package/dist/Calendar/index.d.ts +36 -0
- package/dist/Calendar/index.js +10 -0
- package/dist/Calendar/index.js.map +1 -0
- package/dist/Dialog/Dialog.torp +16 -6
- package/dist/Dialog/DialogBody.torp +13 -5
- package/dist/Dialog/DialogButton.torp +18 -6
- package/dist/Dialog/DialogFooter.torp +13 -3
- package/dist/Dialog/DialogHeader.torp +13 -4
- package/dist/Dialog/index.d.ts +135 -0
- package/dist/Disclosure/Disclosure.torp +79 -0
- package/dist/Disclosure/DisclosureContent.torp +43 -0
- package/dist/Disclosure/DisclosureHeader.torp +43 -0
- package/dist/Disclosure/DisclosureTrigger.torp +44 -0
- package/dist/Disclosure/DisclosureTypes.ts +14 -0
- package/dist/Disclosure/index.d.ts +113 -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} +20 -19
- package/dist/Drawer/index.d.ts +21 -0
- package/dist/Drawer/index.js +6 -0
- package/dist/Drawer/index.js.map +1 -0
- package/dist/Form/Field.torp +93 -0
- package/dist/Form/Form.torp +131 -0
- package/dist/Form/FormTypes.ts +30 -0
- package/dist/Form/Input.torp +94 -0
- package/dist/Form/Label.torp +31 -0
- package/dist/Form/Message.torp +35 -0
- package/dist/Form/StandardSchemaV1.ts +70 -0
- package/dist/Form/index.d.ts +117 -0
- package/dist/Form/index.js +22 -0
- package/dist/Form/index.js.map +1 -0
- package/dist/Menu/Menu.torp +169 -0
- package/dist/Menu/MenuButton.torp +64 -0
- package/dist/Menu/MenuCheck.torp +81 -0
- package/dist/Menu/MenuGroup.torp +29 -0
- package/dist/Menu/MenuIndicator.torp +38 -0
- package/dist/Menu/MenuPopout.torp +82 -0
- package/dist/Menu/MenuPopoutContent.torp +83 -0
- package/dist/Menu/MenuPopoutTrigger.torp +126 -0
- package/dist/Menu/MenuRadio.torp +99 -0
- package/dist/Menu/MenuRadioGroup.torp +97 -0
- package/dist/Menu/MenuSeparator.torp +24 -0
- package/dist/Menu/MenuTypes.ts +58 -0
- package/dist/Menu/index.d.ts +293 -0
- package/dist/Menu/index.js +46 -0
- package/dist/Menu/index.js.map +1 -0
- package/dist/MenuBar/MenuBar.torp +159 -0
- package/dist/MenuBar/MenuBarItem.torp +115 -0
- package/dist/MenuBar/MenuBarItemContent.torp +117 -0
- package/dist/MenuBar/MenuBarItemTrigger.torp +98 -0
- package/dist/MenuBar/MenuBarTypes.ts +36 -0
- package/dist/MenuBar/index.d.ts +125 -0
- package/dist/MenuBar/index.js +18 -0
- package/dist/MenuBar/index.js.map +1 -0
- package/dist/NavMenu/NavMenu.torp +15 -6
- package/dist/NavMenu/NavMenuButton.torp +14 -7
- package/dist/NavMenu/NavMenuElement.torp +16 -8
- package/dist/NavMenu/NavMenuGroup.torp +14 -5
- package/dist/NavMenu/NavMenuGroupHeader.torp +14 -6
- package/dist/NavMenu/NavMenuLink.torp +18 -10
- package/dist/NavMenu/NavMenuPopout.torp +13 -5
- package/dist/NavMenu/NavMenuPopoutButton.torp +17 -11
- package/dist/NavMenu/NavMenuPopoutContent.torp +42 -30
- package/dist/NavMenu/NavMenuSeparator.torp +12 -3
- package/dist/NavMenu/index.d.ts +259 -0
- package/dist/Notification/Notification.torp +58 -0
- package/dist/Notification/NotificationClose.torp +37 -0
- package/dist/Notification/NotificationContainer.torp +24 -0
- package/dist/Notification/NotificationContent.torp +23 -0
- package/dist/Notification/NotificationTypes.ts +5 -0
- package/dist/Notification/index.d.ts +92 -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 +22 -8
- package/dist/Popover/PopoverContent.torp +41 -29
- package/dist/Popover/PopoverContentAnchored.torp +52 -44
- package/dist/Popover/PopoverContentContextual.torp +49 -37
- package/dist/Popover/PopoverOverlay.torp +13 -4
- package/dist/Popover/PopoverTrigger.torp +12 -3
- package/dist/Popover/PopoverTriggerContextual.torp +12 -3
- package/dist/Popover/PopoverTriggerHover.torp +14 -5
- package/dist/Popover/index.d.ts +191 -0
- package/dist/TabGroup/TabContent.torp +13 -7
- package/dist/TabGroup/TabGroup.torp +23 -11
- package/dist/TabGroup/TabHeader.torp +16 -7
- package/dist/TabGroup/TabList.torp +15 -6
- package/dist/TabGroup/TabTrigger.torp +14 -6
- package/dist/TabGroup/index.d.ts +150 -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 +142 -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 +60 -35
- package/scripts/postbuild.ts +42 -5
- package/src/Accordion/Accordion.torp +25 -13
- package/src/Accordion/AccordionContent.torp +15 -8
- package/src/Accordion/AccordionHeader.torp +16 -7
- package/src/Accordion/AccordionItem.torp +24 -10
- package/src/Accordion/AccordionTrigger.torp +16 -8
- package/src/Accordion/AccordionTypes.ts +2 -0
- package/src/Breadcrumb/Breadcrumb.torp +42 -0
- package/src/Breadcrumb/BreadcrumbItem.torp +28 -0
- package/src/Breadcrumb/BreadcrumbSeparator.torp +25 -0
- package/src/Breadcrumb/index.ts +5 -0
- package/src/Calendar/Calendar.torp +273 -0
- package/src/Calendar/CalendarDay.torp +75 -0
- package/src/Calendar/CalendarTypes.ts +22 -0
- package/src/Calendar/index.ts +4 -0
- package/src/Dialog/Dialog.torp +16 -6
- package/src/Dialog/DialogBody.torp +13 -5
- package/src/Dialog/DialogButton.torp +18 -6
- package/src/Dialog/DialogFooter.torp +13 -3
- package/src/Dialog/DialogHeader.torp +13 -4
- package/src/Disclosure/Disclosure.torp +79 -0
- package/src/Disclosure/DisclosureContent.torp +43 -0
- package/src/Disclosure/DisclosureHeader.torp +43 -0
- package/src/Disclosure/DisclosureTrigger.torp +44 -0
- package/src/Disclosure/DisclosureTypes.ts +14 -0
- package/src/Disclosure/index.ts +6 -0
- package/{dist/Offscreen/Offscreen.torp → src/Drawer/Drawer.torp} +20 -19
- package/src/Drawer/index.ts +3 -0
- package/src/Form/Field.torp +93 -0
- package/src/Form/Form.torp +131 -0
- package/src/Form/FormTypes.ts +30 -0
- package/src/Form/Input.torp +94 -0
- package/src/Form/Label.torp +31 -0
- package/src/Form/Message.torp +35 -0
- package/src/Form/StandardSchemaV1.ts +70 -0
- package/src/Form/index.ts +7 -0
- package/src/Menu/Menu.torp +169 -0
- package/src/Menu/MenuButton.torp +64 -0
- package/src/Menu/MenuCheck.torp +81 -0
- package/src/Menu/MenuGroup.torp +29 -0
- package/src/Menu/MenuIndicator.torp +38 -0
- package/src/Menu/MenuPopout.torp +82 -0
- package/src/Menu/MenuPopoutContent.torp +83 -0
- package/src/Menu/MenuPopoutTrigger.torp +126 -0
- package/src/Menu/MenuRadio.torp +99 -0
- package/src/Menu/MenuRadioGroup.torp +97 -0
- package/src/Menu/MenuSeparator.torp +24 -0
- package/src/Menu/MenuTypes.ts +58 -0
- package/src/Menu/index.ts +25 -0
- package/src/MenuBar/MenuBar.torp +159 -0
- package/src/MenuBar/MenuBarItem.torp +115 -0
- package/src/MenuBar/MenuBarItemContent.torp +117 -0
- package/src/MenuBar/MenuBarItemTrigger.torp +98 -0
- package/src/MenuBar/MenuBarTypes.ts +36 -0
- package/src/MenuBar/index.ts +6 -0
- package/src/NavMenu/NavMenu.torp +15 -6
- package/src/NavMenu/NavMenuButton.torp +14 -7
- package/src/NavMenu/NavMenuElement.torp +16 -8
- package/src/NavMenu/NavMenuGroup.torp +14 -5
- package/src/NavMenu/NavMenuGroupHeader.torp +14 -6
- package/src/NavMenu/NavMenuLink.torp +18 -10
- package/src/NavMenu/NavMenuPopout.torp +13 -5
- package/src/NavMenu/NavMenuPopoutButton.torp +17 -11
- package/src/NavMenu/NavMenuPopoutContent.torp +42 -30
- package/src/NavMenu/NavMenuSeparator.torp +12 -3
- package/src/Notification/Notification.torp +58 -0
- package/src/Notification/NotificationClose.torp +37 -0
- package/src/Notification/NotificationContainer.torp +24 -0
- package/src/Notification/NotificationContent.torp +23 -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 +22 -8
- package/src/Popover/PopoverContent.torp +41 -29
- package/src/Popover/PopoverContentAnchored.torp +52 -44
- package/src/Popover/PopoverContentContextual.torp +49 -37
- package/src/Popover/PopoverOverlay.torp +13 -4
- package/src/Popover/PopoverTrigger.torp +12 -3
- package/src/Popover/PopoverTriggerContextual.torp +12 -3
- package/src/Popover/PopoverTriggerHover.torp +14 -5
- package/src/Slider/Slider.torp +83 -0
- package/src/Slider/index.ts +3 -0
- package/src/TabGroup/TabContent.torp +13 -7
- package/src/TabGroup/TabGroup.torp +23 -11
- package/src/TabGroup/TabHeader.torp +16 -7
- package/src/TabGroup/TabList.torp +15 -6
- package/src/TabGroup/TabTrigger.torp +14 -6
- 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/Accordion/components/AccordionAccessibility.torp +2 -0
- package/test/Accordion/components/AccordionKeyboard.torp +2 -0
- package/test/Accordion/components/AccordionList.torp +2 -0
- package/test/Accordion/components/AccordionMultiple.torp +2 -0
- package/test/Accordion/components/AccordionSingle.torp +2 -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 +31 -0
- package/test/Disclosure/components/DisclosureTest.torp +19 -0
- package/test/Disclosure/default.test.ts +15 -0
- package/test/Disclosure/toggle.test.ts +20 -0
- package/test/Form/components/FieldTest.torp +25 -0
- package/test/Form/components/FormTest.torp +31 -0
- package/test/Form/components/InputTest.torp +9 -0
- package/test/Form/field.test.ts +34 -0
- package/test/Form/form.test.ts +34 -0
- package/test/Form/input.test.ts +19 -0
- package/test/Menu/accessibility.test.ts +83 -0
- package/test/Menu/basic.test.ts +58 -0
- package/test/Menu/components/MenuAccessibility.torp +59 -0
- package/test/Menu/components/MenuBasic.torp +58 -0
- package/test/MenuBar/accessibility.test.ts +87 -0
- package/test/MenuBar/basic.test.ts +22 -0
- package/test/MenuBar/components/MenuBarAccessibility.torp +34 -0
- package/test/MenuBar/components/MenuBarBasic.torp +25 -0
- package/test/NavMenu/basic.test.ts +1 -1
- package/test/NavMenu/components/{NavMenu.torp → NavMenuBasic.torp} +1 -1
- 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/test/TabGroup/components/TabGroupAccessibility.torp +2 -0
- package/test/TabGroup/components/TabGroupKeyboard.torp +2 -0
- package/test/TabGroup/components/TabGroupList.torp +2 -0
- package/test/TabGroup/components/TabGroupTrigger.torp +2 -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,191 @@
|
|
|
1
|
+
import { type SlotRender } from "@torpor/view";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
interface PopoverProps {
|
|
5
|
+
/** An ID for the root element */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Class name(s) for the root element */
|
|
8
|
+
class?: string,
|
|
9
|
+
/** Whether the popover is modal. If true, an overlay should be supplied to obscure outside content, and only the popover content will be visible to screen readers */
|
|
10
|
+
modal?: boolean,
|
|
11
|
+
/** Whether the popover is visible */
|
|
12
|
+
visible?: boolean,
|
|
13
|
+
/** The element to anchor this popover to, as an alternative to supplying a PopoverTrigger */
|
|
14
|
+
anchor?: HTMLElement,
|
|
15
|
+
/** The position to display this popover at if it's contextual, as an alternative to supplying a PopoverTriggerContextual */
|
|
16
|
+
position?: Point,
|
|
17
|
+
/** A function to be called when the user selects a response */
|
|
18
|
+
callback?: ((value: any) => void),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A popover that can be used to show rich content or obtain information from a user.
|
|
23
|
+
*
|
|
24
|
+
* See [the WAI ARIA guidelines for Dialogs](https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/).
|
|
25
|
+
*
|
|
26
|
+
* The structure of a Popover is:
|
|
27
|
+
*
|
|
28
|
+
* ```
|
|
29
|
+
* <Popover>
|
|
30
|
+
* <PopoverOverlay /> (optional, if modal)
|
|
31
|
+
* <PopoverTrigger/PopoverTriggerContextual/PopoverTriggerHover /> (optional)
|
|
32
|
+
* <PopoverContent/PopoverContentAnchored/PopoverContentContextual />
|
|
33
|
+
* </Popover>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare function Popover(
|
|
37
|
+
$parent: ParentNode,
|
|
38
|
+
$anchor: Node | null,
|
|
39
|
+
$props: PopoverProps,
|
|
40
|
+
$context?: Record<PropertyKey, any>,
|
|
41
|
+
$slots?: Record<string, SlotRender>,
|
|
42
|
+
): void;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
interface PopoverContentProps {
|
|
47
|
+
/** An ID for the root element */
|
|
48
|
+
id?: string;
|
|
49
|
+
/** Class name(s) for the root element */
|
|
50
|
+
class?: string,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The content that is displayed for a Popover when it is open, such as a Dialog
|
|
55
|
+
* in the middle of the screen or a div that slides in from the side.
|
|
56
|
+
*/
|
|
57
|
+
declare function PopoverContent(
|
|
58
|
+
$parent: ParentNode,
|
|
59
|
+
$anchor: Node | null,
|
|
60
|
+
$props: PopoverContentProps,
|
|
61
|
+
$context?: Record<PropertyKey, any>,
|
|
62
|
+
$slots?: Record<string, SlotRender>,
|
|
63
|
+
): void;
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
interface PopoverContentAnchoredProps {
|
|
68
|
+
/** An ID for the root element */
|
|
69
|
+
id?: string;
|
|
70
|
+
/** Class name(s) for the root element */
|
|
71
|
+
class?: string,
|
|
72
|
+
/** Where the popover will be shown, relative to the popover button */
|
|
73
|
+
side?: "top" | "right" | "bottom" | "left",
|
|
74
|
+
/** How the popover will be aligned, relative to the popover button */
|
|
75
|
+
alignment?: "start" | "center" | "end",
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The content that is displayed for a Popover when it is open, displayed
|
|
80
|
+
* alongside an element.
|
|
81
|
+
*/
|
|
82
|
+
declare function PopoverContentAnchored(
|
|
83
|
+
$parent: ParentNode,
|
|
84
|
+
$anchor: Node | null,
|
|
85
|
+
$props: PopoverContentAnchoredProps,
|
|
86
|
+
$context?: Record<PropertyKey, any>,
|
|
87
|
+
$slots?: Record<string, SlotRender>,
|
|
88
|
+
): void;
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
interface PopoverContentContextualProps {
|
|
93
|
+
/** An ID for the root element */
|
|
94
|
+
id?: string;
|
|
95
|
+
/** Class name(s) for the root element */
|
|
96
|
+
class?: string,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The content that is displayed for a Popover when it is open, displayed at the
|
|
101
|
+
* position that the user right-clicked.
|
|
102
|
+
*/
|
|
103
|
+
declare function PopoverContentContextual(
|
|
104
|
+
$parent: ParentNode,
|
|
105
|
+
$anchor: Node | null,
|
|
106
|
+
$props: PopoverContentContextualProps,
|
|
107
|
+
$context?: Record<PropertyKey, any>,
|
|
108
|
+
$slots?: Record<string, SlotRender>,
|
|
109
|
+
): void;
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
interface PopoverOverlayProps {
|
|
114
|
+
/** An ID for the root element */
|
|
115
|
+
id?: string;
|
|
116
|
+
/** Class name(s) for the root element */
|
|
117
|
+
class?: string,
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The background overlay for a Popover. Adding an overlay automatically sets the Popover to modal.
|
|
122
|
+
*/
|
|
123
|
+
declare function PopoverOverlay(
|
|
124
|
+
$parent: ParentNode,
|
|
125
|
+
$anchor: Node | null,
|
|
126
|
+
$props: PopoverOverlayProps,
|
|
127
|
+
$context?: Record<PropertyKey, any>,
|
|
128
|
+
$slots?: Record<string, SlotRender>,
|
|
129
|
+
): void;
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
interface PopoverTriggerProps {
|
|
134
|
+
/** An ID for the root element */
|
|
135
|
+
id?: string;
|
|
136
|
+
/** Class name(s) for the root element */
|
|
137
|
+
class?: string,
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The button that causes a Popover to appear or disappear.
|
|
142
|
+
*/
|
|
143
|
+
declare function PopoverTrigger(
|
|
144
|
+
$parent: ParentNode,
|
|
145
|
+
$anchor: Node | null,
|
|
146
|
+
$props: PopoverTriggerProps,
|
|
147
|
+
$context?: Record<PropertyKey, any>,
|
|
148
|
+
$slots?: Record<string, SlotRender>,
|
|
149
|
+
): void;
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
interface PopoverTriggerContextualProps {
|
|
154
|
+
/** An ID for the root element */
|
|
155
|
+
id?: string;
|
|
156
|
+
/** Class name(s) for the root element */
|
|
157
|
+
class?: string,
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The element that causes a Popover to appear or disappear when right-clicked.
|
|
162
|
+
*/
|
|
163
|
+
declare function PopoverTriggerContextual(
|
|
164
|
+
$parent: ParentNode,
|
|
165
|
+
$anchor: Node | null,
|
|
166
|
+
$props: PopoverTriggerContextualProps,
|
|
167
|
+
$context?: Record<PropertyKey, any>,
|
|
168
|
+
$slots?: Record<string, SlotRender>,
|
|
169
|
+
): void;
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
interface PopoverTriggerHoverProps {
|
|
174
|
+
/** An ID for the root element */
|
|
175
|
+
id?: string;
|
|
176
|
+
/** Class name(s) for the root element */
|
|
177
|
+
class?: string,
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* The div that causes a Popover to appear or disappear when hovered.
|
|
182
|
+
*/
|
|
183
|
+
declare function PopoverTriggerHover(
|
|
184
|
+
$parent: ParentNode,
|
|
185
|
+
$anchor: Node | null,
|
|
186
|
+
$props: PopoverTriggerHoverProps,
|
|
187
|
+
$context?: Record<PropertyKey, any>,
|
|
188
|
+
$slots?: Record<string, SlotRender>,
|
|
189
|
+
): void;
|
|
190
|
+
|
|
191
|
+
export { Popover, PopoverContent, PopoverContentAnchored, PopoverContentContextual, PopoverOverlay, PopoverTrigger, PopoverTriggerContextual, PopoverTriggerHover };
|
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
import getId from "../utils/getId";
|
|
2
2
|
import { TabGroupContextName, type TabGroupContext } from "./TabGroupTypes";
|
|
3
3
|
|
|
4
|
+
interface TabContentProps {
|
|
5
|
+
/** An ID for the root element */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Class name(s) for the root element */
|
|
8
|
+
class?: string,
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
/**
|
|
5
12
|
* Content for a TabGroup, which can be revealed or hidden by an associated TabTrigger.
|
|
6
|
-
*
|
|
7
|
-
* @prop {string} [id] -- An ID for the TabContent's div container
|
|
8
13
|
*/
|
|
9
|
-
export default function TabContent($props:
|
|
14
|
+
export default function TabContent($props: TabContentProps) {
|
|
15
|
+
$props ??= $watch({});
|
|
10
16
|
$props.id ||= getId();
|
|
11
17
|
|
|
12
18
|
const context = $context[TabGroupContextName] as TabGroupContext;
|
|
13
19
|
if (!context) {
|
|
14
20
|
throw new Error("TabContent must be contained within a TabGroup");
|
|
15
21
|
}
|
|
16
|
-
let $state =
|
|
22
|
+
let $state = context.registerItem($props.index, $props.value);
|
|
17
23
|
|
|
18
24
|
// Set the content ID so that it can be used with aria-controls in TabTrigger
|
|
19
25
|
$state.contentId = $props.id;
|
|
20
26
|
|
|
21
27
|
@render {
|
|
22
28
|
<div
|
|
23
|
-
|
|
29
|
+
{$props.id}
|
|
24
30
|
class={`torp-tab-content ${$props.class ?? ""}`.trim()}
|
|
25
31
|
role="tabpanel"
|
|
26
32
|
aria-labelledby={$state.headerId}
|
|
27
33
|
data-orientation={$props.orientation}
|
|
28
34
|
data-state={$state.dataState}
|
|
29
|
-
data-disabled={$state.
|
|
35
|
+
data-disabled={$state.disabled ? "true" : undefined}
|
|
30
36
|
>
|
|
31
37
|
@if ($state.active) {
|
|
32
|
-
|
|
38
|
+
<slot />
|
|
33
39
|
}
|
|
34
40
|
</div>
|
|
35
41
|
}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { TabGroupContextName, type TabGroupContext, type ItemState } from "./TabGroupTypes";
|
|
2
2
|
|
|
3
|
+
interface TabGroupProps {
|
|
4
|
+
/** An ID for the root element */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Class name(s) for the root element */
|
|
7
|
+
class?: string,
|
|
8
|
+
/** The orientation of the tab buttons, which affects keyboard navigation */
|
|
9
|
+
orientation?: "horizontal" | "vertical",
|
|
10
|
+
/** How tabs are activated; if automatic they are shown on focus, if manual they must be clicked */
|
|
11
|
+
activation?: "automatic" | "manual",
|
|
12
|
+
/** The value of the active TabContent */
|
|
13
|
+
value?: string | string[],
|
|
14
|
+
/** If set to true, the user cannot interact with any items in the TabGroup */
|
|
15
|
+
disabled?: boolean,
|
|
16
|
+
/** Raised when the active item has changed */
|
|
17
|
+
onchange?: (value: string | string[]) => void
|
|
18
|
+
}
|
|
19
|
+
|
|
3
20
|
/**
|
|
4
21
|
* A list of interactive headings coupled with layered sections of content that
|
|
5
22
|
* enable users to reveal a single section of content at a time.
|
|
@@ -18,14 +35,9 @@ import { TabGroupContextName, type TabGroupContext, type ItemState } from "./Tab
|
|
|
18
35
|
* <TabContent />
|
|
19
36
|
* </TabGroup>
|
|
20
37
|
* ```
|
|
21
|
-
*
|
|
22
|
-
* @prop {"horizontal" | "vertical"} orientation -- The orientation of the tab buttons, which affects keyboard navigation
|
|
23
|
-
* @prop {"automatic" | "manual"} activation -- How tabs are activated; if automatic they are shown on focus, if manual they must be clicked
|
|
24
|
-
* @prop {string | string[]} value -- The value of the active TabContent
|
|
25
|
-
* @prop {boolean} disabled -- If set to true, the user cannot interact with any items in the TabGroup
|
|
26
|
-
* @prop {(value: string | string[]) => void} [onchange] -- Raised when the active item has changed
|
|
27
38
|
*/
|
|
28
|
-
export default function TabGroup($props:
|
|
39
|
+
export default function TabGroup($props: TabGroupProps) {
|
|
40
|
+
$props ??= $watch({});
|
|
29
41
|
$props.orientation ||= "horizontal";
|
|
30
42
|
$props.activation ||= "automatic";
|
|
31
43
|
$props.value ||= "";
|
|
@@ -63,7 +75,7 @@ export default function TabGroup($props: any) {
|
|
|
63
75
|
});
|
|
64
76
|
|
|
65
77
|
$run(() => {
|
|
66
|
-
itemStates.forEach((s) => s.parentDisabled = $props.disabled);
|
|
78
|
+
itemStates.forEach((s) => s.parentDisabled = $props.disabled === true);
|
|
67
79
|
});
|
|
68
80
|
|
|
69
81
|
// Dispatch the change event when the value changes
|
|
@@ -74,7 +86,7 @@ export default function TabGroup($props: any) {
|
|
|
74
86
|
if (firstChange) {
|
|
75
87
|
firstChange = false;
|
|
76
88
|
} else if (ev) {
|
|
77
|
-
ev(value);
|
|
89
|
+
ev(value!);
|
|
78
90
|
}
|
|
79
91
|
});
|
|
80
92
|
|
|
@@ -218,11 +230,11 @@ export default function TabGroup($props: any) {
|
|
|
218
230
|
|
|
219
231
|
@render {
|
|
220
232
|
<div
|
|
221
|
-
|
|
233
|
+
{$props.id}
|
|
222
234
|
class={`torp-tab-group ${$props.class ?? ""}`.trim()}
|
|
223
235
|
data-orientation={$props.orientation}
|
|
224
236
|
>
|
|
225
|
-
|
|
237
|
+
<slot />
|
|
226
238
|
</div>
|
|
227
239
|
}
|
|
228
240
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { TabGroupContextName, TabItemContextName, type TabGroupContext, type TabItemContext } from "./TabGroupTypes";
|
|
2
2
|
|
|
3
|
+
interface TabHeaderProps {
|
|
4
|
+
/** An ID for the root element */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Class name(s) for the root element */
|
|
7
|
+
class?: string,
|
|
8
|
+
/** The type of HTML header to use */
|
|
9
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
/**
|
|
4
13
|
* The header for a tab item, which contains the TabTrigger.
|
|
5
14
|
*
|
|
@@ -10,15 +19,15 @@ import { TabGroupContextName, TabItemContextName, type TabGroupContext, type Tab
|
|
|
10
19
|
* <TabTrigger />
|
|
11
20
|
* </TabHeader>
|
|
12
21
|
* ```
|
|
13
|
-
*
|
|
14
|
-
* @prop {"h1" | "h2" | "h3" | "h4" | "h5" | "h6"} as -- The type of HTML header to use
|
|
15
22
|
*/
|
|
16
|
-
export default function TabHeader($props:
|
|
23
|
+
export default function TabHeader($props: TabHeaderProps) {
|
|
24
|
+
$props ??= $watch({});
|
|
25
|
+
|
|
17
26
|
const context = $context[TabGroupContextName] as TabGroupContext;
|
|
18
27
|
if (!context) {
|
|
19
28
|
throw new Error("TabHeader must be contained within a TabGroup");
|
|
20
29
|
}
|
|
21
|
-
let $state =
|
|
30
|
+
let $state = context.registerHeader($props.index, $props.value);
|
|
22
31
|
|
|
23
32
|
const itemContext: TabItemContext = {
|
|
24
33
|
triggerItem: context.triggerItem,
|
|
@@ -37,16 +46,16 @@ export default function TabHeader($props: any) {
|
|
|
37
46
|
@render {
|
|
38
47
|
@// TODO: $props.as
|
|
39
48
|
<h4
|
|
40
|
-
|
|
49
|
+
{$props.id}
|
|
41
50
|
class={[
|
|
42
51
|
"torp-tab-header",
|
|
43
52
|
$props.class,
|
|
44
53
|
$state.orientation
|
|
45
54
|
]}
|
|
46
55
|
data-state={$state.dataState}
|
|
47
|
-
data-disabled={$state.
|
|
56
|
+
data-disabled={$state.disabled ? "true" : undefined}
|
|
48
57
|
>
|
|
49
|
-
|
|
58
|
+
<slot />
|
|
50
59
|
</h4>
|
|
51
60
|
}
|
|
52
61
|
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { TabGroupContextName,
|
|
1
|
+
import { TabGroupContextName, type TabGroupContext } from "./TabGroupTypes";
|
|
2
|
+
|
|
3
|
+
interface TabListProps {
|
|
4
|
+
/** An ID for the root element */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Class name(s) for the root element */
|
|
7
|
+
class?: string,
|
|
8
|
+
/** An ARIA label for describing the tab list to screen readers */
|
|
9
|
+
ariaLabel?: string,
|
|
10
|
+
}
|
|
2
11
|
|
|
3
12
|
/**
|
|
4
13
|
* A component that holds the TabHeaders of a TabGroup.
|
|
@@ -12,10 +21,10 @@ import { TabGroupContextName, TabItemContextName, type TabGroupContext, type Tab
|
|
|
12
21
|
* </TabHeader>
|
|
13
22
|
* </TabList>
|
|
14
23
|
* ```
|
|
15
|
-
*
|
|
16
|
-
* @prop {string} ariaLabel -- An ARIA label for describing the tab list to screen readers
|
|
17
24
|
*/
|
|
18
|
-
export default function TabList($props:
|
|
25
|
+
export default function TabList($props: TabListProps) {
|
|
26
|
+
$props ??= $watch({});
|
|
27
|
+
|
|
19
28
|
// Get stuff out of the TabGroupContext
|
|
20
29
|
const context = $context[TabGroupContextName] as TabGroupContext;
|
|
21
30
|
if (!context) {
|
|
@@ -35,7 +44,7 @@ export default function TabList($props: any) {
|
|
|
35
44
|
|
|
36
45
|
@render {
|
|
37
46
|
<div
|
|
38
|
-
|
|
47
|
+
{$props.id}
|
|
39
48
|
class={`torp-tab-list ${$props.class ?? ""}`.trim()}
|
|
40
49
|
role="tablist"
|
|
41
50
|
aria-label={$props.ariaLabel}
|
|
@@ -44,7 +53,7 @@ export default function TabList($props: any) {
|
|
|
44
53
|
tabindex="0"
|
|
45
54
|
onfocus={handleFocus}
|
|
46
55
|
>
|
|
47
|
-
|
|
56
|
+
<slot />
|
|
48
57
|
</div>
|
|
49
58
|
}
|
|
50
59
|
}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import getId from "../utils/getId";
|
|
2
2
|
import { TabItemContextName, type TabItemContext } from "./TabGroupTypes";
|
|
3
3
|
|
|
4
|
+
interface TabTriggerProps {
|
|
5
|
+
/** An ID for the root element */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Class name(s) for the root element */
|
|
8
|
+
class?: string,
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
/**
|
|
5
12
|
* A header button for a tab item, which can be used to reveal an associated TabContent.
|
|
6
13
|
*/
|
|
7
|
-
export default function TabTrigger() {
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
export default function TabTrigger($props: TabTriggerProps) {
|
|
15
|
+
$props ??= $watch({});
|
|
10
16
|
$props.id ||= getId();
|
|
11
17
|
|
|
18
|
+
let button: HTMLButtonElement;
|
|
19
|
+
|
|
12
20
|
// Get stuff out of the TabItemContext
|
|
13
21
|
const context = $context[TabItemContextName] as TabItemContext;
|
|
14
22
|
if (!context) {
|
|
15
23
|
throw new Error("TabTrigger must be contained within a TabHeader");
|
|
16
24
|
}
|
|
17
|
-
let $state =
|
|
25
|
+
let $state = context.state;
|
|
18
26
|
|
|
19
27
|
// Set the header ID so that it can be used with aria-labelledby in TabContent
|
|
20
28
|
$state.headerId = $props.id;
|
|
@@ -44,7 +52,7 @@ export default function TabTrigger() {
|
|
|
44
52
|
@render {
|
|
45
53
|
<button
|
|
46
54
|
type="button"
|
|
47
|
-
|
|
55
|
+
{$props.id}
|
|
48
56
|
class={`torp-tab-trigger ${$props.class ?? ""}`.trim()}
|
|
49
57
|
role="tab"
|
|
50
58
|
tabindex="-1"
|
|
@@ -59,7 +67,7 @@ export default function TabTrigger() {
|
|
|
59
67
|
onclick={handleClick}
|
|
60
68
|
onkeydown={handleKey}
|
|
61
69
|
>
|
|
62
|
-
|
|
70
|
+
<slot />
|
|
63
71
|
</button>
|
|
64
72
|
}
|
|
65
73
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type SlotRender } from "@torpor/view";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
interface TabContentProps {
|
|
5
|
+
/** An ID for the root element */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Class name(s) for the root element */
|
|
8
|
+
class?: string,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Content for a TabGroup, which can be revealed or hidden by an associated TabTrigger.
|
|
13
|
+
*/
|
|
14
|
+
declare function TabContent(
|
|
15
|
+
$parent: ParentNode,
|
|
16
|
+
$anchor: Node | null,
|
|
17
|
+
$props: TabContentProps,
|
|
18
|
+
$context?: Record<PropertyKey, any>,
|
|
19
|
+
$slots?: Record<string, SlotRender>,
|
|
20
|
+
): void;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
interface TabGroupProps {
|
|
25
|
+
/** An ID for the root element */
|
|
26
|
+
id?: string;
|
|
27
|
+
/** Class name(s) for the root element */
|
|
28
|
+
class?: string,
|
|
29
|
+
/** The orientation of the tab buttons, which affects keyboard navigation */
|
|
30
|
+
orientation?: "horizontal" | "vertical",
|
|
31
|
+
/** How tabs are activated; if automatic they are shown on focus, if manual they must be clicked */
|
|
32
|
+
activation?: "automatic" | "manual",
|
|
33
|
+
/** The value of the active TabContent */
|
|
34
|
+
value?: string | string[],
|
|
35
|
+
/** If set to true, the user cannot interact with any items in the TabGroup */
|
|
36
|
+
disabled?: boolean,
|
|
37
|
+
/** Raised when the active item has changed */
|
|
38
|
+
onchange?: (value: string | string[]) => void
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A list of interactive headings coupled with layered sections of content that
|
|
43
|
+
* enable users to reveal a single section of content at a time.
|
|
44
|
+
*
|
|
45
|
+
* See [the WAI ARIA guidelines for Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).
|
|
46
|
+
*
|
|
47
|
+
* The structure of a TabGroup is:
|
|
48
|
+
*
|
|
49
|
+
* ```
|
|
50
|
+
* <TabGroup>
|
|
51
|
+
* <TabList>
|
|
52
|
+
* <TabHeader>
|
|
53
|
+
* <TabTrigger />
|
|
54
|
+
* </TabHeader>
|
|
55
|
+
* </TabList>
|
|
56
|
+
* <TabContent />
|
|
57
|
+
* </TabGroup>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
declare function TabGroup(
|
|
61
|
+
$parent: ParentNode,
|
|
62
|
+
$anchor: Node | null,
|
|
63
|
+
$props: TabGroupProps,
|
|
64
|
+
$context?: Record<PropertyKey, any>,
|
|
65
|
+
$slots?: Record<string, SlotRender>,
|
|
66
|
+
): void;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
interface TabHeaderProps {
|
|
71
|
+
/** An ID for the root element */
|
|
72
|
+
id?: string;
|
|
73
|
+
/** Class name(s) for the root element */
|
|
74
|
+
class?: string,
|
|
75
|
+
/** The type of HTML header to use */
|
|
76
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The header for a tab item, which contains the TabTrigger.
|
|
81
|
+
*
|
|
82
|
+
* The structure of a TabHeader is:
|
|
83
|
+
*
|
|
84
|
+
* ```
|
|
85
|
+
* <TabHeader>
|
|
86
|
+
* <TabTrigger />
|
|
87
|
+
* </TabHeader>
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
declare function TabHeader(
|
|
91
|
+
$parent: ParentNode,
|
|
92
|
+
$anchor: Node | null,
|
|
93
|
+
$props: TabHeaderProps,
|
|
94
|
+
$context?: Record<PropertyKey, any>,
|
|
95
|
+
$slots?: Record<string, SlotRender>,
|
|
96
|
+
): void;
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
interface TabListProps {
|
|
101
|
+
/** An ID for the root element */
|
|
102
|
+
id?: string;
|
|
103
|
+
/** Class name(s) for the root element */
|
|
104
|
+
class?: string,
|
|
105
|
+
/** An ARIA label for describing the tab list to screen readers */
|
|
106
|
+
ariaLabel?: string,
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* A component that holds the TabHeaders of a TabGroup.
|
|
111
|
+
*
|
|
112
|
+
* The structure of a TabList is:
|
|
113
|
+
*
|
|
114
|
+
* ```
|
|
115
|
+
* <TabList>
|
|
116
|
+
* <TabHeader>
|
|
117
|
+
* <TabTrigger />
|
|
118
|
+
* </TabHeader>
|
|
119
|
+
* </TabList>
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
declare function TabList(
|
|
123
|
+
$parent: ParentNode,
|
|
124
|
+
$anchor: Node | null,
|
|
125
|
+
$props: TabListProps,
|
|
126
|
+
$context?: Record<PropertyKey, any>,
|
|
127
|
+
$slots?: Record<string, SlotRender>,
|
|
128
|
+
): void;
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
interface TabTriggerProps {
|
|
133
|
+
/** An ID for the root element */
|
|
134
|
+
id?: string;
|
|
135
|
+
/** Class name(s) for the root element */
|
|
136
|
+
class?: string,
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* A header button for a tab item, which can be used to reveal an associated TabContent.
|
|
141
|
+
*/
|
|
142
|
+
declare function TabTrigger(
|
|
143
|
+
$parent: ParentNode,
|
|
144
|
+
$anchor: Node | null,
|
|
145
|
+
$props: TabTriggerProps,
|
|
146
|
+
$context?: Record<PropertyKey, any>,
|
|
147
|
+
$slots?: Record<string, SlotRender>,
|
|
148
|
+
): void;
|
|
149
|
+
|
|
150
|
+
export { TabContent, TabGroup, TabHeader, TabList, TabTrigger };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function ArrowDown($props: any) {
|
|
2
|
+
@render {
|
|
3
|
+
<svg
|
|
4
|
+
{$props?.id}
|
|
5
|
+
class={`torp-icon ${$props?.class ?? ""}`.trim()}
|
|
6
|
+
viewBox="0 0 100 100"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
stroke-width="12"
|
|
9
|
+
>
|
|
10
|
+
<g>
|
|
11
|
+
<polygon points="25,40 50,70 75,40" />
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function ArrowLeft($props: any) {
|
|
2
|
+
@render {
|
|
3
|
+
<svg
|
|
4
|
+
{$props?.id}
|
|
5
|
+
class={`torp-icon ${$props?.class ?? ""}`.trim()}
|
|
6
|
+
viewBox="0 0 100 100"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
stroke-width="12"
|
|
9
|
+
>
|
|
10
|
+
<g>
|
|
11
|
+
<polygon points="60,25 30,50 60,75" />
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function ArrowRight($props: any) {
|
|
2
|
+
@render {
|
|
3
|
+
<svg
|
|
4
|
+
{$props?.id}
|
|
5
|
+
class={`torp-icon ${$props?.class ?? ""}`.trim()}
|
|
6
|
+
viewBox="0 0 100 100"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
stroke-width="12"
|
|
9
|
+
>
|
|
10
|
+
<g>
|
|
11
|
+
<polygon points="40,25 70,50 40,75" />
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default function ArrowUp($props: any) {
|
|
2
|
+
@render {
|
|
3
|
+
<svg
|
|
4
|
+
{$props?.id}
|
|
5
|
+
class={`torp-icon ${$props?.class ?? ""}`.trim()}
|
|
6
|
+
viewBox="0 0 100 100"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
stroke-width="12"
|
|
9
|
+
>
|
|
10
|
+
<g>
|
|
11
|
+
<polygon points="25,60 50,30 75,60" />
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default function Bars($props: any) {
|
|
2
|
+
@render {
|
|
3
|
+
<svg
|
|
4
|
+
{$props?.id}
|
|
5
|
+
class={`torp-icon ${$props?.class ?? ""}`.trim()}
|
|
6
|
+
viewBox="0 0 100 100"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
stroke-width="12"
|
|
9
|
+
>
|
|
10
|
+
<g>
|
|
11
|
+
<path d="M10,25 L90,25" />
|
|
12
|
+
<path d="M10,50 L90,50" />
|
|
13
|
+
<path d="M10,75 L90,75" />
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
|
16
|
+
}
|
|
17
|
+
}
|