New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rc-segmented

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-segmented - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

1

es/index.d.ts

@@ -25,2 +25,3 @@ import * as React from 'react';

vertical?: boolean;
name?: string;
}

@@ -27,0 +28,0 @@ declare const Segmented: React.ForwardRefExoticComponent<Omit<SegmentedProps<SegmentedValue>, "ref"> & React.RefAttributes<HTMLDivElement>>;

10

es/index.js

@@ -7,3 +7,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

import _typeof from "@babel/runtime/helpers/esm/typeof";
var _excluded = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "onChange", "className", "motionName"];
var _excluded = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
import classNames from 'classnames';

@@ -49,2 +49,3 @@ import useMergedState from "rc-util/es/hooks/useMergedState";

value = _ref.value,
name = _ref.name,
onChange = _ref.onChange;

@@ -60,3 +61,5 @@ var handleChange = function handleChange(event) {

}, /*#__PURE__*/React.createElement("input", {
name: name,
className: "".concat(prefixCls, "-item-input"),
"aria-hidden": "true",
type: "radio",

@@ -84,2 +87,3 @@ disabled: disabled,

value = props.value,
name = props.name,
onChange = props.onChange,

@@ -115,5 +119,2 @@ _props$className = props.className,

var handleChange = function handleChange(event, val) {
if (disabled) {
return;
}
setRawValue(val);

@@ -151,2 +152,3 @@ onChange === null || onChange === void 0 || onChange(val);

return /*#__PURE__*/React.createElement(InternalSegmentedOption, _extends({}, segmentedOption, {
name: name,
key: segmentedOption.value,

@@ -153,0 +155,0 @@ prefixCls: prefixCls,

@@ -25,2 +25,3 @@ import * as React from 'react';

vertical?: boolean;
name?: string;
}

@@ -27,0 +28,0 @@ declare const Segmented: React.ForwardRefExoticComponent<Omit<SegmentedProps<SegmentedValue>, "ref"> & React.RefAttributes<HTMLDivElement>>;

@@ -21,3 +21,3 @@ "use strict";

var _MotionThumb = _interopRequireDefault(require("./MotionThumb"));
var _excluded = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "onChange", "className", "motionName"];
var _excluded = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "name", "onChange", "className", "motionName"];
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }

@@ -59,2 +59,3 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }

value = _ref.value,
name = _ref.name,
onChange = _ref.onChange;

@@ -70,3 +71,5 @@ var handleChange = function handleChange(event) {

}, /*#__PURE__*/React.createElement("input", {
name: name,
className: "".concat(prefixCls, "-item-input"),
"aria-hidden": "true",
type: "radio",

@@ -94,2 +97,3 @@ disabled: disabled,

value = props.value,
name = props.name,
onChange = props.onChange,

@@ -125,5 +129,2 @@ _props$className = props.className,

var handleChange = function handleChange(event, val) {
if (disabled) {
return;
}
setRawValue(val);

@@ -161,2 +162,3 @@ onChange === null || onChange === void 0 || onChange(val);

return /*#__PURE__*/React.createElement(InternalSegmentedOption, (0, _extends2.default)({}, segmentedOption, {
name: name,
key: segmentedOption.value,

@@ -163,0 +165,0 @@ prefixCls: prefixCls,

{
"name": "rc-segmented",
"version": "2.5.0",
"version": "2.6.0",
"description": "React segmented controls used in ant.design",

@@ -60,4 +60,4 @@ "keywords": [

"@types/jest": "^29.2.4",
"@types/react": "^17.0.13",
"@types/react-dom": "^16.9.0",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@umijs/fabric": "^3.0.0",

@@ -64,0 +64,0 @@ "@umijs/test": "^4.0.36",

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