@loomidev/bottom-nav 0.2.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/LICENSE +21 -0
- package/README.md +245 -0
- package/custom-elements.json +666 -0
- package/dist/generated/styles.css.d.ts +3 -0
- package/dist/generated/styles.css.d.ts.map +1 -0
- package/dist/generated/styles.css.js +5 -0
- package/dist/generated/styles.css.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/loomi-bottom-nav.d.ts +123 -0
- package/dist/loomi-bottom-nav.d.ts.map +1 -0
- package/dist/loomi-bottom-nav.js +339 -0
- package/dist/loomi-bottom-nav.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/index.ts",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "js",
|
|
12
|
+
"name": "LoomiBottomNav",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "LoomiBottomNav",
|
|
15
|
+
"module": "./loomi-bottom-nav.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "js",
|
|
20
|
+
"name": "LoomiBottomNavItem",
|
|
21
|
+
"declaration": {
|
|
22
|
+
"name": "LoomiBottomNavItem",
|
|
23
|
+
"module": "./loomi-bottom-nav.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "js",
|
|
28
|
+
"name": "LoomiBottomNavActiveStyle",
|
|
29
|
+
"declaration": {
|
|
30
|
+
"name": "LoomiBottomNavActiveStyle",
|
|
31
|
+
"module": "./loomi-bottom-nav.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "js",
|
|
36
|
+
"name": "LoomiBottomNavVariant",
|
|
37
|
+
"declaration": {
|
|
38
|
+
"name": "LoomiBottomNavVariant",
|
|
39
|
+
"module": "./loomi-bottom-nav.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "js",
|
|
44
|
+
"name": "LoomiBottomNavChangeDetail",
|
|
45
|
+
"declaration": {
|
|
46
|
+
"name": "LoomiBottomNavChangeDetail",
|
|
47
|
+
"module": "./loomi-bottom-nav.js"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"kind": "javascript-module",
|
|
54
|
+
"path": "src/loomi-bottom-nav.ts",
|
|
55
|
+
"declarations": [
|
|
56
|
+
{
|
|
57
|
+
"kind": "class",
|
|
58
|
+
"description": "`<loomi-bottom-nav-item>` — a single destination inside a `<loomi-bottom-nav>`.\n\nSet `href` to render a real anchor (native links, Laravel routes, full page nav).\nOmit it and set `value` (or rely on `name`) to render a `<button>` instead — the item\nthen behaves as a pure emitter for client-side routers. Either way, clicking always\nfires `loomi-change`, so React Router / Vue Router / SvelteKit / Astro can intercept\nnavigation by calling `event.preventDefault()` on that event (or by setting the static\n`prevent-default` attribute). `target=\"_blank\"` always keeps native new-tab behavior.",
|
|
59
|
+
"name": "LoomiBottomNavItem",
|
|
60
|
+
"cssParts": [
|
|
61
|
+
{
|
|
62
|
+
"description": "The underlying `<a>`/`<button>`.",
|
|
63
|
+
"name": "link"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"description": "The `<loomi-icon>` element.",
|
|
67
|
+
"name": "icon"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"description": "The label wrapper.",
|
|
71
|
+
"name": "label"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"description": "The badge/count pill (only rendered when `badge` is set).",
|
|
75
|
+
"name": "badge"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"description": "The underline/top-line/dot marker (only visible for those `active-style`s).",
|
|
79
|
+
"name": "active-indicator"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"slots": [
|
|
83
|
+
{
|
|
84
|
+
"description": "The item's label text (used when the `label` attribute is absent).",
|
|
85
|
+
"name": ""
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"members": [
|
|
89
|
+
{
|
|
90
|
+
"kind": "field",
|
|
91
|
+
"name": "label",
|
|
92
|
+
"type": {
|
|
93
|
+
"text": "string"
|
|
94
|
+
},
|
|
95
|
+
"default": "\"\"",
|
|
96
|
+
"description": "Label text. Falls back to slot text if empty.",
|
|
97
|
+
"attribute": "label"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"kind": "field",
|
|
101
|
+
"name": "icon",
|
|
102
|
+
"type": {
|
|
103
|
+
"text": "string"
|
|
104
|
+
},
|
|
105
|
+
"default": "\"\"",
|
|
106
|
+
"description": "Built-in icon name (same registry as `<loomi-icon>`).",
|
|
107
|
+
"attribute": "icon"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"kind": "field",
|
|
111
|
+
"name": "iconSource",
|
|
112
|
+
"type": {
|
|
113
|
+
"text": "LoomiIconSource | \"\""
|
|
114
|
+
},
|
|
115
|
+
"default": "\"\"",
|
|
116
|
+
"description": "Icon set override for just this item. Empty = inherit from the parent `icon-source`.",
|
|
117
|
+
"attribute": "icon-source"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"kind": "field",
|
|
121
|
+
"name": "badge",
|
|
122
|
+
"type": {
|
|
123
|
+
"text": "string"
|
|
124
|
+
},
|
|
125
|
+
"default": "\"\"",
|
|
126
|
+
"description": "Badge content — a count or short string (e.g. `\"3\"`, `\"9+\"`). Empty = no badge.",
|
|
127
|
+
"attribute": "badge"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"kind": "field",
|
|
131
|
+
"name": "disabled",
|
|
132
|
+
"type": {
|
|
133
|
+
"text": "boolean"
|
|
134
|
+
},
|
|
135
|
+
"default": "false",
|
|
136
|
+
"description": "Disable this item: no navigation, no click/keyboard activation.",
|
|
137
|
+
"attribute": "disabled",
|
|
138
|
+
"reflects": true
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"kind": "field",
|
|
142
|
+
"name": "value",
|
|
143
|
+
"type": {
|
|
144
|
+
"text": "string"
|
|
145
|
+
},
|
|
146
|
+
"default": "\"\"",
|
|
147
|
+
"description": "Identifier matched against the parent's `active` attribute. Falls back to `name`, then slot text.",
|
|
148
|
+
"attribute": "value"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"kind": "field",
|
|
152
|
+
"name": "href",
|
|
153
|
+
"type": {
|
|
154
|
+
"text": "string"
|
|
155
|
+
},
|
|
156
|
+
"default": "\"\"",
|
|
157
|
+
"description": "Renders an `<a>` instead of a `<button>` and enables native/SPA-router navigation.",
|
|
158
|
+
"attribute": "href"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"kind": "field",
|
|
162
|
+
"name": "target",
|
|
163
|
+
"type": {
|
|
164
|
+
"text": "string"
|
|
165
|
+
},
|
|
166
|
+
"default": "\"\"",
|
|
167
|
+
"description": "Anchor `target`. `_blank` always keeps native new-tab behavior, even with `prevent-default`.",
|
|
168
|
+
"attribute": "target"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"kind": "field",
|
|
172
|
+
"name": "rel",
|
|
173
|
+
"type": {
|
|
174
|
+
"text": "string"
|
|
175
|
+
},
|
|
176
|
+
"default": "\"\"",
|
|
177
|
+
"description": "Anchor `rel`. Defaults to `noopener noreferrer` when `target=\"_blank\"` and `rel` is unset.",
|
|
178
|
+
"attribute": "rel"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"kind": "field",
|
|
182
|
+
"name": "preventDefaultNav",
|
|
183
|
+
"type": {
|
|
184
|
+
"text": "boolean"
|
|
185
|
+
},
|
|
186
|
+
"default": "false",
|
|
187
|
+
"description": "Always call `event.preventDefault()` on click, even for a real `href` — for apps that\nwant every navigation to go through the `loomi-change` event instead of a real link.",
|
|
188
|
+
"attribute": "prevent-default"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"kind": "field",
|
|
192
|
+
"name": "active",
|
|
193
|
+
"type": {
|
|
194
|
+
"text": "boolean"
|
|
195
|
+
},
|
|
196
|
+
"default": "false",
|
|
197
|
+
"description": "Whether this is the active item. Normally set by the parent — set directly only when\nusing this element outside a `<loomi-bottom-nav>`.",
|
|
198
|
+
"attribute": "active",
|
|
199
|
+
"reflects": true
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"kind": "field",
|
|
203
|
+
"name": "activeStyle",
|
|
204
|
+
"type": {
|
|
205
|
+
"text": "LoomiBottomNavActiveStyle"
|
|
206
|
+
},
|
|
207
|
+
"default": "\"pill\"",
|
|
208
|
+
"description": "Active visual treatment. Normally pushed down by the parent's `active-style`.",
|
|
209
|
+
"attribute": "active-style",
|
|
210
|
+
"reflects": true
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"kind": "field",
|
|
214
|
+
"name": "hostIconSource",
|
|
215
|
+
"type": {
|
|
216
|
+
"text": "LoomiIconSource"
|
|
217
|
+
},
|
|
218
|
+
"default": "\"heroicons\"",
|
|
219
|
+
"description": "Fallback icon source inherited from the parent. Set internally — not a public API."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"kind": "field",
|
|
223
|
+
"name": "linkEl",
|
|
224
|
+
"type": {
|
|
225
|
+
"text": "HTMLAnchorElement | HTMLButtonElement | undefined"
|
|
226
|
+
},
|
|
227
|
+
"privacy": "private"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"kind": "method",
|
|
231
|
+
"name": "focus",
|
|
232
|
+
"return": {
|
|
233
|
+
"type": {
|
|
234
|
+
"text": "void"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"parameters": [
|
|
238
|
+
{
|
|
239
|
+
"name": "options",
|
|
240
|
+
"optional": true,
|
|
241
|
+
"type": {
|
|
242
|
+
"text": "FocusOptions"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"description": "Delegates focus to the internal `<a>`/`<button>` — the host itself holds no focus."
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"kind": "field",
|
|
250
|
+
"name": "itemValue",
|
|
251
|
+
"type": {
|
|
252
|
+
"text": "string"
|
|
253
|
+
},
|
|
254
|
+
"description": "The identifier compared against the parent's `active` attribute.",
|
|
255
|
+
"readonly": true
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"kind": "field",
|
|
259
|
+
"name": "effectiveIconSource",
|
|
260
|
+
"type": {
|
|
261
|
+
"text": "LoomiIconSource"
|
|
262
|
+
},
|
|
263
|
+
"privacy": "private",
|
|
264
|
+
"readonly": true
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"kind": "field",
|
|
268
|
+
"name": "effectiveRel",
|
|
269
|
+
"type": {
|
|
270
|
+
"text": "string | undefined"
|
|
271
|
+
},
|
|
272
|
+
"privacy": "private",
|
|
273
|
+
"readonly": true
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"kind": "field",
|
|
277
|
+
"name": "onClick",
|
|
278
|
+
"privacy": "private"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "method",
|
|
282
|
+
"name": "renderBadge",
|
|
283
|
+
"privacy": "private",
|
|
284
|
+
"return": {
|
|
285
|
+
"type": {
|
|
286
|
+
"text": "TemplateResult | typeof nothing"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"kind": "method",
|
|
292
|
+
"name": "renderInner",
|
|
293
|
+
"privacy": "private",
|
|
294
|
+
"return": {
|
|
295
|
+
"type": {
|
|
296
|
+
"text": "TemplateResult"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"events": [
|
|
302
|
+
{
|
|
303
|
+
"description": "Bubbles + composed, cancelable. `detail: { item, value, name, href }`.",
|
|
304
|
+
"name": "loomi-change"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"attributes": [
|
|
308
|
+
{
|
|
309
|
+
"name": "label",
|
|
310
|
+
"type": {
|
|
311
|
+
"text": "string"
|
|
312
|
+
},
|
|
313
|
+
"default": "\"\"",
|
|
314
|
+
"description": "Label text. Falls back to slot text if empty.",
|
|
315
|
+
"fieldName": "label"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "icon",
|
|
319
|
+
"type": {
|
|
320
|
+
"text": "string"
|
|
321
|
+
},
|
|
322
|
+
"default": "\"\"",
|
|
323
|
+
"description": "Built-in icon name (same registry as `<loomi-icon>`).",
|
|
324
|
+
"fieldName": "icon"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "icon-source",
|
|
328
|
+
"type": {
|
|
329
|
+
"text": "LoomiIconSource | \"\""
|
|
330
|
+
},
|
|
331
|
+
"default": "\"\"",
|
|
332
|
+
"description": "Icon set override for just this item. Empty = inherit from the parent `icon-source`.",
|
|
333
|
+
"fieldName": "iconSource"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "badge",
|
|
337
|
+
"type": {
|
|
338
|
+
"text": "string"
|
|
339
|
+
},
|
|
340
|
+
"default": "\"\"",
|
|
341
|
+
"description": "Badge content — a count or short string (e.g. `\"3\"`, `\"9+\"`). Empty = no badge.",
|
|
342
|
+
"fieldName": "badge"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "disabled",
|
|
346
|
+
"type": {
|
|
347
|
+
"text": "boolean"
|
|
348
|
+
},
|
|
349
|
+
"default": "false",
|
|
350
|
+
"description": "Disable this item: no navigation, no click/keyboard activation.",
|
|
351
|
+
"fieldName": "disabled"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "value",
|
|
355
|
+
"type": {
|
|
356
|
+
"text": "string"
|
|
357
|
+
},
|
|
358
|
+
"default": "\"\"",
|
|
359
|
+
"description": "Identifier matched against the parent's `active` attribute. Falls back to `name`, then slot text.",
|
|
360
|
+
"fieldName": "value"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "href",
|
|
364
|
+
"type": {
|
|
365
|
+
"text": "string"
|
|
366
|
+
},
|
|
367
|
+
"default": "\"\"",
|
|
368
|
+
"description": "Renders an `<a>` instead of a `<button>` and enables native/SPA-router navigation.",
|
|
369
|
+
"fieldName": "href"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "target",
|
|
373
|
+
"type": {
|
|
374
|
+
"text": "string"
|
|
375
|
+
},
|
|
376
|
+
"default": "\"\"",
|
|
377
|
+
"description": "Anchor `target`. `_blank` always keeps native new-tab behavior, even with `prevent-default`.",
|
|
378
|
+
"fieldName": "target"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"name": "rel",
|
|
382
|
+
"type": {
|
|
383
|
+
"text": "string"
|
|
384
|
+
},
|
|
385
|
+
"default": "\"\"",
|
|
386
|
+
"description": "Anchor `rel`. Defaults to `noopener noreferrer` when `target=\"_blank\"` and `rel` is unset.",
|
|
387
|
+
"fieldName": "rel"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "prevent-default",
|
|
391
|
+
"type": {
|
|
392
|
+
"text": "boolean"
|
|
393
|
+
},
|
|
394
|
+
"default": "false",
|
|
395
|
+
"description": "Always call `event.preventDefault()` on click, even for a real `href` — for apps that\nwant every navigation to go through the `loomi-change` event instead of a real link.",
|
|
396
|
+
"fieldName": "preventDefaultNav"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "active",
|
|
400
|
+
"type": {
|
|
401
|
+
"text": "boolean"
|
|
402
|
+
},
|
|
403
|
+
"default": "false",
|
|
404
|
+
"description": "Whether this is the active item. Normally set by the parent — set directly only when\nusing this element outside a `<loomi-bottom-nav>`.",
|
|
405
|
+
"fieldName": "active"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "active-style",
|
|
409
|
+
"type": {
|
|
410
|
+
"text": "LoomiBottomNavActiveStyle"
|
|
411
|
+
},
|
|
412
|
+
"default": "\"pill\"",
|
|
413
|
+
"description": "Active visual treatment. Normally pushed down by the parent's `active-style`.",
|
|
414
|
+
"fieldName": "activeStyle"
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
"superclass": {
|
|
418
|
+
"name": "LoomiElement",
|
|
419
|
+
"package": "@loomidev/core"
|
|
420
|
+
},
|
|
421
|
+
"tagName": "loomi-bottom-nav-item",
|
|
422
|
+
"customElement": true
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"kind": "class",
|
|
426
|
+
"description": "`<loomi-bottom-nav>` — a mobile bottom navigation bar. Fixed to the viewport bottom by\ndefault (safe-area aware); set `variant=\"floating\"` for a detached, rounded, elevated\nisland instead. Set `mobile-only` to hide it at tablet width and up.\n\n`active` is a controlled identifier — set it to a child's `value`/`name` (or update it\nfrom a router) and every `<loomi-bottom-nav-item>` recomputes its own active state.\nClicking an (enabled) item also updates `active` locally for immediate feedback, and\nalways fires `loomi-change` so a router can take over.",
|
|
427
|
+
"name": "LoomiBottomNav",
|
|
428
|
+
"cssParts": [
|
|
429
|
+
{
|
|
430
|
+
"description": "The internal `<nav>` element.",
|
|
431
|
+
"name": "nav"
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
"slots": [
|
|
435
|
+
{
|
|
436
|
+
"description": "`<loomi-bottom-nav-item>` children (3–5 recommended).",
|
|
437
|
+
"name": ""
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"members": [
|
|
441
|
+
{
|
|
442
|
+
"kind": "field",
|
|
443
|
+
"name": "active",
|
|
444
|
+
"type": {
|
|
445
|
+
"text": "string"
|
|
446
|
+
},
|
|
447
|
+
"default": "\"\"",
|
|
448
|
+
"description": "The active item's `value`/`name`. Set this from your router to control which item is highlighted.",
|
|
449
|
+
"attribute": "active",
|
|
450
|
+
"reflects": true
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"kind": "field",
|
|
454
|
+
"name": "activeStyle",
|
|
455
|
+
"type": {
|
|
456
|
+
"text": "LoomiBottomNavActiveStyle"
|
|
457
|
+
},
|
|
458
|
+
"default": "\"pill\"",
|
|
459
|
+
"description": "Visual treatment for the active item.",
|
|
460
|
+
"attribute": "active-style",
|
|
461
|
+
"reflects": true
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"kind": "field",
|
|
465
|
+
"name": "variant",
|
|
466
|
+
"type": {
|
|
467
|
+
"text": "LoomiBottomNavVariant"
|
|
468
|
+
},
|
|
469
|
+
"default": "\"fixed\"",
|
|
470
|
+
"description": "`fixed` docks edge-to-edge at the viewport bottom (default); `floating` detaches into a rounded, elevated island.",
|
|
471
|
+
"attribute": "variant",
|
|
472
|
+
"reflects": true
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"kind": "field",
|
|
476
|
+
"name": "color",
|
|
477
|
+
"type": {
|
|
478
|
+
"text": "LoomiColor"
|
|
479
|
+
},
|
|
480
|
+
"default": "\"primary\"",
|
|
481
|
+
"description": "Accent used for the active item's color/background/border/dot.",
|
|
482
|
+
"attribute": "color"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"kind": "field",
|
|
486
|
+
"name": "iconSource",
|
|
487
|
+
"type": {
|
|
488
|
+
"text": "LoomiIconSource"
|
|
489
|
+
},
|
|
490
|
+
"default": "\"heroicons\"",
|
|
491
|
+
"description": "Default icon set for every item — overridable per-item via `<loomi-bottom-nav-item icon-source>`.",
|
|
492
|
+
"attribute": "icon-source"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"kind": "field",
|
|
496
|
+
"name": "label",
|
|
497
|
+
"type": {
|
|
498
|
+
"text": "string"
|
|
499
|
+
},
|
|
500
|
+
"default": "\"Primary\"",
|
|
501
|
+
"description": "Accessible label for the `<nav>` landmark.",
|
|
502
|
+
"attribute": "label"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"kind": "field",
|
|
506
|
+
"name": "mobileOnly",
|
|
507
|
+
"type": {
|
|
508
|
+
"text": "boolean"
|
|
509
|
+
},
|
|
510
|
+
"default": "false",
|
|
511
|
+
"description": "Hide this bar at tablet width (768px) and up — bottom navs are typically mobile-only.",
|
|
512
|
+
"attribute": "mobile-only",
|
|
513
|
+
"reflects": true
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"kind": "field",
|
|
517
|
+
"name": "items",
|
|
518
|
+
"type": {
|
|
519
|
+
"text": "LoomiBottomNavItem[]"
|
|
520
|
+
},
|
|
521
|
+
"privacy": "private",
|
|
522
|
+
"readonly": true
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"kind": "method",
|
|
526
|
+
"name": "syncItems",
|
|
527
|
+
"privacy": "private",
|
|
528
|
+
"return": {
|
|
529
|
+
"type": {
|
|
530
|
+
"text": "void"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"kind": "field",
|
|
536
|
+
"name": "onSlotchange",
|
|
537
|
+
"privacy": "private"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"kind": "field",
|
|
541
|
+
"name": "onItemChange",
|
|
542
|
+
"privacy": "private"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"kind": "field",
|
|
546
|
+
"name": "onKeydown",
|
|
547
|
+
"privacy": "private",
|
|
548
|
+
"description": "Arrow/Home/End roving focus across items (manual activation — Enter/Space/click still\ndo the actual navigating, per the WAI-ARIA APG toolbar pattern)."
|
|
549
|
+
}
|
|
550
|
+
],
|
|
551
|
+
"events": [
|
|
552
|
+
{
|
|
553
|
+
"description": "Re-fired (bubbled through) from the clicked item — see `<loomi-bottom-nav-item>`. `detail: { item, value, name, href }`.",
|
|
554
|
+
"name": "loomi-change"
|
|
555
|
+
}
|
|
556
|
+
],
|
|
557
|
+
"attributes": [
|
|
558
|
+
{
|
|
559
|
+
"name": "active",
|
|
560
|
+
"type": {
|
|
561
|
+
"text": "string"
|
|
562
|
+
},
|
|
563
|
+
"default": "\"\"",
|
|
564
|
+
"description": "The active item's `value`/`name`. Set this from your router to control which item is highlighted.",
|
|
565
|
+
"fieldName": "active"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "active-style",
|
|
569
|
+
"type": {
|
|
570
|
+
"text": "LoomiBottomNavActiveStyle"
|
|
571
|
+
},
|
|
572
|
+
"default": "\"pill\"",
|
|
573
|
+
"description": "Visual treatment for the active item.",
|
|
574
|
+
"fieldName": "activeStyle"
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "variant",
|
|
578
|
+
"type": {
|
|
579
|
+
"text": "LoomiBottomNavVariant"
|
|
580
|
+
},
|
|
581
|
+
"default": "\"fixed\"",
|
|
582
|
+
"description": "`fixed` docks edge-to-edge at the viewport bottom (default); `floating` detaches into a rounded, elevated island.",
|
|
583
|
+
"fieldName": "variant"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "color",
|
|
587
|
+
"type": {
|
|
588
|
+
"text": "LoomiColor"
|
|
589
|
+
},
|
|
590
|
+
"default": "\"primary\"",
|
|
591
|
+
"description": "Accent used for the active item's color/background/border/dot.",
|
|
592
|
+
"fieldName": "color"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "icon-source",
|
|
596
|
+
"type": {
|
|
597
|
+
"text": "LoomiIconSource"
|
|
598
|
+
},
|
|
599
|
+
"default": "\"heroicons\"",
|
|
600
|
+
"description": "Default icon set for every item — overridable per-item via `<loomi-bottom-nav-item icon-source>`.",
|
|
601
|
+
"fieldName": "iconSource"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"name": "label",
|
|
605
|
+
"type": {
|
|
606
|
+
"text": "string"
|
|
607
|
+
},
|
|
608
|
+
"default": "\"Primary\"",
|
|
609
|
+
"description": "Accessible label for the `<nav>` landmark.",
|
|
610
|
+
"fieldName": "label"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"name": "mobile-only",
|
|
614
|
+
"type": {
|
|
615
|
+
"text": "boolean"
|
|
616
|
+
},
|
|
617
|
+
"default": "false",
|
|
618
|
+
"description": "Hide this bar at tablet width (768px) and up — bottom navs are typically mobile-only.",
|
|
619
|
+
"fieldName": "mobileOnly"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"superclass": {
|
|
623
|
+
"name": "LoomiElement",
|
|
624
|
+
"package": "@loomidev/core"
|
|
625
|
+
},
|
|
626
|
+
"tagName": "loomi-bottom-nav",
|
|
627
|
+
"customElement": true
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
"exports": [
|
|
631
|
+
{
|
|
632
|
+
"kind": "js",
|
|
633
|
+
"name": "LoomiBottomNavItem",
|
|
634
|
+
"declaration": {
|
|
635
|
+
"name": "LoomiBottomNavItem",
|
|
636
|
+
"module": "src/loomi-bottom-nav.ts"
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"kind": "custom-element-definition",
|
|
641
|
+
"name": "loomi-bottom-nav-item",
|
|
642
|
+
"declaration": {
|
|
643
|
+
"name": "LoomiBottomNavItem",
|
|
644
|
+
"module": "src/loomi-bottom-nav.ts"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"kind": "js",
|
|
649
|
+
"name": "LoomiBottomNav",
|
|
650
|
+
"declaration": {
|
|
651
|
+
"name": "LoomiBottomNav",
|
|
652
|
+
"module": "src/loomi-bottom-nav.ts"
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"kind": "custom-element-definition",
|
|
657
|
+
"name": "loomi-bottom-nav",
|
|
658
|
+
"declaration": {
|
|
659
|
+
"name": "LoomiBottomNav",
|
|
660
|
+
"module": "src/loomi-bottom-nav.ts"
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../src/generated/styles.css.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,eAAO,MAAM,eAAe,yBAAuzI,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Generated by @loomidev/bottom-nav — do not edit by hand. Run `pnpm build` to regenerate.
|
|
2
|
+
import { unsafeCSS } from "lit";
|
|
3
|
+
/** Compiled, Shadow-DOM-scoped styles. Colors resolve via `var(--loomi-*)`. */
|
|
4
|
+
export const componentStyles = unsafeCSS("/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n@layer theme,base,components,utilities;:host(loomi-bottom-nav){z-index:40;-webkit-tap-highlight-color:transparent;display:block;position:fixed;bottom:0;left:0;right:0}:host(loomi-bottom-nav[hidden]){display:none}:host(loomi-bottom-nav[variant=floating]){left:50%;right:auto;bottom:max(.75rem, calc(env(safe-area-inset-bottom,0px) + .5rem));width:min(30rem,100% - 2rem);transform:translate(-50%)}@media (min-width:768px){:host(loomi-bottom-nav[mobile-only]){display:none}}.loomi-bnav{box-sizing:border-box;background:var(--loomi-surface);align-items:stretch;width:100%;height:4rem;display:flex}:host([variant=fixed]) .loomi-bnav{border-top:1px solid var(--loomi-surface-border);padding-bottom:env(safe-area-inset-bottom,0px)}:host([variant=floating]) .loomi-bnav{border:1px solid var(--loomi-surface-border);border-radius:1.25rem;overflow:hidden;box-shadow:0 10px 30px -12px #0f172a47}:host(loomi-bottom-nav-item){flex:1 1 0;min-width:0;display:flex}:host(loomi-bottom-nav-item[hidden]){display:none}.loomi-bnavi-link{width:100%;min-width:0;color:var(--loomi-text-muted);text-align:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:0 0;border:none;flex-direction:column;justify-content:center;align-items:center;gap:.2rem;padding:.375rem .25rem;font-family:inherit;font-size:.6875rem;font-weight:500;line-height:1;text-decoration:none;transition:background-color .15s,color .15s,border-color .15s;display:flex;position:relative}.loomi-bnavi-link:hover{color:var(--loomi-text)}.loomi-bnavi-link:focus{outline:none}.loomi-bnavi-link:focus-visible{box-shadow:inset 0 0 0 2px var(--_loomi-accent-ring);outline:none}:host(loomi-bottom-nav-item[disabled]) .loomi-bnavi-link{opacity:.5;cursor:not-allowed;pointer-events:none}.loomi-bnavi-icon-wrap{display:inline-flex;position:relative}.loomi-bnavi-icon{color:inherit;flex:none}.loomi-bnavi-label{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.loomi-bnavi-badge{box-sizing:border-box;background:var(--loomi-bottom-nav-badge-bg,var(--loomi-error-600,#dc2626));min-width:1rem;height:1rem;color:var(--loomi-bottom-nav-badge-color,var(--loomi-white));box-shadow:0 0 0 2px var(--loomi-surface);text-align:center;border-radius:999px;padding:0 .25rem;font-size:.625rem;font-weight:600;line-height:1rem;position:absolute;top:-.3rem;right:-.5rem}.loomi-bnavi-indicator{display:none}:host([active][active-style=pill]) .loomi-bnavi-link{background:var(--loomi-bottom-nav-active-bg,var(--_loomi-accent-soft));color:var(--loomi-bottom-nav-active-color,var(--_loomi-accent-fg));border-radius:var(--loomi-bottom-nav-active-radius,999px)}:host([active][active-style=background]) .loomi-bnavi-link{background:var(--loomi-bottom-nav-active-bg,var(--_loomi-accent-soft));color:var(--loomi-bottom-nav-active-color,var(--_loomi-accent-fg));border-radius:.75rem}:host([active][active-style=border]) .loomi-bnavi-link{color:var(--loomi-bottom-nav-active-color,var(--_loomi-accent-fg));border:1.5px solid var(--loomi-bottom-nav-active-border,var(--_loomi-accent));border-radius:var(--loomi-bottom-nav-active-radius,999px)}:host([active][active-style=icon-only]) .loomi-bnavi-icon,:host([active][active-style=minimal]) .loomi-bnavi-link,:host([active][active-style=underline]) .loomi-bnavi-link,:host([active][active-style=top-line]) .loomi-bnavi-link,:host([active][active-style=dot]) .loomi-bnavi-link{color:var(--loomi-bottom-nav-active-color,var(--_loomi-accent-fg))}:host([active][active-style=underline]) .loomi-bnavi-indicator{background:var(--loomi-bottom-nav-active-border,var(--_loomi-accent));border-radius:999px 999px 0 0;width:1.5rem;height:3px;display:block;position:absolute;bottom:0;left:50%;transform:translate(-50%)}:host([active][active-style=top-line]) .loomi-bnavi-indicator{background:var(--loomi-bottom-nav-active-border,var(--_loomi-accent));border-radius:0 0 999px 999px;width:1.5rem;height:3px;display:block;position:absolute;top:0;left:50%;transform:translate(-50%)}:host([active][active-style=dot]) .loomi-bnavi-indicator{width:var(--loomi-bottom-nav-active-dot-size,6px);height:var(--loomi-bottom-nav-active-dot-size,6px);background:var(--loomi-bottom-nav-active-border,var(--_loomi-accent));border-radius:50%;display:block;position:absolute;bottom:0;left:50%;transform:translate(-50%)}");
|
|
5
|
+
//# sourceMappingURL=styles.css.js.map
|