@elsapiens/styles 0.1.3 → 0.1.5

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.
@@ -401,24 +401,15 @@
401
401
  inset-inline-end: 0;
402
402
  display: flex;
403
403
  align-items: center;
404
- padding-inline-end: var(--el-spacing-px-md);
405
- }
406
-
407
- /* Size variants for prefix/suffix */
408
- .el-input-prefix-icon-sm {
409
- padding-inline-start: 0;
410
- }
411
-
412
- .el-input-prefix-icon-lg {
413
- padding-inline-start: 0;
404
+ padding-inline-end: 0;
414
405
  }
415
406
 
416
407
  .el-input-suffix-icon-sm {
417
- padding-inline-end: var(--el-spacing-px-sm);
408
+ padding-inline-end: var(--el-spacing-px-sm, 0.5rem);
418
409
  }
419
410
 
420
411
  .el-input-suffix-icon-lg {
421
- padding-inline-end: var(--el-spacing-px-lg);
412
+ padding-inline-end: var(--el-spacing-px-lg, 0.75rem);
422
413
  }
423
414
 
424
415
  /* Picker suffix icon - positioned at the extended edge of inputs with negative margins */
@@ -443,32 +434,33 @@
443
434
  }
444
435
 
445
436
  /* Input padding adjustments when using prefix/suffix icons */
437
+ /* Formula: icon-size + gap * 2 */
446
438
  .el-input-has-prefix {
447
- padding-inline-start: calc(var(--el-spacing-px-md) + 1.5rem);
439
+ padding-inline-start: calc(var(--el-icon-size-md, 1.25rem) + var(--el-spacing-px-md, 0.625rem) * 2);
448
440
  }
449
441
 
450
442
  .el-input-has-prefix-sm {
451
- padding-inline-start: calc(var(--el-spacing-px-sm) + 1.25rem);
443
+ padding-inline-start: calc(var(--el-icon-size-sm, 1rem) + var(--el-spacing-px-sm, 0.5rem) * 2);
452
444
  }
453
445
 
454
446
  .el-input-has-prefix-lg {
455
- padding-inline-start: calc(var(--el-spacing-px-lg) + 1.75rem);
447
+ padding-inline-start: calc(var(--el-icon-size-lg, 1.5rem) + var(--el-spacing-px-lg, 0.75rem) * 2);
456
448
  }
457
449
 
458
450
  .el-input-has-prefix-narrow {
459
- padding-inline-start: calc(var(--el-spacing-px-md) + 1rem);
451
+ padding-inline-start: calc(0.75rem + var(--el-spacing-px-md, 0.625rem) * 2);
460
452
  }
461
453
 
462
454
  .el-input-has-suffix {
463
- padding-inline-end: calc(var(--el-spacing-px-md) + 1.25rem);
455
+ padding-inline-end: calc(var(--el-icon-size-md, 1.25rem) + var(--el-spacing-px-md, 0.625rem) * 2);
464
456
  }
465
457
 
466
458
  .el-input-has-suffix-sm {
467
- padding-inline-end: calc(var(--el-spacing-px-sm) + 1rem);
459
+ padding-inline-end: calc(var(--el-icon-size-sm, 1rem) + var(--el-spacing-px-sm, 0.5rem) * 2);
468
460
  }
469
461
 
470
462
  .el-input-has-suffix-lg {
471
- padding-inline-end: calc(var(--el-spacing-px-lg) + 1.5rem);
463
+ padding-inline-end: calc(var(--el-icon-size-lg, 1.5rem) + var(--el-spacing-px-lg, 0.75rem) * 2);
472
464
  }
473
465
 
474
466
  /* ============================================
@@ -622,15 +614,23 @@
622
614
  .el-gap-field { gap: calc(var(--el-container-px, var(--el-spacing-px-md)) * 1.5); }
623
615
 
624
616
  /* Buttons and inputs inside el-gap-field inside padding containers - extend to visual edge */
617
+ /* All inputs and buttons get negative margins for edge-to-edge layout */
625
618
  [class*="el-p-"] .el-gap-field .el-btn,
