@sebgroup/green-core 1.71.1 → 1.72.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/components/details/details-icon/details-icon.component.d.ts +14 -0
- package/components/details/details-icon/details-icon.component.js +71 -0
- package/components/details/details-icon/details-icon.d.ts +2 -0
- package/components/details/details-icon/details-icon.js +6 -0
- package/components/details/details-icon/details-icon.style.d.ts +1 -0
- package/components/details/details-icon/details-icon.style.js +10 -0
- package/components/details/details.component.d.ts +46 -0
- package/components/details/details.component.js +185 -0
- package/components/details/details.d.ts +2 -0
- package/components/details/details.js +6 -0
- package/components/details/details.styles.d.ts +1 -0
- package/components/details/details.styles.js +112 -0
- package/components/details/index.d.ts +1 -0
- package/components/details/index.js +1 -0
- package/generated/react/backdrop/index.js +2 -1
- package/generated/react/badge/index.js +2 -1
- package/generated/react/button/index.js +2 -1
- package/generated/react/calendar/index.js +2 -1
- package/generated/react/card/index.js +2 -1
- package/generated/react/coachmark/index.js +2 -1
- package/generated/react/container/index.js +2 -1
- package/generated/react/context-menu/index.js +2 -1
- package/generated/react/datepicker/index.js +2 -1
- package/generated/react/details/index.d.ts +385 -0
- package/generated/react/details/index.js +13 -0
- package/generated/react/dialog/index.js +2 -1
- package/generated/react/div/index.js +2 -1
- package/generated/react/divider/index.js +2 -1
- package/generated/react/dropdown/index.js +2 -1
- package/generated/react/fab/index.js +2 -1
- package/generated/react/filter-chip/index.js +2 -1
- package/generated/react/filter-chips/index.js +2 -1
- package/generated/react/flex/index.js +2 -1
- package/generated/react/form-control-footer/index.js +2 -1
- package/generated/react/form-control-header/index.js +2 -1
- package/generated/react/grid/index.js +2 -1
- package/generated/react/grouped-list/index.js +2 -1
- package/generated/react/icons/icon/index.js +2 -1
- package/generated/react/icons/icon-airplane-up/index.js +2 -1
- package/generated/react/icons/icon-archive/index.js +2 -1
- package/generated/react/icons/icon-arrow/index.js +2 -1
- package/generated/react/icons/icon-arrow-box-left/index.js +2 -1
- package/generated/react/icons/icon-arrow-box-right/index.js +2 -1
- package/generated/react/icons/icon-arrow-down/index.js +2 -1
- package/generated/react/icons/icon-arrow-inbox/index.js +2 -1
- package/generated/react/icons/icon-arrow-left/index.js +2 -1
- package/generated/react/icons/icon-arrow-left-right/index.js +2 -1
- package/generated/react/icons/icon-arrow-out-of-box/index.js +2 -1
- package/generated/react/icons/icon-arrow-right/index.js +2 -1
- package/generated/react/icons/icon-arrow-right-circle/index.js +2 -1
- package/generated/react/icons/icon-arrow-right-down-circle/index.js +2 -1
- package/generated/react/icons/icon-arrow-right-up-circle/index.js +2 -1
- package/generated/react/icons/icon-arrow-rotate-clockwise/index.js +2 -1
- package/generated/react/icons/icon-arrow-rotate-counter-clockwise/index.js +2 -1
- package/generated/react/icons/icon-arrow-rotate-left-right/index.js +2 -1
- package/generated/react/icons/icon-arrow-rotate-right-left/index.js +2 -1
- package/generated/react/icons/icon-arrow-share-left/index.js +2 -1
- package/generated/react/icons/icon-arrow-share-right/index.js +2 -1
- package/generated/react/icons/icon-arrow-up/index.js +2 -1
- package/generated/react/icons/icon-arrow-wall-down/index.js +2 -1
- package/generated/react/icons/icon-arrow-wall-left/index.js +2 -1
- package/generated/react/icons/icon-arrow-wall-right/index.js +2 -1
- package/generated/react/icons/icon-arrow-wall-up/index.js +2 -1
- package/generated/react/icons/icon-arrows-repeat/index.js +2 -1
- package/generated/react/icons/icon-at/index.js +2 -1
- package/generated/react/icons/icon-back/index.js +2 -1
- package/generated/react/icons/icon-bag/index.js +2 -1
- package/generated/react/icons/icon-bank/index.js +2 -1
- package/generated/react/icons/icon-banknote/index.js +2 -1
- package/generated/react/icons/icon-barcode/index.js +2 -1
- package/generated/react/icons/icon-bars-three/index.js +2 -1
- package/generated/react/icons/icon-bars-two/index.js +2 -1
- package/generated/react/icons/icon-battery-loading/index.js +2 -1
- package/generated/react/icons/icon-bell/index.js +2 -1
- package/generated/react/icons/icon-block/index.js +2 -1
- package/generated/react/icons/icon-book/index.js +2 -1
- package/generated/react/icons/icon-bookmark/index.js +2 -1
- package/generated/react/icons/icon-bookmark-check/index.js +2 -1
- package/generated/react/icons/icon-bookmark-delete/index.js +2 -1
- package/generated/react/icons/icon-bookmark-plus/index.js +2 -1
- package/generated/react/icons/icon-bookmark-remove/index.js +2 -1
- package/generated/react/icons/icon-books/index.js +2 -1
- package/generated/react/icons/icon-brand-app-store/index.js +2 -1
- package/generated/react/icons/icon-brand-apple-music/index.js +2 -1
- package/generated/react/icons/icon-brand-bankid/index.js +2 -1
- package/generated/react/icons/icon-brand-chrome/index.js +2 -1
- package/generated/react/icons/icon-brand-facebook/index.js +2 -1
- package/generated/react/icons/icon-brand-figma/index.js +2 -1
- package/generated/react/icons/icon-brand-github/index.js +2 -1
- package/generated/react/icons/icon-brand-green/index.js +2 -1
- package/generated/react/icons/icon-brand-instagram/index.js +2 -1
- package/generated/react/icons/icon-brand-linkedin/index.js +2 -1
- package/generated/react/icons/icon-brand-play-store/index.js +2 -1
- package/generated/react/icons/icon-brand-rss-feed/index.js +2 -1
- package/generated/react/icons/icon-brand-seb/index.js +2 -1
- package/generated/react/icons/icon-brand-spotify/index.js +2 -1
- package/generated/react/icons/icon-brand-x/index.js +2 -1
- package/generated/react/icons/icon-brush/index.js +2 -1
- package/generated/react/icons/icon-bubble/index.js +2 -1
- package/generated/react/icons/icon-bubble-annotation/index.js +2 -1
- package/generated/react/icons/icon-bubble-dots/index.js +2 -1
- package/generated/react/icons/icon-bubble-question/index.js +2 -1
- package/generated/react/icons/icon-bubble-quotes/index.js +2 -1
- package/generated/react/icons/icon-bubble-text/index.js +2 -1
- package/generated/react/icons/icon-bubble-wide-annotation/index.js +2 -1
- package/generated/react/icons/icon-bubbles/index.js +2 -1
- package/generated/react/icons/icon-buildings/index.js +2 -1
- package/generated/react/icons/icon-cain-link/index.js +2 -1
- package/generated/react/icons/icon-calculator/index.js +2 -1
- package/generated/react/icons/icon-calendar/index.js +2 -1
- package/generated/react/icons/icon-calendar-check/index.js +2 -1
- package/generated/react/icons/icon-calender-add/index.js +2 -1
- package/generated/react/icons/icon-call/index.js +2 -1
- package/generated/react/icons/icon-car/index.js +2 -1
- package/generated/react/icons/icon-charging-station/index.js +2 -1
- package/generated/react/icons/icon-chart-one/index.js +2 -1
- package/generated/react/icons/icon-chart-presentation/index.js +2 -1
- package/generated/react/icons/icon-chart-two/index.js +2 -1
- package/generated/react/icons/icon-checklist/index.js +2 -1
- package/generated/react/icons/icon-checkmark/index.js +2 -1
- package/generated/react/icons/icon-chevron-bottom/index.js +2 -1
- package/generated/react/icons/icon-chevron-double-down/index.js +2 -1
- package/generated/react/icons/icon-chevron-double-left/index.js +2 -1
- package/generated/react/icons/icon-chevron-double-right/index.js +2 -1
- package/generated/react/icons/icon-chevron-double-up/index.js +2 -1
- package/generated/react/icons/icon-chevron-grabber-vertical/index.js +2 -1
- package/generated/react/icons/icon-chevron-left/index.js +2 -1
- package/generated/react/icons/icon-chevron-right/index.js +2 -1
- package/generated/react/icons/icon-chevron-top/index.js +2 -1
- package/generated/react/icons/icon-circle-check/index.js +2 -1
- package/generated/react/icons/icon-circle-info/index.js +2 -1
- package/generated/react/icons/icon-circle-minus/index.js +2 -1
- package/generated/react/icons/icon-circle-placeholder-on/index.js +2 -1
- package/generated/react/icons/icon-circle-plus/index.js +2 -1
- package/generated/react/icons/icon-circle-questionmark/index.js +2 -1
- package/generated/react/icons/icon-circle-x/index.js +2 -1
- package/generated/react/icons/icon-circles-three/index.js +2 -1
- package/generated/react/icons/icon-clock/index.js +2 -1
- package/generated/react/icons/icon-cloud-upload/index.js +2 -1
- package/generated/react/icons/icon-cloudy-sun/index.js +2 -1
- package/generated/react/icons/icon-compass-round/index.js +2 -1
- package/generated/react/icons/icon-credit-card/index.js +2 -1
- package/generated/react/icons/icon-cross-large/index.js +2 -1
- package/generated/react/icons/icon-cross-small/index.js +2 -1
- package/generated/react/icons/icon-cup-hot/index.js +2 -1
- package/generated/react/icons/icon-details/index.d.ts +367 -0
- package/generated/react/icons/icon-details/index.js +13 -0
- package/generated/react/icons/icon-devices/index.js +2 -1
- package/generated/react/icons/icon-direction/index.js +2 -1
- package/generated/react/icons/icon-dollar/index.js +2 -1
- package/generated/react/icons/icon-dot-grid-one-horizontal/index.js +2 -1
- package/generated/react/icons/icon-dot-grid-one-vertical/index.js +2 -1
- package/generated/react/icons/icon-dot-grid-three/index.js +2 -1
- package/generated/react/icons/icon-dot-grid-two/index.js +2 -1
- package/generated/react/icons/icon-email/index.js +2 -1
- package/generated/react/icons/icon-euro/index.js +2 -1
- package/generated/react/icons/icon-eye-open/index.js +2 -1
- package/generated/react/icons/icon-eye-slash/index.js +2 -1
- package/generated/react/icons/icon-fashion/index.js +2 -1
- package/generated/react/icons/icon-fast-forward/index.js +2 -1
- package/generated/react/icons/icon-file-bend/index.js +2 -1
- package/generated/react/icons/icon-file-chart/index.js +2 -1
- package/generated/react/icons/icon-file-text/index.js +2 -1
- package/generated/react/icons/icon-files/index.js +2 -1
- package/generated/react/icons/icon-filter/index.js +2 -1
- package/generated/react/icons/icon-flag/index.js +2 -1
- package/generated/react/icons/icon-floppy-disk/index.js +2 -1
- package/generated/react/icons/icon-focus/index.js +2 -1
- package/generated/react/icons/icon-focus-square/index.js +2 -1
- package/generated/react/icons/icon-folder/index.js +2 -1
- package/generated/react/icons/icon-folder-add-right/index.js +2 -1
- package/generated/react/icons/icon-folder-paper/index.js +2 -1
- package/generated/react/icons/icon-folder-upload/index.js +2 -1
- package/generated/react/icons/icon-globus/index.js +2 -1
- package/generated/react/icons/icon-graduate-cap/index.js +2 -1
- package/generated/react/icons/icon-group/index.js +2 -1
- package/generated/react/icons/icon-growth/index.js +2 -1
- package/generated/react/icons/icon-headphones/index.js +2 -1
- package/generated/react/icons/icon-heart/index.js +2 -1
- package/generated/react/icons/icon-heart-beat/index.js +2 -1
- package/generated/react/icons/icon-history/index.js +2 -1
- package/generated/react/icons/icon-home-energy-one/index.js +2 -1
- package/generated/react/icons/icon-home-energy-two/index.js +2 -1
- package/generated/react/icons/icon-home-open/index.js +2 -1
- package/generated/react/icons/icon-home-roof/index.js +2 -1
- package/generated/react/icons/icon-horizontal-alignment-bottom/index.js +2 -1
- package/generated/react/icons/icon-images/index.js +2 -1
- package/generated/react/icons/icon-invite/index.js +2 -1
- package/generated/react/icons/icon-knife-spoon/index.js +2 -1
- package/generated/react/icons/icon-law/index.js +2 -1
- package/generated/react/icons/icon-light-bulb/index.js +2 -1
- package/generated/react/icons/icon-light-bulb-simple/index.js +2 -1
- package/generated/react/icons/icon-lightning/index.js +2 -1
- package/generated/react/icons/icon-line-chart-four/index.js +2 -1
- package/generated/react/icons/icon-line-chart-one/index.js +2 -1
- package/generated/react/icons/icon-line-chart-three/index.js +2 -1
- package/generated/react/icons/icon-line-chart-two/index.js +2 -1
- package/generated/react/icons/icon-lock/index.js +2 -1
- package/generated/react/icons/icon-macbook-air/index.js +2 -1
- package/generated/react/icons/icon-magnifying-glass/index.js +2 -1
- package/generated/react/icons/icon-maintenance/index.js +2 -1
- package/generated/react/icons/icon-map-pin/index.js +2 -1
- package/generated/react/icons/icon-megaphone/index.js +2 -1
- package/generated/react/icons/icon-minus-large/index.js +2 -1
- package/generated/react/icons/icon-minus-small/index.js +2 -1
- package/generated/react/icons/icon-money-hand/index.js +2 -1
- package/generated/react/icons/icon-moneybag/index.js +2 -1
- package/generated/react/icons/icon-moon/index.js +2 -1
- package/generated/react/icons/icon-mute/index.js +2 -1
- package/generated/react/icons/icon-page-text/index.js +2 -1
- package/generated/react/icons/icon-paperclip/index.js +2 -1
- package/generated/react/icons/icon-pause/index.js +2 -1
- package/generated/react/icons/icon-pencel-line/index.js +2 -1
- package/generated/react/icons/icon-pencil-sparkle/index.js +2 -1
- package/generated/react/icons/icon-pencil-wave/index.js +2 -1
- package/generated/react/icons/icon-people/index.js +2 -1
- package/generated/react/icons/icon-people-add/index.js +2 -1
- package/generated/react/icons/icon-people-added/index.js +2 -1
- package/generated/react/icons/icon-people-circle/index.js +2 -1
- package/generated/react/icons/icon-people-copy/index.js +2 -1
- package/generated/react/icons/icon-people-profile/index.js +2 -1
- package/generated/react/icons/icon-people-remove/index.js +2 -1
- package/generated/react/icons/icon-percent/index.js +2 -1
- package/generated/react/icons/icon-phone/index.js +2 -1
- package/generated/react/icons/icon-phone-dynamic-island/index.js +2 -1
- package/generated/react/icons/icon-pie-chart/index.js +2 -1
- package/generated/react/icons/icon-piggy-bank/index.js +2 -1
- package/generated/react/icons/icon-pin/index.js +2 -1
- package/generated/react/icons/icon-pinch/index.js +2 -1
- package/generated/react/icons/icon-play/index.js +2 -1
- package/generated/react/icons/icon-play-circle/index.js +2 -1
- package/generated/react/icons/icon-plus-large/index.js +2 -1
- package/generated/react/icons/icon-plus-small/index.js +2 -1
- package/generated/react/icons/icon-poop/index.js +2 -1
- package/generated/react/icons/icon-power-plant/index.js +2 -1
- package/generated/react/icons/icon-printer/index.js +2 -1
- package/generated/react/icons/icon-push/index.js +2 -1
- package/generated/react/icons/icon-qr-code/index.js +2 -1
- package/generated/react/icons/icon-rainy/index.js +2 -1
- package/generated/react/icons/icon-raising-hand/index.js +2 -1
- package/generated/react/icons/icon-reading-list/index.js +2 -1
- package/generated/react/icons/icon-receipt-bill/index.js +2 -1
- package/generated/react/icons/icon-receiption-bell/index.js +2 -1
- package/generated/react/icons/icon-robot/index.js +2 -1
- package/generated/react/icons/icon-rocket/index.js +2 -1
- package/generated/react/icons/icon-school/index.js +2 -1
- package/generated/react/icons/icon-scissors/index.js +2 -1
- package/generated/react/icons/icon-search-menu/index.js +2 -1
- package/generated/react/icons/icon-seb/index.js +2 -1
- package/generated/react/icons/icon-settings-gear/index.js +2 -1
- package/generated/react/icons/icon-settings-slider-hor/index.js +2 -1
- package/generated/react/icons/icon-settings-slider-three/index.js +2 -1
- package/generated/react/icons/icon-settings-slider-ver/index.js +2 -1
- package/generated/react/icons/icon-share/index.js +2 -1
- package/generated/react/icons/icon-shopping-bag/index.js +2 -1
- package/generated/react/icons/icon-smartwatch/index.js +2 -1
- package/generated/react/icons/icon-solar/index.js +2 -1
- package/generated/react/icons/icon-solar-panel/index.js +2 -1
- package/generated/react/icons/icon-square-arrow-top-right/index.js +2 -1
- package/generated/react/icons/icon-square-behind-square/index.js +2 -1
- package/generated/react/icons/icon-square-check/index.js +2 -1
- package/generated/react/icons/icon-square-grid-circle/index.js +2 -1
- package/generated/react/icons/icon-square-info/index.js +2 -1
- package/generated/react/icons/icon-square-minus/index.js +2 -1
- package/generated/react/icons/icon-square-placeholder/index.js +2 -1
- package/generated/react/icons/icon-square-plus/index.js +2 -1
- package/generated/react/icons/icon-square-x/index.js +2 -1
- package/generated/react/icons/icon-star/index.js +2 -1
- package/generated/react/icons/icon-store/index.js +2 -1
- package/generated/react/icons/icon-suitcase-work/index.js +2 -1
- package/generated/react/icons/icon-sun/index.js +2 -1
- package/generated/react/icons/icon-tag/index.js +2 -1
- package/generated/react/icons/icon-television/index.js +2 -1
- package/generated/react/icons/icon-tennis/index.js +2 -1
- package/generated/react/icons/icon-text-edit/index.js +2 -1
- package/generated/react/icons/icon-thermostat/index.js +2 -1
- package/generated/react/icons/icon-thumbs-down/index.js +2 -1
- package/generated/react/icons/icon-thumbs-up/index.js +2 -1
- package/generated/react/icons/icon-todos/index.js +2 -1
- package/generated/react/icons/icon-trading-view-candles/index.js +2 -1
- package/generated/react/icons/icon-trash-can/index.js +2 -1
- package/generated/react/icons/icon-tree/index.js +2 -1
- package/generated/react/icons/icon-trending-four/index.js +2 -1
- package/generated/react/icons/icon-trending-one/index.js +2 -1
- package/generated/react/icons/icon-trending-three/index.js +2 -1
- package/generated/react/icons/icon-trending-two/index.js +2 -1
- package/generated/react/icons/icon-triangle-exclamation/index.js +2 -1
- package/generated/react/icons/icon-truck/index.js +2 -1
- package/generated/react/icons/icon-umbrella-security/index.js +2 -1
- package/generated/react/icons/icon-unlocked/index.js +2 -1
- package/generated/react/icons/icon-vertical-alignment-right/index.js +2 -1
- package/generated/react/icons/icon-volume-full/index.js +2 -1
- package/generated/react/icons/icon-volume-half/index.js +2 -1
- package/generated/react/icons/icon-volume-off/index.js +2 -1
- package/generated/react/icons/icon-wallet/index.js +2 -1
- package/generated/react/icons/icon-warning-sign/index.js +2 -1
- package/generated/react/icons/icon-zap/index.js +2 -1
- package/generated/react/icons/icon-zoom-in/index.js +2 -1
- package/generated/react/icons/icon-zoom-out/index.js +2 -1
- package/generated/react/img/index.js +2 -1
- package/generated/react/index.d.ts +6 -4
- package/generated/react/index.js +6 -4
- package/generated/react/input/index.js +2 -1
- package/generated/react/link/index.js +2 -1
- package/generated/react/list-item/index.js +2 -1
- package/generated/react/mask/index.js +2 -1
- package/generated/react/menu-button/index.js +2 -1
- package/generated/react/menu-item/index.js +2 -1
- package/generated/react/option/index.js +2 -1
- package/generated/react/popover/index.js +2 -1
- package/generated/react/radio/index.js +2 -1
- package/generated/react/radio-group/index.js +2 -1
- package/generated/react/rich-text/index.js +2 -1
- package/generated/react/segment/index.js +2 -1
- package/generated/react/segmented-control/index.js +2 -1
- package/generated/react/select/index.js +2 -1
- package/generated/react/signal/index.js +2 -1
- package/generated/react/spacer/index.js +2 -1
- package/generated/react/spinner/index.js +2 -1
- package/generated/react/text/index.js +2 -1
- package/generated/react/textarea/index.js +2 -1
- package/generated/react/theme/index.js +2 -1
- package/generated/react/video/index.js +2 -1
- package/package.json +4 -1
- package/tokens/dark.css.js +1 -1
- package/tokens/light.css.js +1 -1
- package/tokens/motion.css.js +1 -1
- package/tokens/shadow.css.js +1 -1
- package/tokens/size.css.js +1 -1
- package/tokens/text.css.js +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GdsElement } from '../../../gds-element';
|
|
2
|
+
/**
|
|
3
|
+
* @element gds-icon-details
|
|
4
|
+
* @status beta
|
|
5
|
+
*/
|
|
6
|
+
export declare class GdsIconDetails extends GdsElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
/**
|
|
9
|
+
* Controls if the details is open
|
|
10
|
+
*/
|
|
11
|
+
open: boolean;
|
|
12
|
+
render(): any;
|
|
13
|
+
updated(changedProperties: Map<string, any>): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass
|
|
3
|
+
} from "../../../chunks/chunk.QTSIPXV3.js";
|
|
4
|
+
import { property } from "lit/decorators.js";
|
|
5
|
+
import { GdsElement } from "../../../gds-element.js";
|
|
6
|
+
import {
|
|
7
|
+
gdsCustomElement,
|
|
8
|
+
html
|
|
9
|
+
} from "../../../utils/helpers/custom-element-scoping.js";
|
|
10
|
+
import { styles } from "./details-icon.style.js";
|
|
11
|
+
let GdsIconDetails = class extends GdsElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.open = false;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return html`
|
|
18
|
+
<svg
|
|
19
|
+
width="20"
|
|
20
|
+
height="20"
|
|
21
|
+
viewBox="0 0 20 20"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
strokeWidth="1.5"
|
|
24
|
+
strokeLinecap="round"
|
|
25
|
+
id="plus"
|
|
26
|
+
>
|
|
27
|
+
<line x1="4" y1="10" x2="16" y2="10" />
|
|
28
|
+
<line x1="10" y1="4" x2="10" y2="16">
|
|
29
|
+
<animate
|
|
30
|
+
attributeName="y1"
|
|
31
|
+
dur="240ms"
|
|
32
|
+
from="${this.open ? "4" : "10"}"
|
|
33
|
+
to="${this.open ? "10" : "4"}"
|
|
34
|
+
begin="plus.toggle"
|
|
35
|
+
fill="freeze"
|
|
36
|
+
/>
|
|
37
|
+
<animate
|
|
38
|
+
attributeName="y2"
|
|
39
|
+
dur="240ms"
|
|
40
|
+
from="${this.open ? "16" : "10"}"
|
|
41
|
+
to="${this.open ? "10" : "16"}"
|
|
42
|
+
begin="plus.toggle"
|
|
43
|
+
fill="freeze"
|
|
44
|
+
/>
|
|
45
|
+
</line>
|
|
46
|
+
</svg>
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
updated(changedProperties) {
|
|
50
|
+
if (changedProperties.has("open")) {
|
|
51
|
+
const svg = this.shadowRoot?.querySelector("svg");
|
|
52
|
+
if (svg) {
|
|
53
|
+
const event = new CustomEvent("toggle", {
|
|
54
|
+
bubbles: true,
|
|
55
|
+
composed: true
|
|
56
|
+
});
|
|
57
|
+
svg.dispatchEvent(event);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
GdsIconDetails.styles = [styles];
|
|
63
|
+
__decorateClass([
|
|
64
|
+
property({ type: Boolean, reflect: true })
|
|
65
|
+
], GdsIconDetails.prototype, "open", 2);
|
|
66
|
+
GdsIconDetails = __decorateClass([
|
|
67
|
+
gdsCustomElement("gds-icon-details")
|
|
68
|
+
], GdsIconDetails);
|
|
69
|
+
export {
|
|
70
|
+
GdsIconDetails
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GdsElement } from '../../gds-element';
|
|
2
|
+
export type DetailsSize = 'large' | 'small';
|
|
3
|
+
declare const GdsDetails_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").LayoutChildProps) & typeof GdsElement;
|
|
4
|
+
/**
|
|
5
|
+
* Details component that provides collapsible content sections.
|
|
6
|
+
*
|
|
7
|
+
* @element gds-details
|
|
8
|
+
* @status beta
|
|
9
|
+
*
|
|
10
|
+
* @slot - Default slot for details content
|
|
11
|
+
* @event gds-ui-state - Fired when details opens or closes
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <gds-details summary="Section Title">
|
|
16
|
+
* <p>Details content here</p>
|
|
17
|
+
* </gds-details>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class GdsDetails extends GdsDetails_base {
|
|
21
|
+
#private;
|
|
22
|
+
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
23
|
+
/**
|
|
24
|
+
* The summary text displayed in the details header
|
|
25
|
+
*/
|
|
26
|
+
summary: string;
|
|
27
|
+
/**
|
|
28
|
+
* Group identifier for details behavior synchronization
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Controls the expanded state of the details
|
|
33
|
+
*/
|
|
34
|
+
open: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Controls the size variant of the details
|
|
37
|
+
*/
|
|
38
|
+
size: DetailsSize;
|
|
39
|
+
private _content?;
|
|
40
|
+
private _openIconSlot?;
|
|
41
|
+
private _closedIconSlot?;
|
|
42
|
+
protected firstUpdated(): void;
|
|
43
|
+
private __handleOpenChange;
|
|
44
|
+
render(): any;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass,
|
|
3
|
+
__privateAdd,
|
|
4
|
+
__privateGet
|
|
5
|
+
} from "../../chunks/chunk.QTSIPXV3.js";
|
|
6
|
+
var _initializeContentHeight, _updateContentHeight, _handleToggle, _handleKeydown, _syncGroupState, _dispatchStateEvent, _renderHeader, _renderIconButton, _renderContent;
|
|
7
|
+
import { property, query } from "lit/decorators.js";
|
|
8
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
9
|
+
import { GdsElement } from "../../gds-element.js";
|
|
10
|
+
import { tokens } from "../../tokens.style.js";
|
|
11
|
+
import { watch } from "../../utils/decorators/watch.js";
|
|
12
|
+
import {
|
|
13
|
+
gdsCustomElement,
|
|
14
|
+
html
|
|
15
|
+
} from "../../utils/helpers/custom-element-scoping.js";
|
|
16
|
+
import {
|
|
17
|
+
withLayoutChildProps,
|
|
18
|
+
withMarginProps,
|
|
19
|
+
withSizeXProps
|
|
20
|
+
} from "../../utils/mixins/declarative-layout-mixins.js";
|
|
21
|
+
import { GdsButton } from "../button/button.component.js";
|
|
22
|
+
import { GdsIconDetails } from "./details-icon/details-icon.component.js";
|
|
23
|
+
import { styles } from "./details.styles.js";
|
|
24
|
+
let GdsDetails = class extends withSizeXProps(
|
|
25
|
+
withMarginProps(withLayoutChildProps(GdsElement))
|
|
26
|
+
) {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.summary = "";
|
|
30
|
+
this.name = "";
|
|
31
|
+
this.open = false;
|
|
32
|
+
this.size = "large";
|
|
33
|
+
__privateAdd(this, _initializeContentHeight, () => {
|
|
34
|
+
if (!this._content)
|
|
35
|
+
return;
|
|
36
|
+
__privateGet(this, _updateContentHeight).call(this);
|
|
37
|
+
});
|
|
38
|
+
__privateAdd(this, _updateContentHeight, () => {
|
|
39
|
+
if (!this._content)
|
|
40
|
+
return;
|
|
41
|
+
requestAnimationFrame(() => {
|
|
42
|
+
this._content?.style.setProperty(
|
|
43
|
+
"--_max-height",
|
|
44
|
+
this.open ? `${this._content.scrollHeight}px` : "0"
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
__privateAdd(this, _handleToggle, () => {
|
|
49
|
+
this.open = !this.open;
|
|
50
|
+
__privateGet(this, _dispatchStateEvent).call(this);
|
|
51
|
+
});
|
|
52
|
+
__privateAdd(this, _handleKeydown, (event) => {
|
|
53
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
__privateGet(this, _handleToggle).call(this);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
__privateAdd(this, _syncGroupState, () => {
|
|
59
|
+
if (!this.open || !this.name)
|
|
60
|
+
return;
|
|
61
|
+
document.querySelectorAll('[gds-element="gds-details"]').forEach((details) => {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
if (details !== this && details.name === this.name) {
|
|
64
|
+
const other = details;
|
|
65
|
+
other.open = false;
|
|
66
|
+
__privateGet(_a = other, _updateContentHeight).call(_a);
|
|
67
|
+
__privateGet(_b = other, _dispatchStateEvent).call(_b);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
__privateAdd(this, _dispatchStateEvent, () => {
|
|
72
|
+
this.dispatchEvent(
|
|
73
|
+
new CustomEvent("gds-ui-state", {
|
|
74
|
+
bubbles: true,
|
|
75
|
+
composed: true,
|
|
76
|
+
detail: this.open
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
__privateAdd(this, _renderHeader, () => {
|
|
81
|
+
return html`
|
|
82
|
+
<div
|
|
83
|
+
class="summary"
|
|
84
|
+
part="summary"
|
|
85
|
+
role="button"
|
|
86
|
+
tabindex="0"
|
|
87
|
+
@click=${__privateGet(this, _handleToggle)}
|
|
88
|
+
@keydown=${__privateGet(this, _handleKeydown)}
|
|
89
|
+
aria-expanded="${this.open}"
|
|
90
|
+
aria-controls="content-${this.name || "default"}"
|
|
91
|
+
>
|
|
92
|
+
<div id="summary-${this.name || "default"}" class="summary-label">
|
|
93
|
+
${this.summary || "Summary"}
|
|
94
|
+
</div>
|
|
95
|
+
${__privateGet(this, _renderIconButton).call(this)}
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
98
|
+
});
|
|
99
|
+
__privateAdd(this, _renderIconButton, () => {
|
|
100
|
+
return html`
|
|
101
|
+
<div class="summary-icon" role="presentation" aria-hidden="true">
|
|
102
|
+
<gds-button
|
|
103
|
+
rank="tertiary"
|
|
104
|
+
size=${this.size === "small" ? "xs" : "medium"}
|
|
105
|
+
role="presentation"
|
|
106
|
+
tabindex="-1"
|
|
107
|
+
>
|
|
108
|
+
<gds-icon-details .open=${this.open}></gds-icon-details>
|
|
109
|
+
</gds-button>
|
|
110
|
+
</div>
|
|
111
|
+
`;
|
|
112
|
+
});
|
|
113
|
+
__privateAdd(this, _renderContent, () => {
|
|
114
|
+
return html`
|
|
115
|
+
<div
|
|
116
|
+
id="content-${this.name || "default"}"
|
|
117
|
+
class="content"
|
|
118
|
+
aria-hidden="${!this.open}"
|
|
119
|
+
>
|
|
120
|
+
<slot></slot>
|
|
121
|
+
</div>
|
|
122
|
+
`;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
firstUpdated() {
|
|
126
|
+
__privateGet(this, _initializeContentHeight).call(this);
|
|
127
|
+
}
|
|
128
|
+
__handleOpenChange() {
|
|
129
|
+
__privateGet(this, _updateContentHeight).call(this);
|
|
130
|
+
__privateGet(this, _syncGroupState).call(this);
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
return html`
|
|
134
|
+
<div
|
|
135
|
+
class=${classMap({
|
|
136
|
+
details: true,
|
|
137
|
+
open: this.open,
|
|
138
|
+
small: this.size === "small"
|
|
139
|
+
})}
|
|
140
|
+
>
|
|
141
|
+
${__privateGet(this, _renderHeader).call(this)} ${__privateGet(this, _renderContent).call(this)}
|
|
142
|
+
</div>
|
|
143
|
+
`;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
_initializeContentHeight = new WeakMap();
|
|
147
|
+
_updateContentHeight = new WeakMap();
|
|
148
|
+
_handleToggle = new WeakMap();
|
|
149
|
+
_handleKeydown = new WeakMap();
|
|
150
|
+
_syncGroupState = new WeakMap();
|
|
151
|
+
_dispatchStateEvent = new WeakMap();
|
|
152
|
+
_renderHeader = new WeakMap();
|
|
153
|
+
_renderIconButton = new WeakMap();
|
|
154
|
+
_renderContent = new WeakMap();
|
|
155
|
+
GdsDetails.styles = [tokens, styles];
|
|
156
|
+
__decorateClass([
|
|
157
|
+
property({ type: String })
|
|
158
|
+
], GdsDetails.prototype, "summary", 2);
|
|
159
|
+
__decorateClass([
|
|
160
|
+
property({ type: String })
|
|
161
|
+
], GdsDetails.prototype, "name", 2);
|
|
162
|
+
__decorateClass([
|
|
163
|
+
property({ type: Boolean, reflect: true })
|
|
164
|
+
], GdsDetails.prototype, "open", 2);
|
|
165
|
+
__decorateClass([
|
|
166
|
+
property({ type: String })
|
|
167
|
+
], GdsDetails.prototype, "size", 2);
|
|
168
|
+
__decorateClass([
|
|
169
|
+
query(".content")
|
|
170
|
+
], GdsDetails.prototype, "_content", 2);
|
|
171
|
+
__decorateClass([
|
|
172
|
+
query('slot[name="summary-icon-open"]')
|
|
173
|
+
], GdsDetails.prototype, "_openIconSlot", 2);
|
|
174
|
+
__decorateClass([
|
|
175
|
+
query('slot[name="summary-icon-closed"]')
|
|
176
|
+
], GdsDetails.prototype, "_closedIconSlot", 2);
|
|
177
|
+
__decorateClass([
|
|
178
|
+
watch("open")
|
|
179
|
+
], GdsDetails.prototype, "__handleOpenChange", 1);
|
|
180
|
+
GdsDetails = __decorateClass([
|
|
181
|
+
gdsCustomElement("gds-details", { dependsOn: [GdsButton, GdsIconDetails] })
|
|
182
|
+
], GdsDetails);
|
|
183
|
+
export {
|
|
184
|
+
GdsDetails
|
|
185
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import "../../chunks/chunk.QTSIPXV3.js";
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
const styles = css`
|
|
4
|
+
@layer base, reset;
|
|
5
|
+
@layer base {
|
|
6
|
+
.details {
|
|
7
|
+
border-bottom: solid var(--gds-space-4xs)
|
|
8
|
+
var(--gds-color-l2-border-primary);
|
|
9
|
+
font-size: var(--gds-text-size-body-m);
|
|
10
|
+
line-height: var(--gds-text-line-height-body-m);
|
|
11
|
+
color: var(--gds-color-l2-content-secondary);
|
|
12
|
+
transition: border-color 240ms linear;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.summary {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
align-items: center;
|
|
19
|
+
list-style: none;
|
|
20
|
+
user-select: none;
|
|
21
|
+
outline-offset: var(--gds-space-2xs);
|
|
22
|
+
outline-color: currentColor;
|
|
23
|
+
transition: all 120ms;
|
|
24
|
+
color: var(--gds-color-l2-content-primary);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.summary-icon {
|
|
28
|
+
border-radius: var(--gds-space-max);
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
transition: all 280ms;
|
|
31
|
+
aspect-ratio: 1;
|
|
32
|
+
width: max-content;
|
|
33
|
+
height: max-content;
|
|
34
|
+
line-height: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.summary:focus {
|
|
38
|
+
outline-color: var(--gds-color-l3-content-tertiary);
|
|
39
|
+
|
|
40
|
+
&:not(:focus-visible) {
|
|
41
|
+
outline-color: transparent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (pointer: fine) {
|
|
46
|
+
.summary:is(:hover, :focus-within) .summary-icon {
|
|
47
|
+
background-color: color-mix(
|
|
48
|
+
in srgb,
|
|
49
|
+
transparent,
|
|
50
|
+
var(--gds-color-l3-states-light-hover)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.summary:active .summary-icon {
|
|
55
|
+
background-color: color-mix(
|
|
56
|
+
in srgb,
|
|
57
|
+
transparent,
|
|
58
|
+
var(--gds-color-l3-states-light-pressed)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.details:hover,
|
|
63
|
+
.details:focus-within {
|
|
64
|
+
border-color: var(--gds-color-l2-border-quaternary);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.summary-label {
|
|
69
|
+
font-size: var(--gds-text-size-heading-xs);
|
|
70
|
+
line-height: var(--gds-text-line-height-heading-xs);
|
|
71
|
+
font-weight: var(--gds-text-weight-regular);
|
|
72
|
+
padding-block: var(--gds-space-m);
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
flex: 1;
|
|
75
|
+
outline: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.details.small .summary-label {
|
|
79
|
+
font-size: var(--gds-text-size-heading-2xs);
|
|
80
|
+
line-height: var(--gds-text-line-height-heading-2xs);
|
|
81
|
+
padding-block: var(--gds-space-s);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.details.small .content {
|
|
85
|
+
font-size: var(--gds-text-size-heading-2xs);
|
|
86
|
+
line-height: var(--gds-text-line-height-heading-2xs);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.details:focus-visible {
|
|
90
|
+
border-radius: var(--gds-space-2xs);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.details.open .content {
|
|
94
|
+
display: flex;
|
|
95
|
+
padding-block-end: var(--gds-space-l);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.details.small.open .content {
|
|
99
|
+
padding-block-end: var(--gds-space-s);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.content {
|
|
103
|
+
max-height: var(--_max-height, 0);
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
transition: all 240ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
106
|
+
outline: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
export {
|
|
111
|
+
styles
|
|
112
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './details';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./details.js";
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsBackdrop = (props) => {
|
|
6
6
|
GdsBackdropClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-backdrop");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsBackdrop
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsBadge = (props) => {
|
|
6
6
|
GdsBadgeClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-badge");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsBadge
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsButton = (props) => {
|
|
6
6
|
GdsButtonClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-button");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsButton
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsCalendar = (props) => {
|
|
6
6
|
GdsCalendarClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-calendar");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsCalendar
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsCard = (props) => {
|
|
6
6
|
GdsCardClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-card");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsCard
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsCoachmark = (props) => {
|
|
6
6
|
GdsCoachmarkClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-coachmark");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsCoachmark
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsContainer = (props) => {
|
|
6
6
|
GdsContainerClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-container");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsContainer
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsContextMenu = (props) => {
|
|
6
6
|
GdsContextMenuClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-context-menu");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsContextMenu
|
|
@@ -5,7 +5,8 @@ import { createElement } from "react";
|
|
|
5
5
|
const GdsDatepicker = (props) => {
|
|
6
6
|
GdsDatepickerClass.define();
|
|
7
7
|
const JSXElement = getReactComponent("gds-datepicker");
|
|
8
|
-
|
|
8
|
+
const propsWithClass = { ...props, class: props.className };
|
|
9
|
+
return createElement(JSXElement, propsWithClass);
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
GdsDatepicker
|