@kanda-libs/ks-component-ts 0.2.477 → 0.2.478
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/app/src/App.tsx +18 -30
- package/dist/index.d.ts +14500 -14500
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +3 -3
- package/dist/library.css +9 -10
- package/package.json +1 -1
- package/src/components/FormTheme/index.tsx +7 -2
- package/src/field/components/PhoneNumberInput/PhoneNumberInputUncontrolled/PhoneNumberInputUncontrolled.tsx +1 -1
- package/src/field/components/PhoneNumberInput/PhoneNumberInputUncontrolled/usePhoneNumberInputUncontrolled.ts +5 -1
- package/src/field/components/PhoneNumberInput/constants.ts +5 -1
- package/src/generated/widget/index.tsx +73777 -73777
- package/src/styles/library.css +9 -10
- package/src/types.d.ts +1 -0
package/dist/library.css
CHANGED
|
@@ -2572,6 +2572,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2572
2572
|
padding: 10px;
|
|
2573
2573
|
}
|
|
2574
2574
|
|
|
2575
|
+
.p-5 {
|
|
2576
|
+
padding: 20px;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2575
2579
|
.p-8 {
|
|
2576
2580
|
padding: 32px;
|
|
2577
2581
|
}
|
|
@@ -2636,6 +2640,11 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2636
2640
|
padding-right: 32px;
|
|
2637
2641
|
}
|
|
2638
2642
|
|
|
2643
|
+
.px-1 {
|
|
2644
|
+
padding-left: 4px;
|
|
2645
|
+
padding-right: 4px;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2639
2648
|
.py-2\.5 {
|
|
2640
2649
|
padding-top: 10px;
|
|
2641
2650
|
padding-bottom: 10px;
|
|
@@ -2661,11 +2670,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2661
2670
|
padding-right: 10px;
|
|
2662
2671
|
}
|
|
2663
2672
|
|
|
2664
|
-
.px-5 {
|
|
2665
|
-
padding-left: 20px;
|
|
2666
|
-
padding-right: 20px;
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
2673
|
.px-6 {
|
|
2670
2674
|
padding-left: 24px;
|
|
2671
2675
|
padding-right: 24px;
|
|
@@ -2686,11 +2690,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2686
2690
|
padding-right: 6px;
|
|
2687
2691
|
}
|
|
2688
2692
|
|
|
2689
|
-
.px-1 {
|
|
2690
|
-
padding-left: 4px;
|
|
2691
|
-
padding-right: 4px;
|
|
2692
|
-
}
|
|
2693
|
-
|
|
2694
2693
|
.py-8 {
|
|
2695
2694
|
padding-top: 32px;
|
|
2696
2695
|
padding-bottom: 32px;
|
package/package.json
CHANGED
|
@@ -10,13 +10,18 @@ export interface FormThemeProps {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const FormTheme: FunctionComponent<FormThemeProps> = function ({
|
|
13
|
-
variant,
|
|
13
|
+
variant = "default",
|
|
14
14
|
children,
|
|
15
15
|
}) {
|
|
16
16
|
const theme = variant ? FORM_THEME_VARIANTS[variant] : DEFAULT_THEME;
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<FormThemeContext.Provider
|
|
19
|
+
<FormThemeContext.Provider
|
|
20
|
+
value={{
|
|
21
|
+
...theme,
|
|
22
|
+
variant,
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
20
25
|
{children}
|
|
21
26
|
</FormThemeContext.Provider>
|
|
22
27
|
);
|
|
@@ -35,6 +35,7 @@ export default function usePhoneNumberInputUncontrolled({
|
|
|
35
35
|
focusClasses,
|
|
36
36
|
makeErrorClasses,
|
|
37
37
|
skeletonClasses,
|
|
38
|
+
variant,
|
|
38
39
|
} = useFormTheme();
|
|
39
40
|
|
|
40
41
|
const classNames = useClasses(CLASS_NAMES, {
|
|
@@ -48,8 +49,11 @@ export default function usePhoneNumberInputUncontrolled({
|
|
|
48
49
|
initialClassName,
|
|
49
50
|
],
|
|
50
51
|
select: [baseClasses, paddingClasses, focusClasses, ".select"],
|
|
51
|
-
code: [paddingClasses, ".code"],
|
|
52
|
+
code: [paddingClasses, variant === "inline" ? ".inlineCode" : ".code"],
|
|
52
53
|
phoneInput: [baseClasses, paddingClasses, focusClasses, ".phoneInput"],
|
|
54
|
+
selectWrapper: [
|
|
55
|
+
variant === "inline" ? ".selectWrapper.inline" : ".selectWrapper.default",
|
|
56
|
+
],
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
const code = useWatch({ name: name as string, defaultValue });
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export const CLASS_NAMES = {
|
|
2
2
|
container: "group invalid:text-neutral-400 overflow-hidden",
|
|
3
|
-
selectWrapper:
|
|
3
|
+
selectWrapper: {
|
|
4
|
+
default: "flex min-w-16 border-r border-neutral-300",
|
|
5
|
+
inline: "flex min-w-10 border-r border-neutral-300",
|
|
6
|
+
},
|
|
4
7
|
select:
|
|
5
8
|
"!text-style-g-em !text-neutral-600 appearance-none bg-select-chevron focus:bg-select-chevron-active bg-no-repeat bg-right-4 invalid:text-neutral-400 overflow-hidden !border-0 !bg-transparent",
|
|
6
9
|
country:
|
|
7
10
|
"!text-style-g-em !text-neutral-600 appearance-none invalid:text-neutral-400 overflow-hidden !border-0 !bg-transparent m-auto",
|
|
8
11
|
code: "!pr-0 my-auto flex cursor-text",
|
|
12
|
+
inlineCode: "px-1 my-auto flex cursor-text",
|
|
9
13
|
phoneInput: "!border-0 !bg-transparent",
|
|
10
14
|
};
|
|
11
15
|
|