@sebgroup/green-core 3.13.0 → 3.14.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/badge/badge.styles.js +1 -1
- package/components/button/button.styles.js +1 -1
- package/components/button/button.trans.styles.scss.js +1 -1
- package/components/context-menu/context-menu.trans.styles.scss.js +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/popover/popover.trans.styles.scss.js +1 -1
- package/components/tabs/index.d.ts +3 -0
- package/components/tabs/index.js +3 -0
- package/components/tabs/tab/index.d.ts +1 -0
- package/components/tabs/tab/index.js +1 -0
- package/components/tabs/tab/tab.component.d.ts +49 -0
- package/components/tabs/tab/tab.component.js +120 -0
- package/components/tabs/tab/tab.d.ts +2 -0
- package/components/tabs/tab/tab.js +6 -0
- package/components/tabs/tab/tab.styles.d.ts +2 -0
- package/components/tabs/tab/tab.styles.js +69 -0
- package/components/tabs/tab-panel/index.d.ts +1 -0
- package/components/tabs/tab-panel/index.js +1 -0
- package/components/tabs/tab-panel/tab-panel.component.d.ts +33 -0
- package/components/tabs/tab-panel/tab-panel.component.js +73 -0
- package/components/tabs/tab-panel/tab-panel.d.ts +2 -0
- package/components/tabs/tab-panel/tab-panel.js +6 -0
- package/components/tabs/tab-panel/tab-panel.styles.d.ts +2 -0
- package/components/tabs/tab-panel/tab-panel.styles.js +22 -0
- package/components/tabs/tabs.component.d.ts +41 -0
- package/components/tabs/tabs.component.js +439 -0
- package/components/tabs/tabs.d.ts +2 -0
- package/components/tabs/tabs.js +6 -0
- package/components/tabs/tabs.styles.d.ts +2 -0
- package/components/tabs/tabs.styles.js +115 -0
- package/custom-elements.json +27235 -25714
- package/gds-element.js +1 -1
- package/generated/mcp/components.json +39 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/list-item-pattern-01/guidelines.md +1 -0
- package/generated/mcp/list-item-pattern-01/index.json +1 -0
- package/generated/mcp/tab/angular.md +25 -0
- package/generated/mcp/tab/api.md +32 -0
- package/generated/mcp/tab/index.json +8 -0
- package/generated/mcp/tab/react.md +25 -0
- package/generated/mcp/tab-panel/angular.md +17 -0
- package/generated/mcp/tab-panel/api.md +20 -0
- package/generated/mcp/tab-panel/index.json +8 -0
- package/generated/mcp/tab-panel/react.md +17 -0
- package/generated/mcp/tabs/angular.md +26 -0
- package/generated/mcp/tabs/api.md +49 -0
- package/generated/mcp/tabs/guidelines.md +71 -0
- package/generated/mcp/tabs/index.json +9 -0
- package/generated/mcp/tabs/react.md +26 -0
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/alert/index.d.ts +118 -110
- package/generated/react/avatar/index.d.ts +116 -108
- package/generated/react/avatar-group/index.d.ts +114 -106
- package/generated/react/backdrop/index.d.ts +115 -107
- package/generated/react/badge/index.d.ts +118 -110
- package/generated/react/blur/index.d.ts +114 -106
- package/generated/react/breadcrumb/index.d.ts +118 -110
- package/generated/react/breadcrumbs/index.d.ts +115 -107
- package/generated/react/button/index.d.ts +127 -119
- package/generated/react/calendar/index.d.ts +121 -113
- package/generated/react/card/index.d.ts +114 -106
- package/generated/react/card-linked/index.d.ts +116 -108
- package/generated/react/card-pattern-01/index.d.ts +124 -116
- package/generated/react/checkbox/index.d.ts +127 -119
- package/generated/react/checkbox-group/index.d.ts +128 -120
- package/generated/react/coachmark/index.d.ts +117 -109
- package/generated/react/context-menu/index.d.ts +118 -110
- package/generated/react/datepicker/index.d.ts +136 -128
- package/generated/react/details/index.d.ts +117 -109
- package/generated/react/dialog/index.d.ts +116 -108
- package/generated/react/div/index.d.ts +114 -106
- package/generated/react/divider/index.d.ts +114 -106
- package/generated/react/dropdown/index.d.ts +139 -131
- package/generated/react/fab/index.d.ts +127 -119
- package/generated/react/filter-chip/index.d.ts +115 -107
- package/generated/react/filter-chips/index.d.ts +127 -119
- package/generated/react/flex/index.d.ts +114 -106
- package/generated/react/form-summary/index.d.ts +117 -109
- package/generated/react/formatted-account/index.d.ts +117 -109
- package/generated/react/formatted-date/index.d.ts +116 -108
- package/generated/react/formatted-number/index.d.ts +117 -109
- package/generated/react/grid/index.d.ts +114 -106
- package/generated/react/grouped-list/index.d.ts +115 -107
- package/generated/react/icons/icon-ai/index.d.ts +116 -108
- package/generated/react/icons/icon-airplane-up/index.d.ts +116 -108
- package/generated/react/icons/icon-archive/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-bottom-top/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-box-left/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-box-left-alt/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-box-right/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-down/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-inbox/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-left/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-left-right/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-out-of-box/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-right/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-right-circle/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-right-down-circle/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-right-up-circle/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-rotate-clockwise/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-rotate-counter-clockwise/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-rotate-left-right/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-rotate-right-left/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-share-left/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-share-right/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-split/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-up/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-wall-down/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-wall-left/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-wall-right/index.d.ts +116 -108
- package/generated/react/icons/icon-arrow-wall-up/index.d.ts +116 -108
- package/generated/react/icons/icon-arrows-repeat-right/index.d.ts +116 -108
- package/generated/react/icons/icon-asterisk/index.d.ts +116 -108
- package/generated/react/icons/icon-at/index.d.ts +116 -108
- package/generated/react/icons/icon-back/index.d.ts +116 -108
- package/generated/react/icons/icon-backward/index.d.ts +116 -108
- package/generated/react/icons/icon-bag/index.d.ts +116 -108
- package/generated/react/icons/icon-bank/index.d.ts +116 -108
- package/generated/react/icons/icon-banknote/index.d.ts +116 -108
- package/generated/react/icons/icon-banknote-2/index.d.ts +116 -108
- package/generated/react/icons/icon-barcode/index.d.ts +116 -108
- package/generated/react/icons/icon-bars-three/index.d.ts +116 -108
- package/generated/react/icons/icon-bars-two/index.d.ts +116 -108
- package/generated/react/icons/icon-basket/index.d.ts +116 -108
- package/generated/react/icons/icon-battery-loading/index.d.ts +116 -108
- package/generated/react/icons/icon-bell/index.d.ts +116 -108
- package/generated/react/icons/icon-block/index.d.ts +116 -108
- package/generated/react/icons/icon-book/index.d.ts +116 -108
- package/generated/react/icons/icon-bookmark/index.d.ts +116 -108
- package/generated/react/icons/icon-bookmark-check/index.d.ts +116 -108
- package/generated/react/icons/icon-bookmark-delete/index.d.ts +116 -108
- package/generated/react/icons/icon-bookmark-plus/index.d.ts +116 -108
- package/generated/react/icons/icon-bookmark-remove/index.d.ts +116 -108
- package/generated/react/icons/icon-books/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-app-store/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-apple-music/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-bankid/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-chrome/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-facebook/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-figma/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-firefox/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-github/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-green/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-instagram/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-linkedin/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-play-store/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-rss-feed/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-seb/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-spotify/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-storybook/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-swish-word/index.d.ts +116 -108
- package/generated/react/icons/icon-brand-x/index.d.ts +116 -108
- package/generated/react/icons/icon-brush/index.d.ts +116 -108
- package/generated/react/icons/icon-bubble-annotation/index.d.ts +116 -108
- package/generated/react/icons/icon-bubbles/index.d.ts +116 -108
- package/generated/react/icons/icon-buildings/index.d.ts +116 -108
- package/generated/react/icons/icon-bullet-list/index.d.ts +116 -108
- package/generated/react/icons/icon-calculator/index.d.ts +116 -108
- package/generated/react/icons/icon-calendar/index.d.ts +116 -108
- package/generated/react/icons/icon-calendar-check/index.d.ts +116 -108
- package/generated/react/icons/icon-calendar-repeat/index.d.ts +116 -108
- package/generated/react/icons/icon-calender-add/index.d.ts +116 -108
- package/generated/react/icons/icon-call/index.d.ts +116 -108
- package/generated/react/icons/icon-car/index.d.ts +116 -108
- package/generated/react/icons/icon-carussel/index.d.ts +116 -108
- package/generated/react/icons/icon-chain-link/index.d.ts +116 -108
- package/generated/react/icons/icon-chain-link-broken/index.d.ts +116 -108
- package/generated/react/icons/icon-chart-two/index.d.ts +116 -108
- package/generated/react/icons/icon-checklist/index.d.ts +116 -108
- package/generated/react/icons/icon-checkmark/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-bottom/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-double-down/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-double-left/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-double-right/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-double-up/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-down-small/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-grabber-vertical/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-grabber-vertical-reversed/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-left/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-left-small/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-right/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-right-small/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-top/index.d.ts +116 -108
- package/generated/react/icons/icon-chevron-top-small/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-ban/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-check/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-dots/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-info/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-minus/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-placeholder-on/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-plus/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-questionmark/index.d.ts +116 -108
- package/generated/react/icons/icon-circle-x/index.d.ts +116 -108
- package/generated/react/icons/icon-circles-three/index.d.ts +116 -108
- package/generated/react/icons/icon-clock/index.d.ts +116 -108
- package/generated/react/icons/icon-cloud-download/index.d.ts +116 -108
- package/generated/react/icons/icon-cloud-upload/index.d.ts +116 -108
- package/generated/react/icons/icon-cloudy-sun/index.d.ts +116 -108
- package/generated/react/icons/icon-code/index.d.ts +116 -108
- package/generated/react/icons/icon-code-brackets/index.d.ts +116 -108
- package/generated/react/icons/icon-compass-round/index.d.ts +116 -108
- package/generated/react/icons/icon-cookies/index.d.ts +116 -108
- package/generated/react/icons/icon-copy/index.d.ts +116 -108
- package/generated/react/icons/icon-credit-card/index.d.ts +116 -108
- package/generated/react/icons/icon-credit-card-add/index.d.ts +116 -108
- package/generated/react/icons/icon-cross-large/index.d.ts +116 -108
- package/generated/react/icons/icon-cross-small/index.d.ts +116 -108
- package/generated/react/icons/icon-cup-hot/index.d.ts +116 -108
- package/generated/react/icons/icon-cursor/index.d.ts +116 -108
- package/generated/react/icons/icon-details/index.d.ts +115 -107
- package/generated/react/icons/icon-devices/index.d.ts +116 -108
- package/generated/react/icons/icon-direction/index.d.ts +116 -108
- package/generated/react/icons/icon-dollar/index.d.ts +116 -108
- package/generated/react/icons/icon-dot-grid-one-horizontal/index.d.ts +116 -108
- package/generated/react/icons/icon-dot-grid-one-vertical/index.d.ts +116 -108
- package/generated/react/icons/icon-dot-grid-three/index.d.ts +116 -108
- package/generated/react/icons/icon-dot-grid-two/index.d.ts +116 -108
- package/generated/react/icons/icon-email/index.d.ts +116 -108
- package/generated/react/icons/icon-emoji-angry/index.d.ts +116 -108
- package/generated/react/icons/icon-emoji-neutral/index.d.ts +116 -108
- package/generated/react/icons/icon-emoji-sad/index.d.ts +116 -108
- package/generated/react/icons/icon-emoji-smile/index.d.ts +116 -108
- package/generated/react/icons/icon-emoji-smiley/index.d.ts +116 -108
- package/generated/react/icons/icon-euro/index.d.ts +116 -108
- package/generated/react/icons/icon-expand/index.d.ts +116 -108
- package/generated/react/icons/icon-eye-open/index.d.ts +116 -108
- package/generated/react/icons/icon-eye-slash/index.d.ts +116 -108
- package/generated/react/icons/icon-fashion/index.d.ts +116 -108
- package/generated/react/icons/icon-fast-forward/index.d.ts +116 -108
- package/generated/react/icons/icon-file-bend/index.d.ts +116 -108
- package/generated/react/icons/icon-file-chart/index.d.ts +116 -108
- package/generated/react/icons/icon-file-text/index.d.ts +116 -108
- package/generated/react/icons/icon-files/index.d.ts +116 -108
- package/generated/react/icons/icon-filter/index.d.ts +116 -108
- package/generated/react/icons/icon-flag/index.d.ts +116 -108
- package/generated/react/icons/icon-floppy-disk/index.d.ts +116 -108
- package/generated/react/icons/icon-focus/index.d.ts +116 -108
- package/generated/react/icons/icon-folder/index.d.ts +116 -108
- package/generated/react/icons/icon-folder-add-right/index.d.ts +116 -108
- package/generated/react/icons/icon-fullscreen/index.d.ts +116 -108
- package/generated/react/icons/icon-gift/index.d.ts +116 -108
- package/generated/react/icons/icon-globus/index.d.ts +116 -108
- package/generated/react/icons/icon-graduate-cap/index.d.ts +116 -108
- package/generated/react/icons/icon-green-power/index.d.ts +116 -108
- package/generated/react/icons/icon-group/index.d.ts +116 -108
- package/generated/react/icons/icon-growth/index.d.ts +116 -108
- package/generated/react/icons/icon-headphones/index.d.ts +116 -108
- package/generated/react/icons/icon-heart/index.d.ts +116 -108
- package/generated/react/icons/icon-heart-beat/index.d.ts +116 -108
- package/generated/react/icons/icon-history/index.d.ts +116 -108
- package/generated/react/icons/icon-home-energy-one/index.d.ts +116 -108
- package/generated/react/icons/icon-home-energy-two/index.d.ts +116 -108
- package/generated/react/icons/icon-home-open/index.d.ts +116 -108
- package/generated/react/icons/icon-home-roof/index.d.ts +116 -108
- package/generated/react/icons/icon-horizontal-alignment-bottom/index.d.ts +116 -108
- package/generated/react/icons/icon-hourglass/index.d.ts +116 -108
- package/generated/react/icons/icon-images/index.d.ts +116 -108
- package/generated/react/icons/icon-inbox-empty/index.d.ts +116 -108
- package/generated/react/icons/icon-industry/index.d.ts +116 -108
- package/generated/react/icons/icon-jpg/index.d.ts +116 -108
- package/generated/react/icons/icon-key/index.d.ts +116 -108
- package/generated/react/icons/icon-knife-spoon/index.d.ts +116 -108
- package/generated/react/icons/icon-lab/index.d.ts +116 -108
- package/generated/react/icons/icon-law/index.d.ts +116 -108
- package/generated/react/icons/icon-leisure/index.d.ts +116 -108
- package/generated/react/icons/icon-light-bulb-simple/index.d.ts +116 -108
- package/generated/react/icons/icon-lightning/index.d.ts +116 -108
- package/generated/react/icons/icon-line-chart-four/index.d.ts +116 -108
- package/generated/react/icons/icon-line-chart-one/index.d.ts +116 -108
- package/generated/react/icons/icon-line-chart-three/index.d.ts +116 -108
- package/generated/react/icons/icon-line-chart-two/index.d.ts +116 -108
- package/generated/react/icons/icon-lock/index.d.ts +116 -108
- package/generated/react/icons/icon-macbook-air/index.d.ts +116 -108
- package/generated/react/icons/icon-magnifying-glass/index.d.ts +116 -108
- package/generated/react/icons/icon-map-pin/index.d.ts +116 -108
- package/generated/react/icons/icon-megaphone/index.d.ts +116 -108
- package/generated/react/icons/icon-menu-sidebar/index.d.ts +116 -108
- package/generated/react/icons/icon-mic-off/index.d.ts +116 -108
- package/generated/react/icons/icon-mic-on/index.d.ts +116 -108
- package/generated/react/icons/icon-minimize/index.d.ts +116 -108
- package/generated/react/icons/icon-minus-large/index.d.ts +116 -108
- package/generated/react/icons/icon-minus-small/index.d.ts +116 -108
- package/generated/react/icons/icon-money-hand/index.d.ts +116 -108
- package/generated/react/icons/icon-moneybag/index.d.ts +116 -108
- package/generated/react/icons/icon-moon/index.d.ts +116 -108
- package/generated/react/icons/icon-mute/index.d.ts +116 -108
- package/generated/react/icons/icon-newspaper/index.d.ts +116 -108
- package/generated/react/icons/icon-office/index.d.ts +116 -108
- package/generated/react/icons/icon-page-add/index.d.ts +116 -108
- package/generated/react/icons/icon-paper-plane-top-right/index.d.ts +116 -108
- package/generated/react/icons/icon-paperclip/index.d.ts +116 -108
- package/generated/react/icons/icon-pause/index.d.ts +116 -108
- package/generated/react/icons/icon-pdf/index.d.ts +116 -108
- package/generated/react/icons/icon-pencil-sign/index.d.ts +116 -108
- package/generated/react/icons/icon-pencil-sparkle/index.d.ts +116 -108
- package/generated/react/icons/icon-pencil-wave/index.d.ts +116 -108
- package/generated/react/icons/icon-pension/index.d.ts +116 -108
- package/generated/react/icons/icon-people/index.d.ts +116 -108
- package/generated/react/icons/icon-people-a11y/index.d.ts +116 -108
- package/generated/react/icons/icon-people-add/index.d.ts +116 -108
- package/generated/react/icons/icon-people-added/index.d.ts +116 -108
- package/generated/react/icons/icon-people-circle/index.d.ts +116 -108
- package/generated/react/icons/icon-people-copy/index.d.ts +116 -108
- package/generated/react/icons/icon-people-profile/index.d.ts +116 -108
- package/generated/react/icons/icon-people-remove/index.d.ts +116 -108
- package/generated/react/icons/icon-percent/index.d.ts +116 -108
- package/generated/react/icons/icon-phone/index.d.ts +116 -108
- package/generated/react/icons/icon-pie-chart/index.d.ts +116 -108
- package/generated/react/icons/icon-piggy-bank/index.d.ts +116 -108
- package/generated/react/icons/icon-pin/index.d.ts +116 -108
- package/generated/react/icons/icon-pinch/index.d.ts +116 -108
- package/generated/react/icons/icon-play/index.d.ts +116 -108
- package/generated/react/icons/icon-play-circle/index.d.ts +116 -108
- package/generated/react/icons/icon-plus-large/index.d.ts +116 -108
- package/generated/react/icons/icon-plus-small/index.d.ts +116 -108
- package/generated/react/icons/icon-png/index.d.ts +116 -108
- package/generated/react/icons/icon-poop/index.d.ts +116 -108
- package/generated/react/icons/icon-postcard/index.d.ts +116 -108
- package/generated/react/icons/icon-pound/index.d.ts +116 -108
- package/generated/react/icons/icon-power/index.d.ts +116 -108
- package/generated/react/icons/icon-power-plant/index.d.ts +116 -108
- package/generated/react/icons/icon-printer/index.d.ts +116 -108
- package/generated/react/icons/icon-push/index.d.ts +116 -108
- package/generated/react/icons/icon-qr-code/index.d.ts +116 -108
- package/generated/react/icons/icon-rainy/index.d.ts +116 -108
- package/generated/react/icons/icon-raising-hand/index.d.ts +116 -108
- package/generated/react/icons/icon-reading-list/index.d.ts +116 -108
- package/generated/react/icons/icon-receipt-bill/index.d.ts +116 -108
- package/generated/react/icons/icon-receiption-bell/index.d.ts +116 -108
- package/generated/react/icons/icon-record/index.d.ts +116 -108
- package/generated/react/icons/icon-refund/index.d.ts +116 -108
- package/generated/react/icons/icon-robot/index.d.ts +116 -108
- package/generated/react/icons/icon-rocket/index.d.ts +116 -108
- package/generated/react/icons/icon-run-shortcut/index.d.ts +116 -108
- package/generated/react/icons/icon-safari/index.d.ts +116 -108
- package/generated/react/icons/icon-school/index.d.ts +116 -108
- package/generated/react/icons/icon-scissors/index.d.ts +116 -108
- package/generated/react/icons/icon-search-menu/index.d.ts +116 -108
- package/generated/react/icons/icon-settings-gear/index.d.ts +116 -108
- package/generated/react/icons/icon-settings-slider-hor/index.d.ts +116 -108
- package/generated/react/icons/icon-settings-slider-ver/index.d.ts +116 -108
- package/generated/react/icons/icon-shapes/index.d.ts +116 -108
- package/generated/react/icons/icon-share/index.d.ts +116 -108
- package/generated/react/icons/icon-shield/index.d.ts +116 -108
- package/generated/react/icons/icon-shield-checked/index.d.ts +116 -108
- package/generated/react/icons/icon-shield-crossed/index.d.ts +116 -108
- package/generated/react/icons/icon-shopping-bag/index.d.ts +116 -108
- package/generated/react/icons/icon-signature/index.d.ts +116 -108
- package/generated/react/icons/icon-smartwatch/index.d.ts +116 -108
- package/generated/react/icons/icon-solar/index.d.ts +116 -108
- package/generated/react/icons/icon-sort/index.d.ts +116 -108
- package/generated/react/icons/icon-sort-ascending/index.d.ts +116 -108
- package/generated/react/icons/icon-sort-descending/index.d.ts +116 -108
- package/generated/react/icons/icon-sort-down/index.d.ts +116 -108
- package/generated/react/icons/icon-sort-up/index.d.ts +116 -108
- package/generated/react/icons/icon-square-arrow-top-right/index.d.ts +116 -108
- package/generated/react/icons/icon-square-behind-square/index.d.ts +116 -108
- package/generated/react/icons/icon-square-grid-circle/index.d.ts +116 -108
- package/generated/react/icons/icon-square-placeholder/index.d.ts +116 -108
- package/generated/react/icons/icon-star/index.d.ts +116 -108
- package/generated/react/icons/icon-store/index.d.ts +116 -108
- package/generated/react/icons/icon-sun/index.d.ts +116 -108
- package/generated/react/icons/icon-sunset-arrow-down/index.d.ts +116 -108
- package/generated/react/icons/icon-tag/index.d.ts +116 -108
- package/generated/react/icons/icon-target-arrow/index.d.ts +116 -108
- package/generated/react/icons/icon-television/index.d.ts +116 -108
- package/generated/react/icons/icon-tennis/index.d.ts +116 -108
- package/generated/react/icons/icon-text-edit/index.d.ts +116 -108
- package/generated/react/icons/icon-thermostat/index.d.ts +116 -108
- package/generated/react/icons/icon-thumbs-down/index.d.ts +116 -108
- package/generated/react/icons/icon-thumbs-up/index.d.ts +116 -108
- package/generated/react/icons/icon-ticket/index.d.ts +116 -108
- package/generated/react/icons/icon-trading-view-candles/index.d.ts +116 -108
- package/generated/react/icons/icon-trash-can/index.d.ts +116 -108
- package/generated/react/icons/icon-tree/index.d.ts +116 -108
- package/generated/react/icons/icon-trending-five/index.d.ts +116 -108
- package/generated/react/icons/icon-trending-four/index.d.ts +116 -108
- package/generated/react/icons/icon-trending-one/index.d.ts +116 -108
- package/generated/react/icons/icon-trending-three/index.d.ts +116 -108
- package/generated/react/icons/icon-trending-two/index.d.ts +116 -108
- package/generated/react/icons/icon-triangle-exclamation/index.d.ts +116 -108
- package/generated/react/icons/icon-truck/index.d.ts +116 -108
- package/generated/react/icons/icon-umbrella-security/index.d.ts +116 -108
- package/generated/react/icons/icon-unlocked/index.d.ts +116 -108
- package/generated/react/icons/icon-volume-full/index.d.ts +116 -108
- package/generated/react/icons/icon-volume-half/index.d.ts +116 -108
- package/generated/react/icons/icon-volume-off/index.d.ts +116 -108
- package/generated/react/icons/icon-wallet/index.d.ts +116 -108
- package/generated/react/icons/icon-warning-sign/index.d.ts +116 -108
- package/generated/react/icons/icon-wifi-full/index.d.ts +116 -108
- package/generated/react/icons/icon-youtube/index.d.ts +116 -108
- package/generated/react/icons/icon-zap/index.d.ts +116 -108
- package/generated/react/icons/icon-zoom-in/index.d.ts +116 -108
- package/generated/react/icons/icon-zoom-out/index.d.ts +116 -108
- package/generated/react/img/index.d.ts +116 -108
- package/generated/react/index.d.ts +11 -8
- package/generated/react/index.js +11 -8
- package/generated/react/input/index.d.ts +139 -131
- package/generated/react/link/index.d.ts +117 -109
- package/generated/react/list/index.d.ts +114 -106
- package/generated/react/list-item/index.d.ts +114 -106
- package/generated/react/list-item-pattern-01/index.d.ts +121 -113
- package/generated/react/mask/index.d.ts +117 -109
- package/generated/react/menu-button/index.d.ts +120 -112
- package/generated/react/menu-heading/index.d.ts +114 -106
- package/generated/react/menu-item/index.d.ts +114 -106
- package/generated/react/option/index.d.ts +118 -110
- package/generated/react/pagination/index.d.ts +120 -112
- package/generated/react/popover/index.d.ts +123 -115
- package/generated/react/radio/index.d.ts +119 -111
- package/generated/react/radio-group/index.d.ts +127 -119
- package/generated/react/rich-text/index.d.ts +114 -106
- package/generated/react/segment/index.d.ts +118 -110
- package/generated/react/segmented-control/index.d.ts +116 -108
- package/generated/react/select/index.d.ts +129 -121
- package/generated/react/sensitive-account/index.d.ts +118 -110
- package/generated/react/sensitive-date/index.d.ts +117 -109
- package/generated/react/sensitive-number/index.d.ts +118 -110
- package/generated/react/signal/index.d.ts +114 -106
- package/generated/react/spinner/index.d.ts +117 -109
- package/generated/react/switch/index.d.ts +126 -118
- package/generated/react/tab/index.d.ts +682 -0
- package/generated/react/tab/index.js +14 -0
- package/generated/react/tab-panel/index.d.ts +675 -0
- package/generated/react/tab-panel/index.js +14 -0
- package/generated/react/table/index.d.ts +125 -117
- package/generated/react/tabs/index.d.ts +699 -0
- package/generated/react/tabs/index.js +14 -0
- package/generated/react/text/index.d.ts +115 -107
- package/generated/react/textarea/index.d.ts +137 -129
- package/generated/react/theme/index.d.ts +114 -106
- package/generated/react/video/index.d.ts +114 -106
- package/package.json +7 -1
- package/primitives/listbox/listbox.trans.styles.scss.js +1 -1
- package/primitives/listbox/option.trans.styles.scss.js +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -41,7 +41,7 @@ const style = css`
|
|
|
41
41
|
padding-inline: var(--gds-sys-space-xl);
|
|
42
42
|
position: relative;
|
|
43
43
|
text-decoration: none;
|
|
44
|
-
transition-property: color, border-
|
|
44
|
+
transition-property: color, border-color, background;
|
|
45
45
|
transition-duration: 0.2s;
|
|
46
46
|
flex: 1;
|
|
47
47
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n @layer _base, _ranks, _overrides;\n :host {\n display: inline-block;\n }\n @layer _base {\n .button {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n font-family: inherit;\n padding: 0;\n padding-left: 1rem;\n padding-right: 1rem;\n padding-bottom: 0.75rem;\n padding-top: 0.75rem;\n border-radius: 0.25rem;\n border: solid 1px var(--gds-sys-color-base-600);\n font-weight: 500;\n }\n .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n .button:focus, .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n .button {\n min-height: 2.75rem;\n align-items: center;\n display: inline-flex;\n justify-content: center;\n }\n @media (max-width: 35.98em) {\n .button {\n min-width: 100%;\n }\n }\n @media screen and (-ms-high-contrast: active) {\n .button {\n border: 2px solid currentcolor;\n }\n }\n .button.small {\n min-height: 2rem;\n height: 2rem;\n padding: 0.4375rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1rem;\n }\n .button.large {\n min-height: 4rem;\n padding: 1rem 1.5rem;\n font-size: 1.5rem;\n line-height: 2rem;\n }\n .button {\n box-sizing: border-box;\n font-size: inherit;\n overflow: hidden;\n display: flex;\n gap: 0.5rem;\n text-decoration: none;\n width: 100%;\n }\n .button slot:not([name]) {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n :host(:not([variant=ghost])) .button {\n transition: border var(--gds-sys-transition);\n }\n :host(:not([variant=ghost])) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-blue-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-blue-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-blue-1);\n }\n :host(:not([variant=ghost])) .button[aria-selected=true], :host(:not([variant=ghost])) .button:active, :host(:not([variant=ghost])) .button.active, :host(:not([variant=ghost])) .button.active:hover, :host(:not([variant=ghost])) .button:active:hover {\n background: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-blue-2);\n }\n :host(:not([variant=ghost])) .button {\n background: var(--gds-sys-color-dark-blue-2);\n border-color: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --color: var(--gds-sys-color-text-white);\n }\n :host(:not([variant=ghost])) .button:disabled, :host(:not([variant=ghost])) .button.disabled, :host(:not([variant=ghost])) .button[aria-disabled=true] {\n background: var(--gds-sys-color-base-300) !important;\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host(:not([variant=ghost])) .button:disabled::-moz-placeholder, :host(:not([variant=ghost])) .button.disabled::-moz-placeholder, :host(:not([variant=ghost])) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host(:not([variant=ghost])) .button:disabled::placeholder, :host(:not([variant=ghost])) .button.disabled::placeholder, :host(:not([variant=ghost])) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=secondary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([rank*=secondary]) .button:focus, :host([rank*=secondary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([rank*=secondary]) .button {\n transition: border var(--gds-sys-transition);\n }\n :host([rank*=secondary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-blue-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-blue-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-blue-1);\n }\n :host([rank*=secondary]) .button[aria-selected=true], :host([rank*=secondary]) .button:active, :host([rank*=secondary]) .button.active, :host([rank*=secondary]) .button.active:hover, :host([rank*=secondary]) .button:active:hover {\n background: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=secondary]) .button {\n background: transparent;\n border-color: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-dark-blue-2);\n --color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=secondary]) .button:disabled, :host([rank*=secondary]) .button.disabled, :host([rank*=secondary]) .button[aria-disabled=true] {\n background: var(--gds-sys-color-base-300) !important;\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host([rank*=secondary]) .button:disabled::-moz-placeholder, :host([rank*=secondary]) .button.disabled::-moz-placeholder, :host([rank*=secondary]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=secondary]) .button:disabled::placeholder, :host([rank*=secondary]) .button.disabled::placeholder, :host([rank*=secondary]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=tertiary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([rank*=tertiary]) .button:focus, :host([rank*=tertiary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([rank*=tertiary]) .button {\n transition: border var(--gds-sys-transition);\n }\n :host([rank*=tertiary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-blue-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-blue-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-blue-1);\n }\n :host([rank*=tertiary]) .button[aria-selected=true], :host([rank*=tertiary]) .button:active, :host([rank*=tertiary]) .button.active, :host([rank*=tertiary]) .button.active:hover, :host([rank*=tertiary]) .button:active:hover {\n background: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=tertiary]) .button {\n background: transparent;\n border-color: transparent;\n color: var(--gds-sys-color-dark-blue-2);\n --color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=tertiary]) .button:disabled, :host([rank*=tertiary]) .button.disabled, :host([rank*=tertiary]) .button[aria-disabled=true] {\n background: var(--gds-sys-color-base-300) !important;\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host([rank*=tertiary]) .button:disabled::-moz-placeholder, :host([rank*=tertiary]) .button.disabled::-moz-placeholder, :host([rank*=tertiary]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=tertiary]) .button:disabled::placeholder, :host([rank*=tertiary]) .button.disabled::placeholder, :host([rank*=tertiary]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n /* stylelint-disable */\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button,\n :host([variant=negative][rank=primary]) .button {\n background: var(--gds-sys-color-dark-red-1);\n border-color: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --color: var(--gds-sys-color-text-white);\n transition: border var(--gds-sys-transition);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:not(:disabled, .disabled, [aria-disabled]):hover,\n :host([variant=negative][rank=primary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-red-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-selected=true], :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:active, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.active, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.active:hover, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:active:hover,\n :host([variant=negative][rank=primary]) .button[aria-selected=true],\n :host([variant=negative][rank=primary]) .button:active,\n :host([variant=negative][rank=primary]) .button.active,\n :host([variant=negative][rank=primary]) .button.active:hover,\n :host([variant=negative][rank=primary]) .button:active:hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-selected]:hover, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.active:hover, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:active:hover,\n :host([variant=negative][rank=primary]) .button[aria-selected]:hover,\n :host([variant=negative][rank=primary]) .button.active:hover,\n :host([variant=negative][rank=primary]) .button:active:hover {\n opacity: 0.9;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:focus:not(:focus-visible),\n :host([variant=negative][rank=primary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:focus, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:focus-visible,\n :host([variant=negative][rank=primary]) .button:focus,\n :host([variant=negative][rank=primary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:disabled, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.disabled, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-disabled=true],\n :host([variant=negative][rank=primary]) .button:disabled,\n :host([variant=negative][rank=primary]) .button.disabled,\n :host([variant=negative][rank=primary]) .button[aria-disabled=true] {\n background: var(--gds-sys-color-background-primary) !important;\n color: var(--gds-sys-color-text-white) !important;\n border-color: var(--gds-sys-color-dark-red-1) !important;\n cursor: not-allowed;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:disabled::-moz-placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.disabled::-moz-placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-disabled=true]::-moz-placeholder, :host([variant=negative][rank=primary]) .button:disabled::-moz-placeholder, :host([variant=negative][rank=primary]) .button.disabled::-moz-placeholder, :host([variant=negative][rank=primary]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:disabled::placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.disabled::placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-disabled=true]::placeholder,\n :host([variant=negative][rank=primary]) .button:disabled::placeholder,\n :host([variant=negative][rank=primary]) .button.disabled::placeholder,\n :host([variant=negative][rank=primary]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n /* stylelint-enable */\n :host([variant=negative][rank=secondary]) .button,\n :host([variant=negative][rank=tertiary]) .button {\n color: var(--gds-sys-color-dark-red-1);\n --color: var(--gds-sys-color-dark-red-1);\n border-color: transparent;\n transition: border var(--gds-sys-transition);\n }\n :host([variant=negative][rank=secondary]) .button:not(:disabled, .disabled, [aria-disabled]):hover,\n :host([variant=negative][rank=tertiary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-red-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative][rank=secondary]) .button[aria-selected=true], :host([variant=negative][rank=secondary]) .button:active, :host([variant=negative][rank=secondary]) .button.active, :host([variant=negative][rank=secondary]) .button.active:hover, :host([variant=negative][rank=secondary]) .button:active:hover,\n :host([variant=negative][rank=tertiary]) .button[aria-selected=true],\n :host([variant=negative][rank=tertiary]) .button:active,\n :host([variant=negative][rank=tertiary]) .button.active,\n :host([variant=negative][rank=tertiary]) .button.active:hover,\n :host([variant=negative][rank=tertiary]) .button:active:hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative][rank=secondary]) .button[aria-selected]:hover, :host([variant=negative][rank=secondary]) .button.active:hover, :host([variant=negative][rank=secondary]) .button:active:hover,\n :host([variant=negative][rank=tertiary]) .button[aria-selected]:hover,\n :host([variant=negative][rank=tertiary]) .button.active:hover,\n :host([variant=negative][rank=tertiary]) .button:active:hover {\n opacity: 0.9;\n }\n :host([variant=negative][rank=secondary]) .button:focus:not(:focus-visible),\n :host([variant=negative][rank=tertiary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([variant=negative][rank=secondary]) .button:focus, :host([variant=negative][rank=secondary]) .button:focus-visible,\n :host([variant=negative][rank=tertiary]) .button:focus,\n :host([variant=negative][rank=tertiary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([variant=negative][rank=secondary]) .button {\n border-color: var(--gds-sys-color-dark-red-2);\n }\n :host([variant=ghost]) .button {\n transition: border var(--gds-sys-transition);\n }\n :host([variant=ghost]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-base-800);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-base-800);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-base-800);\n }\n :host([variant=ghost]) .button[aria-selected=true], :host([variant=ghost]) .button:active, :host([variant=ghost]) .button.active, :host([variant=ghost]) .button.active:hover, :host([variant=ghost]) .button:active:hover {\n background: var(--gds-sys-color-base-800);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-base-800);\n }\n :host([variant=ghost]) .button[aria-selected]:hover, :host([variant=ghost]) .button.active:hover, :host([variant=ghost]) .button:active:hover {\n opacity: 0.9;\n }\n :host([variant=ghost]) .button {\n background-color: transparent;\n border-color: var(--gds-sys-color-base-800);\n color: var(--gds-sys-color-base-800);\n --color: var(--gds-sys-color-base-800);\n }\n :host([variant=ghost]) .button:disabled, :host([variant=ghost]) .button.disabled, :host([variant=ghost]) .button[aria-disabled=true] {\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host([variant=ghost]) .button:disabled::-moz-placeholder, :host([variant=ghost]) .button.disabled::-moz-placeholder, :host([variant=ghost]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([variant=ghost]) .button:disabled::placeholder, :host([variant=ghost]) .button.disabled::placeholder, :host([variant=ghost]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n }\n @layer _overrides {\n :host .button.icon {\n padding: 0.75rem;\n background: transparent;\n border-width: 0px;\n color: currentColor;\n }\n :host .button.icon:hover {\n color: currentColor;\n background: var(--gds-sys-color-base-300);\n }\n :host .button.icon slot {\n display: contents;\n }\n .button.icon.xs {\n min-height: 1.5rem;\n line-height: 0.75rem;\n padding: 0.25rem;\n }\n .button.icon.small {\n padding: 0.5rem;\n }\n .button.icon.large {\n padding: 1rem;\n }\n }\n}";
|
|
1
|
+
const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n @layer _base, _ranks, _overrides;\n :host {\n display: inline-block;\n }\n @layer _base {\n .button {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n font-family: inherit;\n padding: 0;\n padding-left: 1rem \"\";\n padding-right: 1rem \"\";\n padding-bottom: 0.75rem \"\";\n padding-top: 0.75rem \"\";\n border-radius: 0.25rem;\n border: solid 1px var(--gds-sys-color-base-600);\n font-weight: 500;\n }\n .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n .button:focus, .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n .button {\n min-height: 2.75rem;\n align-items: center;\n display: inline-flex;\n justify-content: center;\n }\n @media (max-width: 35.98em) {\n .button {\n min-width: 100%;\n }\n }\n @media screen and (-ms-high-contrast: active) {\n .button {\n border: 2px solid currentcolor;\n }\n }\n .button.small {\n min-height: 2rem;\n height: 2rem;\n padding: 0.4375rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1rem;\n }\n .button.large {\n min-height: 4rem;\n padding: 1rem 1.5rem;\n font-size: 1.5rem;\n line-height: 2rem;\n }\n .button {\n box-sizing: border-box;\n font-size: inherit;\n overflow: hidden;\n display: flex;\n gap: 0.5rem;\n text-decoration: none;\n width: 100%;\n }\n .button slot:not([name]) {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n :host(:not([variant=ghost])) .button {\n transition: border var(--gds-sys-transition);\n }\n :host(:not([variant=ghost])) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-blue-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-blue-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-blue-1);\n }\n :host(:not([variant=ghost])) .button[aria-selected=true], :host(:not([variant=ghost])) .button:active, :host(:not([variant=ghost])) .button.active, :host(:not([variant=ghost])) .button.active:hover, :host(:not([variant=ghost])) .button:active:hover {\n background: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-blue-2);\n }\n :host(:not([variant=ghost])) .button {\n background: var(--gds-sys-color-dark-blue-2);\n border-color: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --color: var(--gds-sys-color-text-white);\n }\n :host(:not([variant=ghost])) .button:disabled, :host(:not([variant=ghost])) .button.disabled, :host(:not([variant=ghost])) .button[aria-disabled=true] {\n background: var(--gds-sys-color-base-300) !important;\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host(:not([variant=ghost])) .button:disabled::-moz-placeholder, :host(:not([variant=ghost])) .button.disabled::-moz-placeholder, :host(:not([variant=ghost])) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host(:not([variant=ghost])) .button:disabled::placeholder, :host(:not([variant=ghost])) .button.disabled::placeholder, :host(:not([variant=ghost])) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=secondary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([rank*=secondary]) .button:focus, :host([rank*=secondary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([rank*=secondary]) .button {\n transition: border var(--gds-sys-transition);\n }\n :host([rank*=secondary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-blue-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-blue-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-blue-1);\n }\n :host([rank*=secondary]) .button[aria-selected=true], :host([rank*=secondary]) .button:active, :host([rank*=secondary]) .button.active, :host([rank*=secondary]) .button.active:hover, :host([rank*=secondary]) .button:active:hover {\n background: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=secondary]) .button {\n background: transparent;\n border-color: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-dark-blue-2);\n --color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=secondary]) .button:disabled, :host([rank*=secondary]) .button.disabled, :host([rank*=secondary]) .button[aria-disabled=true] {\n background: var(--gds-sys-color-base-300) !important;\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host([rank*=secondary]) .button:disabled::-moz-placeholder, :host([rank*=secondary]) .button.disabled::-moz-placeholder, :host([rank*=secondary]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=secondary]) .button:disabled::placeholder, :host([rank*=secondary]) .button.disabled::placeholder, :host([rank*=secondary]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=tertiary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([rank*=tertiary]) .button:focus, :host([rank*=tertiary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([rank*=tertiary]) .button {\n transition: border var(--gds-sys-transition);\n }\n :host([rank*=tertiary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-blue-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-blue-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-blue-1);\n }\n :host([rank*=tertiary]) .button[aria-selected=true], :host([rank*=tertiary]) .button:active, :host([rank*=tertiary]) .button.active, :host([rank*=tertiary]) .button.active:hover, :host([rank*=tertiary]) .button:active:hover {\n background: var(--gds-sys-color-dark-blue-2);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=tertiary]) .button {\n background: transparent;\n border-color: transparent;\n color: var(--gds-sys-color-dark-blue-2);\n --color: var(--gds-sys-color-dark-blue-2);\n }\n :host([rank*=tertiary]) .button:disabled, :host([rank*=tertiary]) .button.disabled, :host([rank*=tertiary]) .button[aria-disabled=true] {\n background: var(--gds-sys-color-base-300) !important;\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host([rank*=tertiary]) .button:disabled::-moz-placeholder, :host([rank*=tertiary]) .button.disabled::-moz-placeholder, :host([rank*=tertiary]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([rank*=tertiary]) .button:disabled::placeholder, :host([rank*=tertiary]) .button.disabled::placeholder, :host([rank*=tertiary]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n /* stylelint-disable */\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button,\n :host([variant=negative][rank=primary]) .button {\n background: var(--gds-sys-color-dark-red-1);\n border-color: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --color: var(--gds-sys-color-text-white);\n transition: border var(--gds-sys-transition);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:not(:disabled, .disabled, [aria-disabled]):hover,\n :host([variant=negative][rank=primary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-red-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-selected=true], :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:active, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.active, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.active:hover, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:active:hover,\n :host([variant=negative][rank=primary]) .button[aria-selected=true],\n :host([variant=negative][rank=primary]) .button:active,\n :host([variant=negative][rank=primary]) .button.active,\n :host([variant=negative][rank=primary]) .button.active:hover,\n :host([variant=negative][rank=primary]) .button:active:hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-selected]:hover, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.active:hover, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:active:hover,\n :host([variant=negative][rank=primary]) .button[aria-selected]:hover,\n :host([variant=negative][rank=primary]) .button.active:hover,\n :host([variant=negative][rank=primary]) .button:active:hover {\n opacity: 0.9;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:focus:not(:focus-visible),\n :host([variant=negative][rank=primary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:focus, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:focus-visible,\n :host([variant=negative][rank=primary]) .button:focus,\n :host([variant=negative][rank=primary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:disabled, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.disabled, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-disabled=true],\n :host([variant=negative][rank=primary]) .button:disabled,\n :host([variant=negative][rank=primary]) .button.disabled,\n :host([variant=negative][rank=primary]) .button[aria-disabled=true] {\n background: var(--gds-sys-color-background-primary) !important;\n color: var(--gds-sys-color-text-white) !important;\n border-color: var(--gds-sys-color-dark-red-1) !important;\n cursor: not-allowed;\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:disabled::-moz-placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.disabled::-moz-placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-disabled=true]::-moz-placeholder, :host([variant=negative][rank=primary]) .button:disabled::-moz-placeholder, :host([variant=negative][rank=primary]) .button.disabled::-moz-placeholder, :host([variant=negative][rank=primary]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button:disabled::placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button.disabled::placeholder, :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button[aria-disabled=true]::placeholder,\n :host([variant=negative][rank=primary]) .button:disabled::placeholder,\n :host([variant=negative][rank=primary]) .button.disabled::placeholder,\n :host([variant=negative][rank=primary]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n /* stylelint-enable */\n :host([variant=negative][rank=secondary]) .button,\n :host([variant=negative][rank=tertiary]) .button {\n color: var(--gds-sys-color-dark-red-1);\n --color: var(--gds-sys-color-dark-red-1);\n border-color: transparent;\n transition: border var(--gds-sys-transition);\n }\n :host([variant=negative][rank=secondary]) .button:not(:disabled, .disabled, [aria-disabled]):hover,\n :host([variant=negative][rank=tertiary]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-dark-red-1);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative][rank=secondary]) .button[aria-selected=true], :host([variant=negative][rank=secondary]) .button:active, :host([variant=negative][rank=secondary]) .button.active, :host([variant=negative][rank=secondary]) .button.active:hover, :host([variant=negative][rank=secondary]) .button:active:hover,\n :host([variant=negative][rank=tertiary]) .button[aria-selected=true],\n :host([variant=negative][rank=tertiary]) .button:active,\n :host([variant=negative][rank=tertiary]) .button.active,\n :host([variant=negative][rank=tertiary]) .button.active:hover,\n :host([variant=negative][rank=tertiary]) .button:active:hover {\n background: var(--gds-sys-color-dark-red-1);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-dark-red-1);\n }\n :host([variant=negative][rank=secondary]) .button[aria-selected]:hover, :host([variant=negative][rank=secondary]) .button.active:hover, :host([variant=negative][rank=secondary]) .button:active:hover,\n :host([variant=negative][rank=tertiary]) .button[aria-selected]:hover,\n :host([variant=negative][rank=tertiary]) .button.active:hover,\n :host([variant=negative][rank=tertiary]) .button:active:hover {\n opacity: 0.9;\n }\n :host([variant=negative][rank=secondary]) .button:focus:not(:focus-visible),\n :host([variant=negative][rank=tertiary]) .button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n :host([variant=negative][rank=secondary]) .button:focus, :host([variant=negative][rank=secondary]) .button:focus-visible,\n :host([variant=negative][rank=tertiary]) .button:focus,\n :host([variant=negative][rank=tertiary]) .button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n :host([variant=negative][rank=secondary]) .button {\n border-color: var(--gds-sys-color-dark-red-2);\n }\n :host([variant=ghost]) .button {\n transition: border var(--gds-sys-transition);\n }\n :host([variant=ghost]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background: var(--gds-sys-color-base-800);\n color: var(--gds-sys-color-text-white);\n --background: var(--gds-sys-color-base-800);\n --color: var(--gds-sys-color-text-white);\n border-color: var(--gds-sys-color-base-800);\n }\n :host([variant=ghost]) .button[aria-selected=true], :host([variant=ghost]) .button:active, :host([variant=ghost]) .button.active, :host([variant=ghost]) .button.active:hover, :host([variant=ghost]) .button:active:hover {\n background: var(--gds-sys-color-base-800);\n color: var(--gds-sys-color-text-white);\n --background: $bg;\n --color: $color;\n border-color: var(--gds-sys-color-base-800);\n }\n :host([variant=ghost]) .button[aria-selected]:hover, :host([variant=ghost]) .button.active:hover, :host([variant=ghost]) .button:active:hover {\n opacity: 0.9;\n }\n :host([variant=ghost]) .button {\n background-color: transparent;\n border-color: var(--gds-sys-color-base-800);\n color: var(--gds-sys-color-base-800);\n --color: var(--gds-sys-color-base-800);\n }\n :host([variant=ghost]) .button:disabled, :host([variant=ghost]) .button.disabled, :host([variant=ghost]) .button[aria-disabled=true] {\n color: var(--gds-sys-color-text-disabled) !important;\n border-color: var(--gds-sys-color-text-disabled) !important;\n cursor: not-allowed;\n }\n :host([variant=ghost]) .button:disabled::-moz-placeholder, :host([variant=ghost]) .button.disabled::-moz-placeholder, :host([variant=ghost]) .button[aria-disabled=true]::-moz-placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n :host([variant=ghost]) .button:disabled::placeholder, :host([variant=ghost]) .button.disabled::placeholder, :host([variant=ghost]) .button[aria-disabled=true]::placeholder {\n color: var(--gds-sys-color-text-disabled);\n }\n }\n @layer _overrides {\n :host .button.icon {\n padding: 0.75rem;\n background: transparent;\n border-width: 0px;\n color: currentColor;\n }\n :host .button.icon:hover {\n color: currentColor;\n background: var(--gds-sys-color-base-300);\n }\n :host .button.icon slot {\n display: contents;\n }\n .button.icon.xs {\n min-height: 1.5rem;\n line-height: 0.75rem;\n padding: 0.25rem;\n }\n .button.icon.small {\n padding: 0.5rem;\n }\n .button.icon.large {\n padding: 1rem;\n }\n }\n}";
|
|
2
2
|
export default styles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n @layer _base, _overrides;\n :host {\n display: inline-block;\n }\n @layer _base {\n button {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n font-family: inherit;\n padding: 0;\n padding-left: 1rem;\n padding-right: 1rem;\n padding-bottom: 0.75rem;\n padding-top: 0.75rem;\n border-radius: 0.25rem;\n border: solid 1px var(--gds-sys-color-base-600);\n font-weight: 500;\n }\n button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n button:focus, button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n button {\n min-height: 2.75rem;\n align-items: center;\n display: inline-flex;\n justify-content: center;\n }\n @media (max-width: 35.98em) {\n button {\n min-width: 100%;\n }\n }\n @media screen and (-ms-high-contrast: active) {\n button {\n border: 2px solid currentcolor;\n }\n }\n button.small {\n min-height: 2rem;\n height: 2rem;\n padding: 0.4375rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1rem;\n }\n button.large {\n min-height: 4rem;\n padding: 1rem 1.5rem;\n font-size: 1.5rem;\n line-height: 2rem;\n }\n button {\n background-color: transparent;\n border: 0.0625rem solid transparent;\n padding: 0.625rem;\n height: 2.75rem;\n width: 2.75rem;\n min-width: auto;\n --color: var(--gds-sys-color-base-800);\n }\n .gds-form-group button {\n margin-top: -0.625rem;\n }\n button.small {\n height: 2rem;\n width: 2rem;\n padding: 0.4375rem;\n line-height: 1.125rem;\n }\n button svg {\n height: 1rem;\n width: 1rem;\n }\n button path,\n button line,\n button circle,\n button rect,\n button ellipse,\n button polyline,\n button text {\n fill: var(--gds-sys-color-base-800);\n stroke: var(--gds-sys-color-base-800);\n transition: all var(--gds-sys-transition);\n }\n button:hover, button.highlighted {\n background-color: rgba(0, 0, 0, 0.1);\n border-color: transparent;\n }\n button:active, button.highlighted:hover {\n background-color: rgba(0, 0, 0, 0.2);\n border-color: transparent;\n }\n }\n @layer _overrides {\n button {\n border-color: transparent;\n color: var(--gds-sys-color-base-800);\n display: flex;\n gap: 0.5rem;\n line-height: 0.75;\n padding-inline: 0.4375rem;\n width: auto;\n }\n button.highlighted {\n background-color: var(--gds-sys-color-base-300);\n }\n }\n}";
|
|
1
|
+
const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n @layer _base, _overrides;\n :host {\n display: inline-block;\n }\n @layer _base {\n button {\n background-color: transparent;\n border: 0;\n cursor: pointer;\n font-family: inherit;\n padding: 0;\n padding-left: 1rem \"\";\n padding-right: 1rem \"\";\n padding-bottom: 0.75rem \"\";\n padding-top: 0.75rem \"\";\n border-radius: 0.25rem;\n border: solid 1px var(--gds-sys-color-base-600);\n font-weight: 500;\n }\n button:focus:not(:focus-visible) {\n box-shadow: none;\n outline: 0;\n }\n button:focus, button:focus-visible {\n outline-color: var(--gds-sys-color-focus-outline);\n outline-style: solid;\n outline-width: 0.125rem;\n outline-offset: 0.125rem;\n }\n button {\n min-height: 2.75rem;\n align-items: center;\n display: inline-flex;\n justify-content: center;\n }\n @media (max-width: 35.98em) {\n button {\n min-width: 100%;\n }\n }\n @media screen and (-ms-high-contrast: active) {\n button {\n border: 2px solid currentcolor;\n }\n }\n button.small {\n min-height: 2rem;\n height: 2rem;\n padding: 0.4375rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1rem;\n }\n button.large {\n min-height: 4rem;\n padding: 1rem 1.5rem;\n font-size: 1.5rem;\n line-height: 2rem;\n }\n button {\n background-color: transparent;\n border: 0.0625rem solid transparent;\n padding: 0.625rem;\n height: 2.75rem;\n width: 2.75rem;\n min-width: auto;\n --color: var(--gds-sys-color-base-800);\n }\n .gds-form-group button {\n margin-top: -0.625rem;\n }\n button.small {\n height: 2rem;\n width: 2rem;\n padding: 0.4375rem;\n line-height: 1.125rem;\n }\n button svg {\n height: 1rem;\n width: 1rem;\n }\n button path,\n button line,\n button circle,\n button rect,\n button ellipse,\n button polyline,\n button text {\n fill: var(--gds-sys-color-base-800);\n stroke: var(--gds-sys-color-base-800);\n transition: all var(--gds-sys-transition);\n }\n button:hover, button.highlighted {\n background-color: rgba(0, 0, 0, 0.1);\n border-color: transparent;\n }\n button:active, button.highlighted:hover {\n background-color: rgba(0, 0, 0, 0.2);\n border-color: transparent;\n }\n }\n @layer _overrides {\n button {\n border-color: transparent;\n color: var(--gds-sys-color-base-800);\n display: flex;\n gap: 0.5rem;\n line-height: 0.75;\n padding-inline: 0.4375rem;\n width: auto;\n }\n button.highlighted {\n background-color: var(--gds-sys-color-base-300);\n }\n }\n}";
|
|
2
2
|
export default styles;
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export * from "./signal/index.js";
|
|
|
42
42
|
export * from "./spinner/index.js";
|
|
43
43
|
export * from "./switch/index.js";
|
|
44
44
|
export * from "./text/index.js";
|
|
45
|
+
export * from "./tabs/index.js";
|
|
45
46
|
export * from "./table/index.js";
|
|
46
47
|
export * from "./textarea/index.js";
|
|
47
48
|
export * from "./theme/index.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n :host {\n display: contents;\n }\n :host([open]) dialog {\n box-sizing: border-box;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n visibility: visible;\n }\n :host > div:not([hidden]) {\n display: contents;\n }\n header {\n display: flex;\n }\n header .close::part(_button) {\n border-radius: 100%;\n color: var(--gds-sys-color-text-primary);\n border: 1px solid transparent;\n }\n header .close::part(_button):hover {\n background-color: var(--gds-sys-color-base-300);\n }\n header h2 {\n flex-grow: 1;\n font-weight: 400;\n line-height: 1.5;\n margin: 0.25rem 0 0 0.75rem;\n }\n dialog {\n background-color: var(--gds-sys-color-background-primary);\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 0;\n visibility: hidden;\n position: fixed;\n inset: auto;\n z-index: 1060;\n box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.15);\n color: var(--gds-sys-color-text-primary);\n overflow: hidden;\n padding: 0;\n padding-bottom: 0;\n border: solid 1px var(--gds-sys-color-base-600);\n --border-color: var(--gds-sys-color-text-primary);\n border-radius: 0.25rem;\n }\n @media (max-width: 35.98em) {\n dialog.use-modal-in-mobile {\n border-top: solid 1px var(--gds-sys-color-base-600);\n --border-color: var(--gds-sys-color-base-600);\n padding-bottom: 0.5rem;\n border-radius: 1rem 1rem 0 0;\n bottom: 0;\n left: 0;\n transition: all 300ms ease-in-out;\n width: 100%;\n border: 1px solid var(--border-color);\n border-radius: 0.25rem;\n max-height: 80svh;\n padding-bottom: 0;\n inset: 0;\n }\n dialog.use-modal-in-mobile.v-kb-visible {\n inset-block-end: auto;\n max-height: 50svh;\n top: 1rem;\n }\n }\n @media (min-width: 36em) {\n dialog.use-modal-in-mobile header {\n display: none;\n }\n }\n @media (min-width: 36em) {\n dialog.use-modal-in-mobile:not(.has-backdrop)::backdrop {\n opacity: 0;\n }\n }\n dialog::backdrop {\n background-color: rgba(0, 0, 0, 0.2);\n display: block;\n position: fixed;\n }\n dialog:not(.use-modal-in-mobile) header {\n display: none;\n }\n dialog:not(.use-modal-in-mobile)::backdrop {\n opacity: 0;\n }\n}";
|
|
1
|
+
const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n :host {\n display: contents;\n }\n :host([open]) dialog {\n box-sizing: border-box;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n visibility: visible;\n }\n :host > div:not([hidden]) {\n display: contents;\n }\n header {\n display: flex;\n }\n header .close::part(_button) {\n border-radius: 100%;\n color: var(--gds-sys-color-text-primary);\n border: 1px solid transparent;\n }\n header .close::part(_button):hover {\n background-color: var(--gds-sys-color-base-300);\n }\n header h2 {\n flex-grow: 1;\n font-weight: 400;\n line-height: 1.5;\n margin: 0.25rem 0 0 0.75rem;\n }\n dialog {\n background-color: var(--gds-sys-color-background-primary);\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 0;\n visibility: hidden;\n position: fixed;\n inset: auto;\n z-index: 1060;\n box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.15);\n color: var(--gds-sys-color-text-primary);\n overflow: hidden;\n padding: 0;\n padding-bottom: 0 \"\";\n border: solid 1px var(--gds-sys-color-base-600);\n --border-color: var(--gds-sys-color-text-primary);\n border-radius: 0.25rem;\n }\n @media (max-width: 35.98em) {\n dialog.use-modal-in-mobile {\n border-top: solid 1px var(--gds-sys-color-base-600);\n --border-color: var(--gds-sys-color-base-600);\n padding-bottom: 0.5rem \"\";\n border-radius: 1rem 1rem 0 0;\n bottom: 0;\n left: 0;\n transition: all 300ms ease-in-out;\n width: 100%;\n border: 1px solid var(--border-color);\n border-radius: 0.25rem;\n max-height: 80svh;\n padding-bottom: 0;\n inset: 0;\n }\n dialog.use-modal-in-mobile.v-kb-visible {\n inset-block-end: auto;\n max-height: 50svh;\n top: 1rem;\n }\n }\n @media (min-width: 36em) {\n dialog.use-modal-in-mobile header {\n display: none;\n }\n }\n @media (min-width: 36em) {\n dialog.use-modal-in-mobile:not(.has-backdrop)::backdrop {\n opacity: 0;\n }\n }\n dialog::backdrop {\n background-color: rgba(0, 0, 0, 0.2);\n display: block;\n position: fixed;\n }\n dialog:not(.use-modal-in-mobile) header {\n display: none;\n }\n dialog:not(.use-modal-in-mobile)::backdrop {\n opacity: 0;\n }\n}";
|
|
2
2
|
export default styles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tab';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tab.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GdsElement } from '../../../gds-element';
|
|
2
|
+
import type { GdsTabPanel } from '../tab-panel/tab-panel.component';
|
|
3
|
+
/**
|
|
4
|
+
* @element gds-tab
|
|
5
|
+
* @status beta
|
|
6
|
+
*
|
|
7
|
+
* @summary A tab component for use inside `<gds-tabs>`.
|
|
8
|
+
*
|
|
9
|
+
* @slot lead - Optional content before the label (e.g. an icon)
|
|
10
|
+
* @slot - The tab label text content
|
|
11
|
+
* @slot trail - Optional content after the label (e.g. a badge)
|
|
12
|
+
*
|
|
13
|
+
* @event click - Fired when the tab is clicked. Note that clicks on disabled tabs are ignored.
|
|
14
|
+
*/
|
|
15
|
+
export declare class GdsTab extends GdsElement {
|
|
16
|
+
#private;
|
|
17
|
+
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
18
|
+
/**
|
|
19
|
+
* Optional size variant. When set to "small", applies reduced padding.
|
|
20
|
+
*/
|
|
21
|
+
size: 'small' | 'medium';
|
|
22
|
+
/**
|
|
23
|
+
* Disables selection of this tab.
|
|
24
|
+
*/
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether this tab is currently selected. Managed by the parent `<gds-tabs>`.
|
|
28
|
+
*/
|
|
29
|
+
selected: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The `name` of the `<gds-tab-panel>` to associate with this tab.
|
|
32
|
+
* When set, this tab controls the panel whose `name` attribute matches,
|
|
33
|
+
* regardless of DOM order. When omitted, pairing falls back to position.
|
|
34
|
+
*/
|
|
35
|
+
panel: string;
|
|
36
|
+
/**
|
|
37
|
+
* The resolved associated `<gds-tab-panel>` element, if any. Managed by
|
|
38
|
+
* the parent `<gds-tabs>`.
|
|
39
|
+
*/
|
|
40
|
+
get panelEl(): GdsTabPanel | undefined;
|
|
41
|
+
connectedCallback(): void;
|
|
42
|
+
private _handleSelectedChange;
|
|
43
|
+
private _handleDisabledChange;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
_setPanelEl(panelEl?: GdsTabPanel): void;
|
|
48
|
+
render(): any;
|
|
49
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass,
|
|
3
|
+
__privateAdd,
|
|
4
|
+
__privateGet,
|
|
5
|
+
__privateMethod,
|
|
6
|
+
__privateSet
|
|
7
|
+
} from "../../../chunks/chunk.CAV4X6PU.js";
|
|
8
|
+
var _internals, _panelEl, _handleLeadTrailSlotChange, _updateSlottedIconSolid, updateSlottedIconSolid_fn, _syncAria, syncAria_fn;
|
|
9
|
+
import { property } from "lit/decorators.js";
|
|
10
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
11
|
+
import { GdsElement } from "../../../gds-element.js";
|
|
12
|
+
import { gdsCustomElement, html } from "../../../scoping.js";
|
|
13
|
+
import { tokens } from "../../../tokens.style.js";
|
|
14
|
+
import { watch } from "../../../utils/decorators/watch.js";
|
|
15
|
+
import TabStyles from "./tab.styles.js";
|
|
16
|
+
let GdsTab = class extends GdsElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
__privateAdd(this, _updateSlottedIconSolid);
|
|
20
|
+
__privateAdd(this, _syncAria);
|
|
21
|
+
__privateAdd(this, _internals, this.attachInternals());
|
|
22
|
+
__privateAdd(this, _panelEl, void 0);
|
|
23
|
+
this.size = "medium";
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
this.selected = false;
|
|
26
|
+
this.panel = "";
|
|
27
|
+
__privateAdd(this, _handleLeadTrailSlotChange, () => {
|
|
28
|
+
__privateMethod(this, _updateSlottedIconSolid, updateSlottedIconSolid_fn).call(this);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The resolved associated `<gds-tab-panel>` element, if any. Managed by
|
|
33
|
+
* the parent `<gds-tabs>`.
|
|
34
|
+
*/
|
|
35
|
+
get panelEl() {
|
|
36
|
+
return __privateGet(this, _panelEl);
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
super.connectedCallback();
|
|
40
|
+
__privateMethod(this, _syncAria, syncAria_fn).call(this);
|
|
41
|
+
this.addEventListener("click", () => void 0);
|
|
42
|
+
this.addEventListener("keydown", (event) => {
|
|
43
|
+
if (event.key === "Tab") {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
__privateGet(this, _panelEl)?.focus();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
_handleSelectedChange() {
|
|
50
|
+
__privateMethod(this, _updateSlottedIconSolid, updateSlottedIconSolid_fn).call(this);
|
|
51
|
+
__privateMethod(this, _syncAria, syncAria_fn).call(this);
|
|
52
|
+
}
|
|
53
|
+
_handleDisabledChange() {
|
|
54
|
+
__privateMethod(this, _syncAria, syncAria_fn).call(this);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
_setPanelEl(panelEl) {
|
|
60
|
+
__privateSet(this, _panelEl, panelEl);
|
|
61
|
+
__privateMethod(this, _syncAria, syncAria_fn).call(this);
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return html`<div class=${classMap({ small: this.size === "small" })}>
|
|
65
|
+
<slot name="lead" @slotchange=${__privateGet(this, _handleLeadTrailSlotChange)}></slot>
|
|
66
|
+
<slot></slot>
|
|
67
|
+
<slot name="trail" @slotchange=${__privateGet(this, _handleLeadTrailSlotChange)}></slot>
|
|
68
|
+
</div>`;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
_internals = new WeakMap();
|
|
72
|
+
_panelEl = new WeakMap();
|
|
73
|
+
_handleLeadTrailSlotChange = new WeakMap();
|
|
74
|
+
_updateSlottedIconSolid = new WeakSet();
|
|
75
|
+
updateSlottedIconSolid_fn = function() {
|
|
76
|
+
const slotNames = ["lead", "trail"];
|
|
77
|
+
for (const name of slotNames) {
|
|
78
|
+
const slot = this.renderRoot.querySelector(
|
|
79
|
+
`slot[name="${name}"]`
|
|
80
|
+
);
|
|
81
|
+
for (const el of slot?.assignedElements({ flatten: true }) ?? []) {
|
|
82
|
+
if ("solid" in el) {
|
|
83
|
+
;
|
|
84
|
+
el.solid = this.selected;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
_syncAria = new WeakSet();
|
|
90
|
+
syncAria_fn = function() {
|
|
91
|
+
this.setAttribute("role", "tab");
|
|
92
|
+
__privateGet(this, _internals).ariaSelected = this.selected ? "true" : "false";
|
|
93
|
+
this.tabIndex = this.selected && !this.disabled ? 0 : -1;
|
|
94
|
+
__privateGet(this, _internals).ariaControlsElements = __privateGet(this, _panelEl) ? [__privateGet(this, _panelEl)] : [];
|
|
95
|
+
};
|
|
96
|
+
GdsTab.styles = [tokens, TabStyles];
|
|
97
|
+
__decorateClass([
|
|
98
|
+
property({ reflect: true })
|
|
99
|
+
], GdsTab.prototype, "size", 2);
|
|
100
|
+
__decorateClass([
|
|
101
|
+
property({ type: Boolean, reflect: true })
|
|
102
|
+
], GdsTab.prototype, "disabled", 2);
|
|
103
|
+
__decorateClass([
|
|
104
|
+
property({ type: Boolean, reflect: true })
|
|
105
|
+
], GdsTab.prototype, "selected", 2);
|
|
106
|
+
__decorateClass([
|
|
107
|
+
property()
|
|
108
|
+
], GdsTab.prototype, "panel", 2);
|
|
109
|
+
__decorateClass([
|
|
110
|
+
watch("selected")
|
|
111
|
+
], GdsTab.prototype, "_handleSelectedChange", 1);
|
|
112
|
+
__decorateClass([
|
|
113
|
+
watch("disabled")
|
|
114
|
+
], GdsTab.prototype, "_handleDisabledChange", 1);
|
|
115
|
+
GdsTab = __decorateClass([
|
|
116
|
+
gdsCustomElement("gds-tab")
|
|
117
|
+
], GdsTab);
|
|
118
|
+
export {
|
|
119
|
+
GdsTab
|
|
120
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "../../../chunks/chunk.CAV4X6PU.js";
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
const style = css`
|
|
4
|
+
@layer base {
|
|
5
|
+
:host {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
div {
|
|
10
|
+
position: relative;
|
|
11
|
+
border-radius: var(--gds-sys-radius-xs);
|
|
12
|
+
appearance: none;
|
|
13
|
+
background: none;
|
|
14
|
+
border: 0;
|
|
15
|
+
color: var(--gds-sys-color-content-neutral-02);
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
font: var(--gds-sys-text-detail-m-book);
|
|
21
|
+
outline-width: 2px;
|
|
22
|
+
outline-style: solid;
|
|
23
|
+
outline-offset: -4px;
|
|
24
|
+
outline-color: transparent;
|
|
25
|
+
padding-inline: var(--gds-sys-space-s);
|
|
26
|
+
height: 44px;
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
transition-property: color, outline-color;
|
|
29
|
+
transition-duration: 0.2s;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
gap: var(--gds-sys-space-xs);
|
|
32
|
+
|
|
33
|
+
@media (pointer: fine) {
|
|
34
|
+
&:hover {
|
|
35
|
+
color: var(--gds-sys-color-content-neutral-01);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.small {
|
|
40
|
+
padding-inline: var(--gds-sys-space-xs);
|
|
41
|
+
height: 30px;
|
|
42
|
+
font: var(--gds-sys-text-detail-s-book);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(:focus) {
|
|
47
|
+
outline-color: var(--gds-sys-color-content-neutral-01);
|
|
48
|
+
outline-offset: -3px;
|
|
49
|
+
|
|
50
|
+
&:not(:focus-visible) {
|
|
51
|
+
outline-color: transparent;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([selected]) div {
|
|
56
|
+
color: var(--gds-sys-color-content-neutral-01);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([disabled]) div {
|
|
60
|
+
color: var(--gds-sys-color-content-disabled-01);
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
var tab_styles_default = style;
|
|
67
|
+
export {
|
|
68
|
+
tab_styles_default as default
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tab-panel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tab-panel.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { GdsElement } from '../../../gds-element';
|
|
2
|
+
import type { GdsTab } from '../tab/tab.component';
|
|
3
|
+
/**
|
|
4
|
+
* @element gds-tab-panel
|
|
5
|
+
* @status beta
|
|
6
|
+
*
|
|
7
|
+
* @summary A tab panel component for use inside `<gds-tabs>`.
|
|
8
|
+
*
|
|
9
|
+
* @slot - Panel content
|
|
10
|
+
*/
|
|
11
|
+
export declare class GdsTabPanel extends GdsElement {
|
|
12
|
+
#private;
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
/**
|
|
15
|
+
* A unique name used to associate this panel with a `<gds-tab panel="...">.`
|
|
16
|
+
* Must be unique within the parent `<gds-tabs>`.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* The resolved associated `<gds-tab>` element, if any. Managed by the parent `<gds-tabs>`.
|
|
21
|
+
*/
|
|
22
|
+
get tabEl(): GdsTab | undefined;
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
_setTabEl(tabEl?: GdsTab): void;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
_setSelected(selected: boolean): void;
|
|
32
|
+
render(): any;
|
|
33
|
+
}
|