@nysds/components 1.11.1 → 1.11.2
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/LICENSE.md +43 -1
- package/dist/nysds.es.js +120 -94
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +55 -32
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +1 -2
- package/dist/packages/nys-modal/src/nys-modal.d.ts +0 -1
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +1 -1
- package/package.json +1 -1
package/LICENSE.md
CHANGED
|
@@ -2,4 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
### Copyright ownership of Works created by New York state employees
|
|
4
4
|
|
|
5
|
-
This repository contains both the original design for Google Material Icons (the “Work”, as defined in Section 1 of the Apache 2.0 License) and modifications made by the New York State (NYS). This repository combines the Work and these New York State (NYS) modifications, which is a “Modified Version” of Material Icons.
|
|
5
|
+
This repository contains both the original design for Google Material Icons (the “Work”, as defined in Section 1 of the Apache 2.0 License) and modifications made by the New York State (NYS). This repository combines the Work and these New York State (NYS) modifications, which is a “Modified Version” of Material Icons. These icons available to incorporate into your products under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).
|
|
6
|
+
|
|
7
|
+
As a work of the New York State Government, the software modifications made by NYS are not subject to copyright within the United States. Additionally, NYS waives copyright and related rights in its software modifications worldwide through the CC0 1.0 Universal Public Domain Dedication (<https://creativecommons.org/publicdomain/zero/1.0/>).
|
|
8
|
+
|
|
9
|
+
### Files licensed under the BSD-3 Clause
|
|
10
|
+
|
|
11
|
+
#### Lit
|
|
12
|
+
|
|
13
|
+
Lit is licensed under the BSD 3-Clause "New" or "Revised" License:
|
|
14
|
+
|
|
15
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
|
|
17
|
+
Copyright 2021 Google LLC
|
|
18
|
+
|
|
19
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
20
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
21
|
+
|
|
22
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
25
|
+
|
|
26
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## The rest of this project is in the worldwide public domain
|
|
30
|
+
|
|
31
|
+
As a work of the New York State government, this project is in the public domain within the United States.
|
|
32
|
+
|
|
33
|
+
Additionally, we waive copyright and related rights in the work worldwide through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
|
|
34
|
+
|
|
35
|
+
### CC0 1.0 Universal Summary
|
|
36
|
+
|
|
37
|
+
This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
|
|
38
|
+
|
|
39
|
+
### Other information
|
|
40
|
+
|
|
41
|
+
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
|
|
42
|
+
|
|
43
|
+
Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.
|
|
44
|
+
|
|
45
|
+
### Trademark
|
|
46
|
+
|
|
47
|
+
NYS owns, reserves, and retains all rights, title, and interest in all trademarks owned by NYS. The User does not acquire any right or interest of any kind in any NYS trademark because of their use of the Modified Version or any of the modifications made to the Work by NYS.
|
package/dist/nysds.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { css as u, LitElement as y, html as l } from "lit";
|
|
|
2
2
|
import { property as r, query as u1, state as $ } from "lit/decorators.js";
|
|
3
3
|
import { ifDefined as d } from "lit/directives/if-defined.js";
|
|
4
4
|
/*!
|
|
5
|
-
* New York State Design System (v1.11.
|
|
5
|
+
* New York State Design System (v1.11.2)
|
|
6
6
|
* Description: A design system for New York State's digital products.
|
|
7
7
|
* Repository: https://github.com/its-hcd/nysds
|
|
8
8
|
* License: MIT
|
|
@@ -814,20 +814,17 @@ var k1 = Object.defineProperty, W = (a, e, t, o) => {
|
|
|
814
814
|
(i = a[n]) && (s = i(e, t, s) || s);
|
|
815
815
|
return s && k1(e, t, s), s;
|
|
816
816
|
};
|
|
817
|
-
let
|
|
817
|
+
let S1 = 0;
|
|
818
818
|
const je = class je extends y {
|
|
819
819
|
constructor() {
|
|
820
|
-
super(...arguments), this.id = "", this.ariaLabel = "", this.image = "", this.initials = "", this.icon = "", this.color = "", this.interactive = !1, this.disabled = !1, this.lazy = !1, this._slotHasContent = !
|
|
820
|
+
super(...arguments), this.id = "", this.ariaLabel = "", this.image = "", this.initials = "", this.icon = "", this.color = "", this.interactive = !1, this.disabled = !1, this.lazy = !1, this._slotHasContent = !1;
|
|
821
821
|
}
|
|
822
822
|
/******************** Functions ********************/
|
|
823
823
|
// Generate a unique ID if one is not provided
|
|
824
824
|
connectedCallback() {
|
|
825
|
-
super.connectedCallback(), this.id || (this.id = `nys-avatar-${Date.now()}-${
|
|
825
|
+
super.connectedCallback(), this.id || (this.id = `nys-avatar-${Date.now()}-${S1++}`);
|
|
826
826
|
}
|
|
827
|
-
|
|
828
|
-
this._checkSlotContent();
|
|
829
|
-
}
|
|
830
|
-
async _checkSlotContent() {
|
|
827
|
+
async _handleSlotChange() {
|
|
831
828
|
const e = this.shadowRoot?.querySelector("slot");
|
|
832
829
|
if (!e) {
|
|
833
830
|
this._slotHasContent = !1;
|
|
@@ -881,14 +878,13 @@ const je = class je extends y {
|
|
|
881
878
|
class="nys-avatar__initials"
|
|
882
879
|
aria-hidden="true"
|
|
883
880
|
>${this.initials}</span
|
|
884
|
-
>` :
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
</div>`}
|
|
881
|
+
>` : l`<div part="nys-avatar__icon">
|
|
882
|
+
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
883
|
+
${this._slotHasContent ? null : l`<nys-icon
|
|
884
|
+
label="nys-avatar__icon"
|
|
885
|
+
name=${this.icon?.length > 0 ? this.icon : "account_circle"}
|
|
886
|
+
></nys-icon>`}
|
|
887
|
+
</div>`}
|
|
892
888
|
</div>
|
|
893
889
|
</div>
|
|
894
890
|
</label>
|
|
@@ -928,7 +924,7 @@ W([
|
|
|
928
924
|
$()
|
|
929
925
|
], I.prototype, "_slotHasContent");
|
|
930
926
|
customElements.get("nys-avatar") || customElements.define("nys-avatar", I);
|
|
931
|
-
const
|
|
927
|
+
const L1 = u`
|
|
932
928
|
.nys-backtotop {
|
|
933
929
|
/* These props ARE NOT publicly overridable */
|
|
934
930
|
--_nys-button-border-radius--start: var(--nys-radius-round, 1776px);
|
|
@@ -996,7 +992,7 @@ const Ge = class Ge extends y {
|
|
|
996
992
|
></nys-button>`;
|
|
997
993
|
}
|
|
998
994
|
};
|
|
999
|
-
Ge.styles =
|
|
995
|
+
Ge.styles = L1;
|
|
1000
996
|
let ve = Ge;
|
|
1001
997
|
Ze([
|
|
1002
998
|
r({ type: String })
|
|
@@ -1020,8 +1016,12 @@ const E1 = u`
|
|
|
1020
1016
|
--_nys-button-height: var(--nys-size-600, 48px);
|
|
1021
1017
|
--_nys-button-border-radius--start: var(--nys-radius-xl, 12px);
|
|
1022
1018
|
--_nys-button-border-radius--end: var(--nys-radius-xl, 12px);
|
|
1023
|
-
--_nys-button-padding--y:
|
|
1024
|
-
|
|
1019
|
+
--_nys-button-padding--y: calc(
|
|
1020
|
+
var(--nys-space-150, 12px) - var(--nys-border-width-md, 2px)
|
|
1021
|
+
); /* remove calc when SASS'd */
|
|
1022
|
+
--_nys-button-padding--x: calc(
|
|
1023
|
+
var(--nys-space-250, 20px) - var(--nys-border-width-md, 2px)
|
|
1024
|
+
); /* remove calc when SASS'd */
|
|
1025
1025
|
--_nys-button-gap: var(--nys-space-100, 8px);
|
|
1026
1026
|
--_nys-button-border-width: var(--nys-border-width-md, 2px);
|
|
1027
1027
|
--_nys-button-outline-width: var(--nys-border-width-md, 2px);
|
|
@@ -1095,18 +1095,30 @@ const E1 = u`
|
|
|
1095
1095
|
/* Sizes */
|
|
1096
1096
|
:host([size="sm"]) {
|
|
1097
1097
|
--_nys-button-height: var(--nys-size-500, 40px);
|
|
1098
|
-
--_nys-button-padding--y:
|
|
1099
|
-
|
|
1098
|
+
--_nys-button-padding--y: calc(
|
|
1099
|
+
var(--nys-space-100, 8px) - var(--nys-border-width-md, 2px)
|
|
1100
|
+
); /* remove calc when SASS'd */
|
|
1101
|
+
--_nys-button-padding--x: calc(
|
|
1102
|
+
var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px)
|
|
1103
|
+
); /* remove calc when SASS'd */
|
|
1100
1104
|
}
|
|
1101
1105
|
:host([size="md"]) {
|
|
1102
1106
|
--_nys-button-height: var(--nys-size-600, 48px);
|
|
1103
|
-
--_nys-button-padding--y:
|
|
1104
|
-
|
|
1107
|
+
--_nys-button-padding--y: calc(
|
|
1108
|
+
var(--nys-space-150, 12px) - var(--nys-border-width-md, 2px)
|
|
1109
|
+
); /* remove calc when SASS'd */
|
|
1110
|
+
--_nys-button-padding--x: calc(
|
|
1111
|
+
var(--nys-space-250, 20px) - var(--nys-border-width-md, 2px)
|
|
1112
|
+
); /* remove calc when SASS'd */
|
|
1105
1113
|
}
|
|
1106
1114
|
:host([size="lg"]) {
|
|
1107
1115
|
--_nys-button-height: var(--nys-size-700, 56px);
|
|
1108
|
-
--_nys-button-padding--y:
|
|
1109
|
-
|
|
1116
|
+
--_nys-button-padding--y: calc(
|
|
1117
|
+
var(--nys-space-200, 16px) - var(--nys-border-width-md, 2px)
|
|
1118
|
+
); /* remove calc when SASS'd */
|
|
1119
|
+
--_nys-button-padding--x: calc(
|
|
1120
|
+
var(--nys-space-300, 24px) - var(--nys-border-width-md, 2px)
|
|
1121
|
+
); /* remove calc when SASS'd */
|
|
1110
1122
|
}
|
|
1111
1123
|
:host([fullWidth]) {
|
|
1112
1124
|
--_nys-button-width: 100%;
|
|
@@ -1586,7 +1598,6 @@ const E1 = u`
|
|
|
1586
1598
|
.nys-button {
|
|
1587
1599
|
width: var(--_nys-button-width);
|
|
1588
1600
|
min-height: var(--_nys-button-height);
|
|
1589
|
-
height: var(--_nys-button-height);
|
|
1590
1601
|
/* set every corner individually */
|
|
1591
1602
|
border-start-start-radius: var(--_nys-button-border-radius--start);
|
|
1592
1603
|
border-end-start-radius: var(--_nys-button-border-radius--start);
|
|
@@ -1677,8 +1688,8 @@ var D1 = Object.defineProperty, M1 = Object.getOwnPropertyDescriptor, _ = (a, e,
|
|
|
1677
1688
|
return o && s && D1(e, t, s), s;
|
|
1678
1689
|
};
|
|
1679
1690
|
let z1 = 0;
|
|
1680
|
-
var
|
|
1681
|
-
const b = (
|
|
1691
|
+
var L;
|
|
1692
|
+
const b = (L = class extends y {
|
|
1682
1693
|
// allows use of elementInternals' API
|
|
1683
1694
|
constructor() {
|
|
1684
1695
|
super(), this.id = "", this.name = "", this._size = "md", this.fullWidth = !1, this._variant = "filled", this.inverted = !1, this.label = "", this.ariaLabel = "", this.ariaControls = "", this.prefixIcon = "", this.suffixIcon = "", this.circle = !1, this.icon = "", this.disabled = !1, this.form = null, this.value = "", this.ariaDescription = "", this._type = "button", this.onClick = null, this.href = "", this._target = "_self", this._internals = this.attachInternals();
|
|
@@ -1687,7 +1698,7 @@ const b = (S = class extends y {
|
|
|
1687
1698
|
return this._size;
|
|
1688
1699
|
}
|
|
1689
1700
|
set size(e) {
|
|
1690
|
-
this._size =
|
|
1701
|
+
this._size = L.VALID_SIZES.includes(
|
|
1691
1702
|
e
|
|
1692
1703
|
) ? e : "md";
|
|
1693
1704
|
}
|
|
@@ -1695,7 +1706,7 @@ const b = (S = class extends y {
|
|
|
1695
1706
|
return this._variant;
|
|
1696
1707
|
}
|
|
1697
1708
|
set variant(e) {
|
|
1698
|
-
this._variant =
|
|
1709
|
+
this._variant = L.VALID_VARIANTS.includes(
|
|
1699
1710
|
e
|
|
1700
1711
|
) ? e : "filled";
|
|
1701
1712
|
}
|
|
@@ -1703,7 +1714,7 @@ const b = (S = class extends y {
|
|
|
1703
1714
|
return this._type;
|
|
1704
1715
|
}
|
|
1705
1716
|
set type(e) {
|
|
1706
|
-
this._type =
|
|
1717
|
+
this._type = L.VALID_TYPES.includes(
|
|
1707
1718
|
e
|
|
1708
1719
|
) ? e : "button";
|
|
1709
1720
|
}
|
|
@@ -1711,7 +1722,7 @@ const b = (S = class extends y {
|
|
|
1711
1722
|
return this._target;
|
|
1712
1723
|
}
|
|
1713
1724
|
set target(e) {
|
|
1714
|
-
this._target =
|
|
1725
|
+
this._target = L.VALID_TARGETS.includes(
|
|
1715
1726
|
e
|
|
1716
1727
|
) ? e : "_self";
|
|
1717
1728
|
}
|
|
@@ -1864,18 +1875,18 @@ const b = (S = class extends y {
|
|
|
1864
1875
|
`}
|
|
1865
1876
|
`;
|
|
1866
1877
|
}
|
|
1867
|
-
},
|
|
1878
|
+
}, L.VALID_SIZES = ["sm", "md", "lg"], L.VALID_VARIANTS = [
|
|
1868
1879
|
"filled",
|
|
1869
1880
|
"outline",
|
|
1870
1881
|
"ghost",
|
|
1871
1882
|
"text"
|
|
1872
|
-
],
|
|
1883
|
+
], L.VALID_TYPES = ["submit", "reset", "button"], L.VALID_TARGETS = [
|
|
1873
1884
|
"_self",
|
|
1874
1885
|
"_blank",
|
|
1875
1886
|
"_parent",
|
|
1876
1887
|
"_top",
|
|
1877
1888
|
"framename"
|
|
1878
|
-
],
|
|
1889
|
+
], L.styles = E1, L.formAssociated = !0, L);
|
|
1879
1890
|
_([
|
|
1880
1891
|
r({ type: String })
|
|
1881
1892
|
], b.prototype, "id", 2);
|
|
@@ -3651,8 +3662,9 @@ const Pe = class Pe extends y {
|
|
|
3651
3662
|
${this._dragActive ? "drag-active" : ""}
|
|
3652
3663
|
${this._isDropDisabled ? "disabled" : ""}
|
|
3653
3664
|
${this.showError && !this._isDropDisabled ? "error" : ""}"
|
|
3654
|
-
@click=${this._isDropDisabled ? null :
|
|
3655
|
-
|
|
3665
|
+
@click=${this._isDropDisabled ? null : (e) => {
|
|
3666
|
+
e.target.closest("nys-button") || this._openFileDialog();
|
|
3667
|
+
}}
|
|
3656
3668
|
@dragover=${this._isDropDisabled ? null : this._onDragOver}
|
|
3657
3669
|
@dragleave=${this._isDropDisabled ? null : this._onDragLeave}
|
|
3658
3670
|
@drop=${this._isDropDisabled ? null : this._onDrop}
|
|
@@ -3666,10 +3678,9 @@ const Pe = class Pe extends y {
|
|
|
3666
3678
|
ariaLabel=${this._buttonAriaLabel}
|
|
3667
3679
|
ariaDescription=${this._buttonAriaDescription}
|
|
3668
3680
|
?disabled=${this._isDropDisabled}
|
|
3669
|
-
@nys-click
|
|
3670
|
-
e.stopPropagation(), this._openFileDialog();
|
|
3671
|
-
}}
|
|
3672
|
-
@click=${(e) => e.stopPropagation()}
|
|
3681
|
+
@nys-click="${(e) => {
|
|
3682
|
+
e.preventDefault(), e.stopPropagation(), this._openFileDialog();
|
|
3683
|
+
}}"
|
|
3673
3684
|
></nys-button>
|
|
3674
3685
|
<p>or drag here</p>`}
|
|
3675
3686
|
</div>` : l`<nys-button
|
|
@@ -4668,7 +4679,7 @@ const Ke = class Ke extends y {
|
|
|
4668
4679
|
?inverted=${this.inverted}
|
|
4669
4680
|
>
|
|
4670
4681
|
<div class="nys-label__tooltip-icon">
|
|
4671
|
-
<nys-icon name="info" size="
|
|
4682
|
+
<nys-icon name="info" size="4xl"></nys-icon>
|
|
4672
4683
|
</div>
|
|
4673
4684
|
</nys-tooltip>` : ""}
|
|
4674
4685
|
</div>
|
|
@@ -4878,9 +4889,6 @@ const re = (ae = class extends y {
|
|
|
4878
4889
|
disconnectedCallback() {
|
|
4879
4890
|
super.disconnectedCallback(), this._restoreBodyScroll(), window.removeEventListener("keydown", (e) => this._handleKeydown(e));
|
|
4880
4891
|
}
|
|
4881
|
-
firstUpdated() {
|
|
4882
|
-
this._handleBodySlotChange(), this._handleActionSlotChange();
|
|
4883
|
-
}
|
|
4884
4892
|
async updated(e) {
|
|
4885
4893
|
e.has("open") && (this.open ? (this._hideBodyScroll(), this._dispatchOpenEvent(), await this.updateComplete, this._savePrevFocused(), this._focusOnModal(), this._updateDismissAria()) : (this._restorePrevFocused(), this._restoreBodyScroll(), this._dispatchCloseEvent(), this._updateDismissAria()));
|
|
4886
4894
|
}
|
|
@@ -5226,8 +5234,13 @@ const Xe = class Xe extends y {
|
|
|
5226
5234
|
constructor() {
|
|
5227
5235
|
super(), this.id = "", this.name = "", this.currentPage = 1, this.totalPages = 1, this._twoBeforeLast = !1;
|
|
5228
5236
|
}
|
|
5229
|
-
|
|
5230
|
-
|
|
5237
|
+
willUpdate(e) {
|
|
5238
|
+
if (e.has("currentPage") || e.has("totalPages")) {
|
|
5239
|
+
const t = this._clampPage(this.currentPage);
|
|
5240
|
+
t !== this.currentPage && (this.currentPage = t);
|
|
5241
|
+
const o = this.currentPage === this.totalPages - 2;
|
|
5242
|
+
o !== this._twoBeforeLast && (this._twoBeforeLast = o);
|
|
5243
|
+
}
|
|
5231
5244
|
}
|
|
5232
5245
|
// Generate a unique ID if one is not provided
|
|
5233
5246
|
connectedCallback() {
|
|
@@ -5695,7 +5708,7 @@ var bt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, M = (a, e,
|
|
|
5695
5708
|
};
|
|
5696
5709
|
let Ct = 0;
|
|
5697
5710
|
var Q;
|
|
5698
|
-
const
|
|
5711
|
+
const S = (Q = class extends y {
|
|
5699
5712
|
// allows use of elementInternals' API
|
|
5700
5713
|
constructor() {
|
|
5701
5714
|
super(), this.id = "", this.name = "", this.required = !1, this.optional = !1, this.showError = !1, this.errorMessage = "", this.label = "", this.description = "", this.tile = !1, this._tooltip = "", this.inverted = !1, this.form = null, this.selectedValue = null, this._slottedDescriptionText = "", this._size = "md", this._internals = this.attachInternals();
|
|
@@ -5716,7 +5729,7 @@ const L = (Q = class extends y {
|
|
|
5716
5729
|
super.disconnectedCallback(), this.removeEventListener("nys-change", this._handleRadioButtonChange), this.removeEventListener("invalid", this._handleInvalid);
|
|
5717
5730
|
}
|
|
5718
5731
|
async firstUpdated() {
|
|
5719
|
-
this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._updateRadioButtonsTile(), this._updateRadioButtonsShowError(), this._getSlotDescriptionForAria(),
|
|
5732
|
+
await this.updateComplete, this._initializeCheckedRadioValue(), this._setValue(), this._setRadioButtonRequire(), this._updateRadioButtonsSize(), this._updateRadioButtonsTile(), this._updateRadioButtonsShowError(), this._getSlotDescriptionForAria(), this._initializeChildAttributes(), this._updateGroupTabIndex();
|
|
5720
5733
|
}
|
|
5721
5734
|
updated(e) {
|
|
5722
5735
|
(e.has("required") || e.has("selectedValue")) && this._manageRequire(), e.has("size") && this._updateRadioButtonsSize(), e.has("tile") && this._updateRadioButtonsTile(), e.has("inverted") && this._updateRadioButtonsInvert(), e.has("showError") && this._updateRadioButtonsShowError(), e.has("form") && this._updateRadioButtonsForm();
|
|
@@ -5875,50 +5888,50 @@ const L = (Q = class extends y {
|
|
|
5875
5888
|
}, Q.VALID_SIZES = ["sm", "md"], Q.styles = c1, Q.formAssociated = !0, Q);
|
|
5876
5889
|
M([
|
|
5877
5890
|
r({ type: String })
|
|
5878
|
-
],
|
|
5891
|
+
], S.prototype, "id", 2);
|
|
5879
5892
|
M([
|
|
5880
5893
|
r({ type: String, reflect: !0 })
|
|
5881
|
-
],
|
|
5894
|
+
], S.prototype, "name", 2);
|
|
5882
5895
|
M([
|
|
5883
5896
|
r({ type: Boolean, reflect: !0 })
|
|
5884
|
-
],
|
|
5897
|
+
], S.prototype, "required", 2);
|
|
5885
5898
|
M([
|
|
5886
5899
|
r({ type: Boolean, reflect: !0 })
|
|
5887
|
-
],
|
|
5900
|
+
], S.prototype, "optional", 2);
|
|
5888
5901
|
M([
|
|
5889
5902
|
r({ type: Boolean, reflect: !0 })
|
|
5890
|
-
],
|
|
5903
|
+
], S.prototype, "showError", 2);
|
|
5891
5904
|
M([
|
|
5892
5905
|
r({ type: String })
|
|
5893
|
-
],
|
|
5906
|
+
], S.prototype, "errorMessage", 2);
|
|
5894
5907
|
M([
|
|
5895
5908
|
r({ type: String })
|
|
5896
|
-
],
|
|
5909
|
+
], S.prototype, "label", 2);
|
|
5897
5910
|
M([
|
|
5898
5911
|
r({ type: String })
|
|
5899
|
-
],
|
|
5912
|
+
], S.prototype, "description", 2);
|
|
5900
5913
|
M([
|
|
5901
5914
|
r({ type: Boolean, reflect: !0 })
|
|
5902
|
-
],
|
|
5915
|
+
], S.prototype, "tile", 2);
|
|
5903
5916
|
M([
|
|
5904
5917
|
r({ type: String })
|
|
5905
|
-
],
|
|
5918
|
+
], S.prototype, "_tooltip", 2);
|
|
5906
5919
|
M([
|
|
5907
5920
|
r({ type: Boolean, reflect: !0 })
|
|
5908
|
-
],
|
|
5921
|
+
], S.prototype, "inverted", 2);
|
|
5909
5922
|
M([
|
|
5910
5923
|
r({ type: String, reflect: !0 })
|
|
5911
|
-
],
|
|
5924
|
+
], S.prototype, "form", 2);
|
|
5912
5925
|
M([
|
|
5913
5926
|
$()
|
|
5914
|
-
],
|
|
5927
|
+
], S.prototype, "selectedValue", 2);
|
|
5915
5928
|
M([
|
|
5916
5929
|
$()
|
|
5917
|
-
],
|
|
5930
|
+
], S.prototype, "_slottedDescriptionText", 2);
|
|
5918
5931
|
M([
|
|
5919
5932
|
r({ reflect: !0 })
|
|
5920
|
-
],
|
|
5921
|
-
let mt =
|
|
5933
|
+
], S.prototype, "size", 1);
|
|
5934
|
+
let mt = S;
|
|
5922
5935
|
customElements.get("nys-radiogroup") || customElements.define("nys-radiogroup", mt);
|
|
5923
5936
|
var xt = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, O = (a, e, t, o) => {
|
|
5924
5937
|
for (var s = o > 1 ? void 0 : o ? wt(e, t) : e, n = a.length - 1, i; n >= 0; n--)
|
|
@@ -6069,9 +6082,9 @@ O([
|
|
|
6069
6082
|
O([
|
|
6070
6083
|
r({ type: Boolean, reflect: !0 })
|
|
6071
6084
|
], Z.prototype, "tile", 2);
|
|
6072
|
-
let
|
|
6073
|
-
customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton",
|
|
6074
|
-
const
|
|
6085
|
+
let St = Z;
|
|
6086
|
+
customElements.get("nys-radiobutton") || customElements.define("nys-radiobutton", St);
|
|
6087
|
+
const Lt = u`
|
|
6075
6088
|
:host {
|
|
6076
6089
|
/* Global Select Styles */
|
|
6077
6090
|
--_nys-select-width: 100%;
|
|
@@ -6424,7 +6437,7 @@ const z = (J = class extends y {
|
|
|
6424
6437
|
@blur="${this._handleBlur}"
|
|
6425
6438
|
@change="${this._handleChange}"
|
|
6426
6439
|
>
|
|
6427
|
-
<option hidden disabled selected value=""></option>
|
|
6440
|
+
<option data-native hidden disabled selected value=""></option>
|
|
6428
6441
|
</select>
|
|
6429
6442
|
<slot
|
|
6430
6443
|
@slotchange="${this._handleSlotChange}"
|
|
@@ -6443,7 +6456,7 @@ const z = (J = class extends y {
|
|
|
6443
6456
|
</div>
|
|
6444
6457
|
`;
|
|
6445
6458
|
}
|
|
6446
|
-
}, J.VALID_WIDTHS = ["sm", "md", "lg", "full"], J.styles =
|
|
6459
|
+
}, J.VALID_WIDTHS = ["sm", "md", "lg", "full"], J.styles = Lt, J.formAssociated = !0, J);
|
|
6447
6460
|
B([
|
|
6448
6461
|
r({ type: String })
|
|
6449
6462
|
], z.prototype, "id", 2);
|
|
@@ -6763,7 +6776,11 @@ const h1 = u`
|
|
|
6763
6776
|
rgba(255, 255, 255, 0.9)
|
|
6764
6777
|
);
|
|
6765
6778
|
width: var(--nys-size-300, 24px);
|
|
6779
|
+
min-width: var(--nys-size-300, 24px);
|
|
6780
|
+
max-width: var(--nys-size-300, 24px);
|
|
6766
6781
|
height: var(--nys-size-300, 24px);
|
|
6782
|
+
min-height: var(--nys-size-300, 24px);
|
|
6783
|
+
max-height: var(--nys-size-300, 24px);
|
|
6767
6784
|
display: flex;
|
|
6768
6785
|
align-items: center;
|
|
6769
6786
|
justify-content: center;
|
|
@@ -6879,7 +6896,11 @@ const h1 = u`
|
|
|
6879
6896
|
border: none;
|
|
6880
6897
|
background-color: var(--nys-color-neutral-200, #bec0c1);
|
|
6881
6898
|
height: var(--nys-size-100, 8px);
|
|
6899
|
+
min-height: var(--nys-size-100, 8px);
|
|
6900
|
+
max-height: var(--nys-size-100, 8px);
|
|
6882
6901
|
width: 100%;
|
|
6902
|
+
min-width: 100%;
|
|
6903
|
+
max-width: 100%;
|
|
6883
6904
|
color: transparent;
|
|
6884
6905
|
}
|
|
6885
6906
|
|
|
@@ -6938,7 +6959,11 @@ const h1 = u`
|
|
|
6938
6959
|
rgba(255, 255, 255, 0.9)
|
|
6939
6960
|
);
|
|
6940
6961
|
width: var(--nys-space-300, 24px);
|
|
6962
|
+
min-width: var(--nys-space-300, 24px);
|
|
6963
|
+
max-width: var(--nys-space-300, 24px);
|
|
6941
6964
|
height: var(--nys-space-300, 24px);
|
|
6965
|
+
min-height: var(--nys-space-300, 24px);
|
|
6966
|
+
max-height: var(--nys-space-300, 24px);
|
|
6942
6967
|
color: var(--nys-color-text, #1b1b1b);
|
|
6943
6968
|
}
|
|
6944
6969
|
|
|
@@ -7090,24 +7115,26 @@ const e1 = class e1 extends y {
|
|
|
7090
7115
|
});
|
|
7091
7116
|
}
|
|
7092
7117
|
_updateCounter() {
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7118
|
+
let e;
|
|
7119
|
+
if (this.isCompactExpanded)
|
|
7120
|
+
e = "Back to Form", this.style.height = "-webkit-fit-content", this.style.height = "-moz-fit-content", this.style.height = "fit-content";
|
|
7121
|
+
else {
|
|
7097
7122
|
this.style.height = "auto";
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7123
|
+
const t = this.querySelectorAll("nys-step"), o = Array.from(t).findIndex(
|
|
7124
|
+
(n) => n.hasAttribute("selected")
|
|
7125
|
+
), s = t.length;
|
|
7126
|
+
e = o >= 0 ? `Step ${o + 1} of ${s}` : `Step 1 of ${s}`;
|
|
7127
|
+
}
|
|
7128
|
+
e !== this.counterText && (this.counterText = e);
|
|
7102
7129
|
}
|
|
7103
|
-
|
|
7130
|
+
willUpdate() {
|
|
7104
7131
|
const e = this.querySelectorAll("nys-step");
|
|
7105
7132
|
this._stepsNumbered || (e.forEach((n, i) => {
|
|
7106
7133
|
n.stepNumber = i + 1;
|
|
7107
7134
|
}), this._stepsNumbered = !0);
|
|
7108
7135
|
let t = !1, o = !1, s = !1;
|
|
7109
7136
|
e.forEach((n, i) => {
|
|
7110
|
-
n.hasAttribute("current") && (s ? n.removeAttribute("current") : s = !0), i === 0 ? n.setAttribute("first", "") : n.removeAttribute("first"), n.hasAttribute("current") ? (t = !0, n.removeAttribute("previous")) : t ? n.removeAttribute("previous") : n.setAttribute("previous", ""), n.hasAttribute("selected") && (t || o ? n.removeAttribute("selected") : o = !0), this.
|
|
7137
|
+
n.hasAttribute("current") && (s ? n.removeAttribute("current") : s = !0), i === 0 ? n.setAttribute("first", "") : n.removeAttribute("first"), n.hasAttribute("current") ? (t = !0, n.removeAttribute("previous")) : t ? n.removeAttribute("previous") : n.setAttribute("previous", ""), n.hasAttribute("selected") && (t || o ? n.removeAttribute("selected") : o = !0), this.isCompactExpanded ? n.setAttribute("isCompactExpanded", "") : n.removeAttribute("isCompactExpanded");
|
|
7111
7138
|
}), o || (s ? e.forEach((n) => {
|
|
7112
7139
|
n.hasAttribute("current") && !o && (n.setAttribute("selected", ""), o = !0);
|
|
7113
7140
|
}) : e.length > 0 && (e[0].setAttribute("current", ""), e[0].setAttribute("selected", ""))), this._updateCounter();
|
|
@@ -7435,6 +7462,7 @@ const C = (R = class extends y {
|
|
|
7435
7462
|
class="nys-textarea__textarea ${this.resize}"
|
|
7436
7463
|
name=${this.name}
|
|
7437
7464
|
id=${this.id}
|
|
7465
|
+
.value=${this.value}
|
|
7438
7466
|
?disabled=${this.disabled}
|
|
7439
7467
|
?required=${this.required}
|
|
7440
7468
|
?readonly=${this.readonly}
|
|
@@ -7453,9 +7481,7 @@ const C = (R = class extends y {
|
|
|
7453
7481
|
@blur="${this._handleBlur}"
|
|
7454
7482
|
@select="${this._handleSelect}"
|
|
7455
7483
|
@selectionchange="${this._handleSelectionChange}"
|
|
7456
|
-
>
|
|
7457
|
-
${this.value}</textarea
|
|
7458
|
-
>
|
|
7484
|
+
></textarea>
|
|
7459
7485
|
<nys-errormessage
|
|
7460
7486
|
?showError=${this.showError}
|
|
7461
7487
|
errorMessage=${this._internals.validationMessage || this.errorMessage}
|
|
@@ -8631,7 +8657,7 @@ const Xt = u`
|
|
|
8631
8657
|
}
|
|
8632
8658
|
}
|
|
8633
8659
|
`;
|
|
8634
|
-
var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor,
|
|
8660
|
+
var Qt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, Se = (a, e, t, o) => {
|
|
8635
8661
|
for (var s = o > 1 ? void 0 : o ? Jt(e, t) : e, n = a.length - 1, i; n >= 0; n--)
|
|
8636
8662
|
(i = a[n]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
8637
8663
|
return o && s && Qt(e, t, s), s;
|
|
@@ -8828,22 +8854,22 @@ const t1 = class t1 extends y {
|
|
|
8828
8854
|
};
|
|
8829
8855
|
t1.styles = Xt;
|
|
8830
8856
|
let se = t1;
|
|
8831
|
-
|
|
8857
|
+
Se([
|
|
8832
8858
|
r({ type: String })
|
|
8833
8859
|
], se.prototype, "id", 2);
|
|
8834
|
-
|
|
8860
|
+
Se([
|
|
8835
8861
|
r({ type: String })
|
|
8836
8862
|
], se.prototype, "text", 2);
|
|
8837
|
-
|
|
8863
|
+
Se([
|
|
8838
8864
|
r({ type: Boolean, reflect: !0 })
|
|
8839
8865
|
], se.prototype, "inverted", 2);
|
|
8840
|
-
|
|
8866
|
+
Se([
|
|
8841
8867
|
r({ type: Boolean, reflect: !0 })
|
|
8842
8868
|
], se.prototype, "focusable", 2);
|
|
8843
|
-
|
|
8869
|
+
Se([
|
|
8844
8870
|
$()
|
|
8845
8871
|
], se.prototype, "_active", 2);
|
|
8846
|
-
|
|
8872
|
+
Se([
|
|
8847
8873
|
r({ type: String, reflect: !0 })
|
|
8848
8874
|
], se.prototype, "position", 1);
|
|
8849
8875
|
customElements.get("nys-tooltip") || customElements.define("nys-tooltip", se);
|
|
@@ -9920,13 +9946,13 @@ const o1 = class o1 extends y {
|
|
|
9920
9946
|
});
|
|
9921
9947
|
const V = (j) => {
|
|
9922
9948
|
const T = Array.from(j.querySelectorAll("a"));
|
|
9923
|
-
let
|
|
9949
|
+
let Le = {
|
|
9924
9950
|
li: null,
|
|
9925
9951
|
length: 0
|
|
9926
9952
|
};
|
|
9927
9953
|
T.forEach((He) => {
|
|
9928
9954
|
const i1 = He.getAttribute("href"), $e = this._normalizePath(i1);
|
|
9929
|
-
$e && ($e === "/" && n === "/" ?
|
|
9955
|
+
$e && ($e === "/" && n === "/" ? Le = { li: He.closest("li"), length: 1 } : n?.startsWith($e) && $e.length > Le.length && (Le = { li: He.closest("li"), length: $e.length }), T.forEach((y1) => y1.closest("li")?.classList.remove("active")), Le.li?.classList.add("active"));
|
|
9930
9956
|
});
|
|
9931
9957
|
};
|
|
9932
9958
|
V(c), V(p), o.appendChild(c), s.appendChild(p), i.remove();
|
|
@@ -10529,7 +10555,7 @@ export {
|
|
|
10529
10555
|
pt as NysModal,
|
|
10530
10556
|
de as NysOption,
|
|
10531
10557
|
ce as NysPagination,
|
|
10532
|
-
|
|
10558
|
+
St as NysRadiobutton,
|
|
10533
10559
|
mt as NysRadiogroup,
|
|
10534
10560
|
zt as NysSelect,
|
|
10535
10561
|
Ee as NysSkipnav,
|