@astryxdesign/core 0.7.8-canary.ea33daf → 0.7.8-canary.ed33727

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PickerWheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/PickerWheel.tsx"],"names":[],"mappings":"AAmDA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AA2HxB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAghBZ;yBAthBe,WAAW"}
1
+ {"version":3,"file":"PickerWheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/PickerWheel.tsx"],"names":[],"mappings":"AAmDA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AA2HxB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BA8gBZ;yBAphBe,WAAW"}
@@ -468,9 +468,6 @@ export function PickerWheel({
468
468
  isEnabled: isActive,
469
469
  isPointerKept: true
470
470
  });
471
-
472
- // A key commits the row at `position` at once and turns the wheel there
473
- // from `offset`.
474
471
  const turnToPosition = useCallback((position, offset) => {
475
472
  const current = latestRef.current;
476
473
  const option = current.options[position];
@@ -1 +1 @@
1
- {"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/Wheel.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AAoMxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAKtC;yBALe,KAAK;;;AASrB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAoUZ;yBA1Ue,WAAW"}
1
+ {"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../src/DateInput/Wheel.tsx"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AAoMxB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAKtC;yBALe,KAAK;;;AASrB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,+BAmUZ;yBAzUe,WAAW"}
@@ -351,8 +351,6 @@ export function ScrollWheel({
351
351
  useOwnScrollGesture(scrollerRef, 'all', {
352
352
  isEnabled: isActive
353
353
  });
354
-
355
- // A key commits the row it moves to and scrolls the column there.
356
354
  const moveTo = useCallback(row => {
357
355
  const option = row == null ? undefined : options[row];
358
356
  if (row == null || option == null || option.isDisabled) {
@@ -1 +1 @@
1
- {"version":3,"file":"useHoverCard.d.ts","sourceRoot":"","sources":["../../src/HoverCard/useHoverCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA8BlC;;GA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E,MAAM,CAAC;IAEf;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEzC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,QAAQ,EAAE,SAAS,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,KAC5C,SAAS,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAgB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAke5E"}
@@ -197,7 +197,12 @@ export function useHoverCard(options = {}) {
197
197
 
198
198
  // Tap-to-open on touch; on a mouse this does nothing and hover still rules.
199
199
  const handlePointerDown = useCallback(event => {
200
- handleTouchPointerDown(event);
200
+ // A pen in range starts the hover show before it lands. Left pending,
201
+ // that show opens the card during the press. The tap then closes it.
202
+ if (handleTouchPointerDown(event) && showTimeoutRef.current) {
203
+ clearTimeout(showTimeoutRef.current);
204
+ showTimeoutRef.current = null;
205
+ }
201
206
  }, [handleTouchPointerDown]);
202
207
 
203
208
  // Under `auto`, whether focus counts is decided when it arrives, and a
@@ -1 +1 @@
1
- {"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA8ClC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAA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) {
408
408
  return;
409
409
  }
410
410
  if (handleTouchPointerDown(event)) {
411
+ // A pen in range starts the hover show before it lands. Left pending,
412
+ // that show opens the layer during the press. The tap then closes it.
413
+ if (showTimeoutRef.current) {
414
+ clearTimeout(showTimeoutRef.current);
415
+ showTimeoutRef.current = null;
416
+ }
411
417
  return;
412
418
  }
413
419
  if (isOpen !== undefined) {
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @file datePicker.ts
3
+ * @input Nothing; data only
4
+ * @output Exports `datePicker`: the rules UIDatePicker adds to its wheels. The
5
+ * month/year wheels change the date, the AM/PM column follows the hour, a
6
+ * column turns back onto a bound, and a day clamps to its month.
7
+ * @position The date picker domain of the UIKit constants table
8
+ * (motion/uikit), for the date and time touch sheets. Every leaf names its
9
+ * source, which uikit.test.ts checks.
10
+ *
11
+ * SYNC: When modified, update /packages/core/src/motion/MEASUREMENTS.md and
12
+ * /packages/core/src/motion/README.md.
13
+ */
14
+ export declare const datePicker: {
15
+ readonly calendar: {
16
+ readonly monthYearWheels: {
17
+ /**
18
+ * Turning the month or year wheel changes the picker's date, keeping
19
+ * the day, and fires `valueChanged`.
20
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.inline`,
21
+ * October 15 → May 15 after the month wheel's fling, with a
22
+ * `valueChanged` carrying May 15, Oct 23 2026
23
+ */
24
+ readonly changesDate: true;
25
+ };
26
+ };
27
+ readonly wheels: {
28
+ /**
29
+ * In 12-hour time the AM/PM column follows the hour. Turning the hour from
30
+ * 11 to 12 turns the time from AM to PM, and back. From 12 to 1 it keeps
31
+ * the half of the day.
32
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`,
33
+ * en_US: 11:58 AM, hour wheel +1 row → `valueChanged` 12:58 PM; then
34
+ * the minute wheel's +4 rows carried the hour from 12 to 1 → 1:02 PM,
35
+ * Oct 23 2026
36
+ */
37
+ readonly meridiemFollowsHour: true;
38
+ /**
39
+ * A column that comes to rest past `minimumDate` or `maximumDate` turns
40
+ * back onto the bound. Its `valueChanged` already carries the bound. For
41
+ * example, with bounds 9:00–17:00, the hour of 10:00 dragged to 7 reads
42
+ * 9:00 at rest. The hour column then turns 64 pt, two rows, back to 9.
43
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`
44
+ * with bounds 9:00–17:00 and `minuteInterval` 15, per-frame hour
45
+ * offsets after the rest (0.4, 2, 7.4, 16, 26.4, 37.7, 48.3, 56.7,
46
+ * 62, 64 pt at 33 ms steps) and the `valueChanged` time, Oct 23 2026
47
+ */
48
+ readonly restPastBound: "turnToBound";
49
+ /**
50
+ * In `.date` wheels a day the month does not have clamps to the month's
51
+ * last day (January 30, month +1 → February 28).
52
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.wheels`
53
+ * with bounds Jun 1 2026 – Mar 15 2027, Oct 23 2026
54
+ */
55
+ readonly dayClampsToMonth: true;
56
+ };
57
+ };
58
+ //# sourceMappingURL=datePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePicker.d.ts","sourceRoot":"","sources":["../../../src/motion/uikit/datePicker.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,UAAU;;;YAGjB;;;;;;eAMG;;;;;QAKL;;;;;;;;WAQG;;QAEH;;;;;;;;;WASG;;QAEH;;;;;WAKG;;;CAGG,CAAC"}
@@ -0,0 +1,60 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file datePicker.ts
5
+ * @input Nothing; data only
6
+ * @output Exports `datePicker`: the rules UIDatePicker adds to its wheels. The
7
+ * month/year wheels change the date, the AM/PM column follows the hour, a
8
+ * column turns back onto a bound, and a day clamps to its month.
9
+ * @position The date picker domain of the UIKit constants table
10
+ * (motion/uikit), for the date and time touch sheets. Every leaf names its
11
+ * source, which uikit.test.ts checks.
12
+ *
13
+ * SYNC: When modified, update /packages/core/src/motion/MEASUREMENTS.md and
14
+ * /packages/core/src/motion/README.md.
15
+ */
16
+
17
+ export const datePicker = {
18
+ calendar: {
19
+ monthYearWheels: {
20
+ /**
21
+ * Turning the month or year wheel changes the picker's date, keeping
22
+ * the day, and fires `valueChanged`.
23
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.inline`,
24
+ * October 15 → May 15 after the month wheel's fling, with a
25
+ * `valueChanged` carrying May 15, Oct 23 2026
26
+ */
27
+ changesDate: true
28
+ }
29
+ },
30
+ wheels: {
31
+ /**
32
+ * In 12-hour time the AM/PM column follows the hour. Turning the hour from
33
+ * 11 to 12 turns the time from AM to PM, and back. From 12 to 1 it keeps
34
+ * the half of the day.
35
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`,
36
+ * en_US: 11:58 AM, hour wheel +1 row → `valueChanged` 12:58 PM; then
37
+ * the minute wheel's +4 rows carried the hour from 12 to 1 → 1:02 PM,
38
+ * Oct 23 2026
39
+ */
40
+ meridiemFollowsHour: true,
41
+ /**
42
+ * A column that comes to rest past `minimumDate` or `maximumDate` turns
43
+ * back onto the bound. Its `valueChanged` already carries the bound. For
44
+ * example, with bounds 9:00–17:00, the hour of 10:00 dragged to 7 reads
45
+ * 9:00 at rest. The hour column then turns 64 pt, two rows, back to 9.
46
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`
47
+ * with bounds 9:00–17:00 and `minuteInterval` 15, per-frame hour
48
+ * offsets after the rest (0.4, 2, 7.4, 16, 26.4, 37.7, 48.3, 56.7,
49
+ * 62, 64 pt at 33 ms steps) and the `valueChanged` time, Oct 23 2026
50
+ */
51
+ restPastBound: 'turnToBound',
52
+ /**
53
+ * In `.date` wheels a day the month does not have clamps to the month's
54
+ * last day (January 30, month +1 → February 28).
55
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.wheels`
56
+ * with bounds Jun 1 2026 – Mar 15 2027, Oct 23 2026
57
+ */
58
+ dayClampsToMonth: true
59
+ }
60
+ };
@@ -3,9 +3,9 @@
3
3
  * @input The domain files of the UIKit constants table
4
4
  * @output Re-exports `springs` and one constant per spring (`SHEET_PRESENT_SPRING`,
5
5
  * …), `scroll`, `timing`, `navigation`, `picker`, `progressBar`,
6
- * `segmentedControl`, the `slider` and switch (`switchControl`) domains, and
7
- * the gesture thresholds (one `UIKIT_*` group per recognizer, their union
8
- * `UIKIT_GESTURES`, and the haptic tables)
6
+ * `segmentedControl`, `datePicker`, `slider` and `switchControl`. It also
7
+ * re-exports the gesture thresholds: one `UIKIT_*` group per recognizer,
8
+ * their union `UIKIT_GESTURES`, and the haptic tables
9
9
  * @position Entry of the UIKit constants table (motion/uikit). Internal to
10
10
  * core: not exported from the package entry point
11
11
  *
@@ -18,6 +18,7 @@
18
18
  * /packages/core/src/motion/README.md.
19
19
  */
20
20
  export { HAPTIC_FEEDBACK_KINDS, HAPTIC_VIBRATION_PATTERNS, UIKIT_CLICK, UIKIT_CONTROL, UIKIT_GESTURES, UIKIT_LONG_PRESS, UIKIT_PAN, UIKIT_PINCH, UIKIT_PRESS, UIKIT_ROTATION, UIKIT_SCREEN_EDGE_PAN, UIKIT_SWIPE, UIKIT_TAP, UIKIT_VELOCITY, type GestureConstant, type GestureConstantUnit, type HapticFeedbackKind, } from './gestures.js';
21
+ export { datePicker } from './datePicker.js';
21
22
  export { navigation, registerNavigationTable } from './navigation.js';
22
23
  export { picker } from './picker.js';
23
24
  export { progressBar, registerProgressBarTable } from './progressBar.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/motion/uikit/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACpE,OAAO,EAAC,mBAAmB,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AACrD,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC9B,wCAAwC,EACxC,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,mBAAmB,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/motion/uikit/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AACpE,OAAO,EAAC,mBAAmB,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AACrD,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC9B,wCAAwC,EACxC,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,mBAAmB,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC"}
@@ -5,9 +5,9 @@
5
5
  * @input The domain files of the UIKit constants table
6
6
  * @output Re-exports `springs` and one constant per spring (`SHEET_PRESENT_SPRING`,
7
7
  * …), `scroll`, `timing`, `navigation`, `picker`, `progressBar`,
8
- * `segmentedControl`, the `slider` and switch (`switchControl`) domains, and
9
- * the gesture thresholds (one `UIKIT_*` group per recognizer, their union
10
- * `UIKIT_GESTURES`, and the haptic tables)
8
+ * `segmentedControl`, `datePicker`, `slider` and `switchControl`. It also
9
+ * re-exports the gesture thresholds: one `UIKIT_*` group per recognizer,
10
+ * their union `UIKIT_GESTURES`, and the haptic tables
11
11
  * @position Entry of the UIKit constants table (motion/uikit). Internal to
12
12
  * core: not exported from the package entry point
13
13
  *
@@ -21,6 +21,7 @@
21
21
  */
22
22
 
23
23
  export { HAPTIC_FEEDBACK_KINDS, HAPTIC_VIBRATION_PATTERNS, UIKIT_CLICK, UIKIT_CONTROL, UIKIT_GESTURES, UIKIT_LONG_PRESS, UIKIT_PAN, UIKIT_PINCH, UIKIT_PRESS, UIKIT_ROTATION, UIKIT_SCREEN_EDGE_PAN, UIKIT_SWIPE, UIKIT_TAP, UIKIT_VELOCITY } from "./gestures.js";
24
+ export { datePicker } from "./datePicker.js";
24
25
  export { navigation, registerNavigationTable } from "./navigation.js";
25
26
  export { picker } from "./picker.js";
26
27
  export { progressBar, registerProgressBarTable } from "./progressBar.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.7.8-canary.ea33daf",
3
+ "version": "0.7.8-canary.ed33727",
4
4
  "displayName": "Astryx Core",
5
5
  "description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
6
6
  "author": "Meta Open Source",
@@ -870,9 +870,9 @@
870
870
  "react-dom": ">=19.0.0"
871
871
  },
872
872
  "devDependencies": {
873
- "@astryxdesign/a11y-spec": "0.7.8-canary.ea33daf",
874
- "@astryxdesign/cli": "0.7.8-canary.ea33daf",
875
- "@astryxdesign/interaction-harness": "0.7.8-canary.ea33daf",
873
+ "@astryxdesign/a11y-spec": "0.7.8-canary.ed33727",
874
+ "@astryxdesign/cli": "0.7.8-canary.ed33727",
875
+ "@astryxdesign/interaction-harness": "0.7.8-canary.ed33727",
876
876
  "@babel/cli": "^7.29.7",
877
877
  "@babel/core": "^7.29.7",
878
878
  "@babel/preset-react": "^7.29.7",
@@ -584,8 +584,6 @@ export function PickerWheel({
584
584
  isPointerKept: true,
585
585
  });
586
586
 
587
- // A key commits the row at `position` at once and turns the wheel there
588
- // from `offset`.
589
587
  const turnToPosition = useCallback(
590
588
  (position: number, offset: number) => {
591
589
  const current = latestRef.current;
@@ -532,7 +532,6 @@ export function ScrollWheel({
532
532
  // there is no way to share — it takes every touch that lands on it.
533
533
  useOwnScrollGesture(scrollerRef, 'all', {isEnabled: isActive});
534
534
 
535
- // A key commits the row it moves to and scrolls the column there.
536
535
  const moveTo = useCallback(
537
536
  (row: number | null) => {
538
537
  const option = row == null ? undefined : options[row];
@@ -401,7 +401,12 @@ export function useHoverCard(options: HoverCardOptions = {}): HoverCardReturn {
401
401
  // Tap-to-open on touch; on a mouse this does nothing and hover still rules.
402
402
  const handlePointerDown = useCallback(
403
403
  (event: PointerEvent) => {
404
- handleTouchPointerDown(event);
404
+ // A pen in range starts the hover show before it lands. Left pending,
405
+ // that show opens the card during the press. The tap then closes it.
406
+ if (handleTouchPointerDown(event) && showTimeoutRef.current) {
407
+ clearTimeout(showTimeoutRef.current);
408
+ showTimeoutRef.current = null;
409
+ }
405
410
  },
406
411
  [handleTouchPointerDown],
407
412
  );
@@ -633,6 +633,12 @@ export function useTooltip(options: TooltipOptions = {}): TooltipReturn {
633
633
  return;
634
634
  }
635
635
  if (handleTouchPointerDown(event)) {
636
+ // A pen in range starts the hover show before it lands. Left pending,
637
+ // that show opens the layer during the press. The tap then closes it.
638
+ if (showTimeoutRef.current) {
639
+ clearTimeout(showTimeoutRef.current);
640
+ showTimeoutRef.current = null;
641
+ }
636
642
  return;
637
643
  }
638
644
  if (isOpen !== undefined) {
@@ -268,6 +268,16 @@ match the probe.
268
268
  | M-SH21 | SheetProbe on iPad, iOS 27 `preferredPlacement` each case, RTL | present | placement geometry and motion | B, C |
269
269
  | M-SH22 | SheetProbe iOS 26 `preferredTransition = .zoom` from a bar button | present, dismiss | morph geometry per frame | A, C |
270
270
 
271
+ ## Date picker (UIDatePicker)
272
+
273
+ Rules the DateInput, DateTimeInput and TimeInput touch sheets follow, in their
274
+ own table (`uikit/datePicker.ts`). The wheels' physics are UIPickerView's: the
275
+ table only names them, and their values belong to the wheel's own table.
276
+
277
+ Done (UIKit lab, iOS 26.2 simulator, Oct 23 2026; in the date picker's table):
278
+ the month/year wheels changing the date, the AM/PM column following the hour,
279
+ the turn back onto a bound, and the day clamped to the month.
280
+
271
281
  ## Context menu (UIContextMenuInteraction)
272
282
 
273
283
  Values the context menu reads from its own table, which lands with the
@@ -26,6 +26,7 @@ roles through `resolveMotion`.
26
26
  | `uikit/picker.ts` | UIPickerView: row pitch, height and rubber band, velocity floor, the coast's stop speed, snap at rest, tap spin, tick. |
27
27
  | `uikit/segmented.ts` | UISegmentedControl: the selection indicator's spring; under Reduce Motion the animator's cross-fade replaces it. |
28
28
  | `uikit/switch.ts` | UISwitch on iOS 26.2: geometry, the lift, settle, travel and tracking springs, the flip distance, the track colour. |
29
+ | `uikit/datePicker.ts` | UIDatePicker: the rules it adds to its wheels. |
29
30
  | `roles.ts` | The internal motion roles: the springs, durations and curves `spec:AST-094` FR4 names, registered by the shared tables, and a role's CSS form read back. |
30
31
  | `roleValue.ts` | A role's CSS form, written: a spring's duration and bounce, a duration in ms, a curve's `cubic-bezier()`. |
31
32
  | `resolveMotion.ts` | A role's value: its table value, as the per-role tables stay internal (`spec:AST-094` DEC-15). |
@@ -0,0 +1,60 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file datePicker.ts
5
+ * @input Nothing; data only
6
+ * @output Exports `datePicker`: the rules UIDatePicker adds to its wheels. The
7
+ * month/year wheels change the date, the AM/PM column follows the hour, a
8
+ * column turns back onto a bound, and a day clamps to its month.
9
+ * @position The date picker domain of the UIKit constants table
10
+ * (motion/uikit), for the date and time touch sheets. Every leaf names its
11
+ * source, which uikit.test.ts checks.
12
+ *
13
+ * SYNC: When modified, update /packages/core/src/motion/MEASUREMENTS.md and
14
+ * /packages/core/src/motion/README.md.
15
+ */
16
+
17
+ export const datePicker = {
18
+ calendar: {
19
+ monthYearWheels: {
20
+ /**
21
+ * Turning the month or year wheel changes the picker's date, keeping
22
+ * the day, and fires `valueChanged`.
23
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.inline`,
24
+ * October 15 → May 15 after the month wheel's fling, with a
25
+ * `valueChanged` carrying May 15, Oct 23 2026
26
+ */
27
+ changesDate: true,
28
+ },
29
+ },
30
+ wheels: {
31
+ /**
32
+ * In 12-hour time the AM/PM column follows the hour. Turning the hour from
33
+ * 11 to 12 turns the time from AM to PM, and back. From 12 to 1 it keeps
34
+ * the half of the day.
35
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`,
36
+ * en_US: 11:58 AM, hour wheel +1 row → `valueChanged` 12:58 PM; then
37
+ * the minute wheel's +4 rows carried the hour from 12 to 1 → 1:02 PM,
38
+ * Oct 23 2026
39
+ */
40
+ meridiemFollowsHour: true,
41
+ /**
42
+ * A column that comes to rest past `minimumDate` or `maximumDate` turns
43
+ * back onto the bound. Its `valueChanged` already carries the bound. For
44
+ * example, with bounds 9:00–17:00, the hour of 10:00 dragged to 7 reads
45
+ * 9:00 at rest. The hour column then turns 64 pt, two rows, back to 9.
46
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`
47
+ * with bounds 9:00–17:00 and `minuteInterval` 15, per-frame hour
48
+ * offsets after the rest (0.4, 2, 7.4, 16, 26.4, 37.7, 48.3, 56.7,
49
+ * 62, 64 pt at 33 ms steps) and the `valueChanged` time, Oct 23 2026
50
+ */
51
+ restPastBound: 'turnToBound',
52
+ /**
53
+ * In `.date` wheels a day the month does not have clamps to the month's
54
+ * last day (January 30, month +1 → February 28).
55
+ * @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.wheels`
56
+ * with bounds Jun 1 2026 – Mar 15 2027, Oct 23 2026
57
+ */
58
+ dayClampsToMonth: true,
59
+ },
60
+ } as const;
@@ -5,9 +5,9 @@
5
5
  * @input The domain files of the UIKit constants table
6
6
  * @output Re-exports `springs` and one constant per spring (`SHEET_PRESENT_SPRING`,
7
7
  * …), `scroll`, `timing`, `navigation`, `picker`, `progressBar`,
8
- * `segmentedControl`, the `slider` and switch (`switchControl`) domains, and
9
- * the gesture thresholds (one `UIKIT_*` group per recognizer, their union
10
- * `UIKIT_GESTURES`, and the haptic tables)
8
+ * `segmentedControl`, `datePicker`, `slider` and `switchControl`. It also
9
+ * re-exports the gesture thresholds: one `UIKIT_*` group per recognizer,
10
+ * their union `UIKIT_GESTURES`, and the haptic tables
11
11
  * @position Entry of the UIKit constants table (motion/uikit). Internal to
12
12
  * core: not exported from the package entry point
13
13
  *
@@ -39,6 +39,7 @@ export {
39
39
  type GestureConstantUnit,
40
40
  type HapticFeedbackKind,
41
41
  } from './gestures';
42
+ export {datePicker} from './datePicker';
42
43
  export {navigation, registerNavigationTable} from './navigation';
43
44
  export {picker} from './picker';
44
45
  export {progressBar, registerProgressBarTable} from './progressBar';