@krumio/trailhand-ui 1.4.1 → 1.5.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 (70) hide show
  1. package/README.md +119 -52
  2. package/dist/components/action-menu/action-menu.d.ts +79 -0
  3. package/dist/components/action-menu/action-menu.d.ts.map +1 -0
  4. package/dist/components/action-menu/action-menu.js +333 -0
  5. package/dist/components/action-menu/action-menu.js.map +1 -0
  6. package/dist/components/action-menu/action-menu.stories.d.ts +261 -0
  7. package/dist/components/action-menu/action-menu.stories.d.ts.map +1 -0
  8. package/dist/components/action-menu/action-menu.stories.js +363 -0
  9. package/dist/components/action-menu/action-menu.stories.js.map +1 -0
  10. package/dist/components/action-menu/index.d.ts +2 -0
  11. package/dist/components/action-menu/index.d.ts.map +1 -0
  12. package/dist/components/action-menu/index.js +2 -0
  13. package/dist/components/action-menu/index.js.map +1 -0
  14. package/dist/components/data-table/data-table.d.ts +191 -0
  15. package/dist/components/data-table/data-table.d.ts.map +1 -0
  16. package/dist/components/data-table/data-table.js +857 -0
  17. package/dist/components/data-table/data-table.js.map +1 -0
  18. package/dist/components/data-table/data-table.stories.d.ts +507 -0
  19. package/dist/components/data-table/data-table.stories.d.ts.map +1 -0
  20. package/dist/components/data-table/data-table.stories.js +601 -0
  21. package/dist/components/data-table/data-table.stories.js.map +1 -0
  22. package/dist/components/data-table/index.d.ts +2 -0
  23. package/dist/components/data-table/index.d.ts.map +1 -0
  24. package/dist/components/data-table/index.js +2 -0
  25. package/dist/components/data-table/index.js.map +1 -0
  26. package/dist/components/th-card/index.d.ts +3 -0
  27. package/dist/components/th-card/index.d.ts.map +1 -0
  28. package/dist/components/th-card/index.js +2 -0
  29. package/dist/components/th-card/index.js.map +1 -0
  30. package/dist/components/th-card/th-card.d.ts +78 -0
  31. package/dist/components/th-card/th-card.d.ts.map +1 -0
  32. package/dist/components/th-card/th-card.js +449 -0
  33. package/dist/components/th-card/th-card.js.map +1 -0
  34. package/dist/components/th-card/th-card.stories.d.ts +232 -0
  35. package/dist/components/th-card/th-card.stories.d.ts.map +1 -0
  36. package/dist/components/th-card/th-card.stories.js +385 -0
  37. package/dist/components/th-card/th-card.stories.js.map +1 -0
  38. package/dist/components/th-tag/index.d.ts +3 -0
  39. package/dist/components/th-tag/index.d.ts.map +1 -0
  40. package/dist/components/th-tag/index.js +2 -0
  41. package/dist/components/th-tag/index.js.map +1 -0
  42. package/dist/components/th-tag/th-tag.d.ts +65 -0
  43. package/dist/components/th-tag/th-tag.d.ts.map +1 -0
  44. package/dist/components/th-tag/th-tag.js +307 -0
  45. package/dist/components/th-tag/th-tag.js.map +1 -0
  46. package/dist/components/th-tag/th-tag.stories.d.ts +277 -0
  47. package/dist/components/th-tag/th-tag.stories.d.ts.map +1 -0
  48. package/dist/components/th-tag/th-tag.stories.js +415 -0
  49. package/dist/components/th-tag/th-tag.stories.js.map +1 -0
  50. package/dist/components/toggle-switch/index.d.ts +2 -0
  51. package/dist/components/toggle-switch/index.d.ts.map +1 -0
  52. package/dist/components/toggle-switch/index.js +2 -0
  53. package/dist/components/toggle-switch/index.js.map +1 -0
  54. package/dist/components/toggle-switch/toggle-switch.d.ts +38 -0
  55. package/dist/components/toggle-switch/toggle-switch.d.ts.map +1 -0
  56. package/dist/components/toggle-switch/toggle-switch.js +175 -0
  57. package/dist/components/toggle-switch/toggle-switch.js.map +1 -0
  58. package/dist/components/toggle-switch/toggle-switch.stories.d.ts +239 -0
  59. package/dist/components/toggle-switch/toggle-switch.stories.d.ts.map +1 -0
  60. package/dist/components/toggle-switch/toggle-switch.stories.js +408 -0
  61. package/dist/components/toggle-switch/toggle-switch.stories.js.map +1 -0
  62. package/dist/design-system/color-palette.stories.d.ts +24 -0
  63. package/dist/design-system/color-palette.stories.d.ts.map +1 -0
  64. package/dist/design-system/color-palette.stories.js +361 -0
  65. package/dist/design-system/color-palette.stories.js.map +1 -0
  66. package/dist/index.d.ts +4 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.js +5 -0
  69. package/dist/index.js.map +1 -0
  70. package/package.json +11 -8
