@telia/teddy 0.0.15 → 0.0.17

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 (117) hide show
  1. package/dist/components/accordion/accordion.d.ts +2 -1
  2. package/dist/components/accordion/accordion.js +90 -24
  3. package/dist/components/accordion/index.js +2 -2
  4. package/dist/components/badge/badge.js +40 -24
  5. package/dist/components/badge/index.js +2 -2
  6. package/dist/components/box/box.js +14 -10
  7. package/dist/components/box/index.js +2 -2
  8. package/dist/components/button/button.js +60 -52
  9. package/dist/components/button/index.js +2 -2
  10. package/dist/components/card/card.d.ts +35 -3
  11. package/dist/components/card/card.js +209 -25
  12. package/dist/components/card/index.js +2 -2
  13. package/dist/components/field-error-text/field-error-text.js +21 -19
  14. package/dist/components/field-error-text/index.js +2 -2
  15. package/dist/components/flex/flex.js +15 -12
  16. package/dist/components/flex/index.js +2 -2
  17. package/dist/components/grid/grid.js +15 -12
  18. package/dist/components/grid/index.js +2 -2
  19. package/dist/components/heading/heading.js +22 -19
  20. package/dist/components/heading/index.js +2 -2
  21. package/dist/components/helper-text/helper-text.js +14 -13
  22. package/dist/components/helper-text/index.js +2 -2
  23. package/dist/components/icon/icon.js +16 -14
  24. package/dist/components/icon/index.js +4 -4
  25. package/dist/components/index.js +51 -46
  26. package/dist/components/input/index.js +3 -3
  27. package/dist/components/input/input.js +79 -66
  28. package/dist/components/label/index.js +2 -2
  29. package/dist/components/label/label.js +17 -23
  30. package/dist/components/link/index.js +2 -2
  31. package/dist/components/link/link.js +20 -19
  32. package/dist/components/modal/index.js +2 -2
  33. package/dist/components/modal/modal.js +173 -14
  34. package/dist/components/navigation-menu/index.js +2 -2
  35. package/dist/components/navigation-menu/navigation-menu.js +391 -8
  36. package/dist/components/notification/index.js +2 -2
  37. package/dist/components/notification/notification.d.ts +8 -7
  38. package/dist/components/notification/notification.js +96 -24
  39. package/dist/components/radio-group/index.js +2 -2
  40. package/dist/components/radio-group/radio-group.js +91 -8
  41. package/dist/components/spinner/index.js +2 -2
  42. package/dist/components/spinner/spinner.js +36 -29
  43. package/dist/components/text/index.js +2 -2
  44. package/dist/components/text/text.js +18 -17
  45. package/dist/components/text-field/index.js +2 -2
  46. package/dist/components/text-field/text-field.js +110 -90
  47. package/dist/components/text-spacing/index.js +2 -2
  48. package/dist/components/text-spacing/text-spacing.js +14 -12
  49. package/dist/components/toggle/index.js +2 -2
  50. package/dist/components/toggle/toggle.d.ts +1 -1
  51. package/dist/components/toggle/toggle.js +84 -23
  52. package/dist/components/visually-hidden/index.js +2 -2
  53. package/dist/components/visually-hidden/visually-hidden.js +17 -15
  54. package/dist/icons/category.js +2 -2
  55. package/dist/icons/name.js +2 -2
  56. package/dist/main.js +359 -61
  57. package/dist/style.css +3406 -0
  58. package/dist/tokens/border/variables.js +18 -10
  59. package/dist/tokens/breakpoint/variables.js +8 -5
  60. package/dist/tokens/color/variables.js +452 -227
  61. package/dist/tokens/index.d.ts +7 -7
  62. package/dist/tokens/index.js +308 -14
  63. package/dist/tokens/motion/variables.js +22 -12
  64. package/dist/tokens/shadow/variables.js +8 -5
  65. package/dist/tokens/spacing/variables.js +46 -24
  66. package/dist/tokens/typography/variables.js +48 -25
  67. package/dist/utils/action.js +10 -7
  68. package/dist/utils/composeEventHandlers.js +7 -5
  69. package/dist/utils/composeRefs.js +13 -9
  70. package/dist/utils/layout/align.js +5 -4
  71. package/dist/utils/layout/flex.js +25 -18
  72. package/dist/utils/layout/gap.js +7 -6
  73. package/dist/utils/layout/grid.js +31 -24
  74. package/dist/utils/layout/height.js +12 -11
  75. package/dist/utils/layout/index.d.ts +1863 -0
  76. package/dist/utils/layout/index.js +77 -59
  77. package/dist/utils/layout/inset.js +10 -9
  78. package/dist/utils/layout/justify.js +6 -5
  79. package/dist/utils/layout/margin.js +10 -9
  80. package/dist/utils/layout/padding.js +10 -9
  81. package/dist/utils/layout/position.js +6 -5
  82. package/dist/utils/layout/util.js +7 -6
  83. package/dist/utils/layout/width.js +8 -7
  84. package/package.json +22 -14
  85. package/dist/assets/badge.css +0 -1
  86. package/dist/assets/button.css +0 -1
  87. package/dist/assets/field-error-text.css +0 -1
  88. package/dist/assets/flex.css +0 -1
  89. package/dist/assets/grid.css +0 -1
  90. package/dist/assets/heading.css +0 -1
  91. package/dist/assets/helper-text.css +0 -1
  92. package/dist/assets/icon.css +0 -1
  93. package/dist/assets/input.css +0 -1
  94. package/dist/assets/label.css +0 -1
  95. package/dist/assets/link.css +0 -1
  96. package/dist/assets/main.css +0 -1
  97. package/dist/assets/navigation-menu.css +0 -1
  98. package/dist/assets/radio-group.css +0 -1
  99. package/dist/assets/spinner.css +0 -1
  100. package/dist/assets/text-field.css +0 -1
  101. package/dist/assets/text-spacing.css +0 -1
  102. package/dist/assets/text.css +0 -1
  103. package/dist/assets/visually-hidden.css +0 -1
  104. package/dist/badge-Cnug5TzH.js +0 -1855
  105. package/dist/clsx-DB4S2d7J.js +0 -22
  106. package/dist/index-DM5e-Whg.js +0 -43
  107. package/dist/index-DpfSJps6.js +0 -75
  108. package/dist/index-FPIZOCcD.js +0 -305
  109. package/dist/navigation-menu-DKuyW8zE.js +0 -1036
  110. package/dist/radio-group-B--zT3OL.js +0 -440
  111. package/dist/variables-BKiPmtHY.js +0 -458
  112. package/dist/variables-BkY5b0io.js +0 -14
  113. package/dist/variables-Bq0YUbLS.js +0 -14
  114. package/dist/variables-CDK515QX.js +0 -52
  115. package/dist/variables-CMRTN8qo.js +0 -28
  116. package/dist/variables-Dmoh9YtD.js +0 -54
  117. package/dist/variables-IczXZ5CN.js +0 -24
