@dillingerstaffing/strand-ui 0.1.1 → 0.2.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.
Files changed (41) hide show
  1. package/HTML_REFERENCE.md +753 -0
  2. package/dist/components/DataReadout/DataReadout.d.ts +2 -0
  3. package/dist/components/DataReadout/DataReadout.d.ts.map +1 -1
  4. package/dist/css/strand-ui.css +248 -76
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +13 -9
  7. package/package.json +13 -10
  8. package/src/__tests__/build-output.test.ts +123 -0
  9. package/src/__tests__/design-language.test.ts +137 -0
  10. package/src/__tests__/static.test.tsx +60 -0
  11. package/src/components/Alert/Alert.css +11 -3
  12. package/src/components/Badge/Badge.css +1 -1
  13. package/src/components/Breadcrumb/Breadcrumb.css +6 -1
  14. package/src/components/Button/Button.css +15 -8
  15. package/src/components/Card/Card.css +12 -3
  16. package/src/components/Checkbox/Checkbox.css +4 -4
  17. package/src/components/DataReadout/DataReadout.css +9 -0
  18. package/src/components/DataReadout/DataReadout.test.tsx +36 -0
  19. package/src/components/DataReadout/DataReadout.tsx +8 -2
  20. package/src/components/Dialog/Dialog.css +7 -6
  21. package/src/components/FormField/FormField.css +1 -1
  22. package/src/components/Grid/Grid.css +21 -0
  23. package/src/components/Input/Input.css +11 -4
  24. package/src/components/Link/Link.css +6 -0
  25. package/src/components/Nav/Nav.css +13 -3
  26. package/src/components/Progress/Progress.css +3 -3
  27. package/src/components/Radio/Radio.css +4 -4
  28. package/src/components/Select/Select.css +11 -4
  29. package/src/components/Skeleton/Skeleton.css +2 -2
  30. package/src/components/Slider/Slider.css +5 -5
  31. package/src/components/Stack/Stack.css +15 -0
  32. package/src/components/Switch/Switch.css +4 -4
  33. package/src/components/Table/Table.css +6 -1
  34. package/src/components/Tabs/Tabs.css +7 -2
  35. package/src/components/Tag/Tag.css +7 -7
  36. package/src/components/Textarea/Textarea.css +11 -4
  37. package/src/components/Toast/Toast.css +3 -3
  38. package/src/components/Tooltip/Tooltip.css +2 -2
  39. package/src/index.ts +1 -1
  40. package/src/static.css +47 -0
  41. package/LICENSE +0 -21
@@ -93,6 +93,42 @@ describe("DataReadout", () => {
93
93
  expect(readout?.className).toContain("custom");
94
94
  });
95
95
 
96
+ // ── Size variants ──
97
+
98
+ it("applies sm size modifier class", () => {
99
+ const { container } = render(
100
+ <DataReadout label="Users" value="12.8K" size="sm" />,
101
+ );
102
+ const readout = container.querySelector(".strand-data-readout");
103
+ expect(readout?.className).toContain("strand-data-readout--sm");
104
+ });
105
+
106
+ it("applies lg size modifier class", () => {
107
+ const { container } = render(
108
+ <DataReadout label="Revenue" value="$1.2M" size="lg" />,
109
+ );
110
+ const readout = container.querySelector(".strand-data-readout");
111
+ expect(readout?.className).toContain("strand-data-readout--lg");
112
+ });
113
+
114
+ it("does not apply size modifier for md (default)", () => {
115
+ const { container } = render(
116
+ <DataReadout label="Metric" value="100" size="md" />,
117
+ );
118
+ const readout = container.querySelector(".strand-data-readout");
119
+ expect(readout?.className).not.toContain("strand-data-readout--md");
120
+ expect(readout?.className).not.toContain("strand-data-readout--sm");
121
+ expect(readout?.className).not.toContain("strand-data-readout--lg");
122
+ });
123
+
124
+ it("does not apply size modifier when size is omitted", () => {
125
+ const { container } = render(
126
+ <DataReadout label="Metric" value="100" />,
127
+ );
128
+ const readout = container.querySelector(".strand-data-readout");
129
+ expect(readout?.className).toBe("strand-data-readout");
130
+ });
131
+
96
132
  // ── Forwarded props ──
