@ni/ok-components 0.4.3 → 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/dist/all-components-bundle.js +36 -36
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +6 -7
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +90 -78
- package/dist/custom-elements.md +17 -17
- package/dist/esm/all-components.d.ts +2 -2
- package/dist/esm/all-components.js +2 -2
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/ex/all-ex.d.ts +1 -0
- package/dist/esm/ex/all-ex.js +2 -0
- package/dist/esm/ex/all-ex.js.map +1 -0
- package/dist/esm/{button → ex/button}/index.d.ts +3 -3
- package/dist/esm/ex/button/index.js +16 -0
- package/dist/esm/ex/button/index.js.map +1 -0
- package/dist/esm/{button → ex/button}/styles.js +1 -1
- package/dist/esm/ex/button/styles.js.map +1 -0
- package/dist/esm/ex/button/template.js.map +1 -0
- package/dist/esm/ts/all-ts.d.ts +1 -0
- package/dist/esm/ts/all-ts.js +2 -0
- package/dist/esm/ts/all-ts.js.map +1 -0
- package/dist/esm/{icon-dynamic → ts/icon-dynamic}/index.d.ts +6 -6
- package/dist/esm/{icon-dynamic → ts/icon-dynamic}/index.js +13 -13
- package/dist/esm/ts/icon-dynamic/index.js.map +1 -0
- package/dist/esm/{icon-dynamic → ts/icon-dynamic}/styles.js +2 -2
- package/dist/esm/ts/icon-dynamic/styles.js.map +1 -0
- package/dist/esm/ts/icon-dynamic/template.d.ts +2 -0
- package/dist/esm/ts/icon-dynamic/template.js.map +1 -0
- package/package.json +1 -1
- package/dist/esm/button/index.js +0 -16
- package/dist/esm/button/index.js.map +0 -1
- package/dist/esm/button/styles.js.map +0 -1
- package/dist/esm/button/template.js.map +0 -1
- package/dist/esm/icon-dynamic/index.js.map +0 -1
- package/dist/esm/icon-dynamic/styles.js.map +0 -1
- package/dist/esm/icon-dynamic/template.d.ts +0 -2
- package/dist/esm/icon-dynamic/template.js.map +0 -1
- /package/dist/esm/{button → ex/button}/styles.d.ts +0 -0
- /package/dist/esm/{button → ex/button}/template.d.ts +0 -0
- /package/dist/esm/{button → ex/button}/template.js +0 -0
- /package/dist/esm/{icon-dynamic → ts/icon-dynamic}/styles.d.ts +0 -0
- /package/dist/esm/{icon-dynamic → ts/icon-dynamic}/template.js +0 -0
|
@@ -7395,7 +7395,7 @@
|
|
|
7395
7395
|
*
|
|
7396
7396
|
* @public
|
|
7397
7397
|
*/
|
|
7398
|
-
let Button$
|
|
7398
|
+
let Button$1 = class Button extends FormAssociatedButton {
|
|
7399
7399
|
constructor() {
|
|
7400
7400
|
super(...arguments);
|
|
7401
7401
|
/**
|
|
@@ -7523,31 +7523,31 @@
|
|
|
7523
7523
|
};
|
|
7524
7524
|
__decorate([
|
|
7525
7525
|
attr({ mode: "boolean" })
|
|
7526
|
-
], Button$
|
|
7526
|
+
], Button$1.prototype, "autofocus", void 0);
|
|
7527
7527
|
__decorate([
|
|
7528
7528
|
attr({ attribute: "form" })
|
|
7529
|
-
], Button$
|
|
7529
|
+
], Button$1.prototype, "formId", void 0);
|
|
7530
7530
|
__decorate([
|
|
7531
7531
|
attr
|
|
7532
|
-
], Button$
|
|
7532
|
+
], Button$1.prototype, "formaction", void 0);
|
|
7533
7533
|
__decorate([
|
|
7534
7534
|
attr
|
|
7535
|
-
], Button$
|
|
7535
|
+
], Button$1.prototype, "formenctype", void 0);
|
|
7536
7536
|
__decorate([
|
|
7537
7537
|
attr
|
|
7538
|
-
], Button$
|
|
7538
|
+
], Button$1.prototype, "formmethod", void 0);
|
|
7539
7539
|
__decorate([
|
|
7540
7540
|
attr({ mode: "boolean" })
|
|
7541
|
-
], Button$
|
|
7541
|
+
], Button$1.prototype, "formnovalidate", void 0);
|
|
7542
7542
|
__decorate([
|
|
7543
7543
|
attr
|
|
7544
|
-
], Button$
|
|
7544
|
+
], Button$1.prototype, "formtarget", void 0);
|
|
7545
7545
|
__decorate([
|
|
7546
7546
|
attr
|
|
7547
|
-
], Button$
|
|
7547
|
+
], Button$1.prototype, "type", void 0);
|
|
7548
7548
|
__decorate([
|
|
7549
7549
|
observable
|
|
7550
|
-
], Button$
|
|
7550
|
+
], Button$1.prototype, "defaultSlottedContent", void 0);
|
|
7551
7551
|
/**
|
|
7552
7552
|
* Includes ARIA states and properties relating to the ARIA button role
|
|
7553
7553
|
*
|
|
@@ -7562,7 +7562,7 @@
|
|
|
7562
7562
|
attr({ attribute: "aria-pressed" })
|
|
7563
7563
|
], DelegatesARIAButton.prototype, "ariaPressed", void 0);
|
|
7564
7564
|
applyMixins(DelegatesARIAButton, ARIAGlobalStatesAndProperties);
|
|
7565
|
-
applyMixins(Button$
|
|
7565
|
+
applyMixins(Button$1, StartEnd, DelegatesARIAButton);
|
|
7566
7566
|
|
|
7567
7567
|
/**
|
|
7568
7568
|
* An Card Custom HTML Element.
|
|
@@ -19868,7 +19868,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
19868
19868
|
/**
|
|
19869
19869
|
* A nimble-styled HTML button
|
|
19870
19870
|
*/
|
|
19871
|
-
|
|
19871
|
+
class Button extends Button$1 {
|
|
19872
19872
|
constructor() {
|
|
19873
19873
|
super(...arguments);
|
|
19874
19874
|
/**
|
|
@@ -19884,19 +19884,19 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
19884
19884
|
*/
|
|
19885
19885
|
this.contentHidden = false;
|
|
19886
19886
|
}
|
|
19887
|
-
}
|
|
19887
|
+
}
|
|
19888
19888
|
__decorate([
|
|
19889
19889
|
attr
|
|
19890
|
-
], Button
|
|
19890
|
+
], Button.prototype, "appearance", void 0);
|
|
19891
19891
|
__decorate([
|
|
19892
19892
|
attr({ attribute: 'appearance-variant' })
|
|
19893
|
-
], Button
|
|
19893
|
+
], Button.prototype, "appearanceVariant", void 0);
|
|
19894
19894
|
__decorate([
|
|
19895
19895
|
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
19896
|
-
], Button
|
|
19896
|
+
], Button.prototype, "contentHidden", void 0);
|
|
19897
19897
|
__decorate([
|
|
19898
19898
|
attr({ attribute: 'tabindex', converter: nullableNumberConverter })
|
|
19899
|
-
], Button
|
|
19899
|
+
], Button.prototype, "tabIndex", void 0);
|
|
19900
19900
|
/**
|
|
19901
19901
|
* A function that returns a nimble-button registration for configuring the component with a DesignSystem.
|
|
19902
19902
|
* Implements {@link @ni/fast-foundation#buttonTemplate}
|
|
@@ -19906,9 +19906,9 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
19906
19906
|
* Generates HTML Element: \<nimble-button\>
|
|
19907
19907
|
*
|
|
19908
19908
|
*/
|
|
19909
|
-
const nimbleButton = Button
|
|
19909
|
+
const nimbleButton = Button.compose({
|
|
19910
19910
|
baseName: 'button',
|
|
19911
|
-
baseClass: Button$
|
|
19911
|
+
baseClass: Button$1,
|
|
19912
19912
|
template: template$X,
|
|
19913
19913
|
styles: styles$1e,
|
|
19914
19914
|
shadowOptions: {
|
|
@@ -21250,7 +21250,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
21250
21250
|
/**
|
|
21251
21251
|
* A nimble-styled card button
|
|
21252
21252
|
*/
|
|
21253
|
-
class CardButton extends Button$
|
|
21253
|
+
class CardButton extends Button$1 {
|
|
21254
21254
|
constructor() {
|
|
21255
21255
|
super(...arguments);
|
|
21256
21256
|
/**
|
|
@@ -66730,7 +66730,7 @@ ${nextLine.slice(indentLevel + 2)}`;
|
|
|
66730
66730
|
/**
|
|
66731
66731
|
* A nimble-styled step for a stepper
|
|
66732
66732
|
*/
|
|
66733
|
-
class Step extends mixinSeverityPattern(Button$
|
|
66733
|
+
class Step extends mixinSeverityPattern(Button$1) {
|
|
66734
66734
|
constructor() {
|
|
66735
66735
|
super(...arguments);
|
|
66736
66736
|
/**
|
|
@@ -99802,14 +99802,14 @@ focus outline in that case.
|
|
|
99802
99802
|
/**
|
|
99803
99803
|
* A Ok demo component (not for production use)
|
|
99804
99804
|
*/
|
|
99805
|
-
class
|
|
99805
|
+
class ExButton extends FoundationElement {
|
|
99806
99806
|
}
|
|
99807
|
-
const
|
|
99808
|
-
baseName: 'button',
|
|
99807
|
+
const okExButton = ExButton.compose({
|
|
99808
|
+
baseName: 'ex-button',
|
|
99809
99809
|
template: template$1,
|
|
99810
99810
|
styles: styles$1
|
|
99811
99811
|
});
|
|
99812
|
-
DesignSystem.getOrCreate().withPrefix('ok').register(
|
|
99812
|
+
DesignSystem.getOrCreate().withPrefix('ok').register(okExButton());
|
|
99813
99813
|
|
|
99814
99814
|
const styles = css `
|
|
99815
99815
|
${display('inline-flex')}
|
|
@@ -99833,21 +99833,21 @@ focus outline in that case.
|
|
|
99833
99833
|
/**
|
|
99834
99834
|
* Base class for dynamic icons. Not intended to be used directly, instead use to register dynamic icons:
|
|
99835
99835
|
* ```
|
|
99836
|
-
* customElements.get('ok-icon-dynamic').registerIconDynamic('ok-icon-dynamic-awesome', '<img data uri or arbitrary url>');
|
|
99836
|
+
* customElements.get('ok-ts-icon-dynamic').registerIconDynamic('ok-ts-icon-dynamic-awesome', '<img data uri or arbitrary url>');
|
|
99837
99837
|
* ```
|
|
99838
99838
|
* After calling successfully, the icon can be used like any other icon:
|
|
99839
99839
|
* ```
|
|
99840
|
-
* <ok-icon-dynamic-awesome></ok-icon-dynamic-awesome>
|
|
99841
|
-
* <nimble-mapping-icon icon="ok-icon-dynamic-awesome"></nimble-mapping-icon>
|
|
99840
|
+
* <ok-ts-icon-dynamic-awesome></ok-ts-icon-dynamic-awesome>
|
|
99841
|
+
* <nimble-mapping-icon icon="ok-ts-icon-dynamic-awesome"></nimble-mapping-icon>
|
|
99842
99842
|
* ```
|
|
99843
99843
|
*/
|
|
99844
|
-
class
|
|
99844
|
+
class TsIconDynamic extends Icon {
|
|
99845
99845
|
constructor(/** @internal */ url) {
|
|
99846
99846
|
super();
|
|
99847
99847
|
this.url = url;
|
|
99848
99848
|
}
|
|
99849
99849
|
static registerIconDynamic(tagName, url) {
|
|
99850
|
-
const tagPrefix = 'ok-icon-dynamic-';
|
|
99850
|
+
const tagPrefix = 'ok-ts-icon-dynamic-';
|
|
99851
99851
|
if (!tagName.startsWith(tagPrefix)) {
|
|
99852
99852
|
throw new Error(`Icon tag name must start with '${tagPrefix}', provided name: ${tagName}`);
|
|
99853
99853
|
}
|
|
@@ -99855,17 +99855,17 @@ focus outline in that case.
|
|
|
99855
99855
|
if (!/^[a-z][a-z]+$/.test(name)) {
|
|
99856
99856
|
throw new Error(`Icon name must be lowercase [a-z] and at least two characters long, provided name: ${name}`);
|
|
99857
99857
|
}
|
|
99858
|
-
const iconClassName = `
|
|
99858
|
+
const iconClassName = `TsIconDynamic${name.charAt(0).toUpperCase() + name.slice(1)}`;
|
|
99859
99859
|
const iconClassContainer = {
|
|
99860
99860
|
// Class name for expression should come object literal assignment, helpful for stack traces, etc.
|
|
99861
|
-
[iconClassName]: class extends
|
|
99861
|
+
[iconClassName]: class extends TsIconDynamic {
|
|
99862
99862
|
constructor() {
|
|
99863
99863
|
super(url);
|
|
99864
99864
|
}
|
|
99865
99865
|
}
|
|
99866
99866
|
};
|
|
99867
99867
|
const iconClass = iconClassContainer[iconClassName];
|
|
99868
|
-
const baseName = `icon-dynamic-${name}`;
|
|
99868
|
+
const baseName = `ts-icon-dynamic-${name}`;
|
|
99869
99869
|
const composedIcon = iconClass.compose({
|
|
99870
99870
|
baseName,
|
|
99871
99871
|
template,
|
|
@@ -99874,12 +99874,12 @@ focus outline in that case.
|
|
|
99874
99874
|
DesignSystem.getOrCreate().withPrefix('ok').register(composedIcon());
|
|
99875
99875
|
}
|
|
99876
99876
|
}
|
|
99877
|
-
const
|
|
99878
|
-
baseName: 'icon-dynamic',
|
|
99877
|
+
const okTsIconDynamic = TsIconDynamic.compose({
|
|
99878
|
+
baseName: 'ts-icon-dynamic',
|
|
99879
99879
|
template: html `<template></template>`,
|
|
99880
99880
|
styles: css `${display('none')}`
|
|
99881
99881
|
});
|
|
99882
|
-
DesignSystem.getOrCreate().withPrefix('ok').register(
|
|
99882
|
+
DesignSystem.getOrCreate().withPrefix('ok').register(okTsIconDynamic());
|
|
99883
99883
|
|
|
99884
99884
|
})();
|
|
99885
99885
|
//# sourceMappingURL=all-components-bundle.js.map
|