@hitachivantara/uikit-react-core 5.87.3 → 5.89.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/cjs/ActionsGeneric/ActionsGeneric.cjs +2 -3
- package/dist/cjs/AppSwitcher/Action/Action.styles.cjs +2 -2
- package/dist/cjs/Banner/Banner.cjs +5 -5
- package/dist/cjs/Banner/BannerContent/BannerContent.cjs +59 -97
- package/dist/cjs/Banner/BannerContent/BannerContent.styles.cjs +18 -46
- package/dist/cjs/BaseDropdown/BaseDropdown.styles.cjs +1 -2
- package/dist/cjs/BaseInput/BaseInput.styles.cjs +1 -1
- package/dist/cjs/BaseInput/validations.cjs +2 -1
- package/dist/cjs/Button/Button.cjs +1 -2
- package/dist/cjs/Button/Button.styles.cjs +0 -6
- package/dist/cjs/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/cjs/DatePicker/DatePicker.cjs +12 -12
- package/dist/cjs/DotPagination/DotPagination.styles.cjs +3 -0
- package/dist/cjs/FilterGroup/FilterContent/FilterContent.cjs +1 -1
- package/dist/cjs/FormElement/Adornment/Adornment.cjs +15 -36
- package/dist/cjs/FormElement/Adornment/Adornment.styles.cjs +12 -21
- package/dist/cjs/IconContainer/IconContainer.cjs +81 -0
- package/dist/cjs/Input/Input.cjs +29 -51
- package/dist/cjs/Input/Input.styles.cjs +1 -0
- package/dist/cjs/List/List.cjs +1 -1
- package/dist/cjs/ListContainer/ListItem/ListItem.styles.cjs +0 -6
- package/dist/cjs/Loading/Loading.cjs +1 -2
- package/dist/cjs/Loading/Loading.styles.cjs +3 -1
- package/dist/cjs/Pagination/Pagination.styles.cjs +2 -2
- package/dist/cjs/Pagination/Select.cjs +1 -1
- package/dist/cjs/Snackbar/Snackbar.cjs +6 -5
- package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs +20 -28
- package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.styles.cjs +26 -56
- package/dist/cjs/Table/TableBody/TableBody.cjs +16 -17
- package/dist/cjs/{TableSection → Table/TableSection}/TableSection.cjs +2 -2
- package/dist/cjs/{TableSection → Table/TableSection}/TableSection.styles.cjs +12 -12
- package/dist/cjs/Table/hooks/useHvRowExpand.cjs +3 -3
- package/dist/cjs/Tabs/Tab/Tab.styles.cjs +0 -3
- package/dist/cjs/Tag/Tag.cjs +1 -1
- package/dist/cjs/TagsInput/TagsInput.cjs +103 -169
- package/dist/cjs/TagsInput/TagsInput.styles.cjs +45 -106
- package/dist/cjs/TextArea/TextArea.cjs +1 -3
- package/dist/cjs/TimePicker/TimePicker.cjs +5 -4
- package/dist/cjs/Typography/Typography.styles.cjs +2 -1
- package/dist/cjs/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +0 -3
- package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +0 -4
- package/dist/cjs/hooks/useFocus.cjs +38 -0
- package/dist/cjs/index.cjs +9 -4
- package/dist/cjs/utils/Callout.cjs +134 -0
- package/dist/cjs/utils/focusUtils.cjs +0 -4
- package/dist/esm/ActionsGeneric/ActionsGeneric.js +2 -3
- package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
- package/dist/esm/AppSwitcher/Action/Action.styles.js +2 -2
- package/dist/esm/AppSwitcher/Action/Action.styles.js.map +1 -1
- package/dist/esm/AvatarGroup/AvatarGroupContext.js +1 -1
- package/dist/esm/Banner/Banner.js +5 -5
- package/dist/esm/Banner/Banner.js.map +1 -1
- package/dist/esm/Banner/BannerContent/BannerContent.js +60 -96
- package/dist/esm/Banner/BannerContent/BannerContent.js.map +1 -1
- package/dist/esm/Banner/BannerContent/BannerContent.styles.js +18 -46
- package/dist/esm/Banner/BannerContent/BannerContent.styles.js.map +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.js +1 -1
- package/dist/esm/BaseDropdown/BaseDropdown.js +3 -3
- package/dist/esm/BaseDropdown/BaseDropdown.styles.js +1 -2
- package/dist/esm/BaseDropdown/BaseDropdown.styles.js.map +1 -1
- package/dist/esm/BaseInput/BaseInput.js.map +1 -1
- package/dist/esm/BaseInput/BaseInput.styles.js +1 -1
- package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/BaseInput/validations.js +2 -1
- package/dist/esm/BaseInput/validations.js.map +1 -1
- package/dist/esm/BaseRadio/BaseRadio.js +1 -1
- package/dist/esm/Button/Button.js +3 -4
- package/dist/esm/Button/Button.js.map +1 -1
- package/dist/esm/Button/Button.styles.js +0 -6
- package/dist/esm/Button/Button.styles.js.map +1 -1
- package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js +1 -1
- package/dist/esm/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/dist/esm/ColorPicker/ColorPicker.js +1 -1
- package/dist/esm/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/ColorPicker/Fields/Fields.js.map +1 -1
- package/dist/esm/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/DatePicker/utils.js +1 -1
- package/dist/esm/Dialog/context.js +1 -1
- package/dist/esm/DotPagination/DotPagination.js +1 -1
- package/dist/esm/DotPagination/DotPagination.styles.js +3 -0
- package/dist/esm/DotPagination/DotPagination.styles.js.map +1 -1
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/DropdownButton/DropdownButton.js.map +1 -1
- package/dist/esm/FilterGroup/FilterContent/FilterContent.js +1 -1
- package/dist/esm/FilterGroup/FilterContent/FilterContent.js.map +1 -1
- package/dist/esm/FilterGroup/FilterGroupContext.js +1 -1
- package/dist/esm/Focus/Focus.js +1 -1
- package/dist/esm/FormElement/Adornment/Adornment.js +15 -36
- package/dist/esm/FormElement/Adornment/Adornment.js.map +1 -1
- package/dist/esm/FormElement/Adornment/Adornment.styles.js +12 -21
- package/dist/esm/FormElement/Adornment/Adornment.styles.js.map +1 -1
- package/dist/esm/Header/Navigation/useSelectionPath.js.map +1 -1
- package/dist/esm/IconContainer/IconContainer.js +81 -0
- package/dist/esm/IconContainer/IconContainer.js.map +1 -0
- package/dist/esm/Input/Input.js +30 -52
- package/dist/esm/Input/Input.js.map +1 -1
- package/dist/esm/Input/Input.styles.js +1 -0
- package/dist/esm/Input/Input.styles.js.map +1 -1
- package/dist/esm/List/List.js +1 -1
- package/dist/esm/ListContainer/ListItem/ListItem.styles.js +0 -6
- package/dist/esm/ListContainer/ListItem/ListItem.styles.js.map +1 -1
- package/dist/esm/Loading/Loading.js +1 -2
- package/dist/esm/Loading/Loading.js.map +1 -1
- package/dist/esm/Loading/Loading.styles.js +3 -1
- package/dist/esm/Loading/Loading.styles.js.map +1 -1
- package/dist/esm/Pagination/Pagination.styles.js +5 -5
- package/dist/esm/Pagination/Select.js +1 -1
- package/dist/esm/QueryBuilder/Context.js +1 -1
- package/dist/esm/QueryBuilder/QueryBuilder.js +1 -1
- package/dist/esm/QueryBuilder/utils/index.js +1 -1
- package/dist/esm/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/SelectionList/SelectionList.js.map +1 -1
- package/dist/esm/Slider/Slider.js +1 -1
- package/dist/esm/Slider/Slider.js.map +1 -1
- package/dist/esm/Snackbar/Snackbar.js +6 -5
- package/dist/esm/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js +23 -29
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js +26 -56
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js.map +1 -1
- package/dist/esm/SnackbarProvider/SnackbarProvider.js +2 -2
- package/dist/esm/Table/Table.js.map +1 -1
- package/dist/esm/Table/TableBody/TableBody.js +16 -17
- package/dist/esm/Table/TableBody/TableBody.js.map +1 -1
- package/dist/esm/{TableSection → Table/TableSection}/TableSection.js +2 -2
- package/dist/esm/Table/TableSection/TableSection.js.map +1 -0
- package/dist/esm/{TableSection → Table/TableSection}/TableSection.styles.js +25 -25
- package/dist/esm/Table/TableSection/TableSection.styles.js.map +1 -0
- package/dist/esm/Table/hooks/useHvRowExpand.js +3 -3
- package/dist/esm/Table/hooks/useHvRowExpand.js.map +1 -1
- package/dist/esm/Tabs/Tab/Tab.styles.js +0 -3
- package/dist/esm/Tabs/Tab/Tab.styles.js.map +1 -1
- package/dist/esm/Tag/Tag.js +1 -1
- package/dist/esm/Tag/Tag.js.map +1 -1
- package/dist/esm/TagsInput/TagsInput.js +103 -169
- package/dist/esm/TagsInput/TagsInput.js.map +1 -1
- package/dist/esm/TagsInput/TagsInput.styles.js +45 -106
- package/dist/esm/TagsInput/TagsInput.styles.js.map +1 -1
- package/dist/esm/TextArea/TextArea.js +1 -3
- package/dist/esm/TextArea/TextArea.js.map +1 -1
- package/dist/esm/TimePicker/TimePicker.js +1 -0
- package/dist/esm/TimePicker/TimePicker.js.map +1 -1
- package/dist/esm/TreeView/internals/TreeViewProvider.js +1 -1
- package/dist/esm/TreeView/internals/hooks/plugins/useTreeViewKeyboardNavigation.js +1 -1
- package/dist/esm/Typography/Typography.styles.js +2 -1
- package/dist/esm/Typography/Typography.styles.js.map +1 -1
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +0 -3
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js +0 -4
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
- package/dist/esm/hooks/useFocus.js +38 -0
- package/dist/esm/hooks/useFocus.js.map +1 -0
- package/dist/esm/hooks/useScrollTo.js.map +1 -1
- package/dist/esm/index.js +56 -51
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/Callout.js +132 -0
- package/dist/esm/utils/Callout.js.map +1 -0
- package/dist/esm/utils/document.js.map +1 -1
- package/dist/esm/utils/focusUtils.js +0 -4
- package/dist/esm/utils/focusUtils.js.map +1 -1
- package/dist/types/index.d.ts +677 -670
- package/package.json +8 -8
- package/dist/esm/TableSection/TableSection.js.map +0 -1
- package/dist/esm/TableSection/TableSection.styles.js.map +0 -1
|
@@ -15,17 +15,17 @@ const HvBanner = forwardRef(function HvBanner2(props, ref) {
|
|
|
15
15
|
open,
|
|
16
16
|
onClose,
|
|
17
17
|
anchorOrigin = "top",
|
|
18
|
-
variant
|
|
18
|
+
variant,
|
|
19
19
|
transitionDuration = 300,
|
|
20
20
|
transitionDirection = "down",
|
|
21
21
|
container,
|
|
22
|
-
showIcon
|
|
22
|
+
showIcon,
|
|
23
23
|
customIcon,
|
|
24
24
|
actions,
|
|
25
25
|
actionsCallback,
|
|
26
26
|
// TODO - remove in v6
|
|
27
27
|
onAction,
|
|
28
|
-
actionsPosition
|
|
28
|
+
actionsPosition,
|
|
29
29
|
label,
|
|
30
30
|
offset = 60,
|
|
31
31
|
bannerContentProps,
|
|
@@ -68,7 +68,6 @@ const HvBanner = forwardRef(function HvBanner2(props, ref) {
|
|
|
68
68
|
HvBannerContent,
|
|
69
69
|
{
|
|
70
70
|
id: setId(id, "content"),
|
|
71
|
-
content: label,
|
|
72
71
|
variant,
|
|
73
72
|
customIcon,
|
|
74
73
|
showIcon,
|
|
@@ -77,7 +76,8 @@ const HvBanner = forwardRef(function HvBanner2(props, ref) {
|
|
|
77
76
|
onAction,
|
|
78
77
|
actionsPosition,
|
|
79
78
|
onClose,
|
|
80
|
-
...bannerContentProps
|
|
79
|
+
...bannerContentProps,
|
|
80
|
+
children: label
|
|
81
81
|
}
|
|
82
82
|
)
|
|
83
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sources":["../../../src/Banner/Banner.tsx"],"sourcesContent":["import { forwardRef, useCallback } from \"react\";\nimport Slide, { SlideProps } from \"@mui/material/Slide\";\nimport Snackbar, {\n SnackbarProps as MuiSnackbarProps,\n SnackbarOrigin,\n} from \"@mui/material/Snackbar\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvActionsGenericProps } from \"../ActionsGeneric\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./Banner.styles\";\nimport {\n HvBannerContent,\n HvBannerContentProps,\n} from \"./BannerContent/BannerContent\";\nimport { HvBannerActionPosition, HvBannerVariant } from \"./types\";\n\nexport { staticClasses as bannerClasses };\n\nexport type HvBannerClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBannerProps\n extends Omit<MuiSnackbarProps, \"anchorOrigin\" | \"classes\" | \"onClose\"> {\n /** If true, the snackbar is open. */\n open: boolean;\n /**\n * Callback fired when the component requests to be closed.\n * Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop.\n * The reason parameter can optionally be used to control the response to onClose, for example ignoring click away.\n * */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** The message to display. */\n label?: string;\n /** The anchor of the Snackbar. */\n anchorOrigin?: \"top\" | \"bottom\";\n /** Variant of the snackbar. */\n variant?: HvBannerVariant;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Actions to display on the right side. */\n actions?: HvActionsGenericProps[\"actions\"];\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionsCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** The position property of the header. */\n actionsPosition?: HvBannerActionPosition;\n /** How much the transition animation last in milliseconds, if 0 no animation is played. */\n transitionDuration?: number;\n /** Direction of slide transition. */\n transitionDirection?: \"up\" | \"down\" | \"left\" | \"right\";\n /** The container the banner should slide from. */\n container?: SlideProps[\"container\"];\n /** Offset from top/bottom of the page, in px. Defaults to 60px. */\n offset?: number;\n /** Props to pass down to the banner Wrapper. An object `actionProps` can be included to be passed as others to actions. */\n bannerContentProps?: HvBannerContentProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBannerClasses;\n /** @ignore */\n ref?: MuiSnackbarProps[\"ref\"];\n}\n\n/**\n * A Banner displays an important and succinct message. It can also provide actions for the user to address, or dismiss.\n * It requires a user action, for it to be dismissed. Banners should appear at the top of the screen, below a top app bar.\n */\nexport const HvBanner = forwardRef<\n React.ComponentRef<typeof Snackbar>,\n HvBannerProps\n>(function HvBanner(props, ref) {\n const {\n id,\n classes: classesProp,\n className,\n open,\n onClose,\n anchorOrigin = \"top\",\n variant
|
|
1
|
+
{"version":3,"file":"Banner.js","sources":["../../../src/Banner/Banner.tsx"],"sourcesContent":["import { forwardRef, useCallback } from \"react\";\nimport Slide, { SlideProps } from \"@mui/material/Slide\";\nimport Snackbar, {\n SnackbarProps as MuiSnackbarProps,\n SnackbarOrigin,\n} from \"@mui/material/Snackbar\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvActionsGenericProps } from \"../ActionsGeneric\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./Banner.styles\";\nimport {\n HvBannerContent,\n HvBannerContentProps,\n} from \"./BannerContent/BannerContent\";\nimport { HvBannerActionPosition, HvBannerVariant } from \"./types\";\n\nexport { staticClasses as bannerClasses };\n\nexport type HvBannerClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBannerProps\n extends Omit<MuiSnackbarProps, \"anchorOrigin\" | \"classes\" | \"onClose\"> {\n /** If true, the snackbar is open. */\n open: boolean;\n /**\n * Callback fired when the component requests to be closed.\n * Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop.\n * The reason parameter can optionally be used to control the response to onClose, for example ignoring click away.\n * */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** The message to display. */\n label?: string;\n /** The anchor of the Snackbar. */\n anchorOrigin?: \"top\" | \"bottom\";\n /** Variant of the snackbar. */\n variant?: HvBannerVariant;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Actions to display on the right side. */\n actions?: HvActionsGenericProps[\"actions\"];\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionsCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** The position property of the header. */\n actionsPosition?: HvBannerActionPosition;\n /** How much the transition animation last in milliseconds, if 0 no animation is played. */\n transitionDuration?: number;\n /** Direction of slide transition. */\n transitionDirection?: \"up\" | \"down\" | \"left\" | \"right\";\n /** The container the banner should slide from. */\n container?: SlideProps[\"container\"];\n /** Offset from top/bottom of the page, in px. Defaults to 60px. */\n offset?: number;\n /** Props to pass down to the banner Wrapper. An object `actionProps` can be included to be passed as others to actions. */\n bannerContentProps?: HvBannerContentProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBannerClasses;\n /** @ignore */\n ref?: MuiSnackbarProps[\"ref\"];\n}\n\n/**\n * A Banner displays an important and succinct message. It can also provide actions for the user to address, or dismiss.\n * It requires a user action, for it to be dismissed. Banners should appear at the top of the screen, below a top app bar.\n */\nexport const HvBanner = forwardRef<\n React.ComponentRef<typeof Snackbar>,\n HvBannerProps\n>(function HvBanner(props, ref) {\n const {\n id,\n classes: classesProp,\n className,\n open,\n onClose,\n anchorOrigin = \"top\",\n variant,\n transitionDuration = 300,\n transitionDirection = \"down\",\n container,\n showIcon,\n customIcon,\n actions,\n actionsCallback, // TODO - remove in v6\n onAction,\n actionsPosition,\n label,\n offset = 60,\n bannerContentProps,\n ...others\n } = useDefaultProps(\"HvBanner\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const anchorOriginBanner: SnackbarOrigin = {\n horizontal: \"center\",\n vertical: anchorOrigin,\n };\n\n const SlideTransition = useCallback<\n NonNullable<MuiSnackbarProps[\"TransitionComponent\"]>\n >(\n (properties) => (\n <Slide\n {...properties}\n container={container}\n direction={transitionDirection}\n />\n ),\n [container, transitionDirection],\n );\n\n return (\n <Snackbar\n ref={ref}\n id={id}\n open={open}\n className={className}\n classes={{\n root: cx(classes.root, { [classes.rootClosed]: !open }),\n anchorOriginTopCenter: classes.anchorOriginTopCenter,\n anchorOriginBottomCenter: classes.anchorOriginBottomCenter,\n }}\n style={{ [anchorOrigin]: offset }}\n anchorOrigin={anchorOriginBanner}\n TransitionComponent={SlideTransition}\n transitionDuration={transitionDuration}\n {...others}\n >\n <HvBannerContent\n id={setId(id, \"content\")}\n variant={variant}\n customIcon={customIcon}\n showIcon={showIcon}\n actions={actions}\n actionsCallback={actionsCallback}\n onAction={onAction}\n actionsPosition={actionsPosition}\n onClose={onClose}\n {...bannerContentProps}\n >\n {label}\n </HvBannerContent>\n </Snackbar>\n );\n});\n"],"names":["HvBanner"],"mappings":";;;;;;;;;AA4EO,MAAM,WAAW,WAGtB,SAASA,UAAS,OAAO,KAAK;AACxB,QAAA;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,YAAY,KAAK;AACrC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAE9C,QAAM,qBAAqC;AAAA,IACzC,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAEA,QAAM,kBAAkB;AAAA,IAGtB,CAAC,eACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,CAAC,WAAW,mBAAmB;AAAA,EACjC;AAGE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP,MAAM,GAAG,QAAQ,MAAM,EAAE,CAAC,QAAQ,UAAU,GAAG,CAAC,MAAM;AAAA,QACtD,uBAAuB,QAAQ;AAAA,QAC/B,0BAA0B,QAAQ;AAAA,MACpC;AAAA,MACA,OAAO,EAAE,CAAC,YAAY,GAAG,OAAO;AAAA,MAChC,cAAc;AAAA,MACd,qBAAqB;AAAA,MACrB;AAAA,MACC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAI,MAAM,IAAI,SAAS;AAAA,UACvB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAG;AAAA,UAEH,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;"}
|
|
@@ -1,106 +1,70 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { iconVariant } from "../../utils/iconVariant.js";
|
|
6
|
-
import { setId } from "../../utils/setId.js";
|
|
3
|
+
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { HvCallout } from "../../utils/Callout.js";
|
|
7
5
|
import { useClasses } from "./BannerContent.styles.js";
|
|
8
6
|
import { staticClasses } from "./BannerContent.styles.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const HvBannerContent = forwardRef(function HvBannerContent2(props, ref) {
|
|
8
|
+
const {
|
|
9
|
+
id,
|
|
10
|
+
classes: classesProp,
|
|
11
|
+
className,
|
|
12
|
+
showIcon,
|
|
13
|
+
customIcon,
|
|
14
|
+
variant = "default",
|
|
15
|
+
onClose,
|
|
16
|
+
actions,
|
|
17
|
+
actionsCallback,
|
|
18
|
+
// TODO - remove in v6
|
|
19
|
+
onAction,
|
|
20
|
+
actionsPosition = "auto",
|
|
21
|
+
content,
|
|
22
|
+
children,
|
|
23
|
+
actionProps,
|
|
24
|
+
...others
|
|
25
|
+
} = useDefaultProps("HvBannerContent", props);
|
|
26
|
+
const { classes, cx } = useClasses(classesProp);
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
HvCallout,
|
|
29
|
+
{
|
|
30
|
+
ref,
|
|
14
31
|
id,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
showIcon
|
|
32
|
+
variant,
|
|
33
|
+
showClose: true,
|
|
34
|
+
showIcon,
|
|
18
35
|
customIcon,
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
classes: {
|
|
37
|
+
root: cx(
|
|
38
|
+
classes.root,
|
|
39
|
+
classes.outContainer,
|
|
40
|
+
classes.baseVariant,
|
|
41
|
+
classes[variant],
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
message: classes.message,
|
|
45
|
+
action: classes.action,
|
|
46
|
+
messageIcon: classes.iconContainer,
|
|
47
|
+
messageContent: classes.messageContainer,
|
|
48
|
+
actionCustom: classes.messageActions,
|
|
49
|
+
actionContent: cx(
|
|
50
|
+
classes.actionContainer,
|
|
51
|
+
classes.actionsInnerContainer
|
|
52
|
+
),
|
|
53
|
+
actionClose: classes.closeAction
|
|
54
|
+
},
|
|
21
55
|
actions,
|
|
22
|
-
|
|
23
|
-
// TODO - remove in v6
|
|
24
|
-
onAction,
|
|
25
|
-
actionsPosition = "auto",
|
|
26
|
-
content,
|
|
27
|
-
children,
|
|
56
|
+
actionsPosition,
|
|
28
57
|
actionProps,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
SnackbarContent,
|
|
40
|
-
{
|
|
41
|
-
ref,
|
|
42
|
-
id,
|
|
43
|
-
classes: {
|
|
44
|
-
root: classes.root,
|
|
45
|
-
message: classes.message,
|
|
46
|
-
action: classes.action
|
|
47
|
-
},
|
|
48
|
-
className: cx(classes.baseVariant, classes[variant], className),
|
|
49
|
-
message: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
50
|
-
icon && /* @__PURE__ */ jsx("div", { className: classes.iconContainer, children: icon }),
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
52
|
-
"div",
|
|
53
|
-
{
|
|
54
|
-
id: setId(id, "message-text"),
|
|
55
|
-
className: classes.messageContainer,
|
|
56
|
-
children: children ?? content
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
actions && effectiveActionsPosition === "inline" && /* @__PURE__ */ jsx(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
id: setId(id, "message-actions"),
|
|
63
|
-
className: classes.messageActions,
|
|
64
|
-
children: /* @__PURE__ */ jsx(
|
|
65
|
-
HvActionsGeneric,
|
|
66
|
-
{
|
|
67
|
-
id,
|
|
68
|
-
variant: "semantic",
|
|
69
|
-
actions,
|
|
70
|
-
onAction: handleAction
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
] }),
|
|
76
|
-
action: /* @__PURE__ */ jsxs("div", { className: classes.actionContainer, children: [
|
|
77
|
-
/* @__PURE__ */ jsx(
|
|
78
|
-
HvButton,
|
|
79
|
-
{
|
|
80
|
-
icon: true,
|
|
81
|
-
className: classes.closeAction,
|
|
82
|
-
variant: "semantic",
|
|
83
|
-
"aria-label": "Close",
|
|
84
|
-
onClick: onClose,
|
|
85
|
-
...actionProps,
|
|
86
|
-
children: /* @__PURE__ */ jsx(Close, { size: "XS" })
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
actions && effectiveActionsPosition === "bottom-right" && /* @__PURE__ */ jsx("div", { className: classes.actionsInnerContainer, children: /* @__PURE__ */ jsx(
|
|
90
|
-
HvActionsGeneric,
|
|
91
|
-
{
|
|
92
|
-
id,
|
|
93
|
-
variant: "semantic",
|
|
94
|
-
actions,
|
|
95
|
-
onAction: handleAction
|
|
96
|
-
}
|
|
97
|
-
) })
|
|
98
|
-
] }),
|
|
99
|
-
...others
|
|
100
|
-
}
|
|
101
|
-
) });
|
|
102
|
-
}
|
|
103
|
-
);
|
|
58
|
+
onClose: (evt) => onClose?.(evt),
|
|
59
|
+
onAction: (evt, action) => {
|
|
60
|
+
onAction?.(evt, action);
|
|
61
|
+
actionsCallback?.(evt, id, action);
|
|
62
|
+
},
|
|
63
|
+
...others,
|
|
64
|
+
children: children ?? content
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
});
|
|
104
68
|
export {
|
|
105
69
|
HvBannerContent,
|
|
106
70
|
staticClasses as bannerContentClasses
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerContent.js","sources":["../../../../src/Banner/BannerContent/BannerContent.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"BannerContent.js","sources":["../../../../src/Banner/BannerContent/BannerContent.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { SnackbarContentProps as MuiSnackbarContentProps } from \"@mui/material/SnackbarContent\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvActionsGenericProps } from \"../../ActionsGeneric\";\nimport { HvButtonProps } from \"../../Button\";\nimport { HvCallout } from \"../../utils/Callout\";\nimport { HvBannerActionPosition, HvBannerVariant } from \"../types\";\nimport { staticClasses, useClasses } from \"./BannerContent.styles\";\n\nexport { staticClasses as bannerContentClasses };\n\nexport type HvBannerContentClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBannerContentProps\n extends Omit<MuiSnackbarContentProps, \"variant\" | \"classes\" | \"onClose\"> {\n /** The message to display. @deprecated use `children` instead */\n content?: string;\n /** The message to display. */\n children?: React.ReactNode;\n /** Variant of the snackbar. */\n variant?: HvBannerVariant;\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 /** Function called when clicking on the close button. */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Actions to display on the right side. */\n actions?: HvActionsGenericProps[\"actions\"];\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionsCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** The position property of the header. */\n actionsPosition?: HvBannerActionPosition;\n /** The props to pass down to the Action Container. */\n actionProps?: Partial<HvButtonProps>;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBannerContentClasses;\n}\n\nexport const HvBannerContent = forwardRef<\n // no-indent\n HTMLDivElement,\n HvBannerContentProps\n>(function HvBannerContent(props, ref) {\n const {\n id,\n classes: classesProp,\n className,\n showIcon,\n customIcon,\n variant = \"default\",\n onClose,\n actions,\n actionsCallback, // TODO - remove in v6\n onAction,\n actionsPosition = \"auto\",\n content,\n children,\n actionProps,\n ...others\n } = useDefaultProps(\"HvBannerContent\", props);\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <HvCallout\n ref={ref}\n id={id}\n variant={variant}\n showClose\n showIcon={showIcon}\n customIcon={customIcon}\n classes={{\n root: cx(\n classes.root,\n classes.outContainer,\n classes.baseVariant,\n classes[variant],\n className,\n ),\n message: classes.message,\n action: classes.action,\n messageIcon: classes.iconContainer,\n messageContent: classes.messageContainer,\n actionCustom: classes.messageActions,\n actionContent: cx(\n classes.actionContainer,\n classes.actionsInnerContainer,\n ),\n actionClose: classes.closeAction,\n }}\n actions={actions}\n actionsPosition={actionsPosition}\n actionProps={actionProps}\n onClose={(evt) => onClose?.(evt as React.MouseEvent<any>)}\n onAction={(evt, action) => {\n onAction?.(evt, action);\n actionsCallback?.(evt, id!, action);\n }}\n {...others}\n >\n {children ?? content}\n </HvCallout>\n );\n});\n"],"names":["HvBannerContent"],"mappings":";;;;;;AAiDO,MAAM,kBAAkB,WAI7B,SAASA,iBAAgB,OAAO,KAAK;AAC/B,QAAA;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,mBAAmB,KAAK;AAC5C,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAG5C,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,UACJ,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,QAAQ,OAAO;AAAA,UACf;AAAA,QACF;AAAA,QACA,SAAS,QAAQ;AAAA,QACjB,QAAQ,QAAQ;AAAA,QAChB,aAAa,QAAQ;AAAA,QACrB,gBAAgB,QAAQ;AAAA,QACxB,cAAc,QAAQ;AAAA,QACtB,eAAe;AAAA,UACb,QAAQ;AAAA,UACR,QAAQ;AAAA,QACV;AAAA,QACA,aAAa,QAAQ;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,CAAC,QAAQ,UAAU,GAA4B;AAAA,MACxD,UAAU,CAAC,KAAK,WAAW;AACzB,mBAAW,KAAK,MAAM;AACJ,0BAAA,KAAK,IAAK,MAAM;AAAA,MACpC;AAAA,MACC,GAAG;AAAA,MAEH,UAAY,YAAA;AAAA,IAAA;AAAA,EACf;AAEJ,CAAC;"}
|
|
@@ -3,72 +3,44 @@ import { theme } from "@hitachivantara/uikit-styles";
|
|
|
3
3
|
const { useClasses, staticClasses } = createClasses("HvBannerContent", {
|
|
4
4
|
root: {
|
|
5
5
|
minWidth: "100%",
|
|
6
|
+
width: "100%",
|
|
6
7
|
position: "relative",
|
|
7
|
-
|
|
8
|
-
flexWrap: "nowrap",
|
|
9
|
-
boxShadow: "none",
|
|
8
|
+
gap: theme.space.xs,
|
|
10
9
|
borderRadius: theme.radii.none
|
|
11
10
|
},
|
|
11
|
+
success: {},
|
|
12
|
+
warning: {},
|
|
13
|
+
error: {},
|
|
14
|
+
default: {},
|
|
12
15
|
message: {
|
|
13
|
-
|
|
14
|
-
alignItems: "center",
|
|
16
|
+
gap: theme.space.xs,
|
|
15
17
|
padding: theme.spacing("xs", 0),
|
|
16
18
|
paddingLeft: theme.space.sm,
|
|
17
19
|
...theme.typography.body,
|
|
18
20
|
color: theme.colors.base_dark
|
|
19
21
|
},
|
|
20
22
|
action: {
|
|
21
|
-
padding: theme.
|
|
22
|
-
marginRight: 0,
|
|
23
|
+
padding: theme.space.xs,
|
|
23
24
|
flex: "0 0 auto",
|
|
24
25
|
placeSelf: "stretch"
|
|
25
26
|
},
|
|
26
|
-
baseVariant: {
|
|
27
|
-
padding: 0
|
|
28
|
-
},
|
|
29
|
-
success: {
|
|
30
|
-
backgroundColor: theme.colors.positive_20
|
|
31
|
-
},
|
|
32
|
-
warning: {
|
|
33
|
-
backgroundColor: theme.colors.warning_20
|
|
34
|
-
},
|
|
35
|
-
error: {
|
|
36
|
-
backgroundColor: theme.colors.negative_20
|
|
37
|
-
},
|
|
38
|
-
default: {
|
|
39
|
-
backgroundColor: theme.colors.neutral_20
|
|
40
|
-
},
|
|
41
|
-
outContainer: {
|
|
42
|
-
width: "100%",
|
|
43
|
-
position: "relative"
|
|
44
|
-
},
|
|
45
27
|
messageContainer: {
|
|
46
|
-
|
|
47
|
-
maxWidth: 700,
|
|
48
|
-
overflow: "hidden",
|
|
49
|
-
marginRight: 10
|
|
28
|
+
maxWidth: 700
|
|
50
29
|
},
|
|
51
30
|
iconContainer: {
|
|
52
|
-
|
|
53
|
-
marginLeft: -theme.space.xs
|
|
31
|
+
marginLeft: theme.spacing(-1)
|
|
54
32
|
},
|
|
55
33
|
messageActions: {
|
|
56
34
|
flex: "0 0 auto"
|
|
57
35
|
},
|
|
58
|
-
actionContainer: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
marginTop: "8px"
|
|
67
|
-
// avoid overlap with close button outline focus ring
|
|
68
|
-
},
|
|
69
|
-
closeAction: {
|
|
70
|
-
alignSelf: "flex-end"
|
|
71
|
-
}
|
|
36
|
+
actionContainer: {},
|
|
37
|
+
closeAction: {},
|
|
38
|
+
/** @deprecated use ´classes.root` instead */
|
|
39
|
+
baseVariant: {},
|
|
40
|
+
/** @deprecated use `classes.root` instead */
|
|
41
|
+
outContainer: {},
|
|
42
|
+
/** @deprecated use `classes.actionContainer` instead */
|
|
43
|
+
actionsInnerContainer: {}
|
|
72
44
|
});
|
|
73
45
|
export {
|
|
74
46
|
staticClasses,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerContent.styles.js","sources":["../../../../src/Banner/BannerContent/BannerContent.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { useClasses, staticClasses } = createClasses(\"HvBannerContent\", {\n root: {\n minWidth: \"100%\",\n
|
|
1
|
+
{"version":3,"file":"BannerContent.styles.js","sources":["../../../../src/Banner/BannerContent/BannerContent.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { useClasses, staticClasses } = createClasses(\"HvBannerContent\", {\n root: {\n minWidth: \"100%\",\n width: \"100%\",\n position: \"relative\",\n gap: theme.space.xs,\n borderRadius: theme.radii.none,\n },\n success: {},\n warning: {},\n error: {},\n default: {},\n message: {\n gap: theme.space.xs,\n padding: theme.spacing(\"xs\", 0),\n paddingLeft: theme.space.sm,\n ...theme.typography.body,\n color: theme.colors.base_dark,\n },\n action: {\n padding: theme.space.xs,\n flex: \"0 0 auto\",\n placeSelf: \"stretch\",\n },\n messageContainer: {\n maxWidth: 700,\n },\n iconContainer: {\n marginLeft: theme.spacing(-1),\n },\n messageActions: {\n flex: \"0 0 auto\",\n },\n actionContainer: {},\n closeAction: {},\n /** @deprecated use ´classes.root` instead */\n baseVariant: {},\n /** @deprecated use `classes.root` instead */\n outContainer: {},\n /** @deprecated use `classes.actionContainer` instead */\n actionsInnerContainer: {},\n});\n"],"names":[],"mappings":";;AAGO,MAAM,EAAE,YAAY,kBAAkB,cAAc,mBAAmB;AAAA,EAC5E,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,OAAO;AAAA,IACP,UAAU;AAAA,IACV,KAAK,MAAM,MAAM;AAAA,IACjB,cAAc,MAAM,MAAM;AAAA,EAC5B;AAAA,EACA,SAAS,CAAC;AAAA,EACV,SAAS,CAAC;AAAA,EACV,OAAO,CAAC;AAAA,EACR,SAAS,CAAC;AAAA,EACV,SAAS;AAAA,IACP,KAAK,MAAM,MAAM;AAAA,IACjB,SAAS,MAAM,QAAQ,MAAM,CAAC;AAAA,IAC9B,aAAa,MAAM,MAAM;AAAA,IACzB,GAAG,MAAM,WAAW;AAAA,IACpB,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,QAAQ;AAAA,IACN,SAAS,MAAM,MAAM;AAAA,IACrB,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EACA,kBAAkB;AAAA,IAChB,UAAU;AAAA,EACZ;AAAA,EACA,eAAe;AAAA,IACb,YAAY,MAAM,QAAQ,EAAE;AAAA,EAC9B;AAAA,EACA,gBAAgB;AAAA,IACd,MAAM;AAAA,EACR;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAa,CAAC;AAAA;AAAA,EAEd,aAAa,CAAC;AAAA;AAAA,EAEd,cAAc,CAAC;AAAA;AAAA,EAEf,uBAAuB,CAAA;AACzB,CAAC;"}
|
|
@@ -4,7 +4,7 @@ import MuiCheckbox from "@mui/material/Checkbox";
|
|
|
4
4
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
5
5
|
import { useClasses } from "./BaseCheckBox.styles.js";
|
|
6
6
|
import { staticClasses } from "./BaseCheckBox.styles.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Check, Partial, Box } from "./icons.js";
|
|
8
8
|
const getSelectorIcons = () => {
|
|
9
9
|
return {
|
|
10
10
|
checkbox: /* @__PURE__ */ jsx(Box, {}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef,
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState, useCallback, useMemo, isValidElement, cloneElement, Fragment } from "react";
|
|
3
3
|
import { usePopper } from "react-popper";
|
|
4
4
|
import { useForkRef } from "@mui/material/utils";
|
|
5
5
|
import { detectOverflow } from "@popperjs/core";
|
|
@@ -13,7 +13,7 @@ import { setId } from "../utils/setId.js";
|
|
|
13
13
|
import { useClasses } from "./BaseDropdown.styles.js";
|
|
14
14
|
import { staticClasses } from "./BaseDropdown.styles.js";
|
|
15
15
|
import { BaseDropdownPanel } from "./BaseDropdownPanel.js";
|
|
16
|
-
import {
|
|
16
|
+
import { BaseDropdownContext, useBaseDropdownContext } from "./context.js";
|
|
17
17
|
import { HvTypography } from "../Typography/Typography.js";
|
|
18
18
|
const BaseDropdown = forwardRef(function BaseDropdown2(props, ref) {
|
|
19
19
|
const {
|
|
@@ -77,8 +77,7 @@ const { useClasses, staticClasses } = createClasses("HvBaseDropdown", {
|
|
|
77
77
|
height: "30px",
|
|
78
78
|
boxSizing: "border-box",
|
|
79
79
|
paddingLeft: theme.space.xs,
|
|
80
|
-
paddingRight: theme.sizes.sm
|
|
81
|
-
color: "inherit"
|
|
80
|
+
paddingRight: theme.sizes.sm
|
|
82
81
|
},
|
|
83
82
|
selectionDisabled: {},
|
|
84
83
|
placeholder: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseDropdown.styles.js","sources":["../../../src/BaseDropdown/BaseDropdown.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { useClasses, staticClasses } = createClasses(\"HvBaseDropdown\", {\n root: { width: \"100%\", position: \"relative\" },\n rootDisabled: {\n cursor: \"not-allowed\",\n \"&:focus\": {\n outline: \"none\",\n },\n },\n anchor: { display: \"inline-block\", width: \"100%\" },\n container: { zIndex: theme.zIndices.popover, width: \"auto\" },\n header: {\n cursor: \"pointer\",\n userSelect: \"none\",\n position: \"relative\",\n background: theme.colors.atmo1,\n boxSizing: \"border-box\",\n border: `1px solid ${theme.colors.secondary}`,\n borderRadius: theme.radii.base,\n \"&:hover\": {\n border: `1px solid ${theme.colors.primary}`,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n \"&:focus-visible\": {\n ...outlineStyles,\n border: `1px solid ${theme.colors.primary}`,\n },\n },\n headerOpen: {\n border: `1px solid ${theme.colors.secondary}`,\n\n \"&:hover\": {\n border: `1px solid ${theme.colors.secondary}`,\n },\n },\n headerOpenUp: {\n borderRadius: `0px 0px ${theme.radii.base} ${theme.radii.base}`,\n },\n headerOpenDown: {\n borderRadius: `${theme.radii.base} ${theme.radii.base} 0px 0px`,\n },\n headerDisabled: {\n cursor: \"not-allowed\",\n pointerEvents: \"none\",\n color: theme.colors.secondary_60,\n border: `1px solid ${theme.colors.secondary_60}`,\n background: theme.colors.atmo2,\n \"&:hover\": {\n border: `1px solid ${theme.colors.secondary_60}`,\n },\n },\n headerReadOnly: {\n cursor: \"not-allowed\",\n pointerEvents: \"none\",\n color: theme.colors.secondary_80,\n border: `1px solid ${theme.colors.secondary_60}`,\n background: theme.colors.atmo2,\n userSelect: \"text\",\n \"&:focus-visible\": {\n outline: \"none\",\n border: `1px solid ${theme.colors.secondary_60}`,\n },\n },\n arrowContainer: {\n position: \"absolute\",\n pointerEvents: \"none\",\n top: -1,\n right: -1,\n },\n arrow: {},\n selection: {\n display: \"flex\",\n alignItems: \"center\",\n height: \"30px\",\n boxSizing: \"border-box\",\n paddingLeft: theme.space.xs,\n paddingRight: theme.sizes.sm,\n
|
|
1
|
+
{"version":3,"file":"BaseDropdown.styles.js","sources":["../../../src/BaseDropdown/BaseDropdown.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { useClasses, staticClasses } = createClasses(\"HvBaseDropdown\", {\n root: { width: \"100%\", position: \"relative\" },\n rootDisabled: {\n cursor: \"not-allowed\",\n \"&:focus\": {\n outline: \"none\",\n },\n },\n anchor: { display: \"inline-block\", width: \"100%\" },\n container: { zIndex: theme.zIndices.popover, width: \"auto\" },\n header: {\n cursor: \"pointer\",\n userSelect: \"none\",\n position: \"relative\",\n background: theme.colors.atmo1,\n boxSizing: \"border-box\",\n border: `1px solid ${theme.colors.secondary}`,\n borderRadius: theme.radii.base,\n \"&:hover\": {\n border: `1px solid ${theme.colors.primary}`,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n \"&:focus-visible\": {\n ...outlineStyles,\n border: `1px solid ${theme.colors.primary}`,\n },\n },\n headerOpen: {\n border: `1px solid ${theme.colors.secondary}`,\n\n \"&:hover\": {\n border: `1px solid ${theme.colors.secondary}`,\n },\n },\n headerOpenUp: {\n borderRadius: `0px 0px ${theme.radii.base} ${theme.radii.base}`,\n },\n headerOpenDown: {\n borderRadius: `${theme.radii.base} ${theme.radii.base} 0px 0px`,\n },\n headerDisabled: {\n cursor: \"not-allowed\",\n pointerEvents: \"none\",\n color: theme.colors.secondary_60,\n border: `1px solid ${theme.colors.secondary_60}`,\n background: theme.colors.atmo2,\n \"&:hover\": {\n border: `1px solid ${theme.colors.secondary_60}`,\n },\n },\n headerReadOnly: {\n cursor: \"not-allowed\",\n pointerEvents: \"none\",\n color: theme.colors.secondary_80,\n border: `1px solid ${theme.colors.secondary_60}`,\n background: theme.colors.atmo2,\n userSelect: \"text\",\n \"&:focus-visible\": {\n outline: \"none\",\n border: `1px solid ${theme.colors.secondary_60}`,\n },\n },\n arrowContainer: {\n position: \"absolute\",\n pointerEvents: \"none\",\n top: -1,\n right: -1,\n },\n arrow: {},\n selection: {\n display: \"flex\",\n alignItems: \"center\",\n height: \"30px\",\n boxSizing: \"border-box\",\n paddingLeft: theme.space.xs,\n paddingRight: theme.sizes.sm,\n },\n selectionDisabled: {},\n placeholder: {\n display: \"block\",\n color: theme.colors.secondary_80,\n },\n panel: {\n // TODO: remove padding override in v6 (most elements need it)\n padding: 0,\n border: `1px solid ${theme.colors.secondary}`,\n },\n panelOpenedUp: {\n top: 1,\n borderRadius: `${theme.radii.base} ${theme.radii.base} 0 0`,\n },\n panelOpenedDown: {\n top: -1,\n borderRadius: `0 0 ${theme.radii.base} ${theme.radii.base}`,\n },\n inputExtensionOpen: {\n height: \"0px\",\n backgroundColor: theme.colors.atmo1,\n borderTop: \"none\",\n borderBottom: \"none\",\n borderRight: `1px solid ${theme.colors.secondary}`,\n borderLeft: `1px solid ${theme.colors.secondary}`,\n },\n inputExtensionLeftPosition: { marginLeft: \"auto\" },\n inputExtensionOpenShadow: {\n boxShadow: `0px 8px 0px ${theme.colors.atmo1}, 0px 0px 9px 0px rgba(65,65,65,.12)`,\n },\n inputExtensionFloatRight: { float: \"right\" },\n inputExtensionFloatLeft: { float: \"left\" },\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,YAAY,kB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,EACA,4BAA4B,EAAE,YAAY,OAAO;AAAA,EACjD,0BAA0B;AAAA,IACxB,WAAW,eAAe,MAAM,OAAO,KAAK;AAAA,EAC9C;AAAA,EACA,0BAA0B,EAAE,OAAO,QAAQ;AAAA,EAC3C,yBAAyB,EAAE,OAAO,OAAO;AAC3C,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.js","sources":["../../../src/BaseInput/BaseInput.tsx"],"sourcesContent":["import { forwardRef, useContext } from \"react\";\nimport MuiInputBase, { type InputBaseProps } from \"@mui/material/InputBase\";\nimport { useForkRef } from \"@mui/material/utils\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport {\n buildAriaPropsFromContext,\n buildFormElementPropsFromContext,\n HvFormElementContext,\n HvFormElementDescriptorsContext,\n} from \"../FormElement\";\nimport { staticClasses, useClasses } from \"./BaseInput.styles\";\n\nexport { staticClasses as baseInputClasses };\n\nexport type HvBaseInputClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBaseInputProps\n extends Omit<\n InputBaseProps,\n \"onChange\" | \"classes\" | \"ref\" | \"color\" | \"size\"\n > {\n /** The input name. */\n name?: string;\n /** The value of the input, when controlled. */\n value?: React.InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** The initial value of the input, when uncontrolled. */\n defaultValue?: React.InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** If `true` the input is disabled. */\n disabled?: boolean;\n /** Indicates that the input is not editable. */\n readOnly?: boolean;\n /** If true, the input element will be required. */\n required?: boolean;\n
|
|
1
|
+
{"version":3,"file":"BaseInput.js","sources":["../../../src/BaseInput/BaseInput.tsx"],"sourcesContent":["import { forwardRef, useContext } from \"react\";\nimport MuiInputBase, { type InputBaseProps } from \"@mui/material/InputBase\";\nimport { useForkRef } from \"@mui/material/utils\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport {\n buildAriaPropsFromContext,\n buildFormElementPropsFromContext,\n HvFormElementContext,\n HvFormElementDescriptorsContext,\n} from \"../FormElement\";\nimport { staticClasses, useClasses } from \"./BaseInput.styles\";\n\nexport { staticClasses as baseInputClasses };\n\nexport type HvBaseInputClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBaseInputProps\n extends Omit<\n InputBaseProps,\n \"onChange\" | \"classes\" | \"ref\" | \"color\" | \"size\"\n > {\n /** The input name. */\n name?: string;\n /** The value of the input, when controlled. */\n value?: React.InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** The initial value of the input, when uncontrolled. */\n defaultValue?: React.InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** If `true` the input is disabled. */\n disabled?: boolean;\n /** Indicates that the input is not editable. */\n readOnly?: boolean;\n /** If true, the input element will be required. */\n required?: boolean;\n /**\n * Callback fired when the value is changed.\n *\n * You can pull out the new value by accessing `event.target.value` (string),\n * or using the second callback argument.\n */\n onChange?: (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n value: string,\n ) => void;\n /** If true, a textarea element will be rendered. */\n multiline?: boolean;\n /** If true and multiline is also true the textarea element will be resizable. */\n resizable?: boolean;\n /** Denotes if the input is in an invalid state. */\n invalid?: boolean;\n /**\n * Allows passing a ref to the underlying input\n * @deprecated Use `ref` directly instead\n * */\n inputRef?: InputBaseProps[\"inputRef\"];\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBaseInputClasses;\n}\n\n/**\n * An Input component that only posses the most basic functionalities.\n * It should be used alongside the other form elements to construct a proper accessible form.\n */\nexport const HvBaseInput = forwardRef<\n // no-indent\n React.ElementRef<\"input\">,\n HvBaseInputProps\n>(function HvBaseInput(props, ref) {\n const {\n classes: classesProp,\n className = \"\",\n id,\n name,\n value,\n defaultValue,\n required,\n readOnly,\n disabled,\n onChange,\n type = \"text\",\n placeholder,\n multiline,\n resizable,\n invalid: invalidProp,\n inputRef,\n inputProps = {},\n ...others\n } = useDefaultProps(\"HvBaseInput\", props);\n const { classes, cx } = useClasses(classesProp);\n const formElementContext = useContext(HvFormElementContext);\n const formElementProps = buildFormElementPropsFromContext(\n name,\n disabled,\n readOnly,\n required,\n formElementContext,\n );\n\n const forkedRef = useForkRef(ref, inputRef);\n\n const invalid = invalidProp || formElementProps.status === \"invalid\";\n\n const formElementDescriptorsContext = useContext(\n HvFormElementDescriptorsContext,\n );\n const ariaProps = buildAriaPropsFromContext(\n inputProps,\n formElementDescriptorsContext,\n invalid,\n id,\n );\n\n return (\n <MuiInputBase\n id={id}\n name={formElementProps.name}\n value={value}\n defaultValue={defaultValue}\n placeholder={placeholder}\n readOnly={!!formElementProps.readOnly}\n disabled={formElementProps.disabled}\n onChange={(event) => onChange?.(event, event.target.value)}\n className={cx(classes.root, classes.inputRoot, className, {\n [classes.inputRootMultiline]: multiline,\n [classes.multiline]: multiline,\n [classes.inputRootInvalid]: invalid,\n [classes.invalid]: invalid,\n [classes.inputRootReadOnly]: formElementProps.readOnly,\n [classes.readOnly]: formElementProps.readOnly,\n [classes.inputRootDisabled]: formElementProps.disabled,\n [classes.disabled]: formElementProps.disabled,\n })}\n classes={{\n focused: cx(classes.focused, classes.inputRootFocused),\n input: cx(classes.input, {\n [classes.inputResizable]: !formElementProps.disabled && resizable,\n [classes.inputDisabled]: formElementProps.disabled,\n [classes.inputReadOnly]: formElementProps.readOnly,\n }),\n }}\n inputProps={{\n // Avoid the required attribute at the root node\n required: formElementProps.required,\n ...inputProps,\n ...ariaProps,\n }}\n inputRef={forkedRef}\n multiline={multiline}\n {...(multiline ? { rows: 10 } : { type })}\n {...others}\n />\n );\n});\n"],"names":["HvBaseInput"],"mappings":";;;;;;;;;AAkEO,MAAM,cAAc,WAIzB,SAASA,aAAY,OAAO,KAAK;AAC3B,QAAA;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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gBAAgB;AAAA,QACrD,OAAO,GAAG,QAAQ,OAAO;AAAA,UACvB,CAAC,QAAQ,cAAc,GAAG,CAAC,iBAAiB,YAAY;AAAA,UACxD,CAAC,QAAQ,aAAa,GAAG,iBAAiB;AAAA,UAC1C,CAAC,QAAQ,aAAa,GAAG,iBAAiB;AAAA,QAC3C,CAAA;AAAA,MACH;AAAA,MACA,YAAY;AAAA;AAAA,QAEV,UAAU,iBAAiB;AAAA,QAC3B,GAAG;AAAA,QACH,GAAG;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACC,GAAI,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK;AAAA,MACtC,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ,CAAC;"}
|
|
@@ -94,7 +94,7 @@ const { staticClasses, useClasses } = createClasses("HvBaseInput", {
|
|
|
94
94
|
height: "100%",
|
|
95
95
|
marginLeft: theme.space.xs,
|
|
96
96
|
marginRight: theme.space.xs,
|
|
97
|
-
padding:
|
|
97
|
+
padding: 0,
|
|
98
98
|
backgroundColor: "transparent",
|
|
99
99
|
overflow: "hidden",
|
|
100
100
|
textOverflow: "ellipsis",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.styles.js","sources":["../../../src/BaseInput/BaseInput.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseInput\", {\n root: {\n // #region `input` style reset\n \"input:-webkit-autofill\": {\n WebkitBoxShadow: `0 0 0px 1000px ${theme.colors.atmo1} inset`,\n WebkitTextFillColor: theme.colors.secondary,\n },\n\n // Clears number input up/down arrows in Chrome and Firefox\n \"input[type=number]\": {\n MozAppearance: \"textfield\",\n \"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0,\n },\n },\n\n // Clears time input clock in Chrome\n \"input::-webkit-calendar-picker-indicator\": {\n display: \"none\",\n },\n\n // Clears search input clear button in Chrome\n \"input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration\":\n {\n display: \"none\",\n },\n // #endregion\n\n display: \"inline-flex\",\n width: \"100%\",\n position: \"relative\",\n margin: 0,\n borderRadius: theme.radii.base,\n height: \"32px\",\n borderWidth: 1,\n borderColor: theme.colors.secondary,\n boxSizing: \"border-box\",\n backgroundColor: theme.colors.atmo1,\n fontFamily: theme.fontFamily.body,\n\n \":hover:not($disabled,$invalid,$readOnly)\": {\n borderColor: theme.colors.primary,\n },\n \":focus-within:not($disabled)\": {\n ...outlineStyles,\n },\n },\n disabled: {\n backgroundColor: theme.colors.atmo2,\n borderColor: theme.colors.secondary_60,\n\n cursor: \"not-allowed\",\n\n \"&&::before\": {\n borderBottomStyle: \"none\",\n },\n },\n invalid: {\n borderColor: theme.colors.negative_120,\n },\n multiline: {\n padding: 0,\n overflow: \"auto\",\n height: \"auto\",\n\n \"& $input\": {\n borderRadius: theme.radii.base,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n margin: 0,\n },\n },\n resizable: { width: \"auto\" },\n readOnly: {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\n focused: {},\n /** @deprecated unused. use `::after` instead */\n inputBorderContainer: {},\n /** @deprecated use `classes.invalid` instead */\n inputRootInvalid: { borderColor: theme.colors.negative_120 },\n /** @deprecated use `classes.readOnly` instead */\n inputRootReadOnly: {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\n /** @deprecated use `classes.root` instead */\n inputRoot: {},\n /** @deprecated unused */\n inputRootFocused: {},\n /** @deprecated use `classes.disabled` instead */\n inputRootDisabled: {},\n /** @deprecated use `classes.multiline` instead */\n inputRootMultiline: {},\n input: {\n height: \"100%\",\n marginLeft: theme.space.xs,\n marginRight: theme.space.xs,\n padding:
|
|
1
|
+
{"version":3,"file":"BaseInput.styles.js","sources":["../../../src/BaseInput/BaseInput.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseInput\", {\n root: {\n // #region `input` style reset\n \"input:-webkit-autofill\": {\n WebkitBoxShadow: `0 0 0px 1000px ${theme.colors.atmo1} inset`,\n WebkitTextFillColor: theme.colors.secondary,\n },\n\n // Clears number input up/down arrows in Chrome and Firefox\n \"input[type=number]\": {\n MozAppearance: \"textfield\",\n \"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0,\n },\n },\n\n // Clears time input clock in Chrome\n \"input::-webkit-calendar-picker-indicator\": {\n display: \"none\",\n },\n\n // Clears search input clear button in Chrome\n \"input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration\":\n {\n display: \"none\",\n },\n // #endregion\n\n display: \"inline-flex\",\n width: \"100%\",\n position: \"relative\",\n margin: 0,\n borderRadius: theme.radii.base,\n height: \"32px\",\n borderWidth: 1,\n borderColor: theme.colors.secondary,\n boxSizing: \"border-box\",\n backgroundColor: theme.colors.atmo1,\n fontFamily: theme.fontFamily.body,\n\n \":hover:not($disabled,$invalid,$readOnly)\": {\n borderColor: theme.colors.primary,\n },\n \":focus-within:not($disabled)\": {\n ...outlineStyles,\n },\n },\n disabled: {\n backgroundColor: theme.colors.atmo2,\n borderColor: theme.colors.secondary_60,\n\n cursor: \"not-allowed\",\n\n \"&&::before\": {\n borderBottomStyle: \"none\",\n },\n },\n invalid: {\n borderColor: theme.colors.negative_120,\n },\n multiline: {\n padding: 0,\n overflow: \"auto\",\n height: \"auto\",\n\n \"& $input\": {\n borderRadius: theme.radii.base,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n margin: 0,\n },\n },\n resizable: { width: \"auto\" },\n readOnly: {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\n focused: {},\n /** @deprecated unused. use `::after` instead */\n inputBorderContainer: {},\n /** @deprecated use `classes.invalid` instead */\n inputRootInvalid: { borderColor: theme.colors.negative_120 },\n /** @deprecated use `classes.readOnly` instead */\n inputRootReadOnly: {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\n /** @deprecated use `classes.root` instead */\n inputRoot: {},\n /** @deprecated unused */\n inputRootFocused: {},\n /** @deprecated use `classes.disabled` instead */\n inputRootDisabled: {},\n /** @deprecated use `classes.multiline` instead */\n inputRootMultiline: {},\n input: {\n height: \"100%\",\n marginLeft: theme.space.xs,\n marginRight: theme.space.xs,\n padding: 0,\n backgroundColor: \"transparent\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n width: \"initial\",\n flexGrow: 1,\n ...theme.typography.body,\n\n \"&::placeholder\": {\n opacity: 1,\n color: theme.colors.secondary_80,\n },\n },\n inputDisabled: {\n color: theme.colors.secondary_60,\n WebkitTextFillColor: theme.colors.secondary_60,\n },\n inputReadOnly: {\n color: theme.colors.secondary_80,\n },\n inputResizable: {\n resize: \"both\",\n width: \"100%\",\n },\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA,EACxE,MAAM;AAAA;AAAA,IAEJ,0BAA0B;AAAA,MACxB,iBAAiB,kBAAkB,MAAM,OAAO,KAAK;AAAA,MACrD,qBAAqB,MAAM,OAAO;AAAA,IACpC;AAAA;AAAA,IAGA,sBAAsB;AAAA,MACpB,eAAe;AAAA,MACf,6DAA6D;AAAA,QAC3D,kBAAkB;AAAA,QAClB,QAAQ;AAAA,MAAA;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B,aAAa,MAAM,OAAO;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA;AAAA,EAEA,WAAW,CAAC;AAAA;AAAA,EAEZ,kBAAkB,CAAC;AAAA;AAAA,EAEnB,mBAAmB,CAAC;AAAA;AAAA,EAEpB,oBAAoB,CAAC;AAAA,EACrB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,YAAY,MAAM,MAAM;AAAA,IACxB,aAAa,MAAM,MAAM;AAAA,IACzB,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,cAAc;AAAA,IACd,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,GAAG,MAAM,WAAW;AAAA,IAEpB,kBAAkB;AAAA,MAChB,SAAS;AAAA,MACT,OAAO,MAAM,OAAO;AAAA,IAAA;AAAA,EAExB;AAAA,EACA,eAAe;AAAA,IACb,OAAO,MAAM,OAAO;AAAA,IACpB,qBAAqB,MAAM,OAAO;AAAA,EACpC;AAAA,EACA,eAAe;AAAA,IACb,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,gBAAgB;AAAA,IACd,QAAQ;AAAA,IACR,OAAO;AAAA,EAAA;AAEX,CAAC;"}
|
|
@@ -47,7 +47,7 @@ const computeValidationMessage = (inputValidity, errorMessages) => {
|
|
|
47
47
|
}
|
|
48
48
|
return errorMessages.error;
|
|
49
49
|
};
|
|
50
|
-
const validateInput = (input,
|
|
50
|
+
const validateInput = (input, required, minCharQuantity, maxCharQuantity, validationType, validation) => {
|
|
51
51
|
const inputValidity = {
|
|
52
52
|
valid: input?.validity?.valid ?? true,
|
|
53
53
|
badInput: input?.validity?.badInput,
|
|
@@ -61,6 +61,7 @@ const validateInput = (input, value, required, minCharQuantity, maxCharQuantity,
|
|
|
61
61
|
typeMismatch: input?.validity?.typeMismatch,
|
|
62
62
|
valueMissing: input?.validity?.valueMissing
|
|
63
63
|
};
|
|
64
|
+
const value = input?.value;
|
|
64
65
|
if (!value) {
|
|
65
66
|
if (required) {
|
|
66
67
|
inputValidity.valueMissing = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validations.js","sources":["../../../src/BaseInput/validations.ts"],"sourcesContent":["import { InputBaseComponentProps } from \"@mui/material/InputBase\";\n\nimport { validationStates } from \"../FormElement\";\n\n/** Checks if the value is a number. */\nconst isNumeric = (num: string) =>\n // to prevent Number( <spaces> ) = 0\n num.trim().length > 0 && !Number.isNaN(Number(num));\n\n/** Checks if the value is an email */\nconst isEmail = (email: string) => {\n const regexp =\n /^[^\\\\s]+[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?[.])+[a-z0-9](?:[a-z0-9-]*[a-z0-9])$/i;\n return regexp.test(email);\n};\n\nexport const validationTypes = Object.freeze({\n none: \"none\",\n number: \"number\",\n email: \"email\",\n});\n\n/** Returns the input's validation type based in the type of the input. */\nexport const computeValidationType = (type: React.HTMLInputTypeAttribute) => {\n switch (type) {\n case \"number\":\n return validationTypes.number;\n case \"email\":\n return validationTypes.email;\n\n default:\n return validationTypes.none;\n }\n};\n\n/**\n * Checks whether any integrated validation, native or not, is active.\n */\nexport const hasBuiltInValidations = (\n required: boolean | undefined,\n validationType: React.HTMLInputTypeAttribute,\n minCharQuantity: number | null | undefined,\n maxCharQuantity: number | null | undefined,\n validation?: (value: string) => boolean,\n inputProps?: InputBaseComponentProps,\n) =>\n required ||\n validationType !== validationTypes.none ||\n minCharQuantity != null ||\n maxCharQuantity != null ||\n validation != null ||\n inputProps?.required != null ||\n inputProps?.minLength != null ||\n inputProps?.maxLength != null ||\n inputProps?.min != null ||\n inputProps?.max != null ||\n (inputProps?.type != null &&\n inputProps?.type !== \"text\" &&\n inputProps?.type !== \"password\") ||\n inputProps?.pattern != null;\n\n/** Returns the form element's validation state based in the validity state of the input. */\nexport const computeValidationState = (\n inputValidity: HvInputValidity,\n isEmptyValue: boolean,\n) => {\n // to keep 2.x behaviour,\n // consider that if the value is empty (and not required) we're returning to the standBy state.\n // might not make sense, as it makes impossible to say if the user explicitly cleared the input.\n if (inputValidity.valid && isEmptyValue) {\n return validationStates.standBy;\n }\n\n return inputValidity.valid\n ? validationStates.valid\n : validationStates.invalid;\n};\n\n/**\n * Returns a error message based in the validity state of the input.\n *\n * Only one error message is returned even if multiple validations fail.\n * Also, only required, minCharQuantity, maxCharQuantity and validationType have specific error messages.\n *\n * For further customization both status and statusMessage should be controlled and\n * set using the onBlur callback that receives both the value and the input validity object.\n */\nexport const computeValidationMessage = (\n inputValidity: HvInputValidity,\n /** The available localized error messages. */\n errorMessages: Record<string, string>,\n) => {\n if (inputValidity.valid) {\n return \"\";\n }\n\n if (inputValidity.valueMissing) {\n return errorMessages.requiredError;\n }\n if (inputValidity.tooLong) {\n return errorMessages.maxCharError;\n }\n if (inputValidity.tooShort) {\n return errorMessages.minCharError;\n }\n if (inputValidity.typeMismatch) {\n return errorMessages.typeMismatchError;\n }\n\n return errorMessages.error;\n};\n\n/**\n * Returns a object describing the validity state of the input.\n *\n * It implements the native browser's ValidityState interface:\n * https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n */\nexport const validateInput = (\n input: HTMLInputElement | HTMLTextAreaElement | null,\n
|
|
1
|
+
{"version":3,"file":"validations.js","sources":["../../../src/BaseInput/validations.ts"],"sourcesContent":["import { InputBaseComponentProps } from \"@mui/material/InputBase\";\n\nimport { validationStates } from \"../FormElement\";\n\n/** Checks if the value is a number. */\nconst isNumeric = (num: string) =>\n // to prevent Number( <spaces> ) = 0\n num.trim().length > 0 && !Number.isNaN(Number(num));\n\n/** Checks if the value is an email */\nconst isEmail = (email: string) => {\n const regexp =\n /^[^\\\\s]+[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?[.])+[a-z0-9](?:[a-z0-9-]*[a-z0-9])$/i;\n return regexp.test(email);\n};\n\nexport const validationTypes = Object.freeze({\n none: \"none\",\n number: \"number\",\n email: \"email\",\n});\n\n/** Returns the input's validation type based in the type of the input. */\nexport const computeValidationType = (type: React.HTMLInputTypeAttribute) => {\n switch (type) {\n case \"number\":\n return validationTypes.number;\n case \"email\":\n return validationTypes.email;\n\n default:\n return validationTypes.none;\n }\n};\n\n/**\n * Checks whether any integrated validation, native or not, is active.\n */\nexport const hasBuiltInValidations = (\n required: boolean | undefined,\n validationType: React.HTMLInputTypeAttribute,\n minCharQuantity: number | null | undefined,\n maxCharQuantity: number | null | undefined,\n validation?: (value: string) => boolean,\n inputProps?: InputBaseComponentProps,\n) =>\n required ||\n validationType !== validationTypes.none ||\n minCharQuantity != null ||\n maxCharQuantity != null ||\n validation != null ||\n inputProps?.required != null ||\n inputProps?.minLength != null ||\n inputProps?.maxLength != null ||\n inputProps?.min != null ||\n inputProps?.max != null ||\n (inputProps?.type != null &&\n inputProps?.type !== \"text\" &&\n inputProps?.type !== \"password\") ||\n inputProps?.pattern != null;\n\n/** Returns the form element's validation state based in the validity state of the input. */\nexport const computeValidationState = (\n inputValidity: HvInputValidity,\n isEmptyValue: boolean,\n) => {\n // to keep 2.x behaviour,\n // consider that if the value is empty (and not required) we're returning to the standBy state.\n // might not make sense, as it makes impossible to say if the user explicitly cleared the input.\n if (inputValidity.valid && isEmptyValue) {\n return validationStates.standBy;\n }\n\n return inputValidity.valid\n ? validationStates.valid\n : validationStates.invalid;\n};\n\n/**\n * Returns a error message based in the validity state of the input.\n *\n * Only one error message is returned even if multiple validations fail.\n * Also, only required, minCharQuantity, maxCharQuantity and validationType have specific error messages.\n *\n * For further customization both status and statusMessage should be controlled and\n * set using the onBlur callback that receives both the value and the input validity object.\n */\nexport const computeValidationMessage = (\n inputValidity: HvInputValidity,\n /** The available localized error messages. */\n errorMessages: Record<string, string>,\n) => {\n if (inputValidity.valid) {\n return \"\";\n }\n\n if (inputValidity.valueMissing) {\n return errorMessages.requiredError;\n }\n if (inputValidity.tooLong) {\n return errorMessages.maxCharError;\n }\n if (inputValidity.tooShort) {\n return errorMessages.minCharError;\n }\n if (inputValidity.typeMismatch) {\n return errorMessages.typeMismatchError;\n }\n\n return errorMessages.error;\n};\n\n/**\n * Returns a object describing the validity state of the input.\n *\n * It implements the native browser's ValidityState interface:\n * https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n */\nexport const validateInput = (\n input: HTMLInputElement | HTMLTextAreaElement | null,\n required: boolean | undefined,\n minCharQuantity: any,\n maxCharQuantity: any,\n validationType: string,\n validation?: (value: string) => boolean,\n): HvInputValidity => {\n // bootstrap validity object using browser's built-in validation\n const inputValidity: HvInputValidity = {\n valid: input?.validity?.valid ?? true,\n badInput: input?.validity?.badInput,\n customError: input?.validity?.customError,\n patternMismatch: input?.validity?.patternMismatch,\n rangeOverflow: input?.validity?.rangeOverflow,\n rangeUnderflow: input?.validity?.rangeUnderflow,\n stepMismatch: input?.validity?.stepMismatch,\n tooLong: input?.validity?.tooLong,\n tooShort: input?.validity?.tooShort,\n typeMismatch: input?.validity?.typeMismatch,\n valueMissing: input?.validity?.valueMissing,\n };\n\n const value = input?.value;\n\n if (!value) {\n if (required) {\n // this is redundant because we're setting the required property in the native input\n inputValidity.valueMissing = true;\n inputValidity.valid = false;\n }\n } else {\n // we're not setting minlength and maxlength in the native input\n // to avoid different browser's behaviours and keep the user experience consistent\n if (minCharQuantity !== null && value.length < minCharQuantity) {\n inputValidity.tooShort = true;\n inputValidity.valid = false;\n }\n\n if (maxCharQuantity !== null && value.length > maxCharQuantity) {\n inputValidity.tooLong = true;\n inputValidity.valid = false;\n }\n\n // the validationType is used instead of type\n // for the same reason stated above\n switch (validationType) {\n case validationTypes.number:\n if (!isNumeric(value)) {\n inputValidity.typeMismatch = true;\n inputValidity.valid = false;\n }\n break;\n\n case validationTypes.email:\n if (!isEmail(value)) {\n inputValidity.typeMismatch = true;\n inputValidity.valid = false;\n }\n break;\n\n default:\n }\n\n if (validation != null && !validation(value)) {\n inputValidity.customError = true;\n inputValidity.valid = false;\n }\n }\n\n return inputValidity;\n};\n\ntype Mutable<T> = { -readonly [P in keyof T]: T[P] };\n\nexport interface HvInputValidity extends Partial<Mutable<ValidityState>> {}\n\nexport const DEFAULT_ERROR_MESSAGES = {\n error: \"Invalid value\",\n requiredError: \"The value is required\",\n minCharError: \"The value is too short\",\n maxCharError: \"The value is too long\",\n typeMismatchError: \"Invalid value\",\n};\n"],"names":[],"mappings":";AAKA,MAAM,YAAY,CAAC;AAAA;AAAA,EAEjB,IAAI,KAAK,EAAE,SAAS,KAAK,CAAC,OAAO,MAAM,OAAO,GAAG,CAAC;AAAA;AAGpD,MAAM,UAAU,CAAC,UAAkB;AACjC,QAAM,SACJ;AACK,SAAA,OAAO,KAAK,KAAK;AAC1B;AAEa,MAAA,kBAAkB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT,CAAC;AAGY,MAAA,wBAAwB,CAAC,SAAuC;AAC3E,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,gBAAgB;AAAA,IACzB,KAAK;AACH,aAAO,gBAAgB;AAAA,IAEzB;AACE,aAAO,gBAAgB;AAAA,EAAA;AAE7B;AAKO,MAAM,wBAAwB,CACnC,UACA,gBACA,iBACA,iBACA,YACA,eAEA,YACA,mBAAmB,gBAAgB,QACnC,mBAAmB,QACnB,mBAAmB,QACnB,cAAc,QACd,YAAY,YAAY,QACxB,YAAY,aAAa,QACzB,YAAY,aAAa,QACzB,YAAY,OAAO,QACnB,YAAY,OAAO,QAClB,YAAY,QAAQ,QACnB,YAAY,SAAS,UACrB,YAAY,SAAS,cACvB,YAAY,WAAW;AAGZ,MAAA,yBAAyB,CACpC,eACA,iBACG;AAIC,MAAA,cAAc,SAAS,cAAc;AACvC,WAAO,iBAAiB;AAAA,EAAA;AAG1B,SAAO,cAAc,QACjB,iBAAiB,QAC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c,eAAe;AAC7B,wBAAc,QAAQ;AAAA,QAAA;AAExB;AAAA,MAEF,KAAK,gBAAgB;AACf,YAAA,CAAC,QAAQ,KAAK,GAAG;AACnB,wBAAc,eAAe;AAC7B,wBAAc,QAAQ;AAAA,QAAA;AAExB;AAAA,IAEF;AAGF,QAAI,cAAc,QAAQ,CAAC,WAAW,KAAK,GAAG;AAC5C,oBAAc,cAAc;AAC5B,oBAAc,QAAQ;AAAA,IAAA;AAAA,EACxB;AAGK,SAAA;AACT;AAMO,MAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,cAAc;AAAA,EACd,cAAc;AAAA,EACd,mBAAmB;AACrB;"}
|
|
@@ -4,7 +4,7 @@ import MuiRadio from "@mui/material/Radio";
|
|
|
4
4
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
5
5
|
import { useClasses } from "./BaseRadio.styles.js";
|
|
6
6
|
import { staticClasses } from "./BaseRadio.styles.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Selected, Unselected } from "./icons.js";
|
|
8
8
|
const getSelectorIcons = () => {
|
|
9
9
|
return {
|
|
10
10
|
radio: /* @__PURE__ */ jsx(Unselected, {}),
|