@open-mercato/ui 0.6.3-develop.3809.1.bde5459e65 → 0.6.3-develop.3810.1.ad92c339f5

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,3 +1,3 @@
1
1
  Generated lucide registry with 135 icons -> /home/runner/work/open-mercato/open-mercato/packages/ui/src/backend/icons/lucideRegistry.generated.tsx
2
- [build:ui] found 353 entry points
2
+ [build:ui] found 354 entry points
3
3
  [build:ui] built successfully
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { Button } from "@open-mercato/ui/primitives/button";
5
+ import { ErrorMessage } from "./ErrorMessage.js";
6
+ import { cn } from "@open-mercato/shared/lib/utils";
7
+ import { useT } from "@open-mercato/shared/lib/i18n/context";
8
+ function RecordNotFoundState({
9
+ label,
10
+ description,
11
+ backHref,
12
+ backLabel,
13
+ action,
14
+ className
15
+ }) {
16
+ const t = useT();
17
+ const defaultAction = backHref ? /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", size: "sm", children: /* @__PURE__ */ jsx(Link, { href: backHref, children: backLabel ?? t("ui.recordNotFound.backToList", "Back to list") }) }) : null;
18
+ return /* @__PURE__ */ jsx(
19
+ "div",
20
+ {
21
+ className: cn(
22
+ "flex flex-col items-center justify-center min-h-[50vh] px-4",
23
+ className
24
+ ),
25
+ children: /* @__PURE__ */ jsx(
26
+ ErrorMessage,
27
+ {
28
+ label,
29
+ description,
30
+ action: action ?? defaultAction
31
+ }
32
+ )
33
+ }
34
+ );
35
+ }
36
+ export {
37
+ RecordNotFoundState
38
+ };
39
+ //# sourceMappingURL=RecordNotFoundState.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/backend/detail/RecordNotFoundState.tsx"],
4
+ "sourcesContent": ["\"use client\";\n\nimport * as React from \"react\";\nimport Link from \"next/link\";\nimport { Button } from \"@open-mercato/ui/primitives/button\";\nimport { ErrorMessage } from \"./ErrorMessage\";\nimport { cn } from \"@open-mercato/shared/lib/utils\";\nimport { useT } from \"@open-mercato/shared/lib/i18n/context\";\n\nexport type RecordNotFoundStateProps = {\n label: string;\n description?: string;\n backHref?: string;\n backLabel?: string;\n action?: React.ReactNode;\n className?: string;\n};\n\nexport function RecordNotFoundState({\n label,\n description,\n backHref,\n backLabel,\n action,\n className,\n}: RecordNotFoundStateProps) {\n const t = useT();\n const defaultAction = backHref ? (\n <Button asChild variant=\"outline\" size=\"sm\">\n <Link href={backHref}>{backLabel ?? t('ui.recordNotFound.backToList','Back to list')}</Link>\n </Button>\n ) : null;\n\n return (\n <div\n className={cn(\n \"flex flex-col items-center justify-center min-h-[50vh] px-4\",\n className,\n )}\n >\n <ErrorMessage\n label={label}\n description={description}\n action={action ?? defaultAction}\n />\n </div>\n );\n}\n"],
5
+ "mappings": ";AA6BM;AA1BN,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AACnB,SAAS,YAAY;AAWd,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA6B;AAC3B,QAAM,IAAI,KAAK;AACf,QAAM,gBAAgB,WACpB,oBAAC,UAAO,SAAO,MAAC,SAAQ,WAAU,MAAK,MACrC,8BAAC,QAAK,MAAM,UAAW,uBAAa,EAAE,gCAA+B,cAAc,GAAE,GACvF,IACE;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,QAAQ,UAAU;AAAA;AAAA,MACpB;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -3,6 +3,7 @@ export * from "./DetailFieldsSection.js";
3
3
  export * from "./LoadingMessage.js";
4
4
  export * from "./ErrorMessage.js";
5
5
  export * from "./AccessDeniedMessage.js";
6
+ import { RecordNotFoundState } from "./RecordNotFoundState.js";
6
7
  export * from "./TabEmptyState.js";
