uibee 3.0.0 → 3.0.1
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/src/components/index.js +11 -10
- package/dist/style.css +17 -104
- package/package.json +1 -1
- package/src/components/inputs/switch.tsx +7 -8
|
@@ -1297,22 +1297,22 @@ function Switch(props) {
|
|
|
1297
1297
|
textSize,
|
|
1298
1298
|
className,
|
|
1299
1299
|
children: /* @__PURE__ */ jsxs("label", {
|
|
1300
|
-
className: `
|
|
1300
|
+
className: `group/sw inline-flex items-center cursor-pointer ${switchOnly ? "h-fit" : "h-10"}`,
|
|
1301
1301
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1302
1302
|
...inputProps,
|
|
1303
1303
|
type: "checkbox",
|
|
1304
1304
|
id: name,
|
|
1305
1305
|
name,
|
|
1306
|
-
className: "sr-only
|
|
1307
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
after:bg-white after:border-gray-300 after:border after:rounded-full
|
|
1312
|
-
after:h-5 after:w-5 after:transition-all peer-checked:bg-login
|
|
1306
|
+
className: "sr-only"
|
|
1307
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1308
|
+
className: `
|
|
1309
|
+
relative flex items-center w-11 h-6 rounded-full transition-colors
|
|
1310
|
+
bg-login-600 group-has-[input:checked]/sw:bg-login
|
|
1313
1311
|
${inputProps.disabled ? "opacity-40 cursor-not-allowed" : ""}
|
|
1314
1312
|
${error ? "ring-1 ring-red-500/60" : ""}
|
|
1315
|
-
|
|
1313
|
+
`,
|
|
1314
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 my-auto left-0.5 h-5 w-5 rounded-full bg-white shadow-sm transition-all group-has-[input:checked]/sw:translate-x-full" })
|
|
1315
|
+
})]
|
|
1316
1316
|
})
|
|
1317
1317
|
});
|
|
1318
1318
|
}
|
|
@@ -2063,7 +2063,8 @@ function Footer({ logo, sponsor, columns, socialLinks, copyright, version, lang
|
|
|
2063
2063
|
children: /* @__PURE__ */ jsx("div", {
|
|
2064
2064
|
className: "mx-auto mt-20 mb-12 flex w-fit flex-wrap justify-center gap-6",
|
|
2065
2065
|
children: socialLinks.map((link, i) => /* @__PURE__ */ jsx("a", {
|
|
2066
|
-
className: `block size-8 text-login-100 transition-all duration-200 group
|
|
2066
|
+
className: `block size-8 text-login-100 transition-all duration-200 group
|
|
2067
|
+
${link.hoverClass ?? "hover:text-login-50"}`,
|
|
2067
2068
|
title: link.title,
|
|
2068
2069
|
href: link.href,
|
|
2069
2070
|
target: "_blank",
|
package/dist/style.css
CHANGED
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
--color-rose-400: oklch(71.2% 0.194 13.428);
|
|
33
33
|
--color-rose-500: oklch(64.5% 0.246 16.439);
|
|
34
34
|
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
35
|
-
--color-gray-300: oklch(87.2% 0.01 258.338);
|
|
36
35
|
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
37
36
|
--color-gray-500: oklch(55.1% 0.027 264.364);
|
|
38
37
|
--color-black: #000;
|
|
@@ -423,6 +422,9 @@
|
|
|
423
422
|
.left-0 {
|
|
424
423
|
left: 0;
|
|
425
424
|
}
|
|
425
|
+
.left-0\.5 {
|
|
426
|
+
left: calc(var(--spacing) * 0.5);
|
|
427
|
+
}
|
|
426
428
|
.left-1\/2 {
|
|
427
429
|
left: calc(1 / 2 * 100%);
|
|
428
430
|
}
|
|
@@ -459,6 +461,9 @@
|
|
|
459
461
|
.mx-auto {
|
|
460
462
|
margin-inline: auto;
|
|
461
463
|
}
|
|
464
|
+
.my-auto {
|
|
465
|
+
margin-block: auto;
|
|
466
|
+
}
|
|
462
467
|
.prose {
|
|
463
468
|
color: var(--tw-prose-body);
|
|
464
469
|
max-width: 65ch;
|
|
@@ -2902,6 +2907,17 @@
|
|
|
2902
2907
|
}
|
|
2903
2908
|
}
|
|
2904
2909
|
}
|
|
2910
|
+
.group-has-\[input\:checked\]\/sw\:translate-x-full {
|
|
2911
|
+
&:is(:where(.group\/sw):has(*:is(input:checked)) *) {
|
|
2912
|
+
--tw-translate-x: 100%;
|
|
2913
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
.group-has-\[input\:checked\]\/sw\:bg-login {
|
|
2917
|
+
&:is(:where(.group\/sw):has(*:is(input:checked)) *) {
|
|
2918
|
+
background-color: var(--color-login);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2905
2921
|
.group-\[\.dropdown\]\:h-auto {
|
|
2906
2922
|
&:is(:where(.group):is(.dropdown) *) {
|
|
2907
2923
|
height: auto;
|
|
@@ -2943,11 +2959,6 @@
|
|
|
2943
2959
|
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
2944
2960
|
}
|
|
2945
2961
|
}
|
|
2946
|
-
.peer-checked\:bg-login {
|
|
2947
|
-
&:is(:where(.peer):checked ~ *) {
|
|
2948
|
-
background-color: var(--color-login);
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
2962
|
.peer-checked\:opacity-100 {
|
|
2952
2963
|
&:is(:where(.peer):checked ~ *) {
|
|
2953
2964
|
opacity: 100%;
|
|
@@ -2958,98 +2969,6 @@
|
|
|
2958
2969
|
color: var(--color-login-200);
|
|
2959
2970
|
}
|
|
2960
2971
|
}
|
|
2961
|
-
.after\:absolute {
|
|
2962
|
-
&::after {
|
|
2963
|
-
content: var(--tw-content);
|
|
2964
|
-
position: absolute;
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
.after\:top-0\.5 {
|
|
2968
|
-
&::after {
|
|
2969
|
-
content: var(--tw-content);
|
|
2970
|
-
top: calc(var(--spacing) * 0.5);
|
|
2971
|
-
}
|
|
2972
|
-
}
|
|
2973
|
-
.after\:top-2\.75 {
|
|
2974
|
-
&::after {
|
|
2975
|
-
content: var(--tw-content);
|
|
2976
|
-
top: calc(var(--spacing) * 2.75);
|
|
2977
|
-
}
|
|
2978
|
-
}
|
|
2979
|
-
.after\:left-0\.5 {
|
|
2980
|
-
&::after {
|
|
2981
|
-
content: var(--tw-content);
|
|
2982
|
-
left: calc(var(--spacing) * 0.5);
|
|
2983
|
-
}
|
|
2984
|
-
}
|
|
2985
|
-
.after\:h-5 {
|
|
2986
|
-
&::after {
|
|
2987
|
-
content: var(--tw-content);
|
|
2988
|
-
height: calc(var(--spacing) * 5);
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
.after\:w-5 {
|
|
2992
|
-
&::after {
|
|
2993
|
-
content: var(--tw-content);
|
|
2994
|
-
width: calc(var(--spacing) * 5);
|
|
2995
|
-
}
|
|
2996
|
-
}
|
|
2997
|
-
.after\:rounded-full {
|
|
2998
|
-
&::after {
|
|
2999
|
-
content: var(--tw-content);
|
|
3000
|
-
border-radius: calc(infinity * 1px);
|
|
3001
|
-
}
|
|
3002
|
-
}
|
|
3003
|
-
.after\:border {
|
|
3004
|
-
&::after {
|
|
3005
|
-
content: var(--tw-content);
|
|
3006
|
-
border-style: var(--tw-border-style);
|
|
3007
|
-
border-width: 1px;
|
|
3008
|
-
}
|
|
3009
|
-
}
|
|
3010
|
-
.after\:border-gray-300 {
|
|
3011
|
-
&::after {
|
|
3012
|
-
content: var(--tw-content);
|
|
3013
|
-
border-color: var(--color-gray-300);
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
|
-
.after\:bg-white {
|
|
3017
|
-
&::after {
|
|
3018
|
-
content: var(--tw-content);
|
|
3019
|
-
background-color: var(--color-white);
|
|
3020
|
-
}
|
|
3021
|
-
}
|
|
3022
|
-
.after\:transition-all {
|
|
3023
|
-
&::after {
|
|
3024
|
-
content: var(--tw-content);
|
|
3025
|
-
transition-property: all;
|
|
3026
|
-
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
3027
|
-
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
.after\:content-\[\'\'\] {
|
|
3031
|
-
&::after {
|
|
3032
|
-
--tw-content: '';
|
|
3033
|
-
content: var(--tw-content);
|
|
3034
|
-
}
|
|
3035
|
-
}
|
|
3036
|
-
.peer-checked\:after\:translate-x-full {
|
|
3037
|
-
&:is(:where(.peer):checked ~ *) {
|
|
3038
|
-
&::after {
|
|
3039
|
-
content: var(--tw-content);
|
|
3040
|
-
--tw-translate-x: 100%;
|
|
3041
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3042
|
-
}
|
|
3043
|
-
}
|
|
3044
|
-
}
|
|
3045
|
-
.peer-checked\:after\:border-white {
|
|
3046
|
-
&:is(:where(.peer):checked ~ *) {
|
|
3047
|
-
&::after {
|
|
3048
|
-
content: var(--tw-content);
|
|
3049
|
-
border-color: var(--color-white);
|
|
3050
|
-
}
|
|
3051
|
-
}
|
|
3052
|
-
}
|
|
3053
2972
|
.last\:border-0 {
|
|
3054
2973
|
&:last-child {
|
|
3055
2974
|
border-style: var(--tw-border-style);
|
|
@@ -3941,11 +3860,6 @@ input::-ms-clear {
|
|
|
3941
3860
|
syntax: "*";
|
|
3942
3861
|
inherits: false;
|
|
3943
3862
|
}
|
|
3944
|
-
@property --tw-content {
|
|
3945
|
-
syntax: "*";
|
|
3946
|
-
initial-value: "";
|
|
3947
|
-
inherits: false;
|
|
3948
|
-
}
|
|
3949
3863
|
@property --tw-blur {
|
|
3950
3864
|
syntax: "*";
|
|
3951
3865
|
inherits: false;
|
|
@@ -4060,7 +3974,6 @@ input::-ms-clear {
|
|
|
4060
3974
|
--tw-backdrop-sepia: initial;
|
|
4061
3975
|
--tw-duration: initial;
|
|
4062
3976
|
--tw-ease: initial;
|
|
4063
|
-
--tw-content: "";
|
|
4064
3977
|
--tw-blur: initial;
|
|
4065
3978
|
--tw-brightness: initial;
|
|
4066
3979
|
--tw-contrast: initial;
|
package/package.json
CHANGED
|
@@ -25,23 +25,22 @@ export default function Switch(props: SwitchProps) {
|
|
|
25
25
|
textSize={textSize}
|
|
26
26
|
className={className}
|
|
27
27
|
>
|
|
28
|
-
<label className={`
|
|
28
|
+
<label className={`group/sw inline-flex items-center cursor-pointer ${switchOnly ? 'h-fit' : 'h-10'}`}>
|
|
29
29
|
<input
|
|
30
30
|
{...inputProps}
|
|
31
31
|
type='checkbox'
|
|
32
32
|
id={name}
|
|
33
33
|
name={name}
|
|
34
|
-
className='sr-only
|
|
34
|
+
className='sr-only'
|
|
35
35
|
/>
|
|
36
36
|
<div className={`
|
|
37
|
-
w-11 h-6
|
|
38
|
-
|
|
39
|
-
after:content-[''] after:absolute ${switchOnly ? 'after:top-0.5' : 'after:top-2.75'} after:left-0.5
|
|
40
|
-
after:bg-white after:border-gray-300 after:border after:rounded-full
|
|
41
|
-
after:h-5 after:w-5 after:transition-all peer-checked:bg-login
|
|
37
|
+
relative flex items-center w-11 h-6 rounded-full transition-colors
|
|
38
|
+
bg-login-600 group-has-[input:checked]/sw:bg-login
|
|
42
39
|
${inputProps.disabled ? 'opacity-40 cursor-not-allowed' : ''}
|
|
43
40
|
${error ? 'ring-1 ring-red-500/60' : ''}
|
|
44
|
-
`}
|
|
41
|
+
`}>
|
|
42
|
+
<span className='absolute inset-y-0 my-auto left-0.5 h-5 w-5 rounded-full bg-white shadow-sm transition-all group-has-[input:checked]/sw:translate-x-full' />
|
|
43
|
+
</div>
|
|
45
44
|
</label>
|
|
46
45
|
</FieldWrapper>
|
|
47
46
|
)
|