asheeui 1.1.1 → 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 (150) hide show
  1. package/dist/components/centered/Centered.d.ts +49 -0
  2. package/dist/components/centered/Centered.d.ts.map +1 -0
  3. package/dist/components/centered/Centered.js +32 -0
  4. package/dist/components/centered/centered-config.d.ts +63 -0
  5. package/dist/components/centered/centered-config.d.ts.map +1 -0
  6. package/dist/components/centered/centered-config.js +17 -0
  7. package/dist/components/centered/centered-styles.d.ts +11 -0
  8. package/dist/components/centered/centered-styles.d.ts.map +1 -0
  9. package/dist/components/centered/centered-styles.js +9 -0
  10. package/dist/components/centered/index.d.ts +3 -0
  11. package/dist/components/centered/index.d.ts.map +1 -0
  12. package/dist/components/centered/index.js +3 -0
  13. package/dist/components/chip/Chip.d.ts +8 -0
  14. package/dist/components/chip/Chip.d.ts.map +1 -1
  15. package/dist/components/chip/Chip.js +15 -15
  16. package/dist/components/data-table/DataTable.d.ts +137 -0
  17. package/dist/components/data-table/DataTable.d.ts.map +1 -0
  18. package/dist/components/data-table/DataTable.js +101 -0
  19. package/dist/components/data-table/data-table-config.d.ts +75 -0
  20. package/dist/components/data-table/data-table-config.d.ts.map +1 -0
  21. package/dist/components/data-table/data-table-config.js +24 -0
  22. package/dist/components/data-table/data-table-styles.d.ts +25 -0
  23. package/dist/components/data-table/data-table-styles.d.ts.map +1 -0
  24. package/dist/components/data-table/data-table-styles.js +5 -0
  25. package/dist/components/data-table/index.d.ts +3 -0
  26. package/dist/components/data-table/index.d.ts.map +1 -0
  27. package/dist/components/data-table/index.js +3 -0
  28. package/dist/components/docs-layout/DocsLayout.d.ts +94 -0
  29. package/dist/components/docs-layout/DocsLayout.d.ts.map +1 -0
  30. package/dist/components/docs-layout/DocsLayout.js +62 -0
  31. package/dist/components/docs-layout/docs-layout-config.d.ts +61 -0
  32. package/dist/components/docs-layout/docs-layout-config.d.ts.map +1 -0
  33. package/dist/components/docs-layout/docs-layout-config.js +22 -0
  34. package/dist/components/docs-layout/docs-layout-styles.d.ts +31 -0
  35. package/dist/components/docs-layout/docs-layout-styles.d.ts.map +1 -0
  36. package/dist/components/docs-layout/docs-layout-styles.js +5 -0
  37. package/dist/components/docs-layout/index.d.ts +3 -0
  38. package/dist/components/docs-layout/index.d.ts.map +1 -0
  39. package/dist/components/docs-layout/index.js +3 -0
  40. package/dist/components/empty-state/EmptyState.d.ts +19 -1
  41. package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
  42. package/dist/components/empty-state/EmptyState.js +10 -9
  43. package/dist/components/error-state/ErrorState.d.ts +98 -0
  44. package/dist/components/error-state/ErrorState.d.ts.map +1 -0
  45. package/dist/components/error-state/ErrorState.js +57 -0
  46. package/dist/components/error-state/error-state-config.d.ts +66 -0
  47. package/dist/components/error-state/error-state-config.d.ts.map +1 -0
  48. package/dist/components/error-state/error-state-config.js +20 -0
  49. package/dist/components/error-state/error-state-styles.d.ts +17 -0
  50. package/dist/components/error-state/error-state-styles.d.ts.map +1 -0
  51. package/dist/components/error-state/error-state-styles.js +5 -0
  52. package/dist/components/error-state/index.d.ts +3 -0
  53. package/dist/components/error-state/index.d.ts.map +1 -0
  54. package/dist/components/error-state/index.js +3 -0
  55. package/dist/components/file-upload/FileUpload.d.ts +112 -0
  56. package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
  57. package/dist/components/file-upload/FileUpload.js +83 -0
  58. package/dist/components/file-upload/file-upload-config.d.ts +41 -0
  59. package/dist/components/file-upload/file-upload-config.d.ts.map +1 -0
  60. package/dist/components/file-upload/file-upload-config.js +16 -0
  61. package/dist/components/file-upload/file-upload-styles.d.ts +22 -0
  62. package/dist/components/file-upload/file-upload-styles.d.ts.map +1 -0
  63. package/dist/components/file-upload/file-upload-styles.js +9 -0
  64. package/dist/components/file-upload/file-upload.helpers.d.ts +26 -0
  65. package/dist/components/file-upload/file-upload.helpers.d.ts.map +1 -0
  66. package/dist/components/file-upload/file-upload.helpers.js +17 -0
  67. package/dist/components/file-upload/index.d.ts +3 -0
  68. package/dist/components/file-upload/index.d.ts.map +1 -0
  69. package/dist/components/file-upload/index.js +4 -0
  70. package/dist/components/loading-state/LoadingState.d.ts +57 -0
  71. package/dist/components/loading-state/LoadingState.d.ts.map +1 -0
  72. package/dist/components/loading-state/LoadingState.js +44 -0
  73. package/dist/components/loading-state/index.d.ts +3 -0
  74. package/dist/components/loading-state/index.d.ts.map +1 -0
  75. package/dist/components/loading-state/index.js +3 -0
  76. package/dist/components/loading-state/loading-state-config.d.ts +49 -0
  77. package/dist/components/loading-state/loading-state-config.d.ts.map +1 -0
  78. package/dist/components/loading-state/loading-state-config.js +18 -0
  79. package/dist/components/loading-state/loading-state-styles.d.ts +12 -0
  80. package/dist/components/loading-state/loading-state-styles.d.ts.map +1 -0
  81. package/dist/components/loading-state/loading-state-styles.js +9 -0
  82. package/dist/components/marketing-layout/MarketingLayout.d.ts +83 -0
  83. package/dist/components/marketing-layout/MarketingLayout.d.ts.map +1 -0
  84. package/dist/components/marketing-layout/MarketingLayout.js +40 -0
  85. package/dist/components/marketing-layout/index.d.ts +3 -0
  86. package/dist/components/marketing-layout/index.d.ts.map +1 -0
  87. package/dist/components/marketing-layout/index.js +3 -0
  88. package/dist/components/marketing-layout/marketing-layout-config.d.ts +60 -0
  89. package/dist/components/marketing-layout/marketing-layout-config.d.ts.map +1 -0
  90. package/dist/components/marketing-layout/marketing-layout-config.js +16 -0
  91. package/dist/components/marketing-layout/marketing-layout-styles.d.ts +8 -0
  92. package/dist/components/marketing-layout/marketing-layout-styles.d.ts.map +1 -0
  93. package/dist/components/marketing-layout/marketing-layout-styles.js +8 -0
  94. package/dist/components/search-input/SearchInput.d.ts +111 -0
  95. package/dist/components/search-input/SearchInput.d.ts.map +1 -0
  96. package/dist/components/search-input/SearchInput.js +86 -0
  97. package/dist/components/search-input/index.d.ts +3 -0
  98. package/dist/components/search-input/index.d.ts.map +1 -0
  99. package/dist/components/search-input/index.js +3 -0
  100. package/dist/components/search-input/search-input-config.d.ts +55 -0
  101. package/dist/components/search-input/search-input-config.d.ts.map +1 -0
  102. package/dist/components/search-input/search-input-config.js +20 -0
  103. package/dist/components/search-input/search-input-styles.d.ts +16 -0
  104. package/dist/components/search-input/search-input-styles.d.ts.map +1 -0
  105. package/dist/components/search-input/search-input-styles.js +9 -0
  106. package/dist/components/section-kit/ActionGroup.d.ts +8 -1
  107. package/dist/components/section-kit/ActionGroup.d.ts.map +1 -1
  108. package/dist/components/section-kit/ActionGroup.js +13 -9
  109. package/dist/components/section-kit/SkipLink.d.ts +50 -0
  110. package/dist/components/section-kit/SkipLink.d.ts.map +1 -0
  111. package/dist/components/section-kit/SkipLink.js +14 -0
  112. package/dist/components/section-kit/index.d.ts +5 -4
  113. package/dist/components/section-kit/index.d.ts.map +1 -1
  114. package/dist/components/section-kit/index.js +1 -0
  115. package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -1
  116. package/dist/components/sidebar-layout/SidebarLayout.js +25 -25
  117. package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +10 -3
  118. package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -1
  119. package/dist/components/sidebar-layout/sidebar-layout-styles.js +2 -2
  120. package/dist/components/split/Split.d.ts +68 -0
  121. package/dist/components/split/Split.d.ts.map +1 -0
  122. package/dist/components/split/Split.js +36 -0
  123. package/dist/components/split/index.d.ts +3 -0
  124. package/dist/components/split/index.d.ts.map +1 -0
  125. package/dist/components/split/index.js +3 -0
  126. package/dist/components/split/split-config.d.ts +83 -0
  127. package/dist/components/split/split-config.d.ts.map +1 -0
  128. package/dist/components/split/split-config.js +20 -0
  129. package/dist/components/split/split-styles.d.ts +36 -0
  130. package/dist/components/split/split-styles.d.ts.map +1 -0
  131. package/dist/components/split/split-styles.js +76 -0
  132. package/dist/components/stepper/Stepper.d.ts +94 -0
  133. package/dist/components/stepper/Stepper.d.ts.map +1 -0
  134. package/dist/components/stepper/Stepper.js +71 -0
  135. package/dist/components/stepper/index.d.ts +3 -0
  136. package/dist/components/stepper/index.d.ts.map +1 -0
  137. package/dist/components/stepper/index.js +3 -0
  138. package/dist/components/stepper/stepper-config.d.ts +51 -0
  139. package/dist/components/stepper/stepper-config.d.ts.map +1 -0
  140. package/dist/components/stepper/stepper-config.js +16 -0
  141. package/dist/components/stepper/stepper-styles.d.ts +30 -0
  142. package/dist/components/stepper/stepper-styles.d.ts.map +1 -0
  143. package/dist/components/stepper/stepper-styles.js +25 -0
  144. package/dist/index.d.ts +10 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +93 -73
  147. package/dist/shared/spacing.d.ts +8 -0
  148. package/dist/shared/spacing.d.ts.map +1 -1
  149. package/dist/shared/spacing.js +9 -1
  150. package/package.json +1 -1
