use-wc 1.0.0-pre.48 → 1.0.0-pre.49
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/custom-elements.json +259 -191
- package/dist/design-system.css +97 -20
- package/dist/docs/use-date-picker.md +34 -1
- package/dist/docs/use-dropdown.md +6 -0
- package/dist/docs/use-focusgroup.md +7 -0
- package/dist/docs/use-gridcell.md +8 -0
- package/dist/docs/use-listbox-input.md +6 -0
- package/dist/docs/use-menu.md +6 -0
- package/dist/docs/use-month-picker.md +35 -1
- package/dist/docs/use-option.md +7 -0
- package/dist/docs/use-select-input.md +6 -0
- package/dist/docs/use-tree.md +8 -0
- package/dist/docs/use-treeitem.md +7 -0
- package/dist/docs/use-week-picker.md +34 -1
- package/dist/docs/use-widget.md +8 -0
- package/dist/tokens.css +318 -142
- package/dist/use-wc.d.mts +115 -2
- package/dist/use-wc.mjs +26 -16
- package/package.json +1 -1
- package/vscode.html-custom-data.json +23 -23
package/custom-elements.json
CHANGED
|
@@ -269,11 +269,28 @@
|
|
|
269
269
|
]
|
|
270
270
|
},
|
|
271
271
|
{
|
|
272
|
-
"kind": "
|
|
272
|
+
"kind": "method",
|
|
273
273
|
"name": "renderDay",
|
|
274
|
-
"
|
|
275
|
-
"
|
|
276
|
-
|
|
274
|
+
"return": {
|
|
275
|
+
"type": {
|
|
276
|
+
"text": "TemplateResult | string"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"parameters": [
|
|
280
|
+
{
|
|
281
|
+
"name": "data",
|
|
282
|
+
"type": {
|
|
283
|
+
"text": "{ day: number; date: string }"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "_html",
|
|
288
|
+
"type": {
|
|
289
|
+
"text": "LitHtml"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"description": "See UseCalendarRenderDay. Assigning a new function on an\ninstance (e.g. via `.renderDay=${fn}` in a Lit template) after first\nrender does not schedule a re-render on its own — call `requestUpdate()`\nif needed.\n\nDeclared as a regular method rather than a class field so subclass\noverrides can call `super.renderDay(data, html)` to fall back to the\ndefault (or a parent override's) rendering."
|
|
277
294
|
},
|
|
278
295
|
{
|
|
279
296
|
"kind": "method",
|
|
@@ -396,6 +413,71 @@
|
|
|
396
413
|
}
|
|
397
414
|
]
|
|
398
415
|
},
|
|
416
|
+
{
|
|
417
|
+
"kind": "javascript-module",
|
|
418
|
+
"path": "src/elements/use-calendarday/use-calendarday.ts",
|
|
419
|
+
"declarations": [
|
|
420
|
+
{
|
|
421
|
+
"kind": "class",
|
|
422
|
+
"description": "A helper component for customizing specific days within `use-calendar`.\nContent placed inside this element will replace the default day number display.",
|
|
423
|
+
"name": "UseCalendarday",
|
|
424
|
+
"slots": [
|
|
425
|
+
{
|
|
426
|
+
"description": "slot for custom day content (replaces the day number)",
|
|
427
|
+
"name": "default"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"members": [
|
|
431
|
+
{
|
|
432
|
+
"kind": "field",
|
|
433
|
+
"name": "date",
|
|
434
|
+
"type": {
|
|
435
|
+
"text": "string"
|
|
436
|
+
},
|
|
437
|
+
"attribute": "date"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"kind": "field",
|
|
441
|
+
"name": "day",
|
|
442
|
+
"readonly": true
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"attributes": [
|
|
446
|
+
{
|
|
447
|
+
"name": "date",
|
|
448
|
+
"type": {
|
|
449
|
+
"text": "string"
|
|
450
|
+
},
|
|
451
|
+
"fieldName": "date"
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"superclass": {
|
|
455
|
+
"name": "LitElement",
|
|
456
|
+
"package": "lit"
|
|
457
|
+
},
|
|
458
|
+
"tagName": "use-calendarday",
|
|
459
|
+
"customElement": true
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"exports": [
|
|
463
|
+
{
|
|
464
|
+
"kind": "js",
|
|
465
|
+
"name": "UseCalendarday",
|
|
466
|
+
"declaration": {
|
|
467
|
+
"name": "UseCalendarday",
|
|
468
|
+
"module": "src/elements/use-calendarday/use-calendarday.ts"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"kind": "custom-element-definition",
|
|
473
|
+
"name": "use-calendarday",
|
|
474
|
+
"declaration": {
|
|
475
|
+
"name": "UseCalendarday",
|
|
476
|
+
"module": "src/elements/use-calendarday/use-calendarday.ts"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
]
|
|
480
|
+
},
|
|
399
481
|
{
|
|
400
482
|
"kind": "javascript-module",
|
|
401
483
|
"path": "src/elements/use-date-input/use-date-input.ts",
|
|
@@ -522,78 +604,13 @@
|
|
|
522
604
|
}
|
|
523
605
|
]
|
|
524
606
|
},
|
|
525
|
-
{
|
|
526
|
-
"kind": "javascript-module",
|
|
527
|
-
"path": "src/elements/use-calendarday/use-calendarday.ts",
|
|
528
|
-
"declarations": [
|
|
529
|
-
{
|
|
530
|
-
"kind": "class",
|
|
531
|
-
"description": "A helper component for customizing specific days within `use-calendar`.\nContent placed inside this element will replace the default day number display.",
|
|
532
|
-
"name": "UseCalendarday",
|
|
533
|
-
"slots": [
|
|
534
|
-
{
|
|
535
|
-
"description": "slot for custom day content (replaces the day number)",
|
|
536
|
-
"name": "default"
|
|
537
|
-
}
|
|
538
|
-
],
|
|
539
|
-
"members": [
|
|
540
|
-
{
|
|
541
|
-
"kind": "field",
|
|
542
|
-
"name": "date",
|
|
543
|
-
"type": {
|
|
544
|
-
"text": "string"
|
|
545
|
-
},
|
|
546
|
-
"attribute": "date"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"kind": "field",
|
|
550
|
-
"name": "day",
|
|
551
|
-
"readonly": true
|
|
552
|
-
}
|
|
553
|
-
],
|
|
554
|
-
"attributes": [
|
|
555
|
-
{
|
|
556
|
-
"name": "date",
|
|
557
|
-
"type": {
|
|
558
|
-
"text": "string"
|
|
559
|
-
},
|
|
560
|
-
"fieldName": "date"
|
|
561
|
-
}
|
|
562
|
-
],
|
|
563
|
-
"superclass": {
|
|
564
|
-
"name": "LitElement",
|
|
565
|
-
"package": "lit"
|
|
566
|
-
},
|
|
567
|
-
"tagName": "use-calendarday",
|
|
568
|
-
"customElement": true
|
|
569
|
-
}
|
|
570
|
-
],
|
|
571
|
-
"exports": [
|
|
572
|
-
{
|
|
573
|
-
"kind": "js",
|
|
574
|
-
"name": "UseCalendarday",
|
|
575
|
-
"declaration": {
|
|
576
|
-
"name": "UseCalendarday",
|
|
577
|
-
"module": "src/elements/use-calendarday/use-calendarday.ts"
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
"kind": "custom-element-definition",
|
|
582
|
-
"name": "use-calendarday",
|
|
583
|
-
"declaration": {
|
|
584
|
-
"name": "UseCalendarday",
|
|
585
|
-
"module": "src/elements/use-calendarday/use-calendarday.ts"
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
]
|
|
589
|
-
},
|
|
590
607
|
{
|
|
591
608
|
"kind": "javascript-module",
|
|
592
609
|
"path": "src/elements/use-date-picker/use-date-picker.ts",
|
|
593
610
|
"declarations": [
|
|
594
611
|
{
|
|
595
612
|
"kind": "class",
|
|
596
|
-
"description": "A day-granularity date picker. Value format: YYYY-MM-DD.",
|
|
613
|
+
"description": "A day-granularity date picker. Value format: YYYY-MM-DD.\n\nCustomize day rendering on an instance:\n```ts\ndatePicker.renderDay = ({ day, date }, html) =>\n date === \"2026-03-17\" ? html`<strong>${day}</strong>` : String(day);\n```\n\nOr override on a subclass to apply it to every instance, falling back to\n`super.renderDay(...)` for dates you don't want to customize:\n```ts\nclass MyDatePicker extends UseDatePicker {\n renderDay(data: { day: number; date: string }, html: LitHtml) {\n if (data.date === \"2026-03-17\") {\n return html`<strong>${data.day}</strong>`;\n }\n return super.renderDay(data, html);\n }\n}\n```",
|
|
597
614
|
"name": "UseDatePicker",
|
|
598
615
|
"members": [
|
|
599
616
|
{
|
|
@@ -775,11 +792,28 @@
|
|
|
775
792
|
}
|
|
776
793
|
},
|
|
777
794
|
{
|
|
778
|
-
"kind": "
|
|
795
|
+
"kind": "method",
|
|
779
796
|
"name": "renderDay",
|
|
780
|
-
"
|
|
781
|
-
"
|
|
797
|
+
"return": {
|
|
798
|
+
"type": {
|
|
799
|
+
"text": "TemplateResult | string"
|
|
800
|
+
}
|
|
782
801
|
},
|
|
802
|
+
"parameters": [
|
|
803
|
+
{
|
|
804
|
+
"name": "data",
|
|
805
|
+
"type": {
|
|
806
|
+
"text": "{ day: number; date: string }"
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "_html",
|
|
811
|
+
"type": {
|
|
812
|
+
"text": "LitHtml"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
],
|
|
816
|
+
"description": "See UseCalendarRenderDay. Assigning a new function on an\ninstance (e.g. via `.renderDay=${fn}` in a Lit template) after first\nrender does not schedule a re-render on its own — call `requestUpdate()`\nif needed.\n\nDeclared as a regular method rather than a class field so subclass\noverrides can call `super.renderDay(data, html)` to fall back to the\ndefault (or a parent override's) rendering.",
|
|
783
817
|
"inheritedFrom": {
|
|
784
818
|
"name": "UseCalendarBase",
|
|
785
819
|
"module": "src/elements/use-calendar-base/use-calendar-base.ts"
|
|
@@ -1233,6 +1267,115 @@
|
|
|
1233
1267
|
}
|
|
1234
1268
|
]
|
|
1235
1269
|
},
|
|
1270
|
+
{
|
|
1271
|
+
"kind": "javascript-module",
|
|
1272
|
+
"path": "src/elements/use-dropdown/use-dropdown.ts",
|
|
1273
|
+
"declarations": [
|
|
1274
|
+
{
|
|
1275
|
+
"kind": "class",
|
|
1276
|
+
"description": "When the popover is opened the tabbable elements are found and indexed for\nkeyboard navigation. The first tabbable element is focused when the popover is opened. The\nfollowing selector is used to find tabbable elements:\n\n```css\n:is(\n [role=\"menuitem\"],\n [role=\"menuitemcheckbox\"],\n [role=\"menuitemradio\"],\n use-menu\n):not(:is(\n [disabled],\n [hidden],\n [inert],\n [aria-hidden=\"true\"]\n))\n```\n\nMenu items are not used for navigation, they are intended for related action\nitems that allows a user to manipulate a user interface or content. Read the\nWCAG guidance for more details:\n[https://www.w3.org/WAI/ARIA/apg/patterns/menubar/](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/)\n\nFor an icon-only trigger, omit `label` and set `aria-label` on `use-dropdown` itself — it is\nforwarded to the trigger button so the control still has an accessible name.",
|
|
1277
|
+
"name": "UseDropdown",
|
|
1278
|
+
"slots": [
|
|
1279
|
+
{
|
|
1280
|
+
"name": "default"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"name": "trigger-content"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"name": "trigger-label"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"name": "trigger-arrow"
|
|
1290
|
+
}
|
|
1291
|
+
],
|
|
1292
|
+
"members": [
|
|
1293
|
+
{
|
|
1294
|
+
"kind": "field",
|
|
1295
|
+
"name": "trigger",
|
|
1296
|
+
"type": {
|
|
1297
|
+
"text": "HTMLButtonElement | null"
|
|
1298
|
+
},
|
|
1299
|
+
"default": "null"
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"kind": "field",
|
|
1303
|
+
"name": "disabled",
|
|
1304
|
+
"attribute": "disabled"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"kind": "field",
|
|
1308
|
+
"name": "label",
|
|
1309
|
+
"type": {
|
|
1310
|
+
"text": "string"
|
|
1311
|
+
},
|
|
1312
|
+
"attribute": "label"
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"kind": "field",
|
|
1316
|
+
"name": "inlinealign",
|
|
1317
|
+
"type": {
|
|
1318
|
+
"text": "\"start\" | \"end\""
|
|
1319
|
+
},
|
|
1320
|
+
"default": "\"start\"",
|
|
1321
|
+
"description": "Aligns the menu along the inline axis relative to the trigger. Applies to top-level\nmenus; nested submenus are always positioned to the side of their parent trigger.\n\n- `start`: the menu's inline-start edge aligns with the trigger's inline-start edge\n- `end`: the menu's inline-end edge aligns with the trigger's inline-end edge",
|
|
1322
|
+
"attribute": "inlinealign",
|
|
1323
|
+
"reflects": true
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"kind": "method",
|
|
1327
|
+
"name": "getId"
|
|
1328
|
+
}
|
|
1329
|
+
],
|
|
1330
|
+
"attributes": [
|
|
1331
|
+
{
|
|
1332
|
+
"description": "Aligns the menu along the inline axis relative to the trigger. Applies to top-level\nmenus; nested submenus are always positioned to the side of their parent trigger.\n\n- `start`: the menu's inline-start edge aligns with the trigger's inline-start edge\n- `end`: the menu's inline-end edge aligns with the trigger's inline-end edge",
|
|
1333
|
+
"name": "inlinealign",
|
|
1334
|
+
"type": {
|
|
1335
|
+
"text": "\"start\" | \"end\""
|
|
1336
|
+
},
|
|
1337
|
+
"default": "\"start\"",
|
|
1338
|
+
"fieldName": "inlinealign"
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"name": "disabled",
|
|
1342
|
+
"fieldName": "disabled"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"name": "label",
|
|
1346
|
+
"type": {
|
|
1347
|
+
"text": "string"
|
|
1348
|
+
},
|
|
1349
|
+
"fieldName": "label"
|
|
1350
|
+
}
|
|
1351
|
+
],
|
|
1352
|
+
"superclass": {
|
|
1353
|
+
"name": "LitElement",
|
|
1354
|
+
"package": "lit"
|
|
1355
|
+
},
|
|
1356
|
+
"tagName": "use-dropdown",
|
|
1357
|
+
"customElement": true
|
|
1358
|
+
}
|
|
1359
|
+
],
|
|
1360
|
+
"exports": [
|
|
1361
|
+
{
|
|
1362
|
+
"kind": "js",
|
|
1363
|
+
"name": "UseDropdown",
|
|
1364
|
+
"declaration": {
|
|
1365
|
+
"name": "UseDropdown",
|
|
1366
|
+
"module": "src/elements/use-dropdown/use-dropdown.ts"
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
"kind": "custom-element-definition",
|
|
1371
|
+
"name": "use-dropdown",
|
|
1372
|
+
"declaration": {
|
|
1373
|
+
"name": "UseDropdown",
|
|
1374
|
+
"module": "src/elements/use-dropdown/use-dropdown.ts"
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
]
|
|
1378
|
+
},
|
|
1236
1379
|
{
|
|
1237
1380
|
"kind": "javascript-module",
|
|
1238
1381
|
"path": "src/elements/use-datetime-input/use-datetime-input.ts",
|
|
@@ -1448,115 +1591,6 @@
|
|
|
1448
1591
|
}
|
|
1449
1592
|
]
|
|
1450
1593
|
},
|
|
1451
|
-
{
|
|
1452
|
-
"kind": "javascript-module",
|
|
1453
|
-
"path": "src/elements/use-dropdown/use-dropdown.ts",
|
|
1454
|
-
"declarations": [
|
|
1455
|
-
{
|
|
1456
|
-
"kind": "class",
|
|
1457
|
-
"description": "When the popover is opened the tabbable elements are found and indexed for\nkeyboard navigation. The first tabbable element is focused when the popover is opened. The\nfollowing selector is used to find tabbable elements:\n\n```css\n:is(\n [role=\"menuitem\"],\n [role=\"menuitemcheckbox\"],\n [role=\"menuitemradio\"],\n use-menu\n):not(:is(\n [disabled],\n [hidden],\n [inert],\n [aria-hidden=\"true\"]\n))\n```\n\nMenu items are not used for navigation, they are intended for related action\nitems that allows a user to manipulate a user interface or content. Read the\nWCAG guidance for more details:\n[https://www.w3.org/WAI/ARIA/apg/patterns/menubar/](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/)\n\nFor an icon-only trigger, omit `label` and set `aria-label` on `use-dropdown` itself — it is\nforwarded to the trigger button so the control still has an accessible name.",
|
|
1458
|
-
"name": "UseDropdown",
|
|
1459
|
-
"slots": [
|
|
1460
|
-
{
|
|
1461
|
-
"name": "default"
|
|
1462
|
-
},
|
|
1463
|
-
{
|
|
1464
|
-
"name": "trigger-content"
|
|
1465
|
-
},
|
|
1466
|
-
{
|
|
1467
|
-
"name": "trigger-label"
|
|
1468
|
-
},
|
|
1469
|
-
{
|
|
1470
|
-
"name": "trigger-arrow"
|
|
1471
|
-
}
|
|
1472
|
-
],
|
|
1473
|
-
"members": [
|
|
1474
|
-
{
|
|
1475
|
-
"kind": "field",
|
|
1476
|
-
"name": "trigger",
|
|
1477
|
-
"type": {
|
|
1478
|
-
"text": "HTMLButtonElement | null"
|
|
1479
|
-
},
|
|
1480
|
-
"default": "null"
|
|
1481
|
-
},
|
|
1482
|
-
{
|
|
1483
|
-
"kind": "field",
|
|
1484
|
-
"name": "disabled",
|
|
1485
|
-
"attribute": "disabled"
|
|
1486
|
-
},
|
|
1487
|
-
{
|
|
1488
|
-
"kind": "field",
|
|
1489
|
-
"name": "label",
|
|
1490
|
-
"type": {
|
|
1491
|
-
"text": "string"
|
|
1492
|
-
},
|
|
1493
|
-
"attribute": "label"
|
|
1494
|
-
},
|
|
1495
|
-
{
|
|
1496
|
-
"kind": "field",
|
|
1497
|
-
"name": "inlinealign",
|
|
1498
|
-
"type": {
|
|
1499
|
-
"text": "\"start\" | \"end\""
|
|
1500
|
-
},
|
|
1501
|
-
"default": "\"start\"",
|
|
1502
|
-
"description": "Aligns the menu along the inline axis relative to the trigger. Applies to top-level\nmenus; nested submenus are always positioned to the side of their parent trigger.\n\n- `start`: the menu's inline-start edge aligns with the trigger's inline-start edge\n- `end`: the menu's inline-end edge aligns with the trigger's inline-end edge",
|
|
1503
|
-
"attribute": "inlinealign",
|
|
1504
|
-
"reflects": true
|
|
1505
|
-
},
|
|
1506
|
-
{
|
|
1507
|
-
"kind": "method",
|
|
1508
|
-
"name": "getId"
|
|
1509
|
-
}
|
|
1510
|
-
],
|
|
1511
|
-
"attributes": [
|
|
1512
|
-
{
|
|
1513
|
-
"description": "Aligns the menu along the inline axis relative to the trigger. Applies to top-level\nmenus; nested submenus are always positioned to the side of their parent trigger.\n\n- `start`: the menu's inline-start edge aligns with the trigger's inline-start edge\n- `end`: the menu's inline-end edge aligns with the trigger's inline-end edge",
|
|
1514
|
-
"name": "inlinealign",
|
|
1515
|
-
"type": {
|
|
1516
|
-
"text": "\"start\" | \"end\""
|
|
1517
|
-
},
|
|
1518
|
-
"default": "\"start\"",
|
|
1519
|
-
"fieldName": "inlinealign"
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
"name": "disabled",
|
|
1523
|
-
"fieldName": "disabled"
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
"name": "label",
|
|
1527
|
-
"type": {
|
|
1528
|
-
"text": "string"
|
|
1529
|
-
},
|
|
1530
|
-
"fieldName": "label"
|
|
1531
|
-
}
|
|
1532
|
-
],
|
|
1533
|
-
"superclass": {
|
|
1534
|
-
"name": "LitElement",
|
|
1535
|
-
"package": "lit"
|
|
1536
|
-
},
|
|
1537
|
-
"tagName": "use-dropdown",
|
|
1538
|
-
"customElement": true
|
|
1539
|
-
}
|
|
1540
|
-
],
|
|
1541
|
-
"exports": [
|
|
1542
|
-
{
|
|
1543
|
-
"kind": "js",
|
|
1544
|
-
"name": "UseDropdown",
|
|
1545
|
-
"declaration": {
|
|
1546
|
-
"name": "UseDropdown",
|
|
1547
|
-
"module": "src/elements/use-dropdown/use-dropdown.ts"
|
|
1548
|
-
}
|
|
1549
|
-
},
|
|
1550
|
-
{
|
|
1551
|
-
"kind": "custom-element-definition",
|
|
1552
|
-
"name": "use-dropdown",
|
|
1553
|
-
"declaration": {
|
|
1554
|
-
"name": "UseDropdown",
|
|
1555
|
-
"module": "src/elements/use-dropdown/use-dropdown.ts"
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
]
|
|
1559
|
-
},
|
|
1560
1594
|
{
|
|
1561
1595
|
"kind": "javascript-module",
|
|
1562
1596
|
"path": "src/elements/use-duration-input/use-duration-input.ts",
|
|
@@ -2813,7 +2847,7 @@
|
|
|
2813
2847
|
"declarations": [
|
|
2814
2848
|
{
|
|
2815
2849
|
"kind": "class",
|
|
2816
|
-
"description": "A standalone form-associated year-month picker.\nEmits ISO 8601 `YYYY-MM` values.",
|
|
2850
|
+
"description": "A standalone form-associated year-month picker.\nEmits ISO 8601 `YYYY-MM` values.\n\nCustomize month rendering on an instance:\n```ts\nmonthPicker.renderMonth = ({ month, name }, html) =>\n month === 12 ? html`${name} ❄️` : name;\n```\n\nOr override on a subclass to apply it to every instance, falling back to\n`super.renderMonth(...)` for months you don't want to customize:\n```ts\nclass MyMonthPicker extends UseMonthPicker {\n renderMonth(data: { month: number; name: string }, html: LitHtml) {\n if (data.month === 12) {\n return html`${data.name} ❄️`;\n }\n return super.renderMonth(data, html);\n }\n}\n```",
|
|
2817
2851
|
"name": "UseMonthPicker",
|
|
2818
2852
|
"cssParts": [
|
|
2819
2853
|
{
|
|
@@ -2947,11 +2981,28 @@
|
|
|
2947
2981
|
"description": "Navigate the view to the current real-world year."
|
|
2948
2982
|
},
|
|
2949
2983
|
{
|
|
2950
|
-
"kind": "
|
|
2984
|
+
"kind": "method",
|
|
2951
2985
|
"name": "renderMonth",
|
|
2952
|
-
"
|
|
2953
|
-
"
|
|
2954
|
-
|
|
2986
|
+
"return": {
|
|
2987
|
+
"type": {
|
|
2988
|
+
"text": "TemplateResult | string"
|
|
2989
|
+
}
|
|
2990
|
+
},
|
|
2991
|
+
"parameters": [
|
|
2992
|
+
{
|
|
2993
|
+
"name": "data",
|
|
2994
|
+
"type": {
|
|
2995
|
+
"text": "{ month: number; name: string }"
|
|
2996
|
+
}
|
|
2997
|
+
},
|
|
2998
|
+
{
|
|
2999
|
+
"name": "_html",
|
|
3000
|
+
"type": {
|
|
3001
|
+
"text": "LitHtml"
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
],
|
|
3005
|
+
"description": "See UseMonthPickerRenderMonth. Assigning a new function on an\ninstance (e.g. via `.renderMonth=${fn}` in a Lit template) after first\nrender does not schedule a re-render on its own — call `requestUpdate()`\nif needed.\n\nDeclared as a regular method rather than a class field so subclass\noverrides can call `super.renderMonth(data, html)` to fall back to the\ndefault (or a parent override's) rendering."
|
|
2955
3006
|
}
|
|
2956
3007
|
],
|
|
2957
3008
|
"events": [
|
|
@@ -3842,7 +3893,7 @@
|
|
|
3842
3893
|
"declarations": [
|
|
3843
3894
|
{
|
|
3844
3895
|
"kind": "class",
|
|
3845
|
-
"description": "A week-granularity date picker. Value format: YYYY-Www (ISO 8601 week).",
|
|
3896
|
+
"description": "A week-granularity date picker. Value format: YYYY-Www (ISO 8601 week).\n\nCustomize day rendering on an instance:\n```ts\nweekPicker.renderDay = ({ day, date }, html) =>\n date === \"2026-03-17\" ? html`<strong>${day}</strong>` : String(day);\n```\n\nOr override on a subclass to apply it to every instance, falling back to\n`super.renderDay(...)` for dates you don't want to customize:\n```ts\nclass MyWeekPicker extends UseWeekPicker {\n renderDay(data: { day: number; date: string }, html: LitHtml) {\n if (data.date === \"2026-03-17\") {\n return html`<strong>${data.day}</strong>`;\n }\n return super.renderDay(data, html);\n }\n}\n```",
|
|
3846
3897
|
"name": "UseWeekPicker",
|
|
3847
3898
|
"members": [
|
|
3848
3899
|
{
|
|
@@ -4024,11 +4075,28 @@
|
|
|
4024
4075
|
}
|
|
4025
4076
|
},
|
|
4026
4077
|
{
|
|
4027
|
-
"kind": "
|
|
4078
|
+
"kind": "method",
|
|
4028
4079
|
"name": "renderDay",
|
|
4029
|
-
"
|
|
4030
|
-
"
|
|
4080
|
+
"return": {
|
|
4081
|
+
"type": {
|
|
4082
|
+
"text": "TemplateResult | string"
|
|
4083
|
+
}
|
|
4031
4084
|
},
|
|
4085
|
+
"parameters": [
|
|
4086
|
+
{
|
|
4087
|
+
"name": "data",
|
|
4088
|
+
"type": {
|
|
4089
|
+
"text": "{ day: number; date: string }"
|
|
4090
|
+
}
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
"name": "_html",
|
|
4094
|
+
"type": {
|
|
4095
|
+
"text": "LitHtml"
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
],
|
|
4099
|
+
"description": "See UseCalendarRenderDay. Assigning a new function on an\ninstance (e.g. via `.renderDay=${fn}` in a Lit template) after first\nrender does not schedule a re-render on its own — call `requestUpdate()`\nif needed.\n\nDeclared as a regular method rather than a class field so subclass\noverrides can call `super.renderDay(data, html)` to fall back to the\ndefault (or a parent override's) rendering.",
|
|
4032
4100
|
"inheritedFrom": {
|
|
4033
4101
|
"name": "UseCalendarBase",
|
|
4034
4102
|
"module": "src/elements/use-calendar-base/use-calendar-base.ts"
|