@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.
- package/README.md +8 -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 +23 -22
- 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,34 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"spacing": {
|
|
3
|
+
"0": "0rem",
|
|
4
|
+
"10": "0.0625rem",
|
|
5
|
+
"25": "0.125rem",
|
|
6
|
+
"50": "0.25rem",
|
|
7
|
+
"100": "0.5rem",
|
|
8
|
+
"150": "0.75rem",
|
|
9
|
+
"200": "1rem",
|
|
10
|
+
"250": "1.25rem",
|
|
11
|
+
"300": "1.5rem",
|
|
12
|
+
"400": "2rem",
|
|
13
|
+
"600": "3rem",
|
|
14
|
+
"800": "4rem",
|
|
15
|
+
"1000": "5rem",
|
|
16
|
+
"1200": "6rem",
|
|
17
|
+
"1600": "8rem",
|
|
18
|
+
"gutter": {
|
|
19
|
+
"sm": "1rem",
|
|
20
|
+
"md": "1.5rem",
|
|
21
|
+
"lg": "1.5rem",
|
|
22
|
+
"xl": "1.5rem"
|
|
23
|
+
},
|
|
24
|
+
"page-padding": {
|
|
25
|
+
"sm": "1rem",
|
|
26
|
+
"md": "1.5rem",
|
|
27
|
+
"lg": "3rem",
|
|
28
|
+
"xl": "3rem"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
;
|
|
33
|
+
|
|
34
|
+
export default _default;
|
package/dist/utils/action.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const VARIANT: {
|
|
|
7
7
|
readonly EXPRESSIVE: "expressive";
|
|
8
8
|
readonly EXPRESSIVE_NEGATIVE: "expressive-negative";
|
|
9
9
|
};
|
|
10
|
-
export declare const variants: ("primary" | "
|
|
10
|
+
export declare const variants: ("primary" | "secondary" | "expressive" | "primary-negative" | "secondary-negative" | "expressive-negative")[];
|
|
11
11
|
export type Variant = (typeof VARIANT)[keyof typeof VARIANT];
|
|
12
12
|
export declare const SIZE: {
|
|
13
13
|
readonly SM: "sm";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
This utilities is a copy from Radix UI.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2022 WorkOS
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
*/
|
|
27
|
+
declare function composeEventHandlers<E>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
|
28
|
+
checkForDefaultPrevented?: boolean | undefined;
|
|
29
|
+
}): (event: E) => void;
|
|
30
|
+
export { composeEventHandlers };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
This utilities is a copy from Radix UI.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2022 WorkOS
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
*/
|
|
29
|
+
type PossibleRef<T> = React.Ref<T> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* A utility to compose multiple refs together
|
|
32
|
+
* Accepts callback refs and RefObject(s)
|
|
33
|
+
*/
|
|
34
|
+
declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
|
|
35
|
+
/**
|
|
36
|
+
* A custom hook that composes multiple refs
|
|
37
|
+
* Accepts callback refs and RefObject(s)
|
|
38
|
+
*/
|
|
39
|
+
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
|
|
40
|
+
export { composeRefs, useComposedRefs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
function u(o, t) {
|
|
3
|
+
typeof o == "function" ? o(t) : o != null && (o.current = t);
|
|
4
|
+
}
|
|
5
|
+
function c(...o) {
|
|
6
|
+
return (t) => o.forEach((n) => u(n, t));
|
|
7
|
+
}
|
|
8
|
+
function i(...o) {
|
|
9
|
+
return e.useCallback(c(...o), o);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as composeRefs,
|
|
13
|
+
i as useComposedRefs
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { breakpoint } from '../tokens/breakpoint/variables.json';
|
|
2
|
+
|
|
3
|
+
type Breakpoint = keyof typeof breakpoint;
|
|
4
|
+
export type Responsive<T> = {
|
|
5
|
+
[key in Breakpoint]?: T;
|
|
6
|
+
} | T;
|
|
7
|
+
export declare function extractResponsiveClassName<T>({ responsiveValue, rootClassName, styles, }: {
|
|
8
|
+
responsiveValue: Responsive<T>;
|
|
9
|
+
rootClassName: string;
|
|
10
|
+
styles: CSSModuleClasses;
|
|
11
|
+
}): string[] | string[][] | undefined;
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"pnpm": ">=8"
|
|
12
12
|
},
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.4",
|
|
15
15
|
"sideEffects": [
|
|
16
16
|
"**/*.css"
|
|
17
17
|
],
|
|
@@ -21,21 +21,19 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@changesets/cli": "^2.27.1",
|
|
24
|
-
"@chromatic-com/storybook": "^1.
|
|
24
|
+
"@chromatic-com/storybook": "^1.3.1",
|
|
25
25
|
"@laynezh/vite-plugin-lib-assets": "^0.5.19",
|
|
26
|
-
"@storybook/addon-a11y": "^8.0.
|
|
27
|
-
"@storybook/addon-essentials": "^8.0.
|
|
28
|
-
"@storybook/addon-interactions": "^8.0.
|
|
29
|
-
"@storybook/addon-links": "^8.0.
|
|
30
|
-
"@storybook/addon-
|
|
31
|
-
"@storybook/
|
|
32
|
-
"@storybook/
|
|
33
|
-
"@storybook/
|
|
34
|
-
"@storybook/
|
|
35
|
-
"@storybook/
|
|
36
|
-
"@storybook/
|
|
37
|
-
"@storybook/test": "^8.0.0-rc.0",
|
|
38
|
-
"@storybook/theming": "^8.0.0-rc.0",
|
|
26
|
+
"@storybook/addon-a11y": "^8.0.6",
|
|
27
|
+
"@storybook/addon-essentials": "^8.0.6",
|
|
28
|
+
"@storybook/addon-interactions": "^8.0.6",
|
|
29
|
+
"@storybook/addon-links": "^8.0.6",
|
|
30
|
+
"@storybook/addon-storysource": "^8.0.6",
|
|
31
|
+
"@storybook/blocks": "^8.0.6",
|
|
32
|
+
"@storybook/manager-api": "^8.0.6",
|
|
33
|
+
"@storybook/react": "^8.0.6",
|
|
34
|
+
"@storybook/react-vite": "^8.0.6",
|
|
35
|
+
"@storybook/test": "^8.0.6",
|
|
36
|
+
"@storybook/theming": "^8.0.6",
|
|
39
37
|
"@types/fs-extra": "^11.0.4",
|
|
40
38
|
"@types/node": "^20.11.16",
|
|
41
39
|
"@types/react": "^18.2.53",
|
|
@@ -51,18 +49,18 @@
|
|
|
51
49
|
"eslint-plugin-mdx": "^3.1.5",
|
|
52
50
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
53
51
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
54
|
-
"eslint-plugin-storybook": "^0.
|
|
52
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
55
53
|
"execa": "^8.0.1",
|
|
56
54
|
"fs-extra": "^11.2.0",
|
|
57
55
|
"glob": "^10.3.10",
|
|
58
56
|
"node-html-parser": "^6.1.12",
|
|
59
|
-
"plop": "
|
|
57
|
+
"plop": "4.0.1",
|
|
60
58
|
"prettier": "3.2.5",
|
|
61
59
|
"react": "^18.2.0",
|
|
62
60
|
"react-dom": "^18.2.0",
|
|
63
61
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
64
62
|
"sass": "^1.70.0",
|
|
65
|
-
"storybook": "^8.0.
|
|
63
|
+
"storybook": "^8.0.6",
|
|
66
64
|
"style-dictionary": "^3.9.2",
|
|
67
65
|
"tsx": "^4.7.0",
|
|
68
66
|
"typescript": "^5.3.3",
|
|
@@ -71,10 +69,12 @@
|
|
|
71
69
|
"vite-plugin-lib-inject-css": "^2.0.0"
|
|
72
70
|
},
|
|
73
71
|
"dependencies": {
|
|
74
|
-
"@
|
|
75
|
-
"@purpurds/visually-hidden": "^3.0.0",
|
|
72
|
+
"@radix-ui/react-accordion": "^1.1.2",
|
|
76
73
|
"@radix-ui/react-label": "^2.0.2",
|
|
74
|
+
"@radix-ui/react-navigation-menu": "^1.1.4",
|
|
77
75
|
"@radix-ui/react-slot": "^1.0.2",
|
|
76
|
+
"@radix-ui/react-switch": "^1.0.3",
|
|
77
|
+
"@react-spring/web": "^9.7.3",
|
|
78
78
|
"clsx": "^2.1.0"
|
|
79
79
|
},
|
|
80
80
|
"description": "",
|
|
@@ -95,11 +95,12 @@
|
|
|
95
95
|
"scripts": {
|
|
96
96
|
"build:icons": "tsx other/scripts/build-icons.ts",
|
|
97
97
|
"build:tokens": "tsx other/scripts/build-tokens.ts",
|
|
98
|
-
"
|
|
98
|
+
"build:storybook": "storybook build",
|
|
99
|
+
"build:storybook-ci": "storybook build --loglevel silly --disable-telemetry",
|
|
100
|
+
"create:component": "tsx node_modules/plop/bin/plop.js --plopfile other/scripts/plopfile.ts",
|
|
99
101
|
"clean": "rm -rf dist",
|
|
100
102
|
"prebuild": "pnpm run build:icons && pnpm run build:tokens",
|
|
101
103
|
"storybook": "storybook dev -p 6006",
|
|
102
|
-
"build-storybook": "storybook build",
|
|
103
104
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
104
105
|
"preinstall": "npx only-allow pnpm",
|
|
105
106
|
"dev": "vite",
|