@luscii-healthtech/web-ui 35.9.0 → 35.9.1
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.development.js +18 -13
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/web-ui-tailwind.css +12 -23
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -6323,7 +6323,7 @@ const getLocalizedWeekdays = (args) => {
|
|
|
6323
6323
|
// sunday
|
|
6324
6324
|
];
|
|
6325
6325
|
const formatDayToEnglishName = (date) => new Intl.DateTimeFormat("en-US", { weekday: "long" }).format(date);
|
|
6326
|
-
const
|
|
6326
|
+
const formatDateToLocalizedWeekdayLetters = (date) => new Intl.DateTimeFormat(args.locale, { weekday: "short" }).format(date);
|
|
6327
6327
|
const formatDateToLocalizedFullWeekdayName = (date) => new Intl.DateTimeFormat(args.locale, { weekday: "long" }).format(date);
|
|
6328
6328
|
return dates.map((date) => ({
|
|
6329
6329
|
/**
|
|
@@ -6338,7 +6338,7 @@ const getLocalizedWeekdays = (args) => {
|
|
|
6338
6338
|
/**
|
|
6339
6339
|
* The localized single letter indicator of the weekday. We'll use this for the visual indicator.
|
|
6340
6340
|
*/
|
|
6341
|
-
localizedWeekdayLetter:
|
|
6341
|
+
localizedWeekdayLetter: formatDateToLocalizedWeekdayLetters(date)
|
|
6342
6342
|
}));
|
|
6343
6343
|
};
|
|
6344
6344
|
const oldApiDayToIndexMapping = {
|
|
@@ -6390,17 +6390,22 @@ const WeekdaysPicker = (props) => {
|
|
|
6390
6390
|
} = props, rest = __rest(props, ["locale", "selectedOptions", "onChange", "className", "id", "children", "defaultValue", "dir"]);
|
|
6391
6391
|
const options = getLocalizedWeekdays({ locale });
|
|
6392
6392
|
return React__namespace.default.createElement(ToggleGroup__namespace.Root, Object.assign({}, rest, { id, className: classNames__default.default("ui-flex ui-gap-2", className), type: "multiple", value: selectedOptions, onValueChange: onChange }), options.map(({ englishName, localizedFullWeekdayName, localizedWeekdayLetter }) => {
|
|
6393
|
-
return React__namespace.default.createElement(
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6393
|
+
return React__namespace.default.createElement(
|
|
6394
|
+
ToggleGroup__namespace.Item,
|
|
6395
|
+
{ key: englishName, value: englishName, "aria-label": localizedFullWeekdayName, className: classNames__default.default(
|
|
6396
|
+
"ui-transition-[color,background_color,border-color,transform] ui-duration-150 ui-ease-out",
|
|
6397
|
+
"ui-flex ui-select-none ui-items-center ui-justify-center ui-p-xxs",
|
|
6398
|
+
"ui-border ui-border-neutral-interactive ui-radius-xxxxs",
|
|
6399
|
+
"hover:ui-border-on-positive",
|
|
6400
|
+
/**
|
|
6401
|
+
* Only keyboard users will see this. Black is properly visible
|
|
6402
|
+
* on both selected/unselected states.
|
|
6403
|
+
**/
|
|
6404
|
+
"ui-outline-1 ui-outline-black",
|
|
6405
|
+
"data-[state=on]:ui-border-positive-border data-[state=on]:ui-bg-green-50"
|
|
6406
|
+
) },
|
|
6407
|
+
React__namespace.default.createElement(Text, { variant: "base" }, localizedWeekdayLetter)
|
|
6408
|
+
);
|
|
6404
6409
|
}));
|
|
6405
6410
|
};
|
|
6406
6411
|
WeekdaysPicker.weekdayNameToIndex = weekdayNameToIndex;
|