@ethlete/core 5.0.0-next.63 → 5.0.0-next.65

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.
@@ -1,5 +1,6 @@
1
1
  import { formatFiles, logger, visitNotIgnoredFiles } from '@nx/devkit';
2
2
  import { Project, SyntaxKind } from 'ts-morph';
3
+ import { cssThemeName, surfaceThemeCss } from '../../design/theme-css.js';
3
4
  export default async function generate(tree, schema) {
4
5
  logger.log('\nšŸ”„ Starting Tailwind 4 surface theme generator...\n');
5
6
  const themesPath = schema.themesPath || 'src/surface-themes.ts';
@@ -293,8 +294,8 @@ function parseSurfaceThemeObject(obj, sourceFile) {
293
294
  // flags on themes of that type. Matches the theme's name or its CSS-safe form. Themes of
294
295
  // the other type keep their flags. Returns the resolved name.
295
296
  function applyDefaultSurfaceThemeOverride(themes, defaultTheme, type) {
296
- const wanted = createCssSurfaceName(defaultTheme);
297
- const matches = themes.filter((t) => t.name === defaultTheme || createCssSurfaceName(t.name) === wanted);
297
+ const wanted = cssThemeName(defaultTheme);
298
+ const matches = themes.filter((t) => t.name === defaultTheme || cssThemeName(t.name) === wanted);
298
299
  const target = matches.find((t) => t.type === type);
299
300
  if (!target) {
300
301
  const [firstMatch] = matches;
@@ -329,12 +330,6 @@ function validateSurfaceThemeConfiguration(themes) {
329
330
  }
330
331
  //#endregion
331
332
  //#region CSS Generation
332
- function createCssSurfaceName(name) {
333
- return name
334
- .toLowerCase()
335
- .replace(/\s+/g, '-')
336
- .replace(/[^a-z0-9-]/g, '');
337
- }
338
333
  function generateSurfaceThemeNameTypes(themes, schema) {
339
334
  const themesPath = schema.themesPath || 'src/surface-themes.ts';
340
335
  const outputPath = schema.outputPath || 'src/styles/generated-tailwind-surface-themes.css';
@@ -358,8 +353,6 @@ export {};
358
353
  `;
359
354
  }
360
355
  function generateSurfaceThemeCss(themes, utilityPrefix, runtimePrefix, schema) {
361
- const tailwindVars = [];
362
- const themeVars = [];
363
356
  const themesPath = schema.themesPath || 'src/surface-themes.ts';
364
357
  const outputPath = schema.outputPath || 'src/styles/generated-tailwind-surface-themes.css';
365
358
  const header = `/*
@@ -372,220 +365,7 @@ function generateSurfaceThemeCss(themes, utilityPrefix, runtimePrefix, schema) {
372
365
  */
373
366
 
374
367
  `;
375
- // Static Tailwind @theme block - one color set per surface theme
376
- for (const theme of themes) {
377
- const name = createCssSurfaceName(theme.name);
378
- tailwindVars.push(` /* ${theme.name} surface */`);
379
- tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-bg: rgb(${theme.background});`);
380
- tailwindVars.push(` --color-${utilityPrefix}-surface-${name}: rgb(${theme.color});`);
381
- tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-muted: rgb(${theme.colorMuted});`);
382
- tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-subtle: rgb(${theme.colorSubtle});`);
383
- tailwindVars.push(` --color-${utilityPrefix}-surface-${name}-border: rgb(${theme.border});`);
384
- if (theme.interactionColor) {
385
- const { color, onColor, inkColor } = theme.interactionColor;
386
- pushStaticInteractionColors(tailwindVars, `--color-${utilityPrefix}-surface-${name}-interaction`, color);
387
- if (onColor) {
388
- pushStaticInteractionColors(tailwindVars, `--color-${utilityPrefix}-surface-${name}-on-interaction`, onColor);
389
- }
390
- if (inkColor) {
391
- pushStaticInteractionColors(tailwindVars, `--color-${utilityPrefix}-surface-${name}-interaction-ink`, inkColor);
392
- }
393
- }
394
- tailwindVars.push('');
395
- }
396
- // Dynamic surface colors (reference runtime CSS variables).
397
- // These are ALSO re-declared on every surface selector in the alias block below. A Tailwind
398
- // `@theme` variable only lands on `:root`, so `rgb(var(--<runtime>-surface-*))` resolves once
399
- // against the root surface and inherits that concrete color into descendants - which means
400
- // `bg-<prefix>-surface-*` utilities would ignore nested surface scopes (e.g. an elevated
401
- // surface). Re-declaring them per surface selector makes the utilities resolve against the
402
- // nearest surface instead.
403
- const dynamicSurfaceColors = buildDynamicSurfaceColors(utilityPrefix, runtimePrefix);
404
- tailwindVars.push(' /* Dynamic surface colors (references runtime CSS variables) */');
405
- tailwindVars.push(...dynamicSurfaceColors.map((decl) => ` ${decl}`));
406
- // Runtime CSS - theme selector classes
407
- for (const theme of themes) {
408
- const name = createCssSurfaceName(theme.name);
409
- const isDefault = theme.isDefault;
410
- if (isDefault) {
411
- const selectors = [`.${runtimePrefix}-surface--default-${theme.type}`, `.${runtimePrefix}-surface--${name}`];
412
- themeVars.push(`${selectors.join(', ')} {`);
413
- }
414
- else {
415
- themeVars.push(`.${runtimePrefix}-surface--${name} {`);
416
- }
417
- pushSurfaceVars(themeVars, runtimePrefix, theme, ' ');
418
- themeVars.push('}\n');
419
- }
420
- // Root defaults - apply the default surface vars to :root
421
- const defaultLight = themes.find((t) => t.isDefault && t.type === 'light');
422
- const defaultDark = themes.find((t) => t.isDefault && t.type === 'dark');
423
- if (defaultLight && defaultDark) {
424
- pushSchemeSurfaceVars(themeVars, runtimePrefix, defaultLight);
425
- pushSchemeSurfaceVars(themeVars, runtimePrefix, defaultDark);
426
- }
427
- else {
428
- // A single registered surface type has no other scheme to switch to, so its default must
429
- // land on :root unconditionally - behind prefers-color-scheme it would leave every surface
430
- // variable undefined for users whose OS asks for the scheme the app lacks.
431
- pushRootSurfaceVars(themeVars, runtimePrefix, defaultLight ?? defaultDark);
432
- }
433
- // Convenience var aliases - available on any element with a surface class or :root (via media queries)
434
- const aliasBlock = `/* Convenience aliases (rgb + solid variants) */
435
- @layer base {
436
- :root, :where([class*="${runtimePrefix}-surface--"]) {
437
- --${runtimePrefix}-surface-background-rgb: var(--${runtimePrefix}-surface-background);
438
- --${runtimePrefix}-surface-background-solid: rgb(var(--${runtimePrefix}-surface-background-rgb));
439
-
440
- --${runtimePrefix}-surface-color-rgb: var(--${runtimePrefix}-surface-color);
441
- --${runtimePrefix}-surface-color-solid: rgb(var(--${runtimePrefix}-surface-color-rgb));
442
-
443
- --${runtimePrefix}-surface-color-muted-rgb: var(--${runtimePrefix}-surface-color-muted);
444
- --${runtimePrefix}-surface-color-muted-solid: rgb(var(--${runtimePrefix}-surface-color-muted-rgb));
445
-
446
- --${runtimePrefix}-surface-color-subtle-rgb: var(--${runtimePrefix}-surface-color-subtle);
447
- --${runtimePrefix}-surface-color-subtle-solid: rgb(var(--${runtimePrefix}-surface-color-subtle-rgb));
448
-
449
- --${runtimePrefix}-surface-border-rgb: var(--${runtimePrefix}-surface-border);
450
- --${runtimePrefix}-surface-border-solid: rgb(var(--${runtimePrefix}-surface-border-rgb));
451
-
452
- --${runtimePrefix}-surface-interaction-rgb: var(--${runtimePrefix}-surface-interaction);
453
- --${runtimePrefix}-surface-interaction-solid: rgb(var(--${runtimePrefix}-surface-interaction-rgb));
454
-
455
- --${runtimePrefix}-surface-interaction-hover-rgb: var(--${runtimePrefix}-surface-interaction-hover);
456
- --${runtimePrefix}-surface-interaction-hover-solid: rgb(var(--${runtimePrefix}-surface-interaction-hover-rgb));
457
-
458
- --${runtimePrefix}-surface-interaction-focus-rgb: var(--${runtimePrefix}-surface-interaction-focus);
459
- --${runtimePrefix}-surface-interaction-focus-solid: rgb(var(--${runtimePrefix}-surface-interaction-focus-rgb));
460
-
461
- --${runtimePrefix}-surface-interaction-active-rgb: var(--${runtimePrefix}-surface-interaction-active);
462
- --${runtimePrefix}-surface-interaction-active-solid: rgb(var(--${runtimePrefix}-surface-interaction-active-rgb));
463
-
464
- --${runtimePrefix}-surface-interaction-disabled-rgb: var(--${runtimePrefix}-surface-interaction-disabled);
465
- --${runtimePrefix}-surface-interaction-disabled-solid: rgb(var(--${runtimePrefix}-surface-interaction-disabled-rgb));
466
-
467
- /* Dynamic Tailwind surface colors - re-declared per surface scope so that
468
- bg-${utilityPrefix}-surface-* utilities resolve against the nearest surface
469
- (e.g. a nested elevated surface) instead of the value computed once at :root. */
470
- ${dynamicSurfaceColors.map((decl) => ` ${decl}`).join('\n')}
471
- }
472
- }
473
- `;
474
- return `${header}@theme {
475
- ${tailwindVars.join('\n')}
476
- }
477
-
478
- @layer base {
479
- ${themeVars.join('\n')}
480
- }
481
-
482
- ${aliasBlock}
483
- ${buildSurfaceColorScope(runtimePrefix)}`;
484
- }
485
- // The reserved `surface` color scope. It bridges the two theming systems - color variables out of
486
- // surface variables - so `[etProvideColor]="'surface'"` renders a component in the neutral of
487
- // whatever surface it sits on. It lives here rather than in the SDK's own CSS because a stylesheet
488
- // shipped with `ProvideColorDirective` would land in every bundle that themes anything, and only
489
- // apps that use the scope should pay for it.
490
- function buildSurfaceColorScope(runtimePrefix) {
491
- const tint = `var(--${runtimePrefix}-surface-interaction, var(--${runtimePrefix}-surface-color))`;
492
- const on = `var(--${runtimePrefix}-surface-on-interaction, var(--${runtimePrefix}-surface-background))`;
493
- const ink = `var(--${runtimePrefix}-surface-interaction-ink, var(--${runtimePrefix}-surface-color))`;
494
- const state = (name, source, fallback) => INTERACTION_STATE_SUFFIXES.map((suffix) => ` --${runtimePrefix}-color-${name}${suffix}: ${suffix ? `var(--${runtimePrefix}-surface-${source}${suffix}, ${fallback})` : fallback};`).join('\n');
495
- return `/* The reserved \`surface\` color: resolves the color tokens from the ambient surface's neutral swatch. */
496
- @layer base {
497
- .${runtimePrefix}-color--surface {
498
- ${state('primary', 'interaction', tint)}
499
-
500
- ${state('on-primary', 'on-interaction', on)}
501
-
502
- ${state('primary-ink', 'interaction-ink', ink)}
503
- }
504
- }
505
- `;
506
- }
507
- // Dynamic surface color declarations (unindented). Emitted in `@theme` (so Tailwind generates
508
- // the utilities) and re-declared on every surface selector (so the utilities resolve per scope).
509
- function buildDynamicSurfaceColors(utilityPrefix, runtimePrefix) {
510
- // `on-interaction` and `interaction-ink` are optional per theme, so each falls back to the
511
- // surface's own background/color - the same defaults the `.<runtimePrefix>-color--surface`
512
- // bridge applies.
513
- const onFallback = `var(--${runtimePrefix}-surface-background)`;
514
- const inkFallback = `var(--${runtimePrefix}-surface-color)`;
515
- return [
516
- `--color-${utilityPrefix}-surface-bg: rgb(var(--${runtimePrefix}-surface-background));`,
517
- `--color-${utilityPrefix}-surface: rgb(var(--${runtimePrefix}-surface-color));`,
518
- `--color-${utilityPrefix}-surface-muted: rgb(var(--${runtimePrefix}-surface-color-muted));`,
519
- `--color-${utilityPrefix}-surface-subtle: rgb(var(--${runtimePrefix}-surface-color-subtle));`,
520
- `--color-${utilityPrefix}-surface-border: rgb(var(--${runtimePrefix}-surface-border));`,
521
- `--color-${utilityPrefix}-surface-interaction: rgb(var(--${runtimePrefix}-surface-interaction));`,
522
- `--color-${utilityPrefix}-surface-interaction-hover: rgb(var(--${runtimePrefix}-surface-interaction-hover));`,
523
- `--color-${utilityPrefix}-surface-interaction-focus: rgb(var(--${runtimePrefix}-surface-interaction-focus));`,
524
- `--color-${utilityPrefix}-surface-interaction-active: rgb(var(--${runtimePrefix}-surface-interaction-active));`,
525
- `--color-${utilityPrefix}-surface-interaction-disabled: rgb(var(--${runtimePrefix}-surface-interaction-disabled));`,
526
- ...INTERACTION_STATE_SUFFIXES.map((suffix) => `--color-${utilityPrefix}-surface-on-interaction${suffix}: rgb(var(--${runtimePrefix}-surface-on-interaction${suffix}, ${onFallback}));`),
527
- ...INTERACTION_STATE_SUFFIXES.map((suffix) => `--color-${utilityPrefix}-surface-interaction-ink${suffix}: rgb(var(--${runtimePrefix}-surface-interaction-ink${suffix}, ${inkFallback}));`),
528
- ];
529
- }
530
- const INTERACTION_STATE_SUFFIXES = ['', '-hover', '-focus', '-active', '-disabled'];
531
- // Fills the optional states from the ones that are set, matching how the color theme generator
532
- // resolves a swatch: hover falls back to default, focus to hover, active and disabled to default.
533
- function resolveInteractionStates(map) {
534
- const hover = map.hover || map.default;
535
- return {
536
- '': map.default,
537
- '-hover': hover,
538
- '-focus': map.focus || hover,
539
- '-active': map.active || map.default,
540
- '-disabled': map.disabled || map.default,
541
- };
542
- }
543
- function pushStaticInteractionColors(vars, name, map) {
544
- const states = resolveInteractionStates(map);
545
- for (const suffix of INTERACTION_STATE_SUFFIXES) {
546
- vars.push(` ${name}${suffix}: rgb(${states[suffix]});`);
547
- }
548
- }
549
- function pushRuntimeInteractionVars(vars, name, map, indent) {
550
- const states = resolveInteractionStates(map);
551
- for (const suffix of INTERACTION_STATE_SUFFIXES) {
552
- vars.push(`${indent}${name}${suffix}: ${states[suffix]};`);
553
- }
554
- }
555
- function pushRootSurfaceVars(vars, runtimePrefix, theme) {
556
- if (!theme)
557
- return;
558
- vars.push(`:root {`);
559
- pushSurfaceVars(vars, runtimePrefix, theme, ' ');
560
- vars.push(` color-scheme: ${theme.type};`);
561
- vars.push(`}\n`);
562
- }
563
- function pushSchemeSurfaceVars(vars, runtimePrefix, theme) {
564
- vars.push(`@media (prefers-color-scheme: ${theme.type}) {`);
565
- vars.push(` :root {`);
566
- pushSurfaceVars(vars, runtimePrefix, theme, ' ');
567
- vars.push(` color-scheme: ${theme.type};`);
568
- vars.push(` }`);
569
- vars.push(`}\n`);
570
- }
571
- function pushSurfaceVars(vars, runtimePrefix, theme, indent) {
572
- vars.push(`${indent}--${runtimePrefix}-surface-background: ${theme.background};`);
573
- vars.push(`${indent}--${runtimePrefix}-surface-color: ${theme.color};`);
574
- vars.push(`${indent}--${runtimePrefix}-surface-color-muted: ${theme.colorMuted};`);
575
- vars.push(`${indent}--${runtimePrefix}-surface-color-subtle: ${theme.colorSubtle};`);
576
- vars.push(`${indent}--${runtimePrefix}-surface-border: ${theme.border};`);
577
- vars.push(`${indent}--${runtimePrefix}-surface-type: ${theme.type};`);
578
- vars.push(`${indent}--${runtimePrefix}-surface-elevation: ${theme.elevation};`);
579
- if (theme.interactionColor) {
580
- const { color, onColor, inkColor } = theme.interactionColor;
581
- pushRuntimeInteractionVars(vars, `--${runtimePrefix}-surface-interaction`, color, indent);
582
- if (onColor) {
583
- pushRuntimeInteractionVars(vars, `--${runtimePrefix}-surface-on-interaction`, onColor, indent);
584
- }
585
- if (inkColor) {
586
- pushRuntimeInteractionVars(vars, `--${runtimePrefix}-surface-interaction-ink`, inkColor, indent);
587
- }
588
- }
368
+ return `${header}${surfaceThemeCss(themes, { prefix: utilityPrefix, runtimePrefix })}`;
589
369
  }
590
370
  function findMainStylesFile(tree) {
591
371
  const potentialFiles = [];
package/package.json CHANGED
@@ -1,8 +1,23 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "5.0.0-next.63",
3
+ "version": "5.0.0-next.65",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/ethlete-io/ethdk",
7
+ "directory": "libs/core"
8
+ },
4
9
  "license": "MIT",
5
10
  "sideEffects": false,
11
+ "exports": {
12
+ "./design/*": "./design/*.ts",
13
+ "./package.json": {
14
+ "default": "./package.json"
15
+ },
16
+ ".": {
17
+ "types": "./types/ethlete-core.d.ts",
18
+ "default": "./fesm2022/ethlete-core.mjs"
19
+ }
20
+ },
6
21
  "peerDependencies": {
7
22
  "@angular/common": "^22.1.0",
8
23
  "@angular/core": "^22.1.0",
@@ -33,15 +48,6 @@
33
48
  "generators": "./generators/generators.json",
34
49
  "module": "fesm2022/ethlete-core.mjs",
35
50
  "typings": "types/ethlete-core.d.ts",
36
- "exports": {
37
- "./package.json": {
38
- "default": "./package.json"
39
- },
40
- ".": {
41
- "types": "./types/ethlete-core.d.ts",
42
- "default": "./fesm2022/ethlete-core.mjs"
43
- }
44
- },
45
51
  "type": "module",
46
52
  "dependencies": {
47
53
  "tslib": "^2.3.0"
@@ -0,0 +1,155 @@
1
+ /** Values from https://github.com/argyleink/open-props (MIT). */
2
+ @layer components {
3
+ :where(html) {
4
+ --ease-1: cubic-bezier(0.25, 0, 0.5, 1);
5
+ --ease-2: cubic-bezier(0.25, 0, 0.4, 1);
6
+ --ease-3: cubic-bezier(0.25, 0, 0.3, 1);
7
+ --ease-4: cubic-bezier(0.25, 0, 0.2, 1);
8
+ --ease-5: cubic-bezier(0.25, 0, 0.1, 1);
9
+ --ease-in-1: cubic-bezier(0.25, 0, 1, 1);
10
+ --ease-in-2: cubic-bezier(0.5, 0, 1, 1);
11
+ --ease-in-3: cubic-bezier(0.7, 0, 1, 1);
12
+ --ease-in-4: cubic-bezier(0.9, 0, 1, 1);
13
+ --ease-in-5: cubic-bezier(1, 0, 1, 1);
14
+ --ease-out-1: cubic-bezier(0, 0, 0.75, 1);
15
+ --ease-out-2: cubic-bezier(0, 0, 0.5, 1);
16
+ --ease-out-3: cubic-bezier(0, 0, 0.3, 1);
17
+ --ease-out-4: cubic-bezier(0, 0, 0.1, 1);
18
+ --ease-out-5: cubic-bezier(0, 0, 0, 1);
19
+ --ease-in-out-1: cubic-bezier(0.1, 0, 0.9, 1);
20
+ --ease-in-out-2: cubic-bezier(0.3, 0, 0.7, 1);
21
+ --ease-in-out-3: cubic-bezier(0.5, 0, 0.5, 1);
22
+ --ease-in-out-4: cubic-bezier(0.7, 0, 0.3, 1);
23
+ --ease-in-out-5: cubic-bezier(0.9, 0, 0.1, 1);
24
+ --ease-elastic-1: cubic-bezier(0.5, 0.75, 0.75, 1.25);
25
+ --ease-elastic-2: cubic-bezier(0.5, 1, 0.75, 1.25);
26
+ --ease-elastic-3: cubic-bezier(0.5, 1.25, 0.75, 1.25);
27
+ --ease-elastic-4: cubic-bezier(0.5, 1.5, 0.75, 1.25);
28
+ --ease-elastic-5: cubic-bezier(0.5, 1.75, 0.75, 1.25);
29
+ --ease-squish-1: cubic-bezier(0.5, -0.1, 0.1, 1.5);
30
+ --ease-squish-2: cubic-bezier(0.5, -0.3, 0.1, 1.5);
31
+ --ease-squish-3: cubic-bezier(0.5, -0.5, 0.1, 1.5);
32
+ --ease-squish-4: cubic-bezier(0.5, -0.7, 0.1, 1.5);
33
+ --ease-squish-5: cubic-bezier(0.5, -0.9, 0.1, 1.5);
34
+ --ease-step-1: steps(2);
35
+ --ease-step-2: steps(3);
36
+ --ease-step-3: steps(4);
37
+ --ease-step-4: steps(7);
38
+ --ease-step-5: steps(10);
39
+ --ease-spring-1: linear(
40
+ 0,
41
+ 0.006,
42
+ 0.025 2.8%,
43
+ 0.101 6.1%,
44
+ 0.539 18.9%,
45
+ 0.721 25.3%,
46
+ 0.849 31.5%,
47
+ 0.937 38.1%,
48
+ 0.968 41.8%,
49
+ 0.991 45.7%,
50
+ 1.006 50.1%,
51
+ 1.015 55%,
52
+ 1.017 63.9%,
53
+ 1.001
54
+ );
55
+ --ease-spring-2: linear(
56
+ 0,
57
+ 0.007,
58
+ 0.029 2.2%,
59
+ 0.118 4.7%,
60
+ 0.625 14.4%,
61
+ 0.826 19%,
62
+ 0.902,
63
+ 0.962,
64
+ 1.008 26.1%,
65
+ 1.041 28.7%,
66
+ 1.064 32.1%,
67
+ 1.07 36%,
68
+ 1.061 40.5%,
69
+ 1.015 53.4%,
70
+ 0.999 61.6%,
71
+ 0.995 71.2%,
72
+ 1
73
+ );
74
+ --ease-spring-3: linear(
75
+ 0,
76
+ 0.009,
77
+ 0.035 2.1%,
78
+ 0.141 4.4%,
79
+ 0.723 12.9%,
80
+ 0.938 16.7%,
81
+ 1.017,
82
+ 1.077,
83
+ 1.121,
84
+ 1.149 24.3%,
85
+ 1.159,
86
+ 1.163,
87
+ 1.161,
88
+ 1.154 29.9%,
89
+ 1.129 32.8%,
90
+ 1.051 39.6%,
91
+ 1.017 43.1%,
92
+ 0.991,
93
+ 0.977 51%,
94
+ 0.974 53.8%,
95
+ 0.975 57.1%,
96
+ 0.997 69.8%,
97
+ 1.003 76.9%,
98
+ 1
99
+ );
100
+ --ease-spring-4: linear(
101
+ 0,
102
+ 0.009,
103
+ 0.037 1.7%,
104
+ 0.153 3.6%,
105
+ 0.776 10.3%,
106
+ 1.001,
107
+ 1.142 16%,
108
+ 1.185,
109
+ 1.209 19%,
110
+ 1.215 19.9% 20.8%,
111
+ 1.199,
112
+ 1.165 25%,
113
+ 1.056 30.3%,
114
+ 1.008 33%,
115
+ 0.973,
116
+ 0.955 39.2%,
117
+ 0.953 41.1%,
118
+ 0.957 43.3%,
119
+ 0.998 53.3%,
120
+ 1.009 59.1% 63.7%,
121
+ 0.998 78.9%,
122
+ 1
123
+ );
124
+ --ease-spring-5: linear(
125
+ 0,
126
+ 0.01,
127
+ 0.04 1.6%,
128
+ 0.161 3.3%,
129
+ 0.816 9.4%,
130
+ 1.046,
131
+ 1.189 14.4%,
132
+ 1.231,
133
+ 1.254 17%,
134
+ 1.259,
135
+ 1.257 18.6%,
136
+ 1.236,
137
+ 1.194 22.3%,
138
+ 1.057 27%,
139
+ 0.999 29.4%,
140
+ 0.955 32.1%,
141
+ 0.942,
142
+ 0.935 34.9%,
143
+ 0.933,
144
+ 0.939 38.4%,
145
+ 1 47.3%,
146
+ 1.011,
147
+ 1.017 52.6%,
148
+ 1.016 56.4%,
149
+ 1 65.2%,
150
+ 0.996 70.2%,
151
+ 1.001 87.2%,
152
+ 1
153
+ );
154
+ }
155
+ }
@@ -0,0 +1,13 @@
1
+ @layer components {
2
+ .et-visually-hidden {
3
+ position: absolute;
4
+ inline-size: 1px;
5
+ block-size: 1px;
6
+ margin: -1px;
7
+ padding: 0;
8
+ overflow: hidden;
9
+ clip-path: inset(50%);
10
+ white-space: nowrap;
11
+ border: 0;
12
+ }
13
+ }
@@ -0,0 +1,137 @@
1
+ @layer components {
2
+ @property --et-resize-handles-z-index {
3
+ syntax: '<integer>';
4
+ inherits: true;
5
+ initial-value: 10;
6
+ }
7
+
8
+ @property --et-resize-handles-edge-size {
9
+ syntax: '<length>';
10
+ inherits: true;
11
+ initial-value: 6px;
12
+ }
13
+
14
+ @property --et-resize-handles-corner-size {
15
+ syntax: '<length>';
16
+ inherits: true;
17
+ initial-value: 12px;
18
+ }
19
+
20
+ @property --et-resize-handles-edge-inset {
21
+ syntax: '<length>';
22
+ inherits: true;
23
+ initial-value: 8px;
24
+ }
25
+
26
+ @property --et-resize-handles-outset {
27
+ syntax: '<length>';
28
+ inherits: true;
29
+ initial-value: 0px;
30
+ }
31
+
32
+ @property --et-resize-handles-side-top {
33
+ syntax: '<length>';
34
+ inherits: true;
35
+ initial-value: 0px;
36
+ }
37
+
38
+ @property --et-resize-handles-side-bottom {
39
+ syntax: '<length>';
40
+ inherits: true;
41
+ initial-value: 8px;
42
+ }
43
+
44
+ @property --et-resize-handles-touch-edge-size {
45
+ syntax: '<length>';
46
+ inherits: true;
47
+ initial-value: 20px;
48
+ }
49
+
50
+ @property --et-resize-handles-touch-corner-size {
51
+ syntax: '<length>';
52
+ inherits: true;
53
+ initial-value: 28px;
54
+ }
55
+
56
+ .et-resize-handles {
57
+ position: absolute;
58
+ inset: calc(-1 * var(--et-resize-handles-outset));
59
+ pointer-events: none;
60
+ }
61
+
62
+ .et-resize-handle {
63
+ --et-resize-handle-thickness: calc(var(--et-resize-handles-edge-size) + var(--et-resize-handles-outset));
64
+ --et-resize-handle-corner: calc(var(--et-resize-handles-corner-size) + var(--et-resize-handles-outset));
65
+
66
+ position: absolute;
67
+ z-index: var(--et-resize-handles-z-index);
68
+ touch-action: none;
69
+ pointer-events: auto;
70
+ }
71
+
72
+ .et-resize-handle--n {
73
+ top: 0;
74
+ right: var(--et-resize-handles-edge-inset);
75
+ left: var(--et-resize-handles-edge-inset);
76
+ height: var(--et-resize-handle-thickness);
77
+ }
78
+
79
+ .et-resize-handle--s {
80
+ right: var(--et-resize-handles-edge-inset);
81
+ bottom: 0;
82
+ left: var(--et-resize-handles-edge-inset);
83
+ height: var(--et-resize-handle-thickness);
84
+ }
85
+
86
+ .et-resize-handle--e,
87
+ .et-resize-handle--w {
88
+ top: var(--et-resize-handles-side-top);
89
+ bottom: var(--et-resize-handles-side-bottom);
90
+ width: var(--et-resize-handle-thickness);
91
+ }
92
+
93
+ .et-resize-handle--e {
94
+ right: 0;
95
+ }
96
+
97
+ .et-resize-handle--w {
98
+ left: 0;
99
+ }
100
+
101
+ .et-resize-handle--ne,
102
+ .et-resize-handle--nw {
103
+ top: 0;
104
+ width: var(--et-resize-handle-corner);
105
+ height: var(--et-resize-handle-corner);
106
+ }
107
+
108
+ .et-resize-handle--ne {
109
+ right: 0;
110
+ }
111
+
112
+ .et-resize-handle--nw {
113
+ left: 0;
114
+ }
115
+
116
+ .et-resize-handle--se,
117
+ .et-resize-handle--sw {
118
+ bottom: 0;
119
+ width: var(--et-resize-handle-corner);
120
+ height: var(--et-resize-handle-corner);
121
+ }
122
+
123
+ .et-resize-handle--se {
124
+ right: 0;
125
+ }
126
+
127
+ .et-resize-handle--sw {
128
+ left: 0;
129
+ }
130
+
131
+ @media (any-pointer: coarse) {
132
+ .et-resize-handle {
133
+ --et-resize-handle-thickness: calc(var(--et-resize-handles-touch-edge-size) + var(--et-resize-handles-outset));
134
+ --et-resize-handle-corner: calc(var(--et-resize-handles-touch-corner-size) + var(--et-resize-handles-outset));
135
+ }
136
+ }
137
+ }