@telia/teddy 0.0.3 → 0.0.4

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 (108) hide show
  1. package/README.md +8 -10
  2. package/dist/assets/5161b177f001ea1a.svg +1080 -0
  3. package/dist/assets/badge.css +1 -0
  4. package/dist/assets/button.css +1 -1
  5. package/dist/assets/grid.css +1 -0
  6. package/dist/assets/heading.css +1 -0
  7. package/dist/assets/icon.css +1 -1
  8. package/dist/assets/input.css +1 -1
  9. package/dist/assets/label.css +1 -1
  10. package/dist/assets/link.css +1 -0
  11. package/dist/assets/main.css +1 -1
  12. package/dist/assets/navigation-menu.css +1 -0
  13. package/dist/assets/text-field.css +1 -1
  14. package/dist/assets/text-spacing.css +1 -0
  15. package/dist/assets/text.css +1 -1
  16. package/dist/assets/visually-hidden.css +1 -0
  17. package/dist/badge-CbHdlkcM.js +742 -0
  18. package/dist/components/accordion/accordion.d.ts +59 -0
  19. package/dist/components/accordion/accordion.js +24 -0
  20. package/dist/components/accordion/index.d.ts +2 -0
  21. package/dist/components/accordion/index.js +4 -0
  22. package/dist/components/badge/badge.d.ts +21 -0
  23. package/dist/components/badge/badge.js +24 -0
  24. package/dist/components/badge/index.d.ts +2 -0
  25. package/dist/components/badge/index.js +4 -0
  26. package/dist/components/button/button.d.ts +19 -20
  27. package/dist/components/button/button.js +82 -71
  28. package/dist/components/button/index.d.ts +1 -1
  29. package/dist/components/card/card.d.ts +68 -0
  30. package/dist/components/card/card.js +24 -0
  31. package/dist/components/card/index.d.ts +2 -0
  32. package/dist/components/card/index.js +4 -0
  33. package/dist/components/field-error-text/field-error-text.d.ts +4 -3
  34. package/dist/components/field-error-text/field-error-text.js +12 -12
  35. package/dist/components/grid/grid.d.ts +77 -0
  36. package/dist/components/grid/grid.js +393 -0
  37. package/dist/components/grid/index.d.ts +2 -0
  38. package/dist/components/grid/index.js +4 -0
  39. package/dist/components/heading/heading.d.ts +63 -0
  40. package/dist/components/heading/heading.js +53 -0
  41. package/dist/components/heading/index.d.ts +2 -0
  42. package/dist/components/heading/index.js +4 -0
  43. package/dist/components/helper-text/helper-text.d.ts +2 -1
  44. package/dist/components/helper-text/helper-text.js +7 -7
  45. package/dist/components/icon/icon.d.ts +13 -2
  46. package/dist/components/icon/icon.js +22 -22
  47. package/dist/components/icon/index.d.ts +2 -1
  48. package/dist/components/icon/index.js +1 -1
  49. package/dist/components/index.d.ts +10 -0
  50. package/dist/components/index.js +38 -21
  51. package/dist/components/input/input.d.ts +14 -23
  52. package/dist/components/input/input.js +72 -50
  53. package/dist/components/label/label.d.ts +3 -1
  54. package/dist/components/label/label.js +23 -51
  55. package/dist/components/link/index.d.ts +2 -0
  56. package/dist/components/link/index.js +4 -0
  57. package/dist/components/link/link.d.ts +49 -0
  58. package/dist/components/link/link.js +36 -0
  59. package/dist/components/navigation-menu/index.d.ts +2 -0
  60. package/dist/components/navigation-menu/index.js +4 -0
  61. package/dist/components/navigation-menu/navigation-menu.d.ts +126 -0
  62. package/dist/components/navigation-menu/navigation-menu.js +10 -0
  63. package/dist/components/spinner/spinner.d.ts +2 -1
  64. package/dist/components/spinner/spinner.js +5 -5
  65. package/dist/components/switch/index.d.ts +2 -0
  66. package/dist/components/switch/index.js +4 -0
  67. package/dist/components/switch/switch.d.ts +44 -0
  68. package/dist/components/switch/switch.js +23 -0
  69. package/dist/components/text/text.d.ts +15 -8
  70. package/dist/components/text/text.js +27 -41
  71. package/dist/components/text-field/text-field.d.ts +24 -24
  72. package/dist/components/text-field/text-field.js +102 -125
  73. package/dist/components/text-spacing/index.d.ts +2 -0
  74. package/dist/components/text-spacing/index.js +4 -0
  75. package/dist/components/text-spacing/text-spacing.d.ts +19 -0
  76. package/dist/components/text-spacing/text-spacing.js +17 -0
  77. package/dist/components/visually-hidden/index.d.ts +2 -0
  78. package/dist/components/visually-hidden/index.js +4 -0
  79. package/dist/components/visually-hidden/visually-hidden.d.ts +15 -0
  80. package/dist/components/visually-hidden/visually-hidden.js +24 -0
  81. package/dist/icons/category.d.ts +985 -0
  82. package/dist/icons/category.js +333 -0
  83. package/dist/icons/name.d.ts +1 -1
  84. package/dist/icons/name.js +250 -200
  85. package/dist/index-DM5e-Whg.js +43 -0
  86. package/dist/index-DpfSJps6.js +75 -0
  87. package/dist/main.d.ts +1 -0
  88. package/dist/main.js +53 -36
  89. package/dist/navigation-menu-BgN7IKev.js +1334 -0
  90. package/dist/tokens/spacing/variables.json.d.ts +34 -0
  91. package/dist/utils/action.d.ts +1 -1
  92. package/dist/utils/composeEventHandlers.d.ts +30 -0
  93. package/dist/utils/composeEventHandlers.js +9 -0
  94. package/dist/utils/composeRefs.d.ts +40 -0
  95. package/dist/utils/composeRefs.js +14 -0
  96. package/dist/utils/layout.d.ts +12 -0
  97. package/dist/utils/layout.js +11 -0
  98. package/package.json +23 -22
  99. package/dist/assets/f2a2f391a886d395.svg +0 -284
  100. package/dist/index-TI1xsy6a.js +0 -70
  101. package/dist/teams/index.d.ts +0 -0
  102. package/dist/teams/index.js +0 -1
  103. package/dist/teams/min-side/index.d.ts +0 -0
  104. package/dist/teams/min-side/index.js +0 -1
  105. package/dist/teams/webshop/index.d.ts +0 -0
  106. package/dist/teams/webshop/index.js +0 -1
  107. /package/dist/{teams/business/index.d.ts → components/text-field/tex-field-label.d.ts} +0 -0
  108. /package/dist/{teams/business/index.js → components/text-field/tex-field-label.js} +0 -0
