@govtechsg/sgds-web-component 0.0.10 → 0.0.12

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 (338) hide show
  1. package/README.md +102 -10
  2. package/base/card-element.d.ts +12 -0
  3. package/{lib/utils → base}/dropdown-element.d.ts +38 -37
  4. package/{lib/utils → base}/link-element.d.ts +8 -7
  5. package/{lib/utils → base}/sgds-element.d.ts +6 -5
  6. package/components/Accordion/index.d.ts +2 -0
  7. package/components/Accordion/sgds-accordion-item.d.ts +40 -0
  8. package/components/Accordion/sgds-accordion.d.ts +19 -0
  9. package/components/ActionCard/index.d.ts +1 -0
  10. package/{lib/Card → components/ActionCard}/sgds-action-card.d.ts +21 -20
  11. package/components/Alert/index.d.ts +1 -0
  12. package/components/Alert/sgds-alert.d.ts +37 -0
  13. package/components/Badge/index.d.ts +1 -0
  14. package/components/Badge/sgds-badge.d.ts +10 -0
  15. package/components/Breadcrumb/index.d.ts +2 -0
  16. package/components/Breadcrumb/sgds-breadcrumb-item.d.ts +10 -0
  17. package/components/Breadcrumb/sgds-breadcrumb.d.ts +12 -0
  18. package/components/Button/index.d.ts +1 -0
  19. package/{lib → components}/Button/sgds-button.d.ts +55 -48
  20. package/components/Checkbox/index.d.ts +1 -0
  21. package/{lib → components}/Checkbox/sgds-checkbox.d.ts +36 -36
  22. package/components/CloseButton/index.d.ts +1 -0
  23. package/components/CloseButton/sgds-closebutton.d.ts +9 -0
  24. package/components/Dropdown/index.d.ts +3 -0
  25. package/{lib → components}/Dropdown/sgds-dropdown-item.d.ts +8 -7
  26. package/{lib → components}/Dropdown/sgds-dropdown.d.ts +8 -7
  27. package/components/FileUpload/index.d.ts +1 -0
  28. package/components/FileUpload/sgds-fileupload.d.ts +22 -0
  29. package/components/Footer/index.d.ts +1 -0
  30. package/{lib → components}/Footer/sgds-footer.d.ts +27 -23
  31. package/components/Input/index.d.ts +1 -0
  32. package/{lib → components}/Input/sgds-input.d.ts +42 -42
  33. package/components/Mainnav/index.d.ts +3 -0
  34. package/components/Mainnav/sgds-mainnav-dropdown.d.ts +6 -0
  35. package/components/Mainnav/sgds-mainnav-item.d.ts +8 -0
  36. package/{lib → components}/Mainnav/sgds-mainnav.d.ts +26 -22
  37. package/components/Masthead/index.d.ts +1 -0
  38. package/{lib → components}/Masthead/sgds-masthead.d.ts +9 -12
  39. package/components/Modal/index.d.ts +1 -0
  40. package/{lib → components}/Modal/sgds-modal.d.ts +28 -28
  41. package/components/QuantityToggle/index.d.ts +1 -0
  42. package/{lib/QuantityToggle/sgds-quantitytoggle.d.ts → components/QuantityToggle/sgds-quantity-toggle.d.ts} +30 -30
  43. package/components/Radio/index.d.ts +2 -0
  44. package/{lib/Radio/sgds-radiogroup.d.ts → components/Radio/sgds-radio-group.d.ts} +41 -41
  45. package/{lib → components}/Radio/sgds-radio.d.ts +31 -31
  46. package/components/Sidenav/index.d.ts +3 -0
  47. package/{lib → components}/Sidenav/sgds-sidenav-item.d.ts +36 -28
  48. package/components/Sidenav/sgds-sidenav-link.d.ts +8 -0
  49. package/{lib → components}/Sidenav/sgds-sidenav.d.ts +10 -6
  50. package/components/Stepper/index.d.ts +1 -0
  51. package/components/Stepper/sgds-stepper.d.ts +17 -0
  52. package/components/Tab/index.d.ts +3 -0
  53. package/{lib → components}/Tab/sgds-tab.d.ts +27 -26
  54. package/{lib → components}/Tab/sgds-tabgroup.d.ts +48 -47
  55. package/{lib → components}/Tab/sgds-tabpanel.d.ts +26 -25
  56. package/components/Table/index.d.ts +1 -0
  57. package/components/Table/sgds-table.d.ts +26 -0
  58. package/components/Textarea/index.d.ts +1 -0
  59. package/{lib → components}/Textarea/sgds-textarea.d.ts +53 -53
  60. package/components/Toast/index.d.ts +1 -0
  61. package/components/Toast/sgds-toast.d.ts +22 -0
  62. package/components/Tooltip/index.d.ts +1 -0
  63. package/components/Tooltip/sgds-tooltip.d.ts +30 -0
  64. package/index.d.ts +23 -0
  65. package/index.js +11543 -0
  66. package/index.js.map +1 -0
  67. package/main.d.ts +24 -0
  68. package/package.json +23 -65
  69. package/react/accordion/index.d.ts +3 -0
  70. package/react/accordion-item/index.d.ts +8 -0
  71. package/react/action-card/index.d.ts +3 -0
  72. package/react/alert/index.d.ts +3 -0
  73. package/react/badge/index.d.ts +3 -0
  74. package/react/breadcrumb/index.d.ts +3 -0
  75. package/react/breadcrumb-item/index.d.ts +3 -0
  76. package/react/button/index.d.ts +6 -0
  77. package/react/checkbox/index.d.ts +3 -0
  78. package/react/cjs/index.js +12510 -0
  79. package/react/cjs/index.js.map +1 -0
  80. package/react/closebutton/index.d.ts +5 -0
  81. package/react/dropdown/index.d.ts +3 -0
  82. package/react/dropdown-item/index.d.ts +3 -0
  83. package/react/fileupload/index.d.ts +3 -0
  84. package/react/footer/index.d.ts +3 -0
  85. package/react/index.d.ts +34 -0
  86. package/react/index.js +12453 -0
  87. package/react/index.js.map +1 -0
  88. package/react/input/index.d.ts +3 -0
  89. package/react/mainnav/index.d.ts +3 -0
  90. package/react/mainnav-dropdown/index.d.ts +3 -0
  91. package/react/mainnav-item/index.d.ts +3 -0
  92. package/react/masthead/index.d.ts +3 -0
  93. package/react/modal/index.d.ts +3 -0
  94. package/react/package.json +10 -0
  95. package/react/quantity-toggle/index.d.ts +3 -0
  96. package/react/radio/index.d.ts +3 -0
  97. package/react/radio-group/index.d.ts +3 -0
  98. package/react/sidenav/index.d.ts +3 -0
  99. package/react/sidenav-item/index.d.ts +5 -0
  100. package/react/sidenav-link/index.d.ts +3 -0
  101. package/react/stepper/index.d.ts +3 -0
  102. package/react/tab/index.d.ts +3 -0
  103. package/react/tab-group/index.d.ts +3 -0
  104. package/react/tab-panel/index.d.ts +3 -0
  105. package/react/table/index.d.ts +3 -0
  106. package/react/textarea/index.d.ts +3 -0
  107. package/react/toast/index.d.ts +3 -0
  108. package/react/tooltip/index.d.ts +3 -0
  109. package/umd/index.js +11995 -0
  110. package/umd/index.js.map +1 -0
  111. package/{lib/utils → utils}/animate.d.ts +10 -10
  112. package/{lib/utils → utils}/animation-registry.d.ts +18 -18
  113. package/{lib/utils → utils}/breakpoints.d.ts +5 -5
  114. package/{lib/utils → utils}/defaultvalue.d.ts +2 -2
  115. package/{lib/utils → utils}/event.d.ts +2 -2
  116. package/{lib/utils → utils}/form.d.ts +38 -38
  117. package/{lib/utils → utils}/generateId.d.ts +1 -1
  118. package/{lib/utils → utils}/mergeDeep.d.ts +2 -2
  119. package/{lib/utils → utils}/modal.d.ts +12 -12
  120. package/{lib/utils → utils}/object.d.ts +2 -2
  121. package/{lib/utils → utils}/offset.d.ts +4 -4
  122. package/{lib/utils → utils}/scroll.d.ts +13 -13
  123. package/{lib/utils → utils}/slot.d.ts +22 -22
  124. package/{lib/utils → utils}/tabbable.d.ts +8 -8
  125. package/{lib/utils → utils}/watch.d.ts +14 -14
  126. package/.github/workflows/publish-latest.yml +0 -22
  127. package/.github/workflows/publish-pr.yml +0 -28
  128. package/.husky/commit-msg +0 -4
  129. package/.husky/prepare-commit-msg +0 -8
  130. package/.storybook/main.js +0 -16
  131. package/.storybook/preview-head.html +0 -11
  132. package/.storybook/preview.js +0 -9
  133. package/.vscode/settings.json +0 -7
  134. package/CONTRIBUTING.md +0 -56
  135. package/LICENSE +0 -20
  136. package/amplify.yml +0 -22
  137. package/commitlint.config.js +0 -1
  138. package/coverage/lcov-report/base.css +0 -224
  139. package/coverage/lcov-report/block-navigation.js +0 -87
  140. package/coverage/lcov-report/button-element.scss.html +0 -112
  141. package/coverage/lcov-report/button-element.ts.html +0 -145
  142. package/coverage/lcov-report/favicon.png +0 -0
  143. package/coverage/lcov-report/index.html +0 -116
  144. package/coverage/lcov-report/prettify.css +0 -1
  145. package/coverage/lcov-report/prettify.js +0 -2
  146. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  147. package/coverage/lcov-report/sorter.js +0 -196
  148. package/coverage/lcov.info +0 -32
  149. package/index.html +0 -430
  150. package/lib/Button/index.d.ts +0 -1
  151. package/lib/Button/index.js +0 -6634
  152. package/lib/Button/index.js.map +0 -1
  153. package/lib/Button/package.json +0 -7
  154. package/lib/Card/index.d.ts +0 -1
  155. package/lib/Card/index.js +0 -6150
  156. package/lib/Card/index.js.map +0 -1
  157. package/lib/Card/package.json +0 -7
  158. package/lib/Checkbox/index.d.ts +0 -1
  159. package/lib/Checkbox/index.js +0 -6366
  160. package/lib/Checkbox/index.js.map +0 -1
  161. package/lib/Checkbox/package.json +0 -7
  162. package/lib/Dropdown/index.d.ts +0 -3
  163. package/lib/Dropdown/index.js +0 -13502
  164. package/lib/Dropdown/index.js.map +0 -1
  165. package/lib/Dropdown/package.json +0 -7
  166. package/lib/Footer/index.d.ts +0 -2
  167. package/lib/Footer/index.js +0 -7168
  168. package/lib/Footer/index.js.map +0 -1
  169. package/lib/Footer/package.json +0 -7
  170. package/lib/Input/index.d.ts +0 -1
  171. package/lib/Input/index.js +0 -6656
  172. package/lib/Input/index.js.map +0 -1
  173. package/lib/Input/package.json +0 -7
  174. package/lib/Mainnav/index.d.ts +0 -4
  175. package/lib/Mainnav/index.js +0 -32546
  176. package/lib/Mainnav/index.js.map +0 -1
  177. package/lib/Mainnav/package.json +0 -7
  178. package/lib/Mainnav/sgds-mainnav-dropdown.d.ts +0 -5
  179. package/lib/Mainnav/sgds-mainnav-item.d.ts +0 -4
  180. package/lib/Masthead/index.d.ts +0 -1
  181. package/lib/Masthead/index.js +0 -7371
  182. package/lib/Masthead/index.js.map +0 -1
  183. package/lib/Masthead/package.json +0 -7
  184. package/lib/Modal/index.d.ts +0 -1
  185. package/lib/Modal/index.js +0 -6432
  186. package/lib/Modal/index.js.map +0 -1
  187. package/lib/Modal/package.json +0 -7
  188. package/lib/QuantityToggle/index.d.ts +0 -1
  189. package/lib/QuantityToggle/index.js +0 -7049
  190. package/lib/QuantityToggle/index.js.map +0 -1
  191. package/lib/QuantityToggle/package.json +0 -7
  192. package/lib/Radio/index.d.ts +0 -2
  193. package/lib/Radio/index.js +0 -12607
  194. package/lib/Radio/index.js.map +0 -1
  195. package/lib/Radio/package.json +0 -7
  196. package/lib/Sidenav/index.d.ts +0 -3
  197. package/lib/Sidenav/index.js +0 -18739
  198. package/lib/Sidenav/index.js.map +0 -1
  199. package/lib/Sidenav/package.json +0 -7
  200. package/lib/Sidenav/sgds-sidenav-link.d.ts +0 -4
  201. package/lib/Tab/index.d.ts +0 -3
  202. package/lib/Tab/index.js +0 -13557
  203. package/lib/Tab/index.js.map +0 -1
  204. package/lib/Tab/package.json +0 -7
  205. package/lib/Textarea/index.d.ts +0 -1
  206. package/lib/Textarea/index.js +0 -6696
  207. package/lib/Textarea/index.js.map +0 -1
  208. package/lib/Textarea/package.json +0 -7
  209. package/lib/index.d.ts +0 -16
  210. package/lib/index.js +0 -134580
  211. package/lib/index.js.map +0 -1
  212. package/lib/umd/index.js +0 -134587
  213. package/lib/umd/index.js.map +0 -1
  214. package/lib/utils/card-element.d.ts +0 -11
  215. package/mocks/dropdown.d.ts +0 -4
  216. package/mocks/dropdown.ts +0 -27
  217. package/mocks/link.d.ts +0 -3
  218. package/mocks/link.ts +0 -6
  219. package/rollup.config.js +0 -73
  220. package/rollup.test.config.js +0 -42
  221. package/scripts/buildUtils.js +0 -30
  222. package/scripts/frankBuild.js +0 -49
  223. package/src/Button/index.ts +0 -1
  224. package/src/Button/sgds-button.scss +0 -28
  225. package/src/Button/sgds-button.ts +0 -153
  226. package/src/Card/index.ts +0 -1
  227. package/src/Card/sgds-action-card.scss +0 -27
  228. package/src/Card/sgds-action-card.ts +0 -115
  229. package/src/Checkbox/index.ts +0 -1
  230. package/src/Checkbox/sgds-checkbox.scss +0 -4
  231. package/src/Checkbox/sgds-checkbox.ts +0 -149
  232. package/src/Dropdown/index.ts +0 -3
  233. package/src/Dropdown/sgds-dropdown-item.ts +0 -39
  234. package/src/Dropdown/sgds-dropdown.scss +0 -5
  235. package/src/Dropdown/sgds-dropdown.ts +0 -54
  236. package/src/Footer/index.ts +0 -3
  237. package/src/Footer/sgds-footer.scss +0 -5
  238. package/src/Footer/sgds-footer.ts +0 -121
  239. package/src/Input/index.ts +0 -1
  240. package/src/Input/sgds-input.scss +0 -20
  241. package/src/Input/sgds-input.ts +0 -178
  242. package/src/Mainnav/index.ts +0 -4
  243. package/src/Mainnav/sgds-mainnav-dropdown.scss +0 -13
  244. package/src/Mainnav/sgds-mainnav-dropdown.ts +0 -45
  245. package/src/Mainnav/sgds-mainnav-item.scss +0 -24
  246. package/src/Mainnav/sgds-mainnav-item.ts +0 -8
  247. package/src/Mainnav/sgds-mainnav.scss +0 -39
  248. package/src/Mainnav/sgds-mainnav.ts +0 -183
  249. package/src/Masthead/index.ts +0 -1
  250. package/src/Masthead/sgds-masthead.scss +0 -217
  251. package/src/Masthead/sgds-masthead.ts +0 -189
  252. package/src/Modal/index.ts +0 -1
  253. package/src/Modal/sgds-modal.scss +0 -128
  254. package/src/Modal/sgds-modal.ts +0 -309
  255. package/src/QuantityToggle/index.ts +0 -1
  256. package/src/QuantityToggle/sgds-quantitytoggle.scss +0 -10
  257. package/src/QuantityToggle/sgds-quantitytoggle.ts +0 -130
  258. package/src/Radio/index.ts +0 -2
  259. package/src/Radio/sgds-radio.scss +0 -5
  260. package/src/Radio/sgds-radio.ts +0 -120
  261. package/src/Radio/sgds-radiogroup.scss +0 -22
  262. package/src/Radio/sgds-radiogroup.ts +0 -221
  263. package/src/Sidenav/index.ts +0 -4
  264. package/src/Sidenav/sgds-sidenav-item.scss +0 -73
  265. package/src/Sidenav/sgds-sidenav-item.ts +0 -145
  266. package/src/Sidenav/sgds-sidenav-link.scss +0 -25
  267. package/src/Sidenav/sgds-sidenav-link.ts +0 -8
  268. package/src/Sidenav/sgds-sidenav.scss +0 -6
  269. package/src/Sidenav/sgds-sidenav.ts +0 -33
  270. package/src/Tab/index.ts +0 -3
  271. package/src/Tab/sgds-tab.scss +0 -84
  272. package/src/Tab/sgds-tab.ts +0 -87
  273. package/src/Tab/sgds-tabgroup.scss +0 -198
  274. package/src/Tab/sgds-tabgroup.ts +0 -295
  275. package/src/Tab/sgds-tabpanel.scss +0 -12
  276. package/src/Tab/sgds-tabpanel.ts +0 -55
  277. package/src/Textarea/index.ts +0 -1
  278. package/src/Textarea/sgds-textarea.scss +0 -23
  279. package/src/Textarea/sgds-textarea.ts +0 -201
  280. package/src/index.ts +0 -16
  281. package/src/utils/animate.ts +0 -69
  282. package/src/utils/animation-registry.ts +0 -71
  283. package/src/utils/base.scss +0 -14
  284. package/src/utils/breakpoints.ts +0 -5
  285. package/src/utils/card-element.ts +0 -42
  286. package/src/utils/components.style.scss +0 -531
  287. package/src/utils/defaultvalue.ts +0 -51
  288. package/src/utils/dropdown-element.ts +0 -244
  289. package/src/utils/event.ts +0 -13
  290. package/src/utils/form.ts +0 -183
  291. package/src/utils/generateId.ts +0 -4
  292. package/src/utils/link-element.ts +0 -34
  293. package/src/utils/mergeDeep.ts +0 -22
  294. package/src/utils/modal.ts +0 -64
  295. package/src/utils/object.ts +0 -2
  296. package/src/utils/offset.ts +0 -6
  297. package/src/utils/scroll.ts +0 -57
  298. package/src/utils/sgds-element.ts +0 -18
  299. package/src/utils/slot.ts +0 -102
  300. package/src/utils/tabbable.ts +0 -81
  301. package/src/utils/watch.ts +0 -62
  302. package/stories/ActionCard.stories.mdx +0 -199
  303. package/stories/Button.stories.mdx +0 -194
  304. package/stories/Checkbox.stories.mdx +0 -196
  305. package/stories/Dropdown.stories.mdx +0 -152
  306. package/stories/Footer.stories.mdx +0 -261
  307. package/stories/Input.stories.mdx +0 -236
  308. package/stories/MainNav.stories.mdx +0 -169
  309. package/stories/Masthead.stories.mdx +0 -112
  310. package/stories/Modal.stories.mdx +0 -103
  311. package/stories/QuantityToggle.stories.mdx +0 -97
  312. package/stories/Radio.stories.mdx +0 -262
  313. package/stories/Sample.stories.js +0 -29
  314. package/stories/Sample.stories.mdx +0 -33
  315. package/stories/SideNav.stories.mdx +0 -245
  316. package/stories/common.js +0 -185
  317. package/stories/textarea.stories.mdx +0 -253
  318. package/test/button.element.test.ts +0 -185
  319. package/test/checkbox.test.ts +0 -240
  320. package/test/dropdown.test.ts +0 -637
  321. package/test/footer.test.ts +0 -181
  322. package/test/generateId.test.ts +0 -18
  323. package/test/input.element.test.ts +0 -316
  324. package/test/link-element.test.ts +0 -38
  325. package/test/mainnav.test.ts +0 -313
  326. package/test/masthead.test.ts +0 -116
  327. package/test/modal.test.ts +0 -149
  328. package/test/quantitytoggle.test.ts +0 -76
  329. package/test/radio.test.ts +0 -310
  330. package/test/selectable-card.test.ts +0 -159
  331. package/test/sidenav.test.ts +0 -390
  332. package/test/tab.test.ts +0 -76
  333. package/test/textarea.test.ts +0 -126
  334. package/tsconfig.json +0 -26
  335. package/tsconfig.test.json +0 -24
  336. package/typings/scss.d.ts +0 -5
  337. package/web-dev-server.config.mjs +0 -7
  338. package/web-test-runner.config.mjs +0 -47
