@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.
@@ -7,12 +7,12 @@
7
7
  CJS Build start
8
8
  ESM Build start
9
9
  DTS Build start
10
- CJS dist/index.cjs 554.62 KB
10
+ CJS dist/index.cjs 554.97 KB
11
11
  CJS dist/index.cjs.map 1.08 MB
12
- CJS ⚡️ Build success in 7745ms
13
- ESM dist/index.js 523.98 KB
12
+ CJS ⚡️ Build success in 8316ms
13
+ ESM dist/index.js 524.34 KB
14
14
  ESM dist/index.js.map 1.08 MB
15
- ESM ⚡️ Build success in 7749ms
16
- DTS ⚡️ Build success in 22188ms
17
- DTS dist/index.d.cts 103.19 KB
18
- DTS dist/index.d.ts 103.19 KB
15
+ ESM ⚡️ Build success in 8318ms
16
+ DTS ⚡️ Build success in 23693ms
17
+ DTS dist/index.d.cts 103.29 KB
18
+ DTS dist/index.d.ts 103.29 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 0.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d616d1f: allow custom month labels on the date picker
8
+
9
+ ### Patch Changes
10
+
11
+ - 61284fb: Update SelectFieldValue to reflect current value state
12
+
3
13
  ## 0.24.3
4
14
 
5
15
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -8890,14 +8890,14 @@ var SelectFieldTrigger = React66__default.default.forwardRef(
8890
8890
  SelectFieldTrigger.displayName = "SelectField.Trigger";
8891
8891
  var SelectFieldValue = React66__default.default.forwardRef(
8892
8892
  (_a, ref) => {
8893
- var _b = _a, { placeholder } = _b, rest = __objRest(_b, ["placeholder"]);
8893
+ var _b = _a, { placeholder, hasValue = true } = _b, rest = __objRest(_b, ["placeholder", "hasValue"]);
8894
8894
  const theme2 = react.useTheme();
8895
8895
  const { colour, field } = theme2.tokens.components.inputs;
8896
8896
  return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, __spreadProps(__spreadValues({ ref, style: { flex: 1, minWidth: 0 } }, rest), { children: /* @__PURE__ */ jsxRuntime.jsx(
8897
8897
  Typography,
8898
8898
  {
8899
8899
  token: field.placeholder.default,
8900
- color: colour.field.text.default,
8900
+ color: hasValue ? colour.field.text.default : colour.field.text.placeholder,
8901
8901
  align: "left",
8902
8902
  children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive3__namespace.Value, { placeholder: placeholder != null ? placeholder : "" })
8903
8903
  }
@@ -9274,7 +9274,13 @@ var SelectFieldRoot = React66__default.default.forwardRef(
9274
9274
  clearButtonMode: "never",
9275
9275
  accessibilityLabel: "Search options"
9276
9276
  }
9277
- ) : /* @__PURE__ */ jsxRuntime.jsx(SelectFieldValue, { placeholder })
9277
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
9278
+ SelectFieldValue,
9279
+ {
9280
+ placeholder,
9281
+ hasValue: Boolean(currentValue)
9282
+ }
9283
+ )
9278
9284
  }
9279
9285
  ),
9280
9286
  description && /* @__PURE__ */ jsxRuntime.jsx(InputDescription, { state, children: description }),
@@ -11150,6 +11156,7 @@ var DatePicker = React66__default.default.forwardRef(
11150
11156
  showNextControl = true,
11151
11157
  locale,
11152
11158
  monthLabel,
11159
+ getMonthLabel,
11153
11160
  weekDayLabels = DEFAULT_WEEK_LABELS,
11154
11161
  getDateState,
11155
11162
  isDateDisabled,
@@ -11169,12 +11176,14 @@ var DatePicker = React66__default.default.forwardRef(
11169
11176
  "showNextControl",
11170
11177
  "locale",
11171
11178
  "monthLabel",
11179
+ "getMonthLabel",
11172
11180
  "weekDayLabels",
11173
11181
  "getDateState",
11174
11182
  "isDateDisabled",
11175
11183
  "minDate",
11176
11184
  "maxDate"
11177
11185
  ]);
11186
+ var _a2;
11178
11187
  const theme2 = react.useTheme();
11179
11188
  const { datePicker } = theme2.tokens.components;
11180
11189
  const dt = datePicker.dateItem;
@@ -11209,8 +11218,8 @@ var DatePicker = React66__default.default.forwardRef(
11209
11218
  );
11210
11219
  const resolvedGetDateState = React66.useCallback(
11211
11220
  (date) => {
11212
- var _a2;
11213
- return (_a2 = getDateState == null ? void 0 : getDateState(date)) != null ? _a2 : defaultGetDateState(date);
11221
+ var _a3;
11222
+ return (_a3 = getDateState == null ? void 0 : getDateState(date)) != null ? _a3 : defaultGetDateState(date);
11214
11223
  },
11215
11224
  [getDateState]
11216
11225
  );
@@ -11238,7 +11247,7 @@ var DatePicker = React66__default.default.forwardRef(
11238
11247
  },
11239
11248
  [isDateDisabled, minDate, maxDate]
11240
11249
  );
11241
- const resolvedMonthLabel = monthLabel != null ? monthLabel : getDefaultMonthLabel(year, month, locale);
11250
+ const resolvedMonthLabel = (_a2 = monthLabel != null ? monthLabel : getMonthLabel == null ? void 0 : getMonthLabel(year, month, locale)) != null ? _a2 : getDefaultMonthLabel(year, month, locale);
11242
11251
  const calendarRows = React66.useMemo(
11243
11252
  () => buildCalendarGrid(year, month),
11244
11253
  [year, month]
@@ -11249,10 +11258,10 @@ var DatePicker = React66__default.default.forwardRef(
11249
11258
  );
11250
11259
  const resolveDateCellConfig = React66.useCallback(
11251
11260
  (date) => {
11252
- var _a2;
11261
+ var _a3;
11253
11262
  const state = resolvedGetDateState(date);
11254
11263
  const isSelectedPrimary = selectedDate != null && dateFns.isSameDay(date, selectedDate);
11255
- const isSelectedSecondary = (_a2 = selectedDatesSet == null ? void 0 : selectedDatesSet.has(toDateKey(date))) != null ? _a2 : false;
11264
+ const isSelectedSecondary = (_a3 = selectedDatesSet == null ? void 0 : selectedDatesSet.has(toDateKey(date))) != null ? _a3 : false;
11256
11265
  const isSelected = isSelectedPrimary || isSelectedSecondary;
11257
11266
  let indicatorBg = "transparent";
11258
11267
  let indicatorBorderColor = "transparent";