@times-design-system/components-wordpress 0.1.1-alpha.831 → 0.7.2-alpha.2

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 (189) hide show
  1. package/BLOCK_CREATION_CHECKLIST.md +160 -0
  2. package/BUILD.md +411 -0
  3. package/CHANGELOG.md +30 -0
  4. package/LICENSE +29 -0
  5. package/README.md +972 -5
  6. package/TRANSFORMATION_GUIDE.md +635 -0
  7. package/block.json +10 -0
  8. package/dist/block.json +10 -0
  9. package/dist/blocks/ad-container/block.json +28 -0
  10. package/dist/blocks/ad-container/edit.js +42 -0
  11. package/dist/blocks/ad-container/index.js +10 -0
  12. package/dist/blocks/ad-container/save.js +16 -0
  13. package/dist/blocks/ad-container/style-editor.css +4 -0
  14. package/dist/blocks/ad-container/style.css +27 -0
  15. package/dist/blocks/button/block.json +89 -0
  16. package/dist/blocks/button/edit.js +187 -0
  17. package/dist/blocks/button/index.js +11 -0
  18. package/dist/blocks/button/save.js +52 -0
  19. package/dist/blocks/button/style-editor.css +15 -0
  20. package/dist/blocks/button/style.css +37 -0
  21. package/dist/blocks/chip/block.json +57 -0
  22. package/dist/blocks/chip/edit.js +113 -0
  23. package/dist/blocks/chip/index.js +10 -0
  24. package/dist/blocks/chip/save.js +36 -0
  25. package/dist/blocks/chip/style-editor.css +5 -0
  26. package/dist/blocks/chip/style.css +48 -0
  27. package/dist/blocks/divider/block.json +31 -0
  28. package/dist/blocks/divider/edit.js +42 -0
  29. package/dist/blocks/divider/index.js +10 -0
  30. package/dist/blocks/divider/save.js +18 -0
  31. package/dist/blocks/divider/style-editor.css +4 -0
  32. package/dist/blocks/divider/style.css +25 -0
  33. package/dist/blocks/flag/block.json +48 -0
  34. package/dist/blocks/flag/edit.js +82 -0
  35. package/dist/blocks/flag/index.js +10 -0
  36. package/dist/blocks/flag/save.js +25 -0
  37. package/dist/blocks/flag/style-editor.css +5 -0
  38. package/dist/blocks/flag/style.css +45 -0
  39. package/dist/blocks/icon-button/block.json +43 -0
  40. package/dist/blocks/icon-button/edit.js +82 -0
  41. package/dist/blocks/icon-button/index.js +10 -0
  42. package/dist/blocks/icon-button/save.js +29 -0
  43. package/dist/blocks/icon-button/style-editor.css +5 -0
  44. package/dist/blocks/icon-button/style.css +32 -0
  45. package/dist/blocks/input/block.json +47 -0
  46. package/dist/blocks/input/edit.js +78 -0
  47. package/dist/blocks/input/index.js +10 -0
  48. package/dist/blocks/input/save.js +27 -0
  49. package/dist/blocks/input/style-editor.css +8 -0
  50. package/dist/blocks/input/style.css +30 -0
  51. package/dist/blocks/link/block.json +71 -0
  52. package/dist/blocks/link/edit.js +151 -0
  53. package/dist/blocks/link/index.js +10 -0
  54. package/dist/blocks/link/save.js +46 -0
  55. package/dist/blocks/link/style-editor.css +5 -0
  56. package/dist/blocks/link/style.css +66 -0
  57. package/dist/blocks/text/block.json +32 -0
  58. package/dist/blocks/text/edit.js +56 -0
  59. package/dist/blocks/text/index.js +10 -0
  60. package/dist/blocks/text/save.js +18 -0
  61. package/dist/blocks/text/style-editor.css +4 -0
  62. package/dist/blocks/text/style.css +20 -0
  63. package/dist/blocks/toast/block.json +39 -0
  64. package/dist/blocks/toast/edit.js +85 -0
  65. package/dist/blocks/toast/index.js +10 -0
  66. package/dist/blocks/toast/save.js +29 -0
  67. package/dist/blocks/toast/style-editor.css +4 -0
  68. package/dist/blocks/toast/style.css +51 -0
  69. package/dist/index.cjs +2232 -0
  70. package/dist/index.cjs.map +1 -0
  71. package/dist/index.css +2 -0
  72. package/dist/index.css.map +1 -0
  73. package/dist/index.js +2196 -255
  74. package/dist/index.js.map +1 -1
  75. package/dist/plugin.php +79 -0
  76. package/dist/utils/classBuilder.js +53 -0
  77. package/package.json +39 -7
  78. package/plugin.php +79 -0
  79. package/rollup.config.js +39 -22
  80. package/scripts/build-plugin.cjs +121 -0
  81. package/scripts/create-block.sh +141 -0
  82. package/src/blocks/ad-container/block.json +28 -0
  83. package/src/blocks/ad-container/edit.js +42 -0
  84. package/src/blocks/ad-container/index.js +10 -0
  85. package/src/blocks/ad-container/save.js +16 -0
  86. package/src/blocks/ad-container/style-editor.css +4 -0
  87. package/src/blocks/ad-container/style.css +27 -0
  88. package/src/blocks/button/block.json +89 -0
  89. package/src/blocks/button/edit.js +187 -0
  90. package/src/blocks/button/index.js +11 -0
  91. package/src/blocks/button/save.js +52 -0
  92. package/src/blocks/button/style-editor.css +15 -0
  93. package/src/blocks/button/style.css +37 -0
  94. package/src/blocks/chip/block.json +57 -0
  95. package/src/blocks/chip/edit.js +113 -0
  96. package/src/blocks/chip/index.js +10 -0
  97. package/src/blocks/chip/save.js +36 -0
  98. package/src/blocks/chip/style-editor.css +5 -0
  99. package/src/blocks/chip/style.css +48 -0
  100. package/src/blocks/divider/block.json +31 -0
  101. package/src/blocks/divider/edit.js +42 -0
  102. package/src/blocks/divider/index.js +10 -0
  103. package/src/blocks/divider/save.js +18 -0
  104. package/src/blocks/divider/style-editor.css +4 -0
  105. package/src/blocks/divider/style.css +25 -0
  106. package/src/blocks/flag/block.json +48 -0
  107. package/src/blocks/flag/edit.js +82 -0
  108. package/src/blocks/flag/index.js +10 -0
  109. package/src/blocks/flag/save.js +25 -0
  110. package/src/blocks/flag/style-editor.css +5 -0
  111. package/src/blocks/flag/style.css +45 -0
  112. package/src/blocks/icon-button/block.json +43 -0
  113. package/src/blocks/icon-button/edit.js +82 -0
  114. package/src/blocks/icon-button/index.js +10 -0
  115. package/src/blocks/icon-button/save.js +29 -0
  116. package/src/blocks/icon-button/style-editor.css +5 -0
  117. package/src/blocks/icon-button/style.css +32 -0
  118. package/src/blocks/input/block.json +47 -0
  119. package/src/blocks/input/edit.js +78 -0
  120. package/src/blocks/input/index.js +10 -0
  121. package/src/blocks/input/save.js +27 -0
  122. package/src/blocks/input/style-editor.css +8 -0
  123. package/src/blocks/input/style.css +30 -0
  124. package/src/blocks/link/block.json +71 -0
  125. package/src/blocks/link/edit.js +151 -0
  126. package/src/blocks/link/index.js +10 -0
  127. package/src/blocks/link/save.js +46 -0
  128. package/src/blocks/link/style-editor.css +5 -0
  129. package/src/blocks/link/style.css +66 -0
  130. package/src/blocks/text/block.json +32 -0
  131. package/src/blocks/text/edit.js +56 -0
  132. package/src/blocks/text/index.js +10 -0
  133. package/src/blocks/text/save.js +18 -0
  134. package/src/blocks/text/style-editor.css +4 -0
  135. package/src/blocks/text/style.css +20 -0
  136. package/src/blocks/toast/block.json +39 -0
  137. package/src/blocks/toast/edit.js +85 -0
  138. package/src/blocks/toast/index.js +10 -0
  139. package/src/blocks/toast/save.js +29 -0
  140. package/src/blocks/toast/style-editor.css +4 -0
  141. package/src/blocks/toast/style.css +51 -0
  142. package/src/index.js +15 -12
  143. package/src/utils/classBuilder.js +53 -0
  144. package/tsconfig.json +4 -4
  145. package/__tests__/wordpress.test.js +0 -0
  146. package/dist/AdContainer/AdContainer.d.ts +0 -9
  147. package/dist/Article/ArticleMetaContainer/ArticleMetaContainer.d.ts +0 -8
  148. package/dist/Article/UpNextArticles/UpNextArticles.d.ts +0 -13
  149. package/dist/Button/Button.d.ts +0 -15
  150. package/dist/CommentsDisabled/CommentsDisabled.d.ts +0 -10
  151. package/dist/CommentsDisabled/CommentsDisabled.stories.d.ts +0 -44
  152. package/dist/CommentsDisabled/index.d.ts +0 -2
  153. package/dist/Divider/Divider.d.ts +0 -15
  154. package/dist/Input/Input.d.ts +0 -25
  155. package/dist/Link/Link.d.ts +0 -18
  156. package/dist/Text/Text.d.ts +0 -14
  157. package/dist/index.cjs.js +0 -299
  158. package/dist/index.cjs.js.map +0 -1
  159. package/dist/styles.css +0 -151
  160. package/dist/typographyStyles.css +0 -30
  161. package/dist/utils/cn.d.ts +0 -1
  162. package/dist/utils/hooks.d.ts +0 -8
  163. package/src/AdContainer/AdContainer.tsx +0 -31
  164. package/src/AdContainer/styles.css +0 -58
  165. package/src/Article/ArticleMetaContainer/ArticleMetaContainer.tsx +0 -14
  166. package/src/Article/ArticleMetaContainer/styles.css +0 -151
  167. package/src/Article/UpNextArticles/UpNextArticles.tsx +0 -69
  168. package/src/Article/UpNextArticles/styles.css +0 -151
  169. package/src/Button/Button.tsx +0 -36
  170. package/src/Button/styles.css +0 -30
  171. package/src/CommentsDisabled/CommentsDisabled.stories.tsx +0 -178
  172. package/src/CommentsDisabled/CommentsDisabled.tsx +0 -63
  173. package/src/CommentsDisabled/IMPLEMENTATION_SUMMARY.md +0 -305
  174. package/src/CommentsDisabled/README.md +0 -284
  175. package/src/CommentsDisabled/TOKEN_MAPPING.md +0 -269
  176. package/src/CommentsDisabled/index.ts +0 -2
  177. package/src/CommentsDisabled/styles.css +0 -82
  178. package/src/Divider/Divider.tsx +0 -41
  179. package/src/Divider/styles.css +0 -80
  180. package/src/Input/Input.tsx +0 -62
  181. package/src/Input/styles.css +0 -69
  182. package/src/Link/Link.tsx +0 -49
  183. package/src/Link/styles.css +0 -111
  184. package/src/Text/Text.tsx +0 -38
  185. package/src/Text/styles.css +0 -30
  186. package/src/Text/typographyStyles.css +0 -30
  187. package/src/utils/cn.js +0 -3
  188. package/src/utils/cn.tsx +0 -3
  189. package/src/utils/hooks.ts +0 -34
