@7shifts/sous-chef 3.72.0 → 3.73.0-beta.1

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 (321) hide show
  1. package/dist/core/SousChefProvider/SousChefProvider.d.ts +3 -1
  2. package/dist/core/SousChefProvider/context/ProviderConfigContext.d.ts +2 -0
  3. package/dist/flags/flags/ac.svg +76 -0
  4. package/dist/flags/flags/ad.svg +150 -0
  5. package/dist/flags/flags/ae.svg +6 -0
  6. package/dist/flags/flags/af.svg +81 -0
  7. package/dist/flags/flags/ag.svg +14 -0
  8. package/dist/flags/flags/ai.svg +758 -0
  9. package/dist/flags/flags/al.svg +5 -0
  10. package/dist/flags/flags/am.svg +5 -0
  11. package/dist/flags/flags/ao.svg +13 -0
  12. package/dist/flags/flags/ar.svg +32 -0
  13. package/dist/flags/flags/as.svg +72 -0
  14. package/dist/flags/flags/at.svg +6 -0
  15. package/dist/flags/flags/au.svg +8 -0
  16. package/dist/flags/flags/aw.svg +186 -0
  17. package/dist/flags/flags/ax.svg +18 -0
  18. package/dist/flags/flags/az.svg +8 -0
  19. package/dist/flags/flags/ba.svg +12 -0
  20. package/dist/flags/flags/bb.svg +6 -0
  21. package/dist/flags/flags/bd.svg +4 -0
  22. package/dist/flags/flags/be.svg +7 -0
  23. package/dist/flags/flags/bf.svg +7 -0
  24. package/dist/flags/flags/bg.svg +7 -0
  25. package/dist/flags/flags/bh.svg +4 -0
  26. package/dist/flags/flags/bi.svg +15 -0
  27. package/dist/flags/flags/bj.svg +14 -0
  28. package/dist/flags/flags/bl.svg +5 -0
  29. package/dist/flags/flags/bm.svg +97 -0
  30. package/dist/flags/flags/bn.svg +36 -0
  31. package/dist/flags/flags/bo.svg +676 -0
  32. package/dist/flags/flags/bq.svg +5 -0
  33. package/dist/flags/flags/br.svg +45 -0
  34. package/dist/flags/flags/bs.svg +13 -0
  35. package/dist/flags/flags/bt.svg +89 -0
  36. package/dist/flags/flags/bw.svg +7 -0
  37. package/dist/flags/flags/by.svg +20 -0
  38. package/dist/flags/flags/bz.svg +145 -0
  39. package/dist/flags/flags/ca.svg +4 -0
  40. package/dist/flags/flags/cc.svg +19 -0
  41. package/dist/flags/flags/cd.svg +5 -0
  42. package/dist/flags/flags/cf.svg +15 -0
  43. package/dist/flags/flags/cg.svg +12 -0
  44. package/dist/flags/flags/ch.svg +9 -0
  45. package/dist/flags/flags/ci.svg +7 -0
  46. package/dist/flags/flags/ck.svg +9 -0
  47. package/dist/flags/flags/cl.svg +13 -0
  48. package/dist/flags/flags/cm.svg +15 -0
  49. package/dist/flags/flags/cn.svg +11 -0
  50. package/dist/flags/flags/co.svg +7 -0
  51. package/dist/flags/flags/cr.svg +7 -0
  52. package/dist/flags/flags/cu.svg +13 -0
  53. package/dist/flags/flags/cv.svg +13 -0
  54. package/dist/flags/flags/cw.svg +14 -0
  55. package/dist/flags/flags/cx.svg +15 -0
  56. package/dist/flags/flags/cy.svg +6 -0
  57. package/dist/flags/flags/cz.svg +5 -0
  58. package/dist/flags/flags/de.svg +5 -0
  59. package/dist/flags/flags/dj.svg +13 -0
  60. package/dist/flags/flags/dk.svg +5 -0
  61. package/dist/flags/flags/dm.svg +152 -0
  62. package/dist/flags/flags/do.svg +129 -0
  63. package/dist/flags/flags/dz.svg +5 -0
  64. package/dist/flags/flags/ec.svg +138 -0
  65. package/dist/flags/flags/ee.svg +7 -0
  66. package/dist/flags/flags/eg.svg +38 -0
  67. package/dist/flags/flags/eh.svg +16 -0
  68. package/dist/flags/flags/er.svg +8 -0
  69. package/dist/flags/flags/es.svg +544 -0
  70. package/dist/flags/flags/et.svg +14 -0
  71. package/dist/flags/flags/fi.svg +5 -0
  72. package/dist/flags/flags/fj.svg +120 -0
  73. package/dist/flags/flags/fk.svg +90 -0
  74. package/dist/flags/flags/fm.svg +11 -0
  75. package/dist/flags/flags/fo.svg +12 -0
  76. package/dist/flags/flags/fr.svg +5 -0
  77. package/dist/flags/flags/ga.svg +7 -0
  78. package/dist/flags/flags/gb.svg +7 -0
  79. package/dist/flags/flags/gd.svg +27 -0
  80. package/dist/flags/flags/ge.svg +6 -0
  81. package/dist/flags/flags/gf.svg +5 -0
  82. package/dist/flags/flags/gg.svg +9 -0
  83. package/dist/flags/flags/gh.svg +6 -0
  84. package/dist/flags/flags/gi.svg +32 -0
  85. package/dist/flags/flags/gl.svg +4 -0
  86. package/dist/flags/flags/gm.svg +14 -0
  87. package/dist/flags/flags/gn.svg +7 -0
  88. package/dist/flags/flags/gp.svg +5 -0
  89. package/dist/flags/flags/gq.svg +23 -0
  90. package/dist/flags/flags/gr.svg +16 -0
  91. package/dist/flags/flags/gt.svg +220 -0
  92. package/dist/flags/flags/gu.svg +23 -0
  93. package/dist/flags/flags/gw.svg +13 -0
  94. package/dist/flags/flags/gy.svg +9 -0
  95. package/dist/flags/flags/hk.svg +8 -0
  96. package/dist/flags/flags/hn.svg +18 -0
  97. package/dist/flags/flags/hr.svg +58 -0
  98. package/dist/flags/flags/ht.svg +116 -0
  99. package/dist/flags/flags/hu.svg +7 -0
  100. package/dist/flags/flags/id.svg +4 -0
  101. package/dist/flags/flags/ie.svg +7 -0
  102. package/dist/flags/flags/il.svg +14 -0
  103. package/dist/flags/flags/im.svg +36 -0
  104. package/dist/flags/flags/in.svg +25 -0
  105. package/dist/flags/flags/io.svg +130 -0
  106. package/dist/flags/flags/iq.svg +10 -0
  107. package/dist/flags/flags/ir.svg +219 -0
  108. package/dist/flags/flags/is.svg +12 -0
  109. package/dist/flags/flags/it.svg +7 -0
  110. package/dist/flags/flags/je.svg +45 -0
  111. package/dist/flags/flags/jm.svg +8 -0
  112. package/dist/flags/flags/jo.svg +16 -0
  113. package/dist/flags/flags/jp.svg +11 -0
  114. package/dist/flags/flags/ke.svg +23 -0
  115. package/dist/flags/flags/kg.svg +15 -0
  116. package/dist/flags/flags/kh.svg +61 -0
  117. package/dist/flags/flags/ki.svg +36 -0
  118. package/dist/flags/flags/km.svg +16 -0
  119. package/dist/flags/flags/kn.svg +14 -0
  120. package/dist/flags/flags/kp.svg +15 -0
  121. package/dist/flags/flags/kr.svg +24 -0
  122. package/dist/flags/flags/kw.svg +13 -0
  123. package/dist/flags/flags/ky.svg +109 -0
  124. package/dist/flags/flags/kz.svg +36 -0
  125. package/dist/flags/flags/la.svg +12 -0
  126. package/dist/flags/flags/lb.svg +15 -0
  127. package/dist/flags/flags/lc.svg +8 -0
  128. package/dist/flags/flags/li.svg +43 -0
  129. package/dist/flags/flags/lk.svg +22 -0
  130. package/dist/flags/flags/lr.svg +14 -0
  131. package/dist/flags/flags/ls.svg +8 -0
  132. package/dist/flags/flags/lt.svg +7 -0
  133. package/dist/flags/flags/lu.svg +5 -0
  134. package/dist/flags/flags/lv.svg +6 -0
  135. package/dist/flags/flags/ly.svg +13 -0
  136. package/dist/flags/flags/ma.svg +4 -0
  137. package/dist/flags/flags/mc.svg +6 -0
  138. package/dist/flags/flags/md.svg +70 -0
  139. package/dist/flags/flags/me.svg +116 -0
  140. package/dist/flags/flags/mf.svg +5 -0
  141. package/dist/flags/flags/mg.svg +7 -0
  142. package/dist/flags/flags/mh.svg +7 -0
  143. package/dist/flags/flags/mk.svg +5 -0
  144. package/dist/flags/flags/ml.svg +7 -0
  145. package/dist/flags/flags/mm.svg +12 -0
  146. package/dist/flags/flags/mn.svg +14 -0
  147. package/dist/flags/flags/mo.svg +9 -0
  148. package/dist/flags/flags/mp.svg +86 -0
  149. package/dist/flags/flags/mq.svg +5 -0
  150. package/dist/flags/flags/mr.svg +6 -0
  151. package/dist/flags/flags/ms.svg +33 -0
  152. package/dist/flags/flags/mt.svg +49 -0
  153. package/dist/flags/flags/mu.svg +8 -0
  154. package/dist/flags/flags/mv.svg +6 -0
  155. package/dist/flags/flags/mw.svg +10 -0
  156. package/dist/flags/flags/mx.svg +382 -0
  157. package/dist/flags/flags/my.svg +26 -0
  158. package/dist/flags/flags/mz.svg +21 -0
  159. package/dist/flags/flags/na.svg +16 -0
  160. package/dist/flags/flags/nc.svg +13 -0
  161. package/dist/flags/flags/ne.svg +6 -0
  162. package/dist/flags/flags/nf.svg +9 -0
  163. package/dist/flags/flags/ng.svg +6 -0
  164. package/dist/flags/flags/ni.svg +129 -0
  165. package/dist/flags/flags/nl.svg +5 -0
  166. package/dist/flags/flags/no.svg +7 -0
  167. package/dist/flags/flags/np.svg +13 -0
  168. package/dist/flags/flags/nr.svg +12 -0
  169. package/dist/flags/flags/nu.svg +10 -0
  170. package/dist/flags/flags/nz.svg +36 -0
  171. package/dist/flags/flags/om.svg +115 -0
  172. package/dist/flags/flags/pa.svg +14 -0
  173. package/dist/flags/flags/pe.svg +244 -0
  174. package/dist/flags/flags/pf.svg +19 -0
  175. package/dist/flags/flags/pg.svg +9 -0
  176. package/dist/flags/flags/ph.svg +6 -0
  177. package/dist/flags/flags/pk.svg +15 -0
  178. package/dist/flags/flags/pl.svg +6 -0
  179. package/dist/flags/flags/pm.svg +5 -0
  180. package/dist/flags/flags/pr.svg +13 -0
  181. package/dist/flags/flags/ps.svg +15 -0
  182. package/dist/flags/flags/pt.svg +57 -0
  183. package/dist/flags/flags/pw.svg +11 -0
  184. package/dist/flags/flags/py.svg +157 -0
  185. package/dist/flags/flags/qa.svg +4 -0
  186. package/dist/flags/flags/re.svg +5 -0
  187. package/dist/flags/flags/ro.svg +7 -0
  188. package/dist/flags/flags/rs.svg +292 -0
  189. package/dist/flags/flags/ru.svg +7 -0
  190. package/dist/flags/flags/rw.svg +13 -0
  191. package/dist/flags/flags/sa.svg +26 -0
  192. package/dist/flags/flags/sb.svg +13 -0
  193. package/dist/flags/flags/sc.svg +7 -0
  194. package/dist/flags/flags/sd.svg +13 -0
  195. package/dist/flags/flags/se.svg +4 -0
  196. package/dist/flags/flags/sg.svg +13 -0
  197. package/dist/flags/flags/sh.svg +76 -0
  198. package/dist/flags/flags/si.svg +18 -0
  199. package/dist/flags/flags/sj.svg +7 -0
  200. package/dist/flags/flags/sk.svg +9 -0
  201. package/dist/flags/flags/sl.svg +7 -0
  202. package/dist/flags/flags/sm.svg +75 -0
  203. package/dist/flags/flags/sn.svg +8 -0
  204. package/dist/flags/flags/so.svg +11 -0
  205. package/dist/flags/flags/sr.svg +6 -0
  206. package/dist/flags/flags/ss.svg +8 -0
  207. package/dist/flags/flags/st.svg +16 -0
  208. package/dist/flags/flags/sv.svg +594 -0
  209. package/dist/flags/flags/sx.svg +56 -0
  210. package/dist/flags/flags/sy.svg +6 -0
  211. package/dist/flags/flags/sz.svg +34 -0
  212. package/dist/flags/flags/ta.svg +76 -0
  213. package/dist/flags/flags/tc.svg +50 -0
  214. package/dist/flags/flags/td.svg +7 -0
  215. package/dist/flags/flags/tg.svg +14 -0
  216. package/dist/flags/flags/th.svg +7 -0
  217. package/dist/flags/flags/tj.svg +22 -0
  218. package/dist/flags/flags/tk.svg +5 -0
  219. package/dist/flags/flags/tl.svg +13 -0
  220. package/dist/flags/flags/tm.svg +205 -0
  221. package/dist/flags/flags/tn.svg +4 -0
  222. package/dist/flags/flags/to.svg +10 -0
  223. package/dist/flags/flags/tr.svg +8 -0
  224. package/dist/flags/flags/tt.svg +5 -0
  225. package/dist/flags/flags/tv.svg +9 -0
  226. package/dist/flags/flags/tw.svg +34 -0
  227. package/dist/flags/flags/tz.svg +13 -0
  228. package/dist/flags/flags/ua.svg +6 -0
  229. package/dist/flags/flags/ug.svg +30 -0
  230. package/dist/flags/flags/us.svg +9 -0
  231. package/dist/flags/flags/uy.svg +28 -0
  232. package/dist/flags/flags/uz.svg +30 -0
  233. package/dist/flags/flags/va.svg +479 -0
  234. package/dist/flags/flags/vc.svg +8 -0
  235. package/dist/flags/flags/ve.svg +26 -0
  236. package/dist/flags/flags/vg.svg +63 -0
  237. package/dist/flags/flags/vi.svg +28 -0
  238. package/dist/flags/flags/vn.svg +11 -0
  239. package/dist/flags/flags/vu.svg +21 -0
  240. package/dist/flags/flags/wf.svg +5 -0
  241. package/dist/flags/flags/ws.svg +7 -0
  242. package/dist/flags/flags/xk.svg +8 -0
  243. package/dist/flags/flags/ye.svg +7 -0
  244. package/dist/flags/flags/yt.svg +5 -0
  245. package/dist/flags/flags/za.svg +17 -0
  246. package/dist/flags/flags/zm.svg +27 -0
  247. package/dist/flags/flags/zw.svg +21 -0
  248. package/dist/forms/TimeField/TimeField.d.ts +3 -0
  249. package/dist/forms/TimeField/TimeFieldDropdown/TimeFieldDropdown.d.ts +3 -1
  250. package/dist/forms/TimeField/TimeFieldDropdownTrigger/TimeFieldDropdownTrigger.d.ts +2 -0
  251. package/dist/forms/TimeField/TimeFieldInput/TimeFieldInput.d.ts +3 -1
  252. package/dist/forms/TimeField/constants.d.ts +4 -0
  253. package/dist/forms/TimeField/domain.d.ts +2 -1
  254. package/dist/forms/TimeField/types.d.ts +1 -0
  255. package/dist/forms/TimeRangeField/TimeRangeEnd/TimeRangeEnd.d.ts +1 -1
  256. package/dist/forms/TimeRangeField/TimeRangeField.d.ts +3 -1
  257. package/dist/forms/TimeRangeField/TimeRangeStart/TimeRangeStart.d.ts +1 -1
  258. package/dist/forms/TimeRangeField/types.d.ts +2 -0
  259. package/dist/i18n/locales/locales/en.json +53 -0
  260. package/dist/i18n/locales/locales/es.json +53 -0
  261. package/dist/i18n/locales/locales/fr.json +53 -0
  262. package/dist/index.css +54 -40
  263. package/dist/index.css.map +1 -1
  264. package/dist/index.js +118 -60
  265. package/dist/index.js.map +1 -1
  266. package/dist/index.modern.js +122 -60
  267. package/dist/index.modern.js.map +1 -1
  268. package/dist/lists/DataTable/DataTableCoverShadow/DataTableCoverShadow.d.ts +3 -3
  269. package/dist/lists/DataTable/DataTableEmptyState/DataTableEmptyState.d.ts +3 -2
  270. package/dist/lists/hooks/useDataTableScrollState.d.ts +0 -2
  271. package/dist/src/actions/Button/Button.d.ts +30 -0
  272. package/dist/src/actions/Button/types.d.ts +4 -0
  273. package/dist/src/actions/Link/types.d.ts +2 -0
  274. package/dist/src/controls/DateFilter/types.d.ts +3 -0
  275. package/dist/src/empty_states/EmptyStateContainer/types.d.ts +31 -0
  276. package/dist/src/feedback/InlineBanner/ButtonCTA/index.d.ts +1 -0
  277. package/dist/src/feedback/InlineBanner/types.d.ts +1 -0
  278. package/dist/src/feedback/PersistentBanner/types.d.ts +1 -0
  279. package/dist/src/feedback/Skeleton/types.d.ts +1 -0
  280. package/dist/src/feedback/Toast/types.d.ts +1 -0
  281. package/dist/src/forms/AsyncSelectField/types.d.ts +5 -0
  282. package/dist/src/forms/DateRangeField/DateRangeCalendar/index.d.ts +1 -0
  283. package/dist/src/forms/Form/types.d.ts +3 -0
  284. package/dist/src/forms/PasswordField/types.d.ts +5 -0
  285. package/dist/src/forms/PhoneField/CountrySelector/index.d.ts +1 -0
  286. package/dist/src/forms/PhoneField/types.d.ts +2 -0
  287. package/dist/src/forms/PillSelectField/types.d.ts +4 -0
  288. package/dist/src/forms/SelectField/domain.d.ts +5 -0
  289. package/dist/src/forms/SelectField/types.d.ts +30 -0
  290. package/dist/src/forms/TimeField/TimeFieldInput/index.d.ts +1 -0
  291. package/dist/src/forms/TimeRangeField/types.d.ts +10 -0
  292. package/dist/src/foundation/tokens/color/color-codes.d.ts +64 -0
  293. package/dist/src/foundation/tokens/color/color-types.d.ts +1 -0
  294. package/dist/src/foundation/tokens/zindex/z-index-types.d.ts +1 -0
  295. package/dist/src/foundation/tokens/zindex/z-index-values.d.ts +9 -0
  296. package/dist/src/foundation/types.d.ts +25 -0
  297. package/dist/src/i18n/types.d.ts +3 -0
  298. package/dist/src/icons/icon-typescript-template.d.ts +9 -0
  299. package/dist/src/icons/types.d.ts +1 -0
  300. package/dist/src/layout/Flex/types.d.ts +8 -0
  301. package/dist/src/layout/Page/types.d.ts +6 -0
  302. package/dist/src/lists/Accordion/types.d.ts +6 -0
  303. package/dist/src/lists/ActionList/type.d.ts +10 -0
  304. package/dist/src/lists/ActionListItem/type.d.ts +1 -0
  305. package/dist/src/lists/DataTable/DataTableHeader/types.d.ts +4 -0
  306. package/dist/src/lists/DataTable/types.d.ts +50 -0
  307. package/dist/src/media/Chip/types.d.ts +1 -0
  308. package/dist/src/media/Pill/types.d.ts +1 -0
  309. package/dist/src/overlay/Calendar/types.d.ts +2 -0
  310. package/dist/src/overlay/Dropdown/types.d.ts +2 -0
  311. package/dist/src/overlay/DropdownPane/index.d.ts +1 -0
  312. package/dist/src/overlay/KebabMenu/types.d.ts +7 -0
  313. package/dist/src/overlay/Tooltip/types.d.ts +6 -0
  314. package/dist/src/overlay/hooks/useListKeyboardNavigation/index.d.ts +2 -0
  315. package/dist/src/overlay/hooks/useListKeyboardNavigation/types.d.ts +6 -0
  316. package/dist/src/tests/utils/mockIntersectionObserver.d.ts +9 -0
  317. package/dist/src/typography/KeyboardKey/index.d.ts +1 -0
  318. package/dist/src/typography/Text/types.d.ts +3 -0
  319. package/dist/src/utils/storybookArgTypes.d.ts +89 -0
  320. package/dist/src/utils/types.d.ts +2 -0
  321. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  type Props = {
3
- showShadowOnLeft: boolean;
4
- showShadowOnRight: boolean;
5
3
  isShowingColumns: boolean;
4
+ showShadow: boolean;
5
+ direction: 'left' | 'right';
6
6
  };
