@arbor-education/design-system.components 4.0.0-react19-alpha.0 → 4.1.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 (141) hide show
  1. package/.github/workflows/pr-review-approve.yaml +2 -1
  2. package/CHANGELOG.md +28 -0
  3. package/dist/components/formField/FormField.d.ts +4 -0
  4. package/dist/components/formField/FormField.d.ts.map +1 -1
  5. package/dist/components/formField/FormField.js +2 -1
  6. package/dist/components/formField/FormField.js.map +1 -1
  7. package/dist/components/formField/FormField.stories.d.ts.map +1 -1
  8. package/dist/components/formField/FormField.stories.js +10 -7
  9. package/dist/components/formField/FormField.stories.js.map +1 -1
  10. package/dist/components/formField/FormField.test.js +14 -0
  11. package/dist/components/formField/FormField.test.js.map +1 -1
  12. package/dist/components/formField/inputs/singleFile/SingleFileInput.d.ts +14 -0
  13. package/dist/components/formField/inputs/singleFile/SingleFileInput.d.ts.map +1 -0
  14. package/dist/components/formField/inputs/singleFile/SingleFileInput.js +35 -0
  15. package/dist/components/formField/inputs/singleFile/SingleFileInput.js.map +1 -0
  16. package/dist/components/formField/inputs/singleFile/SingleFileInput.stories.d.ts +170 -0
  17. package/dist/components/formField/inputs/singleFile/SingleFileInput.stories.d.ts.map +1 -0
  18. package/dist/components/formField/inputs/singleFile/SingleFileInput.stories.js +242 -0
  19. package/dist/components/formField/inputs/singleFile/SingleFileInput.stories.js.map +1 -0
  20. package/dist/components/formField/inputs/singleFile/SingleFileInput.test.d.ts +2 -0
  21. package/dist/components/formField/inputs/singleFile/SingleFileInput.test.d.ts.map +1 -0
  22. package/dist/components/formField/inputs/singleFile/SingleFileInput.test.js +135 -0
  23. package/dist/components/formField/inputs/singleFile/SingleFileInput.test.js.map +1 -0
  24. package/dist/components/widget/types.d.ts +9 -0
  25. package/dist/components/widget/types.d.ts.map +1 -1
  26. package/dist/components/widgetCalendar/WidgetCalendar.d.ts +5 -2
  27. package/dist/components/widgetCalendar/WidgetCalendar.d.ts.map +1 -1
  28. package/dist/components/widgetCalendar/WidgetCalendar.js +30 -5
  29. package/dist/components/widgetCalendar/WidgetCalendar.js.map +1 -1
  30. package/dist/components/widgetCalendar/WidgetCalendar.stories.d.ts +20 -2
  31. package/dist/components/widgetCalendar/WidgetCalendar.stories.d.ts.map +1 -1
  32. package/dist/components/widgetCalendar/WidgetCalendar.stories.js +269 -2
  33. package/dist/components/widgetCalendar/WidgetCalendar.stories.js.map +1 -1
  34. package/dist/components/widgetCalendar/WidgetCalendar.test.js +179 -2
  35. package/dist/components/widgetCalendar/WidgetCalendar.test.js.map +1 -1
  36. package/dist/components/widgetCalendar/WidgetCalendarItem.d.ts +1 -0
  37. package/dist/components/widgetCalendar/WidgetCalendarItem.d.ts.map +1 -1
  38. package/dist/components/widgetCalendar/WidgetCalendarItem.js +7 -2
  39. package/dist/components/widgetCalendar/WidgetCalendarItem.js.map +1 -1
  40. package/dist/components/widgetFavourites/WidgetFavourites.d.ts.map +1 -1
  41. package/dist/components/widgetFavourites/WidgetFavourites.js +5 -4
  42. package/dist/components/widgetFavourites/WidgetFavourites.js.map +1 -1
  43. package/dist/components/widgetFavourites/WidgetFavourites.stories.d.ts +3 -0
  44. package/dist/components/widgetFavourites/WidgetFavourites.stories.d.ts.map +1 -1
  45. package/dist/components/widgetFavourites/WidgetFavourites.stories.js +157 -0
  46. package/dist/components/widgetFavourites/WidgetFavourites.stories.js.map +1 -1
  47. package/dist/components/widgetFavourites/WidgetFavourites.test.js +41 -1
  48. package/dist/components/widgetFavourites/WidgetFavourites.test.js.map +1 -1
  49. package/dist/components/widgetFavourites/WidgetFavouritesItem.d.ts.map +1 -1
  50. package/dist/components/widgetFavourites/WidgetFavouritesItem.js +2 -2
  51. package/dist/components/widgetFavourites/WidgetFavouritesItem.js.map +1 -1
  52. package/dist/components/widgetFavourites/types.d.ts +4 -2
  53. package/dist/components/widgetFavourites/types.d.ts.map +1 -1
  54. package/dist/index.css +34 -0
  55. package/dist/index.css.map +1 -1
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +1 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/packageManifest.test.d.ts +2 -0
  61. package/dist/packageManifest.test.d.ts.map +1 -0
  62. package/dist/packageManifest.test.js +22 -0
  63. package/dist/packageManifest.test.js.map +1 -0
  64. package/package.json +1 -1
  65. package/src/components/formField/FormField.stories.tsx +10 -7
  66. package/src/components/formField/FormField.test.tsx +35 -0
  67. package/src/components/formField/FormField.tsx +5 -0
  68. package/src/components/formField/inputs/singleFile/SingleFileInput.stories.tsx +339 -0
  69. package/src/components/formField/inputs/singleFile/SingleFileInput.test.tsx +181 -0
  70. package/src/components/formField/inputs/singleFile/SingleFileInput.tsx +101 -0
  71. package/src/components/formField/inputs/singleFile/singleFileInput.scss +17 -0
  72. package/src/components/widget/types.ts +13 -0
  73. package/src/components/widgetCalendar/WidgetCalendar.stories.tsx +310 -2
  74. package/src/components/widgetCalendar/WidgetCalendar.test.tsx +315 -1
  75. package/src/components/widgetCalendar/WidgetCalendar.tsx +77 -31
  76. package/src/components/widgetCalendar/WidgetCalendarItem.tsx +14 -1
  77. package/src/components/widgetCalendar/widgetCalendar.scss +9 -0
  78. package/src/components/widgetFavourites/WidgetFavourites.stories.tsx +217 -0
  79. package/src/components/widgetFavourites/WidgetFavourites.test.tsx +99 -0
  80. package/src/components/widgetFavourites/WidgetFavourites.tsx +6 -2
  81. package/src/components/widgetFavourites/WidgetFavouritesItem.tsx +2 -1
  82. package/src/components/widgetFavourites/types.ts +5 -2
  83. package/src/components/widgetFavourites/widgetFavourites.scss +7 -0
  84. package/src/index.scss +1 -0
  85. package/src/index.ts +1 -0
  86. package/src/packageManifest.test.ts +43 -0
  87. package/src/tokens.scss +1 -0
  88. package/tokens/json/Arbor.json +4 -0
  89. package/.changeset/empty-clocks-jog.md +0 -5
  90. package/dist/components/combobox/useElementWidth.d.ts +0 -2
  91. package/dist/components/combobox/useElementWidth.d.ts.map +0 -1
  92. package/dist/components/combobox/useElementWidth.js +0 -31
  93. package/dist/components/combobox/useElementWidth.js.map +0 -1
  94. package/dist/components/combobox/useVisibleChips.d.ts +0 -21
  95. package/dist/components/combobox/useVisibleChips.d.ts.map +0 -1
  96. package/dist/components/combobox/useVisibleChips.js +0 -59
  97. package/dist/components/combobox/useVisibleChips.js.map +0 -1
  98. package/dist/components/combobox/useVisibleChips.test.d.ts +0 -2
  99. package/dist/components/combobox/useVisibleChips.test.d.ts.map +0 -1
  100. package/dist/components/combobox/useVisibleChips.test.js +0 -81
  101. package/dist/components/combobox/useVisibleChips.test.js.map +0 -1
  102. package/dist/components/icoText/IcoText.d.ts +0 -37
  103. package/dist/components/icoText/IcoText.d.ts.map +0 -1
  104. package/dist/components/icoText/IcoText.js +0 -29
  105. package/dist/components/icoText/IcoText.js.map +0 -1
  106. package/dist/components/icoText/IcoText.stories.d.ts +0 -60
  107. package/dist/components/icoText/IcoText.stories.d.ts.map +0 -1
  108. package/dist/components/icoText/IcoText.stories.js +0 -319
  109. package/dist/components/icoText/IcoText.stories.js.map +0 -1
  110. package/dist/components/icoText/IcoText.test.d.ts +0 -2
  111. package/dist/components/icoText/IcoText.test.d.ts.map +0 -1
  112. package/dist/components/icoText/IcoText.test.js +0 -27
  113. package/dist/components/icoText/IcoText.test.js.map +0 -1
  114. package/dist/components/tree-row/TreeRow.d.ts +0 -32
  115. package/dist/components/tree-row/TreeRow.d.ts.map +0 -1
  116. package/dist/components/tree-row/TreeRow.js +0 -19
  117. package/dist/components/tree-row/TreeRow.js.map +0 -1
  118. package/dist/components/tree-row/TreeRow.stories.d.ts +0 -13
  119. package/dist/components/tree-row/TreeRow.stories.d.ts.map +0 -1
  120. package/dist/components/tree-row/TreeRow.stories.js +0 -774
  121. package/dist/components/tree-row/TreeRow.stories.js.map +0 -1
  122. package/dist/components/tree-row/TreeRow.test.d.ts +0 -2
  123. package/dist/components/tree-row/TreeRow.test.d.ts.map +0 -1
  124. package/dist/components/tree-row/TreeRow.test.js +0 -262
  125. package/dist/components/tree-row/TreeRow.test.js.map +0 -1
  126. package/dist/components/tree-row/TreeRowSection.d.ts +0 -12
  127. package/dist/components/tree-row/TreeRowSection.d.ts.map +0 -1
  128. package/dist/components/tree-row/TreeRowSection.js +0 -20
  129. package/dist/components/tree-row/TreeRowSection.js.map +0 -1
  130. package/dist/utils/PopupParentContext.d.ts +0 -3
  131. package/dist/utils/PopupParentContext.d.ts.map +0 -1
  132. package/dist/utils/PopupParentContext.js +0 -6
  133. package/dist/utils/PopupParentContext.js.map +0 -1
  134. package/dist/utils/PopupParentContext.stories.d.ts +0 -17
  135. package/dist/utils/PopupParentContext.stories.d.ts.map +0 -1
  136. package/dist/utils/PopupParentContext.stories.js +0 -266
  137. package/dist/utils/PopupParentContext.stories.js.map +0 -1
  138. package/dist/utils/getDefaultPopupParent.d.ts +0 -2
  139. package/dist/utils/getDefaultPopupParent.d.ts.map +0 -1
  140. package/dist/utils/getDefaultPopupParent.js +0 -19
  141. package/dist/utils/getDefaultPopupParent.js.map +0 -1