@@ -1,4 +1,5 @@
1
- import { HeadingProps, IconProps } from '..';
1
+ import { IconProps } from '../icon';
2
+ import { HeadingProps } from '../heading';
2
3
  import { default as React } from 'react';
3
4
 
4
5
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
@@ -1,27 +1,93 @@
1
- import "react/jsx-runtime";
2
- import "../../clsx-DB4S2d7J.js";
3
- import "react";
4
- import { A as y } from "../../badge-Cnug5TzH.js";
5
- import "../../radio-group-B--zT3OL.js";
6
- import "../box/box.js";
7
- import "../flex/flex.js";
8
- import "../grid/grid.js";
9
- import "../../navigation-menu-DKuyW8zE.js";
10
- import "../link/link.js";
11
- import "../button/button.js";
12
- import "../field-error-text/field-error-text.js";
13
- import "../helper-text/helper-text.js";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import React__default from "react";
4
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
+ import { Heading } from "../heading/heading.js";
14
6
  import "../../assets/4bbd022cee9b0f06.svg";
15
- import "../icon/icon.js";
16
- import "../input/input.js";
17
- import "../label/label.js";
18
- import "../spinner/spinner.js";
19
- import "../text/text.js";
20
- import "../text-field/text-field.js";
21
- import "../heading/heading.js";
22
- import "../visually-hidden/visually-hidden.js";
23
- import "../text-spacing/text-spacing.js";
24
- import "../../index-DpfSJps6.js";
7
+ import { Icon } from "../icon/icon.js";
8
+ import { Slottable } from "@radix-ui/react-slot";
9
+ const slideDown = "_slideDown_fs2mc_1";
10
+ const slideUp = "_slideUp_fs2mc_1";
11
+ const styles = {
12
+ "teddy-accordion--indented": "_teddy-accordion--indented_fs2mc_3",
13
+ "teddy-accordion__trigger": "_teddy-accordion__trigger_fs2mc_3",
14
+ "teddy-accordion__content": "_teddy-accordion__content_fs2mc_4",
15
+ "teddy-accordion--negative": "_teddy-accordion--negative_fs2mc_13",
16
+ "teddy-accordion__header": "_teddy-accordion__header_fs2mc_13",
17
+ "teddy-accordion__title": "_teddy-accordion__title_fs2mc_17",
18
+ "teddy-accordion__item": "_teddy-accordion__item_fs2mc_28",
19
+ "teddy-accordion": "_teddy-accordion_fs2mc_3",
20
+ "teddy-accordion__indicator": "_teddy-accordion__indicator_fs2mc_107",
21
+ slideDown,
22
+ slideUp
23
+ };
24
+ const rootClassName = "teddy-accordion";
25
+ const Root = React__default.forwardRef(
26
+ ({ className, variant = "default", children, indented = false, ...props }, forwardRef) => {
27
+ const classes = clsx(
28
+ styles[rootClassName],
29
+ styles[`${rootClassName}--${variant}`],
30
+ {
31
+ [styles[`${rootClassName}--indented`]]: indented
32
+ },
33
+ className
34
+ );
35
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { ...props, ref: forwardRef, className: classes, children });
36
+ }
37
+ );
38
+ Root.displayName = "Accordion";
39
+ const Item = React__default.forwardRef(
40
+ ({ className, children, ...props }, forwardRef) => {
41
+ const classes = clsx([styles[`${rootClassName}__item`]], className);
42
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ...props, ref: forwardRef, className: classes, children });
43
+ }
44
+ );
45
+ const Header = React__default.forwardRef(
46
+ ({ className, children, ...props }, forwardRef) => {
47
+ const classes = clsx([styles[`${rootClassName}__header`]], className);
48
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { ...props, ref: forwardRef, asChild: true, className: classes, children: /* @__PURE__ */ jsx(Heading, { variant: "title-100", ...props.asChild ? { asChild: true } : { as: "h3" }, children }) });
49
+ }
50
+ );
51
+ Header.displayName = "Accordion.Header";
52
+ const Trigger = React__default.forwardRef(
53
+ ({ className, children, hideIndicator, ...props }, forwardRef) => {
54
+ const classes = clsx([styles[`${rootClassName}__trigger`]], className);
55
+ return /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, { ...props, ref: forwardRef, className: classes, children: [
56
+ /* @__PURE__ */ jsx(Slottable, { children }),
57
+ !hideIndicator && /* @__PURE__ */ jsx(Indicator, {})
58
+ ] });
59
+ }
60
+ );
61
+ Trigger.displayName = "Accordion.Trigger";
62
+ const Indicator = React__default.forwardRef(
63
+ ({ className, children, ...props }, forwardRef) => {
64
+ const classes = clsx([styles[`${rootClassName}__indicator`]], className);
65
+ return /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, name: "chevron-down", ...props, ref: forwardRef, className: classes, children });
66
+ }
67
+ );
68
+ Indicator.displayName = "Accordion.Indicator";
69
+ const Content = React__default.forwardRef(
70
+ ({ className, children, ...props }, forwardRef) => {
71
+ const classes = clsx([styles[`${rootClassName}__content`]], className);
72
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Content, { ...props, ref: forwardRef, className: classes, children });
73
+ }
74
+ );
75
+ Content.displayName = "Accordion.Content";
76
+ const Title = React__default.forwardRef(
77
+ ({ className, children, variant = "title-400", ...props }, forwardRef) => {
78
+ const classes = clsx([styles[`${rootClassName}__title`]], className);
79
+ return /* @__PURE__ */ jsx(Heading, { ...props, variant, ref: forwardRef, className: classes, children });
80
+ }
81
+ );
82
+ Title.displayName = "Accordion.Title";
83
+ const Accordion = Object.assign(Root, {
84
+ Trigger,
85
+ Content,
86
+ Header,
87
+ Item,
88
+ Indicator,
89
+ Title
90
+ });
25
91
  export {
26
- y as Accordion
92
+ Accordion
27
93
  };
