asheeui 1.1.0 → 2.0.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.
Files changed (154) hide show
  1. package/LICENSE +201 -21
  2. package/NOTICE +10 -0
  3. package/README.md +3 -1
  4. package/dist/components/accordion/Accordion.d.ts +1 -1
  5. package/dist/components/centered/Centered.d.ts +49 -0
  6. package/dist/components/centered/Centered.d.ts.map +1 -0
  7. package/dist/components/centered/Centered.js +32 -0
  8. package/dist/components/centered/centered-config.d.ts +63 -0
  9. package/dist/components/centered/centered-config.d.ts.map +1 -0
  10. package/dist/components/centered/centered-config.js +17 -0
  11. package/dist/components/centered/centered-styles.d.ts +11 -0
  12. package/dist/components/centered/centered-styles.d.ts.map +1 -0
  13. package/dist/components/centered/centered-styles.js +9 -0
  14. package/dist/components/centered/index.d.ts +3 -0
  15. package/dist/components/centered/index.d.ts.map +1 -0
  16. package/dist/components/centered/index.js +3 -0
  17. package/dist/components/chip/Chip.d.ts +8 -0
  18. package/dist/components/chip/Chip.d.ts.map +1 -1
  19. package/dist/components/chip/Chip.js +15 -15
  20. package/dist/components/data-table/DataTable.d.ts +137 -0
  21. package/dist/components/data-table/DataTable.d.ts.map +1 -0
  22. package/dist/components/data-table/DataTable.js +101 -0
  23. package/dist/components/data-table/data-table-config.d.ts +75 -0
  24. package/dist/components/data-table/data-table-config.d.ts.map +1 -0
  25. package/dist/components/data-table/data-table-config.js +24 -0
  26. package/dist/components/data-table/data-table-styles.d.ts +25 -0
  27. package/dist/components/data-table/data-table-styles.d.ts.map +1 -0
  28. package/dist/components/data-table/data-table-styles.js +5 -0
  29. package/dist/components/data-table/index.d.ts +3 -0
  30. package/dist/components/data-table/index.d.ts.map +1 -0
  31. package/dist/components/data-table/index.js +3 -0
  32. package/dist/components/docs-layout/DocsLayout.d.ts +94 -0
  33. package/dist/components/docs-layout/DocsLayout.d.ts.map +1 -0
  34. package/dist/components/docs-layout/DocsLayout.js +62 -0
  35. package/dist/components/docs-layout/docs-layout-config.d.ts +61 -0
  36. package/dist/components/docs-layout/docs-layout-config.d.ts.map +1 -0
  37. package/dist/components/docs-layout/docs-layout-config.js +22 -0
  38. package/dist/components/docs-layout/docs-layout-styles.d.ts +31 -0
  39. package/dist/components/docs-layout/docs-layout-styles.d.ts.map +1 -0
  40. package/dist/components/docs-layout/docs-layout-styles.js +5 -0
  41. package/dist/components/docs-layout/index.d.ts +3 -0
  42. package/dist/components/docs-layout/index.d.ts.map +1 -0
  43. package/dist/components/docs-layout/index.js +3 -0
  44. package/dist/components/empty-state/EmptyState.d.ts +19 -1
  45. package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
  46. package/dist/components/empty-state/EmptyState.js +10 -9
  47. package/dist/components/error-state/ErrorState.d.ts +98 -0
  48. package/dist/components/error-state/ErrorState.d.ts.map +1 -0
  49. package/dist/components/error-state/ErrorState.js +57 -0
  50. package/dist/components/error-state/error-state-config.d.ts +66 -0
  51. package/dist/components/error-state/error-state-config.d.ts.map +1 -0
  52. package/dist/components/error-state/error-state-config.js +20 -0
  53. package/dist/components/error-state/error-state-styles.d.ts +17 -0
  54. package/dist/components/error-state/error-state-styles.d.ts.map +1 -0
  55. package/dist/components/error-state/error-state-styles.js +5 -0
  56. package/dist/components/error-state/index.d.ts +3 -0
  57. package/dist/components/error-state/index.d.ts.map +1 -0
  58. package/dist/components/error-state/index.js +3 -0
  59. package/dist/components/file-upload/FileUpload.d.ts +112 -0
  60. package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
  61. package/dist/components/file-upload/FileUpload.js +83 -0
  62. package/dist/components/file-upload/file-upload-config.d.ts +41 -0
  63. package/dist/components/file-upload/file-upload-config.d.ts.map +1 -0
  64. package/dist/components/file-upload/file-upload-config.js +16 -0
  65. package/dist/components/file-upload/file-upload-styles.d.ts +22 -0
  66. package/dist/components/file-upload/file-upload-styles.d.ts.map +1 -0
  67. package/dist/components/file-upload/file-upload-styles.js +9 -0
  68. package/dist/components/file-upload/file-upload.helpers.d.ts +26 -0
  69. package/dist/components/file-upload/file-upload.helpers.d.ts.map +1 -0
  70. package/dist/components/file-upload/file-upload.helpers.js +17 -0
  71. package/dist/components/file-upload/index.d.ts +3 -0
  72. package/dist/components/file-upload/index.d.ts.map +1 -0
  73. package/dist/components/file-upload/index.js +4 -0
  74. package/dist/components/loading-state/LoadingState.d.ts +57 -0
  75. package/dist/components/loading-state/LoadingState.d.ts.map +1 -0
  76. package/dist/components/loading-state/LoadingState.js +44 -0
  77. package/dist/components/loading-state/index.d.ts +3 -0
  78. package/dist/components/loading-state/index.d.ts.map +1 -0
  79. package/dist/components/loading-state/index.js +3 -0
  80. package/dist/components/loading-state/loading-state-config.d.ts +49 -0
  81. package/dist/components/loading-state/loading-state-config.d.ts.map +1 -0
  82. package/dist/components/loading-state/loading-state-config.js +18 -0
  83. package/dist/components/loading-state/loading-state-styles.d.ts +12 -0
  84. package/dist/components/loading-state/loading-state-styles.d.ts.map +1 -0
  85. package/dist/components/loading-state/loading-state-styles.js +9 -0
  86. package/dist/components/marketing-layout/MarketingLayout.d.ts +83 -0
  87. package/dist/components/marketing-layout/MarketingLayout.d.ts.map +1 -0
  88. package/dist/components/marketing-layout/MarketingLayout.js +40 -0
  89. package/dist/components/marketing-layout/index.d.ts +3 -0
  90. package/dist/components/marketing-layout/index.d.ts.map +1 -0
  91. package/dist/components/marketing-layout/index.js +3 -0
  92. package/dist/components/marketing-layout/marketing-layout-config.d.ts +60 -0
  93. package/dist/components/marketing-layout/marketing-layout-config.d.ts.map +1 -0
  94. package/dist/components/marketing-layout/marketing-layout-config.js +16 -0
  95. package/dist/components/marketing-layout/marketing-layout-styles.d.ts +8 -0
  96. package/dist/components/marketing-layout/marketing-layout-styles.d.ts.map +1 -0
  97. package/dist/components/marketing-layout/marketing-layout-styles.js +8 -0
  98. package/dist/components/search-input/SearchInput.d.ts +111 -0
  99. package/dist/components/search-input/SearchInput.d.ts.map +1 -0
  100. package/dist/components/search-input/SearchInput.js +86 -0
  101. package/dist/components/search-input/index.d.ts +3 -0
  102. package/dist/components/search-input/index.d.ts.map +1 -0
  103. package/dist/components/search-input/index.js +3 -0
  104. package/dist/components/search-input/search-input-config.d.ts +55 -0
  105. package/dist/components/search-input/search-input-config.d.ts.map +1 -0
  106. package/dist/components/search-input/search-input-config.js +20 -0
  107. package/dist/components/search-input/search-input-styles.d.ts +16 -0
  108. package/dist/components/search-input/search-input-styles.d.ts.map +1 -0
  109. package/dist/components/search-input/search-input-styles.js +9 -0
  110. package/dist/components/section-kit/ActionGroup.d.ts +8 -1
  111. package/dist/components/section-kit/ActionGroup.d.ts.map +1 -1
  112. package/dist/components/section-kit/ActionGroup.js +13 -9
  113. package/dist/components/section-kit/SkipLink.d.ts +50 -0
  114. package/dist/components/section-kit/SkipLink.d.ts.map +1 -0
  115. package/dist/components/section-kit/SkipLink.js +14 -0
  116. package/dist/components/section-kit/index.d.ts +5 -4
  117. package/dist/components/section-kit/index.d.ts.map +1 -1
  118. package/dist/components/section-kit/index.js +1 -0
  119. package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -1
  120. package/dist/components/sidebar-layout/SidebarLayout.js +25 -25
  121. package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +10 -3
  122. package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -1
  123. package/dist/components/sidebar-layout/sidebar-layout-styles.js +2 -2
  124. package/dist/components/split/Split.d.ts +68 -0
  125. package/dist/components/split/Split.d.ts.map +1 -0
  126. package/dist/components/split/Split.js +36 -0
  127. package/dist/components/split/index.d.ts +3 -0
  128. package/dist/components/split/index.d.ts.map +1 -0
  129. package/dist/components/split/index.js +3 -0
  130. package/dist/components/split/split-config.d.ts +83 -0
  131. package/dist/components/split/split-config.d.ts.map +1 -0
  132. package/dist/components/split/split-config.js +20 -0
  133. package/dist/components/split/split-styles.d.ts +36 -0
  134. package/dist/components/split/split-styles.d.ts.map +1 -0
  135. package/dist/components/split/split-styles.js +76 -0
  136. package/dist/components/stepper/Stepper.d.ts +94 -0
  137. package/dist/components/stepper/Stepper.d.ts.map +1 -0
  138. package/dist/components/stepper/Stepper.js +71 -0
  139. package/dist/components/stepper/index.d.ts +3 -0
  140. package/dist/components/stepper/index.d.ts.map +1 -0
  141. package/dist/components/stepper/index.js +3 -0
  142. package/dist/components/stepper/stepper-config.d.ts +51 -0
  143. package/dist/components/stepper/stepper-config.d.ts.map +1 -0
  144. package/dist/components/stepper/stepper-config.js +16 -0
  145. package/dist/components/stepper/stepper-styles.d.ts +30 -0
  146. package/dist/components/stepper/stepper-styles.d.ts.map +1 -0
  147. package/dist/components/stepper/stepper-styles.js +25 -0
  148. package/dist/index.d.ts +10 -0
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +93 -73
  151. package/dist/shared/spacing.d.ts +8 -0
  152. package/dist/shared/spacing.d.ts.map +1 -1
  153. package/dist/shared/spacing.js +9 -1
  154. package/package.json +5 -3
