@trimble-oss/moduswebcomponents-mcp 1.0.0 → 1.2.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 (33) hide show
  1. package/package.json +1 -1
  2. package/versions/{1.0.0 → 1.0.1}/component-docs/_all_components.json +1 -1
  3. package/versions/1.2.0/component-docs/_all_components.json +56 -0
  4. package/versions/1.2.0/component-docs/modus-wc-autocomplete.json +415 -0
  5. package/versions/1.2.0/component-docs/modus-wc-date.json +227 -0
  6. package/versions/1.2.0/component-docs/modus-wc-dropdown-menu.json +164 -0
  7. package/versions/1.2.0/component-docs/modus-wc-logo.json +61 -0
  8. package/versions/1.2.0/component-docs/modus-wc-menu-item.json +165 -0
  9. package/versions/1.2.0/component-docs/modus-wc-menu.json +106 -0
  10. package/versions/1.2.0/component-docs/modus-wc-navbar.json +290 -0
  11. package/versions/1.2.0/component-docs/modus-wc-profile-menu.json +64 -0
  12. package/versions/1.2.0/component-docs/modus-wc-side-navigation.json +102 -0
  13. package/versions/1.2.0/component-docs/modus-wc-table.json +202 -0
  14. package/versions/1.2.0/component-docs/modus-wc-tooltip.json +94 -0
  15. package/versions/1.2.0/component-docs/modus-wc-typography.json +78 -0
  16. package/versions/1.2.0/docs/_all_docs.json +15 -0
  17. package/versions/1.2.0/docs/angular.mdx +374 -0
  18. package/versions/1.2.0/docs/getting-started.mdx +131 -0
  19. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-autocomplete.json +0 -0
  20. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-date.json +0 -0
  21. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-dropdown-menu.json +0 -0
  22. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-logo.json +0 -0
  23. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-menu-item.json +0 -0
  24. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-menu.json +0 -0
  25. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-navbar.json +0 -0
  26. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-profile-menu.json +0 -0
  27. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-side-navigation.json +0 -0
  28. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-table.json +0 -0
  29. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-tooltip.json +0 -0
  30. /package/versions/{1.0.0 → 1.0.1}/component-docs/modus-wc-typography.json +0 -0
  31. /package/versions/{1.0.0 → 1.0.1}/docs/_all_docs.json +0 -0
  32. /package/versions/{1.0.0 → 1.0.1}/docs/angular.mdx +0 -0
  33. /package/versions/{1.0.0 → 1.0.1}/docs/getting-started.mdx +0 -0
