@telia/teddy 0.7.13 → 0.7.15
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/components/button/button.cjs +28 -26
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +28 -26
- package/dist/components/channel-button/channel-button-root.d.ts +2 -2
- package/dist/components/channel-button/index.d.ts +2 -2
- package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
- package/dist/components/expandable-card/index.d.ts +3 -3
- package/dist/components/flip-card/flip-card-trigger.d.ts +2 -2
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +4 -2
- package/dist/components/navigation-menu/global-navigation/utils.cjs +14 -1
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +785 -3
- package/dist/components/navigation-menu/global-navigation/utils.js +14 -1
- package/dist/components/radio-card-group/radio-card-group-item-title.cjs +160 -159
- package/dist/components/radio-card-group/radio-card-group-item-title.js +161 -160
- package/dist/components/scroll-area/index.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
- package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/text-field-button.d.ts +2 -2
- package/dist/components/toast/toast-root.cjs +75 -74
- package/dist/components/toast/toast-root.js +75 -74
- package/dist/style.css +294 -250
- package/package.json +2 -2
|
@@ -23,34 +23,35 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
return Object.freeze(n);
|
|
24
24
|
}
|
|
25
25
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
26
|
-
const fadeInAnimation = "
|
|
27
|
-
const scaleInAnimation = "
|
|
26
|
+
const fadeInAnimation = "_fadeInAnimation_18j14_1";
|
|
27
|
+
const scaleInAnimation = "_scaleInAnimation_18j14_1";
|
|
28
28
|
const styles = {
|
|
29
|
-
"teddy-button": "_teddy-
|
|
30
|
-
"teddy-button--sm": "_teddy-button--
|
|
31
|
-
"teddy-button--icon-only": "_teddy-button--icon-
|
|
32
|
-
"teddy-button--md": "_teddy-button--
|
|
33
|
-
"teddy-button--lg": "_teddy-button--
|
|
34
|
-
"teddy-button--full-width": "_teddy-button--full-
|
|
35
|
-
"teddy-button--primary": "_teddy-button--
|
|
36
|
-
"teddy-button--disabled": "_teddy-button--
|
|
37
|
-
"teddy-button--primary-negative": "_teddy-button--primary-
|
|
38
|
-
"teddy-button--secondary": "_teddy-button--
|
|
39
|
-
"teddy-button--secondary-negative": "_teddy-button--secondary-
|
|
40
|
-
"teddy-button--expressive": "_teddy-button--
|
|
41
|
-
"teddy-button--expressive-negative": "_teddy-button--expressive-
|
|
42
|
-
"teddy-button--negative": "_teddy-button--
|
|
43
|
-
"teddy-button--destructive": "_teddy-button--
|
|
44
|
-
"teddy-button--destructive-negative": "_teddy-button--destructive-
|
|
45
|
-
"teddy-button--tertiary-purple": "_teddy-button--tertiary-
|
|
46
|
-
"teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-
|
|
47
|
-
"teddy-button--list-item": "_teddy-button--list-
|
|
48
|
-
"teddy-button--text-negative": "_teddy-button--text-
|
|
49
|
-
"teddy-button--text": "_teddy-button--
|
|
50
|
-
"teddy-button--
|
|
51
|
-
"teddy-
|
|
29
|
+
"teddy-button": "_teddy-button_18j14_18",
|
|
30
|
+
"teddy-button--sm": "_teddy-button--sm_18j14_53",
|
|
31
|
+
"teddy-button--icon-only": "_teddy-button--icon-only_18j14_56",
|
|
32
|
+
"teddy-button--md": "_teddy-button--md_18j14_59",
|
|
33
|
+
"teddy-button--lg": "_teddy-button--lg_18j14_65",
|
|
34
|
+
"teddy-button--full-width": "_teddy-button--full-width_18j14_71",
|
|
35
|
+
"teddy-button--primary": "_teddy-button--primary_18j14_74",
|
|
36
|
+
"teddy-button--disabled": "_teddy-button--disabled_18j14_78",
|
|
37
|
+
"teddy-button--primary-negative": "_teddy-button--primary-negative_18j14_84",
|
|
38
|
+
"teddy-button--secondary": "_teddy-button--secondary_18j14_96",
|
|
39
|
+
"teddy-button--secondary-negative": "_teddy-button--secondary-negative_18j14_107",
|
|
40
|
+
"teddy-button--expressive": "_teddy-button--expressive_18j14_118",
|
|
41
|
+
"teddy-button--expressive-negative": "_teddy-button--expressive-negative_18j14_128",
|
|
42
|
+
"teddy-button--negative": "_teddy-button--negative_18j14_140",
|
|
43
|
+
"teddy-button--destructive": "_teddy-button--destructive_18j14_147",
|
|
44
|
+
"teddy-button--destructive-negative": "_teddy-button--destructive-negative_18j14_157",
|
|
45
|
+
"teddy-button--tertiary-purple": "_teddy-button--tertiary-purple_18j14_167",
|
|
46
|
+
"teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-negative_18j14_180",
|
|
47
|
+
"teddy-button--list-item": "_teddy-button--list-item_18j14_195",
|
|
48
|
+
"teddy-button--text-negative": "_teddy-button--text-negative_18j14_214",
|
|
49
|
+
"teddy-button--text": "_teddy-button--text_18j14_214",
|
|
50
|
+
"teddy-button--text-underline": "_teddy-button--text-underline_18j14_255",
|
|
51
|
+
"teddy-button--dashed-border": "_teddy-button--dashed-border_18j14_283",
|
|
52
|
+
"teddy-button__loading": "_teddy-button__loading_18j14_287",
|
|
52
53
|
fadeInAnimation,
|
|
53
|
-
"teddy-button__spinner": "_teddy-
|
|
54
|
+
"teddy-button__spinner": "_teddy-button__spinner_18j14_298",
|
|
54
55
|
scaleInAnimation
|
|
55
56
|
};
|
|
56
57
|
const rootClassName = "teddy-button";
|
|
@@ -60,6 +61,7 @@ const variants = [
|
|
|
60
61
|
"destructive",
|
|
61
62
|
"tertiary-purple",
|
|
62
63
|
"text",
|
|
64
|
+
"text-underline",
|
|
63
65
|
"expressive",
|
|
64
66
|
"primary-negative",
|
|
65
67
|
"secondary-negative",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChildrenLayoutProps } from '../../utils/generate-styling';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative", "list-item"];
|
|
3
|
+
declare const variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "text-underline", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative", "list-item"];
|
|
4
4
|
export type Variant = (typeof variants)[number];
|
|
5
5
|
declare const sizes: readonly ["sm", "md", "lg"];
|
|
6
6
|
export type Size = (typeof sizes)[number];
|
|
@@ -20,7 +20,7 @@ type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-lab
|
|
|
20
20
|
['aria-label']?: string;
|
|
21
21
|
});
|
|
22
22
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> & {
|
|
23
|
-
variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative", "list-item"];
|
|
23
|
+
variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "text-underline", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative", "list-item"];
|
|
24
24
|
};
|
|
25
25
|
export { Button };
|
|
26
26
|
export type { ButtonProps };
|
|
@@ -4,34 +4,35 @@ import { clsx } from "clsx";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Spinner } from "../spinner/spinner.js";
|
|
6
6
|
import { extractProps } from "../../utils/generate-styling/index.js";
|
|
7
|
-
const fadeInAnimation = "
|
|
8
|
-
const scaleInAnimation = "
|
|
7
|
+
const fadeInAnimation = "_fadeInAnimation_18j14_1";
|
|
8
|
+
const scaleInAnimation = "_scaleInAnimation_18j14_1";
|
|
9
9
|
const styles = {
|
|
10
|
-
"teddy-button": "_teddy-
|
|
11
|
-
"teddy-button--sm": "_teddy-button--
|
|
12
|
-
"teddy-button--icon-only": "_teddy-button--icon-
|
|
13
|
-
"teddy-button--md": "_teddy-button--
|
|
14
|
-
"teddy-button--lg": "_teddy-button--
|
|
15
|
-
"teddy-button--full-width": "_teddy-button--full-
|
|
16
|
-
"teddy-button--primary": "_teddy-button--
|
|
17
|
-
"teddy-button--disabled": "_teddy-button--
|
|
18
|
-
"teddy-button--primary-negative": "_teddy-button--primary-
|
|
19
|
-
"teddy-button--secondary": "_teddy-button--
|
|
20
|
-
"teddy-button--secondary-negative": "_teddy-button--secondary-
|
|
21
|
-
"teddy-button--expressive": "_teddy-button--
|
|
22
|
-
"teddy-button--expressive-negative": "_teddy-button--expressive-
|
|
23
|
-
"teddy-button--negative": "_teddy-button--
|
|
24
|
-
"teddy-button--destructive": "_teddy-button--
|
|
25
|
-
"teddy-button--destructive-negative": "_teddy-button--destructive-
|
|
26
|
-
"teddy-button--tertiary-purple": "_teddy-button--tertiary-
|
|
27
|
-
"teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-
|
|
28
|
-
"teddy-button--list-item": "_teddy-button--list-
|
|
29
|
-
"teddy-button--text-negative": "_teddy-button--text-
|
|
30
|
-
"teddy-button--text": "_teddy-button--
|
|
31
|
-
"teddy-button--
|
|
32
|
-
"teddy-
|
|
10
|
+
"teddy-button": "_teddy-button_18j14_18",
|
|
11
|
+
"teddy-button--sm": "_teddy-button--sm_18j14_53",
|
|
12
|
+
"teddy-button--icon-only": "_teddy-button--icon-only_18j14_56",
|
|
13
|
+
"teddy-button--md": "_teddy-button--md_18j14_59",
|
|
14
|
+
"teddy-button--lg": "_teddy-button--lg_18j14_65",
|
|
15
|
+
"teddy-button--full-width": "_teddy-button--full-width_18j14_71",
|
|
16
|
+
"teddy-button--primary": "_teddy-button--primary_18j14_74",
|
|
17
|
+
"teddy-button--disabled": "_teddy-button--disabled_18j14_78",
|
|
18
|
+
"teddy-button--primary-negative": "_teddy-button--primary-negative_18j14_84",
|
|
19
|
+
"teddy-button--secondary": "_teddy-button--secondary_18j14_96",
|
|
20
|
+
"teddy-button--secondary-negative": "_teddy-button--secondary-negative_18j14_107",
|
|
21
|
+
"teddy-button--expressive": "_teddy-button--expressive_18j14_118",
|
|
22
|
+
"teddy-button--expressive-negative": "_teddy-button--expressive-negative_18j14_128",
|
|
23
|
+
"teddy-button--negative": "_teddy-button--negative_18j14_140",
|
|
24
|
+
"teddy-button--destructive": "_teddy-button--destructive_18j14_147",
|
|
25
|
+
"teddy-button--destructive-negative": "_teddy-button--destructive-negative_18j14_157",
|
|
26
|
+
"teddy-button--tertiary-purple": "_teddy-button--tertiary-purple_18j14_167",
|
|
27
|
+
"teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-negative_18j14_180",
|
|
28
|
+
"teddy-button--list-item": "_teddy-button--list-item_18j14_195",
|
|
29
|
+
"teddy-button--text-negative": "_teddy-button--text-negative_18j14_214",
|
|
30
|
+
"teddy-button--text": "_teddy-button--text_18j14_214",
|
|
31
|
+
"teddy-button--text-underline": "_teddy-button--text-underline_18j14_255",
|
|
32
|
+
"teddy-button--dashed-border": "_teddy-button--dashed-border_18j14_283",
|
|
33
|
+
"teddy-button__loading": "_teddy-button__loading_18j14_287",
|
|
33
34
|
fadeInAnimation,
|
|
34
|
-
"teddy-button__spinner": "_teddy-
|
|
35
|
+
"teddy-button__spinner": "_teddy-button__spinner_18j14_298",
|
|
35
36
|
scaleInAnimation
|
|
36
37
|
};
|
|
37
38
|
const rootClassName = "teddy-button";
|
|
@@ -41,6 +42,7 @@ const variants = [
|
|
|
41
42
|
"destructive",
|
|
42
43
|
"tertiary-purple",
|
|
43
44
|
"text",
|
|
45
|
+
"text-underline",
|
|
44
46
|
"expressive",
|
|
45
47
|
"primary-negative",
|
|
46
48
|
"secondary-negative",
|
|
@@ -12,7 +12,7 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
|
|
|
12
12
|
loading?: boolean | undefined;
|
|
13
13
|
fullWidth?: boolean | undefined;
|
|
14
14
|
size?: "sm" | "md" | "lg" | undefined;
|
|
15
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
15
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
16
16
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
17
17
|
} & {
|
|
18
18
|
iconOnly: true;
|
|
@@ -24,7 +24,7 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
|
|
|
24
24
|
loading?: boolean | undefined;
|
|
25
25
|
fullWidth?: boolean | undefined;
|
|
26
26
|
size?: "sm" | "md" | "lg" | undefined;
|
|
27
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
27
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
28
28
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
29
29
|
} & {
|
|
30
30
|
iconOnly?: false | undefined;
|
|
@@ -35,7 +35,7 @@ declare const ChannelButton: import('react').ForwardRefExoticComponent<Omit<Omit
|
|
|
35
35
|
loading?: boolean | undefined;
|
|
36
36
|
fullWidth?: boolean | undefined;
|
|
37
37
|
size?: "sm" | "md" | "lg" | undefined;
|
|
38
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
38
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
39
39
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
40
40
|
} & {
|
|
41
41
|
iconOnly: true;
|
|
@@ -47,7 +47,7 @@ declare const ChannelButton: import('react').ForwardRefExoticComponent<Omit<Omit
|
|
|
47
47
|
loading?: boolean | undefined;
|
|
48
48
|
fullWidth?: boolean | undefined;
|
|
49
49
|
size?: "sm" | "md" | "lg" | undefined;
|
|
50
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
50
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
51
51
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
52
52
|
} & {
|
|
53
53
|
iconOnly?: false | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
|
|
|
12
12
|
loading?: boolean | undefined;
|
|
13
13
|
fullWidth?: boolean | undefined;
|
|
14
14
|
size?: "sm" | "md" | "lg" | undefined;
|
|
15
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
15
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
16
16
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
17
17
|
} & {
|
|
18
18
|
iconOnly: true;
|
|
@@ -24,7 +24,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
|
|
|
24
24
|
loading?: boolean | undefined;
|
|
25
25
|
fullWidth?: boolean | undefined;
|
|
26
26
|
size?: "sm" | "md" | "lg" | undefined;
|
|
27
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
27
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
28
28
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
29
29
|
} & {
|
|
30
30
|
iconOnly?: false | undefined;
|
|
@@ -27,7 +27,7 @@ export declare const ExpandableCard: import('react').ForwardRefExoticComponent<R
|
|
|
27
27
|
loading?: boolean | undefined;
|
|
28
28
|
fullWidth?: boolean | undefined;
|
|
29
29
|
size?: "sm" | "md" | "lg" | undefined;
|
|
30
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
30
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
31
31
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
32
32
|
} & {
|
|
33
33
|
iconOnly: true;
|
|
@@ -39,13 +39,13 @@ export declare const ExpandableCard: import('react').ForwardRefExoticComponent<R
|
|
|
39
39
|
loading?: boolean | undefined;
|
|
40
40
|
fullWidth?: boolean | undefined;
|
|
41
41
|
size?: "sm" | "md" | "lg" | undefined;
|
|
42
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
42
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
43
43
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
44
44
|
} & {
|
|
45
45
|
iconOnly?: false | undefined;
|
|
46
46
|
"aria-label"?: string | undefined;
|
|
47
47
|
} & import('react').RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
|
|
48
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
48
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
49
49
|
position?: "left" | "right" | undefined;
|
|
50
50
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
51
51
|
Indicator: import('react').ForwardRefExoticComponent<Omit<IndicatorProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -26,7 +26,7 @@ export declare const Trigger: React.ForwardRefExoticComponent<Omit<Omit<Omit<Rea
|
|
|
26
26
|
loading?: boolean | undefined;
|
|
27
27
|
fullWidth?: boolean | undefined;
|
|
28
28
|
size?: "sm" | "md" | "lg" | 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;
|
|
29
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
30
30
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
31
31
|
} & {
|
|
32
32
|
iconOnly: true;
|
|
@@ -38,7 +38,7 @@ export declare const Trigger: React.ForwardRefExoticComponent<Omit<Omit<Omit<Rea
|
|
|
38
38
|
loading?: boolean | undefined;
|
|
39
39
|
fullWidth?: boolean | undefined;
|
|
40
40
|
size?: "sm" | "md" | "lg" | undefined;
|
|
41
|
-
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
41
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
42
42
|
borderStyle?: ("dashed" | "default") | undefined;
|
|
43
43
|
} & {
|
|
44
44
|
iconOnly?: false | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { AppKey } from './utils';
|
|
2
|
+
import { AppKey, CustomLinksConfig } from './utils';
|
|
3
3
|
|
|
4
4
|
export declare const rootClassName = "teddy-global-navigation";
|
|
5
5
|
type User = {
|
|
@@ -19,6 +19,7 @@ export type RootProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
|
19
19
|
onCartOpenChange?: (open: boolean) => void;
|
|
20
20
|
drawerSize: 'md' | 'lg';
|
|
21
21
|
isSimplified?: boolean;
|
|
22
|
+
customLinks?: CustomLinksConfig;
|
|
22
23
|
currentPath: string | undefined;
|
|
23
24
|
onSearchInputChange?: (e: React.ChangeEvent<HTMLInputElement>, value?: string) => void;
|
|
24
25
|
onSearchKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
@@ -34,9 +35,10 @@ type RootContext = {
|
|
|
34
35
|
setPathname: (v: string) => void;
|
|
35
36
|
specifiedLink?: string;
|
|
36
37
|
setSpecifiedLink: (v: string) => void;
|
|
38
|
+
customLinks?: CustomLinksConfig;
|
|
37
39
|
} & Pick<RootProps, 'onSearchSubmit' | 'additionalSearchContent' | 'shoppingCart' | 'shoppingCartNumberOfItems' | 'loggedInUser' | 'appKey' | 'onLogoutClick' | 'linkComponent' | 'isCartOpen' | 'onCartOpenChange' | 'drawerSize' | 'onSearchInputChange' | 'onSearchKeyDown' | 'searchValue' | 'onClear'>;
|
|
38
40
|
export declare const RootContext: React.Context<RootContext | null>;
|
|
39
|
-
export declare function Root({ className, appKey, loggedInUser, linkComponent, onLogoutClick, shoppingCart, shoppingCartNumberOfItems, onSearchSubmit, additionalSearchContent, isCartOpen, onCartOpenChange, drawerSize, isSimplified, currentPath, onSearchInputChange, onSearchKeyDown, searchValue, onClear, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function Root({ className, appKey, loggedInUser, linkComponent, onLogoutClick, shoppingCart, shoppingCartNumberOfItems, onSearchSubmit, additionalSearchContent, isCartOpen, onCartOpenChange, drawerSize, isSimplified, customLinks, currentPath, onSearchInputChange, onSearchKeyDown, searchValue, onClear, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
40
42
|
export declare namespace Root {
|
|
41
43
|
var displayName: string;
|
|
42
44
|
}
|
|
@@ -1097,7 +1097,16 @@ const MDU_LINKS = {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
]
|
|
1099
1099
|
};
|
|
1100
|
-
const
|
|
1100
|
+
const DEFAULT_PRIVATE_LINKS = PRIVATE_LINKS;
|
|
1101
|
+
const DEFAULT_BUSINESS_LINKS = BUSINESS_LINKS;
|
|
1102
|
+
const DEFAULT_BUSINESS_UKKO_LINKS = BUSINESS_UKKO_LINKS;
|
|
1103
|
+
const DEFAULT_MDU_LINKS = MDU_LINKS;
|
|
1104
|
+
const getLinks = (ukko = false, customLinks) => {
|
|
1105
|
+
const privateLinks = (customLinks == null ? void 0 : customLinks.privateLinks) || DEFAULT_PRIVATE_LINKS;
|
|
1106
|
+
const businessLinks = ukko ? (customLinks == null ? void 0 : customLinks.businessUkkoLinks) || DEFAULT_BUSINESS_UKKO_LINKS : (customLinks == null ? void 0 : customLinks.businessLinks) || DEFAULT_BUSINESS_LINKS;
|
|
1107
|
+
const mduLinks = (customLinks == null ? void 0 : customLinks.mduLinks) || DEFAULT_MDU_LINKS;
|
|
1108
|
+
return [privateLinks, businessLinks, mduLinks];
|
|
1109
|
+
};
|
|
1101
1110
|
const getActiveSubLink = (path, links) => {
|
|
1102
1111
|
let activeLink = "";
|
|
1103
1112
|
links.forEach((link) => {
|
|
@@ -1111,6 +1120,10 @@ exports.APP_KEYS = APP_KEYS;
|
|
|
1111
1120
|
exports.BUSINESS_LINKS = BUSINESS_LINKS;
|
|
1112
1121
|
exports.BUSINESS_NET_LINKS = BUSINESS_NET_LINKS;
|
|
1113
1122
|
exports.BUSINESS_UKKO_LINKS = BUSINESS_UKKO_LINKS;
|
|
1123
|
+
exports.DEFAULT_BUSINESS_LINKS = DEFAULT_BUSINESS_LINKS;
|
|
1124
|
+
exports.DEFAULT_BUSINESS_UKKO_LINKS = DEFAULT_BUSINESS_UKKO_LINKS;
|
|
1125
|
+
exports.DEFAULT_MDU_LINKS = DEFAULT_MDU_LINKS;
|
|
1126
|
+
exports.DEFAULT_PRIVATE_LINKS = DEFAULT_PRIVATE_LINKS;
|
|
1114
1127
|
exports.LOGGED_IN_LINKS = LOGGED_IN_LINKS;
|
|
1115
1128
|
exports.LOGGED_IN_LINKS_BUSINESS = LOGGED_IN_LINKS_BUSINESS;
|
|
1116
1129
|
exports.MDU_LINKS = MDU_LINKS;
|