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.
Files changed (160) hide show
  1. package/a11y/a11y.js +2 -2
  2. package/a11y/a11y.js.flow +3 -3
  3. package/button/styled-components.js +47 -18
  4. package/button/styled-components.js.flow +25 -5
  5. package/combobox/combobox.js +6 -3
  6. package/combobox/combobox.js.flow +4 -2
  7. package/combobox/types.js.flow +2 -0
  8. package/data-table/column-categorical.js +1 -1
  9. package/data-table/column-categorical.js.flow +2 -2
  10. package/data-table/column-numerical.js +1 -1
  11. package/data-table/column-numerical.js.flow +3 -3
  12. package/datepicker/styled-components.js +1 -1
  13. package/datepicker/styled-components.js.flow +4 -1
  14. package/drawer/drawer.js +3 -1
  15. package/drawer/drawer.js.flow +7 -1
  16. package/es/a11y/a11y.js +2 -2
  17. package/es/button/styled-components.js +32 -2
  18. package/es/combobox/combobox.js +6 -3
  19. package/es/data-table/column-categorical.js +2 -2
  20. package/es/data-table/column-numerical.js +2 -2
  21. package/es/datepicker/styled-components.js +1 -1
  22. package/es/drawer/drawer.js +3 -1
  23. package/es/form-control/form-control.js +58 -7
  24. package/es/form-control/styled-components.js +27 -6
  25. package/es/index.js +1 -1
  26. package/es/map-marker/badge-enhancer.js +61 -0
  27. package/es/map-marker/constants.js +146 -2
  28. package/es/map-marker/drag-shadow.js +32 -0
  29. package/es/map-marker/fixed-marker.js +54 -48
  30. package/es/map-marker/floating-marker.js +21 -12
  31. package/es/map-marker/index.js +1 -1
  32. package/es/map-marker/label-enhancer.js +39 -0
  33. package/es/map-marker/needle.js +26 -0
  34. package/es/map-marker/pin-head.js +42 -40
  35. package/es/map-marker/styled-components.js +177 -32
  36. package/es/map-marker/types.js +1 -1
  37. package/es/menu/maybe-child-menu.js +0 -2
  38. package/es/menu/nested-menus.js +49 -3
  39. package/es/menu/stateful-container.js +13 -12
  40. package/es/modal/modal.js +3 -1
  41. package/es/popover/popover.js +4 -2
  42. package/es/progress-bar/index.js +1 -1
  43. package/es/progress-bar/progressbar.js +25 -10
  44. package/es/progress-bar/styled-components.js +9 -5
  45. package/es/select/select-component.js +2 -10
  46. package/es/spinner/styled-components.js +34 -16
  47. package/es/table/filter.js +3 -1
  48. package/es/themes/dark-theme/color-component-tokens.js +4 -0
  49. package/es/themes/light-theme/color-component-tokens.js +4 -0
  50. package/es/timezonepicker/timezone-picker.js +55 -36
  51. package/es/timezonepicker/tzdata.js +2 -0
  52. package/es/timezonepicker/update-tzdata.js +69 -0
  53. package/esm/a11y/a11y.js +3 -3
  54. package/esm/button/styled-components.js +47 -18
  55. package/esm/combobox/combobox.js +6 -3
  56. package/esm/data-table/column-categorical.js +2 -2
  57. package/esm/data-table/column-numerical.js +2 -2
  58. package/esm/datepicker/styled-components.js +1 -1
  59. package/esm/drawer/drawer.js +3 -1
  60. package/esm/form-control/form-control.js +60 -9
  61. package/esm/form-control/styled-components.js +23 -3
  62. package/esm/index.js +1 -1
  63. package/esm/map-marker/badge-enhancer.js +79 -0
  64. package/esm/map-marker/constants.js +94 -4
  65. package/esm/map-marker/drag-shadow.js +53 -0
  66. package/esm/map-marker/fixed-marker.js +84 -80
  67. package/esm/map-marker/floating-marker.js +22 -13
  68. package/esm/map-marker/index.js +1 -1
  69. package/esm/map-marker/label-enhancer.js +60 -0
  70. package/esm/map-marker/needle.js +43 -0
  71. package/esm/map-marker/pin-head.js +77 -66
  72. package/esm/map-marker/styled-components.js +182 -51
  73. package/esm/map-marker/types.js +1 -1
  74. package/esm/menu/maybe-child-menu.js +0 -2
  75. package/esm/menu/nested-menus.js +66 -5
  76. package/esm/menu/stateful-container.js +15 -13
  77. package/esm/modal/modal.js +3 -1
  78. package/esm/popover/popover.js +4 -2
  79. package/esm/progress-bar/index.js +1 -1
  80. package/esm/progress-bar/progressbar.js +32 -10
  81. package/esm/progress-bar/styled-components.js +9 -4
  82. package/esm/select/select-component.js +2 -11
  83. package/esm/spinner/styled-components.js +35 -16
  84. package/esm/table/filter.js +3 -1
  85. package/esm/themes/dark-theme/color-component-tokens.js +4 -0
  86. package/esm/themes/light-theme/color-component-tokens.js +4 -0
  87. package/esm/timezonepicker/timezone-picker.js +66 -36
  88. package/esm/timezonepicker/tzdata.js +2 -0
  89. package/esm/timezonepicker/update-tzdata.js +160 -0
  90. package/form-control/form-control.js +61 -8
  91. package/form-control/form-control.js.flow +82 -10
  92. package/form-control/index.d.ts +1 -0
  93. package/form-control/styled-components.js +27 -5
  94. package/form-control/styled-components.js.flow +25 -3
  95. package/form-control/types.js.flow +20 -8
  96. package/index.js +6 -0
  97. package/index.js.flow +1 -1
  98. package/map-marker/badge-enhancer.js +90 -0
  99. package/map-marker/badge-enhancer.js.flow +86 -0
  100. package/map-marker/constants.js +103 -5
  101. package/map-marker/constants.js.flow +152 -0
  102. package/map-marker/drag-shadow.js +64 -0
  103. package/map-marker/drag-shadow.js.flow +52 -0
  104. package/map-marker/fixed-marker.js +84 -78
  105. package/map-marker/fixed-marker.js.flow +78 -66
  106. package/map-marker/floating-marker.js +22 -13
  107. package/map-marker/floating-marker.js.flow +30 -17
  108. package/map-marker/index.d.ts +125 -24
  109. package/map-marker/index.js +18 -0
  110. package/map-marker/index.js.flow +3 -0
  111. package/map-marker/label-enhancer.js +71 -0
  112. package/map-marker/label-enhancer.js.flow +63 -0
  113. package/map-marker/needle.js +54 -0
  114. package/map-marker/needle.js.flow +29 -0
  115. package/map-marker/pin-head.js +80 -69
  116. package/map-marker/pin-head.js.flow +122 -84
  117. package/map-marker/styled-components.js +200 -62
  118. package/map-marker/styled-components.js.flow +172 -22
  119. package/map-marker/types.js.flow +69 -20
  120. package/menu/index.d.ts +9 -4
  121. package/menu/maybe-child-menu.js +0 -2
  122. package/menu/maybe-child-menu.js.flow +0 -2
  123. package/menu/nested-menus.js +66 -5
  124. package/menu/nested-menus.js.flow +50 -5
  125. package/menu/stateful-container.js +15 -13
  126. package/menu/stateful-container.js.flow +19 -13
  127. package/menu/types.js.flow +7 -1
  128. package/modal/modal.js +3 -1
  129. package/modal/modal.js.flow +2 -0
  130. package/package.json +4 -4
  131. package/popover/popover.js +4 -2
  132. package/popover/popover.js.flow +3 -1
  133. package/progress-bar/index.d.ts +2 -0
  134. package/progress-bar/index.js +6 -0
  135. package/progress-bar/index.js.flow +1 -0
  136. package/progress-bar/progressbar.js +32 -10
  137. package/progress-bar/progressbar.js.flow +35 -9
  138. package/progress-bar/styled-components.js +9 -4
  139. package/progress-bar/styled-components.js.flow +15 -4
  140. package/progress-bar/types.js.flow +12 -2
  141. package/select/select-component.js +2 -11
  142. package/select/select-component.js.flow +5 -7
  143. package/spinner/styled-components.js +35 -16
  144. package/spinner/styled-components.js.flow +37 -19
  145. package/spinner/types.js.flow +10 -0
  146. package/styles/index.js.flow +1 -1
  147. package/table/filter.js +3 -1
  148. package/table/filter.js.flow +5 -1
  149. package/themes/dark-theme/color-component-tokens.js +4 -0
  150. package/themes/dark-theme/color-component-tokens.js.flow +4 -0
  151. package/themes/light-theme/color-component-tokens.js +4 -0
  152. package/themes/light-theme/color-component-tokens.js.flow +4 -0
  153. package/themes/types.js.flow +4 -0
  154. package/timezonepicker/timezone-picker.js +71 -41
  155. package/timezonepicker/timezone-picker.js.flow +55 -46
  156. package/timezonepicker/types.js.flow +6 -1
  157. package/timezonepicker/tzdata.js +10 -0
  158. package/timezonepicker/tzdata.js.flow +347 -0
  159. package/timezonepicker/update-tzdata.js +164 -0
  160. package/timezonepicker/update-tzdata.js.flow +70 -0
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.PinHead = exports.InnerXSmallAnchor = exports.OuterXSmallAnchor = exports.FixedMarkerDragContainer = exports.FixedMarkerRoot = exports.FloatingMarkerAnchorContainer = exports.FloatingMarkerPinHeadContainer = exports.FloatingMarkerRoot = exports.Needle = exports.DragShadow = exports.DragShadowContainer = exports.getAnchorTransform = void 0;
6
+ exports.StyledContentItem = exports.RelativeContainer = exports.StyledBadgeEnhancerRoot = exports.StyledStrokedLabel = exports.StyledStrokedLabelContainer = exports.StyledPinHead = exports.StyledInnerXSmallAnchor = exports.StyledOuterXSmallAnchor = exports.StyledInnerXXSmallAnchor = exports.StyledOuterXXSmallAnchor = exports.StyledFixedMarkerDragContainer = exports.StyledFixedMarkerRoot = exports.StyledFloatingMarkerAnchorContainer = exports.StyledFloatingMarkerPinHeadContainer = exports.StyledFloatingMarkerRoot = exports.StyledNeedle = exports.StyledDragShadow = exports.StyledDragShadowContainer = exports.getAnchorTransform = void 0;
7
7
 
