@nanahoshi/mona-ui 0.46.0 → 0.47.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 (46) hide show
  1. package/docs/api/button.json +1 -1
  2. package/docs/api/button.md +1 -0
  3. package/docs/api/check-box.json +1 -1
  4. package/docs/api/check-box.md +1 -0
  5. package/docs/api/chip.json +1 -1
  6. package/docs/api/chip.md +1 -0
  7. package/docs/api/common.json +1 -1
  8. package/docs/api/common.md +1 -1
  9. package/docs/api/index.json +1 -1
  10. package/docs/api/radio-button.json +1 -1
  11. package/docs/api/radio-button.md +1 -0
  12. package/docs/api/ripple.json +1 -0
  13. package/docs/api/ripple.md +75 -0
  14. package/docs/api/sidebar.json +1 -1
  15. package/docs/api/sidebar.md +1 -0
  16. package/docs/api/switch.json +1 -1
  17. package/docs/api/switch.md +1 -0
  18. package/docs/manifest.json +1 -1
  19. package/docs/ripple.md +360 -0
  20. package/docs/sidebar-menus.md +8 -0
  21. package/fesm2022/nanahoshi-mona-ui-button.mjs +20 -2
  22. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +11 -3
  23. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +30 -5
  24. package/fesm2022/nanahoshi-mona-ui-chip.mjs +13 -0
  25. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +9 -1
  26. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +9 -3
  27. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +12 -4
  28. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +11 -3
  29. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +27 -3
  30. package/fesm2022/nanahoshi-mona-ui-ripple.mjs +196 -0
  31. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +9 -3
  32. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +21 -1
  33. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +5 -1
  34. package/fesm2022/nanahoshi-mona-ui-switch.mjs +28 -3
  35. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +7 -1
  36. package/llms.txt +2 -0
  37. package/package.json +5 -1
  38. package/ripple/package.json +5 -0
  39. package/types/nanahoshi-mona-ui-button.d.ts +8 -1
  40. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  41. package/types/nanahoshi-mona-ui-check-box.d.ts +10 -1
  42. package/types/nanahoshi-mona-ui-chip.d.ts +8 -1
  43. package/types/nanahoshi-mona-ui-radio-button.d.ts +9 -1
  44. package/types/nanahoshi-mona-ui-ripple.d.ts +72 -0
  45. package/types/nanahoshi-mona-ui-sidebar.d.ts +12 -0
  46. package/types/nanahoshi-mona-ui-switch.d.ts +10 -2
