@skbkontur/react-ui 4.16.0-next.9 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/cjs/components/Autocomplete/Autocomplete.js +1 -1
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Autocomplete/Autocomplete.md +17 -0
  5. package/cjs/components/Button/Button.js +2 -1
  6. package/cjs/components/Button/Button.js.map +1 -1
  7. package/cjs/components/Button/Button.styles.d.ts +1 -0
  8. package/cjs/components/Button/Button.styles.js +63 -59
  9. package/cjs/components/Button/Button.styles.js.map +1 -1
  10. package/cjs/components/ComboBox/ComboBox.d.ts +3 -2
  11. package/cjs/components/ComboBox/ComboBox.js +3 -1
  12. package/cjs/components/ComboBox/ComboBox.js.map +1 -1
  13. package/cjs/components/ComboBox/ComboBox.md +46 -2
  14. package/cjs/components/Dropdown/Dropdown.js +1 -0
  15. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  16. package/cjs/components/Dropdown/Dropdown.md +33 -0
  17. package/cjs/components/Link/Link.js +15 -2
  18. package/cjs/components/Link/Link.js.map +1 -1
  19. package/cjs/components/Link/Link.styles.d.ts +2 -0
  20. package/cjs/components/Link/Link.styles.js +63 -24
  21. package/cjs/components/Link/Link.styles.js.map +1 -1
  22. package/cjs/components/MenuFooter/MenuFooter.d.ts +26 -0
  23. package/cjs/components/MenuFooter/MenuFooter.js +79 -0
  24. package/cjs/components/MenuFooter/MenuFooter.js.map +1 -0
  25. package/cjs/components/MenuFooter/MenuFooter.md +27 -0
  26. package/cjs/components/MenuFooter/MenuFooter.mixins.d.ts +2 -0
  27. package/cjs/components/MenuFooter/MenuFooter.mixins.js +26 -0
  28. package/cjs/components/MenuFooter/MenuFooter.mixins.js.map +1 -0
  29. package/cjs/components/MenuFooter/MenuFooter.styles.d.ts +10 -0
  30. package/cjs/components/MenuFooter/MenuFooter.styles.js +65 -0
  31. package/cjs/components/MenuFooter/MenuFooter.styles.js.map +1 -0
  32. package/cjs/components/MenuFooter/index.d.ts +1 -0
  33. package/cjs/components/MenuFooter/index.js +1 -0
  34. package/cjs/components/MenuFooter/index.js.map +1 -0
  35. package/cjs/components/MenuHeader/MenuHeader.d.ts +4 -1
  36. package/cjs/components/MenuHeader/MenuHeader.js +31 -4
  37. package/cjs/components/MenuHeader/MenuHeader.js.map +1 -1
  38. package/cjs/components/MenuHeader/MenuHeader.md +12 -0
  39. package/cjs/components/MenuHeader/MenuHeader.mixins.d.ts +2 -0
  40. package/cjs/components/MenuHeader/MenuHeader.mixins.js +26 -0
  41. package/cjs/components/MenuHeader/MenuHeader.mixins.js.map +1 -0
  42. package/cjs/components/MenuHeader/MenuHeader.styles.d.ts +6 -1
  43. package/cjs/components/MenuHeader/MenuHeader.styles.js +54 -12
  44. package/cjs/components/MenuHeader/MenuHeader.styles.js.map +1 -1
  45. package/cjs/components/MenuItem/MenuItem.d.ts +9 -0
  46. package/cjs/components/MenuItem/MenuItem.js +59 -7
  47. package/cjs/components/MenuItem/MenuItem.js.map +1 -1
  48. package/cjs/components/MenuItem/MenuItem.md +12 -0
  49. package/cjs/components/MenuItem/MenuItem.mixins.d.ts +3 -0
  50. package/cjs/components/MenuItem/MenuItem.mixins.js +42 -0
  51. package/cjs/components/MenuItem/MenuItem.mixins.js.map +1 -0
  52. package/cjs/components/MenuItem/MenuItem.styles.d.ts +9 -1
  53. package/cjs/components/MenuItem/MenuItem.styles.js +80 -27
  54. package/cjs/components/MenuItem/MenuItem.styles.js.map +1 -1
  55. package/cjs/components/Select/Select.d.ts +2 -1
  56. package/cjs/components/Select/Select.js +16 -5
  57. package/cjs/components/Select/Select.js.map +1 -1
  58. package/cjs/components/Select/Select.md +17 -0
  59. package/cjs/components/Textarea/Textarea.md +2 -0
  60. package/cjs/components/Toggle/Toggle.md +2 -0
  61. package/cjs/components/Toggle/Toggle.styles.js +1 -1
  62. package/cjs/components/Toggle/Toggle.styles.js.map +1 -1
  63. package/cjs/internal/CustomComboBox/ComboBoxMenu.d.ts +7 -3
  64. package/cjs/internal/CustomComboBox/ComboBoxMenu.js +27 -2
  65. package/cjs/internal/CustomComboBox/ComboBoxMenu.js.map +1 -1
  66. package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +3 -2
  67. package/cjs/internal/CustomComboBox/ComboBoxView.js +7 -3
  68. package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  69. package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +5 -3
  70. package/cjs/internal/CustomComboBox/CustomComboBox.js +4 -2
  71. package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
  72. package/cjs/internal/CustomComboBox/CustomComboBoxReducer.d.ts +2 -1
  73. package/cjs/internal/CustomComboBox/CustomComboBoxReducer.js +1 -0
  74. package/cjs/internal/CustomComboBox/CustomComboBoxReducer.js.map +1 -1
  75. package/cjs/internal/MenuMessage/MenuMessage.d.ts +2 -0
  76. package/cjs/internal/MenuMessage/MenuMessage.js +18 -3
  77. package/cjs/internal/MenuMessage/MenuMessage.js.map +1 -1
  78. package/cjs/internal/MenuMessage/MenuMessage.styles.d.ts +3 -0
  79. package/cjs/internal/MenuMessage/MenuMessage.styles.js +21 -6
  80. package/cjs/internal/MenuMessage/MenuMessage.styles.js.map +1 -1
  81. package/cjs/internal/ThemePlayground/darkTheme.d.ts +1 -1
  82. package/cjs/internal/ThemePlayground/darkTheme.js +1 -1
  83. package/cjs/internal/ThemePlayground/darkTheme.js.map +1 -1
  84. package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  85. package/cjs/internal/themes/DarkTheme.d.ts +2 -0
  86. package/cjs/internal/themes/DarkTheme.js +11 -3
  87. package/cjs/internal/themes/DarkTheme.js.map +1 -1
  88. package/cjs/internal/themes/DefaultTheme.d.ts +103 -1
  89. package/cjs/internal/themes/DefaultTheme.js +225 -15
  90. package/cjs/internal/themes/DefaultTheme.js.map +1 -1
  91. package/cjs/internal/themes/Theme2022.js +1 -1
  92. package/cjs/internal/themes/Theme2022.js.map +1 -1
  93. package/cjs/lib/rootNode/rootNodeDecorator.d.ts +5 -1
  94. package/cjs/lib/rootNode/rootNodeDecorator.js +7 -3
  95. package/cjs/lib/rootNode/rootNodeDecorator.js.map +1 -1
  96. package/components/Autocomplete/Autocomplete/Autocomplete.js +2 -1
  97. package/components/Autocomplete/Autocomplete/Autocomplete.js.map +1 -1
  98. package/components/Autocomplete/Autocomplete.md +17 -0
  99. package/components/Button/Button/Button.js +2 -1
  100. package/components/Button/Button/Button.js.map +1 -1
  101. package/components/Button/Button.styles/Button.styles.js +60 -57
  102. package/components/Button/Button.styles/Button.styles.js.map +1 -1
  103. package/components/Button/Button.styles.d.ts +1 -0
  104. package/components/ComboBox/ComboBox/ComboBox.js +1 -0
  105. package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
  106. package/components/ComboBox/ComboBox.d.ts +3 -2
  107. package/components/ComboBox/ComboBox.md +46 -2
  108. package/components/Dropdown/Dropdown/Dropdown.js +1 -0
  109. package/components/Dropdown/Dropdown/Dropdown.js.map +1 -1
  110. package/components/Dropdown/Dropdown.md +33 -0
  111. package/components/Link/Link/Link.js +8 -2
  112. package/components/Link/Link/Link.js.map +1 -1
  113. package/components/Link/Link.styles/Link.styles.js +38 -22
  114. package/components/Link/Link.styles/Link.styles.js.map +1 -1
  115. package/components/Link/Link.styles.d.ts +2 -0
  116. package/components/MenuFooter/MenuFooter/MenuFooter.js +70 -0
  117. package/components/MenuFooter/MenuFooter/MenuFooter.js.map +1 -0
  118. package/components/MenuFooter/MenuFooter/package.json +6 -0
  119. package/components/MenuFooter/MenuFooter.d.ts +26 -0
  120. package/components/MenuFooter/MenuFooter.md +27 -0
  121. package/components/MenuFooter/MenuFooter.mixins/MenuFooter.mixins.js +13 -0
  122. package/components/MenuFooter/MenuFooter.mixins/MenuFooter.mixins.js.map +1 -0
  123. package/components/MenuFooter/MenuFooter.mixins/package.json +6 -0
  124. package/components/MenuFooter/MenuFooter.mixins.d.ts +2 -0
  125. package/components/MenuFooter/MenuFooter.styles/MenuFooter.styles.js +29 -0
  126. package/components/MenuFooter/MenuFooter.styles/MenuFooter.styles.js.map +1 -0
  127. package/components/MenuFooter/MenuFooter.styles/package.json +6 -0
  128. package/components/MenuFooter/MenuFooter.styles.d.ts +10 -0
  129. package/components/MenuFooter/index/index.js +1 -0
  130. package/components/MenuFooter/index/index.js.map +1 -0
  131. package/components/MenuFooter/index/package.json +6 -0
  132. package/components/MenuFooter/index.d.ts +1 -0
  133. package/components/MenuFooter/package.json +6 -0
  134. package/components/MenuHeader/MenuHeader/MenuHeader.js +33 -2
  135. package/components/MenuHeader/MenuHeader/MenuHeader.js.map +1 -1
  136. package/components/MenuHeader/MenuHeader.d.ts +4 -1
  137. package/components/MenuHeader/MenuHeader.md +12 -0
  138. package/components/MenuHeader/MenuHeader.mixins/MenuHeader.mixins.js +13 -0
  139. package/components/MenuHeader/MenuHeader.mixins/MenuHeader.mixins.js.map +1 -0
  140. package/components/MenuHeader/MenuHeader.mixins/package.json +6 -0
  141. package/components/MenuHeader/MenuHeader.mixins.d.ts +2 -0
  142. package/components/MenuHeader/MenuHeader.styles/MenuHeader.styles.js +20 -6
  143. package/components/MenuHeader/MenuHeader.styles/MenuHeader.styles.js.map +1 -1
  144. package/components/MenuHeader/MenuHeader.styles.d.ts +6 -1
  145. package/components/MenuItem/MenuItem/MenuItem.js +49 -5
  146. package/components/MenuItem/MenuItem/MenuItem.js.map +1 -1
  147. package/components/MenuItem/MenuItem.d.ts +9 -0
  148. package/components/MenuItem/MenuItem.md +12 -0
  149. package/components/MenuItem/MenuItem.mixins/MenuItem.mixins.js +24 -0
  150. package/components/MenuItem/MenuItem.mixins/MenuItem.mixins.js.map +1 -0
  151. package/components/MenuItem/MenuItem.mixins/package.json +6 -0
  152. package/components/MenuItem/MenuItem.mixins.d.ts +3 -0
  153. package/components/MenuItem/MenuItem.styles/MenuItem.styles.js +39 -23
  154. package/components/MenuItem/MenuItem.styles/MenuItem.styles.js.map +1 -1
  155. package/components/MenuItem/MenuItem.styles.d.ts +9 -1
  156. package/components/Select/Select/Select.js +20 -6
  157. package/components/Select/Select/Select.js.map +1 -1
  158. package/components/Select/Select.d.ts +2 -1
  159. package/components/Select/Select.md +17 -0
  160. package/components/Textarea/Textarea.md +2 -0
  161. package/components/Toggle/Toggle.md +2 -0
  162. package/components/Toggle/Toggle.styles/Toggle.styles.js +1 -1
  163. package/components/Toggle/Toggle.styles/Toggle.styles.js.map +1 -1
  164. package/internal/CustomComboBox/ComboBoxMenu/ComboBoxMenu.js +28 -10
  165. package/internal/CustomComboBox/ComboBoxMenu/ComboBoxMenu.js.map +1 -1
  166. package/internal/CustomComboBox/ComboBoxMenu.d.ts +7 -3
  167. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +6 -4
  168. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
  169. package/internal/CustomComboBox/ComboBoxView.d.ts +3 -2
  170. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +3 -1
  171. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
  172. package/internal/CustomComboBox/CustomComboBox.d.ts +5 -3
  173. package/internal/CustomComboBox/CustomComboBoxReducer/CustomComboBoxReducer.js.map +1 -1
  174. package/internal/CustomComboBox/CustomComboBoxReducer.d.ts +2 -1
  175. package/internal/MenuMessage/MenuMessage/MenuMessage.js +19 -2
  176. package/internal/MenuMessage/MenuMessage/MenuMessage.js.map +1 -1
  177. package/internal/MenuMessage/MenuMessage.d.ts +2 -0
  178. package/internal/MenuMessage/MenuMessage.styles/MenuMessage.styles.js +11 -2
  179. package/internal/MenuMessage/MenuMessage.styles/MenuMessage.styles.js.map +1 -1
  180. package/internal/MenuMessage/MenuMessage.styles.d.ts +3 -0
  181. package/internal/ThemePlayground/darkTheme/darkTheme.js +1 -1
  182. package/internal/ThemePlayground/darkTheme/darkTheme.js.map +1 -1
  183. package/internal/ThemePlayground/darkTheme.d.ts +1 -1
  184. package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  185. package/internal/themes/DarkTheme/DarkTheme.js +13 -0
  186. package/internal/themes/DarkTheme/DarkTheme.js.map +1 -1
  187. package/internal/themes/DarkTheme.d.ts +2 -0
  188. package/internal/themes/DefaultTheme/DefaultTheme.js +251 -8
  189. package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
  190. package/internal/themes/DefaultTheme.d.ts +103 -1
  191. package/internal/themes/Theme2022/Theme2022.js +1 -1
  192. package/internal/themes/Theme2022/Theme2022.js.map +1 -1
  193. package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js +4 -3
  194. package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js.map +1 -1
  195. package/lib/rootNode/rootNodeDecorator.d.ts +5 -1
  196. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["Link.tsx"],"names":["LinkDataTids","root","Link","rootNode","getProps","defaultProps","state","focusedByTab","renderMain","props","disabled","href","icon","use","loading","_button","_buttonOpened","relOrigin","rel","Component","as","focused","rest","_isTheme2022","theme","iconElement","styles","arrow","isFocused","linkProps","className","useRoot","useDefault","useSuccess","useDanger","useGrayed","button","buttonOpened","getLinkClassName","Boolean","onClick","handleClick","onFocus","handleFocus","onBlur","handleBlur","tabIndex","child","children","globalClasses","text","lineText","requestAnimationFrame","keyListener","isTabPressed","setState","event","preventDefault","render","ThemeFactory","create","setRootNode","isBorderBottom","parseInt","linkLineBorderBottomWidth","focus","useGrayedFocus","lineRoot","disabledDark22Theme","lineFocus","lineFocusSuccess","lineFocusDanger","lineFocusGrayed","React","__KONTUR_REACT_UI__","propTypes","PropTypes","bool","string","node","oneOf"],"mappings":"qdAAA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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5B,IAAuDE,aAAO0C,mBAAP,CAA2B,KAAK5C,KAAhC,CAHzD;AAIEI,IAAAA,SAAS,IAAIf,GAAG,KAAK,SAArB,IAAkCa,aAAO2C,SAAP,CAAiB,KAAK7C,KAAtB,CAJpC;AAKEI,IAAAA,SAAS,IAAIf,GAAG,KAAK,SAArB,IAAkCa,aAAO4C,gBAAP,CAAwB,KAAK9C,KAA7B,CALpC;AAMEI,IAAAA,SAAS,IAAIf,GAAG,KAAK,QAArB,IAAiCa,aAAO6C,eAAP,CAAuB,KAAK/C,KAA5B,CANnC;AAOEI,IAAAA,SAAS,IAAIf,GAAG,KAAK,QAArB,IAAiCa,aAAO8C,eAAP,CAAuB,KAAKhD,KAA5B,CAPnC,CAPJ;;AAgBD,G,eA/JuBiD,eAAMtD,S,WAChBuD,mB,GAAsB,M,UAEtBC,S,GAAY,EACxBjE,QAAQ,EAAEkE,mBAAUC,IADI,EAGxBlE,IAAI,EAAEiE,mBAAUE,MAHQ,EAKxBlE,IAAI,EAAEgE,mBAAUG,IALQ,EAOxBlE,GAAG,EAAE+D,mBAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,QAAvB,EAAiC,QAAjC,CAAhB,CAPmB,E,UAUZ3E,Y,GAA6B,EACzCM,IAAI,EAAE,EADmC,EAEzCE,GAAG,EAAE,SAFoC,EAGzCO,EAAE,EAAE,GAHqC,E","sourcesContent":["import React, { AriaAttributes } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Override } from '../../typings/utility-types';\nimport { keyListener } from '../../lib/events/keyListener';\nimport { Theme, ThemeIn } from '../../lib/theming/Theme';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { isExternalLink } from '../../lib/utils';\nimport { Spinner } from '../Spinner';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter, DefaultizedProps } from '../../lib/createPropsGetter';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { isDarkTheme, isTheme2022 } from '../../lib/theming/ThemeHelpers';\n\nimport { globalClasses, styles } from './Link.styles';\n\nexport interface LinkProps\n extends Pick<AriaAttributes, 'aria-label'>,\n CommonProps,\n Override<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n /**\n * Отключенное состояние.\n */\n disabled?: boolean;\n /**\n * HTML-атрибут `href`.\n */\n href?: string;\n /**\n * Добавляет ссылке иконку.\n */\n icon?: React.ReactElement<any>;\n /**\n * Тема ссылки.\n */\n use?: 'default' | 'success' | 'danger' | 'grayed';\n /**\n * @ignore\n */\n _button?: boolean;\n /**\n * @ignore\n */\n _buttonOpened?: boolean;\n /**\n * HTML-атрибут `tabindex`.\n */\n tabIndex?: number;\n /**\n * Переводит ссылку в состояние загрузки.\n */\n loading?: boolean;\n /**\n * HTML-событие `onclick`.\n */\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n\n /**\n * Обычный объект с переменными темы.\n * Он будет объединён с темой из контекста.\n */\n theme?: ThemeIn;\n /**\n * Компонент, используемый в качестве корневого узла.\n * @ignore\n */\n as?: React.ElementType | keyof React.ReactHTML;\n /**\n * @ignore\n */\n focused?: boolean;\n }\n > {}\n\nexport interface LinkState {\n focusedByTab: boolean;\n}\n\nexport const LinkDataTids = {\n root: 'Link__root',\n} as const;\n\ntype DefaultProps = Required<Pick<LinkProps, 'href' | 'use' | 'as'>>;\ntype DefaultizedLinkProps = DefaultizedProps<LinkProps, DefaultProps>;\n\n/**\n * Элемент ссылки из HTML.\n */\n@rootNode\nexport class Link extends React.Component<LinkProps, LinkState> {\n public static __KONTUR_REACT_UI__ = 'Link';\n\n public static propTypes = {\n disabled: PropTypes.bool,\n\n href: PropTypes.string,\n\n icon: PropTypes.node,\n\n use: PropTypes.oneOf(['default', 'success', 'danger', 'grayed']),\n };\n\n public static defaultProps: DefaultProps = {\n href: '',\n use: 'default',\n as: 'a',\n };\n\n private getProps = createPropsGetter(Link.defaultProps);\n\n public state: LinkState = {\n focusedByTab: false,\n };\n\n private theme!: Theme;\n private setRootNode!: TSetRootNode;\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = this.props.theme ? ThemeFactory.create(this.props.theme as Theme, theme) : theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.getProps()}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = (props: CommonWrapperRestProps<DefaultizedLinkProps>) => {\n const {\n disabled,\n href,\n icon,\n use,\n loading,\n _button,\n _buttonOpened,\n rel: relOrigin,\n as: Component,\n focused = false,\n ...rest\n } = props;\n const _isTheme2022 = isTheme2022(this.theme);\n\n let iconElement = null;\n if (icon) {\n iconElement = (\n <span className={styles.icon(this.theme)}>{loading ? <Spinner caption={null} dimmed inline /> : icon}</span>\n );\n }\n\n let arrow = null;\n if (_button) {\n arrow = <span className={styles.arrow()} />;\n }\n\n let rel = relOrigin;\n if (typeof rel === 'undefined' && href) {\n rel = `noopener${isExternalLink(href) ? ' noreferrer' : ''}`;\n }\n\n const isFocused = !disabled && (this.state.focusedByTab || focused);\n\n const linkProps = {\n className: cx(\n styles.useRoot(),\n use === 'default' && styles.useDefault(this.theme),\n use === 'success' && styles.useSuccess(this.theme),\n use === 'danger' && styles.useDanger(this.theme),\n use === 'grayed' && styles.useGrayed(this.theme),\n !!_button && styles.button(this.theme),\n !!_buttonOpened && styles.buttonOpened(this.theme),\n this.getLinkClassName(isFocused, Boolean(disabled || loading), _isTheme2022),\n ),\n href,\n rel,\n onClick: this.handleClick,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n tabIndex: disabled || loading ? -1 : this.props.tabIndex,\n };\n\n let child = this.props.children;\n if (_isTheme2022) {\n child = <span className={cx(globalClasses.text, styles.lineText(this.theme))}>{this.props.children}</span>;\n }\n\n return (\n <Component data-tid={LinkDataTids.root} {...rest} {...linkProps}>\n {iconElement}\n {child}\n {arrow}\n </Component>\n );\n };\n\n private handleFocus = () => {\n if (!this.props.disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n requestAnimationFrame(() => {\n if (keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n }\n };\n\n private handleBlur = () => {\n this.setState({ focusedByTab: false });\n };\n\n private handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n const { onClick, disabled, loading } = this.props;\n const href = this.getProps().href;\n if (!href) {\n event.preventDefault();\n }\n if (onClick && !disabled && !loading) {\n onClick(event);\n }\n };\n\n private getLinkClassName(focused: boolean, disabled: boolean, _isTheme2022: boolean): string {\n const { use } = this.getProps();\n const isBorderBottom = parseInt(this.theme.linkLineBorderBottomWidth) > 0;\n const isFocused = focused && !disabled;\n\n return !isBorderBottom\n ? cx(\n styles.root(this.theme),\n isFocused && styles.focus(this.theme),\n disabled && styles.disabled(this.theme),\n use === 'grayed' && focused && styles.useGrayedFocus(this.theme),\n )\n : cx(\n styles.lineRoot(),\n disabled && styles.disabled(this.theme),\n disabled && _isTheme2022 && isDarkTheme(this.theme) && styles.disabledDark22Theme(this.theme),\n isFocused && use === 'default' && styles.lineFocus(this.theme),\n isFocused && use === 'success' && styles.lineFocusSuccess(this.theme),\n isFocused && use === 'danger' && styles.lineFocusDanger(this.theme),\n isFocused && use === 'grayed' && styles.lineFocusGrayed(this.theme),\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["Link.tsx"],"names":["LinkDataTids","root","Link","rootNode","getProps","defaultProps","state","focusedByTab","renderMain","props","disabled","href","icon","use","loading","_button","_buttonOpened","relOrigin","rel","Component","as","focused","rest","_isTheme2022","theme","iconElement","styles","arrow","isFocused","linkProps","className","useRoot","useDefault","useSuccess","useDanger","useGrayed","button","buttonOpened","getLinkClassName","Boolean","onClick","handleClick","onFocus","handleFocus","onBlur","handleBlur","tabIndex","child","children","lineTextWrapper","globalClasses","text","lineText","isIE11","lineTextIE11","requestAnimationFrame","keyListener","isTabPressed","setState","event","preventDefault","render","ThemeFactory","create","setRootNode","isBorderBottom","parseInt","linkLineBorderBottomWidth","focus","useGrayedFocus","lineRoot","disabledDark22Theme","lineFocus","lineFocusSuccess","lineFocusDanger","lineFocusGrayed","React","__KONTUR_REACT_UI__","propTypes","PropTypes","bool","string","node","oneOf"],"mappings":"qdAAA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEO,IAAMA,YAAY,GAAG;AAC1BC,EAAAA,IAAI,EAAE,YADoB,EAArB,C;;;;;;AAOP;AACA;AACA,G;;AAEaC,I,OADZC,kB;;;;;;;;;;;;;;;;;;;AAoBSC,IAAAA,Q,GAAW,0CAAkBF,IAAI,CAACG,YAAvB,C;;AAEZC,IAAAA,K,GAAmB;AACxBC,MAAAA,YAAY,EAAE,KADU,E;;;;;;;;;;;;;;;;;;;;;AAsBlBC,IAAAA,U,GAAa,UAACC,KAAD,EAAyD;AAC5E;AACEC,MAAAA,QADF;;;;;;;;;;;AAYID,MAAAA,KAZJ,CACEC,QADF,CAEEC,IAFF,GAYIF,KAZJ,CAEEE,IAFF,CAGEC,IAHF,GAYIH,KAZJ,CAGEG,IAHF,CAIEC,GAJF,GAYIJ,KAZJ,CAIEI,GAJF,CAKEC,OALF,GAYIL,KAZJ,CAKEK,OALF,CAMEC,OANF,GAYIN,KAZJ,CAMEM,OANF,CAOEC,aAPF,GAYIP,KAZJ,CAOEO,aAPF,CAQOC,SARP,GAYIR,KAZJ,CAQES,GARF,CASMC,SATN,GAYIV,KAZJ,CASEW,EATF,kBAYIX,KAZJ,CAUEY,OAVF,CAUEA,OAVF,+BAUY,KAVZ,kBAWKC,IAXL,+CAYIb,KAZJ;AAaA,UAAMc,YAAY,GAAG,+BAAY,M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,GAAG,EAAEkE,mBAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,SAAZ,EAAuB,QAAvB,EAAiC,QAAjC,CAAhB,CAPmB,E,UAUZ9E,Y,GAA6B,EACzCM,IAAI,EAAE,EADmC,EAEzCE,GAAG,EAAE,SAFoC,EAGzCO,EAAE,EAAE,GAHqC,E","sourcesContent":["import React, { AriaAttributes } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Override } from '../../typings/utility-types';\nimport { keyListener } from '../../lib/events/keyListener';\nimport { Theme, ThemeIn } from '../../lib/theming/Theme';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { isExternalLink } from '../../lib/utils';\nimport { Spinner } from '../Spinner';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter, DefaultizedProps } from '../../lib/createPropsGetter';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { isDarkTheme, isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { isIE11 } from '../../lib/client';\n\nimport { globalClasses, styles } from './Link.styles';\n\nexport interface LinkProps\n extends Pick<AriaAttributes, 'aria-label'>,\n CommonProps,\n Override<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n /**\n * Отключенное состояние.\n */\n disabled?: boolean;\n /**\n * HTML-атрибут `href`.\n */\n href?: string;\n /**\n * Добавляет ссылке иконку.\n */\n icon?: React.ReactElement<any>;\n /**\n * Тема ссылки.\n */\n use?: 'default' | 'success' | 'danger' | 'grayed';\n /**\n * @ignore\n */\n _button?: boolean;\n /**\n * @ignore\n */\n _buttonOpened?: boolean;\n /**\n * HTML-атрибут `tabindex`.\n */\n tabIndex?: number;\n /**\n * Переводит ссылку в состояние загрузки.\n */\n loading?: boolean;\n /**\n * HTML-событие `onclick`.\n */\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n\n /**\n * Обычный объект с переменными темы.\n * Он будет объединён с темой из контекста.\n */\n theme?: ThemeIn;\n /**\n * Компонент, используемый в качестве корневого узла.\n * @ignore\n */\n as?: React.ElementType | keyof React.ReactHTML;\n /**\n * @ignore\n */\n focused?: boolean;\n }\n > {}\n\nexport interface LinkState {\n focusedByTab: boolean;\n}\n\nexport const LinkDataTids = {\n root: 'Link__root',\n} as const;\n\ntype DefaultProps = Required<Pick<LinkProps, 'href' | 'use' | 'as'>>;\ntype DefaultizedLinkProps = DefaultizedProps<LinkProps, DefaultProps>;\n\n/**\n * Элемент ссылки из HTML.\n */\n@rootNode\nexport class Link extends React.Component<LinkProps, LinkState> {\n public static __KONTUR_REACT_UI__ = 'Link';\n\n public static propTypes = {\n disabled: PropTypes.bool,\n\n href: PropTypes.string,\n\n icon: PropTypes.node,\n\n use: PropTypes.oneOf(['default', 'success', 'danger', 'grayed']),\n };\n\n public static defaultProps: DefaultProps = {\n href: '',\n use: 'default',\n as: 'a',\n };\n\n private getProps = createPropsGetter(Link.defaultProps);\n\n public state: LinkState = {\n focusedByTab: false,\n };\n\n private theme!: Theme;\n private setRootNode!: TSetRootNode;\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = this.props.theme ? ThemeFactory.create(this.props.theme as Theme, theme) : theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.getProps()}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = (props: CommonWrapperRestProps<DefaultizedLinkProps>) => {\n const {\n disabled,\n href,\n icon,\n use,\n loading,\n _button,\n _buttonOpened,\n rel: relOrigin,\n as: Component,\n focused = false,\n ...rest\n } = props;\n const _isTheme2022 = isTheme2022(this.theme);\n\n let iconElement = null;\n if (icon) {\n iconElement = (\n <span className={styles.icon(this.theme)}>{loading ? <Spinner caption={null} dimmed inline /> : icon}</span>\n );\n }\n\n let arrow = null;\n if (_button) {\n arrow = <span className={styles.arrow()} />;\n }\n\n let rel = relOrigin;\n if (typeof rel === 'undefined' && href) {\n rel = `noopener${isExternalLink(href) ? ' noreferrer' : ''}`;\n }\n\n const isFocused = !disabled && (this.state.focusedByTab || focused);\n\n const linkProps = {\n className: cx(\n styles.useRoot(),\n use === 'default' && styles.useDefault(this.theme),\n use === 'success' && styles.useSuccess(this.theme),\n use === 'danger' && styles.useDanger(this.theme),\n use === 'grayed' && styles.useGrayed(this.theme),\n !!_button && styles.button(this.theme),\n !!_buttonOpened && styles.buttonOpened(this.theme),\n this.getLinkClassName(isFocused, Boolean(disabled || loading), _isTheme2022),\n ),\n href,\n rel,\n onClick: this.handleClick,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n tabIndex: disabled || loading ? -1 : this.props.tabIndex,\n };\n\n let child = this.props.children;\n if (_isTheme2022) {\n // lineTextWrapper нужен для реализации transition у подчеркивания\n child = (\n <span className={cx(styles.lineTextWrapper(this.theme))}>\n <span\n className={cx(globalClasses.text, {\n [styles.lineText(this.theme)]: !isIE11,\n [styles.lineTextIE11(this.theme)]: isIE11,\n })}\n >\n {this.props.children}\n </span>\n </span>\n );\n }\n\n return (\n <Component data-tid={LinkDataTids.root} {...rest} {...linkProps}>\n {iconElement}\n {child}\n {arrow}\n </Component>\n );\n };\n\n private handleFocus = () => {\n if (!this.props.disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n requestAnimationFrame(() => {\n if (keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n }\n };\n\n private handleBlur = () => {\n this.setState({ focusedByTab: false });\n };\n\n private handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n const { onClick, disabled, loading } = this.props;\n const href = this.getProps().href;\n if (!href) {\n event.preventDefault();\n }\n if (onClick && !disabled && !loading) {\n onClick(event);\n }\n };\n\n private getLinkClassName(focused: boolean, disabled: boolean, _isTheme2022: boolean): string {\n const { use } = this.getProps();\n const isBorderBottom = parseInt(this.theme.linkLineBorderBottomWidth) > 0;\n const isFocused = focused && !disabled;\n\n return !isBorderBottom\n ? cx(\n styles.root(this.theme),\n isFocused && styles.focus(this.theme),\n disabled && styles.disabled(this.theme),\n use === 'grayed' && focused && styles.useGrayedFocus(this.theme),\n )\n : cx(\n styles.lineRoot(),\n disabled && styles.disabled(this.theme),\n disabled && _isTheme2022 && isDarkTheme(this.theme) && styles.disabledDark22Theme(this.theme),\n isFocused && use === 'default' && styles.lineFocus(this.theme),\n isFocused && use === 'success' && styles.lineFocusSuccess(this.theme),\n isFocused && use === 'danger' && styles.lineFocusDanger(this.theme),\n isFocused && use === 'grayed' && styles.lineFocusGrayed(this.theme),\n );\n }\n}\n"]}
@@ -5,7 +5,9 @@ export declare const globalClasses: {
5
5
  export declare const styles: {
6
6
  root(t: Theme): string;
7
7
  lineRoot(): string;
8
+ lineTextWrapper(t: Theme): string;
8
9
  lineText(t: Theme): string;
10
+ lineTextIE11(t: Theme): string;
9
11
  lineFocus(t: Theme): string;
10
12
  lineFocusSuccess(t: Theme): string;
11
13
  lineFocusDanger(t: Theme): string;
@@ -1,7 +1,7 @@
1
1
  "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.styles = exports.globalClasses = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");
2
2
 
3
3
 
4
- var _Link = require("./Link.mixins");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
4
+ var _Link = require("./Link.mixins");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
5
5
 
6
6
  var globalClasses = (0, _Emotion.prefix)('link')({
7
7
  text: 'text' });exports.globalClasses = globalClasses;
@@ -16,16 +16,48 @@ var line = (0, _Emotion.keyframes)(_templateObject || (_templateObject = (0, _ta
16
16
 
17
17
 
18
18
 
19
+ var oldLineText = function oldLineText(t) {
20
+ var delay = parseFloat(t.linkLineBorderBottomOpacity) - 1;
21
+ return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n border-bottom-style: ", ";\n border-bottom-width: ", ";\n animation: ", " 1s linear !important; // override creevey\n animation-play-state: paused !important;\n animation-delay: ", "s !important;\n animation-fill-mode: forwards !important;\n "])),
22
+ t.linkLineBorderBottomStyle,
23
+ t.linkLineBorderBottomWidth,
24
+ line,
25
+
26
+ delay);
27
+
28
+
29
+ };
30
+
19
31
  var styles = (0, _Emotion.memoizeStyle)({
20
32
  root: function root(t) {
21
- return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n position: relative;\n "])),
33
+ return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n position: relative;\n "])),
22
34
  (0, _Link.linkMixin)(t.linkHoverTextDecoration));
23
35
 
24
36
 
25
37
  },
26
38
 
27
39
  lineRoot: function lineRoot() {
28
- return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n border-radius: 1px;\n outline: none;\n text-decoration: none;\n "])));
40
+ return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n border-radius: 1px;\n outline: none;\n text-decoration: none;\n "])));
41
+
42
+
43
+
44
+
45
+ },
46
+
47
+ lineTextWrapper: function lineTextWrapper(t) {
48
+ // При hover'е подчеркивание из прозрачного переходит в currentColor.
49
+ // За счет наложения этого цвета на подчеркивание lineText (currentColor с половинной прозрачностью)
50
+ // достигается эффект перехода currentColor с половинной прозрачностью до currentColor.
51
+
52
+ // Планировалось добавить transition и color-mix(in srgb, currentColor 50%, transparent) в lineText.
53
+ // Однако, в chrome и edge сочетание transition, color-mix и currentColor вызывает моргание при transition.
54
+ return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n @supports (border-bottom-color: ", ") {\n transition: border-bottom-color ", " ", ";\n border-bottom-style: ", ";\n border-bottom-width: ", ";\n border-bottom-color: transparent;\n &:hover {\n border-bottom-color: currentColor;\n }\n }\n "])),
55
+ t.linkLineBorderBottomColor,
56
+ t.transitionDuration, t.transitionTimingFunction,
57
+ t.linkLineBorderBottomStyle,
58
+ t.linkLineBorderBottomWidth);
59
+
60
+
29
61
 
30
62
 
31
63
 
@@ -33,19 +65,26 @@ var styles = (0, _Emotion.memoizeStyle)({
33
65
  },
34
66
 
35
67
  lineText: function lineText(t) {
36
- var delay = parseFloat(t.linkLineBorderBottomOpacity) - 1;
37
- return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n border-bottom-style: ", ";\n border-bottom-width: ", ";\n animation: ", " 1s linear !important; // override creevey\n animation-play-state: paused !important;\n animation-delay: ", "s !important;\n animation-fill-mode: forwards !important;\n "])),
68
+ return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n @supports (border-bottom-color: ", ") {\n border-bottom-style: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n }\n @supports not (border-bottom-color: ", ") {\n ", ";\n }\n "])),
69
+ t.linkLineBorderBottomColor,
38
70
  t.linkLineBorderBottomStyle,
39
71
  t.linkLineBorderBottomWidth,
40
- line,
72
+ t.linkLineBorderBottomColor,
41
73
 
42
- delay);
74
+ t.linkLineBorderBottomColor,
75
+ oldLineText(t));
43
76
 
44
77
 
45
78
  },
46
79
 
80
+ lineTextIE11: function lineTextIE11(t) {
81
+ return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n "])),
82
+ oldLineText(t));
83
+
84
+ },
85
+
47
86
  lineFocus: function lineFocus(t) {
48
- return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", ";\n .", " {\n ", "\n }\n "])),
87
+ return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", ";\n .", " {\n ", "\n }\n "])),
49
88
  t.linkHoverColor,
50
89
  globalClasses.text,
51
90
  (0, _Link.linkUseLineHovered)(t.linkLineHoverBorderBottomStyle));
@@ -54,7 +93,7 @@ var styles = (0, _Emotion.memoizeStyle)({
54
93
  },
55
94
 
56
95
  lineFocusSuccess: function lineFocusSuccess(t) {
57
- return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", " !important;\n .", " {\n ", "\n }\n "])),
96
+ return (0, _Emotion.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", " !important;\n .", " {\n ", "\n }\n "])),
58
97
  t.linkSuccessHoverColor,
59
98
  globalClasses.text,
60
99
  (0, _Link.linkUseLineHovered)(t.linkLineHoverBorderBottomStyle));
@@ -63,7 +102,7 @@ var styles = (0, _Emotion.memoizeStyle)({
63
102
  },
64
103
 
65
104
  lineFocusDanger: function lineFocusDanger(t) {
66
- return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", " !important;\n .", " {\n ", "\n }\n "])),
105
+ return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", " !important;\n .", " {\n ", "\n }\n "])),
67
106
  t.linkDangerHoverColor,
68
107
  globalClasses.text,
69
108
  (0, _Link.linkUseLineHovered)(t.linkLineHoverBorderBottomStyle));
@@ -72,7 +111,7 @@ var styles = (0, _Emotion.memoizeStyle)({
72
111
  },
73
112
 
74
113
  lineFocusGrayed: function lineFocusGrayed(t) {
75
- return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", " !important;\n .", " {\n ", "\n }\n "])),
114
+ return (0, _Emotion.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", " !important;\n .", " {\n ", "\n }\n "])),
76
115
  t.linkGrayedHoverColor,
77
116
  globalClasses.text,
78
117
  (0, _Link.linkUseLineHovered)(t.linkLineHoverBorderBottomStyle));
@@ -81,7 +120,7 @@ var styles = (0, _Emotion.memoizeStyle)({
81
120
  },
82
121
 
83
122
  button: function button(t) {
84
- return (0, _Emotion.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n line-height: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])),
123
+ return (0, _Emotion.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n line-height: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])),
85
124
 
86
125
  t.linkButtonLineHeight,
87
126
  t.linkButtonPaddingX,
@@ -90,13 +129,13 @@ var styles = (0, _Emotion.memoizeStyle)({
90
129
  },
91
130
 
92
131
  buttonOpened: function buttonOpened(t) {
93
- return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n background: ", ";\n "])),
132
+ return (0, _Emotion.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteralLoose2.default)(["\n background: ", ";\n "])),
94
133
  t.btnDefaultActiveBg);
95
134
 
96
135
  },
97
136
 
98
137
  arrow: function arrow() {
99
- return (0, _Emotion.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteralLoose2.default)(["\n border: 4px solid transparent;\n border-bottom-width: 0;\n border-top-color: #a0a0a0;\n display: inline-block;\n margin-bottom: 3px;\n margin-left: 3px;\n vertical-align: middle;\n "])));
138
+ return (0, _Emotion.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteralLoose2.default)(["\n border: 4px solid transparent;\n border-bottom-width: 0;\n border-top-color: #a0a0a0;\n display: inline-block;\n margin-bottom: 3px;\n margin-left: 3px;\n vertical-align: middle;\n "])));
100
139
 
101
140
 
102
141
 
@@ -108,12 +147,12 @@ var styles = (0, _Emotion.memoizeStyle)({
108
147
  },
109
148
 
110
149
  useRoot: function useRoot() {
111
- return (0, _Emotion.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteralLoose2.default)(["\n border-bottom-color: currentColor;\n "])));
150
+ return (0, _Emotion.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteralLoose2.default)(["\n border-bottom-color: currentColor;\n "])));
112
151
 
113
152
 
114
153
  },
