@govtechsg/sgds-web-component 0.0.10 → 0.0.11

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 (251) hide show
  1. package/package.json +7 -64
  2. package/.github/workflows/publish-latest.yml +0 -22
  3. package/.github/workflows/publish-pr.yml +0 -28
  4. package/.husky/commit-msg +0 -4
  5. package/.husky/prepare-commit-msg +0 -8
  6. package/.storybook/main.js +0 -16
  7. package/.storybook/preview-head.html +0 -11
  8. package/.storybook/preview.js +0 -9
  9. package/.vscode/settings.json +0 -7
  10. package/CONTRIBUTING.md +0 -56
  11. package/LICENSE +0 -20
  12. package/amplify.yml +0 -22
  13. package/commitlint.config.js +0 -1
  14. package/coverage/lcov-report/base.css +0 -224
  15. package/coverage/lcov-report/block-navigation.js +0 -87
  16. package/coverage/lcov-report/button-element.scss.html +0 -112
  17. package/coverage/lcov-report/button-element.ts.html +0 -145
  18. package/coverage/lcov-report/favicon.png +0 -0
  19. package/coverage/lcov-report/index.html +0 -116
  20. package/coverage/lcov-report/prettify.css +0 -1
  21. package/coverage/lcov-report/prettify.js +0 -2
  22. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  23. package/coverage/lcov-report/sorter.js +0 -196
  24. package/coverage/lcov.info +0 -32
  25. package/index.html +0 -430
  26. package/mocks/dropdown.d.ts +0 -4
  27. package/mocks/dropdown.ts +0 -27
  28. package/mocks/link.d.ts +0 -3
  29. package/mocks/link.ts +0 -6
  30. package/rollup.config.js +0 -73
  31. package/rollup.test.config.js +0 -42
  32. package/scripts/buildUtils.js +0 -30
  33. package/scripts/frankBuild.js +0 -49
  34. package/src/Button/index.ts +0 -1
  35. package/src/Button/sgds-button.scss +0 -28
  36. package/src/Button/sgds-button.ts +0 -153
  37. package/src/Card/index.ts +0 -1
  38. package/src/Card/sgds-action-card.scss +0 -27
  39. package/src/Card/sgds-action-card.ts +0 -115
  40. package/src/Checkbox/index.ts +0 -1
  41. package/src/Checkbox/sgds-checkbox.scss +0 -4
  42. package/src/Checkbox/sgds-checkbox.ts +0 -149
  43. package/src/Dropdown/index.ts +0 -3
  44. package/src/Dropdown/sgds-dropdown-item.ts +0 -39
  45. package/src/Dropdown/sgds-dropdown.scss +0 -5
  46. package/src/Dropdown/sgds-dropdown.ts +0 -54
  47. package/src/Footer/index.ts +0 -3
  48. package/src/Footer/sgds-footer.scss +0 -5
  49. package/src/Footer/sgds-footer.ts +0 -121
  50. package/src/Input/index.ts +0 -1
  51. package/src/Input/sgds-input.scss +0 -20
  52. package/src/Input/sgds-input.ts +0 -178
  53. package/src/Mainnav/index.ts +0 -4
  54. package/src/Mainnav/sgds-mainnav-dropdown.scss +0 -13
  55. package/src/Mainnav/sgds-mainnav-dropdown.ts +0 -45
  56. package/src/Mainnav/sgds-mainnav-item.scss +0 -24
  57. package/src/Mainnav/sgds-mainnav-item.ts +0 -8
  58. package/src/Mainnav/sgds-mainnav.scss +0 -39
  59. package/src/Mainnav/sgds-mainnav.ts +0 -183
  60. package/src/Masthead/index.ts +0 -1
  61. package/src/Masthead/sgds-masthead.scss +0 -217
  62. package/src/Masthead/sgds-masthead.ts +0 -189
  63. package/src/Modal/index.ts +0 -1
  64. package/src/Modal/sgds-modal.scss +0 -128
  65. package/src/Modal/sgds-modal.ts +0 -309
  66. package/src/QuantityToggle/index.ts +0 -1
  67. package/src/QuantityToggle/sgds-quantitytoggle.scss +0 -10
  68. package/src/QuantityToggle/sgds-quantitytoggle.ts +0 -130
  69. package/src/Radio/index.ts +0 -2
  70. package/src/Radio/sgds-radio.scss +0 -5
  71. package/src/Radio/sgds-radio.ts +0 -120
  72. package/src/Radio/sgds-radiogroup.scss +0 -22
  73. package/src/Radio/sgds-radiogroup.ts +0 -221
  74. package/src/Sidenav/index.ts +0 -4
  75. package/src/Sidenav/sgds-sidenav-item.scss +0 -73
  76. package/src/Sidenav/sgds-sidenav-item.ts +0 -145
  77. package/src/Sidenav/sgds-sidenav-link.scss +0 -25
  78. package/src/Sidenav/sgds-sidenav-link.ts +0 -8
  79. package/src/Sidenav/sgds-sidenav.scss +0 -6
  80. package/src/Sidenav/sgds-sidenav.ts +0 -33
  81. package/src/Tab/index.ts +0 -3
  82. package/src/Tab/sgds-tab.scss +0 -84
  83. package/src/Tab/sgds-tab.ts +0 -87
  84. package/src/Tab/sgds-tabgroup.scss +0 -198
  85. package/src/Tab/sgds-tabgroup.ts +0 -295
  86. package/src/Tab/sgds-tabpanel.scss +0 -12
  87. package/src/Tab/sgds-tabpanel.ts +0 -55
  88. package/src/Textarea/index.ts +0 -1
  89. package/src/Textarea/sgds-textarea.scss +0 -23
  90. package/src/Textarea/sgds-textarea.ts +0 -201
  91. package/src/index.ts +0 -16
  92. package/src/utils/animate.ts +0 -69
  93. package/src/utils/animation-registry.ts +0 -71
  94. package/src/utils/base.scss +0 -14
  95. package/src/utils/breakpoints.ts +0 -5
  96. package/src/utils/card-element.ts +0 -42
  97. package/src/utils/components.style.scss +0 -531
  98. package/src/utils/defaultvalue.ts +0 -51
  99. package/src/utils/dropdown-element.ts +0 -244
  100. package/src/utils/event.ts +0 -13
  101. package/src/utils/form.ts +0 -183
  102. package/src/utils/generateId.ts +0 -4
  103. package/src/utils/link-element.ts +0 -34
  104. package/src/utils/mergeDeep.ts +0 -22
  105. package/src/utils/modal.ts +0 -64
  106. package/src/utils/object.ts +0 -2
  107. package/src/utils/offset.ts +0 -6
  108. package/src/utils/scroll.ts +0 -57
  109. package/src/utils/sgds-element.ts +0 -18
  110. package/src/utils/slot.ts +0 -102
  111. package/src/utils/tabbable.ts +0 -81
  112. package/src/utils/watch.ts +0 -62
  113. package/stories/ActionCard.stories.mdx +0 -199
  114. package/stories/Button.stories.mdx +0 -194
  115. package/stories/Checkbox.stories.mdx +0 -196
  116. package/stories/Dropdown.stories.mdx +0 -152
  117. package/stories/Footer.stories.mdx +0 -261
  118. package/stories/Input.stories.mdx +0 -236
  119. package/stories/MainNav.stories.mdx +0 -169
  120. package/stories/Masthead.stories.mdx +0 -112
  121. package/stories/Modal.stories.mdx +0 -103
  122. package/stories/QuantityToggle.stories.mdx +0 -97
  123. package/stories/Radio.stories.mdx +0 -262
  124. package/stories/Sample.stories.js +0 -29
  125. package/stories/Sample.stories.mdx +0 -33
  126. package/stories/SideNav.stories.mdx +0 -245
  127. package/stories/common.js +0 -185
  128. package/stories/textarea.stories.mdx +0 -253
  129. package/test/button.element.test.ts +0 -185
  130. package/test/checkbox.test.ts +0 -240
  131. package/test/dropdown.test.ts +0 -637
  132. package/test/footer.test.ts +0 -181
  133. package/test/generateId.test.ts +0 -18
  134. package/test/input.element.test.ts +0 -316
  135. package/test/link-element.test.ts +0 -38
  136. package/test/mainnav.test.ts +0 -313
  137. package/test/masthead.test.ts +0 -116
  138. package/test/modal.test.ts +0 -149
  139. package/test/quantitytoggle.test.ts +0 -76
  140. package/test/radio.test.ts +0 -310
  141. package/test/selectable-card.test.ts +0 -159
  142. package/test/sidenav.test.ts +0 -390
  143. package/test/tab.test.ts +0 -76
  144. package/test/textarea.test.ts +0 -126
  145. package/tsconfig.json +0 -26
  146. package/tsconfig.test.json +0 -24
  147. package/typings/scss.d.ts +0 -5
  148. package/web-dev-server.config.mjs +0 -7
  149. package/web-test-runner.config.mjs +0 -47
  150. /package/{lib/Button → Button}/index.d.ts +0 -0
  151. /package/{lib/Button → Button}/index.js +0 -0
  152. /package/{lib/Button → Button}/index.js.map +0 -0
  153. /package/{lib/Button → Button}/package.json +0 -0
  154. /package/{lib/Button → Button}/sgds-button.d.ts +0 -0
  155. /package/{lib/Card → Card}/index.d.ts +0 -0
  156. /package/{lib/Card → Card}/index.js +0 -0
  157. /package/{lib/Card → Card}/index.js.map +0 -0
  158. /package/{lib/Card → Card}/package.json +0 -0
  159. /package/{lib/Card → Card}/sgds-action-card.d.ts +0 -0
  160. /package/{lib/Checkbox → Checkbox}/index.d.ts +0 -0
  161. /package/{lib/Checkbox → Checkbox}/index.js +0 -0
  162. /package/{lib/Checkbox → Checkbox}/index.js.map +0 -0
  163. /package/{lib/Checkbox → Checkbox}/package.json +0 -0
  164. /package/{lib/Checkbox → Checkbox}/sgds-checkbox.d.ts +0 -0
  165. /package/{lib/Dropdown → Dropdown}/index.d.ts +0 -0
  166. /package/{lib/Dropdown → Dropdown}/index.js +0 -0
  167. /package/{lib/Dropdown → Dropdown}/index.js.map +0 -0
  168. /package/{lib/Dropdown → Dropdown}/package.json +0 -0
  169. /package/{lib/Dropdown → Dropdown}/sgds-dropdown-item.d.ts +0 -0
  170. /package/{lib/Dropdown → Dropdown}/sgds-dropdown.d.ts +0 -0
  171. /package/{lib/Footer → Footer}/index.d.ts +0 -0
  172. /package/{lib/Footer → Footer}/index.js +0 -0
  173. /package/{lib/Footer → Footer}/index.js.map +0 -0
  174. /package/{lib/Footer → Footer}/package.json +0 -0
  175. /package/{lib/Footer → Footer}/sgds-footer.d.ts +0 -0
  176. /package/{lib/Input → Input}/index.d.ts +0 -0
  177. /package/{lib/Input → Input}/index.js +0 -0
  178. /package/{lib/Input → Input}/index.js.map +0 -0
  179. /package/{lib/Input → Input}/package.json +0 -0
  180. /package/{lib/Input → Input}/sgds-input.d.ts +0 -0
  181. /package/{lib/Mainnav → Mainnav}/index.d.ts +0 -0
  182. /package/{lib/Mainnav → Mainnav}/index.js +0 -0
  183. /package/{lib/Mainnav → Mainnav}/index.js.map +0 -0
  184. /package/{lib/Mainnav → Mainnav}/package.json +0 -0
  185. /package/{lib/Mainnav → Mainnav}/sgds-mainnav-dropdown.d.ts +0 -0
  186. /package/{lib/Mainnav → Mainnav}/sgds-mainnav-item.d.ts +0 -0
  187. /package/{lib/Mainnav → Mainnav}/sgds-mainnav.d.ts +0 -0
  188. /package/{lib/Masthead → Masthead}/index.d.ts +0 -0
  189. /package/{lib/Masthead → Masthead}/index.js +0 -0
  190. /package/{lib/Masthead → Masthead}/index.js.map +0 -0
  191. /package/{lib/Masthead → Masthead}/package.json +0 -0
  192. /package/{lib/Masthead → Masthead}/sgds-masthead.d.ts +0 -0
  193. /package/{lib/Modal → Modal}/index.d.ts +0 -0
  194. /package/{lib/Modal → Modal}/index.js +0 -0
  195. /package/{lib/Modal → Modal}/index.js.map +0 -0
  196. /package/{lib/Modal → Modal}/package.json +0 -0
  197. /package/{lib/Modal → Modal}/sgds-modal.d.ts +0 -0
  198. /package/{lib/QuantityToggle → QuantityToggle}/index.d.ts +0 -0
  199. /package/{lib/QuantityToggle → QuantityToggle}/index.js +0 -0
  200. /package/{lib/QuantityToggle → QuantityToggle}/index.js.map +0 -0
  201. /package/{lib/QuantityToggle → QuantityToggle}/package.json +0 -0
  202. /package/{lib/QuantityToggle → QuantityToggle}/sgds-quantitytoggle.d.ts +0 -0
  203. /package/{lib/Radio → Radio}/index.d.ts +0 -0
  204. /package/{lib/Radio → Radio}/index.js +0 -0
  205. /package/{lib/Radio → Radio}/index.js.map +0 -0
  206. /package/{lib/Radio → Radio}/package.json +0 -0
  207. /package/{lib/Radio → Radio}/sgds-radio.d.ts +0 -0
  208. /package/{lib/Radio → Radio}/sgds-radiogroup.d.ts +0 -0
  209. /package/{lib/Sidenav → Sidenav}/index.d.ts +0 -0
  210. /package/{lib/Sidenav → Sidenav}/index.js +0 -0
  211. /package/{lib/Sidenav → Sidenav}/index.js.map +0 -0
  212. /package/{lib/Sidenav → Sidenav}/package.json +0 -0
  213. /package/{lib/Sidenav → Sidenav}/sgds-sidenav-item.d.ts +0 -0
  214. /package/{lib/Sidenav → Sidenav}/sgds-sidenav-link.d.ts +0 -0
  215. /package/{lib/Sidenav → Sidenav}/sgds-sidenav.d.ts +0 -0
  216. /package/{lib/Tab → Tab}/index.d.ts +0 -0
  217. /package/{lib/Tab → Tab}/index.js +0 -0
  218. /package/{lib/Tab → Tab}/index.js.map +0 -0
  219. /package/{lib/Tab → Tab}/package.json +0 -0
  220. /package/{lib/Tab → Tab}/sgds-tab.d.ts +0 -0
  221. /package/{lib/Tab → Tab}/sgds-tabgroup.d.ts +0 -0
  222. /package/{lib/Tab → Tab}/sgds-tabpanel.d.ts +0 -0
  223. /package/{lib/Textarea → Textarea}/index.d.ts +0 -0
  224. /package/{lib/Textarea → Textarea}/index.js +0 -0
  225. /package/{lib/Textarea → Textarea}/index.js.map +0 -0
  226. /package/{lib/Textarea → Textarea}/package.json +0 -0
  227. /package/{lib/Textarea → Textarea}/sgds-textarea.d.ts +0 -0
  228. /package/{lib/index.d.ts → index.d.ts} +0 -0
  229. /package/{lib/index.js → index.js} +0 -0
  230. /package/{lib/index.js.map → index.js.map} +0 -0
  231. /package/{lib/umd → umd}/index.js +0 -0
  232. /package/{lib/umd → umd}/index.js.map +0 -0
  233. /package/{lib/utils → utils}/animate.d.ts +0 -0
  234. /package/{lib/utils → utils}/animation-registry.d.ts +0 -0
  235. /package/{lib/utils → utils}/breakpoints.d.ts +0 -0
  236. /package/{lib/utils → utils}/card-element.d.ts +0 -0
  237. /package/{lib/utils → utils}/defaultvalue.d.ts +0 -0
  238. /package/{lib/utils → utils}/dropdown-element.d.ts +0 -0
  239. /package/{lib/utils → utils}/event.d.ts +0 -0
  240. /package/{lib/utils → utils}/form.d.ts +0 -0
  241. /package/{lib/utils → utils}/generateId.d.ts +0 -0
  242. /package/{lib/utils → utils}/link-element.d.ts +0 -0
  243. /package/{lib/utils → utils}/mergeDeep.d.ts +0 -0
  244. /package/{lib/utils → utils}/modal.d.ts +0 -0
  245. /package/{lib/utils → utils}/object.d.ts +0 -0
  246. /package/{lib/utils → utils}/offset.d.ts +0 -0
  247. /package/{lib/utils → utils}/scroll.d.ts +0 -0
  248. /package/{lib/utils → utils}/sgds-element.d.ts +0 -0
  249. /package/{lib/utils → utils}/slot.d.ts +0 -0
  250. /package/{lib/utils → utils}/tabbable.d.ts +0 -0
  251. /package/{lib/utils → utils}/watch.d.ts +0 -0
