cynx-ui 1.3.3 → 1.3.5
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.
|
@@ -519,8 +519,10 @@ export function TimePicker({
|
|
|
519
519
|
const presets24 = ['00:00', '07:00', '08:00', '09:00', '12:00', '18:00', '23:00'];
|
|
520
520
|
const presets12 = ['07:00 AM', '09:00 AM', '12:00 PM', '03:00 PM', '06:00 PM', '11:00 PM'];
|
|
521
521
|
|
|
522
|
-
const inputHeight =
|
|
523
|
-
|
|
522
|
+
const inputHeight = style?.height
|
|
523
|
+
? (typeof style.height === 'number' ? `${style.height}px` : style.height)
|
|
524
|
+
: (size === 'xs' ? '24px' : (size === 'sm' ? '32px' : '38px'));
|
|
525
|
+
const fontSize = (size === 'xs' || (style?.height && parseInt(style.height) <= 26)) ? '.72rem' : (size === 'sm' ? '.78rem' : '.85rem');
|
|
524
526
|
|
|
525
527
|
return (
|
|
526
528
|
<div
|
|
@@ -580,8 +582,8 @@ export function TimePicker({
|
|
|
580
582
|
maxWidth: '100%',
|
|
581
583
|
boxSizing: 'border-box',
|
|
582
584
|
height: inputHeight,
|
|
583
|
-
paddingLeft: displayClockIcon ? 28 : 10,
|
|
584
|
-
paddingRight: 26,
|
|
585
|
+
paddingLeft: displayClockIcon ? (size === 'xs' ? 22 : 28) : (size === 'xs' ? 6 : 10),
|
|
586
|
+
paddingRight: size === 'xs' ? 18 : 26,
|
|
585
587
|
border: `1px solid ${open ? 'var(--accent)' : 'var(--bd, var(--border, #d7d8e0))'}`,
|
|
586
588
|
borderRadius: 'var(--rads, 8px)',
|
|
587
589
|
fontSize: fontSize,
|