@@ -0,0 +1,227 @@
1
+ {
2
+ "description": "A customizable date picker component used to create date inputs. Adheres to WCAG 2.2 standards.",
3
+ "properties": [
4
+ {
5
+ "name": "bordered",
6
+ "type": "boolean",
7
+ "description": "Indicates that the input should have a border.",
8
+ "default": "true",
9
+ "mutable": false,
10
+ "end_line": 79
11
+ },
12
+ {
13
+ "name": "customClass",
14
+ "type": "string",
15
+ "description": "Custom CSS class to apply to the input.",
16
+ "default": "''",
17
+ "mutable": false,
18
+ "end_line": 82
19
+ },
20
+ {
21
+ "name": "disabled",
22
+ "type": "boolean",
23
+ "description": "Whether the form control is disabled.",
24
+ "default": "false",
25
+ "mutable": false,
26
+ "end_line": 85
27
+ },
28
+ {
29
+ "name": "feedback",
30
+ "type": "IInputFeedbackProp",
31
+ "description": "Feedback to render below the input.",
32
+ "default": null,
33
+ "mutable": false,
34
+ "end_line": 88
35
+ },
36
+ {
37
+ "name": "inputId",
38
+ "type": "string",
39
+ "description": "The ID of the input element.",
40
+ "default": null,
41
+ "mutable": false,
42
+ "end_line": 91
43
+ },
44
+ {
45
+ "name": "inputTabIndex",
46
+ "type": "number",
47
+ "description": "Determine the control's relative ordering for sequential focus navigation (typically with the Tab key).",
48
+ "default": null,
49
+ "mutable": false,
50
+ "end_line": 94
51
+ },
52
+ {
53
+ "name": "label",
54
+ "type": "string",
55
+ "description": "The text to display within the label.",
56
+ "default": null,
57
+ "mutable": false,
58
+ "end_line": 97
59
+ },
60
+ {
61
+ "name": "max",
62
+ "type": "string",
63
+ "description": "Maximum date value.",
64
+ "default": null,
65
+ "mutable": false,
66
+ "end_line": 100
67
+ },
68
+ {
69
+ "name": "min",
70
+ "type": "string",
71
+ "description": "Minimum date value.",
72
+ "default": null,
73
+ "mutable": false,
74
+ "end_line": 103
75
+ },
76
+ {
77
+ "name": "name",
78
+ "type": "string",
79
+ "description": "Name of the form control. Submitted with the form as part of a name/value pair.",
80
+ "default": null,
81
+ "mutable": false,
82
+ "end_line": 106
83
+ },
84
+ {
85
+ "name": "readOnly",
86
+ "type": "boolean",
87
+ "description": "Whether the value is editable.",
88
+ "default": "false",
89
+ "mutable": false,
90
+ "end_line": 109
91
+ },
92
+ {
93
+ "name": "required",
94
+ "type": "boolean",
95
+ "description": "A value is required or must be checked for the form to be submittable.",
96
+ "default": "false",
97
+ "mutable": false,
98
+ "end_line": 112
99
+ },
100
+ {
101
+ "name": "size",
102
+ "type": "ModusSize",
103
+ "description": "The size of the input.",
104
+ "default": "'md'",
105
+ "mutable": false,
106
+ "end_line": 115
107
+ },
108
+ {
109
+ "name": "format",
110
+ "type": "| 'yyyy-mm-dd' | 'dd-mm-yyyy' | 'mm-dd-yyyy' | 'yyyy/mm/dd' | 'dd/mm/yyyy' | 'mm/dd/yyyy' | 'MMM DD, YYYY'",
111
+ "description": "The date format for display and input.",
112
+ "default": null,
113
+ "mutable": false,
114
+ "end_line": 125
115
+ },
116
+ {
117
+ "name": "value",
118
+ "type": "string",
119
+ "description": "The value of the control.",
120
+ "default": "''",
121
+ "mutable": true,
122
+ "end_line": 128
123
+ },
124
+ {
125
+ "name": "weekStartDay",
126
+ "type": "WeekStartDay",
127
+ "description": "The first day of the week for the calendar display",
128
+ "default": "'sunday'",
129
+ "mutable": false,
130
+ "end_line": 131
131
+ },
132
+ {
133
+ "name": "showWeekNumbers",
134
+ "type": "boolean",
135
+ "description": "Displays ISO 8601 week numbers in the calendar. Week numbers are calculated with Monday as the first day of the week.",
136
+ "default": "false",
137
+ "mutable": false,
138
+ "end_line": 134
139
+ }
140
+ ],
141
+ "events": [
142
+ {
143
+ "name": "inputBlur",
144
+ "detail": "FocusEvent",
145
+ "description": "Event emitted when the input loses focus.",
146
+ "end_line": 137
147
+ },
148
+ {
149
+ "name": "inputChange",
150
+ "detail": "InputEvent",
151
+ "description": "Event emitted when the input value changes. `target.value` is always ISO 8601 (YYYY-MM-DD), or empty string when incomplete or invalid.",
152
+ "end_line": 140
153
+ },
154
+ {
155
+ "name": "inputFocus",
156
+ "detail": "FocusEvent",
157
+ "description": "Event emitted when the input gains focus.",
158
+ "end_line": 143
159
+ },
160
+ {
161
+ "name": "calendarMonthChange",
162
+ "detail": "number",
163
+ "description": "Event emitted when the calendar month selection changes.",
164
+ "end_line": 146
165
+ },
166
+ {
167
+ "name": "calendarYearChange",
168
+ "detail": "number",
169
+ "description": "Event emitted when the calendar year selection changes.",
170
+ "end_line": 149
171
+ }
172
+ ],
173
+ "methods": [],
174
+ "slots": [],
175
+ "examples": {
176
+ "basic": "<style>\n div[id^='story--components-forms-date--default'] {\n min-height: 400px;\n width: 300px;\n }\n </style>\n <modus-wc-date\n aria-label=\"Date input\"\n ?bordered=${args.bordered}\n custom-class=${ifDefined(args['custom-class'])}\n ?disabled=${args.disabled}\n .feedback=${args.feedback}\n format=${ifDefined(args.format)}\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-week-numbers=${args['show-week-numbers']}\n size=${ifDefined(args.size)}\n .value=${args.value}\n week-start-day=${ifDefined(args['week-start-day'])}\n ></modus-wc-date>",
177
+ "variations": [],
178
+ "args": {
179
+ "bordered": "true",
180
+ "custom-class": "''",
181
+ "disabled": "false",
182
+ "label": "'Label'",
183
+ "read-only": "false",
184
+ "required": "false",
185
+ "show-week-numbers": "false",
186
+ "size": "'md'",
187
+ "value": "''",
188
+ "week-start-day": "'sunday'"
189
+ },
190
+ "argTypes": {},
191
+ "usage": [],
192
+ "events": [
193
+ "inputBlur",
194
+ "inputChange",
195
+ "inputFocus",
196
+ "calendarMonthChange",
197
+ "calendarYearChange",
198
+ ""
199
+ ]
200
+ },
201
+ "tag": "modus-wc-date",
202
+ "storyExample": {
203
+ "template": "<style>\n div[id^='story--components-forms-date--default'] {\n min-height: 400px;\n width: 300px;\n }\n </style>\n <modus-wc-date\n aria-label=\"Date input\"\n ?bordered=${args.bordered}\n custom-class=${ifDefined(args['custom-class'])}\n ?disabled=${args.disabled}\n .feedback=${args.feedback}\n format=${ifDefined(args.format)}\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-week-numbers=${args['show-week-numbers']}\n size=${ifDefined(args.size)}\n .value=${args.value}\n week-start-day=${ifDefined(args['week-start-day'])}\n ></modus-wc-date>",
204
+ "args": {
205
+ "bordered": "true",
206
+ "custom-class": "''",
207
+ "disabled": "false",
208
+ "label": "'Label'",
209
+ "read-only": "false",
210
+ "required": "false",
211
+ "show-week-numbers": "false",
212
+ "size": "'md'",
213
+ "value": "''",
214
+ "week-start-day": "'sunday'"
215
+ },
216
+ "argTypes": {},
217
+ "events": [
218
+ "inputBlur",
219
+ "inputChange",
220
+ "inputFocus",
221
+ "calendarMonthChange",
222
+ "calendarYearChange",
223
+ ""
224
+ ],
225
+ "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, WeekStartDay } from '../types';\n\ninterface DateArgs {\n bordered?: boolean;\n 'custom-class'?: string;\n disabled?: boolean;\n feedback?: IInputFeedbackProp;\n format?:\n | 'yyyy-mm-dd'\n | 'dd-mm-yyyy'\n | 'mm-dd-yyyy'\n | 'yyyy/mm/dd'\n | 'dd/mm/yyyy'\n | 'mm/dd/yyyy'\n | 'MMM DD, YYYY';\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-week-numbers'?: boolean;\n size?: ModusSize;\n value: string;\n 'week-start-day'?: WeekStartDay;\n}\n\nconst meta: Meta<DateArgs> = {\n title: 'Components/Forms/Date',\n component: 'modus-wc-date',\n args: {\n bordered: true,\n 'custom-class': '',\n disabled: false,\n label: 'Label',\n 'read-only': false,\n required: false,\n 'show-week-numbers': false,\n size: 'md',\n value: '',\n 'week-start-day': 'sunday',\n },\n argTypes: {\n feedback: {\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 format: {\n control: { type: 'select' },\n options: [\n undefined,\n 'yyyy-mm-dd',\n 'dd-mm-yyyy',\n 'mm-dd-yyyy',\n 'yyyy/mm/dd',\n 'dd/mm/yyyy',\n 'mm/dd/yyyy',\n 'MMM DD, YYYY',\n ],\n },\n 'week-start-day': {\n control: { type: 'select' },\n options: [\n 'sunday',\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n ],\n },\n },\n decorators: [withActions],\n parameters: {\n actions: {\n handles: [\n 'inputBlur',\n 'inputChange',\n 'inputFocus',\n 'calendarMonthChange',\n 'calendarYearChange',\n ],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<DateArgs>;\n\nconst Template: Story = {\n render: (args) => {\n return html`\n <style>\n div[id^='story--components-forms-date--default'] {\n min-height: 400px;\n width: 300px;\n }\n </style>\n <modus-wc-date\n aria-label=\"Date input\"\n ?bordered=${args.bordered}\n custom-class=${ifDefined(args['custom-class'])}\n ?disabled=${args.disabled}\n .feedback=${args.feedback}\n format=${ifDefined(args.format)}\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-week-numbers=${args['show-week-numbers']}\n size=${ifDefined(args.size)}\n .value=${args.value}\n week-start-day=${ifDefined(args['week-start-day'])}\n ></modus-wc-date>\n `;\n },\n};\n\nexport const Default: Story = { ...Template };\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 dateInputElement = document.querySelector('modus-wc-date');\n dateInputElement.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 date component\n if (!customElements.get('date-shadow-host')) {\n const DateShadowHost = createShadowHostClass<DateArgs>({\n componentTag: 'modus-wc-date',\n propsMapper: (v: DateArgs, el: HTMLElement) => {\n const dateEl = el as unknown as {\n bordered: boolean;\n customClass: string;\n disabled: boolean;\n feedback: IInputFeedbackProp;\n format?:\n | 'yyyy-mm-dd'\n | 'dd-mm-yyyy'\n | 'mm-dd-yyyy'\n | 'yyyy/mm/dd'\n | 'dd/mm/yyyy'\n | 'mm/dd/yyyy'\n | 'MMM DD, YYYY';\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 showWeekNumbers: boolean;\n size: string;\n value: string;\n weekStartDay: string;\n };\n dateEl.bordered = Boolean(v.bordered);\n dateEl.customClass = v['custom-class'] || '';\n dateEl.disabled = Boolean(v.disabled);\n dateEl.format = v.format;\n dateEl.inputId = v['input-id'] ?? '';\n dateEl.inputTabIndex = v['input-tab-index'] ?? -1;\n dateEl.label = v.label ?? '';\n dateEl.max = v.max ?? '';\n dateEl.min = v.min ?? '';\n dateEl.name = v.name ?? '';\n dateEl.readOnly = Boolean(v['read-only']);\n dateEl.required = Boolean(v.required);\n dateEl.showWeekNumbers = Boolean(v['show-week-numbers']);\n dateEl.size = v.size ?? '';\n dateEl.value = v.value ?? '';\n dateEl.weekStartDay = v['week-start-day'] ?? '';\n },\n });\n customElements.define('date-shadow-host', DateShadowHost);\n }\n\n return html`<date-shadow-host .props=${{ ...args }}></date-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]([Angular](?path=/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 - The \\`value\\` prop now always outputs **ISO 8601 format** (\\`YYYY-MM-DD\\`), regardless of the display format.\n Previously, \\`value\\` matched the display format (e.g. \\`dd-mm-yyyy\\`).\n - The \\`format\\` prop is now automatically derived from the user's locale when not explicitly set.\n Previously, it defaulted to \\`dd-mm-yyyy\\`. The accepted values remain the same fixed union\n (\\`'yyyy-mm-dd'\\`, \\`'dd-mm-yyyy'\\`, \\`'mm-dd-yyyy'\\`, \\`'yyyy/mm/dd'\\`, \\`'dd/mm/yyyy'\\`, \\`'mm/dd/yyyy'\\`, \\`'MMM DD, YYYY'\\`).\n\n#### Prop Mapping\n\n| 1.0 Prop | 2.0 Prop | Notes |\n|--------------------|------------------|-----------------------------------------|\n| allow-chars-regex | | Not carried over |\n| alt-formats | | Not carried over |\n| aria-label | aria-label | |\n| auto-focus-input | | Not carried over |\n| disabled | disabled | |\n| disable-validation | | Not carried over |\n| error-text | feedback.message | Use \\`feedback\\` level |\n| filler-date | | Not carried over |\n| format | format | Auto-derived from locale when not set; union type unchanged |\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| show-calendar-icon | | Not carried over |\n| size | size | \\`medium\\` → \\`md\\`, \\`large\\` → \\`lg\\` |\n| type | | Not carried over |\n| valid-text | feedback.message | Use \\`feedback\\` level |\n| value | value | Now outputs ISO 8601 (\\`YYYY-MM-DD\\`) |\n\n#### Event Mapping\n\n| 1.0 Event | 2.0 Event | Notes |\n|---------------------|-------------|------------------|\n| calendarIconClicked | | Not carried over |\n| dateInputBlur | inputBlur | |\n| valueChange | inputChange | |\n| valueError | | Not carried over |\n `,\n },\n },\n controls: { disable: true },\n canvas: { disable: true },\n },\n render: () => html`<div></div>`,\n};\n"
226
+ }
227
+ }
@@ -0,0 +1,164 @@
1
+ {
2
+ "description": "A customizable dropdown menu component used to render a button and toggleable menu. The component supports a 'button' and 'menu' `<slot>` for injecting custom HTML content.",
3
+ "properties": [
4
+ {
5
+ "name": "buttonAriaLabel",
6
+ "type": "string",
7
+ "description": "The aria-label for the dropdown button.",
8
+ "default": null,
9
+ "mutable": false,
10
+ "end_line": 35
11
+ },
12
+ {
13
+ "name": "buttonColor",
14
+ "type": "| 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger'",
15
+ "description": "The color variant of the button.",
16
+ "default": "'primary'",
17
+ "mutable": false,
18
+ "end_line": 43
19
+ },
20
+ {
21
+ "name": "buttonShape",
22
+ "type": "'circle' | 'ellipse' | 'rectangle' | 'square'",
23
+ "description": "The shape of the button.",
24
+ "default": "'rectangle'",
25
+ "mutable": false,
26
+ "end_line": 47
27
+ },
28
+ {
29
+ "name": "buttonSize",
30
+ "type": "DaisySize",
31
+ "description": "The size of the button.",
32
+ "default": "'md'",
33
+ "mutable": false,
34
+ "end_line": 50
35
+ },
36
+ {
37
+ "name": "buttonVariant",
38
+ "type": "'borderless' | 'filled' | 'outlined'",
39
+ "description": "The variant of the button.",
40
+ "default": "'filled'",
41
+ "mutable": false,
42
+ "end_line": 53
43
+ },
44
+ {
45
+ "name": "customClass",
46
+ "type": "string",
47
+ "description": "Custom CSS class to apply to the host element.",
48
+ "default": "''",
49
+ "mutable": false,
50
+ "end_line": 56
51
+ },
52
+ {
53
+ "name": "disabled",
54
+ "type": "boolean",
55
+ "description": "If true, the button will be disabled.",
56
+ "default": "false",
57
+ "mutable": false,
58
+ "end_line": 59
59
+ },
60
+ {
61
+ "name": "menuBordered",
62
+ "type": "boolean",
63
+ "description": "Indicates that the menu should have a border.",
64
+ "default": "true",
65
+ "mutable": false,
66
+ "end_line": 62
67
+ },
68
+ {
69
+ "name": "menuOffset",
70
+ "type": "number",
71
+ "description": "Distance between the button and menu in pixels.",
72
+ "default": "10",
73
+ "mutable": false,
74
+ "end_line": 65
75
+ },
76
+ {
77
+ "name": "menuPlacement",
78
+ "type": "PopoverPlacement",
79
+ "description": "The placement of the menu relative to the button.",
80
+ "default": "'bottom-start'",
81
+ "mutable": false,
82
+ "end_line": 68
83
+ },
84
+ {
85
+ "name": "menuSize",
86
+ "type": "ModusSize",
87
+ "description": "The size of the menu.",
88
+ "default": "'md'",
89
+ "mutable": false,
90
+ "end_line": 71
91
+ },
92
+ {
93
+ "name": "menuVisible",
94
+ "type": "boolean",
95
+ "description": "Indicates that the menu is visible.",
96
+ "default": "false",
97
+ "mutable": true,
98
+ "end_line": 74
99
+ }
100
+ ],
101
+ "events": [
102
+ {
103
+ "name": "menuVisibilityChange",
104
+ "detail": "{ isVisible: boolean }",
105
+ "description": "Event emitted when the menuVisible prop changes.",
106
+ "end_line": 77
107
+ }
108
+ ],
109
+ "methods": [],
110
+ "slots": [
111
+ {
112
+ "name": "button",
113
+ "description": "Slot for button content"
114
+ },
115
+ {
116
+ "name": "menu",
117
+ "description": "Slot for menu content"
118
+ }
119
+ ],
120
+ "examples": {
121
+ "basic": "<style>\n /* Storybook styling */\n div#story--components-dropdown-menu--default--primary-inner {\n display: flex;\n align-items: center;\n height: 240px;\n }\n\n [slot=\"button\"] {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .value {\n font-size: 14px;\n padding-top: 12px;\n }\n</style>\n\n\n\n<modus-wc-dropdown-menu\n button-aria-label=${ifDefined(args['button-aria-label'])}\n button-color=${ifDefined(args['button-color'])}\n button-shape=${ifDefined(args['button-shape'])}\n button-size=${ifDefined(args['button-size'])}\n button-variant=${ifDefined(args['button-variant'])}\n custom-class=${ifDefined(args['custom-class'])}\n ?disabled=${args.disabled}\n ?menu-bordered=${args['menu-bordered']}\n menu-offset=${ifDefined(args['menu-offset'])}\n menu-placement=${ifDefined(args['menu-placement'])}\n menu-size=${ifDefined(args['menu-size'])}\n ?menu-visible=${args['menu-visible']}\n>\n <div slot=\"button\">\n Button\n <modus-wc-icon name=\"expand_more\" size=\"sm\" />\n </div>\n\n <div slot=\"menu\">\n <modus-wc-menu-item label=\"Item One\" value=\"1\" @itemSelect=${handleItemSelect}></modus-wc-menu-item>\n <modus-wc-menu-item label=\"Item Two\" value=\"2\" @itemSelect=${handleItemSelect} /></modus-wc-menu-item>\n <modus-wc-menu-item label=\"Item Three\" value=\"3\" @itemSelect=${handleItemSelect} /></modus-wc-menu-item>\n </div>\n</modus-wc-dropdown-menu>\n<script>\n // // Adding this block to handle menu item selection to update a label and close the dropdown via JS.\n // let selectedValue = '';\n\n // const handleItemSelect = (event) => {\n // // Update the \"Selected Value\" label\n // selectedValue = event.detail.value;\n // const displayElement = document.querySelector('#selected-value');\n // if (displayElement) {\n // displayElement.textContent = selectedValue;\n // }\n\n // // Close the dropdown menu when an item is selected\n // const dropdownMenu = event.target;\n // const dropdownMenuElement = dropdownMenu.closest(\n // 'modus-wc-dropdown-menu'\n // );\n // if (dropdownMenuElement) {\n // dropdownMenuElement.menuVisible = false;\n // }\n // };\n // const menuItems = document.querySelectorAll('modus-wc-menu-item');\n // menuItems.forEach(item => {\n // item.addEventListener('itemSelect', handleItemSelect);\n // });\n</script>\n\n<div class=\"value\">\n Selected Value:\n <span id=\"selected-value\"></span>\n</div>",
122
+ "variations": [],
123
+ "args": {
124
+ "button-aria-label": "'Dropdown menu button'",
125
+ "button-color": "'primary'",
126
+ "button-shape": "'rectangle'",
127
+ "button-size": "'md'",
128
+ "button-variant": "'filled'",
129
+ "disabled": "false",
130
+ "menu-bordered": "true",
131
+ "menu-offset": "14",
132
+ "menu-placement": "'bottom-start'",
133
+ "menu-size": "'md'",
134
+ "menu-visible": "false"
135
+ },
136
+ "argTypes": {},
137
+ "usage": [],
138
+ "events": [
139
+ "menuVisibilityChange"
140
+ ]
141
+ },
142
+ "tag": "modus-wc-dropdown-menu",
143
+ "storyExample": {
144
+ "template": "<style>\n /* Storybook styling */\n div#story--components-dropdown-menu--default--primary-inner {\n display: flex;\n align-items: center;\n height: 240px;\n }\n\n [slot=\"button\"] {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .value {\n font-size: 14px;\n padding-top: 12px;\n }\n</style>\n\n\n\n<modus-wc-dropdown-menu\n button-aria-label=${ifDefined(args['button-aria-label'])}\n button-color=${ifDefined(args['button-color'])}\n button-shape=${ifDefined(args['button-shape'])}\n button-size=${ifDefined(args['button-size'])}\n button-variant=${ifDefined(args['button-variant'])}\n custom-class=${ifDefined(args['custom-class'])}\n ?disabled=${args.disabled}\n ?menu-bordered=${args['menu-bordered']}\n menu-offset=${ifDefined(args['menu-offset'])}\n menu-placement=${ifDefined(args['menu-placement'])}\n menu-size=${ifDefined(args['menu-size'])}\n ?menu-visible=${args['menu-visible']}\n>\n <div slot=\"button\">\n Button\n <modus-wc-icon name=\"expand_more\" size=\"sm\" />\n </div>\n\n <div slot=\"menu\">\n <modus-wc-menu-item label=\"Item One\" value=\"1\" @itemSelect=${handleItemSelect}></modus-wc-menu-item>\n <modus-wc-menu-item label=\"Item Two\" value=\"2\" @itemSelect=${handleItemSelect} /></modus-wc-menu-item>\n <modus-wc-menu-item label=\"Item Three\" value=\"3\" @itemSelect=${handleItemSelect} /></modus-wc-menu-item>\n </div>\n</modus-wc-dropdown-menu>\n<script>\n // // Adding this block to handle menu item selection to update a label and close the dropdown via JS.\n // let selectedValue = '';\n\n // const handleItemSelect = (event) => {\n // // Update the \"Selected Value\" label\n // selectedValue = event.detail.value;\n // const displayElement = document.querySelector('#selected-value');\n // if (displayElement) {\n // displayElement.textContent = selectedValue;\n // }\n\n // // Close the dropdown menu when an item is selected\n // const dropdownMenu = event.target;\n // const dropdownMenuElement = dropdownMenu.closest(\n // 'modus-wc-dropdown-menu'\n // );\n // if (dropdownMenuElement) {\n // dropdownMenuElement.menuVisible = false;\n // }\n // };\n // const menuItems = document.querySelectorAll('modus-wc-menu-item');\n // menuItems.forEach(item => {\n // item.addEventListener('itemSelect', handleItemSelect);\n // });\n</script>\n\n<div class=\"value\">\n Selected Value:\n <span id=\"selected-value\"></span>\n</div>",
145
+ "args": {
146
+ "button-aria-label": "'Dropdown menu button'",
147
+ "button-color": "'primary'",
148
+ "button-shape": "'rectangle'",
149
+ "button-size": "'md'",
150
+ "button-variant": "'filled'",
151
+ "disabled": "false",
152
+ "menu-bordered": "true",
153
+ "menu-offset": "14",
154
+ "menu-placement": "'bottom-start'",
155
+ "menu-size": "'md'",
156
+ "menu-visible": "false"
157
+ },
158
+ "argTypes": {},
159
+ "events": [
160
+ "menuVisibilityChange"
161
+ ],
162
+ "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 { DaisySize, ModusSize, PopoverPlacement } from '../types';\n\ninterface DropdownMenuArgs {\n 'button-aria-label'?: string;\n 'button-color'?: 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';\n 'button-shape'?: 'circle' | 'ellipse' | 'rectangle' | 'square';\n 'button-size'?: DaisySize;\n 'button-variant'?: 'borderless' | 'filled' | 'outlined';\n 'custom-class'?: string;\n disabled?: boolean;\n 'menu-bordered'?: boolean;\n 'menu-offset'?: number;\n 'menu-placement'?: PopoverPlacement;\n 'menu-size'?: ModusSize;\n 'menu-visible': boolean;\n}\n\nconst meta: Meta<DropdownMenuArgs> = {\n title: 'Components/Dropdown Menu',\n component: 'modus-wc-dropdown-menu',\n args: {\n 'button-aria-label': 'Dropdown menu button',\n 'button-color': 'primary',\n 'button-shape': 'rectangle',\n 'button-size': 'md',\n 'button-variant': 'filled',\n disabled: false,\n 'menu-bordered': true,\n 'menu-offset': 14,\n 'menu-placement': 'bottom-start',\n 'menu-size': 'md',\n 'menu-visible': false,\n },\n argTypes: {\n 'button-color': {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'tertiary', 'warning', 'danger'],\n },\n 'button-size': {\n control: { type: 'select' },\n options: ['xs', 'sm', 'md', 'lg'],\n },\n 'button-shape': {\n control: { type: 'select' },\n options: ['circle', 'ellipse', 'rectangle', 'square'],\n },\n 'button-variant': {\n control: { type: 'select' },\n options: ['borderless', 'filled', 'outlined'],\n },\n 'menu-placement': {\n control: { type: 'select' },\n options: [\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n 'right',\n 'right-start',\n 'right-end',\n ],\n },\n 'menu-size': {\n control: { type: 'select' },\n options: ['sm', 'md', 'lg'],\n },\n },\n decorators: [withActions],\n parameters: {\n actions: {\n handles: ['menuVisibilityChange'],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<DropdownMenuArgs>;\n\nconst Template: Story = {\n render: (args) => {\n let selectedValue = '';\n\n const handleItemSelect = (event: CustomEvent) => {\n selectedValue = event.detail.value;\n const displayElement = document.querySelector('#selected-value');\n if (displayElement) {\n displayElement.textContent = selectedValue;\n }\n\n // Close the dropdown menu when an item is selected\n const dropdownMenu = event.target as HTMLElement;\n const dropdownMenuElement = dropdownMenu.closest(\n 'modus-wc-dropdown-menu'\n );\n if (dropdownMenuElement) {\n dropdownMenuElement.menuVisible = false;\n }\n };\n\n // prettier-ignore\n return html`\n<style>\n /* Storybook styling */\n div#story--components-dropdown-menu--default--primary-inner {\n display: flex;\n align-items: center;\n height: 240px;\n }\n\n [slot=\"button\"] {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .value {\n font-size: 14px;\n padding-top: 12px;\n }\n</style>\n\n\n\n<modus-wc-dropdown-menu\n button-aria-label=${ifDefined(args['button-aria-label'])}\n button-color=${ifDefined(args['button-color'])}\n button-shape=${ifDefined(args['button-shape'])}\n button-size=${ifDefined(args['button-size'])}\n button-variant=${ifDefined(args['button-variant'])}\n custom-class=${ifDefined(args['custom-class'])}\n ?disabled=${args.disabled}\n ?menu-bordered=${args['menu-bordered']}\n menu-offset=${ifDefined(args['menu-offset'])}\n menu-placement=${ifDefined(args['menu-placement'])}\n menu-size=${ifDefined(args['menu-size'])}\n ?menu-visible=${args['menu-visible']}\n>\n <div slot=\"button\">\n Button\n <modus-wc-icon name=\"expand_more\" size=\"sm\" />\n </div>\n\n <div slot=\"menu\">\n <modus-wc-menu-item label=\"Item One\" value=\"1\" @itemSelect=${handleItemSelect}></modus-wc-menu-item>\n <modus-wc-menu-item label=\"Item Two\" value=\"2\" @itemSelect=${handleItemSelect} /></modus-wc-menu-item>\n <modus-wc-menu-item label=\"Item Three\" value=\"3\" @itemSelect=${handleItemSelect} /></modus-wc-menu-item>\n </div>\n</modus-wc-dropdown-menu>\n<script>\n // // Adding this block to handle menu item selection to update a label and close the dropdown via JS.\n // let selectedValue = '';\n\n // const handleItemSelect = (event) => {\n // // Update the \"Selected Value\" label\n // selectedValue = event.detail.value;\n // const displayElement = document.querySelector('#selected-value');\n // if (displayElement) {\n // displayElement.textContent = selectedValue;\n // }\n\n // // Close the dropdown menu when an item is selected\n // const dropdownMenu = event.target;\n // const dropdownMenuElement = dropdownMenu.closest(\n // 'modus-wc-dropdown-menu'\n // );\n // if (dropdownMenuElement) {\n // dropdownMenuElement.menuVisible = false;\n // }\n // };\n // const menuItems = document.querySelectorAll('modus-wc-menu-item');\n // menuItems.forEach(item => {\n // item.addEventListener('itemSelect', handleItemSelect);\n // });\n</script>\n\n<div class=\"value\">\n Selected Value:\n <span id=\"selected-value\"></span>\n</div>\n `;\n },\n};\n\nexport const Default: Story = { ...Template };\n\nexport const IconOnlyDropdownMenu: Story = {\n render: () => {\n // prettier-ignore\n return html`\n<style>\n /* Storybook styling */\n div[id^='story--components-dropdown-menu--icon-only-dropdown-menu'] {\n height: 60px;\n }\n</style>\n\n<modus-wc-dropdown-menu button-shape=\"square\">\n <div slot=\"button\">\n <modus-wc-icon decorative name=\"more_vertical\"></modus-wc-icon>\n </div>\n <div slot=\"menu\">\n <modus-wc-menu-item label=\"Item One\"></modus-wc-menu-item>\n </div>\n</modus-wc-dropdown-menu>\n `;\n },\n};\n"
163
+ }
164
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "description": "A component for displaying Trimble product logos with support for both fixed and scalable sizing. Provides consistent branding across applications with various product logo options. Logo colors automatically adapt to the active Modus theme via CSS variables.",
3
+ "properties": [
4
+ {
5
+ "name": "name",
6
+ "type": "LogoName",
7
+ "description": "The name of the logo to display. Accepts values like 'trimble', 'viewpoint_field_view', etc.",
8
+ "default": null,
9
+ "mutable": false,
10
+ "end_line": 37
11
+ },
12
+ {
13
+ "name": "emblem",
14
+ "type": "boolean",
15
+ "description": "Show emblem version (icon only) instead of full logo",
16
+ "default": "false",
17
+ "mutable": false,
18
+ "end_line": 40
19
+ },
20
+ {
21
+ "name": "customClass",
22
+ "type": "string",
23
+ "description": "Custom CSS class to apply to the logo container.",
24
+ "default": "''",
25
+ "mutable": false,
26
+ "end_line": 43
27
+ },
28
+ {
29
+ "name": "alt",
30
+ "type": "string",
31
+ "description": "The alt text for accessibility. If not provided, defaults to the logo name.",
32
+ "default": null,
33
+ "mutable": false,
34
+ "end_line": 46
35
+ }
36
+ ],
37
+ "events": [],
38
+ "methods": [],
39
+ "slots": [],
40
+ "examples": {
41
+ "basic": "<modus-wc-logo\n name=\"${args.name}\"\n ?emblem=\"${args.emblem}\"\n alt=\"${ifDefined(args.alt)}\"\n custom-class=\"${ifDefined(args['custom-class'])}\"\n ></modus-wc-logo>",
42
+ "variations": [],
43
+ "args": {
44
+ "name": "'trimble'",
45
+ "emblem": "false"
46
+ },
47
+ "argTypes": {},
48
+ "usage": []
49
+ },
50
+ "tag": "modus-wc-logo",
51
+ "storyExample": {
52
+ "template": "<modus-wc-logo\n name=\"${args.name}\"\n ?emblem=\"${args.emblem}\"\n alt=\"${ifDefined(args.alt)}\"\n custom-class=\"${ifDefined(args['custom-class'])}\"\n ></modus-wc-logo>",
53
+ "args": {
54
+ "name": "'trimble'",
55
+ "emblem": "false"
56
+ },
57
+ "argTypes": {},
58
+ "events": [],
59
+ "fullContent": "import { Meta, StoryObj } from '@storybook/web-components';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { getAvailableLogos, LogoName } from './logo-constants';\n\ninterface LogoArgs {\n name: LogoName;\n emblem: boolean;\n alt?: string;\n 'custom-class'?: string;\n}\n\nconst meta: Meta<LogoArgs> = {\n title: 'Components/Logo',\n component: 'modus-wc-logo',\n args: {\n name: 'trimble',\n emblem: false,\n },\n argTypes: {\n name: {\n control: { type: 'select' },\n options: getAvailableLogos(),\n },\n emblem: {\n control: { type: 'boolean' },\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<LogoArgs>;\n\nconst Template: Story = {\n render: (args) => {\n return html`\n <modus-wc-logo\n name=\"${args.name}\"\n ?emblem=\"${args.emblem}\"\n alt=\"${ifDefined(args.alt)}\"\n custom-class=\"${ifDefined(args['custom-class'])}\"\n ></modus-wc-logo>\n `;\n },\n};\n\nexport const Default: Story = { ...Template };\n\nexport const CustomSizeWithClass: Story = {\n render: () => {\n return html`\n <style>\n .logo-small {\n width: 80px;\n }\n .logo-medium {\n width: 150px;\n }\n .logo-large {\n width: 250px;\n }\n .emblem-xs {\n width: 80px;\n height: 80px;\n }\n .emblem-sm {\n width: 150px;\n height: 150px;\n }\n .emblem-lg {\n width: 250px;\n height: 250px;\n }\n </style>\n <div style=\"display: flex; flex-direction: column; gap: 3rem;\">\n <div>\n <h4>Full Logos - Custom Sizes</h4>\n <div\n style=\"display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;\"\n >\n <modus-wc-logo\n name=\"trimble\"\n custom-class=\"logo-small\"\n ></modus-wc-logo>\n <modus-wc-logo\n name=\"trimble\"\n custom-class=\"logo-medium\"\n ></modus-wc-logo>\n <modus-wc-logo\n name=\"trimble\"\n custom-class=\"logo-large\"\n ></modus-wc-logo>\n </div>\n </div>\n\n <div>\n <h4>Emblems - Custom Sizes</h4>\n <div\n style=\"display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;\"\n >\n <modus-wc-logo\n name=\"trimble\"\n emblem\n custom-class=\"emblem-xs\"\n ></modus-wc-logo>\n <modus-wc-logo\n name=\"trimble\"\n emblem\n custom-class=\"emblem-sm\"\n ></modus-wc-logo>\n <modus-wc-logo\n name=\"trimble\"\n emblem\n custom-class=\"emblem-lg\"\n ></modus-wc-logo>\n </div>\n </div>\n </div>\n </div>\n `;\n },\n};\n"
60
+ }
61
+ }