@greenbone/ui-lib 2.1.1-alpha0 → 2.1.2-alpha0
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/lib/cjs/components/Accordion/Accordion.js +1 -1
- package/lib/cjs/components/Accordion/Accordion.js.map +1 -1
- package/lib/cjs/components/Alert/Alert.js +1 -1
- package/lib/cjs/components/Alert/Alert.js.map +1 -1
- package/lib/cjs/components/ConfirmationDialog/ConfirmationDialog.js +1 -1
- package/lib/cjs/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -1
- package/lib/cjs/components/Drawer/Drawer.js +1 -1
- package/lib/cjs/components/Drawer/Drawer.js.map +1 -1
- package/lib/cjs/components/Filter/TermContainer/Term/TermBadge.js +1 -1
- package/lib/cjs/components/Filter/TermContainer/Term/TermBadge.js.map +1 -1
- package/lib/cjs/components/Filter/persistence/FilterPersistent.js +1 -1
- package/lib/cjs/components/Filter/persistence/FilterPersistent.js.map +1 -1
- package/lib/cjs/components/Filter/utils/FilterSelect.js +1 -1
- package/lib/cjs/components/Filter/utils/FilterSelect.js.map +1 -1
- package/lib/cjs/components/Filter/utils/Select.js +1 -1
- package/lib/cjs/components/Filter/utils/Select.js.map +1 -1
- package/lib/cjs/components/Form/Button/Button.js +1 -1
- package/lib/cjs/components/Form/Button/Button.js.map +1 -1
- package/lib/cjs/components/Form/Checkbox/Checkbox.js +1 -1
- package/lib/cjs/components/Form/Checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/components/Form/DateTimePicker/DateTimePicker.js +1 -1
- package/lib/cjs/components/Form/DateTimePicker/DateTimePicker.js.map +1 -1
- package/lib/cjs/components/Form/DateTimePicker/TimePicker.js +1 -1
- package/lib/cjs/components/Form/DateTimePicker/TimePicker.js.map +1 -1
- package/lib/cjs/components/Form/FileInput/FileInput.js +1 -1
- package/lib/cjs/components/Form/FileInput/FileInput.js.map +1 -1
- package/lib/cjs/components/Form/Form/Form.js +1 -1
- package/lib/cjs/components/Form/Form/Form.js.map +1 -1
- package/lib/cjs/components/Form/Input/Input.js +1 -1
- package/lib/cjs/components/Form/Input/Input.js.map +1 -1
- package/lib/cjs/components/Form/MenuButton/index.js +1 -1
- package/lib/cjs/components/Form/MenuButton/index.js.map +1 -1
- package/lib/cjs/components/Form/PasswordInput/PasswordInput.js +1 -1
- package/lib/cjs/components/Form/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/cjs/components/Form/RadioButton/RadioButton.js +1 -1
- package/lib/cjs/components/Form/RadioButton/RadioButton.js.map +1 -1
- package/lib/cjs/components/Form/Select/Cascade/CascadeMenu.js +1 -1
- package/lib/cjs/components/Form/Select/Cascade/CascadeMenu.js.map +1 -1
- package/lib/cjs/components/Form/Select/Cascade/CascadeOption.js +1 -1
- package/lib/cjs/components/Form/Select/Cascade/CascadeOption.js.map +1 -1
- package/lib/cjs/components/Form/Select/Cascade/index.js +1 -1
- package/lib/cjs/components/Form/Select/Cascade/index.js.map +1 -1
- package/lib/cjs/components/Form/Select/CreatableSelect.js +1 -1
- package/lib/cjs/components/Form/Select/CreatableSelect.js.map +1 -1
- package/lib/cjs/components/Form/Select/Select.js +1 -1
- package/lib/cjs/components/Form/Select/Select.js.map +1 -1
- package/lib/cjs/components/Form/Switch/Switch.js +1 -1
- package/lib/cjs/components/Form/Switch/Switch.js.map +1 -1
- package/lib/cjs/components/Form/Textarea/Textarea.js +1 -1
- package/lib/cjs/components/Form/Textarea/Textarea.js.map +1 -1
- package/lib/cjs/components/Icon/Icon.js +1 -1
- package/lib/cjs/components/Icon/Icon.js.map +1 -1
- package/lib/cjs/components/InfoTip/InfoTip.js +1 -1
- package/lib/cjs/components/InfoTip/InfoTip.js.map +1 -1
- package/lib/cjs/components/InformationList/InformationList.js +1 -1
- package/lib/cjs/components/InformationList/InformationList.js.map +1 -1
- package/lib/cjs/components/Layout/AppNavigation/AppNavigationLink.js +1 -1
- package/lib/cjs/components/Layout/AppNavigation/AppNavigationLink.js.map +1 -1
- package/lib/cjs/components/Layout/SimplePageLayout/SimpleGrid.js +1 -1
- package/lib/cjs/components/Layout/SimplePageLayout/SimpleGrid.js.map +1 -1
- package/lib/cjs/components/Layout/SimplePageLayout/index.js +1 -1
- package/lib/cjs/components/Layout/SimplePageLayout/index.js.map +1 -1
- package/lib/cjs/components/Modal/Modal.js +1 -1
- package/lib/cjs/components/Modal/Modal.js.map +1 -1
- package/lib/cjs/components/Notification/notifications.js +1 -1
- package/lib/cjs/components/Notification/notifications.js.map +1 -1
- package/lib/cjs/components/Table/TableClientSide/TableClientSidePersistent/index.js +1 -1
- package/lib/cjs/components/Table/TableClientSide/TableClientSidePersistent/index.js.map +1 -1
- package/lib/cjs/components/Table/TableServerSide/TableServerSidePersistent/index.js +1 -1
- package/lib/cjs/components/Table/TableServerSide/TableServerSidePersistent/index.js.map +1 -1
- package/lib/cjs/components/Table/components/ActionMenu/ActionMenu.js +1 -1
- package/lib/cjs/components/Table/components/ActionMenu/ActionMenu.js.map +1 -1
- package/lib/cjs/components/Tag/Tag.js +1 -1
- package/lib/cjs/components/Tag/Tag.js.map +1 -1
- package/lib/cjs/components/Tag/Tag.module.css +1 -1
- package/lib/cjs/components/TimeZoneInfo/index.js +1 -1
- package/lib/cjs/components/TimeZoneInfo/index.js.map +1 -1
- package/lib/cjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/components/Typo/Typo.js +1 -1
- package/lib/cjs/components/Typo/Typo.js.map +1 -1
- package/lib/cjs/icons/StatusIcon/StatusIcon.js +1 -1
- package/lib/cjs/icons/StatusIcon/StatusIcon.js.map +1 -1
- package/lib/esm/components/Accordion/Accordion.js +1 -1
- package/lib/esm/components/Accordion/Accordion.js.map +1 -1
- package/lib/esm/components/Alert/Alert.js +1 -1
- package/lib/esm/components/Alert/Alert.js.map +1 -1
- package/lib/esm/components/ConfirmationDialog/ConfirmationDialog.js +1 -1
- package/lib/esm/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -1
- package/lib/esm/components/Drawer/Drawer.js +1 -1
- package/lib/esm/components/Drawer/Drawer.js.map +1 -1
- package/lib/esm/components/Filter/TermContainer/Term/TermBadge.js +1 -1
- package/lib/esm/components/Filter/TermContainer/Term/TermBadge.js.map +1 -1
- package/lib/esm/components/Filter/persistence/FilterPersistent.js +1 -1
- package/lib/esm/components/Filter/persistence/FilterPersistent.js.map +1 -1
- package/lib/esm/components/Filter/utils/FilterSelect.js +1 -1
- package/lib/esm/components/Filter/utils/FilterSelect.js.map +1 -1
- package/lib/esm/components/Filter/utils/Select.js +1 -1
- package/lib/esm/components/Filter/utils/Select.js.map +1 -1
- package/lib/esm/components/Form/Button/Button.js +1 -1
- package/lib/esm/components/Form/Button/Button.js.map +1 -1
- package/lib/esm/components/Form/Checkbox/Checkbox.js +1 -1
- package/lib/esm/components/Form/Checkbox/Checkbox.js.map +1 -1
- package/lib/esm/components/Form/DateTimePicker/DateTimePicker.js +1 -1
- package/lib/esm/components/Form/DateTimePicker/DateTimePicker.js.map +1 -1
- package/lib/esm/components/Form/DateTimePicker/TimePicker.js +1 -1
- package/lib/esm/components/Form/DateTimePicker/TimePicker.js.map +1 -1
- package/lib/esm/components/Form/FileInput/FileInput.js +1 -1
- package/lib/esm/components/Form/FileInput/FileInput.js.map +1 -1
- package/lib/esm/components/Form/Form/Form.js +1 -1
- package/lib/esm/components/Form/Form/Form.js.map +1 -1
- package/lib/esm/components/Form/Input/Input.js +1 -1
- package/lib/esm/components/Form/Input/Input.js.map +1 -1
- package/lib/esm/components/Form/MenuButton/index.js +1 -1
- package/lib/esm/components/Form/MenuButton/index.js.map +1 -1
- package/lib/esm/components/Form/PasswordInput/PasswordInput.js +1 -1
- package/lib/esm/components/Form/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/esm/components/Form/RadioButton/RadioButton.js +1 -1
- package/lib/esm/components/Form/RadioButton/RadioButton.js.map +1 -1
- package/lib/esm/components/Form/Select/Cascade/CascadeMenu.js +1 -1
- package/lib/esm/components/Form/Select/Cascade/CascadeMenu.js.map +1 -1
- package/lib/esm/components/Form/Select/Cascade/CascadeOption.js +1 -1
- package/lib/esm/components/Form/Select/Cascade/CascadeOption.js.map +1 -1
- package/lib/esm/components/Form/Select/Cascade/index.js +1 -1
- package/lib/esm/components/Form/Select/Cascade/index.js.map +1 -1
- package/lib/esm/components/Form/Select/CreatableSelect.js +1 -1
- package/lib/esm/components/Form/Select/CreatableSelect.js.map +1 -1
- package/lib/esm/components/Form/Select/Select.js +1 -1
- package/lib/esm/components/Form/Select/Select.js.map +1 -1
- package/lib/esm/components/Form/Switch/Switch.js +1 -1
- package/lib/esm/components/Form/Switch/Switch.js.map +1 -1
- package/lib/esm/components/Form/Textarea/Textarea.js +1 -1
- package/lib/esm/components/Form/Textarea/Textarea.js.map +1 -1
- package/lib/esm/components/Icon/Icon.js +1 -1
- package/lib/esm/components/Icon/Icon.js.map +1 -1
- package/lib/esm/components/InfoTip/InfoTip.js +1 -1
- package/lib/esm/components/InfoTip/InfoTip.js.map +1 -1
- package/lib/esm/components/InformationList/InformationList.js +1 -1
- package/lib/esm/components/InformationList/InformationList.js.map +1 -1
- package/lib/esm/components/Layout/AppNavigation/AppNavigationLink.js +1 -1
- package/lib/esm/components/Layout/AppNavigation/AppNavigationLink.js.map +1 -1
- package/lib/esm/components/Layout/SimplePageLayout/SimpleGrid.js +1 -1
- package/lib/esm/components/Layout/SimplePageLayout/SimpleGrid.js.map +1 -1
- package/lib/esm/components/Layout/SimplePageLayout/index.js +1 -1
- package/lib/esm/components/Layout/SimplePageLayout/index.js.map +1 -1
- package/lib/esm/components/Modal/Modal.js +1 -1
- package/lib/esm/components/Modal/Modal.js.map +1 -1
- package/lib/esm/components/Notification/notifications.js +1 -1
- package/lib/esm/components/Notification/notifications.js.map +1 -1
- package/lib/esm/components/Table/TableClientSide/TableClientSidePersistent/index.js +1 -1
- package/lib/esm/components/Table/TableClientSide/TableClientSidePersistent/index.js.map +1 -1
- package/lib/esm/components/Table/TableServerSide/TableServerSidePersistent/index.js +1 -1
- package/lib/esm/components/Table/TableServerSide/TableServerSidePersistent/index.js.map +1 -1
- package/lib/esm/components/Table/components/ActionMenu/ActionMenu.js +1 -1
- package/lib/esm/components/Table/components/ActionMenu/ActionMenu.js.map +1 -1
- package/lib/esm/components/Tag/Tag.js +1 -1
- package/lib/esm/components/Tag/Tag.js.map +1 -1
- package/lib/esm/components/Tag/Tag.module.css +1 -1
- package/lib/esm/components/TimeZoneInfo/index.js +1 -1
- package/lib/esm/components/TimeZoneInfo/index.js.map +1 -1
- package/lib/esm/components/Tooltip/Tooltip.js +1 -1
- package/lib/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/esm/components/Typo/Typo.js +1 -1
- package/lib/esm/components/Typo/Typo.js.map +1 -1
- package/lib/esm/icons/StatusIcon/StatusIcon.js +1 -1
- package/lib/esm/icons/StatusIcon/StatusIcon.js.map +1 -1
- package/package.json +22 -22
- package/types/src/components/Tag/Tag.d.ts +2 -1
- package/types/src/components/Tag/Tag.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Typo/Typo.tsx"],"sourcesContent":["/* Copyright (C) Greenbone AG\n *\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { forwardRef, MouseEventHandler, PropsWithChildren, RefObject } from \"react\"\nimport { Text, TextProps, Title, TitleOrder } from \"@mantine/core\"\nimport classes from \"./Typo.module.css\"\nimport { cx } from \"../../helper/cx\"\n\nexport type TTypoTypeProps =\n | \"heading1\"\n | \"heading2\"\n | \"heading3\"\n | \"heading4\"\n | \"bodyLarge\"\n | \"body\"\n | \"small\"\n | \"extraSmall\"\n\nexport type TTypoProps = TextProps & {\n className?: string\n isLink?: boolean\n inheritColor?: boolean\n underline?: boolean\n innerRef?: RefObject<HTMLHeadingElement>\n onMouseEnter?: MouseEventHandler\n onMouseLeave?: MouseEventHandler\n type: TTypoTypeProps\n // The Wrapper is needed for the TextWithTooltip component to correctly truncate the text if needed and display a tooltip\n withWrapper?: boolean\n wrapperProps?: {\n noFullWidth?: boolean\n }\n}\n\n// eslint-disable-next-line react/display-name\nconst Typo = forwardRef<HTMLHeadingElement, PropsWithChildren<TTypoProps>>(\n (\n {\n className,\n children,\n type,\n withWrapper = false,\n innerRef,\n isLink = false,\n inheritColor = false,\n underline = false,\n wrapperProps,\n ...props\n },\n ref\n ) => {\n const rootType = isLink ? \"link\" : inheritColor ? \"inherit-color\" : \"\"\n\n let content = (\n <Text\n className={cx(\n classes.root,\n classes[`${rootType}-root`],\n underline ? classes.underline : undefined,\n isLink ? \"\" : classes[\"cursor-text\"],\n className,\n classes[type]\n )}\n ref={innerRef}\n {...props}\n >\n {children}\n </Text>\n )\n if (type.includes(\"heading\")) {\n const headingOrder = Number(type.slice(-1)) as TitleOrder\n content = (\n <Title\n className={cx(classes.root, classes[`${rootType}-root`], className, classes[type])}\n order={headingOrder}\n ref={ref}\n >\n {content}\n </Title>\n )\n } else if (withWrapper) {\n return (\n <span ref={ref} className={wrapperProps?.noFullWidth ? \"\" : classes.wrapper}>\n {content}\n </span>\n )\n }\n return content\n }\n)\n\nexport { Typo }\n"],"names":["forwardRef","Text","Title","classes","cx","Typo","className","children","type","withWrapper","innerRef","isLink","inheritColor","underline","wrapperProps","props","ref","rootType","content","root","undefined","includes","headingOrder","Number","slice","order","span","noFullWidth","wrapper"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Typo/Typo.tsx"],"sourcesContent":["/* Copyright (C) Greenbone AG\n *\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { forwardRef, MouseEventHandler, PropsWithChildren, RefObject } from \"react\"\nimport { Text, TextProps, Title, TitleOrder } from \"@mantine/core\"\nimport classes from \"./Typo.module.css\"\nimport { cx } from \"../../helper/cx\"\n\nexport type TTypoTypeProps =\n | \"heading1\"\n | \"heading2\"\n | \"heading3\"\n | \"heading4\"\n | \"bodyLarge\"\n | \"body\"\n | \"small\"\n | \"extraSmall\"\n\nexport type TTypoProps = TextProps & {\n className?: string\n isLink?: boolean\n inheritColor?: boolean\n underline?: boolean\n innerRef?: RefObject<HTMLHeadingElement>\n onMouseEnter?: MouseEventHandler\n onMouseLeave?: MouseEventHandler\n type: TTypoTypeProps\n // The Wrapper is needed for the TextWithTooltip component to correctly truncate the text if needed and display a tooltip\n withWrapper?: boolean\n wrapperProps?: {\n noFullWidth?: boolean\n }\n}\n\n// eslint-disable-next-line react/display-name\nconst Typo = forwardRef<HTMLHeadingElement, PropsWithChildren<TTypoProps>>(\n (\n {\n className,\n children,\n type,\n withWrapper = false,\n innerRef,\n isLink = false,\n inheritColor = false,\n underline = false,\n wrapperProps,\n ...props\n },\n ref\n ) => {\n const rootType = isLink ? \"link\" : inheritColor ? \"inherit-color\" : \"\"\n\n let content = (\n <Text\n className={cx(\n classes.root,\n classes[`${rootType}-root`],\n underline ? classes.underline : undefined,\n isLink ? \"\" : classes[\"cursor-text\"],\n className,\n classes[type]\n )}\n ref={innerRef}\n {...props}\n >\n {children}\n </Text>\n )\n if (type.includes(\"heading\")) {\n const headingOrder = Number(type.slice(-1)) as TitleOrder\n content = (\n <Title\n className={cx(classes.root, classes[`${rootType}-root`], className, classes[type])}\n order={headingOrder}\n ref={ref}\n >\n {content}\n </Title>\n )\n } else if (withWrapper) {\n return (\n <span ref={ref} className={wrapperProps?.noFullWidth ? \"\" : classes.wrapper}>\n {content}\n </span>\n )\n }\n return content\n }\n)\n\nexport { Typo }\n"],"names":["forwardRef","Text","Title","classes","cx","Typo","className","children","type","withWrapper","innerRef","isLink","inheritColor","underline","wrapperProps","props","ref","rootType","content","root","undefined","includes","headingOrder","Number","slice","order","span","noFullWidth","wrapper"],"mappings":"k0EAIA,QAASA,UAAU,KAAyD,OAAO,AACnF,QAASC,IAAI,CAAaC,KAAK,KAAoB,eAAe,AAClE,QAAOC,YAAa,mBAAmB,AACvC,QAASC,EAAE,KAAQ,iBAAiB,CA6BpC,MAAMC,KAAOL,WACX,iDACE,CACEM,SAAS,CACTC,QAAQ,CACRC,IAAI,CACJC,YAAc,KAAK,CACnBC,QAAQ,CACRC,OAAS,KAAK,CACdC,aAAe,KAAK,CACpBC,UAAY,KAAK,CACjBC,YAAY,CAEb,OADIC,qJAELC,WAEA,MAAMC,SAAWN,OAAS,OAASC,aAAe,gBAAkB,GAEpE,IAAIM,QACF,KAACjB,0CACCK,UAAWF,GACTD,QAAQgB,IAAI,CACZhB,OAAO,CAAC,CAAC,EAAEc,SAAS,KAAK,CAAC,CAAC,CAC3BJ,UAAYV,QAAQU,SAAS,CAAGO,UAChCT,OAAS,GAAKR,OAAO,CAAC,cAAc,CACpCG,UACAH,OAAO,CAACK,KAAK,EAEfQ,IAAKN,UACDK,iBAEHR,YAGL,GAAIC,KAAKa,QAAQ,CAAC,WAAY,CAC5B,MAAMC,aAAeC,OAAOf,KAAKgB,KAAK,CAAC,CAAC,IACxCN,QACE,KAAChB,OACCI,UAAWF,GAAGD,QAAQgB,IAAI,CAAEhB,OAAO,CAAC,CAAC,EAAEc,SAAS,KAAK,CAAC,CAAC,CAAEX,UAAWH,OAAO,CAACK,KAAK,EACjFiB,MAAOH,aACPN,IAAKA,aAEJE,SAGP,MAAO,GAAIT,YAAa,CACtB,OACE,KAACiB,QAAKV,IAAKA,IAAKV,UAAWQ,CAAAA,qBAAAA,6BAAAA,aAAca,WAAW,EAAG,GAAKxB,QAAQyB,OAAO,UACxEV,SAGP,CACA,OAAOA,OACT,EAGF,QAASb,IAAI,CAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==="function"){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))}ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})}keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){source=source!=null?source:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _object_without_properties(source,excluded){if(source==null)return{};var target={},sourceKeys,key,i;if(typeof Reflect!=="undefined"&&Reflect.ownKeys){sourceKeys=Reflect.ownKeys(source);for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}return target}target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){sourceKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _object_without_properties_loose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.getOwnPropertyNames(source),key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}return target}import{jsx as _jsx}from"react/jsx-runtime";import{AlertTriangle,CheckCircle2,CircleAlert,Info}from"lucide-react";import{forwardRef}from"react";import classes from"./StatusIcon.module.css";import{EStatus}from"../../genericTypes";export const StatusIcon=forwardRef((_0,_1)=>{let _ref=[_0,_1],[_ref1,..._rest]=_ref,{status}=_ref1,props=_object_without_properties(_ref1,["status"]),[ref]=_rest;let IconComponent;switch(status){case EStatus.ERROR:IconComponent=CircleAlert;break;case EStatus.SUCCESS:IconComponent=CheckCircle2;break;case EStatus.INFO:IconComponent=Info;break;case EStatus.WARNING:IconComponent=AlertTriangle;break;default:IconComponent=Info}return _jsx(IconComponent,_object_spread_props(_object_spread({ref:ref,size:16,strokeWidth:2},props),{className:`${classes[status||"info-tip"]} ${props.className}`}))});StatusIcon.displayName="StatusIcon";
|
|
1
|
+
function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==="function"){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))}ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})}keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){source=source!=null?source:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _object_without_properties(source,excluded){if(source==null)return{};var target={},sourceKeys,key,i;if(typeof Reflect!=="undefined"&&Reflect.ownKeys){sourceKeys=Reflect.ownKeys(Object(source));for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}return target}target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){sourceKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _object_without_properties_loose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.getOwnPropertyNames(source),key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}return target}import{jsx as _jsx}from"react/jsx-runtime";import{AlertTriangle,CheckCircle2,CircleAlert,Info}from"lucide-react";import{forwardRef}from"react";import classes from"./StatusIcon.module.css";import{EStatus}from"../../genericTypes";export const StatusIcon=forwardRef((_0,_1)=>{let _ref=[_0,_1],[_ref1,..._rest]=_ref,{status}=_ref1,props=_object_without_properties(_ref1,["status"]),[ref]=_rest;let IconComponent;switch(status){case EStatus.ERROR:IconComponent=CircleAlert;break;case EStatus.SUCCESS:IconComponent=CheckCircle2;break;case EStatus.INFO:IconComponent=Info;break;case EStatus.WARNING:IconComponent=AlertTriangle;break;default:IconComponent=Info}return _jsx(IconComponent,_object_spread_props(_object_spread({ref:ref,size:16,strokeWidth:2},props),{className:`${classes[status||"info-tip"]} ${props.className}`}))});StatusIcon.displayName="StatusIcon";
|
|
2
2
|
//# sourceMappingURL=StatusIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/icons/StatusIcon/StatusIcon.tsx"],"sourcesContent":["/* Copyright (C) Greenbone AG\n *\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { AlertTriangle, CheckCircle2, CircleAlert, Info } from \"lucide-react\"\nimport { LucideProps } from \"lucide-react\"\nimport { forwardRef } from \"react\"\nimport classes from \"./StatusIcon.module.css\"\nimport { EStatus } from \"../../genericTypes\"\n\ntype TStatusIconProps = {\n status?: EStatus\n} & LucideProps\n\nexport const StatusIcon = forwardRef<SVGSVGElement, TStatusIconProps>(\n ({ status, ...props }, ref) => {\n let IconComponent: React.ForwardRefExoticComponent<\n Omit<LucideProps, \"ref\"> & React.RefAttributes<SVGSVGElement>\n >\n switch (status) {\n case EStatus.ERROR:\n IconComponent = CircleAlert\n break\n case EStatus.SUCCESS:\n IconComponent = CheckCircle2\n break\n case EStatus.INFO:\n IconComponent = Info\n break\n case EStatus.WARNING:\n IconComponent = AlertTriangle\n break\n default:\n IconComponent = Info\n }\n return (\n <IconComponent\n ref={ref}\n size={16}\n strokeWidth={2}\n {...props}\n className={`${classes[status || \"info-tip\"]} ${props.className}`}\n />\n )\n }\n)\n\nStatusIcon.displayName = \"StatusIcon\"\n"],"names":["AlertTriangle","CheckCircle2","CircleAlert","Info","forwardRef","classes","EStatus","StatusIcon","status","props","ref","IconComponent","ERROR","SUCCESS","INFO","WARNING","size","strokeWidth","className","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/icons/StatusIcon/StatusIcon.tsx"],"sourcesContent":["/* Copyright (C) Greenbone AG\n *\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { AlertTriangle, CheckCircle2, CircleAlert, Info } from \"lucide-react\"\nimport { LucideProps } from \"lucide-react\"\nimport { forwardRef } from \"react\"\nimport classes from \"./StatusIcon.module.css\"\nimport { EStatus } from \"../../genericTypes\"\n\ntype TStatusIconProps = {\n status?: EStatus\n} & LucideProps\n\nexport const StatusIcon = forwardRef<SVGSVGElement, TStatusIconProps>(\n ({ status, ...props }, ref) => {\n let IconComponent: React.ForwardRefExoticComponent<\n Omit<LucideProps, \"ref\"> & React.RefAttributes<SVGSVGElement>\n >\n switch (status) {\n case EStatus.ERROR:\n IconComponent = CircleAlert\n break\n case EStatus.SUCCESS:\n IconComponent = CheckCircle2\n break\n case EStatus.INFO:\n IconComponent = Info\n break\n case EStatus.WARNING:\n IconComponent = AlertTriangle\n break\n default:\n IconComponent = Info\n }\n return (\n <IconComponent\n ref={ref}\n size={16}\n strokeWidth={2}\n {...props}\n className={`${classes[status || \"info-tip\"]} ${props.className}`}\n />\n )\n }\n)\n\nStatusIcon.displayName = \"StatusIcon\"\n"],"names":["AlertTriangle","CheckCircle2","CircleAlert","Info","forwardRef","classes","EStatus","StatusIcon","status","props","ref","IconComponent","ERROR","SUCCESS","INFO","WARNING","size","strokeWidth","className","displayName"],"mappings":"k0EAIA,QAASA,aAAa,CAAEC,YAAY,CAAEC,WAAW,CAAEC,IAAI,KAAQ,cAAc,AAE7E,QAASC,UAAU,KAAQ,OAAO,AAClC,QAAOC,YAAa,yBAAyB,AAC7C,QAASC,OAAO,KAAQ,oBAAoB,AAM5C,QAAO,MAAMC,WAAaH,WACxB,iDAAC,CAAEI,MAAM,CAAY,OAAPC,oDAASC,WACrB,IAAIC,cAGJ,OAAQH,QACN,KAAKF,QAAQM,KAAK,CAChBD,cAAgBT,YAChB,KACF,MAAKI,QAAQO,OAAO,CAClBF,cAAgBV,aAChB,KACF,MAAKK,QAAQQ,IAAI,CACfH,cAAgBR,KAChB,KACF,MAAKG,QAAQS,OAAO,CAClBJ,cAAgBX,cAChB,KACF,SACEW,cAAgBR,IACpB,CACA,OACE,KAACQ,mDACCD,IAAKA,IACLM,KAAM,GACNC,YAAa,GACTR,QACJS,UAAW,CAAC,EAAEb,OAAO,CAACG,QAAU,WAAW,CAAC,CAAC,EAAEC,MAAMS,SAAS,CAAC,CAAC,GAGtE,EACD,AAEDX,CAAAA,WAAWY,WAAW,CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@greenbone/ui-lib",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2-alpha0",
|
|
4
4
|
"description": "Greenbone UI Components Mantine v7",
|
|
5
5
|
"types": "types/src/index.d.ts",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -43,31 +43,31 @@
|
|
|
43
43
|
"@emotion/react": "^11.14.0",
|
|
44
44
|
"@svgr/cli": "^8.1.0",
|
|
45
45
|
"@swc/cli": "^0.8.0",
|
|
46
|
-
"@swc/core": "^1.15.
|
|
46
|
+
"@swc/core": "^1.15.18",
|
|
47
47
|
"@swc/jest": "^0.2.39",
|
|
48
48
|
"@testing-library/dom": "^10.4.0",
|
|
49
49
|
"@testing-library/jest-dom": "^6.9.1",
|
|
50
50
|
"@testing-library/react": "^16.3.0",
|
|
51
51
|
"@testing-library/user-event": "^14.6.1",
|
|
52
52
|
"@types/jest": "^30.0.0",
|
|
53
|
-
"@types/lodash": "^4.17.
|
|
53
|
+
"@types/lodash": "^4.17.24",
|
|
54
54
|
"@types/luxon": "^3.7.1",
|
|
55
|
-
"@types/node": "^25.
|
|
55
|
+
"@types/node": "^25.5.0",
|
|
56
56
|
"@types/react": "18.3.18",
|
|
57
57
|
"@types/react-dom": "^18.3.5",
|
|
58
58
|
"@types/webfontloader": "^1.6.38",
|
|
59
59
|
"acorn": "^8.16.0",
|
|
60
60
|
"chokidar": "^5.0.0",
|
|
61
61
|
"concurrently": "^9.1.2",
|
|
62
|
-
"cssnano": "^7.1.
|
|
63
|
-
"dayjs": "^1.11.
|
|
64
|
-
"i18next": "^25.8.
|
|
62
|
+
"cssnano": "^7.1.3",
|
|
63
|
+
"dayjs": "^1.11.20",
|
|
64
|
+
"i18next": "^25.8.14",
|
|
65
65
|
"identity-obj-proxy": "^3.0.0",
|
|
66
|
-
"jest": "^30.0
|
|
66
|
+
"jest": "^30.3.0",
|
|
67
67
|
"jest-chain-transform": "^0.0.8",
|
|
68
|
-
"jest-environment-jsdom": "^30.0
|
|
68
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
69
69
|
"jest-watch-typeahead": "^3.0.1",
|
|
70
|
-
"postcss": "^8.5.
|
|
70
|
+
"postcss": "^8.5.8",
|
|
71
71
|
"postcss-cli": "^11.0.0",
|
|
72
72
|
"postcss-preset-mantine": "^1.18.0",
|
|
73
73
|
"prettier": "^3.8.1",
|
|
@@ -76,30 +76,30 @@
|
|
|
76
76
|
"web-vitals": "^5.1.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@mantine/core": "^8.3.
|
|
80
|
-
"@mantine/dates": "^8.3.
|
|
81
|
-
"@mantine/hooks": "^8.3.
|
|
82
|
-
"@mantine/notifications": "^8.3.
|
|
83
|
-
"lucide-react": "^0.
|
|
79
|
+
"@mantine/core": "^8.3.16",
|
|
80
|
+
"@mantine/dates": "^8.3.16",
|
|
81
|
+
"@mantine/hooks": "^8.3.16",
|
|
82
|
+
"@mantine/notifications": "^8.3.16",
|
|
83
|
+
"lucide-react": "^0.577.0",
|
|
84
84
|
"react": "^18.x.x",
|
|
85
85
|
"react-dom": "^18.x.x",
|
|
86
|
-
"react-i18next": "^16.5.
|
|
86
|
+
"react-i18next": "^16.5.6"
|
|
87
87
|
},
|
|
88
88
|
"optionalDependencies": {
|
|
89
89
|
"@reduxjs/toolkit": "^2.9.0",
|
|
90
90
|
"@swc/core-darwin-arm64": "^1.13.21"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@mantine/core": "^8.3.
|
|
94
|
-
"@mantine/dates": "^8.3.
|
|
95
|
-
"@mantine/hooks": "^8.3.
|
|
96
|
-
"@mantine/notifications": "^8.3.
|
|
93
|
+
"@mantine/core": "^8.3.16",
|
|
94
|
+
"@mantine/dates": "^8.3.16",
|
|
95
|
+
"@mantine/hooks": "^8.3.16",
|
|
96
|
+
"@mantine/notifications": "^8.3.16",
|
|
97
97
|
"lodash": "^4.17.21",
|
|
98
|
-
"lucide-react": "^0.
|
|
98
|
+
"lucide-react": "^0.577.0",
|
|
99
99
|
"luxon": "^3.7.2",
|
|
100
100
|
"react": "^18.x.x",
|
|
101
101
|
"react-dom": "^18.x.x",
|
|
102
|
-
"react-i18next": "^16.5.
|
|
102
|
+
"react-i18next": "^16.5.6",
|
|
103
103
|
"react-hook-form": "7.71.2",
|
|
104
104
|
"react-select": "^5.10.2",
|
|
105
105
|
"tiny-invariant": "^1.3.3",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
2
|
import { TBadgeProps } from "../Badge";
|
|
3
3
|
export type TTagProps = Partial<TBadgeProps> & {
|
|
4
4
|
name: string;
|
|
5
5
|
value: string;
|
|
6
|
+
icon?: ReactNode;
|
|
6
7
|
};
|
|
7
8
|
export declare const Tag: FC<TTagProps>;
|
|
8
9
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAS,WAAW,EAAE,MAAM,UAAU,CAAA;AAK7C,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AACD,eAAO,MAAM,GAAG,EAAE,EAAE,CAAC,SAAS,CAqB7B,CAAA"}
|