@telia/teddy 0.7.43 → 0.7.44

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.
@@ -17,7 +17,7 @@ const styles = {
17
17
  };
18
18
  const rootClassName = "teddy-dashed-button";
19
19
  const Root = React.forwardRef(
20
- ({ className, children, loading, alignment = "center", ...props }, forwardRef) => {
20
+ ({ className, children, loading, alignment = "center", icon, showChevron = true, ...props }, forwardRef) => {
21
21
  const classes = clsx(styles[rootClassName], className, {
22
22
  [styles[`${rootClassName}--align-start`]]: alignment === "start"
23
23
  });
@@ -29,12 +29,12 @@ const Root = React.forwardRef(
29
29
  [styles[`${rootClassName}__content--align-start`]]: alignment === "start"
30
30
  }),
31
31
  children: [
32
- !loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles[`${rootClassName}__icon-wrapper`], children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { className: styles[`${rootClassName}__icon`], name: "plus" }) }) }),
32
+ !loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles[`${rootClassName}__icon-wrapper`], children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { className: styles[`${rootClassName}__icon`], name: icon || "plus" }) }) }),
33
33
  children
34
34
  ]
35
35
  }
36
36
  ),
37
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles[`${rootClassName}__chevron`], children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { name: "chevron-right" }) })
37
+ showChevron && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles[`${rootClassName}__chevron`], children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { name: "chevron-right" }) })
38
38
  ] });
39
39
  }
40
40
  );
@@ -1,9 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  import { Button } from '../button';
3
+ import { IconName } from '../icon';
3
4
 
4
5
  export declare const rootClassName = "teddy-dashed-button";
5
6
  export type DashedButtonProps = Omit<React.ComponentPropsWithoutRef<typeof Button>, 'variant' | 'borderStyle' | 'iconOnly'> & {
6
7
  alignment?: 'start' | 'center';
8
+ icon?: IconName;
9
+ showChevron?: boolean;
7
10
  };
8
11
  export declare const Root: 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/radius').RadiusProps & 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 & {
9
12
  display?: import('../../utils/generate-styling').DisplayChildren | undefined;
@@ -31,6 +34,8 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
31
34
  "aria-label"?: string | undefined;
32
35
  } & React.RefAttributes<HTMLButtonElement>, "ref">, "variant" | "borderStyle" | "iconOnly"> & {
33
36
  alignment?: "center" | "start" | undefined;
37
+ icon?: "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "filter" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sidepanel-hide" | "sidepanel-show" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "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" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "summary" | "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" | "AI-star" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "image" | "link" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "video" | "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" | "key" | "layers" | "map" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "split" | "stop" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "time" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "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" | "menu" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "search" | "services" | "sorter" | "table-view" | undefined;
38
+ showChevron?: boolean | undefined;
34
39
  } & React.RefAttributes<HTMLButtonElement>>;
35
40
  declare const DashedButton: 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/radius').RadiusProps & 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 & {
36
41
  display?: import('../../utils/generate-styling').DisplayChildren | undefined;
@@ -58,5 +63,7 @@ declare const DashedButton: React.ForwardRefExoticComponent<Omit<Omit<Omit<React
58
63
  "aria-label"?: string | undefined;
59
64
  } & React.RefAttributes<HTMLButtonElement>, "ref">, "variant" | "borderStyle" | "iconOnly"> & {
60
65
  alignment?: "center" | "start" | undefined;
66
+ icon?: "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "filter" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "sidepanel-hide" | "sidepanel-show" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "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" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "summary" | "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" | "AI-star" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "image" | "link" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "video" | "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" | "key" | "layers" | "map" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "split" | "stop" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "time" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "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" | "menu" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "search" | "services" | "sorter" | "table-view" | undefined;
67
+ showChevron?: boolean | undefined;
61
68
  } & React.RefAttributes<HTMLButtonElement>>;
62
69
  export { DashedButton };
@@ -15,7 +15,7 @@ const styles = {
15
15
  };
16
16
  const rootClassName = "teddy-dashed-button";
17
17
  const Root = React__default.forwardRef(
18
- ({ className, children, loading, alignment = "center", ...props }, forwardRef) => {
18
+ ({ className, children, loading, alignment = "center", icon, showChevron = true, ...props }, forwardRef) => {
19
19
  const classes = clsx(styles[rootClassName], className, {
20
20
  [styles[`${rootClassName}--align-start`]]: alignment === "start"
21
21
  });
@@ -27,12 +27,12 @@ const Root = React__default.forwardRef(
27
27
  [styles[`${rootClassName}__content--align-start`]]: alignment === "start"
28
28
  }),
29
29
  children: [
30
- !loading && /* @__PURE__ */ jsx("div", { className: styles[`${rootClassName}__icon-wrapper`], children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Icon, { className: styles[`${rootClassName}__icon`], name: "plus" }) }) }),
30
+ !loading && /* @__PURE__ */ jsx("div", { className: styles[`${rootClassName}__icon-wrapper`], children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Icon, { className: styles[`${rootClassName}__icon`], name: icon || "plus" }) }) }),
31
31
  children
32
32
  ]
33
33
  }
34
34
  ),
35
- /* @__PURE__ */ jsx("div", { className: styles[`${rootClassName}__chevron`], children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right" }) })
35
+ showChevron && /* @__PURE__ */ jsx("div", { className: styles[`${rootClassName}__chevron`], children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right" }) })
36
36
  ] });
37
37
  }
38
38
  );
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "pnpm": ">=10"
21
21
  },
22
22
  "private": false,
23
- "version": "0.7.43",
23
+ "version": "0.7.44",
24
24
  "sideEffects": [
25
25
  "**/*.css",
26
26
  "**/*.svg"