@@ -0,0 +1,59 @@
1
+ import { HeadingProps, IconProps } from '..';
2
+ import { default as React } from 'react';
3
+
4
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
5
+ /** -------------------------------------------------------------------------------------------------
6
+ * Root
7
+ * -----------------------------------------------------------------------------------------------*/
8
+ type RootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
9
+ variant?: 'default' | 'negative';
10
+ };
11
+ /** -------------------------------------------------------------------------------------------------
12
+ * Item
13
+ * -----------------------------------------------------------------------------------------------*/
14
+ type ItemProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
15
+ /** -------------------------------------------------------------------------------------------------
16
+ * Header
17
+ * -----------------------------------------------------------------------------------------------*/
18
+ type HeaderProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Header>;
19
+ /** -------------------------------------------------------------------------------------------------
20
+ * Trigger
21
+ * -----------------------------------------------------------------------------------------------*/
22
+ type TriggerProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {
23
+ hideIndicator?: boolean;
24
+ };
25
+ /** -------------------------------------------------------------------------------------------------
26
+ * Indicator
27
+ * -----------------------------------------------------------------------------------------------*/
28
+ type IndicatorProps = Partial<IconProps>;
29
+ /** -------------------------------------------------------------------------------------------------
30
+ * Content
31
+ * -----------------------------------------------------------------------------------------------*/
32
+ type ContentProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
33
+ /** -------------------------------------------------------------------------------------------------
34
+ * Title
35
+ * -----------------------------------------------------------------------------------------------*/
36
+ type TitleProps = Omit<HeadingProps['Root'], 'variant'> & {
37
+ variant?: HeadingProps['Root']['variant'];
38
+ } & (HeadingProps['AsChildProps'] | HeadingProps['H1Props'] | HeadingProps['H2Props'] | HeadingProps['H3Props'] | HeadingProps['H4Props'] | HeadingProps['H5Props'] | HeadingProps['H6Props']);
39
+ declare const Accordion: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>> & {
40
+ Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
41
+ hideIndicator?: boolean | undefined;
42
+ } & React.RefAttributes<HTMLButtonElement>>;
43
+ Content: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
+ Header: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
45
+ Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
+ Indicator: React.ForwardRefExoticComponent<Omit<Partial<IconProps>, "ref"> & React.RefAttributes<SVGSVGElement>>;
47
+ Title: React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLHeadingElement>>;
48
+ };
49
+ type AccordionProps = {
50
+ Root: RootProps;
51
+ Trigger: TriggerProps;
52
+ Content: ContentProps;
53
+ Header: HeaderProps;
54
+ Item: ItemProps;
55
+ Indicator: IndicatorProps;
56
+ Title: TitleProps;
57
+ };
58
+ export { Accordion };
59
+ export type { AccordionProps };
@@ -0,0 +1,24 @@
1
+ import "react/jsx-runtime";
2
+ import "../../clsx-DB4S2d7J.js";
3
+ import "react";
4
+ import { A as u } from "../../badge-CbHdlkcM.js";
5
+ import "../grid/grid.js";
6
+ import "../../navigation-menu-BgN7IKev.js";
7
+ import "../link/link.js";
8
+ import "../button/button.js";
9
+ import "../field-error-text/field-error-text.js";
10
+ import "../helper-text/helper-text.js";
11
+ import "../../assets/5161b177f001ea1a.svg";
12
+ import "../icon/icon.js";
13
+ import "../input/input.js";
14
+ import "../label/label.js";
15
+ import "../spinner/spinner.js";
16
+ import "../text/text.js";
17
+ import "../text-field/text-field.js";
18
+ import "../heading/heading.js";
19
+ import "../visually-hidden/visually-hidden.js";
20
+ import "../text-spacing/text-spacing.js";
21
+ import "../../index-DpfSJps6.js";
22
+ export {
23
+ u as Accordion
24
+ };
@@ -0,0 +1,2 @@
1
+ export { Accordion } from './accordion';
2
+ export type { AccordionProps } from './accordion';
@@ -0,0 +1,4 @@
1
+ import { A as c } from "../../badge-CbHdlkcM.js";
2
+ export {
3
+ c as Accordion
4
+ };
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+
3
+ /** -------------------------------------------------------------------------------------------------
4
+ * Badge
5
+ * -----------------------------------------------------------------------------------------------*/
6
+ type Variant = 'attention' | 'special' | 'neutral' | 'information' | 'success' | 'warning' | 'error';
7
+ type BadgeProps = React.ComponentPropsWithoutRef<'span'> & {
8
+ asChild?: boolean;
9
+ variant: Variant;
10
+ hideIcon?: boolean;
11
+ };
12
+ /**
13
+ * Badges are visual indictor labels, which holds small amount of information about a product or service, using contextual colors.
14
+ */
15
+ declare const Badge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
16
+ asChild?: boolean | undefined;
17
+ variant: Variant;
18
+ hideIcon?: boolean | undefined;
19
+ } & React.RefAttributes<HTMLSpanElement>>;
20
+ export { Badge };
21
+ export type { BadgeProps };
@@ -0,0 +1,24 @@
1
+ import "react/jsx-runtime";
2
+ import "../../clsx-DB4S2d7J.js";
3
+ import "react";
4
+ import { B as u } from "../../badge-CbHdlkcM.js";
5
+ import "../../index-DpfSJps6.js";
6
+ import "../grid/grid.js";
7
+ import "../../navigation-menu-BgN7IKev.js";
8
+ import "../link/link.js";
9
+ import "../button/button.js";
10
+ import "../field-error-text/field-error-text.js";
11
+ import "../helper-text/helper-text.js";
12
+ import "../../assets/5161b177f001ea1a.svg";
13
+ import "../icon/icon.js";
14
+ import "../input/input.js";
15
+ import "../label/label.js";
16
+ import "../spinner/spinner.js";
17
+ import "../text/text.js";
18
+ import "../text-field/text-field.js";
19
+ import "../heading/heading.js";
20
+ import "../visually-hidden/visually-hidden.js";
21
+ import "../text-spacing/text-spacing.js";
22
+ export {
23
+ u as Badge
24
+ };
@@ -0,0 +1,2 @@
1
+ export { Badge } from './badge';
2
+ export type { BadgeProps } from './badge';
@@ -0,0 +1,4 @@
1
+ import { B as o } from "../../badge-CbHdlkcM.js";
2
+ export {
3
+ o as Badge
4
+ };
@@ -1,24 +1,23 @@
1
- import { ActionProps } from '../../utils/action';
2
1
  import * as React from 'react';
