@cloudscape-design/components 3.0.229 → 3.0.231

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 (485) hide show
  1. package/alert/index.d.ts +1 -0
  2. package/alert/index.d.ts.map +1 -1
  3. package/alert/internal.d.ts +1 -0
  4. package/alert/internal.d.ts.map +1 -1
  5. package/alert/internal.js +3 -1
  6. package/alert/internal.js.map +1 -1
  7. package/annotation-context/annotation/annotation-icon.d.ts +1 -0
  8. package/annotation-context/annotation/annotation-icon.d.ts.map +1 -1
  9. package/annotation-context/annotation/closed-annotation.d.ts +1 -0
  10. package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
  11. package/annotation-context/index.d.ts +1 -11
  12. package/annotation-context/index.d.ts.map +1 -1
  13. package/annotation-context/index.js +1 -14
  14. package/annotation-context/index.js.map +1 -1
  15. package/annotation-context/interfaces.d.ts +1 -0
  16. package/annotation-context/interfaces.d.ts.map +1 -1
  17. package/annotation-context/utils.d.ts +13 -0
  18. package/annotation-context/utils.d.ts.map +1 -0
  19. package/annotation-context/utils.js +17 -0
  20. package/annotation-context/utils.js.map +1 -0
  21. package/app-layout/index.d.ts.map +1 -1
  22. package/app-layout/index.js +13 -1
  23. package/app-layout/index.js.map +1 -1
  24. package/app-layout/visual-refresh/app-bar.d.ts +1 -0
  25. package/app-layout/visual-refresh/app-bar.d.ts.map +1 -1
  26. package/app-layout/visual-refresh/background.d.ts +1 -0
  27. package/app-layout/visual-refresh/background.d.ts.map +1 -1
  28. package/app-layout/visual-refresh/header.d.ts +1 -0
  29. package/app-layout/visual-refresh/header.d.ts.map +1 -1
  30. package/app-layout/visual-refresh/main.d.ts +1 -0
  31. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  32. package/app-layout/visual-refresh/navigation.d.ts +1 -0
  33. package/app-layout/visual-refresh/navigation.d.ts.map +1 -1
  34. package/app-layout/visual-refresh/notifications.d.ts +1 -0
  35. package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
  36. package/app-layout/visual-refresh/styles.css.js +61 -61
  37. package/app-layout/visual-refresh/styles.scoped.css +187 -151
  38. package/app-layout/visual-refresh/styles.selectors.js +61 -61
  39. package/app-layout/visual-refresh/tools.d.ts.map +1 -1
  40. package/app-layout/visual-refresh/tools.js +1 -1
  41. package/app-layout/visual-refresh/tools.js.map +1 -1
  42. package/area-chart/chart-container.d.ts +1 -0
  43. package/area-chart/chart-container.d.ts.map +1 -1
  44. package/area-chart/elements/area-chart-filter.d.ts +1 -0
  45. package/area-chart/elements/area-chart-filter.d.ts.map +1 -1
  46. package/area-chart/elements/area-series.d.ts +1 -0
  47. package/area-chart/elements/area-series.d.ts.map +1 -1
  48. package/area-chart/elements/chart-popover.d.ts +1 -0
  49. package/area-chart/elements/chart-popover.d.ts.map +1 -1
  50. package/area-chart/elements/data-series.d.ts +1 -0
  51. package/area-chart/elements/data-series.d.ts.map +1 -1
  52. package/area-chart/elements/threshold-series.d.ts +1 -0
  53. package/area-chart/elements/threshold-series.d.ts.map +1 -1
  54. package/area-chart/elements/vertical-marker.d.ts +1 -0
  55. package/area-chart/elements/vertical-marker.d.ts.map +1 -1
  56. package/area-chart/index.d.ts +1 -0
  57. package/area-chart/index.d.ts.map +1 -1
  58. package/area-chart/internal.d.ts +1 -0
  59. package/area-chart/internal.d.ts.map +1 -1
  60. package/autosuggest/virtual-list.d.ts +1 -0
  61. package/autosuggest/virtual-list.d.ts.map +1 -1
  62. package/badge/index.d.ts +1 -0
  63. package/badge/index.d.ts.map +1 -1
  64. package/bar-chart/index.d.ts +1 -0
  65. package/bar-chart/index.d.ts.map +1 -1
  66. package/box/index.d.ts +1 -0
  67. package/box/index.d.ts.map +1 -1
  68. package/box/interfaces.d.ts +1 -0
  69. package/box/interfaces.d.ts.map +1 -1
  70. package/box/internal.d.ts +1 -0
  71. package/box/internal.d.ts.map +1 -1
  72. package/breadcrumb-group/index.d.ts +1 -0
  73. package/breadcrumb-group/index.d.ts.map +1 -1
  74. package/breadcrumb-group/internal.d.ts +1 -0
  75. package/breadcrumb-group/internal.d.ts.map +1 -1
  76. package/breadcrumb-group/item/item.d.ts +1 -0
  77. package/breadcrumb-group/item/item.d.ts.map +1 -1
  78. package/button-dropdown/category-elements/category-element.d.ts +1 -0
  79. package/button-dropdown/category-elements/category-element.d.ts.map +1 -1
  80. package/button-dropdown/category-elements/expandable-category-element.d.ts +1 -0
  81. package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  82. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -0
  83. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  84. package/button-dropdown/item-element/index.d.ts +1 -0
  85. package/button-dropdown/item-element/index.d.ts.map +1 -1
  86. package/button-dropdown/items-list.d.ts +1 -0
  87. package/button-dropdown/items-list.d.ts.map +1 -1
  88. package/button-dropdown/utils/use-hidden-description.d.ts +1 -0
  89. package/button-dropdown/utils/use-hidden-description.d.ts.map +1 -1
  90. package/calendar/grid/index.d.ts +1 -0
  91. package/calendar/grid/index.d.ts.map +1 -1
  92. package/calendar/header/header-button.d.ts +1 -0
  93. package/calendar/header/header-button.d.ts.map +1 -1
  94. package/calendar/header/index.d.ts +1 -0
  95. package/calendar/header/index.d.ts.map +1 -1
  96. package/calendar/index.d.ts +1 -0
  97. package/calendar/index.d.ts.map +1 -1
  98. package/calendar/internal.d.ts +1 -0
  99. package/calendar/internal.d.ts.map +1 -1
  100. package/code-editor/pane.d.ts +1 -0
  101. package/code-editor/pane.d.ts.map +1 -1
  102. package/code-editor/preferences-modal.d.ts +1 -0
  103. package/code-editor/preferences-modal.d.ts.map +1 -1
  104. package/code-editor/preferences-modal.js +10 -12
  105. package/code-editor/preferences-modal.js.map +1 -1
  106. package/collection-preferences/index.d.ts +1 -0
  107. package/collection-preferences/index.d.ts.map +1 -1
  108. package/collection-preferences/interfaces.d.ts +1 -0
  109. package/collection-preferences/interfaces.d.ts.map +1 -1
  110. package/collection-preferences/visible-content.d.ts +1 -0
  111. package/collection-preferences/visible-content.d.ts.map +1 -1
  112. package/column-layout/index.d.ts +1 -0
  113. package/column-layout/index.d.ts.map +1 -1
  114. package/container/index.d.ts +1 -0
  115. package/container/index.d.ts.map +1 -1
  116. package/content-layout/index.d.ts +1 -0
  117. package/content-layout/index.d.ts.map +1 -1
  118. package/content-layout/interfaces.d.ts +1 -0
  119. package/content-layout/interfaces.d.ts.map +1 -1
  120. package/content-layout/internal.d.ts +1 -0
  121. package/content-layout/internal.d.ts.map +1 -1
  122. package/date-range-picker/calendar/header/header-button.d.ts +1 -0
  123. package/date-range-picker/calendar/header/header-button.d.ts.map +1 -1
  124. package/date-range-picker/calendar/header/index.d.ts +1 -0
  125. package/date-range-picker/calendar/header/index.d.ts.map +1 -1
  126. package/date-range-picker/calendar/range-inputs.d.ts +1 -0
  127. package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
  128. package/date-range-picker/dropdown.d.ts +1 -0
  129. package/date-range-picker/dropdown.d.ts.map +1 -1
  130. package/date-range-picker/dropdown.js +4 -4
  131. package/date-range-picker/dropdown.js.map +1 -1
  132. package/date-range-picker/mode-switcher.d.ts +1 -0
  133. package/date-range-picker/mode-switcher.d.ts.map +1 -1
  134. package/date-range-picker/relative-range/index.d.ts +1 -0
  135. package/date-range-picker/relative-range/index.d.ts.map +1 -1
  136. package/expandable-section/index.d.ts +1 -0
  137. package/expandable-section/index.d.ts.map +1 -1
  138. package/expandable-section/internal.d.ts +1 -0
  139. package/expandable-section/internal.d.ts.map +1 -1
  140. package/flashbar/collapsible-flashbar.d.ts +1 -0
  141. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  142. package/flashbar/collapsible-flashbar.js +15 -4
  143. package/flashbar/collapsible-flashbar.js.map +1 -1
  144. package/flashbar/common.d.ts +2 -2
  145. package/flashbar/common.d.ts.map +1 -1
  146. package/flashbar/common.js +1 -2
  147. package/flashbar/common.js.map +1 -1
  148. package/flashbar/index.d.ts +1 -0
  149. package/flashbar/index.d.ts.map +1 -1
  150. package/flashbar/interfaces.d.ts +1 -1
  151. package/flashbar/interfaces.d.ts.map +1 -1
  152. package/flashbar/interfaces.js.map +1 -1
  153. package/flashbar/internal/analytics.js +1 -1
  154. package/flashbar/internal/analytics.js.map +1 -1
  155. package/flashbar/non-collapsible-flashbar.d.ts +2 -1
  156. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  157. package/flashbar/non-collapsible-flashbar.js +5 -2
  158. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  159. package/form/index.d.ts +1 -0
  160. package/form/index.d.ts.map +1 -1
  161. package/form/internal.d.ts +2 -1
  162. package/form/internal.d.ts.map +1 -1
  163. package/form/internal.js +4 -1
  164. package/form/internal.js.map +1 -1
  165. package/form-field/index.d.ts +1 -0
  166. package/form-field/index.d.ts.map +1 -1
  167. package/form-field/internal.d.ts.map +1 -1
  168. package/form-field/internal.js +9 -5
  169. package/form-field/internal.js.map +1 -1
  170. package/form-field/util.d.ts +1 -0
  171. package/form-field/util.d.ts.map +1 -1
  172. package/grid/index.d.ts +1 -0
  173. package/grid/index.d.ts.map +1 -1
  174. package/header/index.d.ts +1 -0
  175. package/header/index.d.ts.map +1 -1
  176. package/header/internal.d.ts +1 -0
  177. package/header/internal.d.ts.map +1 -1
  178. package/help-panel/index.d.ts +1 -0
  179. package/help-panel/index.d.ts.map +1 -1
  180. package/hotspot/index.d.ts +1 -0
  181. package/hotspot/index.d.ts.map +1 -1
  182. package/hotspot/interfaces.d.ts +1 -0
  183. package/hotspot/interfaces.d.ts.map +1 -1
  184. package/icon/index.d.ts +1 -0
  185. package/icon/index.d.ts.map +1 -1
  186. package/icon/internal.d.ts +1 -0
  187. package/icon/internal.d.ts.map +1 -1
  188. package/input/internal.d.ts.map +1 -1
  189. package/input/internal.js +4 -2
  190. package/input/internal.js.map +1 -1
  191. package/internal/base-component/index.d.ts.map +1 -1
  192. package/internal/base-component/index.js +2 -2
  193. package/internal/base-component/index.js.map +1 -1
  194. package/internal/components/cartesian-chart/axis-label.d.ts +1 -0
  195. package/internal/components/cartesian-chart/axis-label.d.ts.map +1 -1
  196. package/internal/components/cartesian-chart/bottom-labels.d.ts +1 -0
  197. package/internal/components/cartesian-chart/bottom-labels.d.ts.map +1 -1
  198. package/internal/components/cartesian-chart/emphasized-baseline.d.ts +1 -0
  199. package/internal/components/cartesian-chart/emphasized-baseline.d.ts.map +1 -1
  200. package/internal/components/cartesian-chart/interfaces.d.ts +1 -0
  201. package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
  202. package/internal/components/cartesian-chart/labels-measure.d.ts +1 -0
  203. package/internal/components/cartesian-chart/labels-measure.d.ts.map +1 -1
  204. package/internal/components/cartesian-chart/left-labels.d.ts +1 -0
  205. package/internal/components/cartesian-chart/left-labels.d.ts.map +1 -1
  206. package/internal/components/cartesian-chart/vertical-grid-lines.d.ts +1 -0
  207. package/internal/components/cartesian-chart/vertical-grid-lines.d.ts.map +1 -1
  208. package/internal/components/chart-filter/index.d.ts +1 -0
  209. package/internal/components/chart-filter/index.d.ts.map +1 -1
  210. package/internal/components/checkbox-icon/index.d.ts +1 -0
  211. package/internal/components/checkbox-icon/index.d.ts.map +1 -1
  212. package/internal/components/dropdown/index.d.ts +1 -0
  213. package/internal/components/dropdown/index.d.ts.map +1 -1
  214. package/internal/components/menu-dropdown/interfaces.d.ts +1 -0
  215. package/internal/components/menu-dropdown/interfaces.d.ts.map +1 -1
  216. package/internal/components/option/highlight-match.d.ts +1 -0
  217. package/internal/components/option/highlight-match.d.ts.map +1 -1
  218. package/internal/components/option/index.d.ts +1 -0
  219. package/internal/components/option/index.d.ts.map +1 -1
  220. package/internal/components/option/option-parts.d.ts +1 -0
  221. package/internal/components/option/option-parts.d.ts.map +1 -1
  222. package/internal/context/app-layout-context.d.ts +1 -0
  223. package/internal/context/app-layout-context.d.ts.map +1 -1
  224. package/internal/context/form-field-context.d.ts +1 -0
  225. package/internal/context/form-field-context.d.ts.map +1 -1
  226. package/internal/environment.js +1 -1
  227. package/internal/hooks/use-base-component/index.js +1 -1
  228. package/internal/hooks/use-base-component/index.js.map +1 -1
  229. package/internal/hooks/use-dynamic-overlap/index.d.ts +1 -0
  230. package/internal/hooks/use-dynamic-overlap/index.d.ts.map +1 -1
  231. package/internal/hooks/use-telemetry/index.js +2 -2
  232. package/internal/hooks/use-telemetry/index.js.map +1 -1
  233. package/internal/i18n/context.d.ts +15 -0
  234. package/internal/i18n/context.d.ts.map +1 -0
  235. package/internal/i18n/context.js +17 -0
  236. package/internal/i18n/context.js.map +1 -0
  237. package/internal/i18n/index.d.ts +2 -0
  238. package/internal/i18n/index.d.ts.map +1 -0
  239. package/internal/i18n/index.js +4 -0
  240. package/internal/i18n/index.js.map +1 -0
  241. package/internal/i18n/messages/all.all.d.ts +3 -0
  242. package/internal/i18n/messages/all.all.js +1953 -0
  243. package/internal/i18n/messages/all.all.json +1971 -0
  244. package/internal/i18n/messages/all.de.d.ts +3 -0
  245. package/internal/i18n/messages/all.de.js +167 -0
  246. package/internal/i18n/messages/all.de.json +167 -0
  247. package/internal/i18n/messages/all.en-GB.d.ts +3 -0
  248. package/internal/i18n/messages/all.en-GB.js +167 -0
  249. package/internal/i18n/messages/all.en-GB.json +167 -0
  250. package/internal/i18n/messages/all.en.d.ts +3 -0
  251. package/internal/i18n/messages/all.en.js +167 -0
  252. package/internal/i18n/messages/all.en.json +167 -0
  253. package/internal/i18n/messages/all.es.d.ts +3 -0
  254. package/internal/i18n/messages/all.es.js +167 -0
  255. package/internal/i18n/messages/all.es.json +167 -0
  256. package/internal/i18n/messages/all.fr.d.ts +3 -0
  257. package/internal/i18n/messages/all.fr.js +167 -0
  258. package/internal/i18n/messages/all.fr.json +167 -0
  259. package/internal/i18n/messages/all.id.d.ts +3 -0
  260. package/internal/i18n/messages/all.id.js +167 -0
  261. package/internal/i18n/messages/all.id.json +167 -0
  262. package/internal/i18n/messages/all.it.d.ts +3 -0
  263. package/internal/i18n/messages/all.it.js +167 -0
  264. package/internal/i18n/messages/all.it.json +167 -0
  265. package/internal/i18n/messages/all.ja.d.ts +3 -0
  266. package/internal/i18n/messages/all.ja.js +175 -0
  267. package/internal/i18n/messages/all.ja.json +175 -0
  268. package/internal/i18n/messages/all.ko.d.ts +3 -0
  269. package/internal/i18n/messages/all.ko.js +161 -0
  270. package/internal/i18n/messages/all.ko.json +167 -0
  271. package/internal/i18n/messages/all.pt-BR.d.ts +3 -0
  272. package/internal/i18n/messages/all.pt-BR.js +167 -0
  273. package/internal/i18n/messages/all.pt-BR.json +167 -0
  274. package/internal/i18n/messages/all.zh-CN.d.ts +3 -0
  275. package/internal/i18n/messages/all.zh-CN.js +163 -0
  276. package/internal/i18n/messages/all.zh-CN.json +169 -0
  277. package/internal/i18n/messages/all.zh-TW.d.ts +3 -0
  278. package/internal/i18n/messages/all.zh-TW.js +162 -0
  279. package/internal/i18n/messages/all.zh-TW.json +168 -0
  280. package/internal/i18n/provider.d.ts +20 -0
  281. package/internal/i18n/provider.d.ts.map +1 -0
  282. package/internal/i18n/provider.js +90 -0
  283. package/internal/i18n/provider.js.map +1 -0
  284. package/internal/manifest.json +1 -1
  285. package/line-chart/index.d.ts +1 -0
  286. package/line-chart/index.d.ts.map +1 -1
  287. package/mixed-line-bar-chart/bar-series.d.ts +1 -0
  288. package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
  289. package/mixed-line-bar-chart/data-series.d.ts +1 -0
  290. package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
  291. package/mixed-line-bar-chart/hooks/use-mouse-hover.d.ts +1 -0
  292. package/mixed-line-bar-chart/hooks/use-mouse-hover.d.ts.map +1 -1
  293. package/mixed-line-bar-chart/index.d.ts +1 -0
  294. package/mixed-line-bar-chart/index.d.ts.map +1 -1
  295. package/mixed-line-bar-chart/internal.d.ts +1 -0
  296. package/mixed-line-bar-chart/internal.d.ts.map +1 -1
  297. package/mixed-line-bar-chart/line-series.d.ts +1 -0
  298. package/mixed-line-bar-chart/line-series.d.ts.map +1 -1
  299. package/modal/index.d.ts +1 -0
  300. package/modal/index.d.ts.map +1 -1
  301. package/modal/internal.d.ts +2 -1
  302. package/modal/internal.d.ts.map +1 -1
  303. package/modal/internal.js +15 -10
  304. package/modal/internal.js.map +1 -1
  305. package/multiselect/internal.d.ts.map +1 -1
  306. package/multiselect/internal.js +2 -2
  307. package/multiselect/internal.js.map +1 -1
  308. package/package.json +31 -2
  309. package/pagination/index.d.ts +1 -0
  310. package/pagination/index.d.ts.map +1 -1
  311. package/pagination/internal.d.ts +1 -0
  312. package/pagination/internal.d.ts.map +1 -1
  313. package/pagination/internal.js +10 -5
  314. package/pagination/internal.js.map +1 -1
  315. package/pie-chart/index.d.ts +1 -0
  316. package/pie-chart/index.d.ts.map +1 -1
  317. package/pie-chart/interfaces.d.ts +1 -0
  318. package/pie-chart/interfaces.d.ts.map +1 -1
  319. package/popover/index.d.ts +1 -0
  320. package/popover/index.d.ts.map +1 -1
  321. package/popover/interfaces.d.ts +1 -0
  322. package/popover/interfaces.d.ts.map +1 -1
  323. package/popover/internal.d.ts.map +1 -1
  324. package/popover/internal.js +15 -10
  325. package/popover/internal.js.map +1 -1
  326. package/progress-bar/index.d.ts +1 -0
  327. package/progress-bar/index.d.ts.map +1 -1
  328. package/progress-bar/interfaces.d.ts +1 -0
  329. package/progress-bar/interfaces.d.ts.map +1 -1
  330. package/property-filter/controller.d.ts +16 -1
  331. package/property-filter/controller.d.ts.map +1 -1
  332. package/property-filter/controller.js +4 -2
  333. package/property-filter/controller.js.map +1 -1
  334. package/property-filter/index.d.ts.map +1 -1
  335. package/property-filter/index.js +23 -3
  336. package/property-filter/index.js.map +1 -1
  337. package/property-filter/interfaces.d.ts +24 -24
  338. package/property-filter/interfaces.d.ts.map +1 -1
  339. package/property-filter/interfaces.js.map +1 -1
  340. package/property-filter/property-editor.d.ts +1 -0
  341. package/property-filter/property-editor.d.ts.map +1 -1
  342. package/property-filter/token-editor.js +2 -2
  343. package/property-filter/token-editor.js.map +1 -1
  344. package/property-filter/token.d.ts +1 -0
  345. package/property-filter/token.d.ts.map +1 -1
  346. package/property-filter/token.js +2 -2
  347. package/property-filter/token.js.map +1 -1
  348. package/segmented-control/index.d.ts +1 -0
  349. package/segmented-control/index.d.ts.map +1 -1
  350. package/segmented-control/internal-segmented-control.d.ts +1 -0
  351. package/segmented-control/internal-segmented-control.d.ts.map +1 -1
  352. package/segmented-control/internal.d.ts +1 -0
  353. package/segmented-control/internal.d.ts.map +1 -1
  354. package/select/internal.d.ts.map +1 -1
  355. package/select/internal.js +6 -2
  356. package/select/internal.js.map +1 -1
  357. package/select/utils/render-options.d.ts +1 -0
  358. package/select/utils/render-options.d.ts.map +1 -1
  359. package/side-navigation/index.d.ts +1 -0
  360. package/side-navigation/index.d.ts.map +1 -1
  361. package/space-between/index.d.ts +1 -0
  362. package/space-between/index.d.ts.map +1 -1
  363. package/space-between/interfaces.d.ts +1 -0
  364. package/space-between/interfaces.d.ts.map +1 -1
  365. package/space-between/internal.d.ts +1 -0
  366. package/space-between/internal.d.ts.map +1 -1
  367. package/spinner/index.d.ts +1 -0
  368. package/spinner/index.d.ts.map +1 -1
  369. package/spinner/internal.d.ts +1 -0
  370. package/spinner/internal.d.ts.map +1 -1
  371. package/split-panel/icons/bottom-icon-refresh.d.ts +1 -0
  372. package/split-panel/icons/bottom-icon-refresh.d.ts.map +1 -1
  373. package/split-panel/icons/bottom-icon.d.ts +1 -0
  374. package/split-panel/icons/bottom-icon.d.ts.map +1 -1
  375. package/split-panel/icons/resize-handler.d.ts +1 -0
  376. package/split-panel/icons/resize-handler.d.ts.map +1 -1
  377. package/split-panel/icons/side-position-refresh.d.ts +1 -0
  378. package/split-panel/icons/side-position-refresh.d.ts.map +1 -1
  379. package/split-panel/icons/side-position.d.ts +1 -0
  380. package/split-panel/icons/side-position.d.ts.map +1 -1
  381. package/split-panel/index.d.ts +1 -0
  382. package/split-panel/index.d.ts.map +1 -1
  383. package/split-panel/preferences-modal.d.ts +1 -0
  384. package/split-panel/preferences-modal.d.ts.map +1 -1
  385. package/status-indicator/index.d.ts +1 -0
  386. package/status-indicator/index.d.ts.map +1 -1
  387. package/table/body-cell/index.d.ts +1 -0
  388. package/table/body-cell/index.d.ts.map +1 -1
  389. package/table/body-cell/inline-editor.d.ts +1 -0
  390. package/table/body-cell/inline-editor.d.ts.map +1 -1
  391. package/table/resizer/index.d.ts +1 -0
  392. package/table/resizer/index.d.ts.map +1 -1
  393. package/table/sticky-scrolling.d.ts +1 -0
  394. package/table/sticky-scrolling.d.ts.map +1 -1
  395. package/tabs/index.d.ts +1 -0
  396. package/tabs/index.d.ts.map +1 -1
  397. package/tabs/interfaces.d.ts +1 -0
  398. package/tabs/interfaces.d.ts.map +1 -1
  399. package/tabs/tab-header-bar.d.ts +1 -0
  400. package/tabs/tab-header-bar.d.ts.map +1 -1
  401. package/test-utils/dom/split-panel/index.js +2 -1
  402. package/test-utils/dom/split-panel/index.js.map +1 -1
  403. package/test-utils/selectors/split-panel/index.js +2 -1
  404. package/test-utils/selectors/split-panel/index.js.map +1 -1
  405. package/test-utils/tsconfig.tsbuildinfo +1 -1
  406. package/text-content/index.d.ts +1 -0
  407. package/text-content/index.d.ts.map +1 -1
  408. package/token-group/dismiss-button.d.ts +1 -0
  409. package/token-group/dismiss-button.d.ts.map +1 -1
  410. package/token-group/index.d.ts +1 -0
  411. package/token-group/index.d.ts.map +1 -1
  412. package/token-group/internal.d.ts +1 -0
  413. package/token-group/internal.d.ts.map +1 -1
  414. package/token-group/toggle.d.ts +1 -0
  415. package/token-group/toggle.d.ts.map +1 -1
  416. package/top-navigation/1.0-beta/index.d.ts +1 -0
  417. package/top-navigation/1.0-beta/index.d.ts.map +1 -1
  418. package/top-navigation/1.0-beta/interfaces.d.ts +1 -0
  419. package/top-navigation/1.0-beta/interfaces.d.ts.map +1 -1
  420. package/top-navigation/1.0-beta/internal.d.ts +1 -0
  421. package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
  422. package/top-navigation/1.0-beta/parts/utility.d.ts +1 -0
  423. package/top-navigation/1.0-beta/parts/utility.d.ts.map +1 -1
  424. package/top-navigation/index.d.ts +1 -0
  425. package/top-navigation/index.d.ts.map +1 -1
  426. package/top-navigation/interfaces.d.ts +1 -0
  427. package/top-navigation/interfaces.d.ts.map +1 -1
  428. package/top-navigation/internal.d.ts +1 -0
  429. package/top-navigation/internal.d.ts.map +1 -1
  430. package/top-navigation/parts/overflow-menu/index.d.ts +1 -0
  431. package/top-navigation/parts/overflow-menu/index.d.ts.map +1 -1
  432. package/top-navigation/parts/overflow-menu/views/submenu.d.ts +1 -0
  433. package/top-navigation/parts/overflow-menu/views/submenu.d.ts.map +1 -1
  434. package/top-navigation/parts/overflow-menu/views/utilities.d.ts +1 -0
  435. package/top-navigation/parts/overflow-menu/views/utilities.d.ts.map +1 -1
  436. package/top-navigation/parts/utility.d.ts +1 -0
  437. package/top-navigation/parts/utility.d.ts.map +1 -1
  438. package/tutorial-panel/components/tutorial-detail-view/index.d.ts +1 -0
  439. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  440. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +1 -0
  441. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
  442. package/tutorial-panel/components/tutorial-detail-view/task-list.js +1 -1
  443. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  444. package/tutorial-panel/components/tutorial-detail-view/task.d.ts +1 -0
  445. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  446. package/tutorial-panel/components/tutorial-list/index.d.ts +1 -0
  447. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  448. package/tutorial-panel/index.d.ts +1 -0
  449. package/tutorial-panel/index.d.ts.map +1 -1
  450. package/wizard/index.d.ts +1 -0
  451. package/wizard/index.d.ts.map +1 -1
  452. package/wizard/internal/analytics.js +1 -1
  453. package/wizard/internal/analytics.js.map +1 -1
  454. package/wizard/wizard-actions.d.ts +1 -0
  455. package/wizard/wizard-actions.d.ts.map +1 -1
  456. package/wizard/wizard-navigation.d.ts +1 -0
  457. package/wizard/wizard-navigation.d.ts.map +1 -1
  458. package/internal/base-component/init-awsui-versions.d.ts +0 -2
  459. package/internal/base-component/init-awsui-versions.d.ts.map +0 -1
  460. package/internal/base-component/init-awsui-versions.js +0 -15
  461. package/internal/base-component/init-awsui-versions.js.map +0 -1
  462. package/internal/hooks/use-base-component/component-metadata.d.ts +0 -3
  463. package/internal/hooks/use-base-component/component-metadata.d.ts.map +0 -1
  464. package/internal/hooks/use-base-component/component-metadata.js +0 -21
  465. package/internal/hooks/use-base-component/component-metadata.js.map +0 -1
  466. package/internal/hooks/use-telemetry/telemetry.d.ts +0 -8
  467. package/internal/hooks/use-telemetry/telemetry.d.ts.map +0 -1
  468. package/internal/hooks/use-telemetry/telemetry.js +0 -19
  469. package/internal/hooks/use-telemetry/telemetry.js.map +0 -1
  470. package/internal/metrics/index.d.ts +0 -3
  471. package/internal/metrics/index.d.ts.map +0 -1
  472. package/internal/metrics/index.js +0 -5
  473. package/internal/metrics/index.js.map +0 -1
  474. package/internal/metrics/log-clients.d.ts +0 -39
  475. package/internal/metrics/log-clients.d.ts.map +0 -1
  476. package/internal/metrics/log-clients.js +0 -81
  477. package/internal/metrics/log-clients.js.map +0 -1
  478. package/internal/metrics/metrics-formatters.d.ts +0 -7
  479. package/internal/metrics/metrics-formatters.d.ts.map +0 -1
  480. package/internal/metrics/metrics-formatters.js +0 -33
  481. package/internal/metrics/metrics-formatters.js.map +0 -1
  482. package/internal/metrics/metrics.d.ts +0 -28
  483. package/internal/metrics/metrics.d.ts.map +0 -1
  484. package/internal/metrics/metrics.js +0 -89
  485. package/internal/metrics/metrics.js.map +0 -1
