@autoguru/overdrive 4.1.18 → 4.2.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.
- package/CHANGELOG.md +6 -0
- package/dist/components/NumberBubble/NumberBubble.css.d.ts +2 -0
- package/dist/components/NumberBubble/NumberBubble.css.d.ts.map +1 -0
- package/dist/components/NumberBubble/NumberBubble.css.js +6 -0
- package/dist/components/NumberBubble/NumberBubble.d.ts +9 -0
- package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -0
- package/dist/components/NumberBubble/NumberBubble.js +12 -0
- package/dist/components/NumberBubble/index.d.ts +2 -0
- package/dist/components/NumberBubble/index.d.ts.map +1 -0
- package/dist/components/NumberBubble/index.js +1 -0
- package/dist/components/NumberBubble/stories.js +27 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberBubble.css.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberBubble/NumberBubble.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,QAIrB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from 'react';
|
|
2
|
+
import { Box } from '../Box';
|
|
3
|
+
import { Text } from '../Text';
|
|
4
|
+
export interface Props extends Omit<ComponentProps<typeof Box>, 'borderRadius' | 'position' | 'padding'> {
|
|
5
|
+
value: number;
|
|
6
|
+
textColour: ComponentProps<typeof Text>['colour'];
|
|
7
|
+
}
|
|
8
|
+
export declare const NumberBubble: FunctionComponent<Props>;
|
|
9
|
+
//# sourceMappingURL=NumberBubble.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberBubble/NumberBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAgB,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;IACvG,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,KAAK,CA2BjD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Box, useBoxStyles } from '../Box';
|
|
4
|
+
import { Text } from '../Text';
|
|
5
|
+
import * as styles from './NumberBubble.css';
|
|
6
|
+
export const NumberBubble = ({ value, textColour = 'white', ...boxProps }) => {
|
|
7
|
+
const largeBubble = value > 10 || value < 0;
|
|
8
|
+
return (React.createElement(Box, { borderRadius: 'full', backgroundColour: 'gray900', display: 'inlineBlock', position: 'relative', padding: largeBubble ? '3' : '2', ...boxProps },
|
|
9
|
+
React.createElement(Text, { size: '2', strong: true, className: clsx(styles.bubbleText, useBoxStyles({
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
})), colour: textColour }, value)));
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberBubble/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NumberBubble } from './NumberBubble';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { boxArgTypes } from "../Box/argTypes.js";
|
|
11
|
+
import { NumberBubble } from "./index.js";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Foundation/Typography/NumberBubble',
|
|
15
|
+
component: NumberBubble,
|
|
16
|
+
argTypes: {
|
|
17
|
+
paddingX: boxArgTypes.paddingX
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const template = args => _jsx(NumberBubble, _objectSpread({}, args));
|
|
22
|
+
|
|
23
|
+
const standardProps = {
|
|
24
|
+
value: 0
|
|
25
|
+
};
|
|
26
|
+
export const standard = template.bind(standardProps);
|
|
27
|
+
standard.args = standardProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAA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