@justfixnyc/component-library 0.50.1 → 0.51.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/src/assets/index.css +20 -2
- package/dist/src/assets/index.es.css +20 -2
- package/dist/src/index.es.js +8 -3
- package/dist/src/index.js +8 -3
- package/package.json +1 -1
|
@@ -632,6 +632,10 @@
|
|
|
632
632
|
font-size: 1.125rem;
|
|
633
633
|
line-height: 120%;
|
|
634
634
|
letter-spacing: 0.54px;
|
|
635
|
+
display: flex;
|
|
636
|
+
justify-content: center;
|
|
637
|
+
flex-grow: 1;
|
|
638
|
+
white-space: nowrap;
|
|
635
639
|
border-radius: 6px;
|
|
636
640
|
border: 1px solid #9a9898;
|
|
637
641
|
background: #faf8f4;
|
|
@@ -663,6 +667,17 @@
|
|
|
663
667
|
letter-spacing: 0.54px;
|
|
664
668
|
color: #242323;
|
|
665
669
|
margin-bottom: 2rem;
|
|
670
|
+
position: relative;
|
|
671
|
+
--input-padding-left: 9px;
|
|
672
|
+
}
|
|
673
|
+
.jfcl-text-input.jfcl-text-input--has-prefix {
|
|
674
|
+
--input-padding-left: 31.5px;
|
|
675
|
+
}
|
|
676
|
+
.jfcl-text-input .jfcl-text-input__prefix {
|
|
677
|
+
position: absolute;
|
|
678
|
+
left: 14px;
|
|
679
|
+
height: 44px;
|
|
680
|
+
line-height: 44px;
|
|
666
681
|
}
|
|
667
682
|
.jfcl-text-input .jfcl-text-input__input {
|
|
668
683
|
font-family: "Degular", Arial, Helvetica, sans-serif;
|
|
@@ -674,7 +689,10 @@
|
|
|
674
689
|
box-sizing: border-box;
|
|
675
690
|
width: 100%;
|
|
676
691
|
height: 44px;
|
|
677
|
-
padding: 10px
|
|
692
|
+
padding-top: 10px;
|
|
693
|
+
padding-bottom: 10px;
|
|
694
|
+
padding-right: 9px;
|
|
695
|
+
padding-left: var(--input-padding-left);
|
|
678
696
|
border-radius: 4px;
|
|
679
697
|
border: 1px solid #242323;
|
|
680
698
|
background: #faf8f4;
|
|
@@ -691,7 +709,7 @@
|
|
|
691
709
|
.jfcl-text-input .jfcl-text-input__input:active:not(:disabled) {
|
|
692
710
|
border-radius: 4px;
|
|
693
711
|
border: 2px solid #242323;
|
|
694
|
-
padding-left:
|
|
712
|
+
padding-left: calc(var(--input-padding-left) - 1px);
|
|
695
713
|
background: #ffffff;
|
|
696
714
|
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
|
|
697
715
|
}
|
|
@@ -632,6 +632,10 @@
|
|
|
632
632
|
font-size: 1.125rem;
|
|
633
633
|
line-height: 120%;
|
|
634
634
|
letter-spacing: 0.54px;
|
|
635
|
+
display: flex;
|
|
636
|
+
justify-content: center;
|
|
637
|
+
flex-grow: 1;
|
|
638
|
+
white-space: nowrap;
|
|
635
639
|
border-radius: 6px;
|
|
636
640
|
border: 1px solid #9a9898;
|
|
637
641
|
background: #faf8f4;
|
|
@@ -663,6 +667,17 @@
|
|
|
663
667
|
letter-spacing: 0.54px;
|
|
664
668
|
color: #242323;
|
|
665
669
|
margin-bottom: 2rem;
|
|
670
|
+
position: relative;
|
|
671
|
+
--input-padding-left: 9px;
|
|
672
|
+
}
|
|
673
|
+
.jfcl-text-input.jfcl-text-input--has-prefix {
|
|
674
|
+
--input-padding-left: 31.5px;
|
|
675
|
+
}
|
|
676
|
+
.jfcl-text-input .jfcl-text-input__prefix {
|
|
677
|
+
position: absolute;
|
|
678
|
+
left: 14px;
|
|
679
|
+
height: 44px;
|
|
680
|
+
line-height: 44px;
|
|
666
681
|
}
|
|
667
682
|
.jfcl-text-input .jfcl-text-input__input {
|
|
668
683
|
font-family: "Degular", Arial, Helvetica, sans-serif;
|
|
@@ -674,7 +689,10 @@
|
|
|
674
689
|
box-sizing: border-box;
|
|
675
690
|
width: 100%;
|
|
676
691
|
height: 44px;
|
|
677
|
-
padding: 10px
|
|
692
|
+
padding-top: 10px;
|
|
693
|
+
padding-bottom: 10px;
|
|
694
|
+
padding-right: 9px;
|
|
695
|
+
padding-left: var(--input-padding-left);
|
|
678
696
|
border-radius: 4px;
|
|
679
697
|
border: 1px solid #242323;
|
|
680
698
|
background: #faf8f4;
|
|
@@ -691,7 +709,7 @@
|
|
|
691
709
|
.jfcl-text-input .jfcl-text-input__input:active:not(:disabled) {
|
|
692
710
|
border-radius: 4px;
|
|
693
711
|
border: 2px solid #242323;
|
|
694
|
-
padding-left:
|
|
712
|
+
padding-left: calc(var(--input-padding-left) - 1px);
|
|
695
713
|
background: #ffffff;
|
|
696
714
|
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
|
|
697
715
|
}
|
package/dist/src/index.es.js
CHANGED
|
@@ -545,8 +545,11 @@ const TextInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
545
545
|
type = 'text',
|
|
546
546
|
...props
|
|
547
547
|
} = _ref;
|
|
548
|
+
const inputIsMoney = type === 'money';
|
|
549
|
+
const inputType = inputIsMoney ? 'text' : type;
|
|
548
550
|
const textInputWrapperClassNames = classNames('jfcl-text-input', {
|
|
549
|
-
['jfcl-text-input--is-invalid']: invalid
|
|
551
|
+
['jfcl-text-input--is-invalid']: invalid,
|
|
552
|
+
["jfcl-text-input--has-prefix"]: inputIsMoney
|
|
550
553
|
}, className);
|
|
551
554
|
const textInputClassNames = classNames('jfcl-text-input__input', {
|
|
552
555
|
["jfcl-text-input--size-".concat(size)]: size
|
|
@@ -560,12 +563,14 @@ const TextInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
560
563
|
invalidText: invalidText,
|
|
561
564
|
invalid: invalid,
|
|
562
565
|
labelFor: id
|
|
563
|
-
}), /*#__PURE__*/React.createElement("
|
|
566
|
+
}), inputIsMoney && /*#__PURE__*/React.createElement("span", {
|
|
567
|
+
className: "jfcl-text-input__prefix"
|
|
568
|
+
}, "$"), /*#__PURE__*/React.createElement("input", _extends({
|
|
564
569
|
ref: ref
|
|
565
570
|
}, props, {
|
|
566
571
|
id: id,
|
|
567
572
|
className: textInputClassNames,
|
|
568
|
-
type:
|
|
573
|
+
type: inputType
|
|
569
574
|
})));
|
|
570
575
|
});
|
|
571
576
|
TextInput.displayName = 'TextInput';
|
package/dist/src/index.js
CHANGED
|
@@ -556,8 +556,11 @@ const TextInput = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
556
556
|
type = 'text',
|
|
557
557
|
...props
|
|
558
558
|
} = _ref;
|
|
559
|
+
const inputIsMoney = type === 'money';
|
|
560
|
+
const inputType = inputIsMoney ? 'text' : type;
|
|
559
561
|
const textInputWrapperClassNames = classNames__default["default"]('jfcl-text-input', {
|
|
560
|
-
['jfcl-text-input--is-invalid']: invalid
|
|
562
|
+
['jfcl-text-input--is-invalid']: invalid,
|
|
563
|
+
["jfcl-text-input--has-prefix"]: inputIsMoney
|
|
561
564
|
}, className);
|
|
562
565
|
const textInputClassNames = classNames__default["default"]('jfcl-text-input__input', {
|
|
563
566
|
["jfcl-text-input--size-".concat(size)]: size
|
|
@@ -571,12 +574,14 @@ const TextInput = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
571
574
|
invalidText: invalidText,
|
|
572
575
|
invalid: invalid,
|
|
573
576
|
labelFor: id
|
|
574
|
-
}), /*#__PURE__*/React__default["default"].createElement("
|
|
577
|
+
}), inputIsMoney && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
578
|
+
className: "jfcl-text-input__prefix"
|
|
579
|
+
}, "$"), /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({
|
|
575
580
|
ref: ref
|
|
576
581
|
}, props, {
|
|
577
582
|
id: id,
|
|
578
583
|
className: textInputClassNames,
|
|
579
|
-
type:
|
|
584
|
+
type: inputType
|
|
580
585
|
})));
|
|
581
586
|
});
|
|
582
587
|
TextInput.displayName = 'TextInput';
|