@govtechsg/sgds-web-component 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +571 -41
- package/base/card-element.d.ts +4 -4
- package/base/dropdown-element.d.ts +13 -16
- package/base/link-element.d.ts +2 -0
- package/components/Accordion/index.d.ts +2 -2
- package/components/ActionCard/index.d.ts +1 -1
- package/components/ActionCard/sgds-action-card.d.ts +38 -10
- package/components/Alert/index.d.ts +1 -1
- package/components/Badge/index.d.ts +1 -1
- package/components/Button/index.d.ts +1 -1
- package/components/Card/index.d.ts +1 -0
- package/components/Card/sgds-card.d.ts +24 -0
- package/components/Checkbox/index.d.ts +1 -1
- package/components/Checkbox/sgds-checkbox.d.ts +3 -3
- package/components/Dropdown/index.d.ts +2 -3
- package/components/Dropdown/sgds-dropdown-item.d.ts +6 -2
- package/components/Dropdown/sgds-dropdown.d.ts +19 -0
- package/components/FileUpload/index.d.ts +1 -1
- package/components/FileUpload/sgds-file-upload.d.ts +44 -0
- package/components/Footer/index.d.ts +1 -1
- package/components/Input/index.d.ts +1 -1
- package/components/Input/sgds-input.d.ts +2 -2
- package/components/Mainnav/index.d.ts +3 -3
- package/components/Mainnav/sgds-mainnav-dropdown.d.ts +4 -0
- package/components/Mainnav/sgds-mainnav.d.ts +1 -2
- package/components/Masthead/index.d.ts +1 -1
- package/components/Modal/index.d.ts +1 -1
- package/components/Modal/sgds-modal.d.ts +45 -0
- package/components/QuantityToggle/index.d.ts +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.d.ts +39 -14
- package/components/Radio/index.d.ts +2 -2
- package/components/Radio/sgds-radio-group.d.ts +3 -3
- package/components/Radio/sgds-radio.d.ts +4 -3
- package/components/Sidenav/index.d.ts +3 -3
- package/components/Sidenav/sgds-sidenav-item.d.ts +7 -7
- package/components/Sidenav/sgds-sidenav-link.d.ts +1 -1
- package/components/Sidenav/sgds-sidenav.d.ts +5 -2
- package/components/Spinner/index.d.ts +1 -1
- package/components/Stepper/sgds-stepper.d.ts +31 -7
- package/components/Tab/index.d.ts +3 -3
- package/components/Textarea/index.d.ts +1 -1
- package/components/Textarea/sgds-textarea.d.ts +2 -2
- package/components/Toast/index.d.ts +1 -1
- package/components/Tooltip/index.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +832 -570
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/react/action-card/index.d.ts +3 -1
- package/react/{fileupload → card}/index.d.ts +1 -1
- package/react/cjs/index.js +936 -645
- package/react/cjs/index.js.map +1 -1
- package/react/dropdown/index.d.ts +2 -2
- package/react/file-upload/index.d.ts +5 -0
- package/react/index.d.ts +2 -1
- package/react/index.js +928 -638
- package/react/index.js.map +1 -1
- package/react/mainnav-dropdown/index.d.ts +2 -2
- package/react/modal/index.d.ts +7 -1
- package/react/quantity-toggle/index.d.ts +4 -1
- package/react/stepper/index.d.ts +8 -1
- package/umd/index.js +781 -590
- package/umd/index.js.map +1 -1
- package/components/FileUpload/sgds-fileupload.d.ts +0 -22
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { Dropdown } from "bootstrap";
|
|
2
|
-
import * as Popper from "@popperjs/core";
|
|
3
1
|
import type { StrictModifiers } from "@popperjs/core";
|
|
2
|
+
import * as Popper from "@popperjs/core";
|
|
3
|
+
import { Dropdown } from "bootstrap";
|
|
4
4
|
import { Ref } from "lit/directives/ref.js";
|
|
5
5
|
import { SgdsDropdownItem } from "../components/Dropdown/sgds-dropdown-item";
|
|
6
6
|
import SgdsElement from "./sgds-element";
|
|
7
|
-
export type DropdownButtonVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark";
|
|
8
7
|
export type DropDirection = "left" | "right" | "up" | "down";
|
|
9
8
|
/**
|
|
10
9
|
* @event sgds-show - Emitted event when show instance is called
|
|
11
|
-
* @event sgds-
|
|
10
|
+
* @event sgds-after-show - Emitted event when dropdown has been made visible to the user and CSS transitions have completed
|
|
12
11
|
* @event sgds-hide - Emitted event when hide instance is called
|
|
13
|
-
* @event sgds-
|
|
12
|
+
* @event sgds-after-hide - Emitted event when dropdown has hidden to the user and CSS transitions have completed
|
|
14
13
|
*/
|
|
15
14
|
export declare class DropdownElement extends SgdsElement {
|
|
16
15
|
static styles: import("lit").CSSResultGroup;
|
|
@@ -18,20 +17,18 @@ export declare class DropdownElement extends SgdsElement {
|
|
|
18
17
|
myDropdown: Ref<HTMLElement>;
|
|
19
18
|
/** @internal */
|
|
20
19
|
bsDropdown: Dropdown;
|
|
21
|
-
/** Controls auto-flipping of menu */
|
|
22
|
-
noFlip: boolean;
|
|
23
|
-
/** When true, aligns right edge of menu with right edge of button */
|
|
24
|
-
menuAlignRight: boolean;
|
|
25
|
-
/** The drop position of menu relative to the toggle button */
|
|
26
|
-
drop: DropDirection;
|
|
27
|
-
/**
|
|
20
|
+
/** @internal Controls auto-flipping of menu */
|
|
21
|
+
protected noFlip: boolean;
|
|
22
|
+
/** @internal When true, aligns right edge of menu with right edge of button */
|
|
23
|
+
protected menuAlignRight: boolean;
|
|
24
|
+
/** @internal The drop position of menu relative to the toggle button */
|
|
25
|
+
protected drop: DropDirection;
|
|
26
|
+
/** Additional configuration to pass to Popper.js. See https://popper.js.org/ for config opts */
|
|
28
27
|
popperOpts: {};
|
|
29
|
-
/** Forwards value to id attribute of toggle button of Dropdown. An unique id generated by default */
|
|
30
|
-
togglerId: string;
|
|
28
|
+
/** @internal Forwards value to id attribute of toggle button of Dropdown. An unique id generated by default */
|
|
29
|
+
protected togglerId: string;
|
|
31
30
|
/** Sets the text content of Dropdown button */
|
|
32
31
|
togglerText: string;
|
|
33
|
-
/** Sets color of Dropdown button */
|
|
34
|
-
variant: DropdownButtonVariant;
|
|
35
32
|
/** When true, dropdown menu shows on first load */
|
|
36
33
|
menuIsOpen: boolean;
|
|
37
34
|
/** Controls the close behaviour of dropdown menu. By default menu auto-closes when SgdsDropdownItem or area outside dropdown is clicked */
|
package/base/link-element.d.ts
CHANGED
|
@@ -10,5 +10,7 @@ export default class LinkElement extends SgdsElement {
|
|
|
10
10
|
href: string;
|
|
11
11
|
/** Disables the SgdsMainnavItem */
|
|
12
12
|
disabled: boolean;
|
|
13
|
+
/** Where to display the linked URL, as the name for a browsing context. Forwards to the HTMLAnchor target attribute */
|
|
14
|
+
target: "_blank" | "_parent" | "_self" | "_top";
|
|
13
15
|
render(): import("lit").TemplateResult<1>;
|
|
14
16
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { SgdsAccordion } from "./sgds-accordion";
|
|
2
|
+
export { SgdsAccordionItem } from "./sgds-accordion-item";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsActionCard } from "./sgds-action-card";
|
|
@@ -1,20 +1,48 @@
|
|
|
1
1
|
import { Ref } from "lit/directives/ref.js";
|
|
2
2
|
import { CardElement } from "../../base/card-element";
|
|
3
|
-
|
|
3
|
+
import { SgdsCheckbox } from "../Checkbox";
|
|
4
|
+
import { SgdsRadio } from "../Radio";
|
|
4
5
|
export type TypeVariant = "checkbox" | "radio";
|
|
6
|
+
/**
|
|
7
|
+
* @summary Action Card are cards with built in checkbox or radio components. The ref of input is extended to the Card's body.
|
|
8
|
+
* @slot icon - Icon content in the card-subtitile
|
|
9
|
+
* @slot card-subtitle - The subtitle of the card
|
|
10
|
+
* @slot card-title - The title of the card
|
|
11
|
+
* @slot card-text - The paragrapher text of the card
|
|
12
|
+
*
|
|
13
|
+
* @event sgds-change - Emitted when the checked state of card's checkbox changes or when the selected card's radio has changed
|
|
14
|
+
*
|
|
15
|
+
* @csspart base - The action card base wrapper
|
|
16
|
+
* @csspart body - The action card body
|
|
17
|
+
* @csspart subtitle - The action card subtitle
|
|
18
|
+
* @csspart title - The action card title
|
|
19
|
+
* @csspart text - The action card text
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
5
22
|
export declare class SgdsActionCard extends CardElement {
|
|
6
23
|
static styles: import("lit").CSSResultGroup[];
|
|
7
24
|
/** @internal */
|
|
8
|
-
inputRef: Ref<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
inputRef: Ref<SgdsCheckbox | SgdsRadio>;
|
|
26
|
+
/** Name of the HTML form control. Submitted with the form as part of a name/value pair. */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Value of the HTML form control. Primarily used to differentiate a list of related checkboxes that have the same name. */
|
|
29
|
+
value: string;
|
|
30
|
+
/** Disables the input (so the user can't check / uncheck it). */
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
/** Draws the input in a checked state. */
|
|
33
|
+
checked: boolean;
|
|
34
|
+
/** The type of input of the action card */
|
|
35
|
+
type: TypeVariant;
|
|
36
|
+
/** Controls the active styling of the action card */
|
|
16
37
|
active: boolean;
|
|
17
|
-
|
|
38
|
+
/** Simulates a click on the input control*/
|
|
39
|
+
click(): void;
|
|
40
|
+
/** @internal Declare the click event listener*/
|
|
41
|
+
handleInputChange(): Promise<void>;
|
|
42
|
+
/** @internal The input's id. */
|
|
43
|
+
private inputId;
|
|
44
|
+
handleRadioCheckedChange(): Promise<void>;
|
|
45
|
+
handleDisabledChange(): Promise<void>;
|
|
18
46
|
handleKeyDown(event: KeyboardEvent): void;
|
|
19
47
|
render(): import("lit").TemplateResult;
|
|
20
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsAlert } from "./sgds-alert";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SgdsBadge } from "./sgds-badge";
|
|
1
|
+
export { SgdsBadge, BadgeVariant } from "./sgds-badge";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsButton, ButtonVariant } from "./sgds-button";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SgdsCard } from "./sgds-card";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CardElement } from "../../base/card-element";
|
|
2
|
+
/**
|
|
3
|
+
* @summary Cards can be used for headers and footers, a wide variety of content, contain contextual background colors and images.
|
|
4
|
+
* @slot card-title - The title of the card
|
|
5
|
+
* @slot card-text - The paragrapher text of the card
|
|
6
|
+
* @slot card-image - Accepts an image or svg element of the card. Only a single element is allowed to be passed in.
|
|
7
|
+
* @slot card-link - Accepts an anchor element. Only a single element is allowed to be passed in.
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* @csspart base - The card base wrapper
|
|
11
|
+
* @csspart body - The card body
|
|
12
|
+
* @csspart title - The card title
|
|
13
|
+
* @csspart text - The card text
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare class SgdsCard extends CardElement {
|
|
17
|
+
static styles: import("lit").CSSResultGroup;
|
|
18
|
+
/** Extends the link passed in slot[name="link"] to the entire card */
|
|
19
|
+
stretchedLink: boolean;
|
|
20
|
+
handleLinkSlotChange(e: Event): void;
|
|
21
|
+
handleImgSlotChange(e: Event): void;
|
|
22
|
+
render(): import("lit").TemplateResult<1>;
|
|
23
|
+
}
|
|
24
|
+
export default SgdsCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsCheckbox } from "./sgds-checkbox";
|
|
@@ -5,7 +5,7 @@ import { SgdsFormControl } from "../../utils/form";
|
|
|
5
5
|
*
|
|
6
6
|
* @slot default - The label of checkbox.
|
|
7
7
|
*
|
|
8
|
-
* @event sgds-change - Emitted when the
|
|
8
|
+
* @event sgds-change - Emitted when the checked state changes.
|
|
9
9
|
*/
|
|
10
10
|
export declare class SgdsCheckbox extends SgdsElement implements SgdsFormControl {
|
|
11
11
|
static styles: import("lit").CSSResultGroup[];
|
|
@@ -15,8 +15,6 @@ export declare class SgdsCheckbox extends SgdsElement implements SgdsFormControl
|
|
|
15
15
|
private readonly formSubmitController;
|
|
16
16
|
/** Name of the HTML form control. Submitted with the form as part of a name/value pair. */
|
|
17
17
|
name: string;
|
|
18
|
-
/** For Id/For pair of the HTML form control and label. */
|
|
19
|
-
checkboxId: string;
|
|
20
18
|
/** For aria-label when there is no appropriate text label visible */
|
|
21
19
|
ariaLabel: string;
|
|
22
20
|
/** Value of the HTML form control. Primarily used to differentiate a list of related checkboxes that have the same name. */
|
|
@@ -37,6 +35,8 @@ export declare class SgdsCheckbox extends SgdsElement implements SgdsFormControl
|
|
|
37
35
|
valid: boolean;
|
|
38
36
|
/** @internal */
|
|
39
37
|
invalid: boolean;
|
|
38
|
+
/** @internal For Id/For pair of the HTML form control and label. */
|
|
39
|
+
private inputId;
|
|
40
40
|
/** Simulates a click on the checkbox. */
|
|
41
41
|
click(): void;
|
|
42
42
|
/** Sets focus on the checkbox. */
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export type { DropdownButtonVariant, DropDirection } from "../../base/dropdown-element";
|
|
1
|
+
export { SgdsDropdown, DropDirection, DropdownButtonVariant } from "./sgds-dropdown";
|
|
2
|
+
export { SgdsDropdownItem } from "./sgds-dropdown-item";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import LinkElement from "../../base/link-element";
|
|
2
|
+
/**
|
|
3
|
+
* @summary `SgdsDropdownItem` are navigation links built with `HTMLAnchorElement`. It should be used in the default slot of `SgdsDropdown`
|
|
4
|
+
*/
|
|
2
5
|
export declare class SgdsDropdownItem extends LinkElement {
|
|
3
6
|
static styles: import("lit").CSSResultGroup[];
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
/**@internal */
|
|
8
|
+
private anchor;
|
|
9
|
+
connectedCallback(): void;
|
|
6
10
|
render(): import("lit").TemplateResult<1>;
|
|
7
11
|
}
|
|
8
12
|
export default SgdsDropdownItem;
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
import { DropdownElement } from "../../base/dropdown-element";
|
|
2
2
|
export type DropDirection = "left" | "right" | "up" | "down";
|
|
3
|
+
export type DropdownButtonVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark";
|
|
4
|
+
/**
|
|
5
|
+
* @summary `SgdsDropdown` toggles contextual overlays for displaying lists of links.
|
|
6
|
+
* @slot default - slot for sgds-dropdown-item passed into dropdown's menu
|
|
7
|
+
*
|
|
8
|
+
* @csspart menu - The dropdown's menu (ul element)
|
|
9
|
+
*/
|
|
3
10
|
export declare class SgdsDropdown extends DropdownElement {
|
|
4
11
|
static styles: import("lit").CSSResultGroup[];
|
|
5
12
|
constructor();
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
/** Controls auto-flipping of menu */
|
|
15
|
+
noFlip: boolean;
|
|
16
|
+
/** When true, aligns right edge of menu with right edge of button */
|
|
17
|
+
menuAlignRight: boolean;
|
|
18
|
+
/** The drop position of menu relative to the toggle button */
|
|
19
|
+
drop: DropDirection;
|
|
20
|
+
/** Sets color of Dropdown button */
|
|
21
|
+
variant: DropdownButtonVariant;
|
|
22
|
+
/**@internal */
|
|
23
|
+
private dropdownRef;
|
|
24
|
+
firstUpdated(): Promise<void>;
|
|
6
25
|
render(): import("lit").TemplateResult<1>;
|
|
7
26
|
}
|
|
8
27
|
export default SgdsDropdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SgdsFileUpload } from "./sgds-
|
|
1
|
+
export { SgdsFileUpload, FileUploadButtonVariant } from "./sgds-file-upload";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import SgdsElement from "../../base/sgds-element";
|
|
2
|
+
export type FileUploadButtonVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark" | "link" | "outline-primary" | "outline-secondary" | "outline-success" | "outline-danger" | "outline-warning" | "outline-info" | "outline-light" | "outline-dark";
|
|
3
|
+
/**
|
|
4
|
+
* @summary Allows users to upload files of various sizes and formats
|
|
5
|
+
* @slot default - Label for file upload button
|
|
6
|
+
*
|
|
7
|
+
* @event sgds-files-selected - Emitted when files are selected for uploading
|
|
8
|
+
*
|
|
9
|
+
* @cssproperty --fileupload-file-icon-fill - Left icon fill color
|
|
10
|
+
* @cssproperty --fileupload-remove-icon-fill - Remove icon fill color
|
|
11
|
+
* @cssproperty --fileupload-remove-icon-hover-fill - Remove icon mouse over fill color
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class SgdsFileUpload extends SgdsElement {
|
|
15
|
+
static styles: import("lit").CSSResultGroup[];
|
|
16
|
+
/** The button's variant. */
|
|
17
|
+
variant: FileUploadButtonVariant;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
/** Allows multiple files to be listed for uploading */
|
|
20
|
+
multiple: boolean;
|
|
21
|
+
/** Specify the acceptable file type */
|
|
22
|
+
accept: string;
|
|
23
|
+
/** Specifies a large or small button */
|
|
24
|
+
size: "sm" | "lg";
|
|
25
|
+
/** Customize the check icon with SVG */
|
|
26
|
+
checkedIcon: string;
|
|
27
|
+
/** Customize the cancel icon with SVG */
|
|
28
|
+
cancelIcon: string;
|
|
29
|
+
/** @internal */
|
|
30
|
+
private files;
|
|
31
|
+
/** @internal */
|
|
32
|
+
private selectedFiles;
|
|
33
|
+
setFileList(files: FileList): void;
|
|
34
|
+
/** @internal */
|
|
35
|
+
private inputRef;
|
|
36
|
+
/** @internal */
|
|
37
|
+
private handleClick;
|
|
38
|
+
/** @internal */
|
|
39
|
+
private handleInputChange;
|
|
40
|
+
/** @internal */
|
|
41
|
+
removeFileHandler(index: number): void;
|
|
42
|
+
render(): import("lit").TemplateResult<1>;
|
|
43
|
+
}
|
|
44
|
+
export default SgdsFileUpload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsFooter, ColumnLinks, Links } from "./sgds-footer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsInput } from "./sgds-input";
|
|
@@ -21,8 +21,6 @@ export declare class SgdsInput extends SgdsElement implements SgdsFormControl {
|
|
|
21
21
|
label: string;
|
|
22
22
|
/** The input's hint text below the label */
|
|
23
23
|
hintText: string;
|
|
24
|
-
/**The input's id. This value gets forwarded into the HTMLInputElement of the component. Defaults to a unique value */
|
|
25
|
-
inputId: string;
|
|
26
24
|
/**The input's name attribute */
|
|
27
25
|
name: string;
|
|
28
26
|
/**Forwards classes to the native HTMLInputElement of the component. Can be used to insert any classes from bootstrap such as mt-2 */
|
|
@@ -57,6 +55,8 @@ export declare class SgdsInput extends SgdsElement implements SgdsFormControl {
|
|
|
57
55
|
invalid: boolean;
|
|
58
56
|
/**@internal */
|
|
59
57
|
valid: boolean;
|
|
58
|
+
/**@internal */
|
|
59
|
+
private inputId;
|
|
60
60
|
/** Sets focus on the input. */
|
|
61
61
|
focus(options?: FocusOptions): void;
|
|
62
62
|
/** Sets blur on the input. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { SgdsMainnav, MainnavExpandSize } from "./sgds-mainnav";
|
|
2
|
+
export { SgdsMainnavItem } from "./sgds-mainnav-item";
|
|
3
|
+
export { SgdsMainnavDropdown } from "./sgds-mainnav-dropdown";
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { DropdownElement } from "../../base/dropdown-element";
|
|
2
2
|
export declare class SgdsMainnavDropdown extends DropdownElement {
|
|
3
3
|
static styles: import("lit").CSSResultGroup[];
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
/**@internal */
|
|
6
|
+
dropdownRef: Promise<HTMLAnchorElement>;
|
|
7
|
+
firstUpdated(): Promise<void>;
|
|
4
8
|
render(): import("lit").TemplateResult<1>;
|
|
5
9
|
}
|
|
6
10
|
export default SgdsMainnavDropdown;
|
|
@@ -26,8 +26,7 @@ export declare class SgdsMainnav extends SgdsElement {
|
|
|
26
26
|
private _onClickButton;
|
|
27
27
|
/** The href link for brand logo */
|
|
28
28
|
brandHref: string;
|
|
29
|
-
|
|
30
|
-
collapseId: string;
|
|
29
|
+
private collapseId;
|
|
31
30
|
/** The breakpoint, below which, the Navbar will collapse. When always the Navbar will always be expanded regardless of screen size. When never, the Navbar will always be collapsed */
|
|
32
31
|
expand: MainnavExpandSize;
|
|
33
32
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsMasthead } from "./sgds-masthead";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsModal } from "./sgds-modal";
|
|
@@ -1,16 +1,61 @@
|
|
|
1
1
|
import SgdsElement from "../../base/sgds-element";
|
|
2
|
+
/**
|
|
3
|
+
* @summary The modal component inform users about a specific task and may contain critical information which users then have to make a decision.
|
|
4
|
+
*
|
|
5
|
+
* @slot default - The content of the Modal's body.
|
|
6
|
+
* @slot footer - The content of the Modal's footer, typically used to pass in buttons for call to action.
|
|
7
|
+
*
|
|
8
|
+
* @event sgds-close - Emitted when the modal is called to close via mouseclick of close button, overlay or via keyboard esc key
|
|
9
|
+
* @event sgds-show - Emitted when the modal opens
|
|
10
|
+
* @event sgds-hide - Emitted when the modal closes
|
|
11
|
+
* @event sgds-after-show - Emitted after modal opens and the animations has completed
|
|
12
|
+
* @event sgds-after-hide - Emitted after modal closes and the animations has completed
|
|
13
|
+
*
|
|
14
|
+
* @csspart base - The component's base wrapper
|
|
15
|
+
* @csspart overlay - The overlay that covers the screen behind the dialog
|
|
16
|
+
* @csspart panel - The modal's dialog panel
|
|
17
|
+
* @csspart header - The modal's header (h3 element) that wraps the title, titleIcon and close button
|
|
18
|
+
* @csspart title - The div element wrapping title and titleIcon
|
|
19
|
+
* @csspart body - The modal's body where the content lies
|
|
20
|
+
* @csspart footers - The modal's footer
|
|
21
|
+
*
|
|
22
|
+
* @cssproperty --modal-padding - The general modal padding of modal component. Applied to body, footer and header.
|
|
23
|
+
* @cssproperty --modal-panel-z-index - The z-index of modal panel
|
|
24
|
+
* @cssproperty --modal-panel-width - The width of modal panel.
|
|
25
|
+
* @cssproperty --modal-panel-height - The height of modal panel.
|
|
26
|
+
* @cssproperty --modal-panel-background-color - The background color of modal panel
|
|
27
|
+
* @cssproperty --modal-panel-border-radius - The border radius of modal panel
|
|
28
|
+
* @cssproperty --modal-header-bottom-border-line-width - The line width of header's bottom border
|
|
29
|
+
* @cssproperty --modal-overlay-background-color - The overlay's background color
|
|
30
|
+
*/
|
|
2
31
|
export declare class SgdsModal extends SgdsElement {
|
|
3
32
|
static styles: import("lit").CSSResultGroup[];
|
|
33
|
+
/**@internal */
|
|
4
34
|
dialog: HTMLElement;
|
|
35
|
+
/**@internal */
|
|
5
36
|
panel: HTMLElement;
|
|
37
|
+
/**@internal */
|
|
6
38
|
overlay: HTMLElement;
|
|
39
|
+
/**@internal */
|
|
7
40
|
private readonly hasSlotController;
|
|
41
|
+
/**@internal */
|
|
8
42
|
private modal;
|
|
43
|
+
/**@internal */
|
|
9
44
|
private originalTrigger;
|
|
45
|
+
/**Indicates whether or not the modal is open. You can use this in lieu of the show/hide methods. */
|
|
10
46
|
open: boolean;
|
|
47
|
+
/**The modal's title as displayed in the header */
|
|
11
48
|
title: string;
|
|
49
|
+
/**The modal's icon as displayed in the header. Pass in SVG format icons as string directly */
|
|
12
50
|
titleIcon: string;
|
|
51
|
+
/** Disables the header. This will also remove the default close button */
|
|
13
52
|
noHeader: boolean;
|
|
53
|
+
/** Centers the modal vertically in page */
|
|
54
|
+
centered: boolean;
|
|
55
|
+
/** Centers the contents inside the modal */
|
|
56
|
+
centeredAlignVariant: boolean;
|
|
57
|
+
/** Removes the default animation when opening and closing of modal */
|
|
58
|
+
noAnimation: boolean;
|
|
14
59
|
connectedCallback(): void;
|
|
15
60
|
firstUpdated(): void;
|
|
16
61
|
disconnectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { SgdsQuantityToggle } from "./sgds-quantity-toggle";
|
|
@@ -1,28 +1,53 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ButtonVariant } from "../Button";
|
|
2
2
|
import SgdsElement from "../../base/sgds-element";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { SgdsFormControl } from "../../utils/form";
|
|
4
|
+
/**
|
|
5
|
+
* @summary The quantity toggle component is used to increase or decrease an incremental venue, best used when the user needs to enter or adjust the quantity of a selected item.
|
|
6
|
+
*
|
|
7
|
+
* @csspart base - The base wrapper of the quantity toggle component.
|
|
8
|
+
* @csspart button - The plus and minus button of quantity toggle
|
|
9
|
+
*
|
|
10
|
+
* @event sgds-change - Emitted when an alteration to the control's value is committed by the user.
|
|
11
|
+
* @event sgds-input - Emitted when the control receives input and its value changes.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class SgdsQuantityToggle extends SgdsElement implements SgdsFormControl {
|
|
15
|
+
/**@internal */
|
|
16
|
+
private input;
|
|
17
|
+
/**@internal */
|
|
18
|
+
private plusBtn;
|
|
19
|
+
/**@internal */
|
|
20
|
+
private minusBtn;
|
|
7
21
|
static styles: import("lit").CSSResultGroup[];
|
|
8
|
-
|
|
22
|
+
/**@internal */
|
|
23
|
+
private readonly formSubmitController;
|
|
24
|
+
/** The name of the input */
|
|
9
25
|
name: string;
|
|
10
26
|
/** The input's minimum value. */
|
|
11
|
-
min: number
|
|
27
|
+
min: number;
|
|
12
28
|
/** The input's maximum value. */
|
|
13
|
-
max: number
|
|
14
|
-
size
|
|
15
|
-
|
|
29
|
+
max: number;
|
|
30
|
+
/**Controls the size of the quantity toggle */
|
|
31
|
+
size: "sm" | "lg";
|
|
32
|
+
/**The input's value. Set to 0 by default */
|
|
33
|
+
value: number;
|
|
34
|
+
/** Disables the entire quantity toggle */
|
|
16
35
|
disabled: boolean;
|
|
17
|
-
|
|
36
|
+
/** The quantity toggle's button variants */
|
|
37
|
+
buttonVariant: ButtonVariant;
|
|
18
38
|
/**
|
|
19
|
-
*
|
|
20
|
-
* implied, allowing any numeric value.
|
|
39
|
+
* Controls the incremental / decremental value of the input
|
|
21
40
|
*/
|
|
22
41
|
step: number;
|
|
23
42
|
/** Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
|
|
24
|
-
defaultValue:
|
|
43
|
+
defaultValue: number;
|
|
44
|
+
/** @internal The id forwarded to input element */
|
|
45
|
+
private inputId;
|
|
25
46
|
handleChange(event: string): void;
|
|
47
|
+
/** Simulates a click on the plus button */
|
|
48
|
+
plus(): void;
|
|
49
|
+
/** Simulates a click on the minus button */
|
|
50
|
+
minus(): void;
|
|
26
51
|
onPlus(event: MouseEvent): void;
|
|
27
52
|
onMinus(event: MouseEvent): void;
|
|
28
53
|
render(): import("lit").TemplateResult;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { SgdsRadio } from "./sgds-radio";
|
|
2
|
+
export { SgdsRadioGroup } from "./sgds-radio-group";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import SgdsElement from "../../base/sgds-element";
|
|
2
2
|
import { FormSubmitController } from "../../utils/form";
|
|
3
|
-
import { SgdsFormControl } from "../../utils/form";
|
|
4
3
|
/**
|
|
5
4
|
* @summary RadioGroup group multiple radios so they function as a single form control.
|
|
6
5
|
*
|
|
@@ -8,7 +7,7 @@ import { SgdsFormControl } from "../../utils/form";
|
|
|
8
7
|
*
|
|
9
8
|
* @event sgds-change - Emitted when the radio group's selected value changes.
|
|
10
9
|
*/
|
|
11
|
-
export declare class SgdsRadioGroup extends SgdsElement
|
|
10
|
+
export declare class SgdsRadioGroup extends SgdsElement {
|
|
12
11
|
static styles: import("lit").CSSResultGroup[];
|
|
13
12
|
/**@internal */
|
|
14
13
|
protected readonly formSubmitController: FormSubmitController;
|
|
@@ -38,7 +37,8 @@ export declare class SgdsRadioGroup extends SgdsElement implements SgdsFormContr
|
|
|
38
37
|
get validity(): ValidityState;
|
|
39
38
|
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
40
39
|
reportValidity(): boolean;
|
|
41
|
-
|
|
40
|
+
/**@internal */
|
|
41
|
+
private _radios;
|
|
42
42
|
handleRadioClick(event: MouseEvent): void;
|
|
43
43
|
handleKeyDown(event: KeyboardEvent): void;
|
|
44
44
|
handleLabelClick(): void;
|
|
@@ -9,18 +9,19 @@ import SgdsElement from "../../base/sgds-element";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class SgdsRadio extends SgdsElement {
|
|
11
11
|
static styles: import("lit").CSSResultGroup[];
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Draws the radio in a checked state
|
|
14
|
+
*/
|
|
13
15
|
checked: boolean;
|
|
14
16
|
/** The radio's value attribute. */
|
|
15
17
|
value: string;
|
|
16
|
-
/** For id/for pair of the HTML form control and label. */
|
|
17
|
-
radioId: string;
|
|
18
18
|
/** Disables the radio. */
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
/** Aligns the radios horizontally */
|
|
21
21
|
isInline: boolean;
|
|
22
22
|
/** For aria-label */
|
|
23
23
|
ariaLabel: string;
|
|
24
|
+
private radioId;
|
|
24
25
|
connectedCallback(): void;
|
|
25
26
|
handleCheckedChange(): void;
|
|
26
27
|
handleDisabledChange(): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { SgdsSidenav } from "./sgds-sidenav";
|
|
2
|
+
export { SgdsSidenavItem } from "./sgds-sidenav-item";
|
|
3
|
+
export { SgdsSidenavLink } from "./sgds-sidenav-link";
|
|
@@ -23,21 +23,21 @@ export declare class SgdsSidenavItem extends SgdsElement {
|
|
|
23
23
|
*/
|
|
24
24
|
active: boolean;
|
|
25
25
|
/**
|
|
26
|
-
* When defined, converts SgdsSidenavItem from a button element to an Anchor element
|
|
26
|
+
* When defined, converts SgdsSidenavItem from a button element to an Anchor element. In this case, only one level of navigation is allowed
|
|
27
27
|
*/
|
|
28
28
|
href: string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Disables the SgdsSidenavItem
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
disabled: boolean;
|
|
33
33
|
/**
|
|
34
|
-
* Forwards to id attribute of
|
|
34
|
+
* @internal Forwards to id attribute of div.collapse and aria-controls attribute of button in SgdsSidenavItem. By default, SgdsSidenavItem auto-generates a unique id. Override the default id by specifiying your own
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
private collapseId;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* @internal Forwards to id attribute of button and aria-labelledby attribute of ul.sidenav-list in SgdsSidenavItem. By default, SgdsSidenavItem auto-generates a unique id. Override the default id by specifiying your own
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
private buttonId;
|
|
41
41
|
/** @internal */
|
|
42
42
|
private index;
|
|
43
43
|
private _onClick;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import LinkElement from "../../base/link-element";
|
|
2
2
|
/**
|
|
3
|
-
* @slot -
|
|
3
|
+
* @slot default - slot for label of anchor tag.
|
|
4
4
|
*
|
|
5
5
|
* @cssproperty --sidenav-link-font-size - sidenav link font size, default to `--sgds-body-font-size`
|
|
6
6
|
* @cssproperty --sidenav-link-padding-x - sidenav link padding left and right
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import SgdsElement from "../../base/sgds-element";
|
|
2
2
|
/**
|
|
3
|
-
* @summary The side navigation is used to display a list of links to move between pages within a related category.
|
|
4
|
-
*
|
|
3
|
+
* @summary The side navigation is used to display a list of links to move between pages within a related category.
|
|
4
|
+
* It is used as a secondary form of navigation where the primary navigation is located hierachically above the page frame.
|
|
5
|
+
* Maximum two levels of navigations are allowed.
|
|
6
|
+
*
|
|
7
|
+
* @slot default - Default slot for SgdsSidenavItem element.
|
|
5
8
|
*
|
|
6
9
|
* @cssproperty --sidenav-theme-color - overall sidenav theme color
|
|
7
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SgdsSpinner } from "./sgds-spinner";
|
|
1
|
+
export { SgdsSpinner, Type } from "./sgds-spinner";
|