@@ -0,0 +1,41 @@
1
+ import { Size } from '../../shared';
2
+ /**
3
+ * Theme configuration options for the FileUpload component.
4
+ *
5
+ * Set under `components.fileupload` in the AsheeUI config. Values feed the
6
+ * component-level tier of the theme cascade.
7
+ */
8
+ export interface FileUploadConfig {
9
+ /**
10
+ * Name of the control inside the drop zone.
11
+ *
12
+ * @default "Choose files"
13
+ */
14
+ buttonLabel?: string;
15
+ /**
16
+ * Instruction shown in the zone when nothing is being dragged over it.
17
+ *
18
+ * @default "Drag files here"
19
+ */
20
+ hint?: string;
21
+ /**
22
+ * Density of the zone.
23
+ *
24
+ * @default "md"
25
+ */
26
+ size?: Size;
27
+ }
28
+ /**
29
+ * Default config values registered for the FileUpload component.
30
+ */
31
+ export declare const defaultFileUploadConfig: FileUploadConfig;
32
+ declare module "../../libs/registry" {
33
+ interface ComponentTypeConfigRegistry {
34
+ fileupload: FileUploadConfig;
35
+ }
36
+ }
37
+ /**
38
+ * Hard fallback values used when no config tier provides a value.
39
+ */
40
+ export declare const FALLBACK_FILE_UPLOAD_CONFIG: Required<FileUploadConfig>;
41
+ //# sourceMappingURL=file-upload-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload-config.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/file-upload-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAIrC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,UAAU,EAAE,gBAAgB,CAAC;KAC9B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,gBAAgB,CAIlE,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/file-upload/file-upload-config.ts
4
+ var t = {
5
+ buttonLabel: "Choose files",
6
+ hint: "Drag files here",
7
+ size: "md"
8
+ };
9
+ e("fileupload", t);
10
+ var n = {
11
+ buttonLabel: "Choose files",
12
+ hint: "Drag files here",
13
+ size: "md"
14
+ };
15
+ //#endregion
16
+ export { n as FALLBACK_FILE_UPLOAD_CONFIG, t as defaultFileUploadConfig };
@@ -0,0 +1,22 @@
1
+ import { Size } from '../../shared';
2
+ /**
3
+ * The drop zone, which is a label for the field it hides.
4
+ * Its focus ring follows the field, so the zone shows where the keyboard is even
5
+ * though the field itself is visually hidden.
6
+ */
7
+ export declare const FILE_UPLOAD_ZONE_CLASS = "flex w-full min-w-0 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed border-border bg-background text-center transition-colors hover:border-primary focus-within:ring-2 focus-within:ring-primary focus-within:ring-offset-2";
8
+ /** The zone while a file is dragged over it. */
9
+ export declare const FILE_UPLOAD_ZONE_ACTIVE_CLASS = "border-primary bg-primary/10";
10
+ /** The zone when the field is unavailable. */
11
+ export declare const FILE_UPLOAD_ZONE_DISABLED_CLASS = "cursor-not-allowed opacity-60 hover:border-border";
12
+ /** Padding for each density. */
13
+ export declare const FILE_UPLOAD_SIZE_CLASS: Record<Size, string>;
14
+ /** The control's label, styled as an emphasised part of the zone. */
15
+ export declare const FILE_UPLOAD_BUTTON_CLASS = "font-medium text-primary underline";
16
+ /** The instruction beside it. */
17
+ export declare const FILE_UPLOAD_HINT_CLASS = "text-sm text-foreground/60";
18
+ /** The field itself, which is present for the keyboard and the picker only. */
19
+ export declare const FILE_UPLOAD_INPUT_CLASS = "sr-only";
20
+ /** The list of chosen files. */
21
+ export declare const FILE_UPLOAD_LIST_CLASS = "flex flex-wrap gap-2 pt-1";
22
+ //# sourceMappingURL=file-upload-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload-styles.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/file-upload-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,4QACwO,CAAC;AAE5Q,gDAAgD;AAChD,eAAO,MAAM,6BAA6B,iCAAiC,CAAC;AAE5E,8CAA8C;AAC9C,eAAO,MAAM,+BAA+B,sDACS,CAAC;AAEtD,gCAAgC;AAChC,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIvD,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,wBAAwB,uCAAuC,CAAC;AAE7E,iCAAiC;AACjC,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,YAAY,CAAC;AAEjD,gCAAgC;AAChC,eAAO,MAAM,sBAAsB,8BAA8B,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ //#region src/components/file-upload/file-upload-styles.ts
3
+ var e = "flex w-full min-w-0 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed border-border bg-background text-center transition-colors hover:border-primary focus-within:ring-2 focus-within:ring-primary focus-within:ring-offset-2", t = "border-primary bg-primary/10", n = "cursor-not-allowed opacity-60 hover:border-border", r = {
4
+ sm: "px-4 py-6",
5
+ md: "px-6 py-10",
6
+ lg: "px-8 py-14"
7
+ }, i = "font-medium text-primary underline", a = "text-sm text-foreground/60", o = "sr-only", s = "flex flex-wrap gap-2 pt-1";
8
+ //#endregion
9
+ export { i as FILE_UPLOAD_BUTTON_CLASS, a as FILE_UPLOAD_HINT_CLASS, o as FILE_UPLOAD_INPUT_CLASS, s as FILE_UPLOAD_LIST_CLASS, r as FILE_UPLOAD_SIZE_CLASS, t as FILE_UPLOAD_ZONE_ACTIVE_CLASS, e as FILE_UPLOAD_ZONE_CLASS, n as FILE_UPLOAD_ZONE_DISABLED_CLASS };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * FileUpload component helpers for AsheeUI.
3
+ * This file provides the small pure functions the file field needs: reporting a
4
+ * file size in the reader's terms and describing what the field rejected.
5
+ */
6
+ /**
7
+ * Describe a file size in the reader's terms.
8
+ *
9
+ * @param bytes - The size in bytes.
10
+ * @returns A short description, such as `1.5 MB`.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * formatFileSize(1536); // "1.5 KB"
15
+ * ```
16
+ */
17
+ export declare function formatFileSize(bytes: number): string;
18
+ /**
19
+ * Describe the files a size limit left out.
20
+ *
21
+ * @param count - How many files were left out.
22
+ * @param maxSize - The limit, in bytes.
23
+ * @returns A sentence naming the count and the limit.
24
+ */
25
+ export declare function describeRejectedFiles(count: number, maxSize: number): string;
26
+ //# sourceMappingURL=file-upload.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/file-upload.helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAepD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAI5E"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ //#region src/components/file-upload/file-upload.helpers.ts
3
+ function e(e) {
4
+ if (e < 1024) return `${e} B`;
5
+ let t = [
6
+ "KB",
7
+ "MB",
8
+ "GB"
9
+ ], n = e / 1024, r = 0;
10
+ for (; n >= 1024 && r < t.length - 1;) n /= 1024, r += 1;
11
+ return `${Number(n.toFixed(1))} ${t[r]}`;
12
+ }
13
+ function t(t, n) {
14
+ return `${t === 1 ? "One file was" : `${t} files were`} larger than ${e(n)} and was not added.`;
15
+ }
16
+ //#endregion
17
+ export { t as describeRejectedFiles, e as formatFileSize };
@@ -0,0 +1,3 @@
1
+ export * from './FileUpload';
2
+ export * from './file-upload-config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./FileUpload.js";
2
+ export * from "./file-upload-config.js";
3
+ export * from "./file-upload-styles.js";
4
+ export * from "./file-upload.helpers.js";
@@ -0,0 +1,57 @@
1
+ import { ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ import { LoadingStateConfig } from './loading-state-config';
3
+ type BaseLoadingStateProps = LoadingStateConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
4
+ /**
5
+ * Props for the LoadingState component.
6
+ */
7
+ export interface LoadingStateProps extends BaseLoadingStateProps {
8
+ /**
9
+ * Supporting sentence under the label, for example what is being fetched.
10
+ */
11
+ description?: ReactNode;
12
+ /**
13
+ * Element that replaces the framework's spinner, for a progress bar or a
14
+ * consumer's own indicator.
15
+ */
16
+ indicator?: ReactNode;
17
+ /**
18
+ * Element to render.
19
+ * Defaults to a `div`.
20
+ *
21
+ * @default "div"
22
+ */
23
+ as?: ElementType;
24
+ /**
25
+ * Content below the label, for example a cancel control.
26
+ */
27
+ children?: ReactNode;
28
+ }
29
+ /**
30
+ * A region whose content has not arrived yet.
31
+ *
32
+ * The state is a `status` region, so assistive technology is told that something
33
+ * is in progress rather than being left with a silent gap. It claims room by
34
+ * default, so the page does not jump when the content arrives, and it says what
35
+ * is loading rather than only that something is.
36
+ *
37
+ * @param props - LoadingState configuration options and element attributes.
38
+ * @param props.label - Text shown and announced. Defaults to "Loading".
39
+ * @param props.description - Supporting sentence.
40
+ * @param props.indicator - Element that replaces the framework's spinner.
41
+ * @param props.size - Density of the indicator and the padding. Defaults to "md".
42
+ * @param props.panel - Draw the state as a panel. Defaults to false.
43
+ * @param props.minHeight - Room the state claims. Defaults to "sm".
44
+ * @param props.as - Element to render. Defaults to "div".
45
+ * @returns The rendered state.
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * <LoadingState label="Loading invoices" description="This usually takes a moment." />
50
+ * ```
51
+ *
52
+ * @see Skeleton - The placeholder form, for content whose shape is known.
53
+ * @see EmptyState - The presentation for a region that has nothing in it.
54
+ */
55
+ export declare const LoadingState: import('react').ForwardRefExoticComponent<LoadingStateProps & import('react').RefAttributes<HTMLDivElement>>;
56
+ export {};
57
+ //# sourceMappingURL=LoadingState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingState.d.ts","sourceRoot":"","sources":["../../../src/components/loading-state/LoadingState.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAOf,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,wBAAwB,CAAC;AAOhC,KAAK,qBAAqB,GAAG,kBAAkB,GAC7C,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,8GAsDxB,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn as e } from "../../utils/cn.js";
4
+ import { SPACE_MIN_HEIGHT_CLASS as t } from "../../shared/spacing.js";
5
+ import { useAsheeConfig as n } from "../../libs/context.js";
6
+ import { resolveConfigCascade as r } from "../../utils/resolve-token.js";
7
+ import { Typography as i } from "../typography/Typography.js";
8
+ import { Spinner as a } from "../spinner/spinner.js";
9
+ import { FALLBACK_LOADING_STATE_CONFIG as o } from "./loading-state-config.js";
10
+ import { LOADING_STATE_CLASS as s, LOADING_STATE_SIZE_CLASS as c } from "./loading-state-styles.js";
11
+ import { forwardRef as l } from "react";
12
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
13
+ //#region src/components/loading-state/LoadingState.tsx
14
+ var f = l(({ as: l, label: f, description: p, indicator: m, size: h, panel: g, minHeight: _, className: v, children: y, ...b }, x) => {
15
+ let S = n(), C = r({
16
+ label: f,
17
+ size: h,
18
+ panel: g,
19
+ minHeight: _
20
+ }, S.components?.loadingstate, o);
21
+ return /* @__PURE__ */ d(l ?? "div", {
22
+ ref: x,
23
+ role: "status",
24
+ className: e(s, c[C.size], t[C.minHeight], C.panel && "rounded-md border border-border bg-background", v),
25
+ ...b,
26
+ children: [
27
+ m ?? /* @__PURE__ */ u(a, { size: C.size }),
28
+ /* @__PURE__ */ u(i, {
29
+ role: "body-sm",
30
+ tone: "muted",
31
+ children: C.label
32
+ }),
33
+ p && /* @__PURE__ */ u(i, {
34
+ role: "caption",
35
+ tone: "muted",
36
+ children: p
37
+ }),
38
+ y
39
+ ]
40
+ });
41
+ });
42
+ f.displayName = "LoadingState";
43
+ //#endregion
44
+ export { f as LoadingState };
@@ -0,0 +1,3 @@
1
+ export * from './LoadingState';
2
+ export * from './loading-state-config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/loading-state/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./LoadingState.js";
2
+ export * from "./loading-state-config.js";
3
+ export * from "./loading-state-styles.js";
@@ -0,0 +1,49 @@
1
+ import { Size, Space } from '../../shared';
2
+ /**
3
+ * Theme configuration options for the LoadingState component.
4
+ *
5
+ * Set under `components.loadingstate` in the AsheeUI config. Values feed the
6
+ * component-level tier of the theme cascade.
7
+ */
8
+ export interface LoadingStateConfig {
9
+ /**
10
+ * Text announced and shown while the region loads.
11
+ *
12
+ * @default "Loading"
13
+ */
14
+ label?: string;
15
+ /**
16
+ * Density of the indicator and of the label.
17
+ *
18
+ * @default "md"
19
+ */
20
+ size?: Size;
21
+ /**
22
+ * Whether the state is drawn as a panel.
23
+ * A panel suits a region inside a dashboard; without one the state sits
24
+ * directly on the page, which suits a whole-page load.
25
+ *
26
+ * @default false
27
+ */
28
+ panel?: boolean;
29
+ /**
30
+ * Room the state claims, so the page does not jump when the content arrives.
31
+ *
32
+ * @default "sm"
33
+ */
34
+ minHeight?: Space;
35
+ }
36
+ /**
37
+ * Default config values registered for the LoadingState component.
38
+ */
39
+ export declare const defaultLoadingStateConfig: LoadingStateConfig;
40
+ declare module "../../libs/registry" {
41
+ interface ComponentTypeConfigRegistry {
42
+ loadingstate: LoadingStateConfig;
43
+ }
44
+ }
45
+ /**
46
+ * Hard fallback values used when no config tier provides a value.
47
+ */
48
+ export declare const FALLBACK_LOADING_STATE_CONFIG: Required<LoadingStateConfig>;
49
+ //# sourceMappingURL=loading-state-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading-state-config.d.ts","sourceRoot":"","sources":["../../../src/components/loading-state/loading-state-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAKvC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,YAAY,EAAE,kBAAkB,CAAC;KAClC;CACF;AAID;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,kBAAkB,CAKtE,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/loading-state/loading-state-config.ts
4
+ var t = {
5
+ label: "Loading",
6
+ size: "md",
7
+ panel: !1,
8
+ minHeight: "sm"
9
+ };
10
+ e("loadingstate", t);
11
+ var n = {
12
+ label: "Loading",
13
+ size: "md",
14
+ panel: !1,
15
+ minHeight: "sm"
16
+ };
17
+ //#endregion
18
+ export { n as FALLBACK_LOADING_STATE_CONFIG, t as defaultLoadingStateConfig };
@@ -0,0 +1,12 @@
1
+ import { Size } from '../../shared';
2
+ /** The loading region, which centres its indicator and its label. */
3
+ export declare const LOADING_STATE_CLASS = "flex w-full min-w-0 flex-col items-center justify-center gap-3 text-center";
4
+ /**
5
+ * The panel treatment, for a loading region inside a surface.
6
+ * It carries no padding of its own: the density decides the room, so a panel and
7
+ * a bare region of the same size agree.
8
+ */
9
+ export declare const LOADING_STATE_PANEL_CLASS = "rounded-md border border-border bg-background";
10
+ /** Vertical padding for each density. */
11
+ export declare const LOADING_STATE_SIZE_CLASS: Record<Size, string>;
12
+ //# sourceMappingURL=loading-state-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading-state-styles.d.ts","sourceRoot":"","sources":["../../../src/components/loading-state/loading-state-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,+EAC8C,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,kDACW,CAAC;AAElD,yCAAyC;AACzC,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIzD,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ //#region src/components/loading-state/loading-state-styles.ts
3
+ var e = "flex w-full min-w-0 flex-col items-center justify-center gap-3 text-center", t = "rounded-md border border-border bg-background", n = {
4
+ sm: "py-4",
5
+ md: "py-8",
6
+ lg: "py-12"
7
+ };
8
+ //#endregion
9
+ export { e as LOADING_STATE_CLASS, t as LOADING_STATE_PANEL_CLASS, n as LOADING_STATE_SIZE_CLASS };
@@ -0,0 +1,83 @@
1
+ import { ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ import { MarketingLayoutConfig } from './marketing-layout-config';
3
+ type BaseMarketingLayoutProps = MarketingLayoutConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
4
+ /**
5
+ * Props for the MarketingLayout component.
6
+ */
7
+ export interface MarketingLayoutProps extends BaseMarketingLayoutProps {
8
+ /**
9
+ * The page's navigation, above the main region.
10
+ * The framework's `Navbar` renders a `header` landmark, so it belongs here
11
+ * unwrapped; a consumer's own navigation element does too.
12
+ */
13
+ navigation?: ReactNode;
14
+ /**
15
+ * The page's footer, below the main region.
16
+ * The framework's `Footer` renders a `footer` landmark, so it belongs here
17
+ * unwrapped.
18
+ */
19
+ footer?: ReactNode;
20
+ /**
21
+ * The page's sections, in the order they appear: a hero, then the supporting
22
+ * sections, then the closing call to action.
23
+ */
24
+ children?: ReactNode;
25
+ /**
26
+ * Identifier of the main region, which the skip link points at.
27
+ * A page with more than one composition on it gives each one its own.
28
+ *
29
+ * @default "main-content"
30
+ */
31
+ mainId?: string;
32
+ /**
33
+ * Element to render the shell as.
34
+ * Defaults to a `div`.
35
+ *
36
+ * @default "div"
37
+ */
38
+ as?: ElementType;
39
+ }
40
+ /**
41
+ * The arrangement a marketing page is built in.
42
+ *
43
+ * The composition states the page's structure once: navigation first, then a
44
+ * `main` landmark holding the sections, then the footer, with a skip link as the
45
+ * first focusable element so a keyboard reader can pass the navigation. Which
46
+ * sections exist, in what order, and whether they appear at all stay the
47
+ * consumer's decision, because they are passed as children.
48
+ *
49
+ * The composition paints the page background and takes the viewport height. It
50
+ * adds no width and no rhythm of its own: `Section`, `Container` and `Grid`
51
+ * inside the sections decide those, which is what keeps a section usable on its
52
+ * own.
53
+ *
54
+ * @param props - MarketingLayout configuration options and element attributes.
55
+ * @param props.navigation - The navigation, above the main region.
56
+ * @param props.footer - The footer, below the main region.
57
+ * @param props.children - The sections, in order.
58
+ * @param props.mainId - Identifier of the main region. Defaults to
59
+ * "main-content".
60
+ * @param props.skipLink - Render a skip link. Defaults to true.
61
+ * @param props.skipLinkLabel - Wording of the skip link. Defaults to "Skip to
62
+ * content".
63
+ * @param props.background - Background to paint. Defaults to "default".
64
+ * @param props.as - Element to render. Defaults to "div".
65
+ * @returns The rendered page.
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * <MarketingLayout
70
+ * navigation={<Navbar brand="Ashee" links={links} actions={actions} />}
71
+ * footer={<Footer brand="Ashee" groups={groups} />}>
72
+ * <Hero eyebrow="AsheeUI 2.0" title="A complete UI system" primaryAction={start} />
73
+ * <FeatureGrid title="Everything a page needs" features={features} />
74
+ * <CTA title="Start building" primaryAction={start} />
75
+ * </MarketingLayout>
76
+ * ```
77
+ *
78
+ * @see DocsLayout - The documentation composition.
79
+ * @see SidebarLayout - The application shell, for a page with a navigation column.
80
+ */
81
+ export declare const MarketingLayout: import('react').ForwardRefExoticComponent<MarketingLayoutProps & import('react').RefAttributes<HTMLDivElement>>;
82
+ export {};
83
+ //# sourceMappingURL=MarketingLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarketingLayout.d.ts","sourceRoot":"","sources":["../../../src/components/marketing-layout/MarketingLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AAOnC,KAAK,wBAAwB,GAAG,qBAAqB,GACnD,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,eAAe,iHAiD3B,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn as e } from "../../utils/cn.js";
4
+ import { useAsheeConfig as t } from "../../libs/context.js";
5
+ import { resolveConfigCascade as n } from "../../utils/resolve-token.js";
6
+ import { SkipLink as r } from "../section-kit/SkipLink.js";
7
+ import { FALLBACK_MARKETING_LAYOUT_CONFIG as i } from "./marketing-layout-config.js";
8
+ import { MARKETING_LAYOUT_BACKGROUND_CLASS as a, MARKETING_LAYOUT_BASE_CLASS as o, MARKETING_LAYOUT_MAIN_CLASS as s } from "./marketing-layout-styles.js";
9
+ import { forwardRef as c } from "react";
10
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
11
+ //#region src/components/marketing-layout/MarketingLayout.tsx
12
+ var d = c(({ navigation: c, footer: d, children: f, mainId: p = "main-content", skipLink: m, skipLinkLabel: h, background: g, as: _, className: v, ...y }, b) => {
13
+ let x = t(), S = n({
14
+ skipLink: m,
15
+ skipLinkLabel: h,
16
+ background: g
17
+ }, x.components?.marketinglayout, i);
18
+ return /* @__PURE__ */ u(_ ?? "div", {
19
+ ref: b,
20
+ className: e(o, a[S.background], v),
21
+ ...y,
22
+ children: [
23
+ S.skipLink && /* @__PURE__ */ l(r, {
24
+ targetId: p,
25
+ label: S.skipLinkLabel
26
+ }),
27
+ c,
28
+ /* @__PURE__ */ l("main", {
29
+ id: p,
30
+ tabIndex: -1,
31
+ className: s,
32
+ children: f
33
+ }),
34
+ d
35
+ ]
36
+ });
37
+ });
38
+ d.displayName = "MarketingLayout";
39
+ //#endregion
40
+ export { d as MarketingLayout };
@@ -0,0 +1,3 @@
1
+ export * from './MarketingLayout';
2
+ export * from './marketing-layout-config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/marketing-layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./MarketingLayout.js";
2
+ export * from "./marketing-layout-config.js";
3
+ export * from "./marketing-layout-styles.js";
@@ -0,0 +1,60 @@
1
+ /**
2
+ * MarketingLayout component configuration for AsheeUI.
3
+ * This file defines the configuration type and defaults for the marketing page
4
+ * composition: whether it renders a skip link, what that link says, and which
5
+ * background it paints. It registers the default configuration with the
6
+ * component registry and provides fallback values for the cascade resolution
7
+ * system.
8
+ */
9
+ /**
10
+ * The background a marketing composition paints behind its content.
11
+ *
12
+ * - `default`: the theme background, for a page whose sections carry their own
13
+ * surfaces.
14
+ * - `muted`: a recessed background, for a page whose sections are cards.
15
+ */
16
+ export type MarketingLayoutBackground = "default" | "muted";
17
+ /**
18
+ * Theme configuration options for the MarketingLayout component.
19
+ *
20
+ * Set under `components.marketinglayout` in the AsheeUI config. Values feed the
21
+ * component-level tier of the theme cascade.
22
+ */
23
+ export interface MarketingLayoutConfig {
24
+ /**
25
+ * Whether the composition renders a skip link to its main region.
26
+ * A marketing page leads with navigation, so a keyboard reader needs to be
27
+ * able to pass it; the link is rendered as the first focusable element.
28
+ *
29
+ * @default true
30
+ */
31
+ skipLink?: boolean;
32
+ /**
33
+ * Wording of the skip link.
34
+ *
35
+ * @default "Skip to content"
36
+ */
37
+ skipLinkLabel?: string;
38
+ /**
39
+ * Background the composition paints.
40
+ *
41
+ * @default "default"
42
+ */
43
+ background?: MarketingLayoutBackground;
44
+ }
45
+ /**
46
+ * Default config values registered for the MarketingLayout component.
47
+ * The skip link is on by default because it is the accessible choice, and it
48
+ * costs nothing when it is not used.
49
+ */
50
+ export declare const defaultMarketingLayoutConfig: MarketingLayoutConfig;
51
+ declare module "../../libs/registry" {
52
+ interface ComponentTypeConfigRegistry {
53
+ marketinglayout: MarketingLayoutConfig;
54
+ }
55
+ }
56
+ /**
57
+ * Hard fallback values used when no config tier provides a value.
58
+ */
59
+ export declare const FALLBACK_MARKETING_LAYOUT_CONFIG: Required<MarketingLayoutConfig>;
60
+ //# sourceMappingURL=marketing-layout-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-layout-config.d.ts","sourceRoot":"","sources":["../../../src/components/marketing-layout/marketing-layout-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,OAAO,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,qBAI1C,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,eAAe,EAAE,qBAAqB,CAAC;KACxC;CACF;AAID;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,qBAAqB,CAK1E,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/marketing-layout/marketing-layout-config.ts
4
+ var t = {
5
+ skipLink: !0,
6
+ skipLinkLabel: "Skip to content",
7
+ background: "default"
8
+ };
9
+ e("marketinglayout", t);
10
+ var n = {
11
+ skipLink: !0,
12
+ skipLinkLabel: "Skip to content",
13
+ background: "default"
14
+ };
15
+ //#endregion
16
+ export { n as FALLBACK_MARKETING_LAYOUT_CONFIG, t as defaultMarketingLayoutConfig };
@@ -0,0 +1,8 @@
1
+ import { MarketingLayoutBackground } from './marketing-layout-config';
2
+ /** The page shell: a full-height column of regions. */
3
+ export declare const MARKETING_LAYOUT_BASE_CLASS = "flex min-h-dvh w-full flex-col";
4
+ /** The background the composition paints behind its sections. */
5
+ export declare const MARKETING_LAYOUT_BACKGROUND_CLASS: Record<MarketingLayoutBackground, string>;
6
+ /** The main region, which takes the height the header and footer leave. */
7
+ export declare const MARKETING_LAYOUT_MAIN_CLASS = "flex w-full flex-1 flex-col";
8
+ //# sourceMappingURL=marketing-layout-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-layout-styles.d.ts","sourceRoot":"","sources":["../../../src/components/marketing-layout/marketing-layout-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,uDAAuD;AACvD,eAAO,MAAM,2BAA2B,mCAAmC,CAAC;AAE5E,iEAAiE;AACjE,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,yBAAyB,EACzB,MAAM,CAIP,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,2BAA2B,gCAAgC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ //#region src/components/marketing-layout/marketing-layout-styles.ts
3
+ var e = "flex min-h-dvh w-full flex-col", t = {
4
+ default: "bg-background",
5
+ muted: "bg-secondary/40"
6
+ }, n = "flex w-full flex-1 flex-col";
7
+ //#endregion
8
+ export { t as MARKETING_LAYOUT_BACKGROUND_CLASS, e as MARKETING_LAYOUT_BASE_CLASS, n as MARKETING_LAYOUT_MAIN_CLASS };