@mieweb/ui 0.3.0-dev.76 → 0.3.0-dev.78

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.js CHANGED
@@ -26,8 +26,8 @@ import { RadioGroup, Radio } from './chunk-PU6ZC4GI.js';
26
26
  export { Radio, RadioGroup, radioVariants } from './chunk-PU6ZC4GI.js';
27
27
  export { RecordButton, formatDuration, recordButtonVariants } from './chunk-QVJBUWJQ.js';
28
28
  export { DateButton, DatePicker, RadioOption, SchedulePicker, TimeButton, TimePicker, dateButtonVariants, radioOptionVariants, timeButtonVariants } from './chunk-4DMZAVB2.js';
29
- import { Select } from './chunk-IEVAVY43.js';
30
- export { Select, selectTriggerVariants } from './chunk-IEVAVY43.js';
29
+ import { Select } from './chunk-PIKMFAMZ.js';
30
+ export { Select, selectTriggerVariants } from './chunk-PIKMFAMZ.js';
31
31
  import { Skeleton } from './chunk-4Z6ZZKIY.js';
32
32
  export { Skeleton, SkeletonCard, SkeletonTable, SkeletonText, skeletonVariants } from './chunk-4Z6ZZKIY.js';
33
33
  export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-5PUEQH2L.js';
