diff --git a/app/client/package.json b/app/client/package.json index 53c5e15c2a..1c3aa47515 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -93,7 +93,7 @@ "cypress-log-to-output": "^1.1.2", "dayjs": "^1.10.6", "deep-diff": "^1.0.2", - "design-system": "npm:@appsmithorg/design-system@2.1.14", + "design-system": "npm:@appsmithorg/design-system@2.1.15", "design-system-old": "npm:@appsmithorg/design-system-old@1.1.10", "downloadjs": "^1.4.7", "fast-deep-equal": "^3.1.3", diff --git a/app/client/src/components/propertyControls/NumericInputControl.tsx b/app/client/src/components/propertyControls/NumericInputControl.tsx index d9c780ccda..52faae63ea 100644 --- a/app/client/src/components/propertyControls/NumericInputControl.tsx +++ b/app/client/src/components/propertyControls/NumericInputControl.tsx @@ -56,7 +56,7 @@ class NumericInputControl extends BaseControl { this.inputElement = element; }} scale={stepSize} - value={parseInt(propertyValue)} + value={propertyValue} /> ); } @@ -65,11 +65,11 @@ class NumericInputControl extends BaseControl { return !isNaN(Number(value)); } - private handleValueChange = (value: number) => { + private handleValueChange = (value: string | undefined) => { // Update the propertyValue this.updateProperty( this.props.propertyName, - value.toString(), + value?.toString(), document.activeElement === this.inputElement, ); }; diff --git a/app/client/src/components/propertyControls/StepControl.tsx b/app/client/src/components/propertyControls/StepControl.tsx index 07867b1648..66d3ac3955 100644 --- a/app/client/src/components/propertyControls/StepControl.tsx +++ b/app/client/src/components/propertyControls/StepControl.tsx @@ -13,7 +13,7 @@ const MIN = 0; const MAX = 100; class StepControl extends BaseControl { - componentRef = React.createRef(); + componentRef = React.createRef(); componentDidMount() { this.componentRef.current?.addEventListener( @@ -64,15 +64,13 @@ class StepControl extends BaseControl { { - this.updateProperty( - this.props.propertyName, - value, - isUpdatedViaKeyboard, - ); + // TODO: UI builders -> confirm isUpdatedViaKeyboard is needed going forward + onChange={(value: string | undefined, isUpdatedViaKeyboard = false) => { + const v = value ? parseFloat(value.replace(/[^0-9.-]+/g, "")) : 0; + this.updateProperty(this.props.propertyName, v, isUpdatedViaKeyboard); }} ref={this.componentRef} - steps={steps} + scale={steps} suffix={suffix} value={this.props.propertyValue} /> diff --git a/app/client/src/pages/Editor/PropertyPane/PropertyHelpLabel.tsx b/app/client/src/pages/Editor/PropertyPane/PropertyHelpLabel.tsx index 20afea1105..b9b86d868b 100644 --- a/app/client/src/pages/Editor/PropertyPane/PropertyHelpLabel.tsx +++ b/app/client/src/pages/Editor/PropertyPane/PropertyHelpLabel.tsx @@ -7,6 +7,9 @@ const Label = styled.label` color: var(--ads-v2-color-fg); font-size: var(--ads-v2-font-size-4); font-weight: var(--ads-v2-font-weight-normal); + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; `; type Props = { diff --git a/app/client/yarn.lock b/app/client/yarn.lock index d626657bf0..92a55ebe26 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -9669,7 +9669,7 @@ __metadata: cypress-xpath: ^1.6.0 dayjs: ^1.10.6 deep-diff: ^1.0.2 - design-system: "npm:@appsmithorg/design-system@2.1.14" + design-system: "npm:@appsmithorg/design-system@2.1.15" design-system-old: "npm:@appsmithorg/design-system-old@1.1.10" diff: ^5.0.0 dotenv: ^8.1.0 @@ -13711,9 +13711,9 @@ __metadata: languageName: node linkType: hard -"design-system@npm:@appsmithorg/design-system@2.1.14": - version: 2.1.14 - resolution: "@appsmithorg/design-system@npm:2.1.14" +"design-system@npm:@appsmithorg/design-system@2.1.15": + version: 2.1.15 + resolution: "@appsmithorg/design-system@npm:2.1.15" dependencies: "@radix-ui/react-dialog": ^1.0.2 "@radix-ui/react-dropdown-menu": ^2.0.4 @@ -13738,7 +13738,7 @@ __metadata: react-dom: ^17.0.2 react-router-dom: ^5.0.0 styled-components: ^5.3.6 - checksum: 7c762404027072d869ccfab00412addb65edcf3b96f091509849bf6a109fa4246b7551d0a9dab6625b3ad171b97735f55036a3391a0338071dcf3190f86e843b + checksum: 35641238fdf0bd7072beacc06b53aeefc6fbad499d5a8ad90955821387eed7c55c1396c01930177d4ef4c787f5b29768e5f410345eb06f3fde2e0c85217a1c73 languageName: node linkType: hard