@itera-web/react-ui-checkbox 1.22.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Checkbox.d.ts +4 -4
- package/es/Components/Check.d.ts +5 -5
- package/es/Components/Minus.d.ts +5 -5
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/package.json +4 -4
package/es/Checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
-
export { Checkbox };
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
package/es/Components/Check.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type IconProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const Check: React.FC<IconProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type IconProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const Check: React.FC<IconProps>;
|
package/es/Components/Minus.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type IconProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const Minus: React.FC<IconProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type IconProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const Minus: React.FC<IconProps>;
|
package/es/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Checkbox } from './Checkbox';
|
|
1
|
+
export { Checkbox } from './Checkbox';
|
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import*as r from"@itera-web/utils-cn";import*as t from"@radix-ui/react-checkbox";var a={d:(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},o={};a.d(o,{X:()=>f});const n=(e=>{var r={};return a.d(r,e),r})({createElement:()=>e.createElement,forwardRef:()=>e.forwardRef});const c=(e=>{var r={};return a.d(r,e),r})({cn:()=>r.cn});const i=(e=>{var r={};return a.d(r,e),r})({Indicator:()=>t.Indicator,Root:()=>t.Root});var s=function(e){var r=e.className;return n.createElement("svg",{className:r,fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M20 6 9 17l-5-5"}))},l=function(e){var r=e.className;return n.createElement("svg",{className:r,height:"24",viewBox:"0 1 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{fill:"currentColor",height:"16",rx:"0",ry:"0",width:"16",x:"4",y:"4"}))},d=function(){return d=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},d.apply(this,arguments)},m=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t},f=n.forwardRef(function(e,r){var t=e.className,a=m(e,["className"]);return n.createElement(i.Root,d({className:(0,c.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),ref:r},a),n.createElement(i.Indicator,{className:"flex items-center justify-center"},n.createElement(i.Indicator,{asChild:!0},n.createElement("div",{className:"flex items-center justify-center overflow-hidden"},"indeterminate"===a.checked?n.createElement(l,{className:"h-4 w-4 text-primary"}):n.createElement(s,{className:"h-4 w-4 text-white"})))))});f.displayName=i.Root.displayName;var
|
|
1
|
+
import*as e from"react";import*as r from"@itera-web/utils-cn";import*as t from"@radix-ui/react-checkbox";var a={d:(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},o={};a.d(o,{X:()=>f});const n=(e=>{var r={};return a.d(r,e),r})({createElement:()=>e.createElement,forwardRef:()=>e.forwardRef});const c=(e=>{var r={};return a.d(r,e),r})({cn:()=>r.cn});const i=(e=>{var r={};return a.d(r,e),r})({Indicator:()=>t.Indicator,Root:()=>t.Root});var s=function(e){var r=e.className;return n.createElement("svg",{className:r,fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M20 6 9 17l-5-5"}))},l=function(e){var r=e.className;return n.createElement("svg",{className:r,height:"24",viewBox:"0 1 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{fill:"currentColor",height:"16",rx:"0",ry:"0",width:"16",x:"4",y:"4"}))},d=function(){return d=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},d.apply(this,arguments)},m=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t},f=n.forwardRef(function(e,r){var t=e.className,a=m(e,["className"]);return n.createElement(i.Root,d({className:(0,c.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),ref:r},a),n.createElement(i.Indicator,{className:"flex items-center justify-center"},n.createElement(i.Indicator,{asChild:!0},n.createElement("div",{className:"flex items-center justify-center overflow-hidden"},"indeterminate"===a.checked?n.createElement(l,{className:"h-4 w-4 text-primary"}):n.createElement(s,{className:"h-4 w-4 text-white"})))))});f.displayName=i.Root.displayName;var u=o.X;export{u as Checkbox};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itera-web/react-ui-checkbox",
|
|
3
3
|
"description": "复选框",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.28.0",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"up": "npm publish"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@itera-web/utils-cn": "^1.
|
|
16
|
+
"@itera-web/utils-cn": "^1.26.0",
|
|
17
17
|
"@radix-ui/react-checkbox": "^1.2.12"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-dom": ">=17.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@itera-web/cli": "^1.1.
|
|
24
|
+
"@itera-web/cli": "^1.1.70"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "ed385657bd5f002b9339de322c08659ae5ce6fc1"
|
|
27
27
|
}
|