@foxford/ui 2.105.0 → 2.106.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.
Files changed (88) hide show
  1. package/components/AddElement/AddElement.js +1 -1
  2. package/components/AddElement/AddElement.js.map +1 -1
  3. package/components/AddElement/AddElement.mjs +1 -1
  4. package/components/AddElement/AddElement.mjs.map +1 -1
  5. package/components/Anchor/Anchor.js +1 -1
  6. package/components/Anchor/Anchor.js.map +1 -1
  7. package/components/Anchor/Anchor.mjs +1 -1
  8. package/components/Anchor/Anchor.mjs.map +1 -1
  9. package/components/DialogComponent/Header.js +1 -1
  10. package/components/DialogComponent/Header.js.map +1 -1
  11. package/components/DialogComponent/Header.mjs +1 -1
  12. package/components/DialogComponent/Header.mjs.map +1 -1
  13. package/components/Dropdown/Dropdown.js +1 -1
  14. package/components/Dropdown/Dropdown.js.map +1 -1
  15. package/components/Dropdown/Dropdown.mjs +1 -1
  16. package/components/Dropdown/Dropdown.mjs.map +1 -1
  17. package/components/Dropdown/DropdownListItem.js +1 -1
  18. package/components/Dropdown/DropdownListItem.js.map +1 -1
  19. package/components/Dropdown/DropdownListItem.mjs +1 -1
  20. package/components/Dropdown/DropdownListItem.mjs.map +1 -1
  21. package/components/Dropdown/DropdownMenuMultiple.js +1 -1
  22. package/components/Dropdown/DropdownMenuMultiple.js.map +1 -1
  23. package/components/Dropdown/DropdownMenuMultiple.mjs +1 -1
  24. package/components/Dropdown/DropdownMenuMultiple.mjs.map +1 -1
  25. package/components/Dropdown/sizes.js +1 -1
  26. package/components/Dropdown/sizes.js.map +1 -1
  27. package/components/Dropdown/sizes.mjs +1 -1
  28. package/components/Dropdown/sizes.mjs.map +1 -1
  29. package/components/FormLabel/FormLabel.js +1 -1
  30. package/components/FormLabel/FormLabel.js.map +1 -1
  31. package/components/FormLabel/FormLabel.mjs +1 -1
  32. package/components/FormLabel/FormLabel.mjs.map +1 -1
  33. package/components/FormLabel/constants.js +1 -1
  34. package/components/FormLabel/constants.js.map +1 -1
  35. package/components/FormLabel/constants.mjs +1 -1
  36. package/components/FormLabel/constants.mjs.map +1 -1
  37. package/components/IconButton/IconButton.js +1 -1
  38. package/components/IconButton/IconButton.js.map +1 -1
  39. package/components/IconButton/IconButton.mjs +1 -1
  40. package/components/IconButton/IconButton.mjs.map +1 -1
  41. package/components/IconButton/sizes.js +1 -1
  42. package/components/IconButton/sizes.js.map +1 -1
  43. package/components/IconButton/sizes.mjs +1 -1
  44. package/components/IconButton/sizes.mjs.map +1 -1
  45. package/components/ListItem/ListItem.js +1 -1
  46. package/components/ListItem/ListItem.js.map +1 -1
  47. package/components/ListItem/ListItem.mjs +1 -1
  48. package/components/ListItem/ListItem.mjs.map +1 -1
  49. package/components/ListItem/sizes.js +2 -0
  50. package/components/ListItem/sizes.js.map +1 -0
  51. package/components/ListItem/sizes.mjs +2 -0
  52. package/components/ListItem/sizes.mjs.map +1 -0
  53. package/components/ListItem/style.js +1 -1
  54. package/components/ListItem/style.js.map +1 -1
  55. package/components/ListItem/style.mjs +1 -1
  56. package/components/ListItem/style.mjs.map +1 -1
  57. package/components/MenuDivider/MenuDivider.js +1 -1
  58. package/components/MenuDivider/MenuDivider.js.map +1 -1
  59. package/components/MenuDivider/MenuDivider.mjs +1 -1
  60. package/components/MenuDivider/MenuDivider.mjs.map +1 -1
  61. package/components/Notification/Notification.js +1 -1
  62. package/components/Notification/Notification.js.map +1 -1
  63. package/components/Notification/Notification.mjs +1 -1
  64. package/components/Notification/Notification.mjs.map +1 -1
  65. package/components/Slot/Slot.js +1 -1
  66. package/components/Slot/Slot.js.map +1 -1
  67. package/components/Slot/Slot.mjs +1 -1
  68. package/components/Slot/Slot.mjs.map +1 -1
  69. package/dts/index.d.ts +426 -260
  70. package/hocs/withMergedProps.js.map +1 -1
  71. package/hocs/withMergedProps.mjs.map +1 -1
  72. package/hooks/useMergedProps.js +1 -1
  73. package/hooks/useMergedProps.js.map +1 -1
  74. package/hooks/useMergedProps.mjs +1 -1
  75. package/hooks/useMergedProps.mjs.map +1 -1
  76. package/package.json +2 -2
  77. package/shared/utils/createPolymorphicComponentWithRef.js +2 -0
  78. package/shared/utils/createPolymorphicComponentWithRef.js.map +1 -0
  79. package/shared/utils/createPolymorphicComponentWithRef.mjs +2 -0
  80. package/shared/utils/createPolymorphicComponentWithRef.mjs.map +1 -0
  81. package/components/ListItem/constants.js +0 -2
  82. package/components/ListItem/constants.js.map +0 -1
  83. package/components/ListItem/constants.mjs +0 -2
  84. package/components/ListItem/constants.mjs.map +0 -1
  85. package/shared/utils/polymorphic.js +0 -2
  86. package/shared/utils/polymorphic.js.map +0 -1
  87. package/shared/utils/polymorphic.mjs +0 -2
  88. package/shared/utils/polymorphic.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FormLabel.mjs","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { HelpCircle } from '@foxford/icon-pack'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { IconButton } from 'components/IconButton'\nimport { Badge } from 'components/Badge'\nimport { Tooltip } from 'components/Tooltip'\nimport * as Styled from './style'\nimport { SIZES, SIZES_LABEL, SIZES_HINT, SIZES_HINT_BUTTON, SIZES_HINT_ICON, SIZES_SUBTITLE } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * *v1.0.0*\n *\n * Компонент для контрола выбора с дополнительными элементами.\n * Позволяет добавить для контрола заголовок, подзаголовок, бейдж и подсказку.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<label\\> элемента.\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef<HTMLLabelElement, MergedProps<FormLabelProps>>(\n (\n {\n size = 'm',\n textProps = {},\n hint = {},\n badgeProps = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n disabled,\n error,\n success,\n checked,\n children,\n control,\n label,\n ...props\n },\n ref\n ) => {\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const stateProps = {\n disabled,\n error,\n success,\n checked,\n }\n\n const elementProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n const {\n text: hintText,\n textProps: hintTextProps = {},\n buttonProps: hintButtonProps = {},\n tooltipProps: hintTooltipProps = {},\n } = hint\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} ref={ref}>\n <Styled.Control>\n {typeof control === 'function'\n ? control({\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n </Styled.Control>\n <Styled.Content>\n <Text\n as='span'\n appearance='body'\n color='inherit'\n wordBreak='break-word'\n sizes={SIZES_LABEL}\n {...sizeProps}\n {...textProps}\n >\n {label ?? children}\n </Text>\n {hintText ? (\n <Text\n as='span'\n appearance='caption'\n color={stateProps.disabled ? 'content-disabled' : 'content-onmain-secondary'}\n wordBreak='break-word'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...hintTextProps}\n >\n {hintText}\n </Text>\n ) : null}\n </Styled.Content>\n\n <Styled.Hint sizes={SIZES_HINT} {...sizeProps}>\n {hintButtonProps.onClick && !hintTooltipProps.title && !hintTooltipProps.content ? (\n <IconButton\n icon={<HelpCircle />}\n marginLeft={2}\n {...sizeProps}\n sizes={SIZES_HINT_BUTTON}\n iconProps={{\n // TODO: DSFOX-208 - удалить изменение размеров иконки через iconProps.\n sizes: SIZES_HINT_ICON,\n }}\n {...hintButtonProps}\n disabled={stateProps.disabled || hintButtonProps.disabled}\n />\n ) : null}\n {hintTooltipProps.title || hintTooltipProps.content ? (\n <Tooltip\n preset='brand'\n placement='top'\n styles={{\n wrapper: { cursor: 'inherit' },\n }}\n {...hintTooltipProps}\n >\n <IconButton\n icon={<HelpCircle />}\n marginLeft={2}\n {...sizeProps}\n sizes={SIZES_HINT_BUTTON}\n iconProps={{\n // TODO: DSFOX-208 - удалить изменение размеров иконки через iconProps.\n sizes: SIZES_HINT_ICON,\n }}\n {...hintButtonProps}\n disabled={stateProps.disabled || hintButtonProps.disabled}\n />\n </Tooltip>\n ) : null}\n {badgeProps.children ? (\n <Badge size='s' cursor='inherit' marginLeft={6} resetDefaultMargin {...badgeProps} />\n ) : null}\n </Styled.Hint>\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { FormLabel, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","FormLabel","withMergedProps","forwardRef","size","textProps","hint","badgeProps","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","children","control","label","props","ref","sizeProps","stateProps","elementProps","text","hintText","hintTextProps","buttonProps","hintButtonProps","tooltipProps","hintTooltipProps","_jsxs","Styled","_jsx","cloneElement","Text","as","appearance","color","wordBreak","sizes","SIZES_LABEL","SIZES_SUBTITLE","SIZES_HINT","onClick","title","content","IconButton","icon","HelpCircle","marginLeft","SIZES_HINT_BUTTON","iconProps","SIZES_HINT_ICON","Tooltip","preset","placement","styles","wrapper","cursor","Badge","resetDefaultMargin","displayName","SIZES"],"mappings":"8hBAYA,MAAMA,eAAiB,YAWvB,MAAMC,UAA6DC,gBACjEC,WACE,EAEIC,OAAO,IACPC,YAAY,CAAA,EACZC,OAAO,CAAA,EACPC,aAAa,CAAA,EACbC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,WACAC,QACAC,UACAC,UACAC,WACAC,UACAC,WACGC,GAELC,KAEA,MAAMC,EAAY,CAChBnB,OACAI,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMW,EAAa,CACjBV,WACAC,QACAC,UACAC,WAGF,MAAMQ,SACGN,GAAY,iBAAmBA,EAAQE,OAAU,UAAYF,EAAQE,QAAU,KAAOF,EAAQE,MAAQ,CAAA,EAE/G,MACEK,KAAMC,EACNtB,UAAWuB,EAAgB,CAAA,EAC3BC,YAAaC,EAAkB,CAAA,EAC/BC,aAAcC,EAAmB,CAAA,GAC/B1B,EAEJ,OACE2B,KAACC,KAAW,IAAKb,KAAWE,KAAeC,EAAYF,IAAKA,EAAIJ,SAAA,CAC9DiB,IAACD,QAAc,CAAAhB,gBACLC,GAAY,WAChBA,EAAQ,IACHI,KACAC,IAELY,aAAajB,EAAS,IACjBI,KACAC,KACAC,MAGXQ,KAACC,QAAc,CAAAhB,SAAA,CACbiB,IAACE,KAAI,CACHC,GAAG,OACHC,WAAW,OACXC,MAAM,UACNC,UAAU,aACVC,MAAOC,eACHpB,KACAlB,EAASa,SAEZE,GAASF,IAEXS,EACCQ,IAACE,KAAI,CACHC,GAAG,OACHC,WAAW,UACXC,MAAOhB,EAAWV,SAAW,mBAAqB,2BAClD2B,UAAU,aACVC,MAAOE,kBACHrB,KACAK,EAAaV,SAEhBS,IAED,QAGNM,KAACC,KAAW,CAACQ,MAAOG,cAAgBtB,EAASL,WAC1CY,EAAgBgB,SAAYd,EAAiBe,OAAUf,EAAiBgB,QAarE,KAZFb,IAACc,WAAU,CACTC,KAAMf,IAACgB,eACPC,WAAY,KACR7B,EACJmB,MAAOW,kBACPC,UAAW,CAETZ,MAAOa,oBAELzB,EACJhB,SAAUU,EAAWV,UAAYgB,EAAgBhB,WAGpDkB,EAAiBe,OAASf,EAAiBgB,QAC1Cb,IAACqB,QAAO,CACNC,OAAO,QACPC,UAAU,MACVC,OAAQ,CACNC,QAAS,CAAEC,OAAQ,eAEjB7B,EAAgBd,SAEpBiB,IAACc,WAAU,CACTC,KAAMf,IAACgB,eACPC,WAAY,KACR7B,EACJmB,MAAOW,kBACPC,UAAW,CAETZ,MAAOa,oBAELzB,EACJhB,SAAUU,EAAWV,UAAYgB,EAAgBhB,aAGnD,KACHP,EAAWW,SACViB,IAAC2B,MAAK,CAAC1D,KAAK,IAAIyD,OAAO,UAAUT,WAAY,EAAGW,oBAAkB,KAAKxD,IACrE,aAMd,CACEyD,YAvJmB,YAwJnBtB,MAAOuB"}
1
+ {"version":3,"file":"FormLabel.mjs","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { HelpCircle } from '@foxford/icon-pack'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { IconButton } from 'components/IconButton'\nimport { Badge } from 'components/Badge'\nimport { Tooltip } from 'components/Tooltip'\nimport * as Styled from './style'\nimport { SIZES, SIZES_LABEL, SIZES_HINT, SIZES_HINT_BUTTON, SIZES_SUBTITLE } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * *v1.0.0*\n *\n * Компонент для контрола выбора с дополнительными элементами.\n * Позволяет добавить для контрола заголовок, подзаголовок, бейдж и подсказку.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<label\\> элемента.\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef<HTMLLabelElement, MergedProps<FormLabelProps>>(\n (\n {\n size = 'm',\n textProps = {},\n hint = {},\n badgeProps = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n disabled,\n error,\n success,\n checked,\n children,\n control,\n label,\n ...props\n },\n ref\n ) => {\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const stateProps = {\n disabled,\n error,\n success,\n checked,\n }\n\n const elementProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n const {\n text: hintText,\n textProps: hintTextProps = {},\n buttonProps: hintButtonProps = {},\n tooltipProps: hintTooltipProps = {},\n } = hint\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} ref={ref}>\n <Styled.Control>\n {typeof control === 'function'\n ? control({\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n </Styled.Control>\n <Styled.Content>\n <Text\n as='span'\n appearance='body'\n color='inherit'\n wordBreak='break-word'\n sizes={SIZES_LABEL}\n {...sizeProps}\n {...textProps}\n >\n {label ?? children}\n </Text>\n {hintText ? (\n <Text\n as='span'\n appearance='caption'\n color={stateProps.disabled ? 'content-disabled' : 'content-onmain-secondary'}\n wordBreak='break-word'\n sizes={SIZES_SUBTITLE}\n {...sizeProps}\n {...hintTextProps}\n >\n {hintText}\n </Text>\n ) : null}\n </Styled.Content>\n\n <Styled.Hint sizes={SIZES_HINT} {...sizeProps}>\n {hintButtonProps.onClick && !hintTooltipProps.title && !hintTooltipProps.content ? (\n <IconButton\n icon={<HelpCircle />}\n marginLeft={2}\n {...sizeProps}\n sizes={SIZES_HINT_BUTTON}\n {...hintButtonProps}\n disabled={stateProps.disabled || hintButtonProps.disabled}\n />\n ) : null}\n {hintTooltipProps.title || hintTooltipProps.content ? (\n <Tooltip\n preset='brand'\n placement='top'\n styles={{\n wrapper: { cursor: 'inherit' },\n }}\n {...hintTooltipProps}\n >\n <IconButton\n icon={<HelpCircle />}\n marginLeft={2}\n {...sizeProps}\n sizes={SIZES_HINT_BUTTON}\n {...hintButtonProps}\n disabled={stateProps.disabled || hintButtonProps.disabled}\n />\n </Tooltip>\n ) : null}\n {badgeProps.children ? (\n <Badge size='s' cursor='inherit' marginLeft={6} resetDefaultMargin {...badgeProps} />\n ) : null}\n </Styled.Hint>\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { FormLabel, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","FormLabel","withMergedProps","forwardRef","size","textProps","hint","badgeProps","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","children","control","label","props","ref","sizeProps","stateProps","elementProps","text","hintText","hintTextProps","buttonProps","hintButtonProps","tooltipProps","hintTooltipProps","_jsxs","Styled","_jsx","cloneElement","Text","as","appearance","color","wordBreak","sizes","SIZES_LABEL","SIZES_SUBTITLE","SIZES_HINT","onClick","title","content","IconButton","icon","HelpCircle","marginLeft","SIZES_HINT_BUTTON","Tooltip","preset","placement","styles","wrapper","cursor","Badge","resetDefaultMargin","displayName","SIZES"],"mappings":"8gBAYA,MAAMA,eAAiB,YAWvB,MAAMC,UAA6DC,gBACjEC,WACE,EAEIC,OAAO,IACPC,YAAY,CAAA,EACZC,OAAO,CAAA,EACPC,aAAa,CAAA,EACbC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,WACAC,QACAC,UACAC,UACAC,WACAC,UACAC,WACGC,GAELC,KAEA,MAAMC,EAAY,CAChBnB,OACAI,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMW,EAAa,CACjBV,WACAC,QACAC,UACAC,WAGF,MAAMQ,SACGN,GAAY,iBAAmBA,EAAQE,OAAU,UAAYF,EAAQE,QAAU,KAAOF,EAAQE,MAAQ,CAAA,EAE/G,MACEK,KAAMC,EACNtB,UAAWuB,EAAgB,CAAA,EAC3BC,YAAaC,EAAkB,CAAA,EAC/BC,aAAcC,EAAmB,CAAA,GAC/B1B,EAEJ,OACE2B,KAACC,KAAW,IAAKb,KAAWE,KAAeC,EAAYF,IAAKA,EAAIJ,SAAA,CAC9DiB,IAACD,QAAc,CAAAhB,gBACLC,GAAY,WAChBA,EAAQ,IACHI,KACAC,IAELY,aAAajB,EAAS,IACjBI,KACAC,KACAC,MAGXQ,KAACC,QAAc,CAAAhB,SAAA,CACbiB,IAACE,KAAI,CACHC,GAAG,OACHC,WAAW,OACXC,MAAM,UACNC,UAAU,aACVC,MAAOC,eACHpB,KACAlB,EAASa,SAEZE,GAASF,IAEXS,EACCQ,IAACE,KAAI,CACHC,GAAG,OACHC,WAAW,UACXC,MAAOhB,EAAWV,SAAW,mBAAqB,2BAClD2B,UAAU,aACVC,MAAOE,kBACHrB,KACAK,EAAaV,SAEhBS,IAED,QAGNM,KAACC,KAAW,CAACQ,MAAOG,cAAgBtB,EAASL,WAC1CY,EAAgBgB,SAAYd,EAAiBe,OAAUf,EAAiBgB,QASrE,KARFb,IAACc,WAAU,CACTC,KAAMf,IAACgB,eACPC,WAAY,KACR7B,EACJmB,MAAOW,qBACHvB,EACJhB,SAAUU,EAAWV,UAAYgB,EAAgBhB,WAGpDkB,EAAiBe,OAASf,EAAiBgB,QAC1Cb,IAACmB,QAAO,CACNC,OAAO,QACPC,UAAU,MACVC,OAAQ,CACNC,QAAS,CAAEC,OAAQ,eAEjB3B,EAAgBd,SAEpBiB,IAACc,WAAU,CACTC,KAAMf,IAACgB,eACPC,WAAY,KACR7B,EACJmB,MAAOW,qBACHvB,EACJhB,SAAUU,EAAWV,UAAYgB,EAAgBhB,aAGnD,KACHP,EAAWW,SACViB,IAACyB,MAAK,CAACxD,KAAK,IAAIuD,OAAO,UAAUP,WAAY,EAAGS,oBAAkB,KAAKtD,IACrE,aAMd,CACEuD,YA/ImB,YAgJnBpB,MAAOqB"}
@@ -1,2 +1,2 @@
1
- 'use strict';var sizes=require('../IconButton/sizes.js');const SIZE_FORM_LABEL={padding:'7px 11px',borderRadius:10,minWidth:'min-content'};const SIZES={xl:{...SIZE_FORM_LABEL,minHeight:56},l:{...SIZE_FORM_LABEL,minHeight:52},m:{...SIZE_FORM_LABEL,minHeight:48},s:{...SIZE_FORM_LABEL,minHeight:44},xs:{...SIZE_FORM_LABEL,minHeight:40}};const SIZES_HINT_BUTTON={xl:sizes.SIZES.xl,l:sizes.SIZES.l,m:sizes.SIZES.l,s:sizes.SIZES.m,xs:sizes.SIZES.m};const SIZES_HINT_ICON={xl:sizes.SIZES_ICON.xl,l:sizes.SIZES_ICON.l,m:sizes.SIZES_ICON.l,s:sizes.SIZES_ICON.m,xs:sizes.SIZES_ICON.m};exports.SIZES=SIZES,exports.SIZES_HINT={xl:{marginTop:4},l:{marginTop:4},m:{marginTop:2},s:{marginTop:2},xs:{marginTop:0}},exports.SIZES_HINT_BUTTON=SIZES_HINT_BUTTON,exports.SIZES_HINT_ICON=SIZES_HINT_ICON,exports.SIZES_LABEL={xl:{fontSize:20,marginTop:7},l:{fontSize:18,marginTop:6},m:{fontSize:18,marginTop:4},s:{fontSize:16,marginTop:4},xs:{fontSize:14,marginTop:4}},exports.SIZES_SUBTITLE={xl:{fontSize:16,marginTop:8,marginBottom:8},l:{fontSize:16,marginTop:8,marginBottom:5},m:{fontSize:16,marginTop:7,marginBottom:4},s:{fontSize:14,marginTop:6,marginBottom:2},xs:{fontSize:12,marginTop:4,marginBottom:1}};
1
+ 'use strict';var sizes=require('../IconButton/sizes.js');const SIZE_FORM_LABEL={padding:'7px 11px',borderRadius:10,minWidth:'min-content'};const SIZES={xl:{...SIZE_FORM_LABEL,minHeight:56},l:{...SIZE_FORM_LABEL,minHeight:52},m:{...SIZE_FORM_LABEL,minHeight:48},s:{...SIZE_FORM_LABEL,minHeight:44},xs:{...SIZE_FORM_LABEL,minHeight:40}};const SIZES_HINT_BUTTON={xl:sizes.SIZES_BASE.xl,l:sizes.SIZES_BASE.l,m:sizes.SIZES_BASE.l,s:sizes.SIZES_BASE.m,xs:sizes.SIZES_BASE.m};exports.SIZES=SIZES,exports.SIZES_HINT={xl:{marginTop:4},l:{marginTop:4},m:{marginTop:2},s:{marginTop:2},xs:{marginTop:0}},exports.SIZES_HINT_BUTTON=SIZES_HINT_BUTTON,exports.SIZES_LABEL={xl:{fontSize:20,marginTop:7},l:{fontSize:18,marginTop:6},m:{fontSize:18,marginTop:4},s:{fontSize:16,marginTop:4},xs:{fontSize:14,marginTop:4}},exports.SIZES_SUBTITLE={xl:{fontSize:16,marginTop:8,marginBottom:8},l:{fontSize:16,marginTop:8,marginBottom:5},m:{fontSize:16,marginTop:7,marginBottom:4},s:{fontSize:14,marginTop:6,marginBottom:2},xs:{fontSize:12,marginTop:4,marginBottom:1}};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/components/FormLabel/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { SIZES as SIZES_BUTTON, SIZES_ICON as SIZES_ICON_BUTTON } from 'components/IconButton'\nimport type { Size } from './types'\n\nconst SIZE_FORM_LABEL: CSSProperties = {\n padding: '7px 11px',\n borderRadius: 10,\n minWidth: 'min-content',\n}\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xl: { ...SIZE_FORM_LABEL, minHeight: 56 },\n l: { ...SIZE_FORM_LABEL, minHeight: 52 },\n m: { ...SIZE_FORM_LABEL, minHeight: 48 },\n s: { ...SIZE_FORM_LABEL, minHeight: 44 },\n xs: { ...SIZE_FORM_LABEL, minHeight: 40 },\n}\n\nexport const SIZES_LABEL: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 20,\n marginTop: 7,\n },\n l: {\n fontSize: 18,\n marginTop: 6,\n },\n m: {\n fontSize: 18,\n marginTop: 4,\n },\n s: {\n fontSize: 16,\n marginTop: 4,\n },\n xs: {\n fontSize: 14,\n marginTop: 4,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 8,\n },\n l: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 5,\n },\n m: {\n fontSize: 16,\n marginTop: 7,\n marginBottom: 4,\n },\n s: {\n fontSize: 14,\n marginTop: 6,\n marginBottom: 2,\n },\n xs: {\n fontSize: 12,\n marginTop: 4,\n marginBottom: 1,\n },\n}\n\nexport const SIZES_HINT: Record<Size, CSSProperties> = {\n xl: { marginTop: 4 },\n l: { marginTop: 4 },\n m: { marginTop: 2 },\n s: { marginTop: 2 },\n xs: { marginTop: 0 },\n}\n\nexport const SIZES_HINT_BUTTON: Record<Size, CSSProperties> = {\n xl: SIZES_BUTTON.xl,\n l: SIZES_BUTTON.l,\n m: SIZES_BUTTON.l,\n s: SIZES_BUTTON.m,\n xs: SIZES_BUTTON.m,\n}\n\nexport const SIZES_HINT_ICON: Record<Size, CSSProperties> = {\n xl: SIZES_ICON_BUTTON.xl,\n l: SIZES_ICON_BUTTON.l,\n m: SIZES_ICON_BUTTON.l,\n s: SIZES_ICON_BUTTON.m,\n xs: SIZES_ICON_BUTTON.m,\n}\n"],"names":["SIZE_FORM_LABEL","padding","borderRadius","minWidth","SIZES","xl","minHeight","l","m","s","xs","SIZES_HINT_BUTTON","SIZES_BUTTON","SIZES_HINT_ICON","SIZES_ICON_BUTTON","marginTop","fontSize","marginBottom"],"mappings":"yDAIA,MAAMA,gBAAiC,CACrCC,QAAS,WACTC,aAAc,GACdC,SAAU,eAGL,MAAMC,MAAqC,CAChDC,GAAI,IAAKL,gBAAiBM,UAAW,IACrCC,EAAG,IAAKP,gBAAiBM,UAAW,IACpCE,EAAG,IAAKR,gBAAiBM,UAAW,IACpCG,EAAG,IAAKT,gBAAiBM,UAAW,IACpCI,GAAI,IAAKV,gBAAiBM,UAAW,KA8DhC,MAAMK,kBAAiD,CAC5DN,GAAIO,MAAAA,MAAaP,GACjBE,EAAGK,MAAAA,MAAaL,EAChBC,EAAGI,MAAAA,MAAaL,EAChBE,EAAGG,MAAAA,MAAaJ,EAChBE,GAAIE,MAAAA,MAAaJ,GAGZ,MAAMK,gBAA+C,CAC1DR,GAAIS,MAAAA,WAAkBT,GACtBE,EAAGO,MAAAA,WAAkBP,EACrBC,EAAGM,MAAAA,WAAkBP,EACrBE,EAAGK,MAAAA,WAAkBN,EACrBE,GAAII,MAAAA,WAAkBN,0CArB+B,CACrDH,GAAI,CAAEU,UAAW,GACjBR,EAAG,CAAEQ,UAAW,GAChBP,EAAG,CAAEO,UAAW,GAChBN,EAAG,CAAEM,UAAW,GAChBL,GAAI,CAAEK,UAAW,4GAxDqC,CACtDV,GAAI,CACFW,SAAU,GACVD,UAAW,GAEbR,EAAG,CACDS,SAAU,GACVD,UAAW,GAEbP,EAAG,CACDQ,SAAU,GACVD,UAAW,GAEbN,EAAG,CACDO,SAAU,GACVD,UAAW,GAEbL,GAAI,CACFM,SAAU,GACVD,UAAW,2BAI4C,CACzDV,GAAI,CACFW,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBV,EAAG,CACDS,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBT,EAAG,CACDQ,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBR,EAAG,CACDO,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBP,GAAI,CACFM,SAAU,GACVD,UAAW,EACXE,aAAc"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/FormLabel/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { SIZES_BASE as SIZES_ICON_BUTTON } from 'components/IconButton'\nimport type { Size } from './types'\n\nconst SIZE_FORM_LABEL: CSSProperties = {\n padding: '7px 11px',\n borderRadius: 10,\n minWidth: 'min-content',\n}\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xl: { ...SIZE_FORM_LABEL, minHeight: 56 },\n l: { ...SIZE_FORM_LABEL, minHeight: 52 },\n m: { ...SIZE_FORM_LABEL, minHeight: 48 },\n s: { ...SIZE_FORM_LABEL, minHeight: 44 },\n xs: { ...SIZE_FORM_LABEL, minHeight: 40 },\n}\n\nexport const SIZES_LABEL: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 20,\n marginTop: 7,\n },\n l: {\n fontSize: 18,\n marginTop: 6,\n },\n m: {\n fontSize: 18,\n marginTop: 4,\n },\n s: {\n fontSize: 16,\n marginTop: 4,\n },\n xs: {\n fontSize: 14,\n marginTop: 4,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 8,\n },\n l: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 5,\n },\n m: {\n fontSize: 16,\n marginTop: 7,\n marginBottom: 4,\n },\n s: {\n fontSize: 14,\n marginTop: 6,\n marginBottom: 2,\n },\n xs: {\n fontSize: 12,\n marginTop: 4,\n marginBottom: 1,\n },\n}\n\nexport const SIZES_HINT: Record<Size, CSSProperties> = {\n xl: { marginTop: 4 },\n l: { marginTop: 4 },\n m: { marginTop: 2 },\n s: { marginTop: 2 },\n xs: { marginTop: 0 },\n}\n\nexport const SIZES_HINT_BUTTON: Record<Size, CSSProperties> = {\n xl: SIZES_ICON_BUTTON.xl,\n l: SIZES_ICON_BUTTON.l,\n m: SIZES_ICON_BUTTON.l,\n s: SIZES_ICON_BUTTON.m,\n xs: SIZES_ICON_BUTTON.m,\n}\n"],"names":["SIZE_FORM_LABEL","padding","borderRadius","minWidth","SIZES","xl","minHeight","l","m","s","xs","SIZES_HINT_BUTTON","SIZES_ICON_BUTTON","marginTop","fontSize","marginBottom"],"mappings":"yDAIA,MAAMA,gBAAiC,CACrCC,QAAS,WACTC,aAAc,GACdC,SAAU,eAGL,MAAMC,MAAqC,CAChDC,GAAI,IAAKL,gBAAiBM,UAAW,IACrCC,EAAG,IAAKP,gBAAiBM,UAAW,IACpCE,EAAG,IAAKR,gBAAiBM,UAAW,IACpCG,EAAG,IAAKT,gBAAiBM,UAAW,IACpCI,GAAI,IAAKV,gBAAiBM,UAAW,KA8DhC,MAAMK,kBAAiD,CAC5DN,GAAIO,MAAAA,WAAkBP,GACtBE,EAAGK,MAAAA,WAAkBL,EACrBC,EAAGI,MAAAA,WAAkBL,EACrBE,EAAGG,MAAAA,WAAkBJ,EACrBE,GAAIE,MAAAA,WAAkBJ,0CAb+B,CACrDH,GAAI,CAAEQ,UAAW,GACjBN,EAAG,CAAEM,UAAW,GAChBL,EAAG,CAAEK,UAAW,GAChBJ,EAAG,CAAEI,UAAW,GAChBH,GAAI,CAAEG,UAAW,oEAxDqC,CACtDR,GAAI,CACFS,SAAU,GACVD,UAAW,GAEbN,EAAG,CACDO,SAAU,GACVD,UAAW,GAEbL,EAAG,CACDM,SAAU,GACVD,UAAW,GAEbJ,EAAG,CACDK,SAAU,GACVD,UAAW,GAEbH,GAAI,CACFI,SAAU,GACVD,UAAW,2BAI4C,CACzDR,GAAI,CACFS,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBR,EAAG,CACDO,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBP,EAAG,CACDM,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBN,EAAG,CACDK,SAAU,GACVD,UAAW,EACXE,aAAc,GAEhBL,GAAI,CACFI,SAAU,GACVD,UAAW,EACXE,aAAc"}
@@ -1,2 +1,2 @@
1
- import{SIZES as SIZES$1,SIZES_ICON}from'../IconButton/sizes.mjs';const SIZE_FORM_LABEL={padding:'7px 11px',borderRadius:10,minWidth:'min-content'};const SIZES={xl:{...SIZE_FORM_LABEL,minHeight:56},l:{...SIZE_FORM_LABEL,minHeight:52},m:{...SIZE_FORM_LABEL,minHeight:48},s:{...SIZE_FORM_LABEL,minHeight:44},xs:{...SIZE_FORM_LABEL,minHeight:40}};const SIZES_LABEL={xl:{fontSize:20,marginTop:7},l:{fontSize:18,marginTop:6},m:{fontSize:18,marginTop:4},s:{fontSize:16,marginTop:4},xs:{fontSize:14,marginTop:4}};const SIZES_SUBTITLE={xl:{fontSize:16,marginTop:8,marginBottom:8},l:{fontSize:16,marginTop:8,marginBottom:5},m:{fontSize:16,marginTop:7,marginBottom:4},s:{fontSize:14,marginTop:6,marginBottom:2},xs:{fontSize:12,marginTop:4,marginBottom:1}};const SIZES_HINT={xl:{marginTop:4},l:{marginTop:4},m:{marginTop:2},s:{marginTop:2},xs:{marginTop:0}};const SIZES_HINT_BUTTON={xl:SIZES$1.xl,l:SIZES$1.l,m:SIZES$1.l,s:SIZES$1.m,xs:SIZES$1.m};const SIZES_HINT_ICON={xl:SIZES_ICON.xl,l:SIZES_ICON.l,m:SIZES_ICON.l,s:SIZES_ICON.m,xs:SIZES_ICON.m};export{SIZES,SIZES_HINT,SIZES_HINT_BUTTON,SIZES_HINT_ICON,SIZES_LABEL,SIZES_SUBTITLE};
1
+ import{SIZES_BASE}from'../IconButton/sizes.mjs';const SIZE_FORM_LABEL={padding:'7px 11px',borderRadius:10,minWidth:'min-content'};const SIZES={xl:{...SIZE_FORM_LABEL,minHeight:56},l:{...SIZE_FORM_LABEL,minHeight:52},m:{...SIZE_FORM_LABEL,minHeight:48},s:{...SIZE_FORM_LABEL,minHeight:44},xs:{...SIZE_FORM_LABEL,minHeight:40}};const SIZES_LABEL={xl:{fontSize:20,marginTop:7},l:{fontSize:18,marginTop:6},m:{fontSize:18,marginTop:4},s:{fontSize:16,marginTop:4},xs:{fontSize:14,marginTop:4}};const SIZES_SUBTITLE={xl:{fontSize:16,marginTop:8,marginBottom:8},l:{fontSize:16,marginTop:8,marginBottom:5},m:{fontSize:16,marginTop:7,marginBottom:4},s:{fontSize:14,marginTop:6,marginBottom:2},xs:{fontSize:12,marginTop:4,marginBottom:1}};const SIZES_HINT={xl:{marginTop:4},l:{marginTop:4},m:{marginTop:2},s:{marginTop:2},xs:{marginTop:0}};const SIZES_HINT_BUTTON={xl:SIZES_BASE.xl,l:SIZES_BASE.l,m:SIZES_BASE.l,s:SIZES_BASE.m,xs:SIZES_BASE.m};export{SIZES,SIZES_HINT,SIZES_HINT_BUTTON,SIZES_LABEL,SIZES_SUBTITLE};
2
2
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../../src/components/FormLabel/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { SIZES as SIZES_BUTTON, SIZES_ICON as SIZES_ICON_BUTTON } from 'components/IconButton'\nimport type { Size } from './types'\n\nconst SIZE_FORM_LABEL: CSSProperties = {\n padding: '7px 11px',\n borderRadius: 10,\n minWidth: 'min-content',\n}\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xl: { ...SIZE_FORM_LABEL, minHeight: 56 },\n l: { ...SIZE_FORM_LABEL, minHeight: 52 },\n m: { ...SIZE_FORM_LABEL, minHeight: 48 },\n s: { ...SIZE_FORM_LABEL, minHeight: 44 },\n xs: { ...SIZE_FORM_LABEL, minHeight: 40 },\n}\n\nexport const SIZES_LABEL: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 20,\n marginTop: 7,\n },\n l: {\n fontSize: 18,\n marginTop: 6,\n },\n m: {\n fontSize: 18,\n marginTop: 4,\n },\n s: {\n fontSize: 16,\n marginTop: 4,\n },\n xs: {\n fontSize: 14,\n marginTop: 4,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 8,\n },\n l: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 5,\n },\n m: {\n fontSize: 16,\n marginTop: 7,\n marginBottom: 4,\n },\n s: {\n fontSize: 14,\n marginTop: 6,\n marginBottom: 2,\n },\n xs: {\n fontSize: 12,\n marginTop: 4,\n marginBottom: 1,\n },\n}\n\nexport const SIZES_HINT: Record<Size, CSSProperties> = {\n xl: { marginTop: 4 },\n l: { marginTop: 4 },\n m: { marginTop: 2 },\n s: { marginTop: 2 },\n xs: { marginTop: 0 },\n}\n\nexport const SIZES_HINT_BUTTON: Record<Size, CSSProperties> = {\n xl: SIZES_BUTTON.xl,\n l: SIZES_BUTTON.l,\n m: SIZES_BUTTON.l,\n s: SIZES_BUTTON.m,\n xs: SIZES_BUTTON.m,\n}\n\nexport const SIZES_HINT_ICON: Record<Size, CSSProperties> = {\n xl: SIZES_ICON_BUTTON.xl,\n l: SIZES_ICON_BUTTON.l,\n m: SIZES_ICON_BUTTON.l,\n s: SIZES_ICON_BUTTON.m,\n xs: SIZES_ICON_BUTTON.m,\n}\n"],"names":["SIZE_FORM_LABEL","padding","borderRadius","minWidth","SIZES","xl","minHeight","l","m","s","xs","SIZES_LABEL","fontSize","marginTop","SIZES_SUBTITLE","marginBottom","SIZES_HINT","SIZES_HINT_BUTTON","SIZES_BUTTON","SIZES_HINT_ICON","SIZES_ICON_BUTTON"],"mappings":"iEAIA,MAAMA,gBAAiC,CACrCC,QAAS,WACTC,aAAc,GACdC,SAAU,eAGL,MAAMC,MAAqC,CAChDC,GAAI,IAAKL,gBAAiBM,UAAW,IACrCC,EAAG,IAAKP,gBAAiBM,UAAW,IACpCE,EAAG,IAAKR,gBAAiBM,UAAW,IACpCG,EAAG,IAAKT,gBAAiBM,UAAW,IACpCI,GAAI,IAAKV,gBAAiBM,UAAW,KAGhC,MAAMK,YAA2C,CACtDN,GAAI,CACFO,SAAU,GACVC,UAAW,GAEbN,EAAG,CACDK,SAAU,GACVC,UAAW,GAEbL,EAAG,CACDI,SAAU,GACVC,UAAW,GAEbJ,EAAG,CACDG,SAAU,GACVC,UAAW,GAEbH,GAAI,CACFE,SAAU,GACVC,UAAW,IAIR,MAAMC,eAA8C,CACzDT,GAAI,CACFO,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBR,EAAG,CACDK,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBP,EAAG,CACDI,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBN,EAAG,CACDG,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBL,GAAI,CACFE,SAAU,GACVC,UAAW,EACXE,aAAc,IAIX,MAAMC,WAA0C,CACrDX,GAAI,CAAEQ,UAAW,GACjBN,EAAG,CAAEM,UAAW,GAChBL,EAAG,CAAEK,UAAW,GAChBJ,EAAG,CAAEI,UAAW,GAChBH,GAAI,CAAEG,UAAW,IAGZ,MAAMI,kBAAiD,CAC5DZ,GAAIa,QAAab,GACjBE,EAAGW,QAAaX,EAChBC,EAAGU,QAAaX,EAChBE,EAAGS,QAAaV,EAChBE,GAAIQ,QAAaV,GAGZ,MAAMW,gBAA+C,CAC1Dd,GAAIe,WAAkBf,GACtBE,EAAGa,WAAkBb,EACrBC,EAAGY,WAAkBb,EACrBE,EAAGW,WAAkBZ,EACrBE,GAAIU,WAAkBZ"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../../src/components/FormLabel/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport { SIZES_BASE as SIZES_ICON_BUTTON } from 'components/IconButton'\nimport type { Size } from './types'\n\nconst SIZE_FORM_LABEL: CSSProperties = {\n padding: '7px 11px',\n borderRadius: 10,\n minWidth: 'min-content',\n}\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xl: { ...SIZE_FORM_LABEL, minHeight: 56 },\n l: { ...SIZE_FORM_LABEL, minHeight: 52 },\n m: { ...SIZE_FORM_LABEL, minHeight: 48 },\n s: { ...SIZE_FORM_LABEL, minHeight: 44 },\n xs: { ...SIZE_FORM_LABEL, minHeight: 40 },\n}\n\nexport const SIZES_LABEL: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 20,\n marginTop: 7,\n },\n l: {\n fontSize: 18,\n marginTop: 6,\n },\n m: {\n fontSize: 18,\n marginTop: 4,\n },\n s: {\n fontSize: 16,\n marginTop: 4,\n },\n xs: {\n fontSize: 14,\n marginTop: 4,\n },\n}\n\nexport const SIZES_SUBTITLE: Record<Size, CSSProperties> = {\n xl: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 8,\n },\n l: {\n fontSize: 16,\n marginTop: 8,\n marginBottom: 5,\n },\n m: {\n fontSize: 16,\n marginTop: 7,\n marginBottom: 4,\n },\n s: {\n fontSize: 14,\n marginTop: 6,\n marginBottom: 2,\n },\n xs: {\n fontSize: 12,\n marginTop: 4,\n marginBottom: 1,\n },\n}\n\nexport const SIZES_HINT: Record<Size, CSSProperties> = {\n xl: { marginTop: 4 },\n l: { marginTop: 4 },\n m: { marginTop: 2 },\n s: { marginTop: 2 },\n xs: { marginTop: 0 },\n}\n\nexport const SIZES_HINT_BUTTON: Record<Size, CSSProperties> = {\n xl: SIZES_ICON_BUTTON.xl,\n l: SIZES_ICON_BUTTON.l,\n m: SIZES_ICON_BUTTON.l,\n s: SIZES_ICON_BUTTON.m,\n xs: SIZES_ICON_BUTTON.m,\n}\n"],"names":["SIZE_FORM_LABEL","padding","borderRadius","minWidth","SIZES","xl","minHeight","l","m","s","xs","SIZES_LABEL","fontSize","marginTop","SIZES_SUBTITLE","marginBottom","SIZES_HINT","SIZES_HINT_BUTTON","SIZES_ICON_BUTTON"],"mappings":"gDAIA,MAAMA,gBAAiC,CACrCC,QAAS,WACTC,aAAc,GACdC,SAAU,eAGL,MAAMC,MAAqC,CAChDC,GAAI,IAAKL,gBAAiBM,UAAW,IACrCC,EAAG,IAAKP,gBAAiBM,UAAW,IACpCE,EAAG,IAAKR,gBAAiBM,UAAW,IACpCG,EAAG,IAAKT,gBAAiBM,UAAW,IACpCI,GAAI,IAAKV,gBAAiBM,UAAW,KAGhC,MAAMK,YAA2C,CACtDN,GAAI,CACFO,SAAU,GACVC,UAAW,GAEbN,EAAG,CACDK,SAAU,GACVC,UAAW,GAEbL,EAAG,CACDI,SAAU,GACVC,UAAW,GAEbJ,EAAG,CACDG,SAAU,GACVC,UAAW,GAEbH,GAAI,CACFE,SAAU,GACVC,UAAW,IAIR,MAAMC,eAA8C,CACzDT,GAAI,CACFO,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBR,EAAG,CACDK,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBP,EAAG,CACDI,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBN,EAAG,CACDG,SAAU,GACVC,UAAW,EACXE,aAAc,GAEhBL,GAAI,CACFE,SAAU,GACVC,UAAW,EACXE,aAAc,IAIX,MAAMC,WAA0C,CACrDX,GAAI,CAAEQ,UAAW,GACjBN,EAAG,CAAEM,UAAW,GAChBL,EAAG,CAAEK,UAAW,GAChBJ,EAAG,CAAEI,UAAW,GAChBH,GAAI,CAAEG,UAAW,IAGZ,MAAMI,kBAAiD,CAC5DZ,GAAIa,WAAkBb,GACtBE,EAAGW,WAAkBX,EACrBC,EAAGU,WAAkBX,EACrBE,EAAGS,WAAkBV,EACrBE,GAAIQ,WAAkBV"}
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var sizes=require('./sizes.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');const IconButton=withMergedProps.withMergedProps(React.forwardRef((e,s)=>{const{size:i="m",type:r="button",iconProps:t={},icon:o,sizeXXS:n,sizeXS:c,sizeS:z,sizeM:u,sizeL:a,sizeXL:I,...S}=e;const p={size:i,sizeXXS:n,sizeXS:c,sizeS:z,sizeM:u,sizeL:a,sizeXL:I};return jsxRuntime.jsx(style.Root,{...S,...p,type:r,ref:s,children:jsxRuntime.jsx(Icon.Icon,{...p,sizes:sizes.SIZES_ICON,preset:"brand",name:typeof o=='string'?o:void 0,icon:typeof o!='string'?o:void 0,...t})})}),{displayName:'IconButton',sizes:e=>e.square?sizes.SIZES_SQUARE:sizes.SIZES});exports.IconButton=IconButton;
1
+ 'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var sizes=require('./sizes.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');const IconButton=withMergedProps.withMergedProps(React.forwardRef((e,r)=>{const{size:s="m",type:t="button",iconProps:i={},icon:o,...n}=e;return jsxRuntime.jsx(style.Root,{...n,size:s,type:t,ref:r,children:jsxRuntime.jsx(Icon.Icon,{preset:"brand",size:"inherit",name:typeof o=='string'?o:void 0,icon:typeof o!='string'?o:void 0,...i})})}),{displayName:'IconButton',sizes:e=>e.square?sizes.SIZES_SQUARE:sizes.SIZES});exports.IconButton=IconButton;
2
2
  //# sourceMappingURL=IconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { SIZES, SIZES_SQUARE, SIZES_ICON } from './sizes'\nimport * as Styled from './style'\nimport type { IconButtonProps } from './types'\n\nconst COMPONENT_NAME = 'IconButton'\n\n/**\n *\n * Контрол многоцелевого назначения.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<button\\> элемента.\n */\nconst IconButton: React.ForwardRefExoticComponent<IconButtonProps> = withMergedProps<\n IconButtonProps,\n HTMLButtonElement\n>(\n forwardRef<HTMLButtonElement, MergedProps<IconButtonProps>>((props, ref) => {\n const {\n size = 'm',\n type = 'button',\n iconProps = {},\n icon,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...restProps\n } = props\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n return (\n <Styled.Root {...restProps} {...sizeProps} type={type} ref={ref}>\n <Icon\n {...sizeProps}\n sizes={SIZES_ICON}\n preset='brand'\n name={typeof icon === 'string' ? icon : undefined}\n icon={typeof icon !== 'string' ? icon : undefined}\n {...iconProps}\n />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.square ? SIZES_SQUARE : SIZES),\n }\n)\n\nexport { IconButton }\n"],"names":["IconButton","withMergedProps","forwardRef","props","ref","size","type","iconProps","icon","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","restProps","sizeProps","_jsx","Styled","children","Icon","sizes","SIZES_ICON","preset","name","undefined","displayName","square","SIZES_SQUARE","SIZES"],"mappings":"qPAgBA,MAAMA,WAA+DC,gBAAAA,gBAInEC,MAAAA,WAA4D,CAACC,EAAOC,KAClE,MAAMC,KACJA,EAAO,IAAGC,KACVA,EAAO,SAAQC,UACfA,EAAY,CAAA,EAAEC,KACdA,EAAIC,QACJA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,KACGC,GACDZ,EAEJ,MAAMa,EAAY,CAChBX,OACAI,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,OACEG,WAAAA,IAACC,MAAAA,KAAW,IAAKH,KAAeC,EAAWV,KAAMA,EAAMF,IAAKA,EAAIe,SAC9DF,WAAAA,IAACG,UAAI,IACCJ,EACJK,MAAOC,MAAAA,WACPC,OAAO,QACPC,YAAahB,GAAS,SAAWA,OAAOiB,EACxCjB,YAAaA,GAAS,SAAWA,OAAOiB,KACpClB,QAKZ,CACEmB,YAnDmB,aAoDnBL,MAAQlB,GAAWA,EAAMwB,OAASC,MAAAA,aAAeC,MAAAA"}
