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

@s-ui/react-atom-label

Package Overview
Dependencies
Maintainers
80
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-ui/react-atom-label - npm Package Compare versions

Comparing version 1.24.0 to 1.25.0

index.d.ts

31

lib/index.js

@@ -1,30 +0,1 @@

import PropTypes from 'prop-types';
import { FONT_SIZES, getClass, TYPES } from './settings.js';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var AtomLabel = function AtomLabel(_ref) {
var name = _ref.name,
inline = _ref.inline,
text = _ref.text,
optionalText = _ref.optionalText,
type = _ref.type,
htmlFor = _ref.htmlFor,
fontSize = _ref.fontSize,
onClick = _ref.onClick;
return /*#__PURE__*/_jsxs("label", {
htmlFor: htmlFor || name,
className: getClass({
type: type,
inline: inline,
fontSize: fontSize
}),
onClick: onClick,
children: [text, optionalText && /*#__PURE__*/_jsx("span", {
className: "sui-AtomLabel-optionalText",
children: optionalText
})]
});
};
AtomLabel.displayName = 'AtomLabel';
export default AtomLabel;
export { TYPES as AtomLabelTypes };
export { FONT_SIZES as AtomLabelFontSizes };
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import cx from"classnames";import{CLASSNAME,FONT_SIZES,TYPES}from"./settings";var getClass=function(param){var inline=param.inline,type=param.type,fontSize=param.fontSize;var _obj;return cx(CLASSNAME,(_obj={},_obj[CLASSNAME+"--"+fontSize]=Boolean(fontSize),_obj[CLASSNAME+"--"+type]=Boolean(type),_obj[""+CLASSNAME+"--inlineLeft"]=inline==="left",_obj[""+CLASSNAME+"--inlineRight"]=inline==="right",_obj))};var AtomLabel=function(param){var name=param.name,text=param.text,inline=param.inline,optionalText=param.optionalText,type=param.type,fontSize=param.fontSize,htmlFor=param.htmlFor,onClick=param.onClick;return _jsxs("label",{htmlFor:htmlFor!=null?htmlFor:name,className:getClass({inline:inline,type:type,fontSize:fontSize}),onClick:onClick,children:[text,Boolean(optionalText)&&_jsx("span",{className:"sui-AtomLabel-optionalText",children:optionalText})]})};AtomLabel.displayName="AtomLabel";export default AtomLabel;export{FONT_SIZES as AtomLabelFontSizes};export{TYPES as AtomLabelTypes};

@@ -1,22 +0,1 @@

import cx from 'classnames';
export var CLASSNAME = 'sui-AtomLabel';
export var TYPES = {
SUCCESS: 'success',
ERROR: 'error',
ALERT: 'alert',
CONTRAST: 'contrast',
DISABLED: 'disabled'
};
export var FONT_SIZES = {
LARGE: 'large',
MEDIUM: 'medium',
SMALL: 'small',
XSMALL: 'xsmall'
};
export var getClass = function getClass(_ref) {
var _cx;
var type = _ref.type,
inline = _ref.inline,
fontSize = _ref.fontSize;
return cx(CLASSNAME, (_cx = {}, _cx[CLASSNAME + "--" + fontSize] = fontSize, _cx[CLASSNAME + "--" + type] = type, _cx[CLASSNAME + "--inlineLeft"] = inline === 'left', _cx[CLASSNAME + "--inlineRight"] = inline === 'right', _cx));
};
export var CLASSNAME="sui-AtomLabel";export var TYPES={SUCCESS:"success",ERROR:"error",ALERT:"alert",CONTRAST:"contrast",DISABLED:"disabled"};export var FONT_SIZES={LARGE:"large",MEDIUM:"medium",SMALL:"small",XSMALL:"xsmall"};
{
"name": "@s-ui/react-atom-label",
"version": "1.24.0",
"version": "1.25.0",
"description": "",
"main": "lib/index.js",
"scripts": {
"prepublishOnly": "rimraf ./lib && npm run build:js && npm run build:styles",
"build:js": "babel --presets sui ./src --out-dir ./lib",
"prepublishOnly": "npm run build:js && npm run build:styles",
"build:js": "sui-js-compiler",
"build:styles": "cpx './src/**/*.scss' ./lib"
},
"dependencies": {
"@s-ui/component-dependencies": "1"
"@s-ui/component-dependencies": "1",
"@s-ui/js-compiler": "1"
},

@@ -14,0 +15,0 @@ "keywords": [],

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