@telia/teddy 0.0.1
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/LICENSE +661 -0
- package/README.md +82 -0
- package/dist/assets/button.css +1 -0
- package/dist/assets/f2a2f391a886d395.svg +284 -0
- package/dist/assets/field-error-text.css +1 -0
- package/dist/assets/helper-text.css +1 -0
- package/dist/assets/icon.css +1 -0
- package/dist/assets/input.css +1 -0
- package/dist/assets/label.css +1 -0
- package/dist/assets/main.css +1 -0
- package/dist/assets/spinner.css +1 -0
- package/dist/assets/text-field.css +1 -0
- package/dist/assets/text.css +1 -0
- package/dist/clsx-DB4S2d7J.js +22 -0
- package/dist/components/button/button.d.ts +24 -0
- package/dist/components/button/button.js +95 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +4 -0
- package/dist/components/field-error-text/field-error-text.d.ts +8 -0
- package/dist/components/field-error-text/field-error-text.js +28 -0
- package/dist/components/field-error-text/index.d.ts +2 -0
- package/dist/components/field-error-text/index.js +4 -0
- package/dist/components/helper-text/helper-text.d.ts +5 -0
- package/dist/components/helper-text/helper-text.js +20 -0
- package/dist/components/helper-text/index.d.ts +2 -0
- package/dist/components/helper-text/index.js +4 -0
- package/dist/components/icon/icon.d.ts +10 -0
- package/dist/components/icon/icon.js +27 -0
- package/dist/components/icon/index.d.ts +4 -0
- package/dist/components/icon/index.js +6 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +23 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.js +5 -0
- package/dist/components/input/input.d.ts +53 -0
- package/dist/components/input/input.js +82 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/label.d.ts +9 -0
- package/dist/components/label/label.js +61 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +4 -0
- package/dist/components/spinner/spinner.d.ts +26 -0
- package/dist/components/spinner/spinner.js +50 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/index.js +4 -0
- package/dist/components/text/text.d.ts +33 -0
- package/dist/components/text/text.js +51 -0
- package/dist/components/text-field/index.d.ts +2 -0
- package/dist/components/text-field/index.js +4 -0
- package/dist/components/text-field/text-field.d.ts +101 -0
- package/dist/components/text-field/text-field.js +141 -0
- package/dist/icons/name.d.js +1 -0
- package/dist/icons/name.d.ts +2 -0
- package/dist/icons/name.js +283 -0
- package/dist/index-TI1xsy6a.js +70 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +38 -0
- package/dist/teams/business/index.d.ts +0 -0
- package/dist/teams/business/index.js +1 -0
- package/dist/teams/index.d.ts +0 -0
- package/dist/teams/index.js +1 -0
- package/dist/teams/min-side/index.d.ts +0 -0
- package/dist/teams/min-side/index.js +1 -0
- package/dist/teams/webshop/index.d.ts +0 -0
- package/dist/teams/webshop/index.js +1 -0
- package/dist/tokens/border/variables.d.ts +9 -0
- package/dist/tokens/border/variables.js +12 -0
- package/dist/tokens/breakpoint/variables.d.ts +4 -0
- package/dist/tokens/breakpoint/variables.js +7 -0
- package/dist/tokens/color/variables.d.ts +226 -0
- package/dist/tokens/color/variables.js +229 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/index.js +16 -0
- package/dist/tokens/motion/variables.d.ts +11 -0
- package/dist/tokens/motion/variables.js +14 -0
- package/dist/tokens/shadow/variables.d.ts +4 -0
- package/dist/tokens/shadow/variables.js +7 -0
- package/dist/tokens/spacing/variables.d.ts +23 -0
- package/dist/tokens/spacing/variables.js +26 -0
- package/dist/tokens/typography/variables.d.ts +24 -0
- package/dist/tokens/typography/variables.js +27 -0
- package/dist/utils/action.d.ts +36 -0
- package/dist/utils/action.js +18 -0
- package/dist/variables-BKiPmtHY.js +458 -0
- package/dist/variables-BkY5b0io.js +14 -0
- package/dist/variables-Bq0YUbLS.js +14 -0
- package/dist/variables-CDK515QX.js +52 -0
- package/dist/variables-CMRTN8qo.js +28 -0
- package/dist/variables-Dmoh9YtD.js +54 -0
- package/dist/variables-IczXZ5CN.js +24 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +112 -0
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Teddy - Telia Norway's Design System
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Welcome to Teddy, Telia Norway's advanced component library crafted to enhance the development of consistent,
|
|
6
|
+
user-friendly interfaces. Teddy offers a suite of components styled in harmony with Telia's brand guidelines, aiming to
|
|
7
|
+
facilitate UI development and enrich user experience.
|
|
8
|
+
|
|
9
|
+
## Project Philosophy
|
|
10
|
+
|
|
11
|
+
Teddy is built on a foundation of three core principles:
|
|
12
|
+
|
|
13
|
+
- **Modularity and Reusability**: Our focus is on creating small, modular components that can be easily integrated and
|
|
14
|
+
reused, accelerating development and ensuring UI consistency.
|
|
15
|
+
|
|
16
|
+
- **Accessibility**: With a commitment to inclusivity, accessibility is at the forefront of our design process. We aim
|
|
17
|
+
to make our components universally usable, adhering to WCAG guidelines and accessibility best practices.
|
|
18
|
+
|
|
19
|
+
- **Performance**: We prioritize high performance to guarantee a smooth user experience. Our components are optimized
|
|
20
|
+
for efficiency, balancing speed with functionality.
|
|
21
|
+
|
|
22
|
+
## Getting Started
|
|
23
|
+
|
|
24
|
+
To contribute to or utilize Teddy:
|
|
25
|
+
|
|
26
|
+
1. **Clone the repository**:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/telia-company/teddy
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
2. **Setup**
|
|
33
|
+
|
|
34
|
+
- Node.js (v20)
|
|
35
|
+
- PNPM (v8)
|
|
36
|
+
|
|
37
|
+
3. **Install dependencies**:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Explore and Develop
|
|
44
|
+
|
|
45
|
+
The Teddy project is structured to support efficient development, particularly through its `lib` and `other`
|
|
46
|
+
directories. These directories are essential for the project, serving different but related purposes.
|
|
47
|
+
|
|
48
|
+
#### Lib Folder
|
|
49
|
+
|
|
50
|
+
The `lib` directory is where the core parts of the Teddy library are located. It contains:
|
|
51
|
+
|
|
52
|
+
- **Components**: The core UI components of the library.
|
|
53
|
+
- **Styles**: Util styles for consistency across components.
|
|
54
|
+
- **Utils**: Utility functions and hooks for enhanced component functionality.
|
|
55
|
+
- **Icons and Tokens**: Generated from the `other` folder, these assets include icons and design tokens for the
|
|
56
|
+
library's visual design.
|
|
57
|
+
- **Teams**: A space for teams to develop custom components for specific needs, separate from the main library.
|
|
58
|
+
|
|
59
|
+
#### Other Folder
|
|
60
|
+
|
|
61
|
+
The `other` directory supports the development and documentation of Teddy with: Incorporating the functionality of the
|
|
62
|
+
`plopfile.ts` script into the `README.md` under the **Scripts** section, you can describe it as follows:
|
|
63
|
+
|
|
64
|
+
- **Scripts**: Contains automation scripts crucial for the development and maintenance of the project. These scripts
|
|
65
|
+
include:
|
|
66
|
+
- **Icon and Token Generation**: Scripts for generating icons and tokens that populate the `lib/icons` and
|
|
67
|
+
`lib/tokens` directories, ensuring design consistency and scalability across the project.
|
|
68
|
+
- **Component Scaffolding with Plop**: Utilizes `plopfile.ts` to automate the process of creating new components,
|
|
69
|
+
whether they are core components, team-specific components, or derived from the Purpur project. This setup
|
|
70
|
+
streamlines the addition of new components to the project by providing a series of prompts to specify the
|
|
71
|
+
component's attributes (such as name, category, and team) and then automatically generating the necessary files
|
|
72
|
+
according to predefined templates. This process not only saves time but also enforces coding and design standards
|
|
73
|
+
across the project.
|
|
74
|
+
- **Stories**: Storybook stories that document the project.
|
|
75
|
+
- **Tokens**: Source files for design tokens that dictate the library's foundational styles.
|
|
76
|
+
- **SVG-Icons**: A collection of SVG files that are transformed into svg-sprite for the library. For more information,
|
|
77
|
+
[read the icon.md file](/docs/icons.md)
|
|
78
|
+
|
|
79
|
+
## Contributing
|
|
80
|
+
|
|
81
|
+
We welcome contributions to Teddy! Whether you're improving existing components, adding new features, or enhancing
|
|
82
|
+
documentation, your input is invaluable. See our [`CONTRIBUTING.md`](/docs/CONTRIBUTING.md) for contribution guidelines.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes _fadeInAnimation_882sa_1{0%{opacity:0}to{opacity:1}}@keyframes _scaleInAnimation_882sa_1{0%{scale:0}to{scale:100%}}._teddy-button_882sa_17{align-items:center;border-radius:var(--teddy-border-radius-full);border-width:0;cursor:pointer;display:inline-flex;font-size:var(--teddy-typography-scale-100);font-family:var(--teddy-typography-family-default);font-weight:var(--teddy-typography-weight-medium);gap:var(--teddy-spacing-100);justify-content:center;line-height:var(--teddy-spacing-300);outline:0;position:relative;text-decoration:none;transition-duration:var(--teddy-motion-duration-100);transition-timing-function:var(--teddy-motion-easing-ease-in-out);transition-property:background-color,color;width:auto}._teddy-button_882sa_17:focus:before{border-radius:var(--teddy-border-radius-full);box-shadow:0 0 0 var(--teddy-border-width-sm) var(--teddy-color-border-interactive-focus);content:"";opacity:1;display:block;inset:calc(var(--teddy-spacing-25) * -1);position:absolute}._teddy-button_882sa_17:focus:not(:focus-visible):before{opacity:0}._teddy-button_882sa_17 svg{display:block}._teddy-button--sm_882sa_52{padding:var(--teddy-spacing-100) var(--teddy-spacing-250)}._teddy-button--sm_882sa_52._teddy-button--icon-only_882sa_55{padding:var(--teddy-spacing-100)}._teddy-button--md_882sa_58{padding:var(--teddy-spacing-150) var(--teddy-spacing-300)}._teddy-button--md_882sa_58._teddy-button--icon-only_882sa_55{padding:var(--teddy-spacing-150)}._teddy-button--lg_882sa_64{padding:var(--teddy-spacing-200) var(--teddy-spacing-400)}._teddy-button--lg_882sa_64._teddy-button--icon-only_882sa_55{padding:var(--teddy-spacing-200)}._teddy-button--full-width_882sa_70{width:100%}._teddy-button--primary_882sa_73{background-color:var(--teddy-color-background-interactive-primary);color:var(--teddy-color-text-interactive-on-primary)}._teddy-button--primary_882sa_73:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-primary-hover)}._teddy-button--primary_882sa_73:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-primary-active)}._teddy-button--primary-negative_882sa_83{background-color:var(--teddy-color-background-interactive-primary-negative);color:var(--teddy-color-text-interactive-on-primary-negative)}._teddy-button--primary-negative_882sa_83:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-primary-negative-hover);border-color:var(--teddy-color-background-interactive-primary-negative-hover)}._teddy-button--primary-negative_882sa_83:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-primary-negative-active);border-color:var(--teddy-color-background-interactive-primary-negative-active)}._teddy-button--secondary_882sa_95{background-color:var(--teddy-color-background-interactive-transparent);box-shadow:inset 0 0 0 var(--teddy-border-width-xs) var(--teddy-color-border-interactive-primary);color:var(--teddy-color-text-interactive-primary)}._teddy-button--secondary_882sa_95:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-hover)}._teddy-button--secondary_882sa_95:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-active)}._teddy-button--secondary-negative_882sa_106{background-color:var(--teddy-color-background-interactive-transparent);box-shadow:inset 0 0 0 var(--teddy-border-width-xs) var(--teddy-color-border-interactive-primary-negative);color:var(--teddy-color-text-interactive-primary-negative)}._teddy-button--secondary-negative_882sa_106:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-negative-hover)}._teddy-button--secondary-negative_882sa_106:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-negative-active)}._teddy-button--expressive_882sa_117{background-color:var(--teddy-color-background-interactive-expressive);color:var(--teddy-color-text-interactive-on-expressive)}._teddy-button--expressive_882sa_117:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-expressive-hover)}._teddy-button--expressive_882sa_117:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-expressive-active)}._teddy-button--expressive-negative_882sa_127{background-color:var(--teddy-color-background-interactive-expressive-negative);color:var(--teddy-color-text-interactive-on-expressive-negative)}._teddy-button--expressive-negative_882sa_127:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-expressive-negative-hover);color:var(--teddy-color-text-interactive-on-expressive-negative-hover)}._teddy-button--expressive-negative_882sa_127:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-expressive-negative-active);color:var(--teddy-color-text-interactive-on-expressive-negative-active)}._teddy-button--negative_882sa_139._teddy-button--disabled_882sa_77{background-color:var(--teddy-color-background-interactive-disabled-negative);color:var(--teddy-color-text-weak-negative)}._teddy-button--secondary_882sa_95._teddy-button--disabled_882sa_77,._teddy-button--secondary-negative_882sa_106._teddy-button--disabled_882sa_77{box-shadow:none}._teddy-button--destructive_882sa_146{background-color:var(--teddy-color-background-interactive-destructive);color:var(--teddy-color-text-interactive-on-destructive)}._teddy-button--destructive_882sa_146:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-destructive-hover)}._teddy-button--destructive_882sa_146:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-destructive-active)}._teddy-button--destructive-negative_882sa_156{background-color:var(--teddy-color-background-interactive-destructive);color:var(--teddy-color-text-interactive-on-destructive)}._teddy-button--destructive-negative_882sa_156:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-destructive-hover)}._teddy-button--destructive-negative_882sa_156:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-destructive-active)}._teddy-button--tertiary-purple_882sa_166{background-color:var(--teddy-color-background-interactive-transparent);color:var(--teddy-color-text-interactive-primary)}._teddy-button--tertiary-purple_882sa_166._teddy-button--disabled_882sa_77{background-color:var(--teddy-color-background-interactive-transparent)}._teddy-button--tertiary-purple_882sa_166:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-hover)}._teddy-button--tertiary-purple_882sa_166:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-active)}._teddy-button--tertiary-purple-negative_882sa_179{background-color:var(--teddy-color-background-interactive-transparent);color:var(--teddy-color-text-interactive-primary-negative)}._teddy-button--tertiary-purple-negative_882sa_179._teddy-button--disabled_882sa_77{background-color:var(--teddy-color-background-interactive-transparent)}._teddy-button--tertiary-purple-negative_882sa_179:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-negative-hover);color:var(--teddy-color-text-interactive-primary-negative-hover)}._teddy-button--tertiary-purple-negative_882sa_179:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-negative-active);color:var(--teddy-color-text-interactive-primary-negative-active)}._teddy-button--text-negative_882sa_194{border-radius:0;padding-left:0;padding-right:0;background-color:var(--teddy-color-background-interactive-transparent);color:var(--teddy-color-text-interactive-primary-negative)}._teddy-button--text-negative_882sa_194:focus-visible:before{border-radius:0}._teddy-button--text-negative_882sa_194._teddy-button--disabled_882sa_77{background-color:var(--teddy-color-background-interactive-transparent)}._teddy-button--text-negative_882sa_194:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-negative-hover);color:var(--teddy-color-text-interactive-primary-negative-hover)}._teddy-button--text-negative_882sa_194:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-negative-active);color:var(--teddy-color-text-interactive-primary-negative-active)}._teddy-button--text_882sa_194{border-radius:0;padding-left:0;padding-right:0;background-color:var(--teddy-color-background-interactive-transparent);color:var(--teddy-color-text-interactive-primary)}._teddy-button--text_882sa_194:focus-visible:before{border-radius:0}._teddy-button--text_882sa_194._teddy-button--disabled_882sa_77{background-color:var(--teddy-color-background-interactive-transparent);color:var(--teddy-color-text-weak)}._teddy-button--text_882sa_194:hover:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-hover)}._teddy-button--text_882sa_194:active:not(._teddy-button--disabled_882sa_77){background-color:var(--teddy-color-background-interactive-transparent-active)}._teddy-button--disabled_882sa_77{background-color:var(--teddy-color-background-interactive-disabled);color:var(--teddy-color-text-weak);cursor:not-allowed;transition-duration:var(--teddy-motion-duration-400)}._teddy-button__loading_882sa_241{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;border-radius:inherit;background-color:var(--teddy-color-transparent-gray-100);animation:_fadeInAnimation_882sa_1 ease var(--teddy-motion-duration-2000);animation-iteration-count:1;animation-fill-mode:forwards}._teddy-button__loading_882sa_241 ._teddy-button__spinner_882sa_252 circle{stroke:var(--teddy-color-transparent-black-700)}._teddy-button--icon-only_882sa_55 ._teddy-button__loading_882sa_241{background-color:var(--teddy-color-gray-100)}
|