@rango-dev/ui 0.17.1-next.4 → 0.17.1-next.6
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/dist/index.js +6 -6
- package/dist/index.js.map +4 -4
- package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/index.d.ts +0 -1
- package/dist/widget/ui/src/components/index.d.ts.map +1 -1
- package/package.json +1 -3
- package/src/components/BestRoute/BestRoute.styles.ts +1 -0
- package/src/components/index.ts +0 -1
- package/dist/widget/ui/src/components/ColorPicker/ColorPicker.d.ts +0 -10
- package/dist/widget/ui/src/components/ColorPicker/ColorPicker.d.ts.map +0 -1
- package/dist/widget/ui/src/components/ColorPicker/ColorPicker.stories.d.ts +0 -6
- package/dist/widget/ui/src/components/ColorPicker/ColorPicker.stories.d.ts.map +0 -1
- package/dist/widget/ui/src/components/ColorPicker/index.d.ts +0 -2
- package/dist/widget/ui/src/components/ColorPicker/index.d.ts.map +0 -1
- package/src/components/ColorPicker/ColorPicker.stories.tsx +0 -46
- package/src/components/ColorPicker/ColorPicker.tsx +0 -107
- package/src/components/ColorPicker/index.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BestRoute.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/BestRoute/BestRoute.styles.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"BestRoute.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/BestRoute/BestRoute.styles.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAM3D,eAAO,MAAM,qCAAqC,MAAM,CAAC;AAEzD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAKpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAU9B,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAMpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,mB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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/ui",
|
|
3
|
-
"version": "0.17.1-next.
|
|
3
|
+
"version": "0.17.1-next.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -65,9 +65,7 @@
|
|
|
65
65
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
66
66
|
"@rango-dev/wallets-shared": "^0.17.0",
|
|
67
67
|
"@stitches/react": "^1.2.8",
|
|
68
|
-
"@types/react-color": "^3.0.6",
|
|
69
68
|
"rango-sdk": "^0.1.35",
|
|
70
|
-
"react-color": "^2.19.3",
|
|
71
69
|
"react-virtualized-auto-sizer": "^1.0.7",
|
|
72
70
|
"react-window": "^1.8.8",
|
|
73
71
|
"react-window-infinite-loader": "^1.0.8",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
2
|
|
|
3
3
|
import { darkTheme, styled } from '../../theme';
|
|
4
|
+
import { Image } from '../common';
|
|
4
5
|
import { CollapsibleContent } from '../common/styles';
|
|
5
6
|
|
|
6
7
|
export const EXPANDABLE_ROUTES_TRANSITION_DURATION = 300;
|
package/src/components/index.ts
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface PropTypes {
|
|
3
|
-
color?: string;
|
|
4
|
-
place: 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
-
onChangeColor: (color?: string) => void;
|
|
6
|
-
label?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function ColorPicker({ color, onChangeColor, label, place, placeholder, }: PropTypes): React.JSX.Element;
|
|
10
|
-
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA6CxC,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AASD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,KAAK,EACL,KAAK,EACL,WAAW,GACZ,EAAE,SAAS,qBAwCX"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PropTypes } from './ColorPicker';
|
|
3
|
-
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, PropTypes>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Main: (args: PropTypes) => React.JSX.Element;
|
|
6
|
-
//# sourceMappingURL=ColorPicker.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ColorPicker/ColorPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAe,SAAS,EAAE,MAAM,eAAe,CAAC;;AAEvD,wBAmB8B;AAE9B,eAAO,MAAM,IAAI,SAAU,SAAS,sBAoBnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ColorPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Meta } from '@storybook/react';
|
|
3
|
-
import { ColorPicker, PropTypes } from './ColorPicker';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/ColorPicker',
|
|
7
|
-
component: ColorPicker,
|
|
8
|
-
args: {
|
|
9
|
-
place: 'left',
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
place: {
|
|
13
|
-
name: 'place',
|
|
14
|
-
control: { type: 'select' },
|
|
15
|
-
options: ['top', 'bottom', 'left', 'right'],
|
|
16
|
-
defaultValue: 'top',
|
|
17
|
-
},
|
|
18
|
-
placeholder: {
|
|
19
|
-
name: 'placeholder',
|
|
20
|
-
control: { type: 'text' },
|
|
21
|
-
defaultValue: 'Choose a color',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
} as Meta<typeof ColorPicker>;
|
|
25
|
-
|
|
26
|
-
export const Main = (args: PropTypes) => {
|
|
27
|
-
const [color, setColor] = useState<string | undefined>('#5FA425');
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
style={{
|
|
31
|
-
height: 400,
|
|
32
|
-
display: 'flex',
|
|
33
|
-
justifyContent: 'center',
|
|
34
|
-
alignItems: 'center',
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
<ColorPicker
|
|
38
|
-
{...args}
|
|
39
|
-
color={color}
|
|
40
|
-
onChangeColor={(color) => {
|
|
41
|
-
console.log(color);
|
|
42
|
-
setColor(color)}}
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { ChromePicker } from 'react-color';
|
|
3
|
-
import rgbHex from 'rgb-hex';
|
|
4
|
-
|
|
5
|
-
import { styled } from '../../theme';
|
|
6
|
-
import { Button } from '../Button';
|
|
7
|
-
import { CloseIcon } from '../Icon';
|
|
8
|
-
|
|
9
|
-
const Container = styled('div', {
|
|
10
|
-
position: 'relative',
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const Color = styled('div', {
|
|
14
|
-
border: '1px solid $background',
|
|
15
|
-
borderRadius: '$xs',
|
|
16
|
-
width: '$32',
|
|
17
|
-
height: '$32',
|
|
18
|
-
});
|
|
19
|
-
const Cover = styled('div', {
|
|
20
|
-
position: 'fixed',
|
|
21
|
-
top: '0px',
|
|
22
|
-
right: '0px',
|
|
23
|
-
bottom: '0px',
|
|
24
|
-
left: '0px',
|
|
25
|
-
});
|
|
26
|
-
const Popover = styled('div', {
|
|
27
|
-
position: 'absolute',
|
|
28
|
-
zIndex: '2',
|
|
29
|
-
variants: {
|
|
30
|
-
place: {
|
|
31
|
-
top: {
|
|
32
|
-
top: '-241px',
|
|
33
|
-
},
|
|
34
|
-
bottom: {},
|
|
35
|
-
left: {
|
|
36
|
-
top: '-50%',
|
|
37
|
-
left: '-225px',
|
|
38
|
-
},
|
|
39
|
-
right: {
|
|
40
|
-
top: '-50%',
|
|
41
|
-
right: '-225px',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
export interface PropTypes {
|
|
47
|
-
color?: string;
|
|
48
|
-
place: 'top' | 'bottom' | 'left' | 'right';
|
|
49
|
-
onChangeColor: (color?: string) => void;
|
|
50
|
-
label?: string;
|
|
51
|
-
placeholder?: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const Label = styled('label', {
|
|
55
|
-
display: 'inline-block',
|
|
56
|
-
fontSize: '$14',
|
|
57
|
-
marginBottom: '$4',
|
|
58
|
-
color: '$foreground',
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export function ColorPicker({
|
|
62
|
-
color,
|
|
63
|
-
onChangeColor,
|
|
64
|
-
label,
|
|
65
|
-
place,
|
|
66
|
-
placeholder,
|
|
67
|
-
}: PropTypes) {
|
|
68
|
-
const [displayColorPicker, setDisplayColorPicker] = useState<boolean>(false);
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<Container>
|
|
72
|
-
<Label className="_text">{label}</Label>
|
|
73
|
-
<Button
|
|
74
|
-
variant="outlined"
|
|
75
|
-
prefix={<Color style={{ backgroundColor: color }} />}
|
|
76
|
-
fullWidth
|
|
77
|
-
size="large"
|
|
78
|
-
suffix={
|
|
79
|
-
color && (
|
|
80
|
-
<div
|
|
81
|
-
onClick={(e) => {
|
|
82
|
-
e.stopPropagation();
|
|
83
|
-
onChangeColor(undefined);
|
|
84
|
-
}}>
|
|
85
|
-
<CloseIcon size={20} />
|
|
86
|
-
</div>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
onClick={() => setDisplayColorPicker((prev) => !prev)}>
|
|
90
|
-
{color || placeholder}
|
|
91
|
-
</Button>
|
|
92
|
-
|
|
93
|
-
{displayColorPicker && (
|
|
94
|
-
<Popover place={place}>
|
|
95
|
-
<Cover onClick={() => setDisplayColorPicker(false)} />
|
|
96
|
-
<ChromePicker
|
|
97
|
-
color={color}
|
|
98
|
-
onChange={(c) => {
|
|
99
|
-
const color = '#' + rgbHex(c.rgb.r, c.rgb.g, c.rgb.b, c.rgb.a);
|
|
100
|
-
onChangeColor(color);
|
|
101
|
-
}}
|
|
102
|
-
/>
|
|
103
|
-
</Popover>
|
|
104
|
-
)}
|
|
105
|
-
</Container>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ColorPicker } from './ColorPicker';
|