3
- declare const BUTTON_VARIANT: {
4
- readonly DESTRUCTIVE: "destructive";
5
- readonly DESTRUCTIVE_NEGATIVE: "destructive-negative";
6
- readonly TERTIARY_PURPLE: "tertiary-purple";
7
- readonly TERTIARY_PURPLE_NEGATVIE: "tertiary-purple-negative";
8
- readonly TEXT: "text";
9
- readonly TEXT_NEGATIVE: "text-negative";
10
- readonly PRIMARY: "primary";
11
- readonly PRIMARY_NEGATIVE: "primary-negative";
12
- readonly SECONDARY: "secondary";
13
- readonly SECONDARY_NEGATIVE: "secondary-negative";
14
- readonly EXPRESSIVE: "expressive";
15
- readonly EXPRESSIVE_NEGATIVE: "expressive-negative";
16
- };
17
- type ButtonVariant = (typeof BUTTON_VARIANT)[keyof typeof BUTTON_VARIANT];
18
- type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
2
+ declare const variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative"];
3
+ export type Variant = (typeof variants)[number];
4
+ declare const sizes: readonly ["sm", "md", "lg"];
5
+ export type Size = (typeof sizes)[number];
6
+ type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'> & {
19
7
  asChild?: boolean;
20
8
  loading?: boolean;
