@terrahq/design-system 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.
Files changed (45) hide show
  1. package/README.md +123 -0
  2. package/decs.d.ts +2 -0
  3. package/dist/design-system.js +4 -0
  4. package/dist/design-system.umd.cjs +1 -0
  5. package/dist/style.css +1 -0
  6. package/package.json +20 -0
  7. package/public/vite.svg +1 -0
  8. package/src/index.html +54 -0
  9. package/src/scss/framework/_mixins/_mixins.scss +6 -0
  10. package/src/scss/framework/_mixins/foundation/aspect-ratio/_ar.scss +64 -0
  11. package/src/scss/framework/_mixins/foundation/gap/_gap.scss +28 -0
  12. package/src/scss/framework/_mixins/foundation/grid/_columns.scss +23 -0
  13. package/src/scss/framework/_mixins/foundation/grid/_container.scss +17 -0
  14. package/src/scss/framework/_mixins/foundation/grid/_grid.scss +3 -0
  15. package/src/scss/framework/_mixins/foundation/grid/_row.scss +8 -0
  16. package/src/scss/framework/_mixins/foundation/section/_section.scss +47 -0
  17. package/src/scss/framework/_mixins/foundation/spaces/_spaces.scss +24 -0
  18. package/src/scss/framework/_vars/_vars.scss +114 -0
  19. package/src/scss/framework/foundation/aspect-ratio/aspect-ratio.scss +32 -0
  20. package/src/scss/framework/foundation/background/background.scss +5 -0
  21. package/src/scss/framework/foundation/color/color.scss +6 -0
  22. package/src/scss/framework/foundation/foundation.scss +41 -0
  23. package/src/scss/framework/foundation/gap/gap.scss +19 -0
  24. package/src/scss/framework/foundation/grid/columns.scss +90 -0
  25. package/src/scss/framework/foundation/grid/container.scss +17 -0
  26. package/src/scss/framework/foundation/grid/grid.scss +3 -0
  27. package/src/scss/framework/foundation/grid/row.scss +12 -0
  28. package/src/scss/framework/foundation/reset/reset.scss +114 -0
  29. package/src/scss/framework/foundation/section/section.scss +23 -0
  30. package/src/scss/framework/foundation/spacing/spacing.scss +42 -0
  31. package/src/scss/framework/utilities/align-items.scss +29 -0
  32. package/src/scss/framework/utilities/display.scss +34 -0
  33. package/src/scss/framework/utilities/flex-wrap.scss +25 -0
  34. package/src/scss/framework/utilities/font-style.scss +52 -0
  35. package/src/scss/framework/utilities/font-weight.scss +32 -0
  36. package/src/scss/framework/utilities/justify-content.scss +30 -0
  37. package/src/scss/framework/utilities/overflow.scss +28 -0
  38. package/src/scss/framework/utilities/position.scss +29 -0
  39. package/src/scss/framework/utilities/text-align.scss +29 -0
  40. package/src/scss/framework/utilities/utilities.scss +9 -0
  41. package/src/scss/index.scss +7 -0
  42. package/src/style.css +99 -0
  43. package/src/vite-env.d.ts +3 -0
  44. package/tsconfig.json +24 -0
  45. package/vite.config.js +37 -0
