@umami/react-zen 0.83.0 → 0.85.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.css +13 -10
- package/dist/index.d.ts +9 -2
- package/dist/index.js +102 -38
- package/dist/index.mjs +102 -38
- package/package.json +2 -1
- package/styles.css +13 -10
package/dist/index.css
CHANGED
|
@@ -2844,35 +2844,35 @@ body a.Button_button__NDYwM {
|
|
|
2844
2844
|
}
|
|
2845
2845
|
|
|
2846
2846
|
/* virtual-css:css:090024871002459dc1fbfd39039799c3 */
|
|
2847
|
-
.
|
|
2847
|
+
.Calendar_calendar__ZDMwM {
|
|
2848
2848
|
width: fit-content;
|
|
2849
2849
|
max-width: 100%;
|
|
2850
2850
|
font-size: var(--font-size);
|
|
2851
2851
|
color: var(--font-color);
|
|
2852
2852
|
}
|
|
2853
|
-
.
|
|
2853
|
+
.Calendar_header__ZDE0Y {
|
|
2854
2854
|
display: flex;
|
|
2855
2855
|
align-items: center;
|
|
2856
2856
|
margin-bottom: var(--spacing-4);
|
|
2857
2857
|
}
|
|
2858
|
-
.
|
|
2858
|
+
.Calendar_calendar__ZDMwM .Calendar_heading__MTk3Z {
|
|
2859
2859
|
flex: 1;
|
|
2860
2860
|
margin: 0;
|
|
2861
2861
|
text-align: center;
|
|
2862
2862
|
font-size: var(--font-size);
|
|
2863
2863
|
font-weight: 700;
|
|
2864
2864
|
}
|
|
2865
|
-
.
|
|
2865
|
+
.Calendar_button__MmIyO {
|
|
2866
2866
|
display: flex;
|
|
2867
2867
|
align-items: center;
|
|
2868
2868
|
justify-content: center;
|
|
2869
2869
|
border: 0;
|
|
2870
2870
|
background: transparent;
|
|
2871
2871
|
}
|
|
2872
|
-
.
|
|
2872
|
+
.Calendar_headerCell__MjEwY {
|
|
2873
2873
|
font-weight: 700;
|
|
2874
2874
|
}
|
|
2875
|
-
.
|
|
2875
|
+
.Calendar_cell__MTc4M {
|
|
2876
2876
|
width: 3rem;
|
|
2877
2877
|
line-height: 3rem;
|
|
2878
2878
|
text-align: center;
|
|
@@ -2882,22 +2882,25 @@ body a.Button_button__NDYwM {
|
|
|
2882
2882
|
margin: var(--gap-xs);
|
|
2883
2883
|
forced-color-adjust: none;
|
|
2884
2884
|
}
|
|
2885
|
-
.
|
|
2885
|
+
.Calendar_cell__MTc4M:hover {
|
|
2886
2886
|
color: var(--highlight-font-color);
|
|
2887
2887
|
background: var(--highlight-color);
|
|
2888
2888
|
}
|
|
2889
|
-
.
|
|
2889
|
+
.Calendar_cell__MTc4M[data-outside-month] {
|
|
2890
2890
|
display: none;
|
|
2891
2891
|
}
|
|
2892
|
-
.
|
|
2892
|
+
.Calendar_cell__MTc4M[data-focus-visible] {
|
|
2893
2893
|
outline: 2px solid var(--font-color);
|
|
2894
2894
|
outline-offset: 2px;
|
|
2895
2895
|
}
|
|
2896
|
-
.
|
|
2896
|
+
.Calendar_cell__MTc4M[data-selected] {
|
|
2897
2897
|
color: var(--primary-font-color);
|
|
2898
2898
|
border-color: var(--primary-color);
|
|
2899
2899
|
background: var(--primary-color);
|
|
2900
2900
|
}
|
|
2901
|
+
.Calendar_cell__MTc4M[data-disabled] {
|
|
2902
|
+
color: var(--font-color-disabled);
|
|
2903
|
+
}
|
|
2901
2904
|
|
|
2902
2905
|
/* virtual-css:css:98988f24a8f1f9732e1edf323cdce610 */
|
|
2903
2906
|
.Checkbox_checkbox__OTliN {
|
package/dist/index.d.ts
CHANGED
|
@@ -356,7 +356,13 @@ declare module '@umami/react-zen/Button' {
|
|
|
356
356
|
|
|
357
357
|
declare module '@umami/react-zen/Calendar' {
|
|
358
358
|
import { CalendarProps } from 'react-aria-components';
|
|
359
|
-
function Calendar({ className, ...props }: CalendarProps<any>
|
|
359
|
+
function Calendar({ className, value, minValue, maxValue, defaultValue, onChange, ...props }: CalendarProps<any> & {
|
|
360
|
+
value: Date;
|
|
361
|
+
minValue?: Date;
|
|
362
|
+
maxValue?: Date;
|
|
363
|
+
defaultValue?: Date;
|
|
364
|
+
onChange?: (value?: Date) => void;
|
|
365
|
+
}): import("react").JSX.Element;
|
|
360
366
|
export { Calendar };
|
|
361
367
|
export type { CalendarProps };
|
|
362
368
|
}
|
|
@@ -959,8 +965,9 @@ declare module '@umami/react-zen/ToggleGroup' {
|
|
|
959
965
|
import { TagGroupProps, TagProps } from 'react-aria-components';
|
|
960
966
|
export interface ToggleGroupProps extends TagGroupProps {
|
|
961
967
|
label?: string;
|
|
968
|
+
onChange?: (value: string | string[]) => void;
|
|
962
969
|
}
|
|
963
|
-
function ToggleGroup({ label, className, children, ...props }: ToggleGroupProps): import("react").JSX.Element;
|
|
970
|
+
function ToggleGroup({ label, className, children, selectionMode, onChange, ...props }: ToggleGroupProps): import("react").JSX.Element;
|
|
964
971
|
export interface ToggleGroupItemProps extends TagProps {
|
|
965
972
|
}
|
|
966
973
|
function ToggleGroupItem({ className, children, ...props }: ToggleGroupItemProps): import("react").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -4743,12 +4743,12 @@ function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings, packageName) {
|
|
|
4743
4743
|
]);
|
|
4744
4744
|
}
|
|
4745
4745
|
|
|
4746
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4746
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/utils.mjs
|
|
4747
4747
|
function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
|
|
4748
4748
|
return amount - numerator * Math.floor(amount / numerator);
|
|
4749
4749
|
}
|
|
4750
4750
|
|
|
4751
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4751
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/GregorianCalendar.mjs
|
|
4752
4752
|
var $3b62074eb05584b2$var$EPOCH = 1721426;
|
|
4753
4753
|
function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
|
|
4754
4754
|
year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
|
|
@@ -4863,7 +4863,7 @@ var $3b62074eb05584b2$export$80ee6245ec4f29ec = class {
|
|
|
4863
4863
|
}
|
|
4864
4864
|
};
|
|
4865
4865
|
|
|
4866
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4866
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/weekStartData.mjs
|
|
4867
4867
|
var $2fe286d2fb449abb$export$7a5acbd77d414bd9 = {
|
|
4868
4868
|
"001": 1,
|
|
4869
4869
|
AD: 1,
|
|
@@ -4962,7 +4962,7 @@ var $2fe286d2fb449abb$export$7a5acbd77d414bd9 = {
|
|
|
4962
4962
|
XK: 1
|
|
4963
4963
|
};
|
|
4964
4964
|
|
|
4965
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4965
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/queries.mjs
|
|
4966
4966
|
function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b) {
|
|
4967
4967
|
b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
|
|
4968
4968
|
return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
|
|
@@ -4974,7 +4974,12 @@ function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a, b) {
|
|
|
4974
4974
|
return a.era === b.era && a.year === b.year && a.month === b.month;
|
|
4975
4975
|
}
|
|
4976
4976
|
function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a, b) {
|
|
4977
|
-
return a.calendar
|
|
4977
|
+
return $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b);
|
|
4978
|
+
}
|
|
4979
|
+
function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
|
|
4980
|
+
var _a_isEqual, _b_isEqual;
|
|
4981
|
+
var _a_isEqual1, _ref;
|
|
4982
|
+
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;
|
|
4978
4983
|
}
|
|
4979
4984
|
function $14e0f24ef4ac5c92$export$629b0a497aa65267(date, timeZone) {
|
|
4980
4985
|
return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone));
|
|
@@ -5071,7 +5076,7 @@ function $14e0f24ef4ac5c92$export$a75f2bff57811055(a, b) {
|
|
|
5071
5076
|
return a || b;
|
|
5072
5077
|
}
|
|
5073
5078
|
|
|
5074
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5079
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/conversion.mjs
|
|
5075
5080
|
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
|
|
5076
5081
|
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
5077
5082
|
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
|
|
@@ -5197,7 +5202,7 @@ function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
|
|
|
5197
5202
|
return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
5198
5203
|
}
|
|
5199
5204
|
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
5200
|
-
if (date.calendar
|
|
5205
|
+
if ((0, $14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
|
|
5201
5206
|
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
5202
5207
|
let copy = date.copy();
|
|
5203
5208
|
copy.calendar = calendar;
|
|
@@ -5225,7 +5230,7 @@ function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
|
|
|
5225
5230
|
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
|
|
5226
5231
|
}
|
|
5227
5232
|
|
|
5228
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5233
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/manipulation.mjs
|
|
5229
5234
|
var $735220c2d4774dd3$var$ONE_HOUR = 36e5;
|
|
5230
5235
|
function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
|
|
5231
5236
|
let mutableDate = date.copy();
|
|
@@ -5510,7 +5515,7 @@ function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguat
|
|
|
5510
5515
|
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
5511
5516
|
}
|
|
5512
5517
|
|
|
5513
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5518
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/string.mjs
|
|
5514
5519
|
var $fae977aafc393c5c$var$requiredDurationTimeGroups = [
|
|
5515
5520
|
"hours",
|
|
5516
5521
|
"minutes",
|
|
@@ -5547,7 +5552,7 @@ function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
|
|
|
5547
5552
|
return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
|
|
5548
5553
|
}
|
|
5549
5554
|
|
|
5550
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5555
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/CalendarDate.mjs
|
|
5551
5556
|
function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
5552
5557
|
let calendar = typeof args[0] === "object" ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
5553
5558
|
let era;
|
|
@@ -5750,7 +5755,7 @@ var $35ea8db9cb2ccb90$export$d3b7288e7994edea = class _$35ea8db9cb2ccb90$export$
|
|
|
5750
5755
|
}
|
|
5751
5756
|
};
|
|
5752
5757
|
|
|
5753
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5758
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/JapaneseCalendar.mjs
|
|
5754
5759
|
var $62225008020f0a13$var$ERA_START_DATES = [
|
|
5755
5760
|
[
|
|
5756
5761
|
1868,
|
|
@@ -5901,7 +5906,7 @@ function $62225008020f0a13$var$getMinimums(date) {
|
|
|
5901
5906
|
}
|
|
5902
5907
|
}
|
|
5903
5908
|
|
|
5904
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5909
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/BuddhistCalendar.mjs
|
|
5905
5910
|
var $8d73d47422ca7302$var$BUDDHIST_ERA_START = -543;
|
|
5906
5911
|
var $8d73d47422ca7302$export$42d20a78301dee44 = class extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
|
|
5907
5912
|
fromJulianDay(jd) {
|
|
@@ -5931,7 +5936,7 @@ function $8d73d47422ca7302$var$toGregorian(date) {
|
|
|
5931
5936
|
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, date.month, date.day);
|
|
5932
5937
|
}
|
|
5933
5938
|
|
|
5934
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5939
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/TaiwanCalendar.mjs
|
|
5935
5940
|
var $5f31bd6f0c8940b2$var$TAIWAN_ERA_START = 1911;
|
|
5936
5941
|
function $5f31bd6f0c8940b2$var$gregorianYear(date) {
|
|
5937
5942
|
return date.era === "minguo" ? date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START : 1 - date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START;
|
|
@@ -5986,7 +5991,7 @@ function $5f31bd6f0c8940b2$var$toGregorian(date) {
|
|
|
5986
5991
|
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, date.month, date.day);
|
|
5987
5992
|
}
|
|
5988
5993
|
|
|
5989
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5994
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/PersianCalendar.mjs
|
|
5990
5995
|
var $f3ed2e4472ae7e25$var$PERSIAN_EPOCH = 1948320;
|
|
5991
5996
|
var $f3ed2e4472ae7e25$var$MONTH_START = [
|
|
5992
5997
|
0,
|
|
@@ -6041,7 +6046,7 @@ var $f3ed2e4472ae7e25$export$37fccdbfd14c5939 = class {
|
|
|
6041
6046
|
}
|
|
6042
6047
|
};
|
|
6043
6048
|
|
|
6044
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6049
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/IndianCalendar.mjs
|
|
6045
6050
|
var $82c358003bdda0a8$var$INDIAN_ERA_START = 78;
|
|
6046
6051
|
var $82c358003bdda0a8$var$INDIAN_YEAR_START = 80;
|
|
6047
6052
|
var $82c358003bdda0a8$export$39f31c639fa15726 = class extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
|
|
@@ -6114,7 +6119,7 @@ var $82c358003bdda0a8$export$39f31c639fa15726 = class extends (0, $3b62074eb0558
|
|
|
6114
6119
|
}
|
|
6115
6120
|
};
|
|
6116
6121
|
|
|
6117
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6122
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/IslamicCalendar.mjs
|
|
6118
6123
|
var $f2f3e0e3a817edbd$var$CIVIL_EPOC = 1948440;
|
|
6119
6124
|
var $f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC = 1948439;
|
|
6120
6125
|
var $f2f3e0e3a817edbd$var$UMALQURA_YEAR_START = 1300;
|
|
@@ -6250,7 +6255,7 @@ var $f2f3e0e3a817edbd$export$5baab4758c231076 = class extends $f2f3e0e3a817edbd$
|
|
|
6250
6255
|
}
|
|
6251
6256
|
};
|
|
6252
6257
|
|
|
6253
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6258
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/HebrewCalendar.mjs
|
|
6254
6259
|
var $7c5f6fbf42389787$var$HEBREW_EPOCH = 347997;
|
|
6255
6260
|
var $7c5f6fbf42389787$var$HOUR_PARTS = 1080;
|
|
6256
6261
|
var $7c5f6fbf42389787$var$DAY_PARTS = 24 * $7c5f6fbf42389787$var$HOUR_PARTS;
|
|
@@ -6360,7 +6365,7 @@ var $7c5f6fbf42389787$export$ca405048b8fb5af = class {
|
|
|
6360
6365
|
}
|
|
6361
6366
|
};
|
|
6362
6367
|
|
|
6363
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6368
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/EthiopicCalendar.mjs
|
|
6364
6369
|
var $b956b2d7a6cf451f$var$ETHIOPIC_EPOCH = 1723856;
|
|
6365
6370
|
var $b956b2d7a6cf451f$var$COPTIC_EPOCH = 1824665;
|
|
6366
6371
|
var $b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA = 5500;
|
|
@@ -6484,7 +6489,7 @@ var $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1 = class extends $b956b2d7a6cf451f$
|
|
|
6484
6489
|
}
|
|
6485
6490
|
};
|
|
6486
6491
|
|
|
6487
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6492
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/createCalendar.mjs
|
|
6488
6493
|
function $64244302c3013299$export$dd0bbc9b26defe37(name) {
|
|
6489
6494
|
switch (name) {
|
|
6490
6495
|
case "buddhist":
|
|
@@ -6517,7 +6522,7 @@ function $64244302c3013299$export$dd0bbc9b26defe37(name) {
|
|
|
6517
6522
|
}
|
|
6518
6523
|
}
|
|
6519
6524
|
|
|
6520
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6525
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/DateFormatter.mjs
|
|
6521
6526
|
var $fb18d541ea1ad717$var$formatterCache = /* @__PURE__ */ new Map();
|
|
6522
6527
|
var $fb18d541ea1ad717$export$ad991b66133851cf = class {
|
|
6523
6528
|
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
@@ -29986,23 +29991,63 @@ function Breadcrumb2({ children, className, ...props }) {
|
|
|
29986
29991
|
// src/components/Calendar.tsx
|
|
29987
29992
|
var import_classnames16 = __toESM(require_classnames());
|
|
29988
29993
|
|
|
29994
|
+
// src/lib/date.ts
|
|
29995
|
+
function toCalendarDate(date) {
|
|
29996
|
+
if (date instanceof $35ea8db9cb2ccb90$export$99faa760c7908e4f) {
|
|
29997
|
+
return date;
|
|
29998
|
+
}
|
|
29999
|
+
return date ? new $35ea8db9cb2ccb90$export$99faa760c7908e4f(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate()) : date;
|
|
30000
|
+
}
|
|
30001
|
+
function fromCalendarDate(date) {
|
|
30002
|
+
if (date instanceof $35ea8db9cb2ccb90$export$99faa760c7908e4f) {
|
|
30003
|
+
return date.toDate($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
|
|
30004
|
+
}
|
|
30005
|
+
return date;
|
|
30006
|
+
}
|
|
30007
|
+
|
|
29989
30008
|
// css-modules:E:\dev\umami-react-zen\src\components\Calendar.module.css
|
|
29990
|
-
var Calendar_default = { "calendar": "
|
|
30009
|
+
var Calendar_default = { "calendar": "Calendar_calendar__ZDMwM", "header": "Calendar_header__ZDE0Y", "heading": "Calendar_heading__MTk3Z", "button": "Calendar_button__MmIyO", "headerCell": "Calendar_headerCell__MjEwY", "cell": "Calendar_cell__MTc4M" };
|
|
29991
30010
|
|
|
29992
30011
|
// src/components/Calendar.tsx
|
|
29993
30012
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
29994
|
-
function Calendar2({
|
|
29995
|
-
|
|
29996
|
-
|
|
29997
|
-
|
|
29998
|
-
|
|
29999
|
-
|
|
30000
|
-
|
|
30001
|
-
|
|
30002
|
-
|
|
30003
|
-
|
|
30004
|
-
|
|
30005
|
-
|
|
30013
|
+
function Calendar2({
|
|
30014
|
+
className,
|
|
30015
|
+
value,
|
|
30016
|
+
minValue,
|
|
30017
|
+
maxValue,
|
|
30018
|
+
defaultValue,
|
|
30019
|
+
onChange,
|
|
30020
|
+
...props
|
|
30021
|
+
}) {
|
|
30022
|
+
const dateProps = {
|
|
30023
|
+
value: toCalendarDate(value),
|
|
30024
|
+
minValue: toCalendarDate(minValue),
|
|
30025
|
+
maxValue: toCalendarDate(maxValue),
|
|
30026
|
+
defaultValue: toCalendarDate(defaultValue)
|
|
30027
|
+
};
|
|
30028
|
+
const handleChange = (date) => {
|
|
30029
|
+
onChange?.(fromCalendarDate(date));
|
|
30030
|
+
};
|
|
30031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
30032
|
+
$dfd62f934fc76fed$export$e1aef45b828286de,
|
|
30033
|
+
{
|
|
30034
|
+
...props,
|
|
30035
|
+
...dateProps,
|
|
30036
|
+
className: (0, import_classnames16.default)(Calendar_default.calendar, className),
|
|
30037
|
+
onChange: handleChange,
|
|
30038
|
+
children: [
|
|
30039
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("header", { className: Calendar_default.header, children: [
|
|
30040
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button2, { slot: "previous", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { rotate: 180, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icons.Chevron, {}) }) }),
|
|
30041
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)($5cb03073d3f54797$export$a8a3e93435678ff9, { className: Calendar_default.heading }),
|
|
30042
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Button2, { slot: "next", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icons.Chevron, {}) }) })
|
|
30043
|
+
] }),
|
|
30044
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)($dfd62f934fc76fed$export$5bd780d491cfc46c, { children: [
|
|
30045
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)($dfd62f934fc76fed$export$22e2d15eaa4d2377, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)($dfd62f934fc76fed$export$ad2135cac3a11b3d, { className: Calendar_default.headerCell, children: day }) }),
|
|
30046
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)($dfd62f934fc76fed$export$e11f8ba65d857bff, { className: Calendar_default.body, children: (date) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)($dfd62f934fc76fed$export$5d847498420df57b, { className: Calendar_default.cell, date }) })
|
|
30047
|
+
] })
|
|
30048
|
+
]
|
|
30049
|
+
}
|
|
30050
|
+
);
|
|
30006
30051
|
}
|
|
30007
30052
|
|
|
30008
30053
|
// src/components/Checkbox.tsx
|
|
@@ -31330,11 +31375,30 @@ var ToggleGroup_default = { "group": "ToggleGroup_group__Y2YyN", "list": "Toggle
|
|
|
31330
31375
|
|
|
31331
31376
|
// src/components/ToggleGroup.tsx
|
|
31332
31377
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
31333
|
-
function ToggleGroup({
|
|
31334
|
-
|
|
31335
|
-
|
|
31336
|
-
|
|
31337
|
-
|
|
31378
|
+
function ToggleGroup({
|
|
31379
|
+
label,
|
|
31380
|
+
className,
|
|
31381
|
+
children,
|
|
31382
|
+
selectionMode = "single",
|
|
31383
|
+
onChange,
|
|
31384
|
+
...props
|
|
31385
|
+
}) {
|
|
31386
|
+
const handleChange = (keys) => {
|
|
31387
|
+
onChange?.(Array.from(keys).map((k) => k.toString()));
|
|
31388
|
+
};
|
|
31389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
31390
|
+
$eaf9e70818b436db$export$67ea30858aaf75e3,
|
|
31391
|
+
{
|
|
31392
|
+
...props,
|
|
31393
|
+
selectionMode,
|
|
31394
|
+
onSelectionChange: handleChange,
|
|
31395
|
+
className: (0, import_classnames51.default)(ToggleGroup_default.group, className),
|
|
31396
|
+
children: [
|
|
31397
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Label2, { children: label }),
|
|
31398
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)($eaf9e70818b436db$export$f9fef0f55402315b, { className: ToggleGroup_default.list, children })
|
|
31399
|
+
]
|
|
31400
|
+
}
|
|
31401
|
+
);
|
|
31338
31402
|
}
|
|
31339
31403
|
function ToggleGroupItem({ className, children, ...props }) {
|
|
31340
31404
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)($eaf9e70818b436db$export$3288d34c523a1192, { ...props, className: (0, import_classnames51.default)(ToggleGroup_default.item, className), children });
|
package/dist/index.mjs
CHANGED
|
@@ -4632,12 +4632,12 @@ function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings, packageName) {
|
|
|
4632
4632
|
]);
|
|
4633
4633
|
}
|
|
4634
4634
|
|
|
4635
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4635
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/utils.mjs
|
|
4636
4636
|
function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
|
|
4637
4637
|
return amount - numerator * Math.floor(amount / numerator);
|
|
4638
4638
|
}
|
|
4639
4639
|
|
|
4640
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4640
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/GregorianCalendar.mjs
|
|
4641
4641
|
var $3b62074eb05584b2$var$EPOCH = 1721426;
|
|
4642
4642
|
function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
|
|
4643
4643
|
year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
|
|
@@ -4752,7 +4752,7 @@ var $3b62074eb05584b2$export$80ee6245ec4f29ec = class {
|
|
|
4752
4752
|
}
|
|
4753
4753
|
};
|
|
4754
4754
|
|
|
4755
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4755
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/weekStartData.mjs
|
|
4756
4756
|
var $2fe286d2fb449abb$export$7a5acbd77d414bd9 = {
|
|
4757
4757
|
"001": 1,
|
|
4758
4758
|
AD: 1,
|
|
@@ -4851,7 +4851,7 @@ var $2fe286d2fb449abb$export$7a5acbd77d414bd9 = {
|
|
|
4851
4851
|
XK: 1
|
|
4852
4852
|
};
|
|
4853
4853
|
|
|
4854
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4854
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/queries.mjs
|
|
4855
4855
|
function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b) {
|
|
4856
4856
|
b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
|
|
4857
4857
|
return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
|
|
@@ -4863,7 +4863,12 @@ function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a, b) {
|
|
|
4863
4863
|
return a.era === b.era && a.year === b.year && a.month === b.month;
|
|
4864
4864
|
}
|
|
4865
4865
|
function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a, b) {
|
|
4866
|
-
return a.calendar
|
|
4866
|
+
return $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b);
|
|
4867
|
+
}
|
|
4868
|
+
function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
|
|
4869
|
+
var _a_isEqual, _b_isEqual;
|
|
4870
|
+
var _a_isEqual1, _ref;
|
|
4871
|
+
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;
|
|
4867
4872
|
}
|
|
4868
4873
|
function $14e0f24ef4ac5c92$export$629b0a497aa65267(date, timeZone) {
|
|
4869
4874
|
return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone));
|
|
@@ -4960,7 +4965,7 @@ function $14e0f24ef4ac5c92$export$a75f2bff57811055(a, b) {
|
|
|
4960
4965
|
return a || b;
|
|
4961
4966
|
}
|
|
4962
4967
|
|
|
4963
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
4968
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/conversion.mjs
|
|
4964
4969
|
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
|
|
4965
4970
|
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
4966
4971
|
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
|
|
@@ -5086,7 +5091,7 @@ function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
|
|
|
5086
5091
|
return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
5087
5092
|
}
|
|
5088
5093
|
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
|
|
5089
|
-
if (date.calendar
|
|
5094
|
+
if ((0, $14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
|
|
5090
5095
|
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
5091
5096
|
let copy = date.copy();
|
|
5092
5097
|
copy.calendar = calendar;
|
|
@@ -5114,7 +5119,7 @@ function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
|
|
|
5114
5119
|
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
|
|
5115
5120
|
}
|
|
5116
5121
|
|
|
5117
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5122
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/manipulation.mjs
|
|
5118
5123
|
var $735220c2d4774dd3$var$ONE_HOUR = 36e5;
|
|
5119
5124
|
function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
|
|
5120
5125
|
let mutableDate = date.copy();
|
|
@@ -5399,7 +5404,7 @@ function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguat
|
|
|
5399
5404
|
return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);
|
|
5400
5405
|
}
|
|
5401
5406
|
|
|
5402
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5407
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/string.mjs
|
|
5403
5408
|
var $fae977aafc393c5c$var$requiredDurationTimeGroups = [
|
|
5404
5409
|
"hours",
|
|
5405
5410
|
"minutes",
|
|
@@ -5436,7 +5441,7 @@ function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
|
|
|
5436
5441
|
return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
|
|
5437
5442
|
}
|
|
5438
5443
|
|
|
5439
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5444
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/CalendarDate.mjs
|
|
5440
5445
|
function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
5441
5446
|
let calendar = typeof args[0] === "object" ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
5442
5447
|
let era;
|
|
@@ -5639,7 +5644,7 @@ var $35ea8db9cb2ccb90$export$d3b7288e7994edea = class _$35ea8db9cb2ccb90$export$
|
|
|
5639
5644
|
}
|
|
5640
5645
|
};
|
|
5641
5646
|
|
|
5642
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5647
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/JapaneseCalendar.mjs
|
|
5643
5648
|
var $62225008020f0a13$var$ERA_START_DATES = [
|
|
5644
5649
|
[
|
|
5645
5650
|
1868,
|
|
@@ -5790,7 +5795,7 @@ function $62225008020f0a13$var$getMinimums(date) {
|
|
|
5790
5795
|
}
|
|
5791
5796
|
}
|
|
5792
5797
|
|
|
5793
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5798
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/BuddhistCalendar.mjs
|
|
5794
5799
|
var $8d73d47422ca7302$var$BUDDHIST_ERA_START = -543;
|
|
5795
5800
|
var $8d73d47422ca7302$export$42d20a78301dee44 = class extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
|
|
5796
5801
|
fromJulianDay(jd) {
|
|
@@ -5820,7 +5825,7 @@ function $8d73d47422ca7302$var$toGregorian(date) {
|
|
|
5820
5825
|
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, date.month, date.day);
|
|
5821
5826
|
}
|
|
5822
5827
|
|
|
5823
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5828
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/TaiwanCalendar.mjs
|
|
5824
5829
|
var $5f31bd6f0c8940b2$var$TAIWAN_ERA_START = 1911;
|
|
5825
5830
|
function $5f31bd6f0c8940b2$var$gregorianYear(date) {
|
|
5826
5831
|
return date.era === "minguo" ? date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START : 1 - date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START;
|
|
@@ -5875,7 +5880,7 @@ function $5f31bd6f0c8940b2$var$toGregorian(date) {
|
|
|
5875
5880
|
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, date.month, date.day);
|
|
5876
5881
|
}
|
|
5877
5882
|
|
|
5878
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5883
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/PersianCalendar.mjs
|
|
5879
5884
|
var $f3ed2e4472ae7e25$var$PERSIAN_EPOCH = 1948320;
|
|
5880
5885
|
var $f3ed2e4472ae7e25$var$MONTH_START = [
|
|
5881
5886
|
0,
|
|
@@ -5930,7 +5935,7 @@ var $f3ed2e4472ae7e25$export$37fccdbfd14c5939 = class {
|
|
|
5930
5935
|
}
|
|
5931
5936
|
};
|
|
5932
5937
|
|
|
5933
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
5938
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/IndianCalendar.mjs
|
|
5934
5939
|
var $82c358003bdda0a8$var$INDIAN_ERA_START = 78;
|
|
5935
5940
|
var $82c358003bdda0a8$var$INDIAN_YEAR_START = 80;
|
|
5936
5941
|
var $82c358003bdda0a8$export$39f31c639fa15726 = class extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
|
|
@@ -6003,7 +6008,7 @@ var $82c358003bdda0a8$export$39f31c639fa15726 = class extends (0, $3b62074eb0558
|
|
|
6003
6008
|
}
|
|
6004
6009
|
};
|
|
6005
6010
|
|
|
6006
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6011
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/IslamicCalendar.mjs
|
|
6007
6012
|
var $f2f3e0e3a817edbd$var$CIVIL_EPOC = 1948440;
|
|
6008
6013
|
var $f2f3e0e3a817edbd$var$ASTRONOMICAL_EPOC = 1948439;
|
|
6009
6014
|
var $f2f3e0e3a817edbd$var$UMALQURA_YEAR_START = 1300;
|
|
@@ -6139,7 +6144,7 @@ var $f2f3e0e3a817edbd$export$5baab4758c231076 = class extends $f2f3e0e3a817edbd$
|
|
|
6139
6144
|
}
|
|
6140
6145
|
};
|
|
6141
6146
|
|
|
6142
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6147
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/HebrewCalendar.mjs
|
|
6143
6148
|
var $7c5f6fbf42389787$var$HEBREW_EPOCH = 347997;
|
|
6144
6149
|
var $7c5f6fbf42389787$var$HOUR_PARTS = 1080;
|
|
6145
6150
|
var $7c5f6fbf42389787$var$DAY_PARTS = 24 * $7c5f6fbf42389787$var$HOUR_PARTS;
|
|
@@ -6249,7 +6254,7 @@ var $7c5f6fbf42389787$export$ca405048b8fb5af = class {
|
|
|
6249
6254
|
}
|
|
6250
6255
|
};
|
|
6251
6256
|
|
|
6252
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6257
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/EthiopicCalendar.mjs
|
|
6253
6258
|
var $b956b2d7a6cf451f$var$ETHIOPIC_EPOCH = 1723856;
|
|
6254
6259
|
var $b956b2d7a6cf451f$var$COPTIC_EPOCH = 1824665;
|
|
6255
6260
|
var $b956b2d7a6cf451f$var$AMETE_MIHRET_DELTA = 5500;
|
|
@@ -6373,7 +6378,7 @@ var $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1 = class extends $b956b2d7a6cf451f$
|
|
|
6373
6378
|
}
|
|
6374
6379
|
};
|
|
6375
6380
|
|
|
6376
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6381
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/createCalendar.mjs
|
|
6377
6382
|
function $64244302c3013299$export$dd0bbc9b26defe37(name) {
|
|
6378
6383
|
switch (name) {
|
|
6379
6384
|
case "buddhist":
|
|
@@ -6406,7 +6411,7 @@ function $64244302c3013299$export$dd0bbc9b26defe37(name) {
|
|
|
6406
6411
|
}
|
|
6407
6412
|
}
|
|
6408
6413
|
|
|
6409
|
-
// node_modules/.pnpm/@internationalized+date@3.
|
|
6414
|
+
// node_modules/.pnpm/@internationalized+date@3.8.0/node_modules/@internationalized/date/dist/DateFormatter.mjs
|
|
6410
6415
|
var $fb18d541ea1ad717$var$formatterCache = /* @__PURE__ */ new Map();
|
|
6411
6416
|
var $fb18d541ea1ad717$export$ad991b66133851cf = class {
|
|
6412
6417
|
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
@@ -29875,23 +29880,63 @@ function Breadcrumb2({ children, className, ...props }) {
|
|
|
29875
29880
|
// src/components/Calendar.tsx
|
|
29876
29881
|
var import_classnames16 = __toESM(require_classnames());
|
|
29877
29882
|
|
|
29883
|
+
// src/lib/date.ts
|
|
29884
|
+
function toCalendarDate(date) {
|
|
29885
|
+
if (date instanceof $35ea8db9cb2ccb90$export$99faa760c7908e4f) {
|
|
29886
|
+
return date;
|
|
29887
|
+
}
|
|
29888
|
+
return date ? new $35ea8db9cb2ccb90$export$99faa760c7908e4f(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate()) : date;
|
|
29889
|
+
}
|
|
29890
|
+
function fromCalendarDate(date) {
|
|
29891
|
+
if (date instanceof $35ea8db9cb2ccb90$export$99faa760c7908e4f) {
|
|
29892
|
+
return date.toDate($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
|
|
29893
|
+
}
|
|
29894
|
+
return date;
|
|
29895
|
+
}
|
|
29896
|
+
|
|
29878
29897
|
// css-modules:E:\dev\umami-react-zen\src\components\Calendar.module.css
|
|
29879
|
-
var Calendar_default = { "calendar": "
|
|
29898
|
+
var Calendar_default = { "calendar": "Calendar_calendar__ZDMwM", "header": "Calendar_header__ZDE0Y", "heading": "Calendar_heading__MTk3Z", "button": "Calendar_button__MmIyO", "headerCell": "Calendar_headerCell__MjEwY", "cell": "Calendar_cell__MTc4M" };
|
|
29880
29899
|
|
|
29881
29900
|
// src/components/Calendar.tsx
|
|
29882
29901
|
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
29883
|
-
function Calendar2({
|
|
29884
|
-
|
|
29885
|
-
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29902
|
+
function Calendar2({
|
|
29903
|
+
className,
|
|
29904
|
+
value,
|
|
29905
|
+
minValue,
|
|
29906
|
+
maxValue,
|
|
29907
|
+
defaultValue,
|
|
29908
|
+
onChange,
|
|
29909
|
+
...props
|
|
29910
|
+
}) {
|
|
29911
|
+
const dateProps = {
|
|
29912
|
+
value: toCalendarDate(value),
|
|
29913
|
+
minValue: toCalendarDate(minValue),
|
|
29914
|
+
maxValue: toCalendarDate(maxValue),
|
|
29915
|
+
defaultValue: toCalendarDate(defaultValue)
|
|
29916
|
+
};
|
|
29917
|
+
const handleChange = (date) => {
|
|
29918
|
+
onChange?.(fromCalendarDate(date));
|
|
29919
|
+
};
|
|
29920
|
+
return /* @__PURE__ */ jsxs12(
|
|
29921
|
+
$dfd62f934fc76fed$export$e1aef45b828286de,
|
|
29922
|
+
{
|
|
29923
|
+
...props,
|
|
29924
|
+
...dateProps,
|
|
29925
|
+
className: (0, import_classnames16.default)(Calendar_default.calendar, className),
|
|
29926
|
+
onChange: handleChange,
|
|
29927
|
+
children: [
|
|
29928
|
+
/* @__PURE__ */ jsxs12("header", { className: Calendar_default.header, children: [
|
|
29929
|
+
/* @__PURE__ */ jsx24(Button2, { slot: "previous", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ jsx24(Icon, { rotate: 180, children: /* @__PURE__ */ jsx24(Icons.Chevron, {}) }) }),
|
|
29930
|
+
/* @__PURE__ */ jsx24($5cb03073d3f54797$export$a8a3e93435678ff9, { className: Calendar_default.heading }),
|
|
29931
|
+
/* @__PURE__ */ jsx24(Button2, { slot: "next", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ jsx24(Icon, { children: /* @__PURE__ */ jsx24(Icons.Chevron, {}) }) })
|
|
29932
|
+
] }),
|
|
29933
|
+
/* @__PURE__ */ jsxs12($dfd62f934fc76fed$export$5bd780d491cfc46c, { children: [
|
|
29934
|
+
/* @__PURE__ */ jsx24($dfd62f934fc76fed$export$22e2d15eaa4d2377, { children: (day) => /* @__PURE__ */ jsx24($dfd62f934fc76fed$export$ad2135cac3a11b3d, { className: Calendar_default.headerCell, children: day }) }),
|
|
29935
|
+
/* @__PURE__ */ jsx24($dfd62f934fc76fed$export$e11f8ba65d857bff, { className: Calendar_default.body, children: (date) => /* @__PURE__ */ jsx24($dfd62f934fc76fed$export$5d847498420df57b, { className: Calendar_default.cell, date }) })
|
|
29936
|
+
] })
|
|
29937
|
+
]
|
|
29938
|
+
}
|
|
29939
|
+
);
|
|
29895
29940
|
}
|
|
29896
29941
|
|
|
29897
29942
|
// src/components/Checkbox.tsx
|
|
@@ -31223,11 +31268,30 @@ var ToggleGroup_default = { "group": "ToggleGroup_group__Y2YyN", "list": "Toggle
|
|
|
31223
31268
|
|
|
31224
31269
|
// src/components/ToggleGroup.tsx
|
|
31225
31270
|
import { jsx as jsx62, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
31226
|
-
function ToggleGroup({
|
|
31227
|
-
|
|
31228
|
-
|
|
31229
|
-
|
|
31230
|
-
|
|
31271
|
+
function ToggleGroup({
|
|
31272
|
+
label,
|
|
31273
|
+
className,
|
|
31274
|
+
children,
|
|
31275
|
+
selectionMode = "single",
|
|
31276
|
+
onChange,
|
|
31277
|
+
...props
|
|
31278
|
+
}) {
|
|
31279
|
+
const handleChange = (keys) => {
|
|
31280
|
+
onChange?.(Array.from(keys).map((k) => k.toString()));
|
|
31281
|
+
};
|
|
31282
|
+
return /* @__PURE__ */ jsxs37(
|
|
31283
|
+
$eaf9e70818b436db$export$67ea30858aaf75e3,
|
|
31284
|
+
{
|
|
31285
|
+
...props,
|
|
31286
|
+
selectionMode,
|
|
31287
|
+
onSelectionChange: handleChange,
|
|
31288
|
+
className: (0, import_classnames51.default)(ToggleGroup_default.group, className),
|
|
31289
|
+
children: [
|
|
31290
|
+
label && /* @__PURE__ */ jsx62(Label2, { children: label }),
|
|
31291
|
+
/* @__PURE__ */ jsx62($eaf9e70818b436db$export$f9fef0f55402315b, { className: ToggleGroup_default.list, children })
|
|
31292
|
+
]
|
|
31293
|
+
}
|
|
31294
|
+
);
|
|
31231
31295
|
}
|
|
31232
31296
|
function ToggleGroupItem({ className, children, ...props }) {
|
|
31233
31297
|
return /* @__PURE__ */ jsx62($eaf9e70818b436db$export$3288d34c523a1192, { ...props, className: (0, import_classnames51.default)(ToggleGroup_default.item, className), children });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umami/react-zen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.0",
|
|
4
4
|
"description": "Modern, minimalist React component library",
|
|
5
5
|
"author": "Umami <hello@umami.is>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@fontsource/jetbrains-mono": "^5.2.5",
|
|
49
|
+
"@internationalized/date": "^3.8.0",
|
|
49
50
|
"@react-aria/focus": "^3.20.1",
|
|
50
51
|
"@react-spring/web": "^9.7.5",
|
|
51
52
|
"classnames": "^2.5.1",
|
package/styles.css
CHANGED
|
@@ -3164,35 +3164,35 @@ body a.Button_button__NDYwM {
|
|
|
3164
3164
|
}
|
|
3165
3165
|
|
|
3166
3166
|
/* virtual-css:css:090024871002459dc1fbfd39039799c3 */
|
|
3167
|
-
.
|
|
3167
|
+
.Calendar_calendar__ZDMwM {
|
|
3168
3168
|
width: fit-content;
|
|
3169
3169
|
max-width: 100%;
|
|
3170
3170
|
font-size: var(--font-size);
|
|
3171
3171
|
color: var(--font-color);
|
|
3172
3172
|
}
|
|
3173
|
-
.
|
|
3173
|
+
.Calendar_header__ZDE0Y {
|
|
3174
3174
|
display: flex;
|
|
3175
3175
|
align-items: center;
|
|
3176
3176
|
margin-bottom: var(--spacing-4);
|
|
3177
3177
|
}
|
|
3178
|
-
.
|
|
3178
|
+
.Calendar_calendar__ZDMwM .Calendar_heading__MTk3Z {
|
|
3179
3179
|
flex: 1;
|
|
3180
3180
|
margin: 0;
|
|
3181
3181
|
text-align: center;
|
|
3182
3182
|
font-size: var(--font-size);
|
|
3183
3183
|
font-weight: 700;
|
|
3184
3184
|
}
|
|
3185
|
-
.
|
|
3185
|
+
.Calendar_button__MmIyO {
|
|
3186
3186
|
display: flex;
|
|
3187
3187
|
align-items: center;
|
|
3188
3188
|
justify-content: center;
|
|
3189
3189
|
border: 0;
|
|
3190
3190
|
background: transparent;
|
|
3191
3191
|
}
|
|
3192
|
-
.
|
|
3192
|
+
.Calendar_headerCell__MjEwY {
|
|
3193
3193
|
font-weight: 700;
|
|
3194
3194
|
}
|
|
3195
|
-
.
|
|
3195
|
+
.Calendar_cell__MTc4M {
|
|
3196
3196
|
width: 3rem;
|
|
3197
3197
|
line-height: 3rem;
|
|
3198
3198
|
text-align: center;
|
|
@@ -3202,22 +3202,25 @@ body a.Button_button__NDYwM {
|
|
|
3202
3202
|
margin: var(--gap-xs);
|
|
3203
3203
|
forced-color-adjust: none;
|
|
3204
3204
|
}
|
|
3205
|
-
.
|
|
3205
|
+
.Calendar_cell__MTc4M:hover {
|
|
3206
3206
|
color: var(--highlight-font-color);
|
|
3207
3207
|
background: var(--highlight-color);
|
|
3208
3208
|
}
|
|
3209
|
-
.
|
|
3209
|
+
.Calendar_cell__MTc4M[data-outside-month] {
|
|
3210
3210
|
display: none;
|
|
3211
3211
|
}
|
|
3212
|
-
.
|
|
3212
|
+
.Calendar_cell__MTc4M[data-focus-visible] {
|
|
3213
3213
|
outline: 2px solid var(--font-color);
|
|
3214
3214
|
outline-offset: 2px;
|
|
3215
3215
|
}
|
|
3216
|
-
.
|
|
3216
|
+
.Calendar_cell__MTc4M[data-selected] {
|
|
3217
3217
|
color: var(--primary-font-color);
|
|
3218
3218
|
border-color: var(--primary-color);
|
|
3219
3219
|
background: var(--primary-color);
|
|
3220
3220
|
}
|
|
3221
|
+
.Calendar_cell__MTc4M[data-disabled] {
|
|
3222
|
+
color: var(--font-color-disabled);
|
|
3223
|
+
}
|
|
3221
3224
|
|
|
3222
3225
|
/* virtual-css:css:98988f24a8f1f9732e1edf323cdce610 */
|
|
3223
3226
|
.Checkbox_checkbox__OTliN {
|