use-wc 1.0.0-pre.38 → 1.0.0-pre.39

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",
@@ -1986,7 +1986,7 @@
1986
1986
  "declarations": [
1987
1987
  {
1988
1988
  "kind": "class",
1989
- "description": "Accessible grid component following [WAI-ARIA grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).\n\n## Grid Cell Modes\nThe `mode` attribute of the `use-gridcell` element determines how the cell behaves in terms of focus and interaction. The possible values are:\n\n- `'none'` - the cell itself is focusable and it does not contain any interactive elements.\n- `'widget'` - the cell itself is focusable and it contains more than one interactive element. To access the interactive elements, the user must press `Enter` or `F2`, and to restore focus to the cell, the user must press `Esc` or `F2`.\n- `'action'` - the cell itself is not focusable and it contains a single interactive element. The user can tab to the interactive elements directly.",
1989
+ "description": "Accessible grid component following [WAI-ARIA grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).",
1990
1990
  "name": "UseGrid",
1991
1991
  "slots": [
1992
1992
  {
@@ -2177,6 +2177,7 @@
2177
2177
  "text": "\"widget\" | \"action\" | \"default\""
2178
2178
  },
2179
2179
  "default": "\"default\"",
2180
+ "description": "Determines how the cell behaves in terms of focus and interaction. The possible values are:\n\n- `'none'` - the cell itself is focusable and it does not contain any interactive elements.\n- `'widget'` - the cell itself is focusable and it contains more than one interactive element. To access the interactive elements, the user must press `Enter` or `F2`, and to restore focus to the cell, the user must press `Esc` or `F2`.\n- `'action'` - the cell itself is not focusable and it contains a single interactive element. The user can tab to the interactive elements directly.",
2180
2181
  "attribute": "mode",
2181
2182
  "reflects": true
2182
2183
  },
@@ -2230,6 +2231,7 @@
2230
2231
  "text": "\"widget\" | \"action\" | \"default\""
2231
2232
  },
2232
2233
  "default": "\"default\"",
2234
+ "description": "Determines how the cell behaves in terms of focus and interaction. The possible values are:\n\n- `'none'` - the cell itself is focusable and it does not contain any interactive elements.\n- `'widget'` - the cell itself is focusable and it contains more than one interactive element. To access the interactive elements, the user must press `Enter` or `F2`, and to restore focus to the cell, the user must press `Esc` or `F2`.\n- `'action'` - the cell itself is not focusable and it contains a single interactive element. The user can tab to the interactive elements directly.",
2233
2235
  "fieldName": "mode"
2234
2236
  }
2235
2237
  ],
