@icij/murmur-next 4.0.0 → 4.0.3

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 (334) hide show
  1. package/README.md +15 -19
  2. package/dist/lib/components/AccordionStep.vue.d.ts +79 -0
  3. package/dist/lib/components/AccordionWrapper.vue.d.ts +33 -0
  4. package/dist/lib/components/ActiveTextTruncate.vue.d.ts +101 -0
  5. package/dist/lib/components/AdvancedLinkForm.vue.d.ts +168 -0
  6. package/dist/lib/components/Brand.vue.d.ts +55 -0
  7. package/dist/lib/components/BrandExpansion.vue.d.ts +105 -0
  8. package/dist/lib/components/ConfirmButton.vue.d.ts +158 -0
  9. package/dist/lib/components/ContentPlaceholder.vue.d.ts +44 -0
  10. package/dist/lib/components/CustomPagination.vue.d.ts +130 -0
  11. package/dist/lib/components/DigitsInput.vue.d.ts +66 -0
  12. package/dist/lib/components/DonateForm.vue.d.ts +46 -0
  13. package/dist/lib/components/EmbedForm.vue.d.ts +121 -0
  14. package/dist/lib/components/EmbeddableFooter.vue.d.ts +103 -0
  15. package/dist/lib/components/FollowUsPopover.vue.d.ts +16 -0
  16. package/dist/lib/components/GenericFooter.vue.d.ts +47 -0
  17. package/dist/lib/components/GenericHeader.vue.d.ts +928 -0
  18. package/dist/lib/components/HapticCopy.vue.d.ts +156 -0
  19. package/dist/lib/components/ImddbHeader.vue.d.ts +960 -0
  20. package/dist/lib/components/OrdinalLegend.vue.d.ts +87 -0
  21. package/dist/lib/components/RangePicker.vue.d.ts +196 -0
  22. package/dist/lib/components/ResponsiveIframe.vue.d.ts +45 -0
  23. package/dist/lib/components/ScaleLegend.vue.d.ts +101 -0
  24. package/dist/lib/components/SecretInput.vue.d.ts +99 -0
  25. package/dist/lib/components/SelectableDropdown.vue.d.ts +210 -0
  26. package/dist/lib/components/SharingOptions.vue.d.ts +153 -0
  27. package/dist/lib/components/SharingOptionsLink.vue.d.ts +200 -0
  28. package/dist/lib/components/SignUpForm.vue.d.ts +141 -0
  29. package/dist/lib/components/SlideUpDown.vue.d.ts +74 -0
  30. package/dist/lib/components/TexturedDeck.vue.d.ts +89 -0
  31. package/dist/lib/components/TinyPagination.vue.d.ts +188 -0
  32. package/dist/lib/composables/chart.d.ts +48 -0
  33. package/dist/lib/composables/resizeObserver.d.ts +22 -0
  34. package/dist/lib/composables/sendEmail.d.ts +6 -0
  35. package/dist/lib/config.d.ts +19 -0
  36. package/dist/lib/config.default.d.ts +34 -0
  37. package/dist/lib/datavisualisations/BarChart.vue.d.ts +234 -0
  38. package/dist/lib/datavisualisations/ColumnChart.vue.d.ts +404 -0
  39. package/dist/lib/datavisualisations/LineChart.vue.d.ts +200 -0
  40. package/dist/lib/datavisualisations/StackedBarChart.vue.d.ts +342 -0
  41. package/dist/lib/datavisualisations/StackedColumnChart.vue.d.ts +412 -0
  42. package/dist/lib/enums.d.ts +32 -0
  43. package/dist/lib/i18n.d.ts +4 -0
  44. package/dist/lib/keys.d.ts +2 -0
  45. package/dist/lib/main.d.ts +52 -0
  46. package/dist/lib/maps/ChoroplethMap.vue.d.ts +460 -0
  47. package/dist/lib/maps/ChoroplethMapAnnotation.vue.d.ts +188 -0
  48. package/dist/lib/maps/SymbolMap.vue.d.ts +276 -0
  49. package/dist/lib/murmur.css +1 -0
  50. package/dist/lib/murmur.js +44661 -0
  51. package/dist/lib/murmur.js.map +1 -0
  52. package/dist/lib/murmur.umd.cjs +837 -0
  53. package/dist/lib/murmur.umd.cjs.map +1 -0
  54. package/dist/lib/types.d.ts +44 -0
  55. package/dist/lib/utils/animation.d.ts +8 -0
  56. package/dist/lib/utils/assets.d.ts +2 -0
  57. package/dist/lib/utils/clipboard.d.ts +2 -0
  58. package/dist/lib/utils/iframe-resizer.d.ts +10 -0
  59. package/dist/lib/utils/placeholder.d.ts +12 -0
  60. package/dist/lib/utils/placeholderTypes.d.ts +18 -0
  61. package/dist/lib/utils/strings.d.ts +1 -0
  62. package/lib/components/AccordionStep.vue +53 -42
  63. package/lib/components/AccordionWrapper.vue +25 -24
  64. package/lib/components/ActiveTextTruncate.vue +44 -22
  65. package/lib/components/AdvancedLinkForm.vue +96 -46
  66. package/lib/components/Brand.vue +30 -23
  67. package/lib/components/BrandExpansion.vue +12 -3
  68. package/lib/components/ConfirmButton.vue +30 -26
  69. package/lib/components/ContentPlaceholder.vue +11 -7
  70. package/lib/components/CustomPagination.vue +50 -32
  71. package/lib/components/DigitsInput.vue +64 -60
  72. package/lib/components/DonateForm.vue +112 -83
  73. package/lib/components/EmbedForm.vue +37 -21
  74. package/lib/components/EmbeddableFooter.vue +14 -10
  75. package/lib/components/FollowUsPopover.vue +42 -40
  76. package/lib/components/GenericFooter.vue +98 -23
  77. package/lib/components/GenericHeader.vue +66 -29
  78. package/lib/components/HapticCopy.vue +41 -29
  79. package/lib/components/ImddbHeader.vue +113 -92
  80. package/lib/components/OrdinalLegend.vue +43 -20
  81. package/lib/components/RangePicker.vue +63 -42
  82. package/lib/components/ResponsiveIframe.vue +9 -2
  83. package/lib/components/ScaleLegend.vue +56 -18
  84. package/lib/components/SecretInput.vue +7 -8
  85. package/lib/components/SelectableDropdown.vue +119 -74
  86. package/lib/components/SharingOptions.vue +93 -36
  87. package/lib/components/SharingOptionsLink.vue +11 -5
  88. package/lib/components/SignUpForm.vue +44 -23
  89. package/lib/components/SlideUpDown.vue +7 -2
  90. package/lib/components/TexturedDeck.vue +24 -14
  91. package/lib/components/TinyPagination.vue +35 -22
  92. package/lib/composables/chart.ts +174 -157
  93. package/lib/composables/resizeObserver.ts +29 -29
  94. package/lib/composables/sendEmail.ts +53 -42
  95. package/lib/config.default.ts +17 -10
  96. package/lib/config.ts +34 -27
  97. package/lib/datavisualisations/BarChart.vue +48 -42
  98. package/lib/datavisualisations/ColumnChart.vue +133 -89
  99. package/lib/datavisualisations/LineChart.vue +79 -57
  100. package/lib/datavisualisations/StackedBarChart.vue +116 -68
  101. package/lib/datavisualisations/StackedColumnChart.vue +196 -115
  102. package/lib/enums.ts +25 -15
  103. package/lib/i18n.ts +3 -3
  104. package/lib/keys.ts +2 -2
  105. package/lib/main.ts +14 -10
  106. package/lib/maps/ChoroplethMap.vue +299 -160
  107. package/lib/maps/ChoroplethMapAnnotation.vue +29 -18
  108. package/lib/maps/SymbolMap.vue +194 -123
  109. package/lib/shims-bootstrap-vue.d.ts +1 -1
  110. package/lib/shims-vue.d.ts +3 -3
  111. package/lib/styles/functions.scss +10 -6
  112. package/lib/styles/lib.scss +2 -4
  113. package/lib/styles/mixins.scss +8 -8
  114. package/lib/styles/utilities.scss +1 -1
  115. package/lib/styles/variables.scss +24 -18
  116. package/lib/types.ts +26 -10
  117. package/lib/utils/animation.ts +4 -4
  118. package/lib/utils/assets.ts +31 -28
  119. package/lib/utils/clipboard.ts +16 -10
  120. package/lib/utils/iframe-resizer.ts +18 -13
  121. package/lib/utils/placeholder.ts +54 -23
  122. package/lib/utils/placeholderTypes.ts +3 -3
  123. package/package.json +21 -2
  124. package/.github/workflows/deploy-github-pages.yaml +0 -50
  125. package/.storybook/app.scss +0 -14
  126. package/.storybook/doc_variables.scss +0 -20
  127. package/.storybook/main.ts +0 -35
  128. package/.storybook/preview-head.html +0 -2
  129. package/.storybook/preview.ts +0 -32
  130. package/deploy.js +0 -15
  131. package/docs/components/ApiTable.vue +0 -171
  132. package/docs/components/App.vue +0 -146
  133. package/docs/components/CollapsibleBlock.vue +0 -122
  134. package/docs/components/DocsHeader.vue +0 -68
  135. package/docs/components/DocsMenu.vue +0 -201
  136. package/docs/components/DocsMenuSection.vue +0 -109
  137. package/docs/components/EditLink.vue +0 -49
  138. package/docs/components/OutboundLink.vue +0 -13
  139. package/docs/components/PalettePresenter.vue +0 -96
  140. package/docs/components/RepositoryLink.vue +0 -28
  141. package/docs/components/SampleCard.vue +0 -119
  142. package/docs/main.js +0 -42
  143. package/docs/pages/components/accordion/doc.md +0 -96
  144. package/docs/pages/components/active-text-truncate/doc.md +0 -44
  145. package/docs/pages/components/advanced-link-form/doc.md +0 -105
  146. package/docs/pages/components/brand/doc.md +0 -30
  147. package/docs/pages/components/brand-expansion/doc.md +0 -70
  148. package/docs/pages/components/confirm-button/doc.md +0 -91
  149. package/docs/pages/components/content-placeholder/doc.md +0 -16
  150. package/docs/pages/components/custom-pagination/doc.md +0 -61
  151. package/docs/pages/components/digits-input/doc.md +0 -28
  152. package/docs/pages/components/donate-form/doc.md +0 -20
  153. package/docs/pages/components/embed-form/doc.md +0 -22
  154. package/docs/pages/components/embeddable-footer/doc.md +0 -60
  155. package/docs/pages/components/follow-us-popover/doc.md +0 -5
  156. package/docs/pages/components/generic-footer/doc.md +0 -21
  157. package/docs/pages/components/generic-header/doc.md +0 -24
  158. package/docs/pages/components/haptic-copy/doc.md +0 -27
  159. package/docs/pages/components/imddb-header/doc.md +0 -23
  160. package/docs/pages/components/ordinal-legend/doc.md +0 -44
  161. package/docs/pages/components/range-picker/doc.md +0 -86
  162. package/docs/pages/components/responsive-iframe/doc.md +0 -13
  163. package/docs/pages/components/scale-legend/doc.md +0 -65
  164. package/docs/pages/components/secret-input/doc.md +0 -12
  165. package/docs/pages/components/selectable-dropdown/doc.md +0 -156
  166. package/docs/pages/components/sharing-options/doc.md +0 -13
  167. package/docs/pages/components/sharing-options-link/doc.md +0 -36
  168. package/docs/pages/components/sign-up-form/doc.md +0 -13
  169. package/docs/pages/components/slide-up-down/doc.md +0 -28
  170. package/docs/pages/components/textured-deck/doc.md +0 -78
  171. package/docs/pages/components/tiny-pagination/doc.md +0 -92
  172. package/docs/pages/datavisualisation/bars/doc.md +0 -110
  173. package/docs/pages/datavisualisation/columns/doc.md +0 -165
  174. package/docs/pages/datavisualisation/lines/doc.md +0 -139
  175. package/docs/pages/datavisualisation/stacked-bar/doc.md +0 -160
  176. package/docs/pages/datavisualisation/stacked-column/doc.md +0 -191
  177. package/docs/pages/getting-started/about-icij/doc.md +0 -13
  178. package/docs/pages/getting-started/custom-bootstrap/doc.md +0 -36
  179. package/docs/pages/getting-started/installation-guide/doc.md +0 -59
  180. package/docs/pages/getting-started/internationalization/doc.md +0 -74
  181. package/docs/pages/maps/choropleth-map/doc.md +0 -420
  182. package/docs/pages/maps/choropleth-map-annotation/doc.md +0 -373
  183. package/docs/pages/maps/symbol-map/doc.md +0 -203
  184. package/docs/pages/structure/breakpoints/doc.md +0 -3
  185. package/docs/pages/structure/grid/doc.md +0 -3
  186. package/docs/pages/utilities/assets/doc.md +0 -138
  187. package/docs/pages/utilities/config/doc.md +0 -52
  188. package/docs/pages/utilities/iframes/doc.md +0 -3
  189. package/docs/pages/visual/colors/doc.md +0 -31
  190. package/docs/pages/visual/iconography/doc.md +0 -56
  191. package/docs/pages/visual/states/doc.md +0 -77
  192. package/docs/pages/visual/themes/doc.md +0 -3
  193. package/docs/pages/visual/typography/doc.md +0 -71
  194. package/docs/routes.js +0 -25
  195. package/docs/store/index.js +0 -21
  196. package/docs/styles/app.scss +0 -36
  197. package/docs/styles/variables.scss +0 -20
  198. package/loaders/highlight-loader.js +0 -13
  199. package/loaders/markdown-loader.js +0 -91
  200. package/loaders/metadata-loader.js +0 -18
  201. package/loaders/sass-extract-loader.js +0 -14
  202. package/loaders/vue-docgen-loader.js +0 -14
  203. package/plugins/MdPluginTypes.ts +0 -10
  204. package/plugins/docs.ts +0 -50
  205. package/plugins/front-matter.ts +0 -36
  206. package/plugins/highlight.ts +0 -27
  207. package/plugins/markdown-it/api-table.ts +0 -25
  208. package/plugins/markdown-it/sample-card.ts +0 -31
  209. package/plugins/plugin-delete.ts +0 -47
  210. package/plugins/plugin-docgen.ts +0 -23
  211. package/plugins/sass-vars.ts +0 -25
  212. package/plugins/vue-docgen.ts +0 -29
  213. package/public/android-chrome-192x192.png +0 -0
  214. package/public/android-chrome-512x512.png +0 -0
  215. package/public/apple-touch-icon.png +0 -0
  216. package/public/assets/img/arrow-bottom.svg +0 -3
  217. package/public/assets/img/texture-brick-black.jpg +0 -0
  218. package/public/assets/img/texture-brick.jpg +0 -0
  219. package/public/assets/img/texture-carbon-black.jpg +0 -0
  220. package/public/assets/img/texture-carbon.jpg +0 -0
  221. package/public/assets/img/texture-crack-black.jpg +0 -0
  222. package/public/assets/img/texture-crack.jpg +0 -0
  223. package/public/assets/img/texture-rock-black.jpg +0 -0
  224. package/public/assets/img/texture-rock.jpg +0 -0
  225. package/public/assets/img/texture-sand-black.jpg +0 -0
  226. package/public/assets/img/texture-sand.jpg +0 -0
  227. package/public/assets/img/texture-silk-black.jpg +0 -0
  228. package/public/assets/img/texture-silk.jpg +0 -0
  229. package/public/assets/topojson/france-departments.json +0 -1
  230. package/public/assets/topojson/paris-arrondissements.json +0 -1
  231. package/public/assets/topojson/world-countries-sans-antarctica.json +0 -1
  232. package/public/favicon-16x16.png +0 -0
  233. package/public/favicon-32x32.png +0 -0
  234. package/public/favicon.ico +0 -0
  235. package/public/site.webmanifest +0 -1
  236. package/stories/assets/code-brackets.svg +0 -1
  237. package/stories/assets/colors.svg +0 -1
  238. package/stories/assets/comments.svg +0 -1
  239. package/stories/assets/direction.svg +0 -1
  240. package/stories/assets/flow.svg +0 -1
  241. package/stories/assets/plugin.svg +0 -1
  242. package/stories/assets/repo.svg +0 -1
  243. package/stories/assets/stackalt.svg +0 -1
  244. package/stories/getting-started/about-icij.mdx +0 -14
  245. package/stories/getting-started/custom-bootstrap.mdx +0 -23
  246. package/stories/getting-started/installation-guide.mdx +0 -62
  247. package/stories/getting-started/internationalization.mdx +0 -63
  248. package/stories/murmur/components/AccordionStep.stories.ts +0 -33
  249. package/stories/murmur/components/AccordionWrapper.stories.ts +0 -69
  250. package/stories/murmur/components/ActiveTextTruncate.stories.ts +0 -32
  251. package/stories/murmur/components/AdvancedLinkForm.stories.ts +0 -77
  252. package/stories/murmur/components/Brand.stories.ts +0 -30
  253. package/stories/murmur/components/BrandExpansion.stories.ts +0 -41
  254. package/stories/murmur/components/ConfirmButton.stories.ts +0 -40
  255. package/stories/murmur/components/ContentPlaceholder.stories.ts +0 -41
  256. package/stories/murmur/components/CustomPagination.stories.ts +0 -42
  257. package/stories/murmur/components/DigitsInput.stories.ts +0 -29
  258. package/stories/murmur/components/DonateForm.stories.ts +0 -29
  259. package/stories/murmur/components/EmbedForm.stories.ts +0 -35
  260. package/stories/murmur/components/EmbeddableFooter.stories.ts +0 -59
  261. package/stories/murmur/components/FollowUsPopover.stories.ts +0 -24
  262. package/stories/murmur/components/GenericFooter.stories.ts +0 -27
  263. package/stories/murmur/components/GenericHeader.stories.ts +0 -27
  264. package/stories/murmur/components/HapticCopy.stories.ts +0 -40
  265. package/stories/murmur/components/ImddbHeader.stories.ts +0 -27
  266. package/stories/murmur/components/OrdinalLegend.stories.ts +0 -49
  267. package/stories/murmur/components/RangePicker.stories.ts +0 -98
  268. package/stories/murmur/components/ResponsiveIframe.stories.ts +0 -24
  269. package/stories/murmur/components/ScaleLegend.stories.ts +0 -65
  270. package/stories/murmur/components/SecretInput.stories.ts +0 -60
  271. package/stories/murmur/components/SelectableDropdown.stories.ts +0 -143
  272. package/stories/murmur/components/SharingOptions.stories.ts +0 -32
  273. package/stories/murmur/components/SharingOptionsLink.stories.ts +0 -53
  274. package/stories/murmur/components/SignUpForm.stories.ts +0 -51
  275. package/stories/murmur/components/SlideUpDown.stories.ts +0 -32
  276. package/stories/murmur/components/TexturedDeck.stories.ts +0 -83
  277. package/stories/murmur/components/TinyPagination.stories.ts +0 -65
  278. package/stories/murmur/datavisualisations/BarChart.stories.ts +0 -54
  279. package/stories/murmur/datavisualisations/ColumnChart.stories.ts +0 -88
  280. package/stories/murmur/datavisualisations/LineChart.stories.ts +0 -139
  281. package/stories/murmur/datavisualisations/StackedBarChart.stories.ts +0 -199
  282. package/stories/murmur/datavisualisations/StackedColumnChart.stories.ts +0 -136
  283. package/stories/murmur/decorators.ts +0 -108
  284. package/stories/murmur/maps/ChoroplethMap.stories.ts +0 -440
  285. package/stories/murmur/maps/ChoroplethMapAnnotation.stories.ts +0 -26
  286. package/stories/murmur/maps/SymbolMap.stories.ts +0 -24
  287. package/stories/murmur/utils.ts +0 -7
  288. package/tests/unit/components/AccordionStep.spec.ts +0 -157
  289. package/tests/unit/components/AccordionWrapper.spec.ts +0 -57
  290. package/tests/unit/components/ActiveTextTruncate.spec.js +0 -30
  291. package/tests/unit/components/AdvancedLinkForm.spec.js +0 -124
  292. package/tests/unit/components/Brand.spec.js +0 -50
  293. package/tests/unit/components/ContentPlaceholder.spec.js +0 -29
  294. package/tests/unit/components/CustomPagination.spec.js +0 -72
  295. package/tests/unit/components/DigitsInput.spec.ts +0 -157
  296. package/tests/unit/components/DonateForm.spec.js +0 -149
  297. package/tests/unit/components/EmbedForm.spec.js +0 -108
  298. package/tests/unit/components/EmbeddableFooter.spec.js +0 -11
  299. package/tests/unit/components/Fa.spec.js +0 -18
  300. package/tests/unit/components/FollowUsPopover.spec.js +0 -29
  301. package/tests/unit/components/GenericFooter.spec.js +0 -29
  302. package/tests/unit/components/GenericHeader.spec.js +0 -104
  303. package/tests/unit/components/HapticCopy.spec.js +0 -123
  304. package/tests/unit/components/ImddbHeader.spec.js +0 -96
  305. package/tests/unit/components/OrdinalLegend.spec.js +0 -120
  306. package/tests/unit/components/RangePicker.spec.ts +0 -87
  307. package/tests/unit/components/ResponsiveIframe.spec.js +0 -20
  308. package/tests/unit/components/ScaleLegend.spec.js +0 -139
  309. package/tests/unit/components/SecretInput.spec.js +0 -81
  310. package/tests/unit/components/SelectableDropdown.spec.js +0 -160
  311. package/tests/unit/components/SharingOptions.spec.js +0 -125
  312. package/tests/unit/components/SharingOptionsLink.spec.js +0 -184
  313. package/tests/unit/components/SignUpForm.spec.js +0 -145
  314. package/tests/unit/components/SlideUpDown.spec.js +0 -59
  315. package/tests/unit/components/TinyPagination.spec.js +0 -46
  316. package/tests/unit/config.spec.js +0 -136
  317. package/tests/unit/datavisualisations/BarChart.spec.js +0 -63
  318. package/tests/unit/datavisualisations/ColumnChart.spec.js +0 -344
  319. package/tests/unit/datavisualisations/LineChart.spec.js +0 -155
  320. package/tests/unit/datavisualisations/StackedBarChart.spec.js +0 -294
  321. package/tests/unit/datavisualisations/StackedColumnChart.spec.js +0 -443
  322. package/tests/unit/i18n.spec.ts +0 -19
  323. package/tests/unit/main.spec.js +0 -82
  324. package/tests/unit/maps/ChoroplethMap.spec.js +0 -214
  325. package/tests/unit/maps/ChoroplethMapAnnotation.spec.ts +0 -186
  326. package/tests/unit/maps/SymbolMap.spec.js +0 -92
  327. package/tests/unit/require.spec.js +0 -22
  328. package/tests/unit/setup.js +0 -13
  329. package/tests/unit/utils/assets.spec.js +0 -61
  330. package/tests/unit/utils/clipboard.spec.js +0 -18
  331. package/tests/unit/utils/iframe-resizer.spec.js +0 -71
  332. package/tsconfig.json +0 -35
  333. package/vite.config.ts +0 -79
  334. package/vitest.config.ts +0 -19
