@telia/teddy 0.3.0 → 0.3.2

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 (86) hide show
  1. package/dist/components/card/card-illustration.d.ts +1 -1
  2. package/dist/components/card/index.d.ts +1 -1
  3. package/dist/components/channel-button/channel-button-illustration.cjs +33 -0
  4. package/dist/components/channel-button/channel-button-illustration.d.ts +8 -0
  5. package/dist/components/channel-button/channel-button-illustration.js +33 -0
  6. package/dist/components/channel-button/channel-button-image.cjs +19 -0
  7. package/dist/components/channel-button/channel-button-image.d.ts +5 -0
  8. package/dist/components/channel-button/channel-button-image.js +19 -0
  9. package/dist/components/channel-button/channel-button-root.cjs +41 -0
  10. package/dist/components/channel-button/channel-button-root.d.ts +34 -0
  11. package/dist/components/channel-button/channel-button-root.js +41 -0
  12. package/dist/components/channel-button/channel-button-text.cjs +23 -0
  13. package/dist/components/channel-button/channel-button-text.d.ts +5 -0
  14. package/dist/components/channel-button/channel-button-text.js +23 -0
  15. package/dist/components/channel-button/index.cjs +15 -0
  16. package/dist/components/channel-button/index.d.ts +91 -0
  17. package/dist/components/channel-button/index.js +15 -0
  18. package/dist/components/checkbox/checkbox-group-list.d.ts +1 -1
  19. package/dist/components/checkbox/checkbox-group.d.ts +1 -1
  20. package/dist/components/checkbox/index.d.ts +2 -2
  21. package/dist/components/chip/chip-indicator.d.ts +2 -2
  22. package/dist/components/chip/index.d.ts +2 -2
  23. package/dist/components/color-dot/index.d.ts +1 -1
  24. package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
  25. package/dist/components/expandable-card/index.d.ts +3 -3
  26. package/dist/components/icon/utils.d.ts +1 -1
  27. package/dist/components/index.cjs +4 -2
  28. package/dist/components/index.d.ts +1 -0
  29. package/dist/components/index.js +3 -1
  30. package/dist/components/link/link.cjs +10 -10
  31. package/dist/components/link/link.js +10 -10
  32. package/dist/components/modal/modal.cjs +2 -1
  33. package/dist/components/modal/modal.js +2 -1
  34. package/dist/components/navigation-menu/navigation-menu.cjs +2 -1
  35. package/dist/components/navigation-menu/navigation-menu.js +2 -1
  36. package/dist/components/notabene/index.cjs +4 -9
  37. package/dist/components/notabene/index.d.ts +51 -8
  38. package/dist/components/notabene/index.js +4 -9
  39. package/dist/components/notabene/notabene-icon.cjs +1 -1
  40. package/dist/components/notabene/notabene-icon.d.ts +2 -2
  41. package/dist/components/notabene/notabene-icon.js +1 -1
  42. package/dist/components/notification/index.cjs +13 -2
  43. package/dist/components/notification/index.d.ts +132 -2
  44. package/dist/components/notification/index.js +12 -1
  45. package/dist/components/notification/notification-dismiss.cjs +46 -0
  46. package/dist/components/notification/notification-dismiss.d.ts +5 -0
  47. package/dist/components/notification/notification-dismiss.js +29 -0
  48. package/dist/components/notification/notification-footer.cjs +18 -0
  49. package/dist/components/notification/notification-footer.d.ts +5 -0
  50. package/dist/components/notification/notification-footer.js +18 -0
  51. package/dist/components/notification/notification-heading.cjs +18 -0
  52. package/dist/components/notification/notification-heading.d.ts +5 -0
  53. package/dist/components/notification/notification-heading.js +18 -0
  54. package/dist/components/notification/notification-icon.cjs +32 -0
  55. package/dist/components/notification/notification-icon.d.ts +9 -0
  56. package/dist/components/notification/notification-icon.js +32 -0
  57. package/dist/components/notification/notification-root.cjs +59 -0
  58. package/dist/components/notification/notification-root.d.ts +86 -0
  59. package/dist/components/notification/notification-root.js +42 -0
  60. package/dist/components/notification/notification-text.cjs +15 -0
  61. package/dist/components/notification/notification-text.d.ts +5 -0
  62. package/dist/components/notification/notification-text.js +15 -0
  63. package/dist/components/radio-card-group/radio-card-group-content.cjs +2 -1
  64. package/dist/components/radio-card-group/radio-card-group-content.js +2 -1
  65. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +11 -10
  66. package/dist/components/radio-card-group/radio-card-group-item-title.js +11 -10
  67. package/dist/components/radio-card-group/radio-card-group-item.cjs +2 -1
  68. package/dist/components/radio-card-group/radio-card-group-item.js +2 -1
  69. package/dist/components/scroll-area/index.d.ts +2 -2
  70. package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
  71. package/dist/components/tabs/index.d.ts +2 -2
  72. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  73. package/dist/components/text-field/index.d.ts +2 -2
  74. package/dist/components/text-field/text-field-button.d.ts +2 -2
  75. package/dist/components/toggle/toggle.d.ts +2 -2
  76. package/dist/components/tooltip/index.d.ts +2 -2
  77. package/dist/main.cjs +4 -2
  78. package/dist/main.js +3 -1
  79. package/dist/style.css +1035 -948
  80. package/dist/utils/generate-styling/grid.d.ts +24 -24
  81. package/dist/utils/generate-styling/index.d.ts +16 -16
  82. package/dist/utils/generate-styling/util.d.ts +2 -2
  83. package/package.json +16 -16
  84. package/dist/components/notification/notification.cjs +0 -116
  85. package/dist/components/notification/notification.d.ts +0 -106
  86. package/dist/components/notification/notification.js +0 -99
