@arbeidstilsynet/design-react 0.3.0 → 0.3.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.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import require$$0, { createContext, use, Fragment } from "react";
3
- import { CloudUpIcon, FileIcon, XMarkIcon } from "@navikt/aksel-icons";
2
+ import require$$0, { createContext, use } from "react";
3
+ import { CloudUpIcon, FileTextIcon, TrashIcon } from "@navikt/aksel-icons";
4
4
  import { useDropzone } from "react-dropzone";
5
- import { Spinner, Label, Button, Alert, ValidationMessage, Avatar, Search } from "@digdir/designsystemet-react";
6
- import { Alert as Alert2, Avatar as Avatar2, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button as Button2, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider, Dropdown, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading, Input, Label as Label2, Link, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search as Search2, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner as Spinner2, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, ValidationMessage as ValidationMessage2, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation } from "@digdir/designsystemet-react";
5
+ import { Spinner, Button, ValidationMessage, Table, Link, Avatar, Search } from "@digdir/designsystemet-react";
6
+ import { Alert, Avatar as Avatar2, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button as Button2, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider, Dropdown, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading, Input, Label, Link as Link2, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search as Search2, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner as Spinner2, Switch, Table as Table2, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, ValidationMessage as ValidationMessage2, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation } from "@digdir/designsystemet-react";
7
7
  import { Slot } from "@radix-ui/react-slot";
8
8
  var jsxRuntime = { exports: {} };
9
9
  var reactJsxRuntime_production = {};
@@ -400,7 +400,7 @@ const FilePickerContext = createContext({
400
400
  }
401
401
  });
402
402
  function FilePicker$1(t0) {
403
- const $ = compilerRuntimeExports.c(28);
403
+ const $ = compilerRuntimeExports.c(29);
404
404
  let children;
405
405
  let className;
406
406
  let errors;
@@ -487,33 +487,35 @@ function FilePicker$1(t0) {
487
487
  t5 = $[22];
488
488
  }
489
489
  let t6;
490
- if ($[23] !== ref || $[24] !== rest || $[25] !== t3 || $[26] !== t5) {
491
- t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, className: t3, ...rest, children: t5 });
492
- $[23] = ref;
493
- $[24] = rest;
494
- $[25] = t3;
495
- $[26] = t5;
496
- $[27] = t6;
490
+ if ($[23] !== disabled || $[24] !== ref || $[25] !== rest || $[26] !== t3 || $[27] !== t5) {
491
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, className: t3, "data-disabled": disabled, ...rest, children: t5 });
492
+ $[23] = disabled;
493
+ $[24] = ref;
494
+ $[25] = rest;
495
+ $[26] = t3;
496
+ $[27] = t5;
497
+ $[28] = t6;
497
498
  } else {
498
- t6 = $[27];
499
+ t6 = $[28];
499
500
  }
500
501
  return t6;
501
502
  }
502
503
  function DefaultLabel(t0) {
503
- const $ = compilerRuntimeExports.c(10);
504
+ const $ = compilerRuntimeExports.c(11);
504
505
  const {
505
506
  defaultLabelText
506
507
  } = t0;
507
508
  const text1 = defaultLabelText?.[0];
508
509
  const text2 = defaultLabelText?.[1];
510
+ const text3 = defaultLabelText?.[2];
509
511
  let t1;
510
512
  let t2;
511
513
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
512
- t1 = {
514
+ t1 = /* @__PURE__ */ jsxRuntimeExports.jsx(CloudUpIcon, { title: "Cloud" });
515
+ t2 = {
513
516
  display: "flex",
514
517
  flexFlow: "row"
515
518
  };
516
- t2 = /* @__PURE__ */ jsxRuntimeExports.jsx(CloudUpIcon, { title: "Cloud" });
517
519
  $[0] = t1;
518
520
  $[1] = t2;
519
521
  } else {
@@ -530,40 +532,42 @@ function DefaultLabel(t0) {
530
532
  t3 = $[2];
531
533
  }
532
534
  let t4;
533
- if ($[3] !== text1) {
534
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: t1, children: [
535
- t2,
536
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { style: t3, children: text1 })
537
- ] });
538
- $[3] = text1;
535
+ if ($[3] !== text2) {
536
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: t3, children: text2 });
537
+ $[3] = text2;
539
538
  $[4] = t4;
