@conveyorhq/arrow-ds 2.0.0-beta.7 → 2.0.0-beta.9

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 (181) hide show
  1. package/package.json +15 -14
  2. package/public/components/Accordion/Accordion.js +8 -10
  3. package/public/components/Avatar/Avatar.js +20 -19
  4. package/public/components/Button/Button.js +2 -2
  5. package/public/components/ConveyorLogo/ConveyorLogo.js +6 -6
  6. package/public/components/Drawer/Drawer.js +7 -7
  7. package/public/components/Frame/Frame.d.ts +1 -1
  8. package/public/components/Icon/Icon.d.ts +1 -0
  9. package/public/components/Icon/Icon.js +3 -1
  10. package/public/components/MenuRenderer/MenuRenderer.js +4 -7
  11. package/public/components/Modal/Modal.js +1 -1
  12. package/public/components/OptionButton/OptionButton.js +18 -13
  13. package/public/components/Select/Select.js +4 -4
  14. package/public/components/Select/SelectPopover.js +6 -6
  15. package/public/components/Select/index.d.ts +2 -0
  16. package/public/components/Select/index.js +3 -0
  17. package/public/components/Select/theme.js +22 -22
  18. package/public/components/Svg/Svg.d.ts +3 -3
  19. package/public/components/Svg/Svg.js +1 -2
  20. package/public/components/Tooltip/Tooltip.js +11 -19
  21. package/public/components/VisuallyHidden/VisuallyHidden.d.ts +2 -1
  22. package/public/components/VisuallyHidden/VisuallyHidden.js +3 -5
  23. package/public/css/styles.css +139 -59
  24. package/public/css/styles.min.css +1 -1
  25. package/public/css/styles.min.css.map +1 -1
  26. package/public/hooks/index.d.ts +3 -0
  27. package/public/hooks/index.js +7 -1
  28. package/public/hooks/useMatchMedia.d.ts +1 -0
  29. package/public/hooks/useMatchMedia.js +27 -0
  30. package/public/hooks/usePrefersReducedMotion.d.ts +1 -0
  31. package/public/hooks/usePrefersReducedMotion.js +9 -0
  32. package/public/hooks/useScreenOrientation.d.ts +1 -0
  33. package/public/hooks/useScreenOrientation.js +24 -0
  34. package/public/{style-dictionary → src/style-dictionary}/dist/tokens.css +1 -0
  35. package/public/src/style-dictionary/dist/tokens.d.ts +428 -0
  36. package/public/src/style-dictionary/dist/tokens.js +428 -0
  37. package/public/src/style-dictionary/dist/tokens.module.js +428 -0
  38. package/public/src/style-dictionary/tailwind.config.js +87 -0
  39. package/public/storybook-components/EnumTable.js +2 -1
  40. package/public/storybook-components/Story.d.ts +2 -1
  41. package/public/storybook-components/Story.js +4 -1
  42. package/public/style-dictionary/dist/tokens.d.ts +428 -422
  43. package/public/style-dictionary/dist/tokens.js +415 -416
  44. package/public/style-dictionary/dist/tokens.module.d.ts +431 -0
  45. package/public/style-dictionary/dist/tokens.module.js +412 -415
  46. package/public/style-dictionary/src/border-radius.d.ts +31 -0
  47. package/public/style-dictionary/src/border-radius.js +10 -9
  48. package/public/style-dictionary/src/border-width.d.ts +21 -0
  49. package/public/style-dictionary/src/border-width.js +9 -8
  50. package/public/style-dictionary/src/color.d.ts +249 -0
  51. package/public/style-dictionary/src/color.js +97 -95
  52. package/public/style-dictionary/src/font-size.d.ts +45 -0
  53. package/public/style-dictionary/src/font-size.js +14 -13
  54. package/public/style-dictionary/src/font-weight.d.ts +13 -0
  55. package/public/style-dictionary/src/font-weight.js +6 -5
  56. package/public/style-dictionary/src/height.d.ts +215 -0
  57. package/public/style-dictionary/src/height.js +10 -10
  58. package/public/style-dictionary/src/leading.d.ts +17 -0
  59. package/public/style-dictionary/src/leading.js +7 -6
  60. package/public/style-dictionary/src/screen-width.d.ts +17 -0
  61. package/public/style-dictionary/src/screen-width.js +7 -6
  62. package/public/style-dictionary/src/shadow.d.ts +63 -0
  63. package/public/style-dictionary/src/shadow.js +19 -18
  64. package/public/style-dictionary/src/spacing.d.ts +197 -0
  65. package/public/style-dictionary/src/spacing.js +68 -67
  66. package/public/style-dictionary/src/tracking.d.ts +13 -0
  67. package/public/style-dictionary/src/tracking.js +6 -5
  68. package/public/style-dictionary/src/type.d.ts +13 -0
  69. package/public/style-dictionary/src/type.js +32 -31
  70. package/public/style-dictionary/src/width.d.ts +287 -0
  71. package/public/style-dictionary/src/width.js +29 -29
  72. package/public/style-dictionary/src/z-index.d.ts +53 -0
  73. package/public/style-dictionary/src/z-index.js +20 -19
  74. package/public/style-dictionary/tailwind.config.d.ts +392 -0
  75. package/public/style-dictionary/tailwind.config.js +51 -72
  76. package/src/components/Accordion/Accordion.tsx +39 -27
  77. package/src/components/Avatar/Avatar.tsx +20 -19
  78. package/src/components/Button/Button.tsx +3 -3
  79. package/src/components/Button/index.css +12 -1
  80. package/src/components/Card/Card.story.mdx +45 -37
  81. package/src/components/ConveyorLogo/ConveyorLogo.tsx +6 -6
  82. package/src/components/Drawer/Drawer.tsx +1 -1
  83. package/src/components/Frame/Frame.story.mdx +140 -5
  84. package/src/components/Frame/Frame.tsx +1 -1
  85. package/src/components/Frame/index.css +8 -13
  86. package/src/components/Icon/Icon.tsx +3 -0
  87. package/src/components/MenuRenderer/MenuRenderer.tsx +7 -9
  88. package/src/components/Modal/Modal.tsx +1 -1
  89. package/src/components/Modal/index.css +8 -3
  90. package/src/components/OptionButton/OptionButton.story.mdx +91 -36
  91. package/src/components/OptionButton/OptionButton.tsx +19 -18
  92. package/src/components/OptionButton/index.css +13 -0
  93. package/src/components/Overlay/Overlay.story.mdx +26 -0
  94. package/src/components/Select/Select.tsx +4 -4
  95. package/src/components/Select/SelectPopover.tsx +6 -6
  96. package/src/components/Select/index.ts +14 -0
  97. package/src/components/Select/theme.ts +22 -22
  98. package/src/components/Svg/Svg.story.mdx +36 -0
  99. package/src/components/Svg/Svg.tsx +6 -4
  100. package/src/components/Text/Text.story.mdx +34 -0
  101. package/src/components/Tooltip/Tooltip.story.mdx +21 -0
  102. package/src/components/Tooltip/Tooltip.tsx +23 -27
  103. package/src/components/Tooltip/index.css +31 -0
  104. package/src/components/VisuallyHidden/VisuallyHidden.story.mdx +54 -0
  105. package/src/components/VisuallyHidden/VisuallyHidden.tsx +10 -5
  106. package/src/components/VisuallyHidden/index.css +3 -0
  107. package/src/css/components.css +2 -0
  108. package/src/docs/Colors.story.mdx +13 -13
  109. package/src/docs/Spacing.story.mdx +4 -20
  110. package/src/docs/Tokens.story.mdx +230 -0
  111. package/src/docs/Typography.story.mdx +17 -94
  112. package/src/docs/hooks/useDisclosureHook.story.mdx +58 -0
  113. package/src/docs/hooks/useKeyPressHook.story.mdx +54 -0
  114. package/src/docs/hooks/useMatchMediaHook.story.mdx +42 -0
  115. package/src/docs/hooks/useOutsideClickHook.story.mdx +56 -0
  116. package/src/docs/hooks/usePrefersReducedMotion.story.mdx +61 -0
  117. package/src/docs/hooks/useScreenOrientationHook.story.mdx +56 -0
  118. package/src/docs/hooks/useStepHook.story.mdx +102 -0
  119. package/src/hooks/index.ts +3 -0
  120. package/src/hooks/useMatchMedia.ts +40 -0
  121. package/src/hooks/usePrefersReducedMotion.ts +9 -0
  122. package/src/hooks/useScreenOrientation.ts +27 -0
  123. package/src/storybook-components/EnumTable.tsx +3 -2
  124. package/src/storybook-components/Story.tsx +13 -1
  125. package/src/style-dictionary/dist/tokens.css +378 -0
  126. package/src/style-dictionary/dist/tokens.d.ts +428 -0
  127. package/src/style-dictionary/dist/tokens.js +428 -0
  128. package/src/style-dictionary/dist/tokens.module.js +428 -0
  129. package/src/style-dictionary/src/border-radius.js +11 -0
  130. package/src/style-dictionary/src/border-width.js +10 -0
  131. package/src/style-dictionary/src/color.js +98 -0
  132. package/src/style-dictionary/src/font-size.js +15 -0
  133. package/src/style-dictionary/src/font-weight.js +7 -0
  134. package/src/style-dictionary/src/height.js +13 -0
  135. package/src/style-dictionary/src/leading.js +8 -0
  136. package/src/style-dictionary/src/screen-width.js +8 -0
  137. package/src/style-dictionary/src/shadow.js +19 -0
  138. package/src/style-dictionary/src/spacing.js +69 -0
  139. package/src/style-dictionary/src/tracking.js +7 -0
  140. package/src/style-dictionary/src/type.js +34 -0
  141. package/src/style-dictionary/src/width.js +32 -0
  142. package/src/style-dictionary/src/z-index.js +21 -0
  143. package/src/style-dictionary/tailwind.config.js +87 -0
  144. package/src/tokens/borders.ts +6 -0
  145. package/src/tokens/box-shadow.ts +3 -0
  146. package/src/tokens/colors.ts +6 -0
  147. package/src/tokens/font-family.ts +3 -0
  148. package/src/tokens/font-size.ts +3 -0
  149. package/src/tokens/font-weight.ts +3 -0
  150. package/src/tokens/height.ts +3 -0
  151. package/src/tokens/index.ts +3 -2
  152. package/src/tokens/letter-spacing.ts +3 -0
  153. package/src/tokens/line-height.ts +3 -0
  154. package/src/tokens/margin.ts +3 -0
  155. package/src/tokens/padding.ts +3 -0
  156. package/src/tokens/screens.ts +3 -0
  157. package/src/tokens/sizing-scale.ts +6 -0
  158. package/src/tokens/width.ts +9 -0
  159. package/src/tokens/will-change.ts +3 -0
  160. package/src/tokens/z-index.ts +3 -0
  161. package/src/types/index.ts +3 -0
  162. package/public/components/Overlay/Overlay.story.d.ts +0 -1
  163. package/public/components/Overlay/Overlay.story.js +0 -12
  164. package/public/components/Svg/Svg.story.d.ts +0 -1
  165. package/public/components/Svg/Svg.story.js +0 -14
  166. package/public/components/Text/Text.story.d.ts +0 -1
  167. package/public/components/Text/Text.story.js +0 -31
  168. package/public/components/VisuallyHidden/VisuallyHidden.story.d.ts +0 -1
  169. package/public/components/VisuallyHidden/VisuallyHidden.story.js +0 -36
  170. package/public/components/useStep/ExampleSetupWizard.d.ts +0 -4
  171. package/public/components/useStep/ExampleSetupWizard.js +0 -33
  172. package/src/components/Overlay/Overlay.md +0 -14
  173. package/src/components/Overlay/Overlay.story.tsx +0 -12
  174. package/src/components/Svg/Svg.md +0 -14
  175. package/src/components/Svg/Svg.story.tsx +0 -15
  176. package/src/components/Text/Text.md +0 -14
  177. package/src/components/Text/Text.story.tsx +0 -12
  178. package/src/components/VisuallyHidden/VisuallyHidden.md +0 -23
  179. package/src/components/VisuallyHidden/VisuallyHidden.story.tsx +0 -19
  180. package/src/components/useStep/ExampleSetupWizard.tsx +0 -63
  181. package/src/components/useStep/useStep.story.mdx +0 -76