8
8
  var _index = require("../styles/index.js");
9
9
 
@@ -22,7 +22,7 @@ var getAnchorTransform = function getAnchorTransform(anchor, anchorSize) {
22
22
  };
23
23
 
24
24
  exports.getAnchorTransform = getAnchorTransform;
25
- var DragShadowContainer = (0, _index.styled)('div', function (_ref) {
25
+ var StyledDragShadowContainer = (0, _index.styled)('div', function (_ref) {
26
26
  var $theme = _ref.$theme,
27
27
  $height = _ref.$height,
28
28
  $width = _ref.$width,
@@ -37,94 +37,95 @@ var DragShadowContainer = (0, _index.styled)('div', function (_ref) {
37
37
  boxShadow: $theme.lighting.shadow600
38
38
  };
39
39
  });
40
- exports.DragShadowContainer = DragShadowContainer;
41
- DragShadowContainer.displayName = "DragShadowContainer";
42
- var DragShadow = (0, _index.styled)('div', function (_ref2) {
40
+ exports.StyledDragShadowContainer = StyledDragShadowContainer;
41
+ StyledDragShadowContainer.displayName = "StyledDragShadowContainer";
42
+ var StyledDragShadow = (0, _index.styled)('div', function (_ref2) {
43
43
  var $theme = _ref2.$theme,
44
44
  $background = _ref2.$background,
45
45
  $width = _ref2.$width;
46
46
  return {
47
- background: $background,
47
+ backgroundColor: $background,
48
48
  borderRadius: '50%',
49
49
  width: "".concat($width, "px"),
50
- height: "".concat(4, "px"),
50
+ height: '4px',
51
51
  position: 'absolute',
52
52
  bottom: 0
53
53
  };
54
54
  });
55
- exports.DragShadow = DragShadow;
56
- DragShadow.displayName = "DragShadow";
57
- var Needle = (0, _index.styled)('div', function (_ref3) {
55
+ exports.StyledDragShadow = StyledDragShadow;
56
+ StyledDragShadow.displayName = "StyledDragShadow";
57
+ var StyledNeedle = (0, _index.styled)('div', function (_ref3) {
58
58
  var $theme = _ref3.$theme,
59
59
  $background = _ref3.$background,
60
60
  $height = _ref3.$height;
61
61
  return {
62
- background: $background,
62
+ backgroundColor: $background,
63
63
  width: '4px',
64
64
  height: "".concat($height, "px"),
65
65
  boxShadow: $theme.lighting.shadow600
66
66
  };
67
67
  });
68
- exports.Needle = Needle;
69
- Needle.displayName = "Needle";
70
- var FloatingMarkerRoot = (0, _index.styled)('div', function () {
68
+ exports.StyledNeedle = StyledNeedle;
69
+ StyledNeedle.displayName = "StyledNeedle";
70
+ var StyledFloatingMarkerRoot = (0, _index.styled)('div', function (_ref4) {
71
+ var $size = _ref4.$size;
71
72
  return {
72
73
  position: 'relative',
73
- height: "".concat(_constants.xSmallPinheadDimension.height, "px"),
74
- width: "".concat(_constants.xSmallPinheadDimension.height, "px")
74
+ height: "".concat($size, "px"),
75
+ width: "".concat($size, "px")
75
76
  };
76
77
  });
77
- exports.FloatingMarkerRoot = FloatingMarkerRoot;
78
- FloatingMarkerRoot.displayName = "FloatingMarkerRoot";
79
- var FloatingMarkerPinHeadContainer = (0, _index.styled)('div', function (_ref4) {
80
- var $theme = _ref4.$theme,
81
- $anchor = _ref4.$anchor,
82
- $anchorSize = _ref4.$anchorSize;
78
+ exports.StyledFloatingMarkerRoot = StyledFloatingMarkerRoot;
79
+ StyledFloatingMarkerRoot.displayName = "StyledFloatingMarkerRoot";
80
+ var StyledFloatingMarkerPinHeadContainer = (0, _index.styled)('div', function (_ref5) {
81
+ var $theme = _ref5.$theme,
82
+ $anchor = _ref5.$anchor,
83
+ $anchorSize = _ref5.$anchorSize;
83
84
  return {
84
85
  position: 'absolute',
85
86
  transition: "".concat($theme.animation.timing300, " ").concat($theme.animation.easeOutCurve, " all"),
86
87
  transform: getAnchorTransform($anchor, $anchorSize)
87
88
  };
88
89
  });
89
- exports.FloatingMarkerPinHeadContainer = FloatingMarkerPinHeadContainer;
90
- FloatingMarkerPinHeadContainer.displayName = "FloatingMarkerPinHeadContainer";
91
- var FloatingMarkerAnchorContainer = (0, _index.styled)('div', function () {
90
+ exports.StyledFloatingMarkerPinHeadContainer = StyledFloatingMarkerPinHeadContainer;
91
+ StyledFloatingMarkerPinHeadContainer.displayName = "StyledFloatingMarkerPinHeadContainer";
92
+ var StyledFloatingMarkerAnchorContainer = (0, _index.styled)('div', function () {
92
93
  return {
93
94
  position: 'absolute'
94
95
  };
95
96
  });
96
- exports.FloatingMarkerAnchorContainer = FloatingMarkerAnchorContainer;
97
- FloatingMarkerAnchorContainer.displayName = "FloatingMarkerAnchorContainer";
98
- var FixedMarkerRoot = (0, _index.styled)('div', function () {
97
+ exports.StyledFloatingMarkerAnchorContainer = StyledFloatingMarkerAnchorContainer;
98
+ StyledFloatingMarkerAnchorContainer.displayName = "StyledFloatingMarkerAnchorContainer";
99
+ var StyledFixedMarkerRoot = (0, _index.styled)('div', function () {
99
100
  return {
100
101
  display: 'flex',
101
102
  alignItems: 'center',
102
103
  flexDirection: 'column'
103
104
  };
104
105
  });
105
- exports.FixedMarkerRoot = FixedMarkerRoot;
106
- FixedMarkerRoot.displayName = "FixedMarkerRoot";
107
- var FixedMarkerDragContainer = (0, _index.styled)('div', function (_ref5) {
108
- var $theme = _ref5.$theme,
109
- $translateAmount = _ref5.$translateAmount,
110
- $performTranslate = _ref5.$performTranslate;
106
+ exports.StyledFixedMarkerRoot = StyledFixedMarkerRoot;
107
+ StyledFixedMarkerRoot.displayName = "StyledFixedMarkerRoot";
108
+ var StyledFixedMarkerDragContainer = (0, _index.styled)('div', function (_ref6) {
109
+ var $theme = _ref6.$theme,
110
+ $translateAmount = _ref6.$translateAmount,
111
+ $performTranslate = _ref6.$performTranslate;
111
112
  return {
112
- transform: "translateY(".concat($performTranslate ? '0px' : "".concat($translateAmount, "px"), ")"),
113
+ transform: "translateY(".concat($performTranslate ? "".concat($translateAmount, "px") : '0px', ")"),
113
114
  transition: "".concat($theme.animation.timing300, " ").concat($theme.animation.easeOutCurve, " all"),
114
115
  display: 'flex',
115
116
  alignItems: 'center',
116
117
  flexDirection: 'column'
117
118
  };
118
119
  });
119
- exports.FixedMarkerDragContainer = FixedMarkerDragContainer;
120
- FixedMarkerDragContainer.displayName = "FixedMarkerDragContainer";
121
- var OuterXSmallAnchor = (0, _index.styled)('div', function (_ref6) {
122
- var $theme = _ref6.$theme,
123
- $round = _ref6.$round,
124
- $background = _ref6.$background,
125
- $size = _ref6.$size;
120
+ exports.StyledFixedMarkerDragContainer = StyledFixedMarkerDragContainer;
121
+ StyledFixedMarkerDragContainer.displayName = "StyledFixedMarkerDragContainer";
122
+ var StyledOuterXXSmallAnchor = (0, _index.styled)('div', function (_ref7) {
123
+ var $theme = _ref7.$theme,
124
+ $round = _ref7.$round,
125
+ $background = _ref7.$background,
126
+ $size = _ref7.$size;
126
127
  return {
127
- background: $background,
128
+ backgroundColor: $background,
128
129
  display: 'flex',
129
130
  alignItems: 'center',
130
131
  justifyContent: 'center',
@@ -134,28 +135,59 @@ var OuterXSmallAnchor = (0, _index.styled)('div', function (_ref6) {
134
135
  boxShadow: $theme.lighting.shadow600
135
136
  };
136
137
  });
137
- exports.OuterXSmallAnchor = OuterXSmallAnchor;
138
- OuterXSmallAnchor.displayName = "OuterXSmallAnchor";
139
- var InnerXSmallAnchor = (0, _index.styled)('div', function (_ref7) {
140
- var $round = _ref7.$round,
141
- $color = _ref7.$color,
142
- $size = _ref7.$size;
138
+ exports.StyledOuterXXSmallAnchor = StyledOuterXXSmallAnchor;
139
+ StyledOuterXXSmallAnchor.displayName = "StyledOuterXXSmallAnchor";
140
+ var StyledInnerXXSmallAnchor = (0, _index.styled)('div', function (_ref8) {
141
+ var $round = _ref8.$round,
142
+ $color = _ref8.$color,
143
+ $size = _ref8.$size;
144
+ return {
145
+ backgroundColor: $color,
146
+ height: "".concat($size, "px"),
147
+ width: "".concat($size, "px"),
148
+ borderRadius: $round ? '50%' : 0
149
+ };
150
+ });
151
+ exports.StyledInnerXXSmallAnchor = StyledInnerXXSmallAnchor;
152
+ StyledInnerXXSmallAnchor.displayName = "StyledInnerXXSmallAnchor";
153
+ var StyledOuterXSmallAnchor = (0, _index.styled)('div', function (_ref9) {
154
+ var $theme = _ref9.$theme,
155
+ $round = _ref9.$round,
156
+ $background = _ref9.$background,
157
+ $size = _ref9.$size;
158
+ return {
159
+ backgroundColor: $background,
160
+ display: 'flex',
161
+ alignItems: 'center',
162
+ justifyContent: 'center',
163
+ height: "".concat($size, "px"),
164
+ width: "".concat($size, "px"),
165
+ borderRadius: $round ? '50%' : 0,
166
+ boxShadow: $theme.lighting.shadow600
167
+ };
168
+ });
169
+ exports.StyledOuterXSmallAnchor = StyledOuterXSmallAnchor;
170
+ StyledOuterXSmallAnchor.displayName = "StyledOuterXSmallAnchor";
171
+ var StyledInnerXSmallAnchor = (0, _index.styled)('div', function (_ref10) {
172
+ var $round = _ref10.$round,
173
+ $color = _ref10.$color,
174
+ $size = _ref10.$size;
143
175
  return {
144
- background: $color,
176
+ backgroundColor: $color,
145
177
  height: "".concat($size, "px"),
146
178
  width: "".concat($size, "px"),
147
179
  borderRadius: $round ? '50%' : 0
148
180
  };
149
181
  });
150
- exports.InnerXSmallAnchor = InnerXSmallAnchor;
151
- InnerXSmallAnchor.displayName = "InnerXSmallAnchor";
152
- var PinHead = (0, _index.styled)('div', function (_ref8) {
153
- var $theme = _ref8.$theme,
154
- $height = _ref8.$height,
155
- $background = _ref8.$background,
156
- $gridTemplateColumns = _ref8.$gridTemplateColumns,
157
- $type = _ref8.$type,
158
- $forceCircle = _ref8.$forceCircle;
182
+ exports.StyledInnerXSmallAnchor = StyledInnerXSmallAnchor;
183
+ StyledInnerXSmallAnchor.displayName = "StyledInnerXSmallAnchor";
184
+ var StyledPinHead = (0, _index.styled)('div', function (_ref11) {
185
+ var $theme = _ref11.$theme,
186
+ $height = _ref11.$height,
187
+ $background = _ref11.$background,
188
+ $gridTemplateColumns = _ref11.$gridTemplateColumns,
189
+ $type = _ref11.$type,
190
+ $forceCircle = _ref11.$forceCircle;
159
191
  var sharedStyles = {
160
192
  fixed: {
161
193
  padding: '0px 12px',
@@ -166,7 +198,7 @@ var PinHead = (0, _index.styled)('div', function (_ref8) {
166
198
  }
167
199
  };
168
200
  return _objectSpread(_objectSpread({
169
- background: $background,
201
+ backgroundColor: $background,
170
202
  height: "".concat($height, "px"),
171
203
  display: 'grid',
172
204
  gridTemplateColumns: $gridTemplateColumns,
@@ -180,5 +212,111 @@ var PinHead = (0, _index.styled)('div', function (_ref8) {
180
212
  boxSizing: 'border-box'
181
213
  });
182
214
  });
183
- exports.PinHead = PinHead;
184
- PinHead.displayName = "PinHead";
215
+ exports.StyledPinHead = StyledPinHead;
216
+ StyledPinHead.displayName = "StyledPinHead";
217
+ var StyledStrokedLabelContainer = (0, _index.styled)('div', function (_ref12) {
218
+ var $position = _ref12.$position,
219
+ $theme = _ref12.$theme,
220
+ $labelOffset = _ref12.$labelOffset;
221
+ var staticLabelOffset = 4;
222
+ var positions = {
223
+ top: {
224
+ left: "calc(50% + ".concat(staticLabelOffset, "px)"),
225
+ bottom: '100%',
226
+ alignItems: 'flex-end',
227
+ justifyContent: 'center',
228
+ textAlign: 'center'
229
+ },
230
+ bottom: {
231
+ left: '50%',
232
+ top: "calc(100% + ".concat(staticLabelOffset, "px + ").concat($labelOffset, "px)"),
233
+ alignItems: 'flex-start',
234
+ justifyContent: 'center',
235
+ textAlign: 'center'
236
+ },
237
+ right: {
238
+ left: "calc(100% + ".concat(staticLabelOffset, "px)"),
239
+ top: '50%',
240
+ alignItems: 'center',
241
+ justifyContent: 'flex-start'
242
+ },
243
+ left: {
244
+ right: "calc(100% + ".concat(staticLabelOffset, "px)"),
245
+ top: '50%',
246
+ alignItems: 'center',
247
+ justifyContent: 'flex-end',
248
+ textAlign: 'right'
249
+ },
250
+ none: {}
251
+ };
252
+ return _objectSpread({
253
+ position: 'absolute',
254
+ width: '0px',
255
+ height: '0px',
256
+ pointerEvents: 'none',
257
+ display: 'flex'
258
+ }, positions[$position]);
259
+ });
260
+ exports.StyledStrokedLabelContainer = StyledStrokedLabelContainer;
261
+ StyledStrokedLabelContainer.displayName = "StyledStrokedLabelContainer";
262
+ var StyledStrokedLabel = (0, _index.styled)('div', function (_ref13) {
263
+ var $theme = _ref13.$theme,
264
+ $size = _ref13.$size;
265
+ var strokeWidth = 1.5;
266
+ var strokeColor = $theme.colors.backgroundPrimary;
267
+ var textShadow = "-".concat(strokeWidth, "px -").concat(strokeWidth, "px 0 ").concat(strokeColor, ",\n 0 -").concat(strokeWidth, "px 0 ").concat(strokeColor, ",\n ").concat(strokeWidth, "px -").concat(strokeWidth, "px 0 ").concat(strokeColor, ",\n ").concat(strokeWidth, "px 0 0 ").concat(strokeColor, ",\n ").concat(strokeWidth, "px ").concat(strokeWidth, "px 0 ").concat(strokeColor, ",\n 0 ").concat(strokeWidth, "px 0 ").concat(strokeColor, ",\n -").concat(strokeWidth, "px ").concat(strokeWidth, "px 0 ").concat(strokeColor, ",\n -").concat(strokeWidth, "px 0 0 ").concat(strokeColor);
268
+ return _objectSpread(_objectSpread({
269
+ display: 'flex'
270
+ }, $theme.typography[_constants.LABEL_SIZES[$size]]), {}, {
271
+ color: $theme.colors.primaryA,
272
+ transition: "".concat($theme.animation.timing300, " ").concat($theme.animation.easeOutCurve, " all"),
273
+ textShadow: textShadow,
274
+ pointerEvents: 'auto',
275
+ width: 'max-content',
276
+ maxWidth: '200px'
277
+ });
278
+ });
279
+ exports.StyledStrokedLabel = StyledStrokedLabel;
280
+ StyledStrokedLabel.displayName = "StyledStrokedLabel";
281
+ var StyledBadgeEnhancerRoot = (0, _index.styled)('div', function (_ref14) {
282
+ var $theme = _ref14.$theme,
283
+ $size = _ref14.$size,
284
+ $position = _ref14.$position;
285
+ var x = $position.x,
286
+ y = $position.y;
287
+ return _objectSpread(_objectSpread({
288
+ position: 'absolute'
289
+ }, $theme.typography.LabelSmall), {}, {
290
+ backgroundColor: $theme.colors.backgroundAccent,
291
+ color: $theme.colors.primaryB,
292
+ boxSizing: 'border-box',
293
+ right: 0,
294
+ transform: "translate(calc(100% + ".concat(x, "px), ").concat(y, "px)"),
295
+ transition: "".concat($theme.animation.timing300, " ").concat($theme.animation.easeOutCurve, " all")
296
+ }, _constants.BADGE_ENHANCER_STYLES[$size]);
297
+ });
298
+ exports.StyledBadgeEnhancerRoot = StyledBadgeEnhancerRoot;
299
+ StyledBadgeEnhancerRoot.displayName = "StyledBadgeEnhancerRoot";
300
+ var RelativeContainer = (0, _index.styled)('div', function () {
301
+ return {
302
+ position: 'relative'
303
+ };
304
+ });
305
+ exports.RelativeContainer = RelativeContainer;
306
+ RelativeContainer.displayName = "RelativeContainer";
307
+ var StyledContentItem = (0, _index.styled)('div', function (_ref15) {
308
+ var $theme = _ref15.$theme,
309
+ $color = _ref15.$color,
310
+ $height = _ref15.$height,
311
+ $size = _ref15.$size;
312
+ return _objectSpread(_objectSpread({}, $theme.typography[_constants.LABEL_SIZES[$size]]), {}, {
313
+ display: 'flex',
314
+ alignItems: 'center',
315
+ textAlign: 'center',
316
+ lineHeight: "".concat($height, "px"),
317
+ height: "".concat($height, "px"),
318
+ color: $color
319
+ });
320
+ });
321
+ exports.StyledContentItem = StyledContentItem;
322
+ StyledContentItem.displayName = "StyledContentItem";
@@ -7,11 +7,18 @@ LICENSE file in the root directory of this source tree.
7
7
  // @flow
8
8
  import {styled} from '../styles/index.js';
9
9
  import {
10
+ BADGE_ENHANCER_STYLES,
10
11
  FLOATING_MARKER_ANCHOR_POSITIONS,
11
- xSmallPinheadDimension,
12
+ LABEL_SIZES,
12
13
  } from './constants.js';
13
14
 
14
- import type {AnchorPositionsT} from './types.js';
15
+ import type {
16
+ AnchorPositionsT,
17
+ LabelEnhancerPositionT,
18
+ BadgeEnhancerSizeT,
19
+ BadgePositionT,
20
+ PinHeadSizeT,
21
+ } from './types.js';
15
22
 
16
23
  export const getAnchorTransform = (
17
24
  anchor: AnchorPositionsT,
@@ -25,7 +32,7 @@ export const getAnchorTransform = (
25
32
  [FLOATING_MARKER_ANCHOR_POSITIONS.bottomRight]: `translate(-100%, -100%)`,
26
33
  }[anchor]);
27
34
 
28
- export const DragShadowContainer = styled<{
35
+ export const StyledDragShadowContainer = styled<{
29
36
  $height: number,
30
37
  $width: number,
31
38
  $dragging: boolean,
@@ -39,35 +46,37 @@ export const DragShadowContainer = styled<{
39
46
  boxShadow: $theme.lighting.shadow600,
40
47
  }));
41
48
 
42
- export const DragShadow = styled<{
49
+ export const StyledDragShadow = styled<{
43
50
  $background: string,
44
51
  $width: number,
45
52
  }>('div', ({$theme, $background, $width}) => ({
46
- background: $background,
53
+ backgroundColor: $background,
47
54
  borderRadius: '50%',
48
55
  width: `${$width}px`,
49
- height: `${4}px`,
56
+ height: '4px',
50
57
  position: 'absolute',
51
58
  bottom: 0,
52
59
  }));
53
60
 
54
- export const Needle = styled<{
61
+ export const StyledNeedle = styled<{
55
62
  $background?: string,
56
63
  $height: number,
57
64
  }>('div', ({$theme, $background, $height}) => ({
58
- background: $background,
65
+ backgroundColor: $background,
59
66
  width: '4px',
60
67
  height: `${$height}px`,
61
68
  boxShadow: $theme.lighting.shadow600,
62
69
  }));
63
70
 
64
- export const FloatingMarkerRoot = styled<{}>('div', () => ({
71
+ export const StyledFloatingMarkerRoot = styled<{
72
+ $size: number,
73
+ }>('div', ({$size}) => ({
65
74
  position: 'relative',
66
- height: `${xSmallPinheadDimension.height}px`,
67
- width: `${xSmallPinheadDimension.height}px`,
75
+ height: `${$size}px`,
76
+ width: `${$size}px`,
68
77
  }));
69
78
 
70
- export const FloatingMarkerPinHeadContainer = styled<{
79
+ export const StyledFloatingMarkerPinHeadContainer = styled<{
71
80
  $anchor: AnchorPositionsT,
72
81
  $anchorSize: number,
73
82
  }>('div', ({$theme, $anchor, $anchorSize}) => ({
@@ -76,23 +85,23 @@ export const FloatingMarkerPinHeadContainer = styled<{
76
85
  transform: getAnchorTransform($anchor, $anchorSize),
77
86
  }));
78
87
 
79
- export const FloatingMarkerAnchorContainer = styled<{}>('div', () => ({
88
+ export const StyledFloatingMarkerAnchorContainer = styled<{}>('div', () => ({
80
89
  position: 'absolute',
81
90
  }));
82
91
 
83
- export const FixedMarkerRoot = styled<{}>('div', () => ({
92
+ export const StyledFixedMarkerRoot = styled<{}>('div', () => ({
84
93
  display: 'flex',
85
94
  alignItems: 'center',
86
95
  flexDirection: 'column',
87
96
  }));
88
97
 
89
- export const FixedMarkerDragContainer = styled<{
98
+ export const StyledFixedMarkerDragContainer = styled<{
90
99
  $translateAmount: number,
91
100
  $performTranslate: boolean,
92
101
  }>('div', ({$theme, $translateAmount, $performTranslate}) => {
93
102
  return {
94
103
  transform: `translateY(${
95
- $performTranslate ? '0px' : `${$translateAmount}px`
104
+ $performTranslate ? `${$translateAmount}px` : '0px'
96
105
  })`,
97
106
  transition: `${$theme.animation.timing300} ${$theme.animation.easeOutCurve} all`,
98
107
  display: 'flex',
@@ -101,12 +110,12 @@ export const FixedMarkerDragContainer = styled<{
101
110
  };
102
111
  });
103
112
 
104
- export const OuterXSmallAnchor = styled<{
113
+ export const StyledOuterXXSmallAnchor = styled<{
105
114
  $round: boolean,
106
115
  $background: string,
107
116
  $size: number,
108
117
  }>('div', ({$theme, $round, $background, $size}) => ({
109
- background: $background,
118
+ backgroundColor: $background,
110
119
  display: 'flex',
111
120
  alignItems: 'center',
112
121
  justifyContent: 'center',
@@ -116,18 +125,44 @@ export const OuterXSmallAnchor = styled<{
116
125
  boxShadow: $theme.lighting.shadow600,
117
126
  }));
118
127
 
119
- export const InnerXSmallAnchor = styled<{
128
+ export const StyledInnerXXSmallAnchor = styled<{
120
129
  $round: boolean,
121
130
  $color: string,
122
131
  $size: number,
123
132
  }>('div', ({$round, $color, $size}) => ({
124
- background: $color,
133
+ backgroundColor: $color,
125
134
  height: `${$size}px`,
126
135
  width: `${$size}px`,
127
136
  borderRadius: $round ? '50%' : 0,
128
137
  }));
129
138
 
130
- export const PinHead = styled<{
139
+ export const StyledOuterXSmallAnchor = styled<{
140
+ $round: boolean,
141
+ $background: string,
142
+ $size: number,
143
+ }>('div', ({$theme, $round, $background, $size}) => ({
144
+ backgroundColor: $background,
145
+ display: 'flex',
146
+ alignItems: 'center',
147
+ justifyContent: 'center',
148
+ height: `${$size}px`,
149
+ width: `${$size}px`,
150
+ borderRadius: $round ? '50%' : 0,
151
+ boxShadow: $theme.lighting.shadow600,
152
+ }));
153
+
154
+ export const StyledInnerXSmallAnchor = styled<{
155
+ $round: boolean,
156
+ $color: string,
157
+ $size: number,
158
+ }>('div', ({$round, $color, $size}) => ({
159
+ backgroundColor: $color,
160
+ height: `${$size}px`,
161
+ width: `${$size}px`,
162
+ borderRadius: $round ? '50%' : 0,
163
+ }));
164
+
165
+ export const StyledPinHead = styled<{
131
166
  $height: number,
132
167
  $background: string,
133
168
  $gridTemplateColumns: string,
@@ -154,7 +189,7 @@ export const PinHead = styled<{
154
189
  };
155
190
 
156
191
  return {
157
- background: $background,
192
+ backgroundColor: $background,
158
193
  height: `${$height}px`,
159
194
  display: 'grid',
160
195
  gridTemplateColumns: $gridTemplateColumns,
@@ -172,6 +207,121 @@ export const PinHead = styled<{
172
207
  },
173
208
  );
174
209
 
210
+ export const StyledStrokedLabelContainer = styled<{
211
+ $position: LabelEnhancerPositionT,
212
+ $labelOffset: number,
213
+ }>('div', ({$position, $theme, $labelOffset}) => {
214
+ const staticLabelOffset = 4;
215
+ const positions = {
216
+ top: {
217
+ left: `calc(50% + ${staticLabelOffset}px)`,
218
+ bottom: '100%',
219
+ alignItems: 'flex-end',
220
+ justifyContent: 'center',
221
+ textAlign: 'center',
222
+ },
223
+ bottom: {
224
+ left: '50%',
225
+ top: `calc(100% + ${staticLabelOffset}px + ${$labelOffset}px)`,
226
+ alignItems: 'flex-start',
227
+ justifyContent: 'center',
228
+ textAlign: 'center',
229
+ },
230
+ right: {
231
+ left: `calc(100% + ${staticLabelOffset}px)`,
232
+ top: '50%',
233
+ alignItems: 'center',
234
+ justifyContent: 'flex-start',
235
+ },
236
+ left: {
237
+ right: `calc(100% + ${staticLabelOffset}px)`,
238
+ top: '50%',
239
+ alignItems: 'center',
240
+ justifyContent: 'flex-end',
241
+ textAlign: 'right',
242
+ },
243
+ none: {},
244
+ };
245
+ return {
246
+ position: 'absolute',
247
+ width: '0px',
248
+ height: '0px',
249
+ pointerEvents: 'none',
250
+ display: 'flex',
251
+ ...positions[$position],
252
+ };
253
+ });
254
+
255
+ export const StyledStrokedLabel = styled<{
256
+ $stroked: boolean,
257
+ $position: LabelEnhancerPositionT,
258
+ $size: PinHeadSizeT,
259
+ }>('div', ({$theme, $size}) => {
260
+ const strokeWidth = 1.5;
261
+ const strokeColor = $theme.colors.backgroundPrimary;
262
+
263
+ const textShadow = `-${strokeWidth}px -${strokeWidth}px 0 ${strokeColor},
264
+ 0 -${strokeWidth}px 0 ${strokeColor},
265
+ ${strokeWidth}px -${strokeWidth}px 0 ${strokeColor},
266
+ ${strokeWidth}px 0 0 ${strokeColor},
267
+ ${strokeWidth}px ${strokeWidth}px 0 ${strokeColor},
268
+ 0 ${strokeWidth}px 0 ${strokeColor},
269
+ -${strokeWidth}px ${strokeWidth}px 0 ${strokeColor},
270
+ -${strokeWidth}px 0 0 ${strokeColor}`;
271
+
272
+ return {
273
+ display: 'flex',
274
+ ...$theme.typography[LABEL_SIZES[$size]],
275
+ color: $theme.colors.primaryA,
276
+ transition: `${$theme.animation.timing300} ${$theme.animation.easeOutCurve} all`,
277
+ textShadow,
278
+ pointerEvents: 'auto',
279
+ width: 'max-content',
280
+ maxWidth: '200px',
281
+ };
282
+ });
283
+
284
+ export const StyledBadgeEnhancerRoot = styled<{
285
+ $size: BadgeEnhancerSizeT,
286
+ $position: BadgePositionT,
287
+ }>('div', ({$theme, $size, $position}) => {
288
+ const {x, y} = $position;
289
+ return {
290
+ position: 'absolute',
291
+ ...$theme.typography.LabelSmall,
292
+ backgroundColor: $theme.colors.backgroundAccent,
293
+ color: $theme.colors.primaryB,
294
+ boxSizing: 'border-box',
295
+ right: 0,
296
+ transform: `translate(calc(100% + ${x}px), ${y}px)`,
297
+
298
+ transition: `${$theme.animation.timing300} ${$theme.animation.easeOutCurve} all`,
299
+ ...BADGE_ENHANCER_STYLES[$size],
300
+ };
301
+ });
302
+
303
+ export const RelativeContainer = styled<{}>('div', () => {
304
+ return {
305
+ position: 'relative',
306
+ };
307
+ });
308
+
309
+ export const StyledContentItem = styled<{
310
+ $color: string,
311
+ $height: number,
312
+ $size: PinHeadSizeT,
313
+ }>('div', ({$theme, $color, $height, $size}) => {
314
+ return {
315
+ ...$theme.typography[LABEL_SIZES[$size]],
316
+ display: 'flex',
317
+ alignItems: 'center',
318
+ textAlign: 'center',
319
+ lineHeight: `${$height}px`,
320
+ height: `${$height}px`,
321
+ color: $color,
322
+ };
323
+ });
324
+
175
325
  declare var __DEV__: boolean;
176
326
  declare var __NODE__: boolean;
177
327
  declare var __BROWSER__: boolean;