Skip to content

Commit a66b70a

Browse files
committed
Adding latest content
1 parent a4696a0 commit a66b70a

10 files changed

+82
-24
lines changed

elements/full-screen-modal.json

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"data" : {
33
"fullscreenModal" : "A boolean value that will toggle the fullscreen modal to be open or closed."
44
},
5+
"alert_notification" : {
6+
"title" : "Alpine Teleport Directive",
7+
"description" : "This element uses the <a href=\"https://alpinejs.dev/directives/teleport\" target=\"_blank\" class=\"underline\">AlpineJS teleport directive</a>, which will teleport the Full-screen modal to be a child of the body element. This allows the modal to be full-screen and prevents any display issues with its parent elements."
8+
},
59
"additional" : {
610
"description" : "<p>The first <code>&lt;button&gt;</code> element can be any button or element you choose as long as it has the <code>@click=&#x22;fullscreenModal=true&#x22;</code> attribute it will work the same and show the full screen modal when it is clicked.</p>"
711
}

elements/image-gallery.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010

1111
},
1212
"alert_notification" : {
13-
"title" : "Add or remove images",
14-
"description" : "Simply add or remove your own <strong><code>&lt;li&gt;&lt;img src='...' /&gt;&lt;/li&gt;</code></strong> elements to the image gallery, and it will automatically be reflected in the gallery."
13+
"title" : "Alpine Teleport Directive",
14+
"description" : "This element uses the <a href=\"https://alpinejs.dev/directives/teleport\" target=\"_blank\" class=\"underline\">AlpineJS teleport directive</a>, which will teleport the Image Gallery to be a child of the body element. This allows the gallery to be full-screen and prevents any display issues with its parent elements."
15+
},
16+
"additional" : {
17+
"description" : "<p>Adding or removing your own images is as simple as adding or removing the <strong><code>&lt;li&gt;&lt;img src='...' /&gt;&lt;/li&gt;</code></strong> elements inside of the image gallery element (this is the same element that contains the <code>x-ref=&#x22;gallery&#x22;</code> reference).</p>"
1518
}
1619
}

elements/menubar.html

+12-14
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
</div>
4343
<div data-submenu="" class="absolute top-0 right-0 invisible mr-1 duration-200 ease-out translate-x-full opacity-0 group-hover:mr-0 group-hover:visible group-hover:opacity-100">
4444
<div class="z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white p-1 shadow-md animate-in slide-in-from-left-1 w-32">
45-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Email link</div>
46-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Messages</div>
47-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Notes</div>
45+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Email link</div>
46+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Messages</div>
47+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Notes</div>
4848
</div>
4949
</div>
5050
</button>
@@ -87,11 +87,11 @@
8787
</div>
8888
<div data-submenu="" class="absolute top-0 right-0 invisible mr-1 duration-200 ease-out translate-x-full opacity-0 group-hover:mr-0 group-hover:visible group-hover:opacity-100">
8989
<div class="z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white p-1 shadow-md animate-in slide-in-from-left-1 w-32">
90-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Search the web</div>
90+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Search the web</div>
9191
<div class="h-px my-1 -mx-1 bg-neutral-200"></div>
92-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Find...</div>
93-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Find Next</div>
94-
<div @click="contextMenuOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Find Previous</div>
92+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Find...</div>
93+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Find Next</div>
94+
<div @click="menuBarOpen=false" class="relative flex cursor-default select-none items-center rounded px-2 py-1.5 hover:bg-neutral-100 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50">Find Previous</div>
9595
</div>
9696
</div>
9797
</button>
@@ -164,17 +164,15 @@
164164
class="absolute top-0 z-50 min-w-[8rem] text-neutral-800 rounded-md border border-neutral-200/70 bg-white mt-10 text-sm p-1 shadow-md w-48 -translate-x-0.5"
165165
x-cloak>
166166

