@justfixnyc/component-library 0.49.0 → 0.50.1
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 +50 -0
- package/dist/src/assets/index.es.css +50 -0
- package/dist/src/index.es.js +33 -1
- package/dist/src/index.js +33 -0
- package/dist/typings/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -604,6 +604,56 @@
|
|
|
604
604
|
transform: rotate(360deg);
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
+
.jfcl-select-button {
|
|
608
|
+
display: inline-flex;
|
|
609
|
+
margin-right: 0.75rem;
|
|
610
|
+
}
|
|
611
|
+
.jfcl-select-button:last-of-type {
|
|
612
|
+
margin-right: 0;
|
|
613
|
+
}
|
|
614
|
+
.jfcl-select-button.jfcl-select-button--is-disabled .jfcl-select-button__label {
|
|
615
|
+
pointer-events: none;
|
|
616
|
+
background-color: #f2f2f2;
|
|
617
|
+
border-color: #9a9898;
|
|
618
|
+
color: #676565;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.jfcl-select-button__input {
|
|
622
|
+
position: absolute;
|
|
623
|
+
width: 0px;
|
|
624
|
+
height: 0px;
|
|
625
|
+
opacity: 0;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.jfcl-select-button__label {
|
|
629
|
+
font-family: "Degular", Arial, Helvetica, sans-serif;
|
|
630
|
+
font-style: normal;
|
|
631
|
+
font-weight: 500;
|
|
632
|
+
font-size: 1.125rem;
|
|
633
|
+
line-height: 120%;
|
|
634
|
+
letter-spacing: 0.54px;
|
|
635
|
+
border-radius: 6px;
|
|
636
|
+
border: 1px solid #9a9898;
|
|
637
|
+
background: #faf8f4;
|
|
638
|
+
padding: 0.75rem;
|
|
639
|
+
cursor: pointer;
|
|
640
|
+
}
|
|
641
|
+
.jfcl-select-button__label:hover {
|
|
642
|
+
border: 2px solid #242323;
|
|
643
|
+
padding: 0.6875rem;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.jfcl-select-button__input:checked + .jfcl-select-button__label {
|
|
647
|
+
background-color: #c6d8ff;
|
|
648
|
+
}
|
|
649
|
+
@keyframes spin {
|
|
650
|
+
from {
|
|
651
|
+
transform: rotate(0deg);
|
|
652
|
+
}
|
|
653
|
+
to {
|
|
654
|
+
transform: rotate(360deg);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
607
657
|
.jfcl-text-input {
|
|
608
658
|
font-family: "Degular", Arial, Helvetica, sans-serif;
|
|
609
659
|
font-style: normal;
|
|
@@ -604,6 +604,56 @@
|
|
|
604
604
|
transform: rotate(360deg);
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
+
.jfcl-select-button {
|
|
608
|
+
display: inline-flex;
|
|
609
|
+
margin-right: 0.75rem;
|
|
610
|
+
}
|
|
611
|
+
.jfcl-select-button:last-of-type {
|
|
612
|
+
margin-right: 0;
|
|
613
|
+
}
|
|
614
|
+
.jfcl-select-button.jfcl-select-button--is-disabled .jfcl-select-button__label {
|
|
615
|
+
pointer-events: none;
|
|
616
|
+
background-color: #f2f2f2;
|
|
617
|
+
border-color: #9a9898;
|
|
618
|
+
color: #676565;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.jfcl-select-button__input {
|
|
622
|
+
position: absolute;
|
|
623
|
+
width: 0px;
|
|
624
|
+
height: 0px;
|
|
625
|
+
opacity: 0;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.jfcl-select-button__label {
|
|
629
|
+
font-family: "Degular", Arial, Helvetica, sans-serif;
|
|
630
|
+
font-style: normal;
|
|
631
|
+
font-weight: 500;
|
|
632
|
+
font-size: 1.125rem;
|
|
633
|
+
line-height: 120%;
|
|
634
|
+
letter-spacing: 0.54px;
|
|
635
|
+
border-radius: 6px;
|
|
636
|
+
border: 1px solid #9a9898;
|
|
637
|
+
background: #faf8f4;
|
|
638
|
+
padding: 0.75rem;
|
|
639
|
+
cursor: pointer;
|
|
640
|
+
}
|
|
641
|
+
.jfcl-select-button__label:hover {
|
|
642
|
+
border: 2px solid #242323;
|
|
643
|
+
padding: 0.6875rem;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.jfcl-select-button__input:checked + .jfcl-select-button__label {
|
|
647
|
+
background-color: #c6d8ff;
|
|
648
|
+
}
|
|
649
|
+
@keyframes spin {
|
|
650
|
+
from {
|
|
651
|
+
transform: rotate(0deg);
|
|
652
|
+
}
|
|
653
|
+
to {
|
|
654
|
+
transform: rotate(360deg);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
607
657
|
.jfcl-text-input {
|
|
608
658
|
font-family: "Degular", Arial, Helvetica, sans-serif;
|
|
609
659
|
font-style: normal;
|
package/dist/src/index.es.js
CHANGED
|
@@ -498,6 +498,38 @@ const RadioButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
498
498
|
});
|
|
499
499
|
RadioButton.displayName = 'RadioButton';
|
|
500
500
|
|
|
501
|
+
/**
|
|
502
|
+
* Accepts all `InputHTMLAttributes`
|
|
503
|
+
*/
|
|
504
|
+
const SelectButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
505
|
+
let {
|
|
506
|
+
className,
|
|
507
|
+
labelText,
|
|
508
|
+
disabled,
|
|
509
|
+
id,
|
|
510
|
+
...props
|
|
511
|
+
} = _ref;
|
|
512
|
+
const SelectButtonClassNames = classNames('jfcl-select-button', {
|
|
513
|
+
['jfcl-select-button--is-disabled']: disabled
|
|
514
|
+
}, className);
|
|
515
|
+
const generatedID = useId();
|
|
516
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
517
|
+
className: SelectButtonClassNames,
|
|
518
|
+
"data-testid": "jfcl-select-button"
|
|
519
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
520
|
+
ref: ref
|
|
521
|
+
}, props, {
|
|
522
|
+
id: id || generatedID,
|
|
523
|
+
className: "jfcl-select-button__input",
|
|
524
|
+
type: "radio"
|
|
525
|
+
})), /*#__PURE__*/React.createElement("label", {
|
|
526
|
+
htmlFor: id || generatedID,
|
|
527
|
+
className: "jfcl-select-button__label",
|
|
528
|
+
"data-testid": "jfcl-select-button__label"
|
|
529
|
+
}, labelText));
|
|
530
|
+
});
|
|
531
|
+
SelectButton.displayName = 'SelectButton';
|
|
532
|
+
|
|
501
533
|
/**
|
|
502
534
|
* Accepts all `InputHTMLAttributes`
|
|
503
535
|
*/
|
|
@@ -538,4 +570,4 @@ const TextInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
538
570
|
});
|
|
539
571
|
TextInput.displayName = 'TextInput';
|
|
540
572
|
|
|
541
|
-
export { Alert, Button, Checkbox, Dropdown, FormGroup, Icon, Link, RadioButton, TextInput };
|
|
573
|
+
export { Alert, Button, Checkbox, Dropdown, FormGroup, Icon, Link, RadioButton, SelectButton, TextInput };
|
package/dist/src/index.js
CHANGED
|
@@ -509,6 +509,38 @@ const RadioButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
509
509
|
});
|
|
510
510
|
RadioButton.displayName = 'RadioButton';
|
|
511
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Accepts all `InputHTMLAttributes`
|
|
514
|
+
*/
|
|
515
|
+
const SelectButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
516
|
+
let {
|
|
517
|
+
className,
|
|
518
|
+
labelText,
|
|
519
|
+
disabled,
|
|
520
|
+
id,
|
|
521
|
+
...props
|
|
522
|
+
} = _ref;
|
|
523
|
+
const SelectButtonClassNames = classNames__default["default"]('jfcl-select-button', {
|
|
524
|
+
['jfcl-select-button--is-disabled']: disabled
|
|
525
|
+
}, className);
|
|
526
|
+
const generatedID = React.useId();
|
|
527
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
528
|
+
className: SelectButtonClassNames,
|
|
529
|
+
"data-testid": "jfcl-select-button"
|
|
530
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({
|
|
531
|
+
ref: ref
|
|
532
|
+
}, props, {
|
|
533
|
+
id: id || generatedID,
|
|
534
|
+
className: "jfcl-select-button__input",
|
|
535
|
+
type: "radio"
|
|
536
|
+
})), /*#__PURE__*/React__default["default"].createElement("label", {
|
|
537
|
+
htmlFor: id || generatedID,
|
|
538
|
+
className: "jfcl-select-button__label",
|
|
539
|
+
"data-testid": "jfcl-select-button__label"
|
|
540
|
+
}, labelText));
|
|
541
|
+
});
|
|
542
|
+
SelectButton.displayName = 'SelectButton';
|
|
543
|
+
|
|
512
544
|
/**
|
|
513
545
|
* Accepts all `InputHTMLAttributes`
|
|
514
546
|
*/
|
|
@@ -557,4 +589,5 @@ exports.FormGroup = FormGroup;
|
|
|
557
589
|
exports.Icon = Icon;
|
|
558
590
|
exports.Link = Link;
|
|
559
591
|
exports.RadioButton = RadioButton;
|
|
592
|
+
exports.SelectButton = SelectButton;
|
|
560
593
|
exports.TextInput = TextInput;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export * from './Components/FormGroup/FormGroup';
|
|
|
7
7
|
export * from './Components/Icon/Icon';
|
|
8
8
|
export * from './Components/Link/Link';
|
|
9
9
|
export * from './Components/RadioButton/RadioButton';
|
|
10
|
+
export * from './Components/SelectButton/SelectButton';
|
|
10
11
|
export * from './Components/TextInput/TextInput';
|