@fluid-topics/ftds-period-picker 2.2.7 → 2.2.9

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.
@@ -2471,6 +2471,11 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
2471
2471
  outline: ${T.focusOutlineWidth} solid ${T.focusFocusRingColor};
2472
2472
  }
2473
2473
 
2474
+
2475
+ .inside-structure .inside-structure--icon ftds-icon {
2476
+ --ftds-icon-font-size: var(--icon-size);
2477
+ }
2478
+
2474
2479
  .inside-structure .inside-structure--icon {
2475
2480
  position: absolute;
2476
2481
  top: calc((var(--field-height) - var(--icon-size)) / 2);
@@ -68,7 +68,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
68
68
  width:auto;
69
69
  height:auto;
70
70
  }
71
- `;var lc={};q(lc,{withAriaNotification:()=>v3});var b3={checkVisibility:!0},v3=Ae(Symbol("withAriaNotification"),function(t){class e extends t{sendAriaNotification(o,a){let{checkVisibility:i}={...b3,...a};setTimeout(()=>{(!i||this.checkVisibility())&&(o=typeof o=="string"?o:o?.message,o&&this.dispatchEvent(new Go({type:"aria",message:o})))},20)}}return e});var dc={};q(dc,{withConditionalVisibility:()=>x3});var p2=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i};function x3(t){class e extends t{constructor(){super(...arguments),this.forceVisible=!1,this.isVisible=!0,this.isElementWithConditionalVisibility=!0}calculateStyles(o,a){if(o){let i=document.createElement("style");i.classList.add("conditional-visibility-style"),i.innerHTML=a,this.shadowRoot.append(i)}}hideIfNecessary(){let o=!(this.forceVisible||this.isVisible);this.calculateStyles(o,":host { display: none !important; }")}highlightIfForceVisible(){this.calculateStyles(this.forceVisible,":host { box-shadow: 0px 0px 0px 8px rgba(227,119,59,0.4) inset; }")}willUpdate(o){super.willUpdate(o),this.updateComplete.then(()=>{this.shadowRoot.querySelectorAll(".conditional-visibility-style").forEach(a=>a.remove()),this.hideIfNecessary(),this.highlightIfForceVisible()})}}return p2([b({type:Boolean,attribute:!1})],e.prototype,"forceVisible",void 0),p2([W()],e.prototype,"isVisible",void 0),e}var fc={};q(fc,{FormController:()=>uc});function S3(t){let e={};for(let r of Object.keys(t))e[r]=t[r].initial;return e}var uc=class{constructor(e,r){this.host=e,this.config=r,this.errors=new Map,this.submitting=!1,e.addController(this),this.initial=S3(r),this.data={...this.initial}}hostDisconnected(){this.submitting=!1}get values(){return this.data}get fields(){return Object.keys(this.config)}get isSubmitting(){return this.submitting}get inError(){return this.errors.size>0}value(e){return this.data[e]}hasError(e){return this.errors.has(e)}errorFor(e){return this.errors.get(e)}setValue(e,r){if(this.data[e]===r)return;let o={...this.data};o[e]=r,this.data=o,this.checkValidity()}bind(e){return r=>this.setValue(e,r.detail)}setInitialValues(e){this.initial={...e},this.reset()}reset(){this.data={...this.initial},this.errors.clear(),this.submitting=!1,this.host.requestUpdate()}validateField(e,r){var o,a;let i=(a=(o=this.config[e]).validator)===null||a===void 0?void 0:a.call(o,this.value(e),this.data,r);i!==void 0&&this.errors.set(e,i)}checkValidity(e){return this.errors.clear(),this.fields.forEach(r=>{this.validateField(r,e)}),this.host.requestUpdate(),!this.inError}get firstFieldSelectorInError(){for(let e of this.fields){let r=this.config[e].selector;if(this.errors.has(e)&&r!==void 0)return r}}focusFirstFieldInError(){let e=this.firstFieldSelectorInError;if(e===void 0)return;let r=this.host.renderRoot.querySelector(e);r instanceof HTMLElement&&r.focus()}async submit(e){var r,o,a;if(!this.submitting){this.submitting=!0,this.host.requestUpdate();try{if(!this.checkValidity()){this.focusFirstFieldInError(),(r=e.onInvalid)===null||r===void 0||r.call(e);return}e.onSuccess(await e.request(this.data))}catch(i){let s=K1(i)?i:void 0;if(!this.checkValidity(s)){this.focusFirstFieldInError(),(o=e.onInvalid)===null||o===void 0||o.call(e);return}(a=e.onFailure)===null||a===void 0||a.call(e,s)}finally{this.submitting=!1,this.host.requestUpdate()}}}};var C3=/^https?:\/\//,E3=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function pc(t,e,r){return r?t.test(r)?!0:e:!0}var hc={required:function(t){return e=>!!e?.trim()||t},regex:function(t,e){return r=>pc(t,e,r)},email:function(t){return e=>pc(E3,t,e)},url:function(t){return e=>pc(C3,t,e)}};function mc(t,e){return e.map(r=>r(t)).filter(r=>r!==!0).map(r=>r)}function Ye(t,e,r){return t?e(t):r?.(t)}var Re=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Ar;(function(t){t.blur="blur",t.blurWithStatusResolutionOnInput="blurWithStatusResolutionOnInput",t.input="input"})(Ar||(Ar={}));var ve;(function(t){t.default="default",t.warning="warning",t.error="error"})(ve||(ve={}));var gc=class extends CustomEvent{constructor(e){super("input-validated",{detail:{level:e}})}},ho=Ae(Symbol("toFtInput"),function(t){class e extends t{constructor(){super(...arguments),this.warningRules=[],this.errorRules=[],this.validateOn=Ar.input,this.validateAtRender=!1,this.label="",this.hideLabel=!1,this.name="",this.disabled=!1,this.errorMessages=[],this.warningMessages=[],this.status=ve.default,this.focused=!1,this.additionalWarningRules=[],this.additionalErrorRules=[]}connectedCallback(){super.connectedCallback(),this.validateAtRender&&this.triggerValidation()}onBlur(){this.focused=!1,(this.validateOn===Ar.blur||this.validateOn===Ar.blurWithStatusResolutionOnInput)&&this.triggerValidation()}onFocus(){this.focused=!0}onInput(){(this.status!==ve.default&&this.validateOn===Ar.blurWithStatusResolutionOnInput||this.validateOn===Ar.input)&&this.triggerValidation()}triggerValidation(){this.errorMessages=mc(this.value,[...this.errorRules,...this.additionalErrorRules]),this.warningMessages=mc(this.value,[...this.warningRules,...this.additionalWarningRules]),this.status=this.resolveStatus(),this.dispatchEvent(new gc(this.status))}get messagesForScreenReaderElementId(){return"sr-helper-text-list"}renderMessagesForScreenReader(){return N`
71
+ `;var lc={};q(lc,{withAriaNotification:()=>v3});var b3={checkVisibility:!0},v3=Ae(Symbol("withAriaNotification"),function(t){class e extends t{sendAriaNotification(o,a){let{checkVisibility:i}={...b3,...a};setTimeout(()=>{(!i||this.checkVisibility())&&(o=typeof o=="string"?o:o?.message,o&&this.dispatchEvent(new Go({type:"aria",message:o})))},20)}}return e});var dc={};q(dc,{withConditionalVisibility:()=>x3});var p2=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i};function x3(t){class e extends t{constructor(){super(...arguments),this.forceVisible=!1,this.isVisible=!0,this.isElementWithConditionalVisibility=!0}calculateStyles(o,a){if(o){let i=document.createElement("style");i.classList.add("conditional-visibility-style"),i.innerHTML=a,this.shadowRoot.append(i)}}hideIfNecessary(){let o=!(this.forceVisible||this.isVisible);this.calculateStyles(o,":host { display: none !important; }")}highlightIfForceVisible(){this.calculateStyles(this.forceVisible,":host { box-shadow: 0px 0px 0px 8px rgba(227,119,59,0.4) inset; }")}willUpdate(o){super.willUpdate(o),this.updateComplete.then(()=>{this.shadowRoot.querySelectorAll(".conditional-visibility-style").forEach(a=>a.remove()),this.hideIfNecessary(),this.highlightIfForceVisible()})}}return p2([b({type:Boolean,attribute:!1})],e.prototype,"forceVisible",void 0),p2([W()],e.prototype,"isVisible",void 0),e}var fc={};q(fc,{FormController:()=>uc});function S3(t){let e={};for(let r of Object.keys(t))e[r]=t[r].initial;return e}var uc=class{constructor(e,r){this.host=e,this.config=r,this.errors=new Map,this.submitting=!1,e.addController(this),this.initial=S3(r),this.data={...this.initial}}hostDisconnected(){this.submitting=!1}get values(){return this.data}get fields(){return Object.keys(this.config)}get isSubmitting(){return this.submitting}get inError(){return this.errors.size>0}value(e){return this.data[e]}hasError(e){return this.errors.has(e)}errorFor(e){return this.errors.get(e)}setValue(e,r){if(this.data[e]===r)return;let o={...this.data};o[e]=r,this.data=o,this.checkValidity()}bind(e){return r=>this.setValue(e,r.detail)}setInitialValues(e){this.initial={...e},this.reset()}reset(){this.data={...this.initial},this.errors.clear(),this.submitting=!1,this.host.requestUpdate()}validateField(e,r){var o,a;let i=(a=(o=this.config[e]).validator)===null||a===void 0?void 0:a.call(o,this.value(e),this.data,r);i!==void 0&&this.errors.set(e,i)}checkValidity(e){return this.errors.clear(),this.fields.forEach(r=>{this.validateField(r,e)}),this.host.requestUpdate(),!this.inError}get firstFieldSelectorInError(){for(let e of this.fields){let r=this.config[e].selector;if(this.errors.has(e)&&r!==void 0)return r}}focusFirstFieldInError(){let e=this.firstFieldSelectorInError;if(e===void 0)return;let r=this.host.renderRoot.querySelector(e);r instanceof HTMLElement&&r.focus()}async submit(e){var r,o,a;if(!this.submitting){this.submitting=!0,this.host.requestUpdate();try{if(!this.checkValidity()){this.focusFirstFieldInError(),(r=e.onInvalid)===null||r===void 0||r.call(e);return}e.onSuccess(await e.request(this.data))}catch(i){let s=K1(i)?i:void 0;if(!this.checkValidity(s)){this.focusFirstFieldInError(),(o=e.onInvalid)===null||o===void 0||o.call(e);return}(a=e.onFailure)===null||a===void 0||a.call(e,s)}finally{this.submitting=!1,this.host.requestUpdate()}}}};var C3=/^https?:\/\//,E3=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function pc(t,e,r){return r?t.test(r)?!0:e:!0}var hc={required:function(t){return e=>!!e?.trim()||t},regex:function(t,e){return r=>pc(t,e,r)},email:function(t){return e=>pc(E3,t,e)},url:function(t){return e=>pc(C3,t,e)},min:function(t,e,r=!1){return o=>o===void 0||(r?o>e:o>=e)?!0:t},max:function(t,e,r=!1){return o=>o===void 0||(r?o<e:o<=e)?!0:t}};function mc(t,e){return e.map(r=>r(t)).filter(r=>r!==!0).map(r=>r)}function Ye(t,e,r){return t?e(t):r?.(t)}var Re=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Ar;(function(t){t.blur="blur",t.blurWithStatusResolutionOnInput="blurWithStatusResolutionOnInput",t.input="input"})(Ar||(Ar={}));var ve;(function(t){t.default="default",t.warning="warning",t.error="error"})(ve||(ve={}));var gc=class extends CustomEvent{constructor(e){super("input-validated",{detail:{level:e}})}},ho=Ae(Symbol("toFtInput"),function(t){class e extends t{constructor(){super(...arguments),this.warningRules=[],this.errorRules=[],this.validateOn=Ar.input,this.validateAtRender=!1,this.label="",this.hideLabel=!1,this.name="",this.disabled=!1,this.errorMessages=[],this.warningMessages=[],this.status=ve.default,this.focused=!1,this.additionalWarningRules=[],this.additionalErrorRules=[]}connectedCallback(){super.connectedCallback(),this.validateAtRender&&this.triggerValidation()}onBlur(){this.focused=!1,(this.validateOn===Ar.blur||this.validateOn===Ar.blurWithStatusResolutionOnInput)&&this.triggerValidation()}onFocus(){this.focused=!0}onInput(){(this.status!==ve.default&&this.validateOn===Ar.blurWithStatusResolutionOnInput||this.validateOn===Ar.input)&&this.triggerValidation()}triggerValidation(){this.errorMessages=mc(this.value,[...this.errorRules,...this.additionalErrorRules]),this.warningMessages=mc(this.value,[...this.warningRules,...this.additionalWarningRules]),this.status=this.resolveStatus(),this.dispatchEvent(new gc(this.status))}get messagesForScreenReaderElementId(){return"sr-helper-text-list"}renderMessagesForScreenReader(){return N`
72
72
  <ul aria-live="polite" id="${this.messagesForScreenReaderElementId}"
