@ni/nimble-components 20.16.0 → 20.16.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/all-components-bundle.js +16 -3
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +10 -3
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/anchor/index.d.ts +11 -0
- package/dist/esm/anchor/index.js +3 -0
- package/dist/esm/anchor/index.js.map +1 -1
- package/dist/esm/anchor/styles.js +4 -0
- package/dist/esm/anchor/styles.js.map +1 -1
- package/dist/esm/anchor/template.js +8 -2
- package/dist/esm/anchor/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,5 +21,16 @@ export declare class Anchor extends AnchorBase {
|
|
|
21
21
|
* HTML Attribute: appearance
|
|
22
22
|
*/
|
|
23
23
|
appearance: AnchorAppearance;
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* @remarks
|
|
27
|
+
* HTML Attribute: contenteditable
|
|
28
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable
|
|
29
|
+
*
|
|
30
|
+
* Ideally, proper support for contenteditable should come from FAST.
|
|
31
|
+
* I have filed bug https://github.com/microsoft/fast/issues/6870 to them.
|
|
32
|
+
* If/when it is fixed, we can remove this workaround.
|
|
33
|
+
*/
|
|
34
|
+
contentEditable: string;
|
|
24
35
|
}
|
|
25
36
|
export declare const anchorTag: string;
|
package/dist/esm/anchor/index.js
CHANGED
|
@@ -24,6 +24,9 @@ __decorate([
|
|
|
24
24
|
__decorate([
|
|
25
25
|
attr
|
|
26
26
|
], Anchor.prototype, "appearance", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
attr({ attribute: 'contenteditable' })
|
|
29
|
+
], Anchor.prototype, "contentEditable", void 0);
|
|
27
30
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
28
31
|
const nimbleAnchor = Anchor.compose({
|
|
29
32
|
baseName: 'anchor',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QACI;;;;WAIG;QAEI,oBAAe,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QACI;;;;WAIG;QAEI,oBAAe,GAAG,KAAK,CAAC;IAsBnC,CAAC;CAAA;AAtBG;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;+CAC1B;AAQ/B;IADC,IAAI;0CAC+B;AAapC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;+CACE;AAG7C,uFAAuF;AAEvF,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAgB;IAC/C,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACX,cAAc,EAAE,IAAI;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/anchor/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,QAAQ,EACR,aAAa,EACb,8BAA8B,EAC9B,sBAAsB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,QAAQ,CAAC;;;;gBAIP,QAAQ
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/anchor/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,QAAQ,EACR,aAAa,EACb,8BAA8B,EAC9B,sBAAsB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,QAAQ,CAAC;;;;gBAIP,QAAQ;;;;;;;;;;;;iBAYP,aAAa;;;;cAIhB,YAAY;;;qCAGW,aAAa;;;;iBAIjC,mBAAmB;;;;cAItB,YAAY;qCACW,mBAAmB;;;;iBAIvC,qBAAqB;;;;;iBAKrB,2BAA2B;;;;;;;;;;;wCAWJ,YAAY;;;;;;;;;iBASnC,sBAAsB;;;;iBAItB,4BAA4B;;;8CAGC,YAAY;qCACrB,sBAAsB;;;8CAGb,YAAY;qCACrB,4BAA4B;;;;iBAIhD,8BAA8B;;;;;;CAM9C,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { html, ref, slotted } from '@microsoft/fast-element';
|
|
2
2
|
// prettier-ignore
|
|
3
|
-
export const template = (_context, definition) => html
|
|
3
|
+
export const template = (_context, definition) => html `${
|
|
4
|
+
/* top-container div is necessary because setting contenteditable directly on the native anchor instead
|
|
5
|
+
leaves it focusable, unlike the behavior you get when the anchor is _within_ a contenteditable element.
|
|
6
|
+
*/ ''}<div
|
|
7
|
+
class="top-container"
|
|
8
|
+
contenteditable="${x => x.contentEditable}"
|
|
9
|
+
><a
|
|
4
10
|
class="control"
|
|
5
11
|
part="control"
|
|
6
12
|
download="${x => x.download}"
|
|
@@ -64,5 +70,5 @@ export const template = (_context, definition) => html `<a
|
|
|
64
70
|
@slotchange="${x => x.handleEndContentChange()}">
|
|
65
71
|
${definition.end || ''}
|
|
66
72
|
</slot
|
|
67
|
-
></span></a>`;
|
|
73
|
+
></span></a></div>`;
|
|
68
74
|
//# sourceMappingURL=template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/anchor/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAgB,MAAM,yBAAyB,CAAC;AAO3E,kBAAkB;AAClB,MAAM,CAAC,MAA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C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "20.16.
|
|
3
|
+
"version": "20.16.1",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run generate-icons && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
|