@clubmed/trident-ui 1.2.0-beta.2 → 1.2.0-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/atoms/Icons/Icon.d.ts +5 -1
- package/atoms/Icons/Icon.js +3 -2
- package/atoms/Icons/Icon.js.map +1 -1
- package/atoms/Icons/Iconics.d.ts +9 -1
- package/atoms/Icons/IconsResolver.d.ts +33 -1
- package/atoms/Icons/IconsResolver.js +6 -5
- package/atoms/Icons/IconsResolver.js.map +1 -1
- package/atoms/Icons/contexts/IconsContext.d.ts +8 -1
- package/atoms/Icons/contexts/IconsContext.js +8 -1
- package/atoms/Icons/contexts/IconsContext.js.map +1 -1
- package/atoms/Icons/index.js +8 -6
- package/atoms/Icons/index.js.map +1 -1
- package/atoms/Icons/svg/SvgIcon.d.ts +9 -1
- package/atoms/Icons/svg/SvgIcon.js +5 -1
- package/atoms/Icons/svg/SvgIcon.js.map +1 -1
- package/atoms/Icons/svg/SvgIconResolver.d.ts +5 -1
- package/atoms/Icons/svg/SvgIconResolver.js +5 -1
- package/atoms/Icons/svg/SvgIconResolver.js.map +1 -1
- package/atoms/Icons/svg/index.d.ts +2 -1
- package/atoms/Icons/svg/index.js +6 -2
- package/atoms/Icons/svg-use/SvgUseIcon.d.ts +9 -1
- package/atoms/Icons/svg-use/SvgUseIcon.js +5 -1
- package/atoms/Icons/svg-use/SvgUseIcon.js.map +1 -1
- package/atoms/Icons/svg-use/SvgUseIconResolver.d.ts +5 -1
- package/atoms/Icons/svg-use/SvgUseIconResolver.js +5 -1
- package/atoms/Icons/svg-use/SvgUseIconResolver.js.map +1 -1
- package/atoms/Icons/svg-use/index.d.ts +2 -1
- package/atoms/Icons/svg-use/index.js +6 -2
- package/molecules/Breadcrumb.js +9 -8
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Buttons/ButtonContent.js +6 -5
- package/molecules/Buttons/ButtonContent.js.map +1 -1
- package/molecules/Card.js +8 -7
- package/molecules/Card.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +13 -12
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/DateField.js +4 -3
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.js +13 -12
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.js +16 -15
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/Password/Password.js +11 -10
- package/molecules/Forms/Password/Password.js.map +1 -1
- package/molecules/Forms/Password/ValidationMessage.js +9 -8
- package/molecules/Forms/Password/ValidationMessage.js.map +1 -1
- package/molecules/Forms/Select.js +4 -3
- package/molecules/Forms/Select.js.map +1 -1
- package/molecules/Forms/TextField.js +8 -7
- package/molecules/Forms/TextField.js.map +1 -1
- package/molecules/Link.js +9 -8
- package/molecules/Link.js.map +1 -1
- package/package.json +1 -1
package/molecules/Link.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Link.js","sources":["../../lib/molecules/Link.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';\n\nimport { Icon, type IconicNames, type IconicTypes } from '@/atoms/Icons';\n\ninterface LinkProps<T extends HTMLAnchorElement = HTMLAnchorElement>\n extends AnchorHTMLAttributes<T> {\n /**\n * Label text\n */\n label: string;\n /**\n * Icon name\n */\n icon?: IconicNames;\n iconType?: IconicTypes;\n /**\n * Underlined\n */\n underlined?: boolean;\n /**\n * Additional class names\n */\n className?: string;\n /**\n * Is the link inert (not itself clickable but part of a clickable element)\n */\n inert?: boolean;\n /**\n * Allow giving a custom component\n */\n component?: FunctionComponent<PropsWithChildren<any>> | string;\n}\n\nexport const Link: FunctionComponent<LinkProps> = ({\n label,\n icon,\n component = 'a',\n iconType,\n underlined = true,\n className,\n inert,\n ...anchorAttrs\n}) => {\n const lastSpace = label.lastIndexOf(' ');\n const lastIndex = lastSpace === -1 ? label.length : lastSpace;\n\n const first = label.substring(0, 1);\n const middle = label.substring(1, lastIndex + 1);\n const last = label.substring(lastIndex);\n const Cmp = component as FunctionComponent<PropsWithChildren>;\n\n const TagName = inert ? 'span' : Cmp;\n\n return (\n <TagName\n className={classnames(\n 'text-b3 decoration-none link-container cursor-pointer text-inherit',\n className,\n )}\n data-name=\"Link\"\n {...anchorAttrs}\n >\n <span className={classnames({ 'link-underline': underlined })}>{first}</span>\n <span\n className={classnames('hoverable', {\n 'has-icon': icon,\n 'link-underline': underlined,\n })}\n >\n {middle}\n <span className=\"inline-block\">\n {last}\n {icon && (\n <Icon\n name={icon}\n iconType={iconType}\n width=\"24px\"\n style={{ marginInlineStart: '8px' }}\n />\n )}\n </span>\n </span>\n </TagName>\n );\n};\n"],"names":["Link","label","icon","component","iconType","underlined","className","inert","anchorAttrs","lastSpace","lastIndex","first","middle","last","jsxs","classnames","jsx","Icon"],"mappings":"
|
1
|
+
{"version":3,"file":"Link.js","sources":["../../lib/molecules/Link.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';\n\nimport { Icon, type IconicNames, type IconicTypes } from '@/atoms/Icons';\n\ninterface LinkProps<T extends HTMLAnchorElement = HTMLAnchorElement>\n extends AnchorHTMLAttributes<T> {\n /**\n * Label text\n */\n label: string;\n /**\n * Icon name\n */\n icon?: IconicNames;\n iconType?: IconicTypes;\n /**\n * Underlined\n */\n underlined?: boolean;\n /**\n * Additional class names\n */\n className?: string;\n /**\n * Is the link inert (not itself clickable but part of a clickable element)\n */\n inert?: boolean;\n /**\n * Allow giving a custom component\n */\n component?: FunctionComponent<PropsWithChildren<any>> | string;\n}\n\nexport const Link: FunctionComponent<LinkProps> = ({\n label,\n icon,\n component = 'a',\n iconType,\n underlined = true,\n className,\n inert,\n ...anchorAttrs\n}) => {\n const lastSpace = label.lastIndexOf(' ');\n const lastIndex = lastSpace === -1 ? label.length : lastSpace;\n\n const first = label.substring(0, 1);\n const middle = label.substring(1, lastIndex + 1);\n const last = label.substring(lastIndex);\n const Cmp = component as FunctionComponent<PropsWithChildren>;\n\n const TagName = inert ? 'span' : Cmp;\n\n return (\n <TagName\n className={classnames(\n 'text-b3 decoration-none link-container cursor-pointer text-inherit',\n className,\n )}\n data-name=\"Link\"\n {...anchorAttrs}\n >\n <span className={classnames({ 'link-underline': underlined })}>{first}</span>\n <span\n className={classnames('hoverable', {\n 'has-icon': icon,\n 'link-underline': underlined,\n })}\n >\n {middle}\n <span className=\"inline-block\">\n {last}\n {icon && (\n <Icon\n name={icon}\n iconType={iconType}\n width=\"24px\"\n style={{ marginInlineStart: '8px' }}\n />\n )}\n </span>\n </span>\n </TagName>\n );\n};\n"],"names":["Link","label","icon","component","iconType","underlined","className","inert","anchorAttrs","lastSpace","lastIndex","first","middle","last","jsxs","classnames","jsx","Icon"],"mappings":";;;;AAkCO,MAAMA,IAAqC,CAAC;AAAA,EACjD,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAAC,IAAYR,EAAM,YAAY,GAAG,GACjCS,IAAYD,MAAc,KAAKR,EAAM,SAASQ,GAE9CE,IAAQV,EAAM,UAAU,GAAG,CAAC,GAC5BW,IAASX,EAAM,UAAU,GAAGS,IAAY,CAAC,GACzCG,IAAOZ,EAAM,UAAUS,CAAS;AAMpC,SAAA,gBAAAI;AAAA,IAHcP,IAAQ,SAFZJ;AAAA,IAKT;AAAA,MACC,WAAWY;AAAA,QACT;AAAA,QACAT;AAAA,MACF;AAAA,MACA,aAAU;AAAA,MACT,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAC,gBAAAQ,EAAA,QAAA,EAAK,WAAWD,EAAW,EAAE,kBAAkBV,GAAY,GAAI,UAAMM,GAAA;AAAA,QACtE,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAW,aAAa;AAAA,cACjC,YAAYb;AAAA,cACZ,kBAAkBG;AAAA,YAAA,CACnB;AAAA,YAEA,UAAA;AAAA,cAAAO;AAAA,cACD,gBAAAE,EAAC,QAAK,EAAA,WAAU,gBACb,UAAA;AAAA,gBAAAD;AAAA,gBACAX,KACC,gBAAAc;AAAA,kBAACC;AAAA,kBAAA;AAAA,oBACC,MAAMf;AAAA,oBACN,UAAAE;AAAA,oBACA,OAAM;AAAA,oBACN,OAAO,EAAE,mBAAmB,MAAM;AAAA,kBAAA;AAAA,gBACpC;AAAA,cAAA,GAEJ;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|