@trimble-oss/moduswebcomponents-mcp 1.0.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 (108) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +337 -0
  3. package/package.json +39 -0
  4. package/versions/1.0.0/component-docs/_all_components.json +56 -0
  5. package/versions/1.0.0/component-docs/modus-wc-autocomplete.json +415 -0
  6. package/versions/1.0.0/component-docs/modus-wc-date.json +227 -0
  7. package/versions/1.0.0/component-docs/modus-wc-dropdown-menu.json +164 -0
  8. package/versions/1.0.0/component-docs/modus-wc-logo.json +61 -0
  9. package/versions/1.0.0/component-docs/modus-wc-menu-item.json +165 -0
  10. package/versions/1.0.0/component-docs/modus-wc-menu.json +106 -0
  11. package/versions/1.0.0/component-docs/modus-wc-navbar.json +290 -0
  12. package/versions/1.0.0/component-docs/modus-wc-profile-menu.json +64 -0
  13. package/versions/1.0.0/component-docs/modus-wc-side-navigation.json +102 -0
  14. package/versions/1.0.0/component-docs/modus-wc-table.json +202 -0
  15. package/versions/1.0.0/component-docs/modus-wc-tooltip.json +94 -0
  16. package/versions/1.0.0/component-docs/modus-wc-typography.json +78 -0
  17. package/versions/1.0.0/docs/_all_docs.json +15 -0
  18. package/versions/1.0.0/docs/angular.mdx +374 -0
  19. package/versions/1.0.0/docs/getting-started.mdx +131 -0
  20. package/versions/1.0.7/component-docs/_all_components.json +55 -0
  21. package/versions/1.0.7/component-docs/modus-wc-autocomplete.json +405 -0
  22. package/versions/1.0.7/component-docs/modus-wc-table.json +202 -0
  23. package/versions/1.0.7/component-docs/modus-wc-tooltip.json +94 -0
  24. package/versions/1.0.7/docs/_all_docs.json +15 -0
  25. package/versions/1.0.7/docs/angular.mdx +374 -0
  26. package/versions/1.1.0/component-docs/_all_components.json +56 -0
  27. package/versions/1.1.0/component-docs/modus-wc-autocomplete.json +405 -0
  28. package/versions/1.1.0/component-docs/modus-wc-navbar.json +290 -0
  29. package/versions/1.1.0/component-docs/modus-wc-profile-menu.json +64 -0
  30. package/versions/1.1.0/component-docs/modus-wc-side-navigation.json +102 -0
  31. package/versions/1.1.0/component-docs/modus-wc-table.json +202 -0
  32. package/versions/1.1.0/component-docs/modus-wc-tooltip.json +94 -0
  33. package/versions/1.1.0/component-docs/modus-wc-typography.json +78 -0
  34. package/versions/1.1.0/docs/_all_docs.json +15 -0
  35. package/versions/1.1.0/docs/angular.mdx +374 -0
  36. package/versions/1.1.0/docs/getting-started.mdx +131 -0
  37. package/versions/1.1.1/component-docs/_all_components.json +56 -0
  38. package/versions/1.1.1/component-docs/modus-wc-autocomplete.json +405 -0
  39. package/versions/1.1.1/component-docs/modus-wc-navbar.json +290 -0
  40. package/versions/1.1.1/component-docs/modus-wc-profile-menu.json +64 -0
  41. package/versions/1.1.1/component-docs/modus-wc-side-navigation.json +102 -0
  42. package/versions/1.1.1/component-docs/modus-wc-table.json +202 -0
  43. package/versions/1.1.1/component-docs/modus-wc-tooltip.json +94 -0
  44. package/versions/1.1.1/component-docs/modus-wc-typography.json +78 -0
  45. package/versions/1.1.1/docs/_all_docs.json +15 -0
  46. package/versions/1.1.1/docs/angular.mdx +374 -0
  47. package/versions/1.1.1/docs/getting-started.mdx +131 -0
  48. package/versions/base/component-docs/_all_components.json +55 -0
  49. package/versions/base/component-docs/modus-wc-accordion.json +48 -0
  50. package/versions/base/component-docs/modus-wc-alert.json +112 -0
  51. package/versions/base/component-docs/modus-wc-autocomplete.json +397 -0
  52. package/versions/base/component-docs/modus-wc-avatar.json +83 -0
  53. package/versions/base/component-docs/modus-wc-badge.json +68 -0
  54. package/versions/base/component-docs/modus-wc-breadcrumbs.json +63 -0
  55. package/versions/base/component-docs/modus-wc-button-group.json +100 -0
  56. package/versions/base/component-docs/modus-wc-button.json +130 -0
  57. package/versions/base/component-docs/modus-wc-card.json +98 -0
  58. package/versions/base/component-docs/modus-wc-checkbox.json +149 -0
  59. package/versions/base/component-docs/modus-wc-chip.json +132 -0
  60. package/versions/base/component-docs/modus-wc-collapse.json +90 -0
  61. package/versions/base/component-docs/modus-wc-date.json +227 -0
  62. package/versions/base/component-docs/modus-wc-divider.json +85 -0
  63. package/versions/base/component-docs/modus-wc-dropdown-menu.json +154 -0
  64. package/versions/base/component-docs/modus-wc-file-dropzone.json +155 -0
  65. package/versions/base/component-docs/modus-wc-handle.json +135 -0
  66. package/versions/base/component-docs/modus-wc-icon.json +722 -0
  67. package/versions/base/component-docs/modus-wc-input-feedback.json +71 -0
  68. package/versions/base/component-docs/modus-wc-input-label.json +84 -0
  69. package/versions/base/component-docs/modus-wc-loader.json +65 -0
  70. package/versions/base/component-docs/modus-wc-logo.json +61 -0
  71. package/versions/base/component-docs/modus-wc-menu-item.json +173 -0
  72. package/versions/base/component-docs/modus-wc-menu.json +86 -0
  73. package/versions/base/component-docs/modus-wc-modal.json +108 -0
  74. package/versions/base/component-docs/modus-wc-navbar.json +280 -0
  75. package/versions/base/component-docs/modus-wc-number-input.json +219 -0
  76. package/versions/base/component-docs/modus-wc-pagination.json +103 -0
  77. package/versions/base/component-docs/modus-wc-panel.json +76 -0
  78. package/versions/base/component-docs/modus-wc-progress.json +86 -0
  79. package/versions/base/component-docs/modus-wc-radio.json +139 -0
  80. package/versions/base/component-docs/modus-wc-rating.json +117 -0
  81. package/versions/base/component-docs/modus-wc-select.json +159 -0
  82. package/versions/base/component-docs/modus-wc-side-navigation.json +102 -0
  83. package/versions/base/component-docs/modus-wc-skeleton.json +65 -0
  84. package/versions/base/component-docs/modus-wc-slider.json +163 -0
  85. package/versions/base/component-docs/modus-wc-stepper.json +47 -0
  86. package/versions/base/component-docs/modus-wc-switch.json +149 -0
  87. package/versions/base/component-docs/modus-wc-table.json +202 -0
  88. package/versions/base/component-docs/modus-wc-tabs.json +86 -0
  89. package/versions/base/component-docs/modus-wc-text-input.json +278 -0
  90. package/versions/base/component-docs/modus-wc-textarea.json +215 -0
  91. package/versions/base/component-docs/modus-wc-theme-switcher.json +49 -0
  92. package/versions/base/component-docs/modus-wc-time-input.json +211 -0
  93. package/versions/base/component-docs/modus-wc-toast.json +56 -0
  94. package/versions/base/component-docs/modus-wc-toolbar.json +44 -0
  95. package/versions/base/component-docs/modus-wc-tooltip.json +94 -0
  96. package/versions/base/component-docs/modus-wc-typography.json +73 -0
  97. package/versions/base/component-docs/modus-wc-utility-panel.json +86 -0
  98. package/versions/base/docs/_all_docs.json +15 -0
  99. package/versions/base/docs/accessibility.mdx +32 -0
  100. package/versions/base/docs/angular.mdx +346 -0
  101. package/versions/base/docs/form-inputs.mdx +86 -0
  102. package/versions/base/docs/getting-started.mdx +91 -0
  103. package/versions/base/docs/modus-figma-mcp-integration-guide.mdx +254 -0
  104. package/versions/base/docs/modus-icon-usage.mdx +210 -0
  105. package/versions/base/docs/react.mdx +129 -0
  106. package/versions/base/docs/styling.mdx +107 -0
  107. package/versions/base/docs/testing.mdx +18 -0
  108. package/versions/base/docs/vue.mdx +159 -0