21
- } & ActionProps<ButtonVariant>;
22
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
9
+ fullWidth?: boolean;
10
+ size?: Size;
11
+ variant: Variant;
12
+ } & ({
13
+ iconOnly: true;
14
+ ['aria-label']: string;
15
+ } | {
16
+ iconOnly?: false;
17
+ ['aria-label']?: string;
18
+ });
19
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> & {
20
+ variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative"];
21
+ };
23
22
  export { Button };
24
- export type { ButtonProps, ButtonVariant };
23
+ export type { ButtonProps };
@@ -1,95 +1,106 @@
1
- import "../../assets/button.css";
1
+ import '../../assets/button.css';
2
2
  import { jsxs as x, jsx as r } from "react/jsx-runtime";
3
- import { VARIANT as $ } from "../../utils/action.js";
4
- import { $ as E, a as T } from "../../index-TI1xsy6a.js";
3
+ import { a as $, $ as A } from "../../index-DpfSJps6.js";
5
4
  import { c as I } from "../../clsx-DB4S2d7J.js";
6
- import * as A from "react";
7
- import { Spinner as R } from "../spinner/spinner.js";
8
- const N = "_fadeInAnimation_arfv5_1", h = "_scaleInAnimation_arfv5_1", t = {
9
- "teddy-button": "_teddy-button_arfv5_17",
10
- "teddy-button--sm": "_teddy-button--sm_arfv5_52",
11
- "teddy-button--icon-only": "_teddy-button--icon-only_arfv5_55",
12
- "teddy-button--md": "_teddy-button--md_arfv5_58",
13
- "teddy-button--lg": "_teddy-button--lg_arfv5_64",
14
- "teddy-button--full-width": "_teddy-button--full-width_arfv5_70",
15
- "teddy-button--primary": "_teddy-button--primary_arfv5_73",
16
- "teddy-button--disabled": "_teddy-button--disabled_arfv5_77",
17
- "teddy-button--primary-negative": "_teddy-button--primary-negative_arfv5_83",
18
- "teddy-button--secondary": "_teddy-button--secondary_arfv5_95",
19
- "teddy-button--secondary-negative": "_teddy-button--secondary-negative_arfv5_106",
20
- "teddy-button--expressive": "_teddy-button--expressive_arfv5_117",
21
- "teddy-button--expressive-negative": "_teddy-button--expressive-negative_arfv5_127",
22
- "teddy-button--negative": "_teddy-button--negative_arfv5_139",
23
- "teddy-button--destructive": "_teddy-button--destructive_arfv5_146",
24
- "teddy-button--destructive-negative": "_teddy-button--destructive-negative_arfv5_156",
25
- "teddy-button--tertiary-purple": "_teddy-button--tertiary-purple_arfv5_166",
26
- "teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-negative_arfv5_179",
27
- "teddy-button--text-negative": "_teddy-button--text-negative_arfv5_194",
28
- "teddy-button--text": "_teddy-button--text_arfv5_194",
29
- "teddy-button__loading": "_teddy-button__loading_arfv5_241",
30
- fadeInAnimation: N,
31
- "teddy-button__spinner": "_teddy-button__spinner_arfv5_252",
32
- scaleInAnimation: h
33
- };
34
- ({
35
- ...$
36
- });
37
- const e = "teddy-button", V = A.forwardRef(
5
+ import * as w from "react";
6
+ import { Spinner as N } from "../spinner/spinner.js";
7
+ const j = "_fadeInAnimation_1biph_1", C = "_scaleInAnimation_1biph_1", t = {
8
+ "teddy-button": "_teddy-button_1biph_18",
9
+ "teddy-button--sm": "_teddy-button--sm_1biph_53",
10
+ "teddy-button--icon-only": "_teddy-button--icon-only_1biph_56",
11
+ "teddy-button--md": "_teddy-button--md_1biph_59",
12
+ "teddy-button--lg": "_teddy-button--lg_1biph_65",
13
+ "teddy-button--full-width": "_teddy-button--full-width_1biph_71",
14
+ "teddy-button--primary": "_teddy-button--primary_1biph_74",
15
+ "teddy-button--disabled": "_teddy-button--disabled_1biph_78",
16
+ "teddy-button--primary-negative": "_teddy-button--primary-negative_1biph_84",
17
+ "teddy-button--secondary": "_teddy-button--secondary_1biph_96",
18
+ "teddy-button--secondary-negative": "_teddy-button--secondary-negative_1biph_107",
19
+ "teddy-button--expressive": "_teddy-button--expressive_1biph_118",
20
+ "teddy-button--expressive-negative": "_teddy-button--expressive-negative_1biph_128",
21
+ "teddy-button--negative": "_teddy-button--negative_1biph_140",
22
+ "teddy-button--destructive": "_teddy-button--destructive_1biph_147",
23
+ "teddy-button--destructive-negative": "_teddy-button--destructive-negative_1biph_157",
24
+ "teddy-button--tertiary-purple": "_teddy-button--tertiary-purple_1biph_167",
25
+ "teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-negative_1biph_180",
26
+ "teddy-button--text-negative": "_teddy-button--text-negative_1biph_195",
27
+ "teddy-button--text": "_teddy-button--text_1biph_195",
28
+ "teddy-button__loading": "_teddy-button__loading_1biph_242",
29
+ fadeInAnimation: j,
30
+ "teddy-button__spinner": "_teddy-button__spinner_1biph_253",
31
+ scaleInAnimation: C
32
+ }, e = "teddy-button", R = [
33
+ "primary",
34
+ "secondary",
35
+ "destructive",
36
+ "tertiary-purple",
37
+ "text",
38
+ "expressive",
39
+ "primary-negative",
40
+ "secondary-negative",
41
+ "destructive-negative",
42
+ "tertiary-purple-negative",
43
+ "text-negative",
44
+ "expressive-negative"
45
+ ], s = w.forwardRef(
38
46
  ({
39
- className: u,
40
- variant: n,
47
+ className: y,
48
+ variant: d,
41
49
  size: o = "md",
42
- iconOnly: y,
43
- fullWidth: v,
44
- disabled: a = !1,
45
- loading: d = !1,
46
- asChild: b = !1,
47
- onClick: _,
48
- children: f,
49
- ...i
50
- }, c) => {
51
- const l = b ? T : "button", p = I(
52
- [t[e], t[`${e}--${n}`], t[`${e}--${o}`]],
50
+ iconOnly: u,
51
+ fullWidth: p,
52
+ disabled: i = !1,
53
+ loading: n = !1,
54
+ asChild: c = !1,
55
+ onClick: a,
56
+ children: l,
57
+ ..._
58
+ }, v) => {
59
+ const m = c ? A : "button", h = I(
60
+ [t[e], t[`${e}--${d}`], t[`${e}--${o}`]],
53
61
  {
54
- [t[`${e}--icon-only`]]: y,
55
- [t[`${e}--negative`]]: n.endsWith("negative"),
56
- [t[`${e}--full-width`]]: v,
57
- [t[`${e}--disabled`]]: a || d
62
+ [t[`${e}--icon-only`]]: u,
63
+ [t[`${e}--negative`]]: d.endsWith("negative"),
64
+ [t[`${e}--full-width`]]: p,
65
+ [t[`${e}--disabled`]]: i || n
58
66
  },
59
- u
67
+ y
60
68
  );
61
- function m(s) {
62
- if (a || d) {
63
- s.preventDefault();
69
+ function g(b) {
70
+ if (i || n) {
71
+ b.preventDefault();
64
72
  return;
65
73
  }
66
- _ && _(s);
74
+ a && a(b);
67
75
  }
68
- const g = () => n.endsWith("negative") ? "negative-disabled" : "disabled";
76
+ const f = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
69
77
  return /* @__PURE__ */ x(
70
- l,
78
+ m,
71
79
  {
72
- className: p,
73
- "aria-disabled": i["aria-disabled"] || a || d,
74
- onClick: m,
75
- ref: c,
76
- ...i,
80
+ className: h,
81
+ "aria-disabled": _["aria-disabled"] || i || n,
82
+ onClick: g,
83
+ ref: v,
84
+ ..._,
77
85
  children: [
78
- d && /* @__PURE__ */ r("span", { className: t[`${e}__loading`], children: /* @__PURE__ */ r(
79
- R,
86
+ /* @__PURE__ */ r($, { children: l }),
87
+ n && /* @__PURE__ */ r(
88
+ N,
80
89
  {
81
90
  size: o === "lg" ? "xs" : "xxs",
82
- variant: g(),
91
+ variant: f(),
83
92
  className: t[`${e}__spinner`]
84
93
  }
85
- ) }),
86
- /* @__PURE__ */ r(E, { children: f })
94
+ )
87
95
  ]
88
96
  }
89
97
  );
90
98
  }
91
99
  );
92
- V.displayName = "Button";
100
+ s.displayName = "Button";
101
+ const D = Object.assign(s, {
102
+ variants: R
103
+ });
93
104
  export {
94
- V as Button
105
+ D as Button
95
106
  };
@@ -1,2 +1,2 @@
1
1
  export { Button } from './button';
2
- export type { ButtonProps, ButtonVariant } from './button';
2
+ export type { ButtonProps } from './button';
@@ -0,0 +1,68 @@
1
+ import { Button as PrimitiveButton, Heading as PrimitiveHeading, Link as PrimitiveLink } from '..';
2
+ import { default as React } from 'react';
3
+
4
+ declare const variantOptions: readonly ["purple-light", "purple-dark", "gray", "white", "beige"];
5
+ type Variant = (typeof variantOptions)[number];
6
+ /** -------------------------------------------------------------------------------------------------
7
+ * Root
8
+ * -----------------------------------------------------------------------------------------------*/
9
+ type RootProps = React.ComponentPropsWithoutRef<'div'> & {
10
+ asChild?: boolean;
11
+ variant?: Variant;
12
+ bordered?: boolean;
13
+ backgroundImageSrc?: string;
14
+ };
15
+ /** -------------------------------------------------------------------------------------------------
16
+ * Heading
17
+ * -----------------------------------------------------------------------------------------------*/
18
+ type HeadingProps = Partial<React.ComponentPropsWithoutRef<typeof PrimitiveHeading>>;
19
+ /** -------------------------------------------------------------------------------------------------
20
+ * Content
21
+ * -----------------------------------------------------------------------------------------------*/
22
+ type ContentProps = React.ComponentPropsWithoutRef<'div'>;
23
+ /** -------------------------------------------------------------------------------------------------
24
+ * Image
25
+ * -----------------------------------------------------------------------------------------------*/
26
+ declare const insetOptions: readonly ["top", "bottom", "left", "right", "all", "top-right-left", "bottom-left-right", "top-left", "top-right", "bottom-left", "bottom-right", "top-bottom", "left-right"];
27
+ type ImageProps = React.ComponentPropsWithoutRef<'img'> & {
28
+ /** The inset allows make the image bleed out to the edges */
29
+ inset?: (typeof insetOptions)[number];
30
+ };
31
+ type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'variant'>;
32
+ /** -------------------------------------------------------------------------------------------------
33
+ * Link
34
+ * -----------------------------------------------------------------------------------------------*/
35
+ type LinkProps = React.ComponentPropsWithoutRef<typeof PrimitiveLink>;
36
+ declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
37
+ asChild?: boolean | undefined;
38
+ variant?: "purple-light" | "purple-dark" | "gray" | "white" | "beige" | undefined;
39
+ bordered?: boolean | undefined;
40
+ backgroundImageSrc?: string | undefined;
41
+ } & React.RefAttributes<HTMLDivElement>> & {
42
+ Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
43
+ Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
+ Image: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
45
+ /** The inset allows make the image bleed out to the edges */
46
+ inset?: "top" | "bottom" | "left" | "right" | "all" | "top-right-left" | "bottom-left-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-bottom" | "left-right" | undefined;
47
+ } & React.RefAttributes<HTMLImageElement>>;
48
+ Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
49
+ Link: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
50
+ asChild?: boolean | undefined;
51
+ disableVisited?: boolean | undefined;
52
+ ensureTargetArea?: boolean | undefined;
53
+ silent?: boolean | undefined;
54
+ variant: "text" | "text-negative" | "navigation" | "standalone" | "standalone-negative" | "navigation-negative";
55
+ } & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
56
+ variantOptions: readonly ["purple-light", "purple-dark", "gray", "white", "beige"];
57
+ 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"];
58
+ };
59
+ type CardProps = {
60
+ Root: RootProps;
61
+ Heading: HeadingProps;
62
+ Content: ContentProps;
63
+ Button: ButtonProps;
64
+ Image: ImageProps;
65
+ Link: LinkProps;
66
+ };
67
+ export { Card };
68
+ export type { CardProps };
@@ -0,0 +1,24 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../../clsx-DB4S2d7J.js";
4
+ import { C as u } from "../../badge-CbHdlkcM.js";
5
+ import "../grid/grid.js";
6
+ import "../../navigation-menu-BgN7IKev.js";
7
+ import "../link/link.js";
8
+ import "../button/button.js";
9
+ import "../field-error-text/field-error-text.js";
10
+ import "../helper-text/helper-text.js";
11
+ import "../../assets/5161b177f001ea1a.svg";
12
+ import "../input/input.js";
13
+ import "../label/label.js";
14
+ import "../spinner/spinner.js";
15
+ import "../text/text.js";
16
+ import "../text-field/text-field.js";
17
+ import "../heading/heading.js";
18
+ import "../visually-hidden/visually-hidden.js";
19
+ import "../text-spacing/text-spacing.js";
20
+ import "../../utils/composeRefs.js";
21
+ import "../../utils/composeEventHandlers.js";
22
+ export {
23
+ u as Card
24
+ };
@@ -0,0 +1,2 @@
1
+ export { Card } from './card';
2
+ export type { CardProps } from './card';
@@ -0,0 +1,4 @@
1
+ import { C as o } from "../../badge-CbHdlkcM.js";
2
+ export {
3
+ o as Card
4
+ };
@@ -1,8 +1,9 @@
1
- import React from 'react';
2
- import { IconProps } from '../icon';
3
1
  import { TextProps } from '../text';
