@esportsplus/ui 0.1.8 → 0.2.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.
Files changed (195) hide show
  1. package/.editorconfig +9 -9
  2. package/.gitattributes +2 -2
  3. package/.github/dependabot.yml +23 -0
  4. package/.github/workflows/bump.yml +7 -0
  5. package/.github/workflows/publish.yml +14 -0
  6. package/build/components/alert/index.d.ts +1 -1
  7. package/build/components/alert/index.js +34 -36
  8. package/build/components/export/clipboard.js +1 -3
  9. package/build/components/export/index.js +3 -8
  10. package/build/components/export/json.js +1 -3
  11. package/build/components/field/checkbox.d.ts +1 -1
  12. package/build/components/field/checkbox.js +32 -37
  13. package/build/components/field/description.d.ts +1 -1
  14. package/build/components/field/description.js +4 -6
  15. package/build/components/field/error.d.ts +1 -1
  16. package/build/components/field/error.js +4 -6
  17. package/build/components/field/file.d.ts +1 -1
  18. package/build/components/field/file.js +36 -41
  19. package/build/components/field/index.d.ts +8 -8
  20. package/build/components/field/index.js +8 -13
  21. package/build/components/field/optional.d.ts +2 -2
  22. package/build/components/field/optional.js +8 -13
  23. package/build/components/field/select.d.ts +1 -1
  24. package/build/components/field/select.js +65 -70
  25. package/build/components/field/switch.d.ts +1 -1
  26. package/build/components/field/switch.js +3 -8
  27. package/build/components/field/text.d.ts +1 -1
  28. package/build/components/field/text.js +37 -42
  29. package/build/components/field/textarea.d.ts +1 -1
  30. package/build/components/field/textarea.js +3 -8
  31. package/build/components/field/title.d.ts +1 -1
  32. package/build/components/field/title.js +14 -19
  33. package/build/components/form/action.js +7 -13
  34. package/build/components/form/index.d.ts +1 -1
  35. package/build/components/form/index.js +4 -9
  36. package/build/components/form/input.js +1 -3
  37. package/build/components/form/layout.d.ts +1 -1
  38. package/build/components/form/layout.js +11 -13
  39. package/build/components/form/types.d.ts +1 -1
  40. package/build/components/form/types.js +1 -2
  41. package/build/components/number/index.js +2 -6
  42. package/build/components/page/index.js +2 -7
  43. package/build/components/root/index.js +3 -9
  44. package/build/components/root/onclick.js +1 -3
  45. package/build/components/scrollbar/index.d.ts +3 -3
  46. package/build/components/scrollbar/index.js +13 -15
  47. package/build/components/site/index.d.ts +1 -1
  48. package/build/components/site/index.js +10 -15
  49. package/build/components/tooltip/index.d.ts +5 -5
  50. package/build/components/tooltip/index.js +8 -13
  51. package/build/components/tooltip/menu.d.ts +1 -1
  52. package/build/components/tooltip/menu.js +34 -36
  53. package/build/index.js +11 -27
  54. package/lib.scss +1 -1
  55. package/package.json +25 -25
  56. package/src/components/accordion/scss/index.scss +16 -16
  57. package/src/components/accordion/scss/variables.scss +4 -4
  58. package/src/components/alert/index.ts +156 -156
  59. package/src/components/alert/scss/index.scss +54 -54
  60. package/src/components/alert/scss/variables.scss +8 -8
  61. package/src/components/anchor/scss/index.scss +41 -41
  62. package/src/components/anchor/scss/variables.scss +5 -5
  63. package/src/components/banner/scss/index.scss +40 -40
  64. package/src/components/banner/scss/variables.scss +5 -5
  65. package/src/components/border/scss/index.scss +10 -10
  66. package/src/components/border/scss/variables.scss +6 -6
  67. package/src/components/bubble/scss/index.scss +30 -30
  68. package/src/components/bubble/scss/variables.scss +19 -19
  69. package/src/components/button/scss/index.scss +92 -92
  70. package/src/components/button/scss/variables.scss +69 -69
  71. package/src/components/card/scss/index.scss +35 -35
  72. package/src/components/card/scss/variables.scss +42 -42
  73. package/src/components/container/scss/index.scss +10 -10
  74. package/src/components/container/scss/variables.scss +5 -5
  75. package/src/components/ellipsis/scss/index.scss +71 -71
  76. package/src/components/ellipsis/scss/variables.scss +2 -2
  77. package/src/components/export/clipboard.ts +11 -11
  78. package/src/components/export/index.ts +4 -4
  79. package/src/components/export/json.ts +14 -14
  80. package/src/components/field/checkbox.ts +60 -60
  81. package/src/components/field/description.ts +11 -11
  82. package/src/components/field/error.ts +13 -13
  83. package/src/components/field/file.ts +64 -64
  84. package/src/components/field/index.ts +9 -9
  85. package/src/components/field/optional.ts +26 -26
  86. package/src/components/field/scss/_check.scss +225 -225
  87. package/src/components/field/scss/_normalize.scss +36 -36
  88. package/src/components/field/scss/_text.scss +106 -106
  89. package/src/components/field/scss/index.scss +158 -158
  90. package/src/components/field/scss/variables.scss +138 -138
  91. package/src/components/field/select.ts +150 -150
  92. package/src/components/field/switch.ts +8 -8
  93. package/src/components/field/text.ts +68 -68
  94. package/src/components/field/textarea.ts +7 -7
  95. package/src/components/field/title.ts +22 -22
  96. package/src/components/form/action.ts +67 -67
  97. package/src/components/form/index.ts +5 -5
  98. package/src/components/form/input.ts +14 -14
  99. package/src/components/form/layout.ts +25 -25
  100. package/src/components/form/types.ts +15 -15
  101. package/src/components/group/scss/index.scss +36 -36
  102. package/src/components/group/scss/variables.scss +17 -17
  103. package/src/components/icon/scss/index.scss +17 -17
  104. package/src/components/icon/scss/variables.scss +7 -7
  105. package/src/components/link/scss/index.scss +28 -28
  106. package/src/components/link/scss/variables.scss +47 -47
  107. package/src/components/loading/scss/index.scss +24 -24
  108. package/src/components/loading/scss/variables.scss +31 -31
  109. package/src/components/modal/scss/index.scss +31 -31
  110. package/src/components/modal/scss/variables.scss +10 -10
  111. package/src/components/number/index.ts +23 -23
  112. package/src/components/page/index.ts +14 -14
  113. package/src/components/page/scss/index.scss +27 -27
  114. package/src/components/page/scss/variables.scss +27 -27
  115. package/src/components/processing/scss/index.scss +46 -46
  116. package/src/components/processing/scss/variables.scss +11 -11
  117. package/src/components/root/index.ts +4 -4
  118. package/src/components/root/onclick.ts +20 -20
  119. package/src/components/root/scss/index.scss +93 -93
  120. package/src/components/root/scss/variables.scss +55 -55
  121. package/src/components/row/scss/index.scss +7 -7
  122. package/src/components/scrollbar/index.ts +43 -43
  123. package/src/components/scrollbar/scss/index.scss +59 -59
  124. package/src/components/scrollbar/scss/variables.scss +6 -6
  125. package/src/components/sidebar/scss/index.scss +50 -50
  126. package/src/components/sidebar/scss/variables.scss +21 -21
  127. package/src/components/site/index.ts +26 -26
  128. package/src/components/site/scss/index.scss +3 -3
  129. package/src/components/text/scss/index.scss +12 -12
  130. package/src/components/text/scss/variables.scss +9 -9
  131. package/src/components/thumbnail/scss/index.scss +7 -7
  132. package/src/components/thumbnail/scss/variables.scss +7 -7
  133. package/src/components/tooltip/index.ts +93 -93
  134. package/src/components/tooltip/menu.ts +70 -70
  135. package/src/components/tooltip/scss/_center.scss +13 -13
  136. package/src/components/tooltip/scss/_east.scss +34 -34
  137. package/src/components/tooltip/scss/_north.scss +34 -34
  138. package/src/components/tooltip/scss/_south.scss +35 -35
  139. package/src/components/tooltip/scss/_west.scss +34 -34
  140. package/src/components/tooltip/scss/index.scss +93 -93
  141. package/src/components/tooltip/scss/variables.scss +25 -25
  142. package/src/css-utilities/[margin,padding]/scss/index.scss +41 -41
  143. package/src/css-utilities/[margin,padding]/scss/variables.scss +54 -54
  144. package/src/css-utilities/absolute/scss/index.scss +59 -59
  145. package/src/css-utilities/background/scss/variables.scss +27 -27
  146. package/src/css-utilities/border/scss/index.scss +21 -21
  147. package/src/css-utilities/border/scss/variables.scss +66 -66
  148. package/src/css-utilities/color/scss/variables.scss +31 -31
  149. package/src/css-utilities/disabled/scss/index.scss +4 -4
  150. package/src/css-utilities/flex/scss/index.scss +65 -65
  151. package/src/css-utilities/glass/scss/index.scss +2 -2
  152. package/src/css-utilities/glass/scss/variables.scss +2 -2
  153. package/src/css-utilities/hidden/scss/index.scss +28 -28
  154. package/src/css-utilities/index.scss +14 -14
  155. package/src/css-utilities/inline/scss/index.scss +7 -7
  156. package/src/css-utilities/line-height/scss/variables.scss +10 -10
  157. package/src/css-utilities/not-allowed/scss/index.scss +7 -7
  158. package/src/css-utilities/overflow/scss/index.scss +4 -4
  159. package/src/css-utilities/pointer/scss/index.scss +5 -5
  160. package/src/css-utilities/size/scss/variables.scss +12 -12
  161. package/src/css-utilities/slide/scss/index.scss +21 -21
  162. package/src/css-utilities/slide/scss/variables.scss +10 -10
  163. package/src/css-utilities/text/scss/index.scss +93 -93
  164. package/src/css-utilities/text/scss/variables.scss +31 -31
  165. package/src/css-utilities/transition/scss/variables.scss +14 -14
  166. package/src/css-utilities/viewport/scss/index.scss +4 -4
  167. package/src/css-utilities/width/scss/index.scss +3 -3
  168. package/src/css-utilities/width/scss/variables.scss +9 -9
  169. package/src/index.ts +11 -11
  170. package/src/lib/index.scss +7 -7
  171. package/src/lib/scss/breakpoint.scss +41 -41
  172. package/src/lib/scss/color.scss +1 -1
  173. package/src/lib/scss/css-variables.scss +13 -13
  174. package/src/lib/scss/list.scss +76 -76
  175. package/src/lib/scss/map.scss +1 -1
  176. package/src/lib/scss/position.scss +77 -77
  177. package/src/lib/scss/string.scss +33 -33
  178. package/src/tokens/index.scss +11 -11
  179. package/src/tokens/scss/border-radius.scss +12 -12
  180. package/src/tokens/scss/border-width.scss +6 -6
  181. package/src/tokens/scss/box-shadow.scss +13 -13
  182. package/src/tokens/scss/color.scss +64 -64
  183. package/src/tokens/scss/font-size.scss +12 -12
  184. package/src/tokens/scss/font-weight.scss +6 -6
  185. package/src/tokens/scss/line-height.scss +6 -6
  186. package/src/tokens/scss/size.scss +13 -13
  187. package/src/tokens/scss/spacer.scss +8 -8
  188. package/src/tokens/scss/state.scss +86 -86
  189. package/src/tokens/scss/transition-duration.scss +5 -5
  190. package/storage/fonts/montserrat/index.css +79 -79
  191. package/tokens.scss +1 -1
  192. package/tsconfig.json +10 -10
  193. package/utilities/styles.css +1 -1
  194. package/utilities/variables.css +1 -1
  195. package/webpack.config.ts +25 -25