@@ -1,4 +1,4 @@
1
- import { A as c } from "../../badge-Cnug5TzH.js";
1
+ import { Accordion } from "./accordion.js";
2
2
  export {
3
- c as Accordion
3
+ Accordion
4
4
  };
@@ -1,27 +1,43 @@
1
- import "react/jsx-runtime";
2
- import "../../clsx-DB4S2d7J.js";
3
- import "react";
4
- import { B as y } from "../../badge-Cnug5TzH.js";
5
- import "../../index-DpfSJps6.js";
6
- import "../../radio-group-B--zT3OL.js";
7
- import "../box/box.js";
8
- import "../flex/flex.js";
9
- import "../grid/grid.js";
10
- import "../../navigation-menu-DKuyW8zE.js";
11
- import "../link/link.js";
12
- import "../button/button.js";
13
- import "../field-error-text/field-error-text.js";
14
- import "../helper-text/helper-text.js";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import React__default from "react";
4
+ import { Slottable, Slot } from "@radix-ui/react-slot";
15
5
  import "../../assets/4bbd022cee9b0f06.svg";
16
- import "../icon/icon.js";
17
- import "../input/input.js";
18
- import "../label/label.js";
19
- import "../spinner/spinner.js";
20
- import "../text/text.js";
21
- import "../text-field/text-field.js";
22
- import "../heading/heading.js";
23
- import "../visually-hidden/visually-hidden.js";
24
- import "../text-spacing/text-spacing.js";
6
+ import { Icon } from "../icon/icon.js";
7
+ const styles = {
8
+ "teddy-badge": "_teddy-badge_sg6ab_1",
9
+ "teddy-badge--attention": "_teddy-badge--attention_sg6ab_13",
10
+ "teddy-badge--special": "_teddy-badge--special_sg6ab_17",
11
+ "teddy-badge--neutral": "_teddy-badge--neutral_sg6ab_21",
12
+ "teddy-badge--information": "_teddy-badge--information_sg6ab_25",
13
+ "teddy-badge--success": "_teddy-badge--success_sg6ab_29",
14
+ "teddy-badge--warning": "_teddy-badge--warning_sg6ab_33",
15
+ "teddy-badge--error": "_teddy-badge--error_sg6ab_37"
16
+ };
17
+ const rootClassName = "teddy-badge";
18
+ function getIcon(variant) {
19
+ if (variant === "success") {
20
+ return "check-circle";
21
+ }
22
+ if (variant === "warning") {
23
+ return "alert";
24
+ }
25
+ if (variant === "error") {
26
+ return "error";
27
+ }
28
+ }
29
+ const Badge = React__default.forwardRef(
30
+ ({ className, variant, hideIcon, asChild, children, ...props }, forwardRef) => {
31
+ const classes = clsx([styles[`${rootClassName}`]], [styles[`${rootClassName}--${variant}`]], className);
32
+ const Comp = asChild ? Slot : "span";
33
+ const iconName = getIcon(variant);
34
+ return /* @__PURE__ */ jsxs(Comp, { ...props, ref: forwardRef, className: classes, children: [
35
+ !hideIcon && iconName && /* @__PURE__ */ jsx(Icon, { name: iconName }),
36
+ /* @__PURE__ */ jsx(Slottable, { children })
37
+ ] });
38
+ }
39
+ );
40
+ Badge.displayName = "Badge";
25
41
  export {
26
- y as Badge
42
+ Badge
27
43
  };