626
619
  [class*="el-p-"] .el-gap-field .el-input,
627
620
  [class*="el-px-"] .el-gap-field .el-btn,
628
621
  [class*="el-px-"] .el-gap-field .el-input {
629
- padding-inline: calc(var(--el-container-px) * 0.5);
630
622
  margin-inline: calc(var(--el-container-px) * -0.5);
631
623
  }
632
624
 
633
- /* Only inputs need width adjustment to override 100% from .el-input */
625
+ /* Padding override only for inputs WITHOUT prefix/suffix icons (they have their own padding) */
626
+ [class*="el-p-"] .el-gap-field .el-btn,
627
+ [class*="el-p-"] .el-gap-field .el-input:not(.el-input-has-prefix):not(.el-input-has-suffix):not(.el-input-has-prefix-sm):not(.el-input-has-prefix-lg):not(.el-input-has-suffix-sm):not(.el-input-has-suffix-lg):not(.el-input-has-prefix-narrow),
628
+ [class*="el-px-"] .el-gap-field .el-btn,
629
+ [class*="el-px-"] .el-gap-field .el-input:not(.el-input-has-prefix):not(.el-input-has-suffix):not(.el-input-has-prefix-sm):not(.el-input-has-prefix-lg):not(.el-input-has-suffix-sm):not(.el-input-has-suffix-lg):not(.el-input-has-prefix-narrow) {
630
+ padding-inline: calc(var(--el-container-px) * 0.5);
631
+ }
632
+
633
+ /* All inputs need width adjustment to override 100% from .el-input */
634
634
  [class*="el-p-"] .el-gap-field .el-input,
635
635
  [class*="el-px-"] .el-gap-field .el-input {
636
636
  width: calc(100% + var(--el-container-px));
@@ -842,23 +842,11 @@
842
842
  padding-inline: calc(var(--el-container-px) * 0.5);
843
843
  }
844
844
 
845
- /* Summary - default margin when not inside padding containers */
846
- .el-summary {
847
- margin-inline: calc(var(--el-spacing-px-md) * -1);
848
- width: calc(100% + var(--el-spacing-px-md) * 2);
849
- }
850
-
851
- /* Summary inner elements - default padding when not inside padding containers */
845
+ /* Summary inner elements - consistent padding */
852
846
  .el-summary-item {
853
847
  padding-inline: var(--el-spacing-px-md);
854
848
  }
855
849
 
856
- /* Summary inner elements - cascaded padding when inside padding containers */
857
- [class*="el-p-"] .el-summary .el-summary-item,
858
- [class*="el-px-"] .el-summary .el-summary-item {
859
- padding-inline: calc(var(--el-container-px) * 0.5);
860
- }
861
-
862
850
  /* Textarea - cascaded styles when inside padding containers */
863
851
  [class*="el-p-"] .el-textarea,
