@telia/teddy 0.0.18 → 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.
Files changed (71) hide show
  1. package/README.md +0 -3
  2. package/dist/components/accordion/accordion.d.ts +2 -2
  3. package/dist/components/box/box.d.ts +1 -1
  4. package/dist/components/box/box.js +1 -1
  5. package/dist/components/button/button.d.ts +1 -1
  6. package/dist/components/button/button.js +1 -1
  7. package/dist/components/card/card.d.ts +19 -16
  8. package/dist/components/card/card.js +55 -47
  9. package/dist/components/chip/chip-indicator.d.ts +9 -0
  10. package/dist/components/chip/chip-indicator.js +16 -0
  11. package/dist/components/chip/chip-item.d.ts +9 -0
  12. package/dist/components/chip/chip-item.js +28 -0
  13. package/dist/components/chip/chip.d.ts +20 -0
  14. package/dist/components/chip/chip.js +31 -0
  15. package/dist/components/chip/index.d.ts +17 -0
  16. package/dist/components/chip/index.js +10 -0
  17. package/dist/components/field-error-text/field-error-text.d.ts +2 -2
  18. package/dist/components/flex/flex.d.ts +1 -1
  19. package/dist/components/flex/flex.js +1 -1
  20. package/dist/components/grid/grid.d.ts +1 -1
  21. package/dist/components/grid/grid.js +1 -1
  22. package/dist/components/heading/heading.d.ts +1 -1
  23. package/dist/components/heading/heading.js +1 -1
  24. package/dist/components/image/image.d.ts +11 -0
  25. package/dist/components/image/image.js +17 -0
  26. package/dist/components/image/index.d.ts +2 -0
  27. package/dist/components/image/index.js +4 -0
  28. package/dist/components/index.d.ts +2 -0
  29. package/dist/components/index.js +4 -0
  30. package/dist/components/modal/modal.d.ts +3 -3
  31. package/dist/components/modal/modal.js +2 -0
  32. package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
  33. package/dist/components/notification/notification.d.ts +24 -18
  34. package/dist/components/radio-group/radio-group.d.ts +1 -1
  35. package/dist/components/text/text.d.ts +3 -1
  36. package/dist/components/text/text.js +38 -27
  37. package/dist/components/text-field/text-field.d.ts +4 -4
  38. package/dist/components/toggle/toggle.d.ts +2 -2
  39. package/dist/main.js +4 -0
  40. package/dist/style.css +460 -229
  41. package/dist/utils/generate-styling/color.d.ts +15 -0
  42. package/dist/utils/generate-styling/color.js +12 -0
  43. package/dist/utils/{layout → generate-styling}/index.d.ts +44 -15
  44. package/dist/utils/{layout → generate-styling}/index.js +9 -5
  45. package/dist/utils/{layout → generate-styling}/justify.d.ts +6 -0
  46. package/dist/utils/{layout → generate-styling}/justify.js +2 -1
  47. package/dist/utils/generate-styling/object-fit.d.ts +45 -0
  48. package/dist/utils/generate-styling/object-fit.js +18 -0
  49. package/package.json +1 -1
  50. /package/dist/utils/{layout → generate-styling}/align.d.ts +0 -0
  51. /package/dist/utils/{layout → generate-styling}/align.js +0 -0
  52. /package/dist/utils/{layout → generate-styling}/flex.d.ts +0 -0
  53. /package/dist/utils/{layout → generate-styling}/flex.js +0 -0
  54. /package/dist/utils/{layout → generate-styling}/gap.d.ts +0 -0
  55. /package/dist/utils/{layout → generate-styling}/gap.js +0 -0
  56. /package/dist/utils/{layout → generate-styling}/grid.d.ts +0 -0
  57. /package/dist/utils/{layout → generate-styling}/grid.js +0 -0
  58. /package/dist/utils/{layout → generate-styling}/height.d.ts +0 -0
  59. /package/dist/utils/{layout → generate-styling}/height.js +0 -0
  60. /package/dist/utils/{layout → generate-styling}/inset.d.ts +0 -0
  61. /package/dist/utils/{layout → generate-styling}/inset.js +0 -0
  62. /package/dist/utils/{layout → generate-styling}/margin.d.ts +0 -0
  63. /package/dist/utils/{layout → generate-styling}/margin.js +0 -0
  64. /package/dist/utils/{layout → generate-styling}/padding.d.ts +0 -0
  65. /package/dist/utils/{layout → generate-styling}/padding.js +0 -0
  66. /package/dist/utils/{layout → generate-styling}/position.d.ts +0 -0
  67. /package/dist/utils/{layout → generate-styling}/position.js +0 -0
  68. /package/dist/utils/{layout → generate-styling}/util.d.ts +0 -0
  69. /package/dist/utils/{layout → generate-styling}/util.js +0 -0
  70. /package/dist/utils/{layout → generate-styling}/width.d.ts +0 -0
  71. /package/dist/utils/{layout → generate-styling}/width.js +0 -0
