@hitachivantara/uikit-react-core 5.38.1 → 5.38.2
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/cjs/components/Banner/Banner.cjs.map +1 -1
- package/dist/cjs/components/Banner/BannerContent/BannerContent.cjs.map +1 -1
- package/dist/cjs/components/BaseCheckBox/BaseCheckBox.cjs.map +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.cjs +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.cjs.map +1 -1
- package/dist/cjs/components/BaseRadio/BaseRadio.cjs.map +1 -1
- package/dist/cjs/components/BaseSwitch/BaseSwitch.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.styles.cjs +7 -18
- package/dist/cjs/components/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Content/Content.cjs.map +1 -1
- package/dist/cjs/components/Card/Header/Header.cjs.map +1 -1
- package/dist/cjs/components/Container/Container.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Actions/Actions.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Content/Content.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/Grid/Grid.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs.map +1 -1
- package/dist/cjs/components/Radio/Radio.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/SnackbarContent/SnackbarContent.cjs.map +1 -1
- package/dist/cjs/components/Switch/Switch.cjs.map +1 -1
- package/dist/cjs/components/Tab/Tab.cjs.map +1 -1
- package/dist/esm/components/Banner/Banner.js.map +1 -1
- package/dist/esm/components/Banner/BannerContent/BannerContent.js.map +1 -1
- package/dist/esm/components/BaseCheckBox/BaseCheckBox.js.map +1 -1
- package/dist/esm/components/BaseInput/BaseInput.js +1 -1
- package/dist/esm/components/BaseInput/BaseInput.js.map +1 -1
- package/dist/esm/components/BaseRadio/BaseRadio.js.map +1 -1
- package/dist/esm/components/BaseSwitch/BaseSwitch.js.map +1 -1
- package/dist/esm/components/Button/Button.styles.js +7 -18
- package/dist/esm/components/Button/Button.styles.js.map +1 -1
- package/dist/esm/components/Card/Content/Content.js.map +1 -1
- package/dist/esm/components/Card/Header/Header.js.map +1 -1
- package/dist/esm/components/Container/Container.js.map +1 -1
- package/dist/esm/components/Dialog/Actions/Actions.js.map +1 -1
- package/dist/esm/components/Dialog/Content/Content.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Grid/Grid.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/Radio/Radio.js.map +1 -1
- package/dist/esm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/components/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/components/Tab/Tab.js.map +1 -1
- package/dist/types/index.d.ts +19 -25
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackbarContent.js","sources":["../../../../../src/components/Snackbar/SnackbarContent/SnackbarContent.tsx"],"sourcesContent":["import { forwardRef, isValidElement } from \"react\";\n\nimport SnackbarContent, {\n SnackbarContentProps as MuiSnackbarContentProps,\n} from \"@mui/material/SnackbarContent\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { setId } from \"@core/utils/setId\";\nimport { iconVariant } from \"@core/utils/iconVariant\";\nimport {
|
|
1
|
+
{"version":3,"file":"SnackbarContent.js","sources":["../../../../../src/components/Snackbar/SnackbarContent/SnackbarContent.tsx"],"sourcesContent":["import { forwardRef, isValidElement } from \"react\";\n\nimport SnackbarContent, {\n SnackbarContentProps as MuiSnackbarContentProps,\n} from \"@mui/material/SnackbarContent\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { setId } from \"@core/utils/setId\";\nimport { iconVariant } from \"@core/utils/iconVariant\";\nimport {\n HvActionsGeneric,\n HvActionGeneric,\n} from \"@core/components/ActionsGeneric\";\nimport { HvButtonVariant } from \"@core/components/Button\";\nimport { useTheme } from \"@core/hooks/useTheme\";\n\nimport { useDefaultProps } from \"@core/hooks\";\n\nimport { staticClasses, useClasses } from \"./SnackbarContent.styles\";\nimport { HvSnackbarVariant } from \"../types\";\n\nexport { staticClasses as snackbarContentClasses };\n\nexport type HvSnackbarContentClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvSnackbarContentProps\n extends Omit<MuiSnackbarContentProps, \"variant\" | \"action\" | \"classes\"> {\n /** The message to display. */\n label?: React.ReactNode;\n /** Variant of the snackbar. */\n variant?: HvSnackbarVariant;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Action to display. */\n action?: React.ReactNode | HvActionGeneric;\n /** The callback function ran when an action is triggered, receiving `action` as param */\n actionCallback?: (\n event: React.SyntheticEvent,\n id: string,\n action: HvActionGeneric\n ) => void;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvSnackbarContentClasses;\n}\n\nexport const HvSnackbarContent = forwardRef<\n HTMLDivElement,\n HvSnackbarContentProps\n>((props: HvSnackbarContentProps, ref) => {\n const {\n className,\n id,\n classes: classesProp,\n label,\n variant = \"default\",\n showIcon,\n customIcon,\n action,\n actionCallback,\n ...others\n } = useDefaultProps(\"HvSnackbarContent\", props);\n\n const icon = customIcon || (showIcon && iconVariant(variant, \"base_dark\"));\n const innerAction: any = isValidElement(action) ? action : [action];\n\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n return (\n <SnackbarContent\n ref={ref}\n id={id}\n classes={{\n root: classes.root,\n message: classes.message,\n }}\n className={cx(classes?.[variant], className)}\n message={\n <div id={setId(id, \"message\")} className={classes.messageSpan}>\n {icon && <div className={classes.iconVariant}>{icon}</div>}\n <div className={classes.messageText}>{label}</div>\n {action && (\n <div id={setId(id, \"action\")} className={classes.action}>\n <HvActionsGeneric\n id={id}\n category={\n activeTheme?.snackbar.actionButtonVariant as HvButtonVariant\n }\n actions={innerAction}\n actionsCallback={actionCallback}\n />\n </div>\n )}\n </div>\n }\n {...others}\n />\n );\n});\n"],"names":["HvSnackbarContent","forwardRef","props","ref","className","id","classes","classesProp","label","variant","showIcon","customIcon","action","actionCallback","others","useDefaultProps","icon","iconVariant","innerAction","isValidElement","cx","useClasses","activeTheme","useTheme","root","message","setId","messageSpan","messageText","snackbar","actionButtonVariant"],"mappings":";;;;;;;;;;AA+CO,MAAMA,oBAAoBC,WAG/B,CAACC,OAA+BC,QAAQ;AAClC,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC,UAAU;AAAA,IACVC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,qBAAqBb,KAAK;AAE9C,QAAMc,OAAOL,cAAeD,YAAYO,YAAYR,SAAS,WAAW;AACxE,QAAMS,cAAmBC,eAAeP,MAAM,IAAIA,SAAS,CAACA,MAAM;AAE5D,QAAA;AAAA,IAAEN;AAAAA,IAASc;AAAAA,EAAAA,IAAOC,WAAWd,WAAW;AACxC,QAAA;AAAA,IAAEe;AAAAA,MAAgBC,SAAS;AAEjC,SACG,oBAAA,iBAAA,EACC,KACA,IACA,SAAS;AAAA,IACPC,MAAMlB,QAAQkB;AAAAA,IACdC,SAASnB,QAAQmB;AAAAA,EAAAA,GAEnB,WAAWL,GAAGd,UAAUG,OAAO,GAAGL,SAAS,GAC3C,SACG,qBAAA,OAAA,EAAI,IAAIsB,MAAMrB,IAAI,SAAS,GAAG,WAAWC,QAAQqB,aAC/CX,UAAAA;AAAAA,IAAAA,QAAS,oBAAA,OAAA,EAAI,WAAWV,QAAQW,aAAcD,UAAK,MAAA;AAAA,IACnD,oBAAA,OAAA,EAAI,WAAWV,QAAQsB,aAAcpB,UAAM,OAAA;AAAA,IAC3CI,8BACE,OAAI,EAAA,IAAIc,MAAMrB,IAAI,QAAQ,GAAG,WAAWC,QAAQM,QAC/C,8BAAC,kBACC,EAAA,IACA,UACEU,aAAaO,SAASC,qBAExB,SAASZ,aACT,iBAAiBL,eAAAA,CAAe,EAEpC,CAAA;AAAA,EAAA,GAEJ,GAEEC,GAAAA,OACJ,CAAA;AAEN,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sources":["../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import React, { forwardRef, useCallback } from \"react\";\n\nimport { SwitchProps as MuiSwitchProps } from \"@mui/material\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { useControlled } from \"@core/hooks/useControlled\";\nimport { setId } from \"@core/utils/setId\";\nimport {\n HvWarningText,\n HvLabelProps,\n HvFormStatus,\n HvFormElement,\n HvLabel,\n} from \"@core/components/Forms\";\nimport { HvBaseSwitch } from \"@core/components/BaseSwitch\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { isInvalid } from \"@core/components/Forms/FormElement/validationStates\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./Switch.styles\";\n\nexport { staticClasses as switchClasses };\n\nexport type HvSwitchClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvSwitchProps\n extends Omit<MuiSwitchProps, \"onChange\" | \"classes\">,\n HvBaseProps<HTMLButtonElement, \"onChange\" | \"color\"> {\n /**\n * A Jss Object used to override or extend the styles applied to the switch.\n */\n classes?: HvSwitchClasses;\n /**\n * The form element name.\n */\n name?: string;\n /**\n * The value of the form element.\n *\n * Is up to the application's logic when to consider the submission of this value.\n * Generally it should be used only when the switch is neither unchecked nor indeterminate.\n *\n * The default value is \"on\".\n */\n value?: any;\n /**\n * The label of the form element.\n *\n * The form element must be labeled for accessibility reasons.\n * If not provided, an aria-label or aria-labelledby must be inputted via inputProps.\n */\n label?: React.ReactNode;\n /**\n * Properties passed on to the label element.\n */\n labelProps?: HvLabelProps;\n /**\n * Indicates that the form element is disabled.\n */\n disabled?: boolean;\n /**\n * Indicates that the form element is not editable.\n */\n readOnly?: boolean;\n /**\n * Indicates that user input is required on the form element.\n */\n required?: boolean;\n /**\n * If `true` the switch is selected, if set to `false` the switch is not selected.\n *\n * When defined the switch state becomes controlled.\n */\n checked?: boolean;\n /**\n * When uncontrolled, defines the initial checked state.\n */\n defaultChecked?: boolean;\n /**\n * The status of the form element.\n *\n * Valid is correct, invalid is incorrect and standBy means no validations have run.\n *\n * When uncontrolled and unspecified it will default to \"standBy\" and change to either \"valid\"\n * or \"invalid\" after any change to `checked`, depending of the values of both `required` and `checked`.\n */\n status?: HvFormStatus;\n /**\n * The error message to show when the validation status is \"invalid\".\n *\n * Defaults to \"Required\" when the status is uncontrolled and no `aria-errormessage` is provided.\n */\n statusMessage?: string;\n /**\n * Identifies the element that provides an error message for the switch.\n *\n * Will only be used when the validation status is invalid.\n */\n \"aria-errormessage\"?: string;\n /**\n * The callback fired when the switch is pressed.\n */\n onChange?: (event: React.ChangeEvent, checked: boolean, value: any) => void;\n /**\n * Properties passed on to the input element.\n */\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n /** @ignore */\n ref?: MuiSwitchProps[\"ref\"];\n /** @ignore */\n component?: MuiSwitchProps[\"component\"];\n}\n\n/**\n * A Switch is <b>binary</b> and work as a digital on/off button.\n *\n * Use when two states are <b>opposite</b> and to trigger immediate\n * changes in the system.\n */\nexport const HvSwitch = forwardRef<HTMLButtonElement, HvSwitchProps>(\n (props, ref) => {\n const {\n classes: classesProp,\n className,\n\n id,\n name,\n value = \"on\",\n required = false,\n readOnly = false,\n disabled = false,\n\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n labelProps,\n\n checked,\n defaultChecked = false,\n\n onChange,\n\n status,\n statusMessage,\n \"aria-errormessage\": ariaErrorMessage,\n\n inputProps,\n\n ...others\n } = useDefaultProps(\"HvSwitch\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const elementId = useUniqueId(id, \"hvswitch\");\n\n const [isChecked, setIsChecked] = useControlled(\n checked,\n Boolean(defaultChecked)\n );\n\n const [validationState, setValidationState] = useControlled(\n status,\n \"standBy\"\n );\n\n const [validationMessage] = useControlled(statusMessage, \"Required\");\n\n const onLocalChange = useCallback(\n (evt, newChecked) => {\n setIsChecked(() => {\n // this will only run if uncontrolled\n if (required && !newChecked) {\n setValidationState(\"invalid\");\n } else {\n setValidationState(\"valid\");\n }\n\n return newChecked;\n });\n\n onChange?.(evt, newChecked, value);\n },\n [onChange, required, setIsChecked, setValidationState, value]\n );\n\n // the error message area will only be created if:\n // - an external element that provides an error message isn't identified via aria-errormessage AND\n // - both status and statusMessage properties are being controlled OR\n // - status is uncontrolled and required is true\n const canShowError =\n ariaErrorMessage == null &&\n ((status !== undefined && statusMessage !== undefined) ||\n (status === undefined && required));\n\n const isStateInvalid = isInvalid(validationState);\n\n let errorMessageId: string | undefined;\n if (isStateInvalid) {\n errorMessageId = canShowError\n ? setId(elementId, \"error\")\n : ariaErrorMessage;\n }\n\n return (\n <HvFormElement\n id={id}\n name={name}\n status={validationState}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n className={cx(classes.root, className)}\n >\n {label && (\n <HvLabel\n id={setId(elementId, \"label\")}\n htmlFor={setId(elementId, \"input\")}\n label={label}\n className={classes.label}\n {...labelProps}\n />\n )}\n <div\n className={cx(classes.switchContainer, {\n [classes.invalidSwitch]: isStateInvalid,\n })}\n >\n <HvBaseSwitch\n ref={ref}\n id={label ? setId(elementId, \"input\") : setId(id, \"input\")}\n name={name}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n onChange={onLocalChange}\n value={value}\n checked={isChecked}\n inputProps={{\n \"aria-invalid\": isStateInvalid ? true : undefined,\n \"aria-errormessage\": errorMessageId,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...inputProps,\n }}\n {...others}\n />\n </div>\n {canShowError && (\n <HvWarningText\n id={setId(elementId, \"error\")}\n className={classes.error}\n disableBorder\n disableAdornment\n hideText\n >\n {validationMessage}\n </HvWarningText>\n )}\n </HvFormElement>\n );\n }\n);\n"],"names":["HvSwitch","forwardRef","props","ref","classes","classesProp","className","id","name","value","required","readOnly","disabled","label","ariaLabel","ariaLabelledBy","ariaDescribedBy","labelProps","checked","defaultChecked","onChange","status","statusMessage","ariaErrorMessage","inputProps","others","useDefaultProps","cx","useClasses","elementId","useUniqueId","isChecked","setIsChecked","useControlled","Boolean","validationState","setValidationState","validationMessage","onLocalChange","useCallback","evt","newChecked","canShowError","undefined","isStateInvalid","isInvalid","errorMessageId","setId","root","switchContainer","invalidSwitch","error"],"mappings":";;;;;;;;;;;;;AAwHO,MAAMA,WAAWC,WACtB,CAACC,OAAOC,QAAQ;AACR,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IAEAC;AAAAA,IACAC;AAAAA,IACAC,QAAQ;AAAA,IACRC,WAAW;AAAA,IACXC,WAAW;AAAA,IACXC,WAAW;AAAA,IAEXC;AAAAA,IACA,cAAcC;AAAAA,IACd,mBAAmBC;AAAAA,IACnB,oBAAoBC;AAAAA,IACpBC;AAAAA,IAEAC;AAAAA,IACAC,iBAAiB;AAAA,IAEjBC;AAAAA,IAEAC;AAAAA,IACAC;AAAAA,IACA,qBAAqBC;AAAAA,IAErBC;AAAAA,IAEA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,YAAYxB,KAAK;AAE/B,QAAA;AAAA,IAAEE;AAAAA,IAASuB;AAAAA,EAAAA,IAAOC,WAAWvB,WAAW;AAExCwB,QAAAA,YAAYC,YAAYvB,IAAI,UAAU;AAEtC,QAAA,CAACwB,WAAWC,YAAY,IAAIC,cAChCf,SACAgB,QAAQf,cAAc,CACxB;AAEA,QAAM,CAACgB,iBAAiBC,kBAAkB,IAAIH,cAC5CZ,QACA,SACF;AAEA,QAAM,CAACgB,iBAAiB,IAAIJ,cAAcX,eAAe,UAAU;AAEnE,QAAMgB,gBAAgBC,YACpB,CAACC,KAAKC,eAAe;AACnBT,iBAAa,MAAM;AAEbtB,UAAAA,YAAY,CAAC+B,YAAY;AAC3BL,2BAAmB,SAAS;AAAA,MAAA,OACvB;AACLA,2BAAmB,OAAO;AAAA,MAC5B;AAEOK,aAAAA;AAAAA,IAAAA,CACR;AAEUD,eAAAA,KAAKC,YAAYhC,KAAK;AAAA,EAAA,GAEnC,CAACW,UAAUV,UAAUsB,cAAcI,oBAAoB3B,KAAK,CAC9D;AAMMiC,QAAAA,eACJnB,oBAAoB,SAClBF,WAAWsB,UAAarB,kBAAkBqB,UACzCtB,WAAWsB,UAAajC;AAEvBkC,QAAAA,iBAAiBC,UAAUV,eAAe;AAE5CW,MAAAA;AACJ,MAAIF,gBAAgB;AAClBE,qBAAiBJ,eACbK,MAAMlB,WAAW,OAAO,IACxBN;AAAAA,EACN;AAEA,SACG,qBAAA,eAAA,EACC,IACA,MACA,QAAQY,iBACR,UACA,UACA,UACA,WAAWR,GAAGvB,QAAQ4C,MAAM1C,SAAS,GAEpCO,UAAAA;AAAAA,IAAAA,6BACE,SACC,EAAA,IAAIkC,MAAMlB,WAAW,OAAO,GAC5B,SAASkB,MAAMlB,WAAW,OAAO,GACjC,OACA,WAAWzB,QAAQS,OACnB,GAAII,YAEP;AAAA,IACA,oBAAA,OAAA,EACC,WAAWU,GAAGvB,QAAQ6C,iBAAiB;AAAA,MACrC,CAAC7C,QAAQ8C,aAAa,GAAGN;AAAAA,IAC1B,CAAA,GAED,UAAA,oBAAC,cACC,EAAA,KACA,IAAI/B,QAAQkC,MAAMlB,WAAW,OAAO,IAAIkB,MAAMxC,IAAI,OAAO,GACzD,MACA,UACA,UACA,UACA,UAAU+B,eACV,OACA,SAASP,WACT,YAAY;AAAA,MACV,gBAAgBa,iBAAiB,OAAOD;AAAAA,MACxC,qBAAqBG;AAAAA,MACrB,cAAchC;AAAAA,MACd,mBAAmBC;AAAAA,MACnB,oBAAoBC;AAAAA,MACpB,GAAGQ;AAAAA,IAAAA,GAEDC,GAAAA,OAAO,CAAA,GAEf;AAAA,IACCiB,gBACE,oBAAA,eAAA,EACC,IAAIK,MAAMlB,WAAW,OAAO,GAC5B,WAAWzB,QAAQ+C,OACnB,eAAa,MACb,kBAAgB,MAChB,UAAQ,MAEPd,UACH,mBAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CACF;"}
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import React, { forwardRef, useCallback } from \"react\";\n\nimport { SwitchProps as MuiSwitchProps } from \"@mui/material\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { useControlled } from \"@core/hooks/useControlled\";\nimport { setId } from \"@core/utils/setId\";\nimport {\n HvWarningText,\n HvLabelProps,\n HvFormStatus,\n HvFormElement,\n HvLabel,\n} from \"@core/components/Forms\";\nimport { HvBaseSwitch } from \"@core/components/BaseSwitch\";\nimport { isInvalid } from \"@core/components/Forms/FormElement/validationStates\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./Switch.styles\";\n\nexport { staticClasses as switchClasses };\n\nexport type HvSwitchClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvSwitchProps\n extends Omit<MuiSwitchProps, \"onChange\" | \"classes\"> {\n /**\n * A Jss Object used to override or extend the styles applied to the switch.\n */\n classes?: HvSwitchClasses;\n /**\n * The form element name.\n */\n name?: string;\n /**\n * The value of the form element.\n *\n * Is up to the application's logic when to consider the submission of this value.\n * Generally it should be used only when the switch is neither unchecked nor indeterminate.\n *\n * The default value is \"on\".\n */\n value?: any;\n /**\n * The label of the form element.\n *\n * The form element must be labeled for accessibility reasons.\n * If not provided, an aria-label or aria-labelledby must be inputted via inputProps.\n */\n label?: React.ReactNode;\n /**\n * Properties passed on to the label element.\n */\n labelProps?: HvLabelProps;\n /**\n * Indicates that the form element is disabled.\n */\n disabled?: boolean;\n /**\n * Indicates that the form element is not editable.\n */\n readOnly?: boolean;\n /**\n * Indicates that user input is required on the form element.\n */\n required?: boolean;\n /**\n * If `true` the switch is selected, if set to `false` the switch is not selected.\n *\n * When defined the switch state becomes controlled.\n */\n checked?: boolean;\n /**\n * When uncontrolled, defines the initial checked state.\n */\n defaultChecked?: boolean;\n /**\n * The status of the form element.\n *\n * Valid is correct, invalid is incorrect and standBy means no validations have run.\n *\n * When uncontrolled and unspecified it will default to \"standBy\" and change to either \"valid\"\n * or \"invalid\" after any change to `checked`, depending of the values of both `required` and `checked`.\n */\n status?: HvFormStatus;\n /**\n * The error message to show when the validation status is \"invalid\".\n *\n * Defaults to \"Required\" when the status is uncontrolled and no `aria-errormessage` is provided.\n */\n statusMessage?: string;\n /**\n * Identifies the element that provides an error message for the switch.\n *\n * Will only be used when the validation status is invalid.\n */\n \"aria-errormessage\"?: string;\n /**\n * The callback fired when the switch is pressed.\n */\n onChange?: (event: React.ChangeEvent, checked: boolean, value: any) => void;\n /**\n * Properties passed on to the input element.\n */\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n /** @ignore */\n ref?: MuiSwitchProps[\"ref\"];\n /** @ignore */\n component?: MuiSwitchProps[\"component\"];\n}\n\n/**\n * A Switch is <b>binary</b> and work as a digital on/off button.\n *\n * Use when two states are <b>opposite</b> and to trigger immediate\n * changes in the system.\n */\nexport const HvSwitch = forwardRef<HTMLButtonElement, HvSwitchProps>(\n (props, ref) => {\n const {\n classes: classesProp,\n className,\n\n id,\n name,\n value = \"on\",\n required = false,\n readOnly = false,\n disabled = false,\n\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n labelProps,\n\n checked,\n defaultChecked = false,\n\n onChange,\n\n status,\n statusMessage,\n \"aria-errormessage\": ariaErrorMessage,\n\n inputProps,\n\n ...others\n } = useDefaultProps(\"HvSwitch\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const elementId = useUniqueId(id, \"hvswitch\");\n\n const [isChecked, setIsChecked] = useControlled(\n checked,\n Boolean(defaultChecked)\n );\n\n const [validationState, setValidationState] = useControlled(\n status,\n \"standBy\"\n );\n\n const [validationMessage] = useControlled(statusMessage, \"Required\");\n\n const onLocalChange = useCallback(\n (evt, newChecked) => {\n setIsChecked(() => {\n // this will only run if uncontrolled\n if (required && !newChecked) {\n setValidationState(\"invalid\");\n } else {\n setValidationState(\"valid\");\n }\n\n return newChecked;\n });\n\n onChange?.(evt, newChecked, value);\n },\n [onChange, required, setIsChecked, setValidationState, value]\n );\n\n // the error message area will only be created if:\n // - an external element that provides an error message isn't identified via aria-errormessage AND\n // - both status and statusMessage properties are being controlled OR\n // - status is uncontrolled and required is true\n const canShowError =\n ariaErrorMessage == null &&\n ((status !== undefined && statusMessage !== undefined) ||\n (status === undefined && required));\n\n const isStateInvalid = isInvalid(validationState);\n\n let errorMessageId: string | undefined;\n if (isStateInvalid) {\n errorMessageId = canShowError\n ? setId(elementId, \"error\")\n : ariaErrorMessage;\n }\n\n return (\n <HvFormElement\n id={id}\n name={name}\n status={validationState}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n className={cx(classes.root, className)}\n >\n {label && (\n <HvLabel\n id={setId(elementId, \"label\")}\n htmlFor={setId(elementId, \"input\")}\n label={label}\n className={classes.label}\n {...labelProps}\n />\n )}\n <div\n className={cx(classes.switchContainer, {\n [classes.invalidSwitch]: isStateInvalid,\n })}\n >\n <HvBaseSwitch\n ref={ref}\n id={label ? setId(elementId, \"input\") : setId(id, \"input\")}\n name={name}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n onChange={onLocalChange}\n value={value}\n checked={isChecked}\n inputProps={{\n \"aria-invalid\": isStateInvalid ? true : undefined,\n \"aria-errormessage\": errorMessageId,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n ...inputProps,\n }}\n {...others}\n />\n </div>\n {canShowError && (\n <HvWarningText\n id={setId(elementId, \"error\")}\n className={classes.error}\n disableBorder\n disableAdornment\n hideText\n >\n {validationMessage}\n </HvWarningText>\n )}\n </HvFormElement>\n );\n }\n);\n"],"names":["HvSwitch","forwardRef","props","ref","classes","classesProp","className","id","name","value","required","readOnly","disabled","label","ariaLabel","ariaLabelledBy","ariaDescribedBy","labelProps","checked","defaultChecked","onChange","status","statusMessage","ariaErrorMessage","inputProps","others","useDefaultProps","cx","useClasses","elementId","useUniqueId","isChecked","setIsChecked","useControlled","Boolean","validationState","setValidationState","validationMessage","onLocalChange","useCallback","evt","newChecked","canShowError","undefined","isStateInvalid","isInvalid","errorMessageId","setId","root","switchContainer","invalidSwitch","error"],"mappings":";;;;;;;;;;;;;AAsHO,MAAMA,WAAWC,WACtB,CAACC,OAAOC,QAAQ;AACR,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IAEAC;AAAAA,IACAC;AAAAA,IACAC,QAAQ;AAAA,IACRC,WAAW;AAAA,IACXC,WAAW;AAAA,IACXC,WAAW;AAAA,IAEXC;AAAAA,IACA,cAAcC;AAAAA,IACd,mBAAmBC;AAAAA,IACnB,oBAAoBC;AAAAA,IACpBC;AAAAA,IAEAC;AAAAA,IACAC,iBAAiB;AAAA,IAEjBC;AAAAA,IAEAC;AAAAA,IACAC;AAAAA,IACA,qBAAqBC;AAAAA,IAErBC;AAAAA,IAEA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,YAAYxB,KAAK;AAE/B,QAAA;AAAA,IAAEE;AAAAA,IAASuB;AAAAA,EAAAA,IAAOC,WAAWvB,WAAW;AAExCwB,QAAAA,YAAYC,YAAYvB,IAAI,UAAU;AAEtC,QAAA,CAACwB,WAAWC,YAAY,IAAIC,cAChCf,SACAgB,QAAQf,cAAc,CACxB;AAEA,QAAM,CAACgB,iBAAiBC,kBAAkB,IAAIH,cAC5CZ,QACA,SACF;AAEA,QAAM,CAACgB,iBAAiB,IAAIJ,cAAcX,eAAe,UAAU;AAEnE,QAAMgB,gBAAgBC,YACpB,CAACC,KAAKC,eAAe;AACnBT,iBAAa,MAAM;AAEbtB,UAAAA,YAAY,CAAC+B,YAAY;AAC3BL,2BAAmB,SAAS;AAAA,MAAA,OACvB;AACLA,2BAAmB,OAAO;AAAA,MAC5B;AAEOK,aAAAA;AAAAA,IAAAA,CACR;AAEUD,eAAAA,KAAKC,YAAYhC,KAAK;AAAA,EAAA,GAEnC,CAACW,UAAUV,UAAUsB,cAAcI,oBAAoB3B,KAAK,CAC9D;AAMMiC,QAAAA,eACJnB,oBAAoB,SAClBF,WAAWsB,UAAarB,kBAAkBqB,UACzCtB,WAAWsB,UAAajC;AAEvBkC,QAAAA,iBAAiBC,UAAUV,eAAe;AAE5CW,MAAAA;AACJ,MAAIF,gBAAgB;AAClBE,qBAAiBJ,eACbK,MAAMlB,WAAW,OAAO,IACxBN;AAAAA,EACN;AAEA,SACG,qBAAA,eAAA,EACC,IACA,MACA,QAAQY,iBACR,UACA,UACA,UACA,WAAWR,GAAGvB,QAAQ4C,MAAM1C,SAAS,GAEpCO,UAAAA;AAAAA,IAAAA,6BACE,SACC,EAAA,IAAIkC,MAAMlB,WAAW,OAAO,GAC5B,SAASkB,MAAMlB,WAAW,OAAO,GACjC,OACA,WAAWzB,QAAQS,OACnB,GAAII,YAEP;AAAA,IACA,oBAAA,OAAA,EACC,WAAWU,GAAGvB,QAAQ6C,iBAAiB;AAAA,MACrC,CAAC7C,QAAQ8C,aAAa,GAAGN;AAAAA,IAC1B,CAAA,GAED,UAAA,oBAAC,cACC,EAAA,KACA,IAAI/B,QAAQkC,MAAMlB,WAAW,OAAO,IAAIkB,MAAMxC,IAAI,OAAO,GACzD,MACA,UACA,UACA,UACA,UAAU+B,eACV,OACA,SAASP,WACT,YAAY;AAAA,MACV,gBAAgBa,iBAAiB,OAAOD;AAAAA,MACxC,qBAAqBG;AAAAA,MACrB,cAAchC;AAAAA,MACd,mBAAmBC;AAAAA,MACnB,oBAAoBC;AAAAA,MACpB,GAAGQ;AAAAA,IAAAA,GAEDC,GAAAA,OAAO,CAAA,GAEf;AAAA,IACCiB,gBACE,oBAAA,eAAA,EACC,IAAIK,MAAMlB,WAAW,OAAO,GAC5B,WAAWzB,QAAQ+C,OACnB,eAAa,MACb,kBAAgB,MAChB,UAAQ,MAEPd,UACH,mBAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sources":["../../../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { Tab, TabProps as MuiTabProps } from \"@mui/material\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport {
|
|
1
|
+
{"version":3,"file":"Tab.js","sources":["../../../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { Tab, TabProps as MuiTabProps } from \"@mui/material\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./Tab.styles\";\n\nexport { staticClasses as tabClasses };\n\nexport type HvTabClasses = ExtractNames<typeof useClasses>;\n\n// Mui Tab props: https://mui.com/material-ui/api/tab/#props\nexport interface HvTabProps extends Omit<MuiTabProps, \"children\"> {\n /** If `true`, the tab will be disabled. */\n disabled?: boolean;\n /** The icon element. */\n icon?: React.ReactElement | string;\n /** The label element. */\n label?: React.ReactNode;\n /** The position of the icon relative to the label. */\n iconPosition?: \"bottom\" | \"end\" | \"start\" | \"top\";\n /** A Jss Object used to override or extend the component styles. */\n classes?: HvTabClasses;\n}\n\nexport const HvTab = (props: HvTabProps) => {\n const {\n classes: classesProp,\n iconPosition = \"top\",\n disabled = false,\n ...others\n } = useDefaultProps(\"HvTab\", props);\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <Tab\n classes={{\n root: classes.root,\n selected: classes.selected,\n disabled: classes.disabled,\n }}\n disableRipple\n disableTouchRipple\n // expose the global class HvIsFocusVisible as a marker\n // not to be styled directly, only as helper in specific css queries\n focusVisibleClassName={cx(\"HvIsFocusVisible\", classes.focusVisible)}\n disabled={disabled}\n iconPosition={iconPosition}\n {...others}\n />\n );\n};\n"],"names":["HvTab","props","classes","classesProp","iconPosition","disabled","others","useDefaultProps","cx","useClasses","root","selected","focusVisible"],"mappings":";;;;;AAyBaA,MAAAA,QAAQA,CAACC,UAAsB;AACpC,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC,eAAe;AAAA,IACfC,WAAW;AAAA,IACX,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,SAASN,KAAK;AAC5B,QAAA;AAAA,IAAEC;AAAAA,IAASM;AAAAA,EAAAA,IAAOC,WAAWN,WAAW;AAG5C,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS;AAAA,QACPO,MAAMR,QAAQQ;AAAAA,QACdC,UAAUT,QAAQS;AAAAA,QAClBN,UAAUH,QAAQG;AAAAA,MACpB;AAAA,MACA,eAAa;AAAA,MACb,oBAAA;AAAA,MAGA,uBAAuBG,GAAG,oBAAoBN,QAAQU,YAAY;AAAA,MAClE;AAAA,MACA;AAAA,MACA,GAAIN;AAAAA,IAAAA;AAAAA,EAAAA;AAGV;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1320,7 +1320,7 @@ export declare const HvBannerContent: ForwardRefExoticComponent<Omit<HvBannerCon
|
|
|
1320
1320
|
|
|
1321
1321
|
export declare type HvBannerContentClasses = ExtractNames<typeof useClasses_75>;
|
|
1322
1322
|
|
|
1323
|
-
export declare interface HvBannerContentProps extends Omit<SnackbarContentProps, "variant" | "classes" | "onClose"
|
|
1323
|
+
export declare interface HvBannerContentProps extends Omit<SnackbarContentProps, "variant" | "classes" | "onClose"> {
|
|
1324
1324
|
/** The message to display. */
|
|
1325
1325
|
content?: string;
|
|
1326
1326
|
/** Variant of the snackbar. */
|
|
@@ -1343,7 +1343,7 @@ export declare interface HvBannerContentProps extends Omit<SnackbarContentProps,
|
|
|
1343
1343
|
classes?: HvBannerContentClasses;
|
|
1344
1344
|
}
|
|
1345
1345
|
|
|
1346
|
-
export declare interface HvBannerProps extends Omit<SnackbarProps, "anchorOrigin" | "classes" | "onClose"
|
|
1346
|
+
export declare interface HvBannerProps extends Omit<SnackbarProps, "anchorOrigin" | "classes" | "onClose"> {
|
|
1347
1347
|
/** If true, the snackbar is open. */
|
|
1348
1348
|
open: boolean;
|
|
1349
1349
|
/** Callback fired when the component requests to be closed. Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop. The reason parameter can optionally be used to control the response to onClose, for example ignoring clickaway. */
|
|
@@ -1390,7 +1390,7 @@ export declare const HvBaseCheckBox: React_2.ForwardRefExoticComponent<Omit<HvBa
|
|
|
1390
1390
|
|
|
1391
1391
|
export declare type HvBaseCheckBoxClasses = ExtractNames<typeof useClasses_52>;
|
|
1392
1392
|
|
|
1393
|
-
export declare interface HvBaseCheckBoxProps extends Omit<CheckboxProps, "onChange" | "classes"
|
|
1393
|
+
export declare interface HvBaseCheckBoxProps extends Omit<CheckboxProps, "onChange" | "classes"> {
|
|
1394
1394
|
/**
|
|
1395
1395
|
* The input name.
|
|
1396
1396
|
*/
|
|
@@ -1562,7 +1562,7 @@ export declare const HvBaseInput: (props: HvBaseInputProps) => JSX_2.Element;
|
|
|
1562
1562
|
|
|
1563
1563
|
export declare type HvBaseInputClasses = ExtractNames<typeof useClasses_13>;
|
|
1564
1564
|
|
|
1565
|
-
export declare interface HvBaseInputProps extends Omit<InputProps, "onChange" | "classes"
|
|
1565
|
+
export declare interface HvBaseInputProps extends Omit<InputProps, "onChange" | "classes"> {
|
|
1566
1566
|
/** The input name. */
|
|
1567
1567
|
name?: string;
|
|
1568
1568
|
/** The value of the input, when controlled. */
|
|
@@ -1609,7 +1609,7 @@ export declare const HvBaseRadio: React_2.ForwardRefExoticComponent<Omit<HvBaseR
|
|
|
1609
1609
|
|
|
1610
1610
|
export declare type HvBaseRadioClasses = ExtractNames<typeof useClasses_53>;
|
|
1611
1611
|
|
|
1612
|
-
export declare interface HvBaseRadioProps extends Omit<RadioProps, "onChange" | "classes"
|
|
1612
|
+
export declare interface HvBaseRadioProps extends Omit<RadioProps, "onChange" | "classes"> {
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Class names to be applied.
|
|
1615
1615
|
*/
|
|
@@ -1687,7 +1687,7 @@ export declare const HvBaseSwitch: React_2.ForwardRefExoticComponent<Omit<HvBase
|
|
|
1687
1687
|
|
|
1688
1688
|
export declare type HvBaseSwitchClasses = ExtractNames<typeof useClasses_56>;
|
|
1689
1689
|
|
|
1690
|
-
export declare interface HvBaseSwitchProps extends Omit<SwitchProps, "onChange" | "classes"
|
|
1690
|
+
export declare interface HvBaseSwitchProps extends Omit<SwitchProps, "onChange" | "classes"> {
|
|
1691
1691
|
/**
|
|
1692
1692
|
* Class names to be applied.
|
|
1693
1693
|
*/
|
|
@@ -2049,9 +2049,7 @@ export declare const HvCardContent: ({ id, classes: classesProp, className, chil
|
|
|
2049
2049
|
|
|
2050
2050
|
export declare type HvCardContentClasses = ExtractNames<typeof useClasses_22>;
|
|
2051
2051
|
|
|
2052
|
-
export declare interface HvCardContentProps extends Omit<CardContentProps, "classes"
|
|
2053
|
-
/** Id to be applied to the root node. */
|
|
2054
|
-
id?: string;
|
|
2052
|
+
export declare interface HvCardContentProps extends Omit<CardContentProps, "classes"> {
|
|
2055
2053
|
/** The function that will be executed when this section is clicked. */
|
|
2056
2054
|
onClick?: (event: React.SyntheticEvent) => void;
|
|
2057
2055
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
@@ -2062,7 +2060,7 @@ export declare const HvCardHeader: (props: HvCardHeaderProps) => JSX_2.Element;
|
|
|
2062
2060
|
|
|
2063
2061
|
export declare type HvCardHeaderClasses = ExtractNames<typeof useClasses_21>;
|
|
2064
2062
|
|
|
2065
|
-
export declare interface HvCardHeaderProps extends Omit<CardHeaderProps, "classes"
|
|
2063
|
+
export declare interface HvCardHeaderProps extends Omit<CardHeaderProps, "classes"> {
|
|
2066
2064
|
/** The renderable content inside the title slot of the header. */
|
|
2067
2065
|
title: React.ReactNode;
|
|
2068
2066
|
/** The renderable content inside the subheader slot of the header. */
|
|
@@ -2513,7 +2511,7 @@ export declare const HvContainer: ForwardRefExoticComponent<Omit<HvContainerProp
|
|
|
2513
2511
|
|
|
2514
2512
|
export declare type HvContainerClasses = ExtractNames<typeof useClasses_24>;
|
|
2515
2513
|
|
|
2516
|
-
export declare interface HvContainerProps extends Omit<ContainerProps, "classes"
|
|
2514
|
+
export declare interface HvContainerProps extends Omit<ContainerProps, "classes"> {
|
|
2517
2515
|
/**
|
|
2518
2516
|
* The component used for the root node.
|
|
2519
2517
|
* Either a string to use a DOM element or a component.
|
|
@@ -2732,7 +2730,7 @@ export declare type HvDialogActionClasses = ExtractNames<typeof useClasses_27>;
|
|
|
2732
2730
|
|
|
2733
2731
|
export declare const HvDialogActions: (props: HvDialogActionsProps) => JSX_2.Element;
|
|
2734
2732
|
|
|
2735
|
-
export declare interface HvDialogActionsProps extends Omit<DialogActionsProps, "classes"
|
|
2733
|
+
export declare interface HvDialogActionsProps extends Omit<DialogActionsProps, "classes"> {
|
|
2736
2734
|
/** Set the dialog to fullscreen mode. @deprecated set `fullscreen` in `HvDialog` */
|
|
2737
2735
|
fullscreen?: boolean;
|
|
2738
2736
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
@@ -2745,14 +2743,14 @@ export declare const HvDialogContent: (props: HvDialogContentProps) => JSX_2.Ele
|
|
|
2745
2743
|
|
|
2746
2744
|
export declare type HvDialogContentClasses = ExtractNames<typeof useClasses_26>;
|
|
2747
2745
|
|
|
2748
|
-
export declare interface HvDialogContentProps extends Omit<DialogContentProps, "classes"
|
|
2746
|
+
export declare interface HvDialogContentProps extends Omit<DialogContentProps, "classes"> {
|
|
2749
2747
|
/** Content should be indented in relationship to the Dialog title. */
|
|
2750
2748
|
indentContent?: boolean;
|
|
2751
2749
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
2752
2750
|
classes?: HvDialogContentClasses;
|
|
2753
2751
|
}
|
|
2754
2752
|
|
|
2755
|
-
export declare interface HvDialogProps extends Omit<DialogProps, "fullScreen" | "classes" | "open"
|
|
2753
|
+
export declare interface HvDialogProps extends Omit<DialogProps, "fullScreen" | "classes" | "open"> {
|
|
2756
2754
|
/** Current state of the Dialog. */
|
|
2757
2755
|
open?: boolean;
|
|
2758
2756
|
/** Callback fired when the component requests to be closed. */
|
|
@@ -2852,7 +2850,7 @@ export declare const HvDrawer: (props: HvDrawerProps) => JSX_2.Element;
|
|
|
2852
2850
|
|
|
2853
2851
|
export declare type HvDrawerClasses = ExtractNames<typeof useClasses_29>;
|
|
2854
2852
|
|
|
2855
|
-
export declare interface HvDrawerProps extends
|
|
2853
|
+
export declare interface HvDrawerProps extends Omit<DrawerProps, "classes"> {
|
|
2856
2854
|
/**
|
|
2857
2855
|
* Class names to be applied.
|
|
2858
2856
|
*/
|
|
@@ -3784,7 +3782,7 @@ export declare type HvGridClasses = ExtractNames<typeof useClasses_32>;
|
|
|
3784
3782
|
|
|
3785
3783
|
export declare type HvGridDirection = "row" | "row-reverse" | "column" | "column-reverse";
|
|
3786
3784
|
|
|
3787
|
-
export declare interface HvGridProps extends Omit<GridProps, "classes" | "columns"
|
|
3785
|
+
export declare interface HvGridProps extends Omit<GridProps, "classes" | "columns"> {
|
|
3788
3786
|
/**
|
|
3789
3787
|
* If `true`, the component will have the flex *container* behavior.
|
|
3790
3788
|
* You should be wrapping *items* with a *container*.
|
|
@@ -4347,10 +4345,6 @@ export declare const HvListItem: React_2.ForwardRefExoticComponent<HvListItemPro
|
|
|
4347
4345
|
export declare type HvListItemClasses = ExtractNames<typeof useClasses_4>;
|
|
4348
4346
|
|
|
4349
4347
|
export declare interface HvListItemProps extends HvBaseProps<HTMLLIElement> {
|
|
4350
|
-
/**
|
|
4351
|
-
* Overrides the implicit list item role.
|
|
4352
|
-
*/
|
|
4353
|
-
role?: HvBaseProps<HTMLLIElement>["role"];
|
|
4354
4348
|
/** Indicates if the list item is selected. */
|
|
4355
4349
|
selected?: boolean;
|
|
4356
4350
|
/** If true, the list item will be disabled. */
|
|
@@ -5217,7 +5211,7 @@ export declare interface HvRadioGroupProps extends HvBaseProps<HTMLDivElement, "
|
|
|
5217
5211
|
classes?: HvRadioGroupClasses;
|
|
5218
5212
|
}
|
|
5219
5213
|
|
|
5220
|
-
export declare interface HvRadioProps extends Omit<RadioProps_2, "onChange" | "classes"
|
|
5214
|
+
export declare interface HvRadioProps extends Omit<RadioProps_2, "onChange" | "classes"> {
|
|
5221
5215
|
/**
|
|
5222
5216
|
* A Jss Object used to override or extend the styles applied to the radio button.
|
|
5223
5217
|
*/
|
|
@@ -5735,7 +5729,7 @@ export declare const HvSnackbarContent: ForwardRefExoticComponent<Omit<HvSnackba
|
|
|
5735
5729
|
|
|
5736
5730
|
export declare type HvSnackbarContentClasses = ExtractNames<typeof useClasses_77>;
|
|
5737
5731
|
|
|
5738
|
-
export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProps, "variant" | "action" | "classes"
|
|
5732
|
+
export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProps, "variant" | "action" | "classes"> {
|
|
5739
5733
|
/** The message to display. */
|
|
5740
5734
|
label?: React.ReactNode;
|
|
5741
5735
|
/** Variant of the snackbar. */
|
|
@@ -5752,7 +5746,7 @@ export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProp
|
|
|
5752
5746
|
classes?: HvSnackbarContentClasses;
|
|
5753
5747
|
}
|
|
5754
5748
|
|
|
5755
|
-
export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" | "classes"
|
|
5749
|
+
export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" | "classes" | "children"> {
|
|
5756
5750
|
/** If true, Snackbar is open. */
|
|
5757
5751
|
open?: boolean;
|
|
5758
5752
|
/** Callback fired when the component requests to be closed. Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop. The reason parameter can optionally be used to control the response to onClose, for example ignoring clickaway. */
|
|
@@ -5904,7 +5898,7 @@ export declare interface HvSwitchColumnCellProp {
|
|
|
5904
5898
|
switchProps?: HvBaseSwitchProps;
|
|
5905
5899
|
}
|
|
5906
5900
|
|
|
5907
|
-
export declare interface HvSwitchProps extends Omit<SwitchProps_2, "onChange" | "classes"
|
|
5901
|
+
export declare interface HvSwitchProps extends Omit<SwitchProps_2, "onChange" | "classes"> {
|
|
5908
5902
|
/**
|
|
5909
5903
|
* A Jss Object used to override or extend the styles applied to the switch.
|
|
5910
5904
|
*/
|
|
@@ -6297,7 +6291,7 @@ export declare interface HvTableState<D extends object = Record<string, unknown>
|
|
|
6297
6291
|
|
|
6298
6292
|
export declare type HvTableVariant = "listrow" | "default";
|
|
6299
6293
|
|
|
6300
|
-
export declare interface HvTabProps extends Omit<TabProps, "children"
|
|
6294
|
+
export declare interface HvTabProps extends Omit<TabProps, "children"> {
|
|
6301
6295
|
/** If `true`, the tab will be disabled. */
|
|
6302
6296
|
disabled?: boolean;
|
|
6303
6297
|
/** The icon element. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.38.
|
|
3
|
+
"version": "5.38.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"access": "public",
|
|
65
65
|
"directory": "package"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "eb7992ae506e68e72520b06ee8c2348cec8403c3",
|
|
68
68
|
"main": "dist/cjs/index.cjs",
|
|
69
69
|
"exports": {
|
|
70
70
|
".": {
|