@@ -10505,7 +10505,7 @@ function CSVColumnMapper({
10505
10505
  className: "bg-primary/10 border-primary/30 mb-4 rounded-lg border p-4",
10506
10506
  children: [
10507
10507
  /* @__PURE__ */ jsx(
10508
- "h4",
10508
+ "h3",
10509
10509
  {
10510
10510
  "data-slot": "csv-mapper-alert-title",
10511
10511
  className: "text-primary-800 dark:text-primary-200 mb-1 font-semibold",
@@ -10584,7 +10584,7 @@ function CSVColumnCard({
10584
10584
  "data-slot": "csv-card",
10585
10585
  className: cn(
10586
10586
  "bg-card text-card-foreground rounded-xl border-2 shadow-sm",
10587
- column.ignored ? "border-border opacity-50" : isMapped ? "border-success/30" : "border-warning/30"
10587
+ column.ignored ? "border-border border-dashed shadow-none" : isMapped ? "border-success/30" : "border-warning/30"
10588
10588
  ),
10589
10589
  children: [
10590
10590
  /* @__PURE__ */ jsxs(
@@ -10615,7 +10615,7 @@ function CSVColumnCard({
10615
10615
  /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4", className: "fill-warning" })
10616
10616
  ] }) })),
10617
10617
  /* @__PURE__ */ jsx(
10618
- "h6",
10618
+ "h4",
10619
10619
  {
10620
10620
  "data-slot": "csv-card-title",
10621
10621
  className: "truncate text-sm font-semibold",
@@ -10666,6 +10666,7 @@ function CSVColumnCard({
10666
10666
  Select,
10667
10667
  {
10668
10668
  id: formatHtmlId(column.name),
10669
+ label: `Map ${column.name} to field`,
10669
10670
  options: selectOptions,
10670
10671
  value: column.mappedTo || "",
10671
10672
  onValueChange: (value) => onMappingChange(value, void 0),
@@ -10694,6 +10695,7 @@ function CSVColumnCard({
10694
10695
  Select,
10695
10696
  {
10696
10697
  id: formatHtmlId(column.name, column.mappedTo),
10698
+ label: `${column.name} sub-field`,
10697
10699
  options: childSelectOptions,
10698
10700
  value: column.childField || "",
10699
10701
  onValueChange: (value) => onMappingChange(column.mappedTo, value),
@@ -30846,6 +30848,7 @@ function ReportDashboard({
30846
30848
  /* @__PURE__ */ jsx(
30847
30849
  Select,
30848
30850
  {
30851
+ "aria-label": "Date range",
30849
30852
  options: Array.isArray(dateRangeOptions) && dateRangeOptions.every(
30850
30853
  (opt) => opt && typeof opt === "object" && "value" in opt && "label" in opt && typeof opt.value === "string" && typeof opt.label === "string"
30851
30854
  ) ? dateRangeOptions : [],
@@ -30904,7 +30907,7 @@ function ReportDashboard({
30904
30907
  }
30905
30908
  ),
30906
30909
  chartData.length > 0 && /* @__PURE__ */ jsx("div", { "data-slot": "report-dashboard-chart", children: /* @__PURE__ */ jsxs(Card, { children: [
30907
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: "Order Volume" }) }),
30910
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { as: "h2", className: "text-lg", children: "Order Volume" }) }),
30908
30911
  /* @__PURE__ */ jsxs(CardContent, { children: [
30909
30912
  /* @__PURE__ */ jsx("div", { className: "flex h-48 items-end gap-1", children: chartData.map((point, index) => /* @__PURE__ */ jsxs(
30910
30913
  "div",
@@ -30957,7 +30960,7 @@ function ReportDashboard({
30957
30960
  className: "grid gap-6 md:grid-cols-2",
30958
30961
  children: [
30959
30962
  topServices.length > 0 && /* @__PURE__ */ jsx("div", { "data-slot": "report-dashboard-services", children: /* @__PURE__ */ jsxs(Card, { children: [
30960
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: "Top Services" }) }),
30963
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { as: "h2", className: "text-lg", children: "Top Services" }) }),
30961
30964
  /* @__PURE__ */ jsx(CardContent, { className: "space-y-3", children: topServices.map((service, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
30962
30965
  /* @__PURE__ */ jsx(
30963
30966
  Badge,
@@ -30983,7 +30986,7 @@ function ReportDashboard({
30983
30986
  ] }, service.id)) })
30984
30987
  ] }) }),
30985
30988
  topEmployers.length > 0 && /* @__PURE__ */ jsx("div", { "data-slot": "report-dashboard-employers", children: /* @__PURE__ */ jsxs(Card, { children: [
30986
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { className: "text-lg", children: "Top Employers" }) }),
30989
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { as: "h2", className: "text-lg", children: "Top Employers" }) }),
30987
30990
  /* @__PURE__ */ jsx(CardContent, { className: "space-y-3", children: topEmployers.map((employer, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
30988
30991
  /* @__PURE__ */ jsx(
30989
30992
  Badge,
@@ -31629,6 +31632,7 @@ function ScheduleCalendar({
31629
31632
  variant: "outline",
31630
31633
  size: "sm",
31631
31634
  onClick: () => navigateDate("prev"),
31635
+ "aria-label": "Previous",
31632
31636
  children: /* @__PURE__ */ jsx(
31633
31637
  "svg",
31634
31638
  {
@@ -31655,6 +31659,7 @@ function ScheduleCalendar({
31655
31659
  variant: "outline",
31656
31660
  size: "sm",
31657
31661
  onClick: () => navigateDate("next"),
31662
+ "aria-label": "Next",
31658
31663
  children: /* @__PURE__ */ jsx(
31659
31664
  "svg",
31660
31665
  {
@@ -31700,7 +31705,13 @@ function ScheduleCalendar({
31700
31705
  {
31701
31706
  className: `flex-1 border-l border-gray-200 p-2 text-center dark:border-gray-700 ${isSameDay(date, /* @__PURE__ */ new Date()) ? "bg-blue-50 dark:bg-blue-900/20" : ""}`,
31702
31707
  children: [
31703
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: date.toLocaleDateString("en-US", { weekday: "short" }) }),
31708
+ /* @__PURE__ */ jsx(
31709
+ "p",
31710
+ {
31711
+ className: `text-xs ${isSameDay(date, /* @__PURE__ */ new Date()) ? "text-blue-600 dark:text-blue-400" : "text-muted-foreground"}`,
31712
+ children: date.toLocaleDateString("en-US", { weekday: "short" })
31713
+ }
31714
+ ),
31704
31715
  /* @__PURE__ */ jsx(
31705
31716
  "p",
31706
31717
  {
@@ -31746,6 +31757,7 @@ function ScheduleCalendar({
31746
31757
  {
31747
31758
  role: onAddAppointment ? "button" : void 0,
31748
31759
  tabIndex: onAddAppointment ? 0 : void 0,
31760
+ "aria-label": onAddAppointment ? `Add appointment at ${new Date(2e3, 0, 1, hour).toLocaleTimeString("en-US", { hour: "numeric", hour12: true })}` : void 0,
31749
31761
  className: "h-16 border-b border-gray-100 dark:border-gray-800",
31750
31762
  onClick: () => {
31751
31763
  if (onAddAppointment) {
@@ -31755,7 +31767,8 @@ function ScheduleCalendar({
31755
31767
  }
31756
31768
  },
31757
31769
  onKeyDown: (e) => {
31758
- if (e.key === "Enter" && onAddAppointment) {
31770
+ if ((e.key === "Enter" || e.key === " ") && onAddAppointment) {
31771
+ e.preventDefault();
31759
31772
  const clickDate = new Date(date);
31760
31773
  clickDate.setHours(hour, 0, 0, 0);
31761
31774
  onAddAppointment(clickDate, `${hour}:00`);
@@ -31772,6 +31785,7 @@ function ScheduleCalendar({
31772
31785
  "data-slot": "schedule-calendar-appointment",
31773
31786
  role: "button",
31774
31787
  tabIndex: 0,
31788
+ "aria-label": `${appointment.patientName || appointment.title}, ${formatTime4(appointment.startTime)}`,
31775
31789
  className: `absolute right-1 left-1 cursor-pointer overflow-hidden rounded border-l-4 px-2 py-1 text-xs text-white ${getStatusColor(appointment.status)}`,
31776
31790
  style: {
31777
31791
  top: position.top,
@@ -31779,7 +31793,12 @@ function ScheduleCalendar({
31779
31793
  minHeight: "1.5rem"
31780
31794
  },
31781
31795
  onClick: () => onAppointmentClick?.(appointment),
31782
- onKeyDown: (e) => e.key === "Enter" && onAppointmentClick?.(appointment),
31796
+ onKeyDown: (e) => {
31797
+ if (e.key === "Enter" || e.key === " ") {
31798
+ e.preventDefault();
31799
+ onAppointmentClick?.(appointment);
31800
+ }
31801
+ },
31783
31802
  children: [
31784
31803
  /* @__PURE__ */ jsx("p", { className: "truncate font-medium", children: appointment.patientName || appointment.title }),
31785
31804
  /* @__PURE__ */ jsx("p", { className: "truncate", children: formatTime4(appointment.startTime) })