@altrex-ui/styling 1.0.2 → 1.0.3

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/dist/tokens.css CHANGED
@@ -137,4 +137,16 @@
137
137
  --altrex-breakpoints-lg: 1024px;
138
138
  --altrex-breakpoints-xl: 1280px;
139
139
  --altrex-breakpoints-2xl: 1536px;
140
+ --altrex-touchTarget-minimum: 44px;
141
+ --altrex-touchTarget-comfortable: 48px;
142
+ --altrex-touchTarget-spacious: 56px;
143
+ --altrex-fluidSpacing-xs: clamp(0.25rem, 1vw, 0.5rem);
144
+ --altrex-fluidSpacing-sm: clamp(0.5rem, 2vw, 1rem);
145
+ --altrex-fluidSpacing-md: clamp(1rem, 3vw, 2rem);
146
+ --altrex-fluidSpacing-lg: clamp(1.5rem, 4vw, 3rem);
147
+ --altrex-fluidSpacing-xl: clamp(2rem, 6vw, 4rem);
148
+ --altrex-fluidTypography-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
149
+ --altrex-fluidTypography-h1: clamp(2rem, 1.5rem + 2.5vw, 3rem);
150
+ --altrex-fluidTypography-h2: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
151
+ --altrex-fluidTypography-h3: clamp(1.25rem, 1.125rem + 0.625vw, 1.75rem);
140
152
  }
package/dist/tokens.d.ts CHANGED
@@ -12,6 +12,9 @@ export const tokens: {
12
12
  borderRadius: Record<string, string>;
13
13
  shadow: Record<string, string>;
14
14
  breakpoints: Record<string, string>;
15
+ touchTarget: Record<string, string>;
16
+ fluidSpacing: Record<string, string>;
17
+ fluidTypography: Record<string, string>;
15
18
  };
16
19
 
17
20
  export const flatTokens: Record<string, string>;
package/dist/tokens.js CHANGED
@@ -186,6 +186,24 @@ export const tokens = {
186
186
  "lg": "1024px",
187
187
  "xl": "1280px",
188
188
  "2xl": "1536px"
189
+ },
190
+ "touchTarget": {
191
+ "minimum": "44px",
192
+ "comfortable": "48px",
193
+ "spacious": "56px"
194
+ },
195
+ "fluidSpacing": {
196
+ "xs": "clamp(0.25rem, 1vw, 0.5rem)",
197
+ "sm": "clamp(0.5rem, 2vw, 1rem)",
198
+ "md": "clamp(1rem, 3vw, 2rem)",
199
+ "lg": "clamp(1.5rem, 4vw, 3rem)",
200
+ "xl": "clamp(2rem, 6vw, 4rem)"
201
+ },
202
+ "fluidTypography": {
203
+ "body": "clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",
204
+ "h1": "clamp(2rem, 1.5rem + 2.5vw, 3rem)",
205
+ "h2": "clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem)",
206
+ "h3": "clamp(1.25rem, 1.125rem + 0.625vw, 1.75rem)"
189
207
  }
190
208
  };
191
209
 
@@ -322,7 +340,19 @@ export const flatTokens = {
322
340
  "breakpoints.md": "768px",
323
341
  "breakpoints.lg": "1024px",
324
342
  "breakpoints.xl": "1280px",
325
- "breakpoints.2xl": "1536px"
343
+ "breakpoints.2xl": "1536px",
344
+ "touchTarget.minimum": "44px",
345
+ "touchTarget.comfortable": "48px",
346
+ "touchTarget.spacious": "56px",
347
+ "fluidSpacing.xs": "clamp(0.25rem, 1vw, 0.5rem)",
348
+ "fluidSpacing.sm": "clamp(0.5rem, 2vw, 1rem)",
349
+ "fluidSpacing.md": "clamp(1rem, 3vw, 2rem)",
350
+ "fluidSpacing.lg": "clamp(1.5rem, 4vw, 3rem)",
351
+ "fluidSpacing.xl": "clamp(2rem, 6vw, 4rem)",
352
+ "fluidTypography.body": "clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",
353
+ "fluidTypography.h1": "clamp(2rem, 1.5rem + 2.5vw, 3rem)",
354
+ "fluidTypography.h2": "clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem)",
355
+ "fluidTypography.h3": "clamp(1.25rem, 1.125rem + 0.625vw, 1.75rem)"
326
356
  };
327
357
 