97
133
 
98
134
  it("forwards additional props", () => {
@@ -9,11 +9,17 @@ export interface DataReadoutProps
9
9
  label: string;
10
10
  /** The large displayed value */
11
11
  value: string | number;
12
+ /** Size variant: sm (compact), md (default), lg (hero) */
13
+ size?: "sm" | "md" | "lg";
12
14
  }
13
15
 
14
16
  export const DataReadout = forwardRef<HTMLDivElement, DataReadoutProps>(
15
- ({ label, value, className = "", ...rest }, ref) => {
16
- const classes = ["strand-data-readout", className]
17
+ ({ label, value, size, className = "", ...rest }, ref) => {
18
+ const classes = [
19
+ "strand-data-readout",
20
+ size && size !== "md" ? `strand-data-readout--${size}` : "",
21
+ className,
22
+ ]
17
23
  .filter(Boolean)
18
24
  .join(" ");
19
25
 
@@ -8,7 +8,7 @@
8
8
  display: flex;
9
9
  align-items: center;
10
10
  justify-content: center;
11
- background: rgba(15, 23, 42, 0.5);
11
+ background: var(--strand-backdrop);
12
12
  }
13
13
 
14
14
  /* ── Panel ── */
@@ -17,7 +17,7 @@
17
17
  width: 100%;
18
18
  max-width: 560px;
19
19
  margin: var(--strand-space-4);
20
- padding: var(--strand-space-6);
20
+ padding: var(--strand-space-8);
21
21
  background: var(--strand-surface-elevated);
22
22
  border-radius: var(--strand-radius-xl);
23
23
  box-shadow: var(--strand-elevation-4);
@@ -43,8 +43,8 @@
43
43
  /* ── Close button ── */
44
44
  .strand-dialog__close {
45
45
  position: absolute;
46
- top: var(--strand-space-4);
47
- right: var(--strand-space-4);
46
+ top: var(--strand-space-6);
47
+ right: var(--strand-space-6);
48
48
  display: inline-flex;
49
49
  align-items: center;
50
50
  justify-content: center;
@@ -57,8 +57,8 @@
57
57
  color: var(--strand-gray-500);
58
58
  font-size: var(--strand-text-lg);
59
59
  cursor: pointer;
60
- transition: background var(--strand-duration-fast) ease,
61
- color var(--strand-duration-fast) ease;
60
+ transition: background var(--strand-duration-fast) var(--strand-ease-out-quart),
61
+ color var(--strand-duration-fast) var(--strand-ease-out-quart);
62
62
  }
63
63
 
64
64
  .strand-dialog__close:hover {
@@ -68,6 +68,7 @@
68
68
 
69
69
  /* ── Body ── */
70
70
  .strand-dialog__body {
71
+ padding-top: var(--strand-space-6);
71
72
  color: var(--strand-gray-600);
72
73
  font-size: var(--strand-text-sm);
73
74
  }
@@ -4,7 +4,7 @@
4
4
  .strand-form-field {
5
5
  display: flex;
6
6
  flex-direction: column;
7
- gap: var(--strand-space-1);
7
+ gap: var(--strand-space-2);
8
8
  }
9
9
 
10
10
  /* ── Label ── */
@@ -3,4 +3,25 @@
3
3
  /* ── Base ── */
4
4
  .strand-grid {
5
5
  display: grid;
6
+ overflow: hidden;
7
+ max-width: 100%;
8
+ box-sizing: border-box;
6
9
  }
10
+
11
+ .strand-grid > * {
12
+ min-width: 0;
13
+ }
14
+
15
+ /* ── Column utilities ── */
16
+ .strand-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
17
+ .strand-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
18
+ .strand-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
19
+
20
+ /* ── Gap utilities ── */
21
+ .strand-grid--gap-1 { gap: var(--strand-space-1); }
22
+ .strand-grid--gap-2 { gap: var(--strand-space-2); }
23
+ .strand-grid--gap-3 { gap: var(--strand-space-3); }
24
+ .strand-grid--gap-4 { gap: var(--strand-space-4); }
25
+ .strand-grid--gap-5 { gap: var(--strand-space-5); }
26
+ .strand-grid--gap-6 { gap: var(--strand-space-6); }
27
+ .strand-grid--gap-8 { gap: var(--strand-space-8); }
@@ -8,13 +8,13 @@
8
8
  border: 1px solid var(--strand-gray-200);
9
9
  border-radius: var(--strand-radius-md);
10
10
  transition:
11
- border-color var(--strand-duration-fast) ease,
12
- box-shadow var(--strand-duration-fast) ease;
11
+ border-color var(--strand-duration-fast) var(--strand-ease-out-quart),
12
+ box-shadow var(--strand-duration-fast) var(--strand-ease-out-quart);
13
13
  }
14
14
 
15
15
  .strand-input:focus-within {
16
16
  border-color: var(--strand-blue-primary);
17
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
17
+ box-shadow: var(--strand-focus-ring);
18
18
  }
19
19
 
20
20
  /* ── Field ── */
@@ -66,7 +66,7 @@
66
66
 
67
67
  .strand-input--error:focus-within {
68
68
  border-color: var(--strand-red-alert);
69
- box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
69
+ box-shadow: var(--strand-focus-ring-error);
70
70
  }
71
71
 
72
72
  /* ── Disabled ── */
@@ -78,3 +78,10 @@
78
78
  .strand-input--disabled .strand-input__field {
79
79
  cursor: not-allowed;
80
80
  }
81
+
82
+ /* ── Reduced motion ── */
83
+ @media (prefers-reduced-motion: reduce) {
84
+ .strand-input {
85
+ transition: none;
86
+ }
87
+ }
@@ -16,6 +16,12 @@
16
16
  background-size: 100% 1px;
17
17
  }
18
18
 
19
+ /* ── Focus ring ── */
20
+ .strand-link:focus-visible {
21
+ outline: 2px solid var(--strand-blue-primary);
22
+ outline-offset: 2px;
23
+ }
24
+
19
25
  /* ── Reduced motion ── */
20
26
  @media (prefers-reduced-motion: reduce) {
21
27
  .strand-link {
@@ -40,13 +40,18 @@
40
40
  text-decoration: none;
41
41
  font-size: var(--strand-text-sm);
42
42
  font-weight: var(--strand-weight-medium);
43
- transition: color var(--strand-duration-fast) ease;
43
+ transition: color var(--strand-duration-fast) var(--strand-ease-out-quart);
44
44
  }
45
45
 
46
46
  .strand-nav__link:hover {
47
47
  color: var(--strand-gray-900);
48
48
  }
49
49
 
50
+ .strand-nav__link:focus-visible {
51
+ outline: 2px solid var(--strand-blue-primary);
52
+ outline-offset: 2px;
53
+ }
54
+
50
55
  .strand-nav__link--active {
51
56
  color: var(--strand-blue-primary);
52
57
  font-weight: var(--strand-weight-medium);
@@ -74,13 +79,18 @@
74
79
  background: transparent;
75
80
  color: var(--strand-gray-600);
76
81
  cursor: pointer;
77
- transition: background var(--strand-duration-fast) ease;
82
+ transition: background var(--strand-duration-fast) var(--strand-ease-out-quart);
78
83
  }
79
84
 
80
85
  .strand-nav__hamburger:hover {
81
86
  background: var(--strand-gray-200);
82
87
  }
83
88
 
89
+ .strand-nav__hamburger:focus-visible {
90
+ outline: 2px solid var(--strand-blue-primary);
91
+ outline-offset: 2px;
92
+ }
93
+
84
94
  .strand-nav__hamburger-icon {
85
95
  display: block;
86
96
  width: 20px;
@@ -124,7 +134,7 @@
124
134
  text-decoration: none;
125
135
  font-size: var(--strand-text-sm);
126
136
  font-weight: var(--strand-weight-medium);
127
- transition: color var(--strand-duration-fast) ease;
137
+ transition: color var(--strand-duration-fast) var(--strand-ease-out-quart);
128
138
  }
129
139
 
130
140
  .strand-nav__mobile-link:hover {
@@ -26,13 +26,13 @@
26
26
  height: 100%;
27
27
  background: var(--strand-blue-primary);
28
28
  border-radius: var(--strand-radius-full);
29
- transition: width var(--strand-duration-normal) ease;
29
+ transition: width var(--strand-duration-normal) var(--strand-ease-out-quart);
30
30
  }
31
31
 
32
32
  /* ── Bar indeterminate ── */
33
33
  .strand-progress--bar.strand-progress--indeterminate .strand-progress__fill {
34
34
  width: 40%;
35
- animation: strand-progress-shimmer 1.5s ease-in-out infinite;
35
+ animation: strand-progress-shimmer 1.5s var(--strand-ease-in-out-sine) infinite;
36
36
  }
37
37
 
38
38
  @keyframes strand-progress-shimmer {
@@ -61,7 +61,7 @@
61
61
  }
62
62
 
63
63
  .strand-progress--ring .strand-progress__ring {
64
- transition: stroke-dashoffset var(--strand-duration-normal) ease;
64
+ transition: stroke-dashoffset var(--strand-duration-normal) var(--strand-ease-out-quart);
65
65
  }
66
66
 
67
67
  /* ── Ring indeterminate ── */
@@ -38,9 +38,9 @@
38
38
  background: var(--strand-surface-elevated);
39
39
  flex-shrink: 0;
40
40
  transition:
41
- background var(--strand-duration-fast) ease,
42
- border-color var(--strand-duration-fast) ease,
43
- box-shadow var(--strand-duration-fast) ease;
41
+ background var(--strand-duration-fast) var(--strand-ease-out-quart),
42
+ border-color var(--strand-duration-fast) var(--strand-ease-out-quart),
43
+ box-shadow var(--strand-duration-fast) var(--strand-ease-out-quart);
44
44
  }
45
45
 
46
46
  .strand-radio__dot {
@@ -55,7 +55,7 @@
55
55
  /* ── Focus ring ── */
56
56
  .strand-radio__native:focus-visible ~ .strand-radio__control {
57
57
  border-color: var(--strand-blue-primary);
58
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
58
+ box-shadow: var(--strand-focus-ring);
59
59
  }
60
60
 
61
61
  /* ── Checked ── */
@@ -9,13 +9,13 @@
9
9
  border: 1px solid var(--strand-gray-200);
10
10
  border-radius: var(--strand-radius-md);
11
11
  transition:
12
- border-color var(--strand-duration-fast) ease,
13
- box-shadow var(--strand-duration-fast) ease;
12
+ border-color var(--strand-duration-fast) var(--strand-ease-out-quart),
13
+ box-shadow var(--strand-duration-fast) var(--strand-ease-out-quart);
14
14
  }
15
15
 
16
16
  .strand-select:focus-within {
17
17
  border-color: var(--strand-blue-primary);
18
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
18
+ box-shadow: var(--strand-focus-ring);
19
19
  }
20
20
 
21
21
  /* ── Field ── */
@@ -54,7 +54,7 @@
54
54
 
55
55
  .strand-select--error:focus-within {
56
56
  border-color: var(--strand-red-alert);
57
- box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
57
+ box-shadow: var(--strand-focus-ring-error);
58
58
  }
59
59
 
60
60
  /* ── Disabled ── */
@@ -66,3 +66,10 @@
66
66
  .strand-select--disabled .strand-select__field {
67
67
  cursor: not-allowed;
68
68
  }
69
+
70
+ /* ── Reduced motion ── */
71
+ @media (prefers-reduced-motion: reduce) {
72
+ .strand-select {
73
+ transition: none;
74
+ }
75
+ }
@@ -15,7 +15,7 @@
15
15
  var(--strand-gray-100) 75%
16
16
  );
17
17
  background-size: 200% 100%;
18
- animation: strand-skeleton-shimmer 1.8s ease-in-out infinite;
18
+ animation: strand-skeleton-shimmer 1.8s var(--strand-ease-in-out-sine) infinite;
19
19
  }