@@ -0,0 +1,32 @@
1
+ $font-weight-values: (
2
+ thin: 100,
3
+ extralight: 200,
4
+ light: 300,
5
+ regular: 400,
6
+ medium: 500,
7
+ semibold: 600,
8
+ bold: 700,
9
+ extrabold: 800,
10
+ );
11
+
12
+ @mixin font-weight-utility($font-weight-prop, $breakpoints) {
13
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
14
+ @if ($breakpoint-value == 0) {
15
+ @each $name, $property in $font-weight-prop {
16
+ .u--font-weight-#{$name} {
17
+ font-weight: $property;
18
+ }
19
+ }
20
+ } @else {
21
+ @media screen and ($viewport-type: $breakpoint-value) {
22
+ @each $name, $property in $font-weight-prop {
23
+ .u--font-weight-#{$breakpoint-name}-#{$name} {
24
+ font-weight: $property;
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+
32
+ @include font-weight-utility($font-weight-values, $breakpoints-grid);
@@ -0,0 +1,30 @@
1
+ $justify-properties:(
2
+ space-between: space-between,
3
+ space-around:space-around,
4
+ // space-evenly:space-evenly,
5
+ flex-start:flex-start,
6
+ flex-end:flex-end,
7
+ center:center
8
+ );
9
+
10
+ @mixin flex-justifycontent($justify-prop,$breakpoints){
11
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
12
+ @if($breakpoint-value == 0) {
13
+ @each $name, $property in $justify-prop {
14
+ .u--justify-content-#{$name}{
15
+ justify-content:$property;
16
+ }
17
+ }
18
+ }@else{
19
+ @media screen and ($viewport-type: $breakpoint-value) {
20
+ @each $name, $property in $justify-prop {
21
+ .u--justify-content-#{$breakpoint-name}-#{$name}{
22
+ justify-content:$property;
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ @include flex-justifycontent($justify-properties,$breakpoints-grid)
@@ -0,0 +1,28 @@
1
+ $overflow-values:(
2
+ hidden: hidden,
3
+ clip: clip,
4
+ auto: auto,
5
+ );
6
+
7
+
8
+ @mixin overflow-utility($overflow-prop,$breakpoints){
9
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
10
+ @if($breakpoint-value == 0) {
11
+ @each $name, $property in $overflow-prop {
12
+ .u--overflow-#{$name}{
13
+ overflow:$property;
14
+ }
15
+ }
16
+ }@else{
17
+ @media screen and ($viewport-type: $breakpoint-value) {
18
+ @each $name, $property in $overflow-prop {
19
+ .u--overflow-#{$breakpoint-name}-#{$name}{
20
+ overflow:$property;
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+ @include overflow-utility($overflow-values,$breakpoints-grid)
@@ -0,0 +1,29 @@
1
+ $position-properties:(
2
+ relative:relative,
3
+ absolute:absolute,
4
+ fixed:fixed,
5
+ sticky:sticky,
6
+ inherit:inherit,
7
+ unset:unset
8
+ );
9
+ @mixin position-alignment($position-prop,$breakpoints){
10
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
11
+ @if($breakpoint-value == 0) {
12
+ @each $name, $property in $position-prop {
13
+ .u--position-#{$name}{
14
+ position:$property;
15
+ }
16
+ }
17
+ }@else{
18
+ @media screen and ($viewport-type: $breakpoint-value) {
19
+ @each $name, $property in $position-prop {
20
+ .u--position-#{$breakpoint-name}-#{$name}{
21
+ position:$property;
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ @include position-alignment($position-properties,$breakpoints-grid)
@@ -0,0 +1,29 @@
1
+ $text-properties:(
2
+ left: left,
3
+ center:center,
4
+ right:right,
5
+ justify:justify
6
+ );
7
+
8
+ @mixin text-alignment($text-prop,$breakpoints){
9
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
10
+ @if($breakpoint-value == 0) {
11
+ @each $name, $property in $text-prop {
12
+ .u--text-align-#{$name}{
13
+ text-align:$property;
14
+ }
15
+ }
16
+ }@else{
17
+ @media screen and ($viewport-type: $breakpoint-value) {
18
+ @each $name, $property in $text-prop {
19
+ .u--text-align-#{$breakpoint-name}-#{$name}{
20
+ text-align:$property;
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+
28
+ @include text-alignment($text-properties,$breakpoints-grid)
29
+
@@ -0,0 +1,9 @@
1
+ @import "./text-align.scss";
2
+ @import "./flex-wrap.scss";
3
+ @import "./display.scss";
4
+ @import "./align-items.scss";
5
+ @import "./justify-content.scss";
6
+ @import "./position.scss";
7
+ @import "./font-style.scss";
8
+ @import "./overflow.scss";
9
+ @import "./font-weight.scss";
@@ -0,0 +1,7 @@
1
+ @import "./src/scss/framework/_vars/_vars.scss";
2
+ @import "./src/scss/framework/_mixins/_mixins.scss";
3
+ @import "./src/scss/framework/foundation/foundation.scss";
4
+
5
+ @import "./src/scss/framework/utilities/utilities.scss";
6
+
7
+
package/src/style.css ADDED
@@ -0,0 +1,99 @@
1
+ :root {
2
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ /* line-height: 1.5;
4
+ font-weight: 400;
5
+
6
+ color-scheme: light dark;
7
+ color: rgba(255, 255, 255, 0.87);
8
+ background-color: #242424;
9
+
10
+ font-synthesis: none;
11
+ text-rendering: optimizeLegibility;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ -webkit-text-size-adjust: 100%; */
15
+ }
16
+
17
+
18
+
19
+ a {
20
+ font-weight: 500;
21
+ color: #646cff;
22
+ text-decoration: inherit;
23
+ }
24
+ a:hover {
25
+ color: #535bf2;
26
+ }
27
+
28
+ body,html {
29
+ margin: 0;
30
+ min-height: 100svh;
31
+ /* display: flex;
32
+ place-items: center; */
33
+ background-color: rgb(55, 55, 82);
34
+ }
35
+
36
+ h1 {
37
+ font-size: 3.2em;
38
+ line-height: 1.1;
39
+ }
40
+
41
+ #app {
42
+ max-width: 1280px;
43
+ margin: 0 auto;
44
+ padding: 2rem;
45
+ text-align: center;
46
+ }
47
+
48
+ .logo {
49
+ height: 6em;
50
+ padding: 1.5em;
51
+ will-change: filter;
52
+ transition: filter 300ms;
53
+ }
54
+ .logo:hover {
55
+ filter: drop-shadow(0 0 2em #646cffaa);
56
+ }
57
+ .logo.vanilla:hover {
58
+ filter: drop-shadow(0 0 2em #3178c6aa);
59
+ }
60
+
61
+ .card {
62
+ padding: 2em;
63
+ }
64
+
65
+ .read-the-docs {
66
+ color: #888;
67
+ }
68
+
69
+ button {
70
+ border-radius: 8px;
71
+ border: 1px solid transparent;
72
+ padding: 0.6em 1.2em;
73
+ font-size: 1em;
74
+ font-weight: 500;
75
+ font-family: inherit;
76
+ background-color: #1a1a1a;
77
+ cursor: pointer;
78
+ transition: border-color 0.25s;
79
+ }
80
+ button:hover {
81
+ border-color: #646cff;
82
+ }
83
+ button:focus,
84
+ button:focus-visible {
85
+ outline: 4px auto -webkit-focus-ring-color;
86
+ }
87
+
88
+ @media (prefers-color-scheme: light) {
89
+ :root {
90
+ color: #213547;
91
+ background-color: #ffffff;
92
+ }
93
+ a:hover {
94
+ color: #747bff;
95
+ }
96
+ button {
97
+ background-color: #f9f9f9;
98
+ }
99
+ }
@@ -0,0 +1,3 @@
1
+ // This line allows TypeScript to understand and provide auto-completion and type checking specific to Vite in your code, making development in a Vite project environment easier.
2
+ /// <reference types="vite/client" />
3
+
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": ["src", "decs.d.ts"]
24
+ }
package/vite.config.js ADDED
@@ -0,0 +1,37 @@
1
+ import { resolve } from 'path'
2
+ import path from 'path';
3
+ import { defineConfig } from 'vite'
4
+
5
+ const root = resolve(__dirname, 'src');
6
+ const outDir = resolve(__dirname, 'dist');
7
+
8
+ // https://vitejs.dev/config/
9
+ export default defineConfig({
10
+ root,
11
+ plugins: [],
12
+ build: {
13
+ outDir,
14
+ emptyOutDir: true,
15
+ lib: {
16
+ entry: 'src/scss/index.scss', // Punto de entrada de tu biblioteca
17
+ name: 'terra-design-system', // Nombre global si se incluye mediante una etiqueta <script>
18
+ // Especifica los formatos de salida deseados
19
+ // formats: ['es', 'umd', 'cjs'],
20
+ },
21
+ rollupOptions: {
22
+ input: {
23
+ main: resolve(root, './scss/index.scss'),
24
+ },
25
+ output: {
26
+ // entryFileNames: `[name].[format].js`,
27
+ }
28
+ }
29
+ },
30
+ resolve: {
31
+ alias: {
32
+ '@scss': path.resolve(__dirname, './src/scss'),
33
+
34
+ },
35
+ },
36
+
37
+ })