540
539
  } else {
541
540
  t4 = $[4];
542
541
  }
543
542
  let t5;
544
- if ($[5] !== text2) {
545
- t5 = text2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { children: text2 });
546
- $[5] = text2;
547
- $[6] = t5;
543
+ if ($[5] !== t4 || $[6] !== text1) {
544
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: t2, children: [
545
+ text1,
546
+ t4
547
+ ] });
548
+ $[5] = t4;
549
+ $[6] = text1;
550
+ $[7] = t5;
548
551
  } else {
549
- t5 = $[6];
552
+ t5 = $[7];
550
553
  }
551
554
  let t6;
552
- if ($[7] !== t4 || $[8] !== t5) {
555
+ if ($[8] !== t5 || $[9] !== text3) {
553
556
  t6 = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
554
- t4,
555
- t5
557
+ t1,
558
+ t5,
559
+ text3
556
560
  ] });
557
- $[7] = t4;
558
561
  $[8] = t5;
559
- $[9] = t6;
562
+ $[9] = text3;
563
+ $[10] = t6;
560
564
  } else {
561
- t6 = $[9];
565
+ t6 = $[10];
562
566
  }
563
567
  return t6;
564
568
  }
565
569
  function FilePickerDropzone(t0) {
566
- const $ = compilerRuntimeExports.c(34);
570
+ const $ = compilerRuntimeExports.c(37);
567
571
  const {
568
572
  className,
569
573
  label,
@@ -573,7 +577,7 @@ function FilePickerDropzone(t0) {
573
577
  } = t0;
574
578
  let t3;
575
579
  if ($[0] !== t1) {
576
- t3 = t1 === void 0 ? ["Last opp fil", "Filformater: pdf, txt og docx"] : t1;
580
+ t3 = t1 === void 0 ? ["Dra og slipp eller", "Last opp fil", "Filformater: pdf, txt og docx"] : t1;
577
581
  $[0] = t1;
578
582
  $[1] = t3;
579
583
  } else {
@@ -584,7 +588,8 @@ function FilePickerDropzone(t0) {
584
588
  const {
585
589
  onAdd,
586
590
  disabled,
587
- isWaiting
591
+ isWaiting,
592
+ errors
588
593
  } = use(FilePickerContext);
589
594
  const isDisabled = Boolean(disabled || isWaiting);
590
595
  let t4;
@@ -618,99 +623,109 @@ function FilePickerDropzone(t0) {
618
623
  isDragActive,
619
624
  open
620
625
  } = useDropzone(t5);
621
- const t6 = getRootProps({
626
+ let t6;
627
+ if ($[7] !== dropLabel) {
628
+ t6 = typeof dropLabel === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: {
629
+ textDecoration: "underline"
630
+ }, children: dropLabel }) : dropLabel;
631
+ $[7] = dropLabel;
632
+ $[8] = t6;
633
+ } else {
634
+ t6 = $[8];
635
+ }
636
+ const dragNode = t6;
637
+ const t7 = getRootProps({
622
638
  role: "group",
623
639
  "aria-disabled": isDisabled || void 0,
624
- className: clsx("at-filepicker-dropzone-wrapper", isDisabled && "is-disabled", className),
640
+ className: clsx("at-filepicker-dropzone-wrapper", className),
625
641
  ...rest
626
642
  });
627
- let t7;
628
- if ($[7] !== getInputProps) {
629
- t7 = getInputProps();
630
- $[7] = getInputProps;
631
- $[8] = t7;
632
- } else {
633
- t7 = $[8];
634
- }
635
643
  let t8;
636
- if ($[9] !== t7) {
637
- t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...t7, "aria-hidden": true });
638
- $[9] = t7;
644
+ if ($[9] !== getInputProps) {
645
+ t8 = getInputProps();
646
+ $[9] = getInputProps;
639
647
  $[10] = t8;
640
648
  } else {
641
649
  t8 = $[10];
642
650
  }
643
- const t9 = isDragActive && "is-drag";
651
+ let t9;
652
+ if ($[11] !== t8) {
653
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...t8, "aria-hidden": true });
654
+ $[11] = t8;
655
+ $[12] = t9;
656
+ } else {
657
+ t9 = $[12];
658
+ }
644
659
  let t10;
645
- if ($[11] !== t9) {
646
- t10 = clsx("at-filepicker-dropzone", t9);
647
- $[11] = t9;
648
- $[12] = t10;
660
+ if ($[13] !== isWaiting) {
661
+ t10 = isWaiting && /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { "aria-label": "Processing files", "data-size": "lg" });
662
+ $[13] = isWaiting;
663
+ $[14] = t10;
649
664
  } else {
650
- t10 = $[12];
665
+ t10 = $[14];
651
666
  }
652
- let t11;
653
- if ($[13] !== isDisabled || $[14] !== open) {
654
- t11 = () => {
667
+ const t11 = isDragActive && "is-drag";
668
+ const t12 = errors && errors.length > 0 && "has-error";
669
+ let t13;
670
+ if ($[15] !== t11 || $[16] !== t12) {
671
+ t13 = clsx("at-filepicker-dropzone", t11, t12);
672
+ $[15] = t11;
673
+ $[16] = t12;
674
+ $[17] = t13;
675
+ } else {
676
+ t13 = $[17];
677
+ }
678
+ let t14;
679
+ if ($[18] !== isDisabled || $[19] !== open) {
680
+ t14 = () => {
655
681
  if (!isDisabled) {
656
682
  open();
657
683
  }
658
684
  };
659
- $[13] = isDisabled;
660
- $[14] = open;
661
- $[15] = t11;
685
+ $[18] = isDisabled;
686
+ $[19] = open;
687
+ $[20] = t14;
662
688
  } else {
663
- t11 = $[15];
689
+ t14 = $[20];
664
690
  }
665
- let t12;
666
- if ($[16] !== isWaiting) {
667
- t12 = isWaiting && /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { "aria-label": "Processing files", "data-size": "lg" });
668
- $[16] = isWaiting;
669
- $[17] = t12;
670
- } else {
671
- t12 = $[17];
672
- }
673
- let t13;
674
- if ($[18] !== defaultLabelText || $[19] !== dropLabel || $[20] !== isDragActive || $[21] !== isWaiting || $[22] !== label) {
675
- t13 = !isWaiting && (isDragActive ? /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { children: dropLabel }) : label ?? /* @__PURE__ */ jsxRuntimeExports.jsx(DefaultLabel, { defaultLabelText }));
676
- $[18] = defaultLabelText;
677
- $[19] = dropLabel;
678
- $[20] = isDragActive;
679
- $[21] = isWaiting;
680
- $[22] = label;
681
- $[23] = t13;
691
+ let t15;
692
+ if ($[21] !== defaultLabelText || $[22] !== dragNode || $[23] !== isDragActive || $[24] !== isWaiting || $[25] !== label) {
693
+ t15 = !isWaiting && (isDragActive ? dragNode : label ?? /* @__PURE__ */ jsxRuntimeExports.jsx(DefaultLabel, { defaultLabelText }));
694
+ $[21] = defaultLabelText;
695
+ $[22] = dragNode;
696
+ $[23] = isDragActive;
697
+ $[24] = isWaiting;
698
+ $[25] = label;
699
+ $[26] = t15;
682
700
  } else {
683
- t13 = $[23];
701
+ t15 = $[26];
684
702
  }
685
- let t14;
686
- if ($[24] !== isDisabled || $[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t13) {
687
- t14 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { type: "button", disabled: isDisabled, className: t10, onClick: t11, children: [
688
- t12,
689
- t13
690
- ] });
691
- $[24] = isDisabled;
692
- $[25] = t10;
693
- $[26] = t11;
694
- $[27] = t12;
695
- $[28] = t13;
696
- $[29] = t14;
703
+ let t16;
704
+ if ($[27] !== isDisabled || $[28] !== t10 || $[29] !== t13 || $[30] !== t14 || $[31] !== t15) {
705
+ t16 = /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "button", disabled: isDisabled, loading: t10, className: t13, onClick: t14, children: t15 });
706
+ $[27] = isDisabled;
707
+ $[28] = t10;
708
+ $[29] = t13;
709
+ $[30] = t14;
710
+ $[31] = t15;
711
+ $[32] = t16;
697
712
  } else {
698
- t14 = $[29];
713
+ t16 = $[32];
699
714
  }
700
- let t15;
701
- if ($[30] !== t14 || $[31] !== t6 || $[32] !== t8) {
702
- t15 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...t6, children: [
703
- t8,
704
- t14
715
+ let t17;
716
+ if ($[33] !== t16 || $[34] !== t7 || $[35] !== t9) {
717
+ t17 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...t7, children: [
718
+ t9,
719
+ t16
705
720
  ] });
706
- $[30] = t14;
707
- $[31] = t6;
708
- $[32] = t8;
709
- $[33] = t15;
721
+ $[33] = t16;
722
+ $[34] = t7;
723
+ $[35] = t9;
724
+ $[36] = t17;
710
725
  } else {
711
- t15 = $[33];
726
+ t17 = $[36];
712
727
  }
713
- return t15;
728
+ return t17;
714
729
  }