@@ -1,3 +1,5 @@
1
+ import { Image } from "./image/image.js";
2
+ import { Chip } from "./chip/index.js";
1
3
  import { Modal } from "./modal/modal.js";
2
4
  import { Notification } from "./notification/notification.js";
3
5
  import { RadioGroup } from "./radio-group/radio-group.js";
@@ -29,12 +31,14 @@ export {
29
31
  Box,
30
32
  Button,
31
33
  Card,
34
+ Chip,
32
35
  FieldErrorText,
33
36
  Flex,
34
37
  Grid,
35
38
  Heading,
36
39
  HelperText,
37
40
  Icon,
41
+ Image,
38
42
  Input,
39
43
  InputGroup,
40
44
  Label,
@@ -1,6 +1,6 @@
1
- import { ComponentPropsAs } from '../../utils/component-props-as';
2
- import { Flex, Heading, Text } from '..';
3
1
  import { default as React } from 'react';
2
+ import { Flex, Heading, Text } from '..';
3
+ import { ComponentPropsAs } from '../../utils/component-props-as';
4
4
 
5
5
  import * as DialogPrimitive from '@radix-ui/react-dialog';
6
6
  type RootProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>, 'modal'>;
@@ -47,7 +47,7 @@ type CloseProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Clo
47
47
  });
48
48
  /** -------------------------------------------------------------------------------------------------*/
49
49
  export declare const Modal: React.FC<RootProps> & {
50
- Trigger: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref">, "asChild" | "children"> & {
50
+ Trigger: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> & {
51
51
  children: React.ReactElement;
52
52
  } & React.RefAttributes<HTMLButtonElement>>;
53
53
  Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,8 @@
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";
5
+ import "../chip/index.js";
4
6
  import "../notification/notification.js";
5
7
  import "../radio-group/radio-group.js";
6
8
  import "../box/box.js";
@@ -100,7 +100,7 @@ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMen
100
100
  variant?: "default" | "float" | undefined;
101
101
  } & React.RefAttributes<HTMLDivElement>>;
102
102
  Link: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & {
103
- variant?: "button" | "small" | "default" | undefined;
103
+ variant?: "small" | "button" | "default" | undefined;
104
104
  } & React.RefAttributes<HTMLAnchorElement>>;
105
105
  Indicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
106
106
  Viewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,9 +1,9 @@
1
- import { Card } from '../card';
2
- import { Heading as HeadingPrimitives } from '../heading';
3
- import { Icon as IconPrimitives } from '../icon';
4
- import { Button as ButtonPrimitives } from '../button';
5
- import { Text as TextPrimitives } from '../text';
6
1
  import { default as React } from 'react';
2
+ import { Text as TextPrimitives } from '../text';
3
+ import { Button as ButtonPrimitives } from '../button';
4
+ import { Icon as IconPrimitives } from '../icon';
5
+ import { Heading as HeadingPrimitives } from '../heading';
6
+ import { Card } from '../card';
7
7
 
8
8
  /** -------------------------------------------------------------------------------------------------
9
9
  * Root
@@ -31,39 +31,45 @@ type TextProps = React.ComponentPropsWithoutRef<typeof TextPrimitives>;
31
31
  * Dismiss
32
32
  * -----------------------------------------------------------------------------------------------*/
33
33
  type DismissProps = Omit<React.ComponentPropsWithoutRef<typeof ButtonPrimitives>, 'variant'>;