@@ -1,28 +1,36 @@
1
- import SgdsElement from "../utils/sgds-element";
2
- export declare class SgdsSidenavItem extends SgdsElement {
3
- static styles: import("lit").CSSResultGroup;
4
- private myCollapse;
5
- private bsCollapse;
6
- /** when true, toggles the sidenav-item to open on first load and
7
- * set the active stylings.
8
- */
9
- active: boolean;
10
- href: string;
11
- collapseId: string;
12
- buttonId: string;
13
- disabled: boolean;
14
- private index;
15
- private _onClick;
16
- private _onClickButton;
17
- private _onClickLink;
18
- /**
19
- * closeItem - closes sidenav and inactivates it
20
- */
21
- closeItem(): void;
22
- /**
23
- * openItem
24
- */
25
- openItem(): void;
26
- firstUpdated(): void;
27
- render(): import("lit").TemplateResult<1>;
28
- }
1
+ import SgdsElement from "../../base/sgds-element";
2
+ /**
3
+ *
4
+ * @event sgds-toggle - Emitted when the dropdown is clicked.
5
+ *
6
+ * @slot - default slot for SgdsSidenavLink element.
7
+ * @slot title - title slot for the content of SgdsSidenavItem's button / anchor element.
8
+ */
9
+ export declare class SgdsSidenavItem extends SgdsElement {
10
+ static styles: import("lit").CSSResultGroup[];
11
+ private myCollapse;
12
+ private bsCollapse;
13
+ /** when true, toggles the sidenav-item to open on first load and
14
+ * set the active stylings.
15
+ */
16
+ active: boolean;
17
+ href: string;
18
+ collapseId: string;
19
+ buttonId: string;
20
+ disabled: boolean;
21
+ private index;
22
+ private _onClick;
23
+ private _onClickButton;
24
+ private _onClickLink;
25
+ /**
26
+ * closeItem - closes sidenav and inactivates it
27
+ */
28
+ closeItem(): void;
29
+ /**
30
+ * openItem
31
+ */
32
+ openItem(): void;
33
+ firstUpdated(): void;
34
+ render(): import("lit").TemplateResult<1>;
35
+ }
36
+ export default SgdsSidenavItem;
@@ -0,0 +1,8 @@
1
+ import LinkElement from "../../base/link-element";
2
+ /**
3
+ * @slot - default slot for label of anchor tag.
4
+ */
5
+ export declare class SgdsSidenavLink extends LinkElement {
6
+ static styles: import("lit").CSSResultGroup;
7
+ }
8
+ export default SgdsSidenavLink;
@@ -1,6 +1,10 @@
1
- import SgdsElement from "../utils/sgds-element";
2
- export declare class SgdsSidenav extends SgdsElement {
3
- static styles: import("lit").CSSResultGroup;
4
- alwaysOpen: boolean;
5
- render(): import("lit").TemplateResult<1>;
6
- }
1
+ import SgdsElement from "../../base/sgds-element";
2
+ /**
3
+ * @slot - default slot for SgdsSidenavItem element.
4
+ */
5
+ export declare class SgdsSidenav extends SgdsElement {
6
+ static styles: import("lit").CSSResultGroup;
7
+ alwaysOpen: boolean;
8
+ render(): import("lit").TemplateResult<1>;
9
+ }
10
+ export default SgdsSidenav;
@@ -0,0 +1 @@
1
+ export { SgdsStepper } from "./sgds-stepper";
@@ -0,0 +1,17 @@
1
+ import SgdsElement from "../../base/sgds-element";
2
+ export declare class SgdsStepper extends SgdsElement {
3
+ static styles: import("lit").CSSResultGroup[];
4
+ steps: {
5
+ title: number;
6
+ stepHeader: string;
7
+ }[];
8
+ activeStep: number;
9
+ connectedCallback(): void;
10
+ incrementStep(): void;
11
+ decrementStep(): void;
12
+ lastStep(): void;
13
+ firstStep(): void;
14
+ _onStepperItemClick(index: number): void;
15
+ render(): import("lit").TemplateResult<1>;
16
+ }
17
+ export default SgdsStepper;
@@ -0,0 +1,3 @@
1
+ export * from "./sgds-tab";
2
+ export * from "./sgds-tabpanel";
3
+ export * from "./sgds-tabgroup";
@@ -1,26 +1,27 @@
1
- import SgdsElement from "../utils/sgds-element";
2
- export declare class SgdsTab extends SgdsElement {
3
- static styles: import("lit").CSSResultGroup;
4
- tab: HTMLElement;
5
- private readonly attrId;
6
- private readonly componentId;
7
- label: string;
8
- /** The name of the tab panel this tab is associated with. The panel must be located in the same tab group. */
9
- panel: string;
10
- /** Draws the tab in an active state. */
11
- active: boolean;
12
- /** Makes the tab closable and shows a close button. */
13
- closable: boolean;
14
- /** Disables the tab and prevents selection. */
15
- disabled: boolean;
16
- variant: any;
17
- connectedCallback(): void;
18
- /** Sets focus to the tab. */
19
- focus(options?: FocusOptions): void;
20
- /** Removes focus from the tab. */
21
- blur(): void;
22
- handleCloseClick(): void;
23
- handleActiveChange(): void;
24
- handleDisabledChange(): void;
25
- render(): import("lit").TemplateResult<1>;
26
- }
1
+ import SgdsElement from "../../base/sgds-element";
2
+ export declare class SgdsTab extends SgdsElement {
3
+ static styles: import("lit").CSSResultGroup;
4
+ tab: HTMLElement;
5
+ private readonly attrId;
6
+ private readonly componentId;
7
+ label: string;
8
+ /** The name of the tab panel this tab is associated with. The panel must be located in the same tab group. */
9
+ panel: string;
10
+ /** Draws the tab in an active state. */
11
+ active: boolean;
12
+ /** Makes the tab closable and shows a close button. */
13
+ closable: boolean;
14
+ /** Disables the tab and prevents selection. */
15
+ disabled: boolean;
16
+ variant: any;
17
+ connectedCallback(): void;
18
+ /** Sets focus to the tab. */
19
+ focus(options?: FocusOptions): void;
20
+ /** Removes focus from the tab. */
21
+ blur(): void;
22
+ handleCloseClick(): void;
23
+ handleActiveChange(): void;
24
+ handleDisabledChange(): void;
25
+ render(): import("lit").TemplateResult<1>;
26
+ }
27
+ export default SgdsTab;
@@ -1,47 +1,48 @@
1
- import SgdsElement from "../utils/sgds-element";
2
- import { SgdsTabPanel } from './sgds-tabpanel';
3
- import { SgdsTab } from './sgds-tab';
4
- export declare class SgdsTabGroup extends SgdsElement {
5
- static styles: import("lit").CSSResultGroup;
6
- tabGroup: HTMLElement;
7
- body: HTMLSlotElement;
8
- nav: HTMLElement;
9
- private activeTab?;
10
- private mutationObserver;
11
- private resizeObserver;
12
- private tabs;
13
- private panels;
14
- private hasScrollControls;
15
- /** The placement of the tabs. */
16
- placement: 'top' | 'bottom' | 'start' | 'end';
17
- TabVariant: 'basic-toggle' | 'info-toggle';
18
- /**
19
- * When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel. When set to
20
- * manual, the tab will receive focus but will not show until the user presses spacebar or enter.
21
- */
22
- activation: 'auto' | 'manual';
23
- /** Disables the scroll arrows that appear when tabs overflow. */
24
- noScrollControls: boolean;
25
- connectedCallback(): void;
26
- disconnectedCallback(): void;
27
- /** Shows the specified tab panel. */
28
- show(panel: string): void;
29
- getAllTabs(options?: {
30
- includeDisabled: boolean;
31
- }): SgdsTab[];
32
- getAllPanels(): [SgdsTabPanel];
33
- getActiveTab(): SgdsTab;
34
- handleClick(event: MouseEvent): void;
35
- handleKeyDown(event: KeyboardEvent): void;
36
- handleScrollToStart(): void;
37
- handleScrollToEnd(): void;
38
- updateScrollControls(): void;
39
- setActiveTab(tab: SgdsTab, options?: {
40
- emitEvents?: boolean;
41
- scrollBehavior?: 'auto' | 'smooth';
42
- }): void;
43
- setAriaLabels(): void;
44
- setTabVariant(): void;
45
- syncTabsAndPanels(): void;
46
- render(): import("lit").TemplateResult<1>;
47
- }
1
+ import SgdsElement from "../../base/sgds-element";
2
+ import { SgdsTabPanel } from "./sgds-tabpanel";
3
+ import { SgdsTab } from "./sgds-tab";
4
+ export declare class SgdsTabGroup extends SgdsElement {
5
+ static styles: import("lit").CSSResultGroup;
6
+ tabGroup: HTMLElement;
7
+ body: HTMLSlotElement;
8
+ nav: HTMLElement;
9
+ private activeTab?;
10
+ private mutationObserver;
11
+ private resizeObserver;
12
+ private tabs;
13
+ private panels;
14
+ private hasScrollControls;
15
+ /** The placement of the tabs. */
16
+ placement: "top" | "bottom" | "start" | "end";
17
+ TabVariant: "basic-toggle" | "info-toggle";
18
+ /**
19
+ * When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel. When set to
20
+ * manual, the tab will receive focus but will not show until the user presses spacebar or enter.
21
+ */
22
+ activation: "auto" | "manual";
23
+ /** Disables the scroll arrows that appear when tabs overflow. */
24
+ noScrollControls: boolean;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ /** Shows the specified tab panel. */
28
+ show(panel: string): void;
29
+ getAllTabs(options?: {
30
+ includeDisabled: boolean;
31
+ }): SgdsTab[];
32
+ getAllPanels(): [SgdsTabPanel];
33
+ getActiveTab(): SgdsTab;
34
+ handleClick(event: MouseEvent): void;
35
+ handleKeyDown(event: KeyboardEvent): void;
36
+ handleScrollToStart(): void;
37
+ handleScrollToEnd(): void;
38
+ updateScrollControls(): void;
39
+ setActiveTab(tab: SgdsTab, options?: {
40
+ emitEvents?: boolean;
41
+ scrollBehavior?: "auto" | "smooth";
42
+ }): void;
43
+ setAriaLabels(): void;
44
+ setTabVariant(): void;
45
+ syncTabsAndPanels(): void;
46
+ render(): import("lit").TemplateResult<1>;
47
+ }
48
+ export default SgdsTabGroup;
@@ -1,25 +1,26 @@
1
- import SgdsElement from "../utils/sgds-element";
2
- /**
3
- * @summary Tab panels are used inside [tab groups](/components/tab-group) to display tabbed content.
4
- *
5
- * @since 2.0
6
- * @status stable
7
- *
8
- * @slot - The tab panel's content.
9
- *
10
- * @csspart base - The component's base wrapper.
11
- *
12
- * @cssproperty --padding - The tab panel's padding.
13
- */
14
- export declare class SgdsTabPanel extends SgdsElement {
15
- static styles: import("lit").CSSResultGroup;
16
- private readonly attrId;
17
- private readonly componentId;
18
- /** The tab panel's name. */
19
- name: string;
20
- /** When true, the tab panel will be shown. */
21
- active: boolean;
22
- connectedCallback(): void;
23
- handleActiveChange(): void;
24
- render(): import("lit").TemplateResult<1>;
25
- }
1
+ import SgdsElement from "../../base/sgds-element";
2
+ /**
3
+ * @summary Tab panels are used inside [tab groups](/components/tab-group) to display tabbed content.
4
+ *
5
+ * @since 2.0
6
+ * @status stable
7
+ *
8
+ * @slot - The tab panel's content.
9
+ *
10
+ * @csspart base - The component's base wrapper.
11
+ *
12
+ * @cssproperty --padding - The tab panel's padding.
13
+ */
14
+ export declare class SgdsTabPanel extends SgdsElement {
15
+ static styles: import("lit").CSSResultGroup;
16
+ private readonly attrId;
17
+ private readonly componentId;
18
+ /** The tab panel's name. */
19
+ name: string;
20
+ /** When true, the tab panel will be shown. */
21
+ active: boolean;
22
+ connectedCallback(): void;
23
+ handleActiveChange(): void;
24
+ render(): import("lit").TemplateResult<1>;
25
+ }
26
+ export default SgdsTabPanel;
@@ -0,0 +1 @@
1
+ export { SgdsTable } from "./sgds-table";
@@ -0,0 +1,26 @@
1
+ import SgdsElement from "../../base/sgds-element";
2
+ export declare class SgdsTable extends SgdsElement {
3
+ static styles: import("lit").CSSResultGroup[];
4
+ striped: boolean;
5
+ bordered: boolean;
6
+ borderless: boolean;
7
+ hover: boolean;
8
+ size?: string;
9
+ variant?: string;
10
+ sort: boolean;
11
+ removableSort: boolean;
12
+ responsive?: "sm" | "md" | "lg" | "xl";
13
+ tableHeaders: any[];
14
+ tableData: any[];
15
+ sortColumn: number | null;
16
+ sortAsc: boolean;
17
+ activeColumn: number | null;
18
+ sortClickCount: number;
19
+ clickCount: number;
20
+ originalTableData: Array<string[]>;
21
+ connectedCallback(): void;
22
+ handleHeaderClick(columnIndex: number): void;
23
+ getIcon(columnIndex: number): import("lit").TemplateResult<1>;
24
+ render(): import("lit").TemplateResult<1>;
25
+ }
26
+ export default SgdsTable;
@@ -0,0 +1 @@
1
+ export * from "./sgds-textarea";
@@ -1,53 +1,53 @@
1
- import SgdsElement from "../utils/sgds-element";
2
- export declare class SgdsTextArea extends SgdsElement {
3
- static styles: import("lit").CSSResultGroup;
4
- textarea: HTMLTextAreaElement;
5
- private hasFocus;
6
- private readonly formSubmitController;
7
- private resizeObserver;
8
- label: string;
9
- textareaId: string;
10
- name: any;
11
- textareaClasses?: any;
12
- value: string;
13
- minlength: any;
14
- maxlength: any;
15
- spellcheck: boolean;
16
- /** The number of rows to display by default. */
17
- rows: number;
18
- placeholder: string;
19
- invalidFeedback: string;
20
- autofocus: boolean;
21
- disabled: boolean;
22
- required: boolean;
23
- /** Makes the input readonly. */
24
- readonly: boolean;
25
- invalid: boolean;
26
- valid: boolean;
27
- /** Controls how the textarea can be resized. */
28
- resize: 'none' | 'vertical' | 'auto';
29
- /** The textarea's inputmode attribute. */
30
- inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
31
- autocorrect: string;
32
- /** Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
33
- defaultValue: string;
34
- connectedCallback(): void;
35
- disconnectedCallback(): void;
36
- /** Sets focus on the textarea. */
37
- focus(options?: FocusOptions): void;
38
- /** Checks for validity and shows the browser's validation message if the control is invalid. */
39
- reportValidity(): boolean;
40
- handleInvalid(): void;
41
- handleChange(event: string): void;
42
- handleFocus(): void;
43
- handleBlur(): void;
44
- /** Selects all the text in the textarea. */
45
- select(): void;
46
- handleKeyDown(event: KeyboardEvent): void;
47
- handleRowsChange(): void;
48
- setTextareaHeight(): void;
49
- handleDisabledChange(): void;
50
- handleValueChange(): void;
51
- render(): import("lit").TemplateResult<1 | 2>;
52
- }
53
- export default SgdsTextArea;
1
+ import SgdsElement from "../../base/sgds-element";
2
+ export declare class SgdsTextArea extends SgdsElement {
3
+ static styles: import("lit").CSSResultGroup[];
4
+ textarea: HTMLTextAreaElement;
5
+ private hasFocus;
6
+ private readonly formSubmitController;
7
+ private resizeObserver;
8
+ label: string;
9
+ textareaId: string;
10
+ name: any;
11
+ textareaClasses?: any;
12
+ value: string;
13
+ minlength: any;
14
+ maxlength: any;
15
+ spellcheck: boolean;
16
+ /** The number of rows to display by default. */
17
+ rows: number;
18
+ placeholder: string;
19
+ invalidFeedback: string;
20
+ autofocus: boolean;
21
+ disabled: boolean;
22
+ required: boolean;
23
+ /** Makes the input readonly. */
24
+ readonly: boolean;
25
+ invalid: boolean;
26
+ valid: boolean;
27
+ /** Controls how the textarea can be resized. */
28
+ resize: "none" | "vertical" | "auto";
29
+ /** The textarea's inputmode attribute. */
30
+ inputmode: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
31
+ autocorrect: string;
32
+ /** Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
33
+ defaultValue: string;
34
+ connectedCallback(): void;
35
+ disconnectedCallback(): void;
36
+ /** Sets focus on the textarea. */
37
+ focus(options?: FocusOptions): void;
38
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
39
+ reportValidity(): boolean;
40
+ handleInvalid(): void;
41
+ handleChange(event: string): void;
42
+ handleFocus(): void;
43
+ handleBlur(): void;
44
+ /** Selects all the text in the textarea. */
45
+ select(): void;
46
+ handleKeyDown(event: KeyboardEvent): void;
47
+ handleRowsChange(): void;
48
+ setTextareaHeight(): void;
49
+ handleDisabledChange(): void;
50
+ handleValueChange(): void;
51
+ render(): import("lit").TemplateResult;
52
+ }
53
+ export default SgdsTextArea;
@@ -0,0 +1 @@
1
+ export { SgdsToast } from "./sgds-toast";
@@ -0,0 +1,22 @@
1
+ import SgdsElement from "../../base/sgds-element";
2
+ export type ToastVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light";
3
+ export declare class SgdsToast extends SgdsElement {
4
+ static styles: import("lit").CSSResultGroup[];
5
+ base: HTMLElement;
6
+ show: boolean;
7
+ /**
8
+ * Apply a CSS fade transition to the toast
9
+ */
10
+ animation?: boolean;
11
+ autohide?: boolean;
12
+ delay: number;
13
+ variant: ToastVariant;
14
+ /** The toast variant. */
15
+ bg?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light";
16
+ closeLabel?: string;
17
+ /**Adds CSS styling to `<Toast />` based on the defined status */
18
+ status?: "success" | "warning" | "danger";
19
+ handleCloseClick(): void;
20
+ render(): import("lit").TemplateResult;
21
+ }
22
+ export default SgdsToast;
@@ -0,0 +1 @@
1
+ export * from "./sgds-tooltip";
@@ -0,0 +1,30 @@
1
+ import SgdsElement from "../../base/sgds-element";
2
+ import { Ref } from "lit/directives/ref.js";
3
+ import { Tooltip } from "bootstrap";
4
+ import * as Popper from "@popperjs/core";
5
+ /**
6
+ * @summary Tooltip summary
7
+ * @slot default - slot for Tooltip's contentz
8
+ */
9
+ export declare class SgdsTooltip extends SgdsElement {
10
+ static styles: import("lit").CSSResultGroup[];
11
+ /**@internal */
12
+ myTooltip: Ref<HTMLElement>;
13
+ /**@internal */
14
+ bsTooltip: Tooltip;
15
+ /** */
16
+ content: string;
17
+ placement: "top" | "bottom" | "left" | "right";
18
+ trigger: "click" | "hover" | "focus" | "hover focus";
19
+ /**@internal */
20
+ closableContainer: HTMLElement;
21
+ /**@internal */
22
+ popperConfig: Partial<Popper.Options>;
23
+ /**@internal */
24
+ tooltipConfig: Partial<Tooltip.Options>;
25
+ firstUpdated(): void;
26
+ /** Hides the Tooltip */
27
+ closeTooltip(): void;
28
+ render(): import("lit").TemplateResult<1>;
29
+ }
30
+ export default SgdsTooltip;
package/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export * from "./components/Sidenav";
2
+ export * from "./components/Radio";
3
+ export * from "./components/Masthead";
4
+ export * from "./components/Button";
5
+ export * from "./components/Footer";
6
+ export * from "./components/Mainnav";
7
+ export * from "./components/Input";
8
+ export * from "./components/Checkbox";
9
+ export * from "./components/Dropdown";
10
+ export * from "./components/Textarea";
11
+ export * from "./components/Modal";
12
+ export * from "./components/QuantityToggle";
13
+ export * from "./components/ActionCard";
14
+ export * from "./components/Badge";
15
+ export * from "./components/Table";
16
+ export * from "./components/Breadcrumb";
17
+ export * from "./components/Stepper";
18
+ export * from "./components/Alert";
19
+ export * from "./components/CloseButton";
20
+ export * from "./components/Toast";
21
+ export * from "./components/FileUpload";
22
+ export * from "./components/Accordion";
23
+ export * from "./components/Tooltip";