115
154
  useDefault: function useDefault(t) {
116
- return (0, _Emotion.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
155
+ return (0, _Emotion.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
117
156
  (0, _Link.linkUseColorsMixin)(t.linkColor, t.linkHoverColor, t.linkActiveColor),
118
157
  globalClasses.text,
119
158
 
@@ -124,7 +163,7 @@ var styles = (0, _Emotion.memoizeStyle)({
124
163
  },
125
164
 
126
165
  useSuccess: function useSuccess(t) {
127
- return (0, _Emotion.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
166
+ return (0, _Emotion.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
128
167
  (0, _Link.linkUseColorsMixin)(t.linkSuccessColor, t.linkSuccessHoverColor, t.linkSuccessActiveColor),
129
168
  globalClasses.text,
130
169
 
@@ -135,7 +174,7 @@ var styles = (0, _Emotion.memoizeStyle)({
135
174
  },
136
175
 
137
176
  useDanger: function useDanger(t) {
138
- return (0, _Emotion.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
177
+ return (0, _Emotion.css)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
139
178
  (0, _Link.linkUseColorsMixin)(t.linkDangerColor, t.linkDangerHoverColor, t.linkDangerActiveColor),
140
179
  globalClasses.text,
141
180
 
@@ -146,7 +185,7 @@ var styles = (0, _Emotion.memoizeStyle)({
146
185
  },
147
186
 
148
187
  useGrayed: function useGrayed(t) {
149
- return (0, _Emotion.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
188
+ return (0, _Emotion.css)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n .", " {\n :hover {\n ", "\n }\n }\n "])),
150
189
  (0, _Link.linkUseColorsMixin)(t.linkGrayedColor, t.linkGrayedHoverColor, t.linkGrayedActiveColor),
151
190
  globalClasses.text,
152
191
 
@@ -157,19 +196,19 @@ var styles = (0, _Emotion.memoizeStyle)({
157
196
  },
158
197
 
159
198
  useGrayedFocus: function useGrayedFocus(t) {
160
- return (0, _Emotion.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", ";\n "])),
199
+ return (0, _Emotion.css)(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteralLoose2.default)(["\n color: ", ";\n "])),
161
200
  t.linkDisabledColor);
162
201
 
163
202
  },
164
203
 
165
204
  focus: function focus(t) {
166
- return (0, _Emotion.css)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteralLoose2.default)(["\n text-decoration: ", ";\n "])),
205
+ return (0, _Emotion.css)(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteralLoose2.default)(["\n text-decoration: ", ";\n "])),
167
206
  t.linkHoverTextDecoration);
168
207
 
169
208
  },
170
209
 
171
210
  disabled: function disabled(t) {
172
- return (0, _Emotion.css)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n\n color: ", " !important; // override root color\n\n &:hover {\n color: ", ";\n }\n "])),
211
+ return (0, _Emotion.css)(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteralLoose2.default)(["\n ", ";\n\n color: ", " !important; // override root color\n\n &:hover {\n color: ", ";\n }\n "])),
173
212
  (0, _Link.linkDisabledMixin)(),
174
213
 
175
214
  t.linkDisabledColor,
@@ -181,7 +220,7 @@ var styles = (0, _Emotion.memoizeStyle)({
181
220
  },
182
221
 
183
222
  disabledDark22Theme: function disabledDark22Theme(t) {
184
- return (0, _Emotion.css)(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteralLoose2.default)(["\n .", " {\n ", "\n }\n "])),
223
+ return (0, _Emotion.css)(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteralLoose2.default)(["\n .", " {\n ", "\n }\n "])),
185
224
  globalClasses.text,
186
225
  (0, _Link.linkUseLineHovered)(t.linkLineHoverBorderBottomStyle));
187
226
 
@@ -189,7 +228,7 @@ var styles = (0, _Emotion.memoizeStyle)({
189
228
  },
190
229
 
191
230
  icon: function icon(t) {
192
- return (0, _Emotion.css)(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n margin-right: ", ";\n "])),
231
+ return (0, _Emotion.css)(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n margin-right: ", ";\n "])),
193
232
 
194
233
  t.linkIconMarginRight);
195
234
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Link.styles.ts"],"names":["globalClasses","text","line","keyframes","styles","root","t","css","linkHoverTextDecoration","lineRoot","lineText","delay","parseFloat","linkLineBorderBottomOpacity","linkLineBorderBottomStyle","linkLineBorderBottomWidth","lineFocus","linkHoverColor","linkLineHoverBorderBottomStyle","lineFocusSuccess","linkSuccessHoverColor","lineFocusDanger","linkDangerHoverColor","lineFocusGrayed","linkGrayedHoverColor","button","linkButtonLineHeight","linkButtonPaddingX","buttonOpened","btnDefaultActiveBg","arrow","useRoot","useDefault","linkColor","linkActiveColor","useSuccess","linkSuccessColor","linkSuccessActiveColor","useDanger","linkDangerColor","linkDangerActiveColor","useGrayed","linkGrayedColor","linkGrayedActiveColor","useGrayedFocus","linkDisabledColor","focus","disabled","disabledDark22Theme","icon","linkIconMarginRight"],"mappings":"oSAAA;;;AAGA,qC;;AAEO,IAAMA,aAAa,GAAG,qBAAO,MAAP,EAAe;AAC1CC,EAAAA,IAAI,EAAE,MADoC,EAAf,CAAtB,C;;;AAIP,IAAMC,IAAI,OAAGC,kBAAH,iMAAV;;;;;;;;;AASO,IAAMC,MAAM,GAAG,2BAAa;AACjCC,EAAAA,IADiC,gBAC5BC,CAD4B,EAClB;AACb,eAAOC,YAAP;AACI,yBAAUD,CAAC,CAACE,uBAAZ,CADJ;;;AAID,GANgC;;AAQjCC,EAAAA,QARiC,sBAQtB;AACT,eAAOF,YAAP;;;;;AAKD,GAdgC;;AAgBjCG,EAAAA,QAhBiC,oBAgBxBJ,CAhBwB,EAgBd;AACjB,QAAMK,KAAK,GAAGC,UAAU,CAACN,CAAC,CAACO,2BAAH,CAAV,GAA4C,CAA1D;AACA,eAAON,YAAP;AACyBD,IAAAA,CAAC,CAACQ,yBAD3B;AAEyBR,IAAAA,CAAC,CAACS,yBAF3B;AAGeb,IAAAA,IAHf;;AAK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ACWD,IAAAA,CAAC,CAACuC,iBADb;;AAGD,GAhJgC;;AAkJjCC,EAAAA,KAlJiC,iBAkJ3BxC,CAlJ2B,EAkJjB;AACd,eAAOC,YAAP;AACqBD,IAAAA,CAAC,CAACE,uBADvB;;AAGD,GAtJgC;;AAwJjCuC,EAAAA,QAxJiC,oBAwJxBzC,CAxJwB,EAwJd;AACjB,eAAOC,YAAP;AACI,kCADJ;;AAGWD,IAAAA,CAAC,CAACuC,iBAHb;;;AAMavC,IAAAA,CAAC,CAACuC,iBANf;;;AASD,GAlKgC;;AAoKjCG,EAAAA,mBApKiC,+BAoKb1C,CApKa,EAoKH;AAC5B,eAAOC,YAAP;AACKP,IAAAA,aAAa,CAACC,IADnB;AAEM,kCAAmBK,CAAC,CAACY,8BAArB,CAFN;;;AAKD,GA1KgC;;AA4KjC+B,EAAAA,IA5KiC,gBA4K5B3C,CA5K4B,EA4KlB;AACb,eAAOC,YAAP;;AAEkBD,IAAAA,CAAC,CAAC4C,mBAFpB;;AAID,GAjLgC,EAAb,CAAf,C","sourcesContent":["import { css, keyframes, memoizeStyle, prefix } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\n\nimport { linkMixin, linkDisabledMixin, linkUseColorsMixin, linkUseLineHovered } from './Link.mixins';\n\nexport const globalClasses = prefix('link')({\n text: 'text',\n});\n\nconst line = keyframes`\n 0% {\n border-bottom-color: inherit;\n }\n 100% {\n border-bottom-color: transparent;\n }\n`;\n\nexport const styles = memoizeStyle({\n root(t: Theme) {\n return css`\n ${linkMixin(t.linkHoverTextDecoration)};\n position: relative;\n `;\n },\n\n lineRoot() {\n return css`\n border-radius: 1px;\n outline: none;\n text-decoration: none;\n `;\n },\n\n lineText(t: Theme) {\n const delay = parseFloat(t.linkLineBorderBottomOpacity) - 1;\n return css`\n border-bottom-style: ${t.linkLineBorderBottomStyle};\n border-bottom-width: ${t.linkLineBorderBottomWidth};\n animation: ${line} 1s linear !important; // override creevey\n animation-play-state: paused !important;\n animation-delay: ${delay}s !important;\n animation-fill-mode: forwards !important;\n `;\n },\n\n lineFocus(t: Theme) {\n return css`\n color: ${t.linkHoverColor};\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n lineFocusSuccess(t: Theme) {\n return css`\n color: ${t.linkSuccessHoverColor} !important;\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n lineFocusDanger(t: Theme) {\n return css`\n color: ${t.linkDangerHoverColor} !important;\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n lineFocusGrayed(t: Theme) {\n return css`\n color: ${t.linkGrayedHoverColor} !important;\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n button(t: Theme) {\n return css`\n display: inline-block;\n line-height: ${t.linkButtonLineHeight};\n padding-left: ${t.linkButtonPaddingX};\n padding-right: ${t.linkButtonPaddingX};\n `;\n },\n\n buttonOpened(t: Theme) {\n return css`\n background: ${t.btnDefaultActiveBg};\n `;\n },\n\n arrow() {\n return css`\n border: 4px solid transparent;\n border-bottom-width: 0;\n border-top-color: #a0a0a0;\n display: inline-block;\n margin-bottom: 3px;\n margin-left: 3px;\n vertical-align: middle;\n `;\n },\n\n useRoot() {\n return css`\n border-bottom-color: currentColor;\n `;\n },\n useDefault(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkColor, t.linkHoverColor, t.linkActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useSuccess(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkSuccessColor, t.linkSuccessHoverColor, t.linkSuccessActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useDanger(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkDangerColor, t.linkDangerHoverColor, t.linkDangerActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useGrayed(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkGrayedColor, t.linkGrayedHoverColor, t.linkGrayedActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useGrayedFocus(t: Theme) {\n return css`\n color: ${t.linkDisabledColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n text-decoration: ${t.linkHoverTextDecoration};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n ${linkDisabledMixin()};\n\n color: ${t.linkDisabledColor} !important; // override root color\n\n &:hover {\n color: ${t.linkDisabledColor};\n }\n `;\n },\n\n disabledDark22Theme(t: Theme) {\n return css`\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n icon(t: Theme) {\n return css`\n display: inline-block;\n margin-right: ${t.linkIconMarginRight};\n `;\n },\n});\n"]}
1
+ {"version":3,"sources":["Link.styles.ts"],"names":["globalClasses","text","line","keyframes","oldLineText","t","delay","parseFloat","linkLineBorderBottomOpacity","css","linkLineBorderBottomStyle","linkLineBorderBottomWidth","styles","root","linkHoverTextDecoration","lineRoot","lineTextWrapper","linkLineBorderBottomColor","transitionDuration","transitionTimingFunction","lineText","lineTextIE11","lineFocus","linkHoverColor","linkLineHoverBorderBottomStyle","lineFocusSuccess","linkSuccessHoverColor","lineFocusDanger","linkDangerHoverColor","lineFocusGrayed","linkGrayedHoverColor","button","linkButtonLineHeight","linkButtonPaddingX","buttonOpened","btnDefaultActiveBg","arrow","useRoot","useDefault","linkColor","linkActiveColor","useSuccess","linkSuccessColor","linkSuccessActiveColor","useDanger","linkDangerColor","linkDangerActiveColor","useGrayed","linkGrayedColor","linkGrayedActiveColor","useGrayedFocus","linkDisabledColor","focus","disabled","disabledDark22Theme","icon","linkIconMarginRight"],"mappings":"oSAAA;;;AAGA,qC;;AAEO,IAAMA,aAAa,GAAG,qBAAO,MAAP,EAAe;AAC1CC,EAAAA,IAAI,EAAE,MADoC,EAAf,CAAtB,C;;;AAIP,IAAMC,IAAI,OAAGC,kBAAH,iMAAV;;;;;;;;;AASA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAUC,CAAV,EAAoB;AACtC,MAAMC,KAAK,GAAGC,UAAU,CAACF,CAAC,CAACG,2BAAH,CAAV,GAA4C,CAA1D;AACA,aAAOC,YAAP;AACyBJ,EAAAA,CAAC,CAACK,yBAD3B;AAEyBL,EAAAA,CAAC,CAACM,yBAF3B;AAGeT,EAAAA,IAHf;;AAKqBI,EAAAA,KALrB;;;AAQD,CAVD;;AAYO,IAAMM,MAAM,GAAG,2BAAa;AACjCC,EAAAA,IADiC,gBAC5BR,CAD4B,EAClB;AACb,eAAOI,YAAP;AACI,yBAAUJ,CAAC,CAACS,uBAAZ,CADJ;;;AAID,GANgC;;AAQjCC,EAAAA,QARiC,sBAQtB;AACT,eAAON,YAAP;;;;;AAKD,GAdgC;;AAgBjCO,EAAAA,eAhBiC,2BAgBjBX,CAhBiB,EAgBP;AACxB;AACA;AACA;;AAEA;AACA;AACA,eAAOI,YAAP;AACoCJ,IAAAA,CAAC,CAACY,yBADtC;AAEsCZ,IAAAA,CAAC,CAACa,kBAFxC,EAE8Db,CAAC,CAACc,wBAFhE;AAG2Bd,IAAAA,CAAC,CAACK,yBAH7B;AAI2BL,IAAAA,CAAC,CAACM,yBAJ7B;;;;;;;AAWD,GAlCgC;;AAoCjCS,EAAAA,QApCiC,oBAoCxBf,CApCwB,EAoCd;AACjB,eAAOI,YAAP;AACoCJ,IAAAA,CAAC,CAACY,yBADtC;AAE2BZ,IAAAA,CAAC,CAACK,yBAF7B;AAG2BL,IAAAA,CAAC,CAACM,yBAH7B;AAI2B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,eAArB,EAAsC3C,CAAC,CAACyB,oBAAxC,EAA8DzB,CAAC,CAAC4C,qBAAhE,CADJ;AAEKjD,IAAAA,aAAa,CAACC,IAFnB;;AAIQ,kCAAmBI,CAAC,CAACmB,8BAArB,CAJR;;;;AAQD,GArKgC;;AAuKjC0B,EAAAA,cAvKiC,0BAuKlB7C,CAvKkB,EAuKR;AACvB,eAAOI,YAAP;AACWJ,IAAAA,CAAC,CAAC8C,iBADb;;AAGD,GA3KgC;;AA6KjCC,EAAAA,KA7KiC,iBA6K3B/C,CA7K2B,EA6KjB;AACd,eAAOI,YAAP;AACqBJ,IAAAA,CAAC,CAACS,uBADvB;;AAGD,GAjLgC;;AAmLjCuC,EAAAA,QAnLiC,oBAmLxBhD,CAnLwB,EAmLd;AACjB,eAAOI,YAAP;AACI,kCADJ;;AAGWJ,IAAAA,CAAC,CAAC8C,iBAHb;;;AAMa9C,IAAAA,CAAC,CAAC8C,iBANf;;;AASD,GA7LgC;;AA+LjCG,EAAAA,mBA/LiC,+BA+LbjD,CA/La,EA+LH;AAC5B,eAAOI,YAAP;AACKT,IAAAA,aAAa,CAACC,IADnB;AAEM,kCAAmBI,CAAC,CAACmB,8BAArB,CAFN;;;AAKD,GArMgC;;AAuMjC+B,EAAAA,IAvMiC,gBAuM5BlD,CAvM4B,EAuMlB;AACb,eAAOI,YAAP;;AAEkBJ,IAAAA,CAAC,CAACmD,mBAFpB;;AAID,GA5MgC,EAAb,CAAf,C","sourcesContent":["import { css, keyframes, memoizeStyle, prefix } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\n\nimport { linkMixin, linkDisabledMixin, linkUseColorsMixin, linkUseLineHovered } from './Link.mixins';\n\nexport const globalClasses = prefix('link')({\n text: 'text',\n});\n\nconst line = keyframes`\n 0% {\n border-bottom-color: inherit;\n }\n 100% {\n border-bottom-color: transparent;\n }\n`;\n\nconst oldLineText = function (t: Theme) {\n const delay = parseFloat(t.linkLineBorderBottomOpacity) - 1;\n return css`\n border-bottom-style: ${t.linkLineBorderBottomStyle};\n border-bottom-width: ${t.linkLineBorderBottomWidth};\n animation: ${line} 1s linear !important; // override creevey\n animation-play-state: paused !important;\n animation-delay: ${delay}s !important;\n animation-fill-mode: forwards !important;\n `;\n};\n\nexport const styles = memoizeStyle({\n root(t: Theme) {\n return css`\n ${linkMixin(t.linkHoverTextDecoration)};\n position: relative;\n `;\n },\n\n lineRoot() {\n return css`\n border-radius: 1px;\n outline: none;\n text-decoration: none;\n `;\n },\n\n lineTextWrapper(t: Theme) {\n // При hover'е подчеркивание из прозрачного переходит в currentColor.\n // За счет наложения этого цвета на подчеркивание lineText (currentColor с половинной прозрачностью)\n // достигается эффект перехода currentColor с половинной прозрачностью до currentColor.\n\n // Планировалось добавить transition и color-mix(in srgb, currentColor 50%, transparent) в lineText.\n // Однако, в chrome и edge сочетание transition, color-mix и currentColor вызывает моргание при transition.\n return css`\n @supports (border-bottom-color: ${t.linkLineBorderBottomColor}) {\n transition: border-bottom-color ${t.transitionDuration} ${t.transitionTimingFunction};\n border-bottom-style: ${t.linkLineBorderBottomStyle};\n border-bottom-width: ${t.linkLineBorderBottomWidth};\n border-bottom-color: transparent;\n &:hover {\n border-bottom-color: currentColor;\n }\n }\n `;\n },\n\n lineText(t: Theme) {\n return css`\n @supports (border-bottom-color: ${t.linkLineBorderBottomColor}) {\n border-bottom-style: ${t.linkLineBorderBottomStyle};\n border-bottom-width: ${t.linkLineBorderBottomWidth};\n border-bottom-color: ${t.linkLineBorderBottomColor};\n }\n @supports not (border-bottom-color: ${t.linkLineBorderBottomColor}) {\n ${oldLineText(t)};\n }\n `;\n },\n\n lineTextIE11(t: Theme) {\n return css`\n ${oldLineText(t)};\n `;\n },\n\n lineFocus(t: Theme) {\n return css`\n color: ${t.linkHoverColor};\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n lineFocusSuccess(t: Theme) {\n return css`\n color: ${t.linkSuccessHoverColor} !important;\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n lineFocusDanger(t: Theme) {\n return css`\n color: ${t.linkDangerHoverColor} !important;\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n lineFocusGrayed(t: Theme) {\n return css`\n color: ${t.linkGrayedHoverColor} !important;\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n button(t: Theme) {\n return css`\n display: inline-block;\n line-height: ${t.linkButtonLineHeight};\n padding-left: ${t.linkButtonPaddingX};\n padding-right: ${t.linkButtonPaddingX};\n `;\n },\n\n buttonOpened(t: Theme) {\n return css`\n background: ${t.btnDefaultActiveBg};\n `;\n },\n\n arrow() {\n return css`\n border: 4px solid transparent;\n border-bottom-width: 0;\n border-top-color: #a0a0a0;\n display: inline-block;\n margin-bottom: 3px;\n margin-left: 3px;\n vertical-align: middle;\n `;\n },\n\n useRoot() {\n return css`\n border-bottom-color: currentColor;\n `;\n },\n useDefault(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkColor, t.linkHoverColor, t.linkActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useSuccess(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkSuccessColor, t.linkSuccessHoverColor, t.linkSuccessActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useDanger(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkDangerColor, t.linkDangerHoverColor, t.linkDangerActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useGrayed(t: Theme) {\n return css`\n ${linkUseColorsMixin(t.linkGrayedColor, t.linkGrayedHoverColor, t.linkGrayedActiveColor)};\n .${globalClasses.text} {\n :hover {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n }\n `;\n },\n\n useGrayedFocus(t: Theme) {\n return css`\n color: ${t.linkDisabledColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n text-decoration: ${t.linkHoverTextDecoration};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n ${linkDisabledMixin()};\n\n color: ${t.linkDisabledColor} !important; // override root color\n\n &:hover {\n color: ${t.linkDisabledColor};\n }\n `;\n },\n\n disabledDark22Theme(t: Theme) {\n return css`\n .${globalClasses.text} {\n ${linkUseLineHovered(t.linkLineHoverBorderBottomStyle)}\n }\n `;\n },\n\n icon(t: Theme) {\n return css`\n display: inline-block;\n margin-right: ${t.linkIconMarginRight};\n `;\n },\n});\n"]}
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { CommonProps } from '../../internal/CommonWrapper';
3
+ export declare type MenuFooterSize = 'small' | 'medium' | 'large';
4
+ export interface MenuFooterProps extends CommonProps {
5
+ _enableIconPadding?: boolean;
6
+ children: ReactNode;
7
+ /** Размер */
8
+ size?: MenuFooterSize;
9
+ }
10
+ export declare const MenuFooterDataTids: {
11
+ readonly root: "MenuFooter__root";
12
+ };
13
+ /**
14
+ * Футер меню.
15
+ *
16
+ * _Примечание_: `футер меню`, в отличие от `элемента меню` нельзя затаргетить с клавиатуры.
17
+ *
18
+ * Сущности в которых может быть использован `MenuFooter`: [DropdownMenu](#/Components/DropdownMenu), [Kebab](#/Components/Kebab), [TooltipMenu](#/Components/TooltipMenu) и [Select](#/Components/Select).
19
+ */
20
+ declare function MenuFooter({ _enableIconPadding, children, size, ...rest }: MenuFooterProps): JSX.Element;
21
+ declare namespace MenuFooter {
22
+ var __KONTUR_REACT_UI__: string;
23
+ var __MENU_FOOTER__: boolean;
24
+ }
25
+ export { MenuFooter };
26
+ export declare const isMenuFooter: (child: React.ReactNode) => child is React.ReactElement<MenuFooterProps, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1,79 @@
1
+ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.MenuFooter = MenuFooter;exports.isMenuFooter = exports.MenuFooterDataTids = void 0;var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));var _react = _interopRequireWildcard(require("react"));
2
+
3
+ var _ThemeContext = require("../../lib/theming/ThemeContext");
4
+ var _CommonWrapper = require("../../internal/CommonWrapper");
5
+ var _Emotion = require("../../lib/theming/Emotion");
6
+
7
+ var _MenuFooter = require("./MenuFooter.styles");var _excluded = ["_enableIconPadding", "children", "size"];function _getRequireWildcardCache(nodeInterop) {if (typeof WeakMap !== "function") return null;var cacheBabelInterop = new WeakMap();var cacheNodeInterop = new WeakMap();return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {return nodeInterop ? cacheNodeInterop : cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj, nodeInterop) {if (!nodeInterop && obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache(nodeInterop);if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ var MenuFooterDataTids = {
19
+ root: 'MenuFooter__root' };
20
+
21
+
22
+ /**
23
+ * Футер меню.
24
+ *
25
+ * _Примечание_: `футер меню`, в отличие от `элемента меню` нельзя затаргетить с клавиатуры.
26
+ *
27
+ * Сущности в которых может быть использован `MenuFooter`: [DropdownMenu](#/Components/DropdownMenu), [Kebab](#/Components/Kebab), [TooltipMenu](#/Components/TooltipMenu) и [Select](#/Components/Select).
28
+ */exports.MenuFooterDataTids = MenuFooterDataTids;
29
+ function MenuFooter(_ref) {var _cx;var _ref$_enableIconPaddi = _ref._enableIconPadding,_enableIconPadding = _ref$_enableIconPaddi === void 0 ? false : _ref$_enableIconPaddi,children = _ref.children,_ref$size = _ref.size,size = _ref$size === void 0 ? 'small' : _ref$size,rest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
30
+ var theme = (0, _react.useContext)(_ThemeContext.ThemeContext);
31
+
32
+ function getRootSizeClassName() {
33
+ switch (size) {
34
+ case 'large':
35
+ return _MenuFooter.styles.rootLarge(theme);
36
+ case 'medium':
37
+ return _MenuFooter.styles.rootMedium(theme);
38
+ case 'small':
39
+ default:
40
+ return _MenuFooter.styles.rootSmall(theme);}
41
+
42
+ }
43
+ function getWithLeftPaddingSizeClassName() {
44
+ switch (size) {
45
+ case 'large':
46
+ return _MenuFooter.styles.withLeftPaddingSmall(theme);
47
+ case 'medium':
48
+ return _MenuFooter.styles.withLeftPaddingMedium(theme);
49
+ case 'small':
50
+ default:
51
+ return _MenuFooter.styles.withLeftPaddingSmall(theme);}
52
+
53
+ }
54
+
55
+ return /*#__PURE__*/(
56
+ _react.default.createElement(_CommonWrapper.CommonWrapper, rest, /*#__PURE__*/
57
+ _react.default.createElement("div", {
58
+ "data-tid": MenuFooterDataTids.root,
59
+ className: (0, _Emotion.cx)(getRootSizeClassName(), (_cx = {}, _cx[
60
+ _MenuFooter.styles.root(theme)] = true, _cx[
61
+ getWithLeftPaddingSizeClassName()] = _enableIconPadding, _cx)) },
62
+
63
+
64
+ children)));
65
+
66
+
67
+
68
+ }
69
+
70
+ MenuFooter.__KONTUR_REACT_UI__ = 'MenuFooter';
71
+ MenuFooter.__MENU_FOOTER__ = true;
72
+
73
+
74
+
75
+ var isMenuFooter = function isMenuFooter(child) {
76
+ return /*#__PURE__*/_react.default.isValidElement(child) ?
77
+ Object.prototype.hasOwnProperty.call(child.type, '__MENU_FOOTER__') :
78
+ false;
79
+ };exports.isMenuFooter = isMenuFooter;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["MenuFooter.tsx"],"names":["MenuFooterDataTids","root","MenuFooter","_enableIconPadding","children","size","rest","theme","ThemeContext","getRootSizeClassName","styles","rootLarge","rootMedium","rootSmall","getWithLeftPaddingSizeClassName","withLeftPaddingSmall","withLeftPaddingMedium","__KONTUR_REACT_UI__","__MENU_FOOTER__","isMenuFooter","child","isValidElement","Object","prototype","hasOwnProperty","call","type"],"mappings":"mVAAA;;AAEA;AACA;AACA;;AAEA,iD;;;;;;;;;;;AAWO,IAAMA,kBAAkB,GAAG;AAChCC,EAAAA,IAAI,EAAE,kBAD0B,EAA3B;;;AAIP;AACA;AACA;AACA;AACA;AACA;AACA,G;AACA,SAASC,UAAT,OAAwG,0CAAlFC,kBAAkF,CAAlFA,kBAAkF,sCAA7D,KAA6D,yBAAtDC,QAAsD,QAAtDA,QAAsD,kBAA5CC,IAA4C,CAA5CA,IAA4C,0BAArC,OAAqC,aAAzBC,IAAyB;AACtG,MAAMC,KAAK,GAAG,uBAAWC,0BAAX,CAAd;;AAEA,WAASC,oBAAT,GAAgC;AAC9B,YAAQJ,IAAR;AACE,WAAK,OAAL;AACE,eAAOK,mBAAOC,SAAP,CAAiBJ,KAAjB,CAAP;AACF,WAAK,QAAL;AACE,eAAOG,mBAAOE,UAAP,CAAkBL,KAAlB,CAAP;AACF,WAAK,OAAL;AACA;AACE,eAAOG,mBAAOG,SAAP,CAAiBN,KAAjB,CAAP,CAPJ;;AASD;AACD,WAASO,+BAAT,GAA2C;AACzC,YAAQT,IAAR;AACE,WAAK,OAAL;AACE,eAAOK,mBAAOK,oBAAP,CAA4BR,KAA5B,CAAP;AACF,WAAK,QAAL;AACE,eAAOG,mBAAOM,qBAAP,CAA6BT,KAA7B,CAAP;AACF,WAAK,OAAL;AACA;AACE,eAAOG,mBAAOK,oBAAP,CAA4BR,KAA5B,CAAP,CAPJ;;AASD;;AAED;AACE,iCAAC,4BAAD,EAAmBD,IAAnB;AACE;AACE,kBAAUN,kBAAkB,CAACC,IAD/B;AAEE,MAAA,SAAS,EAAE,iBAAGQ,oBAAoB,EAAvB;AACRC,yBAAOT,IAAP,CAAYM,KAAZ,CADQ,IACa,IADb;AAERO,MAAAA,+BAA+B,EAFvB,IAE4BX,kBAF5B,OAFb;;;AAOGC,IAAAA,QAPH,CADF,CADF;;;;AAaD;;AAEDF,UAAU,CAACe,mBAAX,GAAiC,YAAjC;AACAf,UAAU,CAACgB,eAAX,GAA6B,IAA7B;;;;AAIO,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA0E;AACpG,SAAO,4BAAMC,cAAN,CAAsCD,KAAtC;AACHE,EAAAA,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCL,KAAK,CAACM,IAA3C,EAAiD,iBAAjD,CADG;AAEH,OAFJ;AAGD,CAJM,C","sourcesContent":["import React, { ReactNode, useContext } from 'react';\n\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonProps, CommonWrapper } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\n\nimport { styles } from './MenuFooter.styles';\n\nexport type MenuFooterSize = 'small' | 'medium' | 'large';\n\nexport interface MenuFooterProps extends CommonProps {\n _enableIconPadding?: boolean;\n children: ReactNode;\n /** Размер */\n size?: MenuFooterSize;\n}\n\nexport const MenuFooterDataTids = {\n root: 'MenuFooter__root',\n} as const;\n\n/**\n * Футер меню.\n *\n * _Примечание_: `футер меню`, в отличие от `элемента меню` нельзя затаргетить с клавиатуры.\n *\n * Сущности в которых может быть использован `MenuFooter`: [DropdownMenu](#/Components/DropdownMenu), [Kebab](#/Components/Kebab), [TooltipMenu](#/Components/TooltipMenu) и [Select](#/Components/Select).\n */\nfunction MenuFooter({ _enableIconPadding = false, children, size = 'small', ...rest }: MenuFooterProps) {\n const theme = useContext(ThemeContext);\n\n function getRootSizeClassName() {\n switch (size) {\n case 'large':\n return styles.rootLarge(theme);\n case 'medium':\n return styles.rootMedium(theme);\n case 'small':\n default:\n return styles.rootSmall(theme);\n }\n }\n function getWithLeftPaddingSizeClassName() {\n switch (size) {\n case 'large':\n return styles.withLeftPaddingSmall(theme);\n case 'medium':\n return styles.withLeftPaddingMedium(theme);\n case 'small':\n default:\n return styles.withLeftPaddingSmall(theme);\n }\n }\n\n return (\n <CommonWrapper {...rest}>\n <div\n data-tid={MenuFooterDataTids.root}\n className={cx(getRootSizeClassName(), {\n [styles.root(theme)]: true,\n [getWithLeftPaddingSizeClassName()]: _enableIconPadding,\n })}\n >\n {children}\n </div>\n </CommonWrapper>\n );\n}\n\nMenuFooter.__KONTUR_REACT_UI__ = 'MenuFooter';\nMenuFooter.__MENU_FOOTER__ = true;\n\nexport { MenuFooter };\n\nexport const isMenuFooter = (child: React.ReactNode): child is React.ReactElement<MenuFooterProps> => {\n return React.isValidElement<MenuFooterProps>(child)\n ? Object.prototype.hasOwnProperty.call(child.type, '__MENU_FOOTER__')\n : false;\n};\n"]}
@@ -0,0 +1,27 @@
1
+ Базовый пример меню с заголовками.
2
+
3
+ ```jsx harmony
4
+ import { Button, MenuItem, DropdownMenu } from '@skbkontur/react-ui';
5
+
6
+ <DropdownMenu
7
+ menuMaxHeight="10rem"
8
+ caption={<Button use="primary">Сотрудники компании</Button>}
9
+ >
10
+ <MenuItem>Вася</MenuItem>
11
+ <MenuItem>Петя</MenuItem>
12
+ <MenuItem>Маша</MenuItem>
13
+ <MenuFooter>Всего 3 человека</MenuFooter>
14
+ </DropdownMenu>
15
+ ```
16
+
17
+ У MenuFooter есть 3 стандартных размера.
18
+
19
+ ```jsx harmony
20
+ import { Gapped } from '@skbkontur/react-ui';
21
+
22
+ <Gapped vertical>
23
+ <MenuFooter size={'small'}>Маленький</MenuFooter>
24
+ <MenuFooter size={'medium'}>Средний</MenuFooter>
25
+ <MenuFooter size={'large'}>Большой</MenuFooter>
26
+ </Gapped>
27
+ ```
@@ -0,0 +1,2 @@
1
+ export declare const menuFooterSizeMixin: (menuFooterLegacyPaddingRight: string, menuFooterPaddingX: string, menuFooterFontSize: string, menuFooterLineHeight: string, menuFooterPaddingTop: string, menuFooterPaddingBottom: string) => string;
2
+ export declare const withIconSizeMixin: (menuItemPaddingForIcon: string) => string;
@@ -0,0 +1,26 @@
1
+ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.withIconSizeMixin = exports.menuFooterSizeMixin = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");var _templateObject, _templateObject2;
2
+
3
+ var menuFooterSizeMixin = function menuFooterSizeMixin(
4
+ menuFooterLegacyPaddingRight,
5
+ menuFooterPaddingX,
6
+ menuFooterFontSize,
7
+ menuFooterLineHeight,
8
+ menuFooterPaddingTop,
9
+ menuFooterPaddingBottom)
10
+ {
11
+ var legacyPaddingRight = parseFloat(menuFooterLegacyPaddingRight);
12
+ var paddingRight =
13
+ legacyPaddingRight !== 0 ? parseFloat(menuFooterPaddingX) + legacyPaddingRight + "px" : menuFooterPaddingX;
14
+
15
+ return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", " ", " ", ";\n "])),
16
+ menuFooterFontSize,
17
+ menuFooterLineHeight,
18
+ menuFooterPaddingTop, paddingRight, menuFooterPaddingBottom, menuFooterPaddingX);
19
+
20
+ };exports.menuFooterSizeMixin = menuFooterSizeMixin;
21
+
22
+ var withIconSizeMixin = function withIconSizeMixin(menuItemPaddingForIcon) {
23
+ return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n padding-left: ", ";\n "])),
24
+ menuItemPaddingForIcon);
25
+
26
+ };exports.withIconSizeMixin = withIconSizeMixin;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["MenuFooter.mixins.ts"],"names":["menuFooterSizeMixin","menuFooterLegacyPaddingRight","menuFooterPaddingX","menuFooterFontSize","menuFooterLineHeight","menuFooterPaddingTop","menuFooterPaddingBottom","legacyPaddingRight","parseFloat","paddingRight","css","withIconSizeMixin","menuItemPaddingForIcon"],"mappings":"qTAAA,oD;;AAEO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB;AACjCC,4BADiC;AAEjCC,kBAFiC;AAGjCC,kBAHiC;AAIjCC,oBAJiC;AAKjCC,oBALiC;AAMjCC,uBANiC;AAO9B;AACH,MAAMC,kBAAkB,GAAGC,UAAU,CAACP,4BAAD,CAArC;AACA,MAAMQ,YAAY;AAChBF,EAAAA,kBAAkB,KAAK,CAAvB,GAA8BC,UAAU,CAACN,kBAAD,CAAV,GAAiCK,kBAA/D,UAAwFL,kBAD1F;;AAGA,aAAOQ,YAAP;AACeP,EAAAA,kBADf;AAEiBC,EAAAA,oBAFjB;AAGaC,EAAAA,oBAHb,EAGqCI,YAHrC,EAGqDH,uBAHrD,EAGgFJ,kBAHhF;;AAKD,CAjBM,C;;AAmBA,IAAMS,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,sBAAD,EAAoC;AACnE,aAAOF,YAAP;AACkBE,EAAAA,sBADlB;;AAGD,CAJM,C","sourcesContent":["import { css } from '../../lib/theming/Emotion';\n\nexport const menuFooterSizeMixin = (\n menuFooterLegacyPaddingRight: string,\n menuFooterPaddingX: string,\n menuFooterFontSize: string,\n menuFooterLineHeight: string,\n menuFooterPaddingTop: string,\n menuFooterPaddingBottom: string,\n) => {\n const legacyPaddingRight = parseFloat(menuFooterLegacyPaddingRight);\n const paddingRight =\n legacyPaddingRight !== 0 ? `${parseFloat(menuFooterPaddingX) + legacyPaddingRight}px` : menuFooterPaddingX;\n\n return css`\n font-size: ${menuFooterFontSize};\n line-height: ${menuFooterLineHeight};\n padding: ${menuFooterPaddingTop} ${paddingRight} ${menuFooterPaddingBottom} ${menuFooterPaddingX};\n `;\n};\n\nexport const withIconSizeMixin = (menuItemPaddingForIcon: string) => {\n return css`\n padding-left: ${menuItemPaddingForIcon};\n `;\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { Theme } from '../../lib/theming/Theme';
2
+ export declare const styles: {
3
+ root(t: Theme): string;
4
+ rootSmall(t: Theme): string;
5
+ rootMedium(t: Theme): string;
6
+ rootLarge(t: Theme): string;
7
+ withLeftPaddingSmall(t: Theme): string;
8
+ withLeftPaddingMedium(t: Theme): string;
9
+ withLeftPaddingLarge(t: Theme): string;
10
+ };