@@ -1,58 +0,0 @@
1
- .ad-inline-container {
2
- clear: both;
3
- width: 100%;
4
- min-height: 283px;
5
- margin: 30px 0;
6
- box-sizing: content-box;
7
- padding: 0 0 10px;
8
- border-bottom: 1px solid rgb(78, 78, 78);
9
- }
10
- @media (min-width: 768px) and (max-width: 1023px) {
11
- .ad-inline-container {
12
- min-height: 123px;
13
- }
14
- }
15
-
16
- .ad-inline-container .ad-label {
17
- border-bottom: 1px solid rgb(78, 78, 78);
18
- color: rgb(204, 204, 204);
19
- flex: 1 1 100%;
20
- font: 14px/17px "TimesDigitalW04-Regular", "TimesDigitalW04-Regular-fallback", serif;
21
- letter-spacing: 0.6px;
22
- margin: 0 0 10px;
23
- padding: 0 0 5px;
24
- text-align: center;
25
- text-transform: uppercase;
26
- display: block;
27
- }
28
-
29
- .ad-header {
30
- display: flex;
31
- padding-block: 10px 10px;
32
- margin-left: 0 !important;
33
- margin-right: 0 !important;
34
- max-width: 100%;
35
- border-width: 0 0 1px;
36
- border-style: solid;
37
- border-color: var(--wp--preset--color--grey, #dbdbdb);
38
- flex-direction: column;
39
- }
40
- .ad-header-wrapper {
41
- min-height: 50px;
42
- align-items: center;
43
- flex: 1 1 0%;
44
- display: flex;
45
- flex-direction: column;
46
- justify-content: center;
47
- margin-bottom: 0;
48
- }
49
- @media (min-width: 768px) {
50
- .ad-header-wrapper {
51
- min-height: 90px;
52
- }
53
- }
54
- @media (min-width: 1024px) {
55
- .ad-header-wrapper {
56
- min-height: 250px;
57
- }
58
- }
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import './styles.css';
3
-
4
- interface ArticleMetaProps {
5
- children?: React.ReactNode;
6
- }
7
-
8
- /** Primary ArticleMeta UI component for user interaction */
9
-
10
- export const ArticleMetaContainer: React.FC<ArticleMetaProps> = ({
11
- children
12
- }) => {
13
- return <div className="article-meta-container">{children}</div>;
14
- };
@@ -1,151 +0,0 @@
1
- .video-article-container .video-article-up-next {
2
- width: 100%;
3
- background-color: rgb(29, 29, 27);
4
- position: relative;
5
- }
6
- .video-article-container .video-article-up-next * {
7
- width: 100%;
8
- }
9
- @media (min-width: 1024px) {
10
- .video-article-container .video-article-up-next {
11
- background-color: unset;
12
- flex-shrink: 0;
13
- width: 220px;
14
- order: 0;
15
- }
16
- }
17
- @media (min-width: 1320px) {
18
- .video-article-container .video-article-up-next {
19
- width: 270px;
20
- }
21
- }
22
- .video-article-container .video-article-up-next .vertical-divider {
23
- display: none;
24
- }
25
- @media (min-width: 768px) {
26
- .video-article-container .video-article-up-next .vertical-divider {
27
- position: absolute;
28
- display: block;
29
- height: 100%;
30
- width: 1px;
31
- background-color: #222;
32
- margin: 0 32px;
33
- left: -48px;
34
- }
35
- }
36
-
37
- .up-next-articles-container {
38
- padding: 20px;
39
- position: relative;
40
- }
41
- @media (min-width: 768px) {
42
- .up-next-articles-container {
43
- padding: 24px;
44
- }
45
- }
46
- @media (min-width: 1024px) {
47
- .up-next-articles-container {
48
- padding: 0;
49
- }
50
- }
51
- .up-next-articles-container .up-next-article-image {
52
- padding-bottom: 56.25%;
53
- position: relative;
54
- overflow: hidden;
55
- background-color: #333;
56
- }
57
- .up-next-articles-container .up-next-article-image picture {
58
- display: block;
59
- position: absolute;
60
- top: 0;
61
- left: 0;
62
- width: 100%;
63
- }
64
- .up-next-articles-container .up-next-article-image img {
65
- max-width: 100%;
66
- }
67
- .up-next-articles-container .up-next-articles-overlay {
68
- display: none;
69
- }
70
- @media (max-width: 1023px) {
71
- .up-next-articles-container .up-next-articles-overlay {
72
- position: absolute;
73
- top: 0;
74
- right: 0;
75
- height: 100%;
76
- width: 75px;
77
- z-index: 1;
78
- }
79
- }
80
- .up-next-articles-container .up-next-articles-overlay.up-next-articles-overlay-left {
81
- left: 0;
82
- background-image: linear-gradient(to right, rgb(29, 29, 27), transparent);
83
- }
84
- .up-next-articles-container .up-next-articles-overlay.up-next-articles-overlay-right {
85
- right: 0;
86
- background-image: linear-gradient(to left, rgb(29, 29, 27), transparent);
87
- }
88
- .up-next-articles-container.show-left-overlay .up-next-articles-overlay-left, .up-next-articles-container.show-right-overlay .up-next-articles-overlay-right {
89
- display: flex;
90
- }
91
- .up-next-articles-container .up-next-articles-scroll {
92
- overflow-x: auto;
93
- position: relative;
94
- scrollbar-width: none;
95
- }
96
- .up-next-articles-container .up-next-articles {
97
- display: grid;
98
- grid-template-columns: repeat(4, minmax(156px, 1fr));
99
- -moz-column-gap: 24px;
100
- column-gap: 24px;
101
- }
102
- @media (min-width: 1024px) {
103
- .up-next-articles-container .up-next-articles {
104
- gap: 24px 0;
105
- grid-template-columns: 1fr;
106
- }
107
- }
108
- .up-next-articles-container .up-next-articles .up-next-article {
109
- display: flex;
110
- flex-direction: column;
111
- gap: 8px;
112
- position: relative;
113
- }
114
- .up-next-articles-container .up-next-articles .up-next-article:not(:last-child)::after {
115
- content: "";
116
- position: absolute;
117
- background-color: #222;
118
- z-index: 1;
119
- height: 100%;
120
- width: 1px;
121
- right: -12px;
122
- }
123
- @media (min-width: 1024px) {
124
- .up-next-articles-container .up-next-articles .up-next-article:not(:last-child)::after {
125
- height: 1px;
126
- width: 100%;
127
- left: 0;
128
- bottom: -12px;
129
- }
130
- }
131
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container {
132
- position: relative;
133
- margin-bottom: 12px;
134
- }
135
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container .up-next-article-duration {
136
- z-index: 2;
137
- bottom: 0;
138
- left: 10px;
139
- position: absolute;
140
- }
141
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container .up-next-article-image-overlay {
142
- bottom: 0;
143
- position: absolute;
144
- width: 100%;
145
- height: 50%;
146
- background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
147
- z-index: 1;
148
- }
149
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container .up-next-article-image-container:hover .up-next-article-image-overlay {
150
- opacity: 1;
151
- }
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { Text } from '../../Text/Text';
3
- import './styles.css';
4
-
5
- interface UpNextArticlesProps {
6
- upNextArticles: {
7
- url: string;
8
- headline: string;
9
- duration?: string;
10
- thumbnail: string;
11
- }[];
12
- }
13
-
14
- /** Primary UpNextArticles UI component for user interaction */
15
-
16
- export const UpNextArticles: React.FC<UpNextArticlesProps> = ({
17
- upNextArticles
18
- }) => {
19
- if (!upNextArticles || upNextArticles.length === 0) {
20
- return;
21
- }
22
-
23
- return (
24
- <div className="video-article-up-next">
25
- <div className="vertical-divider"></div>
26
- <div className="up-next-articles-container show-right-overlay">
27
- <Text as="h4" classes="video-heading video-category">
28
- Up Next
29
- </Text>
30
- <div className="up-next-articles-overlay up-next-articles-overlay-left"></div>
31
- <div className="up-next-articles-scroll">
32
- <div className="up-next-articles">
33
- {upNextArticles.map((up_next_article, index) => (
34
- <div className="up-next-article" key={index}>
35
- <a href={up_next_article.url}>
36
- <div className="up-next-article-image-container">
37
- <Text classes="up-next-article-duration video-heading">
38
- {up_next_article.duration}
39
- </Text>
40
- <div className="up-next-article-image-overlay"></div>
41
- <div className="up-next-article-image">
42
- {up_next_article.thumbnail !== '' && (
43
- <picture>
44
- <source
45
- srcSet={up_next_article.thumbnail}
46
- type="image/webp"
47
- />
48
- <img
49
- loading="lazy"
50
- src={up_next_article.thumbnail}
51
- alt={up_next_article.headline}
52
- />
53
- </picture>
54
- )}
55
- </div>
56
- </div>
57
- <Text as="span" classes="article-heading">
58
- {up_next_article.headline}
59
- </Text>
60
- </a>
61
- </div>
62
- ))}
63
- </div>
64
- </div>
65
- <div className="up-next-articles-overlay up-next-articles-overlay-right"></div>
66
- </div>
67
- </div>
68
- );
69
- };
@@ -1,151 +0,0 @@
1
- .video-article-container .video-article-up-next {
2
- width: 100%;
3
- background-color: rgb(29, 29, 27);
4
- position: relative;
5
- }
6
- .video-article-container .video-article-up-next * {
7
- width: 100%;
8
- }
9
- @media (min-width: 1024px) {
10
- .video-article-container .video-article-up-next {
11
- background-color: unset;
12
- flex-shrink: 0;
13
- width: 220px;
14
- order: 0;
15
- }
16
- }
17
- @media (min-width: 1320px) {
18
- .video-article-container .video-article-up-next {
19
- width: 270px;
20
- }
21
- }
22
- .video-article-container .video-article-up-next .vertical-divider {
23
- display: none;
24
- }
25
- @media (min-width: 768px) {
26
- .video-article-container .video-article-up-next .vertical-divider {
27
- position: absolute;
28
- display: block;
29
- height: 100%;
30
- width: 1px;
31
- background-color: #222;
32
- margin: 0 32px;
33
- left: -48px;
34
- }
35
- }
36
-
37
- .up-next-articles-container {
38
- padding: 20px;
39
- position: relative;
40
- }
41
- @media (min-width: 768px) {
42
- .up-next-articles-container {
43
- padding: 24px;
44
- }
45
- }
46
- @media (min-width: 1024px) {
47
- .up-next-articles-container {
48
- padding: 0;
49
- }
50
- }
51
- .up-next-articles-container .up-next-article-image {
52
- padding-bottom: 56.25%;
53
- position: relative;
54
- overflow: hidden;
55
- background-color: #333;
56
- }
57
- .up-next-articles-container .up-next-article-image picture {
58
- display: block;
59
- position: absolute;
60
- top: 0;
61
- left: 0;
62
- width: 100%;
63
- }
64
- .up-next-articles-container .up-next-article-image img {
65
- max-width: 100%;
66
- }
67
- .up-next-articles-container .up-next-articles-overlay {
68
- display: none;
69
- }
70
- @media (max-width: 1023px) {
71
- .up-next-articles-container .up-next-articles-overlay {
72
- position: absolute;
73
- top: 0;
74
- right: 0;
75
- height: 100%;
76
- width: 75px;
77
- z-index: 1;
78
- }
79
- }
80
- .up-next-articles-container .up-next-articles-overlay.up-next-articles-overlay-left {
81
- left: 0;
82
- background-image: linear-gradient(to right, rgb(29, 29, 27), transparent);
83
- }
84
- .up-next-articles-container .up-next-articles-overlay.up-next-articles-overlay-right {
85
- right: 0;
86
- background-image: linear-gradient(to left, rgb(29, 29, 27), transparent);
87
- }
88
- .up-next-articles-container.show-left-overlay .up-next-articles-overlay-left, .up-next-articles-container.show-right-overlay .up-next-articles-overlay-right {
89
- display: flex;
90
- }
91
- .up-next-articles-container .up-next-articles-scroll {
92
- overflow-x: auto;
93
- position: relative;
94
- scrollbar-width: none;
95
- }
96
- .up-next-articles-container .up-next-articles {
97
- display: grid;
98
- grid-template-columns: repeat(4, minmax(156px, 1fr));
99
- -moz-column-gap: 24px;
100
- column-gap: 24px;
101
- }
102
- @media (min-width: 1024px) {
103
- .up-next-articles-container .up-next-articles {
104
- gap: 24px 0;
105
- grid-template-columns: 1fr;
106
- }
107
- }
108
- .up-next-articles-container .up-next-articles .up-next-article {
109
- display: flex;
110
- flex-direction: column;
111
- gap: 8px;
112
- position: relative;
113
- }
114
- .up-next-articles-container .up-next-articles .up-next-article:not(:last-child)::after {
115
- content: "";
116
- position: absolute;
117
- background-color: #222;
118
- z-index: 1;
119
- height: 100%;
120
- width: 1px;
121
- right: -12px;
122
- }
123
- @media (min-width: 1024px) {
124
- .up-next-articles-container .up-next-articles .up-next-article:not(:last-child)::after {
125
- height: 1px;
126
- width: 100%;
127
- left: 0;
128
- bottom: -12px;
129
- }
130
- }
131
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container {
132
- position: relative;
133
- margin-bottom: 12px;
134
- }
135
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container .up-next-article-duration {
136
- z-index: 2;
137
- bottom: 0;
138
- left: 10px;
139
- position: absolute;
140
- }
141
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container .up-next-article-image-overlay {
142
- bottom: 0;
143
- position: absolute;
144
- width: 100%;
145
- height: 50%;
146
- background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
147
- z-index: 1;
148
- }
149
- .up-next-articles-container .up-next-articles .up-next-article .up-next-article-image-container .up-next-article-image-container:hover .up-next-article-image-overlay {
150
- opacity: 1;
151
- }
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import './styles.css';
3
-
4
- interface ButtonProps {
5
- /** Is this the principal call to action on the page? */
6
- primary?: boolean;
7
- /** How large should the button be? */
8
- size?: 'small' | 'medium' | 'large';
9
- /** Button contents */
10
- label: string;
11
- /** Optional click handler */
12
- onClick?: () => void;
13
- }
14
-
15
- /** Primary UI component for user interaction */
16
- export const Button: React.FC<ButtonProps> = ({
17
- primary,
18
- size,
19
- label,
20
- ...props
21
- }) => {
22
- const mode = primary
23
- ? 'storybook-button--primary'
24
- : 'storybook-button--secondary';
25
- return (
26
- <button
27
- type="button"
28
- className={['storybook-button', `storybook-button--${size}`, mode].join(
29
- ' '
30
- )}
31
- {...props}
32
- >
33
- {label}
34
- </button>
35
- );
36
- };
@@ -1,30 +0,0 @@
1
- .storybook-button {
2
- display: inline-block;
3
- cursor: pointer;
4
- border: 0;
5
- border-radius: 3em;
6
- font-weight: 700;
7
- line-height: 1;
8
- font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
9
- }
10
- .storybook-button--primary {
11
- background-color: #555ab9;
12
- color: white;
13
- }
14
- .storybook-button--secondary {
15
- box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
16
- background-color: transparent;
17
- color: #333;
18
- }
19
- .storybook-button--small {
20
- padding: 10px 16px;
21
- font-size: 12px;
22
- }
23
- .storybook-button--medium {
24
- padding: 11px 20px;
25
- font-size: 14px;
26
- }
27
- .storybook-button--large {
28
- padding: 12px 24px;
29
- font-size: 16px;
30
- }
@@ -1,178 +0,0 @@
1
- import React from 'react';
2
- import { Meta, StoryObj } from '@storybook/react';
3
- import { CommentsDisabled } from './CommentsDisabled';
4
-
5
- /**
6
- * CommentsDisabled Component Storybook Stories
7
- * Showcases the component in various states and configurations
8
- */
9
-
10
- const meta: Meta<typeof CommentsDisabled> = {
11
- title: 'Components/CommentsDisabled',
12
- component: CommentsDisabled,
13
- argTypes: {
14
- heading: {
15
- control: { type: 'text' },
16
- description: 'Heading text for the disabled comments message'
17
- },
18
- contentText: {
19
- control: { type: 'text' },
20
- description: 'Content text before the guidelines link'
21
- },
22
- guidelinesUrl: {
23
- control: { type: 'text' },
24
- description: 'URL for the community guidelines link'
25
- },
26
- guidelinesLinkText: {
27
- control: { type: 'text' },
28
- description: 'Text for the community guidelines link'
29
- },
30
- className: {
31
- control: { type: 'text' },
32
- description: 'Additional CSS classes'
33
- }
34
- }
35
- };
36
-
37
- export default meta;
38
- type Story = StoryObj<typeof meta>;
39
-
40
- /**
41
- * Default
42
- * The default state of the CommentsDisabled component with all default text
43
- */
44
- export const Default: Story = {
45
- args: {
46
- heading: 'Comments are not enabled for this article',
47
- contentText:
48
- 'Comments are subject to our community guidelines, which can be viewed',
49
- guidelinesUrl: '/community-guidelines',
50
- guidelinesLinkText: 'here'
51
- }
52
- };
53
-
54
- /**
55
- * With Custom Heading
56
- * Demonstrates customizing the heading text
57
- */
58
- export const CustomHeading: Story = {
59
- args: {
60
- heading: 'Comments have been disabled for this story',
61
- contentText:
62
- 'Comments are subject to our community guidelines, which can be viewed',
63
- guidelinesUrl: '/community-guidelines',
64
- guidelinesLinkText: 'here'
65
- }
66
- };
67
-
68
- /**
69
- * With Custom Content
70
- * Demonstrates customizing the content text
71
- */
72
- export const CustomContent: Story = {
73
- args: {
74
- heading: 'Comments are not enabled for this article',
75
- contentText:
76
- 'This article has discussions disabled to maintain editorial focus. Please review our',
77
- guidelinesUrl: '/community-guidelines',
78
- guidelinesLinkText: 'community standards'
79
- }
80
- };
81
-
82
- /**
83
- * With External Link
84
- * Demonstrates opening the guidelines in a new window
85
- */
86
- export const ExternalLink: Story = {
87
- args: {
88
- heading: 'Comments are not enabled for this article',
89
- contentText:
90
- 'Comments are subject to our community guidelines, which can be viewed',
91
- guidelinesUrl: 'https://example.com/guidelines',
92
- guidelinesLinkText: 'here'
93
- }
94
- };
95
-
96
- /**
97
- * Minimal
98
- * Minimal version with shorter content
99
- */
100
- export const Minimal: Story = {
101
- args: {
102
- heading: 'Comments disabled',
103
- contentText: 'See our',
104
- guidelinesUrl: '/guidelines',
105
- guidelinesLinkText: 'community guidelines'
106
- }
107
- };
108
-
109
- /**
110
- * All Variations
111
- * Showcases different variations side-by-side
112
- */
113
- export const AllVariations: Story = {
114
- render: () => (
115
- <div
116
- style={{
117
- display: 'flex',
118
- flexDirection: 'column',
119
- gap: '48px',
120
- padding: '24px'
121
- }}
122
- >
123
- <div>
124
- <h2 style={{ marginBottom: '16px' }}>Default</h2>
125
- <CommentsDisabled
126
- heading="Comments are not enabled for this article"
127
- contentText="Comments are subject to our community guidelines, which can be viewed"
128
- guidelinesUrl="/community-guidelines"
129
- guidelinesLinkText="here"
130
- />
131
- </div>
132
-
133
- <div>
134
- <h2 style={{ marginBottom: '16px' }}>With Custom Heading</h2>
135
- <CommentsDisabled
136
- heading="Comments have been temporarily disabled"
137
- contentText="Comments are subject to our community guidelines, which can be viewed"
138
- guidelinesUrl="/community-guidelines"
139
- guidelinesLinkText="here"
140
- />
141
- </div>
142
-
143
- <div>
144
- <h2 style={{ marginBottom: '16px' }}>With Custom Content</h2>
145
- <CommentsDisabled
146
- heading="Comments are not enabled for this article"
147
- contentText="This article has discussions disabled. Please review our"
148
- guidelinesUrl="/community-guidelines"
149
- guidelinesLinkText="community standards"
150
- />
151
- </div>
152
-
153
- <div>
154
- <h2 style={{ marginBottom: '16px' }}>Minimal</h2>
155
- <CommentsDisabled
156
- heading="Comments disabled"
157
- contentText="See our"
158
- guidelinesUrl="/guidelines"
159
- guidelinesLinkText="guidelines"
160
- />
161
- </div>
162
- </div>
163
- )
164
- };
165
-
166
- /**
167
- * Interactive
168
- * Interactive story showing all customizable props
169
- */
170
- export const Interactive: Story = {
171
- args: {
172
- heading: 'Comments are not enabled for this article',
173
- contentText:
174
- 'Comments are subject to our community guidelines, which can be viewed',
175
- guidelinesUrl: '/community-guidelines',
176
- guidelinesLinkText: 'here'
177
- }
178
- };