@skbkontur/react-ui 4.13.4 → 4.14.0-next.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.
- package/CHANGELOG.md +20 -0
- package/cjs/components/Button/Button.styles.js +2 -1
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Input/Input.d.ts +8 -4
- package/cjs/components/Input/Input.js +32 -6
- package/cjs/components/Input/Input.js.map +1 -1
- package/cjs/components/Input/Input.md +49 -0
- package/cjs/components/Input/Input.styles.js +2 -1
- package/cjs/components/Input/Input.styles.js.map +1 -1
- package/cjs/components/Loader/Loader.js +1 -3
- package/cjs/components/Loader/Loader.js.map +1 -1
- package/cjs/components/Modal/Modal.js +1 -2
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/Modal.styles.d.ts +0 -2
- package/cjs/components/Modal/Modal.styles.js +22 -33
- package/cjs/components/Modal/Modal.styles.js.map +1 -1
- package/cjs/components/Modal/ModalBody.js +0 -2
- package/cjs/components/Modal/ModalBody.js.map +1 -1
- package/cjs/components/Modal/ModalFooter.js +2 -5
- package/cjs/components/Modal/ModalFooter.js.map +1 -1
- package/cjs/components/Modal/ModalHeader.js +1 -6
- package/cjs/components/Modal/ModalHeader.js.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.js +5 -5
- package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
- package/cjs/components/ScrollContainer/ScrollContainer.d.ts +1 -0
- package/cjs/components/ScrollContainer/ScrollContainer.js +9 -1
- package/cjs/components/ScrollContainer/ScrollContainer.js.map +1 -1
- package/cjs/components/Spinner/Spinner.md +1 -1
- package/cjs/components/Toast/Toast.md +2 -2
- package/cjs/components/TokenInput/TokenInput.d.ts +44 -1
- package/cjs/components/TokenInput/TokenInput.js +42 -0
- package/cjs/components/TokenInput/TokenInput.js.map +1 -1
- package/cjs/components/TokenInput/TokenInput.md +100 -0
- package/cjs/internal/CustomComboBox/CustomComboBox.js +12 -9
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/InputLikeText/InputLikeText.js +4 -1
- package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
- package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/cjs/internal/ZIndex/ZIndexStorage.d.ts +0 -5
- package/cjs/internal/ZIndex/ZIndexStorage.js +1 -6
- package/cjs/internal/ZIndex/ZIndexStorage.js.map +1 -1
- package/cjs/internal/icons/SpinnerIcon.styles.js +2 -1
- package/cjs/internal/icons/SpinnerIcon.styles.js.map +1 -1
- package/cjs/internal/themes/DarkTheme.d.ts +1 -0
- package/cjs/internal/themes/DarkTheme.js +6 -5
- package/cjs/internal/themes/DarkTheme.js.map +1 -1
- package/cjs/internal/themes/DefaultTheme.d.ts +1 -0
- package/cjs/internal/themes/DefaultTheme.js +4 -3
- package/cjs/internal/themes/DefaultTheme.js.map +1 -1
- package/components/Button/Button.styles/Button.styles.js +1 -1
- package/components/Button/Button.styles/Button.styles.js.map +1 -1
- package/components/Input/Input/Input.js +18 -5
- package/components/Input/Input/Input.js.map +1 -1
- package/components/Input/Input.d.ts +8 -4
- package/components/Input/Input.md +49 -0
- package/components/Input/Input.styles/Input.styles.js +1 -1
- package/components/Input/Input.styles/Input.styles.js.map +1 -1
- package/components/Loader/Loader/Loader.js +0 -2
- package/components/Loader/Loader/Loader.js.map +1 -1
- package/components/Modal/Modal/Modal.js +0 -1
- package/components/Modal/Modal/Modal.js.map +1 -1
- package/components/Modal/Modal.styles/Modal.styles.js +21 -27
- package/components/Modal/Modal.styles/Modal.styles.js.map +1 -1
- package/components/Modal/Modal.styles.d.ts +0 -2
- package/components/Modal/ModalBody/ModalBody.js +0 -2
- package/components/Modal/ModalBody/ModalBody.js.map +1 -1
- package/components/Modal/ModalFooter/ModalFooter.js +2 -6
- package/components/Modal/ModalFooter/ModalFooter.js.map +1 -1
- package/components/Modal/ModalHeader/ModalHeader.js +2 -6
- package/components/Modal/ModalHeader/ModalHeader.js.map +1 -1
- package/components/PasswordInput/PasswordInput/PasswordInput.js +6 -5
- package/components/PasswordInput/PasswordInput/PasswordInput.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer/ScrollContainer.js +12 -4
- package/components/ScrollContainer/ScrollContainer/ScrollContainer.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer.d.ts +1 -0
- package/components/Spinner/Spinner.md +1 -1
- package/components/Toast/Toast.md +2 -2
- package/components/TokenInput/TokenInput/TokenInput.js.map +1 -1
- package/components/TokenInput/TokenInput.d.ts +44 -1
- package/components/TokenInput/TokenInput.md +100 -0
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +11 -9
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/InputLikeText/InputLikeText/InputLikeText.js +5 -2
- package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
- package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/internal/ZIndex/ZIndexStorage/ZIndexStorage.js +1 -6
- package/internal/ZIndex/ZIndexStorage/ZIndexStorage.js.map +1 -1
- package/internal/ZIndex/ZIndexStorage.d.ts +0 -5
- package/internal/icons/SpinnerIcon.styles/SpinnerIcon.styles.js +1 -1
- package/internal/icons/SpinnerIcon.styles/SpinnerIcon.styles.js.map +1 -1
- package/internal/themes/DarkTheme/DarkTheme.js +2 -3
- package/internal/themes/DarkTheme/DarkTheme.js.map +1 -1
- package/internal/themes/DarkTheme.d.ts +1 -0
- package/internal/themes/DefaultTheme/DefaultTheme.js +5 -4
- package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
- package/internal/themes/DefaultTheme.d.ts +1 -0
- package/package.json +2 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CustomComboBox.tsx"],"names":["React","CancelationError","taskWithDelay","fixClickFocusIE","CommonWrapper","responsiveLayout","rootNode","ComboBoxRequestStatus","reducer","ComboBoxView","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","Unknown","CustomComboBoxDataTids","comboBoxView","CustomComboBox","state","requestId","cancelationToken","cancelLoaderDelay","focus","props","disabled","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","effects","nextState","setState","stateAndEffect","Array","forEach","handleEffect","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","handleClickOutside","e","close","setTimeout","handleInputBlur","handleInputClick","search","query","getItems","cancelPromise","Promise","_","reject","expectingId","loaderShowDelay","resolve","cancelLoader","race","code","cancelSearch","open","render","viewProps","align","borderless","disablePortal","error","menuAlign","drawArrow","menuPos","placeholder","size","totalCount","warning","width","maxLength","maxMenuHeight","leftIcon","rightIcon","inputMode","onValueChange","onClickOutside","onFocus","onFocusOutside","onInputBlur","onInputValueChange","onInputFocus","onInputClick","onInputKeyDown","event","persist","onMouseEnter","onMouseOver","onMouseLeave","renderItem","renderNotFound","itemWrapper","renderValue","renderTotalCount","renderAddButton","refInput","refMenu","menu","refInputLikeText","setRootNode","componentDidMount","autoFocus","componentDidUpdate","prevProps","prevState","reset","PureComponent","__KONTUR_REACT_UI__"],"mappings":"0XAAA,OAAOA,KAAP,MAAsC,OAAtC;;;;;;;AAOA,SAASC,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AACA,SAASC,eAAT,QAAgC,kCAAhC;AACA,SAAsBC,aAAtB,QAA2C,8BAA3C;AACA,SAASC,gBAAT,QAAiC,6CAAjC;AACA,SAASC,QAAT,QAAuC,oBAAvC;;;AAGA,SAASC,qBAAT,QAAsC,uBAAtC;AACA,SAAqDC,OAArD,QAAoE,yBAApE;AACA,SAASC,YAAT,QAA6B,gBAA7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,OAAO,IAAMC,wBAAwB,GAAG,GAAjC;AACP,OAAO,IAAM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,6BAA2B,CACzB,KAAKnF,QAAL,CAAc,EAAEc,IAAI,EAAE,OAAR,EAAd,EACA,IAAI,KAAKtB,KAAL,CAAW4F,SAAf,EAA0B,CACxB,KAAK7F,KAAL,GACD,CACF,CAvNH,QAyNS8F,kBAzNT,GAyNE,4BAA0BC,SAA1B,EAA6DC,SAA7D,EAAgG,CAC9F,IAAIA,SAAS,CAACjH,OAAV,IAAqB,CAAC,KAAKa,KAAL,CAAWb,OAArC,EAA8C,CAC5C,KAAKyB,UAAL,GACD,CACD,KAAKC,QAAL,CAAc,EAAEc,IAAI,EAAE,WAAR,EAAqBwE,SAAS,EAATA,SAArB,EAAgCC,SAAS,EAATA,SAAhC,EAAd,EACD,CA9NH,CAgOE;AACF;AACA,KAlOA,QAmOSC,KAnOT,GAmOE,iBAAe,CACb,KAAKxF,QAAL,CAAc,EAAEc,IAAI,EAAE,OAAR,EAAd,EACD,CArOH,yBAAuCtD,KAAK,CAACiI,aAA7C,WACgBC,mBADhB,GACsC,gBADtC","sourcesContent":["import React, { AriaAttributes } from 'react';\n\nimport { Nullable } from '../../typings/utility-types';\nimport { Input, InputIconType } from '../../components/Input';\nimport { Menu } from '../Menu';\nimport { InputLikeText } from '../InputLikeText';\nimport { MenuItemState } from '../../components/MenuItem';\nimport { CancelationError, taskWithDelay } from '../../lib/utils';\nimport { fixClickFocusIE } from '../../lib/events/fixClickFocusIE';\nimport { CommonProps, CommonWrapper } from '../../internal/CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { DropdownContainerProps } from '../DropdownContainer';\n\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport { CustomComboBoxAction, CustomComboBoxEffect, reducer } from './CustomComboBoxReducer';\nimport { ComboBoxView } from './ComboBoxView';\n\nexport interface CustomComboBoxProps<T> extends Pick<DropdownContainerProps, 'menuPos'>, CommonProps {\n align?: 'left' | 'center' | 'right';\n autoFocus?: boolean;\n borderless?: boolean;\n disablePortal?: boolean;\n disabled?: boolean;\n /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n maxLength?: number;\n menuAlign?: 'left' | 'right';\n drawArrow?: boolean;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n searchOnFocus?: boolean;\n onValueChange?: (value: T) => void;\n onInputValueChange?: (value: string) => Nullable<string> | void;\n onUnexpectedInput?: (value: string) => void | null | T;\n onFocus?: () => void;\n onBlur?: () => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n onInputKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;\n placeholder?: string;\n size?: 'small' | 'medium' | 'large';\n totalCount?: number;\n value?: Nullable<T>;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n 'aria-describedby'?: AriaAttributes['aria-describedby'];\n width?: string | number;\n maxMenuHeight?: number | string;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderItem: (item: T, state?: MenuItemState) => React.ReactNode;\n itemWrapper?: (item?: T) => React.ComponentType<unknown>;\n renderValue: (value: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n valueToString: (value: T) => string;\n itemToValue: (item: T) => string | number;\n getItems: (query: string) => Promise<T[]>;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n}\n\nexport interface CustomComboBoxState<T> {\n editing: boolean;\n loading: boolean;\n opened: boolean;\n textValue: string;\n items: Nullable<T[]>;\n inputChanged: boolean;\n focused: boolean;\n repeatRequest: () => void;\n requestStatus: ComboBoxRequestStatus;\n}\n\nexport const DELAY_BEFORE_SHOW_LOADER = 300;\nexport const LOADER_SHOW_TIME = 1000;\n\nexport const DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n};\n\nexport const CustomComboBoxDataTids = {\n comboBoxView: 'ComboBoxView__root',\n} as const;\n\n@responsiveLayout\n@rootNode\nexport class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {\n public static __KONTUR_REACT_UI__ = 'CustomComboBox';\n\n public state: CustomComboBoxState<T> = DefaultState;\n public input: Nullable<Input>;\n public menu: Nullable<Menu>;\n public inputLikeText: Nullable<InputLikeText>;\n public requestId = 0;\n public loaderShowDelay: Nullable<Promise<void>>;\n private focused = false;\n private cancelationToken: Nullable<(reason?: Error) => void> = null;\n private isMobileLayout!: boolean;\n\n private reducer = reducer;\n public cancelLoaderDelay: () => void = () => null;\n\n /**\n * @public\n */\n public focus = () => {\n if (this.props.disabled) {\n return;\n }\n\n if (this.input) {\n this.input.focus();\n } else if (this.inputLikeText) {\n this.inputLikeText.focus();\n }\n };\n\n /**\n * @public\n */\n public selectInputText = () => {\n if (this.props.disabled) {\n return;\n }\n if (this.input) {\n this.input.selectAll();\n }\n };\n\n /**\n * @public\n */\n public blur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.handleBlur();\n };\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public async search(query: string = this.state.textValue) {\n const { getItems } = this.props;\n\n const cancelPromise: Promise<never> = new Promise((_, reject) => (this.cancelationToken = reject));\n this.requestId += 1;\n const expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise<void>((resolve) => {\n const cancelLoader = taskWithDelay(() => {\n this.dispatch({ type: 'RequestItems' });\n setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n\n cancelPromise.catch(() => cancelLoader());\n\n this.cancelLoaderDelay = () => {\n cancelLoader();\n resolve();\n };\n });\n }\n\n try {\n const items = await Promise.race([getItems(query), cancelPromise]);\n if (this.state.loading) {\n await Promise.race([this.loaderShowDelay, cancelPromise]);\n }\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items,\n });\n }\n } catch (error) {\n if (error && error.code === 'CancelationError') {\n this.dispatch({ type: 'CancelRequest' });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: () => {\n this.search(query);\n if (this.input) {\n this.input.focus();\n }\n },\n });\n }\n } finally {\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n }\n }\n\n /**\n * @public\n */\n public cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n\n /**\n * @public\n */\n public open() {\n this.dispatch({ type: 'Open' });\n }\n\n /**\n * @public\n */\n public close() {\n this.dispatch({ type: 'Close' });\n }\n\n public render() {\n const viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n menuAlign: this.props.menuAlign,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: (value: string) => this.dispatch({ type: 'TextChange', value }),\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onInputKeyDown: (event: React.KeyboardEvent) => {\n event.persist();\n this.dispatch({ type: 'KeyPress', event });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n\n refInput: (input: Nullable<Input>) => {\n this.input = input;\n },\n refMenu: (menu: Nullable<Menu>) => {\n this.menu = menu;\n },\n refInputLikeText: (inputLikeText: Nullable<InputLikeText>) => {\n this.inputLikeText = inputLikeText;\n },\n };\n\n return (\n <CommonWrapper {...this.props}>\n <ComboBoxView {...viewProps} ref={this.setRootNode} />\n </CommonWrapper>\n );\n }\n\n public componentDidMount() {\n this.dispatch({ type: 'Mount' });\n if (this.props.autoFocus) {\n this.focus();\n }\n }\n\n public componentDidUpdate(prevProps: CustomComboBoxProps<T>, prevState: CustomComboBoxState<T>) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n this.dispatch({ type: 'DidUpdate', prevProps, prevState });\n }\n\n /**\n * @public\n */\n public reset() {\n this.dispatch({ type: 'Reset' });\n }\n\n private dispatch = (action: CustomComboBoxAction<T>) => {\n let effects: Array<CustomComboBoxEffect<T>>;\n let nextState: Pick<CustomComboBoxState<T>, never>;\n\n this.setState(\n (state) => {\n const stateAndEffect = this.reducer(state, this.props, action);\n\n [nextState, effects] = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n\n return nextState;\n },\n () => {\n effects.forEach(this.handleEffect);\n },\n );\n };\n\n private handleEffect = (effect: CustomComboBoxEffect<T>) => {\n effect(this.dispatch, this.getState, this.getProps, () => this);\n };\n\n private getProps = () => this.props;\n\n private getState = () => this.state;\n\n private handleValueChange = (value: T) => {\n this.dispatch({\n type: 'ValueChange',\n value,\n keepFocus: !this.isMobileLayout,\n });\n };\n\n private handleFocus = () => {\n if (this.focused) {\n return;\n }\n this.focused = true;\n this.dispatch({ type: 'Focus' });\n };\n\n private handleClickOutside = (e: Event) => {\n fixClickFocusIE(e);\n this.handleBlur();\n };\n\n private handleBlur = () => {\n if (!this.focused) {\n if (this.state.opened) {\n this.close();\n }\n return;\n }\n\n this.focused = false;\n // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n setTimeout(() => {\n this.dispatch({ type: 'Blur' });\n });\n };\n\n private handleInputBlur = () => {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n\n // TODO: add check for mobile layout, to call `handleBlur`\n\n if (this.state.opened) {\n return;\n }\n this.handleBlur();\n };\n\n private handleInputClick = () => {\n if (!this.cancelationToken) {\n this.dispatch({ type: 'InputClick' });\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["CustomComboBox.tsx"],"names":["React","ReactDOM","CancelationError","taskWithDelay","fixClickFocusIE","CommonWrapper","responsiveLayout","rootNode","ComboBoxRequestStatus","reducer","ComboBoxView","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","Unknown","CustomComboBoxDataTids","comboBoxView","CustomComboBox","state","requestId","cancelationToken","cancelLoaderDelay","focus","props","disabled","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","effects","nextState","flushSync","setState","stateAndEffect","Array","forEach","handleEffect","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","handleClickOutside","e","close","setTimeout","handleInputBlur","handleInputClick","search","query","getItems","cancelPromise","Promise","_","reject","expectingId","loaderShowDelay","resolve","cancelLoader","race","code","cancelSearch","open","render","viewProps","align","borderless","disablePortal","error","menuAlign","drawArrow","menuPos","placeholder","size","totalCount","warning","width","maxLength","maxMenuHeight","leftIcon","rightIcon","inputMode","onValueChange","onClickOutside","onFocus","onFocusOutside","onInputBlur","onInputValueChange","onInputFocus","onInputClick","onInputKeyDown","event","persist","onMouseEnter","onMouseOver","onMouseLeave","renderItem","renderNotFound","itemWrapper","renderValue","renderTotalCount","renderAddButton","refInput","refMenu","menu","refInputLikeText","setRootNode","componentDidMount","autoFocus","componentDidUpdate","prevProps","prevState","reset","PureComponent","__KONTUR_REACT_UI__"],"mappings":"0XAAA,OAAOA,KAAP,MAAsC,OAAtC;AACA,OAAOC,QAAP,MAAqB,WAArB;;;;;;;AAOA,SAASC,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AACA,SAASC,eAAT,QAAgC,kCAAhC;AACA,SAAsBC,aAAtB,QAA2C,8BAA3C;AACA,SAASC,gBAAT,QAAiC,6CAAjC;AACA,SAASC,QAAT,QAAuC,oBAAvC;;;AAGA,SAASC,qBAAT,QAAsC,uBAAtC;AACA,SAAqDC,OAArD,QAAoE,yBAApE;AACA,SAASC,YAAT,QAA6B,gBAA7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,OAAO,IAAMC,wBAAwB,GAAG,GAAjC;AACP,OAAO,IAAMC,gBAAgB,GAAG,IAAzB;;AAEP,OAAO,IAAMC,YAAY,GAAG;AAC1BC,EAAAA,YAAY,EAAE,KADY;AAE1BC,EAAAA,OAAO,EAAE,KAFiB;AAG1BC,EAAAA,KAAK,EAAE,IAHmB;AAI1BC,EAAAA,OAAO,EAAE,KAJiB;AAK1BC,EAAAA,MAAM,EAAE,KALkB;AAM1BC,EAAAA,OAAO,EAAE,KANiB;AAO1BC,EAAAA,SAAS,EAAE,EAPe;AAQ1BC,EAAAA,aAAa,EAAE,iCAAMC,SAAN,EARW;AAS1BC,EAAAA,aAAa,EAAEf,qBAAqB,CAACgB,OATX,EAArB;;;AAYP,OAAO,IAAMC,sBAAsB,GAAG;AACpCC,EAAAA,YAAY,EAAE,oBADsB,EAA/B;;;;;AAMP,WAAaC,cAAb,GAFCrB,gB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H,CAgOE;AACF;AACA,KAlOA,QAmOSC,KAnOT,GAmOE,iBAAe,CACb,KAAKzF,QAAL,CAAc,EAAEe,IAAI,EAAE,OAAR,EAAd,EACD,CArOH,yBAAuCxD,KAAK,CAACmI,aAA7C,WACgBC,mBADhB,GACsC,gBADtC","sourcesContent":["import React, { AriaAttributes } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { Nullable } from '../../typings/utility-types';\nimport { Input, InputIconType } from '../../components/Input';\nimport { Menu } from '../Menu';\nimport { InputLikeText } from '../InputLikeText';\nimport { MenuItemState } from '../../components/MenuItem';\nimport { CancelationError, taskWithDelay } from '../../lib/utils';\nimport { fixClickFocusIE } from '../../lib/events/fixClickFocusIE';\nimport { CommonProps, CommonWrapper } from '../../internal/CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { DropdownContainerProps } from '../DropdownContainer';\n\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport { CustomComboBoxAction, CustomComboBoxEffect, reducer } from './CustomComboBoxReducer';\nimport { ComboBoxView } from './ComboBoxView';\n\nexport interface CustomComboBoxProps<T> extends Pick<DropdownContainerProps, 'menuPos'>, CommonProps {\n align?: 'left' | 'center' | 'right';\n autoFocus?: boolean;\n borderless?: boolean;\n disablePortal?: boolean;\n disabled?: boolean;\n /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n maxLength?: number;\n menuAlign?: 'left' | 'right';\n drawArrow?: boolean;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n searchOnFocus?: boolean;\n onValueChange?: (value: T) => void;\n onInputValueChange?: (value: string) => Nullable<string> | void;\n onUnexpectedInput?: (value: string) => void | null | T;\n onFocus?: () => void;\n onBlur?: () => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n onInputKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;\n placeholder?: string;\n size?: 'small' | 'medium' | 'large';\n totalCount?: number;\n value?: Nullable<T>;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n 'aria-describedby'?: AriaAttributes['aria-describedby'];\n width?: string | number;\n maxMenuHeight?: number | string;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderItem: (item: T, state?: MenuItemState) => React.ReactNode;\n itemWrapper?: (item?: T) => React.ComponentType<unknown>;\n renderValue: (value: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n valueToString: (value: T) => string;\n itemToValue: (item: T) => string | number;\n getItems: (query: string) => Promise<T[]>;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n}\n\nexport interface CustomComboBoxState<T> {\n editing: boolean;\n loading: boolean;\n opened: boolean;\n textValue: string;\n items: Nullable<T[]>;\n inputChanged: boolean;\n focused: boolean;\n repeatRequest: () => void;\n requestStatus: ComboBoxRequestStatus;\n}\n\nexport const DELAY_BEFORE_SHOW_LOADER = 300;\nexport const LOADER_SHOW_TIME = 1000;\n\nexport const DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n};\n\nexport const CustomComboBoxDataTids = {\n comboBoxView: 'ComboBoxView__root',\n} as const;\n\n@responsiveLayout\n@rootNode\nexport class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {\n public static __KONTUR_REACT_UI__ = 'CustomComboBox';\n\n public state: CustomComboBoxState<T> = DefaultState;\n public input: Nullable<Input>;\n public menu: Nullable<Menu>;\n public inputLikeText: Nullable<InputLikeText>;\n public requestId = 0;\n public loaderShowDelay: Nullable<Promise<void>>;\n private focused = false;\n private cancelationToken: Nullable<(reason?: Error) => void> = null;\n private isMobileLayout!: boolean;\n\n private reducer = reducer;\n public cancelLoaderDelay: () => void = () => null;\n\n /**\n * @public\n */\n public focus = () => {\n if (this.props.disabled) {\n return;\n }\n\n if (this.input) {\n this.input.focus();\n } else if (this.inputLikeText) {\n this.inputLikeText.focus();\n }\n };\n\n /**\n * @public\n */\n public selectInputText = () => {\n if (this.props.disabled) {\n return;\n }\n if (this.input) {\n this.input.selectAll();\n }\n };\n\n /**\n * @public\n */\n public blur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.handleBlur();\n };\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public async search(query: string = this.state.textValue) {\n const { getItems } = this.props;\n\n const cancelPromise: Promise<never> = new Promise((_, reject) => (this.cancelationToken = reject));\n this.requestId += 1;\n const expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise<void>((resolve) => {\n const cancelLoader = taskWithDelay(() => {\n this.dispatch({ type: 'RequestItems' });\n setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n\n cancelPromise.catch(() => cancelLoader());\n\n this.cancelLoaderDelay = () => {\n cancelLoader();\n resolve();\n };\n });\n }\n\n try {\n const items = await Promise.race([getItems(query), cancelPromise]);\n if (this.state.loading) {\n await Promise.race([this.loaderShowDelay, cancelPromise]);\n }\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items,\n });\n }\n } catch (error) {\n if (error && error.code === 'CancelationError') {\n this.dispatch({ type: 'CancelRequest' });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: () => {\n this.search(query);\n if (this.input) {\n this.input.focus();\n }\n },\n });\n }\n } finally {\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n }\n }\n\n /**\n * @public\n */\n public cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n\n /**\n * @public\n */\n public open() {\n this.dispatch({ type: 'Open' });\n }\n\n /**\n * @public\n */\n public close() {\n this.dispatch({ type: 'Close' });\n }\n\n public render() {\n const viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n menuAlign: this.props.menuAlign,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: (value: string) => this.dispatch({ type: 'TextChange', value }),\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onInputKeyDown: (event: React.KeyboardEvent) => {\n event.persist();\n this.dispatch({ type: 'KeyPress', event });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n\n refInput: (input: Nullable<Input>) => {\n this.input = input;\n },\n refMenu: (menu: Nullable<Menu>) => {\n this.menu = menu;\n },\n refInputLikeText: (inputLikeText: Nullable<InputLikeText>) => {\n this.inputLikeText = inputLikeText;\n },\n };\n\n return (\n <CommonWrapper {...this.props}>\n <ComboBoxView {...viewProps} ref={this.setRootNode} />\n </CommonWrapper>\n );\n }\n\n public componentDidMount() {\n this.dispatch({ type: 'Mount' });\n if (this.props.autoFocus) {\n this.focus();\n }\n }\n\n public componentDidUpdate(prevProps: CustomComboBoxProps<T>, prevState: CustomComboBoxState<T>) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n this.dispatch({ type: 'DidUpdate', prevProps, prevState });\n }\n\n /**\n * @public\n */\n public reset() {\n this.dispatch({ type: 'Reset' });\n }\n\n private dispatch = (action: CustomComboBoxAction<T>) => {\n let effects: Array<CustomComboBoxEffect<T>>;\n let nextState: Pick<CustomComboBoxState<T>, never>;\n\n ReactDOM.flushSync(() => {\n this.setState(\n (state) => {\n const stateAndEffect = this.reducer(state, this.props, action);\n\n [nextState, effects] = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n\n return nextState;\n },\n () => {\n effects.forEach(this.handleEffect);\n },\n );\n });\n };\n\n private handleEffect = (effect: CustomComboBoxEffect<T>) => {\n effect(this.dispatch, this.getState, this.getProps, () => this);\n };\n\n private getProps = () => this.props;\n\n private getState = () => this.state;\n\n private handleValueChange = (value: T) => {\n this.dispatch({\n type: 'ValueChange',\n value,\n keepFocus: !this.isMobileLayout,\n });\n };\n\n private handleFocus = () => {\n if (this.focused) {\n return;\n }\n this.focused = true;\n this.dispatch({ type: 'Focus' });\n };\n\n private handleClickOutside = (e: Event) => {\n fixClickFocusIE(e);\n this.handleBlur();\n };\n\n private handleBlur = () => {\n if (!this.focused) {\n if (this.state.opened) {\n this.close();\n }\n return;\n }\n\n this.focused = false;\n // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n setTimeout(() => {\n this.dispatch({ type: 'Blur' });\n });\n };\n\n private handleInputBlur = () => {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n\n // TODO: add check for mobile layout, to call `handleBlur`\n\n if (this.state.opened) {\n return;\n }\n this.handleBlur();\n };\n\n private handleInputClick = () => {\n if (!this.cancelationToken) {\n this.dispatch({ type: 'InputClick' });\n }\n };\n}\n"]}
|
|
@@ -9,6 +9,7 @@ var _class, _class2, _temp; // TODO: Enable this rule in functional components.
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
|
+
import ReactDOM from 'react-dom';
|
|
12
13
|
import { isNonNullable } from "../../../lib/utils";
|
|
13
14
|
import { isKeyTab, isShortcutPaste } from "../../../lib/events/keyboard/identifiers";
|
|
14
15
|
import { MouseDrag } from "../../../lib/events/MouseDrag";
|
|
@@ -336,8 +337,10 @@ export var InputLikeText = rootNode(_class = (_temp = _class2 = /*#__PURE__*/fun
|
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
|
|
339
|
-
|
|
340
|
-
|
|
340
|
+
ReactDOM.flushSync(function () {
|
|
341
|
+
_this.setState({
|
|
342
|
+
focused: true
|
|
343
|
+
});
|
|
341
344
|
});
|
|
342
345
|
|
|
343
346
|
if (_this.props.onFocus) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["InputLikeText.tsx"],"names":["React","isNonNullable","isKeyTab","isShortcutPaste","MouseDrag","isEdge","isIE11","isMobile","removeAllSelections","selectNodeContents","styles","jsInputStyles","ThemeContext","CommonWrapper","cx","findRenderContainer","rootNode","createPropsGetter","HiddenInput","InputLikeTextDataTids","root","input","nativeInput","InputLikeText","getProps","defaultProps","state","blinking","focused","node","hiddenInput","lastSelectedInnerNode","frozen","frozenBlur","dragging","selectInnerNode","start","end","document","body","setTimeout","focusTimeout","clearInterval","window","focus","renderMain","props","innerRef","tabIndex","placeholder","align","borderless","width","size","error","warning","onValueChange","disabled","prefix","suffix","leftIcon","rightIcon","value","onMouseDragStart","onMouseDragEnd","takeContentWidth","ariaDescribedby","rest","leftSide","renderLeftSide","rightSide","renderRightSide","className","theme","getSizeClassName","blink","focusFallback","warningFallback","errorFallback","hideBlinkingCursor","wrapperClass","wrapper","userSelectContain","textAlign","undefined","handleFocus","handleBlur","handleKeyDown","handleMouseDown","absolute","inputFocus","inputDisabled","children","renderPlaceholder","hiddenInputRef","renderLeftIcon","renderIcon","getIconClassname","renderRightIcon","icon","iconNode","Function","useDefaultColor","iconDisabled","renderPrefix","prefixDisabled","renderSuffix","suffixDisabled","sideContainer","rightContainer","hasValue","placeholderDisabled","placeholderFocus","handleDocumentMouseDown","e","target","Node","contains","defrost","handleDocumentKeyDown","onKeyDown","handleMouseDragStart","documentElement","classList","add","userSelectNone","handleMouseDragEnd","remove","setAttribute","setState","onFocus","removeAttribute","stopPropagation","onBlur","el","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","blur","blinkTimeout","getNode","componentDidMount","listen","addEventListener","componentWillUnmount","clearTimeout","stop","removeEventListener","render","setRootNode","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","Component","__KONTUR_REACT_UI__"],"mappings":"qhBAAA;AACA;AACA,OAAOA,KAAP,MAAkB,OAAlB;;AAEA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,QAAT,EAAmBC,eAAnB,QAA0C,uCAA1C;AACA,SAASC,SAAT,QAAiD,4BAAjD;AACA,SAASC,MAAT,EAAiBC,MAAjB,EAAyBC,QAAzB,QAAyC,kBAAzC;;AAEA,SAASC,mBAAT,EAA8BC,kBAA9B,QAAwD,qDAAxD;;AAEA,SAASC,MAAM,IAAIC,aAAnB,QAAwC,qCAAxC;AACA,SAASC,YAAT,QAA6B,gCAA7B;;AAEA,SAAsBC,aAAtB,QAAmE,kBAAnE;AACA,SAASC,EAAT,QAAmB,2BAAnB;AACA,SAASC,mBAAT,QAAoC,8BAApC;AACA,SAAuBC,QAAvB,QAAuC,oBAAvC;AACA,SAASC,iBAAT,QAAkC,6BAAlC;;AAEA,SAASP,MAAT,QAAuB,wBAAvB;AACA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KAAK,CAACgK,SAAzC,WACgBC,mBADhB,GACsC,eADtC,UAGgBxI,YAHhB,GAG6C,EAAE4B,IAAI,EAAE,OAAR,EAH7C","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\n\nimport { isNonNullable } from '../../lib/utils';\nimport { isKeyTab, isShortcutPaste } from '../../lib/events/keyboard/identifiers';\nimport { MouseDrag, MouseDragEventHandler } from '../../lib/events/MouseDrag';\nimport { isEdge, isIE11, isMobile } from '../../lib/client';\nimport { Nullable } from '../../typings/utility-types';\nimport { removeAllSelections, selectNodeContents } from '../../components/DateInput/helpers/SelectionHelpers';\nimport { InputProps, InputIconType, InputState } from '../../components/Input';\nimport { styles as jsInputStyles } from '../../components/Input/Input.styles';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { findRenderContainer } from '../../lib/listenFocusOutside';\nimport { TSetRootNode, rootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { styles } from './InputLikeText.styles';\nimport { HiddenInput } from './HiddenInput';\n\nexport interface InputLikeTextProps extends CommonProps, InputProps {\n children?: React.ReactNode;\n innerRef?: (el: HTMLElement | null) => void;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onMouseDragStart?: MouseDragEventHandler;\n onMouseDragEnd?: MouseDragEventHandler;\n takeContentWidth?: boolean;\n}\n\nexport type InputLikeTextState = Omit<InputState, 'needsPolyfillPlaceholder'>;\n\nexport const InputLikeTextDataTids = {\n root: 'InputLikeText__root',\n input: 'InputLikeText__input',\n nativeInput: 'InputLikeText__nativeInput',\n} as const;\n\ntype DefaultProps = Required<Pick<InputLikeTextProps, 'size'>>;\n\n@rootNode\nexport class InputLikeText extends React.Component<InputLikeTextProps, InputLikeTextState> {\n public static __KONTUR_REACT_UI__ = 'InputLikeText';\n\n public static defaultProps: DefaultProps = { size: 'small' };\n\n private getProps = createPropsGetter(InputLikeText.defaultProps);\n\n public state = { blinking: false, focused: false };\n\n private theme!: Theme;\n private node: HTMLElement | null = null;\n private hiddenInput: HTMLInputElement | null = null;\n private lastSelectedInnerNode: [HTMLElement, number, number] | null = null;\n private frozen = false;\n private frozenBlur = false;\n private dragging = false;\n private focusTimeout: Nullable<number>;\n private blinkTimeout: Nullable<number>;\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public focus() {\n if (this.node) {\n this.node.focus();\n }\n }\n\n /**\n * @public\n */\n public blur() {\n if (this.node) {\n this.node.blur();\n }\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.props.disabled) {\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = window.setTimeout(() => this.setState({ blinking: false }), 150);\n });\n }\n\n public getNode(): HTMLElement | null {\n return this.node;\n }\n\n public selectInnerNode = (node: HTMLElement | null, start = 0, end = 1) => {\n if (this.dragging || !node) {\n return;\n }\n if (isIE11 && findRenderContainer(node, document.body)) {\n // Code below causes Popup to close after triggering the focus event on the body in IE11\n return;\n }\n this.frozen = true;\n this.frozenBlur = true;\n\n this.lastSelectedInnerNode = [node, start, end];\n setTimeout(() => selectNodeContents(node, start, end), 0);\n if (this.focusTimeout) {\n clearInterval(this.focusTimeout);\n }\n this.focusTimeout = window.setTimeout(() => (isIE11 || isEdge) && this.node && this.node.focus(), 0);\n };\n\n public componentDidMount() {\n if (this.node) {\n MouseDrag.listen(this.node).onMouseDragStart(this.handleMouseDragStart).onMouseDragEnd(this.handleMouseDragEnd);\n }\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n }\n MouseDrag.stop(this.node);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = (props: CommonWrapperRestProps<InputLikeTextProps>) => {\n const {\n innerRef,\n tabIndex,\n placeholder,\n align,\n borderless,\n width,\n size,\n error,\n warning,\n onValueChange,\n disabled,\n prefix,\n suffix,\n leftIcon,\n rightIcon,\n value,\n onMouseDragStart,\n onMouseDragEnd,\n takeContentWidth,\n 'aria-describedby': ariaDescribedby,\n ...rest\n } = props;\n\n const { focused, blinking } = this.state;\n\n const leftSide = this.renderLeftSide();\n const rightSide = this.renderRightSide();\n\n const className = cx(styles.root(), jsInputStyles.root(this.theme), this.getSizeClassName(), {\n [jsInputStyles.disabled(this.theme)]: !!disabled,\n [jsInputStyles.borderless()]: !!borderless,\n [jsInputStyles.focus(this.theme)]: focused,\n [jsInputStyles.blink(this.theme)]: blinking,\n [jsInputStyles.warning(this.theme)]: !!warning,\n [jsInputStyles.error(this.theme)]: !!error,\n [jsInputStyles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [jsInputStyles.warningFallback(this.theme)]: !!warning && (isIE11 || isEdge),\n [jsInputStyles.errorFallback(this.theme)]: !!error && (isIE11 || isEdge),\n [jsInputStyles.hideBlinkingCursor()]: isMobile,\n });\n\n const wrapperClass = cx(jsInputStyles.wrapper(), {\n [styles.userSelectContain()]: focused,\n });\n\n return (\n <span\n data-tid={InputLikeTextDataTids.root}\n {...rest}\n className={className}\n style={{ width, textAlign: align }}\n tabIndex={disabled ? undefined : 0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={this.innerRef}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <input\n data-tid={InputLikeTextDataTids.nativeInput}\n type=\"hidden\"\n value={value}\n disabled={disabled}\n aria-describedby={ariaDescribedby}\n />\n {leftSide}\n <span className={wrapperClass}>\n <span\n data-tid={InputLikeTextDataTids.input}\n className={cx(jsInputStyles.input(this.theme), {\n [styles.absolute()]: !takeContentWidth,\n [jsInputStyles.inputFocus(this.theme)]: focused,\n [jsInputStyles.inputDisabled(this.theme)]: disabled,\n })}\n >\n {this.props.children}\n </span>\n {this.renderPlaceholder()}\n </span>\n {rightSide}\n {isIE11 && focused && <HiddenInput nodeRef={this.hiddenInputRef} />}\n </span>\n );\n };\n\n private getIconClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? jsInputStyles.rightIconLarge(this.theme) : jsInputStyles.leftIconLarge(this.theme);\n case 'medium':\n return right ? jsInputStyles.rightIconMedium(this.theme) : jsInputStyles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? jsInputStyles.rightIconSmall(this.theme) : jsInputStyles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon = () => {\n return this.renderIcon(this.props.leftIcon, this.getIconClassname());\n };\n\n private renderRightIcon = () => {\n return this.renderIcon(this.props.rightIcon, this.getIconClassname(true));\n };\n\n private renderIcon = (icon: InputIconType, className: string): JSX.Element | null => {\n if (!icon) {\n return null;\n }\n\n const { disabled } = this.props;\n const iconNode = icon instanceof Function ? icon() : icon;\n\n return (\n <span\n className={cx(jsInputStyles.icon(), className, jsInputStyles.useDefaultColor(this.theme), {\n [jsInputStyles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n };\n\n private renderPrefix = (): JSX.Element | null => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.prefix(this.theme), { [jsInputStyles.prefixDisabled(this.theme)]: disabled })}>\n {prefix}\n </span>\n );\n };\n\n private renderSuffix = (): JSX.Element | null => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.suffix(this.theme), { [jsInputStyles.suffixDisabled(this.theme)]: disabled })}>\n {suffix}\n </span>\n );\n };\n\n private renderLeftSide = (): JSX.Element | null => {\n const leftIcon = this.renderLeftIcon();\n const prefix = this.renderPrefix();\n\n if (!leftIcon && !prefix) {\n return null;\n }\n\n return (\n <span className={jsInputStyles.sideContainer()}>\n {leftIcon}\n {prefix}\n </span>\n );\n };\n\n private renderRightSide = (): JSX.Element | null => {\n const rightIcon = this.renderRightIcon();\n const suffix = this.renderSuffix();\n\n if (!rightIcon && !suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.sideContainer(), jsInputStyles.rightContainer())}>\n {rightIcon}\n {suffix}\n </span>\n );\n };\n\n private renderPlaceholder = (): JSX.Element | null => {\n const { children, placeholder, disabled } = this.props;\n const { focused } = this.state;\n const hasValue = isNonNullable(children) && children !== '';\n\n if (!hasValue && placeholder) {\n return (\n <span\n className={cx(jsInputStyles.placeholder(this.theme), {\n [jsInputStyles.placeholderDisabled(this.theme)]: disabled,\n [jsInputStyles.placeholderFocus(this.theme)]: focused,\n })}\n >\n {placeholder}\n </span>\n );\n }\n return null;\n };\n\n private handleDocumentMouseDown = (e: MouseEvent) => {\n if (this.state.focused && this.node && e.target instanceof Node && !this.node.contains(e.target)) {\n this.defrost();\n }\n };\n\n private handleDocumentKeyDown = (e: KeyboardEvent) => {\n if (this.state.focused && isKeyTab(e)) {\n this.defrost();\n }\n };\n\n private handleMouseDown = () => {\n this.frozen = true;\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (this.props.disabled) {\n return;\n }\n\n if (isIE11 && isShortcutPaste(e) && this.hiddenInput) {\n this.frozen = true;\n setTimeout(() => {\n if (this.lastSelectedInnerNode) {\n this.selectInnerNode(...this.lastSelectedInnerNode);\n }\n if (this.node) {\n this.node.focus();\n }\n }, 0);\n\n this.hiddenInput.focus();\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e as React.KeyboardEvent<HTMLInputElement>);\n }\n };\n\n private handleMouseDragStart: MouseDragEventHandler = (e) => {\n this.dragging = true;\n document.documentElement.classList.add(styles.userSelectNone());\n\n if (this.props.onMouseDragStart) {\n this.props.onMouseDragStart(e);\n }\n };\n\n private handleMouseDragEnd: MouseDragEventHandler = (e) => {\n // Дожидаемся onMouseUp\n setTimeout(() => {\n this.dragging = false;\n\n if (this.props.onMouseDragEnd) {\n this.props.onMouseDragEnd(e);\n }\n }, 0);\n\n document.documentElement.classList.remove(styles.userSelectNone());\n };\n\n private handleFocus = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.setAttribute('contenteditable', 'true');\n }\n\n if (this.props.disabled) {\n if (isIE11) {\n selectNodeContents(document.body, 0, 0);\n }\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozen) {\n this.frozen = false;\n if (this.state.focused) {\n return;\n }\n }\n\n this.setState({ focused: true });\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n };\n\n private handleBlur = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.removeAttribute('contenteditable');\n }\n\n if (this.props.disabled) {\n e.stopPropagation();\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozenBlur) {\n this.frozenBlur = false;\n return;\n }\n if ((isIE11 || isEdge) && this.frozen) {\n return;\n }\n\n removeAllSelections();\n\n this.setState({ focused: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(e);\n }\n };\n\n private hiddenInputRef = (el: HTMLInputElement | null) => {\n this.hiddenInput = el;\n };\n\n private innerRef = (el: HTMLElement | null) => {\n if (this.props.innerRef) {\n this.props.innerRef(el);\n }\n this.node = el;\n };\n\n private defrost = (): void => {\n this.frozen = false;\n this.frozenBlur = false;\n };\n\n private getSizeClassName = () => {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [jsInputStyles.sizeLarge(this.theme)]: true,\n [jsInputStyles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [jsInputStyles.sizeMedium(this.theme)]: true,\n [jsInputStyles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [jsInputStyles.sizeSmall(this.theme)]: true,\n [jsInputStyles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["InputLikeText.tsx"],"names":["React","ReactDOM","isNonNullable","isKeyTab","isShortcutPaste","MouseDrag","isEdge","isIE11","isMobile","removeAllSelections","selectNodeContents","styles","jsInputStyles","ThemeContext","CommonWrapper","cx","findRenderContainer","rootNode","createPropsGetter","HiddenInput","InputLikeTextDataTids","root","input","nativeInput","InputLikeText","getProps","defaultProps","state","blinking","focused","node","hiddenInput","lastSelectedInnerNode","frozen","frozenBlur","dragging","selectInnerNode","start","end","document","body","setTimeout","focusTimeout","clearInterval","window","focus","renderMain","props","innerRef","tabIndex","placeholder","align","borderless","width","size","error","warning","onValueChange","disabled","prefix","suffix","leftIcon","rightIcon","value","onMouseDragStart","onMouseDragEnd","takeContentWidth","ariaDescribedby","rest","leftSide","renderLeftSide","rightSide","renderRightSide","className","theme","getSizeClassName","blink","focusFallback","warningFallback","errorFallback","hideBlinkingCursor","wrapperClass","wrapper","userSelectContain","textAlign","undefined","handleFocus","handleBlur","handleKeyDown","handleMouseDown","absolute","inputFocus","inputDisabled","children","renderPlaceholder","hiddenInputRef","renderLeftIcon","renderIcon","getIconClassname","renderRightIcon","icon","iconNode","Function","useDefaultColor","iconDisabled","renderPrefix","prefixDisabled","renderSuffix","suffixDisabled","sideContainer","rightContainer","hasValue","placeholderDisabled","placeholderFocus","handleDocumentMouseDown","e","target","Node","contains","defrost","handleDocumentKeyDown","onKeyDown","handleMouseDragStart","documentElement","classList","add","userSelectNone","handleMouseDragEnd","remove","setAttribute","flushSync","setState","onFocus","removeAttribute","stopPropagation","onBlur","el","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","blur","blinkTimeout","getNode","componentDidMount","listen","addEventListener","componentWillUnmount","clearTimeout","stop","removeEventListener","render","setRootNode","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","Component","__KONTUR_REACT_UI__"],"mappings":"qhBAAA;AACA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,QAAP,MAAqB,WAArB;;AAEA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,QAAT,EAAmBC,eAAnB,QAA0C,uCAA1C;AACA,SAASC,SAAT,QAAiD,4BAAjD;AACA,SAASC,MAAT,EAAiBC,MAAjB,EAAyBC,QAAzB,QAAyC,kBAAzC;;AAEA,SAASC,mBAAT,EAA8BC,kBAA9B,QAAwD,qDAAxD;;AAEA,SAASC,MAAM,IAAIC,aAAnB,QAAwC,qCAAxC;AACA,SAASC,YAAT,QAA6B,gCAA7B;;AAEA,SAAsBC,aAAtB,QAAmE,kBAAnE;AACA,SAASC,EAAT,QAAmB,2BAAnB;AACA,SAASC,mBAAT,QAAoC,8BAApC;AACA,SAAuBC,QAAvB,QAAuC,oBAAvC;AACA,SAASC,iBAAT,QAAkC,6BAAlC;;AAEA,SAASP,MAAT,QAAuB,wBAAvB;AACA,SAASQ,WAAT,QAA4B,eAA5B;;;;;;;;;;;;;;AAcA,OAAO,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,IAAI,EAAE,qBAD6B;AAEnCC,EAAAA,KAAK,EAAE,sBAF4B;AAGnCC,EAAAA,WAAW,EAAE,4BAHsB,EAA9B;;;;;;AASP,WAAaC,aAAb,GADCP,QACD;;;;;AAKUQ,IAAAA,QALV,GAKqBP,iBAAiB,CAACM,aAAa,CAACE,YAAf,CALtC;;AAOSC,IAAAA,KAPT,GAOiB,EAAEC,QAAQ,EAAE,KAAZ,EAAmBC,OAAO,EAAE,KAA5B,EAPjB;;;AAUUC,IAAAA,IAVV,GAUqC,IAVrC;AAWUC,IAAAA,WAXV,GAWiD,IAXjD;AAYUC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D,EAAW,CACV,MAAI,CAACA,KAAL,GAAaA,KAAb,CACA,oBACE,oBAAC,aAAD,aAAe,WAAW,EAAE,MAAI,CAACgF,WAAjC,IAAkD,MAAI,CAAC3G,KAAvD,GACG,MAAI,CAACD,UADR,CADF,CAKD,CARH,CADF,CAYD,CAvGH,QAgMUoD,gBAhMV,GAgME,0BAAyByD,KAAzB,EAAwC,KAAfA,KAAe,cAAfA,KAAe,GAAP,KAAO,EACtC,QAAQ,KAAKlI,QAAL,GAAgB6B,IAAxB,GACE,KAAK,OAAL,CACE,OAAOqG,KAAK,GAAG/I,aAAa,CAACgJ,cAAd,CAA6B,KAAKlF,KAAlC,CAAH,GAA8C9D,aAAa,CAACiJ,aAAd,CAA4B,KAAKnF,KAAjC,CAA1D,CACF,KAAK,QAAL,CACE,OAAOiF,KAAK,GAAG/I,aAAa,CAACkJ,eAAd,CAA8B,KAAKpF,KAAnC,CAAH,GAA+C9D,aAAa,CAACmJ,cAAd,CAA6B,KAAKrF,KAAlC,CAA3D,CACF,KAAK,OAAL,CACA,QACE,OAAOiF,KAAK,GAAG/I,aAAa,CAACoJ,cAAd,CAA6B,KAAKtF,KAAlC,CAAH,GAA8C9D,aAAa,CAACqJ,aAAd,CAA4B,KAAKvF,KAAjC,CAA1D,CAPJ,CASD,CA1MH,wBAAmC1E,KAAK,CAACkK,SAAzC,WACgBC,mBADhB,GACsC,eADtC,UAGgBzI,YAHhB,GAG6C,EAAE4B,IAAI,EAAE,OAAR,EAH7C","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { isNonNullable } from '../../lib/utils';\nimport { isKeyTab, isShortcutPaste } from '../../lib/events/keyboard/identifiers';\nimport { MouseDrag, MouseDragEventHandler } from '../../lib/events/MouseDrag';\nimport { isEdge, isIE11, isMobile } from '../../lib/client';\nimport { Nullable } from '../../typings/utility-types';\nimport { removeAllSelections, selectNodeContents } from '../../components/DateInput/helpers/SelectionHelpers';\nimport { InputProps, InputIconType, InputState } from '../../components/Input';\nimport { styles as jsInputStyles } from '../../components/Input/Input.styles';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { findRenderContainer } from '../../lib/listenFocusOutside';\nimport { TSetRootNode, rootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\n\nimport { styles } from './InputLikeText.styles';\nimport { HiddenInput } from './HiddenInput';\n\nexport interface InputLikeTextProps extends CommonProps, InputProps {\n children?: React.ReactNode;\n innerRef?: (el: HTMLElement | null) => void;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onMouseDragStart?: MouseDragEventHandler;\n onMouseDragEnd?: MouseDragEventHandler;\n takeContentWidth?: boolean;\n}\n\nexport type InputLikeTextState = Omit<InputState, 'needsPolyfillPlaceholder'>;\n\nexport const InputLikeTextDataTids = {\n root: 'InputLikeText__root',\n input: 'InputLikeText__input',\n nativeInput: 'InputLikeText__nativeInput',\n} as const;\n\ntype DefaultProps = Required<Pick<InputLikeTextProps, 'size'>>;\n\n@rootNode\nexport class InputLikeText extends React.Component<InputLikeTextProps, InputLikeTextState> {\n public static __KONTUR_REACT_UI__ = 'InputLikeText';\n\n public static defaultProps: DefaultProps = { size: 'small' };\n\n private getProps = createPropsGetter(InputLikeText.defaultProps);\n\n public state = { blinking: false, focused: false };\n\n private theme!: Theme;\n private node: HTMLElement | null = null;\n private hiddenInput: HTMLInputElement | null = null;\n private lastSelectedInnerNode: [HTMLElement, number, number] | null = null;\n private frozen = false;\n private frozenBlur = false;\n private dragging = false;\n private focusTimeout: Nullable<number>;\n private blinkTimeout: Nullable<number>;\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public focus() {\n if (this.node) {\n this.node.focus();\n }\n }\n\n /**\n * @public\n */\n public blur() {\n if (this.node) {\n this.node.blur();\n }\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.props.disabled) {\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = window.setTimeout(() => this.setState({ blinking: false }), 150);\n });\n }\n\n public getNode(): HTMLElement | null {\n return this.node;\n }\n\n public selectInnerNode = (node: HTMLElement | null, start = 0, end = 1) => {\n if (this.dragging || !node) {\n return;\n }\n if (isIE11 && findRenderContainer(node, document.body)) {\n // Code below causes Popup to close after triggering the focus event on the body in IE11\n return;\n }\n this.frozen = true;\n this.frozenBlur = true;\n\n this.lastSelectedInnerNode = [node, start, end];\n setTimeout(() => selectNodeContents(node, start, end), 0);\n if (this.focusTimeout) {\n clearInterval(this.focusTimeout);\n }\n this.focusTimeout = window.setTimeout(() => (isIE11 || isEdge) && this.node && this.node.focus(), 0);\n };\n\n public componentDidMount() {\n if (this.node) {\n MouseDrag.listen(this.node).onMouseDragStart(this.handleMouseDragStart).onMouseDragEnd(this.handleMouseDragEnd);\n }\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n }\n MouseDrag.stop(this.node);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = (props: CommonWrapperRestProps<InputLikeTextProps>) => {\n const {\n innerRef,\n tabIndex,\n placeholder,\n align,\n borderless,\n width,\n size,\n error,\n warning,\n onValueChange,\n disabled,\n prefix,\n suffix,\n leftIcon,\n rightIcon,\n value,\n onMouseDragStart,\n onMouseDragEnd,\n takeContentWidth,\n 'aria-describedby': ariaDescribedby,\n ...rest\n } = props;\n\n const { focused, blinking } = this.state;\n\n const leftSide = this.renderLeftSide();\n const rightSide = this.renderRightSide();\n\n const className = cx(styles.root(), jsInputStyles.root(this.theme), this.getSizeClassName(), {\n [jsInputStyles.disabled(this.theme)]: !!disabled,\n [jsInputStyles.borderless()]: !!borderless,\n [jsInputStyles.focus(this.theme)]: focused,\n [jsInputStyles.blink(this.theme)]: blinking,\n [jsInputStyles.warning(this.theme)]: !!warning,\n [jsInputStyles.error(this.theme)]: !!error,\n [jsInputStyles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [jsInputStyles.warningFallback(this.theme)]: !!warning && (isIE11 || isEdge),\n [jsInputStyles.errorFallback(this.theme)]: !!error && (isIE11 || isEdge),\n [jsInputStyles.hideBlinkingCursor()]: isMobile,\n });\n\n const wrapperClass = cx(jsInputStyles.wrapper(), {\n [styles.userSelectContain()]: focused,\n });\n\n return (\n <span\n data-tid={InputLikeTextDataTids.root}\n {...rest}\n className={className}\n style={{ width, textAlign: align }}\n tabIndex={disabled ? undefined : 0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={this.innerRef}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <input\n data-tid={InputLikeTextDataTids.nativeInput}\n type=\"hidden\"\n value={value}\n disabled={disabled}\n aria-describedby={ariaDescribedby}\n />\n {leftSide}\n <span className={wrapperClass}>\n <span\n data-tid={InputLikeTextDataTids.input}\n className={cx(jsInputStyles.input(this.theme), {\n [styles.absolute()]: !takeContentWidth,\n [jsInputStyles.inputFocus(this.theme)]: focused,\n [jsInputStyles.inputDisabled(this.theme)]: disabled,\n })}\n >\n {this.props.children}\n </span>\n {this.renderPlaceholder()}\n </span>\n {rightSide}\n {isIE11 && focused && <HiddenInput nodeRef={this.hiddenInputRef} />}\n </span>\n );\n };\n\n private getIconClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? jsInputStyles.rightIconLarge(this.theme) : jsInputStyles.leftIconLarge(this.theme);\n case 'medium':\n return right ? jsInputStyles.rightIconMedium(this.theme) : jsInputStyles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? jsInputStyles.rightIconSmall(this.theme) : jsInputStyles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon = () => {\n return this.renderIcon(this.props.leftIcon, this.getIconClassname());\n };\n\n private renderRightIcon = () => {\n return this.renderIcon(this.props.rightIcon, this.getIconClassname(true));\n };\n\n private renderIcon = (icon: InputIconType, className: string): JSX.Element | null => {\n if (!icon) {\n return null;\n }\n\n const { disabled } = this.props;\n const iconNode = icon instanceof Function ? icon() : icon;\n\n return (\n <span\n className={cx(jsInputStyles.icon(), className, jsInputStyles.useDefaultColor(this.theme), {\n [jsInputStyles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n };\n\n private renderPrefix = (): JSX.Element | null => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.prefix(this.theme), { [jsInputStyles.prefixDisabled(this.theme)]: disabled })}>\n {prefix}\n </span>\n );\n };\n\n private renderSuffix = (): JSX.Element | null => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.suffix(this.theme), { [jsInputStyles.suffixDisabled(this.theme)]: disabled })}>\n {suffix}\n </span>\n );\n };\n\n private renderLeftSide = (): JSX.Element | null => {\n const leftIcon = this.renderLeftIcon();\n const prefix = this.renderPrefix();\n\n if (!leftIcon && !prefix) {\n return null;\n }\n\n return (\n <span className={jsInputStyles.sideContainer()}>\n {leftIcon}\n {prefix}\n </span>\n );\n };\n\n private renderRightSide = (): JSX.Element | null => {\n const rightIcon = this.renderRightIcon();\n const suffix = this.renderSuffix();\n\n if (!rightIcon && !suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.sideContainer(), jsInputStyles.rightContainer())}>\n {rightIcon}\n {suffix}\n </span>\n );\n };\n\n private renderPlaceholder = (): JSX.Element | null => {\n const { children, placeholder, disabled } = this.props;\n const { focused } = this.state;\n const hasValue = isNonNullable(children) && children !== '';\n\n if (!hasValue && placeholder) {\n return (\n <span\n className={cx(jsInputStyles.placeholder(this.theme), {\n [jsInputStyles.placeholderDisabled(this.theme)]: disabled,\n [jsInputStyles.placeholderFocus(this.theme)]: focused,\n })}\n >\n {placeholder}\n </span>\n );\n }\n return null;\n };\n\n private handleDocumentMouseDown = (e: MouseEvent) => {\n if (this.state.focused && this.node && e.target instanceof Node && !this.node.contains(e.target)) {\n this.defrost();\n }\n };\n\n private handleDocumentKeyDown = (e: KeyboardEvent) => {\n if (this.state.focused && isKeyTab(e)) {\n this.defrost();\n }\n };\n\n private handleMouseDown = () => {\n this.frozen = true;\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (this.props.disabled) {\n return;\n }\n\n if (isIE11 && isShortcutPaste(e) && this.hiddenInput) {\n this.frozen = true;\n setTimeout(() => {\n if (this.lastSelectedInnerNode) {\n this.selectInnerNode(...this.lastSelectedInnerNode);\n }\n if (this.node) {\n this.node.focus();\n }\n }, 0);\n\n this.hiddenInput.focus();\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e as React.KeyboardEvent<HTMLInputElement>);\n }\n };\n\n private handleMouseDragStart: MouseDragEventHandler = (e) => {\n this.dragging = true;\n document.documentElement.classList.add(styles.userSelectNone());\n\n if (this.props.onMouseDragStart) {\n this.props.onMouseDragStart(e);\n }\n };\n\n private handleMouseDragEnd: MouseDragEventHandler = (e) => {\n // Дожидаемся onMouseUp\n setTimeout(() => {\n this.dragging = false;\n\n if (this.props.onMouseDragEnd) {\n this.props.onMouseDragEnd(e);\n }\n }, 0);\n\n document.documentElement.classList.remove(styles.userSelectNone());\n };\n\n private handleFocus = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.setAttribute('contenteditable', 'true');\n }\n\n if (this.props.disabled) {\n if (isIE11) {\n selectNodeContents(document.body, 0, 0);\n }\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozen) {\n this.frozen = false;\n if (this.state.focused) {\n return;\n }\n }\n\n ReactDOM.flushSync(() => {\n this.setState({ focused: true });\n });\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n };\n\n private handleBlur = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.removeAttribute('contenteditable');\n }\n\n if (this.props.disabled) {\n e.stopPropagation();\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozenBlur) {\n this.frozenBlur = false;\n return;\n }\n if ((isIE11 || isEdge) && this.frozen) {\n return;\n }\n\n removeAllSelections();\n\n this.setState({ focused: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(e);\n }\n };\n\n private hiddenInputRef = (el: HTMLInputElement | null) => {\n this.hiddenInput = el;\n };\n\n private innerRef = (el: HTMLElement | null) => {\n if (this.props.innerRef) {\n this.props.innerRef(el);\n }\n this.node = el;\n };\n\n private defrost = (): void => {\n this.frozen = false;\n this.frozenBlur = false;\n };\n\n private getSizeClassName = () => {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [jsInputStyles.sizeLarge(this.theme)]: true,\n [jsInputStyles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [jsInputStyles.sizeMedium(this.theme)]: true,\n [jsInputStyles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [jsInputStyles.sizeSmall(this.theme)]: true,\n [jsInputStyles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n };\n}\n"]}
|
|
@@ -17,6 +17,6 @@ export interface VariableDependencies {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const COMPONENT_DESCRIPTIONS: DescriptionsType;
|
|
19
19
|
export declare const COMPONENT_DESCRIPTIONS_BY_VARIABLE: VariableNameToComponentsMap;
|
|
20
|
-
export declare const ALL_USED_VARIABLES: ("black" | "blue" | "gray" | "green" | "red" | "white" | "yellow" | "prototype" | "fontFamilyCompensationBaseline" | "labGrotesqueBaselineCompensation" | "brandXLight" | "brandLight" | "brand" | "brandDark" | "brandXDark" | "grayXxLight" | "grayXLight" | "grayLight" | "grayDark" | "blueXxLight" | "blueLight" | "blueDark" | "blueXDark" | "greenXxLight" | "greenDark" | "redXxLight" | "redDark" | "yellowXxLight" | "yellowDark" | "bgDefault" | "bgSecondary" | "bgDisabled" | "errorMain" | "errorSecondary" | "errorText" | "warningMain" | "warningSecondary" | "warningText" | "borderColorFocusLight" | "borderColorGrayDark" | "borderColorGrayLight" | "borderColorDisabled" | "placeholderColor" | "outlineColorFocus" | "placeholderColorLight" | "blinkColor" | "controlBorderWidth" | "controlOutlineWidth" | "controlLineHeightSmall" | "controlLineHeightMedium" | "controlLineHeightLarge" | "controlPaddingYSmall" | "controlPaddingYMedium" | "controlPaddingYLarge" | "textColorDefault" | "textColorInvert" | "textColorDisabled" | "textColorDisabledContrast" | "fontSizeSmall" | "fontSizeMedium" | "fontSizeLarge" | "fontSizeMobile" | "lineHeightMobile" | "specificityLevel" | "fixedPanelShadow" | "bgActive" | "borderColorFocus" | "borderColorError" | "borderColorWarning" | "controlHeightSmall" | "controlHeightMedium" | "controlHeightLarge" | "mobileMediaQuery" | "linkColor" | "linkActiveColor" | "linkHoverTextDecoration" | "linkSuccessColor" | "linkSuccessHoverColor" | "linkSuccessActiveColor" | "linkDangerColor" | "linkDangerHoverColor" | "linkDangerActiveColor" | "linkIconMarginRight" | "linkHoverColor" | "linkDisabledColor" | "linkButtonLineHeight" | "linkButtonPaddingX" | "tokenDisabledBg" | "tokenTextColorDisabled" | "tokenFontSize" | "tokenMarginY" | "tokenMarginX" | "tokenLineHeight" | "tokenPaddingY" | "tokenPaddingX" | "tokenMarginBeforeIcon" | "tokenRemoveIconSize" | "tokenRemoveIconPaddingY" | "tokenRemoveIconPaddingX" | "tokenRemoveIconGap" | "tokenRemoveIconBoxSizing" | "tokenBorderRadius" | "tokenBorderWidth" | "tokenBorderColorDisabled" | "tokenDefaultIdle" | "tokenDefaultActive" | "tokenGrayIdle" | "tokenGrayActive" | "tokenBlueIdle" | "tokenBlueActive" | "tokenGreenIdle" | "tokenGreenActive" | "tokenYellowIdle" | "tokenYellowActive" | "tokenRedIdle" | "tokenRedActive" | "tokenWhite" | "tokenBlack" | "tokenBorderColorWarning" | "tokenBorderColorError" | "tokenOutlineWidth" | "tokenLegacyTextShift" | "tokenPaddingYDisabled" | "tokenPaddingXDisabled" | "tokenMarginYDisabled" | "tokenMarginXDisabled" | "tokenShadowDisabled" | "tokenInputBorderColor" | "tokenInputBorderColorFocus" | "tokenInputBorderColorError" | "tokenInputBorderColorWarning" | "tokenInputBorderTopColor" | "tokenInputBorderRadius" | "tokenInputPlaceholderColor" | "tokenInputPlaceholderColorLight" | "tokenInputDisabledBg" | "tokenInputDisabledBorderColor" | "tokenInputBorderWidth" | "tokenInputOutlineWidth" | "tokenInputBg" | "tokenInputShadow" | "tokenInputTextColor" | "tokenInputTextColorDisabled" | "tokenInputPlaceholderColorDisabled" | "tokenInputPaddingY" | "tokenInputPaddingX" | "tokenInputFontSize" | "tokenInputLineHeight" | "tokenInputInputPaddingLeft" | "tokenInputInputPaddingRight" | "loaderBg" | "loaderOpacity" | "btnBackgroundClip" | "btnArrowBgImageActive" | "btnArrowBgImageChecked" | "btnLinkBorderRadius" | "btnFocusShadowWidth" | "btnDisabledBorderColor" | "btnCheckedBg" | "btnCheckedDisabledBg" | "btnCheckedDisabledColor" | "btnCheckedTextColor" | "btnCheckedDisabledBorderColor" | "btnCheckedShadow" | "btnCheckedDisabledShadow" | "btnBorderRadiusSmall" | "btnBorderRadiusMedium" | "btnBorderRadiusLarge" | "btnBorderWidth" | "btnInsetWidth" | "btnOutlineWidth" | "btnPaddingXSmall" | "btnPaddingXMedium" | "btnPaddingXLarge" | "btnIconGapSmall" | "btnIconGapMedium" | "btnIconGapLarge" | "btnIconSizeSmall" | "btnIconSizeMedium" | "btnIconSizeLarge" | "btnDefaultBg" | "btnDefaultBgStart" | "btnDefaultBgEnd" | "btnDefaultCheckedBorderColor" | "btnDefaultTextColor" | "btnDefaultHoverBg" | "btnDefaultHoverBgStart" | "btnDefaultHoverBgEnd" | "btnDefaultActiveBg" | "btnDefaultHoverBorderColor" | "btnDefaultHoverBorderBottomColor" | "btnDefaultActiveBorderColor" | "btnDefaultActiveBorderTopColor" | "btnDefaultBorderColor" | "btnDefaultBorderBottomColor" | "btnDefaultActiveShadow" | "btnSuccessBg" | "btnSuccessHoverBg" | "btnSuccessHoverBorderColor" | "btnSuccessHoverBorderBottomColor" | "btnSuccessBorderColor" | "btnSuccessBorderBottomColor" | "btnSuccessBgStart" | "btnSuccessBgEnd" | "btnSuccessTextColor" | "btnSuccessHoverBgStart" | "btnSuccessHoverBgEnd" | "btnSuccessActiveBg" | "btnSuccessActiveBorderColor" | "btnSuccessActiveBorderTopColor" | "btnSuccessActiveShadow" | "btnPrimaryBg" | "btnPrimaryHoverBg" | "btnPrimaryHoverBorderColor" | "btnPrimaryHoverBorderBottomColor" | "btnPrimaryBorderColor" | "btnPrimaryBorderBottomColor" | "btnPrimaryBgStart" | "btnPrimaryBgEnd" | "btnPrimaryTextColor" | "btnPrimaryHoverBgStart" | "btnPrimaryHoverBgEnd" | "btnPrimaryActiveBg" | "btnPrimaryActiveBorderColor" | "btnPrimaryActiveBorderTopColor" | "btnPrimaryActiveShadow" | "btnDangerBg" | "btnDangerHoverBg" | "btnDangerHoverBorderColor" | "btnDangerHoverBorderBottomColor" | "btnDangerBorderColor" | "btnDangerBorderBottomColor" | "btnDangerBgStart" | "btnDangerBgEnd" | "btnDangerTextColor" | "btnDangerHoverBgStart" | "btnDangerHoverBgEnd" | "btnDangerActiveBg" | "btnDangerActiveBorderColor" | "btnDangerActiveBorderTopColor" | "btnDangerActiveShadow" | "btnPayBg" | "btnPayHoverBg" | "btnPayHoverBorderColor" | "btnPayHoverBorderBottomColor" | "btnPayBorderColor" | "btnPayBorderBottomColor" | "btnPayBgStart" | "btnPayBgEnd" | "btnPayTextColor" | "btnPayHoverBgStart" | "btnPayHoverBgEnd" | "btnPayActiveBg" | "btnPayActiveBorderColor" | "btnPayActiveBorderTopColor" | "btnPayActiveShadow" | "btnMenuArrowColor" | "btnFontSizeSmall" | "btnFontSizeMedium" | "btnFontSizeLarge" | "btnLineHeightSmall" | "btnLineHeightMedium" | "btnLineHeightLarge" | "btnPaddingYSmall" | "btnPaddingYMedium" | "btnPaddingYLarge" | "btnDisabledBg" | "btnBorderColorWarning" | "btnBorderColorError" | "btnHeightSmall" | "btnHeightMedium" | "btnHeightLarge" | "btnLinkColor" | "btnLinkHoverColor" | "btnLinkActiveColor" | "btnLinkHoverTextDecoration" | "btnLinkIconMarginRight" | "btnErrorSecondary" | "btnWarningSecondary" | "btnOutlineColorFocus" | "btnInsetColor" | "btnBorderColorFocus" | "btnLinkDisabledColor" | "btnDisabledTextColor" | "selectDefaultBg" | "selectPlaceholderColor" | "selectBorderWidth" | "selectPlaceholderColorDisabled" | "selectOutlineWidth" | "selectLineHeightSmall" | "selectFontSizeSmall" | "selectPaddingXSmall" | "selectPaddingYSmall" | "selectBorderRadiusSmall" | "selectIconGapSmall" | "selectLineHeightMedium" | "selectFontSizeMedium" | "selectPaddingXMedium" | "selectPaddingYMedium" | "selectBorderRadiusMedium" | "selectIconGapMedium" | "selectLineHeightLarge" | "selectFontSizeLarge" | "selectPaddingXLarge" | "selectPaddingYLarge" | "selectBorderRadiusLarge" | "selectIconGapLarge" | "selectMenuArrowColor" | "selectMenuArrowColorDisabled" | "selectIconSizeSmall" | "selectIconSizeMedium" | "selectIconSizeLarge" | "selectRootWidthMobile" | "selectTextColorDisabled" | "selectBgDisabled" | "selectBorderColorDisabled" | "tooltipPaddingY" | "tooltipPaddingX" | "tooltipCloseBtnPadding" | "tooltipCloseBtnColor" | "tooltipCloseBtnHoverColor" | "tooltipTextColor" | "tooltipBorder" | "tooltipBorderRadius" | "tooltipPinOffset" | "tooltipPinOffsetX" | "tooltipPinOffsetY" | "tooltipMargin" | "tooltipPinSize" | "tooltipFontSize" | "tooltipLineHeight" | "tooltipMenuPinOffset" | "tooltipMenuMargin" | "tooltipMenuPinSize" | "kebabPinOffset" | "kebabPinSize" | "kebabMargin" | "kebabBackground" | "kebabBackgroundHover" | "kebabBorderRadius" | "kebabBorder" | "modalBackBg" | "modalBg" | "modalBackOpacity" | "modalCloseButtonColor" | "modalCloseButtonDisabledColor" | "modalCloseButtonHoverColor" | "modalCloseButtonPadding" | "modalCloseButtonLegacyShift" | "modalCloseButtonBottomPadding" | "modalCloseButtonClickArea" | "modalCloseIconSize" | "modalCloseLegacyGap" | "modalCloseWrapperLegacyGap" | "modalBorderRadius" | "modalFixedHeaderBg" | "modalFixedHeaderShadow" | "modalFixedHeaderBorder" | "modalFixedFooterBorder" | "modalFixedFooterShadow" | "modalFixedPanelShadow" | "modalFooterBg" | "modalAdaptiveThreshold" | "modalPaddingTop" | "modalPaddingLeft" | "modalPaddingRight" | "modalHeaderFontSize" | "modalHeaderTextColor" | "modalHeaderLineHeight" | "modalHeaderPaddingBottom" | "modalHeaderPaddingTop" | "modalFixedHeaderPaddingBottom" | "modalBodyTextColor" | "modalFooterTextColor" | "modalBodyPaddingBottom" | "modalFooterPaddingTop" | "modalFooterPaddingBottom" | "modalPaddingBottom" | "modalFooterPanelPaddingTop" | "modalFooterPanelPaddingBottom" | "mobileModalCloseButtonRightPadding" | "mobileModalCloseButtonTopPadding" | "mobileModalCloseButtonClickArea" | "mobileModalCloseIconSize" | "mobileModalHeaderFontSize" | "mobileModalHeaderLineHeight" | "mobileModalHeaderPadding" | "mobileModalBodyPadding" | "mobileModalBodyFontSize" | "mobileModalFooterPadding" | "mobileModalPaddingBottom" | "sidePageFooterPanelBg" | "sidePageBackingBg" | "sidePageBackingBgOpacity" | "sidePageCloseButtonColor" | "sidePageCloseButtonHoverColor" | "sidePageContainerShadow" | "mobileSidePagePaddingLeft" | "mobileSidePagePaddingRight" | "mobileSidePagePaddingTop" | "mobileSidePagePaddingBottom" | "mobileSidePageFooterPadding" | "sidePagePaddingLeft" | "sidePagePaddingRight" | "sidePagePaddingTop" | "sidePagePaddingBottom" | "sidePageFooterPaddingTop" | "sidePageFooterPaddingBottom" | "sidePageBgDefault" | "sidePageHeaderTextColor" | "sidePageBodyTextColor" | "sidePageFooterTextColor" | "sidePageHeaderFontSize" | "sidePageHeaderLineHeight" | "sidePageHeaderPaddingBottom" | "sidePageHeaderPaddingTop" | "sidePageHeaderFixedFontSize" | "sidePageHeaderFixedLineHeight" | "sidePageHeaderFixedPaddingY" | "sidePageHeaderStickyOffset" | "sidePageCloseButtonPadding" | "mobileSidePageCloseButtonPadding" | "sidePageCloseButtonLegacyPaddingLeft" | "sidePageFooterPanelPaddingTop" | "sidePageFooterPanelPaddingBottom" | "sidePageCloseIconSize" | "sidePageCloseButtonClickArea" | "mobileSidePageCloseButtonClickArea" | "sidePageFixedHeaderShadow" | "sidePageFixedFooterShadow" | "sidePageFixedPanelShadow" | "mobileSidePageHeaderFontSize" | "mobileSidePageHeaderLineHeight" | "mobileSidePageHeaderPaddingBottom" | "mobileSidePageHeaderPaddingTop" | "dateInputIconColor" | "dateInputMaskColor" | "dateInputComponentSelectedBgColor" | "calendarCellBg" | "calendarCellHoverColor" | "calendarCellActiveHoverColor" | "calendarCellWeekendColor" | "calendarCellTodayBorder" | "calendarCellSelectedBgColor" | "calendarCellSelectedFontColor" | "calendarCellSize" | "calendarCellLineHeight" | "calendarMonthHeaderStickedBgColor" | "calendarMonthTitleBorderBottomColor" | "calendarCellHoverBgColor" | "calendarPaddingX" | "calendarMonthTitleLineHeight" | "calendarMonthTitlePaddingTop" | "calendarMonthTitlePaddingBottom" | "calendarMonthTitleMarginX" | "calendarMonthTitleMarginBottom" | "calendarWrapperHeight" | "calendarMonthMarginBottom" | "calendarMaxMonthsToAppendOnScroll" | "dateSelectLineHeight" | "dateSelectFontSize" | "dateSelectFontWeight" | "dateSelectMenuItemBgSelected" | "dateSelectTextColorDisabled" | "dateSelectTextColorDefault" | "dateSelectLinkColor" | "dateSelectPopupBoxShadow" | "dateSelectTextColorInvert" | "datePickerOpenBtnColor" | "pickerBg" | "pickerShadow" | "pickerTodayWrapperBgColor" | "pickerTodayWrapperBorderTop" | "pickerTodayWrapperHoverBgColor" | "pickerTodayWrapperFontSize" | "pickerTodayWrapperLineHeight" | "pickerTodayWrapperPaddingTop" | "pickerTodayWrapperPaddingBottom" | "dateSelectMenuBg" | "dateSelectMenuItemBgActive" | "dateSelectMenuItemBgDisabled" | "dateSelectMenuItemFontActive" | "dateSelectMenuItemFontSelected" | "dateSelectMenuItemFontDisabled" | "pagingFontSize" | "pagingForwardIconSize" | "pagingForwardIconMarginTop" | "pagingPageLinkPaddingX" | "pagingPageLinkPaddingY" | "pagingPageLinkLegacyPaddingY" | "pagingPageLinkMinWidth" | "pagingPageForwardLinkMarginTop" | "pagingPageForwardLinkMarginLeft" | "pagingPageForwardLinkPaddingRight" | "pagingLineHeight" | "pagingDotsColor" | "pagingDotsPadding" | "pagingPageLinkActiveBg" | "pagingPageLinkDisabledActiveBg" | "pagingPageLinkActiveColor" | "pagingPageLinkHoverBg" | "pagingPageLinkBorderRadius" | "pagingPageLinkHintColor" | "pagingPageLinkHintFontSize" | "pagingPageLinkHintLineHeight" | "pagingPageLinkMargin" | "pagingForwardLinkColor" | "pagingForwardLinkDisabledColor" | "hintColor" | "mobileHintColor" | "hintFontSize" | "hintLineHeight" | "hintMaxWidth" | "hintPaddingY" | "hintPaddingX" | "hintTextAlign" | "hintBgColor" | "hintBorder" | "hintBorderRadius" | "hintPinOffset" | "hintMargin" | "toastFontSize" | "toastLineHeight" | "toastPaddingY" | "toastPaddingX" | "toastBorderRadius" | "toastBorder" | "toastTop" | "toastBg" | "toastColor" | "toastLinkColor" | "toastClosePadding" | "toastCloseColor" | "toastCloseHoverColor" | "toastCloseSize" | "dropdownMenuSelectedBg" | "dropdownMenuHoverBg" | "menuBgDefault" | "menuBorderRadius" | "menuBorder" | "menuShadow" | "menuPaddingY" | "mobileMenuPaddingY" | "menuPaddingX" | "mobileMenuPaddingX" | "menuOffsetY" | "menuItemTextColor" | "menuItemSelectedBg" | "menuItemHoverBg" | "menuItemIconWidth" | "menuItemIconGap" | "menuItemIconLegacyMargin" | "menuItemIconLegacyShift" | "menuItemPaddingForIcon" | "menuItemLineHeight" | "menuItemFontSize" | "menuItemPaddingX" | "menuItemPaddingY" | "menuItemBorderRadius" | "menuItemLegacyPaddingX" | "menuItemLegacyPaddingY" | "menuItemHoverColor" | "menuItemLinkColor" | "menuItemCommentColor" | "menuItemCommentColorHover" | "menuItemDisplay" | "menuItemPaddingMobile" | "menuItemLineHeightMobile" | "menuItemFontSizeMobile" | "menuItemDisabledColor" | "menuItemDisabledBg" | "menuMessageTextColor" | "menuMessageBg" | "menuMessagePaddingY" | "menuMessagePaddingX" | "menuMessageDisplay" | "menuMessagePaddingMobile" | "menuMessageLineHeight" | "menuMessageLineHeightMobile" | "menuMessageFontSize" | "menuMessageFontSizeMobile" | "menuHeaderColor" | "menuHeaderLineHeight" | "menuHeaderFontSize" | "menuHeaderPaddingX" | "menuHeaderPaddingTop" | "menuHeaderPaddingBottom" | "menuHeaderLegacyPaddingRight" | "menuSeparatorBorderColor" | "menuSeparatorMarginY" | "menuSeparatorBorderWidth" | "mobileMenuSeparatorMarginY" | "mobileMenuSeparatorMarginX" | "toggleFontSize" | "toggleLineHeight" | "toggleTextColor" | "toggleHandleActiveWidthIncrement" | "toggleHandleBorderRadius" | "toggleHeight" | "toggleWidth" | "toggleBorderRadius" | "toggleBg" | "toggleHandleBg" | "toggleCheckedBg" | "toggleDisabledHandleBg" | "toggleBaseBg" | "toggleBgDisabled" | "toggleBgDisabledChecked" | "toggleBgHover" | "toggleCheckedBgHover" | "toggleBgChecked" | "toggleBorderWidth" | "toggleOutlineWidth" | "toggleBorderColor" | "toggleBorderColorDisabled" | "toggleBorderColorDisabledChecked" | "toggleHandleSize" | "toggleHandleLeft" | "toggleHandleTop" | "toggleBgFocus" | "toggleBgActive" | "toggleShadowColorError" | "toggleShadowColorWarning" | "toggleFocusShadowColor" | "toggleCaptionGap" | "toggleButtonOffsetY" | "popupBorder" | "popupBorderRadius" | "popupBorderColor" | "popupDropShadow" | "popupBoxShadow" | "popupTextColor" | "popupBackground" | "popupPinOffset" | "popupPinOffsetX" | "popupPinOffsetY" | "popupMargin" | "popupPinSize" | "inputTextColor" | "inputShadow" | "inputBg" | "inputIconColor" | "inputFocusedIconColor" | "inputColor" | "inputWidth" | "inputTextColorDisabled" | "inputFontSizeSmall" | "inputFontSizeMedium" | "inputFontSizeLarge" | "inputLineHeightSmall" | "inputLineHeightMedium" | "inputLineHeightLarge" | "inputHeightSmall" | "inputHeightMedium" | "inputHeightLarge" | "inputPaddingYSmall" | "inputPaddingYMedium" | "inputPaddingYLarge" | "inputPaddingXSmall" | "inputPaddingXMedium" | "inputPaddingXLarge" | "inputIconGapSmall" | "inputIconGapMedium" | "inputIconGapLarge" | "inputIconSizeSmall" | "inputIconSizeMedium" | "inputIconSizeLarge" | "inputFocusShadow" | "inputFocusedBg" | "inputDisabledBg" | "inputDisabledBorderColor" | "inputFocusOutline" | "inputBorderWidth" | "inputOutlineWidth" | "inputBorderRadiusSmall" | "inputBorderRadiusMedium" | "inputBorderRadiusLarge" | "inputBorderColor" | "inputBorderColorFocus" | "inputBorderColorError" | "inputBorderColorWarning" | "inputBorderTopColor" | "inputPlaceholderColor" | "inputPlaceholderColorDisabled" | "inputPlaceholderColorLight" | "inputBlinkColor" | "checkboxFontSize" | "checkboxLineHeight" | "checkboxBoxSize" | "checkboxCaptionGap" | "checkboxPaddingY" | "checkboxBoxOffsetY" | "checkboxBgStart" | "checkboxBgEnd" | "checkboxTextColorDefault" | "checkboxTextColorDisabled" | "checkboxShadowDisabled" | "checkboxBorder" | "checkboxBorderWidth" | "checkboxShadow" | "checkboxShadowHover" | "checkboxCheckedColor" | "checkboxOutlineColorFocus" | "checkboxBorderColorWarning" | "checkboxBorderColorError" | "checkboxCheckedHoverShadow" | "checkboxBorderRadius" | "checkboxOutlineWidth" | "checkboxCheckedShadow" | "checkboxCheckedActiveShadow" | "checkboxBorderColorFocus" | "checkboxBg" | "checkboxHoverBg" | "checkboxActiveBg" | "checkboxCheckedBg" | "checkboxBgDisabled" | "checkboxCheckedHoverBg" | "checkboxCheckedActiveBg" | "checkboxShadowActive" | "textareaBg" | "textareaColor" | "textareaTextColorDisabled" | "textareaPlaceholderColorLight" | "textareaPlaceholderColor" | "textareaPlaceholderColorDisabled" | "textareaShadow" | "textareaFontSize" | "textareaLineHeight" | "textareaBorderRadius" | "textareaBorderWidth" | "textareaOutlineWidth" | "textareaMinHeight" | "textareaWidth" | "textareaPaddingX" | "textareaPaddingY" | "textareaBorderColor" | "textareaBorderTopColor" | "textareaBorderColorFocus" | "textareaBorderColorWarning" | "textareaBorderColorError" | "textareaDisabledBg" | "textareaDisabledBorderColor" | "textareaCounterColor" | "textareaCounterBg" | "textareaCounterErrorColor" | "textareaCounterHelpIconColor" | "radioBulletSize" | "radioOutlineWidth" | "radioTextColor" | "radioSize" | "radioSizeAfter" | "radioFontSize" | "radioLineHeight" | "radioCaptionGap" | "radioPaddingY" | "radioVerticalAlign" | "radioBgImage" | "radioBgColor" | "radioHoverBg" | "radioActiveBg" | "radioBorderWidth" | "radioBorderColor" | "radioBoxShadow" | "radioBorder" | "radioBorderColorFocus" | "radioBorderColorWarning" | "radioBorderColorError" | "radioHoverShadow" | "radioActiveShadow" | "radioFocusShadow" | "radioCheckedBgColor" | "radioCheckedBorderColor" | "radioCheckedBulletColor" | "radioCheckedHoverBgColor" | "radioDisabledBg" | "radioDisabledShadow" | "radioCaptionDisplay" | "radioBorderWidthCompensation" | "radioCircleOffsetY" | "radioGroupLegacyItemGap" | "tabFontSize" | "tabPaddingX" | "tabsMarginX" | "tabPaddingY" | "tabLineHeight" | "tabBorderWidth" | "tabOutlineWidth" | "tabTextColorDefault" | "tabColorFocus" | "tabColorError" | "tabColorWarning" | "tabColorSuccess" | "tabColorPrimary" | "tabColorHover" | "tabColorHoverError" | "tabColorHoverWarning" | "tabColorHoverSuccess" | "tabColorHoverPrimary" | "spinnerBgColor" | "spinnerColor" | "spinnerDimmedColor" | "spinnerCaptionColor" | "spinnerFontSizeSmall" | "spinnerFontSizeMedium" | "spinnerFontSizeLarge" | "spinnerLineHeightSmall" | "spinnerLineHeightMedium" | "spinnerLineHeightLarge" | "spinnerCaptionGapSmall" | "spinnerCaptionGapMedium" | "spinnerCaptionGapLarge" | "switcherBorderRadius" | "switcherTextColor" | "switcherOutlineWidth" | "switcherCaptionFontSizeSmall" | "switcherCaptionFontSizeMedium" | "switcherCaptionFontSizeLarge" | "switcherCaptionLineHeightSmall" | "switcherCaptionLineHeightMedium" | "switcherCaptionLineHeightLarge" | "switcherCaptionGapSmall" | "switcherCaptionGapMedium" | "switcherCaptionGapLarge" | "switcherButtonPaddingXSmall" | "switcherButtonPaddingXMedium" | "switcherButtonPaddingXLarge" | "switcherButtonPaddingYSmall" | "switcherButtonPaddingYMedium" | "switcherButtonPaddingYLarge" | "switcherButtonLineHeightSmall" | "switcherButtonLineHeightMedium" | "switcherButtonLineHeightLarge" | "switcherButtonFontSizeSmall" | "switcherButtonFontSizeMedium" | "switcherButtonFontSizeLarge" | "switcherButtonBorderRadiusSmall" | "switcherButtonBorderRadiusMedium" | "switcherButtonBorderRadiusLarge" | "switcherButtonBorderWidth" | "switcherBtnDisabledBorderColor" | "switcherButtonDisabledBorderColor" | "switcherButtonCheckedDisabledShadow" | "mobilePopupTopPadding" | "mobilePopupContainerBottomPadding" | "mobilePopupHeaderPadding" | "mobilePopupContainerBorderRadius" | "mobilePopupHeaderFontSize" | "mobilePopupHeaderLineHeight" | "mobilePopupHeaderFontWeight" | "mobilePopupHeaderChildPadding" | "mobilePopupOuterIndentY" | "scrollContainerScrollBarSize" | "scrollContainerScrollBarHoverSize" | "scrollContainerScrollBarColor" | "scrollContainerScrollBarInvertColor" | "passwordInputVisibilityIconColor" | "passwordInputVisibilityIconOpacity" | "passwordInputVisibilityIconHoverColor" | "passwordInputVisibilityIconHoverOpacity" | "globalLoaderColor" | "globalLoaderHeight" | "globalLoaderWidth" | "globalLoaderPosition" | "globalLoaderTop" | "globalLoaderLeft" | "globalLoaderBottom" | "globalLoaderRight" | "globalLoaderBackgroundColor" | "globalLoaderTransitionToSpinnerDuration" | "globalLoaderSpinnerAnimationDuration" | "globalLoaderSlowAnimationDuration" | "globalLoaderTransitionFromSpinnerDuration" | "fileUploaderWidth" | "fileUploaderBg" | "fileUploaderFontSize" | "fileUploaderPaddingXSmall" | "fileUploaderPaddingXMedium" | "fileUploaderPaddingXLarge" | "fileUploaderFontSizeSmall" | "fileUploaderFontSizeMedium" | "fileUploaderFontSizeLarge" | "fileUploaderLineHeight" | "fileUploaderLineHeightSmall" | "fileUploaderLineHeightMedium" | "fileUploaderLineHeightLarge" | "fileUploaderPaddingYSmall" | "fileUploaderPaddingYMedium" | "fileUploaderPaddingYLarge" | "fileUploaderTextColorDefault" | "fileUploaderPaddingX" | "fileUploaderPaddingY" | "fileUploaderBorderRadius" | "fileUploaderBorderColor" | "fileUploaderBorderWidth" | "fileUploaderBorderStyle" | "fileUploaderBorderColorFocus" | "fileUploaderLinkColor" | "fileUploaderIconSize" | "fileUploaderIconColor" | "fileUploaderIconHoverColor" | "fileUploaderBorderColorError" | "fileUploaderBorderColorWarning" | "fileUploaderDisabledBg" | "fileUploaderDisabledBorderColor" | "fileUploaderDisabledTextColor" | "fileUploaderDisabledLinkColor" | "fileUploaderDisabledIconColor" | "fileUploaderLinkHoverTextDecoration" | "fileUploaderHoveredBg" | "fileUploaderIconGapSmall" | "fileUploaderIconGapMedium" | "fileUploaderIconGapLarge")[];
|
|
20
|
+
export declare const ALL_USED_VARIABLES: ("black" | "blue" | "gray" | "green" | "red" | "white" | "yellow" | "prototype" | "fontFamilyCompensationBaseline" | "labGrotesqueBaselineCompensation" | "brandXLight" | "brandLight" | "brand" | "brandDark" | "brandXDark" | "grayXxLight" | "grayXLight" | "grayLight" | "grayDark" | "blueXxLight" | "blueLight" | "blueDark" | "blueXDark" | "greenXxLight" | "greenDark" | "redXxLight" | "redDark" | "yellowXxLight" | "yellowDark" | "bgDefault" | "bgSecondary" | "bgDisabled" | "errorMain" | "errorSecondary" | "errorText" | "warningMain" | "warningSecondary" | "warningText" | "borderColorFocusLight" | "borderColorGrayDark" | "borderColorGrayLight" | "borderColorDisabled" | "placeholderColor" | "outlineColorFocus" | "placeholderColorLight" | "blinkColor" | "controlBorderWidth" | "controlOutlineWidth" | "controlLineHeightSmall" | "controlLineHeightMedium" | "controlLineHeightLarge" | "controlPaddingYSmall" | "controlPaddingYMedium" | "controlPaddingYLarge" | "textColorDefault" | "textColorInvert" | "textColorDisabled" | "textColorDisabledContrast" | "fontSizeSmall" | "fontSizeMedium" | "fontSizeLarge" | "fontSizeMobile" | "lineHeightMobile" | "specificityLevel" | "fixedPanelShadow" | "bgActive" | "borderColorFocus" | "borderColorError" | "borderColorWarning" | "controlHeightSmall" | "controlHeightMedium" | "controlHeightLarge" | "mobileMediaQuery" | "linkColor" | "linkActiveColor" | "linkHoverTextDecoration" | "linkSuccessColor" | "linkSuccessHoverColor" | "linkSuccessActiveColor" | "linkDangerColor" | "linkDangerHoverColor" | "linkDangerActiveColor" | "linkIconMarginRight" | "linkHoverColor" | "linkDisabledColor" | "linkButtonLineHeight" | "linkButtonPaddingX" | "tokenDisabledBg" | "tokenTextColorDisabled" | "tokenFontSize" | "tokenMarginY" | "tokenMarginX" | "tokenLineHeight" | "tokenPaddingY" | "tokenPaddingX" | "tokenMarginBeforeIcon" | "tokenRemoveIconSize" | "tokenRemoveIconPaddingY" | "tokenRemoveIconPaddingX" | "tokenRemoveIconGap" | "tokenRemoveIconBoxSizing" | "tokenBorderRadius" | "tokenBorderWidth" | "tokenBorderColorDisabled" | "tokenDefaultIdle" | "tokenDefaultActive" | "tokenGrayIdle" | "tokenGrayActive" | "tokenBlueIdle" | "tokenBlueActive" | "tokenGreenIdle" | "tokenGreenActive" | "tokenYellowIdle" | "tokenYellowActive" | "tokenRedIdle" | "tokenRedActive" | "tokenWhite" | "tokenBlack" | "tokenBorderColorWarning" | "tokenBorderColorError" | "tokenOutlineWidth" | "tokenLegacyTextShift" | "tokenPaddingYDisabled" | "tokenPaddingXDisabled" | "tokenMarginYDisabled" | "tokenMarginXDisabled" | "tokenShadowDisabled" | "tokenInputBorderColor" | "tokenInputBorderColorFocus" | "tokenInputBorderColorError" | "tokenInputBorderColorWarning" | "tokenInputBorderTopColor" | "tokenInputBorderRadius" | "tokenInputPlaceholderColor" | "tokenInputPlaceholderColorLight" | "tokenInputDisabledBg" | "tokenInputDisabledBorderColor" | "tokenInputBorderWidth" | "tokenInputOutlineWidth" | "tokenInputBg" | "tokenInputShadow" | "tokenInputTextColor" | "tokenInputTextColorDisabled" | "tokenInputPlaceholderColorDisabled" | "tokenInputPaddingY" | "tokenInputPaddingX" | "tokenInputFontSize" | "tokenInputLineHeight" | "tokenInputInputPaddingLeft" | "tokenInputInputPaddingRight" | "loaderBg" | "loaderOpacity" | "btnBackgroundClip" | "btnArrowBgImageActive" | "btnArrowBgImageChecked" | "btnLinkBorderRadius" | "btnFocusShadowWidth" | "btnDisabledBorderColor" | "btnCheckedBg" | "btnCheckedDisabledBg" | "btnCheckedDisabledColor" | "btnCheckedTextColor" | "btnCheckedDisabledBorderColor" | "btnCheckedShadow" | "btnCheckedDisabledShadow" | "btnBorderRadiusSmall" | "btnBorderRadiusMedium" | "btnBorderRadiusLarge" | "btnBorderWidth" | "btnInsetWidth" | "btnOutlineWidth" | "btnPaddingXSmall" | "btnPaddingXMedium" | "btnPaddingXLarge" | "btnIconGapSmall" | "btnIconGapMedium" | "btnIconGapLarge" | "btnIconSizeSmall" | "btnIconSizeMedium" | "btnIconSizeLarge" | "btnDefaultBg" | "btnDefaultBgStart" | "btnDefaultBgEnd" | "btnDefaultCheckedBorderColor" | "btnDefaultTextColor" | "btnDefaultHoverBg" | "btnDefaultHoverBgStart" | "btnDefaultHoverBgEnd" | "btnDefaultActiveBg" | "btnDefaultHoverBorderColor" | "btnDefaultHoverBorderBottomColor" | "btnDefaultActiveBorderColor" | "btnDefaultActiveBorderTopColor" | "btnDefaultBorderColor" | "btnDefaultBorderBottomColor" | "btnDefaultActiveShadow" | "btnSuccessBg" | "btnSuccessHoverBg" | "btnSuccessHoverBorderColor" | "btnSuccessHoverBorderBottomColor" | "btnSuccessBorderColor" | "btnSuccessBorderBottomColor" | "btnSuccessBgStart" | "btnSuccessBgEnd" | "btnSuccessTextColor" | "btnSuccessHoverBgStart" | "btnSuccessHoverBgEnd" | "btnSuccessActiveBg" | "btnSuccessActiveBorderColor" | "btnSuccessActiveBorderTopColor" | "btnSuccessActiveShadow" | "btnPrimaryBg" | "btnPrimaryHoverBg" | "btnPrimaryHoverBorderColor" | "btnPrimaryHoverBorderBottomColor" | "btnPrimaryBorderColor" | "btnPrimaryBorderBottomColor" | "btnPrimaryBgStart" | "btnPrimaryBgEnd" | "btnPrimaryTextColor" | "btnPrimaryHoverBgStart" | "btnPrimaryHoverBgEnd" | "btnPrimaryActiveBg" | "btnPrimaryActiveBorderColor" | "btnPrimaryActiveBorderTopColor" | "btnPrimaryActiveShadow" | "btnDangerBg" | "btnDangerHoverBg" | "btnDangerHoverBorderColor" | "btnDangerHoverBorderBottomColor" | "btnDangerBorderColor" | "btnDangerBorderBottomColor" | "btnDangerBgStart" | "btnDangerBgEnd" | "btnDangerTextColor" | "btnDangerHoverBgStart" | "btnDangerHoverBgEnd" | "btnDangerActiveBg" | "btnDangerActiveBorderColor" | "btnDangerActiveBorderTopColor" | "btnDangerActiveShadow" | "btnPayBg" | "btnPayHoverBg" | "btnPayHoverBorderColor" | "btnPayHoverBorderBottomColor" | "btnPayBorderColor" | "btnPayBorderBottomColor" | "btnPayBgStart" | "btnPayBgEnd" | "btnPayTextColor" | "btnPayHoverBgStart" | "btnPayHoverBgEnd" | "btnPayActiveBg" | "btnPayActiveBorderColor" | "btnPayActiveBorderTopColor" | "btnPayActiveShadow" | "btnMenuArrowColor" | "btnFontSizeSmall" | "btnFontSizeMedium" | "btnFontSizeLarge" | "btnLineHeightSmall" | "btnLineHeightMedium" | "btnLineHeightLarge" | "btnPaddingYSmall" | "btnPaddingYMedium" | "btnPaddingYLarge" | "btnDisabledBg" | "btnBorderColorWarning" | "btnBorderColorError" | "btnHeightSmall" | "btnHeightMedium" | "btnHeightLarge" | "btnLinkColor" | "btnLinkHoverColor" | "btnLinkActiveColor" | "btnLinkHoverTextDecoration" | "btnLinkIconMarginRight" | "btnErrorSecondary" | "btnWarningSecondary" | "btnOutlineColorFocus" | "btnInsetColor" | "btnBorderColorFocus" | "btnLinkDisabledColor" | "btnDisabledTextColor" | "selectDefaultBg" | "selectPlaceholderColor" | "selectBorderWidth" | "selectPlaceholderColorDisabled" | "selectOutlineWidth" | "selectLineHeightSmall" | "selectFontSizeSmall" | "selectPaddingXSmall" | "selectPaddingYSmall" | "selectBorderRadiusSmall" | "selectIconGapSmall" | "selectLineHeightMedium" | "selectFontSizeMedium" | "selectPaddingXMedium" | "selectPaddingYMedium" | "selectBorderRadiusMedium" | "selectIconGapMedium" | "selectLineHeightLarge" | "selectFontSizeLarge" | "selectPaddingXLarge" | "selectPaddingYLarge" | "selectBorderRadiusLarge" | "selectIconGapLarge" | "selectMenuArrowColor" | "selectMenuArrowColorDisabled" | "selectIconSizeSmall" | "selectIconSizeMedium" | "selectIconSizeLarge" | "selectRootWidthMobile" | "selectTextColorDisabled" | "selectBgDisabled" | "selectBorderColorDisabled" | "tooltipPaddingY" | "tooltipPaddingX" | "tooltipCloseBtnPadding" | "tooltipCloseBtnColor" | "tooltipCloseBtnHoverColor" | "tooltipTextColor" | "tooltipBorder" | "tooltipBorderRadius" | "tooltipPinOffset" | "tooltipPinOffsetX" | "tooltipPinOffsetY" | "tooltipMargin" | "tooltipPinSize" | "tooltipFontSize" | "tooltipLineHeight" | "tooltipMenuPinOffset" | "tooltipMenuMargin" | "tooltipMenuPinSize" | "kebabPinOffset" | "kebabPinSize" | "kebabMargin" | "kebabBackground" | "kebabBackgroundHover" | "kebabBorderRadius" | "kebabBorder" | "modalBackBg" | "modalBg" | "modalBackOpacity" | "modalCloseButtonColor" | "modalCloseButtonDisabledColor" | "modalCloseButtonHoverColor" | "modalCloseButtonPadding" | "modalCloseButtonLegacyShift" | "modalCloseButtonBottomPadding" | "modalCloseButtonClickArea" | "modalCloseIconSize" | "modalCloseLegacyGap" | "modalCloseWrapperLegacyGap" | "modalBorderRadius" | "modalFixedHeaderBg" | "modalFixedHeaderShadow" | "modalFixedHeaderBorder" | "modalFixedFooterBorder" | "modalFixedFooterShadow" | "modalFixedPanelShadow" | "modalFooterBg" | "modalAdaptiveThreshold" | "modalPaddingTop" | "modalPaddingLeft" | "modalPaddingRight" | "modalHeaderFontSize" | "modalHeaderTextColor" | "modalHeaderLineHeight" | "modalHeaderPaddingBottom" | "modalHeaderPaddingTop" | "modalFixedHeaderPaddingBottom" | "modalBodyTextColor" | "modalFooterTextColor" | "modalBodyPaddingBottom" | "modalFooterPaddingTop" | "modalFooterPaddingBottom" | "modalPaddingBottom" | "modalFooterPanelPaddingTop" | "modalFooterPanelPaddingBottom" | "mobileModalCloseButtonRightPadding" | "mobileModalCloseButtonTopPadding" | "mobileModalCloseButtonClickArea" | "mobileModalCloseIconSize" | "mobileModalHeaderFontSize" | "mobileModalHeaderLineHeight" | "mobileModalHeaderPadding" | "mobileModalBodyPadding" | "mobileModalBodyFontSize" | "mobileModalFooterPadding" | "mobileModalPaddingBottom" | "sidePageFooterPanelBg" | "sidePageBackingBg" | "sidePageBackingBgOpacity" | "sidePageCloseButtonColor" | "sidePageCloseButtonHoverColor" | "sidePageContainerShadow" | "mobileSidePagePaddingLeft" | "mobileSidePagePaddingRight" | "mobileSidePagePaddingTop" | "mobileSidePagePaddingBottom" | "mobileSidePageFooterPadding" | "sidePagePaddingLeft" | "sidePagePaddingRight" | "sidePagePaddingTop" | "sidePagePaddingBottom" | "sidePageFooterPaddingTop" | "sidePageFooterPaddingBottom" | "sidePageBgDefault" | "sidePageHeaderTextColor" | "sidePageBodyTextColor" | "sidePageFooterTextColor" | "sidePageHeaderFontSize" | "sidePageHeaderLineHeight" | "sidePageHeaderPaddingBottom" | "sidePageHeaderPaddingTop" | "sidePageHeaderFixedFontSize" | "sidePageHeaderFixedLineHeight" | "sidePageHeaderFixedPaddingY" | "sidePageHeaderStickyOffset" | "sidePageCloseButtonPadding" | "mobileSidePageCloseButtonPadding" | "sidePageCloseButtonLegacyPaddingLeft" | "sidePageFooterPanelPaddingTop" | "sidePageFooterPanelPaddingBottom" | "sidePageCloseIconSize" | "sidePageCloseButtonClickArea" | "mobileSidePageCloseButtonClickArea" | "sidePageFixedHeaderShadow" | "sidePageFixedFooterShadow" | "sidePageFixedPanelShadow" | "mobileSidePageHeaderFontSize" | "mobileSidePageHeaderLineHeight" | "mobileSidePageHeaderPaddingBottom" | "mobileSidePageHeaderPaddingTop" | "dateInputIconColor" | "dateInputMaskColor" | "dateInputComponentSelectedBgColor" | "calendarCellBg" | "calendarCellHoverColor" | "calendarCellActiveHoverColor" | "calendarCellWeekendColor" | "calendarCellTodayBorder" | "calendarCellSelectedBgColor" | "calendarCellSelectedFontColor" | "calendarCellSize" | "calendarCellLineHeight" | "calendarMonthHeaderStickedBgColor" | "calendarMonthTitleBorderBottomColor" | "calendarCellHoverBgColor" | "calendarPaddingX" | "calendarMonthTitleLineHeight" | "calendarMonthTitlePaddingTop" | "calendarMonthTitlePaddingBottom" | "calendarMonthTitleMarginX" | "calendarMonthTitleMarginBottom" | "calendarWrapperHeight" | "calendarMonthMarginBottom" | "calendarMaxMonthsToAppendOnScroll" | "dateSelectLineHeight" | "dateSelectFontSize" | "dateSelectFontWeight" | "dateSelectMenuItemBgSelected" | "dateSelectTextColorDisabled" | "dateSelectTextColorDefault" | "dateSelectLinkColor" | "dateSelectPopupBoxShadow" | "dateSelectTextColorInvert" | "datePickerOpenBtnColor" | "pickerBg" | "pickerShadow" | "pickerTodayWrapperBgColor" | "pickerTodayWrapperBorderTop" | "pickerTodayWrapperHoverBgColor" | "pickerTodayWrapperFontSize" | "pickerTodayWrapperLineHeight" | "pickerTodayWrapperPaddingTop" | "pickerTodayWrapperPaddingBottom" | "dateSelectMenuBg" | "dateSelectMenuItemBgActive" | "dateSelectMenuItemBgDisabled" | "dateSelectMenuItemFontActive" | "dateSelectMenuItemFontSelected" | "dateSelectMenuItemFontDisabled" | "pagingFontSize" | "pagingForwardIconSize" | "pagingForwardIconMarginTop" | "pagingPageLinkPaddingX" | "pagingPageLinkPaddingY" | "pagingPageLinkLegacyPaddingY" | "pagingPageLinkMinWidth" | "pagingPageForwardLinkMarginTop" | "pagingPageForwardLinkMarginLeft" | "pagingPageForwardLinkPaddingRight" | "pagingLineHeight" | "pagingDotsColor" | "pagingDotsPadding" | "pagingPageLinkActiveBg" | "pagingPageLinkDisabledActiveBg" | "pagingPageLinkActiveColor" | "pagingPageLinkHoverBg" | "pagingPageLinkBorderRadius" | "pagingPageLinkHintColor" | "pagingPageLinkHintFontSize" | "pagingPageLinkHintLineHeight" | "pagingPageLinkMargin" | "pagingForwardLinkColor" | "pagingForwardLinkDisabledColor" | "hintColor" | "mobileHintColor" | "hintFontSize" | "hintLineHeight" | "hintMaxWidth" | "hintPaddingY" | "hintPaddingX" | "hintTextAlign" | "hintBgColor" | "hintBorder" | "hintBorderRadius" | "hintPinOffset" | "hintMargin" | "toastFontSize" | "toastLineHeight" | "toastPaddingY" | "toastPaddingX" | "toastBorderRadius" | "toastBorder" | "toastTop" | "toastBg" | "toastColor" | "toastLinkColor" | "toastClosePadding" | "toastCloseColor" | "toastCloseHoverColor" | "toastCloseSize" | "dropdownMenuSelectedBg" | "dropdownMenuHoverBg" | "menuBgDefault" | "menuBorderRadius" | "menuBorder" | "menuShadow" | "menuPaddingY" | "mobileMenuPaddingY" | "menuPaddingX" | "mobileMenuPaddingX" | "menuOffsetY" | "menuItemTextColor" | "menuItemSelectedBg" | "menuItemHoverBg" | "menuItemIconWidth" | "menuItemIconGap" | "menuItemIconLegacyMargin" | "menuItemIconLegacyShift" | "menuItemPaddingForIcon" | "menuItemLineHeight" | "menuItemFontSize" | "menuItemPaddingX" | "menuItemPaddingY" | "menuItemBorderRadius" | "menuItemLegacyPaddingX" | "menuItemLegacyPaddingY" | "menuItemHoverColor" | "menuItemLinkColor" | "menuItemCommentColor" | "menuItemCommentColorHover" | "menuItemDisplay" | "menuItemPaddingMobile" | "menuItemLineHeightMobile" | "menuItemFontSizeMobile" | "menuItemDisabledColor" | "menuItemDisabledBg" | "menuMessageTextColor" | "menuMessageBg" | "menuMessagePaddingY" | "menuMessagePaddingX" | "menuMessageDisplay" | "menuMessagePaddingMobile" | "menuMessageLineHeight" | "menuMessageLineHeightMobile" | "menuMessageFontSize" | "menuMessageFontSizeMobile" | "menuHeaderColor" | "menuHeaderLineHeight" | "menuHeaderFontSize" | "menuHeaderPaddingX" | "menuHeaderPaddingTop" | "menuHeaderPaddingBottom" | "menuHeaderLegacyPaddingRight" | "menuSeparatorBorderColor" | "menuSeparatorMarginY" | "menuSeparatorBorderWidth" | "mobileMenuSeparatorMarginY" | "mobileMenuSeparatorMarginX" | "toggleFontSize" | "toggleLineHeight" | "toggleTextColor" | "toggleHandleActiveWidthIncrement" | "toggleHandleBorderRadius" | "toggleHeight" | "toggleWidth" | "toggleBorderRadius" | "toggleBg" | "toggleHandleBg" | "toggleCheckedBg" | "toggleDisabledHandleBg" | "toggleBaseBg" | "toggleBgDisabled" | "toggleBgDisabledChecked" | "toggleBgHover" | "toggleCheckedBgHover" | "toggleBgChecked" | "toggleBorderWidth" | "toggleOutlineWidth" | "toggleBorderColor" | "toggleBorderColorDisabled" | "toggleBorderColorDisabledChecked" | "toggleHandleSize" | "toggleHandleLeft" | "toggleHandleTop" | "toggleBgFocus" | "toggleBgActive" | "toggleShadowColorError" | "toggleShadowColorWarning" | "toggleFocusShadowColor" | "toggleCaptionGap" | "toggleButtonOffsetY" | "popupBorder" | "popupBorderRadius" | "popupBorderColor" | "popupDropShadow" | "popupBoxShadow" | "popupTextColor" | "popupBackground" | "popupPinOffset" | "popupPinOffsetX" | "popupPinOffsetY" | "popupMargin" | "popupPinSize" | "inputTextColor" | "inputShadow" | "inputBg" | "inputIconColor" | "inputFocusedIconColor" | "inputColor" | "inputWidth" | "inputTextColorDisabled" | "inputFontSizeSmall" | "inputFontSizeMedium" | "inputFontSizeLarge" | "inputLineHeightSmall" | "inputLineHeightMedium" | "inputLineHeightLarge" | "inputHeightSmall" | "inputHeightMedium" | "inputHeightLarge" | "inputPaddingYSmall" | "inputPaddingYMedium" | "inputPaddingYLarge" | "inputPaddingXSmall" | "inputPaddingXMedium" | "inputPaddingXLarge" | "inputIconGapSmall" | "inputIconGapMedium" | "inputIconGapLarge" | "inputIconSizeSmall" | "inputIconSizeMedium" | "inputIconSizeLarge" | "inputFocusShadow" | "inputFocusedBg" | "inputDisabledBg" | "inputDisabledBorderColor" | "inputFocusOutline" | "inputBorderWidth" | "inputOutlineWidth" | "inputBorderRadiusSmall" | "inputBorderRadiusMedium" | "inputBorderRadiusLarge" | "inputBorderColor" | "inputBorderColorFocus" | "inputBorderColorError" | "inputBorderColorWarning" | "inputBorderTopColor" | "inputPlaceholderColor" | "inputPlaceholderColorDisabled" | "inputPlaceholderColorLight" | "inputBlinkColor" | "inputColorScheme" | "checkboxFontSize" | "checkboxLineHeight" | "checkboxBoxSize" | "checkboxCaptionGap" | "checkboxPaddingY" | "checkboxBoxOffsetY" | "checkboxBgStart" | "checkboxBgEnd" | "checkboxTextColorDefault" | "checkboxTextColorDisabled" | "checkboxShadowDisabled" | "checkboxBorder" | "checkboxBorderWidth" | "checkboxShadow" | "checkboxShadowHover" | "checkboxCheckedColor" | "checkboxOutlineColorFocus" | "checkboxBorderColorWarning" | "checkboxBorderColorError" | "checkboxCheckedHoverShadow" | "checkboxBorderRadius" | "checkboxOutlineWidth" | "checkboxCheckedShadow" | "checkboxCheckedActiveShadow" | "checkboxBorderColorFocus" | "checkboxBg" | "checkboxHoverBg" | "checkboxActiveBg" | "checkboxCheckedBg" | "checkboxBgDisabled" | "checkboxCheckedHoverBg" | "checkboxCheckedActiveBg" | "checkboxShadowActive" | "textareaBg" | "textareaColor" | "textareaTextColorDisabled" | "textareaPlaceholderColorLight" | "textareaPlaceholderColor" | "textareaPlaceholderColorDisabled" | "textareaShadow" | "textareaFontSize" | "textareaLineHeight" | "textareaBorderRadius" | "textareaBorderWidth" | "textareaOutlineWidth" | "textareaMinHeight" | "textareaWidth" | "textareaPaddingX" | "textareaPaddingY" | "textareaBorderColor" | "textareaBorderTopColor" | "textareaBorderColorFocus" | "textareaBorderColorWarning" | "textareaBorderColorError" | "textareaDisabledBg" | "textareaDisabledBorderColor" | "textareaCounterColor" | "textareaCounterBg" | "textareaCounterErrorColor" | "textareaCounterHelpIconColor" | "radioBulletSize" | "radioOutlineWidth" | "radioTextColor" | "radioSize" | "radioSizeAfter" | "radioFontSize" | "radioLineHeight" | "radioCaptionGap" | "radioPaddingY" | "radioVerticalAlign" | "radioBgImage" | "radioBgColor" | "radioHoverBg" | "radioActiveBg" | "radioBorderWidth" | "radioBorderColor" | "radioBoxShadow" | "radioBorder" | "radioBorderColorFocus" | "radioBorderColorWarning" | "radioBorderColorError" | "radioHoverShadow" | "radioActiveShadow" | "radioFocusShadow" | "radioCheckedBgColor" | "radioCheckedBorderColor" | "radioCheckedBulletColor" | "radioCheckedHoverBgColor" | "radioDisabledBg" | "radioDisabledShadow" | "radioCaptionDisplay" | "radioBorderWidthCompensation" | "radioCircleOffsetY" | "radioGroupLegacyItemGap" | "tabFontSize" | "tabPaddingX" | "tabsMarginX" | "tabPaddingY" | "tabLineHeight" | "tabBorderWidth" | "tabOutlineWidth" | "tabTextColorDefault" | "tabColorFocus" | "tabColorError" | "tabColorWarning" | "tabColorSuccess" | "tabColorPrimary" | "tabColorHover" | "tabColorHoverError" | "tabColorHoverWarning" | "tabColorHoverSuccess" | "tabColorHoverPrimary" | "spinnerBgColor" | "spinnerColor" | "spinnerDimmedColor" | "spinnerCaptionColor" | "spinnerFontSizeSmall" | "spinnerFontSizeMedium" | "spinnerFontSizeLarge" | "spinnerLineHeightSmall" | "spinnerLineHeightMedium" | "spinnerLineHeightLarge" | "spinnerCaptionGapSmall" | "spinnerCaptionGapMedium" | "spinnerCaptionGapLarge" | "switcherBorderRadius" | "switcherTextColor" | "switcherOutlineWidth" | "switcherCaptionFontSizeSmall" | "switcherCaptionFontSizeMedium" | "switcherCaptionFontSizeLarge" | "switcherCaptionLineHeightSmall" | "switcherCaptionLineHeightMedium" | "switcherCaptionLineHeightLarge" | "switcherCaptionGapSmall" | "switcherCaptionGapMedium" | "switcherCaptionGapLarge" | "switcherButtonPaddingXSmall" | "switcherButtonPaddingXMedium" | "switcherButtonPaddingXLarge" | "switcherButtonPaddingYSmall" | "switcherButtonPaddingYMedium" | "switcherButtonPaddingYLarge" | "switcherButtonLineHeightSmall" | "switcherButtonLineHeightMedium" | "switcherButtonLineHeightLarge" | "switcherButtonFontSizeSmall" | "switcherButtonFontSizeMedium" | "switcherButtonFontSizeLarge" | "switcherButtonBorderRadiusSmall" | "switcherButtonBorderRadiusMedium" | "switcherButtonBorderRadiusLarge" | "switcherButtonBorderWidth" | "switcherBtnDisabledBorderColor" | "switcherButtonDisabledBorderColor" | "switcherButtonCheckedDisabledShadow" | "mobilePopupTopPadding" | "mobilePopupContainerBottomPadding" | "mobilePopupHeaderPadding" | "mobilePopupContainerBorderRadius" | "mobilePopupHeaderFontSize" | "mobilePopupHeaderLineHeight" | "mobilePopupHeaderFontWeight" | "mobilePopupHeaderChildPadding" | "mobilePopupOuterIndentY" | "scrollContainerScrollBarSize" | "scrollContainerScrollBarHoverSize" | "scrollContainerScrollBarColor" | "scrollContainerScrollBarInvertColor" | "passwordInputVisibilityIconColor" | "passwordInputVisibilityIconOpacity" | "passwordInputVisibilityIconHoverColor" | "passwordInputVisibilityIconHoverOpacity" | "globalLoaderColor" | "globalLoaderHeight" | "globalLoaderWidth" | "globalLoaderPosition" | "globalLoaderTop" | "globalLoaderLeft" | "globalLoaderBottom" | "globalLoaderRight" | "globalLoaderBackgroundColor" | "globalLoaderTransitionToSpinnerDuration" | "globalLoaderSpinnerAnimationDuration" | "globalLoaderSlowAnimationDuration" | "globalLoaderTransitionFromSpinnerDuration" | "fileUploaderWidth" | "fileUploaderBg" | "fileUploaderFontSize" | "fileUploaderPaddingXSmall" | "fileUploaderPaddingXMedium" | "fileUploaderPaddingXLarge" | "fileUploaderFontSizeSmall" | "fileUploaderFontSizeMedium" | "fileUploaderFontSizeLarge" | "fileUploaderLineHeight" | "fileUploaderLineHeightSmall" | "fileUploaderLineHeightMedium" | "fileUploaderLineHeightLarge" | "fileUploaderPaddingYSmall" | "fileUploaderPaddingYMedium" | "fileUploaderPaddingYLarge" | "fileUploaderTextColorDefault" | "fileUploaderPaddingX" | "fileUploaderPaddingY" | "fileUploaderBorderRadius" | "fileUploaderBorderColor" | "fileUploaderBorderWidth" | "fileUploaderBorderStyle" | "fileUploaderBorderColorFocus" | "fileUploaderLinkColor" | "fileUploaderIconSize" | "fileUploaderIconColor" | "fileUploaderIconHoverColor" | "fileUploaderBorderColorError" | "fileUploaderBorderColorWarning" | "fileUploaderDisabledBg" | "fileUploaderDisabledBorderColor" | "fileUploaderDisabledTextColor" | "fileUploaderDisabledLinkColor" | "fileUploaderDisabledIconColor" | "fileUploaderLinkHoverTextDecoration" | "fileUploaderHoveredBg" | "fileUploaderIconGapSmall" | "fileUploaderIconGapMedium" | "fileUploaderIconGapLarge")[];
|
|
21
21
|
export declare const CALLS_COUNT: number;
|
|
22
22
|
export declare const EXECUTION_TIME: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ZIndexStorage.ts"],"names":["globalThat","calculatePriority","priority","componentPriorities","MobilePopup","Toast","GlobalLoader","Sidepage","Modal","Sticky","DropdownContainer","Popup","
|
|
1
|
+
{"version":3,"sources":["ZIndexStorage.ts"],"names":["globalThat","calculatePriority","priority","componentPriorities","MobilePopup","Toast","GlobalLoader","Sidepage","Modal","Sticky","DropdownContainer","Popup","priorityStep","getZIndexes","__RetailUiZIndexes","getIndexPriority","zIndex","Math","trunc","getMaxAllowedValue","upperBorder","max","Object","values","incrementZIndex","delta","calculatedPriority","maxAllowedValue","zIndexes","prevIndexId","length","min","push","sort","a","b","removeZIndex","i","indexOf","splice"],"mappings":"AAAA,SAASA,UAAT,QAA2B,mBAA3B;;;AAGA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,QAAD,EAAwB;AAChD,MAAI,OAAOA,QAAP,KAAoB,QAAxB,EAAkC;AAChC,WAAOC,mBAAmB,CAACD,QAAD,CAA1B;AACD;;AAED,SAAOA,QAAP;AACD,CAND;;;;AAUA,IAAMC,mBAAmB,GAAG;AAC1BC,EAAAA,WAAW,EAAE,IADa;AAE1BC,EAAAA,KAAK,EAAE,KAFmB;AAG1BC,EAAAA,YAAY,EAAE,EAHY;AAI1BC,EAAAA,QAAQ,EAAE,CAJgB;AAK1BC,EAAAA,KAAK,EAAE,CALmB;AAM1BC,EAAAA,MAAM,EAAE,CANkB;AAO1BC,EAAAA,iBAAiB,EAAE,CAPO;AAQ1BC,EAAAA,KAAK,EAAE,CARmB,EAA5B;;AAUA,IAAMC,YAAY,GAAG,IAArB;;AAEA,IAAMC,WAAW,GAAG,SAAdA,WAAc,WAAgBb,UAAU,CAACc,kBAAX,KAAkCd,UAAU,CAACc,kBAAX,GAAgC,CAAC,CAAD,CAAlE,CAAhB,EAApB;AACA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,MAAD,UAAoBC,IAAI,CAACC,KAAL,CAAWF,MAAM,GAAGJ,YAApB,CAApB,EAAzB;AACA,IAAMO,kBAAkB,GAAG,SAArBA,kBAAqB,CAACjB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IAAAA,QAAQ,CAACW,MAAT,CAAgBF,CAAhB,EAAmB,CAAnB;AACD;AACF","sourcesContent":["import { globalThat } from '../../lib/SSRSafe';\n\ntype Priority = number | LayerComponentName;\nconst calculatePriority = (priority: Priority) => {\n if (typeof priority === 'string') {\n return componentPriorities[priority];\n }\n\n return priority;\n};\n\nexport type LayerComponentName = keyof typeof componentPriorities;\n\nconst componentPriorities = {\n MobilePopup: 9000,\n Toast: 10000,\n GlobalLoader: 10,\n Sidepage: 9,\n Modal: 9,\n Sticky: 7,\n DropdownContainer: 5,\n Popup: 3,\n};\nconst priorityStep = 1000;\n\nconst getZIndexes = (): number[] => globalThat.__RetailUiZIndexes || (globalThat.__RetailUiZIndexes = [0]);\nconst getIndexPriority = (zIndex: number) => Math.trunc(zIndex / priorityStep);\nconst getMaxAllowedValue = (priority: number): number => (priority + 1) * priorityStep - 1;\n\nexport const upperBorder = getMaxAllowedValue(Math.max(...Object.values(componentPriorities)));\n\nexport function incrementZIndex(priority: Priority, delta: number): number {\n const calculatedPriority = calculatePriority(priority);\n\n const maxAllowedValue = getMaxAllowedValue(calculatedPriority);\n const zIndexes = getZIndexes();\n\n let prevIndexId = zIndexes.length - 1;\n while (zIndexes[prevIndexId] > maxAllowedValue && prevIndexId > 0) {\n prevIndexId--;\n }\n\n const zIndex =\n getIndexPriority(zIndexes[prevIndexId]) === calculatedPriority\n ? Math.min(zIndexes[prevIndexId] + delta, maxAllowedValue)\n : calculatedPriority * priorityStep;\n\n zIndexes.push(zIndex);\n zIndexes.sort((a, b) => a - b);\n return zIndex;\n}\n\nexport function removeZIndex(zIndex: number): void {\n const zIndexes = getZIndexes();\n const i = zIndexes.indexOf(zIndex);\n\n if (i !== -1) {\n zIndexes.splice(i, 1);\n }\n}\n"]}
|
|
@@ -9,11 +9,6 @@ declare const componentPriorities: {
|
|
|
9
9
|
Sticky: number;
|
|
10
10
|
DropdownContainer: number;
|
|
11
11
|
Popup: number;
|
|
12
|
-
Loader: number;
|
|
13
|
-
ModalHeader: number;
|
|
14
|
-
ModalFooter: number;
|
|
15
|
-
ModalCross: number;
|
|
16
|
-
ModalBody: number;
|
|
17
12
|
};
|
|
18
13
|
export declare const upperBorder: number;
|
|
19
14
|
export declare function incrementZIndex(priority: Priority, delta: number): number;
|
|
@@ -11,7 +11,7 @@ export var styles = memoizeStyle({
|
|
|
11
11
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-left: -0.0714285714285714em;\n margin-right: -0.0714285714285714em;\n "])));
|
|
12
12
|
},
|
|
13
13
|
icon: function icon() {
|
|
14
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n margin-bottom: -3px;\n border-radius: 50%;\n "])));
|
|
14
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n margin-bottom: -3px;\n border-radius: 50%;\n overflow: visible;\n "])));
|
|
15
15
|
},
|
|
16
16
|
iconInline: function iconInline() {
|
|
17
17
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n height: 1.1428571428571428em;\n width: 1.1428571428571428em;\n margin-bottom: -0.2428571428571428em;\n stroke-width: 0.10714285714285714em;\n "])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SpinnerIcon.styles.ts"],"names":["css","memoizeStyle","styles","root","rootInline","icon","iconInline"],"mappings":"0KAAA,SAASA,GAAT,EAAcC,YAAd,QAAkC,2BAAlC;;AAEA,OAAO,IAAMC,MAAM,GAAGD,YAAY,CAAC;AACjCE,EAAAA,IADiC,kBAC1B;AACL,WAAOH,GAAP;;;;;AAKD,GAPgC;AAQjCI,EAAAA,UARiC,wBAQpB;AACX,WAAOJ,GAAP;;;;AAID,GAbgC;;AAejCK,EAAAA,IAfiC,kBAe1B;AACL,WAAOL,GAAP
|
|
1
|
+
{"version":3,"sources":["SpinnerIcon.styles.ts"],"names":["css","memoizeStyle","styles","root","rootInline","icon","iconInline"],"mappings":"0KAAA,SAASA,GAAT,EAAcC,YAAd,QAAkC,2BAAlC;;AAEA,OAAO,IAAMC,MAAM,GAAGD,YAAY,CAAC;AACjCE,EAAAA,IADiC,kBAC1B;AACL,WAAOH,GAAP;;;;;AAKD,GAPgC;AAQjCI,EAAAA,UARiC,wBAQpB;AACX,WAAOJ,GAAP;;;;AAID,GAbgC;;AAejCK,EAAAA,IAfiC,kBAe1B;AACL,WAAOL,GAAP;;;;;AAKD,GArBgC;;AAuBjCM,EAAAA,UAvBiC,wBAuBpB;AACX,WAAON,GAAP;;;;;;AAMD,GA9BgC,EAAD,CAA3B","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\n\nexport const styles = memoizeStyle({\n root() {\n return css`\n display: inline-block;\n margin-left: -1px;\n margin-right: -1px;\n `;\n },\n rootInline() {\n return css`\n margin-left: -0.0714285714285714em;\n margin-right: -0.0714285714285714em;\n `;\n },\n\n icon() {\n return css`\n margin-bottom: -3px;\n border-radius: 50%;\n overflow: visible;\n `;\n },\n\n iconInline() {\n return css`\n height: 1.1428571428571428em;\n width: 1.1428571428571428em;\n margin-bottom: -0.2428571428571428em;\n stroke-width: 0.10714285714285714em;\n `;\n },\n});\n"]}
|
|
@@ -87,9 +87,7 @@ export var DarkTheme = /*#__PURE__*/function (_ref) {
|
|
|
87
87
|
key: "inputBorderTopColor",
|
|
88
88
|
get: function get() {
|
|
89
89
|
return this.inputBorderColor;
|
|
90
|
-
}
|
|
91
|
-
//#region DatePicker
|
|
92
|
-
|
|
90
|
+
}
|
|
93
91
|
}, {
|
|
94
92
|
key: "textareaBorderTopColor",
|
|
95
93
|
get: function get() {
|
|
@@ -227,6 +225,7 @@ DarkTheme.toggleDisabledHandleBg = '#525252';
|
|
|
227
225
|
DarkTheme.toggleBaseBg = 'rgba(255, 255, 255, 0.04)';
|
|
228
226
|
DarkTheme.toggleBgDisabledChecked = 'rgba(255, 255, 255, 0.48)';
|
|
229
227
|
DarkTheme.inputBg = 'rgba(255, 255, 255, 0.04)';
|
|
228
|
+
DarkTheme.inputColorScheme = 'dark';
|
|
230
229
|
DarkTheme.dateSelectMenuItemBgSelected = 'rgba(255, 255, 255, 0.08)';
|
|
231
230
|
DarkTheme.pickerTodayWrapperBorderTop = '1px solid rgba(255, 255, 255, 0.08)';
|
|
232
231
|
DarkTheme.dateInputComponentSelectedBgColor = '#1c7edf';
|