From deed3e1237229c432760abe6b4489b48b3554d09 Mon Sep 17 00:00:00 2001 From: Sujan Sundareswaran Date: Sat, 1 Feb 2025 08:00:01 +0530 Subject: [PATCH] v1.11.9 --- CHANGELOG.md | 2 + package.json | 2 +- src/components/Badge/Badge.tsx | 7 +- src/components/Badge/badge.css | 7 +- src/components/Drawer/Drawer.tsx | 23 +++--- src/components/Drawer/drawer.css | 10 +-- src/components/Form/Range/Range.tsx | 16 ++-- src/components/LoadingBar/LoadingBar.tsx | 92 ----------------------- src/components/LoadingBar/index.tsx | 1 - src/components/LoadingBar/loading-bar.css | 40 ---------- src/components/Meter/Meter.tsx | 65 +++++++++------- src/components/index.tsx | 3 - src/index.tsx | 3 - 13 files changed, 77 insertions(+), 194 deletions(-) delete mode 100644 src/components/LoadingBar/LoadingBar.tsx delete mode 100644 src/components/LoadingBar/index.tsx delete mode 100644 src/components/LoadingBar/loading-bar.css diff --git a/CHANGELOG.md b/CHANGELOG.md index be035647..10e95e8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 1.11.9 - Allow empty `options` object for `ListBox` +- Rename `dismiss-button` class in `Drawer` to be more specific to avoid clashes +- `Badge` now accepts children other than just text ## 1.11.8 - Add select all and clear all methods for `OptionCardsGroup` diff --git a/package.json b/package.json index cb43dc62..b8b9e098 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fictoan-react", - "version": "1.11.9-alpha.12", + "version": "1.11.9", "private": false, "description": "A full-featured, designer-friendly, yet performant framework with plain-English props and focus on rapid iteration.", "repository": { diff --git a/src/components/Badge/Badge.tsx b/src/components/Badge/Badge.tsx index d2b455d0..838249fb 100644 --- a/src/components/Badge/Badge.tsx +++ b/src/components/Badge/Badge.tsx @@ -65,15 +65,16 @@ export const Badge = React.forwardRef( aria-label={label || (typeof children === "string" ? children : undefined)} {...props} > - {children} + {children} + {withDelete && ( × diff --git a/src/components/Badge/badge.css b/src/components/Badge/badge.css index 53d4d6b0..240842ad 100644 --- a/src/components/Badge/badge.css +++ b/src/components/Badge/badge.css @@ -26,13 +26,14 @@ &[class*="border-"] { border-width : var(--badge-border-width); } &.border-none { border-width : 0 !important; } - & .dismiss-button { + & .badge-dismiss-button { + position : relative; margin-left : 8px; - font-size : 18px; + font-size : 1.6rem; cursor : pointer; line-height : 1; top : -1px; - position : relative; + font-weight : 400; &:hover { transform : scale(1.1); diff --git a/src/components/Drawer/Drawer.tsx b/src/components/Drawer/Drawer.tsx index ff70560d..da2ac1e5 100644 --- a/src/components/Drawer/Drawer.tsx +++ b/src/components/Drawer/Drawer.tsx @@ -46,13 +46,15 @@ export const Drawer = React.forwardRef( showOverlay = false, label, ...props - }: DrawerProps, - ref: React.Ref + } : DrawerProps, + ref : React.Ref, ) => { const [shouldRender, setShouldRender] = useState(openWhen); const drawerRef = useRef(null); - const effectiveRef = (ref || drawerRef) as RefObject; + const effectiveRef = ( + ref || drawerRef + ) as RefObject; useEffect(() => { if (openWhen) { @@ -84,10 +86,11 @@ export const Drawer = React.forwardRef( const closeDrawer = () => closeWhen?.(); - useClickOutside(effectiveRef, closeOnClickOutside ? closeDrawer : () => {}); + useClickOutside(effectiveRef, closeOnClickOutside ? closeDrawer : () => { + }); - const handleKeyDown = (e: React.KeyboardEvent) => { - if (e.key === 'Escape' && isDismissible) { + const handleKeyDown = (e : React.KeyboardEvent) => { + if (e.key === "Escape" && isDismissible) { closeDrawer(); } }; @@ -105,7 +108,9 @@ export const Drawer = React.forwardRef( aria-modal="true" aria-label={label || "Drawer"} tabIndex={-1} - {...(closeOnClickOutside ? { onClick: closeDrawer } : {})} + {...( + closeOnClickOutside ? { onClick : closeDrawer } : {} + )} {...props} > {openWhen && showOverlay && ( @@ -125,7 +130,7 @@ export const Drawer = React.forwardRef( > {isDismissible && (