1
+ {"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { SIZES, SIZES_SQUARE } from './sizes'\nimport * as Styled from './style'\nimport type { IconButtonProps } from './types'\n\nconst COMPONENT_NAME = 'IconButton'\n\n/**\n *\n * Контрол многоцелевого назначения.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<button\\> элемента.\n */\nconst IconButton: React.ForwardRefExoticComponent<IconButtonProps> = withMergedProps<\n IconButtonProps,\n HTMLButtonElement\n>(\n forwardRef<HTMLButtonElement, MergedProps<IconButtonProps>>((props, ref) => {\n const { size = 'm', type = 'button', iconProps = {}, icon, ...restProps } = props\n\n return (\n <Styled.Root {...restProps} size={size} type={type} ref={ref}>\n <Icon\n preset='brand'\n size='inherit'\n name={typeof icon === 'string' ? icon : undefined}\n icon={typeof icon !== 'string' ? icon : undefined}\n {...iconProps}\n />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.square ? SIZES_SQUARE : SIZES),\n }\n)\n\nexport { IconButton }\n"],"names":["IconButton","withMergedProps","forwardRef","props","ref","size","type","iconProps","icon","restProps","_jsx","Styled","children","Icon","preset","name","undefined","displayName","sizes","square","SIZES_SQUARE","SIZES"],"mappings":"qPAgBA,MAAMA,WAA+DC,gBAAAA,gBAInEC,MAAAA,WAA4D,CAACC,EAAOC,KAClE,MAAMC,KAAEA,EAAO,IAAGC,KAAEA,EAAO,SAAQC,UAAEA,EAAY,CAAA,EAAEC,KAAEA,KAASC,GAAcN,EAE5E,OACEO,WAAAA,IAACC,MAAAA,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMF,IAAKA,EAAIQ,SAC3DF,WAAAA,IAACG,UAAI,CACHC,OAAO,QACPT,KAAK,UACLU,YAAaP,GAAS,SAAWA,OAAOQ,EACxCR,YAAaA,GAAS,SAAWA,OAAOQ,KACpCT,QAKZ,CACEU,YA5BmB,aA6BnBC,MAAQf,GAAWA,EAAMgB,OAASC,MAAAA,aAAeC,MAAAA"}
@@ -1,2 +1,2 @@
1
- import{forwardRef}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{SIZES_SQUARE,SIZES,SIZES_ICON}from'./sizes.mjs';import{Root}from'./style.mjs';import{jsx}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';const IconButton=withMergedProps(forwardRef((o,e)=>{const{size:s="m",type:i="button",iconProps:r={},icon:t,sizeXXS:n,sizeXS:m,sizeS:S,sizeM:c,sizeL:p,sizeXL:z,...I}=o;const f={size:s,sizeXXS:n,sizeXS:m,sizeS:S,sizeM:c,sizeL:p,sizeXL:z};return jsx(Root,{...I,...f,type:i,ref:e,children:jsx(Icon,{...f,sizes:SIZES_ICON,preset:"brand",name:typeof t=='string'?t:void 0,icon:typeof t!='string'?t:void 0,...r})})}),{displayName:'IconButton',sizes:o=>o.square?SIZES_SQUARE:SIZES});export{IconButton};
1
+ import{forwardRef}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{SIZES_SQUARE,SIZES}from'./sizes.mjs';import{Root}from'./style.mjs';import{jsx}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';const IconButton=withMergedProps(forwardRef((o,r)=>{const{size:t="m",type:e="button",iconProps:s={},icon:i,...n}=o;return jsx(Root,{...n,size:t,type:e,ref:r,children:jsx(Icon,{preset:"brand",size:"inherit",name:typeof i=='string'?i:void 0,icon:typeof i!='string'?i:void 0,...s})})}),{displayName:'IconButton',sizes:o=>o.square?SIZES_SQUARE:SIZES});export{IconButton};
2
2
  //# sourceMappingURL=IconButton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.mjs","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { SIZES, SIZES_SQUARE, SIZES_ICON } from './sizes'\nimport * as Styled from './style'\nimport type { IconButtonProps } from './types'\n\nconst COMPONENT_NAME = 'IconButton'\n\n/**\n *\n * Контрол многоцелевого назначения.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<button\\> элемента.\n */\nconst IconButton: React.ForwardRefExoticComponent<IconButtonProps> = withMergedProps<\n IconButtonProps,\n HTMLButtonElement\n>(\n forwardRef<HTMLButtonElement, MergedProps<IconButtonProps>>((props, ref) => {\n const {\n size = 'm',\n type = 'button',\n iconProps = {},\n icon,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...restProps\n } = props\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n return (\n <Styled.Root {...restProps} {...sizeProps} type={type} ref={ref}>\n <Icon\n {...sizeProps}\n sizes={SIZES_ICON}\n preset='brand'\n name={typeof icon === 'string' ? icon : undefined}\n icon={typeof icon !== 'string' ? icon : undefined}\n {...iconProps}\n />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.square ? SIZES_SQUARE : SIZES),\n }\n)\n\nexport { IconButton }\n"],"names":["IconButton","withMergedProps","forwardRef","props","ref","size","type","iconProps","icon","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","restProps","sizeProps","_jsx","Styled","children","Icon","sizes","SIZES_ICON","preset","name","undefined","displayName","square","SIZES_SQUARE","SIZES"],"mappings":"qPAgBA,MAAMA,WAA+DC,gBAInEC,WAA4D,CAACC,EAAOC,KAClE,MAAMC,KACJA,EAAO,IAAGC,KACVA,EAAO,SAAQC,UACfA,EAAY,CAAA,EAAEC,KACdA,EAAIC,QACJA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,KACGC,GACDZ,EAEJ,MAAMa,EAAY,CAChBX,OACAI,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,OACEG,IAACC,KAAW,IAAKH,KAAeC,EAAWV,KAAMA,EAAMF,IAAKA,EAAIe,SAC9DF,IAACG,KAAI,IACCJ,EACJK,MAAOC,WACPC,OAAO,QACPC,YAAahB,GAAS,SAAWA,OAAOiB,EACxCjB,YAAaA,GAAS,SAAWA,OAAOiB,KACpClB,QAKZ,CACEmB,YAnDmB,aAoDnBL,MAAQlB,GAAWA,EAAMwB,OAASC,aAAeC"}
