baseui 10.8.0 → 10.9.2
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/a11y/a11y.js +2 -2
- package/a11y/a11y.js.flow +3 -3
- package/button/styled-components.js +47 -18
- package/button/styled-components.js.flow +25 -5
- package/combobox/combobox.js +6 -3
- package/combobox/combobox.js.flow +4 -2
- package/combobox/types.js.flow +2 -0
- package/data-table/column-categorical.js +1 -1
- package/data-table/column-categorical.js.flow +2 -2
- package/data-table/column-numerical.js +1 -1
- package/data-table/column-numerical.js.flow +3 -3
- package/datepicker/styled-components.js +1 -1
- package/datepicker/styled-components.js.flow +4 -1
- package/drawer/drawer.js +3 -1
- package/drawer/drawer.js.flow +7 -1
- package/es/a11y/a11y.js +2 -2
- package/es/button/styled-components.js +32 -2
- package/es/combobox/combobox.js +6 -3
- package/es/data-table/column-categorical.js +2 -2
- package/es/data-table/column-numerical.js +2 -2
- package/es/datepicker/styled-components.js +1 -1
- package/es/drawer/drawer.js +3 -1
- package/es/form-control/form-control.js +58 -7
- package/es/form-control/styled-components.js +27 -6
- package/es/index.js +1 -1
- package/es/map-marker/badge-enhancer.js +61 -0
- package/es/map-marker/constants.js +146 -2
- package/es/map-marker/drag-shadow.js +32 -0
- package/es/map-marker/fixed-marker.js +54 -48
- package/es/map-marker/floating-marker.js +21 -12
- package/es/map-marker/index.js +1 -1
- package/es/map-marker/label-enhancer.js +39 -0
- package/es/map-marker/needle.js +26 -0
- package/es/map-marker/pin-head.js +42 -40
- package/es/map-marker/styled-components.js +177 -32
- package/es/map-marker/types.js +1 -1
- package/es/menu/maybe-child-menu.js +0 -2
- package/es/menu/nested-menus.js +49 -3
- package/es/menu/stateful-container.js +13 -12
- package/es/modal/modal.js +3 -1
- package/es/popover/popover.js +4 -2
- package/es/progress-bar/index.js +1 -1
- package/es/progress-bar/progressbar.js +25 -10
- package/es/progress-bar/styled-components.js +9 -5
- package/es/select/select-component.js +2 -10
- package/es/spinner/styled-components.js +34 -16
- package/es/table/filter.js +3 -1
- package/es/themes/dark-theme/color-component-tokens.js +4 -0
- package/es/themes/light-theme/color-component-tokens.js +4 -0
- package/es/timezonepicker/timezone-picker.js +55 -36
- package/es/timezonepicker/tzdata.js +2 -0
- package/es/timezonepicker/update-tzdata.js +69 -0
- package/esm/a11y/a11y.js +3 -3
- package/esm/button/styled-components.js +47 -18
- package/esm/combobox/combobox.js +6 -3
- package/esm/data-table/column-categorical.js +2 -2
- package/esm/data-table/column-numerical.js +2 -2
- package/esm/datepicker/styled-components.js +1 -1
- package/esm/drawer/drawer.js +3 -1
- package/esm/form-control/form-control.js +60 -9
- package/esm/form-control/styled-components.js +23 -3
- package/esm/index.js +1 -1
- package/esm/map-marker/badge-enhancer.js +79 -0
- package/esm/map-marker/constants.js +94 -4
- package/esm/map-marker/drag-shadow.js +53 -0
- package/esm/map-marker/fixed-marker.js +84 -80
- package/esm/map-marker/floating-marker.js +22 -13
- package/esm/map-marker/index.js +1 -1
- package/esm/map-marker/label-enhancer.js +60 -0
- package/esm/map-marker/needle.js +43 -0
- package/esm/map-marker/pin-head.js +77 -66
- package/esm/map-marker/styled-components.js +182 -51
- package/esm/map-marker/types.js +1 -1
- package/esm/menu/maybe-child-menu.js +0 -2
- package/esm/menu/nested-menus.js +66 -5
- package/esm/menu/stateful-container.js +15 -13
- package/esm/modal/modal.js +3 -1
- package/esm/popover/popover.js +4 -2
- package/esm/progress-bar/index.js +1 -1
- package/esm/progress-bar/progressbar.js +32 -10
- package/esm/progress-bar/styled-components.js +9 -4
- package/esm/select/select-component.js +2 -11
- package/esm/spinner/styled-components.js +35 -16
- package/esm/table/filter.js +3 -1
- package/esm/themes/dark-theme/color-component-tokens.js +4 -0
- package/esm/themes/light-theme/color-component-tokens.js +4 -0
- package/esm/timezonepicker/timezone-picker.js +66 -36
- package/esm/timezonepicker/tzdata.js +2 -0
- package/esm/timezonepicker/update-tzdata.js +160 -0
- package/form-control/form-control.js +61 -8
- package/form-control/form-control.js.flow +82 -10
- package/form-control/index.d.ts +1 -0
- package/form-control/styled-components.js +27 -5
- package/form-control/styled-components.js.flow +25 -3
- package/form-control/types.js.flow +20 -8
- package/index.js +6 -0
- package/index.js.flow +1 -1
- package/map-marker/badge-enhancer.js +90 -0
- package/map-marker/badge-enhancer.js.flow +86 -0
- package/map-marker/constants.js +103 -5
- package/map-marker/constants.js.flow +152 -0
- package/map-marker/drag-shadow.js +64 -0
- package/map-marker/drag-shadow.js.flow +52 -0
- package/map-marker/fixed-marker.js +84 -78
- package/map-marker/fixed-marker.js.flow +78 -66
- package/map-marker/floating-marker.js +22 -13
- package/map-marker/floating-marker.js.flow +30 -17
- package/map-marker/index.d.ts +125 -24
- package/map-marker/index.js +18 -0
- package/map-marker/index.js.flow +3 -0
- package/map-marker/label-enhancer.js +71 -0
- package/map-marker/label-enhancer.js.flow +63 -0
- package/map-marker/needle.js +54 -0
- package/map-marker/needle.js.flow +29 -0
- package/map-marker/pin-head.js +80 -69
- package/map-marker/pin-head.js.flow +122 -84
- package/map-marker/styled-components.js +200 -62
- package/map-marker/styled-components.js.flow +172 -22
- package/map-marker/types.js.flow +69 -20
- package/menu/index.d.ts +9 -4
- package/menu/maybe-child-menu.js +0 -2
- package/menu/maybe-child-menu.js.flow +0 -2
- package/menu/nested-menus.js +66 -5
- package/menu/nested-menus.js.flow +50 -5
- package/menu/stateful-container.js +15 -13
- package/menu/stateful-container.js.flow +19 -13
- package/menu/types.js.flow +7 -1
- package/modal/modal.js +3 -1
- package/modal/modal.js.flow +2 -0
- package/package.json +4 -4
- package/popover/popover.js +4 -2
- package/popover/popover.js.flow +3 -1
- package/progress-bar/index.d.ts +2 -0
- package/progress-bar/index.js +6 -0
- package/progress-bar/index.js.flow +1 -0
- package/progress-bar/progressbar.js +32 -10
- package/progress-bar/progressbar.js.flow +35 -9
- package/progress-bar/styled-components.js +9 -4
- package/progress-bar/styled-components.js.flow +15 -4
- package/progress-bar/types.js.flow +12 -2
- package/select/select-component.js +2 -11
- package/select/select-component.js.flow +5 -7
- package/spinner/styled-components.js +35 -16
- package/spinner/styled-components.js.flow +37 -19
- package/spinner/types.js.flow +10 -0
- package/styles/index.js.flow +1 -1
- package/table/filter.js +3 -1
- package/table/filter.js.flow +5 -1
- package/themes/dark-theme/color-component-tokens.js +4 -0
- package/themes/dark-theme/color-component-tokens.js.flow +4 -0
- package/themes/light-theme/color-component-tokens.js +4 -0
- package/themes/light-theme/color-component-tokens.js.flow +4 -0
- package/themes/types.js.flow +4 -0
- package/timezonepicker/timezone-picker.js +71 -41
- package/timezonepicker/timezone-picker.js.flow +55 -46
- package/timezonepicker/types.js.flow +6 -1
- package/timezonepicker/tzdata.js +10 -0
- package/timezonepicker/tzdata.js.flow +347 -0
- package/timezonepicker/update-tzdata.js +164 -0
- package/timezonepicker/update-tzdata.js.flow +70 -0
|
@@ -11,10 +11,16 @@ import {getOverride, getOverrideProps} from '../helpers/overrides.js';
|
|
|
11
11
|
import {UIDConsumer} from 'react-uid';
|
|
12
12
|
import {
|
|
13
13
|
Label as StyledLabel,
|
|
14
|
+
LabelEndEnhancer as StyledLabelEndEnhancer,
|
|
15
|
+
LabelContainer as StyledLabelContainer,
|
|
14
16
|
Caption as StyledCaption,
|
|
15
17
|
ControlContainer as StyledControlContainer,
|
|
16
18
|
} from './styled-components.js';
|
|
17
|
-
import type {
|
|
19
|
+
import type {
|
|
20
|
+
FormControlPropsT,
|
|
21
|
+
FormControlStateT,
|
|
22
|
+
StylePropsT,
|
|
23
|
+
} from './types.js';
|
|
18
24
|
|
|
19
25
|
function chooseRenderedHint(caption, error, positive, sharedProps) {
|
|
20
26
|
if (error && typeof error !== 'boolean') {
|
|
@@ -41,12 +47,15 @@ export default class FormControl extends React.Component<
|
|
|
41
47
|
label: null,
|
|
42
48
|
caption: null,
|
|
43
49
|
disabled: false,
|
|
50
|
+
counter: false,
|
|
44
51
|
};
|
|
45
52
|
|
|
46
53
|
render() {
|
|
47
54
|
const {
|
|
48
55
|
overrides: {
|
|
49
56
|
Label: LabelOverride,
|
|
57
|
+
LabelEndEnhancer: LabelEndEnhancerOverride,
|
|
58
|
+
LabelContainer: LabelContainerOverride,
|
|
50
59
|
Caption: CaptionOverride,
|
|
51
60
|
ControlContainer: ControlContainerOverride,
|
|
52
61
|
},
|
|
@@ -57,17 +66,22 @@ export default class FormControl extends React.Component<
|
|
|
57
66
|
positive,
|
|
58
67
|
htmlFor,
|
|
59
68
|
children,
|
|
69
|
+
counter,
|
|
60
70
|
} = this.props;
|
|
61
71
|
|
|
62
72
|
const onlyChildProps = React.Children.only(children).props;
|
|
63
73
|
|
|
64
|
-
const sharedProps = {
|
|
74
|
+
const sharedProps: StylePropsT = {
|
|
65
75
|
$disabled: !!disabled,
|
|
66
76
|
$error: !!error,
|
|
67
77
|
$positive: !!positive,
|
|
68
78
|
};
|
|
69
79
|
|
|
70
80
|
const Label = getOverride(LabelOverride) || StyledLabel;
|
|
81
|
+
const LabelEndEnhancer =
|
|
82
|
+
getOverride(LabelEndEnhancerOverride) || StyledLabelEndEnhancer;
|
|
83
|
+
const LabelContainer =
|
|
84
|
+
getOverride(LabelContainerOverride) || StyledLabelContainer;
|
|
71
85
|
const Caption = getOverride(CaptionOverride) || StyledCaption;
|
|
72
86
|
const ControlContainer =
|
|
73
87
|
getOverride(ControlContainerOverride) || StyledControlContainer;
|
|
@@ -83,17 +97,75 @@ export default class FormControl extends React.Component<
|
|
|
83
97
|
}
|
|
84
98
|
}
|
|
85
99
|
|
|
100
|
+
let labelEndEnhancer = this.props.labelEndEnhancer;
|
|
101
|
+
if (counter) {
|
|
102
|
+
// inferred values are preferred but if the user specifies the value
|
|
103
|
+
// that is then used as the default.
|
|
104
|
+
let maxLength: ?number = null;
|
|
105
|
+
let length: ?number = null;
|
|
106
|
+
let counterError: ?boolean = null;
|
|
107
|
+
|
|
108
|
+
if (typeof counter === 'object') {
|
|
109
|
+
length = counter.length;
|
|
110
|
+
maxLength = counter.maxLength;
|
|
111
|
+
counterError = counter.error;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
maxLength = maxLength ? maxLength : onlyChildProps.maxLength;
|
|
115
|
+
if (length == null && typeof onlyChildProps.value === 'string') {
|
|
116
|
+
length = onlyChildProps.value.length;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (length == null) {
|
|
120
|
+
length = 0;
|
|
121
|
+
if (__DEV__) {
|
|
122
|
+
console.warn(
|
|
123
|
+
`[FromControl] \`length\` must either be explicitly set via \`counter\` object property, or \`value\` string property on the child component.`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
sharedProps.$length = length;
|
|
129
|
+
if (maxLength == null) {
|
|
130
|
+
if (!labelEndEnhancer) labelEndEnhancer = `${length}`;
|
|
131
|
+
} else {
|
|
132
|
+
sharedProps.$maxLength = length;
|
|
133
|
+
if (!labelEndEnhancer) labelEndEnhancer = `${length}/${maxLength}`;
|
|
134
|
+
if (length > maxLength && counterError == null) counterError = true;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (counterError) {
|
|
138
|
+
sharedProps.$error = true;
|
|
139
|
+
sharedProps.$counterError = true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
86
143
|
return (
|
|
87
144
|
<React.Fragment>
|
|
88
145
|
{label && (
|
|
89
|
-
<
|
|
90
|
-
data-baseweb="form-control-label"
|
|
91
|
-
htmlFor={htmlFor || onlyChildProps.id}
|
|
146
|
+
<LabelContainer
|
|
92
147
|
{...sharedProps}
|
|
93
|
-
{...getOverrideProps(
|
|
148
|
+
{...getOverrideProps(LabelContainerOverride)}
|
|
94
149
|
>
|
|
95
|
-
|
|
96
|
-
|
|
150
|
+
<Label
|
|
151
|
+
data-baseweb="form-control-label"
|
|
152
|
+
htmlFor={htmlFor || onlyChildProps.id}
|
|
153
|
+
{...sharedProps}
|
|
154
|
+
{...getOverrideProps(LabelOverride)}
|
|
155
|
+
>
|
|
156
|
+
{typeof label === 'function' ? label(sharedProps) : label}
|
|
157
|
+
</Label>
|
|
158
|
+
{labelEndEnhancer && (
|
|
159
|
+
<LabelEndEnhancer
|
|
160
|
+
{...sharedProps}
|
|
161
|
+
{...getOverrideProps(LabelEndEnhancerOverride)}
|
|
162
|
+
>
|
|
163
|
+
{typeof labelEndEnhancer === 'function'
|
|
164
|
+
? labelEndEnhancer(sharedProps)
|
|
165
|
+
: labelEndEnhancer}
|
|
166
|
+
</LabelEndEnhancer>
|
|
167
|
+
)}
|
|
168
|
+
</LabelContainer>
|
|
97
169
|
)}
|
|
98
170
|
<UIDConsumer>
|
|
99
171
|
{captionId => (
|
|
@@ -114,11 +186,11 @@ export default class FormControl extends React.Component<
|
|
|
114
186
|
error:
|
|
115
187
|
typeof onlyChildProps.error !== 'undefined'
|
|
116
188
|
? onlyChildProps.error
|
|
117
|
-
: error,
|
|
189
|
+
: sharedProps.$error,
|
|
118
190
|
positive:
|
|
119
191
|
typeof onlyChildProps.positive !== 'undefined'
|
|
120
192
|
? onlyChildProps.positive
|
|
121
|
-
: positive,
|
|
193
|
+
: sharedProps.$positive,
|
|
122
194
|
});
|
|
123
195
|
})}
|
|
124
196
|
{(caption || error || positive) && (
|
package/form-control/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface FormControlProps {
|
|
|
25
25
|
error?: boolean | React.ReactNode;
|
|
26
26
|
positive?: React.ReactNode;
|
|
27
27
|
htmlFor?: string;
|
|
28
|
+
counter?: boolean | {length?: number; maxLength?: number; error?: boolean};
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export class FormControl extends React.Component<
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ControlContainer = exports.Caption = exports.Label = void 0;
|
|
6
|
+
exports.ControlContainer = exports.Caption = exports.LabelEndEnhancer = exports.LabelContainer = exports.Label = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = require("../styles/index.js");
|
|
9
9
|
|
|
@@ -17,7 +17,6 @@ var Label = (0, _index.styled)('label', function (props) {
|
|
|
17
17
|
var $disabled = props.$disabled,
|
|
18
18
|
_props$$theme = props.$theme,
|
|
19
19
|
colors = _props$$theme.colors,
|
|
20
|
-
sizing = _props$$theme.sizing,
|
|
21
20
|
typography = _props$$theme.typography;
|
|
22
21
|
return _objectSpread(_objectSpread({}, typography.font250), {}, {
|
|
23
22
|
fontWeight: 500,
|
|
@@ -27,15 +26,38 @@ var Label = (0, _index.styled)('label', function (props) {
|
|
|
27
26
|
paddingTop: 0,
|
|
28
27
|
paddingRight: 0,
|
|
29
28
|
paddingBottom: 0,
|
|
30
|
-
paddingLeft: 0
|
|
29
|
+
paddingLeft: 0
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
exports.Label = Label;
|
|
33
|
+
Label.displayName = "Label";
|
|
34
|
+
var LabelContainer = (0, _index.styled)('span', function (_ref) {
|
|
35
|
+
var sizing = _ref.$theme.sizing;
|
|
36
|
+
return {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
width: '100%',
|
|
31
39
|
marginTop: sizing.scale300,
|
|
32
40
|
marginRight: 0,
|
|
33
41
|
marginBottom: sizing.scale300,
|
|
34
42
|
marginLeft: 0
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
exports.LabelContainer = LabelContainer;
|
|
46
|
+
LabelContainer.displayName = "LabelContainer";
|
|
47
|
+
var LabelEndEnhancer = (0, _index.styled)('span', function (_ref2) {
|
|
48
|
+
var $disabled = _ref2.$disabled,
|
|
49
|
+
$counterError = _ref2.$counterError,
|
|
50
|
+
_ref2$$theme = _ref2.$theme,
|
|
51
|
+
colors = _ref2$$theme.colors,
|
|
52
|
+
typography = _ref2$$theme.typography;
|
|
53
|
+
return _objectSpread(_objectSpread({}, typography.font100), {}, {
|
|
54
|
+
flex: 0,
|
|
55
|
+
width: '100%',
|
|
56
|
+
color: $counterError ? colors.negative400 : $disabled ? colors.contentSecondary : colors.contentPrimary
|
|
35
57
|
});
|
|
36
58
|
});
|
|
37
|
-
exports.
|
|
38
|
-
|
|
59
|
+
exports.LabelEndEnhancer = LabelEndEnhancer;
|
|
60
|
+
LabelEndEnhancer.displayName = "LabelEndEnhancer";
|
|
39
61
|
var Caption = (0, _index.styled)('div', function (props) {
|
|
40
62
|
var $error = props.$error,
|
|
41
63
|
$positive = props.$positive,
|
|
@@ -12,7 +12,7 @@ import type {StylePropsT} from './types.js';
|
|
|
12
12
|
export const Label = styled<StylePropsT>('label', props => {
|
|
13
13
|
const {
|
|
14
14
|
$disabled,
|
|
15
|
-
$theme: {colors,
|
|
15
|
+
$theme: {colors, typography},
|
|
16
16
|
} = props;
|
|
17
17
|
return {
|
|
18
18
|
...typography.font250,
|
|
@@ -24,12 +24,34 @@ export const Label = styled<StylePropsT>('label', props => {
|
|
|
24
24
|
paddingRight: 0,
|
|
25
25
|
paddingBottom: 0,
|
|
26
26
|
paddingLeft: 0,
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const LabelContainer = styled<StylePropsT>(
|
|
31
|
+
'span',
|
|
32
|
+
({$theme: {sizing}}) => ({
|
|
33
|
+
display: 'flex',
|
|
34
|
+
width: '100%',
|
|
27
35
|
marginTop: sizing.scale300,
|
|
28
36
|
marginRight: 0,
|
|
29
37
|
marginBottom: sizing.scale300,
|
|
30
38
|
marginLeft: 0,
|
|
31
|
-
}
|
|
32
|
-
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export const LabelEndEnhancer = styled<StylePropsT>(
|
|
43
|
+
'span',
|
|
44
|
+
({$disabled, $counterError, $theme: {colors, typography}}) => ({
|
|
45
|
+
...typography.font100,
|
|
46
|
+
flex: 0,
|
|
47
|
+
width: '100%',
|
|
48
|
+
color: $counterError
|
|
49
|
+
? colors.negative400
|
|
50
|
+
: $disabled
|
|
51
|
+
? colors.contentSecondary
|
|
52
|
+
: colors.contentPrimary,
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
33
55
|
|
|
34
56
|
export const Caption = styled<StylePropsT>('div', props => {
|
|
35
57
|
const {
|
|
@@ -13,15 +13,20 @@ export type FormControlStateT = {|
|
|
|
13
13
|
captionId: string,
|
|
14
14
|
|};
|
|
15
15
|
|
|
16
|
+
export type OverridesT = {
|
|
17
|
+
/** Customizes the label element. */
|
|
18
|
+
Label?: OverrideT,
|
|
19
|
+
/** Customizes the label end enhancer element. */
|
|
20
|
+
LabelEndEnhancer?: OverrideT,
|
|
21
|
+
/** Customizes the label container element. */
|
|
22
|
+
LabelContainer?: OverrideT,
|
|
23
|
+
/** Customizes the caption element. */
|
|
24
|
+
Caption?: OverrideT,
|
|
25
|
+
/** Customizes the container element. */
|
|
26
|
+
ControlContainer?: OverrideT,
|
|
27
|
+
};
|
|
16
28
|
export type FormControlPropsT = {
|
|
17
|
-
overrides:
|
|
18
|
-
/** Customizes the label element. */
|
|
19
|
-
Label?: OverrideT,
|
|
20
|
-
/** Customizes the caption element. */
|
|
21
|
-
Caption?: OverrideT,
|
|
22
|
-
/** Customizes the container element. */
|
|
23
|
-
ControlContainer?: OverrideT,
|
|
24
|
-
},
|
|
29
|
+
overrides: OverridesT,
|
|
25
30
|
/** A label rendered above the input field. */
|
|
26
31
|
label: ?(React.Node | ((props: {}) => React.Node)),
|
|
27
32
|
/** A caption rendered below the input field. */
|
|
@@ -34,6 +39,10 @@ export type FormControlPropsT = {
|
|
|
34
39
|
positive?: React.Node | ((props: {}) => React.Node),
|
|
35
40
|
/** The id of the related form element. Defaults to the id property of the child, if any. */
|
|
36
41
|
htmlFor?: string,
|
|
42
|
+
/** Adds a label end enhancer to the label */
|
|
43
|
+
labelEndEnhancer?: ?(React.Node | ((props: {}) => React.Node)),
|
|
44
|
+
/** Adds a length counter to the form control. If your input does not have a "string" value exposed as a prop, you provide the length as an object.*/
|
|
45
|
+
counter?: boolean | {|length?: number, maxLength?: number, error?: boolean|},
|
|
37
46
|
children: React.Node,
|
|
38
47
|
};
|
|
39
48
|
|
|
@@ -41,6 +50,9 @@ export type StylePropsT = {
|
|
|
41
50
|
$disabled?: boolean,
|
|
42
51
|
$error?: boolean,
|
|
43
52
|
$positive?: boolean,
|
|
53
|
+
$length?: number,
|
|
54
|
+
$maxLength?: number,
|
|
55
|
+
$counterError?: boolean,
|
|
44
56
|
};
|
|
45
57
|
|
|
46
58
|
declare var __DEV__: boolean;
|
package/index.js
CHANGED
|
@@ -129,6 +129,12 @@ Object.defineProperty(exports, "BaseProvider", {
|
|
|
129
129
|
return _baseProvider.default;
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "getOverrides", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function get() {
|
|
135
|
+
return _overrides.getOverrides;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
132
138
|
Object.defineProperty(exports, "mergeOverrides", {
|
|
133
139
|
enumerable: true,
|
|
134
140
|
get: function get() {
|
package/index.js.flow
CHANGED
|
@@ -30,7 +30,7 @@ export {
|
|
|
30
30
|
} from './themes/index.js';
|
|
31
31
|
export {default as LocaleProvider} from './locale/index.js';
|
|
32
32
|
export {default as BaseProvider} from './helpers/base-provider.js';
|
|
33
|
-
export {mergeOverrides} from './helpers/overrides.js';
|
|
33
|
+
export {getOverrides, mergeOverrides} from './helpers/overrides.js';
|
|
34
34
|
export type {PrimitivesT} from './themes/types.js';
|
|
35
35
|
export type {ThemeT} from './styles/types.js';
|
|
36
36
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _overrides = require("../helpers/overrides.js");
|
|
13
|
+
|
|
14
|
+
var _styledComponents = require("./styled-components.js");
|
|
15
|
+
|
|
16
|
+
var _constants = require("./constants.js");
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
|
|
28
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
+
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
+
|
|
32
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
var BadgeEnhancer = function BadgeEnhancer(_ref) {
|
|
37
|
+
var pinHeadSize = _ref.pinHeadSize,
|
|
38
|
+
markerType = _ref.markerType,
|
|
39
|
+
_ref$badgeEnhancerSiz = _ref.badgeEnhancerSize,
|
|
40
|
+
badgeEnhancerSize = _ref$badgeEnhancerSiz === void 0 ? _constants.BADGE_ENHANCER_SIZES.none : _ref$badgeEnhancerSiz,
|
|
41
|
+
BadgeEnhancerContent = _ref.badgeEnhancerContent,
|
|
42
|
+
_ref$overrides = _ref.overrides,
|
|
43
|
+
overrides = _ref$overrides === void 0 ? {} : _ref$overrides;
|
|
44
|
+
|
|
45
|
+
if (badgeEnhancerSize === null || badgeEnhancerSize == _constants.BADGE_ENHANCER_SIZES.none) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (badgeEnhancerSize !== _constants.BADGE_ENHANCER_SIZES.xSmall && !BadgeEnhancerContent) {
|
|
50
|
+
if (process.env.NODE_ENV !== "production") {
|
|
51
|
+
console.warn("Badges (except for size ".concat(_constants.BADGE_ENHANCER_SIZES.xSmall, ") must contain content"));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (markerType === _constants.PINHEAD_TYPES.floating) {
|
|
58
|
+
if (process.env.NODE_ENV !== "production") {
|
|
59
|
+
console.warn("Badges can only be rendered on fixed markers");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var positions = _constants.BADGE_ENHANCER_POSITIONS[pinHeadSize];
|
|
66
|
+
var position = positions ? positions[badgeEnhancerSize] : null;
|
|
67
|
+
|
|
68
|
+
if (!position) {
|
|
69
|
+
if (process.env.NODE_ENV !== "production") {
|
|
70
|
+
console.warn("Badge size ".concat(badgeEnhancerSize, " cannot be rendered with pinhead size ").concat(pinHeadSize));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
var _getOverrides = (0, _overrides.getOverrides)(overrides.BadgeEnhancer, _styledComponents.StyledBadgeEnhancerRoot),
|
|
77
|
+
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
78
|
+
BadgeEnhancerRoot = _getOverrides2[0],
|
|
79
|
+
badgeEnhancerRootProps = _getOverrides2[1];
|
|
80
|
+
|
|
81
|
+
return /*#__PURE__*/React.createElement(BadgeEnhancerRoot, _extends({
|
|
82
|
+
$size: badgeEnhancerSize,
|
|
83
|
+
$position: position
|
|
84
|
+
}, badgeEnhancerRootProps), BadgeEnhancerContent && badgeEnhancerSize !== _constants.BADGE_ENHANCER_SIZES.xSmall && /*#__PURE__*/React.createElement(BadgeEnhancerContent, {
|
|
85
|
+
size: _constants.BADGE_ENHANCER_CONTENT_SIZE[badgeEnhancerSize]
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var _default = BadgeEnhancer;
|
|
90
|
+
exports.default = _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// @flow
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import type {BadgeEnhancerComponentT} from './types.js';
|
|
11
|
+
import {getOverrides} from '../helpers/overrides.js';
|
|
12
|
+
import {StyledBadgeEnhancerRoot} from './styled-components.js';
|
|
13
|
+
import {
|
|
14
|
+
PINHEAD_TYPES,
|
|
15
|
+
BADGE_ENHANCER_SIZES,
|
|
16
|
+
BADGE_ENHANCER_POSITIONS,
|
|
17
|
+
BADGE_ENHANCER_CONTENT_SIZE,
|
|
18
|
+
} from './constants.js';
|
|
19
|
+
|
|
20
|
+
const BadgeEnhancer = ({
|
|
21
|
+
pinHeadSize,
|
|
22
|
+
markerType,
|
|
23
|
+
badgeEnhancerSize = BADGE_ENHANCER_SIZES.none,
|
|
24
|
+
badgeEnhancerContent: BadgeEnhancerContent,
|
|
25
|
+
overrides = {},
|
|
26
|
+
}: BadgeEnhancerComponentT) => {
|
|
27
|
+
if (
|
|
28
|
+
badgeEnhancerSize === null ||
|
|
29
|
+
badgeEnhancerSize == BADGE_ENHANCER_SIZES.none
|
|
30
|
+
) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
if (
|
|
34
|
+
badgeEnhancerSize !== BADGE_ENHANCER_SIZES.xSmall &&
|
|
35
|
+
!BadgeEnhancerContent
|
|
36
|
+
) {
|
|
37
|
+
if (__DEV__) {
|
|
38
|
+
console.warn(
|
|
39
|
+
`Badges (except for size ${BADGE_ENHANCER_SIZES.xSmall}) must contain content`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
if (markerType === PINHEAD_TYPES.floating) {
|
|
45
|
+
if (__DEV__) {
|
|
46
|
+
console.warn(`Badges can only be rendered on fixed markers`);
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const positions = BADGE_ENHANCER_POSITIONS[pinHeadSize];
|
|
51
|
+
const position = positions ? positions[badgeEnhancerSize] : null;
|
|
52
|
+
if (!position) {
|
|
53
|
+
if (__DEV__) {
|
|
54
|
+
console.warn(
|
|
55
|
+
`Badge size ${badgeEnhancerSize} cannot be rendered with pinhead size ${pinHeadSize}`,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const [BadgeEnhancerRoot, badgeEnhancerRootProps] = getOverrides(
|
|
62
|
+
overrides.BadgeEnhancer,
|
|
63
|
+
StyledBadgeEnhancerRoot,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<BadgeEnhancerRoot
|
|
68
|
+
$size={badgeEnhancerSize}
|
|
69
|
+
$position={position}
|
|
70
|
+
{...badgeEnhancerRootProps}
|
|
71
|
+
>
|
|
72
|
+
{BadgeEnhancerContent &&
|
|
73
|
+
badgeEnhancerSize !== BADGE_ENHANCER_SIZES.xSmall && (
|
|
74
|
+
<BadgeEnhancerContent
|
|
75
|
+
size={BADGE_ENHANCER_CONTENT_SIZE[badgeEnhancerSize]}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
</BadgeEnhancerRoot>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default BadgeEnhancer;
|
|
83
|
+
|
|
84
|
+
declare var __DEV__: boolean;
|
|
85
|
+
declare var __NODE__: boolean;
|
|
86
|
+
declare var __BROWSER__: boolean;
|
package/map-marker/constants.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.anchorSize = exports.dragShadowWidth = exports.dragShadowMarginTop = exports.dragShadowHeight = exports.FLOATING_MARKER_ANCHOR_TYPES = exports.FLOATING_MARKER_ANCHOR_POSITIONS = exports.FLOATING_MARKER_SIZES = exports.PINHEAD_TYPES = exports.PINHEAD_DIMENSIONS = exports.xSmallPinheadDimension = exports.PINHEAD_SIZES_SHAPES = exports.NEEDLE_HEIGHTS = exports.NEEDLE_SIZES = void 0;
|
|
6
|
+
exports.KIND = exports.BADGE_ENHANCER_CONTENT_SIZE = exports.BADGE_ENHANCER_STYLES = exports.BADGE_ENHANCER_POSITIONS = exports.BADGE_ENHANCER_SIZES = exports.LABEL_ENHANCER_POSITIONS = exports.LABEL_SIZES = exports.anchorSize = exports.dragShadowWidth = exports.dragShadowMarginTop = exports.dragShadowHeight = exports.FLOATING_MARKER_ANCHOR_TYPES = exports.FLOATING_MARKER_ANCHOR_POSITIONS = exports.FLOATING_MARKER_SIZES = exports.PINHEAD_TYPES = exports.PINHEAD_DIMENSIONS = exports.xxSmallPinheadDimension = exports.xSmallPinheadDimension = exports.PINHEAD_SIZES_SHAPES = exports.NEEDLE_HEIGHTS = exports.NEEDLE_SIZES = void 0;
|
|
7
7
|
|
|
8
|
-
var _Object$freeze, _Object$freeze2;
|
|
8
|
+
var _Object$freeze, _Object$freeze2, _LABEL_SIZES, _xSmallPinheadBadge, _PINHEAD_SIZES_SHAPES, _PINHEAD_SIZES_SHAPES2, _PINHEAD_SIZES_SHAPES3, _BADGE_ENHANCER_POSIT, _BADGE_ENHANCER_STYLE, _BADGE_ENHANCER_CONTE;
|
|
9
9
|
|
|
10
10
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
11
|
|
|
@@ -25,6 +25,8 @@ exports.NEEDLE_SIZES = NEEDLE_SIZES;
|
|
|
25
25
|
var NEEDLE_HEIGHTS = Object.freeze((_Object$freeze = {}, _defineProperty(_Object$freeze, NEEDLE_SIZES.none, 0), _defineProperty(_Object$freeze, NEEDLE_SIZES.short, 4), _defineProperty(_Object$freeze, NEEDLE_SIZES.medium, 12), _defineProperty(_Object$freeze, NEEDLE_SIZES.tall, 20), _Object$freeze));
|
|
26
26
|
exports.NEEDLE_HEIGHTS = NEEDLE_HEIGHTS;
|
|
27
27
|
var PINHEAD_SIZES_SHAPES = Object.freeze({
|
|
28
|
+
xxSmallCircle: 'xx-small-circle',
|
|
29
|
+
xxSmallSquare: 'xx-small-square',
|
|
28
30
|
xSmallCircle: 'x-small-circle',
|
|
29
31
|
xSmallSquare: 'x-small-square',
|
|
30
32
|
small: 'small',
|
|
@@ -37,7 +39,12 @@ var xSmallPinheadDimension = {
|
|
|
37
39
|
icon: 4
|
|
38
40
|
};
|
|
39
41
|
exports.xSmallPinheadDimension = xSmallPinheadDimension;
|
|
40
|
-
var
|
|
42
|
+
var xxSmallPinheadDimension = {
|
|
43
|
+
height: 8,
|
|
44
|
+
icon: 4
|
|
45
|
+
};
|
|
46
|
+
exports.xxSmallPinheadDimension = xxSmallPinheadDimension;
|
|
47
|
+
var PINHEAD_DIMENSIONS = Object.freeze((_Object$freeze2 = {}, _defineProperty(_Object$freeze2, PINHEAD_SIZES_SHAPES.xxSmallSquare, xxSmallPinheadDimension), _defineProperty(_Object$freeze2, PINHEAD_SIZES_SHAPES.xxSmallCircle, xxSmallPinheadDimension), _defineProperty(_Object$freeze2, PINHEAD_SIZES_SHAPES.xSmallSquare, xSmallPinheadDimension), _defineProperty(_Object$freeze2, PINHEAD_SIZES_SHAPES.xSmallCircle, xSmallPinheadDimension), _defineProperty(_Object$freeze2, PINHEAD_SIZES_SHAPES.small, {
|
|
41
48
|
height: 24,
|
|
42
49
|
icon: 16
|
|
43
50
|
}), _defineProperty(_Object$freeze2, PINHEAD_SIZES_SHAPES.medium, {
|
|
@@ -69,7 +76,9 @@ var FLOATING_MARKER_ANCHOR_POSITIONS = Object.freeze({
|
|
|
69
76
|
exports.FLOATING_MARKER_ANCHOR_POSITIONS = FLOATING_MARKER_ANCHOR_POSITIONS;
|
|
70
77
|
var FLOATING_MARKER_ANCHOR_TYPES = Object.freeze({
|
|
71
78
|
circle: 'circle',
|
|
72
|
-
square: 'square'
|
|
79
|
+
square: 'square',
|
|
80
|
+
xxSmallCircle: 'xx-small-circle',
|
|
81
|
+
xxSmallSquare: 'xx-small-square'
|
|
73
82
|
});
|
|
74
83
|
exports.FLOATING_MARKER_ANCHOR_TYPES = FLOATING_MARKER_ANCHOR_TYPES;
|
|
75
84
|
var dragShadowHeight = 4;
|
|
@@ -79,4 +88,93 @@ exports.dragShadowMarginTop = dragShadowMarginTop;
|
|
|
79
88
|
var dragShadowWidth = 6;
|
|
80
89
|
exports.dragShadowWidth = dragShadowWidth;
|
|
81
90
|
var anchorSize = 16;
|
|
82
|
-
exports.anchorSize = anchorSize;
|
|
91
|
+
exports.anchorSize = anchorSize;
|
|
92
|
+
var labelSmall = 'LabelSmall';
|
|
93
|
+
var LABEL_SIZES = (_LABEL_SIZES = {}, _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.xxSmallCircle, labelSmall), _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.xxSmallSquare, labelSmall), _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.xSmallCircle, labelSmall), _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.xSmallSquare, labelSmall), _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.small, labelSmall), _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.medium, 'LabelMedium'), _defineProperty(_LABEL_SIZES, PINHEAD_SIZES_SHAPES.large, 'LabelLarge'), _LABEL_SIZES);
|
|
94
|
+
exports.LABEL_SIZES = LABEL_SIZES;
|
|
95
|
+
var LABEL_ENHANCER_POSITIONS = Object.freeze({
|
|
96
|
+
none: 'none',
|
|
97
|
+
top: 'top',
|
|
98
|
+
left: 'left',
|
|
99
|
+
right: 'right',
|
|
100
|
+
bottom: 'bottom'
|
|
101
|
+
});
|
|
102
|
+
exports.LABEL_ENHANCER_POSITIONS = LABEL_ENHANCER_POSITIONS;
|
|
103
|
+
var BADGE_ENHANCER_SIZES = Object.freeze({
|
|
104
|
+
none: 'none',
|
|
105
|
+
xSmall: 'x-small',
|
|
106
|
+
small: 'small',
|
|
107
|
+
mediumText: 'medium-text',
|
|
108
|
+
mediumIcon: 'medium-icon'
|
|
109
|
+
});
|
|
110
|
+
exports.BADGE_ENHANCER_SIZES = BADGE_ENHANCER_SIZES;
|
|
111
|
+
var xSmallPinheadBadge = (_xSmallPinheadBadge = {}, _defineProperty(_xSmallPinheadBadge, BADGE_ENHANCER_SIZES.none, null), _defineProperty(_xSmallPinheadBadge, BADGE_ENHANCER_SIZES.xSmall, {
|
|
112
|
+
x: -5,
|
|
113
|
+
y: -3
|
|
114
|
+
}), _defineProperty(_xSmallPinheadBadge, BADGE_ENHANCER_SIZES.small, null), _defineProperty(_xSmallPinheadBadge, BADGE_ENHANCER_SIZES.mediumText, null), _defineProperty(_xSmallPinheadBadge, BADGE_ENHANCER_SIZES.mediumIcon, null), _xSmallPinheadBadge);
|
|
115
|
+
var BADGE_ENHANCER_POSITIONS = (_BADGE_ENHANCER_POSIT = {}, _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.xxSmallSquare, null), _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.xxSmallCircle, null), _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.xSmallSquare, xSmallPinheadBadge), _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.xSmallCircle, xSmallPinheadBadge), _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.small, (_PINHEAD_SIZES_SHAPES = {}, _defineProperty(_PINHEAD_SIZES_SHAPES, BADGE_ENHANCER_SIZES.none, null), _defineProperty(_PINHEAD_SIZES_SHAPES, BADGE_ENHANCER_SIZES.xSmall, {
|
|
116
|
+
x: -7,
|
|
117
|
+
y: -1
|
|
118
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES, BADGE_ENHANCER_SIZES.small, {
|
|
119
|
+
x: -8,
|
|
120
|
+
y: -8
|
|
121
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES, BADGE_ENHANCER_SIZES.mediumText, null), _defineProperty(_PINHEAD_SIZES_SHAPES, BADGE_ENHANCER_SIZES.mediumIcon, null), _PINHEAD_SIZES_SHAPES)), _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.medium, (_PINHEAD_SIZES_SHAPES2 = {}, _defineProperty(_PINHEAD_SIZES_SHAPES2, BADGE_ENHANCER_SIZES.none, null), _defineProperty(_PINHEAD_SIZES_SHAPES2, BADGE_ENHANCER_SIZES.xSmall, {
|
|
122
|
+
x: -9,
|
|
123
|
+
y: 1
|
|
124
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES2, BADGE_ENHANCER_SIZES.small, {
|
|
125
|
+
x: -10,
|
|
126
|
+
y: -4
|
|
127
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES2, BADGE_ENHANCER_SIZES.mediumText, {
|
|
128
|
+
x: -12,
|
|
129
|
+
y: -8
|
|
130
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES2, BADGE_ENHANCER_SIZES.mediumIcon, {
|
|
131
|
+
x: -12,
|
|
132
|
+
y: -8
|
|
133
|
+
}), _PINHEAD_SIZES_SHAPES2)), _defineProperty(_BADGE_ENHANCER_POSIT, PINHEAD_SIZES_SHAPES.large, (_PINHEAD_SIZES_SHAPES3 = {}, _defineProperty(_PINHEAD_SIZES_SHAPES3, BADGE_ENHANCER_SIZES.none, null), _defineProperty(_PINHEAD_SIZES_SHAPES3, BADGE_ENHANCER_SIZES.xSmall, {
|
|
134
|
+
x: -11,
|
|
135
|
+
y: 3
|
|
136
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES3, BADGE_ENHANCER_SIZES.small, null), _defineProperty(_PINHEAD_SIZES_SHAPES3, BADGE_ENHANCER_SIZES.mediumText, {
|
|
137
|
+
x: -14,
|
|
138
|
+
y: -6
|
|
139
|
+
}), _defineProperty(_PINHEAD_SIZES_SHAPES3, BADGE_ENHANCER_SIZES.mediumIcon, {
|
|
140
|
+
x: -14,
|
|
141
|
+
y: -6
|
|
142
|
+
}), _PINHEAD_SIZES_SHAPES3)), _BADGE_ENHANCER_POSIT);
|
|
143
|
+
exports.BADGE_ENHANCER_POSITIONS = BADGE_ENHANCER_POSITIONS;
|
|
144
|
+
var BADGE_ENHANCER_STYLES = (_BADGE_ENHANCER_STYLE = {}, _defineProperty(_BADGE_ENHANCER_STYLE, BADGE_ENHANCER_SIZES.none, {}), _defineProperty(_BADGE_ENHANCER_STYLE, BADGE_ENHANCER_SIZES.xSmall, {
|
|
145
|
+
height: '8px',
|
|
146
|
+
width: '8px',
|
|
147
|
+
borderRadius: '50%'
|
|
148
|
+
}), _defineProperty(_BADGE_ENHANCER_STYLE, BADGE_ENHANCER_SIZES.small, {
|
|
149
|
+
height: '16px',
|
|
150
|
+
width: '16px',
|
|
151
|
+
borderRadius: '50%',
|
|
152
|
+
display: 'flex',
|
|
153
|
+
alignItems: 'center',
|
|
154
|
+
justifyContent: 'center',
|
|
155
|
+
fontSize: '10px'
|
|
156
|
+
}), _defineProperty(_BADGE_ENHANCER_STYLE, BADGE_ENHANCER_SIZES.mediumText, {
|
|
157
|
+
borderRadius: '10px',
|
|
158
|
+
height: '20px',
|
|
159
|
+
padding: '0px 8px',
|
|
160
|
+
display: 'flex',
|
|
161
|
+
alignItems: 'center',
|
|
162
|
+
boxSizing: 'border-box'
|
|
163
|
+
}), _defineProperty(_BADGE_ENHANCER_STYLE, BADGE_ENHANCER_SIZES.mediumIcon, {
|
|
164
|
+
height: '20px',
|
|
165
|
+
width: '20px',
|
|
166
|
+
borderRadius: '50%',
|
|
167
|
+
display: 'flex',
|
|
168
|
+
alignItems: 'center',
|
|
169
|
+
justifyContent: 'center',
|
|
170
|
+
boxSizing: 'border-box'
|
|
171
|
+
}), _BADGE_ENHANCER_STYLE);
|
|
172
|
+
exports.BADGE_ENHANCER_STYLES = BADGE_ENHANCER_STYLES;
|
|
173
|
+
var BADGE_ENHANCER_CONTENT_SIZE = (_BADGE_ENHANCER_CONTE = {}, _defineProperty(_BADGE_ENHANCER_CONTE, BADGE_ENHANCER_SIZES.none, 0), _defineProperty(_BADGE_ENHANCER_CONTE, BADGE_ENHANCER_SIZES.xSmall, 0), _defineProperty(_BADGE_ENHANCER_CONTE, BADGE_ENHANCER_SIZES.small, 10), _defineProperty(_BADGE_ENHANCER_CONTE, BADGE_ENHANCER_SIZES.mediumText, 12), _defineProperty(_BADGE_ENHANCER_CONTE, BADGE_ENHANCER_SIZES.mediumIcon, 12), _BADGE_ENHANCER_CONTE);
|
|
174
|
+
exports.BADGE_ENHANCER_CONTENT_SIZE = BADGE_ENHANCER_CONTENT_SIZE;
|
|
175
|
+
var KIND = Object.freeze({
|
|
176
|
+
default: 'default',
|
|
177
|
+
accent: 'accent',
|
|
178
|
+
negative: 'negative'
|
|
179
|
+
});
|
|
180
|
+
exports.KIND = KIND;
|