@telia/teddy 0.0.25 → 0.0.27
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/dist/assets/{sprite.5636ec8e-teddy.svg → sprite.269ba410-teddy.svg} +3 -0
- package/dist/components/accordion/accordion-indicator.cjs +14 -3
- package/dist/components/accordion/accordion-indicator.js +15 -4
- package/dist/components/accordion/accordion-item.cjs +6 -1
- package/dist/components/accordion/accordion-item.d.ts +3 -0
- package/dist/components/accordion/accordion-item.js +8 -3
- package/dist/components/accordion/accordion-root.cjs +40 -13
- package/dist/components/accordion/accordion-root.d.ts +9 -5
- package/dist/components/accordion/accordion-root.js +40 -13
- package/dist/components/badge/alert-badge.cjs +19 -0
- package/dist/components/badge/alert-badge.d.ts +10 -0
- package/dist/components/badge/alert-badge.js +19 -0
- package/dist/components/badge/badge.cjs +13 -9
- package/dist/components/badge/badge.d.ts +2 -1
- package/dist/components/badge/badge.js +14 -10
- package/dist/components/badge/counter-badge.cjs +19 -0
- package/dist/components/badge/counter-badge.d.ts +10 -0
- package/dist/components/badge/counter-badge.js +19 -0
- package/dist/components/badge/index.cjs +4 -0
- package/dist/components/badge/index.d.ts +4 -0
- package/dist/components/badge/index.js +5 -1
- package/dist/components/button/button.cjs +27 -25
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +27 -25
- package/dist/components/card/card.d.ts +7 -3
- package/dist/components/chip/chip-indicator.cjs +1 -1
- package/dist/components/chip/chip-indicator.d.ts +2 -2
- package/dist/components/chip/chip-indicator.js +1 -1
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/drawer/drawer-close.cjs +2 -2
- package/dist/components/drawer/drawer-close.d.ts +0 -3
- package/dist/components/drawer/drawer-close.js +2 -2
- package/dist/components/drawer/drawer-content.cjs +3 -2
- package/dist/components/drawer/drawer-content.d.ts +3 -12
- package/dist/components/drawer/drawer-content.js +3 -2
- package/dist/components/drawer/drawer-description.cjs +1 -1
- package/dist/components/drawer/drawer-description.d.ts +0 -3
- package/dist/components/drawer/drawer-description.js +1 -1
- package/dist/components/drawer/drawer-footer.cjs +1 -1
- package/dist/components/drawer/drawer-footer.d.ts +0 -3
- package/dist/components/drawer/drawer-footer.js +1 -1
- package/dist/components/drawer/drawer-overlay.cjs +1 -1
- package/dist/components/drawer/drawer-overlay.d.ts +0 -3
- package/dist/components/drawer/drawer-overlay.js +1 -1
- package/dist/components/drawer/drawer-root.d.ts +1 -1
- package/dist/components/drawer/drawer-title.cjs +1 -1
- package/dist/components/drawer/drawer-title.d.ts +4 -3
- package/dist/components/drawer/drawer-title.js +1 -1
- package/dist/components/drawer/drawer-trigger.d.ts +5 -3
- package/dist/components/drawer/index.cjs +8 -0
- package/dist/components/drawer/index.d.ts +28 -0
- package/dist/components/drawer/index.js +8 -0
- package/dist/components/field-error-text/field-error-text.cjs +1 -1
- package/dist/components/field-error-text/field-error-text.js +1 -1
- package/dist/components/flex/flex.cjs +1 -1
- package/dist/components/flex/flex.js +1 -1
- package/dist/components/icon/icon.cjs +3 -3
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/index.cjs +7 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +7 -1
- package/dist/components/input/input-clear-button.cjs +1 -1
- package/dist/components/input/input-clear-button.js +1 -1
- package/dist/components/input/input-group.cjs +11 -11
- package/dist/components/input/input-group.js +11 -11
- package/dist/components/input/input-indicator.cjs +1 -1
- package/dist/components/input/input-indicator.js +1 -1
- package/dist/components/list/index.cjs +16 -0
- package/dist/components/list/index.d.ts +47 -0
- package/dist/components/list/index.js +16 -0
- package/dist/components/list/list-content.cjs +14 -0
- package/dist/components/list/list-content.d.ts +4 -0
- package/dist/components/list/list-content.js +14 -0
- package/dist/components/list/list-illustration.cjs +23 -0
- package/dist/components/list/list-illustration.d.ts +9 -0
- package/dist/components/list/list-illustration.js +23 -0
- package/dist/components/list/list-item.cjs +12 -0
- package/dist/components/list/list-item.d.ts +4 -0
- package/dist/components/list/list-item.js +12 -0
- package/dist/components/list/list.cjs +52 -0
- package/dist/components/list/list.d.ts +43 -0
- package/dist/components/list/list.js +52 -0
- package/dist/components/modal/modal.cjs +19 -15
- package/dist/components/modal/modal.js +19 -15
- package/dist/components/navigation-menu/navigation-menu.cjs +24 -22
- package/dist/components/navigation-menu/navigation-menu.d.ts +3 -1
- package/dist/components/navigation-menu/navigation-menu.js +24 -22
- package/dist/components/notification/notification.cjs +1 -1
- package/dist/components/notification/notification.d.ts +11 -5
- package/dist/components/notification/notification.js +1 -1
- package/dist/components/scroll-area/index.d.ts +6 -2
- package/dist/components/scroll-area/scroll-area-bar.cjs +19 -13
- package/dist/components/scroll-area/scroll-area-bar.js +19 -13
- package/dist/components/scroll-area/scroll-area-button.cjs +1 -1
- package/dist/components/scroll-area/scroll-area-button.d.ts +6 -2
- package/dist/components/scroll-area/scroll-area-button.js +1 -1
- package/dist/components/tabs/index.cjs +6 -0
- package/dist/components/tabs/index.d.ts +7 -3
- package/dist/components/tabs/index.js +6 -0
- package/dist/components/tabs/tabs-root.cjs +5 -4
- package/dist/components/tabs/tabs-root.d.ts +1 -1
- package/dist/components/tabs/tabs-root.js +5 -4
- package/dist/components/tabs/tabs-scroll-button.d.ts +6 -2
- package/dist/components/tabs/tabs-trigger.cjs +2 -1
- package/dist/components/tabs/tabs-trigger.js +2 -1
- package/dist/components/text-field/index.d.ts +6 -2
- package/dist/components/text-field/text-field-button.d.ts +6 -2
- package/dist/components/toggle/toggle.cjs +5 -5
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/toggle/toggle.js +5 -5
- package/dist/drawer.module-BZV0Appw.js +14 -0
- package/dist/drawer.module-rgUBNOkt.cjs +13 -0
- package/dist/icons/category.cjs +1 -0
- package/dist/icons/category.d.ts +3 -0
- package/dist/icons/category.js +1 -0
- package/dist/icons/name.cjs +1 -0
- package/dist/icons/name.d.ts +1 -1
- package/dist/icons/name.js +1 -0
- package/dist/main.cjs +7 -1
- package/dist/main.js +7 -1
- package/dist/style.css +568 -397
- package/dist/utils/generate-styling/grid.d.ts +24 -24
- package/dist/utils/generate-styling/index.cjs +12 -2
- package/dist/utils/generate-styling/index.d.ts +86 -19
- package/dist/utils/generate-styling/index.js +12 -2
- package/dist/utils/generate-styling/util.d.ts +2 -2
- package/package.json +1 -1
- package/dist/drawer.module-B3QhrxH1.js +0 -14
- package/dist/drawer.module-w9nGK9pO.cjs +0 -13
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Flex } from "../flex/flex.js";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
const styles = {
|
|
7
|
+
"teddy-list__illustration": "_teddy-list__illustration_7z0zv_1",
|
|
8
|
+
"teddy-list__illustration--icon": "_teddy-list__illustration--icon_7z0zv_5",
|
|
9
|
+
"teddy-list__illustration--icon-white": "_teddy-list__illustration--icon-white_7z0zv_11",
|
|
10
|
+
"teddy-list__illustration--icon-purple": "_teddy-list__illustration--icon-purple_7z0zv_14",
|
|
11
|
+
"teddy-list__illustration--icon-gray": "_teddy-list__illustration--icon-gray_7z0zv_18",
|
|
12
|
+
"teddy-list__illustration--icon-beige": "_teddy-list__illustration--icon-beige_7z0zv_21",
|
|
13
|
+
"teddy-list--vertical": "_teddy-list--vertical_7z0zv_24",
|
|
14
|
+
"teddy-list__item": "_teddy-list__item_7z0zv_24",
|
|
15
|
+
"teddy-list--horizontal": "_teddy-list--horizontal_7z0zv_27"
|
|
16
|
+
};
|
|
17
|
+
const rootClassName = "teddy-list";
|
|
18
|
+
const RootContext = React__default.createContext(void 0);
|
|
19
|
+
const Root = React__default.forwardRef(
|
|
20
|
+
({ className, asChild, children, variant, layout = "vertical", ...props }, forwardRef) => {
|
|
21
|
+
const Comp = asChild ? Slot : "ul";
|
|
22
|
+
const classes = clsx(
|
|
23
|
+
[styles[`${rootClassName}`]],
|
|
24
|
+
{
|
|
25
|
+
[styles[`${rootClassName}--${layout}`]]: layout,
|
|
26
|
+
[styles[`${rootClassName}--${variant}`]]: variant
|
|
27
|
+
},
|
|
28
|
+
className
|
|
29
|
+
);
|
|
30
|
+
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx(
|
|
31
|
+
Flex,
|
|
32
|
+
{
|
|
33
|
+
p: "0",
|
|
34
|
+
m: "0",
|
|
35
|
+
direction: layout === "vertical" ? "column" : { sm: "column", md: "row" },
|
|
36
|
+
gap: "300",
|
|
37
|
+
...props,
|
|
38
|
+
ref: forwardRef,
|
|
39
|
+
className: classes,
|
|
40
|
+
asChild: true,
|
|
41
|
+
children: /* @__PURE__ */ jsx(Comp, { children })
|
|
42
|
+
}
|
|
43
|
+
) });
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
Root.displayName = "List";
|
|
47
|
+
export {
|
|
48
|
+
Root,
|
|
49
|
+
RootContext,
|
|
50
|
+
rootClassName,
|
|
51
|
+
styles as s
|
|
52
|
+
};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const DrawerPrimitive = require("@radix-ui/react-dialog");
|
|
6
|
+
require("../list/index.cjs");
|
|
6
7
|
require("../scroll-area/index.cjs");
|
|
7
8
|
require("../tabs/index.cjs");
|
|
8
9
|
require("../drawer/index.cjs");
|
|
@@ -19,10 +20,12 @@ require("../toggle/toggle.cjs");
|
|
|
19
20
|
require("../accordion/index.cjs");
|
|
20
21
|
require("../link/link.cjs");
|
|
21
22
|
require("../badge/badge.cjs");
|
|
23
|
+
require("../badge/alert-badge.cjs");
|
|
24
|
+
require("../badge/counter-badge.cjs");
|
|
22
25
|
const components_button_button = require("../button/button.cjs");
|
|
23
26
|
require("../field-error-text/field-error-text.cjs");
|
|
24
27
|
require("../helper-text/helper-text.cjs");
|
|
25
|
-
require("../../assets/sprite.
|
|
28
|
+
require("../../assets/sprite.269ba410-teddy.svg");
|
|
26
29
|
const components_icon_icon = require("../icon/icon.cjs");
|
|
27
30
|
require("../input/index.cjs");
|
|
28
31
|
require("../label/label.cjs");
|
|
@@ -53,20 +56,21 @@ function _interopNamespaceDefault(e) {
|
|
|
53
56
|
}
|
|
54
57
|
const DrawerPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DrawerPrimitive);
|
|
55
58
|
const styles = {
|
|
56
|
-
"teddy-modal__overlay": "_teddy-
|
|
57
|
-
"teddy-modal__content": "_teddy-
|
|
58
|
-
"teddy-modal__scroll": "_teddy-
|
|
59
|
-
"teddy-modal__image": "_teddy-
|
|
60
|
-
"teddy-modal__close--floating": "_teddy-modal__close--
|
|
61
|
-
"teddy-modal__group": "_teddy-
|
|
62
|
-
"teddy-modal__group--title": "_teddy-modal__group--
|
|
63
|
-
"teddy-modal__group--scroll": "_teddy-modal__group--
|
|
64
|
-
"teddy-modal__group--action": "_teddy-modal__group--
|
|
65
|
-
"modal-overlay-no-op": "_modal-overlay-no-
|
|
66
|
-
"teddy-fade-in": "_teddy-fade-
|
|
67
|
-
"teddy-fade-out": "_teddy-fade-
|
|
68
|
-
"modal-content-show": "_modal-content-
|
|
69
|
-
"modal-content-hide": "_modal-content-
|
|
59
|
+
"teddy-modal__overlay": "_teddy-modal__overlay_3n21u_25",
|
|
60
|
+
"teddy-modal__content": "_teddy-modal__content_3n21u_37",
|
|
61
|
+
"teddy-modal__scroll": "_teddy-modal__scroll_3n21u_55",
|
|
62
|
+
"teddy-modal__image": "_teddy-modal__image_3n21u_59",
|
|
63
|
+
"teddy-modal__close--floating": "_teddy-modal__close--floating_3n21u_69",
|
|
64
|
+
"teddy-modal__group": "_teddy-modal__group_3n21u_74",
|
|
65
|
+
"teddy-modal__group--title": "_teddy-modal__group--title_3n21u_78",
|
|
66
|
+
"teddy-modal__group--scroll": "_teddy-modal__group--scroll_3n21u_84",
|
|
67
|
+
"teddy-modal__group--action": "_teddy-modal__group--action_3n21u_93",
|
|
68
|
+
"modal-overlay-no-op": "_modal-overlay-no-op_3n21u_1",
|
|
69
|
+
"teddy-fade-in": "_teddy-fade-in_3n21u_1",
|
|
70
|
+
"teddy-fade-out": "_teddy-fade-out_3n21u_1",
|
|
71
|
+
"modal-content-show": "_modal-content-show_3n21u_1",
|
|
72
|
+
"modal-content-hide": "_modal-content-hide_3n21u_1",
|
|
73
|
+
"teddy-overlay-no-op": "_teddy-overlay-no-op_3n21u_1"
|
|
70
74
|
};
|
|
71
75
|
const rootClassName = "teddy-modal";
|
|
72
76
|
const RootContext = React.createContext({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useEffect } from "react";
|
|
3
3
|
import * as DrawerPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import "../list/index.js";
|
|
4
5
|
import "../scroll-area/index.js";
|
|
5
6
|
import "../tabs/index.js";
|
|
6
7
|
import "../drawer/index.js";
|
|
@@ -17,10 +18,12 @@ import "../toggle/toggle.js";
|
|
|
17
18
|
import "../accordion/index.js";
|
|
18
19
|
import "../link/link.js";
|
|
19
20
|
import "../badge/badge.js";
|
|
21
|
+
import "../badge/alert-badge.js";
|
|
22
|
+
import "../badge/counter-badge.js";
|
|
20
23
|
import { Button } from "../button/button.js";
|
|
21
24
|
import "../field-error-text/field-error-text.js";
|
|
22
25
|
import "../helper-text/helper-text.js";
|
|
23
|
-
import "../../assets/sprite.
|
|
26
|
+
import "../../assets/sprite.269ba410-teddy.svg";
|
|
24
27
|
import { Icon } from "../icon/icon.js";
|
|
25
28
|
import "../input/index.js";
|
|
26
29
|
import "../label/label.js";
|
|
@@ -34,20 +37,21 @@ import clsx from "clsx";
|
|
|
34
37
|
import { Slot } from "@radix-ui/react-slot";
|
|
35
38
|
import { composeRefs } from "../../utils/composeRefs.js";
|
|
36
39
|
const styles = {
|
|
37
|
-
"teddy-modal__overlay": "_teddy-
|
|
38
|
-
"teddy-modal__content": "_teddy-
|
|
39
|
-
"teddy-modal__scroll": "_teddy-
|
|
40
|
-
"teddy-modal__image": "_teddy-
|
|
41
|
-
"teddy-modal__close--floating": "_teddy-modal__close--
|
|
42
|
-
"teddy-modal__group": "_teddy-
|
|
43
|
-
"teddy-modal__group--title": "_teddy-modal__group--
|
|
44
|
-
"teddy-modal__group--scroll": "_teddy-modal__group--
|
|
45
|
-
"teddy-modal__group--action": "_teddy-modal__group--
|
|
46
|
-
"modal-overlay-no-op": "_modal-overlay-no-
|
|
47
|
-
"teddy-fade-in": "_teddy-fade-
|
|
48
|
-
"teddy-fade-out": "_teddy-fade-
|
|
49
|
-
"modal-content-show": "_modal-content-
|
|
50
|
-
"modal-content-hide": "_modal-content-
|
|
40
|
+
"teddy-modal__overlay": "_teddy-modal__overlay_3n21u_25",
|
|
41
|
+
"teddy-modal__content": "_teddy-modal__content_3n21u_37",
|
|
42
|
+
"teddy-modal__scroll": "_teddy-modal__scroll_3n21u_55",
|
|
43
|
+
"teddy-modal__image": "_teddy-modal__image_3n21u_59",
|
|
44
|
+
"teddy-modal__close--floating": "_teddy-modal__close--floating_3n21u_69",
|
|
45
|
+
"teddy-modal__group": "_teddy-modal__group_3n21u_74",
|
|
46
|
+
"teddy-modal__group--title": "_teddy-modal__group--title_3n21u_78",
|
|
47
|
+
"teddy-modal__group--scroll": "_teddy-modal__group--scroll_3n21u_84",
|
|
48
|
+
"teddy-modal__group--action": "_teddy-modal__group--action_3n21u_93",
|
|
49
|
+
"modal-overlay-no-op": "_modal-overlay-no-op_3n21u_1",
|
|
50
|
+
"teddy-fade-in": "_teddy-fade-in_3n21u_1",
|
|
51
|
+
"teddy-fade-out": "_teddy-fade-out_3n21u_1",
|
|
52
|
+
"modal-content-show": "_modal-content-show_3n21u_1",
|
|
53
|
+
"modal-content-hide": "_modal-content-hide_3n21u_1",
|
|
54
|
+
"teddy-overlay-no-op": "_teddy-overlay-no-op_3n21u_1"
|
|
51
55
|
};
|
|
52
56
|
const rootClassName = "teddy-modal";
|
|
53
57
|
const RootContext = React__default.createContext({
|
|
@@ -7,6 +7,7 @@ const NavigationMenuPrimitive = require("@radix-ui/react-navigation-menu");
|
|
|
7
7
|
const utils_composeRefs = require("../../utils/composeRefs.cjs");
|
|
8
8
|
const components_visuallyHidden_visuallyHidden = require("../visually-hidden/visually-hidden.cjs");
|
|
9
9
|
const utils_composeEventHandlers = require("../../utils/composeEventHandlers.cjs");
|
|
10
|
+
const reactSlot = require("@radix-ui/react-slot");
|
|
10
11
|
function _interopNamespaceDefault(e) {
|
|
11
12
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
12
13
|
if (e) {
|
|
@@ -24,31 +25,31 @@ function _interopNamespaceDefault(e) {
|
|
|
24
25
|
return Object.freeze(n);
|
|
25
26
|
}
|
|
26
27
|
const NavigationMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(NavigationMenuPrimitive);
|
|
27
|
-
const enterFromLeft = "
|
|
28
|
-
const enterFromRight = "
|
|
29
|
-
const exitToLeft = "
|
|
30
|
-
const exitToRight = "
|
|
31
|
-
const scaleIn = "
|
|
32
|
-
const scaleOut = "
|
|
28
|
+
const enterFromLeft = "_enterFromLeft_959s3_1";
|
|
29
|
+
const enterFromRight = "_enterFromRight_959s3_1";
|
|
30
|
+
const exitToLeft = "_exitToLeft_959s3_1";
|
|
31
|
+
const exitToRight = "_exitToRight_959s3_1";
|
|
32
|
+
const scaleIn = "_scaleIn_959s3_1";
|
|
33
|
+
const scaleOut = "_scaleOut_959s3_1";
|
|
33
34
|
const styles = {
|
|
34
|
-
"teddy-navigation-menu": "_teddy-navigation-
|
|
35
|
-
"teddy-navigation-menu__viewport": "_teddy-navigation-
|
|
36
|
-
"teddy-navigation-menu__list": "_teddy-navigation-
|
|
37
|
-
"teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-
|
|
38
|
-
"teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-
|
|
39
|
-
"teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--
|
|
40
|
-
"teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--
|
|
41
|
-
"teddy-navigation-menu__content": "_teddy-navigation-
|
|
35
|
+
"teddy-navigation-menu": "_teddy-navigation-menu_959s3_1",
|
|
36
|
+
"teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_959s3_33",
|
|
37
|
+
"teddy-navigation-menu__list": "_teddy-navigation-menu__list_959s3_36",
|
|
38
|
+
"teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_959s3_55",
|
|
39
|
+
"teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_959s3_75",
|
|
40
|
+
"teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_959s3_92",
|
|
41
|
+
"teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_959s3_97",
|
|
42
|
+
"teddy-navigation-menu__content": "_teddy-navigation-menu__content_959s3_169",
|
|
42
43
|
enterFromLeft,
|
|
43
44
|
enterFromRight,
|
|
44
45
|
exitToLeft,
|
|
45
46
|
exitToRight,
|
|
46
|
-
"teddy-navigation-menu__trigger": "_teddy-navigation-
|
|
47
|
-
"teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--
|
|
48
|
-
"teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--
|
|
49
|
-
"teddy-navigation-menu__link": "_teddy-navigation-
|
|
50
|
-
"teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--
|
|
51
|
-
"teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--
|
|
47
|
+
"teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_959s3_213",
|
|
48
|
+
"teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_959s3_231",
|
|
49
|
+
"teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_959s3_236",
|
|
50
|
+
"teddy-navigation-menu__link": "_teddy-navigation-menu__link_959s3_301",
|
|
51
|
+
"teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_959s3_319",
|
|
52
|
+
"teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_959s3_324",
|
|
52
53
|
scaleIn,
|
|
53
54
|
scaleOut
|
|
54
55
|
};
|
|
@@ -133,18 +134,19 @@ const TopMenuItem = React.forwardRef(
|
|
|
133
134
|
}
|
|
134
135
|
);
|
|
135
136
|
const TopMenuTrigger = React.forwardRef(
|
|
136
|
-
({ className, active, ...props }, forwardRef) => {
|
|
137
|
+
({ className, asChild, active, ...props }, forwardRef) => {
|
|
137
138
|
const classes = clsx(
|
|
138
139
|
[styles[`${rootClassName}__top-menu-trigger`], styles[`${rootClassName}__top-menu-trigger--small`]],
|
|
139
140
|
className
|
|
140
141
|
);
|
|
142
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
141
143
|
const context = React.useContext(NavigationMenuContext);
|
|
142
144
|
const innerRef = React.useRef(null);
|
|
143
145
|
const ref = utils_composeRefs.useComposedRefs(innerRef, forwardRef);
|
|
144
146
|
const isOpen = context.selectedTopMenu === props.value;
|
|
145
147
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
146
148
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
147
|
-
|
|
149
|
+
Comp,
|
|
148
150
|
{
|
|
149
151
|
...props,
|
|
150
152
|
ref,
|
|
@@ -24,6 +24,7 @@ type TopMenuItemProps = React.ComponentPropsWithoutRef<'li'>;
|
|
|
24
24
|
type TopMenuTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
|
|
25
25
|
value: string;
|
|
26
26
|
active?: boolean;
|
|
27
|
+
asChild?: boolean;
|
|
27
28
|
};
|
|
28
29
|
/** -------------------------------------------------------------------------------------------------
|
|
29
30
|
* NavigationMenuList
|
|
@@ -100,7 +101,7 @@ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMen
|
|
|
100
101
|
variant?: "default" | "float" | undefined;
|
|
101
102
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
102
103
|
Link: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & {
|
|
103
|
-
variant?: "
|
|
104
|
+
variant?: "small" | "button" | "default" | undefined;
|
|
104
105
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
105
106
|
Indicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
106
107
|
Viewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -110,6 +111,7 @@ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMen
|
|
|
110
111
|
TopMenuTrigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
111
112
|
value: string;
|
|
112
113
|
active?: boolean | undefined;
|
|
114
|
+
asChild?: boolean | undefined;
|
|
113
115
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
114
116
|
};
|
|
115
117
|
type NavigationMenuProps = {
|
|
@@ -5,31 +5,32 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
|
5
5
|
import { useComposedRefs } from "../../utils/composeRefs.js";
|
|
6
6
|
import { VisuallyHidden } from "../visually-hidden/visually-hidden.js";
|
|
7
7
|
import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
8
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
+
const enterFromLeft = "_enterFromLeft_959s3_1";
|
|
10
|
+
const enterFromRight = "_enterFromRight_959s3_1";
|
|
11
|
+
const exitToLeft = "_exitToLeft_959s3_1";
|
|
12
|
+
const exitToRight = "_exitToRight_959s3_1";
|
|
13
|
+
const scaleIn = "_scaleIn_959s3_1";
|
|
14
|
+
const scaleOut = "_scaleOut_959s3_1";
|
|
14
15
|
const styles = {
|
|
15
|
-
"teddy-navigation-menu": "_teddy-navigation-
|
|
16
|
-
"teddy-navigation-menu__viewport": "_teddy-navigation-
|
|
17
|
-
"teddy-navigation-menu__list": "_teddy-navigation-
|
|
18
|
-
"teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-
|
|
19
|
-
"teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-
|
|
20
|
-
"teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--
|
|
21
|
-
"teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--
|
|
22
|
-
"teddy-navigation-menu__content": "_teddy-navigation-
|
|
16
|
+
"teddy-navigation-menu": "_teddy-navigation-menu_959s3_1",
|
|
17
|
+
"teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_959s3_33",
|
|
18
|
+
"teddy-navigation-menu__list": "_teddy-navigation-menu__list_959s3_36",
|
|
19
|
+
"teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_959s3_55",
|
|
20
|
+
"teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_959s3_75",
|
|
21
|
+
"teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_959s3_92",
|
|
22
|
+
"teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_959s3_97",
|
|
23
|
+
"teddy-navigation-menu__content": "_teddy-navigation-menu__content_959s3_169",
|
|
23
24
|
enterFromLeft,
|
|
24
25
|
enterFromRight,
|
|
25
26
|
exitToLeft,
|
|
26
27
|
exitToRight,
|
|
27
|
-
"teddy-navigation-menu__trigger": "_teddy-navigation-
|
|
28
|
-
"teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--
|
|
29
|
-
"teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--
|
|
30
|
-
"teddy-navigation-menu__link": "_teddy-navigation-
|
|
31
|
-
"teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--
|
|
32
|
-
"teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--
|
|
28
|
+
"teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_959s3_213",
|
|
29
|
+
"teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_959s3_231",
|
|
30
|
+
"teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_959s3_236",
|
|
31
|
+
"teddy-navigation-menu__link": "_teddy-navigation-menu__link_959s3_301",
|
|
32
|
+
"teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_959s3_319",
|
|
33
|
+
"teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_959s3_324",
|
|
33
34
|
scaleIn,
|
|
34
35
|
scaleOut
|
|
35
36
|
};
|
|
@@ -114,18 +115,19 @@ const TopMenuItem = React__default.forwardRef(
|
|
|
114
115
|
}
|
|
115
116
|
);
|
|
116
117
|
const TopMenuTrigger = React__default.forwardRef(
|
|
117
|
-
({ className, active, ...props }, forwardRef) => {
|
|
118
|
+
({ className, asChild, active, ...props }, forwardRef) => {
|
|
118
119
|
const classes = clsx(
|
|
119
120
|
[styles[`${rootClassName}__top-menu-trigger`], styles[`${rootClassName}__top-menu-trigger--small`]],
|
|
120
121
|
className
|
|
121
122
|
);
|
|
123
|
+
const Comp = asChild ? Slot : "button";
|
|
122
124
|
const context = React__default.useContext(NavigationMenuContext);
|
|
123
125
|
const innerRef = React__default.useRef(null);
|
|
124
126
|
const ref = useComposedRefs(innerRef, forwardRef);
|
|
125
127
|
const isOpen = context.selectedTopMenu === props.value;
|
|
126
128
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
127
129
|
/* @__PURE__ */ jsx(
|
|
128
|
-
|
|
130
|
+
Comp,
|
|
129
131
|
{
|
|
130
132
|
...props,
|
|
131
133
|
ref,
|
|
@@ -7,7 +7,7 @@ const Collapsible = require("@radix-ui/react-collapsible");
|
|
|
7
7
|
const reactUseControllableState = require("@radix-ui/react-use-controllable-state");
|
|
8
8
|
const components_text_text = require("../text/text.cjs");
|
|
9
9
|
const components_button_button = require("../button/button.cjs");
|
|
10
|
-
require("../../assets/sprite.
|
|
10
|
+
require("../../assets/sprite.269ba410-teddy.svg");
|
|
11
11
|
const components_icon_icon = require("../icon/icon.cjs");
|
|
12
12
|
const components_heading_heading = require("../heading/heading.cjs");
|
|
13
13
|
const components_card_card = require("../card/card.cjs");
|
|
@@ -31,7 +31,9 @@ type TextProps = React.ComponentPropsWithoutRef<typeof TextPrimitives>;
|
|
|
31
31
|
* Dismiss
|
|
32
32
|
* -----------------------------------------------------------------------------------------------*/
|
|
33
33
|
type DismissProps = Omit<React.ComponentPropsWithoutRef<typeof ButtonPrimitives>, 'variant'>;
|
|
34
|
-
declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps &
|
|
34
|
+
declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
35
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
36
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
35
37
|
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
36
38
|
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
37
39
|
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
@@ -44,7 +46,9 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
44
46
|
shadow?: boolean | undefined;
|
|
45
47
|
backgroundImageSrc?: string | undefined;
|
|
46
48
|
layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
|
|
47
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps &
|
|
49
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
50
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
51
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
48
52
|
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
49
53
|
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
50
54
|
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
@@ -57,7 +61,9 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
57
61
|
shadow?: boolean | undefined;
|
|
58
62
|
backgroundImageSrc?: string | undefined;
|
|
59
63
|
layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
|
|
60
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps &
|
|
64
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
65
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
66
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
61
67
|
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
62
68
|
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
63
69
|
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
@@ -80,8 +86,8 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
80
86
|
Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
81
87
|
Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
82
88
|
Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
83
|
-
name: "
|
|
84
|
-
size?: ("
|
|
89
|
+
name: "key" | "search" | "split" | "link" | "add" | "reverse" | "infinite" | "radio" | "visible" | "copy" | "help" | "zoom-out" | "filter" | "x" | "zoom" | "menu" | "map" | "summary" | "time" | "video" | "image" | "stop" | "download" | "alert" | "email" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
|
|
90
|
+
size?: ("sm" | "md" | "lg" | "xl" | "font" | "xxs" | "xs") | undefined;
|
|
85
91
|
children?: React.ReactNode;
|
|
86
92
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
87
93
|
Dismiss: React.ForwardRefExoticComponent<DismissProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,7 +5,7 @@ import * as Collapsible from "@radix-ui/react-collapsible";
|
|
|
5
5
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
6
6
|
import { Text as Text$1 } from "../text/text.js";
|
|
7
7
|
import { Button } from "../button/button.js";
|
|
8
|
-
import "../../assets/sprite.
|
|
8
|
+
import "../../assets/sprite.269ba410-teddy.svg";
|
|
9
9
|
import { Icon as Icon$1 } from "../icon/icon.js";
|
|
10
10
|
import { Heading as Heading$1 } from "../heading/heading.js";
|
|
11
11
|
import { Card } from "../card/card.js";
|
|
@@ -9,20 +9,24 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
|
|
|
9
9
|
asChild?: boolean | undefined;
|
|
10
10
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
11
|
Button: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
12
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
13
|
+
} & {
|
|
12
14
|
asChild?: boolean | undefined;
|
|
13
15
|
loading?: boolean | undefined;
|
|
14
16
|
fullWidth?: boolean | undefined;
|
|
15
17
|
size?: "sm" | "md" | "lg" | undefined;
|
|
16
|
-
variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
18
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
17
19
|
} & {
|
|
18
20
|
iconOnly: true;
|
|
19
21
|
"aria-label": string;
|
|
20
22
|
} & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
23
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
24
|
+
} & {
|
|
21
25
|
asChild?: boolean | undefined;
|
|
22
26
|
loading?: boolean | undefined;
|
|
23
27
|
fullWidth?: boolean | undefined;
|
|
24
28
|
size?: "sm" | "md" | "lg" | undefined;
|
|
25
|
-
variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
29
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
26
30
|
} & {
|
|
27
31
|
iconOnly?: false | undefined;
|
|
28
32
|
"aria-label"?: string | undefined;
|
|
@@ -6,7 +6,7 @@ const clsx = require("clsx");
|
|
|
6
6
|
const ScrollAreaPrimitive = require("@radix-ui/react-scroll-area");
|
|
7
7
|
const components_button_button = require("../button/button.cjs");
|
|
8
8
|
const utils_composeEventHandlers = require("../../utils/composeEventHandlers.cjs");
|
|
9
|
-
require("../../assets/sprite.
|
|
9
|
+
require("../../assets/sprite.269ba410-teddy.svg");
|
|
10
10
|
const components_icon_icon = require("../icon/icon.cjs");
|
|
11
11
|
const reactSlot = require("@radix-ui/react-slot");
|
|
12
12
|
function _interopNamespaceDefault(e) {
|
|
@@ -27,14 +27,14 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
}
|
|
28
28
|
const ScrollAreaPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(ScrollAreaPrimitive);
|
|
29
29
|
const styles = {
|
|
30
|
-
"teddy-scroll-area": "_teddy-scroll-
|
|
31
|
-
"teddy-scroll-area__viewport": "_teddy-scroll-
|
|
32
|
-
"teddy-scroll-area__scrollbar": "_teddy-scroll-
|
|
33
|
-
"teddy-scroll-area__scrollbar--hidden": "_teddy-scroll-area__scrollbar--
|
|
34
|
-
"teddy-scroll-area__thumb": "_teddy-scroll-
|
|
35
|
-
"teddy-scroll-area__corner": "_teddy-scroll-
|
|
36
|
-
"teddy-scroll-area__button": "_teddy-scroll-
|
|
37
|
-
"teddy-scroll-area__button--hidden": "_teddy-scroll-area__button--
|
|
30
|
+
"teddy-scroll-area": "_teddy-scroll-area_1y01l_3",
|
|
31
|
+
"teddy-scroll-area__viewport": "_teddy-scroll-area__viewport_1y01l_7",
|
|
32
|
+
"teddy-scroll-area__scrollbar": "_teddy-scroll-area__scrollbar_1y01l_13",
|
|
33
|
+
"teddy-scroll-area__scrollbar--hidden": "_teddy-scroll-area__scrollbar--hidden_1y01l_34",
|
|
34
|
+
"teddy-scroll-area__thumb": "_teddy-scroll-area__thumb_1y01l_47",
|
|
35
|
+
"teddy-scroll-area__corner": "_teddy-scroll-area__corner_1y01l_64",
|
|
36
|
+
"teddy-scroll-area__button": "_teddy-scroll-area__button_1y01l_67",
|
|
37
|
+
"teddy-scroll-area__button--hidden": "_teddy-scroll-area__button--hidden_1y01l_95"
|
|
38
38
|
};
|
|
39
39
|
const Scrollbar = React.forwardRef(
|
|
40
40
|
({ className, ...props }, forwardRef) => {
|
|
@@ -129,11 +129,17 @@ const Root = React.forwardRef(
|
|
|
129
129
|
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
130
130
|
function handleScroll(e) {
|
|
131
131
|
const target = e.currentTarget;
|
|
132
|
+
const { scrollLeft, scrollWidth, clientWidth, scrollTop, scrollHeight, clientHeight } = target;
|
|
133
|
+
const buffer = 1;
|
|
134
|
+
const hasScrollLeft2 = scrollLeft > 0;
|
|
135
|
+
const hasScrollRight2 = scrollLeft < scrollWidth - clientWidth - buffer;
|
|
136
|
+
const hasScrollTop2 = scrollTop > 0;
|
|
137
|
+
const hasScrollBottom2 = scrollTop < scrollHeight - clientHeight - buffer;
|
|
132
138
|
setHasScroll({
|
|
133
|
-
left:
|
|
134
|
-
right:
|
|
135
|
-
top:
|
|
136
|
-
bottom:
|
|
139
|
+
left: hasScrollLeft2,
|
|
140
|
+
right: hasScrollRight2,
|
|
141
|
+
top: hasScrollTop2,
|
|
142
|
+
bottom: hasScrollBottom2
|
|
137
143
|
});
|
|
138
144
|
}
|
|
139
145
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4,18 +4,18 @@ import clsx from "clsx";
|
|
|
4
4
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
5
5
|
import { Button as Button$1 } from "../button/button.js";
|
|
6
6
|
import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
|
|
7
|
-
import "../../assets/sprite.
|
|
7
|
+
import "../../assets/sprite.269ba410-teddy.svg";
|
|
8
8
|
import { Icon } from "../icon/icon.js";
|
|
9
9
|
import { Slottable } from "@radix-ui/react-slot";
|
|
10
10
|
const styles = {
|
|
11
|
-
"teddy-scroll-area": "_teddy-scroll-
|
|
12
|
-
"teddy-scroll-area__viewport": "_teddy-scroll-
|
|
13
|
-
"teddy-scroll-area__scrollbar": "_teddy-scroll-
|
|
14
|
-
"teddy-scroll-area__scrollbar--hidden": "_teddy-scroll-area__scrollbar--
|
|
15
|
-
"teddy-scroll-area__thumb": "_teddy-scroll-
|
|
16
|
-
"teddy-scroll-area__corner": "_teddy-scroll-
|
|
17
|
-
"teddy-scroll-area__button": "_teddy-scroll-
|
|
18
|
-
"teddy-scroll-area__button--hidden": "_teddy-scroll-area__button--
|
|
11
|
+
"teddy-scroll-area": "_teddy-scroll-area_1y01l_3",
|
|
12
|
+
"teddy-scroll-area__viewport": "_teddy-scroll-area__viewport_1y01l_7",
|
|
13
|
+
"teddy-scroll-area__scrollbar": "_teddy-scroll-area__scrollbar_1y01l_13",
|
|
14
|
+
"teddy-scroll-area__scrollbar--hidden": "_teddy-scroll-area__scrollbar--hidden_1y01l_34",
|
|
15
|
+
"teddy-scroll-area__thumb": "_teddy-scroll-area__thumb_1y01l_47",
|
|
16
|
+
"teddy-scroll-area__corner": "_teddy-scroll-area__corner_1y01l_64",
|
|
17
|
+
"teddy-scroll-area__button": "_teddy-scroll-area__button_1y01l_67",
|
|
18
|
+
"teddy-scroll-area__button--hidden": "_teddy-scroll-area__button--hidden_1y01l_95"
|
|
19
19
|
};
|
|
20
20
|
const Scrollbar = React__default.forwardRef(
|
|
21
21
|
({ className, ...props }, forwardRef) => {
|
|
@@ -110,11 +110,17 @@ const Root = React__default.forwardRef(
|
|
|
110
110
|
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
111
111
|
function handleScroll(e) {
|
|
112
112
|
const target = e.currentTarget;
|
|
113
|
+
const { scrollLeft, scrollWidth, clientWidth, scrollTop, scrollHeight, clientHeight } = target;
|
|
114
|
+
const buffer = 1;
|
|
115
|
+
const hasScrollLeft2 = scrollLeft > 0;
|
|
116
|
+
const hasScrollRight2 = scrollLeft < scrollWidth - clientWidth - buffer;
|
|
117
|
+
const hasScrollTop2 = scrollTop > 0;
|
|
118
|
+
const hasScrollBottom2 = scrollTop < scrollHeight - clientHeight - buffer;
|
|
113
119
|
setHasScroll({
|
|
114
|
-
left:
|
|
115
|
-
right:
|
|
116
|
-
top:
|
|
117
|
-
bottom:
|
|
120
|
+
left: hasScrollLeft2,
|
|
121
|
+
right: hasScrollRight2,
|
|
122
|
+
top: hasScrollTop2,
|
|
123
|
+
bottom: hasScrollBottom2
|
|
118
124
|
});
|
|
119
125
|
}
|
|
120
126
|
return /* @__PURE__ */ jsx(
|
|
@@ -6,6 +6,6 @@ require("clsx");
|
|
|
6
6
|
const components_scrollArea_scrollAreaBar = require("./scroll-area-bar.cjs");
|
|
7
7
|
require("../button/button.cjs");
|
|
8
8
|
require("../../utils/composeEventHandlers.cjs");
|
|
9
|
-
require("../../assets/sprite.
|
|
9
|
+
require("../../assets/sprite.269ba410-teddy.svg");
|
|
10
10
|
require("../icon/icon.cjs");
|
|
11
11
|
exports.Button = components_scrollArea_scrollAreaBar.Button;
|