1
+ {"version":3,"file":"IconButton.mjs","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { SIZES, SIZES_SQUARE } from './sizes'\nimport * as Styled from './style'\nimport type { IconButtonProps } from './types'\n\nconst COMPONENT_NAME = 'IconButton'\n\n/**\n *\n * Контрол многоцелевого назначения.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<button\\> элемента.\n */\nconst IconButton: React.ForwardRefExoticComponent<IconButtonProps> = withMergedProps<\n IconButtonProps,\n HTMLButtonElement\n>(\n forwardRef<HTMLButtonElement, MergedProps<IconButtonProps>>((props, ref) => {\n const { size = 'm', type = 'button', iconProps = {}, icon, ...restProps } = props\n\n return (\n <Styled.Root {...restProps} size={size} type={type} ref={ref}>\n <Icon\n preset='brand'\n size='inherit'\n name={typeof icon === 'string' ? icon : undefined}\n icon={typeof icon !== 'string' ? icon : undefined}\n {...iconProps}\n />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.square ? SIZES_SQUARE : SIZES),\n }\n)\n\nexport { IconButton }\n"],"names":["IconButton","withMergedProps","forwardRef","props","ref","size","type","iconProps","icon","restProps","_jsx","Styled","children","Icon","preset","name","undefined","displayName","sizes","square","SIZES_SQUARE","SIZES"],"mappings":"0OAgBA,MAAMA,WAA+DC,gBAInEC,WAA4D,CAACC,EAAOC,KAClE,MAAMC,KAAEA,EAAO,IAAGC,KAAEA,EAAO,SAAQC,UAAEA,EAAY,CAAA,EAAEC,KAAEA,KAASC,GAAcN,EAE5E,OACEO,IAACC,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMF,IAAKA,EAAIQ,SAC3DF,IAACG,KAAI,CACHC,OAAO,QACPT,KAAK,UACLU,YAAaP,GAAS,SAAWA,OAAOQ,EACxCR,YAAaA,GAAS,SAAWA,OAAOQ,KACpCT,QAKZ,CACEU,YA5BmB,aA6BnBC,MAAQf,GAAWA,EAAMgB,OAASC,aAAeC"}
@@ -1,2 +1,2 @@
1
- 'use strict';exports.SIZES={xxl:{width:40,height:40,borderRadius:'50%'},xl:{width:32,height:32,borderRadius:'50%'},l:{width:28,height:28,borderRadius:'50%'},m:{width:24,height:24,borderRadius:'50%'},s:{width:20,height:20,borderRadius:'50%'},xs:{width:18,height:18,borderRadius:'50%'},xxs:{width:16,height:16,borderRadius:'50%'}},exports.SIZES_ICON={xxl:{fontSize:24},xl:{fontSize:24},l:{fontSize:20},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12}},exports.SIZES_SQUARE={xxl:{width:40,height:40,borderRadius:8},xl:{width:32,height:32,borderRadius:7},l:{width:28,height:28,borderRadius:6},m:{width:24,height:24,borderRadius:5},s:{width:20,height:20,borderRadius:4},xs:{width:18,height:18,borderRadius:4},xxs:{width:16,height:16,borderRadius:4}};
1
+ 'use strict';const SIZES_BASE={xxl:{'--icon-button-height':'40px',width:40,height:'var(--icon-button-height)',fontSize:24},xl:{'--icon-button-height':'32px',width:32,height:'var(--icon-button-height)',fontSize:24},l:{'--icon-button-height':'28px',width:28,height:'var(--icon-button-height)',fontSize:20},m:{'--icon-button-height':'24px',width:24,height:'var(--icon-button-height)',fontSize:16},s:{'--icon-button-height':'20px',width:20,height:'var(--icon-button-height)',fontSize:16},xs:{'--icon-button-height':'18px',width:18,height:'var(--icon-button-height)',fontSize:14},xxs:{'--icon-button-height':'16px',width:16,height:'var(--icon-button-height)',fontSize:12}};const SIZES={xxl:{...SIZES_BASE.xxl,borderRadius:'50%'},xl:{...SIZES_BASE.xl,borderRadius:'50%'},l:{...SIZES_BASE.l,borderRadius:'50%'},m:{...SIZES_BASE.m,borderRadius:'50%'},s:{...SIZES_BASE.s,borderRadius:'50%'},xs:{...SIZES_BASE.xs,borderRadius:'50%'},xxs:{...SIZES_BASE.xxs,borderRadius:'50%'}};const SIZES_SQUARE={xxl:{...SIZES_BASE.xxl,borderRadius:"calc(var(--icon-button-height) * 0.2)"},xl:{...SIZES_BASE.xl,borderRadius:"calc(var(--icon-button-height) * 0.2)"},l:{...SIZES_BASE.l,borderRadius:"calc(var(--icon-button-height) * 0.2)"},m:{...SIZES_BASE.m,borderRadius:"calc(var(--icon-button-height) * 0.2)"},s:{...SIZES_BASE.s,borderRadius:"calc(var(--icon-button-height) * 0.2)"},xs:{...SIZES_BASE.xs,borderRadius:"calc(var(--icon-button-height) * 0.2)"},xxs:{...SIZES_BASE.xxs,borderRadius:"calc(var(--icon-button-height) * 0.2)"}};exports.SIZES=SIZES,exports.SIZES_BASE=SIZES_BASE,exports.SIZES_SQUARE=SIZES_SQUARE;
2
2
  //# sourceMappingURL=sizes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sizes.js","sources":["../../../../src/components/IconButton/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from './types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxl: {\n width: 40,\n height: 40,\n borderRadius: '50%',\n },\n xl: {\n width: 32,\n height: 32,\n borderRadius: '50%',\n },\n l: {\n width: 28,\n height: 28,\n borderRadius: '50%',\n },\n m: {\n width: 24,\n height: 24,\n borderRadius: '50%',\n },\n s: {\n width: 20,\n height: 20,\n borderRadius: '50%',\n },\n xs: {\n width: 18,\n height: 18,\n borderRadius: '50%',\n },\n xxs: {\n width: 16,\n height: 16,\n borderRadius: '50%',\n },\n}\n\nexport const SIZES_SQUARE: Record<Size, CSSProperties> = {\n xxl: {\n width: 40,\n height: 40,\n borderRadius: 8,\n },\n xl: {\n width: 32,\n height: 32,\n borderRadius: 7,\n },\n l: {\n width: 28,\n height: 28,\n borderRadius: 6,\n },\n m: {\n width: 24,\n height: 24,\n borderRadius: 5,\n },\n s: {\n width: 20,\n height: 20,\n borderRadius: 4,\n },\n xs: {\n width: 18,\n height: 18,\n borderRadius: 4,\n },\n xxs: {\n width: 16,\n height: 16,\n borderRadius: 4,\n },\n}\n\nexport const SIZES_ICON: Record<Size, CSSProperties> = {\n xxl: { fontSize: 24 },\n xl: { fontSize: 24 },\n l: { fontSize: 20 },\n m: { fontSize: 16 },\n s: { fontSize: 16 },\n xs: { fontSize: 14 },\n xxs: { fontSize: 12 },\n}\n"],"names":["xxl","width","height","borderRadius","xl","l","m","s","xs","xxs","fontSize"],"mappings":"2BAGkD,CAChDA,IAAK,CACHC,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBC,GAAI,CACFH,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBE,EAAG,CACDJ,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBK,GAAI,CACFP,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBM,IAAK,CACHR,MAAO,GACPC,OAAQ,GACRC,aAAc,2BA0CqC,CACrDH,IAAK,CAAEU,SAAU,IACjBN,GAAI,CAAEM,SAAU,IAChBL,EAAG,CAAEK,SAAU,IACfJ,EAAG,CAAEI,SAAU,IACfH,EAAG,CAAEG,SAAU,IACfF,GAAI,CAAEE,SAAU,IAChBD,IAAK,CAAEC,SAAU,0BA7CsC,CACvDV,IAAK,CACHC,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBC,GAAI,CACFH,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBE,EAAG,CACDJ,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBK,GAAI,CACFP,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBM,IAAK,CACHR,MAAO,GACPC,OAAQ,GACRC,aAAc"}