328
358
  export const cssVarNames = {
@@ -458,5 +488,17 @@ export const cssVarNames = {
458
488
  "breakpoints.md": "--altrex-breakpoints-md",
459
489
  "breakpoints.lg": "--altrex-breakpoints-lg",
460
490
  "breakpoints.xl": "--altrex-breakpoints-xl",
461
- "breakpoints.2xl": "--altrex-breakpoints-2xl"
491
+ "breakpoints.2xl": "--altrex-breakpoints-2xl",
492
+ "touchTarget.minimum": "--altrex-touchTarget-minimum",
493
+ "touchTarget.comfortable": "--altrex-touchTarget-comfortable",
494
+ "touchTarget.spacious": "--altrex-touchTarget-spacious",
495
+ "fluidSpacing.xs": "--altrex-fluidSpacing-xs",
496
+ "fluidSpacing.sm": "--altrex-fluidSpacing-sm",
497
+ "fluidSpacing.md": "--altrex-fluidSpacing-md",
498
+ "fluidSpacing.lg": "--altrex-fluidSpacing-lg",
499
+ "fluidSpacing.xl": "--altrex-fluidSpacing-xl",
500
+ "fluidTypography.body": "--altrex-fluidTypography-body",
501
+ "fluidTypography.h1": "--altrex-fluidTypography-h1",
502
+ "fluidTypography.h2": "--altrex-fluidTypography-h2",
503
+ "fluidTypography.h3": "--altrex-fluidTypography-h3"
462
504
  };
package/dist/tokens.styl CHANGED
@@ -136,6 +136,18 @@ $altrex-breakpoints-md = 768px
136
136
  $altrex-breakpoints-lg = 1024px
137
137
  $altrex-breakpoints-xl = 1280px
138
138
  $altrex-breakpoints-2xl = 1536px
139
+ $altrex-touchTarget-minimum = 44px
140
+ $altrex-touchTarget-comfortable = 48px
141
+ $altrex-touchTarget-spacious = 56px
142
+ $altrex-fluidSpacing-xs = clamp(0.25rem, 1vw, 0.5rem)
143
+ $altrex-fluidSpacing-sm = clamp(0.5rem, 2vw, 1rem)
144
+ $altrex-fluidSpacing-md = clamp(1rem, 3vw, 2rem)
145
+ $altrex-fluidSpacing-lg = clamp(1.5rem, 4vw, 3rem)
146
+ $altrex-fluidSpacing-xl = clamp(2rem, 6vw, 4rem)
147
+ $altrex-fluidTypography-body = clamp(1rem, 0.95rem + 0.25vw, 1.125rem)
148
+ $altrex-fluidTypography-h1 = clamp(2rem, 1.5rem + 2.5vw, 3rem)
149
+ $altrex-fluidTypography-h2 = clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem)
150
+ $altrex-fluidTypography-h3 = clamp(1.25rem, 1.125rem + 0.625vw, 1.75rem)
139
151
 
140
152
  // Component-specific tokens
141
153
  $altrex-border-radius-button-default = $altrex-borderRadius-default
@@ -170,3 +182,48 @@ altrex-icon-xl()
170
182
  altrex-icon-xxl()
171
183
  height: 64px
172
184
  width: 64px
185
+
186
+ // Mobile-first breakpoint mixin
187
+ // Usage: +above('md') { /* styles */ }
188
+ above(breakpoint)
189
+ @media (min-width: lookup('$altrex-breakpoints-' + breakpoint))
190
+ {block}
191
+
192
+ // Touch-first interaction detection
193
+ // Usage: +touch-device() { /* styles */ }
194
+ touch-device()
195
+ @media (hover: none) and (pointer: coarse)
196
+ {block}
197
+
198
+ // Touch target sizing (WCAG 2.1 Level AAA)
199
+ // Usage: touch-target() or touch-target('comfortable')
200
+ touch-target(size = 'minimum')
201
+ min-width: lookup('$altrex-touchTarget-' + size)
202
+ min-height: lookup('$altrex-touchTarget-' + size)
203
+ display: inline-flex
204
+ align-items: center
205
+ justify-content: center
206
+
207
+ // Container with mobile padding
208
+ // Usage: container-width() or container-width($altrex-breakpoints-lg)
209
+ container-width(max-width = '100%')
210
+ width: 100%
211
+ max-width: max-width
212
+ margin-left: auto
213
+ margin-right: auto
214
+ padding-left: $altrex-spacing-4
215
+ padding-right: $altrex-spacing-4
216
+
217
+ +above('md')
218
+ padding-left: $altrex-spacing-6
219
+ padding-right: $altrex-spacing-6
220
+
221
+ // Stack to row pattern
222
+ // Usage: stack-to-row() or stack-to-row('lg')
223
+ stack-to-row(breakpoint = 'md')
224
+ display: flex
225
+ flex-direction: column
226
+ gap: $altrex-spacing-4
227
+
228
+ +above(breakpoint)
229
+ flex-direction: row
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altrex-ui/styling",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Core design tokens for the Altrex design system",
5
5
  "main": "dist/index.js",
6
6
  "exports": {