@@ -148,10 +148,10 @@ export const Button = forwardRef<HTMLElement, ButtonProps>(
148
148
  bem(cn),
149
149
  bem(cn, { m: variant }),
150
150
  bem(cn, { m: theme }),
151
- block ? ["flex", "w-full"] : "inline-flex",
151
+ block && bem(cn, { m: "block" }),
152
152
  getButtonSizeClasses(size, icon, children),
153
153
  depressed && bem(cn, { m: "depressed" }),
154
- isDisabled ? ["opacity-50", "pointer-events-none"] : "",
154
+ isDisabled && bem(cn, { m: "disabled" }),
155
155
  className,
156
156
  );
157
157
 
@@ -184,7 +184,7 @@ export const Button = forwardRef<HTMLElement, ButtonProps>(
184
184
  <Component
185
185
  type={type}
186
186
  className={buttonClassNames}
187
- disabled={disabled}
187
+ disabled={isDisabled}
188
188
  ref={ref}
189
189
  {...propsIfLink}
190
190
  {...rest}
@@ -7,7 +7,8 @@
7
7
  items-center
8
8
  border
9
9
  duration-200
10
- relative;
10
+ relative
11
+ inline-flex;
11
12
  }
12
13
 
13
14
  .ads-Button:focus {
@@ -36,6 +37,16 @@
36
37
  m-auto;
37
38
  }
