use-wc 1.0.0-pre.41 → 1.0.0-pre.42

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.
@@ -396,71 +396,6 @@
396
396
  }
397
397
  ]
398
398
  },
399
- {
400
- "kind": "javascript-module",
401
- "path": "src/elements/use-calendarday/use-calendarday.ts",
402
- "declarations": [
403
- {
404
- "kind": "class",
405
- "description": "A helper component for customizing specific days within `use-calendar`.\nContent placed inside this element will replace the default day number display.",
406
- "name": "UseCalendarday",
407
- "slots": [
408
- {
409
- "description": "slot for custom day content (replaces the day number)",
410
- "name": "default"
411
- }
412
- ],
413
- "members": [
414
- {
415
- "kind": "field",
416
- "name": "date",
417
- "type": {
418
- "text": "string"
419
- },
420
- "attribute": "date"
421
- },
422
- {
423
- "kind": "field",
424
- "name": "day",
425
- "readonly": true
426
- }
427
- ],
428
- "attributes": [
429
- {
430
- "name": "date",
431
- "type": {
432
- "text": "string"
433
- },
434
- "fieldName": "date"
435
- }
436
- ],
437
- "superclass": {
438
- "name": "LitElement",
439
- "package": "lit"
440
- },
441
- "tagName": "use-calendarday",
442
- "customElement": true
443
- }
444
- ],
445
- "exports": [
446
- {
447
- "kind": "js",
448
- "name": "UseCalendarday",
449
- "declaration": {
450
- "name": "UseCalendarday",
451
- "module": "src/elements/use-calendarday/use-calendarday.ts"
452
- }
453
- },
454
- {
455
- "kind": "custom-element-definition",
456
- "name": "use-calendarday",
457
- "declaration": {
458
- "name": "UseCalendarday",
459
- "module": "src/elements/use-calendarday/use-calendarday.ts"
460
- }
461
- }
462
- ]
463
- },
464
399
  {
465
400
  "kind": "javascript-module",
466
401
  "path": "src/elements/use-date-input/use-date-input.ts",
@@ -587,6 +522,71 @@
587
522
  }
588
523
  ]
589
524
  },
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
590
  {
591
591
  "kind": "javascript-module",
592
592
  "path": "src/elements/use-date-picker/use-date-picker.ts",
@@ -1233,95 +1233,6 @@
1233
1233
  }
1234
1234
  ]
1235
1235
  },
1236
- {
1237
- "kind": "javascript-module",
1238
- "path": "src/elements/use-dropdown/use-dropdown.ts",
1239
- "declarations": [
1240
- {
1241
- "kind": "class",
1242
- "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/)",
1243
- "name": "UseDropdown",
1244
- "slots": [
1245
- {
1246
- "name": "default"
1247
- },
1248
- {
1249
- "name": "trigger-content"
1250
- },
1251
- {
1252
- "name": "trigger-label"
1253
- },
1254
- {
1255
- "name": "trigger-arrow"
1256
- }
1257
- ],
1258
- "members": [
1259
- {
1260
- "kind": "field",
1261
- "name": "trigger",
1262
- "type": {
1263
- "text": "HTMLButtonElement | null"
1264
- },
1265
- "default": "null"
1266
- },
1267
- {
1268
- "kind": "field",
1269
- "name": "disabled",
1270
- "attribute": "disabled"
1271
- },
1272
- {
1273
- "kind": "field",
1274
- "name": "label",
1275
- "type": {
1276
- "text": "string"
1277
- },
1278
- "attribute": "label"
1279
- },
1280
- {
1281
- "kind": "method",
1282
- "name": "getId"
1283
- }
1284
- ],
1285
- "attributes": [
1286
- {
1287
- "name": "disabled",
1288
- "fieldName": "disabled"
1289
- },
1290
- {
1291
- "name": "label",
1292
- "type": {
1293
- "text": "string"
1294
- },
1295
- "fieldName": "label"
1296
- }
1297
- ],
1298
- "superclass": {
1299
- "name": "LitElement",
1300
- "package": "lit"
1301
- },
1302
- "tagName": "use-dropdown",
1303
- "customElement": true
1304
- }
1305
- ],
1306
- "exports": [
1307
- {
1308
- "kind": "js",
1309
- "name": "UseDropdown",
1310
- "declaration": {
1311
- "name": "UseDropdown",
1312
- "module": "src/elements/use-dropdown/use-dropdown.ts"
1313
- }
1314
- },
1315
- {
1316
- "kind": "custom-element-definition",
1317
- "name": "use-dropdown",
1318
- "declaration": {
1319
- "name": "UseDropdown",
1320
- "module": "src/elements/use-dropdown/use-dropdown.ts"
1321
- }
1322
- }
1323
- ]
1324
- },
1325
1236
  {
1326
1237
  "kind": "javascript-module",
1327
1238
  "path": "src/elements/use-datetime-input/use-datetime-input.ts",
@@ -1537,6 +1448,95 @@
1537
1448
  }
