@telia/teddy 0.0.2 → 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.
- package/README.md +14 -10
- package/dist/assets/5161b177f001ea1a.svg +1080 -0
- package/dist/assets/badge.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/grid.css +1 -0
- package/dist/assets/heading.css +1 -0
- package/dist/assets/icon.css +1 -1
- package/dist/assets/input.css +1 -1
- package/dist/assets/label.css +1 -1
- package/dist/assets/link.css +1 -0
- package/dist/assets/main.css +1 -1
- package/dist/assets/navigation-menu.css +1 -0
- package/dist/assets/text-field.css +1 -1
- package/dist/assets/text-spacing.css +1 -0
- package/dist/assets/text.css +1 -1
- package/dist/assets/visually-hidden.css +1 -0
- package/dist/badge-CbHdlkcM.js +742 -0
- package/dist/components/accordion/accordion.d.ts +59 -0
- package/dist/components/accordion/accordion.js +24 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.js +4 -0
- package/dist/components/badge/badge.d.ts +21 -0
- package/dist/components/badge/badge.js +24 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.js +4 -0
- package/dist/components/button/button.d.ts +19 -20
- package/dist/components/button/button.js +82 -71
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/card/card.d.ts +68 -0
- package/dist/components/card/card.js +24 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.js +4 -0
- package/dist/components/field-error-text/field-error-text.d.ts +4 -3
- package/dist/components/field-error-text/field-error-text.js +12 -12
- package/dist/components/grid/grid.d.ts +77 -0
- package/dist/components/grid/grid.js +393 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/grid/index.js +4 -0
- package/dist/components/heading/heading.d.ts +63 -0
- package/dist/components/heading/heading.js +53 -0
- package/dist/components/heading/index.d.ts +2 -0
- package/dist/components/heading/index.js +4 -0
- package/dist/components/helper-text/helper-text.d.ts +2 -1
- package/dist/components/helper-text/helper-text.js +7 -7
- package/dist/components/icon/icon.d.ts +13 -2
- package/dist/components/icon/icon.js +22 -22
- package/dist/components/icon/index.d.ts +2 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +38 -21
- package/dist/components/input/input.d.ts +14 -23
- package/dist/components/input/input.js +72 -50
- package/dist/components/label/label.d.ts +3 -1
- package/dist/components/label/label.js +23 -51
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/link/index.js +4 -0
- package/dist/components/link/link.d.ts +49 -0
- package/dist/components/link/link.js +36 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/index.js +4 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +126 -0
- package/dist/components/navigation-menu/navigation-menu.js +10 -0
- package/dist/components/spinner/spinner.d.ts +2 -1
- package/dist/components/spinner/spinner.js +5 -5
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.js +4 -0
- package/dist/components/switch/switch.d.ts +44 -0
- package/dist/components/switch/switch.js +23 -0
- package/dist/components/text/text.d.ts +15 -8
- package/dist/components/text/text.js +27 -41
- package/dist/components/text-field/text-field.d.ts +24 -24
- package/dist/components/text-field/text-field.js +102 -125
- package/dist/components/text-spacing/index.d.ts +2 -0
- package/dist/components/text-spacing/index.js +4 -0
- package/dist/components/text-spacing/text-spacing.d.ts +19 -0
- package/dist/components/text-spacing/text-spacing.js +17 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/index.js +4 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +15 -0
- package/dist/components/visually-hidden/visually-hidden.js +24 -0
- package/dist/icons/category.d.ts +985 -0
- package/dist/icons/category.js +333 -0
- package/dist/icons/name.d.ts +1 -1
- package/dist/icons/name.js +250 -200
- package/dist/index-DM5e-Whg.js +43 -0
- package/dist/index-DpfSJps6.js +75 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +53 -36
- package/dist/navigation-menu-BgN7IKev.js +1334 -0
- package/dist/tokens/spacing/variables.json.d.ts +34 -0
- package/dist/utils/action.d.ts +1 -1
- package/dist/utils/composeEventHandlers.d.ts +30 -0
- package/dist/utils/composeEventHandlers.js +9 -0
- package/dist/utils/composeRefs.d.ts +40 -0
- package/dist/utils/composeRefs.js +14 -0
- package/dist/utils/layout.d.ts +12 -0
- package/dist/utils/layout.js +11 -0
- package/package.json +25 -24
- package/dist/assets/f2a2f391a886d395.svg +0 -284
- package/dist/index-TI1xsy6a.js +0 -70
- package/dist/teams/index.d.ts +0 -0
- package/dist/teams/index.js +0 -1
- package/dist/teams/min-side/index.d.ts +0 -0
- package/dist/teams/min-side/index.js +0 -1
- package/dist/teams/webshop/index.d.ts +0 -0
- package/dist/teams/webshop/index.js +0 -1
- /package/dist/{teams/business/index.d.ts → components/text-field/tex-field-label.d.ts} +0 -0
- /package/dist/{teams/business/index.js → components/text-field/tex-field-label.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
/** -------------------------------------------------------------------------------------------------
|
|
4
|
+
* TextSpacing
|
|
5
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
+
type TextSpacingProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* TextSpacing is used to add spacing between text elements.
|
|
11
|
+
* Wrap the elements you want to add spacing in the TextSpacing component.
|
|
12
|
+
* The spacing will be applied to Teddy's Text and Heading components.
|
|
13
|
+
* https://www.figma.com/file/2QIcZVqP99ZKY4rNW7VuSx/Purpur-DS---Foundations-Library?type=design&node-id=9470-27984&mode=design&t=vJa9KJPym42lrLT9-4
|
|
14
|
+
*/
|
|
15
|
+
declare const TextSpacing: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
|
+
asChild?: boolean | undefined;
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export { TextSpacing };
|
|
19
|
+
export type { TextSpacingProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import '../../assets/text-spacing.css';
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { c as d } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import m from "react";
|
|
5
|
+
import { $ as i } from "../../index-DpfSJps6.js";
|
|
6
|
+
const n = {
|
|
7
|
+
"teddy-text-spacing": "_teddy-text-spacing_dwbo8_1"
|
|
8
|
+
}, f = "teddy-text-spacing", x = m.forwardRef(
|
|
9
|
+
({ className: t, asChild: e = !1, children: s, ...c }, o) => {
|
|
10
|
+
const a = e ? i : "div", r = d([n[`${f}`]], t);
|
|
11
|
+
return /* @__PURE__ */ p(a, { ...c, ref: o, className: r, children: s });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
x.displayName = "TextSpacing";
|
|
15
|
+
export {
|
|
16
|
+
x as TextSpacing
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
type VisuallyHiddenProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
4
|
+
visibleOnFocus?: boolean;
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* This component is used to hide content visually, but still accessible to screen readers
|
|
9
|
+
* */
|
|
10
|
+
declare const VisuallyHidden: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
11
|
+
visibleOnFocus?: boolean | undefined;
|
|
12
|
+
asChild?: boolean | undefined;
|
|
13
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
export { VisuallyHidden };
|
|
15
|
+
export type { VisuallyHiddenProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '../../assets/visually-hidden.css';
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { c as n } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import y from "react";
|
|
5
|
+
import { $ as u } from "../../index-DpfSJps6.js";
|
|
6
|
+
const e = {
|
|
7
|
+
"teddy-visually-hidden": "_teddy-visually-hidden_15nus_1",
|
|
8
|
+
"teddy-visually-hidden--focusable": "_teddy-visually-hidden--focusable_15nus_15"
|
|
9
|
+
}, d = "teddy-visually-hidden", f = y.forwardRef(
|
|
10
|
+
({ className: a, visibleOnFocus: s, asChild: l, ...o }, t) => {
|
|
11
|
+
const c = l ? u : "span", i = n(
|
|
12
|
+
{
|
|
13
|
+
[e[`${d}`]]: !s,
|
|
14
|
+
[e[`${d}--focusable`]]: s
|
|
15
|
+
},
|
|
16
|
+
a
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ r(c, { ...o, ref: t, className: i });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
f.displayName = "VisuallyHidden";
|
|
22
|
+
export {
|
|
23
|
+
f as VisuallyHidden
|
|
24
|
+
};
|