38
39
 
40
+ .ads-Button--block {
41
+ @apply flex
42
+ w-full;
43
+ }
44
+
45
+ .ads-Button--disabled {
46
+ @apply opacity-50
47
+ pointer-events-none;
48
+ }
49
+
39
50
  /* Button.Group */
40
51
  .ads-ButtonGroup {
41
52
  @apply items-center;
@@ -11,7 +11,7 @@ import { ConveyorLogo } from "../ConveyorLogo";
11
11
  import { Heading } from "../Heading";
12
12
  import { Flex } from "../Flex";
13
13
  import { JUSTIFY } from "../../types";
14
- import { colors } from "../../tokens";
14
+ import { tokens } from "../../style-dictionary/dist/tokens";
15
15
 
16
16
  <Meta title="Components/Data/Card" component={Card} />
17
17
 
@@ -61,7 +61,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
61
61
  <Story name="CardColorGreen">
62
62
  <Card
63
63
  clickable
64
- accentColor={colors.brandGreen["400"]}
64
+ accentColor={tokens.color.brandGreen["400"]}
65
65
  cardSize={250}
66
66
  bodyProps={{ onClick: onCardClick }}
67
67
  bodySlot="Body"
@@ -70,7 +70,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
70
70
  <Story name="CardColorGray">
71
71
  <Card
72
72
  clickable
73
- accentColor={colors.gray["400"]}
73
+ accentColor={tokens.color.gray["400"]}
74
74
  cardSize={250}
75
75
  bodyProps={{ onClick: onCardClick }}
76
76
  bodySlot="Body"
@@ -79,7 +79,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
79
79
  <Story name="CardColorYellow">
80
80
  <Card
81
81
  clickable
82
- accentColor={colors.gold["400"]}
82
+ accentColor={tokens.color.gold["400"]}
83
83
  cardSize={250}
84
84
  bodyProps={{ onClick: onCardClick }}
85
85
  bodySlot="Body"
@@ -88,7 +88,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
88
88
  <Story name="CardColorBlue">
89
89
  <Card
90
90
  clickable
91
- accentColor={colors.blue["400"]}
91
+ accentColor={tokens.color.blue["400"]}
92
92
  cardSize={250}
93
93
  bodyProps={{ onClick: onCardClick }}
94
94
  bodySlot="Body"
@@ -97,7 +97,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
97
97
  <Story name="CardColorPurple">
98
98
  <Card
99
99
  clickable
100
- accentColor={colors.purple["400"]}
100
+ accentColor={tokens.color.purple["400"]}
101
101
  cardSize={250}
102
102
  bodyProps={{ onClick: onCardClick }}
103
103
  bodySlot="Body"
@@ -106,7 +106,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
106
106
  <Story name="CardColorRed">
107
107
  <Card
108
108
  clickable
109
- accentColor={colors.red["400"]}
109
+ accentColor={tokens.color.red["400"]}
110
110
  cardSize={250}
111
111
  bodyProps={{ onClick: onCardClick }}
112
112
  bodySlot="Body"
@@ -118,7 +118,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
118
118
  <Story name="CardColorGreenLeft">
119
119
  <Card
120
120
  clickable
121
- accentColor={colors.brandGreen["400"]}
121
+ accentColor={tokens.color.brandGreen["400"]}
122
122
  accentColorPlacement="left"
123
123
  cardSize={250}
124
124
  bodyProps={{ onClick: onCardClick }}
@@ -128,7 +128,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
128
128
  <Story name="CardColorGrayLeft">
129
129
  <Card
130
130
  clickable
131
- accentColor={colors.gray["400"]}
131
+ accentColor={tokens.color.gray["400"]}
132
132
  accentColorPlacement="left"
133
133
  cardSize={250}
134
134
  bodyProps={{ onClick: onCardClick }}
@@ -138,7 +138,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
138
138
  <Story name="CardColorYellowLeft">
139
139
  <Card
140
140
  clickable
141
- accentColor={colors.gold["400"]}
141
+ accentColor={tokens.color.gold["400"]}
142
142
  accentColorPlacement="left"
143
143
  cardSize={250}
144
144
  bodyProps={{ onClick: onCardClick }}
@@ -148,7 +148,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
148
148
  <Story name="CardColorBlueLeft">
149
149
  <Card
150
150
  clickable
151
- accentColor={colors.blue["400"]}
151
+ accentColor={tokens.color.blue["400"]}
152
152
  accentColorPlacement="left"
153
153
  cardSize={250}
154
154
  bodyProps={{ onClick: onCardClick }}
@@ -158,7 +158,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
158
158
  <Story name="CardColorPurpleLeft">
159
159
  <Card
160
160
  clickable
161
- accentColor={colors.purple["400"]}
161
+ accentColor={tokens.color.purple["400"]}
162
162
  accentColorPlacement="left"
163
163
  cardSize={250}
164
164
  bodyProps={{ onClick: onCardClick }}
@@ -168,7 +168,7 @@ Using the prop `accentColorPlacement`, the accent color can be placed on the top
168
168
  <Story name="CardColorRedLeft">
169
169
  <Card
170
170
  clickable
171
- accentColor={colors.red["400"]}
171
+ accentColor={tokens.color.red["400"]}
172
172
  accentColorPlacement="left"
173
173
  cardSize={250}
174
174
  bodyProps={{ onClick: onCardClick }}
@@ -186,7 +186,7 @@ If content is provided to the `footerSlot` prop, a separate footer section will
186
186
  <Story name="Content1">
187
187
  <Card
188
188
  clickable
189
- accentColor={colors.brandGreen["400"]}
189
+ accentColor={tokens.color.brandGreen["400"]}
190
190
  cardSize={250}
191
191
  bodyProps={{ onClick: onCardClick }}
192
192
  bodySlot={
@@ -207,7 +207,7 @@ If content is provided to the `footerSlot` prop, a separate footer section will
207
207
  <Story name="Content2">
208
208
  <Card
209
209
  clickable
210
- accentColor={colors.brandGreen["400"]}
210
+ accentColor={tokens.color.brandGreen["400"]}
211
211
  accentColorPlacement="left"
212
212
  cardSize={250}
213
213
  bodyProps={{ onClick: onCardClick }}
@@ -239,7 +239,7 @@ Sizing a group of cards should be done using the `Card.Group` component. Size fo
239
239
  <Card
240
240
  clickable
241
241
  cardSize={250}
242
- accentColor={colors.brandGreen["400"]}
242
+ accentColor={tokens.color.brandGreen["400"]}
243
243
  bodyProps={{ onClick: onCardClick }}
244
244
  bodySlot="250"
245
245
  />
@@ -248,7 +248,7 @@ Sizing a group of cards should be done using the `Card.Group` component. Size fo
248
248
  <Card
249
249
  clickable
250
250
  cardSize={250}
251
- accentColor={colors.brandGreen["400"]}
251
+ accentColor={tokens.color.brandGreen["400"]}
252
252
  bodyProps={{ onClick: onCardClick }}
253
253
  bodySlot="250"
254
254
  footerSlot="Footer"
@@ -258,7 +258,7 @@ Sizing a group of cards should be done using the `Card.Group` component. Size fo
258
258
  <Card
259
259
  clickable
260
260
  cardSize={200}
261
- accentColor={colors.brandGreen["400"]}
261
+ accentColor={tokens.color.brandGreen["400"]}
262
262
  bodyProps={{ onClick: onCardClick }}
263
263
  bodySlot="200"
264
264
  />
@@ -267,7 +267,7 @@ Sizing a group of cards should be done using the `Card.Group` component. Size fo
267
267
  <Card
268
268
  clickable
269
269
  cardSize={200}
270
- accentColor={colors.brandGreen["400"]}
270
+ accentColor={tokens.color.brandGreen["400"]}
271
271
  bodyProps={{ onClick: onCardClick }}
272
272
  bodySlot="200"
273
273
  footerSlot="Footer"
@@ -305,7 +305,7 @@ export const Link = ({ to, children, ...rest }) => (
305
305
  <Card
306
306
  clickable
307
307
  cardSize={250}
308
- accentColor={colors.brandGreen["400"]}
308
+ accentColor={tokens.color.brandGreen["400"]}
309
309
  bodySlot={
310
310
  <Flex className="h-full flex-col items-center justify-center gap-y-2">
311
311
  <ConveyorLogo variant="icon" size={20} />
@@ -329,7 +329,7 @@ export const Link = ({ to, children, ...rest }) => (
329
329
  <Card
330
330
  clickable
331
331
  cardSize={250}
332
- accentColor={colors.brandGreen["400"]}
332
+ accentColor={tokens.color.brandGreen["400"]}
333
333
  bodySlot={
334
334
  <Flex className="h-full flex-col items-center justify-center gap-y-2">
335
335
  <ConveyorLogo variant="icon" size={20} />
@@ -359,7 +359,7 @@ export const Link = ({ to, children, ...rest }) => (
359
359
  clickable
360
360
  cardDisabled
361
361
  cardSize={250}
362
- accentColor={colors.brandGreen["400"]}
362
+ accentColor={tokens.color.brandGreen["400"]}
363
363
  bodyProps={{ onClick: onCardClick }}
364
364
  bodySlot={
365
365
  <Flex className="h-full flex-col items-center justify-center gap-y-2">
@@ -381,7 +381,7 @@ export const Link = ({ to, children, ...rest }) => (
381
381
  clickable
382
382
  bodyDisabled
383
383
  cardSize={250}
384
- accentColor={colors.brandGreen["400"]}
384
+ accentColor={tokens.color.brandGreen["400"]}
385
385
  bodyProps={{ onClick: onCardClick }}
386
386
  bodySlot={
387
387
  <Flex className="h-full flex-col items-center justify-center gap-y-2">
@@ -405,16 +405,24 @@ export const Link = ({ to, children, ...rest }) => (
405
405
  <Preview>
406
406
  <Story name="NotClickableGreen">
407
407
  <Card
408
- accentColor={colors.brandGreen["400"]}
408
+ accentColor={tokens.color.brandGreen["400"]}
409
409
  cardSize={250}
410
410
  bodySlot="Body"
411
411
  />
412
412
  </Story>
413
413
  <Story name="NotClickableGray">
414
- <Card accentColor={colors.gray["400"]} cardSize={250} bodySlot="Body" />
414
+ <Card
415
+ accentColor={tokens.color.gray["400"]}
416
+ cardSize={250}
417
+ bodySlot="Body"
418
+ />
415
419
  </Story>
416
420
  <Story name="NotClickableYellow">
417
- <Card accentColor={colors.gold["400"]} cardSize={250} bodySlot="Body" />
421
+ <Card
422
+ accentColor={tokens.color.gold["400"]}
423
+ cardSize={250}
424
+ bodySlot="Body"
425
+ />
418
426
  </Story>
419
427
  </Preview>
420
428
 
@@ -426,7 +434,7 @@ export const Link = ({ to, children, ...rest }) => (
426
434
  isPlaceholder
427
435
  bodyDisabled
428
436
  cardSize={250}
429
- accentColor={colors.gold["400"]}
437
+ accentColor={tokens.color.gold["400"]}
430
438
  bodySlot={
431
439
  <Flex className="h-full flex-col justify-center">
432
440
  <Heading.H2>Conveyor</Heading.H2>
@@ -556,24 +564,24 @@ The default card gap is `20px`. This should be suitable for the majority of use
556
564
  <Card
557
565
  bodySlot="Body"
558
566
  footerSlot="Footer"
559
- accentColor={colors.brandGreen["400"]}
567
+ accentColor={tokens.color.brandGreen["400"]}
560
568
  />
561
569
  <Card
562
570
  bodySlot="Body"
563
571
  footerSlot="Footer"
564
- accentColor={colors.brandGreen["400"]}
572
+ accentColor={tokens.color.brandGreen["400"]}
565
573
  />
566
574
  <Card bodySlot="Body" footerSlot="Footer" />
567
575
  <Card
568
576
  bodySlot="Body"
569
577
  footerSlot="Footer"
570
- accentColor={colors.gold["400"]}
578
+ accentColor={tokens.color.gold["400"]}
571
579
  />
572
580
  <Card bodySlot="Body" footerSlot="Footer" />
573
581
  <Card
574
582
  bodySlot="Body"
575
583
  footerSlot="Footer"
576
- accentColor={colors.brandGreen["400"]}
584
+ accentColor={tokens.color.brandGreen["400"]}
577
585
  />
578
586
  </Card.Group>
579
587
  </Story>
@@ -587,32 +595,32 @@ The default card gap is `20px`. This should be suitable for the majority of use
587
595
  <Card
588
596
  bodySlot="Body"
589
597
  footerSlot="Footer"
590
- accentColor={colors.brandGreen["400"]}
598
+ accentColor={tokens.color.brandGreen["400"]}
591
599
  />
592
600
  <Card
593
601
  bodySlot="Body"
594
602
  footerSlot="Footer"
595
- accentColor={colors.brandGreen["400"]}
603
+ accentColor={tokens.color.brandGreen["400"]}
596
604
  />
597
605
  <Card
598
606
  bodySlot="Body"
599
607
  footerSlot="Footer"
600
- accentColor={colors.gray["400"]}
608
+ accentColor={tokens.color.gray["400"]}
601
609
  />
602
610
  <Card
603
611
  bodySlot="Body"
604
612
  footerSlot="Footer"
605
- accentColor={colors.gold["400"]}
613
+ accentColor={tokens.color.gold["400"]}
606
614
  />
607
615
  <Card
608
616
  bodySlot="Body"
609
617
  footerSlot="Footer"
610
- accentColor={colors.gray["400"]}
618
+ accentColor={tokens.color.gray["400"]}
611
619
  />
612
620
  <Card
613
621
  bodySlot="Body"
614
622
  footerSlot="Footer"
615
- accentColor={colors.brandGreen["400"]}
623
+ accentColor={tokens.color.brandGreen["400"]}
616
624
  />
617
625
  </Card.Group>
618
626
  </Story>
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { THEME } from "../../types";
3
- import { colors } from "../../tokens";
3
+ import { tokens } from "../../style-dictionary/dist/tokens";
4
4
  import { Svg, SvgProps } from "../Svg";
5
5
 
6
6
  const WIDTH = 165;
@@ -25,20 +25,20 @@ export const ConveyorLogo = ({
25
25
  ...rest
26
26
  }: ConveyorLogoProps) => {
27
27
  const wordmarkColor = {
28
- brand: colors.white,
29
- product: colors.conveyor.black,
28
+ brand: tokens.color.white,
29
+ product: tokens.color.brandBlack,
30
30
  };
31
31
 
32
32
  const iconColorFunction = () => {
33
33
  if (monochrome && theme === THEME.PRODUCT) {
34
- return colors.conveyor.black;
34
+ return tokens.color.brandBlack;
35
35
  }
36
36
 
37
37
  if (monochrome && theme === THEME.BRAND) {
38
- return colors.white;
38
+ return tokens.color.white;
39
39
  }
40
40
 
41
- return colors.brandGreen[400];
41
+ return tokens.color.brandGreen[400];
42
42
  };
43
43
 
44
44
  const iconColor = iconColorFunction();
@@ -1,5 +1,5 @@
1
1
  import React, { useContext, useState } from "react";
2
- import { useSpring, animated } from "@react-spring/web";
2
+ import { useSpring, animated } from "react-spring";
3
3
  import classNames from "classnames";
4
4
  import { easeCubicInOut } from "d3-ease";
5
5
 
@@ -39,8 +39,17 @@ area; see templates for more detailed examples.
39
39
  import { Frame } from "@conveyorhq/arrow-ds";
40
40
  ```
41
41
 
42
+ export const NavBar = () => (
43
+ <Flex
44
+ className="bg-gray-100 justify-center items-center text-gray-800 h-full w-15 border-r"
45
+ style={{ width: "60px" }}
46
+ >
47
+ navbar
48
+ </Flex>
49
+ );
50
+
42
51
  export const AppBar = () => (
43
- <Flex className="items-center text-gray-400 h-appbar w-full px-8">
52
+ <Flex className="bg-gray-900 items-center text-gray-400 h-appbar w-full px-8">
44
53
  appbar
45
54
  </Flex>
46
55
  );
@@ -52,7 +61,11 @@ export const TopBar = () => (
52
61
  );
53
62
 
54
63
  export const Main = () => (
55
- <Flex className="text-gray-800 w-full p-8">main</Flex>
64
+ <Flex className="bg-gray-100 text-gray-800 h-full w-full p-8">main</Flex>
65
+ );
66
+
67
+ export const BottomBar = () => (
68
+ <Flex className="bg-white border-t text-gray-800 w-full p-8">bottombar</Flex>
56
69
  );
57
70
 
58
71
  <Preview withSource={SourceState.OPEN}>
@@ -61,9 +74,6 @@ export const Main = () => (
61
74
  <Frame.Area name="appbar">
62
75
  <AppBar />
63
76
  </Frame.Area>
64
- <Frame.Area name="topbar">
65
- <TopBar />
66
- </Frame.Area>
67
77
  <Frame.Area name="main">
68
78
  <ScrollPane>
69
79
  <Main />
@@ -84,3 +94,128 @@ export const Main = () => (
84
94
  `children` and `name` are required.
85
95
 
86
96
  <Props of={Frame.Area} />
97
+
98
+ ### Layouts
99
+
100
+ #### Basic
101
+
102
+ The basic layout shown here is likely the bare minimum that a page should have.
103
+
104
+ <Preview withSource={SourceState.OPEN}>
105
+ <Story name="Frame basic">
106
+ <Frame>
107
+ <Frame.Area name="appbar">
108
+ <AppBar />
109
+ </Frame.Area>
110
+ <Frame.Area name="main">
111
+ <ScrollPane>
112
+ <Main />
113
+ </ScrollPane>
114
+ </Frame.Area>
115
+ </Frame>
116
+ </Story>
117
+ </Preview>
118
+
119
+ #### With a topbar
120
+
121
+ The topbar area is generally used for the TopBar component, which contains
122
+ breadcrumbs and different page-level actions. This is the most common layout.
123
+
124
+ <Preview withSource={SourceState.OPEN}>
125
+ <Story name="Frame topbar">
126
+ <Frame>
127
+ <Frame.Area name="appbar">
128
+ <AppBar />
129
+ </Frame.Area>
130
+ <Frame.Area name="topbar">
131
+ <TopBar leftSlot="topbar" />
132
+ </Frame.Area>
133
+ <Frame.Area name="main">
134
+ <ScrollPane>
135
+ <Main />
136
+ </ScrollPane>
137
+ </Frame.Area>
138
+ </Frame>
139
+ </Story>
140
+ </Preview>
141
+
142
+ #### With a bottombar
143
+
144
+ The bottombar area was introduced to display a cookie consent banner within
145
+ comply-ui. The bottombar area currently has no use outside of that.
146
+
147
+ <Preview withSource={SourceState.OPEN}>
148
+ <Story name="Frame bottombar">
149
+ <Frame>
150
+ <Frame.Area name="appbar">
151
+ <AppBar />
152
+ </Frame.Area>
153
+ <Frame.Area name="topbar">
154
+ <TopBar leftSlot="topbar" />
155
+ </Frame.Area>
156
+ <Frame.Area name="main">
157
+ <ScrollPane>
158
+ <Main />
159
+ </ScrollPane>
160
+ </Frame.Area>
161
+ <Frame.Area name="bottombar">
162
+ <BottomBar />
163
+ </Frame.Area>
164
+ </Frame>
165
+ </Story>
166
+ </Preview>
167
+
168
+ #### With a navbar
169
+
170
+ The navbar area is used to display additional app-wide navigation controls
171
+ horizontally on the left-side of the frame. It can be used with or without the
172
+ appbar area.
173
+
174
+ <Preview withSource={SourceState.OPEN}>
175
+ <Story name="Frame navbar">
176
+ <Frame>
177
+ <Frame.Area name="navbar">
178
+ <NavBar />
179
+ </Frame.Area>
180
+ <Frame.Area name="appbar">
181
+ <AppBar />
182
+ </Frame.Area>
183
+ <Frame.Area name="topbar">
184
+ <TopBar leftSlot="topbar" />
185
+ </Frame.Area>
186
+ <Frame.Area name="main">
187
+ <ScrollPane>
188
+ <Main />
189
+ </ScrollPane>
190
+ </Frame.Area>
191
+ </Frame>
192
+ </Story>
193
+ </Preview>
194
+
195
+ #### All areas
196
+
197
+ This example just shows all of the possible areas in one layout.
198
+
199
+ <Preview withSource={SourceState.OPEN}>
200
+ <Story name="Frame all">
201
+ <Frame>
202
+ <Frame.Area name="navbar">
203
+ <NavBar />
204
+ </Frame.Area>
205
+ <Frame.Area name="appbar">
206
+ <AppBar />
207
+ </Frame.Area>
208
+ <Frame.Area name="topbar">
209
+ <TopBar leftSlot="topbar" />
210
+ </Frame.Area>
211
+ <Frame.Area name="main">
212
+ <ScrollPane>
213
+ <Main />
214
+ </ScrollPane>
215
+ </Frame.Area>
216
+ <Frame.Area name="bottombar">
217
+ <BottomBar />
218
+ </Frame.Area>
219
+ </Frame>
220
+ </Story>
221
+ </Preview>
@@ -5,7 +5,7 @@ import { Grid } from "../Grid";
5
5
 
6
6
  const cn = bemHOF("Frame");
7
7
 
8
- type FrameAreaName = "appbar" | "topbar" | "main" | "bottombar";
8
+ type FrameAreaName = "navbar" | "appbar" | "topbar" | "main" | "bottombar";
9
9
 
10
10
  interface FrameProps {
11
11
  children: ReactNode;
@@ -1,23 +1,21 @@
1
1
  .ads-Frame {
2
- @apply bg-gray-100
3
- h-screen;
2
+ @apply h-screen;
4
3
 
5
- grid-template-columns: [full] 1fr;
6
- grid-template-rows: [appbar] auto [topbar] auto [main] 1fr [bottombar] auto;
4
+ grid-template-columns: [navbar] auto [full] 1fr [column-end];
5
+ grid-template-rows: [appbar] auto [topbar] auto [main] 1fr [bottombar] auto [row-end];
7
6
  }
8
7
 
9
- .ads-Frame-appbar {
10
- @apply bg-gray-900
11
- h-full;
8
+ .ads-Frame-navbar {
9
+ grid-column: navbar;
10
+ grid-row: appbar / row-end;
11
+ }
12
12
 
13
+ .ads-Frame-appbar {
13
14
  grid-column: full;
14
15
  grid-row: appbar;
15
16
  }
16
17
 
17
18
  .ads-Frame-topbar {
18
- @apply bg-white
19
- h-full;
20
-
21
19
  grid-column: full;
22
20
  grid-row: topbar;
23
21
  }
@@ -31,9 +29,6 @@
31
29
  }
32
30
 
33
31
  .ads-Frame-bottombar {
34
- @apply bg-white
35
- h-full;
36
-
37
32
  grid-column: full;
38
33
  grid-row: bottombar;
39
34
  }
@@ -111,6 +111,7 @@ import { faThumbsUp as faThumbsUpSolid } from "@fortawesome/free-solid-svg-icons
111
111
  import { faTicketAlt } from "@fortawesome/free-solid-svg-icons/faTicketAlt";
112
112
  import { faTimes } from "@fortawesome/free-solid-svg-icons/faTimes";
113
113
  import { faTrash } from "@fortawesome/free-solid-svg-icons/faTrash";
114
+ import { faUnlock } from "@fortawesome/free-solid-svg-icons/faUnlock";
114
115
  import { faUser } from "@fortawesome/free-solid-svg-icons/faUser";
115
116
  import { faUserAstronaut } from "@fortawesome/free-solid-svg-icons/faUserAstronaut";
116
117
  import { faUserPlus } from "@fortawesome/free-solid-svg-icons/faUserPlus";
@@ -240,6 +241,7 @@ library.add(
240
241
  faTimes,
241
242
  faTimesCircle,
242
243
  faTrash,
244
+ faUnlock,
243
245
  faUser,
244
246
  faUserAstronaut,
245
247
  faUserPlus,
@@ -369,6 +371,7 @@ export enum ICON_TYPE {
369
371
  THUMBS_DOWN = "thumbs-down",
370
372
  THUMBS_UP = "thumbs-up",
371
373
  TRASH = "trash",
374
+ UNLOCK = "unlock",
372
375
  USER = "user",
373
376
  USER_ASTRONAUT = "user-astronaut",
374
377
  USER_PLUS = "user-plus",
@@ -8,7 +8,7 @@ import React, {
8
8
  import { useId } from "@reach/auto-id";
9
9
  import FocusLock from "react-focus-lock";
10
10
  import { usePopper } from "react-popper";
11
- import { animated, useTransition } from "@react-spring/web";
11
+ import { animated, useTransition } from "react-spring";
12
12
  import { easeCubicInOut } from "d3-ease";
13
13
  import { useDisclosure, useKeyPress, useOutsideClick } from "../../hooks";
14
14
  import { KEY_CODE, PopperPlacement } from "../../types";
@@ -207,7 +207,7 @@ export const MenuRenderer = ({
207
207
 
208
208
  const PortalComponent = hasPortal ? Portal : Fragment;
209
209
 
210
- const transitions = useTransition(isOpen, {
210
+ const transitions = useTransition(isOpen, null, {
211
211
  from: TRANSITION_START,
212
212
  enter: TRANSITION_END,
213
213
  leave: TRANSITION_START,
@@ -220,10 +220,10 @@ export const MenuRenderer = ({
220
220
  return (
221
221
  <Box className={className} ref={menuElement} {...rest}>
222
222
  <Box ref={setReferenceElement}>{trigger(triggerProps, triggerState)}</Box>
223
- {transitions(
224
- ({ opacity, transform }, item) =>
223
+ {transitions.map(
224
+ ({ item, key, props: transitionProps }) =>
225
225
  item && (
226
- <PortalComponent>
226
+ <PortalComponent key={key}>
227
227
  <MenuContext.Provider value={context}>
228
228
  <Box
229
229
  className={hasPortal ? "z-toast" : "z-menu"}
@@ -233,10 +233,8 @@ export const MenuRenderer = ({
233
233
  >
234
234
  <FocusLock autoFocus={autoFocus}>
235
235
  <animated.div
236
- style={{
237
- opacity,
238
- transform,
239
- }}
236
+ key={key}
237
+ style={transitionProps}
240
238
  ref={menuListElement}
241
239
  >
242
240
  {typeof children === "function"