tango-ui-cw 0.9.2 → 0.9.3

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.
Files changed (97) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/Notice//345/244/261/350/264/245.png.js +1 -0
  3. package/dist/assets/Notice//345/244/261/350/264/245.png.mjs +4 -0
  4. package/dist/assets/Notice//346/210/220/345/212/237.png.js +1 -0
  5. package/dist/assets/Notice//346/210/220/345/212/237.png.mjs +4 -0
  6. package/dist/assets/Notice//350/255/246/345/221/212.png.js +1 -0
  7. package/dist/assets/Notice//350/255/246/345/221/212.png.mjs +4 -0
  8. package/dist/assets/Upload/delLogo.png.js +1 -0
  9. package/dist/assets/Upload/delLogo.png.mjs +4 -0
  10. package/dist/assets/Upload/fileslogo.png.js +1 -0
  11. package/dist/assets/Upload/fileslogo.png.mjs +4 -0
  12. package/dist/client.mjs +3 -0
  13. package/dist/component/CSSFab/useTangoStyle.js +1 -0
  14. package/dist/component/CSSFab/useTangoStyle.mjs +170 -0
  15. package/dist/component/MaterialButton/MaterialButton.module.css.js +1 -0
  16. package/dist/component/MaterialButton/MaterialButton.module.css.mjs +17 -0
  17. package/dist/component/MaterialButton/index.js +1 -0
  18. package/dist/component/MaterialButton/index.mjs +61 -0
  19. package/dist/component/MaterialInput/MaterialInput.module.css.js +1 -0
  20. package/dist/component/MaterialInput/MaterialInput.module.css.mjs +17 -0
  21. package/dist/component/MaterialInput/index.js +1 -0
  22. package/dist/component/MaterialInput/index.mjs +36 -0
  23. package/dist/component/TBanner/TBanner.module.css.js +1 -0
  24. package/dist/component/TBanner/TBanner.module.css.mjs +35 -0
  25. package/dist/component/TBanner/index.js +1 -0
  26. package/dist/component/TBanner/index.mjs +340 -0
  27. package/dist/component/TButton/TButton.module.css.js +1 -0
  28. package/dist/component/TButton/TButton.module.css.mjs +26 -0
  29. package/dist/component/TButton/index.js +1 -0
  30. package/dist/component/TButton/index.mjs +185 -0
  31. package/dist/component/TColorPicker/TColorPicker.module.css.js +1 -0
  32. package/dist/component/TColorPicker/TColorPicker.module.css.mjs +13 -0
  33. package/dist/component/TColorPicker/index.js +1 -0
  34. package/dist/component/TColorPicker/index.mjs +61 -0
  35. package/dist/component/TDate/index.js +1 -0
  36. package/dist/component/TDate/index.mjs +144 -0
  37. package/dist/component/TDatePicker/TDatePicker.module.css.js +1 -0
  38. package/dist/component/TDatePicker/TDatePicker.module.css.mjs +9 -0
  39. package/dist/component/TDatePicker/index.js +1 -0
  40. package/dist/component/TDatePicker/index.mjs +40 -0
  41. package/dist/component/TDrawer/TDrawer.module.css.js +1 -0
  42. package/dist/component/TDrawer/TDrawer.module.css.mjs +45 -0
  43. package/dist/component/TDrawer/index.js +1 -0
  44. package/dist/component/TDrawer/index.mjs +110 -0
  45. package/dist/component/TInput/TInput.module.css.js +1 -0
  46. package/dist/component/TInput/TInput.module.css.mjs +21 -0
  47. package/dist/component/TInput/index.js +1 -0
  48. package/dist/component/TInput/index.mjs +74 -0
  49. package/dist/component/TLayout/index.js +1 -0
  50. package/dist/component/TLayout/index.mjs +52 -0
  51. package/dist/component/TLine/TLine.module.css.js +1 -0
  52. package/dist/component/TLine/TLine.module.css.mjs +19 -0
  53. package/dist/component/TLine/index.js +1 -0
  54. package/dist/component/TLine/index.mjs +34 -0
  55. package/dist/component/TMark/TMark.module.css.js +1 -0
  56. package/dist/component/TMark/TMark.module.css.mjs +7 -0
  57. package/dist/component/TMark/index.js +1 -0
  58. package/dist/component/TMark/index.mjs +51 -0
  59. package/dist/component/TModal/TModal.module.css.js +1 -0
  60. package/dist/component/TModal/TModal.module.css.mjs +29 -0
  61. package/dist/component/TModal/index.js +1 -0
  62. package/dist/component/TModal/index.mjs +109 -0
  63. package/dist/component/TNotice/NoticeProvider.js +1 -0
  64. package/dist/component/TNotice/NoticeProvider.mjs +47 -0
  65. package/dist/component/TNotice/TNotice.module.css.js +1 -0
  66. package/dist/component/TNotice/TNotice.module.css.mjs +27 -0
  67. package/dist/component/TNotice/index.js +3 -0
  68. package/dist/component/TNotice/index.mjs +39 -0
  69. package/dist/component/TNotice/useNotice.js +1 -0
  70. package/dist/component/TNotice/useNotice.mjs +18 -0
  71. package/dist/component/TSearch/TSearch.module.css.js +1 -0
  72. package/dist/component/TSearch/TSearch.module.css.mjs +21 -0
  73. package/dist/component/TSearch/index.js +1 -0
  74. package/dist/component/TSearch/index.mjs +72 -0
  75. package/dist/component/TSpace/TSpace.module.css.js +1 -0
  76. package/dist/component/TSpace/TSpace.module.css.mjs +23 -0
  77. package/dist/component/TSpace/index.js +1 -0
  78. package/dist/component/TSpace/index.mjs +45 -0
  79. package/dist/component/TTable/TTable.module.css.js +1 -0
  80. package/dist/component/TTable/TTable.module.css.mjs +25 -0
  81. package/dist/component/TTable/index.js +7 -0
  82. package/dist/component/TTable/index.mjs +153 -0
  83. package/dist/component/TTooltip/TTooltip.module.css.js +1 -0
  84. package/dist/component/TTooltip/TTooltip.module.css.mjs +17 -0
  85. package/dist/component/TTooltip/index.js +1 -0
  86. package/dist/component/TTooltip/index.mjs +33 -0
  87. package/dist/component/TUpload/TUpload.module.css.js +1 -0
  88. package/dist/component/TUpload/TUpload.module.css.mjs +15 -0
  89. package/dist/component/TUpload/index.js +1 -0
  90. package/dist/component/TUpload/index.mjs +151 -0
  91. package/dist/index.js +1 -9
  92. package/dist/index.mjs +47 -2071
  93. package/dist/styles/ThemeProvider.js +1 -0
  94. package/dist/styles/ThemeProvider.mjs +20 -0
  95. package/dist/tango-ui-cw.css +1 -0
  96. package/package.json +15 -11
  97. package/dist/index.css +0 -1
