@semcore/inline-input 16.1.5-prerelease.1 → 16.1.5-prerelease.4
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/lib/cjs/InlineInput.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/index.type.js +2 -0
- package/lib/cjs/index.type.js.map +1 -0
- package/lib/es6/InlineInput.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/index.type.js +2 -0
- package/lib/es6/index.type.js.map +1 -0
- package/lib/types/InlineInput.d.ts +4 -0
- package/lib/types/index.d.ts +4 -163
- package/lib/types/index.type.d.ts +146 -0
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +58 -0
- package/package.json +13 -13
- package/lib/cjs/index.d.js +0 -2
- package/lib/cjs/index.d.js.map +0 -1
- package/lib/es6/index.d.js +0 -2
- package/lib/es6/index.d.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineInput.js","names":["_core","require","_button","_autoFocusEnhance","_interopRequireDefault","_i18nEnhance","_hasParent","_flexBox","_m","_m2","_inputNumber","_spin","_react","_intergalacticDynamicLocales","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","style","sstyled","insert","pointInsideOfRect","_ref15","x","y","rect","width","height","InlineInputBase","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","React","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","_this$inputRef$curren","_this$inputRef$curren2","_this$inputRef$curren3","_this$inputHandlersRe","_this$inputRef$curren4","inputRef","current","value","min","stepUp","call","inputHandlersRef","_this$inputRef$curren5","_this$inputRef$curren6","_this$inputRef$curren7","_this$inputHandlersRe2","_this$inputRef$curren8","max","stepDown","_this$inputRef$curren9","preventDefault","focus","text","_this$asProps$onConfi","_this$asProps","asProps","onConfirm","prevText","_this$asProps$onCance","_this$asProps2","onCancel","_this$inputRef$curren0","_this$inputRef$curren1","_this$asProps3","onBlurBehavior","Date","now","hasParent","relatedTarget","rootRef","_this$lastMouseDownPo","getBoundingClientRect","initValue","_this$asProps4","key","_this$inputRef$curren10","_this$inputRef$curren11","_inherits2","_createClass2","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","_this$inputRef$curren12","_this$asProps5","loading","getI18nText","handleConfirm","getCancelControlProps","_this$asProps6","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","inputHandlerRefs","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","Box","SUnderline","SInvalidPattern","InvalidStateBox","_this$asProps7","Children","styles","createElement","cn","_objectSpread2","assignProps","handleBlur","Component","i18nEnhance","localizedMessages","i18n","Value","_Component2","uncontrolledProps","target","_ref2","_ref9","SValue","defaultValue","autoFocusEnhance","Addon","props","_ref3","arguments[0]","_ref0","SAddon","ConfirmControl","_ref4","_ref10","_props$title","_ref16","hasChildren","children","title","useCallback","_props$onConfirm","_props$value","handleKeydown","stopPropagation","_ref1","sstyles","sConfirmIconStyles","ButtonLink","icon","CheckM","className","CancelControl","_ref5","_ref12","_props$title2","_ref17","_props$onCancel","_props$value2","_ref11","sCancelIconStyles","CloseM","NumberValue","_ref6","_ref13","InputNumber","NumberControls","_ref7","_ref14","SControls","Controls","InlineInput","createComponent","_default","exports"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { IRootComponentHandlers } from '@semcore/core';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport CheckM from '@semcore/icon/Check/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport InputNumber, { type InputNumberValueProps } from '@semcore/input-number';\nimport Spin from '@semcore/spin';\nimport type { ITooltipProps } from '@semcore/tooltip';\nimport React from 'react';\n\nimport style from './style/inline-input.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\ntype OnConfirm = (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype OnCancel = (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype RootAsProps = {\n state?: 'normal' | 'valid' | 'invalid';\n loading?: boolean;\n disabled?: boolean;\n onConfirm?: OnConfirm;\n onCancel?: OnCancel;\n value?: string;\n defaultValue?: string;\n autoFocus?: boolean;\n placeholder?: string;\n onChange?: (value: string, event: React.ChangeEvent) => void;\n onBlur?: (event: React.FocusEvent) => void;\n onFocus?: (event: React.FocusEvent) => void;\n onBlurBehavior?: 'cancel' | 'confirm';\n styles?: React.CSSProperties;\n Children: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n locale?: string;\n};\n\ntype AddonAsProps = {\n styles?: React.CSSProperties;\n Children: React.FC;\n};\n\ntype ControlAsProps = {\n Children: React.FC;\n children: React.ReactNode;\n styles?: React.CSSProperties;\n title?: string;\n $tooltipsProps?: ITooltipProps;\n loading?: boolean;\n disabled?: boolean;\n onCancel?: OnCancel;\n value?: string;\n icon?: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\ntype ConfirmControlAsProps = ControlAsProps & {\n onConfirm?: OnConfirm;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\n inputHandlerRefs?: React.RefObject<IRootComponentHandlers>;\n increment?: (event: WheelEvent) => void;\n decrement?: (event: WheelEvent) => void;\n};\ntype NumberControlsAsProps = ControlAsProps & {\n increment?: (event: React.SyntheticEvent) => void;\n decrement?: (event: React.SyntheticEvent) => void;\n};\n\nconst pointInsideOfRect = ({\n x,\n y,\n rect,\n}: {\n x: number;\n y: number;\n rect: { x: number; y: number; width: number; height: number };\n}) => {\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n};\n\nclass InlineInputBase extends Component<RootAsProps> {\n static displayName = 'InlineInput';\n\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n state: 'normal',\n onBlurBehavior: 'confirm',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static style = style;\n\n rootRef = React.createRef<HTMLElement>();\n inputRef = React.createRef<HTMLInputElement>();\n inputHandlersRef = React.createRef<IRootComponentHandlers>();\n initValue = '';\n lastMouseDownPosition: { x: number; y: number } | null = null;\n lastHandledKeyboardEvent = -1;\n\n handleDocumentMouseDown = (event: { clientX: number; clientY: number }) => {\n this.lastMouseDownPosition = { x: event.clientX, y: event.clientY };\n this.lastHandledKeyboardEvent = -1;\n };\n\n handleDocumentKeyDown = () => {\n this.lastMouseDownPosition = null;\n };\n\n componentDidMount() {\n this.updateInert();\n\n if (!this.asProps.onBlurBehavior) return;\n document.body.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n componentDidUpdate(prevProps: Readonly<RootAsProps>): void {\n if (prevProps.disabled !== this.asProps.disabled) {\n this.updateInert();\n }\n }\n\n componentWillUnmount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n getAddonProps() {\n return {\n onMouseDown: this.handleMouseDownAddon,\n };\n }\n\n getConfirmControlProps() {\n const { loading, getI18nText } = this.asProps;\n return {\n value: this.inputRef.current?.value,\n loading,\n onConfirm: this.handleConfirm,\n getI18nText,\n };\n }\n\n getCancelControlProps() {\n const { loading, disabled, getI18nText } = this.asProps;\n return {\n value: this.initValue,\n // because double disabled(root disabled and addon disabled)\n disabled: loading && !disabled,\n onCancel: this.handleCancel,\n getI18nText,\n };\n }\n\n getValueProps() {\n const { state } = this.asProps;\n return {\n ref: this.inputRef,\n state,\n onKeyDown: this.handleKeyDown,\n };\n }\n\n increment = (event: React.SyntheticEvent | WheelEvent) => {\n // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.min || '0';\n this.inputRef.current?.stepUp?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n decrement = (event: React.SyntheticEvent | WheelEvent) => {\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.max || '0';\n this.inputRef.current?.stepDown?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\n inputHandlerRefs: this.inputHandlersRef,\n increment: this.increment,\n decrement: this.decrement,\n };\n }\n\n getNumberControlsProps() {\n const { getI18nText } = this.asProps;\n return {\n increment: this.increment,\n decrement: this.decrement,\n getI18nText,\n };\n }\n\n handleMouseDownAddon = (event: React.MouseEvent) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleConfirm = (\n text: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onConfirm?.(text, event);\n };\n\n handleCancel = (\n prevText: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onCancel?.(prevText, event);\n };\n\n handleBlur = (event: React.FocusEvent) => {\n const { onConfirm, onCancel, onBlurBehavior } = this.asProps;\n if (!onBlurBehavior) return;\n if (Date.now() - this.lastHandledKeyboardEvent < 250) return;\n if (hasParent(event.relatedTarget, this.rootRef.current!)) return;\n\n if (this.lastMouseDownPosition && this.rootRef.current) {\n const { x, y } = this.lastMouseDownPosition;\n const rect = this.rootRef.current.getBoundingClientRect();\n\n if (pointInsideOfRect({ x, y, rect })) {\n return;\n }\n }\n\n if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);\n if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n const { onConfirm, onCancel } = this.asProps;\n if (event.key === 'Enter') {\n onConfirm?.(this.inputRef.current?.value ?? '', event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n if (event.key === 'Escape') {\n onCancel?.(this.initValue, event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n };\n\n private updateInert() {\n const { disabled } = this.asProps;\n\n if (!this.rootRef.current) return;\n\n if (disabled) {\n this.rootRef.current.setAttribute('inert', '');\n } else {\n this.rootRef.current.removeAttribute('inert');\n }\n }\n\n render() {\n const SInlineInput = Root;\n const SUnderline = 'div';\n const SInvalidPattern = InvalidStateBox;\n const { Children, styles, state } = this.asProps;\n\n return sstyled(styles)(\n <SInlineInput render={Box} ref={this.rootRef} onBlur={this.handleBlur}>\n <SUnderline>\n {state === 'invalid' && <SInvalidPattern />}\n <Children />\n </SUnderline>\n </SInlineInput>,\n );\n }\n}\n\nclass Value extends Component<RootAsProps> {\n static defaultProps = {\n defaultValue: '',\n };\n\n static enhance = [autoFocusEnhance()];\n static hoistProps = ['disabled'];\n\n uncontrolledProps() {\n return {\n value: (event: React.ChangeEvent<HTMLInputElement>) => event.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n\n return sstyled(this.asProps.styles)(<SValue render={Box} tag='input' type='text' />);\n }\n}\n\nconst Addon: React.FC<AddonAsProps> = (props) => {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n};\n\nconst ConfirmControl: React.FC<ConfirmControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(props.value ?? '', event);\n },\n [props.onConfirm, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleConfirm(event);\n }\n },\n [handleConfirm],\n );\n\n if (props.loading) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <Spin size='xs' />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n addonLeft={(props.icon as any) ?? CheckM}\n use='secondary'\n onClick={handleConfirm}\n className={sConfirmIconStyles.className}\n style={sConfirmIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\nconst CancelControl: React.FC<CancelControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('discard');\n\n const handleCancel = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onCancel?.(props.value ?? '', event);\n },\n [props.onCancel, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleCancel(event);\n }\n },\n [handleCancel],\n );\n\n if (props.disabled) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <CloseM />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sCancelIconStyles = sstyles.cn('SCancelIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n use='secondary'\n addonLeft={(props.icon as any) ?? CloseM}\n onClick={handleCancel}\n className={sCancelIconStyles.className}\n style={sCancelIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\n\nconst NumberValue: React.FC<NumberValueAsProps> = (props) => {\n const SValue = Root;\n\n return sstyled(props.styles)(<SValue render={InputNumber.Value} />) as React.ReactElement;\n};\n\nfunction NumberControls(props: NumberControlsAsProps) {\n const SControls = Root;\n\n return sstyled(props.styles)(\n <SControls render={InputNumber.Controls} tag={InlineInput.Addon} />,\n ) as React.ReactElement;\n}\n\n/** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */\nconst InlineInput = createComponent(InlineInputBase, {\n Addon,\n Value,\n ConfirmControl,\n CancelControl,\n NumberValue,\n NumberControls,\n}) as any;\n\nexport default InlineInput;\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,OAAA,GAAAD,OAAA;AAGA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,EAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,GAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,YAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,KAAA,GAAAP,sBAAA,CAAAH,OAAA;AAEA,IAAAW,MAAA,GAAAR,sBAAA,CAAAH,OAAA;AAGA,IAAAY,4BAAA,GAAAZ,OAAA;AAAmF,SAAAa,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,O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lineInput.js","names":["_core","require","_button","_autoFocusEnhance","_interopRequireDefault","_i18nEnhance","_hasParent","_flexBox","_m","_m2","_inputNumber","_spin","_react","_intergalacticDynamicLocales","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","style","sstyled","insert","pointInsideOfRect","_ref15","x","y","rect","width","height","InlineInputBase","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","React","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","_this$inputRef$curren","_this$inputRef$curren2","_this$inputRef$curren3","_this$inputHandlersRe","_this$inputRef$curren4","inputRef","current","value","min","stepUp","call","inputHandlersRef","_this$inputRef$curren5","_this$inputRef$curren6","_this$inputRef$curren7","_this$inputHandlersRe2","_this$inputRef$curren8","max","stepDown","_this$inputRef$curren9","preventDefault","focus","text","_this$asProps$onConfi","_this$asProps","asProps","onConfirm","prevText","_this$asProps$onCance","_this$asProps2","onCancel","_this$inputRef$curren0","_this$inputRef$curren1","_this$asProps3","onBlurBehavior","Date","now","hasParent","relatedTarget","rootRef","_this$lastMouseDownPo","getBoundingClientRect","initValue","_this$asProps4","key","_this$inputRef$curren10","_this$inputRef$curren11","_inherits2","_createClass2","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","_this$inputRef$curren12","_this$asProps5","loading","getI18nText","handleConfirm","getCancelControlProps","_this$asProps6","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","inputHandlerRefs","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","Box","SUnderline","SInvalidPattern","InvalidStateBox","_this$asProps7","Children","styles","createElement","cn","_objectSpread2","assignProps","handleBlur","Component","i18nEnhance","localizedMessages","i18n","Value","_Component2","uncontrolledProps","target","_ref2","_ref9","SValue","defaultValue","autoFocusEnhance","Addon","props","_ref3","arguments[0]","_ref0","SAddon","ConfirmControl","_ref4","_ref10","_props$title","_ref16","hasChildren","children","title","useCallback","_props$onConfirm","_props$value","handleKeydown","stopPropagation","_ref1","sstyles","sConfirmIconStyles","ButtonLink","icon","CheckM","className","CancelControl","_ref5","_ref12","_props$title2","_ref17","_props$onCancel","_props$value2","_ref11","sCancelIconStyles","CloseM","NumberValue","_ref6","_ref13","InputNumber","NumberControls","_ref7","_ref14","SControls","Controls","InlineInput","createComponent","_default","exports"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { IRootComponentHandlers } from '@semcore/core';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport CheckM from '@semcore/icon/Check/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport InputNumber, { type InputNumberValueProps } from '@semcore/input-number';\nimport Spin from '@semcore/spin';\nimport type { ITooltipProps } from '@semcore/tooltip';\nimport React from 'react';\n\nimport type { InlineInputComponent } from './index.type';\nimport style from './style/inline-input.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\ntype OnConfirm = (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype OnCancel = (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype RootAsProps = {\n state?: 'normal' | 'valid' | 'invalid';\n loading?: boolean;\n disabled?: boolean;\n onConfirm?: OnConfirm;\n onCancel?: OnCancel;\n value?: string;\n defaultValue?: string;\n autoFocus?: boolean;\n placeholder?: string;\n onChange?: (value: string, event: React.ChangeEvent) => void;\n onBlur?: (event: React.FocusEvent) => void;\n onFocus?: (event: React.FocusEvent) => void;\n onBlurBehavior?: 'cancel' | 'confirm';\n styles?: React.CSSProperties;\n Children: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n locale?: string;\n};\n\ntype AddonAsProps = {\n styles?: React.CSSProperties;\n Children: React.FC;\n};\n\ntype ControlAsProps = {\n Children: React.FC;\n children: React.ReactNode;\n styles?: React.CSSProperties;\n title?: string;\n $tooltipsProps?: ITooltipProps;\n loading?: boolean;\n disabled?: boolean;\n onCancel?: OnCancel;\n value?: string;\n icon?: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\ntype ConfirmControlAsProps = ControlAsProps & {\n onConfirm?: OnConfirm;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\n inputHandlerRefs?: React.RefObject<IRootComponentHandlers>;\n increment?: (event: WheelEvent) => void;\n decrement?: (event: WheelEvent) => void;\n};\ntype NumberControlsAsProps = ControlAsProps & {\n increment?: (event: React.SyntheticEvent) => void;\n decrement?: (event: React.SyntheticEvent) => void;\n};\n\nconst pointInsideOfRect = ({\n x,\n y,\n rect,\n}: {\n x: number;\n y: number;\n rect: { x: number; y: number; width: number; height: number };\n}) => {\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n};\n\nclass InlineInputBase extends Component<RootAsProps> {\n static displayName = 'InlineInput';\n\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n state: 'normal',\n onBlurBehavior: 'confirm',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static style = style;\n\n rootRef = React.createRef<HTMLElement>();\n inputRef = React.createRef<HTMLInputElement>();\n inputHandlersRef = React.createRef<IRootComponentHandlers>();\n initValue = '';\n lastMouseDownPosition: { x: number; y: number } | null = null;\n lastHandledKeyboardEvent = -1;\n\n handleDocumentMouseDown = (event: { clientX: number; clientY: number }) => {\n this.lastMouseDownPosition = { x: event.clientX, y: event.clientY };\n this.lastHandledKeyboardEvent = -1;\n };\n\n handleDocumentKeyDown = () => {\n this.lastMouseDownPosition = null;\n };\n\n componentDidMount() {\n this.updateInert();\n\n if (!this.asProps.onBlurBehavior) return;\n document.body.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n componentDidUpdate(prevProps: Readonly<RootAsProps>): void {\n if (prevProps.disabled !== this.asProps.disabled) {\n this.updateInert();\n }\n }\n\n componentWillUnmount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n getAddonProps() {\n return {\n onMouseDown: this.handleMouseDownAddon,\n };\n }\n\n getConfirmControlProps() {\n const { loading, getI18nText } = this.asProps;\n return {\n value: this.inputRef.current?.value,\n loading,\n onConfirm: this.handleConfirm,\n getI18nText,\n };\n }\n\n getCancelControlProps() {\n const { loading, disabled, getI18nText } = this.asProps;\n return {\n value: this.initValue,\n // because double disabled(root disabled and addon disabled)\n disabled: loading && !disabled,\n onCancel: this.handleCancel,\n getI18nText,\n };\n }\n\n getValueProps() {\n const { state } = this.asProps;\n return {\n ref: this.inputRef,\n state,\n onKeyDown: this.handleKeyDown,\n };\n }\n\n increment = (event: React.SyntheticEvent | WheelEvent) => {\n // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.min || '0';\n this.inputRef.current?.stepUp?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n decrement = (event: React.SyntheticEvent | WheelEvent) => {\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.max || '0';\n this.inputRef.current?.stepDown?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\n inputHandlerRefs: this.inputHandlersRef,\n increment: this.increment,\n decrement: this.decrement,\n };\n }\n\n getNumberControlsProps() {\n const { getI18nText } = this.asProps;\n return {\n increment: this.increment,\n decrement: this.decrement,\n getI18nText,\n };\n }\n\n handleMouseDownAddon = (event: React.MouseEvent) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleConfirm = (\n text: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onConfirm?.(text, event);\n };\n\n handleCancel = (\n prevText: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onCancel?.(prevText, event);\n };\n\n handleBlur = (event: React.FocusEvent) => {\n const { onConfirm, onCancel, onBlurBehavior } = this.asProps;\n if (!onBlurBehavior) return;\n if (Date.now() - this.lastHandledKeyboardEvent < 250) return;\n if (hasParent(event.relatedTarget, this.rootRef.current!)) return;\n\n if (this.lastMouseDownPosition && this.rootRef.current) {\n const { x, y } = this.lastMouseDownPosition;\n const rect = this.rootRef.current.getBoundingClientRect();\n\n if (pointInsideOfRect({ x, y, rect })) {\n return;\n }\n }\n\n if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);\n if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n const { onConfirm, onCancel } = this.asProps;\n if (event.key === 'Enter') {\n onConfirm?.(this.inputRef.current?.value ?? '', event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n if (event.key === 'Escape') {\n onCancel?.(this.initValue, event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n };\n\n private updateInert() {\n const { disabled } = this.asProps;\n\n if (!this.rootRef.current) return;\n\n if (disabled) {\n this.rootRef.current.setAttribute('inert', '');\n } else {\n this.rootRef.current.removeAttribute('inert');\n }\n }\n\n render() {\n const SInlineInput = Root;\n const SUnderline = 'div';\n const SInvalidPattern = InvalidStateBox;\n const { Children, styles, state } = this.asProps;\n\n return sstyled(styles)(\n <SInlineInput render={Box} ref={this.rootRef} onBlur={this.handleBlur}>\n <SUnderline>\n {state === 'invalid' && <SInvalidPattern />}\n <Children />\n </SUnderline>\n </SInlineInput>,\n );\n }\n}\n\nclass Value extends Component<RootAsProps> {\n static defaultProps = {\n defaultValue: '',\n };\n\n static enhance = [autoFocusEnhance()];\n static hoistProps = ['disabled'];\n\n uncontrolledProps() {\n return {\n value: (event: React.ChangeEvent<HTMLInputElement>) => event.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n\n return sstyled(this.asProps.styles)(<SValue render={Box} tag='input' type='text' />);\n }\n}\n\nconst Addon: React.FC<AddonAsProps> = (props) => {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n};\n\nconst ConfirmControl: React.FC<ConfirmControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(props.value ?? '', event);\n },\n [props.onConfirm, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleConfirm(event);\n }\n },\n [handleConfirm],\n );\n\n if (props.loading) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <Spin size='xs' />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n addonLeft={(props.icon as any) ?? CheckM}\n use='secondary'\n onClick={handleConfirm}\n className={sConfirmIconStyles.className}\n style={sConfirmIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\nconst CancelControl: React.FC<CancelControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('discard');\n\n const handleCancel = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onCancel?.(props.value ?? '', event);\n },\n [props.onCancel, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleCancel(event);\n }\n },\n [handleCancel],\n );\n\n if (props.disabled) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <CloseM />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sCancelIconStyles = sstyles.cn('SCancelIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n use='secondary'\n addonLeft={(props.icon as any) ?? CloseM}\n onClick={handleCancel}\n className={sCancelIconStyles.className}\n style={sCancelIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\n\nconst NumberValue: React.FC<NumberValueAsProps> = (props) => {\n const SValue = Root;\n\n return sstyled(props.styles)(<SValue render={InputNumber.Value} />) as React.ReactElement;\n};\n\nfunction NumberControls(props: NumberControlsAsProps) {\n const SControls = Root;\n\n return sstyled(props.styles)(\n <SControls render={InputNumber.Controls} tag={InlineInput.Addon} />,\n ) as React.ReactElement;\n}\n\n/** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */\nconst InlineInput = createComponent(InlineInputBase, {\n Addon,\n Value,\n ConfirmControl,\n CancelControl,\n NumberValue,\n NumberControls,\n}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AAA;IAAAuC,MAAA;EACpD,IAAMC,SAAS,GAGMJ,uBAAW,CAACK,QAAQ;EADzC,OAAAF,MAAA,GAAO,IAAA5L,aAAO,EAACmJ,KAAK,CAACpB,MAAM,CAAC,eAC1B7I,MAAA,YAAA8I,aAAA,CAAC6D,SAAS,EAAAD,MAAA,CAAA3D,EAAA,kBAAAC,cAAA,qBAAA5J,KAAA,CAAA6J,WAAA;IAAA,OAAoC4D,WAAW,CAAC7C;EAAK,GAAAyC,KAAA,GAAG,CAAC;AAEvE;;AAEA;AACA,IAAMI,WAAW,GAAG,IAAAC,qBAAe,EAACvL,eAAe,EAAE;EACnDyI,KAAK,EAALA,KAAK;EACLT,KAAK,EAALA,KAAK;EACLe,cAAc,EAAdA,cAAc;EACdoB,aAAa,EAAbA,aAAa;EACbU,WAAW,EAAXA,WAAW;EACXI,cAAc,EAAdA;AACF,CAAC,CAAyB;AAAC,IAAAO,QAAA,GAAAC,OAAA,cAEZH,WAAW","ignoreList":[]}
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_InlineInput","_interopRequireDefault","require","_default","exports","InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import InlineInputBase from './InlineInput';\nexport default InlineInputBase;\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_InlineInput","_interopRequireDefault","require","_default","exports","InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import type { InlineInputProps } from './index.type';\nimport InlineInputBase from './InlineInput';\n\nexport default InlineInputBase;\n\nexport type { InlineInputProps };\n"],"mappings":";;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,IAAAC,QAAA,GAAAC,OAAA,cAE7BC,uBAAe","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.type.js","names":[],"sources":["../../src/index.type.ts"],"sourcesContent":["import type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm' | 'none';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\nexport type InlineInputComponent = Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputConfirmControlProps,\n InlineInputProps\n >;\n CancelControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputCancelControlProps,\n InlineInputProps\n >;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', InputNumberControlsProps, InlineInputProps>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineInput.js","names":["ButtonLink","createComponent","Component","sstyled","Root","autoFocusEnhance","i18nEnhance","hasParent","Box","InvalidStateBox","CheckM","CloseM","InputNumber","Spin","React","style","_sstyled","insert","localizedMessages","pointInsideOfRect","_ref15","x","y","rect","width","height","InlineInputBase","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","_this$inputRef$curren","_this$inputRef$curren2","_this$inputRef$curren3","_this$inputHandlersRe","_this$inputRef$curren4","inputRef","current","value","min","stepUp","call","inputHandlersRef","_this$inputRef$curren5","_this$inputRef$curren6","_this$inputRef$curren7","_this$inputHandlersRe2","_this$inputRef$curren8","max","stepDown","_this$inputRef$curren9","preventDefault","focus","text","_this$asProps$onConfi","_this$asProps","asProps","onConfirm","prevText","_this$asProps$onCance","_this$asProps2","onCancel","_this$inputRef$curren0","_this$inputRef$curren1","_this$asProps3","onBlurBehavior","Date","now","relatedTarget","rootRef","_this$lastMouseDownPo","getBoundingClientRect","initValue","_this$asProps4","key","_this$inputRef$curren10","_this$inputRef$curren11","_inherits","_createClass","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","_this$inputRef$curren12","_this$asProps5","loading","getI18nText","handleConfirm","getCancelControlProps","_this$asProps6","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","inputHandlerRefs","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","SUnderline","SInvalidPattern","_this$asProps7","Children","styles","createElement","cn","_objectSpread","_assignProps","handleBlur","i18n","Value","_Component2","uncontrolledProps","target","_ref2","_ref9","SValue","_assignProps2","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","_assignProps3","ConfirmControl","_ref4","_ref10","_props$title","_ref16","hasChildren","children","title","useCallback","_props$onConfirm","_props$value","handleKeydown","stopPropagation","_ref1","_assignProps4","sstyles","sConfirmIconStyles","_assignProps5","icon","className","CancelControl","_ref5","_ref12","_props$title2","_ref17","_props$onCancel","_props$value2","_ref11","_assignProps6","sCancelIconStyles","_assignProps7","NumberValue","_ref6","_ref13","_assignProps8","NumberControls","_ref7","_ref14","SControls","Controls","_assignProps9","InlineInput"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { IRootComponentHandlers } from '@semcore/core';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport CheckM from '@semcore/icon/Check/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport InputNumber, { type InputNumberValueProps } from '@semcore/input-number';\nimport Spin from '@semcore/spin';\nimport type { ITooltipProps } from '@semcore/tooltip';\nimport React from 'react';\n\nimport style from './style/inline-input.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\ntype OnConfirm = (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype OnCancel = (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype RootAsProps = {\n state?: 'normal' | 'valid' | 'invalid';\n loading?: boolean;\n disabled?: boolean;\n onConfirm?: OnConfirm;\n onCancel?: OnCancel;\n value?: string;\n defaultValue?: string;\n autoFocus?: boolean;\n placeholder?: string;\n onChange?: (value: string, event: React.ChangeEvent) => void;\n onBlur?: (event: React.FocusEvent) => void;\n onFocus?: (event: React.FocusEvent) => void;\n onBlurBehavior?: 'cancel' | 'confirm';\n styles?: React.CSSProperties;\n Children: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n locale?: string;\n};\n\ntype AddonAsProps = {\n styles?: React.CSSProperties;\n Children: React.FC;\n};\n\ntype ControlAsProps = {\n Children: React.FC;\n children: React.ReactNode;\n styles?: React.CSSProperties;\n title?: string;\n $tooltipsProps?: ITooltipProps;\n loading?: boolean;\n disabled?: boolean;\n onCancel?: OnCancel;\n value?: string;\n icon?: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\ntype ConfirmControlAsProps = ControlAsProps & {\n onConfirm?: OnConfirm;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\n inputHandlerRefs?: React.RefObject<IRootComponentHandlers>;\n increment?: (event: WheelEvent) => void;\n decrement?: (event: WheelEvent) => void;\n};\ntype NumberControlsAsProps = ControlAsProps & {\n increment?: (event: React.SyntheticEvent) => void;\n decrement?: (event: React.SyntheticEvent) => void;\n};\n\nconst pointInsideOfRect = ({\n x,\n y,\n rect,\n}: {\n x: number;\n y: number;\n rect: { x: number; y: number; width: number; height: number };\n}) => {\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n};\n\nclass InlineInputBase extends Component<RootAsProps> {\n static displayName = 'InlineInput';\n\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n state: 'normal',\n onBlurBehavior: 'confirm',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static style = style;\n\n rootRef = React.createRef<HTMLElement>();\n inputRef = React.createRef<HTMLInputElement>();\n inputHandlersRef = React.createRef<IRootComponentHandlers>();\n initValue = '';\n lastMouseDownPosition: { x: number; y: number } | null = null;\n lastHandledKeyboardEvent = -1;\n\n handleDocumentMouseDown = (event: { clientX: number; clientY: number }) => {\n this.lastMouseDownPosition = { x: event.clientX, y: event.clientY };\n this.lastHandledKeyboardEvent = -1;\n };\n\n handleDocumentKeyDown = () => {\n this.lastMouseDownPosition = null;\n };\n\n componentDidMount() {\n this.updateInert();\n\n if (!this.asProps.onBlurBehavior) return;\n document.body.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n componentDidUpdate(prevProps: Readonly<RootAsProps>): void {\n if (prevProps.disabled !== this.asProps.disabled) {\n this.updateInert();\n }\n }\n\n componentWillUnmount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n getAddonProps() {\n return {\n onMouseDown: this.handleMouseDownAddon,\n };\n }\n\n getConfirmControlProps() {\n const { loading, getI18nText } = this.asProps;\n return {\n value: this.inputRef.current?.value,\n loading,\n onConfirm: this.handleConfirm,\n getI18nText,\n };\n }\n\n getCancelControlProps() {\n const { loading, disabled, getI18nText } = this.asProps;\n return {\n value: this.initValue,\n // because double disabled(root disabled and addon disabled)\n disabled: loading && !disabled,\n onCancel: this.handleCancel,\n getI18nText,\n };\n }\n\n getValueProps() {\n const { state } = this.asProps;\n return {\n ref: this.inputRef,\n state,\n onKeyDown: this.handleKeyDown,\n };\n }\n\n increment = (event: React.SyntheticEvent | WheelEvent) => {\n // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.min || '0';\n this.inputRef.current?.stepUp?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n decrement = (event: React.SyntheticEvent | WheelEvent) => {\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.max || '0';\n this.inputRef.current?.stepDown?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\n inputHandlerRefs: this.inputHandlersRef,\n increment: this.increment,\n decrement: this.decrement,\n };\n }\n\n getNumberControlsProps() {\n const { getI18nText } = this.asProps;\n return {\n increment: this.increment,\n decrement: this.decrement,\n getI18nText,\n };\n }\n\n handleMouseDownAddon = (event: React.MouseEvent) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleConfirm = (\n text: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onConfirm?.(text, event);\n };\n\n handleCancel = (\n prevText: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onCancel?.(prevText, event);\n };\n\n handleBlur = (event: React.FocusEvent) => {\n const { onConfirm, onCancel, onBlurBehavior } = this.asProps;\n if (!onBlurBehavior) return;\n if (Date.now() - this.lastHandledKeyboardEvent < 250) return;\n if (hasParent(event.relatedTarget, this.rootRef.current!)) return;\n\n if (this.lastMouseDownPosition && this.rootRef.current) {\n const { x, y } = this.lastMouseDownPosition;\n const rect = this.rootRef.current.getBoundingClientRect();\n\n if (pointInsideOfRect({ x, y, rect })) {\n return;\n }\n }\n\n if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);\n if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n const { onConfirm, onCancel } = this.asProps;\n if (event.key === 'Enter') {\n onConfirm?.(this.inputRef.current?.value ?? '', event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n if (event.key === 'Escape') {\n onCancel?.(this.initValue, event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n };\n\n private updateInert() {\n const { disabled } = this.asProps;\n\n if (!this.rootRef.current) return;\n\n if (disabled) {\n this.rootRef.current.setAttribute('inert', '');\n } else {\n this.rootRef.current.removeAttribute('inert');\n }\n }\n\n render() {\n const SInlineInput = Root;\n const SUnderline = 'div';\n const SInvalidPattern = InvalidStateBox;\n const { Children, styles, state } = this.asProps;\n\n return sstyled(styles)(\n <SInlineInput render={Box} ref={this.rootRef} onBlur={this.handleBlur}>\n <SUnderline>\n {state === 'invalid' && <SInvalidPattern />}\n <Children />\n </SUnderline>\n </SInlineInput>,\n );\n }\n}\n\nclass Value extends Component<RootAsProps> {\n static defaultProps = {\n defaultValue: '',\n };\n\n static enhance = [autoFocusEnhance()];\n static hoistProps = ['disabled'];\n\n uncontrolledProps() {\n return {\n value: (event: React.ChangeEvent<HTMLInputElement>) => event.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n\n return sstyled(this.asProps.styles)(<SValue render={Box} tag='input' type='text' />);\n }\n}\n\nconst Addon: React.FC<AddonAsProps> = (props) => {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n};\n\nconst ConfirmControl: React.FC<ConfirmControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(props.value ?? '', event);\n },\n [props.onConfirm, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleConfirm(event);\n }\n },\n [handleConfirm],\n );\n\n if (props.loading) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <Spin size='xs' />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n addonLeft={(props.icon as any) ?? CheckM}\n use='secondary'\n onClick={handleConfirm}\n className={sConfirmIconStyles.className}\n style={sConfirmIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\nconst CancelControl: React.FC<CancelControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('discard');\n\n const handleCancel = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onCancel?.(props.value ?? '', event);\n },\n [props.onCancel, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleCancel(event);\n }\n },\n [handleCancel],\n );\n\n if (props.disabled) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <CloseM />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sCancelIconStyles = sstyles.cn('SCancelIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n use='secondary'\n addonLeft={(props.icon as any) ?? CloseM}\n onClick={handleCancel}\n className={sCancelIconStyles.className}\n style={sCancelIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\n\nconst NumberValue: React.FC<NumberValueAsProps> = (props) => {\n const SValue = Root;\n\n return sstyled(props.styles)(<SValue render={InputNumber.Value} />) as React.ReactElement;\n};\n\nfunction NumberControls(props: NumberControlsAsProps) {\n const SControls = Root;\n\n return sstyled(props.styles)(\n <SControls render={InputNumber.Controls} tag={InlineInput.Addon} />,\n ) as React.ReactElement;\n}\n\n/** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */\nconst InlineInput = createComponent(InlineInputBase, {\n Addon,\n Value,\n ConfirmControl,\n CancelControl,\n NumberValue,\n NumberControls,\n}) as any;\n\nexport default InlineInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAEzE,OAAOC,gBAAgB,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EiC9I,WAAW,CAACwI,KAAK;EAA9D,OAAAiD,MAAA,GAAOlM,OAAO,CAAC2J,KAAK,CAACjB,MAAM,CAAC,eAAC/H,KAAA,CAAAgI,aAAA,CAACY,MAAM,EAAA2C,MAAA,CAAAtD,EAAA,WAAAC,aAAA,KAAAsD,aAAA,KAAAF,KAAA,GAA6B,CAAC;AACpE,CAAC;AAED,SAASG,cAAcA,CAACzC,KAA4B,EAAE;EAAA,IAAA0C,KAAA,GAAAxC,YAAA;IAAAyC,MAAA;EACpD,IAAMC,SAAS,GAGM9L,WAAW,CAAC+L,QAAQ;EADzC,OAAAF,MAAA,GAAOtM,OAAO,CAAC2J,KAAK,CAACjB,MAAM,CAAC,eAC1B/H,KAAA,CAAAgI,aAAA,CAAC4D,SAAS,EAAAD,MAAA,CAAA1D,EAAA,cAAAC,aAAA,KAAA4D,aAAA;IAAA,OAAoCC,WAAW,CAAChD;EAAK,GAAA2C,KAAA,GAAG,CAAC;AAEvE;;AAEA;AACA,IAAMK,WAAW,GAAG5M,eAAe,CAACyB,eAAe,EAAE;EACnDmI,KAAK,EAALA,KAAK;EACLT,KAAK,EAALA,KAAK;EACLgB,cAAc,EAAdA,cAAc;EACdoB,aAAa,EAAbA,aAAa;EACbW,WAAW,EAAXA,WAAW;EACXI,cAAc,EAAdA;AACF,CAAC,CAAQ;AAET,eAAeM,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"InlineInput.js","names":["ButtonLink","createComponent","Component","sstyled","Root","autoFocusEnhance","i18nEnhance","hasParent","Box","InvalidStateBox","CheckM","CloseM","InputNumber","Spin","React","style","_sstyled","insert","localizedMessages","pointInsideOfRect","_ref15","x","y","rect","width","height","InlineInputBase","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","_this$inputRef$curren","_this$inputRef$curren2","_this$inputRef$curren3","_this$inputHandlersRe","_this$inputRef$curren4","inputRef","current","value","min","stepUp","call","inputHandlersRef","_this$inputRef$curren5","_this$inputRef$curren6","_this$inputRef$curren7","_this$inputHandlersRe2","_this$inputRef$curren8","max","stepDown","_this$inputRef$curren9","preventDefault","focus","text","_this$asProps$onConfi","_this$asProps","asProps","onConfirm","prevText","_this$asProps$onCance","_this$asProps2","onCancel","_this$inputRef$curren0","_this$inputRef$curren1","_this$asProps3","onBlurBehavior","Date","now","relatedTarget","rootRef","_this$lastMouseDownPo","getBoundingClientRect","initValue","_this$asProps4","key","_this$inputRef$curren10","_this$inputRef$curren11","_inherits","_createClass","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","_this$inputRef$curren12","_this$asProps5","loading","getI18nText","handleConfirm","getCancelControlProps","_this$asProps6","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","inputHandlerRefs","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","SUnderline","SInvalidPattern","_this$asProps7","Children","styles","createElement","cn","_objectSpread","_assignProps","handleBlur","i18n","Value","_Component2","uncontrolledProps","target","_ref2","_ref9","SValue","_assignProps2","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","_assignProps3","ConfirmControl","_ref4","_ref10","_props$title","_ref16","hasChildren","children","title","useCallback","_props$onConfirm","_props$value","handleKeydown","stopPropagation","_ref1","_assignProps4","sstyles","sConfirmIconStyles","_assignProps5","icon","className","CancelControl","_ref5","_ref12","_props$title2","_ref17","_props$onCancel","_props$value2","_ref11","_assignProps6","sCancelIconStyles","_assignProps7","NumberValue","_ref6","_ref13","_assignProps8","NumberControls","_ref7","_ref14","SControls","Controls","_assignProps9","InlineInput"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport type { IRootComponentHandlers } from '@semcore/core';\nimport autoFocusEnhance from '@semcore/core/lib/utils/enhances/autoFocusEnhance';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport { Box, InvalidStateBox } from '@semcore/flex-box';\nimport CheckM from '@semcore/icon/Check/m';\nimport CloseM from '@semcore/icon/Close/m';\nimport InputNumber, { type InputNumberValueProps } from '@semcore/input-number';\nimport Spin from '@semcore/spin';\nimport type { ITooltipProps } from '@semcore/tooltip';\nimport React from 'react';\n\nimport type { InlineInputComponent } from './index.type';\nimport style from './style/inline-input.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\ntype OnConfirm = (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype OnCancel = (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n) => void;\ntype RootAsProps = {\n state?: 'normal' | 'valid' | 'invalid';\n loading?: boolean;\n disabled?: boolean;\n onConfirm?: OnConfirm;\n onCancel?: OnCancel;\n value?: string;\n defaultValue?: string;\n autoFocus?: boolean;\n placeholder?: string;\n onChange?: (value: string, event: React.ChangeEvent) => void;\n onBlur?: (event: React.FocusEvent) => void;\n onFocus?: (event: React.FocusEvent) => void;\n onBlurBehavior?: 'cancel' | 'confirm';\n styles?: React.CSSProperties;\n Children: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n locale?: string;\n};\n\ntype AddonAsProps = {\n styles?: React.CSSProperties;\n Children: React.FC;\n};\n\ntype ControlAsProps = {\n Children: React.FC;\n children: React.ReactNode;\n styles?: React.CSSProperties;\n title?: string;\n $tooltipsProps?: ITooltipProps;\n loading?: boolean;\n disabled?: boolean;\n onCancel?: OnCancel;\n value?: string;\n icon?: React.FC;\n getI18nText: (messageId: string, values?: { [key: string]: string | number }) => string;\n};\ntype ConfirmControlAsProps = ControlAsProps & {\n onConfirm?: OnConfirm;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\n inputHandlerRefs?: React.RefObject<IRootComponentHandlers>;\n increment?: (event: WheelEvent) => void;\n decrement?: (event: WheelEvent) => void;\n};\ntype NumberControlsAsProps = ControlAsProps & {\n increment?: (event: React.SyntheticEvent) => void;\n decrement?: (event: React.SyntheticEvent) => void;\n};\n\nconst pointInsideOfRect = ({\n x,\n y,\n rect,\n}: {\n x: number;\n y: number;\n rect: { x: number; y: number; width: number; height: number };\n}) => {\n return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;\n};\n\nclass InlineInputBase extends Component<RootAsProps> {\n static displayName = 'InlineInput';\n\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n state: 'normal',\n onBlurBehavior: 'confirm',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static style = style;\n\n rootRef = React.createRef<HTMLElement>();\n inputRef = React.createRef<HTMLInputElement>();\n inputHandlersRef = React.createRef<IRootComponentHandlers>();\n initValue = '';\n lastMouseDownPosition: { x: number; y: number } | null = null;\n lastHandledKeyboardEvent = -1;\n\n handleDocumentMouseDown = (event: { clientX: number; clientY: number }) => {\n this.lastMouseDownPosition = { x: event.clientX, y: event.clientY };\n this.lastHandledKeyboardEvent = -1;\n };\n\n handleDocumentKeyDown = () => {\n this.lastMouseDownPosition = null;\n };\n\n componentDidMount() {\n this.updateInert();\n\n if (!this.asProps.onBlurBehavior) return;\n document.body.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n componentDidUpdate(prevProps: Readonly<RootAsProps>): void {\n if (prevProps.disabled !== this.asProps.disabled) {\n this.updateInert();\n }\n }\n\n componentWillUnmount() {\n if (!this.asProps.onBlurBehavior) return;\n document.body.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.body.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n getAddonProps() {\n return {\n onMouseDown: this.handleMouseDownAddon,\n };\n }\n\n getConfirmControlProps() {\n const { loading, getI18nText } = this.asProps;\n return {\n value: this.inputRef.current?.value,\n loading,\n onConfirm: this.handleConfirm,\n getI18nText,\n };\n }\n\n getCancelControlProps() {\n const { loading, disabled, getI18nText } = this.asProps;\n return {\n value: this.initValue,\n // because double disabled(root disabled and addon disabled)\n disabled: loading && !disabled,\n onCancel: this.handleCancel,\n getI18nText,\n };\n }\n\n getValueProps() {\n const { state } = this.asProps;\n return {\n ref: this.inputRef,\n state,\n onKeyDown: this.handleKeyDown,\n };\n }\n\n increment = (event: React.SyntheticEvent | WheelEvent) => {\n // https://stackoverflow.com/questions/68010124/safari-number-input-stepup-stepdown-not-functioning-with-empty-value\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.min || '0';\n this.inputRef.current?.stepUp?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n decrement = (event: React.SyntheticEvent | WheelEvent) => {\n if (this.inputRef.current?.value === '')\n this.inputRef.current.value = this.inputRef.current.max || '0';\n this.inputRef.current?.stepDown?.(event as any);\n this.inputHandlersRef.current?.value(this.inputRef.current?.value, event);\n };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\n inputHandlerRefs: this.inputHandlersRef,\n increment: this.increment,\n decrement: this.decrement,\n };\n }\n\n getNumberControlsProps() {\n const { getI18nText } = this.asProps;\n return {\n increment: this.increment,\n decrement: this.decrement,\n getI18nText,\n };\n }\n\n handleMouseDownAddon = (event: React.MouseEvent) => {\n event.preventDefault();\n this.inputRef.current?.focus();\n };\n\n handleConfirm = (\n text: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onConfirm?.(text, event);\n };\n\n handleCancel = (\n prevText: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => {\n this.asProps.onCancel?.(prevText, event);\n };\n\n handleBlur = (event: React.FocusEvent) => {\n const { onConfirm, onCancel, onBlurBehavior } = this.asProps;\n if (!onBlurBehavior) return;\n if (Date.now() - this.lastHandledKeyboardEvent < 250) return;\n if (hasParent(event.relatedTarget, this.rootRef.current!)) return;\n\n if (this.lastMouseDownPosition && this.rootRef.current) {\n const { x, y } = this.lastMouseDownPosition;\n const rect = this.rootRef.current.getBoundingClientRect();\n\n if (pointInsideOfRect({ x, y, rect })) {\n return;\n }\n }\n\n if (onBlurBehavior === 'confirm') onConfirm?.(this.inputRef.current?.value ?? '', event);\n if (onBlurBehavior === 'cancel') onCancel?.(this.initValue, event);\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n const { onConfirm, onCancel } = this.asProps;\n if (event.key === 'Enter') {\n onConfirm?.(this.inputRef.current?.value ?? '', event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n if (event.key === 'Escape') {\n onCancel?.(this.initValue, event);\n this.lastHandledKeyboardEvent = Date.now();\n }\n };\n\n private updateInert() {\n const { disabled } = this.asProps;\n\n if (!this.rootRef.current) return;\n\n if (disabled) {\n this.rootRef.current.setAttribute('inert', '');\n } else {\n this.rootRef.current.removeAttribute('inert');\n }\n }\n\n render() {\n const SInlineInput = Root;\n const SUnderline = 'div';\n const SInvalidPattern = InvalidStateBox;\n const { Children, styles, state } = this.asProps;\n\n return sstyled(styles)(\n <SInlineInput render={Box} ref={this.rootRef} onBlur={this.handleBlur}>\n <SUnderline>\n {state === 'invalid' && <SInvalidPattern />}\n <Children />\n </SUnderline>\n </SInlineInput>,\n );\n }\n}\n\nclass Value extends Component<RootAsProps> {\n static defaultProps = {\n defaultValue: '',\n };\n\n static enhance = [autoFocusEnhance()];\n static hoistProps = ['disabled'];\n\n uncontrolledProps() {\n return {\n value: (event: React.ChangeEvent<HTMLInputElement>) => event.target.value,\n };\n }\n\n render() {\n const SValue = Root;\n\n return sstyled(this.asProps.styles)(<SValue render={Box} tag='input' type='text' />);\n }\n}\n\nconst Addon: React.FC<AddonAsProps> = (props) => {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n};\n\nconst ConfirmControl: React.FC<ConfirmControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(props.value ?? '', event);\n },\n [props.onConfirm, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleConfirm(event);\n }\n },\n [handleConfirm],\n );\n\n if (props.loading) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <Spin size='xs' />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sConfirmIconStyles = sstyles.cn('SConfirmIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n addonLeft={(props.icon as any) ?? CheckM}\n use='secondary'\n onClick={handleConfirm}\n className={sConfirmIconStyles.className}\n style={sConfirmIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\nconst CancelControl: React.FC<CancelControlAsProps> = (props) => {\n const SAddon = Root;\n const { Children, children: hasChildren } = props;\n const title = props.title ?? props.getI18nText('discard');\n\n const handleCancel = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onCancel?.(props.value ?? '', event);\n },\n [props.onCancel, props.value],\n );\n\n const handleKeydown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n handleCancel(event);\n }\n },\n [handleCancel],\n );\n\n if (props.disabled) {\n return sstyled(props.styles)(\n <SAddon render={Box}>{hasChildren ? <Children /> : <CloseM />}</SAddon>,\n ) as React.ReactElement;\n }\n\n const sstyles = sstyled(props.styles);\n const sCancelIconStyles = sstyles.cn('SCancelIcon', {});\n\n return sstyled(props.styles)(\n <SAddon render={Box} onKeyDown={handleKeydown}>\n {hasChildren\n ? (\n <Children />\n )\n : (\n <ButtonLink\n use='secondary'\n addonLeft={(props.icon as any) ?? CloseM}\n onClick={handleCancel}\n className={sCancelIconStyles.className}\n style={sCancelIconStyles.style}\n aria-label={title}\n />\n )}\n </SAddon>,\n ) as React.ReactElement;\n};\n\nconst NumberValue: React.FC<NumberValueAsProps> = (props) => {\n const SValue = Root;\n\n return sstyled(props.styles)(<SValue render={InputNumber.Value} />) as React.ReactElement;\n};\n\nfunction NumberControls(props: NumberControlsAsProps) {\n const SControls = Root;\n\n return sstyled(props.styles)(\n <SControls render={InputNumber.Controls} tag={InlineInput.Addon} />,\n ) as React.ReactElement;\n}\n\n/** `createComponent` currently exposes unrelated junk instead of typings, that the reason of to any cast */\nconst InlineInput = createComponent(InlineInputBase, {\n Addon,\n Value,\n ConfirmControl,\n CancelControl,\n NumberValue,\n NumberControls,\n}) as InlineInputComponent;\n\nexport default InlineInput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAEzE,OAAOC,gBAAgB,MAAM,mDAAmD;AAChF,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,SAASC,GAAG,EAAEC,eAAe,QAAQ,mBAAmB;AACxD,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,WAAW,MAAsC,uBAAuB;AAC/E,OAAOC,IAAI,MAA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AA4B,EAAE;EAAA,IAAA0C,KAAA,GAAAxC,YAAA;IAAAyC,MAAA;EACpD,IAAMC,SAAS,GAGM9L,WAAW,CAAC+L,QAAQ;EADzC,OAAAF,MAAA,GAAOtM,OAAO,CAAC2J,KAAK,CAACjB,MAAM,CAAC,eAC1B/H,KAAA,CAAAgI,aAAA,CAAC4D,SAAS,EAAAD,MAAA,CAAA1D,EAAA,cAAAC,aAAA,KAAA4D,aAAA;IAAA,OAAoCC,WAAW,CAAChD;EAAK,GAAA2C,KAAA,GAAG,CAAC;AAEvE;;AAEA;AACA,IAAMK,WAAW,GAAG5M,eAAe,CAACyB,eAAe,EAAE;EACnDmI,KAAK,EAALA,KAAK;EACLT,KAAK,EAALA,KAAK;EACLgB,cAAc,EAAdA,cAAc;EACdoB,aAAa,EAAbA,aAAa;EACbW,WAAW,EAAXA,WAAW;EACXI,cAAc,EAAdA;AACF,CAAC,CAAyB;AAE1B,eAAeM,WAAW","ignoreList":[]}
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import InlineInputBase from './InlineInput';\nexport default InlineInputBase;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import type { InlineInputProps } from './index.type';\nimport InlineInputBase from './InlineInput';\n\nexport default InlineInputBase;\n\nexport type { InlineInputProps };\n"],"mappings":"AACA,OAAOA,eAAe,MAAM,eAAe;AAE3C,eAAeA,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.type.js","names":[],"sources":["../../src/index.type.ts"],"sourcesContent":["import type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm' | 'none';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\nexport type InlineInputComponent = Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputConfirmControlProps,\n InlineInputProps\n >;\n CancelControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputCancelControlProps,\n InlineInputProps\n >;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', InputNumberControlsProps, InlineInputProps>;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,163 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type React from 'react';
|
|
6
|
-
|
|
7
|
-
/** @deprecated */
|
|
8
|
-
export interface IInlineInputProps extends InlineInputProps, UnknownProperties {}
|
|
9
|
-
export type InlineInputProps = BoxProps & {
|
|
10
|
-
/**
|
|
11
|
-
* Visual state of inline input
|
|
12
|
-
* @default normal
|
|
13
|
-
*/
|
|
14
|
-
state?: 'normal' | 'valid' | 'invalid';
|
|
15
|
-
/**
|
|
16
|
-
* Disabled input and shows spinner instead of confirm control
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
loading?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Disabled input and controls
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Fired with entered value when user clicks confirm control or hits `Enter` or `Space`
|
|
27
|
-
*/
|
|
28
|
-
onConfirm?: (
|
|
29
|
-
value: string,
|
|
30
|
-
event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,
|
|
31
|
-
) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`
|
|
34
|
-
*/
|
|
35
|
-
onCancel?: (
|
|
36
|
-
prevValue: string,
|
|
37
|
-
event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,
|
|
38
|
-
) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Text value of input. Should be used with `onChange` property together
|
|
41
|
-
*/
|
|
42
|
-
value?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Initial text value of input
|
|
45
|
-
*/
|
|
46
|
-
defaultValue?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Makes component to catch browser focus on component mount
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
autoFocus?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Gray text displayed in empty input
|
|
54
|
-
*/
|
|
55
|
-
placeholder?: string;
|
|
56
|
-
/**
|
|
57
|
-
* defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired
|
|
58
|
-
* Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)
|
|
59
|
-
*/
|
|
60
|
-
onBlurBehavior?: 'cancel' | 'confirm' | 'none';
|
|
61
|
-
locale?: string;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/** @deprecated */
|
|
65
|
-
export interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}
|
|
66
|
-
export type InlineInputAddonProps = BoxProps & {};
|
|
67
|
-
/** @deprecated */
|
|
68
|
-
export interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}
|
|
69
|
-
export type InlineInputValueProps = BoxProps & {
|
|
70
|
-
/**
|
|
71
|
-
* id attribute of input tag
|
|
72
|
-
*/
|
|
73
|
-
id?: string;
|
|
74
|
-
/**
|
|
75
|
-
* when `true`, element is focused immediately after mount
|
|
76
|
-
*/
|
|
77
|
-
autoFocus?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* value of input tag
|
|
80
|
-
*/
|
|
81
|
-
value?: string;
|
|
82
|
-
/**
|
|
83
|
-
* uncontrolled value of input tag
|
|
84
|
-
*/
|
|
85
|
-
defaultValue?: string;
|
|
86
|
-
/**
|
|
87
|
-
* callback invoked on every change of input tag value
|
|
88
|
-
*/
|
|
89
|
-
onChange?: (value: string, event: React.ChangeEvent) => void;
|
|
90
|
-
/**
|
|
91
|
-
* visual state of component
|
|
92
|
-
*/
|
|
93
|
-
state?: 'normal' | 'valid' | 'invalid';
|
|
94
|
-
/**
|
|
95
|
-
* shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements
|
|
96
|
-
*/
|
|
97
|
-
loading?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* disables interactive elements
|
|
100
|
-
*/
|
|
101
|
-
disabled?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* gray text in empty input tag
|
|
104
|
-
*/
|
|
105
|
-
placeholder?: string;
|
|
106
|
-
};
|
|
107
|
-
/** @deprecated */
|
|
108
|
-
export interface IInlineInputConfirmControlProps
|
|
109
|
-
extends InlineInputConfirmControlProps,
|
|
110
|
-
UnknownProperties {}
|
|
111
|
-
export type InlineInputConfirmControlProps = BoxProps & {
|
|
112
|
-
/**
|
|
113
|
-
* Text of tooltip
|
|
114
|
-
* @default Confirm
|
|
115
|
-
*/
|
|
116
|
-
title?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Icon component
|
|
119
|
-
* @default CheckM
|
|
120
|
-
*/
|
|
121
|
-
icon?: React.FC;
|
|
122
|
-
};
|
|
123
|
-
/** @deprecated */
|
|
124
|
-
export interface IInlineInputCancelControlProps
|
|
125
|
-
extends InlineInputCancelControlProps,
|
|
126
|
-
UnknownProperties {}
|
|
127
|
-
export type InlineInputCancelControlProps = BoxProps & {
|
|
128
|
-
/**
|
|
129
|
-
* Text of tooltip
|
|
130
|
-
* @default Cancel
|
|
131
|
-
*/
|
|
132
|
-
title?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Icon component
|
|
135
|
-
* @default CloseM
|
|
136
|
-
*/
|
|
137
|
-
icon?: React.FC;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
type InlineInputCtx = {
|
|
141
|
-
getAddonProps: PropGetterFn;
|
|
142
|
-
getConfirmControlProps: PropGetterFn;
|
|
143
|
-
getCancelControlProps: PropGetterFn;
|
|
144
|
-
getValueProps: PropGetterFn;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
declare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {
|
|
148
|
-
Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;
|
|
149
|
-
Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;
|
|
150
|
-
ConfirmControl: Intergalactic.Component<
|
|
151
|
-
ButtonLinkComponent,
|
|
152
|
-
InlineInputConfirmControlProps,
|
|
153
|
-
InlineInputProps
|
|
154
|
-
>;
|
|
155
|
-
CancelControl: Intergalactic.Component<
|
|
156
|
-
ButtonLinkComponent,
|
|
157
|
-
InlineInputCancelControlProps,
|
|
158
|
-
InlineInputProps
|
|
159
|
-
>;
|
|
160
|
-
NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;
|
|
161
|
-
NumberControls: Intergalactic.Component<'div', InputNumberControlsProps, InlineInputProps>;
|
|
162
|
-
};
|
|
163
|
-
export default InlineInput;
|
|
1
|
+
import type { InlineInputProps } from './index.type';
|
|
2
|
+
import InlineInputBase from './InlineInput';
|
|
3
|
+
export default InlineInputBase;
|
|
4
|
+
export type { InlineInputProps };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { ButtonLinkComponent } from '@semcore/button';
|
|
2
|
+
import type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
|
|
3
|
+
import type { BoxProps } from '@semcore/flex-box';
|
|
4
|
+
import type { InputNumberControlsProps } from '@semcore/input-number';
|
|
5
|
+
import type React from 'react';
|
|
6
|
+
/** @deprecated */
|
|
7
|
+
export interface IInlineInputProps extends InlineInputProps, UnknownProperties {
|
|
8
|
+
}
|
|
9
|
+
export type InlineInputProps = BoxProps & {
|
|
10
|
+
/**
|
|
11
|
+
* Visual state of inline input
|
|
12
|
+
* @default normal
|
|
13
|
+
*/
|
|
14
|
+
state?: 'normal' | 'valid' | 'invalid';
|
|
15
|
+
/**
|
|
16
|
+
* Disabled input and shows spinner instead of confirm control
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Disabled input and controls
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Fired with entered value when user clicks confirm control or hits `Enter` or `Space`
|
|
27
|
+
*/
|
|
28
|
+
onConfirm?: (value: string, event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`
|
|
31
|
+
*/
|
|
32
|
+
onCancel?: (prevValue: string, event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Text value of input. Should be used with `onChange` property together
|
|
35
|
+
*/
|
|
36
|
+
value?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Initial text value of input
|
|
39
|
+
*/
|
|
40
|
+
defaultValue?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Makes component to catch browser focus on component mount
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
autoFocus?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Gray text displayed in empty input
|
|
48
|
+
*/
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
/**
|
|
51
|
+
* defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired
|
|
52
|
+
* Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)
|
|
53
|
+
*/
|
|
54
|
+
onBlurBehavior?: 'cancel' | 'confirm' | 'none';
|
|
55
|
+
locale?: string;
|
|
56
|
+
};
|
|
57
|
+
/** @deprecated */
|
|
58
|
+
export interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {
|
|
59
|
+
}
|
|
60
|
+
export type InlineInputAddonProps = BoxProps & {};
|
|
61
|
+
/** @deprecated */
|
|
62
|
+
export interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {
|
|
63
|
+
}
|
|
64
|
+
export type InlineInputValueProps = BoxProps & {
|
|
65
|
+
/**
|
|
66
|
+
* id attribute of input tag
|
|
67
|
+
*/
|
|
68
|
+
id?: string;
|
|
69
|
+
/**
|
|
70
|
+
* when `true`, element is focused immediately after mount
|
|
71
|
+
*/
|
|
72
|
+
autoFocus?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* value of input tag
|
|
75
|
+
*/
|
|
76
|
+
value?: string;
|
|
77
|
+
/**
|
|
78
|
+
* uncontrolled value of input tag
|
|
79
|
+
*/
|
|
80
|
+
defaultValue?: string;
|
|
81
|
+
/**
|
|
82
|
+
* callback invoked on every change of input tag value
|
|
83
|
+
*/
|
|
84
|
+
onChange?: (value: string, event: React.ChangeEvent) => void;
|
|
85
|
+
/**
|
|
86
|
+
* visual state of component
|
|
87
|
+
*/
|
|
88
|
+
state?: 'normal' | 'valid' | 'invalid';
|
|
89
|
+
/**
|
|
90
|
+
* shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements
|
|
91
|
+
*/
|
|
92
|
+
loading?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* disables interactive elements
|
|
95
|
+
*/
|
|
96
|
+
disabled?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* gray text in empty input tag
|
|
99
|
+
*/
|
|
100
|
+
placeholder?: string;
|
|
101
|
+
};
|
|
102
|
+
/** @deprecated */
|
|
103
|
+
export interface IInlineInputConfirmControlProps extends InlineInputConfirmControlProps, UnknownProperties {
|
|
104
|
+
}
|
|
105
|
+
export type InlineInputConfirmControlProps = BoxProps & {
|
|
106
|
+
/**
|
|
107
|
+
* Text of tooltip
|
|
108
|
+
* @default Confirm
|
|
109
|
+
*/
|
|
110
|
+
title?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Icon component
|
|
113
|
+
* @default CheckM
|
|
114
|
+
*/
|
|
115
|
+
icon?: React.FC;
|
|
116
|
+
};
|
|
117
|
+
/** @deprecated */
|
|
118
|
+
export interface IInlineInputCancelControlProps extends InlineInputCancelControlProps, UnknownProperties {
|
|
119
|
+
}
|
|
120
|
+
export type InlineInputCancelControlProps = BoxProps & {
|
|
121
|
+
/**
|
|
122
|
+
* Text of tooltip
|
|
123
|
+
* @default Cancel
|
|
124
|
+
*/
|
|
125
|
+
title?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Icon component
|
|
128
|
+
* @default CloseM
|
|
129
|
+
*/
|
|
130
|
+
icon?: React.FC;
|
|
131
|
+
};
|
|
132
|
+
type InlineInputCtx = {
|
|
133
|
+
getAddonProps: PropGetterFn;
|
|
134
|
+
getConfirmControlProps: PropGetterFn;
|
|
135
|
+
getCancelControlProps: PropGetterFn;
|
|
136
|
+
getValueProps: PropGetterFn;
|
|
137
|
+
};
|
|
138
|
+
export type InlineInputComponent = Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {
|
|
139
|
+
Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;
|
|
140
|
+
Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;
|
|
141
|
+
ConfirmControl: Intergalactic.Component<ButtonLinkComponent, InlineInputConfirmControlProps, InlineInputProps>;
|
|
142
|
+
CancelControl: Intergalactic.Component<ButtonLinkComponent, InlineInputCancelControlProps, InlineInputProps>;
|
|
143
|
+
NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;
|
|
144
|
+
NumberControls: Intergalactic.Component<'div', InputNumberControlsProps, InlineInputProps>;
|
|
145
|
+
};
|
|
146
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const localizedMessages: {
|
|
2
|
+
de: {
|
|
3
|
+
confirm: string;
|
|
4
|
+
discard: string;
|
|
5
|
+
};
|
|
6
|
+
en: {
|
|
7
|
+
confirm: string;
|
|
8
|
+
discard: string;
|
|
9
|
+
};
|
|
10
|
+
es: {
|
|
11
|
+
confirm: string;
|
|
12
|
+
discard: string;
|
|
13
|
+
};
|
|
14
|
+
fr: {
|
|
15
|
+
confirm: string;
|
|
16
|
+
discard: string;
|
|
17
|
+
};
|
|
18
|
+
it: {
|
|
19
|
+
confirm: string;
|
|
20
|
+
discard: string;
|
|
21
|
+
};
|
|
22
|
+
ja: {
|
|
23
|
+
confirm: string;
|
|
24
|
+
discard: string;
|
|
25
|
+
};
|
|
26
|
+
ko: {
|
|
27
|
+
confirm: string;
|
|
28
|
+
discard: string;
|
|
29
|
+
};
|
|
30
|
+
nl: {
|
|
31
|
+
confirm: string;
|
|
32
|
+
discard: string;
|
|
33
|
+
};
|
|
34
|
+
pt: {
|
|
35
|
+
confirm: string;
|
|
36
|
+
discard: string;
|
|
37
|
+
};
|
|
38
|
+
tr: {
|
|
39
|
+
confirm: string;
|
|
40
|
+
discard: string;
|
|
41
|
+
};
|
|
42
|
+
vi: {
|
|
43
|
+
confirm: string;
|
|
44
|
+
discard: string;
|
|
45
|
+
};
|
|
46
|
+
zh: {
|
|
47
|
+
confirm: string;
|
|
48
|
+
discard: string;
|
|
49
|
+
};
|
|
50
|
+
pl: {
|
|
51
|
+
confirm: string;
|
|
52
|
+
discard: string;
|
|
53
|
+
};
|
|
54
|
+
sv: {
|
|
55
|
+
confirm: string;
|
|
56
|
+
discard: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/inline-input",
|
|
3
3
|
"description": "Semrush Input Component",
|
|
4
|
-
"version": "16.1.5-prerelease.
|
|
4
|
+
"version": "16.1.5-prerelease.4",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "16.0.5-prerelease.
|
|
18
|
-
"@semcore/icon": "16.4.0-prerelease.
|
|
19
|
-
"@semcore/spin": "16.0.5-prerelease.
|
|
20
|
-
"@semcore/tooltip": "16.0.5-prerelease.
|
|
21
|
-
"@semcore/input-number": "16.0.5-prerelease.
|
|
22
|
-
"@semcore/input": "16.0.5-prerelease.
|
|
23
|
-
"@semcore/button": "16.0.5-prerelease.
|
|
17
|
+
"@semcore/flex-box": "16.0.5-prerelease.4",
|
|
18
|
+
"@semcore/icon": "16.4.0-prerelease.4",
|
|
19
|
+
"@semcore/spin": "16.0.5-prerelease.4",
|
|
20
|
+
"@semcore/tooltip": "16.0.5-prerelease.4",
|
|
21
|
+
"@semcore/input-number": "16.0.5-prerelease.4",
|
|
22
|
+
"@semcore/input": "16.0.5-prerelease.4",
|
|
23
|
+
"@semcore/button": "16.0.5-prerelease.4"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@semcore/testing-utils": "1.0.0",
|
|
27
|
-
"@semcore/
|
|
28
|
-
"@semcore/
|
|
29
|
-
"@semcore/
|
|
27
|
+
"@semcore/core": "16.0.4-prerelease.4",
|
|
28
|
+
"@semcore/tooltip": "16.0.5-prerelease.4",
|
|
29
|
+
"@semcore/spin": "16.0.5-prerelease.4"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@semcore/base-components": "^16.1.2-prerelease.
|
|
32
|
+
"@semcore/base-components": "^16.1.2-prerelease.4"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"directory": "semcore/inline-input"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "pnpm semcore-builder --source=
|
|
40
|
+
"build": "pnpm semcore-builder --source=ts && pnpm vite build"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/lib/cjs/index.d.js
DELETED
package/lib/cjs/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm' | 'none';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputConfirmControlProps,\n InlineInputProps\n >;\n CancelControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputCancelControlProps,\n InlineInputProps\n >;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', InputNumberControlsProps, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.d.js
DELETED
package/lib/es6/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm' | 'none';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputConfirmControlProps,\n InlineInputProps\n >;\n CancelControl: Intergalactic.Component<\n ButtonLinkComponent,\n InlineInputCancelControlProps,\n InlineInputProps\n >;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', InputNumberControlsProps, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":"","ignoreList":[]}
|