@ni/ok-components 1.13.0 → 1.14.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.
@@ -0,0 +1,40 @@
1
+ import { children, elements, html, ref, slotted } from '@ni/fast-element';
2
+ import { endSlotTemplate, startSlotTemplate } from '@ni/fast-foundation';
3
+ import { menuButtonTag } from '@ni/nimble-components/dist/esm/menu-button';
4
+ import { menuTag } from '@ni/nimble-components/dist/esm/menu';
5
+ import { iconThreeDotsLineTag } from '@ni/nimble-components/dist/esm/icons/three-dots-line';
6
+ export const template = (context, definition) => html `
7
+ <template
8
+ role="toolbar"
9
+ aria-label="${x => x.ariaLabel}"
10
+ aria-labelledby="${x => x.ariaLabelledby}"
11
+ aria-orientation="horizontal"
12
+ @mousedown="${(x, c) => x.mouseDownHandler(c.event)}"
13
+ @focusin="${(x, c) => x.focusinHandler(c.event)}"
14
+ @keydown="${(x, c) => x.keydownHandler(c.event)}"
15
+ ${children({ property: 'childItems', attributeFilter: ['disabled', 'hidden'], filter: elements(), subtree: true })}
16
+ >
17
+ <div class="positioning-region" part="positioning-region">
18
+ ${startSlotTemplate(context, definition)}
19
+ <slot ${slotted({ property: 'slottedItems', filter: elements() })}></slot>
20
+ ${endSlotTemplate(context, definition)}
21
+ <${menuButtonTag}
22
+ ${ref('overflowButton')}
23
+ hidden
24
+ appearance="ghost"
25
+ content-hidden
26
+ @keydown="${(x, c) => {
27
+ if (x.overflowButton.open) {
28
+ c.event.stopPropagation();
29
+ }
30
+ return true;
31
+ }}"
32
+ >
33
+ <${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
34
+ ${x => x.overflowLabel}
35
+ <${menuTag} slot="menu" ${ref('overflowMenu')}></${menuTag}>
36
+ </${menuButtonTag}>
37
+ </div>
38
+ </template>
39
+ `;
40
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/fv/toolbar/template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4BAIX,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACjB,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;;mBAEE,oBAAoB,mBAAmB,oBAAoB;kBAC5D,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa;mBACnB,OAAO,gBAAgB,GAAG,CAAC,cAAc,CAAC,MAAM,OAAO;gBAC1D,aAAa;;;CAG5B,CAAC","sourcesContent":["import { children, elements, html, ref, slotted, type ViewTemplate } from '@ni/fast-element';\nimport { endSlotTemplate, startSlotTemplate, type FoundationElementTemplate, type ToolbarOptions } from '@ni/fast-foundation';\nimport { menuButtonTag } from '@ni/nimble-components/dist/esm/menu-button';\nimport { menuTag } from '@ni/nimble-components/dist/esm/menu';\nimport { iconThreeDotsLineTag } from '@ni/nimble-components/dist/esm/icons/three-dots-line';\nimport type { FvToolbar } from '.';\n\nexport const template: FoundationElementTemplate<ViewTemplate<FvToolbar>, ToolbarOptions> = (context, definition) => html<FvToolbar>`\n <template\n role=\"toolbar\"\n aria-label=\"${x => x.ariaLabel}\"\n aria-labelledby=\"${x => x.ariaLabelledby}\"\n aria-orientation=\"horizontal\"\n @mousedown=\"${(x, c) => x.mouseDownHandler(c.event as MouseEvent)}\"\n @focusin=\"${(x, c) => x.focusinHandler(c.event as FocusEvent)}\"\n @keydown=\"${(x, c) => x.keydownHandler(c.event as KeyboardEvent)}\"\n ${children({ property: 'childItems', attributeFilter: ['disabled', 'hidden'], filter: elements(), subtree: true })}\n >\n <div class=\"positioning-region\" part=\"positioning-region\">\n ${startSlotTemplate(context, definition)}\n <slot ${slotted({ property: 'slottedItems', filter: elements() })}></slot>\n ${endSlotTemplate(context, definition)}\n <${menuButtonTag}\n ${ref('overflowButton')}\n hidden\n appearance=\"ghost\"\n content-hidden\n @keydown=\"${(x, c) => {\n if (x.overflowButton.open) {\n c.event.stopPropagation();\n }\n return true;\n }}\"\n >\n <${iconThreeDotsLineTag} slot=\"start\"></${iconThreeDotsLineTag}>\n ${x => x.overflowLabel}\n <${menuTag} slot=\"menu\" ${ref('overflowMenu')}></${menuTag}>\n </${menuButtonTag}>\n </div>\n </template>\n`;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/ok-components",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "NI Ok Components",
5
5
  "scripts": {
6
6
  "build": "npm run build:components && npm run build:cem",