scu-web-components 0.0.21 → 0.0.22
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/dist/chunks/chunk.2SWJYWHF.js +4 -0
- package/dist/chunks/chunk.2SWJYWHF.js.map +7 -0
- package/dist/chunks/chunk.3FBPDSVX.js +246 -0
- package/dist/chunks/chunk.3FBPDSVX.js.map +7 -0
- package/dist/chunks/chunk.3ZF5XE56.js +2 -0
- package/dist/chunks/chunk.3ZF5XE56.js.map +7 -0
- package/dist/chunks/chunk.5B2MVQ27.js +2 -0
- package/dist/chunks/chunk.5B2MVQ27.js.map +7 -0
- package/dist/chunks/chunk.5O57EYF4.js +2 -0
- package/dist/chunks/chunk.5O57EYF4.js.map +7 -0
- package/dist/chunks/chunk.5P5RU7GD.js +2 -0
- package/dist/chunks/chunk.5P5RU7GD.js.map +7 -0
- package/dist/chunks/chunk.5SNSWZHO.js +2 -0
- package/dist/chunks/chunk.5SNSWZHO.js.map +7 -0
- package/dist/chunks/chunk.62GWBO3B.js +2 -0
- package/dist/chunks/chunk.62GWBO3B.js.map +7 -0
- package/dist/chunks/chunk.6JEOFLOD.js +2 -0
- package/dist/chunks/chunk.6JEOFLOD.js.map +7 -0
- package/dist/chunks/chunk.6JZBSBO7.js +2 -0
- package/dist/chunks/chunk.6JZBSBO7.js.map +7 -0
- package/dist/chunks/chunk.75XREEIK.js +58 -0
- package/dist/chunks/chunk.75XREEIK.js.map +7 -0
- package/dist/chunks/chunk.7CJJ52HY.js +2 -0
- package/dist/chunks/chunk.7CJJ52HY.js.map +7 -0
- package/dist/chunks/chunk.7RDBE3IG.js +2 -0
- package/dist/chunks/chunk.7RDBE3IG.js.map +7 -0
- package/dist/chunks/chunk.7VW267FJ.js +17 -0
- package/dist/chunks/chunk.7VW267FJ.js.map +7 -0
- package/dist/chunks/chunk.7Z2IEKUA.js +17 -0
- package/dist/chunks/chunk.7Z2IEKUA.js.map +7 -0
- package/dist/chunks/chunk.ACJT3GFX.js +17 -0
- package/dist/chunks/chunk.ACJT3GFX.js.map +7 -0
- package/dist/chunks/chunk.B63G34N3.js +2 -0
- package/dist/chunks/chunk.B63G34N3.js.map +7 -0
- package/dist/chunks/chunk.BXOGDFND.js +17 -0
- package/dist/chunks/chunk.BXOGDFND.js.map +7 -0
- package/dist/chunks/chunk.DCCR6AGA.js +4 -0
- package/dist/chunks/chunk.DCCR6AGA.js.map +7 -0
- package/dist/chunks/chunk.DTU7NHQP.js +2 -0
- package/dist/chunks/chunk.DTU7NHQP.js.map +7 -0
- package/dist/chunks/chunk.EXCY4PGS.js +2 -0
- package/dist/chunks/chunk.EXCY4PGS.js.map +7 -0
- package/dist/chunks/chunk.F7TA5BBQ.js +4 -0
- package/dist/chunks/chunk.F7TA5BBQ.js.map +7 -0
- package/dist/chunks/chunk.HLMRJM7V.js +47 -0
- package/dist/chunks/chunk.HLMRJM7V.js.map +7 -0
- package/dist/chunks/chunk.IAALPGL2.js +2 -0
- package/dist/chunks/chunk.IAALPGL2.js.map +7 -0
- package/dist/chunks/chunk.KLCHR5KI.js +2 -0
- package/dist/chunks/chunk.KLCHR5KI.js.map +7 -0
- package/dist/chunks/chunk.KLH46EZA.js +2 -0
- package/dist/chunks/chunk.KLH46EZA.js.map +7 -0
- package/dist/chunks/chunk.L6NJJXH5.js +2 -0
- package/dist/chunks/chunk.L6NJJXH5.js.map +7 -0
- package/dist/chunks/chunk.LAQTQIRZ.js +2 -0
- package/dist/chunks/chunk.LAQTQIRZ.js.map +7 -0
- package/dist/chunks/chunk.MBVU2OPU.js +4 -0
- package/dist/chunks/chunk.MBVU2OPU.js.map +7 -0
- package/dist/chunks/chunk.MGZVQJ3S.js +245 -0
- package/dist/chunks/chunk.MGZVQJ3S.js.map +7 -0
- package/dist/chunks/chunk.MLENW6F3.js +246 -0
- package/dist/chunks/chunk.MLENW6F3.js.map +7 -0
- package/dist/chunks/chunk.O5A7YZKV.js +29 -0
- package/dist/chunks/chunk.O5A7YZKV.js.map +7 -0
- package/dist/chunks/chunk.O6N6AMBN.js +209 -0
- package/dist/chunks/chunk.O6N6AMBN.js.map +7 -0
- package/dist/chunks/chunk.PXGXIL4I.js +246 -0
- package/dist/chunks/chunk.PXGXIL4I.js.map +7 -0
- package/dist/chunks/chunk.QXE7UNSK.js +245 -0
- package/dist/chunks/chunk.QXE7UNSK.js.map +7 -0
- package/dist/chunks/chunk.R4YGOT4Y.js +49 -0
- package/dist/chunks/chunk.R4YGOT4Y.js.map +7 -0
- package/dist/chunks/chunk.RBSBLP6E.js +256 -0
- package/dist/chunks/chunk.RBSBLP6E.js.map +7 -0
- package/dist/chunks/chunk.RXMGI7HR.js +2 -0
- package/dist/chunks/chunk.RXMGI7HR.js.map +7 -0
- package/dist/chunks/chunk.S4MESEBR.js +32 -0
- package/dist/chunks/chunk.S4MESEBR.js.map +7 -0
- package/dist/chunks/chunk.SIJSFRVB.js +2 -0
- package/dist/chunks/chunk.SIJSFRVB.js.map +7 -0
- package/dist/chunks/chunk.TXOGG2T7.js +2 -0
- package/dist/chunks/chunk.TXOGG2T7.js.map +7 -0
- package/dist/chunks/chunk.UVVG6NF4.js +2 -0
- package/dist/chunks/chunk.UVVG6NF4.js.map +7 -0
- package/dist/chunks/chunk.W3ITQHQQ.js +245 -0
- package/dist/chunks/chunk.W3ITQHQQ.js.map +7 -0
- package/dist/chunks/chunk.WPOS6KBC.js +2 -0
- package/dist/chunks/chunk.WPOS6KBC.js.map +7 -0
- package/dist/chunks/chunk.WSDDWC5Y.js +47 -0
- package/dist/chunks/chunk.WSDDWC5Y.js.map +7 -0
- package/dist/chunks/chunk.YPWTNS7G.js +17 -0
- package/dist/chunks/chunk.YPWTNS7G.js.map +7 -0
- package/dist/chunks/chunk.YXBLJ773.js +4 -0
- package/dist/chunks/chunk.YXBLJ773.js.map +7 -0
- package/dist/chunks/chunk.Z3OBLET2.js +2 -0
- package/dist/chunks/chunk.Z3OBLET2.js.map +7 -0
- package/dist/chunks/chunk.ZKGK7XFD.js +117 -0
- package/dist/chunks/chunk.ZKGK7XFD.js.map +7 -0
- package/dist/chunks/chunk.ZKH7NVYV.js +17 -0
- package/dist/chunks/chunk.ZKH7NVYV.js.map +7 -0
- package/dist/chunks/chunk.ZWJHKP3F.js +4 -0
- package/dist/chunks/chunk.ZWJHKP3F.js.map +7 -0
- package/dist/custom-elements.json +187 -132
- package/dist/docs/components/ScwCard.json +19 -0
- package/dist/docs/components/ScwImage.json +46 -10
- package/dist/docs/components/manifest.json +78 -78
- package/dist/docs/config.json +1 -1
- package/dist/scw-alert/ScwAlert.js +1 -1
- package/dist/scw-alert/scw-alert.js +1 -1
- package/dist/scw-button/ScwButton.js +1 -1
- package/dist/scw-button/scw-button.js +1 -1
- package/dist/scw-card/ScwCard.js +1 -1
- package/dist/scw-card/scw-card.js +1 -1
- package/dist/scw-components.js +1 -1
- package/dist/scw-form-component/scw-form-component.js +1 -1
- package/dist/scw-heading/ScwHeading.js +1 -1
- package/dist/scw-heading/scw-heading.js +1 -1
- package/dist/scw-icon/ScwIcon.js +1 -1
- package/dist/scw-icon/scw-icon.js +1 -1
- package/dist/scw-image/ScwImage.js +1 -1
- package/dist/scw-image/scw-image-validate.js +1 -1
- package/dist/scw-image/scw-image.js +1 -1
- package/dist/scw-input/scw-input.js +1 -1
- package/dist/scw-link/ScwLink.js +1 -1
- package/dist/scw-link/scw-link.js +1 -1
- package/dist/scw-link-base/ScwLinkBase.js +1 -1
- package/dist/scw-link-base/scw-link-base.js +1 -1
- package/dist/scw-menu-item/ScwMenuItem.js +1 -1
- package/dist/scw-menu-item/scw-menu-item.js +1 -1
- package/dist/scw-page-alert/scw-page-alert.js +1 -1
- package/dist/scw-select/scw-select.js +1 -1
- package/dist/scw-single-input/scw-single-input.js +1 -1
- package/dist/scw-textarea/scw-textarea.js +1 -1
- package/dist/scw.js +1 -1
- package/dist/utils/suffix.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as u}from"./chunk.LAQTQIRZ.js";import{b as n,c as r,e as f}from"./chunk.HCMPRDIX.js";import{a as o}from"./chunk.ZS4C3T6Z.js";import{g as a}from"./chunk.5YJY6NT6.js";var c=(e=>(e.text="text",e.boolean="boolean",e.submit="submit",e))(c||{}),h=(i=>(i.submit="submit",i.cancel="cancel",i))(h||{}),t=class extends f{constructor(){super(...arguments);this.formType="text";this.value="";this.placeholder="";this.selected=!1;this.readOnly=!1;this.required=!1;this.requiredLabel=" *";this.focused=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.required&&this.createAndAddValidationRule("required",this.requiredFeedback)}decorateValues(i){if(!this.name){this.warn(`${this.element} didn't find a name`);return}this.formType==="boolean"?i[this.name]=this.selected:i[this.name]=this.value}findIfRequired(){let i=this.findValidationRules();return i?i.isRequired():!1}findValidationRules(){return Array.from(this.children).find(l=>l.nodeName.indexOf("SCW-VALIDATION")===0)}validate(){let i=this.findValidationRules(),e=[];return i&&(e=i.validate(this.value)),this.invalid=e.length>0,this.invalid?this.feedback=e[0].feedback:this.feedback="",e}createValidateRule(){return document.createElement(`scw-${"validate"}${u()}`)}addValidationRule(i){let e=this.findValidationRules();e||(e=document.createElement(`scw-${"validation"}${u()}`),this.prepend(e)),Array.from(e.children).find(s=>s.getAttribute("type")===i.type)||e.appendChild(i)}createAndAddValidationRule(i,e){let l=this.createValidateRule();l.setAttribute("type",i),e&&l.setAttribute("feedback",e),this.addValidationRule(l)}removeValidationRule(i){let e=this.findValidationRules();if(!e)return;let d=Array.from(e.children).find(s=>s.type===i);d&&d.parentNode&&d.parentNode.removeChild(d)}render(){return o`
|
|
2
|
+
scw-form-component
|
|
3
|
+
`}};a([n({type:c,reflect:!0,attribute:"form-type"})],t.prototype,"formType",2),a([n({type:String})],t.prototype,"name",2),a([n({type:String})],t.prototype,"value",2),a([n({type:String})],t.prototype,"placeholder",2),a([n({type:String})],t.prototype,"selected",2),a([n({type:Boolean,attribute:"read-only"})],t.prototype,"readOnly",2),a([n({type:Boolean})],t.prototype,"required",2),a([n({type:String,attribute:"required-label"})],t.prototype,"requiredLabel",2),a([n({type:String,attribute:"required-feedback"})],t.prototype,"requiredFeedback",2),a([r()],t.prototype,"feedback",2),a([r()],t.prototype,"focused",2),a([r()],t.prototype,"invalid",2);export{c as a,h as b,t as c};
|
|
4
|
+
//# sourceMappingURL=chunk.2SWJYWHF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/scw-form-component/scw-form-component.ts"],
|
|
4
|
+
"sourcesContent": ["import {html} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport ScwComponent from '../scw-component/ScwComponent';\nimport {Components} from '../utils/enums/Components';\nimport ScwValidate from '../scw-validate/scw-validate';\nimport ScwValidation from '../scw-validation/scw-validation';\nimport {ValidationResult, ValidationTypes}\n from '../scw-validate/validationTypes';\nimport getSuffix from '../utils/suffix';\n\nexport enum ScwFormComponentTypes {\n text = 'text',\n boolean = 'boolean',\n submit = 'submit'\n}\n\nexport enum ScwFormComponentSubmitTypes {\n submit = 'submit',\n cancel = 'cancel'\n}\n\n/**\n * ScwFormComponent\n * @class\n * @tag scw-form-component\n */\nexport default class ScwFormComponent extends ScwComponent {\n // ============== ScwFormComponent ===========================================\n /** (ScwFormComponent) the usage in a form (& scw-form a query target) */\n @property({\n type: ScwFormComponentTypes,\n reflect: true,\n attribute: 'form-type',\n })\n formType: ScwFormComponentTypes = ScwFormComponentTypes.text;\n\n /** (ScwFormComponent) name to identify form element and attach data */\n @property({type: String})\n name: string | undefined;\n\n /** (ScwFormComponent) name to identify form element and attach data */\n @property({type: String})\n value: string = '';\n\n /** (ScwFormComponent) text showing when there is no value */\n @property({type: String})\n placeholder: string = '';\n\n /** (ScwFormComponent) name to identify form element and attach data */\n @property({type: String})\n selected: boolean = false;\n\n /** (ScwFormComponent) read-only state management */\n @property({type: Boolean, attribute: 'read-only'})\n readOnly: boolean = false;\n\n /** (ScwFormComponent) required state management */\n @property({type: Boolean})\n required: boolean = false;\n\n /** (ScwFormComponent) label indicator for required */\n @property({type: String, attribute: 'required-label'})\n requiredLabel: string = ' *';\n\n /** (ScwFormComponent) label indicator for required */\n @property({type: String, attribute: 'required-feedback'})\n requiredFeedback?: string;\n\n // ===== STATE ===============================================================\n /** the text to use for feedback */\n @state() feedback: string | undefined;\n\n /** determines whether the input is focused or not */\n @state() focused : boolean = false;\n\n /** whether this form element is valid, passed validation */\n @state() invalid: boolean = false;\n\n /** connectedCallback */\n connectedCallback(): void {\n super.connectedCallback();\n if (this.required) {\n this.createAndAddValidationRule(\n ValidationTypes.required,\n this.requiredFeedback,\n );\n }\n }\n\n /** (ScwFormComponent) each form element to decorates the final data object\n * @param {Object} formData\n */\n decorateValues(formData: {}): void {\n if (!this.name) {\n this.warn(`${this.element} didn't find a name`);\n return;\n }\n if (this.formType === ScwFormComponentTypes.boolean) {\n formData[this.name] = this.selected;// ? 'true' : 'false';\n } else {\n formData[this.name] = this.value;\n }\n }\n\n /**\n * Check to see if form element is required w/o knowing if there is validation\n * @return {boolean}\n */\n findIfRequired() : boolean {\n const rules = this.findValidationRules();\n if (rules) {\n return rules.isRequired();\n }\n return false;\n }\n\n /**\n * Find validation child if there...\n * @return {ScwValidation | undefined}\n */\n findValidationRules() : ScwValidation | undefined {\n const childrenArr = Array.from(this.children);\n const validation = childrenArr.find((child: any) => {\n // component may not be initialized yet...\n return child.nodeName.indexOf('SCW-VALIDATION') === 0;\n // return child.element === Components.validation;\n });\n return validation as unknown as ScwValidation;\n }\n\n /**\n * run the validation rules if there...\n * @param {string} value\n * @return {ValidationResult[]}\n */\n validate() : ValidationResult[] {\n const validation = this.findValidationRules();\n let results : ValidationResult[] = [];\n if (validation) {\n results = validation.validate(this.value);\n }\n this.invalid = ( results.length > 0);\n if (this.invalid ) {\n this.feedback = results[0].feedback;\n } else {\n this.feedback = '';\n }\n return results;\n }\n\n\n /**\n * create a validation rule from scratch\n * @return {ScwValidate}\n */\n createValidateRule() : ScwValidate {\n return document.createElement(\n `scw-${Components.validate}${getSuffix()}`,\n ) as unknown as ScwValidate;\n }\n\n /**\n * add validation to to child validation (create if not there)\n * @param {ScwValidate} rule\n */\n addValidationRule(rule: ScwValidate ) {\n let validationRules = this.findValidationRules();\n if (!validationRules) {\n validationRules = document.createElement(\n `scw-${Components.validation}${getSuffix()}`,\n ) as unknown as ScwValidation;\n this.prepend( validationRules );\n }\n // Check for dups?\n const children = Array.from(validationRules.children);\n const existingRule = children.find((child : any) => {\n return child.getAttribute('type') === rule.type;\n });\n if ( !existingRule ) {\n validationRules.appendChild(rule);\n }\n }\n\n /**\n * create a validation of a certain type...\n * @param {ValidationTypes} type\n * @param {string} feedbackOverride\n */\n createAndAddValidationRule(\n type: ValidationTypes,\n feedbackOverride?: string,\n ) {\n const rule = this.createValidateRule();\n rule.setAttribute('type', type );// .type = type;\n if (feedbackOverride) {\n rule.setAttribute('feedback', feedbackOverride );\n }\n this.addValidationRule( rule );\n }\n\n /**\n *\n * @param {ValidationTypes} type\n */\n removeValidationRule(\n type: ValidationTypes,\n ) {\n const validationRules = this.findValidationRules();\n if (!validationRules) return;\n const children = Array.from(validationRules.children);\n const child = children.find(\n (child : any) => child.type === type,\n ) as unknown as HTMLElement;\n if ( child && child.parentNode ) child.parentNode.removeChild(child);\n }\n\n /**\n * render\n * @return {object} component DOM\n */\n render(): object {\n return html`\n scw-form-component\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": "8KAUO,GAAK,GAAL,CAAK,GACV,QAAO,OACP,UAAU,UACV,SAAS,SAHC,WAMA,EAAL,CAAK,GACV,UAAS,SACT,SAAS,SAFC,WAUZ,eAA8C,EAAa,CAA3D,kCAQI,cAAkC,OAQlC,WAAgB,GAIhB,iBAAsB,GAItB,cAAoB,GAIpB,cAAoB,GAIpB,cAAoB,GAIpB,mBAAwB,KAWjB,aAAoB,GAGpB,aAAmB,GAG5B,mBAA0B,CACxB,MAAM,kBAAkB,EACpB,KAAK,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unk.HCMPRDIX.js";import{a as d}from"./chunk.Y2P62L7U.js";import{g as e}from"./chunk.5YJY6NT6.js";var p=a`
|
|
2
|
+
:host {
|
|
3
|
+
/* scw element */
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
--margin-right: initial;
|
|
7
|
+
--margin-bottom: initial;
|
|
8
|
+
--gap-h-int: initial;
|
|
9
|
+
--gap-v-int: initial;
|
|
10
|
+
margin-right: var(--margin-right, var(--gap-h-int, initial));
|
|
11
|
+
margin-bottom: var(--margin-bottom, var(--gap-v-int, initial));
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([warning]) {
|
|
16
|
+
outline: 2px solid red !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([size=medium]) {
|
|
20
|
+
display: block;
|
|
21
|
+
background-color: rgba(0, 0, 0, 0);
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-flow: column nowrap;
|
|
24
|
+
justify-content: flex-start;
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
padding-left: 0px;
|
|
27
|
+
padding-right: 0px;
|
|
28
|
+
padding-top: 0px;
|
|
29
|
+
padding-bottom: 0px;
|
|
30
|
+
/*.image-box {
|
|
31
|
+
width: 100%;
|
|
32
|
+
padding-bottom: 38.8888888889%;
|
|
33
|
+
position: relative;
|
|
34
|
+
}*/
|
|
35
|
+
/*.image {
|
|
36
|
+
@include size-medium-image-mixins.box;
|
|
37
|
+
|
|
38
|
+
position: absolute;
|
|
39
|
+
inset: 0;
|
|
40
|
+
background-position: center;
|
|
41
|
+
background-size: cover;
|
|
42
|
+
}*/
|
|
43
|
+
/*.action {
|
|
44
|
+
@include size-medium-action-mixins.box;
|
|
45
|
+
@include size-medium-action-mixins.sizing;
|
|
46
|
+
}*/
|
|
47
|
+
}
|
|
48
|
+
:host([size=medium]) > *:not(:last-child) {
|
|
49
|
+
margin-bottom: calc(var(--scw-spacing-1) * 0.8);
|
|
50
|
+
--margin-bottom: calc( var( --scw-spacing-1 ) * 0.8 );
|
|
51
|
+
}
|
|
52
|
+
:host([size=medium]) .image-box {
|
|
53
|
+
height: 161px;
|
|
54
|
+
}
|
|
55
|
+
:host([size=medium]) .description {
|
|
56
|
+
text-align: LEFT;
|
|
57
|
+
font: var(--scw-type-text-font);
|
|
58
|
+
color: var(--scw-color-grey-02);
|
|
59
|
+
align-self: stretch;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([size=small]) {
|
|
63
|
+
display: block;
|
|
64
|
+
background-color: rgba(0, 0, 0, 0);
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-flow: column nowrap;
|
|
67
|
+
justify-content: flex-start;
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
padding-left: 0px;
|
|
70
|
+
padding-right: 0px;
|
|
71
|
+
padding-top: 0px;
|
|
72
|
+
padding-bottom: 0px;
|
|
73
|
+
/*.image-box {
|
|
74
|
+
width: 100%;
|
|
75
|
+
padding-bottom: 88.9473684211%;
|
|
76
|
+
position: relative;
|
|
77
|
+
}*/
|
|
78
|
+
/*.image {
|
|
79
|
+
@include size-small-image-mixins.box;
|
|
80
|
+
|
|
81
|
+
position: absolute;
|
|
82
|
+
inset: 0;
|
|
83
|
+
background-position: center;
|
|
84
|
+
background-size: cover;
|
|
85
|
+
}*/
|
|
86
|
+
}
|
|
87
|
+
:host([size=small]) > *:not(:last-child) {
|
|
88
|
+
margin-bottom: calc(var(--scw-spacing-1) * 0.8);
|
|
89
|
+
--margin-bottom: calc( var( --scw-spacing-1 ) * 0.8 );
|
|
90
|
+
}
|
|
91
|
+
:host([size=small]) .image-box {
|
|
92
|
+
height: 169px;
|
|
93
|
+
}
|
|
94
|
+
:host([size=small]) .description {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
:host([size=small]) .action {
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host .super-heading.mortgage {
|
|
102
|
+
text-align: LEFT;
|
|
103
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
104
|
+
color: var(--scw-color-04, var(--scw-color-mortgage-04));
|
|
105
|
+
align-self: stretch;
|
|
106
|
+
}
|
|
107
|
+
:host .super-heading.savings {
|
|
108
|
+
text-align: LEFT;
|
|
109
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
110
|
+
color: var(--scw-color-04, var(--scw-color-savings-04));
|
|
111
|
+
align-self: stretch;
|
|
112
|
+
}
|
|
113
|
+
:host .super-heading.student {
|
|
114
|
+
text-align: LEFT;
|
|
115
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
116
|
+
color: var(--scw-color-04, var(--scw-color-student-04));
|
|
117
|
+
align-self: stretch;
|
|
118
|
+
}
|
|
119
|
+
:host .super-heading.investments {
|
|
120
|
+
text-align: LEFT;
|
|
121
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
122
|
+
color: var(--scw-color-04, var(--scw-color-investments-04));
|
|
123
|
+
align-self: stretch;
|
|
124
|
+
}
|
|
125
|
+
:host .super-heading.checking {
|
|
126
|
+
text-align: LEFT;
|
|
127
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
128
|
+
color: var(--scw-color-04, var(--scw-color-checking-04));
|
|
129
|
+
align-self: stretch;
|
|
130
|
+
}
|
|
131
|
+
:host .super-heading.credit-cards {
|
|
132
|
+
text-align: LEFT;
|
|
133
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
134
|
+
color: var(--scw-color-04, var(--scw-color-credit-cards-04));
|
|
135
|
+
align-self: stretch;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:host {
|
|
139
|
+
display: block;
|
|
140
|
+
background-color: var(--scw-color, rgba(0, 0, 0, 0));
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-flow: column nowrap;
|
|
143
|
+
justify-content: flex-start;
|
|
144
|
+
align-items: flex-start;
|
|
145
|
+
padding-left: 0px;
|
|
146
|
+
padding-right: 0px;
|
|
147
|
+
padding-top: 0px;
|
|
148
|
+
padding-bottom: 0px;
|
|
149
|
+
/*.image {
|
|
150
|
+
@include default-image-mixins.box;
|
|
151
|
+
|
|
152
|
+
position: absolute;
|
|
153
|
+
inset: 0;
|
|
154
|
+
background-position: center;
|
|
155
|
+
background-size: cover;
|
|
156
|
+
}*/
|
|
157
|
+
}
|
|
158
|
+
:host > *:not(:last-child) {
|
|
159
|
+
margin-bottom: calc(var(--scw-spacing-1) * 0.8);
|
|
160
|
+
--margin-bottom: calc( var( --scw-spacing-1 ) * 0.8 );
|
|
161
|
+
}
|
|
162
|
+
:host .image-box {
|
|
163
|
+
background-color: var(--scw-color-09, var(--scw-color-grey-09));
|
|
164
|
+
border-radius: 10px 10px 10px 10px;
|
|
165
|
+
align-self: stretch;
|
|
166
|
+
flex: 1;
|
|
167
|
+
flex: initial;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
height: 345px;
|
|
170
|
+
}
|
|
171
|
+
:host .heading {
|
|
172
|
+
background-color: rgba(0, 0, 0, 0);
|
|
173
|
+
align-self: stretch;
|
|
174
|
+
}
|
|
175
|
+
:host .super-heading {
|
|
176
|
+
text-align: LEFT;
|
|
177
|
+
font: var(--scw-type-text-bold-condensed-font);
|
|
178
|
+
color: var(--scw-color-03, var(--scw-color-primary-03));
|
|
179
|
+
align-self: stretch;
|
|
180
|
+
}
|
|
181
|
+
:host .description {
|
|
182
|
+
text-align: LEFT;
|
|
183
|
+
font: var(--scw-type-text-06-font);
|
|
184
|
+
color: var(--scw-color-02, var(--scw-color-grey-02));
|
|
185
|
+
align-self: stretch;
|
|
186
|
+
}
|
|
187
|
+
:host .action {
|
|
188
|
+
width: 83px;
|
|
189
|
+
height: 32px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:host([action=none]) {
|
|
193
|
+
pointer-events: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host([action=whole]) {
|
|
197
|
+
pointer-events: all;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host([action=whole]:hover) {
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host([action=whole]:focus-visible) {
|
|
205
|
+
outline: none;
|
|
206
|
+
box-shadow: var(--scw-effect-focus-shadow);
|
|
207
|
+
border-radius: 10px 10px 4px 4px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host([action=link]) {
|
|
211
|
+
pointer-events: none;
|
|
212
|
+
}
|
|
213
|
+
:host([action=link]) scw-link {
|
|
214
|
+
pointer-events: all;
|
|
215
|
+
}`;var t=class extends c{constructor(){super();this.preload=!1;this.size="large";this.action="none";this.element="card",this.clickHandler=this.clickHandler.bind(this);let o=g();this.headerNodeName=r(`scw-${"heading"}${o}`),this.imageNodeName=r(`scw-${"image"}${o}`),this.linkNodeName=r(`scw-${"link"}${o}`)}static get styles(){return[super.styles,p]}parseAndValidateLightDom(){d(this),super.parseAndValidateLightDom()}clickHandler(o){o.stopPropagation(),this.click()}warn(o){this.heading=`error: ${o}`,l.prototype.warn.call(this,o)}renderImage(){if((this.src||this.srcset)&&this.alt)return s`
|
|
216
|
+
<scw-image
|
|
217
|
+
class="image-box"
|
|
218
|
+
src="${n(this.src)}"
|
|
219
|
+
srcset="${n(this.srcset)}"
|
|
220
|
+
alt="${this.alt}"
|
|
221
|
+
preload="${n(this.preload?"true":void 0)}"
|
|
222
|
+
object-fit="cover">
|
|
223
|
+
</scw-image>
|
|
224
|
+
`}renderButton(){return this.action==="link"?s`
|
|
225
|
+
<scw-link
|
|
226
|
+
aria-label="${this.linkLabel?this.linkLabel:"no label"}"
|
|
227
|
+
@click="${this.clickHandler}">
|
|
228
|
+
</scw-link>`:null}getSizeStringForHeader(){switch(this.size){case"large":return"h1";case"medium":return"h2";case"small":return"h3"}}renderBody(){return s`
|
|
229
|
+
${this.renderImage()}
|
|
230
|
+
${this.superHeading?s`
|
|
231
|
+
<div class="super-heading">
|
|
232
|
+
${this.superHeading}
|
|
233
|
+
</div>`:""}
|
|
234
|
+
<scw-heading
|
|
235
|
+
style="--scw-color-04: var( --scw-color-grey-02 );"
|
|
236
|
+
dynamic class="heading"
|
|
237
|
+
aria-label="${n(this.heading)}"
|
|
238
|
+
size="${this.getSizeStringForHeader()}">
|
|
239
|
+
</scw-heading>
|
|
240
|
+
${this.description?s`
|
|
241
|
+
<div class="description">
|
|
242
|
+
${this.description}
|
|
243
|
+
</div>`:""}`}render(){return this.action==="whole"?this.renderBody():s`
|
|
244
|
+
${this.renderBody()}
|
|
245
|
+
${this.renderButton()}`}};e([i()],t.prototype,"src",2),e([i()],t.prototype,"srcset",2),e([i()],t.prototype,"alt",2),e([i()],t.prototype,"heading",2),e([i()],t.prototype,"superHeading",2),e([i()],t.prototype,"description",2),e([i()],t.prototype,"linkLabel",2),e([i({type:Boolean})],t.prototype,"preload",2),e([i({type:String,reflect:!0})],t.prototype,"size",2),e([i({type:String,reflect:!0})],t.prototype,"action",2);export{t as a};
|
|
246
|
+
//# sourceMappingURL=chunk.3FBPDSVX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sass-plugin-0:/Users/scottrouse/Workspace/scu-design-system-mono/scu-web-components/src/scw-card/scss/scw-card.scss", "../../src/scw-card/ScwCard.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from \"lit-element/lit-element.js\";\nexport default css`\n:host {\n /* scw element */\n position: relative;\n box-sizing: border-box;\n --margin-right: initial;\n --margin-bottom: initial;\n --gap-h-int: initial;\n --gap-v-int: initial;\n margin-right: var(--margin-right, var(--gap-h-int, initial));\n margin-bottom: var(--margin-bottom, var(--gap-v-int, initial));\n display: block;\n}\n\n:host([warning]) {\n outline: 2px solid red !important;\n}\n\n:host([size=medium]) {\n display: block;\n background-color: rgba(0, 0, 0, 0);\n display: flex;\n flex-flow: column nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-left: 0px;\n padding-right: 0px;\n padding-top: 0px;\n padding-bottom: 0px;\n /*.image-box {\n width: 100%;\n padding-bottom: 38.8888888889%;\n position: relative;\n }*/\n /*.image {\n @include size-medium-image-mixins.box;\n\n position: absolute;\n inset: 0;\n background-position: center;\n background-size: cover;\n }*/\n /*.action {\n @include size-medium-action-mixins.box;\n @include size-medium-action-mixins.sizing;\n }*/\n}\n:host([size=medium]) > *:not(:last-child) {\n margin-bottom: calc(var(--scw-spacing-1) * 0.8);\n --margin-bottom: calc( var( --scw-spacing-1 ) * 0.8 );\n}\n:host([size=medium]) .image-box {\n height: 161px;\n}\n:host([size=medium]) .description {\n text-align: LEFT;\n font: var(--scw-type-text-font);\n color: var(--scw-color-grey-02);\n align-self: stretch;\n}\n\n:host([size=small]) {\n display: block;\n background-color: rgba(0, 0, 0, 0);\n display: flex;\n flex-flow: column nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-left: 0px;\n padding-right: 0px;\n padding-top: 0px;\n padding-bottom: 0px;\n /*.image-box {\n width: 100%;\n padding-bottom: 88.9473684211%;\n position: relative;\n }*/\n /*.image {\n @include size-small-image-mixins.box;\n\n position: absolute;\n inset: 0;\n background-position: center;\n background-size: cover;\n }*/\n}\n:host([size=small]) > *:not(:last-child) {\n margin-bottom: calc(var(--scw-spacing-1) * 0.8);\n --margin-bottom: calc( var( --scw-spacing-1 ) * 0.8 );\n}\n:host([size=small]) .image-box {\n height: 169px;\n}\n:host([size=small]) .description {\n display: none;\n}\n:host([size=small]) .action {\n display: none;\n}\n\n:host .super-heading.mortgage {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-04, var(--scw-color-mortgage-04));\n align-self: stretch;\n}\n:host .super-heading.savings {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-04, var(--scw-color-savings-04));\n align-self: stretch;\n}\n:host .super-heading.student {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-04, var(--scw-color-student-04));\n align-self: stretch;\n}\n:host .super-heading.investments {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-04, var(--scw-color-investments-04));\n align-self: stretch;\n}\n:host .super-heading.checking {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-04, var(--scw-color-checking-04));\n align-self: stretch;\n}\n:host .super-heading.credit-cards {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-04, var(--scw-color-credit-cards-04));\n align-self: stretch;\n}\n\n:host {\n display: block;\n background-color: var(--scw-color, rgba(0, 0, 0, 0));\n display: flex;\n flex-flow: column nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-left: 0px;\n padding-right: 0px;\n padding-top: 0px;\n padding-bottom: 0px;\n /*.image {\n @include default-image-mixins.box;\n\n position: absolute;\n inset: 0;\n background-position: center;\n background-size: cover;\n }*/\n}\n:host > *:not(:last-child) {\n margin-bottom: calc(var(--scw-spacing-1) * 0.8);\n --margin-bottom: calc( var( --scw-spacing-1 ) * 0.8 );\n}\n:host .image-box {\n background-color: var(--scw-color-09, var(--scw-color-grey-09));\n border-radius: 10px 10px 10px 10px;\n align-self: stretch;\n flex: 1;\n flex: initial;\n overflow: hidden;\n height: 345px;\n}\n:host .heading {\n background-color: rgba(0, 0, 0, 0);\n align-self: stretch;\n}\n:host .super-heading {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-font);\n color: var(--scw-color-03, var(--scw-color-primary-03));\n align-self: stretch;\n}\n:host .description {\n text-align: LEFT;\n font: var(--scw-type-text-06-font);\n color: var(--scw-color-02, var(--scw-color-grey-02));\n align-self: stretch;\n}\n:host .action {\n width: 83px;\n height: 32px;\n}\n\n:host([action=none]) {\n pointer-events: none;\n}\n\n:host([action=whole]) {\n pointer-events: all;\n}\n\n:host([action=whole]:hover) {\n cursor: pointer;\n}\n\n:host([action=whole]:focus-visible) {\n outline: none;\n box-shadow: var(--scw-effect-focus-shadow);\n border-radius: 10px 10px 4px 4px;\n}\n\n:host([action=link]) {\n pointer-events: none;\n}\n:host([action=link]) scw-link {\n pointer-events: all;\n}`;\n", "import {property} from 'lit/decorators.js';\nimport {html} from 'lit/static-html.js';// import {html} from 'lit';\nimport {unsafeStatic} from 'lit/static-html.js';// USE DIFFERENT 'html'!!!!\nimport styles from './scss/scw-card.scss';\nimport ScwComponent from '../scw-component/ScwComponent';\nimport {ScwCardSizes, ScwCardActions} from './scw-card-enums';\nimport parseLightDomCard from './scw-card-light-dom';\nimport ScwLinkBase from '../scw-link-base/ScwLinkBase';\nimport {Components} from '../utils/enums/Components';\nimport getSuffix from '../utils/suffix';\nimport {ScwHeadingSizes} from '../scw-heading/scw-heading-enums';\nimport {ifDefined} from 'lit/directives/if-defined.js';\n\n/**\n * ScwCard a first LitElement web component\n * @class\n * @tag scw-card\n *\n * @slot [default=\"<img src alt /><h1, h2, h3 /><sup /><p />\"]\n The parts of scw-card are configured via nested html elements.\n img defines the image, heading the main heading, sup the category heading,\n and p the descriptive text. Only headings is required (with src, srcset,\n and alt attributes).\n * @slot [default=\"<img src alt /><h1, h2, h3 /><sup /><p /><a />\"]\n Adding an anchor will show a link.\n * @slot [default=\"<a><img src alt /><h1, h2, h3 /><sup /><p /></a>\"]\n Wrapping the entire content in an anchor will make it interactive\n */\nexport default class ScwCard extends ScwLinkBase {\n /**\n * styles\n */\n static get styles() {\n return [\n super.styles,\n styles,\n ];\n }\n\n // ============== ScwCard ====================================================\n /** (ScwCard) The src of the image within the card */\n @property() src: string | undefined;\n\n /** (ScwCard) The srcset of the image within the card */\n @property() srcset: string | undefined;\n\n /** (ScwCard) Alternative description of the image. */\n @property() alt: string | undefined;\n\n /** (ScwCard) Main title or header of the card (determined by\n * <h1, h2, h3> content) */\n @property() heading: string | undefined;\n\n /** (ScwCard) Super title, describing a category or area pertaining to title\n * (determined by <sup> content) */\n @property() superHeading: string | undefined;\n\n /** (ScwCard) Fuller description of what the card is about (determined by\n * <p> content) */\n @property() description: string | undefined;\n\n /** (ScwCard) Label on the link */\n @property() linkLabel : string | undefined;\n\n /** (ScwCard) whether to preload image or not */\n @property({type: Boolean}) preload: boolean = false;\n\n // ----------- END STATES ----------------------------------------------------\n /** (ScwCard) Readonly - Size of the card. This\n * is determined by the nested html content (h1 = large,\n * h2 = medium, h3 = small). */\n @property({type: String, reflect: true})\n size: ScwCardSizes = ScwCardSizes.large;\n\n /** (ScwCard) Readonly - The type of action (whole card, link, or none).\n * This is determined by the use of an anchor tag. */\n @property({type: String, reflect: true})\n action: ScwCardActions = ScwCardActions.none;\n\n /** scw-header with versioning suffix */\n headerNodeName : any;\n\n /** scw-image with versioning suffix */\n imageNodeName : any;\n\n /** scw-link with versioning suffix */\n linkNodeName : any;\n\n /**\n * Constructor\n */\n constructor() {\n super();\n this.element = Components.card;\n this.clickHandler = this.clickHandler.bind(this);\n\n const suffix = getSuffix();\n this.headerNodeName = unsafeStatic(`scw-${Components.heading}${suffix}`);\n this.imageNodeName = unsafeStatic(`scw-${Components.image}${suffix}`);\n this.linkNodeName = unsafeStatic(`scw-${Components.link}${suffix}`);\n }\n\n /** parseAndValidateLightDom, just adding local parsing and validation */\n parseAndValidateLightDom() {\n parseLightDomCard(this);\n super.parseAndValidateLightDom();\n }\n\n /**\n * Handle click event from link so it doesn't trigger twice\n * @param {Event} evt\n */\n clickHandler(evt : Event) {\n evt.stopPropagation();\n this.click();\n }\n\n /**\n * change the main heading to be the error.\n * @param {string} message describing warning\n */\n warn( message: string ) {\n this.heading = `error: ${message}`;\n ScwComponent.prototype.warn.call(this, message );\n }\n\n /**\n * Render image area\n * @return {object} component DOM\n */\n renderImage() {\n if (\n ( this.src || this.srcset ) &&\n this.alt ) {\n return html`\n <scw-image\n class=\"image-box\"\n src=\"${ifDefined(this.src)}\"\n srcset=\"${ifDefined(this.srcset)}\"\n alt=\"${this.alt}\"\n preload=\"${ifDefined(this.preload ? 'true' : undefined)}\"\n object-fit=\"cover\">\n </scw-image>\n `;\n }\n }\n\n /**\n * Render link area\n * @return {object} component DOM\n */\n renderButton() {\n if ( this.action === ScwCardActions.link) {\n return html`\n <scw-link\n aria-label=\"${this.linkLabel ? this.linkLabel : 'no label'}\" \n @click=\"${this.clickHandler}\">\n </scw-link>`;\n }\n return null;\n }\n\n /**\n * get string to use in the size attribute of scw-header\n * @return {string}\n */\n getSizeStringForHeader() {\n switch (this.size) {\n case ScwCardSizes.large:\n return 'h1';\n case ScwCardSizes.medium:\n return 'h2';\n case ScwCardSizes.small:\n return 'h3';\n }\n }\n\n /**\n * render body\n * @return {object} component DOM\n */\n renderBody() : object {\n return html`\n ${this.renderImage()}\n ${this.superHeading ?\n html`\n <div class=\"super-heading\">\n ${this.superHeading}\n </div>` : ''\n }\n <scw-heading\n style=\"--scw-color-04: var( --scw-color-grey-02 );\"\n dynamic class=\"heading\"\n aria-label=\"${ifDefined(this.heading)}\"\n size=\"${this.getSizeStringForHeader() as ScwHeadingSizes}\">\n </scw-heading>\n ${this.description ?\n html`\n <div class=\"description\">\n ${this.description}\n </div>` : ''\n }`;\n }\n\n /**\n * render\n * @return {object} component DOM\n */\n render() : object {\n if (this.action === ScwCardActions.whole) {\n return this.renderBody();\n } else {\n return html`\n ${this.renderBody()}\n ${this.renderButton()}`;\n };\n }\n}\n"],
|
|
5
|
+
"mappings": "uQACA,GAAO,GAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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Bc,uBAIA,GAAZ,AAAC,EAAS,GAAE,AA3Bd,EA2Bc,4BAIA,GAAZ,AAAC,EAAS,GAAE,AA/Bd,EA+Bc,2BAGA,GAAZ,AAAC,EAAS,GAAE,AAlCd,EAkCc,yBAGe,GAA3B,AAAC,EAAS,CAAC,KAAM,OAAO,CAAC,GAAE,AArC7B,EAqC6B,uBAOzB,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GACrC,AA5CJ,EA4CI,oBAKA,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GACrC,AAjDJ,EAiDI",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/suffix.ts"],
|
|
4
|
+
"sourcesContent": ["import {config} from '../scw';\n\n/**\n * Pulls suffix from global design system config with some formatting options\n * @param {string} connector\n * @return {string}\n */\nexport default function getSuffix(connector: string = '-') {\n return config ? config.suffix ? `${connector}${config.suffix}` : '' : '';\n}\n\n"],
|
|
5
|
+
"mappings": "wCAOe,WAAmB,EAAoB,IAAK,CACzD,MAAO,IAAS,EAAO,OAAS,GAAG,IAAY,EAAO,SAAgB,EACxE",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/suffix.ts"],
|
|
4
|
+
"sourcesContent": ["import {config} from '../scw';\n\n/**\n * Pulls suffix from global design system config with some formatting options\n * @param {string} connector\n * @return {string}\n */\nexport default function getSuffix(connector: string = '-') {\n return config ? config.suffix ? `${connector}${config.suffix}` : '' : '';\n}\n\n"],
|
|
5
|
+
"mappings": "wCAOe,WAAmB,EAAoB,IAAK,CACzD,MAAO,IAAS,EAAO,OAAS,GAAG,IAAY,EAAO,SAAgB,EACxE",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{a as i}from"./chunk.7GL4EMSM.js";import{d as s}from"./chunk.S4MESEBR.js";import{a as o,b as t}from"./chunk.HCMPRDIX.js";import{a as r}from"./chunk.ZS4C3T6Z.js";import{g as e}from"./chunk.5YJY6NT6.js";var h=o`
|
|
2
|
+
a.scw-link-base h1:hover, a.scw-link-base h2:hover, a.scw-link-base h3:hover, a.scw-link-base h4:hover, a.scw-link-base h5:hover {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
text-decoration: underline;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
a.scw-link-base[aria-disabled=true] h1, a.scw-link-base[aria-disabled=true] h2, a.scw-link-base[aria-disabled=true] h3, a.scw-link-base[aria-disabled=true] h4, a.scw-link-base[aria-disabled=true] h5,
|
|
8
|
+
:host([anchor][aria-disabled=true]) h1,
|
|
9
|
+
:host([anchor][aria-disabled=true]) h2,
|
|
10
|
+
:host([anchor][aria-disabled=true]) h3,
|
|
11
|
+
:host([anchor][aria-disabled=true]) h4,
|
|
12
|
+
:host([anchor][aria-disabled=true]) h5 {
|
|
13
|
+
color: var(--scw-color-primary-08);
|
|
14
|
+
}
|
|
15
|
+
a.scw-link-base[aria-disabled=true] h1:hover, a.scw-link-base[aria-disabled=true] h2:hover, a.scw-link-base[aria-disabled=true] h3:hover, a.scw-link-base[aria-disabled=true] h4:hover, a.scw-link-base[aria-disabled=true] h5:hover,
|
|
16
|
+
:host([anchor][aria-disabled=true]) h1:hover,
|
|
17
|
+
:host([anchor][aria-disabled=true]) h2:hover,
|
|
18
|
+
:host([anchor][aria-disabled=true]) h3:hover,
|
|
19
|
+
:host([anchor][aria-disabled=true]) h4:hover,
|
|
20
|
+
:host([anchor][aria-disabled=true]) h5:hover {
|
|
21
|
+
cursor: auto;
|
|
22
|
+
text-decoration: initial;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host a {
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
}
|
|
28
|
+
:host h1 {
|
|
29
|
+
text-align: LEFT;
|
|
30
|
+
font: var(--scw-type-text-bold-condensed-10-font);
|
|
31
|
+
color: var(--scw-color-04, var(--scw-color-primary-04));
|
|
32
|
+
}
|
|
33
|
+
:host h2 {
|
|
34
|
+
text-align: LEFT;
|
|
35
|
+
font: var(--scw-type-text-bold-condensed-09-font);
|
|
36
|
+
color: var(--scw-color-04, var(--scw-color-primary-04));
|
|
37
|
+
}
|
|
38
|
+
:host h3 {
|
|
39
|
+
text-align: LEFT;
|
|
40
|
+
font: var(--scw-type-text-bold-condensed-08-font);
|
|
41
|
+
color: var(--scw-color-04, var(--scw-color-primary-04));
|
|
42
|
+
}
|
|
43
|
+
:host h4 {
|
|
44
|
+
text-align: LEFT;
|
|
45
|
+
font: var(--scw-type-text-bold-condensed-07-font);
|
|
46
|
+
color: var(--scw-color-04, var(--scw-color-primary-04));
|
|
47
|
+
}
|
|
48
|
+
:host h5 {
|
|
49
|
+
text-align: LEFT;
|
|
50
|
+
font: var(--scw-type-text-bold-condensed-06-font);
|
|
51
|
+
color: var(--scw-color-04, var(--scw-color-primary-04));
|
|
52
|
+
}
|
|
53
|
+
:host h1, :host h2, :host h3, :host h4, :host h5 {
|
|
54
|
+
margin: 0;
|
|
55
|
+
padding: 0;
|
|
56
|
+
color: var(--scw-color-04, var(--scw-color-grey-02));
|
|
57
|
+
}`;var a=class extends s{constructor(){super();this.size="H1";this.element="heading"}static get styles(){return[super.styles,h]}parseAndValidateLightDom(){super.parseAndValidateLightDom(),i(this)}renderHeading(){switch(this.size.toUpperCase()){case"H5":return r`<h5>${this.ariaLabel}</h5>`;case"H4":return r`<h4>${this.ariaLabel}</h4>`;case"H3":return r`<h3>${this.ariaLabel}</h3>`;case"H2":return r`<h2>${this.ariaLabel}</h2>`;case"H1":default:return r`<h1>${this.ariaLabel}</h1>`}}render(){return this.renderLink(this.renderHeading())}};e([t({type:String,reflect:!0})],a.prototype,"size",2);export{a};
|
|
58
|
+
//# sourceMappingURL=chunk.75XREEIK.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sass-plugin-0:/Users/scottrouse/Workspace/scu-design-system-mono/scu-web-components/src/scw-heading/scss/scw-heading.scss", "../../src/scw-heading/ScwHeading.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from \"lit-element/lit-element.js\";\nexport default css`\na.scw-link-base h1:hover, a.scw-link-base h2:hover, a.scw-link-base h3:hover, a.scw-link-base h4:hover, a.scw-link-base h5:hover {\n cursor: pointer;\n text-decoration: underline;\n}\n\na.scw-link-base[aria-disabled=true] h1, a.scw-link-base[aria-disabled=true] h2, a.scw-link-base[aria-disabled=true] h3, a.scw-link-base[aria-disabled=true] h4, a.scw-link-base[aria-disabled=true] h5,\n:host([anchor][aria-disabled=true]) h1,\n:host([anchor][aria-disabled=true]) h2,\n:host([anchor][aria-disabled=true]) h3,\n:host([anchor][aria-disabled=true]) h4,\n:host([anchor][aria-disabled=true]) h5 {\n color: var(--scw-color-primary-08);\n}\na.scw-link-base[aria-disabled=true] h1:hover, a.scw-link-base[aria-disabled=true] h2:hover, a.scw-link-base[aria-disabled=true] h3:hover, a.scw-link-base[aria-disabled=true] h4:hover, a.scw-link-base[aria-disabled=true] h5:hover,\n:host([anchor][aria-disabled=true]) h1:hover,\n:host([anchor][aria-disabled=true]) h2:hover,\n:host([anchor][aria-disabled=true]) h3:hover,\n:host([anchor][aria-disabled=true]) h4:hover,\n:host([anchor][aria-disabled=true]) h5:hover {\n cursor: auto;\n text-decoration: initial;\n}\n\n:host a {\n text-decoration: none;\n}\n:host h1 {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-10-font);\n color: var(--scw-color-04, var(--scw-color-primary-04));\n}\n:host h2 {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-09-font);\n color: var(--scw-color-04, var(--scw-color-primary-04));\n}\n:host h3 {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-08-font);\n color: var(--scw-color-04, var(--scw-color-primary-04));\n}\n:host h4 {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-07-font);\n color: var(--scw-color-04, var(--scw-color-primary-04));\n}\n:host h5 {\n text-align: LEFT;\n font: var(--scw-type-text-bold-condensed-06-font);\n color: var(--scw-color-04, var(--scw-color-primary-04));\n}\n:host h1, :host h2, :host h3, :host h4, :host h5 {\n margin: 0;\n padding: 0;\n color: var(--scw-color-04, var(--scw-color-grey-02));\n}`;\n", "import {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport styles from './scss/scw-heading.scss';\nimport {ScwHeadingSizes} from './scw-heading-enums';\nimport {Components} from '../utils/enums/Components';\nimport ScwLinkBase from '../scw-link-base/ScwLinkBase';\nimport parseLightDomHeading from './parseLightDomHeading';\n\n/**\n * ScwHeading\n * @class\n * @tag scw-heading\n *\n * @slot [default=\"<h1, h2, h3, h4, h5 />\"]\n heading html (for SEO) will determine the size and label.\n * @slot [default=\"<a href target><h1, h2, h3, h4, h5 /></a>\"]\n (OPTIONAL) anchor (for SEO) will determine the label, href, and target in\n addition to size and label.\n */\nexport default class ScwHeading extends ScwLinkBase {\n /**\n * styles\n */\n static get styles() {\n return [\n super.styles,\n styles,\n ];\n }\n\n // ============== ScwHeading =================================================\n /**\n * (ScwHeader) Size of heading (h1, h2, h3, h4, h5)\n * @type {string}\n */\n @property({type: String, reflect: true})\n size: ScwHeadingSizes = ScwHeadingSizes.H1;\n\n /**\n * Constructor\n */\n constructor() {\n super();\n this.element = Components.heading;\n }\n\n /** parseAndValidateLightDom, just adding local parsing and validation */\n parseAndValidateLightDom() {\n super.parseAndValidateLightDom();\n parseLightDomHeading(this);\n }\n\n /**\n * renderHeading\n * @return {object} component DOM\n */\n renderHeading(): object {\n switch ( this.size.toUpperCase() ) {\n case ScwHeadingSizes.H5:\n return html`<h5>${this.ariaLabel}</h5>`;\n case ScwHeadingSizes.H4:\n return html`<h4>${this.ariaLabel}</h4>`;\n case ScwHeadingSizes.H3:\n return html`<h3>${this.ariaLabel}</h3>`;\n case ScwHeadingSizes.H2:\n return html`<h2>${this.ariaLabel}</h2>`;\n case ScwHeadingSizes.H1:\n default:\n return html`<h1>${this.ariaLabel}</h1>`;\n }\n }\n\n /**\n * render\n * @return {object} component DOM\n */\n render(): object {\n return this.renderLink(\n this.renderHeading(),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "+MACA,GAAO,GAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;GCkBf,mBAAwC,EAAY,CAsBlD,aAAc,CACZ,MAAM,EANN,UAAwB,KAOxB,KAAK,QAAU,SACjB,WArBY,SAAS,CACnB,MAAO,CACL,MAAM,OACN,CACF,CACF,CAmBA,0BAA2B,CACzB,MAAM,yBAAyB,EAC/B,EAAqB,IAAI,CAC3B,CAMA,eAAwB,CACtB,OAAS,KAAK,KAAK,YAAY,OACxB,KACH,MAAO,SAAW,KAAK,qBACpB,KACH,MAAO,SAAW,KAAK,qBACpB,KACH,MAAO,SAAW,KAAK,qBACpB,KACH,MAAO,SAAW,KAAK,qBACpB,aAEH,MAAO,SAAW,KAAK,iBAE7B,CAMA,QAAiB,CACf,MAAO,MAAK,WACV,KAAK,cAAc,CACrB,CACF,CACF,EA7CI,GADF,AAAC,EAAS,CAAC,KAAM,OAAQ,QAAS,EAAI,CAAC,GACrC,AAjBJ,EAiBI",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{a as f}from"./chunk.5HZ4WTGH.js";import{c as w,e as h,f as d}from"./chunk.ZS4C3T6Z.js";var{H:O}=d,v=r=>r===null||typeof r!="object"&&typeof r!="function";var y=(r,a)=>{var i,n;return a===void 0?((i=r)===null||i===void 0?void 0:i._$litType$)!==void 0:((n=r)===null||n===void 0?void 0:n._$litType$)===a};var g=r=>r.strings===void 0;var{R:_,D:P,j:A,H:m,Z:E}=d,$=(r,a,i={})=>{if(a._$litPart$!==void 0)throw Error("container already contains a live render");let n,s,o=[],e=document.createTreeWalker(a,NodeFilter.SHOW_COMMENT,null,!1),t;for(;(t=e.nextNode())!==null;){let l=t.data;if(l.startsWith("lit-part")){if(o.length===0&&n!==void 0)throw Error("there must be only one root part per container");s=T(r,t,o,i),n!=null||(n=s)}else if(l.startsWith("lit-node")){R(t,o,i);let c=t.parentElement;c.hasAttribute("defer-hydration")&&c.removeAttribute("defer-hydration")}else if(l.startsWith("/lit-part")){if(o.length===1&&s!==n)throw Error("internal error");s=C(t,s,o)}}console.assert(n!==void 0,"there should be exactly one root part in a render container"),a._$litPart$=n},T=(r,a,i,n)=>{let s,o;if(i.length===0)o=new m(a,null,void 0,n),s=r;else{let e=i[i.length-1];if(e.type==="template-instance")o=new m(a,null,e.instance,n),e.instance.v.push(o),s=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if(e.type==="iterable"){o=new m(a,null,e.part,n);let t=e.iterator.next();if(t.done)throw s=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");s=t.value,e.part._$AH.push(o)}else o=new m(a,null,e.part,n)}if(s=A(o,s),s===w)i.push({part:o,type:"leaf"});else if(v(s))i.push({part:o,type:"leaf"}),o._$AH=s;else if(y(s)){let e="lit-part "+H(s);if(a.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let t=m.prototype._$AC(s),l=new _(t,o);i.push({type:"template-instance",instance:l,part:o,templatePartIndex:0,instancePartIndex:0,result:s}),o._$AH=l}}else P(s)?(i.push({part:o,type:"iterable",value:s,iterator:s[Symbol.iterator](),done:!1}),o._$AH=[]):(i.push({part:o,type:"leaf"}),o._$AH=s==null?"":s);return o},C=(r,a,i)=>{if(a===void 0)throw Error("unbalanced part marker");a._$AB=r;let n=i.pop();if(n.type==="iterable"&&!n.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},R=(r,a,i)=>{var n;let s=/lit-node (\d+)/.exec(r.data),o=parseInt(s[1]),e=(n=r.previousSibling)!==null&&n!==void 0?n:r.parentElement,t=a[a.length-1];if(t.type!=="template-instance")throw Error("internal error");{let l=t.instance;for(;;){let c=l._$AD.parts[t.templatePartIndex];if(c===void 0||c.type!==f.ATTRIBUTE&&c.type!==f.ELEMENT||c.index!==o)break;if(c.type===f.ATTRIBUTE){let p=new c.ctor(e,c.name,c.strings,t.instance,i),u=g(p)?t.result.values[t.instancePartIndex]:t.result.values,x=!(p.type===f.EVENT||p.type===f.PROPERTY);p._$AI(u,p,t.instancePartIndex,x),t.instancePartIndex+=c.strings.length-1,l.v.push(p)}else{let p=new E(e,t.instance,i);A(p,t.result.values[t.instancePartIndex++]),l.v.push(p)}t.templatePartIndex++}}},H=r=>{let a=new Uint32Array(2).fill(5381);for(let i of r.strings)for(let n=0;n<i.length;n++)a[n%2]=33*a[n%2]^i.charCodeAt(n);return btoa(String.fromCharCode(...new Uint8Array(a.buffer)))};globalThis.litElementHydrateSupport=({LitElement:r})=>{let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),"observedAttributes").get;Object.defineProperty(r,"observedAttributes",{get(){return[...a.call(this),"defer-hydration"]}});let i=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(e,t,l){e==="defer-hydration"&&l===null&&n.call(this),i.call(this,e,t,l)};let n=r.prototype.connectedCallback;r.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||n.call(this)};let s=r.prototype.createRenderRoot;r.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):s.call(this)};let o=Object.getPrototypeOf(r.prototype).update;r.prototype.update=function(e){let t=this.render();o.call(this,e),this._$AG?(this._$AG=!1,$(t,this.renderRoot,this.renderOptions)):h(t,this.renderRoot,this.renderOptions)}};var b={},I;async function V(r={}){let{components:a=!1,suffix:i=!1}=r;I={suffix:i};let n=!a,s=i?`-${i}`:"",o=[];function e(l,c){o.push((async()=>{let p=`${l}${s}`;if(!b[p]){b[p]=!0;try{window.customElements.define(p,(await c).default)}catch(u){console.error(p,u)}}})())}function t(l){if(n)return!0;if(Array.isArray(a))return a?a.includes(l):!1}return t("scw-component")&&e("scw-component",import("../scw-component/ScwComponent.js")),t("scw-form-component")&&e("scw-form-component",import("../scw-form-component/scw-form-component.js")),t("scw-card")&&e("scw-card",import("../scw-card/ScwCard.js")),t("scw-input-field")&&e("scw-input-field",import("../scw-input-field/scw-input-field.js")),t("scw-input-layout")&&e("scw-input-layout",import("../scw-input-layout/scw-input-layout.js")),t("scw-link")&&e("scw-link",import("../scw-link/ScwLink.js")),t("scw-button")&&e("scw-button",import("../scw-button/ScwButton.js")),t("scw-menu")&&e("scw-menu",import("../scw-menu/ScwMenu.js")),t("scw-menu-item")&&e("scw-menu-item",import("../scw-menu-item/ScwMenuItem.js")),t("scw-icon")&&e("scw-icon",import("../scw-icon/ScwIcon.js")),t("scw-heading")&&e("scw-heading",import("../scw-heading/ScwHeading.js")),t("scw-image")&&e("scw-image",import("../scw-image/ScwImage.js")),t("scw-input")&&e("scw-input",import("../scw-input/scw-input.js")),t("scw-single-input")&&e("scw-single-input",import("../scw-single-input/scw-single-input.js")),t("scw-single-input-layout")&&e("scw-single-input-layout",import("../scw-single-input-layout/scw-single-input-layout.js")),t("scw-responsive")&&e("scw-responsive",import("../scw-responsive/scw-responsive.js")),t("scw-validation")&&e("scw-validation",import("../scw-validation/scw-validation.js")),t("scw-validate")&&e("scw-validate",import("../scw-validate/scw-validate.js")),t("scw-flex-h-component")&&e("scw-flex-h-component",import("../scw-flex-h-component/scw-flex-h-component.js")),t("scw-flex-v-component")&&e("scw-flex-v-component",import("../scw-flex-v-component/scw-flex-v-component.js")),t("scw-stack-component")&&e("scw-stack-component",import("../scw-stack-component/scw-stack-component.js")),t("scw-layout-component")&&e("scw-layout-component",import("../scw-layout-component/scw-layout-component.js")),t("scw-element-component")&&e("scw-element-component",import("../scw-element-component/scw-element-component.js")),t("scw-center-component")&&e("scw-center-component",import("../scw-center-component/ScwCenterComponent.js")),t("scw-float-component")&&e("scw-float-component",import("../scw-float-component/scw-float-component.js")),t("scw-pane-component")&&e("scw-pane-component",import("../scw-pane-component/scw-pane-component.js")),t("scw-form")&&e("scw-form",import("../scw-form/scw-form.js")),t("scw-page-alert")&&e("scw-page-alert",import("../scw-page-alert/scw-page-alert.js")),t("scw-link-base")&&e("scw-link-base",import("../scw-link-base/ScwLinkBase.js")),t("scw-textarea")&&e("scw-textarea",import("../scw-textarea/scw-textarea.js")),t("scw-select")&&e("scw-select",import("../scw-select/scw-select.js")),t("scw-alert")&&e("scw-alert",import("../scw-alert/ScwAlert.js")),Promise.all(o)}export{g as a,I as b,V as c};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2019 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2020 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
//# sourceMappingURL=chunk.7VW267FJ.js.map
|