@@ -0,0 +1,169 @@
1
+ {
2
+ "@cloudscape-design/components": {
3
+ "zh-CN": {
4
+ "alert": { "dismissAriaLabel": [{ "type": 0, "value": "退出提示" }] },
5
+ "autosuggest": {
6
+ "stepNumberLabel": [
7
+ { "type": 0, "value": "第 " },
8
+ { "type": 1, "value": "stepNumber" },
9
+ { "type": 0, "value": " 步" }
10
+ ],
11
+ "collapsedStepsLabel": [
12
+ { "type": 0, "value": "第 " },
13
+ { "type": 1, "value": "stepNumber" },
14
+ { "type": 0, "value": " 步,共 " },
15
+ { "type": 1, "value": "stepsCount" },
16
+ { "type": 0, "value": " 步" }
17
+ ],
18
+ "cancelButton": [{ "type": 0, "value": "取消" }],
19
+ "previousButton": [{ "type": 0, "value": "上一步" }],
20
+ "nextButton": [{ "type": 0, "value": "下一步" }],
21
+ "optional": [{ "type": 0, "value": "可选" }]
22
+ },
23
+ "app-layout": {
24
+ "ariaLabels.navigation": [{ "type": 0, "value": "侧导航" }],
25
+ "ariaLabels.navigationClose": [{ "type": 0, "value": "关闭侧导航" }],
26
+ "ariaLabels.navigationToggle": [{ "type": 0, "value": "打开侧导航" }],
27
+ "ariaLabels.notifications": [{ "type": 0, "value": "通知" }],
28
+ "ariaLabels.tools": [{ "type": 0, "value": "帮助面板" }],
29
+ "ariaLabels.toolsClose": [{ "type": 0, "value": "打开帮助面板" }],
30
+ "ariaLabels.toolsToggle": [{ "type": 0, "value": "关闭帮助面板" }]
31
+ },
32
+ "date-picker": {
33
+ "nextMonthAriaLabel": [{ "type": 0, "value": "下个月" }],
34
+ "previousMonthAriaLabel": [{ "type": 0, "value": "上个月" }],
35
+ "todayAriaLabel": [{ "type": 0, "value": "今天" }]
36
+ },
37
+ "flashbar": {
38
+ "i18nStrings.ariaLabel": [{ "type": 0, "value": "通知" }],
39
+ "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "错误" }],
40
+ "i18nStrings.inProgressIconAriaLabel": [{ "type": 0, "value": "进行中" }],
41
+ "i18nStrings.infoIconAriaLabel": [{ "type": 0, "value": "信息" }],
42
+ "i18nStrings.notificationBarAriaLabel": [{ "type": 0, "value": "所有通知" }],
43
+ "i18nStrings.notificationBarText": [{ "type": 0, "value": "通知" }],
44
+ "i18nStrings.successIconAriaLabel": [{ "type": 0, "value": "成功" }],
45
+ "i18nStrings.warningIconAriaLabel": [{ "type": 0, "value": "警告" }]
46
+ },
47
+ "form": { "errorIconAriaLabel": [{ "type": 0, "value": "错误" }] },
48
+ "form-field": { "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "错误" }] },
49
+ "input": { "clearAriaLabel": [{ "type": 0, "value": "清除" }] },
50
+ "modal": { "closeAriaLabel": [{ "type": 0, "value": "关闭模态" }] },
51
+ "pagination": {
52
+ "ariaLabels.nextPageLabel": [{ "type": 0, "value": "下一页" }],
53
+ "ariaLabels.pageLabel": [
54
+ { "type": 0, "value": "第 " },
55
+ { "type": 1, "value": "pageNumber" },
56
+ { "type": 0, "value": " 页" }
57
+ ],
58
+ "ariaLabels.previousPageLabel": [{ "type": 0, "value": "上一页" }]
59
+ },
60
+ "popover": { "dismissAriaLabel": [{ "type": 0, "value": "关闭弹出框" }] },
61
+ "property-filter": {
62
+ "i18nStrings.allPropertiesLabel": [{ "type": 0, "value": "所有属性" }],
63
+ "i18nStrings.applyActionText": [{ "type": 0, "value": "应用" }],
64
+ "i18nStrings.cancelActionText": [{ "type": 0, "value": "取消" }],
65
+ "i18nStrings.clearFiltersText": [{ "type": 0, "value": "清除筛选条件" }],
66
+ "i18nStrings.editTokenHeader": [{ "type": 0, "value": "编辑筛选条件" }],
67
+ "i18nStrings.groupPropertiesText": [{ "type": 0, "value": "属性" }],
68
+ "i18nStrings.groupValuesText": [{ "type": 0, "value": "值" }],
69
+ "i18nStrings.operationAndText": [{ "type": 0, "value": "和" }],
70
+ "i18nStrings.operationOrText": [{ "type": 0, "value": "或" }],
71
+ "i18nStrings.operatorContainsText": [{ "type": 0, "value": "包含" }],
72
+ "i18nStrings.operatorDoesNotContainText": [{ "type": 0, "value": "不包含" }],
73
+ "i18nStrings.operatorDoesNotEqualText": [{ "type": 0, "value": "不等于" }],
74
+ "i18nStrings.operatorEqualsText": [{ "type": 0, "value": "等于" }],
75
+ "i18nStrings.operatorGreaterOrEqualText": [{ "type": 0, "value": "大于或等于" }],
76
+ "i18nStrings.operatorGreaterText": [{ "type": 0, "value": "大于" }],
77
+ "i18nStrings.operatorLessOrEqualText": [{ "type": 0, "value": "小于或等于" }],
78
+ "i18nStrings.operatorLessText": [{ "type": 0, "value": "小于" }],
79
+ "i18nStrings.operatorText": [{ "type": 0, "value": "运算符" }],
80
+ "i18nStrings.operatorsText": [{ "type": 0, "value": "运算符" }],
81
+ "i18nStrings.propertyText": [{ "type": 0, "value": "属性" }],
82
+ "i18nStrings.tokenLimitShowFewer": [{ "type": 0, "value": "显示更少" }],
83
+ "i18nStrings.tokenLimitShowMore": [{ "type": 0, "value": "显示更多" }],
84
+ "i18nStrings.valueText": [{ "type": 0, "value": "值" }],
85
+ "i18nStrings.removeTokenButtonAriaLabel": [
86
+ {
87
+ "type": 5,
88
+ "value": "token__operator",
89
+ "options": {
90
+ "equals": {
91
+ "value": [
92
+ { "type": 0, "value": "删除筛选条件," },
93
+ { "type": 1, "value": "token__propertyKey" },
94
+ { "type": 0, "value": "等于" },
95
+ { "type": 1, "value": "token__value" }
96
+ ]
97
+ },
98
+ "not_equals": {
99
+ "value": [
100
+ { "type": 0, "value": "删除筛选条件," },
101
+ { "type": 1, "value": "token__propertyKey" },
102
+ { "type": 0, "value": "不等于" },
103
+ { "type": 1, "value": "token__value" }
104
+ ]
105
+ },
106
+ "greater_than": {
107
+ "value": [
108
+ { "type": 0, "value": "删除筛选条件," },
109
+ { "type": 1, "value": "token__propertyKey" },
110
+ { "type": 0, "value": "大于" },
111
+ { "type": 1, "value": "token__value" }
112
+ ]
113
+ },
114
+ "greater_than_equal": {
115
+ "value": [
116
+ { "type": 0, "value": "删除筛选条件," },
117
+ { "type": 1, "value": "token__propertyKey" },
118
+ { "type": 0, "value": "大于或等于" },
119
+ { "type": 1, "value": "token__value" }
120
+ ]
121
+ },
122
+ "less_than": {
123
+ "value": [
124
+ { "type": 0, "value": "删除筛选条件," },
125
+ { "type": 1, "value": "token__propertyKey" },
126
+ { "type": 0, "value": "小于" },
127
+ { "type": 1, "value": "token__value" }
128
+ ]
129
+ },
130
+ "less_than_equal": {
131
+ "value": [
132
+ { "type": 0, "value": "删除筛选条件," },
133
+ { "type": 1, "value": "token__propertyKey" },
134
+ { "type": 0, "value": "小于或等于" },
135
+ { "type": 1, "value": "token__value" }
136
+ ]
137
+ },
138
+ "contains": {
139
+ "value": [
140
+ { "type": 0, "value": "删除筛选条件," },
141
+ { "type": 1, "value": "token__propertyKey" },
142
+ { "type": 0, "value": "包含" },
143
+ { "type": 1, "value": "token__value" }
144
+ ]
145
+ },
146
+ "not_contains": {
147
+ "value": [
148
+ { "type": 0, "value": "删除筛选条件," },
149
+ { "type": 1, "value": "token__propertyKey" },
150
+ { "type": 0, "value": "不包含" },
151
+ { "type": 1, "value": "token__value" }
152
+ ]
153
+ },
154
+ "other": { "value": [] }
155
+ }
156
+ }
157
+ ]
158
+ },
159
+ "select": {
160
+ "errorIconAriaLabel": [{ "type": 0, "value": "错误" }],
161
+ "selectedAriaLabel": [{ "type": 0, "value": "已选定" }]
162
+ },
163
+ "wizard": {
164
+ "errorIconAriaLabel": [{ "type": 0, "value": "错误" }],
165
+ "selectedAriaLabel": [{ "type": 0, "value": "已选定" }]
166
+ }
167
+ }
168
+ }
169
+ }
@@ -0,0 +1,3 @@
1
+ import { I18nProviderProps } from '../provider';
2
+ const messages: I18nProviderProps.Messages;
3
+ export default messages;
@@ -0,0 +1,162 @@
1
+ export default {
2
+ '@cloudscape-design/components': {
3
+ 'zh-TW': {
4
+ alert: { dismissAriaLabel: [{ type: 0, value: '關閉提醒' }] },
5
+ autosuggest: {
6
+ stepNumberLabel: [
7
+ { type: 0, value: '步驟 ' },
8
+ { type: 1, value: 'stepNumber' },
9
+ ],
10
+ collapsedStepsLabel: [
11
+ { type: 0, value: '步驟 ' },
12
+ { type: 1, value: 'stepNumber' },
13
+ { type: 0, value: ',共 ' },
14
+ { type: 1, value: 'stepsCount' },
15
+ { type: 0, value: ' 步' },
16
+ ],
17
+ cancelButton: [{ type: 0, value: '取消' }],
18
+ previousButton: [{ type: 0, value: '上一步' }],
19
+ nextButton: [{ type: 0, value: '下一步' }],
20
+ optional: [{ type: 0, value: '選用' }],
21
+ },
22
+ 'app-layout': {
23
+ 'ariaLabels.navigation': [{ type: 0, value: '側邊導覽' }],
24
+ 'ariaLabels.navigationClose': [{ type: 0, value: '關閉側邊導覽' }],
25
+ 'ariaLabels.navigationToggle': [{ type: 0, value: '開啟側邊導覽' }],
26
+ 'ariaLabels.notifications': [{ type: 0, value: '通知' }],
27
+ 'ariaLabels.tools': [{ type: 0, value: '說明面板' }],
28
+ 'ariaLabels.toolsClose': [{ type: 0, value: '開啟說明面板' }],
29
+ 'ariaLabels.toolsToggle': [{ type: 0, value: '關閉說明面板' }],
30
+ },
31
+ 'date-picker': {
32
+ nextMonthAriaLabel: [{ type: 0, value: '下個月' }],
33
+ previousMonthAriaLabel: [{ type: 0, value: '上個月' }],
34
+ todayAriaLabel: [{ type: 0, value: '今天' }],
35
+ },
36
+ flashbar: {
37
+ 'i18nStrings.ariaLabel': [{ type: 0, value: '通知' }],
38
+ 'i18nStrings.errorIconAriaLabel': [{ type: 0, value: '錯誤' }],
39
+ 'i18nStrings.inProgressIconAriaLabel': [{ type: 0, value: '進行中' }],
40
+ 'i18nStrings.infoIconAriaLabel': [{ type: 0, value: '資訊' }],
41
+ 'i18nStrings.notificationBarAriaLabel': [{ type: 0, value: '所有通知' }],
42
+ 'i18nStrings.notificationBarText': [{ type: 0, value: '通知' }],
43
+ 'i18nStrings.successIconAriaLabel': [{ type: 0, value: '成功' }],
44
+ 'i18nStrings.warningIconAriaLabel': [{ type: 0, value: '警告' }],
45
+ },
46
+ form: { errorIconAriaLabel: [{ type: 0, value: '錯誤' }] },
47
+ 'form-field': { 'i18nStrings.errorIconAriaLabel': [{ type: 0, value: '錯誤' }] },
48
+ input: { clearAriaLabel: [{ type: 0, value: '清除' }] },
49
+ modal: { closeAriaLabel: [{ type: 0, value: '關閉強制回應' }] },
50
+ pagination: {
51
+ 'ariaLabels.nextPageLabel': [{ type: 0, value: '下一頁' }],
52
+ 'ariaLabels.pageLabel': [
53
+ { type: 0, value: '所有頁面中的第 ' },
54
+ { type: 1, value: 'pageNumber' },
55
+ { type: 0, value: ' 頁' },
56
+ ],
57
+ 'ariaLabels.previousPageLabel': [{ type: 0, value: '上一頁' }],
58
+ },
59
+ popover: { dismissAriaLabel: [{ type: 0, value: '關閉彈出視窗' }] },
60
+ 'property-filter': {
61
+ 'i18nStrings.allPropertiesLabel': [{ type: 0, value: '所有屬性' }],
62
+ 'i18nStrings.applyActionText': [{ type: 0, value: '套用' }],
63
+ 'i18nStrings.cancelActionText': [{ type: 0, value: '取消' }],
64
+ 'i18nStrings.clearFiltersText': [{ type: 0, value: '清除篩選條件' }],
65
+ 'i18nStrings.editTokenHeader': [{ type: 0, value: '編輯篩選條件' }],
66
+ 'i18nStrings.groupPropertiesText': [{ type: 0, value: '屬性' }],
67
+ 'i18nStrings.groupValuesText': [{ type: 0, value: '值' }],
68
+ 'i18nStrings.operationAndText': [{ type: 0, value: '和' }],
69
+ 'i18nStrings.operationOrText': [{ type: 0, value: '或' }],
70
+ 'i18nStrings.operatorContainsText': [{ type: 0, value: '包含' }],
71
+ 'i18nStrings.operatorDoesNotContainText': [{ type: 0, value: '不包含' }],
72
+ 'i18nStrings.operatorDoesNotEqualText': [{ type: 0, value: '不等於' }],
73
+ 'i18nStrings.operatorEqualsText': [{ type: 0, value: '等於' }],
74
+ 'i18nStrings.operatorGreaterOrEqualText': [{ type: 0, value: '大於或等於' }],
75
+ 'i18nStrings.operatorGreaterText': [{ type: 0, value: '大於' }],
76
+ 'i18nStrings.operatorLessOrEqualText': [{ type: 0, value: '小於或等於' }],
77
+ 'i18nStrings.operatorLessText': [{ type: 0, value: '小於' }],
78
+ 'i18nStrings.operatorText': [{ type: 0, value: '運算子' }],
79
+ 'i18nStrings.operatorsText': [{ type: 0, value: '運算子' }],
80
+ 'i18nStrings.propertyText': [{ type: 0, value: '屬性' }],
81
+ 'i18nStrings.tokenLimitShowFewer': [{ type: 0, value: '顯示較少' }],
82
+ 'i18nStrings.tokenLimitShowMore': [{ type: 0, value: '顯示更多' }],
83
+ 'i18nStrings.valueText': [{ type: 0, value: '值' }],
84
+ 'i18nStrings.removeTokenButtonAriaLabel': [
85
+ {
86
+ type: 5,
87
+ value: 'token__operator',
88
+ options: {
89
+ equals: {
90
+ value: [
91
+ { type: 0, value: '移除篩選條件,' },
92
+ { type: 1, value: 'token__propertyKey' },
93
+ { type: 0, value: ' 等於 ' },
94
+ { type: 1, value: 'token__value' },
95
+ ],
96
+ },
97
+ not_equals: {
98
+ value: [
99
+ { type: 0, value: '移除篩選條件,' },
100
+ { type: 1, value: 'token__propertyKey' },
101
+ { type: 0, value: ' 不等於 ' },
102
+ { type: 1, value: 'token__value' },
103
+ ],
104
+ },
105
+ greater_than: {
106
+ value: [
107
+ { type: 0, value: '移除篩選條件,' },
108
+ { type: 1, value: 'token__propertyKey' },
109
+ { type: 0, value: ' 大於 ' },
110
+ { type: 1, value: 'token__value' },
111
+ ],
112
+ },
113
+ greater_than_equal: {
114
+ value: [
115
+ { type: 0, value: '移除篩選條件,' },
116
+ { type: 1, value: 'token__propertyKey' },
117
+ { type: 0, value: ' 大於或等於 ' },
118
+ { type: 1, value: 'token__value' },
119
+ ],
120
+ },
121
+ less_than: {
122
+ value: [
123
+ { type: 0, value: '移除篩選條件,' },
124
+ { type: 1, value: 'token__propertyKey' },
125
+ { type: 0, value: ' 小於 ' },
126
+ { type: 1, value: 'token__value' },
127
+ ],
128
+ },
129
+ less_than_equal: {
130
+ value: [
131
+ { type: 0, value: '移除篩選條件,' },
132
+ { type: 1, value: 'token__propertyKey' },
133
+ { type: 0, value: ' 小於或等於 ' },
134
+ { type: 1, value: 'token__value' },
135
+ ],
136
+ },
137
+ contains: {
138
+ value: [
139
+ { type: 0, value: '移除篩選條件,' },
140
+ { type: 1, value: 'token__propertyKey' },
141
+ { type: 0, value: ' 包含 ' },
142
+ { type: 1, value: 'token__value' },
143
+ ],
144
+ },
145
+ not_contains: {
146
+ value: [
147
+ { type: 0, value: '移除篩選條件,' },
148
+ { type: 1, value: 'token__propertyKey' },
149
+ { type: 0, value: ' 不包含 ' },
150
+ { type: 1, value: 'token__value' },
151
+ ],
152
+ },
153
+ other: { value: [] },
154
+ },
155
+ },
156
+ ],
157
+ },
158
+ select: { errorIconAriaLabel: [{ type: 0, value: '錯誤' }], selectedAriaLabel: [{ type: 0, value: '已選取' }] },
159
+ wizard: { errorIconAriaLabel: [{ type: 0, value: '錯誤' }], selectedAriaLabel: [{ type: 0, value: '已選取' }] },
160
+ },
161
+ },
162
+ };
@@ -0,0 +1,168 @@
1
+ {
2
+ "@cloudscape-design/components": {
3
+ "zh-TW": {
4
+ "alert": { "dismissAriaLabel": [{ "type": 0, "value": "關閉提醒" }] },
5
+ "autosuggest": {
6
+ "stepNumberLabel": [
7
+ { "type": 0, "value": "步驟 " },
8
+ { "type": 1, "value": "stepNumber" }
9
+ ],
10
+ "collapsedStepsLabel": [
11
+ { "type": 0, "value": "步驟 " },
12
+ { "type": 1, "value": "stepNumber" },
13
+ { "type": 0, "value": ",共 " },
14
+ { "type": 1, "value": "stepsCount" },
15
+ { "type": 0, "value": " 步" }
16
+ ],
17
+ "cancelButton": [{ "type": 0, "value": "取消" }],
18
+ "previousButton": [{ "type": 0, "value": "上一步" }],
19
+ "nextButton": [{ "type": 0, "value": "下一步" }],
20
+ "optional": [{ "type": 0, "value": "選用" }]
21
+ },
22
+ "app-layout": {
23
+ "ariaLabels.navigation": [{ "type": 0, "value": "側邊導覽" }],
24
+ "ariaLabels.navigationClose": [{ "type": 0, "value": "關閉側邊導覽" }],
25
+ "ariaLabels.navigationToggle": [{ "type": 0, "value": "開啟側邊導覽" }],
26
+ "ariaLabels.notifications": [{ "type": 0, "value": "通知" }],
27
+ "ariaLabels.tools": [{ "type": 0, "value": "說明面板" }],
28
+ "ariaLabels.toolsClose": [{ "type": 0, "value": "開啟說明面板" }],
29
+ "ariaLabels.toolsToggle": [{ "type": 0, "value": "關閉說明面板" }]
30
+ },
31
+ "date-picker": {
32
+ "nextMonthAriaLabel": [{ "type": 0, "value": "下個月" }],
33
+ "previousMonthAriaLabel": [{ "type": 0, "value": "上個月" }],
34
+ "todayAriaLabel": [{ "type": 0, "value": "今天" }]
35
+ },
36
+ "flashbar": {
37
+ "i18nStrings.ariaLabel": [{ "type": 0, "value": "通知" }],
38
+ "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
39
+ "i18nStrings.inProgressIconAriaLabel": [{ "type": 0, "value": "進行中" }],
40
+ "i18nStrings.infoIconAriaLabel": [{ "type": 0, "value": "資訊" }],
41
+ "i18nStrings.notificationBarAriaLabel": [{ "type": 0, "value": "所有通知" }],
42
+ "i18nStrings.notificationBarText": [{ "type": 0, "value": "通知" }],
43
+ "i18nStrings.successIconAriaLabel": [{ "type": 0, "value": "成功" }],
44
+ "i18nStrings.warningIconAriaLabel": [{ "type": 0, "value": "警告" }]
45
+ },
46
+ "form": { "errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }] },
47
+ "form-field": { "i18nStrings.errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }] },
48
+ "input": { "clearAriaLabel": [{ "type": 0, "value": "清除" }] },
49
+ "modal": { "closeAriaLabel": [{ "type": 0, "value": "關閉強制回應" }] },
50
+ "pagination": {
51
+ "ariaLabels.nextPageLabel": [{ "type": 0, "value": "下一頁" }],
52
+ "ariaLabels.pageLabel": [
53
+ { "type": 0, "value": "所有頁面中的第 " },
54
+ { "type": 1, "value": "pageNumber" },
55
+ { "type": 0, "value": " 頁" }
56
+ ],
57
+ "ariaLabels.previousPageLabel": [{ "type": 0, "value": "上一頁" }]
58
+ },
59
+ "popover": { "dismissAriaLabel": [{ "type": 0, "value": "關閉彈出視窗" }] },
60
+ "property-filter": {
61
+ "i18nStrings.allPropertiesLabel": [{ "type": 0, "value": "所有屬性" }],
62
+ "i18nStrings.applyActionText": [{ "type": 0, "value": "套用" }],
63
+ "i18nStrings.cancelActionText": [{ "type": 0, "value": "取消" }],
64
+ "i18nStrings.clearFiltersText": [{ "type": 0, "value": "清除篩選條件" }],
65
+ "i18nStrings.editTokenHeader": [{ "type": 0, "value": "編輯篩選條件" }],
66
+ "i18nStrings.groupPropertiesText": [{ "type": 0, "value": "屬性" }],
67
+ "i18nStrings.groupValuesText": [{ "type": 0, "value": "值" }],
68
+ "i18nStrings.operationAndText": [{ "type": 0, "value": "和" }],
69
+ "i18nStrings.operationOrText": [{ "type": 0, "value": "或" }],
70
+ "i18nStrings.operatorContainsText": [{ "type": 0, "value": "包含" }],
71
+ "i18nStrings.operatorDoesNotContainText": [{ "type": 0, "value": "不包含" }],
72
+ "i18nStrings.operatorDoesNotEqualText": [{ "type": 0, "value": "不等於" }],
73
+ "i18nStrings.operatorEqualsText": [{ "type": 0, "value": "等於" }],
74
+ "i18nStrings.operatorGreaterOrEqualText": [{ "type": 0, "value": "大於或等於" }],
75
+ "i18nStrings.operatorGreaterText": [{ "type": 0, "value": "大於" }],
76
+ "i18nStrings.operatorLessOrEqualText": [{ "type": 0, "value": "小於或等於" }],
77
+ "i18nStrings.operatorLessText": [{ "type": 0, "value": "小於" }],
78
+ "i18nStrings.operatorText": [{ "type": 0, "value": "運算子" }],
79
+ "i18nStrings.operatorsText": [{ "type": 0, "value": "運算子" }],
80
+ "i18nStrings.propertyText": [{ "type": 0, "value": "屬性" }],
81
+ "i18nStrings.tokenLimitShowFewer": [{ "type": 0, "value": "顯示較少" }],
82
+ "i18nStrings.tokenLimitShowMore": [{ "type": 0, "value": "顯示更多" }],
83
+ "i18nStrings.valueText": [{ "type": 0, "value": "值" }],
84
+ "i18nStrings.removeTokenButtonAriaLabel": [
85
+ {
86
+ "type": 5,
87
+ "value": "token__operator",
88
+ "options": {
89
+ "equals": {
90
+ "value": [
91
+ { "type": 0, "value": "移除篩選條件," },
92
+ { "type": 1, "value": "token__propertyKey" },
93
+ { "type": 0, "value": " 等於 " },
94
+ { "type": 1, "value": "token__value" }
95
+ ]
96
+ },
97
+ "not_equals": {
98
+ "value": [
99
+ { "type": 0, "value": "移除篩選條件," },
100
+ { "type": 1, "value": "token__propertyKey" },
101
+ { "type": 0, "value": " 不等於 " },
102
+ { "type": 1, "value": "token__value" }
103
+ ]
104
+ },
105
+ "greater_than": {
106
+ "value": [
107
+ { "type": 0, "value": "移除篩選條件," },
108
+ { "type": 1, "value": "token__propertyKey" },
109
+ { "type": 0, "value": " 大於 " },
110
+ { "type": 1, "value": "token__value" }
111
+ ]
112
+ },
113
+ "greater_than_equal": {
114
+ "value": [
115
+ { "type": 0, "value": "移除篩選條件," },
116
+ { "type": 1, "value": "token__propertyKey" },
117
+ { "type": 0, "value": " 大於或等於 " },
118
+ { "type": 1, "value": "token__value" }
119
+ ]
120
+ },
121
+ "less_than": {
122
+ "value": [
123
+ { "type": 0, "value": "移除篩選條件," },
124
+ { "type": 1, "value": "token__propertyKey" },
125
+ { "type": 0, "value": " 小於 " },
126
+ { "type": 1, "value": "token__value" }
127
+ ]
128
+ },
129
+ "less_than_equal": {
130
+ "value": [
131
+ { "type": 0, "value": "移除篩選條件," },
132
+ { "type": 1, "value": "token__propertyKey" },
133
+ { "type": 0, "value": " 小於或等於 " },
134
+ { "type": 1, "value": "token__value" }
135
+ ]
136
+ },
137
+ "contains": {
138
+ "value": [
139
+ { "type": 0, "value": "移除篩選條件," },
140
+ { "type": 1, "value": "token__propertyKey" },
141
+ { "type": 0, "value": " 包含 " },
142
+ { "type": 1, "value": "token__value" }
143
+ ]
144
+ },
145
+ "not_contains": {
146
+ "value": [
147
+ { "type": 0, "value": "移除篩選條件," },
148
+ { "type": 1, "value": "token__propertyKey" },
149
+ { "type": 0, "value": " 不包含 " },
150
+ { "type": 1, "value": "token__value" }
151
+ ]
152
+ },
153
+ "other": { "value": [] }
154
+ }
155
+ }
156
+ ]
157
+ },
158
+ "select": {
159
+ "errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
160
+ "selectedAriaLabel": [{ "type": 0, "value": "已選取" }]
161
+ },
162
+ "wizard": {
163
+ "errorIconAriaLabel": [{ "type": 0, "value": "錯誤" }],
164
+ "selectedAriaLabel": [{ "type": 0, "value": "已選取" }]
165
+ }
166
+ }
167
+ }
168
+ }
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
3
+ export interface I18nProviderProps {
4
+ messages: ReadonlyArray<I18nProviderProps.Messages>;
5
+ locale?: string;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare namespace I18nProviderProps {
9
+ interface Messages {
10
+ [namespace: string]: {
11
+ [locale: string]: {
12
+ [component: string]: {
13
+ [key: string]: string | MessageFormatElement[];
14
+ };
15
+ };
16
+ };
17
+ }
18
+ }
19
+ export declare function I18nProvider({ messages: messagesArray, locale: providedLocale, children }: I18nProviderProps): JSX.Element;
20
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/internal/i18n/provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,QAAQ;QACvB,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,CAAC,MAAM,EAAE,MAAM,GAAG;gBAChB,CAAC,SAAS,EAAE,MAAM,GAAG;oBACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,oBAAoB,EAAE,CAAC;iBAChD,CAAC;aACH,CAAC;SACH,CAAC;KACH;CACF;AASD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,iBAAiB,eAuD5G"}
@@ -0,0 +1,90 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React, { useContext } from 'react';
4
+ import IntlMessageFormat from 'intl-messageformat';
5
+ import { InternalI18nContext } from './context';
6
+ /**
7
+ * Context to send parent messages down to child I18nProviders. This isn't
8
+ * included in the InternalI18nContext to avoid components from depending on
9
+ * MessageFormatElement types.
10
+ */
11
+ const I18nMessagesContext = React.createContext({});
12
+ export function I18nProvider({ messages: messagesArray, locale: providedLocale, children }) {
13
+ // The provider accepts an array of configs. We merge parent messages and
14
+ // flatten the tree early on so that accesses by key are simpler and faster.
15
+ const parentMessages = useContext(I18nMessagesContext);
16
+ const messages = mergeMessages([parentMessages, ...messagesArray]);
17
+ // If a locale isn't provided, we can try and guess from the html lang,
18
+ // and lastly default to English. Locales have a recommended case, but are
19
+ // matched case-insensitively, so we lowercase it internally.
20
+ const locale = (providedLocale || (document === null || document === void 0 ? void 0 : document.documentElement.lang) || 'en').toLowerCase();
21
+ const format = (namespace, component, key, provided, customHandler) => {
22
+ var _a, _b, _c;
23
+ // A general rule in the library is that undefined is basically
24
+ // treated as "not provided". So even if a user explicitly provides an
25
+ // undefined value, it will default to i18n values.
26
+ if (provided !== undefined) {
27
+ return provided;
28
+ }
29
+ // Widen the locale string (e.g. en-GB -> en) until we find a locale
30
+ // that contains the message we need.
31
+ let message;
32
+ const matchableLocales = getMatchableLocales(locale);
33
+ for (const matchableLocale of matchableLocales) {
34
+ const localeMessage = (_c = (_b = (_a = messages === null || messages === void 0 ? void 0 : messages[namespace]) === null || _a === void 0 ? void 0 : _a[matchableLocale]) === null || _b === void 0 ? void 0 : _b[component]) === null || _c === void 0 ? void 0 : _c[key];
35
+ if (localeMessage !== undefined) {
36
+ message = localeMessage;
37
+ break;
38
+ }
39
+ }
40
+ // If a message wasn't found, exit early.
41
+ if (message === undefined) {
42
+ return provided;
43
+ }
44
+ const intlMessageFormat = new IntlMessageFormat(message, locale);
45
+ if (customHandler) {
46
+ return customHandler(args => intlMessageFormat.format(args));
47
+ }
48
+ // Assuming `T extends string` since a customHandler wasn't provided.
49
+ return intlMessageFormat.format();
50
+ };
51
+ return (React.createElement(InternalI18nContext.Provider, { value: format },
52
+ React.createElement(I18nMessagesContext.Provider, { value: messages }, children)));
53
+ }
54
+ function mergeMessages(sources) {
55
+ const result = {};
56
+ for (const messages of sources) {
57
+ for (const namespace in messages) {
58
+ if (!(namespace in result)) {
59
+ result[namespace] = {};
60
+ }
61
+ for (const casedLocale in messages[namespace]) {
62
+ const locale = casedLocale.toLowerCase();
63
+ if (!(locale in result[namespace])) {
64
+ result[namespace][locale] = {};
65
+ }
66
+ for (const component in messages[namespace][casedLocale]) {
67
+ if (!(component in result[namespace][locale])) {
68
+ result[namespace][locale][component] = {};
69
+ }
70
+ for (const key in messages[namespace][casedLocale][component]) {
71
+ result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ return result;
78
+ }
79
+ function getMatchableLocales(ietfLanguageTag) {
80
+ const parts = ietfLanguageTag.split('-');
81
+ if (parts.length === 1) {
82
+ return [ietfLanguageTag];
83
+ }
84
+ const localeStrings = [];
85
+ for (let i = parts.length; i > 0; i--) {
86
+ localeStrings.push(parts.slice(0, i).join('-'));
87
+ }
88
+ return localeStrings;
89
+ }
90
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../src/internal/i18n/provider.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useContext } from 'react';\nimport IntlMessageFormat from 'intl-messageformat';\nimport { MessageFormatElement } from '@formatjs/icu-messageformat-parser';\n\nimport { InternalI18nContext, FormatFunction, CustomHandler } from './context';\n\nexport interface I18nProviderProps {\n messages: ReadonlyArray<I18nProviderProps.Messages>;\n locale?: string;\n children: React.ReactNode;\n}\n\nexport namespace I18nProviderProps {\n export interface Messages {\n [namespace: string]: {\n [locale: string]: {\n [component: string]: {\n [key: string]: string | MessageFormatElement[];\n };\n };\n };\n }\n}\n\n/**\n * Context to send parent messages down to child I18nProviders. This isn't\n * included in the InternalI18nContext to avoid components from depending on\n * MessageFormatElement types.\n */\nconst I18nMessagesContext = React.createContext<I18nProviderProps.Messages>({});\n\nexport function I18nProvider({ messages: messagesArray, locale: providedLocale, children }: I18nProviderProps) {\n // The provider accepts an array of configs. We merge parent messages and\n // flatten the tree early on so that accesses by key are simpler and faster.\n const parentMessages = useContext(I18nMessagesContext);\n const messages = mergeMessages([parentMessages, ...messagesArray]);\n\n // If a locale isn't provided, we can try and guess from the html lang,\n // and lastly default to English. Locales have a recommended case, but are\n // matched case-insensitively, so we lowercase it internally.\n const locale = (providedLocale || document?.documentElement.lang || 'en').toLowerCase();\n\n const format: FormatFunction = <T,>(\n namespace: string,\n component: string,\n key: string,\n provided: T,\n customHandler?: CustomHandler<T>\n ): T => {\n // A general rule in the library is that undefined is basically\n // treated as \"not provided\". So even if a user explicitly provides an\n // undefined value, it will default to i18n values.\n if (provided !== undefined) {\n return provided;\n }\n\n // Widen the locale string (e.g. en-GB -> en) until we find a locale\n // that contains the message we need.\n let message: string | MessageFormatElement[] | undefined;\n const matchableLocales = getMatchableLocales(locale);\n for (const matchableLocale of matchableLocales) {\n const localeMessage = messages?.[namespace]?.[matchableLocale]?.[component]?.[key];\n if (localeMessage !== undefined) {\n message = localeMessage;\n break;\n }\n }\n\n // If a message wasn't found, exit early.\n if (message === undefined) {\n return provided;\n }\n\n const intlMessageFormat = new IntlMessageFormat(message, locale);\n if (customHandler) {\n return customHandler(args => intlMessageFormat.format(args) as string);\n }\n // Assuming `T extends string` since a customHandler wasn't provided.\n return intlMessageFormat.format() as T;\n };\n\n return (\n <InternalI18nContext.Provider value={format}>\n <I18nMessagesContext.Provider value={messages}>{children}</I18nMessagesContext.Provider>\n </InternalI18nContext.Provider>\n );\n}\n\nfunction mergeMessages(sources: ReadonlyArray<I18nProviderProps.Messages>): I18nProviderProps.Messages {\n const result: I18nProviderProps.Messages = {};\n for (const messages of sources) {\n for (const namespace in messages) {\n if (!(namespace in result)) {\n result[namespace] = {};\n }\n for (const casedLocale in messages[namespace]) {\n const locale = casedLocale.toLowerCase();\n if (!(locale in result[namespace])) {\n result[namespace][locale] = {};\n }\n for (const component in messages[namespace][casedLocale]) {\n if (!(component in result[namespace][locale])) {\n result[namespace][locale][component] = {};\n }\n for (const key in messages[namespace][casedLocale][component]) {\n result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction getMatchableLocales(ietfLanguageTag: string): string[] {\n const parts = ietfLanguageTag.split('-');\n if (parts.length === 1) {\n return [ietfLanguageTag];\n }\n\n const localeStrings: string[] = [];\n for (let i = parts.length; i > 0; i--) {\n localeStrings.push(parts.slice(0, i).join('-'));\n }\n return localeStrings;\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "75c7d6b153dc76ce7b013dbc8e45a1cb3fe93ddf"
2
+ "commit": "f53ef7ce941781154de29f6072011f60eca678f4"
3
3
  }