864
852
  [class*="el-px-"] .el-textarea {
package/dist/index.css CHANGED
@@ -643,7 +643,7 @@
643
643
  .el-px-lg { padding-left: var(--el-layout-gap-lg); padding-right: var(--el-layout-gap-lg); --el-container-px: var(--el-layout-gap-lg); }
644
644
  .el-px-xl { padding-left: var(--el-layout-gap-xl); padding-right: var(--el-layout-gap-xl); --el-container-px: var(--el-layout-gap-xl); }
645
645
 
646
- /* Buttons and inputs inside el-gap-field inside padding containers - both padding and margin are 0.5x container padding */
646
+ /* All buttons and inputs inside el-gap-field - negative margins for edge-to-edge layout */
647
647
  .el-p-xs .el-gap-field .el-btn, .el-p-sm .el-gap-field .el-btn, .el-p-md .el-gap-field .el-btn,
648
648
  .el-p-lg .el-gap-field .el-btn, .el-p-xl .el-gap-field .el-btn,
649
649
  .el-p-section .el-gap-field .el-btn, .el-p-content .el-gap-field .el-btn,
@@ -654,10 +654,39 @@
654
654
  .el-p-section .el-gap-field .el-input, .el-p-content .el-gap-field .el-input,
655
655
  .el-px-xs .el-gap-field .el-input, .el-px-sm .el-gap-field .el-input, .el-px-md .el-gap-field .el-input,
656
656
  .el-px-lg .el-gap-field .el-input, .el-px-xl .el-gap-field .el-input {
657
- padding-inline: calc(var(--el-container-px) * 0.5);
658
657
  margin-inline: calc(var(--el-container-px) * -0.5);
659
658
  }
660
659
 
660
+ /* Padding override only for inputs WITHOUT prefix/suffix icons (they have their own padding) */
661
+ .el-p-xs .el-gap-field .el-btn, .el-p-sm .el-gap-field .el-btn, .el-p-md .el-gap-field .el-btn,
662
+ .el-p-lg .el-gap-field .el-btn, .el-p-xl .el-gap-field .el-btn,
663
+ .el-p-section .el-gap-field .el-btn, .el-p-content .el-gap-field .el-btn,
664
+ .el-px-xs .el-gap-field .el-btn, .el-px-sm .el-gap-field .el-btn, .el-px-md .el-gap-field .el-btn,
665
+ .el-px-lg .el-gap-field .el-btn, .el-px-xl .el-gap-field .el-btn,
666
+ .el-p-xs .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
667
+ .el-p-sm .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
668
+ .el-p-md .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
669
+ .el-p-lg .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
670
+ .el-p-xl .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
671
+ .el-p-section .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
672
+ .el-p-content .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
673
+ .el-px-xs .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
674
+ .el-px-sm .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
675
+ .el-px-md .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
676
+ .el-px-lg .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]),
677
+ .el-px-xl .el-gap-field .el-input:not([class*="el-input-has-prefix"]):not([class*="el-input-has-suffix"]) {
678
+ padding-inline: calc(var(--el-container-px) * 0.5);
679
+ }
680
+
681
+ /* All inputs need width adjustment to override 100% from .el-input */
682
+ .el-p-xs .el-gap-field .el-input, .el-p-sm .el-gap-field .el-input, .el-p-md .el-gap-field .el-input,
683
+ .el-p-lg .el-gap-field .el-input, .el-p-xl .el-gap-field .el-input,
684
+ .el-p-section .el-gap-field .el-input, .el-p-content .el-gap-field .el-input,
685
+ .el-px-xs .el-gap-field .el-input, .el-px-sm .el-gap-field .el-input, .el-px-md .el-gap-field .el-input,
686
+ .el-px-lg .el-gap-field .el-input, .el-px-xl .el-gap-field .el-input {
687
+ width: calc(100% + var(--el-container-px));
688
+ }
689
+
661
690
  /* Padding Y (vertical) */
662
691
  .el-py-xs { padding-top: var(--el-layout-gap-xs); padding-bottom: var(--el-layout-gap-xs); }
663
692
  .el-py-sm { padding-top: var(--el-layout-gap-sm); padding-bottom: var(--el-layout-gap-sm); }
@@ -138,6 +138,7 @@
138
138
  --card-padding-lg: 1.25rem;
139
139
  --card-gap: 0.75rem;
140
140
  --card-header-gap: 0.375rem;
141
+ --el-card-radius: var(--radius-lg);
141
142
 
142
143
  /* Modal */
143
144
  --modal-padding: 1.25rem;
@@ -369,6 +370,7 @@
369
370
  --card-padding-lg: 1rem;
370
371
  --card-gap: 0.5rem;
371
372
  --card-header-gap: 0.25rem;
373
+ --el-card-radius: var(--radius-md);
372
374
 
373
375
  --modal-padding: 0.875rem;
374
376
  --modal-gap: 0.75rem;
@@ -583,6 +585,7 @@
583
585
  --card-padding-lg: 2rem;
584
586
  --card-gap: 1rem;
585
587
  --card-header-gap: 0.5rem;
588
+ --el-card-radius: var(--radius-xl);
586
589
 