@@ -0,0 +1,261 @@
1
+ declare namespace _default {
2
+ let title: string;
3
+ let tags: string[];
4
+ function render(args: any): HTMLElement;
5
+ namespace argTypes {
6
+ namespace actions {
7
+ let control: string;
8
+ let description: string;
9
+ }
10
+ namespace resource {
11
+ let control_1: string;
12
+ export { control_1 as control };
13
+ let description_1: string;
14
+ export { description_1 as description };
15
+ }
16
+ namespace disabled {
17
+ let control_2: string;
18
+ export { control_2 as control };
19
+ let description_2: string;
20
+ export { description_2 as description };
21
+ export let defaultValue: boolean;
22
+ }
23
+ }
24
+ namespace parameters {
25
+ namespace docs {
26
+ export namespace description_3 {
27
+ let component: string;
28
+ }
29
+ export { description_3 as description };
30
+ }
31
+ }
32
+ }
33
+ export default _default;
34
+ export namespace Default {
35
+ export namespace args {
36
+ let actions_1: ({
37
+ label: string;
38
+ action: (resource: any) => void;
39
+ danger?: undefined;
40
+ } | {
41
+ label: string;
42
+ action: (resource: any) => void;
43
+ danger: boolean;
44
+ })[];
45
+ export { actions_1 as actions };
46
+ export namespace resource_1 {
47
+ let id: number;
48
+ let name: string;
49
+ }
50
+ export { resource_1 as resource };
51
+ }
52
+ export namespace parameters_1 {
53
+ export namespace docs_1 {
54
+ namespace source {
55
+ let code: string;
56
+ }
57
+ }
58
+ export { docs_1 as docs };
59
+ }
60
+ export { parameters_1 as parameters };
61
+ }
62
+ export namespace WithDividers {
63
+ export namespace args_1 {
64
+ let actions_2: ({
65
+ label: string;
66
+ action: (resource: any) => void;
67
+ divider?: undefined;
68
+ danger?: undefined;
69
+ } | {
70
+ divider: boolean;
71
+ label?: undefined;
72
+ action?: undefined;
73
+ danger?: undefined;
74
+ } | {
75
+ label: string;
76
+ action: (resource: any) => void;
77
+ danger: boolean;
78
+ divider?: undefined;
79
+ })[];
80
+ export { actions_2 as actions };
81
+ export namespace resource_2 {
82
+ let id_1: number;
83
+ export { id_1 as id };
84
+ let name_1: string;
85
+ export { name_1 as name };
86
+ }
87
+ export { resource_2 as resource };
88
+ }
89
+ export { args_1 as args };
90
+ export namespace parameters_2 {
91
+ export namespace docs_2 {
92
+ export namespace description_4 {
93
+ let story: string;
94
+ }
95
+ export { description_4 as description };
96
+ }
97
+ export { docs_2 as docs };
98
+ }
99
+ export { parameters_2 as parameters };
100
+ }
101
+ export namespace ConditionalVisibility {
102
+ export namespace args_2 {
103
+ let actions_3: ({
104
+ label: string;
105
+ action: (resource: any) => void;
106
+ visible: (resource: any) => any;
107
+ danger?: undefined;
108
+ } | {
109
+ label: string;
110
+ action: (resource: any) => void;
111
+ danger: boolean;
112
+ visible: (resource: any) => any;
113
+ })[];
114
+ export { actions_3 as actions };
115
+ export namespace resource_3 {
116
+ let id_2: number;
117
+ export { id_2 as id };
118
+ let name_2: string;
119
+ export { name_2 as name };
120
+ export let status: string;
121
+ export let canEdit: boolean;
122
+ export let canDelete: boolean;
123
+ }
124
+ export { resource_3 as resource };
125
+ }
126
+ export { args_2 as args };
127
+ export namespace parameters_3 {
128
+ export namespace docs_3 {
129
+ export namespace description_5 {
130
+ let story_1: string;
131
+ export { story_1 as story };
132
+ }
133
+ export { description_5 as description };
134
+ }
135
+ export { docs_3 as docs };
136
+ }
137
+ export { parameters_3 as parameters };
138
+ }
139
+ export namespace DisabledActions {
140
+ export namespace args_3 {
141
+ let actions_4: ({
142
+ label: string;
143
+ action: (resource: any) => void;
144
+ enabled: (resource: any) => any;
145
+ danger?: undefined;
146
+ } | {
147
+ label: string;
148
+ action: (resource: any) => void;
149
+ enabled: boolean;
150
+ danger?: undefined;
151
+ } | {
152
+ label: string;
153
+ action: (resource: any) => void;
154
+ enabled?: undefined;
155
+ danger?: undefined;
156
+ } | {
157
+ label: string;
158
+ action: (resource: any) => void;
159
+ danger: boolean;
160
+ enabled: (resource: any) => any;
161
+ })[];
162
+ export { actions_4 as actions };
163
+ export namespace resource_4 {
164
+ let id_3: number;
165
+ export { id_3 as id };
166
+ let name_3: string;
167
+ export { name_3 as name };
168
+ export let isEditable: boolean;
169
+ export let isDeletable: boolean;
170
+ }
171
+ export { resource_4 as resource };
172
+ }
173
+ export { args_3 as args };
174
+ export namespace parameters_4 {
175
+ export namespace docs_4 {
176
+ export namespace description_6 {
177
+ let story_2: string;
178
+ export { story_2 as story };
179
+ }
180
+ export { description_6 as description };
181
+ }
182
+ export { docs_4 as docs };
183
+ }
184
+ export { parameters_4 as parameters };
185
+ }
186
+ export namespace DisabledMenu {
187
+ export namespace args_4 {
188
+ let actions_5: ({
189
+ label: string;
190
+ action: (resource: any) => void;
191
+ danger?: undefined;
192
+ } | {
193
+ label: string;
194
+ action: (resource: any) => void;
195
+ danger: boolean;
196
+ })[];
197
+ export { actions_5 as actions };
198
+ export namespace resource_5 {
199
+ let id_4: number;
200
+ export { id_4 as id };
201
+ let name_4: string;
202
+ export { name_4 as name };
203
+ }
204
+ export { resource_5 as resource };
205
+ let disabled_1: boolean;
206
+ export { disabled_1 as disabled };
207
+ }
208
+ export { args_4 as args };
209
+ export namespace parameters_5 {
210
+ export namespace docs_5 {
211
+ export namespace description_7 {
212
+ let story_3: string;
213
+ export { story_3 as story };
214
+ }
215
+ export { description_7 as description };
216
+ }
217
+ export { docs_5 as docs };
218
+ }
219
+ export { parameters_5 as parameters };
220
+ }
221
+ export namespace EmptyMenu {
222
+ export namespace args_5 {
223
+ let actions_6: never[];
224
+ export { actions_6 as actions };
225
+ export namespace resource_6 {
226
+ let id_5: number;
227
+ export { id_5 as id };
228
+ let name_5: string;
229
+ export { name_5 as name };
230
+ }
231
+ export { resource_6 as resource };
232
+ }
233
+ export { args_5 as args };
234
+ export namespace parameters_6 {
235
+ export namespace docs_6 {
236
+ export namespace description_8 {
237
+ let story_4: string;
238
+ export { story_4 as story };
239
+ }
240
+ export { description_8 as description };
241
+ }
242
+ export { docs_6 as docs };
243
+ }
244
+ export { parameters_6 as parameters };
245
+ }
246
+ export namespace InTableContext {
247
+ export function render_1(): HTMLDivElement;
248
+ export { render_1 as render };
249
+ export namespace parameters_7 {
250
+ export namespace docs_7 {
251
+ export namespace description_9 {
252
+ let story_5: string;
253
+ export { story_5 as story };
254
+ }
255
+ export { description_9 as description };
256
+ }
257
+ export { docs_7 as docs };
258
+ }
259
+ export { parameters_7 as parameters };
260
+ }
261
+ //# sourceMappingURL=action-menu.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-menu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/action-menu/action-menu.stories.js"],"names":[],"mappings":";;;IASU,wCAYP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0QO,2CA2FP"}
@@ -0,0 +1,363 @@
1
+ import './action-menu.ts';
2
+ /**
3
+ * The ActionMenu component provides a dropdown menu for contextual actions.
4
+ * Typically used in table rows or cards to display available operations.
5
+ */
6
+ export default {
7
+ title: 'Components/ActionMenu',
8
+ tags: ['autodocs'],
9
+ render: (args) => {
10
+ const menu = document.createElement('action-menu');
11
+ if (args.actions)
12
+ menu.actions = args.actions;
13
+ if (args.resource)
14
+ menu.resource = args.resource;
15
+ if (args.disabled !== undefined)
16
+ menu.disabled = args.disabled;
17
+ menu.addEventListener('action-click', (e) => {
18
+ console.log('Action clicked:', e.detail);
19
+ });
20
+ return menu;
21
+ },
22
+ argTypes: {
23
+ actions: {
24
+ control: 'object',
25
+ description: 'Array of action objects with label, action, enabled, visible, danger, and divider properties',
26
+ },
27
+ resource: {
28
+ control: 'object',
29
+ description: 'The resource object passed to action handlers',
30
+ },
31
+ disabled: {
32
+ control: 'boolean',
33
+ description: 'Whether the menu button is disabled',
34
+ defaultValue: false,
35
+ },
36
+ },
37
+ parameters: {
38
+ docs: {
39
+ description: {
40
+ component: `
41
+ A dropdown action menu component for displaying contextual actions.
42
+
43
+ **Features:**
44
+ - Configurable actions with labels and handlers
45
+ - Conditional visibility and enabled state
46
+ - Support for danger/destructive actions
47
+ - Dividers for grouping actions
48
+ - Automatic click-outside handling
49
+ - Custom event dispatching
50
+ `.trim(),
51
+ },
52
+ },
53
+ },
54
+ };
55
+ /**
56
+ * Default action menu with basic actions
57
+ */
58
+ export const Default = {
59
+ args: {
60
+ actions: [
61
+ {
62
+ label: 'Edit',
63
+ action: (resource) => console.log('Edit:', resource),
64
+ },
65
+ {
66
+ label: 'Duplicate',
67
+ action: (resource) => console.log('Duplicate:', resource),
68
+ },
69
+ {
70
+ label: 'Delete',
71
+ action: (resource) => console.log('Delete:', resource),
72
+ danger: true,
73
+ },
74
+ ],
75
+ resource: { id: 1, name: 'Sample Item' },
76
+ },
77
+ parameters: {
78
+ docs: {
79
+ source: {
80
+ code: `<action-menu></action-menu>
81
+
82
+ <script>
83
+ const menu = document.querySelector('action-menu');
84
+ menu.actions = [
85
+ { label: 'Edit', action: (resource) => console.log('Edit:', resource) },
86
+ { label: 'Duplicate', action: (resource) => console.log('Duplicate:', resource) },
87
+ { label: 'Delete', action: (resource) => console.log('Delete:', resource), danger: true }
88
+ ];
89
+ menu.resource = { id: 1, name: 'Sample Item' };
90
+ </script>`,
91
+ },
92
+ },
93
+ },
94
+ };
95
+ /**
96
+ * Action menu with dividers for grouping
97
+ */
98
+ export const WithDividers = {
99
+ args: {
100
+ actions: [
101
+ {
102
+ label: 'View Details',
103
+ action: (resource) => console.log('View:', resource),
104
+ },
105
+ {
106
+ label: 'Edit',
107
+ action: (resource) => console.log('Edit:', resource),
108
+ },
109
+ {
110
+ divider: true,
111
+ },
112
+ {
113
+ label: 'Share',
114
+ action: (resource) => console.log('Share:', resource),
115
+ },
116
+ {
117
+ label: 'Export',
118
+ action: (resource) => console.log('Export:', resource),
119
+ },
120
+ {
121
+ divider: true,
122
+ },
123
+ {
124
+ label: 'Archive',
125
+ action: (resource) => console.log('Archive:', resource),
126
+ },
127
+ {
128
+ label: 'Delete',
129
+ action: (resource) => console.log('Delete:', resource),
130
+ danger: true,
131
+ },
132
+ ],
133
+ resource: { id: 2, name: 'Project Alpha' },
134
+ },
135
+ parameters: {
136
+ docs: {
137
+ description: {
138
+ story: 'Use dividers to group related actions for better organization.',
139
+ },
140
+ },
141
+ },
142
+ };
143
+ /**
144
+ * Action menu with conditional visibility
145
+ */
146
+ export const ConditionalVisibility = {
147
+ args: {
148
+ actions: [
149
+ {
150
+ label: 'Edit',
151
+ action: (resource) => console.log('Edit:', resource),
152
+ visible: (resource) => resource.canEdit,
153
+ },
154
+ {
155
+ label: 'Publish',
156
+ action: (resource) => console.log('Publish:', resource),
157
+ visible: (resource) => resource.status === 'draft',
158
+ },
159
+ {
160
+ label: 'Unpublish',
161
+ action: (resource) => console.log('Unpublish:', resource),
162
+ visible: (resource) => resource.status === 'published',
163
+ },
164
+ {
165
+ label: 'Delete',
166
+ action: (resource) => console.log('Delete:', resource),
167
+ danger: true,
168
+ visible: (resource) => resource.canDelete,
169
+ },
170
+ ],
171
+ resource: {
172
+ id: 3,
173
+ name: 'Blog Post',
174
+ status: 'draft',
175
+ canEdit: true,
176
+ canDelete: true,
177
+ },
178
+ },
179
+ parameters: {
180
+ docs: {
181
+ description: {
182
+ story: 'Actions can be conditionally shown/hidden based on the resource state.',
183
+ },
184
+ },
185
+ },
186
+ };
187
+ /**
188
+ * Action menu with disabled actions
189
+ */
190
+ export const DisabledActions = {
191
+ args: {
192
+ actions: [
193
+ {
194
+ label: 'Edit',
195
+ action: (resource) => console.log('Edit:', resource),
196
+ enabled: (resource) => resource.isEditable,
197
+ },
198
+ {
199
+ label: 'Share',
200
+ action: (resource) => console.log('Share:', resource),
201
+ enabled: false,
202
+ },
203
+ {
204
+ label: 'Download',
205
+ action: (resource) => console.log('Download:', resource),
206
+ },
207
+ {
208
+ label: 'Delete',
209
+ action: (resource) => console.log('Delete:', resource),
210
+ danger: true,
211
+ enabled: (resource) => resource.isDeletable,
212
+ },
213
+ ],
214
+ resource: {
215
+ id: 4,
216
+ name: 'Document',
217
+ isEditable: false,
218
+ isDeletable: true,
219
+ },
220
+ },
221
+ parameters: {
222
+ docs: {
223
+ description: {
224
+ story: 'Actions can be disabled based on conditions or static configuration.',
225
+ },
226
+ },
227
+ },
228
+ };
229
+ /**
230
+ * Disabled menu button
231
+ */
232
+ export const DisabledMenu = {
233
+ args: {
234
+ actions: [
235
+ {
236
+ label: 'Edit',
237
+ action: (resource) => console.log('Edit:', resource),
238
+ },
239
+ {
240
+ label: 'Delete',
241
+ action: (resource) => console.log('Delete:', resource),
242
+ danger: true,
243
+ },
244
+ ],
245
+ resource: { id: 5, name: 'Locked Item' },
246
+ disabled: true,
247
+ },
248
+ parameters: {
249
+ docs: {
250
+ description: {
251
+ story: 'The entire menu can be disabled when actions are not available.',
252
+ },
253
+ },
254
+ },
255
+ };
256
+ /**
257
+ * Empty action menu
258
+ */
259
+ export const EmptyMenu = {
260
+ args: {
261
+ actions: [],
262
+ resource: { id: 6, name: 'No Actions Item' },
263
+ },
264
+ parameters: {
265
+ docs: {
266
+ description: {
267
+ story: 'When no actions are available, an empty state is shown.',
268
+ },
269
+ },
270
+ },
271
+ };
272
+ /**
273
+ * In a table row context
274
+ */
275
+ export const InTableContext = {
276
+ render: () => {
277
+ const container = document.createElement('div');
278
+ container.style.cssText =
279
+ 'border: 1px solid var(--color-border, #D7D7D7); border-radius: 4px; overflow: hidden;';
280
+ const table = document.createElement('table');
281
+ table.style.cssText =
282
+ 'width: 100%; border-collapse: collapse; background: var(--color-white, #FFFFFF);';
283
+ const thead = document.createElement('thead');
284
+ thead.style.cssText = 'background: var(--color-grey-100, #FAFAFA);';
285
+ thead.innerHTML = `
286
+ <tr>
287
+ <th style="padding: 12px; text-align: left; font-weight: 600;">Name</th>
288
+ <th style="padding: 12px; text-align: left; font-weight: 600;">Status</th>
289
+ <th style="padding: 12px; text-align: left; font-weight: 600;">Created</th>
290
+ <th style="padding: 12px; width: 40px;"></th>
291
+ </tr>
292
+ `;
293
+ const tbody = document.createElement('tbody');
294
+ const items = [
295
+ { id: 1, name: 'Project Alpha', status: 'Active', created: '2024-01-15' },
296
+ { id: 2, name: 'Project Beta', status: 'Draft', created: '2024-02-20' },
297
+ {
298
+ id: 3,
299
+ name: 'Project Gamma',
300
+ status: 'Archived',
301
+ created: '2024-03-10',
302
+ },
303
+ ];
304
+ items.forEach((item, index) => {
305
+ const row = document.createElement('tr');
306
+ row.style.cssText = 'border-top: 1px solid var(--color-border, #D7D7D7);';
307
+ const nameCell = document.createElement('td');
308
+ nameCell.style.cssText = 'padding: 12px;';
309
+ nameCell.textContent = item.name;
310
+ const statusCell = document.createElement('td');
311
+ statusCell.style.cssText = 'padding: 12px;';
312
+ statusCell.textContent = item.status;
313
+ const createdCell = document.createElement('td');
314
+ createdCell.style.cssText = 'padding: 12px;';
315
+ createdCell.textContent = item.created;
316
+ const actionCell = document.createElement('td');
317
+ actionCell.style.cssText = 'padding: 8px; text-align: center;';
318
+ const menu = document.createElement('action-menu');
319
+ menu.resource = item;
320
+ menu.actions = [
321
+ {
322
+ label: 'Edit',
323
+ action: (resource) => alert(`Edit: ${resource.name}`),
324
+ },
325
+ {
326
+ label: 'Duplicate',
327
+ action: (resource) => alert(`Duplicate: ${resource.name}`),
328
+ },
329
+ {
330
+ divider: true,
331
+ },
332
+ {
333
+ label: 'Archive',
334
+ action: (resource) => alert(`Archive: ${resource.name}`),
335
+ visible: (resource) => resource.status !== 'Archived',
336
+ },
337
+ {
338
+ label: 'Delete',
339
+ action: (resource) => alert(`Delete: ${resource.name}`),
340
+ danger: true,
341
+ },
342
+ ];
343
+ actionCell.appendChild(menu);
344
+ row.appendChild(nameCell);
345
+ row.appendChild(statusCell);
346
+ row.appendChild(createdCell);
347
+ row.appendChild(actionCell);
348
+ tbody.appendChild(row);
349
+ });
350
+ table.appendChild(thead);
351
+ table.appendChild(tbody);
352
+ container.appendChild(table);
353
+ return container;
354
+ },
355
+ parameters: {
356
+ docs: {
357
+ description: {
358
+ story: 'Example of ActionMenu used in a table row, showing typical usage with row data.',
359
+ },
360
+ },
361
+ },
362
+ };
363
+ //# sourceMappingURL=action-menu.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-menu.stories.js","sourceRoot":"","sources":["../../../src/components/action-menu/action-menu.stories.js"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B;;;GAGG;AACH,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QAEnD,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC9C,IAAI,IAAI,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjD,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE/D,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE;YAC1C,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,WAAW,EACT,8FAA8F;SACjG;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,+CAA+C;SAC7D;QACD,QAAQ,EAAE;YACR,OAAO,E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AI,EAAE,CAAC;iBAC3D;gBACD;oBACE,OAAO,EAAE,IAAI;iBACd;gBACD;oBACE,KAAK,EAAE,SAAS;oBAChB,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,QAAQ,CAAC,IAAI,EAAE,CAAC;oBACxD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU;iBACtD;gBACD;oBACE,KAAK,EAAE,QAAQ;oBACf,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,QAAQ,CAAC,IAAI,EAAE,CAAC;oBACvD,MAAM,EAAE,IAAI;iBACb;aACF,CAAC;YAEF,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC7B,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAC1B,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC5B,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAC7B,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC5B,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzB,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAE7B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,KAAK,EACH,iFAAiF;aACpF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ActionMenu } from './action-menu';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/action-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ActionMenu } from './action-menu';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/action-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}