1
+ {"version":3,"file":"sizes.js","sources":["../../../../src/components/IconButton/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from './types'\n\nexport const SIZES_BASE: Record<Size, CSSProperties> = {\n xxl: {\n '--icon-button-height': '40px',\n width: 40,\n height: 'var(--icon-button-height)',\n fontSize: 24,\n },\n xl: {\n '--icon-button-height': '32px',\n width: 32,\n height: 'var(--icon-button-height)',\n fontSize: 24,\n },\n l: {\n '--icon-button-height': '28px',\n width: 28,\n height: 'var(--icon-button-height)',\n fontSize: 20,\n },\n m: {\n '--icon-button-height': '24px',\n width: 24,\n height: 'var(--icon-button-height)',\n fontSize: 16,\n },\n s: {\n '--icon-button-height': '20px',\n width: 20,\n height: 'var(--icon-button-height)',\n fontSize: 16,\n },\n xs: {\n '--icon-button-height': '18px',\n width: 18,\n height: 'var(--icon-button-height)',\n fontSize: 14,\n },\n xxs: {\n '--icon-button-height': '16px',\n width: 16,\n height: 'var(--icon-button-height)',\n fontSize: 12,\n },\n}\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxl: {\n ...SIZES_BASE.xxl,\n borderRadius: '50%',\n },\n xl: {\n ...SIZES_BASE.xl,\n borderRadius: '50%',\n },\n l: {\n ...SIZES_BASE.l,\n borderRadius: '50%',\n },\n m: {\n ...SIZES_BASE.m,\n borderRadius: '50%',\n },\n s: {\n ...SIZES_BASE.s,\n borderRadius: '50%',\n },\n xs: {\n ...SIZES_BASE.xs,\n borderRadius: '50%',\n },\n xxs: {\n ...SIZES_BASE.xxs,\n borderRadius: '50%',\n },\n}\n\nexport const SIZES_SQUARE: Record<Size, CSSProperties> = {\n xxl: {\n ...SIZES_BASE.xxl,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n xl: {\n ...SIZES_BASE.xl,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n l: {\n ...SIZES_BASE.l,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n m: {\n ...SIZES_BASE.m,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n s: {\n ...SIZES_BASE.s,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n xs: {\n ...SIZES_BASE.xs,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n xxs: {\n ...SIZES_BASE.xxs,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n}\n"],"names":["SIZES_BASE","xxl","width","height","fontSize","xl","l","m","s","xs","xxs","SIZES","borderRadius","SIZES_SQUARE"],"mappings":"aAGO,MAAMA,WAA0C,CACrDC,IAAK,CACH,uBAAwB,OACxBC,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZC,GAAI,CACF,uBAAwB,OACxBH,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZE,EAAG,CACD,uBAAwB,OACxBJ,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZG,EAAG,CACD,uBAAwB,OACxBL,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZI,EAAG,CACD,uBAAwB,OACxBN,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZK,GAAI,CACF,uBAAwB,OACxBP,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZM,IAAK,CACH,uBAAwB,OACxBR,MAAO,GACPC,OAAQ,4BACRC,SAAU,KAIP,MAAMO,MAAqC,CAChDV,IAAK,IACAD,WAAWC,IACdW,aAAc,OAEhBP,GAAI,IACCL,WAAWK,GACdO,aAAc,OAEhBN,EAAG,IACEN,WAAWM,EACdM,aAAc,OAEhBL,EAAG,IACEP,WAAWO,EACdK,aAAc,OAEhBJ,EAAG,IACER,WAAWQ,EACdI,aAAc,OAEhBH,GAAI,IACCT,WAAWS,GACdG,aAAc,OAEhBF,IAAK,IACAV,WAAWU,IACdE,aAAc,QAIX,MAAMC,aAA4C,CACvDZ,IAAK,IACAD,WAAWC,IACdW,aAAc,yCAEhBP,GAAI,IACCL,WAAWK,GACdO,aAAc,yCAEhBN,EAAG,IACEN,WAAWM,EACdM,aAAc,yCAEhBL,EAAG,IACEP,WAAWO,EACdK,aAAc,yCAEhBJ,EAAG,IACER,WAAWQ,EACdI,aAAc,yCAEhBH,GAAI,IACCT,WAAWS,GACdG,aAAc,yCAEhBF,IAAK,IACAV,WAAWU,IACdE,aAAc"}
@@ -1,2 +1,2 @@
1
- const SIZES={xxl:{width:40,height:40,borderRadius:'50%'},xl:{width:32,height:32,borderRadius:'50%'},l:{width:28,height:28,borderRadius:'50%'},m:{width:24,height:24,borderRadius:'50%'},s:{width:20,height:20,borderRadius:'50%'},xs:{width:18,height:18,borderRadius:'50%'},xxs:{width:16,height:16,borderRadius:'50%'}};const SIZES_SQUARE={xxl:{width:40,height:40,borderRadius:8},xl:{width:32,height:32,borderRadius:7},l:{width:28,height:28,borderRadius:6},m:{width:24,height:24,borderRadius:5},s:{width:20,height:20,borderRadius:4},xs:{width:18,height:18,borderRadius:4},xxs:{width:16,height:16,borderRadius:4}};const SIZES_ICON={xxl:{fontSize:24},xl:{fontSize:24},l:{fontSize:20},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12}};export{SIZES,SIZES_ICON,SIZES_SQUARE};
1
+ const SIZES_BASE={xxl:{'--icon-button-height':'40px',width:40,height:'var(--icon-button-height)',fontSize:24},xl:{'--icon-button-height':'32px',width:32,height:'var(--icon-button-height)',fontSize:24},l:{'--icon-button-height':'28px',width:28,height:'var(--icon-button-height)',fontSize:20},m:{'--icon-button-height':'24px',width:24,height:'var(--icon-button-height)',fontSize:16},s:{'--icon-button-height':'20px',width:20,height:'var(--icon-button-height)',fontSize:16},xs:{'--icon-button-height':'18px',width:18,height:'var(--icon-button-height)',fontSize:14},xxs:{'--icon-button-height':'16px',width:16,height:'var(--icon-button-height)',fontSize:12}};const SIZES={xxl:{...SIZES_BASE.xxl,borderRadius:'50%'},xl:{...SIZES_BASE.xl,borderRadius:'50%'},l:{...SIZES_BASE.l,borderRadius:'50%'},m:{...SIZES_BASE.m,borderRadius:'50%'},s:{...SIZES_BASE.s,borderRadius:'50%'},xs:{...SIZES_BASE.xs,borderRadius:'50%'},xxs:{...SIZES_BASE.xxs,borderRadius:'50%'}};const SIZES_SQUARE={xxl:{...SIZES_BASE.xxl,borderRadius:"calc(var(--icon-button-height) * 0.2)"},xl:{...SIZES_BASE.xl,borderRadius:"calc(var(--icon-button-height) * 0.2)"},l:{...SIZES_BASE.l,borderRadius:"calc(var(--icon-button-height) * 0.2)"},m:{...SIZES_BASE.m,borderRadius:"calc(var(--icon-button-height) * 0.2)"},s:{...SIZES_BASE.s,borderRadius:"calc(var(--icon-button-height) * 0.2)"},xs:{...SIZES_BASE.xs,borderRadius:"calc(var(--icon-button-height) * 0.2)"},xxs:{...SIZES_BASE.xxs,borderRadius:"calc(var(--icon-button-height) * 0.2)"}};export{SIZES,SIZES_BASE,SIZES_SQUARE};
2
2
  //# sourceMappingURL=sizes.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sizes.mjs","sources":["../../../../src/components/IconButton/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from './types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxl: {\n width: 40,\n height: 40,\n borderRadius: '50%',\n },\n xl: {\n width: 32,\n height: 32,\n borderRadius: '50%',\n },\n l: {\n width: 28,\n height: 28,\n borderRadius: '50%',\n },\n m: {\n width: 24,\n height: 24,\n borderRadius: '50%',\n },\n s: {\n width: 20,\n height: 20,\n borderRadius: '50%',\n },\n xs: {\n width: 18,\n height: 18,\n borderRadius: '50%',\n },\n xxs: {\n width: 16,\n height: 16,\n borderRadius: '50%',\n },\n}\n\nexport const SIZES_SQUARE: Record<Size, CSSProperties> = {\n xxl: {\n width: 40,\n height: 40,\n borderRadius: 8,\n },\n xl: {\n width: 32,\n height: 32,\n borderRadius: 7,\n },\n l: {\n width: 28,\n height: 28,\n borderRadius: 6,\n },\n m: {\n width: 24,\n height: 24,\n borderRadius: 5,\n },\n s: {\n width: 20,\n height: 20,\n borderRadius: 4,\n },\n xs: {\n width: 18,\n height: 18,\n borderRadius: 4,\n },\n xxs: {\n width: 16,\n height: 16,\n borderRadius: 4,\n },\n}\n\nexport const SIZES_ICON: Record<Size, CSSProperties> = {\n xxl: { fontSize: 24 },\n xl: { fontSize: 24 },\n l: { fontSize: 20 },\n m: { fontSize: 16 },\n s: { fontSize: 16 },\n xs: { fontSize: 14 },\n xxs: { fontSize: 12 },\n}\n"],"names":["SIZES","xxl","width","height","borderRadius","xl","l","m","s","xs","xxs","SIZES_SQUARE","SIZES_ICON","fontSize"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,IAAK,CACHC,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBC,GAAI,CACFH,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBE,EAAG,CACDJ,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBK,GAAI,CACFP,MAAO,GACPC,OAAQ,GACRC,aAAc,OAEhBM,IAAK,CACHR,MAAO,GACPC,OAAQ,GACRC,aAAc,QAIX,MAAMO,aAA4C,CACvDV,IAAK,CACHC,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBC,GAAI,CACFH,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBE,EAAG,CACDJ,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBG,EAAG,CACDL,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBI,EAAG,CACDN,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBK,GAAI,CACFP,MAAO,GACPC,OAAQ,GACRC,aAAc,GAEhBM,IAAK,CACHR,MAAO,GACPC,OAAQ,GACRC,aAAc,IAIX,MAAMQ,WAA0C,CACrDX,IAAK,CAAEY,SAAU,IACjBR,GAAI,CAAEQ,SAAU,IAChBP,EAAG,CAAEO,SAAU,IACfN,EAAG,CAAEM,SAAU,IACfL,EAAG,CAAEK,SAAU,IACfJ,GAAI,CAAEI,SAAU,IAChBH,IAAK,CAAEG,SAAU"}