package/src/index.ts CHANGED
@@ -35,6 +35,7 @@ export { NumberInput } from 'Components/formField/inputs/number/NumberInput';
35
35
  export { RadioButtonGroup } from 'Components/formField/inputs/radio/RadioButtonGroup';
36
36
  export { RadioButtonInput } from 'Components/formField/inputs/radio/RadioButtonInput';
37
37
  export { SelectDropdown } from 'Components/formField/inputs/selectDropdown/SelectDropdown';
38
+ export { SingleFileInput } from 'Components/formField/inputs/singleFile/SingleFileInput';
38
39
  export { Skeleton } from 'Components/skeleton/Skeleton';
39
40
  export { TextInput } from 'Components/formField/inputs/text/TextInput';
40
41
  export { TextArea } from 'Components/formField/inputs/textArea/TextArea';
@@ -0,0 +1,43 @@
1
+ import { readFileSync } from 'fs';
2
+ import path from 'path';
3
+ import { describe, expect, test } from 'vitest';
4
+
5
+ type PackageManifest = {
6
+ dependencies?: Record<string, string>;
7
+ peerDependencies?: Record<string, string>;
8
+ peerDependenciesMeta?: Record<string, { optional?: boolean }>;
9
+ };
10
+
11
+ // Read from disk rather than imported: tsconfig's rootDir is ./src, so a JSON import of the
12
+ // root package.json would fail type-checking.
13
+ const manifest: PackageManifest = JSON.parse(
14
+ readFileSync(path.resolve(__dirname, '../package.json'), 'utf8'),
15
+ );
16
+
17
+ const SUPPORTED_REACT_RANGE = '^18.0.0 || ^19.0.0';
18
+ const REACT_PACKAGES = ['react', 'react-dom'];
19
+ const REACT_TYPE_PACKAGES = ['@types/react', '@types/react-dom'];
20
+
21
+ describe('package.json keeps React as a peer so consumers never get a second React copy', () => {
22
+ test.each([...REACT_PACKAGES, ...REACT_TYPE_PACKAGES])(
23
+ 'does not bundle %s as a dependency, which would nest a second copy inside consumers',
24
+ (packageName) => {
25
+ expect(manifest.dependencies ?? {}).not.toHaveProperty([packageName]);
26
+ },
27
+ );
28
+
29
+ test.each(REACT_PACKAGES)(
30
+ 'accepts both React 18 and React 19 for %s so either consumer can install it',
31
+ (packageName) => {
32
+ expect(manifest.peerDependencies?.[packageName]).toBe(SUPPORTED_REACT_RANGE);
33
+ },
34
+ );
35
+
36
+ test.each(REACT_TYPE_PACKAGES)(
37
+ 'lists %s as an optional peer so JavaScript consumers are not forced to install types',
38
+ (packageName) => {
39
+ expect(manifest.peerDependencies ?? {}).toHaveProperty([packageName]);
40
+ expect(manifest.peerDependenciesMeta?.[packageName]?.optional).toBe(true);
41
+ },
42
+ );
43
+ });
package/src/tokens.scss CHANGED
@@ -882,6 +882,7 @@
882
882
  --widget-favourites-weight-border: var(--border-weight);
