@times-design-system/components-wordpress 1.2.2-alpha.1 → 1.2.2-alpha.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.
@@ -1,30 +1,53 @@
1
- /* Input Block Styles */
1
+ /* Input Block Frontend Styles */
2
+ /* Using resolved design token values for self-contained styling */
3
+
4
+ .tds-input-wrapper {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 8px;
8
+ }
9
+
10
+ /* Label styles */
11
+ .tds-input__label {
12
+ color: #1a1a1a;
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 4px;
16
+ }
17
+
18
+ /* Input field styles */
2
19
  .tds-input {
3
- display: block;
4
20
  width: 100%;
5
- padding: var(--spacing-s) var(--spacing-m);
6
- border: 1px solid var(--color-border-primary);
7
- border-radius: var(--border-radius-s);
8
- font: var(--typography-body-standard);
9
- color: var(--color-text-primary);
10
- background-color: var(--color-fill-primary);
21
+ padding: 8px 12px;
22
+ color: #1a1a1a;
23
+ background-color: #ffffff;
24
+ border: 1px solid #999999;
25
+ border-radius: 0;
26
+ transition: all 0.2s ease-in-out;
27
+ box-sizing: border-box;
11
28
  }
12
29
 
30
+ /* Input focus state */
13
31
  .tds-input:focus {
14
32
  outline: none;
15
- border-color: var(--color-border-focus);
16
- box-shadow: 0 0 0 2px var(--color-fill-focus);
33
+ border-color: #0f4aa2;
34
+ box-shadow: 0 0 0 2px rgba(15, 74, 162, 0.1);
35
+ }
36
+
37
+ /* Input hover state */
38
+ .tds-input:hover:not(:disabled) {
39
+ border-color: #0f4aa2;
17
40
  }
18
41
 
42
+ /* Input disabled state */
19
43
  .tds-input:disabled {
20
- background-color: var(--color-fill-disabled);
21
- color: var(--color-text-disabled);
44
+ background-color: #f2f2f2;
45
+ color: #999999;
46
+ border-color: #cccccc;
22
47
  cursor: not-allowed;
23
48
  }
24
49
 