@@ -5,10 +5,8 @@
5
5
  @import './utilities';
6
6
  @import 'bootstrap/scss/_mixins';
7
7
  :root,
8
- [data-bs-theme="light"] {
9
-
8
+ [data-bs-theme='light'] {
10
9
  --input-bg: #{$bs-input-bg};
11
-
12
10
  }
13
11
  @if $enable-dark-mode {
14
12
  @include color-mode(dark, true) {
@@ -16,4 +14,4 @@
16
14
  --input-bg: #{$bs-input-bg-dark};
17
15
  }
18
16
  }
19
- $input-bg:var(--input-bg);
17
+ $input-bg: var(--input-bg);
@@ -14,17 +14,17 @@
14
14
  }
15
15
 
16
16
  @mixin animation($animation) {
17
- -webkit-animation:$animation;
18
- -moz-animation:$animation;
19
- -o-animation:$animation;
20
- animation:$animation;
17
+ -webkit-animation: $animation;
18
+ -moz-animation: $animation;
19
+ -o-animation: $animation;
20
+ animation: $animation;
21
21
  }
22
22
 
23
- @mixin animation-delay-loop($from:0, $to:10, $delay: 300ms) {
23
+ @mixin animation-delay-loop($from: 0, $to: 10, $delay: 300ms) {
24
24
  @for $i from $from through $to {
25
- &:nth-child(#{$i}) {
26
- animation-delay: $i * $delay;
27
- }
25
+ &:nth-child(#{$i}) {
26
+ animation-delay: $i * $delay;
27
+ }
28
28
  }
29
29
  }
30
30
 
@@ -15,4 +15,4 @@
15
15
  .jumbotron > .h1 {
16
16
  font-family: $jumbotron-font-family;
17
17
  font-weight: $jumbotron-font-weight;
18
- }
18
+ }
@@ -1,4 +1,4 @@
1
- $white: #fff !default;
1
+ $white: #fff !default;
2
2
  $gray-100: #f8f8f8 !default;