20
20
 
21
21
  @keyframes strand-skeleton-shimmer {
@@ -30,7 +30,7 @@
30
30
  /* ── Text variant ── */
31
31
  .strand-skeleton--text {
32
32
  height: 1em;
33
- border-radius: 4px;
33
+ border-radius: var(--strand-radius-sm);
34
34
  }
35
35
 
36
36
  /* ── Rectangle variant ── */
@@ -17,7 +17,7 @@
17
17
  border-radius: var(--strand-radius-full);
18
18
  outline: none;
19
19
  cursor: pointer;
20
- transition: background var(--strand-duration-fast) ease;
20
+ transition: background var(--strand-duration-fast) var(--strand-ease-out-quart);
21
21
  }
22
22
 
23
23
  /* ── Thumb: Webkit ── */
@@ -31,7 +31,7 @@
31
31
  cursor: pointer;
32
32
  box-shadow: var(--strand-elevation-1);
33
33
  transition:
34
- background var(--strand-duration-fast) ease,
34
+ background var(--strand-duration-fast) var(--strand-ease-out-quart),
35
35
  transform var(--strand-duration-fast) var(--strand-ease-out-expo);
36
36
  }
37
37
 
@@ -55,7 +55,7 @@
55
55
  cursor: pointer;
56
56
  box-shadow: var(--strand-elevation-1);