2
+ import { IconProps } from '../icon';
3
+ import { default as React } from 'react';
4
+
4
5
  export type FieldErrorTextIndicatorProps = Partial<IconProps>;
5
6
  export type FieldErrorTextProps = TextProps;
6
- export declare const FieldErrorText: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLParagraphElement>> & {
7
+ export declare const FieldErrorText: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>> & {
7
8
  Indicator: React.ForwardRefExoticComponent<Omit<Partial<IconProps>, "ref"> & React.RefAttributes<SVGSVGElement>>;
8
9
  };
@@ -1,28 +1,28 @@
1
- import "../../assets/field-error-text.css";
2
- import { jsx as i } from "react/jsx-runtime";
3
- import { c as s } from "../../clsx-DB4S2d7J.js";
1
+ import '../../assets/field-error-text.css';
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ import { c as i } from "../../clsx-DB4S2d7J.js";
4
4
  import a from "react";
5
- import "../../assets/f2a2f391a886d395.svg";
6
- import { Icon as m } from "../icon/icon.js";
7
- import { Text as n } from "../text/text.js";
5
+ import "../../assets/5161b177f001ea1a.svg";
6
+ import { Icon as n } from "../icon/icon.js";
7
+ import { Text as m } from "../text/text.js";
8
8
  const c = {
9
9
  "teddy-field-error-text": "_teddy-field-error-text_1735t_1",
10
10
  "teddy-field-error-text__indicator": "_teddy-field-error-text__indicator_1735t_12"
11
11
  }, l = "teddy-field-error-text", _ = a.forwardRef(
12
12
  ({ className: r, name: t = "error-filled", ...e }, o) => {
13
- const d = s([c[`${l}__indicator`]], r);
14
- return /* @__PURE__ */ i(m, { ...e, name: t, ref: o, className: d });
13
+ const d = i([c[`${l}__indicator`]], r);
14
+ return /* @__PURE__ */ s(n, { ...e, name: t, ref: o, className: d });
15
15
  }
16
16
  ), f = a.forwardRef(
17
17
  ({ className: r, children: t, ...e }, o) => {
18
- const d = s([c[l]], r);
19
- return /* @__PURE__ */ i(n, { ...e, ref: o, className: d, children: t });
18
+ const d = i([c[l]], r);
19
+ return /* @__PURE__ */ s(m, { ...e, ref: o, className: d, children: t });
20
20
  }
21
21
  );
22
22
  f.displayName = "FieldErrorText";
23
- const R = Object.assign(f, {
23
+ const N = Object.assign(f, {
24
24
  Indicator: _
25
25
  });
26
26
  export {
27
- R as FieldErrorText
27
+ N as FieldErrorText
28
28
  };
@@ -0,0 +1,77 @@
1
+ import { Responsive } from '../../utils/layout';
2
+ import { default as React } from 'react';
3
+
4
+ /** -------------------------------------------------------------------------------------------------
5
+ * Grid
6
+ * -----------------------------------------------------------------------------------------------*/
7
+ type AsChildProps = {
8
+ asChild: true;
9
+ as?: never;
10
+ } & React.ComponentPropsWithoutRef<'span'>;
11
+ type SpanProps = {
12
+ as?: 'span';
13
+ asChild?: false;
14
+ } & React.ComponentPropsWithoutRef<'span'>;
15
+ type DivProps = {
16
+ as: 'div';
17
+ asChild?: false;
18
+ } & React.ComponentPropsWithoutRef<'div'>;
19
+ declare const displayValues: readonly ["none", "inline-grid", "grid"];
20
+ declare const columnsValues: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none"];
21
+ declare const rowsValues: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none"];
22
+ declare const flowValues: readonly ["row", "column", "dense", "row-dense", "column-dense"];
23
+ declare const alignValues: readonly ["start", "center", "end", "baseline", "stretch"];
24
+ declare const justifyValues: readonly ["start", "center", "end", "between"];
25
+ declare const gapValues: ("0" | "10" | "25" | "50" | "100" | "150" | "200" | "250" | "300" | "400" | "600" | "800" | "1000" | "1200" | "1600")[];
26
+ type GridProps = (React.ComponentPropsWithoutRef<'div'> & {
27
+ display?: (typeof displayValues)[number];
28
+ /**
29
+ * The number of columns in the grid. It can be a number, 'none' or a responsive value.
30
+ * A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
31
+ * @example columns={{ sm: '3', md: '5' }}
32
+ */
33
+ columns?: Responsive<(typeof columnsValues)[number]>;
34
+ /**
35
+ * The number of rows in the grid. It can be a number, 'none' or a responsive value.
36
+ * A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
37
+ * @example rows={{ sm: '3', md: '5' }}
38
+ */
39
+ rows?: Responsive<(typeof rowsValues)[number]>;
40
+ /**
41
+ * The flow direction of the grid. It can be 'row', 'column', 'dense', 'row-dense' or 'column-dense'.
42
+ * @example flow='row'
43
+ */
44
+ flow?: Responsive<(typeof flowValues)[number]>;
45
+ /**
46
+ * The alignment of the grid items. It can be 'start', 'center', 'end', 'baseline', 'stretch' or a responsive value.
47
+ * A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
48
+ * @example align={{ sm: 'start', md: 'center' }}
49
+ * @default 'stretch'
50
+ */
51
+ align?: Responsive<(typeof alignValues)[number]>;
52
+ /**
53
+ * The alignment of the grid items. It can be or a responsive value.
54
+ * A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
55
+ * @example align={{ sm: 'start', md: 'center' }}
56
+ * @default 'start'
57
+ */
58
+ justify?: Responsive<(typeof justifyValues)[number]>;
59
+ /**
60
+ * The gap between grid items. It can be a number, 'none' or a responsive value.
61
+ * A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
62
+ * @example gap={{ sm: '100', md: '200' }}
63
+ * @default '100'
64
+ */
65
+ gap?: Responsive<(typeof gapValues)[number]>;
66
+ }) & (AsChildProps | SpanProps | DivProps);
67
+ declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>> & {
68
+ displayValues: readonly ["none", "inline-grid", "grid"];
69
+ columnsValues: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none"];
70
+ rowsValues: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none"];
71
+ flowValues: readonly ["row", "column", "dense", "row-dense", "column-dense"];
72
+ alignValues: readonly ["start", "center", "end", "baseline", "stretch"];
73
+ justifyValues: readonly ["start", "center", "end", "between"];
74
+ gapValues: ("0" | "10" | "25" | "50" | "100" | "150" | "200" | "250" | "300" | "400" | "600" | "800" | "1000" | "1200" | "1600")[];
75
+ };
76
+ export { Grid };
77
+ export type { GridProps };