@foxford/ui 2.46.0 → 2.47.0-beta-e236fd4-20241002

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 (115) hide show
  1. package/assets/apple-auth-mono-color.svg +1 -0
  2. package/assets/apple-authorization.svg +1 -1
  3. package/assets/educont-auth-mono-color.svg +1 -0
  4. package/assets/educont-authorization.svg +1 -1
  5. package/assets/google-auth-mono-color.svg +1 -0
  6. package/assets/mail.ru-authorization.svg +1 -1
  7. package/assets/mailru-auth-mono-color.svg +1 -0
  8. package/assets/ok-authorization.svg +1 -1
  9. package/assets/sber-auth-mono-color.svg +1 -0
  10. package/assets/sber-authorization.svg +1 -0
  11. package/assets/share.svg +1 -1
  12. package/assets/t-bank-authorization.svg +1 -0
  13. package/assets/tbank-auth-mono-color.svg +1 -0
  14. package/assets/twenty-thirty-five-authorization.svg +1 -1
  15. package/assets/un2035-auth-mono-color.svg +1 -0
  16. package/assets/vk-auth-mono-color.svg +1 -0
  17. package/assets/vk-authorization.svg +1 -1
  18. package/assets/yandex-auth-mono-color.svg +1 -0
  19. package/assets/yandex-authorization.svg +1 -1
  20. package/components/Alert/Alert.js +1 -1
  21. package/components/Alert/Alert.mjs +1 -1
  22. package/components/Button/style.js +1 -1
  23. package/components/Button/style.mjs +1 -1
  24. package/components/Dropdown/style.js +1 -1
  25. package/components/Dropdown/style.mjs +1 -1
  26. package/components/FormLabel/FormLabel.js +1 -1
  27. package/components/FormLabel/FormLabel.js.map +1 -1
  28. package/components/FormLabel/FormLabel.mjs +1 -1
  29. package/components/FormLabel/FormLabel.mjs.map +1 -1
  30. package/components/FormLabel/constants.js +1 -1
  31. package/components/FormLabel/constants.js.map +1 -1
  32. package/components/FormLabel/constants.mjs +1 -1
  33. package/components/FormLabel/constants.mjs.map +1 -1
  34. package/components/FormLabel/style.js +1 -1
  35. package/components/FormLabel/style.js.map +1 -1
  36. package/components/FormLabel/style.mjs +1 -1
  37. package/components/FormLabel/style.mjs.map +1 -1
  38. package/components/Icon/list/icon-pack.js +1 -1
  39. package/components/Icon/list/icon-pack.mjs +1 -1
  40. package/components/Input/Input.js +1 -1
  41. package/components/Input/Input.js.map +1 -1
  42. package/components/Input/Input.mjs +1 -1
  43. package/components/Input/Input.mjs.map +1 -1
  44. package/components/InputCheckbox/InputCheckbox.js +1 -1
  45. package/components/InputCheckbox/InputCheckbox.js.map +1 -1
  46. package/components/InputCheckbox/InputCheckbox.mjs +1 -1
  47. package/components/InputCheckbox/InputCheckbox.mjs.map +1 -1
  48. package/components/InputCheckbox/constants.js +1 -1
  49. package/components/InputCheckbox/constants.js.map +1 -1
  50. package/components/InputCheckbox/constants.mjs +1 -1
  51. package/components/InputCheckbox/constants.mjs.map +1 -1
  52. package/components/InputCheckbox/style.js +1 -1
  53. package/components/InputCheckbox/style.js.map +1 -1
  54. package/components/InputCheckbox/style.mjs +1 -1
  55. package/components/InputCheckbox/style.mjs.map +1 -1
  56. package/components/InputRadio/InputRadio.js +1 -1
  57. package/components/InputRadio/InputRadio.js.map +1 -1
  58. package/components/InputRadio/InputRadio.mjs +1 -1
  59. package/components/InputRadio/InputRadio.mjs.map +1 -1
  60. package/components/InputRadio/constants.js +1 -1
  61. package/components/InputRadio/constants.js.map +1 -1
  62. package/components/InputRadio/constants.mjs +1 -1
  63. package/components/InputRadio/constants.mjs.map +1 -1
  64. package/components/InputRadio/style.js +1 -1
  65. package/components/InputRadio/style.js.map +1 -1
  66. package/components/InputRadio/style.mjs +1 -1
  67. package/components/InputRadio/style.mjs.map +1 -1
  68. package/components/PopoverComponent/PopoverComponent.js +1 -1
  69. package/components/PopoverComponent/PopoverComponent.js.map +1 -1
  70. package/components/PopoverComponent/PopoverComponent.mjs +1 -1
  71. package/components/PopoverComponent/PopoverComponent.mjs.map +1 -1
  72. package/dts/index.d.ts +81 -49
  73. package/external/.pnpm/@foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.js +2 -0
  74. package/external/.pnpm/@foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.mjs +2 -0
  75. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CheckCircleFill/index.js.map +1 -1
  76. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CheckCircleFill/index.mjs.map +1 -1
  77. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/ChevronDown/index.js.map +1 -1
  78. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/ChevronDown/index.mjs.map +1 -1
  79. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/Close/index.js.map +1 -1
  80. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/Close/index.mjs.map +1 -1
  81. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CloseCirlceFill/index.js.map +1 -1
  82. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CloseCirlceFill/index.mjs.map +1 -1
  83. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/LoaderFill/index.js.map +1 -1
  84. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/LoaderFill/index.mjs.map +1 -1
  85. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/NotifFill/index.js.map +1 -1
  86. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/NotifFill/index.mjs.map +1 -1
  87. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/WarningTriangleFill/index.js.map +1 -1
  88. package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/WarningTriangleFill/index.mjs.map +1 -1
  89. package/mixins/responsive-margin.js +1 -1
  90. package/mixins/responsive-margin.js.map +1 -1
  91. package/mixins/responsive-margin.mjs +1 -1
  92. package/mixins/responsive-margin.mjs.map +1 -1
  93. package/package.json +2 -1
  94. package/shared/regexp.js +1 -1
  95. package/shared/regexp.js.map +1 -1
  96. package/shared/regexp.mjs +1 -1
  97. package/shared/regexp.mjs.map +1 -1
  98. package/external/.pnpm/@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.js +0 -2
  99. package/external/.pnpm/@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.mjs +0 -2
  100. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/components.json.js.map +0 -0
  101. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/components.json.mjs.map +0 -0
  102. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CheckCircleFill/index.js +0 -0
  103. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CheckCircleFill/index.mjs +0 -0
  104. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/ChevronDown/index.js +0 -0
  105. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/ChevronDown/index.mjs +0 -0
  106. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/Close/index.js +0 -0
  107. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/Close/index.mjs +0 -0
  108. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CloseCirlceFill/index.js +0 -0
  109. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/CloseCirlceFill/index.mjs +0 -0
  110. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/LoaderFill/index.js +0 -0
  111. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/LoaderFill/index.mjs +0 -0
  112. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/NotifFill/index.js +0 -0
  113. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/NotifFill/index.mjs +0 -0
  114. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/WarningTriangleFill/index.js +0 -0
  115. /package/external/.pnpm/{@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1 → @foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@foxford/icon-pack/icons/WarningTriangleFill/index.mjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"FormLabel.js","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport * as Styled from './style'\nimport { SIZES } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * Component accepts all \\<label\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [FormLabelProps](https://github.com/foxford/ui/blob/master/src/components/FormLabel/types.ts)\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef(\n (\n {\n size = 'm',\n textProps = {},\n hint = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n disabled,\n error,\n success,\n checked,\n onColored,\n children,\n control,\n label,\n palette,\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 onColored,\n }\n\n const elementProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n const { textProps: hintTextProps = {}, iconProps: hintIconProps = {} } = hint\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} palette={palette} ref={ref}>\n {typeof control === 'function'\n ? control({\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n <Styled.Content>\n <Text as='span' appearance='body' size='inherit' color='inherit' {...textProps}>\n {label ?? children}\n </Text>\n {hint.text && (\n <Text\n as='span'\n appearance='caption'\n color={stateProps.disabled ? 'content-disabled' : 'content-onmain-secondary'}\n size={0.8}\n sizeUnits='em'\n marginTop={2}\n {...hintTextProps}\n >\n {hint.text}\n </Text>\n )}\n </Styled.Content>\n {hint.buttonProps && (\n <Styled.HintButton\n {...hint.buttonProps}\n disabled={stateProps.disabled || hint.buttonProps.disabled}\n palette={palette}\n type='button'\n >\n {hint.icon === undefined ? (\n <Icon as='span' size={20} name='helpCircle' {...hintIconProps} />\n ) : (\n <Icon\n as='span'\n size={20}\n name={typeof hint.icon === 'string' ? hint.icon : undefined}\n icon={typeof hint.icon !== 'string' ? hint.icon : undefined}\n {...hintIconProps}\n />\n )}\n </Styled.HintButton>\n )}\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { FormLabel, COMPONENT_NAME }\n"],"names":["FormLabel","withMergedProps","forwardRef","size","textProps","hint","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","onColored","children","control","label","palette","props","ref","sizeProps","stateProps","elementProps","hintTextProps","iconProps","hintIconProps","_jsxs","Styled","cloneElement","jsxs","_jsx","jsx","Text","as","appearance","color","text","sizeUnits","marginTop","buttonProps","type","Icon","icon","undefined","name","displayName","sizes","SIZES"],"mappings":"iSAoBA,MAAMA,UAA6DC,gBAAAA,gBACjEC,MAAAA,YACE,EAEIC,OAAO,IACPC,YAAY,CAAE,EACdC,OAAO,CAAE,EACTC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,WACAC,QACAC,UACAC,UACAC,YACAC,WACAC,UACAC,QACAC,aACGC,GAELC,KAEA,MAAMC,EAAY,CAChBpB,OACAG,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMa,EAAa,CACjBZ,WACAC,QACAC,UACAC,UACAC,aAGF,MAAMS,SACGP,GAAY,iBAAmBA,EAAQG,OAAU,UAAYH,EAAQG,QAAU,KAAOH,EAAQG,MAAQ,CAAA,EAE/G,MAAQjB,UAAWsB,EAAgB,CAAE,EAAEC,UAAWC,EAAgB,CAAC,GAAMvB,EAEzE,OACEwB,WAAAA,KAACC,MAAAA,KAAW,IAAKT,KAAWE,KAAeC,EAAYJ,QAASA,EAASE,IAAKA,EAAIL,iBACxEC,GAAY,WAChBA,EAAQ,IACHK,KACAC,IAELO,MAAYA,aAACb,EAAS,IACjBK,KACAC,KACAC,IAETI,WAAAG,KAACF,cAAc,CAAAb,SAAA,CACbgB,WAAAC,IAACC,UAAI,CAACC,GAAG,OAAOC,WAAW,OAAOlC,KAAK,UAAUmC,MAAM,aAAclC,EAASa,SAC3EE,GAASF,IAEXZ,EAAKkC,MACJN,WAAAA,IAACE,KAAAA,KAAI,CACHC,GAAG,OACHC,WAAW,UACXC,MAAOd,EAAWZ,SAAW,mBAAqB,2BAClDT,KAAM,GACNqC,UAAU,KACVC,UAAW,KACPf,EAAaT,SAEhBZ,EAAKkC,UAIXlC,EAAKqC,aACJT,WAAAA,IAACH,MAAAA,WAAiB,IACZzB,EAAKqC,YACT9B,SAAUY,EAAWZ,UAAYP,EAAKqC,YAAY9B,SAClDQ,QAASA,EACTuB,KAAK,SAAQ1B,SAGXgB,WAAAA,IAACW,KAAAA,KADFvC,EAAKwC,YAASC,EACR,CAACV,GAAG,OAAOjC,KAAM,GAAI4C,KAAK,gBAAiBnB,GAE3C,CACHQ,GAAG,OACHjC,KAAM,GACN4C,YAAa1C,EAAKwC,MAAS,SAAWxC,EAAKwC,UAAOC,EAClDD,YAAaxC,EAAKwC,MAAS,SAAWxC,EAAKwC,UAAOC,KAC9ClB,QAKA,IAIpB,CACEoB,YApHmB,YAqHnBC,MAAOC,UAAAA,+BArHY"}
