@ni/spright-components 0.0.24 → 1.0.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.
package/README.md
CHANGED
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@ni/spright-components)
|
|
8
8
|
|
|
9
|
-
NI-styled web components following [Nimble Design System](https://nimble.ni.dev) patterns but not part of the core design system.
|
|
9
|
+
NI-styled web components following [Nimble Design System](https://nimble.ni.dev) patterns and built on the same technologies (FAST, native web components, etc.), but not part of the core design system.
|
|
10
10
|
|
|
11
|
-
The `spright-components` package is intended for components that do not belong in [`nimble-components`](/packages/nimble-components) due to being: ["molecules"](https://atomicdesign.bradfrost.com/chapter-2/), product-specific, data-connected, or not "general utility".
|
|
11
|
+
The `spright-components` package is intended for components that do not belong in [`nimble-components`](/packages/nimble-components) due to being: ["molecules"](https://atomicdesign.bradfrost.com/chapter-2/), product-specific, data-connected, or not "general utility". Some examples:
|
|
12
|
+
|
|
13
|
+
- Molecule: a group of card buttons with a specific layout
|
|
14
|
+
- Product-specific: a configuration pane that uses product-specific terminology or connects to a product-specific data model
|
|
15
|
+
- Data-connected: a table that populates itself by making HTTP requests to a specific service
|
|
16
|
+
- Experimental components that are trying out new UX patterns to see if they should someday be promoted to Nimble.
|
|
17
|
+
|
|
18
|
+
## Why Spright?
|
|
19
|
+
|
|
20
|
+
"Spright" is an archaic variant of "sprite" that is the root of "sprightly"; think of it as a rapidly moving peer of Nimble.
|
|
@@ -16333,7 +16333,7 @@
|
|
|
16333
16333
|
|
|
16334
16334
|
/**
|
|
16335
16335
|
* Do not edit directly
|
|
16336
|
-
* Generated on
|
|
16336
|
+
* Generated on Wed, 15 May 2024 18:39:02 GMT
|
|
16337
16337
|
*/
|
|
16338
16338
|
|
|
16339
16339
|
const Information100DarkUi = "#a46eff";
|
|
@@ -69145,10 +69145,6 @@ img.ProseMirror-separator {
|
|
|
69145
69145
|
|| mapping instanceof MappingText
|
|
69146
69146
|
|| mapping instanceof MappingEmpty);
|
|
69147
69147
|
}
|
|
69148
|
-
static hasUnresolvedIcon(mappingIcon) {
|
|
69149
|
-
return (typeof mappingIcon.icon === 'string'
|
|
69150
|
-
&& mappingIcon.resolvedIcon === undefined);
|
|
69151
|
-
}
|
|
69152
69148
|
validate(mappings, keyType) {
|
|
69153
69149
|
super.validate(mappings, keyType);
|
|
69154
69150
|
this.validateMappingTypes(mappings);
|
|
@@ -69158,7 +69154,7 @@ img.ProseMirror-separator {
|
|
|
69158
69154
|
validateIconNames(mappings) {
|
|
69159
69155
|
const invalid = mappings
|
|
69160
69156
|
.filter(TableColumnMappingValidator.isIconMappingElement)
|
|
69161
|
-
.some(
|
|
69157
|
+
.some(mappingIcon => mappingIcon.resolvedIcon === undefined);
|
|
69162
69158
|
this.setConditionValue('invalidIconName', invalid);
|
|
69163
69159
|
}
|
|
69164
69160
|
validateNoMissingText(mappings) {
|
|
@@ -69232,14 +69228,7 @@ img.ProseMirror-separator {
|
|
|
69232
69228
|
}
|
|
69233
69229
|
}
|
|
69234
69230
|
|
|
69235
|
-
// Create an empty template containing only a space because creating a ViewTemplate
|
|
69236
|
-
// with an empty string throws an exception at runtime.
|
|
69237
|
-
// prettier-ignore
|
|
69238
|
-
const emptyTemplate = html ` `;
|
|
69239
69231
|
const createIconTemplate = (icon) => {
|
|
69240
|
-
if (icon === undefined) {
|
|
69241
|
-
return emptyTemplate;
|
|
69242
|
-
}
|
|
69243
69232
|
return html `
|
|
69244
69233
|
<${icon}
|
|
69245
69234
|
title="${x => (x.textHidden ? x.text : '')}"
|
|
@@ -69515,6 +69504,9 @@ img.ProseMirror-separator {
|
|
|
69515
69504
|
}
|
|
69516
69505
|
createMappingConfig(mapping) {
|
|
69517
69506
|
if (mapping instanceof MappingIcon) {
|
|
69507
|
+
if (!mapping.resolvedIcon) {
|
|
69508
|
+
throw Error('Unresolved icon');
|
|
69509
|
+
}
|
|
69518
69510
|
return new MappingIconConfig(mapping.resolvedIcon, mapping.severity, mapping.text, mapping.textHidden);
|
|
69519
69511
|
}
|
|
69520
69512
|
if (mapping instanceof MappingSpinner) {
|