@twreporter/react-components 8.21.0-rc.3 → 8.21.0-rc.4

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 (48) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/lib/badge/badge.stories.js +7 -13
  3. package/lib/bookmark-list/stories/bookmark.stories.js +10 -9
  4. package/lib/button/stories/iconButton.stories.js +19 -22
  5. package/lib/button/stories/iconWithTextButton.stories.js +21 -24
  6. package/lib/button/stories/link.stories.js +65 -67
  7. package/lib/button/stories/menuButton.stories.js +11 -16
  8. package/lib/button/stories/pillButton.stories.js +38 -41
  9. package/lib/button/stories/textButton.stories.js +48 -51
  10. package/lib/button/stories/toggleButton.stories.js +9 -15
  11. package/lib/card/stories/articleCard.stories.js +20 -18
  12. package/lib/card/stories/dialog.stories.js +15 -14
  13. package/lib/checkbox/checkbox.stories.js +10 -16
  14. package/lib/divider.stories.js +30 -28
  15. package/lib/empty-state/stories/empty-guide.stories.js +10 -15
  16. package/lib/icon/stories/arrow.stories.js +38 -42
  17. package/lib/icon/stories/article.stories.js +1 -9
  18. package/lib/icon/stories/bookmark.stories.js +30 -35
  19. package/lib/icon/stories/changeIconColor.stories.js +1 -5
  20. package/lib/icon/stories/clock.stories.js +1 -9
  21. package/lib/icon/stories/copy.stories.js +1 -9
  22. package/lib/icon/stories/cross.stories.js +1 -9
  23. package/lib/icon/stories/hamburger.stories.js +1 -9
  24. package/lib/icon/stories/home.stories.js +1 -9
  25. package/lib/icon/stories/letter.stories.js +1 -9
  26. package/lib/icon/stories/loading.stories.js +1 -9
  27. package/lib/icon/stories/member.stories.js +1 -9
  28. package/lib/icon/stories/printer.stories.js +1 -9
  29. package/lib/icon/stories/search.stories.js +1 -9
  30. package/lib/icon/stories/share.stories.js +1 -9
  31. package/lib/icon/stories/socialMedia.stories.js +1 -9
  32. package/lib/icon/stories/text.stories.js +1 -9
  33. package/lib/icon/stories/topic.stories.js +1 -9
  34. package/lib/input/stories/search-bar.stories.js +12 -17
  35. package/lib/input/stories/text-field.stories.js +15 -14
  36. package/lib/listing-page/stories/cardList.stories.js +52 -57
  37. package/lib/logo/stories/logoFooter.stories.js +1 -7
  38. package/lib/logo/stories/logoHeader.stories.js +5 -10
  39. package/lib/logo/stories/logoLoadingFallback.stories.js +1 -7
  40. package/lib/logo/stories/logoSymbol.stories.js +5 -10
  41. package/lib/mobile-member-role-card/stories/member-role-card.stories.js +10 -15
  42. package/lib/simple-header/simpleHeader.stories.js +3 -9
  43. package/lib/snack-bar/stories/snackBar.stories.js +18 -20
  44. package/lib/text/stories/headline.stories.js +72 -74
  45. package/lib/text/stories/paragraph.stories.js +48 -50
  46. package/lib/title-bar/stories/bar.stories.js +15 -19
  47. package/lib/title-bar/stories/tab.stories.js +252 -256
  48. package/package.json +19 -12
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.tab = exports.humanRightsTab = exports["default"] = exports.animalTab = void 0;
7
7
 
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _tab = _interopRequireDefault(require("../components/tab"));
11
9
 
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -16,262 +14,260 @@ var _default = {
16
14
  component: _tab["default"]
17
15
  };
18
16
  exports["default"] = _default;