@@ -1,47 +0,0 @@
1
- import { esbuildPlugin } from "@web/dev-server-esbuild";
2
- import { sassPlugin } from "esbuild-sass-plugin";
3
- import rollupPostcss from 'rollup-plugin-postcss';
4
- import rollupLitcss from 'rollup-plugin-postcss-lit';
5
- import { fromRollup } from '@web/dev-server-rollup';
6
- import {playwrightLauncher} from '@web/test-runner-playwright';
7
-
8
-
9
- const browsers = {
10
- // Local browser testing via playwright
11
- // ===========
12
- chromium: playwrightLauncher({product: 'chromium'}),
13
- firefox: playwrightLauncher({product: 'firefox'}),
14
- // webkit: playwrightLauncher({product: 'webkit'}),
15
-
16
- // Uncomment example launchers for running on Sauce Labs
17
- // ===========
18
- // chromium: sauceLabsLauncher({browserName: 'chrome', browserVersion: 'latest', platformName: 'Windows 10'}),
19
- // firefox: sauceLabsLauncher({browserName: 'firefox', browserVersion: 'latest', platformName: 'Windows 10'}),
20
- // edge: sauceLabsLauncher({browserName: 'MicrosoftEdge', browserVersion: 'latest', platformName: 'Windows 10'}),
21
- // ie11: sauceLabsLauncher({browserName: 'internet explorer', browserVersion: '11.0', platformName: 'Windows 10'}),
22
- // safari: sauceLabsLauncher({browserName: 'safari', browserVersion: 'latest', platformName: 'macOS 10.15'}),
23
-
24
- // Uncomment example launchers for running on Sauce Labs
25
- // ===========
26
- // chromium: browserstackLauncher({browserName: 'Chrome', os: 'Windows', os_version: '10'}),
27
- // firefox: browserstackLauncher({browserName: 'Firefox', os: 'Windows', os_version: '10'}),
28
- // edge: browserstackLauncher({browserName: 'MicrosoftEdge', os: 'Windows', os_version: '10'}),
29
- // ie11: browserstackLauncher({browserName: 'IE', browser_version: '11.0', os: 'Windows', os_version: '10'}),
30
- // safari: browserstackLauncher({browserName: 'Safari', browser_version: '14.0', os: 'OS X', os_version: 'Big Sur'}),
31
- };
32
- export default {
33
- files: "test-outdir/**/*.test.js",
34
- nodeResolve: true,
35
- browsers: Object.values(browsers),
36
- plugins: [
37
- esbuildPlugin({
38
- ts: true, // compile ts files
39
- // loaders: { ".scss": "text" }, // ignoring .scss files during unit testing
40
- }),
41
- // postcss({
42
- // minimize: false,
43
- // inject: false
44
- // }),
45
- // litcss()
46
- ],
47
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes