winduum 0.1.0 → 0.1.2

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.
@@ -1,52 +1,50 @@
1
- @layer utilities {
2
- :where(.ui-progress) {
3
- --ui-progress-height: 1rem;
4
- --ui-progress-border-radius: var(--rounded-full);
5
- --ui-progress-bg: var(--color-background-200);
6
- --ui-progress-bg-opacity: 1;
7
-
8
- appearance: none;
9
- box-shadow: none;
10
- border: 0;
11
- height: var(--ui-progress-height);
12
- border-radius: var(--ui-progress-border-radius);
13
- background-color: rgb(var(--ui-progress-bg) / var(--ui-progress-bg-opacity));
14
- color: rgb(var(--color-accent));
15
- width: 100%;
1
+ :where(.ui-progress) {
2
+ --ui-progress-height: 1rem;
3
+ --ui-progress-border-radius: var(--rounded-full);
4
+ --ui-progress-bg: var(--color-background-200);
5
+ --ui-progress-bg-opacity: 1;
6
+
7
+ appearance: none;
8
+ box-shadow: none;
9
+ border: 0;
10
+ height: var(--ui-progress-height);
11
+ border-radius: var(--ui-progress-border-radius);
12
+ background-color: rgb(var(--ui-progress-bg) / var(--ui-progress-bg-opacity));
13
+ color: rgb(var(--color-accent));
14
+ width: 100%;
15
+
16
+ &.is-sm {
17
+ --ui-progress-height: 0.5rem;
18
+ }
16
19
 
17
- &.is-sm {
18
- --ui-progress-height: 0.5rem;
19
- }
20
+ &.is-lg {
21
+ --ui-progress-height: 1.5rem;
22
+ }
20
23
 
21
- &.is-lg {
22
- --ui-progress-height: 1.5rem;
23
- }
24
+ &::-webkit-progress-bar {
25
+ background-color: transparent;
26
+ }
24
27
 
25
- &::-webkit-progress-bar {
26
- background-color: transparent;
27
- }
28
+ &::-webkit-progress-value {
29
+ background-color: currentColor;
30
+ border-radius: var(--ui-progress-border-radius);
31
+ }
28
32
 
29
- &::-webkit-progress-value {
30
- background-color: currentColor;
31
- border-radius: var(--ui-progress-border-radius);
32
- }
33
+ &::-moz-progress-bar {
34
+ background-color: currentColor;
35
+ border-radius: var(--ui-progress-border-radius);
36
+ }
33
37
 
34
- &::-moz-progress-bar {
35
- background-color: currentColor;
36
- border-radius: var(--ui-progress-border-radius);
37
- }
38
+ &:indeterminate {
39
+ animation: 1.5s linear 0s forwards infinite move-indeterminate;
40
+ background-image: linear-gradient(to right, currentColor 30%, rgb(var(--ui-progress-bg) / var(--ui-progress-bg-opacity)) 30%);
41
+ background-position: top left;
42
+ background-repeat: no-repeat;
43
+ background-size: 150% 150%;
44
+ border-radius: var(--ui-progress-border-radius);
38
45
 
39
- &:indeterminate {
40
- animation: 1.5s linear 0s forwards infinite move-indeterminate;
41
- background-image: linear-gradient(to right, currentColor 30%, rgb(var(--ui-progress-bg) / var(--ui-progress-bg-opacity)) 30%);
42
- background-position: top left;
43
- background-repeat: no-repeat;
44
- background-size: 150% 150%;
45
- border-radius: var(--ui-progress-border-radius);
46
-
47
- &::-moz-progress-bar {
48
- background-color: transparent;
49
- }
46
+ &::-moz-progress-bar {
47
+ background-color: transparent;
50
48
  }
51
49
  }
52
50
  }
@@ -1,6 +1,4 @@
1
- @layer utilities {
2
- :where(.ui-radio) {
3
- --ui-checkbox-icon: var(--icon-radio);
4
- --ui-checkbox-radius: 50%;
5
- }
1
+ :where(.ui-radio) {
2
+ --ui-checkbox-icon: var(--icon-radio);
3
+ --ui-checkbox-radius: 50%;
6
4
  }
@@ -1,29 +1,27 @@
1
- @layer utilities {
2
- :where(.ui-select) {
3
- --ui-input-icon-select-icon-font-size: 1.5rem;
4
- --ui-input-icon-count-r: 2;
5
- --ui-input-pr: var(--ui-input-icon-offset-r);
1
+ :where(.ui-select) {
2
+ --ui-input-icon-select-icon-font-size: 1.5rem;
3
+ --ui-input-icon-count-r: 2;
4
+ --ui-input-pr: var(--ui-input-icon-offset-r);
6
5
 
7
- & :where([class^="icon-"]) {
8
- margin-right: calc(var(--ui-input-icon-font-size) + var(--ui-input-icon-gap));
9
- }
6
+ & :where([class^="icon-"]) {
7
+ margin-right: calc(var(--ui-input-icon-font-size) + var(--ui-input-icon-gap));
8
+ }
10
9
 
11
- &::after {
12
- width: 1em;
13
- height: 1em;
14
- background-color: currentColor;
15
- content: "";
16
- position: absolute;
17
- z-index: 1;
18
- font-size: var(--ui-input-icon-select-icon-font-size);
19
- right: calc(var(--ui-input-height) / 4);
20
- top: calc(var(--ui-input-height) / 2);
21
- margin-top: calc(var(--ui-input-icon-select-icon-font-size) / 2 * -1);
22
- will-change: transform;
23
- transition: transform 200ms;
24
- mask: var(--icon-angle-down);
25
- pointer-events: none;
26
- grid-area: input;
27
- }
10
+ &::after {
11
+ width: 1em;
12
+ height: 1em;
13
+ background-color: currentColor;
14
+ content: "";
15
+ position: absolute;
16
+ z-index: 1;
17
+ font-size: var(--ui-input-icon-select-icon-font-size);
18
+ right: calc(var(--ui-input-height) / 4);
19
+ top: calc(var(--ui-input-height) / 2);
20
+ margin-top: calc(var(--ui-input-icon-select-icon-font-size) / 2 * -1);
21
+ will-change: transform;
22
+ transition: transform 200ms;
23
+ mask: var(--icon-angle-down);
24
+ pointer-events: none;
25
+ grid-area: input;
28
26
  }
29
27
  }
@@ -1,4 +1,4 @@
1
- .ui-switch {
1
+ :where(.ui-switch) {
2
2
  --ui-switch-width: 3rem;
3
3
  --ui-switch-height: 1.5rem;
4
4
  --ui-switch-padding: 0.375rem;
@@ -26,12 +26,12 @@
26
26
  margin-top: var(--ui-switch-validity-offset);
27
27
  }
28
28
 
29
- &.is-sm {
29
+ &:where(.is-sm) {
30
30
  --ui-switch-width: 2.5rem;
31
31
  --ui-switch-height: 1.25rem;
32
32
  }
33
33
 
34
- &.is-lg {
34
+ &:where(.is-lg) {
35
35
  --ui-switch-width: 4rem;
36
36
  --ui-switch-height: 2rem;
37
37
  }
@@ -1,201 +1,199 @@
1
- @layer utilities {
2
- :where(.ui-text) {
3
- --ui-text-size: 0.875rem;
4
- --ui-text-size-line: 0.75rem;
5
- --ui-text-weight: var(--font-normal);
6
- --ui-text-weight-bold: var(--font-semibold);
7
-
8
- font-weight: var(--ui-text-weight);
9
- font-size: var(--ui-text-size);
10
- line-height: calc(var(--ui-text-size) + var(--ui-text-size-line));
11
-
12
- &:where(.is-lg) {
13
- --ui-text-size: 1.125rem;
14
- }
1
+ :where(.ui-text) {
2
+ --ui-text-size: 0.875rem;
3
+ --ui-text-size-line: 0.75rem;
4
+ --ui-text-weight: var(--font-normal);
5
+ --ui-text-weight-bold: var(--font-semibold);
6
+
7
+ font-weight: var(--ui-text-weight);
8
+ font-size: var(--ui-text-size);
9
+ line-height: calc(var(--ui-text-size) + var(--ui-text-size-line));
10
+
11
+ &:where(.is-lg) {
12
+ --ui-text-size: 1.125rem;
13
+ }
15
14
 
16
- & :where(a) {
17
- text-decoration: underline;
18
- transition: var(--transition-color);
19
- color: rgb(var(--color-accent));
15
+ & :where(a) {
16
+ text-decoration: underline;
17
+ transition: var(--transition-color);
18
+ color: rgb(var(--color-accent));
20
19
 
21
- &:hover {
22
- @media (hover: hover) and (pointer: fine) {
23
- color: rgb(var(--color-accent) / 0.7);
24
- }
25
- }
26
-
27
- &:focus-visible {
20
+ &:hover {
21
+ @media (hover: hover) and (pointer: fine) {
28
22
  color: rgb(var(--color-accent) / 0.7);
29
23
  }
30
24
  }
31
25
 
32
- & :where(b, strong) {
33
- font-weight: var(--ui-text-weight-bold);
26
+ &:focus-visible {
27
+ color: rgb(var(--color-accent) / 0.7);
34
28
  }
29
+ }
35
30
 
36
- & :where(i, em) {
37
- display: inline;
38
- font-style: italic;
39
- }
31
+ & :where(b, strong) {
32
+ font-weight: var(--ui-text-weight-bold);
33
+ }
40
34
 
41
- & :where(figure) {
42
- margin: 1rem 0;
35
+ & :where(i, em) {
36
+ display: inline;
37
+ font-style: italic;
38
+ }
43
39
 
44
- @media (--media-md) {
45
- margin: 2rem 0;
46
- }
40
+ & :where(figure) {
41
+ margin: 1rem 0;
47
42
 
48
- & :where(figcaption) {
49
- font-size: 0.875rem;
50
- font-weight: var(--font-semibold);
51
- margin-top: 0.875rem;
52
- }
43
+ @media (--media-md) {
44
+ margin: 2rem 0;
53
45
  }
54
46
 
55
- & :where(img) {
56
- height: auto !important;
47
+ & :where(figcaption) {
48
+ font-size: 0.875rem;
49
+ font-weight: var(--font-semibold);
50
+ margin-top: 0.875rem;
57
51
  }
52
+ }
58
53
 
59
- & :where(p) {
60
- line-height: inherit;
61
- margin: 0 0 0.25rem;
62
-
63
- &:empty {
64
- line-height: 1rem;
65
- }
54
+ & :where(img) {
55
+ height: auto !important;
56
+ }
66
57
 
67
- &::after {
68
- content: "\00a0";
69
- }
70
- }
58
+ & :where(p) {
59
+ line-height: inherit;
60
+ margin: 0 0 0.25rem;
71
61
 
72
- & :where(hr) {
73
- margin: 1.25rem 0;
62
+ &:empty {
63
+ line-height: 1rem;
74
64
  }
75
65
 
76
- & :where(h1, h2, h3, h4, h5, h6) {
77
- font-weight: var(--ui-text-weight-bold);
78
- font-family: var(--font-secondary);
79
- font-size: var(--ui-text-heading-size, 1rem);
80
- line-height: calc(var(--ui-text-heading-size) + 0.5rem);
81
- margin: 0 0 1.25rem;
66
+ &::after {
67
+ content: "\00a0";
82
68
  }
69
+ }
83
70
 
84
- & h1 {
85
- --ui-text-heading-size: 2.25rem;
86
- }
71
+ & :where(hr) {
72
+ margin: 1.25rem 0;
73
+ }
87
74
 
88
- & h2 {
89
- --ui-text-heading-size: 1.75rem;
90
- }
75
+ & :where(h1, h2, h3, h4, h5, h6) {
76
+ font-weight: var(--ui-text-weight-bold);
77
+ font-family: var(--font-secondary);
78
+ font-size: var(--ui-text-heading-size, 1rem);
79
+ line-height: calc(var(--ui-text-heading-size) + 0.5rem);
80
+ margin: 0 0 1.25rem;
81
+ }
91
82
 
92
- & :where(h3, h4) {
93
- --ui-text-heading-size: 1.25rem;
94
- }
83
+ & h1 {
84
+ --ui-text-heading-size: 2.25rem;
85
+ }
95
86
 
96
- & :where(table) {
97
- border: 0;
98
- min-width: 100%;
87
+ & h2 {
88
+ --ui-text-heading-size: 1.75rem;
89
+ }
99
90
 
100
- & :where(td, th) {
101
- padding: 1rem 1.125rem;
102
- text-align: left;
103
- }
91
+ & :where(h3, h4) {
92
+ --ui-text-heading-size: 1.25rem;
93
+ }
104
94
 
105
- & :where(thead) {
106
- font-weight: var(--ui-text-weight-bold);
107
- border-bottom: 1px solid rgb(var(--color-current) / 0.075);
108
- }
95
+ & :where(table) {
96
+ border: 0;
97
+ min-width: 100%;
109
98
 
110
- & :where(tbody tr) {
111
- &:nth-of-type(even) {
112
- background-color: rgb(var(--color-current) / 0.05);
113
- }
114
- }
99
+ & :where(td, th) {
100
+ padding: 1rem 1.125rem;
101
+ text-align: left;
115
102
  }
116
103
 
117
- & :where(iframe) {
118
- max-width: 100%;
104
+ & :where(thead) {
105
+ font-weight: var(--ui-text-weight-bold);
106
+ border-bottom: 1px solid rgb(var(--color-current) / 0.075);
119
107
  }
120
108
 
121
- & :where(blockquote) {
122
- background-color: rgb(var(--color-current) / 0.075);
123
- border-left: 0.3125rem solid rgb(var(--color-accent) / 1);
124
- padding: 1.25em 1.5em;
125
- margin: 0;
126
- font-size: inherit;
109
+ & :where(tbody tr) {
110
+ &:nth-of-type(even) {
111
+ background-color: rgb(var(--color-current) / 0.05);
112
+ }
127
113
  }
114
+ }
128
115
 
129
- & :where(code) {
130
- margin: 0;
131
- border-radius: var(--rounded-xs);
132
- padding: 0.25rem 0.5rem;
133
- font-size: 0.85em;
134
- color: #476582;
135
- font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
136
- background-color: rgb(27 31 35 / 0.05);
137
-
138
- @nest .dark & {
139
- background-color: rgb(var(--color-background-100));
140
- color: rgb(var(--color-primary));
141
- }
116
+ & :where(iframe) {
117
+ max-width: 100%;
118
+ }
119
+
120
+ & :where(blockquote) {
121
+ background-color: rgb(var(--color-current) / 0.075);
122
+ border-left: 0.3125rem solid rgb(var(--color-accent) / 1);
123
+ padding: 1.25em 1.5em;
124
+ margin: 0;
125
+ font-size: inherit;
126
+ }
127
+
128
+ & :where(code) {
129
+ margin: 0;
130
+ border-radius: var(--rounded-xs);
131
+ padding: 0.25rem 0.5rem;
132
+ font-size: 0.85em;
133
+ color: #476582;
134
+ font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
135
+ background-color: rgb(27 31 35 / 0.05);
136
+
137
+ @nest .dark & {
138
+ background-color: rgb(var(--color-background-100));
139
+ color: rgb(var(--color-primary));
142
140
  }
141
+ }
143
142
 
144
- & :where(ol) {
145
- margin: 0 0 1.5rem;
146
- padding: 0 0 0 1rem;
143
+ & :where(ol) {
144
+ margin: 0 0 1.5rem;
145
+ padding: 0 0 0 1rem;
147
146
 
148
- & :where(li) {
149
- padding-left: 0.5rem;
147
+ & :where(li) {
148
+ padding-left: 0.5rem;
150
149
 
151
- &::marker {
152
- color: rgb(var(--color-accent));
153
- }
150
+ &::marker {
151
+ color: rgb(var(--color-accent));
154
152
  }
155
153
  }
154
+ }
156
155
 
157
- & :where(ul) {
158
- list-style-type: none !important;
159
- margin: 0 0 1.5rem;
160
- padding: 0;
156
+ & :where(ul) {
157
+ list-style-type: none !important;
158
+ margin: 0 0 1.5rem;
159
+ padding: 0;
161
160
 
162
- & :where(li) {
163
- position: relative;
164
- line-height: inherit;
165
- padding-left: 1.5rem;
161
+ & :where(li) {
162
+ position: relative;
163
+ line-height: inherit;
164
+ padding-left: 1.5rem;
166
165
 
167
- &:not(:last-of-type) {
168
- margin: 0 0 0.5rem;
169
- }
166
+ &:not(:last-of-type) {
167
+ margin: 0 0 0.5rem;
168
+ }
170
169
 
171
- &::before {
172
- width: 0.25rem;
173
- height: 0.25rem;
174
- position: absolute;
175
- content: "";
176
- border: 1px solid rgb(var(--color-accent));
177
- background-color: rgb(var(--color-accent));
178
- left: 0;
179
- top: 0.625rem;
180
- text-indent: 0;
181
- border-radius: 50%;
182
- }
170
+ &::before {
171
+ width: 0.25rem;
172
+ height: 0.25rem;
173
+ position: absolute;
174
+ content: "";
175
+ border: 1px solid rgb(var(--color-accent));
176
+ background-color: rgb(var(--color-accent));
177
+ left: 0;
178
+ top: 0.625rem;
179
+ text-indent: 0;
180
+ border-radius: 50%;
183
181
  }
182
+ }
184
183
 
185
- &[style*="square"] {
186
- & li {
187
- &::before {
188
- border-radius: 0;
189
- }
184
+ &[style*="square"] {
185
+ & li {
186
+ &::before {
187
+ border-radius: 0;
190
188
  }
191
189
  }
190
+ }
192
191
 
193
- &[style*="circle"] {
194
- & li {
195
- &::before {
196
- border-radius: 50%;
197
- background-color: transparent;
198
- }
192
+ &[style*="circle"] {
193
+ & li {
194
+ &::before {
195
+ border-radius: 50%;
196
+ background-color: transparent;
199
197
  }
200
198
  }
201
199
  }
@@ -1,22 +1,20 @@
1
- @layer utilities {
2
- :where(.ui-title) {
3
- --ui-title-font-family: var(--font-secondary);
4
- --ui-title-font-weight: var(--font-semibold);
5
- --ui-title-font-size: 0.875rem;
6
- --ui-title-line-height: calc(var(--ui-heading-font-size) + var(--ui-heading-line-height-ratio));
7
- --ui-title-line-height-ratio: 0.375rem;
1
+ :where(.ui-title) {
2
+ --ui-title-font-family: var(--font-secondary);
3
+ --ui-title-font-weight: var(--font-semibold);
4
+ --ui-title-font-size: 0.875rem;
5
+ --ui-title-line-height: calc(var(--ui-heading-font-size) + var(--ui-heading-line-height-ratio));
6
+ --ui-title-line-height-ratio: 0.375rem;
8
7
 
9
- font-family: var(--ui-title-font-family);
10
- font-size: var(--ui-title-font-size);
11
- line-height: var(--ui-title-line-height);
12
- font-weight: var(--ui-title-font-weight);
8
+ font-family: var(--ui-title-font-family);
9
+ font-size: var(--ui-title-font-size);
10
+ line-height: var(--ui-title-line-height);
11
+ font-weight: var(--ui-title-font-weight);
13
12
 
14
- &:where(.is-sm) {
15
- --ui-title-font-size: 0.75rem;
16
- }
13
+ &:where(.is-sm) {
14
+ --ui-title-font-size: 0.75rem;
15
+ }
17
16
 
18
- &:where(.is-lg) {
19
- --ui-title-font-size: 1.125rem;
20
- }
17
+ &:where(.is-lg) {
18
+ --ui-title-font-size: 1.125rem;
21
19
  }
22
20
  }
@@ -8,4 +8,3 @@
8
8
  @import "Ui/+.css";
9
9
  @import "Components/+.css";
10
10
  @import "Libraries/+.css";
11
- @import "Base/tailwind/base.css";
@@ -0,0 +1 @@
1
+ @import "Base/tailwind/base.css";
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="font-sans">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Winduum UI</title>
6
+ <meta name="viewport" content="width=device-width, user-scalable=0, initial-scale=1, viewport-fit=cover"/>
7
+ <link rel="stylesheet" href="/src/styles/main.css">
8
+ <link rel="stylesheet" href="/src/styles/tailwind.css">
9
+ </head>
10
+ <body>
11
+ <div class="text-primary text-secondary text-info text-warning text-error text-success text-light text-dark text-accent text-default text-current text-background"></div>
12
+ <div class="accent-primary accent-secondary accent-info accent-warning accent-error accent-success accent-light accent-dark accent-accent accent-default accent-current accent-background"></div>
13
+ <div class="bg-primary bg-secondary bg-info bg-warning bg-error bg-success bg-light bg-dark bg-accent bg-default bg-current bg-background"></div>
14
+ <div class="current-primary current-secondary current-info current-warning current-error current-success current-light current-dark current-accent current-default current-current current-background"></div>
15
+ <div class="font-primary font-secondary"></div>
16
+ <div class="font-light font-normal font-medium font-semibold font-bold font-extrabold"></div>
17
+ </body>
18
+ </html>
@@ -0,0 +1,61 @@
1
+ const { tailwindColors, tailwindVariables, tailwindColorsAccent, tailwindColorsCurrent, tailwindAnimations } = require('./utils/helpers.cjs')
2
+ const plugin = require('tailwindcss/plugin')
3
+
4
+ const colors = [
5
+ 'background', 'default', 'light', 'dark', 'primary', 'secondary',
6
+ 'warning', 'error', 'info', 'success', 'accent', `current`
7
+ ]
8
+
9
+ const animations = [
10
+ 'fade-in', 'fade-out'
11
+ ]
12
+
13
+ module.exports = {
14
+ darkMode: 'class',
15
+ content: [
16
+ './src/**/*.{js,html}'
17
+ ],
18
+ corePlugins: {
19
+ preflight: false,
20
+ container: false,
21
+ accentColor: false
22
+ },
23
+ theme: {
24
+ extend: {
25
+ colors: tailwindColors(colors),
26
+ fontFamily: tailwindVariables('font', ['primary', 'secondary']),
27
+ fontWeight: tailwindVariables('font', ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold']),
28
+ zIndex: tailwindVariables('z', [10, 20, 30, 40, 50, 60], {
29
+ 0: 0,
30
+ auto: 'auto'
31
+ }),
32
+ spacing: tailwindVariables('spacing', ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'section']),
33
+ borderRadius: tailwindVariables('rounded', ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', 'full'], {
34
+ DEFAULT: 'var(--rounded)'
35
+ }),
36
+ screens: {
37
+ 'xs': '22.5em',
38
+ 'sm': '26em',
39
+ 'md': '48em',
40
+ 'lg': '60em',
41
+ 'xl': '76em',
42
+ '2xl': '82em',
43
+ '3xl': '88em',
44
+ '4xl': '100em',
45
+ 'xxl': '126em',
46
+ '2xxl': '158em'
47
+ }
48
+ },
49
+ },
50
+ plugins: [
51
+ plugin(({ addUtilities }) => {
52
+ addUtilities(tailwindColorsAccent(colors))
53
+ }),
54
+ plugin(({ addUtilities }) => {
55
+ addUtilities(tailwindColorsCurrent(colors))
56
+ }),
57
+ plugin(({ addUtilities }) => {
58
+ addUtilities(tailwindAnimations(animations))
59
+ })
60
+ ],
61
+ }