@@ -1 +1 @@
1
- {"links":{"RadioButtonComponent":"radio-button","RadioButtonDirective":"radio-button","RadioButtonDirectiveProps":"radio-button","RadioGroupComponent":"radio-button"},"name":"radio-button","pages":[{"path":"radio-button","title":"Radio Button"}],"symbols":[{"description":"","implements":["FormValueControl<T>"],"kind":"component","name":"RadioButtonComponent","selector":"mona-radio-button","typeParameters":["T = unknown"],"inputs":[{"alias":"aria-describedby","defaultValue":"\"\"","description":"Id of an element that describes the radio button, such as an error message.","name":"ariaDescribedBy","type":"string"},{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name of the radio button when it has no visible label.","name":"ariaLabel","type":"string"},{"alias":"aria-labelledby","defaultValue":"\"\"","description":"Id of the element that labels the radio button.","name":"ariaLabelledBy","type":"string"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the label container element via `tailwind-merge`.","name":"userClass","type":"string"},{"defaultValue":"false","description":"Sets the disabled state of the radio button.","name":"disabled","type":"boolean"},{"defaultValue":"generated","description":"Id of the native radio input. Point a `<label for>` at it to label the radio button from outside.\nA unique id is generated when it isn't set.","name":"inputId","type":"string"},{"defaultValue":"false","description":"Marks the radio button as invalid. When bound to a signal form field via `[formField]`, this is\nwritten by the `FormField` directive.","name":"invalid","type":"boolean"},{"defaultValue":"\"\"","description":"Text label displayed alongside the radio button.\nWhen provided, takes precedence over projected content.\nWhen empty, projected content inside `<mona-radio-button>` is used.\nWhen both are absent, name the radio button with `aria-label` or `aria-labelledby`.","name":"label","type":"string"},{"defaultValue":"\"after\"","description":"Position of the label relative to the radio button circle.","name":"labelPosition","type":"\"before\" | \"after\""},{"defaultValue":"\"medium\"","description":"Font size applied to the label text.","name":"labelSize","type":"\"large\" | \"medium\" | \"small\""},{"defaultValue":"\"\"","description":"HTML `name` attribute forwarded to the native input.\nRadio buttons that share the same `name` form a mutually exclusive group in the browser.","name":"name","type":"string"},{"defaultValue":"undefined","description":"The identity value of this radio button within a group.\nCompared against `value()` to determine whether this button is selected.\nWhen this button is chosen, its `radioValue` is written to the form as the new group value.\nA radio button without one can't be selected.","name":"radioValue","type":"T"},{"defaultValue":"false","description":"Prevents value changes while the control stays focusable and readable. When bound to a signal form\nfield via `[formField]`, this is written by the `FormField` directive.","name":"readonly","type":"boolean"},{"defaultValue":"false","description":"Marks the radio button as required, as the native `required` attribute. When bound to a signal form\nfield via `[formField]`, this is written by the `FormField` directive.","name":"required","type":"boolean"},{"defaultValue":"\"full\"","description":"Sets the border radius of the radio button circle and indicator.","name":"rounded","type":"\"full\" | \"large\" | \"medium\" | \"none\" | \"small\""},{"defaultValue":"false","description":"Marks the radio button as touched. Error styling requires both `invalid` and `touched` to be `true`.\nWhen bound to a signal form field via `[formField]`, this is written by the `FormField` directive.","name":"touched","type":"boolean"},{"defaultValue":"undefined","description":"The currently selected value of a group of radio buttons that aren't in a `mona-radio-group`. When\nbound to a signal form field via `[formField]`, the `FormField` directive keeps it in sync.","name":"value","twoWay":true,"type":"T"}],"methods":[{"description":"Moves focus to the native radio input.","name":"focus","signature":"focus(options?: FocusOptions): void"}],"outputs":[{"description":"Emits when the input loses focus.","name":"inputBlur","type":"FocusEvent"},{"description":"Emits when the input is clicked.","name":"inputClick","type":"MouseEvent"},{"description":"Emits when the input receives focus.","name":"inputFocus","type":"FocusEvent"},{"description":"Emits when the radio button loses focus or is selected.","name":"touch","type":"void"}],"properties":[],"page":{"path":"radio-button","title":"Radio Button"}},{"description":"","implements":["FormValueControl<T>"],"kind":"component","name":"RadioGroupComponent","selector":"mona-radio-group","typeParameters":["T = unknown"],"inputs":[{"alias":"aria-describedby","defaultValue":"\"\"","description":"Id of an element that describes the group, such as an error message.","name":"ariaDescribedBy","type":"string"},{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name of the group. A group needs a name from this, `aria-labelledby` or a `mona-label`.","name":"ariaLabel","type":"string"},{"alias":"aria-labelledby","defaultValue":"\"\"","description":"Id of the element that labels the group.","name":"ariaLabelledBy","type":"string"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the group via `tailwind-merge`.","name":"userClass","type":"string"},{"defaultValue":"false","description":"Disables every radio button in the group. When bound to a signal form field via `[formField]`, this\nis written by the `FormField` directive.","name":"disabled","type":"boolean"},{"defaultValue":"false","description":"Marks the group as invalid. It shows once `touched` is also true. When bound to a signal form field\nvia `[formField]`, this is written by the `FormField` directive.","name":"invalid","type":"boolean"},{"defaultValue":"\"\"","description":"The native `name` shared by the radio buttons in the group. A unique name is generated when it isn't\nset. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.","name":"name","type":"string"},{"defaultValue":"\"vertical\"","description":"The direction the radio buttons are laid out and announced in.","name":"orientation","type":"\"horizontal\" | \"vertical\""},{"defaultValue":"false","description":"Prevents value changes while the radio buttons stay focusable and readable. When bound to a signal\nform field via `[formField]`, this is written by the `FormField` directive.","name":"readonly","type":"boolean"},{"defaultValue":"false","description":"Marks the group as required. When bound to a signal form field via `[formField]`, this is written by\nthe `FormField` directive.","name":"required","type":"boolean"},{"defaultValue":"false","description":"Marks the group as touched. Error styling needs both `invalid` and `touched`. When bound to a signal\nform field via `[formField]`, this is written by the `FormField` directive.","name":"touched","type":"boolean"},{"defaultValue":"undefined","description":"The `radioValue` of the selected radio button.","name":"value","twoWay":true,"type":"T"}],"methods":[{"description":"Moves focus to the selected radio button, or the first enabled one.","name":"focus","signature":"focus(options?: FocusOptions): void"}],"outputs":[{"description":"Emits when a radio button is selected and when focus leaves the group.","name":"touch","type":"void"}],"properties":[],"page":{"path":"radio-button","title":"Radio Button"}},{"description":"","kind":"directive","name":"RadioButtonDirective","selector":"input[type='radio'][monaRadioButton]","inputs":[{"defaultValue":"false","description":"Marks the radio button as invalid, triggering error border and ring styling.","name":"invalid","type":"boolean"},{"defaultValue":"\"full\"","description":"Sets the border radius of the radio button.","name":"rounded","type":"RadioButtonDirectiveProps[\"rounded\"]"},{"defaultValue":"false","description":"Marks the radio button as touched. Error styling is only shown when both `invalid` and `touched` are `true`.","name":"touched","type":"boolean"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"radio-button","title":"Radio Button"}},{"description":"","kind":"type","name":"RadioButtonDirectiveProps","signature":"type RadioButtonDirectiveProps = VariantProps<typeof radioButtonDirectiveThemeVariants>;","page":{"path":"radio-button","title":"Radio Button"},"usedBy":["RadioButtonDirective"]}]}
1
+ {"links":{"RadioButtonComponent":"radio-button","RadioButtonDirective":"radio-button","RadioButtonDirectiveProps":"radio-button","RadioGroupComponent":"radio-button"},"name":"radio-button","pages":[{"path":"radio-button","title":"Radio Button"}],"symbols":[{"description":"","implements":["FormValueControl<T>"],"kind":"component","name":"RadioButtonComponent","selector":"mona-radio-button","typeParameters":["T = unknown"],"inputs":[{"alias":"aria-describedby","defaultValue":"\"\"","description":"Id of an element that describes the radio button, such as an error message.","name":"ariaDescribedBy","type":"string"},{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name of the radio button when it has no visible label.","name":"ariaLabel","type":"string"},{"alias":"aria-labelledby","defaultValue":"\"\"","description":"Id of the element that labels the radio button.","name":"ariaLabelledBy","type":"string"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the label container element via `tailwind-merge`.","name":"userClass","type":"string"},{"defaultValue":"false","description":"Sets the disabled state of the radio button.","name":"disabled","type":"boolean"},{"defaultValue":"generated","description":"Id of the native radio input. Point a `<label for>` at it to label the radio button from outside.\nA unique id is generated when it isn't set.","name":"inputId","type":"string"},{"defaultValue":"false","description":"Marks the radio button as invalid. When bound to a signal form field via `[formField]`, this is\nwritten by the `FormField` directive.","name":"invalid","type":"boolean"},{"defaultValue":"\"\"","description":"Text label displayed alongside the radio button.\nWhen provided, takes precedence over projected content.\nWhen empty, projected content inside `<mona-radio-button>` is used.\nWhen both are absent, name the radio button with `aria-label` or `aria-labelledby`.","name":"label","type":"string"},{"defaultValue":"\"after\"","description":"Position of the label relative to the radio button circle.","name":"labelPosition","type":"\"before\" | \"after\""},{"defaultValue":"\"medium\"","description":"Font size applied to the label text.","name":"labelSize","type":"\"large\" | \"medium\" | \"small\""},{"defaultValue":"false","description":"Turns the ripple off for this element while ripples are on.","name":"monaRippleDisabled","type":"boolean"},{"defaultValue":"\"\"","description":"HTML `name` attribute forwarded to the native input.\nRadio buttons that share the same `name` form a mutually exclusive group in the browser.","name":"name","type":"string"},{"defaultValue":"undefined","description":"The identity value of this radio button within a group.\nCompared against `value()` to determine whether this button is selected.\nWhen this button is chosen, its `radioValue` is written to the form as the new group value.\nA radio button without one can't be selected.","name":"radioValue","type":"T"},{"defaultValue":"false","description":"Prevents value changes while the control stays focusable and readable. When bound to a signal form\nfield via `[formField]`, this is written by the `FormField` directive.","name":"readonly","type":"boolean"},{"defaultValue":"false","description":"Marks the radio button as required, as the native `required` attribute. When bound to a signal form\nfield via `[formField]`, this is written by the `FormField` directive.","name":"required","type":"boolean"},{"defaultValue":"\"full\"","description":"Sets the border radius of the radio button circle and indicator.","name":"rounded","type":"\"full\" | \"large\" | \"medium\" | \"none\" | \"small\""},{"defaultValue":"false","description":"Marks the radio button as touched. Error styling requires both `invalid` and `touched` to be `true`.\nWhen bound to a signal form field via `[formField]`, this is written by the `FormField` directive.","name":"touched","type":"boolean"},{"defaultValue":"undefined","description":"The currently selected value of a group of radio buttons that aren't in a `mona-radio-group`. When\nbound to a signal form field via `[formField]`, the `FormField` directive keeps it in sync.","name":"value","twoWay":true,"type":"T"}],"methods":[{"description":"Moves focus to the native radio input.","name":"focus","signature":"focus(options?: FocusOptions): void"}],"outputs":[{"description":"Emits when the input loses focus.","name":"inputBlur","type":"FocusEvent"},{"description":"Emits when the input is clicked.","name":"inputClick","type":"MouseEvent"},{"description":"Emits when the input receives focus.","name":"inputFocus","type":"FocusEvent"},{"description":"Emits when the radio button loses focus or is selected.","name":"touch","type":"void"}],"properties":[],"page":{"path":"radio-button","title":"Radio Button"}},{"description":"","implements":["FormValueControl<T>"],"kind":"component","name":"RadioGroupComponent","selector":"mona-radio-group","typeParameters":["T = unknown"],"inputs":[{"alias":"aria-describedby","defaultValue":"\"\"","description":"Id of an element that describes the group, such as an error message.","name":"ariaDescribedBy","type":"string"},{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name of the group. A group needs a name from this, `aria-labelledby` or a `mona-label`.","name":"ariaLabel","type":"string"},{"alias":"aria-labelledby","defaultValue":"\"\"","description":"Id of the element that labels the group.","name":"ariaLabelledBy","type":"string"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the group via `tailwind-merge`.","name":"userClass","type":"string"},{"defaultValue":"false","description":"Disables every radio button in the group. When bound to a signal form field via `[formField]`, this\nis written by the `FormField` directive.","name":"disabled","type":"boolean"},{"defaultValue":"false","description":"Marks the group as invalid. It shows once `touched` is also true. When bound to a signal form field\nvia `[formField]`, this is written by the `FormField` directive.","name":"invalid","type":"boolean"},{"defaultValue":"\"\"","description":"The native `name` shared by the radio buttons in the group. A unique name is generated when it isn't\nset. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.","name":"name","type":"string"},{"defaultValue":"\"vertical\"","description":"The direction the radio buttons are laid out and announced in.","name":"orientation","type":"\"horizontal\" | \"vertical\""},{"defaultValue":"false","description":"Prevents value changes while the radio buttons stay focusable and readable. When bound to a signal\nform field via `[formField]`, this is written by the `FormField` directive.","name":"readonly","type":"boolean"},{"defaultValue":"false","description":"Marks the group as required. When bound to a signal form field via `[formField]`, this is written by\nthe `FormField` directive.","name":"required","type":"boolean"},{"defaultValue":"false","description":"Marks the group as touched. Error styling needs both `invalid` and `touched`. When bound to a signal\nform field via `[formField]`, this is written by the `FormField` directive.","name":"touched","type":"boolean"},{"defaultValue":"undefined","description":"The `radioValue` of the selected radio button.","name":"value","twoWay":true,"type":"T"}],"methods":[{"description":"Moves focus to the selected radio button, or the first enabled one.","name":"focus","signature":"focus(options?: FocusOptions): void"}],"outputs":[{"description":"Emits when a radio button is selected and when focus leaves the group.","name":"touch","type":"void"}],"properties":[],"page":{"path":"radio-button","title":"Radio Button"}},{"description":"","kind":"directive","name":"RadioButtonDirective","selector":"input[type='radio'][monaRadioButton]","inputs":[{"defaultValue":"false","description":"Marks the radio button as invalid, triggering error border and ring styling.","name":"invalid","type":"boolean"},{"defaultValue":"\"full\"","description":"Sets the border radius of the radio button.","name":"rounded","type":"RadioButtonDirectiveProps[\"rounded\"]"},{"defaultValue":"false","description":"Marks the radio button as touched. Error styling is only shown when both `invalid` and `touched` are `true`.","name":"touched","type":"boolean"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"radio-button","title":"Radio Button"}},{"description":"","kind":"type","name":"RadioButtonDirectiveProps","signature":"type RadioButtonDirectiveProps = VariantProps<typeof radioButtonDirectiveThemeVariants>;","page":{"path":"radio-button","title":"Radio Button"},"usedBy":["RadioButtonDirective"]}]}
@@ -26,6 +26,7 @@ Component.
26
26
  | `label` | `string` | `""` | Text label displayed alongside the radio button. When provided, takes precedence over projected content. When empty, projected content inside `<mona-radio-button>` is used. When both are absent, name the radio button with `aria-label` or `aria-labelledby`. |
27
27
  | `labelPosition` | `"before" \| "after"` | `"after"` | Position of the label relative to the radio button circle. |
28
28
  | `labelSize` | `"large" \| "medium" \| "small"` | `"medium"` | Font size applied to the label text. |
29
+ | `monaRippleDisabled` | `boolean` | `false` | Turns the ripple off for this element while ripples are on. |
29
30
  | `name` | `string` | `""` | HTML `name` attribute forwarded to the native input. Radio buttons that share the same `name` form a mutually exclusive group in the browser. |
30
31
  | `radioValue` | `T` | `undefined` | The identity value of this radio button within a group. Compared against `value()` to determine whether this button is selected. When this button is chosen, its `radioValue` is written to the form as the new group value. A radio button without one can't be selected. |
31
32
  | `readonly` | `boolean` | `false` | Prevents value changes while the control stays focusable and readable. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
@@ -0,0 +1 @@
1
+ {"links":{"DEFAULT_RIPPLE_OPTIONS":"ripple","RIPPLE_OPTIONS":"ripple","RippleDirective":"ripple","RippleOptions":"ripple","provideRipple":"ripple"},"name":"ripple","pages":[],"symbols":[{"description":"Draws a ripple when the element is pressed: a wave in its text color that spreads from the pointer, stays while the\nelement is held and fades once it is let go. Mona UI's buttons and other pressable components apply it themselves.\nIt draws nothing until ripples are turned on with `provideRipple()`.\n\nThe wave covers the element's padding box, over its background and under its content. For that, the first press\ngives the element `isolation: isolate`, and makes it `relative` if its position is `static`. The wave spreads over\n`--mona-ripple-duration`, 450ms unless set, fades over `--mona-ripple-fade-duration`, 300ms unless set, and its\nopacity is `--mona-ripple-opacity`, 12% unless set.\n\nThere is no ripple on a disabled or `aria-disabled` element, with the system's reduced motion setting, or in forced\ncolors. Keyboard presses have none either: the focus indicator already shows where they act. Nor does a press on a\ncontrol inside the element, such as a button or a link, which belongs to that control, unless the element is the\n`<label>` of that control.","kind":"directive","name":"RippleDirective","selector":"[monaRipple]","inputs":[{"alias":"monaRippleDisabled","defaultValue":"false","description":"Turns the ripple off for this element while ripples are on.","name":"disabled","type":"boolean"}],"methods":[],"outputs":[],"properties":[]},{"description":"Turns on the ripple Mona UI's buttons, and elements with the `monaRipple` directive, draw when pressed. Pass\n`{ enabled: false }` to keep them off, for example behind a setting.","kind":"function","name":"provideRipple","signature":"function provideRipple(options: Partial<RippleOptions> = {}): EnvironmentProviders;"},{"description":"The settings used when nothing is provided with `provideRipple()`: no ripples.","kind":"constant","name":"DEFAULT_RIPPLE_OPTIONS","signature":"const DEFAULT_RIPPLE_OPTIONS: RippleOptions;"},{"description":"Ripple settings. Set them for the application with `provideRipple()`, or provide this token on a\ncomponent to turn ripples on or off for everything inside it.","kind":"constant","name":"RIPPLE_OPTIONS","signature":"const RIPPLE_OPTIONS: InjectionToken<RippleOptions>;"},{"description":"Ripple settings. Set them for the application with `provideRipple()`.","extends":[],"kind":"interface","methods":[],"name":"RippleOptions","properties":[{"description":"Whether pressing a button, or another element with the `monaRipple` directive, draws a ripple.\nRipples are off until `provideRipple()` turns them on.","name":"enabled","readonly":true,"type":"boolean"}],"usedBy":["DEFAULT_RIPPLE_OPTIONS","provideRipple","RIPPLE_OPTIONS"]}]}
@@ -0,0 +1,75 @@
1
+ # `@nanahoshi/mona-ui/ripple`
2
+
3
+ Everything `@nanahoshi/mona-ui/ripple` exports.
4
+
5
+ ## `RippleDirective`
6
+
7
+ Directive.
8
+
9
+ Draws a ripple when the element is pressed: a wave in its text color that spreads from the pointer, stays while the
10
+ element is held and fades once it is let go. Mona UI's buttons and other pressable components apply it themselves.
11
+ It draws nothing until ripples are turned on with `provideRipple()`.
12
+
13
+ The wave covers the element's padding box, over its background and under its content. For that, the first press
14
+ gives the element `isolation: isolate`, and makes it `relative` if its position is `static`. The wave spreads over
15
+ `--mona-ripple-duration`, 450ms unless set, fades over `--mona-ripple-fade-duration`, 300ms unless set, and its
16
+ opacity is `--mona-ripple-opacity`, 12% unless set.
17
+
18
+ There is no ripple on a disabled or `aria-disabled` element, with the system's reduced motion setting, or in forced
19
+ colors. Keyboard presses have none either: the focus indicator already shows where they act. Nor does a press on a
20
+ control inside the element, such as a button or a link, which belongs to that control, unless the element is the
21
+ `<label>` of that control.
22
+
23
+ **Selector:** `[monaRipple]`
24
+
25
+ ### Inputs
26
+
27
+ | Name | Type | Default | Description |
28
+ | --- | --- | --- | --- |
29
+ | `monaRippleDisabled` | `boolean` | `false` | Turns the ripple off for this element while ripples are on. |
30
+
31
+ ## `provideRipple`
32
+
33
+ Function.
34
+
35
+ Turns on the ripple Mona UI's buttons, and elements with the `monaRipple` directive, draw when pressed. Pass
36
+ `{ enabled: false }` to keep them off, for example behind a setting.
37
+
38
+ ```typescript
39
+ function provideRipple(options: Partial<RippleOptions> = {}): EnvironmentProviders;
40
+ ```
41
+
42
+ ## `DEFAULT_RIPPLE_OPTIONS`
43
+
44
+ Constant.
45
+
46
+ The settings used when nothing is provided with `provideRipple()`: no ripples.
47
+
48
+ ```typescript
49
+ const DEFAULT_RIPPLE_OPTIONS: RippleOptions;
50
+ ```
51
+
52
+ ## `RIPPLE_OPTIONS`
53
+
54
+ Constant.
55
+
56
+ Ripple settings. Set them for the application with `provideRipple()`, or provide this token on a
57
+ component to turn ripples on or off for everything inside it.
58
+
59
+ ```typescript
60
+ const RIPPLE_OPTIONS: InjectionToken<RippleOptions>;
61
+ ```
62
+
63
+ ## `RippleOptions`
64
+
65
+ Interface.
66
+
67
+ Ripple settings. Set them for the application with `provideRipple()`.
68
+
69
+ ### Properties
70
+
71
+ | Name | Type | Description |
72
+ | --- | --- | --- |
73
+ | `enabled` (read-only) | `boolean` | Whether pressing a button, or another element with the `monaRipple` directive, draws a ripple. Ripples are off until `provideRipple()` turns them on. |
74
+
75
+ **Used by:** [`DEFAULT_RIPPLE_OPTIONS`](ripple.md#default-ripple-options), [`provideRipple`](ripple.md#provideripple), [`RIPPLE_OPTIONS`](ripple.md#ripple-options)
@@ -1 +1 @@
1
- {"links":{"ClassInputType":"common","InjectSidebarOptions":"sidebar","LocalStorageSidebarStorage":"sidebar","MonaSidebarMessages":"i18n","SIDEBAR_DEFAULT_MESSAGES":"sidebar","SIDEBAR_STORAGE":"sidebar","SidebarCollapsibleMode":"sidebar","SidebarComponent":"sidebar","SidebarContentDirective":"sidebar","SidebarController":"sidebar","SidebarFooterDirective":"sidebar","SidebarGroupActionDirective":"sidebar","SidebarGroupContentDirective":"sidebar","SidebarGroupDirective":"sidebar","SidebarGroupHeaderDirective":"sidebar","SidebarGroupLabelDirective":"sidebar","SidebarHeaderDirective":"sidebar","SidebarInputDirective":"sidebar","SidebarInsetDirective":"sidebar","SidebarLayoutComponent":"sidebar","SidebarLogicalSide":"sidebar","SidebarMenuActionDirective":"sidebar","SidebarMenuBadgeDirective":"sidebar","SidebarMenuButtonDirective":"sidebar","SidebarMenuButtonSize":"sidebar","SidebarMenuDirective":"sidebar","SidebarMenuItemDirective":"sidebar","SidebarMenuSkeletonComponent":"sidebar","SidebarMenuSubDirective":"sidebar","SidebarModalScope":"sidebar","SidebarRailDirective":"sidebar","SidebarSeparatorDirective":"sidebar","SidebarSide":"sidebar","SidebarStorage":"sidebar","SidebarTriggerDirective":"sidebar","SidebarVariant":"sidebar","injectSidebar":"sidebar","provideSidebarStorage":"sidebar"},"name":"sidebar","pages":[{"path":"sidebar","title":"Sidebar"},{"path":"sidebar/menus","title":"Sidebar Menus"},{"path":"sidebar/state","title":"Sidebar State & Behavior"}],"symbols":[{"description":"The sidebar region itself. Content is projected in author order, so header, content and footer\nparts appear exactly where they are written.\n\nBelow the layout's `mobileBreakpoint` it presents as a modal overlay drawer: focus is trapped\ninside it while open, restored to whatever opened it on close, and everything outside it is made\ninert, as far as the layout's `modalScope` says. It is not a navigation landmark by itself — wrap\nthe menus in a labelled `nav`, or set `role` and `aria-label` if the whole region is navigation.","kind":"component","name":"SidebarComponent","selector":"mona-sidebar","inputs":[{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name for the sidebar region. Required when `role` is set, and used as the\ndrawer's name on compact viewports, which otherwise has a localized default.","name":"ariaLabel","type":"string"},{"alias":"aria-labelledby","defaultValue":"\"\"","description":"The id of the element that names the sidebar region, in place of `aria-label`. A docked sidebar with no\n`role` ignores it.","name":"ariaLabelledBy","type":"string"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"},{"defaultValue":"\"offcanvas\"","description":"How the sidebar behaves when collapsed. `\"icon\"` keeps a narrow rail of icons visible,\n`\"offcanvas\"` removes it from the layout entirely, and `\"none\"` disables collapsing altogether.","name":"collapsible","type":"SidebarCollapsibleMode"},{"defaultValue":"true","description":"Sets whether this sidebar is open. Supports two-way binding. While the viewport is\ncompact this reflects the drawer, so one binding drives both presentations, and it reads `false` on\na phone from the start. To remember the docked state, use `persistKey` rather than saving this.","name":"expanded","twoWay":true,"type":"boolean"},{"defaultValue":"\"3rem\"","description":"Width of the icon rail while collapsed. Only applies when `collapsible` is `\"icon\"`.\nNumbers are treated as pixels.","name":"iconWidth","type":"string | number"},{"defaultValue":"\"\"","description":"Id for the sidebar element, referenced by triggers through `aria-controls`. Supply a\nstable value when the markup is server rendered, so the client does not hydrate onto a different\ngenerated id. Falls back to a generated id.","name":"id","type":"string"},{"defaultValue":"\"18rem\"","description":"Width of the overlay drawer on compact viewports. Numbers are treated as pixels.","name":"mobileWidth","type":"string | number"},{"defaultValue":"\"\"","description":"Remembers whether this sidebar was left open, under this key. Unset means nothing is\nstored — no key, no storage written.\n\nOnly the docked state is kept. A drawer is never restored open: on the viewport that makes one,\nit would cover the page on load. A stored value wins over `expanded`, and is pushed back out\nthrough that binding, so do not set a key on a sidebar whose state is already restored elsewhere.\n\nWhere it is kept is `SIDEBAR_STORAGE`, which defaults to `localStorage`. A server-rendered\napplication cannot read that until hydration and so flashes the default first; supply storage the\nserver can read through `provideSidebarStorage()`.","name":"persistKey","type":"string"},{"defaultValue":"\"\"","description":"ARIA role for the sidebar region. Leave unset and wrap the menus in a labelled `nav`\nwhen the sidebar holds more than navigation; set `\"navigation\"` with an `aria-label` when it does\nnot. Ignored on compact viewports, where the drawer is a `dialog`.","name":"role","type":"string"},{"defaultValue":"\"start\"","description":"Which edge the sidebar sits on. Prefer `\"start\"` and `\"end\"`, which follow the\ndocument's writing direction; `\"left\"` and `\"right\"` are aliases of them.","name":"side","type":"SidebarSide"},{"defaultValue":"\"sidebar\"","description":"The visual treatment of the sidebar. `\"floating\"` detaches it from the edge on its own\nsurface, and `\"inset\"` moves that raised surface onto the region beside it instead.","name":"variant","type":"SidebarVariant"},{"defaultValue":"\"16rem\"","description":"Width of the sidebar while expanded. Numbers are treated as pixels.","name":"width","type":"string | number"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"Lays its children out in a row and owns what they share. Project one or more `mona-sidebar`\nelements and an element marked with `monaSidebarInset` into it. Each sidebar keeps its own open\nstate, on its own `[(expanded)]` binding, so a layout can hold a navigation column on one edge and\nan inspector on the other.\n\nBelow `mobileBreakpoint` sidebars present as overlay drawers instead of columns. A drawer has its\nown open state, so a sidebar collapsed on a desktop does not come back open on a phone, and it is\nreset whenever the viewport crosses the breakpoint. Only one drawer is open at a time: opening one\ncloses any other, and they share the single backdrop this layout paints behind them.","kind":"component","name":"SidebarLayoutComponent","selector":"mona-sidebar-layout","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"},{"defaultValue":"768","description":"Viewport width, in pixels, below which the sidebar presents as an overlay drawer.\nSet to `0` to keep the docked presentation at every size.","name":"mobileBreakpoint","type":"number"},{"defaultValue":"\"page\"","description":"How far an open drawer's modality reaches. `\"page\"` makes everything outside the drawer inert and\nlocks the page's scroll. Use `\"layout\"` for a sidebar embedded in part of a page: what's around the layout stays\nusable, so the drawer isn't `aria-modal`.","name":"modalScope","type":"SidebarModalScope"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A loading placeholder shaped like a menu item. Its label bar is clipped on the icon rail, where the\nreal labels are not visible either.","kind":"component","name":"SidebarMenuSkeletonComponent","selector":"mona-sidebar-menu-skeleton","inputs":[{"defaultValue":"\"60%\"","description":"Width of the label bar. Varying it across a list keeps the placeholder from looking\nlike a rigid grid. Numbers are treated as pixels.","name":"labelWidth","type":"string | number"},{"defaultValue":"true","description":"Renders a square standing in for the item's icon.","name":"showIcon","type":"boolean"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A row in a sidebar menu. Applies to a `button` for an action and to an `a` for a destination —\nan anchor keeps `href`, `routerLink`, middle-click, open-in-new-tab and the browser's own status\nbar preview, none of which a button can offer.\n\nOn a compact viewport, following a link closes the drawer, since the destination it navigates to is\nunderneath it. A row that opens a submenu leaves the drawer open, and on the icon rail it expands the\nsidebar, since that's the only place the submenu can open.","exportAs":"monaSidebarMenuButton","kind":"directive","name":"SidebarMenuButtonDirective","selector":"a[monaSidebarMenuButton], button[monaSidebarMenuButton]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"},{"defaultValue":"undefined","description":"Closes the overlay drawer after this row is activated. Only applies on compact\nviewports, where the drawer covers the destination being navigated to. Set to `false` for rows\nthat do not navigate. Leave it unset on a `monaCollapsibleTrigger`, which keeps the drawer open.","name":"closeOnSelect","type":"boolean | undefined"},{"defaultValue":"false","description":"Renders the row as unavailable and suppresses activation, including a `routerLink` and any `click`\nhandler on it. A disabled anchor gives up its `href`.","name":"disabled","type":"boolean"},{"defaultValue":"\"medium\"","description":"How much room this row's leading visual needs. Use `\"large\"` when it opens with\nsomething avatar sized, so the icon rail lets it fill the square instead of insetting and clipping it.","name":"size","type":"SidebarMenuButtonSize"},{"defaultValue":"\"\"","description":"Text identifying this item while the sidebar is collapsed to its icon rail, where the\nlabel is clipped away. Shown as a tooltip on hover and on keyboard focus, on the rail only.","name":"tooltip","type":"string"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"","kind":"directive","name":"SidebarMenuItemDirective","selector":"li[monaSidebarMenuItem]","inputs":[{"defaultValue":"false","description":"Marks this row as the current sidebar destination. The row owns the selected\nsurface so trailing badges and actions remain inside one continuous highlight.","name":"active","type":"boolean"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The region at the bottom of the sidebar, below its content. Holds what stays put while the content\nscrolls — a profile menu, a sign-out.","kind":"directive","name":"SidebarFooterDirective","selector":"[monaSidebarFooter]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"The region at the top of the sidebar, above its content. Holds what stays put while the content\nscrolls — a workspace switcher, a search box.","kind":"directive","name":"SidebarHeaderDirective","selector":"[monaSidebarHeader]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"Marks the main region beside the sidebar. Fills the remaining width and scrolls independently.\nTakes on the raised surface when the sidebar uses the `inset` variant.\n\nIt sits beside the sidebars rather than inside one, so it answers to the layout as a whole: it steps\nout of the way for whichever drawer is open, and where a layout holds more than one sidebar it takes\nits surface from the first one in author order.","kind":"directive","name":"SidebarInsetDirective","selector":"[monaSidebarInset]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A trailing count or status badge on a menu item. Stands down on the icon rail, where it would\ncrowd out the icon it belongs to.","kind":"directive","name":"SidebarMenuBadgeDirective","selector":"[monaSidebarMenuBadge]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"","kind":"directive","name":"SidebarMenuDirective","selector":"ul[monaSidebarMenu]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"An indented submenu inside a `monaSidebarMenuItem` that is also a `monaCollapsible`.\n\nIt carries no hiding of its own on the icon rail. `SidebarMenuItemDirective` closes the disclosure\nthere instead, which leaves the trigger's `aria-expanded` truthful and lets the collapsible content\ndirective apply its own `inert`. Hiding it here as well used to produce the opposite: a submenu the\ntrigger still described as expanded, with focusable items, that nobody could see.","kind":"directive","name":"SidebarMenuSubDirective","selector":"ul[monaSidebarMenuSub]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A thin strip along the sidebar's inner edge that toggles it. Place it inside `mona-sidebar`,\nwhich positions it. Hidden on narrow viewports, where the edge is too easy to hit by accident.\n\nDeliberately outside the tab order: it is a pointer shortcut for what `monaSidebarTrigger` already\ndoes, and a second tab stop onto a 4px strip would be noise for keyboard users. Provide a\n`monaSidebarTrigger` as well — the rail is not a substitute for it.","kind":"directive","name":"SidebarRailDirective","selector":"button[monaSidebarRail]","inputs":[{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name of the rail, which otherwise has a localized default.","name":"ariaLabel","type":"string"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A horizontal rule between sidebar regions. Tightens its inset on the icon rail.","kind":"directive","name":"SidebarSeparatorDirective","selector":"[monaSidebarSeparator]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"Toggles a sidebar. Can be placed anywhere inside a `mona-sidebar-layout`, including in the inset,\nand adds no styling of its own.\n\nBy default it drives the sidebar it is written inside. Set `for` to the id of a `mona-sidebar` to\ndrive that one instead, which is what a trigger in a shared header needs when the layout holds more\nthan one sidebar. A `for` that matches no sidebar leaves the trigger inert rather than throwing, so\na sidebar that has not rendered yet does not take the page down with it, and warns in development.\n\nA `button` is the right host and needs nothing further. On any other element the directive supplies\nthe rest of the button contract — `role`, a tab stop, and Enter/Space activation — so a `div`, a\n`span` or an `a` without `href` is still operable by keyboard rather than silently mouse-only.\n\nA sidebar that can't collapse has nothing for a trigger to do on a wide viewport, so the trigger\nreports itself as disabled there rather than as an open disclosure.","exportAs":"monaSidebarTrigger","kind":"directive","name":"SidebarTriggerDirective","selector":"[monaSidebarTrigger]","inputs":[{"defaultValue":"\"\"","description":"Id of the `mona-sidebar` to toggle. Leave unset to toggle the sidebar this trigger\nis written inside.","name":"for","type":"string"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"","kind":"directive","name":"SidebarContentDirective","selector":"[monaSidebarContent]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A control in the corner of a group header — an add or overflow button. Stands down on the icon\nrail, where there is no header row left to sit in. Give it an `aria-label`: it is icon-only.","kind":"directive","name":"SidebarGroupActionDirective","selector":"button[monaSidebarGroupAction]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The body of a `monaSidebarGroup`, below its header. Wraps the menu itself.","kind":"directive","name":"SidebarGroupContentDirective","selector":"[monaSidebarGroupContent]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A titled section of the sidebar, grouping a label and its menu. Stack as many as the sidebar\nneeds; each is an ordinary block, so a `monaSidebarSeparator` between them is optional. A\n`monaSidebarGroupLabel` inside it names the group.","kind":"directive","name":"SidebarGroupDirective","selector":"[monaSidebarGroup]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The row above a group's content, holding its label and any group action. Collapses to nothing on\nthe icon rail rather than leaving an empty gap where the label used to be.","kind":"directive","name":"SidebarGroupHeaderDirective","selector":"[monaSidebarGroupHeader]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The name of a group, which the enclosing `monaSidebarGroup` is labelled by. Fades out on the icon\nrail, where there is no width to read it in.","kind":"directive","name":"SidebarGroupLabelDirective","selector":"[monaSidebarGroupLabel]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A text input sized for the sidebar, composing `monaTextBox`. Stands down on the icon rail,\nwhere there is no room to type.","kind":"directive","name":"SidebarInputDirective","selector":"input[monaSidebarInput]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A trailing control on a menu item — an overflow menu, a pin. Sits inside the row's highlight and\nstands down on the icon rail. Give it an `aria-label`: it is icon-only.","kind":"directive","name":"SidebarMenuActionDirective","selector":"button[monaSidebarMenuAction]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The default `SidebarStorage`: `localStorage`, under the sidebar's `persistKey`.\n\nReads report `null` anywhere `localStorage` cannot answer, and writes are dropped there. That\ncovers the server, where there is no such thing, and a browser that refuses it — Safari's private\nmode throws on access rather than returning empty, and a full quota throws on write. None of that\nis worth taking an application down over: the sidebar simply opens the way its input says.\n\nA server-rendered application gets the default state in its markup and the remembered one on\nhydration, which shows as a flash. Storage that the server can read too — a cookie, or state\ntransferred from the request — avoids it; supply it through `provideSidebarStorage()`.","kind":"class","name":"LocalStorageSidebarStorage","inputs":[],"methods":[{"description":"","name":"read","signature":"read(key: string): boolean | null"},{"description":"","name":"write","signature":"write(key: string, expanded: boolean): void"}],"outputs":[],"properties":[],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"Reads a sidebar from an injection context: the one that encloses the caller, or from elsewhere in a\n`mona-sidebar-layout`, such as a toolbar in the inset, the layout's first sidebar. Name another one with `for`.\n\nReturns the sidebar's state and the commands that are safe to issue from anywhere — opening,\nclosing and toggling, each routed to whichever presentation is current. Structural facts such as\nthe side, variant and collapsible mode are readable but not settable; those are authored as inputs\non `mona-sidebar`, and writing them from a descendant would only desynchronise the two.\n\nIn a layout it follows the sidebar rather than holding it, because the caller may be created first. Until there is\none, it reads as closed and its commands do nothing.","kind":"function","name":"injectSidebar","signature":"function injectSidebar(options: InjectSidebarOptions & { optional: true }): SidebarController | null;\nfunction injectSidebar(options?: InjectSidebarOptions): SidebarController;","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"Replaces where sidebars remember whether they were left open. The default is `localStorage`, which\nthe server cannot read; supply a cookie- or request-backed storage here to have a server-rendered\napplication render the remembered state rather than correcting it on hydration.","kind":"function","name":"provideSidebarStorage","signature":"function provideSidebarStorage(storage: SidebarStorage | (() => SidebarStorage)): EnvironmentProviders;","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"","kind":"constant","name":"SIDEBAR_DEFAULT_MESSAGES","signature":"const SIDEBAR_DEFAULT_MESSAGES: MonaSidebarMessages;","page":{"path":"sidebar","title":"Sidebar"}},{"description":"Where sidebars given a `persistKey` remember whether they were left open. Defaults to\n`localStorage`. Replace it with `provideSidebarStorage()` — with something the server can read too,\nfor an application that renders there.","kind":"constant","name":"SIDEBAR_STORAGE","signature":"const SIDEBAR_STORAGE: InjectionToken<SidebarStorage>;","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"The safe, read-and-command view of one sidebar, returned by `injectSidebar()`.\n\nStructural facts — side, variant, collapsible mode — are readable but not settable. They are\nauthored as inputs on `mona-sidebar`, and letting a descendant write them would leave the service\nand the component disagreeing about the same sidebar, with the component winning on the next\nchange detection pass. Consumers who need them to change should bind the inputs.","extends":[],"kind":"interface","methods":[{"description":"Closes the sidebar. On a compact viewport this closes the drawer instead.","name":"collapse","signature":"collapse(): void"},{"description":"Opens the sidebar. On a compact viewport this opens the drawer instead.","name":"expand","signature":"expand(): void"},{"description":"Flips the sidebar between open and closed, on whichever presentation is current.","name":"toggle","signature":"toggle(): void"}],"name":"SidebarController","properties":[{"description":"How the sidebar behaves when collapsed, as authored on `mona-sidebar`.","name":"collapsible","readonly":true,"type":"Signal<SidebarCollapsibleMode>"},{"description":"Whether the viewport is narrow enough that the sidebar presents as an overlay drawer rather\nthan as a column in the layout.","name":"compact","readonly":true,"type":"Signal<boolean>"},{"description":"Whether the sidebar is showing at full width. On a compact viewport this reports the drawer's\nstate, so a single binding drives both presentations.","name":"expanded","readonly":true,"type":"Signal<boolean>"},{"description":"Whether the sidebar is currently reduced to its icon rail, meaning parts that only make sense\nat full width — labels, trailing actions, submenus — should step aside. Never true while\ncompact, where the drawer always presents at full width.","name":"iconOnly","readonly":true,"type":"Signal<boolean>"},{"description":"Whether the overlay drawer is open. Only meaningful while `compact` is true.","name":"mobileOpen","readonly":true,"type":"Signal<boolean>"},{"description":"Which edge the sidebar sits on, resolved to a direction-relative side.","name":"side","readonly":true,"type":"Signal<SidebarLogicalSide>"},{"description":"The id of the sidebar element, for `aria-controls` on a custom trigger.","name":"sidebarId","readonly":true,"type":"Signal<string>"},{"description":"The expanded state as a string, for `data-state` bindings and styling hooks.","name":"state","readonly":true,"type":"Signal<\"expanded\" | \"collapsed\">"},{"description":"The visual treatment of the sidebar, as authored on `mona-sidebar`.","name":"variant","readonly":true,"type":"Signal<SidebarVariant>"}],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["injectSidebar"]},{"description":"Where a sidebar remembers whether it was left open. Supplied through `SIDEBAR_STORAGE`, and only\never consulted for a sidebar that was given a `persistKey`.\n\nOnly the docked state is ever handed to it. A drawer on a compact viewport is deliberately never\npersisted: restoring one open would cover the page on load, in front of the content the reader\nasked for.","extends":[],"kind":"interface","methods":[{"description":"The remembered state for `key`, or `null` when nothing has been stored under it — including\nwhen this storage cannot answer, such as on the server. A `null` leaves the sidebar on whatever\nits `expanded` input says.","name":"read","signature":"read(key: string): boolean | null"},{"description":"Records the docked state for `key`. Failing to store it must not throw.","name":"write","signature":"write(key: string, expanded: boolean): void"}],"name":"SidebarStorage","properties":[],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["provideSidebarStorage","SIDEBAR_STORAGE"]},{"description":"","extends":[],"kind":"interface","methods":[],"name":"InjectSidebarOptions","properties":[{"description":"Reads the sidebar with this id in the enclosing layout, rather than the nearest one. Needs a layout.","name":"for","optional":true,"readonly":true,"type":"string"},{"description":"Returns `null` instead of throwing when there is no enclosing sidebar or layout.","name":"optional","optional":true,"readonly":true,"type":"boolean"}],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["injectSidebar"]},{"description":"How the sidebar behaves when it is collapsed.\n\n- `offcanvas` — the sidebar collapses to zero width and leaves the layout.\n- `icon` — the sidebar shrinks to a narrow rail that keeps icons visible.\n- `none` — the sidebar cannot be collapsed and stays at its full width.","kind":"type","name":"SidebarCollapsibleMode","signature":"type SidebarCollapsibleMode = \"offcanvas\" | \"icon\" | \"none\";","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["SidebarComponent","SidebarController"]},{"description":"The direction-relative side, once the `left`/`right` aliases have been folded in.","kind":"type","name":"SidebarLogicalSide","signature":"type SidebarLogicalSide = \"start\" | \"end\";","page":{"path":"sidebar","title":"Sidebar"},"usedBy":["SidebarController"]},{"description":"How much room the button's leading visual needs.\n\n- `medium` — sized for an icon, which the icon rail insets so it sits centred in the square.\n- `large` — sized for a full-height visual such as an avatar, which fills the rail square edge to\n edge, and which is given a taller row while the sidebar is expanded.","kind":"type","name":"SidebarMenuButtonSize","signature":"type SidebarMenuButtonSize = \"medium\" | \"large\";","page":{"path":"sidebar/menus","title":"Sidebar Menus"},"usedBy":["SidebarMenuButtonDirective"]},{"description":"How far an open drawer's modality reaches.\n- `\"page\"` makes everything outside the drawer inert and locks the page's scroll, and the drawer is `aria-modal`.\n- `\"layout\"` does that within `mona-sidebar-layout` only, for a sidebar embedded in part of a page. What's around the\n layout stays usable, so the drawer isn't `aria-modal`.","kind":"type","name":"SidebarModalScope","signature":"type SidebarModalScope = \"page\" | \"layout\";","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["SidebarLayoutComponent"]},{"description":"Which edge of the layout the sidebar sits on. Also determines its order within the layout\nand which side its rail and border are drawn on.\n\n`start` and `end` are the preferred values: they follow the document's writing direction, so a\n`start` sidebar sits on the left in LTR and on the right in RTL without the consumer branching.\n\n`left` and `right` are retained as aliases of `start` and `end`. They were always a poor\ndescription of the behaviour — the layout orders the sidebar with flexbox, which is\ndirection-relative, so `side=\"left\"` already rendered on the right under RTL.","kind":"type","name":"SidebarSide","signature":"type SidebarSide = \"start\" | \"end\" | \"left\" | \"right\";","page":{"path":"sidebar","title":"Sidebar"},"usedBy":["SidebarComponent"]},{"description":"The visual treatment of the sidebar region.\n\n- `sidebar` — flush against the edge of the layout, separated by a single border.\n- `floating` — detached from the edge, with its own rounded, bordered surface.\n- `inset` — the sidebar itself is plain, and the inset region beside it becomes the raised surface.","kind":"type","name":"SidebarVariant","signature":"type SidebarVariant = \"sidebar\" | \"floating\" | \"inset\";","page":{"path":"sidebar","title":"Sidebar"},"usedBy":["SidebarComponent","SidebarController"]}]}
1
+ {"links":{"ClassInputType":"common","InjectSidebarOptions":"sidebar","LocalStorageSidebarStorage":"sidebar","MonaSidebarMessages":"i18n","SIDEBAR_DEFAULT_MESSAGES":"sidebar","SIDEBAR_STORAGE":"sidebar","SidebarCollapsibleMode":"sidebar","SidebarComponent":"sidebar","SidebarContentDirective":"sidebar","SidebarController":"sidebar","SidebarFooterDirective":"sidebar","SidebarGroupActionDirective":"sidebar","SidebarGroupContentDirective":"sidebar","SidebarGroupDirective":"sidebar","SidebarGroupHeaderDirective":"sidebar","SidebarGroupLabelDirective":"sidebar","SidebarHeaderDirective":"sidebar","SidebarInputDirective":"sidebar","SidebarInsetDirective":"sidebar","SidebarLayoutComponent":"sidebar","SidebarLogicalSide":"sidebar","SidebarMenuActionDirective":"sidebar","SidebarMenuBadgeDirective":"sidebar","SidebarMenuButtonDirective":"sidebar","SidebarMenuButtonSize":"sidebar","SidebarMenuDirective":"sidebar","SidebarMenuItemDirective":"sidebar","SidebarMenuSkeletonComponent":"sidebar","SidebarMenuSubDirective":"sidebar","SidebarModalScope":"sidebar","SidebarRailDirective":"sidebar","SidebarSeparatorDirective":"sidebar","SidebarSide":"sidebar","SidebarStorage":"sidebar","SidebarTriggerDirective":"sidebar","SidebarVariant":"sidebar","injectSidebar":"sidebar","provideSidebarStorage":"sidebar"},"name":"sidebar","pages":[{"path":"sidebar","title":"Sidebar"},{"path":"sidebar/menus","title":"Sidebar Menus"},{"path":"sidebar/state","title":"Sidebar State & Behavior"}],"symbols":[{"description":"The sidebar region itself. Content is projected in author order, so header, content and footer\nparts appear exactly where they are written.\n\nBelow the layout's `mobileBreakpoint` it presents as a modal overlay drawer: focus is trapped\ninside it while open, restored to whatever opened it on close, and everything outside it is made\ninert, as far as the layout's `modalScope` says. It is not a navigation landmark by itself — wrap\nthe menus in a labelled `nav`, or set `role` and `aria-label` if the whole region is navigation.","kind":"component","name":"SidebarComponent","selector":"mona-sidebar","inputs":[{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name for the sidebar region. Required when `role` is set, and used as the\ndrawer's name on compact viewports, which otherwise has a localized default.","name":"ariaLabel","type":"string"},{"alias":"aria-labelledby","defaultValue":"\"\"","description":"The id of the element that names the sidebar region, in place of `aria-label`. A docked sidebar with no\n`role` ignores it.","name":"ariaLabelledBy","type":"string"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"},{"defaultValue":"\"offcanvas\"","description":"How the sidebar behaves when collapsed. `\"icon\"` keeps a narrow rail of icons visible,\n`\"offcanvas\"` removes it from the layout entirely, and `\"none\"` disables collapsing altogether.","name":"collapsible","type":"SidebarCollapsibleMode"},{"defaultValue":"true","description":"Sets whether this sidebar is open. Supports two-way binding. While the viewport is\ncompact this reflects the drawer, so one binding drives both presentations, and it reads `false` on\na phone from the start. To remember the docked state, use `persistKey` rather than saving this.","name":"expanded","twoWay":true,"type":"boolean"},{"defaultValue":"\"3rem\"","description":"Width of the icon rail while collapsed. Only applies when `collapsible` is `\"icon\"`.\nNumbers are treated as pixels.","name":"iconWidth","type":"string | number"},{"defaultValue":"\"\"","description":"Id for the sidebar element, referenced by triggers through `aria-controls`. Supply a\nstable value when the markup is server rendered, so the client does not hydrate onto a different\ngenerated id. Falls back to a generated id.","name":"id","type":"string"},{"defaultValue":"\"18rem\"","description":"Width of the overlay drawer on compact viewports. Numbers are treated as pixels.","name":"mobileWidth","type":"string | number"},{"defaultValue":"\"\"","description":"Remembers whether this sidebar was left open, under this key. Unset means nothing is\nstored — no key, no storage written.\n\nOnly the docked state is kept. A drawer is never restored open: on the viewport that makes one,\nit would cover the page on load. A stored value wins over `expanded`, and is pushed back out\nthrough that binding, so do not set a key on a sidebar whose state is already restored elsewhere.\n\nWhere it is kept is `SIDEBAR_STORAGE`, which defaults to `localStorage`. A server-rendered\napplication cannot read that until hydration and so flashes the default first; supply storage the\nserver can read through `provideSidebarStorage()`.","name":"persistKey","type":"string"},{"defaultValue":"\"\"","description":"ARIA role for the sidebar region. Leave unset and wrap the menus in a labelled `nav`\nwhen the sidebar holds more than navigation; set `\"navigation\"` with an `aria-label` when it does\nnot. Ignored on compact viewports, where the drawer is a `dialog`.","name":"role","type":"string"},{"defaultValue":"\"start\"","description":"Which edge the sidebar sits on. Prefer `\"start\"` and `\"end\"`, which follow the\ndocument's writing direction; `\"left\"` and `\"right\"` are aliases of them.","name":"side","type":"SidebarSide"},{"defaultValue":"\"sidebar\"","description":"The visual treatment of the sidebar. `\"floating\"` detaches it from the edge on its own\nsurface, and `\"inset\"` moves that raised surface onto the region beside it instead.","name":"variant","type":"SidebarVariant"},{"defaultValue":"\"16rem\"","description":"Width of the sidebar while expanded. Numbers are treated as pixels.","name":"width","type":"string | number"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"Lays its children out in a row and owns what they share. Project one or more `mona-sidebar`\nelements and an element marked with `monaSidebarInset` into it. Each sidebar keeps its own open\nstate, on its own `[(expanded)]` binding, so a layout can hold a navigation column on one edge and\nan inspector on the other.\n\nBelow `mobileBreakpoint` sidebars present as overlay drawers instead of columns. A drawer has its\nown open state, so a sidebar collapsed on a desktop does not come back open on a phone, and it is\nreset whenever the viewport crosses the breakpoint. Only one drawer is open at a time: opening one\ncloses any other, and they share the single backdrop this layout paints behind them.","kind":"component","name":"SidebarLayoutComponent","selector":"mona-sidebar-layout","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"},{"defaultValue":"768","description":"Viewport width, in pixels, below which the sidebar presents as an overlay drawer.\nSet to `0` to keep the docked presentation at every size.","name":"mobileBreakpoint","type":"number"},{"defaultValue":"\"page\"","description":"How far an open drawer's modality reaches. `\"page\"` makes everything outside the drawer inert and\nlocks the page's scroll. Use `\"layout\"` for a sidebar embedded in part of a page: what's around the layout stays\nusable, so the drawer isn't `aria-modal`.","name":"modalScope","type":"SidebarModalScope"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A loading placeholder shaped like a menu item. Its label bar is clipped on the icon rail, where the\nreal labels are not visible either.","kind":"component","name":"SidebarMenuSkeletonComponent","selector":"mona-sidebar-menu-skeleton","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`. Give it the\nsame height and padding as the menu buttons it stands in for when those are restyled, such as\n`h-7 px-2` for a denser menu, so the rows don't jump when the real ones arrive.","name":"userClass","type":"ClassInputType"},{"defaultValue":"\"60%\"","description":"Width of the label bar. Varying it across a list keeps the placeholder from looking\nlike a rigid grid. Numbers are treated as pixels.","name":"labelWidth","type":"string | number"},{"defaultValue":"true","description":"Renders a square standing in for the item's icon.","name":"showIcon","type":"boolean"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A row in a sidebar menu. Applies to a `button` for an action and to an `a` for a destination —\nan anchor keeps `href`, `routerLink`, middle-click, open-in-new-tab and the browser's own status\nbar preview, none of which a button can offer.\n\nOn a compact viewport, following a link closes the drawer, since the destination it navigates to is\nunderneath it. A row that opens a submenu leaves the drawer open, and on the icon rail it expands the\nsidebar, since that's the only place the submenu can open.","exportAs":"monaSidebarMenuButton","kind":"directive","name":"SidebarMenuButtonDirective","selector":"a[monaSidebarMenuButton], button[monaSidebarMenuButton]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"},{"defaultValue":"undefined","description":"Closes the overlay drawer after this row is activated. Only applies on compact\nviewports, where the drawer covers the destination being navigated to. Set to `false` for rows\nthat do not navigate. Leave it unset on a `monaCollapsibleTrigger`, which keeps the drawer open.","name":"closeOnSelect","type":"boolean | undefined"},{"defaultValue":"false","description":"Renders the row as unavailable and suppresses activation, including a `routerLink` and any `click`\nhandler on it. A disabled anchor gives up its `href`.","name":"disabled","type":"boolean"},{"defaultValue":"\"medium\"","description":"How much room this row's leading visual needs. Use `\"large\"` when it opens with\nsomething avatar sized, so the icon rail lets it fill the square instead of insetting and clipping it.","name":"size","type":"SidebarMenuButtonSize"},{"defaultValue":"\"\"","description":"Text identifying this item while the sidebar is collapsed to its icon rail, where the\nlabel is clipped away. Shown as a tooltip on hover and on keyboard focus, on the rail only.","name":"tooltip","type":"string"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"","kind":"directive","name":"SidebarMenuItemDirective","selector":"li[monaSidebarMenuItem]","inputs":[{"defaultValue":"false","description":"Marks this row as the current sidebar destination. The row owns the selected\nsurface so trailing badges and actions remain inside one continuous highlight.","name":"active","type":"boolean"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The region at the bottom of the sidebar, below its content. Holds what stays put while the content\nscrolls — a profile menu, a sign-out.","kind":"directive","name":"SidebarFooterDirective","selector":"[monaSidebarFooter]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"The region at the top of the sidebar, above its content. Holds what stays put while the content\nscrolls — a workspace switcher, a search box.","kind":"directive","name":"SidebarHeaderDirective","selector":"[monaSidebarHeader]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"Marks the main region beside the sidebar. Fills the remaining width and scrolls independently.\nTakes on the raised surface when the sidebar uses the `inset` variant.\n\nIt sits beside the sidebars rather than inside one, so it answers to the layout as a whole: it steps\nout of the way for whichever drawer is open, and where a layout holds more than one sidebar it takes\nits surface from the first one in author order.","kind":"directive","name":"SidebarInsetDirective","selector":"[monaSidebarInset]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A trailing count or status badge on a menu item. Stands down on the icon rail, where it would\ncrowd out the icon it belongs to.","kind":"directive","name":"SidebarMenuBadgeDirective","selector":"[monaSidebarMenuBadge]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"","kind":"directive","name":"SidebarMenuDirective","selector":"ul[monaSidebarMenu]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"An indented submenu inside a `monaSidebarMenuItem` that is also a `monaCollapsible`.\n\nIt carries no hiding of its own on the icon rail. `SidebarMenuItemDirective` closes the disclosure\nthere instead, which leaves the trigger's `aria-expanded` truthful and lets the collapsible content\ndirective apply its own `inert`. Hiding it here as well used to produce the opposite: a submenu the\ntrigger still described as expanded, with focusable items, that nobody could see.","kind":"directive","name":"SidebarMenuSubDirective","selector":"ul[monaSidebarMenuSub]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A thin strip along the sidebar's inner edge that toggles it. Place it inside `mona-sidebar`,\nwhich positions it. Hidden on narrow viewports, where the edge is too easy to hit by accident.\n\nDeliberately outside the tab order: it is a pointer shortcut for what `monaSidebarTrigger` already\ndoes, and a second tab stop onto a 4px strip would be noise for keyboard users. Provide a\n`monaSidebarTrigger` as well — the rail is not a substitute for it.","kind":"directive","name":"SidebarRailDirective","selector":"button[monaSidebarRail]","inputs":[{"alias":"aria-label","defaultValue":"\"\"","description":"Accessible name of the rail, which otherwise has a localized default.","name":"ariaLabel","type":"string"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A horizontal rule between sidebar regions. Tightens its inset on the icon rail.","kind":"directive","name":"SidebarSeparatorDirective","selector":"[monaSidebarSeparator]","inputs":[{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"ClassInputType"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"Toggles a sidebar. Can be placed anywhere inside a `mona-sidebar-layout`, including in the inset,\nand adds no styling of its own.\n\nBy default it drives the sidebar it is written inside. Set `for` to the id of a `mona-sidebar` to\ndrive that one instead, which is what a trigger in a shared header needs when the layout holds more\nthan one sidebar. A `for` that matches no sidebar leaves the trigger inert rather than throwing, so\na sidebar that has not rendered yet does not take the page down with it, and warns in development.\n\nA `button` is the right host and needs nothing further. On any other element the directive supplies\nthe rest of the button contract — `role`, a tab stop, and Enter/Space activation — so a `div`, a\n`span` or an `a` without `href` is still operable by keyboard rather than silently mouse-only.\n\nA sidebar that can't collapse has nothing for a trigger to do on a wide viewport, so the trigger\nreports itself as disabled there rather than as an open disclosure.","exportAs":"monaSidebarTrigger","kind":"directive","name":"SidebarTriggerDirective","selector":"[monaSidebarTrigger]","inputs":[{"defaultValue":"\"\"","description":"Id of the `mona-sidebar` to toggle. Leave unset to toggle the sidebar this trigger\nis written inside.","name":"for","type":"string"}],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"","kind":"directive","name":"SidebarContentDirective","selector":"[monaSidebarContent]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar","title":"Sidebar"}},{"description":"A control in the corner of a group header — an add or overflow button. Stands down on the icon\nrail, where there is no header row left to sit in. Give it an `aria-label`: it is icon-only.","kind":"directive","name":"SidebarGroupActionDirective","selector":"button[monaSidebarGroupAction]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The body of a `monaSidebarGroup`, below its header. Wraps the menu itself.","kind":"directive","name":"SidebarGroupContentDirective","selector":"[monaSidebarGroupContent]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A titled section of the sidebar, grouping a label and its menu. Stack as many as the sidebar\nneeds; each is an ordinary block, so a `monaSidebarSeparator` between them is optional. A\n`monaSidebarGroupLabel` inside it names the group.","kind":"directive","name":"SidebarGroupDirective","selector":"[monaSidebarGroup]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The row above a group's content, holding its label and any group action. Collapses to nothing on\nthe icon rail rather than leaving an empty gap where the label used to be.","kind":"directive","name":"SidebarGroupHeaderDirective","selector":"[monaSidebarGroupHeader]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The name of a group, which the enclosing `monaSidebarGroup` is labelled by. Fades out on the icon\nrail, where there is no width to read it in.","kind":"directive","name":"SidebarGroupLabelDirective","selector":"[monaSidebarGroupLabel]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A text input sized for the sidebar, composing `monaTextBox`. Stands down on the icon rail,\nwhere there is no room to type.","kind":"directive","name":"SidebarInputDirective","selector":"input[monaSidebarInput]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"A trailing control on a menu item — an overflow menu, a pin. Sits inside the row's highlight and\nstands down on the icon rail. Give it an `aria-label`: it is icon-only.","kind":"directive","name":"SidebarMenuActionDirective","selector":"button[monaSidebarMenuAction]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"sidebar/menus","title":"Sidebar Menus"}},{"description":"The default `SidebarStorage`: `localStorage`, under the sidebar's `persistKey`.\n\nReads report `null` anywhere `localStorage` cannot answer, and writes are dropped there. That\ncovers the server, where there is no such thing, and a browser that refuses it — Safari's private\nmode throws on access rather than returning empty, and a full quota throws on write. None of that\nis worth taking an application down over: the sidebar simply opens the way its input says.\n\nA server-rendered application gets the default state in its markup and the remembered one on\nhydration, which shows as a flash. Storage that the server can read too — a cookie, or state\ntransferred from the request — avoids it; supply it through `provideSidebarStorage()`.","kind":"class","name":"LocalStorageSidebarStorage","inputs":[],"methods":[{"description":"","name":"read","signature":"read(key: string): boolean | null"},{"description":"","name":"write","signature":"write(key: string, expanded: boolean): void"}],"outputs":[],"properties":[],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"Reads a sidebar from an injection context: the one that encloses the caller, or from elsewhere in a\n`mona-sidebar-layout`, such as a toolbar in the inset, the layout's first sidebar. Name another one with `for`.\n\nReturns the sidebar's state and the commands that are safe to issue from anywhere — opening,\nclosing and toggling, each routed to whichever presentation is current. Structural facts such as\nthe side, variant and collapsible mode are readable but not settable; those are authored as inputs\non `mona-sidebar`, and writing them from a descendant would only desynchronise the two.\n\nIn a layout it follows the sidebar rather than holding it, because the caller may be created first. Until there is\none, it reads as closed and its commands do nothing.","kind":"function","name":"injectSidebar","signature":"function injectSidebar(options: InjectSidebarOptions & { optional: true }): SidebarController | null;\nfunction injectSidebar(options?: InjectSidebarOptions): SidebarController;","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"Replaces where sidebars remember whether they were left open. The default is `localStorage`, which\nthe server cannot read; supply a cookie- or request-backed storage here to have a server-rendered\napplication render the remembered state rather than correcting it on hydration.","kind":"function","name":"provideSidebarStorage","signature":"function provideSidebarStorage(storage: SidebarStorage | (() => SidebarStorage)): EnvironmentProviders;","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"","kind":"constant","name":"SIDEBAR_DEFAULT_MESSAGES","signature":"const SIDEBAR_DEFAULT_MESSAGES: MonaSidebarMessages;","page":{"path":"sidebar","title":"Sidebar"}},{"description":"Where sidebars given a `persistKey` remember whether they were left open. Defaults to\n`localStorage`. Replace it with `provideSidebarStorage()` — with something the server can read too,\nfor an application that renders there.","kind":"constant","name":"SIDEBAR_STORAGE","signature":"const SIDEBAR_STORAGE: InjectionToken<SidebarStorage>;","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"}},{"description":"The safe, read-and-command view of one sidebar, returned by `injectSidebar()`.\n\nStructural facts — side, variant, collapsible mode — are readable but not settable. They are\nauthored as inputs on `mona-sidebar`, and letting a descendant write them would leave the service\nand the component disagreeing about the same sidebar, with the component winning on the next\nchange detection pass. Consumers who need them to change should bind the inputs.","extends":[],"kind":"interface","methods":[{"description":"Closes the sidebar. On a compact viewport this closes the drawer instead.","name":"collapse","signature":"collapse(): void"},{"description":"Opens the sidebar. On a compact viewport this opens the drawer instead.","name":"expand","signature":"expand(): void"},{"description":"Flips the sidebar between open and closed, on whichever presentation is current.","name":"toggle","signature":"toggle(): void"}],"name":"SidebarController","properties":[{"description":"How the sidebar behaves when collapsed, as authored on `mona-sidebar`.","name":"collapsible","readonly":true,"type":"Signal<SidebarCollapsibleMode>"},{"description":"Whether the viewport is narrow enough that the sidebar presents as an overlay drawer rather\nthan as a column in the layout.","name":"compact","readonly":true,"type":"Signal<boolean>"},{"description":"Whether the sidebar is showing at full width. On a compact viewport this reports the drawer's\nstate, so a single binding drives both presentations.","name":"expanded","readonly":true,"type":"Signal<boolean>"},{"description":"Whether the sidebar is currently reduced to its icon rail, meaning parts that only make sense\nat full width — labels, trailing actions, submenus — should step aside. Never true while\ncompact, where the drawer always presents at full width.","name":"iconOnly","readonly":true,"type":"Signal<boolean>"},{"description":"Whether the overlay drawer is open. Only meaningful while `compact` is true.","name":"mobileOpen","readonly":true,"type":"Signal<boolean>"},{"description":"Which edge the sidebar sits on, resolved to a direction-relative side.","name":"side","readonly":true,"type":"Signal<SidebarLogicalSide>"},{"description":"The id of the sidebar element, for `aria-controls` on a custom trigger.","name":"sidebarId","readonly":true,"type":"Signal<string>"},{"description":"The expanded state as a string, for `data-state` bindings and styling hooks.","name":"state","readonly":true,"type":"Signal<\"expanded\" | \"collapsed\">"},{"description":"The visual treatment of the sidebar, as authored on `mona-sidebar`.","name":"variant","readonly":true,"type":"Signal<SidebarVariant>"}],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["injectSidebar"]},{"description":"Where a sidebar remembers whether it was left open. Supplied through `SIDEBAR_STORAGE`, and only\never consulted for a sidebar that was given a `persistKey`.\n\nOnly the docked state is ever handed to it. A drawer on a compact viewport is deliberately never\npersisted: restoring one open would cover the page on load, in front of the content the reader\nasked for.","extends":[],"kind":"interface","methods":[{"description":"The remembered state for `key`, or `null` when nothing has been stored under it — including\nwhen this storage cannot answer, such as on the server. A `null` leaves the sidebar on whatever\nits `expanded` input says.","name":"read","signature":"read(key: string): boolean | null"},{"description":"Records the docked state for `key`. Failing to store it must not throw.","name":"write","signature":"write(key: string, expanded: boolean): void"}],"name":"SidebarStorage","properties":[],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["provideSidebarStorage","SIDEBAR_STORAGE"]},{"description":"","extends":[],"kind":"interface","methods":[],"name":"InjectSidebarOptions","properties":[{"description":"Reads the sidebar with this id in the enclosing layout, rather than the nearest one. Needs a layout.","name":"for","optional":true,"readonly":true,"type":"string"},{"description":"Returns `null` instead of throwing when there is no enclosing sidebar or layout.","name":"optional","optional":true,"readonly":true,"type":"boolean"}],"page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["injectSidebar"]},{"description":"How the sidebar behaves when it is collapsed.\n\n- `offcanvas` — the sidebar collapses to zero width and leaves the layout.\n- `icon` — the sidebar shrinks to a narrow rail that keeps icons visible.\n- `none` — the sidebar cannot be collapsed and stays at its full width.","kind":"type","name":"SidebarCollapsibleMode","signature":"type SidebarCollapsibleMode = \"offcanvas\" | \"icon\" | \"none\";","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["SidebarComponent","SidebarController"]},{"description":"The direction-relative side, once the `left`/`right` aliases have been folded in.","kind":"type","name":"SidebarLogicalSide","signature":"type SidebarLogicalSide = \"start\" | \"end\";","page":{"path":"sidebar","title":"Sidebar"},"usedBy":["SidebarController"]},{"description":"How much room the button's leading visual needs.\n\n- `medium` — sized for an icon, which the icon rail insets so it sits centred in the square.\n- `large` — sized for a full-height visual such as an avatar, which fills the rail square edge to\n edge, and which is given a taller row while the sidebar is expanded.","kind":"type","name":"SidebarMenuButtonSize","signature":"type SidebarMenuButtonSize = \"medium\" | \"large\";","page":{"path":"sidebar/menus","title":"Sidebar Menus"},"usedBy":["SidebarMenuButtonDirective"]},{"description":"How far an open drawer's modality reaches.\n- `\"page\"` makes everything outside the drawer inert and locks the page's scroll, and the drawer is `aria-modal`.\n- `\"layout\"` does that within `mona-sidebar-layout` only, for a sidebar embedded in part of a page. What's around the\n layout stays usable, so the drawer isn't `aria-modal`.","kind":"type","name":"SidebarModalScope","signature":"type SidebarModalScope = \"page\" | \"layout\";","page":{"path":"sidebar/state","title":"Sidebar State & Behavior"},"usedBy":["SidebarLayoutComponent"]},{"description":"Which edge of the layout the sidebar sits on. Also determines its order within the layout\nand which side its rail and border are drawn on.\n\n`start` and `end` are the preferred values: they follow the document's writing direction, so a\n`start` sidebar sits on the left in LTR and on the right in RTL without the consumer branching.\n\n`left` and `right` are retained as aliases of `start` and `end`. They were always a poor\ndescription of the behaviour — the layout orders the sidebar with flexbox, which is\ndirection-relative, so `side=\"left\"` already rendered on the right under RTL.","kind":"type","name":"SidebarSide","signature":"type SidebarSide = \"start\" | \"end\" | \"left\" | \"right\";","page":{"path":"sidebar","title":"Sidebar"},"usedBy":["SidebarComponent"]},{"description":"The visual treatment of the sidebar region.\n\n- `sidebar` — flush against the edge of the layout, separated by a single border.\n- `floating` — detached from the edge, with its own rounded, bordered surface.\n- `inset` — the sidebar itself is plain, and the inset region beside it becomes the raised surface.","kind":"type","name":"SidebarVariant","signature":"type SidebarVariant = \"sidebar\" | \"floating\" | \"inset\";","page":{"path":"sidebar","title":"Sidebar"},"usedBy":["SidebarComponent","SidebarController"]}]}
@@ -79,6 +79,7 @@ real labels are not visible either.
79
79
 
80
80
  | Name | Type | Default | Description |
81
81
  | --- | --- | --- | --- |
82
+ | `class` | `ClassInputType` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. Give it the same height and padding as the menu buttons it stands in for when those are restyled, such as `h-7 px-2` for a denser menu, so the rows don't jump when the real ones arrive. |
82
83
  | `labelWidth` | `string \| number` | `"60%"` | Width of the label bar. Varying it across a list keeps the placeholder from looking like a rigid grid. Numbers are treated as pixels. |
83
84
  | `showIcon` | `boolean` | `true` | Renders a square standing in for the item's icon. |
84
85
 
@@ -1 +1 @@
1
- {"links":{"SwitchComponent":"switch","SwitchHandleContentTemplateContext":"switch","SwitchHandleContentTemplateDirective":"switch","SwitchOffLabelTemplateDirective":"switch","SwitchOnLabelTemplateDirective":"switch"},"name":"switch","pages":[{"path":"switch","title":"Switch"}],"symbols":[{"description":"","implements":["FormCheckboxControl"],"kind":"component","name":"SwitchComponent","selector":"mona-switch","inputs":[{"alias":"aria-describedby","defaultValue":"\"\"","description":"Id of an element that describes the switch, such as a hint or an error message.","name":"ariaDescribedBy","type":"string"},{"alias":"aria-label","defaultValue":"null","description":"Accessible name for the host element. Describe what the component represents.\nWhen empty, assistive technology announces the role without a label.","name":"ariaLabel","type":"string | null"},{"alias":"aria-labelledby","defaultValue":"null","description":"ID of an external element that provides the accessible name for the host element.","name":"ariaLabelledBy","type":"string | null"},{"defaultValue":"false","description":"Whether the control is checked.","name":"checked","twoWay":true,"type":"boolean"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"string"},{"defaultValue":"false","description":"Renders the component with reduced visual emphasis and removes pointer interaction.","name":"disabled","type":"boolean"},{"defaultValue":"false","description":"Marks the switch as invalid. When bound to a signal form field via `[formField]`, this is written by\nthe `FormField` directive.","name":"invalid","type":"boolean"},{"defaultValue":"\"\"","description":"Label displayed inside the switch track when it is in the off state.","name":"offLabel","type":"string"},{"defaultValue":"\"\"","description":"Label displayed inside the switch track when it is in the on state.","name":"onLabel","type":"string"},{"defaultValue":"false","description":"Prevents value changes while the control stays focusable and readable. When bound to a signal form\nfield via `[formField]`, this is written by the `FormField` directive.","name":"readonly","type":"boolean"},{"defaultValue":"false","description":"Marks the switch as required for form validation.","name":"required","type":"boolean"},{"defaultValue":"\"full\"","description":"Border-radius preset applied to the component.","name":"rounded","type":"\"full\" | \"large\" | \"medium\" | \"none\" | \"small\""},{"defaultValue":"\"medium\"","description":"Size preset controlling the component's dimensions.","name":"size","type":"\"large\" | \"medium\" | \"small\""},{"defaultValue":"0","description":"Tab index of the switch while it's enabled.","name":"tabindex","type":"string | number"},{"defaultValue":"false","description":"Marks the switch as touched. When bound to a signal form field via `[formField]`, this is written by\nthe `FormField` directive.","name":"touched","type":"boolean"}],"methods":[{"description":"Moves focus to the switch.","name":"focus","signature":"focus(options?: FocusOptions): void"}],"outputs":[{"description":"Emitted when the switch loses focus or its value changes.","name":"touch","type":"void"}],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","kind":"directive","name":"SwitchHandleContentTemplateDirective","selector":"ng-template[monaSwitchHandleContentTemplate]","templateContext":{"members":[{"description":"","name":"$implicit","type":"boolean"}],"type":"SwitchHandleContentTemplateContext"},"inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","kind":"directive","name":"SwitchOffLabelTemplateDirective","selector":"ng-template[monaSwitchOffLabelTemplate]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","kind":"directive","name":"SwitchOnLabelTemplateDirective","selector":"ng-template[monaSwitchOnLabelTemplate]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","extends":[],"kind":"interface","methods":[],"name":"SwitchHandleContentTemplateContext","properties":[{"description":"","name":"$implicit","readonly":true,"type":"boolean"}],"page":{"path":"switch","title":"Switch"}}]}
1
+ {"links":{"SwitchComponent":"switch","SwitchHandleContentTemplateContext":"switch","SwitchHandleContentTemplateDirective":"switch","SwitchOffLabelTemplateDirective":"switch","SwitchOnLabelTemplateDirective":"switch"},"name":"switch","pages":[{"path":"switch","title":"Switch"}],"symbols":[{"description":"","implements":["FormCheckboxControl"],"kind":"component","name":"SwitchComponent","selector":"mona-switch","inputs":[{"alias":"aria-describedby","defaultValue":"\"\"","description":"Id of an element that describes the switch, such as a hint or an error message.","name":"ariaDescribedBy","type":"string"},{"alias":"aria-label","defaultValue":"null","description":"Accessible name for the host element. Describe what the component represents.\nWhen empty, assistive technology announces the role without a label.","name":"ariaLabel","type":"string | null"},{"alias":"aria-labelledby","defaultValue":"null","description":"ID of an external element that provides the accessible name for the host element.","name":"ariaLabelledBy","type":"string | null"},{"defaultValue":"false","description":"Whether the control is checked.","name":"checked","twoWay":true,"type":"boolean"},{"alias":"class","defaultValue":"\"\"","description":"Additional CSS classes merged onto the host element via `tailwind-merge`.","name":"userClass","type":"string"},{"defaultValue":"false","description":"Renders the component with reduced visual emphasis and removes pointer interaction.","name":"disabled","type":"boolean"},{"defaultValue":"false","description":"Marks the switch as invalid. When bound to a signal form field via `[formField]`, this is written by\nthe `FormField` directive.","name":"invalid","type":"boolean"},{"defaultValue":"false","description":"Turns the ripple off for this element while ripples are on.","name":"monaRippleDisabled","type":"boolean"},{"defaultValue":"\"\"","description":"Label displayed inside the switch track when it is in the off state.","name":"offLabel","type":"string"},{"defaultValue":"\"\"","description":"Label displayed inside the switch track when it is in the on state.","name":"onLabel","type":"string"},{"defaultValue":"false","description":"Prevents value changes while the control stays focusable and readable. When bound to a signal form\nfield via `[formField]`, this is written by the `FormField` directive.","name":"readonly","type":"boolean"},{"defaultValue":"false","description":"Marks the switch as required for form validation.","name":"required","type":"boolean"},{"defaultValue":"\"full\"","description":"Border-radius preset applied to the component.","name":"rounded","type":"\"full\" | \"large\" | \"medium\" | \"none\" | \"small\""},{"defaultValue":"\"medium\"","description":"Size preset controlling the component's dimensions.","name":"size","type":"\"large\" | \"medium\" | \"small\""},{"defaultValue":"0","description":"Tab index of the switch while it's enabled.","name":"tabindex","type":"string | number"},{"defaultValue":"false","description":"Marks the switch as touched. When bound to a signal form field via `[formField]`, this is written by\nthe `FormField` directive.","name":"touched","type":"boolean"}],"methods":[{"description":"Moves focus to the switch.","name":"focus","signature":"focus(options?: FocusOptions): void"}],"outputs":[{"description":"Emitted when the switch loses focus or its value changes.","name":"touch","type":"void"}],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","kind":"directive","name":"SwitchHandleContentTemplateDirective","selector":"ng-template[monaSwitchHandleContentTemplate]","templateContext":{"members":[{"description":"","name":"$implicit","type":"boolean"}],"type":"SwitchHandleContentTemplateContext"},"inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","kind":"directive","name":"SwitchOffLabelTemplateDirective","selector":"ng-template[monaSwitchOffLabelTemplate]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","kind":"directive","name":"SwitchOnLabelTemplateDirective","selector":"ng-template[monaSwitchOnLabelTemplate]","inputs":[],"methods":[],"outputs":[],"properties":[],"page":{"path":"switch","title":"Switch"}},{"description":"","extends":[],"kind":"interface","methods":[],"name":"SwitchHandleContentTemplateContext","properties":[{"description":"","name":"$implicit","readonly":true,"type":"boolean"}],"page":{"path":"switch","title":"Switch"}}]}
@@ -22,6 +22,7 @@ Component.
22
22
  | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
23
23
  | `disabled` | `boolean` | `false` | Renders the component with reduced visual emphasis and removes pointer interaction. |
24
24
  | `invalid` | `boolean` | `false` | Marks the switch as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
25
+ | `monaRippleDisabled` | `boolean` | `false` | Turns the ripple off for this element while ripples are on. |
25
26
  | `offLabel` | `string` | `""` | Label displayed inside the switch track when it is in the off state. |
26
27
  | `onLabel` | `string` | `""` | Label displayed inside the switch track when it is in the on state. |
27
28
  | `readonly` | `boolean` | `false` | Prevents value changes while the control stays focusable and readable. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |