@beweco/aurora-ui 0.6.54 → 0.6.55

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.esm.js CHANGED
@@ -4292,12 +4292,6 @@ function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
4292
4292
  var _a_isEqual1, _ref;
4293
4293
  return (_ref = (_a_isEqual1 = (_a_isEqual = a.isEqual) === null || _a_isEqual === void 0 ? void 0 : _a_isEqual.call(a, b)) !== null && _a_isEqual1 !== void 0 ? _a_isEqual1 : (_b_isEqual = b.isEqual) === null || _b_isEqual === void 0 ? void 0 : _b_isEqual.call(b, a)) !== null && _ref !== void 0 ? _ref : a.identifier === b.identifier;
4294
4294
  }
4295
- function $14e0f24ef4ac5c92$export$461939dd4422153(timeZone) {
4296
- return ($11d87f3f76e88657$export$1b96692a1ba042ac)(Date.now(), timeZone);
4297
- }
4298
- function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone) {
4299
- return ($11d87f3f76e88657$export$93522d1a439f3617)($14e0f24ef4ac5c92$export$461939dd4422153(timeZone));
4300
- }
4301
4295
  function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
4302
4296
  return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
4303
4297
  }
@@ -4439,21 +4433,6 @@ function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguatio
4439
4433
  function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') {
4440
4434
  return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
4441
4435
  }
4442
- function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
4443
- let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);
4444
- let date = new Date(ms + offset);
4445
- let year = date.getUTCFullYear();
4446
- let month = date.getUTCMonth() + 1;
4447
- let day = date.getUTCDate();
4448
- let hour = date.getUTCHours();
4449
- let minute = date.getUTCMinutes();
4450
- let second = date.getUTCSeconds();
4451
- let millisecond = date.getUTCMilliseconds();
4452
- return new ($35ea8db9cb2ccb90$export$d3b7288e7994edea)(year < 1 ? 'BC' : 'AD', year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
4453
- }
4454
- function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
4455
- return new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
4456
- }
4457
4436
  function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
4458
4437
  let hour = 0, minute = 0, second = 0, millisecond = 0;
4459
4438
  if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date);
@@ -4473,36 +4452,7 @@ function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
4473
4452
  ($735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
4474
4453
  return copy;
4475
4454
  }
4476
- function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
4477
- if (date instanceof ($35ea8db9cb2ccb90$export$d3b7288e7994edea)) {
4478
- if (date.timeZone === timeZone) return date;
4479
- return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
4480
- }
4481
- let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);
4482
- return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);
4483
- }
4484
- function $11d87f3f76e88657$export$83aac07b4c37b25(date) {
4485
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
4486
- return new Date(ms);
4487
- }
4488
- function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
4489
- let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
4490
- return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
4491
- }
4492
-
4493
- /*
4494
- * Copyright 2020 Adobe. All rights reserved.
4495
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4496
- * you may not use this file except in compliance with the License. You may obtain a copy
4497
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
4498
- *
4499
- * Unless required by applicable law or agreed to in writing, software distributed under
4500
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4501
- * OF ANY KIND, either express or implied. See the License for the specific language
4502
- * governing permissions and limitations under the License.
4503
- */
4504
4455
 
4505
- const $735220c2d4774dd3$var$ONE_HOUR = 3600000;
4506
4456
  function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
4507
4457
  let mutableDate = date.copy();
4508
4458
  let days = 'hour' in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
@@ -4727,106 +4677,6 @@ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false
4727
4677
  }
4728
4678
  return value;
4729
4679
  }
