@torpor/ui 0.3.3 → 0.3.4
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 +8 -0
- package/dist/Accordion/Accordion.torp +7 -3
- package/dist/Accordion/AccordionContent.torp +7 -3
- package/dist/Accordion/AccordionHeader.torp +7 -3
- package/dist/Accordion/AccordionItem.torp +7 -3
- package/dist/Accordion/AccordionTrigger.torp +7 -3
- package/dist/Accordion/index.d.ts +20 -10
- package/dist/Breadcrumb/Breadcrumb.torp +7 -3
- package/dist/Breadcrumb/BreadcrumbItem.torp +7 -3
- package/dist/Breadcrumb/BreadcrumbSeparator.torp +7 -3
- package/dist/Breadcrumb/index.d.ts +12 -6
- package/dist/Calendar/Calendar.torp +9 -4
- package/dist/Calendar/CalendarDay.torp +5 -2
- package/dist/Calendar/index.d.ts +8 -4
- package/dist/Contextual/Contextual.torp +7 -3
- package/dist/Contextual/ContextualContent.torp +7 -4
- package/dist/Contextual/ContextualTrigger.torp +7 -3
- package/dist/Contextual/index.d.ts +12 -6
- package/dist/Dialog/Dialog.torp +7 -3
- package/dist/Dialog/DialogBody.torp +7 -3
- package/dist/Dialog/DialogButton.torp +7 -3
- package/dist/Dialog/DialogFooter.torp +7 -3
- package/dist/Dialog/DialogHeader.torp +7 -3
- package/dist/Dialog/index.d.ts +20 -10
- package/dist/Disclosure/Disclosure.torp +7 -3
- package/dist/Disclosure/DisclosureContent.torp +7 -3
- package/dist/Disclosure/DisclosureHeader.torp +7 -3
- package/dist/Disclosure/DisclosureTrigger.torp +7 -3
- package/dist/Disclosure/index.d.ts +16 -8
- package/dist/Drawer/Drawer.torp +7 -3
- package/dist/Drawer/DrawerContent.torp +7 -4
- package/dist/Drawer/DrawerOverlay.torp +7 -3
- package/dist/Drawer/DrawerTrigger.torp +7 -3
- package/dist/Drawer/index.d.ts +16 -8
- package/dist/Form/CheckBox.torp +5 -2
- package/dist/Form/Field.torp +7 -3
- package/dist/Form/File.torp +7 -3
- package/dist/Form/Form.torp +7 -3
- package/dist/Form/Input.torp +7 -3
- package/dist/Form/Label.torp +7 -3
- package/dist/Form/Message.torp +7 -3
- package/dist/Form/Option.torp +8 -4
- package/dist/Form/Select.torp +7 -3
- package/dist/Form/TextArea.torp +7 -3
- package/dist/Form/index.d.ts +40 -20
- package/dist/Menu/Menu.torp +7 -3
- package/dist/Menu/MenuButton.torp +7 -3
- package/dist/Menu/MenuCheck.torp +7 -3
- package/dist/Menu/MenuGroup.torp +7 -3
- package/dist/Menu/MenuIndicator.torp +7 -3
- package/dist/Menu/MenuPopout.torp +7 -3
- package/dist/Menu/MenuPopoutContent.torp +7 -4
- package/dist/Menu/MenuPopoutTrigger.torp +7 -3
- package/dist/Menu/MenuRadio.torp +7 -3
- package/dist/Menu/MenuRadioGroup.torp +7 -3
- package/dist/Menu/MenuSeparator.torp +7 -3
- package/dist/Menu/index.d.ts +44 -22
- package/dist/MenuBar/MenuBar.torp +7 -3
- package/dist/MenuBar/MenuBarItem.torp +7 -3
- package/dist/MenuBar/MenuBarItemContent.torp +7 -3
- package/dist/MenuBar/MenuBarItemTrigger.torp +7 -3
- package/dist/MenuBar/index.d.ts +16 -8
- package/dist/Modal/Modal.torp +7 -3
- package/dist/Modal/ModalContent.torp +7 -3
- package/dist/Modal/ModalOverlay.torp +7 -3
- package/dist/Modal/ModalTrigger.torp +7 -3
- package/dist/Modal/index.d.ts +16 -8
- package/dist/NavMenu/NavMenu.torp +7 -3
- package/dist/NavMenu/NavMenuButton.torp +7 -3
- package/dist/NavMenu/NavMenuElement.torp +7 -3
- package/dist/NavMenu/NavMenuGroup.torp +7 -3
- package/dist/NavMenu/NavMenuGroupHeader.torp +7 -3
- package/dist/NavMenu/NavMenuLink.torp +7 -4
- package/dist/NavMenu/NavMenuPopout.torp +7 -3
- package/dist/NavMenu/NavMenuPopoutButton.torp +7 -3
- package/dist/NavMenu/NavMenuPopoutContent.torp +7 -4
- package/dist/NavMenu/NavMenuSeparator.torp +5 -2
- package/dist/NavMenu/index.d.ts +40 -20
- package/dist/Notification/Notification.torp +7 -3
- package/dist/Notification/NotificationClose.torp +7 -3
- package/dist/Notification/NotificationContainer.torp +7 -3
- package/dist/Notification/NotificationContent.torp +7 -3
- package/dist/Notification/index.d.ts +16 -8
- package/dist/Popover/Popover.torp +7 -3
- package/dist/Popover/PopoverContent.torp +7 -3
- package/dist/Popover/PopoverTrigger.torp +7 -3
- package/dist/Popover/index.d.ts +8 -4
- package/dist/TabGroup/TabContent.torp +7 -3
- package/dist/TabGroup/TabGroup.torp +7 -3
- package/dist/TabGroup/TabHeader.torp +5 -2
- package/dist/TabGroup/TabList.torp +7 -3
- package/dist/TabGroup/TabTrigger.torp +7 -3
- package/dist/TabGroup/index.d.ts +20 -10
- package/dist/icons/ArrowDown.torp +2 -1
- package/dist/icons/ArrowLeft.torp +2 -1
- package/dist/icons/ArrowRight.torp +2 -1
- package/dist/icons/ArrowUp.torp +2 -1
- package/dist/icons/Bars.torp +2 -1
- package/dist/icons/Check.torp +2 -1
- package/dist/icons/ChevronDown.torp +2 -1
- package/dist/icons/ChevronLeft.torp +2 -1
- package/dist/icons/ChevronRight.torp +2 -1
- package/dist/icons/ChevronUp.torp +2 -1
- package/dist/icons/Cross.torp +2 -1
- package/dist/icons/IconTypes.ts +6 -2
- package/dist/icons/Loading.torp +2 -1
- package/dist/icons/Minus.torp +2 -1
- package/dist/icons/Plus.torp +2 -1
- package/dist/icons/index.d.ts +28 -14
- package/dist/metafile-esm.json +1 -1
- package/package.json +2 -2
- package/src/Accordion/Accordion.torp +7 -3
- package/src/Accordion/AccordionContent.torp +7 -3
- package/src/Accordion/AccordionHeader.torp +7 -3
- package/src/Accordion/AccordionItem.torp +7 -3
- package/src/Accordion/AccordionTrigger.torp +7 -3
- package/src/Breadcrumb/Breadcrumb.torp +7 -3
- package/src/Breadcrumb/BreadcrumbItem.torp +7 -3
- package/src/Breadcrumb/BreadcrumbSeparator.torp +7 -3
- package/src/Calendar/Calendar.torp +9 -4
- package/src/Calendar/CalendarDay.torp +5 -2
- package/src/Contextual/Contextual.torp +7 -3
- package/src/Contextual/ContextualContent.torp +7 -4
- package/src/Contextual/ContextualTrigger.torp +7 -3
- package/src/Dialog/Dialog.torp +7 -3
- package/src/Dialog/DialogBody.torp +7 -3
- package/src/Dialog/DialogButton.torp +7 -3
- package/src/Dialog/DialogFooter.torp +7 -3
- package/src/Dialog/DialogHeader.torp +7 -3
- package/src/Disclosure/Disclosure.torp +7 -3
- package/src/Disclosure/DisclosureContent.torp +7 -3
- package/src/Disclosure/DisclosureHeader.torp +7 -3
- package/src/Disclosure/DisclosureTrigger.torp +7 -3
- package/src/Drawer/Drawer.torp +7 -3
- package/src/Drawer/DrawerContent.torp +7 -4
- package/src/Drawer/DrawerOverlay.torp +7 -3
- package/src/Drawer/DrawerTrigger.torp +7 -3
- package/src/Form/CheckBox.torp +5 -2
- package/src/Form/Field.torp +7 -3
- package/src/Form/File.torp +7 -3
- package/src/Form/Form.torp +7 -3
- package/src/Form/Input.torp +7 -3
- package/src/Form/Label.torp +7 -3
- package/src/Form/Message.torp +7 -3
- package/src/Form/Option.torp +8 -4
- package/src/Form/Select.torp +7 -3
- package/src/Form/TextArea.torp +7 -3
- package/src/Menu/Menu.torp +7 -3
- package/src/Menu/MenuButton.torp +7 -3
- package/src/Menu/MenuCheck.torp +7 -3
- package/src/Menu/MenuGroup.torp +7 -3
- package/src/Menu/MenuIndicator.torp +7 -3
- package/src/Menu/MenuPopout.torp +7 -3
- package/src/Menu/MenuPopoutContent.torp +7 -4
- package/src/Menu/MenuPopoutTrigger.torp +7 -3
- package/src/Menu/MenuRadio.torp +7 -3
- package/src/Menu/MenuRadioGroup.torp +7 -3
- package/src/Menu/MenuSeparator.torp +7 -3
- package/src/MenuBar/MenuBar.torp +7 -3
- package/src/MenuBar/MenuBarItem.torp +7 -3
- package/src/MenuBar/MenuBarItemContent.torp +7 -3
- package/src/MenuBar/MenuBarItemTrigger.torp +7 -3
- package/src/Modal/Modal.torp +7 -3
- package/src/Modal/ModalContent.torp +7 -3
- package/src/Modal/ModalOverlay.torp +7 -3
- package/src/Modal/ModalTrigger.torp +7 -3
- package/src/NavMenu/NavMenu.torp +7 -3
- package/src/NavMenu/NavMenuButton.torp +7 -3
- package/src/NavMenu/NavMenuElement.torp +7 -3
- package/src/NavMenu/NavMenuGroup.torp +7 -3
- package/src/NavMenu/NavMenuGroupHeader.torp +7 -3
- package/src/NavMenu/NavMenuLink.torp +7 -4
- package/src/NavMenu/NavMenuPopout.torp +7 -3
- package/src/NavMenu/NavMenuPopoutButton.torp +7 -3
- package/src/NavMenu/NavMenuPopoutContent.torp +7 -4
- package/src/NavMenu/NavMenuSeparator.torp +5 -2
- package/src/Notification/Notification.torp +7 -3
- package/src/Notification/NotificationClose.torp +7 -3
- package/src/Notification/NotificationContainer.torp +7 -3
- package/src/Notification/NotificationContent.torp +7 -3
- package/src/Popover/Popover.torp +7 -3
- package/src/Popover/PopoverContent.torp +7 -3
- package/src/Popover/PopoverTrigger.torp +7 -3
- package/src/Slider/Slider.torp +2 -1
- package/src/TabGroup/TabContent.torp +7 -3
- package/src/TabGroup/TabGroup.torp +7 -3
- package/src/TabGroup/TabHeader.torp +5 -2
- package/src/TabGroup/TabList.torp +7 -3
- package/src/TabGroup/TabTrigger.torp +7 -3
- package/src/icons/ArrowDown.torp +2 -1
- package/src/icons/ArrowLeft.torp +2 -1
- package/src/icons/ArrowRight.torp +2 -1
- package/src/icons/ArrowUp.torp +2 -1
- package/src/icons/Bars.torp +2 -1
- package/src/icons/Check.torp +2 -1
- package/src/icons/ChevronDown.torp +2 -1
- package/src/icons/ChevronLeft.torp +2 -1
- package/src/icons/ChevronRight.torp +2 -1
- package/src/icons/ChevronUp.torp +2 -1
- package/src/icons/Cross.torp +2 -1
- package/src/icons/IconTypes.ts +6 -2
- package/src/icons/Loading.torp +2 -1
- package/src/icons/Minus.torp +2 -1
- package/src/icons/Plus.torp +2 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { NotificationContextName, type NotificationContext } from "./NotificationTypes";
|
|
2
3
|
|
|
3
4
|
interface NotificationProps {
|
|
4
5
|
/** An ID for the root element */
|
|
5
6
|
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
8
11
|
/** Whether the notification is visible */
|
|
9
12
|
visible?: boolean,
|
|
10
13
|
/** The duration, in milliseconds, to keep the notification visible */
|
|
@@ -57,7 +60,8 @@ export default function Notification($props: NotificationProps | undefined) {
|
|
|
57
60
|
@if ($state.visible) {
|
|
58
61
|
<div
|
|
59
62
|
{$props?.id}
|
|
60
|
-
class={
|
|
63
|
+
class={["torp-notification", $props?.class]}
|
|
64
|
+
{$props?.style}
|
|
61
65
|
role="alert"
|
|
62
66
|
>
|
|
63
67
|
<slot />
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { NotificationContextName, type NotificationContext } from "./NotificationTypes";
|
|
2
3
|
|
|
3
4
|
interface NotificationCloseProps {
|
|
4
5
|
/** An ID for the root element */
|
|
5
6
|
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
/**
|
|
@@ -25,7 +28,8 @@ export default function NotificationClose($props: NotificationCloseProps | undef
|
|
|
25
28
|
@render {
|
|
26
29
|
<button
|
|
27
30
|
{$props?.id}
|
|
28
|
-
class={
|
|
31
|
+
class={["torp-notification-close", $props?.class]}
|
|
32
|
+
{$props?.style}
|
|
29
33
|
type="button"
|
|
30
34
|
onclick={handleClick}
|
|
31
35
|
>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
|
|
2
3
|
interface NotificationContainerProps {
|
|
3
4
|
/** An ID for the root element */
|
|
4
5
|
id?: string;
|
|
5
|
-
/**
|
|
6
|
-
class?:
|
|
6
|
+
/** Classes for the root element */
|
|
7
|
+
class?: ClassValue,
|
|
8
|
+
/** Styles for the root element */
|
|
9
|
+
style?: StyleValue,
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
/**
|
|
@@ -14,7 +17,8 @@ export default function NotificationContainer($props: NotificationContainerProps
|
|
|
14
17
|
@render {
|
|
15
18
|
<div
|
|
16
19
|
{$props?.id}
|
|
17
|
-
class={
|
|
20
|
+
class={["torp-notification-container", $props?.class]}
|
|
21
|
+
{$props?.style}
|
|
18
22
|
>
|
|
19
23
|
<slot />
|
|
20
24
|
</div>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
|
|
2
3
|
interface NotificationContentProps {
|
|
3
4
|
/** An ID for the root element */
|
|
4
5
|
id?: string;
|
|
5
|
-
/**
|
|
6
|
-
class?:
|
|
6
|
+
/** Classes for the root element */
|
|
7
|
+
class?: ClassValue,
|
|
8
|
+
/** Styles for the root element */
|
|
9
|
+
style?: StyleValue,
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
/**
|
|
@@ -13,7 +16,8 @@ export default function NotificationContent($props: NotificationContentProps | u
|
|
|
13
16
|
@render {
|
|
14
17
|
<div
|
|
15
18
|
{$props?.id}
|
|
16
|
-
class={
|
|
19
|
+
class={["torp-notification-content", $props?.class]}
|
|
20
|
+
{$props?.style}
|
|
17
21
|
>
|
|
18
22
|
<slot />
|
|
19
23
|
</div>
|
|
@@ -4,8 +4,10 @@ import { type SlotRender } from "@torpor/view";
|
|
|
4
4
|
interface NotificationProps {
|
|
5
5
|
/** An ID for the root element */
|
|
6
6
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
9
11
|
/** Whether the notification is visible */
|
|
10
12
|
visible?: boolean,
|
|
11
13
|
/** The duration, in milliseconds, to keep the notification visible */
|
|
@@ -33,8 +35,10 @@ declare function Notification(
|
|
|
33
35
|
interface NotificationCloseProps {
|
|
34
36
|
/** An ID for the root element */
|
|
35
37
|
id?: string;
|
|
36
|
-
/**
|
|
37
|
-
class?:
|
|
38
|
+
/** Classes for the root element */
|
|
39
|
+
class?: ClassValue,
|
|
40
|
+
/** Styles for the root element */
|
|
41
|
+
style?: StyleValue,
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
/**
|
|
@@ -53,8 +57,10 @@ declare function NotificationClose(
|
|
|
53
57
|
interface NotificationContainerProps {
|
|
54
58
|
/** An ID for the root element */
|
|
55
59
|
id?: string;
|
|
56
|
-
/**
|
|
57
|
-
class?:
|
|
60
|
+
/** Classes for the root element */
|
|
61
|
+
class?: ClassValue,
|
|
62
|
+
/** Styles for the root element */
|
|
63
|
+
style?: StyleValue,
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
/**
|
|
@@ -74,8 +80,10 @@ declare function NotificationContainer(
|
|
|
74
80
|
interface NotificationContentProps {
|
|
75
81
|
/** An ID for the root element */
|
|
76
82
|
id?: string;
|
|
77
|
-
/**
|
|
78
|
-
class?:
|
|
83
|
+
/** Classes for the root element */
|
|
84
|
+
class?: ClassValue,
|
|
85
|
+
/** Styles for the root element */
|
|
86
|
+
style?: StyleValue,
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
/**
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { PopoverContextName, type Point, type PopoverContext, type PopoverState } from "./PopoverTypes";
|
|
2
3
|
|
|
3
4
|
interface PopoverProps {
|
|
4
5
|
/** An ID for the root element */
|
|
5
6
|
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
8
11
|
/** 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 */
|
|
9
12
|
modal?: boolean,
|
|
10
13
|
/** Whether the popover is visible */
|
|
@@ -117,7 +120,8 @@ export default function Popover($props: PopoverProps | undefined) {
|
|
|
117
120
|
@render {
|
|
118
121
|
<div
|
|
119
122
|
{$props?.id}
|
|
120
|
-
class={
|
|
123
|
+
class={["torp-popover", $props?.class]}
|
|
124
|
+
{$props?.style}
|
|
121
125
|
>
|
|
122
126
|
<slot />
|
|
123
127
|
</div>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { addDocumentEvent, removeDocumentEvent } from "../utils/documentEvents";
|
|
2
3
|
import getScrollParent from "../utils/getScrollParent";
|
|
3
4
|
import setPopoverPosition from "../utils/setPopoverPosition";
|
|
@@ -6,8 +7,10 @@ import { PopoverContextName, type PopoverContext } from "./PopoverTypes";
|
|
|
6
7
|
interface PopoverContentProps {
|
|
7
8
|
/** An ID for the root element */
|
|
8
9
|
id?: string;
|
|
9
|
-
/**
|
|
10
|
-
class?:
|
|
10
|
+
/** Classes for the root element */
|
|
11
|
+
class?: ClassValue,
|
|
12
|
+
/** Styles for the root element */
|
|
13
|
+
style?: StyleValue,
|
|
11
14
|
/** Where the popover will be shown, relative to the popover trigger */
|
|
12
15
|
side?: "top" | "right" | "bottom" | "left",
|
|
13
16
|
/** How the popover will be aligned, relative to the popover trigger */
|
|
@@ -102,7 +105,8 @@ export default function PopoverContent($props?: PopoverContentProps | undefined)
|
|
|
102
105
|
@if ($state.visible) {
|
|
103
106
|
<div
|
|
104
107
|
{$props?.id}
|
|
105
|
-
class={
|
|
108
|
+
class={["torp-popover-content", $props?.class]}
|
|
109
|
+
{$props?.style}
|
|
106
110
|
&ref={div}
|
|
107
111
|
onmount={show}
|
|
108
112
|
>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { PopoverContextName, type PopoverContext } from "./PopoverTypes";
|
|
2
3
|
import hoverTrigger from "../mount/hoverTrigger";
|
|
3
4
|
|
|
4
5
|
interface PopoverTriggerProps {
|
|
5
6
|
/** An ID for the root element */
|
|
6
7
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
class?:
|
|
8
|
+
/** Classes for the root element */
|
|
9
|
+
class?: ClassValue,
|
|
10
|
+
/** Styles for the root element */
|
|
11
|
+
style?: StyleValue,
|
|
9
12
|
/** Whether the popover is activated by click/press or by hover **/
|
|
10
13
|
activation?: "press" | "hover"
|
|
11
14
|
}
|
|
@@ -47,7 +50,8 @@ export default function PopoverTrigger($props: PopoverTriggerProps | undefined)
|
|
|
47
50
|
<button
|
|
48
51
|
type="button"
|
|
49
52
|
{$props?.id}
|
|
50
|
-
class={
|
|
53
|
+
class={["torp-popover-trigger", $props?.class]}
|
|
54
|
+
{$props?.style}
|
|
51
55
|
onclick={handleClick}
|
|
52
56
|
onmount={(el) => hoverTrigger(el, { onHover: handleHover, onExit: handleHover })}
|
|
53
57
|
&ref={context.anchorElement}
|
package/dist/Popover/index.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ import { type SlotRender } from "@torpor/view";
|
|
|
4
4
|
interface PopoverProps {
|
|
5
5
|
/** An ID for the root element */
|
|
6
6
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
9
11
|
/** 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
12
|
modal?: boolean,
|
|
11
13
|
/** Whether the popover is visible */
|
|
@@ -63,8 +65,10 @@ declare function PopoverContent(
|
|
|
63
65
|
interface PopoverTriggerProps {
|
|
64
66
|
/** An ID for the root element */
|
|
65
67
|
id?: string;
|
|
66
|
-
/**
|
|
67
|
-
class?:
|
|
68
|
+
/** Classes for the root element */
|
|
69
|
+
class?: ClassValue,
|
|
70
|
+
/** Styles for the root element */
|
|
71
|
+
style?: StyleValue,
|
|
68
72
|
/** Whether the popover is activated by click/press or by hover **/
|
|
69
73
|
activation?: "press" | "hover"
|
|
70
74
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import getId from "../utils/getId";
|
|
2
3
|
import { TabGroupContextName, type TabGroupContext } from "./TabGroupTypes";
|
|
3
4
|
|
|
4
5
|
interface TabContentProps {
|
|
5
6
|
/** An ID for the root element */
|
|
6
7
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
class?:
|
|
8
|
+
/** Classes for the root element */
|
|
9
|
+
class?: ClassValue,
|
|
10
|
+
/** Styles for the root element */
|
|
11
|
+
style?: StyleValue,
|
|
9
12
|
/** The index of this item */
|
|
10
13
|
index?: number,
|
|
11
14
|
/** The value for this item */
|
|
@@ -30,7 +33,8 @@ export default function TabContent($props: TabContentProps | undefined) {
|
|
|
30
33
|
@render {
|
|
31
34
|
<div
|
|
32
35
|
id={$props?.id ?? defaultId}
|
|
33
|
-
class={
|
|
36
|
+
class={["torp-tab-content", $props?.class]}
|
|
37
|
+
{$props?.style}
|
|
34
38
|
role="tabpanel"
|
|
35
39
|
aria-labelledby={$state.headerId}
|
|
36
40
|
data-orientation={context.orientation}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { TabGroupContextName, type TabGroupContext, type ItemState } from "./TabGroupTypes";
|
|
2
3
|
|
|
3
4
|
interface TabGroupProps {
|
|
4
5
|
/** An ID for the root element */
|
|
5
6
|
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
8
11
|
/** The orientation of the tab buttons, which affects keyboard navigation */
|
|
9
12
|
orientation?: "horizontal" | "vertical",
|
|
10
13
|
/** How tabs are activated; if automatic they are shown on focus, if manual they must be clicked */
|
|
@@ -237,7 +240,8 @@ export default function TabGroup($props: TabGroupProps | undefined) {
|
|
|
237
240
|
@render {
|
|
238
241
|
<div
|
|
239
242
|
{$props?.id}
|
|
240
|
-
class={
|
|
243
|
+
class={["torp-tab-group", $props?.class]}
|
|
244
|
+
{$props?.style}
|
|
241
245
|
data-orientation={$props?.orientation}
|
|
242
246
|
>
|
|
243
247
|
<slot />
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { TabGroupContextName, TabItemContextName, type TabGroupContext, type TabItemContext } from "./TabGroupTypes";
|
|
2
3
|
|
|
3
4
|
interface TabHeaderProps {
|
|
4
5
|
/** An ID for the root element */
|
|
5
6
|
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
8
11
|
/** The type of HTML header to use */
|
|
9
12
|
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
|
|
10
13
|
/** The index of this header's item */
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import { TabGroupContextName, type TabGroupContext } from "./TabGroupTypes";
|
|
2
3
|
|
|
3
4
|
interface TabListProps {
|
|
4
5
|
/** An ID for the root element */
|
|
5
6
|
id?: string;
|
|
6
|
-
/**
|
|
7
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
8
11
|
/** An ARIA label for describing the tab list to screen readers */
|
|
9
12
|
ariaLabel?: string,
|
|
10
13
|
}
|
|
@@ -43,7 +46,8 @@ export default function TabList($props: TabListProps | undefined) {
|
|
|
43
46
|
@render {
|
|
44
47
|
<div
|
|
45
48
|
{$props?.id}
|
|
46
|
-
class={
|
|
49
|
+
class={["torp-tab-list", $props?.class]}
|
|
50
|
+
{$props?.style}
|
|
47
51
|
role="tablist"
|
|
48
52
|
aria-label={$props?.ariaLabel}
|
|
49
53
|
aria-orientation={orientation}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
1
2
|
import getId from "../utils/getId";
|
|
2
3
|
import { TabItemContextName, type TabItemContext } from "./TabGroupTypes";
|
|
3
4
|
|
|
4
5
|
interface TabTriggerProps {
|
|
5
6
|
/** An ID for the root element */
|
|
6
7
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
class?:
|
|
8
|
+
/** Classes for the root element */
|
|
9
|
+
class?: ClassValue,
|
|
10
|
+
/** Styles for the root element */
|
|
11
|
+
style?: StyleValue,
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -52,7 +55,8 @@ export default function TabTrigger($props: TabTriggerProps | undefined) {
|
|
|
52
55
|
<button
|
|
53
56
|
type="button"
|
|
54
57
|
id={$props?.id ?? defaultId}
|
|
55
|
-
class={
|
|
58
|
+
class={["torp-tab-trigger", $props?.class]}
|
|
59
|
+
{$props?.style}
|
|
56
60
|
role="tab"
|
|
57
61
|
tabindex="-1"
|
|
58
62
|
disabled={$state.disabled || $state.parentDisabled}
|
package/dist/TabGroup/index.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ import { type SlotRender } from "@torpor/view";
|
|
|
4
4
|
interface TabContentProps {
|
|
5
5
|
/** An ID for the root element */
|
|
6
6
|
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
class?:
|
|
7
|
+
/** Classes for the root element */
|
|
8
|
+
class?: ClassValue,
|
|
9
|
+
/** Styles for the root element */
|
|
10
|
+
style?: StyleValue,
|
|
9
11
|
/** The index of this item */
|
|
10
12
|
index?: number,
|
|
11
13
|
/** The value for this item */
|
|
@@ -28,8 +30,10 @@ declare function TabContent(
|
|
|
28
30
|
interface TabGroupProps {
|
|
29
31
|
/** An ID for the root element */
|
|
30
32
|
id?: string;
|
|
31
|
-
/**
|
|
32
|
-
class?:
|
|
33
|
+
/** Classes for the root element */
|
|
34
|
+
class?: ClassValue,
|
|
35
|
+
/** Styles for the root element */
|
|
36
|
+
style?: StyleValue,
|
|
33
37
|
/** The orientation of the tab buttons, which affects keyboard navigation */
|
|
34
38
|
orientation?: "horizontal" | "vertical",
|
|
35
39
|
/** How tabs are activated; if automatic they are shown on focus, if manual they must be clicked */
|
|
@@ -74,8 +78,10 @@ declare function TabGroup(
|
|
|
74
78
|
interface TabHeaderProps {
|
|
75
79
|
/** An ID for the root element */
|
|
76
80
|
id?: string;
|
|
77
|
-
/**
|
|
78
|
-
class?:
|
|
81
|
+
/** Classes for the root element */
|
|
82
|
+
class?: ClassValue,
|
|
83
|
+
/** Styles for the root element */
|
|
84
|
+
style?: StyleValue,
|
|
79
85
|
/** The type of HTML header to use */
|
|
80
86
|
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
|
|
81
87
|
/** The index of this header's item */
|
|
@@ -108,8 +114,10 @@ declare function TabHeader(
|
|
|
108
114
|
interface TabListProps {
|
|
109
115
|
/** An ID for the root element */
|
|
110
116
|
id?: string;
|
|
111
|
-
/**
|
|
112
|
-
class?:
|
|
117
|
+
/** Classes for the root element */
|
|
118
|
+
class?: ClassValue,
|
|
119
|
+
/** Styles for the root element */
|
|
120
|
+
style?: StyleValue,
|
|
113
121
|
/** An ARIA label for describing the tab list to screen readers */
|
|
114
122
|
ariaLabel?: string,
|
|
115
123
|
}
|
|
@@ -140,8 +148,10 @@ declare function TabList(
|
|
|
140
148
|
interface TabTriggerProps {
|
|
141
149
|
/** An ID for the root element */
|
|
142
150
|
id?: string;
|
|
143
|
-
/**
|
|
144
|
-
class?:
|
|
151
|
+
/** Classes for the root element */
|
|
152
|
+
class?: ClassValue,
|
|
153
|
+
/** Styles for the root element */
|
|
154
|
+
style?: StyleValue,
|
|
145
155
|
}
|
|
146
156
|
|
|
147
157
|
/**
|
|
@@ -4,7 +4,8 @@ export default function ArrowDown($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
|
@@ -4,7 +4,8 @@ export default function ArrowLeft($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
|
@@ -4,7 +4,8 @@ export default function ArrowRight($props: IconProps | any) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
package/dist/icons/ArrowUp.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function ArrowUp($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
package/dist/icons/Bars.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function Bars($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
package/dist/icons/Check.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function Check($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
|
@@ -4,7 +4,8 @@ export default function ChevronDown($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
|
@@ -4,7 +4,8 @@ export default function ChevronLeft($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
|
@@ -4,7 +4,8 @@ export default function ChevronRight($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
|
@@ -4,7 +4,8 @@ export default function ChevronUp($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
package/dist/icons/Cross.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function Cross($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
package/dist/icons/IconTypes.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from "@torpor/view";
|
|
2
|
+
|
|
1
3
|
export interface IconProps {
|
|
2
4
|
/** An ID for the svg element */
|
|
3
5
|
id?: string;
|
|
4
|
-
/**
|
|
5
|
-
class?:
|
|
6
|
+
/** Classes for the svg element */
|
|
7
|
+
class?: ClassValue;
|
|
8
|
+
/** Styles for the root element */
|
|
9
|
+
style?: StyleValue;
|
|
6
10
|
}
|
package/dist/icons/Loading.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function Loading($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="20"
|
package/dist/icons/Minus.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function Minus($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|
package/dist/icons/Plus.torp
CHANGED
|
@@ -4,7 +4,8 @@ export default function Plus($props: IconProps | undefined) {
|
|
|
4
4
|
@render {
|
|
5
5
|
<svg
|
|
6
6
|
{$props?.id}
|
|
7
|
-
class={
|
|
7
|
+
class={["torp-icon", $props?.class]}
|
|
8
|
+
{$props?.style}
|
|
8
9
|
viewBox="0 0 100 100"
|
|
9
10
|
stroke-linejoin="round"
|
|
10
11
|
stroke-width="12"
|