@@ -0,0 +1,61 @@
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import { useState as I } from "react";
3
+ import h from "prop-types";
4
+ import p from "./TColorPicker.module.css.mjs";
5
+ function M(g) {
6
+ const { disabled: m = !1, onChange: u = () => {
7
+ }, showText: v = !1 } = g, [c, $] = I("#000000"), k = (s) => {
8
+ const e = s.target.value;
9
+ $(e), u && u(e);
10
+ }, C = `${p.colorPicker} ${m ? p.colorPickerDisabled : ""}`, T = (s) => {
11
+ const e = parseInt(s.slice(1, 3), 16), o = parseInt(s.slice(3, 5), 16), r = parseInt(s.slice(5, 7), 16);
12
+ return `rgb(${e}, ${o}, ${r})`;
13
+ }, x = (s) => {
14
+ let e = parseInt(s.slice(1, 3), 16) / 255, o = parseInt(s.slice(3, 5), 16) / 255, r = parseInt(s.slice(5, 7), 16) / 255, t = Math.max(e, o, r), a = Math.min(e, o, r), l, d, b = (t + a) / 2;
15
+ if (t === a)
16
+ l = d = 0;
17
+ else {
18
+ let n = t - a;
19
+ switch (d = b > 0.5 ? n / (2 - t - a) : n / (t + a), t) {
20
+ case e:
21
+ l = (o - r) / n + (o < r ? 6 : 0);
22
+ break;
23
+ case o:
24
+ l = (r - e) / n + 2;
25
+ break;
26
+ case r:
27
+ l = (e - o) / n + 4;
28
+ break;
29
+ }
30
+ l /= 6;
31
+ }
32
+ return `hsl(${Math.round(l * 360)}, ${Math.round(d * 100)}%, ${Math.round(
33
+ b * 100
34
+ )}%)`;
35
+ };
36
+ return /* @__PURE__ */ f("div", { className: p.colorPickerWrapper, children: [
37
+ /* @__PURE__ */ i(
38
+ "input",
39
+ {
40
+ type: "color",
41
+ value: c,
42
+ onChange: k,
43
+ className: C,
44
+ disabled: m
45
+ }
46
+ ),
47
+ v && /* @__PURE__ */ f("div", { className: p.colorText, children: [
48
+ /* @__PURE__ */ i("div", { children: c.toUpperCase() }),
49
+ /* @__PURE__ */ i("div", { children: T(c) }),
50
+ /* @__PURE__ */ i("div", { children: x(c) })
51
+ ] })
52
+ ] });
53
+ }
54
+ M.propTypes = {
55
+ disabled: h.bool,
56
+ onChange: h.func,
57
+ showText: h.bool
58
+ };
59
+ export {
60
+ M as default
61
+ };
@@ -0,0 +1 @@
1
+ "use strict";const p=require("react/jsx-runtime");require("react");const n=require("prop-types"),L=require("../CSSFab/useTangoStyle.js");function l(s){const{type:c="default",single:g=!1,sx:r={},style:d={},className:u="",en:a=!1,...m}=s||{},o=typeof r=="object"&&r!==null&&!Array.isArray(r),y=L.useTangoStyle(o?r:{}),S=[o?"":r,u].filter(Boolean).join(" "),$={...y,...d},f=h=>{const e=new Date;let t=a?"en-US":"zh-CN",i=e.toLocaleString(t,{weekday:"long"});switch(!a&&g&&(i=i.replace("星期","周")),h){case"line":return e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"}).replaceAll("/","-");case"full":return`${e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})} ${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`;case"full-line":return`${e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"}).replaceAll("/","-")} ${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`;case"year-week":return`${e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})} ${i}`;case"year-week-line":return`${e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"}).replaceAll("/","-")} ${i}`;case"week-time":return`${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`;case"no-s":return`${e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})} ${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit"})}`;case"no-s-line":return`${e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"}).replaceAll("/","-")} ${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit"})}`;case"us-full":return`${e.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"})} ${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`;case"us-full-line":return`${e.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).replaceAll("/","-")} ${i} ${e.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`;default:return e.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})}};return p.jsx("div",{className:S,style:$,...m,children:f(c)})}l.propTypes={type:n.oneOf(["line","full","full-line","year-week","year-week-line","week-time","no-s","no-s-line","us-full","us-full-line"]),single:n.bool,sx:n.oneOfType([n.object,n.string]),style:n.object,className:n.string,en:n.bool};module.exports=l;
@@ -0,0 +1,144 @@
1
+ import { jsx as $ } from "react/jsx-runtime";
2
+ import "react";
3
+ import n from "prop-types";
4
+ import { useTangoStyle as p } from "../CSSFab/useTangoStyle.mjs";
5
+ function h(l) {
6
+ const {
7
+ type: s = "default",
8
+ single: c = !1,
9
+ sx: r = {},
10
+ style: d = {},
11
+ className: g = "",
12
+ en: a = !1,
13
+ ...u
14
+ } = l || {}, o = typeof r == "object" && r !== null && !Array.isArray(r), m = p(o ? r : {}), y = [o ? "" : r, g].filter(Boolean).join(" "), f = { ...m, ...d };
15
+ return /* @__PURE__ */ $("div", { className: y, style: f, ...u, children: ((S) => {
16
+ const e = /* @__PURE__ */ new Date();
17
+ let t = a ? "en-US" : "zh-CN", i = e.toLocaleString(t, { weekday: "long" });
18
+ switch (!a && c && (i = i.replace("星期", "周")), S) {
19
+ case "line":
20
+ return e.toLocaleDateString(t, {
21
+ year: "numeric",
22
+ month: "2-digit",
23
+ day: "2-digit"
24
+ }).replaceAll("/", "-");
25
+ case "full":
26
+ return `${e.toLocaleDateString(t, {
27
+ year: "numeric",
28
+ month: "2-digit",
29
+ day: "2-digit"
30
+ })} ${i} ${e.toLocaleTimeString(t, {
31
+ hour: "2-digit",
32
+ minute: "2-digit",
33
+ second: "2-digit"
34
+ })}`;
35
+ case "full-line":
36
+ return `${e.toLocaleDateString(t, {
37
+ year: "numeric",
38
+ month: "2-digit",
39
+ day: "2-digit"
40
+ }).replaceAll("/", "-")} ${i} ${e.toLocaleTimeString(
41
+ t,
42
+ {
43
+ hour: "2-digit",
44
+ minute: "2-digit",
45
+ second: "2-digit"
46
+ }
47
+ )}`;
48
+ case "year-week":
49
+ return `${e.toLocaleDateString(t, {
50
+ year: "numeric",
51
+ month: "2-digit",
52
+ day: "2-digit"
53
+ })} ${i}`;
54
+ case "year-week-line":
55
+ return `${e.toLocaleDateString(t, {
56
+ year: "numeric",
57
+ month: "2-digit",
58
+ day: "2-digit"
59
+ }).replaceAll("/", "-")} ${i}`;
60
+ case "week-time":
61
+ return `${i} ${e.toLocaleTimeString(t, {
62
+ hour: "2-digit",
63
+ minute: "2-digit",
64
+ second: "2-digit"
65
+ })}`;
66
+ case "no-s":
67
+ return `${e.toLocaleDateString(t, {
68
+ year: "numeric",
69
+ month: "2-digit",
70
+ day: "2-digit"
71
+ })} ${i} ${e.toLocaleTimeString(t, {
72
+ hour: "2-digit",
73
+ minute: "2-digit"
74
+ })}`;
75
+ case "no-s-line":
76
+ return `${e.toLocaleDateString(t, {
77
+ year: "numeric",
78
+ month: "2-digit",
79
+ day: "2-digit"
80
+ }).replaceAll("/", "-")} ${i} ${e.toLocaleTimeString(
81
+ t,
82
+ {
83
+ hour: "2-digit",
84
+ minute: "2-digit"
85
+ }
86
+ )}`;
87
+ case "us-full":
88
+ return `${e.toLocaleDateString("en-US", {
89
+ year: "numeric",
90
+ month: "2-digit",
91
+ day: "2-digit"
92
+ })} ${i} ${e.toLocaleTimeString(t, {
93
+ hour: "2-digit",
94
+ minute: "2-digit",
95
+ second: "2-digit"
96
+ })}`;
97
+ case "us-full-line":
98
+ return `${e.toLocaleDateString("en-US", {
99
+ year: "numeric",
100
+ month: "2-digit",
101
+ day: "2-digit"
102
+ }).replaceAll("/", "-")} ${i} ${e.toLocaleTimeString(
103
+ t,
104
+ {
105
+ hour: "2-digit",
106
+ minute: "2-digit",
107
+ second: "2-digit"
108
+ }
109
+ )}`;
110
+ default:
111
+ return e.toLocaleDateString(t, {
112
+ year: "numeric",
113
+ month: "2-digit",
114
+ day: "2-digit"
115
+ });
116
+ }
117
+ })(s) });
118
+ }
119
+ h.propTypes = {
120
+ type: n.oneOf([
121
+ "line",
122
+ "full",
123
+ "full-line",
124
+ "year-week",
125
+ "year-week-line",
126
+ "week-time",
127
+ "no-s",
128
+ "no-s-line",
129
+ "us-full",
130
+ "us-full-line"
131
+ ]),
132
+ single: n.bool,
133
+ // 控制显示“周”或“星期”
134
+ sx: n.oneOfType([n.object, n.string]),
135
+ // 自定义样式对象
136
+ style: n.object,
137
+ // 用户传入的 style 属性
138
+ className: n.string,
139
+ en: n.bool
140
+ // 控制英文格式
141
+ };
142
+ export {
143
+ h as default
144
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_datePicker_e2ozn_1",t="_datePickerDisabled_e2ozn_17",a={datePicker:e,datePickerDisabled:t};exports.datePicker=e;exports.datePickerDisabled=t;exports.default=a;
@@ -0,0 +1,9 @@
1
+ const e = "_datePicker_e2ozn_1", t = "_datePickerDisabled_e2ozn_17", a = {
2
+ datePicker: e,
3
+ datePickerDisabled: t
4
+ };
5
+ export {
6
+ e as datePicker,
7
+ t as datePickerDisabled,
8
+ a as default
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";const b=require("react/jsx-runtime"),C=require("react"),e=require("prop-types"),c=require("./TDatePicker.module.css.js");function i(u){const{className:l="",disabled:n=!1,onChange:o=()=>{},time:r=!1}=u,[d,g]=C.useState(""),p=a=>{const t=new Date(a),s=t.getFullYear(),h=(t.getMonth()+1).toString().padStart(2,"0"),$=t.getDate().toString().padStart(2,"0"),y=t.getHours().toString().padStart(2,"0"),D=t.getMinutes().toString().padStart(2,"0");return`${s}-${h}-${$} ${y}:${D}`},m=a=>{const t=a.target.value;g(t);const s=r?p(t):t;o&&o(s,t)},f=r?"datetime-local":"date",S=`${c.default.datePicker} ${n?c.default.datePickerDisabled:""} ${l}`;return b.jsx("input",{type:f,value:d,onChange:m,className:S,disabled:n})}i.propTypes={className:e.string,disabled:e.bool,onChange:e.func,time:e.bool};module.exports=i;
@@ -0,0 +1,40 @@
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { useState as C } from "react";
3
+ import e from "prop-types";
4
+ import i from "./TDatePicker.module.css.mjs";
5
+ function D(c) {
6
+ const {
7
+ className: l = "",
8
+ disabled: s = !1,
9
+ onChange: n = () => {
10
+ },
11
+ time: r = !1
12
+ } = c, [m, d] = C(""), p = (a) => {
13
+ const t = new Date(a), o = t.getFullYear(), S = (t.getMonth() + 1).toString().padStart(2, "0"), h = t.getDate().toString().padStart(2, "0"), $ = t.getHours().toString().padStart(2, "0"), y = t.getMinutes().toString().padStart(2, "0");
14
+ return `${o}-${S}-${h} ${$}:${y}`;
15
+ }, u = (a) => {
16
+ const t = a.target.value;
17
+ d(t);
18
+ const o = r ? p(t) : t;
19
+ n && n(o, t);
20
+ }, g = r ? "datetime-local" : "date", f = `${i.datePicker} ${s ? i.datePickerDisabled : ""} ${l}`;
21
+ return /* @__PURE__ */ b(
22
+ "input",
23
+ {
24
+ type: g,
25
+ value: m,
26
+ onChange: u,
27
+ className: f,
28
+ disabled: s
29
+ }
30
+ );
31
+ }
32
+ D.propTypes = {
33
+ className: e.string,
34
+ disabled: e.bool,
35
+ onChange: e.func,
36
+ time: e.bool
37
+ };
38
+ export {
39
+ D as default
40
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_drawerOverlay_1pmir_1",r="_drawerContainer_1pmir_25",t="_drawerHeader_1pmir_43",o="_drawerHeaderTitle_1pmir_57",a="_drawerContent_1pmir_63",m="_drawerFooter_1pmir_73",n="_drawerCloseBtn_1pmir_93",_="_drawerRight_1pmir_111",d="_drawerLeft_1pmir_127",c="_drawerTop_1pmir_143",w="_drawerBottom_1pmir_159",i="_comeInRight_1pmir_353",p="_comeOutRight_1pmir_361",s="_comeInLeft_1pmir_369",u="_comeOutLeft_1pmir_377",O="_comeInTop_1pmir_385",B="_comeOutTop_1pmir_393",l="_comeInBottom_1pmir_401",T="_comeOutBottom_1pmir_409",I="_drawerButton_1pmir_415",f={drawerOverlay:e,drawerContainer:r,drawerHeader:t,drawerHeaderTitle:o,drawerContent:a,drawerFooter:m,drawerCloseBtn:n,drawerRight:_,drawerLeft:d,drawerTop:c,drawerBottom:w,comeInRight:i,comeOutRight:p,comeInLeft:s,comeOutLeft:u,comeInTop:O,comeOutTop:B,comeInBottom:l,comeOutBottom:T,drawerButton:I};exports.comeInBottom=l;exports.comeInLeft=s;exports.comeInRight=i;exports.comeInTop=O;exports.comeOutBottom=T;exports.comeOutLeft=u;exports.comeOutRight=p;exports.comeOutTop=B;exports.default=f;exports.drawerBottom=w;exports.drawerButton=I;exports.drawerCloseBtn=n;exports.drawerContainer=r;exports.drawerContent=a;exports.drawerFooter=m;exports.drawerHeader=t;exports.drawerHeaderTitle=o;exports.drawerLeft=d;exports.drawerOverlay=e;exports.drawerRight=_;exports.drawerTop=c;
@@ -0,0 +1,45 @@
1
+ const r = "_drawerOverlay_1pmir_1", e = "_drawerContainer_1pmir_25", t = "_drawerHeader_1pmir_43", o = "_drawerHeaderTitle_1pmir_57", _ = "_drawerContent_1pmir_63", m = "_drawerFooter_1pmir_73", n = "_drawerCloseBtn_1pmir_93", a = "_drawerRight_1pmir_111", c = "_drawerLeft_1pmir_127", d = "_drawerTop_1pmir_143", w = "_drawerBottom_1pmir_159", i = "_comeInRight_1pmir_353", p = "_comeOutRight_1pmir_361", s = "_comeInLeft_1pmir_369", u = "_comeOutLeft_1pmir_377", B = "_comeInTop_1pmir_385", O = "_comeOutTop_1pmir_393", I = "_comeInBottom_1pmir_401", T = "_comeOutBottom_1pmir_409", l = "_drawerButton_1pmir_415", f = {
2
+ drawerOverlay: r,
3
+ drawerContainer: e,
4
+ drawerHeader: t,
5
+ drawerHeaderTitle: o,
6
+ drawerContent: _,
7
+ drawerFooter: m,
8
+ drawerCloseBtn: n,
9
+ drawerRight: a,
10
+ drawerLeft: c,
11
+ drawerTop: d,
12
+ drawerBottom: w,
13
+ comeInRight: i,
14
+ comeOutRight: p,
15
+ comeInLeft: s,
16
+ comeOutLeft: u,
17
+ comeInTop: B,
18
+ comeOutTop: O,
19
+ comeInBottom: I,
20
+ comeOutBottom: T,
21
+ drawerButton: l
22
+ };
23
+ export {
24
+ I as comeInBottom,
25
+ s as comeInLeft,
26
+ i as comeInRight,
27
+ B as comeInTop,
28
+ T as comeOutBottom,
29
+ u as comeOutLeft,
30
+ p as comeOutRight,
31
+ O as comeOutTop,
32
+ f as default,
33
+ w as drawerBottom,
34
+ l as drawerButton,
35
+ n as drawerCloseBtn,
36
+ e as drawerContainer,
37
+ _ as drawerContent,
38
+ m as drawerFooter,
39
+ t as drawerHeader,
40
+ o as drawerHeaderTitle,
41
+ c as drawerLeft,
42
+ r as drawerOverlay,
43
+ a as drawerRight,
44
+ d as drawerTop
45
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),c=require("react"),e=require("prop-types"),t=require("./TDrawer.module.css.js"),T=require("../TButton/index.js");function x(p){const{children:m,title:y="基础标题",okText:w="确定",cancelText:g="取消",open:d=!1,onClose:a=()=>{},type:l="right",containerStyles:k,headerStyles:C,footerStyles:j,btnStyles:o,footerButtons:i,maskClosable:v=!0}=p,[u,f]=c.useState(!1),[h,n]=c.useState(!1);c.useEffect(()=>{d?(f(!0),n(!1)):u&&(n(!0),setTimeout(()=>{f(!1),n(!1)},300))},[d]);const S=s.jsx("svg",{t:"1770778790558",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"5372",width:"25",height:"25",children:s.jsx("path",{d:"M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z",fill:"#707070","p-id":"5373"})});return s.jsx(s.Fragment,{children:u&&s.jsx("div",{className:`${t.default.drawerOverlay} ${h?t.default.fadeOut:t.default.fadeIn}`,onClick:r=>{v&&r.target===r.currentTarget&&a()},children:s.jsxs("div",{className:`${t.default.drawerContainer} ${t.default[`drawer${l.charAt(0).toUpperCase()+l.slice(1)}`]} ${h?t.default[`comeOut${l.charAt(0).toUpperCase()+l.slice(1)}`]:t.default[`comeIn${l.charAt(0).toUpperCase()+l.slice(1)}`]}`,style:k,children:[s.jsxs("div",{className:t.default.drawerHeader,children:[s.jsx("h3",{className:t.default.drawerHeaderTitle,style:C,children:y}),s.jsx("div",{className:t.default.drawerCloseBtn,onClick:a,children:S})]}),s.jsx("div",{className:t.default.drawerContent,children:m}),s.jsx("div",{className:t.default.drawerFooter,style:j,children:(i!=null&&i.length?i:[{key:"cancel",text:g,onClick:a},{key:"ok",text:w,onClick:a}]).map(r=>s.jsx(T,{onClick:r.onClick,style:(o==null?void 0:o[r.key])||{},className:t.default.drawerButton,children:r.text},r.key))})]})})})}x.propTypes={children:e.node.isRequired,title:e.string,okText:e.string,cancelText:e.string,open:e.bool,onOk:e.func,onClose:e.func,type:e.oneOf(["top","bottom","left","right"]),containerStyles:e.object,headerStyles:e.object,footerStyles:e.object,btnStyles:e.object,footerButtons:e.arrayOf(e.shape({key:e.string.isRequired,text:e.string.isRequired,onClick:e.func.isRequired})),maskClosable:e.bool};module.exports=x;
@@ -0,0 +1,110 @@
1
+ import { jsx as r, Fragment as N, jsxs as h } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as $ } from "react";
3
+ import e from "prop-types";
4
+ import t from "./TDrawer.module.css.mjs";
5
+ import b from "../TButton/index.mjs";
6
+ function j(u) {
7
+ const {
8
+ children: y,
9
+ title: g = "基础标题",
10
+ okText: k = "确定",
11
+ cancelText: w = "取消",
12
+ open: c = !1,
13
+ onClose: l = () => {
14
+ },
15
+ type: o = "right",
16
+ containerStyles: C,
17
+ headerStyles: x,
18
+ footerStyles: v,
19
+ btnStyles: i,
20
+ footerButtons: a,
21
+ maskClosable: S = !0
22
+ } = u, [d, f] = p(!1), [m, n] = p(!1);
23
+ $(() => {
24
+ c ? (f(!0), n(!1)) : d && (n(!0), setTimeout(() => {
25
+ f(!1), n(!1);
26
+ }, 300));
27
+ }, [c]);
28
+ const T = /* @__PURE__ */ r(
29
+ "svg",
30
+ {
31
+ t: "1770778790558",
32
+ class: "icon",
33
+ viewBox: "0 0 1024 1024",
34
+ version: "1.1",
35
+ xmlns: "http://www.w3.org/2000/svg",
36
+ "p-id": "5372",
37
+ width: "25",
38
+ height: "25",
39
+ children: /* @__PURE__ */ r(
40
+ "path",
41
+ {
42
+ d: "M512 466.944l233.472-233.472a31.744 31.744 0 0 1 45.056 45.056L557.056 512l233.472 233.472a31.744 31.744 0 0 1-45.056 45.056L512 557.056l-233.472 233.472a31.744 31.744 0 0 1-45.056-45.056L466.944 512 233.472 278.528a31.744 31.744 0 0 1 45.056-45.056z",
43
+ fill: "#707070",
44
+ "p-id": "5373"
45
+ }
46
+ )
47
+ }
48
+ );
49
+ return /* @__PURE__ */ r(N, { children: d && /* @__PURE__ */ r(
50
+ "div",
51
+ {
52
+ className: `${t.drawerOverlay} ${m ? t.fadeOut : t.fadeIn}`,
53
+ onClick: (s) => {
54
+ S && s.target === s.currentTarget && l();
55
+ },
56
+ children: /* @__PURE__ */ h(
57
+ "div",
58
+ {
59
+ className: `${t.drawerContainer} ${t[`drawer${o.charAt(0).toUpperCase() + o.slice(1)}`]} ${m ? t[`comeOut${o.charAt(0).toUpperCase() + o.slice(1)}`] : t[`comeIn${o.charAt(0).toUpperCase() + o.slice(1)}`]}`,
60
+ style: C,
61
+ children: [
62
+ /* @__PURE__ */ h("div", { className: t.drawerHeader, children: [
63
+ /* @__PURE__ */ r("h3", { className: t.drawerHeaderTitle, style: x, children: g }),
64
+ /* @__PURE__ */ r("div", { className: t.drawerCloseBtn, onClick: l, children: T })
65
+ ] }),
66
+ /* @__PURE__ */ r("div", { className: t.drawerContent, children: y }),
67
+ /* @__PURE__ */ r("div", { className: t.drawerFooter, style: v, children: (a != null && a.length ? a : [
68
+ { key: "cancel", text: w, onClick: l },
69
+ { key: "ok", text: k, onClick: l }
70
+ ]).map((s) => /* @__PURE__ */ r(
71
+ b,
72
+ {
73
+ onClick: s.onClick,
74
+ style: (i == null ? void 0 : i[s.key]) || {},
75
+ className: t.drawerButton,
76
+ children: s.text
77
+ },
78
+ s.key
79
+ )) })
80
+ ]
81
+ }
82
+ )
83
+ }
84
+ ) });
85
+ }
86
+ j.propTypes = {
87
+ children: e.node.isRequired,
88
+ title: e.string,
89
+ okText: e.string,
90
+ cancelText: e.string,
91
+ open: e.bool,
92
+ onOk: e.func,
93
+ onClose: e.func,
94
+ type: e.oneOf(["top", "bottom", "left", "right"]),
95
+ containerStyles: e.object,
96
+ headerStyles: e.object,
97
+ footerStyles: e.object,
98
+ btnStyles: e.object,
99
+ footerButtons: e.arrayOf(
100
+ e.shape({
101
+ key: e.string.isRequired,
102
+ text: e.string.isRequired,
103
+ onClick: e.func.isRequired
104
+ })
105
+ ),
106
+ maskClosable: e.bool
107
+ };
108
+ export {
109
+ j as default
110
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="_input_1xl1h_1",u="_inputSmall_1xl1h_45",i="_inputMedium_1xl1h_57",n="_inputLarge_1xl1h_67",e="_inputHuge_1xl1h_79",p="_inputDisabled_1xl1h_91",l="_inputTextarea_1xl1h_107",_="_inputError_1xl1h_117",r={input:t,inputSmall:u,inputMedium:i,inputLarge:n,inputHuge:e,inputDisabled:p,inputTextarea:l,inputError:_};exports.default=r;exports.input=t;exports.inputDisabled=p;exports.inputError=_;exports.inputHuge=e;exports.inputLarge=n;exports.inputMedium=i;exports.inputSmall=u;exports.inputTextarea=l;
@@ -0,0 +1,21 @@
1
+ const t = "_input_1xl1h_1", n = "_inputSmall_1xl1h_45", u = "_inputMedium_1xl1h_57", i = "_inputLarge_1xl1h_67", p = "_inputHuge_1xl1h_79", _ = "_inputDisabled_1xl1h_91", e = "_inputTextarea_1xl1h_107", l = "_inputError_1xl1h_117", a = {
2
+ input: t,
3
+ inputSmall: n,
4
+ inputMedium: u,
5
+ inputLarge: i,
6
+ inputHuge: p,
7
+ inputDisabled: _,
8
+ inputTextarea: e,
9
+ inputError: l
10
+ };
11
+ export {
12
+ a as default,
13
+ t as input,
14
+ _ as inputDisabled,
15
+ l as inputError,
16
+ p as inputHuge,
17
+ i as inputLarge,
18
+ u as inputMedium,
19
+ n as inputSmall,
20
+ e as inputTextarea
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime");require("react");const e=require("prop-types"),a=require("./TInput.module.css.js"),V=require("../CSSFab/useTangoStyle.js");function l(p){const{type:o="default",size:n="medium",sx:s={},style:m={},className:f="",onClick:y=()=>{},onChange:i=()=>{},value:u,defaultValue:g="",disabled:r=!1,placeholder:x="",maxlength:C=524288}=p,h=a.default.input,b=a.default[`input${n.charAt(0).toUpperCase()+n.slice(1)}`]||"",v=r?a.default.inputDisabled:"",j=typeof s=="object"?s:{},S=V.useTangoStyle(j),T=typeof s=="string"?s:"",d=u!==void 0,N=[h,b,v,T,f].filter(Boolean).join(" "),q={...S,...m},w=o==="password"?"password":"text",c={className:N,style:q,onClick:y,onChange:i?z=>i(z.target.value):void 0,value:d?u:void 0,defaultValue:d?void 0:g,disabled:r,placeholder:x,maxLength:C};return t.jsx("div",{children:o==="textarea"?t.jsx("textarea",{...c}):t.jsx("input",{...c,type:w})})}l.propTypes={type:e.oneOf(["default","textarea","password"]),size:e.oneOf(["small","medium","large","huge"]),sx:e.oneOfType([e.object,e.string]),style:e.object,onClick:e.func,onChange:e.func,className:e.string,value:e.string,defaultValue:e.string,disabled:e.bool,placeholder:e.string,maxlength:e.number};l.defaultProps={type:"default",size:"medium",sx:{},style:{},onClick:()=>{},className:"",onChange:void 0,value:void 0,defaultValue:"",disabled:!1,placeholder:"",maxlength:524288};module.exports=l;
@@ -0,0 +1,74 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import "react";
3
+ import e from "prop-types";
4
+ import a from "./TInput.module.css.mjs";
5
+ import { useTangoStyle as V } from "../CSSFab/useTangoStyle.mjs";
6
+ function p(c) {
7
+ const {
8
+ type: l = "default",
9
+ size: o = "medium",
10
+ sx: s = {},
11
+ style: m = {},
12
+ className: f = "",
13
+ onClick: y = () => {
14
+ },
15
+ onChange: n = () => {
16
+ },
17
+ value: i,
18
+ defaultValue: g = "",
19
+ disabled: r = !1,
20
+ placeholder: x = "",
21
+ maxlength: C = 524288
22
+ } = c, h = a.input, b = a[`input${o.charAt(0).toUpperCase() + o.slice(1)}`] || "", v = r ? a.inputDisabled : "", S = V(typeof s == "object" ? s : {}), N = typeof s == "string" ? s : "", d = i !== void 0, j = [
23
+ h,
24
+ b,
25
+ v,
26
+ N,
27
+ // sx 为 className 字符串
28
+ f
29
+ // 额外 className
30
+ ].filter(Boolean).join(" "), w = { ...S, ...m }, T = l === "password" ? "password" : "text", u = {
31
+ className: j,
32
+ style: w,
33
+ onClick: y,
34
+ onChange: n ? (z) => n(z.target.value) : void 0,
35
+ value: d ? i : void 0,
36
+ defaultValue: d ? void 0 : g,
37
+ disabled: r,
38
+ placeholder: x,
39
+ maxLength: C
40
+ };
41
+ return /* @__PURE__ */ t("div", { children: l === "textarea" ? /* @__PURE__ */ t("textarea", { ...u }) : /* @__PURE__ */ t("input", { ...u, type: T }) });
42
+ }
43
+ p.propTypes = {
44
+ type: e.oneOf(["default", "textarea", "password"]),
45
+ size: e.oneOf(["small", "medium", "large", "huge"]),
46
+ sx: e.oneOfType([e.object, e.string]),
47
+ style: e.object,
48
+ onClick: e.func,
49
+ onChange: e.func,
50
+ className: e.string,
51
+ value: e.string,
52
+ defaultValue: e.string,
53
+ disabled: e.bool,
54
+ placeholder: e.string,
55
+ maxlength: e.number
56
+ };
57
+ p.defaultProps = {
58
+ type: "default",
59
+ size: "medium",
60
+ sx: {},
61
+ style: {},
62
+ onClick: () => {
63
+ },
64
+ className: "",
65
+ onChange: void 0,
66
+ value: void 0,
67
+ defaultValue: "",
68
+ disabled: !1,
69
+ placeholder: "",
70
+ maxlength: 524288
71
+ };
72
+ export {
73
+ p as default
74
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),l=require("prop-types");;/* empty css */function c(r){const{children:s,type:a,className:i=""}=r,t=`clay-layout clay-layout-${a} ${i}`;return e.jsxs("div",{className:t,children:[a==="top-middle-bottom"&&e.jsxs("div",{className:"ultra",children:[e.jsx("header",{className:"clay-header",children:s[0]}),e.jsx("main",{className:"clay-main",children:s[1]}),e.jsx("footer",{className:"clay-footer",children:s[2]})]}),a==="top-bottom-split"&&e.jsxs("div",{className:"ultra",children:[e.jsx("header",{className:"clay-header",children:s[0]}),e.jsxs("main",{className:"clay-main",children:[e.jsx("aside",{className:"clay-aside",children:s[1]}),e.jsx("div",{className:"clay-content",children:s[2]})]})]}),a==="left-right-top-bottom"&&e.jsxs(e.Fragment,{children:[e.jsx("header",{className:"clay-header",children:s[0]}),e.jsxs("div",{className:"clay-main",children:[e.jsx("aside",{className:"clay-aside",children:s[1]}),e.jsxs("div",{className:"clay-right",children:[e.jsx("header",{className:"clay-header",children:s[2]}),e.jsx("div",{className:"clay-content",children:s[3]})]})]})]}),a==="left-right-three-parts"&&e.jsxs("div",{className:"ultra",children:[e.jsx("aside",{className:"clay-aside",children:s[0]}),e.jsxs("div",{className:"clay-right",children:[e.jsx("header",{className:"clay-header",children:s[1]}),e.jsx("main",{className:"clay-main",children:s[2]}),e.jsx("footer",{className:"clay-footer",children:s[3]})]})]})]})}c.propTypes={children:l.node.isRequired,className:l.string,type:l.oneOf(["top-middle-bottom","top-bottom-split","left-right-top-bottom","left-right-three-parts"]).isRequired};module.exports=c;
@@ -0,0 +1,52 @@
1
+ import { jsxs as l, jsx as a, Fragment as d } from "react/jsx-runtime";
2
+ import s from "prop-types";
3
+ /* empty css */
4
+ function m(r) {
5
+ const { children: e, type: c, className: i = "" } = r, t = `clay-layout clay-layout-${c} ${i}`;
6
+ return /* @__PURE__ */ l("div", { className: t, children: [
7
+ c === "top-middle-bottom" && /* @__PURE__ */ l("div", { className: "ultra", children: [
8
+ /* @__PURE__ */ a("header", { className: "clay-header", children: e[0] }),
9
+ /* @__PURE__ */ a("main", { className: "clay-main", children: e[1] }),
10
+ /* @__PURE__ */ a("footer", { className: "clay-footer", children: e[2] })
11
+ ] }),
12
+ c === "top-bottom-split" && /* @__PURE__ */ l("div", { className: "ultra", children: [
13
+ /* @__PURE__ */ a("header", { className: "clay-header", children: e[0] }),
14
+ /* @__PURE__ */ l("main", { className: "clay-main", children: [
15
+ /* @__PURE__ */ a("aside", { className: "clay-aside", children: e[1] }),
16
+ /* @__PURE__ */ a("div", { className: "clay-content", children: e[2] })
17
+ ] })
18
+ ] }),
19
+ c === "left-right-top-bottom" && /* @__PURE__ */ l(d, { children: [
20
+ /* @__PURE__ */ a("header", { className: "clay-header", children: e[0] }),
21
+ /* @__PURE__ */ l("div", { className: "clay-main", children: [
22
+ /* @__PURE__ */ a("aside", { className: "clay-aside", children: e[1] }),
23
+ /* @__PURE__ */ l("div", { className: "clay-right", children: [
24
+ /* @__PURE__ */ a("header", { className: "clay-header", children: e[2] }),
25
+ /* @__PURE__ */ a("div", { className: "clay-content", children: e[3] })
26
+ ] })
27
+ ] })
28
+ ] }),
29
+ c === "left-right-three-parts" && /* @__PURE__ */ l("div", { className: "ultra", children: [
30
+ /* @__PURE__ */ a("aside", { className: "clay-aside", children: e[0] }),
31
+ /* @__PURE__ */ l("div", { className: "clay-right", children: [
32
+ /* @__PURE__ */ a("header", { className: "clay-header", children: e[1] }),
33
+ /* @__PURE__ */ a("main", { className: "clay-main", children: e[2] }),
34
+ /* @__PURE__ */ a("footer", { className: "clay-footer", children: e[3] })
35
+ ] })
36
+ ] })
37
+ ] });
38
+ }
39
+ m.propTypes = {
40
+ children: s.node.isRequired,
41
+ className: s.string,
42
+ // 添加 className PropTypes
43
+ type: s.oneOf([
44
+ "top-middle-bottom",
45
+ "top-bottom-split",
46
+ "left-right-top-bottom",
47
+ "left-right-three-parts"
48
+ ]).isRequired
49
+ };
50
+ export {
51
+ m as default
52
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_line_6n8gg_1",n="_lineSmall_6n8gg_17",l="_lineMedium_6n8gg_25",i="_lineLarge_6n8gg_33",t="_lineHuge_6n8gg_41",g="_lineNoText_6n8gg_81",_="_lineText_6n8gg_91",o={line:e,lineSmall:n,lineMedium:l,lineLarge:i,lineHuge:t,lineNoText:g,lineText:_};exports.default=o;exports.line=e;exports.lineHuge=t;exports.lineLarge=i;exports.lineMedium=l;exports.lineNoText=g;exports.lineSmall=n;exports.lineText=_;
@@ -0,0 +1,19 @@
1
+ const e = "_line_6n8gg_1", n = "_lineSmall_6n8gg_17", l = "_lineMedium_6n8gg_25", i = "_lineLarge_6n8gg_33", _ = "_lineHuge_6n8gg_41", g = "_lineNoText_6n8gg_81", t = "_lineText_6n8gg_91", o = {
2
+ line: e,
3
+ lineSmall: n,
4
+ lineMedium: l,
5
+ lineLarge: i,
6
+ lineHuge: _,
7
+ lineNoText: g,
8
+ lineText: t
9
+ };
10
+ export {
11
+ o as default,
12
+ e as line,
13
+ _ as lineHuge,
14
+ i as lineLarge,
15
+ l as lineMedium,
16
+ g as lineNoText,
17
+ n as lineSmall,
18
+ t as lineText
19
+ };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("react/jsx-runtime");require("react");const e=require("prop-types"),s=require("./TLine.module.css.js"),g=require("../CSSFab/useTangoStyle.js");function c(a){const{sx:t={},style:r={},className:u="",onClick:d=()=>{},children:n,size:l="medium"}=a,m=typeof t=="object"?t:{},x=g.useTangoStyle(m),y=typeof t=="string"?t:"",i=!!n,f=s.default[`line${l.charAt(0).toUpperCase()+l.slice(1)}`]||"",p=i?s.default.lineHasText:s.default.lineNoText,T=[s.default.line,f,p,y,u].filter(Boolean).join(" "),C={...x,...r};return o.jsx("div",{style:C,onClick:d,className:T,children:i&&o.jsx("div",{className:s.default.lineText,children:n})})}c.propTypes={sx:e.oneOfType([e.object,e.string]),size:e.oneOf(["small","medium","large","huge"]),style:e.object,onClick:e.func,className:e.string,children:e.node.isRequired};module.exports=c;