@@ -0,0 +1,22 @@
1
+ # `use-calendarday`
2
+
3
+ A helper component for customizing specific days within `use-calendar`.
4
+ Content placed inside this element will replace the default day number display.
5
+
6
+ ## Attributes
7
+
8
+ | Name | Type | Default | Description |
9
+ | --- | --- | --- | --- |
10
+ | date | `string` | - | - |
11
+
12
+ ## Properties
13
+
14
+ | Name | Type | Default | Description |
15
+ | --- | --- | --- | --- |
16
+ | day | - | - | - |
17
+
18
+ ## Slots
19
+
20
+ | Name | Description |
21
+ | --- | --- |
22
+ | `default` | slot for custom day content (replaces the day number) |
@@ -0,0 +1,23 @@
1
+ # `use-date-input`
2
+
3
+ Displays a date picker using segmented inputs for year, month, and day.
4
+
5
+ Uses browser locale for formatting and ARIA labels.
6
+
7
+ ## Attributes
8
+
9
+ | Name | Type | Default | Description |
10
+ | --- | --- | --- | --- |
11
+ | disabled | `boolean` | `false` | - |
12
+ | readonly | `boolean` | `false` | - |
13
+ | value | `string` | `YYYY-MM-DD` | - |
14
+ | lang | `string` | - | - |
15
+
16
+ ## Properties
17
+
18
+ | Name | Type | Default | Description |
19
+ | --- | --- | --- | --- |
20
+ | yearInput | `HTMLInputElement` | - | - |
21
+ | monthInput | `HTMLInputElement` | - | - |
22
+ | dayInput | `HTMLInputElement` | - | - |
23
+ | id | - | - | - |
@@ -0,0 +1,44 @@
1
+ # `use-date-picker`
2
+
3
+ A day-granularity date picker. Value format: YYYY-MM-DD.
4
+
5
+ ## Attributes
6
+
7
+ | Name | Type | Default | Description |
8
+ | --- | --- | --- | --- |
9
+ | year | `number` | - | 1970-9999 |
10
+ | month | `number` | - | 1-12 |
11
+ | controls | `boolean` | `false` | - |
12
+ | navigation | `"nowrap" \| "off" \| "on"` | `"on"` | - |
13
+ | hiddenmonths | `string` | `""` | - |
14
+ | focusmode | `"cell" \| "control"` | `"cell"` | - |
15
+ | name | `string \| undefined` | `""` | - |
16
+ | min | `string \| undefined` | - | - |
17
+ | max | `string \| undefined` | - | - |
18
+ | start | `string \| undefined` | - | First date in the visible range. Accepts ISO 8601 date strings or `'min'` to use the same value as `min` |
19
+ | end | `string \| undefined` | - | Last date in the visible range. Accepts ISO 8601 date strings or `'max'` to use the same value as `max` |
20
+ | lang | `string` | - | - |
21
+
22
+ ## Properties
23
+
24
+ | Name | Type | Default | Description |
25
+ | --- | --- | --- | --- |
26
+ | value | `string` | - | - |
27
+ | navigationEnabled | - | - | - |
28
+ | renderDay | `UseCalendarRenderDay` | - | - |
29
+
30
+ ## Events
31
+
32
+ | Name | Type | Description |
33
+ | --- | --- | --- |
34
+ | use-change | `CustomEvent` | Fired on selection with detail `{ value: string }` |
35
+
36
+ ## Slots
37
+
38
+ | Name | Description |
39
+ | --- | --- |
40
+ | `header-start` | Content before the title in the header |
41
+ | `title` | Title showing the month and year |
42
+ | `controls` | Navigation controls (previous, today, next buttons) |
43
+ | `header-end` | Content after the controls in the header |
44
+ | `date-{YYYY-MM-DD}` | Per-date content that replaces the default day number |
@@ -0,0 +1,28 @@
1
+ # `use-datetime-input`
2
+
3
+ Displays a date and time picker by combining `use-date` and `use-time`.
4
+
5
+ The value format is ISO 8601-like: `YYYY-MM-DDTHH:MM:SS.mmm`.
6
+
7
+ ## Attributes
8
+
9
+ | Name | Type | Default | Description |
10
+ | --- | --- | --- | --- |
11
+ | disabled | `boolean` | - | - |
12
+ | readonly | `boolean` | - | - |
13
+ | hours | `boolean` | `false` | - |
14
+ | minutes | `boolean` | `false` | - |
15
+ | seconds | `boolean` | `false` | - |
16
+ | fractionalSeconds | `boolean` | `false` | - |
17
+ | dayPeriod | `boolean` | `false` | - |
18
+ | hourFormat | `"12" \| "24" \| undefined` | - | - |
19
+ | value | `string` | `''` | - |
20
+ | lang | `string` | - | - |
21
+
22
+ ## Properties
23
+
24
+ | Name | Type | Default | Description |
25
+ | --- | --- | --- | --- |
26
+ | dateElement | `UseDateInput` | - | - |
27
+ | timeElement | `UseTimeInput` | - | - |
28
+ | id | - | - | - |
@@ -0,0 +1,46 @@
1
+ # `use-dropdown`
2
+
3
+ When the popover is opened the tabbable elements are found and indexed for
4
+ keyboard navigation. The first tabbable element is focused when the popover is opened. The
5
+ following selector is used to find tabbable elements:
6
+
7
+ ```css
8
+ :is(
9
+ [role="menuitem"],
10
+ [role="menuitemcheckbox"],
11
+ [role="menuitemradio"],
12
+ use-menu
13
+ ):not(:is(
14
+ [disabled],
15
+ [hidden],
16
+ [inert],
17
+ [aria-hidden="true"]
18
+ ))
19
+ ```
20
+
21
+ Menu items are not used for navigation, they are intended for related action
22
+ items that allows a user to manipulate a user interface or content. Read the
23
+ WCAG guidance for more details:
24
+ [https://www.w3.org/WAI/ARIA/apg/patterns/menubar/](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/)
25
+
26
+ ## Attributes
27
+
28
+ | Name | Type | Default | Description |
29
+ | --- | --- | --- | --- |
30
+ | disabled | - | - | - |
31
+ | label | `string` | - | - |
32
+
33
+ ## Properties
34
+
35
+ | Name | Type | Default | Description |
36
+ | --- | --- | --- | --- |
37
+ | trigger | `HTMLButtonElement \| null` | `null` | - |
38
+
39
+ ## Slots
40
+
41
+ | Name | Description |
42
+ | --- | --- |
43
+ | `default` | - |
44
+ | `trigger-content` | - |
45
+ | `trigger-label` | - |
46
+ | `trigger-arrow` | - |
@@ -0,0 +1,39 @@
1
+ # `use-duration-input`
2
+
3
+ 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).
4
+
5
+ Uses the [`duration-fns`](https://www.npmjs.com/package/duration-fns) library for parsing ISO 8601 values.
6
+
7
+ <baseline-status featureId="intl-duration-format"></baseline-status>
8
+
9
+ ## Attributes
10
+
11
+ | Name | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | years | `boolean` | `false` | - |
14
+ | months | `boolean` | `false` | - |
15
+ | weeks | `boolean` | `false` | - |
16
+ | days | `boolean` | `false` | - |
17
+ | hours | `boolean` | `false` | - |
18
+ | minutes | `boolean` | `false` | - |
19
+ | seconds | `boolean` | `false` | - |
20
+ | milliseconds | `boolean` | `false` | - |
21
+ | disabled | `boolean` | `false` | - |
22
+ | readonly | `boolean` | `false` | - |
23
+ | value | `string` | `PT0S` | - |
24
+ | format | `"long" \| "short" \| "narrow" \| "digital"` | `"short"` | - |
25
+ | lang | `string` | - | - |
26
+
27
+ ## Properties
28
+
29
+ | Name | Type | Default | Description |
30
+ | --- | --- | --- | --- |
31
+ | yearInput | `HTMLInputElement` | - | - |
32
+ | monthInput | `HTMLInputElement` | - | - |
33
+ | weekInput | `HTMLInputElement` | - | - |
34
+ | dayInput | `HTMLInputElement` | - | - |
35
+ | hourInput | `HTMLInputElement` | - | - |
36
+ | minuteInput | `HTMLInputElement` | - | - |
37
+ | secondInput | `HTMLInputElement` | - | - |
38
+ | millisecondInput | `HTMLInputElement` | - | - |
39
+ | id | - | - | - |
@@ -0,0 +1,45 @@
1
+ # `use-focusgroup`
2
+
3
+ Nested controls are removed from the tab flow until the user navigates the nested controls with arrow keys.
4
+
5
+ `use-focusgroup` is most useful for things like WYSIWYG toolbars, sets of tabs, or lists of navigation links (like a list of emails in a master detail layout).
6
+
7
+ ## To do
8
+
9
+ - [ ] add `grid` navigation feature
10
+ - [ ] add `autofocus` attribute support
11
+
12
+ ## Long term plan
13
+
14
+ This web component was built with the intent to be replaced by browser-native focusgroup support once it becomes baseline. Hopefully migration will be as simple as changing the tag name from `use-focusgroup` to `div` and the `options` attribute to `focusgroup`.
15
+
16
+ <baseline-status featureId="focusgroup_attribute"></baseline-status>
17
+
18
+ ## Sources
19
+
20
+ - [Open UI focusgroup Explainer](https://open-ui.org/components/focusgroup.explainer/)
21
+ - [tabbable](https://www.npmjs.com/package/tabbable)
22
+ - [Toolbar Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/)
23
+ - [@gfellerph/focusgroup-polyfill](https://github.com/gfellerph/focusgroup-polyfill)
24
+
25
+ ## Attributes
26
+
27
+ | Name | Type | Default | Description |
28
+ | --- | --- | --- | --- |
29
+ | features | `string` | `""` | A list of space-separated features that can be used to customize the behavior of the focusgroup.
30
+
31
+ The following options are available:
32
+
33
+ - `inline` opts into keyboard navigation via left and right arrow keys
34
+ - `block` opts into keyboard navigation via up and down arrow keys
35
+ - `wrap` arrow navigation should wrap around when reaching the end
36
+ - `no-memory` whether the focusgroup should not remember the last focused element
37
+
38
+ If nothing if neither `inline` nor `block` is specified, both are assumed. |
39
+
40
+ ## Properties
41
+
42
+ | Name | Type | Default | Description |
43
+ | --- | --- | --- | --- |
44
+ | focusedElement | `HTMLElement \| null` | `null` | The most recently focused element in the focusgroup. |
45
+ | promoted | - | `false` | Whether the use-focusgroup is promoted to the top of the tab order inside a parent use-focusgroup. |
@@ -0,0 +1,26 @@
1
+ # `use-grid`
2
+
3
+ Accessible grid component following [WAI-ARIA grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
4
+
5
+ ## Attributes
6
+
7
+ | Name | Type | Default | Description |
8
+ | --- | --- | --- | --- |
9
+ | selectmode | `"multiple" \| "single" \| "none"` | `"none"` | - |
10
+ | name | `string` | `""` | - |
11
+ | role | `string` | `"grid"` | - |
12
+ | disabled | `boolean` | `false` | - |
13
+ | readonly | `boolean` | `false` | - |
14
+
15
+ ## Properties
16
+
17
+ | Name | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | internals | - | - | - |
20
+ | value | `string[] \| string \| null` | - | - |
21
+
22
+ ## Slots
23
+
24
+ | Name | Description |
25
+ | --- | --- |
26
+ | `` | Grid content (use-gridhead/use-gridbody rows) |
@@ -0,0 +1 @@
1
+ # `use-gridbody`
@@ -0,0 +1,17 @@
1
+ # `use-gridcell`
2
+
3
+ ## Attributes
4
+
5
+ | Name | Type | Default | Description |
6
+ | --- | --- | --- | --- |
7
+ | mode | `"widget" \| "action" \| "default"` | `"default"` | Determines how the cell behaves in terms of focus and interaction. The possible values are:
8
+
9
+ - `'none'` - the cell itself is focusable and it does not contain any interactive elements.
10
+ - `'widget'` - the cell itself is focusable and it contains more than one interactive element. To access the interactive elements, the user must press `Enter` or `F2`, and to restore focus to the cell, the user must press `Esc` or `F2`.
11
+ - `'action'` - the cell itself is not focusable and it contains a single interactive element. The user can tab to the interactive elements directly. |
12
+
13
+ ## Slots
14
+
15
+ | Name | Description |
16
+ | --- | --- |
17
+ | `undefined` | - |
@@ -0,0 +1 @@
1
+ # `use-gridhead`
@@ -0,0 +1,10 @@
1
+ # `use-gridrow`
2
+
3
+ ## Attributes
4
+
5
+ | Name | Type | Default | Description |
6
+ | --- | --- | --- | --- |
7
+ | selected | `boolean` | `false` | - |
8
+ | disabled | `boolean` | `false` | - |
9
+ | readonly | `boolean` | `false` | - |
10
+ | value | `string` | `""` | - |
@@ -0,0 +1,23 @@
1
+ # `use-intl-datetime`
2
+
3
+ Displays a localized, human-readable representation of a date, time, or datetime.
4
+ Renders a semantic `<time>` element in its shadow root with a machine-readable
5
+ `datetime` attribute and formatted inner text.
6
+
7
+ Set `datestyle`, `timestyle`, or both to control what is formatted and how.
8
+ The presence of each attribute determines the format mode:
9
+ - `datestyle` only → date formatting
10
+ - `timestyle` only → time formatting
11
+ - both → date and time formatting
12
+
13
+ Locale is resolved from the nearest ancestor `[lang]` attribute, or
14
+ `navigator.language` if none is found. Set `lang` directly on the element to override.
15
+
16
+ ## Attributes
17
+
18
+ | Name | Type | Default | Description |
19
+ | --- | --- | --- | --- |
20
+ | value | `string \| undefined` | - | ISO date/time string or Unix timestamp (ms) |
21
+ | datestyle | `string \| undefined` | - | Date format style: `short` \| `medium` \| `long` \| `full` |
22
+ | timestyle | `string \| undefined` | - | Time format style: `short` \| `medium` \| `long` \| `full` |
23
+ | lang | `string` | - | BCP 47 locale tag. Inherits from nearest ancestor `[lang]` if not set. |
@@ -0,0 +1,34 @@
1
+ # `use-listbox-input`
2
+
3
+ ## Attributes
4
+
5
+ | Name | Type | Default | Description |
6
+ | --- | --- | --- | --- |
7
+ | name | `string \| undefined` | - | - |
8
+ | placeholder | `string` | `""` | - |
9
+ | multiple | `boolean` | `false` | - |
10
+ | disabled | - | - | - |
11
+
12
+ ## Properties
13
+
14
+ | Name | Type | Default | Description |
15
+ | --- | --- | --- | --- |
16
+ | selected | - | - | UseOption[] |
17
+ | firstSelected | - | - | - |
18
+ | options | `Array<UseOption>` | - | - |
19
+ | listbox | `HTMLDivElement` | - | - |
20
+ | activeOption | - | - | - |
21
+ | value | `FormData` | - | - |
22
+
23
+ ## Events
24
+
25
+ | Name | Type | Description |
26
+ | --- | --- | --- |
27
+ | use-change | `CustomEvent` | - |
28
+
29
+ ## Slots
30
+
31
+ | Name | Description |
32
+ | --- | --- |
33
+ | `default` | NodeList of `use-option` elements |
34
+ | `arrow` | - |
@@ -0,0 +1,41 @@
1
+ # `use-menu`
2
+
3
+ The first tabbable element is focused when the menu gains focus.
4
+
5
+ Menu is not used for navigation, it is intended for related action items that
6
+ allows a user to manipulate a user interface or content.
7
+
8
+ The following selector is used to find tabbable elements:
9
+
10
+ ```css
11
+ :is(
12
+ [role="menuitem"],
13
+ [role="menuitemcheckbox"],
14
+ [role="menuitemradio"],
15
+ use-menu
16
+ ):not(:is(
17
+ [disabled],
18
+ [hidden],
19
+ [inert],
20
+ [aria-hidden="true"]
21
+ ))
22
+ ```
23
+
24
+ ## Attributes
25
+
26
+ | Name | Type | Default | Description |
27
+ | --- | --- | --- | --- |
28
+ | disabled | - | - | - |
29
+ | label | `string` | - | - |
30
+
31
+ ## Properties
32
+
33
+ | Name | Type | Default | Description |
34
+ | --- | --- | --- | --- |
35
+ | trigger | `HTMLButtonElement \| null` | `null` | - |
36
+
37
+ ## Slots
38
+
39
+ | Name | Description |
40
+ | --- | --- |
41
+ | `default` | - |
@@ -0,0 +1,38 @@
1
+ # `use-month-picker`
2
+
3
+ A standalone form-associated year-month picker.
4
+ Emits ISO 8601 `YYYY-MM` values.
5
+
6
+ ## Attributes
7
+
8
+ | Name | Type | Default | Description |
9
+ | --- | --- | --- | --- |
10
+ | year | `number` | - | Year currently shown in the grid. Defaults to the current year, or the year of the initial value attribute. |
11
+ | min | `string` | `""` | Minimum selectable year-month in `YYYY-MM` format (inclusive). |
12
+ | max | `string` | `""` | Maximum selectable year-month in `YYYY-MM` format (inclusive). |
13
+ | navigation | `"on" \| "nowrap" \| "off"` | `"on"` | Controls keyboard navigation within the grid.
14
+ - `'on'` (default): navigation enabled, wraps from December → next year and January → previous year.
15
+ - `'nowrap'`: navigation enabled, clamps at January and December without year-crossing.
16
+ - `'off'`: keyboard navigation disabled entirely. |
17
+ | disabled | `boolean` | - | Disables all interaction. Reflected to the `:state(disabled)` CSS pseudo-class. |
18
+ | value | `string` | - | Selected ISO 8601 year-month (`YYYY-MM`). Empty string means no selection. |
19
+ | lang | `string` | - | - |
20
+
21
+ ## Properties
22
+
23
+ | Name | Type | Default | Description |
24
+ | --- | --- | --- | --- |
25
+ | navigationEnabled | - | - | - |
26
+ | renderMonth | `UseMonthPickerRenderMonth` | - | - |
27
+
28
+ ## Events
29
+
30
+ | Name | Type | Description |
31
+ | --- | --- | --- |
32
+ | use-change | `CustomEvent` | Fired when the user selects a month. Detail: `{ value: string }` |
33
+
34
+ ## Slots
35
+
36
+ | Name | Description |
37
+ | --- | --- |
38
+ | `month-{YYYY-MM}` | Per-month content that replaces the default month name (e.g. `month-2026-03`) |
@@ -0,0 +1,20 @@
1
+ # `use-option`
2
+
3
+ `use-option` is a custom element that represents an option in a `use-select-input` custom element.
4
+
5
+ The children of this element are the content of the option and must not contain any interactive elements.
6
+
7
+ ## Attributes
8
+
9
+ | Name | Type | Default | Description |
10
+ | --- | --- | --- | --- |
11
+ | selected | - | - | - |
12
+ | disabled | - | - | - |
13
+ | value | - | - | - |
14
+
15
+ ## Slots
16
+
17
+ | Name | Description |
18
+ | --- | --- |
19
+ | `selected-indicator` | - |
20
+ | `undefined` | - |
@@ -0,0 +1,17 @@
1
+ # `use-scrollarea`
2
+
3
+ A scroll container that exposes custom states for scroll edge detection.
4
+
5
+ ## Custom States
6
+ The following CSS custom states are available for styling:
7
+
8
+ - `:state(at-block-start)` — scrolled to the block-start edge (top in horizontal writing modes)
9
+ - `:state(at-block-end)` — scrolled to the block-end edge (bottom in horizontal writing modes)
10
+ - `:state(at-inline-start)` — scrolled to the inline-start edge (left in LTR)
11
+ - `:state(at-inline-end)` — scrolled to the inline-end edge (right in LTR)
12
+
13
+ ## Slots
14
+
15
+ | Name | Description |
16
+ | --- | --- |
17
+ | `` | Scrollable content |
@@ -0,0 +1,38 @@
1
+ # `use-select-input`
2
+
3
+ ## Multiple
4
+
5
+ The `use-listbox-input` provides an attribute for selecting multiple options.
6
+
7
+ ## Long term plan
8
+
9
+ This web component was built with the intent to be replaced by browser-native `base-select` support once it becomes baseline.
10
+
11
+ <baseline-status featureId="customizable-select"></baseline-status>
12
+
13
+ ## Attributes
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | name | `string \| undefined` | - | - |
18
+ | placeholder | `string` | `""` | - |
19
+ | disabled | - | - | - |
20
+
21
+ ## Properties
22
+
23
+ | Name | Type | Default | Description |
24
+ | --- | --- | --- | --- |
25
+ | selected | - | - | - |
26
+ | firstSelected | - | - | - |
27
+ | options | `Array<UseOption>` | - | - |
28
+ | trigger | `HTMLButtonElement \| null` | `null` | - |
29
+ | label | `HTMLSpanElement` | - | - |
30
+ | activeOption | - | - | - |
31
+ | value | `FormData` | - | - |
32
+
33
+ ## Slots
34
+
35
+ | Name | Description |
36
+ | --- | --- |
37
+ | `default` | NodeList of `use-option` elements |
38
+ | `arrow` | - |
@@ -0,0 +1,38 @@
1
+ # `use-time-input`
2
+
3
+ Displays time picker using [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat).
4
+
5
+ Allows users to pick time values with proper localization and formatting.
6
+
7
+ ## Attributes
8
+
9
+ | Name | Type | Default | Description |
10
+ | --- | --- | --- | --- |
11
+ | hours | `boolean` | `false` | - |
12
+ | minutes | `boolean` | `false` | - |
13
+ | seconds | `boolean` | `false` | - |
14
+ | fractionalSeconds | `boolean` | `false` | - |
15
+ | dayPeriod | `boolean` | `false` | - |
16
+ | hourFormat | `"12" \| "24" \| undefined` | - | - |
17
+ | disabled | `boolean` | `false` | - |
18
+ | readonly | `boolean` | `false` | - |
19
+ | value | `string` | `00:00:00` | - |
20
+ | format | `"long" \| "short" \| "narrow" \| "digital"` | `"long"` | - |
21
+ | lang | `string` | - | - |
22
+
23
+ ## Properties
24
+
25
+ | Name | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | id | - | - | - |
28
+ | hourInput | `HTMLInputElement` | - | - |
29
+ | minuteInput | `HTMLInputElement` | - | - |
30
+ | secondInput | `HTMLInputElement` | - | - |
31
+ | fractionalSecondInput | `HTMLInputElement` | - | - |
32
+ | dayPeriodInput | `HTMLInputElement` | - | - |
33
+
34
+ ## Events
35
+
36
+ | Name | Type | Description |
37
+ | --- | --- | --- |
38
+ | input | `Event` | - |
@@ -0,0 +1,30 @@
1
+ # `use-tree`
2
+
3
+ Custom input control for managing selected values in a hierarchy.
4
+
5
+ ## Attributes
6
+
7
+ | Name | Type | Default | Description |
8
+ | --- | --- | --- | --- |
9
+ | name | `string \| undefined` | - | - |
10
+ | multiple | `boolean` | `false` | - |
11
+ | disabled | - | - | - |
12
+
13
+ ## Properties
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | selected | - | - | UseTreeItem[] |
18
+ | firstSelected | - | - | - |
19
+ | items | `Array<UseTreeitem>` | - | - |
20
+ | tree | `HTMLDivElement` | - | - |
21
+ | lazyItems | `Array<UseTreeitem>` | `[]` | - |
22
+ | activeOption | - | - | - |
23
+ | value | `FormData` | - | - |
24
+
25
+ ## Slots
26
+
27
+ | Name | Description |
28
+ | --- | --- |
29
+ | `default` | NodeList of `use-treeitem` elements |
30
+ | `arrow` | - |
@@ -0,0 +1,25 @@
1
+ # `use-treeitem`
2
+
3
+ `use-option` is a custom element that represents an option in a `use-select-input` custom element.
4
+
5
+ The children of this element are the content of the option and must not contain any interactive elements.
6
+
7
+ ## To Do
8
+
9
+ - [ ] When the parent is no longer disabled, update the items without their own `[disabled]`
10
+
11
+ ## Attributes
12
+
13
+ | Name | Type | Default | Description |
14
+ | --- | --- | --- | --- |
15
+ | selected | - | - | - |
16
+ | disabled | - | - | - |
17
+ | expanded | - | - | - |
18
+ | value | - | - | - |
19
+
20
+ ## Slots
21
+
22
+ | Name | Description |
23
+ | --- | --- |
24
+ | `selected-indicator` | - |
25
+ | `undefined` | - |
@@ -0,0 +1,44 @@
1
+ # `use-week-picker`
2
+
3
+ A week-granularity date picker. Value format: YYYY-Www (ISO 8601 week).
4
+
5
+ ## Attributes
6
+
7
+ | Name | Type | Default | Description |
8
+ | --- | --- | --- | --- |
9
+ | year | `number` | - | 1970-9999 |
10
+ | month | `number` | - | 1-12 |
11
+ | controls | `boolean` | `false` | - |
12
+ | navigation | `"nowrap" \| "off" \| "on"` | `"on"` | - |
13
+ | hiddenmonths | `string` | `""` | - |
14
+ | focusmode | `"cell" \| "control"` | `"cell"` | - |
15
+ | name | `string \| undefined` | `""` | - |
16
+ | min | `string \| undefined` | - | - |
17
+ | max | `string \| undefined` | - | - |
18
+ | start | `string \| undefined` | - | First date in the visible range. Accepts ISO 8601 date strings or `'min'` to use the same value as `min` |
19
+ | end | `string \| undefined` | - | Last date in the visible range. Accepts ISO 8601 date strings or `'max'` to use the same value as `max` |
20
+ | lang | `string` | - | - |
21
+
22
+ ## Properties
23
+
24
+ | Name | Type | Default | Description |
25
+ | --- | --- | --- | --- |
26
+ | value | `string` | - | - |
27
+ | navigationEnabled | - | - | - |
28
+ | renderDay | `UseCalendarRenderDay` | - | - |
29
+
30
+ ## Events
31
+
32
+ | Name | Type | Description |
33
+ | --- | --- | --- |
34
+ | use-change | `CustomEvent` | Fired on selection with detail `{ value: string; dates: string[] }` |
35
+
36
+ ## Slots
37
+
38
+ | Name | Description |
39
+ | --- | --- |
40
+ | `header-start` | Content before the title in the header |
41
+ | `title` | Title showing the month and year |
42
+ | `controls` | Navigation controls (previous, today, next buttons) |
43
+ | `header-end` | Content after the controls in the header |
44
+ | `date-{YYYY-MM-DD}` | Per-date content that replaces the default day number |
@@ -0,0 +1,21 @@
1
+ # `use-widget`
2
+
3
+ Nested controls are removed from the tab flow until the user activates the widget with `Enter` or `F2`. Clicking on a control will also activate the widget. Widgets are deactivated with `Escape` or `F2` keys or when the user clicks outside of the widget.
4
+
5
+ `use-widget` can be used for easily navigating customizable dashboard widgets that contain multiple interactive elements. It can also be used for table and grid cells that contain multiple interactive elements, as described in the [WCAG Grid Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
6
+
7
+ ## To do
8
+
9
+ - [ ] Convert to a standard web component instead of LitElement
10
+ - [ ] implement Arrow Key navigation for tabbable elements when activated
11
+
12
+ ## Sources
13
+
14
+ - [tabbable](https://www.npmjs.com/package/tabbable)
15
+ - [Grid (Interactive Tabular Data and Layout Containers) Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/)
16
+
17
+ ## Slots
18
+
19
+ | Name | Description |
20
+ | --- | --- |
21
+ | `undefined` | - |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-wc",
3
- "version": "1.0.0-pre.38",
3
+ "version": "1.0.0-pre.39",
4
4
  "private": false,
5
5
  "homepage": "https://usewc.com",
6
6
  "bugs": "https://github.com/dang-rabbits/use-wc/issues",
@@ -23,9 +23,10 @@
23
23
  "./package.json": "./package.json"
24
24
  },
25
25
  "scripts": {
26
- "pack": "tsc && vp run analyze && vp pack",
26
+ "pack": "tsc && vp run analyze && vp pack && vp run generate-docs",
27
27
  "preview": "vp preview",
28
28
  "analyze": "custom-elements-manifest analyze",
29
+ "generate-docs": "node scripts/generate-docs.mjs",
29
30
  "storybook": "storybook dev -p ${PORT:-6006}",
30
31
  "build": "vp run pack && storybook build",
31
32
  "test": "vp test",
@@ -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",
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "name": "use-grid",
126
- "description": "Accessible grid component following [WAI-ARIA grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).\n\n## Grid Cell Modes\nThe `mode` attribute of the `use-gridcell` element determines how the cell behaves in terms of focus and interaction. The possible values are:\n\n- `'none'` - the cell itself is focusable and it does not contain any interactive elements.\n- `'widget'` - the cell itself is focusable and it contains more than one interactive element. To access the interactive elements, the user must press `Enter` or `F2`, and to restore focus to the cell, the user must press `Esc` or `F2`.\n- `'action'` - the cell itself is not focusable and it contains a single interactive element. The user can tab to the interactive elements directly.\n---\n\n\n### **Slots:**\n - _default_ - Grid content (use-gridhead/use-gridbody rows)",
126
+ "description": "Accessible grid component following [WAI-ARIA grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).\n---\n\n\n### **Slots:**\n - _default_ - Grid content (use-gridhead/use-gridbody rows)",
127
127
  "attributes": [
128
128
  {
129
129
  "name": "selectmode",
@@ -152,6 +152,7 @@
152
152
  "attributes": [
153
153
  {
154
154
  "name": "mode",
155
+ "description": "Determines how the cell behaves in terms of focus and interaction. The possible values are:\n\n- `'none'` - the cell itself is focusable and it does not contain any interactive elements.\n- `'widget'` - the cell itself is focusable and it contains more than one interactive element. To access the interactive elements, the user must press `Enter` or `F2`, and to restore focus to the cell, the user must press `Esc` or `F2`.\n- `'action'` - the cell itself is not focusable and it contains a single interactive element. The user can tab to the interactive elements directly.",
155
156
  "values": [
156
157
  { "name": "widget" },
157
158
  { "name": "action" },