@bento-core/facet-filter 1.0.1-c3dc.10 → 1.0.1-c3dc.11

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.
@@ -113,6 +113,9 @@ const SliderView = _ref => {
113
113
  }
114
114
  };
115
115
  const [sliderValue, setSliderValue] = (0, _react.useState)([getDisplayValue(lowerBoundValue), getDisplayValue(upperBoundValue)]);
116
+
117
+ // Check if slider text will be shown (to determine if unknownAgesSection needs bottom border)
118
+ const isSliderTextShown = sliderValue[0] > getDisplayValue(minLowerBound) || sliderValue[1] < getDisplayValue(maxUpperBound);
116
119
  (0, _react.useEffect)(() => {
117
120
  // Don't reset slider values if "Only" is selected - preserve current values
118
121
  if (unknownAges === 'only') {
@@ -230,7 +233,9 @@ const SliderView = _ref => {
230
233
  }, getDisplayValue(minLowerBound).toLocaleString()), /*#__PURE__*/_react.default.createElement(_core.Typography, {
231
234
  className: classes.upperBound
232
235
  }, minLowerBound === 0 && maxUpperBound === 0 ? '-' : maxUpperBound !== 0 ? getDisplayValue(maxUpperBound).toLocaleString() : '.'))), /*#__PURE__*/_react.default.createElement(_core.Box, {
233
- className: classes.unknownAgesSection
236
+ className: (0, _clsx.default)(classes.unknownAgesSection, {
237
+ [classes.unknownAgesSectionWithBottomBorder]: !isSliderTextShown
238
+ })
234
239
  }, /*#__PURE__*/_react.default.createElement(_core.Typography, {
235
240
  className: classes.unknownAgesTitle
236
241
  }, "UNKNOWN AGES:"), /*#__PURE__*/_react.default.createElement(_core.FormControl, {
@@ -420,7 +425,8 @@ const styles = () => ({
420
425
  marginTop: '8px',
421
426
  whiteSpace: 'nowrap',
422
427
  overflow: 'hidden',
423
- textOverflow: 'ellipsis'
428
+ textOverflow: 'ellipsis',
429
+ borderBottom: '1px solid #CCCCCC'
424
430
  },
425
431
  invalidSliderText: props => props.facet.style && props.facet.style.invalidSliderText ? props.facet.style.invalidSliderText : {
426
432
  color: '#D32F2F',
@@ -434,7 +440,8 @@ const styles = () => ({
434
440
  marginTop: '8px',
435
441
  whiteSpace: 'nowrap',
436
442
  overflow: 'hidden',
437
- textOverflow: 'ellipsis'
443
+ textOverflow: 'ellipsis',
444
+ borderBottom: '1px solid #CCCCCC'
438
445
  },
439
446
  sliderListItem: props => props.facet.style && props.facet.style.sliderListItem ? props.facet.style.sliderListItem : {
440
447
  height: '15px'
@@ -455,6 +462,9 @@ const styles = () => ({
455
462
  paddingBottom: '0px',
456
463
  borderTop: '1px solid #CCCCCC'
457
464
  },
465
+ unknownAgesSectionWithBottomBorder: props => props.facet.style && props.facet.style.unknownAgesSectionWithBottomBorder ? props.facet.style.unknownAgesSectionWithBottomBorder : {
466
+ borderBottom: '1px solid #CCCCCC'
467
+ },
458
468
  unknownAgesTitle: props => props.facet.style && props.facet.style.unknownAgesTitle ? props.facet.style.unknownAgesTitle : {
459
469
  fontFamily: 'Poppins',
460
470
  fontSize: '13px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/facet-filter",
3
- "version": "1.0.1-c3dc.10",
3
+ "version": "1.0.1-c3dc.11",
4
4
  "description": "### Bento core sidebar design:",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -122,6 +122,11 @@ const SliderView = ({
122
122
  getDisplayValue(lowerBoundValue),
123
123
  getDisplayValue(upperBoundValue),
124
124
  ]);
125
+
126
+ // Check if slider text will be shown (to determine if unknownAgesSection needs bottom border)
127
+ const isSliderTextShown = (sliderValue[0] > getDisplayValue(minLowerBound)
128
+ || sliderValue[1] < getDisplayValue(maxUpperBound));
129
+
125
130
  useEffect(() => {
126
131
  // Don't reset slider values if "Only" is selected - preserve current values
127
132
  if (unknownAges === 'only') {
@@ -256,7 +261,10 @@ const SliderView = ({
256
261
  </Box>
257
262
  </div>
258
263
  {/* Unknown Ages Section */}
259
- <Box className={classes.unknownAgesSection}>
264
+ <Box className={clsx(classes.unknownAgesSection, {
265
+ [classes.unknownAgesSectionWithBottomBorder]: !isSliderTextShown,
266
+ })}
267
+ >
260
268
  <Typography className={classes.unknownAgesTitle}>
261
269
  UNKNOWN AGES:
262
270
  </Typography>
@@ -487,6 +495,7 @@ const styles = () => ({
487
495
  whiteSpace: 'nowrap',
488
496
  overflow: 'hidden',
489
497
  textOverflow: 'ellipsis',
498
+ borderBottom: '1px solid #CCCCCC',
490
499
  }),
491
500
  invalidSliderText: (props) => (props.facet.style && props.facet.style.invalidSliderText
492
501
  ? props.facet.style.invalidSliderText
@@ -503,6 +512,7 @@ const styles = () => ({
503
512
  whiteSpace: 'nowrap',
504
513
  overflow: 'hidden',
505
514
  textOverflow: 'ellipsis',
515
+ borderBottom: '1px solid #CCCCCC',
506
516
  }),
507
517
  sliderListItem: (props) => (props.facet.style && props.facet.style.sliderListItem
508
518
  ? props.facet.style.sliderListItem
@@ -531,6 +541,12 @@ const styles = () => ({
531
541
  paddingBottom: '0px',
532
542
  borderTop: '1px solid #CCCCCC',
533
543
  }),
544
+ unknownAgesSectionWithBottomBorder: (props) => (
545
+ props.facet.style && props.facet.style.unknownAgesSectionWithBottomBorder
546
+ ? props.facet.style.unknownAgesSectionWithBottomBorder
547
+ : {
548
+ borderBottom: '1px solid #CCCCCC',
549
+ }),
534
550
  unknownAgesTitle: (props) => (props.facet.style && props.facet.style.unknownAgesTitle
535
551
  ? props.facet.style.unknownAgesTitle
536
552
  : {