@@ -1,4 +1,4 @@
1
- import { B as o } from "../../badge-Cnug5TzH.js";
1
+ import { Badge } from "./badge.js";
2
2
  export {
3
- o as Badge
3
+ Badge
4
4
  };
@@ -1,13 +1,17 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import p from "react";
3
- import { c as f } from "../../clsx-DB4S2d7J.js";
4
- import { extractProps as l } from "../../utils/layout/index.js";
5
- import { $ as d } from "../../index-DpfSJps6.js";
6
- const i = {}, x = "teddy-box", n = p.forwardRef((o, s) => {
7
- const { className: t, asChild: r, style: e, ...c } = l(o), a = f([i[`${x}`]], t);
8
- return /* @__PURE__ */ m(r ? d : "div", { ...c, style: e, ref: s, className: a });
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { extractProps } from "../../utils/layout/index.js";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+ const styles = {};
7
+ const rootClassName = "teddy-box";
8
+ const Box = React__default.forwardRef((props, forwardRef) => {
9
+ const { className, asChild, style, ...rest } = extractProps(props);
10
+ const classes = clsx([styles[`${rootClassName}`]], className);
11
+ const Comp = asChild ? Slot : "div";
12
+ return /* @__PURE__ */ jsx(Comp, { ...rest, style, ref: forwardRef, className: classes });
9
13
  });
10
- n.displayName = "Box";
14
+ Box.displayName = "Box";
11
15
  export {
12
- n as Box
16
+ Box
13
17
  };
@@ -1,4 +1,4 @@
1
- import { Box as x } from "./box.js";
1
+ import { Box } from "./box.js";
2
2
  export {
3
- x as Box
3
+ Box
4
4
  };
@@ -1,11 +1,12 @@
1
- import '../../assets/button.css';
2
- import { jsxs as $, jsx as _ } from "react/jsx-runtime";
3
- import { a as A, $ as C } from "../../index-DpfSJps6.js";
4
- import { c as I } from "../../clsx-DB4S2d7J.js";
5
- import * as N from "react";
6
- import { Spinner as w } from "../spinner/spinner.js";
7
- import { extractProps as j } from "../../utils/layout/index.js";
8
- const k = "_fadeInAnimation_1biph_1", R = "_scaleInAnimation_1biph_1", t = {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Slottable, Slot } from "@radix-ui/react-slot";
3
+ import { clsx } from "clsx";
4
+ import * as React from "react";
5
+ import { Spinner } from "../spinner/spinner.js";
6
+ import { extractProps } from "../../utils/layout/index.js";
7
+ const fadeInAnimation = "_fadeInAnimation_1biph_1";
8
+ const scaleInAnimation = "_scaleInAnimation_1biph_1";
9
+ const styles = {
9
10
  "teddy-button": "_teddy-button_1biph_18",
10
11
  "teddy-button--sm": "_teddy-button--sm_1biph_53",
11
12
  "teddy-button--icon-only": "_teddy-button--icon-only_1biph_56",
@@ -27,10 +28,12 @@ const k = "_fadeInAnimation_1biph_1", R = "_scaleInAnimation_1biph_1", t = {
27
28
  "teddy-button--text-negative": "_teddy-button--text-negative_1biph_195",
28
29
  "teddy-button--text": "_teddy-button--text_1biph_195",
29
30
  "teddy-button__loading": "_teddy-button__loading_1biph_242",
30
- fadeInAnimation: k,
31
+ fadeInAnimation,
31
32
  "teddy-button__spinner": "_teddy-button__spinner_1biph_253",
32
- scaleInAnimation: R
33
- }, e = "teddy-button", W = [
33
+ scaleInAnimation
34
+ };
35
+ const rootClassName = "teddy-button";
36
+ const variants = [
34
37
  "primary",
35
38
  "secondary",
36
39
  "destructive",
@@ -43,63 +46,68 @@ const k = "_fadeInAnimation_1biph_1", R = "_scaleInAnimation_1biph_1", t = {
43
46
  "tertiary-purple-negative",
44
47
  "text-negative",
45
48
  "expressive-negative"
46
- ], b = N.forwardRef((y, p) => {
49
+ ];
50
+ const Root = React.forwardRef((args, ref) => {
47
51
  const {
48
- className: u,
49
- variant: d,
50
- size: o = "md",
51
- iconOnly: c,
52
- fullWidth: l,
53
- disabled: i = !1,
54
- loading: n = !1,
55
- asChild: v = !1,
56
- onClick: a,
57
- children: m,
58
- ...s
59
- } = j(y), h = v ? C : "button", g = I(
60
- [t[e], t[`${e}--${d}`], t[`${e}--${o}`]],
52
+ className,
53
+ variant,
54
+ size = "md",
55
+ iconOnly,
56
+ fullWidth,
57
+ disabled = false,
58
+ loading = false,
59
+ asChild = false,
60
+ onClick,
61
+ children,
62
+ ...props
63
+ } = extractProps(args);
64
+ const Comp = asChild ? Slot : "button";
65
+ const classes = clsx(
66
+ [styles[rootClassName], styles[`${rootClassName}--${variant}`], styles[`${rootClassName}--${size}`]],
61
67
  {
62
- [t[`${e}--icon-only`]]: c,
63
- [t[`${e}--negative`]]: d.endsWith("negative"),
64
- [t[`${e}--full-width`]]: l,
65
- [t[`${e}--disabled`]]: i || n
68
+ [styles[`${rootClassName}--icon-only`]]: iconOnly,
69
+ [styles[`${rootClassName}--negative`]]: variant.endsWith("negative"),
70
+ [styles[`${rootClassName}--full-width`]]: fullWidth,
71
+ [styles[`${rootClassName}--disabled`]]: disabled || loading
66
72
  },
67
- u
73
+ className
68
74
  );
69
- function f(r) {
70
- if (i || n) {
71
- r.preventDefault();
75
+ function handleClick(event) {
76
+ if (disabled || loading) {
77
+ event.preventDefault();
72
78
  return;
73
79
  }
74
- a && a(r);
80
+ if (onClick) {
81
+ onClick(event);
82
+ }
75
83
  }
76
- const x = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
77
- return /* @__PURE__ */ $(
78
- h,
84
+ const getSpinnerVariant = () => variant.endsWith("negative") ? "negative-disabled" : "disabled";
85
+ return /* @__PURE__ */ jsxs(
86
+ Comp,
79
87
  {
80
- className: g,
81
- "aria-disabled": s["aria-disabled"] || i || n,
82
- onClick: f,
83
- ref: p,
84
- ...s,
88
+ className: classes,
89
+ "aria-disabled": props["aria-disabled"] || disabled || loading,
90
+ onClick: handleClick,
91
+ ref,
92
+ ...props,
85
93
  children: [
86
- /* @__PURE__ */ _(A, { children: m }),
87
- n && /* @__PURE__ */ _(
88
- w,
94
+ /* @__PURE__ */ jsx(Slottable, { children }),
95
+ loading && /* @__PURE__ */ jsx(
96
+ Spinner,
89
97
  {
90
- size: o === "lg" ? "xs" : "xxs",
91
- variant: x(),
92
- className: t[`${e}__spinner`]
98
+ size: size === "lg" ? "xs" : "xxs",
99
+ variant: getSpinnerVariant(),
100
+ className: styles[`${rootClassName}__spinner`]
93
101
  }
94
102
  )
95
103
  ]
96
104
  }
97
105
  );
98
106
  });
99
- b.displayName = "Button";
100
- const P = Object.assign(b, {
101
- variants: W
107
+ Root.displayName = "Button";
108
+ const Button = Object.assign(Root, {
109
+ variants
102
110
  });
103
111
  export {
104
- P as Button
112
+ Button
105
113
  };
@@ -1,4 +1,4 @@
1
- import { Button as r } from "./button.js";
1
+ import { Button } from "./button.js";
2
2
  export {
3
- r as Button
3
+ Button
4
4
  };
@@ -1,4 +1,8 @@
1
- import { Button as PrimitiveButton, Heading as PrimitiveHeading, Link as PrimitiveLink, Box, Flex } from '..';
1
+ import { Link as PrimitiveLink } from '../link';
2
+ import { Button as PrimitiveButton } from '../button';
3
+ import { Heading as PrimitiveHeading } from '../heading';
4
+ import { Box } from '../box';
5
+ import { Flex } from '../flex';
2
6
  import { default as React } from 'react';
3
7
 
4
8
  declare const variantOptions: readonly ["purple-light", "purple-dark", "gray", "white", "beige"];
@@ -34,11 +38,17 @@ type ImageProps = React.ComponentPropsWithoutRef<'img'> & {
34
38
  /** The inset allows make the image bleed out to the edges */
35
39
  inset?: (typeof insetOptions)[number];
36
40
  };
37
- type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'variant'>;
41
+ type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'variant'> & {
42
+ variant?: React.ComponentPropsWithoutRef<typeof PrimitiveButton>['variant'];
43
+ };
38
44
  /** -------------------------------------------------------------------------------------------------
39
45
  * Link
40
46
  * -----------------------------------------------------------------------------------------------*/
41
47
  type LinkProps = React.ComponentPropsWithoutRef<typeof PrimitiveLink>;
48
+ /** -------------------------------------------------------------------------------------------------
49
+ * Line
50
+ * -----------------------------------------------------------------------------------------------*/
51
+ type LineProps = Omit<React.ComponentPropsWithoutRef<typeof Box>, 'asChild' | 'as' | 'children'>;
42
52
  declare const Card: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>> & {
43
53
  Root: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>>;
44
54
  Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
@@ -47,7 +57,27 @@ declare const Card: React.ForwardRefExoticComponent<RootProps & React.RefAttribu
47
57
  /** The inset allows make the image bleed out to the edges */
48
58
  inset?: "all" | "top" | "bottom" | "right" | "left" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-right-left" | "bottom-left-right" | "top-bottom" | "left-right" | undefined;
49
59
  } & React.RefAttributes<HTMLImageElement>>;
50
- Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
60
+ Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & 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 & {
61
+ asChild?: boolean | undefined;
62
+ loading?: boolean | undefined;
63
+ fullWidth?: boolean | undefined;
64
+ size?: "sm" | "md" | "lg" | undefined;
65
+ variant: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative";
66
+ } & {
67
+ iconOnly: true;
68
+ "aria-label": string;
69
+ } & React.RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & 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 & {
70
+ asChild?: boolean | undefined;
71
+ loading?: boolean | undefined;
72
+ fullWidth?: boolean | undefined;
73
+ size?: "sm" | "md" | "lg" | undefined;
74
+ variant: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative";
75
+ } & {
76
+ iconOnly?: false | undefined;
77
+ "aria-label"?: string | undefined;
78
+ } & React.RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
79
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
80
+ } & React.RefAttributes<HTMLButtonElement>>;
51
81
  Link: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
52
82
  asChild?: boolean | undefined;
53
83
  disableVisited?: boolean | undefined;
@@ -56,6 +86,7 @@ declare const Card: React.ForwardRefExoticComponent<RootProps & React.RefAttribu
56
86
  variant: "text" | "navigation" | "text-negative" | "standalone" | "standalone-negative" | "navigation-negative";
57
87
  } & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
58
88
  Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLDivElement>>;
89
+ Line: React.ForwardRefExoticComponent<LineProps & React.RefAttributes<HTMLDivElement>>;
59
90
  variantOptions: readonly ["purple-light", "purple-dark", "gray", "white", "beige"];
60
91
  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"];
61
92
  };
@@ -67,6 +98,7 @@ type CardProps = {
67
98
  Image: ImageProps;
68
99
  Slot: SlotProps;
69
100
  Link: LinkProps;
101
+ Line: LineProps;
70
102
  };
71
103
  export { Card };
72
104
  export type { CardProps };