@semcore/inline-input 17.0.0-prerelease.29 → 17.0.0-prerelease.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,12 +2,16 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [17.0.0] - 2026-02-27
5
+ ## [17.0.0] - 2026-03-27
6
6
 
7
7
  ### BREAK
8
8
 
9
9
  - **ellipsis**: New major version.
10
10
 
11
+ ### Fixed
12
+
13
+ - Some non-working properties marked as deprecated.
14
+
11
15
  ## [16.2.2] - 2025-11-17
12
16
 
13
17
  ### Changed
@@ -18,21 +18,22 @@ var _spin = _interopRequireDefault(require("@semcore/spin"));
18
18
  var _react = _interopRequireDefault(require("react"));
19
19
  var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
20
20
  /*!__reshadow-styles__:"./style/inline-input.shadow.css"*/
21
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInlineInput_mw77c_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus-visible{outline:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_.__disabled_mw77c_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-inner-spin-button,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_._type_number_mw77c_gg_{-moz-appearance:textfield}.___SUnderline_mw77c_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_mw77c_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_mw77c_gg_.__disabled_mw77c_gg_,.___SInlineInput_mw77c_gg_.__disabled_mw77c_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_mw77c_gg_:focus~.___SControls_mw77c_gg_{display:flex}.___SInvalidPattern_mw77c_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}", /*__inner_css_end__*/"mw77c_gg_"),
21
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SInlineInput_11ala_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_11ala_gg_ .___SConfirmIcon_11ala_gg_:not(.__color_11ala_gg_){color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_11ala_gg_ .___SConfirmIcon_11ala_gg_:not(.__color_11ala_gg_):hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_11ala_gg_ .___SCancelIcon_11ala_gg_:not(.__color_11ala_gg_){color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_11ala_gg_ .___SCancelIcon_11ala_gg_:not(.__color_11ala_gg_):hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_:focus,.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_:focus-visible{outline:0}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_.__disabled_11ala_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-webkit-inner-spin-button,.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_._type_number_11ala_gg_{-moz-appearance:textfield}.___SUnderline_11ala_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_11ala_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_11ala_gg_.__disabled_11ala_gg_,.___SInlineInput_11ala_gg_.__disabled_11ala_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_11ala_gg_._state_valid_11ala_gg_ .___SUnderline_11ala_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_11ala_gg_._state_valid_11ala_gg_ .___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_11ala_gg_._state_invalid_11ala_gg_ .___SUnderline_11ala_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_11ala_gg_._state_invalid_11ala_gg_ .___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_11ala_gg_:focus~.___SControls_11ala_gg_{display:flex}.___SInvalidPattern_11ala_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}", /*__inner_css_end__*/"11ala_gg_"),
22
22
  /*__reshadow_css_end__*/
23
23
  {
24
- "__SInlineInput": "___SInlineInput_mw77c_gg_",
25
- "_disabled": "__disabled_mw77c_gg_",
26
- "__SUnderline": "___SUnderline_mw77c_gg_",
27
- "__SAddon": "___SAddon_mw77c_gg_",
28
- "_state_valid": "_state_valid_mw77c_gg_",
29
- "_state_invalid": "_state_invalid_mw77c_gg_",
30
- "__SValue": "___SValue_mw77c_gg_",
31
- "__SControls": "___SControls_mw77c_gg_",
32
- "__SInvalidPattern": "___SInvalidPattern_mw77c_gg_",
33
- "__SConfirmIcon": "___SConfirmIcon_mw77c_gg_",
34
- "__SCancelIcon": "___SCancelIcon_mw77c_gg_",
35
- "_type_number": "_type_number_mw77c_gg_"
24
+ "__SInlineInput": "___SInlineInput_11ala_gg_",
25
+ "_disabled": "__disabled_11ala_gg_",
26
+ "__SUnderline": "___SUnderline_11ala_gg_",
27
+ "__SAddon": "___SAddon_11ala_gg_",
28
+ "_state_valid": "_state_valid_11ala_gg_",
29
+ "_state_invalid": "_state_invalid_11ala_gg_",
30
+ "__SValue": "___SValue_11ala_gg_",
31
+ "__SControls": "___SControls_11ala_gg_",
32
+ "__SInvalidPattern": "___SInvalidPattern_11ala_gg_",
33
+ "__SConfirmIcon": "___SConfirmIcon_11ala_gg_",
34
+ "_color": "__color_11ala_gg_",
35
+ "__SCancelIcon": "___SCancelIcon_11ala_gg_",
36
+ "_type_number": "_type_number_11ala_gg_"
36
37
  });