73
73
  style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;list-style:none;">
74
74
  ${zt(this.errorMessages,o=>N`
@@ -2551,6 +2551,11 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
2551
2551
  outline: ${B.focusOutlineWidth} solid ${B.focusFocusRingColor};
2552
2552
  }
2553
2553
 
2554
+
2555
+ .inside-structure .inside-structure--icon ftds-icon {
2556
+ --ftds-icon-font-size: var(--icon-size);
2557
+ }
2558
+
2554
2559
  .inside-structure .inside-structure--icon {
2555
2560
  position: absolute;
2556
2561
  top: calc((var(--field-height) - var(--icon-size)) / 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ftds-period-picker",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "The design system period picker component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,18 +19,18 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-i18n": "2.2.7",
23
- "@fluid-topics/ft-wc-utils": "2.2.7",
24
- "@fluid-topics/ftds-base-input": "2.2.7",
25
- "@fluid-topics/ftds-button": "2.2.7",
26
- "@fluid-topics/ftds-floating-menu": "2.2.7",
27
- "@fluid-topics/ftds-icon": "2.2.7",
28
- "@fluid-topics/ftds-radio": "2.2.7",
29
- "@fluid-topics/ftds-text-input": "2.2.7",
22
+ "@fluid-topics/ft-i18n": "2.2.9",
23
+ "@fluid-topics/ft-wc-utils": "2.2.9",
24
+ "@fluid-topics/ftds-base-input": "2.2.9",
25
+ "@fluid-topics/ftds-button": "2.2.9",
26
+ "@fluid-topics/ftds-floating-menu": "2.2.9",
27
+ "@fluid-topics/ftds-icon": "2.2.9",
28
+ "@fluid-topics/ftds-radio": "2.2.9",
29
+ "@fluid-topics/ftds-text-input": "2.2.9",
30
30
  "lit": "3.3.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@fluid-topics/ft-wc-test-utils": "2.2.7"
33
+ "@fluid-topics/ft-wc-test-utils": "2.2.9"
34
34
  },
35
- "gitHead": "dff67505fe1e41bc42e0bdfafc7060ca40f8dc9d"
35
+ "gitHead": "e12bf480f5ee00623f87caff8c918fccae85585c"
36
36
  }