1538
1449
  ]
1539
1450
  },
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/)",
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": "method",
1497
+ "name": "getId"
1498
+ }
1499
+ ],
1500
+ "attributes": [
1501
+ {
1502
+ "name": "disabled",
1503
+ "fieldName": "disabled"
1504
+ },
1505
+ {
1506
+ "name": "label",
1507
+ "type": {
1508
+ "text": "string"
1509
+ },
1510
+ "fieldName": "label"
1511
+ }
1512
+ ],
1513
+ "superclass": {
1514
+ "name": "LitElement",
1515
+ "package": "lit"
1516
+ },
1517
+ "tagName": "use-dropdown",
1518
+ "customElement": true
1519
+ }
1520
+ ],
1521
+ "exports": [
1522
+ {
1523
+ "kind": "js",
1524
+ "name": "UseDropdown",
1525
+ "declaration": {
1526
+ "name": "UseDropdown",
1527
+ "module": "src/elements/use-dropdown/use-dropdown.ts"
1528
+ }
1529
+ },
1530
+ {
1531
+ "kind": "custom-element-definition",
1532
+ "name": "use-dropdown",
1533
+ "declaration": {
1534
+ "name": "UseDropdown",
1535
+ "module": "src/elements/use-dropdown/use-dropdown.ts"
1536
+ }
1537
+ }
1538
+ ]
1539
+ },
1540
1540
  {
1541
1541
  "kind": "javascript-module",
1542
1542
  "path": "src/elements/use-duration-input/use-duration-input.ts",
@@ -347,28 +347,69 @@
347
347
  border-color: var(--usewc-theme-color-button-border-static-auxiliary);
348
348
  }
349
349
 
