@eunomia/elements 1.0.0-beta.7 → 1.0.0-beta.8

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 (177) hide show
  1. package/dist/cdn/components/chunks/{chunk-3PNGQEG4.js → chunk-32L2QYWQ.js} +2 -2
  2. package/dist/cdn/components/chunks/{chunk-Z3OFIE7S.js → chunk-3UUZM7X2.js} +1 -1
  3. package/dist/cdn/components/chunks/{chunk-BVASCT2V.js → chunk-55PUDL7D.js} +13 -13
  4. package/dist/cdn/components/chunks/chunk-5LA5DQMP.js +1 -0
  5. package/dist/cdn/components/chunks/chunk-5LXGJVJR.js +1 -0
  6. package/dist/cdn/components/chunks/chunk-6TIEBY34.js +1 -0
  7. package/dist/cdn/components/chunks/{chunk-LVKMAHMU.js → chunk-AH2SKZ7T.js} +4 -1
  8. package/dist/cdn/components/chunks/chunk-JAGZL7JH.js +1 -0
  9. package/dist/cdn/components/chunks/{chunk-DGI7TKCU.js → chunk-LD35BFNK.js} +5 -9
  10. package/dist/cdn/components/chunks/chunk-P6LGU3FT.js +1 -0
  11. package/dist/cdn/components/chunks/{chunk-UYZR4JXZ.js → chunk-QSZO4GIH.js} +45 -9
  12. package/dist/cdn/components/chunks/{chunk-PXF554MD.js → chunk-QYB6Z6FG.js} +5 -5
  13. package/dist/cdn/components/chunks/{chunk-RIFF2D2F.js → chunk-RGC3I6MK.js} +1 -1
  14. package/dist/cdn/components/chunks/{chunk-N6ZW5CDN.js → chunk-TCSB2MLU.js} +1 -1
  15. package/dist/cdn/components/chunks/chunk-WIUERJII.js +1 -0
  16. package/dist/cdn/components/eun-animate.js +4 -4
  17. package/dist/cdn/components/eun-button.js +1 -1
  18. package/dist/cdn/components/eun-carousel.js +10 -9
  19. package/dist/cdn/components/eun-chip.js +17 -11
  20. package/dist/cdn/components/eun-collapse.js +1 -1
  21. package/dist/cdn/components/eun-color-picker.js +18 -5
  22. package/dist/cdn/components/eun-counter.js +10 -8
  23. package/dist/cdn/components/eun-date-picker.js +46 -43
  24. package/dist/cdn/components/eun-drawer.js +19 -20
  25. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  26. package/dist/cdn/components/eun-dropdown-item.js +3 -3
  27. package/dist/cdn/components/eun-fab.js +1 -1
  28. package/dist/cdn/components/eun-image-carousel.js +4 -4
  29. package/dist/cdn/components/eun-input-phone.js +11 -8
  30. package/dist/cdn/components/eun-input.js +1 -1
  31. package/dist/cdn/components/eun-link.js +59 -13
  32. package/dist/cdn/components/eun-modal.js +23 -13
  33. package/dist/cdn/components/eun-scheduler-event-editor.js +1 -1
  34. package/dist/cdn/components/eun-search.js +34 -28
  35. package/dist/cdn/components/eun-select.js +3 -3
  36. package/dist/cdn/components/eun-sidebar.js +66 -21
  37. package/dist/cdn/components/eun-sliding-card.js +1 -1
  38. package/dist/cdn/components/eun-stepper.js +16 -16
  39. package/dist/cdn/components/eun-tab-panel.js +1 -1
  40. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  41. package/dist/cdn/components/eun-table.js +2 -2
  42. package/dist/cdn/components/eun-textarea.js +16 -13
  43. package/dist/cdn/components/eun-time-picker.js +25 -23
  44. package/dist/cdn/components/eun-toast.js +8 -8
  45. package/dist/cdn/components/eun-toggle-group.js +71 -35
  46. package/dist/cdn/components/eun-toggle-item.js +8 -8
  47. package/dist/cdn/components/eun-toolbar.js +20 -20
  48. package/dist/cdn/components/eun-tooltip.js +6 -6
  49. package/dist/cdn/styles/eunomia-themes.css +1 -1
  50. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
  51. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
  52. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  53. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
  54. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  55. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
  56. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  57. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
  58. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  59. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
  60. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  61. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
  62. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  63. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
  64. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  65. package/dist/components/action/button/button.d.ts +2 -2
  66. package/dist/components/action/button/button.js +3 -7
  67. package/dist/components/action/button/button.styles.js +3 -3
  68. package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -6
  69. package/dist/components/action/dropdown-button/dropdown-button.js +6 -8
  70. package/dist/components/action/dropdown-button/dropdown-item.d.ts +10 -2
  71. package/dist/components/action/dropdown-button/dropdown-item.js +24 -9
  72. package/dist/components/action/link/link.d.ts +10 -1
  73. package/dist/components/action/link/link.js +13 -1
  74. package/dist/components/action/link/link.styles.js +50 -3
  75. package/dist/components/action/toggle/toggle-group.d.ts +12 -2
  76. package/dist/components/action/toggle/toggle-group.js +17 -2
  77. package/dist/components/action/toggle/toggle-group.styles.js +54 -18
  78. package/dist/components/action/toggle/toggle-item.js +1 -3
  79. package/dist/components/action/toggle/toggle-item.styles.js +7 -7
  80. package/dist/components/alert/drawer/drawer.d.ts +25 -0
  81. package/dist/components/alert/drawer/drawer.js +42 -3
  82. package/dist/components/alert/drawer/drawer.styles.js +6 -6
  83. package/dist/components/alert/modal/modal.d.ts +25 -0
  84. package/dist/components/alert/modal/modal.js +42 -3
  85. package/dist/components/alert/modal/modal.styles.js +17 -6
  86. package/dist/components/alert/toast/toast.js +3 -2
  87. package/dist/components/alert/toast/toast.styles.js +3 -3
  88. package/dist/components/content/chip/chip.js +3 -2
  89. package/dist/components/content/chip/chip.styles.js +9 -3
  90. package/dist/components/content/image-carousel/image-carousel.js +5 -4
  91. package/dist/components/content/tooltip/tooltip.d.ts +16 -9
  92. package/dist/components/content/tooltip/tooltip.js +28 -12
  93. package/dist/components/content/tooltip/tooltip.styles.js +1 -1
  94. package/dist/components/form/color-picker/color-picker.d.ts +7 -1
  95. package/dist/components/form/color-picker/color-picker.js +8 -2
  96. package/dist/components/form/color-picker/color-picker.styles.js +13 -0
  97. package/dist/components/form/counter/counter.d.ts +3 -1
  98. package/dist/components/form/counter/counter.js +3 -1
  99. package/dist/components/form/counter/counter.styles.js +6 -4
  100. package/dist/components/form/date-picker/date-picker.d.ts +6 -1
  101. package/dist/components/form/date-picker/date-picker.js +7 -2
  102. package/dist/components/form/date-picker/date-picker.styles.js +9 -6
  103. package/dist/components/form/input/input.d.ts +6 -1
  104. package/dist/components/form/input/input.js +7 -2
  105. package/dist/components/form/input-phone/input-phone.d.ts +7 -1
  106. package/dist/components/form/input-phone/input-phone.js +7 -1
  107. package/dist/components/form/input-phone/input-phone.styles.js +6 -3
  108. package/dist/components/form/search/search.d.ts +64 -10
  109. package/dist/components/form/search/search.js +112 -31
  110. package/dist/components/form/search/search.styles.js +2 -0
  111. package/dist/components/form/select/select.d.ts +7 -1
  112. package/dist/components/form/select/select.js +7 -1
  113. package/dist/components/form/shared-styles/field.styles.js +45 -8
  114. package/dist/components/form/shared-styles/listbox.styles.js +5 -1
  115. package/dist/components/form/textarea/textarea.d.ts +1 -0
  116. package/dist/components/form/textarea/textarea.js +2 -1
  117. package/dist/components/form/textarea/textarea.styles.js +3 -0
  118. package/dist/components/form/time-picker/time-picker.d.ts +6 -1
  119. package/dist/components/form/time-picker/time-picker.js +7 -2
  120. package/dist/components/form/time-picker/time-picker.styles.js +7 -5
  121. package/dist/components/layout/animate/animate.js +2 -1
  122. package/dist/components/navigation/carousel/carousel.d.ts +1 -2
  123. package/dist/components/navigation/carousel/carousel.js +14 -6
  124. package/dist/components/navigation/carousel/carousel.styles.js +5 -4
  125. package/dist/components/navigation/sidebar/sidebar.d.ts +98 -52
  126. package/dist/components/navigation/sidebar/sidebar.js +140 -85
  127. package/dist/components/navigation/sidebar/sidebar.styles.d.ts +1 -1
  128. package/dist/components/navigation/sidebar/sidebar.styles.js +69 -21
  129. package/dist/components/navigation/stepper/stepper.d.ts +1 -3
  130. package/dist/components/navigation/stepper/stepper.js +3 -21
  131. package/dist/components/navigation/toolbar/toolbar.d.ts +10 -0
  132. package/dist/components/navigation/toolbar/toolbar.js +8 -1
  133. package/dist/components/navigation/toolbar/toolbar.styles.js +18 -17
  134. package/dist/events/select.event.d.ts +3 -2
  135. package/dist/events/select.event.js +2 -1
  136. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +1 -1
  137. package/dist/features/table/table/table.js +1 -1
  138. package/dist/features/table/table-action-bar/table-action-bar.js +2 -2
  139. package/dist/index.d.ts +1 -0
  140. package/dist/mixins/button.mixin.d.ts +1 -1
  141. package/dist/mixins/button.mixin.js +6 -4
  142. package/dist/mixins/dialog-surface.mixin.d.ts +8 -0
  143. package/dist/mixins/field-size.mixin.d.ts +19 -0
  144. package/dist/mixins/field-size.mixin.js +33 -0
  145. package/dist/mixins/rounded.mixin.d.ts +18 -0
  146. package/dist/mixins/rounded.mixin.js +32 -0
  147. package/dist/ssr/button-ssr.css +5 -5
  148. package/dist/ssr/carousel-ssr.css +9 -0
  149. package/dist/ssr/chip-ssr.css +8 -0
  150. package/dist/ssr/collapse-ssr.css +29 -0
  151. package/dist/ssr/field-ssr.css +43 -4
  152. package/dist/ssr/image-carousel-ssr.css +10 -0
  153. package/dist/ssr/links-ssr.css +38 -1
  154. package/dist/ssr/sidebar-ssr.css +95 -4
  155. package/dist/ssr/toggle-group-ssr.css +64 -13
  156. package/dist/ssr/toolbar-ssr.css +50 -0
  157. package/dist/types/variant.type.d.ts +4 -1
  158. package/dist/utils/boolean.utils.d.ts +14 -0
  159. package/dist/utils/boolean.utils.js +20 -0
  160. package/dist/utils/dropdown-menu.utils.d.ts +1 -1
  161. package/dist/utils/focusable-elements.utils.d.ts +12 -0
  162. package/dist/utils/focusable-elements.utils.js +26 -0
  163. package/dist/utils/input-modality.utils.d.ts +13 -0
  164. package/dist/utils/input-modality.utils.js +34 -0
  165. package/dist/utils/theme-generator.utils.d.ts +8 -2
  166. package/dist/utils/theme-generator.utils.js +30 -9
  167. package/package.json +1 -1
  168. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
  169. package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
  170. package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
  171. package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
  172. package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
  173. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
  174. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
  175. package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
  176. package/dist/cdn/components/chunks/chunk-6VK6SHCG.js +0 -1
  177. package/dist/cdn/components/chunks/chunk-UDOZRIJZ.js +0 -1