37
38
  const pointInsideOfRect = ({
38
39
  x,
@@ -1 +1 @@
1
- {"version":3,"file":"InlineInput.js","names":["_core","require","_baseComponents","_button","_i18nEnhance","_interopRequireDefault","_hasParent","_m","_m2","_inputNumber","_spin","_react","_intergalacticDynamicLocales","style","sstyled","insert","pointInsideOfRect","x","y","rect","width","height","InlineInputBase","Component","constructor","args","_defineProperty2","default","React","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","inputRef","current","value","min","stepUp","max","stepDown","preventDefault","focus","text","asProps","onConfirm","prevText","onCancel","onBlurBehavior","Date","now","hasParent","relatedTarget","rootRef","getBoundingClientRect","initValue","key","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","loading","getI18nText","handleConfirm","getCancelControlProps","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","Box","SUnderline","SInvalidPattern","InvalidStateBox","Children","styles","createElement","cn","assignProps","handleBlur","i18nEnhance","localizedMessages","i18n","Value","uncontrolledProps","target","_ref2","_ref9","SValue","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","ConfirmControl","_ref4","_ref10","children","hasChildren","title","useCallback","handleKeydown","stopPropagation","_ref1","sstyles","sConfirmIconStyles","ButtonLink","icon","CheckM","className","CancelControl","_ref5","_ref12","_ref11","sCancelIconStyles","CloseM","NumberValue","_ref6","_ref13","InputNumber","NumberControls","_ref7","_ref14","SControls","Controls","InlineInput","createComponent","_default","exports"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { Box, InvalidStateBox } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\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 { TooltipProps } 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?: TooltipProps;\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 inputRef?: React.RefObject<HTMLInputElement>;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\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 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 inputRef: this.inputRef,\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 };\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 };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\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, [], { value: any }> {\n static defaultProps = {\n defaultValue: '',\n };\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\nfunction Addon(props: AddonAsProps) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n}\n\nfunction ConfirmControl(props: ConfirmControlAsProps) {\n const SAddon = Root;\n const { Children, children: hasChildren, inputRef } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(inputRef?.current?.value ?? '', event);\n },\n [props.onConfirm, inputRef?.current],\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}\n\nfunction CancelControl(props: CancelControlAsProps) {\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\nfunction NumberValue(props: NumberValueAsProps) {\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":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,EAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,GAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,YAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,KAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAEA,IAAAU,MAAA,GAAAN,sBAAA,CAAAJ,OAAA;AAIA,IAAAW,4BAAA,GAAAX,OAAA;AAAmF;AAAA,MAAAY,KAAA,8BAAAb,KAAA,CAAAc,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAgEnF,MAAMC,iBAAiB,GAAGA,CAAC;EACzBC,CAAC;EACDC,CAAC;EACDC;AAKF,CAAC,KAAK;EACJ,OAAOF,CAAC,IAAIE,IAAI,CAACF,CAAC,IAAIA,CAAC,IAAIE,IAAI,CAACF,CAAC,GAAGE,IAAI,CAACC,KAAK,IAAIF,CAAC,IAAIC,IAAI,CAACD,CAAC,IAAIA,CAAC,IAAIC,IAAI,CAACD,CAAC,GAAGC,IAAI,CAACE,MAAM;AAC5F,CAAC;AAED,MAAMC,eAAe,SAASC,eAAS,CAAc;EAAAC,YAAA,GAAAC,I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AyB,EAAE;EAAA,IAAA4B,KAAA,GAAA1B,YAAA;IAAA2B,MAAA;EAC9C,MAAMhC,MAAM,GAEiCiC,oBAAW,CAACtC,KAAK;EAA9D,OAAAqC,MAAA,GAAO,IAAAtI,aAAO,EAACyG,KAAK,CAAChB,MAAM,CAAC,eAAC5F,MAAA,CAAAgB,OAAA,CAAA6E,aAAA,CAACY,MAAM,EAAAgC,MAAA,CAAA3C,EAAA;IAAA,OAAAzG,KAAA,CAAA0G,WAAA,MAAAyC,KAAA;EAAA,EAA6B,CAAC;AACpE;AAAC;AAED,SAASG,cAAcA,CAAC/B,KAA4B,EAAE;EAAA,IAAAgC,KAAA,GAAA9B,YAAA;IAAA+B,MAAA;EACpD,MAAMC,SAAS,GAGMJ,oBAAW,CAACK,QAAQ;EADzC,OAAAF,MAAA,GAAO,IAAA1I,aAAO,EAACyG,KAAK,CAAChB,MAAM,CAAC,eAC1B5F,MAAA,CAAAgB,OAAA,CAAA6E,aAAA,CAACiD,SAAS,EAAAD,MAAA,CAAA/C,EAAA;IAAA,OAAAzG,KAAA,CAAA0G,WAAA;MAAA,OAAoCiD,WAAW,CAACrC;IAAK,GAAAiC,KAAA;EAAA,EAAG,CAAC;AAEvE;;AAEA;AACA,MAAMI,WAAW,GAAG,IAAAC,qBAAe,EAACtI,eAAe,EAAE;EACnDgG,KAAK;EACLP,KAAK;EACLa,cAAc;EACdgB,aAAa;EACbM,WAAW;EACXI;AACF,CAAC,CAAyB;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAnI,OAAA,GAEZgI,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"InlineInput.js","names":["_core","require","_baseComponents","_button","_i18nEnhance","_interopRequireDefault","_hasParent","_m","_m2","_inputNumber","_spin","_react","_intergalacticDynamicLocales","style","sstyled","insert","pointInsideOfRect","x","y","rect","width","height","InlineInputBase","Component","constructor","args","_defineProperty2","default","React","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","inputRef","current","value","min","stepUp","max","stepDown","preventDefault","focus","text","asProps","onConfirm","prevText","onCancel","onBlurBehavior","Date","now","hasParent","relatedTarget","rootRef","getBoundingClientRect","initValue","key","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","loading","getI18nText","handleConfirm","getCancelControlProps","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","Box","SUnderline","SInvalidPattern","InvalidStateBox","Children","styles","createElement","cn","assignProps","handleBlur","i18nEnhance","localizedMessages","i18n","Value","uncontrolledProps","target","_ref2","_ref9","SValue","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","ConfirmControl","_ref4","_ref10","children","hasChildren","title","useCallback","handleKeydown","stopPropagation","_ref1","sstyles","sConfirmIconStyles","ButtonLink","icon","CheckM","className","CancelControl","_ref5","_ref12","_ref11","sCancelIconStyles","CloseM","NumberValue","_ref6","_ref13","InputNumber","NumberControls","_ref7","_ref14","SControls","Controls","InlineInput","createComponent","_default","exports"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { Box, InvalidStateBox } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\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 { TooltipProps } 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?: TooltipProps;\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 inputRef?: React.RefObject<HTMLInputElement>;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\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 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 inputRef: this.inputRef,\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 };\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 };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\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, [], { value: any }> {\n static defaultProps = {\n defaultValue: '',\n };\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\nfunction Addon(props: AddonAsProps) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n}\n\nfunction ConfirmControl(props: ConfirmControlAsProps) {\n const SAddon = Root;\n const { Children, children: hasChildren, inputRef } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(inputRef?.current?.value ?? '', event);\n },\n [props.onConfirm, inputRef?.current],\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}\n\nfunction CancelControl(props: CancelControlAsProps) {\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\nfunction NumberValue(props: NumberValueAsProps) {\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":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,EAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,GAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,YAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,KAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAEA,IAAAU,MAAA,GAAAN,sBAAA,CAAAJ,OAAA;AAIA,IAAAW,4BAAA,GAAAX,OAAA;AAAmF;AAAA,MAAAY,KAAA,8BAAAb,KAAA,CAAAc,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAgEnF,MAAMC,iBAAiB,GAAGA,CAAC;EACzBC,CAAC;EACDC,CAAC;EACDC;AAKF,CAAC,KAAK;EACJ,OAAOF,CAAC,IAAIE,IAAI,CAACF,CAAC,IAAIA,CAAC,IAAIE,IAAI,CAACF,CAAC,GAAGE,IAAI,CAACC,KAAK,IAAIF,CAAC,IAAIC,IAAI,CAACD,CAAC,IAAIA,CAAC,IAAIC,IAAI,CAACD,CAAC,GAAGC,IAAI,CAACE,MAAM;AAC5F,CAAC;AAED,MAAMC,eAAe,SAASC,eAAS,CAAc;EAAAC,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,gCAazCC,cAAK,CAACC,SAAS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AEiCiC,oBAAW,CAACtC,KAAK;EAA9D,OAAAqC,MAAA,GAAO,IAAAtI,aAAO,EAACyG,KAAK,CAAChB,MAAM,CAAC,eAAC5F,MAAA,CAAAgB,OAAA,CAAA6E,aAAA,CAACY,MAAM,EAAAgC,MAAA,CAAA3C,EAAA;IAAA,OAAAzG,KAAA,CAAA0G,WAAA,MAAAyC,KAAA;EAAA,EAA6B,CAAC;AACpE;AAAC;AAED,SAASG,cAAcA,CAAC/B,KAA4B,EAAE;EAAA,IAAAgC,KAAA,GAAA9B,YAAA;IAAA+B,MAAA;EACpD,MAAMC,SAAS,GAGMJ,oBAAW,CAACK,QAAQ;EADzC,OAAAF,MAAA,GAAO,IAAA1I,aAAO,EAACyG,KAAK,CAAChB,MAAM,CAAC,eAC1B5F,MAAA,CAAAgB,OAAA,CAAA6E,aAAA,CAACiD,SAAS,EAAAD,MAAA,CAAA/C,EAAA;IAAA,OAAAzG,KAAA,CAAA0G,WAAA;MAAA,OAAoCiD,WAAW,CAACrC;IAAK,GAAAiC,KAAA;EAAA,EAAG,CAAC;AAEvE;;AAEA;AACA,MAAMI,WAAW,GAAG,IAAAC,qBAAe,EAACtI,eAAe,EAAE;EACnDgG,KAAK;EACLP,KAAK;EACLa,cAAc;EACdgB,aAAa;EACbM,WAAW;EACXI;AACF,CAAC,CAAyB;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAnI,OAAA,GAEZgI,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_InlineInput","_interopRequireDefault","require","_default","exports","default","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,CAAAC,OAAA,GAE7BC,oBAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_InlineInput","_interopRequireDefault","require","_default","exports","default","InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import type { InlineInputProps, InlineInputValueProps } from './index.type';\nimport InlineInputBase from './InlineInput';\n\nexport default InlineInputBase;\n\nexport type { InlineInputProps, InlineInputValueProps };\n"],"mappings":";;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE7BC,oBAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.type.js","names":[],"sources":["../../src/index.type.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\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 /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type InlineInputAddonProps = BoxProps & {};\n\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\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\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
+ {"version":3,"file":"index.type.js","names":[],"sources":["../../src/index.type.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\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 * 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 /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type InlineInputAddonProps = BoxProps & {};\n\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 * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n\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\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":[]}
@@ -12,21 +12,21 @@ SInlineInput {
12
12
 
13
13
  background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
14
14
 
15
- SConfirmIcon {
15
+ SConfirmIcon:not([color]) {
16
16
  color: var(--intergalactic-icon-secondary-success, #00c192);
17
17
  cursor: pointer;
18
18
  }
19
19
 
20
- SConfirmIcon:hover {
20
+ SConfirmIcon:not([color]):hover {
21
21
  color: var(--intergalactic-icon-secondary-success-hover-active, #049B75);
22
22
  }
23
23
 
24
- SCancelIcon {
24
+ SCancelIcon:not([color]) {
25
25
  color: var(--intergalactic-icon-secondary-neutral, #a9abb6);
26
26
  cursor: pointer;
27
27
  }
28
28
 
29
- SCancelIcon:hover {
29
+ SCancelIcon:not([color]):hover {
30
30
  color: var(--intergalactic-icon-secondary-neutral-hover-active, #878992);
31
31
  }
32
32
 
@@ -20,21 +20,22 @@ import InputNumber from '@semcore/input-number';
20
20
  import Spin from '@semcore/spin';
21
21
  import React from 'react';
22
22
  /*!__reshadow-styles__:"./style/inline-input.shadow.css"*/
23
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SInlineInput_mw77c_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus-visible{outline:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_.__disabled_mw77c_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-inner-spin-button,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_._type_number_mw77c_gg_{-moz-appearance:textfield}.___SUnderline_mw77c_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_mw77c_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_mw77c_gg_.__disabled_mw77c_gg_,.___SInlineInput_mw77c_gg_.__disabled_mw77c_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_mw77c_gg_:focus~.___SControls_mw77c_gg_{display:flex}.___SInvalidPattern_mw77c_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}", /*__inner_css_end__*/"mw77c_gg_"),
23
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SInlineInput_11ala_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_11ala_gg_ .___SConfirmIcon_11ala_gg_:not(.__color_11ala_gg_){color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_11ala_gg_ .___SConfirmIcon_11ala_gg_:not(.__color_11ala_gg_):hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_11ala_gg_ .___SCancelIcon_11ala_gg_:not(.__color_11ala_gg_){color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_11ala_gg_ .___SCancelIcon_11ala_gg_:not(.__color_11ala_gg_):hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_:focus,.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_:focus-visible{outline:0}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_.__disabled_11ala_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-webkit-inner-spin-button,.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_._type_number_11ala_gg_{-moz-appearance:textfield}.___SUnderline_11ala_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_11ala_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_11ala_gg_.__disabled_11ala_gg_,.___SInlineInput_11ala_gg_.__disabled_11ala_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_11ala_gg_._state_valid_11ala_gg_ .___SUnderline_11ala_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_11ala_gg_._state_valid_11ala_gg_ .___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_11ala_gg_._state_invalid_11ala_gg_ .___SUnderline_11ala_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_11ala_gg_._state_invalid_11ala_gg_ .___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_11ala_gg_:focus~.___SControls_11ala_gg_{display:flex}.___SInvalidPattern_11ala_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}", /*__inner_css_end__*/"11ala_gg_"),
24
24
  /*__reshadow_css_end__*/
25
25
  {
26
- "__SInlineInput": "___SInlineInput_mw77c_gg_",
27
- "_disabled": "__disabled_mw77c_gg_",
28
- "__SUnderline": "___SUnderline_mw77c_gg_",
29
- "__SAddon": "___SAddon_mw77c_gg_",
30
- "_state_valid": "_state_valid_mw77c_gg_",
31
- "_state_invalid": "_state_invalid_mw77c_gg_",
32
- "__SValue": "___SValue_mw77c_gg_",
33
- "__SControls": "___SControls_mw77c_gg_",
34
- "__SInvalidPattern": "___SInvalidPattern_mw77c_gg_",
35
- "__SConfirmIcon": "___SConfirmIcon_mw77c_gg_",
36
- "__SCancelIcon": "___SCancelIcon_mw77c_gg_",
37
- "_type_number": "_type_number_mw77c_gg_"
26
+ "__SInlineInput": "___SInlineInput_11ala_gg_",
27
+ "_disabled": "__disabled_11ala_gg_",
28
+ "__SUnderline": "___SUnderline_11ala_gg_",
29
+ "__SAddon": "___SAddon_11ala_gg_",
30
+ "_state_valid": "_state_valid_11ala_gg_",
31
+ "_state_invalid": "_state_invalid_11ala_gg_",
32
+ "__SValue": "___SValue_11ala_gg_",
33
+ "__SControls": "___SControls_11ala_gg_",
34
+ "__SInvalidPattern": "___SInvalidPattern_11ala_gg_",
35
+ "__SConfirmIcon": "___SConfirmIcon_11ala_gg_",
36
+ "_color": "__color_11ala_gg_",
37
+ "__SCancelIcon": "___SCancelIcon_11ala_gg_",
38
+ "_type_number": "_type_number_11ala_gg_"
38
39
  });
39
40
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
40
41
  const pointInsideOfRect = ({
@@ -1 +1 @@
1
- {"version":3,"file":"InlineInput.js","names":["Box","InvalidStateBox","ButtonLink","createComponent","Component","sstyled","Root","i18nEnhance","hasParent","CheckM","CloseM","InputNumber","Spin","React","style","_sstyled","insert","localizedMessages","pointInsideOfRect","x","y","rect","width","height","InlineInputBase","constructor","args","_defineProperty","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","inputRef","current","value","min","stepUp","max","stepDown","preventDefault","focus","text","asProps","onConfirm","prevText","onCancel","onBlurBehavior","Date","now","relatedTarget","rootRef","getBoundingClientRect","initValue","key","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","loading","getI18nText","handleConfirm","getCancelControlProps","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","SUnderline","SInvalidPattern","Children","styles","createElement","cn","_assignProps","handleBlur","i18n","Value","uncontrolledProps","target","_ref2","_ref9","SValue","_assignProps2","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","_assignProps3","ConfirmControl","_ref4","_ref10","children","hasChildren","title","useCallback","handleKeydown","stopPropagation","_ref1","_assignProps4","sstyles","sConfirmIconStyles","_assignProps5","icon","className","CancelControl","_ref5","_ref12","_ref11","_assignProps6","sCancelIconStyles","_assignProps7","NumberValue","_ref6","_ref13","_assignProps8","NumberControls","_ref7","_ref14","SControls","Controls","_assignProps9","InlineInput"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { Box, InvalidStateBox } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\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 { TooltipProps } 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?: TooltipProps;\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 inputRef?: React.RefObject<HTMLInputElement>;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\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 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 inputRef: this.inputRef,\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 };\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 };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\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, [], { value: any }> {\n static defaultProps = {\n defaultValue: '',\n };\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\nfunction Addon(props: AddonAsProps) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n}\n\nfunction ConfirmControl(props: ConfirmControlAsProps) {\n const SAddon = Root;\n const { Children, children: hasChildren, inputRef } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(inputRef?.current?.value ?? '', event);\n },\n [props.onConfirm, inputRef?.current],\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}\n\nfunction CancelControl(props: CancelControlAsProps) {\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\nfunction NumberValue(props: NumberValueAsProps) {\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,GAAG,EAAEC,eAAe,QAAQ,0BAA0B;AAC/D,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,MAAM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AmC,MAAA,CAAA5C,EAAA;IAAA,GAAA6C,aAAA,KAAAF,KAAA;EAAA,EAA6B,CAAC;AACpE;AAAC;AAED,SAASG,cAAcA,CAACjC,KAA4B,EAAE;EAAA,IAAAkC,KAAA,GAAAhC,YAAA;IAAAiC,MAAA;EACpD,MAAMC,SAAS,GAGM3I,WAAW,CAAC4I,QAAQ;EADzC,OAAAF,MAAA,GAAOhJ,OAAO,CAAC6G,KAAK,CAACf,MAAM,CAAC,eAC1BtF,KAAA,CAAAuF,aAAA,CAACkD,SAAS,EAAAD,MAAA,CAAAhD,EAAA;IAAA,GAAAmD,aAAA;MAAA,OAAoCC,WAAW,CAACxC;IAAK,GAAAmC,KAAA;EAAA,EAAG,CAAC;AAEvE;;AAEA;AACA,MAAMK,WAAW,GAAGtJ,eAAe,CAACqB,eAAe,EAAE;EACnDyF,KAAK;EACLR,KAAK;EACLe,cAAc;EACdgB,aAAa;EACbO,WAAW;EACXI;AACF,CAAC,CAAyB;AAE1B,eAAeM,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"InlineInput.js","names":["Box","InvalidStateBox","ButtonLink","createComponent","Component","sstyled","Root","i18nEnhance","hasParent","CheckM","CloseM","InputNumber","Spin","React","style","_sstyled","insert","localizedMessages","pointInsideOfRect","x","y","rect","width","height","InlineInputBase","constructor","args","_defineProperty","createRef","event","lastMouseDownPosition","clientX","clientY","lastHandledKeyboardEvent","inputRef","current","value","min","stepUp","max","stepDown","preventDefault","focus","text","asProps","onConfirm","prevText","onCancel","onBlurBehavior","Date","now","relatedTarget","rootRef","getBoundingClientRect","initValue","key","componentDidMount","updateInert","document","body","addEventListener","handleDocumentMouseDown","handleDocumentKeyDown","componentDidUpdate","prevProps","disabled","componentWillUnmount","removeEventListener","getAddonProps","onMouseDown","handleMouseDownAddon","getConfirmControlProps","loading","getI18nText","handleConfirm","getCancelControlProps","handleCancel","getValueProps","state","ref","onKeyDown","handleKeyDown","getNumberValueProps","numberFormatter","Intl","NumberFormat","locale","increment","decrement","getNumberControlsProps","setAttribute","removeAttribute","render","_ref","_ref8","SInlineInput","SUnderline","SInvalidPattern","Children","styles","createElement","cn","_assignProps","handleBlur","i18n","Value","uncontrolledProps","target","_ref2","_ref9","SValue","_assignProps2","defaultValue","Addon","props","_ref3","arguments[0]","_ref0","SAddon","_assignProps3","ConfirmControl","_ref4","_ref10","children","hasChildren","title","useCallback","handleKeydown","stopPropagation","_ref1","_assignProps4","sstyles","sConfirmIconStyles","_assignProps5","icon","className","CancelControl","_ref5","_ref12","_ref11","_assignProps6","sCancelIconStyles","_assignProps7","NumberValue","_ref6","_ref13","_assignProps8","NumberControls","_ref7","_ref14","SControls","Controls","_assignProps9","InlineInput"],"sources":["../../src/InlineInput.tsx"],"sourcesContent":["import { Box, InvalidStateBox } from '@semcore/base-components';\nimport { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\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 { TooltipProps } 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?: TooltipProps;\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 inputRef?: React.RefObject<HTMLInputElement>;\n};\ntype CancelControlAsProps = ControlAsProps & {\n onCancel?: OnCancel;\n};\ntype NumberValueAsProps = InputNumberValueProps & {\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 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 inputRef: this.inputRef,\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 };\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 };\n\n getNumberValueProps() {\n const numberFormatter = new Intl.NumberFormat(this.asProps.locale, { style: 'decimal' });\n\n return {\n numberFormatter,\n inputRef: this.inputRef,\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, [], { value: any }> {\n static defaultProps = {\n defaultValue: '',\n };\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\nfunction Addon(props: AddonAsProps) {\n const SAddon = Root;\n return sstyled(props.styles)(<SAddon render={Box} />) as React.ReactElement;\n}\n\nfunction ConfirmControl(props: ConfirmControlAsProps) {\n const SAddon = Root;\n const { Children, children: hasChildren, inputRef } = props;\n const title = props.title ?? props.getI18nText('confirm');\n\n const handleConfirm = React.useCallback(\n (event: React.MouseEvent | React.KeyboardEvent) => {\n props.onConfirm?.(inputRef?.current?.value ?? '', event);\n },\n [props.onConfirm, inputRef?.current],\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}\n\nfunction CancelControl(props: CancelControlAsProps) {\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\nfunction NumberValue(props: NumberValueAsProps) {\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,GAAG,EAAEC,eAAe,QAAQ,0BAA0B;AAC/D,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8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MAAA,GAAO5I,OAAO,CAAC6G,KAAK,CAACf,MAAM,CAAC,eAACtF,KAAA,CAAAuF,aAAA,CAACU,MAAM,EAAAmC,MAAA,CAAA5C,EAAA;IAAA,GAAA6C,aAAA,KAAAF,KAAA;EAAA,EAA6B,CAAC;AACpE;AAAC;AAED,SAASG,cAAcA,CAACjC,KAA4B,EAAE;EAAA,IAAAkC,KAAA,GAAAhC,YAAA;IAAAiC,MAAA;EACpD,MAAMC,SAAS,GAGM3I,WAAW,CAAC4I,QAAQ;EADzC,OAAAF,MAAA,GAAOhJ,OAAO,CAAC6G,KAAK,CAACf,MAAM,CAAC,eAC1BtF,KAAA,CAAAuF,aAAA,CAACkD,SAAS,EAAAD,MAAA,CAAAhD,EAAA;IAAA,GAAAmD,aAAA;MAAA,OAAoCC,WAAW,CAACxC;IAAK,GAAAmC,KAAA;EAAA,EAAG,CAAC;AAEvE;;AAEA;AACA,MAAMK,WAAW,GAAGtJ,eAAe,CAACqB,eAAe,EAAE;EACnDyF,KAAK;EACLR,KAAK;EACLe,cAAc;EACdgB,aAAa;EACbO,WAAW;EACXI;AACF,CAAC,CAAyB;AAE1B,eAAeM,WAAW","ignoreList":[]}
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"file":"index.js","names":["InlineInputBase"],"sources":["../../src/index.ts"],"sourcesContent":["import type { InlineInputProps, InlineInputValueProps } from './index.type';\nimport InlineInputBase from './InlineInput';\n\nexport default InlineInputBase;\n\nexport type { InlineInputProps, InlineInputValueProps };\n"],"mappings":"AACA,OAAOA,eAAe,MAAM,eAAe;AAE3C,eAAeA,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.type.js","names":[],"sources":["../../src/index.type.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\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 /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type InlineInputAddonProps = BoxProps & {};\n\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\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\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
+ {"version":3,"file":"index.type.js","names":[],"sources":["../../src/index.type.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { ButtonLinkComponent } from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { InputNumberControlsProps } from '@semcore/input-number';\nimport type React from 'react';\n\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 * 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 /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type InlineInputAddonProps = BoxProps & {};\n\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 * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n\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\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":[]}
@@ -12,21 +12,21 @@ SInlineInput {
12
12
 
13
13
  background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
14
14
 
15
- SConfirmIcon {
15
+ SConfirmIcon:not([color]) {
16
16
  color: var(--intergalactic-icon-secondary-success, #00c192);
17
17
  cursor: pointer;
18
18
  }
19
19
 
20
- SConfirmIcon:hover {
20
+ SConfirmIcon:not([color]):hover {
21
21
  color: var(--intergalactic-icon-secondary-success-hover-active, #049B75);
22
22
  }
23
23
 
24
- SCancelIcon {
24
+ SCancelIcon:not([color]) {
25
25
  color: var(--intergalactic-icon-secondary-neutral, #a9abb6);
26
26
  cursor: pointer;
27
27
  }
28
28
 
29
- SCancelIcon:hover {
29
+ SCancelIcon:not([color]):hover {
30
30
  color: var(--intergalactic-icon-secondary-neutral-hover-active, #878992);
31
31
  }
32
32
 
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
2
+ import { sstyled, createComponent, Component, assignProps } from "@semcore/core";
3
3
  import { Box, InvalidStateBox } from "@semcore/base-components";
4
4
  import { ButtonLink } from "@semcore/button";
5
5
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
@@ -15,23 +15,24 @@ const style = (
15
15
  /*__reshadow_css_start__*/
16
16
  (sstyled.insert(
17
17
  /*__inner_css_start__*/
18
- ".___SInlineInput_mw77c_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SConfirmIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_mw77c_gg_ .___SCancelIcon_mw77c_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_:focus-visible{outline:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_.__disabled_mw77c_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-inner-spin-button,.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_mw77c_gg_ .___SValue_mw77c_gg_._type_number_mw77c_gg_{-moz-appearance:textfield}.___SUnderline_mw77c_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_mw77c_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_mw77c_gg_.__disabled_mw77c_gg_,.___SInlineInput_mw77c_gg_.__disabled_mw77c_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_mw77c_gg_._state_valid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_mw77c_gg_._state_invalid_mw77c_gg_ .___SUnderline_mw77c_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_mw77c_gg_:focus~.___SControls_mw77c_gg_{display:flex}.___SInvalidPattern_mw77c_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}",
18
+ ".___SInlineInput_11ala_gg_{display:inline-flex;width:100%;height:100%;align-items:center;position:relative;z-index:0;vertical-align:middle;padding:1px;box-sizing:border-box;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SInlineInput_11ala_gg_ .___SConfirmIcon_11ala_gg_:not(.__color_11ala_gg_){color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SInlineInput_11ala_gg_ .___SConfirmIcon_11ala_gg_:not(.__color_11ala_gg_):hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SInlineInput_11ala_gg_ .___SCancelIcon_11ala_gg_:not(.__color_11ala_gg_){color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SInlineInput_11ala_gg_ .___SCancelIcon_11ala_gg_:not(.__color_11ala_gg_):hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_{min-width:0;width:100%;height:100%;padding:0 var(--intergalactic-spacing-1x, 4px);border:0;box-sizing:border-box;color:var(--intergalactic-text-primary, #191b23);font-size:inherit;line-height:1.2;text-overflow:ellipsis;font-family:inherit;background:0 0;min-height:1em}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_:focus,.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_:focus-visible{outline:0}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_.__disabled_11ala_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-webkit-inner-spin-button,.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SInlineInput_11ala_gg_ .___SValue_11ala_gg_._type_number_11ala_gg_{-moz-appearance:textfield}.___SUnderline_11ala_gg_{display:flex;flex-direction:row;align-items:center;flex-grow:1;width:100%;height:100%;min-height:1em;border:1px solid transparent;border-bottom:1px solid var(--intergalactic-border-primary, #c4c7cf)}.___SAddon_11ala_gg_{display:inline-flex;justify-content:center;align-items:center;flex:0 0 auto;height:100%;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);padding:0 var(--intergalactic-spacing-1x, 4px)}.___SAddon_11ala_gg_.__disabled_11ala_gg_,.___SInlineInput_11ala_gg_.__disabled_11ala_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-info-active, #006dca);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SInlineInput_11ala_gg_._state_valid_11ala_gg_ .___SUnderline_11ala_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_11ala_gg_._state_valid_11ala_gg_ .___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-success-active, #007c65);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-valid-outline, #009f81)}.___SInlineInput_11ala_gg_._state_invalid_11ala_gg_ .___SUnderline_11ala_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_11ala_gg_._state_invalid_11ala_gg_ .___SUnderline_11ala_gg_:has(input:focus-visible){border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;outline-color:var(--intergalactic-keyboard-focus-invalid-outline, #ff4953)}.___SValue_11ala_gg_:focus~.___SControls_11ala_gg_{display:flex}.___SInvalidPattern_11ala_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}",
19
19
  /*__inner_css_end__*/
20
- "mw77c_gg_"
20
+ "11ala_gg_"
21
21
  ), /*__reshadow_css_end__*/
22
22
  {
23
- "__SInlineInput": "___SInlineInput_mw77c_gg_",
24
- "_disabled": "__disabled_mw77c_gg_",
25
- "__SUnderline": "___SUnderline_mw77c_gg_",
26
- "__SAddon": "___SAddon_mw77c_gg_",
27
- "_state_valid": "_state_valid_mw77c_gg_",
28
- "_state_invalid": "_state_invalid_mw77c_gg_",
29
- "__SValue": "___SValue_mw77c_gg_",
30
- "__SControls": "___SControls_mw77c_gg_",
31
- "__SInvalidPattern": "___SInvalidPattern_mw77c_gg_",
32
- "__SConfirmIcon": "___SConfirmIcon_mw77c_gg_",
33
- "__SCancelIcon": "___SCancelIcon_mw77c_gg_",
34
- "_type_number": "_type_number_mw77c_gg_"
23
+ "__SInlineInput": "___SInlineInput_11ala_gg_",
24
+ "_disabled": "__disabled_11ala_gg_",
25
+ "__SUnderline": "___SUnderline_11ala_gg_",
26
+ "__SAddon": "___SAddon_11ala_gg_",
27
+ "_state_valid": "_state_valid_11ala_gg_",
28
+ "_state_invalid": "_state_invalid_11ala_gg_",
29
+ "__SValue": "___SValue_11ala_gg_",
30
+ "__SControls": "___SControls_11ala_gg_",
31
+ "__SInvalidPattern": "___SInvalidPattern_11ala_gg_",
32
+ "__SConfirmIcon": "___SConfirmIcon_11ala_gg_",
33
+ "_color": "__color_11ala_gg_",
34
+ "__SCancelIcon": "___SCancelIcon_11ala_gg_",
35
+ "_type_number": "_type_number_11ala_gg_"
35
36
  })
36
37
  );
37
38
  const pointInsideOfRect = ({
@@ -12,21 +12,21 @@ SInlineInput {
12
12
 
13
13
  background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
14
14
 
15
- SConfirmIcon {
15
+ SConfirmIcon:not([color]) {
16
16
  color: var(--intergalactic-icon-secondary-success, #00c192);
17
17
  cursor: pointer;
18
18
  }
19
19
 
20
- SConfirmIcon:hover {
20
+ SConfirmIcon:not([color]):hover {
21
21
  color: var(--intergalactic-icon-secondary-success-hover-active, #049B75);
22
22
  }
23
23
 
24
- SCancelIcon {
24
+ SCancelIcon:not([color]) {
25
25
  color: var(--intergalactic-icon-secondary-neutral, #a9abb6);
26
26
  cursor: pointer;
27
27
  }
28
28
 
29
- SCancelIcon:hover {
29
+ SCancelIcon:not([color]):hover {
30
30
  color: var(--intergalactic-icon-secondary-neutral-hover-active, #878992);
31
31
  }
32
32
 
@@ -1,4 +1,4 @@
1
- import type { InlineInputProps } from './index.type';
1
+ import type { InlineInputProps, InlineInputValueProps } from './index.type';
2
2
  import InlineInputBase from './InlineInput';
3
3
  export default InlineInputBase;
4
- export type { InlineInputProps };
4
+ export type { InlineInputProps, InlineInputValueProps };
@@ -27,23 +27,6 @@ export type InlineInputProps = BoxProps & {
27
27
  * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`
28
28
  */
29
29
  onCancel?: (prevValue: string, event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent) => void;
30
- /**
31
- * Text value of input. Should be used with `onChange` property together
32
- */
33
- value?: string;
34
- /**
35
- * Initial text value of input
36
- */
37
- defaultValue?: string;
38
- /**
39
- * Makes component to catch browser focus on component mount
40
- * @default false
41
- */
42
- autoFocus?: boolean;
43
- /**
44
- * Gray text displayed in empty input
45
- */
46
- placeholder?: string;
47
30
  /**
48
31
  * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired
49
32
  * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)
@@ -74,14 +57,6 @@ export type InlineInputValueProps = BoxProps & {
74
57
  * callback invoked on every change of input tag value
75
58
  */
76
59
  onChange?: (value: string, event: React.ChangeEvent) => void;
77
- /**
78
- * visual state of component
79
- */
80
- state?: 'normal' | 'valid' | 'invalid';
81
- /**
82
- * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements
83
- */
84
- loading?: boolean;
85
60
  /**
86
61
  * disables interactive elements
87
62
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/inline-input",
3
3
  "description": "Semrush Input Component",
4
- "version": "17.0.0-prerelease.29",
4
+ "version": "17.0.0-prerelease.31",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,19 +14,19 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/spin": "^17.0.0-prerelease.29",
18
- "@semcore/tooltip": "^17.0.0-prerelease.29",
19
- "@semcore/input-number": "^17.0.0-prerelease.29",
20
- "@semcore/input": "^17.0.0-prerelease.29",
21
- "@semcore/button": "^17.0.0-prerelease.29"
17
+ "@semcore/spin": "^17.0.0-prerelease.31",
18
+ "@semcore/tooltip": "^17.0.0-prerelease.31",
19
+ "@semcore/input-number": "^17.0.0-prerelease.31",
20
+ "@semcore/input": "^17.0.0-prerelease.31",
21
+ "@semcore/button": "^17.0.0-prerelease.31"
22
22
  },
23
23
  "devDependencies": {
24
- "@semcore/base-components": "17.0.0-prerelease.29",
24
+ "@semcore/core": "17.0.0-prerelease.31",
25
+ "@semcore/base-components": "17.0.0-prerelease.31",
25
26
  "@semcore/testing-utils": "1.0.0",
26
- "@semcore/spin": "17.0.0-prerelease.29",
27
- "@semcore/tooltip": "17.0.0-prerelease.29",
28
- "@semcore/core": "17.0.0-prerelease.29",
29
- "@semcore/icon": "16.7.2-prerelease.29"
27
+ "@semcore/spin": "17.0.0-prerelease.31",
28
+ "@semcore/tooltip": "17.0.0-prerelease.31",
29
+ "@semcore/icon": "16.7.2-prerelease.31"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@semcore/base-components": "^17.0.0 || ^17.0.0-0",