winduum 0.1.0

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 (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/main.css +1 -0
  4. package/package.json +52 -0
  5. package/src/App.vue +12 -0
  6. package/src/badge.html +41 -0
  7. package/src/btn.html +101 -0
  8. package/src/common.html +57 -0
  9. package/src/index.html +15 -0
  10. package/src/input.html +169 -0
  11. package/src/scripts/Libraries/Dialog.js +0 -0
  12. package/src/scripts/main.js +0 -0
  13. package/src/scripts/vue.js +6 -0
  14. package/src/styles/Base/config.css +87 -0
  15. package/src/styles/Base/default.css +23 -0
  16. package/src/styles/Base/icons.css +9 -0
  17. package/src/styles/Base/keyframes.css +188 -0
  18. package/src/styles/Base/reset.css +98 -0
  19. package/src/styles/Base/tailwind/base.css +27 -0
  20. package/src/styles/Base/theme/dark.css +9 -0
  21. package/src/styles/Base/theme/default.css +17 -0
  22. package/src/styles/Components/+.css +4 -0
  23. package/src/styles/Components/Dialog.css +5 -0
  24. package/src/styles/Components/Drawer.css +5 -0
  25. package/src/styles/Components/Dropdown.css +5 -0
  26. package/src/styles/Components/Table.css +5 -0
  27. package/src/styles/Libraries/+.css +3 -0
  28. package/src/styles/Libraries/Dialog.css +5 -0
  29. package/src/styles/Libraries/Hint.css +5 -0
  30. package/src/styles/Ui/+.css +14 -0
  31. package/src/styles/Ui/Badge.css +111 -0
  32. package/src/styles/Ui/Btn.css +238 -0
  33. package/src/styles/Ui/Checkbox.css +117 -0
  34. package/src/styles/Ui/Heading.css +23 -0
  35. package/src/styles/Ui/Image.css +17 -0
  36. package/src/styles/Ui/Input.css +271 -0
  37. package/src/styles/Ui/Link.css +44 -0
  38. package/src/styles/Ui/Notice.css +43 -0
  39. package/src/styles/Ui/Progress.css +52 -0
  40. package/src/styles/Ui/Radio.css +6 -0
  41. package/src/styles/Ui/Range.css +0 -0
  42. package/src/styles/Ui/Select.css +29 -0
  43. package/src/styles/Ui/Switch.css +102 -0
  44. package/src/styles/Ui/Text.css +203 -0
  45. package/src/styles/Ui/Title.css +22 -0
  46. package/src/styles/main.css +11 -0
  47. package/src/templates/Btn.vue +11 -0
  48. package/utils/helpers.cjs +67 -0
  49. package/utils/helpers.js +59 -0
@@ -0,0 +1,43 @@
1
+ @layer utilities {
2
+ :where(.ui-notice) {
3
+ --color-current: var(--color-accent);
4
+ --ui-notice-bg: rgb(var(--color-accent));
5
+ --ui-notice-py: 1.25rem;
6
+ --ui-notice-px: 1.5rem;
7
+ --ui-notice-font-size: 0.875rem;
8
+ --ui-notice-border-radius: var(--rounded);
9
+ --ui-notice-outline-opacity: 0.1;
10
+ --ui-notice-gap: 1rem;
11
+
12
+ position: relative;
13
+ display: flex;
14
+ flex-direction: column;
15
+ padding: var(--ui-notice-py) var(--ui-notice-px);
16
+ font-size: var(--ui-notice-font-size);
17
+ border-radius: var(--ui-notice-border-radius);
18
+ color: rgb(var(--color-current));
19
+ gap: var(--ui-notice-gap);
20
+
21
+ & :where(hr) {
22
+ --tw-border-opacity: 0.2;
23
+ }
24
+
25
+ &::before, &::after {
26
+ position: absolute;
27
+ inset: 0;
28
+ border-radius: var(--ui-notice-border-radius);
29
+ z-index: -1;
30
+ content: "";
31
+ }
32
+
33
+ &::before {
34
+ background-color: var(--ui-notice-bg);
35
+ opacity: var(--ui-notice-outline-opacity);
36
+ }
37
+
38
+ &::after {
39
+ box-shadow: inset 0 0 0 1px var(--ui-notice-bg);
40
+ opacity: var(--ui-notice-outline-opacity);
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,52 @@
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%;
16
+
17
+ &.is-sm {
18
+ --ui-progress-height: 0.5rem;
19
+ }
20
+
21
+ &.is-lg {
22
+ --ui-progress-height: 1.5rem;
23
+ }
24
+
25
+ &::-webkit-progress-bar {
26
+ background-color: transparent;
27
+ }
28
+
29
+ &::-webkit-progress-value {
30
+ background-color: currentColor;
31
+ border-radius: var(--ui-progress-border-radius);
32
+ }
33
+
34
+ &::-moz-progress-bar {
35
+ background-color: currentColor;
36
+ border-radius: var(--ui-progress-border-radius);
37
+ }
38
+
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
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,6 @@
1
+ @layer utilities {
2
+ :where(.ui-radio) {
3
+ --ui-checkbox-icon: var(--icon-radio);
4
+ --ui-checkbox-radius: 50%;
5
+ }
6
+ }
File without changes
@@ -0,0 +1,29 @@
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);
6
+
7
+ & :where([class^="icon-"]) {
8
+ margin-right: calc(var(--ui-input-icon-font-size) + var(--ui-input-icon-gap));
9
+ }
10
+
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
+ }
28
+ }
29
+ }
@@ -0,0 +1,102 @@
1
+ .ui-switch {
2
+ --ui-switch-width: 3rem;
3
+ --ui-switch-height: 1.5rem;
4
+ --ui-switch-padding: 0.375rem;
5
+ --ui-switch-bg-raw: var(--color-dark);
6
+ --ui-switch-radius: 999px;
7
+ --ui-switch-validity-font-size: 0.875rem;
8
+ --ui-switch-validity-offset: 0.375rem;
9
+ --ui-switch-box-shadow: none;
10
+
11
+ @nest .dark & {
12
+ --ui-switch-bg-raw: var(--color-background-300);
13
+ }
14
+
15
+ display: flex;
16
+ align-items: center;
17
+ flex-wrap: wrap;
18
+ width: max-content;
19
+
20
+ & em {
21
+ display: none;
22
+ width: 100%;
23
+ font-size: var(--ui-switch-validity-font-size);
24
+ color: rgb(var(--color-error));
25
+ font-style: normal;
26
+ margin-top: var(--ui-switch-validity-offset);
27
+ }
28
+
29
+ &.is-sm {
30
+ --ui-switch-width: 2.5rem;
31
+ --ui-switch-height: 1.25rem;
32
+ }
33
+
34
+ &.is-lg {
35
+ --ui-switch-width: 4rem;
36
+ --ui-switch-height: 2rem;
37
+ }
38
+
39
+ & input {
40
+ width: var(--ui-switch-width);
41
+ height: var(--ui-switch-height);
42
+ display: block;
43
+ position: relative;
44
+ border-radius: var(--ui-switch-radius);
45
+ background-color: rgb(var(--ui-switch-bg-raw));
46
+ transition: var(--transition-background), var(--transition-shadow);
47
+ cursor: pointer;
48
+ appearance: none;
49
+ outline: none;
50
+ color: inherit;
51
+ box-shadow: var(--ui-switch-box-shadow);
52
+
53
+ &::before {
54
+ width: calc(var(--ui-switch-height) - var(--ui-switch-padding));
55
+ height: calc(var(--ui-switch-height) - var(--ui-switch-padding));
56
+ background-color: rgb(var(--color-light));
57
+ border-radius: var(--ui-switch-radius);
58
+ position: absolute;
59
+ left: var(--ui-switch-height);
60
+ top: 50%;
61
+ content: "";
62
+ display: block;
63
+ margin-left: calc((var(--ui-switch-height) - var(--ui-switch-padding) + var(--ui-switch-padding) / 2) * -1);
64
+ transition: left var(--transition-duration), var(--transition-background);
65
+ transform: translateY(-50%);
66
+ }
67
+
68
+ @nest .is-validated &:invalid {
69
+ & ~ em {
70
+ display: block;
71
+ }
72
+ }
73
+
74
+ &:disabled {
75
+ opacity: 0.8;
76
+ pointer-events: none;
77
+ }
78
+
79
+ &:focus {
80
+ --ui-switch-box-shadow:
81
+ 0 0 0 0 rgb(var(--color-current)),
82
+ 0 0 0 3px rgb(var(--color-current) / 0.2),
83
+ 0 1px 2px 0 rgb(var(--color-current) / 0.05);
84
+ }
85
+
86
+ &:checked {
87
+ background-color: rgb(var(--color-accent));
88
+
89
+ &:focus {
90
+ --ui-switch-box-shadow:
91
+ 0 0 0 0 rgb(var(--color-current)),
92
+ 0 0 0 3px rgb(var(--color-accent) / 0.2),
93
+ 0 1px 2px 0 rgb(var(--color-current) / 0.05);
94
+ }
95
+
96
+ &::before {
97
+ background-color: rgb(var(--color-light));
98
+ left: 100%;
99
+ }
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,203 @@
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
+ }
15
+
16
+ & :where(a) {
17
+ text-decoration: underline;
18
+ transition: var(--transition-color);
19
+ color: rgb(var(--color-accent));
20
+
21
+ &:hover {
22
+ @media (hover: hover) and (pointer: fine) {
23
+ color: rgb(var(--color-accent) / 0.7);
24
+ }
25
+ }
26
+
27
+ &:focus-visible {
28
+ color: rgb(var(--color-accent) / 0.7);
29
+ }
30
+ }
31
+
32
+ & :where(b, strong) {
33
+ font-weight: var(--ui-text-weight-bold);
34
+ }
35
+
36
+ & :where(i, em) {
37
+ display: inline;
38
+ font-style: italic;
39
+ }
40
+
41
+ & :where(figure) {
42
+ margin: 1rem 0;
43
+
44
+ @media (--media-md) {
45
+ margin: 2rem 0;
46
+ }
47
+
48
+ & :where(figcaption) {
49
+ font-size: 0.875rem;
50
+ font-weight: var(--font-semibold);
51
+ margin-top: 0.875rem;
52
+ }
53
+ }
54
+
55
+ & :where(img) {
56
+ height: auto !important;
57
+ }
58
+
59
+ & :where(p) {
60
+ line-height: inherit;
61
+ margin: 0 0 0.25rem;
62
+
63
+ &:empty {
64
+ line-height: 1rem;
65
+ }
66
+
67
+ &::after {
68
+ content: "\00a0";
69
+ }
70
+ }
71
+
72
+ & :where(hr) {
73
+ margin: 1.25rem 0;
74
+ }
75
+
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;
82
+ }
83
+
84
+ & h1 {
85
+ --ui-text-heading-size: 2.25rem;
86
+ }
87
+
88
+ & h2 {
89
+ --ui-text-heading-size: 1.75rem;
90
+ }
91
+
92
+ & :where(h3, h4) {
93
+ --ui-text-heading-size: 1.25rem;
94
+ }
95
+
96
+ & :where(table) {
97
+ border: 0;
98
+ min-width: 100%;
99
+
100
+ & :where(td, th) {
101
+ padding: 1rem 1.125rem;
102
+ text-align: left;
103
+ }
104
+
105
+ & :where(thead) {
106
+ font-weight: var(--ui-text-weight-bold);
107
+ border-bottom: 1px solid rgb(var(--color-current) / 0.075);
108
+ }
109
+
110
+ & :where(tbody tr) {
111
+ &:nth-of-type(even) {
112
+ background-color: rgb(var(--color-current) / 0.05);
113
+ }
114
+ }
115
+ }
116
+
117
+ & :where(iframe) {
118
+ max-width: 100%;
119
+ }
120
+
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;
127
+ }
128
+
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
+ }
142
+ }
143
+
144
+ & :where(ol) {
145
+ margin: 0 0 1.5rem;
146
+ padding: 0 0 0 1rem;
147
+
148
+ & :where(li) {
149
+ padding-left: 0.5rem;
150
+
151
+ &::marker {
152
+ color: rgb(var(--color-accent));
153
+ }
154
+ }
155
+ }
156
+
157
+ & :where(ul) {
158
+ list-style-type: none !important;
159
+ margin: 0 0 1.5rem;
160
+ padding: 0;
161
+
162
+ & :where(li) {
163
+ position: relative;
164
+ line-height: inherit;
165
+ padding-left: 1.5rem;
166
+
167
+ &:not(:last-of-type) {
168
+ margin: 0 0 0.5rem;
169
+ }
170
+
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
+ }
183
+ }
184
+
185
+ &[style*="square"] {
186
+ & li {
187
+ &::before {
188
+ border-radius: 0;
189
+ }
190
+ }
191
+ }
192
+
193
+ &[style*="circle"] {
194
+ & li {
195
+ &::before {
196
+ border-radius: 50%;
197
+ background-color: transparent;
198
+ }
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
@@ -0,0 +1,22 @@
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;
8
+
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);
13
+
14
+ &:where(.is-sm) {
15
+ --ui-title-font-size: 0.75rem;
16
+ }
17
+
18
+ &:where(.is-lg) {
19
+ --ui-title-font-size: 1.125rem;
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,11 @@
1
+ @import "Base/reset.css";
2
+ @import "Base/default.css";
3
+ @import "Base/config.css";
4
+ @import "Base/icons.css";
5
+ @import "Base/keyframes.css";
6
+ @import "Base/theme/default.css";
7
+ @import "Base/theme/dark.css";
8
+ @import "Ui/+.css";
9
+ @import "Components/+.css";
10
+ @import "Libraries/+.css";
11
+ @import "Base/tailwind/base.css";
@@ -0,0 +1,11 @@
1
+ <script setup>
2
+ defineProps({
3
+ variant: String,
4
+ state: String,
5
+ size: String
6
+ })
7
+ </script>
8
+
9
+ <template>
10
+ <button class="ui-btn" :class="[variant, state, size]"><slot></slot></button>
11
+ </template>
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const tailwindColors = (colors = []) => {
6
+ colors.forEach(name => {
7
+ colors[name] = ({ opacityValue }) => {
8
+ if (opacityValue === undefined) {
9
+ return `rgb(var(--color-${name}))`
10
+ }
11
+ return `rgb(var(--color-${name}) / ${opacityValue})`
12
+ };
13
+ });
14
+
15
+ return colors
16
+ };
17
+
18
+ const tailwindColorsAccent = (colors = []) => {
19
+ const result = {};
20
+
21
+ colors.forEach(color => {
22
+ result[`.accent-${color}`] = {
23
+ '--color-accent': `var(--color-${color})`,
24
+ 'accent-color': 'rgb(var(--color-accent))'
25
+ };
26
+ });
27
+
28
+ return result
29
+ };
30
+
31
+ const tailwindColorsCurrent = (colors = []) => {
32
+ const result = {};
33
+
34
+ colors.forEach(color => {
35
+ result[`.text-${color}`] = {
36
+ '--color-current': `var(--color-${color})`
37
+ };
38
+ });
39
+
40
+ return result
41
+ };
42
+
43
+ const tailwindVariables = (type, variables = [], values = {}) => {
44
+ variables.forEach(name => {
45
+ values[name] = `var(--${type}-${name})`;
46
+ });
47
+
48
+ return values
49
+ };
50
+
51
+ const tailwindAnimations = (values) => {
52
+ const result = {};
53
+
54
+ values.forEach(value => {
55
+ result[`.animation-${value}`] = {
56
+ 'animation-name': value
57
+ };
58
+ });
59
+
60
+ return result
61
+ };
62
+
63
+ exports.tailwindAnimations = tailwindAnimations;
64
+ exports.tailwindColors = tailwindColors;
65
+ exports.tailwindColorsAccent = tailwindColorsAccent;
66
+ exports.tailwindColorsCurrent = tailwindColorsCurrent;
67
+ exports.tailwindVariables = tailwindVariables;
@@ -0,0 +1,59 @@
1
+ const tailwindColors = (colors = []) => {
2
+ colors.forEach(name => {
3
+ colors[name] = ({ opacityValue }) => {
4
+ if (opacityValue === undefined) {
5
+ return `rgb(var(--color-${name}))`
6
+ }
7
+ return `rgb(var(--color-${name}) / ${opacityValue})`
8
+ }
9
+ })
10
+
11
+ return colors
12
+ }
13
+
14
+ const tailwindColorsAccent = (colors = []) => {
15
+ const result = {}
16
+
17
+ colors.forEach(color => {
18
+ result[`.accent-${color}`] = {
19
+ '--color-accent': `var(--color-${color})`,
20
+ 'accent-color': 'rgb(var(--color-accent))'
21
+ }
22
+ })
23
+
24
+ return result
25
+ }
26
+
27
+ const tailwindColorsCurrent = (colors = []) => {
28
+ const result = {}
29
+
30
+ colors.forEach(color => {
31
+ result[`.text-${color}`] = {
32
+ '--color-current': `var(--color-${color})`
33
+ }
34
+ })
35
+
36
+ return result
37
+ }
38
+
39
+ const tailwindVariables = (type, variables = [], values = {}) => {
40
+ variables.forEach(name => {
41
+ values[name] = `var(--${type}-${name})`
42
+ })
43
+
44
+ return values
45
+ }
46
+
47
+ const tailwindAnimations = (values) => {
48
+ const result = {}
49
+
50
+ values.forEach(value => {
51
+ result[`.animation-${value}`] = {
52
+ 'animation-name': value
53
+ }
54
+ })
55
+
56
+ return result
57
+ }
58
+
59
+ export { tailwindColors, tailwindVariables, tailwindColorsAccent, tailwindColorsCurrent, tailwindAnimations }