feat: date-picker - #332
Conversation
6522c1d to
8e2c27d
Compare
49a8db9 to
623f97b
Compare
5888e6d to
389b795
Compare
| export function compact<T extends Record<string, unknown> | undefined>( | ||
| obj: T, | ||
| ): T { | ||
| export function compact<T extends object | undefined>(obj: T): T { |
There was a problem hiding this comment.
oh, why extend object here?
There was a problem hiding this comment.
to avoid resorting to any like in toast for instance. interfaces don't have an index signature and compact wasn't using them anyway, so object does the job.
or, better phrased by Claude: "interfaces are open to declaration merging so TS won't infer an index signature for them (unlike type aliases)".
|
double-check that keyboard events align with the documented aria datepicker patterns: |
|
Not sure if this is intentional, but when I press http://re-qdswc-runner:3000/components/date-picker#custom-trigger |
intentional yes, you'll get the same behavior wherever action buttons are used: you need to commit your choices with |
c385590 to
0d983ad
Compare
agree it could be clearer. changed it to: /**
* Pass this to support non-Gregorian calendars (Persian, Buddhist, Islamic,
* etc.), which keeps every calendar out of the bundle unless you opt in. The
* picker calls it with the calendar identifier resolved from `locale`.
*
* @example
* ```ts
* import {createCalendar} from "@internationalized/date"
*
* const props = {createCalendar, locale: "fa-IR"}
* ```
*/ |
0d983ad to
e460086
Compare
there are interesting things to borrow from these examples (kbd nav & aria attributes) but some of them conflict with the current behavior (inherited from zag). the W3C examples also don't have an edit: done. the two commits |
0179db0 to
527f634
Compare
…d one Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
527f634 to
7aabecc
Compare
| /** | ||
| * A getter, not a snapshot: tracking the read inside the view lets Angular | ||
| * update on API change without destroying and rebuilding the DOM. | ||
| */ | ||
| const viewContext = { | ||
| get $implicit() { | ||
| return contextService.context() | ||
| }, | ||
| get [contextName]() { | ||
| return contextService.context() | ||
| }, | ||
| } |
| /** | ||
| * A replacement element registers before the outgoing element's cleanup | ||
| * runs. Clearing unconditionally would discard the newer registration. | ||
| */ | ||
| const clearIfCurrentId = (id: unknown) => () => { | ||
| if (configIds?.[key]?.get?.() !== id) { | ||
| return | ||
| } | ||
| configIds?.[key].set?.(undefined) | ||
| } |
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
… box Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
854c1e8 to
c6c1185
Compare

QUI-related changes
these commits are independent of the feature and reviewable on their own:
fix(machine): only clear an element id when it is still the registered one: fixes a lost id registration when an element replaces another (happens when changing the datepicker's selection mode at runtime).fix(machine): keep the api context view instead of rebuilding it: Angular's*xContextdirective recreated its content on every state change, causing lost focuses and badly positioned popups.feat(tag): allow customizing the dismiss button label: adds adismissLabelprop to replace the hardcodedaria-label="Dismiss".feat(select): label remove buttons with the selected item text: applies the above-mentioned fix to themultipleSelect component (which works the same way as themultipledatepicker).fix(forms): flush the pending value when a child part reports blur: Angular composite components that have a focusable child didn't handleupdateOn: 'blur'properly: this fix exposes the CVAonTouchedto them so they can. note that only the datepicker is wired up and other components will be updated in an upcoming PR.fix(docs-plugin): index component types for lookup without emitting rows: to prevent the prop indexer from creating "ghost anchor ids" in doc pages (explains the progress-ring page edits).fix(component-explorer): skip highlighting parts that have no visible box: as it says on the tin.fix: proper positioning defaults in components and JSDoc: as it says on the tin.fix(angular-core): drop accessSignal falsy guard: was unnecessary and broke TS6 support.+ two other minor updates that didn't require their own commits: 2 new exports in
common/domand a type-widening forcompact.The PR takes the deprecation
inline-icon-buttoninto account.Compared to zag
rangedatepicker supports incomplete ranges (missing end/start dates).multipledatepicker actually behaves as a form element and uses dismissable tags (like Select).