@@ -10,6 +10,8 @@ import { ifDefined } from "lit/directives/if-defined.js";
10
10
  import { ChangeEvent } from "../../../events/change.event.js";
11
11
  import { sidebarStyles } from "./sidebar.styles.js";
12
12
  import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
13
+ import { cssTimeToMs } from "../../../utils/motion.utils.js";
14
+ import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
13
15
  /**
14
16
  * Tag name of the sidebar component.
15
17
  */
@@ -41,7 +43,10 @@ export const EunomiaSidebarTagName = "eun-sidebar";
41
43
  * @slot footer - Optional footer content, such as a user menu, fixed below the scrollable body. Omitted entirely when nothing is slotted
42
44
  * @prop {'start' | 'end'} [position='start'] - Which edge of the layout the sidebar is pinned against
43
45
  * @prop {string} heading - An optional heading, rendered as the header slot's fallback content, and used as the accessible name when set
44
- * @prop {boolean} [collapsible=true] - Whether the built-in toggle button renders at all. The collapse, expand, and toggle methods still work regardless, for driving collapse from elsewhere, such as a page header menu button. Set to false to rely on resizable alone
46
+ * @prop {'mobile' | 'tablet' | 'laptop' | 'desktop'} hideBelow - Hides the sidebar below this breakpoint, for a layout where another navigation takes over on small screens, such as the toolbar's mobile panel. Also applies before the component loads when sidebar-ssr.css is linked
47
+ * @attr {'mobile' | 'tablet' | 'laptop' | 'desktop'} hide-below - Hides the sidebar below this breakpoint
48
+ * @prop {'light' | 'dark'} [theme='light'] - The sidebar's color scheme. Dark uses the inverse surface, for a sidebar on a dark background
49
+ * @prop {boolean} [collapsible=true] - Whether the built-in toggle button renders at all. The collapse, expand, and toggle methods still work regardless, for driving collapse from elsewhere, such as a page header menu button. Set to false, or the attribute to "false", to rely on resizable alone
45
50
  * @prop {'edge' | 'inline'} [togglePlacement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
46
51
  * @attr {'edge' | 'inline'} [toggle-placement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
47
52
  * @prop {'mini' | 'hidden'} [collapseMode='mini'] - The shape the collapsed state takes
@@ -51,20 +56,23 @@ export const EunomiaSidebarTagName = "eun-sidebar";
51
56
  * @attr {string} [expand-label] - The accessible label of the toggle button while collapsed. Defaults to the localized string for the current locale (English: "Expand sidebar")
52
57
  * @prop {string} [collapseLabel] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
53
58
  * @attr {string} [collapse-label] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
54
- * @prop {boolean} [resizable=true] - Whether the border can be dragged, or, once focused, adjusted with arrow keys, to resize the panel
59
+ * @prop {boolean} [resizable=true] - Whether the border can be dragged, or, once focused, adjusted with arrow keys, to resize the panel. Set to false, or the attribute to "false", to turn it off
55
60
  * @prop {string} [resizeLabel] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
56
61
  * @attr {string} [resize-label] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
57
- * @fires {ChangeEvent} eunchange - Fired whenever collapsed changes, including as a result of dragging or keyboard-resizing past the collapse threshold. Dragging the border all the way to a full hide is reachable regardless of collapseMode, though keyboard resizing never goes past the mini floor
62
+ * @fires {ChangeEvent} eunchange - Fired whenever collapsed changes, including as a result of dragging or keyboard-resizing below the mini width. A collapse reached this way takes the shape set by collapseMode, and expanding again returns to --sidebar-width
58
63
  * @cssprop [--sidebar-width] - Sets the expanded width of the sidebar, also the floor of the drag-resize range and, once resized, holds the user's chosen width
59
64
  * @cssprop [--sidebar-mini-width] - Sets the width of the mini collapsed state, also the floor of the drag-resize range
60
65
  * @cssprop [--sidebar-max-width] - Sets the ceiling of the drag-resize range
61
- * @cssprop [--sidebar-background] - Sets the background color of the sidebar
66
+ * @cssprop [--sidebar-background] - Sets the background color of the sidebar. Use an opaque color, or transparent to show the background behind the sidebar
62
67
  * @cssprop [--sidebar-color] - Sets the text color of the sidebar
63
68
  * @cssprop [--sidebar-border-color] - Sets the color of the sidebar's side border
64
69
  * @cssprop [--sidebar-padding] - Sets the padding of the header, body, and footer
65
70
  * @cssprop [--sidebar-padding-block] - Sets the vertical padding, as one length applied to both sides. Ignored when --sidebar-padding is set
66
71
  * @cssprop [--sidebar-padding-inline] - Sets the horizontal padding, as one length applied to both sides. Ignored when --sidebar-padding is set
67
72
  * @cssprop [--sidebar-gap] - Sets the gap inside the header and footer rows
73
+ * @cssprop [--sidebar-toggle-color] - Sets the color of the toggle button
74
+ * @cssprop [--sidebar-toggle-background-hover] - Sets the background color of the toggle button on hover
75
+ * @cssprop [--sidebar-resize-handle-delay] - Sets how long the pointer must rest on the border before the resize handle shows. Set to 0 to show it right away
68
76
  * @cssprop [--sidebar-transition-duration] - Sets the duration of the collapse and resize transition
69
77
  * @element eun-sidebar
70
78
  */
@@ -78,12 +86,20 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
78
86
  * @default start
79
87
  */
80
88
  this.position = "start";
89
+ /**
90
+ * The sidebar's color scheme : `dark` uses the inverse surface, the same
91
+ * one `eun-toolbar`'s own `theme="dark"` does.
92
+ * @default light
93
+ */
94
+ this.theme = "light";
81
95
  /**
82
96
  * Whether the built-in toggle button renders at all (see `togglePlacement`
83
97
  * for where) ; `collapse()`/`expand()`/`toggleCollapse()` work regardless,
84
98
  * for driving collapse from elsewhere (e.g. a page header menu button) —
85
99
  * set this to `false` to drop the built-in button entirely and rely on
86
- * `resizable` (dragging the border past the mini floor) alone.
100
+ * `resizable` (dragging the border past the mini floor) alone. The
101
+ * attribute value `"false"` turns it off too (see {@link
102
+ * defaultTrueConverter}).
87
103
  * @default true
88
104
  */
89
105
  this.collapsible = true;
@@ -112,7 +128,8 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
112
128
  * Whether the border can be dragged (or, once focused, adjusted with the
113
129
  * arrow keys) to resize the panel between `--sidebar-mini-width` and
114
130
  * `--sidebar-max-width`. Independent of `collapsible`, which only
115
- * controls the discrete toggle button.
131
+ * controls the discrete toggle button. The attribute value `"false"`
132
+ * turns it off too (see {@link defaultTrueConverter}).
116
133
  * @default true
117
134
  */
118
135
  this.resizable = true;
@@ -123,8 +140,7 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
123
140
  this.dragStartWidth = 0;
124
141
  /**
125
142
  * The last *unclamped* width computed during a drag, used on release to
126
- * decide whether the drag went far enough past the mini floor to snap
127
- * into a full `collapse-mode="hidden"` collapse.
143
+ * decide whether the drag went below the mini floor and collapses.
128
144
  * @internal
129
145
  */
130
146
  this.lastRawWidth = 0;
@@ -137,13 +153,6 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
137
153
  * @internal
138
154
  */
139
155
  this.dragStartCollapsed = false;
140
- /**
141
- * Whether `draggedHidden` was set right before the current drag started
142
- * — compared against the final state at release for the same reason
143
- * `dragStartCollapsed` is.
144
- * @internal
145
- */
146
- this.dragStartHidden = false;
147
156
  /**
148
157
  * Whether `pointermove` actually fired at least once since the current
149
158
  * `pointerdown` — a plain click on the resize handle (no movement)
@@ -158,18 +167,13 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
158
167
  */
159
168
  this.dragging = false;
160
169
  /**
161
- * Whether a drag has forced the panel fully hidden (width `0`, border
162
- * transparent) regardless of `collapse-mode` — `collapse-mode="mini"`'s
163
- * own collapsed state normally floors at `--sidebar-mini-width`, but a
164
- * drag that goes well past that floor toward zero can still reach a full
165
- * hide, matching what `collapse-mode="hidden"` already looks like.
166
- * Reflected so CSS can force `--_width`/`border-color` to win over
167
- * collapse-mode's own (otherwise fixed) collapsed-state rule. Cleared by
168
- * any discrete collapse()/expand()/toggleCollapse() (button or API),
169
- * which always takes precedence over a lingering drag state.
170
+ * Whether the resize handle shows its highlight and resize cursor : set
171
+ * once the pointer has rested on the border for
172
+ * `--sidebar-resize-handle-delay`, or right away on `pointerdown`, so
173
+ * merely crossing the border on the way to the content doesn't flash it.
170
174
  * @internal
171
175
  */
172
- this.draggedHidden = false;
176
+ this.resizeHandleArmed = false;
173
177
  /**
174
178
  * Whether focus was inside the sidebar right before a `willUpdate` that's
175
179
  * about to fully collapse it (`collapse-mode="hidden"`). Captured
@@ -181,6 +185,30 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
181
185
  * @internal
182
186
  */
183
187
  this.focusWasInsideBeforeHiddenCollapse = false;
188
+ /**
189
+ * Arms the resize handle once the pointer has rested on the border for
190
+ * `--sidebar-resize-handle-delay` (300ms by default).
191
+ * @private
192
+ */
193
+ this.handleResizePointerEnter = () => {
194
+ this.disarmResizeHandle();
195
+ const delay = cssTimeToMs(getComputedStyle(this).getPropertyValue("--sidebar-resize-handle-delay")) ?? 100;
196
+ if (delay === 0) {
197
+ this.resizeHandleArmed = true;
198
+ return;
199
+ }
200
+ this.resizeHandleArmTimer = setTimeout(() => {
201
+ this.resizeHandleArmTimer = undefined;
202
+ this.resizeHandleArmed = true;
203
+ }, delay);
204
+ };
205
+ /**
206
+ * Disarms the resize handle as soon as the pointer leaves the border.
207
+ * @private
208
+ */
209
+ this.handleResizePointerLeave = () => {
210
+ this.disarmResizeHandle();
211
+ };
184
212
  /**
185
213
  * Starts a drag-resize : captures the pointer on the handle itself (so
186
214
  * subsequent `pointermove`/`pointerup` keep firing there even once the
@@ -193,6 +221,11 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
193
221
  if (event.pointerType === "mouse" && event.button !== 0) {
194
222
  return;
195
223
  }
224
+ if (this.resizeHandleArmTimer !== undefined) {
225
+ clearTimeout(this.resizeHandleArmTimer);
226
+ this.resizeHandleArmTimer = undefined;
227
+ }
228
+ this.resizeHandleArmed = true;
196
229
  try {
197
230
  this.resizeHandleEl?.setPointerCapture(event.pointerId);
198
231
  }
@@ -200,17 +233,16 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
200
233
  this.dragStartX = event.clientX;
201
234
  this.dragStartWidth = this.currentWidthPx();
202
235
  this.dragStartCollapsed = this.collapsed;
203
- this.dragStartHidden = this.draggedHidden;
204
236
  this.lastRawWidth = this.dragStartWidth;
205
237
  this.dragMoved = false;
206
238
  };
207
239
  /**
208
240
  * Tracks an in-progress drag-resize, applying the live width as the
209
241
  * pointer moves. Direction is flipped for `position="end"`, where
210
- * dragging left (toward the panel) grows it. Tracks all the way down to
211
- * `0` (not just the mini floor) so the panel visually approaches a full
212
- * hide as the drag continues — `handleResizePointerUp` decides whether
213
- * it actually settles there.
242
+ * dragging left (toward the panel) grows it. Under `collapse-mode="mini"`
243
+ * the panel stops at the mini floor, the narrowest it can ever be ; under
244
+ * `hidden` it tracks all the way down to `0`, previewing the full hide —
245
+ * `handleResizePointerUp` decides whether it actually collapses.
214
246
  *
215
247
  * @param event the pointermove event.
216
248
  * @private
@@ -224,12 +256,11 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
224
256
  const delta = event.clientX - this.dragStartX;
225
257
  const signedDelta = this.position === "start" ? delta : -delta;
226
258
  this.lastRawWidth = this.dragStartWidth + signedDelta;
227
- this.applyWidth(this.lastRawWidth, 0);
259
+ this.applyWidth(this.lastRawWidth, this.collapseMode === "hidden" ? 0 : this.miniWidthPx());
228
260
  };
229
261
  /**
230
262
  * Ends a drag-resize : a plain click (no movement) is a no-op ; see
231
- * `settleWidth` for how the final width resolves into `collapsed`/
232
- * `draggedHidden`.
263
+ * `settleWidth` for how the final width resolves into `collapsed`.
233
264
  *
234
265
  * @param event the pointerup/pointercancel event.
235
266
  * @private
@@ -250,7 +281,7 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
250
281
  if (!this.dragMoved) {
251
282
  return;
252
283
  }
253
- this.settleWidth(this.lastRawWidth, this.dragStartCollapsed, this.dragStartHidden);
284
+ this.settleWidth(this.lastRawWidth, this.dragStartCollapsed);
254
285
  };
255
286
  /**
256
287
  * Keyboard resizing, per the WAI-ARIA window splitter pattern :
@@ -326,6 +357,14 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
326
357
  this.collapseToggleEl?.focus();
327
358
  }
328
359
  }
360
+ /**
361
+ * Lifecycle hook called when the element is disconnected from the DOM.
362
+ * Clears a pending resize handle arming timer.
363
+ */
364
+ disconnectedCallback() {
365
+ super.disconnectedCallback();
366
+ this.disarmResizeHandle();
367
+ }
329
368
  /**
330
369
  * Collapses the sidebar.
331
370
  */
@@ -352,20 +391,22 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
352
391
  * @private
353
392
  */
354
393
  setCollapsed(collapsed) {
355
- const changing = this.collapsed !== collapsed;
356
- const clearingDraggedHidden = this.draggedHidden;
357
- if (!changing && !clearingDraggedHidden) {
394
+ if (this.collapsed === collapsed) {
358
395
  return;
359
396
  }
360
397
  this.collapsed = collapsed;
361
- if (clearingDraggedHidden) {
362
- this.draggedHidden = false;
363
- this.style.removeProperty("border-color");
364
- this.style.removeProperty("--sidebar-width");
365
- this.liveWidthPx = undefined;
366
- }
367
398
  this.dispatchEvent(new ChangeEvent());
368
399
  }
400
+ /**
401
+ * Drops the width a drag or keyboard resize applied, so the next expand
402
+ * returns to `--sidebar-width` instead of the narrow width the resize
403
+ * collapsed from.
404
+ * @private
405
+ */
406
+ forgetResizedWidth() {
407
+ this.style.removeProperty("--sidebar-width");
408
+ this.liveWidthPx = undefined;
409
+ }
369
410
  /**
370
411
  * Reads a length custom property off the host's computed style, parsed
371
412
  * as a px number.
@@ -411,8 +452,7 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
411
452
  * @private
412
453
  */
413
454
  currentWidthPx() {
414
- if (this.draggedHidden ||
415
- (this.collapsed && this.collapseMode === "hidden")) {
455
+ if (this.collapsed && this.collapseMode === "hidden") {
416
456
  return 0;
417
457
  }
418
458
  if (this.collapsed && this.collapseMode === "mini") {
@@ -425,23 +465,21 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
425
465
  * `--sidebar-width` override, so a drag tracks the pointer immediately
426
466
  * rather than waiting on Lit's render cycle) and reactively (via
427
467
  * `liveWidthPx`, so `#resize-handle`'s `aria-valuenow` stays in sync).
428
- * Also clears `collapsed`/`draggedHidden` without dispatching : while
429
- * either reflects, its CSS rule sets `--_width` directly and would
430
- * otherwise ignore every live update below — `settleWidth`/
431
- * `settleCollapsedState` restore the correct final truth (and their one
432
- * authoritative `eunchange`) once the interaction ends.
468
+ * Also clears `collapsed` without dispatching : while it reflects, its
469
+ * CSS rule sets `--_width` directly and would otherwise ignore every live
470
+ * update below — `settleWidth`/`settleCollapsedState` restore the correct
471
+ * final truth (and their one authoritative `eunchange`) once the
472
+ * interaction ends.
433
473
  *
434
474
  * @param px the requested width, in px.
435
- * @param floor the minimum to clamp to — the mini width by default
436
- * (used by keyboard resizing, which never fully hides the panel), or
437
- * `0` during a live drag so it can visually approach a full hide.
475
+ * @param floor the minimum to clamp to — the mini width by default, or
476
+ * `0` during a `collapse-mode="hidden"` drag so it can visually approach
477
+ * a full hide.
438
478
  * @private
439
479
  */
440
480
  applyWidth(px, floor = this.miniWidthPx()) {
441
481
  const clamped = Math.min(Math.max(px, floor), this.maxWidthPx());
442
482
  this.collapsed = false;
443
- this.draggedHidden = false;
444
- this.style.removeProperty("border-color");
445
483
  this.style.setProperty("--sidebar-width", `${clamped}px`);
446
484
  this.liveWidthPx = clamped;
447
485
  }
@@ -449,9 +487,10 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
449
487
  * Reconciles `collapsed` once a *keyboard* resize ends, comparing the
450
488
  * interaction's start and end states so exactly one `eunchange` fires
451
489
  * for a genuine transition — and none at all for a resize that never
452
- * crossed the mini floor. Never settles into `draggedHidden` : keyboard
453
- * resizing intentionally can't fully hide the panel (see
454
- * `handleResizeKeydown`).
490
+ * crossed the mini floor. Only `collapse-mode="mini"` collapses here :
491
+ * under `hidden`, collapsing would hide the panel entirely, which stays
492
+ * the toggle button's job (see `handleResizeKeydown`). A collapse forgets
493
+ * the resized width, so the next expand returns to `--sidebar-width`.
455
494
  *
456
495
  * @param widthPx the final width the interaction landed on.
457
496
  * @param wasCollapsed whether the sidebar was collapsed when the
@@ -459,48 +498,55 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
459
498
  * @private
460
499
  */
461
500
  settleCollapsedState(widthPx, wasCollapsed) {
462
- const collapsed = widthPx <= this.miniWidthPx();
501
+ const collapsed = this.collapseMode === "mini" && widthPx <= this.miniWidthPx();
502
+ if (collapsed) {
503
+ this.forgetResizedWidth();
504
+ }
463
505
  this.collapsed = collapsed;
464
506
  if (collapsed !== wasCollapsed) {
465
507
  this.dispatchEvent(new ChangeEvent());
466
508
  }
467
509
  }
468
510
  /**
469
- * Reconciles both `collapsed` and `draggedHidden` once a *drag* resize
470
- * ends. Three outcomes, based on where the (unclamped) drag landed :
471
- * above the mini floor, free width ; below it but not by much, a
472
- * magnetic snap up to exactly the mini width ; well below it, a full
473
- * hide (`draggedHidden`) regardless of `collapse-mode` — dragging is a
474
- * deliberate enough gesture that reaching zero should always be
475
- * reachable, unlike keyboard stepping. Fires exactly one `eunchange` iff
476
- * either flag actually changed from where the interaction started.
511
+ * Reconciles `collapsed` once a *drag* resize ends : a drag that lands
512
+ * below the mini floor collapses into whichever shape `collapse-mode`
513
+ * sets (the icon rail for `mini`, a full hide for `hidden`), and forgets
514
+ * the dragged width so the next expand returns to `--sidebar-width`.
515
+ * Anywhere else keeps the dragged width, clamped to the resize range.
516
+ * Fires exactly one `eunchange` iff `collapsed` actually changed from
517
+ * where the interaction started.
477
518
  *
478
519
  * @param rawWidth the final unclamped width the drag landed on.
479
520
  * @param wasCollapsed whether `collapsed` was set when the drag started.
480
- * @param wasHidden whether `draggedHidden` was set when the drag started.
481
521
  * @private
482
522
  */
483
- settleWidth(rawWidth, wasCollapsed, wasHidden) {
523
+ settleWidth(rawWidth, wasCollapsed) {
484
524
  const miniWidth = this.miniWidthPx();
485
- const hidden = rawWidth < miniWidth / 2;
486
- const collapsed = hidden || rawWidth < miniWidth;
487
- const settled = hidden
488
- ? 0
489
- : Math.min(Math.max(rawWidth, miniWidth), this.maxWidthPx());
490
- this.style.setProperty("--sidebar-width", `${settled}px`);
491
- if (hidden) {
492
- this.style.setProperty("border-color", "transparent");
525
+ const collapsed = rawWidth < miniWidth;
526
+ if (collapsed) {
527
+ this.forgetResizedWidth();
493
528
  }
494
529
  else {
495
- this.style.removeProperty("border-color");
530
+ const settled = Math.min(rawWidth, this.maxWidthPx());
531
+ this.style.setProperty("--sidebar-width", `${settled}px`);
532
+ this.liveWidthPx = settled;
496
533
  }
497
- this.liveWidthPx = settled;
498
534
  this.collapsed = collapsed;
499
- this.draggedHidden = hidden;
500
- if (collapsed !== wasCollapsed || hidden !== wasHidden) {
535
+ if (collapsed !== wasCollapsed) {
501
536
  this.dispatchEvent(new ChangeEvent());
502
537
  }
503
538
  }
539
+ /**
540
+ * Clears {@link resizeHandleArmed} and its pending timer, if any.
541
+ * @private
542
+ */
543
+ disarmResizeHandle() {
544
+ if (this.resizeHandleArmTimer !== undefined) {
545
+ clearTimeout(this.resizeHandleArmTimer);
546
+ this.resizeHandleArmTimer = undefined;
547
+ }
548
+ this.resizeHandleArmed = false;
549
+ }
504
550
  /**
505
551
  * The icon for the collapse/expand toggle button : always points toward
506
552
  * whichever action it currently performs — inward (toward the panel)
@@ -629,6 +675,7 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
629
675
  return html `
630
676
  <div
631
677
  id="resize-handle"
678
+ class=${ifDefined(this.resizeHandleArmed ? "armed" : undefined)}
632
679
  role="separator"
633
680
  aria-orientation="vertical"
634
681
  aria-label=${this.resizeLabel ?? this.dictionary.sidebar.resize}
@@ -636,6 +683,8 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
636
683
  aria-valuemin=${Math.round(this.miniWidthPx())}
637
684
  aria-valuemax=${Math.round(this.maxWidthPx())}
638
685
  tabindex="0"
686
+ @pointerenter=${this.handleResizePointerEnter}
687
+ @pointerleave=${this.handleResizePointerLeave}
639
688
  @pointerdown=${this.handleResizePointerDown}
640
689
  @pointermove=${this.handleResizePointerMove}
641
690
  @pointerup=${this.handleResizePointerUp}
@@ -689,11 +738,17 @@ EunomiaSidebar.styles = sidebarStyles;
689
738
  __decorate([
690
739
  property({ reflect: true, useDefault: true })
691
740
  ], EunomiaSidebar.prototype, "position", void 0);
741
+ __decorate([
742
+ property({ reflect: true, attribute: "hide-below" })
743
+ ], EunomiaSidebar.prototype, "hideBelow", void 0);
744
+ __decorate([
745
+ property({ reflect: true, useDefault: true })
746
+ ], EunomiaSidebar.prototype, "theme", void 0);
692
747
  __decorate([
693
748
  property()
694
749
  ], EunomiaSidebar.prototype, "heading", void 0);
695
750
  __decorate([
696
- property({ type: Boolean })
751
+ property({ converter: defaultTrueConverter })
697
752
  ], EunomiaSidebar.prototype, "collapsible", void 0);
698
753
  __decorate([
699
754
  property({ reflect: true, attribute: "toggle-placement", useDefault: true })
@@ -711,7 +766,7 @@ __decorate([
711
766
  property({ attribute: "collapse-label" })
712
767
  ], EunomiaSidebar.prototype, "collapseLabel", void 0);
713
768
  __decorate([
714
- property({ type: Boolean })
769
+ property({ converter: defaultTrueConverter })
715
770
  ], EunomiaSidebar.prototype, "resizable", void 0);
716
771
  __decorate([
717
772
  property({ attribute: "resize-label" })
@@ -726,8 +781,8 @@ __decorate([
726
781
  property({ type: Boolean, reflect: true })
727
782
  ], EunomiaSidebar.prototype, "dragging", void 0);
728
783
  __decorate([
729
- property({ type: Boolean, reflect: true, attribute: "dragged-hidden" })
730
- ], EunomiaSidebar.prototype, "draggedHidden", void 0);
784
+ state()
785
+ ], EunomiaSidebar.prototype, "resizeHandleArmed", void 0);
731
786
  __decorate([
732
787
  state()
733
788
  ], EunomiaSidebar.prototype, "liveWidthPx", void 0);
@@ -1 +1 @@
1
- export declare const sidebarStyles: import("lit").CSSResult;
1
+ export declare const sidebarStyles: import("lit").CSSResult[];
@@ -1,4 +1,5 @@
1
- import { css } from "lit";
1
+ import { css, unsafeCSS } from "lit";
2
+ import { EUNOMIA_BREAKPOINTS, mediaBelow, } from "../../../breakpoints.js";
2
3
  /**
3
4
  * Base style for the sidebar component.
4
5
  *
@@ -6,13 +7,16 @@ import { css } from "lit";
6
7
  * [--sidebar-width] - Set a custom expanded width to the sidebar ; also the floor of the drag-resize range and, once resized, holds the user's chosen width
7
8
  * [--sidebar-mini-width] - Set a custom width for the collapse-mode="mini" state ; also the floor of the drag-resize range
8
9
  * [--sidebar-max-width] - Set a custom ceiling for the drag-resize range
9
- * [--sidebar-background] - Set a custom background color to the sidebar
10
- * [--sidebar-color] - Set a custom text color to the sidebar (pair with --sidebar-background for contrast)
10
+ * [--sidebar-background] - Set a custom background color to the sidebar, for both themes. Use an opaque color : the sidebar always paints its own background, so a translucent one adds up with whatever is painted behind it. Use transparent to show the background behind the sidebar instead
11
+ * [--sidebar-color] - Set a custom text color to the sidebar, for both themes (pair with --sidebar-background for contrast)
11
12
  * [--sidebar-border-color] - Set a custom color to the sidebar's side border
12
13
  * [--sidebar-padding] - Set a custom padding to the header/body/footer
13
14
  * [--sidebar-padding-block] - Set a custom vertical padding, as one length applied to both sides. Ignored when --sidebar-padding is set
14
15
  * [--sidebar-padding-inline] - Set a custom horizontal padding, as one length applied to both sides. Ignored when --sidebar-padding is set
15
16
  * [--sidebar-gap] - Set a custom gap inside the header/footer rows
17
+ * [--sidebar-toggle-color] - Set a custom color to the toggle button
18
+ * [--sidebar-toggle-background-hover] - Set a custom background color to the toggle button on hover
19
+ * [--sidebar-resize-handle-delay] - Set how long the pointer must rest on the border before the resize handle shows (default 300ms, 0 to show it right away)
16
20
  * [--sidebar-transition-duration] - Set a custom duration for the collapse/resize transition
17
21
  */
18
22
  const base = css `
@@ -25,6 +29,14 @@ const base = css `
25
29
  --sidebar-border-color,
26
30
  var(--eun-border-color, #dee0e7)
27
31
  );
32
+ --_toggleColor: var(
33
+ --sidebar-toggle-color,
34
+ var(--eun-text-secondary, #484e61)
35
+ );
36
+ --_toggleBackgroundHover: var(
37
+ --sidebar-toggle-background-hover,
38
+ var(--eun-content-hover, #edeff0)
39
+ );
28
40
  --_paddingBlock: var(
29
41
  --sidebar-padding,
30
42
  var(--sidebar-padding-block, var(--eun-space-m, 16px))
@@ -51,6 +63,25 @@ const base = css `
51
63
  :host([dragging]) {
52
64
  transition: none;
53
65
  }
66
+ :host([theme="dark"]) {
67
+ --_background: var(
68
+ --sidebar-background,
69
+ var(--eun-surface-inverse, #0b1620)
70
+ );
71
+ --_color: var(--sidebar-color, var(--eun-text-on-inverse, #f5f7fa));
72
+ --_borderColor: var(
73
+ --sidebar-border-color,
74
+ color-mix(in srgb, var(--_color) 16%, transparent)
75
+ );
76
+ --_toggleColor: var(
77
+ --sidebar-toggle-color,
78
+ color-mix(in srgb, var(--_color) 75%, transparent)
79
+ );
80
+ --_toggleBackgroundHover: var(
81
+ --sidebar-toggle-background-hover,
82
+ color-mix(in srgb, var(--_color) 12%, transparent)
83
+ );
84
+ }
54
85
  :host([position="end"]) {
55
86
  border-inline-end: none;
56
87
  border-inline-start: var(--eun-border-width-s, 1px) solid
@@ -63,10 +94,6 @@ const base = css `
63
94
  --_width: 0px;
64
95
  border-color: transparent;
65
96
  }
66
- :host([dragged-hidden]) {
67
- --_width: 0px !important;
68
- border-color: transparent !important;
69
- }
70
97
 
71
98
  #surface {
72
99
  box-sizing: border-box;
@@ -118,20 +145,20 @@ const base = css `
118
145
  inset-inline-end: -4px;
119
146
  z-index: 0;
120
147
  width: 8px;
121
- cursor: ew-resize;
122
148
  touch-action: none;
123
149
  background: transparent;
124
- transition: background-color var(--eun-duration-s, 150ms)
125
- var(--eun-easing-default, ease);
126
150
  }
127
151
  :host([position="end"]) #resize-handle {
128
152
  inset-inline-end: auto;
129
153
  inset-inline-start: -4px;
130
154
  }
131
- #resize-handle:hover,
155
+ #resize-handle.armed,
132
156
  #resize-handle:focus-visible {
157
+ cursor: ew-resize;
133
158
  background: var(--eun-color-primary-500, #3d6fff);
134
159
  opacity: 0.35;
160
+ transition: background-color var(--eun-duration-s, 150ms)
161
+ var(--eun-easing-default, ease);
135
162
  }
136
163
  #resize-handle:focus-visible {
137
164
  outline: none;
@@ -155,17 +182,25 @@ const base = css `
155
182
  background: var(--_background);
156
183
  border: var(--eun-border-width-s, 1px) solid var(--_borderColor);
157
184
  border-radius: var(--eun-border-radius-xl, 999px);
158
- color: var(--eun-text-secondary, #484e61);
185
+ color: var(--_toggleColor);
159
186
  cursor: pointer;
160
- transition: background-color var(--eun-duration-s, 150ms)
161
- var(--eun-easing-default, ease);
187
+ outline: 2px solid transparent;
188
+ transition:
189
+ background-color var(--eun-duration-s, 150ms)
190
+ var(--eun-easing-default, ease),
191
+ outline var(--eun-duration-m, 200ms) var(--eun-easing-out, ease-out);
162
192
  }
163
193
  :host([position="end"]) #collapse-toggle:not(.inline) {
164
194
  inset-inline-end: auto;
165
195
  inset-inline-start: -14px;
166
196
  }
167
197
  #collapse-toggle:not(.inline):hover {
168
- background: var(--eun-content-hover, #edeff0);
198
+ background:
199
+ linear-gradient(
200
+ var(--_toggleBackgroundHover),
201
+ var(--_toggleBackgroundHover)
202
+ ),
203
+ var(--_background);
169
204
  }
170
205
 
171
206
  #collapse-toggle.inline {
@@ -179,16 +214,19 @@ const base = css `
179
214
  border-top: var(--eun-border-width-s, 1px) solid var(--_borderColor);
180
215
  border-radius: 0;
181
216
  background: transparent;
182
- color: var(--eun-text-secondary, #484e61);
217
+ color: var(--_toggleColor);
183
218
  font: inherit;
184
219
  font-size: var(--eun-font-size-s, 14px);
185
220
  text-align: start;
186
221
  cursor: pointer;
187
- transition: background-color var(--eun-duration-s, 150ms)
188
- var(--eun-easing-default, ease);
222
+ outline: 2px solid transparent;
223
+ transition:
224
+ background-color var(--eun-duration-s, 150ms)
225
+ var(--eun-easing-default, ease),
226
+ outline var(--eun-duration-m, 200ms) var(--eun-easing-out, ease-out);
189
227
  }
190
228
  #collapse-toggle.inline:hover {
191
- background: var(--eun-content-hover, #edeff0);
229
+ background: var(--_toggleBackgroundHover);
192
230
  }
193
231
  #collapse-toggle-label {
194
232
  overflow: hidden;
@@ -205,9 +243,16 @@ const base = css `
205
243
  }
206
244
 
207
245
  #collapse-toggle:focus-visible {
208
- outline: 2px solid var(--eun-color-primary-500, #3d6fff);
246
+ outline-color: var(--eun-color-primary-500, #3d6fff);
209
247
  outline-offset: 1px;
210
248
  }
249
+ #collapse-toggle.inline:focus-visible {
250
+ outline-offset: -2px;
251
+ outline-color: var(--eun-color-primary-500, #3d6fff);
252
+ border-start-start-radius: var(--eun-border-radius-m, 8px);
253
+ border-start-end-radius: var(--eun-border-radius-m, 8px);
254
+ background: var(--_toggleBackgroundHover);
255
+ }
211
256
 
212
257
  @media (prefers-reduced-motion: reduce) {
213
258
  :host {
@@ -215,4 +260,7 @@ const base = css `
215
260
  }
216
261
  }
217
262
  `;
218
- export const sidebarStyles = base;
263
+ const hideBelow = unsafeCSS(Object.keys(EUNOMIA_BREAKPOINTS)
264
+ .map((name) => `@media ${mediaBelow(name)} { :host([hide-below="${name}"]) { display: none; } }`)
265
+ .join("\n"));
266
+ export const sidebarStyles = [base, hideBelow];
@@ -98,7 +98,6 @@ export type EunomiaStepperVariant = "numbered" | "progress";
98
98
  * @prop {'horizontal' | 'vertical'} [orientation='horizontal'] - The numbered display's layout direction. Has no effect on the progress variant
99
99
  * @prop {'numbered' | 'progress'} [variant='numbered'] - Which of the two displays to render
100
100
  * @prop {boolean} [linear=true] - Restricts direct navigation to steps before activeStep. Set to false to allow jumping to any non-disabled step in any order
101
- * @attr {'true' | 'false'} [linear='true'] - Unlike most boolean attributes here, the literal string false genuinely means false, needed since linear is the one that defaults to true
102
101
  * @prop {boolean} [disabled=false] - Disables every step's control, leaving a read-only progress summary with no navigation at all, the same way an individual step's own disabled does
103
102
  * @attr {string} [aria-label='Progress'] - The accessible label for the navigation landmark. Numbered display only
104
103
  * @fires {StepChangeEvent} eunstepchange - Fired with the requested step whenever a reachable step is activated. ActiveStep and activeSubstep are never updated internally
@@ -176,8 +175,7 @@ export declare class EunomiaStepper extends LitElement {
176
175
  /**
177
176
  * Restricts direct navigation to steps before {@link activeStep} ; set
178
177
  * to `false` (either as the JS property, or the literal `linear="false"`
179
- * attribute — see {@link linearConverter} for why that works here,
180
- * unlike most other boolean attributes) to allow jumping to any
178
+ * attribute — see {@link defaultTrueConverter}) to allow jumping to any
181
179
  * non-`disabled` step in any order.
182
180
  * @default true
183
181
  */