@hi-ui/badge
Advanced tools
Comparing version 4.0.0-alpha.3 to 4.0.0-alpha.4
@@ -18,4 +18,2 @@ /** @LICENSE | ||
var tslib = require('tslib'); | ||
var React = require('react'); | ||
@@ -43,19 +41,18 @@ | ||
var Badge = /*#__PURE__*/React.forwardRef(function (_a, ref) { | ||
var _a$prefixCls = _a.prefixCls, | ||
prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls, | ||
_a$role = _a.role, | ||
role = _a$role === void 0 ? _role : _a$role, | ||
className = _a.className, | ||
children = _a.children, | ||
type = _a.type, | ||
max = _a.max, | ||
offset = _a.offset, | ||
content = _a.content, | ||
color = _a.color, | ||
visible = _a.visible, | ||
style = _a.style; | ||
tslib.__rest(_a, ["prefixCls", "role", "className", "children", "type", "max", "offset", "content", "color", "visible", "style"]); | ||
var Badge = /*#__PURE__*/React.forwardRef(function (_ref, ref) { | ||
var _ref$prefixCls = _ref.prefixCls, | ||
prefixCls = _ref$prefixCls === void 0 ? _prefix : _ref$prefixCls, | ||
_ref$role = _ref.role, | ||
role = _ref$role === void 0 ? _role : _ref$role, | ||
className = _ref.className, | ||
children = _ref.children, | ||
_ref$type = _ref.type, | ||
type = _ref$type === void 0 ? 'bubble' : _ref$type, | ||
max = _ref.max, | ||
offset = _ref.offset, | ||
content = _ref.content, | ||
color = _ref.color, | ||
_ref$visible = _ref.visible, | ||
visible = _ref$visible === void 0 ? true : _ref$visible, | ||
style = _ref.style; | ||
var cls = classname.cx(prefixCls, className); | ||
@@ -62,0 +59,0 @@ var _style = { |
@@ -15,3 +15,3 @@ /** @LICENSE | ||
}); | ||
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-badge {\n display: inline-block;\n position: relative;\n line-height: 1; }\n.hi-v4-badge-value {\n position: absolute;\n top: -10px;\n right: 0;\n -webkit-transform: translateX(50%);\n transform: translateX(50%);\n height: 16px;\n padding: 0 4px;\n min-width: 8px;\n border: 2px solid #fff;\n border: 2px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 10px;\n line-height: 16px;\n background: #eb2f44;\n background: var(--hi-v4-color-magenta-500, #eb2f44);\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n color: #fff;\n color: var(--hi-v4-color-static-white, #fff);\n letter-spacing: 0;\n text-align: center; }\n.hi-v4-badge-value.hi-hide {\n display: none; }\n.hi-v4-badge-dot {\n position: absolute;\n width: 8px;\n height: 8px;\n top: -5px;\n right: -5px;\n background: #eb2f44;\n background: var(--hi-v4-color-magenta-500, #eb2f44);\n border: 1px solid #fff;\n border: 1px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 50%;\n z-index: 1; }\n.hi-v4-badge-dot.hi-hide {\n display: none; }\n"; | ||
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-badge {\n display: inline-block;\n position: relative;\n line-height: 1; }\n.hi-v4-badge-value {\n position: absolute;\n top: calc(-12px);\n right: 0;\n -webkit-transform: translateX(50%);\n transform: translateX(50%);\n height: 20px;\n padding: 0 6px;\n padding: 0 var(--hi-v4-spacing-3, 6px);\n min-width: 8px;\n border: 2px solid #fff;\n border: 2px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 9999px;\n border-radius: var(--hi-v4-border-radius-full, 9999px);\n line-height: 20px;\n background: #ff5959;\n background: var(--hi-v4-color-red-500, #ff5959);\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n color: #fff;\n color: var(--hi-v4-color-static-white, #fff);\n letter-spacing: 0;\n text-align: center; }\n.hi-v4-badge-dot {\n position: absolute;\n width: 10px;\n height: 10px;\n top: calc(-7px);\n right: calc(-7px);\n background: #ff5959;\n background: var(--hi-v4-color-red-500, #ff5959);\n border: 2px solid #fff;\n border: 2px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 50%;\n z-index: 1; }\n"; | ||
@@ -18,0 +18,0 @@ var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"]; |
@@ -10,3 +10,2 @@ /** @LICENSE | ||
*/ | ||
import { __rest } from 'tslib'; | ||
import React, { forwardRef } from 'react'; | ||
@@ -23,19 +22,18 @@ import { getPrefixCls, cx } from '@hi-ui/classname'; | ||
var Badge = /*#__PURE__*/forwardRef(function (_a, ref) { | ||
var _a$prefixCls = _a.prefixCls, | ||
prefixCls = _a$prefixCls === void 0 ? _prefix : _a$prefixCls, | ||
_a$role = _a.role, | ||
role = _a$role === void 0 ? _role : _a$role, | ||
className = _a.className, | ||
children = _a.children, | ||
type = _a.type, | ||
max = _a.max, | ||
offset = _a.offset, | ||
content = _a.content, | ||
color = _a.color, | ||
visible = _a.visible, | ||
style = _a.style; | ||
__rest(_a, ["prefixCls", "role", "className", "children", "type", "max", "offset", "content", "color", "visible", "style"]); | ||
var Badge = /*#__PURE__*/forwardRef(function (_ref, ref) { | ||
var _ref$prefixCls = _ref.prefixCls, | ||
prefixCls = _ref$prefixCls === void 0 ? _prefix : _ref$prefixCls, | ||
_ref$role = _ref.role, | ||
role = _ref$role === void 0 ? _role : _ref$role, | ||
className = _ref.className, | ||
children = _ref.children, | ||
_ref$type = _ref.type, | ||
type = _ref$type === void 0 ? 'bubble' : _ref$type, | ||
max = _ref.max, | ||
offset = _ref.offset, | ||
content = _ref.content, | ||
color = _ref.color, | ||
_ref$visible = _ref.visible, | ||
visible = _ref$visible === void 0 ? true : _ref$visible, | ||
style = _ref.style; | ||
var cls = cx(prefixCls, className); | ||
@@ -42,0 +40,0 @@ var _style = { |
@@ -10,3 +10,3 @@ /** @LICENSE | ||
*/ | ||
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-badge {\n display: inline-block;\n position: relative;\n line-height: 1; }\n.hi-v4-badge-value {\n position: absolute;\n top: -10px;\n right: 0;\n -webkit-transform: translateX(50%);\n transform: translateX(50%);\n height: 16px;\n padding: 0 4px;\n min-width: 8px;\n border: 2px solid #fff;\n border: 2px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 10px;\n line-height: 16px;\n background: #eb2f44;\n background: var(--hi-v4-color-magenta-500, #eb2f44);\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n color: #fff;\n color: var(--hi-v4-color-static-white, #fff);\n letter-spacing: 0;\n text-align: center; }\n.hi-v4-badge-value.hi-hide {\n display: none; }\n.hi-v4-badge-dot {\n position: absolute;\n width: 8px;\n height: 8px;\n top: -5px;\n right: -5px;\n background: #eb2f44;\n background: var(--hi-v4-color-magenta-500, #eb2f44);\n border: 1px solid #fff;\n border: 1px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 50%;\n z-index: 1; }\n.hi-v4-badge-dot.hi-hide {\n display: none; }\n"; | ||
var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-badge {\n display: inline-block;\n position: relative;\n line-height: 1; }\n.hi-v4-badge-value {\n position: absolute;\n top: calc(-12px);\n right: 0;\n -webkit-transform: translateX(50%);\n transform: translateX(50%);\n height: 20px;\n padding: 0 6px;\n padding: 0 var(--hi-v4-spacing-3, 6px);\n min-width: 8px;\n border: 2px solid #fff;\n border: 2px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 9999px;\n border-radius: var(--hi-v4-border-radius-full, 9999px);\n line-height: 20px;\n background: #ff5959;\n background: var(--hi-v4-color-red-500, #ff5959);\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n color: #fff;\n color: var(--hi-v4-color-static-white, #fff);\n letter-spacing: 0;\n text-align: center; }\n.hi-v4-badge-dot {\n position: absolute;\n width: 10px;\n height: 10px;\n top: calc(-7px);\n right: calc(-7px);\n background: #ff5959;\n background: var(--hi-v4-color-red-500, #ff5959);\n border: 2px solid #fff;\n border: 2px solid var(--hi-v4-color-static-white, #fff);\n border-radius: 50%;\n z-index: 1; }\n"; | ||
@@ -13,0 +13,0 @@ var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"]; |
@@ -23,2 +23,3 @@ import React from 'react'; | ||
style?: React.CSSProperties; | ||
children?: React.ReactNode; | ||
type?: 'bubble' | 'dot'; | ||
@@ -25,0 +26,0 @@ content?: React.ReactNode; |
{ | ||
"name": "@hi-ui/badge", | ||
"version": "4.0.0-alpha.3", | ||
"version": "4.0.0-alpha.4", | ||
"description": "A sub-package for @hi-ui/hiui.", | ||
@@ -47,3 +47,3 @@ "keywords": [], | ||
"@hi-ui/classname": "^4.0.0-alpha.0", | ||
"@hi-ui/core-css": "^4.0.0-alpha.5", | ||
"@hi-ui/core-css": "^4.0.0-alpha.6", | ||
"@hi-ui/env": "^4.0.0-alpha.0" | ||
@@ -56,7 +56,7 @@ }, | ||
"devDependencies": { | ||
"@hi-ui/hi-build": "^4.0.0-alpha.0", | ||
"@hi-ui/hi-build": "^4.0.0-alpha.3", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1" | ||
}, | ||
"gitHead": "a3b15b79bb08d15f45212c851a1c93ba5bf0d7c0" | ||
"gitHead": "689ef7c6b19089bf0aa818978c70da1e27714e6b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
19092
242