litten-hooks 1.0.0 → 1.1.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/dist/enum.js +11 -5
- package/dist/global/enum.d.ts +46 -0
- package/dist/index.js +29 -23
- package/package.json +9 -9
package/dist/enum.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e = /* @__PURE__ */ ((r) => (r.disabled = "disabled", r.enabled = "enabled", r))(e || {}), u = /* @__PURE__ */ ((r) => (r.mouseup = "mouseup", r.mousedown = "mousedown", r.mouseover = "mouseover", r.mouseout = "mouseout", r.mousemove = "mousemove", r.none = "mousenone", r))(u || {}), m = /* @__PURE__ */ ((r) => (r.focus = "focus", r.blur = "blur", r))(m || {}), a = /* @__PURE__ */ ((r) => (r.Button = "Button", r.Checkbox = "Checkbox", r.Form = "Form", r.FormControl = "FormControl", r.FormLabel = "FormLabel", r.IconButton = "IconButton", r.Loading = "Loading", r.Radio = "Radio", r.Ripple = "Ripple", r.RippleFocus = "RippleFocus", r.RadioGroup = "RadioGroup", r.Summary = "Summary", r.Switch = "Switch", r.StackPanel = "StackPanel", r.Slider = "Slider", r.TextField = "TextField", r.Wave = "Wave", r))(a || {}), i = /* @__PURE__ */ ((r) => (r.top = "placementTop", r.bottom = "placementBottom", r.left = "placementLeft", r.right = "placementRight", r))(i || {}), d = /* @__PURE__ */ ((r) => (r.circle = "circle", r.rectangle = "rectangle", r))(d || {}), o = /* @__PURE__ */ ((r) => (r.Default = "Default", r.UserInput = "UserInput", r.DevSet = "DevSet", r))(o || {}), c = /* @__PURE__ */ ((r) => (r.checked = "checked", r.unChecked = "unChecked", r.indeterminate = "indeterminate", r))(c || {}), n = /* @__PURE__ */ ((r) => (r.text = "text", r.password = "password", r))(n || {}), v = /* @__PURE__ */ ((r) => (r.vertical = "vertical", r.horizontal = "horizontal", r))(v || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
o as ChangeEventState,
|
|
4
|
+
c as CheckState,
|
|
5
|
+
a as ControlType,
|
|
6
|
+
e as EnableState,
|
|
7
|
+
m as FocusState,
|
|
8
|
+
u as MouseState,
|
|
9
|
+
v as Orientation,
|
|
10
|
+
i as Placement,
|
|
11
|
+
d as Shape,
|
|
12
|
+
n as TextFieldType
|
|
7
13
|
};
|
package/dist/global/enum.d.ts
CHANGED
|
@@ -45,3 +45,49 @@ export declare enum ControlType {
|
|
|
45
45
|
TextField = "TextField",
|
|
46
46
|
Wave = "Wave"
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* 位置
|
|
50
|
+
*/
|
|
51
|
+
export declare enum Placement {
|
|
52
|
+
top = "placementTop",
|
|
53
|
+
bottom = "placementBottom",
|
|
54
|
+
left = "placementLeft",
|
|
55
|
+
right = "placementRight"
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 形状
|
|
59
|
+
*/
|
|
60
|
+
export declare enum Shape {
|
|
61
|
+
circle = "circle",
|
|
62
|
+
rectangle = "rectangle"
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* ChangeEvent状态
|
|
66
|
+
*/
|
|
67
|
+
export declare enum ChangeEventState {
|
|
68
|
+
Default = "Default",
|
|
69
|
+
UserInput = "UserInput",
|
|
70
|
+
DevSet = "DevSet"
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 勾选状态
|
|
74
|
+
*/
|
|
75
|
+
export declare enum CheckState {
|
|
76
|
+
checked = "checked",
|
|
77
|
+
unChecked = "unChecked",
|
|
78
|
+
indeterminate = "indeterminate"
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* TextField类型
|
|
82
|
+
*/
|
|
83
|
+
export declare enum TextFieldType {
|
|
84
|
+
text = "text",
|
|
85
|
+
password = "password"
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 定义控件或布局可以具有的不同方向。
|
|
89
|
+
*/
|
|
90
|
+
export declare enum Orientation {
|
|
91
|
+
vertical = "vertical",
|
|
92
|
+
horizontal = "horizontal"
|
|
93
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import { ControlType as
|
|
2
|
-
import { s as
|
|
3
|
-
import { g as
|
|
4
|
-
import { u as
|
|
5
|
-
import { g as
|
|
6
|
-
import { g as
|
|
7
|
-
import { u as
|
|
1
|
+
import { ChangeEventState as a, CheckState as s, ControlType as u, EnableState as o, FocusState as r, MouseState as l, Orientation as p, Placement as n, Shape as i, TextFieldType as m } from "./enum.js";
|
|
2
|
+
import { s as f, u as g } from "./chunks/checkedControl.BcxCIv6S.js";
|
|
3
|
+
import { g as C, a as c, u as d } from "./chunks/contentControl.BDOf7ZM1.js";
|
|
4
|
+
import { u as h } from "./chunks/disabledControl.SpguzRdp.js";
|
|
5
|
+
import { g as F, u as V } from "./chunks/focusControl.CRsuxRz-.js";
|
|
6
|
+
import { g as v, s as B, u as D } from "./chunks/userControl.BSXLnyVL.js";
|
|
7
|
+
import { u as P } from "./chunks/usePrevious.VSe_Wq1g.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
u as
|
|
12
|
-
o as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
a as ChangeEventState,
|
|
10
|
+
s as CheckState,
|
|
11
|
+
u as ControlType,
|
|
12
|
+
o as EnableState,
|
|
13
|
+
r as FocusState,
|
|
14
|
+
l as MouseState,
|
|
15
|
+
p as Orientation,
|
|
16
|
+
n as Placement,
|
|
17
|
+
i as Shape,
|
|
18
|
+
m as TextFieldType,
|
|
19
|
+
C as getCurrentValue,
|
|
20
|
+
c as getDefaultValueByDisplayName,
|
|
21
|
+
v as getLabelMouseState,
|
|
22
|
+
F as getStateByFocused,
|
|
23
|
+
f as setCheckedByGroupValue,
|
|
24
|
+
B as setLabelMouseState,
|
|
25
|
+
g as useCurrentChecked,
|
|
26
|
+
d as useCurrentValue,
|
|
27
|
+
h as useDisabled,
|
|
28
|
+
V as useFocused,
|
|
29
|
+
P as usePrevious,
|
|
30
|
+
D as useRelativePosition
|
|
25
31
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litten-hooks",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@commitlint/cli": "^19.3.0",
|
|
37
37
|
"@commitlint/config-conventional": "^19.2.2",
|
|
38
38
|
"@storybook/addon-coverage": "^1.0.1",
|
|
39
|
-
"@storybook/addon-essentials": "^8.0.
|
|
40
|
-
"@storybook/addon-interactions": "^8.0.
|
|
41
|
-
"@storybook/addon-links": "^8.0.
|
|
42
|
-
"@storybook/blocks": "^8.0.
|
|
43
|
-
"@storybook/react": "^8.0.
|
|
44
|
-
"@storybook/react-vite": "^8.0.
|
|
45
|
-
"@storybook/test": "^8.0.
|
|
39
|
+
"@storybook/addon-essentials": "^8.0.10",
|
|
40
|
+
"@storybook/addon-interactions": "^8.0.10",
|
|
41
|
+
"@storybook/addon-links": "^8.0.10",
|
|
42
|
+
"@storybook/blocks": "^8.0.10",
|
|
43
|
+
"@storybook/react": "^8.0.10",
|
|
44
|
+
"@storybook/react-vite": "^8.0.10",
|
|
45
|
+
"@storybook/test": "^8.0.10",
|
|
46
46
|
"@storybook/test-runner": "^0.17.0",
|
|
47
47
|
"@types/react": "^18.2.66",
|
|
48
48
|
"@types/react-dom": "^18.2.22",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"husky": "^9.0.11",
|
|
59
59
|
"litten": "^0.9.5",
|
|
60
60
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
61
|
-
"storybook": "^8.0.
|
|
61
|
+
"storybook": "^8.0.10",
|
|
62
62
|
"typescript": "^5.2.2",
|
|
63
63
|
"vite": "^5.2.0",
|
|
64
64
|
"vite-plugin-dts": "^3.9.0",
|