@haiilo/catalyst 0.6.0 → 0.7.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 (164) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/catalyst.esm.js.map +1 -1
  3. package/dist/catalyst/p-12486027.js.map +1 -1
  4. package/dist/catalyst/p-12b96af6.js +2 -0
  5. package/dist/catalyst/p-12b96af6.js.map +1 -0
  6. package/dist/catalyst/p-4254363e.entry.js +2 -0
  7. package/dist/catalyst/p-4254363e.entry.js.map +1 -0
  8. package/dist/catalyst/p-5616e2cd.js +2 -0
  9. package/dist/catalyst/p-5616e2cd.js.map +1 -0
  10. package/dist/catalyst/p-dda85567.entry.js +10 -0
  11. package/dist/catalyst/p-dda85567.entry.js.map +1 -0
  12. package/dist/catalyst/scss/_mixins.scss +9 -0
  13. package/dist/catalyst/scss/_variables.scss +64 -0
  14. package/dist/catalyst/scss/_variables.tokens.scss +84 -0
  15. package/dist/catalyst/scss/core/_base.scss +12 -0
  16. package/dist/catalyst/scss/core/_nav.scss +23 -0
  17. package/dist/catalyst/scss/core/_typography.scss +237 -0
  18. package/dist/catalyst/scss/fonts/_fonts.mixins.azeret.scss +14 -0
  19. package/dist/catalyst/scss/fonts/_fonts.mixins.dm.scss +53 -0
  20. package/dist/catalyst/scss/fonts/_fonts.mixins.lato.scss +185 -0
  21. package/dist/catalyst/scss/fonts/_fonts.mixins.scss +3 -0
  22. package/dist/catalyst/scss/fonts/_fonts.scss +13 -0
  23. package/dist/catalyst/scss/index.scss +32 -0
  24. package/dist/catalyst/scss/utils/_color.scss +52 -0
  25. package/dist/catalyst/scss/utils/_disabled.mixins.scss +7 -0
  26. package/dist/catalyst/scss/utils/_display.scss +20 -0
  27. package/dist/catalyst/scss/utils/_elevation.mixins.scss +10 -0
  28. package/dist/catalyst/scss/utils/_elevation.scss +19 -0
  29. package/dist/catalyst/scss/utils/_layout.scss +78 -0
  30. package/dist/catalyst/scss/utils/_media.mixins.scss +37 -0
  31. package/dist/catalyst/scss/utils/_ratio.mixins.scss +12 -0
  32. package/dist/catalyst/scss/utils/_ratio.scss +20 -0
  33. package/dist/catalyst/scss/utils/_sizing.mixins.scss +15 -0
  34. package/dist/catalyst/scss/utils/_sizing.scss +16 -0
  35. package/dist/catalyst/scss/utils/_spacing.mixins.scss +5 -0
  36. package/dist/catalyst/scss/utils/_spacing.scss +49 -0
  37. package/dist/catalyst/scss/utils/_toast.scss +77 -0
  38. package/dist/catalyst/scss/utils/_typography.mixins.scss +102 -0
  39. package/dist/catalyst/scss/utils/_typography.scss +34 -0
  40. package/dist/catalyst/scss/utils/_visibility.mixins.scss +29 -0
  41. package/dist/catalyst/scss/utils/_visibility.scss +13 -0
  42. package/dist/cjs/app-globals-aa29ad72.js.map +1 -1
  43. package/dist/cjs/{cat-alert_16.cjs.entry.js → cat-alert_18.cjs.entry.js} +174 -44
  44. package/dist/cjs/cat-alert_18.cjs.entry.js.map +1 -0
  45. package/dist/cjs/cat-form-hint-93a6936b.js +22 -0
  46. package/dist/cjs/cat-form-hint-93a6936b.js.map +1 -0
  47. package/dist/cjs/cat-textarea.cjs.entry.js +13 -12
  48. package/dist/cjs/cat-textarea.cjs.entry.js.map +1 -1
  49. package/dist/cjs/catalyst.cjs.js +2 -2
  50. package/dist/cjs/{index-5d72f0e4.js → index-499bad41.js} +44 -1
  51. package/dist/cjs/index-499bad41.js.map +1 -0
  52. package/dist/cjs/loader.cjs.js +2 -2
  53. package/dist/collection/collection-manifest.json +2 -0
  54. package/dist/collection/components/cat-checkbox/cat-checkbox.css +14 -0
  55. package/dist/collection/components/cat-checkbox/cat-checkbox.js +44 -11
  56. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  57. package/dist/collection/components/cat-form-hint/cat-form-hint.js +16 -0
  58. package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -0
  59. package/dist/collection/components/cat-icon/cat-icon.css +4 -1
  60. package/dist/collection/components/cat-input/cat-input.css +12 -6
  61. package/dist/collection/components/cat-input/cat-input.js +24 -25
  62. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  63. package/dist/collection/components/cat-radio/cat-radio.css +14 -0
  64. package/dist/collection/components/cat-radio/cat-radio.js +41 -8
  65. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  66. package/dist/collection/components/cat-tab/cat-tab.css +12 -0
  67. package/dist/collection/components/cat-tab/cat-tab.js +203 -0
  68. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -0
  69. package/dist/collection/components/cat-tabs/cat-tabs.css +33 -0
  70. package/dist/collection/components/cat-tabs/cat-tabs.js +122 -0
  71. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -0
  72. package/dist/collection/components/cat-textarea/cat-textarea.css +12 -6
  73. package/dist/collection/components/cat-textarea/cat-textarea.js +24 -18
  74. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  75. package/dist/collection/components/cat-toggle/cat-toggle.css +14 -0
  76. package/dist/collection/components/cat-toggle/cat-toggle.js +40 -7
  77. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  78. package/dist/collection/components/cat-tooltip/cat-tooltip.js +13 -8
  79. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  80. package/dist/collection/scss/_mixins.scss +9 -0
  81. package/dist/collection/scss/_variables.scss +64 -0
  82. package/dist/collection/scss/_variables.tokens.scss +84 -0
  83. package/dist/collection/scss/core/_base.scss +12 -0
  84. package/dist/collection/scss/core/_nav.scss +23 -0
  85. package/dist/collection/scss/core/_typography.scss +237 -0
  86. package/dist/collection/scss/fonts/_fonts.mixins.azeret.scss +14 -0
  87. package/dist/collection/scss/fonts/_fonts.mixins.dm.scss +53 -0
  88. package/dist/collection/scss/fonts/_fonts.mixins.lato.scss +185 -0
  89. package/dist/collection/scss/fonts/_fonts.mixins.scss +3 -0
  90. package/dist/collection/scss/fonts/_fonts.scss +13 -0
  91. package/dist/collection/scss/index.scss +32 -0
  92. package/dist/collection/scss/utils/_color.scss +52 -0
  93. package/dist/collection/scss/utils/_disabled.mixins.scss +7 -0
  94. package/dist/collection/scss/utils/_display.scss +20 -0
  95. package/dist/collection/scss/utils/_elevation.mixins.scss +10 -0
  96. package/dist/collection/scss/utils/_elevation.scss +19 -0
  97. package/dist/collection/scss/utils/_layout.scss +78 -0
  98. package/dist/collection/scss/utils/_media.mixins.scss +37 -0
  99. package/dist/collection/scss/utils/_ratio.mixins.scss +12 -0
  100. package/dist/collection/scss/utils/_ratio.scss +20 -0
  101. package/dist/collection/scss/utils/_sizing.mixins.scss +15 -0
  102. package/dist/collection/scss/utils/_sizing.scss +16 -0
  103. package/dist/collection/scss/utils/_spacing.mixins.scss +5 -0
  104. package/dist/collection/scss/utils/_spacing.scss +49 -0
  105. package/dist/collection/scss/utils/_toast.scss +77 -0
  106. package/dist/collection/scss/utils/_typography.mixins.scss +102 -0
  107. package/dist/collection/scss/utils/_typography.scss +34 -0
  108. package/dist/collection/scss/utils/_visibility.mixins.scss +29 -0
  109. package/dist/collection/scss/utils/_visibility.scss +13 -0
  110. package/dist/components/cat-checkbox.js +16 -5
  111. package/dist/components/cat-checkbox.js.map +1 -1
  112. package/dist/components/cat-form-hint.js +20 -0
  113. package/dist/components/cat-form-hint.js.map +1 -0
  114. package/dist/components/cat-icon2.js +1 -1
  115. package/dist/components/cat-icon2.js.map +1 -1
  116. package/dist/components/cat-input.js +16 -18
  117. package/dist/components/cat-input.js.map +1 -1
  118. package/dist/components/cat-radio.js +16 -5
  119. package/dist/components/cat-radio.js.map +1 -1
  120. package/dist/components/cat-tab.d.ts +11 -0
  121. package/dist/components/cat-tab.js +70 -0
  122. package/dist/components/cat-tab.js.map +1 -0
  123. package/dist/components/cat-tabs.d.ts +11 -0
  124. package/dist/components/cat-tabs.js +107 -0
  125. package/dist/components/cat-tabs.js.map +1 -0
  126. package/dist/components/cat-textarea.js +14 -12
  127. package/dist/components/cat-textarea.js.map +1 -1
  128. package/dist/components/cat-toggle.js +16 -5
  129. package/dist/components/cat-toggle.js.map +1 -1
  130. package/dist/components/cat-tooltip.js +13 -8
  131. package/dist/components/cat-tooltip.js.map +1 -1
  132. package/dist/components/index.js.map +1 -1
  133. package/dist/esm/app-globals-cf55f7f5.js.map +1 -1
  134. package/dist/esm/{cat-alert_16.entry.js → cat-alert_18.entry.js} +173 -45
  135. package/dist/esm/cat-alert_18.entry.js.map +1 -0
  136. package/dist/esm/cat-form-hint-dc443c7c.js +20 -0
  137. package/dist/esm/cat-form-hint-dc443c7c.js.map +1 -0
  138. package/dist/esm/cat-textarea.entry.js +13 -12
  139. package/dist/esm/cat-textarea.entry.js.map +1 -1
  140. package/dist/esm/catalyst.js +2 -2
  141. package/dist/esm/{index-fd12be19.js → index-039e6f5f.js} +44 -2
  142. package/dist/esm/index-039e6f5f.js.map +1 -0
  143. package/dist/esm/loader.js +2 -2
  144. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +9 -0
  145. package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +19 -0
  146. package/dist/types/components/cat-input/cat-input.d.ts +7 -5
  147. package/dist/types/components/cat-radio/cat-radio.d.ts +9 -0
  148. package/dist/types/components/cat-tab/cat-tab.d.ts +43 -0
  149. package/dist/types/components/cat-tabs/cat-tabs.d.ts +25 -0
  150. package/dist/types/components/cat-textarea/cat-textarea.d.ts +7 -2
  151. package/dist/types/components/cat-toggle/cat-toggle.d.ts +9 -0
  152. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +1 -0
  153. package/dist/types/components.d.ts +134 -8
  154. package/package.json +2 -2
  155. package/dist/catalyst/p-6a5f0d4a.entry.js +0 -10
  156. package/dist/catalyst/p-6a5f0d4a.entry.js.map +0 -1
  157. package/dist/catalyst/p-a8629c54.entry.js +0 -2
  158. package/dist/catalyst/p-a8629c54.entry.js.map +0 -1
  159. package/dist/catalyst/p-bfc656ca.js +0 -2
  160. package/dist/catalyst/p-bfc656ca.js.map +0 -1
  161. package/dist/cjs/cat-alert_16.cjs.entry.js.map +0 -1
  162. package/dist/cjs/index-5d72f0e4.js.map +0 -1
  163. package/dist/esm/cat-alert_16.entry.js.map +0 -1
  164. package/dist/esm/index-fd12be19.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ @use 'sass:list';
