@govtechsg/sgds-web-component 3.3.2 → 3.3.3-rc.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/Masthead/index.js +2 -2
- package/base/card.js +1 -1
- package/base/sgds-element2.js +1 -1
- package/components/Accordion/index.umd.js +1 -1
- package/components/Alert/index.umd.js +2 -2
- package/components/Badge/index.umd.js +1 -1
- package/components/Breadcrumb/index.umd.js +36 -11
- package/components/Breadcrumb/index.umd.js.map +1 -1
- package/components/Button/button.js +1 -1
- package/components/Button/index.umd.js +61 -54
- package/components/Button/index.umd.js.map +1 -1
- package/components/Button/sgds-button.d.ts +1 -6
- package/components/Button/sgds-button.js +11 -27
- package/components/Button/sgds-button.js.map +1 -1
- package/components/Card/index.umd.js +3330 -3251
- package/components/Card/index.umd.js.map +1 -1
- package/components/Card/sgds-card.d.ts +1 -0
- package/components/Card/sgds-card.js +9 -3
- package/components/Card/sgds-card.js.map +1 -1
- package/components/Checkbox/index.umd.js +1 -1
- package/components/ComboBox/index.umd.js +2 -2
- package/components/Datepicker/index.umd.js +62 -29
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/DescriptionList/index.umd.js +1 -1
- package/components/Divider/index.umd.js +1 -1
- package/components/Drawer/index.umd.js +1 -1
- package/components/Dropdown/index.umd.js +2 -2
- package/components/FileUpload/index.umd.js +62 -29
- package/components/FileUpload/index.umd.js.map +1 -1
- package/components/Footer/footer-item.js +1 -1
- package/components/Footer/index.umd.js +89 -45
- package/components/Footer/index.umd.js.map +1 -1
- package/components/Footer/sgds-footer.d.ts +1 -1
- package/components/Footer/sgds-footer.js +39 -44
- package/components/Footer/sgds-footer.js.map +1 -1
- package/components/Icon/icon.js +1 -1
- package/components/Icon/index.umd.js +2 -2
- package/components/IconButton/index.umd.js +2 -2
- package/components/IconCard/index.umd.js +93 -14
- package/components/IconCard/index.umd.js.map +1 -1
- package/components/IconCard/sgds-icon-card.d.ts +1 -0
- package/components/IconCard/sgds-icon-card.js +8 -3
- package/components/IconCard/sgds-icon-card.js.map +1 -1
- package/components/IconList/index.umd.js +1 -1
- package/components/ImageCard/index.umd.js +93 -14
- package/components/ImageCard/index.umd.js.map +1 -1
- package/components/ImageCard/sgds-image-card.d.ts +1 -0
- package/components/ImageCard/sgds-image-card.js +8 -3
- package/components/ImageCard/sgds-image-card.js.map +1 -1
- package/components/Input/index.umd.js +2 -2
- package/components/Link/index.umd.js +35 -10
- package/components/Link/index.umd.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Link/sgds-link.d.ts +3 -0
- package/components/Link/sgds-link.js +33 -8
- package/components/Link/sgds-link.js.map +1 -1
- package/components/Mainnav/index.umd.js +2 -2
- package/components/Masthead/index.umd.js +2 -2
- package/components/Masthead/masthead.js +1 -1
- package/components/Modal/index.umd.js +1 -1
- package/components/OverflowMenu/index.umd.js +2 -2
- package/components/Pagination/index.umd.js +62 -29
- package/components/Pagination/index.umd.js.map +1 -1
- package/components/ProgressBar/index.umd.js +1 -1
- package/components/QuantityToggle/index.umd.js +2 -2
- package/components/Radio/index.umd.js +1 -1
- package/components/Select/index.umd.js +2 -2
- package/components/Sidenav/index.umd.js +2 -2
- package/components/Skeleton/index.umd.js +1 -1
- package/components/Spinner/index.umd.js +1 -1
- package/components/Stepper/index.umd.js +2 -2
- package/components/Subnav/index.umd.js +3 -3
- package/components/Subnav/subnav-item.js +1 -1
- package/components/Switch/index.umd.js +1 -1
- package/components/Tab/index.umd.js +1 -1
- package/components/Table/index.umd.js +1 -1
- package/components/TableOfContents/index.umd.js +1 -1
- package/components/Textarea/index.umd.js +1 -1
- package/components/ThumbnailCard/index.umd.js +93 -14
- package/components/ThumbnailCard/index.umd.js.map +1 -1
- package/components/ThumbnailCard/sgds-thumbnail-card.d.ts +1 -0
- package/components/ThumbnailCard/sgds-thumbnail-card.js +8 -3
- package/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
- package/components/Toast/index.umd.js +1 -1
- package/components/Tooltip/index.umd.js +1 -1
- package/components/index.umd.js +113 -95
- package/components/index.umd.js.map +1 -1
- package/index.umd.js +115 -97
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/react/base/card.cjs.js +1 -1
- package/react/base/card.js +1 -1
- package/react/base/sgds-element.cjs2.js +1 -1
- package/react/base/sgds-element2.js +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 +10 -26
- package/react/components/Button/sgds-button.cjs.js.map +1 -1
- package/react/components/Button/sgds-button.js +11 -27
- package/react/components/Button/sgds-button.js.map +1 -1
- package/react/components/Card/sgds-card.cjs.js +9 -3
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js +9 -3
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/Footer/footer-item.cjs.js +1 -1
- package/react/components/Footer/footer-item.js +1 -1
- package/react/components/Footer/sgds-footer.cjs.js +38 -43
- package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer.js +39 -44
- package/react/components/Footer/sgds-footer.js.map +1 -1
- package/react/components/Icon/icon.cjs.js +1 -1
- package/react/components/Icon/icon.js +1 -1
- package/react/components/IconCard/sgds-icon-card.cjs.js +8 -3
- package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.js +8 -3
- package/react/components/IconCard/sgds-icon-card.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.cjs.js +8 -3
- package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.js +8 -3
- package/react/components/ImageCard/sgds-image-card.js.map +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +1 -1
- package/react/components/Link/sgds-link.cjs.js +33 -8
- package/react/components/Link/sgds-link.cjs.js.map +1 -1
- package/react/components/Link/sgds-link.js +33 -8
- package/react/components/Link/sgds-link.js.map +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/components/Subnav/subnav-item.cjs.js +1 -1
- package/react/components/Subnav/subnav-item.js +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js +8 -3
- package/react/components/ThumbnailCard/sgds-thumbnail-card.cjs.js.map +1 -1
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js +8 -3
- package/react/components/ThumbnailCard/sgds-thumbnail-card.js.map +1 -1
package/index.umd.js
CHANGED
|
@@ -4382,7 +4382,7 @@
|
|
|
4382
4382
|
});
|
|
4383
4383
|
}
|
|
4384
4384
|
|
|
4385
|
-
var css_248z$1k = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}
|
|
4385
|
+
var css_248z$1k = css`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-body);margin:0;*,:after,:before{box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;
|
|
4386
4386
|
|
|
4387
4387
|
/**
|
|
4388
4388
|
* @cssprop --sgds-{stateColor} - State colors in hexadecimal value
|
|
@@ -7615,7 +7615,7 @@
|
|
|
7615
7615
|
"zoom-out": ZoomOut
|
|
7616
7616
|
};
|
|
7617
7617
|
|
|
7618
|
-
var css_248z$1g = css`:host{color:inherit;display:inline-flex}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;
|
|
7618
|
+
var css_248z$1g = css`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;
|
|
7619
7619
|
|
|
7620
7620
|
/**
|
|
7621
7621
|
* @summary Icons offer a form of visual shorthand that we are all familiar with. They can label, inform and aid navigation quickly and effectively in minimal space. Icons must first and foremost communicate meaning. By default, the icon component renders icons from `SgdsIcon` library set
|
|
@@ -13230,7 +13230,7 @@
|
|
|
13230
13230
|
query("slot")
|
|
13231
13231
|
], SgdsBreadcrumb.prototype, "defaultSlot", void 0);
|
|
13232
13232
|
|
|
13233
|
-
var css_248z$15 = css
|
|
13233
|
+
var css_248z$15 = css`:host{display:inline-flex}.nav-link::slotted(a){color:var(--sgds-link-color-default);cursor:pointer;line-height:var(--sgds-line-height-body);text-decoration:none!important}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible),.nav-link::slotted(a:hover),.nav-link::slotted(a[active]){color:var( --sgds-link-color-emphasis)}.nav-link::slotted(a:focus),.nav-link::slotted(a:focus-visible){outline:0}.nav-link::slotted(a:focus-visible:not([disabled])){box-shadow:var(--sgds-box-shadow-focus)}.nav-link::slotted(a[disabled]){cursor:not-allowed;opacity:var(--sgds-opacity-50)}:host([variant=danger]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-danger-color-default);color:var(--sgds-link-color-default,--sgds-danger-color-default)}:host([variant=danger]) .nav-link::slotted(a:focus),:host([variant=danger]) .nav-link::slotted(a:focus-visible),:host([variant=danger]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-danger-color-emphasis);color:var(--sgds-link-color-emphasis,--sgds-danger-color-emphasis)}:host([variant=neutral]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-default);color:var(--sgds-link-color-default,--sgds-color-default)}:host([variant=neutral]) .nav-link::slotted(a:focus),:host([variant=neutral]) .nav-link::slotted(a:focus-visible),:host([variant=neutral]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,--sgds-color-default)}:host([variant=light]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-color-fixed-light)}:host([variant=light]) .nav-link::slotted(a:focus),:host([variant=light]) .nav-link::slotted(a:focus-visible),:host([variant=light]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-light)}:host([variant=dark]) .nav-link::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-default,--sgds-color-fixed-dark)}:host([variant=dark]) .nav-link::slotted(a:focus),:host([variant=dark]) .nav-link::slotted(a:focus-visible),:host([variant=dark]) .nav-link::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-dark);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-dark)}:host([size=lg]) .nav-link::slotted(a){font-size:var(--sgds-font-size-3)!important}:host([size=sm]) .nav-link::slotted(a){font-size:var(--sgds-font-size-1)!important;line-height:var(--sgds-line-height-min)}:host([size=xs]) .nav-link::slotted(a){font-size:var(--sgds-font-size-0)!important;line-height:var(--sgds-line-height-16)}`;
|
|
13234
13234
|
|
|
13235
13235
|
/**
|
|
13236
13236
|
* @summary Link allows users to click and navigate their way from page to page
|
|
@@ -13245,16 +13245,41 @@
|
|
|
13245
13245
|
/** when true, sets the active stylings of the link */
|
|
13246
13246
|
this.variant = "primary";
|
|
13247
13247
|
}
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13248
|
+
_processAnchor(anchor) {
|
|
13249
|
+
if (anchor.hasAttribute("disabled")) {
|
|
13250
|
+
anchor.setAttribute("href", "javascript:void(0)");
|
|
13251
|
+
anchor.setAttribute("tabindex", "-1");
|
|
13252
|
+
}
|
|
13253
|
+
else {
|
|
13254
|
+
anchor.setAttribute("tabindex", "0");
|
|
13255
|
+
}
|
|
13256
|
+
}
|
|
13257
|
+
_processIcon(anchor) {
|
|
13258
|
+
const icons = anchor.querySelectorAll("sgds-icon");
|
|
13259
|
+
icons.forEach(icon => {
|
|
13260
|
+
icon.classList.remove("icon-left", "icon-right");
|
|
13261
|
+
if (!icon.previousElementSibling && !icon.previousSibling) {
|
|
13262
|
+
icon.classList.add("icon-left");
|
|
13254
13263
|
}
|
|
13255
|
-
|
|
13256
|
-
|
|
13264
|
+
if (!icon.nextElementSibling && !icon.nextSibling) {
|
|
13265
|
+
icon.classList.add("icon-right");
|
|
13257
13266
|
}
|
|
13267
|
+
});
|
|
13268
|
+
}
|
|
13269
|
+
_handleSlotChange(e) {
|
|
13270
|
+
const anchor = e.target
|
|
13271
|
+
.assignedElements()
|
|
13272
|
+
.find(el => el.tagName.toLowerCase() === "a");
|
|
13273
|
+
if (anchor) {
|
|
13274
|
+
this._processAnchor(anchor);
|
|
13275
|
+
this._processIcon(anchor);
|
|
13276
|
+
}
|
|
13277
|
+
}
|
|
13278
|
+
firstUpdated() {
|
|
13279
|
+
const anchor = this.querySelector("a");
|
|
13280
|
+
if (anchor) {
|
|
13281
|
+
this._processAnchor(anchor);
|
|
13282
|
+
this._processIcon(anchor);
|
|
13258
13283
|
}
|
|
13259
13284
|
}
|
|
13260
13285
|
render() {
|
|
@@ -13435,7 +13460,7 @@
|
|
|
13435
13460
|
}
|
|
13436
13461
|
}
|
|
13437
13462
|
|
|
13438
|
-
var css_248z$12 = css`:host{display:inline-block}:host([fullWidth]),:host([fullWidth]) .btn{width:100%}:host([fullWidth]) .btn.has-left-icon{justify-content:flex-start}:host([fullWidth]) .btn.has-right-icon{justify-content:space-between}:host([fullWidth]) .btn.has-left-icon.has-right-icon{justify-content:center}.btn span{padding:0 var(--sgds-padding-2-xs)}`;
|
|
13463
|
+
var css_248z$12 = css`:host{display:inline-block}:host([fullWidth]),:host([fullWidth]) .btn{width:100%}:host([fullWidth]) .btn.has-left-icon{justify-content:flex-start}:host([fullWidth]) .btn.has-right-icon{justify-content:space-between}:host([fullWidth]) .btn.has-left-icon.has-right-icon{justify-content:center}.btn span{padding:0 var(--sgds-padding-2-xs)}.btn.no-icon{gap:var(--sgds-gap-none)}`;
|
|
13439
13464
|
|
|
13440
13465
|
/**
|
|
13441
13466
|
* @summary Custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
|
|
@@ -13453,10 +13478,6 @@
|
|
|
13453
13478
|
constructor() {
|
|
13454
13479
|
super(...arguments);
|
|
13455
13480
|
/** @internal */
|
|
13456
|
-
this._hasLeftIcon = false;
|
|
13457
|
-
/** @internal */
|
|
13458
|
-
this._hasRightIcon = false;
|
|
13459
|
-
/** @internal */
|
|
13460
13481
|
this.formSubmitController = new FormSubmitController(this, {
|
|
13461
13482
|
form: (input) => {
|
|
13462
13483
|
// Buttons support a form attribute that points to an arbitrary form, so if this attribute it set we need to query
|
|
@@ -13474,6 +13495,7 @@
|
|
|
13474
13495
|
this.type = "button";
|
|
13475
13496
|
/** When set, the button will be in full width. */
|
|
13476
13497
|
this.fullWidth = false;
|
|
13498
|
+
this.hasSlotController = new HasSlotController(this, "leftIcon", "rightIcon");
|
|
13477
13499
|
this._clickHandler = () => {
|
|
13478
13500
|
if (this.type === "submit") {
|
|
13479
13501
|
this.formSubmitController.submit(this);
|
|
@@ -13492,28 +13514,20 @@
|
|
|
13492
13514
|
this.removeEventListener("click", this._clickHandler);
|
|
13493
13515
|
this.addEventListener("click", this._clickHandler);
|
|
13494
13516
|
}
|
|
13495
|
-
_handleLeftIconSlotchange(e) {
|
|
13496
|
-
const childNodes = e.target.assignedNodes({ flatten: true });
|
|
13497
|
-
if (childNodes.length > 0) {
|
|
13498
|
-
return (this._hasLeftIcon = true);
|
|
13499
|
-
}
|
|
13500
|
-
}
|
|
13501
|
-
_handleRightIconSlotchange(e) {
|
|
13502
|
-
const childNodes = e.target.assignedNodes({ flatten: true });
|
|
13503
|
-
if (childNodes.length > 0) {
|
|
13504
|
-
return (this._hasRightIcon = true);
|
|
13505
|
-
}
|
|
13506
|
-
}
|
|
13507
13517
|
render() {
|
|
13508
13518
|
const isLink = this.href;
|
|
13509
13519
|
const tag = isLink ? literal `a` : literal `button`;
|
|
13520
|
+
const hasLeftIconSlot = this.hasSlotController.test("leftIcon");
|
|
13521
|
+
const hasRightIconSlot = this.hasSlotController.test("rightIcon");
|
|
13522
|
+
const noIconSlot = !hasLeftIconSlot && !hasRightIconSlot;
|
|
13510
13523
|
return html `
|
|
13511
13524
|
<${tag}
|
|
13512
13525
|
class="btn ${classMap({
|
|
13513
13526
|
disabled: this.disabled,
|
|
13514
13527
|
active: this.active,
|
|
13515
|
-
"has-left-icon":
|
|
13516
|
-
"has-right-icon":
|
|
13528
|
+
"has-left-icon": hasLeftIconSlot,
|
|
13529
|
+
"has-right-icon": hasRightIconSlot,
|
|
13530
|
+
"no-icon": noIconSlot
|
|
13517
13531
|
})}"
|
|
13518
13532
|
?disabled=${ifDefined(isLink ? undefined : this.disabled)}
|
|
13519
13533
|
type=${ifDefined(isLink ? undefined : this.type)}
|
|
@@ -13529,20 +13543,14 @@
|
|
|
13529
13543
|
@blur=${this._handleBlur}
|
|
13530
13544
|
aria-label=${ifDefined(this.ariaLabel)}
|
|
13531
13545
|
>
|
|
13532
|
-
<slot name="leftIcon"
|
|
13546
|
+
<slot name="leftIcon"></slot>
|
|
13533
13547
|
<span><slot></slot></span>
|
|
13534
|
-
<slot name="rightIcon"
|
|
13548
|
+
<slot name="rightIcon"></slot>
|
|
13535
13549
|
</${tag}>
|
|
13536
13550
|
`;
|
|
13537
13551
|
}
|
|
13538
13552
|
}
|
|
13539
13553
|
SgdsButton.styles = [...ButtonElement.styles, css_248z$1d, css_248z$12];
|
|
13540
|
-
__decorate([
|
|
13541
|
-
state()
|
|
13542
|
-
], SgdsButton.prototype, "_hasLeftIcon", void 0);
|
|
13543
|
-
__decorate([
|
|
13544
|
-
state()
|
|
13545
|
-
], SgdsButton.prototype, "_hasRightIcon", void 0);
|
|
13546
13554
|
__decorate([
|
|
13547
13555
|
property({ type: String, reflect: true })
|
|
13548
13556
|
], SgdsButton.prototype, "type", void 0);
|
|
@@ -13567,7 +13575,7 @@
|
|
|
13567
13575
|
|
|
13568
13576
|
register("sgds-button", SgdsButton);
|
|
13569
13577
|
|
|
13570
|
-
var css_248z$11 = css`:host([disabled]){cursor:not-allowed}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}a.card:focus{outline:0}a.card:not(.disabled):focus-visible{box-shadow:var(--sgds-box-shadow-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-thumbnail{align-items:center;border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-full);display:flex;height:var(--sgds-dimension-80);justify-content:center;width:var(--sgds-dimension-80)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-xl);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-title{--sgds-font-size-5:var(--sgds-font-size-4);--sgds-font-size-6:var(--sgds-font-size-4);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold)}.card-subtitle,.card-text,.card-title{margin-bottom:var(--sgds-margin-none)}slot[name=subtitle]::slotted(*){--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-margin-xs:var(--sgds-margin-none);--sgds-font-size-4:var(--sgds-font-size-1);--sgds-font-size-5:var(--sgds-font-size-1);--sgds-font-size-6:var(--sgds-font-size-1);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);--sgds-line-height-heading:var(--sgds-line-height-min);--sgds-letter-spacing-tight:var(--sgds-letter-spacing-wide);color:var(--sgds-color-default);font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-wide);line-height:var(--sgds-line-height-min);margin:var(--sgds-margin-none);text-transform:uppercase}slot[name=title]::slotted(a){--sgds-font-size-2:var(--sgds-font-size-4);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle)}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=link]::slotted(*){font-weight:700;margin-top:auto;padding-top:var(--sgds-padding-sm)}slot[name=link]::slotted(a){color:var(--sgds-link-color-default);
|
|
13578
|
+
var css_248z$11 = css`:host([disabled]){cursor:not-allowed}:host([orientation=horizontal]) .card{flex-direction:row}:host(:not([hideBorder])) .card{border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted)}:host([orientation=horizontal]) .card-body{flex:1}:host([orientation=horizontal]) .card-media{padding:var(--sgds-padding-xl) var(--sgds-padding-none) var(--sgds-padding-xl) var(--sgds-padding-xl)}:host([orientation=horizontal]) .card-image{width:40%}:host([imagePosition=after]) .card-image{order:1}:host([orientation=vertical][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-left-radius:var(--sgds-border-radius-none);border-top-right-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal][imagePosition=after]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-bottom-left-radius:var(--sgds-border-radius-none);border-top-left-radius:var(--sgds-border-radius-none)}:host([orientation=horizontal]) slot[name=image]::slotted(img){border-bottom-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:var(--sgds-border-radius-none);height:100%;object-fit:cover}:host([orientation=vertical][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-none) var(--sgds-margin-sm) var(--sgds-margin-sm)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-sm) var(--sgds-margin-none)}:host([orientation][imageAdjustment="padding around"]) slot[name=image]::slotted(img){border-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1))}:host([orientation=vertical]:not([imageAdjustment="aspect ratio"])) slot[name=image]::slotted(img){height:auto}:host([orientation=vertical][imageAdjustment="aspect ratio"]) slot[name=image]::slotted(img){object-fit:cover}.card{word-wrap:break-word;background-clip:border-box;background-color:var(--sgds-surface-default);border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-border-radius-md);box-shadow:none;display:flex;flex-direction:column;height:100%;min-width:0;position:relative;transition:box-shadow .3s ease}a.card{color:initial;text-decoration:none}@media (prefers-reduced-motion:reduce){.card{transition:none}}.card.disabled{opacity:var(--sgds-opacity-50);pointer-events:none}a.card:focus{outline:0}a.card:not(.disabled):focus-visible{box-shadow:var(--sgds-box-shadow-focus)}.card-tinted-bg{border-radius:var(--sgds-border-radius-md);bottom:0;left:0;opacity:var(--sgds-opacity-0);position:absolute;right:0;top:0}.card-image{flex:1;position:relative}.card-media{align-items:flex-start;display:flex;justify-content:space-between;line-height:0;padding:var(--sgds-padding-xl) var(--sgds-padding-xl) var(--sgds-padding-none)}.card-thumbnail{align-items:center;border:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);border-radius:var(--sgds-border-radius-full);display:flex;height:var(--sgds-dimension-80);justify-content:center;width:var(--sgds-dimension-80)}.card-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-xl);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-sm)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-title{--sgds-font-size-5:var(--sgds-font-size-4);--sgds-font-size-6:var(--sgds-font-size-4);--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);color:var(--sgds-body-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold)}.card-subtitle,.card-text,.card-title{margin-bottom:var(--sgds-margin-none)}slot[name=subtitle]::slotted(*){--sgds-margin-2-xs:var(--sgds-margin-none);--sgds-margin-xs:var(--sgds-margin-none);--sgds-font-size-4:var(--sgds-font-size-1);--sgds-font-size-5:var(--sgds-font-size-1);--sgds-font-size-6:var(--sgds-font-size-1);--sgds-font-weight-bold:var(--sgds-font-weight-semibold);--sgds-line-height-heading:var(--sgds-line-height-min);--sgds-letter-spacing-tight:var(--sgds-letter-spacing-wide);color:var(--sgds-color-default);font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-semibold);letter-spacing:var(--sgds-letter-spacing-wide);line-height:var(--sgds-line-height-min);margin:var(--sgds-margin-none);text-transform:uppercase}slot[name=title]::slotted(a){--sgds-font-size-2:var(--sgds-font-size-4);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-link-color-default);font-size:var(--sgds-font-size-4);font-weight:var(--sgds-font-weight-semibold);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle)}slot[name=image]::slotted(img){border-top-left-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));border-top-right-radius:calc(var(--sgds-border-radius-md) - var(--sgds-border-width-1));display:block;width:100%}slot[name=link]::slotted(*){font-weight:700;margin-top:auto;padding-top:var(--sgds-padding-sm)}slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=link]::slotted(a:focus),slot[name=link]::slotted(a:hover),slot[name=title]::slotted(a:focus),slot[name=title]::slotted(a:hover){color:var(--sgds-link-color-emphasis)}slot[name=link]::slotted(a:focus),slot[name=title]::slotted(a:focus){outline:0}slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){box-shadow:var(--sgds-box-shadow-focus)}`;
|
|
13571
13579
|
|
|
13572
13580
|
var css_248z$10 = css`.text-primary{color:var(--sgds-primary-rgb)!important}.text-secondary{color:var(--sgds-secondary-rgb)!important}.text-success{color:var(--sgds-success-rgb)!important}.text-info{color:var(--sgds-info-rgb)!important}.text-warning{color:var(--sgds-warning-rgb)!important}.text-danger{color:var(--sgds-danger-rgb)!important}.text-light{color:var(--sgds-light-rgb)!important}.text-dark{color:var(--sgds-dark-rgb)!important}.text-muted{color:var(--sgds-secondary-color)!important}`;
|
|
13573
13581
|
|
|
@@ -13657,6 +13665,7 @@
|
|
|
13657
13665
|
this.imagePosition = "before";
|
|
13658
13666
|
/** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */
|
|
13659
13667
|
this.imageAdjustment = "default";
|
|
13668
|
+
this.hasSlotController = new HasSlotController(this, "description");
|
|
13660
13669
|
}
|
|
13661
13670
|
firstUpdated() {
|
|
13662
13671
|
if (this._imageNode.length === 0) {
|
|
@@ -13677,6 +13686,7 @@
|
|
|
13677
13686
|
render() {
|
|
13678
13687
|
const tag = this.stretchedLink ? literal `a` : literal `div`;
|
|
13679
13688
|
const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;
|
|
13689
|
+
const hasDescriptionSlot = this.hasSlotController.test("description");
|
|
13680
13690
|
return html `
|
|
13681
13691
|
<${tag}
|
|
13682
13692
|
class="card ${classMap({
|
|
@@ -13700,9 +13710,11 @@
|
|
|
13700
13710
|
</div>
|
|
13701
13711
|
<slot></slot>
|
|
13702
13712
|
</div>
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13713
|
+
${hasDescriptionSlot
|
|
13714
|
+
? html `<p class="card-text">
|
|
13715
|
+
<slot name="description"></slot>
|
|
13716
|
+
</p>`
|
|
13717
|
+
: nothing}
|
|
13706
13718
|
<slot name="lower"></slot>
|
|
13707
13719
|
<slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
|
|
13708
13720
|
</div>
|
|
@@ -26888,60 +26900,54 @@
|
|
|
26888
26900
|
* href link for terms of use
|
|
26889
26901
|
*/
|
|
26890
26902
|
this.termsOfUseHref = "#";
|
|
26891
|
-
|
|
26892
|
-
firstUpdated() {
|
|
26893
|
-
const socialMediaSlot = this.shadowRoot.querySelector("slot[name='social-media']");
|
|
26894
|
-
const footerTitleSlot = this.shadowRoot.querySelector("slot[name='title']");
|
|
26895
|
-
const footerDescriptionSlot = this.shadowRoot.querySelector("slot[name='description']");
|
|
26896
|
-
const footerItemsSlot = this.shadowRoot.querySelector("slot[name='items']");
|
|
26897
|
-
const socialMediaChildNodes = socialMediaSlot.assignedNodes({ flatten: true });
|
|
26898
|
-
const footerTitleChildNodes = footerTitleSlot.assignedNodes({ flatten: true });
|
|
26899
|
-
const footerDescriptionChildNodes = footerDescriptionSlot.assignedNodes({ flatten: true });
|
|
26900
|
-
const footerItemsChildNodes = footerItemsSlot.assignedNodes({ flatten: true });
|
|
26901
|
-
if (socialMediaChildNodes.length === 0) {
|
|
26902
|
-
const socialMediaContainer = this.shadowRoot.querySelector(".social-media");
|
|
26903
|
-
socialMediaContainer.style.display = "none";
|
|
26904
|
-
}
|
|
26905
|
-
if (footerTitleChildNodes.length === 0 && footerDescriptionChildNodes.length === 0) {
|
|
26906
|
-
const footerHeaderContainer = this.shadowRoot.querySelector(".footer-header");
|
|
26907
|
-
footerHeaderContainer.style.display = "none";
|
|
26908
|
-
}
|
|
26909
|
-
if (footerItemsChildNodes.length === 0) {
|
|
26910
|
-
const footerItemsContainer = this.shadowRoot.querySelector(".footer-items");
|
|
26911
|
-
footerItemsContainer.style.display = "none";
|
|
26912
|
-
}
|
|
26913
|
-
if (footerTitleChildNodes.length === 0 &&
|
|
26914
|
-
footerDescriptionChildNodes.length === 0 &&
|
|
26915
|
-
footerItemsChildNodes.length === 0) {
|
|
26916
|
-
const footerTopContainer = this.shadowRoot.querySelector(".footer-top");
|
|
26917
|
-
footerTopContainer.style.display = "none";
|
|
26918
|
-
}
|
|
26903
|
+
this.hasSlotController = new HasSlotController(this, "social-media", "title", "description", "items");
|
|
26919
26904
|
}
|
|
26920
26905
|
render() {
|
|
26906
|
+
const hasSocialMediaSlot = this.hasSlotController.test("social-media");
|
|
26907
|
+
const hasTitleSlot = this.hasSlotController.test("title");
|
|
26908
|
+
const hasDescriptionSlot = this.hasSlotController.test("description");
|
|
26909
|
+
const hasItemsSlot = this.hasSlotController.test("items");
|
|
26910
|
+
const displayFooterHeader = hasTitleSlot || hasDescriptionSlot;
|
|
26911
|
+
const displayFooterItems = hasItemsSlot;
|
|
26912
|
+
const displaySocialMedia = hasSocialMediaSlot;
|
|
26913
|
+
const displayFooterTop = displayFooterHeader || displayFooterItems;
|
|
26921
26914
|
return html$1 `
|
|
26922
26915
|
<footer class="footer">
|
|
26923
|
-
|
|
26924
|
-
|
|
26925
|
-
|
|
26926
|
-
|
|
26927
|
-
|
|
26928
|
-
|
|
26929
|
-
|
|
26930
|
-
|
|
26931
|
-
|
|
26916
|
+
${displayFooterTop
|
|
26917
|
+
? html$1 ` <section class="footer-top">
|
|
26918
|
+
${displayFooterHeader
|
|
26919
|
+
? html$1 `
|
|
26920
|
+
<div class="footer-header">
|
|
26921
|
+
<slot name="title"></slot>
|
|
26922
|
+
<slot name="description"></slot>
|
|
26923
|
+
</div>
|
|
26924
|
+
`
|
|
26925
|
+
: nothing}
|
|
26926
|
+
${displayFooterItems
|
|
26927
|
+
? html$1 ` <div class="footer-items">
|
|
26928
|
+
<slot name="items"></slot>
|
|
26929
|
+
</div>`
|
|
26930
|
+
: nothing}
|
|
26931
|
+
</section>`
|
|
26932
|
+
: nothing}
|
|
26933
|
+
|
|
26932
26934
|
<section class="footer-bottom">
|
|
26933
|
-
|
|
26934
|
-
|
|
26935
|
-
|
|
26935
|
+
${displaySocialMedia
|
|
26936
|
+
? html$1 `
|
|
26937
|
+
<div class="social-media">
|
|
26938
|
+
<slot name="social-media"></slot>
|
|
26939
|
+
</div>
|
|
26940
|
+
`
|
|
26941
|
+
: nothing}
|
|
26936
26942
|
<div class="footer-mandatory-links">
|
|
26937
26943
|
<ul>
|
|
26938
26944
|
<li><a href=${this.contactHref}>Contact</a></li>
|
|
26939
26945
|
<li><a href=${this.feedbackHref}>Feedback</a></li>
|
|
26940
26946
|
<li><a href=${this.faqHref}>FAQ</a></li>
|
|
26941
26947
|
<li>
|
|
26942
|
-
<a href="https://tech.gov.sg/report_vulnerability" target="_blank" rel="noopener noreferrer"
|
|
26943
|
-
Report Vulnerability
|
|
26944
|
-
|
|
26948
|
+
<a href="https://tech.gov.sg/report_vulnerability" target="_blank" rel="noopener noreferrer"
|
|
26949
|
+
>Report Vulnerability</a
|
|
26950
|
+
>
|
|
26945
26951
|
</li>
|
|
26946
26952
|
<li><a href=${this.privacyHref}>Privacy Statement</a></li>
|
|
26947
26953
|
<li><a href=${this.termsOfUseHref}>Terms of use</a></li>
|
|
@@ -26973,7 +26979,7 @@
|
|
|
26973
26979
|
property({ type: String })
|
|
26974
26980
|
], SgdsFooter.prototype, "termsOfUseHref", void 0);
|
|
26975
26981
|
|
|
26976
|
-
var css_248z$B = css`.footer-item{margin-bottom:var(--sgds-margin-3-xs)}.footer-item,.links{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot[name=title]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-color-fixed-light);font-weight:var(--sgds-font-weight-regular,--sgds-font-weight-semibold);margin:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}.links{margin:0;padding:0}.links slot::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-fixed-light);text-decoration:none!important;width:fit-content}.links slot::slotted(a
|
|
26982
|
+
var css_248z$B = css`.footer-item{margin-bottom:var(--sgds-margin-3-xs)}.footer-item,.links{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}slot[name=title]::slotted(*){--sgds-paragraph-spacing-xl:var(--sgds-margin-none);--sgds-font-weight-regular:var(--sgds-font-weight-semibold);color:var(--sgds-color-fixed-light);font-weight:var(--sgds-font-weight-regular,--sgds-font-weight-semibold);margin:var(--sgds-paragraph-spacing-xl,--sgds-margin-none)}.links{margin:0;padding:0}.links slot::slotted(a){--sgds-link-color-default:var(--sgds-color-fixed-light);color:var(--sgds-link-color-default,--sgds-fixed-light);text-decoration:none!important;width:fit-content}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible),slot::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-fixed-light);color:var(--sgds-link-color-emphasis,--sgds-color-fixed-light)}.links slot::slotted(a:focus),.links slot::slotted(a:focus-visible){outline:0}.links slot::slotted(a:focus-visible){box-shadow:var(--sgds-box-shadow-focus)}`;
|
|
26977
26983
|
|
|
26978
26984
|
/**
|
|
26979
26985
|
* @summary The footer item component organizes links under a clear, descriptive title within the footer. It helps users easily navigate to related resources or information, ensuring clarity and accessibility.
|
|
@@ -28151,7 +28157,7 @@
|
|
|
28151
28157
|
register("sgds-mainnav-dropdown", SgdsMainnavDropdown);
|
|
28152
28158
|
register("sgds-mainnav-item", SgdsMainnavItem);
|
|
28153
28159
|
|
|
28154
|
-
var css_248z$w = css`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:
|
|
28160
|
+
var css_248z$w = css`b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc;text-decoration:none!important}a[target=_blank]:after{height:var(--sgds-icon-size-sm)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.516 2.933h.017a.4.4 0 1 1 0 .8c-.566 0-.967 0-1.28.026-.31.025-.498.073-.646.149a1.6 1.6 0 0 0-.7.699c-.075.148-.123.336-.148.645-.025.314-.026.714-.026 1.281v2.933c0 .567 0 .968.026 1.282.026.308.073.497.149.645a1.6 1.6 0 0 0 .699.699c.148.075.337.123.645.149.314.025.715.025 1.281.025h2.934c.566 0 .967 0 1.28-.025.31-.026.498-.073.646-.149a1.6 1.6 0 0 0 .7-.7c.075-.147.123-.336.148-.644.025-.314.026-.715.026-1.282a.4.4 0 0 1 .8 0v.018c0 .545 0 .979-.029 1.329-.03.358-.09.663-.233.943a2.4 2.4 0 0 1-1.049 1.049c-.28.142-.585.204-.943.233-.35.028-.784.028-1.329.028H6.516c-.545 0-.979 0-1.329-.028-.358-.03-.664-.09-.943-.233a2.4 2.4 0 0 1-1.05-1.049c-.142-.28-.203-.585-.232-.943-.029-.35-.029-.784-.029-1.33V6.517c0-.546 0-.98.029-1.33.03-.357.09-.663.233-.942a2.4 2.4 0 0 1 1.049-1.05c.28-.142.585-.203.943-.232.35-.029.784-.029 1.329-.029Zm1.75.4c0-.22.18-.4.4-.4h4c.222 0 .4.18.4.4v4a.4.4 0 0 1-.8 0V4.3L8.284 8.283a.4.4 0 0 1-.566-.566l3.984-3.984H8.667a.4.4 0 0 1-.4-.4Z' fill='%230269D0'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-sm)!important}a:hover{color:#0022b9}.sgds-masthead{font-family:Inter,system-ui,sans-serif;font-size:.75rem;line-height:1rem}.banner{background-color:light-dark(#f3f3f3,#1a1a1a)}.container{margin-left:auto;margin-right:auto;max-width:var(--sgds-mainnav-max-width,1440px);padding:.25rem var(--sgds-mainnav-padding-x,2rem);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .25rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0269d0,#60aaf4);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0151a0,#96c7f7)}.panel{background-color:light-dark(oklch(from #0e0e0e l c h/.1),oklch(from #fff l c h/.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#525252,#a5a5a5)}.banner-icon,.banner-icon-inline{height:16px;width:16px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#1a1a1a,#f3f3f3)}a.trusted-websites-link{color:light-dark(#0269d0,#60aaf4);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0151a0,#96c7f7)}.sgds-masthead-button:focus,.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus,a.trusted-websites-link:focus-visible{outline:0}.sgds-masthead-button:focus-visible,a.trusted-websites-link:focus-visible{box-shadow:0 0 0 4px #60aaf4;outline:0}@media screen and (max-width:768px){.container{padding:.25rem var(--sgds-mainnav-mobile-padding-x,1.25rem)}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`;
|
|
28155
28161
|
|
|
28156
28162
|
var css_248z$v = css`svg{vertical-align:middle}`;
|
|
28157
28163
|
|
|
@@ -31879,7 +31885,7 @@
|
|
|
31879
31885
|
options: { duration: 200, easing: "ease-in-out" }
|
|
31880
31886
|
});
|
|
31881
31887
|
|
|
31882
|
-
var css_248z$5 = css`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--sgds-font-size-2:var(--sgds-font-size-1);--sgds-link-color-default:var(--sgds-color-default);box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:
|
|
31888
|
+
var css_248z$5 = css`:host(:not([disabled])[active]:not([active=false])) ::slotted(*){background-color:var(--sgds-bg-translucent-subtle);border-bottom:none}::slotted(*){--sgds-font-size-2:var(--sgds-font-size-1);--sgds-link-color-default:var(--sgds-color-default);box-sizing:border-box;color:var(--sgds-link-color-default,var(--sgds-color-default));cursor:pointer;display:inline-block;font-size:var(--sgds-font-size-2,var(--sgds-font-size-1));padding:var(--sgds-padding-sm) var(--sgds-padding-lg);text-decoration:none!important;white-space:nowrap}::slotted(*):after{height:var(--sgds-icon-size-md)!important;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.145 3.667h.021a.5.5 0 1 1 0 1c-.708 0-1.209 0-1.6.032-.387.032-.622.091-.807.186a2 2 0 0 0-.875.874c-.094.185-.154.42-.185.806-.032.392-.032.893-.032 1.602v3.666c0 .709 0 1.21.032 1.602.031.386.091.621.185.806a2 2 0 0 0 .875.874c.185.095.42.154.806.186.392.032.893.032 1.601.032h3.667c.708 0 1.21 0 1.601-.032.386-.032.622-.091.807-.186a2 2 0 0 0 .874-.874c.095-.185.154-.42.186-.806.032-.392.032-.893.032-1.602a.5.5 0 1 1 1 0v.022c0 .682 0 1.224-.036 1.661-.036.448-.113.83-.29 1.18a3 3 0 0 1-1.312 1.31c-.35.178-.731.255-1.18.292-.436.035-.978.035-1.66.035h-3.71c-.682 0-1.224 0-1.661-.035-.448-.037-.83-.113-1.18-.292a3 3 0 0 1-1.31-1.31c-.179-.35-.255-.732-.292-1.18-.035-.437-.035-.98-.035-1.66V8.144c0-.682 0-1.224.035-1.661.037-.448.113-.83.291-1.18a3 3 0 0 1 1.312-1.31c.35-.178.731-.255 1.179-.292.437-.035.98-.035 1.66-.035Zm2.188.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0V5.374l-4.98 4.98a.5.5 0 0 1-.707-.708l4.98-4.98h-3.793a.5.5 0 0 1-.5-.5Z' fill='%230E0E0E'/%3E%3C/svg%3E")!important;width:var(--sgds-icon-size-md)!important}:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-color-default))}:host(:not([disabled])) ::slotted(a:hover){--sgds-link-color-emphasis:var(--sgds-primary-color-default);color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}::slotted(a:focus),::slotted(a:focus-visible){outline:0}::slotted(a:focus-visible){--sgds-link-color-emphasis:var(--sgds-primary-color-default);box-shadow:var(--sgds-box-shadow-focus) inset;color:var(--sgds-link-color-emphasis,var(--sgds-primary-color-default))}:host([disabled]) ::slotted(*){cursor:not-allowed;opacity:var(--sgds-opacity-50)}@media screen and (min-width:1024px){:host(:not([disabled])[active]:not([active=false])) ::slotted(*){--sgds-link-color-default:var(--sgds-primary-color-default);background-color:inherit;border-bottom:var(--sgds-border-width-2) solid var(--sgds-primary-border-color-default);color:var(--sgds-link-color-default,var(--sgds-primary-color-default))}::slotted(*){padding:var(--sgds-padding-lg) var(--sgds-padding-none)}}`;
|
|
31883
31889
|
|
|
31884
31890
|
/**
|
|
31885
31891
|
* @slot default - slot for SgdsSubnavItem element.
|
|
@@ -32169,6 +32175,7 @@
|
|
|
32169
32175
|
this.imagePosition = "before";
|
|
32170
32176
|
/** Controls how the image is sized and aligned within the card. Available options: `default`, `padding around`, `aspect ratio` */
|
|
32171
32177
|
this.imageAdjustment = "default";
|
|
32178
|
+
this.hasSlotController = new HasSlotController(this, "description");
|
|
32172
32179
|
}
|
|
32173
32180
|
firstUpdated() {
|
|
32174
32181
|
if (this._imageNode.length === 0) {
|
|
@@ -32188,6 +32195,7 @@
|
|
|
32188
32195
|
render() {
|
|
32189
32196
|
const tag = this.stretchedLink ? literal `a` : literal `div`;
|
|
32190
32197
|
const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;
|
|
32198
|
+
const hasDescriptionSlot = this.hasSlotController.test("description");
|
|
32191
32199
|
return html `
|
|
32192
32200
|
<${tag}
|
|
32193
32201
|
class="card ${classMap({
|
|
@@ -32210,9 +32218,11 @@
|
|
|
32210
32218
|
</div>
|
|
32211
32219
|
<slot></slot>
|
|
32212
32220
|
</div>
|
|
32213
|
-
|
|
32214
|
-
|
|
32215
|
-
|
|
32221
|
+
${hasDescriptionSlot
|
|
32222
|
+
? html `<p class="card-text">
|
|
32223
|
+
<slot name="description"></slot>
|
|
32224
|
+
</p>`
|
|
32225
|
+
: nothing}
|
|
32216
32226
|
<slot name="lower"></slot>
|
|
32217
32227
|
<slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
|
|
32218
32228
|
</div>
|
|
@@ -32254,6 +32264,7 @@
|
|
|
32254
32264
|
super(...arguments);
|
|
32255
32265
|
/** Removes the card's internal padding when set to true. */
|
|
32256
32266
|
this.noPadding = false;
|
|
32267
|
+
this.hasSlotController = new HasSlotController(this, "description");
|
|
32257
32268
|
}
|
|
32258
32269
|
firstUpdated() {
|
|
32259
32270
|
if (this._thumbnailNode.length === 0) {
|
|
@@ -32271,6 +32282,7 @@
|
|
|
32271
32282
|
render() {
|
|
32272
32283
|
const tag = this.stretchedLink ? literal `a` : literal `div`;
|
|
32273
32284
|
const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;
|
|
32285
|
+
const hasDescriptionSlot = this.hasSlotController.test("description");
|
|
32274
32286
|
return html `
|
|
32275
32287
|
<${tag}
|
|
32276
32288
|
class="card ${classMap({
|
|
@@ -32294,9 +32306,11 @@
|
|
|
32294
32306
|
</div>
|
|
32295
32307
|
<slot></slot>
|
|
32296
32308
|
</div>
|
|
32297
|
-
|
|
32298
|
-
|
|
32299
|
-
|
|
32309
|
+
${hasDescriptionSlot
|
|
32310
|
+
? html `<p class="card-text">
|
|
32311
|
+
<slot name="description"></slot>
|
|
32312
|
+
</p>`
|
|
32313
|
+
: nothing}
|
|
32300
32314
|
<slot name="lower"></slot>
|
|
32301
32315
|
<slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
|
|
32302
32316
|
</div>
|
|
@@ -32335,6 +32349,7 @@
|
|
|
32335
32349
|
super(...arguments);
|
|
32336
32350
|
/** Removes the card's internal padding when set to true. */
|
|
32337
32351
|
this.noPadding = false;
|
|
32352
|
+
this.hasSlotController = new HasSlotController(this, "description");
|
|
32338
32353
|
}
|
|
32339
32354
|
firstUpdated() {
|
|
32340
32355
|
if (this._iconNode.length === 0) {
|
|
@@ -32350,6 +32365,7 @@
|
|
|
32350
32365
|
render() {
|
|
32351
32366
|
const tag = this.stretchedLink ? literal `a` : literal `div`;
|
|
32352
32367
|
const cardTabIndex = !this.stretchedLink || this.disabled ? -1 : 0;
|
|
32368
|
+
const hasDescriptionSlot = this.hasSlotController.test("description");
|
|
32353
32369
|
return html `
|
|
32354
32370
|
<${tag}
|
|
32355
32371
|
class="card ${classMap({
|
|
@@ -32371,9 +32387,11 @@
|
|
|
32371
32387
|
</div>
|
|
32372
32388
|
<slot></slot>
|
|
32373
32389
|
</div>
|
|
32374
|
-
|
|
32375
|
-
|
|
32376
|
-
|
|
32390
|
+
${hasDescriptionSlot
|
|
32391
|
+
? html `<p class="card-text">
|
|
32392
|
+
<slot name="description"></slot>
|
|
32393
|
+
</p>`
|
|
32394
|
+
: nothing}
|
|
32377
32395
|
<slot name="lower"></slot>
|
|
32378
32396
|
<slot name="link" @slotchange=${this.handleLinkSlotChange}></slot>
|
|
32379
32397
|
</div>
|