@waggylabs/yumekit 0.4.1-beta.71 → 0.4.1-beta.73

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/CHANGELOG.md CHANGED
@@ -35,8 +35,8 @@ Delete any empty sections before publishing.
35
35
 
36
36
  ### Added
37
37
 
38
- - New `y-date` component — a form-associated date (and optional time) input field. Displays a trigger button that opens a `y-datepicker` popup. Supports `name`, `value`, `label`, `label-position`, `placeholder`, `size`, `disabled`, `required`, `invalid`, `clearable`, `show-time`, `min`, `max`, `format`, and `mode` attributes. Emits `change` and `input` events. Fully keyboard accessible with `aria-expanded` management.
39
- - New `y-datepicker` component — a standalone calendar and optional time picker widget. Supports single date and date range selection via the `mode` attribute. Configurable with `value`, `min`, `max`, `show-time`, `show-seconds`, `format`, `first-day-of-week`, `year-range`, and `panel-count` attributes. Emits a `change` event with the selected date value or `[start, end]` range array. Public API: `clear()`, `formatDate(date)`.
38
+ - New `y-date` component — a form-associated date (and optional time) input field. Displays a trigger button that opens a `y-datepicker` popup. Supports `name`, `value`, `label`, `label-position`, `placeholder`, `size`, `disabled`, `required`, `invalid`, `clearable`, `show-hours`, `min`, `max`, `format`, and `mode` attributes. Emits `change` and `input` events. Fully keyboard accessible with `aria-expanded` management.
39
+ - New `y-datepicker` component — a standalone calendar and optional time picker widget. Supports single date and date range selection via the `mode` attribute. Configurable with `value`, `min`, `max`, `show-hours`, `show-seconds`, `format`, `first-day-of-week`, `year-range`, and `panel-count` attributes. Emits a `change` event with the selected date value or `[start, end]` range array. Public API: `clear()`, `formatDate(date)`.
40
40
  - 10 new bundled icons: `fan`, `thermometer-high`, `thermometer-low`, `ban`, `bluetooth`, `unlock`, `plug`, `gasoline`, `ev-charger`, `tools`.
41
41
  - `comp-date` icon added to the bundled icon registry.
42
42
  - Storybook integration — all 28 components now have Storybook stories. Includes a theme background selector that applies the correct design tokens for each active theme.
