qstd 0.3.7 → 0.3.9
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/CHANGELOG.md +16 -0
- package/README.md +28 -3
- package/dist/block/checkbox.d.ts.map +1 -1
- package/dist/block/fns.d.ts +2 -0
- package/dist/block/fns.d.ts.map +1 -1
- package/dist/block/input.d.ts.map +1 -1
- package/dist/block/radio.d.ts.map +1 -1
- package/dist/block/textarea.d.ts.map +1 -1
- package/dist/block/tooltip.d.ts.map +1 -1
- package/dist/block/types.d.ts +5 -1
- package/dist/block/types.d.ts.map +1 -1
- package/dist/client/browser.d.ts.map +1 -1
- package/dist/client/haptics.d.ts +45 -0
- package/dist/client/haptics.d.ts.map +1 -0
- package/dist/client/index.cjs +43 -10
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +43 -11
- package/dist/react/index.cjs +66 -25
- package/dist/react/index.js +66 -25
- package/dist/server/index.cjs +21951 -623
- package/dist/server/index.js +21939 -616
- package/package.json +1 -3
package/dist/react/index.js
CHANGED
|
@@ -597,7 +597,7 @@ var loadingIcons = Object.keys(loadingIconsMap);
|
|
|
597
597
|
var Div = tags.div;
|
|
598
598
|
var MotionDiv = motionTags.div;
|
|
599
599
|
function MenuContainer(props) {
|
|
600
|
-
const { children, ...rest } = props;
|
|
600
|
+
const { children, onAnimationStart, onAnimationComplete, ...rest } = props;
|
|
601
601
|
return /* @__PURE__ */ jsx(Div, { ...rest, role: "menu", "data-menu-container": true, children });
|
|
602
602
|
}
|
|
603
603
|
function Menu(props) {
|
|
@@ -1032,13 +1032,15 @@ var extractElAndStyles = (extract, anyProps) => {
|
|
|
1032
1032
|
transition,
|
|
1033
1033
|
variants,
|
|
1034
1034
|
custom,
|
|
1035
|
+
onAnimationStart,
|
|
1036
|
+
onAnimationComplete,
|
|
1035
1037
|
...rest
|
|
1036
1038
|
} = anyProps;
|
|
1037
1039
|
const asTag = anyProps.as;
|
|
1038
1040
|
const effectiveEl = asTag && asTag in tags ? asTag : extract.el;
|
|
1039
1041
|
const StdComp = tags[effectiveEl] || tags.div;
|
|
1040
1042
|
const MotionComp = motionTags[effectiveEl] || motionTags.div;
|
|
1041
|
-
const hasMotionProps = _motion !== void 0 || layout !== void 0 || initial !== void 0 || animate !== void 0 || exit !== void 0 || whileHover !== void 0 || whileTap !== void 0 || whileFocus !== void 0 || variants !== void 0 || transition !== void 0 || custom !== void 0;
|
|
1043
|
+
const hasMotionProps = _motion !== void 0 || layout !== void 0 || initial !== void 0 || animate !== void 0 || exit !== void 0 || whileHover !== void 0 || whileTap !== void 0 || whileFocus !== void 0 || variants !== void 0 || transition !== void 0 || custom !== void 0 || onAnimationStart !== void 0 || onAnimationComplete !== void 0;
|
|
1042
1044
|
const comp = hasMotionProps ? MotionComp : StdComp;
|
|
1043
1045
|
const motionProps = hasMotionProps ? {
|
|
1044
1046
|
layout,
|
|
@@ -1050,7 +1052,9 @@ var extractElAndStyles = (extract, anyProps) => {
|
|
|
1050
1052
|
whileFocus,
|
|
1051
1053
|
variants,
|
|
1052
1054
|
custom,
|
|
1053
|
-
transition: _motion ?? transition
|
|
1055
|
+
transition: _motion ?? transition,
|
|
1056
|
+
onAnimationStart,
|
|
1057
|
+
onAnimationComplete
|
|
1054
1058
|
} : void 0;
|
|
1055
1059
|
const propsToOmit = [
|
|
1056
1060
|
"loadingPosition",
|
|
@@ -1465,6 +1469,8 @@ function Radio(props) {
|
|
|
1465
1469
|
options,
|
|
1466
1470
|
renderOption,
|
|
1467
1471
|
onKeyDown: onKeyDownProp,
|
|
1472
|
+
onAnimationStart,
|
|
1473
|
+
onAnimationComplete,
|
|
1468
1474
|
...rest
|
|
1469
1475
|
} = props;
|
|
1470
1476
|
const groupId = React13__default.useId();
|
|
@@ -1596,6 +1602,8 @@ function Item(props) {
|
|
|
1596
1602
|
onClick: onClickProp,
|
|
1597
1603
|
onFocus: onFocusProp,
|
|
1598
1604
|
onBlur: onBlurProp,
|
|
1605
|
+
onAnimationStart,
|
|
1606
|
+
onAnimationComplete,
|
|
1599
1607
|
...rest
|
|
1600
1608
|
} = props;
|
|
1601
1609
|
const ctx = React13__default.useContext(RadioContext);
|
|
@@ -1754,13 +1762,10 @@ var Base3 = base;
|
|
|
1754
1762
|
var isBrowser = typeof window !== "undefined";
|
|
1755
1763
|
var useIsomorphicLayoutEffect = isBrowser ? React13__default.useLayoutEffect : React13__default.useEffect;
|
|
1756
1764
|
function pick(props, obj) {
|
|
1757
|
-
return props.reduce(
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
},
|
|
1762
|
-
{}
|
|
1763
|
-
);
|
|
1765
|
+
return props.reduce((acc, prop) => {
|
|
1766
|
+
acc[prop] = obj[prop];
|
|
1767
|
+
return acc;
|
|
1768
|
+
}, {});
|
|
1764
1769
|
}
|
|
1765
1770
|
function assignRefs(targetRef, userRef) {
|
|
1766
1771
|
return (node) => {
|
|
@@ -1881,6 +1886,8 @@ function Textarea(props) {
|
|
|
1881
1886
|
children,
|
|
1882
1887
|
_motion,
|
|
1883
1888
|
error,
|
|
1889
|
+
onAnimationStart,
|
|
1890
|
+
onAnimationComplete,
|
|
1884
1891
|
...rest
|
|
1885
1892
|
} = props;
|
|
1886
1893
|
const isControlled = rest.value !== void 0;
|
|
@@ -1998,7 +2005,15 @@ function Textarea(props) {
|
|
|
1998
2005
|
] });
|
|
1999
2006
|
}
|
|
2000
2007
|
function Label(props) {
|
|
2001
|
-
const {
|
|
2008
|
+
const {
|
|
2009
|
+
value,
|
|
2010
|
+
error,
|
|
2011
|
+
required,
|
|
2012
|
+
children,
|
|
2013
|
+
onAnimationStart,
|
|
2014
|
+
onAnimationComplete,
|
|
2015
|
+
...rest
|
|
2016
|
+
} = props;
|
|
2002
2017
|
return /* @__PURE__ */ jsxs(
|
|
2003
2018
|
Base3,
|
|
2004
2019
|
{
|
|
@@ -2076,7 +2091,14 @@ var RightSideNameKey = "RightSide";
|
|
|
2076
2091
|
var InputBase = tags.input;
|
|
2077
2092
|
var Base4 = base;
|
|
2078
2093
|
function Input(props) {
|
|
2079
|
-
const {
|
|
2094
|
+
const {
|
|
2095
|
+
_motion,
|
|
2096
|
+
error,
|
|
2097
|
+
children,
|
|
2098
|
+
onAnimationStart,
|
|
2099
|
+
onAnimationComplete,
|
|
2100
|
+
...rest
|
|
2101
|
+
} = props;
|
|
2080
2102
|
const label = findChildrenByDisplayName(
|
|
2081
2103
|
children,
|
|
2082
2104
|
LabelNameKey2
|
|
@@ -2129,15 +2151,18 @@ function Input(props) {
|
|
|
2129
2151
|
] });
|
|
2130
2152
|
}
|
|
2131
2153
|
function LeftIcon(props) {
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2154
|
+
const {
|
|
2155
|
+
iconPrefix,
|
|
2156
|
+
startIcon,
|
|
2157
|
+
endIcon,
|
|
2158
|
+
icon,
|
|
2159
|
+
spin,
|
|
2160
|
+
size,
|
|
2161
|
+
pulse,
|
|
2162
|
+
onAnimationStart,
|
|
2163
|
+
onAnimationComplete,
|
|
2164
|
+
...remaining
|
|
2165
|
+
} = props;
|
|
2141
2166
|
return /* @__PURE__ */ jsx(
|
|
2142
2167
|
Base4,
|
|
2143
2168
|
{
|
|
@@ -2152,7 +2177,7 @@ function LeftIcon(props) {
|
|
|
2152
2177
|
}
|
|
2153
2178
|
LeftIcon.displayName = LeftSideNameKey;
|
|
2154
2179
|
function RightSide(props) {
|
|
2155
|
-
const { clearable, ...rest } = props;
|
|
2180
|
+
const { clearable, onAnimationStart, onAnimationComplete, ...rest } = props;
|
|
2156
2181
|
if (clearable && !props.value) return null;
|
|
2157
2182
|
return /* @__PURE__ */ jsx(
|
|
2158
2183
|
Base4,
|
|
@@ -2177,7 +2202,16 @@ function RightSide(props) {
|
|
|
2177
2202
|
}
|
|
2178
2203
|
RightSide.displayName = RightSideNameKey;
|
|
2179
2204
|
function Label2(props) {
|
|
2180
|
-
const {
|
|
2205
|
+
const {
|
|
2206
|
+
value,
|
|
2207
|
+
error,
|
|
2208
|
+
required,
|
|
2209
|
+
children,
|
|
2210
|
+
hasLeftIcon,
|
|
2211
|
+
onAnimationStart,
|
|
2212
|
+
onAnimationComplete,
|
|
2213
|
+
...rest
|
|
2214
|
+
} = props;
|
|
2181
2215
|
const ml = hasLeftIcon ? 6 : 1;
|
|
2182
2216
|
return /* @__PURE__ */ jsxs(
|
|
2183
2217
|
Base4,
|
|
@@ -3258,7 +3292,14 @@ function SliderThumb(props) {
|
|
|
3258
3292
|
SliderThumb.displayName = ThumbNameKey2;
|
|
3259
3293
|
var Base5 = base;
|
|
3260
3294
|
var TooltipContainer = React13__default.forwardRef(function TooltipContainer2(props, ref) {
|
|
3261
|
-
const {
|
|
3295
|
+
const {
|
|
3296
|
+
children,
|
|
3297
|
+
className,
|
|
3298
|
+
style,
|
|
3299
|
+
onAnimationStart,
|
|
3300
|
+
onAnimationComplete,
|
|
3301
|
+
...rest
|
|
3302
|
+
} = props;
|
|
3262
3303
|
return /* @__PURE__ */ jsx(
|
|
3263
3304
|
Base5,
|
|
3264
3305
|
{
|
|
@@ -3620,7 +3661,7 @@ var Base6 = base;
|
|
|
3620
3661
|
var Svg = motionTags.svg;
|
|
3621
3662
|
var CheckboxBtn = motionTags.button;
|
|
3622
3663
|
function Checkbox(props) {
|
|
3623
|
-
const { children, onClick, ...rest } = props;
|
|
3664
|
+
const { children, onClick, onAnimationStart, onAnimationComplete, ...rest } = props;
|
|
3624
3665
|
const [checked, setChecked] = React13__default.useState(false);
|
|
3625
3666
|
const [indeterminate, setIndeterminate] = React13__default.useState(false);
|
|
3626
3667
|
React13__default.useEffect(() => {
|