@inglorious/ui 8.3.1 → 8.4.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.
Files changed (83) hide show
  1. package/package.json +4 -4
  2. package/src/controls/button/button.stories.js +1 -1
  3. package/src/controls/button/template.js +1 -1
  4. package/src/controls/button-group/button-group.stories.js +1 -1
  5. package/src/controls/button-group/template.js +1 -1
  6. package/src/controls/checkbox/checkbox.stories.js +1 -1
  7. package/src/controls/checkbox/style.css +1 -1
  8. package/src/controls/checkbox/template.js +7 -5
  9. package/src/controls/combobox/combobox.stories.js +1 -1
  10. package/src/controls/combobox/template.js +16 -11
  11. package/src/controls/fab/fab.stories.js +1 -1
  12. package/src/controls/file-upload/file-upload.stories.js +1 -1
  13. package/src/controls/file-upload/template.js +18 -7
  14. package/src/controls/icon-button/icon-button.stories.js +1 -1
  15. package/src/controls/image-cropper/image-cropper.stories.js +1 -1
  16. package/src/controls/input/input.stories.js +1 -1
  17. package/src/controls/input/template.js +16 -8
  18. package/src/controls/radio-group/radio-group.stories.js +1 -1
  19. package/src/controls/radio-group/template.js +8 -6
  20. package/src/controls/rating/rating.stories.js +1 -1
  21. package/src/controls/select/select.stories.js +1 -1
  22. package/src/controls/select/template.js +14 -12
  23. package/src/controls/slider/slider.stories.js +1 -1
  24. package/src/controls/slider/template.js +6 -4
  25. package/src/controls/switch/switch.stories.js +1 -1
  26. package/src/controls/switch/template.js +6 -4
  27. package/src/controls/textarea/template.js +17 -6
  28. package/src/controls/textarea/textarea.stories.js +1 -1
  29. package/src/data-display/avatar/avatar.stories.js +1 -1
  30. package/src/data-display/badge/badge.stories.js +1 -1
  31. package/src/data-display/before-after/before-after.stories.js +1 -1
  32. package/src/data-display/carousel/carousel.stories.js +1 -1
  33. package/src/data-display/chip/chip.stories.js +1 -1
  34. package/src/data-display/data-grid/data-grid.stories.js +1 -1
  35. package/src/data-display/divider/divider.stories.js +1 -1
  36. package/src/data-display/icon/icon-utf8.stories.js +1 -1
  37. package/src/data-display/icon/icon.stories.js +1 -1
  38. package/src/data-display/icon/template.js +1 -1
  39. package/src/data-display/list/list.stories.js +1 -1
  40. package/src/data-display/list/template.js +1 -1
  41. package/src/data-display/table/table.stories.js +1 -1
  42. package/src/data-display/table/template.js +1 -1
  43. package/src/data-display/tooltip/template.js +1 -1
  44. package/src/data-display/tooltip/tooltip.stories.js +1 -1
  45. package/src/data-display/typography/template.js +1 -1
  46. package/src/data-display/typography/typography.stories.js +1 -1
  47. package/src/examples/dashboard/dashboard.stories.js +1 -1
  48. package/src/feedback/alert/alert.stories.js +1 -1
  49. package/src/feedback/alert/template.js +1 -1
  50. package/src/feedback/backdrop/backdrop.stories.js +1 -1
  51. package/src/feedback/dialog/dialog.stories.js +1 -1
  52. package/src/feedback/progress/progress.stories.js +1 -1
  53. package/src/feedback/skeleton/skeleton.stories.js +1 -1
  54. package/src/feedback/snackbar/snackbar.stories.js +1 -1
  55. package/src/layout/container/container.stories.js +1 -1
  56. package/src/layout/container/template.js +1 -1
  57. package/src/layout/flex/flex.stories.js +1 -1
  58. package/src/layout/flex/template.js +1 -1
  59. package/src/layout/grid/grid.stories.js +1 -1
  60. package/src/navigation/bottom-navigation/bottom-navigation.stories.js +1 -1
  61. package/src/navigation/bottom-navigation/template.js +1 -1
  62. package/src/navigation/breadcrumbs/breadcrumbs.stories.js +1 -1
  63. package/src/navigation/breadcrumbs/template.js +1 -1
  64. package/src/navigation/drawer/drawer.stories.js +1 -1
  65. package/src/navigation/link/link.stories.js +1 -1
  66. package/src/navigation/link/template.js +1 -1
  67. package/src/navigation/menu/menu.stories.js +1 -1
  68. package/src/navigation/menu/template.js +1 -1
  69. package/src/navigation/pagination/pagination.stories.js +1 -1
  70. package/src/navigation/speed-dial/speed-dial.stories.js +1 -1
  71. package/src/navigation/stepper/stepper.stories.js +1 -1
  72. package/src/navigation/tabs/tabs.stories.js +1 -1
  73. package/src/shared/fallback-label.js +18 -0
  74. package/src/surfaces/accordion/accordion.stories.js +1 -1
  75. package/src/surfaces/accordion/template.js +1 -1
  76. package/src/surfaces/app-bar/app-bar.stories.js +1 -1
  77. package/src/surfaces/app-bar/template.js +1 -1
  78. package/src/surfaces/card/card.stories.js +1 -1
  79. package/src/surfaces/card/template.js +1 -1
  80. package/src/surfaces/paper/paper.stories.js +1 -1
  81. package/src/surfaces/paper/template.js +1 -1
  82. /package/src/shared/{applyElementProps.js → apply-element-props.js} +0 -0
  83. /package/src/stories/{notifyStory.js → notify-story.js} +0 -0