3
3
  $gray-200: #e9e9e9 !default;
4
4
  $gray-300: #dedede !default;
@@ -8,30 +8,30 @@ $gray-600: #696969 !default; // Brand color
8
8
  $gray-700: #494949 !default;
9
9
  $gray-800: #3c3c3c !default; // Brand color
10
10
  $gray-900: #212121 !default;
11
- $black: #000 !default;
11
+ $black: #000 !default;
12
12
 
13
- $primary: #ff0000 !default; // Brand color
13
+ $primary: #ff0000 !default; // Brand color
14
14
  $secondary: $gray-500 !default;
15
- $danger: #8B0707 !default; // Brand color
16
- $success: #46EC4E !default;
17
- $info: #0000FF !default;
18
- $warning: #FFBA00 !default;
15
+ $danger: #8b0707 !default; // Brand color
16
+ $success: #46ec4e !default;
17
+ $info: #0000ff !default;
18
+ $warning: #ffba00 !default;
19
19
  $light: $gray-200 !default;
20
20
  $dark: #000 !default;
21
21
 
22
22
  $brand-grays: () !default;
23
23
  $brand-grays: map-merge(
24
24
  (
25
- "gray-lighter": $gray-400,
26
- "gray-light": $gray-500,
27
- "gray-dark": $gray-600,
28
- "gray-darker": $gray-800
25
+ 'gray-lighter': $gray-400,
26
+ 'gray-light': $gray-500,
27
+ 'gray-dark': $gray-600,
28
+ 'gray-darker': $gray-800
29
29
  ),
30
30
  $brand-grays
31
31
  );