350
- &.extra-small {
350
+ &.extra-small::part(trigger),
351
+ &.extra-small:not([type="file"], use-dropdown),
352
+ &.extra-small::file-selector-button {
351
353
  padding-block: var(--usewc-layout-button-extra-small-padding-block);
352
354
  padding-inline: var(--usewc-layout-button-extra-small-padding-inline);
353
355
  font-size: var(--usewc-layout-button-extra-small-font-size);
354
356
  line-height: var(--usewc-layout-button-extra-small-line-height);
355
357
  }
356
358
 
357
- &.small {
359
+ &.small::part(trigger),
360
+ &.small:not([type="file"], use-dropdown),
361
+ &.small::file-selector-button {
358
362
  padding-block: var(--usewc-layout-button-small-padding-block);
359
363
  padding-inline: var(--usewc-layout-button-small-padding-inline);
360
364
  font-size: var(--usewc-layout-button-small-font-size);
361
365
  line-height: var(--usewc-layout-button-small-line-height);
362
366
  }
363
367
 
364
- &.large {
368
+ &.large::part(trigger),
369
+ &.large:not([type="file"], use-dropdown),
370
+ &.large::file-selector-button {
365
371
  padding-block: var(--usewc-layout-button-large-padding-block);
366
372
  padding-inline: var(--usewc-layout-button-large-padding-inline);
367
373
  font-size: var(--usewc-layout-button-large-font-size);
368
374
  line-height: var(--usewc-layout-button-large-line-height);
369
375
  }
370
376
 
371
- &.extra-large {
377
+ &.extra-large::part(trigger),
378
+ &.extra-large:not([type="file"], use-dropdown),
379
+ &.extra-large::file-selector-button {
380
+ padding-block: var(--usewc-layout-button-extra-large-padding-block);
381
+ padding-inline: var(--usewc-layout-button-extra-large-padding-inline);
382
+ font-size: var(--usewc-layout-button-extra-large-font-size);
383
+ line-height: var(--usewc-layout-button-extra-large-line-height);
384
+ }
385
+ }
386
+
387
+ /* Sizing-only: use-select-input's trigger looks like a button but is not a
388
+ member of the button group above (no color/base styling), so the size
389
+ classes are wired through to its trigger separately. */
390
+ use-select-input {
391
+ &.extra-small::part(trigger) {
392
+ padding-block: var(--usewc-layout-button-extra-small-padding-block);
393
+ padding-inline: var(--usewc-layout-button-extra-small-padding-inline);
394
+ font-size: var(--usewc-layout-button-extra-small-font-size);
395
+ line-height: var(--usewc-layout-button-extra-small-line-height);
396
+ }
397
+
398
+ &.small::part(trigger) {
399
+ padding-block: var(--usewc-layout-button-small-padding-block);
400
+ padding-inline: var(--usewc-layout-button-small-padding-inline);
401
+ font-size: var(--usewc-layout-button-small-font-size);
402
+ line-height: var(--usewc-layout-button-small-line-height);
403
+ }
404
+
405
+ &.large::part(trigger) {
406
+ padding-block: var(--usewc-layout-button-large-padding-block);
407
+ padding-inline: var(--usewc-layout-button-large-padding-inline);
408
+ font-size: var(--usewc-layout-button-large-font-size);
409
+ line-height: var(--usewc-layout-button-large-line-height);
410
+ }
411
+
412
+ &.extra-large::part(trigger) {
372
413
  padding-block: var(--usewc-layout-button-extra-large-padding-block);
373
414
  padding-inline: var(--usewc-layout-button-extra-large-padding-inline);
374
415
  font-size: var(--usewc-layout-button-extra-large-font-size);
@@ -633,6 +674,10 @@
633
674
  anchor-name: --use-popover-trigger;
634
675
  }
635
676
 
677
+ use-dropdown {
678
+ anchor-scope: --use-popover-trigger;
679
+ }
680
+
636
681
  use-dropdown::part(trigger-icon-default),
637
682
  use-option::part(selected-indicator-default) {
638
683
  display: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-wc",
3
- "version": "1.0.0-pre.41",
3
+ "version": "1.0.0-pre.42",
4
4
  "private": false,
5
5
  "homepage": "https://usewc.com",
6
6
  "bugs": "https://github.com/dang-rabbits/use-wc/issues",
@@ -2,12 +2,6 @@
2
2
  "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
3
  "version": 1.1,
4
4
  "tags": [
5
- {
6
- "name": "use-calendarday",
7
- "description": "A helper component for customizing specific days within `use-calendar`.\nContent placed inside this element will replace the default day number display.\n---\n\n\n### **Slots:**\n - **default** - slot for custom day content (replaces the day number)",
8
- "attributes": [{ "name": "date", "values": [] }],
9
- "references": []
10
- },
11
5
  {
12
6
  "name": "use-date-input",
13
7
  "description": "Displays a date picker using segmented inputs for year, month, and day.\n\nUses browser locale for formatting and ARIA labels.\n---\n",
@@ -19,6 +13,12 @@
19
13
  ],
20
14
  "references": []
21
15
  },
16
+ {
17
+ "name": "use-calendarday",
18
+ "description": "A helper component for customizing specific days within `use-calendar`.\nContent placed inside this element will replace the default day number display.\n---\n\n\n### **Slots:**\n - **default** - slot for custom day content (replaces the day number)",
19
+ "attributes": [{ "name": "date", "values": [] }],
20
+ "references": []
21
+ },
22
22
  {
23
23
  "name": "use-date-picker",
24
24
  "description": "A day-granularity date picker. Value format: YYYY-MM-DD.\n---\n\n\n### **Events:**\n - **use-change** - Fired on selection with detail `{ value: string }`\n\n### **Slots:**\n - **header-start** - Content before the title in the header\n- **title** - Title showing the month and year\n- **controls** - Navigation controls (previous, today, next buttons)\n- **header-end** - Content after the controls in the header\n- **date-{YYYY-MM-DD}** - Per-date content that replaces the default day number\n\n### **CSS Parts:**\n - **header** - The header container\n- **title** - The title text\n- **title-month** - The month part of the title\n- **title-literal** - Literal text in the title\n- **title-year** - The year part of the title\n- **controls** - The controls slot container\n- **control** - Individual control button\n- **control-previous** - Previous month button\n- **control-today** - Today button\n- **control-next** - Next month button\n- **grid** - The main calendar grid\n- **grid-header** - The header row with day names\n- **grid-header-cell** - Individual day name header cell\n- **grid-body** - The container for calendar weeks\n- **row** - A row of days\n- **day** - A day cell\n- **day-empty** - An empty day cell (from previous/next month)\n- **day-selected** - A selected day cell\n- **day-today** - The current date cell\n- **day-disabled** - A disabled date cell\n- **title-button** - The clickable button wrapping the month/year title\n- **picker** - The scrollable month/year picker panel (replaces grid when open)\n- **picker-year-section** - Container for one year's label and month grid\n- **picker-year-label** - The year heading inside a year section\n- **picker-months** - The 4-column month grid inside a year section\n- **picker-month** - An individual month button\n- **picker-month-current** - Applied to the currently selected month button",
@@ -52,15 +52,6 @@
52
52
  ],
53
53
  "references": []
54
54
  },
55
- {
56
- "name": "use-dropdown",
57
- "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---\n\n\n### **Slots:**\n - **default** - undefined\n- **trigger-content** - undefined\n- **trigger-label** - undefined\n- **trigger-arrow** - undefined",
58
- "attributes": [
59
- { "name": "disabled", "values": [] },
60
- { "name": "label", "values": [] }
61
- ],
62
- "references": []
63
- },
64
55
  {
65
56
  "name": "use-datetime-input",
66
57
  "description": "Displays a date and time picker by combining `use-date` and `use-time`.\n\nThe value format is ISO 8601-like: `YYYY-MM-DDTHH:MM:SS.mmm`.\n---\n",
@@ -81,6 +72,15 @@
81
72
  ],
82
73
  "references": []
83
74
  },
75
+ {
76
+ "name": "use-dropdown",
77
+ "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---\n\n\n### **Slots:**\n - **default** - undefined\n- **trigger-content** - undefined\n- **trigger-label** - undefined\n- **trigger-arrow** - undefined",
78
+ "attributes": [
79
+ { "name": "disabled", "values": [] },
80
+ { "name": "label", "values": [] }
81
+ ],
82
+ "references": []
83
+ },
84
84
  {
85
85
  "name": "use-duration-input",
86
86
  "description": "Displays the parts of an ISO 8601 duration string using [`Intl.DurationFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat).\n\nUses the [`duration-fns`](https://www.npmjs.com/package/duration-fns) library for parsing ISO 8601 values.\n\n<baseline-status featureId=\"intl-duration-format\"></baseline-status>\n---\n",