@@ -3,11 +3,11 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { html } from "@inglorious/web"
6
+ import { html, nothing } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders a toggle switch backed by a checkbox input.
@@ -29,6 +29,8 @@ export function render(props) {
29
29
  ...rest
30
30
  } = props
31
31
 
32
+ // The label wraps the input, which is what ties the two together: it needs no
33
+ // `for`, and an empty one would point at nothing and break the click-through.
32
34
  const inputId = id || name
33
35
 
34
36
  const classes = {
@@ -39,9 +41,9 @@ export function render(props) {
39
41
  }
40
42
 
41
43
  return html`
42
- <label class=${classMap(classes)} for=${inputId}>
44
+ <label class=${classMap(classes)}>
43
45
  <input
44
- id=${inputId}
46
+ id=${inputId || nothing}
45
47
  class="iw-switch-input"
46
48
  type="checkbox"
47
49
  name=${name}
@@ -3,11 +3,12 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { html } from "@inglorious/web"
6
+ import { html, nothing } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
+ import { fallbackLabel } from "../../shared/fallback-label.js"
11
12
 
12
13
  /**
13
14
  * Renders a labeled textarea field with optional hint and error messaging.
@@ -39,6 +40,7 @@ export function render(props) {
39
40
  } = props
40
41
 
41
42
  const textareaId = id || name
43
+ const messageId = (error || hint) && id ? `${id}-message` : ""
42
44
 
43
45
  const wrapperClasses = {
44
46
  "iw-textarea-field": true,
@@ -60,7 +62,7 @@ export function render(props) {
60
62
  ${
61
63
  label
62
64
  ? html`
63
- <label for=${textareaId} class="iw-textarea-label">
65
+ <label for=${textareaId || nothing} class="iw-textarea-label">
64
66
  ${label}
65
67
  ${
66
68
  isRequired
@@ -73,8 +75,11 @@ export function render(props) {
73
75
  }
74
76
 
75
77
  <textarea
76
- id=${textareaId}
78
+ id=${textareaId || nothing}
77
79
  name=${name}
80
+ aria-label=${fallbackLabel(textareaId, label)}
81
+ aria-describedby=${messageId || nothing}
82
+ aria-invalid=${error ? "true" : "false"}
78
83
  rows=${rows}
79
84
  .value=${value}
80
85
  placeholder=${placeholder}
@@ -90,9 +95,15 @@ export function render(props) {
90
95
 
91
96
  ${
92
97
  error
93
- ? html`<span class="iw-textarea-error-message">${error}</span>`
98
+ ? html`<span
99
+ id=${messageId || nothing}
100
+ class="iw-textarea-error-message"
101
+ >${error}</span
102
+ >`
94
103
  : hint
95
- ? html`<span class="iw-textarea-hint">${hint}</span>`
104
+ ? html`<span id=${messageId || nothing} class="iw-textarea-hint"
105
+ >${hint}</span
106
+ >`
96
107
  : null
97
108
  }
98
109
  </div>
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Textarea } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Avatar } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Badge } from "."
3
3
 
4
4
  export default {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createEntityRender,
3
3
  notifyActionArgType,
4
- } from "../../stories/notifyStory.js"
4
+ } from "../../stories/notify-story.js"
5
5
  import { BeforeAfter } from "./index.js"
6
6
 
7
7
  const before = {
@@ -3,7 +3,7 @@ import { html } from "@inglorious/web"
3
3
  import {
4
4
  createEntityRender,
5
5
  notifyActionArgType,
6
- } from "../../stories/notifyStory.js"
6
+ } from "../../stories/notify-story.js"
7
7
  import { Carousel } from "./index.js"
8
8
 
9
9
  const COLORS = ["#22d3ee", "#4f46e5", "#f59e0b", "#10b981", "#ef4444"]
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Chip } from "."
3
3
 
4
4
  export default {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createEntityRender,
3
3
  notifyActionArgType,
4
- } from "../../stories/notifyStory.js"
4
+ } from "../../stories/notify-story.js"
5
5
  import { DataGrid } from "."