7
- declare const DataTableCoverShadow: ({ showShadowOnLeft, showShadowOnRight, isShowingColumns }: Props) => React.JSX.Element;
7
+ declare const DataTableCoverShadow: ({ isShowingColumns, direction, showShadow }: Props) => React.JSX.Element;
8
8
  export default DataTableCoverShadow;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { DataTableColumn, DataTableEmptyState as DataTableEmptyStateType } from '../types';
2
+ import { DataTableColumn, DataTableEmptyState as DataTableEmptyStateType, StickyColumns } from '../types';
3
3
  type Props = {
4
4
  columns?: DataTableColumn[];
5
5
  customEmptyState?: DataTableEmptyStateType;
6
+ stickyColumns?: StickyColumns;
6
7
  };
7
- declare const DataTableEmptyState: ({ columns, customEmptyState }: Props) => React.JSX.Element;
8
+ declare const DataTableEmptyState: ({ columns, customEmptyState, stickyColumns }: Props) => React.JSX.Element;
8
9
  export default DataTableEmptyState;
@@ -8,6 +8,4 @@ export declare const useDataTableScrollState: (stickyColumns?: StickyColumns) =>
8
8
  hasScrollOnRight: boolean;
9
9
  hasRightColumnSticky: boolean;
10
10
  hasLeftColumnSticky: boolean;
