@atlaskit/ds-explorations 0.1.2 → 0.1.4

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.
@@ -69,7 +69,7 @@ export default InteractionSurface;
69
69
 
70
70
  /**
71
71
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
72
- * @codegen <<SignedSource::45000716488a9f41306a232c1f4c9f8d>>
72
+ * @codegen <<SignedSource::6d0e1f52b0e3002ea607eb6a00d90b03>>
73
73
  * @codegenId interactions
74
74
  * @codegenCommand yarn codegen-styles
75
75
  * @codegenParams ["background"]
@@ -151,6 +151,15 @@ const backgroundActiveColorMap = {
151
151
  backgroundColor: token('color.background.information.bold.pressed'),
152
152
  },
153
153
  }),
154
+ 'elevation.surface': css({
155
+ ':active': { backgroundColor: token('elevation.surface.pressed') },
156
+ }),
157
+ 'elevation.surface.raised': css({
158
+ ':active': { backgroundColor: token('elevation.surface.raised.pressed') },
159
+ }),
160
+ 'elevation.surface.overlay': css({
161
+ ':active': { backgroundColor: token('elevation.surface.overlay.pressed') },
162
+ }),
154
163
  };
155
164
 
156
165
  const backgroundHoverColorMap = {
@@ -228,6 +237,15 @@ const backgroundHoverColorMap = {
228
237
  backgroundColor: token('color.background.information.bold.hovered'),
229
238
  },
230
239
  }),
240
+ 'elevation.surface': css({
241
+ ':hover': { backgroundColor: token('elevation.surface.hovered') },
242
+ }),
243
+ 'elevation.surface.raised': css({
244
+ ':hover': { backgroundColor: token('elevation.surface.raised.hovered') },
245
+ }),
246
+ 'elevation.surface.overlay': css({
247
+ ':hover': { backgroundColor: token('elevation.surface.overlay.hovered') },
248
+ }),
231
249
  };
232
250
 
233
251
  type InteractionBackgroundColor = keyof typeof backgroundHoverColorMap;
@@ -142,8 +142,7 @@ const Text: FC<TextProps> = ({
142
142
  }: TextProps) => {
143
143
  const surface = useSurface();
144
144
  // @ts-ignore
145
- const [color = colorMap[surface] ?? 'color.text', fallback] =
146
- colorTuple || [];
145
+ const [color = colorMap[surface], fallback] = colorTuple || [];
147
146
  invariant(
148
147
  asAllowlist.includes(Component),
149
148
  `@atlaskit/ds-explorations: Text received an invalid "as" value of "${Component}"`,