1
+ {"version":3,"file":"sizes.mjs","sources":["../../../../src/components/IconButton/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from './types'\n\nexport const SIZES_BASE: Record<Size, CSSProperties> = {\n xxl: {\n '--icon-button-height': '40px',\n width: 40,\n height: 'var(--icon-button-height)',\n fontSize: 24,\n },\n xl: {\n '--icon-button-height': '32px',\n width: 32,\n height: 'var(--icon-button-height)',\n fontSize: 24,\n },\n l: {\n '--icon-button-height': '28px',\n width: 28,\n height: 'var(--icon-button-height)',\n fontSize: 20,\n },\n m: {\n '--icon-button-height': '24px',\n width: 24,\n height: 'var(--icon-button-height)',\n fontSize: 16,\n },\n s: {\n '--icon-button-height': '20px',\n width: 20,\n height: 'var(--icon-button-height)',\n fontSize: 16,\n },\n xs: {\n '--icon-button-height': '18px',\n width: 18,\n height: 'var(--icon-button-height)',\n fontSize: 14,\n },\n xxs: {\n '--icon-button-height': '16px',\n width: 16,\n height: 'var(--icon-button-height)',\n fontSize: 12,\n },\n}\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxl: {\n ...SIZES_BASE.xxl,\n borderRadius: '50%',\n },\n xl: {\n ...SIZES_BASE.xl,\n borderRadius: '50%',\n },\n l: {\n ...SIZES_BASE.l,\n borderRadius: '50%',\n },\n m: {\n ...SIZES_BASE.m,\n borderRadius: '50%',\n },\n s: {\n ...SIZES_BASE.s,\n borderRadius: '50%',\n },\n xs: {\n ...SIZES_BASE.xs,\n borderRadius: '50%',\n },\n xxs: {\n ...SIZES_BASE.xxs,\n borderRadius: '50%',\n },\n}\n\nexport const SIZES_SQUARE: Record<Size, CSSProperties> = {\n xxl: {\n ...SIZES_BASE.xxl,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n xl: {\n ...SIZES_BASE.xl,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n l: {\n ...SIZES_BASE.l,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n m: {\n ...SIZES_BASE.m,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n s: {\n ...SIZES_BASE.s,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n xs: {\n ...SIZES_BASE.xs,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n xxs: {\n ...SIZES_BASE.xxs,\n borderRadius: `calc(var(--icon-button-height) * 0.2)`,\n },\n}\n"],"names":["SIZES_BASE","xxl","width","height","fontSize","xl","l","m","s","xs","xxs","SIZES","borderRadius","SIZES_SQUARE"],"mappings":"AAGO,MAAMA,WAA0C,CACrDC,IAAK,CACH,uBAAwB,OACxBC,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZC,GAAI,CACF,uBAAwB,OACxBH,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZE,EAAG,CACD,uBAAwB,OACxBJ,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZG,EAAG,CACD,uBAAwB,OACxBL,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZI,EAAG,CACD,uBAAwB,OACxBN,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZK,GAAI,CACF,uBAAwB,OACxBP,MAAO,GACPC,OAAQ,4BACRC,SAAU,IAEZM,IAAK,CACH,uBAAwB,OACxBR,MAAO,GACPC,OAAQ,4BACRC,SAAU,KAIP,MAAMO,MAAqC,CAChDV,IAAK,IACAD,WAAWC,IACdW,aAAc,OAEhBP,GAAI,IACCL,WAAWK,GACdO,aAAc,OAEhBN,EAAG,IACEN,WAAWM,EACdM,aAAc,OAEhBL,EAAG,IACEP,WAAWO,EACdK,aAAc,OAEhBJ,EAAG,IACER,WAAWQ,EACdI,aAAc,OAEhBH,GAAI,IACCT,WAAWS,GACdG,aAAc,OAEhBF,IAAK,IACAV,WAAWU,IACdE,aAAc,QAIX,MAAMC,aAA4C,CACvDZ,IAAK,IACAD,WAAWC,IACdW,aAAc,yCAEhBP,GAAI,IACCL,WAAWK,GACdO,aAAc,yCAEhBN,EAAG,IACEN,WAAWM,EACdM,aAAc,yCAEhBL,EAAG,IACEP,WAAWO,EACdK,aAAc,yCAEhBJ,EAAG,IACER,WAAWQ,EACdI,aAAc,yCAEhBH,GAAI,IACCT,WAAWS,GACdG,aAAc,yCAEhBF,IAAK,IACAV,WAAWU,IACdE,aAAc"}
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var constants=require('./constants.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');var Icon=require('../Icon/Icon.js');const ListItem=withMergedProps.withMergedProps(React.forwardRef((e,t)=>{const{size:s="s",borderRadius:i=0,mediaBorderRadius:n="50%",controlPosition:o="left",captionPosition:r="bottom",ellipsis:l=!0,iconProps:a={},textProps:c={},captionProps:d={},sizeXXS:u,sizeXS:x,sizeS:p,sizeM:j,sizeL:m,sizeXL:R,text:h,children:y,control:f,icon:z,media:b,caption:S,addon:g,onColored:I,disabled:v,loading:P,...T}=e;let q;let L;f&&(q='label'),T.href&&(q='a'),T.as&&(q=T.as),q||(L='button'),T.type&&(L=T.type);const M={size:s,sizeXXS:u,sizeXS:x,sizeS:p,sizeM:j,sizeL:m,sizeXL:R};const X={onColored:I,disabled:v};const k=typeof f=='object'&&typeof f.props=='object'&&f.props!==null?f.props:{};const[w,C]=Array.isArray(z)?z:[z];const E={appearance:'body',size:'inherit',color:'inherit',ellipsis:l};const A={appearance:'body',size:.9,sizeUnits:'em',color:'inherit',ellipsis:l};return jsxRuntime.jsx(style.Root,{...M,...X,...T,as:q,type:L,borderRadius:i,mediaBorderRadius:n,ref:t,children:typeof y=='function'?y({textProps:E,captionProps:A}):jsxRuntime.jsxs(jsxRuntime.Fragment,P?{children:[b?jsxRuntime.jsx(style.Media,{children:jsxRuntime.jsx(Skeleton.Skeleton,{width:"100%",height:"100%",borderRadius:"inherit"})}):null,jsxRuntime.jsx(style.Content,{children:jsxRuntime.jsx(Skeleton.Skeleton,{width:"100%",borderRadius:4,children:jsxRuntime.jsx(Text.Text,{...E,...c})})})]}:{children:[f&&o==='left'?typeof f=='function'?f({...M,...X}):React.cloneElement(f,{...M,...X,...k}):null,w?jsxRuntime.jsx(Icon.Icon,{preset:"brand",name:typeof w=='string'?w:void 0,icon:typeof w!='string'?w:void 0,...a}):null,b?jsxRuntime.jsx(style.Media,{children:React.isValidElement(b)?b:jsxRuntime.jsx(style.Img,{alt:"",...b})}):null,y||h||S?jsxRuntime.jsxs(style.Content,{children:[S&&r==='top'?jsxRuntime.jsx(Text.Text,{as:"span",...A,...d,children:S}):null,y||h?jsxRuntime.jsx(Text.Text,{as:"span",...E,...c,children:y??h}):null,S&&r==='bottom'?jsxRuntime.jsx(Text.Text,{as:"span",...A,...d,children:S}):null]}):null,g,C?jsxRuntime.jsx(Icon.Icon,{preset:"brand",name:typeof C=='string'?C:void 0,icon:typeof C!='string'?C:void 0,...a}):null,f&&o==='right'?typeof f=='function'?f({...M,...X}):React.cloneElement(f,{...M,...X,...k}):null]})})}),{displayName:'ListItem',sizes:constants.SIZES});exports.ListItem=ListItem;
1
+ 'use strict';var isNil=require('../../shared/utils/isNil.js');var useMergedProps=require('../../hooks/useMergedProps.js');var createPolymorphicComponentWithRef=require('../../shared/utils/createPolymorphicComponentWithRef.js');var sizes=require('./sizes.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Slot=require('../Slot/Slot.js');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');var Icon=require('../Icon/Icon.js');var index=require('../../icon-pack/src/icons/ChevronRight/index.js');const ListItem=createPolymorphicComponentWithRef.createPolymorphicComponentWithRef((e,s)=>{const{component:t="button",size:i="s",borderRadius:r=0,withChevron:o,children:n,content:l,text:a,caption:c,addonLeft:x,addonRight:u,loadingLayout:p,loading:j,sizeXXS:d,sizeXS:m,sizeS:S,sizeM:R,sizeL:h,sizeXL:z,...P}=useMergedProps.useMergedProps(e,{componentName:"ListItem",sizes:sizes.SIZES});const v={size:i,sizeXXS:d,sizeXS:m,sizeS:S,sizeM:R,sizeL:h,sizeXL:z};const g={...v,sizes:sizes.SIZES_TEXT,appearance:'body',color:'inherit',ellipsis:!0,textAlign:'start'};const y={...v,sizes:sizes.SIZES_CAPTION,appearance:'body',color:'inherit',ellipsis:!0,textAlign:'start'};const I={width:'65%',borderRadius:4,onColored:P.contrast&&!P.active};return jsxRuntime.jsx(style.Root,{...P,...v,as:t,type:P.type??(t==='button'?'button':void 0),borderRadius:r,loading:j,ref:s,children:jsxRuntime.jsx(Slot.Slot,{render:n,props:{textProps:g,captionProps:y,skeletonProps:I},fallback:j?jsxRuntime.jsx(Slot.Slot,{render:p,props:{textProps:g,captionProps:y,skeletonProps:I},fallback:jsxRuntime.jsx(Skeleton.Skeleton,{...I,children:jsxRuntime.jsx(Text.Text,{...g})})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Slot.Slot,{render:x}),isNil.isNil(l)&&isNil.isNil(a)&&isNil.isNil(c)?null:jsxRuntime.jsx(style.Content,{children:jsxRuntime.jsx(Slot.Slot,{render:l,props:{textProps:g,captionProps:y},fallback:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Slot.Slot,{render:a,props:g}),jsxRuntime.jsx(Slot.Slot,{render:c,props:y})]})})}),jsxRuntime.jsx(Slot.Slot,{render:u}),o?jsxRuntime.jsx(Icon.Icon,{icon:jsxRuntime.jsx(index.ChevronRight,{}),size:24,color:"inherit"}):null]})})})});exports.ListItem=ListItem;
2
2
  //# sourceMappingURL=ListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","sources":["../../../../src/components/ListItem/ListItem.tsx"],"sourcesContent":["import { forwardRef, cloneElement, isValidElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Skeleton } from 'components/Skeleton'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { ListItemProps } from './types'\n\nconst COMPONENT_NAME = 'ListItem'\n\n/**\n *\n * Component accepts all root HTML attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ListItemProps](https://github.com/foxford/ui/blob/master/packages/ui/src/components/ListItem/types.ts)\n */\nconst ListItem: React.ForwardRefExoticComponent<ListItemProps> = withMergedProps<ListItemProps>(\n forwardRef<HTMLElement, MergedProps<ListItemProps>>((props, ref) => {\n const {\n size = 's',\n borderRadius = 0,\n mediaBorderRadius = '50%',\n controlPosition = 'left',\n captionPosition = 'bottom',\n ellipsis = true,\n iconProps = {},\n textProps = {},\n captionProps = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n text,\n children,\n control,\n icon,\n media,\n caption,\n addon,\n onColored,\n disabled,\n loading,\n ...restProps\n } = props\n\n let rootNode: ListItemProps['as']\n\n if (control) rootNode = 'label'\n if (restProps.href) rootNode = 'a'\n if (restProps.as) rootNode = restProps.as\n\n let rootType: ListItemProps['type']\n\n if (!rootNode) rootType = 'button'\n if (restProps.type) rootType = restProps.type\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const stateProps = {\n onColored,\n disabled,\n }\n\n const controlProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const textBaseProps: TextProps = { appearance: 'body', size: 'inherit', color: 'inherit', ellipsis }\n\n const captionBaseProps: TextProps = { appearance: 'body', size: 0.9, sizeUnits: 'em', color: 'inherit', ellipsis }\n\n return (\n <Styled.Root\n {...sizeProps}\n {...stateProps}\n {...restProps}\n as={rootNode}\n type={rootType}\n borderRadius={borderRadius}\n mediaBorderRadius={mediaBorderRadius}\n ref={ref}\n >\n {typeof children === 'function' ? (\n children({\n textProps: textBaseProps,\n captionProps: captionBaseProps,\n })\n ) : loading ? (\n <>\n {media ? (\n <Styled.Media>\n <Skeleton width='100%' height='100%' borderRadius='inherit' />\n </Styled.Media>\n ) : null}\n <Styled.Content>\n <Skeleton width='100%' borderRadius={4}>\n <Text {...textBaseProps} {...textProps} />\n </Skeleton>\n </Styled.Content>\n </>\n ) : (\n <>\n {control && controlPosition === 'left'\n ? typeof control === 'function'\n ? control({ ...sizeProps, ...stateProps })\n : cloneElement(control, { ...sizeProps, ...stateProps, ...controlProps })\n : null}\n {before ? (\n <Icon\n preset='brand'\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconProps}\n />\n ) : null}\n {media ? (\n <Styled.Media>{isValidElement(media) ? media : <Styled.Img alt='' {...media} />}</Styled.Media>\n ) : null}\n {children || text || caption ? (\n <Styled.Content>\n {caption && captionPosition === 'top' ? (\n <Text as='span' {...captionBaseProps} {...captionProps}>\n {caption}\n </Text>\n ) : null}\n {children || text ? (\n <Text as='span' {...textBaseProps} {...textProps}>\n {children ?? text}\n </Text>\n ) : null}\n {caption && captionPosition === 'bottom' ? (\n <Text as='span' {...captionBaseProps} {...captionProps}>\n {caption}\n </Text>\n ) : null}\n </Styled.Content>\n ) : null}\n {addon}\n {after ? (\n <Icon\n preset='brand'\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconProps}\n />\n ) : null}\n {control && controlPosition === 'right'\n ? typeof control === 'function'\n ? control({ ...sizeProps, ...stateProps })\n : cloneElement(control, { ...sizeProps, ...stateProps, ...controlProps })\n : null}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ListItem }\n"],"names":["ListItem","withMergedProps","forwardRef","props","ref","size","borderRadius","mediaBorderRadius","controlPosition","captionPosition","ellipsis","iconProps","textProps","captionProps","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","text","children","control","icon","media","caption","addon","onColored","disabled","loading","restProps","rootNode","rootType","href","as","type","sizeProps","stateProps","controlProps","before","after","Array","isArray","textBaseProps","appearance","color","captionBaseProps","sizeUnits","_jsx","Styled","_jsxs","_Fragment","Skeleton","width","height","Text","cloneElement","Icon","preset","name","undefined","isValidElement","alt","displayName","sizes","SIZES"],"mappings":"iVAuBA,MAAMA,SAA2DC,gBAAAA,gBAC/DC,MAAAA,WAAoD,CAACC,EAAOC,KAC1D,MAAMC,KACJA,EAAO,IAAGC,aACVA,EAAe,EAACC,kBAChBA,EAAoB,MAAKC,gBACzBA,EAAkB,OAAMC,gBACxBA,EAAkB,SAAQC,SAC1BA,GAAW,EAAIC,UACfA,EAAY,CAAA,EAAEC,UACdA,EAAY,CAAA,EAAEC,aACdA,EAAe,CAAA,EAAEC,QACjBA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,KACNA,EAAIC,SACJA,EAAQC,QACRA,EAAOC,KACPA,EAAIC,MACJA,EAAKC,QACLA,EAAOC,MACPA,EAAKC,UACLA,EAASC,SACTA,EAAQC,QACRA,KACGC,GACD3B,EAEJ,IAAI4B,EAMJ,IAAIC,EAJAV,IAASS,EAAW,SACpBD,EAAUG,OAAMF,EAAW,KAC3BD,EAAUI,KAAIH,EAAWD,EAAUI,IAIlCH,IAAUC,EAAW,UACtBF,EAAUK,OAAMH,EAAWF,EAAUK,MAEzC,MAAMC,EAAY,CAChB/B,OACAS,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMkB,EAAa,CACjBV,YACAC,YAGF,MAAMU,SACGhB,GAAY,iBAAmBA,EAAQnB,OAAU,UAAYmB,EAAQnB,QAAU,KAAOmB,EAAQnB,MAAQ,CAAA,EAE/G,MAAOoC,EAAQC,GAASC,MAAMC,QAAQnB,GAAQA,EAAO,CAACA,GAEtD,MAAMoB,EAA2B,CAAEC,WAAY,OAAQvC,KAAM,UAAWwC,MAAO,UAAWnC,YAE1F,MAAMoC,EAA8B,CAAEF,WAAY,OAAQvC,KAAM,GAAK0C,UAAW,KAAMF,MAAO,UAAWnC,YAExG,OACEsC,WAAAA,IAACC,MAAAA,KAAW,IACNb,KACAC,KACAP,EACJI,GAAIH,EACJI,KAAMH,EACN1B,aAAcA,EACdC,kBAAmBA,EACnBH,IAAKA,EAAIiB,gBAEDA,GAAa,WACnBA,EAAS,CACPT,UAAW+B,EACX9B,aAAciC,IAGhBI,WAAAA,KAAAC,oBADEtB,EACF,CAAAR,UACGG,EACCwB,WAAAA,IAACC,YAAY,CAAA5B,SACX2B,WAAAA,IAACI,kBAAQ,CAACC,MAAM,OAAOC,OAAO,OAAOhD,aAAa,cAElD,KACJ0C,WAAAA,IAACC,cAAc,CAAA5B,SACb2B,WAAAA,IAACI,kBAAQ,CAACC,MAAM,OAAO/C,aAAc,EAAEe,SACrC2B,WAAAA,IAACO,UAAI,IAAKZ,KAAmB/B,UAKnC,CAAAS,SAAA,CACGC,GAAWd,IAAoB,cACrBc,GAAY,WACjBA,EAAQ,IAAKc,KAAcC,IAC3BmB,MAAAA,aAAalC,EAAS,IAAKc,KAAcC,KAAeC,IAC1D,KACHC,EACCS,WAAAA,IAACS,KAAAA,KAAI,CACHC,OAAO,QACPC,YAAapB,GAAW,SAAWA,OAASqB,EAC5CrC,YAAagB,GAAW,SAAWA,OAASqB,KACxCjD,IAEJ,KACHa,EACCwB,WAAAA,IAACC,MAAAA,MAAY,CAAA5B,SAAEwC,MAAAA,eAAerC,GAASA,EAAQwB,WAAAA,IAACC,MAAAA,IAAU,CAACa,IAAI,MAAOtC,MACpE,KACHH,GAAYD,GAAQK,EACnByB,WAAAA,KAACD,cAAc,CAAA5B,SAAA,CACZI,GAAWhB,IAAoB,MAC9BuC,WAAAA,IAACO,KAAAA,KAAI,CAACrB,GAAG,UAAWY,KAAsBjC,EAAYQ,SACnDI,IAED,KACHJ,GAAYD,EACX4B,WAAAA,IAACO,KAAAA,KAAI,CAACrB,GAAG,UAAWS,KAAmB/B,EAASS,SAC7CA,GAAYD,IAEb,KACHK,GAAWhB,IAAoB,SAC9BuC,WAAAA,IAACO,UAAI,CAACrB,GAAG,UAAWY,KAAsBjC,EAAYQ,SACnDI,IAED,QAEJ,KACHC,EACAc,EACCQ,WAAAA,IAACS,KAAAA,KAAI,CACHC,OAAO,QACPC,YAAanB,GAAU,SAAWA,OAAQoB,EAC1CrC,YAAaiB,GAAU,SAAWA,OAAQoB,KACtCjD,IAEJ,KACHW,GAAWd,IAAoB,eACrBc,GAAY,WACjBA,EAAQ,IAAKc,KAAcC,IAC3BmB,MAAAA,aAAalC,EAAS,IAAKc,KAAcC,KAAeC,IAC1D,YAMd,CACEyB,YApKmB,WAqKnBC,MAAOC,UAAAA"}
