diff --git a/examples/package.json b/examples/package.json index 1f4e35c..2ea7545 100644 --- a/examples/package.json +++ b/examples/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@sakura-ui/core": "^0.2.11", + "@sakura-ui/core": "^0.2.14", "@sakura-ui/forms": "^0.2.1", "@sakura-ui/tailwind-theme-plugin": "^0.2.1", "react": "^18.3.1", diff --git a/packages/core/package.json b/packages/core/package.json index d782e11..ef7ba84 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@sakura-ui/core", - "version": "0.2.11", + "version": "0.2.14", "description": "", "keywords": [ "react", diff --git a/packages/core/src/components/Icon.tsx b/packages/core/src/components/Icon.tsx index 57d56b9..5afe732 100644 --- a/packages/core/src/components/Icon.tsx +++ b/packages/core/src/components/Icon.tsx @@ -49,8 +49,8 @@ export const Icon = React.forwardRef((props, ref) => { font-light inline-block leading-4 - whitespace-nowrap align-middle + whitespace-nowrap ` return ( diff --git a/packages/core/src/components/LangSelector.tsx b/packages/core/src/components/LangSelector.tsx index d7f4d3a..47df219 100644 --- a/packages/core/src/components/LangSelector.tsx +++ b/packages/core/src/components/LangSelector.tsx @@ -39,10 +39,11 @@ export const LangSelector = ({ ` const styleButton = ` - flex w-fit - items-center - sm:gap-1 + sm:py-3 + text-base + leading-4 + leading-snug ${styleClickable} ${styleFocusRoundedWithBg} ${styleAnchorName} @@ -90,7 +91,11 @@ export const LangSelector = ({ fucus(index) break case 'Tab': - menuRef.current?.hidePopover() + index = e.shiftKey ? currentIndex - 1 : currentIndex + 1 + setCurrentIndex(index) + if (index === -1 || index === langs.length) { + menuRef.current?.hidePopover() + } break } } @@ -111,11 +116,11 @@ export const LangSelector = ({ language Language - +