@semcore/inline-input 4.19.1 → 4.19.2
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 +7 -1
- package/lib/cjs/InlineInput.js +18 -18
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/InlineInput.js +18 -18
- package/lib/es6/index.d.js.map +1 -1
- package/lib/types/index.d.ts +2 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [4.19.
|
|
5
|
+
## [4.19.2-prerelease.1] - 2023-12-19
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version prepatch update due to children dependencies update (`@semcore/flex-box` [5.13.0 ~> 5.13.1], `@semcore/icon` [4.19.0 ~> 4.19.1], `@semcore/utils` [4.15.0 ~> 4.15.1], `@semcore/core` [2.12.0 ~> 2.12.1]).
|
|
10
|
+
|
|
11
|
+
## [4.19.1] - 2023-12-12
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
8
14
|
|
package/lib/cjs/InlineInput.js
CHANGED
|
@@ -27,24 +27,24 @@ var _input = _interopRequireDefault(require("@semcore/input"));
|
|
|
27
27
|
var _inputNumber = require("@semcore/input-number");
|
|
28
28
|
var _InvalidStatePattern = _interopRequireDefault(require("@semcore/utils/lib/components/invalid-state-pattern/InvalidStatePattern"));
|
|
29
29
|
/*__reshadow-styles__:"./style/inline-input.shadow.css"*/
|
|
30
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
31
|
-
"__SInlineInput": "
|
|
32
|
-
"_disabled": "
|
|
33
|
-
"__SUnderline": "
|
|
34
|
-
"__SAddon": "
|
|
35
|
-
"__SConfirmIcon": "
|
|
36
|
-
"__SCancelIcon": "
|
|
37
|
-
"_focused": "
|
|
38
|
-
"_state_valid": "
|
|
39
|
-
"_state_invalid": "
|
|
40
|
-
"__SValue": "
|
|
41
|
-
"__SControls": "
|
|
42
|
-
"_showControls": "
|
|
43
|
-
"__SUp": "
|
|
44
|
-
"__SDown": "
|
|
45
|
-
"__SValueHidden": "
|
|
46
|
-
"__SInvalidPattern": "
|
|
47
|
-
"_type_number": "
|
|
30
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SInlineInput_t0i0m_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_t0i0m_gg_.__disabled_t0i0m_gg_{cursor:default;pointer-events:none;opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SValue_t0i0m_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}.___SValue_t0i0m_gg_:focus{outline:0}.___SValue_t0i0m_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_t0i0m_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_t0i0m_gg_.__disabled_t0i0m_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_t0i0m_gg_::-webkit-inner-spin-button,.___SValue_t0i0m_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_t0i0m_gg_._type_number_t0i0m_gg_{-moz-appearance:textfield}.___SUnderline_t0i0m_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_t0i0m_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_t0i0m_gg_.__disabled_t0i0m_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SConfirmIcon_t0i0m_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SConfirmIcon_t0i0m_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SCancelIcon_t0i0m_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SCancelIcon_t0i0m_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_t0i0m_gg_.__focused_t0i0m_gg_{z-index:1}.___SInlineInput_t0i0m_gg_.__focused_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-info-active, #006dca);box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SInlineInput_t0i0m_gg_._state_valid_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_t0i0m_gg_._state_valid_t0i0m_gg_.__focused_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65);box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgba(0, 159, 129, 0.5))}.___SInlineInput_t0i0m_gg_._state_invalid_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_t0i0m_gg_._state_invalid_t0i0m_gg_.__focused_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SValue_t0i0m_gg_:focus~.___SControls_t0i0m_gg_{display:flex}.___SControls_t0i0m_gg_{display:none;flex-flow:column;justify-content:center;height:100%;box-sizing:border-box}.___SControls_t0i0m_gg_.__showControls_t0i0m_gg_{display:flex}.___SDown_t0i0m_gg_,.___SUp_t0i0m_gg_{padding:0;width:16px;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);box-sizing:border-box;display:inline-flex;justify-content:center;border:0;background:0 0;cursor:pointer}.___SDown_t0i0m_gg_:focus,.___SUp_t0i0m_gg_:focus{outline:0}@media (hover:hover){.___SDown_t0i0m_gg_:hover,.___SUp_t0i0m_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SUp_t0i0m_gg_{padding-bottom:1px}.___SDown_t0i0m_gg_{padding-top:1px}.___SValue_t0i0m_gg_.__disabled_t0i0m_gg_~.___SControls_t0i0m_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SValueHidden_t0i0m_gg_{position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden}.___SInvalidPattern_t0i0m_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}" /*__inner_css_end__*/, "t0i0m_gg_") /*__reshadow_css_end__*/, {
|
|
31
|
+
"__SInlineInput": "___SInlineInput_t0i0m_gg_",
|
|
32
|
+
"_disabled": "__disabled_t0i0m_gg_",
|
|
33
|
+
"__SUnderline": "___SUnderline_t0i0m_gg_",
|
|
34
|
+
"__SAddon": "___SAddon_t0i0m_gg_",
|
|
35
|
+
"__SConfirmIcon": "___SConfirmIcon_t0i0m_gg_",
|
|
36
|
+
"__SCancelIcon": "___SCancelIcon_t0i0m_gg_",
|
|
37
|
+
"_focused": "__focused_t0i0m_gg_",
|
|
38
|
+
"_state_valid": "_state_valid_t0i0m_gg_",
|
|
39
|
+
"_state_invalid": "_state_invalid_t0i0m_gg_",
|
|
40
|
+
"__SValue": "___SValue_t0i0m_gg_",
|
|
41
|
+
"__SControls": "___SControls_t0i0m_gg_",
|
|
42
|
+
"_showControls": "__showControls_t0i0m_gg_",
|
|
43
|
+
"__SUp": "___SUp_t0i0m_gg_",
|
|
44
|
+
"__SDown": "___SDown_t0i0m_gg_",
|
|
45
|
+
"__SValueHidden": "___SValueHidden_t0i0m_gg_",
|
|
46
|
+
"__SInvalidPattern": "___SInvalidPattern_t0i0m_gg_",
|
|
47
|
+
"_type_number": "_type_number_t0i0m_gg_"
|
|
48
48
|
});
|
|
49
49
|
var pointInsideOfRect = function pointInsideOfRect(_ref17) {
|
|
50
50
|
var x = _ref17.x,
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<'div', InlineInputConfirmControlProps, InlineInputProps>;\n CancelControl: Intergalactic.Component<'div', InlineInputCancelControlProps, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<'div', InlineInputConfirmControlProps, InlineInputProps>;\n CancelControl: Intergalactic.Component<'div', InlineInputCancelControlProps, InlineInputProps>;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', {}, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":""}
|
package/lib/es6/InlineInput.js
CHANGED
|
@@ -21,24 +21,24 @@ import { Box } from '@semcore/flex-box';
|
|
|
21
21
|
import autoFocusEnhance from '@semcore/utils/lib/enhances/autoFocusEnhance';
|
|
22
22
|
import Tooltip from '@semcore/tooltip';
|
|
23
23
|
/*__reshadow-styles__:"./style/inline-input.shadow.css"*/
|
|
24
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
25
|
-
"__SInlineInput": "
|
|
26
|
-
"_disabled": "
|
|
27
|
-
"__SUnderline": "
|
|
28
|
-
"__SAddon": "
|
|
29
|
-
"__SConfirmIcon": "
|
|
30
|
-
"__SCancelIcon": "
|
|
31
|
-
"_focused": "
|
|
32
|
-
"_state_valid": "
|
|
33
|
-
"_state_invalid": "
|
|
34
|
-
"__SValue": "
|
|
35
|
-
"__SControls": "
|
|
36
|
-
"_showControls": "
|
|
37
|
-
"__SUp": "
|
|
38
|
-
"__SDown": "
|
|
39
|
-
"__SValueHidden": "
|
|
40
|
-
"__SInvalidPattern": "
|
|
41
|
-
"_type_number": "
|
|
24
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SInlineInput_t0i0m_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_t0i0m_gg_.__disabled_t0i0m_gg_{cursor:default;pointer-events:none;opacity:var(--intergalactic-disabled-opacity, 0.3)}.___SValue_t0i0m_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}.___SValue_t0i0m_gg_:focus{outline:0}.___SValue_t0i0m_gg_::-moz-placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_t0i0m_gg_::placeholder{color:var(--intergalactic-text-placeholder, #8a8e9b)}.___SValue_t0i0m_gg_.__disabled_t0i0m_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SValue_t0i0m_gg_::-webkit-inner-spin-button,.___SValue_t0i0m_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_t0i0m_gg_._type_number_t0i0m_gg_{-moz-appearance:textfield}.___SUnderline_t0i0m_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_t0i0m_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_t0i0m_gg_.__disabled_t0i0m_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SConfirmIcon_t0i0m_gg_{color:var(--intergalactic-icon-secondary-success, #00c192);cursor:pointer}@media (hover:hover){.___SConfirmIcon_t0i0m_gg_:hover{color:var(--intergalactic-icon-secondary-success-hover-active, #049B75)}}.___SCancelIcon_t0i0m_gg_{color:var(--intergalactic-icon-secondary-neutral, #a9abb6);cursor:pointer}@media (hover:hover){.___SCancelIcon_t0i0m_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SInlineInput_t0i0m_gg_.__focused_t0i0m_gg_{z-index:1}.___SInlineInput_t0i0m_gg_.__focused_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-info-active, #006dca);box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SInlineInput_t0i0m_gg_._state_valid_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65)}.___SInlineInput_t0i0m_gg_._state_valid_t0i0m_gg_.__focused_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-success-active, #007c65);box-shadow:var(--intergalactic-keyboard-focus-valid, 0px 0px 0px 3px rgba(0, 159, 129, 0.5))}.___SInlineInput_t0i0m_gg_._state_invalid_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f)}.___SInlineInput_t0i0m_gg_._state_invalid_t0i0m_gg_.__focused_t0i0m_gg_ .___SUnderline_t0i0m_gg_{border-bottom-color:var(--intergalactic-border-critical-active, #d1002f);box-shadow:var(--intergalactic-keyboard-focus-invalid, 0px 0px 0px 3px rgba(255, 73, 83, 0.5))}.___SValue_t0i0m_gg_:focus~.___SControls_t0i0m_gg_{display:flex}.___SControls_t0i0m_gg_{display:none;flex-flow:column;justify-content:center;height:100%;box-sizing:border-box}.___SControls_t0i0m_gg_.__showControls_t0i0m_gg_{display:flex}.___SDown_t0i0m_gg_,.___SUp_t0i0m_gg_{padding:0;width:16px;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);box-sizing:border-box;display:inline-flex;justify-content:center;border:0;background:0 0;cursor:pointer}.___SDown_t0i0m_gg_:focus,.___SUp_t0i0m_gg_:focus{outline:0}@media (hover:hover){.___SDown_t0i0m_gg_:hover,.___SUp_t0i0m_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #878992)}}.___SUp_t0i0m_gg_{padding-bottom:1px}.___SDown_t0i0m_gg_{padding-top:1px}.___SValue_t0i0m_gg_.__disabled_t0i0m_gg_~.___SControls_t0i0m_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SValueHidden_t0i0m_gg_{position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden}.___SInvalidPattern_t0i0m_gg_{margin-left:-1px;margin-top:-1px;border-radius:0;height:calc(100% - 3px)}" /*__inner_css_end__*/, "t0i0m_gg_") /*__reshadow_css_end__*/, {
|
|
25
|
+
"__SInlineInput": "___SInlineInput_t0i0m_gg_",
|
|
26
|
+
"_disabled": "__disabled_t0i0m_gg_",
|
|
27
|
+
"__SUnderline": "___SUnderline_t0i0m_gg_",
|
|
28
|
+
"__SAddon": "___SAddon_t0i0m_gg_",
|
|
29
|
+
"__SConfirmIcon": "___SConfirmIcon_t0i0m_gg_",
|
|
30
|
+
"__SCancelIcon": "___SCancelIcon_t0i0m_gg_",
|
|
31
|
+
"_focused": "__focused_t0i0m_gg_",
|
|
32
|
+
"_state_valid": "_state_valid_t0i0m_gg_",
|
|
33
|
+
"_state_invalid": "_state_invalid_t0i0m_gg_",
|
|
34
|
+
"__SValue": "___SValue_t0i0m_gg_",
|
|
35
|
+
"__SControls": "___SControls_t0i0m_gg_",
|
|
36
|
+
"_showControls": "__showControls_t0i0m_gg_",
|
|
37
|
+
"__SUp": "___SUp_t0i0m_gg_",
|
|
38
|
+
"__SDown": "___SDown_t0i0m_gg_",
|
|
39
|
+
"__SValueHidden": "___SValueHidden_t0i0m_gg_",
|
|
40
|
+
"__SInvalidPattern": "___SInvalidPattern_t0i0m_gg_",
|
|
41
|
+
"_type_number": "_type_number_t0i0m_gg_"
|
|
42
42
|
});
|
|
43
43
|
import CheckM from '@semcore/icon/Check/m';
|
|
44
44
|
import CloseM from '@semcore/icon/Close/m';
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<'div', InlineInputConfirmControlProps, InlineInputProps>;\n CancelControl: Intergalactic.Component<'div', InlineInputCancelControlProps, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IInlineInputProps extends InlineInputProps, UnknownProperties {}\nexport type InlineInputProps = BoxProps & {\n /**\n * Visual state of inline input\n * @default normal\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disabled input and shows spinner instead of confirm control\n * @default false\n */\n loading?: boolean;\n /**\n * Disabled input and controls\n * @default false\n */\n disabled?: boolean;\n /**\n * Fired with entered value when user clicks confirm control or hits `Enter` or `Space`\n */\n onConfirm?: (\n value: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Fired with value (or defaultValue) that was provided during component mount when user clicks cancel control or hits `Escape`\n */\n onCancel?: (\n prevValue: string,\n event: React.MouseEvent | React.FocusEvent | React.KeyboardEvent,\n ) => void;\n /**\n * Text value of input. Should be used with `onChange` property together\n */\n value?: string;\n /**\n * Initial text value of input\n */\n defaultValue?: string;\n /**\n * Makes component to catch browser focus on component mount\n * @default false\n */\n autoFocus?: boolean;\n /**\n * Gray text displayed in empty input\n */\n placeholder?: string;\n /**\n * defines callback (`onCancel` or `onConfirm`) triggered when `blur` event out of container fired\n * Triggered after all previous macrotasks completed (internally called inside of `setTimeout`)\n */\n onBlurBehavior?: 'cancel' | 'confirm';\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IInlineInputAddonProps extends InlineInputAddonProps, UnknownProperties {}\nexport type InlineInputAddonProps = BoxProps & {};\n/** @deprecated */\nexport interface IInlineInputValueProps extends InlineInputValueProps, UnknownProperties {}\nexport type InlineInputValueProps = BoxProps & {\n /**\n * id attribute of input tag\n */\n id?: string;\n /**\n * when `true`, element is focused immediately after mount\n */\n autoFocus?: boolean;\n /**\n * value of input tag\n */\n value?: string;\n /**\n * uncontrolled value of input tag\n */\n defaultValue?: string;\n /**\n * callback invoked on every change of input tag value\n */\n onChange?: (value: string, event: React.ChangeEvent) => void;\n /**\n * visual state of component\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * shows spinner in `InlineInput.ConfirmControl` and disables other interactive elements\n */\n loading?: boolean;\n /**\n * disables interactive elements\n */\n disabled?: boolean;\n /**\n * gray text in empty input tag\n */\n placeholder?: string;\n};\n/** @deprecated */\nexport interface IInlineInputConfirmControlProps\n extends InlineInputConfirmControlProps,\n UnknownProperties {}\nexport type InlineInputConfirmControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Confirm\n */\n title?: string;\n /**\n * Icon component\n * @default CheckM\n */\n icon?: React.FC;\n};\n/** @deprecated */\nexport interface IInlineInputCancelControlProps\n extends InlineInputCancelControlProps,\n UnknownProperties {}\nexport type InlineInputCancelControlProps = BoxProps & {\n /**\n * Text of tooltip\n * @default Cancel\n */\n title?: string;\n /**\n * Icon component\n * @default CloseM\n */\n icon?: React.FC;\n};\n\ntype InlineInputCtx = {\n getAddonProps: PropGetterFn;\n getConfirmControlProps: PropGetterFn;\n getCancelControlProps: PropGetterFn;\n getValueProps: PropGetterFn;\n};\n\ndeclare const InlineInput: Intergalactic.Component<'div', InlineInputProps, InlineInputCtx> & {\n Addon: Intergalactic.Component<'div', InlineInputAddonProps, InlineInputProps>;\n Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;\n ConfirmControl: Intergalactic.Component<'div', InlineInputConfirmControlProps, InlineInputProps>;\n CancelControl: Intergalactic.Component<'div', InlineInputCancelControlProps, InlineInputProps>;\n NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;\n NumberControls: Intergalactic.Component<'div', {}, InlineInputProps>;\n};\nexport default InlineInput;\n"],"mappings":""}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -147,5 +147,7 @@ declare const InlineInput: Intergalactic.Component<'div', InlineInputProps, Inli
|
|
|
147
147
|
Value: Intergalactic.Component<'input', InlineInputValueProps, InlineInputProps>;
|
|
148
148
|
ConfirmControl: Intergalactic.Component<'div', InlineInputConfirmControlProps, InlineInputProps>;
|
|
149
149
|
CancelControl: Intergalactic.Component<'div', InlineInputCancelControlProps, InlineInputProps>;
|
|
150
|
+
NumberValue: Intergalactic.Component<'div', {}, InlineInputProps>;
|
|
151
|
+
NumberControls: Intergalactic.Component<'div', {}, InlineInputProps>;
|
|
150
152
|
};
|
|
151
153
|
export default InlineInput;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/inline-input",
|
|
3
3
|
"description": "Semrush Input Component",
|
|
4
|
-
"version": "4.19.
|
|
4
|
+
"version": "4.19.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/flex-box": "5.13.
|
|
13
|
-
"@semcore/icon": "4.19.
|
|
14
|
-
"@semcore/spin": "5.13.
|
|
15
|
-
"@semcore/tooltip": "6.12.
|
|
16
|
-
"@semcore/utils": "4.15.
|
|
17
|
-
"@semcore/input-number": "5.15.
|
|
18
|
-
"@semcore/input": "4.15.
|
|
19
|
-
"@semcore/core": "2.12.
|
|
12
|
+
"@semcore/flex-box": "5.13.1",
|
|
13
|
+
"@semcore/icon": "4.19.1",
|
|
14
|
+
"@semcore/spin": "5.13.1",
|
|
15
|
+
"@semcore/tooltip": "6.12.2",
|
|
16
|
+
"@semcore/utils": "4.15.1",
|
|
17
|
+
"@semcore/input-number": "5.15.1",
|
|
18
|
+
"@semcore/input": "4.15.1",
|
|
19
|
+
"@semcore/core": "2.12.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "18.0.21",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@semcore/tooltip": "*"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@semcore/core": "^2.12.
|
|
29
|
+
"@semcore/core": "^2.12.1",
|
|
30
30
|
"react": "16.8 - 18",
|
|
31
31
|
"react-dom": "16.8 - 18"
|
|
32
32
|
},
|