167-
<div x-data="{ contextMenuPeople: 'taylor' }" class="relative w-full">
168-
<button @click="contextMenuPeople='taylor'; contextMenuOpen=false" class="relative w-full flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 hover:bg-neutral-100 outline-none data-[disabled]:opacity-50">
169-
<span x-show="contextMenuPeople=='taylor'" class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-2 h-2 fill-current"><circle cx="12" cy="12" r="10"></circle></svg></span>
167+
<div class="relative w-full">
168+
<button @click="menuBarOpen=false" class="relative w-full flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 hover:bg-neutral-100 outline-none data-[disabled]:opacity-50">
169+
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-2 h-2 fill-current"><circle cx="12" cy="12" r="10"></circle></svg></span>
170170
<span>Taylor Otwell</span>
171171
</button>
172-
<button @click="contextMenuPeople='adam'; contextMenuOpen=false" class="relative w-full flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 hover:bg-neutral-100 outline-none data-[disabled]:opacity-50">
173-
<span x-show="contextMenuPeople=='adam'" class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-2 h-2 fill-current"><circle cx="12" cy="12" r="10"></circle></svg></span>
172+
<button @click="menuBarOpen=false" class="relative w-full flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 hover:bg-neutral-100 outline-none data-[disabled]:opacity-50">
174173
<span>Adam Wathan</span>
175174
</button>
176-
<button @click="contextMenuPeople='caleb'; contextMenuOpen=false" class="relative w-full flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 hover:bg-neutral-100 outline-none data-[disabled]:opacity-50">
177-
<span x-show="contextMenuPeople=='caleb'" class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-2 h-2 fill-current"><circle cx="12" cy="12" r="10"></circle></svg></span>
175+
<button @click="menuBarOpen=false" class="relative w-full flex cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 hover:bg-neutral-100 outline-none data-[disabled]:opacity-50">
178176
<span>Caleb Porzio</span>
179177
</button>
180178
</div>

elements/menubar.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"data" : {
3+
"menuBarOpen" : "A boolean value that signifies whether the menu bar is opened or closed.",
4+
"menuBarMenu" : "The menu bar that is currently opened. (example: 'file', 'edit', etc.)"
5+
},
6+
"alert_notification" : {
7+
"title" : "Create your own menu",
8+
"description" : "You can define your own menu by duplicating one of the existing menus and changing the name. You can then add your own menu items."
9+
}
10+
}

elements/modal.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"data" : {
3+
"modalOpen" : "A boolean value that will toggle the modal open or close."
4+
},
5+
"alert_notification" : {
6+
"title" : "Alpine Teleport Directive",
7+
"description" : "This element uses the <a href=\"https://alpinejs.dev/directives/teleport\" target=\"_blank\" class=\"underline\">AlpineJS teleport directive</a>, which will teleport the Modal element to be a child of the body element. This allows the modal to be full-screen and prevents any display issues with its parent elements."
8+
}
9+
}

