@sebgroup/green-core 2.11.0 → 2.12.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/button/button.trans.styles.scss.js +1 -1
- package/components/card-linked/card-linked.component.d.ts +12 -0
- package/components/card-linked/card-linked.component.js +33 -0
- package/components/card-linked/card-linked.d.ts +2 -0
- package/components/card-linked/card-linked.js +6 -0
- package/components/card-linked/card-linked.styles.d.ts +2 -0
- package/components/card-linked/card-linked.styles.js +56 -0
- package/components/card-linked/index.d.ts +1 -0
- package/components/card-linked/index.js +1 -0
- package/components/context-menu/context-menu.component.d.ts +2 -2
- package/components/context-menu/context-menu.component.js +69 -46
- package/components/div/div.component.d.ts +15 -0
- package/components/div/div.component.js +9 -0
- package/components/div/div.styles.js +0 -6
- package/components/img/img.component.d.ts +1 -13
- package/components/img/img.component.js +7 -9
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/link/link.component.d.ts +1 -17
- package/components/link/link.component.js +2 -14
- package/components/popover/popover.component.d.ts +6 -0
- package/components/popover/popover.component.js +16 -12
- package/gds-element.js +1 -1
- package/generated/react/card/index.d.ts +3 -0
- package/generated/react/card-linked/index.d.ts +436 -0
- package/generated/react/card-linked/index.js +13 -0
- package/generated/react/card-pattern-01/index.d.ts +403 -0
- package/generated/react/card-pattern-01/index.js +15 -0
- package/generated/react/div/index.d.ts +3 -0
- package/generated/react/flex/index.d.ts +3 -0
- package/generated/react/formatted-account/index.d.ts +3 -0
- package/generated/react/formatted-date/index.d.ts +3 -0
- package/generated/react/formatted-number/index.d.ts +3 -0
- package/generated/react/grid/index.d.ts +3 -0
- package/generated/react/img/index.d.ts +6 -2
- package/generated/react/index.d.ts +7 -5
- package/generated/react/index.js +7 -5
- package/generated/react/link/index.d.ts +4 -4
- package/generated/react/mask/index.d.ts +3 -0
- package/generated/react/sensitive-account/index.d.ts +3 -0
- package/generated/react/sensitive-date/index.d.ts +3 -0
- package/generated/react/sensitive-number/index.d.ts +3 -0
- package/generated/react/text/index.d.ts +3 -0
- package/package.json +6 -2
- package/patterns/card-pattern-01/card-pattern-01.component.d.ts +48 -0
- package/patterns/card-pattern-01/card-pattern-01.component.js +258 -0
- package/patterns/card-pattern-01/card-pattern-01.d.ts +2 -0
- package/patterns/card-pattern-01/card-pattern-01.js +6 -0
- package/patterns/card-pattern-01/card-pattern-01.styles.d.ts +2 -0
- package/patterns/card-pattern-01/card-pattern-01.styles.js +23 -0
- package/patterns/card-pattern-01/index.d.ts +1 -0
- package/patterns/card-pattern-01/index.js +1 -0
- package/patterns/index.d.ts +1 -0
- package/patterns/index.js +1 -0
- package/pure.d.ts +50 -0
- package/pure.js +50 -0
- package/tokens/variables.dark.css.js +1 -1
- package/tokens/variables.light.css.js +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
- package/utils/mixins/props-image.d.ts +17 -0
- package/utils/mixins/props-image.js +35 -0
- package/utils/mixins/props-link.d.ts +17 -0
- package/utils/mixins/props-link.js +33 -0
- package/components/pure.d.ts +0 -48
- package/components/pure.js +0 -48
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const styles = "/* stylelint-disable max-nesting-depth */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n */\n/**\n * Calculate the contrast ratio between two colors.\n * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n */\n/* stylelint-disable */\n/* stylelint-enable */\n/* stylelint-disable */\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 */\ni.sg-icon {\n font-size: 0;\n width: 1rem;\n height: 1rem;\n display: inline-block;\n}\ni.sg-icon::before {\n content: \"\";\n display: inline-block;\n background: var(--color);\n width: 100%;\n height: 100%;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n}\ni.sg-icon.sg-icon-calendar::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 248h80v-56H48v56zm0 48v64h80v-64H48zm128 0v64h96v-64h-96zm144 0v64h80v-64h-80zm80-104h-80v56h80v-56zm0 216h-80v56h64c8.8 0 16-7.2 16-16v-40zm-128 0h-96v56h96v-56zm-144 0H48v40c0 8.8 7.16 16 16 16h64v-56zm144-216h-96v56h96v-56z '/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 248h80v-56H48v56zm0 48v64h80v-64H48zm128 0v64h96v-64h-96zm144 0v64h80v-64h-80zm80-104h-80v56h80v-56zm0 216h-80v56h64c8.8 0 16-7.2 16-16v-40zm-128 0h-96v56h96v-56zm-144 0H48v40c0 8.8 7.16 16 16 16h64v-56zm144-216h-96v56h96v-56z '/%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-calendar-range::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M96 288c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm224 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-128-64c0-13.3 10.7-24 24-24h112c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24zm40 72c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24s10.7-24 24-24h112zM152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 448c0 8.8 7.16 16 16 16h320c8.8 0 16-7.2 16-16V192H48v256z'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M96 288c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm224 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-128-64c0-13.3 10.7-24 24-24h112c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24zm40 72c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24s10.7-24 24-24h112zM152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 448c0 8.8 7.16 16 16 16h320c8.8 0 16-7.2 16-16V192H48v256z'/%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-ellipsis::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z'/%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-grip-vertical::before {\n -webkit-mask-image: url(\"data:image/svg+xml, %3Csvg height='1em' viewBox='0 0 320 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z' /%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml, %3Csvg height='1em' viewBox='0 0 320 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z' /%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-next::before {\n background: none;\n border-bottom: 2px solid;\n border-left: 2px solid;\n content: \"\";\n display: block;\n height: 12px;\n margin-left: -10px;\n margin-top: 2px;\n transform: translate(75%) rotate(-135deg) scaleZ(-1);\n transition: transform 0.3s ease-in;\n width: 12px;\n}\ni.sg-icon.sg-icon-previous::before {\n background: none;\n border-bottom: 2px solid;\n border-left: 2px solid;\n content: \"\";\n display: block;\n height: 12px;\n margin-left: -4px;\n margin-top: 2px;\n transform: translate(75%) rotate(45deg) scaleZ(-1);\n transition: transform 0.3s ease-in;\n width: 12px;\n}\ni.sg-icon.sg-icon-ellipsis::before {\n margin-right: -2px;\n}\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: var(--sg-border-radius);\n border: solid var(--sg-border-width) var(--sg-border-color);\n font-weight: 500;\n min-height: 2.75rem;\n align-items: center;\n display: inline-flex;\n justify-content: center;\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: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 @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 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 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: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n background: rgb(0, 122, 199);\n border-color: rgb(0, 122, 199);\n color: #fff;\n --color: #fff;\n }\n :host(:not([variant=ghost])) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\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-color: rgb(0, 122, 199);\n color: rgb(255, 255, 255);\n --background: rgb(0, 122, 199);\n --color: rgb(255, 255, 255);\n border-color: rgb(0, 122, 199);\n }\n :host(:not([variant=ghost])) .button:focus-visible {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169) !important;\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(--form-control-primary-bg-disabled) !important;\n color: var(--text-primary-disabled-color) !important;\n border-color: var(--border-primary-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n :host([rank*=secondary]) .button {\n transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n background: transparent;\n border-color: rgb(0, 122, 199);\n color: rgb(0, 122, 199);\n --color: rgb(0, 122, 199);\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:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\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-color: rgb(0, 122, 199);\n color: rgb(255, 255, 255);\n --background: rgb(0, 122, 199);\n --color: rgb(255, 255, 255);\n border-color: rgb(0, 122, 199);\n }\n :host([rank*=secondary]) .button:disabled, :host([rank*=secondary]) .button.disabled, :host([rank*=secondary]) .button[aria-disabled=true] {\n background: var(--sg-form-control-bg-disabled) !important;\n color: var(--text-disabled-color) !important;\n border-color: var(--border-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n :host([rank*=tertiary]) .button {\n transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n background: transparent;\n border-color: transparent;\n color: rgb(0, 122, 199);\n --color: rgb(0, 122, 199);\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:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\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-color: rgb(0, 122, 199);\n color: rgb(255, 255, 255);\n --background: rgb(0, 122, 199);\n --color: rgb(255, 255, 255);\n border-color: rgb(0, 122, 199);\n }\n :host([rank*=tertiary]) .button:disabled, :host([rank*=tertiary]) .button.disabled, :host([rank*=tertiary]) .button[aria-disabled=true] {\n background: var(--sg-form-control-bg-disabled) !important;\n color: var(--text-disabled-color) !important;\n border-color: var(--border-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n /* stylelint-disable */\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button,\n :host([variant=negative][rank=primary]) .button {\n background: rgb(187, 0, 12);\n border-color: rgb(187, 0, 12);\n color: #fff;\n --color: #fff;\n transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\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-color: rgb(216, 26, 26);\n color: rgb(255, 255, 255);\n --background: rgb(216, 26, 26);\n --color: rgb(255, 255, 255);\n border-color: rgb(216, 26, 26);\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-color: rgb(187, 0, 12);\n color: rgb(255, 255, 255);\n --background: rgb(187, 0, 12);\n --color: rgb(255, 255, 255);\n border-color: rgb(187, 0, 12);\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(--form-control-primary-bg-disabled) !important;\n color: var(--text-primary-disabled-color) !important;\n border-color: var(--border-primary-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n /* stylelint-enable */\n :host([variant=negative][rank=secondary]) .button,\n :host([variant=negative][rank=tertiary]) .button {\n color: rgb(187, 0, 12);\n --color: rgb(187, 0, 12);\n border-color: transparent;\n transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\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-color: rgb(216, 26, 26);\n color: rgb(255, 255, 255);\n --background: rgb(216, 26, 26);\n --color: rgb(255, 255, 255);\n border-color: rgb(216, 26, 26);\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-color: rgb(187, 0, 12);\n color: rgb(255, 255, 255);\n --background: rgb(187, 0, 12);\n --color: rgb(255, 255, 255);\n border-color: rgb(187, 0, 12);\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: rgb(187, 0, 12);\n }\n :host([variant=ghost]) .button {\n transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n border-color: rgb(51, 51, 51);\n color: rgb(51, 51, 51);\n --color: rgb(51, 51, 51);\n }\n :host([variant=ghost]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(51, 51, 51);\n color: rgb(255, 255, 255);\n --background: rgb(51, 51, 51);\n --color: rgb(255, 255, 255);\n border-color: rgb(51, 51, 51);\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-color: rgb(51, 51, 51);\n color: rgb(255, 255, 255);\n --background: rgb(51, 51, 51);\n --color: rgb(255, 255, 255);\n border-color: rgb(51, 51, 51);\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:focus-visible {\n background-color: rgb(51, 51, 51);\n color: rgb(255, 255, 255);\n --background: rgb(51, 51, 51);\n --color: rgb(255, 255, 255);\n border-color: rgb(51, 51, 51) !important;\n }\n :host([variant=ghost]) .button:disabled, :host([variant=ghost]) .button.disabled, :host([variant=ghost]) .button[aria-disabled=true] {\n color: var(--text-disabled-color) !important;\n border-color: var(--border-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\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(--grey-500);\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/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n */\n/**\n * Calculate the contrast ratio between two colors.\n * See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n */\n/* stylelint-disable */\n/* stylelint-enable */\n/* stylelint-disable */\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 */\ni.sg-icon {\n font-size: 0;\n width: 1rem;\n height: 1rem;\n display: inline-block;\n}\ni.sg-icon::before {\n content: \"\";\n display: inline-block;\n background: var(--color);\n width: 100%;\n height: 100%;\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n}\ni.sg-icon.sg-icon-calendar::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 248h80v-56H48v56zm0 48v64h80v-64H48zm128 0v64h96v-64h-96zm144 0v64h80v-64h-80zm80-104h-80v56h80v-56zm0 216h-80v56h64c8.8 0 16-7.2 16-16v-40zm-128 0h-96v56h96v-56zm-144 0H48v40c0 8.8 7.16 16 16 16h64v-56zm144-216h-96v56h96v-56z '/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 248h80v-56H48v56zm0 48v64h80v-64H48zm128 0v64h96v-64h-96zm144 0v64h80v-64h-80zm80-104h-80v56h80v-56zm0 216h-80v56h64c8.8 0 16-7.2 16-16v-40zm-128 0h-96v56h96v-56zm-144 0H48v40c0 8.8 7.16 16 16 16h64v-56zm144-216h-96v56h96v-56z '/%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-calendar-range::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M96 288c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm224 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-128-64c0-13.3 10.7-24 24-24h112c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24zm40 72c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24s10.7-24 24-24h112zM152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 448c0 8.8 7.16 16 16 16h320c8.8 0 16-7.2 16-16V192H48v256z'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M96 288c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm224 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-128-64c0-13.3 10.7-24 24-24h112c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24zm40 72c13.3 0 24 10.7 24 24s-10.7 24-24 24H120c-13.3 0-24-10.7-24-24s10.7-24 24-24h112zM152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 448c0 8.8 7.16 16 16 16h320c8.8 0 16-7.2 16-16V192H48v256z'/%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-ellipsis::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z'/%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--! Font Awesome Pro 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.--%3E%3Cpath d='M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z'/%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-grip-vertical::before {\n -webkit-mask-image: url(\"data:image/svg+xml, %3Csvg height='1em' viewBox='0 0 320 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z' /%3E%3C/svg%3E\");\n mask-image: url(\"data:image/svg+xml, %3Csvg height='1em' viewBox='0 0 320 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z' /%3E%3C/svg%3E\");\n}\ni.sg-icon.sg-icon-next::before {\n background: none;\n border-bottom: 2px solid;\n border-left: 2px solid;\n content: \"\";\n display: block;\n height: 12px;\n margin-left: -10px;\n margin-top: 2px;\n transform: translate(75%) rotate(-135deg) scaleZ(-1);\n transition: transform 0.3s ease-in;\n width: 12px;\n}\ni.sg-icon.sg-icon-previous::before {\n background: none;\n border-bottom: 2px solid;\n border-left: 2px solid;\n content: \"\";\n display: block;\n height: 12px;\n margin-left: -4px;\n margin-top: 2px;\n transform: translate(75%) rotate(45deg) scaleZ(-1);\n transition: transform 0.3s ease-in;\n width: 12px;\n}\ni.sg-icon.sg-icon-ellipsis::before {\n margin-right: -2px;\n}\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: var(--sg-border-radius);\n border: solid var(--sg-border-width) var(--sg-border-color);\n font-weight: 500;\n min-height: 2.75rem;\n align-items: center;\n display: inline-flex;\n justify-content: center;\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: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 @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 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 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 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n background: rgb(0, 122, 199);\n border-color: rgb(0, 122, 199);\n color: #fff;\n --color: #fff;\n }\n :host(:not([variant=ghost])) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\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-color: rgb(0, 122, 199);\n color: rgb(255, 255, 255);\n --background: rgb(0, 122, 199);\n --color: rgb(255, 255, 255);\n border-color: rgb(0, 122, 199);\n }\n :host(:not([variant=ghost])) .button:focus-visible {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169) !important;\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(--form-control-primary-bg-disabled) !important;\n color: var(--text-primary-disabled-color) !important;\n border-color: var(--border-primary-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n :host([rank*=secondary]) .button {\n transition: border 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n background: transparent;\n border-color: rgb(0, 122, 199);\n color: rgb(0, 122, 199);\n --color: rgb(0, 122, 199);\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:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\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-color: rgb(0, 122, 199);\n color: rgb(255, 255, 255);\n --background: rgb(0, 122, 199);\n --color: rgb(255, 255, 255);\n border-color: rgb(0, 122, 199);\n }\n :host([rank*=secondary]) .button:disabled, :host([rank*=secondary]) .button.disabled, :host([rank*=secondary]) .button[aria-disabled=true] {\n background: var(--sg-form-control-bg-disabled) !important;\n color: var(--text-disabled-color) !important;\n border-color: var(--border-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n :host([rank*=tertiary]) .button {\n transition: border 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n background: transparent;\n border-color: transparent;\n color: rgb(0, 122, 199);\n --color: rgb(0, 122, 199);\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:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\n color: rgb(255, 255, 255);\n --background: rgb(25.4035777564, 154.8940067842, 227.221994169);\n --color: rgb(255, 255, 255);\n border-color: rgb(25.4035777564, 154.8940067842, 227.221994169);\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-color: rgb(0, 122, 199);\n color: rgb(255, 255, 255);\n --background: rgb(0, 122, 199);\n --color: rgb(255, 255, 255);\n border-color: rgb(0, 122, 199);\n }\n :host([rank*=tertiary]) .button:disabled, :host([rank*=tertiary]) .button.disabled, :host([rank*=tertiary]) .button[aria-disabled=true] {\n background: var(--sg-form-control-bg-disabled) !important;\n color: var(--text-disabled-color) !important;\n border-color: var(--border-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n /* stylelint-disable */\n :host([variant=negative]:not([rank=secondary], [rank=tertiary])) .button,\n :host([variant=negative][rank=primary]) .button {\n background: rgb(187, 0, 12);\n border-color: rgb(187, 0, 12);\n color: #fff;\n --color: #fff;\n transition: border 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\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-color: rgb(216, 26, 26);\n color: rgb(255, 255, 255);\n --background: rgb(216, 26, 26);\n --color: rgb(255, 255, 255);\n border-color: rgb(216, 26, 26);\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-color: rgb(187, 0, 12);\n color: rgb(255, 255, 255);\n --background: rgb(187, 0, 12);\n --color: rgb(255, 255, 255);\n border-color: rgb(187, 0, 12);\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(--form-control-primary-bg-disabled) !important;\n color: var(--text-primary-disabled-color) !important;\n border-color: var(--border-primary-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\n }\n /* stylelint-enable */\n :host([variant=negative][rank=secondary]) .button,\n :host([variant=negative][rank=tertiary]) .button {\n color: rgb(187, 0, 12);\n --color: rgb(187, 0, 12);\n border-color: transparent;\n transition: border 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\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-color: rgb(216, 26, 26);\n color: rgb(255, 255, 255);\n --background: rgb(216, 26, 26);\n --color: rgb(255, 255, 255);\n border-color: rgb(216, 26, 26);\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-color: rgb(187, 0, 12);\n color: rgb(255, 255, 255);\n --background: rgb(187, 0, 12);\n --color: rgb(255, 255, 255);\n border-color: rgb(187, 0, 12);\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: rgb(187, 0, 12);\n }\n :host([variant=ghost]) .button {\n transition: border 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;\n border-color: rgb(51, 51, 51);\n color: rgb(51, 51, 51);\n --color: rgb(51, 51, 51);\n }\n :host([variant=ghost]) .button:not(:disabled, .disabled, [aria-disabled]):hover {\n background-color: rgb(51, 51, 51);\n color: rgb(255, 255, 255);\n --background: rgb(51, 51, 51);\n --color: rgb(255, 255, 255);\n border-color: rgb(51, 51, 51);\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-color: rgb(51, 51, 51);\n color: rgb(255, 255, 255);\n --background: rgb(51, 51, 51);\n --color: rgb(255, 255, 255);\n border-color: rgb(51, 51, 51);\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:focus-visible {\n background-color: rgb(51, 51, 51);\n color: rgb(255, 255, 255);\n --background: rgb(51, 51, 51);\n --color: rgb(255, 255, 255);\n border-color: rgb(51, 51, 51) !important;\n }\n :host([variant=ghost]) .button:disabled, :host([variant=ghost]) .button.disabled, :host([variant=ghost]) .button[aria-disabled=true] {\n color: var(--text-disabled-color) !important;\n border-color: var(--border-disabled-color) !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(--text-disabled-color);\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(--text-disabled-color);\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(--grey-500);\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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GdsCard } from '../card/card.component';
|
|
2
|
+
declare const GdsCardLinked_base: (new (...args: any[]) => import("../../utils/mixins/props-link").LinkProps) & typeof GdsCard;
|
|
3
|
+
/**
|
|
4
|
+
* @element gds-card-linked
|
|
5
|
+
* @status beta
|
|
6
|
+
*/
|
|
7
|
+
export declare class GdsCardLinked extends GdsCardLinked_base {
|
|
8
|
+
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
9
|
+
static styleExpressionBaseSelector: string;
|
|
10
|
+
render(): any;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass
|
|
3
|
+
} from "../../chunks/chunk.QU3DSPNU.js";
|
|
4
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import { tokens } from "../../tokens.style.js";
|
|
6
|
+
import {
|
|
7
|
+
gdsCustomElement,
|
|
8
|
+
html
|
|
9
|
+
} from "../../utils/helpers/custom-element-scoping.js";
|
|
10
|
+
import { withLinkProps } from "../../utils/mixins/props-link.js";
|
|
11
|
+
import { GdsCard } from "../card/card.component.js";
|
|
12
|
+
import CardLinkedStyles from "./card-linked.styles.js";
|
|
13
|
+
let GdsCardLinked = class extends withLinkProps(GdsCard) {
|
|
14
|
+
render() {
|
|
15
|
+
return html`<a
|
|
16
|
+
href=${ifDefined(this.href)}
|
|
17
|
+
target=${ifDefined(this.target)}
|
|
18
|
+
rel=${ifDefined(this.rel)}
|
|
19
|
+
download=${ifDefined(this.download)}
|
|
20
|
+
tabindex="0"
|
|
21
|
+
>
|
|
22
|
+
<slot></slot>
|
|
23
|
+
</a>`;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
GdsCardLinked.styles = [tokens, CardLinkedStyles];
|
|
27
|
+
GdsCardLinked.styleExpressionBaseSelector = "a";
|
|
28
|
+
GdsCardLinked = __decorateClass([
|
|
29
|
+
gdsCustomElement("gds-card-linked")
|
|
30
|
+
], GdsCardLinked);
|
|
31
|
+
export {
|
|
32
|
+
GdsCardLinked
|
|
33
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import "../../chunks/chunk.QU3DSPNU.js";
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
const style = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: contents;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
a {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
border-color: var(--_border-color);
|
|
13
|
+
background-color: var(--_background-color);
|
|
14
|
+
color: var(--_color);
|
|
15
|
+
border-width: var(--gds-sys-space-5xs);
|
|
16
|
+
border-style: solid;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
outline: solid var(--gds-sys-space-4xs) transparent;
|
|
20
|
+
outline-offset: var(--gds-sys-space-4xs);
|
|
21
|
+
transition-property: all;
|
|
22
|
+
transition-duration: var(--gds-sys-motion-duration-fastest);
|
|
23
|
+
transition-timing-function: var(--gds-sys-motion-easing-ease-in);
|
|
24
|
+
|
|
25
|
+
&:focus {
|
|
26
|
+
outline-color: var(--gds-sys-color-content-neutral-01);
|
|
27
|
+
outline-offset: var(--gds-sys-space-3xs);
|
|
28
|
+
|
|
29
|
+
&:not(:focus-visible) {
|
|
30
|
+
outline-color: transparent;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (pointer: fine) {
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: color-mix(
|
|
37
|
+
in srgb,
|
|
38
|
+
var(--gds-sys-color-l2-neutral-02),
|
|
39
|
+
var(--gds-sys-color-state-neutral-03)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:active {
|
|
45
|
+
background-color: color-mix(
|
|
46
|
+
in srgb,
|
|
47
|
+
var(--gds-sys-color-l2-neutral-02),
|
|
48
|
+
var(--gds-sys-color-state-neutral-04)
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
var card_linked_styles_default = style;
|
|
54
|
+
export {
|
|
55
|
+
card_linked_styles_default as default
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './card-linked';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./card-linked.js";
|
|
@@ -40,8 +40,8 @@ export declare class GdsContextMenu extends GdsContextMenu_base {
|
|
|
40
40
|
* The placement of the popover relative to the trigger.
|
|
41
41
|
*/
|
|
42
42
|
placement: Placement;
|
|
43
|
-
private
|
|
44
|
-
private elIconSlot;
|
|
43
|
+
private _elTriggerSlot;
|
|
45
44
|
connectedCallback(): void;
|
|
46
45
|
render(): any;
|
|
46
|
+
private _handleOpenChange;
|
|
47
47
|
}
|
|
@@ -2,20 +2,21 @@ import {
|
|
|
2
2
|
__decorateClass,
|
|
3
3
|
__privateAdd,
|
|
4
4
|
__privateGet,
|
|
5
|
-
__privateMethod
|
|
5
|
+
__privateMethod,
|
|
6
|
+
__privateSet
|
|
6
7
|
} from "../../chunks/chunk.QU3DSPNU.js";
|
|
7
|
-
var
|
|
8
|
+
var _elTriggerBtn, _setupButton, _handleTriggerSlotChange, _renderPopover, _GdsContextMenu_instances, handleItemClick_fn;
|
|
8
9
|
import { localized, msg } from "@lit/localize";
|
|
9
|
-
import { property,
|
|
10
|
+
import { property, query } from "lit/decorators.js";
|
|
10
11
|
import { when } from "lit/directives/when.js";
|
|
11
12
|
import { GdsElement } from "../../gds-element.js";
|
|
12
13
|
import { GdsMenuItem } from "../../primitives/menu/menu-item.component.js";
|
|
13
14
|
import { GdsMenu } from "../../primitives/menu/menu.component.js";
|
|
14
15
|
import { tokens } from "../../tokens.style.js";
|
|
15
16
|
import { TransitionalStyles } from "../../transitional-styles.js";
|
|
17
|
+
import { watch } from "../../utils/decorators/watch.js";
|
|
16
18
|
import {
|
|
17
19
|
gdsCustomElement,
|
|
18
|
-
getScopedTagName,
|
|
19
20
|
html
|
|
20
21
|
} from "../../utils/helpers/custom-element-scoping.js";
|
|
21
22
|
import {
|
|
@@ -24,7 +25,10 @@ import {
|
|
|
24
25
|
} from "../../utils/mixins/declarative-layout-mixins.js";
|
|
25
26
|
import { GdsButton } from "../button/button.component.js";
|
|
26
27
|
import { IconDotGridOneHorizontal } from "../icon/icons/dot-grid-one-horizontal.js";
|
|
27
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
applyTriggerAriaAttributes,
|
|
30
|
+
GdsPopover
|
|
31
|
+
} from "../popover/popover.component.js";
|
|
28
32
|
import { GdsMenuHeading } from "../../primitives/menu/menu-heading.component.js";
|
|
29
33
|
let GdsContextMenu = class extends withMarginProps(
|
|
30
34
|
withLayoutChildProps(GdsElement)
|
|
@@ -37,15 +41,44 @@ let GdsContextMenu = class extends withMarginProps(
|
|
|
37
41
|
this.showLabel = false;
|
|
38
42
|
this.label = "";
|
|
39
43
|
this.placement = "bottom-start";
|
|
44
|
+
__privateAdd(this, _elTriggerBtn);
|
|
45
|
+
__privateAdd(this, _setupButton, () => {
|
|
46
|
+
if (!__privateGet(this, _elTriggerBtn))
|
|
47
|
+
__privateSet(this, _elTriggerBtn, this.shadowRoot?.querySelector("#trigger") ?? void 0);
|
|
48
|
+
const btn = __privateGet(this, _elTriggerBtn);
|
|
49
|
+
if (btn && !btn.hasAttribute("data-gds-context-menu-trigger")) {
|
|
50
|
+
btn.setAttribute("data-gds-context-menu-trigger", "true");
|
|
51
|
+
btn.addEventListener("click", () => {
|
|
52
|
+
this.open = !this.open;
|
|
53
|
+
});
|
|
54
|
+
btn.addEventListener("keydown", (e) => {
|
|
55
|
+
if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
this.open = true;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
applyTriggerAriaAttributes(btn, this.open, "menu");
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
__privateAdd(this, _handleTriggerSlotChange, () => {
|
|
64
|
+
const triggerBtn = this._elTriggerSlot.assignedNodes({ flatten: true }).find((node) => {
|
|
65
|
+
return node instanceof HTMLElement;
|
|
66
|
+
});
|
|
67
|
+
if (triggerBtn) {
|
|
68
|
+
__privateSet(this, _elTriggerBtn, triggerBtn);
|
|
69
|
+
}
|
|
70
|
+
__privateGet(this, _setupButton).call(this);
|
|
71
|
+
});
|
|
40
72
|
__privateAdd(this, _renderPopover, () => {
|
|
41
73
|
return html`<gds-popover
|
|
42
74
|
id="menu"
|
|
43
75
|
autofocus
|
|
44
76
|
.open=${this.open}
|
|
45
|
-
.triggerRef=${this
|
|
46
|
-
.anchorRef=${this
|
|
77
|
+
.triggerRef=${Promise.resolve(__privateGet(this, _elTriggerBtn))}
|
|
78
|
+
.anchorRef=${Promise.resolve(__privateGet(this, _elTriggerBtn))}
|
|
47
79
|
.label=${this.label}
|
|
48
80
|
.placement=${this.placement}
|
|
81
|
+
.popupRole=${"menu"}
|
|
49
82
|
@gds-ui-state=${(e) => this.open = e.detail.open}
|
|
50
83
|
>
|
|
51
84
|
<gds-menu
|
|
@@ -60,53 +93,43 @@ let GdsContextMenu = class extends withMarginProps(
|
|
|
60
93
|
connectedCallback() {
|
|
61
94
|
super.connectedCallback();
|
|
62
95
|
TransitionalStyles.instance.apply(this, "gds-context-menu");
|
|
63
|
-
|
|
96
|
+
this.updateComplete.then(__privateGet(this, _handleTriggerSlotChange));
|
|
64
97
|
this.addEventListener("keydown", (e) => {
|
|
65
98
|
if (this.open && e.key == "Tab") {
|
|
66
|
-
e.preventDefault();
|
|
67
99
|
this.open = false;
|
|
68
|
-
|
|
100
|
+
e.preventDefault();
|
|
69
101
|
}
|
|
70
102
|
});
|
|
71
103
|
}
|
|
72
104
|
render() {
|
|
73
|
-
return html`<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
name="icon"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
name="icon"
|
|
89
|
-
@slotchange=${__privateMethod(this, _GdsContextMenu_instances, handleSlotChange_fn)}
|
|
90
|
-
></slot>`}
|
|
91
|
-
</gds-button>
|
|
105
|
+
return html`<slot
|
|
106
|
+
name="trigger"
|
|
107
|
+
@slotchange=${__privateGet(this, _handleTriggerSlotChange)}
|
|
108
|
+
><gds-button
|
|
109
|
+
.rank=${"secondary"}
|
|
110
|
+
id="trigger"
|
|
111
|
+
label=${this.buttonLabel}
|
|
112
|
+
>
|
|
113
|
+
${this.showLabel ? html`<slot name="icon" slot="lead"
|
|
114
|
+
><gds-icon-dot-grid-one-horizontal></gds-icon-dot-grid-one-horizontal></slot
|
|
115
|
+
>${this.buttonLabel}` : html`<slot name="icon"
|
|
116
|
+
><gds-icon-dot-grid-one-horizontal></gds-icon-dot-grid-one-horizontal
|
|
117
|
+
></slot>`}
|
|
118
|
+
</gds-button>
|
|
119
|
+
</slot>
|
|
92
120
|
${when(this.open, __privateGet(this, _renderPopover))}`;
|
|
93
121
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.elIconSlot.then((el) => {
|
|
98
|
-
if (!el.assignedNodes({ flatten: true }).some((node) => {
|
|
99
|
-
return node instanceof Element && node.tagName.toLowerCase().startsWith("gds-icon");
|
|
100
|
-
})) {
|
|
101
|
-
const defaultIcon = document.createElement(
|
|
102
|
-
getScopedTagName("gds-icon-dot-grid-one-horizontal")
|
|
103
|
-
);
|
|
104
|
-
el.appendChild(defaultIcon);
|
|
105
|
-
this.requestUpdate();
|
|
122
|
+
_handleOpenChange() {
|
|
123
|
+
if (!this.open) {
|
|
124
|
+
requestAnimationFrame(() => __privateGet(this, _elTriggerBtn)?.focus());
|
|
106
125
|
}
|
|
107
|
-
}
|
|
126
|
+
}
|
|
108
127
|
};
|
|
128
|
+
_elTriggerBtn = new WeakMap();
|
|
129
|
+
_setupButton = new WeakMap();
|
|
130
|
+
_handleTriggerSlotChange = new WeakMap();
|
|
109
131
|
_renderPopover = new WeakMap();
|
|
132
|
+
_GdsContextMenu_instances = new WeakSet();
|
|
110
133
|
handleItemClick_fn = function() {
|
|
111
134
|
this.open = false;
|
|
112
135
|
};
|
|
@@ -136,11 +159,11 @@ __decorateClass([
|
|
|
136
159
|
property()
|
|
137
160
|
], GdsContextMenu.prototype, "placement", 2);
|
|
138
161
|
__decorateClass([
|
|
139
|
-
|
|
140
|
-
], GdsContextMenu.prototype, "
|
|
162
|
+
query('slot[name="trigger"]')
|
|
163
|
+
], GdsContextMenu.prototype, "_elTriggerSlot", 2);
|
|
141
164
|
__decorateClass([
|
|
142
|
-
|
|
143
|
-
], GdsContextMenu.prototype, "
|
|
165
|
+
watch("open", { waitUntilFirstUpdate: true })
|
|
166
|
+
], GdsContextMenu.prototype, "_handleOpenChange", 1);
|
|
144
167
|
GdsContextMenu = __decorateClass([
|
|
145
168
|
gdsCustomElement("gds-context-menu", {
|
|
146
169
|
dependsOn: [
|
|
@@ -177,6 +177,21 @@ export declare class GdsDiv extends GdsDiv_base {
|
|
|
177
177
|
* Supports all valid CSS `place-content` values.
|
|
178
178
|
*/
|
|
179
179
|
'place-content'?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Style Expression Property that controls the `aspect-ratio` property.
|
|
182
|
+
* Supports all valid CSS `aspect-ratio` values.
|
|
183
|
+
*/
|
|
184
|
+
'aspect-ratio'?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Style Expression Property that controls the `cursor` property.
|
|
187
|
+
* Supports all valid CSS `cursor` values.
|
|
188
|
+
*/
|
|
189
|
+
cursor?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Style Expression Property that controls the `pointer-events` property.
|
|
192
|
+
* Supports all valid CSS `pointer-events` values.
|
|
193
|
+
*/
|
|
194
|
+
'pointer-events'?: string;
|
|
180
195
|
render(): any;
|
|
181
196
|
}
|
|
182
197
|
export {};
|
|
@@ -156,6 +156,15 @@ __decorateClass([
|
|
|
156
156
|
__decorateClass([
|
|
157
157
|
styleExpressionProperty()
|
|
158
158
|
], GdsDiv.prototype, "place-content", 2);
|
|
159
|
+
__decorateClass([
|
|
160
|
+
styleExpressionProperty()
|
|
161
|
+
], GdsDiv.prototype, "aspect-ratio", 2);
|
|
162
|
+
__decorateClass([
|
|
163
|
+
styleExpressionProperty()
|
|
164
|
+
], GdsDiv.prototype, "cursor", 2);
|
|
165
|
+
__decorateClass([
|
|
166
|
+
styleExpressionProperty()
|
|
167
|
+
], GdsDiv.prototype, "pointer-events", 2);
|
|
159
168
|
GdsDiv = __decorateClass([
|
|
160
169
|
gdsCustomElement("gds-div")
|
|
161
170
|
], GdsDiv);
|
|
@@ -8,12 +8,6 @@ const style = css`
|
|
|
8
8
|
border-width: 0;
|
|
9
9
|
border-color: var(--gds-sys-color-border-subtle-01);
|
|
10
10
|
}
|
|
11
|
-
:host(:focus-visible) {
|
|
12
|
-
outline-color: color-mix(in srgb, currentcolor, #000 100%);
|
|
13
|
-
outline-offset: var(--gds-sys-space-4xs);
|
|
14
|
-
outline-style: solid;
|
|
15
|
-
outline-width: var(--gds-sys-space-4xs);
|
|
16
|
-
}
|
|
17
11
|
`;
|
|
18
12
|
var div_styles_default = style;
|
|
19
13
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GdsElement } from '../../gds-element';
|
|
2
|
-
declare const GdsImg_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").PositioningProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeYProps) & typeof GdsElement;
|
|
2
|
+
declare const GdsImg_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").PositioningProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeYProps) & (new (...args: any[]) => import("../../utils/mixins/props-image").ImageProps) & typeof GdsElement;
|
|
3
3
|
/**
|
|
4
4
|
* @element gds-img
|
|
5
5
|
*
|
|
@@ -59,18 +59,6 @@ export declare class GdsImg extends GdsImg_base {
|
|
|
59
59
|
* @property position
|
|
60
60
|
*/
|
|
61
61
|
'object-position'?: string;
|
|
62
|
-
/**
|
|
63
|
-
* The image source URL.
|
|
64
|
-
*
|
|
65
|
-
* @property src
|
|
66
|
-
*/
|
|
67
|
-
src?: string;
|
|
68
|
-
/**
|
|
69
|
-
* The image alt text.
|
|
70
|
-
*
|
|
71
|
-
* @property alt
|
|
72
|
-
*/
|
|
73
|
-
alt?: string;
|
|
74
62
|
render(): any;
|
|
75
63
|
}
|
|
76
64
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__decorateClass
|
|
3
3
|
} from "../../chunks/chunk.QU3DSPNU.js";
|
|
4
|
-
import { property } from "lit/decorators.js";
|
|
5
4
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
6
5
|
import { GdsElement } from "../../gds-element.js";
|
|
7
6
|
import { tokens } from "../../tokens.style.js";
|
|
@@ -16,20 +15,25 @@ import {
|
|
|
16
15
|
withSizeXProps,
|
|
17
16
|
withSizeYProps
|
|
18
17
|
} from "../../utils/mixins/declarative-layout-mixins.js";
|
|
18
|
+
import { withImageProps } from "../../utils/mixins/props-image.js";
|
|
19
19
|
import IMGStyles from "./img.styles.js";
|
|
20
20
|
let GdsImg = class extends withPositioningProps(
|
|
21
|
-
withMarginProps(withSizeXProps(withSizeYProps(GdsElement)))
|
|
21
|
+
withMarginProps(withSizeXProps(withSizeYProps(withImageProps(GdsElement))))
|
|
22
22
|
) {
|
|
23
23
|
render() {
|
|
24
24
|
return html`<img
|
|
25
25
|
src="${ifDefined(this.src)}"
|
|
26
26
|
alt="${ifDefined(this.alt)}"
|
|
27
|
+
srcset=${ifDefined(this.srcset)}
|
|
28
|
+
sizes=${ifDefined(this.sizes)}
|
|
29
|
+
loading=${ifDefined(this.loading)}
|
|
30
|
+
decoding=${ifDefined(this.decoding)}
|
|
27
31
|
/>`;
|
|
28
32
|
}
|
|
29
33
|
};
|
|
30
34
|
GdsImg.styles = [tokens, IMGStyles];
|
|
31
35
|
__decorateClass([
|
|
32
|
-
styleExpressionProperty()
|
|
36
|
+
styleExpressionProperty({ selector: "img" })
|
|
33
37
|
], GdsImg.prototype, "aspect-ratio", 2);
|
|
34
38
|
__decorateClass([
|
|
35
39
|
styleExpressionProperty({
|
|
@@ -47,12 +51,6 @@ __decorateClass([
|
|
|
47
51
|
selector: "img"
|
|
48
52
|
})
|
|
49
53
|
], GdsImg.prototype, "object-position", 2);
|
|
50
|
-
__decorateClass([
|
|
51
|
-
property()
|
|
52
|
-
], GdsImg.prototype, "src", 2);
|
|
53
|
-
__decorateClass([
|
|
54
|
-
property()
|
|
55
|
-
], GdsImg.prototype, "alt", 2);
|
|
56
54
|
GdsImg = __decorateClass([
|
|
57
55
|
gdsCustomElement("gds-img")
|
|
58
56
|
], GdsImg);
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./blur/index.js";
|
|
|
7
7
|
export * from "./breadcrumbs/index.js";
|
|
8
8
|
export * from "./button/index.js";
|
|
9
9
|
export * from "./card/card.js";
|
|
10
|
+
export * from "./card-linked/card-linked.js";
|
|
10
11
|
export * from "./checkbox/index.js";
|
|
11
12
|
export * from "./coachmark/index.js";
|
|
12
13
|
export * from "./context-menu/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GdsElement } from '../../gds-element';
|
|
2
|
-
declare const GdsLink_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").LayoutChildProps) & typeof GdsElement;
|
|
2
|
+
declare const GdsLink_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").LayoutChildProps) & (new (...args: any[]) => import("../../utils/mixins/props-link").LinkProps) & typeof GdsElement;
|
|
3
3
|
/**
|
|
4
4
|
* @element gds-link
|
|
5
5
|
*
|
|
@@ -14,18 +14,6 @@ export declare class GdsLink extends GdsLink_base {
|
|
|
14
14
|
#private;
|
|
15
15
|
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
|
|
16
16
|
static shadowRootOptions: ShadowRootInit;
|
|
17
|
-
/**
|
|
18
|
-
* When set, the underlying button will be rendered as an anchor element.
|
|
19
|
-
*/
|
|
20
|
-
href: string;
|
|
21
|
-
/**
|
|
22
|
-
* Where to display the linked URL. Only used when href is present.
|
|
23
|
-
*/
|
|
24
|
-
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
25
|
-
/**
|
|
26
|
-
* The relationship of the linked URL as space-separated link types. Only used when href is present. Defaults to "noreferrer noopener" for security reasons when target is set.
|
|
27
|
-
*/
|
|
28
|
-
rel?: string;
|
|
29
17
|
/**
|
|
30
18
|
* Provides an accessible name for the link that will be read by screen readers.
|
|
31
19
|
* Use this when:
|
|
@@ -45,10 +33,6 @@ export declare class GdsLink extends GdsLink_base {
|
|
|
45
33
|
* </gds-link>
|
|
46
34
|
*/
|
|
47
35
|
label: string;
|
|
48
|
-
/**
|
|
49
|
-
* Causes the browser to treat the linked URL as a download. Can be used with or without a filename value. Only used when href is present.
|
|
50
|
-
*/
|
|
51
|
-
download?: string;
|
|
52
36
|
/**
|
|
53
37
|
* Controls the text-decoration property of the link.
|
|
54
38
|
* Supports all valid CSS text-decoration values.
|