@sebgroup/green-core 1.83.2 → 1.85.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/alert/alert.component.d.ts +60 -0
- package/components/alert/alert.component.js +273 -0
- package/components/alert/alert.d.ts +2 -0
- package/components/alert/alert.js +6 -0
- package/components/alert/alert.style.d.ts +1 -0
- package/components/alert/alert.style.js +159 -0
- package/components/alert/index.d.ts +1 -0
- package/components/alert/index.js +1 -0
- package/components/button/button.component.js +5 -7
- package/components/calendar/calendar.component.js +10 -15
- package/components/checkbox/checkbox-group/checkbox-group.component.js +4 -6
- package/components/checkbox/checkbox.component.js +8 -12
- package/components/coachmark/coachmark.component.js +5 -7
- package/components/datepicker/date-part-spinner.js +3 -5
- package/components/datepicker/datepicker.component.js +8 -12
- package/components/details/details.component.js +5 -7
- package/components/dialog/dialog.component.js +16 -31
- package/components/dialog/dialog.styles.js +7 -3
- package/components/dropdown/dropdown.component.js +17 -27
- package/components/filter-chips/filter-chips.component.js +5 -7
- package/components/form/form-control.js +7 -10
- package/components/input/input.component.js +12 -18
- package/components/popover/popover.component.js +9 -9
- package/components/radio/radio-group/radio-group.component.js +8 -12
- package/components/radio/radio.component.js +2 -2
- package/components/segmented-control/segmented-control.component.js +5 -7
- package/components/select/select.component.js +10 -14
- package/components/spinner/spinner.component.js +1 -1
- package/components/textarea/textarea.component.js +12 -18
- package/components/theme/theme.component.js +6 -10
- package/gds-element.d.ts +10 -0
- package/gds-element.js +35 -0
- package/generated/react/alert/index.d.ts +375 -0
- package/generated/react/alert/index.js +13 -0
- package/generated/react/backdrop/index.d.ts +50 -45
- package/generated/react/badge/index.d.ts +50 -45
- package/generated/react/blur/index.d.ts +50 -45
- package/generated/react/breadcrumbs/index.d.ts +50 -45
- package/generated/react/button/index.d.ts +51 -46
- package/generated/react/calendar/index.d.ts +49 -44
- package/generated/react/card/index.d.ts +50 -45
- package/generated/react/checkbox/index.d.ts +49 -44
- package/generated/react/checkbox-group/index.d.ts +49 -44
- package/generated/react/coachmark/index.d.ts +50 -45
- package/generated/react/container/index.d.ts +50 -45
- package/generated/react/context-menu/index.d.ts +50 -45
- package/generated/react/datepicker/index.d.ts +49 -44
- package/generated/react/details/index.d.ts +50 -45
- package/generated/react/dialog/index.d.ts +51 -46
- package/generated/react/div/index.d.ts +50 -45
- package/generated/react/divider/index.d.ts +50 -45
- package/generated/react/dropdown/index.d.ts +49 -44
- package/generated/react/fab/index.d.ts +51 -46
- package/generated/react/filter-chip/index.d.ts +50 -45
- package/generated/react/filter-chips/index.d.ts +49 -44
- package/generated/react/flex/index.d.ts +50 -45
- package/generated/react/form-control-footer/index.d.ts +50 -45
- package/generated/react/form-control-header/index.d.ts +50 -45
- package/generated/react/form-summary/index.d.ts +50 -45
- package/generated/react/formatted-account/index.d.ts +51 -46
- package/generated/react/formatted-date/index.d.ts +51 -46
- package/generated/react/formatted-number/index.d.ts +51 -46
- package/generated/react/grid/index.d.ts +50 -45
- package/generated/react/grouped-list/index.d.ts +50 -45
- package/generated/react/icons/icon/index.d.ts +50 -45
- package/generated/react/icons/icon-ai/index.d.ts +50 -45
- package/generated/react/icons/icon-airplane-up/index.d.ts +50 -45
- package/generated/react/icons/icon-archive/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-bottom-top/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-box-left/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-box-right/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-down/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-inbox/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-left/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-left-right/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-out-of-box/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-right/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-right-circle/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-right-down-circle/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-right-up-circle/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-rotate-clockwise/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-rotate-counter-clockwise/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-rotate-left-right/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-rotate-right-left/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-share-left/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-share-right/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-up/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-wall-down/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-wall-left/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-wall-right/index.d.ts +50 -45
- package/generated/react/icons/icon-arrow-wall-up/index.d.ts +50 -45
- package/generated/react/icons/icon-arrows-repeat/index.d.ts +50 -45
- package/generated/react/icons/icon-at/index.d.ts +50 -45
- package/generated/react/icons/icon-back/index.d.ts +50 -45
- package/generated/react/icons/icon-bag/index.d.ts +50 -45
- package/generated/react/icons/icon-bank/index.d.ts +50 -45
- package/generated/react/icons/icon-banknote/index.d.ts +50 -45
- package/generated/react/icons/icon-banknote-2/index.d.ts +50 -45
- package/generated/react/icons/icon-barcode/index.d.ts +50 -45
- package/generated/react/icons/icon-bars-three/index.d.ts +50 -45
- package/generated/react/icons/icon-bars-two/index.d.ts +50 -45
- package/generated/react/icons/icon-battery-loading/index.d.ts +50 -45
- package/generated/react/icons/icon-bell/index.d.ts +50 -45
- package/generated/react/icons/icon-block/index.d.ts +50 -45
- package/generated/react/icons/icon-book/index.d.ts +50 -45
- package/generated/react/icons/icon-bookmark/index.d.ts +50 -45
- package/generated/react/icons/icon-bookmark-check/index.d.ts +50 -45
- package/generated/react/icons/icon-bookmark-delete/index.d.ts +50 -45
- package/generated/react/icons/icon-bookmark-plus/index.d.ts +50 -45
- package/generated/react/icons/icon-bookmark-remove/index.d.ts +50 -45
- package/generated/react/icons/icon-books/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-app-store/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-apple-music/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-bankid/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-chrome/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-facebook/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-figma/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-firefox/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-github/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-green/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-instagram/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-linkedin/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-play-store/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-rss-feed/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-seb/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-spotify/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-storybook/index.d.ts +50 -45
- package/generated/react/icons/icon-brand-x/index.d.ts +50 -45
- package/generated/react/icons/icon-brush/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble-annotation/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble-dots/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble-question/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble-quotes/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble-text/index.d.ts +50 -45
- package/generated/react/icons/icon-bubble-wide-annotation/index.d.ts +50 -45
- package/generated/react/icons/icon-bubbles/index.d.ts +50 -45
- package/generated/react/icons/icon-buildings/index.d.ts +50 -45
- package/generated/react/icons/icon-cain-link/index.d.ts +50 -45
- package/generated/react/icons/icon-calculator/index.d.ts +50 -45
- package/generated/react/icons/icon-calendar/index.d.ts +50 -45
- package/generated/react/icons/icon-calendar-check/index.d.ts +50 -45
- package/generated/react/icons/icon-calender-add/index.d.ts +50 -45
- package/generated/react/icons/icon-call/index.d.ts +50 -45
- package/generated/react/icons/icon-car/index.d.ts +50 -45
- package/generated/react/icons/icon-chain-link/index.d.ts +50 -45
- package/generated/react/icons/icon-chain-link-broken/index.d.ts +50 -45
- package/generated/react/icons/icon-charging-station/index.d.ts +50 -45
- package/generated/react/icons/icon-chart-one/index.d.ts +50 -45
- package/generated/react/icons/icon-chart-presentation/index.d.ts +50 -45
- package/generated/react/icons/icon-chart-two/index.d.ts +50 -45
- package/generated/react/icons/icon-checklist/index.d.ts +50 -45
- package/generated/react/icons/icon-checkmark/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-bottom/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-double-down/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-double-left/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-double-right/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-double-up/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-grabber-vertical/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-left/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-right/index.d.ts +50 -45
- package/generated/react/icons/icon-chevron-top/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-check/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-info/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-minus/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-placeholder-on/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-plus/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-questionmark/index.d.ts +50 -45
- package/generated/react/icons/icon-circle-x/index.d.ts +50 -45
- package/generated/react/icons/icon-circles-three/index.d.ts +50 -45
- package/generated/react/icons/icon-clock/index.d.ts +50 -45
- package/generated/react/icons/icon-cloud-download/index.d.ts +50 -45
- package/generated/react/icons/icon-cloud-upload/index.d.ts +50 -45
- package/generated/react/icons/icon-cloudy-sun/index.d.ts +50 -45
- package/generated/react/icons/icon-compass-round/index.d.ts +50 -45
- package/generated/react/icons/icon-cookies/index.d.ts +50 -45
- package/generated/react/icons/icon-copy/index.d.ts +50 -45
- package/generated/react/icons/icon-credit-card/index.d.ts +50 -45
- package/generated/react/icons/icon-cross-large/index.d.ts +50 -45
- package/generated/react/icons/icon-cross-small/index.d.ts +50 -45
- package/generated/react/icons/icon-cup-hot/index.d.ts +50 -45
- package/generated/react/icons/icon-details/index.d.ts +50 -45
- package/generated/react/icons/icon-devices/index.d.ts +50 -45
- package/generated/react/icons/icon-direction/index.d.ts +50 -45
- package/generated/react/icons/icon-dollar/index.d.ts +50 -45
- package/generated/react/icons/icon-dot-grid-one-horizontal/index.d.ts +50 -45
- package/generated/react/icons/icon-dot-grid-one-vertical/index.d.ts +50 -45
- package/generated/react/icons/icon-dot-grid-three/index.d.ts +50 -45
- package/generated/react/icons/icon-dot-grid-two/index.d.ts +50 -45
- package/generated/react/icons/icon-email/index.d.ts +50 -45
- package/generated/react/icons/icon-euro/index.d.ts +50 -45
- package/generated/react/icons/icon-eye-open/index.d.ts +50 -45
- package/generated/react/icons/icon-eye-slash/index.d.ts +50 -45
- package/generated/react/icons/icon-fashion/index.d.ts +50 -45
- package/generated/react/icons/icon-fast-forward/index.d.ts +50 -45
- package/generated/react/icons/icon-file-bend/index.d.ts +50 -45
- package/generated/react/icons/icon-file-chart/index.d.ts +50 -45
- package/generated/react/icons/icon-file-text/index.d.ts +50 -45
- package/generated/react/icons/icon-files/index.d.ts +50 -45
- package/generated/react/icons/icon-filter/index.d.ts +50 -45
- package/generated/react/icons/icon-flag/index.d.ts +50 -45
- package/generated/react/icons/icon-floppy-disk/index.d.ts +50 -45
- package/generated/react/icons/icon-focus/index.d.ts +50 -45
- package/generated/react/icons/icon-focus-square/index.d.ts +50 -45
- package/generated/react/icons/icon-folder/index.d.ts +50 -45
- package/generated/react/icons/icon-folder-add-right/index.d.ts +50 -45
- package/generated/react/icons/icon-folder-paper/index.d.ts +50 -45
- package/generated/react/icons/icon-folder-upload/index.d.ts +50 -45
- package/generated/react/icons/icon-fullscreen/index.d.ts +50 -45
- package/generated/react/icons/icon-globus/index.d.ts +50 -45
- package/generated/react/icons/icon-graduate-cap/index.d.ts +50 -45
- package/generated/react/icons/icon-green-power/index.d.ts +50 -45
- package/generated/react/icons/icon-group/index.d.ts +50 -45
- package/generated/react/icons/icon-growth/index.d.ts +50 -45
- package/generated/react/icons/icon-headphones/index.d.ts +50 -45
- package/generated/react/icons/icon-heart/index.d.ts +50 -45
- package/generated/react/icons/icon-heart-beat/index.d.ts +50 -45
- package/generated/react/icons/icon-history/index.d.ts +50 -45
- package/generated/react/icons/icon-home-energy-one/index.d.ts +50 -45
- package/generated/react/icons/icon-home-energy-two/index.d.ts +50 -45
- package/generated/react/icons/icon-home-open/index.d.ts +50 -45
- package/generated/react/icons/icon-home-roof/index.d.ts +50 -45
- package/generated/react/icons/icon-horizontal-alignment-bottom/index.d.ts +50 -45
- package/generated/react/icons/icon-images/index.d.ts +50 -45
- package/generated/react/icons/icon-industry/index.d.ts +50 -45
- package/generated/react/icons/icon-invite/index.d.ts +50 -45
- package/generated/react/icons/icon-knife-spoon/index.d.ts +50 -45
- package/generated/react/icons/icon-lab/index.d.ts +50 -45
- package/generated/react/icons/icon-law/index.d.ts +50 -45
- package/generated/react/icons/icon-leisure/index.d.ts +50 -45
- package/generated/react/icons/icon-light-bulb/index.d.ts +50 -45
- package/generated/react/icons/icon-light-bulb-simple/index.d.ts +50 -45
- package/generated/react/icons/icon-lightning/index.d.ts +50 -45
- package/generated/react/icons/icon-line-chart-four/index.d.ts +50 -45
- package/generated/react/icons/icon-line-chart-one/index.d.ts +50 -45
- package/generated/react/icons/icon-line-chart-three/index.d.ts +50 -45
- package/generated/react/icons/icon-line-chart-two/index.d.ts +50 -45
- package/generated/react/icons/icon-lock/index.d.ts +50 -45
- package/generated/react/icons/icon-macbook-air/index.d.ts +50 -45
- package/generated/react/icons/icon-magnifying-glass/index.d.ts +50 -45
- package/generated/react/icons/icon-maintenance/index.d.ts +50 -45
- package/generated/react/icons/icon-map-pin/index.d.ts +50 -45
- package/generated/react/icons/icon-megaphone/index.d.ts +50 -45
- package/generated/react/icons/icon-menu-sidebar/index.d.ts +50 -45
- package/generated/react/icons/icon-minus-large/index.d.ts +50 -45
- package/generated/react/icons/icon-minus-small/index.d.ts +50 -45
- package/generated/react/icons/icon-money-hand/index.d.ts +50 -45
- package/generated/react/icons/icon-moneybag/index.d.ts +50 -45
- package/generated/react/icons/icon-moon/index.d.ts +50 -45
- package/generated/react/icons/icon-mute/index.d.ts +50 -45
- package/generated/react/icons/icon-office/index.d.ts +50 -45
- package/generated/react/icons/icon-other/index.d.ts +50 -45
- package/generated/react/icons/icon-page-add/index.d.ts +50 -45
- package/generated/react/icons/icon-page-text/index.d.ts +50 -45
- package/generated/react/icons/icon-paperclip/index.d.ts +50 -45
- package/generated/react/icons/icon-pause/index.d.ts +50 -45
- package/generated/react/icons/icon-pencel-line/index.d.ts +50 -45
- package/generated/react/icons/icon-pencil-sign/index.d.ts +50 -45
- package/generated/react/icons/icon-pencil-sparkle/index.d.ts +50 -45
- package/generated/react/icons/icon-pencil-wave/index.d.ts +50 -45
- package/generated/react/icons/icon-pension/index.d.ts +50 -45
- package/generated/react/icons/icon-people/index.d.ts +50 -45
- package/generated/react/icons/icon-people-a11y/index.d.ts +50 -45
- package/generated/react/icons/icon-people-add/index.d.ts +50 -45
- package/generated/react/icons/icon-people-added/index.d.ts +50 -45
- package/generated/react/icons/icon-people-circle/index.d.ts +50 -45
- package/generated/react/icons/icon-people-copy/index.d.ts +50 -45
- package/generated/react/icons/icon-people-profile/index.d.ts +50 -45
- package/generated/react/icons/icon-people-remove/index.d.ts +50 -45
- package/generated/react/icons/icon-percent/index.d.ts +50 -45
- package/generated/react/icons/icon-phone/index.d.ts +50 -45
- package/generated/react/icons/icon-phone-dynamic-island/index.d.ts +50 -45
- package/generated/react/icons/icon-pie-chart/index.d.ts +50 -45
- package/generated/react/icons/icon-piggy-bank/index.d.ts +50 -45
- package/generated/react/icons/icon-pin/index.d.ts +50 -45
- package/generated/react/icons/icon-pinch/index.d.ts +50 -45
- package/generated/react/icons/icon-play/index.d.ts +50 -45
- package/generated/react/icons/icon-play-circle/index.d.ts +50 -45
- package/generated/react/icons/icon-plus-large/index.d.ts +50 -45
- package/generated/react/icons/icon-plus-small/index.d.ts +50 -45
- package/generated/react/icons/icon-poop/index.d.ts +50 -45
- package/generated/react/icons/icon-pound/index.d.ts +50 -45
- package/generated/react/icons/icon-power-plant/index.d.ts +50 -45
- package/generated/react/icons/icon-printer/index.d.ts +50 -45
- package/generated/react/icons/icon-push/index.d.ts +50 -45
- package/generated/react/icons/icon-qr-code/index.d.ts +50 -45
- package/generated/react/icons/icon-rainy/index.d.ts +50 -45
- package/generated/react/icons/icon-raising-hand/index.d.ts +50 -45
- package/generated/react/icons/icon-reading-list/index.d.ts +50 -45
- package/generated/react/icons/icon-receipt-bill/index.d.ts +50 -45
- package/generated/react/icons/icon-receiption-bell/index.d.ts +50 -45
- package/generated/react/icons/icon-refund/index.d.ts +50 -45
- package/generated/react/icons/icon-robot/index.d.ts +50 -45
- package/generated/react/icons/icon-rocket/index.d.ts +50 -45
- package/generated/react/icons/icon-safari/index.d.ts +50 -45
- package/generated/react/icons/icon-school/index.d.ts +50 -45
- package/generated/react/icons/icon-scissors/index.d.ts +50 -45
- package/generated/react/icons/icon-search-menu/index.d.ts +50 -45
- package/generated/react/icons/icon-seb/index.d.ts +50 -45
- package/generated/react/icons/icon-settings-gear/index.d.ts +50 -45
- package/generated/react/icons/icon-settings-slider-hor/index.d.ts +50 -45
- package/generated/react/icons/icon-settings-slider-three/index.d.ts +50 -45
- package/generated/react/icons/icon-settings-slider-ver/index.d.ts +50 -45
- package/generated/react/icons/icon-share/index.d.ts +50 -45
- package/generated/react/icons/icon-shopping-bag/index.d.ts +50 -45
- package/generated/react/icons/icon-smartwatch/index.d.ts +50 -45
- package/generated/react/icons/icon-solar/index.d.ts +50 -45
- package/generated/react/icons/icon-solar-panel/index.d.ts +50 -45
- package/generated/react/icons/icon-sort/index.d.ts +50 -45
- package/generated/react/icons/icon-square-arrow-top-right/index.d.ts +50 -45
- package/generated/react/icons/icon-square-behind-square/index.d.ts +50 -45
- package/generated/react/icons/icon-square-check/index.d.ts +50 -45
- package/generated/react/icons/icon-square-grid-circle/index.d.ts +50 -45
- package/generated/react/icons/icon-square-info/index.d.ts +50 -45
- package/generated/react/icons/icon-square-minus/index.d.ts +50 -45
- package/generated/react/icons/icon-square-placeholder/index.d.ts +50 -45
- package/generated/react/icons/icon-square-plus/index.d.ts +50 -45
- package/generated/react/icons/icon-square-x/index.d.ts +50 -45
- package/generated/react/icons/icon-star/index.d.ts +50 -45
- package/generated/react/icons/icon-store/index.d.ts +50 -45
- package/generated/react/icons/icon-suitcase-work/index.d.ts +50 -45
- package/generated/react/icons/icon-sun/index.d.ts +50 -45
- package/generated/react/icons/icon-sunset-arrow-down/index.d.ts +50 -45
- package/generated/react/icons/icon-tag/index.d.ts +50 -45
- package/generated/react/icons/icon-television/index.d.ts +50 -45
- package/generated/react/icons/icon-tennis/index.d.ts +50 -45
- package/generated/react/icons/icon-text-edit/index.d.ts +50 -45
- package/generated/react/icons/icon-thermostat/index.d.ts +50 -45
- package/generated/react/icons/icon-thumbs-down/index.d.ts +50 -45
- package/generated/react/icons/icon-thumbs-up/index.d.ts +50 -45
- package/generated/react/icons/icon-todos/index.d.ts +50 -45
- package/generated/react/icons/icon-trading-view-candles/index.d.ts +50 -45
- package/generated/react/icons/icon-trash-can/index.d.ts +50 -45
- package/generated/react/icons/icon-tree/index.d.ts +50 -45
- package/generated/react/icons/icon-trending-four/index.d.ts +50 -45
- package/generated/react/icons/icon-trending-one/index.d.ts +50 -45
- package/generated/react/icons/icon-trending-three/index.d.ts +50 -45
- package/generated/react/icons/icon-trending-two/index.d.ts +50 -45
- package/generated/react/icons/icon-triangle-exclamation/index.d.ts +50 -45
- package/generated/react/icons/icon-truck/index.d.ts +50 -45
- package/generated/react/icons/icon-umbrella-security/index.d.ts +50 -45
- package/generated/react/icons/icon-unlocked/index.d.ts +50 -45
- package/generated/react/icons/icon-vertical-alignment-right/index.d.ts +50 -45
- package/generated/react/icons/icon-volume-full/index.d.ts +50 -45
- package/generated/react/icons/icon-volume-half/index.d.ts +50 -45
- package/generated/react/icons/icon-volume-off/index.d.ts +50 -45
- package/generated/react/icons/icon-wallet/index.d.ts +50 -45
- package/generated/react/icons/icon-warning-sign/index.d.ts +50 -45
- package/generated/react/icons/icon-youtube/index.d.ts +50 -45
- package/generated/react/icons/icon-zap/index.d.ts +50 -45
- package/generated/react/icons/icon-zoom-in/index.d.ts +50 -45
- package/generated/react/icons/icon-zoom-out/index.d.ts +50 -45
- package/generated/react/img/index.d.ts +50 -45
- package/generated/react/index.d.ts +4 -3
- package/generated/react/index.js +4 -3
- package/generated/react/input/index.d.ts +55 -50
- package/generated/react/link/index.d.ts +51 -46
- package/generated/react/list-item/index.d.ts +50 -45
- package/generated/react/mask/index.d.ts +50 -45
- package/generated/react/menu-button/index.d.ts +51 -46
- package/generated/react/menu-item/index.d.ts +50 -45
- package/generated/react/option/index.d.ts +50 -45
- package/generated/react/popover/index.d.ts +51 -56
- package/generated/react/radio/index.d.ts +50 -45
- package/generated/react/radio-group/index.d.ts +49 -44
- package/generated/react/rich-text/index.d.ts +40 -35
- package/generated/react/segment/index.d.ts +50 -45
- package/generated/react/segmented-control/index.d.ts +50 -45
- package/generated/react/select/index.d.ts +49 -44
- package/generated/react/sensitive-account/index.d.ts +51 -46
- package/generated/react/sensitive-date/index.d.ts +51 -46
- package/generated/react/sensitive-number/index.d.ts +51 -46
- package/generated/react/signal/index.d.ts +50 -45
- package/generated/react/spacer/index.d.ts +50 -45
- package/generated/react/spinner/index.d.ts +50 -45
- package/generated/react/text/index.d.ts +50 -45
- package/generated/react/textarea/index.d.ts +52 -47
- package/generated/react/theme/index.d.ts +50 -45
- package/generated/react/video/index.d.ts +50 -45
- package/package.json +3 -1
- package/primitives/form-control-header/form-control-header.component.js +5 -7
- package/primitives/listbox/listbox.component.js +4 -6
- package/primitives/listbox/option.component.js +7 -9
- package/primitives/menu/menu-item.component.js +4 -6
- package/shared-styles/rbcb-toggle.template.d.ts +2 -2
- package/utils/helpers/custom-element-scoping.js +1 -1
- package/utils/localization/localization.d.ts +2 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { GdsElement } from '../../gds-element';
|
|
3
|
+
/**
|
|
4
|
+
* @element gds-alert
|
|
5
|
+
*
|
|
6
|
+
* Alert component with responsive layout, optional icon, dismiss functionality,
|
|
7
|
+
* auto-dismiss timer, and action button support.
|
|
8
|
+
* @status beta
|
|
9
|
+
*
|
|
10
|
+
* @slot - Alert message content
|
|
11
|
+
* @fires gds-close - Fired when alert is dismissed
|
|
12
|
+
* @fires gds-action - Fired when action button is clicked
|
|
13
|
+
*/
|
|
14
|
+
export declare class GdsAlert extends GdsElement {
|
|
15
|
+
#private;
|
|
16
|
+
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
17
|
+
/**
|
|
18
|
+
* The variant of the alert, which determines its appearance and icon.
|
|
19
|
+
*/
|
|
20
|
+
variant: 'information' | 'notice' | 'positive' | 'warning' | 'negative';
|
|
21
|
+
/**
|
|
22
|
+
* The label for the alert, used for accessibility purposes.
|
|
23
|
+
* This needs be set to something relevant to the content of the alert.
|
|
24
|
+
*/
|
|
25
|
+
label: string;
|
|
26
|
+
/**
|
|
27
|
+
* The role of the alert, which can be 'alert' or 'status'.
|
|
28
|
+
* 'alert' is used for critical messages that require immediate attention,
|
|
29
|
+
* while 'status' is for informational messages. These corresponds to the
|
|
30
|
+
* ARIA roles, which you can read more about on MDN:
|
|
31
|
+
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role
|
|
32
|
+
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/status_role
|
|
33
|
+
*/
|
|
34
|
+
role: 'alert' | 'status';
|
|
35
|
+
/**
|
|
36
|
+
* The dismissibility of the alert, which determines whether it can be closed by the user.
|
|
37
|
+
*/
|
|
38
|
+
dismissible: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The time in milliseconds after which the alert will automatically dismiss itself.
|
|
41
|
+
* Set to 0 to disable auto-dismiss.
|
|
42
|
+
*/
|
|
43
|
+
timeout: number;
|
|
44
|
+
/**
|
|
45
|
+
* The text for the action button, if provided.
|
|
46
|
+
* If not set, no action button will be rendered.
|
|
47
|
+
*/
|
|
48
|
+
buttonLabel: string;
|
|
49
|
+
private _progress;
|
|
50
|
+
private _isClosing;
|
|
51
|
+
private _cardHidden;
|
|
52
|
+
constructor();
|
|
53
|
+
protected updated(changed: PropertyValues): void;
|
|
54
|
+
render(): any;
|
|
55
|
+
}
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'gds-alert': GdsAlert;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass,
|
|
3
|
+
__privateAdd,
|
|
4
|
+
__privateGet,
|
|
5
|
+
__privateMethod,
|
|
6
|
+
__privateSet
|
|
7
|
+
} from "../../chunks/chunk.QTSIPXV3.js";
|
|
8
|
+
var _timeoutId, _progressIntervalId, _alertRef, _timerController, _startTimer, startTimer_fn, _clearTimers, clearTimers_fn, _dismiss, dismiss_fn, _handleButtonClick, handleButtonClick_fn, _handleKeyDown, handleKeyDown_fn, _config, config_get, _renderIcon, renderIcon_fn, _renderMessage, renderMessage_fn, _renderActionButton, renderActionButton_fn, _renderCloseButton, renderCloseButton_fn, _renderTimerBar, renderTimerBar_fn;
|
|
9
|
+
import { localized, msg } from "@lit/localize";
|
|
10
|
+
import { nothing } from "lit";
|
|
11
|
+
import { property, state } from "lit/decorators.js";
|
|
12
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
13
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
14
|
+
import { html as staticHtml, unsafeStatic } from "lit/static-html.js";
|
|
15
|
+
import { GdsElement } from "../../gds-element.js";
|
|
16
|
+
import { gdsCustomElement, html } from "../../scoping.js";
|
|
17
|
+
import { tokens } from "../../tokens.style.js";
|
|
18
|
+
import { GdsButton } from "../button/button.component.js";
|
|
19
|
+
import { GdsCard } from "../card/card.component.js";
|
|
20
|
+
import { IconCircleCheck } from "../icon/icons/circle-check.component.js";
|
|
21
|
+
import { IconCircleInfo } from "../icon/icons/circle-info.js";
|
|
22
|
+
import { IconCrossSmall } from "../icon/icons/cross-small.js";
|
|
23
|
+
import { IconTriangleExclamation } from "../icon/icons/triangle-exclamation.js";
|
|
24
|
+
import { alertStyles } from "./alert.style.js";
|
|
25
|
+
const VARIANT_CONFIG = {
|
|
26
|
+
positive: { icon: "circle-check", card: "positive" },
|
|
27
|
+
warning: {
|
|
28
|
+
icon: "triangle-exclamation",
|
|
29
|
+
card: "warning"
|
|
30
|
+
},
|
|
31
|
+
negative: {
|
|
32
|
+
icon: "triangle-exclamation",
|
|
33
|
+
card: "negative"
|
|
34
|
+
},
|
|
35
|
+
information: {
|
|
36
|
+
icon: "circle-info",
|
|
37
|
+
card: "information"
|
|
38
|
+
},
|
|
39
|
+
notice: { icon: "circle-info", card: "notice" }
|
|
40
|
+
};
|
|
41
|
+
const FADE_DURATION = 300;
|
|
42
|
+
const PROGRESS_INTERVAL = 100;
|
|
43
|
+
let GdsAlert = class extends GdsElement {
|
|
44
|
+
constructor() {
|
|
45
|
+
super();
|
|
46
|
+
// Timer management
|
|
47
|
+
__privateAdd(this, _startTimer);
|
|
48
|
+
__privateAdd(this, _clearTimers);
|
|
49
|
+
__privateAdd(this, _dismiss);
|
|
50
|
+
// Event handlers
|
|
51
|
+
__privateAdd(this, _handleButtonClick);
|
|
52
|
+
__privateAdd(this, _handleKeyDown);
|
|
53
|
+
// Helpers
|
|
54
|
+
__privateAdd(this, _config);
|
|
55
|
+
// Render methods
|
|
56
|
+
__privateAdd(this, _renderIcon);
|
|
57
|
+
__privateAdd(this, _renderMessage);
|
|
58
|
+
__privateAdd(this, _renderActionButton);
|
|
59
|
+
__privateAdd(this, _renderCloseButton);
|
|
60
|
+
__privateAdd(this, _renderTimerBar);
|
|
61
|
+
this.variant = "information";
|
|
62
|
+
this.label = "";
|
|
63
|
+
this.role = "alert";
|
|
64
|
+
this.dismissible = false;
|
|
65
|
+
this.timeout = 0;
|
|
66
|
+
this.buttonLabel = "";
|
|
67
|
+
this._progress = 100;
|
|
68
|
+
this._isClosing = false;
|
|
69
|
+
this._cardHidden = false;
|
|
70
|
+
__privateAdd(this, _timeoutId, void 0);
|
|
71
|
+
__privateAdd(this, _progressIntervalId, void 0);
|
|
72
|
+
__privateAdd(this, _alertRef, createRef());
|
|
73
|
+
__privateAdd(this, _timerController, {
|
|
74
|
+
hostConnected: () => {
|
|
75
|
+
if (this.timeout > 0)
|
|
76
|
+
__privateMethod(this, _startTimer, startTimer_fn).call(this);
|
|
77
|
+
},
|
|
78
|
+
hostDisconnected: () => __privateMethod(this, _clearTimers, clearTimers_fn).call(this)
|
|
79
|
+
});
|
|
80
|
+
this.addController(__privateGet(this, _timerController));
|
|
81
|
+
}
|
|
82
|
+
updated(changed) {
|
|
83
|
+
if (changed.has("timeout")) {
|
|
84
|
+
__privateMethod(this, _clearTimers, clearTimers_fn).call(this);
|
|
85
|
+
if (this.timeout > 0)
|
|
86
|
+
__privateMethod(this, _startTimer, startTimer_fn).call(this);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
if (this._cardHidden)
|
|
91
|
+
return nothing;
|
|
92
|
+
const classes = {
|
|
93
|
+
dismissing: this._isClosing,
|
|
94
|
+
dismissible: this.dismissible
|
|
95
|
+
};
|
|
96
|
+
return html`
|
|
97
|
+
<gds-card
|
|
98
|
+
${ref(__privateGet(this, _alertRef))}
|
|
99
|
+
role=${this.role}
|
|
100
|
+
aria-label=${this.label}
|
|
101
|
+
variant=${__privateGet(this, _config, config_get).card}
|
|
102
|
+
class=${classMap(classes)}
|
|
103
|
+
@keydown=${__privateMethod(this, _handleKeyDown, handleKeyDown_fn)}
|
|
104
|
+
id="alert-message"
|
|
105
|
+
padding="m"
|
|
106
|
+
>
|
|
107
|
+
${__privateMethod(this, _renderIcon, renderIcon_fn).call(this)} ${__privateMethod(this, _renderMessage, renderMessage_fn).call(this)}
|
|
108
|
+
${this.buttonLabel ? __privateMethod(this, _renderActionButton, renderActionButton_fn).call(this, this.buttonLabel) : nothing}
|
|
109
|
+
${__privateMethod(this, _renderCloseButton, renderCloseButton_fn).call(this)} ${__privateMethod(this, _renderTimerBar, renderTimerBar_fn).call(this)}
|
|
110
|
+
</gds-card>
|
|
111
|
+
`;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
_timeoutId = new WeakMap();
|
|
115
|
+
_progressIntervalId = new WeakMap();
|
|
116
|
+
_alertRef = new WeakMap();
|
|
117
|
+
_timerController = new WeakMap();
|
|
118
|
+
_startTimer = new WeakSet();
|
|
119
|
+
startTimer_fn = function() {
|
|
120
|
+
const start = Date.now();
|
|
121
|
+
this._progress = 100;
|
|
122
|
+
__privateSet(this, _progressIntervalId, window.setInterval(() => {
|
|
123
|
+
const elapsed = Date.now() - start;
|
|
124
|
+
this._progress = Math.max(
|
|
125
|
+
0,
|
|
126
|
+
(this.timeout - elapsed) / this.timeout * 100
|
|
127
|
+
);
|
|
128
|
+
}, PROGRESS_INTERVAL));
|
|
129
|
+
__privateSet(this, _timeoutId, window.setTimeout(
|
|
130
|
+
() => __privateMethod(this, _dismiss, dismiss_fn).call(this, "timeout"),
|
|
131
|
+
this.timeout
|
|
132
|
+
));
|
|
133
|
+
};
|
|
134
|
+
_clearTimers = new WeakSet();
|
|
135
|
+
clearTimers_fn = function() {
|
|
136
|
+
clearTimeout(__privateGet(this, _timeoutId));
|
|
137
|
+
clearInterval(__privateGet(this, _progressIntervalId));
|
|
138
|
+
__privateSet(this, _timeoutId, __privateSet(this, _progressIntervalId, void 0));
|
|
139
|
+
};
|
|
140
|
+
_dismiss = new WeakSet();
|
|
141
|
+
dismiss_fn = async function(source) {
|
|
142
|
+
this._isClosing = true;
|
|
143
|
+
__privateMethod(this, _clearTimers, clearTimers_fn).call(this);
|
|
144
|
+
await this.updateComplete;
|
|
145
|
+
this.dispatchCustomEvent("gds-close", {
|
|
146
|
+
detail: { source },
|
|
147
|
+
bubbles: true,
|
|
148
|
+
composed: true
|
|
149
|
+
});
|
|
150
|
+
await new Promise((r) => setTimeout(r, FADE_DURATION));
|
|
151
|
+
this._cardHidden = true;
|
|
152
|
+
};
|
|
153
|
+
_handleButtonClick = new WeakSet();
|
|
154
|
+
handleButtonClick_fn = function(e) {
|
|
155
|
+
this.dispatchCustomEvent("gds-action", {
|
|
156
|
+
detail: { source: "button", event: e },
|
|
157
|
+
bubbles: true,
|
|
158
|
+
composed: true
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
_handleKeyDown = new WeakSet();
|
|
162
|
+
handleKeyDown_fn = function(e) {
|
|
163
|
+
if (e.key === "Escape" && this.dismissible) {
|
|
164
|
+
e.preventDefault();
|
|
165
|
+
__privateMethod(this, _dismiss, dismiss_fn).call(this, "escape");
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
_config = new WeakSet();
|
|
169
|
+
config_get = function() {
|
|
170
|
+
return VARIANT_CONFIG[this.variant];
|
|
171
|
+
};
|
|
172
|
+
_renderIcon = new WeakSet();
|
|
173
|
+
renderIcon_fn = function() {
|
|
174
|
+
const icon = `gds-icon-${__privateGet(this, _config, config_get).icon}`;
|
|
175
|
+
return html`${staticHtml`<${unsafeStatic(icon)} class="icon" solid aria-hidden="true" size="24px"></${unsafeStatic(icon)}>`}`;
|
|
176
|
+
};
|
|
177
|
+
_renderMessage = new WeakSet();
|
|
178
|
+
renderMessage_fn = function() {
|
|
179
|
+
return html`<div class="message">
|
|
180
|
+
<span class="message-text">
|
|
181
|
+
<slot></slot>
|
|
182
|
+
</span>
|
|
183
|
+
</div>`;
|
|
184
|
+
};
|
|
185
|
+
_renderActionButton = new WeakSet();
|
|
186
|
+
renderActionButton_fn = function(label) {
|
|
187
|
+
return html`
|
|
188
|
+
<gds-button
|
|
189
|
+
class="action-button"
|
|
190
|
+
variant="neutral"
|
|
191
|
+
rank="primary"
|
|
192
|
+
size="small"
|
|
193
|
+
@click=${__privateMethod(this, _handleButtonClick, handleButtonClick_fn)}
|
|
194
|
+
aria-describedby="alert-message"
|
|
195
|
+
>
|
|
196
|
+
${label.trim()}
|
|
197
|
+
</gds-button>
|
|
198
|
+
`;
|
|
199
|
+
};
|
|
200
|
+
_renderCloseButton = new WeakSet();
|
|
201
|
+
renderCloseButton_fn = function() {
|
|
202
|
+
return this.dismissible ? html`
|
|
203
|
+
<gds-button
|
|
204
|
+
class="close-btn"
|
|
205
|
+
variant="neutral"
|
|
206
|
+
rank="tertiary"
|
|
207
|
+
size="small"
|
|
208
|
+
aria-label=${msg("Dismiss alert")}
|
|
209
|
+
@click=${() => __privateMethod(this, _dismiss, dismiss_fn).call(this, "close")}
|
|
210
|
+
>
|
|
211
|
+
<gds-icon-cross-small size="20px"></gds-icon-cross-small>
|
|
212
|
+
</gds-button>
|
|
213
|
+
` : nothing;
|
|
214
|
+
};
|
|
215
|
+
_renderTimerBar = new WeakSet();
|
|
216
|
+
renderTimerBar_fn = function() {
|
|
217
|
+
return this.timeout > 0 ? html`
|
|
218
|
+
<div
|
|
219
|
+
class="timer-bar"
|
|
220
|
+
role="timer"
|
|
221
|
+
aria-label=${msg("Auto-dismiss timer")}
|
|
222
|
+
aria-valuenow=${this._progress}
|
|
223
|
+
aria-valuemin="0"
|
|
224
|
+
aria-valuemax="100"
|
|
225
|
+
>
|
|
226
|
+
<div class="timer-progress" style="width: ${this._progress}%"></div>
|
|
227
|
+
</div>
|
|
228
|
+
` : nothing;
|
|
229
|
+
};
|
|
230
|
+
GdsAlert.styles = [tokens, alertStyles];
|
|
231
|
+
__decorateClass([
|
|
232
|
+
property({ type: String, reflect: true })
|
|
233
|
+
], GdsAlert.prototype, "variant", 2);
|
|
234
|
+
__decorateClass([
|
|
235
|
+
property({ type: String })
|
|
236
|
+
], GdsAlert.prototype, "label", 2);
|
|
237
|
+
__decorateClass([
|
|
238
|
+
property({ type: String, reflect: true })
|
|
239
|
+
], GdsAlert.prototype, "role", 2);
|
|
240
|
+
__decorateClass([
|
|
241
|
+
property({ type: Boolean })
|
|
242
|
+
], GdsAlert.prototype, "dismissible", 2);
|
|
243
|
+
__decorateClass([
|
|
244
|
+
property({ type: Number })
|
|
245
|
+
], GdsAlert.prototype, "timeout", 2);
|
|
246
|
+
__decorateClass([
|
|
247
|
+
property({ type: String, attribute: "button-label" })
|
|
248
|
+
], GdsAlert.prototype, "buttonLabel", 2);
|
|
249
|
+
__decorateClass([
|
|
250
|
+
state()
|
|
251
|
+
], GdsAlert.prototype, "_progress", 2);
|
|
252
|
+
__decorateClass([
|
|
253
|
+
state()
|
|
254
|
+
], GdsAlert.prototype, "_isClosing", 2);
|
|
255
|
+
__decorateClass([
|
|
256
|
+
state()
|
|
257
|
+
], GdsAlert.prototype, "_cardHidden", 2);
|
|
258
|
+
GdsAlert = __decorateClass([
|
|
259
|
+
gdsCustomElement("gds-alert", {
|
|
260
|
+
dependsOn: [
|
|
261
|
+
GdsButton,
|
|
262
|
+
GdsCard,
|
|
263
|
+
IconCircleCheck,
|
|
264
|
+
IconTriangleExclamation,
|
|
265
|
+
IconCircleInfo,
|
|
266
|
+
IconCrossSmall
|
|
267
|
+
]
|
|
268
|
+
}),
|
|
269
|
+
localized()
|
|
270
|
+
], GdsAlert);
|
|
271
|
+
export {
|
|
272
|
+
GdsAlert
|
|
273
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const alertStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import "../../chunks/chunk.QTSIPXV3.js";
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
const alertStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
container-type: inline-size;
|
|
7
|
+
margin: 0.3rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#alert-message {
|
|
11
|
+
--grid-areas: 'icon message close' 'icon action close';
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: auto 1fr auto;
|
|
14
|
+
grid-template-areas: var(--grid-areas);
|
|
15
|
+
width: 100%;
|
|
16
|
+
position: relative;
|
|
17
|
+
transition:
|
|
18
|
+
opacity 0.3s ease-out,
|
|
19
|
+
transform 0.3s ease-out;
|
|
20
|
+
gap: var(--gds-sys-space-xs);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Animation */
|
|
24
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
25
|
+
#alert-message {
|
|
26
|
+
animation: slideIn 0.3s ease-out;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#alert-message.dismissing {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transform: translateY(-1rem);
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (prefers-reduced-motion: reduce) {
|
|
37
|
+
#alert-message.dismissing {
|
|
38
|
+
transform: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes slideIn {
|
|
43
|
+
from {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
transform: translateY(-0.5rem);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Focus styles */
|
|
50
|
+
#alert-message:focus-within {
|
|
51
|
+
outline: 2px solid var(--gds-focus-color, #000);
|
|
52
|
+
outline-offset: 2px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Layout elements */
|
|
56
|
+
.icon {
|
|
57
|
+
grid-area: icon;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.message {
|
|
61
|
+
grid-area: message;
|
|
62
|
+
font-size: var(--gds-font-size-base, 1rem);
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: flex-start;
|
|
65
|
+
text-align: left;
|
|
66
|
+
margin: 0 0 0 var(--gds-sys-space-2xs);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.message-text {
|
|
70
|
+
display: inline;
|
|
71
|
+
white-space: normal;
|
|
72
|
+
line-height: var(--gds-sys-text-line-height-body-m);
|
|
73
|
+
font-size: var(--gds-sys-text-size-body-m);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Buttons */
|
|
77
|
+
|
|
78
|
+
[gds-element='gds-button'] {
|
|
79
|
+
grid-area: unset;
|
|
80
|
+
width: auto;
|
|
81
|
+
min-width: auto;
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Timer bar */
|
|
86
|
+
.timer-bar {
|
|
87
|
+
position: absolute;
|
|
88
|
+
inset: auto 0 0;
|
|
89
|
+
height: 0.25rem;
|
|
90
|
+
background: var(--gds-border-color, rgba(0, 0, 0, 0.1));
|
|
91
|
+
border-radius: 0 0 var(--gds-radius-md, 0.25rem)
|
|
92
|
+
var(--gds-radius-md, 0.25rem);
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.timer-progress {
|
|
97
|
+
height: 100%;
|
|
98
|
+
transition: width 0.1s linear;
|
|
99
|
+
background: var(--gds-accent, currentColor);
|
|
100
|
+
opacity: 0.6;
|
|
101
|
+
will-change: width;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
.timer-progress {
|
|
106
|
+
transition: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Responsive layouts */
|
|
111
|
+
/* Small: stacked */
|
|
112
|
+
@container (max-width: 600px) {
|
|
113
|
+
#alert-message {
|
|
114
|
+
grid-template-areas: 'icon message close' 'cta cta cta';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.action-button {
|
|
118
|
+
grid-area: cta;
|
|
119
|
+
margin-top: var(--gds-sys-space-xs);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Medium: inline */
|
|
124
|
+
@container (min-width: 601px) and (max-width: 1024px) {
|
|
125
|
+
#alert-message {
|
|
126
|
+
grid-template-areas: 'icon message cta close';
|
|
127
|
+
}
|
|
128
|
+
.message {
|
|
129
|
+
gap: 0.5rem;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Large: centered */
|
|
134
|
+
@container (min-width: 1025px) {
|
|
135
|
+
#alert-message {
|
|
136
|
+
grid-template-columns: auto 1fr auto auto;
|
|
137
|
+
grid-template-areas: 'icon message cta close';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.message {
|
|
141
|
+
justify-content: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.close-btn {
|
|
145
|
+
grid-area: close;
|
|
146
|
+
justify-self: end;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* High contrast mode support */
|
|
151
|
+
@media (prefers-contrast: high) {
|
|
152
|
+
.icon {
|
|
153
|
+
forced-color-adjust: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
export {
|
|
158
|
+
alertStyles
|
|
159
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./alert.js";
|
|
@@ -49,13 +49,11 @@ class Button extends GdsFormControlElement {
|
|
|
49
49
|
this.requestUpdate();
|
|
50
50
|
});
|
|
51
51
|
__privateAdd(this, _handleClick, (e) => {
|
|
52
|
-
this.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
);
|
|
52
|
+
this.dispatchCustomEvent("gds-click", {
|
|
53
|
+
bubbles: true,
|
|
54
|
+
composed: true,
|
|
55
|
+
detail: e
|
|
56
|
+
});
|
|
59
57
|
if (this.form && !__privateGet(this, _isLink, isLink_get)) {
|
|
60
58
|
if (this.type === "submit") {
|
|
61
59
|
this.form.requestSubmit();
|
|
@@ -189,13 +189,11 @@ _setSelectedDate = new WeakSet();
|
|
|
189
189
|
setSelectedDate_fn = function(date) {
|
|
190
190
|
const dateOnMidDay = setHours(date, 12);
|
|
191
191
|
this.value = dateOnMidDay;
|
|
192
|
-
this.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
})
|
|
198
|
-
);
|
|
192
|
+
this.dispatchCustomEvent("change", {
|
|
193
|
+
detail: dateOnMidDay,
|
|
194
|
+
bubbles: false,
|
|
195
|
+
composed: false
|
|
196
|
+
});
|
|
199
197
|
};
|
|
200
198
|
_handleKeyDown = new WeakSet();
|
|
201
199
|
handleKeyDown_fn = function(e) {
|
|
@@ -232,14 +230,11 @@ handleKeyDown_fn = function(e) {
|
|
|
232
230
|
handled = true;
|
|
233
231
|
}
|
|
234
232
|
if (newFocusedDate.getFullYear() >= this.min.getFullYear() && newFocusedDate.getFullYear() <= this.max.getFullYear()) {
|
|
235
|
-
const proceed = this.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
cancelable: true
|
|
241
|
-
})
|
|
242
|
-
);
|
|
233
|
+
const proceed = this.dispatchCustomEvent("gds-date-focused", {
|
|
234
|
+
detail: newFocusedDate,
|
|
235
|
+
bubbles: false,
|
|
236
|
+
composed: false
|
|
237
|
+
});
|
|
243
238
|
if (proceed) {
|
|
244
239
|
this.focusedDate = newFocusedDate;
|
|
245
240
|
}
|
|
@@ -140,12 +140,10 @@ computeValue_fn = function() {
|
|
|
140
140
|
_dispatchInputEvent = new WeakSet();
|
|
141
141
|
dispatchInputEvent_fn = function() {
|
|
142
142
|
this.updateComplete.then(
|
|
143
|
-
() => this.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
})
|
|
148
|
-
)
|
|
143
|
+
() => this.dispatchStandardEvent("input", {
|
|
144
|
+
bubbles: true,
|
|
145
|
+
composed: true
|
|
146
|
+
})
|
|
149
147
|
);
|
|
150
148
|
};
|
|
151
149
|
_renderFieldControlFooter = new WeakSet();
|
|
@@ -103,18 +103,14 @@ toggleChecked_fn = function() {
|
|
|
103
103
|
} else {
|
|
104
104
|
this.checked = !this.checked;
|
|
105
105
|
}
|
|
106
|
-
this.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
bubbles: true,
|
|
115
|
-
composed: true
|
|
116
|
-
})
|
|
117
|
-
);
|
|
106
|
+
this.dispatchStandardEvent("change", {
|
|
107
|
+
bubbles: true,
|
|
108
|
+
composed: true
|
|
109
|
+
});
|
|
110
|
+
this.dispatchStandardEvent("input", {
|
|
111
|
+
bubbles: true,
|
|
112
|
+
composed: true
|
|
113
|
+
});
|
|
118
114
|
};
|
|
119
115
|
GdsCheckbox.styles = [tokens, rbcbToggleStyles, styles];
|
|
120
116
|
__decorateClass([
|
|
@@ -109,13 +109,11 @@ closeCoachMark_fn = function() {
|
|
|
109
109
|
this._isVisible = false;
|
|
110
110
|
__privateGet(this, _cardRef).value?.remove();
|
|
111
111
|
(_a = __privateGet(this, _autoUpdateCleanupFn)) == null ? void 0 : _a.call(this);
|
|
112
|
-
this.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
})
|
|
118
|
-
);
|
|
112
|
+
this.dispatchCustomEvent("gds-ui-state", {
|
|
113
|
+
detail: { open: this._isVisible, reason: "closed" },
|
|
114
|
+
bubbles: false,
|
|
115
|
+
composed: false
|
|
116
|
+
});
|
|
119
117
|
};
|
|
120
118
|
_findTarget = new WeakSet();
|
|
121
119
|
findTarget_fn = function(selectors) {
|
|
@@ -140,11 +140,9 @@ focusNextSpinner_fn = function() {
|
|
|
140
140
|
};
|
|
141
141
|
_dispatchChangeEvent = new WeakSet();
|
|
142
142
|
dispatchChangeEvent_fn = function() {
|
|
143
|
-
this.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
})
|
|
147
|
-
);
|
|
143
|
+
this.dispatchCustomEvent("change", {
|
|
144
|
+
detail: { value: this.value.toString() }
|
|
145
|
+
});
|
|
148
146
|
};
|
|
149
147
|
_formatNumber = new WeakSet();
|
|
150
148
|
formatNumber_fn = function(num, padZeros) {
|
|
@@ -624,23 +624,19 @@ getMaxSpinnerValue_fn = function(name) {
|
|
|
624
624
|
_dispatchChangeEvent = new WeakSet();
|
|
625
625
|
dispatchChangeEvent_fn = function() {
|
|
626
626
|
this.updateComplete.then(
|
|
627
|
-
() => this.
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
})
|
|
632
|
-
)
|
|
627
|
+
() => this.dispatchStandardEvent("change", {
|
|
628
|
+
bubbles: true,
|
|
629
|
+
composed: true
|
|
630
|
+
})
|
|
633
631
|
);
|
|
634
632
|
};
|
|
635
633
|
_dispatchInputEvent = new WeakSet();
|
|
636
634
|
dispatchInputEvent_fn = function() {
|
|
637
635
|
this.updateComplete.then(
|
|
638
|
-
() => this.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
})
|
|
643
|
-
)
|
|
636
|
+
() => this.dispatchStandardEvent("input", {
|
|
637
|
+
bubbles: true,
|
|
638
|
+
composed: true
|
|
639
|
+
})
|
|
644
640
|
);
|
|
645
641
|
};
|
|
646
642
|
_handleFieldFocusOut = new WeakMap();
|