@lifesg/react-design-system 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (277) hide show
  1. package/README.md +2 -0
  2. package/accordion/accordion-item.style.d.ts +5 -2
  3. package/accordion/accordion.style.d.ts +1 -1
  4. package/accordion/index.js +165 -172
  5. package/accordion/index.js.map +1 -1
  6. package/alert/alert.style.d.ts +4 -1
  7. package/alert/index.js +107 -119
  8. package/alert/index.js.map +1 -1
  9. package/animations/index.d.ts +1 -0
  10. package/animations/index.js +6 -3
  11. package/animations/index.js.map +1 -1
  12. package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +2 -0
  13. package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -0
  14. package/box-container/box-container.styles.d.ts +8 -1
  15. package/box-container/index.js +69 -74
  16. package/box-container/index.js.map +1 -1
  17. package/breadcrumb/breadcrumb.style.d.ts +4 -4
  18. package/breadcrumb/index.js +102 -106
  19. package/breadcrumb/index.js.map +1 -1
  20. package/breadcrumb/types.d.ts +5 -1
  21. package/button/button.d.ts +2 -2
  22. package/button/index.js +140 -143
  23. package/button/index.js.map +1 -1
  24. package/calendar/calendar-day.d.ts +11 -0
  25. package/calendar/calendar-day.style.d.ts +23 -0
  26. package/calendar/calendar-month.d.ts +12 -0
  27. package/calendar/calendar-month.style.d.ts +12 -0
  28. package/calendar/calendar-year.d.ts +12 -0
  29. package/calendar/calendar-year.style.d.ts +12 -0
  30. package/calendar/calendar.d.ts +4 -0
  31. package/calendar/calendar.style.d.ts +35 -0
  32. package/calendar/index.d.ts +2 -0
  33. package/calendar/index.js +381 -0
  34. package/calendar/index.js.map +1 -0
  35. package/calendar/package.json +7 -0
  36. package/calendar/types.d.ts +15 -0
  37. package/card/card.d.ts +3 -0
  38. package/card/card.style.d.ts +1 -0
  39. package/card/index.d.ts +1 -0
  40. package/card/index.js +132 -0
  41. package/card/index.js.map +1 -0
  42. package/{icon → card}/package.json +1 -1
  43. package/card/types.d.ts +4 -0
  44. package/checkbox/checkbox.d.ts +1 -1
  45. package/checkbox/checkbox.style.d.ts +4 -1
  46. package/checkbox/index.js +11 -21
  47. package/checkbox/index.js.map +1 -1
  48. package/cjs/index.js +2240 -1057
  49. package/cjs/index.js.map +1 -1
  50. package/color/color.d.ts +4 -59
  51. package/color/index.js +1 -1
  52. package/color/index.js.map +1 -1
  53. package/color/types.d.ts +5 -1
  54. package/date-input/date-input.d.ts +1 -1
  55. package/date-input/date-input.style.d.ts +2 -6
  56. package/date-input/index.js +132 -147
  57. package/date-input/index.js.map +1 -1
  58. package/date-input/types.d.ts +14 -16
  59. package/design-token/design-token.d.ts +4 -0
  60. package/design-token/index.d.ts +2 -0
  61. package/design-token/index.js +6 -0
  62. package/design-token/index.js.map +1 -0
  63. package/design-token/package.json +7 -0
  64. package/design-token/types.d.ts +7 -0
  65. package/error-display/error-display-data.d.ts +11 -0
  66. package/error-display/error-display.d.ts +3 -0
  67. package/error-display/error-display.style.d.ts +7 -0
  68. package/error-display/index.d.ts +2 -0
  69. package/error-display/index.js +323 -0
  70. package/error-display/index.js.map +1 -0
  71. package/error-display/package.json +7 -0
  72. package/error-display/types.d.ts +20 -0
  73. package/feedback-rating/feedback-rating-data.d.ts +5 -0
  74. package/feedback-rating/feedback-rating-stars-container-data.d.ts +3 -0
  75. package/feedback-rating/feedback-rating-stars-container.d.ts +3 -0
  76. package/feedback-rating/feedback-rating-stars-container.styles.d.ts +12 -0
  77. package/feedback-rating/feedback-rating.d.ts +3 -0
  78. package/feedback-rating/feedback-rating.styles.d.ts +5 -0
  79. package/feedback-rating/index.d.ts +2 -0
  80. package/feedback-rating/index.js +329 -0
  81. package/feedback-rating/index.js.map +1 -0
  82. package/feedback-rating/package.json +7 -0
  83. package/feedback-rating/types.d.ts +14 -0
  84. package/footer/footer-download-app.d.ts +2 -0
  85. package/footer/footer-download-app.style.d.ts +6 -0
  86. package/footer/footer-helper.d.ts +12 -0
  87. package/footer/footer.d.ts +3 -0
  88. package/footer/footer.style.d.ts +12 -0
  89. package/footer/index.d.ts +2 -0
  90. package/footer/index.js +373 -0
  91. package/footer/index.js.map +1 -0
  92. package/footer/package.json +7 -0
  93. package/footer/types.d.ts +31 -0
  94. package/form/form-custom-field.d.ts +3 -0
  95. package/form/form-input-group.d.ts +1 -1
  96. package/form/form-input.d.ts +1 -1
  97. package/form/form-label-addon.d.ts +1 -2
  98. package/form/form-label.d.ts +1 -1
  99. package/form/form-label.style.d.ts +1 -0
  100. package/form/form-phone-number-input.d.ts +3 -0
  101. package/form/form-textarea.d.ts +1 -1
  102. package/form/form-unit-number-input.d.ts +3 -0
  103. package/form/index.d.ts +9 -6
  104. package/form/index.js +771 -657
  105. package/form/index.js.map +1 -1
  106. package/form/types.d.ts +14 -5
  107. package/icon-button/icon-button.d.ts +1 -1
  108. package/icon-button/icon-button.style.d.ts +6 -1
  109. package/icon-button/index.js +9 -15
  110. package/icon-button/index.js.map +1 -1
  111. package/icon-button/types.d.ts +2 -3
  112. package/index.d.ts +12 -1
  113. package/index.js +2217 -1034
  114. package/index.js.map +1 -1
  115. package/input/index.js +93 -49
  116. package/input/index.js.map +1 -1
  117. package/input/input.d.ts +1 -1
  118. package/input/input.style.d.ts +9 -4
  119. package/input/types.d.ts +2 -0
  120. package/input-group/index.js +435 -343
  121. package/input-group/index.js.map +1 -1
  122. package/input-group/input-group-list-addon.d.ts +1 -1
  123. package/input-group/input-group-list-addon.style.d.ts +13 -2
  124. package/input-group/input-group.d.ts +1 -1
  125. package/input-group/input-group.style.d.ts +4 -8
  126. package/input-group/types.d.ts +11 -10
  127. package/input-select/index.js +286 -244
  128. package/input-select/index.js.map +1 -1
  129. package/input-select/input-select-wrapper.d.ts +1 -1
  130. package/input-select/input-select.d.ts +1 -1
  131. package/input-select/input-select.styles.d.ts +5 -1
  132. package/input-select/types.d.ts +15 -11
  133. package/input-textarea/index.js +132 -121
  134. package/input-textarea/index.js.map +1 -1
  135. package/input-textarea/textarea-counter.d.ts +2 -1
  136. package/input-textarea/textarea.d.ts +2 -2
  137. package/input-textarea/types.d.ts +1 -0
  138. package/layout/container.d.ts +3 -0
  139. package/layout/content.d.ts +3 -0
  140. package/layout/index.d.ts +7 -0
  141. package/layout/index.js +55 -0
  142. package/layout/index.js.map +1 -0
  143. package/layout/package.json +7 -0
  144. package/layout/section.d.ts +3 -0
  145. package/layout/types.d.ts +15 -0
  146. package/link-list/index.js +130 -130
  147. package/link-list/index.js.map +1 -1
  148. package/link-list/link-list.styles.d.ts +12 -2
  149. package/link-list/types.d.ts +1 -1
  150. package/masonry/index.js.map +1 -1
  151. package/masonry/masonry.d.ts +2 -2
  152. package/masthead/index.d.ts +1 -0
  153. package/masthead/index.js +9 -0
  154. package/masthead/index.js.map +1 -0
  155. package/masthead/masthead.d.ts +2 -0
  156. package/masthead/masthead.style.d.ts +1 -0
  157. package/masthead/package.json +7 -0
  158. package/media/index.js +1 -1
  159. package/media/index.js.map +1 -1
  160. package/media/media.d.ts +2 -1
  161. package/modal/index.d.ts +1 -1
  162. package/modal/index.js +30 -43
  163. package/modal/index.js.map +1 -1
  164. package/modal/modal-box.styles.d.ts +5 -2
  165. package/modal/modal.d.ts +1 -1
  166. package/modal/modal.styles.d.ts +1 -0
  167. package/modal/types.d.ts +4 -2
  168. package/navbar/brand.d.ts +10 -0
  169. package/navbar/brand.styles.d.ts +5 -0
  170. package/navbar/drawer.d.ts +3 -0
  171. package/navbar/drawer.styles.d.ts +15 -0
  172. package/navbar/index.d.ts +7 -0
  173. package/navbar/index.js +651 -0
  174. package/navbar/index.js.map +1 -0
  175. package/navbar/navbar-action-buttons.d.ts +10 -0
  176. package/navbar/navbar-action-buttons.styles.d.ts +9 -0
  177. package/navbar/navbar-items.d.ts +11 -0
  178. package/navbar/navbar-items.styles.d.ts +10 -0
  179. package/navbar/navbar.d.ts +3 -0
  180. package/navbar/navbar.styles.d.ts +19 -0
  181. package/navbar/package.json +7 -0
  182. package/navbar/types.d.ts +56 -0
  183. package/notification-banner/index.d.ts +3 -0
  184. package/notification-banner/index.js +266 -0
  185. package/notification-banner/index.js.map +1 -0
  186. package/notification-banner/notification-banner-hoc.d.ts +3 -0
  187. package/notification-banner/notification-banner.d.ts +6 -0
  188. package/notification-banner/notification-banner.styles.d.ts +15 -0
  189. package/notification-banner/package.json +7 -0
  190. package/notification-banner/types.d.ts +22 -0
  191. package/otp-input/index.d.ts +2 -0
  192. package/otp-input/index.js +600 -0
  193. package/otp-input/index.js.map +1 -0
  194. package/otp-input/otp-input.d.ts +3 -0
  195. package/otp-input/otp-input.styles.d.ts +5 -0
  196. package/otp-input/package.json +7 -0
  197. package/otp-input/types.d.ts +22 -0
  198. package/overlay/index.js +1 -1
  199. package/overlay/index.js.map +1 -1
  200. package/overlay/types.d.ts +1 -1
  201. package/package.json +4 -1
  202. package/phone-number-input/data/country-code.d.ts +1 -0
  203. package/phone-number-input/index.d.ts +2 -0
  204. package/phone-number-input/index.js +860 -0
  205. package/phone-number-input/index.js.map +1 -0
  206. package/phone-number-input/package.json +7 -0
  207. package/phone-number-input/phone-number-input-helper.d.ts +5 -0
  208. package/phone-number-input/phone-number-input.d.ts +3 -0
  209. package/phone-number-input/types.d.ts +51 -0
  210. package/popover/index.js +148 -153
  211. package/popover/index.js.map +1 -1
  212. package/popover/popover.styles.d.ts +1 -1
  213. package/popover/types.d.ts +3 -3
  214. package/progress-indicator/index.d.ts +2 -0
  215. package/progress-indicator/index.js +240 -0
  216. package/progress-indicator/index.js.map +1 -0
  217. package/progress-indicator/package.json +7 -0
  218. package/progress-indicator/progress-indicator.d.ts +3 -0
  219. package/progress-indicator/progress-indicator.style.d.ts +19 -0
  220. package/progress-indicator/types.d.ts +9 -0
  221. package/radio-button/index.js +7 -7
  222. package/radio-button/index.js.map +1 -1
  223. package/shared/dropdown-list/dropdown-list.d.ts +1 -1
  224. package/shared/dropdown-list/dropdown-list.styles.d.ts +6 -2
  225. package/shared/dropdown-list/dropdown-search.d.ts +2 -1
  226. package/shared/dropdown-list/dropdown-search.styles.d.ts +9 -1
  227. package/shared/dropdown-list/types.d.ts +22 -12
  228. package/shared/input-wrapper/input-wrapper.d.ts +8 -0
  229. package/smart-app-banner/index.d.ts +2 -0
  230. package/smart-app-banner/index.js +373 -0
  231. package/smart-app-banner/index.js.map +1 -0
  232. package/smart-app-banner/package.json +7 -0
  233. package/smart-app-banner/smart-app-banner.d.ts +3 -0
  234. package/smart-app-banner/smart-app-banner.styles.d.ts +31 -0
  235. package/smart-app-banner/types.d.ts +18 -0
  236. package/spec/design-token-spec/base-design-token-set.d.ts +2 -0
  237. package/text/index.js +62 -65
  238. package/text/index.js.map +1 -1
  239. package/text/text-style.d.ts +4 -100
  240. package/text-list/index.js +7 -7
  241. package/text-list/index.js.map +1 -1
  242. package/theme/design-token-helper.d.ts +2 -0
  243. package/theme/index.js +1 -1
  244. package/theme/index.js.map +1 -1
  245. package/theme/types.d.ts +12 -3
  246. package/timeline/index.js +95 -98
  247. package/timeline/index.js.map +1 -1
  248. package/timepicker/index.js +213 -207
  249. package/timepicker/index.js.map +1 -1
  250. package/timepicker/timepicker-dropdown.styles.d.ts +2 -2
  251. package/timepicker/types.d.ts +3 -3
  252. package/toggle-button/index.js +118 -121
  253. package/toggle-button/index.js.map +1 -1
  254. package/tooltip/index.js +127 -125
  255. package/tooltip/index.js.map +1 -1
  256. package/tooltip/tooltip.styles.d.ts +3 -1
  257. package/unit-number/index.d.ts +2 -0
  258. package/unit-number/index.js +357 -0
  259. package/unit-number/index.js.map +1 -0
  260. package/unit-number/package.json +7 -0
  261. package/unit-number/types.d.ts +27 -0
  262. package/unit-number/unit-number-input.d.ts +3 -0
  263. package/unit-number/unit-number-input.style.d.ts +11 -0
  264. package/util/calendar-helper.d.ts +10 -0
  265. package/util/date-helper.d.ts +19 -0
  266. package/util/index.d.ts +3 -0
  267. package/util/utility-types.d.ts +3 -0
  268. package/icon/arrow-right-icon.d.ts +0 -3
  269. package/icon/icon.d.ts +0 -3
  270. package/icon/index.d.ts +0 -2
  271. package/icon/index.js +0 -12
  272. package/icon/index.js.map +0 -1
  273. package/icon/info-icon.d.ts +0 -3
  274. package/icon/play-alt-icon.d.ts +0 -3
  275. package/icon/search-icon.d.ts +0 -3
  276. package/icon/shared.style.d.ts +0 -1
  277. package/icon/types.d.ts +0 -9
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { ContainerProps } from "./types";
3
+ export declare const Container: (props: ContainerProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { ContentProps } from "./types";
3
+ export declare const Content: (props: ContentProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const Layout: {
3
+ Section: (props: import("./types").SectionProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
4
+ Container: (props: import("./types").ContainerProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
5
+ Content: (props: import("./types").ContentProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
6
+ };
7
+ export * from "./types";
@@ -0,0 +1,55 @@
1
+ import{jsx as t}from"react/jsx-runtime";import e from"react";import i,{css as r}from"styled-components";const a={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},n=t=>Object.keys(a).reduce(((e,i)=>{const r=a[i];return e[i]=`@media screen and (${t}: ${r}px)`,e}),{}),d=n("max-width"),o=(n("min-width"),e.forwardRef(((e,i)=>{const{children:r,"data-testid":a="container",type:n="flex",...d}=e;return t(m,{ref:i,"data-testid":a,type:n,...d,children:r})}))),m=i.div`
2
+ flex-grow: 1;
3
+ margin: 0 auto;
4
+ position: relative;
5
+ width: auto;
6
+ height: auto;
7
+ padding: 0 0.75rem;
8
+
9
+ /* Max width restrictions */
10
+ max-width: 1320px;
11
+
12
+ ${d.desktopM} {
13
+ max-width: 1140px;
14
+ }
15
+
16
+ ${d.tablet} {
17
+ max-width: 720px;
18
+ }
19
+
20
+ ${d.mobileL} {
21
+ width: 100%;
22
+ padding: 0;
23
+ max-width: unset;
24
+ }
25
+
26
+ ${t=>{switch(t.type){case"grid":return r`
27
+ column-gap: 2rem;
28
+ display: grid;
29
+ grid-template-columns: repeat(12, minmax(0, 1fr));
30
+
31
+ ${d.tablet} {
32
+ column-gap: 1.5rem;
33
+ grid-template-columns: repeat(8, minmax(0, 1fr));
34
+ }
35
+
36
+ ${d.mobileL} {
37
+ column-gap: 1rem;
38
+ grid-template-columns: repeat(4, minmax(0, 1fr));
39
+ }
40
+ `;case"flex-column":return r`
41
+ display: flex;
42
+ flex-direction: column;
43
+ `;default:return r`
44
+ display: flex;
45
+ `}}}
46
+ `,l=e.forwardRef(((e,i)=>{const{children:r,"data-testid":a="section",...n}=e;return t(c,{ref:i,"data-testid":a,...n,children:r})})),c=i.section`
47
+ display: block;
48
+ position: relative;
49
+ padding: 0 1.5rem;
50
+
51
+ // Extra enforcement
52
+ padding-left: 1.5rem !important;
53
+ padding-right: 1.5rem !important;
54
+ `,s=e.forwardRef(((e,i)=>{const{children:r,"data-testid":a="content",className:n,type:d="flex",...m}=e;return t(l,{ref:i,"data-testid":a,className:n,...m,children:t(o,{"data-testid":`${a}-container`,type:d,"data-id":"container",children:r})})})),p={Section:l,Container:o,Content:s};export{p as Layout};
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/spec/media-spec.ts","../../src/media/media.ts","../../src/layout/container.tsx","../../src/layout/section.tsx","../../src/layout/content.tsx","../../src/layout/index.ts"],"sourcesContent":["import { MediaWidth } from \"../media/types\";\n\nexport const MediaWidths: MediaWidth = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 480,\n tablet: 1199,\n desktopM: 1399,\n desktopL: 1999,\n desktop4k: 3840,\n};\n","import { MediaWidths as MediaWidthsSpec } from \"../spec/media-spec\";\nimport { MediaType, MediaWidth } from \"./types\";\n\n// =============================================================================\n// HELPER FUNCTION\n// =============================================================================\nconst getMediaQuerySpec = (type: \"max-width\" | \"min-width\") => {\n return Object.keys(MediaWidthsSpec).reduce((accumulator, key) => {\n const mediaWidth = MediaWidthsSpec[key as keyof MediaWidth];\n accumulator[\n key as keyof MediaType\n ] = `@media screen and (${type}: ${mediaWidth}px)`;\n\n return accumulator;\n }, {} as MediaType);\n};\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\nexport const MediaQuery = {\n MaxWidth: getMediaQuerySpec(\"max-width\"),\n MinWidth: getMediaQuerySpec(\"min-width\"),\n};\n\nexport const MediaWidths = MediaWidthsSpec;\n","import React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { MediaQuery } from \"../media/media\";\nimport { ContainerProps, ContainerType, DivRef } from \"./types\";\n\nconst Component = (props: ContainerProps, ref: DivRef): JSX.Element => {\n const {\n children,\n \"data-testid\": testId = \"container\",\n type = \"flex\",\n ...otherProps\n } = props;\n\n return (\n <StyledContainer\n ref={ref}\n data-testid={testId}\n type={type}\n {...otherProps}\n >\n {children}\n </StyledContainer>\n );\n};\n\n// =============================================================================\n// EXPORT\n// =============================================================================\nexport const Container = React.forwardRef(Component);\n\n// =============================================================================\n// STYLING\n// =============================================================================\ninterface StyleProps {\n type: ContainerType;\n}\n\nconst StyledContainer = styled.div<StyleProps>`\n flex-grow: 1;\n margin: 0 auto;\n position: relative;\n width: auto;\n height: auto;\n padding: 0 0.75rem;\n\n /* Max width restrictions */\n max-width: 1320px;\n\n ${MediaQuery.MaxWidth.desktopM} {\n max-width: 1140px;\n }\n\n ${MediaQuery.MaxWidth.tablet} {\n max-width: 720px;\n }\n\n ${MediaQuery.MaxWidth.mobileL} {\n width: 100%;\n padding: 0;\n max-width: unset;\n }\n\n ${(props) => {\n switch (props.type) {\n case \"grid\":\n return css`\n column-gap: 2rem;\n display: grid;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n\n ${MediaQuery.MaxWidth.tablet} {\n column-gap: 1.5rem;\n grid-template-columns: repeat(8, minmax(0, 1fr));\n }\n\n ${MediaQuery.MaxWidth.mobileL} {\n column-gap: 1rem;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n }\n `;\n case \"flex-column\":\n return css`\n display: flex;\n flex-direction: column;\n `;\n case \"flex\":\n default:\n return css`\n display: flex;\n `;\n }\n }}\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { DivRef, SectionProps } from \"./types\";\n\nconst Component = (props: SectionProps, ref: DivRef): JSX.Element => {\n const {\n children,\n \"data-testid\": testId = \"section\",\n ...otherProps\n } = props;\n\n return (\n <StyledSection ref={ref} data-testid={testId} {...otherProps}>\n {children}\n </StyledSection>\n );\n};\n\n// =============================================================================\n// EXPORT\n// =============================================================================\nexport const Section = React.forwardRef(Component);\n\n// =============================================================================\n// STYLING\n// =============================================================================\nconst StyledSection = styled.section`\n display: block;\n position: relative;\n padding: 0 1.5rem;\n\n // Extra enforcement\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n`;\n","import React from \"react\";\nimport { Container } from \"./container\";\nimport { Section } from \"./section\";\nimport { ContentProps, DivRef } from \"./types\";\n\nconst Component = (props: ContentProps, ref: DivRef): JSX.Element => {\n const {\n children,\n \"data-testid\": testId = \"content\",\n className,\n type = \"flex\",\n ...otherProps\n } = props;\n\n return (\n <Section\n ref={ref}\n data-testid={testId}\n className={className}\n {...otherProps}\n >\n <Container\n data-testid={`${testId}-container`}\n type={type}\n data-id=\"container\"\n >\n {children}\n </Container>\n </Section>\n );\n};\n\n// =============================================================================\n// EXPORT\n// =============================================================================\nexport const Content = React.forwardRef(Component);\n","import { Container } from \"./container\";\nimport { Content } from \"./content\";\nimport { Section } from \"./section\";\n\nexport const Layout = {\n Section,\n Container,\n Content,\n};\n\nexport * from \"./types\";\n"],"names":["MediaWidths","mobileS","mobileM","mobileL","tablet","desktopM","desktopL","desktop4k","getMediaQuerySpec","type","Object","keys","MediaWidthsSpec","reduce","accumulator","key","mediaWidth","MediaQuery","Container","React","forwardRef","props","ref","children","testId","otherProps","_jsx","StyledContainer","styled","div","css","Section","StyledSection","section","Content","className","Layout"],"mappings":"wGAEO,MAAMA,EAA0B,CACnCC,QAAS,IACTC,QAAS,IACTC,QAAS,IACTC,OAAQ,KACRC,SAAU,KACVC,SAAU,KACVC,UAAW,MCHTC,EAAqBC,GAChBC,OAAOC,KAAKC,GAAiBC,QAAO,CAACC,EAAaC,KACrD,MAAMC,EAAaJ,EAAgBG,GAKnC,OAJAD,EACIC,GACA,sBAAsBN,MAASO,OAE5BF,CAAW,GACnB,CAAe,GAMTG,EACCT,EAAkB,aCOnBU,GDNCV,EAAkB,aCMPW,EAAMC,YAvBb,CAACC,EAAuBC,KACtC,MAAMC,SACFA,EACA,cAAeC,EAAS,YAAWf,KACnCA,EAAO,UACJgB,GACHJ,EAEJ,OACIK,EAACC,GACGL,IAAKA,EACQ,cAAAE,EACbf,KAAMA,KACFgB,WAEHF,GAEP,KAeAI,EAAkBC,EAAOC,GAAe;;;;;;;;;;;MAWxCZ,EAAoBZ;;;;MAIpBY,EAAoBb;;;;MAIpBa,EAAoBd;;;;;;MAMnBkB,IACC,OAAQA,EAAMZ,MACV,IAAK,OACD,OAAOqB,CAAG;;;;;sBAKJb,EAAoBb;;;;;sBAKpBa,EAAoBd;;;;kBAK9B,IAAK,cACD,OAAO2B,CAAG;;;kBAKd,QACI,OAAOA,CAAG;;kBAGjB;ECrEIC,EAAUZ,EAAMC,YAjBX,CAACC,EAAqBC,KACpC,MAAMC,SACFA,EACA,cAAeC,EAAS,aACrBC,GACHJ,EAEJ,OACIK,EAACM,EAAa,CAACV,IAAKA,EAAkB,cAAAE,KAAYC,EAAUF,SACvDA,GAEP,IAWAS,EAAgBJ,EAAOK,OAAO;;;;;;;;ECSvBC,EAAUf,EAAMC,YA9BX,CAACC,EAAqBC,KACpC,MAAMC,SACFA,EACA,cAAeC,EAAS,UAASW,UACjCA,EAAS1B,KACTA,EAAO,UACJgB,GACHJ,EAEJ,OACIK,EAACK,EAAO,CACJT,IAAKA,EACQ,cAAAE,EACbW,UAAWA,KACPV,EAAUF,SAEdG,EAACR,EACgB,CAAA,cAAA,GAAGM,cAChBf,KAAMA,EAAI,UACF,YAEPc,SAAAA,KAGX,ICzBOa,EAAS,CAClBL,UACAb,YACAgB"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@lifesg/react-design-system/layout",
3
+ "private": true,
4
+ "main": "../cjs/index.js",
5
+ "module": "./index.js",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { SectionProps } from "./types";
3
+ export declare const Section: (props: SectionProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export interface CommonLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children: React.ReactNode;
4
+ "data-testid"?: string | undefined;
5
+ }
6
+ export interface SectionProps extends CommonLayoutProps {
7
+ }
8
+ export declare type ContainerType = "flex" | "flex-column" | "grid";
9
+ export interface ContainerProps extends CommonLayoutProps {
10
+ /** The type of display style. Values: "flex" | "flex-column" | "grid" */
11
+ type?: ContainerType | undefined;
12
+ }
13
+ export interface ContentProps extends ContainerProps {
14
+ }
15
+ export declare type DivRef = React.Ref<HTMLDivElement>;