1
+ {"version":3,"file":"ListItem.js","sources":["../../../../src/components/ListItem/ListItem.tsx"],"sourcesContent":["import { ChevronRight } from '@foxford/icon-pack'\nimport { isNil } from 'shared/utils/isNil'\nimport { useMergedProps } from 'hooks/useMergedProps'\nimport { Slot } from 'components/Slot'\nimport { Icon } from 'components/Icon'\nimport { Skeleton } from 'components/Skeleton'\nimport { Text } from 'components/Text'\nimport { createPolymorphicComponentWithRef } from 'shared/utils/createPolymorphicComponentWithRef'\nimport type { TextProps } from 'components/Text'\nimport type { SkeletonProps } from 'components/Skeleton'\nimport type { PolymorphicProps } from 'shared/interfaces'\nimport { SIZES, SIZES_TEXT, SIZES_CAPTION } from './sizes'\nimport * as Styled from './style'\nimport type { ListItemProps } from './types'\n\nconst COMPONENT_NAME = 'ListItem'\n\n/**\n *\n * *v1.0.0*\n *\n * Компонент для вывода элемента списка.\n *\n * Полиморфный компонент.\n *\n * Можно передать \"ref\" и атрибуты выбранного HTML-элемента (по умолчанию \\<button\\>).\n */\nconst ListItem = createPolymorphicComponentWithRef<'button', ListItemProps>((props, ref) => {\n const {\n component = 'button',\n size = 's',\n borderRadius = 0,\n withChevron,\n children,\n content,\n text,\n caption,\n addonLeft,\n addonRight,\n loadingLayout,\n loading,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...restProps\n } = useMergedProps<PolymorphicProps<React.ElementType, ListItemProps>>(props, {\n componentName: COMPONENT_NAME,\n sizes: SIZES,\n })\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const textProps: TextProps = {\n ...sizeProps,\n sizes: SIZES_TEXT,\n appearance: 'body',\n color: 'inherit',\n ellipsis: true,\n textAlign: 'start',\n }\n\n const captionProps: TextProps = {\n ...sizeProps,\n sizes: SIZES_CAPTION,\n appearance: 'body',\n color: 'inherit',\n ellipsis: true,\n textAlign: 'start',\n }\n\n const skeletonProps: SkeletonProps = {\n width: '65%',\n borderRadius: 4,\n onColored: restProps.contrast && !restProps.active,\n }\n\n return (\n <Styled.Root\n {...restProps}\n {...sizeProps}\n as={component}\n type={restProps.type ?? (component === 'button' ? 'button' : undefined)}\n borderRadius={borderRadius}\n loading={loading}\n ref={ref}\n >\n <Slot\n render={children}\n props={{\n textProps,\n captionProps,\n skeletonProps,\n }}\n fallback={\n loading ? (\n <Slot\n render={loadingLayout}\n props={{\n textProps,\n captionProps,\n skeletonProps,\n }}\n fallback={\n <Skeleton {...skeletonProps}>\n <Text {...textProps} />\n </Skeleton>\n }\n />\n ) : (\n <>\n <Slot render={addonLeft} />\n {!isNil(content) || !isNil(text) || !isNil(caption) ? (\n <Styled.Content>\n <Slot\n render={content}\n props={{\n textProps,\n captionProps,\n }}\n fallback={\n <>\n <Slot render={text} props={textProps} />\n <Slot render={caption} props={captionProps} />\n </>\n }\n />\n </Styled.Content>\n ) : null}\n <Slot render={addonRight} />\n {withChevron ? <Icon icon={<ChevronRight />} size={24} color='inherit' /> : null}\n </>\n )\n }\n />\n </Styled.Root>\n )\n})\n\nconst ListItemDoc: React.FC<ListItemProps> = () => null\n\nexport { ListItemDoc, ListItem }\n"],"names":["ListItem","createPolymorphicComponentWithRef","props","ref","component","size","borderRadius","withChevron","children","content","text","caption","addonLeft","addonRight","loadingLayout","loading","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","restProps","useMergedProps","componentName","sizes","SIZES","sizeProps","textProps","SIZES_TEXT","appearance","color","ellipsis","textAlign","captionProps","SIZES_CAPTION","skeletonProps","width","onColored","contrast","active","_jsx","Styled","as","type","undefined","Slot","render","fallback","Skeleton","Text","_jsxs","_Fragment","isNil","Icon","icon","ChevronRight"],"mappings":"gjBA2BA,MAAMA,SAAWC,kCAAAA,kCAA2D,CAACC,EAAOC,KAClF,MAAMC,UACJA,EAAY,SAAQC,KACpBA,EAAO,IAAGC,aACVA,EAAe,EAACC,YAChBA,EAAWC,SACXA,EAAQC,QACRA,EAAOC,KACPA,EAAIC,QACJA,EAAOC,UACPA,EAASC,WACTA,EAAUC,cACVA,EAAaC,QACbA,EAAOC,QACPA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,KACGC,GACDC,eAAAA,eAAmErB,EAAO,CAC5EsB,cAlCmB,WAmCnBC,MAAOC,MAAAA,QAGT,MAAMC,EAAY,CAChBtB,OACAW,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMO,EAAuB,IACxBD,EACHF,MAAOI,MAAAA,WACPC,WAAY,OACZC,MAAO,UACPC,UAAU,EACVC,UAAW,SAGb,MAAMC,EAA0B,IAC3BP,EACHF,MAAOU,MAAAA,cACPL,WAAY,OACZC,MAAO,UACPC,UAAU,EACVC,UAAW,SAGb,MAAMG,EAA+B,CACnCC,MAAO,MACP/B,aAAc,EACdgC,UAAWhB,EAAUiB,WAAajB,EAAUkB,QAG9C,OACEC,WAAAA,IAACC,MAAAA,KAAW,IACNpB,KACAK,EACJgB,GAAIvC,EACJwC,KAAMtB,EAAUsB,OAASxC,IAAc,SAAW,cAAWyC,GAC7DvC,aAAcA,EACdS,QAASA,EACTZ,IAAKA,EAAIK,SAETiC,WAAAA,IAACK,UAAI,CACHC,OAAQvC,EACRN,MAAO,CACL0B,YACAM,eACAE,iBAEFY,SACEjC,EACE0B,WAAAA,IAACK,UAAI,CACHC,OAAQjC,EACRZ,MAAO,CACL0B,YACAM,eACAE,iBAEFY,SACEP,WAAAA,IAACQ,kBAAQ,IAAKb,EAAa5B,SACzBiC,WAAAA,IAACS,UAAI,IAAKtB,QAKhBuB,WAAAA,KAAAC,oBAAA,CAAA5C,SAAA,CACEiC,WAAAA,IAACK,UAAI,CAACC,OAAQnC,IACZyC,MAAAA,MAAM5C,IAAa4C,MAAAA,MAAM3C,IAAU2C,MAAAA,MAAM1C,GAgBvC,KAfF8B,WAAAA,IAACC,MAAAA,QAAc,CAAAlC,SACbiC,WAAAA,IAACK,UAAI,CACHC,OAAQtC,EACRP,MAAO,CACL0B,YACAM,gBAEFc,SACEG,WAAAA,KAAAC,oBAAA,CAAA5C,SAAA,CACEiC,WAAAA,IAACK,UAAI,CAACC,OAAQrC,EAAMR,MAAO0B,IAC3Ba,WAAAA,IAACK,UAAI,CAACC,OAAQpC,EAAST,MAAOgC,WAMxCO,WAAAA,IAACK,UAAI,CAACC,OAAQlC,IACbN,EAAckC,WAAAA,IAACa,UAAI,CAACC,KAAMd,WAAAA,IAACe,MAAAA,iBAAiBnD,KAAM,GAAI0B,MAAM,YAAe"}
@@ -1,2 +1,2 @@
1
- import{forwardRef,cloneElement,isValidElement}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{SIZES}from'./constants.mjs';import{Root,Media,Content,Img}from'./style.mjs';import{jsx,jsxs,Fragment}from'react/jsx-runtime';import{Skeleton}from'../Skeleton/Skeleton.mjs';import{Text}from'../Text/Text.mjs';import{Icon}from'../Icon/Icon.mjs';const ListItem=withMergedProps(forwardRef((e,o)=>{const{size:t="s",borderRadius:s=0,mediaBorderRadius:i="50%",controlPosition:n="left",captionPosition:r="bottom",ellipsis:l=!0,iconProps:d={},textProps:a={},captionProps:p={},sizeXXS:c,sizeXS:m,sizeS:x,sizeM:f,sizeL:h,sizeXL:j,text:u,children:y,control:z,icon:b,media:S,caption:g,addon:I,onColored:P,disabled:R,loading:M,...X}=e;let w;let E;z&&(w='label'),X.href&&(w='a'),X.as&&(w=X.as),w||(E='button'),X.type&&(E=X.type);const L={size:t,sizeXXS:c,sizeXS:m,sizeS:x,sizeM:f,sizeL:h,sizeXL:j};const T={onColored:P,disabled:R};const k=typeof z=='object'&&typeof z.props=='object'&&z.props!==null?z.props:{};const[C,v]=Array.isArray(b)?b:[b];const A={appearance:'body',size:'inherit',color:'inherit',ellipsis:l};const B={appearance:'body',size:.9,sizeUnits:'em',color:'inherit',ellipsis:l};return jsx(Root,{...L,...T,...X,as:w,type:E,borderRadius:s,mediaBorderRadius:i,ref:o,children:typeof y=='function'?y({textProps:A,captionProps:B}):jsxs(Fragment,M?{children:[S?jsx(Media,{children:jsx(Skeleton,{width:"100%",height:"100%",borderRadius:"inherit"})}):null,jsx(Content,{children:jsx(Skeleton,{width:"100%",borderRadius:4,children:jsx(Text,{...A,...a})})})]}:{children:[z&&n==='left'?typeof z=='function'?z({...L,...T}):cloneElement(z,{...L,...T,...k}):null,C?jsx(Icon,{preset:"brand",name:typeof C=='string'?C:void 0,icon:typeof C!='string'?C:void 0,...d}):null,S?jsx(Media,{children:isValidElement(S)?S:jsx(Img,{alt:"",...S})}):null,y||u||g?jsxs(Content,{children:[g&&r==='top'?jsx(Text,{as:"span",...B,...p,children:g}):null,y||u?jsx(Text,{as:"span",...A,...a,children:y??u}):null,g&&r==='bottom'?jsx(Text,{as:"span",...B,...p,children:g}):null]}):null,I,v?jsx(Icon,{preset:"brand",name:typeof v=='string'?v:void 0,icon:typeof v!='string'?v:void 0,...d}):null,z&&n==='right'?typeof z=='function'?z({...L,...T}):cloneElement(z,{...L,...T,...k}):null]})})}),{displayName:'ListItem',sizes:SIZES});export{ListItem};
1
+ import{isNil}from'../../shared/utils/isNil.mjs';import{useMergedProps}from'../../hooks/useMergedProps.mjs';import{createPolymorphicComponentWithRef}from'../../shared/utils/createPolymorphicComponentWithRef.mjs';import{SIZES,SIZES_CAPTION,SIZES_TEXT}from'./sizes.mjs';import{Root,Content}from'./style.mjs';import{jsx,jsxs,Fragment}from'react/jsx-runtime';import{Slot}from'../Slot/Slot.mjs';import{Skeleton}from'../Skeleton/Skeleton.mjs';import{Text}from'../Text/Text.mjs';import{Icon}from'../Icon/Icon.mjs';import{ChevronRight}from'../../icon-pack/src/icons/ChevronRight/index.mjs';const ListItem=createPolymorphicComponentWithRef((o,e)=>{const{component:t="button",size:s="s",borderRadius:r=0,withChevron:i,children:n,content:l,text:p,caption:m,addonLeft:c,addonRight:a,loadingLayout:d,loading:S,sizeXXS:x,sizeXS:h,sizeS:j,sizeM:f,sizeL:z,sizeXL:u,...P}=useMergedProps(o,{componentName:"ListItem",sizes:SIZES});const g={size:s,sizeXXS:x,sizeXS:h,sizeS:j,sizeM:f,sizeL:z,sizeXL:u};const I={...g,sizes:SIZES_TEXT,appearance:'body',color:'inherit',ellipsis:!0,textAlign:'start'};const C={...g,sizes:SIZES_CAPTION,appearance:'body',color:'inherit',ellipsis:!0,textAlign:'start'};const R={width:'65%',borderRadius:4,onColored:P.contrast&&!P.active};return jsx(Root,{...P,...g,as:t,type:P.type??(t==='button'?'button':void 0),borderRadius:r,loading:S,ref:e,children:jsx(Slot,{render:n,props:{textProps:I,captionProps:C,skeletonProps:R},fallback:S?jsx(Slot,{render:d,props:{textProps:I,captionProps:C,skeletonProps:R},fallback:jsx(Skeleton,{...R,children:jsx(Text,{...I})})}):jsxs(Fragment,{children:[jsx(Slot,{render:c}),isNil(l)&&isNil(p)&&isNil(m)?null:jsx(Content,{children:jsx(Slot,{render:l,props:{textProps:I,captionProps:C},fallback:jsxs(Fragment,{children:[jsx(Slot,{render:p,props:I}),jsx(Slot,{render:m,props:C})]})})}),jsx(Slot,{render:a}),i?jsx(Icon,{icon:jsx(ChevronRight,{}),size:24,color:"inherit"}):null]})})})});export{ListItem};
2
2
  //# sourceMappingURL=ListItem.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.mjs","sources":["../../../../src/components/ListItem/ListItem.tsx"],"sourcesContent":["import { forwardRef, cloneElement, isValidElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Skeleton } from 'components/Skeleton'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { ListItemProps } from './types'\n\nconst COMPONENT_NAME = 'ListItem'\n\n/**\n *\n * Component accepts all root HTML attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ListItemProps](https://github.com/foxford/ui/blob/master/packages/ui/src/components/ListItem/types.ts)\n */\nconst ListItem: React.ForwardRefExoticComponent<ListItemProps> = withMergedProps<ListItemProps>(\n forwardRef<HTMLElement, MergedProps<ListItemProps>>((props, ref) => {\n const {\n size = 's',\n borderRadius = 0,\n mediaBorderRadius = '50%',\n controlPosition = 'left',\n captionPosition = 'bottom',\n ellipsis = true,\n iconProps = {},\n textProps = {},\n captionProps = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n text,\n children,\n control,\n icon,\n media,\n caption,\n addon,\n onColored,\n disabled,\n loading,\n ...restProps\n } = props\n\n let rootNode: ListItemProps['as']\n\n if (control) rootNode = 'label'\n if (restProps.href) rootNode = 'a'\n if (restProps.as) rootNode = restProps.as\n\n let rootType: ListItemProps['type']\n\n if (!rootNode) rootType = 'button'\n if (restProps.type) rootType = restProps.type\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const stateProps = {\n onColored,\n disabled,\n }\n\n const controlProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const textBaseProps: TextProps = { appearance: 'body', size: 'inherit', color: 'inherit', ellipsis }\n\n const captionBaseProps: TextProps = { appearance: 'body', size: 0.9, sizeUnits: 'em', color: 'inherit', ellipsis }\n\n return (\n <Styled.Root\n {...sizeProps}\n {...stateProps}\n {...restProps}\n as={rootNode}\n type={rootType}\n borderRadius={borderRadius}\n mediaBorderRadius={mediaBorderRadius}\n ref={ref}\n >\n {typeof children === 'function' ? (\n children({\n textProps: textBaseProps,\n captionProps: captionBaseProps,\n })\n ) : loading ? (\n <>\n {media ? (\n <Styled.Media>\n <Skeleton width='100%' height='100%' borderRadius='inherit' />\n </Styled.Media>\n ) : null}\n <Styled.Content>\n <Skeleton width='100%' borderRadius={4}>\n <Text {...textBaseProps} {...textProps} />\n </Skeleton>\n </Styled.Content>\n </>\n ) : (\n <>\n {control && controlPosition === 'left'\n ? typeof control === 'function'\n ? control({ ...sizeProps, ...stateProps })\n : cloneElement(control, { ...sizeProps, ...stateProps, ...controlProps })\n : null}\n {before ? (\n <Icon\n preset='brand'\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconProps}\n />\n ) : null}\n {media ? (\n <Styled.Media>{isValidElement(media) ? media : <Styled.Img alt='' {...media} />}</Styled.Media>\n ) : null}\n {children || text || caption ? (\n <Styled.Content>\n {caption && captionPosition === 'top' ? (\n <Text as='span' {...captionBaseProps} {...captionProps}>\n {caption}\n </Text>\n ) : null}\n {children || text ? (\n <Text as='span' {...textBaseProps} {...textProps}>\n {children ?? text}\n </Text>\n ) : null}\n {caption && captionPosition === 'bottom' ? (\n <Text as='span' {...captionBaseProps} {...captionProps}>\n {caption}\n </Text>\n ) : null}\n </Styled.Content>\n ) : null}\n {addon}\n {after ? (\n <Icon\n preset='brand'\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconProps}\n />\n ) : null}\n {control && controlPosition === 'right'\n ? typeof control === 'function'\n ? control({ ...sizeProps, ...stateProps })\n : cloneElement(control, { ...sizeProps, ...stateProps, ...controlProps })\n : null}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ListItem }\n"],"names":["ListItem","withMergedProps","forwardRef","props","ref","size","borderRadius","mediaBorderRadius","controlPosition","captionPosition","ellipsis","iconProps","textProps","captionProps","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","text","children","control","icon","media","caption","addon","onColored","disabled","loading","restProps","rootNode","rootType","href","as","type","sizeProps","stateProps","controlProps","before","after","Array","isArray","textBaseProps","appearance","color","captionBaseProps","sizeUnits","_jsx","Styled","_jsxs","_Fragment","Skeleton","width","height","Text","cloneElement","Icon","preset","name","undefined","isValidElement","alt","displayName","sizes","SIZES"],"mappings":"+WAuBA,MAAMA,SAA2DC,gBAC/DC,WAAoD,CAACC,EAAOC,KAC1D,MAAMC,KACJA,EAAO,IAAGC,aACVA,EAAe,EAACC,kBAChBA,EAAoB,MAAKC,gBACzBA,EAAkB,OAAMC,gBACxBA,EAAkB,SAAQC,SAC1BA,GAAW,EAAIC,UACfA,EAAY,CAAA,EAAEC,UACdA,EAAY,CAAA,EAAEC,aACdA,EAAe,CAAA,EAAEC,QACjBA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,KACNA,EAAIC,SACJA,EAAQC,QACRA,EAAOC,KACPA,EAAIC,MACJA,EAAKC,QACLA,EAAOC,MACPA,EAAKC,UACLA,EAASC,SACTA,EAAQC,QACRA,KACGC,GACD3B,EAEJ,IAAI4B,EAMJ,IAAIC,EAJAV,IAASS,EAAW,SACpBD,EAAUG,OAAMF,EAAW,KAC3BD,EAAUI,KAAIH,EAAWD,EAAUI,IAIlCH,IAAUC,EAAW,UACtBF,EAAUK,OAAMH,EAAWF,EAAUK,MAEzC,MAAMC,EAAY,CAChB/B,OACAS,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMkB,EAAa,CACjBV,YACAC,YAGF,MAAMU,SACGhB,GAAY,iBAAmBA,EAAQnB,OAAU,UAAYmB,EAAQnB,QAAU,KAAOmB,EAAQnB,MAAQ,CAAA,EAE/G,MAAOoC,EAAQC,GAASC,MAAMC,QAAQnB,GAAQA,EAAO,CAACA,GAEtD,MAAMoB,EAA2B,CAAEC,WAAY,OAAQvC,KAAM,UAAWwC,MAAO,UAAWnC,YAE1F,MAAMoC,EAA8B,CAAEF,WAAY,OAAQvC,KAAM,GAAK0C,UAAW,KAAMF,MAAO,UAAWnC,YAExG,OACEsC,IAACC,KAAW,IACNb,KACAC,KACAP,EACJI,GAAIH,EACJI,KAAMH,EACN1B,aAAcA,EACdC,kBAAmBA,EACnBH,IAAKA,EAAIiB,gBAEDA,GAAa,WACnBA,EAAS,CACPT,UAAW+B,EACX9B,aAAciC,IAGhBI,KAAAC,SADEtB,EACF,CAAAR,UACGG,EACCwB,IAACC,MAAY,CAAA5B,SACX2B,IAACI,SAAQ,CAACC,MAAM,OAAOC,OAAO,OAAOhD,aAAa,cAElD,KACJ0C,IAACC,QAAc,CAAA5B,SACb2B,IAACI,SAAQ,CAACC,MAAM,OAAO/C,aAAc,EAAEe,SACrC2B,IAACO,KAAI,IAAKZ,KAAmB/B,UAKnC,CAAAS,SAAA,CACGC,GAAWd,IAAoB,cACrBc,GAAY,WACjBA,EAAQ,IAAKc,KAAcC,IAC3BmB,aAAalC,EAAS,IAAKc,KAAcC,KAAeC,IAC1D,KACHC,EACCS,IAACS,KAAI,CACHC,OAAO,QACPC,YAAapB,GAAW,SAAWA,OAASqB,EAC5CrC,YAAagB,GAAW,SAAWA,OAASqB,KACxCjD,IAEJ,KACHa,EACCwB,IAACC,MAAY,CAAA5B,SAAEwC,eAAerC,GAASA,EAAQwB,IAACC,IAAU,CAACa,IAAI,MAAOtC,MACpE,KACHH,GAAYD,GAAQK,EACnByB,KAACD,QAAc,CAAA5B,SAAA,CACZI,GAAWhB,IAAoB,MAC9BuC,IAACO,KAAI,CAACrB,GAAG,UAAWY,KAAsBjC,EAAYQ,SACnDI,IAED,KACHJ,GAAYD,EACX4B,IAACO,KAAI,CAACrB,GAAG,UAAWS,KAAmB/B,EAASS,SAC7CA,GAAYD,IAEb,KACHK,GAAWhB,IAAoB,SAC9BuC,IAACO,KAAI,CAACrB,GAAG,UAAWY,KAAsBjC,EAAYQ,SACnDI,IAED,QAEJ,KACHC,EACAc,EACCQ,IAACS,KAAI,CACHC,OAAO,QACPC,YAAanB,GAAU,SAAWA,OAAQoB,EAC1CrC,YAAaiB,GAAU,SAAWA,OAAQoB,KACtCjD,IAEJ,KACHW,GAAWd,IAAoB,eACrBc,GAAY,WACjBA,EAAQ,IAAKc,KAAcC,IAC3BmB,aAAalC,EAAS,IAAKc,KAAcC,KAAeC,IAC1D,YAMd,CACEyB,YApKmB,WAqKnBC,MAAOC"}
