katanakit-js 6.4.3 → 6.7.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.
- package/README.md +4 -3
- package/dist/adapters/express/server.d.ts +133 -1
- package/dist/adapters/express/server.d.ts.map +1 -1
- package/dist/adapters/express/server.js +199 -97
- package/dist/adapters/express/server.js.map +1 -1
- package/dist/adapters/insforge/insforge.service.d.ts +139 -4
- package/dist/adapters/insforge/insforge.service.d.ts.map +1 -1
- package/dist/adapters/insforge/insforge.service.js +383 -213
- package/dist/adapters/insforge/insforge.service.js.map +1 -1
- package/dist/adapters/notion/notion.service.d.ts +130 -144
- package/dist/adapters/notion/notion.service.d.ts.map +1 -1
- package/dist/adapters/notion/notion.service.js +330 -341
- package/dist/adapters/notion/notion.service.js.map +1 -1
- package/dist/adapters/telegram/telegram.service.d.ts +82 -13
- package/dist/adapters/telegram/telegram.service.d.ts.map +1 -1
- package/dist/adapters/telegram/telegram.service.js +133 -55
- package/dist/adapters/telegram/telegram.service.js.map +1 -1
- package/dist/adapters/wordpress/wordpress.service.d.ts +181 -110
- package/dist/adapters/wordpress/wordpress.service.d.ts.map +1 -1
- package/dist/adapters/wordpress/wordpress.service.js +556 -465
- package/dist/adapters/wordpress/wordpress.service.js.map +1 -1
- package/dist/core/services/access.service.d.ts +167 -4
- package/dist/core/services/access.service.d.ts.map +1 -1
- package/dist/core/services/access.service.js +241 -31
- package/dist/core/services/access.service.js.map +1 -1
- package/dist/core/services/agent.service.d.ts +182 -27
- package/dist/core/services/agent.service.d.ts.map +1 -1
- package/dist/core/services/agent.service.js +296 -164
- package/dist/core/services/agent.service.js.map +1 -1
- package/dist/core/services/assistant.service.d.ts +96 -5
- package/dist/core/services/assistant.service.d.ts.map +1 -1
- package/dist/core/services/assistant.service.js +171 -66
- package/dist/core/services/assistant.service.js.map +1 -1
- package/dist/core/services/dates.service.d.ts +183 -11
- package/dist/core/services/dates.service.d.ts.map +1 -1
- package/dist/core/services/dates.service.js +256 -57
- package/dist/core/services/dates.service.js.map +1 -1
- package/dist/core/services/http.service.d.ts +172 -133
- package/dist/core/services/http.service.d.ts.map +1 -1
- package/dist/core/services/http.service.js +381 -310
- package/dist/core/services/http.service.js.map +1 -1
- package/dist/core/services/logger.service.d.ts +96 -34
- package/dist/core/services/logger.service.d.ts.map +1 -1
- package/dist/core/services/logger.service.js +128 -41
- package/dist/core/services/logger.service.js.map +1 -1
- package/dist/core/services/query.service.d.ts +101 -0
- package/dist/core/services/query.service.d.ts.map +1 -1
- package/dist/core/services/query.service.js +131 -14
- package/dist/core/services/query.service.js.map +1 -1
- package/dist/core/services/utils.service.d.ts +286 -131
- package/dist/core/services/utils.service.d.ts.map +1 -1
- package/dist/core/services/utils.service.js +417 -227
- package/dist/core/services/utils.service.js.map +1 -1
- package/dist/core/services/validation.service.d.ts +48 -3
- package/dist/core/services/validation.service.d.ts.map +1 -1
- package/dist/core/services/validation.service.js +75 -23
- package/dist/core/services/validation.service.js.map +1 -1
- package/dist/infrastructure/decorators/cache.decorator.d.ts +53 -0
- package/dist/infrastructure/decorators/cache.decorator.d.ts.map +1 -0
- package/dist/infrastructure/decorators/cache.decorator.js +47 -0
- package/dist/infrastructure/decorators/cache.decorator.js.map +1 -0
- package/dist/infrastructure/decorators/index.d.ts +4 -0
- package/dist/infrastructure/decorators/index.d.ts.map +1 -0
- package/dist/infrastructure/decorators/index.js +4 -0
- package/dist/infrastructure/decorators/index.js.map +1 -0
- package/dist/infrastructure/decorators/logger.decorator.d.ts +38 -0
- package/dist/infrastructure/decorators/logger.decorator.d.ts.map +1 -0
- package/dist/infrastructure/decorators/logger.decorator.js +66 -0
- package/dist/infrastructure/decorators/logger.decorator.js.map +1 -0
- package/dist/infrastructure/decorators/retry.decorator.d.ts +37 -0
- package/dist/infrastructure/decorators/retry.decorator.d.ts.map +1 -0
- package/dist/infrastructure/decorators/retry.decorator.js +54 -0
- package/dist/infrastructure/decorators/retry.decorator.js.map +1 -0
- package/dist/infrastructure/dom/dom.service.d.ts +11 -5
- package/dist/infrastructure/dom/dom.service.d.ts.map +1 -1
- package/dist/infrastructure/dom/dom.service.js +20 -6
- package/dist/infrastructure/dom/dom.service.js.map +1 -1
- package/dist/infrastructure/index.d.ts +1 -0
- package/dist/infrastructure/index.d.ts.map +1 -1
- package/dist/infrastructure/index.js +1 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/prisma/schema.json +17 -13
- package/dist/styles.css +2 -0
- package/package.json +32 -38
- package/scss/_flags.scss +179 -0
- package/scss/_functions.scss +168 -0
- package/scss/_mixins.scss +658 -0
- package/scss/_reset.scss +275 -0
- package/scss/_utilities.scss +449 -0
- package/scss/_variables.scss +539 -0
- package/scss/components/_index.scss +50 -0
- package/scss/demo.scss +12 -0
- package/scss/main.scss +56 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// _utilities.scss
|
|
3
|
+
// Utility class generation from design-token maps.
|
|
4
|
+
//
|
|
5
|
+
// On import (module top level) it auto-emits: spacing classes
|
|
6
|
+
// (.p-*, .m-*, .gap-*), base .shadow/.rounded/.gap/.border,
|
|
7
|
+
// the .text-* size scale and .border-* widths.
|
|
8
|
+
//
|
|
9
|
+
// It also exposes opt-in generator mixins for sizing, flex,
|
|
10
|
+
// effects and layout utilities; call them explicitly
|
|
11
|
+
// (generate-all-utilities() emits them all).
|
|
12
|
+
// ============================================================
|
|
13
|
+
@use "sass:math";
|
|
14
|
+
@use "sass:list";
|
|
15
|
+
@use "mixins" as mx;
|
|
16
|
+
@use "variables" as v;
|
|
17
|
+
|
|
18
|
+
// ============================================================
|
|
19
|
+
// UTILITY MAPS (shared source of truth with the @apply registry
|
|
20
|
+
// in _mixins.scss — keep them in sync)
|
|
21
|
+
// ============================================================
|
|
22
|
+
|
|
23
|
+
// Width/height scale for .w-*/.h-*/.min-*/.max-* classes.
|
|
24
|
+
$sizing-map: (
|
|
25
|
+
"0": 0, "base": 1px, "05": 0.125rem, "1": 0.25rem, "2": 0.5rem,
|
|
26
|
+
"3": 0.75rem, "4": 1rem, "5": 1.25rem, "6": 1.5rem, "8": 2rem,
|
|
27
|
+
"10": 2.5rem, "12": 3rem, "16": 4rem, "20": 5rem, "24": 6rem,
|
|
28
|
+
"32": 8rem, "40": 10rem, "48": 12rem, "64": 16rem,
|
|
29
|
+
"auto": auto, "full": 100%, "screen": 100vw,
|
|
30
|
+
"min": min-content, "max": max-content, "fit": fit-content,
|
|
31
|
+
"svw": 100svw, "svh": 100svh, "lvw": 100lvw, "lvh": 100lvh,
|
|
32
|
+
"dvw": 100dvw, "dvh": 100dvh,
|
|
33
|
+
"1-2": 50%, "1-3": 33.333%, "2-3": 66.667%,
|
|
34
|
+
"1-4": 25%, "2-4": 50%, "3-4": 75%
|
|
35
|
+
) !default;
|
|
36
|
+
|
|
37
|
+
// Spacing scale — alias of variables module (single source of truth).
|
|
38
|
+
$spacing-map: v.$spacing-map !default;
|
|
39
|
+
|
|
40
|
+
// Typography scale for .text-* classes.
|
|
41
|
+
$font-size-map: (
|
|
42
|
+
"xs": 0.75rem, "sm": 0.875rem, "base": 1rem, "lg": 1.125rem,
|
|
43
|
+
"xl": 1.25rem, "2xl": 1.5rem, "3xl": 1.875rem, "4xl": 2.25rem,
|
|
44
|
+
"5xl": 3rem, "6xl": 3.75rem, "7xl": 4.5rem, "8xl": 6rem, "9xl": 8rem
|
|
45
|
+
) !default;
|
|
46
|
+
|
|
47
|
+
// Border width scale.
|
|
48
|
+
$border-width-map: (
|
|
49
|
+
"0": 0, "2": 2px, "4": 4px, "8": 8px
|
|
50
|
+
) !default;
|
|
51
|
+
|
|
52
|
+
// --- NEW UTILITY MAPS (Tailwind parity) ---
|
|
53
|
+
|
|
54
|
+
// Aspect ratio: .aspect-square, .aspect-video, .aspect-auto.
|
|
55
|
+
$aspect-ratio-map: (
|
|
56
|
+
"auto": auto, "square": math.div(1, 1), "video": math.div(16, 9)
|
|
57
|
+
) !default;
|
|
58
|
+
|
|
59
|
+
// Object fit: .object-contain, .object-cover, etc.
|
|
60
|
+
$object-fit-list: (contain, cover, fill, none, scale-down) !default;
|
|
61
|
+
|
|
62
|
+
// Object position: .object-center, .object-top, etc.
|
|
63
|
+
$object-position-map: (
|
|
64
|
+
"top-left": top left, "top": top, "top-right": top right,
|
|
65
|
+
"left": left, "center": center, "right": right,
|
|
66
|
+
"bottom-left": bottom left, "bottom": bottom, "bottom-right": bottom right
|
|
67
|
+
) !default;
|
|
68
|
+
|
|
69
|
+
// Cursor: .cursor-pointer, .cursor-not-allowed, etc.
|
|
70
|
+
$cursor-list: (
|
|
71
|
+
auto, default, pointer, wait, text, move, help, not-allowed,
|
|
72
|
+
none, context-menu, progress, cell, crosshair, vertical-text,
|
|
73
|
+
alias, copy, no-drop, grab, grabbing, all-scroll, zoom-in, zoom-out
|
|
74
|
+
) !default;
|
|
75
|
+
|
|
76
|
+
// Visibility: .visible, .invisible, .collapse.
|
|
77
|
+
$visibility-list: (visible, invisible, collapse) !default;
|
|
78
|
+
|
|
79
|
+
// Text transform: .uppercase, .lowercase, etc.
|
|
80
|
+
$text-transform-list: (uppercase, lowercase, capitalize, normal-case) !default;
|
|
81
|
+
|
|
82
|
+
// Text decoration: .underline, .line-through, etc.
|
|
83
|
+
$text-decoration-list: (underline, overline, line-through, no-underline) !default;
|
|
84
|
+
|
|
85
|
+
// Text overflow: .truncate, .text-ellipsis, .text-clip.
|
|
86
|
+
$text-overflow-list: (truncate, text-ellipsis, text-clip) !default;
|
|
87
|
+
|
|
88
|
+
// Line height: .leading-none, .leading-tight, etc.
|
|
89
|
+
$line-height-map: (
|
|
90
|
+
"none": 1, "tight": 1.25, "snug": 1.375,
|
|
91
|
+
"normal": 1.5, "relaxed": 1.625, "loose": 2
|
|
92
|
+
) !default;
|
|
93
|
+
|
|
94
|
+
// Letter spacing: .tracking-tighter, .tracking-wide, etc.
|
|
95
|
+
$letter-spacing-map: (
|
|
96
|
+
"tighter": -0.05em, "tight": -0.025em, "normal": 0em,
|
|
97
|
+
"wide": 0.025em, "wider": 0.05em, "widest": 0.1em
|
|
98
|
+
) !default;
|
|
99
|
+
|
|
100
|
+
// Font family: .font-sans, .font-serif, .font-mono.
|
|
101
|
+
$font-family-map: (
|
|
102
|
+
"sans": (ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif),
|
|
103
|
+
"serif": (ui-serif, Georgia, Cambria, "Times New Roman", Times, serif),
|
|
104
|
+
"mono": (ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)
|
|
105
|
+
) !default;
|
|
106
|
+
|
|
107
|
+
// List style type: .list-none, .list-disc, .list-decimal.
|
|
108
|
+
$list-style-type-list: (none, disc, decimal) !default;
|
|
109
|
+
|
|
110
|
+
// List style position: .list-inside, .list-outside.
|
|
111
|
+
$list-style-position-list: (inside, outside) !default;
|
|
112
|
+
|
|
113
|
+
// Pointer events: .pointer-events-none, .pointer-events-auto.
|
|
114
|
+
$pointer-events-list: (none, auto) !default;
|
|
115
|
+
|
|
116
|
+
// Resize: .resize-none, .resize, .resize-x, .resize-y.
|
|
117
|
+
$resize-list: (none, both, x, y) !default;
|
|
118
|
+
|
|
119
|
+
// User select: .select-none, .select-text, .select-all, .select-auto.
|
|
120
|
+
$user-select-list: (none, text, all, auto) !default;
|
|
121
|
+
|
|
122
|
+
// Scroll behavior: .scroll-auto, .scroll-smooth.
|
|
123
|
+
$scroll-behavior-list: (auto, smooth) !default;
|
|
124
|
+
|
|
125
|
+
// Border style: .border-solid, .border-dashed, etc.
|
|
126
|
+
$border-style-list: (solid, dashed, dotted, double, hidden, none) !default;
|
|
127
|
+
|
|
128
|
+
// Float: .float-left, .float-right, .float-none, etc.
|
|
129
|
+
$float-list: (left, right, none, start, end) !default;
|
|
130
|
+
|
|
131
|
+
// Clear: .clear-left, .clear-right, .clear-both, etc.
|
|
132
|
+
$clear-list: (left, right, both, start, end, none) !default;
|
|
133
|
+
|
|
134
|
+
// Isolation: .isolate, .isolation-auto.
|
|
135
|
+
$isolation-list: (isolate, auto) !default;
|
|
136
|
+
|
|
137
|
+
// Box sizing: .box-border, .box-content.
|
|
138
|
+
$box-sizing-list: (border, content) !default;
|
|
139
|
+
|
|
140
|
+
// Appearance: .appearance-none, .appearance-auto.
|
|
141
|
+
$appearance-list: (none, auto) !default;
|
|
142
|
+
|
|
143
|
+
// Overflow x/y (separate from the main overflow map).
|
|
144
|
+
$overflow-xy-list: (auto, hidden, clip, visible, scroll) !default;
|
|
145
|
+
|
|
146
|
+
// Table layout: .table-auto, .table-fixed.
|
|
147
|
+
$table-layout-list: (auto, fixed) !default;
|
|
148
|
+
|
|
149
|
+
// Border collapse: .border-collapse, .border-separate.
|
|
150
|
+
$border-collapse-list: (collapse, separate) !default;
|
|
151
|
+
|
|
152
|
+
// ============================================================
|
|
153
|
+
// AUTO-EMITTED CLASSES (output as soon as this module loads)
|
|
154
|
+
// These are always present in the stylesheet — no opt-in needed.
|
|
155
|
+
// ============================================================
|
|
156
|
+
|
|
157
|
+
// ── 5. Spacing utilities ──────────────────────────────────
|
|
158
|
+
// Padding: .p-*, .px-*, .py-*, .pt-*, .pr-*, .pb-*, .pl-*
|
|
159
|
+
// Margin: .m-*, .mx-*, .my-*, .mt-*, .mr-*, .mb-*, .ml-*
|
|
160
|
+
// Gap: .gap-*, .gap-x-*, .gap-y-*
|
|
161
|
+
// Fractional keys use kebab notation (p-05 → 0.125rem, p-1-5 → 0.375rem).
|
|
162
|
+
@each $key, $value in $spacing-map {
|
|
163
|
+
.p-#{$key} { padding: $value; }
|
|
164
|
+
.px-#{$key} { padding-left: $value; padding-right: $value; }
|
|
165
|
+
.py-#{$key} { padding-top: $value; padding-bottom: $value; }
|
|
166
|
+
.pt-#{$key} { padding-top: $value; }
|
|
167
|
+
.pr-#{$key} { padding-right: $value; }
|
|
168
|
+
.pb-#{$key} { padding-bottom: $value; }
|
|
169
|
+
.pl-#{$key} { padding-left: $value; }
|
|
170
|
+
.m-#{$key} { margin: $value; }
|
|
171
|
+
.mx-#{$key} { margin-left: $value; margin-right: $value; }
|
|
172
|
+
.my-#{$key} { margin-top: $value; margin-bottom: $value; }
|
|
173
|
+
.mt-#{$key} { margin-top: $value; }
|
|
174
|
+
.mr-#{$key} { margin-right: $value; }
|
|
175
|
+
.mb-#{$key} { margin-bottom: $value; }
|
|
176
|
+
.ml-#{$key} { margin-left: $value; }
|
|
177
|
+
.gap-#{$key} { gap: $value; }
|
|
178
|
+
.gap-x-#{$key} { column-gap: $value; }
|
|
179
|
+
.gap-y-#{$key} { row-gap: $value; }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ── 6. Base effects ───────────────────────────────────────
|
|
183
|
+
// Sensible defaults: .shadow (md), .rounded (0.25rem), .gap (1rem).
|
|
184
|
+
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
|
|
185
|
+
.rounded { border-radius: 0.25rem; }
|
|
186
|
+
.gap { gap: 1rem; }
|
|
187
|
+
|
|
188
|
+
// ── 7. Typography scale ──────────────────────────────────
|
|
189
|
+
// Font sizes: .text-xs (0.75rem) … .text-9xl (8rem).
|
|
190
|
+
@include mx.utils-classes($font-size-map, font-size, "text");
|
|
191
|
+
|
|
192
|
+
// ── 8. Border widths ─────────────────────────────────────
|
|
193
|
+
// .border-0, .border-2, .border-4, .border-8.
|
|
194
|
+
@include mx.utils-classes($border-width-map, border-width, "border");
|
|
195
|
+
|
|
196
|
+
// Base border utility: 1px solid; pair with .border-* color classes.
|
|
197
|
+
.border {
|
|
198
|
+
border-width: 1px;
|
|
199
|
+
border-style: solid;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// ============================================================
|
|
203
|
+
// OPT-IN GENERATORS
|
|
204
|
+
// Mixins that emit their classes only when you call them.
|
|
205
|
+
// generate-all-utilities() emits every group at once.
|
|
206
|
+
// ============================================================
|
|
207
|
+
|
|
208
|
+
// ── 9. Sizing ────────────────────────────────────────────
|
|
209
|
+
// .w-*, .h-*, .min-w-*, .max-w-*, .min-h-*, .max-h-*
|
|
210
|
+
@mixin get-sizing-classes($map: $sizing-map) {
|
|
211
|
+
@include mx.utils-classes($map, width, "w");
|
|
212
|
+
@include mx.utils-classes($map, min-width, "min-w");
|
|
213
|
+
@include mx.utils-classes($map, max-width, "max-w");
|
|
214
|
+
@include mx.utils-classes($map, height, "h");
|
|
215
|
+
@include mx.utils-classes($map, min-height, "min-h");
|
|
216
|
+
@include mx.utils-classes($map, max-height, "max-h");
|
|
217
|
+
@content;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// ── 10. Flex ─────────────────────────────────────────────
|
|
221
|
+
// .flex-row/col, .flex-wrap/nowrap, .items-*, .justify-*
|
|
222
|
+
@mixin generate-flex-utilities(
|
|
223
|
+
$direction: mx.$flex-direction-map, $wrap: mx.$flex-wrap-list,
|
|
224
|
+
$align: mx.$align-items-map, $justify: mx.$justify-content-map
|
|
225
|
+
) {
|
|
226
|
+
@include mx.utils-classes($direction, flex-direction, "flex");
|
|
227
|
+
@include mx.utils-classes($wrap, flex-wrap, "flex");
|
|
228
|
+
@include mx.utils-classes($align, align-items, "items");
|
|
229
|
+
@include mx.utils-classes($justify, justify-content, "justify");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// ── 11. Effects ──────────────────────────────────────────
|
|
233
|
+
// .shadow-*, .rounded-*, .z-*, .duration-*, .ease-*, .opacity-*
|
|
234
|
+
@mixin generate-effects-utilities() {
|
|
235
|
+
@include mx.utils-classes(mx.$shadow-map, box-shadow, "shadow");
|
|
236
|
+
@include mx.utils-classes(mx.$radius-map, border-radius, "rounded");
|
|
237
|
+
@include mx.utils-classes(mx.$z-layers-map, z-index, "z");
|
|
238
|
+
@include mx.utils-classes(mx.$transition-duration-map, transition-duration, "duration");
|
|
239
|
+
@include mx.utils-classes(mx.$transition-timing-map, transition-timing-function, "ease");
|
|
240
|
+
@include mx.utils-classes(mx.$opacity-values, opacity, "opacity");
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// ── 12. Layout ───────────────────────────────────────────
|
|
244
|
+
// Display, position, overflow, overflow-x/y, text-align,
|
|
245
|
+
// font-weight, whitespace, overflow-wrap.
|
|
246
|
+
@mixin generate-layout-utilities() {
|
|
247
|
+
@include mx.utils-classes(mx.$display-values, display);
|
|
248
|
+
@include mx.utils-classes(mx.$position-values, position);
|
|
249
|
+
@include mx.utils-classes(mx.$overflow-values, overflow, "overflow");
|
|
250
|
+
@include mx.utils-classes($overflow-xy-list, overflow-x, "overflow-x");
|
|
251
|
+
@include mx.utils-classes($overflow-xy-list, overflow-y, "overflow-y");
|
|
252
|
+
@include mx.utils-classes(mx.$text-align-values, text-align, "text");
|
|
253
|
+
@include mx.utils-classes(mx.$font-weight-values, font-weight, "font");
|
|
254
|
+
@include mx.utils-classes(mx.$white-space-list, white-space, "whitespace");
|
|
255
|
+
@include mx.utils-classes(mx.$overflow-wrap-list, overflow-wrap, "wrap");
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// ── 13–23. Extended utilities ────────────────────────────
|
|
259
|
+
// Aspect ratio, object fit/position, cursor, visibility,
|
|
260
|
+
// typography extensions, list style, interactivity, border style,
|
|
261
|
+
// float/clear/isolation/box-sizing, tables, grid classes, flex
|
|
262
|
+
// classes, position values.
|
|
263
|
+
// --- NEW GENERATORS (Tailwind parity) ---
|
|
264
|
+
|
|
265
|
+
// Aspect ratio: .aspect-square, .aspect-video, .aspect-auto.
|
|
266
|
+
@mixin generate-aspect-utilities() {
|
|
267
|
+
@include mx.utils-classes($aspect-ratio-map, aspect-ratio, "aspect");
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Object fit + position.
|
|
271
|
+
@mixin generate-object-utilities() {
|
|
272
|
+
@include mx.utils-classes($object-fit-list, object-fit, "object");
|
|
273
|
+
@include mx.utils-classes($object-position-map, object-position, "object");
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Cursor.
|
|
277
|
+
@mixin generate-cursor-utilities() {
|
|
278
|
+
@include mx.utils-classes($cursor-list, cursor, "cursor");
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Visibility.
|
|
282
|
+
@mixin generate-visibility-utilities() {
|
|
283
|
+
@include mx.utils-classes($visibility-list, visibility);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Typography extensions: text-transform, text-decoration, text-overflow,
|
|
287
|
+
// line-height, letter-spacing, font-family.
|
|
288
|
+
@mixin generate-typography-extended-utilities() {
|
|
289
|
+
@include mx.utils-classes($text-transform-list, text-transform);
|
|
290
|
+
@include mx.utils-classes($text-decoration-list, text-decoration-line);
|
|
291
|
+
// .truncate is a special case (text-overflow + overflow + white-space).
|
|
292
|
+
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
293
|
+
.text-ellipsis { text-overflow: ellipsis; }
|
|
294
|
+
.text-clip { text-overflow: clip; }
|
|
295
|
+
@include mx.utils-classes($line-height-map, line-height, "leading");
|
|
296
|
+
@include mx.utils-classes($letter-spacing-map, letter-spacing, "tracking");
|
|
297
|
+
@each $key, $value in $font-family-map {
|
|
298
|
+
.font-#{$key} { font-family: #{list.join($value, (), $separator: comma)}; }
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// List style.
|
|
303
|
+
@mixin generate-list-utilities() {
|
|
304
|
+
@include mx.utils-classes($list-style-type-list, list-style-type, "list");
|
|
305
|
+
@include mx.utils-classes($list-style-position-list, list-style-position, "list");
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Interactivity: pointer-events, resize, user-select, scroll-behavior, appearance.
|
|
309
|
+
@mixin generate-interactivity-utilities() {
|
|
310
|
+
@include mx.utils-classes($pointer-events-list, pointer-events, "pointer-events");
|
|
311
|
+
@each $value in $resize-list {
|
|
312
|
+
.resize-#{$value} { resize: $value; }
|
|
313
|
+
}
|
|
314
|
+
.resize { resize: both; }
|
|
315
|
+
@include mx.utils-classes($user-select-list, user-select, "select");
|
|
316
|
+
@include mx.utils-classes($scroll-behavior-list, scroll-behavior, "scroll");
|
|
317
|
+
@include mx.utils-classes($appearance-list, appearance, "appearance");
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Border style: .border-solid, .border-dashed, etc.
|
|
321
|
+
@mixin generate-border-style-utilities() {
|
|
322
|
+
@include mx.utils-classes($border-style-list, border-style, "border");
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Float and clear.
|
|
326
|
+
@mixin generate-float-utilities() {
|
|
327
|
+
@include mx.utils-classes($float-list, float, "float");
|
|
328
|
+
@include mx.utils-classes($clear-list, clear, "clear");
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// Isolation.
|
|
332
|
+
@mixin generate-isolation-utilities() {
|
|
333
|
+
@include mx.utils-classes($isolation-list, isolation);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// Box sizing: .box-border, .box-content.
|
|
337
|
+
@mixin generate-box-sizing-utilities() {
|
|
338
|
+
@each $value in $box-sizing-list {
|
|
339
|
+
.box-#{$value} { box-sizing: #{$value}-box; }
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Table layout and border collapse.
|
|
344
|
+
@mixin generate-table-utilities() {
|
|
345
|
+
@include mx.utils-classes($table-layout-list, table-layout, "table");
|
|
346
|
+
@include mx.utils-classes($border-collapse-list, border-collapse, "border");
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Grid CSS classes: .grid-cols-1..12, .col-span-1..12, .row-span-1..6, .grid-flow-*, .flex-1/auto/none.
|
|
350
|
+
@mixin generate-grid-flex-classes() {
|
|
351
|
+
// Grid template columns
|
|
352
|
+
@for $i from 1 through 12 {
|
|
353
|
+
.grid-cols-#{$i} { grid-template-columns: repeat(#{$i}, 1fr); }
|
|
354
|
+
}
|
|
355
|
+
.grid-cols-none { grid-template-columns: none; }
|
|
356
|
+
|
|
357
|
+
// Grid column span
|
|
358
|
+
@for $i from 1 through 12 {
|
|
359
|
+
.col-span-#{$i} { grid-column: span #{$i} / span #{$i}; }
|
|
360
|
+
}
|
|
361
|
+
.col-span-full { grid-column: 1 / -1; }
|
|
362
|
+
|
|
363
|
+
// Grid row span
|
|
364
|
+
@for $i from 1 through 6 {
|
|
365
|
+
.row-span-#{$i} { grid-row: span #{$i} / span #{$i}; }
|
|
366
|
+
}
|
|
367
|
+
.row-span-full { grid-row: 1 / -1; }
|
|
368
|
+
|
|
369
|
+
// Grid auto flow
|
|
370
|
+
.grid-flow-row { grid-auto-flow: row; }
|
|
371
|
+
.grid-flow-col { grid-auto-flow: column; }
|
|
372
|
+
.grid-flow-dense { grid-auto-flow: dense; }
|
|
373
|
+
.grid-flow-row-dense { grid-auto-flow: row dense; }
|
|
374
|
+
.grid-flow-col-dense { grid-auto-flow: column dense; }
|
|
375
|
+
|
|
376
|
+
// Flex shorthand
|
|
377
|
+
.flex-1 { flex: 1 1 0%; }
|
|
378
|
+
.flex-auto { flex: 1 1 auto; }
|
|
379
|
+
.flex-initial { flex: 0 1 auto; }
|
|
380
|
+
.flex-none { flex: none; }
|
|
381
|
+
|
|
382
|
+
// Flex grow/shrink
|
|
383
|
+
.grow { flex-grow: 1; }
|
|
384
|
+
.grow-0 { flex-grow: 0; }
|
|
385
|
+
.shrink { flex-shrink: 1; }
|
|
386
|
+
.shrink-0 { flex-shrink: 0; }
|
|
387
|
+
|
|
388
|
+
// Order
|
|
389
|
+
.order-first { order: -9999; }
|
|
390
|
+
.order-last { order: 9999; }
|
|
391
|
+
.order-none { order: 0; }
|
|
392
|
+
@for $i from 1 through 12 {
|
|
393
|
+
.order-#{$i} { order: $i; }
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Container
|
|
397
|
+
.container {
|
|
398
|
+
width: 100%;
|
|
399
|
+
margin-left: auto;
|
|
400
|
+
margin-right: auto;
|
|
401
|
+
max-width: 80rem; // 1280px
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Position values: .top-*, .right-*, .bottom-*, .left-*, .inset-*.
|
|
406
|
+
@mixin generate-position-utilities() {
|
|
407
|
+
// Inset (all sides)
|
|
408
|
+
.inset-0 { inset: 0; }
|
|
409
|
+
.inset-auto { inset: auto; }
|
|
410
|
+
.inset-full { inset: 100%; }
|
|
411
|
+
.inset-px { inset: 1px; }
|
|
412
|
+
.inset-x-0 { left: 0; right: 0; }
|
|
413
|
+
.inset-x-auto { left: auto; right: auto; }
|
|
414
|
+
.inset-y-0 { top: 0; bottom: 0; }
|
|
415
|
+
.inset-y-auto { top: auto; bottom: auto; }
|
|
416
|
+
|
|
417
|
+
// Top/Right/Bottom/Left
|
|
418
|
+
@each $side in (top, right, bottom, left) {
|
|
419
|
+
.#{$side}-0 { #{$side}: 0; }
|
|
420
|
+
.#{$side}-auto { #{$side}: auto; }
|
|
421
|
+
.#{$side}-full { #{$side}: 100%; }
|
|
422
|
+
.#{$side}-px { #{$side}: 1px; }
|
|
423
|
+
@for $i from 1 through 12 {
|
|
424
|
+
.#{$side}-#{$i} { #{$side}: $i * 0.25rem; }
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// Emits every opt-in group at once (used by the main entry point).
|
|
430
|
+
@mixin generate-all-utilities() {
|
|
431
|
+
@include get-sizing-classes();
|
|
432
|
+
@include generate-flex-utilities();
|
|
433
|
+
@include generate-effects-utilities();
|
|
434
|
+
@include generate-layout-utilities();
|
|
435
|
+
@include generate-aspect-utilities();
|
|
436
|
+
@include generate-object-utilities();
|
|
437
|
+
@include generate-cursor-utilities();
|
|
438
|
+
@include generate-visibility-utilities();
|
|
439
|
+
@include generate-typography-extended-utilities();
|
|
440
|
+
@include generate-list-utilities();
|
|
441
|
+
@include generate-interactivity-utilities();
|
|
442
|
+
@include generate-border-style-utilities();
|
|
443
|
+
@include generate-float-utilities();
|
|
444
|
+
@include generate-isolation-utilities();
|
|
445
|
+
@include generate-box-sizing-utilities();
|
|
446
|
+
@include generate-table-utilities();
|
|
447
|
+
@include generate-grid-flex-classes();
|
|
448
|
+
@include generate-position-utilities();
|
|
449
|
+
}
|