@gov-design-system-ce/components 0.0.35 → 0.0.37
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/cjs/core.cjs.js +1 -1
- package/dist/cjs/{form-62c6a8c6.js → form-8c6daa83.js} +8 -8
- package/dist/cjs/form-8c6daa83.js.map +1 -0
- package/dist/cjs/gov-app.cjs.entry.js +1190 -637
- package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js +1 -1
- package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-button.cjs.entry.js +1 -1
- package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-control-group.cjs.entry.js +62 -0
- package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -0
- package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-control.cjs.entry.js +35 -7
- package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +6 -6
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
- package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +5 -1
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +13 -8
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +10 -3
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizzard-item.cjs.entry.js +13 -15
- package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
- package/dist/cjs/index-29ac07f6.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/gov-accordion/gov-accordion-item.css +3 -0
- package/dist/collection/components/gov-accordion/gov-accordion.css +3 -0
- package/dist/collection/components/gov-alert/gov-alert.css +3 -0
- package/dist/collection/components/gov-app/gov-app.css +3 -0
- package/dist/collection/components/gov-app/gov-app.js +10 -8
- package/dist/collection/components/gov-app/gov-app.js.map +1 -1
- package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
- package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
- package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
- package/dist/collection/components/gov-badge/gov-badge.css +6 -3
- package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
- package/dist/collection/components/gov-button/gov-button.css +3 -3
- package/dist/collection/components/gov-card/gov-card.css +3 -0
- package/dist/collection/components/gov-container/gov-container.css +3 -0
- package/dist/collection/components/gov-control-group/constants.js +7 -0
- package/dist/collection/components/gov-control-group/constants.js.map +1 -0
- package/dist/collection/components/gov-control-group/gov-control-group.css +268 -0
- package/dist/collection/components/gov-control-group/gov-control-group.js +137 -0
- package/dist/collection/components/gov-control-group/gov-control-group.js.map +1 -0
- package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
- package/dist/collection/components/gov-empty/gov-empty.css +3 -0
- package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
- package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
- package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
- package/dist/collection/components/gov-form/control/gov-form-control.js +35 -10
- package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.css +10 -0
- package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
- package/dist/collection/components/gov-form/input/constants.js +1 -1
- package/dist/collection/components/gov-form/input/constants.js.map +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.css +103 -50
- package/dist/collection/components/gov-form/input/gov-form-input.js +9 -9
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
- package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
- package/dist/collection/components/gov-form/label/gov-form-label.js.map +1 -1
- package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
- package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +103 -50
- package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +3 -0
- package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
- package/dist/collection/components/gov-form/search/constants.js +3 -0
- package/dist/collection/components/gov-form/search/constants.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.css +9 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +30 -0
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.css +103 -50
- package/dist/collection/components/gov-form/select/gov-form-select.js +12 -5
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
- package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
- package/dist/collection/components/gov-grid/gov-grid.css +3 -0
- package/dist/collection/components/gov-icon/gov-icon.css +3 -0
- package/dist/collection/components/gov-layout/gov-layout-column.css +3 -0
- package/dist/collection/components/gov-layout/gov-layout.css +3 -0
- package/dist/collection/components/gov-loading/loading/gov-loading.css +3 -0
- package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +3 -0
- package/dist/collection/components/gov-message/gov-message.css +3 -0
- package/dist/collection/components/gov-modal/gov-modal.css +3 -0
- package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
- package/dist/collection/components/gov-nav/gov-nav.css +3 -0
- package/dist/collection/components/gov-pagination/gov-pagination.css +3 -0
- package/dist/collection/components/gov-pagination/gov-pagination.js +19 -3
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-promp/gov-prompt.css +3 -0
- package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
- package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
- package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
- package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
- package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
- package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
- package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
- package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
- package/dist/collection/components/gov-tabs/gov-tabs.css +3 -0
- package/dist/collection/components/gov-tile/container/gov-tiles.css +3 -0
- package/dist/collection/components/gov-tile/gov-tile.css +3 -0
- package/dist/collection/components/gov-toast/gov-toast.css +3 -0
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
- package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +3 -0
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +29 -36
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js +2 -0
- package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js.map +1 -0
- package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
- package/dist/collection/pages/Button.js +41 -0
- package/dist/collection/pages/Button.js.map +1 -1
- package/dist/collection/pages/ControlGroup.js +324 -0
- package/dist/collection/pages/ControlGroup.js.map +1 -0
- package/dist/collection/pages/Forms.js +369 -206
- package/dist/collection/pages/Forms.js.map +1 -1
- package/dist/collection/pages/Pagination.js +2 -2
- package/dist/collection/pages/Pagination.js.map +1 -1
- package/dist/collection/pages/Tooltip.js +24 -0
- package/dist/collection/pages/Tooltip.js.map +1 -1
- package/dist/components/form.js +16 -16
- package/dist/components/form.js.map +1 -1
- package/dist/components/gov-app.js +1190 -637
- package/dist/components/gov-app.js.map +1 -1
- package/dist/components/gov-badge2.js +1 -1
- package/dist/components/gov-badge2.js.map +1 -1
- package/dist/components/gov-button2.js +1 -1
- package/dist/components/gov-button2.js.map +1 -1
- package/dist/components/gov-control-group.d.ts +11 -0
- package/dist/components/gov-control-group.js +75 -0
- package/dist/components/gov-control-group.js.map +1 -0
- package/dist/components/gov-form-control.js +35 -7
- package/dist/components/gov-form-control.js.map +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-input2.js +5 -5
- package/dist/components/gov-form-input2.js.map +1 -1
- package/dist/components/gov-form-label.js +1 -1
- package/dist/components/gov-form-label.js.map +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-search.js +8 -2
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select2.js +12 -7
- package/dist/components/gov-form-select2.js.map +1 -1
- package/dist/components/gov-icon2.js +1 -1
- package/dist/components/gov-pagination.js +10 -3
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-wizzard-item.js +14 -17
- package/dist/components/gov-wizzard-item.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-00c4dc0d.entry.js +2 -0
- package/dist/core/p-00c4dc0d.entry.js.map +1 -0
- package/dist/core/p-06e938d7.entry.js +2 -0
- package/dist/core/p-06e938d7.entry.js.map +1 -0
- package/dist/core/{p-d14130ac.entry.js → p-1bdec1f4.entry.js} +2 -2
- package/dist/core/{p-e3b56738.entry.js → p-227a9e9b.entry.js} +2 -2
- package/dist/core/p-3a69322b.entry.js +2 -0
- package/dist/core/p-3a69322b.entry.js.map +1 -0
- package/dist/core/p-61af5a2c.js +2 -0
- package/dist/core/p-61af5a2c.js.map +1 -0
- package/dist/core/{p-fe1ee53b.entry.js → p-63ef7826.entry.js} +2 -2
- package/dist/core/p-63ef7826.entry.js.map +1 -0
- package/dist/core/p-6dc65816.entry.js +2 -0
- package/dist/core/p-6dc65816.entry.js.map +1 -0
- package/dist/core/{p-d1275fa8.entry.js → p-9584f413.entry.js} +2 -2
- package/dist/core/p-9584f413.entry.js.map +1 -0
- package/dist/core/p-9bd90cc4.entry.js +2 -0
- package/dist/core/p-9bd90cc4.entry.js.map +1 -0
- package/dist/core/{p-d9b4bc20.entry.js → p-9fbee429.entry.js} +2 -2
- package/dist/core/p-9fbee429.entry.js.map +1 -0
- package/dist/core/{p-d37f03e0.entry.js → p-bbbc4e43.entry.js} +2 -2
- package/dist/core/{p-a8ef7292.entry.js → p-c289af04.entry.js} +2 -2
- package/dist/core/p-c289af04.entry.js.map +1 -0
- package/dist/core/p-c39004f5.entry.js +2 -0
- package/dist/core/p-c39004f5.entry.js.map +1 -0
- package/dist/core/{p-5a2a9cde.entry.js → p-c69cd34e.entry.js} +2 -2
- package/dist/core/p-cc9e9a31.entry.js +2 -0
- package/dist/core/{p-a423b62a.entry.js.map → p-cc9e9a31.entry.js.map} +1 -1
- package/dist/core/p-ef7a1780.entry.js +2 -0
- package/dist/core/p-ef7a1780.entry.js.map +1 -0
- package/dist/core/p-fd555dce.entry.js +2 -0
- package/dist/core/{p-35aadeeb.entry.js.map → p-fd555dce.entry.js.map} +1 -1
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +1 -1
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/{form-613741a5.js → form-cd65d95e.js} +8 -8
- package/dist/esm/form-cd65d95e.js.map +1 -0
- package/dist/esm/gov-app.entry.js +1190 -637
- package/dist/esm/gov-app.entry.js.map +1 -1
- package/dist/esm/gov-badge.entry.js +1 -1
- package/dist/esm/gov-badge.entry.js.map +1 -1
- package/dist/esm/gov-button.entry.js +1 -1
- package/dist/esm/gov-button.entry.js.map +1 -1
- package/dist/esm/gov-control-group.entry.js +58 -0
- package/dist/esm/gov-control-group.entry.js.map +1 -0
- package/dist/esm/gov-form-checkbox.entry.js +1 -1
- package/dist/esm/gov-form-control.entry.js +35 -7
- package/dist/esm/gov-form-control.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +2 -2
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-input.entry.js +6 -6
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-form-label.entry.js +1 -1
- package/dist/esm/gov-form-label.entry.js.map +1 -1
- package/dist/esm/gov-form-multi-select.entry.js +2 -2
- package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
- package/dist/esm/gov-form-radio.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js +5 -1
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +13 -8
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-form-switch.entry.js +1 -1
- package/dist/esm/gov-icon.entry.js +1 -1
- package/dist/esm/gov-pagination.entry.js +10 -3
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-wizzard-item.entry.js +13 -15
- package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
- package/dist/esm/index-b010bfb4.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +1531 -880
- package/dist/types/components/gov-app/gov-app.d.ts +9 -8
- package/dist/types/components/gov-control-group/constants.d.ts +7 -0
- package/dist/types/components/gov-control-group/gov-control-group.d.ts +29 -0
- package/dist/types/components/gov-form/control/gov-form-control.d.ts +2 -1
- package/dist/types/components/gov-form/input/constants.d.ts +1 -1
- package/dist/types/components/gov-form/input/gov-form-input.d.ts +1 -2
- package/dist/types/components/gov-form/search/constants.d.ts +4 -0
- package/dist/types/components/gov-form/search/gov-form-search.d.ts +5 -0
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +2 -0
- package/dist/types/components/gov-pagination/gov-pagination.d.ts +1 -0
- package/dist/types/components/gov-wizzard/gov-wizzard-item.d.ts +7 -8
- package/dist/types/components/gov-wizzard/gov-wizzard-item.types.d.ts +4 -0
- package/dist/types/components.d.ts +61 -5
- package/dist/types/pages/ControlGroup.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/form-62c6a8c6.js.map +0 -1
- package/dist/core/p-0a300d3e.entry.js +0 -2
- package/dist/core/p-0a300d3e.entry.js.map +0 -1
- package/dist/core/p-35aadeeb.entry.js +0 -2
- package/dist/core/p-37f6b4ef.entry.js +0 -2
- package/dist/core/p-37f6b4ef.entry.js.map +0 -1
- package/dist/core/p-7e524b49.js +0 -2
- package/dist/core/p-7e524b49.js.map +0 -1
- package/dist/core/p-a423b62a.entry.js +0 -2
- package/dist/core/p-a825183a.entry.js +0 -2
- package/dist/core/p-a825183a.entry.js.map +0 -1
- package/dist/core/p-a8ef7292.entry.js.map +0 -1
- package/dist/core/p-bbc765ca.entry.js +0 -2
- package/dist/core/p-bbc765ca.entry.js.map +0 -1
- package/dist/core/p-d1275fa8.entry.js.map +0 -1
- package/dist/core/p-d9b4bc20.entry.js.map +0 -1
- package/dist/core/p-e4bb6114.entry.js +0 -2
- package/dist/core/p-e4bb6114.entry.js.map +0 -1
- package/dist/core/p-e6904513.entry.js +0 -2
- package/dist/core/p-e6904513.entry.js.map +0 -1
- package/dist/core/p-fe1ee53b.entry.js.map +0 -1
- package/dist/esm/form-613741a5.js.map +0 -1
- /package/dist/core/{p-d14130ac.entry.js.map → p-1bdec1f4.entry.js.map} +0 -0
- /package/dist/core/{p-e3b56738.entry.js.map → p-227a9e9b.entry.js.map} +0 -0
- /package/dist/core/{p-d37f03e0.entry.js.map → p-bbbc4e43.entry.js.map} +0 -0
- /package/dist/core/{p-5a2a9cde.entry.js.map → p-c69cd34e.entry.js.map} +0 -0
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import '../../pages/Home.ts';
|
|
2
1
|
import '../../pages/Accordion.ts';
|
|
3
2
|
import '../../pages/Alert.ts';
|
|
4
3
|
import '../../pages/Badge.ts';
|
|
5
|
-
import '../../pages/Button.ts';
|
|
6
4
|
import '../../pages/Breadcrumbs.ts';
|
|
5
|
+
import '../../pages/Button.ts';
|
|
7
6
|
import '../../pages/Card.ts';
|
|
8
|
-
import '../../pages/Cookiebar.ts';
|
|
9
7
|
import '../../pages/Container.ts';
|
|
8
|
+
import '../../pages/ControlGroup.ts';
|
|
9
|
+
import '../../pages/Cookiebar.ts';
|
|
10
10
|
import '../../pages/Empty.ts';
|
|
11
11
|
import '../../pages/Error.ts';
|
|
12
|
-
import '../../pages/Forms.ts';
|
|
13
|
-
import '../../pages/FormsRestructure.ts';
|
|
14
12
|
import '../../pages/FormLabel.ts';
|
|
15
13
|
import '../../pages/FormMessage.ts';
|
|
14
|
+
import '../../pages/Forms.ts';
|
|
15
|
+
import '../../pages/FormsRestructure.ts';
|
|
16
16
|
import '../../pages/Grid.ts';
|
|
17
|
+
import '../../pages/Home.ts';
|
|
17
18
|
import '../../pages/Layout.ts';
|
|
19
|
+
import '../../pages/Loading.ts';
|
|
18
20
|
import '../../pages/Message.ts';
|
|
19
21
|
import '../../pages/Modal.ts';
|
|
20
|
-
import '../../pages/Loading.ts';
|
|
21
22
|
import '../../pages/Nav.ts';
|
|
22
23
|
import '../../pages/Pagination.ts';
|
|
23
24
|
import '../../pages/Prompt.ts';
|
|
@@ -27,10 +28,10 @@ import '../../pages/Statsbar.ts';
|
|
|
27
28
|
import '../../pages/Stepper.ts';
|
|
28
29
|
import '../../pages/Tabs.ts';
|
|
29
30
|
import '../../pages/Tiles.js';
|
|
30
|
-
import '../../pages/Tooltip.ts';
|
|
31
|
-
import '../../pages/Typography.ts';
|
|
32
31
|
import '../../pages/ToastMessage.ts';
|
|
33
32
|
import '../../pages/ToastMessageCountdown.ts';
|
|
33
|
+
import '../../pages/Tooltip.ts';
|
|
34
|
+
import '../../pages/Typography.ts';
|
|
34
35
|
import '../../pages/Wizzard.ts';
|
|
35
36
|
export declare class GovApp {
|
|
36
37
|
componentWillLoad(): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Variants } from '../../core/constants/variants';
|
|
2
|
+
import { ValueOf } from '../../types/interfaces';
|
|
3
|
+
export declare const ControlGroups: Pick<typeof Variants, "PRIMARY" | "SECONDARY">;
|
|
4
|
+
export declare type ControlGroupType = `${ValueOf<typeof ControlGroups>}`;
|
|
5
|
+
export declare const ControlGroupClass: {
|
|
6
|
+
root: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ControlGroupType } from './constants';
|
|
2
|
+
export declare class GovControlGroup {
|
|
3
|
+
private h;
|
|
4
|
+
private f;
|
|
5
|
+
constructor();
|
|
6
|
+
host: HTMLGovControlGroupElement;
|
|
7
|
+
/**
|
|
8
|
+
* Style variation of the content message.
|
|
9
|
+
*/
|
|
10
|
+
readonly variant: ControlGroupType;
|
|
11
|
+
/**
|
|
12
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
13
|
+
*/
|
|
14
|
+
readonly invalid: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Makes the whole component disabled.
|
|
17
|
+
* This prevents users from being able to interact with the elements, and conveys its inactive state to assistive technologies.
|
|
18
|
+
*/
|
|
19
|
+
readonly disabled: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the display of the border between elements
|
|
22
|
+
*/
|
|
23
|
+
readonly isBordered: boolean;
|
|
24
|
+
validateVariant(newValue: string): void;
|
|
25
|
+
watchDisabled(): void;
|
|
26
|
+
private passControlAttrs;
|
|
27
|
+
componentWillLoad(): void;
|
|
28
|
+
render(): any;
|
|
29
|
+
}
|
|
@@ -37,10 +37,11 @@ export declare class GovFormControl {
|
|
|
37
37
|
* Form element size.
|
|
38
38
|
*/
|
|
39
39
|
readonly size?: FormControlSizesType;
|
|
40
|
-
watchInvalid(): void;
|
|
41
40
|
componentDidRender(): void;
|
|
42
41
|
disconnectedCallback(): void;
|
|
43
42
|
private passChildAttrs;
|
|
43
|
+
private invalidChildAttrs;
|
|
44
|
+
private disabledChildAttrs;
|
|
44
45
|
private formElementDescriptionControl;
|
|
45
46
|
private syncControlMessages;
|
|
46
47
|
render(): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sizes } from '../../../core/constants/sizes';
|
|
2
2
|
import { Variants } from '../../../core/constants/variants';
|
|
3
3
|
import { ValueOf } from '../../../types/interfaces';
|
|
4
|
-
export declare const FormInputSizes: Pick<typeof Sizes, "_M" | "_L" | "_XL">;
|
|
4
|
+
export declare const FormInputSizes: Pick<typeof Sizes, "_S" | "_M" | "_L" | "_XL">;
|
|
5
5
|
export declare type FormInputSizesType = `${ValueOf<typeof FormInputSizes>}`;
|
|
6
6
|
export declare const FormInputVariants: Pick<typeof Variants, "PRIMARY" | "SECONDARY">;
|
|
7
7
|
export declare type FormInputVariantType = `${ValueOf<typeof FormInputVariants>}`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
-
import { FormInputSizesType, InputType, Type } from './constants';
|
|
3
|
-
import { FormInputVariantType } from './constants';
|
|
2
|
+
import { FormInputSizesType, FormInputVariantType, InputType, Type } from './constants';
|
|
4
3
|
import { FormInputEvent } from './gov-form-input.types';
|
|
5
4
|
export declare class GovFormInput {
|
|
6
5
|
private f;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { Variants } from '../../../core/constants/variants';
|
|
2
|
+
import { ValueOf } from '../../../types/interfaces';
|
|
3
|
+
export declare const FormSearchs: Pick<typeof Variants, "PRIMARY" | "SECONDARY">;
|
|
4
|
+
export declare type FormSearchVariantType = `${ValueOf<typeof FormSearchs>}`;
|
|
1
5
|
export declare const FormSearchClass: {
|
|
2
6
|
root: string;
|
|
3
7
|
input: string;
|
|
@@ -78,9 +78,11 @@ export declare class GovFormSelect {
|
|
|
78
78
|
validateVariant(newValue: string): void;
|
|
79
79
|
validateSize(newValue: string): void;
|
|
80
80
|
watchDisabled(): void;
|
|
81
|
+
watchValue(): void;
|
|
81
82
|
private passControlAttrs;
|
|
82
83
|
componentWillLoad(): void;
|
|
83
84
|
componentDidRender(): Promise<void>;
|
|
85
|
+
private markSelectedValue;
|
|
84
86
|
render(): any;
|
|
85
87
|
private onFocusHandler;
|
|
86
88
|
private onBlurHandler;
|
|
@@ -70,6 +70,7 @@ export declare class GovPagination {
|
|
|
70
70
|
validateType(newValue: string): void;
|
|
71
71
|
validateSize(newValue: string): void;
|
|
72
72
|
validateVariant(newValue: string): void;
|
|
73
|
+
recalculate(): void;
|
|
73
74
|
componentWillLoad(): void;
|
|
74
75
|
componentDidRender(): Promise<void>;
|
|
75
76
|
private recalculatePagination;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { WizardSizesType, WizardVariantsType } from "./constants";
|
|
3
|
+
import { WizzardItemEvent } from "./gov-wizzard-item.types";
|
|
4
4
|
export declare class GovWizzardItem {
|
|
5
5
|
private h;
|
|
6
6
|
private readonly triggerId;
|
|
@@ -20,7 +20,7 @@ export declare class GovWizzardItem {
|
|
|
20
20
|
*/
|
|
21
21
|
readonly identifier: string;
|
|
22
22
|
/**
|
|
23
|
-
* Defines
|
|
23
|
+
* Defines weather the wizzard item can be collapsible
|
|
24
24
|
*/
|
|
25
25
|
readonly collapsible: boolean;
|
|
26
26
|
/**
|
|
@@ -38,16 +38,15 @@ export declare class GovWizzardItem {
|
|
|
38
38
|
/**
|
|
39
39
|
* Defines whether the accordion is open or closed by default
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
isExpanded: boolean;
|
|
42
42
|
/**
|
|
43
|
-
* Used to change the
|
|
43
|
+
* Used to change the HTML tag in the accordion trigger for correct semantic structure
|
|
44
44
|
*/
|
|
45
45
|
readonly labelTag: string;
|
|
46
46
|
/**
|
|
47
47
|
* Called when the accordion state changes
|
|
48
48
|
*/
|
|
49
|
-
govChange: EventEmitter<
|
|
50
|
-
isExpandedState: boolean;
|
|
49
|
+
govChange: EventEmitter<WizzardItemEvent>;
|
|
51
50
|
private validateLabel;
|
|
52
51
|
private validateTriggerTag;
|
|
53
52
|
private validateVariant;
|
|
@@ -14,6 +14,7 @@ import { NativeTypesType } from "./components/gov-badge/constants";
|
|
|
14
14
|
import { GovBreadcrumbsChangeEvent } from "./components/gov-breadcrumbs/gov-breadcrumbs.d";
|
|
15
15
|
import { ButtonEvent } from "./components/gov-button/gov-button.types";
|
|
16
16
|
import { GovCardChangeEvent } from "./components/gov-card/interfaces";
|
|
17
|
+
import { ControlGroupType } from "./components/gov-control-group/constants";
|
|
17
18
|
import { SizesType, VariantType as VariantType1 } from "./components/gov-form/autocomplete/constants";
|
|
18
19
|
import { FormAutocompleteEvent, GovFormAutocompleteItem } from "./components/gov-form/autocomplete/gov-form-autocomplete.types";
|
|
19
20
|
import { FormCheckboxSizesType } from "./components/gov-form/checkbox/constants";
|
|
@@ -29,6 +30,7 @@ import { FormMultiselectSizesType, FormMultiselectVariantType } from "./componen
|
|
|
29
30
|
import { FormMultiselectEvent } from "./components/gov-form/multiselect/gov-form-multi-select.types";
|
|
30
31
|
import { FormRadioSizesType } from "./components/gov-form/radio/constants";
|
|
31
32
|
import { FormRadioEvent } from "./components/gov-form/radio/gov-form-radio.types";
|
|
33
|
+
import { FormSearchVariantType } from "./components/gov-form/search/constants";
|
|
32
34
|
import { FormSelectSizesType, FormSelectVariantType } from "./components/gov-form/select/constants";
|
|
33
35
|
import { FormSelectEvent } from "./components/gov-form/select/gov-form-select.types";
|
|
34
36
|
import { FormSwitchSizesType } from "./components/gov-form/switch/constants";
|
|
@@ -50,6 +52,7 @@ import { ToastTypesType, ToastVariantType } from "./components/gov-toast/constan
|
|
|
50
52
|
import { TooltipPositionType, TooltipSizeType, TooltipVariantType } from "./components/gov-tooltip/constants";
|
|
51
53
|
import { WizardSizesType, WizardVariantsType } from "./components/gov-wizzard/constants";
|
|
52
54
|
import { GovWizzardItemChangeEvent } from "./components/gov-wizzard/gov-wizzard-item.d";
|
|
55
|
+
import { WizzardItemEvent } from "./components/gov-wizzard/gov-wizzard-item.types";
|
|
53
56
|
export namespace Components {
|
|
54
57
|
interface GovAccordion {
|
|
55
58
|
/**
|
|
@@ -461,6 +464,24 @@ export namespace Components {
|
|
|
461
464
|
*/
|
|
462
465
|
"slottedChildren": () => Promise<Node[]>;
|
|
463
466
|
}
|
|
467
|
+
interface GovControlGroup {
|
|
468
|
+
/**
|
|
469
|
+
* Makes the whole component disabled. This prevents users from being able to interact with the elements, and conveys its inactive state to assistive technologies.
|
|
470
|
+
*/
|
|
471
|
+
"disabled": boolean;
|
|
472
|
+
/**
|
|
473
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
474
|
+
*/
|
|
475
|
+
"invalid": boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Specifies the display of the border between elements
|
|
478
|
+
*/
|
|
479
|
+
"isBordered": boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Style variation of the content message.
|
|
482
|
+
*/
|
|
483
|
+
"variant": ControlGroupType;
|
|
484
|
+
}
|
|
464
485
|
interface GovCookiebar {
|
|
465
486
|
}
|
|
466
487
|
interface GovEmpty {
|
|
@@ -1026,6 +1047,10 @@ export namespace Components {
|
|
|
1026
1047
|
"wcagLabelledBy": string;
|
|
1027
1048
|
}
|
|
1028
1049
|
interface GovFormSearch {
|
|
1050
|
+
/**
|
|
1051
|
+
* Style variation of the form input.
|
|
1052
|
+
*/
|
|
1053
|
+
"variant": FormSearchVariantType;
|
|
1029
1054
|
}
|
|
1030
1055
|
interface GovFormSelect {
|
|
1031
1056
|
/**
|
|
@@ -1763,7 +1788,7 @@ export namespace Components {
|
|
|
1763
1788
|
*/
|
|
1764
1789
|
"close": () => Promise<void>;
|
|
1765
1790
|
/**
|
|
1766
|
-
* Defines
|
|
1791
|
+
* Defines weather the wizzard item can be collapsible
|
|
1767
1792
|
*/
|
|
1768
1793
|
"collapsible": boolean;
|
|
1769
1794
|
/**
|
|
@@ -1787,7 +1812,7 @@ export namespace Components {
|
|
|
1787
1812
|
*/
|
|
1788
1813
|
"label": string;
|
|
1789
1814
|
/**
|
|
1790
|
-
* Used to change the
|
|
1815
|
+
* Used to change the HTML tag in the accordion trigger for correct semantic structure
|
|
1791
1816
|
*/
|
|
1792
1817
|
"labelTag": string;
|
|
1793
1818
|
/**
|
|
@@ -1997,6 +2022,12 @@ declare global {
|
|
|
1997
2022
|
prototype: HTMLGovContainerElement;
|
|
1998
2023
|
new (): HTMLGovContainerElement;
|
|
1999
2024
|
};
|
|
2025
|
+
interface HTMLGovControlGroupElement extends Components.GovControlGroup, HTMLStencilElement {
|
|
2026
|
+
}
|
|
2027
|
+
var HTMLGovControlGroupElement: {
|
|
2028
|
+
prototype: HTMLGovControlGroupElement;
|
|
2029
|
+
new (): HTMLGovControlGroupElement;
|
|
2030
|
+
};
|
|
2000
2031
|
interface HTMLGovCookiebarElement extends Components.GovCookiebar, HTMLStencilElement {
|
|
2001
2032
|
}
|
|
2002
2033
|
var HTMLGovCookiebarElement: {
|
|
@@ -2286,6 +2317,7 @@ declare global {
|
|
|
2286
2317
|
"gov-button": HTMLGovButtonElement;
|
|
2287
2318
|
"gov-card": HTMLGovCardElement;
|
|
2288
2319
|
"gov-container": HTMLGovContainerElement;
|
|
2320
|
+
"gov-control-group": HTMLGovControlGroupElement;
|
|
2289
2321
|
"gov-cookiebar": HTMLGovCookiebarElement;
|
|
2290
2322
|
"gov-empty": HTMLGovEmptyElement;
|
|
2291
2323
|
"gov-error-code": HTMLGovErrorCodeElement;
|
|
@@ -2716,6 +2748,24 @@ declare namespace LocalJSX {
|
|
|
2716
2748
|
}
|
|
2717
2749
|
interface GovContainer {
|
|
2718
2750
|
}
|
|
2751
|
+
interface GovControlGroup {
|
|
2752
|
+
/**
|
|
2753
|
+
* Makes the whole component disabled. This prevents users from being able to interact with the elements, and conveys its inactive state to assistive technologies.
|
|
2754
|
+
*/
|
|
2755
|
+
"disabled"?: boolean;
|
|
2756
|
+
/**
|
|
2757
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
2758
|
+
*/
|
|
2759
|
+
"invalid"?: boolean;
|
|
2760
|
+
/**
|
|
2761
|
+
* Specifies the display of the border between elements
|
|
2762
|
+
*/
|
|
2763
|
+
"isBordered"?: boolean;
|
|
2764
|
+
/**
|
|
2765
|
+
* Style variation of the content message.
|
|
2766
|
+
*/
|
|
2767
|
+
"variant"?: ControlGroupType;
|
|
2768
|
+
}
|
|
2719
2769
|
interface GovCookiebar {
|
|
2720
2770
|
}
|
|
2721
2771
|
interface GovEmpty {
|
|
@@ -3284,6 +3334,10 @@ declare namespace LocalJSX {
|
|
|
3284
3334
|
"wcagLabelledBy"?: string;
|
|
3285
3335
|
}
|
|
3286
3336
|
interface GovFormSearch {
|
|
3337
|
+
/**
|
|
3338
|
+
* Style variation of the form input.
|
|
3339
|
+
*/
|
|
3340
|
+
"variant"?: FormSearchVariantType;
|
|
3287
3341
|
}
|
|
3288
3342
|
interface GovFormSelect {
|
|
3289
3343
|
/**
|
|
@@ -3949,7 +4003,7 @@ declare namespace LocalJSX {
|
|
|
3949
4003
|
*/
|
|
3950
4004
|
"annotation"?: string;
|
|
3951
4005
|
/**
|
|
3952
|
-
* Defines
|
|
4006
|
+
* Defines weather the wizzard item can be collapsible
|
|
3953
4007
|
*/
|
|
3954
4008
|
"collapsible"?: boolean;
|
|
3955
4009
|
/**
|
|
@@ -3969,13 +4023,13 @@ declare namespace LocalJSX {
|
|
|
3969
4023
|
*/
|
|
3970
4024
|
"label"?: string;
|
|
3971
4025
|
/**
|
|
3972
|
-
* Used to change the
|
|
4026
|
+
* Used to change the HTML tag in the accordion trigger for correct semantic structure
|
|
3973
4027
|
*/
|
|
3974
4028
|
"labelTag"?: string;
|
|
3975
4029
|
/**
|
|
3976
4030
|
* Called when the accordion state changes
|
|
3977
4031
|
*/
|
|
3978
|
-
"onGov-change"?: (event: GovWizzardItemCustomEvent<
|
|
4032
|
+
"onGov-change"?: (event: GovWizzardItemCustomEvent<WizzardItemEvent>) => void;
|
|
3979
4033
|
/**
|
|
3980
4034
|
* Size of wizzard
|
|
3981
4035
|
*/
|
|
@@ -3998,6 +4052,7 @@ declare namespace LocalJSX {
|
|
|
3998
4052
|
"gov-button": GovButton;
|
|
3999
4053
|
"gov-card": GovCard;
|
|
4000
4054
|
"gov-container": GovContainer;
|
|
4055
|
+
"gov-control-group": GovControlGroup;
|
|
4001
4056
|
"gov-cookiebar": GovCookiebar;
|
|
4002
4057
|
"gov-empty": GovEmpty;
|
|
4003
4058
|
"gov-error-code": GovErrorCode;
|
|
@@ -4062,6 +4117,7 @@ declare module "@stencil/core" {
|
|
|
4062
4117
|
"gov-button": LocalJSX.GovButton & JSXBase.HTMLAttributes<HTMLGovButtonElement>;
|
|
4063
4118
|
"gov-card": LocalJSX.GovCard & JSXBase.HTMLAttributes<HTMLGovCardElement>;
|
|
4064
4119
|
"gov-container": LocalJSX.GovContainer & JSXBase.HTMLAttributes<HTMLGovContainerElement>;
|
|
4120
|
+
"gov-control-group": LocalJSX.GovControlGroup & JSXBase.HTMLAttributes<HTMLGovControlGroupElement>;
|
|
4065
4121
|
"gov-cookiebar": LocalJSX.GovCookiebar & JSXBase.HTMLAttributes<HTMLGovCookiebarElement>;
|
|
4066
4122
|
"gov-empty": LocalJSX.GovEmpty & JSXBase.HTMLAttributes<HTMLGovEmptyElement>;
|
|
4067
4123
|
"gov-error-code": LocalJSX.GovErrorCode & JSXBase.HTMLAttributes<HTMLGovErrorCodeElement>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name" : "@gov-design-system-ce/components",
|
|
3
3
|
"description" : "This package includes Gov Design System Web Components and related utilities.",
|
|
4
4
|
"author": "Zdeněk Vítek",
|
|
5
|
-
"version" : "0.0.
|
|
5
|
+
"version" : "0.0.37",
|
|
6
6
|
"license" : "EUPL v1.2 Licensed",
|
|
7
7
|
"main" : "./dist/index.cjs.js",
|
|
8
8
|
"module" : "./dist/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"form-62c6a8c6.js","mappings":"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","names":["pick","Sizes","Variants","FormLabelClass","FormAutocompleteClass","FormMessageClass"],"sources":["../../../packages/core/src/components/gov-form/checkbox/constants.ts","../../../packages/core/src/components/gov-form/control/constants.ts","../../../packages/core/src/components/gov-form/input/constants.ts","../../../packages/core/src/components/gov-form/select/constants.ts","../../../packages/core/src/components/gov-form/multiselect/constants.ts","../../../packages/core/src/components/gov-form/switch/constants.ts","../../../packages/core/src/components/gov-form/radio/constants.ts","../../../packages/core/src/helpers/Dom/form.ts"],"sourcesContent":["import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormCheckboxSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormCheckboxSizesType = `${ValueOf<typeof FormCheckboxSizes>}`\n\nexport const FormCheckboxClass = {\n\troot: 'gov-form-checkbox',\n\tcheck: 'gov-form-checkbox__check',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormControlSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormControlSizesType = `${ValueOf<typeof FormControlSizes>}`\n\nexport const FormControlClass = {\n\troot: 'gov-form-control',\n\tholder: 'gov-form-control__holder',\n\tbottom: 'gov-form-control__bottom',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { Variants } from '../../../core/constants/variants'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormInputSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormInputSizesType = `${ValueOf<typeof FormInputSizes>}`\n\nexport const FormInputVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormInputVariantType = `${ValueOf<typeof FormInputVariants>}`\n\nexport enum InputTypes {\n\tCOLOR = 'color',\n\tDATE = 'date',\n\tDATETIME_LOCAL = 'datetime-local',\n\tEMAIL = 'email',\n\tMONTH = 'month',\n\tNUMBER = 'number',\n\tPASSWORD = 'password',\n\tSEARCH = 'search',\n\tTEL = 'tel',\n\tTEXT = 'text',\n\tTIME = 'time',\n\tURL = 'url',\n\tWEEK = 'week',\n}\n\nexport type InputType = `${ValueOf<typeof InputTypes>}`\n\nexport enum Type {\n\tRESET = 'reset',\n}\n\nexport type TypesType = `${ValueOf<typeof Type>}`\n\nexport const FormInputClass = {\n\troot: 'gov-form-input',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { Variants } from '../../../core/constants/variants'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormSelectSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormSelectSizesType = `${ValueOf<typeof FormSelectSizes>}`\n\nexport const FormSelectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormSelectVariantType = `${ValueOf<typeof FormSelectVariants>}`\n\nexport const FormSelectClass = {\n\troot: 'gov-form-select',\n\ticon: 'gov-form-select__icon',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { Variants } from '../../../core/constants/variants'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormMultiselectSizes = pick(Sizes, ['_M', '_L', '_XL'])\nexport type FormMultiselectSizesType = `${ValueOf<typeof FormMultiselectSizes>}`\n\nexport const FormMultiselectVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormMultiselectVariantType = `${ValueOf<typeof FormMultiselectVariants>}`\n\nexport const FormMultiSelectClass = {\n\troot: 'gov-form-multi-select',\n\twrap: 'gov-form-multi-select__wrap',\n\tlist: 'gov-form-multi-select__list',\n\titem: 'gov-form-multi-select__item',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\n\nexport const FormSwitchSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormSwitchSizesType = `${ValueOf<typeof FormSwitchSizes>}`\n\nexport const FormSwitchClass = {\n\troot: 'gov-form-switch',\n\tholder: 'gov-form-switch__holder',\n\tinput: 'gov-form-switch__input',\n\tindicator: 'gov-form-switch__indicator',\n}\n","import { Sizes } from '../../../core/constants/sizes'\nimport { pick } from '../../../utils/utils'\nimport { ValueOf } from '../../../types/interfaces'\n\nexport const FormRadioSizes = pick(Sizes, ['_XS', '_S', '_M', '_L'])\nexport type FormRadioSizesType = `${ValueOf<typeof FormRadioSizes>}`\n\nexport const FormRadioClass = {\n\troot: 'gov-form-radio',\n\tholder: 'gov-form-radio__holder',\n\tinput: 'gov-form-radio__input',\n\tindicator: 'gov-form-radio__indicator',\n}\n","import { GovHost } from './template.types'\nimport { GovForm } from './form.types'\nimport { FormControlClass } from '../../components/gov-form/control/constants'\nimport { FormInputClass } from '../../components/gov-form/input/constants'\nimport { FormSelectClass } from '../../components/gov-form/select/constants'\nimport { FormMultiSelectClass } from '../../components/gov-form/multiselect/constants'\nimport { FormSwitchClass } from '../../components/gov-form/switch/constants'\nimport { FormCheckboxClass } from '../../components/gov-form/checkbox/constants'\nimport { FormRadioClass } from '../../components/gov-form/radio/constants'\nimport { FormMessageClass } from '../../components/gov-form/message/constants'\nimport { FormAutocompleteClass } from '../../components/gov-form/autocomplete/constants'\nimport { Nullable } from '../../types/interfaces'\nimport { FormLabelClass } from \"../../components/gov-form/label/constants\"\n\nexport const govForm = (govHost: GovHost): GovForm => {\n\treturn {\n\t\tget govHost(): GovHost {\n\t\t\treturn govHost\n\t\t},\n\t\tpassAttrToControl(name: string, value: string): void {\n\t\t\tif (this.control) {\n\t\t\t\tthis.control.setAttribute(name, value)\n\t\t\t}\n\t\t},\n\t\tpassAttrToLabel(name: string, value: string): void {\n\t\t\tif (this.label) {\n\t\t\t\tthis.label.setAttribute(name, value)\n\t\t\t}\n\t\t},\n\t\tget hasGroupChildren(): boolean {\n\t\t\tif (this.control) {\n\t\t\t\treturn this.control.querySelectorAll('gov-form-group > *').length > 1\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\tget control(): Nullable<HTMLGovFormControlElement> {\n\t\t\tif (this.govHost.name === FormControlClass.root) {\n\t\t\t\treturn this.govHost.hostElement\n\t\t\t}\n\t\t\treturn this.govHost.getParent(FormControlClass.root)\n\t\t},\n\t\tget label(): Nullable<HTMLGovFormLabelElement> {\n\t\t\tconst innerLabel = this.govHost.hostElement.querySelector(`.${FormLabelClass.root}`)\n\t\t\tif(innerLabel) {\n\t\t\t\treturn innerLabel\n\t\t\t}\n\t\t\tif (this.control) {\n\t\t\t\treturn this.control.querySelector(`.${FormLabelClass.root}`)\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\t\tget mainElementsInControl(): Element[] {\n\t\t\tconst formElements = [\n\t\t\t\tFormSelectClass.root,\n\t\t\t\tFormInputClass.root,\n\t\t\t\tFormSwitchClass.root,\n\t\t\t\tFormCheckboxClass.root,\n\t\t\t\tFormRadioClass.root,\n\t\t\t\tFormMultiSelectClass.root,\n\t\t\t\tFormAutocompleteClass.root,\n\t\t\t]\n\t\t\tif (this.control) {\n\t\t\t\tconst elements = formElements.map(el => `${el}:first-of-type`).join(', ')\n\t\t\t\treturn Array.from(this.control.querySelectorAll(elements))\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t\tget messageElements(): HTMLGovFormMessageElement[] {\n\t\t\tif (this.control) {\n\t\t\t\treturn Array.from(this.control.querySelectorAll(FormMessageClass.root))\n\t\t\t}\n\t\t\treturn []\n\t\t},\n\t}\n}\n"],"version":3}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,c as i,h as t,H as e,g as r}from"./p-4af5e4f4.js";import{g as n,k as a,l as s,m as l}from"./p-7e524b49.js";import{c as v}from"./p-24636c53.js";import{g,a as c,t as p,c as m}from"./p-3f37ddb6.js";import{v as d}from"./p-26acf964.js";import{c as f}from"./p-c20102ff.js";import{d as u}from"./p-03990da5.js";import{b as h,c as x}from"./p-670b4f93.js";import"./p-55500e5a.js";import"./p-ff7365ae.js";import"./p-6278531b.js";import"./p-9dab01be.js";import"./p-3464136c.js";import"./p-561fa17b.js";const z='.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-form-input{position:relative;display:flex;width:100%;align-items:center}.gov-form-input .element{position:relative;display:flex;flex:1 1 auto}.gov-form-input input,.gov-form-input select,.gov-form-input textarea{width:100%;border:var(--gov-form-input-border-width, 0.0625rem solid var(--gov-color-secondary-700));border-radius:var(--gov-border-radius, 0.1875rem);background-color:var(--gov-form-bg-color, var(--gov-color-neutral-white));color:var(--gov-form-input-color, var(--gov-color-secondary-700));font-family:var(--gov-font-family, "Roboto", sans-serif)}.gov-form-input input:focus,.gov-form-input select:focus,.gov-form-input textarea:focus{outline:none}.gov-form-input input:focus-visible,.gov-form-input select:focus-visible,.gov-form-input textarea:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-form-input input::-moz-placeholder,.gov-form-input select::-moz-placeholder,.gov-form-input textarea::-moz-placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input input::placeholder,.gov-form-input select::placeholder,.gov-form-input textarea::placeholder{color:var(--gov-form-placeholder-color, var(--gov-color-secondary-600))}.gov-form-input textarea{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);padding:0.5rem 0.75rem;resize:none}.gov-form-input *[slot=left-icon],.gov-form-input *[slot=right-icon]{position:absolute;top:50%;display:flex;justify-content:center;color:var(--gov-form-input-icon-color, var(--gov-color-primary));transform:translateY(-50%);pointer-events:none}.gov-form-input *[slot=left-icon]{left:0}.gov-form-input *[slot=right-icon]{right:0}[disabled=""].gov-form-input,[disabled=true i].gov-form-input,[disabled="1"].gov-form-input{pointer-events:none}[disabled=""].gov-form-input input,[disabled=""].gov-form-input select,[disabled=""].gov-form-input textarea,[disabled=true i].gov-form-input input,[disabled=true i].gov-form-input select,[disabled=true i].gov-form-input textarea,[disabled="1"].gov-form-input input,[disabled="1"].gov-form-input select,[disabled="1"].gov-form-input textarea{border-color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));background:var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[disabled=""].gov-form-input *[slot=left-icon],[disabled=""].gov-form-input *[slot=right-icon],[disabled=true i].gov-form-input *[slot=left-icon],[disabled=true i].gov-form-input *[slot=right-icon],[disabled="1"].gov-form-input *[slot=left-icon],[disabled="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-disabled, var(--gov-color-secondary-600))}[invalid=""].gov-form-input input,[invalid=""].gov-form-input select,[invalid=""].gov-form-input textarea,[invalid=true i].gov-form-input input,[invalid=true i].gov-form-input select,[invalid=true i].gov-form-input textarea,[invalid="1"].gov-form-input input,[invalid="1"].gov-form-input select,[invalid="1"].gov-form-input textarea{border-color:var(--gov-form-state-color-error, var(--gov-color-error));color:var(--gov-form-state-color-error, var(--gov-color-error))}[invalid=""].gov-form-input input::-moz-placeholder,[invalid=""].gov-form-input select::-moz-placeholder,[invalid=""].gov-form-input textarea::-moz-placeholder,[invalid=true i].gov-form-input input::-moz-placeholder,[invalid=true i].gov-form-input select::-moz-placeholder,[invalid=true i].gov-form-input textarea::-moz-placeholder,[invalid="1"].gov-form-input input::-moz-placeholder,[invalid="1"].gov-form-input select::-moz-placeholder,[invalid="1"].gov-form-input textarea::-moz-placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input input::placeholder,[invalid=""].gov-form-input select::placeholder,[invalid=""].gov-form-input textarea::placeholder,[invalid=true i].gov-form-input input::placeholder,[invalid=true i].gov-form-input select::placeholder,[invalid=true i].gov-form-input textarea::placeholder,[invalid="1"].gov-form-input input::placeholder,[invalid="1"].gov-form-input select::placeholder,[invalid="1"].gov-form-input textarea::placeholder{color:var(--gov-form-state-color-error, var(--gov-color-error-300))}[invalid=""].gov-form-input *[slot=left-icon],[invalid=""].gov-form-input *[slot=right-icon],[invalid=true i].gov-form-input *[slot=left-icon],[invalid=true i].gov-form-input *[slot=right-icon],[invalid="1"].gov-form-input *[slot=left-icon],[invalid="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-error, var(--gov-color-error))}[success=""].gov-form-input *[slot=right-icon],[success=true i].gov-form-input *[slot=right-icon],[success="1"].gov-form-input *[slot=right-icon]{color:var(--gov-form-state-color-success, var(--gov-color-success))}[success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),[success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}[size=m].gov-form-input{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-input input,[size=m].gov-form-input select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-m-height, 2.5rem);padding:var(--gov-form-input-core-m-padding, 0.4375rem 0.75rem)}[size=m].gov-form-input *[slot=left-icon],[size=m].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-m-icon-size, 1rem);height:var(--gov-form-input-core-m-icon-size, 1rem)}[size=m].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=m].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-m-icon-padding, 2.5rem) - var(--gov-form-input-core-m-icon-size, 1rem)) / 2)}[size=m].gov-form-input *[slot=right-icon]~input,[size=m].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-m-icon-padding, 2.5rem)}[size=l].gov-form-input{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);gap:0.5rem var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-input input,[size=l].gov-form-input select{font-weight:var(--gov-text-m-font-weight);font-size:var(--gov-text-m-font-size);line-height:var(--gov-text-m-line-height);letter-spacing:var(--gov-text-m-letter-spacing);height:var(--gov-form-input-core-l-height, 3rem);padding:var(--gov-form-input-core-l-padding, 0.6875rem 0.75rem)}[size=l].gov-form-input *[slot=left-icon],[size=l].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-l-icon-size, 1rem);height:var(--gov-form-input-core-l-icon-size, 1rem)}[size=l].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=l].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-l-icon-padding, 2.5rem) - var(--gov-form-input-core-l-icon-size, 1rem)) / 2)}[size=l].gov-form-input *[slot=right-icon]~input,[size=l].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-l-icon-padding, 2.5rem)}[size=xl].gov-form-input{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);gap:0.5rem var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-input input,[size=xl].gov-form-input select{font-weight:var(--gov-text-l-font-weight);font-size:var(--gov-text-l-font-size);line-height:var(--gov-text-l-line-height);letter-spacing:var(--gov-text-l-letter-spacing);height:var(--gov-form-input-core-xl-height, 3.5rem);padding:var(--gov-form-input-core-xl-padding, 0.9375rem 1rem 0.875rem)}[size=xl].gov-form-input *[slot=left-icon],[size=xl].gov-form-input *[slot=right-icon]{width:var(--gov-form-input-core-xl-icon-size, 1.25rem);height:var(--gov-form-input-core-xl-icon-size, 1.25rem)}[size=xl].gov-form-input *[slot=left-icon]{left:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-input *[slot=left-icon]~input{padding-left:var(--gov-form-input-core-xl-icon-padding, 3rem)}[size=xl].gov-form-input *[slot=right-icon]{right:calc((var(--gov-form-input-core-xl-icon-padding, 3rem) - var(--gov-form-input-core-xl-icon-size, 1.25rem)) / 2)}[size=xl].gov-form-input *[slot=right-icon]~input,[size=xl].gov-form-input *[slot=right-icon]~select{padding-right:var(--gov-form-input-core-xl-icon-padding, 3rem)}.gov-form-input[invalid=""] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),.gov-form-input[invalid=true i] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow),.gov-form-input[invalid="1"] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow){display:none}.gov-form-input[type=reset] input{border-width:0}.gov-form-input[type=reset] input:focus{outline:none}';var b;(function(o){o["INPUT"]="input";o["TEXTAREA"]="textarea"})(b||(b={}));const w=class{constructor(t){o(this,t);this.govFocus=i(this,"gov-focus",7);this.govBlur=i(this,"gov-blur",7);this.govInput=i(this,"gov-input",7);this.govKeyUp=i(this,"gov-keyup",7);this.govKeyDown=i(this,"gov-keydown",7);this.value=undefined;this.identifier=undefined;this.variant=undefined;this.success=undefined;this.size="m";this.name=undefined;this.multiline=undefined;this.rows=undefined;this.cols=undefined;this.required=false;this.disabled=undefined;this.placeholder=undefined;this.readonly=undefined;this.minlength=undefined;this.maxlength=undefined;this.min=undefined;this.max=undefined;this.autocomplete=undefined;this.autocorrect=undefined;this.type=undefined;this.inputType="text";this.role=undefined;this.invalid=undefined;this.wcagDescribedBy=undefined;this.wcagLabelledBy=undefined;this.wcagOwns=undefined;this.wcagAutocomplete=undefined;this.wcagExpanded=undefined;this.focused=undefined;this.h=g(this.host);this.inputId=v("GovInput");this.f=n(this.h)}validateVariant(o){d(s,o,a.root)}validateSize(o){d(l,o,a.root)}watchDisabled(){this.passControlAttrs()}passControlAttrs(){this.f.passAttrToControl("size",this.size);this.f.passAttrToControl("disabled",c(this.disabled));this.f.passAttrToControl("invalid",c(this.invalid));this.f.passAttrToControl("type",this.multiline?b.TEXTAREA:b.INPUT)}componentWillLoad(){this.validateVariant(this.variant);this.validateSize(this.size);this.passControlAttrs();this.f.passAttrToLabel("required",String(this.required))}async componentDidRender(){if(f()){await u(500);await this.validateWcag()}}render(){const o=this.multiline?b.TEXTAREA:b.INPUT;return t(e,{class:a.root,size:this.size,variant:this.variant,type:this.type},this.h.hasSlot("prefix")&&t("slot",{name:"prefix"}),t("span",{class:"element"},this.h.hasSlot("left-icon")&&t("slot",{name:"left-icon"}),this.h.hasSlot("right-icon")&&!(this.success||this.invalid)&&t("slot",{name:"right-icon"}),this.success&&!this.multiline&&t("gov-icon",{slot:"right-icon",class:"icon-validation",name:"check-lg"}),this.invalid&&!this.multiline&&t("gov-icon",{slot:"right-icon",class:"icon-validation",name:"exclamation-lg"}),t(o,{type:this.inputType,disabled:this.disabled,id:this.identifier||this.inputId,name:this.name,onFocus:this.onFocusHandler.bind(this),onInput:this.onInputHandler.bind(this),onBlur:this.onBlurHandler.bind(this),onKeyUp:this.onKeyUpHandler.bind(this),onKeyDown:this.onKeyDownHandler.bind(this),ref:o=>this.inputRef=o,placeholder:this.placeholder,value:this.value,readonly:p(this.readonly),autocomplete:m(this.autocomplete),autocorrect:m(this.autocorrect),minlength:this.minlength,maxlength:this.maxlength,min:this.min,max:this.max,required:this.required,rows:this.rows,cols:this.cols,role:this.role,"aria-required":p(this.required),"aria-invalid":p(this.invalid),"aria-disabled":p(this.disabled),"aria-describedby":this.wcagDescribedBy,"aria-labelledby":this.wcagLabelledBy,"aria-owns":this.wcagOwns,"aria-expanded":p(this.wcagExpanded),"aria-autocomplete":this.wcagAutocomplete})),this.h.hasSlot("sufix")&&t("slot",{name:"sufix"}))}onFocusHandler(o){o.stopPropagation();this.focused=true;this.govFocus.emit({component:a.root,value:this.value,originalEvent:o})}onBlurHandler(o){o.stopPropagation();this.focused=false;this.govBlur.emit({component:a.root,value:this.value,originalEvent:o})}onKeyUpHandler(o){o.stopPropagation();this.govKeyUp.emit({component:a.root,value:this.value,originalEvent:o})}onKeyDownHandler(o){o.stopPropagation();this.govKeyDown.emit({component:a.root,value:this.value,originalEvent:o})}onInputHandler(o){this.value=o.target.value;o.stopPropagation();this.govInput.emit({component:a.root,value:this.value,originalEvent:o})}async setFocus(o){return this.inputRef.focus(o)}async setValue(o){this.value=o}async clearValue(){this.value="";this.inputRef.value=""}async getRef(){return this.inputRef}async validateWcag(){h(this.wcagDescribedBy,"wcag-described-by",a.root);h(this.wcagLabelledBy,"wcag-labelled-by",a.root);h(this.wcagOwns,"wcag-owns",a.root);x(this.identifier||this.inputId,this.wcagLabelledBy,a.root)}get host(){return r(this)}static get watchers(){return{variant:["validateVariant"],size:["validateSize","watchDisabled"],disabled:["watchDisabled"],invalid:["watchDisabled"],type:["watchDisabled"]}}};w.style=z;export{w as gov_form_input};
|
|
2
|
-
//# sourceMappingURL=p-0a300d3e.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.scss?tag=gov-form-input","../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"names":["govFormInputCss","Tags","GovFormInput","[object Object]","hostRef","this","h","govHost","host","inputId","createID","f","govForm","newValue","validateProp","FormInputVariants","FormInputClass","root","FormInputSizes","passControlAttrs","passAttrToControl","size","toBoolAttr","disabled","invalid","multiline","TEXTAREA","INPUT","validateVariant","variant","validateSize","passAttrToLabel","String","required","canValidateWcagOnRender","delay","validateWcag","Tag","Host","class","type","hasSlot","name","success","slot","inputType","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","value","readonly","toBoolAttrIfDefined","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","aria-required","aria-invalid","aria-disabled","aria-describedby","wcagDescribedBy","aria-labelledby","wcagLabelledBy","aria-owns","wcagOwns","aria-expanded","wcagExpanded","aria-autocomplete","wcagAutocomplete","e","stopPropagation","focused","govFocus","emit","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","options","focus","validateWcagRef","validateWcagLabelFor"],"mappings":"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","sourcesContent":["/*\n * Input\n */\n\n@import \"../input/gov-form-input-core.scss\";\n$class: \".gov-form-input\";\n\n#{$class} {\n\t@extend %form-input-core;\n\n\t// STATES\n\t@include parameter(\"invalid\") {\n\t\t*[slot=\"right-icon\"]:not(.icon-validation):not(.icon-arrow) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t&[type=\"reset\"] {\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, Host, h, Prop, Watch, Event, EventEmitter, State, Method } from '@stencil/core'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { FormInputSizes, FormInputSizesType, InputType, Type } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { FormInputClass, FormInputVariants, FormInputVariantType } from './constants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { delay } from '../../../utils/utils'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { FormInputEvent } from './gov-form-input.types'\n\nenum Tags {\n\tINPUT = 'input',\n\tTEXTAREA = 'textarea',\n}\n\n@Component({\n\ttag: 'gov-form-input',\n\tstyleUrl: 'gov-form-input.scss',\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID('GovInput')\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = 'm'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = 'text'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: 'wcag-autocomplete' }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-input' }) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keyup' }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keydown' }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('type', this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
|