@butternutbox/pawprint-native 0.24.3 → 0.25.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/dist/index.d.cts CHANGED
@@ -1599,6 +1599,7 @@ declare const SelectFieldTrigger: React.ForwardRefExoticComponent<SelectFieldTri
1599
1599
 
1600
1600
  declare const SelectFieldValue: React.ForwardRefExoticComponent<{
1601
1601
  placeholder?: string;
1602
+ hasValue?: boolean;
1602
1603
  } & Omit<ViewProps, "children"> & React.RefAttributes<View>>;
1603
1604
 
1604
1605
  declare const SelectFieldContent: React.ForwardRefExoticComponent<{
@@ -2121,6 +2122,7 @@ type DatePickerOwnProps = {
2121
2122
  showNextControl?: boolean;
2122
2123
  locale?: Locale;
2123
2124
  monthLabel?: string;
2125
+ getMonthLabel?: (year: number, month: number, locale?: Locale) => string;
2124
2126
  weekDayLabels?: [string, string, string, string, string, string, string];
2125
2127
  getDateState?: (date: Date) => DateItemState;
2126
2128
  isDateDisabled?: (date: Date) => boolean;
package/dist/index.d.ts CHANGED
@@ -1599,6 +1599,7 @@ declare const SelectFieldTrigger: React.ForwardRefExoticComponent<SelectFieldTri
1599
1599
 
1600
1600
  declare const SelectFieldValue: React.ForwardRefExoticComponent<{
1601
1601
  placeholder?: string;
1602
+ hasValue?: boolean;
1602
1603
  } & Omit<ViewProps, "children"> & React.RefAttributes<View>>;
1603
1604
 
1604
1605
  declare const SelectFieldContent: React.ForwardRefExoticComponent<{
@@ -2121,6 +2122,7 @@ type DatePickerOwnProps = {
2121
2122
  showNextControl?: boolean;
2122
2123
  locale?: Locale;
2123
2124
  monthLabel?: string;
2125
+ getMonthLabel?: (year: number, month: number, locale?: Locale) => string;
2124
2126
  weekDayLabels?: [string, string, string, string, string, string, string];
2125
2127
  getDateState?: (date: Date) => DateItemState;
2126
2128
  isDateDisabled?: (date: Date) => boolean;
package/dist/index.js CHANGED
@@ -8852,14 +8852,14 @@ var SelectFieldTrigger = React66.forwardRef(
8852
8852
  SelectFieldTrigger.displayName = "SelectField.Trigger";
8853
8853
  var SelectFieldValue = React66.forwardRef(
8854
8854
  (_a, ref) => {
8855
- var _b = _a, { placeholder } = _b, rest = __objRest(_b, ["placeholder"]);
8855
+ var _b = _a, { placeholder, hasValue = true } = _b, rest = __objRest(_b, ["placeholder", "hasValue"]);
8856
8856
  const theme2 = useTheme();
8857
8857
  const { colour, field } = theme2.tokens.components.inputs;
8858
8858
  return /* @__PURE__ */ jsx(View, __spreadProps(__spreadValues({ ref, style: { flex: 1, minWidth: 0 } }, rest), { children: /* @__PURE__ */ jsx(
8859
8859
  Typography,
8860
8860
  {
8861
8861
  token: field.placeholder.default,
8862
- color: colour.field.text.default,
8862
+ color: hasValue ? colour.field.text.default : colour.field.text.placeholder,
8863
8863
  align: "left",
8864
8864
  children: /* @__PURE__ */ jsx(SelectPrimitive3.Value, { placeholder: placeholder != null ? placeholder : "" })
8865
8865
  }
@@ -9236,7 +9236,13 @@ var SelectFieldRoot = React66.forwardRef(
9236
9236
  clearButtonMode: "never",
9237
9237
  accessibilityLabel: "Search options"
9238
9238
  }
9239
- ) : /* @__PURE__ */ jsx(SelectFieldValue, { placeholder })
9239
+ ) : /* @__PURE__ */ jsx(
9240
+ SelectFieldValue,
9241
+ {
9242
+ placeholder,
9243
+ hasValue: Boolean(currentValue)
9244
+ }
9245
+ )
9240
9246
  }
9241
9247
  ),
9242
9248
  description && /* @__PURE__ */ jsx(InputDescription, { state, children: description }),
@@ -11112,6 +11118,7 @@ var DatePicker = React66.forwardRef(
11112
11118
  showNextControl = true,
11113
11119
  locale,
11114
11120
  monthLabel,
11121
+ getMonthLabel,
11115
11122
  weekDayLabels = DEFAULT_WEEK_LABELS,
11116
11123
  getDateState,
11117
11124
  isDateDisabled,
@@ -11131,12 +11138,14 @@ var DatePicker = React66.forwardRef(
11131
11138
  "showNextControl",
11132
11139
  "locale",
11133
11140
  "monthLabel",
11141
+ "getMonthLabel",
11134
11142
  "weekDayLabels",
11135
11143
  "getDateState",
11136
11144
  "isDateDisabled",
11137
11145
  "minDate",
11138
11146
  "maxDate"
11139
11147
  ]);
11148
+ var _a2;
11140
11149
  const theme2 = useTheme();
11141
11150
  const { datePicker } = theme2.tokens.components;
11142
11151
  const dt = datePicker.dateItem;
@@ -11171,8 +11180,8 @@ var DatePicker = React66.forwardRef(
11171
11180
  );
11172
11181
  const resolvedGetDateState = useCallback(
11173
11182
  (date) => {
11174
- var _a2;
11175
- return (_a2 = getDateState == null ? void 0 : getDateState(date)) != null ? _a2 : defaultGetDateState(date);
11183
+ var _a3;
11184
+ return (_a3 = getDateState == null ? void 0 : getDateState(date)) != null ? _a3 : defaultGetDateState(date);
11176
11185
  },
11177
11186
  [getDateState]
11178
11187
  );
@@ -11200,7 +11209,7 @@ var DatePicker = React66.forwardRef(
11200
11209
  },
11201
11210
  [isDateDisabled, minDate, maxDate]
11202
11211
  );
11203
- const resolvedMonthLabel = monthLabel != null ? monthLabel : getDefaultMonthLabel(year, month, locale);
11212
+ const resolvedMonthLabel = (_a2 = monthLabel != null ? monthLabel : getMonthLabel == null ? void 0 : getMonthLabel(year, month, locale)) != null ? _a2 : getDefaultMonthLabel(year, month, locale);
11204
11213
  const calendarRows = useMemo(
11205
11214
  () => buildCalendarGrid(year, month),
11206
11215
  [year, month]
@@ -11211,10 +11220,10 @@ var DatePicker = React66.forwardRef(
11211
11220
  );
11212
11221
  const resolveDateCellConfig = useCallback(
11213
11222
  (date) => {
11214
- var _a2;
11223
+ var _a3;
11215
11224
  const state = resolvedGetDateState(date);
11216
11225
  const isSelectedPrimary = selectedDate != null && isSameDay(date, selectedDate);
11217
- const isSelectedSecondary = (_a2 = selectedDatesSet == null ? void 0 : selectedDatesSet.has(toDateKey(date))) != null ? _a2 : false;
11226
+ const isSelectedSecondary = (_a3 = selectedDatesSet == null ? void 0 : selectedDatesSet.has(toDateKey(date))) != null ? _a3 : false;
11218
11227
  const isSelected = isSelectedPrimary || isSelectedSecondary;
11219
11228
  let indicatorBg = "transparent";
11220
11229
  let indicatorBorderColor = "transparent";