Skip to content

Commit

Permalink
Tooltip fixed in pickers
Browse files Browse the repository at this point in the history
  • Loading branch information
grathor committed Apr 8, 2024
1 parent 8a29e42 commit 9409bca
Show file tree
Hide file tree
Showing 27 changed files with 111 additions and 109 deletions.
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"cSpell.words": ["inputlabelhelpprops"]
"editor.tabSize": 2
}
7 changes: 5 additions & 2 deletions example/src/components/FormValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default function FormValidator() {
label="Email"
required
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Hover text',
}}
onChange={handleValue}
Expand Down Expand Up @@ -353,7 +353,10 @@ export default function FormValidator() {
'matchRegexpCaseInSensitive:^(?!.*<script\\b[^>]*>.*<\\/script\\s*>).*$',
]}
value={values.regex}
customErrorMessages={{'matchRegexpCaseInSensitive:^(?!.*<script\\b[^>]*>.*<\\/script\\s*>).*$': 'Invalid data'}}
customErrorMessages={{
'matchRegexpCaseInSensitive:^(?!.*<script\\b[^>]*>.*<\\/script\\s*>).*$':
'Invalid data',
}}
/>
</Grid>
<Grid item xs={12} lg={3} xl={2}>
Expand Down
2 changes: 1 addition & 1 deletion example/src/components/InteractiveViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export default function InteractiveViews() {
fullWidth
readOnly={readOnly}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Please select multiple people from list',
}}
/>
Expand Down
20 changes: 10 additions & 10 deletions example/src/components/Pickers.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export default function Pickers() {
options={iconOptions}
isMulti={true}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
type: 'link',
link: 'https://unicef.github.io/',
}}
Expand All @@ -263,7 +263,7 @@ export default function Pickers() {
placeholder="Select people ..."
options={peopleOptions}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
type: 'link',
link: 'https://unicef.github.io/',
}}
Expand All @@ -279,7 +279,7 @@ export default function Pickers() {
options={peopleOptions}
isMulti
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
type: 'tooltip',
tooltipTitle: 'Please select multiple people from list',
}}
Expand Down Expand Up @@ -368,7 +368,7 @@ export default function Pickers() {
value={selectedDate}
onChange={handleDateChange}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Date picker',
}}
/>
Expand Down Expand Up @@ -405,7 +405,7 @@ export default function Pickers() {
onChange={handleDateChange}
showLabelHelp={true}
InputLabelProps={{ shrink: true, required: true }}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Time picker help text',
}}
/>
Expand All @@ -418,7 +418,7 @@ export default function Pickers() {
onChange={handleDateChange}
showLabelHelp={true}
InputLabelProps={{ shrink: true, required: true }}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Time picker help text',
}}
/>
Expand All @@ -431,7 +431,7 @@ export default function Pickers() {
onChange={handleDateChange}
showLabelHelp={true}
InputLabelProps={{ shrink: true, required: true }}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Time picker help text',
}}
/>
Expand All @@ -446,7 +446,7 @@ export default function Pickers() {
value={selectedDate}
onChange={handleDateChange}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Date and time',
}}
/>
Expand All @@ -457,7 +457,7 @@ export default function Pickers() {
value={selectedDate}
onChange={handleDateChange}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Date and time',
}}
/>
Expand All @@ -468,7 +468,7 @@ export default function Pickers() {
value={selectedDate}
onChange={handleDateChange}
showLabelHelp={true}
inputlabelhelpprops={{
InputLabelHelpProps={{
tooltipTitle: 'Date and time',
}}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/components/ActiveDatePicker/ActiveDatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveDatePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveDatePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -107,8 +107,8 @@ ActiveDatePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveDatePicker.defaultProps = {
Expand Down
8 changes: 4 additions & 4 deletions src/components/ActiveDateTimePicker/ActiveDateTimePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function ActiveDateTimePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -76,7 +76,7 @@ export default function ActiveDateTimePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -107,8 +107,8 @@ ActiveDateTimePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveDateTimePicker.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveDesktopDatePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveDesktopDatePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveDesktopDatePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveDesktopDatePicker.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveDesktopDateTimePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveDesktopDateTimePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveDesktopDateTimePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveDesktopDateTimePicker.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveDesktopTimePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveDesktopTimePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveDesktopTimePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveDesktopTimePicker.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveMobileDatePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveMobileDatePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveMobileDatePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveMobileDatePicker.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveMobileDateTimePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveMobileDateTimePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveMobileDateTimePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveMobileDateTimePicker.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveMobileTimePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveMobileTimePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveMobileTimePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveMobileTimePicker.defaultProps = {
Expand Down
8 changes: 4 additions & 4 deletions src/components/ActiveTimePicker/ActiveTimePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ActiveTimePicker({
value,
showLabelHelp,
InputLabelProps,
inputlabelhelpprops,
InputLabelHelpProps,
inputVariant,
interactiveMode,
readOnly,
Expand All @@ -75,7 +75,7 @@ export default function ActiveTimePicker({
<UTextField
showLabelHelp={showLabelHelp}
InputLabelProps={InputLabelProps}
inputlabelhelpprops={inputlabelhelpprops}
InputLabelHelpProps={InputLabelHelpProps}
variant={inputVariant}
readOnly={readOnly}
{...params}
Expand Down Expand Up @@ -106,8 +106,8 @@ ActiveTimePicker.propTypes = {
label: PropTypes.string,
/** Show label help */
showLabelHelp: PropTypes.bool,
/** Props applied to the input label help element. E.g inputlabelhelpprops={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
inputlabelhelpprops: PropTypes.object,
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
InputLabelHelpProps: PropTypes.object,
}

ActiveTimePicker.defaultProps = {
Expand Down
Loading

0 comments on commit 9409bca

Please sign in to comment.