uibee 3.0.0 → 3.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/src/components/index.d.ts +5 -5
- package/dist/src/components/index.js +16 -15
- package/dist/style.css +17 -104
- package/package.json +1 -1
- package/src/components/container/{glassCard.tsx → card.tsx} +3 -3
- package/src/components/container/statCard.tsx +3 -3
- package/src/components/index.ts +1 -1
- package/src/components/inputs/switch.tsx +7 -8
|
@@ -408,15 +408,15 @@ declare function LeftBarPanel({
|
|
|
408
408
|
className
|
|
409
409
|
}: LeftBarPanelProps): import("react").JSX.Element;
|
|
410
410
|
//#endregion
|
|
411
|
-
//#region src/components/container/
|
|
412
|
-
type
|
|
411
|
+
//#region src/components/container/card.d.ts
|
|
412
|
+
type CardProps = {
|
|
413
413
|
children: ReactNode;
|
|
414
414
|
className?: string;
|
|
415
415
|
};
|
|
416
|
-
declare function
|
|
416
|
+
declare function Card({
|
|
417
417
|
children,
|
|
418
418
|
className
|
|
419
|
-
}:
|
|
419
|
+
}: CardProps): import("react").JSX.Element;
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region src/components/container/iconBubble.d.ts
|
|
422
422
|
declare const tones: {
|
|
@@ -703,4 +703,4 @@ declare function Toggle<T>({
|
|
|
703
703
|
right
|
|
704
704
|
}: ToggleProps<T>): import("react").JSX.Element;
|
|
705
705
|
//#endregion
|
|
706
|
-
export { Accordion, AccordionGroup, Alert, type BilingualString, Button, Checkbox, ConfirmPopup, Footer, type FooterColumn, type FooterProps, type FooterSocialLink, type FooterSocialLink as LoginSocialLinkData,
|
|
706
|
+
export { Accordion, AccordionGroup, Alert, type BilingualString, Button, Card, Checkbox, ConfirmPopup, Footer, type FooterColumn, type FooterProps, type FooterSocialLink, type FooterSocialLink as LoginSocialLinkData, Highlight, IconBubble, Input, type Lang, LanguageToggle, LeftBarPanel, LoginPage, Logo, LogoSmall, MarkdownRender, MenuButton, MultiSelect, NavDropdown, NavItem, Navbar, PageContainer, Pagination, PulseDot, Radio, Range, SearchInput, Select, SeverityPill, StatCard, Switch, TabPanel, Table, Tabs, TagInput, Textarea, ThemeToggle, Toaster, Toggle, VersionTag, loginAddress, loginCopyright, loginEmail, loginSocialLinks, loginSponsor, toast };
|
|
@@ -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",
|
|
@@ -2256,10 +2257,10 @@ function LeftBarPanel({ color, children, className = "" }) {
|
|
|
2256
2257
|
});
|
|
2257
2258
|
}
|
|
2258
2259
|
//#endregion
|
|
2259
|
-
//#region src/components/container/
|
|
2260
|
-
function
|
|
2260
|
+
//#region src/components/container/card.tsx
|
|
2261
|
+
function Card({ children, className = "" }) {
|
|
2261
2262
|
return /* @__PURE__ */ jsx("section", {
|
|
2262
|
-
className: `rounded-xl border border-login-500/30 bg-login-
|
|
2263
|
+
className: `rounded-xl border border-login-500/30 bg-login-500/50 ${className}`,
|
|
2263
2264
|
children
|
|
2264
2265
|
});
|
|
2265
2266
|
}
|
|
@@ -2285,7 +2286,7 @@ function IconBubble({ icon: Icon, tone = "slate", size = "md" }) {
|
|
|
2285
2286
|
//#endregion
|
|
2286
2287
|
//#region src/components/container/statCard.tsx
|
|
2287
2288
|
function StatCard({ label, value, icon, tone = "slate" }) {
|
|
2288
|
-
return /* @__PURE__ */ jsxs(
|
|
2289
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
2289
2290
|
className: "p-4",
|
|
2290
2291
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
2291
2292
|
className: "mb-3 flex items-center gap-3",
|
|
@@ -3240,4 +3241,4 @@ function Toggle({ value, onChange, left, right }) {
|
|
|
3240
3241
|
});
|
|
3241
3242
|
}
|
|
3242
3243
|
//#endregion
|
|
3243
|
-
export { Accordion, AccordionGroup, Alert, Button, Checkbox, ConfirmPopup, Footer,
|
|
3244
|
+
export { Accordion, AccordionGroup, Alert, Button, Card, Checkbox, ConfirmPopup, Footer, Highlight, IconBubble, Input, LanguageToggle, LeftBarPanel, LoginPage, Logo, LogoSmall, MarkdownRender, MenuButton, MultiSelect, NavDropdown, NavItem, Navbar, PageContainer, Pagination, PulseDot, Radio, Range, SearchInput, Select, SeverityPill, StatCard, Switch, TabPanel, Table, Tabs, TagInput, Textarea, ThemeToggle, Toaster, Toggle, VersionTag, loginAddress, loginCopyright, loginEmail, loginSocialLinks, loginSponsor, toast };
|
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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from 'react'
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type CardProps = {
|
|
4
4
|
children: ReactNode
|
|
5
5
|
className?: string
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export default function
|
|
8
|
+
export default function Card({ children, className = '' }: CardProps) {
|
|
9
9
|
return (
|
|
10
|
-
<section className={`rounded-xl border border-login-500/30 bg-login-
|
|
10
|
+
<section className={`rounded-xl border border-login-500/30 bg-login-500/50 ${className}`}>
|
|
11
11
|
{children}
|
|
12
12
|
</section>
|
|
13
13
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ElementType } from 'react'
|
|
2
|
-
import
|
|
2
|
+
import Card from './card'
|
|
3
3
|
import IconBubble, { type IconBubbleTone } from './iconBubble'
|
|
4
4
|
|
|
5
5
|
type StatCardProps = {
|
|
@@ -11,7 +11,7 @@ type StatCardProps = {
|
|
|
11
11
|
|
|
12
12
|
export default function StatCard({ label, value, icon, tone = 'slate' }: StatCardProps) {
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
14
|
+
<Card className='p-4'>
|
|
15
15
|
<div className='mb-3 flex items-center gap-3'>
|
|
16
16
|
<IconBubble icon={icon} tone={tone} />
|
|
17
17
|
<span className='text-sm font-medium text-login-200'>{label}</span>
|
|
@@ -19,6 +19,6 @@ export default function StatCard({ label, value, icon, tone = 'slate' }: StatCar
|
|
|
19
19
|
<div className='truncate text-lg font-semibold text-login-50' title={value}>
|
|
20
20
|
{value}
|
|
21
21
|
</div>
|
|
22
|
-
</
|
|
22
|
+
</Card>
|
|
23
23
|
)
|
|
24
24
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type { LoginSocialLinkData } from './footer/loginContent'
|
|
|
34
34
|
export { default as PageContainer} from './container/page'
|
|
35
35
|
export { default as Highlight } from './container/highlight'
|
|
36
36
|
export { default as LeftBarPanel } from './container/leftBarPanel'
|
|
37
|
-
export { default as
|
|
37
|
+
export { default as Card } from './container/card'
|
|
38
38
|
export { default as IconBubble } from './container/iconBubble'
|
|
39
39
|
export { default as StatCard } from './container/statCard'
|
|
40
40
|
export { Tabs, TabPanel } from './container/tabs'
|
|
@@ -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
|
)
|