1
+ {"version":3,"file":"FormLabel.js","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { IconButton } from 'components/IconButton'\nimport * as Styled from './style'\nimport { SIZES, SIZES_LABEL, SIZES_HINT } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<label\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров и внешних отступов в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/FormLabel/types.ts).\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef(\n (\n {\n size = 'm',\n textProps = {},\n hint = {},\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 { text: hintText, textProps: hintTextProps = {}, buttonProps: hintButtonProps = {} } = hint\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} ref={ref}>\n {typeof control === 'function'\n ? control({\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n <Styled.Content>\n <Text\n as='span'\n appearance='body'\n color='inherit'\n wordBreak='break-word'\n marginBottom={hintText ? '0.2em' : undefined}\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_HINT}\n {...sizeProps}\n {...hintTextProps}\n >\n {hintText}\n </Text>\n )}\n </Styled.Content>\n {hintButtonProps.onClick && (\n <IconButton\n size='m'\n icon='helpCircle'\n marginLeft={6}\n {...hintButtonProps}\n disabled={stateProps.disabled || hintButtonProps.disabled}\n />\n )}\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { FormLabel, COMPONENT_NAME }\n"],"names":["FormLabel","withMergedProps","forwardRef","size","textProps","hint","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","children","control","label","props","ref","sizeProps","stateProps","elementProps","text","hintText","hintTextProps","buttonProps","hintButtonProps","_jsxs","Styled","cloneElement","jsxs","_jsx","jsx","Text","as","appearance","color","wordBreak","marginBottom","undefined","sizes","SIZES_LABEL","SIZES_HINT","onClick","IconButton","icon","marginLeft","displayName","SIZES"],"mappings":"mTAoBA,MAAMA,UAA6DC,gBAAAA,gBACjEC,MAAAA,YACE,EAEIC,OAAO,IACPC,YAAY,CAAE,EACdC,OAAO,CAAE,EACTC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,WACAC,QACAC,UACAC,UACAC,WACAC,UACAC,WACGC,GAELC,KAEA,MAAMC,EAAY,CAChBlB,OACAG,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,MAAQK,KAAMC,EAAUrB,UAAWsB,EAAgB,CAAE,EAAEC,YAAaC,EAAkB,CAAC,GAAMvB,EAE7F,OACEwB,WAAAA,KAACC,MAAAA,KAAW,IAAKX,KAAWE,KAAeC,EAAYF,IAAKA,EAAIJ,iBACtDC,GAAY,WAChBA,EAAQ,IACHI,KACAC,IAELS,MAAYA,aAACd,EAAS,IACjBI,KACAC,KACAC,IAETM,WAAAG,KAACF,cAAc,CAAAd,SAAA,CACbiB,WAAAC,IAACC,UAAI,CACHC,GAAG,OACHC,WAAW,OACXC,MAAM,UACNC,UAAU,aACVC,aAAcf,EAAW,aAAUgB,EACnCC,MAAOC,UAAYA,eACftB,KACAjB,EAASY,SAEZE,GAASF,IAEXS,GACCQ,WAAAC,IAACC,UAAI,CACHC,GAAG,OACHC,WAAW,UACXC,MAAOhB,EAAWV,SAAW,mBAAqB,2BAClD2B,UAAU,aACVG,MAAOE,UAAWA,cACdvB,KACAK,EAAaV,SAEhBS,OAING,EAAgBiB,SACfZ,WAAAA,IAACa,WAAAA,WAAU,CACT3C,KAAK,IACL4C,KAAK,aACLC,WAAY,KACRpB,EACJhB,SAAUU,EAAWV,UAAYgB,EAAgBhB,aAGzC,IAIpB,CACEqC,YA/GmB,YAgHnBP,MAAOQ,UAAAA,+BAhHY"}
@@ -1,2 +1,2 @@
1
- import{forwardRef,cloneElement}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{Root,Content,HintButton}from'./style.mjs';import{SIZES}from'./constants.mjs';import{jsxs,jsx}from'react/jsx-runtime';import{Text}from'../Text/Text.mjs';import{Icon}from'../Icon/Icon.mjs';const COMPONENT_NAME='FormLabel';const FormLabel=withMergedProps(forwardRef((({size:e="m",textProps:o={},hint:s={},sizeXXS:t,sizeXS:n,sizeS:i,sizeM:r,sizeL:c,sizeXL:p,disabled:a,error:l,success:d,checked:m,onColored:z,children:b,control:x,label:f,palette:h,...j},u)=>{const P={size:e,sizeXXS:t,sizeXS:n,sizeS:i,sizeM:r,sizeL:c,sizeXL:p};const y={disabled:a,error:l,success:d,checked:m,onColored:z};const S=typeof x=='object'&&typeof x.props=='object'&&x.props!==null?x.props:{};const{textProps:M={},iconProps:E={}}=s;return jsxs(Root,{...j,...P,...y,palette:h,ref:u,children:[typeof x=='function'?x({...P,...y}):cloneElement(x,{...P,...y,...S}),jsxs(Content,{children:[jsx(Text,{as:"span",appearance:"body",size:"inherit",color:"inherit",...o,children:f??b}),s.text&&jsx(Text,{as:"span",appearance:"caption",color:y.disabled?'content-disabled':'content-onmain-secondary',size:.8,sizeUnits:"em",marginTop:2,...M,children:s.text})]}),s.buttonProps&&jsx(HintButton,{...s.buttonProps,disabled:y.disabled||s.buttonProps.disabled,palette:h,type:"button",children:jsx(Icon,s.icon===void 0?{as:"span",size:20,name:"helpCircle",...E}:{as:"span",size:20,name:typeof s.icon=='string'?s.icon:void 0,icon:typeof s.icon!='string'?s.icon:void 0,...E})})]})})),{displayName:"FormLabel",sizes:SIZES});export{COMPONENT_NAME,FormLabel};
1
+ import{forwardRef,cloneElement}from'react';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{Root,Content}from'./style.mjs';import{SIZES,SIZES_LABEL,SIZES_HINT}from'./constants.mjs';import{jsxs,jsx}from'react/jsx-runtime';import{Text}from'../Text/Text.mjs';import{IconButton}from'../IconButton/IconButton.mjs';const COMPONENT_NAME='FormLabel';const FormLabel=withMergedProps(forwardRef((({size:e="m",textProps:o={},hint:s={},sizeXXS:r,sizeXS:t,sizeS:i,sizeM:n,sizeL:c,sizeXL:a,disabled:d,error:m,success:l,checked:p,children:b,control:z,label:S,...f},x)=>{const j={size:e,sizeXXS:r,sizeXS:t,sizeS:i,sizeM:n,sizeL:c,sizeXL:a};const h={disabled:d,error:m,success:l,checked:p};const E=typeof z=='object'&&typeof z.props=='object'&&z.props!==null?z.props:{};const{text:L,textProps:I={},buttonProps:u={}}=s;return jsxs(Root,{...f,...j,...h,ref:x,children:[typeof z=='function'?z({...j,...h}):cloneElement(z,{...j,...h,...E}),jsxs(Content,{children:[jsx(Text,{as:"span",appearance:"body",color:"inherit",wordBreak:"break-word",marginBottom:L?'0.2em':void 0,sizes:SIZES_LABEL,...j,...o,children:S??b}),L&&jsx(Text,{as:"span",appearance:"caption",color:h.disabled?'content-disabled':'content-onmain-secondary',wordBreak:"break-word",sizes:SIZES_HINT,...j,...I,children:L})]}),u.onClick&&jsx(IconButton,{size:"m",icon:"helpCircle",marginLeft:6,...u,disabled:h.disabled||u.disabled})]})})),{displayName:"FormLabel",sizes:SIZES});export{COMPONENT_NAME,FormLabel};
2
2
  //# sourceMappingURL=FormLabel.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormLabel.mjs","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport * as Styled from './style'\nimport { SIZES } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * Component accepts all \\<label\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [FormLabelProps](https://github.com/foxford/ui/blob/master/src/components/FormLabel/types.ts)\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef(\n (\n {\n size = 'm',\n textProps = {},\n hint = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n disabled,\n error,\n success,\n checked,\n onColored,\n children,\n control,\n label,\n palette,\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 onColored,\n }\n\n const elementProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n const { textProps: hintTextProps = {}, iconProps: hintIconProps = {} } = hint\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} palette={palette} ref={ref}>\n {typeof control === 'function'\n ? control({\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n <Styled.Content>\n <Text as='span' appearance='body' size='inherit' color='inherit' {...textProps}>\n {label ?? children}\n </Text>\n {hint.text && (\n <Text\n as='span'\n appearance='caption'\n color={stateProps.disabled ? 'content-disabled' : 'content-onmain-secondary'}\n size={0.8}\n sizeUnits='em'\n marginTop={2}\n {...hintTextProps}\n >\n {hint.text}\n </Text>\n )}\n </Styled.Content>\n {hint.buttonProps && (\n <Styled.HintButton\n {...hint.buttonProps}\n disabled={stateProps.disabled || hint.buttonProps.disabled}\n palette={palette}\n type='button'\n >\n {hint.icon === undefined ? (\n <Icon as='span' size={20} name='helpCircle' {...hintIconProps} />\n ) : (\n <Icon\n as='span'\n size={20}\n name={typeof hint.icon === 'string' ? hint.icon : undefined}\n icon={typeof hint.icon !== 'string' ? hint.icon : undefined}\n {...hintIconProps}\n />\n )}\n </Styled.HintButton>\n )}\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","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","onColored","children","control","label","palette","props","ref","sizeProps","stateProps","elementProps","hintTextProps","iconProps","hintIconProps","_jsxs","Styled","cloneElement","_jsx","Text","as","appearance","color","text","sizeUnits","marginTop","buttonProps","type","Icon","icon","undefined","name","displayName","sizes","SIZES"],"mappings":"ySAQMA,MAAAA,eAAiB,YAYvB,MAAMC,UAA6DC,gBACjEC,YACE,EAEIC,OAAO,IACPC,YAAY,CAAE,EACdC,OAAO,CAAE,EACTC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,WACAC,QACAC,UACAC,UACAC,YACAC,WACAC,UACAC,QACAC,aACGC,GAELC,KAEA,MAAMC,EAAY,CAChBpB,OACAG,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMa,EAAa,CACjBZ,WACAC,QACAC,UACAC,UACAC,aAGF,MAAMS,SACGP,GAAY,iBAAmBA,EAAQG,OAAU,UAAYH,EAAQG,QAAU,KAAOH,EAAQG,MAAQ,CAAA,EAE/G,MAAQjB,UAAWsB,EAAgB,CAAE,EAAEC,UAAWC,EAAgB,CAAC,GAAMvB,EAEzE,OACEwB,KAACC,KAAW,IAAKT,KAAWE,KAAeC,EAAYJ,QAASA,EAASE,IAAKA,EAAIL,iBACxEC,GAAY,WAChBA,EAAQ,IACHK,KACAC,IAELO,aAAab,EAAS,IACjBK,KACAC,KACAC,IAETI,KAACC,QAAc,CAAAb,SAAA,CACbe,IAACC,KAAI,CAACC,GAAG,OAAOC,WAAW,OAAOhC,KAAK,UAAUiC,MAAM,aAAchC,EAASa,SAC3EE,GAASF,IAEXZ,EAAKgC,MACJL,IAACC,KAAI,CACHC,GAAG,OACHC,WAAW,UACXC,MAAOZ,EAAWZ,SAAW,mBAAqB,2BAClDT,KAAM,GACNmC,UAAU,KACVC,UAAW,KACPb,EAAaT,SAEhBZ,EAAKgC,UAIXhC,EAAKmC,aACJR,IAACF,WAAiB,IACZzB,EAAKmC,YACT5B,SAAUY,EAAWZ,UAAYP,EAAKmC,YAAY5B,SAClDQ,QAASA,EACTqB,KAAK,SAAQxB,SAGXe,IAACU,KADFrC,EAAKsC,YAASC,EACR,CAACV,GAAG,OAAO/B,KAAM,GAAI0C,KAAK,gBAAiBjB,GAE3C,CACHM,GAAG,OACH/B,KAAM,GACN0C,YAAaxC,EAAKsC,MAAS,SAAWtC,EAAKsC,UAAOC,EAClDD,YAAatC,EAAKsC,MAAS,SAAWtC,EAAKsC,UAAOC,KAC9ChB,QAKA,IAIpB,CACEkB,YApHmB,YAqHnBC,MAAOC"}