@@ -1,34 +1,34 @@
1
- @mixin north($active) {
2
- &--ne,
3
- &--nw {
4
- bottom: calc(100% - var(--spacer));
5
- position: absolute;
6
- transform: scale(var(--scaleX), var(--scaleY));
7
-
8
- #{$active} {
9
- transform: translateY(calc(var(--spacer) * -2));
10
- }
11
- }
12
-
13
- &--n {
14
- bottom: calc(100% - var(--spacer));
15
- position: absolute;
16
- right: 50%;
17
- transform: translateX(50%) scaleY(var(--scaleY));
18
- transform-origin: center bottom;
19
-
20
- #{$active} {
21
- transform: translate(50%, calc(var(--spacer) * -2)) scale(1);
22
- }
23
- }
24
-
25
- &--ne {
26
- right: 0;
27
- transform-origin: bottom right;
28
- }
29
-
30
- &--nw {
31
- left: 0;
32
- transform-origin: bottom left;
33
- }
34
- }
1
+ @mixin north($active) {
2
+ &--ne,
3
+ &--nw {
4
+ bottom: calc(100% - var(--spacer));
5
+ position: absolute;
6
+ transform: scale(var(--scaleX), var(--scaleY));
7
+
8
+ #{$active} {
9
+ transform: translateY(calc(var(--spacer) * -2));
10
+ }
11
+ }
12
+
13
+ &--n {
14
+ bottom: calc(100% - var(--spacer));
15
+ position: absolute;
16
+ right: 50%;
17
+ transform: translateX(50%) scaleY(var(--scaleY));
18
+ transform-origin: center bottom;
19
+
20
+ #{$active} {
21
+ transform: translate(50%, calc(var(--spacer) * -2)) scale(1);
22
+ }
23
+ }
24
+
25
+ &--ne {
26
+ right: 0;
27
+ transform-origin: bottom right;
28
+ }
29
+
30
+ &--nw {
31
+ left: 0;
32
+ transform-origin: bottom left;
33
+ }
34
+ }
@@ -1,35 +1,35 @@
1
- @mixin south($active) {
2
- &--se,
3
- &--sw {
4
- position: absolute;
5
- top: calc(100% - var(--spacer));
6
- transform: scale(var(--scaleX), var(--scaleY));
7
-
8
- #{$active} {
9
- transform: translateY(calc(var(--spacer) * 2));
10
- }
11
- }
12
-
13
- &--s {
14
- position: absolute;
15
- right: 50%;
16
- top: calc(100% - var(--spacer));
17
- transform: translateX(50%) scaleY(var(--scaleY));
18
- transform-origin: center top;
19
-
20
- #{$active} {
21
- transform: translate(50%, calc(var(--spacer) * 2)) scale(1);
22
- }
23
- }
24
-
25
- &--se {
26
- right: 0;
27
- transform-origin: top right;
28
- }
29
-
30
- &--sw {
31
- left: 0;
32
- transform-origin: top left;
33
- }
34
-
35
- }
1
+ @mixin south($active) {
2
+ &--se,
3
+ &--sw {
4
+ position: absolute;
5
+ top: calc(100% - var(--spacer));
6
+ transform: scale(var(--scaleX), var(--scaleY));
7
+
8
+ #{$active} {
9
+ transform: translateY(calc(var(--spacer) * 2));
10
+ }
11
+ }
12
+
13
+ &--s {
14
+ position: absolute;
15
+ right: 50%;
16
+ top: calc(100% - var(--spacer));
17
+ transform: translateX(50%) scaleY(var(--scaleY));
18
+ transform-origin: center top;
19
+
20
+ #{$active} {
21
+ transform: translate(50%, calc(var(--spacer) * 2)) scale(1);
22
+ }
23
+ }
24
+
25
+ &--se {
26
+ right: 0;
27
+ transform-origin: top right;
28
+ }
29
+
30
+ &--sw {
31
+ left: 0;
32
+ transform-origin: top left;
33
+ }
34
+
35
+ }
@@ -1,34 +1,34 @@
1
- @mixin west($active) {
2
- &--wn,
3
- &--ws {
4
- position: absolute;
5
- right: calc(100% - var(--spacer));
6
- transform: scale(var(--scale));
7
-
8
- #{$active} {
9
- transform: translateX(calc(var(--spacer) * -2));
10
- }
11
- }
12
-
13
- &--w {
14
- bottom: 50%;
15
- position: absolute;
16
- right: calc(100% - var(--spacer));
17
- transform: translateY(50%) scaleX(var(--scaleX));
18
- transform-origin: center right;
19
-
20
- #{$active} {
21
- transform: translate(calc(var(--spacer) * -2), 50%) scale(1);
22
- }
23
- }
24
-
25
- &--wn {
26
- top: 0;
27
- transform-origin: top right;
28
- }
29
-
30
- &--ws {
31
- bottom: 0;
32
- transform-origin: bottom right;
33
- }
34
- }
1
+ @mixin west($active) {
2
+ &--wn,
3
+ &--ws {
4
+ position: absolute;
5
+ right: calc(100% - var(--spacer));
6
+ transform: scale(var(--scale));
7
+
8
+ #{$active} {
9
+ transform: translateX(calc(var(--spacer) * -2));
10
+ }
11
+ }
12
+
13
+ &--w {
14
+ bottom: 50%;
15
+ position: absolute;
16
+ right: calc(100% - var(--spacer));
17
+ transform: translateY(50%) scaleX(var(--scaleX));
18
+ transform-origin: center right;
19
+
20
+ #{$active} {
21
+ transform: translate(calc(var(--spacer) * -2), 50%) scale(1);
22
+ }
23
+ }
24
+
25
+ &--wn {
26
+ top: 0;
27
+ transform-origin: top right;
28
+ }
29
+
30
+ &--ws {
31
+ bottom: 0;
32
+ transform-origin: bottom right;
33
+ }
34
+ }
@@ -1,93 +1,93 @@
1
- @use '/lib';
2
- @use '/tokens';
3
- @use 'center' as *;
4
- @use 'east' as *;
5
- @use 'north' as *;
6
- @use 'south' as *;
7
- @use 'west' as *;
8
-
9
- .tooltip {
10
- cursor: pointer;
11
- position: relative;
12
- z-index: 8;
13
-
14
- @include tokens.state(active) {
15
- z-index: 9;
16
-
17
- // Add invisible box to increase activation/hover area
18
- &.tooltip--box {
19
- $size: calc(100% + var(--spacer) * 2.5);
20
-
21
- &::before {
22
- @include lib.position(absolute, center);
23
- content: '';
24
- height: $size;
25
- width: $size;
26
- z-index: -1;
27
- }
28
- }
29
-
30
- // Rotate arrow only if parent tooltip is active
31
- :not(.tooltip) .tooltip-arrow,
32
- > .tooltip-arrow {
33
- transform: rotate(-90deg);
34
- }
35
- }
36
-
37
-
38
- &-arrow {
39
- margin: 0 -1px;
40
- transform: rotate(90deg);
41
- }
42
-
43
-
44
- &-content,
45
- &-message {
46
- background: var(--background);
47
- border-radius: var(--border-radius);
48
- box-shadow: var(--box-shadow);
49
- max-width: var(--max-width);
50
- min-width: var(--min-width);
51
- opacity: 0;
52
- overflow: hidden;
53
- transition:
54
- opacity var(--transition-duration) ease-in-out,
55
- transform var(--transition-duration) ease-in-out;
56
- width: var(--width);
57
- z-index: 9;
58
-
59
-
60
- // Shared With Positioning CSS
61
- $active: '#{tokens.state(active, ".tooltip")} > &, #{tokens.state(active, ".tooltip")} :not(.tooltip) > &';
62
- $not-active: '#{tokens.state(inactive, ".tooltip")} > &, #{tokens.state(inactive, ".tooltip")} :not(.tooltip) > &';
63
-
64
- #{$active} {
65
- opacity: 1;
66
- }
67
-
68
- #{$not-active} {
69
- &, * {
70
- pointer-events: none;
71
- }
72
- }
73
-
74
-
75
- @include center($active);
76
- @include east($active);
77
- @include north($active);
78
- @include south($active);
79
- @include west($active);
80
- }
81
-
82
- &-message {
83
- background: var(--background);
84
- color: var(--color);
85
- cursor: auto;
86
- font-size: var(--font-size);
87
- font-weight: var(--font-weight);
88
- line-height: normal;
89
- padding: var(--padding-vertical) var(--padding-horizontal);
90
- pointer-events: none;
91
- white-space: nowrap;
92
- }
93
- }
1
+ @use '/lib';
2
+ @use '/tokens';
3
+ @use 'center' as *;
4
+ @use 'east' as *;
5
+ @use 'north' as *;
6
+ @use 'south' as *;
7
+ @use 'west' as *;
8
+
9
+ .tooltip {
10
+ cursor: pointer;
11
+ position: relative;
12
+ z-index: 8;
13
+
14
+ @include tokens.state(active) {
15
+ z-index: 9;
16
+
17
+ // Add invisible box to increase activation/hover area
18
+ &.tooltip--box {
19
+ $size: calc(100% + var(--spacer) * 2.5);
20
+
21
+ &::before {
22
+ @include lib.position(absolute, center);
23
+ content: '';
24
+ height: $size;
25
+ width: $size;
26
+ z-index: -1;
27
+ }
28
+ }
29
+
30
+ // Rotate arrow only if parent tooltip is active
31
+ :not(.tooltip) .tooltip-arrow,
32
+ > .tooltip-arrow {
33
+ transform: rotate(-90deg);
34
+ }
35
+ }
36
+
37
+
38
+ &-arrow {
39
+ margin: 0 -1px;
40
+ transform: rotate(90deg);
41
+ }
42
+
43
+
44
+ &-content,
45
+ &-message {
46
+ background: var(--background);
47
+ border-radius: var(--border-radius);
48
+ box-shadow: var(--box-shadow);
49
+ max-width: var(--max-width);
50
+ min-width: var(--min-width);
51
+ opacity: 0;
52
+ overflow: hidden;
53
+ transition:
54
+ opacity var(--transition-duration) ease-in-out,
55
+ transform var(--transition-duration) ease-in-out;
56
+ width: var(--width);
57
+ z-index: 9;
58
+
59
+
60
+ // Shared With Positioning CSS
61
+ $active: '#{tokens.state(active, ".tooltip")} > &, #{tokens.state(active, ".tooltip")} :not(.tooltip) > &';
62
+ $not-active: '#{tokens.state(inactive, ".tooltip")} > &, #{tokens.state(inactive, ".tooltip")} :not(.tooltip) > &';
63
+
64
+ #{$active} {
65
+ opacity: 1;
66
+ }
67
+
68
+ #{$not-active} {
69
+ &, * {
70
+ pointer-events: none;
71
+ }
72
+ }
73
+
74
+
75
+ @include center($active);
76
+ @include east($active);
77
+ @include north($active);
78
+ @include south($active);
79
+ @include west($active);
80
+ }
81
+
82
+ &-message {
83
+ background: var(--background);
84
+ color: var(--color);
85
+ cursor: auto;
86
+ font-size: var(--font-size);
87
+ font-weight: var(--font-weight);
88
+ line-height: normal;
89
+ padding: var(--padding-vertical) var(--padding-horizontal);
90
+ pointer-events: none;
91
+ white-space: nowrap;
92
+ }
93
+ }
@@ -1,25 +1,25 @@
1
- .tooltip {
2
- &-content,
3
- &-message {
4
- --background: var(--background-default);
5
- --background-default: transparent;
6
- --border-radius: var(--border-radius-300);
7
- --box-shadow: var(--box-shadow-400);
8
- --max-width: calc(90vw - (var(--size-700) * 2));
9
- --min-width: auto;
10
- --scaleX: 0.64;
11
- --scaleY: 0.64;
12
- --spacer: var(--size-300);
13
- --transition-duration: var(--transition-duration-300);
14
- --width: auto;
15
- }
16
-
17
- &-message {
18
- --background-default: var(--color-black-400);
19
- --color: var(--color-white-400);
20
- --font-size: var(--font-size-300);
21
- --font-weight: var(--font-weight-400);
22
- --padding-horizontal: var(--size-300);
23
- --padding-vertical: var(--size-300);
24
- }
25
- }
1
+ .tooltip {
2
+ &-content,
3
+ &-message {
4
+ --background: var(--background-default);
5
+ --background-default: transparent;
6
+ --border-radius: var(--border-radius-300);
7
+ --box-shadow: var(--box-shadow-400);
8
+ --max-width: calc(90vw - (var(--size-700) * 2));
9
+ --min-width: auto;
10
+ --scaleX: 0.64;
11
+ --scaleY: 0.64;
12
+ --spacer: var(--size-300);
13
+ --transition-duration: var(--transition-duration-300);
14
+ --width: auto;
15
+ }
16
+
17
+ &-message {
18
+ --background-default: var(--color-black-400);
19
+ --color: var(--color-white-400);
20
+ --font-size: var(--font-size-300);
21
+ --font-weight: var(--font-weight-400);
22
+ --padding-horizontal: var(--size-300);
23
+ --padding-vertical: var(--size-300);
24
+ }
25
+ }
@@ -1,41 +1,41 @@
1
- @each $property in margin padding {
2
- .--#{$property} {
3
- &,
4
- &-horizontal {
5
- #{$property}-left: var(--#{$property}-horizontal);
6
- #{$property}-right: var(--#{$property}-horizontal);
7
-
8
- @if ($property == padding) {
9
- &.--border {
10
- padding-left: calc(var(--padding-horizontal) - var(--border-width));
11
- padding-right: calc(var(--padding-horizontal) - var(--border-width));
12
- }
13
- }
14
- }
15
-
16
- &,
17
- &-vertical {
18
- #{$property}-bottom: var(--#{$property}-vertical);
19
- #{$property}-top: var(--#{$property}-vertical);
20
-
21
- @if ($property == padding) {
22
- &.--border {
23
- padding-bottom: calc(var(--padding-vertical) - var(--border-width));
24
- padding-top: calc(var(--padding-vertical) - var(--border-width));
25
- }
26
- }
27
- }
28
-
29
- @each $direction in 'bottom' 'top' {
30
- &-#{$direction} {
31
- #{$property}-#{$direction}: var(--#{$property}-vertical);
32
- }
33
- }
34
-
35
- @each $direction in 'left' 'right' {
36
- &-#{$direction} {
37
- #{$property}-#{$direction}: var(--#{$property}-horizontal);
38
- }
39
- }
40
- }
41
- }
1
+ @each $property in margin padding {
2
+ .--#{$property} {
3
+ &,
4
+ &-horizontal {
5
+ #{$property}-left: var(--#{$property}-horizontal);
6
+ #{$property}-right: var(--#{$property}-horizontal);
7
+
8
+ @if ($property == padding) {
9
+ &.--border {
10
+ padding-left: calc(var(--padding-horizontal) - var(--border-width));
11
+ padding-right: calc(var(--padding-horizontal) - var(--border-width));
12
+ }
13
+ }
14
+ }
15
+
16
+ &,
17
+ &-vertical {
18
+ #{$property}-bottom: var(--#{$property}-vertical);
19
+ #{$property}-top: var(--#{$property}-vertical);
20
+
21
+ @if ($property == padding) {
22
+ &.--border {
23
+ padding-bottom: calc(var(--padding-vertical) - var(--border-width));
24
+ padding-top: calc(var(--padding-vertical) - var(--border-width));
25
+ }
26
+ }
27
+ }
28
+
29
+ @each $direction in 'bottom' 'top' {
30
+ &-#{$direction} {
31
+ #{$property}-#{$direction}: var(--#{$property}-vertical);
32
+ }
33
+ }
34
+
35
+ @each $direction in 'left' 'right' {
36
+ &-#{$direction} {
37
+ #{$property}-#{$direction}: var(--#{$property}-horizontal);
38
+ }
39
+ }
40
+ }
41
+ }
@@ -1,54 +1,54 @@
1
- @use '/lib';
2
- @use '/tokens';
3
-
4
- @each $property in margin padding {
5
- .--#{$property} {
6
- @each $direction in 'horizontal' 'vertical' {
7
- &,
8
- &-#{$direction} {
9
- @each $key in lib.map-keys(tokens.$border-width) {
10
- &-border-width {
11
- --#{$property}-#{$direction}: var(--border-width-400);
12
-
13
- &-#{$key} {
14
- --#{$property}-#{$direction}: var(--border-width-#{$key});
15
- }
16
- }
17
- }
18
-
19
- @each $key in lib.map-keys(tokens.$spacer) {
20
- &-spacer {
21
- --#{$property}-#{$direction}: var(--spacer-400);
22
-
23
- &-#{$key} {
24
- --#{$property}-#{$direction}: var(--spacer-#{$key});
25
- }
26
- }
27
- }
28
-
29
- @each $key in lib.map-keys(tokens.$size) {
30
- &-#{$key} {
31
- --#{$property}-#{$direction}: var(--size-#{$key});
32
- }
33
- }
34
-
35
- &-inherit {
36
- --#{$property}-#{$direction}: inherit;
37
- }
38
- }
39
- }
40
- }
41
- }
42
-
43
- @each $property in margin {
44
- .--#{$property} {
45
- @each $direction in 'horizontal' 'vertical' {
46
- &,
47
- &-#{$direction} {
48
- &-auto {
49
- --#{$property}-#{$direction}: auto;
50
- }
51
- }
52
- }
53
- }
54
- }
1
+ @use '/lib';
2
+ @use '/tokens';
3
+
4
+ @each $property in margin padding {
5
+ .--#{$property} {
6
+ @each $direction in 'horizontal' 'vertical' {
7
+ &,
8
+ &-#{$direction} {
9
+ @each $key in lib.map-keys(tokens.$border-width) {
10
+ &-border-width {
11
+ --#{$property}-#{$direction}: var(--border-width-400);
12
+
13
+ &-#{$key} {
14
+ --#{$property}-#{$direction}: var(--border-width-#{$key});
15
+ }
16
+ }
17
+ }
18
+
19
+ @each $key in lib.map-keys(tokens.$spacer) {
20
+ &-spacer {
21
+ --#{$property}-#{$direction}: var(--spacer-400);
22
+
23
+ &-#{$key} {
24
+ --#{$property}-#{$direction}: var(--spacer-#{$key});
25
+ }
26
+ }
27
+ }
28
+
29
+ @each $key in lib.map-keys(tokens.$size) {
30
+ &-#{$key} {
31
+ --#{$property}-#{$direction}: var(--size-#{$key});
32
+ }
33
+ }
34
+
35
+ &-inherit {
36
+ --#{$property}-#{$direction}: inherit;
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ @each $property in margin {
44
+ .--#{$property} {
45
+ @each $direction in 'horizontal' 'vertical' {
46
+ &,
47
+ &-#{$direction} {
48
+ &-auto {
49
+ --#{$property}-#{$direction}: auto;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }