@ni/nimble-components 20.2.1 → 20.2.3
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/README.md +3 -2
- package/dist/all-components-bundle.js +33 -25
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1068 -1068
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/label-provider/rich-text/index.d.ts +29 -0
- package/dist/esm/label-provider/rich-text/index.js +40 -0
- package/dist/esm/label-provider/rich-text/index.js.map +1 -0
- package/dist/esm/label-provider/rich-text/label-token-defaults.d.ts +6 -0
- package/dist/esm/label-provider/rich-text/label-token-defaults.js +7 -0
- package/dist/esm/label-provider/rich-text/label-token-defaults.js.map +1 -0
- package/dist/esm/label-provider/rich-text/label-tokens.d.ts +5 -0
- package/dist/esm/label-provider/rich-text/label-tokens.js +19 -0
- package/dist/esm/label-provider/rich-text/label-tokens.js.map +1 -0
- package/dist/esm/rich-text-editor/index.d.ts +0 -1
- package/dist/esm/rich-text-editor/index.js +0 -16
- package/dist/esm/rich-text-editor/index.js.map +1 -1
- package/dist/esm/rich-text-editor/template.js +9 -8
- package/dist/esm/rich-text-editor/template.js.map +1 -1
- package/dist/esm/rich-text-editor/testing/rich-text-editor.pageobject.d.ts +2 -0
- package/dist/esm/rich-text-editor/testing/rich-text-editor.pageobject.js +8 -0
- package/dist/esm/rich-text-editor/testing/rich-text-editor.pageobject.js.map +1 -1
- package/dist/esm/rich-text-editor/testing/types.d.ts +1 -0
- package/dist/esm/src/label-provider/rich-text/index.d.ts +29 -0
- package/dist/esm/src/label-provider/rich-text/label-token-defaults.d.ts +6 -0
- package/dist/esm/src/label-provider/rich-text/label-tokens.d.ts +5 -0
- package/dist/esm/src/rich-text-editor/index.d.ts +0 -1
- package/dist/esm/src/rich-text-editor/testing/rich-text-editor.pageobject.d.ts +2 -0
- package/dist/esm/src/rich-text-editor/testing/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/label-provider/table/name-utils.d.ts +0 -6
- package/dist/esm/label-provider/table/name-utils.js +0 -10
- package/dist/esm/label-provider/table/name-utils.js.map +0 -1
- package/dist/esm/src/label-provider/table/name-utils.d.ts +0 -6
package/README.md
CHANGED
|
@@ -100,9 +100,10 @@ The goal of the Nimble design system is to provide a consistent style for applic
|
|
|
100
100
|
|
|
101
101
|
Most user-visible strings displayed by Nimble components are provided by the client application and are expected to be localized by the application if necessary. However, some strings are built into Nimble components and are provided only in English. An application can provide localized versions of these strings by using design tokens set on label provider elements.
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
The current label providers:
|
|
104
104
|
|
|
105
|
-
- `nimble-label-provider-core`: Used for labels for all components
|
|
105
|
+
- `nimble-label-provider-core`: Used for labels for all components without a dedicated label provider
|
|
106
|
+
- `nimble-label-provider-rich-text`: Used for labels for the rich text components
|
|
106
107
|
- `nimble-label-provider-table`: Used for labels for the table (and table sub-components / column types)
|
|
107
108
|
|
|
108
109
|
If a client is localized, it should:
|
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on
|
|
16291
|
+
* Generated on Wed, 06 Sep 2023 14:38:58 GMT
|
|
16292
16292
|
*/
|
|
16293
16293
|
|
|
16294
16294
|
const Information100DarkUi = "#a46eff";
|
|
@@ -55942,6 +55942,30 @@ img.ProseMirror-separator {
|
|
|
55942
55942
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToolbar());
|
|
55943
55943
|
const toolbarTag = DesignSystem.tagFor(Toolbar);
|
|
55944
55944
|
|
|
55945
|
+
const richTextLabelDefaults = {
|
|
55946
|
+
richTextToggleBoldLabel: 'Bold',
|
|
55947
|
+
richTextToggleItalicsLabel: 'Italics',
|
|
55948
|
+
richTextToggleBulletedListLabel: 'Bulleted List',
|
|
55949
|
+
richTextToggleNumberedListLabel: 'Numbered List'
|
|
55950
|
+
};
|
|
55951
|
+
|
|
55952
|
+
const richTextToggleBoldLabel = DesignToken.create({
|
|
55953
|
+
name: 'rich-text-toggle-bold-label',
|
|
55954
|
+
cssCustomPropertyName: null
|
|
55955
|
+
}).withDefault(richTextLabelDefaults.richTextToggleBoldLabel);
|
|
55956
|
+
const richTextToggleItalicsLabel = DesignToken.create({
|
|
55957
|
+
name: 'rich-text-toggle-italics-label',
|
|
55958
|
+
cssCustomPropertyName: null
|
|
55959
|
+
}).withDefault(richTextLabelDefaults.richTextToggleItalicsLabel);
|
|
55960
|
+
const richTextToggleBulletedListLabel = DesignToken.create({
|
|
55961
|
+
name: 'rich-text-toggle-bulleted-list-label',
|
|
55962
|
+
cssCustomPropertyName: null
|
|
55963
|
+
}).withDefault(richTextLabelDefaults.richTextToggleBulletedListLabel);
|
|
55964
|
+
const richTextToggleNumberedListLabel = DesignToken.create({
|
|
55965
|
+
name: 'rich-text-toggle-numbered-list-label',
|
|
55966
|
+
cssCustomPropertyName: null
|
|
55967
|
+
}).withDefault(richTextLabelDefaults.richTextToggleNumberedListLabel);
|
|
55968
|
+
|
|
55945
55969
|
// prettier-ignore
|
|
55946
55970
|
const template$l = html `
|
|
55947
55971
|
<template>
|
|
@@ -55961,12 +55985,12 @@ img.ProseMirror-separator {
|
|
|
55961
55985
|
content-hidden
|
|
55962
55986
|
?disabled="${x => x.disabled}"
|
|
55963
55987
|
slot="start"
|
|
55964
|
-
title
|
|
55988
|
+
title=${x => richTextToggleBoldLabel.getValueFor(x)}
|
|
55965
55989
|
@click=${x => x.boldButtonClick()}
|
|
55966
55990
|
@change=${(x, c) => x.stopEventPropagation(c.event)}
|
|
55967
55991
|
@keydown=${(x, c) => x.boldButtonKeyDown(c.event)}
|
|
55968
55992
|
>
|
|
55969
|
-
|
|
55993
|
+
${x => richTextToggleBoldLabel.getValueFor(x)}
|
|
55970
55994
|
<${iconBoldBTag} slot="start"></${iconBoldBTag}>
|
|
55971
55995
|
</${toggleButtonTag}>
|
|
55972
55996
|
<${toggleButtonTag}
|
|
@@ -55975,12 +55999,12 @@ img.ProseMirror-separator {
|
|
|
55975
55999
|
content-hidden
|
|
55976
56000
|
?disabled="${x => x.disabled}"
|
|
55977
56001
|
slot="start"
|
|
55978
|
-
title
|
|
56002
|
+
title=${x => richTextToggleItalicsLabel.getValueFor(x)}
|
|
55979
56003
|
@click=${x => x.italicsButtonClick()}
|
|
55980
56004
|
@change=${(x, c) => x.stopEventPropagation(c.event)}
|
|
55981
56005
|
@keydown=${(x, c) => x.italicsButtonKeyDown(c.event)}
|
|
55982
56006
|
>
|
|
55983
|
-
|
|
56007
|
+
${x => richTextToggleItalicsLabel.getValueFor(x)}
|
|
55984
56008
|
<${iconItalicITag} slot="start"></${iconItalicITag}>
|
|
55985
56009
|
</${toggleButtonTag}>
|
|
55986
56010
|
<${toggleButtonTag}
|
|
@@ -55989,12 +56013,12 @@ img.ProseMirror-separator {
|
|
|
55989
56013
|
content-hidden
|
|
55990
56014
|
?disabled="${x => x.disabled}"
|
|
55991
56015
|
slot="start"
|
|
55992
|
-
title
|
|
56016
|
+
title=${x => richTextToggleBulletedListLabel.getValueFor(x)}
|
|
55993
56017
|
@click=${x => x.bulletListButtonClick()}
|
|
55994
56018
|
@change=${(x, c) => x.stopEventPropagation(c.event)}
|
|
55995
56019
|
@keydown=${(x, c) => x.bulletListButtonKeyDown(c.event)}
|
|
55996
56020
|
>
|
|
55997
|
-
|
|
56021
|
+
${x => richTextToggleBulletedListLabel.getValueFor(x)}
|
|
55998
56022
|
<${iconListTag} slot="start"></${iconListTag}>
|
|
55999
56023
|
</${toggleButtonTag}>
|
|
56000
56024
|
<${toggleButtonTag}
|
|
@@ -56003,12 +56027,12 @@ img.ProseMirror-separator {
|
|
|
56003
56027
|
content-hidden
|
|
56004
56028
|
?disabled="${x => x.disabled}"
|
|
56005
56029
|
slot="start"
|
|
56006
|
-
title
|
|
56030
|
+
title=${x => richTextToggleNumberedListLabel.getValueFor(x)}
|
|
56007
56031
|
@click=${x => x.numberedListButtonClick()}
|
|
56008
56032
|
@change=${(x, c) => x.stopEventPropagation(c.event)}
|
|
56009
56033
|
@keydown=${(x, c) => x.numberedListButtonKeyDown(c.event)}
|
|
56010
56034
|
>
|
|
56011
|
-
|
|
56035
|
+
${x => richTextToggleNumberedListLabel.getValueFor(x)}
|
|
56012
56036
|
<${iconNumberListTag} slot="start"></${iconNumberListTag}>
|
|
56013
56037
|
</${toggleButtonTag}>
|
|
56014
56038
|
</${toolbarTag}>
|
|
@@ -56356,7 +56380,6 @@ img.ProseMirror-separator {
|
|
|
56356
56380
|
*/
|
|
56357
56381
|
boldButtonClick() {
|
|
56358
56382
|
this.tiptapEditor.chain().focus().toggleBold().run();
|
|
56359
|
-
this.forceFocusEditor();
|
|
56360
56383
|
}
|
|
56361
56384
|
/**
|
|
56362
56385
|
* Toggle the bold mark and focus back to the editor
|
|
@@ -56365,7 +56388,6 @@ img.ProseMirror-separator {
|
|
|
56365
56388
|
boldButtonKeyDown(event) {
|
|
56366
56389
|
if (this.keyActivatesButton(event)) {
|
|
56367
56390
|
this.tiptapEditor.chain().focus().toggleBold().run();
|
|
56368
|
-
this.forceFocusEditor();
|
|
56369
56391
|
return false;
|
|
56370
56392
|
}
|
|
56371
56393
|
return true;
|
|
@@ -56376,7 +56398,6 @@ img.ProseMirror-separator {
|
|
|
56376
56398
|
*/
|
|
56377
56399
|
italicsButtonClick() {
|
|
56378
56400
|
this.tiptapEditor.chain().focus().toggleItalic().run();
|
|
56379
|
-
this.forceFocusEditor();
|
|
56380
56401
|
}
|
|
56381
56402
|
/**
|
|
56382
56403
|
* Toggle the italics mark and focus back to the editor
|
|
@@ -56385,7 +56406,6 @@ img.ProseMirror-separator {
|
|
|
56385
56406
|
italicsButtonKeyDown(event) {
|
|
56386
56407
|
if (this.keyActivatesButton(event)) {
|
|
56387
56408
|
this.tiptapEditor.chain().focus().toggleItalic().run();
|
|
56388
|
-
this.forceFocusEditor();
|
|
56389
56409
|
return false;
|
|
56390
56410
|
}
|
|
56391
56411
|
return true;
|
|
@@ -56396,7 +56416,6 @@ img.ProseMirror-separator {
|
|
|
56396
56416
|
*/
|
|
56397
56417
|
bulletListButtonClick() {
|
|
56398
56418
|
this.tiptapEditor.chain().focus().toggleBulletList().run();
|
|
56399
|
-
this.forceFocusEditor();
|
|
56400
56419
|
}
|
|
56401
56420
|
/**
|
|
56402
56421
|
* Toggle the unordered list node and focus back to the editor
|
|
@@ -56405,7 +56424,6 @@ img.ProseMirror-separator {
|
|
|
56405
56424
|
bulletListButtonKeyDown(event) {
|
|
56406
56425
|
if (this.keyActivatesButton(event)) {
|
|
56407
56426
|
this.tiptapEditor.chain().focus().toggleBulletList().run();
|
|
56408
|
-
this.forceFocusEditor();
|
|
56409
56427
|
return false;
|
|
56410
56428
|
}
|
|
56411
56429
|
return true;
|
|
@@ -56416,7 +56434,6 @@ img.ProseMirror-separator {
|
|
|
56416
56434
|
*/
|
|
56417
56435
|
numberedListButtonClick() {
|
|
56418
56436
|
this.tiptapEditor.chain().focus().toggleOrderedList().run();
|
|
56419
|
-
this.forceFocusEditor();
|
|
56420
56437
|
}
|
|
56421
56438
|
/**
|
|
56422
56439
|
* Toggle the ordered list node and focus back to the editor
|
|
@@ -56425,7 +56442,6 @@ img.ProseMirror-separator {
|
|
|
56425
56442
|
numberedListButtonKeyDown(event) {
|
|
56426
56443
|
if (this.keyActivatesButton(event)) {
|
|
56427
56444
|
this.tiptapEditor.chain().focus().toggleOrderedList().run();
|
|
56428
|
-
this.forceFocusEditor();
|
|
56429
56445
|
return false;
|
|
56430
56446
|
}
|
|
56431
56447
|
return true;
|
|
@@ -56646,14 +56662,6 @@ img.ProseMirror-separator {
|
|
|
56646
56662
|
}
|
|
56647
56663
|
});
|
|
56648
56664
|
}
|
|
56649
|
-
// In Firefox browser, once the editor gets focused, the blinking caret will be visible until we click format buttons (Bold, Italic ...) in the Firefox browser (changing focus).
|
|
56650
|
-
// But once any of the toolbar button is clicked, editor internally has its focus but the blinking caret disappears.
|
|
56651
|
-
// As a workaround, manually triggering blur and setting focus on editor makes the blinking caret to re-appear.
|
|
56652
|
-
// Mozilla issue https://bugzilla.mozilla.org/show_bug.cgi?id=1496769 tracks removal of this workaround.
|
|
56653
|
-
forceFocusEditor() {
|
|
56654
|
-
this.tiptapEditor.commands.blur();
|
|
56655
|
-
this.tiptapEditor.commands.focus();
|
|
56656
|
-
}
|
|
56657
56665
|
}
|
|
56658
56666
|
__decorate$1([
|
|
56659
56667
|
attr({ mode: 'boolean' })
|