1
+ {"version":3,"file":"FormLabel.mjs","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { IconButton } from 'components/IconButton'\nimport * as Styled from './style'\nimport { SIZES, SIZES_LABEL, SIZES_HINT } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * Компонент поддерживает все атрибуты \\<label\\> элемента.\n *\n * Можно передать \"ref\", который будет ассоциирован с рутовым элементом.\n *\n * Поддерживаются пропсы определения размеров и внешних отступов в зависимости от ширины вьюпорта.\n *\n * Полный интерфейс можно посмотреть [тут](https://github.com/foxford/ui/blob/master/src/components/FormLabel/types.ts).\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef(\n (\n {\n size = 'm',\n textProps = {},\n hint = {},\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 { text: hintText, textProps: hintTextProps = {}, buttonProps: hintButtonProps = {} } = hint\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} ref={ref}>\n {typeof control === 'function'\n ? control({\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n <Styled.Content>\n <Text\n as='span'\n appearance='body'\n color='inherit'\n wordBreak='break-word'\n marginBottom={hintText ? '0.2em' : undefined}\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_HINT}\n {...sizeProps}\n {...hintTextProps}\n >\n {hintText}\n </Text>\n )}\n </Styled.Content>\n {hintButtonProps.onClick && (\n <IconButton\n size='m'\n icon='helpCircle'\n marginLeft={6}\n {...hintButtonProps}\n disabled={stateProps.disabled || hintButtonProps.disabled}\n />\n )}\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","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","children","control","label","props","ref","sizeProps","stateProps","elementProps","text","hintText","hintTextProps","buttonProps","hintButtonProps","_jsxs","Styled","cloneElement","_jsx","Text","as","appearance","color","wordBreak","marginBottom","undefined","sizes","SIZES_LABEL","SIZES_HINT","onClick","IconButton","icon","marginLeft","displayName","SIZES"],"mappings":"uUAQMA,MAAAA,eAAiB,YAYvB,MAAMC,UAA6DC,gBACjEC,YACE,EAEIC,OAAO,IACPC,YAAY,CAAE,EACdC,OAAO,CAAE,EACTC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,WACAC,QACAC,UACAC,UACAC,WACAC,UACAC,WACGC,GAELC,KAEA,MAAMC,EAAY,CAChBlB,OACAG,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,MAAQK,KAAMC,EAAUrB,UAAWsB,EAAgB,CAAE,EAAEC,YAAaC,EAAkB,CAAC,GAAMvB,EAE7F,OACEwB,KAACC,KAAW,IAAKX,KAAWE,KAAeC,EAAYF,IAAKA,EAAIJ,iBACtDC,GAAY,WAChBA,EAAQ,IACHI,KACAC,IAELS,aAAad,EAAS,IACjBI,KACAC,KACAC,IAETM,KAACC,QAAc,CAAAd,SAAA,CACbgB,IAACC,KAAI,CACHC,GAAG,OACHC,WAAW,OACXC,MAAM,UACNC,UAAU,aACVC,aAAcb,EAAW,aAAUc,EACnCC,MAAOC,eACHpB,KACAjB,EAASY,SAEZE,GAASF,IAEXS,GACCO,IAACC,KAAI,CACHC,GAAG,OACHC,WAAW,UACXC,MAAOd,EAAWV,SAAW,mBAAqB,2BAClDyB,UAAU,aACVG,MAAOE,cACHrB,KACAK,EAAaV,SAEhBS,OAING,EAAgBe,SACfX,IAACY,WAAU,CACTzC,KAAK,IACL0C,KAAK,aACLC,WAAY,KACRlB,EACJhB,SAAUU,EAAWV,UAAYgB,EAAgBhB,aAGzC,IAIpB,CACEmC,YA/GmB,YAgHnBP,MAAOQ"}
@@ -1,2 +1,2 @@
1
- 'use strict';exports.SIZES={xxxl:{fontSize:26},xxl:{fontSize:24},xl:{fontSize:22},l:{fontSize:20},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12},xxxs:{fontSize:10}};
1
+ 'use strict';const SIZE_FORM_LABEL={padding:12,borderRadius:8,minWidth:'min-content'};exports.SIZES={xl:SIZE_FORM_LABEL,l:SIZE_FORM_LABEL,m:SIZE_FORM_LABEL,s:SIZE_FORM_LABEL,xs:SIZE_FORM_LABEL},exports.SIZES_HINT={xl:{fontSize:16},l:{fontSize:16},m:{fontSize:16},s:{fontSize:14},xs:{fontSize:12}},exports.SIZES_LABEL={xl:{fontSize:20},l:{fontSize:18},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14}};
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 type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 26,\n },\n xxl: {\n fontSize: 24,\n },\n xl: {\n fontSize: 22,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 12,\n },\n xxxs: {\n fontSize: 10,\n },\n}\n"],"names":["xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"2BAGkD,CAChDA,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/FormLabel/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { FormLabelSize } from './types'\n\nconst SIZE_FORM_LABEL: CSSProperties = {\n padding: 12,\n borderRadius: 8,\n minWidth: 'min-content',\n}\n\nexport const SIZES: Record<FormLabelSize, CSSProperties> = {\n xl: SIZE_FORM_LABEL,\n l: SIZE_FORM_LABEL,\n m: SIZE_FORM_LABEL,\n s: SIZE_FORM_LABEL,\n xs: SIZE_FORM_LABEL,\n}\n\nexport const SIZES_LABEL: Record<FormLabelSize, CSSProperties> = {\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n}\n\nexport const SIZES_HINT: Record<FormLabelSize, CSSProperties> = {\n xl: {\n fontSize: 16,\n },\n l: {\n fontSize: 16,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 12,\n },\n}\n"],"names":["SIZE_FORM_LABEL","padding","borderRadius","minWidth","xl","l","m","s","xs","fontSize"],"mappings":"aAGA,MAAMA,gBAAiC,CACrCC,QAAS,GACTC,aAAc,EACdC,SAAU,6BAG+C,CACzDC,GAAIJ,gBACJK,EAAGL,gBACHM,EAAGN,gBACHO,EAAGP,gBACHQ,GAAIR,oCAqB0D,CAC9DI,GAAI,CACFK,SAAU,IAEZJ,EAAG,CACDI,SAAU,IAEZH,EAAG,CACDG,SAAU,IAEZF,EAAG,CACDE,SAAU,IAEZD,GAAI,CACFC,SAAU,yBAhCmD,CAC/DL,GAAI,CACFK,SAAU,IAEZJ,EAAG,CACDI,SAAU,IAEZH,EAAG,CACDG,SAAU,IAEZF,EAAG,CACDE,SAAU,IAEZD,GAAI,CACFC,SAAU"}
@@ -1,2 +1,2 @@
1
- const SIZES={xxxl:{fontSize:26},xxl:{fontSize:24},xl:{fontSize:22},l:{fontSize:20},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12},xxxs:{fontSize:10}};export{SIZES};
1
+ const SIZE_FORM_LABEL={padding:12,borderRadius:8,minWidth:'min-content'};const SIZES={xl:SIZE_FORM_LABEL,l:SIZE_FORM_LABEL,m:SIZE_FORM_LABEL,s:SIZE_FORM_LABEL,xs:SIZE_FORM_LABEL};const SIZES_LABEL={xl:{fontSize:20},l:{fontSize:18},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14}};const SIZES_HINT={xl:{fontSize:16},l:{fontSize:16},m:{fontSize:16},s:{fontSize:14},xs:{fontSize:12}};export{SIZES,SIZES_HINT,SIZES_LABEL};
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 type { Size } from 'shared/types'\n\nexport const SIZES: Record<Size, CSSProperties> = {\n xxxl: {\n fontSize: 26,\n },\n xxl: {\n fontSize: 24,\n },\n xl: {\n fontSize: 22,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 12,\n },\n xxxs: {\n fontSize: 10,\n },\n}\n"],"names":["SIZES","xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,MAAMA,MAAqC,CAChDC,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../../src/components/FormLabel/constants.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { FormLabelSize } from './types'\n\nconst SIZE_FORM_LABEL: CSSProperties = {\n padding: 12,\n borderRadius: 8,\n minWidth: 'min-content',\n}\n\nexport const SIZES: Record<FormLabelSize, CSSProperties> = {\n xl: SIZE_FORM_LABEL,\n l: SIZE_FORM_LABEL,\n m: SIZE_FORM_LABEL,\n s: SIZE_FORM_LABEL,\n xs: SIZE_FORM_LABEL,\n}\n\nexport const SIZES_LABEL: Record<FormLabelSize, CSSProperties> = {\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n}\n\nexport const SIZES_HINT: Record<FormLabelSize, CSSProperties> = {\n xl: {\n fontSize: 16,\n },\n l: {\n fontSize: 16,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 12,\n },\n}\n"],"names":["SIZE_FORM_LABEL","padding","borderRadius","minWidth","SIZES","xl","l","m","s","xs","SIZES_LABEL","fontSize","SIZES_HINT"],"mappings":"AAGA,MAAMA,gBAAiC,CACrCC,QAAS,GACTC,aAAc,EACdC,SAAU,eAGL,MAAMC,MAA8C,CACzDC,GAAIL,gBACJM,EAAGN,gBACHO,EAAGP,gBACHQ,EAAGR,gBACHS,GAAIT,iBAGC,MAAMU,YAAoD,CAC/DL,GAAI,CACFM,SAAU,IAEZL,EAAG,CACDK,SAAU,IAEZJ,EAAG,CACDI,SAAU,IAEZH,EAAG,CACDG,SAAU,IAEZF,GAAI,CACFE,SAAU,KAIP,MAAMC,WAAmD,CAC9DP,GAAI,CACFM,SAAU,IAEZL,EAAG,CACDK,SAAU,IAEZJ,EAAG,CACDI,SAAU,IAEZH,EAAG,CACDG,SAAU,IAEZF,GAAI,CACFE,SAAU"}
@@ -1,2 +1,2 @@
1
- 'use strict';var styled=require('styled-components');var tinycolor=require('../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.js');var style=require('../../shared/utils/style.js');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');var focus=require('../../mixins/focus.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardFormLabelProp=style.createShouldForwardProp((o=>!['inline','clear','disabled','error','success','checked','onColored'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n`;const COLOR_SCHEMA={default:{disabled:styled.css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-disabled-large'],borderColor:o.theme.colors['border-disabled'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-disabled-large'],borderColorHover:o.theme.colors['border-disabled'],...o.palette}))),error:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-100'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-100'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-100'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-100'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100'],borderColor:o.theme.colors['border-brand-primary-active'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-brand-primary-100']).darken(3).toString(),borderColorHover:o.theme.colors['border-brand-primary-active'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))},onColored:{disabled:styled.css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-onmain-secondary'],borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),error:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-200'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-200'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-200'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-200'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-primary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))}};const Root=styled__default.default.label.withConfig({shouldForwardProp:shouldForwardFormLabelProp}).withConfig({displayName:"FormLabel__Root",componentId:"ui__sc-mry1kz-0"})([""," "," "," ",""],(o=>`\n box-sizing: border-box;\n isolation: isolate;\n display: ${o.inline?'inline-flex':'flex'};\n cursor: ${o.disabled?'not-allowed':'pointer'};\n border-radius: 8px;\n padding: 12px;\n min-width: min-content;\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `),(o=>{if(o.clear)return'';const r=o.onColored?COLOR_SCHEMA.onColored:COLOR_SCHEMA.default;return o.disabled?r.disabled:o.error?r.error:o.success?r.success:o.checked?r.checked:r.default}),responsiveSize.responsiveSize,responsiveMargin.responsiveMargin);const Content=styled__default.default.span.withConfig({displayName:"FormLabel__Content",componentId:"ui__sc-mry1kz-1"})(["box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;margin-left:12px;"]);const HintButton=styled__default.default.button.withConfig({shouldForwardProp:o=>!['palette'].includes(o)}).withConfig({displayName:"FormLabel__HintButton",componentId:"ui__sc-mry1kz-2"})(["box-sizing:border-box;appearance:none;padding:2px;margin:0;border:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:start;border-radius:50%;background-color:transparent;margin-left:6px;cursor:",";"," ",""],(o=>o.disabled?'not-allowed':'pointer'),(o=>{return`\n color: ${(r={hintColor:o.theme.colors['content-onmain-tertiary'],hintBackgroundColor:o.theme.colors.transparent,hintColorHover:o.theme.colors['content-onmain-primary'],hintBackgroundColorHover:tinycolor.default(o.theme.colors['bg-oncolor-hover']).lighten(20).toString(),hintColorActive:o.theme.colors['content-onmain-primary'],hintBackgroundColorActive:o.theme.colors['bg-oncolor-hover'],hintColorDisabled:o.theme.colors['content-disabled'],hintBackgroundColorDisabled:o.theme.colors.transparent,...o.palette}).hintColor};\n background-color: ${r.hintBackgroundColor};\n &:hover {\n color: ${r.hintColorHover};\n background-color: ${r.hintBackgroundColorHover};\n }\n &:active {\n color: ${r.hintColorActive};\n background-color: ${r.hintBackgroundColorActive};\n }\n &:disabled {\n color: ${r.hintColorDisabled};\n background-color: ${r.hintBackgroundColorDisabled};\n }\n`;var r}),focus.focus);exports.Content=Content,exports.HintButton=HintButton,exports.Root=Root;
1
+ 'use strict';var styled=require('styled-components');var tinycolor=require('../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.js');var style=require('../../shared/utils/style.js');var responsiveSize=require('../../mixins/responsive-size.js');var responsiveMargin=require('../../mixins/responsive-margin.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardFormLabelProp=style.createShouldForwardProp((o=>!['inline','clear','disabled','error','success','checked','onColored'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n`;const COLOR_SCHEMA={default:{disabled:styled.css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-disabled-large'],borderColor:o.theme.colors['border-disabled'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-disabled-large'],borderColorHover:o.theme.colors['border-disabled'],...o.palette}))),error:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-100'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-100'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-100'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-100'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100'],borderColor:o.theme.colors['border-brand-primary-active'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-brand-primary-100']).darken(3).toString(),borderColorHover:o.theme.colors['border-brand-primary-active'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))},contrast:{disabled:styled.css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-onmain-secondary'],borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),error:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-200'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-200'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-200'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-200'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-primary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),default:styled.css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor.default(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))}};const Root=styled__default.default.label.withConfig({shouldForwardProp:shouldForwardFormLabelProp}).withConfig({displayName:"FormLabel__Root",componentId:"ui__sc-mry1kz-0"})([""," "," "," ",""],(o=>`\n box-sizing: border-box;\n isolation: isolate;\n display: ${o.inline?'inline-flex':'flex'};\n cursor: ${o.disabled?'not-allowed':'pointer'};\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `),(o=>{if(o.clear)return'';const r=o.contrast||o.onColored?COLOR_SCHEMA.contrast:COLOR_SCHEMA.default;return o.disabled?r.disabled:o.error?r.error:o.success?r.success:o.checked?r.checked:r.default}),responsiveSize.responsiveSize,responsiveMargin.responsiveMargin);const Content=styled__default.default.span.withConfig({displayName:"FormLabel__Content",componentId:"ui__sc-mry1kz-1"})(["box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;margin-left:12px;"]);exports.Content=Content,exports.Root=Root;
2
2
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/FormLabel/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { focus } from 'mixins/focus'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledFormLabelProps, FormLabelPalette, StyledFormLabelHintProps } from './types'\n\nconst shouldForwardFormLabelProp = createShouldForwardProp(\n (propKey) => !['inline', 'clear', 'disabled', 'error', 'success', 'checked', 'onColored'].includes(propKey)\n)\n\nconst template = (\n palette: Pick<\n FormLabelPalette,\n 'color' | 'backgroundColor' | 'borderColor' | 'colorHover' | 'backgroundColorHover' | 'borderColorHover'\n >\n) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n`\n\nconst hintTemplate = (\n palette: Pick<\n FormLabelPalette,\n | 'hintColor'\n | 'hintBackgroundColor'\n | 'hintColorHover'\n | 'hintBackgroundColorHover'\n | 'hintColorActive'\n | 'hintBackgroundColorActive'\n | 'hintColorDisabled'\n | 'hintBackgroundColorDisabled'\n >\n) => `\n color: ${palette.hintColor};\n background-color: ${palette.hintBackgroundColor};\n &:hover {\n color: ${palette.hintColorHover};\n background-color: ${palette.hintBackgroundColorHover};\n }\n &:active {\n color: ${palette.hintColorActive};\n background-color: ${palette.hintBackgroundColorActive};\n }\n &:disabled {\n color: ${palette.hintColorDisabled};\n background-color: ${palette.hintBackgroundColorDisabled};\n }\n`\n\nconst COLOR_SCHEMA = {\n default: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors['border-disabled'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors['border-disabled'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-100'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-100'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-brand-primary-100'],\n borderColor: props.theme.colors['border-brand-primary-active'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-brand-primary-100']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-brand-primary-active'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n onColored: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-onmain-secondary'],\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-200'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-200'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-200'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-200'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-primary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n}\n\nexport const Root = styled.label.withConfig<StyledFormLabelProps>({\n shouldForwardProp: shouldForwardFormLabelProp,\n})`\n ${(props) => `\n box-sizing: border-box;\n isolation: isolate;\n display: ${props.inline ? 'inline-flex' : 'flex'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n border-radius: 8px;\n padding: 12px;\n min-width: min-content;\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `}\n ${(props) => {\n if (props.clear) return ''\n\n const schema = props.onColored ? COLOR_SCHEMA.onColored : COLOR_SCHEMA.default\n\n if (props.disabled) return schema.disabled\n if (props.error) return schema.error\n if (props.success) return schema.success\n if (props.checked) return schema.checked\n\n return schema.default\n }}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n\nexport const Content = styled.span`\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-left: 12px;\n`\n\nexport const HintButton = styled.button.withConfig<StyledFormLabelHintProps>({\n shouldForwardProp: (propKey) => !['palette'].includes(propKey),\n})`\n box-sizing: border-box;\n appearance: none;\n padding: 2px;\n margin: 0;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n align-self: start;\n border-radius: 50%;\n background-color: transparent;\n margin-left: 6px;\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n\n ${(props) =>\n hintTemplate({\n hintColor: props.theme.colors['content-onmain-tertiary'],\n hintBackgroundColor: props.theme.colors.transparent,\n hintColorHover: props.theme.colors['content-onmain-primary'],\n hintBackgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-hover']).lighten(20).toString() as CSSColor,\n hintColorActive: props.theme.colors['content-onmain-primary'],\n hintBackgroundColorActive: props.theme.colors['bg-oncolor-hover'],\n hintColorDisabled: props.theme.colors['content-disabled'],\n hintBackgroundColorDisabled: props.theme.colors.transparent,\n ...props.palette,\n })}\n\n ${focus}\n`\n"],"names":["shouldForwardFormLabelProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","colorHover","backgroundColorHover","borderColorHover","COLOR_SCHEMA","default","disabled","css","props","theme","colors","error","success","checked","tinycolor","darken","toString","onColored","Root","styled","label","withConfig","shouldForwardProp","displayName","componentId","inline","clear","schema","responsiveSize","responsiveMargin","Content","span","HintButton","button","hintTemplate","hintColor","hintBackgroundColor","transparent","hintColorHover","hintBackgroundColorHover","lighten","hintColorActive","hintBackgroundColorActive","hintColorDisabled","hintBackgroundColorDisabled","focus"],"mappings":"keASA,MAAMA,2BAA6BC,MAAuBA,yBACvDC,IAAa,CAAC,SAAU,QAAS,WAAY,QAAS,UAAW,UAAW,aAAaC,SAASD,KAGrG,MAAME,SACJC,GAIG,cACMA,EAAQC,+BACGD,EAAQE,qCACZF,EAAQG,yCAEbH,EAAQI,sCACGJ,EAAQK,4CACZL,EAAQM,2BAiC5B,MAAMC,aAAe,CACnBC,QAAS,CACPC,SAAUC,OAAGA,IAAA,CAAA,GAAA,KACRC,GACDZ,SAAS,CACPE,M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FAEM,MAAMa,WAAab,gBAAAA,QAAOc,OAAOZ,WAAqC,CAC3EC,kBAAoB5B,IAAa,CAAC,WAAWC,SAASD,KACtD2B,WAAA,CAAAE,YAAA,wBAAAC,YAAA,mBAFwBL,CAExB,CAAA,sOAAA,IAAA,IAAA,KAcWX,GAAWA,EAAMF,SAAW,cAAgB,YAEpDE,IACD0B,MA7MC,eAXHrC,EAwNe,CACXsC,UAAW3B,EAAMC,MAAMC,OAAO,2BAC9B0B,oBAAqB5B,EAAMC,MAAMC,OAAO2B,YACxCC,eAAgB9B,EAAMC,MAAMC,OAAO,0BACnC6B,yBAA0BzB,UAAST,QAACG,EAAMC,MAAMC,OAAO,qBAAqB8B,QAAQ,IAAIxB,WACxFyB,gBAAiBjC,EAAMC,MAAMC,OAAO,0BACpCgC,0BAA2BlC,EAAMC,MAAMC,OAAO,oBAC9CiC,kBAAmBnC,EAAMC,MAAMC,OAAO,oBACtCkC,4BAA6BpC,EAAMC,MAAMC,OAAO2B,eAC7C7B,EAAMX,UArNIsC,mCACGtC,EAAQuC,iDAEjBvC,EAAQyC,0CACGzC,EAAQ0C,4DAGnB1C,EAAQ4C,2CACG5C,EAAQ6C,+DAGnB7C,EAAQ8C,6CACG9C,EAAQ+C,sCAxB9B/C,KAkOI,GAEFgD,MAAKA"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/FormLabel/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledFormLabelProps, FormLabelPalette } from './types'\n\nconst shouldForwardFormLabelProp = createShouldForwardProp(\n (propKey) => !['inline', 'clear', 'disabled', 'error', 'success', 'checked', 'onColored'].includes(propKey)\n)\n\nconst template = (palette: FormLabelPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n`\n\nconst COLOR_SCHEMA = {\n default: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors['border-disabled'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors['border-disabled'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-100'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-100'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-brand-primary-100'],\n borderColor: props.theme.colors['border-brand-primary-active'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-brand-primary-100']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-brand-primary-active'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n contrast: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-onmain-secondary'],\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-200'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-200'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-200'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-200'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-primary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n}\n\nexport const Root = styled.label.withConfig<StyledFormLabelProps>({\n shouldForwardProp: shouldForwardFormLabelProp,\n})`\n ${(props) => `\n box-sizing: border-box;\n isolation: isolate;\n display: ${props.inline ? 'inline-flex' : 'flex'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `}\n ${(props) => {\n if (props.clear) return ''\n\n const schema = props.contrast || props.onColored ? COLOR_SCHEMA.contrast : COLOR_SCHEMA.default\n\n if (props.disabled) return schema.disabled\n if (props.error) return schema.error\n if (props.success) return schema.success\n if (props.checked) return schema.checked\n\n return schema.default\n }}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n\nexport const Content = styled.span`\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-left: 12px;\n`\n"],"names":["shouldForwardFormLabelProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","colorHover","backgroundColorHover","borderColorHover","COLOR_SCHEMA","default","disabled","css","props","theme","colors","error","success","checked","tinycolor","darken","toString","contrast","Root","styled","label","withConfig","shouldForwardProp","displayName","componentId","inline","clear","schema","onColored","responsiveSize","responsiveMargin","Content","span"],"mappings":"ubAQA,MAAMA,2BAA6BC,MAAuBA,yBACvDC,IAAa,CAAC,SAAU,QAAS,WAAY,QAAS,UAAW,UAAW,aAAaC,SAASD,KAGrG,MAAME,SAAYC,GAA8B,cACrCA,EAAQC,+BACGD,EAAQE,qCACZF,EAAQG,yCAEbH,EAAQI,sCACGJ,EAAQK,4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O,GAGrBwB,eAAAA,eACAC,iBAAAA,wBAGSC,QAAUZ,gBAAAA,QAAOa,KAAIX,WAAA,CAAAE,YAAA,qBAAAC,YAAA,mBAAXL,CAMtB,CAAA"}
@@ -1,2 +1,2 @@
1
- import styled,{css}from'styled-components';import tinycolor from'../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.mjs';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';import{responsiveMargin}from'../../mixins/responsive-margin.mjs';import{focus}from'../../mixins/focus.mjs';const shouldForwardFormLabelProp=createShouldForwardProp((o=>!['inline','clear','disabled','error','success','checked','onColored'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n`;const COLOR_SCHEMA={default:{disabled:css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-disabled-large'],borderColor:o.theme.colors['border-disabled'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-disabled-large'],borderColorHover:o.theme.colors['border-disabled'],...o.palette}))),error:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-100'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-100'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-100'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-100'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100'],borderColor:o.theme.colors['border-brand-primary-active'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-brand-primary-100']).darken(3).toString(),borderColorHover:o.theme.colors['border-brand-primary-active'],...o.palette}))),default:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))},onColored:{disabled:css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-onmain-secondary'],borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),error:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-200'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-200'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-200'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-200'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-primary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),default:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))}};const Root=styled.label.withConfig({shouldForwardProp:shouldForwardFormLabelProp}).withConfig({displayName:"FormLabel__Root",componentId:"ui__sc-mry1kz-0"})([""," "," "," ",""],(o=>`\n box-sizing: border-box;\n isolation: isolate;\n display: ${o.inline?'inline-flex':'flex'};\n cursor: ${o.disabled?'not-allowed':'pointer'};\n border-radius: 8px;\n padding: 12px;\n min-width: min-content;\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `),(o=>{if(o.clear)return'';const r=o.onColored?COLOR_SCHEMA.onColored:COLOR_SCHEMA.default;return o.disabled?r.disabled:o.error?r.error:o.success?r.success:o.checked?r.checked:r.default}),responsiveSize,responsiveMargin);const Content=styled.span.withConfig({displayName:"FormLabel__Content",componentId:"ui__sc-mry1kz-1"})(["box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;margin-left:12px;"]);const HintButton=styled.button.withConfig({shouldForwardProp:o=>!['palette'].includes(o)}).withConfig({displayName:"FormLabel__HintButton",componentId:"ui__sc-mry1kz-2"})(["box-sizing:border-box;appearance:none;padding:2px;margin:0;border:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:start;border-radius:50%;background-color:transparent;margin-left:6px;cursor:",";"," ",""],(o=>o.disabled?'not-allowed':'pointer'),(o=>{return`\n color: ${(r={hintColor:o.theme.colors['content-onmain-tertiary'],hintBackgroundColor:o.theme.colors.transparent,hintColorHover:o.theme.colors['content-onmain-primary'],hintBackgroundColorHover:tinycolor(o.theme.colors['bg-oncolor-hover']).lighten(20).toString(),hintColorActive:o.theme.colors['content-onmain-primary'],hintBackgroundColorActive:o.theme.colors['bg-oncolor-hover'],hintColorDisabled:o.theme.colors['content-disabled'],hintBackgroundColorDisabled:o.theme.colors.transparent,...o.palette}).hintColor};\n background-color: ${r.hintBackgroundColor};\n &:hover {\n color: ${r.hintColorHover};\n background-color: ${r.hintBackgroundColorHover};\n }\n &:active {\n color: ${r.hintColorActive};\n background-color: ${r.hintBackgroundColorActive};\n }\n &:disabled {\n color: ${r.hintColorDisabled};\n background-color: ${r.hintBackgroundColorDisabled};\n }\n`;var r}),focus);export{Content,HintButton,Root};
1
+ import styled,{css}from'styled-components';import tinycolor from'../../external/.pnpm/tinycolor2@1.4.2/node_modules/tinycolor2/tinycolor.mjs';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';import{responsiveMargin}from'../../mixins/responsive-margin.mjs';const shouldForwardFormLabelProp=createShouldForwardProp((o=>!['inline','clear','disabled','error','success','checked','onColored'].includes(o)));const template=o=>`\n color: ${o.color};\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n &:hover {\n color: ${o.colorHover};\n background-color: ${o.backgroundColorHover};\n border-color: ${o.borderColorHover};\n }\n`;const COLOR_SCHEMA={default:{disabled:css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-disabled-large'],borderColor:o.theme.colors['border-disabled'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-disabled-large'],borderColorHover:o.theme.colors['border-disabled'],...o.palette}))),error:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-100'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-100'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-100'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-100'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-brand-primary-100'],borderColor:o.theme.colors['border-brand-primary-active'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-brand-primary-100']).darken(3).toString(),borderColorHover:o.theme.colors['border-brand-primary-active'],...o.palette}))),default:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))},contrast:{disabled:css(["",""],(o=>template({color:o.theme.colors['content-disabled'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-disabled'],backgroundColorHover:o.theme.colors['bg-onmain-secondary'],borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),error:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-error-200'],borderColor:o.theme.colors['alert-bg-error-500'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-error-200'],borderColorHover:o.theme.colors['alert-bg-error-500'],...o.palette}))),success:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['alert-bg-success-200'],borderColor:o.theme.colors['alert-success'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:o.theme.colors['alert-bg-success-200'],borderColorHover:o.theme.colors['alert-success'],...o.palette}))),checked:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-primary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette}))),default:css(["",""],(o=>template({color:o.theme.colors['content-onmain-primary'],backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],colorHover:o.theme.colors['content-onmain-primary'],backgroundColorHover:tinycolor(o.theme.colors['bg-onmain-secondary']).darken(3).toString(),borderColorHover:o.theme.colors['border-onmain-default-large'],...o.palette})))}};const Root=styled.label.withConfig({shouldForwardProp:shouldForwardFormLabelProp}).withConfig({displayName:"FormLabel__Root",componentId:"ui__sc-mry1kz-0"})([""," "," "," ",""],(o=>`\n box-sizing: border-box;\n isolation: isolate;\n display: ${o.inline?'inline-flex':'flex'};\n cursor: ${o.disabled?'not-allowed':'pointer'};\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `),(o=>{if(o.clear)return'';const r=o.contrast||o.onColored?COLOR_SCHEMA.contrast:COLOR_SCHEMA.default;return o.disabled?r.disabled:o.error?r.error:o.success?r.success:o.checked?r.checked:r.default}),responsiveSize,responsiveMargin);const Content=styled.span.withConfig({displayName:"FormLabel__Content",componentId:"ui__sc-mry1kz-1"})(["box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;margin-left:12px;"]);export{Content,Root};
2
2
  //# sourceMappingURL=style.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","sources":["../../../../src/components/FormLabel/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { focus } from 'mixins/focus'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledFormLabelProps, FormLabelPalette, StyledFormLabelHintProps } from './types'\n\nconst shouldForwardFormLabelProp = createShouldForwardProp(\n (propKey) => !['inline', 'clear', 'disabled', 'error', 'success', 'checked', 'onColored'].includes(propKey)\n)\n\nconst template = (\n palette: Pick<\n FormLabelPalette,\n 'color' | 'backgroundColor' | 'borderColor' | 'colorHover' | 'backgroundColorHover' | 'borderColorHover'\n >\n) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n`\n\nconst hintTemplate = (\n palette: Pick<\n FormLabelPalette,\n | 'hintColor'\n | 'hintBackgroundColor'\n | 'hintColorHover'\n | 'hintBackgroundColorHover'\n | 'hintColorActive'\n | 'hintBackgroundColorActive'\n | 'hintColorDisabled'\n | 'hintBackgroundColorDisabled'\n >\n) => `\n color: ${palette.hintColor};\n background-color: ${palette.hintBackgroundColor};\n &:hover {\n color: ${palette.hintColorHover};\n background-color: ${palette.hintBackgroundColorHover};\n }\n &:active {\n color: ${palette.hintColorActive};\n background-color: ${palette.hintBackgroundColorActive};\n }\n &:disabled {\n color: ${palette.hintColorDisabled};\n background-color: ${palette.hintBackgroundColorDisabled};\n }\n`\n\nconst COLOR_SCHEMA = {\n default: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors['border-disabled'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors['border-disabled'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-100'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-100'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-brand-primary-100'],\n borderColor: props.theme.colors['border-brand-primary-active'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-brand-primary-100']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-brand-primary-active'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n onColored: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-onmain-secondary'],\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-200'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-200'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-200'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-200'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-primary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n}\n\nexport const Root = styled.label.withConfig<StyledFormLabelProps>({\n shouldForwardProp: shouldForwardFormLabelProp,\n})`\n ${(props) => `\n box-sizing: border-box;\n isolation: isolate;\n display: ${props.inline ? 'inline-flex' : 'flex'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n border-radius: 8px;\n padding: 12px;\n min-width: min-content;\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `}\n ${(props) => {\n if (props.clear) return ''\n\n const schema = props.onColored ? COLOR_SCHEMA.onColored : COLOR_SCHEMA.default\n\n if (props.disabled) return schema.disabled\n if (props.error) return schema.error\n if (props.success) return schema.success\n if (props.checked) return schema.checked\n\n return schema.default\n }}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n\nexport const Content = styled.span`\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-left: 12px;\n`\n\nexport const HintButton = styled.button.withConfig<StyledFormLabelHintProps>({\n shouldForwardProp: (propKey) => !['palette'].includes(propKey),\n})`\n box-sizing: border-box;\n appearance: none;\n padding: 2px;\n margin: 0;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n align-self: start;\n border-radius: 50%;\n background-color: transparent;\n margin-left: 6px;\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n\n ${(props) =>\n hintTemplate({\n hintColor: props.theme.colors['content-onmain-tertiary'],\n hintBackgroundColor: props.theme.colors.transparent,\n hintColorHover: props.theme.colors['content-onmain-primary'],\n hintBackgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-hover']).lighten(20).toString() as CSSColor,\n hintColorActive: props.theme.colors['content-onmain-primary'],\n hintBackgroundColorActive: props.theme.colors['bg-oncolor-hover'],\n hintColorDisabled: props.theme.colors['content-disabled'],\n hintBackgroundColorDisabled: props.theme.colors.transparent,\n ...props.palette,\n })}\n\n ${focus}\n`\n"],"names":["shouldForwardFormLabelProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","colorHover","backgroundColorHover","borderColorHover","COLOR_SCHEMA","default","disabled","css","props","theme","colors","error","success","checked","tinycolor","darken","toString","onColored","Root","styled","label","withConfig","shouldForwardProp","displayName","componentId","inline","clear","schema","responsiveSize","responsiveMargin","Content","span","HintButton","button","hintTemplate","hintColor","hintBackgroundColor","transparent","hintColorHover","hintBackgroundColorHover","lighten","hintColorActive","hintBackgroundColorActive","hintColorDisabled","hintBackgroundColorDisabled","focus"],"mappings":"wXASA,MAAMA,2B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,EAAOf,QAC7BJ,EAAMK,QAAgBc,EAAOd,QAE1Bc,EAAOtB,OAAO,GAGrBuB,eACAC,wBAGSC,QAAUX,OAAOY,KAAIV,WAAA,CAAAE,YAAA,qBAAAC,YAAA,mBAAXL,CAMtB,CAAA,2FAEM,MAAMa,WAAab,OAAOc,OAAOZ,WAAqC,CAC3EC,kBAAoB5B,IAAa,CAAC,WAAWC,SAASD,KACtD2B,WAAA,CAAAE,YAAA,wBAAAC,YAAA,mBAFwBL,CAExB,CAAA,sOAAA,IAAA,IAAA,KAcWX,GAAWA,EAAMF,SAAW,cAAgB,YAEpDE,IACD0B,MA7MC,eAXHrC,EAwNe,CACXsC,UAAW3B,EAAMC,MAAMC,OAAO,2BAC9B0B,oBAAqB5B,EAAMC,MAAMC,OAAO2B,YACxCC,eAAgB9B,EAAMC,MAAMC,OAAO,0BACnC6B,yBAA0BzB,UAAUN,EAAMC,MAAMC,OAAO,qBAAqB8B,QAAQ,IAAIxB,WACxFyB,gBAAiBjC,EAAMC,MAAMC,OAAO,0BACpCgC,0BAA2BlC,EAAMC,MAAMC,OAAO,oBAC9CiC,kBAAmBnC,EAAMC,MAAMC,OAAO,oBACtCkC,4BAA6BpC,EAAMC,MAAMC,OAAO2B,eAC7C7B,EAAMX,UArNIsC,mCACGtC,EAAQuC,iDAEjBvC,EAAQyC,0CACGzC,EAAQ0C,4DAGnB1C,EAAQ4C,2CACG5C,EAAQ6C,+DAGnB7C,EAAQ8C,6CACG9C,EAAQ+C,sCAxB9B/C,KAkOI,GAEFgD"}
