@govtechsg/sgds-web-component 3.1.0-rc.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/button.js +1 -1
- package/base/select-element.d.ts +80 -0
- package/base/select-element.js +201 -0
- package/base/select-element.js.map +1 -0
- package/components/Accordion/index.umd.js +7 -5
- package/components/Accordion/index.umd.js.map +1 -1
- package/components/Accordion/sgds-accordion-item.d.ts +0 -1
- package/components/Accordion/sgds-accordion-item.js +7 -5
- package/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/components/Breadcrumb/index.umd.js +5 -2
- package/components/Breadcrumb/index.umd.js.map +1 -1
- package/components/Button/button.js +1 -1
- package/components/Button/index.umd.js +3 -6
- package/components/Button/index.umd.js.map +1 -1
- package/components/Button/sgds-button.js +1 -4
- package/components/Button/sgds-button.js.map +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.js +42 -34
- package/components/Checkbox/index.umd.js.map +1 -1
- package/components/Checkbox/sgds-checkbox-group.d.ts +6 -4
- package/components/Checkbox/sgds-checkbox-group.js +34 -17
- package/components/Checkbox/sgds-checkbox-group.js.map +1 -1
- package/components/Checkbox/sgds-checkbox.d.ts +2 -3
- package/components/Checkbox/sgds-checkbox.js +9 -21
- package/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/components/ComboBox/combo-box.js +1 -1
- package/components/ComboBox/index.umd.js +492 -500
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +9 -82
- package/components/ComboBox/sgds-combo-box.js +13 -202
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/index.umd.js +4 -7
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/Dropdown/dropdown-menu.js +1 -1
- package/components/Dropdown/dropdown.js +1 -1
- package/components/Dropdown/index.umd.js +5 -2
- package/components/Dropdown/index.umd.js.map +1 -1
- package/components/Dropdown/sgds-dropdown-item.js +3 -0
- package/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/components/FileUpload/index.umd.js +3 -6
- package/components/FileUpload/index.umd.js.map +1 -1
- package/components/IconButton/index.umd.js +1 -1
- package/components/Mainnav/index.umd.js +13 -10
- package/components/Mainnav/index.umd.js.map +1 -1
- package/components/Mainnav/mainnav-dropdown.js +1 -1
- package/components/Mainnav/mainnav-item.js +1 -1
- package/components/Mainnav/mainnav.js +1 -1
- package/components/Pagination/index.umd.js +3 -6
- package/components/Pagination/index.umd.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +1 -1
- package/components/Select/index.d.ts +6 -0
- package/components/Select/index.js +4 -0
- package/components/Select/index.js.map +1 -0
- package/components/Select/index.umd.js +10317 -0
- package/components/Select/index.umd.js.map +1 -0
- package/components/Select/select-item.d.ts +17 -0
- package/components/Select/select-item.js +61 -0
- package/components/Select/select-item.js.map +1 -0
- package/components/Select/select-item2.js +6 -0
- package/components/Select/select-item2.js.map +1 -0
- package/components/Select/select.js +6 -0
- package/components/Select/select.js.map +1 -0
- package/components/Select/sgds-select.d.ts +27 -0
- package/components/Select/sgds-select.js +158 -0
- package/components/Select/sgds-select.js.map +1 -0
- package/components/Subnav/index.d.ts +8 -0
- package/components/Subnav/index.js +6 -0
- package/components/Subnav/index.js.map +1 -0
- package/components/Subnav/index.umd.js +6074 -0
- package/components/Subnav/index.umd.js.map +1 -0
- package/components/Subnav/sgds-subnav-item.d.ts +16 -0
- package/components/Subnav/sgds-subnav-item.js +68 -0
- package/components/Subnav/sgds-subnav-item.js.map +1 -0
- package/components/Subnav/sgds-subnav.d.ts +47 -0
- package/components/Subnav/sgds-subnav.js +253 -0
- package/components/Subnav/sgds-subnav.js.map +1 -0
- package/components/Subnav/subnav-item.js +6 -0
- package/components/Subnav/subnav-item.js.map +1 -0
- package/components/Subnav/subnav.js +6 -0
- package/components/Subnav/subnav.js.map +1 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/index.umd.js +812 -355
- package/components/index.umd.js.map +1 -1
- package/css/grid.js +6 -0
- package/css/grid.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/index.umd.js +897 -376
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/react/base/button.cjs.js +1 -1
- package/react/base/button.js +1 -1
- package/react/base/select-element.cjs.js +206 -0
- package/react/base/select-element.cjs.js.map +1 -0
- package/react/base/select-element.js +202 -0
- package/react/base/select-element.js.map +1 -0
- package/react/checkbox/index.cjs.js +2 -1
- package/react/checkbox/index.cjs.js.map +1 -1
- package/react/checkbox/index.js +2 -1
- package/react/checkbox/index.js.map +1 -1
- package/react/checkbox-group/index.cjs.js +3 -1
- package/react/checkbox-group/index.cjs.js.map +1 -1
- package/react/checkbox-group/index.js +3 -1
- package/react/checkbox-group/index.js.map +1 -1
- package/react/components/Accordion/sgds-accordion-item.cjs.js +7 -5
- package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
- package/react/components/Accordion/sgds-accordion-item.js +7 -5
- package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/react/components/Button/button.cjs.js +1 -1
- package/react/components/Button/button.js +1 -1
- package/react/components/Button/sgds-button.cjs.js +1 -4
- package/react/components/Button/sgds-button.cjs.js.map +1 -1
- package/react/components/Button/sgds-button.js +1 -4
- package/react/components/Button/sgds-button.js.map +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox-group.cjs.js +33 -16
- package/react/components/Checkbox/sgds-checkbox-group.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox-group.js +34 -17
- package/react/components/Checkbox/sgds-checkbox-group.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js +9 -21
- package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.js +9 -21
- package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/react/components/ComboBox/combo-box.cjs.js +1 -1
- package/react/components/ComboBox/combo-box.js +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +12 -201
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +13 -202
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
- package/react/components/Dropdown/dropdown-menu.js +1 -1
- package/react/components/Dropdown/dropdown.cjs.js +1 -1
- package/react/components/Dropdown/dropdown.js +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.cjs.js +3 -0
- package/react/components/Dropdown/sgds-dropdown-item.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.js +3 -0
- package/react/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-dropdown.js +1 -1
- package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
- package/react/components/Mainnav/mainnav-item.js +1 -1
- package/react/components/Mainnav/mainnav.cjs.js +1 -1
- package/react/components/Mainnav/mainnav.js +1 -1
- package/react/components/Select/select-item.cjs.js +67 -0
- package/react/components/Select/select-item.cjs.js.map +1 -0
- package/react/components/Select/select-item.cjs2.js +11 -0
- package/react/components/Select/select-item.cjs2.js.map +1 -0
- package/react/components/Select/select-item.js +62 -0
- package/react/components/Select/select-item.js.map +1 -0
- package/react/components/Select/select-item2.js +7 -0
- package/react/components/Select/select-item2.js.map +1 -0
- package/react/components/Select/select.cjs.js +11 -0
- package/react/components/Select/select.cjs.js.map +1 -0
- package/react/components/Select/select.js +7 -0
- package/react/components/Select/select.js.map +1 -0
- package/react/components/Select/sgds-select.cjs.js +164 -0
- package/react/components/Select/sgds-select.cjs.js.map +1 -0
- package/react/components/Select/sgds-select.js +159 -0
- package/react/components/Select/sgds-select.js.map +1 -0
- package/react/components/Subnav/sgds-subnav-item.cjs.js +74 -0
- package/react/components/Subnav/sgds-subnav-item.cjs.js.map +1 -0
- package/react/components/Subnav/sgds-subnav-item.js +69 -0
- package/react/components/Subnav/sgds-subnav-item.js.map +1 -0
- package/react/components/Subnav/sgds-subnav.cjs.js +259 -0
- package/react/components/Subnav/sgds-subnav.cjs.js.map +1 -0
- package/react/components/Subnav/sgds-subnav.js +254 -0
- package/react/components/Subnav/sgds-subnav.js.map +1 -0
- package/react/components/Subnav/subnav-item.cjs.js +11 -0
- package/react/components/Subnav/subnav-item.cjs.js.map +1 -0
- package/react/components/Subnav/subnav-item.js +7 -0
- package/react/components/Subnav/subnav-item.js.map +1 -0
- package/react/components/Subnav/subnav.cjs.js +11 -0
- package/react/components/Subnav/subnav.cjs.js.map +1 -0
- package/react/components/Subnav/subnav.js +7 -0
- package/react/components/Subnav/subnav.js.map +1 -0
- package/react/css/grid.cjs.js +11 -0
- package/react/css/grid.cjs.js.map +1 -0
- package/react/css/grid.js +7 -0
- package/react/css/grid.js.map +1 -0
- package/react/index.cjs.js +38 -32
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +3 -0
- package/react/index.js +3 -0
- package/react/index.js.map +1 -1
- package/react/select/index.cjs.js +46 -0
- package/react/select/index.cjs.js.map +1 -0
- package/react/select/index.d.ts +2 -0
- package/react/select/index.js +22 -0
- package/react/select/index.js.map +1 -0
- package/react/subnav/index.cjs.js +45 -0
- package/react/subnav/index.cjs.js.map +1 -0
- package/react/subnav/index.d.ts +2 -0
- package/react/subnav/index.js +21 -0
- package/react/subnav/index.js.map +1 -0
- package/react/subnav-item/index.cjs.js +40 -0
- package/react/subnav-item/index.cjs.js.map +1 -0
- package/react/subnav-item/index.d.ts +2 -0
- package/react/subnav-item/index.js +16 -0
- package/react/subnav-item/index.js.map +1 -0
- package/react/utils/breakpoints.cjs.js +4 -4
- package/react/utils/breakpoints.cjs.js.map +1 -1
- package/react/utils/breakpoints.js +4 -4
- package/react/utils/breakpoints.js.map +1 -1
- package/utils/breakpoints.d.ts +4 -4
- package/utils/breakpoints.js +4 -4
- package/utils/breakpoints.js.map +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import SgdsElement from "../../base/sgds-element";
|
|
2
|
+
import SgdsIcon from "../Icon/sgds-icon";
|
|
3
|
+
export declare class SelectItem extends SgdsElement {
|
|
4
|
+
/** @internal */
|
|
5
|
+
static dependencies: {
|
|
6
|
+
"sgds-icon": typeof SgdsIcon;
|
|
7
|
+
};
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
/** when true, sets the active stylings */
|
|
10
|
+
active: boolean;
|
|
11
|
+
/** Disables the Item */
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
private _handleClickItem;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
}
|
|
17
|
+
export default SelectItem;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { html, nothing } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
+
import SgdsElement from '../../base/sgds-element.js';
|
|
6
|
+
import { SgdsIcon } from '../Icon/sgds-icon.js';
|
|
7
|
+
import css_248z from './select-item2.js';
|
|
8
|
+
|
|
9
|
+
class SelectItem extends SgdsElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/** when true, sets the active stylings */
|
|
13
|
+
this.active = false;
|
|
14
|
+
/** Disables the Item */
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
}
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
super.connectedCallback();
|
|
19
|
+
this.setAttribute("role", "menuitem");
|
|
20
|
+
this.setAttribute("aria-disabled", `${this.disabled}`);
|
|
21
|
+
this.addEventListener("keydown", (e) => {
|
|
22
|
+
if (e.key === "Enter") {
|
|
23
|
+
this._handleClickItem();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
this.addEventListener("click", () => {
|
|
27
|
+
this._handleClickItem();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
_handleClickItem() {
|
|
31
|
+
this.emit("sgds-select");
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
const classes = {
|
|
35
|
+
disabled: this.disabled,
|
|
36
|
+
active: this.active
|
|
37
|
+
};
|
|
38
|
+
return html `
|
|
39
|
+
<div class="dropdown-item ${classMap(classes)}" tabindex=${this.disabled ? "-1" : "0"}>
|
|
40
|
+
<div class="normal-item-content">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
${this.active ? html ` <sgds-icon name="check"></sgds-icon> ` : nothing}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** @internal */
|
|
49
|
+
SelectItem.dependencies = {
|
|
50
|
+
"sgds-icon": SgdsIcon
|
|
51
|
+
};
|
|
52
|
+
SelectItem.styles = [css_248z];
|
|
53
|
+
__decorate([
|
|
54
|
+
property({ type: Boolean, reflect: true })
|
|
55
|
+
], SelectItem.prototype, "active", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
property({ type: Boolean, reflect: true })
|
|
58
|
+
], SelectItem.prototype, "disabled", void 0);
|
|
59
|
+
|
|
60
|
+
export { SelectItem, SelectItem as default };
|
|
61
|
+
//# sourceMappingURL=select-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-item.js","sources":["../../../src/components/Select/select-item.ts"],"sourcesContent":["import { html, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport selectItemStyles from \"./select-item.css\";\n\nexport class SelectItem extends SgdsElement {\n /** @internal */\n static dependencies = {\n \"sgds-icon\": SgdsIcon\n };\n\n static styles = [selectItemStyles];\n /** when true, sets the active stylings */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /** Disables the Item */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute(\"role\", \"menuitem\");\n this.setAttribute(\"aria-disabled\", `${this.disabled}`);\n this.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this._handleClickItem();\n }\n });\n this.addEventListener(\"click\", () => {\n this._handleClickItem();\n });\n }\n\n private _handleClickItem() {\n this.emit(\"sgds-select\");\n }\n\n render() {\n const classes = {\n disabled: this.disabled,\n active: this.active\n };\n\n return html`\n <div class=\"dropdown-item ${classMap(classes)}\" tabindex=${this.disabled ? \"-1\" : \"0\"}>\n <div class=\"normal-item-content\">\n <slot></slot>\n ${this.active ? html` <sgds-icon name=\"check\"></sgds-icon> ` : nothing}\n </div>\n </div>\n `;\n }\n}\n\nexport default SelectItem;\n"],"names":["selectItemStyles"],"mappings":";;;;;;;;AAOM,MAAO,UAAW,SAAQ,WAAW,CAAA;AAA3C,IAAA,WAAA,GAAA;;;QAQ8C,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;;QAGf,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAmC9D;IAjCC,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;AAC1B,QAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAG,EAAA,IAAI,CAAC,QAAQ,CAAE,CAAA,CAAC,CAAC;QACvD,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAgB,KAAI;AACpD,YAAA,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;gBACrB,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACzB;AACH,SAAC,CAAC,C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-item{background-color:var(--sgds-bg-transparent);clear:both;color:var(--sgds-color-default);cursor:pointer;height:100%;padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-align:inherit;white-space:nowrap}.dropdown-item .normal-item-content{align-items:center;display:flex;justify-content:space-between}:host([active]) .dropdown-item .normal-item-content{color:var(--sgds-primary-bg-default)}:host([active]) .dropdown-item .normal-item-content sgds-icon{fill:var(--sgds-primary-bg-default);color:var(--sgds-primary-bg-default)}.dropdown-item:hover{background:var(--sgds-bg-translucent-subtle)}.dropdown-item:focus,.dropdown-item:focus-visible{background:var(--sgds-bg-translucent-subtle);box-shadow:inset var(--sgds-form-box-shadow-focus);outline:0}`;
|
|
4
|
+
|
|
5
|
+
export { css_248z as default };
|
|
6
|
+
//# sourceMappingURL=select-item2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-item2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
var css_248z = css`:host{display:block;position:relative}.select{flex-direction:column;gap:var(--sgds-form-gap-md)}.select .dropdown-menu{min-width:100%}.dropdown{display:flex;height:100%}.select{align-items:stretch;display:flex;flex-wrap:wrap;justify-content:flex-end;position:relative;width:-webkit-fill-available;width:-moz-available}.dropdown-menu{box-sizing:border-box;max-height:10rem;overflow-x:hidden;overflow-y:auto}.form-control-group.disabled{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-control-group{align-items:center;background-color:var(--sgds-form-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);border-radius:var(--sgds-form-border-radius-md);display:flex;gap:var(--sgds-form-gap-md);justify-content:space-between;min-height:var(--sgds-dimension-48);min-width:var(--sgds-dimension-256);padding:var(--sgds-form-padding-y) var(--sgds-form-padding-x);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;width:-webkit-fill-available;width:-moz-available}.form-control{appearance:none;background-clip:padding-box;background:none;border:none;caret-color:transparent;color:var(--sgds-form-color-default);display:inline;flex-grow:1;font-size:var(--sgds-font-size-2);line-height:var(--sgds-line-height-body);outline:none;padding:0}.select-input-container{display:flex;flex-wrap:wrap;gap:var(--sgds-gap-xs);width:100%}.empty-menu{padding:var(--sgds-padding-sm) var(--sgds-padding-lg,20px)}.form-control-group.readonly{border-color:var(--sgds-border-color-muted)}.form-control-group:not(.disabled):not(.is-invalid):hover{border:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis)}.form-control-group:not(.disabled):not(.is-invalid):focus,.form-control-group:not(.disabled):not(.is-invalid):focus-within{border:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);box-shadow:var(--sgds-form-box-shadow-focus);outline:0}.form-control-group.is-invalid{border:var(--sgds-form-border-width-thick) solid var(--sgds-form-danger-border-color-default)}.form-control-group.disabled{background-color:var(--sgds-form-surface-muted)}`;
|
|
4
|
+
|
|
5
|
+
export { css_248z as default };
|
|
6
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SelectElement } from "../../base/select-element";
|
|
2
|
+
import SgdsIcon from "../Icon/sgds-icon";
|
|
3
|
+
import SelectItem from "./select-item";
|
|
4
|
+
/**
|
|
5
|
+
* @summary Select is used to make one selection from a list through keyboard or mouse actions
|
|
6
|
+
*
|
|
7
|
+
* @event sgds-select - Emitted when an option is selected and the value of select is updated
|
|
8
|
+
*/
|
|
9
|
+
export declare class SgdsSelect extends SelectElement {
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
/** @internal */
|
|
12
|
+
static dependencies: {
|
|
13
|
+
"sgds-icon": typeof SgdsIcon;
|
|
14
|
+
"sgds-select-item": typeof SelectItem;
|
|
15
|
+
};
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
firstUpdated(): Promise<void>;
|
|
18
|
+
_handleValueChange(): Promise<void>;
|
|
19
|
+
protected _handleItemSelected(e: CustomEvent): Promise<void>;
|
|
20
|
+
protected _handleInputBlur(e: Event): Promise<void>;
|
|
21
|
+
/** For form reset */
|
|
22
|
+
protected _mixinResetFormControl(): Promise<void>;
|
|
23
|
+
protected _renderMenu(): import("lit-html").TemplateResult<1> | import("lit-html").TemplateResult<1>[];
|
|
24
|
+
protected _renderInput(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
}
|
|
27
|
+
export default SgdsSelect;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import { ref } from 'lit/directives/ref.js';
|
|
6
|
+
import { SelectElement } from '../../base/select-element.js';
|
|
7
|
+
import { watch } from '../../utils/watch.js';
|
|
8
|
+
import { SgdsIcon } from '../Icon/sgds-icon.js';
|
|
9
|
+
import css_248z from './select.js';
|
|
10
|
+
import { SelectItem } from './select-item.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @summary Select is used to make one selection from a list through keyboard or mouse actions
|
|
14
|
+
*
|
|
15
|
+
* @event sgds-select - Emitted when an option is selected and the value of select is updated
|
|
16
|
+
*/
|
|
17
|
+
class SgdsSelect extends SelectElement {
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
super.connectedCallback();
|
|
20
|
+
this.addEventListener("sgds-hide", async () => {
|
|
21
|
+
const sgdsInput = await this._input;
|
|
22
|
+
sgdsInput.focus();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async firstUpdated() {
|
|
26
|
+
super.firstUpdated();
|
|
27
|
+
if (this.value) {
|
|
28
|
+
const valueArray = this.value.split(";");
|
|
29
|
+
const initialSelectedItem = this.menuList.filter(({ value }) => valueArray.includes(value));
|
|
30
|
+
this.selectedItems = [...initialSelectedItem, ...this.selectedItems];
|
|
31
|
+
this.displayValue = initialSelectedItem[0].label;
|
|
32
|
+
}
|
|
33
|
+
this.input = await this._input;
|
|
34
|
+
this._mixinValidate(this.input);
|
|
35
|
+
if (this.menuIsOpen && !this.readonly) {
|
|
36
|
+
this.showMenu();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async _handleValueChange() {
|
|
40
|
+
if (this.value) {
|
|
41
|
+
this.emit("sgds-select");
|
|
42
|
+
}
|
|
43
|
+
const sgdsInput = await this._input;
|
|
44
|
+
this._mixinSetFormValue();
|
|
45
|
+
this._mixinValidate(sgdsInput);
|
|
46
|
+
if (!this._isTouched && this.value === "")
|
|
47
|
+
return;
|
|
48
|
+
this.invalid = !this._mixinReportValidity();
|
|
49
|
+
}
|
|
50
|
+
async _handleItemSelected(e) {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
const itemEl = e.target;
|
|
53
|
+
const itemLabel = (_b = (_a = itemEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : "";
|
|
54
|
+
const itemValueAttr = (_c = itemEl.getAttribute("value")) !== null && _c !== void 0 ? _c : itemLabel;
|
|
55
|
+
const foundItem = this.filteredMenuList.find(i => i.value.toString() === itemValueAttr) || {
|
|
56
|
+
label: itemLabel,
|
|
57
|
+
value: itemValueAttr
|
|
58
|
+
};
|
|
59
|
+
this.selectedItems = [foundItem];
|
|
60
|
+
this.value = foundItem.value.toString();
|
|
61
|
+
this.displayValue = this.selectedItems[0].label;
|
|
62
|
+
this.hideMenu();
|
|
63
|
+
}
|
|
64
|
+
async _handleInputBlur(e) {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
if (this.selectedItems.length > 0) {
|
|
67
|
+
this.displayValue = this.selectedItems[0].label;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.displayValue = "";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** For form reset */
|
|
74
|
+
async _mixinResetFormControl() {
|
|
75
|
+
this.value = this.defaultValue;
|
|
76
|
+
const initialItem = this.menuList.filter(({ value }) => value === this.value);
|
|
77
|
+
if (initialItem.length <= 0) {
|
|
78
|
+
this.displayValue = "";
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
this.displayValue = initialItem[0].label;
|
|
82
|
+
}
|
|
83
|
+
this._mixinResetValidity(await this._input);
|
|
84
|
+
}
|
|
85
|
+
_renderMenu() {
|
|
86
|
+
const emptyMenu = html ` <div class="empty-menu">No options</div> `;
|
|
87
|
+
const menu = this.menuList.map(item => {
|
|
88
|
+
const isActive = item.value === this.value;
|
|
89
|
+
return html `
|
|
90
|
+
<sgds-select-item ?active=${isActive} value=${item.value} @sgds-select=${this._handleItemSelected}>
|
|
91
|
+
${item.label}
|
|
92
|
+
</sgds-select-item>
|
|
93
|
+
`;
|
|
94
|
+
});
|
|
95
|
+
return this.menuList.length === 0 ? emptyMenu : menu;
|
|
96
|
+
}
|
|
97
|
+
_renderInput() {
|
|
98
|
+
const wantFeedbackStyle = this.hasFeedback;
|
|
99
|
+
return html `
|
|
100
|
+
<div
|
|
101
|
+
${ref(this.myDropdown)}
|
|
102
|
+
class="form-control-group ${classMap({
|
|
103
|
+
disabled: this.disabled,
|
|
104
|
+
readonly: this.readonly,
|
|
105
|
+
"is-invalid": this.invalid && wantFeedbackStyle
|
|
106
|
+
})}"
|
|
107
|
+
@click=${this._handleClick}
|
|
108
|
+
>
|
|
109
|
+
<div class="select-input-container">
|
|
110
|
+
<input
|
|
111
|
+
class="form-control"
|
|
112
|
+
type="text"
|
|
113
|
+
id=${this._controlId}
|
|
114
|
+
name=${ifDefined(this.name)}
|
|
115
|
+
placeholder=${ifDefined(this.placeholder)}
|
|
116
|
+
aria-invalid=${this.invalid ? "true" : "false"}
|
|
117
|
+
?autofocus=${this.autofocus}
|
|
118
|
+
?disabled=${this.disabled}
|
|
119
|
+
?readonly=${this.readonly}
|
|
120
|
+
?required=${this.required}
|
|
121
|
+
.value=${this.displayValue}
|
|
122
|
+
@blur=${this._handleInputBlur}
|
|
123
|
+
aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this._controlId}-invalid` : undefined)}
|
|
124
|
+
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid && this.hasFeedback
|
|
125
|
+
? `${this._controlId}-invalid`
|
|
126
|
+
: ""}"
|
|
127
|
+
@keydown=${(e) => e.preventDefault()}
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
<sgds-icon name="chevron-down" size="md"></sgds-icon>
|
|
131
|
+
</div>
|
|
132
|
+
`;
|
|
133
|
+
}
|
|
134
|
+
render() {
|
|
135
|
+
return html `
|
|
136
|
+
<div class="select">
|
|
137
|
+
${this._renderLabel()}
|
|
138
|
+
<!-- The input -->
|
|
139
|
+
${this._renderInput()} ${this._renderFeedback()}
|
|
140
|
+
<ul id=${this.dropdownMenuId} class="dropdown-menu" part="menu" tabindex="-1">
|
|
141
|
+
${this._renderMenu()}
|
|
142
|
+
</ul>
|
|
143
|
+
</div>
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
SgdsSelect.styles = [...SelectElement.styles, css_248z];
|
|
148
|
+
/** @internal */
|
|
149
|
+
SgdsSelect.dependencies = {
|
|
150
|
+
"sgds-icon": SgdsIcon,
|
|
151
|
+
"sgds-select-item": SelectItem
|
|
152
|
+
};
|
|
153
|
+
__decorate([
|
|
154
|
+
watch("value", { waitUntilFirstUpdate: true })
|
|
155
|
+
], SgdsSelect.prototype, "_handleValueChange", null);
|
|
156
|
+
|
|
157
|
+
export { SgdsSelect, SgdsSelect as default };
|
|
158
|
+
//# sourceMappingURL=sgds-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sgds-select.js","sources":["../../../src/components/Select/sgds-select.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { ref } from \"lit/directives/ref.js\";\nimport { SelectElement } from \"../../base/select-element\";\nimport { watch } from \"../../utils/watch\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport selectStyle from \"./select.css\";\nimport SelectItem from \"./select-item\";\n/**\n * @summary Select is used to make one selection from a list through keyboard or mouse actions\n *\n * @event sgds-select - Emitted when an option is selected and the value of select is updated\n */\nexport class SgdsSelect extends SelectElement {\n static styles = [...SelectElement.styles, selectStyle];\n\n /** @internal */\n static dependencies = {\n \"sgds-icon\": SgdsIcon,\n \"sgds-select-item\": SelectItem\n };\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"sgds-hide\", async () => {\n const sgdsInput = await this._input;\n sgdsInput.focus();\n });\n }\n\n async firstUpdated() {\n super.firstUpdated();\n\n if (this.value) {\n const valueArray = this.value.split(\";\");\n const initialSelectedItem = this.menuList.filter(({ value }) => valueArray.includes(value));\n this.selectedItems = [...initialSelectedItem, ...this.selectedItems];\n this.displayValue = initialSelectedItem[0].label;\n }\n this.input = await this._input;\n this._mixinValidate(this.input);\n if (this.menuIsOpen && !this.readonly) {\n this.showMenu();\n }\n }\n\n @watch(\"value\", { waitUntilFirstUpdate: true })\n async _handleValueChange() {\n if (this.value) {\n this.emit(\"sgds-select\");\n }\n const sgdsInput = await this._input;\n this._mixinSetFormValue();\n\n this._mixinValidate(sgdsInput);\n\n if (!this._isTouched && this.value === \"\") return;\n\n this.invalid = !this._mixinReportValidity();\n }\n\n protected async _handleItemSelected(e: CustomEvent) {\n const itemEl = e.target as SelectItem;\n const itemLabel = itemEl.textContent?.trim() ?? \"\";\n const itemValueAttr = itemEl.getAttribute(\"value\") ?? itemLabel;\n const foundItem = this.filteredMenuList.find(i => i.value.toString() === itemValueAttr) || {\n label: itemLabel,\n value: itemValueAttr\n };\n this.selectedItems = [foundItem];\n this.value = foundItem.value.toString();\n this.displayValue = this.selectedItems[0].label;\n this.hideMenu();\n }\n\n protected async _handleInputBlur(e: Event) {\n e.preventDefault();\n if (this.selectedItems.length > 0) {\n this.displayValue = this.selectedItems[0].label;\n } else {\n this.displayValue = \"\";\n }\n }\n\n /** For form reset */\n protected async _mixinResetFormControl() {\n this.value = this.defaultValue;\n const initialItem = this.menuList.filter(({ value }) => value === this.value);\n if (initialItem.length <= 0) {\n this.displayValue = \"\";\n } else {\n this.displayValue = initialItem[0].label;\n }\n this._mixinResetValidity(await this._input);\n }\n\n protected _renderMenu() {\n const emptyMenu = html` <div class=\"empty-menu\">No options</div> `;\n const menu = this.menuList.map(item => {\n const isActive = item.value === this.value;\n\n return html`\n <sgds-select-item ?active=${isActive} value=${item.value} @sgds-select=${this._handleItemSelected}>\n ${item.label}\n </sgds-select-item>\n `;\n });\n return this.menuList.length === 0 ? emptyMenu : menu;\n }\n protected _renderInput() {\n const wantFeedbackStyle = this.hasFeedback;\n return html`\n <div\n ${ref(this.myDropdown)}\n class=\"form-control-group ${classMap({\n disabled: this.disabled,\n readonly: this.readonly,\n \"is-invalid\": this.invalid && wantFeedbackStyle\n })}\"\n @click=${this._handleClick}\n >\n <div class=\"select-input-container\">\n <input\n class=\"form-control\"\n type=\"text\"\n id=${this._controlId}\n name=${ifDefined(this.name)}\n placeholder=${ifDefined(this.placeholder)}\n aria-invalid=${this.invalid ? \"true\" : \"false\"}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${this.displayValue}\n @blur=${this._handleInputBlur}\n aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this._controlId}-invalid` : undefined)}\n aria-labelledby=\"${this._labelId} ${this._controlId}Help ${this.invalid && this.hasFeedback\n ? `${this._controlId}-invalid`\n : \"\"}\"\n @keydown=${(e: KeyboardEvent) => e.preventDefault()}\n />\n </div>\n <sgds-icon name=\"chevron-down\" size=\"md\"></sgds-icon>\n </div>\n `;\n }\n\n render() {\n return html`\n <div class=\"select\">\n ${this._renderLabel()}\n <!-- The input -->\n ${this._renderInput()} ${this._renderFeedback()}\n <ul id=${this.dropdownMenuId} class=\"dropdown-menu\" part=\"menu\" tabindex=\"-1\">\n ${this._renderMenu()}\n </ul>\n </div>\n `;\n }\n}\n\nexport default SgdsSelect;\n"],"names":["selectStyle"],"mappings":";;;;;;;;;;;AASA;;;;AAIG;AACG,MAAO,UAAW,SAAQ,aAAa,CAAA;IAQ3C,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;AAC1B,QAAA,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,YAAW;AAC5C,YAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC;YACpC,SAAS,CAAC,KAAK,EAAE,CAAC;AACpB,SAAC,CAAC,CAAC;KACJ;AAED,IAAA,MAAM,YAAY,GAAA;QAChB,KAAK,CAAC,YAAY,EAAE,CAAC;AAErB,QAAA,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5F,YAAA,IAAI,CAAC,aAAa,GAAG,CAAC,GAAG,mBAAmB,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;YACrE,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;SAClD;AACD,QAAA,IAAI,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,E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I,IAAI,CAAC,WAAW,GAAG,CAAG,EAAA,IAAI,CAAC,UAAU,CAAA,QAAA,CAAU,GAAG,SAAS,CAAC,CAAA;AACtF,6BAAA,EAAA,IAAI,CAAC,QAAQ,CAAI,CAAA,EAAA,IAAI,CAAC,UAAU,CAAQ,KAAA,EAAA,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW;AACzF,cAAE,CAAA,EAAG,IAAI,CAAC,UAAU,CAAU,QAAA,CAAA;AAC9B,cAAE,EAAE,CAAA;AACK,qBAAA,EAAA,CAAC,CAAgB,KAAK,CAAC,CAAC,cAAc,EAAE,CAAA;;;;;KAK1D,CAAC;KACH;IAED,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA,CAAA;;UAEL,IAAI,CAAC,YAAY,EAAE,CAAA;;AAEnB,QAAA,EAAA,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,eAAe,EAAE,CAAA;AACtC,eAAA,EAAA,IAAI,CAAC,cAAc,CAAA;YACxB,IAAI,CAAC,WAAW,EAAE,CAAA;;;KAGzB,CAAC;KACH;;AA/IM,UAAM,CAAA,MAAA,GAAG,CAAC,GAAG,aAAa,CAAC,MAAM,EAAEA,QAAW,CAAC,CAAC;AAEvD;AACO,UAAA,CAAA,YAAY,GAAG;AACpB,IAAA,WAAW,EAAE,QAAQ;AACrB,IAAA,kBAAkB,EAAE,UAAU;CAC/B,CAAC;AA0BI,UAAA,CAAA;IADL,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAa9C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,IAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Subnav/index.ts"],"sourcesContent":["import { SgdsSubnav } from \"./sgds-subnav\";\nimport { SgdsSubnavItem } from \"./sgds-subnav-item\";\n\ncustomElements.define(\"sgds-subnav\", SgdsSubnav);\ncustomElements.define(\"sgds-subnav-item\", SgdsSubnavItem);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sgds-subnav\": SgdsSubnav;\n \"sgds-subnav-item\": SgdsSubnavItem;\n }\n}\n"],"names":[],"mappings":";;;AAGA,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AACjD,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAAC"}
|