715
730
  function FilePickerErrors(t0) {
716
731
  const $ = compilerRuntimeExports.c(11);
@@ -752,7 +767,7 @@ function FilePickerErrors(t0) {
752
767
  }
753
768
  let t3;
754
769
  if ($[7] !== rest || $[8] !== t1 || $[9] !== t2) {
755
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t2 });
770
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, role: "status", ...rest, children: t2 });
756
771
  $[7] = rest;
757
772
  $[8] = t1;
758
773
  $[9] = t2;
@@ -763,7 +778,7 @@ function FilePickerErrors(t0) {
763
778
  return t3;
764
779
  }
765
780
  function _temp$1(error, index) {
766
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { role: "alert", "data-color": "danger", "data-size": "sm", children: error }, index);
781
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ValidationMessage, { children: error }, index);
767
782
  }
768
783
  function formatFileSize(bytes) {
769
784
  if (bytes === 0) return "0 Bytes";
@@ -773,21 +788,39 @@ function formatFileSize(bytes) {
773
788
  return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
774
789
  }
775
790
  function FilePickerFiles(t0) {
776
- const $ = compilerRuntimeExports.c(16);
791
+ const $ = compilerRuntimeExports.c(38);
777
792
  let className;
778
793
  let rest;
794
+ let t1;
795
+ let t2;
779
796
  if ($[0] !== t0) {
780
797
  ({
781
798
  className,
799
+ columnNames: t1,
800
+ removeButtonLabel: t2,
782
801
  ...rest
783
802
  } = t0);
784
803
  $[0] = t0;
785
804
  $[1] = className;
786
805
  $[2] = rest;
806
+ $[3] = t1;
807
+ $[4] = t2;
787
808
  } else {
788
809
  className = $[1];
789
810
  rest = $[2];
811
+ t1 = $[3];
812
+ t2 = $[4];
790
813
  }
814
+ let t3;
815
+ if ($[5] !== t1) {
816
+ t3 = t1 === void 0 ? ["Navn", "Størrelse", ""] : t1;
817
+ $[5] = t1;
818
+ $[6] = t3;
819
+ } else {
820
+ t3 = $[6];
821
+ }
822
+ const columnNames = t3;
823
+ const removeButtonLabel = t2 === void 0 ? "Fjern" : t2;
791
824
  const {
792
825
  files,
793
826
  onRemove,
@@ -796,63 +829,123 @@ function FilePickerFiles(t0) {
796
829
  if (!files?.length) {
797
830
  return null;
798
831
  }
799
- let t1;
800
- if ($[3] !== className) {
801
- t1 = clsx("at-filepicker-files", className);
802
- $[3] = className;
803
- $[4] = t1;
832
+ let t4;
833
+ if ($[7] !== className) {
834
+ t4 = clsx("at-filepicker-files-table", className);
835
+ $[7] = className;
836
+ $[8] = t4;
804
837
  } else {
805
- t1 = $[4];
838
+ t4 = $[8];
806
839
  }
807
- let t2;
808
- if ($[5] !== disabled || $[6] !== files || $[7] !== onRemove) {
809
- let t32;
810
- if ($[9] !== disabled || $[10] !== onRemove) {
811
- t32 = (t4) => {
840
+ let t5;
841
+ if ($[9] !== columnNames[0]) {
842
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(Table.HeaderCell, { title: columnNames[0], children: columnNames[0] });
843
+ $[9] = columnNames[0];
844
+ $[10] = t5;
845
+ } else {
846
+ t5 = $[10];
847
+ }
848
+ let t6;
849
+ if ($[11] !== columnNames[1]) {
850
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx(Table.HeaderCell, { title: columnNames[1], children: columnNames[1] });
851
+ $[11] = columnNames[1];
852
+ $[12] = t6;
853
+ } else {
854
+ t6 = $[12];
855
+ }
856
+ let t7;
857
+ if ($[13] !== columnNames[2]) {
858
+ t7 = columnNames[2] || /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ds-sr-only", children: "Action" });
859
+ $[13] = columnNames[2];
860
+ $[14] = t7;
861
+ } else {
862
+ t7 = $[14];
863
+ }
864
+ let t8;
865
+ if ($[15] !== columnNames[2] || $[16] !== t7) {
866
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(Table.HeaderCell, { title: columnNames[2], children: t7 });
867
+ $[15] = columnNames[2];
868
+ $[16] = t7;
869
+ $[17] = t8;
870
+ } else {
871
+ t8 = $[17];
872
+ }
873
+ let t9;
874
+ if ($[18] !== t5 || $[19] !== t6 || $[20] !== t8) {
875
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Head, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Table.Row, { children: [
876
+ t5,
877
+ t6,
878
+ t8
879
+ ] }) });
880
+ $[18] = t5;
881
+ $[19] = t6;
882
+ $[20] = t8;
883
+ $[21] = t9;
884
+ } else {
885
+ t9 = $[21];
886
+ }
887
+ let t10;
888
+ if ($[22] !== disabled || $[23] !== files || $[24] !== onRemove || $[25] !== removeButtonLabel) {
889
+ let t112;
890
+ if ($[27] !== disabled || $[28] !== onRemove || $[29] !== removeButtonLabel) {
891
+ t112 = (t122) => {
812
892
  const {
813
893
  id,
814
894
  file,
815
- error
816
- } = t4;
817
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "at-filepicker-file", children: [
818
- /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { "aria-hidden": "true", fontSize: "1.5em" }),
819
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "at-filepicker-file__content", children: [
820
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-file__name", title: file.name, children: file.name }),
821
- error && /* @__PURE__ */ jsxRuntimeExports.jsx(ValidationMessage, { className: "at-filepicker-file__error", "data-color": "danger", "data-size": "sm", title: error, children: error })
822
- ] }),
823
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "at-filepicker-file__size", "data-size": "sm", children: [
824
- "(",
825
- formatFileSize(file.size),
826
- ")"
827
- ] }),
828
- /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { icon: true, variant: "tertiary", "data-size": "sm", onClick: () => onRemove(id), disabled, "aria-label": `Remove ${file.name}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(XMarkIcon, { "aria-hidden": true }) })
829
- ] }) }, id);
895
+ hasError
896
+ } = t122;
897
+ const size = formatFileSize(file.size);
898
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Table.Row, { "data-error": hasError, children: [
899
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: file.name, className: "at-filepicker-files-file__name", "data-color": "info", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { href: disabled ? void 0 : URL.createObjectURL(file), target: "_blank", rel: "noreferrer", "aria-disabled": disabled, children: [
900
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FileTextIcon, { "aria-hidden": "true", fontSize: "1.5em" }),
901
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__text", children: file.name })
902
+ ] }) }),
903
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: size, children: size }),
904
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { "data-color": "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "tertiary", "data-size": "sm", disabled, "aria-label": `Remove ${file.name}`, onClick: () => onRemove(id), children: [
905
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__remove-text", children: removeButtonLabel }),
906
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, { "aria-hidden": true })
907
+ ] }) })
908
+ ] }, id);
830
909
  };
831
- $[9] = disabled;
832
- $[10] = onRemove;
833
- $[11] = t32;
910
+ $[27] = disabled;
911
+ $[28] = onRemove;
912
+ $[29] = removeButtonLabel;
913
+ $[30] = t112;
834
914
  } else {
835
- t32 = $[11];
915
+ t112 = $[30];
836
916
  }
837
- t2 = files.map(t32);
838
- $[5] = disabled;
839
- $[6] = files;
840
- $[7] = onRemove;
841
- $[8] = t2;
917
+ t10 = files.map(t112);
918
+ $[22] = disabled;
919
+ $[23] = files;
920
+ $[24] = onRemove;
921
+ $[25] = removeButtonLabel;
922
+ $[26] = t10;
842
923
  } else {
843
- t2 = $[8];
924
+ t10 = $[26];
844
925
  }
845
- let t3;
846
- if ($[12] !== rest || $[13] !== t1 || $[14] !== t2) {
847
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t2 });
848
- $[12] = rest;
849
- $[13] = t1;
850
- $[14] = t2;
851
- $[15] = t3;
926
+ let t11;
927
+ if ($[31] !== t10) {
928
+ t11 = /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Body, { children: t10 });
929
+ $[31] = t10;
930
+ $[32] = t11;
852
931
  } else {
853
- t3 = $[15];
932
+ t11 = $[32];
854
933
  }
855
- return t3;
934
+ let t12;
935
+ if ($[33] !== rest || $[34] !== t11 || $[35] !== t4 || $[36] !== t9) {
936
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { className: t4, ...rest, children: [
937
+ t9,
938
+ t11
939
+ ] });
940
+ $[33] = rest;
941
+ $[34] = t11;
942
+ $[35] = t4;
943
+ $[36] = t9;
944
+ $[37] = t12;
945
+ } else {
946
+ t12 = $[37];
947
+ }
948
+ return t12;
856
949
  }
857
950
  const FilePicker = Object.assign(FilePicker$1, {
858
951
  Dropzone: FilePickerDropzone,
@@ -1597,7 +1690,7 @@ const LogoGreen = (t0) => {
1597
1690
  return t21;
1598
1691
  };
1599
1692
  export {
1600
- Alert2 as Alert,
1693
+ Alert,
1601
1694
  Avatar2 as Avatar,
1602
1695
  Badge,
1603
1696
  BadgePosition,
@@ -1662,9 +1755,9 @@ export {
1662
1755
  HeaderTitle,
1663
1756
  Heading,
1664
1757
  Input,
1665
- Label2 as Label,
1758
+ Label,
1666
1759
  LightDarkLogo,
1667
- Link,
1760
+ Link2 as Link,
1668
1761
  List,
1669
1762
  ListItem,
1670
1763
  ListOrdered,
@@ -1694,7 +1787,7 @@ export {
1694
1787
  SkipLink,
1695
1788
  Spinner2 as Spinner,
1696
1789
  Switch,
1697
- Table,
1790
+ Table2 as Table,
1698
1791
  TableBody,
1699
1792
  TableCell,
1700
1793
  TableFoot,