@telia/teddy 0.0.19 → 0.0.20
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.d.ts +9 -7
- package/dist/components/card/card.js +51 -41
- package/dist/components/chip/chip-indicator.d.ts +1 -1
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/image/image.d.ts +11 -0
- package/dist/components/image/image.js +17 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/image/index.js +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/modal/modal.js +1 -0
- package/dist/components/notification/notification.d.ts +4 -1
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/main.js +2 -0
- package/dist/style.css +159 -57
- package/dist/utils/generate-styling/index.d.ts +26 -2
- package/dist/utils/generate-styling/index.js +7 -5
- package/dist/utils/generate-styling/justify.d.ts +6 -0
- package/dist/utils/generate-styling/justify.js +2 -1
- package/dist/utils/generate-styling/object-fit.d.ts +45 -0
- package/dist/utils/generate-styling/object-fit.js +18 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import { Grid } from '../grid';
|
|
|
7
7
|
|
|
8
8
|
declare const variantOptions: readonly ["purple-light", "purple-dark", "gray", "white", "beige"];
|
|
9
9
|
type Variant = (typeof variantOptions)[number];
|
|
10
|
+
type Layout = 'navigation-vertical' | 'navigation-horizontal-small' | 'navigation-horizontal-large' | 'rich-card';
|
|
10
11
|
/** -------------------------------------------------------------------------------------------------
|
|
11
12
|
* Root
|
|
12
13
|
* -----------------------------------------------------------------------------------------------*/
|
|
@@ -16,6 +17,7 @@ type RootProps = React.ComponentPropsWithoutRef<typeof Grid> & {
|
|
|
16
17
|
bordered?: boolean;
|
|
17
18
|
shadow?: boolean;
|
|
18
19
|
backgroundImageSrc?: string;
|
|
20
|
+
layout?: Layout;
|
|
19
21
|
};
|
|
20
22
|
/** -------------------------------------------------------------------------------------------------
|
|
21
23
|
* Heading
|
|
@@ -24,7 +26,7 @@ type HeadingProps = Partial<React.ComponentPropsWithoutRef<typeof PrimitiveHeadi
|
|
|
24
26
|
/** -------------------------------------------------------------------------------------------------
|
|
25
27
|
* Content
|
|
26
28
|
* -----------------------------------------------------------------------------------------------*/
|
|
27
|
-
type ContentProps = React.ComponentPropsWithoutRef<
|
|
29
|
+
type ContentProps = React.ComponentPropsWithoutRef<typeof Box>;
|
|
28
30
|
/** -------------------------------------------------------------------------------------------------
|
|
29
31
|
* Slot
|
|
30
32
|
* -----------------------------------------------------------------------------------------------*/
|
|
@@ -32,10 +34,10 @@ type SlotProps = React.ComponentPropsWithoutRef<typeof Box> & {
|
|
|
32
34
|
align?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
33
35
|
};
|
|
34
36
|
/** -------------------------------------------------------------------------------------------------
|
|
35
|
-
*
|
|
37
|
+
* Illustration
|
|
36
38
|
* -----------------------------------------------------------------------------------------------*/
|
|
37
39
|
declare const insetOptions: readonly ["top", "bottom", "left", "right", "all", "top-right-left", "bottom-left-right", "top-left", "top-right", "bottom-left", "bottom-right", "top-bottom", "left-right"];
|
|
38
|
-
type
|
|
40
|
+
type IllustrationProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
39
41
|
/** The inset allows make the image bleed out to the edges */
|
|
40
42
|
inset?: (typeof insetOptions)[number];
|
|
41
43
|
};
|
|
@@ -53,11 +55,11 @@ type LineProps = Omit<React.ComponentPropsWithoutRef<typeof Box>, 'asChild' | 'a
|
|
|
53
55
|
declare const Card: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>> & {
|
|
54
56
|
Root: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
57
|
Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
56
|
-
Content: React.ForwardRefExoticComponent<
|
|
57
|
-
|
|
58
|
+
Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
Illustration: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
58
60
|
/** The inset allows make the image bleed out to the edges */
|
|
59
61
|
inset?: "top" | "bottom" | "left" | "right" | "all" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-right-left" | "bottom-left-right" | "top-bottom" | "left-right" | undefined;
|
|
60
|
-
} & React.RefAttributes<
|
|
62
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
61
63
|
Button: React.ForwardRefExoticComponent<Omit<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 & {
|
|
62
64
|
asChild?: boolean | undefined;
|
|
63
65
|
loading?: boolean | undefined;
|
|
@@ -96,7 +98,7 @@ type CardProps = {
|
|
|
96
98
|
Heading: HeadingProps;
|
|
97
99
|
Content: ContentProps;
|
|
98
100
|
Button: ButtonProps;
|
|
99
|
-
|
|
101
|
+
Illustration: IllustrationProps;
|
|
100
102
|
Slot: SlotProps;
|
|
101
103
|
Link: LinkProps;
|
|
102
104
|
Line: LineProps;
|
|
@@ -10,36 +10,42 @@ import { Link as Link$1 } from "../link/link.js";
|
|
|
10
10
|
import { teddySpacing50 } from "../../tokens/spacing/variables.js";
|
|
11
11
|
import { Grid } from "../grid/grid.js";
|
|
12
12
|
const styles = {
|
|
13
|
-
"teddy-card": "_teddy-
|
|
14
|
-
"teddy-card__slot": "_teddy-
|
|
15
|
-
"teddy-card__slot--bottom": "_teddy-card__slot--
|
|
16
|
-
"teddy-card__slot--center": "_teddy-card__slot--
|
|
17
|
-
"teddy-card--shadow": "_teddy-card--
|
|
18
|
-
"teddy-card__action": "_teddy-
|
|
19
|
-
"teddy-card__action--disabled": "_teddy-card__action--
|
|
20
|
-
"teddy-card--border": "_teddy-card--
|
|
21
|
-
"teddy-
|
|
22
|
-
"teddy-
|
|
23
|
-
"teddy-
|
|
24
|
-
"teddy-
|
|
25
|
-
"teddy-card--
|
|
26
|
-
"teddy-card--
|
|
27
|
-
"teddy-
|
|
28
|
-
"teddy-
|
|
29
|
-
"teddy-
|
|
30
|
-
"teddy-
|
|
31
|
-
"teddy-
|
|
32
|
-
"teddy-
|
|
33
|
-
"teddy-
|
|
34
|
-
"teddy-
|
|
35
|
-
"teddy-
|
|
13
|
+
"teddy-card": "_teddy-card_aok47_3",
|
|
14
|
+
"teddy-card__slot": "_teddy-card__slot_aok47_13",
|
|
15
|
+
"teddy-card__slot--bottom": "_teddy-card__slot--bottom_aok47_16",
|
|
16
|
+
"teddy-card__slot--center": "_teddy-card__slot--center_aok47_19",
|
|
17
|
+
"teddy-card--shadow": "_teddy-card--shadow_aok47_41",
|
|
18
|
+
"teddy-card__action": "_teddy-card__action_aok47_45",
|
|
19
|
+
"teddy-card__action--disabled": "_teddy-card__action--disabled_aok47_45",
|
|
20
|
+
"teddy-card--border": "_teddy-card--border_aok47_52",
|
|
21
|
+
"teddy-card--layout": "_teddy-card--layout_aok47_55",
|
|
22
|
+
"teddy-card__illustration": "_teddy-card__illustration_aok47_55",
|
|
23
|
+
"teddy-card__content": "_teddy-card__content_aok47_58",
|
|
24
|
+
"teddy-card__heading": "_teddy-card__heading_aok47_61",
|
|
25
|
+
"teddy-card--navigation-vertical": "_teddy-card--navigation-vertical_aok47_67",
|
|
26
|
+
"teddy-card--navigation-horizontal-small": "_teddy-card--navigation-horizontal-small_aok47_86",
|
|
27
|
+
"teddy-card--navigation-horizontal-large": "_teddy-card--navigation-horizontal-large_aok47_98",
|
|
28
|
+
"teddy-card--rich-card": "_teddy-card--rich-card_aok47_110",
|
|
29
|
+
"teddy-card__line": "_teddy-card__line_aok47_128",
|
|
30
|
+
"teddy-card--purple-light": "_teddy-card--purple-light_aok47_132",
|
|
31
|
+
"teddy-card--purple-dark": "_teddy-card--purple-dark_aok47_146",
|
|
32
|
+
"teddy-card--white": "_teddy-card--white_aok47_165",
|
|
33
|
+
"teddy-card--gray": "_teddy-card--gray_aok47_179",
|
|
34
|
+
"teddy-card--beige": "_teddy-card--beige_aok47_193",
|
|
35
|
+
"teddy-card__image--as-background": "_teddy-card__image--as-background_aok47_207",
|
|
36
|
+
"teddy-card--background-image": "_teddy-card--background-image_aok47_213",
|
|
37
|
+
"teddy-card__inset": "_teddy-card__inset_aok47_218",
|
|
38
|
+
"teddy-card__inset--top": "_teddy-card__inset--top_aok47_221",
|
|
39
|
+
"teddy-card__inset--left": "_teddy-card__inset--left_aok47_224",
|
|
40
|
+
"teddy-card__inset--right": "_teddy-card__inset--right_aok47_227",
|
|
41
|
+
"teddy-card__inset--bottom": "_teddy-card__inset--bottom_aok47_230"
|
|
36
42
|
};
|
|
37
43
|
const rootClassName = "teddy-card";
|
|
38
44
|
const actionElementIdentifier = `${rootClassName}__action`;
|
|
39
45
|
const variantOptions = ["purple-light", "purple-dark", "gray", "white", "beige"];
|
|
40
46
|
const RootContext = React__default.createContext(void 0);
|
|
41
47
|
const Root = React__default.forwardRef(
|
|
42
|
-
({ className, children, shadow, backgroundImageSrc, variant, bordered, ...props }, forwardRef) => {
|
|
48
|
+
({ className, children, shadow, backgroundImageSrc, layout, variant, bordered, ...props }, forwardRef) => {
|
|
43
49
|
const buttonRef = React__default.useRef(null);
|
|
44
50
|
const linkRef = React__default.useRef(null);
|
|
45
51
|
const classes = clsx(
|
|
@@ -48,11 +54,13 @@ const Root = React__default.forwardRef(
|
|
|
48
54
|
[styles[`${rootClassName}--${variant}`]]: variant,
|
|
49
55
|
[styles[`${rootClassName}--border`]]: bordered,
|
|
50
56
|
[styles[`${rootClassName}--shadow`]]: shadow,
|
|
51
|
-
[styles[`${rootClassName}--background-image`]]: backgroundImageSrc
|
|
57
|
+
[styles[`${rootClassName}--background-image`]]: backgroundImageSrc,
|
|
58
|
+
[styles[`${rootClassName}--layout`]]: layout,
|
|
59
|
+
[styles[`${rootClassName}--${layout}`]]: layout
|
|
52
60
|
},
|
|
53
61
|
className
|
|
54
62
|
);
|
|
55
|
-
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { buttonRef, linkRef, variant }, children: /* @__PURE__ */ jsx(
|
|
63
|
+
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { buttonRef, linkRef, variant, layout }, children: /* @__PURE__ */ jsx(
|
|
56
64
|
Grid,
|
|
57
65
|
{
|
|
58
66
|
...props,
|
|
@@ -74,8 +82,9 @@ const Root = React__default.forwardRef(
|
|
|
74
82
|
);
|
|
75
83
|
Root.displayName = "Card";
|
|
76
84
|
const Heading = React__default.forwardRef(
|
|
77
|
-
({ className,
|
|
85
|
+
({ className, as = "h2", ...props }, forwardRef) => {
|
|
78
86
|
const classes = clsx([styles[`${rootClassName}__heading`]], className);
|
|
87
|
+
const variant = props.variant ?? "title-200";
|
|
79
88
|
return /* @__PURE__ */ jsx(
|
|
80
89
|
Heading$1,
|
|
81
90
|
{
|
|
@@ -91,7 +100,7 @@ const Heading = React__default.forwardRef(
|
|
|
91
100
|
Heading.displayName = "Card.Heading";
|
|
92
101
|
const Content = React__default.forwardRef(({ className, ...props }, forwardRef) => {
|
|
93
102
|
const classes = clsx([styles[`${rootClassName}__content`]], className);
|
|
94
|
-
return /* @__PURE__ */ jsx(
|
|
103
|
+
return /* @__PURE__ */ jsx(Box, { ...props, ref: forwardRef, className: classes });
|
|
95
104
|
});
|
|
96
105
|
Content.displayName = "Card.Content";
|
|
97
106
|
const Slot = React__default.forwardRef(({ className, align, ...props }, forwardRef) => {
|
|
@@ -134,18 +143,19 @@ const insetOptions = [
|
|
|
134
143
|
"top-bottom",
|
|
135
144
|
"left-right"
|
|
136
145
|
];
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
146
|
+
const Illustration = React__default.forwardRef(
|
|
147
|
+
({ className, children, ...props }, forwardRef) => {
|
|
148
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
149
|
+
const classes = clsx([styles[`${rootClassName}__illustration`]], className, [styles[`${rootClassName}__inset`]], {
|
|
150
|
+
[styles[`${rootClassName}__inset--top`]]: ((_a = props.inset) == null ? void 0 : _a.includes("top")) || ((_b = props.inset) == null ? void 0 : _b.includes("all")),
|
|
151
|
+
[styles[`${rootClassName}__inset--bottom`]]: ((_c = props.inset) == null ? void 0 : _c.includes("bottom")) || ((_d = props.inset) == null ? void 0 : _d.includes("all")),
|
|
152
|
+
[styles[`${rootClassName}__inset--left`]]: ((_e = props.inset) == null ? void 0 : _e.includes("left")) || ((_f = props.inset) == null ? void 0 : _f.includes("all")),
|
|
153
|
+
[styles[`${rootClassName}__inset--right`]]: ((_g = props.inset) == null ? void 0 : _g.includes("right")) || ((_h = props.inset) == null ? void 0 : _h.includes("all"))
|
|
154
|
+
});
|
|
155
|
+
return /* @__PURE__ */ jsx("div", { ...props, className: classes, ref: forwardRef, children });
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
Illustration.displayName = "Card.Illustration";
|
|
149
159
|
function getButtonVariant(variant) {
|
|
150
160
|
switch (variant) {
|
|
151
161
|
case "purple-dark":
|
|
@@ -196,7 +206,7 @@ const Card = Object.assign(Root, {
|
|
|
196
206
|
Root,
|
|
197
207
|
Heading,
|
|
198
208
|
Content,
|
|
199
|
-
|
|
209
|
+
Illustration,
|
|
200
210
|
Button,
|
|
201
211
|
Link,
|
|
202
212
|
Slot,
|
|
@@ -3,7 +3,7 @@ import { Icon } from '../icon';
|
|
|
3
3
|
|
|
4
4
|
export type IndicatorProps = Partial<React.ComponentPropsWithoutRef<typeof Icon>>;
|
|
5
5
|
export declare const Indicator: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
6
|
-
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" | "shuffle" | "
|
|
6
|
+
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" | "sync" | "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" | "shuffle" | "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";
|
|
7
7
|
size?: ("sm" | "md" | "lg" | "xl" | "font" | "xxs" | "xs") | undefined;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -5,7 +5,7 @@ import { ItemProps } from './chip-item';
|
|
|
5
5
|
export declare const Chip: import('react').ForwardRefExoticComponent<RootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
6
6
|
Item: import('react').ForwardRefExoticComponent<ItemProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
Indicator: import('react').ForwardRefExoticComponent<Partial<Omit<import('react').SVGProps<SVGSVGElement> & {
|
|
8
|
-
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" | "shuffle" | "
|
|
8
|
+
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" | "sync" | "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" | "shuffle" | "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";
|
|
9
9
|
size?: ("sm" | "md" | "lg" | "xl" | "font" | "xxs" | "xs") | undefined;
|
|
10
10
|
children?: import('react').ReactNode;
|
|
11
11
|
}, "ref">> & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ImageStylingProps } from '../../utils/generate-styling';
|
|
3
|
+
|
|
4
|
+
/** -------------------------------------------------------------------------------------------------
|
|
5
|
+
* Image
|
|
6
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
7
|
+
type ImageProps = React.ComponentPropsWithoutRef<'img'> & ImageStylingProps;
|
|
8
|
+
/** */
|
|
9
|
+
declare const Image: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & 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 & import('../../utils/generate-styling/object-fit').ObjectFitProps & React.RefAttributes<HTMLImageElement>>;
|
|
10
|
+
export { Image };
|
|
11
|
+
export type { ImageProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { extractProps } from "../../utils/generate-styling/index.js";
|
|
5
|
+
const styles = {
|
|
6
|
+
"teddy-image": "_teddy-image_oyxp8_1"
|
|
7
|
+
};
|
|
8
|
+
const rootClassName = "teddy-image";
|
|
9
|
+
const Image = React__default.forwardRef((props, forwardRef) => {
|
|
10
|
+
const { className, ...rest } = extractProps(props);
|
|
11
|
+
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
12
|
+
return /* @__PURE__ */ jsx("img", { ...rest, ref: forwardRef, className: classes });
|
|
13
|
+
});
|
|
14
|
+
Image.displayName = "Image";
|
|
15
|
+
export {
|
|
16
|
+
Image
|
|
17
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Image } from "./image/image.js";
|
|
1
2
|
import { Chip } from "./chip/index.js";
|
|
2
3
|
import { Modal } from "./modal/modal.js";
|
|
3
4
|
import { Notification } from "./notification/notification.js";
|
|
@@ -37,6 +38,7 @@ export {
|
|
|
37
38
|
Heading,
|
|
38
39
|
HelperText,
|
|
39
40
|
Icon,
|
|
41
|
+
Image,
|
|
40
42
|
Input,
|
|
41
43
|
InputGroup,
|
|
42
44
|
Label,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useEffect } from "react";
|
|
3
3
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import "../image/image.js";
|
|
4
5
|
import "../chip/index.js";
|
|
5
6
|
import "../notification/notification.js";
|
|
6
7
|
import "../radio-group/radio-group.js";
|
|
@@ -43,6 +43,7 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
43
43
|
bordered?: boolean | undefined;
|
|
44
44
|
shadow?: boolean | undefined;
|
|
45
45
|
backgroundImageSrc?: string | undefined;
|
|
46
|
+
layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
|
|
46
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 & import('../../utils/generate-styling/gap').GapProps & {
|
|
47
48
|
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
48
49
|
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
@@ -55,6 +56,7 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
55
56
|
bordered?: boolean | undefined;
|
|
56
57
|
shadow?: boolean | undefined;
|
|
57
58
|
backgroundImageSrc?: string | undefined;
|
|
59
|
+
layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
|
|
58
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 & import('../../utils/generate-styling/gap').GapProps & {
|
|
59
61
|
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
60
62
|
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
@@ -67,6 +69,7 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
67
69
|
bordered?: boolean | undefined;
|
|
68
70
|
shadow?: boolean | undefined;
|
|
69
71
|
backgroundImageSrc?: string | undefined;
|
|
72
|
+
layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
|
|
70
73
|
} & React.RefAttributes<HTMLDivElement>, "ref">, "as" | "variant"> & {
|
|
71
74
|
variant?: "error" | "warning" | "success" | "information" | undefined;
|
|
72
75
|
open?: boolean | undefined;
|
|
@@ -77,7 +80,7 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
|
|
|
77
80
|
Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
78
81
|
Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
79
82
|
Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
80
|
-
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" | "shuffle" | "
|
|
83
|
+
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" | "sync" | "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" | "shuffle" | "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";
|
|
81
84
|
size?: ("sm" | "md" | "lg" | "xl" | "font" | "xxs" | "xs") | undefined;
|
|
82
85
|
children?: React.ReactNode;
|
|
83
86
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -29,7 +29,7 @@ declare const Toggle: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHT
|
|
|
29
29
|
Input: React.ForwardRefExoticComponent<ToggleInputProps & React.RefAttributes<HTMLButtonElement>>;
|
|
30
30
|
Thumb: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchThumbProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
31
31
|
Indicator: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
32
|
-
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" | "shuffle" | "
|
|
32
|
+
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" | "sync" | "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" | "shuffle" | "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";
|
|
33
33
|
size?: ("sm" | "md" | "lg" | "xl" | "font" | "xxs" | "xs") | undefined;
|
|
34
34
|
children?: React.ReactNode;
|
|
35
35
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
package/dist/main.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Image } from "./components/image/image.js";
|
|
1
2
|
import { Chip } from "./components/chip/index.js";
|
|
2
3
|
import { Modal } from "./components/modal/modal.js";
|
|
3
4
|
import { Notification } from "./components/notification/notification.js";
|
|
@@ -44,6 +45,7 @@ export {
|
|
|
44
45
|
Heading,
|
|
45
46
|
HelperText,
|
|
46
47
|
Icon,
|
|
48
|
+
Image,
|
|
47
49
|
Input,
|
|
48
50
|
InputGroup,
|
|
49
51
|
Label,
|
package/dist/style.css
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
._teddy-image_oyxp8_1 {
|
|
2
|
+
width: 100%;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
display: block;
|
|
6
|
+
font-style: italic;
|
|
7
|
+
background-repeat: no-repeat;
|
|
8
|
+
}@layer flex {
|
|
2
9
|
._teddy-flex_19teo_2 {
|
|
3
10
|
box-sizing: border-box;
|
|
4
11
|
display: flex;
|
|
@@ -700,31 +707,31 @@
|
|
|
700
707
|
justify-content: start;
|
|
701
708
|
grid-template-rows: none;
|
|
702
709
|
}
|
|
703
|
-
}@layer heading, button, card;
|
|
710
|
+
}@layer heading, flex, grid, button, card;
|
|
704
711
|
@layer card {
|
|
705
|
-
._teddy-
|
|
712
|
+
._teddy-card_aok47_3 {
|
|
706
713
|
border-radius: var(--teddy-border-radius-md);
|
|
707
714
|
padding: var(--teddy-spacing-250);
|
|
708
715
|
position: relative;
|
|
709
716
|
}
|
|
710
717
|
@media (prefers-reduced-motion: no-preference) {
|
|
711
|
-
._teddy-
|
|
718
|
+
._teddy-card_aok47_3 {
|
|
712
719
|
transition: background-color var(--teddy-motion-duration-300) ease;
|
|
713
720
|
}
|
|
714
721
|
}
|
|
715
|
-
._teddy-
|
|
722
|
+
._teddy-card__slot_aok47_13 {
|
|
716
723
|
transform: translateY(-50%);
|
|
717
724
|
}
|
|
718
|
-
._teddy-card__slot--
|
|
725
|
+
._teddy-card__slot--bottom_aok47_16 {
|
|
719
726
|
transform: translateY(50%);
|
|
720
727
|
}
|
|
721
|
-
._teddy-card__slot--
|
|
728
|
+
._teddy-card__slot--center_aok47_19 {
|
|
722
729
|
transform: translate(-50%, -50%);
|
|
723
730
|
}
|
|
724
|
-
._teddy-card__slot--
|
|
731
|
+
._teddy-card__slot--bottom_aok47_16._teddy-card__slot--center_aok47_19 {
|
|
725
732
|
transform: translate(-50%, 50%);
|
|
726
733
|
}
|
|
727
|
-
._teddy-
|
|
734
|
+
._teddy-card_aok47_3::before {
|
|
728
735
|
content: "";
|
|
729
736
|
display: block;
|
|
730
737
|
position: absolute;
|
|
@@ -735,141 +742,213 @@
|
|
|
735
742
|
box-shadow: var(--teddy-shadow-md);
|
|
736
743
|
}
|
|
737
744
|
@media (prefers-reduced-motion: no-preference) {
|
|
738
|
-
._teddy-
|
|
745
|
+
._teddy-card_aok47_3::before {
|
|
739
746
|
transition: var(--teddy-motion-duration-300) ease;
|
|
740
747
|
transition-property: opacity, box-shadow;
|
|
741
748
|
}
|
|
742
749
|
}
|
|
743
|
-
._teddy-card--
|
|
750
|
+
._teddy-card--shadow_aok47_41::before {
|
|
744
751
|
opacity: 1;
|
|
745
752
|
box-shadow: var(--teddy-shadow-sm-2);
|
|
746
753
|
}
|
|
747
|
-
._teddy-
|
|
754
|
+
._teddy-card_aok47_3:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
748
755
|
cursor: pointer;
|
|
749
756
|
}
|
|
750
|
-
._teddy-
|
|
757
|
+
._teddy-card_aok47_3:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)):hover:not(:has(button:hover), :has(a:hover)):has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45))::before {
|
|
751
758
|
opacity: 1;
|
|
752
759
|
box-shadow: var(--teddy-shadow-md);
|
|
753
760
|
}
|
|
754
|
-
._teddy-card--
|
|
761
|
+
._teddy-card--border_aok47_52 {
|
|
755
762
|
border: var(--teddy-border-width-xs) solid transparent;
|
|
756
763
|
}
|
|
757
|
-
._teddy-
|
|
764
|
+
._teddy-card--layout_aok47_55 ._teddy-card__illustration_aok47_55 {
|
|
765
|
+
grid-area: illustration;
|
|
766
|
+
}
|
|
767
|
+
._teddy-card--layout_aok47_55 ._teddy-card__content_aok47_58 {
|
|
768
|
+
grid-area: content;
|
|
769
|
+
}
|
|
770
|
+
._teddy-card--layout_aok47_55 ._teddy-card__heading_aok47_61 {
|
|
771
|
+
grid-area: heading;
|
|
772
|
+
}
|
|
773
|
+
._teddy-card--layout_aok47_55 ._teddy-card__action_aok47_45 {
|
|
774
|
+
grid-area: action;
|
|
775
|
+
}
|
|
776
|
+
._teddy-card--navigation-vertical_aok47_67 {
|
|
777
|
+
grid-template-rows: auto auto 1fr auto;
|
|
778
|
+
justify-items: start;
|
|
779
|
+
align-items: baseline;
|
|
780
|
+
grid-template-areas: "illustration" "heading" "content" "action";
|
|
781
|
+
}
|
|
782
|
+
._teddy-card--navigation-vertical_aok47_67 ._teddy-card__illustration_aok47_55 {
|
|
783
|
+
margin-bottom: var(--teddy-spacing-200);
|
|
784
|
+
}
|
|
785
|
+
._teddy-card--navigation-vertical_aok47_67 ._teddy-card__content_aok47_58 {
|
|
786
|
+
margin-bottom: var(--teddy-spacing-200);
|
|
787
|
+
}
|
|
788
|
+
._teddy-card--navigation-vertical_aok47_67 ._teddy-card__heading_aok47_61 {
|
|
789
|
+
margin-bottom: var(--teddy-spacing-100);
|
|
790
|
+
}
|
|
791
|
+
._teddy-card--navigation-vertical_aok47_67 ._teddy-card__action_aok47_45 {
|
|
792
|
+
margin-top: auto;
|
|
793
|
+
place-self: end;
|
|
794
|
+
}
|
|
795
|
+
._teddy-card--navigation-horizontal-small_aok47_86 {
|
|
796
|
+
grid-template-columns: auto 1fr auto;
|
|
797
|
+
grid-template-rows: auto 1fr;
|
|
798
|
+
grid-template-areas: "illustration heading action" "illustration content action";
|
|
799
|
+
column-gap: var(--teddy-spacing-200);
|
|
800
|
+
}
|
|
801
|
+
._teddy-card--navigation-horizontal-small_aok47_86 ._teddy-card__heading_aok47_61 {
|
|
802
|
+
margin-bottom: var(--teddy-spacing-100);
|
|
803
|
+
}
|
|
804
|
+
._teddy-card--navigation-horizontal-small_aok47_86 ._teddy-card__action_aok47_45 {
|
|
805
|
+
margin-top: auto;
|
|
806
|
+
}
|
|
807
|
+
._teddy-card--navigation-horizontal-large_aok47_98 {
|
|
808
|
+
grid-template-columns: 1fr auto;
|
|
809
|
+
grid-template-rows: auto auto 1fr;
|
|
810
|
+
grid-template-areas: "illustration action" "heading action" "content action";
|
|
811
|
+
column-gap: var(--teddy-spacing-200);
|
|
812
|
+
}
|
|
813
|
+
._teddy-card--navigation-horizontal-large_aok47_98 ._teddy-card__heading_aok47_61 {
|
|
814
|
+
margin-bottom: var(--teddy-spacing-100);
|
|
815
|
+
}
|
|
816
|
+
._teddy-card--navigation-horizontal-large_aok47_98 ._teddy-card__action_aok47_45 {
|
|
817
|
+
margin-top: auto;
|
|
818
|
+
}
|
|
819
|
+
._teddy-card--rich-card_aok47_110 {
|
|
820
|
+
justify-items: start;
|
|
821
|
+
align-items: baseline;
|
|
822
|
+
grid-template-rows: auto auto 1fr auto;
|
|
823
|
+
grid-template-areas: "illustration" "heading" "content" "action";
|
|
824
|
+
}
|
|
825
|
+
._teddy-card--rich-card_aok47_110 ._teddy-card__illustration_aok47_55 {
|
|
826
|
+
margin-bottom: var(--teddy-spacing-200);
|
|
827
|
+
}
|
|
828
|
+
._teddy-card--rich-card_aok47_110 ._teddy-card__content_aok47_58 {
|
|
829
|
+
margin-bottom: var(--teddy-spacing-200);
|
|
830
|
+
}
|
|
831
|
+
._teddy-card--rich-card_aok47_110 ._teddy-card__heading_aok47_61 {
|
|
832
|
+
margin-bottom: var(--teddy-spacing-100);
|
|
833
|
+
}
|
|
834
|
+
._teddy-card--rich-card_aok47_110 ._teddy-card__action_aok47_45 {
|
|
835
|
+
margin-top: auto;
|
|
836
|
+
}
|
|
837
|
+
._teddy-card__line_aok47_128 {
|
|
758
838
|
border: 0;
|
|
759
839
|
border-top: var(--teddy-border-width-xs) solid var(--teddy-color-border-weak);
|
|
760
840
|
}
|
|
761
|
-
._teddy-card--purple-
|
|
841
|
+
._teddy-card--purple-light_aok47_132 {
|
|
762
842
|
background-color: var(--teddy-color-background-interactive-primary-negative);
|
|
763
843
|
color: var(--teddy-color-text-default);
|
|
764
844
|
border-color: var(--teddy-color-background-interactive-primary-negative);
|
|
765
845
|
}
|
|
766
|
-
._teddy-card--purple-
|
|
846
|
+
._teddy-card--purple-light_aok47_132:hover:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
767
847
|
background-color: var(--teddy-color-background-interactive-primary-negative-hover);
|
|
768
848
|
}
|
|
769
|
-
._teddy-card--purple-
|
|
849
|
+
._teddy-card--purple-light_aok47_132:active:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
770
850
|
background-color: var(--teddy-color-background-interactive-primary-negative-active);
|
|
771
851
|
}
|
|
772
|
-
._teddy-card--purple-
|
|
852
|
+
._teddy-card--purple-light_aok47_132:has(._teddy-card__action--disabled_aok47_45) {
|
|
773
853
|
background-color: var(--teddy-color-background-interactive-disabled);
|
|
774
854
|
}
|
|
775
|
-
._teddy-card--purple-
|
|
855
|
+
._teddy-card--purple-dark_aok47_146 {
|
|
776
856
|
background-color: var(--teddy-color-brand-deep-purple);
|
|
777
857
|
color: var(--teddy-color-text-default-negative);
|
|
778
858
|
border-color: var(--teddy-color-brand-deep-purple);
|
|
779
859
|
}
|
|
780
|
-
._teddy-card--purple-
|
|
860
|
+
._teddy-card--purple-dark_aok47_146:hover:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
781
861
|
background-color: var(--teddy-color-background-interactive-transparent-negative-hover);
|
|
782
862
|
}
|
|
783
|
-
._teddy-card--purple-
|
|
863
|
+
._teddy-card--purple-dark_aok47_146:active:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
784
864
|
background-color: var(--teddy-color-background-interactive-transparent-negative-active);
|
|
785
865
|
}
|
|
786
|
-
._teddy-card--purple-
|
|
866
|
+
._teddy-card--purple-dark_aok47_146:has(._teddy-card__action--disabled_aok47_45) {
|
|
787
867
|
color: var(--teddy-color-text-default);
|
|
788
868
|
background-color: var(--teddy-color-background-interactive-disabled);
|
|
789
869
|
}
|
|
790
|
-
._teddy-card--purple-
|
|
870
|
+
._teddy-card--purple-dark_aok47_146:has(._teddy-card__action--disabled_aok47_45) ._teddy-card__action_aok47_45 {
|
|
791
871
|
color: var(--teddy-color-text-weak);
|
|
792
872
|
background-color: var(--teddy-color-background-interactive-disabled);
|
|
793
873
|
}
|
|
794
|
-
._teddy-card--
|
|
874
|
+
._teddy-card--white_aok47_165 {
|
|
795
875
|
background-color: var(--teddy-color-brand-white);
|
|
796
876
|
color: var(--teddy-color-text-default);
|
|
797
877
|
border-color: var(--teddy-color-border-interactive-subtle);
|
|
798
878
|
}
|
|
799
|
-
._teddy-card--
|
|
879
|
+
._teddy-card--white_aok47_165:hover:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
800
880
|
background-color: var(--teddy-color-background-interactive-transparent-hover);
|
|
801
881
|
}
|
|
802
|
-
._teddy-card--
|
|
882
|
+
._teddy-card--white_aok47_165:active:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
803
883
|
background-color: var(--teddy-color-background-interactive-transparent-active);
|
|
804
884
|
}
|
|
805
|
-
._teddy-card--
|
|
885
|
+
._teddy-card--white_aok47_165:has(._teddy-card__action--disabled_aok47_45) {
|
|
806
886
|
background-color: var(--teddy-color-background-interactive-disabled);
|
|
807
887
|
}
|
|
808
|
-
._teddy-card--
|
|
888
|
+
._teddy-card--gray_aok47_179 {
|
|
809
889
|
background-color: var(--teddy-color-background-secondary);
|
|
810
890
|
color: var(--teddy-color-text-default);
|
|
811
891
|
border-color: var(--teddy-color-border-interactive-subtle);
|
|
812
892
|
}
|
|
813
|
-
._teddy-card--
|
|
893
|
+
._teddy-card--gray_aok47_179:hover:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
814
894
|
background-color: var(--teddy-color-gray-100);
|
|
815
895
|
}
|
|
816
|
-
._teddy-card--
|
|
896
|
+
._teddy-card--gray_aok47_179:active:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
817
897
|
background-color: var(--teddy-color-gray-200);
|
|
818
898
|
}
|
|
819
|
-
._teddy-card--
|
|
899
|
+
._teddy-card--gray_aok47_179:has(._teddy-card__action--disabled_aok47_45) {
|
|
820
900
|
background-color: var(--teddy-color-background-interactive-disabled);
|
|
821
901
|
}
|
|
822
|
-
._teddy-card--
|
|
902
|
+
._teddy-card--beige_aok47_193 {
|
|
823
903
|
background-color: var(--teddy-color-beige-100);
|
|
824
904
|
color: var(--teddy-color-text-default);
|
|
825
905
|
border-color: var(--teddy-color-beige-300);
|
|
826
906
|
}
|
|
827
|
-
._teddy-card--
|
|
907
|
+
._teddy-card--beige_aok47_193:hover:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
828
908
|
background-color: var(--teddy-color-beige-200);
|
|
829
909
|
}
|
|
830
|
-
._teddy-card--
|
|
910
|
+
._teddy-card--beige_aok47_193:active:has(._teddy-card__action_aok47_45:not(._teddy-card__action--disabled_aok47_45)) {
|
|
831
911
|
background-color: var(--teddy-color-beige-300);
|
|
832
912
|
}
|
|
833
|
-
._teddy-card--
|
|
913
|
+
._teddy-card--beige_aok47_193:has(._teddy-card__action--disabled_aok47_45) {
|
|
834
914
|
background-color: var(--teddy-color-background-interactive-disabled);
|
|
835
915
|
}
|
|
836
|
-
._teddy-
|
|
916
|
+
._teddy-card_aok47_3:has(._teddy-card__image--as-background_aok47_207) {
|
|
837
917
|
background-color: transparent;
|
|
838
918
|
}
|
|
839
|
-
._teddy-
|
|
919
|
+
._teddy-card__heading_aok47_61 {
|
|
840
920
|
color: inherit;
|
|
841
921
|
}
|
|
842
|
-
._teddy-card--background-
|
|
922
|
+
._teddy-card--background-image_aok47_213 {
|
|
843
923
|
background-repeat: no-repeat;
|
|
844
924
|
background-size: cover;
|
|
845
925
|
background-position: center;
|
|
846
926
|
}
|
|
847
|
-
._teddy-
|
|
848
|
-
height: auto;
|
|
849
|
-
vertical-align: middle;
|
|
850
|
-
font-style: italic;
|
|
851
|
-
background-repeat: no-repeat;
|
|
852
|
-
background-size: cover;
|
|
853
|
-
shape-margin: 0.75rem;
|
|
854
|
-
border-radius: inherit;
|
|
927
|
+
._teddy-card__inset_aok47_218 {
|
|
855
928
|
overflow: hidden;
|
|
856
|
-
padding-bottom: var(--teddy-spacing-200);
|
|
857
|
-
width: 100%;
|
|
858
929
|
}
|
|
859
|
-
._teddy-
|
|
860
|
-
border-radius: inherit;
|
|
861
|
-
overflow: hidden;
|
|
862
|
-
}
|
|
863
|
-
._teddy-card__inset--top_1occu_161 {
|
|
930
|
+
._teddy-card__inset--top_aok47_221 {
|
|
864
931
|
margin-top: calc(var(--teddy-spacing-250) * -1);
|
|
865
932
|
}
|
|
866
|
-
._teddy-card__inset--
|
|
933
|
+
._teddy-card__inset--top_aok47_221._teddy-card__inset--left_aok47_224 {
|
|
934
|
+
border-top-left-radius: inherit;
|
|
935
|
+
}
|
|
936
|
+
._teddy-card__inset--top_aok47_221._teddy-card__inset--right_aok47_227 {
|
|
937
|
+
border-top-right-radius: inherit;
|
|
938
|
+
}
|
|
939
|
+
._teddy-card__inset--bottom_aok47_230 {
|
|
867
940
|
margin-bottom: calc(var(--teddy-spacing-250) * -1);
|
|
868
941
|
}
|
|
869
|
-
._teddy-card__inset--
|
|
942
|
+
._teddy-card__inset--bottom_aok47_230._teddy-card__inset--left_aok47_224 {
|
|
943
|
+
border-bottom-left-radius: inherit;
|
|
944
|
+
}
|
|
945
|
+
._teddy-card__inset--bottom_aok47_230._teddy-card__inset--right_aok47_227 {
|
|
946
|
+
border-bottom-right-radius: inherit;
|
|
947
|
+
}
|
|
948
|
+
._teddy-card__inset--left_aok47_224 {
|
|
870
949
|
margin-left: calc(var(--teddy-spacing-250) * -1);
|
|
871
950
|
}
|
|
872
|
-
._teddy-card__inset--
|
|
951
|
+
._teddy-card__inset--right_aok47_227 {
|
|
873
952
|
margin-right: calc(var(--teddy-spacing-250) * -1);
|
|
874
953
|
}
|
|
875
954
|
}@layer heading, button, card, notification;
|
|
@@ -3192,6 +3271,29 @@
|
|
|
3192
3271
|
color: var(--teddy-color-xl);
|
|
3193
3272
|
}
|
|
3194
3273
|
}
|
|
3274
|
+
.teddy-object-fit {
|
|
3275
|
+
object-fit: var(--teddy-object-fit);
|
|
3276
|
+
}
|
|
3277
|
+
@media (min-width: 0px) {
|
|
3278
|
+
.sm\:teddy-object-fit {
|
|
3279
|
+
object-fit: var(--teddy-object-fit-sm);
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
@media (min-width: 600px) {
|
|
3283
|
+
.md\:teddy-object-fit {
|
|
3284
|
+
object-fit: var(--teddy-object-fit-md);
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
@media (min-width: 1024px) {
|
|
3288
|
+
.lg\:teddy-object-fit {
|
|
3289
|
+
object-fit: var(--teddy-object-fit-lg);
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
@media (min-width: 1440px) {
|
|
3293
|
+
.xl\:teddy-object-fit {
|
|
3294
|
+
object-fit: var(--teddy-object-fit-xl);
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3195
3297
|
.teddy-gtr {
|
|
3196
3298
|
grid-template-rows: var(--teddy-gtr);
|
|
3197
3299
|
}
|
|
@@ -12,6 +12,7 @@ import { PaddingProps } from './padding';
|
|
|
12
12
|
import { PositionProps } from './position';
|
|
13
13
|
import { InsetProps } from './inset';
|
|
14
14
|
import { ColorProps } from './color';
|
|
15
|
+
import { ObjectFitProps } from './object-fit';
|
|
15
16
|
|
|
16
17
|
export declare const displayValues: readonly [{
|
|
17
18
|
readonly key: "none";
|
|
@@ -56,7 +57,7 @@ export declare const displayLayout: readonly [{
|
|
|
56
57
|
}];
|
|
57
58
|
}];
|
|
58
59
|
export type DisplayLayout = Responsive<(typeof displayValues)[number]['key']>;
|
|
59
|
-
export declare const
|
|
60
|
+
export declare const stylings: readonly [{
|
|
60
61
|
readonly key: "position";
|
|
61
62
|
readonly className: "teddy-position";
|
|
62
63
|
readonly values: readonly [{
|
|
@@ -84,6 +85,25 @@ export declare const layout: readonly [{
|
|
|
84
85
|
readonly key: "unset";
|
|
85
86
|
readonly value: "unset";
|
|
86
87
|
}];
|
|
88
|
+
}, {
|
|
89
|
+
readonly key: "objectFit";
|
|
90
|
+
readonly className: "teddy-object-fit";
|
|
91
|
+
readonly values: readonly [{
|
|
92
|
+
readonly key: "fill";
|
|
93
|
+
readonly value: "fill";
|
|
94
|
+
}, {
|
|
95
|
+
readonly key: "contain";
|
|
96
|
+
readonly value: "contain";
|
|
97
|
+
}, {
|
|
98
|
+
readonly key: "cover";
|
|
99
|
+
readonly value: "cover";
|
|
100
|
+
}, {
|
|
101
|
+
readonly key: "none";
|
|
102
|
+
readonly value: "none";
|
|
103
|
+
}, {
|
|
104
|
+
readonly key: "scale-down";
|
|
105
|
+
readonly value: "scale-down";
|
|
106
|
+
}];
|
|
87
107
|
}, {
|
|
88
108
|
readonly key: "inset";
|
|
89
109
|
readonly className: "teddy-inset";
|
|
@@ -1595,6 +1615,9 @@ export declare const layout: readonly [{
|
|
|
1595
1615
|
}, {
|
|
1596
1616
|
readonly key: "between";
|
|
1597
1617
|
readonly value: "space-between";
|
|
1618
|
+
}, {
|
|
1619
|
+
readonly key: "stretch";
|
|
1620
|
+
readonly value: "stretch";
|
|
1598
1621
|
}];
|
|
1599
1622
|
}, {
|
|
1600
1623
|
readonly key: "display";
|
|
@@ -1924,6 +1947,7 @@ export declare const layout: readonly [{
|
|
|
1924
1947
|
}];
|
|
1925
1948
|
}];
|
|
1926
1949
|
export type CommonChildrenLayoutProps = PositionProps & InsetProps & MarginProps & PaddingProps & WidthProps & HeightProps & ColorProps;
|
|
1950
|
+
export type ImageStylingProps = CommonChildrenLayoutProps & ObjectFitProps;
|
|
1927
1951
|
export type ChildrenLayoutProps = FlexChildren & GridChildren & CommonChildrenLayoutProps;
|
|
1928
1952
|
export type CommonFlexGridLayoutProps = ChildrenLayoutProps & GapProps & {
|
|
1929
1953
|
align?: Align;
|
|
@@ -1931,7 +1955,7 @@ export type CommonFlexGridLayoutProps = ChildrenLayoutProps & GapProps & {
|
|
|
1931
1955
|
};
|
|
1932
1956
|
export type LayoutFlexProps = CommonFlexGridLayoutProps & FlexLayout;
|
|
1933
1957
|
export type LayoutGridProps = CommonFlexGridLayoutProps & GridLayout;
|
|
1934
|
-
export type LayoutProps = Omit<LayoutGridProps, 'display'> & Omit<LayoutFlexProps, 'display'> & {
|
|
1958
|
+
export type LayoutProps = Omit<LayoutGridProps, 'display'> & Omit<ImageStylingProps, 'display'> & Omit<LayoutFlexProps, 'display'> & {
|
|
1935
1959
|
display?: DisplayLayout;
|
|
1936
1960
|
};
|
|
1937
1961
|
type InlineStyle = React.CSSProperties | Record<string, string | number | null | undefined> | undefined;
|
|
@@ -11,6 +11,7 @@ import { paddings } from "./padding.js";
|
|
|
11
11
|
import { position } from "./position.js";
|
|
12
12
|
import { inset } from "./inset.js";
|
|
13
13
|
import { color } from "./color.js";
|
|
14
|
+
import { objectFit } from "./object-fit.js";
|
|
14
15
|
const breakpoint = {
|
|
15
16
|
sm: "0px",
|
|
16
17
|
md: "600px",
|
|
@@ -26,8 +27,9 @@ const displayLayout = [
|
|
|
26
27
|
values: displayValues
|
|
27
28
|
}
|
|
28
29
|
];
|
|
29
|
-
const
|
|
30
|
+
const stylings = [
|
|
30
31
|
...position,
|
|
32
|
+
...objectFit,
|
|
31
33
|
...inset,
|
|
32
34
|
...margins,
|
|
33
35
|
...paddings,
|
|
@@ -60,8 +62,8 @@ function extractProps(props) {
|
|
|
60
62
|
const extractedProps = { ...props };
|
|
61
63
|
let style = extractedProps.style;
|
|
62
64
|
let className = extractedProps.className;
|
|
63
|
-
for (const key in
|
|
64
|
-
const currentLayout =
|
|
65
|
+
for (const key in stylings) {
|
|
66
|
+
const currentLayout = stylings[key];
|
|
65
67
|
const currentLayoutKey = currentLayout.key;
|
|
66
68
|
const layoutProp = extractedProps[currentLayoutKey];
|
|
67
69
|
if (layoutProp) {
|
|
@@ -90,6 +92,6 @@ export {
|
|
|
90
92
|
displayLayout,
|
|
91
93
|
displayValues,
|
|
92
94
|
extractProps,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
mergeStyles,
|
|
96
|
+
stylings
|
|
95
97
|
};
|
|
@@ -12,6 +12,9 @@ export declare const justifyValues: readonly [{
|
|
|
12
12
|
}, {
|
|
13
13
|
readonly key: "between";
|
|
14
14
|
readonly value: "space-between";
|
|
15
|
+
}, {
|
|
16
|
+
readonly key: "stretch";
|
|
17
|
+
readonly value: "stretch";
|
|
15
18
|
}];
|
|
16
19
|
export declare const justify: readonly [{
|
|
17
20
|
readonly key: "justify";
|
|
@@ -28,6 +31,9 @@ export declare const justify: readonly [{
|
|
|
28
31
|
}, {
|
|
29
32
|
readonly key: "between";
|
|
30
33
|
readonly value: "space-between";
|
|
34
|
+
}, {
|
|
35
|
+
readonly key: "stretch";
|
|
36
|
+
readonly value: "stretch";
|
|
31
37
|
}];
|
|
32
38
|
}];
|
|
33
39
|
/**
|
|
@@ -2,7 +2,8 @@ const justifyValues = [
|
|
|
2
2
|
{ key: "start", value: "flex-start" },
|
|
3
3
|
{ key: "center", value: "center" },
|
|
4
4
|
{ key: "end", value: "flex-end" },
|
|
5
|
-
{ key: "between", value: "space-between" }
|
|
5
|
+
{ key: "between", value: "space-between" },
|
|
6
|
+
{ key: "stretch", value: "stretch" }
|
|
6
7
|
];
|
|
7
8
|
const justify = [
|
|
8
9
|
{
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Responsive } from './util';
|
|
2
|
+
|
|
3
|
+
export declare const objectFitValues: readonly [{
|
|
4
|
+
readonly key: "fill";
|
|
5
|
+
readonly value: "fill";
|
|
6
|
+
}, {
|
|
7
|
+
readonly key: "contain";
|
|
8
|
+
readonly value: "contain";
|
|
9
|
+
}, {
|
|
10
|
+
readonly key: "cover";
|
|
11
|
+
readonly value: "cover";
|
|
12
|
+
}, {
|
|
13
|
+
readonly key: "none";
|
|
14
|
+
readonly value: "none";
|
|
15
|
+
}, {
|
|
16
|
+
readonly key: "scale-down";
|
|
17
|
+
readonly value: "scale-down";
|
|
18
|
+
}];
|
|
19
|
+
export declare const objectFit: readonly [{
|
|
20
|
+
readonly key: "objectFit";
|
|
21
|
+
readonly className: "teddy-object-fit";
|
|
22
|
+
readonly values: readonly [{
|
|
23
|
+
readonly key: "fill";
|
|
24
|
+
readonly value: "fill";
|
|
25
|
+
}, {
|
|
26
|
+
readonly key: "contain";
|
|
27
|
+
readonly value: "contain";
|
|
28
|
+
}, {
|
|
29
|
+
readonly key: "cover";
|
|
30
|
+
readonly value: "cover";
|
|
31
|
+
}, {
|
|
32
|
+
readonly key: "none";
|
|
33
|
+
readonly value: "none";
|
|
34
|
+
}, {
|
|
35
|
+
readonly key: "scale-down";
|
|
36
|
+
readonly value: "scale-down";
|
|
37
|
+
}];
|
|
38
|
+
}];
|
|
39
|
+
/**
|
|
40
|
+
* ObjectFit. It can be or a responsive value.
|
|
41
|
+
* A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
|
|
42
|
+
*/
|
|
43
|
+
export type ObjectFitProps = {
|
|
44
|
+
objectFit?: Responsive<(typeof objectFitValues)[number]['key']>;
|
|
45
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const objectFitValues = [
|
|
2
|
+
{ key: "fill", value: "fill" },
|
|
3
|
+
{ key: "contain", value: "contain" },
|
|
4
|
+
{ key: "cover", value: "cover" },
|
|
5
|
+
{ key: "none", value: "none" },
|
|
6
|
+
{ key: "scale-down", value: "scale-down" }
|
|
7
|
+
];
|
|
8
|
+
const objectFit = [
|
|
9
|
+
{
|
|
10
|
+
key: "objectFit",
|
|
11
|
+
className: "teddy-object-fit",
|
|
12
|
+
values: objectFitValues
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
export {
|
|
16
|
+
objectFit,
|
|
17
|
+
objectFitValues
|
|
18
|
+
};
|