baseui 10.7.2 → 10.9.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/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 +307 -355
- package/data-table/column-numerical.js.flow +273 -287
- package/data-table/constants.js +17 -11
- package/data-table/constants.js.flow +11 -8
- package/data-table/data-table.js +53 -50
- package/data-table/data-table.js.flow +18 -13
- package/data-table/filter-shell.js +27 -4
- package/data-table/filter-shell.js.flow +33 -9
- package/data-table/locale.js +4 -2
- package/data-table/locale.js.flow +6 -2
- package/data-table/measure-column-widths.js +83 -121
- package/data-table/measure-column-widths.js.flow +87 -109
- 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 +245 -317
- package/es/data-table/constants.js +12 -8
- package/es/data-table/data-table.js +18 -16
- package/es/data-table/filter-shell.js +26 -4
- package/es/data-table/locale.js +4 -2
- package/es/data-table/measure-column-widths.js +75 -86
- package/es/datepicker/styled-components.js +1 -1
- package/es/drawer/drawer.js +3 -1
- 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 +7 -3
- 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 +19 -10
- package/es/themes/light-theme/color-component-tokens.js +19 -10
- package/es/timezonepicker/timezone-picker.js +53 -36
- package/es/timezonepicker/tzdata.js +2 -0
- package/es/timezonepicker/update-tzdata.js +69 -0
- package/es/toast/styled-components.js +18 -7
- 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 +304 -353
- package/esm/data-table/constants.js +12 -8
- package/esm/data-table/data-table.js +53 -50
- package/esm/data-table/filter-shell.js +26 -4
- package/esm/data-table/locale.js +4 -2
- package/esm/data-table/measure-column-widths.js +83 -121
- package/esm/datepicker/styled-components.js +1 -1
- package/esm/drawer/drawer.js +3 -1
- 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 +7 -3
- 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 +19 -10
- package/esm/themes/light-theme/color-component-tokens.js +19 -10
- package/esm/timezonepicker/timezone-picker.js +64 -36
- package/esm/timezonepicker/tzdata.js +2 -0
- package/esm/timezonepicker/update-tzdata.js +160 -0
- package/esm/toast/styled-components.js +13 -5
- 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 +5 -4
- package/popover/popover.js +7 -3
- package/popover/popover.js.flow +23 -17
- 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 +19 -10
- package/themes/dark-theme/color-component-tokens.js.flow +19 -10
- package/themes/light-theme/color-component-tokens.js +19 -10
- package/themes/light-theme/color-component-tokens.js.flow +19 -10
- package/themes/types.js.flow +9 -0
- package/timezonepicker/timezone-picker.js +69 -41
- package/timezonepicker/timezone-picker.js.flow +52 -46
- package/timezonepicker/types.js.flow +1 -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
- package/toast/styled-components.js +13 -5
- package/toast/styled-components.js.flow +17 -7
|
@@ -6,72 +6,49 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import {useStyletron} from '../styles/index.js';
|
|
9
|
+
import {useStyletron, type ThemeT} from '../styles/index.js';
|
|
10
10
|
import {getOverrides} from '../helpers/overrides.js';
|
|
11
11
|
import {
|
|
12
12
|
PINHEAD_TYPES,
|
|
13
13
|
NEEDLE_SIZES,
|
|
14
|
-
NEEDLE_HEIGHTS,
|
|
15
14
|
PINHEAD_SIZES_SHAPES,
|
|
15
|
+
LABEL_ENHANCER_POSITIONS,
|
|
16
|
+
KIND,
|
|
16
17
|
dragShadowHeight,
|
|
17
18
|
dragShadowMarginTop,
|
|
18
|
-
dragShadowWidth,
|
|
19
19
|
} from './constants.js';
|
|
20
20
|
import PinHead from './pin-head.js';
|
|
21
|
+
import Needle from './needle.js';
|
|
22
|
+
import DragShadow from './drag-shadow.js';
|
|
21
23
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Needle as StyledNeedle,
|
|
25
|
-
DragShadow as StyledDragShadow,
|
|
26
|
-
DragShadowContainer as StyledDragShadowContainer,
|
|
24
|
+
StyledFixedMarkerDragContainer,
|
|
25
|
+
StyledFixedMarkerRoot,
|
|
27
26
|
} from './styled-components.js';
|
|
28
|
-
import type {
|
|
29
|
-
FixedMarkerPropsT,
|
|
30
|
-
NeedlePropsT,
|
|
31
|
-
DragShadowPropsT,
|
|
32
|
-
} from './types.js';
|
|
27
|
+
import type {FixedMarkerPropsT, KindT} from './types.js';
|
|
33
28
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<Needle
|
|
38
|
-
$background={background}
|
|
39
|
-
$height={NEEDLE_HEIGHTS[size]}
|
|
40
|
-
{...needleProps}
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
29
|
+
type Colors = {
|
|
30
|
+
color: string,
|
|
31
|
+
backgroundColor: string,
|
|
43
32
|
};
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
$height={height}
|
|
64
|
-
$dragging={dragging}
|
|
65
|
-
{...dragShadowContainerProps}
|
|
66
|
-
>
|
|
67
|
-
<DragShadow
|
|
68
|
-
$width={dragShadowWidth}
|
|
69
|
-
$background={background}
|
|
70
|
-
{...dragShadowProps}
|
|
71
|
-
/>
|
|
72
|
-
</DragShadowContainer>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
34
|
+
function getColors(kind: KindT, theme: ThemeT): Colors {
|
|
35
|
+
if (kind === KIND.accent) {
|
|
36
|
+
return {
|
|
37
|
+
color: theme.colors.contentInversePrimary,
|
|
38
|
+
backgroundColor: theme.colors.backgroundAccent,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (kind === KIND.negative) {
|
|
42
|
+
return {
|
|
43
|
+
color: theme.colors.contentInversePrimary,
|
|
44
|
+
backgroundColor: theme.colors.backgroundNegative,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
color: theme.colors.contentInversePrimary,
|
|
49
|
+
backgroundColor: theme.colors.backgroundInversePrimary,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
75
52
|
|
|
76
53
|
const FixedMarker = ({
|
|
77
54
|
size = PINHEAD_SIZES_SHAPES.medium,
|
|
@@ -79,31 +56,55 @@ const FixedMarker = ({
|
|
|
79
56
|
label,
|
|
80
57
|
startEnhancer,
|
|
81
58
|
endEnhancer,
|
|
82
|
-
|
|
83
|
-
background,
|
|
59
|
+
kind = KIND.default,
|
|
84
60
|
dragging = false,
|
|
85
61
|
overrides = {},
|
|
62
|
+
labelEnhancerContent = null,
|
|
63
|
+
labelEnhancerPosition = LABEL_ENHANCER_POSITIONS.bottom,
|
|
64
|
+
badgeEnhancerSize = null,
|
|
65
|
+
badgeEnhancerContent = null,
|
|
66
|
+
...restProps
|
|
86
67
|
}: FixedMarkerPropsT) => {
|
|
87
68
|
const [, theme] = useStyletron();
|
|
88
|
-
const {
|
|
89
|
-
colors: {backgroundInversePrimary, primaryB},
|
|
90
|
-
} = theme;
|
|
91
|
-
|
|
92
|
-
color = color || primaryB;
|
|
93
|
-
background = background || backgroundInversePrimary;
|
|
69
|
+
const {color, backgroundColor} = getColors(kind, theme);
|
|
94
70
|
|
|
95
|
-
const doesPinHeadTransformOnDrag =
|
|
71
|
+
const doesPinHeadTransformOnDrag =
|
|
72
|
+
needle !== NEEDLE_SIZES.none &&
|
|
73
|
+
size !== PINHEAD_SIZES_SHAPES.xxSmallCircle &&
|
|
74
|
+
size !== PINHEAD_SIZES_SHAPES.xxSmallSquare;
|
|
96
75
|
|
|
97
|
-
const [Root, rootProps] = getOverrides(overrides.Root,
|
|
76
|
+
const [Root, rootProps] = getOverrides(overrides.Root, StyledFixedMarkerRoot);
|
|
98
77
|
const [
|
|
99
78
|
FixedMarkerDragContainer,
|
|
100
79
|
fixedMarkerDragContainerProps,
|
|
101
80
|
] = getOverrides(overrides.DragContainer, StyledFixedMarkerDragContainer);
|
|
81
|
+
|
|
82
|
+
const renderNeedle =
|
|
83
|
+
needle !== NEEDLE_SIZES.none &&
|
|
84
|
+
![
|
|
85
|
+
PINHEAD_SIZES_SHAPES.xxSmallCircle,
|
|
86
|
+
PINHEAD_SIZES_SHAPES.xxSmallSquare,
|
|
87
|
+
].includes(size);
|
|
88
|
+
|
|
89
|
+
if (__DEV__) {
|
|
90
|
+
if (
|
|
91
|
+
needle !== NEEDLE_SIZES.none &&
|
|
92
|
+
[
|
|
93
|
+
PINHEAD_SIZES_SHAPES.xxSmallCircle,
|
|
94
|
+
PINHEAD_SIZES_SHAPES.xxSmallSquare,
|
|
95
|
+
].includes(size)
|
|
96
|
+
) {
|
|
97
|
+
console.warn(
|
|
98
|
+
`Needles cannot be rendered with ${PINHEAD_SIZES_SHAPES.xxSmallCircle} or ${PINHEAD_SIZES_SHAPES.xxSmallSquare} pin heads`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
102
103
|
return (
|
|
103
104
|
<Root data-baseweb="fixed-map-marker" {...rootProps}>
|
|
104
105
|
<FixedMarkerDragContainer
|
|
105
106
|
$translateAmount={dragShadowMarginTop + dragShadowHeight}
|
|
106
|
-
$performTranslate={doesPinHeadTransformOnDrag && dragging}
|
|
107
|
+
$performTranslate={doesPinHeadTransformOnDrag && !dragging}
|
|
107
108
|
{...fixedMarkerDragContainerProps}
|
|
108
109
|
>
|
|
109
110
|
<PinHead
|
|
@@ -112,15 +113,26 @@ const FixedMarker = ({
|
|
|
112
113
|
{...(startEnhancer ? {startEnhancer} : {})}
|
|
113
114
|
{...(endEnhancer ? {endEnhancer} : {})}
|
|
114
115
|
color={color}
|
|
115
|
-
background={
|
|
116
|
+
background={backgroundColor}
|
|
116
117
|
type={PINHEAD_TYPES.fixed}
|
|
117
118
|
overrides={overrides}
|
|
119
|
+
badgeEnhancerSize={badgeEnhancerSize}
|
|
120
|
+
badgeEnhancerContent={badgeEnhancerContent}
|
|
121
|
+
labelEnhancerContent={labelEnhancerContent}
|
|
122
|
+
labelEnhancerPosition={labelEnhancerPosition}
|
|
123
|
+
needle={needle}
|
|
118
124
|
/>
|
|
119
|
-
|
|
125
|
+
{renderNeedle && (
|
|
126
|
+
<Needle
|
|
127
|
+
size={needle}
|
|
128
|
+
background={backgroundColor}
|
|
129
|
+
overrides={overrides}
|
|
130
|
+
/>
|
|
131
|
+
)}
|
|
120
132
|
</FixedMarkerDragContainer>
|
|
121
133
|
{doesPinHeadTransformOnDrag && (
|
|
122
134
|
<DragShadow
|
|
123
|
-
background={
|
|
135
|
+
background={backgroundColor}
|
|
124
136
|
dragging={dragging}
|
|
125
137
|
height={dragShadowMarginTop + dragShadowHeight}
|
|
126
138
|
overrides={overrides}
|
|
@@ -39,10 +39,20 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
|
|
|
39
39
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
|
+
function getAnchorPinHeadSize(anchorType) {
|
|
43
|
+
if (anchorType === _constants.FLOATING_MARKER_ANCHOR_TYPES.circle) {
|
|
44
|
+
return _constants.PINHEAD_SIZES_SHAPES.xSmallCircle;
|
|
45
|
+
} else if (anchorType === _constants.FLOATING_MARKER_ANCHOR_TYPES.square) {
|
|
46
|
+
return _constants.PINHEAD_SIZES_SHAPES.xSmallSquare;
|
|
47
|
+
} else if (anchorType === _constants.FLOATING_MARKER_ANCHOR_TYPES.xxSmallSquare) {
|
|
48
|
+
return _constants.PINHEAD_SIZES_SHAPES.xxSmallSquare;
|
|
49
|
+
} else {
|
|
50
|
+
return _constants.PINHEAD_SIZES_SHAPES.xxSmallCircle;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
var FloatingMarker = function FloatingMarker(_ref) {
|
|
43
|
-
var
|
|
44
|
-
background = _ref.background,
|
|
45
|
-
label = _ref.label,
|
|
55
|
+
var label = _ref.label,
|
|
46
56
|
_ref$size = _ref.size,
|
|
47
57
|
size = _ref$size === void 0 ? _constants.PINHEAD_SIZES_SHAPES.medium : _ref$size,
|
|
48
58
|
_ref$anchor = _ref.anchor,
|
|
@@ -63,34 +73,33 @@ var FloatingMarker = function FloatingMarker(_ref) {
|
|
|
63
73
|
backgroundInversePrimary = _theme$colors.backgroundInversePrimary,
|
|
64
74
|
primaryA = _theme$colors.primaryA,
|
|
65
75
|
primaryB = _theme$colors.primaryB;
|
|
66
|
-
|
|
67
|
-
background = background || backgroundPrimary;
|
|
68
|
-
var anchorPinHeadSize = anchorType === _constants.FLOATING_MARKER_ANCHOR_TYPES.circle ? _constants.PINHEAD_SIZES_SHAPES.xSmallCircle : _constants.PINHEAD_SIZES_SHAPES.xSmallSquare;
|
|
76
|
+
var anchorPinHeadSize = getAnchorPinHeadSize(anchorType);
|
|
69
77
|
|
|
70
|
-
var _getOverrides = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.
|
|
78
|
+
var _getOverrides = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.StyledFloatingMarkerRoot),
|
|
71
79
|
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
72
80
|
Root = _getOverrides2[0],
|
|
73
81
|
rootProps = _getOverrides2[1];
|
|
74
82
|
|
|
75
|
-
var _getOverrides3 = (0, _overrides.getOverrides)(overrides.PinHeadContainer, _styledComponents.
|
|
83
|
+
var _getOverrides3 = (0, _overrides.getOverrides)(overrides.PinHeadContainer, _styledComponents.StyledFloatingMarkerPinHeadContainer),
|
|
76
84
|
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
77
85
|
FloatingMarkerPinHeadContainer = _getOverrides4[0],
|
|
78
86
|
floatingMarkerPinHeadContainerProps = _getOverrides4[1];
|
|
79
87
|
|
|
80
|
-
var _getOverrides5 = (0, _overrides.getOverrides)(overrides.AnchorContainer, _styledComponents.
|
|
88
|
+
var _getOverrides5 = (0, _overrides.getOverrides)(overrides.AnchorContainer, _styledComponents.StyledFloatingMarkerAnchorContainer),
|
|
81
89
|
_getOverrides6 = _slicedToArray(_getOverrides5, 2),
|
|
82
90
|
FloatingMarkerAnchorContainer = _getOverrides6[0],
|
|
83
91
|
floatingMarkerAnchorContainerProps = _getOverrides6[1];
|
|
84
92
|
|
|
85
93
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
|
86
|
-
"data-baseweb": "floating-map-marker"
|
|
94
|
+
"data-baseweb": "floating-map-marker",
|
|
95
|
+
$size: _constants.PINHEAD_DIMENSIONS[anchorPinHeadSize].height
|
|
87
96
|
}, rootProps), /*#__PURE__*/React.createElement(FloatingMarkerPinHeadContainer, _extends({
|
|
88
97
|
$anchor: anchor,
|
|
89
|
-
$anchorSize: _constants.
|
|
98
|
+
$anchorSize: _constants.PINHEAD_DIMENSIONS[anchorPinHeadSize].height
|
|
90
99
|
}, floatingMarkerPinHeadContainerProps), /*#__PURE__*/React.createElement(_pinHead.default, {
|
|
91
100
|
size: size,
|
|
92
|
-
color:
|
|
93
|
-
background:
|
|
101
|
+
color: primaryA,
|
|
102
|
+
background: backgroundPrimary,
|
|
94
103
|
type: _constants.PINHEAD_TYPES.floating,
|
|
95
104
|
label: label,
|
|
96
105
|
startEnhancer: startEnhancer,
|
|
@@ -10,9 +10,9 @@ import {useStyletron} from '../styles/index.js';
|
|
|
10
10
|
import PinHead from './pin-head.js';
|
|
11
11
|
import {getOverrides} from '../helpers/overrides.js';
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
StyledFloatingMarkerRoot,
|
|
14
|
+
StyledFloatingMarkerAnchorContainer,
|
|
15
|
+
StyledFloatingMarkerPinHeadContainer,
|
|
16
16
|
} from './styled-components.js';
|
|
17
17
|
import type {FloatingMarkerPropsT} from './types.js';
|
|
18
18
|
import {
|
|
@@ -20,12 +20,22 @@ import {
|
|
|
20
20
|
PINHEAD_SIZES_SHAPES,
|
|
21
21
|
PINHEAD_TYPES,
|
|
22
22
|
FLOATING_MARKER_ANCHOR_TYPES,
|
|
23
|
-
|
|
23
|
+
PINHEAD_DIMENSIONS,
|
|
24
24
|
} from './constants.js';
|
|
25
25
|
|
|
26
|
+
function getAnchorPinHeadSize(anchorType) {
|
|
27
|
+
if (anchorType === FLOATING_MARKER_ANCHOR_TYPES.circle) {
|
|
28
|
+
return PINHEAD_SIZES_SHAPES.xSmallCircle;
|
|
29
|
+
} else if (anchorType === FLOATING_MARKER_ANCHOR_TYPES.square) {
|
|
30
|
+
return PINHEAD_SIZES_SHAPES.xSmallSquare;
|
|
31
|
+
} else if (anchorType === FLOATING_MARKER_ANCHOR_TYPES.xxSmallSquare) {
|
|
32
|
+
return PINHEAD_SIZES_SHAPES.xxSmallSquare;
|
|
33
|
+
} else {
|
|
34
|
+
return PINHEAD_SIZES_SHAPES.xxSmallCircle;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
const FloatingMarker = ({
|
|
27
|
-
color,
|
|
28
|
-
background,
|
|
29
39
|
label,
|
|
30
40
|
size = PINHEAD_SIZES_SHAPES.medium,
|
|
31
41
|
anchor = FLOATING_MARKER_ANCHOR_POSITIONS.bottomLeft,
|
|
@@ -38,15 +48,13 @@ const FloatingMarker = ({
|
|
|
38
48
|
const {
|
|
39
49
|
colors: {backgroundPrimary, backgroundInversePrimary, primaryA, primaryB},
|
|
40
50
|
} = theme;
|
|
41
|
-
color = color || primaryA;
|
|
42
|
-
background = background || backgroundPrimary;
|
|
43
51
|
|
|
44
|
-
const anchorPinHeadSize =
|
|
45
|
-
anchorType === FLOATING_MARKER_ANCHOR_TYPES.circle
|
|
46
|
-
? PINHEAD_SIZES_SHAPES.xSmallCircle
|
|
47
|
-
: PINHEAD_SIZES_SHAPES.xSmallSquare;
|
|
52
|
+
const anchorPinHeadSize = getAnchorPinHeadSize(anchorType);
|
|
48
53
|
|
|
49
|
-
const [Root, rootProps] = getOverrides(
|
|
54
|
+
const [Root, rootProps] = getOverrides(
|
|
55
|
+
overrides.Root,
|
|
56
|
+
StyledFloatingMarkerRoot,
|
|
57
|
+
);
|
|
50
58
|
const [
|
|
51
59
|
FloatingMarkerPinHeadContainer,
|
|
52
60
|
floatingMarkerPinHeadContainerProps,
|
|
@@ -62,17 +70,22 @@ const FloatingMarker = ({
|
|
|
62
70
|
overrides.AnchorContainer,
|
|
63
71
|
StyledFloatingMarkerAnchorContainer,
|
|
64
72
|
);
|
|
73
|
+
|
|
65
74
|
return (
|
|
66
|
-
<Root
|
|
75
|
+
<Root
|
|
76
|
+
data-baseweb="floating-map-marker"
|
|
77
|
+
$size={PINHEAD_DIMENSIONS[anchorPinHeadSize].height}
|
|
78
|
+
{...rootProps}
|
|
79
|
+
>
|
|
67
80
|
<FloatingMarkerPinHeadContainer
|
|
68
81
|
$anchor={anchor}
|
|
69
|
-
$anchorSize={
|
|
82
|
+
$anchorSize={PINHEAD_DIMENSIONS[anchorPinHeadSize].height}
|
|
70
83
|
{...floatingMarkerPinHeadContainerProps}
|
|
71
84
|
>
|
|
72
85
|
<PinHead
|
|
73
86
|
size={size}
|
|
74
|
-
color={
|
|
75
|
-
background={
|
|
87
|
+
color={primaryA}
|
|
88
|
+
background={backgroundPrimary}
|
|
76
89
|
type={PINHEAD_TYPES.floating}
|
|
77
90
|
label={label}
|
|
78
91
|
startEnhancer={startEnhancer}
|
package/map-marker/index.d.ts
CHANGED
|
@@ -9,6 +9,19 @@ export interface FLOATING_MARKER_ANCHOR_POSITIONS {
|
|
|
9
9
|
bottomLeft: 'bottom-left';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export interface FLOATING_MARKER_SIZES {
|
|
13
|
+
small: 'small';
|
|
14
|
+
medium: 'medium';
|
|
15
|
+
large: 'large';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FLOATING_MARKER_ANCHOR_TYPES {
|
|
19
|
+
circle: 'circle';
|
|
20
|
+
square: 'square';
|
|
21
|
+
xxSmallCircle: 'xx-small-circle';
|
|
22
|
+
xxSmallSquare: 'xx-small-square';
|
|
23
|
+
}
|
|
24
|
+
|
|
12
25
|
export interface NEEDLE_SIZES {
|
|
13
26
|
none: 'none';
|
|
14
27
|
short: 'short';
|
|
@@ -17,6 +30,8 @@ export interface NEEDLE_SIZES {
|
|
|
17
30
|
}
|
|
18
31
|
|
|
19
32
|
export interface PINHEAD_SIZES_SHAPES {
|
|
33
|
+
xxSmallCircle: 'xx-small-circle';
|
|
34
|
+
xxSmallSquare: 'xx-small-square';
|
|
20
35
|
xSmallCircle: 'x-small-circle';
|
|
21
36
|
xSmallSquare: 'x-small-square';
|
|
22
37
|
small: 'small';
|
|
@@ -24,28 +39,42 @@ export interface PINHEAD_SIZES_SHAPES {
|
|
|
24
39
|
large: 'large';
|
|
25
40
|
}
|
|
26
41
|
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
|
|
42
|
+
export interface BADGE_ENHANCER_SIZES {
|
|
43
|
+
none: 'none';
|
|
44
|
+
xSmall: 'x-small';
|
|
45
|
+
small: 'small';
|
|
46
|
+
mediumText: 'medium-text';
|
|
47
|
+
mediumIcon: 'medium-icon';
|
|
30
48
|
}
|
|
31
49
|
|
|
32
|
-
export interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
export interface LABEL_ENHANCER_POSITIONS {
|
|
51
|
+
none: 'none';
|
|
52
|
+
top: 'top';
|
|
53
|
+
left: 'left';
|
|
54
|
+
right: 'right';
|
|
55
|
+
bottom: 'bottom';
|
|
36
56
|
}
|
|
37
57
|
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
export interface KIND {
|
|
59
|
+
default: 'default';
|
|
60
|
+
accent: 'accent';
|
|
61
|
+
negative: 'negative';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface PINHEAD_TYPES {
|
|
65
|
+
floating: 'floating';
|
|
66
|
+
fixed: 'fixed';
|
|
41
67
|
}
|
|
42
68
|
|
|
69
|
+
export type AnchorPositionsT = FLOATING_MARKER_ANCHOR_POSITIONS[keyof FLOATING_MARKER_ANCHOR_POSITIONS];
|
|
43
70
|
export type NeedleSizeT = NEEDLE_SIZES[keyof NEEDLE_SIZES];
|
|
44
71
|
export type PinHeadT = PINHEAD_TYPES[keyof PINHEAD_TYPES];
|
|
45
72
|
export type PinHeadSizeT = PINHEAD_SIZES_SHAPES[keyof PINHEAD_SIZES_SHAPES];
|
|
46
|
-
export type AnchorPositionsT = FLOATING_MARKER_ANCHOR_POSITIONS[keyof FLOATING_MARKER_ANCHOR_POSITIONS];
|
|
47
73
|
export type FloatingMarkerSizeT = FLOATING_MARKER_SIZES[keyof FLOATING_MARKER_SIZES];
|
|
48
74
|
export type FloatingMarkerAnchorTypeT = FLOATING_MARKER_ANCHOR_TYPES[keyof FLOATING_MARKER_ANCHOR_TYPES];
|
|
75
|
+
export type BadgeEnhancerSizeT = BADGE_ENHANCER_SIZES[keyof BADGE_ENHANCER_SIZES];
|
|
76
|
+
export type LabelEnhancerPositionT = LABEL_ENHANCER_POSITIONS[keyof LABEL_ENHANCER_POSITIONS];
|
|
77
|
+
export type KindT = KIND[keyof KIND];
|
|
49
78
|
|
|
50
79
|
export type FixedMarkerOverridesT = {
|
|
51
80
|
Root?: Override<any>;
|
|
@@ -58,20 +87,64 @@ export type FixedMarkerOverridesT = {
|
|
|
58
87
|
DragShadow?: Override<any>;
|
|
59
88
|
DragShadowContainer?: Override<any>;
|
|
60
89
|
DragContainer?: Override<any>;
|
|
90
|
+
BadgeEnhancer?: Override<any>;
|
|
91
|
+
LabelEnhancer?: Override<any>;
|
|
92
|
+
LabelEnhancerContainer?: Override<any>;
|
|
61
93
|
};
|
|
62
94
|
|
|
63
|
-
export type
|
|
64
|
-
size
|
|
65
|
-
needle?: NeedleSizeT;
|
|
66
|
-
label?: string;
|
|
67
|
-
startEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
68
|
-
endEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
69
|
-
color?: string;
|
|
95
|
+
export type NeedlePropsT = {
|
|
96
|
+
size: NeedleSizeT;
|
|
70
97
|
background?: string;
|
|
71
|
-
|
|
98
|
+
overrides: FixedMarkerOverridesT;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type ItemPropsT = {
|
|
102
|
+
children?: React.ReactNode;
|
|
103
|
+
color?: string;
|
|
104
|
+
size?: number;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type LabelEnhancerT = {
|
|
108
|
+
labelEnhancerContent?: string;
|
|
109
|
+
labelEnhancerPosition?: LabelEnhancerPositionT;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export type LabelEhancerComponentT = LabelEnhancerT & {
|
|
113
|
+
needleHeight: number;
|
|
114
|
+
size: PinHeadSizeT;
|
|
72
115
|
overrides?: FixedMarkerOverridesT;
|
|
73
116
|
};
|
|
74
117
|
|
|
118
|
+
export type BadgeEnhancerT = {
|
|
119
|
+
badgeEnhancerSize?: BadgeEnhancerSizeT | null;
|
|
120
|
+
badgeEnhancerContent?: (props: {size: number}) => React.ReactNode;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export type BadgeEnhancerComponentT = BadgeEnhancerT & {
|
|
124
|
+
pinHeadSize: PinHeadSizeT;
|
|
125
|
+
markerType: PinHeadT;
|
|
126
|
+
overrides: FixedMarkerOverridesT;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type BadgePositionT = {
|
|
130
|
+
x: number;
|
|
131
|
+
y: number;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export type FixedMarkerPropsT = BadgeEnhancerT &
|
|
135
|
+
LabelEnhancerT & {
|
|
136
|
+
size?: PinHeadSizeT;
|
|
137
|
+
needle?: NeedleSizeT;
|
|
138
|
+
label?: string;
|
|
139
|
+
startEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
140
|
+
endEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
141
|
+
kind?: KindT;
|
|
142
|
+
color?: string;
|
|
143
|
+
background?: string;
|
|
144
|
+
dragging?: boolean;
|
|
145
|
+
overrides?: FixedMarkerOverridesT;
|
|
146
|
+
};
|
|
147
|
+
|
|
75
148
|
export type FloatingMarkerOverridesT = {
|
|
76
149
|
Root?: Override<any>;
|
|
77
150
|
InnerAnchor?: Override<any>;
|
|
@@ -80,11 +153,16 @@ export type FloatingMarkerOverridesT = {
|
|
|
80
153
|
PinHeadContent?: Override<any>;
|
|
81
154
|
PinHeadContainer?: Override<any>;
|
|
82
155
|
AnchorContainer?: Override<any>;
|
|
156
|
+
Needle?: Override<any>;
|
|
157
|
+
DragShadow?: Override<any>;
|
|
158
|
+
DragShadowContainer?: Override<any>;
|
|
159
|
+
DragContainer?: Override<any>;
|
|
160
|
+
BadgeEnhancer?: Override<any>;
|
|
161
|
+
LabelEnhancer?: Override<any>;
|
|
162
|
+
LabelEnhancerContainer?: Override<any>;
|
|
83
163
|
};
|
|
84
164
|
|
|
85
165
|
export type FloatingMarkerPropsT = {
|
|
86
|
-
color?: string;
|
|
87
|
-
background?: string;
|
|
88
166
|
label?: string;
|
|
89
167
|
anchor?: AnchorPositionsT;
|
|
90
168
|
endEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
@@ -94,12 +172,35 @@ export type FloatingMarkerPropsT = {
|
|
|
94
172
|
overrides?: FloatingMarkerOverridesT;
|
|
95
173
|
};
|
|
96
174
|
|
|
175
|
+
export type PinHeadPropsT = BadgeEnhancerT &
|
|
176
|
+
LabelEnhancerT & {
|
|
177
|
+
size?: PinHeadSizeT;
|
|
178
|
+
label?: string;
|
|
179
|
+
endEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
180
|
+
startEnhancer?: (props: {size: number}) => React.ReactNode;
|
|
181
|
+
color?: string;
|
|
182
|
+
background?: string;
|
|
183
|
+
type?: PinHeadT;
|
|
184
|
+
anchorType?: FloatingMarkerAnchorTypeT;
|
|
185
|
+
needle?: NeedleSizeT;
|
|
186
|
+
overrides?: FloatingMarkerOverridesT | FixedMarkerOverridesT;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export type DragShadowPropsT = {
|
|
190
|
+
background: string;
|
|
191
|
+
dragging: boolean;
|
|
192
|
+
height: number;
|
|
193
|
+
overrides: FixedMarkerOverridesT;
|
|
194
|
+
};
|
|
195
|
+
|
|
97
196
|
export const FLOATING_MARKER_ANCHOR_POSITIONS: FLOATING_MARKER_ANCHOR_POSITIONS;
|
|
197
|
+
export const FLOATING_MARKER_SIZES: FLOATING_MARKER_SIZES;
|
|
198
|
+
export const FLOATING_MARKER_ANCHOR_TYPES: FLOATING_MARKER_ANCHOR_TYPES;
|
|
98
199
|
export const NEEDLE_SIZES: NEEDLE_SIZES;
|
|
99
200
|
export const PINHEAD_SIZES_SHAPES: PINHEAD_SIZES_SHAPES;
|
|
100
|
-
export const
|
|
101
|
-
export const
|
|
102
|
-
export const
|
|
201
|
+
export const BADGE_ENHANCER_SIZES: BADGE_ENHANCER_SIZES;
|
|
202
|
+
export const LABEL_ENHANCER_POSITIONS: LABEL_ENHANCER_POSITIONS;
|
|
203
|
+
export const KIND: KIND;
|
|
103
204
|
|
|
104
205
|
export const FixedMarker: React.FC<FixedMarkerPropsT>;
|
|
105
206
|
export const FloatingMarker: React.FC<FloatingMarkerPropsT>;
|
package/map-marker/index.js
CHANGED
|
@@ -45,6 +45,24 @@ Object.defineProperty(exports, "PINHEAD_SIZES_SHAPES", {
|
|
|
45
45
|
return _constants.PINHEAD_SIZES_SHAPES;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "BADGE_ENHANCER_SIZES", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _constants.BADGE_ENHANCER_SIZES;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "LABEL_ENHANCER_POSITIONS", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _constants.LABEL_ENHANCER_POSITIONS;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "KIND", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _constants.KIND;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
48
66
|
|
|
49
67
|
var _fixedMarker = _interopRequireDefault(require("./fixed-marker.js"));
|
|
50
68
|
|
package/map-marker/index.js.flow
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
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 LabelEnhancer = function LabelEnhancer(_ref) {
|
|
37
|
+
var labelEnhancerContent = _ref.labelEnhancerContent,
|
|
38
|
+
labelEnhancerPosition = _ref.labelEnhancerPosition,
|
|
39
|
+
needleHeight = _ref.needleHeight,
|
|
40
|
+
size = _ref.size,
|
|
41
|
+
_ref$overrides = _ref.overrides,
|
|
42
|
+
overrides = _ref$overrides === void 0 ? {} : _ref$overrides;
|
|
43
|
+
|
|
44
|
+
if (!labelEnhancerPosition || labelEnhancerPosition === _constants.LABEL_ENHANCER_POSITIONS.none) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!labelEnhancerContent) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
var _getOverrides = (0, _overrides.getOverrides)(overrides.LabelEnhancerContainer, _styledComponents.StyledStrokedLabelContainer),
|
|
53
|
+
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
54
|
+
StrokedLabelContainer = _getOverrides2[0],
|
|
55
|
+
strokedLabelContainerProps = _getOverrides2[1];
|
|
56
|
+
|
|
57
|
+
var _getOverrides3 = (0, _overrides.getOverrides)(overrides.LabelEnhancer, _styledComponents.StyledStrokedLabel),
|
|
58
|
+
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
59
|
+
StrokedLabel = _getOverrides4[0],
|
|
60
|
+
strokedLabelProps = _getOverrides4[1];
|
|
61
|
+
|
|
62
|
+
return /*#__PURE__*/React.createElement(StrokedLabelContainer, _extends({
|
|
63
|
+
$position: labelEnhancerPosition,
|
|
64
|
+
$labelOffset: needleHeight
|
|
65
|
+
}, strokedLabelContainerProps), /*#__PURE__*/React.createElement(_styledComponents.RelativeContainer, null, /*#__PURE__*/React.createElement(StrokedLabel, _extends({
|
|
66
|
+
$size: size
|
|
67
|
+
}, strokedLabelProps), labelEnhancerContent)));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var _default = LabelEnhancer;
|
|
71
|
+
exports.default = _default;
|