25
- .tds-input__label {
26
- display: block;
27
- margin-bottom: var(--spacing-s);
28
- font-weight: 600;
29
- color: var(--color-text-primary);
50
+ /* Input placeholder */
51
+ .tds-input::placeholder {
52
+ color: #666666;
30
53
  }
@@ -1,66 +1,119 @@
1
- /* Link Block Styles */
1
+ /* Link Block Frontend Styles */
2
+ /* These styles mirror the React Link component styles */
3
+
2
4
  .tds-link {
5
+ --tds-link-color-default: #286c96;
6
+ --tds-link-color-hover: #286c96;
7
+ --tds-link-color-pressed: #286c96;
8
+ --tds-link-color-visited: #286c96;
9
+ --tds-link-color-disabled: #bfbfbf;
10
+ --tds-link-underline-default: #286c96;
11
+ --tds-link-underline-hover: #286c96;
12
+ --tds-link-underline-pressed: #286c96;
13
+ --tds-link-underline-visited: #286c96;
14
+ --tds-link-focus-ring: #737373;
15
+ --tds-link-icon-size: 20px;
16
+
17
+ position: relative;
3
18
  display: inline-flex;
4
19
  align-items: center;
5
- gap: var(--spacing-xs);
6
- text-decoration: none;
20
+ gap: 4px;
21
+ color: var(--tds-link-color-default);
7
22
  cursor: pointer;
8
- transition: all 0.2s ease-in-out;
9
- }
10
-
11
- .tds-link--intent-primary {
12
- color: var(--color-text-link-primary);
23
+ font-family: Roboto;
24
+ font-size: 1.6rem;
25
+ font-weight: 400;
26
+ line-height: 1.5;
27
+ text-decoration: underline;
28
+ text-decoration-color: var(--tds-link-underline-default);
29
+ text-decoration-skip-ink: auto;
30
+ text-underline-offset: 4px;
31
+ text-decoration-thickness: 2px;
32
+ transition: color 0.36s cubic-bezier(0.22, 1, 0.36, 1), text-decoration-color 0.36s cubic-bezier(0.22, 1, 0.36, 1), text-decoration-thickness 0.36s cubic-bezier(0.22, 1, 0.36, 1);
13
33
  }
14
34
 
15
35
  .tds-link--intent-secondary {
16
- color: var(--color-text-link-secondary);
36
+ --tds-link-color-default: var(--interactive-link-secondary-text-default, #1a191a);
37
+ --tds-link-color-hover: var(--interactive-link-secondary-text-hover, #1a191a);
38
+ --tds-link-color-pressed: var(--interactive-link-secondary-text-pressed, #1a191a);
39
+ --tds-link-color-visited: var(--interactive-link-secondary-text-visited, var(--interactive-link-secondary-text-default, #1a191a));
40
+ --tds-link-underline-default: var(--interactive-link-secondary-underline-default, var(--tds-link-color-default));
41
+ --tds-link-underline-hover: var(--interactive-link-secondary-underline-hover, var(--tds-link-color-hover));
42
+ --tds-link-underline-pressed: var(--interactive-link-secondary-underline-pressed, var(--tds-link-color-pressed));
43
+ --tds-link-underline-visited: var(--interactive-link-secondary-underline-visited, var(--tds-link-color-visited));
17
44
  }
18
45
 
19
- .tds-link--intent-negative {
20
- color: var(--color-text-link-negative);
46
+ .tds-link--sentiment-brand {
47
+ font-family: var(--fontFamily020);
21
48
  }
22
49
 
23
- .tds-link--sentiment-positive {
24
- font-weight: 600;
50
+ .tds-link--sentiment-utility {
51
+ font-family: var(--fontFamily040);
52
+ font-weight: var(--fontWeight070);
25
53
  }
26
54
 
27
- .tds-link--sentiment-negative {
28
- font-weight: 400;
29
- opacity: 0.8;
55
+ .tds-link--size-xsmall {
56
+ font-size: 1.2rem;
57
+ gap: 4px;
58
+ --tds-link-icon-size: 16px;
30
59
  }
31
60
 
32
61
  .tds-link--size-small {
33
- font-size: 12px;
62
+ font-size: 1.4rem;
63
+ gap: 4px;
64
+ --tds-link-icon-size: 16px;
65
+ }
66
+
67
+ .tds-link--size-medium {
68
+ font-size: 1.6rem;
69
+ gap: 6px;
70
+ --tds-link-icon-size: 20px;
34
71
  }
35
72
 
36
73
  .tds-link--size-large {
37
- font-size: 18px;
74
+ font-size: 1.8rem;
75
+ gap: 8px;
76
+ --tds-link-icon-size: 24px;
38
77
  }
39
78
 
40
- .tds-link--state-hover {
41
- text-decoration: underline;
79
+ .tds-link__content {
80
+ white-space: nowrap;
42
81
  }
43
82
 
44
- .tds-link--state-visited {
45
- color: var(--color-text-link-visited);
83
+ .tds-link:hover:not(.tds-link--is-disabled) {
84
+ color: var(--tds-link-color-hover);
85
+ text-decoration-color: var(--tds-link-underline-hover);
86
+ text-decoration-thickness: var(--spacing-02);
46
87
  }
47
88
 
48
- .tds-link--state-focus {
49
- outline: 2px solid var(--color-border-focus);
50
- outline-offset: 2px;
89
+ .tds-link:active:not(.tds-link--is-disabled) {
90
+ color: var(--tds-link-color-pressed);
91
+ text-decoration-color: var(--tds-link-underline-pressed);
51
92
  }
52
93
 
53
- .tds-link--state-disabled {
54
- opacity: 0.5;
55
- cursor: not-allowed;
94
+ .tds-link:visited:not(.tds-link--is-disabled) {
95
+ color: var(--tds-link-color-visited);
96
+ text-decoration-color: var(--tds-link-underline-visited);
56
97
  }
57
98
 
58
- .tds-link--block {
59
- display: flex;
60
- width: 100%;
99
+ .tds-link:focus-visible:not(.tds-link--is-disabled) {
100
+ outline: none;
101
+ color: var(--tds-link-color-default);
102
+ text-decoration-color: var(--tds-link-underline-default);
61
103
  }
62
104
 
63
- .tds-link__icon-left,
64
- .tds-link__icon-right {
65
- font-size: 1em;
105
+ .tds-link:focus-visible:not(.tds-link--is-disabled)::after {
106
+ content: '';
107
+ position: absolute;
108
+ inset: -4px;
109
+ border: 2px solid #737373;
110
+ pointer-events: none;
111
+ }
112
+
113
+ .tds-link.tds-link--is-disabled,
114
+ .tds-link[aria-disabled='true'] {
115
+ color: var(--tds-link-color-disabled);
116
+ text-decoration-color: var(--tds-link-color-disabled);
117
+ cursor: not-allowed;
118
+ pointer-events: none;
66
119
  }
@@ -1,20 +1,7 @@
1
- /* Text Block Styles */
2
- .tds-text {
3
- margin: 0;
4
- padding: 0;
5
- }
6
-
7
- .tds-text--body-standard {
8
- font: var(--typography-body-standard);
9
- color: var(--color-text-primary);
10
- }
1
+ /* Text Block Frontend Styles */
2
+ /* Using resolved design token values for self-contained styling */
3
+ /* Text component is typography-based, minimal CSS needed */
11
4
 
12
- .tds-text--body-small {
13
- font: var(--typography-body-small);
14
- color: var(--color-text-secondary);
15
- }
16
-
17
- .tds-text--headline {
18
- font: var(--typography-headline);
19
- color: var(--color-text-primary);
5
+ .tds-text {
6
+ /* Base typography handled by design tokens and parent context */
20
7
  }
@@ -1,51 +1,67 @@
1
- /* Toast Block Styles */
1
+ /* Toast Block Frontend Styles */
2
+ /* Using resolved design token values for self-contained styling */
3
+
2
4
  .tds-toast {
3
- display: flex;
5
+ --tds-toast-fill: #22724f;
6
+ --tds-toast-text: #ffffff;
7
+ --tds-toast-link: #ffffff;
8
+
9
+ display: inline-flex;
4
10
  align-items: center;
5
- justify-content: space-between;
6
- gap: var(--spacing-m);
7
- padding: var(--spacing-m);
8
- border-radius: var(--border-radius-s);
9
- background-color: var(--color-fill-secondary);
10
- color: var(--color-text-primary);
11
- font: var(--typography-body-standard);
12
- margin-bottom: var(--spacing-m);
11
+ gap: 12px;
12
+ width: 373px;
13
+ min-height: 48px;
14
+ padding: 12px 16px;
15
+ border-radius: 4px;
16
+ background: var(--tds-toast-fill);
17
+ color: var(--tds-toast-text);
18
+ box-shadow: 0 16px 24px 0 rgb(0 0 0 / 8%);
19
+ box-sizing: border-box;
13
20
  }
14
21
 
15
- .tds-toast--intent-success {
16
- background-color: var(--color-fill-positive);
17
- color: var(--color-text-on-positive);
22
+ .tds-toast__content {
23
+ flex: 1 1 auto;
24
+ min-width: 0;
18
25
  }
19
26
 
20
- .tds-toast--intent-warning {
21
- background-color: var(--color-fill-warning);
22
- color: var(--color-text-on-warning);
27
+ .tds-toast__label {
28
+ font-family: Roboto;
29
+ font-size: 1.6rem;
30
+ line-height: 1.5;
31
+ font-weight: 400;
23
32
  }
24
33
 
25
- .tds-toast--intent-error {
26
- background-color: var(--color-fill-negative);
27
- color: var(--color-text-on-negative);
34
+ .tds-toast__link {
35
+ flex: 0 0 auto;
36
+ font-family: Roboto;
37
+ font-size: 1.6rem;
38
+ line-height: 1.5;
39
+ font-weight: 700;
40
+ text-decoration: underline;
41
+ color: var(--tds-toast-link);
42
+ cursor: pointer;
28
43
  }
29
44
 
30
- .tds-toast__content {
31
- flex: 1;
45
+ .tds-toast--intent-success {
46
+ --tds-toast-fill: #22724f;
47
+ --tds-toast-text: #ffffff;
48
+ --tds-toast-link: #ffffff;
32
49
  }
33
50
 
34
- .tds-toast__label {
35
- margin: 0;
51
+ .tds-toast--intent-info {
52
+ --tds-toast-fill: #0a3472;
53
+ --tds-toast-text: #ffffff;
54
+ --tds-toast-link: #ffffff;
36
55
  }
37
56
 
38
- .tds-toast__link {
39
- padding: var(--spacing-xs) var(--spacing-s);
40
- border: none;
41
- border-radius: var(--border-radius-xs);
42
- background-color: rgba(255, 255, 255, 0.1);
43
- color: inherit;
44
- cursor: pointer;
45
- transition: all 0.2s ease-in-out;
46
- white-space: nowrap;
57
+ .tds-toast--intent-warning {
58
+ --tds-toast-fill: #e49307;
59
+ --tds-toast-text: #000000;
60
+ --tds-toast-link: #000000;
47
61
  }
48
62
 
49
- .tds-toast__link:hover {
50
- background-color: rgba(255, 255, 255, 0.2);
63
+ .tds-toast--intent-error {
64
+ --tds-toast-fill: #cb0705;
65
+ --tds-toast-text: #ffffff;
66
+ --tds-toast-link: #ffffff;
51
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-design-system/components-wordpress",
3
- "version": "1.2.2-alpha.1+9cbea6d2",
3
+ "version": "1.2.2-alpha.5+82280028",
4
4
  "type": "module",
5
5
  "description": "Times Design System Gutenberg blocks for WordPress Full Site Editing",
6
6
  "keywords": [
@@ -48,7 +48,7 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@times-design-system/theme-scss": "^2.0.2-alpha.1+9cbea6d2",
51
+ "@times-design-system/theme-scss": "^2.0.2-alpha.5+82280028",
52
52
  "@wordpress/block-editor": "^12.0.0",
53
53
  "@wordpress/blocks": "^12.0.0",
54
54
  "@wordpress/components": "^25.0.0",
@@ -71,5 +71,5 @@
71
71
  "rollup-plugin-postcss": "^4.0.2",
72
72
  "typescript": "^5.0.0"
73
73
  },
74
- "gitHead": "9cbea6d2ce4e4370d1894cdad4f4603ff65d8dda"
74
+ "gitHead": "822800284be4dca5dd1498a5519a33ed85ac7069"
75
75
  }
@@ -1,27 +1,30 @@
1
- /* Ad Container Styles */
2
- .tds-ad-container {
3
- display: block;
4
- min-height: 250px;
5
- background-color: var(--color-fill-secondary);
6
- border: 1px dashed var(--color-border-secondary);
7
- border-radius: var(--border-radius-s);
8
- }
1
+ /* Ad Container Block Frontend Styles */
2
+ /* Using resolved design token values for self-contained styling */
9
3
 
10
- .tds-ad-container--header {
11
- min-height: 90px;
4
+ .tds-ad-container {
5
+ clear: both;
6
+ width: 100%;
7
+ min-height: 283px;
8
+ margin: 18px 0;
9
+ box-sizing: content-box;
10
+ padding: 0 0 8px;
11
+ border-bottom: 2px solid rgb(78, 78, 78);
12
12
  }
13
13
 
14
- .tds-ad-container--inline {
15
- min-height: 250px;
14
+ @media (min-width: 768px) and (max-width: 1023px) {
15
+ .tds-ad-container {
16
+ min-height: 123px;
17
+ }
16
18
  }
17
19
 
18
- .tds-ad-container__placeholder {
20
+ .tds-ad-container--header {
19
21
  display: flex;
20
- align-items: center;
21
- justify-content: center;
22
- width: 100%;
23
- height: 100%;
24
- text-align: center;
25
- color: var(--color-text-secondary);
26
- font: var(--typography-body-small);
22
+ padding-block: 8px 8px;
23
+ margin-left: 0 !important;
24
+ margin-right: 0 !important;
25
+ max-width: 100%;
26
+ border-width: 0 0 2px;
27
+ border-style: solid;
28
+ border-color: #dbdbdb;
29
+ flex-direction: column;
27
30
  }
@@ -0,0 +1,153 @@
1
+ /* Button Block Frontend Styles */
2
+ /* These styles mirror the React Button component styles */
3
+ /* Using resolved design token values for self-contained styling */
4
+
5
+ .tds-button {
6
+ --tds-button-bg: #005c8a;
7
+ --tds-button-fg: #ffffff;
8
+ --tds-button-border: transparent;
9
+ --tds-button-bg-hover: #004e75;
10
+ --tds-button-fg-hover: #ffffff;
11
+ --tds-button-border-hover: transparent;
12
+ --tds-button-bg-pressed: #00496e;
13
+ --tds-button-fg-pressed: #ffffff;
14
+ --tds-button-border-pressed: transparent;
15
+ --tds-button-border-focus: transparent;
16
+ --tds-button-focus-ring: #737373;
17
+ --tds-button-label-inline-padding: 8px;
18
+
19
+ position: relative;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ gap: 4px;
24
+ border-radius: 0;
25
+ border: 1px solid var(--tds-button-border);
26
+ background-color: var(--tds-button-bg);
27
+ color: var(--tds-button-fg);
28
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
29
+ font-weight: 500;
30
+ line-height: 1;
31
+ cursor: pointer;
32
+ text-decoration: none;
33
+ white-space: nowrap;
34
+ transition: 0.15s ease;
35
+ }
36
+
37
+ .tds-button:hover:not(:disabled) {
38
+ background-color: var(--tds-button-bg-hover);
39
+ border-color: var(--tds-button-border-hover);
40
+ color: var(--tds-button-fg-hover);
41
+ }
42
+
43
+ .tds-button:active:not(:disabled) {
44
+ background-color: var(--tds-button-bg-pressed);
45
+ border-color: var(--tds-button-border-pressed);
46
+ color: var(--tds-button-fg-pressed);
47
+ }
48
+
49
+ .tds-button:focus-visible {
50
+ outline: none;
51
+ background-color: var(--tds-button-bg-hover);
52
+ border-color: var(--tds-button-border-focus);
53
+ color: var(--tds-button-fg-hover);
54
+ }
55
+
56
+ .tds-button:focus-visible::after {
57
+ content: '';
58
+ position: absolute;
59
+ inset: -4px;
60
+ border: 2px solid #737373;
61
+ pointer-events: none;
62
+ }
63
+
64
+ .tds-button--loading {
65
+ cursor: wait;
66
+ gap: 0;
67
+ }
68
+
69
+ .tds-button--intent-primary {
70
+ --tds-button-bg: #005c8a;
71
+ --tds-button-fg: #ffffff;
72
+ --tds-button-border: transparent;
73
+ --tds-button-bg-hover: #004e75;
74
+ --tds-button-fg-hover: #ffffff;
75
+ --tds-button-border-hover: transparent;
76
+ --tds-button-bg-pressed: #00496e;
77
+ --tds-button-fg-pressed: #ffffff;
78
+ --tds-button-border-pressed: transparent;
79
+ }
80
+
81
+ .tds-button--intent-secondary {
82
+ --tds-button-bg: #ffffff;
83
+ --tds-button-fg: #1a1a1a;
84
+ --tds-button-border: #8c8c8c;
85
+ --tds-button-bg-hover: #d9d9d9;
86
+ --tds-button-fg-hover: #161616;
87
+ --tds-button-border-hover: #777777;
88
+ --tds-button-bg-pressed: #cccccc;
89
+ --tds-button-fg-pressed: #151515;
90
+ --tds-button-border-pressed: #707070;
91
+ --tds-button-border-focus: #8c8c8c;
92
+ }
93
+
94
+ .tds-button--intent-negative {
95
+ --tds-button-bg: #ffffff;
96
+ --tds-button-fg: #cb0705;
97
+ --tds-button-border: #cb0705;
98
+ --tds-button-bg-hover: #d9d9d9;
99
+ --tds-button-fg-hover: #ad0604;
100
+ --tds-button-border-hover: #ad0604;
101
+ --tds-button-bg-pressed: #cccccc;
102
+ --tds-button-fg-pressed: #a20604;
103
+ --tds-button-border-pressed: #a20604;
104
+ }
105
+
106
+ .tds-button--size-small {
107
+ min-height: 32px;
108
+ padding: 0 12px;
109
+ min-width: 80px;
110
+ font-size: 0.875rem;
111
+ --tds-button-label-inline-padding: 4px;
112
+ }
113
+
114
+ .tds-button--size-medium {
115
+ min-height: 48px;
116
+ min-width: 100px;
117
+ padding: 0 16px;
118
+ font-size: 1rem;
119
+ --tds-button-label-inline-padding: 8px;
120
+ }
121
+
122
+ .tds-button--size-large {
123
+ min-height: 64px;
124
+ min-width: 130px;
125
+ padding: 0 24px;
126
+ font-size: 1.125rem;
127
+ --tds-button-label-inline-padding: 8px;
128
+ }
129
+
130
+ .tds-button--behaviour-hug {
131
+ width: fit-content;
132
+ }
133
+
134
+ .tds-button--behaviour-full {
135
+ width: 100%;
136
+ }
137
+
138
+ .tds-button__label-container {
139
+ display: inline-flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ flex: 0 0 auto;
143
+ width: fit-content;
144
+ padding: 0 var(--tds-button-label-inline-padding);
145
+ }
146
+
147
+ .tds-button__label {
148
+ display: inline-flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ flex: 0 0 auto;
152
+ width: fit-content;
153
+ }