@autoguru/overdrive 4.42.0-next.1 → 4.43.0-next.0

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 (233) hide show
  1. package/dist/components/Actions/Actions.d.ts +4 -3
  2. package/dist/components/Actions/Actions.d.ts.map +1 -1
  3. package/dist/components/Actions/Actions.js +5 -9
  4. package/dist/components/Actions/Actions.stories.d.ts +1 -1
  5. package/dist/components/Alert/Alert.d.ts +1 -1
  6. package/dist/components/Alert/Alert.d.ts.map +1 -1
  7. package/dist/components/Alert/Alert.js +13 -17
  8. package/dist/components/Anchor/Anchor.js +3 -3
  9. package/dist/components/AutoSuggest/AutoSuggest.js +2 -2
  10. package/dist/components/Box/Box.d.ts +6 -9
  11. package/dist/components/Box/Box.d.ts.map +1 -1
  12. package/dist/components/Box/Box.js +12 -117
  13. package/dist/components/Box/Box.stories.d.ts +3 -20
  14. package/dist/components/Box/Box.stories.d.ts.map +1 -1
  15. package/dist/components/Box/argTypes.d.ts.map +1 -1
  16. package/dist/components/Box/argTypes.js +1 -1
  17. package/dist/components/Box/boxStyles.d.ts +5 -0
  18. package/dist/components/Box/boxStyles.d.ts.map +1 -0
  19. package/dist/components/Box/boxStyles.js +32 -0
  20. package/dist/components/Box/index.d.ts +3 -3
  21. package/dist/components/Box/index.d.ts.map +1 -1
  22. package/dist/components/Box/index.js +3 -2
  23. package/dist/components/Box/useBox.d.ts +22 -0
  24. package/dist/components/Box/useBox.d.ts.map +1 -0
  25. package/dist/components/Box/useBox.js +42 -0
  26. package/dist/components/BulletText/BulletText.d.ts +4 -5
  27. package/dist/components/BulletText/BulletText.d.ts.map +1 -1
  28. package/dist/components/BulletText/BulletText.js +6 -8
  29. package/dist/components/BulletText/BulletText.stories.d.ts +1 -1
  30. package/dist/components/BulletText/BulletText.stories.d.ts.map +1 -1
  31. package/dist/components/Button/Button.js +4 -4
  32. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  33. package/dist/components/ColourInput/ColourInput.js +4 -4
  34. package/dist/components/Columns/Column.d.ts +13 -14
  35. package/dist/components/Columns/Column.d.ts.map +1 -1
  36. package/dist/components/Columns/Column.js +23 -37
  37. package/dist/components/Columns/Columns.css.d.ts +18 -6
  38. package/dist/components/Columns/Columns.css.d.ts.map +1 -1
  39. package/dist/components/Columns/Columns.css.js +46 -34
  40. package/dist/components/Columns/Columns.d.ts +13 -24
  41. package/dist/components/Columns/Columns.d.ts.map +1 -1
  42. package/dist/components/Columns/Columns.js +31 -40
  43. package/dist/components/Columns/Columns.stories.d.ts +7 -904
  44. package/dist/components/Columns/Columns.stories.d.ts.map +1 -1
  45. package/dist/components/Columns/index.d.ts +2 -2
  46. package/dist/components/Columns/index.d.ts.map +1 -1
  47. package/dist/components/Columns/index.js +2 -2
  48. package/dist/components/DateInput/DateInput.js +1 -1
  49. package/dist/components/DatePicker/DatePicker.js +3 -3
  50. package/dist/components/DividerLine/DividerLine.js +2 -2
  51. package/dist/components/DropDown/DropDown.stories.d.ts +5 -5
  52. package/dist/components/DropDown/DropDown.stories.d.ts.map +1 -1
  53. package/dist/components/DropDown/DropDownOption.js +2 -2
  54. package/dist/components/DropDown/DropDownOptionsList.js +2 -1
  55. package/dist/components/EditableText/EditableText.d.ts +2 -2
  56. package/dist/components/EditableText/EditableText.d.ts.map +1 -1
  57. package/dist/components/EditableText/EditableText.js +2 -2
  58. package/dist/components/EditableText/EditableText.stories.d.ts +1 -1
  59. package/dist/components/EditableText/EditableText.stories.d.ts.map +1 -1
  60. package/dist/components/FillHeightBox/FillHeightBox.stories.d.ts +1 -1
  61. package/dist/components/Flyout/Flyout.stories.d.ts +1 -1
  62. package/dist/components/Heading/Heading.d.ts +4 -4
  63. package/dist/components/Heading/Heading.d.ts.map +1 -1
  64. package/dist/components/Heading/Heading.js +10 -12
  65. package/dist/components/Heading/Heading.stories.d.ts +1 -8
  66. package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
  67. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts +12 -0
  68. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts.map +1 -1
  69. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +33 -0
  70. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +5 -4
  71. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
  72. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +46 -35
  73. package/dist/components/Icon/Icon.d.ts +2 -2
  74. package/dist/components/Icon/Icon.d.ts.map +1 -1
  75. package/dist/components/Icon/Icon.js +2 -2
  76. package/dist/components/Inline/Inline.d.ts +13 -13
  77. package/dist/components/Inline/Inline.d.ts.map +1 -1
  78. package/dist/components/Inline/Inline.js +54 -55
  79. package/dist/components/Inline/Inline.stories.d.ts +3 -32
  80. package/dist/components/Inline/Inline.stories.d.ts.map +1 -1
  81. package/dist/components/Inline/index.d.ts +1 -1
  82. package/dist/components/Inline/index.d.ts.map +1 -1
  83. package/dist/components/Inline/index.js +1 -1
  84. package/dist/components/IntentStripe/IntentStripe.d.ts +1 -2
  85. package/dist/components/IntentStripe/IntentStripe.d.ts.map +1 -1
  86. package/dist/components/LinearProgressIndicator/LinearProgressIndicator.d.ts.map +1 -1
  87. package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +1 -0
  88. package/dist/components/LoadingBox/LoadingBox.stories.d.ts +394 -431
  89. package/dist/components/LoadingBox/LoadingBox.stories.d.ts.map +1 -1
  90. package/dist/components/Meta/Meta.js +1 -1
  91. package/dist/components/MinimalModal/MinimalModal.css.d.ts +1 -1
  92. package/dist/components/MinimalModal/MinimalModal.stories.d.ts +6 -1
  93. package/dist/components/MinimalModal/MinimalModal.stories.d.ts.map +1 -1
  94. package/dist/components/Modal/Modal.js +2 -2
  95. package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
  96. package/dist/components/NumberBubble/NumberBubble.js +3 -3
  97. package/dist/components/OptionGrid/OptionGrid.css.js +1 -1
  98. package/dist/components/OptionList/OptionList.d.ts +2 -2
  99. package/dist/components/OptionList/OptionListItem.js +1 -1
  100. package/dist/components/Pagination/Bubble.js +1 -1
  101. package/dist/components/Pagination/Pagination.js +3 -3
  102. package/dist/components/ProgressSpinner/ProgressSpinner.js +3 -3
  103. package/dist/components/ScrollPane/ScrollPane.d.ts +3 -3
  104. package/dist/components/ScrollPane/ScrollPane.d.ts.map +1 -1
  105. package/dist/components/ScrollPane/ScrollPane.js +1 -2
  106. package/dist/components/ScrollPane/ScrollPane.stories.d.ts +1 -1
  107. package/dist/components/ScrollPane/ScrollPane.stories.d.ts.map +1 -1
  108. package/dist/components/Section/Section.d.ts +4 -5
  109. package/dist/components/Section/Section.d.ts.map +1 -1
  110. package/dist/components/Section/Section.js +18 -13
  111. package/dist/components/Section/Section.stories.d.ts +1 -1
  112. package/dist/components/SimplePagination/SimplePagination.js +1 -1
  113. package/dist/components/SliderProgress/ProgressStep.js +2 -1
  114. package/dist/components/SliderProgress/SliderProgress.js +2 -1
  115. package/dist/components/SliderProgress/SliderProgress.stories.d.ts +1 -1
  116. package/dist/components/Stack/Divider.css.d.ts +1 -1
  117. package/dist/components/Stack/Divider.css.d.ts.map +1 -1
  118. package/dist/components/Stack/Divider.css.js +8 -3
  119. package/dist/components/Stack/Stack.d.ts +8 -9
  120. package/dist/components/Stack/Stack.d.ts.map +1 -1
  121. package/dist/components/Stack/Stack.js +50 -35
  122. package/dist/components/Stack/Stack.stories.d.ts +2 -17
  123. package/dist/components/Stack/Stack.stories.d.ts.map +1 -1
  124. package/dist/components/StandardModal/StandardModal.js +2 -2
  125. package/dist/components/StarRating/StarRating.d.ts.map +1 -1
  126. package/dist/components/StarRating/StarRating.js +3 -2
  127. package/dist/components/Stepper/Stepper.css.d.ts +1 -2
  128. package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
  129. package/dist/components/Stepper/Stepper.css.js +7 -12
  130. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  131. package/dist/components/Stepper/Stepper.js +15 -30
  132. package/dist/components/Table/TableCell.d.ts.map +1 -1
  133. package/dist/components/Table/TableCell.js +2 -2
  134. package/dist/components/Table/TableHeadCell.d.ts +1 -1
  135. package/dist/components/Table/TableHeadCell.d.ts.map +1 -1
  136. package/dist/components/Table/TableHeadCell.js +4 -2
  137. package/dist/components/Tabs/Tab.js +5 -5
  138. package/dist/components/Text/Text.d.ts +4 -2
  139. package/dist/components/Text/Text.d.ts.map +1 -1
  140. package/dist/components/Text/Text.js +2 -5
  141. package/dist/components/Text/Text.stories.d.ts.map +1 -1
  142. package/dist/components/Text/useTextStyles.css.d.ts +1 -1
  143. package/dist/components/Text/useTextStyles.css.d.ts.map +1 -1
  144. package/dist/components/Text/useTextStyles.css.js +5 -1
  145. package/dist/components/Text/useTextStyles.d.ts +4 -5
  146. package/dist/components/Text/useTextStyles.d.ts.map +1 -1
  147. package/dist/components/Text/useTextStyles.js +3 -4
  148. package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
  149. package/dist/components/TextAreaInput/TextAreaInput.js +7 -6
  150. package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
  151. package/dist/components/TextBubble/TextBubble.js +3 -3
  152. package/dist/components/TextContainer/TextContainer.d.ts +0 -1
  153. package/dist/components/TextContainer/TextContainer.d.ts.map +1 -1
  154. package/dist/components/TextContainer/TextContainer.js +13 -25
  155. package/dist/components/TextContainer/TextContainer.stories.d.ts +3 -6
  156. package/dist/components/TextContainer/TextContainer.stories.d.ts.map +1 -1
  157. package/dist/components/TextLink/TextLink.d.ts +2 -2
  158. package/dist/components/TextLink/TextLink.d.ts.map +1 -1
  159. package/dist/components/TextLink/TextLink.js +8 -8
  160. package/dist/components/TextLink/TextLink.stories.d.ts +27 -22
  161. package/dist/components/TextLink/TextLink.stories.d.ts.map +1 -1
  162. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +5 -4
  163. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
  164. package/dist/components/VisuallyHidden/VisuallyHidden.js +9 -3
  165. package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +1 -5
  166. package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts.map +1 -1
  167. package/dist/components/private/CheckableBase/CheckableBase.d.ts.map +1 -1
  168. package/dist/components/private/CheckableBase/CheckableBase.js +10 -10
  169. package/dist/components/private/InputBase/HintText.js +5 -5
  170. package/dist/components/private/InputBase/withEnhancedInput.d.ts +3 -3
  171. package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
  172. package/dist/components/private/InputBase/withEnhancedInput.js +4 -4
  173. package/dist/hooks/index.d.ts +1 -0
  174. package/dist/hooks/index.d.ts.map +1 -1
  175. package/dist/hooks/index.js +1 -0
  176. package/dist/hooks/useDeepCompareMemo/index.d.ts +2 -0
  177. package/dist/hooks/useDeepCompareMemo/index.d.ts.map +1 -0
  178. package/dist/hooks/useDeepCompareMemo/index.js +13 -0
  179. package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts +1 -2
  180. package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts.map +1 -1
  181. package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts +1 -2
  182. package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts.map +1 -1
  183. package/dist/reset/globalReset.css.js +30 -13
  184. package/dist/reset/reset.css.d.ts.map +1 -1
  185. package/dist/reset/reset.css.js +94 -37
  186. package/dist/stories/helpers/index.d.ts +1 -1
  187. package/dist/stories/helpers/index.d.ts.map +1 -1
  188. package/dist/stories/helpers/sprinkles.css.d.ts +1 -1
  189. package/dist/stories/helpers/stack.css.d.ts.map +1 -0
  190. package/dist/styles/layers.css.d.ts +2 -0
  191. package/dist/styles/layers.css.d.ts.map +1 -1
  192. package/dist/styles/layers.css.js +2 -0
  193. package/dist/styles/sprinkles.css.d.ts +405 -71
  194. package/dist/styles/sprinkles.css.d.ts.map +1 -1
  195. package/dist/styles/sprinkles.css.js +193 -19
  196. package/dist/styles/vars.css.d.ts +2 -0
  197. package/dist/styles/vars.css.d.ts.map +1 -0
  198. package/dist/styles/vars.css.js +7 -0
  199. package/dist/test/vitest.setup.d.ts +2 -0
  200. package/dist/test/vitest.setup.d.ts.map +1 -0
  201. package/dist/themes/makeTheme.d.ts +1 -0
  202. package/dist/themes/makeTheme.d.ts.map +1 -1
  203. package/dist/themes/makeTheme.js +2 -0
  204. package/dist/types/index.d.ts +1 -1
  205. package/dist/types/index.d.ts.map +1 -1
  206. package/dist/utils/index.d.ts +2 -1
  207. package/dist/utils/index.d.ts.map +1 -1
  208. package/dist/utils/index.js +2 -2
  209. package/dist/utils/sprinkles.d.ts +11 -0
  210. package/dist/utils/sprinkles.d.ts.map +1 -0
  211. package/dist/utils/sprinkles.js +34 -0
  212. package/package.json +26 -23
  213. package/dist/components/Box/useBoxStyles.css.d.ts +0 -48
  214. package/dist/components/Box/useBoxStyles.css.d.ts.map +0 -1
  215. package/dist/components/Box/useBoxStyles.css.js +0 -141
  216. package/dist/components/Box/useBoxStyles.d.ts +0 -69
  217. package/dist/components/Box/useBoxStyles.d.ts.map +0 -1
  218. package/dist/components/Box/useBoxStyles.js +0 -80
  219. package/dist/components/Columns/Column.css.d.ts +0 -3
  220. package/dist/components/Columns/Column.css.d.ts.map +0 -1
  221. package/dist/components/Columns/Column.css.js +0 -35
  222. package/dist/components/Stack/Divider.d.ts +0 -3
  223. package/dist/components/Stack/Divider.d.ts.map +0 -1
  224. package/dist/components/Stack/Divider.js +0 -14
  225. package/dist/components/Stack/Stack.css.d.ts +0 -5
  226. package/dist/components/Stack/Stack.css.d.ts.map +0 -1
  227. package/dist/components/Stack/Stack.css.js +0 -18
  228. package/dist/styles/stack.css.d.ts.map +0 -1
  229. package/dist/styles/stack.css.js +0 -44
  230. package/dist/test/vitest-setup.d.ts +0 -2
  231. package/dist/test/vitest-setup.d.ts.map +0 -1
  232. /package/dist/{styles → stories/helpers}/stack.css.d.ts +0 -0
  233. /package/dist/test/{vitest-setup.js → vitest.setup.js} +0 -0
