tutuca 0.11.2 → 0.12.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/tutuca-cli.js +130 -104
- package/dist/tutuca-dev.ext.js +121 -90
- package/dist/tutuca-dev.js +121 -90
- package/dist/tutuca-dev.min.js +3 -3
- package/dist/tutuca-extra.ext.js +116 -59
- package/dist/tutuca-extra.js +116 -59
- package/dist/tutuca-extra.min.js +2 -2
- package/dist/tutuca-storybook.js +3 -3
- package/dist/tutuca.ext.js +116 -59
- package/dist/tutuca.js +116 -59
- package/dist/tutuca.min.js +2 -2
- package/package.json +1 -1
- package/skill/margaui/SKILL.md +105 -0
- package/skill/margaui/components/accordion.md +127 -0
- package/skill/margaui/components/alert.md +174 -0
- package/skill/margaui/components/aura.md +97 -0
- package/skill/margaui/components/avatar.md +220 -0
- package/skill/margaui/components/badge.md +193 -0
- package/skill/margaui/components/breadcrumbs.md +103 -0
- package/skill/margaui/components/button.md +322 -0
- package/skill/margaui/components/calendar.md +67 -0
- package/skill/margaui/components/card.md +373 -0
- package/skill/margaui/components/carousel.md +387 -0
- package/skill/margaui/components/chat.md +171 -0
- package/skill/margaui/components/checkbox.md +101 -0
- package/skill/margaui/components/collapse.md +172 -0
- package/skill/margaui/components/countdown.md +165 -0
- package/skill/margaui/components/diff.md +53 -0
- package/skill/margaui/components/divider.md +107 -0
- package/skill/margaui/components/dock.md +173 -0
- package/skill/margaui/components/drawer.md +184 -0
- package/skill/margaui/components/dropdown.md +388 -0
- package/skill/margaui/components/fab.md +346 -0
- package/skill/margaui/components/fieldset.md +88 -0
- package/skill/margaui/components/file-input.md +84 -0
- package/skill/margaui/components/filter.md +52 -0
- package/skill/margaui/components/footer.md +583 -0
- package/skill/margaui/components/hero.md +135 -0
- package/skill/margaui/components/hover-3d.md +129 -0
- package/skill/margaui/components/hover-gallery.md +49 -0
- package/skill/margaui/components/indicator.md +265 -0
- package/skill/margaui/components/input.md +389 -0
- package/skill/margaui/components/join.md +100 -0
- package/skill/margaui/components/kbd.md +127 -0
- package/skill/margaui/components/label.md +102 -0
- package/skill/margaui/components/link.md +96 -0
- package/skill/margaui/components/list.md +182 -0
- package/skill/margaui/components/loading.md +105 -0
- package/skill/margaui/components/mask.md +168 -0
- package/skill/margaui/components/megamenu.md +131 -0
- package/skill/margaui/components/menu.md +887 -0
- package/skill/margaui/components/mockup-browser.md +39 -0
- package/skill/margaui/components/mockup-code.md +81 -0
- package/skill/margaui/components/mockup-phone.md +39 -0
- package/skill/margaui/components/mockup-window.md +33 -0
- package/skill/margaui/components/modal.md +196 -0
- package/skill/margaui/components/navbar.md +282 -0
- package/skill/margaui/components/otp.md +171 -0
- package/skill/margaui/components/pagination.md +122 -0
- package/skill/margaui/components/progress.md +135 -0
- package/skill/margaui/components/radial-progress.md +67 -0
- package/skill/margaui/components/radio.md +133 -0
- package/skill/margaui/components/range.md +134 -0
- package/skill/margaui/components/rating.md +170 -0
- package/skill/margaui/components/select.md +225 -0
- package/skill/margaui/components/skeleton.md +64 -0
- package/skill/margaui/components/stack.md +142 -0
- package/skill/margaui/components/stat.md +254 -0
- package/skill/margaui/components/status.md +73 -0
- package/skill/margaui/components/steps.md +138 -0
- package/skill/margaui/components/swap.md +152 -0
- package/skill/margaui/components/tab.md +248 -0
- package/skill/margaui/components/table.md +1018 -0
- package/skill/margaui/components/text-rotate.md +91 -0
- package/skill/margaui/components/textarea.md +85 -0
- package/skill/margaui/components/theme-controller.md +266 -0
- package/skill/margaui/components/timeline.md +1356 -0
- package/skill/margaui/components/toast.md +165 -0
- package/skill/margaui/components/toggle.md +135 -0
- package/skill/margaui/components/tooltip.md +181 -0
- package/skill/margaui/components/validator.md +163 -0
- package/skill/tutuca/SKILL.md +56 -0
- package/skill/tutuca/advanced.md +212 -0
- package/skill/tutuca/cli.md +239 -0
- package/skill/tutuca/component-design.md +168 -0
- package/skill/tutuca/core.md +918 -0
- package/skill/tutuca/iteration.md +207 -0
- package/skill/tutuca/macros.md +86 -0
- package/skill/tutuca/margaui.md +175 -0
- package/skill/tutuca/messages-and-intents.md +399 -0
- package/skill/tutuca/patterns/README.md +48 -0
- package/skill/tutuca/patterns/add-a-story.md +26 -0
- package/skill/tutuca/patterns/bind-text-and-attributes.md +30 -0
- package/skill/tutuca/patterns/conditional-attribute-value.md +29 -0
- package/skill/tutuca/patterns/coordinate-components.md +54 -0
- package/skill/tutuca/patterns/edit-through-a-dynamic-target.md +27 -0
- package/skill/tutuca/patterns/enrich-each-item.md +25 -0
- package/skill/tutuca/patterns/file-input.md +39 -0
- package/skill/tutuca/patterns/filter-a-list.md +25 -0
- package/skill/tutuca/patterns/filter-and-paginate.md +60 -0
- package/skill/tutuca/patterns/handle-events.md +44 -0
- package/skill/tutuca/patterns/iterate-a-list.md +18 -0
- package/skill/tutuca/patterns/paginate-a-list.md +29 -0
- package/skill/tutuca/patterns/render-a-child-component.md +21 -0
- package/skill/tutuca/patterns/reuse-markup-with-macros.md +36 -0
- package/skill/tutuca/patterns/share-state-across-the-tree.md +38 -0
- package/skill/tutuca/patterns/show-or-hide-content.md +23 -0
- package/skill/tutuca/patterns/switch-between-views.md +30 -0
- package/skill/tutuca/patterns/tabbed-interface.md +43 -0
- package/skill/tutuca/semantics.md +195 -0
- package/skill/tutuca/storybook.md +270 -0
- package/skill/tutuca/styles.md +48 -0
- package/skill/tutuca/testing.md +345 -0
- package/skill/tutuca-source/SKILL.md +33 -0
- package/skill/tutuca-source/tutuca.ext.js +4301 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# megamenu
|
|
2
|
+
|
|
3
|
+
_large horizontal nav bar whose items open big popover panels_
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Top-of-page horizontal menu where each item opens a popover (via the native Popover API) containing a menu or arbitrary content. Collapses to a vertical popover on small screens via `megamenu-vertical`.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Large-screen primary navigation with rich per-item content (site-wide nav with categorized links).
|
|
12
|
+
- For a simple sidebar/dropdown list without per-item popovers, use **menu** instead.
|
|
13
|
+
- Requires a browser with Popover API + CSS anchor positioning support.
|
|
14
|
+
|
|
15
|
+
## Core classes
|
|
16
|
+
|
|
17
|
+
`megamenu` on the container (a `popover` element); `megamenu-active` on the sliding indicator `<span>`; width `megamenu-wide|full`; direction `megamenu-vertical`; size `megamenu-xs|sm|md|lg|xl`.
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Megamenu
|
|
22
|
+
|
|
23
|
+
Source: `playground/components/megamenu/megamenu.html`
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<!-- popovertarget must match the id of the corresponding popover, and each id must be unique -->
|
|
27
|
+
<button class="btn sm:hidden" popovertarget="my-megamenu-1">Menu</button>
|
|
28
|
+
|
|
29
|
+
<div class="megamenu max-sm:megamenu-vertical p-2 border border-base-300" id="my-megamenu-1" popover>
|
|
30
|
+
<span class="megamenu-active"></span>
|
|
31
|
+
|
|
32
|
+
<button popovertarget="a1">Services</button>
|
|
33
|
+
<div id="a1" popover>
|
|
34
|
+
<ul class="menu">
|
|
35
|
+
<li><a>Enterprise</a></li>
|
|
36
|
+
<li><a>CRM software</a></li>
|
|
37
|
+
<li><a>Security</a></li>
|
|
38
|
+
<li><a>Consulting</a></li>
|
|
39
|
+
</ul>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<button popovertarget="a2">AI</button>
|
|
43
|
+
<div id="a2" popover>
|
|
44
|
+
<ul class="menu">
|
|
45
|
+
<li><a>AI infrastructure</a></li>
|
|
46
|
+
<li><a>Image generation</a></li>
|
|
47
|
+
<li><a>MCP servers</a></li>
|
|
48
|
+
</ul>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<button popovertarget="a3">Cloud Solutions</button>
|
|
52
|
+
<div id="a3" popover>
|
|
53
|
+
<ul class="menu">
|
|
54
|
+
<li><a>Cloud computing</a></li>
|
|
55
|
+
<li><a>Storage solutions</a></li>
|
|
56
|
+
<li><a>Database services</a></li>
|
|
57
|
+
<li><a>CDN performance</a></li>
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Megamenu sizes
|
|
64
|
+
|
|
65
|
+
Source: `playground/components/megamenu/megamenu-sizes.html`
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<div class="flex flex-col gap-2">
|
|
69
|
+
<div class="megamenu megamenu-sm p-2 border border-base-300" id="my-megamenu-sm" popover="manual">
|
|
70
|
+
<span class="megamenu-active"></span>
|
|
71
|
+
<button popovertarget="c1">One</button>
|
|
72
|
+
<div id="c1" popover>
|
|
73
|
+
<ul class="menu">
|
|
74
|
+
<li><a>Link</a></li>
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
<button popovertarget="c2">Two</button>
|
|
78
|
+
<div id="c2" popover>
|
|
79
|
+
<ul class="menu">
|
|
80
|
+
<li><a>Link</a></li>
|
|
81
|
+
</ul>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div class="megamenu megamenu-lg p-2 border border-base-300" id="my-megamenu-lg" popover="manual">
|
|
86
|
+
<span class="megamenu-active"></span>
|
|
87
|
+
<button popovertarget="c3">One</button>
|
|
88
|
+
<div id="c3" popover>
|
|
89
|
+
<ul class="menu">
|
|
90
|
+
<li><a>Link</a></li>
|
|
91
|
+
</ul>
|
|
92
|
+
</div>
|
|
93
|
+
<button popovertarget="c4">Two</button>
|
|
94
|
+
<div id="c4" popover>
|
|
95
|
+
<ul class="menu">
|
|
96
|
+
<li><a>Link</a></li>
|
|
97
|
+
</ul>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Megamenu wide
|
|
104
|
+
|
|
105
|
+
Source: `playground/components/megamenu/megamenu-wide.html`
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<button class="btn sm:hidden" popovertarget="my-megamenu-2">Menu</button>
|
|
109
|
+
|
|
110
|
+
<div class="megamenu megamenu-wide max-sm:megamenu-vertical p-2 border border-base-300" id="my-megamenu-2" popover>
|
|
111
|
+
<span class="megamenu-active"></span>
|
|
112
|
+
|
|
113
|
+
<button popovertarget="b1">Products</button>
|
|
114
|
+
<div id="b1" popover>
|
|
115
|
+
<ul class="menu md:menu-horizontal">
|
|
116
|
+
<li><a>Analytics</a></li>
|
|
117
|
+
<li><a>Automation</a></li>
|
|
118
|
+
<li><a>Reporting</a></li>
|
|
119
|
+
</ul>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<button popovertarget="b2">Pricing</button>
|
|
123
|
+
<div id="b2" popover>
|
|
124
|
+
<ul class="menu md:menu-horizontal">
|
|
125
|
+
<li><a>Starter</a></li>
|
|
126
|
+
<li><a>Team</a></li>
|
|
127
|
+
<li><a>Enterprise</a></li>
|
|
128
|
+
</ul>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
```
|