@@ -1,99 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import React__default from "react";
3
- import clsx from "clsx";
4
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
5
- import { useControllableState } from "@radix-ui/react-use-controllable-state";
6
- import { Text as Text$1 } from "../text/text.js";
7
- import { Button } from "../button/button.js";
8
- import "../../assets/sprite.1321fab0-teddy.svg";
9
- import { Icon as Icon$1 } from "../icon/icon.js";
10
- import { Heading as Heading$1 } from "../heading/heading.js";
11
- import { Card } from "../card/index.js";
12
- const styles = {
13
- "teddy-notification": "_teddy-notification_1ref8_3",
14
- "teddy-notification__dismiss": "_teddy-notification__dismiss_1ref8_12",
15
- "teddy-notification--success": "_teddy-notification--success_1ref8_16",
16
- "teddy-notification--warning": "_teddy-notification--warning_1ref8_21",
17
- "teddy-notification--error": "_teddy-notification--error_1ref8_26",
18
- "teddy-notification--information": "_teddy-notification--information_1ref8_31",
19
- "teddy-notification__heading": "_teddy-notification__heading_1ref8_36",
20
- "teddy-notification__icon": "_teddy-notification__icon_1ref8_41"
21
- };
22
- const rootClassName = "teddy-notification";
23
- const NotificationContext = React__default.createContext(void 0);
24
- const Root = React__default.forwardRef(
25
- ({ className, open: openProp, defaultOpen, onOpenChange, variant, ...props }, forwardRef) => {
26
- const classes = clsx([styles[`${rootClassName}`]], styles[`${rootClassName}--${variant}`], className);
27
- const [open = true, setOpen] = useControllableState({
28
- prop: openProp,
29
- defaultProp: defaultOpen,
30
- onChange: onOpenChange
31
- });
32
- return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { open, onOpenChange: setOpen, asChild: true, children: /* @__PURE__ */ jsx(CollapsiblePrimitive.Content, { asChild: true, children: /* @__PURE__ */ jsx(Card, { variant: "white", as: void 0, bordered: true, ...props, ref: forwardRef, className: classes }) }) }) });
33
- }
34
- );
35
- Root.displayName = "Notification";
36
- function getVariantIcon(variant) {
37
- switch (variant) {
38
- case "success":
39
- return "check-circle-filled";
40
- case "error":
41
- return "error-filled";
42
- case "warning":
43
- return "alert-filled";
44
- case "information":
45
- return "info-filled";
46
- }
47
- }
48
- const Icon = React__default.forwardRef(
49
- ({ className, ...props }, forwardRef) => {
50
- const classes = clsx([styles[`${rootClassName}__icon`]], className);
51
- const context = React__default.useContext(NotificationContext);
52
- const name = props.name || getVariantIcon(context == null ? void 0 : context.variant);
53
- if (!name)
54
- return null;
55
- return /* @__PURE__ */ jsx(Icon$1, { size: "md", ...props, name, ref: forwardRef, className: classes });
56
- }
57
- );
58
- Icon.displayName = "Notification.Icon";
59
- const Heading = React__default.forwardRef(
60
- ({ className, ...props }, forwardRef) => {
61
- const classes = clsx([styles[`${rootClassName}__heading`]], className);
62
- return /* @__PURE__ */ jsx(Heading$1, { ...props, variant: "subsection-100", asChild: false, ref: forwardRef, className: classes });
63
- }
64
- );
65
- Heading.displayName = "Notification.Heading";
66
- const Text = React__default.forwardRef(
67
- ({ className, ...props }, forwardRef) => {
68
- const classes = clsx([styles[`${rootClassName}__text`]], className);
69
- return /* @__PURE__ */ jsx(Text$1, { ...props, ref: forwardRef, className: classes });
70
- }
71
- );
72
- Text.displayName = "Notification.Text";
73
- const Dismiss = React__default.forwardRef(
74
- ({ className, children, ...props }, forwardRef) => {
75
- const classes = clsx([styles[`${rootClassName}__dismiss`]], className);
76
- return /* @__PURE__ */ jsx(CollapsiblePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
77
- Button,
78
- {
79
- iconOnly: true,
80
- "aria-label": "Lukk",
81
- variant: "tertiary-purple",
82
- ...props,
83
- ref: forwardRef,
84
- className: classes,
85
- children: children || /* @__PURE__ */ jsx(Icon$1, { name: "close" })
86
- }
87
- ) });
88
- }
89
- );
90
- Dismiss.displayName = "Notification.Dismiss";
91
- const Notification = Object.assign(Root, {
92
- Text,
93
- Heading,
94
- Icon,
95
- Dismiss
96
- });
97
- export {
98
- Notification
99
- };