1
+ {"version":3,"file":"style.mjs","sources":["../../../../src/components/FormLabel/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledFormLabelProps, FormLabelPalette } from './types'\n\nconst shouldForwardFormLabelProp = createShouldForwardProp(\n (propKey) => !['inline', 'clear', 'disabled', 'error', 'success', 'checked', 'onColored'].includes(propKey)\n)\n\nconst template = (palette: FormLabelPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n`\n\nconst COLOR_SCHEMA = {\n default: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors['border-disabled'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors['border-disabled'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-100'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-100'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-brand-primary-100'],\n borderColor: props.theme.colors['border-brand-primary-active'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-brand-primary-100']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-brand-primary-active'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n contrast: {\n disabled: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-onmain-secondary'],\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n error: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-error-200'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-200'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['alert-bg-success-200'],\n borderColor: props.theme.colors['alert-success'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-200'],\n borderColorHover: props.theme.colors['alert-success'],\n ...props.palette,\n })}\n `,\n checked: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-primary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-primary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-primary'],\n backgroundColorHover: tinycolor(props.theme.colors['bg-onmain-secondary']).darken(3).toString() as CSSColor,\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n}\n\nexport const Root = styled.label.withConfig<StyledFormLabelProps>({\n shouldForwardProp: shouldForwardFormLabelProp,\n})`\n ${(props) => `\n box-sizing: border-box;\n isolation: isolate;\n display: ${props.inline ? 'inline-flex' : 'flex'};\n cursor: ${props.disabled ? 'not-allowed' : 'pointer'};\n border: 1px solid transparent;\n background-color: transparent;\n transition-property: background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n `}\n ${(props) => {\n if (props.clear) return ''\n\n const schema = props.contrast || props.onColored ? COLOR_SCHEMA.contrast : COLOR_SCHEMA.default\n\n if (props.disabled) return schema.disabled\n if (props.error) return schema.error\n if (props.success) return schema.success\n if (props.checked) return schema.checked\n\n return schema.default\n }}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n\nexport const Content = styled.span`\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-left: 12px;\n`\n"],"names":["shouldForwardFormLabelProp","createShouldForwardProp","propKey","includes","template","palette","color","backgroundColor","borderColor","colorHover","backgroundColorHover","borderColorHover","COLOR_SCHEMA","default","disabled","css","props","theme","colors","error","success","checked","tinycolor","darken","toString","contrast","Root","styled","label","withConfig","shouldForwardProp","displayName","componentId","inline","clear","schema","onColored","responsiveSize","responsiveMargin","Content","span"],"mappings":"8UAQA,MAAMA,2BAA6BC,yBAChCC,IAAa,CAAC,SAAU,QAAS,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MK,QAAgBc,EAAOd,QAE1Bc,EAAOtB,OAAO,GAGrBwB,eACAC,wBAGSC,QAAUZ,OAAOa,KAAIX,WAAA,CAAAE,YAAA,qBAAAC,YAAA,mBAAXL,CAMtB,CAAA"}
@@ -1,2 +1,2 @@
1
- 'use strict';function _interopNamespace(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((c=>{if(c!=='default'){var o=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(r,c,o.get?o:{enumerable:!0,get:()=>e[c]})}})),r.default=e,Object.freeze(r)}const iconPackIcons=require('../../../external/.pnpm/@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.js').default.reduce(((e,r)=>(e[r.componentName.charAt(0).toLowerCase()+r.componentName.slice(1)]=()=>{return e=/* webpackMode: "eager" */'../../../assets/'.concat(r.fileName,'.svg'),Promise.resolve().then((()=>_interopNamespace(require(e))));var e},e)),{});exports.iconPackIcons=iconPackIcons;
1
+ 'use strict';function _interopNamespace(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((c=>{if(c!=='default'){var o=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(r,c,o.get?o:{enumerable:!0,get:()=>e[c]})}})),r.default=e,Object.freeze(r)}const iconPackIcons=require('../../../external/.pnpm/@foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.js').default.reduce(((e,r)=>(e[r.componentName.charAt(0).toLowerCase()+r.componentName.slice(1)]=()=>{return e=/* webpackMode: "eager" */'../../../assets/'.concat(r.fileName,'.svg'),Promise.resolve().then((()=>_interopNamespace(require(e))));var e},e)),{});exports.iconPackIcons=iconPackIcons;
2
2
  //# sourceMappingURL=icon-pack.js.map
