@arbeidstilsynet/design-react 0.4.2 → 0.5.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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import require$$0, { createContext, use, useLayoutEffect, useEffect, useState, useId, Children, isValidElement } from "react";
3
- import { CloudUpIcon, FileTextIcon, TrashIcon, XMarkIcon, MenuHamburgerIcon, ChevronUpIcon, ChevronDownIcon } from "@navikt/aksel-icons";
3
+ import { CloudUpIcon, TrashIcon, XMarkIcon, MenuHamburgerIcon, ChevronUpIcon, ChevronDownIcon } from "@navikt/aksel-icons";
4
4
  import { useDropzone } from "react-dropzone";
5
5
  import { Spinner, Button, ValidationMessage, Table, Link, Dropdown, Divider, Heading } from "@digdir/designsystemet-react";
6
6
  import { Alert, Avatar, 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 as Divider2, Dropdown as Dropdown2, 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 as Heading2, Input, Label, Link as Link2, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, 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";
@@ -40,7 +40,7 @@ var hasRequiredReactJsxRuntime_development;
40
40
  function requireReactJsxRuntime_development() {
41
41
  if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
42
42
  hasRequiredReactJsxRuntime_development = 1;
43
- "production" !== process.env.NODE_ENV && function() {
43
+ "production" !== process.env.NODE_ENV && (function() {
44
44
  function getComponentNameFromType(type) {
45
45
  if (null == type) return null;
46
46
  if ("function" === typeof type)
@@ -289,7 +289,7 @@ function requireReactJsxRuntime_development() {
289
289
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
290
290
  );
291
291
  };
292
- }();
292
+ })();
293
293
  return reactJsxRuntime_development;
294
294
  }
295
295
  var hasRequiredJsxRuntime;
@@ -321,7 +321,7 @@ var hasRequiredReactCompilerRuntime_development;
321
321
  function requireReactCompilerRuntime_development() {
322
322
  if (hasRequiredReactCompilerRuntime_development) return reactCompilerRuntime_development;
323
323
  hasRequiredReactCompilerRuntime_development = 1;
324
- "production" !== process.env.NODE_ENV && function() {
324
+ "production" !== process.env.NODE_ENV && (function() {
325
325
  var ReactSharedInternals = require$$0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
326
326
  reactCompilerRuntime_development.c = function(size) {
327
327
  var dispatcher = ReactSharedInternals.H;
@@ -330,7 +330,7 @@ function requireReactCompilerRuntime_development() {
330
330
  );
331
331
  return dispatcher.useMemoCache(size);
332
332
  };
333
- }();
333
+ })();
334
334
  return reactCompilerRuntime_development;
335
335
  }
336
336
  var hasRequiredCompilerRuntime;
@@ -856,13 +856,10 @@ function FilePickerFiles(t0) {
856
856
  } = t122;
857
857
  const size = formatFileSize(file.size);
858
858
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Table.Row, { "data-error": hasError, children: [
859
- /* @__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: [
860
- /* @__PURE__ */ jsxRuntimeExports.jsx(FileTextIcon, { "aria-hidden": "true", fontSize: "1.5em" }),
861
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__text", children: file.name })
862
- ] }) }),
859
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: file.name, className: "at-filepicker-files-file__name", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: disabled ? void 0 : URL.createObjectURL(file), target: "_blank", rel: "noreferrer", "aria-disabled": disabled, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__text", children: file.name }) }) }),
863
860
  /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: size, children: size }),
864
- /* @__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: [
865
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__remove-text", children: removeButtonLabel }),
861
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { "data-color": "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "tertiary", disabled, "aria-label": `Remove ${file.name}`, onClick: () => onRemove(id), className: "at-filepicker-files-file__button", children: [
862
+ removeButtonLabel,
866
863
  /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, { "aria-hidden": true })
867
864
  ] }) })
868
865
  ] }, id);
@@ -893,7 +890,7 @@ function FilePickerFiles(t0) {
893
890
  }
894
891
  let t12;
895
892
  if ($[33] !== rest || $[34] !== t11 || $[35] !== t4 || $[36] !== t9) {
896
- t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { className: t4, ...rest, children: [
893
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { "data-color": "neutral", className: t4, ...rest, children: [
897
894
  t9,
898
895
  t11
899
896
  ] });