@genesislcap/foundation-ui 15.42.0 → 15.43.0-FUI-2629.1
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.
- package/dist/custom-elements.json +1454 -802
- package/dist/dts/actions-menu/actions-menu.d.ts +3 -0
- package/dist/dts/actions-menu/actions-menu.d.ts.map +1 -1
- package/dist/dts/base-components.d.ts +1 -0
- package/dist/dts/base-components.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/react.d.ts +19 -9
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/popover-position.d.ts +26 -0
- package/dist/dts/utils/popover-position.d.ts.map +1 -0
- package/dist/dts/vertical-dropdown-menu/index.d.ts +4 -0
- package/dist/dts/vertical-dropdown-menu/index.d.ts.map +1 -0
- package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.d.ts +67 -0
- package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.d.ts.map +1 -0
- package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.styles.d.ts +5 -0
- package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.styles.d.ts.map +1 -0
- package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.template.d.ts +5 -0
- package/dist/dts/vertical-dropdown-menu/vertical-dropdown-menu.template.d.ts.map +1 -0
- package/dist/esm/actions-menu/actions-menu.js +17 -2
- package/dist/esm/base-components.js +2 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/popover-position.js +70 -0
- package/dist/esm/vertical-dropdown-menu/index.js +3 -0
- package/dist/esm/vertical-dropdown-menu/vertical-dropdown-menu.js +155 -0
- package/dist/esm/vertical-dropdown-menu/vertical-dropdown-menu.styles.js +55 -0
- package/dist/esm/vertical-dropdown-menu/vertical-dropdown-menu.template.js +64 -0
- package/dist/foundation-ui.api.json +1281 -78
- package/dist/foundation-ui.d.ts +78 -0
- package/dist/react.cjs +13 -6
- package/dist/react.mjs +11 -5
- package/package.json +18 -18
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { html, ref, repeat, when } from '@microsoft/fast-element';
|
|
2
|
+
import { getPrefix } from '../utils';
|
|
3
|
+
export const verticalDropdownMenuTemplate = (prefix) => html `
|
|
4
|
+
<${prefix}-button
|
|
5
|
+
${ref('menuOpener')}
|
|
6
|
+
class="menu-opener${(x) => (x.open ? ' opened' : '')}"
|
|
7
|
+
appearance="${(x) => x.buttonAppearance}"
|
|
8
|
+
part="menu-opener"
|
|
9
|
+
aria-label="More actions"
|
|
10
|
+
@click=${(x) => x.toggleVisibility()}
|
|
11
|
+
>
|
|
12
|
+
<${prefix}-icon name="${(x) => x.iconName}"></${prefix}-icon>
|
|
13
|
+
</${prefix}-button>
|
|
14
|
+
<${prefix}-menu
|
|
15
|
+
${ref('dropdownMenu')}
|
|
16
|
+
popover="auto"
|
|
17
|
+
class="dropdown-menu ${(x) => x.classNames}"
|
|
18
|
+
part="dropdown-menu"
|
|
19
|
+
@toggle=${(x, c) => x.onPopoverToggle(c.event)}
|
|
20
|
+
>
|
|
21
|
+
${repeat((x) => x.visibleItems, html `
|
|
22
|
+
${when((x, context) => x.isDisabled && x.isDisabled(context.parent.rowData), html `
|
|
23
|
+
<${prefix}-menu-item
|
|
24
|
+
class="menu-item"
|
|
25
|
+
tabindex="${(x, context) => context.index}"
|
|
26
|
+
disabled
|
|
27
|
+
>
|
|
28
|
+
${when((x) => x.icon, html `
|
|
29
|
+
<${prefix}-icon
|
|
30
|
+
name=${(x) => x.icon.name}
|
|
31
|
+
size=${(x) => x.icon.size}
|
|
32
|
+
variant=${(x) => x.icon.variant}
|
|
33
|
+
slot="start"
|
|
34
|
+
></${prefix}-icon>
|
|
35
|
+
`)}
|
|
36
|
+
${(x, ctx) => ctx.parent.getLabel(x.label)}
|
|
37
|
+
</${prefix}-menu-item>
|
|
38
|
+
`)}
|
|
39
|
+
${when((x, context) => !x.isDisabled || !x.isDisabled(context.parent.rowData), html `
|
|
40
|
+
<${prefix}-menu-item
|
|
41
|
+
class="menu-item"
|
|
42
|
+
tabindex="${(x, context) => context.index}"
|
|
43
|
+
@click=${(x, context) => context.parent.onItemClick(x.callback)}
|
|
44
|
+
style="${(x) => (x.color ? `color: ${x.color};` : '')}"
|
|
45
|
+
>
|
|
46
|
+
${when((x) => x.icon, html `
|
|
47
|
+
<${prefix}-icon
|
|
48
|
+
name=${(x) => x.icon.name}
|
|
49
|
+
size=${(x) => x.icon.size}
|
|
50
|
+
variant=${(x) => x.icon.variant}
|
|
51
|
+
slot="start"
|
|
52
|
+
></${prefix}-icon>
|
|
53
|
+
`)}
|
|
54
|
+
${(x, ctx) => ctx.parent.getLabel(x.label)}
|
|
55
|
+
</${prefix}-menu-item>
|
|
56
|
+
`)}
|
|
57
|
+
`, { positioning: true })}
|
|
58
|
+
</${prefix}-menu>
|
|
59
|
+
`;
|
|
60
|
+
export const foundationVerticalDropdownMenuTemplate = html `
|
|
61
|
+
<div class="vertical-dropdown-menu-container" part="vertical-dropdown-menu-container">
|
|
62
|
+
${(x) => x.getTemplate(getPrefix(x))}
|
|
63
|
+
</div>
|
|
64
|
+
`;
|