4730
- function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {
4731
- let ms;
4732
- if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {
4733
- let res = $735220c2d4774dd3$export$e16d8520af44a096(($11d87f3f76e88657$export$b21e0b124e224484)(dateTime), {
4734
- years: duration.years,
4735
- months: duration.months,
4736
- weeks: duration.weeks,
4737
- days: duration.days
4738
- });
4739
- // Changing the date may change the timezone offset, so we need to recompute
4740
- // using the 'compatible' disambiguation.
4741
- ms = ($11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);
4742
- } else // Otherwise, preserve the offset of the original date.
4743
- ms = ($11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
4744
- // Perform time manipulation in milliseconds rather than on the original time fields to account for DST.
4745
- // For example, adding one hour during a DST transition may result in the hour field staying the same or
4746
- // skipping an hour. This results in the offset field changing value instead of the specified field.
4747
- ms += duration.milliseconds || 0;
4748
- ms += (duration.seconds || 0) * 1000;
4749
- ms += (duration.minutes || 0) * 60000;
4750
- ms += (duration.hours || 0) * 3600000;
4751
- let res = ($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone);
4752
- return ($11d87f3f76e88657$export$b4a036af3fc0b032)(res, dateTime.calendar);
4753
- }
4754
- function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {
4755
- return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
4756
- }
4757
- function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, options) {
4758
- // For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes.
4759
- // For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC
4760
- // offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition.
4761
- switch(field){
4762
- case 'hour':
4763
- {
4764
- let min = 0;
4765
- let max = 23;
4766
- if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
4767
- let isPM = dateTime.hour >= 12;
4768
- min = isPM ? 12 : 0;
4769
- max = isPM ? 23 : 11;
4770
- }
4771
- // The minimum and maximum hour may be affected by daylight saving time.
4772
- // For example, it might jump forward at midnight, and skip 1am.
4773
- // Or it might end at midnight and repeat the 11pm hour. To handle this, we get
4774
- // the possible absolute times for the min and max, and find the maximum range
4775
- // that is within the current day.
4776
- let plainDateTime = ($11d87f3f76e88657$export$b21e0b124e224484)(dateTime);
4777
- let minDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
4778
- hour: min
4779
- }), new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4780
- let minAbsolute = [
4781
- ($11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'earlier'),
4782
- ($11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, 'later')
4783
- ].filter((ms)=>($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === minDate.day)[0];
4784
- let maxDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {
4785
- hour: max
4786
- }), new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4787
- let maxAbsolute = [
4788
- ($11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'earlier'),
4789
- ($11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, 'later')
4790
- ].filter((ms)=>($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === maxDate.day).pop();
4791
- // Since hours may repeat, we need to operate on the absolute time in milliseconds.
4792
- // This is done in hours from the Unix epoch so that cycleValue works correctly,
4793
- // and then converted back to milliseconds.
4794
- let ms = ($11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;
4795
- let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR);
4796
- let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR;
4797
- ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder;
4798
- // Now compute the new timezone offset, and convert the absolute time back to local time.
4799
- return ($11d87f3f76e88657$export$b4a036af3fc0b032)(($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
4800
- }
4801
- case 'minute':
4802
- case 'second':
4803
- case 'millisecond':
4804
- // @ts-ignore
4805
- return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options);
4806
- case 'era':
4807
- case 'year':
4808
- case 'month':
4809
- case 'day':
4810
- {
4811
- let res = $735220c2d4774dd3$export$d52ced6badfb9a4c(($11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options);
4812
- let ms = ($11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);
4813
- return ($11d87f3f76e88657$export$b4a036af3fc0b032)(($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
4814
- }
4815
- default:
4816
- throw new Error('Unsupported field ' + field);
4817
- }
4818
- }
4819
- function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
4820
- // Set the date/time fields, and recompute the UTC offset to account for DST changes.
4821
- // We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions.
4822
- let plainDateTime = ($11d87f3f76e88657$export$b21e0b124e224484)(dateTime);
4823
- let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
4824
- // If the resulting plain date time values are equal, return the original time.
4825
- // We don't want to change the offset when setting the time to the same value.
4826
- if (res.compare(plainDateTime) === 0) return dateTime;
4827
- let ms = ($11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation);
4828
- return ($11d87f3f76e88657$export$b4a036af3fc0b032)(($11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
4829
- }
4830
4680
 
4831
4681
  const $fae977aafc393c5c$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
4832
4682
  function $fae977aafc393c5c$export$6b862160d295c8e(value) {
@@ -4855,16 +4705,6 @@ function $fae977aafc393c5c$export$4223de14708adc63(date) {
4855
4705
  // @ts-ignore
4856
4706
  return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
4857
4707
  }
4858
- function $fae977aafc393c5c$var$offsetToString(offset) {
4859
- let sign = Math.sign(offset) < 0 ? '-' : '+';
4860
- offset = Math.abs(offset);
4861
- let offsetHours = Math.floor(offset / 3600000);
4862
- let offsetMinutes = offset % 3600000 / 60000;
4863
- return `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;
4864
- }
4865
- function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
4866
- return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
4867
- }
4868
4708
 
4869
4709
  function _check_private_redeclaration(obj, privateCollection) {
4870
4710
  if (privateCollection.has(obj)) {
@@ -5060,64 +4900,6 @@ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
5060
4900
  ($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
5061
4901
  }
5062
4902
  }
5063
- var // This prevents TypeScript from allowing other types with the same fields to match.
5064
- // @ts-ignore
5065
- $35ea8db9cb2ccb90$var$_type3 = /*#__PURE__*/ new WeakMap();
5066
- class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
5067
- /** Returns a copy of this date. */ copy() {
5068
- if (this.era) return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
5069
- else return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
5070
- }
5071
- /** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {
5072
- return ($735220c2d4774dd3$export$96b1d28349274637)(this, duration);
5073
- }
5074
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {
5075
- return ($735220c2d4774dd3$export$6814caac34ca03c7)(this, duration);
5076
- }
5077
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields, disambiguation) {
5078
- return ($735220c2d4774dd3$export$31b5430eb18be4f8)(this, fields, disambiguation);
5079
- }
5080
- /**
5081
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
5082
- * When the resulting value reaches the limits of the field, it wraps around.
5083
- */ cycle(field, amount, options) {
5084
- return ($735220c2d4774dd3$export$9a297d111fc86b79)(this, field, amount, options);
5085
- }
5086
- /** Converts the date to a native JavaScript Date object. */ toDate() {
5087
- return ($11d87f3f76e88657$export$83aac07b4c37b25)(this);
5088
- }
5089
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */ toString() {
5090
- return ($fae977aafc393c5c$export$bf79f1ebf4b18792)(this);
5091
- }
5092
- /** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {
5093
- return this.toDate().toISOString();
5094
- }
5095
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
5096
- // TODO: Is this a bad idea??
5097
- return this.toDate().getTime() - ($11d87f3f76e88657$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
5098
- }
5099
- constructor(...args){
5100
- (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type3, {
5101
- writable: true,
5102
- value: void 0
5103
- });
5104
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
5105
- let timeZone = args.shift();
5106
- let offset = args.shift();
5107
- this.calendar = calendar;
5108
- this.era = era;
5109
- this.year = year;
5110
- this.month = month;
5111
- this.day = day;
5112
- this.timeZone = timeZone;
5113
- this.offset = offset;
5114
- this.hour = args.shift() || 0;
5115
- this.minute = args.shift() || 0;
5116
- this.second = args.shift() || 0;
5117
- this.millisecond = args.shift() || 0;
5118
- ($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
5119
- }
5120
- }
5121
4903
 
5122
4904
  var Switch = function (_a) {
5123
4905
  var id = _a.id, props = __rest(_a, ["id"]);
@@ -6984,7 +6766,7 @@ var DrawerFiltersHeader = function (_a) {
6984
6766
  return (jsxs("div", { className: "px-6 pt-10", children: [jsx(H2, { className: "text-xl font-semibold text-foreground mb-2", children: title }), jsx(P, { className: "text-default-500", children: description })] }));
6985
6767
  };
6986
6768
 
6987
- var NO_YEAR_CLASS = "[&_[data-type='year']]:sr-only [&_[data-type='literal']:has(+[data-type='year'])]:hidden";
6769
+ var NO_YEAR_CLASS = "[&_[data-type='year']]:hidden [&_[data-type='literal']:has(+[data-type='year'])]:hidden";
6988
6770
  var DayMonthPicker = function (_a) {
6989
6771
  var value = _a.value, onChange = _a.onChange, translations = _a.translations;
6990
6772
  var t = __assign({ dayMonthAriaLabel: "Seleccionar mes y día", dayMonthRangeAriaLabel: "Seleccionar rango de mes y día", dayMonthSingleOption: "Día específico", dayMonthRangeOption: "Rango de fechas" }, translations);
@@ -7001,13 +6783,13 @@ var DayMonthPicker = function (_a) {
7001
6783
  }
7002
6784
  onChange({ type: "dayMonthRange", dayMonth: null, dayMonthRange: null });
7003
6785
  };
7004
- var handleSingleChange = useCallback(function (date) {
6786
+ var handleSingleChange = function (date) {
7005
6787
  onChange({
7006
6788
  type: "dayMonth",
7007
6789
  dayMonth: date,
7008
6790
  dayMonthRange: null,
7009
6791
  });
7010
- }, [onChange]);
6792
+ };
7011
6793
  var handleRangeChange = function (range) {
7012
6794
  onChange({
7013
6795
  type: "dayMonthRange",
@@ -7015,55 +6797,9 @@ var DayMonthPicker = function (_a) {
7015
6797
  dayMonthRange: range,
7016
6798
  });
7017
6799
  };
7018
- var currentYearDate = $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
7019
6800
  var pickerValue = (value === null || value === void 0 ? void 0 : value.type) === "dayMonth" ? value.dayMonth : null;
7020
6801
  var rangeValue = (value === null || value === void 0 ? void 0 : value.type) === "dayMonthRange" ? value.dayMonthRange : null;
7021
- var containerRef = useRef(null);
7022
- // When the user types day+month manually, React Aria auto-moves focus to the sr-only
7023
- // year segment. We detect this via native focusin (which fires for every segment-to-segment
7024
- // focus move, unlike React Aria's onFocus). Instead of dispatching synthetic KeyboardEvents
7025
- // (fragile — depends on React Aria's internal "ready" state), we read aria-valuenow from
7026
- // the day/month segments after a microtask tick (so React has flushed segment renders) and
7027
- // call handleSingleChange directly with a CalendarDate using the current year.
7028
- useEffect(function () {
7029
- var container = containerRef.current;
7030
- if (!container)
7031
- return;
7032
- var handleFocusIn = function (e) {
7033
- var target = e.target;
7034
- if ((target === null || target === void 0 ? void 0 : target.getAttribute("data-type")) !== "year")
7035
- return;
7036
- if (target.getAttribute("aria-valuenow"))
7037
- return; // year already set, controlled picker
7038
- // Defer one tick so React finishes rendering the segment values from the last keydown
7039
- setTimeout(function () {
7040
- var dayEl = container.querySelector('[data-type="day"]');
7041
- var monthEl = container.querySelector('[data-type="month"]');
7042
- var yearEl = container.querySelector('[data-type="year"]');
7043
- var dayVal = dayEl === null || dayEl === void 0 ? void 0 : dayEl.getAttribute("aria-valuenow");
7044
- var monthVal = monthEl === null || monthEl === void 0 ? void 0 : monthEl.getAttribute("aria-valuenow");
7045
- // If year is now set (user typed it or calendar selection), don't override
7046
- if (yearEl === null || yearEl === void 0 ? void 0 : yearEl.getAttribute("aria-valuenow"))
7047
- return;
7048
- if (!dayVal || !monthVal)
7049
- return;
7050
- var day = parseInt(dayVal, 10);
7051
- var month = parseInt(monthVal, 10);
7052
- var year = $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2()).year;
7053
- if (isNaN(day) || isNaN(month))
7054
- return;
7055
- try {
7056
- handleSingleChange(new $35ea8db9cb2ccb90$export$99faa760c7908e4f(year, month, day));
7057
- }
7058
- catch (_a) {
7059
- // CalendarDate throws for invalid combos (e.g. Feb 30), ignore
7060
- }
7061
- }, 0);
7062
- };
7063
- container.addEventListener("focusin", handleFocusIn);
7064
- return function () { return container.removeEventListener("focusin", handleFocusIn); };
7065
- }, [handleSingleChange]);
7066
- return (jsxs("div", { ref: containerRef, className: "w-full flex flex-wrap xs:gap-5 justify-between items-center", children: [jsxs(RadioGroup, { color: "primary", orientation: "horizontal", size: "sm", value: mode, onValueChange: handleModeChange, children: [jsx(Radio, { value: "single", children: t.dayMonthSingleOption }), jsx(Radio, { value: "range", children: t.dayMonthRangeOption })] }), mode === "single" ? (pickerValue ? (jsx(DatePicker, { value: pickerValue, onChange: handleSingleChange, "aria-label": t.dayMonthAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), className: "w-full md:w-auto md:max-w-40 ".concat(NO_YEAR_CLASS) }, "dmp-c")) : (jsx(DatePicker, { placeholderValue: currentYearDate, onChange: handleSingleChange, "aria-label": t.dayMonthAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), className: "w-full md:w-auto md:max-w-40 ".concat(NO_YEAR_CLASS) }, "dmp-u"))) : (rangeValue ? (jsx(DateRangePicker, { value: rangeValue, onChange: handleRangeChange, "aria-label": t.dayMonthRangeAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), className: "w-full md:w-auto md:max-w-xs ".concat(NO_YEAR_CLASS) }, "dmpr-c")) : (jsx(DateRangePicker, { placeholderValue: currentYearDate, onChange: handleRangeChange, "aria-label": t.dayMonthRangeAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), className: "w-full md:w-auto md:max-w-xs ".concat(NO_YEAR_CLASS) }, "dmpr-u")))] }));
6802
+ return (jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center", children: [jsxs(RadioGroup, { color: "primary", orientation: "horizontal", size: "sm", value: mode, onValueChange: handleModeChange, children: [jsx(Radio, { value: "single", children: t.dayMonthSingleOption }), jsx(Radio, { value: "range", children: t.dayMonthRangeOption })] }), mode === "single" ? (jsx(DatePicker, { value: pickerValue, onChange: handleSingleChange, "aria-label": t.dayMonthAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), className: "w-full md:w-auto md:max-w-40 ".concat(NO_YEAR_CLASS) }, "dmp")) : (jsx(DateRangePicker, { value: rangeValue, onChange: handleRangeChange, "aria-label": t.dayMonthRangeAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), className: "w-full md:w-auto md:max-w-xs ".concat(NO_YEAR_CLASS) }, "dmpr"))] }));
7067
6803
  };
7068
6804
 
7069
6805
  /**
@@ -7546,21 +7282,6 @@ var NumberFilter = function (_a) {
7546
7282
  var DrawerFilters = function (_a) {
7547
7283
  var isOpen = _a.isOpen, onOpenChange = _a.onOpenChange, config = _a.config, onApplyFilters = _a.onApplyFilters, onClearFilters = _a.onClearFilters, onCancel = _a.onCancel, className = _a.className, translations = _a.translations, initialValues = _a.initialValues;
7548
7284
  var _b = useState(initialValues !== null && initialValues !== void 0 ? initialValues : {}), filterValues = _b[0], setFilterValues = _b[1];
7549
- // Tracks the last confirmed (applied) state. When the drawer reopens we restore this
7550
- // so the user sees what was last applied — not just the raw initialValues (which the
7551
- // parent can't easily reconstruct from the processed-string output of onApplyFilters).
7552
- var confirmedValuesRef = useRef(initialValues !== null && initialValues !== void 0 ? initialValues : {});
7553
- // Sync when the parent changes initialValues externally (e.g., full reset from outside).
7554
- useEffect(function () {
7555
- confirmedValuesRef.current = initialValues !== null && initialValues !== void 0 ? initialValues : {};
7556
- setFilterValues(initialValues !== null && initialValues !== void 0 ? initialValues : {});
7557
- }, [initialValues]);
7558
- // Restore last confirmed state each time the drawer opens.
7559
- useEffect(function () {
7560
- if (isOpen) {
7561
- setFilterValues(confirmedValuesRef.current);
7562
- }
7563
- }, [isOpen]);
7564
7285
  // Handle changes in individual filters
7565
7286
  var handleFilterChange = useCallback(function (filterKey, value) {
7566
7287
  setFilterValues(function (prev) {
@@ -7580,16 +7301,14 @@ var DrawerFilters = function (_a) {
7580
7301
  onOpenChange(false);
7581
7302
  }
7582
7303
  }, [onOpenChange]);
7583
- // Cancel and close drawer — revert in-progress changes to last confirmed state
7304
+ // Cancel and close drawer
7584
7305
  var handleCancel = useCallback(function () {
7585
- setFilterValues(confirmedValuesRef.current);
7586
7306
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
7587
7307
  onOpenChange(false);
7588
7308
  }, [onCancel, onOpenChange]);
7589
7309
  // Apply filters and process values
7590
7310
  var handleApplyFilters = useCallback(function () {
7591
7311
  var _a, _b;
7592
- confirmedValuesRef.current = filterValues;
7593
7312
  var processedFilters = {};
7594
7313
  var _loop_1 = function (key, value) {
7595
7314
  if (value === undefined || value === null) {
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerFilters.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/DrawerFilters.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAEX,kBAAkB,EAOlB,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuNtD,CAAC"}
1
+ {"version":3,"file":"DrawerFilters.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/DrawerFilters.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAEX,kBAAkB,EAOlB,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoMtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DayMonthPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer-filters/_internal/DayMonthPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAKxE,UAAU,mBAAmB;IAC5B,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC;IACnC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;CAC5C;AAED,UAAU,mBAAmB;IAC5B,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/C,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0JxD,CAAC"}
1
+ {"version":3,"file":"DayMonthPicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer-filters/_internal/DayMonthPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAKxE,UAAU,mBAAmB;IAC5B,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC;IACnC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;CAC5C;AAED,UAAU,mBAAmB;IAC5B,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/C,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoFxD,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { DrawerFilters } from "./DrawerFilters";
2
- export type { DrawerFiltersProps, DrawerFiltersConfig, DrawerFiltersTranslations, FilterData, FilterType, FilterValues, SelectFilterData, SelectFilterValue, MultiSelectFilterData, MultiSelectFilterValue, RangeFilterData, RangeFilterValue, DateFilterData, DateFilterValue, TextFilterValue, NumberFilterValue, } from "./DrawerFilters.types";
2
+ export type { DrawerFiltersProps, DrawerFiltersConfig, DrawerFiltersTranslations, FilterData, FilterType, FilterValues, SelectFilterData, MultiSelectFilterData, RangeFilterData, DateFilterData, DateFilterValue, } from "./DrawerFilters.types";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,YAAY,EACX,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,iBAAiB,GACjB,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,YAAY,EACX,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,eAAe,GACf,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.6.54",
3
+ "version": "0.6.55",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",