@scripso-homepad/ui 0.4.30 → 0.4.31

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/dist/index.js CHANGED
@@ -1348,7 +1348,7 @@ var CALENDAR_NAV_ICON_COLOR = colors.stormGray850;
1348
1348
  var CALENDAR_FIELD_ICON_SIZE = 20;
1349
1349
  var CALENDAR_FIELD_WIDTH = CALENDAR_PANEL_WIDTH;
1350
1350
  var CALENDAR_FIELD_HEIGHT = 52;
1351
- var CALENDAR_FIELD_PADDING = spacing.lg;
1351
+ var CALENDAR_FIELD_PADDING = 14;
1352
1352
  var CALENDAR_FIELD_GAP = spacing.sm;
1353
1353
  var CALENDAR_FIELD_PLACEHOLDER_COLOR = colors.stormGray200;
1354
1354
  var CALENDAR_PANEL_TOTAL_HEIGHT = CALENDAR_PANEL_PADDING * 2 + CALENDAR_HEADER_HEIGHT + CALENDAR_PANEL_GAP * 2 + CALENDAR_WEEKDAY_CELL_SIZE + CALENDAR_DAY_GRID_HEIGHT;
@@ -1510,19 +1510,20 @@ var calendarDropdownMetrics = StyleSheet.create({
1510
1510
  color: colors.stormGray300
1511
1511
  },
1512
1512
  dayLabelDisabled: {
1513
- color: colors.stormGray300,
1514
- opacity: 0.5
1513
+ color: colors.stormGray300
1515
1514
  },
1516
- todayDot: {
1515
+ todayDotWrap: {
1517
1516
  position: "absolute",
1518
- bottom: 5,
1519
- left: "50%",
1517
+ bottom: 4,
1518
+ left: 0,
1519
+ right: 0,
1520
+ alignItems: "center"
1521
+ },
1522
+ todayDot: {
1520
1523
  width: CALENDAR_DAY_DOT_SIZE,
1521
1524
  height: CALENDAR_DAY_DOT_SIZE,
1522
- borderRadius: 15,
1523
- backgroundColor: CALENDAR_TODAY_DOT_COLOR,
1524
- marginLeft: -1.5,
1525
- zIndex: 1
1525
+ borderRadius: CALENDAR_DAY_DOT_SIZE / 2,
1526
+ backgroundColor: CALENDAR_TODAY_DOT_COLOR
1526
1527
  },
1527
1528
  pickerBody: {
1528
1529
  width: CALENDAR_DAY_GRID_WIDTH,
@@ -1623,7 +1624,8 @@ var calendarFieldMetrics = StyleSheet.create({
1623
1624
  paddingVertical: 0,
1624
1625
  paddingHorizontal: 0,
1625
1626
  margin: 0,
1626
- ...Platform.OS === "android" ? { includeFontPadding: false } : null,
1627
+ includeFontPadding: false,
1628
+ ...Platform.OS === "android" ? { textAlignVertical: "center" } : null,
1627
1629
  ...Platform.OS === "web" ? {
1628
1630
  outlineStyle: "none"
1629
1631
  } : null
@@ -2010,21 +2012,16 @@ function useCalendarLocale(locale) {
2010
2012
  );
2011
2013
  }
2012
2014
  function resolveDayCellStyle(day) {
2013
- if (day.isDisabled) {
2014
- return [calendarDropdownMetrics.dayCell];
2015
- }
2016
2015
  if (day.isSelected) {
2017
2016
  return [calendarDropdownMetrics.dayCell, calendarDropdownMetrics.dayCellSelected];
2018
2017
  }
2018
+ const useMutedBackground = day.inCurrentMonth && !day.isToday && (day.isPast || day.isDisabled);
2019
2019
  return [
2020
2020
  calendarDropdownMetrics.dayCell,
2021
- day.inCurrentMonth && day.isPast && !day.isToday ? calendarDropdownMetrics.dayCellPast : null
2021
+ useMutedBackground ? calendarDropdownMetrics.dayCellPast : null
2022
2022
  ];
2023
2023
  }
2024
2024
  function resolveDayLabelStyle(day) {
2025
- if (day.isDisabled) {
2026
- return [calendarDropdownMetrics.dayLabel, calendarDropdownMetrics.dayLabelDisabled];
2027
- }
2028
2025
  if (day.isSelected) {
2029
2026
  return [calendarDropdownMetrics.dayLabel, calendarDropdownMetrics.dayLabelSelected];
2030
2027
  }
@@ -2034,7 +2031,7 @@ function resolveDayLabelStyle(day) {
2034
2031
  if (day.isToday) {
2035
2032
  return [calendarDropdownMetrics.dayLabel, calendarDropdownMetrics.dayLabelToday];
2036
2033
  }
2037
- if (day.isPast) {
2034
+ if (day.isPast || day.isDisabled) {
2038
2035
  return [calendarDropdownMetrics.dayLabel, calendarDropdownMetrics.dayLabelMuted];
2039
2036
  }
2040
2037
  return [calendarDropdownMetrics.dayLabel, calendarDropdownMetrics.dayLabelFuture];
@@ -2225,7 +2222,7 @@ function Calendar(props) {
2225
2222
  style: resolveDayCellStyle(day),
2226
2223
  children: [
2227
2224
  /* @__PURE__ */ jsx(Text, { style: resolveDayLabelStyle(day), children: day.date.getDate() }),
2228
- day.isToday && day.inCurrentMonth && !day.isSelected ? /* @__PURE__ */ jsx(View, { style: calendarDropdownMetrics.todayDot }) : null
2225
+ day.isToday && day.inCurrentMonth && !day.isSelected ? /* @__PURE__ */ jsx(View, { style: calendarDropdownMetrics.todayDotWrap, children: /* @__PURE__ */ jsx(View, { style: calendarDropdownMetrics.todayDot }) }) : null
2229
2226
  ]
2230
2227
  },
2231
2228
  day.date.toISOString()