883
883
  --widget-favourites-spacing-vertical: var(--spacing-small);
884
884
  --widget-favourites-spacing-horizontal: var(--spacing-small);
885
+ --widget-favourites-max-height: 375px;
885
886
  --widget-attachments-hover-color-icon: var(--color-grey-900);
886
887
  --widget-attachments-hover-color-text: var(--color-grey-900);
887
888
  --widget-attachments-hover-color-background: var(--color-grey-100);
@@ -3973,6 +3973,10 @@
3973
3973
  "spacing-horizontal": {
3974
3974
  "$type": "dimension",
3975
3975
  "$value": "{spacing.small}"
3976
+ },
3977
+ "max-height": {
3978
+ "$type": "dimension",
3979
+ "$value": "375px"
3976
3980
  }
3977
3981
  },
3978
3982
  "attachments": {
@@ -1,5 +0,0 @@
1
- ---
2
- "@arbor-education/design-system.components": major
3
- ---
4
-
5
- MIS-71331 Upgrade to React 19 and move `react` and `react-dom` to `peerDependencies` (`^18.0.0 || ^19.0.0`). Consumers must now provide React themselves, and may run either React 18 or 19; 19 is preferred. `@types/react` and `@types/react-dom` are no longer installed as dependencies; they are declared as optional peer dependencies for TypeScript consumers.
@@ -1,2 +0,0 @@
1
- export declare const useElementWidth: (ref: React.RefObject<HTMLElement | null>, watchKey: string) => number;
2
- //# sourceMappingURL=useElementWidth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useElementWidth.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/useElementWidth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAC1B,KAAK,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,UAAU,MAAM,KACf,MAkCF,CAAC"}
@@ -1,31 +0,0 @@
1
- import { useCallback, useLayoutEffect, useState } from 'react';
2
- export const useElementWidth = (ref, watchKey) => {
3
- const [measurement, setMeasurement] = useState({ width: 0, hasMeasured: false });
4
- const element = ref.current;
5
- const update = useCallback(() => {
6
- const currentElement = ref.current;
7
- if (!currentElement) {
8
- setMeasurement({ width: 0, hasMeasured: true });
9
- return;
10
- }
11
- setMeasurement({
12
- width: currentElement.getBoundingClientRect().width,
13
- hasMeasured: true,
14
- });
15
- }, [ref]);
16
- useLayoutEffect(() => {
17
- // Re-run measurement when callers know the element's contents/layout inputs changed.
18
- update();
19
- }, [update, watchKey]);
20
- useLayoutEffect(() => {
21
- if (!element)
22
- return;
23
- const observer = new ResizeObserver(update);
24
- observer.observe(element);
25
- return () => {
26
- observer.disconnect();
27
- };
28
- }, [element, update]);
29
- return measurement.width;
30
- };
31
- //# sourceMappingURL=useElementWidth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useElementWidth.js","sourceRoot":"","sources":["../../../src/components/combobox/useElementWidth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,GAAwC,EACxC,QAAgB,EACR,EAAE;IACV,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;IACjF,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAE5B,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC;QACnC,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;YAChD,OAAO;QACT,CAAC;QAED,cAAc,CAAC;YACb,KAAK,EAAE,cAAc,CAAC,qBAAqB,EAAE,CAAC,KAAK;YACnD,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,eAAe,CAAC,GAAG,EAAE;QACnB,qFAAqF;QACrF,MAAM,EAAE,CAAC;IACX,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvB,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5C,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE1B,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtB,OAAO,WAAW,CAAC,KAAK,CAAC;AAC3B,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- type ComputeTriggerLayoutModelParams = {
2
- containerWidth: number;
3
- chipWidths: number[];
4
- chipGap: number;
5
- badgeWidth: number;
6
- ellipsisWidth: number;
7
- showBadge: boolean;
8
- safetyBuffer?: number;
9
- };
10
- export type TriggerLayoutModel = {
11
- visibleChipIndices: number[];
12
- hiddenChipCount: number;
13
- showBadge: boolean;
14
- showEllipsis: boolean;
15
- hasOverflow: boolean;
16
- };
17
- export declare const computeTriggerLayoutModel: ({ containerWidth, chipWidths, chipGap, badgeWidth, ellipsisWidth, showBadge, safetyBuffer, }: ComputeTriggerLayoutModelParams) => TriggerLayoutModel;
18
- type UseVisibleChipsParams = ComputeTriggerLayoutModelParams;
19
- export declare const useVisibleChips: (params: UseVisibleChipsParams) => TriggerLayoutModel;
20
- export {};
21
- //# sourceMappingURL=useVisibleChips.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVisibleChips.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/useVisibleChips.ts"],"names":[],"mappings":"AAEA,KAAK,+BAA+B,GAAG;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAoBF,eAAO,MAAM,yBAAyB,GAAI,8FAQvC,+BAA+B,KAAG,kBAmCpC,CAAC;AAEF,KAAK,qBAAqB,GAAG,+BAA+B,CAAC;AAE7D,eAAO,MAAM,eAAe,GAAI,QAAQ,qBAAqB,KAAG,kBAc7D,CAAC"}
@@ -1,59 +0,0 @@
1
- import { useMemo } from 'react';
2
- const fitCount = (availableWidth, chipWidths, chipGap) => {
3
- if (availableWidth <= 0 || chipWidths.length === 0)
4
- return 0;
5
- let used = 0;
6
- let count = 0;
7
- for (let i = 0; i < chipWidths.length; i += 1) {
8
- const required = chipWidths[i] + (i > 0 ? chipGap : 0);
9
- if (used + required > availableWidth)
10
- break;
11
- used += required;
12
- count += 1;
13
- }
14
- return count;
15
- };
16
- export const computeTriggerLayoutModel = ({ containerWidth, chipWidths, chipGap, badgeWidth, ellipsisWidth, showBadge, safetyBuffer = 1, }) => {
17
- const selectedCount = chipWidths.length;
18
- const shouldShowBadge = showBadge && selectedCount > 0;
19
- if (selectedCount === 0 || containerWidth <= 0) {
20
- return {
21
- visibleChipIndices: [],
22
- hiddenChipCount: 0,
23
- showBadge: shouldShowBadge,
24
- showEllipsis: false,
25
- hasOverflow: false,
26
- };
27
- }
28
- const badgeReserve = shouldShowBadge
29
- ? badgeWidth + chipGap
30
- : 0;
31
- const availableWithoutEllipsis = Math.max(0, containerWidth - badgeReserve - safetyBuffer);
32
- const countWithoutEllipsis = fitCount(availableWithoutEllipsis, chipWidths, chipGap);
33
- const hasOverflow = countWithoutEllipsis < selectedCount;
34
- const ellipsisReserve = hasOverflow
35
- ? ellipsisWidth + chipGap
36
- : 0;
37
- const availableForChips = Math.max(0, containerWidth - badgeReserve - ellipsisReserve - safetyBuffer);
38
- const visibleCount = fitCount(availableForChips, chipWidths, chipGap);
39
- return {
40
- visibleChipIndices: Array.from({ length: visibleCount }, (_, index) => index),
41
- hiddenChipCount: Math.max(0, selectedCount - visibleCount),
42
- showBadge: shouldShowBadge,
43
- showEllipsis: visibleCount < selectedCount,
44
- hasOverflow: visibleCount < selectedCount,
45
- };
46
- };
47
- export const useVisibleChips = (params) =>
48
- // Deps list each field instead of `[params]`: callers often pass a new `params` object every
49
- // render; depending on object identity would rerun the layout every time even when values are unchanged.
50
- useMemo(() => computeTriggerLayoutModel(params), [
51
- params.badgeWidth,
52
- params.chipGap,
53
- params.chipWidths,
54
- params.containerWidth,
55
- params.ellipsisWidth,
56
- params.safetyBuffer,
57
- params.showBadge,
58
- ]);
59
- //# sourceMappingURL=useVisibleChips.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVisibleChips.js","sourceRoot":"","sources":["../../../src/components/combobox/useVisibleChips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAoBhC,MAAM,QAAQ,GAAG,CACf,cAAsB,EACtB,UAAoB,EACpB,OAAe,EACP,EAAE;IACV,IAAI,cAAc,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAE7D,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxD,IAAI,IAAI,GAAG,QAAQ,GAAG,cAAc;YAAE,MAAM;QAC5C,IAAI,IAAI,QAAQ,CAAC;QACjB,KAAK,IAAI,CAAC,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACxC,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,EACV,aAAa,EACb,SAAS,EAC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QAC1D,SAAS,EAAE,eAAe;QAC1B,YAAY,EAAE,YAAY,GAAG,aAAa;QAC1C,WAAW,EAAE,YAAY,GAAG,aAAa;KAC1C,CAAC;AACJ,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAA6B,EAAsB,EAAE;AACnF,6FAA6F;AAC7F,yGAAyG;AACzG,OAAO,CACL,GAAG,EAAE,CAAC,yBAAyB,CAAC,MAAM,CAAC,EACvC;IACE,MAAM,CAAC,UAAU;IACjB,MAAM,CAAC,OAAO;IACd,MAAM,CAAC,UAAU;IACjB,MAAM,CAAC,cAAc;IACrB,MAAM,CAAC,aAAa;IACpB,MAAM,CAAC,YAAY;IACnB,MAAM,CAAC,SAAS;CACjB,CACF,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=useVisibleChips.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVisibleChips.test.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/useVisibleChips.test.tsx"],"names":[],"mappings":""}
@@ -1,81 +0,0 @@
1
- import { describe, expect, test } from 'vitest';
2
- import { computeTriggerLayoutModel } from './useVisibleChips.js';
3
- describe('computeTriggerLayoutModel', () => {
4
- test('shows all chips and no ellipsis when there is no overflow', () => {
5
- const result = computeTriggerLayoutModel({
6
- containerWidth: 300,
7
- chipWidths: [70, 80, 60],
8
- chipGap: 4,
9
- badgeWidth: 24,
10
- ellipsisWidth: 12,
11
- showBadge: true,
12
- });
13
- expect(result).toEqual({
14
- visibleChipIndices: [0, 1, 2],
15
- hiddenChipCount: 0,
16
- showBadge: true,
17
- showEllipsis: false,
18
- hasOverflow: false,
19
- });
20
- });
21
- test('reserves badge and ellipsis before fitting chips when overflow exists', () => {
22
- const result = computeTriggerLayoutModel({
23
- containerWidth: 160,
24
- chipWidths: [60, 60, 60],
25
- chipGap: 4,
26
- badgeWidth: 24,
27
- ellipsisWidth: 12,
28
- showBadge: true,
29
- });
30
- expect(result.visibleChipIndices).toEqual([0]);
31
- expect(result.hiddenChipCount).toBe(2);
32
- expect(result.showEllipsis).toBe(true);
33
- expect(result.hasOverflow).toBe(true);
34
- });
35
- test('allows zero chips when badge and ellipsis take priority in tiny space', () => {
36
- const result = computeTriggerLayoutModel({
37
- containerWidth: 36,
38
- chipWidths: [80, 80],
39
- chipGap: 4,
40
- badgeWidth: 24,
41
- ellipsisWidth: 12,
42
- showBadge: true,
43
- });
44
- expect(result.visibleChipIndices).toEqual([]);
45
- expect(result.hiddenChipCount).toBe(2);
46
- expect(result.showEllipsis).toBe(true);
47
- });
48
- test('reserving badge space reduces visible count', () => {
49
- const withBadge = computeTriggerLayoutModel({
50
- containerWidth: 180,
51
- chipWidths: [60, 60, 60],
52
- chipGap: 4,
53
- badgeWidth: 24,
54
- ellipsisWidth: 12,
55
- showBadge: true,
56
- });
57
- const withoutBadge = computeTriggerLayoutModel({
58
- containerWidth: 180,
59
- chipWidths: [60, 60, 60],
60
- chipGap: 4,
61
- badgeWidth: 24,
62
- ellipsisWidth: 12,
63
- showBadge: false,
64
- });
65
- expect(withoutBadge.visibleChipIndices.length).toBeGreaterThanOrEqual(withBadge.visibleChipIndices.length);
66
- });
67
- test('uses safety buffer to avoid a clipped final chip on boundary widths', () => {
68
- const result = computeTriggerLayoutModel({
69
- containerWidth: 195.5,
70
- chipWidths: [73.4, 73.4, 20],
71
- chipGap: 4,
72
- badgeWidth: 24.2,
73
- ellipsisWidth: 11.6,
74
- showBadge: true,
75
- safetyBuffer: 1,
76
- });
77
- expect(result.visibleChipIndices).toEqual([0]);
78
- expect(result.showEllipsis).toBe(true);
79
- });
80
- });
81
- //# sourceMappingURL=useVisibleChips.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVisibleChips.test.js","sourceRoot":"","sources":["../../../src/components/combobox/useVisibleChips.test.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;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AAC,qEAAqE,EAAE,GAAG,EAAE;QAC/E,MAAM,MAAM,GAAG,yBAAyB,CAAC;YACvC,cAAc,EAAE,KAAK;YACrB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;YAC5B,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,IAAI;YAChB,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,IAAI;YACf,YAAY,EAAE,CAAC;SAChB,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,37 +0,0 @@
1
- import type { IconName } from '../icon/allowedIcons.js';
2
- import { Icon } from '../icon/Icon.js';
3
- export type IcoTextProps = {
4
- children?: React.ReactNode;
5
- className?: string;
6
- };
7
- export type IcoTextHeadingProps = React.HTMLAttributes<HTMLHeadingElement> & {
8
- children: React.ReactNode;
9
- };
10
- export type IcoTextParagraphProps = React.HTMLAttributes<HTMLParagraphElement> & {
11
- children: React.ReactNode;
12
- };
13
- export type IcoTextIconProps = {
14
- className?: string;
15
- color?: Icon.Props['color'];
16
- name: IconName;
17
- screenReaderText?: string;
18
- size?: 12 | 16 | 24;
19
- };
20
- export declare const IcoText: {
21
- ({ children, className }: IcoTextProps): React.JSX.Element;
22
- displayName: string;
23
- } & {
24
- Heading: {
25
- ({ children, className, ...rest }: IcoTextHeadingProps): React.JSX.Element;
26
- displayName: string;
27
- };
28
- Paragraph: {
29
- ({ children, className, ...rest }: IcoTextParagraphProps): React.JSX.Element;
30
- displayName: string;
31
- };
32
- Icon: {
33
- ({ className, color, name, screenReaderText, size, }: IcoTextIconProps): React.JSX.Element;
34
- displayName: string;
35
- };
36
- };
37
- //# sourceMappingURL=IcoText.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IcoText.d.ts","sourceRoot":"","sources":["../../../src/components/icoText/IcoText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5C,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG;IAC3E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,GAAG;IAC/E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;CACrB,CAAC;AAgEF,eAAO,MAAM,OAAO;8BA1B0B,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;;;2CAhC3E,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;;;2CAUvC,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;;;8DAYzC,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO;;;CAwCrC,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- import { Icon } from '../icon/Icon.js';
4
- import { Children, isValidElement } from 'react';
5
- const IcoTextHeading = ({ children, className, ...rest }) => (_jsx("h4", { className: classNames('ds-ico-text__heading', className), ...rest, children: children }));
6
- const IcoTextParagraph = ({ children, className, ...rest }) => (_jsx("p", { className: classNames('ds-ico-text__paragraph', className), ...rest, children: children }));
7
- const IcoTextIcon = ({ className, color, name, screenReaderText, size = 24, }) => (_jsx(Icon, { name: name, className: classNames('ds-ico-text__icon', className), color: color, screenReaderText: screenReaderText, size: size }));
8
- const IcoTextRoot = ({ children, className }) => {
9
- const iconChildren = [];
10
- const contentChildren = [];
11
- Children.forEach(children, (child) => {
12
- if (isValidElement(child) && child.type === IcoTextIcon) {
13
- iconChildren.push(child);
14
- return;
15
- }
16
- contentChildren.push(child);
17
- });
18
- return (_jsxs("div", { className: classNames('ds-ico-text', className), children: [iconChildren, _jsx("div", { className: "ds-ico-text__content", children: contentChildren })] }));
19
- };
20
- IcoTextHeading.displayName = 'IcoText.Heading';
21
- IcoTextParagraph.displayName = 'IcoText.Paragraph';
22
- IcoTextIcon.displayName = 'IcoText.Icon';
23
- IcoTextRoot.displayName = 'IcoText';
24
- export const IcoText = Object.assign(IcoTextRoot, {
25
- Heading: IcoTextHeading,
26
- Paragraph: IcoTextParagraph,
27
- Icon: IcoTextIcon,
28
- });
29
- //# sourceMappingURL=IcoText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IcoText.js","sourceRoot":"","sources":["../../../src/components/icoText/IcoText.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAuBjD,MAAM,cAAc,GAAG,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACa,EAAqB,EAAE,CAAC,CAC5C,aAAI,SAAS,EA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AAC,WAAW,GAAG,iBAAiB,CAAC;AAC/C,gBAAgB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AACnD,WAAW,CAAC,WAAW,GAAG,cAAc,CAAC;AACzC,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,gBAAgB;IAC3B,IAAI,EAAE,WAAW;CAClB,CAAC,CAAC"}
@@ -1,60 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- import { IcoText } from './IcoText.js';
3
- declare function IcoTextDocsPage(): import("react/jsx-runtime").JSX.Element;
4
- declare const meta: {
5
- title: string;
6
- component: {
7
- ({ children, className }: import("./IcoText.js").IcoTextProps): React.JSX.Element;
8
- displayName: string;
9
- } & {
10
- Heading: {
11
- ({ children, className, ...rest }: import("./IcoText.js").IcoTextHeadingProps): React.JSX.Element;
12
- displayName: string;
13
- };
14
- Paragraph: {
15
- ({ children, className, ...rest }: import("./IcoText.js").IcoTextParagraphProps): React.JSX.Element;
16
- displayName: string;
17
- };
18
- Icon: {
19
- ({ className, color, name, screenReaderText, size, }: import("./IcoText.js").IcoTextIconProps): React.JSX.Element;
20
- displayName: string;
21
- };
22
- };
23
- tags: string[];
24
- parameters: {
25
- layout: string;
26
- docs: {
27
- page: typeof IcoTextDocsPage;
28
- };
29
- };
30
- argTypes: {
31
- className: {
32
- control: false;
33
- description: string;
34
- table: {
35
- type: {
36
- summary: string;
37
- };
38
- };
39
- };
40
- children: {
41
- control: false;
42
- description: string;
43
- table: {
44
- type: {
45
- summary: string;
46
- };
47
- };
48
- };
49
- };
50
- };
51
- export default meta;
52
- type Story = StoryObj<typeof IcoText>;
53
- export declare const Default: Story;
54
- export declare const HeadingOnly: Story;
55
- export declare const WithoutIcon: Story;
56
- export declare const IconWithScreenReaderText: Story;
57
- export declare const IconSizes: Story;
58
- export declare const IconColors: Story;
59
- export declare const MultipleParagraphs: Story;
60
- //# sourceMappingURL=IcoText.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IcoText.stories.d.ts","sourceRoot":"","sources":["../../../src/components/icoText/IcoText.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAU5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2GpC,iBAAS,eAAe,4CAyBvB;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAsEtC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA+BzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA+BzB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAqCtC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAuCvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KA2BxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA4BhC,CAAC"}