pebble-web 2.5.0 → 2.7.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/dist/components/styles/Date.styles.d.ts +1 -0
- package/dist/components/typings/DateInput.d.ts +1 -0
- package/dist/pebble-web.dev.js +134 -132
- package/dist/pebble-web.dev.js.map +1 -1
- package/dist/pebble-web.es.dev.js +43 -37
- package/dist/pebble-web.es.dev.js.map +1 -1
- package/dist/pebble-web.es.js +35 -29
- package/dist/pebble-web.es.js.map +1 -1
- package/dist/pebble-web.js +126 -124
- package/dist/pebble-web.js.map +1 -1
- package/dist/pebble-web.module.dev.js +134 -132
- package/dist/pebble-web.module.dev.js.map +1 -1
- package/dist/pebble-web.module.js +126 -124
- package/dist/pebble-web.module.js.map +1 -1
- package/dist/pebble-web.umd.dev.js +134 -132
- package/dist/pebble-web.umd.dev.js.map +1 -1
- package/dist/pebble-web.umd.js +126 -124
- package/dist/pebble-web.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/components/DateInput.tsx +19 -14
- package/src/components/Sidebar.tsx +32 -61
- package/src/components/__tests__/dateInput.test.tsx +6 -5
- package/src/components/styles/Date.styles.ts +10 -0
- package/src/components/styles/Sidebar.styles.ts +0 -1
- package/src/components/typings/DateInput.ts +1 -0
- package/src/utils/animation.ts +1 -1
package/dist/pebble-web.es.js
CHANGED
|
@@ -994,7 +994,7 @@ const animationConfig = {
|
|
|
994
994
|
pointerEvents: "none"
|
|
995
995
|
},
|
|
996
996
|
config: (_a, motion) => motion === "leave" ? {
|
|
997
|
-
duration:
|
|
997
|
+
duration: 80
|
|
998
998
|
} : {
|
|
999
999
|
duration: 200
|
|
1000
1000
|
}
|
|
@@ -1205,6 +1205,12 @@ const wrapperStyle$3 = /*#__PURE__*/css( {
|
|
|
1205
1205
|
name: "h7juj2-wrapperStyle",
|
|
1206
1206
|
styles: "margin-bottom:20px;;label:wrapperStyle;"
|
|
1207
1207
|
} );
|
|
1208
|
+
const errorStyle = /*#__PURE__*/css({ ...typography.s.bold,
|
|
1209
|
+
backgroundColor: colors.red.lightest,
|
|
1210
|
+
color: colors.red.darker,
|
|
1211
|
+
textAlign: "left",
|
|
1212
|
+
padding: "11px 30px"
|
|
1213
|
+
}, ";label:errorStyle;" + ( "" ));
|
|
1208
1214
|
|
|
1209
1215
|
function getColor(error, success, isUnderlineColor) {
|
|
1210
1216
|
let color = colors.gray.dark;
|
|
@@ -1424,7 +1430,8 @@ class DateInput extends PureComponent {
|
|
|
1424
1430
|
inputProps,
|
|
1425
1431
|
placeholder,
|
|
1426
1432
|
value: propsValue,
|
|
1427
|
-
disabled
|
|
1433
|
+
disabled,
|
|
1434
|
+
errorMessage
|
|
1428
1435
|
} = this.props;
|
|
1429
1436
|
return /*#__PURE__*/createElement(DropDown, {
|
|
1430
1437
|
dropDownClassName: dropDownClassName,
|
|
@@ -1441,7 +1448,7 @@ class DateInput extends PureComponent {
|
|
|
1441
1448
|
onChange: noop,
|
|
1442
1449
|
type: "tel",
|
|
1443
1450
|
value: value,
|
|
1444
|
-
placeholder:
|
|
1451
|
+
placeholder: placeholder,
|
|
1445
1452
|
onClick: () => {
|
|
1446
1453
|
if (disabled) return;
|
|
1447
1454
|
toggleDropdown();
|
|
@@ -1461,7 +1468,7 @@ class DateInput extends PureComponent {
|
|
|
1461
1468
|
modifiers: modifiers
|
|
1462
1469
|
}, ({
|
|
1463
1470
|
toggle
|
|
1464
|
-
}) => /*#__PURE__*/createElement(Calendar, Object.assign({
|
|
1471
|
+
}) => /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Calendar, Object.assign({
|
|
1465
1472
|
hideShadow: true,
|
|
1466
1473
|
className: dateClass,
|
|
1467
1474
|
selected: propsValue ? new Date(propsValue) : undefined
|
|
@@ -1471,7 +1478,9 @@ class DateInput extends PureComponent {
|
|
|
1471
1478
|
this.onCalendarDateChange(date);
|
|
1472
1479
|
toggle();
|
|
1473
1480
|
}
|
|
1474
|
-
}))
|
|
1481
|
+
})), errorMessage && /*#__PURE__*/createElement("div", {
|
|
1482
|
+
className: errorStyle
|
|
1483
|
+
}, errorMessage)));
|
|
1475
1484
|
}
|
|
1476
1485
|
}
|
|
1477
1486
|
function checkDateInputSupport() {
|
|
@@ -3190,7 +3199,6 @@ const closeStyle = /*#__PURE__*/css({
|
|
|
3190
3199
|
}
|
|
3191
3200
|
}, ";label:closeStyle;" + ( "" ));
|
|
3192
3201
|
const sidebarStyle = /*#__PURE__*/css({
|
|
3193
|
-
transition: `transform 200ms ${constants.animationCurve}`,
|
|
3194
3202
|
backgroundColor: colors.white.base,
|
|
3195
3203
|
position: "fixed",
|
|
3196
3204
|
top: 0,
|
|
@@ -3207,13 +3215,17 @@ const sidebarStyle = /*#__PURE__*/css({
|
|
|
3207
3215
|
|
|
3208
3216
|
const transitionProps = {
|
|
3209
3217
|
from: {
|
|
3210
|
-
opacity: 0
|
|
3218
|
+
opacity: 0,
|
|
3219
|
+
transform: "translateX(100%)"
|
|
3211
3220
|
},
|
|
3212
3221
|
enter: {
|
|
3213
|
-
opacity: 1
|
|
3222
|
+
opacity: 1,
|
|
3223
|
+
transform: "translateX(0)"
|
|
3214
3224
|
},
|
|
3215
3225
|
leave: {
|
|
3216
|
-
opacity: 0
|
|
3226
|
+
opacity: 0,
|
|
3227
|
+
transform: "translateX(100%)",
|
|
3228
|
+
pointerEvents: "none"
|
|
3217
3229
|
}
|
|
3218
3230
|
};
|
|
3219
3231
|
class SideBar extends PureComponent {
|
|
@@ -3255,38 +3267,32 @@ class SideBar extends PureComponent {
|
|
|
3255
3267
|
onOutsideClick,
|
|
3256
3268
|
closeOnOutsideClick
|
|
3257
3269
|
} = this.props;
|
|
3258
|
-
const
|
|
3259
|
-
width
|
|
3260
|
-
transform: isOpen ? `translateX(0)` : `translateX(${width}px)`
|
|
3261
|
-
}, ";label:SideBar;" + ( "" ));
|
|
3262
|
-
const _sidebarStyle = cx(_sidebarOverride, sidebarStyle, /*#__PURE__*/css({
|
|
3263
|
-
transform: isOpen ? `translateX(0)` : `translateX(100%)`
|
|
3270
|
+
const _sidebarStyle = cx(sidebarStyle, /*#__PURE__*/css({
|
|
3271
|
+
width
|
|
3264
3272
|
}, ";label:SideBar;" + ( "" )));
|
|
3265
|
-
return /*#__PURE__*/createElement(
|
|
3266
|
-
|
|
3267
|
-
}, transitionProps, {
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3273
|
+
return /*#__PURE__*/createElement(MountTransition, Object.assign({
|
|
3274
|
+
visible: isOpen
|
|
3275
|
+
}, transitionProps), styles => /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(animated.div, {
|
|
3276
|
+
style: {
|
|
3277
|
+
opacity: styles.opacity
|
|
3278
|
+
},
|
|
3271
3279
|
className: sidebarWrapperStyle,
|
|
3272
3280
|
onClick: onOutsideClick || closeOnOutsideClick ? this.onOutsideClick : undefined,
|
|
3273
3281
|
"data-testid": "shadowArea"
|
|
3274
|
-
})
|
|
3275
|
-
className: _sidebarStyle
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
}, transitionProps), show => show && (styles => /*#__PURE__*/createElement(animated.div, {
|
|
3279
|
-
style: styles,
|
|
3282
|
+
}), /*#__PURE__*/createElement(animated.div, {
|
|
3283
|
+
className: _sidebarStyle,
|
|
3284
|
+
style: styles
|
|
3285
|
+
}, /*#__PURE__*/createElement("div", {
|
|
3280
3286
|
className: closeStyle,
|
|
3281
3287
|
onClick: onClose
|
|
3282
3288
|
}, /*#__PURE__*/createElement("i", {
|
|
3283
3289
|
className: "pi pi-close"
|
|
3284
|
-
}), /*#__PURE__*/createElement(Ink, null))
|
|
3290
|
+
}), /*#__PURE__*/createElement(Ink, null)), /*#__PURE__*/createElement("div", {
|
|
3285
3291
|
style: {
|
|
3286
3292
|
overflowY: "scroll",
|
|
3287
3293
|
height: "100vh"
|
|
3288
3294
|
}
|
|
3289
|
-
}, children)));
|
|
3295
|
+
}, children))));
|
|
3290
3296
|
}
|
|
3291
3297
|
}
|
|
3292
3298
|
SideBar.defaultProps = {
|