fulldev-ui 0.14.0 → 0.14.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Fulldev UI
|
|
2
2
|
|
|
3
|
+
## 0.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#202](https://github.com/fulldotdev/ui/pull/202) [`30b1949`](https://github.com/fulldotdev/ui/commit/30b19499edf55ba3ae15490562334f50476f21c0) Thanks [@silveltman](https://github.com/silveltman)! - Match Navigation Menu trigger styling and chevron rotation to Data Slot's data-state attribute, while retaining compatibility with data-open and data-popup-open.
|
|
8
|
+
|
|
3
9
|
## 0.14.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"path": "src/components/ui/navigation-menu/navigation-menu-trigger.astro",
|
|
43
|
-
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport navigationMenuTriggerStyle from \"./navigation-menu-trigger-style\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst { class: className, type = \"button\", ...props } = Astro.props\n---\n\n<button\n data-slot=\"navigation-menu-trigger\"\n type={type}\n class={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n>\n <slot />\n {\" \"}\n <ChevronDownIcon\n class=\"relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180\"\n aria-hidden=\"true\"\n />\n</button>\n",
|
|
43
|
+
"content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport ChevronDownIcon from \"@lucide/astro/icons/chevron-down\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport navigationMenuTriggerStyle from \"./navigation-menu-trigger-style\"\n\ntype Props = HTMLAttributes<\"button\">\n\nconst { class: className, type = \"button\", ...props } = Astro.props\n---\n\n<button\n data-slot=\"navigation-menu-trigger\"\n type={type}\n class={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n>\n <slot />\n {\" \"}\n <ChevronDownIcon\n class=\"relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-[state=open]/navigation-menu-trigger:rotate-180\"\n aria-hidden=\"true\"\n />\n</button>\n",
|
|
44
44
|
"type": "registry:ui"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "src/components/ui/navigation-menu/navigation-menu-trigger-style.ts",
|
|
48
|
-
"content": "import { cva } from \"class-variance-authority\"\n\nconst navigationMenuTriggerStyle = cva(\n \"group/navigation-menu-trigger hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50\"\n)\n\nexport default navigationMenuTriggerStyle\n",
|
|
48
|
+
"content": "import { cva } from \"class-variance-authority\"\n\nconst navigationMenuTriggerStyle = cva(\n \"group/navigation-menu-trigger hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-[state=open]:bg-muted/50 data-[state=open]:hover:bg-muted data-[state=open]:focus:bg-muted data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50\"\n)\n\nexport default navigationMenuTriggerStyle\n",
|
|
49
49
|
"type": "registry:ui"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority"
|
|
2
2
|
|
|
3
3
|
const navigationMenuTriggerStyle = cva(
|
|
4
|
-
"group/navigation-menu-trigger hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50"
|
|
4
|
+
"group/navigation-menu-trigger hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-[state=open]:bg-muted/50 data-[state=open]:hover:bg-muted data-[state=open]:focus:bg-muted data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50"
|
|
5
5
|
)
|
|
6
6
|
|
|
7
7
|
export default navigationMenuTriggerStyle
|
|
@@ -20,7 +20,7 @@ const { class: className, type = "button", ...props } = Astro.props
|
|
|
20
20
|
<slot />
|
|
21
21
|
{" "}
|
|
22
22
|
<ChevronDownIcon
|
|
23
|
-
class="relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180"
|
|
23
|
+
class="relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-[state=open]/navigation-menu-trigger:rotate-180"
|
|
24
24
|
aria-hidden="true"
|
|
25
25
|
/>
|
|
26
26
|
</button>
|