2
+ @use '../variables' as *;
3
+
4
+ @mixin cat-font-azeret($path, $weights...) {
5
+ @if list.index($weights, 400) {
6
+ @font-face {
7
+ font-family: 'Azeret Mono';
8
+ src: url('#{$path}#{cat-token("asset.font.azeretMono.woff2Regular")}') format('woff2');
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ @content;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,53 @@
1
+ @use 'sass:list';
2
+ @use '../variables' as *;
3
+
4
+ @mixin cat-font-dm-sans($path, $weights...) {
5
+ @if list.index($weights, 400) {
6
+ @font-face {
7
+ font-family: 'DM Sans';
8
+ src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Regular")}') format('woff2');
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ @content;
12
+ }
13
+ @font-face {
14
+ font-family: 'DM Sans';
15
+ src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Italic")}') format('woff2');
16
+ font-style: italic;
17
+ font-weight: 400;
18
+ @content;
19
+ }
20
+ }
21
+ @if list.index($weights, 500) {
22
+ @font-face {
23
+ font-family: 'DM Sans';
24
+ src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Medium")}') format('woff2');
25
+ font-style: normal;
26
+ font-weight: 500;
27
+ @content;
28
+ }
29
+ @font-face {
30
+ font-family: 'DM Sans';
31
+ src: url('#{$path}#{cat-token("asset.font.dmSans.woff2MediumItalic")}') format('woff2');
32
+ font-style: italic;
33
+ font-weight: 500;
34
+ @content;
35
+ }
36
+ }
37
+ @if list.index($weights, 700) {
38
+ @font-face {
39
+ font-family: 'DM Sans';
40
+ src: url('#{$path}#{cat-token("asset.font.dmSans.woff2Bold")}') format('woff2');
41
+ font-style: normal;
42
+ font-weight: 700;
43
+ font-display: swap;
44
+ }
45
+ @font-face {
46
+ font-family: 'DM Sans';
47
+ src: url('#{$path}#{cat-token("asset.font.dmSans.woff2BoldItalic")}') format('woff2');
48
+ font-style: italic;
49
+ font-weight: 700;
50
+ font-display: swap;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,185 @@
1
+ @use 'sass:list';
2
+ @use '../variables' as *;
3
+
4
+ @mixin cat-font-lato($path, $weights...) {
5
+ @if list.index($weights, 100) {
6
+ @font-face {
7
+ font-family: Lato;
8
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Hairline")}') format('woff2'),
9
+ url('#{$path}#{cat-token("asset.font.lato.woffHairline")}') format('woff');
10
+ font-style: normal;
11
+ font-weight: 100;
12
+ text-rendering: optimizeLegibility;
13
+ @content;
14
+ }
15
+ @font-face {
16
+ font-family: Lato;
17
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2HairlineItalic")}') format('woff2'),
18
+ url('#{$path}#{cat-token("asset.font.lato.woffHairlineItalic")}') format('woff');
19
+ font-style: italic;
20
+ font-weight: 100;
21
+ text-rendering: optimizeLegibility;
22
+ @content;
23
+ }
24
+ }
25
+ @if list.index($weights, 200) {
26
+ @font-face {
27
+ font-family: Lato;
28
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Thin")}') format('woff2'),
29
+ url('#{$path}#{cat-token("asset.font.lato.woffThin")}') format('woff');
30
+ font-style: normal;
31
+ font-weight: 200;
32
+ text-rendering: optimizeLegibility;
33
+ @content;
34
+ }
35
+ @font-face {
36
+ font-family: Lato;
37
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2ThinItalic")}') format('woff2'),
38
+ url('#{$path}#{cat-token("asset.font.lato.woffThinItalic")}') format('woff');
39
+ font-style: italic;
40
+ font-weight: 200;
41
+ text-rendering: optimizeLegibility;
42
+ @content;
43
+ }
44
+ }
45
+ @if list.index($weights, 300) {
46
+ @font-face {
47
+ font-family: Lato;
48
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Light")}') format('woff2'),
49
+ url('#{$path}#{cat-token("asset.font.lato.woffLight")}') format('woff');
50
+ font-style: normal;
51
+ font-weight: 300;
52
+ text-rendering: optimizeLegibility;
53
+ @content;
54
+ }
55
+ @font-face {
56
+ font-family: Lato;
57
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2LightItalic")}') format('woff2'),
58
+ url('#{$path}#{cat-token("asset.font.lato.woffLightItalic")}') format('woff');
59
+ font-style: italic;
60
+ font-weight: 300;
61
+ text-rendering: optimizeLegibility;
62
+ @content;
63
+ }
64
+ }
65
+ @if list.index($weights, 400) {
66
+ @font-face {
67
+ font-family: Lato;
68
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Regular")}') format('woff2'),
69
+ url('#{$path}#{cat-token("asset.font.lato.woffRegular")}') format('woff');
70
+ font-style: normal;
71
+ font-weight: 400;
72
+ text-rendering: optimizeLegibility;
73
+ @content;
74
+ }
75
+ @font-face {
76
+ font-family: Lato;
77
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Italic")}') format('woff2'),
78
+ url('#{$path}#{cat-token("asset.font.lato.woffItalic")}') format('woff');
79
+ font-style: italic;
80
+ font-weight: 400;
81
+ text-rendering: optimizeLegibility;
82
+ @content;
83
+ }
84
+ }
85
+ @if list.index($weights, 500) {
86
+ @font-face {
87
+ font-family: Lato;
88
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Medium")}') format('woff2'),
89
+ url('#{$path}#{cat-token("asset.font.lato.woffMedium")}') format('woff');
90
+ font-style: normal;
91
+ font-weight: 500;
92
+ text-rendering: optimizeLegibility;
93
+ @content;
94
+ }
95
+ @font-face {
96
+ font-family: Lato;
97
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2MediumItalic")}') format('woff2'),
98
+ url('#{$path}#{cat-token("asset.font.lato.woffMediumItalic")}') format('woff');
99
+ font-style: italic;
100
+ font-weight: 500;
101
+ text-rendering: optimizeLegibility;
102
+ @content;
103
+ }
104
+ }
105
+ @if list.index($weights, 600) {
106
+ @font-face {
107
+ font-family: Lato;
108
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Semibold")}') format('woff2'),
109
+ url('#{$path}#{cat-token("asset.font.lato.woffSemibold")}') format('woff');
110
+ font-style: normal;
111
+ font-weight: 600;
112
+ text-rendering: optimizeLegibility;
113
+ @content;
114
+ }
115
+ @font-face {
116
+ font-family: Lato;
117
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2SemiboldItalic")}') format('woff2'),
118
+ url('#{$path}#{cat-token("asset.font.lato.woffSemiboldItalic")}') format('woff');
119
+ font-style: italic;
120
+ font-weight: 600;
121
+ text-rendering: optimizeLegibility;
122
+ @content;
123
+ }
124
+ }
125
+ @if list.index($weights, 700) {
126
+ @font-face {
127
+ font-family: Lato;
128
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Bold")}') format('woff2'),
129
+ url('#{$path}#{cat-token("asset.font.lato.woffBold")}') format('woff');
130
+ font-style: normal;
131
+ font-weight: 700;
132
+ text-rendering: optimizeLegibility;
133
+ @content;
134
+ }
135
+ @font-face {
136
+ font-family: Lato;
137
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2BoldItalic")}') format('woff2'),
138
+ url('#{$path}#{cat-token("asset.font.lato.woffBoldItalic")}') format('woff');
139
+ font-style: italic;
140
+ font-weight: 700;
141
+ text-rendering: optimizeLegibility;
142
+ @content;
143
+ }
144
+ }
145
+ @if list.index($weights, 800) {
146
+ @font-face {
147
+ font-family: Lato;
148
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Heavy")}') format('woff2'),
149
+ url('#{$path}#{cat-token("asset.font.lato.woffHeavy")}') format('woff');
150
+ font-style: normal;
151
+ font-weight: 800;
152
+ text-rendering: optimizeLegibility;
153
+ @content;
154
+ }
155
+ @font-face {
156
+ font-family: Lato;
157
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2HeavyItalic")}') format('woff2'),
158
+ url('#{$path}#{cat-token("asset.font.lato.woffHeavyItalic")}') format('woff');
159
+ font-style: italic;
160
+ font-weight: 800;
161
+ text-rendering: optimizeLegibility;
162
+ @content;
163
+ }
164
+ }
165
+ @if list.index($weights, 900) {
166
+ @font-face {
167
+ font-family: Lato;
168
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2Black")}') format('woff2'),
169
+ url('#{$path}#{cat-token("asset.font.lato.woffBlack")}') format('woff');
170
+ font-style: normal;
171
+ font-weight: 900;
172
+ text-rendering: optimizeLegibility;
173
+ @content;
174
+ }
175
+ @font-face {
176
+ font-family: Lato;
177
+ src: url('#{$path}#{cat-token("asset.font.lato.woff2BlackItalic")}') format('woff2'),
178
+ url('#{$path}#{cat-token("asset.font.lato.woffBlackItalic")}') format('woff');
179
+ font-style: italic;
180
+ font-weight: 900;
181
+ text-rendering: optimizeLegibility;
182
+ @content;
183
+ }
184
+ }
185
+ }
@@ -0,0 +1,3 @@
1
+ @forward 'fonts.mixins.azeret';
2
+ @forward 'fonts.mixins.dm';
3
+ @forward 'fonts.mixins.lato';
@@ -0,0 +1,13 @@
1
+ @use 'fonts.mixins' as *;
2
+
3
+ @include cat-font-dm-sans('./assets/fonts/', 500) {
4
+ font-display: swap;
5
+ }
6
+
7
+ @include cat-font-lato('./assets/fonts/', 300, 400, 500, 700) {
8
+ font-display: fallback;
9
+ }
10
+
11
+ @include cat-font-azeret('./assets/fonts/', 400) {
12
+ font-display: fallback;
13
+ }
@@ -0,0 +1,32 @@
1
+ // -- Reset
2
+
3
+ @use '~sanitize.css/sanitize.css';
4
+ @use '~sanitize.css/assets.css';
5
+ @use '~sanitize.css/reduce-motion.css';
6
+
7
+ // -- Vendor
8
+
9
+ @use '~toastify-js/src/toastify.css';
10
+
11
+ // -- Core
12
+
13
+ @use 'core/base' as *;
14
+ @use 'core/nav' as *;
15
+ @use 'core/typography' as *;
16
+
17
+ // -- Fonts
18
+
19
+ @use 'fonts/fonts' as *;
20
+
21
+ // -- Utils
22
+
23
+ @use 'utils/color';
24
+ @use 'utils/display';
25
+ @use 'utils/elevation';
26
+ @use 'utils/layout';
27
+ @use 'utils/sizing';
28
+ @use 'utils/spacing';
29
+ @use 'utils/typography';
30
+ @use 'utils/visibility';
31
+ @use 'utils/ratio';
32
+ @use 'utils/toast';
@@ -0,0 +1,52 @@
1
+ @use '../variables' as *;
2
+
3
+ @each $name, $theme in cat-token('color.theme') {
4
+ .cat-bg-#{$name} {
5
+ background-color: cat-token('color.theme.#{$name}.bg') !important;
6
+ color: cat-token('color.theme.#{$name}.fill') !important;
7
+ }
8
+
9
+ .cat-bg-#{$name}-hover {
10
+ transition: background-color cat-token('time.transition.s'), color cat-token('time.transition.s');
11
+
12
+ &:hover {
13
+ background-color: cat-token('color.theme.#{$name}.bgHover') !important;
14
+ color: cat-token('color.theme.#{$name}.fillHover') !important;
15
+ }
16
+ }
17
+
18
+ .cat-text-#{$name},
19
+ .cat-link-#{$name} {
20
+ color: cat-token('color.theme.#{$name}.text') !important;
21
+ }
22
+
23
+ .cat-link-#{$name},
24
+ .cat-text-#{$name}-hover {
25
+ transition: color cat-token('time.transition.s');
26
+
27
+ &:hover {
28
+ color: cat-token('color.theme.#{$name}.textHover') !important;
29
+ }
30
+
31
+ &:active {
32
+ color: cat-token('color.theme.#{$name}.textActive') !important;
33
+ }
34
+ }
35
+ }
36
+
37
+ .cat-active {
38
+ color: cat-token('color.theme.primary.text') !important;
39
+ }
40
+
41
+ .cat-muted {
42
+ color: cat-token('color.ui.font.muted') !important;
43
+ }
44
+
45
+ .cat-text-reset {
46
+ color: inherit !important;
47
+ }
48
+
49
+ .cat-link-reset {
50
+ color: inherit !important;
51
+ text-decoration: inherit !important;
52
+ }
@@ -0,0 +1,7 @@
1
+ @use '../variables' as *;
2
+
3
+ @mixin cat-disabled() {
4
+ cursor: not-allowed;
5
+ opacity: cat-token('opacity.disabled');
6
+ filter: grayscale(100%);
7
+ }
@@ -0,0 +1,20 @@
1
+ @use '../variables' as *;
2
+ @use 'media.mixins' as *;
3
+
4
+ $-display-props: none, inline, inline-block, block, grid, flex, inline-flex;
5
+
6
+ @each $prop in $-display-props {
7
+ .cat-#{$prop} {
8
+ display: $prop !important;
9
+ }
10
+ }
11
+
12
+ @each $key, $value in cat-token('size.screen') {
13
+ @include from($key) {
14
+ @each $prop in $-display-props {
15
+ .cat-#{$prop}\:#{$key} {
16
+ display: $prop !important;
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,10 @@
1
+ @use 'sass:map';
2
+ @use '../variables' as *;
3
+
4
+ @mixin cat-elevation($level) {
5
+ box-shadow: map.get($cat-elevation, $level);
6
+ }
7
+
8
+ @mixin cat-elevation-transition {
9
+ transition: $cat-elevation-transition;
10
+ }
@@ -0,0 +1,19 @@
1
+ @use '../variables' as *;
2
+ @use 'elevation.mixins' as *;
3
+
4
+ .cat-elevation-transition {
5
+ @include cat-elevation-transition;
6
+ }
7
+
8
+ @each $level, $_def in $cat-elevation {
9
+ .cat-elevation-#{$level} {
10
+ @include cat-elevation($level);
11
+ }
12
+ .cat-elevation-hover-#{$level} {
13
+ &:hover,
14
+ &:focus,
15
+ &:focus-within {
16
+ @include cat-elevation($level);
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,78 @@
1
+ @use '../variables' as *;
2
+
3
+ @mixin -layout-property($name, $property, $value) {
4
+ .cat-#{$name} {
5
+ #{$property}: #{$value};
6
+ @content;
7
+ }
8
+ }
9
+
10
+ // -- Direction
11
+
12
+ @include -layout-property('flex-row', 'flex-direction', 'row');
13
+ @include -layout-property('flex-col', 'flex-direction', 'column');
14
+
15
+ // -- Flex
16
+
17
+ @include -layout-property('flex-1', 'flex', '1 1 0%');
18
+ @include -layout-property('flex-auto', 'flex', '1 1 auto');
19
+ @include -layout-property('flex-init', 'flex', '0 1 auto');
20
+ @include -layout-property('flex-none', 'flex', 'none');
21
+
22
+ // -- Wrap
23
+
24
+ @include -layout-property('flex-wrap', 'flex-wrap', 'wrap');
25
+ @include -layout-property('flex-nowrap', 'flex-wrap', 'nowrap');
26
+
27
+ // -- Gap
28
+
29
+ @each $size, $value in cat-token('size.spacing') {
30
+ @include -layout-property('gap-#{$size}', 'gap', $value);
31
+ @include -layout-property('gap-x-#{$size}', 'column-gap', $value);
32
+ @include -layout-property('gap-y-#{$size}', 'row-gap', $value);
33
+ }
34
+
35
+ // -- Alignment
36
+
37
+ @include -layout-property('justify-start', 'justify-content', 'flex-start');
38
+ @include -layout-property('justify-end', 'justify-content', 'flex-end');
39
+ @include -layout-property('justify-center', 'justify-content', 'center');
40
+ @include -layout-property('justify-between', 'justify-content', 'space-between');
41
+ // @include -layout-property('justify-around', 'justify-content', 'space-around');
42
+ // @include -layout-property('justify-evenly', 'justify-content', 'space-evenly');
43
+
44
+ @include -layout-property('justify-items-start', 'justify-items', 'flex-start');
45
+ @include -layout-property('justify-items-end', 'justify-items', 'flex-end');
46
+ @include -layout-property('justify-items-center', 'justify-items', 'flex-center');
47
+ @include -layout-property('justify-items-stretch', 'justify-items', 'flex-stretch');
48
+
49
+ @include -layout-property('content-start', 'align-content', 'flex-start');
50
+ @include -layout-property('content-end', 'align-content', 'flex-end');
51
+ @include -layout-property('content-center', 'align-content', 'center');
52
+ @include -layout-property('content-between', 'align-content', 'space-between');
53
+ // @include -layout-property('content-around', 'align-content', 'space-around');
54
+ // @include -layout-property('content-evenly', 'align-content', 'space-evenly');
55
+
56
+ @include -layout-property('items-start', 'align-items', 'flex-start');
57
+ @include -layout-property('items-end', 'align-items', 'flex-end');
58
+ @include -layout-property('items-center', 'align-items', 'flex-center');
59
+ @include -layout-property('items-stretch', 'align-items', 'flex-stretch');
60
+
61
+ // -- Grid
62
+
63
+ @for $i from 1 through 12 {
64
+ @include -layout-property('grid-#{$i}', 'grid-template-columns', 'repeat(#{$i}, minmax(0, 1fr))');
65
+ @include -layout-property('grid-col-#{$i}', 'grid-column', 'span #{$i} / span #{$i}');
66
+ }
67
+
68
+ @for $i from 1 through 6 {
69
+ @include -layout-property('grid-row-#{$i}', 'grid-row', 'span #{$i} / span #{$i}');
70
+ }
71
+
72
+ @include -layout-property(
73
+ 'grid-auto',
74
+ 'grid-template-columns',
75
+ 'repeat(auto-fill,minmax(min(var(--grid-min),100%),1fr))'
76
+ ) {
77
+ --grid-min: 100%;
78
+ }
@@ -0,0 +1,37 @@
1
+ @use '../variables' as *;
2
+
3
+ // ---- Responsive
4
+
5
+ @mixin until($size, $media-type: screen) {
6
+ @media #{$media-type} and (max-width: #{cat-token('size.screen.#{$size}') - 1px}) {
7
+ @content;
8
+ }
9
+ }
10
+
11
+ @mixin from($size, $media-type: screen) {
12
+ @media #{$media-type} and (min-width: #{cat-token('size.screen.#{$size}')}) {
13
+ @content;
14
+ }
15
+ }
16
+
17
+ // ---- Print
18
+
19
+ @mixin print {
20
+ @media print {
21
+ @content;
22
+ }
23
+ }
24
+
25
+ // ---- Interaction
26
+
27
+ @mixin pointer($pointer: fine) {
28
+ @media (pointer: #{$pointer}) {
29
+ @content;
30
+ }
31
+ }
32
+
33
+ @mixin hover($hover: hover) {
34
+ @media (hover: #{$hover}) {
35
+ @content;
36
+ }
37
+ }
@@ -0,0 +1,12 @@
1
+ @mixin cat-ratio($aspect-ratio) {
2
+ position: relative;
3
+ aspect-ratio: $aspect-ratio;
4
+
5
+ > * {
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+ }
12
+ }
@@ -0,0 +1,20 @@
1
+ @use 'ratio.mixins' as *;
2
+
3
+ $aspect-ratios: (
4
+ '1x1': 1,
5
+ '3x1': 3,
6
+ '6x1': 6,
7
+ '4x3': calc(4 / 3),
8
+ '16x9': calc(16 / 9),
9
+ '21x9': calc(21 / 9)
10
+ );
11
+
12
+ .cat-ratio {
13
+ @include cat-ratio(var(--cat-aspect-ratio));
14
+ }
15
+
16
+ @each $key, $ratio in $aspect-ratios {
17
+ .cat-ratio-#{$key} {
18
+ --cat-aspect-ratio: #{$ratio};
19
+ }
20
+ }
@@ -0,0 +1,15 @@
1
+ @use '../variables' as *;
2
+
3
+ @function cat-size($size) {
4
+ @return cat-token('size.base.#{$size}');
5
+ }
6
+
7
+ @function cat-border-radius($size) {
8
+ @if $size == '0' or $size == 0 {
9
+ @return none;
10
+ } @else if $size == 'full' {
11
+ @return 100rem;
12
+ } @else {
13
+ @return cat-token('size.border.radius.#{$size}');
14
+ }
15
+ }
@@ -0,0 +1,16 @@
1
+ @use '../variables' as *;
2
+ @use 'sizing.mixins' as *;
3
+
4
+ @each $size, $_def in cat-token('size.border.radius') {
5
+ .cat-radius-#{$size} {
6
+ border-radius: cat-border-radius($size);
7
+ }
8
+ }
9
+
10
+ .cat-radius-0 {
11
+ border-radius: cat-border-radius('0');
12
+ }
13
+
14
+ .cat-radius-full {
15
+ border-radius: cat-border-radius('full');
16
+ }
@@ -0,0 +1,5 @@
1
+ @use '../variables' as *;
2
+
3
+ @function cat-spacing($size) {
4
+ @return cat-token('size.spacing.#{$size}');
5
+ }
@@ -0,0 +1,49 @@
1
+ @use 'sass:map';
2
+ @use '../variables' as *;
3
+ @use 'spacing.mixins' as *;
4
+
5
+ $-spacings: map.merge(
6
+ (
7
+ 'auto': auto,
8
+ '0': 0
9
+ ),
10
+ cat-token('size.spacing')
11
+ );
12
+
13
+ @each $name, $spacing in $-spacings {
14
+ .cat-m-#{$name} {
15
+ margin: $spacing !important;
16
+ }
17
+ .cat-mv-#{$name} {
18
+ margin-top: $spacing !important;
19
+ margin-bottom: $spacing !important;
20
+ }
21
+ .cat-mh-#{$name} {
22
+ margin-left: $spacing !important;
23
+ margin-right: $spacing !important;
24
+ }
25
+ @each $dir in (top, bottom, left, right) {
26
+ .cat-m#{str-slice($dir, 0, 1)}-#{$name} {
27
+ margin-#{$dir}: $spacing !important;
28
+ }
29
+ }
30
+
31
+ @if $spacing != auto {
32
+ .cat-p-#{$name} {
33
+ padding: $spacing !important;
34
+ }
35
+ .cat-pv-#{$name} {
36
+ padding-top: $spacing !important;
37
+ padding-bottom: $spacing !important;
38
+ }
39
+ .cat-ph-#{$name} {
40
+ padding-left: $spacing !important;
41
+ padding-right: $spacing !important;
42
+ }
43
+ @each $dir in (top, bottom, left, right) {
44
+ .cat-p#{str-slice($dir, 0, 1)}-#{$name} {
45
+ padding-#{$dir}: $spacing !important;
46
+ }
47
+ }
48
+ }
49
+ }