57
57
  transition:
58
- background var(--strand-duration-fast) ease,
58
+ background var(--strand-duration-fast) var(--strand-ease-out-quart),
59
59
  transform var(--strand-duration-fast) var(--strand-ease-out-expo);
60
60
  }
61
61
 
@@ -78,11 +78,11 @@
78
78
 
79
79
  /* ── Focus ── */
80
80
  .strand-slider__field:focus-visible::-webkit-slider-thumb {
81
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
81
+ box-shadow: var(--strand-focus-ring);
82
82
  }
83
83
 
84
84
  .strand-slider__field:focus-visible::-moz-range-thumb {
85
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
85
+ box-shadow: var(--strand-focus-ring);
86
86
  }
87
87
 
88
88
  /* ── Disabled ── */
@@ -3,6 +3,12 @@
3
3
  /* ── Base ── */
4
4
  .strand-stack {
5
5
  display: flex;
6
+ max-width: 100%;
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ .strand-stack > * {
11
+ min-width: 0;
6
12
  }
7
13
 
8
14
  /* ── Direction ── */
@@ -54,3 +60,12 @@
54
60
  .strand-stack--wrap {
55
61
  flex-wrap: wrap;
56
62
  }
63
+
64
+ /* ── Gap utilities ── */
65
+ .strand-stack--gap-1 { gap: var(--strand-space-1); }
66
+ .strand-stack--gap-2 { gap: var(--strand-space-2); }
67
+ .strand-stack--gap-3 { gap: var(--strand-space-3); }
68
+ .strand-stack--gap-4 { gap: var(--strand-space-4); }
69
+ .strand-stack--gap-5 { gap: var(--strand-space-5); }
70
+ .strand-stack--gap-6 { gap: var(--strand-space-6); }
71
+ .strand-stack--gap-8 { gap: var(--strand-space-8); }
@@ -27,14 +27,14 @@
27
27
  cursor: pointer;
28
28
  flex-shrink: 0;
29
29
  transition:
30
- background var(--strand-duration-fast) ease,
31
- border-color var(--strand-duration-fast) ease,
32
- box-shadow var(--strand-duration-fast) ease;
30
+ background var(--strand-duration-fast) var(--strand-ease-out-quart),
31
+ border-color var(--strand-duration-fast) var(--strand-ease-out-quart),
32
+ box-shadow var(--strand-duration-fast) var(--strand-ease-out-quart);
33
33
  }
