ustatic-css 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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +202 -0
  3. package/dist/_ustatic-vars-Cx6_uZJY.cjs +1 -0
  4. package/dist/_ustatic-vars-D2NgNZNI.js +4 -0
  5. package/dist/css/modules/align.css +1 -0
  6. package/dist/css/modules/animations.css +1 -0
  7. package/dist/css/modules/base.css +1 -0
  8. package/dist/css/modules/bg.css +1 -0
  9. package/dist/css/modules/border.css +1 -0
  10. package/dist/css/modules/cursor.css +1 -0
  11. package/dist/css/modules/display.css +1 -0
  12. package/dist/css/modules/effects.css +1 -0
  13. package/dist/css/modules/filters.css +1 -0
  14. package/dist/css/modules/flexbox.css +1 -0
  15. package/dist/css/modules/grid.css +1 -0
  16. package/dist/css/modules/hide.css +1 -0
  17. package/dist/css/modules/interactivity.css +1 -0
  18. package/dist/css/modules/outline.css +1 -0
  19. package/dist/css/modules/position.css +1 -0
  20. package/dist/css/modules/scroll.css +1 -0
  21. package/dist/css/modules/sizing.css +1 -0
  22. package/dist/css/modules/spacing.css +1 -0
  23. package/dist/css/modules/typography.css +1 -0
  24. package/dist/css/ustatic-vars.css +1 -0
  25. package/dist/css/ustatic.css +1 -0
  26. package/dist/js/index.cjs.js +9 -0
  27. package/dist/js/index.es.js +175 -0
  28. package/dist/types/package.json.d.ts +102 -0
  29. package/dist/types/src/index.d.ts +4 -0
  30. package/dist/types/src/index.d.ts.map +1 -0
  31. package/dist/types/src/plugins/vue.plugin.d.ts +15 -0
  32. package/dist/types/src/plugins/vue.plugin.d.ts.map +1 -0
  33. package/dist/types/src/utils/styleLoader.d.ts +35 -0
  34. package/dist/types/src/utils/styleLoader.d.ts.map +1 -0
  35. package/dist/types/src/utils/styleloader.classmap.d.ts +2 -0
  36. package/dist/types/src/utils/styleloader.classmap.d.ts.map +1 -0
  37. package/dist/types/src/utils/useCssProperties.d.ts +17 -0
  38. package/dist/types/src/utils/useCssProperties.d.ts.map +1 -0
  39. package/dist/types/src/utils/useTokens.d.ts +21 -0
  40. package/dist/types/src/utils/useTokens.d.ts.map +1 -0
  41. package/dist/ustatic-index-1SZfqZon.js +4 -0
  42. package/dist/ustatic-index-QcZrD98s.cjs +1 -0
  43. package/package.json +99 -0
  44. package/src/css/assets/tokens/_ustatic-list.scss +460 -0
  45. package/src/css/assets/tokens/_ustatic-prefix.scss +1 -0
  46. package/src/css/assets/tokens/_ustatic-vars.scss +757 -0
  47. package/src/css/modules/align/index.scss +17 -0
  48. package/src/css/modules/animations/index.scss +151 -0
  49. package/src/css/modules/base/index.scss +406 -0
  50. package/src/css/modules/base/scrollbar.scss +21 -0
  51. package/src/css/modules/bg/index.scss +60 -0
  52. package/src/css/modules/border/border.scss +88 -0
  53. package/src/css/modules/border/divider.scss +38 -0
  54. package/src/css/modules/border/index.scss +3 -0
  55. package/src/css/modules/border/rounded.scss +70 -0
  56. package/src/css/modules/cursor/index.scss +33 -0
  57. package/src/css/modules/display/index.scss +19 -0
  58. package/src/css/modules/effects/index.scss +35 -0
  59. package/src/css/modules/filters/index.scss +34 -0
  60. package/src/css/modules/flexbox/flex.scss +132 -0
  61. package/src/css/modules/flexbox/gap.scss +15 -0
  62. package/src/css/modules/flexbox/index.scss +2 -0
  63. package/src/css/modules/grid/index.scss +94 -0
  64. package/src/css/modules/hide/index.scss +27 -0
  65. package/src/css/modules/interactivity/index.scss +28 -0
  66. package/src/css/modules/outline/index.scss +63 -0
  67. package/src/css/modules/position/index.scss +94 -0
  68. package/src/css/modules/scroll/index.scss +68 -0
  69. package/src/css/modules/sizing/index.scss +91 -0
  70. package/src/css/modules/spacing/index.scss +56 -0
  71. package/src/css/modules/typography/index.scss +139 -0
  72. package/src/css/tokens/base/animations/underline.yaml +5 -0
  73. package/src/css/tokens/base/border/color.yaml +17 -0
  74. package/src/css/tokens/base/border/radius.yaml +33 -0
  75. package/src/css/tokens/base/border/width.yaml +19 -0
  76. package/src/css/tokens/base/color/accent.yaml +416 -0
  77. package/src/css/tokens/base/color/base.yaml +492 -0
  78. package/src/css/tokens/base/color/opacity.yaml +4 -0
  79. package/src/css/tokens/base/color/variant.yaml +18 -0
  80. package/src/css/tokens/base/cursor/base.yaml +18 -0
  81. package/src/css/tokens/base/font/weight.yaml +23 -0
  82. package/src/css/tokens/base/grid/base.yaml +9 -0
  83. package/src/css/tokens/base/position/base.yaml +253 -0
  84. package/src/css/tokens/base/rotation/base.yaml +20 -0
  85. package/src/css/tokens/base/screen/base.yaml +10 -0
  86. package/src/css/tokens/base/scroll/base.yaml +16 -0
  87. package/src/css/tokens/base/size/base.yaml +16 -0
  88. package/src/css/tokens/base/text/color.yaml +20 -0
  89. package/src/css/tokens/base/text/size.yaml +37 -0
  90. package/src/css/tokens/base/visibility/base.yaml +61 -0
  91. package/src/css/ustatic-index.scss +24 -0
  92. package/src/css/utils/_token.scss +56 -0
  93. package/src/css/variables.scss +359 -0
  94. package/src/index.ts +6 -0
  95. package/src/plugins/vue.plugin.ts +77 -0
  96. package/src/utils/styleLoader.ts +257 -0
  97. package/src/utils/styleloader.classmap.ts +109 -0
  98. package/src/utils/useCssProperties.ts +152 -0
  99. package/src/utils/useTokens.ts +287 -0
