@govtechsg/sgds-web-component 3.23.0-rc.0 → 3.23.0-rc.1
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/card.js +1 -1
- package/components/Breadcrumb/index.umd.min.js +34 -33
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Card/index.umd.min.js +1 -1
- package/components/Card/index.umd.min.js.map +1 -1
- package/components/Dropdown/index.umd.min.js +9 -3
- package/components/Dropdown/index.umd.min.js.map +1 -1
- package/components/Dropdown/sgds-dropdown-item.d.ts +2 -0
- package/components/Dropdown/sgds-dropdown-item.js +7 -0
- package/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/components/IconCard/index.umd.min.js +1 -1
- package/components/IconCard/index.umd.min.js.map +1 -1
- package/components/ImageCard/index.umd.min.js +1 -1
- package/components/ImageCard/index.umd.min.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +3 -2
- package/components/Mainnav/index.umd.min.js.map +1 -1
- package/components/OverflowMenu/index.umd.min.js +9 -3
- package/components/OverflowMenu/index.umd.min.js.map +1 -1
- package/components/ThumbnailCard/index.umd.min.js +1 -1
- package/components/ThumbnailCard/index.umd.min.js.map +1 -1
- package/components/index.umd.min.js +4 -3
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +2 -2
- package/custom-elements.json +1074 -1055
- package/index.umd.min.js +4 -3
- package/index.umd.min.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/components/Dropdown/sgds-dropdown-item.cjs.js +7 -0
- package/react/components/Dropdown/sgds-dropdown-item.cjs.js.map +1 -1
- package/react/components/Dropdown/sgds-dropdown-item.js +7 -0
- package/react/components/Dropdown/sgds-dropdown-item.js.map +1 -1
- package/react/index.cjs.js +10 -10
- package/react/index.d.ts +2 -2
- package/react/index.js +2 -2
- package/types/react.d.ts +46 -44
package/package.json
CHANGED
package/react/base/card.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
|
|
8
|
-
var css_248z = lit.css`:host{height:100%}:host([disabled]){cursor:not-allowed}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([stretchedLink]) .card:after{display:none}: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-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) 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-40);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-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-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-lg);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.card-title,slot[name=title]::slotted(*){color:var(--sgds-color-default);font-size:var(--sgds-font-size-heading-sm)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-tight)!important;line-height:var(--sgds-line-height-sm)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-overline-md)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-2-xs)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){color:var(--sgds-link-color-default);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);margin-bottom:var(--sgds-margin-none)!important}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=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-2-xs);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),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=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
|
|
8
|
+
var css_248z = lit.css`:host{height:100%}:host([disabled]){cursor:not-allowed}:host([stretchedLink]:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([stretchedLink]) .card:after{display:none}: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-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) 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-40);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-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-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-lg);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.card-title,slot[name=title]::slotted(*){color:var(--sgds-color-default);font-size:var(--sgds-font-size-heading-sm)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-tight)!important;line-height:var(--sgds-line-height-sm)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-overline-md)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-2-xs)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){color:var(--sgds-link-color-default);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);margin-bottom:var(--sgds-margin-none)!important}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=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-2-xs);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),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=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
|
|
9
9
|
|
|
10
10
|
exports["default"] = css_248z;
|
|
11
11
|
//# sourceMappingURL=card.cjs.js.map
|
package/react/base/card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { css } from 'lit';
|
|
3
3
|
|
|
4
|
-
var css_248z = css`:host{height:100%}:host([disabled]){cursor:not-allowed}:host(:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([stretchedLink]) .card:after{display:none}: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-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) 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-40);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-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-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-lg);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.card-title,slot[name=title]::slotted(*){color:var(--sgds-color-default);font-size:var(--sgds-font-size-heading-sm)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-tight)!important;line-height:var(--sgds-line-height-sm)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-overline-md)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-2-xs)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){color:var(--sgds-link-color-default);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);margin-bottom:var(--sgds-margin-none)!important}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=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-2-xs);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),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=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
|
|
4
|
+
var css_248z = css`:host{height:100%}:host([disabled]){cursor:not-allowed}:host([stretchedLink]:not([noPadding])) .card:not(.disabled):hover{box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 8px 16px 0 hsla(0,0%,5%,.12)}:host([stretchedLink]) slot[name=footer]::slotted(a),:host([stretchedLink]) slot[name=footer]::slotted(sgds-link),:host([stretchedLink]) slot[name=link]::slotted(a),:host([stretchedLink]) slot[name=link]::slotted(sgds-link){display:none}:host([stretchedLink]) .card:after{display:none}: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-xl) var(--sgds-margin-xl) var(--sgds-padding-none)}:host([orientation=vertical][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-none) var(--sgds-margin-xl) var(--sgds-margin-xl)}:host([orientation=horizontal][imageAdjustment="padding around"][imagePosition=after]) .card-image{margin:var(--sgds-margin-xl) var(--sgds-margin-xl) var(--sgds-margin-xl) 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-40);pointer-events:none}a.card:not(.disabled):focus-visible{--sgds-outline-offset-focus:-1px;outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-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-body{color:var(--sgds-body-color-default);display:flex;flex:1 1 auto;flex-direction:column;gap:var(--sgds-gap-lg);padding:var(--sgds-padding-xl);z-index:1}.card-header-container{display:flex;flex-direction:column;gap:var(--sgds-gap-xs)}.card-header{display:flex;flex-direction:column;gap:var(--sgds-gap-2-xs)}.card-title,slot[name=title]::slotted(*){color:var(--sgds-color-default);font-size:var(--sgds-font-size-heading-sm)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-tight)!important;line-height:var(--sgds-line-height-sm)!important;margin-bottom:var(--sgds-margin-none)!important}slot[name=subtitle]::slotted(*){color:var(--sgds-color-subtle);font-size:var(--sgds-font-size-overline-md)!important;font-weight:var(--sgds-font-weight-semibold)!important;letter-spacing:var(--sgds-letter-spacing-wide)!important;line-height:var(--sgds-line-height-2-xs)!important;margin:var(--sgds-margin-none)!important;text-transform:uppercase}slot[name=title]::slotted(a){color:var(--sgds-link-color-default);text-decoration:none!important}slot[name=description]::slotted(*){color:var(--sgds-color-subtle);margin-bottom:var(--sgds-margin-none)!important}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=footer]::slotted(*),slot[name=link]::slotted(*){margin-top:auto;padding-top:var(--sgds-padding-2-xs);width:fit-content}slot[name=footer]::slotted(a),slot[name=link]::slotted(a){color:var(--sgds-link-color-default);height:auto!important;text-decoration:none!important}slot[name=footer]::slotted(a:focus),slot[name=footer]::slotted(a:hover),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=footer]::slotted(a:focus-visible),slot[name=link]::slotted(a:focus-visible),slot[name=title]::slotted(a:focus-visible){outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}`;
|
|
5
5
|
|
|
6
6
|
export { css_248z as default };
|
|
7
7
|
//# sourceMappingURL=card.js.map
|
|
@@ -7,6 +7,7 @@ var tslib = require('tslib');
|
|
|
7
7
|
var lit = require('lit');
|
|
8
8
|
var decorators_js = require('lit/decorators.js');
|
|
9
9
|
var classMap_js = require('lit/directives/class-map.js');
|
|
10
|
+
var ifDefined_js = require('lit/directives/if-defined.js');
|
|
10
11
|
var sgdsElement = require('../../base/sgds-element.cjs.js');
|
|
11
12
|
var sgdsIcon = require('../Icon/sgds-icon.cjs.js');
|
|
12
13
|
var dropdownItem = require('./dropdown-item.cjs.js');
|
|
@@ -23,6 +24,8 @@ class SgdsDropdownItem extends sgdsElement["default"] {
|
|
|
23
24
|
this.active = false;
|
|
24
25
|
/** Disables the SgdsMainnavItem */
|
|
25
26
|
this.disabled = false;
|
|
27
|
+
/** Forwards aria-label to the inner clickable element for accessibility */
|
|
28
|
+
this.ariaLabel = "";
|
|
26
29
|
}
|
|
27
30
|
connectedCallback() {
|
|
28
31
|
super.connectedCallback();
|
|
@@ -42,6 +45,7 @@ class SgdsDropdownItem extends sgdsElement["default"] {
|
|
|
42
45
|
active: this.active
|
|
43
46
|
})}"
|
|
44
47
|
tabindex=${this.disabled ? "-1" : "0"}
|
|
48
|
+
aria-label=${ifDefined_js.ifDefined(this.ariaLabel || undefined)}
|
|
45
49
|
>
|
|
46
50
|
<slot></slot>
|
|
47
51
|
</div>
|
|
@@ -61,6 +65,9 @@ tslib.__decorate([
|
|
|
61
65
|
tslib.__decorate([
|
|
62
66
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
63
67
|
], SgdsDropdownItem.prototype, "disabled", void 0);
|
|
68
|
+
tslib.__decorate([
|
|
69
|
+
decorators_js.property({ type: String })
|
|
70
|
+
], SgdsDropdownItem.prototype, "ariaLabel", void 0);
|
|
64
71
|
|
|
65
72
|
exports.SgdsDropdownItem = SgdsDropdownItem;
|
|
66
73
|
exports["default"] = SgdsDropdownItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-dropdown-item.cjs.js","sources":["../../../../src/components/Dropdown/sgds-dropdown-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, queryAssignedElements } 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 dropdownItemStyle from \"./dropdown-item.css\";\nimport dropdownStyle from \"./dropdown.css\";\n/**\n * @summary `SgdsDropdownItem` are navigation links built with `HTMLAnchorElement`. It should be used in the default slot of `SgdsDropdown`\n * @slot default - The default slot for SgdsDropdownItem. Pass in a single anchor tag per dropdown item directly for navigation items.\n */\nexport class SgdsDropdownItem extends SgdsElement {\n static styles = [dropdownStyle, dropdownItemStyle];\n static dependencies = {\n \"sgds-icon\": SgdsIcon\n };\n\n /** @internal */\n @queryAssignedElements({ flatten: true }) private anchor: HTMLAnchorElement[];\n\n /** when true, sets the active stylings of dropdown item */\n @property({ type: Boolean })\n active = false;\n\n /** Disables the SgdsMainnavItem */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\" && this.anchor.length > 0) {\n this.anchor[0].click();\n }\n });\n this.setAttribute(\"role\", \"menuitem\");\n this.setAttribute(\"aria-disabled\", `${this.disabled}`);\n }\n\n render() {\n return html`\n <div\n class=\"dropdown-item ${classMap({\n disabled: this.disabled,\n active: this.active\n })}\"\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\nexport default SgdsDropdownItem;\n"],"names":["SgdsElement","html","classMap","dropdownStyle","dropdownItemStyle","SgdsIcon","__decorate","queryAssignedElements","property"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sgds-dropdown-item.cjs.js","sources":["../../../../src/components/Dropdown/sgds-dropdown-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport dropdownItemStyle from \"./dropdown-item.css\";\nimport dropdownStyle from \"./dropdown.css\";\n/**\n * @summary `SgdsDropdownItem` are navigation links built with `HTMLAnchorElement`. It should be used in the default slot of `SgdsDropdown`\n * @slot default - The default slot for SgdsDropdownItem. Pass in a single anchor tag per dropdown item directly for navigation items.\n */\nexport class SgdsDropdownItem extends SgdsElement {\n static styles = [dropdownStyle, dropdownItemStyle];\n static dependencies = {\n \"sgds-icon\": SgdsIcon\n };\n\n /** @internal */\n @queryAssignedElements({ flatten: true }) private anchor: HTMLAnchorElement[];\n\n /** when true, sets the active stylings of dropdown item */\n @property({ type: Boolean })\n active = false;\n\n /** Disables the SgdsMainnavItem */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Forwards aria-label to the inner clickable element for accessibility */\n @property({ type: String })\n ariaLabel = \"\";\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\" && this.anchor.length > 0) {\n this.anchor[0].click();\n }\n });\n this.setAttribute(\"role\", \"menuitem\");\n this.setAttribute(\"aria-disabled\", `${this.disabled}`);\n }\n\n render() {\n return html`\n <div\n class=\"dropdown-item ${classMap({\n disabled: this.disabled,\n active: this.active\n })}\"\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n aria-label=${ifDefined(this.ariaLabel || undefined)}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\nexport default SgdsDropdownItem;\n"],"names":["SgdsElement","html","classMap","ifDefined","dropdownStyle","dropdownItemStyle","SgdsIcon","__decorate","queryAssignedElements","property"],"mappings":";;;;;;;;;;;;;;;AAQA;;;AAGG;AACG,MAAO,gBAAiB,SAAQA,sBAAW,CAAA;AAAjD,IAAA,WAAA,GAAA;;;QAWE,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;;QAIf,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAIjB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KA2BhB;IAzBC,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAgB,KAAI;AACpD,YAAA,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC/C,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;aACxB;AACH,SAAC,CAAC,CAAC;AACH,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;KACxD;IAED,MAAM,GAAA;AACJ,QAAA,OAAOC,QAAI,CAAA,CAAA;;AAEgB,6BAAA,EAAAC,oBAAQ,CAAC;YAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAA;mBACS,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,GAAG,CAAA;AACxB,mBAAA,EAAAC,sBAAS,CAAC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,CAAA;;;;KAItD,CAAC;KACH;;AA5CM,gBAAA,CAAA,MAAM,GAAG,CAACC,mBAAa,EAAEC,uBAAiB,CAAC,CAAC;AAC5C,gBAAA,CAAA,YAAY,GAAG;AACpB,IAAA,WAAW,EAAEC,iBAAQ;AACtB,CAFkB,CAEjB;AAGgDC,gBAAA,CAAA;AAAjD,IAAAC,mCAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAqC,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAI9ED,gBAAA,CAAA;AADC,IAAAE,sBAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACb,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIfF,gBAAA,CAAA;IADCE,sBAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIjBF,gBAAA,CAAA;AADC,IAAAE,sBAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACZ,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA;;;;;"}
|
|
@@ -3,6 +3,7 @@ import { __decorate } from 'tslib';
|
|
|
3
3
|
import { html } from 'lit';
|
|
4
4
|
import { queryAssignedElements, property } from 'lit/decorators.js';
|
|
5
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
7
|
import SgdsElement from '../../base/sgds-element.js';
|
|
7
8
|
import { SgdsIcon } from '../Icon/sgds-icon.js';
|
|
8
9
|
import css_248z$1 from './dropdown-item.js';
|
|
@@ -19,6 +20,8 @@ class SgdsDropdownItem extends SgdsElement {
|
|
|
19
20
|
this.active = false;
|
|
20
21
|
/** Disables the SgdsMainnavItem */
|
|
21
22
|
this.disabled = false;
|
|
23
|
+
/** Forwards aria-label to the inner clickable element for accessibility */
|
|
24
|
+
this.ariaLabel = "";
|
|
22
25
|
}
|
|
23
26
|
connectedCallback() {
|
|
24
27
|
super.connectedCallback();
|
|
@@ -38,6 +41,7 @@ class SgdsDropdownItem extends SgdsElement {
|
|
|
38
41
|
active: this.active
|
|
39
42
|
})}"
|
|
40
43
|
tabindex=${this.disabled ? "-1" : "0"}
|
|
44
|
+
aria-label=${ifDefined(this.ariaLabel || undefined)}
|
|
41
45
|
>
|
|
42
46
|
<slot></slot>
|
|
43
47
|
</div>
|
|
@@ -57,6 +61,9 @@ __decorate([
|
|
|
57
61
|
__decorate([
|
|
58
62
|
property({ type: Boolean, reflect: true })
|
|
59
63
|
], SgdsDropdownItem.prototype, "disabled", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: String })
|
|
66
|
+
], SgdsDropdownItem.prototype, "ariaLabel", void 0);
|
|
60
67
|
|
|
61
68
|
export { SgdsDropdownItem, SgdsDropdownItem as default };
|
|
62
69
|
//# sourceMappingURL=sgds-dropdown-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-dropdown-item.js","sources":["../../../../src/components/Dropdown/sgds-dropdown-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, queryAssignedElements } 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 dropdownItemStyle from \"./dropdown-item.css\";\nimport dropdownStyle from \"./dropdown.css\";\n/**\n * @summary `SgdsDropdownItem` are navigation links built with `HTMLAnchorElement`. It should be used in the default slot of `SgdsDropdown`\n * @slot default - The default slot for SgdsDropdownItem. Pass in a single anchor tag per dropdown item directly for navigation items.\n */\nexport class SgdsDropdownItem extends SgdsElement {\n static styles = [dropdownStyle, dropdownItemStyle];\n static dependencies = {\n \"sgds-icon\": SgdsIcon\n };\n\n /** @internal */\n @queryAssignedElements({ flatten: true }) private anchor: HTMLAnchorElement[];\n\n /** when true, sets the active stylings of dropdown item */\n @property({ type: Boolean })\n active = false;\n\n /** Disables the SgdsMainnavItem */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\" && this.anchor.length > 0) {\n this.anchor[0].click();\n }\n });\n this.setAttribute(\"role\", \"menuitem\");\n this.setAttribute(\"aria-disabled\", `${this.disabled}`);\n }\n\n render() {\n return html`\n <div\n class=\"dropdown-item ${classMap({\n disabled: this.disabled,\n active: this.active\n })}\"\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\nexport default SgdsDropdownItem;\n"],"names":["dropdownStyle","dropdownItemStyle"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sgds-dropdown-item.js","sources":["../../../../src/components/Dropdown/sgds-dropdown-item.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport dropdownItemStyle from \"./dropdown-item.css\";\nimport dropdownStyle from \"./dropdown.css\";\n/**\n * @summary `SgdsDropdownItem` are navigation links built with `HTMLAnchorElement`. It should be used in the default slot of `SgdsDropdown`\n * @slot default - The default slot for SgdsDropdownItem. Pass in a single anchor tag per dropdown item directly for navigation items.\n */\nexport class SgdsDropdownItem extends SgdsElement {\n static styles = [dropdownStyle, dropdownItemStyle];\n static dependencies = {\n \"sgds-icon\": SgdsIcon\n };\n\n /** @internal */\n @queryAssignedElements({ flatten: true }) private anchor: HTMLAnchorElement[];\n\n /** when true, sets the active stylings of dropdown item */\n @property({ type: Boolean })\n active = false;\n\n /** Disables the SgdsMainnavItem */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /** Forwards aria-label to the inner clickable element for accessibility */\n @property({ type: String })\n ariaLabel = \"\";\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\" && this.anchor.length > 0) {\n this.anchor[0].click();\n }\n });\n this.setAttribute(\"role\", \"menuitem\");\n this.setAttribute(\"aria-disabled\", `${this.disabled}`);\n }\n\n render() {\n return html`\n <div\n class=\"dropdown-item ${classMap({\n disabled: this.disabled,\n active: this.active\n })}\"\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n aria-label=${ifDefined(this.ariaLabel || undefined)}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\nexport default SgdsDropdownItem;\n"],"names":["dropdownStyle","dropdownItemStyle"],"mappings":";;;;;;;;;;;AAQA;;;AAGG;AACG,MAAO,gBAAiB,SAAQ,WAAW,CAAA;AAAjD,IAAA,WAAA,GAAA;;;QAWE,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;;QAIf,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAIjB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;KA2BhB;IAzBC,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAgB,KAAI;AACpD,YAAA,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC/C,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;aACxB;AACH,SAAC,CAAC,CAAC;AACH,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;KACxD;IAED,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA,CAAA;;AAEgB,6BAAA,EAAA,QAAQ,CAAC;YAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAA;mBACS,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,GAAG,CAAA;AACxB,mBAAA,EAAA,SAAS,CAAC,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,CAAA;;;;KAItD,CAAC;KACH;;AA5CM,gBAAA,CAAA,MAAM,GAAG,CAACA,QAAa,EAAEC,UAAiB,CAAC,CAAC;AAC5C,gBAAA,CAAA,YAAY,GAAG;AACpB,IAAA,WAAW,EAAE,QAAQ;AACtB,CAFkB,CAEjB;AAGgD,UAAA,CAAA;AAAjD,IAAA,qBAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAqC,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAI9E,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACb,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIf,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIjB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACZ,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
|
package/react/index.cjs.js
CHANGED
|
@@ -7,11 +7,11 @@ var index = require('./accordion-item/index.cjs.js');
|
|
|
7
7
|
var index$1 = require('./accordion/index.cjs.js');
|
|
8
8
|
var index$2 = require('./alert-link/index.cjs.js');
|
|
9
9
|
var index$3 = require('./alert/index.cjs.js');
|
|
10
|
-
var index$4 = require('./
|
|
11
|
-
var index$5 = require('./
|
|
12
|
-
var index$6 = require('./
|
|
13
|
-
var index$7 = require('./
|
|
14
|
-
var index$8 = require('./
|
|
10
|
+
var index$4 = require('./badge/index.cjs.js');
|
|
11
|
+
var index$5 = require('./breadcrumb-item/index.cjs.js');
|
|
12
|
+
var index$6 = require('./breadcrumb/index.cjs.js');
|
|
13
|
+
var index$7 = require('./button/index.cjs.js');
|
|
14
|
+
var index$8 = require('./card/index.cjs.js');
|
|
15
15
|
var index$9 = require('./checkbox-group/index.cjs.js');
|
|
16
16
|
var index$a = require('./checkbox/index.cjs.js');
|
|
17
17
|
var index$b = require('./close-button/index.cjs.js');
|
|
@@ -83,11 +83,11 @@ exports.SgdsAccordionItem = index["default"];
|
|
|
83
83
|
exports.SgdsAccordion = index$1["default"];
|
|
84
84
|
exports.SgdsAlertLink = index$2["default"];
|
|
85
85
|
exports.SgdsAlert = index$3["default"];
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
89
|
-
exports.
|
|
90
|
-
exports.
|
|
86
|
+
exports.SgdsBadge = index$4["default"];
|
|
87
|
+
exports.SgdsBreadcrumbItem = index$5["default"];
|
|
88
|
+
exports.SgdsBreadcrumb = index$6["default"];
|
|
89
|
+
exports.SgdsButton = index$7["default"];
|
|
90
|
+
exports.SgdsCard = index$8["default"];
|
|
91
91
|
exports.SgdsCheckboxGroup = index$9["default"];
|
|
92
92
|
exports.SgdsCheckbox = index$a["default"];
|
|
93
93
|
exports.SgdsCloseButton = index$b["default"];
|
package/react/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ export { default as SgdsAccordionItem } from './accordion-item';
|
|
|
2
2
|
export { default as SgdsAccordion } from './accordion';
|
|
3
3
|
export { default as SgdsAlertLink } from './alert-link';
|
|
4
4
|
export { default as SgdsAlert } from './alert';
|
|
5
|
-
export { default as SgdsButton } from './button';
|
|
6
5
|
export { default as SgdsBadge } from './badge';
|
|
7
|
-
export { default as SgdsCard } from './card';
|
|
8
6
|
export { default as SgdsBreadcrumbItem } from './breadcrumb-item';
|
|
9
7
|
export { default as SgdsBreadcrumb } from './breadcrumb';
|
|
8
|
+
export { default as SgdsButton } from './button';
|
|
9
|
+
export { default as SgdsCard } from './card';
|
|
10
10
|
export { default as SgdsCheckboxGroup } from './checkbox-group';
|
|
11
11
|
export { default as SgdsCheckbox } from './checkbox';
|
|
12
12
|
export { default as SgdsCloseButton } from './close-button';
|
package/react/index.js
CHANGED
|
@@ -3,11 +3,11 @@ export { default as SgdsAccordionItem } from './accordion-item/index.js';
|
|
|
3
3
|
export { default as SgdsAccordion } from './accordion/index.js';
|
|
4
4
|
export { default as SgdsAlertLink } from './alert-link/index.js';
|
|
5
5
|
export { default as SgdsAlert } from './alert/index.js';
|
|
6
|
-
export { default as SgdsButton } from './button/index.js';
|
|
7
6
|
export { default as SgdsBadge } from './badge/index.js';
|
|
8
|
-
export { default as SgdsCard } from './card/index.js';
|
|
9
7
|
export { default as SgdsBreadcrumbItem } from './breadcrumb-item/index.js';
|
|
10
8
|
export { default as SgdsBreadcrumb } from './breadcrumb/index.js';
|
|
9
|
+
export { default as SgdsButton } from './button/index.js';
|
|
10
|
+
export { default as SgdsCard } from './card/index.js';
|
|
11
11
|
export { default as SgdsCheckboxGroup } from './checkbox-group/index.js';
|
|
12
12
|
export { default as SgdsCheckbox } from './checkbox/index.js';
|
|
13
13
|
export { default as SgdsCloseButton } from './close-button/index.js';
|
package/types/react.d.ts
CHANGED
|
@@ -155,6 +155,46 @@ export interface SgdsAlertProps extends SgdsBaseProps {
|
|
|
155
155
|
onSgdsHide?: SgdsEventHandler;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
// ── Badge ─────────────────────────────────────────────────────────────
|
|
159
|
+
|
|
160
|
+
export interface SgdsBadgeProps extends SgdsBaseProps {
|
|
161
|
+
/** Controls the appearance of the dismissible badge. This prop only applies when dismissible is true */
|
|
162
|
+
show?: boolean;
|
|
163
|
+
/** One or more badge variant combinations.
|
|
164
|
+
Variants include: `primary`, `accent`, `success`, `danger`, `warning`, `cyan`, `purple`, `neutral`, `white`, `info`.
|
|
165
|
+
|
|
166
|
+
(@deprecated) The `info` variant is deprecated. Use `primary` instead. */
|
|
167
|
+
variant?: "primary" | "accent" | "success" | "danger" | "warning" | "cyan" | "purple" | "neutral" | "white" | "info";
|
|
168
|
+
/** Manually set the outlined state to false */
|
|
169
|
+
outlined?: boolean;
|
|
170
|
+
/** Manually set the dismissible state of the button to `false` */
|
|
171
|
+
dismissible?: boolean;
|
|
172
|
+
/** Manually enable full width */
|
|
173
|
+
fullWidth?: boolean;
|
|
174
|
+
"onsgds-show"?: SgdsEventHandler;
|
|
175
|
+
onSgdsShow?: SgdsEventHandler;
|
|
176
|
+
"onsgds-hide"?: SgdsEventHandler;
|
|
177
|
+
onSgdsHide?: SgdsEventHandler;
|
|
178
|
+
"onsgds-after-show"?: SgdsEventHandler;
|
|
179
|
+
onSgdsAfterShow?: SgdsEventHandler;
|
|
180
|
+
"onsgds-after-hide"?: SgdsEventHandler;
|
|
181
|
+
onSgdsAfterHide?: SgdsEventHandler;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// ── BreadcrumbItem ─────────────────────────────────────────────────────────────
|
|
185
|
+
|
|
186
|
+
export interface SgdsBreadcrumbItemProps extends SgdsBaseProps {
|
|
187
|
+
/** Indicates the link matches the current location of the page. Programmatically handled by SgdsBreadcrumb to set this prop to true for the last breadcrumb item */
|
|
188
|
+
active?: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// ── Breadcrumb ─────────────────────────────────────────────────────────────
|
|
192
|
+
|
|
193
|
+
export interface SgdsBreadcrumbProps extends SgdsBaseProps {
|
|
194
|
+
/** The aria-label of nav element within breadcrumb component. */
|
|
195
|
+
ariaLabel?: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
158
198
|
// ── Button ─────────────────────────────────────────────────────────────
|
|
159
199
|
|
|
160
200
|
export interface SgdsButtonProps extends SgdsBaseProps {
|
|
@@ -211,32 +251,6 @@ value of this attribute must be an id of a form in the same document or shadow r
|
|
|
211
251
|
onSgdsFocus?: SgdsEventHandler;
|
|
212
252
|
}
|
|
213
253
|
|
|
214
|
-
// ── Badge ─────────────────────────────────────────────────────────────
|
|
215
|
-
|
|
216
|
-
export interface SgdsBadgeProps extends SgdsBaseProps {
|
|
217
|
-
/** Controls the appearance of the dismissible badge. This prop only applies when dismissible is true */
|
|
218
|
-
show?: boolean;
|
|
219
|
-
/** One or more badge variant combinations.
|
|
220
|
-
Variants include: `primary`, `accent`, `success`, `danger`, `warning`, `cyan`, `purple`, `neutral`, `white`, `info`.
|
|
221
|
-
|
|
222
|
-
(@deprecated) The `info` variant is deprecated. Use `primary` instead. */
|
|
223
|
-
variant?: "primary" | "accent" | "success" | "danger" | "warning" | "cyan" | "purple" | "neutral" | "white" | "info";
|
|
224
|
-
/** Manually set the outlined state to false */
|
|
225
|
-
outlined?: boolean;
|
|
226
|
-
/** Manually set the dismissible state of the button to `false` */
|
|
227
|
-
dismissible?: boolean;
|
|
228
|
-
/** Manually enable full width */
|
|
229
|
-
fullWidth?: boolean;
|
|
230
|
-
"onsgds-show"?: SgdsEventHandler;
|
|
231
|
-
onSgdsShow?: SgdsEventHandler;
|
|
232
|
-
"onsgds-hide"?: SgdsEventHandler;
|
|
233
|
-
onSgdsHide?: SgdsEventHandler;
|
|
234
|
-
"onsgds-after-show"?: SgdsEventHandler;
|
|
235
|
-
onSgdsAfterShow?: SgdsEventHandler;
|
|
236
|
-
"onsgds-after-hide"?: SgdsEventHandler;
|
|
237
|
-
onSgdsAfterHide?: SgdsEventHandler;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
254
|
// ── Card ─────────────────────────────────────────────────────────────
|
|
241
255
|
|
|
242
256
|
export interface SgdsCardProps extends SgdsBaseProps {
|
|
@@ -262,20 +276,6 @@ export interface SgdsCardProps extends SgdsBaseProps {
|
|
|
262
276
|
orientation?: CardOrientation;
|
|
263
277
|
}
|
|
264
278
|
|
|
265
|
-
// ── BreadcrumbItem ─────────────────────────────────────────────────────────────
|
|
266
|
-
|
|
267
|
-
export interface SgdsBreadcrumbItemProps extends SgdsBaseProps {
|
|
268
|
-
/** Indicates the link matches the current location of the page. Programmatically handled by SgdsBreadcrumb to set this prop to true for the last breadcrumb item */
|
|
269
|
-
active?: boolean;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// ── Breadcrumb ─────────────────────────────────────────────────────────────
|
|
273
|
-
|
|
274
|
-
export interface SgdsBreadcrumbProps extends SgdsBaseProps {
|
|
275
|
-
/** The aria-label of nav element within breadcrumb component. */
|
|
276
|
-
ariaLabel?: string;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
279
|
// ── CheckboxGroup ─────────────────────────────────────────────────────────────
|
|
280
280
|
|
|
281
281
|
export interface SgdsCheckboxGroupProps extends SgdsBaseProps {
|
|
@@ -596,6 +596,8 @@ export interface SgdsDropdownItemProps extends SgdsBaseProps {
|
|
|
596
596
|
active?: boolean;
|
|
597
597
|
/** Disables the SgdsMainnavItem */
|
|
598
598
|
disabled?: boolean;
|
|
599
|
+
/** Forwards aria-label to the inner clickable element for accessibility */
|
|
600
|
+
ariaLabel?: string;
|
|
599
601
|
}
|
|
600
602
|
|
|
601
603
|
// ── Dropdown ─────────────────────────────────────────────────────────────
|
|
@@ -1686,11 +1688,11 @@ declare module "react" {
|
|
|
1686
1688
|
"sgds-accordion": React.DetailedHTMLProps<SgdsAccordionProps, HTMLElement>;
|
|
1687
1689
|
"sgds-alert-link": React.DetailedHTMLProps<SgdsAlertLinkProps, HTMLElement>;
|
|
1688
1690
|
"sgds-alert": React.DetailedHTMLProps<SgdsAlertProps, HTMLElement>;
|
|
1689
|
-
"sgds-button": React.DetailedHTMLProps<SgdsButtonProps, HTMLElement>;
|
|
1690
1691
|
"sgds-badge": React.DetailedHTMLProps<SgdsBadgeProps, HTMLElement>;
|
|
1691
|
-
"sgds-card": React.DetailedHTMLProps<SgdsCardProps, HTMLElement>;
|
|
1692
1692
|
"sgds-breadcrumb-item": React.DetailedHTMLProps<SgdsBreadcrumbItemProps, HTMLElement>;
|
|
1693
1693
|
"sgds-breadcrumb": React.DetailedHTMLProps<SgdsBreadcrumbProps, HTMLElement>;
|
|
1694
|
+
"sgds-button": React.DetailedHTMLProps<SgdsButtonProps, HTMLElement>;
|
|
1695
|
+
"sgds-card": React.DetailedHTMLProps<SgdsCardProps, HTMLElement>;
|
|
1694
1696
|
"sgds-checkbox-group": React.DetailedHTMLProps<SgdsCheckboxGroupProps, HTMLElement>;
|
|
1695
1697
|
"sgds-checkbox": React.DetailedHTMLProps<SgdsCheckboxProps, HTMLElement>;
|
|
1696
1698
|
"sgds-close-button": React.DetailedHTMLProps<SgdsCloseButtonProps, HTMLElement>;
|
|
@@ -1769,11 +1771,11 @@ declare global {
|
|
|
1769
1771
|
"sgds-accordion": HTMLElement;
|
|
1770
1772
|
"sgds-alert-link": HTMLElement;
|
|
1771
1773
|
"sgds-alert": HTMLElement;
|
|
1772
|
-
"sgds-button": HTMLElement;
|
|
1773
1774
|
"sgds-badge": HTMLElement;
|
|
1774
|
-
"sgds-card": HTMLElement;
|
|
1775
1775
|
"sgds-breadcrumb-item": HTMLElement;
|
|
1776
1776
|
"sgds-breadcrumb": HTMLElement;
|
|
1777
|
+
"sgds-button": HTMLElement;
|
|
1778
|
+
"sgds-card": HTMLElement;
|
|
1777
1779
|
"sgds-checkbox-group": HTMLElement;
|
|
1778
1780
|
"sgds-checkbox": HTMLElement;
|
|
1779
1781
|
"sgds-close-button": HTMLElement;
|