34
- declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/layout/flex').FlexChildren & import('../../utils/layout/grid').GridChildren & import('../../utils/layout/position').PositionProps & import('../../utils/layout/inset').InsetProps & import('../../utils/layout/margin').MarginProps & import('../../utils/layout/padding').PaddingProps & import('../../utils/layout/width').WidthProps & import('../../utils/layout/height').HeightProps & import('../../utils/layout/gap').GapProps & {
35
- align?: import('../../utils/layout/align').Align | undefined;
36
- justify?: import('../../utils/layout/justify').Justify | undefined;
37
- } & import('../../utils/layout/flex').FlexLayout & {
34
+ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & import('../../utils/generate-styling/gap').GapProps & {
35
+ align?: import('../../utils/generate-styling/align').Align | undefined;
36
+ justify?: import('../../utils/generate-styling/justify').Justify | undefined;
37
+ } & import('../../utils/generate-styling/grid').GridLayout & {
38
38
  asChild: true;
39
39
  as?: undefined;
40
40
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
41
41
  asChild?: boolean | undefined;
42
42
  variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | undefined;
43
43
  bordered?: boolean | undefined;
44
+ shadow?: boolean | undefined;
44
45
  backgroundImageSrc?: string | undefined;
45
- } & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/layout/flex').FlexChildren & import('../../utils/layout/grid').GridChildren & import('../../utils/layout/position').PositionProps & import('../../utils/layout/inset').InsetProps & import('../../utils/layout/margin').MarginProps & import('../../utils/layout/padding').PaddingProps & import('../../utils/layout/width').WidthProps & import('../../utils/layout/height').HeightProps & import('../../utils/layout/gap').GapProps & {
46
- align?: import('../../utils/layout/align').Align | undefined;
47
- justify?: import('../../utils/layout/justify').Justify | undefined;
48
- } & import('../../utils/layout/flex').FlexLayout & {
46
+ layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
47
+ } & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & import('../../utils/generate-styling/gap').GapProps & {
48
+ align?: import('../../utils/generate-styling/align').Align | undefined;
49
+ justify?: import('../../utils/generate-styling/justify').Justify | undefined;
50
+ } & import('../../utils/generate-styling/grid').GridLayout & {
49
51
  as?: "span" | undefined;
50
52
  asChild?: false | undefined;
51
53
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
52
54
  asChild?: boolean | undefined;
53
55
  variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | undefined;
54
56
  bordered?: boolean | undefined;
57
+ shadow?: boolean | undefined;
55
58
  backgroundImageSrc?: string | undefined;
56
- } & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/layout/flex').FlexChildren & import('../../utils/layout/grid').GridChildren & import('../../utils/layout/position').PositionProps & import('../../utils/layout/inset').InsetProps & import('../../utils/layout/margin').MarginProps & import('../../utils/layout/padding').PaddingProps & import('../../utils/layout/width').WidthProps & import('../../utils/layout/height').HeightProps & import('../../utils/layout/gap').GapProps & {
57
- align?: import('../../utils/layout/align').Align | undefined;
58
- justify?: import('../../utils/layout/justify').Justify | undefined;
59
- } & import('../../utils/layout/flex').FlexLayout & {
59
+ layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
60
+ } & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & import('../../utils/generate-styling/gap').GapProps & {
61
+ align?: import('../../utils/generate-styling/align').Align | undefined;
62
+ justify?: import('../../utils/generate-styling/justify').Justify | undefined;
63
+ } & import('../../utils/generate-styling/grid').GridLayout & {
60
64
  as: "div";
61
65
  asChild?: false | undefined;
62
66
  } & React.RefAttributes<HTMLDivElement>, "ref"> & {
63
67
  asChild?: boolean | undefined;
64
68
  variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | undefined;
65
69
  bordered?: boolean | undefined;
70
+ shadow?: boolean | undefined;
66
71
  backgroundImageSrc?: string | undefined;
72
+ layout?: ("navigation-vertical" | "navigation-horizontal-small" | "navigation-horizontal-large" | "rich-card") | undefined;
67
73
  } & React.RefAttributes<HTMLDivElement>, "ref">, "as" | "variant"> & {
68
74
  variant?: "error" | "warning" | "success" | "information" | undefined;
69
75
  open?: boolean | undefined;
@@ -74,7 +80,7 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
74
80
  Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
75
81
  Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
76
82
  Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
77
- name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "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" | "visible" | "volume" | "zoom-out" | "zoom" | "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" | "add" | "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" | "infinite" | "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" | "reverse" | "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" | "help" | "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";
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";
78
84
  size?: ("sm" | "md" | "lg" | "xl" | "font" | "xxs" | "xs") | undefined;
79
85
  children?: React.ReactNode;
80
86
  }, "ref">> & React.RefAttributes<SVGSVGElement>>;
