Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@planningcenter/doxy-web

Package Overview
Dependencies
Maintainers
10
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planningcenter/doxy-web - npm Package Compare versions

Comparing version 2.2.0-rc.1 to 2.2.0-rc.2

9

dist/components/NumberSpinner/NumberSpinner.d.ts
import React from "react";
export interface NumberSpinnerProps {
disabled?: boolean;
initialValue?: number;
min?: number;
max?: number;
max: number;
name?: string;
onChange?: (arg0: number) => void;
onChange: (arg0: number) => void;
size?: "sm" | "md";
step?: number;
value: number;
}
export declare const NumberSpinner: React.FC<NumberSpinnerProps>;
export declare const NumberSpinner: ({ disabled, min, max, name, onChange, size, value, }: NumberSpinnerProps) => React.JSX.Element;

@@ -9,3 +9,3 @@ import "./scss/doxy-web.scss";

export * from "./components/Image/";
export * from "./components/NumberSpinner";
export * from "./components/NumberSpinner/";
export * from "./components/Select/";

@@ -12,0 +12,0 @@ export * from "./components/Subheading/";

@@ -284,24 +284,20 @@ import React, { useState, forwardRef } from 'react';

disabled = false,
initialValue = 0,
min = 0,
max = 100,
name = "numberSpinner",
onChange = undefined,
max,
name = "number-spinner",
onChange,
size = "md",
step = 1
value
} = _ref;
const [value, setValue] = useState(initialValue || min);
const [focus, setFocus] = useState(false);
const handleKeyDown = e => {
if (e.code === "ArrowUp" || e.code === "ArrowRight") handleIncrement();
if (e.code === "ArrowDown" || e.code === "ArrowLeft") handleDecrement();
if (e.key === "ArrowUp" || e.key === "ArrowRight") handleIncrement();
if (e.key === "ArrowDown" || e.key === "ArrowLeft") handleDecrement();
};
const handleDecrement = () => {
const newValue = value === min ? value : value - step;
setValue(newValue);
const newValue = value === min ? value : value - 1;
if (!!onChange) onChange(newValue);
};
const handleIncrement = () => {
const newValue = value === max ? value : value + step;
setValue(newValue);
const newValue = value === max ? value : value + 1;
if (!!onChange) onChange(newValue);

@@ -327,6 +323,6 @@ };

disabled: disabled,
max: max.toString(),
min: min.toString(),
step: step.toString(),
value: value.toString(),
max: max,
min: min,
step: "1",
value: value,
onChange: () => {},

@@ -333,0 +329,0 @@ onWheel: e => e.target.blur(),

@@ -293,24 +293,20 @@ 'use strict';

disabled = false,
initialValue = 0,
min = 0,
max = 100,
name = "numberSpinner",
onChange = undefined,
max,
name = "number-spinner",
onChange,
size = "md",
step = 1
value
} = _ref;
const [value, setValue] = React.useState(initialValue || min);
const [focus, setFocus] = React.useState(false);
const handleKeyDown = e => {
if (e.code === "ArrowUp" || e.code === "ArrowRight") handleIncrement();
if (e.code === "ArrowDown" || e.code === "ArrowLeft") handleDecrement();
if (e.key === "ArrowUp" || e.key === "ArrowRight") handleIncrement();
if (e.key === "ArrowDown" || e.key === "ArrowLeft") handleDecrement();
};
const handleDecrement = () => {
const newValue = value === min ? value : value - step;
setValue(newValue);
const newValue = value === min ? value : value - 1;
if (!!onChange) onChange(newValue);
};
const handleIncrement = () => {
const newValue = value === max ? value : value + step;
setValue(newValue);
const newValue = value === max ? value : value + 1;
if (!!onChange) onChange(newValue);

@@ -336,6 +332,6 @@ };

disabled: disabled,
max: max.toString(),
min: min.toString(),
step: step.toString(),
value: value.toString(),
max: max,
min: min,
step: "1",
value: value,
onChange: () => {},

@@ -342,0 +338,0 @@ onWheel: e => e.target.blur(),

{
"name": "@planningcenter/doxy-web",
"version": "2.2.0-rc.1",
"version": "2.2.0-rc.2",
"description": "Doxy for Church Center Web",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc