@ankhorage/zora 1.0.5 → 1.0.7

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 (128) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +284 -0
  3. package/dist/components/media-card/MediaCard.d.ts +4 -0
  4. package/dist/components/media-card/MediaCard.d.ts.map +1 -0
  5. package/dist/components/media-card/MediaCard.js +64 -0
  6. package/dist/components/media-card/MediaCard.js.map +1 -0
  7. package/dist/components/media-card/index.d.ts +3 -0
  8. package/dist/components/media-card/index.d.ts.map +1 -0
  9. package/dist/components/media-card/index.js +2 -0
  10. package/dist/components/media-card/index.js.map +1 -0
  11. package/dist/components/media-card/types.d.ts +36 -0
  12. package/dist/components/media-card/types.d.ts.map +1 -0
  13. package/dist/components/media-card/types.js +2 -0
  14. package/dist/components/media-card/types.js.map +1 -0
  15. package/dist/components/metric-card/MetricCard.d.ts +4 -0
  16. package/dist/components/metric-card/MetricCard.d.ts.map +1 -0
  17. package/dist/components/metric-card/MetricCard.js +43 -0
  18. package/dist/components/metric-card/MetricCard.js.map +1 -0
  19. package/dist/components/metric-card/index.d.ts +3 -0
  20. package/dist/components/metric-card/index.d.ts.map +1 -0
  21. package/dist/components/metric-card/index.js +2 -0
  22. package/dist/components/metric-card/index.js.map +1 -0
  23. package/dist/components/metric-card/types.d.ts +17 -0
  24. package/dist/components/metric-card/types.d.ts.map +1 -0
  25. package/dist/components/metric-card/types.js +2 -0
  26. package/dist/components/metric-card/types.js.map +1 -0
  27. package/dist/components/progress/Progress.d.ts +4 -0
  28. package/dist/components/progress/Progress.d.ts.map +1 -0
  29. package/dist/components/progress/Progress.js +28 -0
  30. package/dist/components/progress/Progress.js.map +1 -0
  31. package/dist/components/progress/index.d.ts +3 -0
  32. package/dist/components/progress/index.d.ts.map +1 -0
  33. package/dist/components/progress/index.js +2 -0
  34. package/dist/components/progress/index.js.map +1 -0
  35. package/dist/components/progress/resolveProgressFraction.d.ts +5 -0
  36. package/dist/components/progress/resolveProgressFraction.d.ts.map +1 -0
  37. package/dist/components/progress/resolveProgressFraction.js +14 -0
  38. package/dist/components/progress/resolveProgressFraction.js.map +1 -0
  39. package/dist/components/progress/types.d.ts +11 -0
  40. package/dist/components/progress/types.d.ts.map +1 -0
  41. package/dist/components/progress/types.js +16 -0
  42. package/dist/components/progress/types.js.map +1 -0
  43. package/dist/components/rating/Rating.d.ts +4 -0
  44. package/dist/components/rating/Rating.d.ts.map +1 -0
  45. package/dist/components/rating/Rating.js +23 -0
  46. package/dist/components/rating/Rating.js.map +1 -0
  47. package/dist/components/rating/index.d.ts +3 -0
  48. package/dist/components/rating/index.d.ts.map +1 -0
  49. package/dist/components/rating/index.js +2 -0
  50. package/dist/components/rating/index.js.map +1 -0
  51. package/dist/components/rating/resolveRatingSegments.d.ts +7 -0
  52. package/dist/components/rating/resolveRatingSegments.d.ts.map +1 -0
  53. package/dist/components/rating/resolveRatingSegments.js +22 -0
  54. package/dist/components/rating/resolveRatingSegments.js.map +1 -0
  55. package/dist/components/rating/types.d.ts +11 -0
  56. package/dist/components/rating/types.d.ts.map +1 -0
  57. package/dist/components/rating/types.js +16 -0
  58. package/dist/components/rating/types.js.map +1 -0
  59. package/dist/index.d.ts +12 -0
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +6 -0
  62. package/dist/index.js.map +1 -1
  63. package/dist/patterns/list/List.d.ts +4 -0
  64. package/dist/patterns/list/List.d.ts.map +1 -0
  65. package/dist/patterns/list/List.js +35 -0
  66. package/dist/patterns/list/List.js.map +1 -0
  67. package/dist/patterns/list/ListRow.d.ts +4 -0
  68. package/dist/patterns/list/ListRow.d.ts.map +1 -0
  69. package/dist/patterns/list/ListRow.js +108 -0
  70. package/dist/patterns/list/ListRow.js.map +1 -0
  71. package/dist/patterns/list/ListSection.d.ts +4 -0
  72. package/dist/patterns/list/ListSection.d.ts.map +1 -0
  73. package/dist/patterns/list/ListSection.js +14 -0
  74. package/dist/patterns/list/ListSection.js.map +1 -0
  75. package/dist/patterns/list/index.d.ts +5 -0
  76. package/dist/patterns/list/index.d.ts.map +1 -0
  77. package/dist/patterns/list/index.js +4 -0
  78. package/dist/patterns/list/index.js.map +1 -0
  79. package/dist/patterns/list/resolveListSeparator.d.ts +5 -0
  80. package/dist/patterns/list/resolveListSeparator.d.ts.map +1 -0
  81. package/dist/patterns/list/resolveListSeparator.js +6 -0
  82. package/dist/patterns/list/resolveListSeparator.js.map +1 -0
  83. package/dist/patterns/list/types.d.ts +55 -0
  84. package/dist/patterns/list/types.d.ts.map +1 -0
  85. package/dist/patterns/list/types.js +2 -0
  86. package/dist/patterns/list/types.js.map +1 -0
  87. package/dist/patterns/timeline/Timeline.d.ts +4 -0
  88. package/dist/patterns/timeline/Timeline.d.ts.map +1 -0
  89. package/dist/patterns/timeline/Timeline.js +59 -0
  90. package/dist/patterns/timeline/Timeline.js.map +1 -0
  91. package/dist/patterns/timeline/index.d.ts +3 -0
  92. package/dist/patterns/timeline/index.d.ts.map +1 -0
  93. package/dist/patterns/timeline/index.js +2 -0
  94. package/dist/patterns/timeline/index.js.map +1 -0
  95. package/dist/patterns/timeline/types.d.ts +18 -0
  96. package/dist/patterns/timeline/types.d.ts.map +1 -0
  97. package/dist/patterns/timeline/types.js +2 -0
  98. package/dist/patterns/timeline/types.js.map +1 -0
  99. package/package.json +1 -1
  100. package/src/components/media-card/MediaCard.tsx +120 -0
  101. package/src/components/media-card/index.ts +2 -0
  102. package/src/components/media-card/types.ts +44 -0
  103. package/src/components/metric-card/MetricCard.tsx +84 -0
  104. package/src/components/metric-card/index.ts +2 -0
  105. package/src/components/metric-card/types.ts +18 -0
  106. package/src/components/progress/Progress.tsx +50 -0
  107. package/src/components/progress/index.ts +2 -0
  108. package/src/components/progress/resolveProgressFraction.test.ts +23 -0
  109. package/src/components/progress/resolveProgressFraction.ts +17 -0
  110. package/src/components/progress/types.ts +27 -0
  111. package/src/components/rating/Rating.tsx +38 -0
  112. package/src/components/rating/index.ts +2 -0
  113. package/src/components/rating/resolveRatingSegments.test.ts +60 -0
  114. package/src/components/rating/resolveRatingSegments.ts +34 -0
  115. package/src/components/rating/types.ts +27 -0
  116. package/src/index.ts +19 -0
  117. package/src/patterns/list/List.tsx +72 -0
  118. package/src/patterns/list/ListRow.tsx +193 -0
  119. package/src/patterns/list/ListSection.tsx +36 -0
  120. package/src/patterns/list/index.ts +11 -0
  121. package/src/patterns/list/resolveListSeparator.test.ts +18 -0
  122. package/src/patterns/list/resolveListSeparator.ts +8 -0
  123. package/src/patterns/list/types.ts +67 -0
  124. package/src/patterns/timeline/Timeline.tsx +104 -0
  125. package/src/patterns/timeline/index.ts +2 -0
  126. package/src/patterns/timeline/types.ts +20 -0
  127. package/src/showcaseCoverage.test.ts +8 -0
  128. package/src/theme/themeScopeStructure.test.ts +14 -0