34
34
 
35
35
  .strand-switch__track:focus-visible {
36
36
  border-color: var(--strand-blue-primary);
37
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
37
+ box-shadow: var(--strand-focus-ring);
38
38
  outline: none;
39
39
  }
40
40
 
@@ -47,6 +47,11 @@
47
47
  color: var(--strand-gray-600);
48
48
  }
49
49
 
50
+ .strand-table__sort-btn:focus-visible {
51
+ outline: 2px solid var(--strand-blue-primary);
52
+ outline-offset: 2px;
53
+ }
54
+
50
55
  .strand-table__sort-indicator {
51
56
  font-size: var(--strand-text-xs);
52
57
  opacity: 0.6;
@@ -63,7 +68,7 @@
63
68
 
64
69
  /* ── Row hover ── */
65
70
  .strand-table__row {
66
- transition: background var(--strand-duration-fast) ease;
71
+ transition: background var(--strand-duration-fast) var(--strand-ease-out-quart);
67
72
  }
68
73
 
69
74
  .strand-table__row:hover {
@@ -20,14 +20,19 @@
20
20
  color: var(--strand-gray-500);
21
21
  cursor: pointer;
22
22
  transition:
23
- color var(--strand-duration-fast) ease,
24
- border-color var(--strand-duration-normal) var(--strand-ease-out-expo);
23
+ color var(--strand-duration-fast) var(--strand-ease-out-quart),
24
+ border-color var(--strand-duration-fast) var(--strand-ease-out-expo);
25
25
  }
26
26
 
27
27
  .strand-tabs__tab:hover {
28
28
  color: var(--strand-gray-600);
29
29
  }
30
30
 
31
+ .strand-tabs__tab:focus-visible {
32
+ outline: 2px solid var(--strand-blue-primary);
33
+ outline-offset: 2px;
34
+ }
35
+
31
36
  .strand-tabs__tab--active {
32
37
  color: var(--strand-blue-primary);
33
38
  border-bottom-color: var(--strand-blue-primary);
@@ -23,7 +23,7 @@
23
23
 
24
24
  .strand-tag--solid.strand-tag--teal {
25
25
  background: rgba(20, 184, 166, 0.1);
26
- color: #0D7377;
26
+ color: var(--strand-on-teal-tint);
27
27
  }
28
28
 
29
29
  .strand-tag--solid.strand-tag--blue {
@@ -33,12 +33,12 @@
33
33
 
34
34
  .strand-tag--solid.strand-tag--amber {
35
35
  background: rgba(245, 158, 11, 0.1);
36
- color: #92400E;
36
+ color: var(--strand-on-amber-tint);
37
37
  }
38
38
 
39
39
  .strand-tag--solid.strand-tag--red {
40
40
  background: rgba(239, 68, 68, 0.1);
41
- color: #991B1B;
41
+ color: var(--strand-on-red-tint);
42
42
  }
43
43
 
44
44
  /* ── Outlined variant ── */
@@ -53,7 +53,7 @@
53
53
 
54
54
  .strand-tag--outlined.strand-tag--teal {
55
55
  border-color: var(--strand-teal-vital);
56
- color: #0D7377;
56
+ color: var(--strand-on-teal-tint);
57
57
  }
58
58
 
59
59
  .strand-tag--outlined.strand-tag--blue {
@@ -63,12 +63,12 @@
63
63
 
64
64
  .strand-tag--outlined.strand-tag--amber {
65
65
  border-color: var(--strand-amber-caution);
66
- color: #92400E;
66
+ color: var(--strand-on-amber-tint);
67
67
  }
68
68
 
69
69
  .strand-tag--outlined.strand-tag--red {
70
70
  border-color: var(--strand-red-alert);
71
- color: #991B1B;
71
+ color: var(--strand-on-red-tint);
72
72
  }
73
73
 
74
74
  /* ── Remove button ── */
@@ -83,7 +83,7 @@
83
83
  opacity: 0.6;
84
84
  cursor: pointer;
85
85
  border-radius: var(--strand-radius-sm);
86
- transition: opacity var(--strand-duration-fast) ease;
86
+ transition: opacity var(--strand-duration-fast) var(--strand-ease-out-quart);
87
87
  }
88
88
 
89
89
  .strand-tag__remove:hover {
@@ -9,13 +9,13 @@
9
9
  border: 1px solid var(--strand-gray-200);
10
10
  border-radius: var(--strand-radius-md);
11
11
  transition:
12
- border-color var(--strand-duration-fast) ease,
13
- box-shadow var(--strand-duration-fast) ease;
12
+ border-color var(--strand-duration-fast) var(--strand-ease-out-quart),
13
+ box-shadow var(--strand-duration-fast) var(--strand-ease-out-quart);
14
14
  }
15
15
 
16
16
  .strand-textarea:focus-within {
17
17
  border-color: var(--strand-blue-primary);
18
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
18
+ box-shadow: var(--strand-focus-ring);
19
19
  }
20
20
 
21
21
  /* ── Field ── */
@@ -59,7 +59,7 @@
59
59
 
60
60
  .strand-textarea--error:focus-within {
61
61
  border-color: var(--strand-red-alert);
62
- box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
62
+ box-shadow: var(--strand-focus-ring-error);
63
63
  }
64
64
 
65
65
  /* ── Disabled ── */
@@ -71,3 +71,10 @@
71
71
  .strand-textarea--disabled .strand-textarea__field {
72
72
  cursor: not-allowed;
73
73
  }
74
+
75
+ /* ── Reduced motion ── */
76
+ @media (prefers-reduced-motion: reduce) {
77
+ .strand-textarea {
78
+ transition: none;
79
+ }
80
+ }
@@ -19,7 +19,7 @@
19
19
  justify-content: space-between;
20
20
  min-width: 280px;
21
21
  max-width: 420px;
22
- padding: var(--strand-space-4);
22
+ padding: var(--strand-space-4) var(--strand-space-5);
23
23
  background: var(--strand-surface-elevated);
24
24
  border-radius: var(--strand-radius-lg);
25
25
  border-left: 4px solid transparent;
@@ -70,8 +70,8 @@
70
70
  color: var(--strand-gray-500);
71
71
  font-size: var(--strand-text-base);
72
72
  cursor: pointer;
73
- transition: background var(--strand-duration-fast) ease,
74
- color var(--strand-duration-fast) ease;
73
+ transition: background var(--strand-duration-fast) var(--strand-ease-out-quart),
74
+ color var(--strand-duration-fast) var(--strand-ease-out-quart);
75
75
  }
76
76
 
77
77
  .strand-toast__dismiss:hover {
@@ -12,14 +12,14 @@
12
12
  z-index: 1200;
13
13
  padding: var(--strand-space-1) var(--strand-space-2);
14
14
  background: var(--strand-gray-900);
15
- color: #fff;
15
+ color: var(--strand-on-blue-primary);
16
16
  font-family: var(--strand-font-sans);
17
17
  font-size: var(--strand-text-xs);
18
18
  border-radius: var(--strand-radius-md);
19
19
  white-space: nowrap;
20
20
  pointer-events: none;
21
21
  opacity: 0;
22
- transition: opacity var(--strand-duration-fast) ease;
22
+ transition: opacity var(--strand-duration-fast) var(--strand-ease-out-quart);
23
23
  }
24
24
 
25
25
  .strand-tooltip--visible {
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! Strand UI v0.1.0 | MIT License | dillingerstaffing.com */
1
+ /*! Strand UI v0.2.0 | MIT License | dillingerstaffing.com */
2
2
 
3
3
  // Input components
4
4
  export { Button } from "./components/Button/index.js";
package/src/static.css ADDED
@@ -0,0 +1,47 @@
1
+ /*! Strand UI | MIT License | dillingerstaffing.com */
2
+
3
+ /* ── Presentation mode ──
4
+ Add .strand-static to a parent element to render components
5
+ at full visual fidelity without interaction.
6
+ Use for documentation, showcases, and screenshots. */
7
+
8
+ .strand-static {
9
+ pointer-events: none;
10
+ }
11
+
12
+ .strand-static [disabled],
13
+ .strand-static [aria-disabled="true"] {
14
+ opacity: 1;
15
+ cursor: default;
16
+ }
17
+
18
+ .strand-static .strand-btn:disabled {
19
+ opacity: 1;
20
+ cursor: default;
21
+ }
22
+
23
+ .strand-static .strand-toast {
24
+ position: static;
25
+ }
26
+
27
+ .strand-static .strand-tooltip {
28
+ position: static;
29
+ }
30
+
31
+ .strand-static *,
32
+ .strand-static *::before,
33
+ .strand-static *::after {
34
+ transition: none !important;
35
+ animation: none !important;
36
+ }
37
+
38
+ /* ── Recessed viewport ──
39
+ The instrument viewport sits below the card surface.
40
+ Use for component previews, showcases, and documentation. */
41
+
42
+ .strand-viewport {
43
+ background: var(--strand-surface-recessed);
44
+ box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
45
+ border-radius: var(--strand-radius-lg);
46
+ padding: var(--strand-space-6);
47
+ }