@butternutbox/pawprint-native 2.1.0 → 2.2.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +23 -0
- package/dist/index.cjs +71 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +71 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/DatePicker/DatePicker.tsx +17 -6
- package/src/components/molecules/Drawer/DrawerContent.tsx +1 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[
|
|
11
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.13 MB[39m
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in 7532ms
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[32m544.91 KB[39m
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m544.81 KB[39m
|
|
14
11
|
[32mESM[39m [1mdist/index.js.map [22m[32m1.12 MB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 8378ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m576.54 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.13 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 8378ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 22238ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m114.18 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m114.18 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 55577eb: Make `DatePicker` days reachable with VoiceOver. The dates grid was a single
|
|
8
|
+
accessible element, so iOS only announced the month name and none of the day
|
|
9
|
+
buttons could be focused or selected. The grid is no longer grouped, and the
|
|
10
|
+
month label is now a header so screen-reader users can still jump between
|
|
11
|
+
months.
|
|
12
|
+
|
|
13
|
+
Add `getDateAccessibilityLabel(date, state, monthLabel)` so consumers can
|
|
14
|
+
announce delivery states such as the next box or future boxes. It defaults to
|
|
15
|
+
the existing "{day} {monthLabel}" label.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 7d7caa7: Make `Drawer` usable with VoiceOver. The panel was a single accessible
|
|
20
|
+
element, so iOS hid everything inside it, including the close button and any
|
|
21
|
+
footer actions, and a drawer couldn't be closed or acted on. The panel is no
|
|
22
|
+
longer grouped, so its contents are reachable, and it stays modal to keep
|
|
23
|
+
focus inside. The VoiceOver escape gesture (two-finger scrub) now closes the
|
|
24
|
+
drawer, as Android back already does.
|
|
25
|
+
|
|
3
26
|
## 2.1.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -6033,9 +6033,8 @@ var DrawerContent = React65__default.default.forwardRef(
|
|
|
6033
6033
|
panelShadowColor: modal.shadow.color,
|
|
6034
6034
|
panelShadowOffsetY: parseTokenValue23(modal.shadow.offsetY),
|
|
6035
6035
|
panelShadowBlur: parseTokenValue23(modal.shadow.blur),
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
accessibilityViewIsModal: true
|
|
6036
|
+
accessibilityViewIsModal: true,
|
|
6037
|
+
onAccessibilityEscape: closeDrawer
|
|
6039
6038
|
}, props), {
|
|
6040
6039
|
children: [
|
|
6041
6040
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerBodyMaxContext.Provider, { value: bodyMax, children }),
|
|
@@ -11334,6 +11333,7 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11334
11333
|
getMonthLabel,
|
|
11335
11334
|
weekDayLabels = DEFAULT_WEEK_LABELS,
|
|
11336
11335
|
getDateState,
|
|
11336
|
+
getDateAccessibilityLabel,
|
|
11337
11337
|
isDateDisabled,
|
|
11338
11338
|
minDate,
|
|
11339
11339
|
maxDate
|
|
@@ -11354,6 +11354,7 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11354
11354
|
"getMonthLabel",
|
|
11355
11355
|
"weekDayLabels",
|
|
11356
11356
|
"getDateState",
|
|
11357
|
+
"getDateAccessibilityLabel",
|
|
11357
11358
|
"isDateDisabled",
|
|
11358
11359
|
"minDate",
|
|
11359
11360
|
"maxDate"
|
|
@@ -11530,6 +11531,7 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11530
11531
|
token: datePicker.month.typography,
|
|
11531
11532
|
align: "center",
|
|
11532
11533
|
color: datePicker.month.colour.text.default,
|
|
11534
|
+
accessibilityRole: "header",
|
|
11533
11535
|
children: resolvedMonthLabel
|
|
11534
11536
|
}
|
|
11535
11537
|
) }),
|
|
@@ -11551,82 +11553,79 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11551
11553
|
{
|
|
11552
11554
|
entering: MONTH_SLIDE_ENTERING[slideDir],
|
|
11553
11555
|
exiting: MONTH_SLIDE_EXITING[slideDir],
|
|
11554
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11556
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(StyledDatesGrid, { rowGap, children: calendarRows.map((row, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(StyledDateRow, { children: row.map(
|
|
11557
|
+
(date, colIdx) => !date ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11558
|
+
StyledDateCell,
|
|
11559
|
+
{
|
|
11560
|
+
cellHeight,
|
|
11561
|
+
accessibilityElementsHidden: true
|
|
11562
|
+
},
|
|
11563
|
+
`empty-${rowIdx}-${colIdx}`
|
|
11564
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11565
|
+
StyledDateCell,
|
|
11566
|
+
{
|
|
11567
|
+
cellHeight,
|
|
11568
|
+
children: (() => {
|
|
11569
|
+
var _a3;
|
|
11570
|
+
const isDisabled = resolvedIsDateDisabled(date);
|
|
11571
|
+
const {
|
|
11572
|
+
state,
|
|
11573
|
+
indicatorBg,
|
|
11574
|
+
indicatorBorderColor,
|
|
11575
|
+
textColor,
|
|
11576
|
+
typography,
|
|
11577
|
+
textDecoration,
|
|
11578
|
+
isSelected
|
|
11579
|
+
} = resolveDateCellConfig(date);
|
|
11580
|
+
const isUndeliverable = isDisabled && state === "default";
|
|
11581
|
+
const cellOpacity = isDisabled && !isUndeliverable ? disabledOpacity : 1;
|
|
11582
|
+
const cellTextDecoration = isUndeliverable ? "line-through" : textDecoration;
|
|
11583
|
+
const cellTextColor = isUndeliverable ? dt.colour.text.previous : textColor;
|
|
11584
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11585
|
+
reactNative.Pressable,
|
|
11586
|
+
{
|
|
11587
|
+
onPress: !isDisabled ? () => onDateSelect == null ? void 0 : onDateSelect(date) : void 0,
|
|
11588
|
+
disabled: isDisabled,
|
|
11589
|
+
accessible: true,
|
|
11590
|
+
accessibilityRole: "button",
|
|
11591
|
+
accessibilityLabel: (_a3 = getDateAccessibilityLabel == null ? void 0 : getDateAccessibilityLabel(
|
|
11592
|
+
date,
|
|
11575
11593
|
state,
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
const cellTextColor = isUndeliverable ? dt.colour.text.previous : textColor;
|
|
11587
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11588
|
-
reactNative.Pressable,
|
|
11594
|
+
resolvedMonthLabel
|
|
11595
|
+
)) != null ? _a3 : `${date.getDate()} ${resolvedMonthLabel}`,
|
|
11596
|
+
accessibilityState: {
|
|
11597
|
+
selected: isSelected,
|
|
11598
|
+
disabled: isDisabled
|
|
11599
|
+
},
|
|
11600
|
+
accessibilityHint: state === "current" ? "Today" : void 0,
|
|
11601
|
+
style: { opacity: cellOpacity },
|
|
11602
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11603
|
+
StyledIndicator3,
|
|
11589
11604
|
{
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
selected: isSelected,
|
|
11597
|
-
disabled: isDisabled
|
|
11598
|
-
},
|
|
11599
|
-
accessibilityHint: state === "current" ? "Today" : void 0,
|
|
11600
|
-
style: { opacity: cellOpacity },
|
|
11605
|
+
indicatorSize,
|
|
11606
|
+
indicatorBorderRadius,
|
|
11607
|
+
indicatorBg,
|
|
11608
|
+
indicatorBorderWidth: indicatorBorderColor !== "transparent" ? selectedBorderWidth : 0,
|
|
11609
|
+
indicatorBorderColor,
|
|
11610
|
+
indicatorBorderStyle: indicatorBorderColor !== "transparent" ? "dashed" : "solid",
|
|
11601
11611
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11602
|
-
|
|
11612
|
+
Typography,
|
|
11603
11613
|
{
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
indicatorBorderColor,
|
|
11609
|
-
indicatorBorderStyle: indicatorBorderColor !== "transparent" ? "dashed" : "solid",
|
|
11610
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11611
|
-
Typography,
|
|
11612
|
-
{
|
|
11613
|
-
color: cellTextColor,
|
|
11614
|
-
token: typography,
|
|
11615
|
-
textDecoration: cellTextDecoration,
|
|
11616
|
-
children: date.getDate().toString()
|
|
11617
|
-
}
|
|
11618
|
-
)
|
|
11614
|
+
color: cellTextColor,
|
|
11615
|
+
token: typography,
|
|
11616
|
+
textDecoration: cellTextDecoration,
|
|
11617
|
+
children: date.getDate().toString()
|
|
11619
11618
|
}
|
|
11620
11619
|
)
|
|
11621
11620
|
}
|
|
11622
|
-
)
|
|
11623
|
-
}
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
)
|
|
11628
|
-
|
|
11629
|
-
)
|
|
11621
|
+
)
|
|
11622
|
+
}
|
|
11623
|
+
);
|
|
11624
|
+
})()
|
|
11625
|
+
},
|
|
11626
|
+
toDateKey(date)
|
|
11627
|
+
)
|
|
11628
|
+
) }, rowIdx)) })
|
|
11630
11629
|
},
|
|
11631
11630
|
`${year}-${month}`
|
|
11632
11631
|
)
|