19
-
20
- var Template = function Template(args) {
21
- return /*#__PURE__*/_react["default"].createElement(_tab["default"], args);
17
+ var tab = {
18
+ args: {
19
+ title: '主分類',
20
+ tabs: [{
21
+ text: '子分類1',
22
+ isExternal: true,
23
+ link: 'https://www.google.com'
24
+ }, {
25
+ text: '子分類2',
26
+ isExternal: true,
27
+ link: 'https://www.google.com'
28
+ }, {
29
+ text: '子分類3',
30
+ isExternal: true,
31
+ link: 'https://www.google.com'
32
+ }, {
33
+ text: '子分類4',
34
+ isExternal: true,
35
+ link: 'https://www.google.com'
36
+ }, {
37
+ text: '子分類5',
38
+ isExternal: true,
39
+ link: 'https://www.google.com'
40
+ }, {
41
+ text: '子分類6',
42
+ isExternal: true,
43
+ link: 'https://www.google.com'
44
+ }]
45
+ }
22
46
  };
23
-
24
- var tab = Template.bind({});
25
47
  exports.tab = tab;
26
- tab.args = {
27
- title: '主分類',
28
- tabs: [{
29
- text: '子分類1',
30
- isExternal: true,
31
- link: 'https://www.google.com'
32
- }, {
33
- text: '子分類2',
34
- isExternal: true,
35
- link: 'https://www.google.com'
36
- }, {
37
- text: '子分類3',
38
- isExternal: true,
39
- link: 'https://www.google.com'
40
- }, {
41
- text: '子分類4',
42
- isExternal: true,
43
- link: 'https://www.google.com'
44
- }, {
45
- text: '子分類5',
46
- isExternal: true,
47
- link: 'https://www.google.com'
48
- }, {
49
- text: '子分類6',
50
- isExternal: true,
51
- link: 'https://www.google.com'
52
- }]
48
+ var humanRightsTab = {
49
+ args: {
50
+ title: '人權司法',
51
+ tabs: [{
52
+ text: '全部',
53
+ isExternal: true,
54
+ link: 'https://www.google.com'
55
+ }, {
56
+ text: '性別',
57
+ isExternal: true,
58
+ link: 'https://www.google.com'
59
+ }, {
60
+ text: '勞動',
61
+ isExternal: true,
62
+ link: 'https://www.google.com'
63
+ }, {
64
+ text: '移工與移民',
65
+ isExternal: true,
66
+ link: 'https://www.google.com'
67
+ }, {
68
+ text: '居住正義',
69
+ isExternal: true,
70
+ link: 'https://www.google.com'
71
+ }, {
72
+ text: '轉型正義',
73
+ isExternal: true,
74
+ link: 'https://www.google.com'
75
+ }, {
76
+ text: '精神疾病',
77
+ isExternal: true,
78
+ link: 'https://www.google.com'
79
+ }, {
80
+ text: '司法改革',
81
+ isExternal: true,
82
+ link: 'https://www.google.com'
83
+ }, {
84
+ text: '數位人權',
85
+ isExternal: true,
86
+ link: 'https://www.google.com'
87
+ }]
88
+ }
53
89
  };
54
- var humanRightsTab = Template.bind({});
55
90
  exports.humanRightsTab = humanRightsTab;
56
- humanRightsTab.args = {
57
- title: '人權司法',
58
- tabs: [{
59
- text: '全部',
60
- isExternal: true,
61
- link: 'https://www.google.com'
62
- }, {
63
- text: '性別',
64
- isExternal: true,
65
- link: 'https://www.google.com'
66
- }, {
67
- text: '勞動',
68
- isExternal: true,
69
- link: 'https://www.google.com'
70
- }, {
71
- text: '移工與移民',
72
- isExternal: true,
73
- link: 'https://www.google.com'
74
- }, {
75
- text: '居住正義',
76
- isExternal: true,
77
- link: 'https://www.google.com'
78
- }, {
79
- text: '轉型正義',
80
- isExternal: true,
81
- link: 'https://www.google.com'
82
- }, {
83
- text: '精神疾病',
84
- isExternal: true,
85
- link: 'https://www.google.com'
86
- }, {
87
- text: '司法改革',
88
- isExternal: true,
89
- link: 'https://www.google.com'
90
- }, {
91
- text: '數位人權',
92
- isExternal: true,
93
- link: 'https://www.google.com'
94
- }]
91
+ var animalTab = {
92
+ args: {
93
+ title: '動物',
94
+ tabs: [{
95
+ text: '長頸鹿',
96
+ isExternal: true,
97
+ link: 'https://www.google.com'
98
+ }, {
99
+ text: '海豚',
100
+ isExternal: true,
101
+ link: 'https://www.google.com'
102
+ }, {
103
+ text: '猴子',
104
+ isExternal: true,
105
+ link: 'https://www.google.com'
106
+ }, {
107
+ text: '熊貓',
108
+ isExternal: true,
109
+ link: 'https://www.google.com'
110
+ }, {
111
+ text: '刺蝟',
112
+ isExternal: true,
113
+ link: 'https://www.google.com'
114
+ }, {
115
+ text: '天竺鼠',
116
+ isExternal: true,
117
+ link: 'https://www.google.com'
118
+ }, {
119
+ text: '比目魚',
120
+ isExternal: true,
121
+ link: 'https://www.google.com'
122
+ }, {
123
+ text: '眼鏡蛇',
124
+ isExternal: true,
125
+ link: 'https://www.google.com'
126
+ }, {
127
+ text: '虎鯨',
128
+ isExternal: true,
129
+ link: 'https://www.google.com'
130
+ }, {
131
+ text: '台北樹蛙',
132
+ isExternal: true,
133
+ link: 'https://www.google.com'
134
+ }, {
135
+ text: '雨傘節',
136
+ isExternal: true,
137
+ link: 'https://www.google.com'
138
+ }, {
139
+ text: '獨角獸',
140
+ isExternal: true,
141
+ link: 'https://www.google.com'
142
+ }, {
143
+ text: '蠑螈',
144
+ isExternal: true,
145
+ link: 'https://www.google.com'
146
+ }, {
147
+ text: '珊瑚蟲',
148
+ isExternal: true,
149
+ link: 'https://www.google.com'
150
+ }, {
151
+ text: '老鼠',
152
+ isExternal: true,
153
+ link: 'https://www.google.com'
154
+ }, {
155
+ text: '皮卡丘',
156
+ isExternal: true,
157
+ link: 'https://www.google.com'
158
+ }, {
159
+ text: '犀牛',
160
+ isExternal: true,
161
+ link: 'https://www.google.com'
162
+ }, {
163
+ text: '馬來膜',
164
+ isExternal: true,
165
+ link: 'https://www.google.com'
166
+ }, {
167
+ text: '孔雀',
168
+ isExternal: true,
169
+ link: 'https://www.google.com'
170
+ }, {
171
+ text: '臺灣黑熊',
172
+ isExternal: true,
173
+ link: 'https://www.google.com'
174
+ }, {
175
+ text: '黑面琵鷺',
176
+ isExternal: true,
177
+ link: 'https://www.google.com'
178
+ }, {
179
+ text: '大笨鳥',
180
+ isExternal: true,
181
+ link: 'https://www.google.com'
182
+ }, {
183
+ text: '麻雀',
184
+ isExternal: true,
185
+ link: 'https://www.google.com'
186
+ }, {
187
+ text: '綠繡眼',
188
+ isExternal: true,
189
+ link: 'https://www.google.com'
190
+ }, {
191
+ text: '五色鳥',
192
+ isExternal: true,
193
+ link: 'https://www.google.com'
194
+ }, {
195
+ text: '赤腹松鼠',
196
+ isExternal: true,
197
+ link: 'https://www.google.com'
198
+ }, {
199
+ text: '狐蒙',
200
+ isExternal: true,
201
+ link: 'https://www.google.com'
202
+ }, {
203
+ text: '無尾熊',
204
+ isExternal: true,
205
+ link: 'https://www.google.com'
206
+ }, {
207
+ text: '鼴鼠',
208
+ isExternal: true,
209
+ link: 'https://www.google.com'
210
+ }, {
211
+ text: '福壽螺',
212
+ isExternal: true,
213
+ link: 'https://www.google.com'
214
+ }, {
215
+ text: '羊駝',
216
+ isExternal: true,
217
+ link: 'https://www.google.com'
218
+ }, {
219
+ text: '孔雀魚',
220
+ isExternal: true,
221
+ link: 'https://www.google.com'
222
+ }, {
223
+ text: '紅嘴灰鵯',
224
+ isExternal: true,
225
+ link: 'https://www.google.com'
226
+ }, {
227
+ text: '津田氏竹節蟲',
228
+ isExternal: true,
229
+ link: 'https://www.google.com'
230
+ }, {
231
+ text: '田鼠',
232
+ isExternal: true,
233
+ link: 'https://www.google.com'
234
+ }, {
235
+ text: '曙光鳳蝶',
236
+ isExternal: true,
237
+ link: 'https://www.google.com'
238
+ }, {
239
+ text: '雙髻鯊',
240
+ isExternal: true,
241
+ link: 'https://www.google.com'
242
+ }, {
243
+ text: '北極熊',
244
+ isExternal: true,
245
+ link: 'https://www.google.com'
246
+ }, {
247
+ text: '人面蜘蛛',
248
+ isExternal: true,
249
+ link: 'https://www.google.com'
250
+ }, {
251
+ text: '吳郭魚',
252
+ isExternal: true,
253
+ link: 'https://www.google.com'
254
+ }, {
255
+ text: '狐狸',
256
+ isExternal: true,
257
+ link: 'https://www.google.com'
258
+ }, {
259
+ text: '黃鶯',
260
+ isExternal: true,
261
+ link: 'https://www.google.com'
262
+ }, {
263
+ text: '燕子',
264
+ isExternal: true,
265
+ link: 'https://www.google.com'
266
+ }, {
267
+ text: '鴿子',
268
+ isExternal: true,
269
+ link: 'https://www.google.com'
270
+ }]
271
+ }
95
272
  };
96
- var animalTab = Template.bind({});
97
- exports.animalTab = animalTab;
98
- animalTab.args = {
99
- title: '動物',
100
- tabs: [{
101
- text: '長頸鹿',
102
- isExternal: true,
103
- link: 'https://www.google.com'
104
- }, {
105
- text: '海豚',
106
- isExternal: true,
107
- link: 'https://www.google.com'
108
- }, {
109
- text: '猴子',
110
- isExternal: true,
111
- link: 'https://www.google.com'
112
- }, {
113
- text: '熊貓',
114
- isExternal: true,
115
- link: 'https://www.google.com'
116
- }, {
117
- text: '刺蝟',
118
- isExternal: true,
119
- link: 'https://www.google.com'
120
- }, {
121
- text: '天竺鼠',
122
- isExternal: true,
123
- link: 'https://www.google.com'
124
- }, {
125
- text: '比目魚',
126
- isExternal: true,
127
- link: 'https://www.google.com'
128
- }, {
129
- text: '眼鏡蛇',
130
- isExternal: true,
131
- link: 'https://www.google.com'
132
- }, {
133
- text: '虎鯨',
134
- isExternal: true,
135
- link: 'https://www.google.com'
136
- }, {
137
- text: '台北樹蛙',
138
- isExternal: true,
139
- link: 'https://www.google.com'
140
- }, {
141
- text: '雨傘節',
142
- isExternal: true,
143
- link: 'https://www.google.com'
144
- }, {
145
- text: '獨角獸',
146
- isExternal: true,
147
- link: 'https://www.google.com'
148
- }, {
149
- text: '蠑螈',
150
- isExternal: true,
151
- link: 'https://www.google.com'
152
- }, {
153
- text: '珊瑚蟲',
154
- isExternal: true,
155
- link: 'https://www.google.com'
156
- }, {
157
- text: '老鼠',
158
- isExternal: true,
159
- link: 'https://www.google.com'
160
- }, {
161
- text: '皮卡丘',
162
- isExternal: true,
163
- link: 'https://www.google.com'
164
- }, {
165
- text: '犀牛',
166
- isExternal: true,
167
- link: 'https://www.google.com'
168
- }, {
169
- text: '馬來膜',
170
- isExternal: true,
171
- link: 'https://www.google.com'
172
- }, {
173
- text: '孔雀',
174
- isExternal: true,
175
- link: 'https://www.google.com'
176
- }, {
177
- text: '臺灣黑熊',
178
- isExternal: true,
179
- link: 'https://www.google.com'
180
- }, {
181
- text: '黑面琵鷺',
182
- isExternal: true,
183
- link: 'https://www.google.com'
184
- }, {
185
- text: '大笨鳥',
186
- isExternal: true,
187
- link: 'https://www.google.com'
188
- }, {
189
- text: '麻雀',
190
- isExternal: true,
191
- link: 'https://www.google.com'
192
- }, {
193
- text: '綠繡眼',
194
- isExternal: true,
195
- link: 'https://www.google.com'
196
- }, {
197
- text: '五色鳥',
198
- isExternal: true,
199
- link: 'https://www.google.com'
200
- }, {
201
- text: '赤腹松鼠',
202
- isExternal: true,
203
- link: 'https://www.google.com'
204
- }, {
205
- text: '狐蒙',
206
- isExternal: true,
207
- link: 'https://www.google.com'
208
- }, {
209
- text: '無尾熊',
210
- isExternal: true,
211
- link: 'https://www.google.com'
212
- }, {
213
- text: '鼴鼠',
214
- isExternal: true,
215
- link: 'https://www.google.com'
216
- }, {
217
- text: '福壽螺',
218
- isExternal: true,
219
- link: 'https://www.google.com'
220
- }, {
221
- text: '羊駝',
222
- isExternal: true,
223
- link: 'https://www.google.com'
224
- }, {
225
- text: '孔雀魚',
226
- isExternal: true,
227
- link: 'https://www.google.com'
228
- }, {
229
- text: '紅嘴灰鵯',
230
- isExternal: true,
231
- link: 'https://www.google.com'
232
- }, {
233
- text: '津田氏竹節蟲',
234
- isExternal: true,
235
- link: 'https://www.google.com'
236
- }, {
237
- text: '田鼠',
238
- isExternal: true,
239
- link: 'https://www.google.com'
240
- }, {
241
- text: '曙光鳳蝶',
242
- isExternal: true,
243
- link: 'https://www.google.com'
244
- }, {
245
- text: '雙髻鯊',
246
- isExternal: true,
247
- link: 'https://www.google.com'
248
- }, {
249
- text: '北極熊',
250
- isExternal: true,
251
- link: 'https://www.google.com'
252
- }, {
253
- text: '人面蜘蛛',
254
- isExternal: true,
255
- link: 'https://www.google.com'
256
- }, {
257
- text: '吳郭魚',
258
- isExternal: true,
259
- link: 'https://www.google.com'
260
- }, {
261
- text: '狐狸',
262
- isExternal: true,
263
- link: 'https://www.google.com'
264
- }, {
265
- text: '黃鶯',
266
- isExternal: true,
267
- link: 'https://www.google.com'
268
- }, {
269
- text: '燕子',
270
- isExternal: true,
271
- link: 'https://www.google.com'
272
- }, {
273
- text: '鴿子',
274
- isExternal: true,
275
- link: 'https://www.google.com'
276
- }]
277
- };
273
+ exports.animalTab = animalTab;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter/react-components",
3
- "version": "8.21.0-rc.3",
3
+ "version": "8.21.0-rc.4",
4
4
  "main": "lib/index.js",
5
5
  "repository": "https://github.com/twreporter/twreporter-npm-packages.git",
6
6
  "author": "twreporter <developer@twreporter.org>",
@@ -10,8 +10,8 @@
10
10
  "build": "make build",
11
11
  "dev": "make dev",
12
12
  "prepublishOnly": "make build",
13
- "storybook": "start-storybook -p 3000",
14
- "build-storybook": "build-storybook",
13
+ "storybook": "storybook dev -p 3000",
14
+ "build-storybook": "storybook build",
15
15
  "chromatic": "npx chromatic --exit-zero-on-changes"
16
16
  },
17
17
  "dependencies": {
@@ -34,15 +34,22 @@
34
34
  ],
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.17.9",
37
- "@storybook/addon-actions": "^6.4.21",
38
- "@storybook/addon-essentials": "^6.4.21",
39
- "@storybook/addon-interactions": "^6.4.21",
40
- "@storybook/addon-links": "^6.4.21",
41
- "@storybook/addon-viewport": "^6.4.21",
42
- "@storybook/react": "^6.4.21",
43
- "@storybook/testing-library": "^0.0.9",
37
+ "@babel/preset-env": "^7.23.2",
38
+ "@babel/preset-react": "^7.22.15",
39
+ "@babel/preset-typescript": "^7.23.2",
40
+ "@storybook/addon-actions": "^7.5.2",
41
+ "@storybook/addon-essentials": "^7.5.2",
42
+ "@storybook/addon-interactions": "^7.5.2",
43
+ "@storybook/addon-links": "^7.5.2",
44
+ "@storybook/addon-mdx-gfm": "^7.5.2",
45
+ "@storybook/addon-viewport": "^7.5.2",
46
+ "@storybook/react": "^7.5.2",
47
+ "@storybook/react-webpack5": "^7.5.2",
48
+ "@storybook/testing-library": "^0.2.2",
44
49
  "babel-loader": "^8.2.4",
45
- "chromatic": "^6.5.4"
50
+ "chromatic": "^6.5.4",
51
+ "react-dom": "^16.0.0",
52
+ "storybook": "^7.5.2"
46
53
  },
47
- "gitHead": "79564b04f0e64befed05a08b9f934d38f9b8b6bc"
54
+ "gitHead": "c725d9e91d8d4024fc4f35f3b54a9a937b6f82e1"
48
55
  }