@@ -0,0 +1,94 @@
1
+ @import "../../variables.scss";
2
+ @import '../../utils/token';
3
+ @import '../../variables.scss';
4
+
5
+ .relative {
6
+ position: relative;
7
+ }
8
+ .absolute {
9
+ position: absolute;
10
+ }
11
+ .fixed {
12
+ position: fixed;
13
+ }
14
+ .absolute-center {
15
+ position: absolute;
16
+ top: 50%;
17
+ left: 50%;
18
+ transform: translate(-50%, -50%);
19
+ }
20
+
21
+ .top {
22
+ @each $key, $value in $positions {
23
+ &-#{$key} {
24
+ top: $value;
25
+ }
26
+ }
27
+ }
28
+
29
+ .right {
30
+ @each $key, $value in $positions {
31
+ &-#{$key} {
32
+ right: $value;
33
+ }
34
+ }
35
+ }
36
+
37
+ .bottom {
38
+ @each $key, $value in $positions {
39
+ &-#{$key} {
40
+ bottom: $value;
41
+ }
42
+ }
43
+ }
44
+
45
+ .left {
46
+ @each $key, $value in $positions {
47
+ &-#{$key} {
48
+ left: $value;
49
+ }
50
+ }
51
+ }
52
+
53
+ @for $i from -10 through 10 {
54
+ $modifier: if($i < 0, "\-z", "z");
55
+ $value: abs($i * 10);
56
+ .#{$modifier}-#{$value} {
57
+ z-index: $i * 10;
58
+ }
59
+ }
60
+
61
+ .z-auto {
62
+ z-index: auto;
63
+ }
64
+
65
+ .z-i-hidden {
66
+ z-index: token("base.zindex.hidden");
67
+ }
68
+ .z-i-icon {
69
+ z-index: token("base.zindex.1");
70
+ }
71
+ .z-i-modal {
72
+ z-index: token("base.zindex.60");
73
+ }
74
+ .z-i-notice {
75
+ z-index: token("base.zindex.100");
76
+ }
77
+ .z-i-tip {
78
+ z-index: token("base.zindex.50");
79
+ }
80
+ .z-i-load {
81
+ z-index: token("base.zindex.30");
82
+ }
83
+ .z-i-fullpage-load {
84
+ z-index: token("base.zindex.100");
85
+ }
86
+ .z-i-menu {
87
+ z-index: token("base.zindex.20");
88
+ }
89
+ .z-i-teleport {
90
+ z-index: token("base.zindex.20");
91
+ }
92
+ .z-i-mobile-menu {
93
+ z-index: token("base.zindex.50");
94
+ }
@@ -0,0 +1,68 @@
1
+ @import '../../utils/token';
2
+ @import '../../variables.scss';
3
+
4
+ $scroll-bar-width: token("base.scroll.bar.width") !default;
5
+ $scroll-width: token("base.scroll.width") !default;
6
+ $scroll-height: token("base.scroll.height") !default;
7
+ $scroll-thumb-min-width: token("base.scroll.thumb.min-width") !default;
8
+ $scroll-thumb-height: token("base.scroll.thumb.height") !default;
9
+ $scroll-thumb-round: token("base.scroll.thumb.round") !default;
10
+
11
+
12
+ .z-scroll {
13
+ -ms-overflow-style: none;
14
+ scrollbar-width: $scroll-bar-width;
15
+
16
+ /* Стилизация фона полосы прокрутки */
17
+ ::-webkit-scrollbar-track {
18
+ background: token("base.color.gray.100"); /* Фон всей полосы прокрутки */
19
+ }
20
+
21
+ &::-webkit-scrollbar {
22
+ width: $scroll-width;
23
+ height: $scroll-height;
24
+ }
25
+
26
+ &::-webkit-scrollbar-thumb {
27
+ background: token("base.color.gray.400");
28
+
29
+ min-width: $scroll-thumb-min-width;
30
+ height: $scroll-thumb-height;
31
+ border-radius: $scroll-thumb-round;
32
+ }
33
+
34
+ &::-webkit-scrollbar-thumb:hover {
35
+ background: token("base.color.gray.500");
36
+ }
37
+
38
+ @-moz-document url-prefix() {
39
+ & {
40
+ scrollbar-width: thin;
41
+ scrollbar-color: token("base.color.gray.400") token("base.color.transparent");
42
+ }
43
+ }
44
+
45
+ &--hovered {
46
+ &::-webkit-scrollbar {
47
+ width: token("base.size.1d5"); // Новая ширина при наведении
48
+ height: token("base.size.1d5");
49
+ }
50
+
51
+ // Для Firefox
52
+ scrollbar-width: token("base.size.1d5");
53
+ }
54
+
55
+ &--thin {
56
+ @include set-token("base.scroll.bar.width", token("base.size.0d5"));
57
+
58
+ &::-webkit-scrollbar {
59
+ @include set-token("base.scroll.height", token("base.size.0d5"));
60
+ @include set-token("base.scroll.width", token("base.size.0d5"));
61
+ }
62
+
63
+ &::-webkit-scrollbar-thumb {
64
+ @include set-token("base.scroll.thumb.min-width", token("base.size.0d5"));
65
+ @include set-token("base.scroll.thumb.round", token("base.size.1"));
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,91 @@
1
+ @import "../../variables";
2
+
3
+ .w {
4
+ &-screen {
5
+ width: 100vw;
6
+ }
7
+
8
+ @each $key, $value in $sizes {
9
+ &-#{$key} {
10
+ width: $value;
11
+ }
12
+ }
13
+ }
14
+
15
+ .h {
16
+ &-screen {
17
+ height: 100vh;
18
+ }
19
+
20
+ @each $key, $value in $sizes {
21
+ &-#{$key} {
22
+ height: $value;
23
+ }
24
+ }
25
+ }
26
+
27
+ .size {
28
+ &-screen {
29
+ width: 100vw;
30
+ height: 100vh;
31
+ }
32
+
33
+ @each $key, $value in $sizes {
34
+ &-#{$key} {
35
+ width: $value;
36
+ height: $value;
37
+ }
38
+ }
39
+ }
40
+
41
+ .min {
42
+ &-w {
43
+ &-screen {
44
+ min-width: 100vw;
45
+ }
46
+
47
+ @each $key, $value in $sizes {
48
+ &-#{$key} {
49
+ min-width: $value;
50
+ }
51
+ }
52
+ }
53
+
54
+ &-h {
55
+ &-screen {
56
+ min-height: 100vh;
57
+ }
58
+
59
+ @each $key, $value in $sizes {
60
+ &-#{$key} {
61
+ min-height: $value;
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ .max {
68
+ &-w {
69
+ &-screen {
70
+ max-width: 100vw;
71
+ }
72
+
73
+ @each $key, $value in $sizes {
74
+ &-#{$key} {
75
+ max-width: $value;
76
+ }
77
+ }
78
+ }
79
+
80
+ &-h {
81
+ &-screen {
82
+ max-height: 100vh;
83
+ }
84
+
85
+ @each $key, $value in $sizes {
86
+ &-#{$key} {
87
+ max-height: $value;
88
+ }
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,56 @@
1
+ @import "../../variables";
2
+
3
+ @each $spaceKey, $spaceValue in $positions {
4
+ @each $dirKey, $dirValue in $directions {
5
+ // Создание классов для margin.
6
+ @if $dirKey == "" {
7
+ .m-#{$spaceKey} {
8
+ margin: $spaceValue;
9
+ }
10
+ .-m-#{$spaceKey} {
11
+ margin: calc(-1 * $spaceValue);
12
+ }
13
+ } @else {
14
+ .m#{$dirKey}-#{$spaceKey} {
15
+ @each $prop in $dirValue {
16
+ @if $prop != "" {
17
+ margin-#{$prop}: $spaceValue;
18
+ }
19
+ }
20
+ }
21
+
22
+ .-m#{$dirKey}-#{$spaceKey} {
23
+ @each $prop in $dirValue {
24
+ @if $prop != "" {
25
+ margin-#{$prop}: calc(-1 * $spaceValue);
26
+ }
27
+ }
28
+ }
29
+ }
30
+ // Создание классов для padding.
31
+ @if $dirKey == "" {
32
+ .p-#{$spaceKey} {
33
+ padding: $spaceValue;
34
+ }
35
+ .-p-#{$spaceKey} {
36
+ padding: calc(-1 * $spaceValue);
37
+ }
38
+ } @else {
39
+ .p#{$dirKey}-#{$spaceKey} {
40
+ @each $prop in $dirValue {
41
+ @if $prop != "" {
42
+ padding-#{$prop}: $spaceValue;
43
+ }
44
+ }
45
+ }
46
+
47
+ .-p#{$dirKey}-#{$spaceKey} {
48
+ @each $prop in $dirValue {
49
+ @if $prop != "" {
50
+ padding-#{$prop}: calc(-1 * $spaceValue);
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,139 @@
1
+ @use "sass:list";
2
+ @import '../../utils/token';
3
+ @import '../../variables.scss';
4
+ @import "../../assets/tokens/ustatic-list";
5
+
6
+ .font {
7
+ &-family-inherit {
8
+ font-family: inherit;
9
+ }
10
+ &-size-inherit {
11
+ font-size: inherit;
12
+ }
13
+
14
+ @each $weight, $value in $font-weights {
15
+ &-#{$weight} {
16
+ font-weight: $value;
17
+ }
18
+ }
19
+
20
+ &-caps {
21
+ text-transform: uppercase;
22
+ letter-spacing: 0.1em;
23
+ }
24
+ }
25
+
26
+ .text {
27
+ @each $size, $values in $text-sizes {
28
+ $font-size: nth($values, 1);
29
+ $line-height: nth($values, 2);
30
+ &-#{$size} {
31
+ font-size: $font-size;
32
+ line-height: $line-height;
33
+ }
34
+ }
35
+
36
+ @each $key, $value in $palette-rgb {
37
+ // "" + - исправление ошибки использования в качестве имени класса имени цвета
38
+ &-#{"" + $key} {
39
+ color: token("base.color.text");
40
+ fill: token("base.color.text");
41
+ @include set-token("base.color.text", rgba($value, token("base.color.opacity")));
42
+ }
43
+ }
44
+
45
+ @each $key in $text-algins {
46
+ &-#{$key} {
47
+ text-align: $key;
48
+ }
49
+ }
50
+
51
+ @each $key in $vertical-algins {
52
+ &-#{$key} {
53
+ vertical-align: $key;
54
+ }
55
+ }
56
+
57
+ &-none {
58
+ color: token("base.color.transparent");
59
+ }
60
+
61
+ &-decoration-none {
62
+ text-decoration: none;
63
+ }
64
+ &-style-clear {
65
+ font-style: normal;
66
+ }
67
+ &-ellipsis {
68
+ text-overflow: ellipsis;
69
+ }
70
+
71
+ }
72
+
73
+ .hover\:text {
74
+ @each $key, $value in $palette-rgb {
75
+ // "" + - исправление ошибки использования в качестве имени класса имени цвета
76
+ &-#{"" + $key} {
77
+ &:hover {
78
+ color: token("base.color.text");
79
+ @include set-token("base.color.text", rgba($value, token("base.color.opacity")));
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ .line-height {
86
+ @each $size, $values in $text-sizes {
87
+ $line-height: nth($values, 2);
88
+ &-#{$size} {
89
+ line-height: $line-height;
90
+ }
91
+ }
92
+ }
93
+
94
+ .italic {
95
+ font-style: italic;
96
+ }
97
+ .underline {
98
+ text-decoration: underline;
99
+ }
100
+
101
+ .left-align {
102
+ text-align: left;
103
+ }
104
+ .center {
105
+ text-align: center;
106
+ }
107
+ .right-align {
108
+ text-align: right;
109
+ }
110
+ .justify {
111
+ text-align: justify;
112
+ }
113
+
114
+ .nowrap {
115
+ white-space: nowrap;
116
+ }
117
+
118
+ .pre-wrap {
119
+ white-space: pre-wrap;
120
+ }
121
+ .break-word {
122
+ word-wrap: break-word;
123
+ }
124
+
125
+ .list-style-none {
126
+ list-style: none;
127
+ }
128
+
129
+ .truncate {
130
+ max-width: 100%;
131
+ overflow: hidden;
132
+ text-overflow: ellipsis;
133
+ white-space: nowrap;
134
+ }
135
+
136
+ .list-reset {
137
+ list-style: none;
138
+ padding-left: 0;
139
+ }
@@ -0,0 +1,5 @@
1
+ base:
2
+ underline:
3
+ color:
4
+ value: '{base.color.variant.primary}'
5
+
@@ -0,0 +1,17 @@
1
+ base:
2
+ border:
3
+ color:
4
+ black:
5
+ value: '{base.color.black}'
6
+ primary:
7
+ value: '{base.color.variant.primary}'
8
+ secondary:
9
+ value: '{base.color.variant.secondary}'
10
+ success:
11
+ value: '{base.color.variant.success}'
12
+ info:
13
+ value: '{base.color.variant.info}'
14
+ warning:
15
+ value: '{base.color.variant.warning}'
16
+ danger:
17
+ value: '{base.color.variant.danger}'
@@ -0,0 +1,33 @@
1
+ base:
2
+ border:
3
+ radius:
4
+ def:
5
+ value: "{base.border.radius.base}"
6
+ none:
7
+ value: 0
8
+ sm:
9
+ value: 0.125rem
10
+ comment: "примерно 2px"
11
+ base:
12
+ value: 0.25rem
13
+ comment: "примерно 4px"
14
+ md:
15
+ value: 0.375rem
16
+ comment: "примерно 6px"
17
+ lg:
18
+ value: 0.5rem
19
+ comment: "примерно 8px"
20
+ xl:
21
+ value: 0.75rem
22
+ comment: "примерно 12px"
23
+ 2xl:
24
+ value: 1rem
25
+ comment: "примерно 16px"
26
+ 3xl:
27
+ value: 1.5rem
28
+ comment: "примерно 24px"
29
+ full:
30
+ value: 9999px
31
+ comment: "делает элемент полностью круглым"
32
+ rounded:
33
+ value: 100%
@@ -0,0 +1,19 @@
1
+ base:
2
+ border:
3
+ width:
4
+ def:
5
+ value: '{base.border.width.1}'
6
+ '0':
7
+ value: '0'
8
+ '1':
9
+ value: 1px
10
+ '2':
11
+ value: 2px
12
+ '3':
13
+ value: 3px
14
+ '4':
15
+ value: 4px
16
+ '5':
17
+ value: 5px
18
+ "none":
19
+ value: '0'