@itera-web/react-ui-checkbox 1.22.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/LICENSE.md ADDED
File without changes
package/README.md ADDED
@@ -0,0 +1 @@
1
+ ### [使用文档](http://iterative.keyboardecho.com/)
@@ -0,0 +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 };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export type IconProps = {
3
+ className?: string;
4
+ };
5
+ export declare const Check: React.FC<IconProps>;
@@ -0,0 +1,5 @@
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 ADDED
@@ -0,0 +1 @@
1
+ export { Checkbox } from './Checkbox';
package/es/index.js ADDED
@@ -0,0 +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 p=o.X;export{p as Checkbox};
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@itera-web/react-ui-checkbox",
3
+ "description": "复选框",
4
+ "version": "1.22.0",
5
+ "main": "es/index.js",
6
+ "types": "es/index.d.ts",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "license": "MIT",
11
+ "scripts": {
12
+ "build": "itera-cli package",
13
+ "up": "npm publish"
14
+ },
15
+ "dependencies": {
16
+ "@itera-web/utils-cn": "^1.20.0",
17
+ "@radix-ui/react-checkbox": "^1.2.12"
18
+ },
19
+ "peerDependencies": {
20
+ "react": ">=17.0.0",
21
+ "react-dom": ">=17.0.0"
22
+ },
23
+ "devDependencies": {
24
+ "@itera-web/cli": "^1.1.45"
25
+ },
26
+ "gitHead": "03be639f55ed0f62801e6b0f109070a45fe5a661"
27
+ }