1
+ {"version":3,"file":"ListItem.mjs","sources":["../../../../src/components/ListItem/ListItem.tsx"],"sourcesContent":["import { ChevronRight } from '@foxford/icon-pack'\nimport { isNil } from 'shared/utils/isNil'\nimport { useMergedProps } from 'hooks/useMergedProps'\nimport { Slot } from 'components/Slot'\nimport { Icon } from 'components/Icon'\nimport { Skeleton } from 'components/Skeleton'\nimport { Text } from 'components/Text'\nimport { createPolymorphicComponentWithRef } from 'shared/utils/createPolymorphicComponentWithRef'\nimport type { TextProps } from 'components/Text'\nimport type { SkeletonProps } from 'components/Skeleton'\nimport type { PolymorphicProps } from 'shared/interfaces'\nimport { SIZES, SIZES_TEXT, SIZES_CAPTION } from './sizes'\nimport * as Styled from './style'\nimport type { ListItemProps } from './types'\n\nconst COMPONENT_NAME = 'ListItem'\n\n/**\n *\n * *v1.0.0*\n *\n * Компонент для вывода элемента списка.\n *\n * Полиморфный компонент.\n *\n * Можно передать \"ref\" и атрибуты выбранного HTML-элемента (по умолчанию \\<button\\>).\n */\nconst ListItem = createPolymorphicComponentWithRef<'button', ListItemProps>((props, ref) => {\n const {\n component = 'button',\n size = 's',\n borderRadius = 0,\n withChevron,\n children,\n content,\n text,\n caption,\n addonLeft,\n addonRight,\n loadingLayout,\n loading,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n ...restProps\n } = useMergedProps<PolymorphicProps<React.ElementType, ListItemProps>>(props, {\n componentName: COMPONENT_NAME,\n sizes: SIZES,\n })\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const textProps: TextProps = {\n ...sizeProps,\n sizes: SIZES_TEXT,\n appearance: 'body',\n color: 'inherit',\n ellipsis: true,\n textAlign: 'start',\n }\n\n const captionProps: TextProps = {\n ...sizeProps,\n sizes: SIZES_CAPTION,\n appearance: 'body',\n color: 'inherit',\n ellipsis: true,\n textAlign: 'start',\n }\n\n const skeletonProps: SkeletonProps = {\n width: '65%',\n borderRadius: 4,\n onColored: restProps.contrast && !restProps.active,\n }\n\n return (\n <Styled.Root\n {...restProps}\n {...sizeProps}\n as={component}\n type={restProps.type ?? (component === 'button' ? 'button' : undefined)}\n borderRadius={borderRadius}\n loading={loading}\n ref={ref}\n >\n <Slot\n render={children}\n props={{\n textProps,\n captionProps,\n skeletonProps,\n }}\n fallback={\n loading ? (\n <Slot\n render={loadingLayout}\n props={{\n textProps,\n captionProps,\n skeletonProps,\n }}\n fallback={\n <Skeleton {...skeletonProps}>\n <Text {...textProps} />\n </Skeleton>\n }\n />\n ) : (\n <>\n <Slot render={addonLeft} />\n {!isNil(content) || !isNil(text) || !isNil(caption) ? (\n <Styled.Content>\n <Slot\n render={content}\n props={{\n textProps,\n captionProps,\n }}\n fallback={\n <>\n <Slot render={text} props={textProps} />\n <Slot render={caption} props={captionProps} />\n </>\n }\n />\n </Styled.Content>\n ) : null}\n <Slot render={addonRight} />\n {withChevron ? <Icon icon={<ChevronRight />} size={24} color='inherit' /> : null}\n </>\n )\n }\n />\n </Styled.Root>\n )\n})\n\nconst ListItemDoc: React.FC<ListItemProps> = () => null\n\nexport { ListItemDoc, ListItem }\n"],"names":["ListItem","createPolymorphicComponentWithRef","props","ref","component","size","borderRadius","withChevron","children","content","text","caption","addonLeft","addonRight","loadingLayout","loading","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","restProps","useMergedProps","componentName","sizes","SIZES","sizeProps","textProps","SIZES_TEXT","appearance","color","ellipsis","textAlign","captionProps","SIZES_CAPTION","skeletonProps","width","onColored","contrast","active","_jsx","Styled","as","type","undefined","Slot","render","fallback","Skeleton","Text","_jsxs","_Fragment","isNil","Icon","icon","ChevronRight"],"mappings":"qkBA2BA,MAAMA,SAAWC,kCAA2D,CAACC,EAAOC,KAClF,MAAMC,UACJA,EAAY,SAAQC,KACpBA,EAAO,IAAGC,aACVA,EAAe,EAACC,YAChBA,EAAWC,SACXA,EAAQC,QACRA,EAAOC,KACPA,EAAIC,QACJA,EAAOC,UACPA,EAASC,WACTA,EAAUC,cACVA,EAAaC,QACbA,EAAOC,QACPA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,KACGC,GACDC,eAAmErB,EAAO,CAC5EsB,cAlCmB,WAmCnBC,MAAOC,QAGT,MAAMC,EAAY,CAChBtB,OACAW,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMO,EAAuB,IACxBD,EACHF,MAAOI,WACPC,WAAY,OACZC,MAAO,UACPC,UAAU,EACVC,UAAW,SAGb,MAAMC,EAA0B,IAC3BP,EACHF,MAAOU,cACPL,WAAY,OACZC,MAAO,UACPC,UAAU,EACVC,UAAW,SAGb,MAAMG,EAA+B,CACnCC,MAAO,MACP/B,aAAc,EACdgC,UAAWhB,EAAUiB,WAAajB,EAAUkB,QAG9C,OACEC,IAACC,KAAW,IACNpB,KACAK,EACJgB,GAAIvC,EACJwC,KAAMtB,EAAUsB,OAASxC,IAAc,SAAW,cAAWyC,GAC7DvC,aAAcA,EACdS,QAASA,EACTZ,IAAKA,EAAIK,SAETiC,IAACK,KAAI,CACHC,OAAQvC,EACRN,MAAO,CACL0B,YACAM,eACAE,iBAEFY,SACEjC,EACE0B,IAACK,KAAI,CACHC,OAAQjC,EACRZ,MAAO,CACL0B,YACAM,eACAE,iBAEFY,SACEP,IAACQ,SAAQ,IAAKb,EAAa5B,SACzBiC,IAACS,KAAI,IAAKtB,QAKhBuB,KAAAC,SAAA,CAAA5C,SAAA,CACEiC,IAACK,KAAI,CAACC,OAAQnC,IACZyC,MAAM5C,IAAa4C,MAAM3C,IAAU2C,MAAM1C,GAgBvC,KAfF8B,IAACC,QAAc,CAAAlC,SACbiC,IAACK,KAAI,CACHC,OAAQtC,EACRP,MAAO,CACL0B,YACAM,gBAEFc,SACEG,KAAAC,SAAA,CAAA5C,SAAA,CACEiC,IAACK,KAAI,CAACC,OAAQrC,EAAMR,MAAO0B,IAC3Ba,IAACK,KAAI,CAACC,OAAQpC,EAAST,MAAOgC,WAMxCO,IAACK,KAAI,CAACC,OAAQlC,IACbN,EAAckC,IAACa,KAAI,CAACC,KAAMd,IAACe,iBAAiBnD,KAAM,GAAI0B,MAAM,YAAe"}
@@ -0,0 +1,2 @@
1
+ 'use strict';exports.SIZES={xl:{paddingTop:16,paddingRight:20,paddingBottom:16,paddingLeft:20,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},l:{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},m:{paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},s:{paddingTop:6,paddingRight:10,paddingBottom:6,paddingLeft:10,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},xs:{paddingTop:6,paddingRight:10,paddingBottom:6,paddingLeft:10,width:'100%',minWidth:'min-content','--list-item-gap':'12px'}},exports.SIZES_CAPTION={xl:{fontSize:16},l:{fontSize:16},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:16}},exports.SIZES_TEXT={xl:{fontSize:18},l:{fontSize:18},m:{fontSize:18},s:{fontSize:18},xs:{fontSize:18}};
2
+ //# sourceMappingURL=sizes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sizes.js","sources":["../../../../src/components/ListItem/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from './types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xl: {\n paddingTop: 16,\n paddingRight: 20,\n paddingBottom: 16,\n paddingLeft: 20,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n l: {\n paddingTop: 10,\n paddingRight: 16,\n paddingBottom: 10,\n paddingLeft: 16,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n m: {\n paddingTop: 8,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n s: {\n paddingTop: 6,\n paddingRight: 10,\n paddingBottom: 6,\n paddingLeft: 10,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n xs: {\n paddingTop: 6,\n paddingRight: 10,\n paddingBottom: 6,\n paddingLeft: 10,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n}\n\nexport const SIZES_TEXT: Record<Size, CSSProperties> = {\n xl: { fontSize: 18 },\n l: { fontSize: 18 },\n m: { fontSize: 18 },\n s: { fontSize: 18 },\n xs: { fontSize: 18 },\n}\n\nexport const SIZES_CAPTION: Record<Size, CSSProperties> = {\n xl: { fontSize: 16 },\n l: { fontSize: 16 },\n m: { fontSize: 16 },\n s: { fontSize: 16 },\n xs: { fontSize: 16 },\n}\n"],"names":["xl","paddingTop","paddingRight","paddingBottom","paddingLeft","width","minWidth","l","m","s","xs","fontSize"],"mappings":"2BAGkD,CAChDA,GAAI,CACFC,WAAY,GACZC,aAAc,GACdC,cAAe,GACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBC,EAAG,CACDN,WAAY,GACZC,aAAc,GACdC,cAAe,GACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBE,EAAG,CACDP,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBG,EAAG,CACDR,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBI,GAAI,CACFT,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,+BAYmC,CACxDN,GAAI,CAAEW,SAAU,IAChBJ,EAAG,CAAEI,SAAU,IACfH,EAAG,CAAEG,SAAU,IACfF,EAAG,CAAEE,SAAU,IACfD,GAAI,CAAEC,SAAU,wBAbqC,CACrDX,GAAI,CAAEW,SAAU,IAChBJ,EAAG,CAAEI,SAAU,IACfH,EAAG,CAAEG,SAAU,IACfF,EAAG,CAAEE,SAAU,IACfD,GAAI,CAAEC,SAAU"}
@@ -0,0 +1,2 @@
1
+ const SIZES={xl:{paddingTop:16,paddingRight:20,paddingBottom:16,paddingLeft:20,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},l:{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},m:{paddingTop:8,paddingRight:12,paddingBottom:8,paddingLeft:12,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},s:{paddingTop:6,paddingRight:10,paddingBottom:6,paddingLeft:10,width:'100%',minWidth:'min-content','--list-item-gap':'12px'},xs:{paddingTop:6,paddingRight:10,paddingBottom:6,paddingLeft:10,width:'100%',minWidth:'min-content','--list-item-gap':'12px'}};const SIZES_TEXT={xl:{fontSize:18},l:{fontSize:18},m:{fontSize:18},s:{fontSize:18},xs:{fontSize:18}};const SIZES_CAPTION={xl:{fontSize:16},l:{fontSize:16},m:{fontSize:16},s:{fontSize:16},xs:{fontSize:16}};export{SIZES,SIZES_CAPTION,SIZES_TEXT};
2
+ //# sourceMappingURL=sizes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sizes.mjs","sources":["../../../../src/components/ListItem/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { Size } from './types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xl: {\n paddingTop: 16,\n paddingRight: 20,\n paddingBottom: 16,\n paddingLeft: 20,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n l: {\n paddingTop: 10,\n paddingRight: 16,\n paddingBottom: 10,\n paddingLeft: 16,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n m: {\n paddingTop: 8,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n s: {\n paddingTop: 6,\n paddingRight: 10,\n paddingBottom: 6,\n paddingLeft: 10,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n xs: {\n paddingTop: 6,\n paddingRight: 10,\n paddingBottom: 6,\n paddingLeft: 10,\n width: '100%',\n minWidth: 'min-content',\n '--list-item-gap': '12px',\n },\n}\n\nexport const SIZES_TEXT: Record<Size, CSSProperties> = {\n xl: { fontSize: 18 },\n l: { fontSize: 18 },\n m: { fontSize: 18 },\n s: { fontSize: 18 },\n xs: { fontSize: 18 },\n}\n\nexport const SIZES_CAPTION: Record<Size, CSSProperties> = {\n xl: { fontSize: 16 },\n l: { fontSize: 16 },\n m: { fontSize: 16 },\n s: { fontSize: 16 },\n xs: { fontSize: 16 },\n}\n"],"names":["SIZES","xl","paddingTop","paddingRight","paddingBottom","paddingLeft","width","minWidth","l","m","s","xs","SIZES_TEXT","fontSize","SIZES_CAPTION"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,GAAI,CACFC,WAAY,GACZC,aAAc,GACdC,cAAe,GACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBC,EAAG,CACDN,WAAY,GACZC,aAAc,GACdC,cAAe,GACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBE,EAAG,CACDP,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBG,EAAG,CACDR,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,QAErBI,GAAI,CACFT,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,MAAO,OACPC,SAAU,cACV,kBAAmB,SAIhB,MAAMK,WAA0C,CACrDX,GAAI,CAAEY,SAAU,IAChBL,EAAG,CAAEK,SAAU,IACfJ,EAAG,CAAEI,SAAU,IACfH,EAAG,CAAEG,SAAU,IACfF,GAAI,CAAEE,SAAU,KAGX,MAAMC,cAA6C,CACxDb,GAAI,CAAEY,SAAU,IAChBL,EAAG,CAAEK,SAAU,IACfJ,EAAG,CAAEI,SAAU,IACfH,EAAG,CAAEG,SAAU,IACfF,GAAI,CAAEE,SAAU"}
@@ -1,2 +1,2 @@
1
- 'use strict';var styled=require('styled-components');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');var focus=require('../../mixins/focus.js');var style=require('../../shared/utils/style.js');var hover=require('../../mixins/hover.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardListItemProp=style.createShouldForwardProp(o=>!['danger','success','active','onColored','mediaBorderRadius','borderRadius'].includes(o));const Media=styled__default.default.span.withConfig({displayName:"ListItem__Media",componentId:"ui__sc-1a62xqm-0"})(["box-sizing:border-box;flex-shrink:0;width:2.2em;height:2.2em;& > *{box-sizing:border-box;width:100%;height:100%;}"]);const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n ${hover.hover(`\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n `)}\n\n & ${Media} img {\n background-color: ${o.mediaPlaceholderColor};\n }\n`;const COLOR_SCHEMA={onColored:{danger:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['alert-error'],backgroundColor:o.theme.colors['alert-bg-error-100'],colorHover:o.theme.colors['alert-error'],backgroundColorHover:o.theme.colors['alert-bg-error-100'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.theme.colors['bg-oncontrast-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette}))},success:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['alert-success'],backgroundColor:o.theme.colors['alert-bg-success-100'],colorHover:o.theme.colors['alert-success'],backgroundColorHover:o.theme.colors['alert-bg-success-100'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.theme.colors['bg-oncontrast-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette}))},secondary:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100-active'],colorHover:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-brand-primary-100-active'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.theme.colors['bg-oncontrast-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette}))},primary:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100-active'],colorHover:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-brand-primary-100-active'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['content-oncolor-primary'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.theme.colors['bg-oncontrast-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncontrast-hover'],...o.palette}))}},default:{danger:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['alert-error'],backgroundColor:o.theme.colors['alert-bg-error-100'],colorHover:o.theme.colors['alert-error'],backgroundColorHover:o.theme.colors['alert-bg-error-100'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['alert-error'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['alert-error'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))},success:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['alert-success'],backgroundColor:o.theme.colors['alert-bg-success-100'],colorHover:o.theme.colors['alert-success'],backgroundColorHover:o.theme.colors['alert-bg-success-100'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['alert-success'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['alert-success'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))},secondary:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100-active'],colorHover:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-brand-primary-100-active'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))},primary:{disabled:styled.css(["",""],o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors.transparent,mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),active:styled.css(["",""],o=>template({color:o.theme.colors['content-brand-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100-active'],colorHover:o.theme.colors['content-brand-primary'],backgroundColorHover:o.theme.colors['bg-brand-primary-100-active'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette})),default:styled.css(["",""],o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors.transparent,colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['bg-oncolor-hover'],mediaPlaceholderColor:o.theme.colors['bg-oncolor-hover'],...o.palette}))}}};const Root=styled__default.default.button.withConfig({shouldForwardProp:shouldForwardListItemProp}).attrs({dynamicSizeDeclaration:(o,e)=>({fontSize:typeof o=='string'?o:`${o}${e}`,padding:'0.4em 0.8em'})}).withConfig({displayName:"ListItem__Root",componentId:"ui__sc-1a62xqm-1"})([""," "," "," "," ",""],o=>`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n isolation: isolate;\n position: relative;\n cursor: ${o.disabled?'not-allowed':'pointer'};\n border-radius: ${typeof o.borderRadius=='string'?o.borderRadius:`${o.borderRadius}px`};\n border: none;\n text-decoration: none;\n appearance: none;\n text-align: start;\n width: 100%;\n min-width: min-content;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n\n & ${Media} {\n border-radius: ${typeof o.mediaBorderRadius=='string'?o.mediaBorderRadius:`${o.mediaBorderRadius}px`};\n }\n\n & > *:not(:last-child) {\n margin-right: 12px;\n }\n `,o=>{const e=o.onColored?COLOR_SCHEMA.onColored:COLOR_SCHEMA.default;let r=e.primary;return o.secondary&&(r=e.secondary),o.success&&(r=e.success),o.danger&&(r=e.danger),o.disabled?r.disabled:o.active?r.active:r.default},focus.focus,responsiveSize.responsiveSize,responsiveMargin.responsiveMargin);const Content=styled__default.default.span.withConfig({displayName:"ListItem__Content",componentId:"ui__sc-1a62xqm-2"})(["box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;"]);const Img=styled__default.default.img.withConfig({displayName:"ListItem__Img",componentId:"ui__sc-1a62xqm-3"})(["box-sizing:border-box;border-radius:inherit;object-fit:contain;"]);exports.Content=Content,exports.Img=Img,exports.Media=Media,exports.Root=Root;
1
+ 'use strict';var styled=require('styled-components');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');var focus=require('../../mixins/focus.js');var style=require('../../shared/utils/style.js');var hover=require('../../mixins/hover.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardListItemProp=style.createShouldForwardProp(o=>!['danger','success','active','contrast','borderRadius','loading'].includes(o));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n ${hover.hover(`\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n `)}\n`;const COLOR_SCHEMA={contrast:{danger:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['alert-error'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['alert-bg-error-100'],colorHover:o.palette.colorActive??o.theme.colors['alert-error'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['alert-bg-error-100']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['content-oncolor-primary'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncontrast-hover']}))},success:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['alert-success'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['alert-bg-success-100'],colorHover:o.palette.colorActive??o.theme.colors['alert-success'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['alert-bg-success-100']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['content-oncolor-primary'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncontrast-hover']}))},secondary:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active'],colorHover:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['content-oncolor-primary'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncontrast-hover']}))},primary:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-oncolor-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active'],colorHover:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['content-oncolor-primary'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['content-oncolor-primary'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncontrast-hover']}))}},default:{danger:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['alert-error'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['alert-bg-error-100'],colorHover:o.palette.colorActive??o.theme.colors['alert-error'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['alert-bg-error-100']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['alert-error'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['alert-error'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncolor-hover']}))},success:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['alert-success'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['alert-bg-success-100'],colorHover:o.palette.colorActive??o.theme.colors['alert-success'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['alert-bg-success-100']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['alert-success'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['alert-success'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncolor-hover']}))},secondary:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active'],colorHover:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['content-brand-primary'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['content-brand-primary'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncolor-hover']}))},primary:{disabled:styled.css(["",""],o=>template({color:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColor:o.palette.backgroundColorDisabled??o.theme.colors.transparent,colorHover:o.palette.colorDisabled??o.theme.colors['content-disabled'],backgroundColorHover:o.palette.backgroundColorDisabled??o.theme.colors.transparent})),active:styled.css(["",""],o=>template({color:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColor:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active'],colorHover:o.palette.colorActive??o.theme.colors['content-brand-primary'],backgroundColorHover:o.palette.backgroundColorActive??o.theme.colors['bg-brand-primary-100-active']})),default:styled.css(["",""],o=>template({color:o.palette.color??o.theme.colors['content-onmain-primary'],backgroundColor:o.palette.backgroundColor??o.theme.colors.transparent,colorHover:o.palette.colorHover??o.theme.colors['content-onmain-primary'],backgroundColorHover:o.palette.backgroundColorHover??o.theme.colors['bg-oncolor-hover']}))}}};const Root=styled__default.default.button.withConfig({shouldForwardProp:shouldForwardListItemProp}).withConfig({displayName:"ListItem__Root",componentId:"ui__sc-1a62xqm-0"})([""," "," "," "," ",""],o=>{let e='default';return o.as!=='button'&&o.as!=='a'&&o.as!=='label'||(e='pointer'),o.disabled&&(e='not-allowed'),o.loading&&(e='wait'),`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n isolation: isolate;\n position: relative;\n border-radius: ${o.borderRadius}px;\n cursor: ${e};\n border: none;\n text-decoration: none;\n appearance: none;\n margin: 0;\n transition-property: background-color;\n transition-duration: 250ms;\n\n & > *:not(:first-child) {\n margin-left: var(--list-item-gap);\n }\n `},o=>{const e=o.contrast?COLOR_SCHEMA.contrast:COLOR_SCHEMA.default;let r=e.primary;return o.secondary&&(r=e.secondary),o.success&&(r=e.success),o.danger&&(r=e.danger),o.disabled?r.disabled:o.active?r.active:r.default},focus.focus,responsiveSize.responsiveSize,responsiveMargin.responsiveMargin);const Content=styled__default.default.span.withConfig({displayName:"ListItem__Content",componentId:"ui__sc-1a62xqm-1"})(["box-sizing:border-box;flex-grow:1;"]);exports.Content=Content,exports.Root=Root;
2
2
  //# sourceMappingURL=style.js.map