32
32
 
33
- $body-bg: $white !default; // Brand color
34
- $body-color: $black !default; // Brand color
33
+ $body-bg: $white !default; // Brand color
34
+ $body-color: $black !default; // Brand color
35
35
  $text-muted: $gray-500 !default;
36
36
 
37
37
  $component-active-bg: $primary !default;
@@ -44,14 +44,22 @@ $enable-rounded: false !default;
44
44
  $enable-shadows: true !default;
45
45
  $enable-gradients: false !default;
46
46
 
47
- $font-family-sans-serif: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
48
- $font-family-serif: "Merriweather", Georgia, "Times New Roman", Times, serif !default;
47
+ $font-family-sans-serif:
48
+ 'Poppins',
49
+ -apple-system,
50
+ BlinkMacSystemFont,
51
+ 'Segoe UI',
52
+ Roboto,
53
+ 'Helvetica Neue',
54
+ Arial,
55
+ sans-serif !default;
56
+ $font-family-serif: 'Merriweather', Georgia, 'Times New Roman', Times, serif !default;
49
57
 
50
58
  $headings-font-family: $font-family-sans-serif !default;
51
59
  $headings-font-weight: 700 !default;
52
60
 
53
61
  $jumbotron-bg: $gray-200 !default;
54
- $jumbotron-font-family: "Anton", $font-family-sans-serif !default;
62
+ $jumbotron-font-family: 'Anton', $font-family-sans-serif !default;
55
63
  $jumbotron-font-weight: 400 !default;
