{"version":3,"file":"card-jxJwjRKI.js","sources":["../../src/atoms/card.ts"],"sourcesContent":["import { css, html, LitElement, TemplateResult } from \"lit\";\nimport { customElement } from \"lit/decorators/custom-element.js\";\nimport { sharedStyles } from \"../styles/shared\";\nimport { property } from \"lit/decorators/property.js\";\nimport { Size } from \"shared\";\n\n@customElement(\"bs-card\")\nexport class BsCard extends LitElement {\n\t@property({ type: String, reflect: true }) size: Size = \"medium\";\n\t@property({ type: Boolean, reflect: true }) hoverable = false;\n\t@property({ type: Boolean, reflect: true }) active = false;\n\t@property({ type: Boolean, reflect: true }) selected = false;\n\t@property({ type: Boolean, reflect: true }) flat = false;\n\t@property({ type: Boolean, reflect: true }) transparent = false;\n\n\tstatic get styles() {\n\t\treturn [\n\t\t\tsharedStyles,\n\t\t\tcss`\n\t\t\t\t:host {\n\t\t\t\t\t--form-item-height: 32px;\n\t\t\t\t\t--_current-card-content-padding: var(--card-content-padding, var(--card-padding, var(--space-m)));\n\t\t\t\t\t--_current-card-header-footer-padding: var(--card-header-footer-padding, var(--card-padding, var(--space-m)));\n\n\t\t\t\t\tborder-radius: var(--card-border-radius, var(--border-radius-l));\n\t\t\t\t\t/*border: 1px solid var(--shade-normal);*/\n\t\t\t\t\tbackground: var(--background);\n\t\t\t\t\tcolor: var(--foreground);\n\t\t\t\t\tbox-shadow: var(--card-box-shadow, var(--shadow) 0px 7px 10px -3px, var(--shadow) 0px -2px 6px -2px);\n\t\t\t\t\tborder: var(--border, unset);\n\t\t\t\t}\n\n\t\t\t\t:host([flat]) {\n\t\t\t\t\tbox-shadow: none;\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 1px solid var(--shade-normal);\n\t\t\t\t\tcolor: currentColor;\n\t\t\t\t}\n\n\t\t\t\t:host([transparent]) {\n\t\t\t\t\tbackground: rgba(var(--rgb), 0.7);\n\t\t\t\t\tbackdrop-filter: blur(10px);\n\n\t\t\t\t\t-webkit-backdrop-filter: blur(10px);\n\t\t\t\t}\n\n\t\t\t\t:host([active]),\n\t\t\t\t:host([selected]) {\n\t\t\t\t\tbox-shadow: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t}\n\n\t\t\t\t:host([active]) {\n\t\t\t\t\tbackground: var(--card-bg-active, color-mix(in srgb, currentColor 10%, transparent));\n\t\t\t\t\tcolor: var(--card-color-active, var(--foreground));\n\t\t\t\t\toutline: var(--card-outline-active, unset);\n\t\t\t\t}\n\n\t\t\t\t:host([selected]) {\n\t\t\t\t\tbackground: var(--card-bg-selected, var(--background));\n\t\t\t\t\tcolor: var(--card-color-selected, var(--foreground));\n\t\t\t\t\toutline: var(--card-outline-selected, 2px solid var(--primary-normal));\n\t\t\t\t}\n\n\t\t\t\t:host([size=\"small\"]:not([flat])) {\n\t\t\t\t\tbox-shadow: var(--card-box-shadow-s, var(--shadow) 0px 5px 6px -2px, var(--shadow) 0px -1px 3px -1px);\n\t\t\t\t}\n\n\t\t\t\t:host([size=\"small\"]:not([flat])[hoverable]:hover) {\n\t\t\t\t\tbox-shadow: var(--card-box-shadow-s-hover, var(--shadow) 0px 8px 10px -1px, var(--shadow) 0px 1px 5px 0px);\n\t\t\t\t}\n\n\t\t\t\t:host([size=\"large\"]) {\n\t\t\t\t\t--_current-card-content-padding: var(--card-content-padding, var(--card-padding, var(--space-l)));\n\t\t\t\t\t--_current-card-header-footer-padding: var(\n\t\t\t\t\t\t--card-header-footer-padding,\n\t\t\t\t\t\tvar(--card-padding, var(--space-xm) var(--space-l))\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\n\t\t\t\t:host([hoverable]) {\n\t\t\t\t\ttransition: box-shadow 120ms ease-out, transform 120ms ease-out;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t}\n\n\t\t\t\t:host(:not([active]):not([selected])[hoverable]:hover) {\n\t\t\t\t\ttransform: var(--card-transform-hover, scale(1.01));\n\t\t\t\t\tbox-shadow: var(--card-box-shadow-hover, var(--shadow) 0px 10px 14px -1px, var(--shadow) 0px -1px 8px -1px);\n\t\t\t\t\tz-index: 12345;\n\t\t\t\t}\n\n\t\t\t\t#footer,\n\t\t\t\t#header,\n\t\t\t\t::slotted(footer),\n\t\t\t\t::slotted(header) {\n\t\t\t\t\tpadding: var(--_current-card-header-footer-padding, var(--space-m));\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tgap: var(--space-s);\n\t\t\t\t}\n\n\t\t\t\t#content,\n\t\t\t\t::slotted(article),\n\t\t\t\t::slotted(form) {\n\t\t\t\t\tpadding: var(--_current-card-content-padding);\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\t/*overscroll-behavior-y: contain; Caused a bug in Safari where even though overflow-y is not overflowing the contain kicks in and stops the event from propagating */\n\t\t\t\t\toverflow-y: auto;\n\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t}\n\n\t\t\t\t#header,\n\t\t\t\t::slotted(header) {\n\t\t\t\t\tborder-bottom: 1px solid var(--shade-normal);\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\n\t\t\t\t#footer,\n\t\t\t\t::slotted(footer) {\n\t\t\t\t\tpadding: var(--_current-card-header-footer-padding, var(--space-m));\n\t\t\t\t\tborder-top: 1px solid var(--shade-normal);\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t`\n\t\t];\n\t}\n\n\trender(): TemplateResult | undefined {\n\t\treturn html` `;\n\t}\n}\n"],"names":["BsCard","LitElement","sharedStyles","css","html","__decorateClass","property","customElement"],"mappings":"sQAOa,IAAAA,EAAN,cAAqBC,CAAW,CAAhC,aAAA,CAAA,MAAA,GAAA,SAAA,EACkD,KAAA,KAAA,SACA,KAAA,UAAA,GACH,KAAA,O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