6
6
 
7
7
  const baseRows = [
@@ -1,6 +1,6 @@
1
1
  import { render } from "@inglorious/web/test"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Divider } from "."
5
5
 
6
6
  export default {
@@ -6,7 +6,7 @@ import { Button } from "../../controls/button"
6
6
  import {
7
7
  createEntityRender,
8
8
  notifyActionArgType,
9
- } from "../../stories/notifyStory.js"
9
+ } from "../../stories/notify-story.js"
10
10
  import { Icon } from "."
11
11
 
12
12
  const UnicodeList = {
@@ -4,7 +4,7 @@ import arrowBack from "@iconify-icons/material-symbols/arrow-back"
4
4
  import settingsFilled from "@iconify-icons/material-symbols/settings"
5
5
  import settingsOutline from "@iconify-icons/material-symbols/settings-outline"
6
6
 
7
- import { createRender } from "../../stories/notifyStory.js"
7
+ import { createRender } from "../../stories/notify-story.js"
8
8
  import { Icon } from "."
9
9
 
10
10
  export default {
@@ -9,7 +9,7 @@ import { classMap } from "@inglorious/web/directives/class-map"
9
9
  import { ref } from "@inglorious/web/directives/ref"
10
10
  import { unsafeSVG } from "@inglorious/web/directives/unsafe-svg"
11
11
 
12
- import { applyElementProps } from "../../shared/applyElementProps.js"
12
+ import { applyElementProps } from "../../shared/apply-element-props.js"
13
13
 
14
14
  /**
15
15
  * Renders an inline icon with size and color control.
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { List } from "."
3
3
 
4
4
  export default {
@@ -28,7 +28,7 @@ import { when } from "@inglorious/web/directives/when"
28
28
  import { IconButton } from "../../controls/icon-button"
29
29
  import { Icon } from "../../data-display/icon"
30
30
  import { Flex } from "../../layout/flex"
31
- import { applyElementProps } from "../../shared/applyElementProps.js"
31
+ import { applyElementProps } from "../../shared/apply-element-props.js"
32
32
 
33
33
  const PRETTY_INDEX = 1
34
34
 
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Table } from "."
3
3
 
4
4
  export default {
@@ -9,7 +9,7 @@ import { classMap } from "@inglorious/web/directives/class-map"
9
9
  import { ref } from "@inglorious/web/directives/ref"
10
10
  import { repeat } from "@inglorious/web/directives/repeat"
11
11
 
12
- import { applyElementProps } from "../../shared/applyElementProps.js"
12
+ import { applyElementProps } from "../../shared/apply-element-props.js"
13
13
 
14
14
  const EVEN_ROW_DIVISOR = 2
15
15
  const STRIPED_OFFSET = 1
@@ -7,7 +7,7 @@ import { html } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders a tooltip trigger and bubble with positional styling.
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Tooltip } from "."
5
5
 
6
6
  export default {
@@ -7,7 +7,7 @@ import { html } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders styled text with semantic variants such as headings, body, and caption.
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Typography } from "."
3
3
 
4
4
  export default {
@@ -5,7 +5,7 @@ import { Chart } from "@inglorious/charts"
5
5
  import {
6
6
  createEntityRender,
7
7
  notifyActionArgType,
8
- } from "../../stories/notifyStory.js"
8
+ } from "../../stories/notify-story.js"
9
9
  import { AppDrawer } from "./app-drawer.js"
10
10
  import { AppHeader } from "./app-header.js"
11
11
  import { Dashboard } from "./dashboard.js"
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Alert } from "."
3
3
 
4
4
  export default {
@@ -7,7 +7,7 @@ import { html } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders an alert message with optional title, description, icon, and actions.
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Backdrop } from "."
5
5
 
6
6
  export default {
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Dialog } from "."
5
5
 
6
6
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Progress } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Skeleton } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Snackbar } from "."
3
3
 
4
4
  export default {
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Container } from "."
5
5
 
6
6
  export default {
@@ -8,7 +8,7 @@ import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
  import { styleMap } from "@inglorious/web/directives/style-map"
10
10
 
11
- import { applyElementProps } from "../../shared/applyElementProps.js"
11
+ import { applyElementProps } from "../../shared/apply-element-props.js"
12
12
 
13
13
  const SIZE_TO_MAX_WIDTH = {
14
14
  xs: "32rem",
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Flex } from "."
5
5
 
6
6
  export default {
@@ -7,7 +7,7 @@ import { classMap } from "@inglorious/web/directives/class-map"
7
7
  import { ref } from "@inglorious/web/directives/ref"
8
8
  import { staticHtml, unsafeStatic } from "@inglorious/web/static"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders a flexible layout container with direction, alignment, spacing, and wrap control.
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Grid } from "."
5
5
 
6
6
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { BottomNavigation } from "."
3
3
 
4
4
  export default {
@@ -8,7 +8,7 @@ import { html } from "@inglorious/web"
8
8
  import { classMap } from "@inglorious/web/directives/class-map"
9
9
  import { ref } from "@inglorious/web/directives/ref"
10
10
 
11
- import { applyElementProps } from "../../shared/applyElementProps.js"
11
+ import { applyElementProps } from "../../shared/apply-element-props.js"
12
12
 
13
13
  export const BottomNavigation = {
14
14
  /**
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Breadcrumbs } from "."
3
3
 
4
4
  export default {
@@ -8,7 +8,7 @@ import { html } from "@inglorious/web"
8
8
  import { classMap } from "@inglorious/web/directives/class-map"
9
9
  import { ref } from "@inglorious/web/directives/ref"
10
10
 
11
- import { applyElementProps } from "../../shared/applyElementProps.js"
11
+ import { applyElementProps } from "../../shared/apply-element-props.js"
12
12
 
13
13
  export const Breadcrumbs = {
14
14
  /**
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Drawer } from "."
5
5
 
6
6
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Link } from "."
3
3
 
4
4
  export default {
@@ -7,7 +7,7 @@ import { html } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders a styled link element with optional underline and color variants.
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Menu } from "."
3
3
 
4
4
  export default {
@@ -8,7 +8,7 @@ import { html } from "@inglorious/web"
8
8
  import { classMap } from "@inglorious/web/directives/class-map"
9
9
  import { ref } from "@inglorious/web/directives/ref"
10
10
 
11
- import { applyElementProps } from "../../shared/applyElementProps.js"
11
+ import { applyElementProps } from "../../shared/apply-element-props.js"
12
12
 
13
13
  export const Menu = {
14
14
  /**
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Pagination } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { SpeedDial } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Stepper } from "."
3
3
 
4
4
  export default {
@@ -1,4 +1,4 @@
1
- import { createRender } from "../../stories/notifyStory.js"
1
+ import { createRender } from "../../stories/notify-story.js"
2
2
  import { Tabs } from "."
3
3
 
4
4
  export default {
@@ -0,0 +1,18 @@
1
+ import { nothing } from "@inglorious/web"
2
+
3
+ /**
4
+ * A label beside its control is tied to it by id. Without an id there is nothing to
5
+ * tie it with, so the control names itself after the label instead: clicking the label
6
+ * no longer focuses the control, but a screen reader still announces what it is for.
7
+ *
8
+ * Only a plain-text label can be used this way; a template has no text to give.
9
+ *
10
+ * @param {string | undefined} controlId
11
+ * @param {unknown} label
12
+ * @returns {string | typeof nothing}
13
+ */
14
+ export function fallbackLabel(controlId, label) {
15
+ if (controlId || typeof label !== "string" || !label) return nothing
16
+
17
+ return label
18
+ }
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Accordion } from "."
5
5
 
6
6
  export default {
@@ -8,7 +8,7 @@ import { html } from "@inglorious/web"
8
8
  import { classMap } from "@inglorious/web/directives/class-map"
9
9
  import { ref } from "@inglorious/web/directives/ref"
10
10
 
11
- import { applyElementProps } from "../../shared/applyElementProps.js"
11
+ import { applyElementProps } from "../../shared/apply-element-props.js"
12
12
 
13
13
  export const Accordion = {
14
14
  /**
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { AppBar } from "."
5
5
 
6
6
  export default {
@@ -8,7 +8,7 @@ import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
  import { when } from "@inglorious/web/directives/when"
10
10
 
11
- import { applyElementProps } from "../../shared/applyElementProps.js"
11
+ import { applyElementProps } from "../../shared/apply-element-props.js"
12
12
 
13
13
  /**
14
14
  * Renders a top app bar with optional leading/trailing content and title metadata.
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Card } from "."
5
5
 
6
6
  export default {
@@ -7,7 +7,7 @@ import { html } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  export const Card = {
13
13
  /**
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { createRender } from "../../stories/notifyStory.js"
3
+ import { createRender } from "../../stories/notify-story.js"
4
4
  import { Paper } from "."
5
5
 
6
6
  export default {
@@ -7,7 +7,7 @@ import { html } from "@inglorious/web"
7
7
  import { classMap } from "@inglorious/web/directives/class-map"
8
8
  import { ref } from "@inglorious/web/directives/ref"
9
9
 
10
- import { applyElementProps } from "../../shared/applyElementProps.js"
10
+ import { applyElementProps } from "../../shared/apply-element-props.js"
11
11
 
12
12
  /**
13
13
  * Renders a surface container with elevation, radius, and padding options.
File without changes