56
64
 
57
65
  $fade-bg: $gray-400 !default;
@@ -60,9 +68,7 @@ $list-group-bg: transparent !default;
60
68
  $input-focus-border-color: $secondary !default;
61
69
  $bs-input-bg: $gray-100 !default;
62
70
  $input-focus-bg: $white !default;
63
- $input-box-shadow: none !default;
64
71
 
65
- $btn-box-shadow: none !default;
66
72
  $btn-font-family: $font-family-sans-serif;
67
73
 
68
74
  $form-check-input-gutter: 1.5rem !default;
package/lib/types.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import type { StyleValue } from 'vue'
2
2
 
3
- import {AccordionKey, ParentKey} from '@/keys'
3
+ import { AccordionKey, ParentKey } from '@/keys'
4
4
  import { ComputedRef } from 'vue'
5
5
  import type { GeoProjection } from 'd3-geo'
6
6
  import { Ref } from 'vue'
7
7
 
8
-
9
8
  export type Step = symbol | string
10
9
 
11
10
  export type Accordion = {
@@ -30,16 +29,33 @@ export type BrandStyle = StyleValue & {
30
29
  width: string
31
30
  }
32
31
 
33
- export type BrandExpansionStyle = Pick<BrandStyle, '--monochrome-color' | 'background'>
34
-
35
- export type Variant = 'primary' | 'secondary' | 'danger' | 'info' | 'warning' | 'success' | 'dark' | 'light'
36
-
37
- export type MapTransform = { k: number, x: number, y: number, rotateX: number, rotateY : number }
32
+ export type BrandExpansionStyle = Pick<
33
+ BrandStyle,
34
+ '--monochrome-color' | 'background'
35
+ >
36
+
37
+ export type Variant =
38
+ | 'primary'
39
+ | 'secondary'
40
+ | 'danger'
41
+ | 'info'
42
+ | 'warning'
43
+ | 'success'
44
+ | 'dark'
45
+ | 'light'
46
+
47
+ export type MapTransform = {
48
+ k: number
49
+ x: number
50
+ y: number
51
+ rotateX: number
52
+ rotateY: number
53
+ }
38
54
 
39
55
  export type ParentMap = {
40
- mapRect:Ref<DOMRect>,
41
- mapTransform:Ref<MapTransform>,
42
- rotatingMapProjection:ComputedRef<GeoProjection|Function>
56
+ mapRect: Ref<DOMRect>
57
+ mapTransform: Ref<MapTransform>
58
+ rotatingMapProjection: ComputedRef<GeoProjection | Function>
43
59
  }
44
60
  export type ParentMapProvide = {
45
61
  [ParentKey]: ParentMap
@@ -2,20 +2,20 @@ export class RequestAnimationFrameWrapper {
2
2
  live: boolean
3
3
  callback: () => void
4
4
 
5
- constructor () {
5
+ constructor() {
6
6
  this.live = false
7
7
  this.callback = () => null
8
8
  }
9
- start (callback: () => void) {
9
+ start(callback: () => void) {
10
10
  this.live = true
11
11
  this.callback = callback
12
12
  this.schedule()
13
13
  }
14
- stop () {
14
+ stop() {
15
15
  this.live = false
16
16
  this.callback = () => null
17
17
  }
18
- schedule () {
18
+ schedule() {
19
19
  this.callback()
20
20
  if (this.live) {
21
21
  window.requestAnimationFrame(this.schedule.bind(this))
@@ -1,45 +1,48 @@
1
1
  import { memoize, flatten } from 'lodash'
2
2
 
3
- var assetUniqueIdCounter: number = 0;
3
+ var assetUniqueIdCounter: number = 0
4
4
 
5
- export const injectAsset = memoize(function(file: string, id: string = `dynamic-asset-${assetUniqueIdCounter++}`): Promise<unknown> {
6
-
5
+ export const injectAsset = memoize(function (
6
+ file: string,
7
+ id: string = `dynamic-asset-${assetUniqueIdCounter++}`
8
+ ): Promise<unknown> {
7
9
  return new Promise((resolve: (value?: unknown) => void) => {
8
- const parent: HTMLElement = document.querySelector("body") || document.querySelector("head")!
9
- const parts = file.split(".");
10
- const ext = parts[parts.length-1].toLowerCase();
11
- switch(ext) {
12
- case "js":
13
- var script = document.createElement('script');
14
- script.setAttribute("type", "text/javascript");
10
+ const parent: HTMLElement =
11
+ document.querySelector('body') || document.querySelector('head')!
12
+ const parts = file.split('.')
13
+ const ext = parts[parts.length - 1].toLowerCase()
14
+ switch (ext) {
15
+ case 'js':
16
+ var script = document.createElement('script')
17
+ script.setAttribute('type', 'text/javascript')
15
18
  script.onload = resolve
16
- parent.appendChild(script);
17
- script.setAttribute("src", file);
18
- script.setAttribute("id", id);
19
- break;
20
- case "css":
21
- var css = document.createElement('link');
22
- css.setAttribute("rel", "stylesheet");
23
- css.setAttribute("type", "text/css");
19
+ parent.appendChild(script)
20
+ script.setAttribute('src', file)
21
+ script.setAttribute('id', id)
22
+ break
23
+ case 'css':
24
+ var css = document.createElement('link')
25
+ css.setAttribute('rel', 'stylesheet')
26
+ css.setAttribute('type', 'text/css')
24
27
  css.onload = resolve
25
- parent.appendChild(css);
26
- css.setAttribute("href", file);
27
- css.setAttribute("id", id);
28
- break;
28
+ parent.appendChild(css)
29
+ css.setAttribute('href', file)
30
+ css.setAttribute('id', id)
31
+ break
29
32
  }
30
33
  })
31
34
  })
32
35
 
33
- export const injectAssets = function(...args: string[]): Promise<void> {
36
+ export const injectAssets = function (...args: string[]): Promise<void> {
34
37
  const files = flatten(args)
35
38
  return new Promise((resolve: () => void) => {
36
- var filesLoaded = 0;
37
- var allFilesLoaded = function() {
38
- if(++filesLoaded == files.length) {
39
- resolve();
39
+ var filesLoaded = 0
40
+ var allFilesLoaded = function () {
41
+ if (++filesLoaded == files.length) {
42
+ resolve()
40
43
  }
41
44
  }
42
- for(var i=0; i < files.length ; i++) {
45
+ for (var i = 0; i < files.length; i++) {
43
46
  injectAsset(files[i]).then(allFilesLoaded)
44
47
  }
45
48
  })
@@ -1,19 +1,25 @@
1
1
  import Clipboard from 'clipboard'
2
2
 
3
- export function copyText (text: string, container: Element): Promise<void> {
4
- return new Promise(function (resolve: (value?:undefined) => void, reject: (value?: Clipboard.Event) => void) {
3
+ export function copyText(text: string, container: Element): Promise<void> {
4
+ return new Promise(function (
5
+ resolve: (value?: undefined) => void,
6
+ reject: (value?: Clipboard.Event) => void
7
+ ) {
5
8
  const fakeElement = document.createElement('button')
6
9
  // Use the document body as container is no valid object is provided
7
10
  container = typeof container === 'object' ? container : document.body
8
11
 
9
- const clipboard: Clipboard = new Clipboard(fakeElement, { text: () => text, container })
12
+ const clipboard: Clipboard = new Clipboard(fakeElement, {
13
+ text: () => text,
14
+ container
15
+ })
10
16
 
11
17
  clipboard.on('success', () => {
12
18
  clipboard.destroy()
13
19
  resolve()
14
20
  })
15
21
 
16
- clipboard.on('error', error => {
22
+ clipboard.on('error', (error) => {
17
23
  clipboard.destroy()
18
24
  reject(error)
19
25
  })
@@ -22,7 +28,7 @@ export function copyText (text: string, container: Element): Promise<void> {
22
28
  })
23
29
  }
24
30
 
25
- export function copyHtml (html: string, plain: string) {
31
+ export function copyHtml(html: string, plain: string) {
26
32
  interface ClipboardEvent extends Event {
27
33
  clipboardData: {
28
34
  setData: (attribute: string, value: string) => void
@@ -30,12 +36,12 @@ export function copyHtml (html: string, plain: string) {
30
36
  }
31
37
 
32
38
  function listener(event: ClipboardEvent) {
33
- event.clipboardData.setData("text/html", html)
34
- event.clipboardData.setData("text/plain", plain)
39
+ event.clipboardData.setData('text/html', html)
40
+ event.clipboardData.setData('text/plain', plain)
35
41
  event.preventDefault()
36
42
  }
37
43
 
38
- document.addEventListener("copy", listener as EventListener)
39
- document.execCommand("copy")
40
- document.removeEventListener("copy", listener as EventListener)
44
+ document.addEventListener('copy', listener as EventListener)
45
+ document.execCommand('copy')
46
+ document.removeEventListener('copy', listener as EventListener)
41
47
  }
@@ -12,29 +12,34 @@ const initialHref = window.location.href
12
12
  export default class IframeResizer {
13
13
  initializer: Promise<PymChild>
14
14
 
15
- constructor () {
16
- this.initializer = injectAssets('//pym.nprapps.org/pym.v1.min.js').then(() => {
17
- pymChild = pymChild || new window.pym.Child({ polling: 300 })
18
- return pymChild
19
- })
15
+ constructor() {
16
+ this.initializer = injectAssets('//pym.nprapps.org/pym.v1.min.js').then(
17
+ () => {
18
+ pymChild = pymChild || new window.pym.Child({ polling: 300 })
19
+ return pymChild
20
+ }
21
+ )
20
22
  }
21
- sendHeight (): Promise<void> {
22
- return this.initializer.then(pymChild => pymChild.sendHeight())
23
+ sendHeight(): Promise<void> {
24
+ return this.initializer.then((pymChild) => pymChild.sendHeight())
23
25
  }
24
- static create (): IframeResizer {
26
+ static create(): IframeResizer {
25
27
  return new IframeResizer()
26
28
  }
27
- static template(url: string, id: string = 'icij-' + Date.now().toString(32)): string {
29
+ static template(
30
+ url: string,
31
+ id: string = 'icij-' + Date.now().toString(32)
32
+ ): string {
28
33
  return [
29
34
  `<script type="text/javascript" src="https://pym.nprapps.org/pym.v1.min.js"></script>`,
30
35
  `<div id="${id}"></div>`,
31
36
  `<script>`,
32
37
  `const icijIframe = new pym.Parent("${id}", "${IframeResizer.deletePymParams(url)}", {})`,
33
- `</script>`,
38
+ `</script>`
34
39
  ].join('\n')
35
40
  }
36
41
  static deletePymParams(href: string = initialHref): string {
37
- const url = new URL(href);
42
+ const url = new URL(href)
38
43
  // Remove all unwanted param
39
44
  for (const param of pymParams) {
40
45
  url.searchParams.delete(param)
@@ -42,8 +47,8 @@ export default class IframeResizer {
42
47
  // Rebuild the URL
43
48
  return url.href
44
49
  }
45
- static isEmbedded (href: string = initialHref): boolean {
50
+ static isEmbedded(href: string = initialHref): boolean {
46
51
  const url = new URL(href)
47
- return every(pymParams, param => url.searchParams.has(param))
52
+ return every(pymParams, (param) => url.searchParams.has(param))
48
53
  }
49
54
  }
@@ -1,4 +1,11 @@
1
- import { BoxStyle, ContentPlaceholderStyledRow, ContentPlaceholderRow, ContentPlaceholderRowBoxes, ContentPlaceholderStyledRows, ContentPlaceholderRows } from "@/utils/placeholderTypes"
1
+ import {
2
+ BoxStyle,
3
+ ContentPlaceholderStyledRow,
4
+ ContentPlaceholderRow,
5
+ ContentPlaceholderRowBoxes,
6
+ ContentPlaceholderStyledRows,
7
+ ContentPlaceholderRows
8
+ } from '@/utils/placeholderTypes'
2
9
 
3
10
  export function isFlexBasis(value: string | number): boolean {
4
11
  return Number(value).toString() === value.toString()
@@ -8,24 +15,37 @@ export function isWidth(value: string | number): boolean {
8
15
  const valueAsStr = String(value)
9
16
  const cssSuffix = ['px', '%', 'em', 'rem']
10
17
  let checkState = false
11
- cssSuffix.forEach(suffix => {
12
- if (Number(valueAsStr.split(suffix)[0]) &&
18
+ cssSuffix.forEach((suffix) => {
19
+ if (
20
+ Number(valueAsStr.split(suffix)[0]) &&
13
21
  valueAsStr.split(suffix)[1] === '' &&
14
- valueAsStr.split(suffix).length === 2) {
22
+ valueAsStr.split(suffix).length === 2
23
+ ) {
15
24
  checkState = true
16
25
  }
17
26
  })
18
27
  return checkState
19
28
  }
20
29
 
21
- export function getBoxStyle(left: number, width: number, isLast: boolean, subClass: string = 'box'): BoxStyle[] {
30
+ export function getBoxStyle(
31
+ left: number,
32
+ width: number,
33
+ isLast: boolean,
34
+ subClass: string = 'box'
35
+ ): BoxStyle[] {
22
36
  const arr: BoxStyle[] = []
23
37
 
24
38
  if (left !== 0) {
25
39
  if (isFlexBasis(left)) {
26
- arr.push({ style: `flex-grow: ${left}; flex-shrink: 0; flex-basis: 0;`, subClass })
40
+ arr.push({
41
+ style: `flex-grow: ${left}; flex-shrink: 0; flex-basis: 0;`,
42
+ subClass
43
+ })
27
44
  } else if (isWidth(left)) {
28
- arr.push({ style: `flex-grow: 0; flex-shrink: 0; flex-basis: ${left};`, subClass })
45
+ arr.push({
46
+ style: `flex-grow: 0; flex-shrink: 0; flex-basis: ${left};`,
47
+ subClass
48
+ })
29
49
  }
30
50
  }
31
51
  if (isFlexBasis(width)) {
@@ -34,26 +54,37 @@ export function getBoxStyle(left: number, width: number, isLast: boolean, subCla
34
54
  arr.push({ style: `flex-grow: 0; flex-shrink: 0; flex-basis: ${width};` })
35
55
  }
36
56
  if (isLast) {
37
- arr.push({ style: 'flex-grow: 1; flex-shrink: 0; flex-basis: 0;', subClass })
57
+ arr.push({
58
+ style: 'flex-grow: 1; flex-shrink: 0; flex-basis: 0;',
59
+ subClass
60
+ })
38
61
  }
39
62
  return arr
40
63
  }
41
64
 
42
- export function formatRows(rows: ContentPlaceholderRows, subClass: string = 'box'): ContentPlaceholderStyledRows {
43
- const rowArr: ContentPlaceholderStyledRows = rows.map((row: ContentPlaceholderRow) => {
44
- // Will contain all boxes in
45
- const rowBoxes: Array<BoxStyle> = []
46
- // Create placeholder row with initial height
47
- const rowObj: ContentPlaceholderStyledRow = { height: row.height, boxes: [] }
48
- // Add style
49
- row.boxes.forEach((box: Array<any>, index: number) => {
50
- const isLast: boolean = index === row.boxes.length - 1
51
- // Merge the box styles
52
- rowBoxes.push(...getBoxStyle(box[0], box[1], isLast, subClass))
53
- })
54
- rowObj.boxes = rowBoxes
55
- return rowObj
56
- })
65
+ export function formatRows(
66
+ rows: ContentPlaceholderRows,
67
+ subClass: string = 'box'
68
+ ): ContentPlaceholderStyledRows {
69
+ const rowArr: ContentPlaceholderStyledRows = rows.map(
70
+ (row: ContentPlaceholderRow) => {
71
+ // Will contain all boxes in
72
+ const rowBoxes: Array<BoxStyle> = []
73
+ // Create placeholder row with initial height
74
+ const rowObj: ContentPlaceholderStyledRow = {
75
+ height: row.height,
76
+ boxes: []
77
+ }
78
+ // Add style
79
+ row.boxes.forEach((box: Array<any>, index: number) => {
80
+ const isLast: boolean = index === row.boxes.length - 1
81
+ // Merge the box styles
82
+ rowBoxes.push(...getBoxStyle(box[0], box[1], isLast, subClass))
83
+ })
84
+ rowObj.boxes = rowBoxes
85
+ return rowObj
86
+ }
87
+ )
57
88
 
58
89
  return rowArr
59
90
  }
@@ -1,19 +1,19 @@
1
1
  import type { StyleValue } from 'vue'
2
2
 
3
3
  export interface BoxStyle {
4
- style: StyleValue,
4
+ style: StyleValue
5
5
  subClass?: string
6
6
  }
7
7
 
8
8
  export type ContentPlaceholderRowBoxes = Array<Array<number | string>>
9
9
 
10
10
  export interface ContentPlaceholderRow {
11
- height: number | string,
11
+ height: number | string
12
12
  boxes: ContentPlaceholderRowBoxes
13
13
  }
14
14
 
15
15
  export interface ContentPlaceholderStyledRow {
16
- height: number | string,
16
+ height: number | string
17
17
  boxes: Array<BoxStyle>
18
18
  }
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icij/murmur-next",
3
- "version": "4.0.0",
3
+ "version": "4.0.3",
4
4
  "private": false,
5
5
  "description": "Murmur is ICIJ's Design System for Bootstrap 5 and Vue.js",
6
6
  "author": "promera@icij.org",
@@ -17,12 +17,26 @@
17
17
  "build": "vite build",
18
18
  "preview": "vite preview",
19
19
  "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
20
- "format": "prettier --write lib/",
20
+ "format": "prettier --write lib/ stories/ .storybook/ tests/",
21
21
  "storybook": "storybook dev -p 6006",
22
22
  "build-storybook": "storybook build",
23
23
  "test": "vitest",
24
24
  "test:unit": "vitest run"
25
25
  },
26
+ "main": "./dist/lib/murmur.umd.cjs",
27
+ "module": "./dist/lib/murmur.js",
28
+ "files": [
29
+ "lib/**/*",
30
+ "dist/lib/**/*"
31
+ ],
32
+ "exports": {
33
+ ".": {
34
+ "import": "./dist/lib/murmur.js",
35
+ "require": "./dist/lib/murmur.umd.cjs"
36
+ },
37
+ "./lib/": "./lib/",
38
+ "./dist/": "./dist/"
39
+ },
26
40
  "type": "module",
27
41
  "dependencies": {
28
42
  "@fortawesome/fontawesome": "^1.1.8",
@@ -90,6 +104,11 @@
90
104
  "peerDependencies": {
91
105
  "vue": "^3.4.19"
92
106
  },
107
+ "prettier": {
108
+ "singleQuote": true,
109
+ "semi": false,
110
+ "trailingComma": "none"
111
+ },
93
112
  "resolutions": {
94
113
  "jackspeak": "2.1.1"
95
114
  }
@@ -1,50 +0,0 @@
1
- # Workflow name
2
- name: Build and Publish Storybook to GitHub Pages
3
-
4
- on:
5
- # Event for the workflow to run on
6
- push:
7
- branches:
8
- - 'main' # Replace with the branch you want to deploy from
9
-
10
- permissions:
11
- contents: read
12
- pages: write
13
- id-token: write
14
-
15
- # List of jobs
16
- jobs:
17
- deploy:
18
- runs-on: ubuntu-latest
19
- # Job steps
20
- steps:
21
- # Manual Checkout
22
- - uses: actions/checkout@v3
23
-
24
- # Set up Node
25
- - uses: actions/setup-node@v3
26
- with:
27
- node-version: '18.x'
28
- cache: 'yarn'
29
-
30
- - name: Install Node dependencies
31
- run: yarn --frozen-lockfile
32
-
33
- - name: Run tests
34
- run: yarn test
35
-
36
- - name: Build Murmur
37
- run: yarn build
38
-
39
- - name: Build storybook artifacts
40
- run: yarn build-storybook
41
-
42
- # Upload storybook to repository's artifacts
43
- - name: Upload storybook artifacts
44
- uses: actions/upload-pages-artifact@v3
45
- with:
46
- path: storybook-static
47
-
48
- - uses: actions/deploy-pages@v4
49
-
50
-
@@ -1,14 +0,0 @@
1
- @import './doc_variables.scss';
2
- @import '../lib/styles/lib';
3
- @import 'node_modules/bootstrap/scss/bootstrap';
4
- @import 'node_modules/bootstrap-vue-next/dist/bootstrap-vue-next';
5
- .bg-striped {
6
- background: repeating-linear-gradient(45deg, #dfdddd, #dfdddd 10px, #cfcccc 10px, #cfcccc 20px);
7
- width:500px
8
- }
9
- @include color-mode(dark) {
10
- .bg-striped {
11
- background: repeating-linear-gradient(45deg, #222, #333 10px, #444 10px, #444 20px);
12
-
13
- }
14
- }