@@ -4,6 +4,7 @@ export class YumeDate extends HTMLElement {
4
4
  _internals: ElementInternals;
5
5
  _onDocumentClick(e: any): void;
6
6
  _suppressBlurApply: boolean;
7
+ _selectedParts: Set<any>;
7
8
  connectedCallback(): void;
8
9
  disconnectedCallback(): void;
9
10
  attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
@@ -18,7 +19,7 @@ export class YumeDate extends HTMLElement {
18
19
  get disabled(): boolean;
19
20
  set format(v: string);
20
21
  /** @type {string} Date display format string. Defaults to "MM/DD/YYYY", or
21
- * a time-aware variant when show-time / show-minutes / show-seconds are set. */
22
+ * a time-aware variant when show-hours / show-minutes / show-seconds are set. */
22
23
  get format(): string;
23
24
  set invalid(v: boolean);
24
25
  /** @type {boolean} Whether the field is in an invalid state. */
@@ -41,15 +42,18 @@ export class YumeDate extends HTMLElement {
41
42
  set placeholder(v: string);
42
43
  /** @type {string} Placeholder text. */
43
44
  get placeholder(): string;
44
- set showTime(v: boolean);
45
+ set showHours(v: boolean);
45
46
  /** @type {boolean} Show hour time picker. */
46
- get showTime(): boolean;
47
+ get showHours(): boolean;
47
48
  set showMinutes(v: boolean);
48
49
  /** @type {boolean} Show minutes column in time picker. */
49
50
  get showMinutes(): boolean;
50
51
  set showSeconds(v: boolean);
51
52
  /** @type {boolean} Show seconds column in time picker. */
52
53
  get showSeconds(): boolean;
54
+ set hourFormat(v: string);
55
+ /** @type {string} Hour display format: "12" (default) or "24" */
56
+ get hourFormat(): string;
53
57
  set showYears(v: boolean);
54
58
  /** @type {boolean} Show year select in datepicker header (default true). */
55
59
  get showYears(): boolean;
@@ -87,9 +91,67 @@ export class YumeDate extends HTMLElement {
87
91
  * @returns {Date|null}
88
92
  */
89
93
  _parseTypedDate(text: string): Date | null;
94
+ /**
95
+ * Parse partial user input and return an object with whatever date parts
96
+ * could be extracted based on the format string. Returns null if nothing
97
+ * matches.
98
+ *
99
+ * For format "MM/DD/YYYY" and input "04" → { month: 4 }
100
+ * For format "MM/DD/YYYY" and input "04/15" → { month: 4, day: 15 }
101
+ * For format "MM/DD/YYYY" and input "04/15/2026" → { month: 4, day: 15, year: 2026 }
102
+ *
103
+ * @param {string} text
104
+ * @returns {{ month?: number, day?: number, year?: number, hour?: number, minute?: number, second?: number } | null}
105
+ */
106
+ _parsePartialInput(text: string): {
107
+ month?: number;
108
+ day?: number;
109
+ year?: number;
110
+ hour?: number;
111
+ minute?: number;
112
+ second?: number;
113
+ } | null;
90
114
  /**
91
115
  * Apply a parsed Date as the component's value and emit a change event.
92
116
  * @param {Date} date
93
117
  */
94
118
  _applyParsedDate(date: Date): void;
119
+ /**
120
+ * Build a presumed Date from partial input parts, filling in defaults.
121
+ * Returns null if the result is invalid.
122
+ * @param {{ month?: number, day?: number, year?: number, hour?: number, minute?: number, second?: number } | null} partial
123
+ * @returns {Date | null}
124
+ */
125
+ _buildPresumedDate(partial: {
126
+ month?: number;
127
+ day?: number;
128
+ year?: number;
129
+ hour?: number;
130
+ minute?: number;
131
+ second?: number;
132
+ } | null): Date | null;
133
+ /**
134
+ * Parse range input text in the form "start - end" or just "start".
135
+ * Each side can be a full or partial date string.
136
+ * Returns { start: Date, end: Date|null } or null if unparseable.
137
+ * @param {string} text
138
+ * @returns {{ start: Date, end: Date|null } | null}
139
+ */
140
+ _parseRangeInput(text: string): {
141
+ start: Date;
142
+ end: Date | null;
143
+ } | null;
144
+ /**
145
+ * Apply a range value (start and optional end) to the component.
146
+ * @param {Date} start
147
+ * @param {Date|null} end
148
+ */
149
+ _applyRangeValue(start: Date, end: Date | null): void;
150
+ /**
151
+ * Handle type-ahead input for range mode.
152
+ * Parses partial range text and navigates/highlights in the picker.
153
+ * @param {string} text
154
+ * @param {HTMLElement} picker
155
+ */
156
+ _handleRangeTypeahead(text: string, picker: HTMLElement): void;
95
157
  }
@@ -1,9 +1,8 @@
1
1
  declare namespace _default {
2
- export let title: string;
3
- export let tags: string[];
4
- export { docsParams as parameters };
5
- export let decorators: ((story: any) => string)[];
6
- export namespace argTypes {
2
+ let title: string;
3
+ let tags: string[];
4
+ let decorators: ((story: any) => string)[];
5
+ namespace argTypes {
7
6
  namespace mode {
8
7
  let control: string;
9
8
  let options: string[];
@@ -114,7 +113,7 @@ declare namespace _default {
114
113
  }
115
114
  export { table_6 as table };
116
115
  }
117
- namespace showTime {
116
+ namespace showHours {
118
117
  let control_9: string;
119
118
  export { control_9 as control };
120
119
  let description_9: string;
@@ -142,8 +141,38 @@ declare namespace _default {
142
141
  }
143
142
  export { table_8 as table };
144
143
  }
144
+ namespace showSeconds {
145
+ let control_11: string;
146
+ export { control_11 as control };
147
+ let description_11: string;
148
+ export { description_11 as description };
149
+ export namespace table_9 {
150
+ export namespace defaultValue_9 {
151
+ let summary_9: string;
152
+ export { summary_9 as summary };
153
+ }
154
+ export { defaultValue_9 as defaultValue };
155
+ }
156
+ export { table_9 as table };
157
+ }
158
+ namespace hourFormat {
159
+ let control_12: string;
160
+ export { control_12 as control };
161
+ let options_3: string[];
162
+ export { options_3 as options };
163
+ let description_12: string;
164
+ export { description_12 as description };
165
+ export namespace table_10 {
166
+ export namespace defaultValue_10 {
167
+ let summary_10: string;
168
+ export { summary_10 as summary };
169
+ }
170
+ export { defaultValue_10 as defaultValue };
171
+ }
172
+ export { table_10 as table };
173
+ }
145
174
  }
146
- export namespace args {
175
+ namespace args {
147
176
  let mode_1: string;
148
177
  export { mode_1 as mode };
149
178
  let size_1: string;
@@ -160,12 +189,16 @@ declare namespace _default {
160
189
  export { disabled_1 as disabled };
161
190
  let invalid_1: boolean;
162
191
  export { invalid_1 as invalid };
163
- let showTime_1: boolean;
164
- export { showTime_1 as showTime };
192
+ let showHours_1: boolean;
193
+ export { showHours_1 as showHours };
165
194
  let showMinutes_1: boolean;
166
195
  export { showMinutes_1 as showMinutes };
196
+ let showSeconds_1: boolean;
197
+ export { showSeconds_1 as showSeconds };
198
+ let hourFormat_1: string;
199
+ export { hourFormat_1 as hourFormat };
167
200
  }
168
- export function render(args: any): string;
201
+ function render(args: any): string;
169
202
  }
170
203
  export default _default;
171
204
  /** Default single-date input. */
@@ -188,8 +221,8 @@ export namespace WithTime {
188
221
  let decorators_1: ((story: any) => string)[];
189
222
  export { decorators_1 as decorators };
190
223
  export namespace args_3 {
191
- let showTime_2: boolean;
192
- export { showTime_2 as showTime };
224
+ let showHours_2: boolean;
225
+ export { showHours_2 as showHours };
193
226
  let value_3: string;
194
227
  export { value_3 as value };
195
228
  }
@@ -231,13 +264,3 @@ export namespace Invalid {
231
264
  }
232
265
  export { args_7 as args };
233
266
  }
234
- /** Interactive playground. */
235
- export const Playground: {};
236
- declare namespace docsParams {
237
- namespace docs {
238
- namespace story {
239
- let inline: boolean;
240
- let height: string;
241
- }
242
- }
243
- }