@telia/teddy 0.0.59 → 0.0.60
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/card/card-button.cjs +1 -1
- package/dist/components/card/card-button.d.ts +3 -29
- package/dist/components/card/card-button.js +1 -1
- package/dist/components/card/index.d.ts +1 -25
- package/dist/components/icon/icon.cjs +9 -9
- package/dist/components/icon/icon.js +9 -9
- package/dist/components/notabene/notabene-root.cjs +16 -5
- package/dist/components/notabene/notabene-root.d.ts +2 -2
- package/dist/components/notabene/notabene-root.js +16 -5
- package/dist/style.css +13 -23
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ function getButtonVariant(variant) {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
const Button = React.forwardRef(
|
|
18
|
-
({ className, iconOnly
|
|
18
|
+
({ className, iconOnly, ...props }, forwardRef) => {
|
|
19
19
|
const context = React.useContext(components_card_card.RootContext);
|
|
20
20
|
const classes = clsx(
|
|
21
21
|
[components_card_card.styles[`${components_card_card.rootClassName}__button`]],
|
|
@@ -1,35 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonProps as PrimitiveButtonProps } from '../button';
|
|
3
3
|
|
|
4
|
-
export type ButtonProps =
|
|
5
|
-
variant?: React.ComponentPropsWithoutRef<typeof PrimitiveButton>['variant'];
|
|
6
|
-
};
|
|
4
|
+
export type ButtonProps = PrimitiveButtonProps;
|
|
7
5
|
/**
|
|
8
6
|
* The button element is used when you want a trigger in the card
|
|
9
7
|
* When this card button element is used, the entire card is clickable
|
|
10
8
|
*/
|
|
11
|
-
export declare const Button: React.ForwardRefExoticComponent<
|
|
12
|
-
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
13
|
-
} & {
|
|
14
|
-
asChild?: boolean | undefined;
|
|
15
|
-
loading?: boolean | undefined;
|
|
16
|
-
fullWidth?: boolean | undefined;
|
|
17
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
18
|
-
variant?: "text" | "text-negative" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
|
|
19
|
-
} & {
|
|
20
|
-
iconOnly: true;
|
|
21
|
-
"aria-label": string;
|
|
22
|
-
} & React.RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<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
|
-
} & {
|
|
25
|
-
asChild?: boolean | undefined;
|
|
26
|
-
loading?: boolean | undefined;
|
|
27
|
-
fullWidth?: boolean | undefined;
|
|
28
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
29
|
-
variant?: "text" | "text-negative" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
|
|
30
|
-
} & {
|
|
31
|
-
iconOnly?: false | undefined;
|
|
32
|
-
"aria-label"?: string | undefined;
|
|
33
|
-
} & React.RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
|
|
34
|
-
variant?: React.ComponentPropsWithoutRef<typeof PrimitiveButton>['variant'];
|
|
35
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export declare const Button: React.ForwardRefExoticComponent<PrimitiveButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -13,7 +13,7 @@ function getButtonVariant(variant) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
const Button = React__default.forwardRef(
|
|
16
|
-
({ className, iconOnly
|
|
16
|
+
({ className, iconOnly, ...props }, forwardRef) => {
|
|
17
17
|
const context = React__default.useContext(RootContext);
|
|
18
18
|
const classes = clsx(
|
|
19
19
|
[styles[`${rootClassName}__button`]],
|
|
@@ -10,31 +10,7 @@ import { FooterProps } from './card-footer';
|
|
|
10
10
|
|
|
11
11
|
export declare const Card: import('react').ForwardRefExoticComponent<RootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
12
12
|
Heading: import('react').ForwardRefExoticComponent<HeadingProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
13
|
-
Button: import('react').ForwardRefExoticComponent<
|
|
14
|
-
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
asChild?: boolean | undefined;
|
|
17
|
-
loading?: boolean | undefined;
|
|
18
|
-
fullWidth?: boolean | undefined;
|
|
19
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
20
|
-
variant?: "text" | "text-negative" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
|
|
21
|
-
} & {
|
|
22
|
-
iconOnly: true;
|
|
23
|
-
"aria-label": string;
|
|
24
|
-
} & 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 & {
|
|
25
|
-
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
asChild?: boolean | undefined;
|
|
28
|
-
loading?: boolean | undefined;
|
|
29
|
-
fullWidth?: boolean | undefined;
|
|
30
|
-
size?: "sm" | "md" | "lg" | undefined;
|
|
31
|
-
variant?: "text" | "text-negative" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
|
|
32
|
-
} & {
|
|
33
|
-
iconOnly?: false | undefined;
|
|
34
|
-
"aria-label"?: string | undefined;
|
|
35
|
-
} & import('react').RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
|
|
36
|
-
variant?: "text" | "text-negative" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "expressive-negative" | undefined;
|
|
37
|
-
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Button: import('react').ForwardRefExoticComponent<import('..').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
38
14
|
Content: import('react').ForwardRefExoticComponent<ContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
15
|
Illustration: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
40
16
|
inset?: "all" | "top" | "bottom" | "right" | "left" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-right-left" | "bottom-left-right" | "top-bottom" | "left-right" | undefined;
|
|
@@ -4,15 +4,15 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const iconsHref = require("../../assets/sprite.269ba410-teddy.svg");
|
|
5
5
|
const clsx = require("clsx");
|
|
6
6
|
const styles = {
|
|
7
|
-
"teddy-icon": "_teddy-
|
|
8
|
-
"teddy-icon--font": "_teddy-icon--
|
|
9
|
-
"teddy-icon--xxs": "_teddy-icon--
|
|
10
|
-
"teddy-icon--xs": "_teddy-icon--
|
|
11
|
-
"teddy-icon--sm": "_teddy-icon--
|
|
12
|
-
"teddy-icon--md": "_teddy-icon--
|
|
13
|
-
"teddy-icon--lg": "_teddy-icon--
|
|
14
|
-
"teddy-icon--xl": "_teddy-icon--
|
|
15
|
-
"teddy-icon-with-children": "_teddy-icon-with-
|
|
7
|
+
"teddy-icon": "_teddy-icon_1ur3a_2",
|
|
8
|
+
"teddy-icon--font": "_teddy-icon--font_1ur3a_8",
|
|
9
|
+
"teddy-icon--xxs": "_teddy-icon--xxs_1ur3a_12",
|
|
10
|
+
"teddy-icon--xs": "_teddy-icon--xs_1ur3a_16",
|
|
11
|
+
"teddy-icon--sm": "_teddy-icon--sm_1ur3a_20",
|
|
12
|
+
"teddy-icon--md": "_teddy-icon--md_1ur3a_24",
|
|
13
|
+
"teddy-icon--lg": "_teddy-icon--lg_1ur3a_28",
|
|
14
|
+
"teddy-icon--xl": "_teddy-icon--xl_1ur3a_32",
|
|
15
|
+
"teddy-icon-with-children": "_teddy-icon-with-children_1ur3a_36"
|
|
16
16
|
};
|
|
17
17
|
const rootClassName = "teddy-icon";
|
|
18
18
|
const rootClassNameWithChildren = `${rootClassName}-with-children`;
|
|
@@ -2,15 +2,15 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import iconsHref from "../../assets/sprite.269ba410-teddy.svg";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
const styles = {
|
|
5
|
-
"teddy-icon": "_teddy-
|
|
6
|
-
"teddy-icon--font": "_teddy-icon--
|
|
7
|
-
"teddy-icon--xxs": "_teddy-icon--
|
|
8
|
-
"teddy-icon--xs": "_teddy-icon--
|
|
9
|
-
"teddy-icon--sm": "_teddy-icon--
|
|
10
|
-
"teddy-icon--md": "_teddy-icon--
|
|
11
|
-
"teddy-icon--lg": "_teddy-icon--
|
|
12
|
-
"teddy-icon--xl": "_teddy-icon--
|
|
13
|
-
"teddy-icon-with-children": "_teddy-icon-with-
|
|
5
|
+
"teddy-icon": "_teddy-icon_1ur3a_2",
|
|
6
|
+
"teddy-icon--font": "_teddy-icon--font_1ur3a_8",
|
|
7
|
+
"teddy-icon--xxs": "_teddy-icon--xxs_1ur3a_12",
|
|
8
|
+
"teddy-icon--xs": "_teddy-icon--xs_1ur3a_16",
|
|
9
|
+
"teddy-icon--sm": "_teddy-icon--sm_1ur3a_20",
|
|
10
|
+
"teddy-icon--md": "_teddy-icon--md_1ur3a_24",
|
|
11
|
+
"teddy-icon--lg": "_teddy-icon--lg_1ur3a_28",
|
|
12
|
+
"teddy-icon--xl": "_teddy-icon--xl_1ur3a_32",
|
|
13
|
+
"teddy-icon-with-children": "_teddy-icon-with-children_1ur3a_36"
|
|
14
14
|
};
|
|
15
15
|
const rootClassName = "teddy-icon";
|
|
16
16
|
const rootClassNameWithChildren = `${rootClassName}-with-children`;
|
|
@@ -3,17 +3,28 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const clsx = require("clsx");
|
|
6
|
-
const
|
|
6
|
+
const components_flex_flex = require("../flex/flex.cjs");
|
|
7
7
|
const styles = {
|
|
8
|
-
"teddy-notabene": "_teddy-
|
|
9
|
-
"teddy-notabene__icon": "_teddy-
|
|
10
|
-
"teddy-notabene__heading": "_teddy-
|
|
8
|
+
"teddy-notabene": "_teddy-notabene_78ui9_1",
|
|
9
|
+
"teddy-notabene__icon": "_teddy-notabene__icon_78ui9_5",
|
|
10
|
+
"teddy-notabene__heading": "_teddy-notabene__heading_78ui9_5"
|
|
11
11
|
};
|
|
12
12
|
const rootClassName = "teddy-notabene";
|
|
13
13
|
const Root = React.forwardRef(
|
|
14
14
|
({ children, className, ...props }, forwardRef) => {
|
|
15
15
|
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
+
components_flex_flex.Flex,
|
|
18
|
+
{
|
|
19
|
+
gap: { sm: "150", md: "300" },
|
|
20
|
+
direction: { sm: "column", md: "row" },
|
|
21
|
+
p: { sm: "300", md: "400" },
|
|
22
|
+
...props,
|
|
23
|
+
ref: forwardRef,
|
|
24
|
+
className: classes,
|
|
25
|
+
children
|
|
26
|
+
}
|
|
27
|
+
);
|
|
17
28
|
}
|
|
18
29
|
);
|
|
19
30
|
Root.displayName = "Root";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Flex } from '../flex';
|
|
3
3
|
|
|
4
4
|
export declare const rootClassName = "teddy-notabene";
|
|
5
|
-
export type RootProps = Partial<React.ComponentPropsWithoutRef<typeof
|
|
5
|
+
export type RootProps = Partial<React.ComponentPropsWithoutRef<typeof Flex>>;
|
|
6
6
|
export declare const Root: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import {
|
|
4
|
+
import { Flex } from "../flex/flex.js";
|
|
5
5
|
const styles = {
|
|
6
|
-
"teddy-notabene": "_teddy-
|
|
7
|
-
"teddy-notabene__icon": "_teddy-
|
|
8
|
-
"teddy-notabene__heading": "_teddy-
|
|
6
|
+
"teddy-notabene": "_teddy-notabene_78ui9_1",
|
|
7
|
+
"teddy-notabene__icon": "_teddy-notabene__icon_78ui9_5",
|
|
8
|
+
"teddy-notabene__heading": "_teddy-notabene__heading_78ui9_5"
|
|
9
9
|
};
|
|
10
10
|
const rootClassName = "teddy-notabene";
|
|
11
11
|
const Root = React__default.forwardRef(
|
|
12
12
|
({ children, className, ...props }, forwardRef) => {
|
|
13
13
|
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Flex,
|
|
16
|
+
{
|
|
17
|
+
gap: { sm: "150", md: "300" },
|
|
18
|
+
direction: { sm: "column", md: "row" },
|
|
19
|
+
p: { sm: "300", md: "400" },
|
|
20
|
+
...props,
|
|
21
|
+
ref: forwardRef,
|
|
22
|
+
className: classes,
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
);
|
|
15
26
|
}
|
|
16
27
|
);
|
|
17
28
|
Root.displayName = "Root";
|
package/dist/style.css
CHANGED
|
@@ -140,40 +140,41 @@
|
|
|
140
140
|
color: inherit;
|
|
141
141
|
}
|
|
142
142
|
}@layer icon {
|
|
143
|
-
._teddy-
|
|
143
|
+
._teddy-icon_1ur3a_2 {
|
|
144
144
|
display: inline;
|
|
145
145
|
align-self: center;
|
|
146
146
|
fill: currentColor;
|
|
147
|
+
flex-shrink: 0;
|
|
147
148
|
}
|
|
148
|
-
._teddy-icon--
|
|
149
|
+
._teddy-icon--font_1ur3a_8 {
|
|
149
150
|
width: 1em;
|
|
150
151
|
height: 1em;
|
|
151
152
|
}
|
|
152
|
-
._teddy-icon--
|
|
153
|
+
._teddy-icon--xxs_1ur3a_12 {
|
|
153
154
|
width: var(--teddy-spacing-150);
|
|
154
155
|
height: var(--teddy-spacing-150);
|
|
155
156
|
}
|
|
156
|
-
._teddy-icon--
|
|
157
|
+
._teddy-icon--xs_1ur3a_16 {
|
|
157
158
|
width: var(--teddy-spacing-200);
|
|
158
159
|
height: var(--teddy-spacing-200);
|
|
159
160
|
}
|
|
160
|
-
._teddy-icon--
|
|
161
|
+
._teddy-icon--sm_1ur3a_20 {
|
|
161
162
|
width: var(--teddy-spacing-250);
|
|
162
163
|
height: var(--teddy-spacing-250);
|
|
163
164
|
}
|
|
164
|
-
._teddy-icon--
|
|
165
|
+
._teddy-icon--md_1ur3a_24 {
|
|
165
166
|
width: var(--teddy-spacing-300);
|
|
166
167
|
height: var(--teddy-spacing-300);
|
|
167
168
|
}
|
|
168
|
-
._teddy-icon--
|
|
169
|
+
._teddy-icon--lg_1ur3a_28 {
|
|
169
170
|
width: var(--teddy-spacing-400);
|
|
170
171
|
height: var(--teddy-spacing-400);
|
|
171
172
|
}
|
|
172
|
-
._teddy-icon--
|
|
173
|
+
._teddy-icon--xl_1ur3a_32 {
|
|
173
174
|
width: var(--teddy-spacing-600);
|
|
174
175
|
height: var(--teddy-spacing-600);
|
|
175
176
|
}
|
|
176
|
-
._teddy-icon-with-
|
|
177
|
+
._teddy-icon-with-children_1ur3a_36 {
|
|
177
178
|
display: inline-flex;
|
|
178
179
|
align-items: center;
|
|
179
180
|
font-family: var(--teddy-typography-family-default);
|
|
@@ -881,27 +882,16 @@
|
|
|
881
882
|
0% {
|
|
882
883
|
transform: translateX(-100%);
|
|
883
884
|
}
|
|
884
|
-
}._teddy-
|
|
885
|
-
padding: var(--teddy-spacing-300);
|
|
886
|
-
display: flex;
|
|
887
|
-
flex-direction: column;
|
|
888
|
-
gap: var(--teddy-spacing-150);
|
|
885
|
+
}._teddy-notabene_78ui9_1 {
|
|
889
886
|
background-color: var(--teddy-color-background-status-warning);
|
|
890
887
|
color: var(--teddy-color-text-default);
|
|
891
888
|
}
|
|
892
|
-
._teddy-
|
|
889
|
+
._teddy-notabene__icon_78ui9_5, ._teddy-notabene__heading_78ui9_5 {
|
|
893
890
|
color: var(--teddy-color-orange-600);
|
|
894
891
|
align-self: flex-start;
|
|
895
892
|
}
|
|
896
|
-
._teddy-
|
|
893
|
+
._teddy-notabene__icon_78ui9_5 {
|
|
897
894
|
flex-shrink: 0;
|
|
898
|
-
}
|
|
899
|
-
@media (min-width: 600px) {
|
|
900
|
-
._teddy-notabene_1kgqm_1 {
|
|
901
|
-
padding: var(--teddy-spacing-400);
|
|
902
|
-
flex-direction: row;
|
|
903
|
-
gap: var(--teddy-spacing-300);
|
|
904
|
-
}
|
|
905
895
|
}@layer heading {
|
|
906
896
|
._teddy-heading_r8os0_2 {
|
|
907
897
|
color: var(--teddy-color-text-default);
|