@@ -3,26 +3,18 @@
3
3
  import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
4
4
  __vanilla_filescope__.setFileScope("lib/components/Stepper/Stepper.css.ts", "@autoguru/overdrive");
5
5
  import { style, styleVariants } from '@vanilla-extract/css';
6
+ import { sprinklesResponsive } from "../../styles/sprinkles.css.js";
6
7
  import { overdriveTokens as vars } from "../../themes/theme.css.js";
7
8
  export const disabled = style({
8
9
  cursor: 'not-allowed'
9
10
  }, "disabled");
10
11
  export const root = style({
11
- width: 'max-content',
12
12
  selectors: {
13
13
  [`&:not(${disabled}):focus`]: {
14
14
  borderColor: vars.colours.intent.information.background.standard
15
15
  }
16
16
  }
17
17
  }, "root");
18
- export const width = styleVariants({
19
- full: {
20
- width: '100%'
21
- },
22
- default: {
23
- width: 'max-content'
24
- }
25
- }, "width");
26
18
  export const handle = styleVariants({
27
19
  default: {
28
20
  width: vars.space[6],
@@ -41,7 +33,10 @@ export const handle = styleVariants({
41
33
  cursor: 'not-allowed'
42
34
  }
43
35
  }, "handle");
44
- export const label = style({
45
- minWidth: vars.space['8']
46
- }, "label");
36
+ export const label = [sprinklesResponsive({
37
+ textAlign: 'center',
38
+ width: 'full'
39
+ }), style({
40
+ minWidth: vars.space['6']
41
+ }, "label")];
47
42
  __vanilla_filescope__.endFileScope();
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../lib/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAIA,OAAO,EACN,iBAAiB,EAIjB,MAAM,OAAO,CAAC;AAUf,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAE/B,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAkDD,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAiI5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../lib/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAIA,OAAO,EACN,iBAAiB,EAIjB,MAAM,OAAO,CAAC;AAUf,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAE/B,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAkDD,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAsH5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -6,9 +6,9 @@ import clsx from 'clsx';
6
6
  import * as React from 'react';
7
7
  import { useCallback } from 'react';
8
8
  import { addWithSafeDecimal } from "../../utils/number.js";
9
- import { Box, useBoxStyles } from "../Box/index.js";
10
- import { Column, Columns } from "../Columns/index.js";
9
+ import { Box, boxStyles } from "../Box/index.js";
11
10
  import { Icon } from "../Icon/index.js";
11
+ import { Inline } from "../Inline/index.js";
12
12
  import { Text, useTextStyles } from "../Text/index.js";
13
13
  import * as styles from "./Stepper.css.js";
14
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -31,7 +31,7 @@ const Handle = _ref2 => {
31
31
  onClick
32
32
  } = _ref2;
33
33
  return _jsx(Box, {
34
- is: "button",
34
+ as: "button",
35
35
  className: [styles.handle.default, {
36
36
  [styles.handle.disabled]: disabled
37
37
  }, useTextStyles({
@@ -109,12 +109,9 @@ export const Stepper = _ref3 => {
109
109
  }
110
110
  }, [min, max, onDecrement, onIncrement, onChange]);
111
111
  return _jsx(Box, {
112
- className: clsx(className, styles.root, useBoxStyles({
113
- is: 'button'
114
- }), disabled && styles.disabled, {
115
- [styles.width.default]: !isFullWidth,
116
- [styles.width.full]: isFullWidth
117
- }),
112
+ className: clsx(className, styles.root, boxStyles({
113
+ as: 'button'
114
+ }), disabled && styles.disabled),
118
115
  userSelect: "none",
119
116
  "aria-disabled": disabled,
120
117
  tabIndex: 0,
@@ -122,41 +119,29 @@ export const Stepper = _ref3 => {
122
119
  borderColour: "gray",
123
120
  padding: "3",
124
121
  borderRadius: "1",
125
- boxShadow: "2",
122
+ width: isFullWidth ? 'full' : 'fit-content',
123
+ minWidth: "fit-content",
126
124
  onKeyDown: keyDownHandler,
127
- children: _jsxs(Columns, {
125
+ children: _jsxs(Inline, {
126
+ alignX: "space-between",
128
127
  noWrap: true,
129
- width: "full",
130
- children: [_jsx(Column, {
131
- noShrink: true,
132
- alignSelf: "centre",
128
+ children: [_jsx(Box, {
133
129
  children: _jsx(Handle, {
134
130
  icon: MinusIcon,
135
131
  label: "step down",
136
132
  disabled: disabled,
137
133
  onClick: onDecrement
138
134
  })
139
- }), _jsx(Column, {
140
- noShrink: true,
141
- grow: true,
142
- width: "auto",
143
- alignSelf: "centre",
135
+ }), _jsx(Box, {
144
136
  children: _jsx(Text, {
145
- is: "span",
146
- align: "center",
137
+ as: "span",
147
138
  colour: "dark",
148
139
  display: "block",
149
- className: clsx(useBoxStyles({
150
- paddingX: '2',
151
- width: 'full',
152
- is: 'span'
153
- }), styles.label),
140
+ className: clsx(styles.label),
154
141
  size: "4",
155
142
  children: Number.isFinite(value) ? format(value) : ''
156
143
  })
157
- }), _jsx(Column, {
158
- noShrink: true,
159
- alignSelf: "centre",
144
+ }), _jsx(Box, {
160
145
  children: _jsx(Handle, {
161
146
  icon: PlusIcon,
162
147
  label: "step up",
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../lib/components/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQ7C,MAAM,WAAW,KAAM,SAAQ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IAEhC,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,8EA4CrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../lib/components/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQ7C,MAAM,WAAW,KAAM,SAAQ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IAEhC,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,8EA6CrB,CAAC;AAIF,eAAe,SAAS,CAAC"}
@@ -21,12 +21,11 @@ export const TableCell = forwardRef((_ref, ref) => {
21
21
  return _jsx(Box, {
22
22
  ref: ref,
23
23
  role: "gridcell",
24
- scope: "row",
25
24
  display: "flex",
26
25
  alignItems: "center",
27
26
  justifyContent: alignmentToFlexAlignment(align),
28
27
  padding: padding,
29
- borderWidthBottom: "1",
28
+ borderBottomWidth: "1",
30
29
  "aria-label": ariaLabel,
31
30
  className: styles.root,
32
31
  children: typeof children === 'string' || typeof children === 'number' ? _jsx(Text, {
@@ -39,4 +38,5 @@ export const TableCell = forwardRef((_ref, ref) => {
39
38
  }) : children
40
39
  });
41
40
  });
41
+ TableCell.displayName = 'TableCell';
42
42
  export default TableCell;
@@ -9,6 +9,6 @@ export interface Props extends Partial<Pick<AriaAttributes, 'aria-label'>>, Pick
9
9
  onSort?: (event: MouseEvent) => void;
10
10
  children?: string | null;
11
11
  }
12
- export declare const TableHeadCell: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const TableHeadCell: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLTableCellElement>>;
13
13
  export default TableHeadCell;
14
14
  //# sourceMappingURL=TableHeadCell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeadCell.d.ts","sourceRoot":"","sources":["../../../lib/components/Table/TableHeadCell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAS7B,KAAK,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,KAChB,SAAQ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,EAClD,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,SAAS,CAAC;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAErC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAUD,eAAO,MAAM,aAAa,8EA6FzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"TableHeadCell.d.ts","sourceRoot":"","sources":["../../../lib/components/Table/TableHeadCell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAS7B,KAAK,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC,MAAM,WAAW,KAChB,SAAQ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,EAClD,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,SAAS,CAAC;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAErC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAUD,eAAO,MAAM,aAAa,oFA8FzB,CAAC;AAIF,eAAe,aAAa,CAAC"}
@@ -57,6 +57,7 @@ export const TableHeadCell = forwardRef((_ref, ref) => {
57
57
  }), (align === 'left' || align === 'center') && shouldSort ? sorter : null]
58
58
  });
59
59
  return _jsx(Box, {
60
+ as: "th",
60
61
  ref: ref,
61
62
  role: "columnheader",
62
63
  scope: "col",
@@ -64,8 +65,8 @@ export const TableHeadCell = forwardRef((_ref, ref) => {
64
65
  alignItems: "center",
65
66
  justifyContent: alignmentToFlexAlignment(align),
66
67
  padding: sort ? undefined : padding,
67
- borderColourBottom: "dark",
68
- borderWidthBottom: "1",
68
+ borderBottomColour: "dark",
69
+ borderBottomWidth: "1",
69
70
  "aria-sort": shouldSort ? sortToAria(sort) : undefined,
70
71
  "aria-label": ariaLabel,
71
72
  className: tableContext.stickyHead && styles.sticky,
@@ -81,4 +82,5 @@ export const TableHeadCell = forwardRef((_ref, ref) => {
81
82
  }) : child
82
83
  });
83
84
  });
85
+ TableHeadCell.displayName = 'TableHeadCell';
84
86
  export default TableHeadCell;
@@ -4,7 +4,7 @@ import { invariant } from '@autoguru/utilities';
4
4
  import clsx from 'clsx';
5
5
  import * as React from 'react';
6
6
  import { cloneElement, createElement, forwardRef, isValidElement, useContext } from 'react';
7
- import { useBoxStyles } from "../Box/index.js";
7
+ import { boxStyles } from "../Box/index.js";
8
8
  import { Inline } from "../Inline/index.js";
9
9
  import { Text, useTextStyles } from "../Text/index.js";
10
10
  import * as styles from "./Tab.css.js";
@@ -27,11 +27,11 @@ export const Tab = forwardRef((_ref, ref) => {
27
27
  const isActive = tabsContext.activeIndex === tabListContext;
28
28
  const controlsId = typeof incomingId === 'string' ? incomingId : `${tabsContext.id}-${tabListContext}-tab`;
29
29
  const props = {
30
- className: clsx(useBoxStyles({
31
- is: typeof Component === 'string' ? Component : 'button',
32
- display: 'inlineFlex',
30
+ className: clsx(boxStyles({
31
+ as: typeof Component === 'string' ? Component : 'button',
32
+ display: 'inline-flex',
33
33
  justifyContent: 'center',
34
- backgroundColour: 'transparent'
34
+ backgroundColor: 'transparent'
35
35
  }), useTextStyles({
36
36
  noWrap: true,
37
37
  size: '3',
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
- import type { BoxStyleProps } from '../Box';
2
+ import { Sprinkles } from '../../styles/sprinkles.css';
3
+ import type { UseBoxProps } from '../Box';
3
4
  import { TextStyleProps } from './useTextStyles';
4
- type Display = Extract<BoxStyleProps['display'], 'inline' | 'inlineBlock' | 'block'>;
5
+ type Display = Extract<UseBoxProps['display'], 'inline' | 'inline-block' | 'block'>;
5
6
  type ElementAttributes = React.ComponentPropsWithoutRef<'p'> & Pick<React.ComponentProps<'label'>, 'htmlFor'>;
6
7
  export interface TextProps extends Omit<ElementAttributes, 'color' | 'is'>, TextStyleProps {
8
+ color?: Sprinkles['color'];
7
9
  strong?: boolean;
8
10
  display?: Display;
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAC;AAEhE,KAAK,OAAO,GAAG,OAAO,CACrB,aAAa,CAAC,SAAS,CAAC,EACxB,QAAQ,GAAG,aAAa,GAAG,OAAO,CAClC,CAAC;AACF,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,GAC3D,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAEhD,MAAM,WAAW,SAChB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC,EAC9C,cAAc;IAEf,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,IAAI,8GA6ChB,CAAC;AAIF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAC;AAEhE,KAAK,OAAO,GAAG,OAAO,CACrB,WAAW,CAAC,SAAS,CAAC,EACtB,QAAQ,GAAG,cAAc,GAAG,OAAO,CACnC,CAAC;AACF,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,GAC3D,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAEhD,MAAM,WAAW,SAChB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC,EAC9C,cAAc;IAEf,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAE3B,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,IAAI,8GA0ChB,CAAC;AAIF,eAAe,IAAI,CAAC"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- const _excluded = ["children", "className", "is", "as", "testId", "align", "colour", "color", "display", "fontWeight", "transform", "breakWord", "noWrap", "size", "strong"];
5
+ const _excluded = ["children", "className", "is", "as", "testId", "colour", "display", "fontWeight", "transform", "breakWord", "noWrap", "size", "strong"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import React from 'react';
@@ -17,9 +17,7 @@ export const Text = React.forwardRef((_ref, ref) => {
17
17
  is = 'span',
18
18
  as = is,
19
19
  testId,
20
- align = 'left',
21
20
  colour,
22
- color = colour,
23
21
  display,
24
22
  fontWeight = 'normal',
25
23
  transform,
@@ -33,11 +31,10 @@ export const Text = React.forwardRef((_ref, ref) => {
33
31
  as: as,
34
32
  ref: ref,
35
33
  display: display,
36
- textAlign: align,
37
34
  className: [useTextStyles({
38
35
  as,
39
36
  size,
40
- color: color !== null && color !== void 0 ? color : strong ? 'dark' : undefined,
37
+ colour: colour !== null && colour !== void 0 ? colour : strong ? 'dark' : undefined,
41
38
  fontWeight: strong ? 'bold' : fontWeight,
42
39
  transform,
43
40
  noWrap,
@@ -1 +1 @@
1
- {"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAS9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAe3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAKF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC"}
1
+ {"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAS9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAe3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAKF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAsBxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export declare const root: string;
2
2
  export declare const sizes: Record<"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9", string>;
3
- export declare const colours: Record<"link" | "white" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark" | "muted", string>;
3
+ export declare const colours: Record<"link" | "white" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark" | "muted" | "unset", string>;
4
4
  export declare const fontWeight: Record<"bold" | "normal" | "semiBold", string>;
5
5
  export declare const noWrap: string;
6
6
  export declare const breakWord: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useTextStyles.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/useTextStyles.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,QAOf,CAAC;AAEH,eAAO,MAAM,KAAK,qEAWjB,CAAC;AAEF,eAAO,MAAM,OAAO,4KAEnB,CAAC;AAEF,eAAO,MAAM,UAAU,gDAEtB,CAAC;AAEF,eAAO,MAAM,MAAM,QAAkC,CAAC;AACtD,eAAO,MAAM,SAAS,QAAqC,CAAC;AAE5D,eAAO,MAAM,SAAS,4CAKrB,CAAC"}
1
+ {"version":3,"file":"useTextStyles.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/useTextStyles.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI,QAOf,CAAC;AAEH,eAAO,MAAM,KAAK,qEAWjB,CAAC;AAEF,eAAO,MAAM,OAAO,sLAKlB,CAAC;AAEH,eAAO,MAAM,UAAU,gDAEtB,CAAC;AAEF,eAAO,MAAM,MAAM,QAAkC,CAAC;AACtD,eAAO,MAAM,SAAS,QAAqC,CAAC;AAE5D,eAAO,MAAM,SAAS,4CAKrB,CAAC"}
@@ -25,7 +25,11 @@ export const sizes = styleVariants(Object.entries(vars.typography.size).reduce((
25
25
  }
26
26
  });
27
27
  }, {}), "sizes");
28
- export const colours = styleVariants(mapTokenToProperty(vars.typography.colour, 'color'), "colours");
28
+ export const colours = styleVariants(_objectSpread(_objectSpread({}, mapTokenToProperty(vars.typography.colour, 'color')), {}, {
29
+ unset: {
30
+ color: 'unset'
31
+ }
32
+ }), "colours");
29
33
  export const fontWeight = styleVariants(mapTokenToProperty(vars.typography.fontWeight, 'fontWeight'), "fontWeight");
30
34
  export const noWrap = style({
31
35
  whiteSpace: 'nowrap'
@@ -1,14 +1,13 @@
1
- import type { BoxStyleProps } from '../Box';
1
+ import type { UseBoxProps } from '../Box';
2
2
  import * as styles from './useTextStyles.css';
3
- export type TextColor = keyof typeof styles.colours | 'unset';
3
+ export type TextColor = keyof typeof styles.colours;
4
4
  export type TextFontWeight = keyof typeof styles.fontWeight;
5
5
  export type TextSize = keyof typeof styles.sizes;
6
6
  export type TextTransform = keyof typeof styles.transform;
7
7
  export type TextTags = 'p' | 'label' | 'span';
8
8
  export interface TextStyleProps {
9
- align?: BoxStyleProps['textAlign'];
9
+ align?: UseBoxProps['textAlign'];
10
10
  as?: TextTags;
11
- color?: TextColor;
12
11
  colour?: TextColor;
13
12
  fontWeight?: TextFontWeight;
14
13
  is?: TextTags;
@@ -17,6 +16,6 @@ export interface TextStyleProps {
17
16
  size?: TextSize;
18
17
  transform?: TextTransform;
19
18
  }
20
- export declare const useTextStyles: ({ align, colour, color, fontWeight, is, as, noWrap, breakWord, size, transform, }: TextStyleProps) => string;
19
+ export declare const useTextStyles: ({ align, colour, fontWeight, is, as, noWrap, breakWord, size, transform, }: TextStyleProps) => string;
21
20
  export default useTextStyles;
22
21
  //# sourceMappingURL=useTextStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTextStyles.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/useTextStyles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,MAAM,CAAC,UAAU,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,MAAM,CAAC,SAAS,CAAC;AAE1D,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,OAAO,GAAG,MAAM,CAAC;AAC9C,MAAM,WAAW,cAAc;IAE9B,KAAK,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAEnC,EAAE,CAAC,EAAE,QAAQ,CAAC;IAEd,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B,EAAE,CAAC,EAAE,QAAQ,CAAC;IAEd,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,GAAI,mFAW3B,cAAc,WAWhB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useTextStyles.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/useTextStyles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAG9C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,MAAM,CAAC,UAAU,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,MAAM,CAAC,SAAS,CAAC;AAE1D,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,OAAO,GAAG,MAAM,CAAC;AAC9C,MAAM,WAAW,cAAc;IAE9B,KAAK,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEjC,EAAE,CAAC,EAAE,QAAQ,CAAC;IAEd,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B,EAAE,CAAC,EAAE,QAAQ,CAAC;IAEd,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,GAAI,4EAU3B,cAAc,WAWhB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  import clsx from 'clsx';
4
- import { useBoxStyles } from "../Box/index.js";
4
+ import { boxStyles } from "../Box/index.js";
5
5
  import * as styles from "./useTextStyles.css.js";
6
6
  export const useTextStyles = _ref => {
7
7
  let {
8
8
  align,
9
9
  colour,
10
- color = colour,
11
10
  fontWeight,
12
11
  is,
13
12
  as = is,
@@ -16,9 +15,9 @@ export const useTextStyles = _ref => {
16
15
  size,
17
16
  transform
18
17
  } = _ref;
19
- return clsx(styles.root, useBoxStyles({
18
+ return clsx(styles.root, boxStyles({
20
19
  as,
21
20
  textAlign: align
22
- }), color !== 'unset' && styles.colours[color !== null && color !== void 0 ? color : 'neutral'], fontWeight && styles.fontWeight[fontWeight], noWrap && styles.noWrap, breakWord && styles.breakWord, size && styles.sizes[size], transform && styles.transform[transform]);
21
+ }), colour !== 'unset' && styles.colours[colour !== null && colour !== void 0 ? colour : 'neutral'], fontWeight && styles.fontWeight[fontWeight], noWrap && styles.noWrap, breakWord && styles.breakWord, size && styles.sizes[size], transform && styles.transform[transform]);
23
22
  };
24
23
  export default useTextStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"TextAreaInput.d.ts","sourceRoot":"","sources":["../../../lib/components/TextAreaInput/TextAreaInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,eAAO,MAAM,aAAa,yXA2BzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"TextAreaInput.d.ts","sourceRoot":"","sources":["../../../lib/components/TextAreaInput/TextAreaInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,eAAO,MAAM,aAAa,yXA4BzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -21,12 +21,13 @@ export const TextAreaInput = withEnhancedInput(_ref => {
21
21
  size
22
22
  } = _ref,
23
23
  rest = _objectWithoutProperties(_ref, _excluded);
24
- return _jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
25
- as: "textarea"
26
- }, eventHandlers), field), rest), {}, {
27
- autoComplete: "off",
28
- maxLength: rest.maxLength || MAX_TEXT_AREA_INPUT_LENGTH
29
- }));
24
+ return (_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
25
+ as: "textarea"
26
+ }, eventHandlers), field), rest), {}, {
27
+ autoComplete: "off",
28
+ maxLength: rest.maxLength || MAX_TEXT_AREA_INPUT_LENGTH
29
+ }))
30
+ );
30
31
  }, {
31
32
  primitiveType: 'textarea',
32
33
  withSuffixIcon: false,
@@ -1 +1 @@
1
- {"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAgB,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,WAAW,KAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,KAAK,CAoD/C,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAa,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,WAAW,KAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,KAAK,CAoD/C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  import clsx from 'clsx';
9
9
  import * as React from 'react';
10
10
  import { useMemo } from 'react';
11
- import { Box, useBoxStyles } from "../Box/index.js";
11
+ import { Box, boxStyles } from "../Box/index.js";
12
12
  import { Text } from "../Text/index.js";
13
13
  import * as styles from "./TextBubble.css.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -49,7 +49,7 @@ export const TextBubble = _ref => {
49
49
  return _jsx(Box, _objectSpread(_objectSpread({
50
50
  borderRadius: "full",
51
51
  backgroundColour: "gray900",
52
- display: "inlineBlock",
52
+ display: "inline-block",
53
53
  position: "relative",
54
54
  padding: valuePaddingMap[size]
55
55
  }, boxProps), {}, {
@@ -58,7 +58,7 @@ export const TextBubble = _ref => {
58
58
  strong: true,
59
59
  noWrap: true,
60
60
  align: "center",
61
- className: clsx(styles.bubbleText, useBoxStyles({
61
+ className: clsx(styles.bubbleText, boxStyles({
62
62
  position: 'absolute',
63
63
  overflow: 'hidden',
64
64
  width: 'full',
@@ -6,5 +6,4 @@ export interface Props {
6
6
  children: ReactElement | ReactElement[];
7
7
  }
8
8
  export declare const TextContainer: FunctionComponent<Props>;
9
- export default TextContainer;
10
9
  //# sourceMappingURL=TextContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextContainer.d.ts","sourceRoot":"","sources":["../../../lib/components/TextContainer/TextContainer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAKxD,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CACxC;AAED,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAUlD,CAAC;AAWF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"TextContainer.d.ts","sourceRoot":"","sources":["../../../lib/components/TextContainer/TextContainer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAKxD,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CACxC;AAED,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAkBlD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import * as React from 'react';
4
- import { Column, Columns } from "../Columns/index.js";
4
+ import { Box } from "../Box/index.js";
5
5
  import { Stack } from "../Stack/index.js";
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  export const TextContainer = _ref => {
@@ -12,31 +12,19 @@ export const TextContainer = _ref => {
12
12
  action
13
13
  } = _ref;
14
14
  return _jsxs(Stack, {
15
+ as: "article",
15
16
  space: "2",
16
- is: "article",
17
17
  className: className,
18
- children: [_jsx(TextContainerHeading, {
19
- heading: heading,
20
- action: action
18
+ children: [_jsxs(Box, {
19
+ alignItems: "center",
20
+ display: "flex",
21
+ justifyContent: "space-between",
22
+ width: "full",
23
+ children: [_jsx(Box, {
24
+ children: heading
25
+ }), action && _jsx(Box, {
26
+ children: action
27
+ })]
21
28
  }), children]
22
29
  });
23
- };
24
- const TextContainerHeading = _ref2 => {
25
- let {
26
- heading,
27
- action
28
- } = _ref2;
29
- return _jsxs(Columns, {
30
- noWrap: true,
31
- align: "centre",
32
- space: "4",
33
- children: [_jsx(Column, {
34
- grow: true,
35
- children: heading
36
- }), action ? _jsx(Column, {
37
- width: "auto",
38
- children: action
39
- }) : null]
40
- });
41
- };
42
- export default TextContainer;
30
+ };
@@ -4,12 +4,9 @@ import { TextContainer } from '.';
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: React.FunctionComponent<import("./TextContainer").Props>;
7
- decorators: ((story: import("@storybook/core/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
8
- heading?: React.ReactElement | undefined;
9
- action?: React.ReactElement | undefined;
10
- className?: string | undefined;
11
- children: React.ReactElement | React.ReactElement[];
12
- }>) => React.JSX.Element)[];
7
+ args: {
8
+ children: React.JSX.Element;
9
+ };
13
10
  argTypes: {
14
11
  children: {
15
12
  control: {
@@ -1 +1 @@
1
- {"version":3,"file":"TextContainer.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/TextContainer/TextContainer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAiB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAiBjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiB3B,CAAC"}
1
+ {"version":3,"file":"TextContainer.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/TextContainer/TextContainer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAElC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CA8B4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KASjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAC"}
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { AnchorHTMLAttributes, ComponentProps, ElementType, ReactElement, ReactNode } from 'react';
4
4
  import { Text } from '../Text';
5
5
  type TextProps = Omit<ComponentProps<typeof Text>, 'is' | 'colour'>;
6
- type AnchorProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'style' | 'is' | keyof TextProps>;
6
+ type AnchorProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children' | 'color' | 'style' | 'is' | keyof TextProps>;
7
7
  export interface Props extends TextProps, AnchorProps {
8
8
  children?: ReactNode;
9
9
  className?: string;
@@ -12,5 +12,5 @@ export interface Props extends TextProps, AnchorProps {
12
12
  icon?: IconType;
13
13
  }
14
14
  export declare const TextLink: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
15
- export default TextLink;
15
+ export {};
16
16
  //# sourceMappingURL=TextLink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,oBAAoB,EAEpB,cAAc,EAEd,WAAW,EAGX,YAAY,EACZ,SAAS,EACT,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC;AACpE,KAAK,WAAW,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,SAAS,CAC7C,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,WAAW;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,8FAyEpB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,oBAAoB,EAEpB,cAAc,EAEd,WAAW,EAGX,YAAY,EACZ,SAAS,EACT,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,KAAK,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC;AACpE,KAAK,WAAW,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,SAAS,CACvD,CAAC;AAEF,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,WAAW;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,8FAyEpB,CAAC"}
@@ -9,7 +9,7 @@ import { invariant } from '@autoguru/utilities';
9
9
  import clsx from 'clsx';
10
10
  import * as React from 'react';
11
11
  import { cloneElement, createElement, forwardRef, isValidElement } from 'react';
12
- import { Box, useBoxStyles } from "../Box/index.js";
12
+ import { Box, boxStyles } from "../Box/index.js";
13
13
  import { Icon } from "../Icon/index.js";
14
14
  import { Text } from "../Text/index.js";
15
15
  import * as styles from "./TextLink.css.js";
@@ -29,13 +29,13 @@ export const TextLink = forwardRef((_ref, ref) => {
29
29
  props = _objectWithoutProperties(_ref, _excluded);
30
30
  !!(Component !== undefined && props.href !== undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You cannot have both href and as defined.') : invariant(false) : void 0;
31
31
  const body = _jsxs(Text, {
32
- is: "span",
32
+ as: "span",
33
33
  colour: muted ? 'muted' : 'link',
34
34
  size: size,
35
35
  fontWeight: fontWeight,
36
36
  strong: strong,
37
- className: clsx(useBoxStyles({
38
- is: 'span',
37
+ className: clsx(boxStyles({
38
+ as: 'span',
39
39
  pointerEvents: 'none',
40
40
  position: 'relative',
41
41
  paddingRight: icon ? '5' : void 0
@@ -45,8 +45,8 @@ export const TextLink = forwardRef((_ref, ref) => {
45
45
  children: [children, icon ? _jsx(Icon, {
46
46
  icon: icon,
47
47
  size: "small",
48
- display: "inlineBlock",
49
- className: clsx(styles.icon, useBoxStyles({
48
+ display: "inline-block",
49
+ className: clsx(styles.icon, boxStyles({
50
50
  position: 'absolute'
51
51
  }))
52
52
  }) : null]
@@ -58,7 +58,7 @@ export const TextLink = forwardRef((_ref, ref) => {
58
58
  });
59
59
  if (Component === undefined) {
60
60
  return _jsx(Box, _objectSpread(_objectSpread({
61
- is: "a",
61
+ as: "a",
62
62
  className: [className, styles.root]
63
63
  }, allProps), {}, {
64
64
  children: body
@@ -66,4 +66,4 @@ export const TextLink = forwardRef((_ref, ref) => {
66
66
  }
67
67
  return isValidElement(Component) ? cloneElement(Component, allProps, body) : createElement(Component, allProps, body);
68
68
  });
69
- export default TextLink;
69
+ TextLink.displayName = 'TextLink';