@cscfi/csc-ui 3.0.12 → 3.0.13
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/cjs/c-autocomplete_35.cjs.entry.js +4 -3
- package/dist/cjs/c-autocomplete_35.cjs.entry.js.map +1 -1
- package/dist/collection/components/c-input/c-input.css +12 -1
- package/dist/collection/components/c-input/c-input.js +3 -2
- package/dist/collection/components/c-input/c-input.js.map +1 -1
- package/dist/components/c-autocomplete.js +1 -1
- package/dist/components/c-input.js +1 -1
- package/dist/components/c-select.js +1 -1
- package/dist/components/c-text-field.js +1 -1
- package/dist/components/{p-fhj4D67u.js → p-URsi9veR.js} +6 -5
- package/dist/components/p-URsi9veR.js.map +1 -0
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/{p-ff76afdd.entry.js → p-e642e56b.entry.js} +2 -2
- package/dist/csc-ui/p-e642e56b.entry.js.map +1 -0
- package/dist/esm/c-autocomplete_35.entry.js +4 -3
- package/dist/esm/c-autocomplete_35.entry.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/p-fhj4D67u.js.map +0 -1
- package/dist/csc-ui/p-ff76afdd.entry.js.map +0 -1
|
@@ -1021,7 +1021,7 @@ const CIconButton = class {
|
|
|
1021
1021
|
};
|
|
1022
1022
|
CIconButton.style = cIconButtonCss;
|
|
1023
1023
|
|
|
1024
|
-
const cInputCss = "html{box-sizing:border-box}body{margin:0}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-input){--_c-input-inactive-color:var(--c-tertiary-600);--_c-input-active-color:var(--c-primary-600);--_c-input-background-color:var(--c-transparent);--_c-input-text-color:var(--c-text-body);--_c-input-placeholder-color:var(--c-tertiary-400);--_c-input-shadow-active-color:var(--_c-input-active-color);--_c-input-shadow-background-color:var(--c-white);--_c-input-shadow-text-color:var(--_c-input-text-color);--_c-input-shadow-placeholder-color:var(--_c-input-placeholder-color);--_c-input-error-color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-input{--_c-input-border-width:1px;align-items:flex-start;border-radius:4px;display:flex;flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;letter-spacing:normal;max-width:100%;text-align:left}.c-input input,.c-input select,.c-input textarea{background:none;border:0;display:inline-block;font-family:var(--c-font-family);font-size:16px;line-height:1;margin:0;padding:0;vertical-align:middle;white-space:normal}.c-input input,.c-input textarea{box-sizing:content-box;background-color:transparent;border:none;color:var(--_c-input-text-color);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%}.c-input input[type=checkbox],.c-input input[type=radio],.c-input select{box-sizing:border-box}.c-input input[type=search]{appearance:textfield;box-sizing:content-box}.c-input ::-webkit-search-decoration{display:none}.c-input textarea{margin-top:4px;min-height:44px;overflow:auto;padding:8px 12px 8px 0;resize:vertical;vertical-align:top;white-space:pre-wrap}.c-input input{max-height:32px;padding:8px 0}.c-input input:focus,.c-input input:active,.c-input input[aria-expanded=true],.c-input textarea:focus,.c-input textarea:active{outline:none}.c-input .c-input__content{align-items:center;display:flex;width:100%}.c-input .c-input__content slot{display:none}.c-input .c-input__content c-icon-button{aspect-ratio:1;margin-right:-6px}.c-input__control{border-radius:inherit;color:currentColor;display:flex;flex-flow:column wrap;flex-grow:1;gap:8px;height:auto;min-width:0;width:100%;position:relative}.c-input__slot{align-items:stretch;background:transparent;border-radius:inherit;color:inherit;cursor:text;display:flex;min-height:44px;padding:0 12px;position:relative;transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:100%}.c-input__field{align-items:center;display:flex;flex:1 1 auto;gap:8px;position:relative}.c-input__field input,.c-input__field textarea{flex:1;outline:0}.c-input__field label{font-size:16px;height:20px;left:0;letter-spacing:normal;line-height:20px;max-width:90%;min-height:8px;overflow:hidden;pointer-events:none;position:absolute;right:auto;text-overflow:ellipsis;top:12px;white-space:nowrap}.c-input__field label:not(.label-on-top){transform-origin:top left;transform:translateX(var(--_c-input-label-position)) translateY(0) scale(1);transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1) 0.08s}.c-input__field label span{color:var(--c-error-600)}.c-input--label-on-top{
|
|
1024
|
+
const cInputCss = "html{box-sizing:border-box}body{margin:0}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-input){--_c-input-inactive-color:var(--c-tertiary-600);--_c-input-active-color:var(--c-primary-600);--_c-input-background-color:var(--c-transparent);--_c-input-text-color:var(--c-text-body);--_c-input-placeholder-color:var(--c-tertiary-400);--_c-input-shadow-active-color:var(--_c-input-active-color);--_c-input-shadow-background-color:var(--c-white);--_c-input-shadow-text-color:var(--_c-input-text-color);--_c-input-shadow-placeholder-color:var(--_c-input-placeholder-color);--_c-input-error-color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-input{--_c-input-border-width:1px;align-items:flex-start;border-radius:4px;display:flex;flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;letter-spacing:normal;max-width:100%;text-align:left}.c-input input,.c-input select,.c-input textarea{background:none;border:0;display:inline-block;font-family:var(--c-font-family);font-size:16px;line-height:1;margin:0;padding:0;vertical-align:middle;white-space:normal}.c-input input,.c-input textarea{box-sizing:content-box;background-color:transparent;border:none;color:var(--_c-input-text-color);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%}.c-input input[type=checkbox],.c-input input[type=radio],.c-input select{box-sizing:border-box}.c-input input[type=search]{appearance:textfield;box-sizing:content-box}.c-input ::-webkit-search-decoration{display:none}.c-input textarea{margin-top:4px;min-height:44px;overflow:auto;padding:8px 12px 8px 0;resize:vertical;vertical-align:top;white-space:pre-wrap}.c-input input{max-height:32px;padding:8px 0}.c-input input:focus,.c-input input:active,.c-input input[aria-expanded=true],.c-input textarea:focus,.c-input textarea:active{outline:none}.c-input .c-input__content{align-items:center;display:flex;width:100%}.c-input .c-input__content slot{display:none}.c-input .c-input__content c-icon-button{aspect-ratio:1;margin-right:-6px}.c-input__control{border-radius:inherit;color:currentColor;display:flex;flex-flow:column wrap;flex-grow:1;gap:8px;height:auto;min-width:0;width:100%;position:relative}.c-input__slot{align-items:stretch;background:transparent;border-radius:inherit;color:inherit;cursor:text;display:flex;min-height:44px;padding:0 12px;position:relative;transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:100%}.c-input__field{align-items:center;display:flex;flex:1 1 auto;gap:8px;position:relative}.c-input__field input,.c-input__field textarea{flex:1;outline:0}.c-input__field label{font-size:16px;height:20px;left:0;letter-spacing:normal;line-height:20px;max-width:90%;min-height:8px;overflow:hidden;pointer-events:none;position:absolute;right:auto;text-overflow:ellipsis;top:12px;white-space:nowrap}.c-input__field label:not(.label-on-top){transform-origin:top left;transform:translateX(var(--_c-input-label-position)) translateY(0) scale(1);transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1) 0.08s}.c-input__field label span{color:var(--c-error-600)}.c-input--label-on-top{display:grid;gap:4px}.c-input--label-on-top input::placeholder,.c-input--label-on-top textarea::placeholder{color:var(--_c-input-placeholder-color);opacity:1}.c-input--label-on-top label{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.c-input--label-on-top .c-input__field label{color:var(--_c-input-active-color);transform:translateY(-36px) translateX(-16px) scale(0.875)}.c-input--select input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-input--select .c-input__slot{cursor:pointer}.c-input fieldset{background-color:var(--_c-input-background-color);border-collapse:collapse;border-color:var(--_c-input-inactive-color);border-radius:inherit;border-style:solid;border-width:var(--_c-input-border-width);inset:0;margin:0;padding:0 0 0 8px;pointer-events:none;position:absolute;transition-duration:0.15s;transition-property:color;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1)}.c-input fieldset legend{float:none;line-height:11px;margin-left:-1px;padding:0;text-align:left;transition:width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:0}.c-input fieldset legend.active:not(.label-on-top){width:var(--_c-input-legend-width)}.c-input--shadow .c-input__slot{background-color:var(--_c-input-shadow-background-color);box-shadow:rgba(0, 0, 0, 0.15) 0 5px 15px 0}.c-input--shadow .c-input__slot input,.c-input--shadow .c-input__slot textarea{color:var(--_c-input-shadow-text-color)}.c-input--shadow .c-input__slot:focus-within{outline:2px var(--_c-input-active-color) solid}.c-input--shadow .c-input__slot:focus-within c-icon{--c-icon-color:var(--_c-input-shadow-active-color) !important}.c-input--shadow input::placeholder,.c-input--shadow textarea::placeholder{color:var(--_c-input-shadow-placeholder-color);opacity:1}.c-input--disabled input,.c-input--disabled textarea,.c-input--disabled fieldset,.c-input--disabled label{--_c-input-error-color:var(--c-tertiary-500);color:var(--c-tertiary-500)}.c-input--textarea .c-input__field{margin-right:-12px}.c-input ::placeholder{color:var(--_c-input-placeholder-color);opacity:1}.c-input:focus-within,.c-input--active,.c-input:not(.c-input--disabled):active{--_c-input-border-width:2px;color:var(--_c-input-active-color)}.c-input:focus-within fieldset,.c-input--active fieldset,.c-input:not(.c-input--disabled):active fieldset{border-color:var(--_c-input-active-color)}.c-input:focus-within label:not(.label-on-top),.c-input--active label:not(.label-on-top),.c-input:not(.c-input--disabled):active label:not(.label-on-top){color:var(--_c-input-active-color);transform:translateX(0) translateY(-18px) scale(0.75)}.c-input:focus-within legend:not(.label-on-top),.c-input--active legend:not(.label-on-top),.c-input:not(.c-input--disabled):active legend:not(.label-on-top){width:var(--_c-input-legend-width)}.c-input label:not(.label-on-top).filled{transform:translateX(0) translateY(-18px) scale(0.75)}.c-input.active:not(.filled) .c-input-menu__input{position:relative}.c-input.active:not(.filled) .c-input-menu__input::after{display:flex;align-items:center;position:absolute;inset:0;content:attr(data-placeholder);pointer-events:none;color:var(--_c-input-placeholder-color)}.c-input--error{color:var(--c-error-600)}.c-input--error fieldset{border-color:var(--c-error-600) !important}.c-input--error label{color:var(--c-error-600) !important}.c-input--error:focus-within{color:var(--c-error-600)}";
|
|
1025
1025
|
|
|
1026
1026
|
const CInput = class {
|
|
1027
1027
|
constructor(hostRef) {
|
|
@@ -1205,6 +1205,7 @@ const CInput = class {
|
|
|
1205
1205
|
return;
|
|
1206
1206
|
const classes = {
|
|
1207
1207
|
active: this.isActive,
|
|
1208
|
+
filled: !!this.value || typeof this.value === 'boolean',
|
|
1208
1209
|
'label-on-top': this.labelOnTop,
|
|
1209
1210
|
};
|
|
1210
1211
|
return (index.h("label", { htmlFor: this.inputId, ref: (el) => (this._labelRef = el), class: classes }, this.label, this.required && index.h("span", null, "\u00A0*")));
|
|
@@ -1235,9 +1236,9 @@ const CInput = class {
|
|
|
1235
1236
|
filled: !!this.value,
|
|
1236
1237
|
[`c-input--${this.variant}`]: true,
|
|
1237
1238
|
};
|
|
1238
|
-
return (index.h(index.Host, { key: '
|
|
1239
|
+
return (index.h(index.Host, { key: '2fdc7e237b1e2b0837e72510ddb8240b2ed15198', disabled: this.disabled }, index.h("div", { key: '3f1128cf26da49d0eab24e688d74d5a6e417d195', id: 'announce-' + this.inputId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), index.h("div", { key: 'bc79e784977c38b2cd8d80a649da95d10ffff11d', class: containerClasses }, this.labelOnTop && this._renderLabel(), index.h("div", { key: 'dd56297fba8a8e9d772f2ae49292b0a1fb195eff', class: "c-input__control" }, index.h("div", { key: '0a193e025daa0832c4cb36c107b25836a583a629', class: "c-input__slot", onClick: () => this._onFocus() }, this._renderBorders(), index.h("div", { key: '17c694469e8d6ee7a48d69d45ab05136bf46c2d2', class: "c-input__field", style: {
|
|
1239
1240
|
'--_c-input-label-position': this.preSlotWidth + 'px',
|
|
1240
|
-
} }, index.h("slot", { key: '
|
|
1241
|
+
} }, index.h("slot", { key: '91427605d55129e2f804fc2b8bf2e0ab747e151f', name: "pre" }), !this.labelOnTop && this._renderLabel(), index.h("slot", { key: '1ed436ada4e6dbe6e88805422ef61aaee09c30ba' }))), this.variant === 'select' && index.h("slot", { key: '232f92cbeb9ca7730efc488b393886058ce71148', name: "dropdown" }), !this.hideDetails && (index.h("c-message", { key: 'd66d4192a8636ddd90fc9ec2e3638e9e9b54d69a', hint: this.hint, inputId: this.inputId, valid: this.valid, validation: this.validation }))))));
|
|
1241
1242
|
}
|
|
1242
1243
|
get el() { return index.getElement(this); }
|
|
1243
1244
|
static get watchers() { return {
|