587
590
  --modal-padding: 1.75rem;
588
591
  --modal-gap: 1.25rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elsapiens/styles",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "CSS styles and Tailwind preset for elSapiens SDK",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,16 +22,16 @@
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
25
- "scripts": {
26
- "build": "mkdir -p dist && cp src/*.css dist/ && cp src/tailwind-preset.js .",
27
- "dev": "npm run build",
28
- "clean": "rm -rf dist tailwind-preset.js"
29
- },
30
25
  "devDependencies": {
31
26
  "tailwindcss": "^3.4.1",
32
27
  "tailwindcss-animate": "^1.0.7"
33
28
  },
34
29
  "peerDependencies": {
35
30
  "tailwindcss": "^3.4.0"
31
+ },
32
+ "scripts": {
33
+ "build": "mkdir -p dist && cp src/*.css dist/ && cp src/tailwind-preset.js .",
34
+ "dev": "npm run build",
35
+ "clean": "rm -rf dist tailwind-preset.js"
36
36
  }
37
- }
37
+ }
@@ -4,74 +4,103 @@ module.exports = {
4
4
  theme: {
5
5
  extend: {
6
6
  colors: {
7
+ // Wisteria palette (changes with color scheme)
8
+ wisteria: {
9
+ 50: 'hsl(var(--wisteria-50))',
10
+ 100: 'hsl(var(--wisteria-100))',
11
+ 200: 'hsl(var(--wisteria-200))',
12
+ 300: 'hsl(var(--wisteria-300))',
13
+ 400: 'hsl(var(--wisteria-400))',
14
+ 500: 'hsl(var(--wisteria-500))',
15
+ 600: 'hsl(var(--wisteria-600))',
16
+ 700: 'hsl(var(--wisteria-700))',
17
+ 800: 'hsl(var(--wisteria-800))',
18
+ 850: 'hsl(var(--wisteria-850))',
19
+ 900: 'hsl(var(--wisteria-900))',
20
+ 950: 'hsl(var(--wisteria-950))',
21
+ },
22
+ // Neutral gray scale (never changes)
23
+ neutral: {
24
+ 50: 'hsl(var(--neutral-50))',
25
+ 100: 'hsl(var(--neutral-100))',
26
+ 200: 'hsl(var(--neutral-200))',
27
+ 300: 'hsl(var(--neutral-300))',
28
+ 400: 'hsl(var(--neutral-400))',
29
+ 500: 'hsl(var(--neutral-500))',
30
+ 600: 'hsl(var(--neutral-600))',
31
+ 700: 'hsl(var(--neutral-700))',
32
+ 800: 'hsl(var(--neutral-800))',
33
+ 900: 'hsl(var(--neutral-900))',
34
+ 950: 'hsl(var(--neutral-950))',
35
+ },
7
36
  // Primary - Wisteria Blue
8
37
  primary: {
9
- 50: 'var(--primary-50)',
10
- 100: 'var(--primary-100)',
11
- 200: 'var(--primary-200)',
12
- 300: 'var(--primary-300)',
13
- 400: 'var(--primary-400)',
14
- 500: 'var(--primary-500)',
15
- DEFAULT: 'var(--primary)',
16
- 600: 'var(--primary-600)',
17
- 700: 'var(--primary-700)',
18
- 800: 'var(--primary-800)',
19
- 900: 'var(--primary-900)',
20
- 950: 'var(--primary-950)',
21
- foreground: 'var(--primary-foreground)',
38
+ 50: 'hsl(var(--wisteria-50))',
39
+ 100: 'hsl(var(--wisteria-100))',
40
+ 200: 'hsl(var(--wisteria-200))',
41
+ 300: 'hsl(var(--wisteria-300))',
42
+ 400: 'hsl(var(--wisteria-400))',
43
+ 500: 'hsl(var(--wisteria-500))',
44
+ 600: 'hsl(var(--wisteria-600))',
45
+ 700: 'hsl(var(--wisteria-700))',
46
+ 800: 'hsl(var(--wisteria-800))',
47
+ 900: 'hsl(var(--wisteria-900))',
48
+ 950: 'hsl(var(--wisteria-950))',
49
+ DEFAULT: 'hsl(var(--primary))',
50
+ foreground: 'hsl(var(--primary-foreground))',
22
51
  },
23
52
  // Semantic colors
24
- background: 'var(--background)',
25
- foreground: 'var(--foreground)',
53
+ background: 'hsl(var(--background))',
54
+ foreground: 'hsl(var(--foreground))',
26
55
  card: {
27
- DEFAULT: 'var(--card)',
28
- foreground: 'var(--card-foreground)',
56
+ DEFAULT: 'hsl(var(--card))',
57
+ foreground: 'hsl(var(--card-foreground))',
29
58
  },
30
59
  popover: {
31
- DEFAULT: 'var(--popover)',
32
- foreground: 'var(--popover-foreground)',
60
+ DEFAULT: 'hsl(var(--popover))',
61
+ foreground: 'hsl(var(--popover-foreground))',
33
62
  },
34
63
  secondary: {
35
- DEFAULT: 'var(--secondary)',
36
- foreground: 'var(--secondary-foreground)',
64
+ DEFAULT: 'hsl(var(--secondary))',
65
+ foreground: 'hsl(var(--secondary-foreground))',
37
66
  },
38
67
  muted: {
39
- DEFAULT: 'var(--muted)',
40
- foreground: 'var(--muted-foreground)',
68
+ DEFAULT: 'hsl(var(--muted))',
69
+ foreground: 'hsl(var(--muted-foreground))',
41
70
  },
42
71
  accent: {
43
- DEFAULT: 'var(--accent)',
44
- foreground: 'var(--accent-foreground)',
72
+ DEFAULT: 'hsl(var(--accent))',
73
+ foreground: 'hsl(var(--accent-foreground))',
45
74
  },
46
75
  destructive: {
47
- DEFAULT: 'var(--destructive)',
48
- foreground: 'var(--destructive-foreground)',
76
+ DEFAULT: 'hsl(var(--destructive))',
77
+ foreground: 'hsl(var(--destructive-foreground))',
49
78
  },
50
- border: 'var(--border)',
51
- input: 'var(--input)',
52
- ring: 'var(--ring)',
79
+ border: 'hsl(var(--border))',
80
+ input: 'hsl(var(--input))',
81
+ ring: 'hsl(var(--ring))',
53
82
  // Surfaces
54
83
  surface: {
55
- DEFAULT: 'var(--surface)',
56
- elevated: 'var(--surface-elevated)',
57
- sunken: 'var(--surface-sunken)',
84
+ DEFAULT: 'hsl(var(--surface))',
85
+ elevated: 'hsl(var(--surface-elevated))',
86
+ sunken: 'hsl(var(--surface-sunken))',
58
87
  },
59
88
  // Status colors
60
89
  success: {
61
- DEFAULT: 'var(--success)',
62
- foreground: 'var(--success-foreground)',
90
+ DEFAULT: 'hsl(var(--success))',
91
+ foreground: 'hsl(var(--success-foreground))',
63
92
  },
64
93
  warning: {
65
- DEFAULT: 'var(--warning)',
66
- foreground: 'var(--warning-foreground)',
94
+ DEFAULT: 'hsl(var(--warning))',
95
+ foreground: 'hsl(var(--warning-foreground))',
67
96
  },
68
97
  error: {
69
- DEFAULT: 'var(--error)',
70
- foreground: 'var(--error-foreground)',
98
+ DEFAULT: 'hsl(var(--error))',
99
+ foreground: 'hsl(var(--error-foreground))',
71
100
  },
72
101
  info: {
73
- DEFAULT: 'var(--info)',
74
- foreground: 'var(--info-foreground)',
102
+ DEFAULT: 'hsl(var(--info))',
103
+ foreground: 'hsl(var(--info-foreground))',
75
104
  },
76
105
  },
77
106
  borderRadius: {