7
8
  export * from "./CustomDataSection.js";
8
9
  export * from "./TagsSection.js";
@@ -28,6 +29,7 @@ export {
28
29
  AddressView,
29
30
  AddressesSection,
30
31
  NotesSection,
32
+ RecordNotFoundState,
31
33
  formatAddressJson,
32
34
  formatAddressLines,
33
35
  formatAddressString,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/backend/detail/index.ts"],
4
- "sourcesContent": ["export * from './InlineEditors'\nexport * from './DetailFieldsSection'\nexport * from './LoadingMessage'\nexport * from './ErrorMessage'\nexport * from './AccessDeniedMessage'\nexport * from './TabEmptyState'\nexport * from './CustomDataSection'\nexport * from './TagsSection'\nexport { NotesSection, mapCommentSummary } from './NotesSection'\nexport type { NotesSectionProps, CommentSummary, SectionAction, TabEmptyStateConfig } from './NotesSection'\nexport { ActivitiesSection } from './ActivitiesSection'\nexport type {\n ActivitiesSectionProps,\n ActivitiesDataAdapter,\n ActivitySummary,\n ActivityCreatePayload,\n ActivityUpdatePayload,\n ActivityFormBaseValues,\n ActivityFormSubmitPayload,\n} from './ActivitiesSection'\nexport { AddressesSection } from './AddressesSection'\nexport type { AddressesSectionProps, AddressDataAdapter, AddressSummary } from './AddressesSection'\nexport { default as AddressTiles } from './AddressTiles'\nexport type { AddressInput, AddressValue as AddressTileValue, Translator as AddressTilesTranslator } from './AddressTiles'\nexport { default as AddressEditor } from './AddressEditor'\nexport type {\n AddressTypeOption,\n AddressTypesAdapter,\n AddressEditorDraft,\n AddressEditorField,\n} from './AddressEditor'\nexport {\n AddressView,\n formatAddressJson,\n formatAddressLines,\n formatAddressString,\n} from './addressFormat'\nexport type {\n AddressFormatStrategy,\n AddressJsonShape,\n AddressValue as AddressFormatValue,\n} from './addressFormat'\nexport * from './AttachmentMetadataDialog'\nexport * from './AttachmentDeleteDialog'\nexport * from './AttachmentsSection'\nexport * from './AttachmentVisualPreview'\n"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,cAAc,yBAAyB;AAEhD,SAAS,yBAAyB;AAUlC,SAAS,wBAAwB;AAEjC,SAAoB,WAAXA,gBAA+B;AAExC,SAAoB,WAAXA,gBAAgC;AAOzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["export * from './InlineEditors'\nexport * from './DetailFieldsSection'\nexport * from './LoadingMessage'\nexport * from './ErrorMessage'\nexport * from './AccessDeniedMessage'\nexport { RecordNotFoundState } from './RecordNotFoundState'\nexport type { RecordNotFoundStateProps } from './RecordNotFoundState'\nexport * from './TabEmptyState'\nexport * from './CustomDataSection'\nexport * from './TagsSection'\nexport { NotesSection, mapCommentSummary } from './NotesSection'\nexport type { NotesSectionProps, CommentSummary, SectionAction, TabEmptyStateConfig } from './NotesSection'\nexport { ActivitiesSection } from './ActivitiesSection'\nexport type {\n ActivitiesSectionProps,\n ActivitiesDataAdapter,\n ActivitySummary,\n ActivityCreatePayload,\n ActivityUpdatePayload,\n ActivityFormBaseValues,\n ActivityFormSubmitPayload,\n} from './ActivitiesSection'\nexport { AddressesSection } from './AddressesSection'\nexport type { AddressesSectionProps, AddressDataAdapter, AddressSummary } from './AddressesSection'\nexport { default as AddressTiles } from './AddressTiles'\nexport type { AddressInput, AddressValue as AddressTileValue, Translator as AddressTilesTranslator } from './AddressTiles'\nexport { default as AddressEditor } from './AddressEditor'\nexport type {\n AddressTypeOption,\n AddressTypesAdapter,\n AddressEditorDraft,\n AddressEditorField,\n} from './AddressEditor'\nexport {\n AddressView,\n formatAddressJson,\n formatAddressLines,\n formatAddressString,\n} from './addressFormat'\nexport type {\n AddressFormatStrategy,\n AddressJsonShape,\n AddressValue as AddressFormatValue,\n} from './addressFormat'\nexport * from './AttachmentMetadataDialog'\nexport * from './AttachmentDeleteDialog'\nexport * from './AttachmentsSection'\nexport * from './AttachmentVisualPreview'\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,2BAA2B;AAEpC,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,cAAc,yBAAyB;AAEhD,SAAS,yBAAyB;AAUlC,SAAS,wBAAwB;AAEjC,SAAoB,WAAXA,gBAA+B;AAExC,SAAoB,WAAXA,gBAAgC;AAOzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": ["default"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/ui",
3
- "version": "0.6.3-develop.3809.1.bde5459e65",
3
+ "version": "0.6.3-develop.3810.1.ad92c339f5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -141,13 +141,13 @@
141
141
  "remark-gfm": "^4.0.1"
142
142
  },
143
143
  "peerDependencies": {
144
- "@open-mercato/shared": "0.6.3-develop.3809.1.bde5459e65",
144
+ "@open-mercato/shared": "0.6.3-develop.3810.1.ad92c339f5",
145
145
  "react": ">=18.0.0",
146
146
  "react-dom": ">=18.0.0",
147
147
  "react-is": ">=18.0.0"
148
148
  },
149
149
  "devDependencies": {
150
- "@open-mercato/shared": "0.6.3-develop.3809.1.bde5459e65",
150
+ "@open-mercato/shared": "0.6.3-develop.3810.1.ad92c339f5",
151
151
  "@testing-library/dom": "^10.4.1",
152
152
  "@testing-library/jest-dom": "^6.9.1",
153
153
  "@testing-library/react": "^16.3.1",
@@ -0,0 +1,48 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import Link from "next/link";
5
+ import { Button } from "@open-mercato/ui/primitives/button";
6
+ import { ErrorMessage } from "./ErrorMessage";
7
+ import { cn } from "@open-mercato/shared/lib/utils";
8
+ import { useT } from "@open-mercato/shared/lib/i18n/context";
9
+
10
+ export type RecordNotFoundStateProps = {
11
+ label: string;
12
+ description?: string;
13
+ backHref?: string;
14
+ backLabel?: string;
15
+ action?: React.ReactNode;
16
+ className?: string;
17
+ };
18
+
19
+ export function RecordNotFoundState({
20
+ label,
21
+ description,
22
+ backHref,
23
+ backLabel,
24
+ action,
25
+ className,
26
+ }: RecordNotFoundStateProps) {
27
+ const t = useT();
28
+ const defaultAction = backHref ? (
29
+ <Button asChild variant="outline" size="sm">
30
+ <Link href={backHref}>{backLabel ?? t('ui.recordNotFound.backToList','Back to list')}</Link>
31
+ </Button>
32
+ ) : null;
33
+
34
+ return (
35
+ <div
36
+ className={cn(
37
+ "flex flex-col items-center justify-center min-h-[50vh] px-4",
38
+ className,
39
+ )}
40
+ >
41
+ <ErrorMessage
42
+ label={label}
43
+ description={description}
44
+ action={action ?? defaultAction}
45
+ />
46
+ </div>
47
+ );
48
+ }
@@ -3,6 +3,8 @@ export * from './DetailFieldsSection'
3
3
  export * from './LoadingMessage'
4
4
  export * from './ErrorMessage'
5
5
  export * from './AccessDeniedMessage'
6
+ export { RecordNotFoundState } from './RecordNotFoundState'
7
+ export type { RecordNotFoundStateProps } from './RecordNotFoundState'
6
8
  export * from './TabEmptyState'
7
9
  export * from './CustomDataSection'
8
10
  export * from './TagsSection'