@vnejs/uis.react.button-controls 0.1.6 → 0.1.7
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/ButtonControls.d.ts +2 -11
- package/dist/ButtonControls.d.ts.map +1 -1
- package/dist/ButtonControls.js.map +1 -1
- package/dist/ButtonControls.types.d.ts +29 -0
- package/dist/ButtonControls.types.d.ts.map +1 -0
- package/dist/ButtonControls.types.js +2 -0
- package/dist/ButtonControls.types.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ButtonControls.tsx +3 -1
- package/src/ButtonControls.types.tsx +29 -0
- package/src/index.ts +2 -1
- package/tsconfig.json +0 -1
package/dist/ButtonControls.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
activeIndex?: number;
|
|
4
|
-
buttonIsRounded?: boolean;
|
|
5
|
-
buttonBorderWidth?: number;
|
|
6
|
-
buttonPaddingVertical?: number;
|
|
7
|
-
buttonPaddingHorizontal?: number;
|
|
8
|
-
flexGap?: number;
|
|
9
|
-
flexProps?: {};
|
|
10
|
-
buttonProps?: {};
|
|
11
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { type ButtonControlsProps } from "./ButtonControls.types.js";
|
|
2
|
+
export declare const ButtonControls: ({ buttons, activeIndex, buttonIsRounded, buttonBorderWidth, buttonPaddingVertical, buttonPaddingHorizontal, flexGap, flexProps, buttonProps, }: ButtonControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
3
|
//# sourceMappingURL=ButtonControls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonControls.d.ts","sourceRoot":"","sources":["../src/ButtonControls.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI
|
|
1
|
+
{"version":3,"file":"ButtonControls.d.ts","sourceRoot":"","sources":["../src/ButtonControls.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,eAAO,MAAM,cAAc,GAAI,gJAU5B,mBAAmB,4CAoBrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonControls.js","sourceRoot":"","sources":["../src/ButtonControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonControls.js","sourceRoot":"","sources":["../src/ButtonControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIhD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,OAAO,GAAG,EAAE,EACZ,WAAW,GAAG,CAAC,CAAC,EAChB,eAAe,GAAG,IAAI,EACtB,iBAAiB,GAAG,CAAC,EACrB,qBAAqB,GAAG,EAAE,EAC1B,uBAAuB,GAAG,EAAE,EAC5B,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,EAAE,GACI,EAAE,EAAE;IACxB,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,OAAO,KACR,SAAS,YAEZ,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CAC9B,KAAC,MAAM,IAEL,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,qBAAqB,EACtC,iBAAiB,EAAE,uBAAuB,KACtC,UAAU,KACV,WAAW,EACf,QAAQ,EAAE,WAAW,KAAK,CAAC,IAPtB,CAAC,CAQN,CACH,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ButtonControlItem = {
|
|
2
|
+
text?: string;
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
isRounded?: boolean;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isSelected?: boolean;
|
|
7
|
+
padding?: number;
|
|
8
|
+
paddingHorizontal?: number | null;
|
|
9
|
+
paddingVertical?: number | null;
|
|
10
|
+
opacity?: number | null;
|
|
11
|
+
borderWidth?: number;
|
|
12
|
+
width?: number;
|
|
13
|
+
textSize?: number;
|
|
14
|
+
font?: string;
|
|
15
|
+
wrapView?: string;
|
|
16
|
+
textView?: string;
|
|
17
|
+
} & Record<string, unknown>;
|
|
18
|
+
export type ButtonControlsProps = {
|
|
19
|
+
buttons?: ButtonControlItem[];
|
|
20
|
+
activeIndex?: number;
|
|
21
|
+
buttonIsRounded?: boolean;
|
|
22
|
+
buttonBorderWidth?: number;
|
|
23
|
+
buttonPaddingVertical?: number;
|
|
24
|
+
buttonPaddingHorizontal?: number;
|
|
25
|
+
flexGap?: number;
|
|
26
|
+
flexProps?: Record<string, unknown>;
|
|
27
|
+
buttonProps?: Partial<ButtonControlItem>;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=ButtonControls.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonControls.types.d.ts","sourceRoot":"","sources":["../src/ButtonControls.types.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonControls.types.js","sourceRoot":"","sources":["../src/ButtonControls.types.tsx"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC"}
|
package/package.json
CHANGED
package/src/ButtonControls.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Button, Flex } from "@vnejs/uis.react";
|
|
2
2
|
|
|
3
|
+
import { type ButtonControlsProps } from "./ButtonControls.types.js";
|
|
4
|
+
|
|
3
5
|
export const ButtonControls = ({
|
|
4
6
|
buttons = [],
|
|
5
7
|
activeIndex = -1,
|
|
@@ -10,7 +12,7 @@ export const ButtonControls = ({
|
|
|
10
12
|
flexGap = 24,
|
|
11
13
|
flexProps = {},
|
|
12
14
|
buttonProps = {},
|
|
13
|
-
}) => {
|
|
15
|
+
}: ButtonControlsProps) => {
|
|
14
16
|
return (
|
|
15
17
|
<Flex
|
|
16
18
|
gap={flexGap}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ButtonControlItem = {
|
|
2
|
+
text?: string;
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
isRounded?: boolean;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isSelected?: boolean;
|
|
7
|
+
padding?: number;
|
|
8
|
+
paddingHorizontal?: number | null;
|
|
9
|
+
paddingVertical?: number | null;
|
|
10
|
+
opacity?: number | null;
|
|
11
|
+
borderWidth?: number;
|
|
12
|
+
width?: number;
|
|
13
|
+
textSize?: number;
|
|
14
|
+
font?: string;
|
|
15
|
+
wrapView?: string;
|
|
16
|
+
textView?: string;
|
|
17
|
+
} & Record<string, unknown>;
|
|
18
|
+
|
|
19
|
+
export type ButtonControlsProps = {
|
|
20
|
+
buttons?: ButtonControlItem[];
|
|
21
|
+
activeIndex?: number;
|
|
22
|
+
buttonIsRounded?: boolean;
|
|
23
|
+
buttonBorderWidth?: number;
|
|
24
|
+
buttonPaddingVertical?: number;
|
|
25
|
+
buttonPaddingHorizontal?: number;
|
|
26
|
+
flexGap?: number;
|
|
27
|
+
flexProps?: Record<string, unknown>;
|
|
28
|
+
buttonProps?: Partial<ButtonControlItem>;
|
|
29
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./ButtonControls";
|
|
1
|
+
export * from "./ButtonControls.types.js";
|
|
2
|
+
export * from "./ButtonControls.js";
|