11
- showCoverShadowOnRight: boolean;
12
- showCoverShadowOnLeft: boolean;
13
11
  };
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import type { ButtonTheme, ButtonSize, ButtonType, ButtonTarget } from './types';
3
+ import type { PositionStyles, DataProps } from '../../foundation/types';
4
+ declare const Button: React.ForwardRefExoticComponent<{
5
+ children: React.ReactNode;
6
+ type?: ButtonType | undefined;
7
+ /** It controls the button theme */
8
+ theme?: ButtonTheme | undefined;
9
+ disabled?: boolean | undefined;
10
+ onClick?: React.MouseEventHandler<Element> | undefined;
11
+ onMouseEnter?: React.MouseEventHandler<Element> | undefined;
12
+ onMouseLeave?: React.MouseEventHandler<Element> | undefined;
13
+ onBlur?: React.FocusEventHandler<Element> | undefined;
14
+ onFocus?: React.FocusEventHandler<Element> | undefined;
15
+ onKeyDown?: React.KeyboardEventHandler<Element> | undefined;
16
+ id?: string | undefined;
17
+ loading?: boolean | undefined;
18
+ /** This will show a black tooltip when the user hover the button */
19
+ title?: string | React.ReactNode;
20
+ href?: string | undefined;
21
+ target?: ButtonTarget | undefined;
22
+ testId?: string | undefined;
23
+ /**
24
+ * This prop controls how the button grows having the following options:<br/>
25
+ * *full-width*: Will grow to fill the size of the container it is placed within.
26
+ * *min-width-100*: It will have a `min-width: 100` style. It is used for CTA buttons in forms and modals.
27
+ */
28
+ size?: ButtonSize | undefined;
29
+ } & PositionStyles & DataProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
30
+ export default Button;
@@ -0,0 +1,4 @@
1
+ export type ButtonTheme = 'default' | 'primary' | 'danger' | 'upsell' | 'marketing' | 'hollow' | 'hollow-contrast' | 'link-primary' | 'link-danger' | 'link-upsell' | 'link-toolbar' | 'link-contrast' | 'link-icon';
2
+ export type ButtonSize = 'full-width' | 'min-width-100';
3
+ export type ButtonType = 'button' | 'submit' | 'reset';
4
+ export type ButtonTarget = '_blank' | '_self';
@@ -0,0 +1,2 @@
1
+ export type Theme = 'primary' | 'contrast';
2
+ export type Target = '_self' | '_blank';
@@ -0,0 +1,3 @@
1
+ import { CalendarMode } from "../../overlay/Calendar/types";
2
+ export type DateFilterMode = CalendarMode | 'month';
3
+ export type StepDirection = 'forward' | 'backward';
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+ export type EmptyStateSize = 'small' | 'medium' | 'large';
3
+ export type EmptyStateProps = {
4
+ /** The name of the highlighted feature or add-on */
5
+ header?: ReactNode;
6
+ /** Sets the title element */
7
+ title: ReactNode;
8
+ /** Sets the body text */
9
+ children?: ReactNode;
10
+ /** Path to the image/gif to display */
11
+ mediaUrl?: string;
12
+ /** Caption that appears below the CTAs */
13
+ actions?: {
14
+ primary?: React.ReactElement;
15
+ secondary?: React.ReactElement;
16
+ };
17
+ /** Controls the size and appearance of the component */
18
+ size?: EmptyStateSize;
19
+ /** Caption that appears below the cta options */
20
+ caption?: ReactNode;
21
+ isPaywall?: Boolean;
22
+ /** This is used for setting a data-testid on the component*/
23
+ testId?: string;
24
+ };
25
+ export type EmptyStateAsCard = {
26
+ as?: 'card';
27
+ onClose?: () => void;
28
+ } & EmptyStateProps;
29
+ export type EmptyStateAsBanner = {
30
+ as?: 'banner';
31
+ } & EmptyStateProps;
@@ -0,0 +1 @@
1
+ export { default } from './ButtonCTA';
@@ -0,0 +1 @@
1
+ export type InlineBannerTheme = 'info' | 'warning' | 'success' | 'danger' | 'upsell';
@@ -0,0 +1 @@
1
+ export type Theme = 'danger' | 'info' | 'upsell';
@@ -0,0 +1 @@
1
+ export type SkeletonComponent = 'avatar' | 'avatar--small' | 'avatar--medium' | 'avatar--large' | 'avatar--xlarge' | 'button' | 'pill';
@@ -0,0 +1 @@
1
+ export type Theme = 'default' | 'danger';
@@ -0,0 +1,5 @@
1
+ import { SelectOptions } from '../SelectField/types';
2
+ export type AsyncSelectOptions<T> = {
3
+ options: SelectOptions<T>;
4
+ hasMore: boolean;
5
+ };
@@ -0,0 +1 @@
1
+ export { default } from './DateRangeCalendar';
@@ -0,0 +1,3 @@
1
+ import { FormikState, FormikHelpers, FormikHandlers } from 'formik';
2
+ /** The FormValues are `any` here as in Sous Chef we don't care about the shape of the form. We just need to link form fields with the formik state */
3
+ export type FormikType = FormikState<any> & FormikHelpers<any> & FormikHandlers;
@@ -0,0 +1,5 @@
1
+ export type PasswordCriteria = {
2
+ key?: string;
3
+ label: string;
4
+ met: boolean;
5
+ };
@@ -0,0 +1 @@
1
+ export { default } from './CountrySelector';
@@ -0,0 +1,2 @@
1
+ import { CountryCode } from 'libphonenumber-js';
2
+ export type PhoneFieldCountryCode = CountryCode;
@@ -0,0 +1,4 @@
1
+ import type { SelectOption } from '../SelectField/types';
2
+ export type PillSelectOption<T> = SelectOption<T> & {
3
+ isRemovable?: boolean;
4
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This helper method helps to check if the user is scrolling inside the select options so,
3
+ * it does not close the menu when using the prop menuShouldScrollIntoView
4
+ **/
5
+ export declare const isScrollingTheSelectMenu: (element: HTMLElement) => boolean;
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { ControlProps } from 'react-select';
3
+ export type GroupOption<T> = {
4
+ label: string;
5
+ options: SelectOption<T>[];
6
+ };
7
+ export type SelectOption<T> = {
8
+ isDisabled?: boolean;
9
+ value: T;
10
+ label: string;
11
+ };
12
+ export type SelectOptions<T> = Array<SelectOption<T> | GroupOption<T>>;
13
+ export type CustomOptionProps<T> = {
14
+ value: T;
15
+ label: string;
16
+ isSelected: boolean;
17
+ isDisabled: boolean;
18
+ isFocused: boolean;
19
+ };
20
+ export interface SelectedOptionPrefixProps<T> extends ControlProps<T, false> {
21
+ selectedOption: SelectOption<T>;
22
+ }
23
+ export type CustomComponentsExtraProps = {
24
+ testId?: string;
25
+ UserCustomOption?: React.ElementType;
26
+ SelectedOptionPrefix?: React.ElementType;
27
+ creatableButton?: ReactNode;
28
+ onMenuInputFocus: (isFocused: boolean) => void;
29
+ onCreate?: (option: string) => void;
30
+ };
@@ -0,0 +1 @@
1
+ export { default } from './TimeFieldInput';
@@ -0,0 +1,10 @@
1
+ import { StartTime, TimeInterval } from '../../utils/date';
2
+ export type TimeRangeInputProps = {
3
+ interval: TimeInterval;
4
+ startTime?: StartTime;
5
+ onChange: (value: string) => void;
6
+ placeholder?: string;
7
+ testId?: string;
8
+ disabled?: boolean;
9
+ value: string;
10
+ };
@@ -0,0 +1,64 @@
1
+ export declare const COLOR_CODES: {
2
+ readonly white: " #fff";
3
+ readonly black: " #000";
4
+ readonly 'tangerine-100': " #fef1ed";
5
+ readonly 'tangerine-200': " #fdd5c8";
6
+ readonly 'tangerine-300': " #fcab91";
7
+ readonly 'tangerine-400': " #ff6808";
8
+ readonly 'tangerine-500': " #cf5406";
9
+ readonly 'tangerine-600': " #95400a";
10
+ readonly 'eggplant-100': " #f8f3ff";
11
+ readonly 'eggplant-200': " #ebdcff";
12
+ readonly 'eggplant-300': " #d9bff4";
13
+ readonly 'eggplant-400': " #c293f1";
14
+ readonly 'eggplant-500': " #846db3";
15
+ readonly 'eggplant-600': " #453e75";
16
+ readonly 'mint-100': " #ecfaf8";
17
+ readonly 'mint-200': " #c6f1eb";
18
+ readonly 'mint-300': " #8de4d7";
19
+ readonly 'mint-400': " #3abda9";
20
+ readonly 'mint-500': " #35ac9a";
21
+ readonly 'mint-600': " #277e71";
22
+ readonly 'radish-100': " #fcf0f0";
23
+ readonly 'radish-200': " #f7d1d1";
24
+ readonly 'radish-300': " #f0a3a3";
25
+ readonly 'radish-400': " #e76767";
26
+ readonly 'radish-500': " #d33434";
27
+ readonly 'radish-600': " #981b1e";
28
+ readonly 'blueberry-100': " #f6fdff";
29
+ readonly 'blueberry-200': " #ceecf5";
30
+ readonly 'blueberry-300': " #9cd9eb";
31
+ readonly 'blueberry-400': " #5bc0de";
32
+ readonly 'blueberry-500': " #51acc7";
33
+ readonly 'blueberry-600': " #367385";
34
+ readonly 'banana-100': " #fff9ed";
35
+ readonly 'banana-200': " #ffeec9";
36
+ readonly 'banana-300': " #ffdd92";
37
+ readonly 'banana-400': " #ffc74a";
38
+ readonly 'banana-500': " #e5b242";
39
+ readonly 'banana-600': " #99772c";
40
+ readonly 'grey-100': " #f3f3f3";
41
+ readonly 'grey-200': " #d5d5d5";
42
+ readonly 'grey-300': " #949494";
43
+ readonly 'grey-400': " #767676";
44
+ readonly 'grey-500': " #464646";
45
+ readonly 'grey-600': " #323232";
46
+ readonly 'oat-100': " #f1f0ec";
47
+ readonly 'oat-200': " #e2ded6";
48
+ readonly 'oat-300': " #c7c0b2";
49
+ readonly 'oat-400': " #6e6d6c";
50
+ readonly 'oat-500': " #4c4b49";
51
+ readonly 'oat-600': " #383430";
52
+ readonly 'lime-100': " #efffe0";
53
+ readonly 'lime-200': " #c6ff94";
54
+ readonly 'lime-300': " #81ffac";
55
+ readonly 'lime-400': " #00feb2";
56
+ readonly 'lime-500': " #3fb994";
57
+ readonly 'lime-600': " #244f47";
58
+ readonly 'blackberry-100': " #ecf0ff";
59
+ readonly 'blackberry-200': " #d6e0ff";
60
+ readonly 'blackberry-300': " #a0bbff";
61
+ readonly 'blackberry-400': " #4570ff";
62
+ readonly 'blackberry-500': " #1c5cbb";
63
+ readonly 'blackberry-600': " #193f78";
64
+ };
@@ -0,0 +1 @@
1
+ export type Color = 'white' | 'black' | 'tangerine-100' | 'tangerine-200' | 'tangerine-300' | 'tangerine-400' | 'tangerine-500' | 'tangerine-600' | 'eggplant-100' | 'eggplant-200' | 'eggplant-300' | 'eggplant-400' | 'eggplant-500' | 'eggplant-600' | 'mint-100' | 'mint-200' | 'mint-300' | 'mint-400' | 'mint-500' | 'mint-600' | 'radish-100' | 'radish-200' | 'radish-300' | 'radish-400' | 'radish-500' | 'radish-600' | 'blueberry-100' | 'blueberry-200' | 'blueberry-300' | 'blueberry-400' | 'blueberry-500' | 'blueberry-600' | 'banana-100' | 'banana-200' | 'banana-300' | 'banana-400' | 'banana-500' | 'banana-600' | 'grey-100' | 'grey-200' | 'grey-300' | 'grey-400' | 'grey-500' | 'grey-600' | 'oat-100' | 'oat-200' | 'oat-300' | 'oat-400' | 'oat-500' | 'oat-600' | 'lime-100' | 'lime-200' | 'lime-300' | 'lime-400' | 'lime-500' | 'lime-600' | 'blackberry-100' | 'blackberry-200' | 'blackberry-300' | 'blackberry-400' | 'blackberry-500' | 'blackberry-600';
@@ -0,0 +1 @@
1
+ export type ZIndex = 'base' | 'nav' | 'modal' | 'dropdown' | 'dropdown-level-2' | 'tooltip' | 'portal';
@@ -0,0 +1,9 @@
1
+ export declare const ZINDEX_VALUES: {
2
+ readonly base: 1;
3
+ readonly nav: 7;
4
+ readonly modal: 100;
5
+ readonly dropdown: 200;
6
+ readonly 'dropdown-level-2': 210;
7
+ readonly tooltip: 300;
8
+ readonly portal: 9999;
9
+ };
@@ -0,0 +1,25 @@
1
+ export type PositionStyles = {
2
+ /** Shortcut for `margin`. */
3
+ m?: string | number;
4
+ /** Defines the margin around of the element. */
5
+ margin?: string | number;
6
+ /** Shortcut for `marginTop`. */
7
+ mt?: string | number;
8
+ /** Defines the margin on the top of the element. */
9
+ marginTop?: string | number;
10
+ /** Shortcut for `marginRight`. */
11
+ mr?: string | number;
12
+ /** Defines the margin on the right side of the element. */
13
+ marginRight?: string | number;
14
+ /** Shortcut for `marginBottom`. */
15
+ mb?: string | number;
16
+ /** Defines the margin on the bottom of the element. */
17
+ marginBottom?: string | number;
18
+ /** Shortcut for `marginLeft`. */
19
+ ml?: string | number;
20
+ /** Defines the margin on the left side of the element. */
21
+ marginLeft?: string | number;
22
+ };
23
+ export type DataProps = {
24
+ [key in `data${string}`]: string;
25
+ };
@@ -0,0 +1,3 @@
1
+ import type en from './locales/en.json';
2
+ export type TranslateFunction = (key: string) => string;
3
+ export type Context = keyof typeof en;
@@ -0,0 +1,9 @@
1
+ export = template;
2
+ declare function template({ componentName, props, jsx, exports }: {
3
+ componentName: any;
4
+ props: any;
5
+ jsx: any;
6
+ exports: any;
7
+ }, { tpl }: {
8
+ tpl: any;
9
+ }): any;
@@ -0,0 +1 @@
1
+ export type IconSize = 'small' | 'medium' | 'default' | 'large' | 'extra-large' | 'flexible';
@@ -0,0 +1,8 @@
1
+ export type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch';
2
+ export type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
3
+ export type JustifyContent = 'start' | 'end' | 'center' | 'space-between';
4
+ export type Space = 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60;
5
+ export type SpaceConfig = {
6
+ row: Space;
7
+ column: Space;
8
+ };
@@ -0,0 +1,6 @@
1
+ export type Breadcrumb = {
2
+ label: string;
3
+ url: string;
4
+ };
5
+ export type Breadcrumbs = string | Breadcrumb | Breadcrumb[];
6
+ export type PageSize = 'fullwidth' | 'restricted';
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export type AccordionItem = {
3
+ title: string;
4
+ content: ReactNode;
5
+ id?: string;
6
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export type ActionListEmptyState = {
3
+ title: string;
4
+ caption?: string;
5
+ image?: string;
6
+ actions?: {
7
+ primary?: React.ReactElement;
8
+ secondary?: React.ReactElement;
9
+ };
10
+ };
@@ -0,0 +1 @@
1
+ export type ActionListItemTheme = 'info' | 'warning' | 'success' | 'danger' | 'upsell';
@@ -0,0 +1,4 @@
1
+ export type SortOrder = {
2
+ ASC: 'asc';
3
+ DESC: 'desc';
4
+ };
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import Button from '../../actions/Button/Button';
3
+ import { MenuAction } from '../../overlay/KebabMenu/types';
4
+ export type DataTableColumn = {
5
+ name: string;
6
+ label?: React.ReactNode;
7
+ size?: number;
8
+ isSortable?: boolean;
9
+ currentSort?: DataTableSortDirection;
10
+ isRightAligned?: boolean;
11
+ hidden?: boolean;
12
+ reverseSortOrder?: boolean;
13
+ };
14
+ export type DataTableSortDirection = 'asc' | 'desc' | null;
15
+ export type DataTableSort = {
16
+ columnName: string;
17
+ direction: DataTableSortDirection;
18
+ };
19
+ export type DataTableItem<T> = (T & {
20
+ actions?: DataTableAction[];
21
+ key?: string | number | null;
22
+ });
23
+ export type DataTableCustomComponent<T> = {
24
+ item: DataTableItem<T>;
25
+ index: number;
26
+ columnSizes?: number[];
27
+ columns?: DataTableColumn[];
28
+ testId?: string;
29
+ };
30
+ type KebabAction = {
31
+ showInKebab?: true;
32
+ } & MenuAction;
33
+ type ButtonAction = {
34
+ buttonProps?: Pick<React.ComponentPropsWithoutRef<typeof Button>, 'theme' | 'disabled' | 'loading' | 'title'>;
35
+ showInKebab: false;
36
+ } & MenuAction;
37
+ export type DataTableAction = KebabAction | ButtonAction;
38
+ export type DataTableState = 'CONTENT' | 'SKELETON_LOADING' | 'BACKGROUND_LOADING' | 'EMPTY';
39
+ export type StickyColumns = 'left' | 'right' | 'both';
40
+ export type ScrollState = 'NO_SCROLL' | 'SCROLLABLE_CONTENT_ON_BOTH_SIDES' | 'SCROLLABLE_CONTENT_ON_LEFT' | 'SCROLLABLE_CONTENT_ON_RIGHT';
41
+ export type DataTableEmptyState = {
42
+ title: string;
43
+ caption: string;
44
+ image?: string;
45
+ actions?: {
46
+ primary?: React.ReactElement;
47
+ secondary?: React.ReactElement;
48
+ };
49
+ };
50
+ export {};
@@ -0,0 +1 @@
1
+ export type Theme = 'marketing' | 'success' | 'upsell' | 'warning' | 'info' | 'danger';
@@ -0,0 +1 @@
1
+ export type PillTheme = 'info' | 'success' | 'danger' | 'warning' | 'upsell' | 'default';
@@ -0,0 +1,2 @@
1
+ export type CalendarPlacement = 'top' | 'bottom';
2
+ export type CalendarMode = 'day' | 'week';
@@ -0,0 +1,2 @@
1
+ export type DropdownAlignment = 'left' | 'right';
2
+ export type DropdownTrigger = 'click' | 'hover';
@@ -0,0 +1 @@
1
+ export { default } from './DropdownPane';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export type MenuAction = {
3
+ action: string;
4
+ label: React.ReactNode;
5
+ onAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
6
+ hidden?: boolean;
7
+ };
@@ -0,0 +1,6 @@
1
+ export type Placement = 'bottom' | 'top';
2
+ export type ActualPlacement = {
3
+ placement: Placement;
4
+ top: number;
5
+ };
6
+ export type TooltipTheme = 'black' | 'white';
@@ -0,0 +1,2 @@
1
+ export * from './useListKeyboardNavigation';
2
+ export * from './types';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type ListItem = {
3
+ disabled: boolean;
4
+ onClick?: (e: React.MouseEvent | KeyboardEvent) => void;
5
+ href?: string;
6
+ };
@@ -0,0 +1,9 @@
1
+ export declare class MockIntersectionObserver {
2
+ static entries: Array<Element>;
3
+ static options?: IntersectionObserverInit;
4
+ static callback: IntersectionObserverCallback;
5
+ constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit);
6
+ observe(target: Element): void;
7
+ unobserve(target: Element): void;
8
+ static run(isIntersecting: boolean): void;
9
+ }
@@ -0,0 +1 @@
1
+ export { default } from './KeyboardKey';
@@ -0,0 +1,3 @@
1
+ export type TextType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'body' | 'insight' | 'caption';
2
+ export type Emphasis = 'bold' | 'italic' | 'underline' | 'monospace';
3
+ export type Alignment = 'left' | 'right' | 'center' | 'justify';
@@ -0,0 +1,89 @@
1
+ export declare const POSITION_ARG_TYPES: {
2
+ margin: {
3
+ name: string;
4
+ description: string;
5
+ control: {
6
+ type: string;
7
+ };
8
+ table: {
9
+ category: string;
10
+ };
11
+ };
12
+ marginTop: {
13
+ name: string;
14
+ description: string;
15
+ control: {
16
+ type: string;
17
+ };
18
+ table: {
19
+ category: string;
20
+ };
21
+ };
22
+ marginRight: {
23
+ name: string;
24
+ description: string;
25
+ control: {
26
+ type: string;
27
+ };
28
+ table: {
29
+ category: string;
30
+ };
31
+ };
32
+ marginBottom: {
33
+ name: string;
34
+ description: string;
35
+ control: {
36
+ type: string;
37
+ };
38
+ table: {
39
+ category: string;
40
+ };
41
+ };
42
+ marginLeft: {
43
+ name: string;
44
+ description: string;
45
+ control: {
46
+ type: string;
47
+ };
48
+ table: {
49
+ category: string;
50
+ };
51
+ };
52
+ m: {
53
+ table: {
54
+ disable: boolean;
55
+ };
56
+ };
57
+ mt: {
58
+ table: {
59
+ disable: boolean;
60
+ };
61
+ };
62
+ mr: {
63
+ table: {
64
+ disable: boolean;
65
+ };
66
+ };
67
+ mb: {
68
+ table: {
69
+ disable: boolean;
70
+ };
71
+ };
72
+ ml: {
73
+ table: {
74
+ disable: boolean;
75
+ };
76
+ };
77
+ };
78
+ export declare const DATA_ARG_TYPES: {
79
+ data: {
80
+ name: string;
81
+ description: string;
82
+ control: {
83
+ type: string;
84
+ };
85
+ table: {
86
+ category: string;
87
+ };
88
+ };
89
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export type RefType<T> = React.MutableRefObject<T | null> | ((instance: T | null) => void) | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "3.72.0",
3
+ "version": "3.73.0-beta.1",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",