@@ -0,0 +1,49 @@
1
+ import { ElementType, HTMLAttributes } from 'react';
2
+ import { CenteredConfig } from './centered-config';
3
+ type BaseCenteredProps = CenteredConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
4
+ /**
5
+ * Props for the Centered component.
6
+ */
7
+ export interface CenteredProps extends BaseCenteredProps {
8
+ /**
9
+ * Element to render.
10
+ * Defaults to a `div`.
11
+ *
12
+ * @default "div"
13
+ */
14
+ as?: ElementType;
15
+ /**
16
+ * Content to place in the middle.
17
+ */
18
+ children?: React.ReactNode;
19
+ }
20
+ /**
21
+ * A block placed in the middle of the space it is given.
22
+ *
23
+ * Centered resolves its options through the standard configuration cascade, so
24
+ * `components.centered` can set the axis and the reserved height once for a
25
+ * whole application. With `contained`, the content keeps a maximum width, which
26
+ * is what a whole-page centred region needs; without it, the block is as wide as
27
+ * its parent and only its children are centred.
28
+ *
29
+ * @param props - Centered configuration options and element attributes.
30
+ * @param props.axis - Axis to centre on. Defaults to "both".
31
+ * @param props.minHeight - Vertical room to reserve first. Defaults to "none".
32
+ * @param props.contained - Hold the content in a Container. Defaults to false.
33
+ * @param props.containerSize - Maximum width when contained. Defaults to "lg".
34
+ * @param props.as - Element to render. Defaults to "div".
35
+ * @returns The rendered block.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <Centered minHeight="lg" contained>
40
+ * <Card title="Session expired" description="Sign in again to continue." />
41
+ * </Centered>
42
+ * ```
43
+ *
44
+ * @see Container - The maximum-width column Centered can hold its content in.
45
+ * @see Split - The two-pane layout, for content that is not a single block.
46
+ */
47
+ export declare const Centered: import('react').ForwardRefExoticComponent<CenteredProps & import('react').RefAttributes<HTMLDivElement>>;
48
+ export {};
49
+ //# sourceMappingURL=Centered.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Centered.d.ts","sourceRoot":"","sources":["../../../src/components/centered/Centered.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,KAAK,WAAW,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAM1E,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAG3B,KAAK,iBAAiB,GAAG,cAAc,GACrC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,0GAgDpB,CAAC"}
@@ -0,0 +1,32 @@
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 { Container as i } from "../container/Container.js";
8
+ import { FALLBACK_CENTERED_CONFIG as a } from "./centered-config.js";
9
+ import { CENTERED_AXIS_CLASS as o, CENTERED_BASE_CLASS as s } from "./centered-styles.js";
10
+ import { forwardRef as c } from "react";
11
+ import { jsx as l } from "react/jsx-runtime";
12
+ //#region src/components/centered/Centered.tsx
13
+ var u = c(({ as: c, axis: u, minHeight: d, contained: f, containerSize: p, className: m, children: h, ...g }, _) => {
14
+ let v = n(), y = r({
15
+ axis: u,
16
+ minHeight: d,
17
+ contained: f,
18
+ containerSize: p
19
+ }, v.components?.centered, a), b = /* @__PURE__ */ l(c ?? "div", {
20
+ ref: _,
21
+ className: e(s, o[y.axis], t[y.minHeight], "flex-col", m),
22
+ ...g,
23
+ children: h
24
+ });
25
+ return y.contained ? /* @__PURE__ */ l(i, {
26
+ size: y.containerSize,
27
+ children: b
28
+ }) : b;
29
+ });
30
+ u.displayName = "Centered";
31
+ //#endregion
32
+ export { u as Centered };
@@ -0,0 +1,63 @@
1
+ import { Space } from '../../shared';
2
+ import { ContainerSize } from '../container/container-config';
3
+ /**
4
+ * The axes a Centered block can centre on.
5
+ *
6
+ * - `both`: centres horizontally and vertically, the arrangement a sign-in card
7
+ * or an empty page wants.
8
+ * - `horizontal`: centres sideways only, for a heading or a single control.
9
+ * - `vertical`: centres vertically only, when the block's own width is intended.
10
+ */
11
+ export type CenteredAxis = "both" | "horizontal" | "vertical";
12
+ /**
13
+ * Theme configuration options for the Centered component.
14
+ *
15
+ * Set under `components.centered` in the AsheeUI config. Values feed the
16
+ * component-level tier of the theme cascade.
17
+ */
18
+ export interface CenteredConfig {
19
+ /**
20
+ * The axis the content is centred on.
21
+ *
22
+ * @default "both"
23
+ */
24
+ axis?: CenteredAxis;
25
+ /**
26
+ * Vertical room the block reserves before centring.
27
+ * A block that is as tall as its content cannot be centred vertically, so a
28
+ * consumer chooses how much height the block claims.
29
+ *
30
+ * @default "none"
31
+ */
32
+ minHeight?: Space;
33
+ /**
34
+ * Whether the content is held in a {@link Container}.
35
+ * Use it when the centred content is a whole page region rather than a single
36
+ * control, so the content keeps a readable maximum width.
37
+ *
38
+ * @default false
39
+ */
40
+ contained?: boolean;
41
+ /**
42
+ * Maximum content width when `contained` is on.
43
+ *
44
+ * @default "lg"
45
+ */
46
+ containerSize?: ContainerSize;
47
+ }
48
+ /**
49
+ * Default config values registered for the Centered component.
50
+ * The axis and the container width are pinned; the height is not, because a
51
+ * block that reserves height by default would add space to every layout.
52
+ */
53
+ export declare const defaultCenteredConfig: CenteredConfig;
54
+ declare module "../../libs/registry" {
55
+ interface ComponentTypeConfigRegistry {
56
+ centered: CenteredConfig;
57
+ }
58
+ }
59
+ /**
60
+ * Hard fallback values used when no config tier provides a value.
61
+ */
62
+ export declare const FALLBACK_CENTERED_CONFIG: Required<CenteredConfig>;
63
+ //# sourceMappingURL=centered-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"centered-config.d.ts","sourceRoot":"","sources":["../../../src/components/centered/centered-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAInC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,QAAQ,EAAE,cAAc,CAAC;KAC1B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,cAAc,CAK7D,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/centered/centered-config.ts
4
+ var t = {
5
+ axis: "both",
6
+ contained: !1,
7
+ containerSize: "lg"
8
+ };
9
+ e("centered", t);
10
+ var n = {
11
+ axis: "both",
12
+ minHeight: "none",
13
+ contained: !1,
14
+ containerSize: "lg"
15
+ };
16
+ //#endregion
17
+ export { n as FALLBACK_CENTERED_CONFIG, t as defaultCenteredConfig };
@@ -0,0 +1,11 @@
1
+ import { CenteredAxis } from './centered-config';
2
+ /**
3
+ * Centring classes for each axis.
4
+ * `both` also centres the text, because a block that is centred on both axes is
5
+ * almost always a short statement; a consumer with a different intent appends
6
+ * its own class, which wins.
7
+ */
8
+ export declare const CENTERED_AXIS_CLASS: Record<CenteredAxis, string>;
9
+ /** Shared classes for every centred block. */
10
+ export declare const CENTERED_BASE_CLASS = "flex w-full min-w-0";
11
+ //# sourceMappingURL=centered-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"centered-styles.d.ts","sourceRoot":"","sources":["../../../src/components/centered/centered-styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAI5D,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,wBAAwB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ //#region src/components/centered/centered-styles.ts
3
+ var e = {
4
+ both: "items-center justify-center text-center",
5
+ horizontal: "items-center",
6
+ vertical: "justify-center"
7
+ }, t = "flex w-full min-w-0";
8
+ //#endregion
9
+ export { e as CENTERED_AXIS_CLASS, t as CENTERED_BASE_CLASS };
@@ -0,0 +1,3 @@
1
+ export * from './Centered';
2
+ export * from './centered-config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/centered/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./Centered.js";
2
+ export * from "./centered-config.js";
3
+ export * from "./centered-styles.js";
@@ -42,6 +42,14 @@ export interface ChipProps extends BaseChipProps {
42
42
  * Overrides the default CloseIcon.
43
43
  */
44
44
  closeIcon?: ReactNode;
45
+ /**
46
+ * Accessible name of the remove control.
47
+ * A list of chips needs each remove control to say what it removes, so pass
48
+ * the chip's own subject, for example `"Remove invoice.pdf"`.
49
+ *
50
+ * @default "Remove chip"
51
+ */
52
+ closeLabel?: string;
45
53
  /**
46
54
  * Chip content.
47
55
  * The label text to display inside the chip.
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/chip/Chip.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAWf,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,eAAe,CAAC;AASvB;;GAEG;AACH,KAAK,aAAa,GAAG,UAAU,GAC7B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAErD;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,eAAO,MAAM,IAAI,sGAqOhB,CAAC"}
1
+ {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/chip/Chip.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAWf,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,eAAe,CAAC;AASvB;;GAEG;AACH,KAAK,aAAa,GAAG,UAAU,GAC7B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAErD;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,eAAO,MAAM,IAAI,sGAsOhB,CAAC"}
@@ -11,16 +11,16 @@ import { CHIP_FONT_CLASS as l, CHIP_GAP_CLASS as u, CHIP_HEIGHT_CLASS as d, CHIP
11
11
  import { forwardRef as m } from "react";
12
12
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
13
13
  //#region src/components/chip/Chip.tsx
14
- var _ = m(({ variant: m, color: _, size: v, radius: y, isDisabled: b = !1, startIcon: x, endIcon: S, avatar: C, dot: w, onClose: T, closeIcon: E, children: D, className: O, style: k, onClick: A, ...j }, M) => {
15
- let N = r(), P = N.components?.chip, F = i(m, P?.variant, N.defaultVariant, c.variant), I = F === "underlined" ? "bordered" : F, L = i(_, P?.color, N.defaultColor, c.color), R = i(v, P?.size, void 0, c.size), z = o(y, P?.radius, N.defaultRadius, c.radius), B = a(R, d, c.size), V = a(R, p, c.size), H = a(R, l, c.size), U = a(R, u, c.size), W = a(R, f, c.size), G = a(z, t, c.radius), K = (e) => {
14
+ var _ = m(({ variant: m, color: _, size: v, radius: y, isDisabled: b = !1, startIcon: x, endIcon: S, avatar: C, dot: w, onClose: T, closeIcon: E, closeLabel: D = "Remove chip", children: O, className: k, style: A, onClick: j, ...M }, N) => {
15
+ let P = r(), F = P.components?.chip, I = i(m, F?.variant, P.defaultVariant, c.variant), L = I === "underlined" ? "bordered" : I, R = i(_, F?.color, P.defaultColor, c.color), z = i(v, F?.size, void 0, c.size), B = o(y, F?.radius, P.defaultRadius, c.radius), V = a(z, d, c.size), H = a(z, p, c.size), U = a(z, l, c.size), W = a(z, u, c.size), G = a(z, f, c.size), K = a(B, t, c.radius), q = (e) => {
16
16
  e.stopPropagation(), !b && T?.(e);
17
17
  };
18
18
  return /* @__PURE__ */ g("div", {
19
- ref: M,
19
+ ref: N,
20
20
  tabIndex: b ? -1 : 0,
21
21
  "aria-disabled": b,
22
22
  onClick: (e) => {
23
- b || A?.(e);
23
+ b || j?.(e);
24
24
  },
25
25
  onKeyDown: (e) => {
26
26
  if (!b && (e.key === "Enter" || e.key === " ")) {
@@ -41,12 +41,12 @@ var _ = m(({ variant: m, color: _, size: v, radius: y, isDisabled: b = !1, start
41
41
  shiftKey: e.shiftKey,
42
42
  type: "click"
43
43
  };
44
- A?.(t);
44
+ j?.(t);
45
45
  }
46
46
  },
47
- className: e("inline-flex items-center font-medium transition-all duration-200 select-none shrink-0", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", n(I, L), B, V, H, U, G, b && "opacity-50 pointer-events-none cursor-not-allowed", A && !b && "cursor-pointer hover:opacity-90 active:scale-[0.98]", O),
48
- style: k,
49
- ...j,
47
+ className: e("inline-flex items-center font-medium transition-all duration-200 select-none shrink-0", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", n(L, R), V, H, U, W, K, b && "opacity-50 pointer-events-none cursor-not-allowed", j && !b && "cursor-pointer hover:opacity-90 active:scale-[0.98]", k),
48
+ style: A,
49
+ ...M,
50
50
  children: [
51
51
  w && /* @__PURE__ */ h("span", {
52
52
  className: "shrink-0 rounded-full",
@@ -57,24 +57,24 @@ var _ = m(({ variant: m, color: _, size: v, radius: y, isDisabled: b = !1, start
57
57
  }
58
58
  }),
59
59
  C && /* @__PURE__ */ h("span", {
60
- className: e("inline-flex items-center justify-center shrink-0 scrollbar-hide overflow-hidden rounded-full", W),
60
+ className: e("inline-flex items-center justify-center shrink-0 scrollbar-hide overflow-hidden rounded-full", G),
61
61
  children: C
62
62
  }),
63
63
  x && !C && /* @__PURE__ */ h("span", {
64
- className: e("inline-flex items-center justify-center shrink-0", W),
64
+ className: e("inline-flex items-center justify-center shrink-0", G),
65
65
  children: x
66
66
  }),
67
- D,
67
+ O,
68
68
  S && !T && /* @__PURE__ */ h("span", {
69
- className: e("inline-flex items-center justify-center shrink-0", W),
69
+ className: e("inline-flex items-center justify-center shrink-0", G),
70
70
  children: S
71
71
  }),
72
72
  T && /* @__PURE__ */ h("button", {
73
73
  type: "button",
74
- "aria-label": "Remove chip",
74
+ "aria-label": D,
75
75
  disabled: b,
76
- onClick: K,
77
- className: e("inline-flex items-center justify-center shrink-0 rounded-full transition-opacity", "hover:opacity-70 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-current", "opacity-80 -mr-1", W),
76
+ onClick: q,
77
+ className: e("inline-flex items-center justify-center shrink-0 rounded-full transition-opacity", "hover:opacity-70 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-current", "opacity-80 -mr-1", G),
78
78
  children: E ?? /* @__PURE__ */ h(s, { className: "w-full h-full" })
79
79
  })
80
80
  ]
@@ -0,0 +1,137 @@
1
+ import { ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ import { ColumnDef, TableConfig } from '../table/table-config';
3
+ import { DataTableConfig } from './data-table-config';
4
+ /**
5
+ * Props for the DataTable component.
6
+ */
7
+ export interface DataTableProps<TData> extends DataTableConfig, Pick<TableConfig, "variant" | "size" | "color" | "radius">, Omit<HTMLAttributes<HTMLDivElement>, "color" | "onClick" | "title"> {
8
+ /**
9
+ * The rows the table shows, in the order the consumer gives them.
10
+ * The table does not sort, because an order is a decision about the data and
11
+ * the consumer already has one.
12
+ */
13
+ data: TData[];
14
+ /**
15
+ * The columns, in order.
16
+ */
17
+ columns: ColumnDef<TData>[];
18
+ /**
19
+ * Heading above the toolbar.
20
+ */
21
+ title?: ReactNode;
22
+ /**
23
+ * Sentence under the heading.
24
+ */
25
+ description?: ReactNode;
26
+ /**
27
+ * Reads the text a row is searched by.
28
+ * Without it, and without `onSearchChange`, the search control is not
29
+ * rendered, because a field that cannot search would be a control that does
30
+ * nothing.
31
+ */
32
+ searchAccessor?: (row: TData) => string;
33
+ /**
34
+ * Called with the query whenever it changes.
35
+ * Supplying it is what a consumer that searches on the server does: the table
36
+ * then reports the query and leaves the filtering to the consumer.
37
+ */
38
+ onSearchChange?: (query: string) => void;
39
+ /**
40
+ * The page, for a consumer that owns it.
41
+ */
42
+ page?: number;
43
+ /**
44
+ * The page to open first, for a consumer that does not.
45
+ *
46
+ * @default 1
47
+ */
48
+ defaultPage?: number;
49
+ /**
50
+ * Called with the page the reader asked for.
51
+ */
52
+ onPageChange?: (page: number) => void;
53
+ /**
54
+ * Identifies a row, so the table can keep its rows stable as they change.
55
+ */
56
+ rowKeyAccessor?: (row: TData) => string | number;
57
+ /**
58
+ * Called when a row is activated, which also makes the rows interactive.
59
+ */
60
+ onRowClick?: (row: TData) => void;
61
+ /**
62
+ * Whether the rows are still loading.
63
+ * While they are, the table is replaced by a loading region rather than shown
64
+ * empty, because an empty table would say the wrong thing.
65
+ *
66
+ * @default false
67
+ */
68
+ isLoading?: boolean;
69
+ /**
70
+ * Controls the consumer places beside the search control.
71
+ */
72
+ toolbar?: ReactNode;
73
+ /**
74
+ * Element to render the wrapper as.
75
+ * Defaults to a `div`.
76
+ *
77
+ * @default "div"
78
+ */
79
+ as?: ElementType;
80
+ }
81
+ /**
82
+ * A table a list page is built from.
83
+ *
84
+ * DataTable composes the framework's parts around `Table`: a search control, a
85
+ * row count that is announced when it changes, pagination, a loading region and
86
+ * an empty presentation. Nothing about the table itself is reimplemented, so a
87
+ * consumer that restyles `Table`, `Pagination`, `EmptyState`, `LoadingState` or
88
+ * `SearchInput` restyles the table too.
89
+ *
90
+ * Searching is client-side when `searchAccessor` is given and the consumer's own
91
+ * when `onSearchChange` is given; the two may be combined, with the consumer
92
+ * replacing the rows. A new query starts at the first page, because a query is a
93
+ * new result set.
94
+ *
95
+ * @param props - DataTable configuration options and element attributes.
96
+ * @param props.data - The rows, in the order they are shown.
97
+ * @param props.columns - The columns, in order.
98
+ * @param props.title - Heading above the toolbar.
99
+ * @param props.description - Sentence under the heading.
100
+ * @param props.searchAccessor - Reads the text a row is searched by.
101
+ * @param props.onSearchChange - Called with the query as it changes.
102
+ * @param props.page - The page, for a controlled consumer.
103
+ * @param props.defaultPage - The page to open first. Defaults to 1.
104
+ * @param props.onPageChange - Called with the page the reader asked for.
105
+ * @param props.pageSize - How many rows a page holds. Defaults to 10.
106
+ * @param props.paginated - Divide the rows into pages. Defaults to true.
107
+ * @param props.showRowCount - Report how many rows are shown. Defaults to true.
108
+ * @param props.isLoading - Replace the rows with a loading region. Defaults to
109
+ * false.
110
+ * @param props.toolbar - Controls placed beside the search control.
111
+ * @param props.emptyTitle - What the table says when it has nothing to show.
112
+ * @param props.emptyDescription - The sentence under that title.
113
+ * @param props.as - Element to render. Defaults to "div".
114
+ * @returns The rendered table.
115
+ *
116
+ * @example
117
+ * ```tsx
118
+ * <DataTable
119
+ * title="Invoices"
120
+ * description="Everything issued this quarter."
121
+ * data={invoices}
122
+ * columns={columns}
123
+ * searchAccessor={(invoice) => `${invoice.number} ${invoice.customer}`}
124
+ * rowKeyAccessor={(invoice) => invoice.id}
125
+ * onRowClick={(invoice) => open(invoice.id)}
126
+ * pageSize={20}
127
+ * />
128
+ * ```
129
+ *
130
+ * @see Table - The table itself, without the search, the count or the paging.
131
+ * @see EmptyState - The presentation the table uses when it has no rows.
132
+ */
133
+ export declare function DataTable<TData>({ data, columns, title, description, searchAccessor, onSearchChange, page, defaultPage, onPageChange, rowKeyAccessor, onRowClick, pageSize, paginated, searchable, searchLabel, showRowCount, emptyTitle, emptyDescription, isLoading, toolbar, variant, size, color, radius, as, className, ...rest }: DataTableProps<TData>): import("react").JSX.Element;
134
+ export declare namespace DataTable {
135
+ var displayName: string;
136
+ }
137
+ //# sourceMappingURL=DataTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/DataTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,qBAAqB,CAAC;AAW7B;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK,CACnC,SAAQ,eAAe,EACrB,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,EAC1D,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACrE;;;;OAIG;IACH,IAAI,EAAE,KAAK,EAAE,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAC;IAExC;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,GAAG,MAAM,CAAC;IAEjD;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAElC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,EAC/B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,IAAI,EACJ,WAAe,EACf,YAAY,EACZ,cAAc,EACd,UAAU,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,SAAiB,EACjB,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,EAAE,EACF,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,CAAC,KAAK,CAAC,+BAqJvB;yBAjLe,SAAS"}
@@ -0,0 +1,101 @@
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 { Typography as r } from "../typography/Typography.js";
7
+ import { SectionHeading as i } from "../section-kit/SectionHeading.js";
8
+ import { EmptyState as a } from "../empty-state/EmptyState.js";
9
+ import { LoadingState as ee } from "../loading-state/LoadingState.js";
10
+ import { Pagination as o } from "../pagination/Pagination.js";
11
+ import { SearchInput as s } from "../search-input/SearchInput.js";
12
+ import { Table as c } from "../table/Table.js";
13
+ import { FALLBACK_DATA_TABLE_CONFIG as l } from "./data-table-config.js";
14
+ import { DATA_TABLE_CLASS as u, DATA_TABLE_REGION_CLASS as d } from "./data-table-styles.js";
15
+ import { useMemo as f, useState as p } from "react";
16
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ //#region src/components/data-table/DataTable.tsx
18
+ function g({ data: g, columns: _, title: v, description: y, searchAccessor: b, onSearchChange: x, page: S, defaultPage: te = 1, onPageChange: C, rowKeyAccessor: w, onRowClick: T, pageSize: E, paginated: D, searchable: O, searchLabel: k, showRowCount: A, emptyTitle: j, emptyDescription: M, isLoading: N = !1, toolbar: P, variant: F, size: I, color: L, radius: R, as: ne, className: z, ...B }) {
19
+ let V = t(), H = n({
20
+ searchable: O,
21
+ searchLabel: k,
22
+ paginated: D,
23
+ pageSize: E,
24
+ showRowCount: A,
25
+ emptyTitle: j,
26
+ emptyDescription: M
27
+ }, V.components?.datatable, l), [U, W] = p(""), [G, K] = p(te), q = S ?? G, J = H.searchable && !!(b || x), Y = f(() => {
28
+ let e = U.trim().toLowerCase();
29
+ return !J || !b || !e ? g : g.filter((t) => b(t).toLowerCase().includes(e));
30
+ }, [
31
+ g,
32
+ U,
33
+ b,
34
+ J
35
+ ]), X = Math.max(1, H.pageSize), Z = Math.max(1, Math.ceil(Y.length / X)), Q = Math.min(Math.max(1, q), Z), $ = H.paginated ? Y.slice((Q - 1) * X, Q * X) : Y, re = `Showing ${Y.length === 0 ? 0 : (Q - 1) * X + 1} to ${H.paginated ? Math.min(Q * X, Y.length) : Y.length} of ${Y.length}`, ie = (e) => {
36
+ W(e), Q !== 1 && (S === void 0 && K(1), C?.(1)), x?.(e);
37
+ }, ae = (e) => {
38
+ S === void 0 && K(e), C?.(e);
39
+ }, oe = ne ?? "div", se = !!(v || y);
40
+ return /* @__PURE__ */ h(oe, {
41
+ className: e(u, z),
42
+ ...B,
43
+ children: [
44
+ se && /* @__PURE__ */ m("div", {
45
+ className: "flex flex-col gap-1",
46
+ children: /* @__PURE__ */ m(i, {
47
+ title: v,
48
+ description: y
49
+ })
50
+ }),
51
+ (J || P) && /* @__PURE__ */ m("div", {
52
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
53
+ children: /* @__PURE__ */ h("div", {
54
+ className: "flex w-full flex-col gap-2 sm:flex-row sm:items-center",
55
+ children: [J && /* @__PURE__ */ m(s, {
56
+ className: "w-full sm:max-w-sm",
57
+ label: H.searchLabel,
58
+ placeholder: H.searchLabel,
59
+ onValueChange: ie
60
+ }), P]
61
+ })
62
+ }),
63
+ /* @__PURE__ */ m("div", {
64
+ className: d,
65
+ children: N ? /* @__PURE__ */ m(ee, {}) : $.length === 0 ? /* @__PURE__ */ m(a, {
66
+ panel: !0,
67
+ title: H.emptyTitle,
68
+ description: H.emptyDescription
69
+ }) : /* @__PURE__ */ m(c, {
70
+ data: $,
71
+ columns: _,
72
+ variant: F,
73
+ size: I,
74
+ color: L,
75
+ radius: R,
76
+ rowKeyAccessor: w,
77
+ handleClick: T,
78
+ isClickable: !!T
79
+ })
80
+ }),
81
+ !N && (H.showRowCount || H.paginated) && /* @__PURE__ */ h("div", {
82
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
83
+ children: [H.showRowCount && /* @__PURE__ */ m("div", {
84
+ role: "status",
85
+ children: /* @__PURE__ */ m(r, {
86
+ role: "caption",
87
+ tone: "muted",
88
+ children: re
89
+ })
90
+ }), H.paginated && Z > 1 && /* @__PURE__ */ m(o, {
91
+ page: Q,
92
+ pageCount: Z,
93
+ onPageChange: ae
94
+ })]
95
+ })
96
+ ]
97
+ });
98
+ }
99
+ g.displayName = "DataTable";
100
+ //#endregion
101
+ export { g as DataTable };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * DataTable component configuration for AsheeUI.
3
+ * This file defines the configuration type and defaults for the table
4
+ * composition: whether it searches and pages, how many rows a page holds,
5
+ * whether it reports the count, and what it says when there is nothing to show.
6
+ * It registers the default configuration with the component registry and
7
+ * provides fallback values for the cascade resolution system.
8
+ */
9
+ /**
10
+ * Theme configuration options for the DataTable component.
11
+ *
12
+ * Set under `components.datatable` in the AsheeUI config. Values feed the
13
+ * component-level tier of the theme cascade.
14
+ */
15
+ export interface DataTableConfig {
16
+ /**
17
+ * Whether the table offers a search control.
18
+ * The control appears only when the table also knows what to search, through
19
+ * `searchAccessor` or `onSearchChange`, because a field that cannot search
20
+ * would be a control that does nothing.
21
+ *
22
+ * @default true
23
+ */
24
+ searchable?: boolean;
25
+ /**
26
+ * Placeholder of the search control.
27
+ *
28
+ * @default "Search"
29
+ */
30
+ searchLabel?: string;
31
+ /**
32
+ * Whether the rows are divided into pages.
33
+ *
34
+ * @default true
35
+ */
36
+ paginated?: boolean;
37
+ /**
38
+ * How many rows a page holds.
39
+ *
40
+ * @default 10
41
+ */
42
+ pageSize?: number;
43
+ /**
44
+ * Whether the table reports how many rows it is showing.
45
+ *
46
+ * @default true
47
+ */
48
+ showRowCount?: boolean;
49
+ /**
50
+ * What the table says when there is nothing to show.
51
+ *
52
+ * @default "No results"
53
+ */
54
+ emptyTitle?: string;
55
+ /**
56
+ * The sentence under that title.
57
+ *
58
+ * @default "Try a different search, or clear it to see everything."
59
+ */
60
+ emptyDescription?: string;
61
+ }
62
+ /**
63
+ * Default config values registered for the DataTable component.
64
+ */
65
+ export declare const defaultDataTableConfig: DataTableConfig;
66
+ declare module "../../libs/registry" {
67
+ interface ComponentTypeConfigRegistry {
68
+ datatable: DataTableConfig;
69
+ }
70
+ }
71
+ /**
72
+ * Hard fallback values used when no config tier provides a value.
73
+ */
74
+ export declare const FALLBACK_DATA_TABLE_CONFIG: Required<DataTableConfig>;
75
+ //# sourceMappingURL=data-table-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-config.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/data-table-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAQpC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,SAAS,EAAE,eAAe,CAAC;KAC5B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,eAAe,CAQhE,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { registerComponentDefaults as e } from "../../libs/registry.js";
3
+ //#region src/components/data-table/data-table-config.ts
4
+ var t = {
5
+ searchable: !0,
6
+ searchLabel: "Search",
7
+ paginated: !0,
8
+ pageSize: 10,
9
+ showRowCount: !0,
10
+ emptyTitle: "No results",
11
+ emptyDescription: "Try a different search, or clear it to see everything."
12
+ };
13
+ e("datatable", t);
14
+ var n = {
15
+ searchable: !0,
16
+ searchLabel: "Search",
17
+ paginated: !0,
18
+ pageSize: 10,
19
+ showRowCount: !0,
20
+ emptyTitle: "No results",
21
+ emptyDescription: "Try a different search, or clear it to see everything."
22
+ };
23
+ //#endregion
24
+ export { n as FALLBACK_DATA_TABLE_CONFIG, t as defaultDataTableConfig };