@ecopages/radiant-ui 0.2.5 → 0.3.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/README.md +2 -0
- package/dist/components/ui/alert/alert.d.ts +1 -3
- package/dist/components/ui/alert/alert.script.d.ts +7 -0
- package/dist/components/ui/alert/index.js +1 -1
- package/dist/components/ui/alert/index.js.map +3 -3
- package/dist/components/ui/autocomplete/autocomplete.d.ts +1 -2
- package/dist/components/ui/autocomplete/autocomplete.script.d.ts +7 -0
- package/dist/components/ui/autocomplete/index.js +1 -1
- package/dist/components/ui/autocomplete/index.js.map +3 -3
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts +1 -2
- package/dist/components/ui/breadcrumb/breadcrumb.script.d.ts +7 -0
- package/dist/components/ui/breadcrumb/index.js +1 -1
- package/dist/components/ui/breadcrumb/index.js.map +3 -3
- package/dist/components/ui/calendar/calendar.script.d.ts +8 -0
- package/dist/components/ui/calendar/index.d.ts +1 -2
- package/dist/components/ui/calendar/index.js +1 -1
- package/dist/components/ui/calendar/index.js.map +4 -4
- package/dist/components/ui/carousel/carousel.d.ts +1 -2
- package/dist/components/ui/carousel/carousel.script.d.ts +7 -0
- package/dist/components/ui/carousel/index.js +1 -1
- package/dist/components/ui/carousel/index.js.map +3 -3
- package/dist/components/ui/checkbox/checkbox.d.ts +1 -2
- package/dist/components/ui/checkbox/checkbox.script.d.ts +7 -0
- package/dist/components/ui/checkbox/index.js +1 -1
- package/dist/components/ui/checkbox/index.js.map +3 -3
- package/dist/components/ui/checkbox-group/checkbox-group.d.ts +1 -2
- package/dist/components/ui/checkbox-group/checkbox-group.script.d.ts +7 -0
- package/dist/components/ui/checkbox-group/index.js +1 -1
- package/dist/components/ui/checkbox-group/index.js.map +3 -3
- package/dist/components/ui/combobox/combobox.d.ts +1 -2
- package/dist/components/ui/combobox/combobox.script.d.ts +7 -0
- package/dist/components/ui/combobox/index.js +1 -1
- package/dist/components/ui/combobox/index.js.map +3 -3
- package/dist/components/ui/cycle-toggle/cycle-toggle.d.ts +1 -2
- package/dist/components/ui/cycle-toggle/cycle-toggle.script.d.ts +7 -0
- package/dist/components/ui/cycle-toggle/index.js +1 -1
- package/dist/components/ui/cycle-toggle/index.js.map +3 -3
- package/dist/components/ui/date-field/date-field.d.ts +1 -3
- package/dist/components/ui/date-field/date-field.script.d.ts +7 -0
- package/dist/components/ui/date-field/index.js +1 -1
- package/dist/components/ui/date-field/index.js.map +4 -4
- package/dist/components/ui/date-input/date-input.d.ts +1 -2
- package/dist/components/ui/date-input/date-input.script.d.ts +8 -0
- package/dist/components/ui/date-input/index.js +1 -1
- package/dist/components/ui/date-input/index.js.map +3 -3
- package/dist/components/ui/date-range-picker/date-range-picker.d.ts +1 -3
- package/dist/components/ui/date-range-picker/date-range-picker.script.d.ts +7 -0
- package/dist/components/ui/date-range-picker/index.js +1 -1
- package/dist/components/ui/date-range-picker/index.js.map +4 -4
- package/dist/components/ui/dialog/dialog-registry.d.ts +0 -1
- package/dist/components/ui/dialog/dialog.d.ts +1 -2
- package/dist/components/ui/dialog/dialog.script.d.ts +7 -0
- package/dist/components/ui/dialog/index.js +1 -1
- package/dist/components/ui/dialog/index.js.map +3 -3
- package/dist/components/ui/disclosure/disclosure-group.script.d.ts +7 -0
- package/dist/components/ui/disclosure/disclosure.d.ts +2 -4
- package/dist/components/ui/disclosure/disclosure.script.d.ts +7 -0
- package/dist/components/ui/disclosure/index.js +1 -1
- package/dist/components/ui/disclosure/index.js.map +3 -3
- package/dist/components/ui/field/field.d.ts +1 -2
- package/dist/components/ui/field/field.script.d.ts +7 -0
- package/dist/components/ui/field/index.js +1 -1
- package/dist/components/ui/field/index.js.map +3 -3
- package/dist/components/ui/form/form.d.ts +1 -2
- package/dist/components/ui/form/form.script.d.ts +7 -0
- package/dist/components/ui/form/index.js +1 -1
- package/dist/components/ui/form/index.js.map +3 -3
- package/dist/components/ui/grid/grid.d.ts +1 -2
- package/dist/components/ui/grid/grid.script.d.ts +7 -0
- package/dist/components/ui/grid/index.js +1 -1
- package/dist/components/ui/grid/index.js.map +3 -3
- package/dist/components/ui/hover-card/hover-card.d.ts +1 -2
- package/dist/components/ui/hover-card/hover-card.script.d.ts +7 -0
- package/dist/components/ui/hover-card/index.js +1 -1
- package/dist/components/ui/hover-card/index.js.map +3 -3
- package/dist/components/ui/knob/index.js +1 -1
- package/dist/components/ui/knob/index.js.map +3 -3
- package/dist/components/ui/knob/knob.d.ts +1 -2
- package/dist/components/ui/knob/knob.script.d.ts +7 -0
- package/dist/components/ui/listbox/index.js +1 -1
- package/dist/components/ui/listbox/index.js.map +3 -3
- package/dist/components/ui/listbox/listbox.d.ts +1 -2
- package/dist/components/ui/listbox/listbox.script.d.ts +7 -0
- package/dist/components/ui/menu-button/index.js +1 -1
- package/dist/components/ui/menu-button/index.js.map +3 -3
- package/dist/components/ui/menu-button/menu-button.d.ts +1 -2
- package/dist/components/ui/menu-button/menu-button.script.d.ts +7 -0
- package/dist/components/ui/menubar/index.js +1 -1
- package/dist/components/ui/menubar/index.js.map +3 -3
- package/dist/components/ui/menubar/menubar.d.ts +1 -2
- package/dist/components/ui/menubar/menubar.script.d.ts +7 -0
- package/dist/components/ui/meter/index.d.ts +1 -2
- package/dist/components/ui/meter/index.js +1 -1
- package/dist/components/ui/meter/index.js.map +4 -4
- package/dist/components/ui/meter/meter.script.d.ts +8 -0
- package/dist/components/ui/navigation-menu/index.js +1 -1
- package/dist/components/ui/navigation-menu/index.js.map +3 -3
- package/dist/components/ui/navigation-menu/navigation-menu.css +2 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts +1 -2
- package/dist/components/ui/navigation-menu/navigation-menu.script.d.ts +7 -0
- package/dist/components/ui/number-field/index.js +1 -1
- package/dist/components/ui/number-field/index.js.map +3 -3
- package/dist/components/ui/number-field/number-field.d.ts +1 -2
- package/dist/components/ui/number-field/number-field.script.d.ts +7 -0
- package/dist/components/ui/pagination/index.js +1 -1
- package/dist/components/ui/pagination/index.js.map +3 -3
- package/dist/components/ui/pagination/pagination.d.ts +1 -2
- package/dist/components/ui/pagination/pagination.script.d.ts +7 -0
- package/dist/components/ui/popover/index.js +1 -1
- package/dist/components/ui/popover/index.js.map +3 -3
- package/dist/components/ui/popover/popover.d.ts +1 -2
- package/dist/components/ui/popover/popover.script.d.ts +9 -0
- package/dist/components/ui/radio-group/index.js +1 -1
- package/dist/components/ui/radio-group/index.js.map +3 -3
- package/dist/components/ui/radio-group/radio-group.d.ts +1 -2
- package/dist/components/ui/radio-group/radio-group.script.d.ts +7 -0
- package/dist/components/ui/select/index.js +1 -1
- package/dist/components/ui/select/index.js.map +3 -3
- package/dist/components/ui/select/select.d.ts +1 -2
- package/dist/components/ui/select/select.script.d.ts +7 -0
- package/dist/components/ui/sidebar/index.js +1 -1
- package/dist/components/ui/sidebar/index.js.map +3 -3
- package/dist/components/ui/sidebar/sidebar-trigger.d.ts +1 -2
- package/dist/components/ui/sidebar/sidebar-trigger.script.d.ts +7 -0
- package/dist/components/ui/sidebar/sidebar.d.ts +1 -3
- package/dist/components/ui/sidebar/sidebar.script.d.ts +7 -0
- package/dist/components/ui/slider/index.js +1 -1
- package/dist/components/ui/slider/index.js.map +3 -3
- package/dist/components/ui/slider/slider.d.ts +1 -2
- package/dist/components/ui/slider/slider.script.d.ts +7 -0
- package/dist/components/ui/switch/index.js +1 -1
- package/dist/components/ui/switch/index.js.map +3 -3
- package/dist/components/ui/switch/switch.d.ts +1 -2
- package/dist/components/ui/switch/switch.script.d.ts +7 -0
- package/dist/components/ui/table/index.js +1 -1
- package/dist/components/ui/table/index.js.map +3 -3
- package/dist/components/ui/table/table.d.ts +1 -2
- package/dist/components/ui/table/table.script.d.ts +7 -0
- package/dist/components/ui/tabs/index.d.ts +2 -2
- package/dist/components/ui/tabs/index.js +1 -1
- package/dist/components/ui/tabs/index.js.map +3 -3
- package/dist/components/ui/tabs/tabs.d.ts +1 -4
- package/dist/components/ui/tabs/tabs.script.d.ts +7 -0
- package/dist/components/ui/tag-group/index.js +1 -1
- package/dist/components/ui/tag-group/index.js.map +3 -3
- package/dist/components/ui/tag-group/tag-group.d.ts +1 -2
- package/dist/components/ui/tag-group/tag-group.script.d.ts +7 -0
- package/dist/components/ui/toast/index.d.ts +2 -2
- package/dist/components/ui/toast/index.js +1 -1
- package/dist/components/ui/toast/index.js.map +3 -3
- package/dist/components/ui/toast/toast.d.ts +2 -9
- package/dist/components/ui/toast/toast.script.d.ts +8 -0
- package/dist/components/ui/toast/toaster.script.d.ts +8 -1
- package/dist/components/ui/toc/index.d.ts +6 -2
- package/dist/components/ui/toc/index.js +1 -1
- package/dist/components/ui/toc/index.js.map +4 -4
- package/dist/components/ui/toc/toc.script.d.ts +8 -0
- package/dist/components/ui/toolbar/index.js +1 -1
- package/dist/components/ui/toolbar/index.js.map +3 -3
- package/dist/components/ui/toolbar/toolbar.d.ts +1 -2
- package/dist/components/ui/toolbar/toolbar.script.d.ts +7 -0
- package/dist/components/ui/tooltip/index.js +1 -1
- package/dist/components/ui/tooltip/index.js.map +3 -3
- package/dist/components/ui/tooltip/tooltip.d.ts +1 -2
- package/dist/components/ui/tooltip/tooltip.script.d.ts +7 -0
- package/dist/components/ui/tree/index.js +1 -1
- package/dist/components/ui/tree/index.js.map +3 -3
- package/dist/components/ui/tree/tree.d.ts +1 -2
- package/dist/components/ui/tree/tree.script.d.ts +7 -0
- package/dist/components/ui/treegrid/index.js +1 -1
- package/dist/components/ui/treegrid/index.js.map +3 -3
- package/dist/components/ui/treegrid/treegrid.d.ts +1 -2
- package/dist/components/ui/treegrid/treegrid.script.d.ts +7 -0
- package/dist/components/ui/window-splitter/index.js +1 -1
- package/dist/components/ui/window-splitter/index.js.map +3 -3
- package/dist/components/ui/window-splitter/window-splitter.d.ts +1 -2
- package/dist/components/ui/window-splitter/window-splitter.script.d.ts +7 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/styles/radiant-ui-core.css +3 -0
- package/dist/styles/radiant-ui.css +3 -0
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tailwind.css +3 -0
- package/package.json +11 -11
- package/dist/components/ui/calendar/calendar.d.ts +0 -6
- package/dist/components/ui/meter/meter.d.ts +0 -10
- package/dist/components/ui/toc/toc.d.ts +0 -7
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { JsxCustomElementAttributes } from '@ecopages/jsx';
|
|
2
|
-
import
|
|
3
|
-
import './date-input.script';
|
|
2
|
+
import { RuiDateInput as RuiDateInputElement, type RuiDateInputProps } from './date-input.script';
|
|
4
3
|
import type { WithoutChildren } from '../../../lib/without-children';
|
|
5
4
|
/**
|
|
6
5
|
* Segment date editor. Stamps `data-rui-control` so `RuiField` can discover the host.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { WithoutChildren } from '../../../lib/without-children';
|
|
2
|
+
import type { JSX_PROPS } from '@ecopages/jsx';
|
|
1
3
|
import { FormAssociatedElement, type FormValue } from '@ecopages/radiant/form-associated-element';
|
|
2
4
|
import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter';
|
|
3
5
|
import { type DatePartType, type DateSegmentModel } from '../../../lib/intl-date';
|
|
@@ -56,6 +58,7 @@ export type RuiDateInputChangeDetail = {
|
|
|
56
58
|
* focus and the caret to `focusedPart` while focus is still inside the control.
|
|
57
59
|
*/
|
|
58
60
|
export declare class RuiDateInput extends FormAssociatedElement {
|
|
61
|
+
readonly [JSX_PROPS]?: WithoutChildren<RuiDateInputProps>;
|
|
59
62
|
value: string;
|
|
60
63
|
min: string;
|
|
61
64
|
max: string;
|
|
@@ -135,3 +138,8 @@ export declare class RuiDateInput extends FormAssociatedElement {
|
|
|
135
138
|
private renderSegment;
|
|
136
139
|
render(): import("@ecopages/jsx").JsxRenderable;
|
|
137
140
|
}
|
|
141
|
+
declare global {
|
|
142
|
+
interface HTMLElementTagNameMap {
|
|
143
|
+
'rui-date-input': RuiDateInput;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as Y}from"@ecopages/jsx/jsx-runtime";import{customElement as wt,event as Pt,onEvent as V,onUpdated as at,prop as k,registerSsrPreparationCallback as It,state as it}from"@ecopages/radiant";import{FormAssociatedElement as ot}from"@ecopages/radiant/form-associated-element";function j(t){if(t==null)return null;let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t.trim());if(!e)return null;let r=Number(e[1]),n=Number(e[2])-1,a=Number(e[3]),i=new Date(r,n,a);return i.getFullYear()!==r||i.getMonth()!==n||i.getDate()!==a?null:i}function X(t){let e=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${e}-${r}-${n}`}function H(t,e,r){return!(e&&t<e||r&&t>r)}var _e=new Map;function lt(t,e){return`${JSON.stringify(t??null)}|${JSON.stringify(e)}`}function C(t,e){let r=lt(t,e),n=_e.get(r);if(n)return n;let a=new Intl.DateTimeFormat(t,e);return _e.set(r,a),a}var ct=new Date(2e3,0,1);function ft(t,e){return t==="year"?e==="year":t==="month"?e==="year"||e==="month":!0}function dt(t,e){let n=C(e,{[t]:t==="year"?"numeric":"2-digit"}).formatToParts(ct).find(a=>a.type===t);return n?n.value.replace(/\d/g,t==="year"?"y":t==="month"?"m":"d"):t==="year"?"yyyy":"mm"}function mt(t,e,r){let n=t==="year"?{year:"numeric"}:{[t]:"2-digit"};return C(r,n).formatToParts(e).find(a=>a.type===t)?.value??""}function z(t,e,r={}){let n=r.granularity??"day",a=t??r.placeholderDate??new Date;return C(e,{year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(a).filter(u=>u.type!=="era").map(u=>{if(u.type==="literal")return{type:"literal",value:u.value,placeholder:u.value,isPlaceholder:!1,editable:!1};let o=u.type;if(!ft(n,o))return null;let f=t!=null;return{type:o,value:f?mt(o,t,e):"",placeholder:dt(o,e),isPlaceholder:!f,editable:!0}}).filter(u=>u!=null)}function pt(t){if(t.isPlaceholder||t.value==="")return null;let e=Number(t.value);return Number.isFinite(e)?e:null}function gt(t){return t>=100?t:t>=69?1900+t:2e3+t}function we(t){let e={};for(let n of t){if(!n.editable)continue;let a=pt(n);if(a==null)return null;e[n.type]=n.type==="year"?gt(a):a}if(e.year==null||e.month==null||e.day==null)return null;let r=new Date(e.year,e.month-1,e.day);return r.getFullYear()!==e.year||r.getMonth()!==e.month-1||r.getDate()!==e.day?null:r}function Pe(t){return t.every(e=>!e.editable||e.isPlaceholder||e.value==="")}function ee(t,e={}){let r=t.find(i=>i.editable&&i.type==="year");if(r&&!r.isPlaceholder&&r.value!==""&&r.value.replace(/\D/g,"").length<4)return{kind:"partial-year"};if(Pe(t))return{kind:"empty"};let n=we(t);if(!n)return{kind:"incomplete"};let a=X(n);return H(a,e.min,e.max)?{kind:"date",iso:a}:{kind:"out-of-range"}}function te(t){return t==="year"?4:2}function ht(t,e){return t.findIndex(r=>r.editable&&r.type===e)}function yt(t){return t.map(e=>({...e}))}function ne(t,e,r){let n=yt(t),a=ht(n,e);return a<0||(n[a]={...n[a],...r}),n}function re(t){if(t==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}function K(t,e){return{min:1,max:Fe(t,e)}}function Fe(t,e){if(t==="month")return 12;if(t==="day"){let r=Ie(e,"year"),n=Ie(e,"month");return r!=null&&n!=null?new Date(r,n,0).getDate():31}return 9999}function Ie(t,e){let r=t.find(n=>n.editable&&n.type===e);return!r||r.isPlaceholder||r.value===""?null:Number(r.value)}function Te(t,e){return t==="year"?String(e).padStart(4,"0"):String(e).padStart(2,"0")}function ae(t,e){try{let n=new Intl.DisplayNames(e,{type:"dateTimeField"}).of(t);if(n)return n}catch{}return t==="month"?"Month":t==="day"?"Day":"Year"}function L(t){return t.isPlaceholder||t.value===""?t.placeholder:t.value}function U(t){return t.isPlaceholder||t.value===""?null:re(t.value.replace(/\D/g,""))}function Ve(t,e){return ne(t,e,{value:"",isPlaceholder:!0})}function ke(t,e,r){return ne(t,e,{value:Te(e,r),isPlaceholder:!1})}function ie(t,e,r){let n=t.find(f=>f.editable&&f.type===e);if(!n)return t;let{min:a,max:i}=K(e,t),o=(U(n)??(r>0?a-1:i+1))+r;return e==="month"||e==="day"?o<a?o=i:o>i&&(o=a):o=Math.max(a,o),ke(t,e,o)}function oe(t,e,r,n){let a=r.replace(/\D/g,"");if(!a)return{segments:t,enteredKeys:n,focusNext:!1};let i=n+a,u=re(i);if(u==null)return{segments:t,enteredKeys:n,focusNext:!1};let o=Fe(e,t),f=u;f>o&&(f=re(a)??f);let P=te(e),v=+`${f}0`>o||i.length>=P||String(f).length>=P,E=v?Te(e,f):String(f);return{segments:ne(t,e,{value:E,isPlaceholder:!1}),enteredKeys:v?"":i,focusNext:v}}function Ee(t){return t.filter(e=>e.editable).map(e=>e.type)}function T(t,e,r){let n=Ee(t),a=n.indexOf(e);if(a<0)return n[0]??null;let i=a+r;return i<0||i>=n.length?null:n[i]??null}function se(t){let e=null;for(let r of t){if(!r.editable)continue;let n=r.type;if(e||(e=n),r.isPlaceholder||r.value==="")return n}return e}function ue(t,e){let r=t.find(i=>i.editable&&i.type===e);if(!r)return{kind:"focus-previous"};if(r.isPlaceholder||r.value==="")return{kind:"focus-previous"};let n=r.value.replace(/\D/g,"");if(n.length<=1)return{kind:"updated",segments:Ve(t,e),enteredKeys:""};let a=n.slice(0,-1);return{kind:"updated",segments:t.map(i=>i.editable&&i.type===e?{...i,value:a,isPlaceholder:!1}:i),enteredKeys:a}}function Re(t){if(!t)return;let e=t.split(",").map(r=>r.trim()).filter(Boolean);return e.length>1?e:e[0]}var bt=/^[A-Za-z][A-Za-z0-9_-]*$/;function Ae(t){return bt.test(t)}function St(t){let e=t.trim();if(Ae(e))return e;let r=`rui-${e}`;return e&&Ae(r)?r:"rui"}function Le(t){let e=typeof crypto.randomUUID=="function"?crypto.randomUUID().replace(/-/g,""):Array.from(crypto.getRandomValues(new Uint8Array(16)),r=>r.toString(16).padStart(2,"0")).join("");return`${St(t)}-${e}`}function Oe(...t){return t.filter(Boolean).join(" ")}function Ne(t,e){let r=t.type,n=U(t),a=!e.useTextboxRole,i=a?"spinbutton":"textbox",u=!e.disabled&&!e.readOnly,o=K(r,e.segments);return{ariaLabel:ae(r,e.locale),ariaReadonly:e.readOnly||void 0,ariaRole:i,ariaValuemax:a?o.max:void 0,ariaValuemin:a?o.min:void 0,ariaValuenow:a&&n!=null?n:void 0,ariaValuetext:a?L(t):void 0,className:Oe("rui-date-input__segment",t.isPlaceholder&&"rui-date-input__segment--placeholder"),dataRuiFocusManaged:!0,contenteditable:u?"true":void 0,inputmode:u?"numeric":void 0,suppresscontenteditablewarning:u?"true":void 0,tabindex:e.disabled?void 0:0}}var Me,Be,$e,je,Ce,ze,Ke,Ue,Ye,qe,Ge,We,Je,Ze,Qe,Xe,He,et,tt,rt;function xt(t,e,r,n,a,i){var u,o,f,P,v,E,I,le=Symbol.metadata||Symbol.for("Symbol.metadata"),ce=Object.defineProperty,q=Object.create,fe=[q(null),q(null)],de=e.length;function O(s,y,g){return function(l,c){y&&(c=l,l=t);for(var b=0;b<s.length;b++)c=s[b].apply(l,g?[c]:[]);return g?c:l}}function D(s,y,g,l){if(typeof s!="function"&&(l||s!==void 0))throw new TypeError(y+" must "+(g||"be")+" a function"+(l?"":" or undefined"));return s}function me(s,y,g,l,c,b,w,h,S,x,ge){function G(m){if(!ge(m))throw new TypeError("Attempted to access private element on non-instance")}var W=[].concat(y[0]),he=y[3],J=!w,R=c===1,ye=c===3,be=c===4,N=c===2;function M(m,F,ve){return function($,De){return F&&(De=$,$=s),ve&&ve($),d[m].call($,De)}}if(!J){var d={},Z=[],_=ye?"get":be||R?"set":"value";if(S?(x||R?d={get:nt(function(){return he(this)},l,"get"),set:function(m){y[4](this,m)}}:d[_]=he,x||nt(d[_],l,N?"":_)):x||(d=Object.getOwnPropertyDescriptor(s,l)),!x&&!S){if((o=fe[+h][l])&&(o^c)!==7)throw Error("Decorating two elements with the same name ("+d[_].name+") is not supported yet");fe[+h][l]=c<3?1:c}}for(var p=s,B=W.length-1;B>=0;B-=g?2:1){var Se=D(W[B],"A decorator","be",!0),xe=g?W[B-1]:void 0,Q={},A={kind:["field","accessor","method","getter","setter","class"][c],name:l,metadata:u,addInitializer:function(m,F){if(m.v)throw new TypeError("attempted to call addInitializer after decoration was finished");D(F,"An initializer","be",!0),b.push(F)}.bind(null,Q)};if(J)o=Se.call(xe,p,A),Q.v=1,D(o,"class decorators","return")&&(p=o);else if(A.static=h,A.private=S,o=A.access={has:S?ge.bind():function(m){return l in m}},be||(o.get=S?N?function(m){return G(m),d.value}:M("get",0,G):function(m){return m[l]}),N||ye||(o.set=S?M("set",0,G):function(m,F){m[l]=F}),p=Se.call(xe,R?{get:d.get,set:d.set}:d[_],A),Q.v=1,R){if(typeof p=="object"&&p)(o=D(p.get,"accessor.get"))&&(d.get=o),(o=D(p.set,"accessor.set"))&&(d.set=o),(o=D(p.init,"accessor.init"))&&Z.unshift(o);else if(p!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else D(p,(x?"field":"method")+" decorators","return")&&(x?Z.unshift(p):d[_]=p)}return c<2&&w.push(O(Z,h,1),O(b,h,0)),x||J||(S?R?w.splice(-1,0,M("get",h),M("set",h)):w.push(N?d[_]:D.call.bind(d[_])):ce(s,l,d)),p}function pe(s){return ce(s,le,{configurable:!0,enumerable:!0,value:u})}return i!==void 0&&(u=i[le]),u=q(u??null),v=[],E=function(s){s&&v.push(O(s))},I=function(s,y){for(var g=0;g<r.length;g++){var l=r[g],c=l[1],b=7&c;if((8&c)==s&&!b==y){var w=l[2],h=!!l[3],S=16&c;me(s?t:t.prototype,l,S,h?"#"+w:vt(w),b,b<2?[]:s?P=P||[]:f=f||[],v,!!s,h,y,s&&h?function(x){return _t(x)===t}:a)}}},I(8,0),I(0,0),I(8,1),I(0,1),E(f),E(P),o=v,de||pe(t),{e:o,get c(){var s=[];return de&&[pe(t=me(t,[e],n,t.name,5,s)),O(s,1)]}}}function vt(t){var e=Dt(t,"string");return typeof e=="symbol"?e:e+""}function Dt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nt(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function _t(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}function Ft(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)}var ut,st=class extends ot{static{({e:[$e,je,Ce,ze,Ke,Ue,Ye,qe,Ge,We,Je,Ze,Qe,Xe,He,et,tt,rt,Me],c:[ut,Be]}=xt(this,[wt("rui-date-input")],[[k({type:String,reflect:!0,defaultValue:""}),0,"value"],[k({type:String,defaultValue:""}),0,"min"],[k({type:String,defaultValue:""}),0,"max"],[k({type:Boolean,attribute:"read-only",reflect:!0,defaultValue:!1}),0,"readOnly"],[k({type:String,defaultValue:""}),0,"label"],[k({type:String,defaultValue:""}),0,"locale"],[Pt({name:"rui-change",bubbles:!0,composed:!0}),0,"changeEvent"],[it,0,"segments"],[it,0,"focusedPart"],[at(["value","locale"]),2,"syncSegmentsFromValue"],[at("label"),2,"syncGroupLabel"],[V({selector:'[data-ref="root"]',type:"focusin"}),2,"onGroupFocusIn"],[V({selector:"[data-date-segment]",type:"focusin"}),2,"onSegmentFocusIn"],[V({selector:"[data-date-segment]",type:"focusout"}),2,"onSegmentFocusOut"],[V({selector:"[data-date-segment]",type:"keydown"}),2,"onSegmentKeyDown"],[V({selector:"[data-date-segment]",type:"beforeinput"}),2,"onSegmentBeforeInput"],[V({selector:"[data-date-segment]",type:"pointerdown"}),2,"onSegmentPointerDown"]],0,void 0,ot))}value=(Me(this),$e(this));min=(je(this),Ce(this));max=(ze(this),Ke(this));readOnly=(Ue(this),Ye(this));label=(qe(this),Ge(this));locale=(We(this),Je(this));changeEvent=(Ze(this),Qe(this));segments=(Xe(this),He(this,[]));focusedPart=(et(this),tt(this,null));uid=(rt(this),Le("rui-date-input"));buffer="";useTextboxRole=Ft();pendingFocus=null;get resolvedLocale(){return Re(this.locale)}get isoValue(){return this.value??""}syncSegmentsFromValue(){this.segments=z(j(this.isoValue),this.resolvedLocale),this.buffer=""}get displaySegments(){return this.segments.length>0?this.segments:z(j(this.isoValue),this.resolvedLocale)}constructor(){super(),It(this,()=>this.syncSegmentsFromValue())}getSegmentElement(e){return this.querySelector(`[data-date-segment][data-type="${e}"]`)}setFocusedPart(e,r="leave"){let n=this.focusedPart;e===n&&r==="leave"||(this.buffer="",(n!=null||r==="blur")&&this.commit(r),this.focusedPart=e)}focusPart(e){this.setFocusedPart(e),this.pendingFocus=e}updated(e){super.updated(e),this.pendingFocus=null;let r=this.focusedPart;if(!r||!(e.has("focusedPart")||e.has("segments"))||!this.matches(":focus-within"))return;let n=this.getSegmentElement(r);n&&(document.activeElement!==n&&n.focus(),document.activeElement===n&&window.getSelection()?.collapse(n,0))}commit(e){if(e==="edit"&&this.buffer)return;let r=ee(this.segments,{min:this.min,max:this.max});switch(r.kind){case"partial-year":e!=="edit"&&this.syncSegmentsFromValue();return;case"incomplete":e==="blur"&&this.syncSegmentsFromValue();return;case"out-of-range":this.syncSegmentsFromValue();return;case"empty":this.publish("");return;case"date":this.publish(r.iso)}}publish(e){if(e===this.isoValue){this.syncSegmentsFromValue();return}this.value=e,this.changeEvent.emit({value:e})}partFromTarget(e){if(!(e instanceof HTMLElement))return null;let n=e.closest("[data-date-segment]")?.getAttribute("data-type");return n==="month"||n==="day"||n==="year"?n:null}handleDigit(e,r){this.setFocusedPart(e);let n=oe(this.segments,e,r,this.buffer);if(this.segments=n.segments,this.buffer=n.enteredKeys,n.focusNext){this.focusPart(T(this.segments,e,1));return}this.commit("edit")}handleBackspace(e){this.setFocusedPart(e);let r=ue(this.segments,e);if(r.kind==="focus-previous"){this.focusPart(T(this.segments,e,-1));return}this.segments=r.segments,this.buffer=r.enteredKeys,this.commit("edit")}handleIncrement(e,r){this.setFocusedPart(e),this.buffer="",this.segments=ie(this.segments,e,r),this.commit("edit")}onConnected(){this.syncSegmentsFromValue(),this.syncGroupLabel()}formValue(){return this.name?this.isoValue:null}formState(){return this.value}restoreFormState(e){this.value=typeof e=="string"?e:"",this.syncSegmentsFromValue()}formResetCallback(){super.formResetCallback(),this.dispatchEvent(new Event("rui-form-reset",{bubbles:!0}))}syncGroupLabel(){let e=this.querySelector('[data-ref="root"]');if(!e)return;e.id||(e.id=`${this.uid}-group`);let r=this.label||this.getAttribute("aria-label")||"";r?e.setAttribute("aria-label",r):e.removeAttribute("aria-label")}onGroupFocusIn(e){this.partFromTarget(e.target)||this.focusPart(se(this.segments))}onSegmentFocusIn(e){let r=this.partFromTarget(e.target);r&&(this.pendingFocus&&this.pendingFocus!==r||this.setFocusedPart(r))}onSegmentFocusOut(){queueMicrotask(()=>{this.matches(":focus-within")||this.setFocusedPart(null,"blur")})}onSegmentKeyDown(e){let r=this.partFromTarget(e.target);if(!(!r||this.effectiveDisabled||this.readOnly)){if(e.key==="ArrowLeft"){e.preventDefault(),this.focusPart(T(this.segments,r,-1));return}if(e.key==="ArrowRight"){e.preventDefault(),this.focusPart(T(this.segments,r,1));return}if(e.key==="ArrowUp"){e.preventDefault(),this.handleIncrement(r,1);return}if(e.key==="ArrowDown"){e.preventDefault(),this.handleIncrement(r,-1);return}(e.key==="Backspace"||e.key==="Delete")&&(e.preventDefault(),e.stopPropagation(),this.handleBackspace(r))}}onSegmentBeforeInput(e){let r=this.partFromTarget(e.target);if(!(!r||this.effectiveDisabled||this.readOnly))switch(e.preventDefault(),e.inputType){case"deleteContentBackward":case"deleteContentForward":this.handleBackspace(r);break;default:e.data!=null&&this.handleDigit(r,e.data);break}}onSegmentPointerDown(e){e.stopPropagation()}renderSegment(e,r){if(!e.editable)return Y("span",{class:"rui-date-input__literal","data-type":"literal","aria-hidden":"true",children:e.value},`literal-${r}`);let n=e.type,a=this.focusedPart===n,i=Ne(e,{disabled:this.effectiveDisabled,locale:this.resolvedLocale,readOnly:this.readOnly,segments:this.displaySegments,useTextboxRole:this.useTextboxRole});return Y("span",{class:i.className,"data-date-segment":!0,"data-type":n,"data-placeholder":e.isPlaceholder?"true":void 0,"data-focused":a?"true":void 0,role:i.ariaRole,"aria-label":i.ariaLabel,"aria-valuemin":i.ariaValuemin,"aria-valuemax":i.ariaValuemax,"aria-valuenow":i.ariaValuenow,"aria-valuetext":i.ariaValuetext,"aria-readonly":i.ariaReadonly,"data-rui-focus-managed":i.dataRuiFocusManaged,contenteditable:i.contenteditable,suppresscontenteditablewarning:i.suppresscontenteditablewarning,spellcheck:"false",inputmode:i.inputmode,tabindex:i.tabindex,children:L(e)},n)}render(){return Y("div",{class:"rui-date-input","data-ref":"root",role:"group",children:Y("div",{class:"rui-date-input__segments",children:this.displaySegments.map((e,r)=>this.renderSegment(e,r))})})}static{Be()}};import{jsx as Tt}from"@ecopages/jsx/jsx-runtime";function Vt(t){return Tt("rui-date-input",{"data-rui-control":!0,"data-rui-control-type":"date","data-rui-aria-target":'[data-ref="root"]',...t})}export{Vt as RuiDateInput,ut as RuiDateInputElement};
|
|
1
|
+
import{jsx as Y}from"@ecopages/jsx/jsx-runtime";import{customElement as wt,event as Pt,onEvent as V,onUpdated as it,prop as k,registerSsrPreparationCallback as It,state as ot}from"@ecopages/radiant";import{FormAssociatedElement as st}from"@ecopages/radiant/form-associated-element";function j(t){if(t==null)return null;let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t.trim());if(!e)return null;let r=Number(e[1]),n=Number(e[2])-1,a=Number(e[3]),i=new Date(r,n,a);return i.getFullYear()!==r||i.getMonth()!==n||i.getDate()!==a?null:i}function H(t){let e=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${e}-${r}-${n}`}function ee(t,e,r){return!(e&&t<e||r&&t>r)}var we=new Map;function lt(t,e){return`${JSON.stringify(t??null)}|${JSON.stringify(e)}`}function C(t,e){let r=lt(t,e),n=we.get(r);if(n)return n;let a=new Intl.DateTimeFormat(t,e);return we.set(r,a),a}var ct=new Date(2e3,0,1);function ft(t,e){return t==="year"?e==="year":t==="month"?e==="year"||e==="month":!0}function dt(t,e){let n=C(e,{[t]:t==="year"?"numeric":"2-digit"}).formatToParts(ct).find(a=>a.type===t);return n?n.value.replace(/\d/g,t==="year"?"y":t==="month"?"m":"d"):t==="year"?"yyyy":"mm"}function mt(t,e,r){let n=t==="year"?{year:"numeric"}:{[t]:"2-digit"};return C(r,n).formatToParts(e).find(a=>a.type===t)?.value??""}function z(t,e,r={}){let n=r.granularity??"day",a=t??r.placeholderDate??new Date;return C(e,{year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(a).filter(u=>u.type!=="era").map(u=>{if(u.type==="literal")return{type:"literal",value:u.value,placeholder:u.value,isPlaceholder:!1,editable:!1};let o=u.type;if(!ft(n,o))return null;let f=t!=null;return{type:o,value:f?mt(o,t,e):"",placeholder:dt(o,e),isPlaceholder:!f,editable:!0}}).filter(u=>u!=null)}function pt(t){if(t.isPlaceholder||t.value==="")return null;let e=Number(t.value);return Number.isFinite(e)?e:null}function gt(t){return t>=100?t:t>=69?1900+t:2e3+t}function Pe(t){let e={};for(let n of t){if(!n.editable)continue;let a=pt(n);if(a==null)return null;e[n.type]=n.type==="year"?gt(a):a}if(e.year==null||e.month==null||e.day==null)return null;let r=new Date(e.year,e.month-1,e.day);return r.getFullYear()!==e.year||r.getMonth()!==e.month-1||r.getDate()!==e.day?null:r}function Ie(t){return t.every(e=>!e.editable||e.isPlaceholder||e.value==="")}function te(t,e={}){let r=t.find(i=>i.editable&&i.type==="year");if(r&&!r.isPlaceholder&&r.value!==""&&r.value.replace(/\D/g,"").length<4)return{kind:"partial-year"};if(Ie(t))return{kind:"empty"};let n=Pe(t);if(!n)return{kind:"incomplete"};let a=H(n);return ee(a,e.min,e.max)?{kind:"date",iso:a}:{kind:"out-of-range"}}function re(t){return t==="year"?4:2}function ht(t,e){return t.findIndex(r=>r.editable&&r.type===e)}function yt(t){return t.map(e=>({...e}))}function ae(t,e,r){let n=yt(t),a=ht(n,e);return a<0||(n[a]={...n[a],...r}),n}function ne(t){if(t==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}function K(t,e){return{min:1,max:Te(t,e)}}function Te(t,e){if(t==="month")return 12;if(t==="day"){let r=Fe(e,"year"),n=Fe(e,"month");return r!=null&&n!=null?new Date(r,n,0).getDate():31}return 9999}function Fe(t,e){let r=t.find(n=>n.editable&&n.type===e);return!r||r.isPlaceholder||r.value===""?null:Number(r.value)}function Ve(t,e){return t==="year"?String(e).padStart(4,"0"):String(e).padStart(2,"0")}function ie(t,e){try{let n=new Intl.DisplayNames(e,{type:"dateTimeField"}).of(t);if(n)return n}catch{}return t==="month"?"Month":t==="day"?"Day":"Year"}function L(t){return t.isPlaceholder||t.value===""?t.placeholder:t.value}function U(t){return t.isPlaceholder||t.value===""?null:ne(t.value.replace(/\D/g,""))}function ke(t,e){return ae(t,e,{value:"",isPlaceholder:!0})}function Ee(t,e,r){return ae(t,e,{value:Ve(e,r),isPlaceholder:!1})}function oe(t,e,r){let n=t.find(f=>f.editable&&f.type===e);if(!n)return t;let{min:a,max:i}=K(e,t),o=(U(n)??(r>0?a-1:i+1))+r;return e==="month"||e==="day"?o<a?o=i:o>i&&(o=a):o=Math.max(a,o),Ee(t,e,o)}function se(t,e,r,n){let a=r.replace(/\D/g,"");if(!a)return{segments:t,enteredKeys:n,focusNext:!1};let i=n+a,u=ne(i);if(u==null)return{segments:t,enteredKeys:n,focusNext:!1};let o=Te(e,t),f=u;f>o&&(f=ne(a)??f);let P=re(e),v=+`${f}0`>o||i.length>=P||String(f).length>=P,E=v?Ve(e,f):String(f);return{segments:ae(t,e,{value:E,isPlaceholder:!1}),enteredKeys:v?"":i,focusNext:v}}function Re(t){return t.filter(e=>e.editable).map(e=>e.type)}function T(t,e,r){let n=Re(t),a=n.indexOf(e);if(a<0)return n[0]??null;let i=a+r;return i<0||i>=n.length?null:n[i]??null}function ue(t){let e=null;for(let r of t){if(!r.editable)continue;let n=r.type;if(e||(e=n),r.isPlaceholder||r.value==="")return n}return e}function le(t,e){let r=t.find(i=>i.editable&&i.type===e);if(!r)return{kind:"focus-previous"};if(r.isPlaceholder||r.value==="")return{kind:"focus-previous"};let n=r.value.replace(/\D/g,"");if(n.length<=1)return{kind:"updated",segments:ke(t,e),enteredKeys:""};let a=n.slice(0,-1);return{kind:"updated",segments:t.map(i=>i.editable&&i.type===e?{...i,value:a,isPlaceholder:!1}:i),enteredKeys:a}}function Ae(t){if(!t)return;let e=t.split(",").map(r=>r.trim()).filter(Boolean);return e.length>1?e:e[0]}var bt=/^[A-Za-z][A-Za-z0-9_-]*$/;function Le(t){return bt.test(t)}function St(t){let e=t.trim();if(Le(e))return e;let r=`rui-${e}`;return e&&Le(r)?r:"rui"}function Oe(t){let e=typeof crypto.randomUUID=="function"?crypto.randomUUID().replace(/-/g,""):Array.from(crypto.getRandomValues(new Uint8Array(16)),r=>r.toString(16).padStart(2,"0")).join("");return`${St(t)}-${e}`}function Ne(...t){return t.filter(Boolean).join(" ")}function Me(t,e){let r=t.type,n=U(t),a=!e.useTextboxRole,i=a?"spinbutton":"textbox",u=!e.disabled&&!e.readOnly,o=K(r,e.segments);return{ariaLabel:ie(r,e.locale),ariaReadonly:e.readOnly||void 0,ariaRole:i,ariaValuemax:a?o.max:void 0,ariaValuemin:a?o.min:void 0,ariaValuenow:a&&n!=null?n:void 0,ariaValuetext:a?L(t):void 0,className:Ne("rui-date-input__segment",t.isPlaceholder&&"rui-date-input__segment--placeholder"),dataRuiFocusManaged:!0,contenteditable:u?"true":void 0,inputmode:u?"numeric":void 0,suppresscontenteditablewarning:u?"true":void 0,tabindex:e.disabled?void 0:0}}var Be,$e,je,Ce,ze,Ke,Ue,Ye,qe,Ge,We,Je,Ze,Qe,Xe,He,et,tt,rt,nt;function xt(t,e,r,n,a,i){var u,o,f,P,v,E,I,ce=Symbol.metadata||Symbol.for("Symbol.metadata"),fe=Object.defineProperty,G=Object.create,de=[G(null),G(null)],me=e.length;function O(s,y,g){return function(l,c){y&&(c=l,l=t);for(var b=0;b<s.length;b++)c=s[b].apply(l,g?[c]:[]);return g?c:l}}function D(s,y,g,l){if(typeof s!="function"&&(l||s!==void 0))throw new TypeError(y+" must "+(g||"be")+" a function"+(l?"":" or undefined"));return s}function pe(s,y,g,l,c,b,w,h,S,x,he){function W(m){if(!he(m))throw new TypeError("Attempted to access private element on non-instance")}var J=[].concat(y[0]),ye=y[3],Z=!w,R=c===1,be=c===3,Se=c===4,N=c===2;function M(m,F,De){return function($,_e){return F&&(_e=$,$=s),De&&De($),d[m].call($,_e)}}if(!Z){var d={},Q=[],_=be?"get":Se||R?"set":"value";if(S?(x||R?d={get:at(function(){return ye(this)},l,"get"),set:function(m){y[4](this,m)}}:d[_]=ye,x||at(d[_],l,N?"":_)):x||(d=Object.getOwnPropertyDescriptor(s,l)),!x&&!S){if((o=de[+h][l])&&(o^c)!==7)throw Error("Decorating two elements with the same name ("+d[_].name+") is not supported yet");de[+h][l]=c<3?1:c}}for(var p=s,B=J.length-1;B>=0;B-=g?2:1){var xe=D(J[B],"A decorator","be",!0),ve=g?J[B-1]:void 0,X={},A={kind:["field","accessor","method","getter","setter","class"][c],name:l,metadata:u,addInitializer:function(m,F){if(m.v)throw new TypeError("attempted to call addInitializer after decoration was finished");D(F,"An initializer","be",!0),b.push(F)}.bind(null,X)};if(Z)o=xe.call(ve,p,A),X.v=1,D(o,"class decorators","return")&&(p=o);else if(A.static=h,A.private=S,o=A.access={has:S?he.bind():function(m){return l in m}},Se||(o.get=S?N?function(m){return W(m),d.value}:M("get",0,W):function(m){return m[l]}),N||be||(o.set=S?M("set",0,W):function(m,F){m[l]=F}),p=xe.call(ve,R?{get:d.get,set:d.set}:d[_],A),X.v=1,R){if(typeof p=="object"&&p)(o=D(p.get,"accessor.get"))&&(d.get=o),(o=D(p.set,"accessor.set"))&&(d.set=o),(o=D(p.init,"accessor.init"))&&Q.unshift(o);else if(p!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else D(p,(x?"field":"method")+" decorators","return")&&(x?Q.unshift(p):d[_]=p)}return c<2&&w.push(O(Q,h,1),O(b,h,0)),x||Z||(S?R?w.splice(-1,0,M("get",h),M("set",h)):w.push(N?d[_]:D.call.bind(d[_])):fe(s,l,d)),p}function ge(s){return fe(s,ce,{configurable:!0,enumerable:!0,value:u})}return i!==void 0&&(u=i[ce]),u=G(u??null),v=[],E=function(s){s&&v.push(O(s))},I=function(s,y){for(var g=0;g<r.length;g++){var l=r[g],c=l[1],b=7&c;if((8&c)==s&&!b==y){var w=l[2],h=!!l[3],S=16&c;pe(s?t:t.prototype,l,S,h?"#"+w:vt(w),b,b<2?[]:s?P=P||[]:f=f||[],v,!!s,h,y,s&&h?function(x){return _t(x)===t}:a)}}},I(8,0),I(0,0),I(8,1),I(0,1),E(f),E(P),o=v,me||ge(t),{e:o,get c(){var s=[];return me&&[ge(t=pe(t,[e],n,t.name,5,s)),O(s,1)]}}}function vt(t){var e=Dt(t,"string");return typeof e=="symbol"?e:e+""}function Dt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function at(t,e,r){typeof e=="symbol"&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:r?r+" "+e:e})}catch{}return t}function _t(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}function Ft(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)}var q,ut=class extends st{static{({e:[je,Ce,ze,Ke,Ue,Ye,qe,Ge,We,Je,Ze,Qe,Xe,He,et,tt,rt,nt,Be],c:[q,$e]}=xt(this,[wt("rui-date-input")],[[k({type:String,reflect:!0,defaultValue:""}),0,"value"],[k({type:String,defaultValue:""}),0,"min"],[k({type:String,defaultValue:""}),0,"max"],[k({type:Boolean,attribute:"read-only",reflect:!0,defaultValue:!1}),0,"readOnly"],[k({type:String,defaultValue:""}),0,"label"],[k({type:String,defaultValue:""}),0,"locale"],[Pt({name:"rui-change",bubbles:!0,composed:!0}),0,"changeEvent"],[ot,0,"segments"],[ot,0,"focusedPart"],[it(["value","locale"]),2,"syncSegmentsFromValue"],[it("label"),2,"syncGroupLabel"],[V({selector:'[data-ref="root"]',type:"focusin"}),2,"onGroupFocusIn"],[V({selector:"[data-date-segment]",type:"focusin"}),2,"onSegmentFocusIn"],[V({selector:"[data-date-segment]",type:"focusout"}),2,"onSegmentFocusOut"],[V({selector:"[data-date-segment]",type:"keydown"}),2,"onSegmentKeyDown"],[V({selector:"[data-date-segment]",type:"beforeinput"}),2,"onSegmentBeforeInput"],[V({selector:"[data-date-segment]",type:"pointerdown"}),2,"onSegmentPointerDown"]],0,void 0,st))}value=(Be(this),je(this));min=(Ce(this),ze(this));max=(Ke(this),Ue(this));readOnly=(Ye(this),qe(this));label=(Ge(this),We(this));locale=(Je(this),Ze(this));changeEvent=(Qe(this),Xe(this));segments=(He(this),et(this,[]));focusedPart=(tt(this),rt(this,null));uid=(nt(this),Oe("rui-date-input"));buffer="";useTextboxRole=Ft();pendingFocus=null;get resolvedLocale(){return Ae(this.locale)}get isoValue(){return this.value??""}syncSegmentsFromValue(){this.segments=z(j(this.isoValue),this.resolvedLocale),this.buffer=""}get displaySegments(){return this.segments.length>0?this.segments:z(j(this.isoValue),this.resolvedLocale)}constructor(){super(),It(this,()=>this.syncSegmentsFromValue())}getSegmentElement(e){return this.querySelector(`[data-date-segment][data-type="${e}"]`)}setFocusedPart(e,r="leave"){let n=this.focusedPart;e===n&&r==="leave"||(this.buffer="",(n!=null||r==="blur")&&this.commit(r),this.focusedPart=e)}focusPart(e){this.setFocusedPart(e),this.pendingFocus=e}updated(e){super.updated(e),this.pendingFocus=null;let r=this.focusedPart;if(!r||!(e.has("focusedPart")||e.has("segments"))||!this.matches(":focus-within"))return;let n=this.getSegmentElement(r);n&&(document.activeElement!==n&&n.focus(),document.activeElement===n&&window.getSelection()?.collapse(n,0))}commit(e){if(e==="edit"&&this.buffer)return;let r=te(this.segments,{min:this.min,max:this.max});switch(r.kind){case"partial-year":e!=="edit"&&this.syncSegmentsFromValue();return;case"incomplete":e==="blur"&&this.syncSegmentsFromValue();return;case"out-of-range":this.syncSegmentsFromValue();return;case"empty":this.publish("");return;case"date":this.publish(r.iso)}}publish(e){if(e===this.isoValue){this.syncSegmentsFromValue();return}this.value=e,this.changeEvent.emit({value:e})}partFromTarget(e){if(!(e instanceof HTMLElement))return null;let n=e.closest("[data-date-segment]")?.getAttribute("data-type");return n==="month"||n==="day"||n==="year"?n:null}handleDigit(e,r){this.setFocusedPart(e);let n=se(this.segments,e,r,this.buffer);if(this.segments=n.segments,this.buffer=n.enteredKeys,n.focusNext){this.focusPart(T(this.segments,e,1));return}this.commit("edit")}handleBackspace(e){this.setFocusedPart(e);let r=le(this.segments,e);if(r.kind==="focus-previous"){this.focusPart(T(this.segments,e,-1));return}this.segments=r.segments,this.buffer=r.enteredKeys,this.commit("edit")}handleIncrement(e,r){this.setFocusedPart(e),this.buffer="",this.segments=oe(this.segments,e,r),this.commit("edit")}onConnected(){this.syncSegmentsFromValue(),this.syncGroupLabel()}formValue(){return this.name?this.isoValue:null}formState(){return this.value}restoreFormState(e){this.value=typeof e=="string"?e:"",this.syncSegmentsFromValue()}formResetCallback(){super.formResetCallback(),this.dispatchEvent(new Event("rui-form-reset",{bubbles:!0}))}syncGroupLabel(){let e=this.querySelector('[data-ref="root"]');if(!e)return;e.id||(e.id=`${this.uid}-group`);let r=this.label||this.getAttribute("aria-label")||"";r?e.setAttribute("aria-label",r):e.removeAttribute("aria-label")}onGroupFocusIn(e){this.partFromTarget(e.target)||this.focusPart(ue(this.segments))}onSegmentFocusIn(e){let r=this.partFromTarget(e.target);r&&(this.pendingFocus&&this.pendingFocus!==r||this.setFocusedPart(r))}onSegmentFocusOut(){queueMicrotask(()=>{this.matches(":focus-within")||this.setFocusedPart(null,"blur")})}onSegmentKeyDown(e){let r=this.partFromTarget(e.target);if(!(!r||this.effectiveDisabled||this.readOnly)){if(e.key==="ArrowLeft"){e.preventDefault(),this.focusPart(T(this.segments,r,-1));return}if(e.key==="ArrowRight"){e.preventDefault(),this.focusPart(T(this.segments,r,1));return}if(e.key==="ArrowUp"){e.preventDefault(),this.handleIncrement(r,1);return}if(e.key==="ArrowDown"){e.preventDefault(),this.handleIncrement(r,-1);return}(e.key==="Backspace"||e.key==="Delete")&&(e.preventDefault(),e.stopPropagation(),this.handleBackspace(r))}}onSegmentBeforeInput(e){let r=this.partFromTarget(e.target);if(!(!r||this.effectiveDisabled||this.readOnly))switch(e.preventDefault(),e.inputType){case"deleteContentBackward":case"deleteContentForward":this.handleBackspace(r);break;default:e.data!=null&&this.handleDigit(r,e.data);break}}onSegmentPointerDown(e){e.stopPropagation()}renderSegment(e,r){if(!e.editable)return Y("span",{class:"rui-date-input__literal","data-type":"literal","aria-hidden":"true",children:e.value},`literal-${r}`);let n=e.type,a=this.focusedPart===n,i=Me(e,{disabled:this.effectiveDisabled,locale:this.resolvedLocale,readOnly:this.readOnly,segments:this.displaySegments,useTextboxRole:this.useTextboxRole});return Y("span",{class:i.className,"data-date-segment":!0,"data-type":n,"data-placeholder":e.isPlaceholder?"true":void 0,"data-focused":a?"true":void 0,role:i.ariaRole,"aria-label":i.ariaLabel,"aria-valuemin":i.ariaValuemin,"aria-valuemax":i.ariaValuemax,"aria-valuenow":i.ariaValuenow,"aria-valuetext":i.ariaValuetext,"aria-readonly":i.ariaReadonly,"data-rui-focus-managed":i.dataRuiFocusManaged,contenteditable:i.contenteditable,suppresscontenteditablewarning:i.suppresscontenteditablewarning,spellcheck:"false",inputmode:i.inputmode,tabindex:i.tabindex,children:L(e)},n)}render(){return Y("div",{class:"rui-date-input","data-ref":"root",role:"group",children:Y("div",{class:"rui-date-input__segments",children:this.displaySegments.map((e,r)=>this.renderSegment(e,r))})})}static{$e()}};import{jsx as Tt}from"@ecopages/jsx/jsx-runtime";function Vt(t){return Tt(q,{"data-rui-control":!0,"data-rui-control-type":"date","data-rui-aria-target":'[data-ref="root"]',...t})}export{Vt as RuiDateInput,q as RuiDateInputElement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/ui/date-input/date-input.script.tsx", "../../../../src/lib/intl-date/iso.ts", "../../../../src/lib/intl-date/formatters.ts", "../../../../src/lib/intl-date/segments.ts", "../../../../src/lib/intl-date/segment-editing.ts", "../../../../src/lib/intl/locale.ts", "../../../../src/lib/unique-id.ts", "../../../../src/lib/cx.ts", "../../../../src/components/ui/date-input/date-input-segment-dom.ts", "../../../../src/components/ui/date-input/date-input.tsx"],
|
|
4
|
-
"sourcesContent": ["let _initProto, _initClass, _init_value, _init_extra_value, _init_min, _init_extra_min, _init_max, _init_extra_max, _init_readOnly, _init_extra_readOnly, _init_label, _init_extra_label, _init_locale, _init_extra_locale, _init_changeEvent, _init_extra_changeEvent, _init_segments, _init_extra_segments, _init_focusedPart, _init_extra_focusedPart;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { jsx } from \"@ecopages/jsx/jsx-runtime\";\nimport { customElement, event, onEvent, onUpdated, prop, registerSsrPreparationCallback, state } from \"@ecopages/radiant\";\nimport { FormAssociatedElement } from \"@ecopages/radiant/form-associated-element\";\nimport { applyBackspaceToSegment, applyDigitToSegment, buildDateSegments, draftStatus, firstEmptyOrFirstPart, focusPartAfter, incrementSegmentValue, isoToDate, segmentDisplayText } from \"@/lib/intl-date\";\nimport { resolveLocale } from \"@/lib/intl/locale\";\nimport { uniqueId } from \"@/lib/unique-id\";\nimport { getSegmentDomProps } from \"./date-input-segment-dom\";\nfunction isIosDevice() {\n if (typeof navigator === \"undefined\") {\n return false;\n }\n return /iPad|iPhone|iPod/.test(navigator.userAgent);\n}\nlet _RuiDateInput;\nclass RuiDateInput extends FormAssociatedElement {\n static {\n ({\n e: [_init_value, _init_extra_value, _init_min, _init_extra_min, _init_max, _init_extra_max, _init_readOnly, _init_extra_readOnly, _init_label, _init_extra_label, _init_locale, _init_extra_locale, _init_changeEvent, _init_extra_changeEvent, _init_segments, _init_extra_segments, _init_focusedPart, _init_extra_focusedPart, _initProto],\n c: [_RuiDateInput, _initClass]\n } = _applyDecs(this, [customElement(\"rui-date-input\")], [[prop({\n type: String,\n reflect: true,\n defaultValue: \"\"\n }), 0, \"value\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"min\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"max\"], [prop({\n type: Boolean,\n attribute: \"read-only\",\n reflect: true,\n defaultValue: false\n }), 0, \"readOnly\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"label\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"locale\"], [event({\n name: \"rui-change\",\n bubbles: true,\n composed: true\n }), 0, \"changeEvent\"], [state, 0, \"segments\"], [state, 0, \"focusedPart\"], [onUpdated([\"value\", \"locale\"]), 2, \"syncSegmentsFromValue\"], [onUpdated(\"label\"), 2, \"syncGroupLabel\"], [onEvent({\n selector: '[data-ref=\"root\"]',\n type: \"focusin\"\n }), 2, \"onGroupFocusIn\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"focusin\"\n }), 2, \"onSegmentFocusIn\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"focusout\"\n }), 2, \"onSegmentFocusOut\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"keydown\"\n }), 2, \"onSegmentKeyDown\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"beforeinput\"\n }), 2, \"onSegmentBeforeInput\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"pointerdown\"\n }), 2, \"onSegmentPointerDown\"]], 0, void 0, FormAssociatedElement));\n }\n value = (_initProto(this), _init_value(this));\n min = (_init_extra_value(this), _init_min(this));\n max = (_init_extra_min(this), _init_max(this));\n readOnly = (_init_extra_max(this), _init_readOnly(this));\n label = (_init_extra_readOnly(this), _init_label(this));\n locale = (_init_extra_label(this), _init_locale(this));\n changeEvent = (_init_extra_locale(this), _init_changeEvent(this));\n segments = (_init_extra_changeEvent(this), _init_segments(this, []));\n focusedPart = (_init_extra_segments(this), _init_focusedPart(this, null));\n uid = (_init_extra_focusedPart(this), uniqueId(\"rui-date-input\"));\n /** Digits typed into `focusedPart` that have not completed the unit yet. */\n buffer = \"\";\n useTextboxRole = isIosDevice();\n /**\n * Part `updated()` still has to move DOM focus to.\n *\n * @remarks The render commit can restore focus to the old segment first; that\n * `focusin` is ignored so it does not take editing back.\n */\n pendingFocus = null;\n get resolvedLocale() {\n return resolveLocale(this.locale);\n }\n get isoValue() {\n return this.value ?? \"\";\n }\n syncSegmentsFromValue() {\n this.segments = buildDateSegments(isoToDate(this.isoValue), this.resolvedLocale);\n this.buffer = \"\";\n }\n /**\n * @remarks SSR preparation and the connect-time `@onUpdated` both fill `segments`\n * before the first render; this derives from `value` only for a render before either.\n */\n get displaySegments() {\n if (this.segments.length > 0) {\n return this.segments;\n }\n return buildDateSegments(isoToDate(this.isoValue), this.resolvedLocale);\n }\n constructor() {\n super();\n registerSsrPreparationCallback(this, () => this.syncSegmentsFromValue());\n }\n getSegmentElement(type) {\n return this.querySelector(`[data-date-segment][data-type=\"${type}\"]`);\n }\n /**\n * Moves editing to `part` and commits the draft once, as `trigger`.\n *\n * @remarks A `leave` commits nothing when no part was focused, so first focus never\n * publishes. A `blur` always commits: an edge arrow or a completed last unit clears\n * `focusedPart` while focus stays inside, and that draft still gets the Blur column.\n */\n setFocusedPart(part, trigger = \"leave\") {\n const previous = this.focusedPart;\n if (part === previous && trigger === \"leave\") {\n return;\n }\n this.buffer = \"\";\n if (previous != null || trigger === \"blur\") {\n this.commit(trigger);\n }\n this.focusedPart = part;\n }\n focusPart(type) {\n this.setFocusedPart(type);\n this.pendingFocus = type;\n }\n /**\n * Moves focus and the caret to `focusedPart` after a cycle that changed it or rebuilt `segments`.\n *\n * @remarks Skipped once focus has left the control, so a rebuild in the turn focus\n * moved elsewhere (before the blur commit clears `focusedPart`) cannot pull it back.\n */\n updated(changed) {\n super.updated(changed);\n this.pendingFocus = null;\n const part = this.focusedPart;\n if (!part || !(changed.has(\"focusedPart\") || changed.has(\"segments\")) || !this.matches(\":focus-within\")) {\n return;\n }\n const segment = this.getSegmentElement(part);\n if (!segment) {\n return;\n }\n if (document.activeElement !== segment) {\n segment.focus();\n }\n if (document.activeElement === segment) {\n window.getSelection()?.collapse(segment, 0);\n }\n }\n /**\n * Publishes, keeps, or restores the draft after `trigger`, per the commit table in `README.md`.\n *\n * @remarks An in-progress buffer only holds back an `edit`; leaving the part clears it first.\n */\n commit(trigger) {\n if (trigger === \"edit\" && this.buffer) {\n return;\n }\n const status = draftStatus(this.segments, {\n min: this.min,\n max: this.max\n });\n switch (status.kind) {\n case \"partial-year\":\n if (trigger !== \"edit\") {\n this.syncSegmentsFromValue();\n }\n return;\n case \"incomplete\":\n if (trigger === \"blur\") {\n this.syncSegmentsFromValue();\n }\n return;\n case \"out-of-range\":\n this.syncSegmentsFromValue();\n return;\n case \"empty\":\n this.publish(\"\");\n return;\n case \"date\":\n this.publish(status.iso);\n }\n }\n /**\n * @remarks A changed `value` rebuilds `segments` through its `@onUpdated` in the next\n * update cycle, so `segments` still holds the draft until then. An unchanged value\n * rebuilds now so the display normalizes (`1` becomes `01`).\n */\n publish(iso) {\n if (iso === this.isoValue) {\n this.syncSegmentsFromValue();\n return;\n }\n this.value = iso;\n this.changeEvent.emit({\n value: iso\n });\n }\n partFromTarget(target) {\n if (!(target instanceof HTMLElement)) {\n return null;\n }\n const segment = target.closest(\"[data-date-segment]\");\n const type = segment?.getAttribute(\"data-type\");\n if (type === \"month\" || type === \"day\" || type === \"year\") {\n return type;\n }\n return null;\n }\n /** @remarks A completed unit commits once, as the `leave` of the focus move it triggers. */\n handleDigit(part, key) {\n this.setFocusedPart(part);\n const result = applyDigitToSegment(this.segments, part, key, this.buffer);\n this.segments = result.segments;\n this.buffer = result.enteredKeys;\n if (result.focusNext) {\n this.focusPart(focusPartAfter(this.segments, part, 1));\n return;\n }\n this.commit(\"edit\");\n }\n handleBackspace(part) {\n this.setFocusedPart(part);\n const result = applyBackspaceToSegment(this.segments, part);\n if (result.kind === \"focus-previous\") {\n this.focusPart(focusPartAfter(this.segments, part, -1));\n return;\n }\n this.segments = result.segments;\n this.buffer = result.enteredKeys;\n this.commit(\"edit\");\n }\n handleIncrement(part, delta) {\n this.setFocusedPart(part);\n this.buffer = \"\";\n this.segments = incrementSegmentValue(this.segments, part, delta);\n this.commit(\"edit\");\n }\n onConnected() {\n this.syncSegmentsFromValue();\n this.syncGroupLabel();\n }\n formValue() {\n return this.name ? this.isoValue : null;\n }\n /** @remarks The reset value must survive a name assigned after first connect. */\n formState() {\n return this.value;\n }\n restoreFormState(state2) {\n this.value = typeof state2 === \"string\" ? state2 : \"\";\n this.syncSegmentsFromValue();\n }\n formResetCallback() {\n super.formResetCallback();\n this.dispatchEvent(new Event(\"rui-form-reset\", {\n bubbles: true\n }));\n }\n syncGroupLabel() {\n const root = this.querySelector('[data-ref=\"root\"]');\n if (!root) {\n return;\n }\n if (!root.id) {\n root.id = `${this.uid}-group`;\n }\n const ariaLabel = this.label || this.getAttribute(\"aria-label\") || \"\";\n if (ariaLabel) {\n root.setAttribute(\"aria-label\", ariaLabel);\n } else {\n root.removeAttribute(\"aria-label\");\n }\n }\n onGroupFocusIn(event2) {\n if (this.partFromTarget(event2.target)) {\n return;\n }\n this.focusPart(firstEmptyOrFirstPart(this.segments));\n }\n onSegmentFocusIn(event2) {\n const part = this.partFromTarget(event2.target);\n if (!part) {\n return;\n }\n if (this.pendingFocus && this.pendingFocus !== part) {\n return;\n }\n this.setFocusedPart(part);\n }\n onSegmentFocusOut() {\n queueMicrotask(() => {\n if (this.matches(\":focus-within\")) {\n return;\n }\n this.setFocusedPart(null, \"blur\");\n });\n }\n onSegmentKeyDown(event2) {\n const part = this.partFromTarget(event2.target);\n if (!part || this.effectiveDisabled || this.readOnly) {\n return;\n }\n if (event2.key === \"ArrowLeft\") {\n event2.preventDefault();\n this.focusPart(focusPartAfter(this.segments, part, -1));\n return;\n }\n if (event2.key === \"ArrowRight\") {\n event2.preventDefault();\n this.focusPart(focusPartAfter(this.segments, part, 1));\n return;\n }\n if (event2.key === \"ArrowUp\") {\n event2.preventDefault();\n this.handleIncrement(part, 1);\n return;\n }\n if (event2.key === \"ArrowDown\") {\n event2.preventDefault();\n this.handleIncrement(part, -1);\n return;\n }\n if (event2.key === \"Backspace\" || event2.key === \"Delete\") {\n event2.preventDefault();\n event2.stopPropagation();\n this.handleBackspace(part);\n }\n }\n onSegmentBeforeInput(event2) {\n const part = this.partFromTarget(event2.target);\n if (!part || this.effectiveDisabled || this.readOnly) {\n return;\n }\n event2.preventDefault();\n switch (event2.inputType) {\n case \"deleteContentBackward\":\n case \"deleteContentForward\":\n this.handleBackspace(part);\n break;\n default:\n if (event2.data != null) {\n this.handleDigit(part, event2.data);\n }\n break;\n }\n }\n onSegmentPointerDown(event2) {\n event2.stopPropagation();\n }\n renderSegment(segment, index) {\n if (!segment.editable) {\n return /* @__PURE__ */jsx(\"span\", {\n class: \"rui-date-input__literal\",\n \"data-type\": \"literal\",\n \"aria-hidden\": \"true\",\n children: segment.value\n }, `literal-${index}`);\n }\n const type = segment.type;\n const focused = this.focusedPart === type;\n const dom = getSegmentDomProps(segment, {\n disabled: this.effectiveDisabled,\n locale: this.resolvedLocale,\n readOnly: this.readOnly,\n segments: this.displaySegments,\n useTextboxRole: this.useTextboxRole\n });\n return /* @__PURE__ */jsx(\"span\", {\n class: dom.className,\n \"data-date-segment\": true,\n \"data-type\": type,\n \"data-placeholder\": segment.isPlaceholder ? \"true\" : void 0,\n \"data-focused\": focused ? \"true\" : void 0,\n role: dom.ariaRole,\n \"aria-label\": dom.ariaLabel,\n \"aria-valuemin\": dom.ariaValuemin,\n \"aria-valuemax\": dom.ariaValuemax,\n \"aria-valuenow\": dom.ariaValuenow,\n \"aria-valuetext\": dom.ariaValuetext,\n \"aria-readonly\": dom.ariaReadonly,\n \"data-rui-focus-managed\": dom.dataRuiFocusManaged,\n contenteditable: dom.contenteditable,\n suppresscontenteditablewarning: dom.suppresscontenteditablewarning,\n spellcheck: \"false\",\n inputmode: dom.inputmode,\n tabindex: dom.tabindex,\n children: segmentDisplayText(segment)\n }, type);\n }\n render() {\n return /* @__PURE__ */jsx(\"div\", {\n class: \"rui-date-input\",\n \"data-ref\": \"root\",\n role: \"group\",\n children: /* @__PURE__ */jsx(\"div\", {\n class: \"rui-date-input__segments\",\n children: this.displaySegments.map((segment, index) => this.renderSegment(segment, index))\n })\n });\n }\n static {\n _initClass();\n }\n}\nexport { _RuiDateInput as RuiDateInput };", "export function isoToDate(iso) {\n if (iso == null) {\n return null;\n }\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(iso.trim());\n if (!match) {\n return null;\n }\n const year = Number(match[1]);\n const month = Number(match[2]) - 1;\n const day = Number(match[3]);\n const date = new Date(year, month, day);\n if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) {\n return null;\n }\n return date;\n}\nexport function dateToIso(date) {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${year}-${month}-${day}`;\n}\nexport function isIsoInRange(iso, min, max) {\n if (min && iso < min) {\n return false;\n }\n if (max && iso > max) {\n return false;\n }\n return true;\n}", "const formatterCache = /* @__PURE__ */new Map();\nfunction cacheKey(locale, options) {\n return `${JSON.stringify(locale ?? null)}|${JSON.stringify(options)}`;\n}\nexport function getDateTimeFormat(locale, options) {\n const key = cacheKey(locale, options);\n const cached = formatterCache.get(key);\n if (cached) {\n return cached;\n }\n const formatter = new Intl.DateTimeFormat(locale, options);\n formatterCache.set(key, formatter);\n return formatter;\n}\nexport function formatDisplayDate(date, locale, style = \"medium\") {\n return getDateTimeFormat(locale, {\n dateStyle: style\n }).format(date);\n}\nexport function formatMonthYear(date, locale) {\n return getDateTimeFormat(locale, {\n month: \"long\",\n year: \"numeric\"\n }).format(date);\n}\nexport function getWeekdayLabels(locale, weekStartsOn) {\n const formatter = getDateTimeFormat(locale, {\n weekday: \"narrow\"\n });\n const labels = [];\n for (let offset = 0; offset < 7; offset += 1) {\n const dayIndex = (weekStartsOn + offset) % 7;\n const reference = new Date(2024, 0, dayIndex === 0 ? 7 : dayIndex);\n labels.push(formatter.format(reference));\n }\n return labels;\n}\nexport function formatDateRange(start, end, locale, style = \"medium\") {\n const formatter = getDateTimeFormat(locale, {\n dateStyle: style\n });\n if (typeof formatter.formatRange === \"function\") {\n return formatter.formatRange(start, end);\n }\n return `${formatter.format(start)} \\u2013 ${formatter.format(end)}`;\n}\nexport function formatTodayLabel(locale) {\n return new Intl.RelativeTimeFormat(locale, {\n numeric: \"auto\"\n }).format(0, \"day\");\n}", "import { getDateTimeFormat } from \"./formatters\";\nimport { dateToIso, isIsoInRange } from \"./iso\";\nconst PLACEHOLDER_DATE = new Date(2e3, 0, 1);\nfunction granularityIncludes(granularity, part) {\n if (granularity === \"year\") {\n return part === \"year\";\n }\n if (granularity === \"month\") {\n return part === \"year\" || part === \"month\";\n }\n return true;\n}\nfunction placeholderForPart(type, locale) {\n const sample = getDateTimeFormat(locale, {\n [type]: type === \"year\" ? \"numeric\" : \"2-digit\"\n }).formatToParts(PLACEHOLDER_DATE);\n const part = sample.find(entry => entry.type === type);\n if (!part) {\n return type === \"year\" ? \"yyyy\" : \"mm\";\n }\n return part.value.replace(/\\d/g, type === \"year\" ? \"y\" : type === \"month\" ? \"m\" : \"d\");\n}\nfunction formatPartValue(type, date, locale) {\n const options = type === \"year\" ? {\n year: \"numeric\"\n } : {\n [type]: \"2-digit\"\n };\n return getDateTimeFormat(locale, options).formatToParts(date).find(part => part.type === type)?.value ?? \"\";\n}\nexport function buildDateSegments(date, locale, options = {}) {\n const granularity = options.granularity ?? \"day\";\n const reference = date ?? options.placeholderDate ?? /* @__PURE__ */new Date();\n const parts = getDateTimeFormat(locale, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\"\n }).formatToParts(reference);\n return parts.filter(part => part.type !== \"era\").map(part => {\n if (part.type === \"literal\") {\n return {\n type: \"literal\",\n value: part.value,\n placeholder: part.value,\n isPlaceholder: false,\n editable: false\n };\n }\n const type = part.type;\n if (!granularityIncludes(granularity, type)) {\n return null;\n }\n const hasValue = date != null;\n return {\n type,\n value: hasValue ? formatPartValue(type, date, locale) : \"\",\n placeholder: placeholderForPart(type, locale),\n isPlaceholder: !hasValue,\n editable: true\n };\n }).filter(segment => segment != null);\n}\nfunction parseSegmentNumber(segment) {\n if (segment.isPlaceholder || segment.value === \"\") {\n return null;\n }\n const parsed = Number(segment.value);\n return Number.isFinite(parsed) ? parsed : null;\n}\nfunction normalizeYear(value) {\n if (value >= 100) {\n return value;\n }\n return value >= 69 ? 1900 + value : 2e3 + value;\n}\nexport function segmentsToDate(segments) {\n const values = {};\n for (const segment of segments) {\n if (!segment.editable) {\n continue;\n }\n const numeric = parseSegmentNumber(segment);\n if (numeric == null) {\n return null;\n }\n values[segment.type] = segment.type === \"year\" ? normalizeYear(numeric) : numeric;\n }\n if (values.year == null || values.month == null || values.day == null) {\n return null;\n }\n const date = new Date(values.year, values.month - 1, values.day);\n if (date.getFullYear() !== values.year || date.getMonth() !== values.month - 1 || date.getDate() !== values.day) {\n return null;\n }\n return date;\n}\nexport function allSegmentsEmpty(segments) {\n return segments.every(segment => !segment.editable || segment.isPlaceholder || segment.value === \"\");\n}\nexport function draftStatus(segments, range = {}) {\n const year = segments.find(segment => segment.editable && segment.type === \"year\");\n if (year && !year.isPlaceholder && year.value !== \"\" && year.value.replace(/\\D/g, \"\").length < 4) {\n return {\n kind: \"partial-year\"\n };\n }\n if (allSegmentsEmpty(segments)) {\n return {\n kind: \"empty\"\n };\n }\n const date = segmentsToDate(segments);\n if (!date) {\n return {\n kind: \"incomplete\"\n };\n }\n const iso = dateToIso(date);\n if (!isIsoInRange(iso, range.min, range.max)) {\n return {\n kind: \"out-of-range\"\n };\n }\n return {\n kind: \"date\",\n iso\n };\n}\nexport function getEditableSegmentIndices(segments) {\n return segments.map((segment, index) => segment.editable ? index : -1).filter(index => index >= 0);\n}\nexport function maxSegmentLength(type) {\n if (type === \"year\") {\n return 4;\n }\n return 2;\n}\nexport function clampSegmentValue(type, raw) {\n const digits = raw.replace(/\\D/g, \"\");\n return digits.slice(0, maxSegmentLength(type));\n}\nexport function incrementSegment(type, value, delta) {\n const numeric = Number(value || \"0\") + delta;\n if (type === \"month\") {\n const wrapped = (numeric - 1 + 12) % 12 + 1;\n return String(wrapped).padStart(2, \"0\");\n }\n if (type === \"day\") {\n const wrapped = (numeric - 1 + 31) % 31 + 1;\n return String(wrapped).padStart(2, \"0\");\n }\n const next = Math.max(1, numeric);\n return String(next).padStart(4, \"0\").slice(-4);\n}", "import { maxSegmentLength } from \"./segments\";\nfunction segmentIndex(segments, type) {\n return segments.findIndex(segment => segment.editable && segment.type === type);\n}\nfunction cloneSegments(segments) {\n return segments.map(segment => ({\n ...segment\n }));\n}\nfunction updateSegment(segments, type, patch) {\n const next = cloneSegments(segments);\n const index = segmentIndex(next, type);\n if (index < 0) {\n return next;\n }\n next[index] = {\n ...next[index],\n ...patch\n };\n return next;\n}\nfunction parseDigits(raw) {\n if (raw === \"\") {\n return null;\n }\n const parsed = Number(raw);\n return Number.isFinite(parsed) ? parsed : null;\n}\nexport function getSegmentBounds(type, segments) {\n return {\n min: 1,\n max: maxForPart(type, segments)\n };\n}\nfunction maxForPart(type, segments) {\n if (type === \"month\") {\n return 12;\n }\n if (type === \"day\") {\n const year = readPartNumber(segments, \"year\");\n const month = readPartNumber(segments, \"month\");\n if (year != null && month != null) {\n return new Date(year, month, 0).getDate();\n }\n return 31;\n }\n return 9999;\n}\nfunction readPartNumber(segments, type) {\n const segment = segments.find(entry => entry.editable && entry.type === type);\n if (!segment || segment.isPlaceholder || segment.value === \"\") {\n return null;\n }\n return Number(segment.value);\n}\nfunction padPart(type, value) {\n if (type === \"year\") {\n return String(value).padStart(4, \"0\");\n }\n return String(value).padStart(2, \"0\");\n}\nexport function segmentAriaName(type, locale) {\n try {\n const display = new Intl.DisplayNames(locale, {\n type: \"dateTimeField\"\n });\n const name = display.of(type);\n if (name) {\n return name;\n }\n } catch {}\n if (type === \"month\") {\n return \"Month\";\n }\n if (type === \"day\") {\n return \"Day\";\n }\n return \"Year\";\n}\nexport function segmentDisplayText(segment) {\n return segment.isPlaceholder || segment.value === \"\" ? segment.placeholder : segment.value;\n}\nexport function segmentNumericValue(segment) {\n if (segment.isPlaceholder || segment.value === \"\") {\n return null;\n }\n return parseDigits(segment.value.replace(/\\D/g, \"\"));\n}\nexport function clearSegmentValue(segments, type) {\n return updateSegment(segments, type, {\n value: \"\",\n isPlaceholder: true\n });\n}\nexport function setSegmentNumeric(segments, type, value) {\n return updateSegment(segments, type, {\n value: padPart(type, value),\n isPlaceholder: false\n });\n}\nexport function incrementSegmentValue(segments, type, delta) {\n const segment = segments.find(entry => entry.editable && entry.type === type);\n if (!segment) {\n return segments;\n }\n const {\n min,\n max\n } = getSegmentBounds(type, segments);\n const current = segmentNumericValue(segment) ?? (delta > 0 ? min - 1 : max + 1);\n let next = current + delta;\n if (type === \"month\" || type === \"day\") {\n if (next < min) {\n next = max;\n } else if (next > max) {\n next = min;\n }\n } else {\n next = Math.max(min, next);\n }\n return setSegmentNumeric(segments, type, next);\n}\nexport function applyDigitToSegment(segments, type, key, enteredKeys) {\n const digit = key.replace(/\\D/g, \"\");\n if (!digit) {\n return {\n segments,\n enteredKeys,\n focusNext: false\n };\n }\n const newEntered = enteredKeys + digit;\n const parsed = parseDigits(newEntered);\n if (parsed == null) {\n return {\n segments,\n enteredKeys,\n focusNext: false\n };\n }\n const max = maxForPart(type, segments);\n let segmentValue = parsed;\n if (segmentValue > max) {\n segmentValue = parseDigits(digit) ?? segmentValue;\n }\n const width = maxSegmentLength(type);\n const shouldFocusNext = Number(`${segmentValue}0`) > max || newEntered.length >= width || String(segmentValue).length >= width;\n const displayValue = shouldFocusNext ? padPart(type, segmentValue) : String(segmentValue);\n const nextSegments = updateSegment(segments, type, {\n value: displayValue,\n isPlaceholder: false\n });\n return {\n segments: nextSegments,\n enteredKeys: shouldFocusNext ? \"\" : newEntered,\n focusNext: shouldFocusNext\n };\n}\nexport function getEditablePartTypes(segments) {\n return segments.filter(segment => segment.editable).map(segment => segment.type);\n}\nexport function focusPartAfter(segments, type, direction) {\n const parts = getEditablePartTypes(segments);\n const index = parts.indexOf(type);\n if (index < 0) {\n return parts[0] ?? null;\n }\n const nextIndex = index + direction;\n if (nextIndex < 0 || nextIndex >= parts.length) {\n return null;\n }\n return parts[nextIndex] ?? null;\n}\nexport function firstEmptyOrFirstPart(segments) {\n let first = null;\n for (const segment of segments) {\n if (!segment.editable) {\n continue;\n }\n const type = segment.type;\n if (!first) {\n first = type;\n }\n if (segment.isPlaceholder || segment.value === \"\") {\n return type;\n }\n }\n return first;\n}\nexport function applyBackspaceToSegment(segments, part) {\n const segment = segments.find(entry => entry.editable && entry.type === part);\n if (!segment) {\n return {\n kind: \"focus-previous\"\n };\n }\n if (segment.isPlaceholder || segment.value === \"\") {\n return {\n kind: \"focus-previous\"\n };\n }\n const digits = segment.value.replace(/\\D/g, \"\");\n if (digits.length <= 1) {\n return {\n kind: \"updated\",\n segments: clearSegmentValue(segments, part),\n enteredKeys: \"\"\n };\n }\n const next = digits.slice(0, -1);\n return {\n kind: \"updated\",\n segments: segments.map(entry => entry.editable && entry.type === part ? {\n ...entry,\n value: next,\n isPlaceholder: false\n } : entry),\n enteredKeys: next\n };\n}", "export function resolveLocale(locale) {\n if (!locale) {\n return void 0;\n }\n const tags = locale.split(\",\").map(tag => tag.trim()).filter(Boolean);\n return tags.length > 1 ? tags : tags[0];\n}", "const CSS_SAFE_ID = /^[A-Za-z][A-Za-z0-9_-]*$/;\nexport function isCssSafeId(value) {\n return CSS_SAFE_ID.test(value);\n}\nfunction cssSafePrefix(prefix) {\n const trimmed = prefix.trim();\n if (isCssSafeId(trimmed)) {\n return trimmed;\n }\n const prefixed = `rui-${trimmed}`;\n if (trimmed && isCssSafeId(prefixed)) {\n return prefixed;\n }\n return \"rui\";\n}\nexport function uniqueId(prefix) {\n const token = typeof crypto.randomUUID === \"function\" ? crypto.randomUUID().replace(/-/g, \"\") : Array.from(crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, \"0\")).join(\"\");\n return `${cssSafePrefix(prefix)}-${token}`;\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}", "import { cx } from \"@/lib/cx\";\nimport { getSegmentBounds, segmentAriaName, segmentDisplayText, segmentNumericValue } from \"@/lib/intl-date\";\nexport function getSegmentDomProps(segment, context) {\n const type = segment.type;\n const numeric = segmentNumericValue(segment);\n const spinbutton = !context.useTextboxRole;\n const ariaRole = spinbutton ? \"spinbutton\" : \"textbox\";\n const editable = !context.disabled && !context.readOnly;\n const bounds = getSegmentBounds(type, context.segments);\n return {\n ariaLabel: segmentAriaName(type, context.locale),\n ariaReadonly: context.readOnly || void 0,\n ariaRole,\n ariaValuemax: spinbutton ? bounds.max : void 0,\n ariaValuemin: spinbutton ? bounds.min : void 0,\n ariaValuenow: spinbutton && numeric != null ? numeric : void 0,\n ariaValuetext: spinbutton ? segmentDisplayText(segment) : void 0,\n className: cx(\"rui-date-input__segment\", segment.isPlaceholder && \"rui-date-input__segment--placeholder\"),\n dataRuiFocusManaged: true,\n contenteditable: editable ? \"true\" : void 0,\n inputmode: editable ? \"numeric\" : void 0,\n suppresscontenteditablewarning: editable ? \"true\" : void 0,\n tabindex: context.disabled ? void 0 : 0\n };\n}", "import { jsx } from \"@ecopages/jsx/jsx-runtime\";\nimport \"./date-input.script\";\nexport function RuiDateInput(props) {\n return /* @__PURE__ */jsx(\"rui-date-input\", {\n \"data-rui-control\": true,\n \"data-rui-control-type\": \"date\",\n \"data-rui-aria-target\": '[data-ref=\"root\"]',\n ...props\n });\n}"],
|
|
5
|
-
"mappings": "AAMA,OAAS,OAAAA,MAAW,4BACpB,OAAS,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,EAAS,aAAAC,GAAW,QAAAC,EAAM,kCAAAC,GAAgC,SAAAC,OAAa,oBACtG,OAAS,yBAAAC,OAA6B,4CCR/B,SAASC,EAAUC,EAAK,CAC7B,GAAIA,GAAO,KACT,OAAO,KAET,IAAMC,EAAQ,4BAA4B,KAAKD,EAAI,KAAK,CAAC,EACzD,GAAI,CAACC,EACH,OAAO,KAET,IAAMC,EAAO,OAAOD,EAAM,CAAC,CAAC,EACtBE,EAAQ,OAAOF,EAAM,CAAC,CAAC,EAAI,EAC3BG,EAAM,OAAOH,EAAM,CAAC,CAAC,EACrBI,EAAO,IAAI,KAAKH,EAAMC,EAAOC,CAAG,EACtC,OAAIC,EAAK,YAAY,IAAMH,GAAQG,EAAK,SAAS,IAAMF,GAASE,EAAK,QAAQ,IAAMD,EAC1E,KAEFC,CACT,CACO,SAASC,EAAUD,EAAM,CAC9B,IAAMH,EAAOG,EAAK,YAAY,EACxBF,EAAQ,OAAOE,EAAK,SAAS,EAAI,CAAC,EAAE,SAAS,EAAG,GAAG,EACnDD,EAAM,OAAOC,EA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AI,gBACrB,+BAAgCA,EAAI,+BACpC,WAAY,QACZ,UAAWA,EAAI,UACf,SAAUA,EAAI,SACd,SAAUE,EAAmBtB,CAAO,CACtC,EAAGL,CAAI,CACT,CACA,QAAS,CACP,OAAsBuB,EAAI,MAAO,CAC/B,MAAO,iBACP,WAAY,OACZ,KAAM,QACN,SAAyBA,EAAI,MAAO,CAClC,MAAO,2BACP,SAAU,KAAK,gBAAgB,IAAI,CAAClB,EAASiB,IAAU,KAAK,cAAcjB,EAASiB,CAAK,CAAC,CAC3F,CAAC,CACH,CAAC,CACH,CACA,MAAO,CACLjG,GAAW,CACb,CACF,ESlaA,OAAS,OAAAuG,OAAW,4BAEb,SAASC,GAAaC,EAAO,CAClC,OAAsBC,GAAI,iBAAkB,CAC1C,mBAAoB,GACpB,wBAAyB,OACzB,uBAAwB,oBACxB,GAAGD,CACL,CAAC,CACH",
|
|
6
|
-
"names": ["jsx", "customElement", "event", "onEvent", "onUpdated", "prop", "registerSsrPreparationCallback", "state", "FormAssociatedElement", "isoToDate", "iso", "match", "year", "month", "day", "date", "dateToIso", "isIsoInRange", "min", "max", "formatterCache", "cacheKey", "locale", "options", "getDateTimeFormat", "key", "cached", "formatter", "PLACEHOLDER_DATE", "granularityIncludes", "granularity", "part", "placeholderForPart", "type", "locale", "getDateTimeFormat", "entry", "formatPartValue", "date", "options", "buildDateSegments", "reference", "hasValue", "segment", "parseSegmentNumber", "parsed", "normalizeYear", "value", "segmentsToDate", "segments", "values", "numeric", "allSegmentsEmpty", "draftStatus", "range", "year", "iso", "dateToIso", "isIsoInRange", "maxSegmentLength", "type", "segmentIndex", "segments", "type", "segment", "cloneSegments", "updateSegment", "patch", "next", "index", "parseDigits", "raw", "parsed", "getSegmentBounds", "maxForPart", "year", "readPartNumber", "month", "entry", "padPart", "value", "segmentAriaName", "locale", "name", "segmentDisplayText", "segmentNumericValue", "clearSegmentValue", "setSegmentNumeric", "incrementSegmentValue", "delta", "min", "max", "applyDigitToSegment", "key", "enteredKeys", "digit", "newEntered", "segmentValue", "width", "maxSegmentLength", "shouldFocusNext", "displayValue", "getEditablePartTypes", "focusPartAfter", "direction", "parts", "nextIndex", "firstEmptyOrFirstPart", "first", "applyBackspaceToSegment", "part", "digits", "resolveLocale", "locale", "tags", "tag", "CSS_SAFE_ID", "isCssSafeId", "value", "cssSafePrefix", "prefix", "trimmed", "prefixed", "uniqueId", "token", "byte", "cx", "parts", "getSegmentDomProps", "segment", "context", "type", "numeric", "segmentNumericValue", "spinbutton", "ariaRole", "editable", "bounds", "getSegmentBounds", "segmentAriaName", "segmentDisplayText", "cx", "_initProto", "_initClass", "_init_value", "_init_extra_value", "_init_min", "_init_extra_min", "_init_max", "_init_extra_max", "_init_readOnly", "_init_extra_readOnly", "_init_label", "_init_extra_label", "_init_locale", "_init_extra_locale", "_init_changeEvent", "_init_extra_changeEvent", "_init_segments", "_init_extra_segments", "_init_focusedPart", "_init_extra_focusedPart", "_applyDecs", "e", "t", "n", "r", "o", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "i", "b", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "isIosDevice", "_RuiDateInput", "RuiDateInput", "FormAssociatedElement", "customElement", "prop", "event", "state", "onUpdated", "onEvent", "uniqueId", "resolveLocale", "buildDateSegments", "isoToDate", "registerSsrPreparationCallback", "type", "part", "trigger", "previous", "changed", "segment", "status", "draftStatus", "iso", "target", "key", "result", "applyDigitToSegment", "focusPartAfter", "applyBackspaceToSegment", "delta", "incrementSegmentValue", "state2", "root", "ariaLabel", "event2", "firstEmptyOrFirstPart", "index", "jsx", "focused", "dom", "getSegmentDomProps", "segmentDisplayText", "jsx", "RuiDateInput", "props", "jsx"]
|
|
4
|
+
"sourcesContent": ["let _initProto, _initClass, _init_value, _init_extra_value, _init_min, _init_extra_min, _init_max, _init_extra_max, _init_readOnly, _init_extra_readOnly, _init_label, _init_extra_label, _init_locale, _init_extra_locale, _init_changeEvent, _init_extra_changeEvent, _init_segments, _init_extra_segments, _init_focusedPart, _init_extra_focusedPart;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { jsx } from \"@ecopages/jsx/jsx-runtime\";\nimport { customElement, event, onEvent, onUpdated, prop, registerSsrPreparationCallback, state } from \"@ecopages/radiant\";\nimport { FormAssociatedElement } from \"@ecopages/radiant/form-associated-element\";\nimport { applyBackspaceToSegment, applyDigitToSegment, buildDateSegments, draftStatus, firstEmptyOrFirstPart, focusPartAfter, incrementSegmentValue, isoToDate, segmentDisplayText } from \"@/lib/intl-date\";\nimport { resolveLocale } from \"@/lib/intl/locale\";\nimport { uniqueId } from \"@/lib/unique-id\";\nimport { getSegmentDomProps } from \"./date-input-segment-dom\";\nfunction isIosDevice() {\n if (typeof navigator === \"undefined\") {\n return false;\n }\n return /iPad|iPhone|iPod/.test(navigator.userAgent);\n}\nlet _RuiDateInput;\nclass RuiDateInput extends FormAssociatedElement {\n static {\n ({\n e: [_init_value, _init_extra_value, _init_min, _init_extra_min, _init_max, _init_extra_max, _init_readOnly, _init_extra_readOnly, _init_label, _init_extra_label, _init_locale, _init_extra_locale, _init_changeEvent, _init_extra_changeEvent, _init_segments, _init_extra_segments, _init_focusedPart, _init_extra_focusedPart, _initProto],\n c: [_RuiDateInput, _initClass]\n } = _applyDecs(this, [customElement(\"rui-date-input\")], [[prop({\n type: String,\n reflect: true,\n defaultValue: \"\"\n }), 0, \"value\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"min\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"max\"], [prop({\n type: Boolean,\n attribute: \"read-only\",\n reflect: true,\n defaultValue: false\n }), 0, \"readOnly\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"label\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"locale\"], [event({\n name: \"rui-change\",\n bubbles: true,\n composed: true\n }), 0, \"changeEvent\"], [state, 0, \"segments\"], [state, 0, \"focusedPart\"], [onUpdated([\"value\", \"locale\"]), 2, \"syncSegmentsFromValue\"], [onUpdated(\"label\"), 2, \"syncGroupLabel\"], [onEvent({\n selector: '[data-ref=\"root\"]',\n type: \"focusin\"\n }), 2, \"onGroupFocusIn\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"focusin\"\n }), 2, \"onSegmentFocusIn\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"focusout\"\n }), 2, \"onSegmentFocusOut\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"keydown\"\n }), 2, \"onSegmentKeyDown\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"beforeinput\"\n }), 2, \"onSegmentBeforeInput\"], [onEvent({\n selector: \"[data-date-segment]\",\n type: \"pointerdown\"\n }), 2, \"onSegmentPointerDown\"]], 0, void 0, FormAssociatedElement));\n }\n value = (_initProto(this), _init_value(this));\n min = (_init_extra_value(this), _init_min(this));\n max = (_init_extra_min(this), _init_max(this));\n readOnly = (_init_extra_max(this), _init_readOnly(this));\n label = (_init_extra_readOnly(this), _init_label(this));\n locale = (_init_extra_label(this), _init_locale(this));\n changeEvent = (_init_extra_locale(this), _init_changeEvent(this));\n segments = (_init_extra_changeEvent(this), _init_segments(this, []));\n focusedPart = (_init_extra_segments(this), _init_focusedPart(this, null));\n uid = (_init_extra_focusedPart(this), uniqueId(\"rui-date-input\"));\n /** Digits typed into `focusedPart` that have not completed the unit yet. */\n buffer = \"\";\n useTextboxRole = isIosDevice();\n /**\n * Part `updated()` still has to move DOM focus to.\n *\n * @remarks The render commit can restore focus to the old segment first; that\n * `focusin` is ignored so it does not take editing back.\n */\n pendingFocus = null;\n get resolvedLocale() {\n return resolveLocale(this.locale);\n }\n get isoValue() {\n return this.value ?? \"\";\n }\n syncSegmentsFromValue() {\n this.segments = buildDateSegments(isoToDate(this.isoValue), this.resolvedLocale);\n this.buffer = \"\";\n }\n /**\n * @remarks SSR preparation and the connect-time `@onUpdated` both fill `segments`\n * before the first render; this derives from `value` only for a render before either.\n */\n get displaySegments() {\n if (this.segments.length > 0) {\n return this.segments;\n }\n return buildDateSegments(isoToDate(this.isoValue), this.resolvedLocale);\n }\n constructor() {\n super();\n registerSsrPreparationCallback(this, () => this.syncSegmentsFromValue());\n }\n getSegmentElement(type) {\n return this.querySelector(`[data-date-segment][data-type=\"${type}\"]`);\n }\n /**\n * Moves editing to `part` and commits the draft once, as `trigger`.\n *\n * @remarks A `leave` commits nothing when no part was focused, so first focus never\n * publishes. A `blur` always commits: an edge arrow or a completed last unit clears\n * `focusedPart` while focus stays inside, and that draft still gets the Blur column.\n */\n setFocusedPart(part, trigger = \"leave\") {\n const previous = this.focusedPart;\n if (part === previous && trigger === \"leave\") {\n return;\n }\n this.buffer = \"\";\n if (previous != null || trigger === \"blur\") {\n this.commit(trigger);\n }\n this.focusedPart = part;\n }\n focusPart(type) {\n this.setFocusedPart(type);\n this.pendingFocus = type;\n }\n /**\n * Moves focus and the caret to `focusedPart` after a cycle that changed it or rebuilt `segments`.\n *\n * @remarks Skipped once focus has left the control, so a rebuild in the turn focus\n * moved elsewhere (before the blur commit clears `focusedPart`) cannot pull it back.\n */\n updated(changed) {\n super.updated(changed);\n this.pendingFocus = null;\n const part = this.focusedPart;\n if (!part || !(changed.has(\"focusedPart\") || changed.has(\"segments\")) || !this.matches(\":focus-within\")) {\n return;\n }\n const segment = this.getSegmentElement(part);\n if (!segment) {\n return;\n }\n if (document.activeElement !== segment) {\n segment.focus();\n }\n if (document.activeElement === segment) {\n window.getSelection()?.collapse(segment, 0);\n }\n }\n /**\n * Publishes, keeps, or restores the draft after `trigger`, per the commit table in `README.md`.\n *\n * @remarks An in-progress buffer only holds back an `edit`; leaving the part clears it first.\n */\n commit(trigger) {\n if (trigger === \"edit\" && this.buffer) {\n return;\n }\n const status = draftStatus(this.segments, {\n min: this.min,\n max: this.max\n });\n switch (status.kind) {\n case \"partial-year\":\n if (trigger !== \"edit\") {\n this.syncSegmentsFromValue();\n }\n return;\n case \"incomplete\":\n if (trigger === \"blur\") {\n this.syncSegmentsFromValue();\n }\n return;\n case \"out-of-range\":\n this.syncSegmentsFromValue();\n return;\n case \"empty\":\n this.publish(\"\");\n return;\n case \"date\":\n this.publish(status.iso);\n }\n }\n /**\n * @remarks A changed `value` rebuilds `segments` through its `@onUpdated` in the next\n * update cycle, so `segments` still holds the draft until then. An unchanged value\n * rebuilds now so the display normalizes (`1` becomes `01`).\n */\n publish(iso) {\n if (iso === this.isoValue) {\n this.syncSegmentsFromValue();\n return;\n }\n this.value = iso;\n this.changeEvent.emit({\n value: iso\n });\n }\n partFromTarget(target) {\n if (!(target instanceof HTMLElement)) {\n return null;\n }\n const segment = target.closest(\"[data-date-segment]\");\n const type = segment?.getAttribute(\"data-type\");\n if (type === \"month\" || type === \"day\" || type === \"year\") {\n return type;\n }\n return null;\n }\n /** @remarks A completed unit commits once, as the `leave` of the focus move it triggers. */\n handleDigit(part, key) {\n this.setFocusedPart(part);\n const result = applyDigitToSegment(this.segments, part, key, this.buffer);\n this.segments = result.segments;\n this.buffer = result.enteredKeys;\n if (result.focusNext) {\n this.focusPart(focusPartAfter(this.segments, part, 1));\n return;\n }\n this.commit(\"edit\");\n }\n handleBackspace(part) {\n this.setFocusedPart(part);\n const result = applyBackspaceToSegment(this.segments, part);\n if (result.kind === \"focus-previous\") {\n this.focusPart(focusPartAfter(this.segments, part, -1));\n return;\n }\n this.segments = result.segments;\n this.buffer = result.enteredKeys;\n this.commit(\"edit\");\n }\n handleIncrement(part, delta) {\n this.setFocusedPart(part);\n this.buffer = \"\";\n this.segments = incrementSegmentValue(this.segments, part, delta);\n this.commit(\"edit\");\n }\n onConnected() {\n this.syncSegmentsFromValue();\n this.syncGroupLabel();\n }\n formValue() {\n return this.name ? this.isoValue : null;\n }\n /** @remarks The reset value must survive a name assigned after first connect. */\n formState() {\n return this.value;\n }\n restoreFormState(state2) {\n this.value = typeof state2 === \"string\" ? state2 : \"\";\n this.syncSegmentsFromValue();\n }\n formResetCallback() {\n super.formResetCallback();\n this.dispatchEvent(new Event(\"rui-form-reset\", {\n bubbles: true\n }));\n }\n syncGroupLabel() {\n const root = this.querySelector('[data-ref=\"root\"]');\n if (!root) {\n return;\n }\n if (!root.id) {\n root.id = `${this.uid}-group`;\n }\n const ariaLabel = this.label || this.getAttribute(\"aria-label\") || \"\";\n if (ariaLabel) {\n root.setAttribute(\"aria-label\", ariaLabel);\n } else {\n root.removeAttribute(\"aria-label\");\n }\n }\n onGroupFocusIn(event2) {\n if (this.partFromTarget(event2.target)) {\n return;\n }\n this.focusPart(firstEmptyOrFirstPart(this.segments));\n }\n onSegmentFocusIn(event2) {\n const part = this.partFromTarget(event2.target);\n if (!part) {\n return;\n }\n if (this.pendingFocus && this.pendingFocus !== part) {\n return;\n }\n this.setFocusedPart(part);\n }\n onSegmentFocusOut() {\n queueMicrotask(() => {\n if (this.matches(\":focus-within\")) {\n return;\n }\n this.setFocusedPart(null, \"blur\");\n });\n }\n onSegmentKeyDown(event2) {\n const part = this.partFromTarget(event2.target);\n if (!part || this.effectiveDisabled || this.readOnly) {\n return;\n }\n if (event2.key === \"ArrowLeft\") {\n event2.preventDefault();\n this.focusPart(focusPartAfter(this.segments, part, -1));\n return;\n }\n if (event2.key === \"ArrowRight\") {\n event2.preventDefault();\n this.focusPart(focusPartAfter(this.segments, part, 1));\n return;\n }\n if (event2.key === \"ArrowUp\") {\n event2.preventDefault();\n this.handleIncrement(part, 1);\n return;\n }\n if (event2.key === \"ArrowDown\") {\n event2.preventDefault();\n this.handleIncrement(part, -1);\n return;\n }\n if (event2.key === \"Backspace\" || event2.key === \"Delete\") {\n event2.preventDefault();\n event2.stopPropagation();\n this.handleBackspace(part);\n }\n }\n onSegmentBeforeInput(event2) {\n const part = this.partFromTarget(event2.target);\n if (!part || this.effectiveDisabled || this.readOnly) {\n return;\n }\n event2.preventDefault();\n switch (event2.inputType) {\n case \"deleteContentBackward\":\n case \"deleteContentForward\":\n this.handleBackspace(part);\n break;\n default:\n if (event2.data != null) {\n this.handleDigit(part, event2.data);\n }\n break;\n }\n }\n onSegmentPointerDown(event2) {\n event2.stopPropagation();\n }\n renderSegment(segment, index) {\n if (!segment.editable) {\n return /* @__PURE__ */jsx(\"span\", {\n class: \"rui-date-input__literal\",\n \"data-type\": \"literal\",\n \"aria-hidden\": \"true\",\n children: segment.value\n }, `literal-${index}`);\n }\n const type = segment.type;\n const focused = this.focusedPart === type;\n const dom = getSegmentDomProps(segment, {\n disabled: this.effectiveDisabled,\n locale: this.resolvedLocale,\n readOnly: this.readOnly,\n segments: this.displaySegments,\n useTextboxRole: this.useTextboxRole\n });\n return /* @__PURE__ */jsx(\"span\", {\n class: dom.className,\n \"data-date-segment\": true,\n \"data-type\": type,\n \"data-placeholder\": segment.isPlaceholder ? \"true\" : void 0,\n \"data-focused\": focused ? \"true\" : void 0,\n role: dom.ariaRole,\n \"aria-label\": dom.ariaLabel,\n \"aria-valuemin\": dom.ariaValuemin,\n \"aria-valuemax\": dom.ariaValuemax,\n \"aria-valuenow\": dom.ariaValuenow,\n \"aria-valuetext\": dom.ariaValuetext,\n \"aria-readonly\": dom.ariaReadonly,\n \"data-rui-focus-managed\": dom.dataRuiFocusManaged,\n contenteditable: dom.contenteditable,\n suppresscontenteditablewarning: dom.suppresscontenteditablewarning,\n spellcheck: \"false\",\n inputmode: dom.inputmode,\n tabindex: dom.tabindex,\n children: segmentDisplayText(segment)\n }, type);\n }\n render() {\n return /* @__PURE__ */jsx(\"div\", {\n class: \"rui-date-input\",\n \"data-ref\": \"root\",\n role: \"group\",\n children: /* @__PURE__ */jsx(\"div\", {\n class: \"rui-date-input__segments\",\n children: this.displaySegments.map((segment, index) => this.renderSegment(segment, index))\n })\n });\n }\n static {\n _initClass();\n }\n}\nexport { _RuiDateInput as RuiDateInput };", "export function isoToDate(iso) {\n if (iso == null) {\n return null;\n }\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(iso.trim());\n if (!match) {\n return null;\n }\n const year = Number(match[1]);\n const month = Number(match[2]) - 1;\n const day = Number(match[3]);\n const date = new Date(year, month, day);\n if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) {\n return null;\n }\n return date;\n}\nexport function dateToIso(date) {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${year}-${month}-${day}`;\n}\nexport function isIsoInRange(iso, min, max) {\n if (min && iso < min) {\n return false;\n }\n if (max && iso > max) {\n return false;\n }\n return true;\n}", "const formatterCache = /* @__PURE__ */new Map();\nfunction cacheKey(locale, options) {\n return `${JSON.stringify(locale ?? null)}|${JSON.stringify(options)}`;\n}\nexport function getDateTimeFormat(locale, options) {\n const key = cacheKey(locale, options);\n const cached = formatterCache.get(key);\n if (cached) {\n return cached;\n }\n const formatter = new Intl.DateTimeFormat(locale, options);\n formatterCache.set(key, formatter);\n return formatter;\n}\nexport function formatDisplayDate(date, locale, style = \"medium\") {\n return getDateTimeFormat(locale, {\n dateStyle: style\n }).format(date);\n}\nexport function formatMonthYear(date, locale) {\n return getDateTimeFormat(locale, {\n month: \"long\",\n year: \"numeric\"\n }).format(date);\n}\nexport function getWeekdayLabels(locale, weekStartsOn) {\n const formatter = getDateTimeFormat(locale, {\n weekday: \"narrow\"\n });\n const labels = [];\n for (let offset = 0; offset < 7; offset += 1) {\n const dayIndex = (weekStartsOn + offset) % 7;\n const reference = new Date(2024, 0, dayIndex === 0 ? 7 : dayIndex);\n labels.push(formatter.format(reference));\n }\n return labels;\n}\nexport function formatDateRange(start, end, locale, style = \"medium\") {\n const formatter = getDateTimeFormat(locale, {\n dateStyle: style\n });\n if (typeof formatter.formatRange === \"function\") {\n return formatter.formatRange(start, end);\n }\n return `${formatter.format(start)} \\u2013 ${formatter.format(end)}`;\n}\nexport function formatTodayLabel(locale) {\n return new Intl.RelativeTimeFormat(locale, {\n numeric: \"auto\"\n }).format(0, \"day\");\n}", "import { getDateTimeFormat } from \"./formatters\";\nimport { dateToIso, isIsoInRange } from \"./iso\";\nconst PLACEHOLDER_DATE = new Date(2e3, 0, 1);\nfunction granularityIncludes(granularity, part) {\n if (granularity === \"year\") {\n return part === \"year\";\n }\n if (granularity === \"month\") {\n return part === \"year\" || part === \"month\";\n }\n return true;\n}\nfunction placeholderForPart(type, locale) {\n const sample = getDateTimeFormat(locale, {\n [type]: type === \"year\" ? \"numeric\" : \"2-digit\"\n }).formatToParts(PLACEHOLDER_DATE);\n const part = sample.find(entry => entry.type === type);\n if (!part) {\n return type === \"year\" ? \"yyyy\" : \"mm\";\n }\n return part.value.replace(/\\d/g, type === \"year\" ? \"y\" : type === \"month\" ? \"m\" : \"d\");\n}\nfunction formatPartValue(type, date, locale) {\n const options = type === \"year\" ? {\n year: \"numeric\"\n } : {\n [type]: \"2-digit\"\n };\n return getDateTimeFormat(locale, options).formatToParts(date).find(part => part.type === type)?.value ?? \"\";\n}\nexport function buildDateSegments(date, locale, options = {}) {\n const granularity = options.granularity ?? \"day\";\n const reference = date ?? options.placeholderDate ?? /* @__PURE__ */new Date();\n const parts = getDateTimeFormat(locale, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\"\n }).formatToParts(reference);\n return parts.filter(part => part.type !== \"era\").map(part => {\n if (part.type === \"literal\") {\n return {\n type: \"literal\",\n value: part.value,\n placeholder: part.value,\n isPlaceholder: false,\n editable: false\n };\n }\n const type = part.type;\n if (!granularityIncludes(granularity, type)) {\n return null;\n }\n const hasValue = date != null;\n return {\n type,\n value: hasValue ? formatPartValue(type, date, locale) : \"\",\n placeholder: placeholderForPart(type, locale),\n isPlaceholder: !hasValue,\n editable: true\n };\n }).filter(segment => segment != null);\n}\nfunction parseSegmentNumber(segment) {\n if (segment.isPlaceholder || segment.value === \"\") {\n return null;\n }\n const parsed = Number(segment.value);\n return Number.isFinite(parsed) ? parsed : null;\n}\nfunction normalizeYear(value) {\n if (value >= 100) {\n return value;\n }\n return value >= 69 ? 1900 + value : 2e3 + value;\n}\nexport function segmentsToDate(segments) {\n const values = {};\n for (const segment of segments) {\n if (!segment.editable) {\n continue;\n }\n const numeric = parseSegmentNumber(segment);\n if (numeric == null) {\n return null;\n }\n values[segment.type] = segment.type === \"year\" ? normalizeYear(numeric) : numeric;\n }\n if (values.year == null || values.month == null || values.day == null) {\n return null;\n }\n const date = new Date(values.year, values.month - 1, values.day);\n if (date.getFullYear() !== values.year || date.getMonth() !== values.month - 1 || date.getDate() !== values.day) {\n return null;\n }\n return date;\n}\nexport function allSegmentsEmpty(segments) {\n return segments.every(segment => !segment.editable || segment.isPlaceholder || segment.value === \"\");\n}\nexport function draftStatus(segments, range = {}) {\n const year = segments.find(segment => segment.editable && segment.type === \"year\");\n if (year && !year.isPlaceholder && year.value !== \"\" && year.value.replace(/\\D/g, \"\").length < 4) {\n return {\n kind: \"partial-year\"\n };\n }\n if (allSegmentsEmpty(segments)) {\n return {\n kind: \"empty\"\n };\n }\n const date = segmentsToDate(segments);\n if (!date) {\n return {\n kind: \"incomplete\"\n };\n }\n const iso = dateToIso(date);\n if (!isIsoInRange(iso, range.min, range.max)) {\n return {\n kind: \"out-of-range\"\n };\n }\n return {\n kind: \"date\",\n iso\n };\n}\nexport function getEditableSegmentIndices(segments) {\n return segments.map((segment, index) => segment.editable ? index : -1).filter(index => index >= 0);\n}\nexport function maxSegmentLength(type) {\n if (type === \"year\") {\n return 4;\n }\n return 2;\n}\nexport function clampSegmentValue(type, raw) {\n const digits = raw.replace(/\\D/g, \"\");\n return digits.slice(0, maxSegmentLength(type));\n}\nexport function incrementSegment(type, value, delta) {\n const numeric = Number(value || \"0\") + delta;\n if (type === \"month\") {\n const wrapped = (numeric - 1 + 12) % 12 + 1;\n return String(wrapped).padStart(2, \"0\");\n }\n if (type === \"day\") {\n const wrapped = (numeric - 1 + 31) % 31 + 1;\n return String(wrapped).padStart(2, \"0\");\n }\n const next = Math.max(1, numeric);\n return String(next).padStart(4, \"0\").slice(-4);\n}", "import { maxSegmentLength } from \"./segments\";\nfunction segmentIndex(segments, type) {\n return segments.findIndex(segment => segment.editable && segment.type === type);\n}\nfunction cloneSegments(segments) {\n return segments.map(segment => ({\n ...segment\n }));\n}\nfunction updateSegment(segments, type, patch) {\n const next = cloneSegments(segments);\n const index = segmentIndex(next, type);\n if (index < 0) {\n return next;\n }\n next[index] = {\n ...next[index],\n ...patch\n };\n return next;\n}\nfunction parseDigits(raw) {\n if (raw === \"\") {\n return null;\n }\n const parsed = Number(raw);\n return Number.isFinite(parsed) ? parsed : null;\n}\nexport function getSegmentBounds(type, segments) {\n return {\n min: 1,\n max: maxForPart(type, segments)\n };\n}\nfunction maxForPart(type, segments) {\n if (type === \"month\") {\n return 12;\n }\n if (type === \"day\") {\n const year = readPartNumber(segments, \"year\");\n const month = readPartNumber(segments, \"month\");\n if (year != null && month != null) {\n return new Date(year, month, 0).getDate();\n }\n return 31;\n }\n return 9999;\n}\nfunction readPartNumber(segments, type) {\n const segment = segments.find(entry => entry.editable && entry.type === type);\n if (!segment || segment.isPlaceholder || segment.value === \"\") {\n return null;\n }\n return Number(segment.value);\n}\nfunction padPart(type, value) {\n if (type === \"year\") {\n return String(value).padStart(4, \"0\");\n }\n return String(value).padStart(2, \"0\");\n}\nexport function segmentAriaName(type, locale) {\n try {\n const display = new Intl.DisplayNames(locale, {\n type: \"dateTimeField\"\n });\n const name = display.of(type);\n if (name) {\n return name;\n }\n } catch {}\n if (type === \"month\") {\n return \"Month\";\n }\n if (type === \"day\") {\n return \"Day\";\n }\n return \"Year\";\n}\nexport function segmentDisplayText(segment) {\n return segment.isPlaceholder || segment.value === \"\" ? segment.placeholder : segment.value;\n}\nexport function segmentNumericValue(segment) {\n if (segment.isPlaceholder || segment.value === \"\") {\n return null;\n }\n return parseDigits(segment.value.replace(/\\D/g, \"\"));\n}\nexport function clearSegmentValue(segments, type) {\n return updateSegment(segments, type, {\n value: \"\",\n isPlaceholder: true\n });\n}\nexport function setSegmentNumeric(segments, type, value) {\n return updateSegment(segments, type, {\n value: padPart(type, value),\n isPlaceholder: false\n });\n}\nexport function incrementSegmentValue(segments, type, delta) {\n const segment = segments.find(entry => entry.editable && entry.type === type);\n if (!segment) {\n return segments;\n }\n const {\n min,\n max\n } = getSegmentBounds(type, segments);\n const current = segmentNumericValue(segment) ?? (delta > 0 ? min - 1 : max + 1);\n let next = current + delta;\n if (type === \"month\" || type === \"day\") {\n if (next < min) {\n next = max;\n } else if (next > max) {\n next = min;\n }\n } else {\n next = Math.max(min, next);\n }\n return setSegmentNumeric(segments, type, next);\n}\nexport function applyDigitToSegment(segments, type, key, enteredKeys) {\n const digit = key.replace(/\\D/g, \"\");\n if (!digit) {\n return {\n segments,\n enteredKeys,\n focusNext: false\n };\n }\n const newEntered = enteredKeys + digit;\n const parsed = parseDigits(newEntered);\n if (parsed == null) {\n return {\n segments,\n enteredKeys,\n focusNext: false\n };\n }\n const max = maxForPart(type, segments);\n let segmentValue = parsed;\n if (segmentValue > max) {\n segmentValue = parseDigits(digit) ?? segmentValue;\n }\n const width = maxSegmentLength(type);\n const shouldFocusNext = Number(`${segmentValue}0`) > max || newEntered.length >= width || String(segmentValue).length >= width;\n const displayValue = shouldFocusNext ? padPart(type, segmentValue) : String(segmentValue);\n const nextSegments = updateSegment(segments, type, {\n value: displayValue,\n isPlaceholder: false\n });\n return {\n segments: nextSegments,\n enteredKeys: shouldFocusNext ? \"\" : newEntered,\n focusNext: shouldFocusNext\n };\n}\nexport function getEditablePartTypes(segments) {\n return segments.filter(segment => segment.editable).map(segment => segment.type);\n}\nexport function focusPartAfter(segments, type, direction) {\n const parts = getEditablePartTypes(segments);\n const index = parts.indexOf(type);\n if (index < 0) {\n return parts[0] ?? null;\n }\n const nextIndex = index + direction;\n if (nextIndex < 0 || nextIndex >= parts.length) {\n return null;\n }\n return parts[nextIndex] ?? null;\n}\nexport function firstEmptyOrFirstPart(segments) {\n let first = null;\n for (const segment of segments) {\n if (!segment.editable) {\n continue;\n }\n const type = segment.type;\n if (!first) {\n first = type;\n }\n if (segment.isPlaceholder || segment.value === \"\") {\n return type;\n }\n }\n return first;\n}\nexport function applyBackspaceToSegment(segments, part) {\n const segment = segments.find(entry => entry.editable && entry.type === part);\n if (!segment) {\n return {\n kind: \"focus-previous\"\n };\n }\n if (segment.isPlaceholder || segment.value === \"\") {\n return {\n kind: \"focus-previous\"\n };\n }\n const digits = segment.value.replace(/\\D/g, \"\");\n if (digits.length <= 1) {\n return {\n kind: \"updated\",\n segments: clearSegmentValue(segments, part),\n enteredKeys: \"\"\n };\n }\n const next = digits.slice(0, -1);\n return {\n kind: \"updated\",\n segments: segments.map(entry => entry.editable && entry.type === part ? {\n ...entry,\n value: next,\n isPlaceholder: false\n } : entry),\n enteredKeys: next\n };\n}", "export function resolveLocale(locale) {\n if (!locale) {\n return void 0;\n }\n const tags = locale.split(\",\").map(tag => tag.trim()).filter(Boolean);\n return tags.length > 1 ? tags : tags[0];\n}", "const CSS_SAFE_ID = /^[A-Za-z][A-Za-z0-9_-]*$/;\nexport function isCssSafeId(value) {\n return CSS_SAFE_ID.test(value);\n}\nfunction cssSafePrefix(prefix) {\n const trimmed = prefix.trim();\n if (isCssSafeId(trimmed)) {\n return trimmed;\n }\n const prefixed = `rui-${trimmed}`;\n if (trimmed && isCssSafeId(prefixed)) {\n return prefixed;\n }\n return \"rui\";\n}\nexport function uniqueId(prefix) {\n const token = typeof crypto.randomUUID === \"function\" ? crypto.randomUUID().replace(/-/g, \"\") : Array.from(crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, \"0\")).join(\"\");\n return `${cssSafePrefix(prefix)}-${token}`;\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}", "import { cx } from \"@/lib/cx\";\nimport { getSegmentBounds, segmentAriaName, segmentDisplayText, segmentNumericValue } from \"@/lib/intl-date\";\nexport function getSegmentDomProps(segment, context) {\n const type = segment.type;\n const numeric = segmentNumericValue(segment);\n const spinbutton = !context.useTextboxRole;\n const ariaRole = spinbutton ? \"spinbutton\" : \"textbox\";\n const editable = !context.disabled && !context.readOnly;\n const bounds = getSegmentBounds(type, context.segments);\n return {\n ariaLabel: segmentAriaName(type, context.locale),\n ariaReadonly: context.readOnly || void 0,\n ariaRole,\n ariaValuemax: spinbutton ? bounds.max : void 0,\n ariaValuemin: spinbutton ? bounds.min : void 0,\n ariaValuenow: spinbutton && numeric != null ? numeric : void 0,\n ariaValuetext: spinbutton ? segmentDisplayText(segment) : void 0,\n className: cx(\"rui-date-input__segment\", segment.isPlaceholder && \"rui-date-input__segment--placeholder\"),\n dataRuiFocusManaged: true,\n contenteditable: editable ? \"true\" : void 0,\n inputmode: editable ? \"numeric\" : void 0,\n suppresscontenteditablewarning: editable ? \"true\" : void 0,\n tabindex: context.disabled ? void 0 : 0\n };\n}", "import { jsx } from \"@ecopages/jsx/jsx-runtime\";\nimport { RuiDateInput as RuiDateInputElement } from \"./date-input.script\";\nexport function RuiDateInput(props) {\n return /* @__PURE__ */jsx(RuiDateInputElement, {\n \"data-rui-control\": true,\n \"data-rui-control-type\": \"date\",\n \"data-rui-aria-target\": '[data-ref=\"root\"]',\n ...props\n });\n}"],
|
|
5
|
+
"mappings": "AAMA,OAAS,OAAAA,MAAW,4BACpB,OAAS,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,EAAS,aAAAC,GAAW,QAAAC,EAAM,kCAAAC,GAAgC,SAAAC,OAAa,oBACtG,OAAS,yBAAAC,OAA6B,4CCR/B,SAASC,EAAUC,EAAK,CAC7B,GAAIA,GAAO,KACT,OAAO,KAET,IAAMC,EAAQ,4BAA4B,KAAKD,E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U,KAAK,cAAgBxB,EAC/ByB,EAAMC,GAAmBrB,EAAS,CACtC,SAAU,KAAK,kBACf,OAAQ,KAAK,eACb,SAAU,KAAK,SACf,SAAU,KAAK,gBACf,eAAgB,KAAK,cACvB,CAAC,EACD,OAAsBkB,EAAI,OAAQ,CAChC,MAAOE,EAAI,UACX,oBAAqB,GACrB,YAAazB,EACb,mBAAoBK,EAAQ,cAAgB,OAAS,OACrD,eAAgBmB,EAAU,OAAS,OACnC,KAAMC,EAAI,SACV,aAAcA,EAAI,UAClB,gBAAiBA,EAAI,aACrB,gBAAiBA,EAAI,aACrB,gBAAiBA,EAAI,aACrB,iBAAkBA,EAAI,cACtB,gBAAiBA,EAAI,aACrB,yBAA0BA,EAAI,oBAC9B,gBAAiBA,EAAI,gBACrB,+BAAgCA,EAAI,+BACpC,WAAY,QACZ,UAAWA,EAAI,UACf,SAAUA,EAAI,SACd,SAAUE,EAAmBtB,CAAO,CACtC,EAAGL,CAAI,CACT,CACA,QAAS,CACP,OAAsBuB,EAAI,MAAO,CAC/B,MAAO,iBACP,WAAY,OACZ,KAAM,QACN,SAAyBA,EAAI,MAAO,CAClC,MAAO,2BACP,SAAU,KAAK,gBAAgB,IAAI,CAAClB,EAASiB,IAAU,KAAK,cAAcjB,EAASiB,CAAK,CAAC,CAC3F,CAAC,CACH,CAAC,CACH,CACA,MAAO,CACLjG,GAAW,CACb,CACF,ESlaA,OAAS,OAAAuG,OAAW,4BAEb,SAASC,GAAaC,EAAO,CAClC,OAAsBC,GAAIC,EAAqB,CAC7C,mBAAoB,GACpB,wBAAyB,OACzB,uBAAwB,oBACxB,GAAGF,CACL,CAAC,CACH",
|
|
6
|
+
"names": ["jsx", "customElement", "event", "onEvent", "onUpdated", "prop", "registerSsrPreparationCallback", "state", "FormAssociatedElement", "isoToDate", "iso", "match", "year", "month", "day", "date", "dateToIso", "isIsoInRange", "min", "max", "formatterCache", "cacheKey", "locale", "options", "getDateTimeFormat", "key", "cached", "formatter", "PLACEHOLDER_DATE", "granularityIncludes", "granularity", "part", "placeholderForPart", "type", "locale", "getDateTimeFormat", "entry", "formatPartValue", "date", "options", "buildDateSegments", "reference", "hasValue", "segment", "parseSegmentNumber", "parsed", "normalizeYear", "value", "segmentsToDate", "segments", "values", "numeric", "allSegmentsEmpty", "draftStatus", "range", "year", "iso", "dateToIso", "isIsoInRange", "maxSegmentLength", "type", "segmentIndex", "segments", "type", "segment", "cloneSegments", "updateSegment", "patch", "next", "index", "parseDigits", "raw", "parsed", "getSegmentBounds", "maxForPart", "year", "readPartNumber", "month", "entry", "padPart", "value", "segmentAriaName", "locale", "name", "segmentDisplayText", "segmentNumericValue", "clearSegmentValue", "setSegmentNumeric", "incrementSegmentValue", "delta", "min", "max", "applyDigitToSegment", "key", "enteredKeys", "digit", "newEntered", "segmentValue", "width", "maxSegmentLength", "shouldFocusNext", "displayValue", "getEditablePartTypes", "focusPartAfter", "direction", "parts", "nextIndex", "firstEmptyOrFirstPart", "first", "applyBackspaceToSegment", "part", "digits", "resolveLocale", "locale", "tags", "tag", "CSS_SAFE_ID", "isCssSafeId", "value", "cssSafePrefix", "prefix", "trimmed", "prefixed", "uniqueId", "token", "byte", "cx", "parts", "getSegmentDomProps", "segment", "context", "type", "numeric", "segmentNumericValue", "spinbutton", "ariaRole", "editable", "bounds", "getSegmentBounds", "segmentAriaName", "segmentDisplayText", "cx", "_initProto", "_initClass", "_init_value", "_init_extra_value", "_init_min", "_init_extra_min", "_init_max", "_init_extra_max", "_init_readOnly", "_init_extra_readOnly", "_init_label", "_init_extra_label", "_init_locale", "_init_extra_locale", "_init_changeEvent", "_init_extra_changeEvent", "_init_segments", "_init_extra_segments", "_init_focusedPart", "_init_extra_focusedPart", "_applyDecs", "e", "t", "n", "r", "o", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "i", "b", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "isIosDevice", "_RuiDateInput", "RuiDateInput", "FormAssociatedElement", "customElement", "prop", "event", "state", "onUpdated", "onEvent", "uniqueId", "resolveLocale", "buildDateSegments", "isoToDate", "registerSsrPreparationCallback", "type", "part", "trigger", "previous", "changed", "segment", "status", "draftStatus", "iso", "target", "key", "result", "applyDigitToSegment", "focusPartAfter", "applyBackspaceToSegment", "delta", "incrementSegmentValue", "state2", "root", "ariaLabel", "event2", "firstEmptyOrFirstPart", "index", "jsx", "focused", "dom", "getSegmentDomProps", "segmentDisplayText", "jsx", "RuiDateInput", "props", "jsx", "_RuiDateInput"]
|
|
7
7
|
}
|
|
@@ -2,9 +2,7 @@ import type { JsxCustomElementAttributes, JsxElementProps } from '@ecopages/jsx'
|
|
|
2
2
|
import type { NativeButtonProps } from '../../../lib/native-element-props';
|
|
3
3
|
import { type RuiCalendarElement, type RuiCalendarProps } from '../calendar';
|
|
4
4
|
import { type RuiDateInputElement, type RuiDateInputProps } from '../date-input';
|
|
5
|
-
import
|
|
6
|
-
import './date-range-picker.script';
|
|
7
|
-
import '../date-input/date-input.script';
|
|
5
|
+
import { RuiDateRangePicker as RuiDateRangePickerElement, type RuiDateRangePickerProps } from './date-range-picker.script';
|
|
8
6
|
import type { WithoutChildren } from '../../../lib/without-children';
|
|
9
7
|
export type RuiDateRangePickerControlProps = JsxElementProps<HTMLDivElement>;
|
|
10
8
|
/** Bordered control row containing the date inputs and calendar toggle. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX_PROPS } from '@ecopages/jsx';
|
|
1
2
|
import { RadiantElement } from '@ecopages/radiant';
|
|
2
3
|
import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter';
|
|
3
4
|
export type RuiDateRangePickerProps = {
|
|
@@ -63,6 +64,7 @@ export type RuiDateRangePickerChangeDetail = {
|
|
|
63
64
|
* @fires rui-change - Emitted when a valid range is committed, or when a committed range is cleared; detail carries `value`, `start`, and `end`.
|
|
64
65
|
*/
|
|
65
66
|
export declare class RuiDateRangePicker extends RadiantElement {
|
|
67
|
+
readonly [JSX_PROPS]?: RuiDateRangePickerProps;
|
|
66
68
|
value: string;
|
|
67
69
|
min: string;
|
|
68
70
|
max: string;
|
|
@@ -109,3 +111,8 @@ export declare class RuiDateRangePicker extends RadiantElement {
|
|
|
109
111
|
onRootKeydown(event: KeyboardEvent): void;
|
|
110
112
|
onRootFocusOut(event: FocusEvent): void;
|
|
111
113
|
}
|
|
114
|
+
declare global {
|
|
115
|
+
interface HTMLElementTagNameMap {
|
|
116
|
+
'rui-date-range-picker': RuiDateRangePicker;
|
|
117
|
+
}
|
|
118
|
+
}
|