@kystverket/styrbord 1.4.4 → 1.4.5

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.
@@ -1,5 +1,5 @@
1
1
  import type { StoryObj } from '@storybook/react-vite';
2
- import { FileUploaderProps } from './FileUploader';
2
+ import { FileUploaderProps } from '../FileUploader/FileUploader';
3
3
  import { PartialStoryFn } from 'storybook/internal/types';
4
4
  declare const meta: {
5
5
  title: string;
@@ -10,4 +10,4 @@ declare const meta: {
10
10
  };
11
11
  export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
- export declare const WithExistingFilesWithTranslations: Story;
13
+ export declare const OverriddenTranslations: Story;
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { FileUploaderProps } from '../FileUploader/FileUploader';
3
+ import { PartialStoryFn } from 'storybook/internal/types';
4
+ declare const meta: {
5
+ title: string;
6
+ component: (props: FileUploaderProps) => React.JSX.Element;
7
+ decorators: ((Story: PartialStoryFn) => React.JSX.Element)[];
8
+ tags: string[];
9
+ argTypes: {};
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const OverriddenTranslations: Story;
package/dist/style.js CHANGED
@@ -1244,7 +1244,7 @@ function B5(r, n) {
1244
1244
  function k8(r) {
1245
1245
  const n = v3(q8);
1246
1246
  if (!n)
1247
- throw new Error("[@kystverket/sprak-react] useTranslation() must be used inside <SprakProvider>");
1247
+ return console.warn("[@kystverket/sprak-react] useTranslation() must be used inside <SprakProvider>"), { t: (E) => E, scopedT: () => (E) => E };
1248
1248
  const e = r ?? n.defaultNamespace, t = v3(K8), { locale: A, fallbackLocale: i } = n, a = t[e], l = S7(
1249
1249
  () => a ? [...a].sort((E, s) => s.zIndex - E.zIndex) : void 0,
1250
1250
  [a]