elements/navigation-menu.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<nav x-data="{
22
navigationMenuOpen: false,
3-
navigationMenuCloseTimeout: null,
4-
navibationMenuCloseDelay: 300,
53
navigationMenu: '',
4+
navibationMenuCloseDelay: 200,
5+
navigationMenuCloseTimeout: null,
66
navigationMenuLeave() {
77
let that = this;
88
this.navigationMenuCloseTimeout = setTimeout(() => {

elements/navigation-menu.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"data" : {
3+
"navigationMenuOpen" : "A boolean value that signifies whether the menu is opened or closed.",
4+
"navigationMenu" : "The menu that is currently opened. (example: 'getting-started', 'learn-more', etc.)",
5+
"navibationMenuCloseDelay" : "The delay in milliseconds before the menu closes after the mouse leaves the menu.",
6+
"navigationMenuCloseTimeout" : "The timeout for the menu mouse leave event, leave this set to null.",
7+
"navigationMenuLeave()" : "This method will trigger the menu to close after the mouse leaves.",
8+
"navigationMenuReposition(navElement)" : "This method will position the menu to be centered aligned to the navigation item that is hovered.",
9+
"navigationMenuClearCloseTimeout()" : "This method will clear the close timeout for the menu. This might occur if the user hovers back over a navigation item.",
10+
"navigationMenuClose()" : "This method will close the menu by setting navigationMenuOpen to false, and clearing the value of navigationMenu."
11+
}
12+
}

elements/popover.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<div x-data="{
22
popoverOpen: false,
3-
popoverHeight: 0,
3+
popoverArrow: true,
44
popoverPosition: 'bottom',
5+
popoverHeight: 0,
56
popoverOffset: 8,
6-
popoverArrow: true,
77
popoverHeightCalculate() {
88
this.$refs.popover.classList.add('invisible');
99
this.popoverOpen=true;
1010
let that=this;
1111
$nextTick(function(){
12-
that.popoverHeight = that.$refs.popover.offsetHeight;
12+
that.popoverHeight = that.$refs.popover.offsetHeight;
1313
that.popoverOpen=false;
1414
that.$refs.popover.classList.remove('invisible');
1515
that.$refs.popoverInner.setAttribute('x-transition', '');
16+
that.popoverPositionCalculate();
1617
});
1718
},
1819
popoverPositionCalculate(){
@@ -29,18 +30,18 @@
2930
popoverPositionCalculate();
3031
});
3132
$watch('popoverOpen', function(value){
32-
if(value){ popoverPositionCalculate(); }
33+
if(value){ popoverPositionCalculate(); document.getElementById('width').focus(); }
3334
});
3435
"
3536
class="relative">
3637

37-
<button x-ref="popoverButton" @click="popoverOpen=!popoverOpen" class="flex items-center justify-center w-10 h-10 bg-white border rounded-full shadow-sm cursor-pointer hover:bg-neutral-100 active:bg-white border-neutral-200/70">
38+
<button x-ref="popoverButton" @click="popoverOpen=!popoverOpen" class="flex items-center justify-center w-10 h-10 bg-white border rounded-full shadow-sm cursor-pointer hover:bg-neutral-100 focus-visible:ring-gray-400 focus-visible:ring-2 focus-visible:outline-none active:bg-white border-neutral-200/70">
3839
<svg class="w-4 h-4" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>
3940
</button>
4041

4142
<div x-ref="popover"
4243
x-show="popoverOpen"
43-
x-init="popoverHeightCalculate()"
44+
x-init="setTimeout(function(){ popoverHeightCalculate(); }, 100);"
4445
x-trap.inert="popoverOpen"
4546
@click.away="popoverOpen=false;"
4647
@keydown.escape.window="popoverOpen=false"

elements/popover.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"data" : {
3+
"popoverOpen" : "A boolean value that will toggle the popover open or close.",
4+
"popoverArrow": "A boolean value that will show or hide the popover arrow",
5+
"popoverPosition" : "A value that will indicate whether the popover should be at the bottom or top.",
6+
"popoverHeight" : "The height of the popover. This will be calculated on initialize.",
7+
"popoverOffset" : "An offset value in pixels that will be applied to the popover position.",
8+
"popoverHeightCalculate()" : "A method that will calculate the height of the popover.",
9+
"popoverPositionCalculate()" : "A method that will calculate whether the popover should be at top or bottom."
10+
},
11+
"alert_notification" : {
12+
"title" : "Alpine Focus Plugin",
13+
"description" : "This element uses the <a href=\"https://alpinejs.dev/plugins/focus\" target=\"_blank\" class=\"underline\">AlpineJS focus plug-in</a>, which will trap the focus inside the popover when opened and return focus to the trigger when closed."
14+
}
15+
}

elements/radio-group.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"data" : {
3+
"radioGroupSelectedValue" : "The value of the current selected radio button.",
4+
"radioGroupOptions": "An array of radio group options containing the title, description, and value."
5+
}
6+
}

0 commit comments

Comments
 (0)