@@ -0,0 +1,3 @@
1
+ export { Progress } from './Progress';
2
+ export type { ProgressProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Progress } from './Progress';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { Progress } from './Progress';\nexport type { ProgressProps } from './types';\n"]}
@@ -0,0 +1,5 @@
1
+ export declare function resolveProgressFraction({ value, max }: {
2
+ value: number;
3
+ max: number;
4
+ }): number;
5
+ //# sourceMappingURL=resolveProgressFraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveProgressFraction.d.ts","sourceRoot":"","sources":["../../../src/components/progress/resolveProgressFraction.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAgB9F"}
@@ -0,0 +1,14 @@
1
+ export function resolveProgressFraction({ value, max }) {
2
+ if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {
3
+ return 0;
4
+ }
5
+ const fraction = value / max;
6
+ if (fraction <= 0) {
7
+ return 0;
8
+ }
9
+ if (fraction >= 1) {
10
+ return 1;
11
+ }
12
+ return fraction;
13
+ }
14
+ //# sourceMappingURL=resolveProgressFraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveProgressFraction.js","sourceRoot":"","sources":["../../../src/components/progress/resolveProgressFraction.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAkC;IACpF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC;IAE7B,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["export function resolveProgressFraction({ value, max }: { value: number; max: number }): number {\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {\n return 0;\n }\n\n const fraction = value / max;\n\n if (fraction <= 0) {\n return 0;\n }\n\n if (fraction >= 1) {\n return 1;\n }\n\n return fraction;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';
2
+ import type { ZoraControlSize, ZoraTone } from '../../internal/recipes';
3
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ export interface ProgressProps extends ZoraBaseProps {
5
+ value: number;
6
+ max?: number;
7
+ tone?: ZoraTone;
8
+ size?: ZoraControlSize;
9
+ }
10
+ export declare function resolveProgressRole(theme: SurfaceTheme, tone: ZoraTone): RoleSemantics;
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/progress/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,aAAa,CActF"}
@@ -0,0 +1,16 @@
1
+ export function resolveProgressRole(theme, tone) {
2
+ switch (tone) {
3
+ case 'primary':
4
+ return theme.semantics.action.primary;
5
+ case 'danger':
6
+ return theme.semantics.action.danger;
7
+ case 'success':
8
+ return theme.semantics.success;
9
+ case 'warning':
10
+ return theme.semantics.warning;
11
+ case 'neutral':
12
+ default:
13
+ return theme.semantics.action.neutral;
14
+ }
15
+ }
16
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/progress/types.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,mBAAmB,CAAC,KAAmB,EAAE,IAAc;IACrE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QACxC,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS,CAAC;QACf;YACE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC1C,CAAC;AACH,CAAC","sourcesContent":["import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';\n\nimport type { ZoraControlSize, ZoraTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ProgressProps extends ZoraBaseProps {\n value: number;\n max?: number;\n tone?: ZoraTone;\n size?: ZoraControlSize;\n}\n\nexport function resolveProgressRole(theme: SurfaceTheme, tone: ZoraTone): RoleSemantics {\n switch (tone) {\n case 'primary':\n return theme.semantics.action.primary;\n case 'danger':\n return theme.semantics.action.danger;\n case 'success':\n return theme.semantics.success;\n case 'warning':\n return theme.semantics.warning;\n case 'neutral':\n default:\n return theme.semantics.action.neutral;\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type RatingProps } from './types';
3
+ export declare const Rating: (props: RatingProps) => React.ReactElement | null;
4
+ //# sourceMappingURL=Rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../../../src/components/rating/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,SAAS,CAAC;AA6B9D,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { Inline } from '../../foundation';
3
+ import { resolveIconSize } from '../../internal/recipes';
4
+ import { useZoraTheme } from '../../theme/useZoraTheme';
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
+ import { Icon } from '../icon';
7
+ import { resolveRatingSegments } from './resolveRatingSegments';
8
+ import { resolveRatingRole } from './types';
9
+ function RatingInner({ themeId: _themeId, mode: _mode, testID, value, max = 5, tone = 'warning', size = 'm', }) {
10
+ const { theme } = useZoraTheme();
11
+ const role = resolveRatingRole(theme, tone);
12
+ const segments = resolveRatingSegments({ value, max });
13
+ const iconSize = resolveIconSize(size);
14
+ return (<Inline align="center" gap="xxs" testID={testID} wrap="nowrap">
15
+ {segments.map((segment, index) => {
16
+ const name = segment === 'full' ? 'star' : segment === 'half' ? 'star-half' : 'star-outline';
17
+ const color = segment === 'empty' ? theme.semantics.content.muted : role.base;
18
+ return <Icon key={index} color={color} name={name} size={iconSize}/>;
19
+ })}
20
+ </Inline>);
21
+ }
22
+ export const Rating = withZoraThemeScope(RatingInner);
23
+ //# sourceMappingURL=Rating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rating.js","sourceRoot":"","sources":["../../../src/components/rating/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE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CACV,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Inline } from '../../foundation';\nimport { resolveIconSize } from '../../internal/recipes';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Icon } from '../icon';\nimport { resolveRatingSegments } from './resolveRatingSegments';\nimport { type RatingProps, resolveRatingRole } from './types';\n\nfunction RatingInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n value,\n max = 5,\n tone = 'warning',\n size = 'm',\n}: RatingProps) {\n const { theme } = useZoraTheme();\n const role = resolveRatingRole(theme, tone);\n const segments = resolveRatingSegments({ value, max });\n const iconSize = resolveIconSize(size);\n\n return (\n <Inline align=\"center\" gap=\"xxs\" testID={testID} wrap=\"nowrap\">\n {segments.map((segment, index) => {\n const name =\n segment === 'full' ? 'star' : segment === 'half' ? 'star-half' : 'star-outline';\n const color = segment === 'empty' ? theme.semantics.content.muted : role.base;\n\n return <Icon key={index} color={color} name={name} size={iconSize} />;\n })}\n </Inline>\n );\n}\n\nexport const Rating = withZoraThemeScope(RatingInner);\n"]}
@@ -0,0 +1,3 @@
1
+ export { Rating } from './Rating';
2
+ export type { RatingProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/rating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Rating } from './Rating';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/rating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Rating } from './Rating';\nexport type { RatingProps } from './types';\n"]}
@@ -0,0 +1,7 @@
1
+ type RatingSegment = 'full' | 'half' | 'empty';
2
+ export declare function resolveRatingSegments({ value, max, }: {
3
+ value: number;
4
+ max: number;
5
+ }): RatingSegment[];
6
+ export {};
7
+ //# sourceMappingURL=resolveRatingSegments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRatingSegments.d.ts","sourceRoot":"","sources":["../../../src/components/rating/resolveRatingSegments.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,GAAG,GACJ,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,aAAa,EAAE,CAyBlB"}
@@ -0,0 +1,22 @@
1
+ export function resolveRatingSegments({ value, max, }) {
2
+ if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {
3
+ return [];
4
+ }
5
+ const clamped = Math.max(0, Math.min(value, max));
6
+ const halfSteps = Math.round(clamped * 2);
7
+ const segments = [];
8
+ for (let index = 0; index < max; index += 1) {
9
+ const threshold = (index + 1) * 2;
10
+ if (halfSteps >= threshold) {
11
+ segments.push('full');
12
+ continue;
13
+ }
14
+ if (halfSteps === threshold - 1) {
15
+ segments.push('half');
16
+ continue;
17
+ }
18
+ segments.push('empty');
19
+ }
20
+ return segments;
21
+ }
22
+ //# sourceMappingURL=resolveRatingSegments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRatingSegments.js","sourceRoot":"","sources":["../../../src/components/rating/resolveRatingSegments.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,EACpC,KAAK,EACL,GAAG,GAIJ;IACC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACjE,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAoB,EAAE,CAAC;IAErC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;YAC3B,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACtB,SAAS;QACX,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,GAAG,CAAC,EAAE,CAAC;YAChC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACtB,SAAS;QACX,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["type RatingSegment = 'full' | 'half' | 'empty';\n\nexport function resolveRatingSegments({\n value,\n max,\n}: {\n value: number;\n max: number;\n}): RatingSegment[] {\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {\n return [];\n }\n\n const clamped = Math.max(0, Math.min(value, max));\n const halfSteps = Math.round(clamped * 2);\n const segments: RatingSegment[] = [];\n\n for (let index = 0; index < max; index += 1) {\n const threshold = (index + 1) * 2;\n if (halfSteps >= threshold) {\n segments.push('full');\n continue;\n }\n\n if (halfSteps === threshold - 1) {\n segments.push('half');\n continue;\n }\n\n segments.push('empty');\n }\n\n return segments;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';
2
+ import type { ZoraControlSize, ZoraTone } from '../../internal/recipes';
3
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ export interface RatingProps extends ZoraBaseProps {
5
+ value: number;
6
+ max?: number;
7
+ tone?: ZoraTone;
8
+ size?: ZoraControlSize;
9
+ }
10
+ export declare function resolveRatingRole(theme: SurfaceTheme, tone: ZoraTone): RoleSemantics;
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/rating/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,aAAa,CAcpF"}
@@ -0,0 +1,16 @@
1
+ export function resolveRatingRole(theme, tone) {
2
+ switch (tone) {
3
+ case 'primary':
4
+ return theme.semantics.action.primary;
5
+ case 'danger':
6
+ return theme.semantics.action.danger;
7
+ case 'success':
8
+ return theme.semantics.success;
9
+ case 'warning':
10
+ return theme.semantics.warning;
11
+ case 'neutral':
12
+ default:
13
+ return theme.semantics.action.neutral;
14
+ }
15
+ }
16
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/rating/types.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,iBAAiB,CAAC,KAAmB,EAAE,IAAc;IACnE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QACxC,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS,CAAC;QACf;YACE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC1C,CAAC;AACH,CAAC","sourcesContent":["import type { RoleSemantics, SurfaceTheme } from '@ankhorage/surface';\n\nimport type { ZoraControlSize, ZoraTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface RatingProps extends ZoraBaseProps {\n value: number;\n max?: number;\n tone?: ZoraTone;\n size?: ZoraControlSize;\n}\n\nexport function resolveRatingRole(theme: SurfaceTheme, tone: ZoraTone): RoleSemantics {\n switch (tone) {\n case 'primary':\n return theme.semantics.action.primary;\n case 'danger':\n return theme.semantics.action.danger;\n case 'success':\n return theme.semantics.success;\n case 'warning':\n return theme.semantics.warning;\n case 'neutral':\n default:\n return theme.semantics.action.neutral;\n }\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -26,10 +26,18 @@ export type { IconButtonProps } from './components/icon-button';
26
26
  export { IconButton } from './components/icon-button';
27
27
  export type { InputProps, InputTrailingAction } from './components/input';
28
28
  export { Input } from './components/input';
29
+ export type { MediaCardImageProps, MediaCardProps } from './components/media-card';
30
+ export { MediaCard } from './components/media-card';
31
+ export type { MetricCardProps } from './components/metric-card';
32
+ export { MetricCard } from './components/metric-card';
29
33
  export type { ModalProps } from './components/modal';
30
34
  export { Modal } from './components/modal';
35
+ export type { ProgressProps } from './components/progress';
36
+ export { Progress } from './components/progress';
31
37
  export type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';
32
38
  export { Radio, RadioGroup } from './components/radio';
39
+ export type { RatingProps } from './components/rating';
40
+ export { Rating } from './components/rating';
33
41
  export type { SearchBarProps } from './components/search-bar';
34
42
  export { SearchBar } from './components/search-bar';
35
43
  export type { SelectOption, SelectProps } from './components/select';
@@ -74,6 +82,8 @@ export type { FilterBarProps } from './patterns/filter-bar';
74
82
  export { FilterBar } from './patterns/filter-bar';
75
83
  export type { InspectorFieldProps } from './patterns/inspector-field';
76
84
  export { InspectorField } from './patterns/inspector-field';
85
+ export type { ListChildrenProps, ListItemsProps, ListProps, ListRowProps, ListRowVariant, ListSectionProps, } from './patterns/list';
86
+ export { List, ListRow, ListSection } from './patterns/list';
77
87
  export type { NoticeProps } from './patterns/notice';
78
88
  export { Notice } from './patterns/notice';
79
89
  export type { PanelProps } from './patterns/panel';
@@ -90,6 +100,8 @@ export type { ThemeComposerProps } from './patterns/theme-composer';
90
100
  export { ThemeComposer } from './patterns/theme-composer';
91
101
  export type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';
92
102
  export { PaletteItem, TileGrid } from './patterns/tile-grid';
103
+ export type { TimelineItem, TimelineProps } from './patterns/timeline';
104
+ export { Timeline } from './patterns/timeline';
93
105
  export type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';
94
106
  export { TreeItem, TreeView } from './patterns/tree-view';
95
107
  export * from './theme';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,gBAAg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,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -12,8 +12,12 @@ export { Heading } from './components/heading';
12
12
  export { Icon } from './components/icon';
13
13
  export { IconButton } from './components/icon-button';
14
14
  export { Input } from './components/input';
15
+ export { MediaCard } from './components/media-card';
16
+ export { MetricCard } from './components/metric-card';
15
17
  export { Modal } from './components/modal';
18
+ export { Progress } from './components/progress';
16
19
  export { Radio, RadioGroup } from './components/radio';
20
+ export { Rating } from './components/rating';
17
21
  export { SearchBar } from './components/search-bar';
18
22
  export { Select } from './components/select';
19
23
  export { Tabs } from './components/tabs';
@@ -36,6 +40,7 @@ export { DisclosureSection } from './patterns/disclosure-section';
36
40
  export { EmptyState } from './patterns/empty-state';
37
41
  export { FilterBar } from './patterns/filter-bar';
38
42
  export { InspectorField } from './patterns/inspector-field';
43
+ export { List, ListRow, ListSection } from './patterns/list';
39
44
  export { Notice } from './patterns/notice';
40
45
  export { Panel } from './patterns/panel';
41
46
  export { ResponsivePanel } from './patterns/responsive-panel';
@@ -44,6 +49,7 @@ export { SettingsRow } from './patterns/settings-row';
44
49
  export { SwitchField } from './patterns/switch-field';
45
50
  export { ThemeComposer } from './patterns/theme-composer';
46
51
  export { PaletteItem, TileGrid } from './patterns/tile-grid';
52
+ export { Timeline } from './patterns/timeline';
47
53
  export { TreeItem, TreeView } from './patterns/tree-view';
48
54
  export * from './theme';
49
55
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC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AQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,SAAS,CAAC","sourcesContent":["export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport * from './theme';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,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mB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,SAAS,CAAC","sourcesContent":["export type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport * from './theme';\n"]}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ListProps } from './types';
3
+ export declare const List: (props: ListProps) => React.ReactElement | null;
4
+ //# sourceMappingURL=List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAkB,SAAS,EAAgC,MAAM,SAAS,CAAC;AAiEvF,eAAO,MAAM,IAAI,iDAAgC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { Divider, Spacer, Stack } from '../../foundation';
3
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
4
+ import { ListRow } from './ListRow';
5
+ import { resolveListSeparator } from './resolveListSeparator';
6
+ function resolveRowVariant({ item, defaultVariant, }) {
7
+ return item.variant ?? defaultVariant;
8
+ }
9
+ function resolveRowCompact({ item, compact, }) {
10
+ return item.compact ?? compact ?? false;
11
+ }
12
+ function ListItemsInner({ themeId: _themeId, mode: _mode, testID, items, rowVariant = 'divider', compact, }) {
13
+ return (<Stack gap="none" testID={testID}>
14
+ {items.map((item, index) => {
15
+ const effectiveVariant = resolveRowVariant({ item, defaultVariant: rowVariant });
16
+ const separator = resolveListSeparator(effectiveVariant, index);
17
+ return (<React.Fragment key={`${index}`}>
18
+ {separator === 'divider' ? <Divider /> : null}
19
+ {separator === 'spacer' ? <Spacer size="s"/> : null}
20
+ <ListRow {...item} compact={resolveRowCompact({ item, compact })} variant={effectiveVariant}/>
21
+ </React.Fragment>);
22
+ })}
23
+ </Stack>);
24
+ }
25
+ function ListInner(props) {
26
+ if ('items' in props) {
27
+ return <ListItemsInner {...props}/>;
28
+ }
29
+ const { themeId: _themeId, mode: _mode, children, testID } = props;
30
+ return (<Stack gap="none" testID={testID}>
31
+ {children}
32
+ </Stack>);
33
+ }
34
+ export const List = withZoraThemeScope(ListInner);
35
+ //# sourceMappingURL=List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/patterns/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,SAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,cAAc,GAIf;IACC,OAAO,IAAI,CAAC,OAAO,IAAI,cAAc,CAAC;AACxC,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,OAAO,GAIR;IACC,OAAO,IAAI,CAAC,OAAO,IAAI,OAAO,IAAI,KAAK,CAAC;AAC1C,C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C;IAED,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACnE,OAAO,CACL,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC/B;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Divider, Spacer, Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { ListRow } from './ListRow';\nimport { resolveListSeparator } from './resolveListSeparator';\nimport type { ListItemsProps, ListProps, ListRowProps, ListRowVariant } from './types';\n\nfunction resolveRowVariant({\n item,\n defaultVariant,\n}: {\n item: ListRowProps;\n defaultVariant: ListRowVariant;\n}): ListRowVariant {\n return item.variant ?? defaultVariant;\n}\n\nfunction resolveRowCompact({\n item,\n compact,\n}: {\n item: ListRowProps;\n compact: boolean | undefined;\n}): boolean {\n return item.compact ?? compact ?? false;\n}\n\nfunction ListItemsInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n items,\n rowVariant = 'divider',\n compact,\n}: ListItemsProps) {\n return (\n <Stack gap=\"none\" testID={testID}>\n {items.map((item, index) => {\n const effectiveVariant = resolveRowVariant({ item, defaultVariant: rowVariant });\n const separator = resolveListSeparator(effectiveVariant, index);\n\n return (\n <React.Fragment key={`${index}`}>\n {separator === 'divider' ? <Divider /> : null}\n {separator === 'spacer' ? <Spacer size=\"s\" /> : null}\n <ListRow\n {...item}\n compact={resolveRowCompact({ item, compact })}\n variant={effectiveVariant}\n />\n </React.Fragment>\n );\n })}\n </Stack>\n );\n}\n\nfunction ListInner(props: ListProps) {\n if ('items' in props) {\n return <ListItemsInner {...props} />;\n }\n\n const { themeId: _themeId, mode: _mode, children, testID } = props;\n return (\n <Stack gap=\"none\" testID={testID}>\n {children}\n </Stack>\n );\n}\n\nexport const List = withZoraThemeScope(ListInner);\n"]}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ListRowProps } from './types';
3
+ export declare const ListRow: (props: ListRowProps) => React.ReactElement | null;
4
+ //# sourceMappingURL=ListRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRow.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/ListRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,SAAS,CAAC;AAyL5D,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
@@ -0,0 +1,108 @@
1
+ import { ButtonBase } from '@ankhorage/surface';
2
+ import React from 'react';
3
+ import { Text } from '../../components/text';
4
+ import { Box, Inline, Spacer, Stack } from '../../foundation';
5
+ import { useZoraTheme } from '../../theme/useZoraTheme';
6
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
7
+ function resolvePadding(compact) {
8
+ return compact ? { px: 'm', py: 's' } : { px: 'm', py: 'm' };
9
+ }
10
+ function resolveContainerStyles({ variant, theme, selected, pressed, hovered, disabled, }) {
11
+ const borderColor = selected ? theme.semantics.border.focus : theme.semantics.border.default;
12
+ const dividerBorderColor = selected ? theme.semantics.border.focus : 'transparent';
13
+ if (variant === 'card') {
14
+ return {
15
+ bg: pressed
16
+ ? theme.semantics.neutral.surfaceActive
17
+ : hovered
18
+ ? theme.semantics.neutral.surfaceHover
19
+ : theme.semantics.surface.raised,
20
+ borderColor,
21
+ borderWidth: 1,
22
+ radius: 'l',
23
+ opacity: disabled ? 0.72 : 1,
24
+ };
25
+ }
26
+ return {
27
+ bg: pressed
28
+ ? theme.semantics.neutral.surfaceActive
29
+ : hovered
30
+ ? theme.semantics.neutral.surfaceHover
31
+ : selected
32
+ ? theme.semantics.neutral.surface
33
+ : 'transparent',
34
+ borderColor: dividerBorderColor,
35
+ borderWidth: selected ? 1 : 0,
36
+ radius: 'm',
37
+ opacity: disabled ? 0.72 : 1,
38
+ };
39
+ }
40
+ function ListRowInner({ themeId: _themeId, mode: _mode, testID, title, description, meta, leading, trailing, action, onPress, selected = false, disabled = false, compact = false, variant = 'divider', }) {
41
+ const { theme } = useZoraTheme();
42
+ const padding = resolvePadding(compact);
43
+ const isInteractive = Boolean(onPress) && !action;
44
+ const content = (<Stack align="center" direction="row" style={{
45
+ flex: 1,
46
+ }}>
47
+ {leading ? (<>
48
+ <Box>{leading}</Box>
49
+ <Spacer axis="horizontal" size="m"/>
50
+ </>) : null}
51
+
52
+ <Box flex={1}>
53
+ <Stack gap="xxs">
54
+ <Text variant="body" weight={selected ? 'semiBold' : 'medium'}>
55
+ {title}
56
+ </Text>
57
+ {description ? (<Text tone="muted" variant="bodySmall">
58
+ {description}
59
+ </Text>) : null}
60
+ {meta ? (<Text tone="subtle" variant="caption">
61
+ {meta}
62
+ </Text>) : null}
63
+ </Stack>
64
+ </Box>
65
+
66
+ {trailing || action ? (<>
67
+ <Spacer axis="horizontal" size="m"/>
68
+ <Inline align="center" gap="s" wrap="nowrap">
69
+ {trailing}
70
+ {action}
71
+ </Inline>
72
+ </>) : null}
73
+ </Stack>);
74
+ if (!isInteractive) {
75
+ const styles = resolveContainerStyles({
76
+ variant,
77
+ theme,
78
+ selected,
79
+ pressed: false,
80
+ hovered: false,
81
+ disabled,
82
+ });
83
+ return (<Box bg={styles.bg} borderColor={styles.borderColor} borderWidth={styles.borderWidth} px={padding.px} py={padding.py} radius={styles.radius} testID={testID} style={{
84
+ opacity: styles.opacity,
85
+ }}>
86
+ {content}
87
+ </Box>);
88
+ }
89
+ return (<ButtonBase accessibilityRole="button" accessibilityState={{ disabled, selected }} disabled={disabled} onPress={onPress} radius={variant === 'card' ? 'l' : 'm'} testID={testID}>
90
+ {(state) => {
91
+ const styles = resolveContainerStyles({
92
+ variant,
93
+ theme,
94
+ selected,
95
+ pressed: state.pressed,
96
+ hovered: state.hovered,
97
+ disabled: state.disabled,
98
+ });
99
+ return (<Box bg={styles.bg} borderColor={styles.borderColor} borderWidth={styles.borderWidth} px={padding.px} py={padding.py} radius={styles.radius} style={{
100
+ opacity: styles.opacity,
101
+ }}>
102
+ {content}
103
+ </Box>);
104
+ }}
105
+ </ButtonBase>);
106
+ }
107
+ export const ListRow = withZoraThemeScope(ListRowInner);
108
+ //# sourceMappingURL=ListRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRow.js","sourceRoot":"","sources":["../../../src/patterns/list/ListRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,cAAc,CAAC,OAAgB;IACtC,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,GAAY,EAAE,EAAE,EAAE,GAAY,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,GAAY,EAAE,EAAE,EAAE,GAAY,EAAE,CAAC;AACnG,CAAC;AAED,SAAS,sBAAsB,CAAC,EAC9B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,QAAQ,GAQT;IACC,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7F,MAAM,kBAAkB,GAAG,QAAQ,CA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1B,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAC3C,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CACvC,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,CAAC,KAAK,EAAE,EAAE;YACT,MAAM,MAAM,GAAG,sBAAsB,CAAC;gBACpC,OAAO;gBACP,KAAK;gBACL,QAAQ;gBACR,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC,CAAC;YAEH,OAAO,CACL,CAAC,GAAG,CACF,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CACd,WAAW,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAChC,WAAW,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAChC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CACf,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACtB,KAAK,CAAC,CAAC;oBACL,OAAO,EAAE,MAAM,CAAC,OAAO;iBACxB,CAAC,CAEF;YAAA,CAAC,OAAO,CACV;UAAA,EAAE,GAAG,CAAC,CACP,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { ButtonBase } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Text } from '../../components/text';\nimport { Box, Inline, Spacer, Stack } from '../../foundation';\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ListRowProps, ListRowVariant } from './types';\n\nfunction resolvePadding(compact: boolean) {\n return compact ? { px: 'm' as const, py: 's' as const } : { px: 'm' as const, py: 'm' as const };\n}\n\nfunction resolveContainerStyles({\n variant,\n theme,\n selected,\n pressed,\n hovered,\n disabled,\n}: {\n variant: ListRowVariant;\n theme: ReturnType<typeof useZoraTheme>['theme'];\n selected: boolean;\n pressed: boolean;\n hovered: boolean;\n disabled: boolean;\n}) {\n const borderColor = selected ? theme.semantics.border.focus : theme.semantics.border.default;\n const dividerBorderColor = selected ? theme.semantics.border.focus : 'transparent';\n\n if (variant === 'card') {\n return {\n bg: pressed\n ? theme.semantics.neutral.surfaceActive\n : hovered\n ? theme.semantics.neutral.surfaceHover\n : theme.semantics.surface.raised,\n borderColor,\n borderWidth: 1,\n radius: 'l' as const,\n opacity: disabled ? 0.72 : 1,\n };\n }\n\n return {\n bg: pressed\n ? theme.semantics.neutral.surfaceActive\n : hovered\n ? theme.semantics.neutral.surfaceHover\n : selected\n ? theme.semantics.neutral.surface\n : 'transparent',\n borderColor: dividerBorderColor,\n borderWidth: selected ? 1 : 0,\n radius: 'm' as const,\n opacity: disabled ? 0.72 : 1,\n };\n}\n\nfunction ListRowInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n title,\n description,\n meta,\n leading,\n trailing,\n action,\n onPress,\n selected = false,\n disabled = false,\n compact = false,\n variant = 'divider',\n}: ListRowProps) {\n const { theme } = useZoraTheme();\n const padding = resolvePadding(compact);\n const isInteractive = Boolean(onPress) && !action;\n\n const content = (\n <Stack\n align=\"center\"\n direction=\"row\"\n style={{\n flex: 1,\n }}\n >\n {leading ? (\n <>\n <Box>{leading}</Box>\n <Spacer axis=\"horizontal\" size=\"m\" />\n </>\n ) : null}\n\n <Box flex={1}>\n <Stack gap=\"xxs\">\n <Text variant=\"body\" weight={selected ? 'semiBold' : 'medium'}>\n {title}\n </Text>\n {description ? (\n <Text tone=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n {meta ? (\n <Text tone=\"subtle\" variant=\"caption\">\n {meta}\n </Text>\n ) : null}\n </Stack>\n </Box>\n\n {trailing || action ? (\n <>\n <Spacer axis=\"horizontal\" size=\"m\" />\n <Inline align=\"center\" gap=\"s\" wrap=\"nowrap\">\n {trailing}\n {action}\n </Inline>\n </>\n ) : null}\n </Stack>\n );\n\n if (!isInteractive) {\n const styles = resolveContainerStyles({\n variant,\n theme,\n selected,\n pressed: false,\n hovered: false,\n disabled,\n });\n\n return (\n <Box\n bg={styles.bg}\n borderColor={styles.borderColor}\n borderWidth={styles.borderWidth}\n px={padding.px}\n py={padding.py}\n radius={styles.radius}\n testID={testID}\n style={{\n opacity: styles.opacity,\n }}\n >\n {content}\n </Box>\n );\n }\n\n return (\n <ButtonBase\n accessibilityRole=\"button\"\n accessibilityState={{ disabled, selected }}\n disabled={disabled}\n onPress={onPress}\n radius={variant === 'card' ? 'l' : 'm'}\n testID={testID}\n >\n {(state) => {\n const styles = resolveContainerStyles({\n variant,\n theme,\n selected,\n pressed: state.pressed,\n hovered: state.hovered,\n disabled: state.disabled,\n });\n\n return (\n <Box\n bg={styles.bg}\n borderColor={styles.borderColor}\n borderWidth={styles.borderWidth}\n px={padding.px}\n py={padding.py}\n radius={styles.radius}\n style={{\n opacity: styles.opacity,\n }}\n >\n {content}\n </Box>\n );\n }}\n </ButtonBase>\n );\n}\n\nexport const ListRow = withZoraThemeScope(ListRowInner);\n"]}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ListSectionProps } from './types';
3
+ export declare const ListSection: (props: ListSectionProps) => React.ReactElement | null;
4
+ //# sourceMappingURL=ListSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListSection.d.ts","sourceRoot":"","sources":["../../../src/patterns/list/ListSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA6BhD,eAAO,MAAM,WAAW,wDAAuC,CAAC"}