@@ -1,5 +1,5 @@
1
- import { Label as LabelPrimitive } from '../label';
2
1
  import { default as React } from 'react';
2
+ import { Label as LabelPrimitive } from '../label';
3
3
 
4
4
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
5
5
  type RootProps = React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> & {
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { ChildrenLayoutProps } from '../../utils/generate-styling';
2
3
 
3
4
  type AsChildProps = {
4
5
  asChild: true;
@@ -27,11 +28,12 @@ type TextVariant = 'paragraph-100' | 'paragraph-100-medium' | 'paragraph-100-bol
27
28
  type TextProps = {
28
29
  enableHyphenation?: boolean;
29
30
  disabled?: boolean;
31
+ faded?: boolean;
30
32
  /**
31
33
  * @default 'paragraph-100'
32
34
  */
33
35
  variant?: TextVariant;
34
- } & (AsChildProps | SpanProps | DivProps | LabelProps | PProps);
36
+ } & ChildrenLayoutProps & (AsChildProps | SpanProps | DivProps | LabelProps | PProps);
35
37
  /**
36
38
  * Text is used to render text elements. By default, it renders as a `p` tag.
37
39
  */
@@ -2,36 +2,47 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import clsx from "clsx";
4
4
  import React__default from "react";
5
+ import { extractProps } from "../../utils/generate-styling/index.js";
6
+ import { teddyColorTextMedium } from "../../tokens/color/variables.js";
5
7
  const styles = {
6
- "teddy-text": "_teddy-text_2zpdm_1",
7
- "teddy-text--disabled": "_teddy-text--disabled_2zpdm_7",
8
- "teddy-text--hyphens": "_teddy-text--hyphens_2zpdm_10",
9
- "teddy-text--paragraph-100": "_teddy-text--paragraph-100_2zpdm_13",
10
- "teddy-text--paragraph-100-medium": "_teddy-text--paragraph-100-medium_2zpdm_19",
11
- "teddy-text--paragraph-100-bold": "_teddy-text--paragraph-100-bold_2zpdm_26",
12
- "teddy-text--paragraph-200": "_teddy-text--paragraph-200_2zpdm_33",
13
- "teddy-text--preamble-100": "_teddy-text--preamble-100_2zpdm_39",
14
- "teddy-text--preamble-200": "_teddy-text--preamble-200_2zpdm_45",
15
- "teddy-text--additional-100": "_teddy-text--additional-100_2zpdm_51",
16
- "teddy-text--additional-100-medium": "_teddy-text--additional-100-medium_2zpdm_57",
17
- "teddy-text--overline-100": "_teddy-text--overline-100_2zpdm_64",
18
- "teddy-text--overline-200": "_teddy-text--overline-200_2zpdm_71"
8
+ "teddy-text": "_teddy-text_15w9u_2",
9
+ "teddy-text--disabled": "_teddy-text--disabled_15w9u_8",
10
+ "teddy-text--hyphens": "_teddy-text--hyphens_15w9u_11",
11
+ "teddy-text--paragraph-100": "_teddy-text--paragraph-100_15w9u_14",
12
+ "teddy-text--paragraph-100-medium": "_teddy-text--paragraph-100-medium_15w9u_20",
13
+ "teddy-text--paragraph-100-bold": "_teddy-text--paragraph-100-bold_15w9u_27",
14
+ "teddy-text--paragraph-200": "_teddy-text--paragraph-200_15w9u_34",
15
+ "teddy-text--preamble-100": "_teddy-text--preamble-100_15w9u_40",
16
+ "teddy-text--preamble-200": "_teddy-text--preamble-200_15w9u_46",
17
+ "teddy-text--additional-100": "_teddy-text--additional-100_15w9u_52",
18
+ "teddy-text--additional-100-medium": "_teddy-text--additional-100-medium_15w9u_58",
19
+ "teddy-text--overline-100": "_teddy-text--overline-100_15w9u_65",
20
+ "teddy-text--overline-200": "_teddy-text--overline-200_15w9u_72"
19
21
  };
20
22
  const rootClassName = "teddy-text";
21
- const Text = React__default.forwardRef(
22
- ({ className, children, disabled, enableHyphenation, variant = "paragraph-100", asChild, as: Tag = "p", ...props }, forwardRef) => {
23
- const classes = clsx(
24
- styles[rootClassName],
25
- styles[`${rootClassName}--${variant}`],
26
- {
27
- [styles[`${rootClassName}--hyphens`]]: enableHyphenation,
28
- [styles[`${rootClassName}--disabled`]]: disabled
29
- },
30
- className
31
- );
32
- return /* @__PURE__ */ jsx(Slot, { ...props, ref: forwardRef, className: classes, children: asChild ? children : /* @__PURE__ */ jsx(Tag, { children }) });
33
- }
34
- );
23
+ const Text = React__default.forwardRef(({ faded, ...props }, forwardRef) => {
24
+ const color = faded ? teddyColorTextMedium : props.color;
25
+ const {
26
+ className,
27
+ children,
28
+ disabled,
29
+ enableHyphenation,
30
+ variant = "paragraph-100",
31
+ asChild,
32
+ as: Tag = "p",
33
+ ...rest
34
+ } = extractProps({ ...props, color });
35
+ const classes = clsx(
36
+ styles[rootClassName],
37
+ styles[`${rootClassName}--${variant}`],
38
+ {
39
+ [styles[`${rootClassName}--hyphens`]]: enableHyphenation,
40
+ [styles[`${rootClassName}--disabled`]]: disabled
41
+ },
42
+ className
43
+ );
44
+ return /* @__PURE__ */ jsx(Slot, { ...rest, ref: forwardRef, className: classes, children: asChild ? children : /* @__PURE__ */ jsx(Tag, { children }) });
45
+ });
35
46
  Text.displayName = "Text";
36
47
  export {
37
48
  Text
@@ -1,7 +1,7 @@
1
- import { InputGroupProps } from '../input';
2
- import { LabelProps } from '../label';
3
- import { HelperTextProps } from '../helper-text';
4
1
  import { default as React } from 'react';
2
+ import { HelperTextProps } from '../helper-text';
3
+ import { LabelProps } from '../label';
4
+ import { InputGroupProps } from '../input';
5
5
 
6
6
  type ListOfErrors = Array<string | null | undefined> | null | undefined;
7
7
  type TextFieldContextValue = {
@@ -74,7 +74,7 @@ export declare const TextField: React.ForwardRefExoticComponent<Omit<React.Detai
74
74
  */
75
75
  isRequired?: boolean | undefined;
76
76
  } & React.RefAttributes<HTMLDivElement>> & {
77
- Input: React.ForwardRefExoticComponent<Omit<import('../input').InputProps, "id" | "disabled" | "readOnly" | "required"> & React.RefAttributes<HTMLInputElement>>;
77
+ Input: React.ForwardRefExoticComponent<Omit<import('../input').InputProps, "disabled" | "id" | "readOnly" | "required"> & React.RefAttributes<HTMLInputElement>>;
78
78
  Label: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-label').LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & {
79
79
  disabled?: boolean | undefined;
80
80
  isRequired?: boolean | undefined;
@@ -1,5 +1,5 @@
1
- import { Label } from '../label';
2
1
  import { default as React } from 'react';
2
+ import { Label } from '../label';
3
3
 
4
4
  import * as SwitchPrimitive from '@radix-ui/react-switch';
5
5
  /** -------------------------------------------------------------------------------------------------
@@ -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: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "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" | "visible" | "volume" | "zoom-out" | "zoom" | "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" | "add" | "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" | "infinite" | "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" | "reverse" | "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" | "help" | "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";
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,5 @@
1
+ import { Image } from "./components/image/image.js";
2
+ import { Chip } from "./components/chip/index.js";
1
3
  import { Modal } from "./components/modal/modal.js";
2
4
  import { Notification } from "./components/notification/notification.js";
3
5
  import { RadioGroup } from "./components/radio-group/radio-group.js";
@@ -36,12 +38,14 @@ export {
36
38
  Box,
37
39
  Button,
38
40
  Card,
41
+ Chip,
39
42
  FieldErrorText,
40
43
  Flex,
41
44
  Grid,
42
45
  Heading,
43
46
  HelperText,
44
47
  Icon,
48
+ Image,
45
49
  Input,
46
50
  InputGroup,
47
51
  Label,