@@ -1,2 +1,2 @@
1
- import IconPackIcons from'../../../external/.pnpm/@foxford_icon-pack@0.6.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.mjs';const iconPackIcons=IconPackIcons.reduce(((o,c)=>(o[c.componentName.charAt(0).toLowerCase()+c.componentName.slice(1)]=()=>import(/* webpackMode: "eager" */'../../../assets/'.concat(c.fileName,'.svg')),o)),{});export{iconPackIcons};
1
+ import IconPackIcons from'../../../external/.pnpm/@foxford_icon-pack@0.8.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@foxford/icon-pack/components.json.mjs';const iconPackIcons=IconPackIcons.reduce(((o,c)=>(o[c.componentName.charAt(0).toLowerCase()+c.componentName.slice(1)]=()=>import(/* webpackMode: "eager" */'../../../assets/'.concat(c.fileName,'.svg')),o)),{});export{iconPackIcons};
2
2
  //# sourceMappingURL=icon-pack.mjs.map
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var styled=require('styled-components');var withMergedProps=require('../../hocs/withMergedProps.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Input_Phone=require('../Input.Phone/Input.Phone.js');var constants=require('../FormInputLabel/constants.js');var FormInputLabel=require('../FormInputLabel/FormInputLabel.js');var Icon=require('../Icon/Icon.js');var Spacer=require('../Spacer/Spacer.js');const Input=Object.assign(withMergedProps.withMergedProps(React.forwardRef(((e,t)=>{const r=styled.useTheme();const{size:n="m",mask:i="",rounded:o=!0,color:a="mineShaft",placeholderColor:s="silver",width:c=r.defaultInputControlsWidth,type:u="text",labelPosition:m="dynamic",textProps:l={},iconProps:p={},controls:g={},preset:d,className:h,style:f,sizeXXS:X,sizeXS:S,sizeS:y,sizeM:b,sizeL:L,sizeXL:v,sizeUnits:I,sizes:R,margin:x,marginXXS:z,marginXS:P,marginS:$,marginM:T,marginL:q,marginXL:w,marginTop:C,marginTopXXS:M,marginTopXS:j,marginTopS:B,marginTopM:F,marginTopL:k,marginTopXL:A,marginRight:E,marginRightXXS:N,marginRightXS:U,marginRightS:V,marginRightM:O,marginRightL:_,marginRightXL:D,marginBottom:H,marginBottomXXS:W,marginBottomXS:Z,marginBottomS:G,marginBottomM:J,marginBottomL:K,marginBottomXL:Q,marginLeft:Y,marginLeftXXS:ee,marginLeftXS:te,marginLeftS:re,marginLeftM:ne,marginLeftL:ie,marginLeftXL:oe,marginUnits:ae,palette:se,widthXXS:ce,widthXS:ue,widthS:me,widthM:le,widthL:pe,widthXL:ge,error:de,success:he,label:fe,icon:Xe,text:Se,primary:ye,secondary:be,onColored:Le,fluid:ve,disabled:Ie,inline:Re,inputRef:xe,...ze}=e;const{icon:Pe,iconProps:$e={},buttonProps:Te={}}=g.additional??{};const{icon:qe,iconProps:we={},buttonProps:Ce=[]}=g.number??{};const[Me,je]=Array.isArray(qe)?qe:[qe];const Be=(Array.isArray(Ce)?Ce[0]:Ce)??{};const Fe=(Array.isArray(Ce)?Ce[1]:{})??{};const ke=React.useRef(null);React.useImperativeHandle(t,(()=>ke.current),[]);const Ae=typeof ze.value=='string'||typeof ze.value=='number'||typeof ze.defaultValue=='string'||typeof ze.defaultValue=='number';const[Ee,Ne]=React.useState(Ae);const[Ue,Ve]=React.useState(Ae);const[Oe,_e]=React.useState((()=>{if(u!=='number'||ze.min===void 0)return!1;const{value:e=1/0,defaultValue:t=1/0}=ze;const r=typeof e=='number'?e:parseFloat(e);const n=typeof t=='number'?t:parseFloat(t);const i=typeof ze.min=='number'?ze.min:parseFloat(ze.min);return Math.min(r,n)<=i}));const[De,He]=React.useState((()=>{if(u!=='number'||ze.max===void 0)return!1;const{value:e=-1/0,defaultValue:t=-1/0}=ze;const r=typeof e=='number'?e:parseFloat(e);const n=typeof t=='number'?t:parseFloat(t);const i=typeof ze.max=='number'?ze.max:parseFloat(ze.max);return Math.max(r,n)>=i}));return d!=='brand'?require$$0.jsx(style.Root,{...ze,inputRef:xe??(e=>{ke.current=e}),className:h,style:f,size:typeof n=='number'?n:void 0,mask:i,rounded:o,color:a,placeholderColor:s,width:c,widthXXS:ce,widthXS:ue,widthS:me,widthM:le,widthL:pe,widthXL:ge,error:de,type:u,fluid:ve,disabled:Ie}):require$$0.jsx(FormInputLabel.FormInputLabel,{className:h,style:f,size:n,sizeXXS:X,sizeXS:S,sizeS:y,sizeM:b,sizeL:L,sizeXL:v,sizeUnits:I,sizes:R,margin:x,marginXXS:z,marginXS:P,marginS:$,marginM:T,marginL:q,marginXL:w,marginTop:C,marginTopXXS:M,marginTopXS:j,marginTopS:B,marginTopM:F,marginTopL:k,marginTopXL:A,marginRight:E,marginRightXXS:N,marginRightXS:U,marginRightS:V,marginRightM:O,marginRightL:_,marginRightXL:D,marginBottom:H,marginBottomXXS:W,marginBottomXS:Z,marginBottomS:G,marginBottomM:J,marginBottomL:K,marginBottomXL:Q,marginLeft:Y,marginLeftXXS:ee,marginLeftXS:te,marginLeftS:re,marginLeftM:ne,marginLeftL:ie,marginLeftXL:oe,marginUnits:ae,palette:se,error:de,success:he,label:fe,labelPosition:m,icon:Xe,text:Se,primary:ye,secondary:be,onColored:Le,disabled:Ie,inline:Re,active:Ee,textProps:l,iconProps:{size:24,color:Ie?'content-disabled':'content-onmain-tertiary',...p},onClick:()=>{ke.current&&ke.current.focus()},onFocus:e=>{e.target!==e.currentTarget&&Ne(!0)},onBlur:e=>{e.target===e.currentTarget||Ue||Ne(!1)},input:require$$0.jsx(style.Input,{...ze,inputRef:e=>{ke.current=e},mask:i,palette:se,type:u,label:fe,labelPosition:m,disabled:Ie,active:Ee,onChange:e=>{if(ze.onChange&&ze.onChange(e),u==='number'){const t=parseFloat(e.currentTarget.value);const r=t<=parseFloat(e.currentTarget.min);const n=t>=parseFloat(e.currentTarget.max);_e(r),He(n),(r||n)&&e.currentTarget.focus()}},onBlur:e=>{e.stopPropagation(),ze.onBlur&&ze.onBlur(e),Ve(Boolean(e.currentTarget.value)),Ne(Boolean(e.currentTarget.value))}}),controls:Pe||u==='number'?require$$0.jsxs(require$$0.Fragment,{children:[Pe&&require$$0.jsx(style.InputControl,{...Te,type:"button",palette:se,disabled:Ie,onClick:e=>{e.stopPropagation(),Te.onClick&&Te.onClick(e)},children:require$$0.jsx(Icon.Icon,{as:"span",size:24,color:"inherit",name:typeof Pe=='string'?Pe:void 0,icon:typeof Pe!='string'?Pe:void 0,...$e})}),u==='number'&&require$$0.jsxs(Spacer.Spacer,{display:"flex",marginLeft:4,children:[require$$0.jsx(style.InputControl,{...Be,type:"button",palette:se,disabled:Ie||Oe,onClick:e=>{e.stopPropagation(),Be.onClick&&Be.onClick(e);try{if(ke.current){const e=ke.current.value;if(ke.current.stepDown(),e!==ke.current.value){const e=new Event('input',{bubbles:!0});ke.current.dispatchEvent(e)}}}catch(e){console.error(e)}},children:require$$0.jsx(Icon.Icon,Me===void 0?{as:"span",size:24,color:"inherit",name:"minus",preset:"brand",...we}:{as:"span",size:24,color:"inherit",name:typeof Me=='string'?Me:void 0,icon:typeof Me!='string'?Me:void 0,...we})}),require$$0.jsx(style.InputControl,{...Fe,type:"button",palette:se,disabled:Ie||De,onClick:e=>{e.stopPropagation(),Fe.onClick&&Fe.onClick(e);try{if(ke.current){const e=ke.current.value;if(ke.current.stepUp(),e!==ke.current.value){const e=new Event('input',{bubbles:!0});ke.current.dispatchEvent(e)}}}catch(e){console.error(e)}},children:require$$0.jsx(Icon.Icon,je===void 0?{as:"span",size:24,color:"inherit",name:"plus",preset:"brand",...we}:{as:"span",size:24,color:"inherit",name:typeof je=='string'?je:void 0,icon:typeof je!='string'?je:void 0,...we})})]})]}):void 0})})),{sizes:constants.SIZES,displayName:"Input"}),{Phone:Input_Phone.InputPhone});exports.COMPONENT_NAME="Input",exports.Input=Input;
1
+ 'use strict';var React=require('react');var styled=require('styled-components');var withMergedProps=require('../../hocs/withMergedProps.js');var style=require('./style.js');var require$$0=require('react/jsx-runtime');var Input_Phone=require('../Input.Phone/Input.Phone.js');var constants=require('../FormInputLabel/constants.js');var FormInputLabel=require('../FormInputLabel/FormInputLabel.js');var Icon=require('../Icon/Icon.js');var Spacer=require('../Spacer/Spacer.js');const Input=Object.assign(withMergedProps.withMergedProps(React.forwardRef(((e,t)=>{const r=styled.useTheme();const{size:n="m",mask:i="",rounded:o=!0,color:a="mineShaft",placeholderColor:s="silver",width:c=r.defaultInputControlsWidth,type:u="text",labelPosition:m="dynamic",textProps:l={},iconProps:p={},controls:g={},preset:d,className:h,style:f,sizeXXS:X,sizeXS:S,sizeS:y,sizeM:b,sizeL:L,sizeXL:v,sizeUnits:I,sizes:R,margin:x,marginXXS:z,marginXS:P,marginS:$,marginM:T,marginL:q,marginXL:w,marginTop:C,marginTopXXS:M,marginTopXS:j,marginTopS:B,marginTopM:F,marginTopL:k,marginTopXL:A,marginRight:E,marginRightXXS:N,marginRightXS:V,marginRightS:O,marginRightM:U,marginRightL:_,marginRightXL:D,marginBottom:H,marginBottomXXS:W,marginBottomXS:Z,marginBottomS:G,marginBottomM:J,marginBottomL:K,marginBottomXL:Q,marginLeft:Y,marginLeftXXS:ee,marginLeftXS:te,marginLeftS:re,marginLeftM:ne,marginLeftL:ie,marginLeftXL:oe,palette:ae,widthXXS:se,widthXS:ce,widthS:ue,widthM:me,widthL:le,widthXL:pe,error:ge,success:de,label:he,icon:fe,text:Xe,primary:Se,secondary:ye,onColored:be,fluid:Le,disabled:ve,inline:Ie,inputRef:Re,...xe}=e;const{icon:ze,iconProps:Pe={},buttonProps:$e={}}=g.additional??{};const{icon:Te,iconProps:qe={},buttonProps:we=[]}=g.number??{};const[Ce,Me]=Array.isArray(Te)?Te:[Te];const je=(Array.isArray(we)?we[0]:we)??{};const Be=(Array.isArray(we)?we[1]:{})??{};const Fe=React.useRef(null);React.useImperativeHandle(t,(()=>Fe.current),[]);const ke=typeof xe.value=='string'||typeof xe.value=='number'||typeof xe.defaultValue=='string'||typeof xe.defaultValue=='number';const[Ae,Ee]=React.useState(ke);const[Ne,Ve]=React.useState(ke);const[Oe,Ue]=React.useState((()=>{if(u!=='number'||xe.min===void 0)return!1;const{value:e=1/0,defaultValue:t=1/0}=xe;const r=typeof e=='number'?e:parseFloat(e);const n=typeof t=='number'?t:parseFloat(t);const i=typeof xe.min=='number'?xe.min:parseFloat(xe.min);return Math.min(r,n)<=i}));const[_e,De]=React.useState((()=>{if(u!=='number'||xe.max===void 0)return!1;const{value:e=-1/0,defaultValue:t=-1/0}=xe;const r=typeof e=='number'?e:parseFloat(e);const n=typeof t=='number'?t:parseFloat(t);const i=typeof xe.max=='number'?xe.max:parseFloat(xe.max);return Math.max(r,n)>=i}));return d!=='brand'?require$$0.jsx(style.Root,{...xe,inputRef:Re??(e=>{Fe.current=e}),className:h,style:f,size:typeof n=='number'?n:void 0,mask:i,rounded:o,color:a,placeholderColor:s,width:c,widthXXS:se,widthXS:ce,widthS:ue,widthM:me,widthL:le,widthXL:pe,error:ge,type:u,fluid:Le,disabled:ve}):require$$0.jsx(FormInputLabel.FormInputLabel,{className:h,style:f,size:n,sizeXXS:X,sizeXS:S,sizeS:y,sizeM:b,sizeL:L,sizeXL:v,sizeUnits:I,sizes:R,margin:x,marginXXS:z,marginXS:P,marginS:$,marginM:T,marginL:q,marginXL:w,marginTop:C,marginTopXXS:M,marginTopXS:j,marginTopS:B,marginTopM:F,marginTopL:k,marginTopXL:A,marginRight:E,marginRightXXS:N,marginRightXS:V,marginRightS:O,marginRightM:U,marginRightL:_,marginRightXL:D,marginBottom:H,marginBottomXXS:W,marginBottomXS:Z,marginBottomS:G,marginBottomM:J,marginBottomL:K,marginBottomXL:Q,marginLeft:Y,marginLeftXXS:ee,marginLeftXS:te,marginLeftS:re,marginLeftM:ne,marginLeftL:ie,marginLeftXL:oe,palette:ae,error:ge,success:de,label:he,labelPosition:m,icon:fe,text:Xe,primary:Se,secondary:ye,onColored:be,disabled:ve,inline:Ie,active:Ae,textProps:l,iconProps:{size:24,color:ve?'content-disabled':'content-onmain-tertiary',...p},onClick:()=>{Fe.current&&Fe.current.focus()},onFocus:e=>{e.target!==e.currentTarget&&Ee(!0)},onBlur:e=>{e.target===e.currentTarget||Ne||Ee(!1)},input:require$$0.jsx(style.Input,{...xe,inputRef:e=>{Fe.current=e},mask:i,palette:ae,type:u,label:he,labelPosition:m,disabled:ve,active:Ae,onChange:e=>{if(xe.onChange&&xe.onChange(e),u==='number'){const t=parseFloat(e.currentTarget.value);const r=t<=parseFloat(e.currentTarget.min);const n=t>=parseFloat(e.currentTarget.max);Ue(r),De(n),(r||n)&&e.currentTarget.focus()}},onBlur:e=>{e.stopPropagation(),xe.onBlur&&xe.onBlur(e),Ve(Boolean(e.currentTarget.value)),Ee(Boolean(e.currentTarget.value))}}),controls:ze||u==='number'?require$$0.jsxs(require$$0.Fragment,{children:[ze&&require$$0.jsx(style.InputControl,{...$e,type:"button",palette:ae,disabled:ve,onClick:e=>{e.stopPropagation(),$e.onClick&&$e.onClick(e)},children:require$$0.jsx(Icon.Icon,{as:"span",size:24,color:"inherit",name:typeof ze=='string'?ze:void 0,icon:typeof ze!='string'?ze:void 0,...Pe})}),u==='number'&&require$$0.jsxs(Spacer.Spacer,{display:"flex",marginLeft:4,children:[require$$0.jsx(style.InputControl,{...je,type:"button",palette:ae,disabled:ve||Oe,onClick:e=>{e.stopPropagation(),je.onClick&&je.onClick(e);try{if(Fe.current){const e=Fe.current.value;if(Fe.current.stepDown(),e!==Fe.current.value){const e=new Event('input',{bubbles:!0});Fe.current.dispatchEvent(e)}}}catch(e){console.error(e)}},children:require$$0.jsx(Icon.Icon,Ce===void 0?{as:"span",size:24,color:"inherit",name:"minus",preset:"brand",...qe}:{as:"span",size:24,color:"inherit",name:typeof Ce=='string'?Ce:void 0,icon:typeof Ce!='string'?Ce:void 0,...qe})}),require$$0.jsx(style.InputControl,{...Be,type:"button",palette:ae,disabled:ve||_e,onClick:e=>{e.stopPropagation(),Be.onClick&&Be.onClick(e);try{if(Fe.current){const e=Fe.current.value;if(Fe.current.stepUp(),e!==Fe.current.value){const e=new Event('input',{bubbles:!0});Fe.current.dispatchEvent(e)}}}catch(e){console.error(e)}},children:require$$0.jsx(Icon.Icon,Me===void 0?{as:"span",size:24,color:"inherit",name:"plus",preset:"brand",...qe}:{as:"span",size:24,color:"inherit",name:typeof Me=='string'?Me:void 0,icon:typeof Me!='string'?Me:void 0,...qe})})]})]}):void 0})})),{sizes:constants.SIZES,displayName:"Input"}),{Phone:Input_Phone.InputPhone});exports.COMPONENT_NAME="Input",exports.Input=Input;
2
2
  //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sources":["../../../../src/components/Input/Input.tsx"],"sourcesContent":["import { forwardRef, useState, useImperativeHandle, useRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { FormInputLabel, SIZES } from 'components/FormInputLabel'\nimport { Icon } from 'components/Icon'\nimport { InputPhone } from 'components/Input.Phone'\nimport { Spacer } from 'components/Spacer'\nimport * as Styled from './style'\nimport type { InputProps } from './types'\n\nconst COMPONENT_NAME = 'Input'\n\n/**\n *\n * Component accepts all \\<input\\> attributes and \"react-input-mask\" v2.0.4 props.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to \\<input\\>.\n *\n * See full [InputProps](https://github.com/foxford/ui/blob/master/src/components/Input/types.ts)\n */\nconst Input: React.ForwardRefExoticComponent<InputProps> & { Phone: typeof InputPhone } = Object.assign(\n withMergedProps<InputProps, HTMLInputElement>(\n forwardRef((props, forwardedRef) => {\n const theme = useTheme()\n\n const {\n size = 'm',\n mask = '',\n rounded = true,\n color = 'mineShaft',\n placeholderColor = 'silver',\n width = theme.defaultInputControlsWidth,\n type = 'text',\n labelPosition = 'dynamic',\n textProps = {},\n iconProps = {},\n controls = {},\n preset,\n className,\n style,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n margin,\n marginXXS,\n marginXS,\n marginS,\n marginM,\n marginL,\n marginXL,\n marginTop,\n marginTopXXS,\n marginTopXS,\n marginTopS,\n marginTopM,\n marginTopL,\n marginTopXL,\n marginRight,\n marginRightXXS,\n marginRightXS,\n marginRightS,\n marginRightM,\n marginRightL,\n marginRightXL,\n marginBottom,\n marginBottomXXS,\n marginBottomXS,\n marginBottomS,\n marginBottomM,\n marginBottomL,\n marginBottomXL,\n marginLeft,\n marginLeftXXS,\n marginLeftXS,\n marginLeftS,\n marginLeftM,\n marginLeftL,\n marginLeftXL,\n marginUnits,\n palette,\n widthXXS,\n widthXS,\n widthS,\n widthM,\n widthL,\n widthXL,\n error,\n success,\n label,\n icon,\n text,\n primary,\n secondary,\n onColored,\n fluid,\n disabled,\n inline,\n inputRef,\n ...inputProps\n } = props\n\n const {\n icon: additionalControlIcon,\n iconProps: additionalControlIconProps = {},\n buttonProps: additionalControlButtonProps = {},\n } = controls.additional ?? {}\n\n const {\n icon: numberControlIcon,\n iconProps: numberControlIconProps = {},\n buttonProps: numberControlButtonProps = [],\n } = controls.number ?? {}\n\n const [minus, plus] = Array.isArray(numberControlIcon) ? numberControlIcon : [numberControlIcon]\n\n const minusButtonProps =\n (Array.isArray(numberControlButtonProps) ? numberControlButtonProps[0] : numberControlButtonProps) ?? {}\n\n const plusButtonProps = (Array.isArray(numberControlButtonProps) ? numberControlButtonProps[1] : {}) ?? {}\n\n const ref = useRef<HTMLInputElement | null>(null)\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(forwardedRef, () => ref.current, [])\n\n const hasInitValue =\n typeof inputProps.value === 'string' ||\n typeof inputProps.value === 'number' ||\n typeof inputProps.defaultValue === 'string' ||\n typeof inputProps.defaultValue === 'number'\n\n const [active, setActive] = useState(hasInitValue)\n const [hasValue, setHasValue] = useState(hasInitValue)\n\n const [minusDisabled, setMinusDisabled] = useState(() => {\n if (type !== 'number' || inputProps.min === undefined) return false\n\n const { value = Infinity, defaultValue = Infinity } = inputProps\n\n const initValue = typeof value === 'number' ? value : parseFloat(value)\n const initDefaultValue = typeof defaultValue === 'number' ? defaultValue : parseFloat(defaultValue)\n const minValue = typeof inputProps.min === 'number' ? inputProps.min : parseFloat(inputProps.min)\n\n return Math.min(initValue, initDefaultValue) <= minValue\n })\n\n const [plusDisabled, setPlusDisabled] = useState(() => {\n if (type !== 'number' || inputProps.max === undefined) return false\n\n const { value = -Infinity, defaultValue = -Infinity } = inputProps\n\n const initValue = typeof value === 'number' ? value : parseFloat(value)\n const initDefaultValue = typeof defaultValue === 'number' ? defaultValue : parseFloat(defaultValue)\n const maxValue = typeof inputProps.max === 'number' ? inputProps.max : parseFloat(inputProps.max)\n\n return Math.max(initValue, initDefaultValue) >= maxValue\n })\n\n if (preset !== 'brand') {\n return (\n <Styled.Root\n {...inputProps}\n inputRef={\n inputRef ??\n ((input) => {\n ref.current = input\n })\n }\n className={className}\n style={style}\n size={typeof size === 'number' ? size : undefined}\n mask={mask}\n rounded={rounded}\n color={color}\n placeholderColor={placeholderColor}\n width={width}\n widthXXS={widthXXS}\n widthXS={widthXS}\n widthS={widthS}\n widthM={widthM}\n widthL={widthL}\n widthXL={widthXL}\n error={error}\n type={type}\n fluid={fluid}\n disabled={disabled}\n />\n )\n }\n\n return (\n <FormInputLabel\n className={className}\n style={style}\n size={size}\n sizeXXS={sizeXXS}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n sizeUnits={sizeUnits}\n sizes={sizes}\n margin={margin}\n marginXXS={marginXXS}\n marginXS={marginXS}\n marginS={marginS}\n marginM={marginM}\n marginL={marginL}\n marginXL={marginXL}\n marginTop={marginTop}\n marginTopXXS={marginTopXXS}\n marginTopXS={marginTopXS}\n marginTopS={marginTopS}\n marginTopM={marginTopM}\n marginTopL={marginTopL}\n marginTopXL={marginTopXL}\n marginRight={marginRight}\n marginRightXXS={marginRightXXS}\n marginRightXS={marginRightXS}\n marginRightS={marginRightS}\n marginRightM={marginRightM}\n marginRightL={marginRightL}\n marginRightXL={marginRightXL}\n marginBottom={marginBottom}\n marginBottomXXS={marginBottomXXS}\n marginBottomXS={marginBottomXS}\n marginBottomS={marginBottomS}\n marginBottomM={marginBottomM}\n marginBottomL={marginBottomL}\n marginBottomXL={marginBottomXL}\n marginLeft={marginLeft}\n marginLeftXXS={marginLeftXXS}\n marginLeftXS={marginLeftXS}\n marginLeftS={marginLeftS}\n marginLeftM={marginLeftM}\n marginLeftL={marginLeftL}\n marginLeftXL={marginLeftXL}\n marginUnits={marginUnits}\n palette={palette}\n error={error}\n success={success}\n label={label}\n labelPosition={labelPosition}\n icon={icon}\n text={text}\n primary={primary}\n secondary={secondary}\n onColored={onColored}\n disabled={disabled}\n inline={inline}\n active={active}\n textProps={textProps}\n iconProps={{\n size: 24,\n color: disabled ? 'content-disabled' : 'content-onmain-tertiary',\n ...iconProps,\n }}\n onClick={() => {\n if (ref.current) {\n ref.current.focus()\n }\n }}\n onFocus={(evt) => {\n if (evt.target !== evt.currentTarget) {\n setActive(true)\n }\n }}\n onBlur={(evt) => {\n if (evt.target !== evt.currentTarget && !hasValue) {\n setActive(false)\n }\n }}\n input={\n <Styled.Input\n {...inputProps}\n inputRef={(input) => {\n ref.current = input\n }}\n mask={mask}\n palette={palette}\n type={type}\n label={label}\n labelPosition={labelPosition}\n disabled={disabled}\n active={active}\n onChange={(evt) => {\n if (inputProps.onChange) {\n inputProps.onChange(evt)\n }\n\n if (type === 'number') {\n const currentValue = parseFloat(evt.currentTarget.value)\n\n const minValueReached = currentValue <= parseFloat(evt.currentTarget.min)\n const maxValueReached = currentValue >= parseFloat(evt.currentTarget.max)\n\n setMinusDisabled(minValueReached)\n setPlusDisabled(maxValueReached)\n\n if (minValueReached || maxValueReached) {\n evt.currentTarget.focus()\n }\n }\n }}\n onBlur={(evt) => {\n evt.stopPropagation()\n if (inputProps.onBlur) {\n inputProps.onBlur(evt)\n }\n\n setHasValue(Boolean(evt.currentTarget.value))\n setActive(Boolean(evt.currentTarget.value))\n }}\n />\n }\n controls={\n additionalControlIcon || type === 'number' ? (\n <>\n {additionalControlIcon && (\n <Styled.InputControl\n {...additionalControlButtonProps}\n type='button'\n palette={palette}\n disabled={disabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (additionalControlButtonProps.onClick) {\n additionalControlButtonProps.onClick(evt)\n }\n }}\n >\n <Icon\n as='span'\n size={24}\n color='inherit'\n name={typeof additionalControlIcon === 'string' ? additionalControlIcon : undefined}\n icon={typeof additionalControlIcon !== 'string' ? additionalControlIcon : undefined}\n {...additionalControlIconProps}\n />\n </Styled.InputControl>\n )}\n {type === 'number' && (\n <Spacer display='flex' marginLeft={4}>\n <Styled.InputControl\n {...minusButtonProps}\n type='button'\n palette={palette}\n disabled={disabled || minusDisabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (minusButtonProps.onClick) {\n minusButtonProps.onClick(evt)\n }\n\n try {\n if (ref.current) {\n const prev = ref.current.value\n ref.current.stepDown()\n\n const decremented = ref.current.value\n if (prev !== decremented) {\n const event = new Event('input', { bubbles: true })\n ref.current.dispatchEvent(event)\n }\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(err)\n }\n }}\n >\n {minus === undefined ? (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name='minus'\n preset='brand'\n {...numberControlIconProps}\n />\n ) : (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name={typeof minus === 'string' ? minus : undefined}\n icon={typeof minus !== 'string' ? minus : undefined}\n {...numberControlIconProps}\n />\n )}\n </Styled.InputControl>\n <Styled.InputControl\n {...plusButtonProps}\n type='button'\n palette={palette}\n disabled={disabled || plusDisabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (plusButtonProps.onClick) {\n plusButtonProps.onClick(evt)\n }\n\n try {\n if (ref.current) {\n const prev = ref.current.value\n ref.current.stepUp()\n\n const incremented = ref.current.value\n if (prev !== incremented) {\n const event = new Event('input', { bubbles: true })\n ref.current.dispatchEvent(event)\n }\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(err)\n }\n }}\n >\n {plus === undefined ? (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name='plus'\n preset='brand'\n {...numberControlIconProps}\n />\n ) : (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name={typeof plus === 'string' ? plus : undefined}\n icon={typeof plus !== 'string' ? plus : undefined}\n {...numberControlIconProps}\n />\n )}\n </Styled.InputControl>\n </Spacer>\n )}\n </>\n ) : undefined\n }\n />\n )\n }),\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n ),\n {\n Phone: InputPhone,\n }\n)\n\nexport { Input, COMPONENT_NAME }\n"],"names":["Input","Object","assign","withMergedProps","forwardRef","props","forwardedRef","theme","useTheme","size","mask","rounded","color","placeholderColor","width","defaultInputControlsWidth","type","labelPosition","textProps","iconProps","controls","preset","className","style","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizeUnits","sizes","margin","marginXXS","marginXS","marginS","marginM","marginL","marginXL","marginTop","marginTopXXS","marginTopXS","marginTopS","marginTopM","marginTopL","marginTopXL","marginRight","marginRightXXS","marginRightXS","marginRightS","marginRightM","marginRightL","marginRightXL","marginBottom","marginBottomXXS","marginBottomXS","marginBottomS","marginBottomM","marginBottomL","marginBottomXL","marginLeft","marginLeftXXS","marginLeftXS","marginLeftS","marginLeftM","marginLeftL","marginLeftXL","marginUnits","palette","widthXXS","widthXS","widthS","widthM","widthL","widthXL","error","success","label","icon","text","primary","secondary","onColored","fluid","disabled","inline","inputRef","inputProps","additionalControlIcon","additionalControlIconProps","buttonProps","additionalControlButtonProps","additional","numberControlIcon","numberControlIconProps","numberControlButtonProps","number","minus","plus","Array","isArray","minusButtonProps","plusButtonProps","ref","useRef","useImperativeHandle","current","hasInitValue","value","defaultValue","active","setActive","useState","hasValue","setHasValue","minusDisabled","setMinusDisabled","min","undefined","Infinity","initValue","parseFloat","initDefaultValue","minValue","Math","plusDisabled","setPlusDisabled","max","maxValue","_jsx","Styled","input","FormInputLabel","onClick","focus","onFocus","evt","target","currentTarget","onBlur","jsx","onChange","currentValue","minValueReached","maxValueReached","stopPropagation","Boolean","_jsxs","_Fragment","children","Icon","as","name","Spacer","display","prev","stepDown","event","Event","bubbles","dispatchEvent","err","console","stepUp","SIZES","displayName","Phone","InputPhone"],"mappings":"0dAsBA,MAAMA,MAAoFC,OAAOC,OAC/FC,gBAAAA,gBACEC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,EAAQC,OAAAA,WAEd,MAAMC,KACJA,EAAO,IAAGC,KACVA,EAAO,GAAEC,QACTA,GAAU,EAAIC,MACdA,EAAQ,YAAWC,iBACnBA,EAAmB,SAAQC,MAC3BA,EAAQP,EAAMQ,0BAAyBC,KACvCA,EAAO,OAAMC,cACbA,EAAgB,UAASC,UACzBA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EAAAC,SACdA,EAAW,CAAE,EAAAC,OACbA,EAAMC,UACNA,QACAC,EAAKC,QACLA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,UACNA,EAASC,MACTA,EAAKC,OACLA,EAAMC,UACNA,EAASC,SACTA,EAAQC,QACRA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,SACPA,EAAQC,UACRA,EAASC,aACTA,EAAYC,YACZA,EAAWC,WACXA,EAAUC,WACVA,EAAUC,WACVA,EAAUC,YACVA,EAAWC,YACXA,EAAWC,eACXA,EAAcC,cACdA,EAAaC,aACbA,EAAYC,aACZA,EAAYC,aACZA,EAAYC,cACZA,EAAaC,aACbA,EAAYC,gBACZA,EAAeC,eACfA,EAAcC,cACdA,EAAaC,cACbA,EAAaC,cACbA,EAAaC,eACbA,EAAcC,WACdA,EAAUC,cACVA,GAAaC,aACbA,GAAYC,YACZA,GAAWC,YACXA,GAAWC,YACXA,GAAWC,aACXA,GAAYC,YACZA,GAAWC,QACXA,GAAOC,SACPA,GAAQC,QACRA,GAAOC,OACPA,GAAMC,OACNA,GAAMC,OACNA,GAAMC,QACNA,GAAOC,MACPA,GAAKC,QACLA,GAAOC,MACPA,GAAKC,KACLA,GAAIC,KACJA,GAAIC,QACJA,GAAOC,UACPA,GAASC,UACTA,GAASC,MACTA,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,GACtBQ,QAAUG,IACRA,EAAIS,kBACA3C,GAAgB+B,SAClB/B,GAAgB+B,QAAQG,GAG1B,IACE,GAAIjC,GAAIG,QAAS,CACf,MAAMiD,EAAOpD,GAAIG,QAAQE,MAIzB,GAHAL,GAAIG,QAAQyD,SAGRR,IADgBpD,GAAIG,QAAQE,MACN,CACxB,MAAMiD,EAAQ,IAAIC,MAAM,QAAS,CAAEC,SAAS,IAC5CxD,GAAIG,QAAQsD,cAAcH,EAC5B,CACF,CACD,CAAC,MAAOI,GAEPC,QAAQvF,MAAMsF,EAChB,GACAZ,SAGApB,WAAAA,IAACqB,KAAAA,KADFpD,UAASoB,EACH,CACHiC,GAAG,OACH9I,KAAM,GACNG,MAAM,UACN4I,KAAK,OACLnI,OAAO,WACHyE,IAGD,CACHyD,GAAG,OACH9I,KAAM,GACNG,MAAM,UACN4I,YAAatD,IAAS,SAAWA,QAAOoB,EACxCxC,YAAaoB,IAAS,SAAWA,QAAOoB,KACpCxB,kBAOdwB,GAEN,IAGN,CACEvF,MAAOqI,UAAKA,MACZC,YA7biB,UAgcrB,CACEC,MAAOC,YAAAA,oCAjcY"}
1
+ {"version":3,"file":"Input.js","sources":["../../../../src/components/Input/Input.tsx"],"sourcesContent":["import { forwardRef, useState, useImperativeHandle, useRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { FormInputLabel, SIZES } from 'components/FormInputLabel'\nimport { Icon } from 'components/Icon'\nimport { InputPhone } from 'components/Input.Phone'\nimport { Spacer } from 'components/Spacer'\nimport * as Styled from './style'\nimport type { InputProps } from './types'\n\nconst COMPONENT_NAME = 'Input'\n\n/**\n *\n * Component accepts all \\<input\\> attributes and \"react-input-mask\" v2.0.4 props.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to \\<input\\>.\n *\n * See full [InputProps](https://github.com/foxford/ui/blob/master/src/components/Input/types.ts)\n */\nconst Input: React.ForwardRefExoticComponent<InputProps> & { Phone: typeof InputPhone } = Object.assign(\n withMergedProps<InputProps, HTMLInputElement>(\n forwardRef((props, forwardedRef) => {\n const theme = useTheme()\n\n const {\n size = 'm',\n mask = '',\n rounded = true,\n color = 'mineShaft',\n placeholderColor = 'silver',\n width = theme.defaultInputControlsWidth,\n type = 'text',\n labelPosition = 'dynamic',\n textProps = {},\n iconProps = {},\n controls = {},\n preset,\n className,\n style,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n margin,\n marginXXS,\n marginXS,\n marginS,\n marginM,\n marginL,\n marginXL,\n marginTop,\n marginTopXXS,\n marginTopXS,\n marginTopS,\n marginTopM,\n marginTopL,\n marginTopXL,\n marginRight,\n marginRightXXS,\n marginRightXS,\n marginRightS,\n marginRightM,\n marginRightL,\n marginRightXL,\n marginBottom,\n marginBottomXXS,\n marginBottomXS,\n marginBottomS,\n marginBottomM,\n marginBottomL,\n marginBottomXL,\n marginLeft,\n marginLeftXXS,\n marginLeftXS,\n marginLeftS,\n marginLeftM,\n marginLeftL,\n marginLeftXL,\n palette,\n widthXXS,\n widthXS,\n widthS,\n widthM,\n widthL,\n widthXL,\n error,\n success,\n label,\n icon,\n text,\n primary,\n secondary,\n onColored,\n fluid,\n disabled,\n inline,\n inputRef,\n ...inputProps\n } = props\n\n const {\n icon: additionalControlIcon,\n iconProps: additionalControlIconProps = {},\n buttonProps: additionalControlButtonProps = {},\n } = controls.additional ?? {}\n\n const {\n icon: numberControlIcon,\n iconProps: numberControlIconProps = {},\n buttonProps: numberControlButtonProps = [],\n } = controls.number ?? {}\n\n const [minus, plus] = Array.isArray(numberControlIcon) ? numberControlIcon : [numberControlIcon]\n\n const minusButtonProps =\n (Array.isArray(numberControlButtonProps) ? numberControlButtonProps[0] : numberControlButtonProps) ?? {}\n\n const plusButtonProps = (Array.isArray(numberControlButtonProps) ? numberControlButtonProps[1] : {}) ?? {}\n\n const ref = useRef<HTMLInputElement | null>(null)\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(forwardedRef, () => ref.current, [])\n\n const hasInitValue =\n typeof inputProps.value === 'string' ||\n typeof inputProps.value === 'number' ||\n typeof inputProps.defaultValue === 'string' ||\n typeof inputProps.defaultValue === 'number'\n\n const [active, setActive] = useState(hasInitValue)\n const [hasValue, setHasValue] = useState(hasInitValue)\n\n const [minusDisabled, setMinusDisabled] = useState(() => {\n if (type !== 'number' || inputProps.min === undefined) return false\n\n const { value = Infinity, defaultValue = Infinity } = inputProps\n\n const initValue = typeof value === 'number' ? value : parseFloat(value)\n const initDefaultValue = typeof defaultValue === 'number' ? defaultValue : parseFloat(defaultValue)\n const minValue = typeof inputProps.min === 'number' ? inputProps.min : parseFloat(inputProps.min)\n\n return Math.min(initValue, initDefaultValue) <= minValue\n })\n\n const [plusDisabled, setPlusDisabled] = useState(() => {\n if (type !== 'number' || inputProps.max === undefined) return false\n\n const { value = -Infinity, defaultValue = -Infinity } = inputProps\n\n const initValue = typeof value === 'number' ? value : parseFloat(value)\n const initDefaultValue = typeof defaultValue === 'number' ? defaultValue : parseFloat(defaultValue)\n const maxValue = typeof inputProps.max === 'number' ? inputProps.max : parseFloat(inputProps.max)\n\n return Math.max(initValue, initDefaultValue) >= maxValue\n })\n\n if (preset !== 'brand') {\n return (\n <Styled.Root\n {...inputProps}\n inputRef={\n inputRef ??\n ((input) => {\n ref.current = input\n })\n }\n className={className}\n style={style}\n size={typeof size === 'number' ? size : undefined}\n mask={mask}\n rounded={rounded}\n color={color}\n placeholderColor={placeholderColor}\n width={width}\n widthXXS={widthXXS}\n widthXS={widthXS}\n widthS={widthS}\n widthM={widthM}\n widthL={widthL}\n widthXL={widthXL}\n error={error}\n type={type}\n fluid={fluid}\n disabled={disabled}\n />\n )\n }\n\n return (\n <FormInputLabel\n className={className}\n style={style}\n size={size}\n sizeXXS={sizeXXS}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n sizeUnits={sizeUnits}\n sizes={sizes}\n margin={margin}\n marginXXS={marginXXS}\n marginXS={marginXS}\n marginS={marginS}\n marginM={marginM}\n marginL={marginL}\n marginXL={marginXL}\n marginTop={marginTop}\n marginTopXXS={marginTopXXS}\n marginTopXS={marginTopXS}\n marginTopS={marginTopS}\n marginTopM={marginTopM}\n marginTopL={marginTopL}\n marginTopXL={marginTopXL}\n marginRight={marginRight}\n marginRightXXS={marginRightXXS}\n marginRightXS={marginRightXS}\n marginRightS={marginRightS}\n marginRightM={marginRightM}\n marginRightL={marginRightL}\n marginRightXL={marginRightXL}\n marginBottom={marginBottom}\n marginBottomXXS={marginBottomXXS}\n marginBottomXS={marginBottomXS}\n marginBottomS={marginBottomS}\n marginBottomM={marginBottomM}\n marginBottomL={marginBottomL}\n marginBottomXL={marginBottomXL}\n marginLeft={marginLeft}\n marginLeftXXS={marginLeftXXS}\n marginLeftXS={marginLeftXS}\n marginLeftS={marginLeftS}\n marginLeftM={marginLeftM}\n marginLeftL={marginLeftL}\n marginLeftXL={marginLeftXL}\n palette={palette}\n error={error}\n success={success}\n label={label}\n labelPosition={labelPosition}\n icon={icon}\n text={text}\n primary={primary}\n secondary={secondary}\n onColored={onColored}\n disabled={disabled}\n inline={inline}\n active={active}\n textProps={textProps}\n iconProps={{\n size: 24,\n color: disabled ? 'content-disabled' : 'content-onmain-tertiary',\n ...iconProps,\n }}\n onClick={() => {\n if (ref.current) {\n ref.current.focus()\n }\n }}\n onFocus={(evt) => {\n if (evt.target !== evt.currentTarget) {\n setActive(true)\n }\n }}\n onBlur={(evt) => {\n if (evt.target !== evt.currentTarget && !hasValue) {\n setActive(false)\n }\n }}\n input={\n <Styled.Input\n {...inputProps}\n inputRef={(input) => {\n ref.current = input\n }}\n mask={mask}\n palette={palette}\n type={type}\n label={label}\n labelPosition={labelPosition}\n disabled={disabled}\n active={active}\n onChange={(evt) => {\n if (inputProps.onChange) {\n inputProps.onChange(evt)\n }\n\n if (type === 'number') {\n const currentValue = parseFloat(evt.currentTarget.value)\n\n const minValueReached = currentValue <= parseFloat(evt.currentTarget.min)\n const maxValueReached = currentValue >= parseFloat(evt.currentTarget.max)\n\n setMinusDisabled(minValueReached)\n setPlusDisabled(maxValueReached)\n\n if (minValueReached || maxValueReached) {\n evt.currentTarget.focus()\n }\n }\n }}\n onBlur={(evt) => {\n evt.stopPropagation()\n if (inputProps.onBlur) {\n inputProps.onBlur(evt)\n }\n\n setHasValue(Boolean(evt.currentTarget.value))\n setActive(Boolean(evt.currentTarget.value))\n }}\n />\n }\n controls={\n additionalControlIcon || type === 'number' ? (\n <>\n {additionalControlIcon && (\n <Styled.InputControl\n {...additionalControlButtonProps}\n type='button'\n palette={palette}\n disabled={disabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (additionalControlButtonProps.onClick) {\n additionalControlButtonProps.onClick(evt)\n }\n }}\n >\n <Icon\n as='span'\n size={24}\n color='inherit'\n name={typeof additionalControlIcon === 'string' ? additionalControlIcon : undefined}\n icon={typeof additionalControlIcon !== 'string' ? additionalControlIcon : undefined}\n {...additionalControlIconProps}\n />\n </Styled.InputControl>\n )}\n {type === 'number' && (\n <Spacer display='flex' marginLeft={4}>\n <Styled.InputControl\n {...minusButtonProps}\n type='button'\n palette={palette}\n disabled={disabled || minusDisabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (minusButtonProps.onClick) {\n minusButtonProps.onClick(evt)\n }\n\n try {\n if (ref.current) {\n const prev = ref.current.value\n ref.current.stepDown()\n\n const decremented = ref.current.value\n if (prev !== decremented) {\n const event = new Event('input', { bubbles: true })\n ref.current.dispatchEvent(event)\n }\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(err)\n }\n }}\n >\n {minus === undefined ? (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name='minus'\n preset='brand'\n {...numberControlIconProps}\n />\n ) : (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name={typeof minus === 'string' ? minus : undefined}\n icon={typeof minus !== 'string' ? minus : undefined}\n {...numberControlIconProps}\n />\n )}\n </Styled.InputControl>\n <Styled.InputControl\n {...plusButtonProps}\n type='button'\n palette={palette}\n disabled={disabled || plusDisabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (plusButtonProps.onClick) {\n plusButtonProps.onClick(evt)\n }\n\n try {\n if (ref.current) {\n const prev = ref.current.value\n ref.current.stepUp()\n\n const incremented = ref.current.value\n if (prev !== incremented) {\n const event = new Event('input', { bubbles: true })\n ref.current.dispatchEvent(event)\n }\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(err)\n }\n }}\n >\n {plus === undefined ? (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name='plus'\n preset='brand'\n {...numberControlIconProps}\n />\n ) : (\n <Icon\n as='span'\n size={24}\n color='inherit'\n name={typeof plus === 'string' ? plus : undefined}\n icon={typeof plus !== 'string' ? plus : undefined}\n {...numberControlIconProps}\n />\n )}\n </Styled.InputControl>\n </Spacer>\n )}\n </>\n ) : undefined\n }\n />\n )\n }),\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n ),\n {\n Phone: InputPhone,\n }\n)\n\nexport { Input, COMPONENT_NAME }\n"],"names":["Input","Object","assign","withMergedProps","forwardRef","props","forwardedRef","theme","useTheme","size","mask","rounded","color","placeholderColor","width","defaultInputControlsWidth","type","labelPosition","textProps","iconProps","controls","preset","className","style","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizeUnits","sizes","margin","marginXXS","marginXS","marginS","marginM","marginL","marginXL","marginTop","marginTopXXS","marginTopXS","marginTopS","marginTopM","marginTopL","marginTopXL","marginRight","marginRightXXS","marginRightXS","marginRightS","marginRightM","marginRightL","marginRightXL","marginBottom","marginBottomXXS","marginBottomXS","marginBottomS","marginBottomM","marginBottomL","marginBottomXL","marginLeft","marginLeftXXS","marginLeftXS","marginLeftS","marginLeftM","marginLeftL","marginLeftXL","palette","widthXXS","widthXS","widthS","widthM","widthL","widthXL","error","success","label","icon","text","primary","secondary","onColored","fluid","disabled","inline","inputRef","inputProps","additionalControlIcon","additionalControlIconProps","buttonProps","additionalControlButtonProps","additional","numberControlIcon","numberControlIconProps","numberControlButtonProps","number","minus","plus","Array","isArray","minusButtonProps","plusButtonProps","ref","useRef","useImperativeHandle","current","hasInitValue","value","defaultValue","active","setActive","useState","hasValue","setHasValue","minusDisabled","setMinusDisabled","min","undefined","Infinity","initValue","parseFloat","initDefaultValue","minValue","Math","plusDisabled","setPlusDisabled","max","maxValue","_jsx","Styled","input","FormInputLabel","onClick","focus","onFocus","evt","target","currentTarget","onBlur","jsx","onChange","currentValue","minValueReached","maxValueReached","stopPropagation","Boolean","_jsxs","_Fragment","children","Icon","as","name","Spacer","display","prev","stepDown","event","Event","bubbles","dispatchEvent","err","console","stepUp","SIZES","displayName","Phone","InputPhone"],"mappings":"0dAsBA,MAAMA,MAAoFC,OAAOC,OAC/FC,gBAAAA,gBACEC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,EAAQC,OAAAA,WAEd,MAAMC,KACJA,EAAO,IAAGC,KACVA,EAAO,GAAEC,QACTA,GAAU,EAAIC,MACdA,EAAQ,YAAWC,iBACnBA,EAAmB,SAAQC,MAC3BA,EAAQP,EAAMQ,0BAAyBC,KACvCA,EAAO,OAAMC,cACbA,EAAgB,UAASC,UACzBA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EAAAC,SACdA,EAAW,CAAE,EAAAC,OACbA,EAAMC,UACNA,QACAC,EAAKC,QACLA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,UACNA,EAASC,MACTA,EAAKC,OACLA,EAAMC,UACNA,EAASC,SACTA,EAAQC,QACRA,EAAOC,QACPA,EAAOC,QACPA,EAAOC,SACPA,EAAQC,UACRA,EAASC,aACTA,EAAYC,YACZA,EAAWC,WACXA,EAAUC,WACVA,EAAUC,WACVA,EAAUC,YACVA,EAAWC,YACXA,EAAWC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