@@ -0,0 +1,211 @@
1
+ {
2
+ "description": "A customizable input component used to create time inputs.",
3
+ "properties": [
4
+ {
5
+ "name": "autoComplete",
6
+ "type": "'on' | 'off'",
7
+ "description": "Hint for form autofill feature.",
8
+ "default": null,
9
+ "mutable": false,
10
+ "end_line": 30
11
+ },
12
+ {
13
+ "name": "bordered",
14
+ "type": "boolean",
15
+ "description": "Indicates that the input should have a border.",
16
+ "default": "true",
17
+ "mutable": false,
18
+ "end_line": 33
19
+ },
20
+ {
21
+ "name": "customClass",
22
+ "type": "string",
23
+ "description": "Custom CSS class to apply to the input.",
24
+ "default": "''",
25
+ "mutable": false,
26
+ "end_line": 36
27
+ },
28
+ {
29
+ "name": "datalistOptions",
30
+ "type": "string[]",
31
+ "description": "The options to display in the time input dropdown. Options must be in `HH:mm` or `HH:mm:ss` format.",
32
+ "default": "[]",
33
+ "mutable": false,
34
+ "end_line": 39
35
+ },
36
+ {
37
+ "name": "disabled",
38
+ "type": "boolean",
39
+ "description": "Whether the form control is disabled.",
40
+ "default": "false",
41
+ "mutable": false,
42
+ "end_line": 42
43
+ },
44
+ {
45
+ "name": "feedback",
46
+ "type": "IInputFeedbackProp",
47
+ "description": "Feedback to render below the input.",
48
+ "default": null,
49
+ "mutable": false,
50
+ "end_line": 45
51
+ },
52
+ {
53
+ "name": "inputId",
54
+ "type": "string",
55
+ "description": "The ID of the input element.",
56
+ "default": null,
57
+ "mutable": false,
58
+ "end_line": 48
59
+ },
60
+ {
61
+ "name": "inputTabIndex",
62
+ "type": "number",
63
+ "description": "Determine the control's relative ordering for sequential focus navigation (typically with the Tab key).",
64
+ "default": null,
65
+ "mutable": false,
66
+ "end_line": 51
67
+ },
68
+ {
69
+ "name": "datalistId",
70
+ "type": "string",
71
+ "description": "ID of a `<datalist>` element that contains pre-defined time options. The value must be the ID of a `<datalist>` element in the same document.",
72
+ "default": null,
73
+ "mutable": true,
74
+ "end_line": 57
75
+ },
76
+ {
77
+ "name": "label",
78
+ "type": "string",
79
+ "description": "The text to display within the label.",
80
+ "default": null,
81
+ "mutable": false,
82
+ "end_line": 60
83
+ },
84
+ {
85
+ "name": "max",
86
+ "type": "string",
87
+ "description": "Maximum value. Format: `HH:mm`, `HH:mm:ss`.",
88
+ "default": null,
89
+ "mutable": false,
90
+ "end_line": 63
91
+ },
92
+ {
93
+ "name": "min",
94
+ "type": "string",
95
+ "description": "Minimum value. Format: `HH:mm`, `HH:mm:ss.`",
96
+ "default": null,
97
+ "mutable": false,
98
+ "end_line": 66
99
+ },
100
+ {
101
+ "name": "name",
102
+ "type": "string",
103
+ "description": "Name of the form control. Submitted with the form as part of a name/value pair.",
104
+ "default": null,
105
+ "mutable": false,
106
+ "end_line": 69
107
+ },
108
+ {
109
+ "name": "readOnly",
110
+ "type": "boolean",
111
+ "description": "Whether the value is editable.",
112
+ "default": "false",
113
+ "mutable": false,
114
+ "end_line": 72
115
+ },
116
+ {
117
+ "name": "required",
118
+ "type": "boolean",
119
+ "description": "A value is required for the form to be submittable.",
120
+ "default": "false",
121
+ "mutable": false,
122
+ "end_line": 75
123
+ },
124
+ {
125
+ "name": "showSeconds",
126
+ "type": "boolean",
127
+ "description": "Displays the time input format as `HH:mm:ss` if `true`. Internally sets the `step` to 1 second. If a `step` value is provided, it will override this attribute.",
128
+ "default": "false",
129
+ "mutable": false,
130
+ "end_line": 82
131
+ },
132
+ {
133
+ "name": "size",
134
+ "type": "ModusSize",
135
+ "description": "The size of the input.",
136
+ "default": "'md'",
137
+ "mutable": false,
138
+ "end_line": 85
139
+ },
140
+ {
141
+ "name": "step",
142
+ "type": "number",
143
+ "description": "Specifies the granularity that the `value` must adhere to. Value of step given in seconds. Default value is 60 seconds. Overrides the `seconds` attribute if both are provided.",
144
+ "default": null,
145
+ "mutable": false,
146
+ "end_line": 92
147
+ },
148
+ {
149
+ "name": "value",
150
+ "type": "string",
151
+ "description": "The value of the time input. Always in 24-hour format that includes leading zeros: `HH:mm` or `HH:mm:ss`, regardless of input format which is likely to be selected based on user's locale (or by the user agent). If time includes seconds the format is always `HH:mm:ss`.",
152
+ "default": "''",
153
+ "mutable": true,
154
+ "end_line": 101
155
+ }
156
+ ],
157
+ "events": [
158
+ {
159
+ "name": "inputBlur",
160
+ "detail": "FocusEvent",
161
+ "description": "Event emitted when the input loses focus.",
162
+ "end_line": 104
163
+ },
164
+ {
165
+ "name": "inputChange",
166
+ "detail": "Event",
167
+ "description": "Event emitted when the input value changes.",
168
+ "end_line": 107
169
+ },
170
+ {
171
+ "name": "inputFocus",
172
+ "detail": "FocusEvent",
173
+ "description": "Event emitted when the input gains focus.",
174
+ "end_line": 110
175
+ }
176
+ ],
177
+ "methods": [],
178
+ "slots": [],
179
+ "examples": {
180
+ "basic": "<modus-wc-time-input\n aria-label=\"Example time input\"\n datalist-id=\"datalist-id-1\"\n></modus-wc-time-input>\n<datalist id=\"datalist-id-1\">\n <option value=\"06:00\"></option>\n <option value=\"12:00\"></option>\n <option value=\"17:00\"></option>\n</datalist>",
181
+ "variations": [],
182
+ "args": {
183
+ "disabled": "false",
184
+ "label": "'Label'",
185
+ "size": "'md'"
186
+ },
187
+ "argTypes": {},
188
+ "usage": [],
189
+ "events": [
190
+ "inputBlur",
191
+ "inputChange",
192
+ "inputFocus"
193
+ ]
194
+ },
195
+ "tag": "modus-wc-time-input",
196
+ "storyExample": {
197
+ "template": "<modus-wc-time-input\n aria-label=\"Example time input\"\n datalist-id=\"datalist-id-1\"\n></modus-wc-time-input>\n<datalist id=\"datalist-id-1\">\n <option value=\"06:00\"></option>\n <option value=\"12:00\"></option>\n <option value=\"17:00\"></option>\n</datalist>",
198
+ "args": {
199
+ "disabled": "false",
200
+ "label": "'Label'",
201
+ "size": "'md'"
202
+ },
203
+ "argTypes": {},
204
+ "events": [
205
+ "inputBlur",
206
+ "inputChange",
207
+ "inputFocus"
208
+ ],
209
+ "fullContent": "import { withActions } from '@storybook/addon-actions/decorator';\nimport { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createShadowHostClass } from '../../providers/shadow-dom/shadow-host-helper';\nimport { IInputFeedbackProp, ModusSize } from '../types';\n\n// const timeOptions = ['08:00', '12:00', '17:00'];\n\ninterface TimeInputArgs {\n 'auto-complete'?: 'on' | 'off';\n bordered?: boolean;\n 'custom-class'?: string;\n 'datalist-id'?: string;\n 'datalist-options'?: string[];\n disabled?: boolean;\n feedback?: IInputFeedbackProp;\n 'input-id'?: string;\n 'input-tab-index'?: number;\n label?: string;\n max?: string;\n min?: string;\n name?: string;\n 'read-only'?: boolean;\n required?: boolean;\n 'show-seconds'?: boolean;\n size?: ModusSize;\n step?: number;\n value: string;\n}\n\nconst meta: Meta<TimeInputArgs> = {\n title: 'Components/Forms/Time Input',\n component: 'modus-wc-time-input',\n args: {\n disabled: false,\n label: 'Label',\n size: 'md',\n },\n argTypes: {\n 'auto-complete': {\n control: { type: 'select' },\n options: ['on', 'off'],\n },\n feedback: {\n description: 'Feedback prop for input components',\n table: {\n type: {\n detail: `\n Interface: IInputFeedbackProp\n Properties:\n - level ('error' | 'info' | 'success' | 'warning'): The feedback level\n - message (string, optional): The feedback message\n `,\n },\n },\n },\n size: {\n control: { type: 'select' },\n options: ['sm', 'md', 'lg'],\n },\n },\n decorators: [withActions],\n parameters: {\n actions: {\n handles: ['inputBlur', 'inputChange', 'inputFocus'],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<TimeInputArgs>;\n\nconst Template: Story = {\n render: (args) => html`\n <modus-wc-time-input\n aria-label=\"Time input\"\n auto-complete=${ifDefined(args['auto-complete'])}\n bordered=${ifDefined(args.bordered)}\n custom-class=${ifDefined(args['custom-class'])}\n datalist-id=${ifDefined(args['datalist-id'])}\n ?disabled=${args.disabled}\n .feedback=${args.feedback}\n input-id=${ifDefined(args['input-id'])}\n input-tab-index=${ifDefined(args['input-tab-index'])}\n label=${ifDefined(args.label)}\n max=${ifDefined(args.max)}\n min=${ifDefined(args.min)}\n name=${ifDefined(args.name)}\n ?read-only=${args['read-only']}\n ?required=${args.required}\n show-seconds=${ifDefined(args['show-seconds'])}\n size=${ifDefined(args.size)}\n step=${ifDefined(args.step)}\n .datalistOptions=${args['datalist-options']}\n .value=${args.value}\n ></modus-wc-time-input>\n `,\n};\n\nexport const Default: Story = { ...Template };\n\nexport const WithSeconds: Story = {\n ...Template,\n args: {\n 'show-seconds': true,\n },\n};\n\nexport const WithDatalist: Story = {\n render: () => {\n // prettier-ignore\n return html`\n<modus-wc-time-input\n aria-label=\"Example time input\"\n datalist-id=\"datalist-id-1\"\n></modus-wc-time-input>\n<datalist id=\"datalist-id-1\">\n <option value=\"06:00\"></option>\n <option value=\"12:00\"></option>\n <option value=\"17:00\"></option>\n</datalist>\n `;\n },\n};\n\nexport const WithDatalistOptions: Story = {\n render: () => {\n // prettier-ignore\n return html`\n<script>\n document.addEventListener('DOMContentLoaded', () => {\n // Example of programmatically adding 'datalistOptions'\n const preferredTimes = ['09:30', '12:00', '17:30'];\n document.querySelector('#time-input-with-options').datalistOptions = preferredTimes;\n });\n</script>\n<modus-wc-time-input\n aria-label=\"Example time input\"\n id=\"time-input-with-options\"\n></modus-wc-time-input>\n `;\n },\n};\n\nconst errorFeedback: IInputFeedbackProp = {\n level: 'error',\n message: 'Value is required.',\n};\n\nexport const WithErrorFeedback: Story = {\n ...Template,\n args: { feedback: errorFeedback, required: true },\n parameters: {\n docs: {\n source: {\n transform: (src) => `${src}\n<script>\n const timeInputElement = document.querySelector('modus-wc-time-input');\n timeInputElement.feedback = {\n level: 'error',\n message: 'Value is required.'\n };\n</script>`,\n },\n },\n },\n};\n\nexport const ShadowDomParent: Story = {\n render: (args) => {\n // Create a unique shadow host for time-input component\n if (!customElements.get('time-input-shadow-host')) {\n const TimeInputShadowHost = createShadowHostClass<TimeInputArgs>({\n componentTag: 'modus-wc-time-input',\n propsMapper: (v: TimeInputArgs, el: HTMLElement) => {\n const timeInputEl = el as unknown as {\n autoComplete: string;\n bordered: boolean;\n customClass: string;\n datalistId: string;\n datalistOptions: string[];\n disabled: boolean;\n feedback: IInputFeedbackProp;\n inputId: string;\n inputTabIndex: number;\n label: string;\n max: string;\n min: string;\n name: string;\n readOnly: boolean;\n required: boolean;\n showSeconds: boolean;\n size: string;\n step: number;\n value: string;\n };\n timeInputEl.autoComplete = v['auto-complete'] ?? '';\n timeInputEl.bordered = v['bordered'] ?? true;\n timeInputEl.customClass = v['custom-class'] || '';\n timeInputEl.datalistId = v['datalist-id'] ?? '';\n if (v['datalist-options']) {\n timeInputEl.datalistOptions = v['datalist-options']; // Conditional assignment only if provided\n }\n timeInputEl.disabled = Boolean(v.disabled);\n\n timeInputEl.inputId = v['input-id'] ?? '';\n timeInputEl.inputTabIndex = v['input-tab-index'] ?? 0;\n timeInputEl.label = v.label ?? '';\n timeInputEl.max = v.max ?? '';\n timeInputEl.min = v.min ?? '';\n timeInputEl.name = v.name ?? '';\n timeInputEl.readOnly = Boolean(v['read-only']);\n timeInputEl.required = Boolean(v.required);\n timeInputEl.showSeconds = Boolean(v['show-seconds']);\n timeInputEl.size = v.size ?? 'md';\n // Only set step if explicitly provided, otherwise let component calculate from showSeconds\n if (v.step !== undefined) {\n timeInputEl.step = v.step;\n }\n timeInputEl.value = v.value ?? '';\n },\n });\n customElements.define('time-input-shadow-host', TimeInputShadowHost);\n }\n\n return html`<time-input-shadow-host\n .props=${{ ...args }}\n ></time-input-shadow-host>`;\n },\n};\n\nexport const Migration: Story = {\n parameters: {\n docs: {\n description: {\n story: `\n#### Breaking Changes\n\n - In 1.0 input state was maintained by the component. 2.0 components encourage users to follow a controlled\n input model. See the Form Inputs [documentation](/docs/documentation-form-inputs--docs) for\n additional info and examples.\n - Size values have changed from verbose names (\\`medium\\`, \\`large\\`) to abbreviations (\\`sm\\`, \\`md\\`, \\`lg\\`).\n\n#### Prop Mapping\n\n| 1.0 Prop | 2.0 Prop | Notes |\n|-------------------------|---------------------|-----------------------------------------|\n| allowed-chars-regex | | Not carried over |\n| ampm | | Not carried over |\n| aria-label | aria-label | |\n| auto-focus-input | autofocus | |\n| auto-format | | Not carried over |\n| disable-validation | | Not carried over |\n| disabled | disabled | |\n| error-text | feedback.message | Use \\`feedback\\` level |\n| helper-text | | Not carried over |\n| label | label | |\n| max | max | |\n| min | min | |\n| placeholder | | Not carried over |\n| read-only | read-only | |\n| required | required | |\n| size | size | \\`medium\\` → \\`md\\`, \\`large\\` → \\`lg\\` |\n| valid-text | feedback.message | Use \\`feedback\\` level |\n| value | value | |\n\n#### Event Mapping\n\n| 1.0 Event | 2.0 Event | Notes |\n|----------------|-------------|------------------------------------------------------|\n| timeInputBlur | inputBlur | |\n| valueChange | inputChange | |\n `,\n },\n },\n // To hide the actual story rendering and only show docs:\n controls: { disable: true },\n canvas: { disable: true },\n },\n // Simple render function or leave it empty\n render: () => html`<div></div>`,\n};\n"
210
+ }
211
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "description": "A customizable toast component used to stack elements, positioned on the corner of a page. The component supports a `<slot>` for injecting additional custom content inside the toast.",
3
+ "properties": [
4
+ {
5
+ "name": "customClass",
6
+ "type": "string",
7
+ "description": "Additional classes for custom styling.",
8
+ "default": "''",
9
+ "mutable": false,
10
+ "end_line": 32
11
+ },
12
+ {
13
+ "name": "delay",
14
+ "type": "number",
15
+ "description": "Time taken to dismiss the toast in milliseconds",
16
+ "default": null,
17
+ "mutable": false,
18
+ "end_line": 35
19
+ },
20
+ {
21
+ "name": "position",
22
+ "type": "ToastPosition",
23
+ "description": "The position of the toast in the parent container.",
24
+ "default": "'top-end'",
25
+ "mutable": false,
26
+ "end_line": 38
27
+ }
28
+ ],
29
+ "events": [],
30
+ "methods": [],
31
+ "slots": [
32
+ {
33
+ "name": "default",
34
+ "description": "Slot for default content"
35
+ }
36
+ ],
37
+ "examples": {
38
+ "basic": null,
39
+ "variations": [],
40
+ "args": {
41
+ "position": "'top-end'"
42
+ },
43
+ "argTypes": {},
44
+ "usage": []
45
+ },
46
+ "tag": "modus-wc-toast",
47
+ "storyExample": {
48
+ "template": "",
49
+ "args": {
50
+ "position": "'top-end'"
51
+ },
52
+ "argTypes": {},
53
+ "events": [],
54
+ "fullContent": "import { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { ToastPosition } from './modus-wc-toast';\n\ninterface ToastArgs {\n 'custom-class'?: string;\n delay?: number;\n position?: ToastPosition;\n}\n\nconst meta: Meta<ToastArgs> = {\n title: 'Components/Toast',\n component: 'modus-wc-toast',\n args: {\n position: 'top-end',\n },\n argTypes: {\n position: {\n control: { type: 'select' },\n options: [\n 'top-start',\n 'top-center',\n 'top-end',\n 'middle-start',\n 'middle-center',\n 'middle-end',\n 'bottom-start',\n 'bottom-center',\n 'bottom-end',\n ],\n },\n },\n parameters: {\n layout: 'padded',\n viewport: 'responsive',\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<ToastArgs>;\n\nconst Template: Story = {\n // prettier-ignore\n render: (args) => html`\n<div style=\"height: 200px;\">\n <modus-wc-toast\n custom-class=${ifDefined(args['custom-class'])}\n delay=${ifDefined(args.delay)}\n position=${ifDefined(args.position)}\n >\n <modus-wc-alert alert-title=\"Message sent successfully!\" variant=\"success\"></modus-wc-alert>\n </modus-wc-toast>\n</div>\n `,\n};\n\nexport const Default: Story = { ...Template };\n\nexport const Migration: Story = {\n parameters: {\n docs: {\n description: {\n story: `\n#### Breaking Changes\n\n - In 1.0 toast included built-in dismiss functionality with delay timer and dismiss button. 2.0 components focus on positioning only.\n - In 1.0 toast included built-in icons. 2.0 components rely on slotted content for visual elements.\n - 2.0 toast components no longer support built-in types/variants, use slotted \\`modus-wc-alert\\` components instead.\n\n#### Prop Mapping\n\n| 1.0 Prop | 2.0 Prop | Notes |\n|-----------------|-------------|--------------------------------------------|\n| aria-label | aria-label | |\n| delay | | Not carried over |\n| dismissible | | Not carried over |\n| retain-element | | Not carried over |\n| role | | Not carried over |\n| show-icon | | Not carried over |\n| type | | Not carried over, use slotted content |\n\n#### Event Mapping\n\n| 1.0 Event | 2.0 Event | Notes |\n|---------------|-----------|------------------|\n| dismissClick | | Not carried over |\n `,\n },\n },\n // To hide the actual story rendering and only show docs:\n controls: { disable: true },\n canvas: { disable: true },\n },\n // Simple render function or leave it empty\n render: () => html`<div></div>`,\n};\n"
55
+ }
56
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "description": "A customizable toolbar component used to organize content across the entire page. This component provides 'start', 'center', and 'end' `<slot>` elements for inserting custom HTML.",
3
+ "properties": [
4
+ {
5
+ "name": "customClass",
6
+ "type": "string",
7
+ "description": "Custom CSS class to apply to the outer div.",
8
+ "default": "''",
9
+ "mutable": false,
10
+ "end_line": 20
11
+ }
12
+ ],
13
+ "events": [],
14
+ "methods": [],
15
+ "slots": [
16
+ {
17
+ "name": "start",
18
+ "description": "Slot for start content"
19
+ },
20
+ {
21
+ "name": "center",
22
+ "description": "Slot for center content"
23
+ },
24
+ {
25
+ "name": "end",
26
+ "description": "Slot for end content"
27
+ }
28
+ ],
29
+ "examples": {
30
+ "basic": "<modus-wc-toolbar custom-class=\"${ifDefined(args['custom-class'])}\">\n <div slot=\"start\">Start</div>\n <div slot=\"center\">Center</div>\n <div slot=\"end\">End</div>\n</modus-wc-toolbar>",
31
+ "variations": [],
32
+ "args": {},
33
+ "argTypes": {},
34
+ "usage": []
35
+ },
36
+ "tag": "modus-wc-toolbar",
37
+ "storyExample": {
38
+ "template": "<modus-wc-toolbar custom-class=\"${ifDefined(args['custom-class'])}\">\n <div slot=\"start\">Start</div>\n <div slot=\"center\">Center</div>\n <div slot=\"end\">End</div>\n</modus-wc-toolbar>",
39
+ "args": {},
40
+ "argTypes": {},
41
+ "events": [],
42
+ "fullContent": "import { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\ninterface ToolbarArgs {\n 'custom-class'?: string;\n}\n\nconst meta: Meta<ToolbarArgs> = {\n title: 'Components/Toolbar',\n component: 'modus-wc-toolbar',\n parameters: {\n layout: 'padded',\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<ToolbarArgs>;\n\nconst Template: Story = {\n render: (args) => {\n // prettier-ignore\n return html`\n<modus-wc-toolbar custom-class=\"${ifDefined(args['custom-class'])}\">\n <div slot=\"start\">Start</div>\n <div slot=\"center\">Center</div>\n <div slot=\"end\">End</div>\n</modus-wc-toolbar>\n `;\n },\n};\n\nexport const Default: Story = { ...Template };\n"
43
+ }
44
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "description": "A customizable tooltip component used to create tooltips with different content. The tooltip can be dismissed by pressing the Escape key when hovering over it. When forceOpen is enabled, the tooltip will remain open and can only be closed by setting forceOpen to false.",
3
+ "properties": [
4
+ {
5
+ "name": "content",
6
+ "type": "string",
7
+ "description": "The text content of the tooltip.",
8
+ "default": "''",
9
+ "mutable": false,
10
+ "end_line": 36
11
+ },
12
+ {
13
+ "name": "customClass",
14
+ "type": "string",
15
+ "description": "Custom CSS class to apply to the inner div.",
16
+ "default": "''",
17
+ "mutable": false,
18
+ "end_line": 39
19
+ },
20
+ {
21
+ "name": "disabled",
22
+ "type": "boolean",
23
+ "description": "Disables displaying the tooltip on hover",
24
+ "default": "false",
25
+ "mutable": false,
26
+ "end_line": 42
27
+ },
28
+ {
29
+ "name": "forceOpen",
30
+ "type": "boolean",
31
+ "description": "Use this attribute to force the tooltip to remain open.",
32
+ "default": null,
33
+ "mutable": false,
34
+ "end_line": 45
35
+ },
36
+ {
37
+ "name": "tooltipId",
38
+ "type": "string",
39
+ "description": "The ID of the tooltip element, useful for setting the \"aria-describedby\" attribute of related elements.",
40
+ "default": null,
41
+ "mutable": false,
42
+ "end_line": 48
43
+ },
44
+ {
45
+ "name": "position",
46
+ "type": "'auto' | 'top' | 'right' | 'bottom' | 'left'",
47
+ "description": "The position that the tooltip will render in relation to the element.",
48
+ "default": "'auto'",
49
+ "mutable": false,
50
+ "end_line": 51
51
+ }
52
+ ],
53
+ "events": [
54
+ {
55
+ "name": "dismissEscape",
56
+ "detail": "void",
57
+ "description": "An event that fires when the tooltip is dismissed via Escape key",
58
+ "end_line": 194
59
+ }
60
+ ],
61
+ "methods": [],
62
+ "slots": [
63
+ {
64
+ "name": "default",
65
+ "description": "Slot for default content"
66
+ }
67
+ ],
68
+ "examples": {
69
+ "basic": "<modus-wc-tooltip\n content=${ifDefined(args.content)}\n custom-class=\"${ifDefined(args['custom-class'])}\"\n ?disabled=\"${args.disabled}\"\n ?force-open=\"${args['force-open']}\"\n tooltip-id=\"${ifDefined(args['tooltip-id'])}\"\n position=${ifDefined(args.position)}\n >\n <modus-wc-badge>Hover</modus-wc-badge>\n </modus-wc-tooltip>",
70
+ "variations": [],
71
+ "args": {
72
+ "content": "'Tooltip content'",
73
+ "position": "'auto'"
74
+ },
75
+ "argTypes": {},
76
+ "usage": [],
77
+ "events": [
78
+ "dismissEscape"
79
+ ]
80
+ },
81
+ "tag": "modus-wc-tooltip",
82
+ "storyExample": {
83
+ "template": "<modus-wc-tooltip\n content=${ifDefined(args.content)}\n custom-class=\"${ifDefined(args['custom-class'])}\"\n ?disabled=\"${args.disabled}\"\n ?force-open=\"${args['force-open']}\"\n tooltip-id=\"${ifDefined(args['tooltip-id'])}\"\n position=${ifDefined(args.position)}\n >\n <modus-wc-badge>Hover</modus-wc-badge>\n </modus-wc-tooltip>",
84
+ "args": {
85
+ "content": "'Tooltip content'",
86
+ "position": "'auto'"
87
+ },
88
+ "argTypes": {},
89
+ "events": [
90
+ "dismissEscape"
91
+ ],
92
+ "fullContent": "import { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\ninterface TooltipArgs {\n content?: string;\n 'custom-class'?: string;\n disabled?: boolean;\n 'force-open'?: boolean;\n 'tooltip-id'?: string;\n position: 'auto' | 'top' | 'right' | 'bottom' | 'left';\n}\n\nconst meta: Meta<TooltipArgs> = {\n title: 'Components/Tooltip',\n component: 'modus-wc-tooltip',\n args: {\n content: 'Tooltip content',\n position: 'auto',\n },\n argTypes: {\n position: {\n control: { type: 'select' },\n options: ['auto', 'top', 'right', 'left', 'bottom'],\n },\n },\n parameters: {\n docs: {\n description: {\n component: `\nA customizable tooltip component used to create tooltips with different content.\n\\nThe component supports a \\`<slot>\\` for injecting custom tooltip content.\n\n### Features\n- **Escape Key Dismissal**: Tooltips can be dismissed by pressing the Escape key\n- **Auto-positioning**: Automatically positions the tooltip to avoid viewport edges\n- **Customizable**: Supports custom CSS classes and positioning\n\n### Keyboard Interaction\n- Press **Escape** to dismiss the tooltip while it's visible\n- The tooltip will automatically re-enable on mouse enter\n `,\n },\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<TooltipArgs>;\n\nconst Template: Story = {\n parameters: {\n actions: {\n handles: ['dismissEscape'],\n },\n },\n render: (args) => {\n // prettier-ignore\n return html`\n <modus-wc-tooltip\n content=${ifDefined(args.content)}\n custom-class=\"${ifDefined(args['custom-class'])}\"\n ?disabled=\"${args.disabled}\"\n ?force-open=\"${args['force-open']}\"\n tooltip-id=\"${ifDefined(args['tooltip-id'])}\"\n position=${ifDefined(args.position)}\n >\n <modus-wc-badge>Hover</modus-wc-badge>\n </modus-wc-tooltip>\n `;\n },\n};\n\nexport const Default: Story = { ...Template };\n\nexport const Migration: Story = {\n parameters: {\n docs: {\n description: {\n story: `\n#### Breaking Changes\n\n - In 1.0 tooltip positioning was handled by Popper.js. In 2.0, positioning is handled using CSS.\n - The \\`text\\` prop has been renamed to \\`content\\`.\n\n#### Prop Mapping\n\n| 1.0 Prop | 2.0 Prop | Notes |\n|-------------|-------------|------------------------------------------|\n| aria-label | aria-label | |\n| disabled | disabled | |\n| position | position | Added \\`auto\\` option as default value |\n| text | content | |\n `,\n },\n },\n controls: { disable: true },\n canvas: { disable: true },\n },\n render: () => html`<div></div>`,\n};\n"
93
+ }
94
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "description": "A customizable typography component used to render text with different sizes, hierarchy, and weights. Note: When using heading elements (h1-h6), the default heading CSS styling can be accessed without modifying the default size (size=\"md\") and weight (weight=\"normal\") properties. Default styling can be overridden by providing your own custom values for the size or weight properties from the available options.",
3
+ "properties": [
4
+ {
5
+ "name": "customClass",
6
+ "type": "string",
7
+ "description": "Custom CSS class to apply to the typography element.",
8
+ "default": "''",
9
+ "mutable": false,
10
+ "end_line": 29
11
+ },
12
+ {
13
+ "name": "hierarchy",
14
+ "type": "TypographyHierarchy",
15
+ "description": "The hierarchy of the typography component.",
16
+ "default": "'p'",
17
+ "mutable": false,
18
+ "end_line": 32
19
+ },
20
+ {
21
+ "name": "label",
22
+ "type": "string",
23
+ "description": "The text label to display.",
24
+ "default": null,
25
+ "mutable": false,
26
+ "end_line": 35
27
+ },
28
+ {
29
+ "name": "size",
30
+ "type": "TypographySize",
31
+ "description": "The size of the font.",
32
+ "default": "'md'",
33
+ "mutable": false,
34
+ "end_line": 38
35
+ },
36
+ {
37
+ "name": "weight",
38
+ "type": "TypographyWeight",
39
+ "description": "The weight of the text.",
40
+ "default": "'normal'",
41
+ "mutable": false,
42
+ "end_line": 41
43
+ }
44
+ ],
45
+ "events": [],
46
+ "methods": [],
47
+ "slots": [],
48
+ "examples": {
49
+ "basic": "<modus-wc-typography\n custom-class=${ifDefined(args['custom-class'])}\n hierarchy=${args.hierarchy}\n label=${args.label}\n size=${ifDefined(args.size)}\n weight=${ifDefined(args.weight)}\n ></modus-wc-typography>",
50
+ "variations": [],
51
+ "args": {
52
+ "hierarchy": "'p'",
53
+ "label": "content",
54
+ "size": "'md'",
55
+ "weight": "'normal'"
56
+ },
57
+ "argTypes": {},
58
+ "usage": []
59
+ },
60
+ "tag": "modus-wc-typography",
61
+ "storyExample": {
62
+ "template": "<modus-wc-typography\n custom-class=${ifDefined(args['custom-class'])}\n hierarchy=${args.hierarchy}\n label=${args.label}\n size=${ifDefined(args.size)}\n weight=${ifDefined(args.weight)}\n ></modus-wc-typography>",
63
+ "args": {
64
+ "hierarchy": "'p'",
65
+ "label": "content",
66
+ "size": "'md'",
67
+ "weight": "'normal'"
68
+ },
69
+ "argTypes": {},
70
+ "events": [],
71
+ "fullContent": "import { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n TypographyHierarchy,\n TypographySize,\n TypographyWeight,\n} from './modus-wc-typography';\n\nconst content = 'The quick brown fox jumps over the lazy dog';\n\ninterface TypographyArgs {\n 'custom-class'?: string;\n hierarchy: TypographyHierarchy;\n label: string;\n size?: TypographySize;\n weight?: TypographyWeight;\n}\n\nconst meta: Meta<TypographyArgs> = {\n title: 'Components/Typography',\n component: 'modus-wc-typography',\n args: {\n hierarchy: 'p',\n label: content,\n size: 'md',\n weight: 'normal',\n },\n argTypes: {\n hierarchy: {\n control: { type: 'select' },\n options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'],\n },\n size: {\n control: { type: 'select' },\n options: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n '7xl',\n '8xl',\n '9xl',\n ],\n },\n weight: {\n control: { type: 'select' },\n options: ['light', 'normal', 'semibold', 'bold'],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<TypographyArgs>;\n\nconst Template: Story = {\n render: (args) => {\n // prettier-ignore\n return html`\n<modus-wc-typography\n custom-class=${ifDefined(args['custom-class'])}\n hierarchy=${args.hierarchy}\n label=${args.label}\n size=${ifDefined(args.size)}\n weight=${ifDefined(args.weight)}\n ></modus-wc-typography>\n `;\n },\n};\n\nexport const Default: Story = { ...Template };\n\nexport const Heading1: Story = {\n ...Template,\n args: { hierarchy: 'h1', label: content },\n};\n\nexport const Heading2: Story = {\n ...Template,\n args: { hierarchy: 'h2', label: content },\n};\n\nexport const Heading3: Story = {\n ...Template,\n args: { hierarchy: 'h3', label: content },\n};\n\nexport const Heading4: Story = {\n ...Template,\n args: { hierarchy: 'h4', label: content },\n};\n\nexport const Heading5: Story = {\n ...Template,\n args: { hierarchy: 'h5', label: content },\n};\n\nexport const Heading6: Story = {\n ...Template,\n args: { hierarchy: 'h6', label: content },\n};\n\nexport const Paragraph: Story = {\n ...Template,\n args: { hierarchy: 'p', label: content },\n};\n\nexport const WithLabel: Story = {\n ...Template,\n args: {\n hierarchy: 'p',\n label: 'This text is set via the label prop',\n },\n};\n"
72
+ }
73
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "description": "",
3
+ "properties": [
4
+ {
5
+ "name": "expanded",
6
+ "type": "boolean",
7
+ "description": "The panel is expanded or closed",
8
+ "default": "false",
9
+ "mutable": false,
10
+ "end_line": 18
11
+ },
12
+ {
13
+ "name": "pushContent",
14
+ "type": "boolean",
15
+ "description": "Determines if the panel pushes content or displays an overlay.",
16
+ "default": "false",
17
+ "mutable": false,
18
+ "end_line": 21
19
+ },
20
+ {
21
+ "name": "targetElement",
22
+ "type": "HTMLElement",
23
+ "description": "Target element reference to push content when panel opens",
24
+ "default": null,
25
+ "mutable": false,
26
+ "end_line": 24
27
+ }
28
+ ],
29
+ "events": [
30
+ {
31
+ "name": "panelOpened",
32
+ "detail": "void",
33
+ "description": "An event that fires when the panel is opened.",
34
+ "end_line": 27
35
+ },
36
+ {
37
+ "name": "panelClosed",
38
+ "detail": "void",
39
+ "description": "An event that fires when the panel is closed.",
40
+ "end_line": 30
41
+ }
42
+ ],
43
+ "methods": [],
44
+ "slots": [
45
+ {
46
+ "name": "header",
47
+ "description": "Slot for header content"
48
+ },
49
+ {
50
+ "name": "body",
51
+ "description": "Slot for body content"
52
+ },
53
+ {
54
+ "name": "footer",
55
+ "description": "Slot for footer content"
56
+ }
57
+ ],
58
+ "examples": {
59
+ "basic": null,
60
+ "variations": [],
61
+ "args": {
62
+ "expanded": "false",
63
+ "push-content": "true"
64
+ },
65
+ "argTypes": {},
66
+ "usage": [],
67
+ "events": [
68
+ "panelOpened",
69
+ "panelClosed"
70
+ ]
71
+ },
72
+ "tag": "modus-wc-utility-panel",
73
+ "storyExample": {
74
+ "template": "",
75
+ "args": {
76
+ "expanded": "false",
77
+ "push-content": "true"
78
+ },
79
+ "argTypes": {},
80
+ "events": [
81
+ "panelOpened",
82
+ "panelClosed"
83
+ ],
84
+ "fullContent": "import { withActions } from '@storybook/addon-actions/decorator';\nimport type { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\n\ninterface UtilityPanelArgs {\n expanded: boolean;\n 'push-content': boolean;\n}\n\nconst meta: Meta<UtilityPanelArgs> = {\n title: 'Components/Utility Panel',\n component: 'modus-wc-utility-panel',\n args: {\n expanded: false,\n 'push-content': true,\n },\n argTypes: {\n expanded: {\n control: { type: 'boolean' },\n },\n 'push-content': {\n control: { type: 'boolean' },\n },\n },\n decorators: [\n withActions,\n (story) => {\n // Set up targetElement after story renders\n requestAnimationFrame(() => {\n const panels = document.querySelectorAll('modus-wc-utility-panel');\n panels.forEach((panel) => {\n const container = panel.closest('.demo-container');\n if (container) {\n const contentElement = container.querySelector('.main-content');\n if (contentElement && panel) {\n (\n panel as HTMLElement & { targetElement: HTMLElement }\n ).targetElement = contentElement as HTMLElement;\n }\n }\n });\n });\n return story();\n },\n ],\n parameters: {\n actions: {\n handles: ['panelOpened', 'panelClosed'],\n },\n docs: {\n description: {\n component:\n \"A utility panel component that slides in from the right side of the screen. It can either push content or display as an overlay.\\n\\nThe component supports `<slot>` called 'header' for panel title content, 'body' for main content area, and 'footer' for action buttons or additional controls.\",\n },\n },\n layout: 'fullscreen',\n },\n};\n\n// Shared CSS styles as string for documentation\nconst utilityPanelStyles = `\n .demo-container {\n height: 100vh;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: white;\n }\n\n modus-wc-navbar {\n flex-shrink: 0;\n }\n\n .main-content-wrapper {\n flex: 1;\n overflow: hidden;\n position: relative;\n background: var(--modus-wc-color-base-page);\n }\n\n .main-content {\n height: 100%;\n padding: 20px;\n background: var(--modus-wc-color-base-page);\n overflow: auto;\n }\n\n .main-content p,\n .modus-wc-utility-panel-body p {\n margin-bottom: var(--modus-wc-spacing-2xl);\n }\n\n .modus-wc-utility-panel-header {\n font-size: 18px;\n font-weight: 600;\n }\n\n .modus-wc-utility-panel-body {\n padding: 20px 0;\n }\n\n .modus-wc-utility-panel-footer {\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n }\n\n`;\n\nconst scriptBlock = `\n<script>\n requestAnimationFrame(() => {\n // Select the specific container for this story\n const container = document.querySelector('.demo-container');\n\n if (container) {\n // Find the specific panel and content inside this container\n const panel = container.querySelector('modus-wc-utility-panel');\n const contentElement = container.querySelector('.main-content');\n\n // Link them together\n if (panel && contentElement) {\n panel.targetElement = contentElement;\n }\n }\n});\n const navbar = document.querySelector('modus-wc-navbar');\n if (navbar) {\n navbar.visibility = { user: false };\n }\n</script>`;\n\nexport default meta;\ntype Story = StoryObj<UtilityPanelArgs>;\n\nexport const Default: Story = {\n parameters: {\n docs: {\n source: {\n transform: () => `\n\n<style>\n${utilityPanelStyles}\n</style>\n\n<div class=\"demo-container\">\n <modus-wc-navbar id=\"navbar-default\">\n <div slot=\"end\">\n <modus-wc-tooltip content=\"Toggle Utility Panel\" position=\"left\">\n <modus-wc-button\n id=\"toggle-btn\"\n color=\"primary\"\n size=\"sm\"\n variant=\"outlined\"\n onclick=\"const panel = this.closest('.demo-container').querySelector('modus-wc-utility-panel'); panel.expanded = !panel.expanded\"\n >\n <modus-wc-icon name=\"menu\"></modus-wc-icon>\n </modus-wc-button>\n </modus-wc-tooltip>\n </div>\n </modus-wc-navbar>\n\n <div class=\"main-content-wrapper\">\n <div id=\"main-content\" class=\"main-content\">\n <h1>Main Content Area</h1>\n <p>\n This is the main content area below the navbar. When the utility\n panel opens with pushContent=true, this content will be pushed to\n the left.\n </p>\n <p>\n This is an example of how the utility panel interacts with the main\n content. When the panel opens with push content enabled, this area\n will shift to the left to make room for the panel.\n </p>\n <p>\n The content area maintains its full functionality while the panel is\n open. Users can continue to interact with the main content while\n accessing the utility panel features.\n </p>\n </div>\n\n <modus-wc-utility-panel\n expanded=\"false\"\n push-content=\"true\"\n >\n <div slot=\"header\" class=\"modus-wc-utility-panel-header\">\n Utility Panel Header\n </div>\n\n <div slot=\"body\" class=\"modus-wc-utility-panel-body\">\n <p>This is the utility panel body content.</p>\n <p>\n You can add any content here including forms, lists, or other\n components.\n </p>\n <modus-wc-text-input\n label=\"Example Input\"\n placeholder=\"Enter text...\"\n >\n </modus-wc-text-input>\n </div>\n\n <div slot=\"footer\" class=\"modus-wc-utility-panel-footer\">\n <modus-wc-button color=\"tertiary\" size=\"sm\"\n >Cancel</modus-wc-button\n >\n <modus-wc-button color=\"primary\" size=\"sm\">Save</modus-wc-button>\n </div>\n </modus-wc-utility-panel>\n </div>\n</div>\n${scriptBlock}`,\n },\n },\n },\n render: (args) => html`\n <style>\n ${utilityPanelStyles}\n </style>\n <div class=\"demo-container\">\n <modus-wc-navbar id=\"navbar-default\" .visibility=${{ user: false }}>\n <div slot=\"end\">\n <modus-wc-tooltip content=\"Toggle Utility Panel\" position=\"left\">\n <modus-wc-button\n color=\"primary\"\n size=\"sm\"\n variant=\"outlined\"\n onclick=\"const panel = this.closest('.demo-container').querySelector('modus-wc-utility-panel'); panel.expanded = !panel.expanded\"\n >\n <modus-wc-icon name=\"menu\"></modus-wc-icon>\n </modus-wc-button>\n </modus-wc-tooltip>\n </div>\n </modus-wc-navbar>\n\n <div class=\"main-content-wrapper\">\n <div id=\"main-content\" class=\"main-content\">\n <h1>Main Content Area</h1>\n <p>\n This is the main content area below the navbar. When the utility\n panel opens with pushContent=true, this content will be pushed to\n the left.\n </p>\n <p>\n This is an example of how the utility panel interacts with the main\n content. When the panel opens with push content enabled, this area\n will shift to the left to make room for the panel.\n </p>\n <p>\n The content area maintains its full functionality while the panel is\n open. Users can continue to interact with the main content while\n accessing the utility panel features.\n </p>\n </div>\n\n <modus-wc-utility-panel\n ?expanded=\"${args.expanded}\"\n ?push-content=\"${args['push-content']}\"\n >\n <div slot=\"header\" class=\"modus-wc-utility-panel-header\">\n Utility Panel Header\n </div>\n\n <div slot=\"body\" class=\"modus-wc-utility-panel-body\">\n <p>This is the utility panel body content.</p>\n <p>\n You can add any content here including forms, lists, or other\n components.\n </p>\n <modus-wc-text-input\n label=\"Example Input\"\n placeholder=\"Enter text...\"\n >\n </modus-wc-text-input>\n </div>\n\n <div slot=\"footer\" class=\"modus-wc-utility-panel-footer\">\n <modus-wc-button color=\"tertiary\" size=\"sm\">Cancel</modus-wc-button>\n <modus-wc-button color=\"primary\" size=\"sm\">Save</modus-wc-button>\n </div>\n </modus-wc-utility-panel>\n </div>\n </div>\n `,\n};\nexport const Expanded: Story = {\n args: {\n expanded: true,\n 'push-content': true,\n },\n parameters: {\n docs: {\n source: {\n transform: () => `\n<style>\n${utilityPanelStyles}\n .modus-wc-utility-panel-body {\n background: var(--modus-wc-color-base-100);\n }\n</style>\n\n<div class=\"demo-container\">\n <modus-wc-navbar id=\"navbar-expanded\">\n <div slot=\"end\">\n <modus-wc-button\n id=\"toggle-btn-expanded\"\n color=\"primary\"\n size=\"sm\"\n variant=\"outlined\"\n onclick=\"const panel = document.getElementById('panel-expanded'); panel.expanded = !panel.expanded\"\n >\n <modus-wc-icon name=\"menu\"></modus-wc-icon>\n </modus-wc-button>\n </div>\n </modus-wc-navbar>\n\n <div class=\"main-content-wrapper\">\n <div id=\"main-content-expanded\" class=\"main-content\">\n <h1>Main Content Area (Expanded Story)</h1>\n <p>\n This story shows the panel already expanded. The content should be\n pushed to the left.\n </p>\n <p>\n The utility panel provides quick access to additional tools and\n information. It can be used for settings, filters, or any\n supplementary content that enhances the main application.\n </p>\n </div>\n\n <modus-wc-utility-panel\n id=\"panel-expanded\"\n expanded=\"true\"\n push-content=\"true\"\n >\n <div slot=\"header\" class=\"modus-wc-utility-panel-header\">\n Expanded Panel Header\n </div>\n\n <div slot=\"body\" class=\"modus-wc-utility-panel-body\">\n <p>This panel starts in the expanded state.</p>\n </div>\n\n <div slot=\"footer\" class=\"modus-wc-utility-panel-footer\">\n <modus-wc-button color=\"tertiary\" size=\"sm\"\n >Cancel</modus-wc-button\n >\n <modus-wc-button color=\"primary\" size=\"sm\">Save</modus-wc-button>\n </div>\n </modus-wc-utility-panel>\n </div>\n</div>\n${scriptBlock}`,\n },\n },\n },\n render: (args) =>\n // prettier-ignore\n html`\n <style>\n ${utilityPanelStyles} \n .modus-wc-utility-panel-body {\n padding: 20px 0;\n background: var(--modus-wc-color-base-100);\n }\n </style>\n\n <div class=\"demo-container\">\n <modus-wc-navbar id=\"navbar-expanded\" .visibility=${{ user: false }}>\n <div slot=\"end\">\n <modus-wc-button\n color=\"primary\"\n size=\"sm\"\n variant=\"outlined\"\n onclick=\"const panel = this.closest('.demo-container').querySelector('modus-wc-utility-panel'); panel.expanded = !panel.expanded\"\n >\n <modus-wc-icon name=\"menu\"></modus-wc-icon>\n </modus-wc-button>\n </div>\n </modus-wc-navbar>\n\n <div class=\"main-content-wrapper\">\n <div id=\"main-content-expanded\" class=\"main-content\">\n <h1>Main Content Area (Expanded Story)</h1>\n <p>\n This story shows the panel already expanded. The content should be\n pushed to the left.\n </p>\n <p>\n The utility panel provides quick access to additional tools and\n information. It can be used for settings, filters, or any\n supplementary content that enhances the main application.\n </p>\n </div>\n\n <modus-wc-utility-panel\n id=\"panel-expanded\"\n ?expanded=\"${args.expanded}\"\n ?push-content=\"${args['push-content']}\"\n >\n <div slot=\"header\" class=\"modus-wc-utility-panel-header\">\n Expanded Panel Header\n </div>\n\n <div slot=\"body\" class=\"modus-wc-utility-panel-body\">\n <p>This panel starts in the expanded state.</p>\n </div>\n\n <div slot=\"footer\" class=\"modus-wc-utility-panel-footer\">\n <modus-wc-button color=\"tertiary\" size=\"sm\">Cancel</modus-wc-button>\n <modus-wc-button color=\"primary\" size=\"sm\">Save</modus-wc-button>\n </div>\n </modus-wc-utility-panel>\n </div>\n </div>\n `,\n};\nexport const OverlayMode: Story = {\n args: {\n expanded: true,\n 'push-content': false,\n },\n parameters: {\n docs: {\n source: {\n transform: () => `\n<style>\n${utilityPanelStyles}\n</style>\n\n<div class=\"demo-container\">\n <modus-wc-navbar id=\"navbar-overlay\">\n <div slot=\"end\">\n <modus-wc-button\n id=\"toggle-btn-overlay\"\n color=\"primary\"\n size=\"sm\"\n variant=\"outlined\"\n onclick=\"const panel = document.getElementById('panel-overlay'); panel.expanded = !panel.expanded\"\n >\n <modus-wc-icon name=\"menu\"></modus-wc-icon>\n </modus-wc-button>\n </div>\n </modus-wc-navbar>\n\n <div class=\"main-content-wrapper\">\n <div id=\"main-content-overlay\" class=\"main-content\">\n <h1>Main Content Area (Overlay Mode)</h1>\n <p>\n In overlay mode, the panel appears over the content without pushing\n it.\n </p>\n <p>\n This example demonstrates the overlay mode where the panel appears\n on top of the content without pushing it aside. This is useful when\n you want to preserve the layout of the main content area.\n </p>\n </div>\n\n <modus-wc-utility-panel\n id=\"panel-overlay\"\n expanded=\"true\"\n push-content=\"false\"\n >\n <div slot=\"header\" class=\"modus-wc-utility-panel-header\">\n Overlay Panel Header\n </div>\n\n <div slot=\"body\" class=\"modus-wc-utility-panel-body\">\n <p>This panel overlays the content without pushing it.</p>\n </div>\n\n <div slot=\"footer\" class=\"modus-wc-utility-panel-footer\">\n <modus-wc-button color=\"tertiary\" size=\"sm\"\n >Cancel</modus-wc-button\n >\n <modus-wc-button color=\"primary\" size=\"sm\">Save</modus-wc-button>\n </div>\n </modus-wc-utility-panel>\n </div>\n</div>\n${scriptBlock}`,\n },\n },\n },\n render: (args) => html`\n <style>\n ${utilityPanelStyles}\n </style>\n\n <div class=\"demo-container\">\n <modus-wc-navbar id=\"navbar-overlay\" .visibility=${{ user: false }}>\n <div slot=\"end\">\n <modus-wc-button\n color=\"primary\"\n size=\"sm\"\n variant=\"outlined\"\n onclick=\"const panel = document.getElementById('panel-overlay'); panel.expanded = !panel.expanded\"\n >\n <modus-wc-icon name=\"menu\"></modus-wc-icon>\n </modus-wc-button>\n </div>\n </modus-wc-navbar>\n\n <div class=\"main-content-wrapper\">\n <div id=\"main-content-overlay\" class=\"main-content\">\n <h1>Main Content Area (Overlay Mode)</h1>\n <p>\n In overlay mode, the panel appears over the content without pushing\n it.\n </p>\n <p>\n This example demonstrates the overlay mode where the panel appears\n on top of the content without pushing it aside. This is useful when\n you want to preserve the layout of the main content area.\n </p>\n </div>\n\n <modus-wc-utility-panel\n id=\"panel-overlay\"\n ?expanded=\"${args.expanded}\"\n ?push-content=\"${args['push-content']}\"\n >\n <div slot=\"header\" class=\"modus-wc-utility-panel-header\">\n Overlay Panel Header\n </div>\n\n <div slot=\"body\" class=\"modus-wc-utility-panel-body\">\n <p>This panel overlays the content without pushing it.</p>\n </div>\n\n <div slot=\"footer\" class=\"modus-wc-utility-panel-footer\">\n <modus-wc-button color=\"tertiary\" size=\"sm\">Cancel</modus-wc-button>\n <modus-wc-button color=\"primary\" size=\"sm\">Save</modus-wc-button>\n </div>\n </modus-wc-utility-panel>\n </div>\n </div>\n `,\n};\nexport const WithoutHeaderFooter: Story = {\n args: {\n expanded: false,\n 'push-content': true,\n },\n render: (args: UtilityPanelArgs) => html`\n <style>\n .demo-container {\n height: 100vh;\n position: relative;\n overflow: hidden;\n background: var(--modus-wc-color-base-page);\n }\n\n .main-content {\n height: 100%;\n padding: 20px;\n background: var(--modus-wc-color-base-page);\n }\n </style>\n\n <div class=\"demo-container\">\n <div id=\"main-content-2\" class=\"main-content\">\n <h1>Main Content Area</h1>\n <modus-wc-button\n onclick=\"const panel = this.closest('.demo-container').querySelector('modus-wc-utility-panel'); panel.expanded = !panel.expanded\"\n >\n Toggle Panel\n </modus-wc-button>\n </div>\n\n <modus-wc-utility-panel\n id=\"panel-simple\"\n ?expanded=\"${args.expanded}\"\n ?push-content=\"${args['push-content']}\"\n >\n <div slot=\"body\">\n <h3>Simple Body Content</h3>\n <p>This panel only has body content without header or footer.</p>\n </div>\n </modus-wc-utility-panel>\n </div>\n `,\n};\n"
85
+ }
86
+ }