@noctuatech/uswds 0.0.7 → 0.0.8
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 +6 -6
- package/assets/img/4c-lg-on-black.svg +10 -0
- package/assets/uswds.min.js +1 -1
- package/package.json +2 -2
- package/src/lib/button/button.element.ts +16 -1
- package/src/lib/define.ts +5 -0
- package/src/lib/file-input/file-input.element.ts +13 -5
- package/src/lib/file-input/file-input.stories.ts +0 -2
- package/src/lib/input/input.element.ts +11 -8
- package/src/lib/modal/modal-close/modal-close.element.ts +55 -0
- package/src/lib/modal/modal-close/modal-close.test.ts +15 -0
- package/src/lib/modal/modal-heading/modal-heading.element.ts +38 -0
- package/src/lib/modal/modal-heading/modal-heading.test.ts +15 -0
- package/src/lib/modal/modal.element.ts +103 -0
- package/src/lib/modal/modal.stories.ts +41 -0
- package/src/lib/modal/modal.test.ts +25 -0
- package/src/lib/radio/radio.element.ts +1 -4
- package/src/lib/select/select.element.ts +1 -0
- package/src/lib/step-indicator/step/step-indicator-step.element.ts +110 -0
- package/src/lib/step-indicator/step/step-indicator-step.test.ts +15 -0
- package/src/lib/step-indicator/step-indicator.element.ts +24 -0
- package/src/lib/step-indicator/step-indicator.stories.ts +49 -0
- package/src/lib/step-indicator/step-indicator.test.ts +21 -0
- package/src/lib.ts +5 -0
- package/target/lib/define.d.ts +2 -0
- package/target/lib/define.js +2 -0
- package/target/lib/define.js.map +1 -1
- package/target/lib/file-input/file-input.element.js +1 -0
- package/target/lib/file-input/file-input.element.js.map +1 -1
- package/target/lib/radio/radio.element.js +1 -4
- package/target/lib/radio/radio.element.js.map +1 -1
- package/target/lib/select/select.element.js +1 -0
- package/target/lib/select/select.element.js.map +1 -1
- package/target/lib/step-indicator/step/step-indicator-step.element.d.ts +7 -0
- package/target/lib/step-indicator/step/step-indicator-step.element.js +122 -0
- package/target/lib/step-indicator/step/step-indicator-step.element.js.map +1 -0
- package/target/lib/step-indicator/step/step-indicator-step.test.d.ts +1 -0
- package/target/lib/step-indicator/step/step-indicator-step.test.js +11 -0
- package/target/lib/step-indicator/step/step-indicator-step.test.js.map +1 -0
- package/target/lib/step-indicator/step-indicator.element.d.ts +7 -0
- package/target/lib/step-indicator/step-indicator.element.js +36 -0
- package/target/lib/step-indicator/step-indicator.element.js.map +1 -0
- package/target/lib/step-indicator/step-indicator.stories.d.ts +21 -0
- package/target/lib/step-indicator/step-indicator.stories.js +42 -0
- package/target/lib/step-indicator/step-indicator.stories.js.map +1 -0
- package/target/lib/step-indicator/step-indicator.test.d.ts +1 -0
- package/target/lib/step-indicator/step-indicator.test.js +17 -0
- package/target/lib/step-indicator/step-indicator.test.js.map +1 -0
- package/target/lib.d.ts +2 -0
- package/target/lib.js +2 -0
- package/target/lib.js.map +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./step-indicator-step.element.js";
|
|
2
|
+
import { fixture, html, assert } from "@open-wc/testing";
|
|
3
|
+
describe("usa-step", () => {
|
|
4
|
+
it("should be accessible", async () => {
|
|
5
|
+
const stepIndicatorStep = await fixture(html `
|
|
6
|
+
<usa-step>Hello World</usa-step>
|
|
7
|
+
`);
|
|
8
|
+
return assert.isAccessible(stepIndicatorStep);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=step-indicator-step.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-indicator-step.test.js","sourceRoot":"","sources":["../../../../src/lib/step-indicator/step/step-indicator-step.test.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAIzD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAA8B,IAAI,CAAA;;KAExE,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
|
|
2
|
+
import { css, element, html } from "@joist/element";
|
|
3
|
+
let USAStepIndicatorElement = (() => {
|
|
4
|
+
let _classDecorators = [element({
|
|
5
|
+
tagName: "usa-step-indicator",
|
|
6
|
+
shadowDom: [
|
|
7
|
+
css `
|
|
8
|
+
:host {
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: 2px;
|
|
11
|
+
counter-reset: usa-step-indicator;
|
|
12
|
+
padding-top: 1rem;
|
|
13
|
+
margin-bottom: 1rem;
|
|
14
|
+
}
|
|
15
|
+
`,
|
|
16
|
+
html `<slot></slot>`,
|
|
17
|
+
],
|
|
18
|
+
})];
|
|
19
|
+
let _classDescriptor;
|
|
20
|
+
let _classExtraInitializers = [];
|
|
21
|
+
let _classThis;
|
|
22
|
+
let _classSuper = HTMLElement;
|
|
23
|
+
var USAStepIndicatorElement = _classThis = class extends _classSuper {
|
|
24
|
+
};
|
|
25
|
+
__setFunctionName(_classThis, "USAStepIndicatorElement");
|
|
26
|
+
(() => {
|
|
27
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
28
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
29
|
+
USAStepIndicatorElement = _classThis = _classDescriptor.value;
|
|
30
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
31
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
32
|
+
})();
|
|
33
|
+
return USAStepIndicatorElement = _classThis;
|
|
34
|
+
})();
|
|
35
|
+
export { USAStepIndicatorElement };
|
|
36
|
+
//# sourceMappingURL=step-indicator.element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-indicator.element.js","sourceRoot":"","sources":["../../../src/lib/step-indicator/step-indicator.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;IAuBvC,uBAAuB;4BAfnC,OAAO,CAAC;YACP,OAAO,EAAE,oBAAoB;YAC7B,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;KAQF;gBACD,IAAI,CAAA,eAAe;aACpB;SACF,CAAC;;;;sBAC2C,WAAW;oDAAnB,SAAQ,WAAW;;;;;QAAxD,6KAA2D;;;QAA9C,uDAAuB;;;;SAAvB,uBAAuB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/web-components";
|
|
2
|
+
import type { USAStepIndicatorElement } from "./step-indicator.element.js";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
tags: string[];
|
|
6
|
+
render(args: USAStepIndicatorElement & {
|
|
7
|
+
counter: string;
|
|
8
|
+
}): import("lit-html").TemplateResult<1>;
|
|
9
|
+
argTypes: {
|
|
10
|
+
counter: {
|
|
11
|
+
control: "select";
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
args: {
|
|
16
|
+
counter: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<USAStepIndicatorElement>;
|
|
21
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "usa-step-indicator",
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
render(args) {
|
|
7
|
+
return html `
|
|
8
|
+
<usa-step-indicator>
|
|
9
|
+
<usa-step state="complete" counter=${args.counter}>
|
|
10
|
+
Personal information
|
|
11
|
+
</usa-step>
|
|
12
|
+
|
|
13
|
+
<usa-step state="complete" counter=${args.counter}>
|
|
14
|
+
Household status
|
|
15
|
+
</usa-step>
|
|
16
|
+
|
|
17
|
+
<usa-step state="current" counter=${args.counter}>
|
|
18
|
+
Supporting documents
|
|
19
|
+
</usa-step>
|
|
20
|
+
|
|
21
|
+
<usa-step counter=${args.counter}>Signature</usa-step>
|
|
22
|
+
|
|
23
|
+
<usa-step counter=${args.counter}>Review and submit</usa-step>
|
|
24
|
+
</usa-step-indicator>
|
|
25
|
+
`;
|
|
26
|
+
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
counter: {
|
|
29
|
+
control: "select",
|
|
30
|
+
options: ["on", "small"],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
args: {
|
|
34
|
+
counter: "on",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
39
|
+
export const Primary = {
|
|
40
|
+
args: {},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=step-indicator.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-indicator.stories.js","sourceRoot":"","sources":["../../../src/lib/step-indicator/step-indicator.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAI3B,kFAAkF;AAClF,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,CAAC,IAAI;QACT,OAAO,IAAI,CAAA;;6CAE8B,IAAI,CAAC,OAAO;;;;6CAIZ,IAAI,CAAC,OAAO;;;;4CAIb,IAAI,CAAC,OAAO;;;;4BAI5B,IAAI,CAAC,OAAO;;4BAEZ,IAAI,CAAC,OAAO;;KAEnC,CAAC;IACJ,CAAC;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;SACzB;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;KACd;CAC4D,CAAC;AAEhE,eAAe,IAAI,CAAC;AAIpB,wFAAwF;AACxF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;CACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./step-indicator.element.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./step-indicator.element.js";
|
|
2
|
+
import { fixture, html, assert } from "@open-wc/testing";
|
|
3
|
+
describe("usa-step-indicator", () => {
|
|
4
|
+
it("should be accessible", async () => {
|
|
5
|
+
const stepIndicator = await fixture(html `
|
|
6
|
+
<usa-step-indicator>
|
|
7
|
+
<usa-step state="complete" counter="on">Personal information</usa-step>
|
|
8
|
+
<usa-step state="complete" counter="on">Household status</usa-step>
|
|
9
|
+
<usa-step state="current" counter="on">Supporting documents</usa-step>
|
|
10
|
+
<usa-step counter="on">Signature</usa-step>
|
|
11
|
+
<usa-step counter="on">Review and submit</usa-step>
|
|
12
|
+
</usa-step-indicator>
|
|
13
|
+
`);
|
|
14
|
+
return assert.isAccessible(stepIndicator);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=step-indicator.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-indicator.test.js","sourceRoot":"","sources":["../../../src/lib/step-indicator/step-indicator.test.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAIzD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,aAAa,GAAG,MAAM,OAAO,CAA0B,IAAI,CAAA;;;;;;;;KAQhE,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/target/lib.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export { USASelecOptionElement } from "./lib/select/select-option.element.js";
|
|
|
13
13
|
export { USATagElement } from "./lib/tag/tag.element.js";
|
|
14
14
|
export { USAAccordionElement } from "./lib/accordion/accordion.element.js";
|
|
15
15
|
export { USASideNavElement } from "./lib/side-nav/side-nav.element.js";
|
|
16
|
+
export { USAStepIndicatorElement } from "./lib/step-indicator/step-indicator.element.js";
|
|
17
|
+
export { USAStepIndicatorStepElement } from "./lib/step-indicator/step/step-indicator-step.element.js";
|
package/target/lib.js
CHANGED
|
@@ -13,4 +13,6 @@ export { USASelecOptionElement } from "./lib/select/select-option.element.js";
|
|
|
13
13
|
export { USATagElement } from "./lib/tag/tag.element.js";
|
|
14
14
|
export { USAAccordionElement } from "./lib/accordion/accordion.element.js";
|
|
15
15
|
export { USASideNavElement } from "./lib/side-nav/side-nav.element.js";
|
|
16
|
+
export { USAStepIndicatorElement } from "./lib/step-indicator/step-indicator.element.js";
|
|
17
|
+
export { USAStepIndicatorStepElement } from "./lib/step-indicator/step/step-indicator-step.element.js";
|
|
16
18
|
//# sourceMappingURL=lib.js.map
|
package/target/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB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