@activecollab/components 2.0.524 → 2.0.525

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 (105) hide show
  1. package/dist/cjs/components/Autocomplete/Autocomplete.js +93 -16
  2. package/dist/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  3. package/dist/cjs/components/AvatarGroup/AvatarGroup.js +2 -1
  4. package/dist/cjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
  5. package/dist/cjs/components/ComboBox/ComboBox.js +6 -0
  6. package/dist/cjs/components/ComboBox/ComboBox.js.map +1 -1
  7. package/dist/cjs/components/EditableText/useEditableText.js +7 -3
  8. package/dist/cjs/components/EditableText/useEditableText.js.map +1 -1
  9. package/dist/cjs/components/Filter/Filter.js +9 -4
  10. package/dist/cjs/components/Filter/Filter.js.map +1 -1
  11. package/dist/cjs/components/Filter/Styles.js +10 -3
  12. package/dist/cjs/components/Filter/Styles.js.map +1 -1
  13. package/dist/cjs/components/FilterInput/FilterInput.js +1 -1
  14. package/dist/cjs/components/FilterInput/FilterInput.js.map +1 -1
  15. package/dist/cjs/components/FilterInput/FilterInput.styles.js +3 -3
  16. package/dist/cjs/components/FilterInput/FilterInput.styles.js.map +1 -1
  17. package/dist/cjs/components/List/Styles.js +6 -2
  18. package/dist/cjs/components/List/Styles.js.map +1 -1
  19. package/dist/cjs/components/Menu/MenuHeader.js +2 -0
  20. package/dist/cjs/components/Menu/MenuHeader.js.map +1 -1
  21. package/dist/cjs/components/Select/Option/Option.js +1 -1
  22. package/dist/cjs/components/Select/Option/Option.js.map +1 -1
  23. package/dist/cjs/components/Select/Select.js +3 -0
  24. package/dist/cjs/components/Select/Select.js.map +1 -1
  25. package/dist/cjs/components/Signifier/Signifier.js +1 -1
  26. package/dist/cjs/components/Signifier/Signifier.js.map +1 -1
  27. package/dist/cjs/components/ViewSwitcher/Styles.js +40 -0
  28. package/dist/cjs/components/ViewSwitcher/Styles.js.map +1 -0
  29. package/dist/cjs/components/ViewSwitcher/ViewIllustration.js +127 -0
  30. package/dist/cjs/components/ViewSwitcher/ViewIllustration.js.map +1 -0
  31. package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js +312 -0
  32. package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js.map +1 -0
  33. package/dist/cjs/components/ViewSwitcher/index.js +28 -0
  34. package/dist/cjs/components/ViewSwitcher/index.js.map +1 -0
  35. package/dist/cjs/components/index.js +11 -0
  36. package/dist/cjs/components/index.js.map +1 -1
  37. package/dist/esm/components/Autocomplete/Autocomplete.d.ts +10 -3
  38. package/dist/esm/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  39. package/dist/esm/components/Autocomplete/Autocomplete.js +74 -11
  40. package/dist/esm/components/Autocomplete/Autocomplete.js.map +1 -1
  41. package/dist/esm/components/AvatarGroup/AvatarGroup.js +2 -1
  42. package/dist/esm/components/AvatarGroup/AvatarGroup.js.map +1 -1
  43. package/dist/esm/components/ComboBox/ComboBox.d.ts.map +1 -1
  44. package/dist/esm/components/ComboBox/ComboBox.js +10 -2
  45. package/dist/esm/components/ComboBox/ComboBox.js.map +1 -1
  46. package/dist/esm/components/EditableText/useEditableText.d.ts.map +1 -1
  47. package/dist/esm/components/EditableText/useEditableText.js +7 -3
  48. package/dist/esm/components/EditableText/useEditableText.js.map +1 -1
  49. package/dist/esm/components/Filter/Filter.d.ts +2 -0
  50. package/dist/esm/components/Filter/Filter.d.ts.map +1 -1
  51. package/dist/esm/components/Filter/Filter.js +10 -5
  52. package/dist/esm/components/Filter/Filter.js.map +1 -1
  53. package/dist/esm/components/Filter/Styles.d.ts +1 -0
  54. package/dist/esm/components/Filter/Styles.d.ts.map +1 -1
  55. package/dist/esm/components/Filter/Styles.js +9 -2
  56. package/dist/esm/components/Filter/Styles.js.map +1 -1
  57. package/dist/esm/components/FilterInput/FilterInput.d.ts +2 -2
  58. package/dist/esm/components/FilterInput/FilterInput.d.ts.map +1 -1
  59. package/dist/esm/components/FilterInput/FilterInput.js +1 -1
  60. package/dist/esm/components/FilterInput/FilterInput.js.map +1 -1
  61. package/dist/esm/components/FilterInput/FilterInput.styles.d.ts.map +1 -1
  62. package/dist/esm/components/FilterInput/FilterInput.styles.js +3 -3
  63. package/dist/esm/components/FilterInput/FilterInput.styles.js.map +1 -1
  64. package/dist/esm/components/List/Styles.d.ts +2 -0
  65. package/dist/esm/components/List/Styles.d.ts.map +1 -1
  66. package/dist/esm/components/List/Styles.js +5 -1
  67. package/dist/esm/components/List/Styles.js.map +1 -1
  68. package/dist/esm/components/Menu/MenuHeader.d.ts.map +1 -1
  69. package/dist/esm/components/Menu/MenuHeader.js +2 -0
  70. package/dist/esm/components/Menu/MenuHeader.js.map +1 -1
  71. package/dist/esm/components/Select/Option/Option.d.ts +4 -4
  72. package/dist/esm/components/Select/Option/Option.d.ts.map +1 -1
  73. package/dist/esm/components/Select/Option/Option.js +1 -1
  74. package/dist/esm/components/Select/Option/Option.js.map +1 -1
  75. package/dist/esm/components/Select/Select.d.ts.map +1 -1
  76. package/dist/esm/components/Select/Select.js +4 -1
  77. package/dist/esm/components/Select/Select.js.map +1 -1
  78. package/dist/esm/components/Signifier/Signifier.d.ts.map +1 -1
  79. package/dist/esm/components/Signifier/Signifier.js +1 -1
  80. package/dist/esm/components/Signifier/Signifier.js.map +1 -1
  81. package/dist/esm/components/ViewSwitcher/Styles.d.ts +7 -0
  82. package/dist/esm/components/ViewSwitcher/Styles.d.ts.map +1 -0
  83. package/dist/esm/components/ViewSwitcher/Styles.js +33 -0
  84. package/dist/esm/components/ViewSwitcher/Styles.js.map +1 -0
  85. package/dist/esm/components/ViewSwitcher/ViewIllustration.d.ts +20 -0
  86. package/dist/esm/components/ViewSwitcher/ViewIllustration.d.ts.map +1 -0
  87. package/dist/esm/components/ViewSwitcher/ViewIllustration.js +91 -0
  88. package/dist/esm/components/ViewSwitcher/ViewIllustration.js.map +1 -0
  89. package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts +49 -0
  90. package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts.map +1 -0
  91. package/dist/esm/components/ViewSwitcher/ViewSwitcher.js +281 -0
  92. package/dist/esm/components/ViewSwitcher/ViewSwitcher.js.map +1 -0
  93. package/dist/esm/components/ViewSwitcher/index.d.ts +3 -0
  94. package/dist/esm/components/ViewSwitcher/index.d.ts.map +1 -0
  95. package/dist/esm/components/ViewSwitcher/index.js +3 -0
  96. package/dist/esm/components/ViewSwitcher/index.js.map +1 -0
  97. package/dist/esm/components/index.d.ts +1 -0
  98. package/dist/esm/components/index.d.ts.map +1 -1
  99. package/dist/esm/components/index.js +1 -0
  100. package/dist/esm/components/index.js.map +1 -1
  101. package/dist/index.js +1340 -800
  102. package/dist/index.js.map +1 -1
  103. package/dist/index.min.js +1 -1
  104. package/dist/index.min.js.map +1 -1
  105. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ import React, { SVGProps } from "react";
2
+ export declare const VIEW_ILLUSTRATION_TYPES: readonly ["list", "grid", "column", "timeline", "month", "week", "day", "timesheet", "activity-summary", "activity-timeline"];
3
+ export type ViewIllustrationType = (typeof VIEW_ILLUSTRATION_TYPES)[number];
4
+ export interface ViewIllustrationProps extends Omit<SVGProps<SVGSVGElement>, "ref" | "type"> {
5
+ type: ViewIllustrationType;
6
+ }
7
+ /**
8
+ * @component ViewIllustration
9
+ * @description
10
+ * Small schematic of a page view, 160x64, for the preview card of a ViewSwitcher.
11
+ * It takes its colors from the theme tokens only.
12
+ *
13
+ * @example
14
+ * <ViewIllustration type="timeline" />
15
+ */
16
+ export declare const ViewIllustration: {
17
+ ({ type, className, ...rest }: ViewIllustrationProps): React.JSX.Element;
18
+ displayName: string;
19
+ };
20
+ //# sourceMappingURL=ViewIllustration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewIllustration.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/ViewIllustration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKxC,eAAO,MAAM,uBAAuB,+HAW1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AA2H5E,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACrD,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;mCAI1B,qBAAqB;;CAoCvB,CAAC"}
@@ -0,0 +1,91 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["type", "className"];
4
+ import React from "react";
5
+ import classnames from "classnames";
6
+ import styled from "styled-components";
7
+ export const VIEW_ILLUSTRATION_TYPES = ["list", "grid", "column", "timeline", "month", "week", "day", "timesheet", "activity-summary", "activity-timeline"];
8
+ const box = function (x, y, w, h, r) {
9
+ if (r === void 0) {
10
+ r = 2;
11
+ }
12
+ return {
13
+ x,
14
+ y,
15
+ w,
16
+ h,
17
+ r
18
+ };
19
+ };
20
+ const cut = (x, y, w, h) => ({
21
+ x,
22
+ y,
23
+ w,
24
+ h,
25
+ r: 2,
26
+ cut: true
27
+ });
28
+ const dot = (x, y, d) => ({
29
+ cx: x + d / 2,
30
+ cy: y + d / 2,
31
+ d
32
+ });
33
+ const DAYS = [0, 1, 2, 3, 4, 5, 6].map(index => 11 + index * 20);
34
+ const WEEKDAYS = [0, 1, 2, 3, 4].map(index => 50 + index * 21);
35
+ const COLUMNS = [10, 58, 106];
36
+ const SHAPES = {
37
+ list: [10, 22, 34, 46].flatMap((y, index) => [box(10, y, 8, 8), box(24, y, [96, 72, 108, 60][index], 8)]),
38
+ grid: COLUMNS.flatMap(x => [box(x, 10, 44, 44, 3), cut(x + 6, 36, 26, 4), cut(x + 6, 44, 18, 4)]),
39
+ column: [box(10, 10, 24, 6), box(10, 20, 44, 14, 3), box(10, 38, 44, 14, 3), box(58, 10, 24, 6), box(58, 20, 44, 14, 3), box(106, 10, 24, 6), box(106, 20, 44, 14, 3), box(106, 38, 44, 14, 3)],
40
+ timeline: [box(10, 10, 30, 8), box(28, 22, 52, 8), box(46, 34, 74, 8), box(64, 46, 96, 8)],
41
+ month: [...DAYS.map(x => box(x, 8, 18, 4, 1)), ...[16, 27, 38, 49].flatMap(y => DAYS.map(x => box(x, y, 18, 9)))],
42
+ week: [...DAYS.map(x => box(x, 8, 18, 4, 1)), box(DAYS[0], 16, 18, 14), box(DAYS[1], 24, 18, 20), box(DAYS[3], 14, 18, 10), box(DAYS[3], 30, 18, 16), box(DAYS[4], 20, 18, 24), box(DAYS[6], 36, 18, 12)],
43
+ day: [...[12, 26, 40, 54].flatMap(y => [box(10, y - 2, 10, 4, 1), box(26, y, 124, 1, 0)]), box(26, 15, 80, 9), box(26, 43, 110, 9)],
44
+ timesheet: [...WEEKDAYS.map(x => box(x, 6, 15, 4, 1)), ...[16, 30, 44].flatMap(y => [box(10, y, 30, 8), ...WEEKDAYS.map(x => box(x, y, 15, 8))])],
45
+ "activity-summary": [dot(10, 8, 10), box(26, 9, 64, 8), box(26, 22, 96, 6), box(26, 31, 80, 6), dot(10, 42, 10), box(26, 43, 52, 8), box(26, 56, 88, 6)],
46
+ "activity-timeline": [box(14, 8, 1, 46, 0), dot(11, 8, 7), dot(11, 27, 7), dot(11, 46, 7), box(26, 8, 96, 7), box(26, 27, 72, 7), box(26, 46, 108, 7)]
47
+ };
48
+ const StyledViewIllustration = styled.svg.withConfig({
49
+ displayName: "ViewIllustration__StyledViewIllustration",
50
+ componentId: "sc-1qsu41v-0"
51
+ })(["display:block;width:160px;height:64px;border-radius:var(--ac-br-4);background-color:var(--surface-sheet);.c-view-illustration__shape{fill:color-mix(in srgb,var(--color-theme-900) 12%,transparent);}.c-view-illustration__cut{fill:var(--surface-sheet);}"]);
52
+ StyledViewIllustration.displayName = "StyledViewIllustration";
53
+ /**
54
+ * @component ViewIllustration
55
+ * @description
56
+ * Small schematic of a page view, 160x64, for the preview card of a ViewSwitcher.
57
+ * It takes its colors from the theme tokens only.
58
+ *
59
+ * @example
60
+ * <ViewIllustration type="timeline" />
61
+ */
62
+ export const ViewIllustration = _ref => {
63
+ var _SHAPES$type;
64
+ let type = _ref.type,
65
+ className = _ref.className,
66
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
67
+ return /*#__PURE__*/React.createElement(StyledViewIllustration, _extends({}, rest, {
68
+ xmlns: "http://www.w3.org/2000/svg",
69
+ viewBox: "0 0 160 64",
70
+ "aria-hidden": "true",
71
+ focusable: "false",
72
+ "data-illustration": type,
73
+ className: classnames("c-view-illustration", className)
74
+ }), ((_SHAPES$type = SHAPES[type]) != null ? _SHAPES$type : []).map((shape, index) => "d" in shape ? /*#__PURE__*/React.createElement("circle", {
75
+ key: index,
76
+ className: "c-view-illustration__shape",
77
+ cx: shape.cx,
78
+ cy: shape.cy,
79
+ r: shape.d / 2
80
+ }) : /*#__PURE__*/React.createElement("rect", {
81
+ key: index,
82
+ className: shape.cut ? "c-view-illustration__cut" : "c-view-illustration__shape",
83
+ x: shape.x,
84
+ y: shape.y,
85
+ width: shape.w,
86
+ height: shape.h,
87
+ rx: shape.r
88
+ })));
89
+ };
90
+ ViewIllustration.displayName = "ViewIllustration";
91
+ //# sourceMappingURL=ViewIllustration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewIllustration.js","names":["React","classnames","styled","VIEW_ILLUSTRATION_TYPES","box","x","y","w","h","r","cut","dot","d","cx","cy","DAYS","map","index","WEEKDAYS","COLUMNS","SHAPES","list","flatMap","grid","column","timeline","month","week","day","timesheet","StyledViewIllustration","svg","withConfig","displayName","componentId","ViewIllustration","_ref","_SHAPES$type","type","className","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","xmlns","viewBox","focusable","shape","key","width","height","rx"],"sources":["../../../../src/components/ViewSwitcher/ViewIllustration.tsx"],"sourcesContent":["import React, { SVGProps } from \"react\";\n\nimport classnames from \"classnames\";\nimport styled from \"styled-components\";\n\nexport const VIEW_ILLUSTRATION_TYPES = [\n \"list\",\n \"grid\",\n \"column\",\n \"timeline\",\n \"month\",\n \"week\",\n \"day\",\n \"timesheet\",\n \"activity-summary\",\n \"activity-timeline\",\n] as const;\n\nexport type ViewIllustrationType = (typeof VIEW_ILLUSTRATION_TYPES)[number];\n\ntype Shape =\n | { x: number; y: number; w: number; h: number; r?: number; cut?: boolean }\n | { cx: number; cy: number; d: number };\n\nconst box = (x: number, y: number, w: number, h: number, r = 2): Shape => ({\n x,\n y,\n w,\n h,\n r,\n});\nconst cut = (x: number, y: number, w: number, h: number): Shape => ({\n x,\n y,\n w,\n h,\n r: 2,\n cut: true,\n});\nconst dot = (x: number, y: number, d: number): Shape => ({\n cx: x + d / 2,\n cy: y + d / 2,\n d,\n});\n\nconst DAYS = [0, 1, 2, 3, 4, 5, 6].map((index) => 11 + index * 20);\nconst WEEKDAYS = [0, 1, 2, 3, 4].map((index) => 50 + index * 21);\nconst COLUMNS = [10, 58, 106];\n\nconst SHAPES: Record<ViewIllustrationType, Shape[]> = {\n list: [10, 22, 34, 46].flatMap((y, index) => [\n box(10, y, 8, 8),\n box(24, y, [96, 72, 108, 60][index], 8),\n ]),\n grid: COLUMNS.flatMap((x) => [\n box(x, 10, 44, 44, 3),\n cut(x + 6, 36, 26, 4),\n cut(x + 6, 44, 18, 4),\n ]),\n column: [\n box(10, 10, 24, 6),\n box(10, 20, 44, 14, 3),\n box(10, 38, 44, 14, 3),\n box(58, 10, 24, 6),\n box(58, 20, 44, 14, 3),\n box(106, 10, 24, 6),\n box(106, 20, 44, 14, 3),\n box(106, 38, 44, 14, 3),\n ],\n timeline: [\n box(10, 10, 30, 8),\n box(28, 22, 52, 8),\n box(46, 34, 74, 8),\n box(64, 46, 96, 8),\n ],\n month: [\n ...DAYS.map((x) => box(x, 8, 18, 4, 1)),\n ...[16, 27, 38, 49].flatMap((y) => DAYS.map((x) => box(x, y, 18, 9))),\n ],\n week: [\n ...DAYS.map((x) => box(x, 8, 18, 4, 1)),\n box(DAYS[0], 16, 18, 14),\n box(DAYS[1], 24, 18, 20),\n box(DAYS[3], 14, 18, 10),\n box(DAYS[3], 30, 18, 16),\n box(DAYS[4], 20, 18, 24),\n box(DAYS[6], 36, 18, 12),\n ],\n day: [\n ...[12, 26, 40, 54].flatMap((y) => [\n box(10, y - 2, 10, 4, 1),\n box(26, y, 124, 1, 0),\n ]),\n box(26, 15, 80, 9),\n box(26, 43, 110, 9),\n ],\n timesheet: [\n ...WEEKDAYS.map((x) => box(x, 6, 15, 4, 1)),\n ...[16, 30, 44].flatMap((y) => [\n box(10, y, 30, 8),\n ...WEEKDAYS.map((x) => box(x, y, 15, 8)),\n ]),\n ],\n \"activity-summary\": [\n dot(10, 8, 10),\n box(26, 9, 64, 8),\n box(26, 22, 96, 6),\n box(26, 31, 80, 6),\n dot(10, 42, 10),\n box(26, 43, 52, 8),\n box(26, 56, 88, 6),\n ],\n \"activity-timeline\": [\n box(14, 8, 1, 46, 0),\n dot(11, 8, 7),\n dot(11, 27, 7),\n dot(11, 46, 7),\n box(26, 8, 96, 7),\n box(26, 27, 72, 7),\n box(26, 46, 108, 7),\n ],\n};\n\nconst StyledViewIllustration = styled.svg`\n display: block;\n width: 160px;\n height: 64px;\n border-radius: var(--ac-br-4);\n background-color: var(--surface-sheet);\n\n .c-view-illustration__shape {\n fill: color-mix(in srgb, var(--color-theme-900) 12%, transparent);\n }\n\n .c-view-illustration__cut {\n fill: var(--surface-sheet);\n }\n`;\n\nStyledViewIllustration.displayName = \"StyledViewIllustration\";\n\nexport interface ViewIllustrationProps\n extends Omit<SVGProps<SVGSVGElement>, \"ref\" | \"type\"> {\n type: ViewIllustrationType;\n}\n\n/**\n * @component ViewIllustration\n * @description\n * Small schematic of a page view, 160x64, for the preview card of a ViewSwitcher.\n * It takes its colors from the theme tokens only.\n *\n * @example\n * <ViewIllustration type=\"timeline\" />\n */\nexport const ViewIllustration = ({\n type,\n className,\n ...rest\n}: ViewIllustrationProps) => (\n <StyledViewIllustration\n {...rest}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 160 64\"\n aria-hidden=\"true\"\n focusable=\"false\"\n data-illustration={type}\n className={classnames(\"c-view-illustration\", className)}\n >\n {(SHAPES[type] ?? []).map((shape, index) =>\n \"d\" in shape ? (\n <circle\n key={index}\n className=\"c-view-illustration__shape\"\n cx={shape.cx}\n cy={shape.cy}\n r={shape.d / 2}\n />\n ) : (\n <rect\n key={index}\n className={\n shape.cut\n ? \"c-view-illustration__cut\"\n : \"c-view-illustration__shape\"\n }\n x={shape.x}\n y={shape.y}\n width={shape.w}\n height={shape.h}\n rx={shape.r}\n />\n )\n )}\n </StyledViewIllustration>\n);\n\nViewIllustration.displayName = \"ViewIllustration\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAoB,OAAO;AAEvC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,uBAAuB,GAAG,CACrC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,mBAAmB,CACX;AAQV,MAAMC,GAAG,GAAG,SAAAA,CAACC,CAAS,EAAEC,CAAS,EAAEC,CAAS,EAAEC,CAAS,EAAEC,CAAC;EAAA,IAADA,CAAC;IAADA,CAAC,GAAG,CAAC;EAAA;EAAA,OAAa;IACzEJ,CAAC;IACDC,CAAC;IACDC,CAAC;IACDC,CAAC;IACDC;EACF,CAAC;AAAA,CAAC;AACF,MAAMC,GAAG,GAAGA,CAACL,CAAS,EAAEC,CAAS,EAAEC,CAAS,EAAEC,CAAS,MAAa;EAClEH,CAAC;EACDC,CAAC;EACDC,CAAC;EACDC,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AC,gBAEFZ,KAAA,CAAA2C,aAAA;IACEM,GAAG,EAAEhC,KAAM;IACXsB,SAAS,EACPS,KAAK,CAACtC,GAAG,GACL,0BAA0B,GAC1B,4BACL;IACDL,CAAC,EAAE2C,KAAK,CAAC3C,CAAE;IACXC,CAAC,EAAE0C,KAAK,CAAC1C,CAAE;IACX4C,KAAK,EAAEF,KAAK,CAACzC,CAAE;IACf4C,MAAM,EAAEH,KAAK,CAACxC,CAAE;IAChB4C,EAAE,EAAEJ,KAAK,CAACvC;EAAE,CACb,CAEL,CACsB,CAAC;AAAA,CAC1B;AAED0B,gBAAgB,CAACF,WAAW,GAAG,kBAAkB","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ import React, { HTMLAttributes, ReactNode } from "react";
2
+ import { ViewIllustrationType } from "./ViewIllustration";
3
+ export interface ViewSwitcherView {
4
+ id: string;
5
+ /** View name: the radio's accessible name and the preview title. */
6
+ label: string;
7
+ /** DS icon element. */
8
+ icon: ReactNode;
9
+ /** Second line of the preview. */
10
+ description?: string;
11
+ /** Thumbnail drawn above the preview title. */
12
+ preview?: ReactNode;
13
+ /** Built-in thumbnail of this kind of view, used when there is no preview. */
14
+ illustration?: ViewIllustrationType;
15
+ }
16
+ export interface ViewSwitcherProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
17
+ views: ViewSwitcherView[];
18
+ /** Id of the checked view. */
19
+ value?: string;
20
+ onChange: (id: string) => void;
21
+ /** Accessible name of the radiogroup. */
22
+ "aria-label"?: string;
23
+ /** Turns on the extra action offered after a switch. */
24
+ onApplyToAll?: (id: string) => unknown;
25
+ /** Extra action button text. */
26
+ applyToAllLabel?: string;
27
+ /** Title of the extra action popover. Defaults to "Now in {label}". */
28
+ offerTitle?: (view: ViewSwitcherView) => ReactNode;
29
+ }
30
+ /**
31
+ * @component ViewSwitcher
32
+ * @description
33
+ * Icon-only radiogroup that switches the view of a page. A preview with the view name shows on hover
34
+ * and on keyboard focus. With onApplyToAll, a switch offers an extra action under the switcher.
35
+ *
36
+ * @example
37
+ * <ViewSwitcher
38
+ * aria-label="View"
39
+ * views={[
40
+ * { id: "list", label: "List View", icon: <ViewListIcon /> },
41
+ * { id: "grid", label: "Grid View", icon: <ViewGridIcon /> },
42
+ * ]}
43
+ * value={view}
44
+ * onChange={setView}
45
+ * onApplyToAll={applyToAllProjects}
46
+ * />
47
+ */
48
+ export declare const ViewSwitcher: React.ForwardRefExoticComponent<ViewSwitcherProps & React.RefAttributes<HTMLDivElement>>;
49
+ //# sourceMappingURL=ViewSwitcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/ViewSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,cAAc,EAEd,SAAS,EAMV,MAAM,OAAO,CAAC;AAkBf,OAAO,EAAoB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxD,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,SAAS,CAAC;CACpD;AAgBD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,0FAuTxB,CAAC"}
@@ -0,0 +1,281 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["views", "value", "onChange", "aria-label", "onApplyToAll", "applyToAllLabel", "offerTitle", "className", "onKeyDown", "onBlur"];
4
+ import React, { forwardRef, useCallback, useEffect, useId, useRef, useState } from "react";
5
+ import classnames from "classnames";
6
+ import { StyledViewSwitcher, StyledViewSwitcherOffer, StyledViewSwitcherOption, StyledViewSwitcherPreview, StyledViewSwitcherThumbnail, StyledViewSwitcherTrack } from "./Styles";
7
+ import { Portal, useLayerContext } from "../../helpers";
8
+ import { layers } from "../../utils";
9
+ import useForkRef from "../../utils/useForkRef";
10
+ import { Button } from "../Button";
11
+ import { Popper } from "../Popper";
12
+ import { Body2, Caption1 } from "../Typography";
13
+ import { ViewIllustration } from "./ViewIllustration";
14
+ const POPOVER_MODIFIERS = [{
15
+ name: "offset",
16
+ options: {
17
+ offset: [0, 6]
18
+ }
19
+ }];
20
+ const TABBABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
21
+ const matchesFocusVisible = element => {
22
+ try {
23
+ return element.matches(":focus-visible");
24
+ } catch (_unused) {
25
+ return false;
26
+ }
27
+ };
28
+
29
+ /**
30
+ * @component ViewSwitcher
31
+ * @description
32
+ * Icon-only radiogroup that switches the view of a page. A preview with the view name shows on hover
33
+ * and on keyboard focus. With onApplyToAll, a switch offers an extra action under the switcher.
34
+ *
35
+ * @example
36
+ * <ViewSwitcher
37
+ * aria-label="View"
38
+ * views={[
39
+ * { id: "list", label: "List View", icon: <ViewListIcon /> },
40
+ * { id: "grid", label: "Grid View", icon: <ViewGridIcon /> },
41
+ * ]}
42
+ * value={view}
43
+ * onChange={setView}
44
+ * onApplyToAll={applyToAllProjects}
45
+ * />
46
+ */
47
+ export const ViewSwitcher = /*#__PURE__*/forwardRef((_ref, ref) => {
48
+ var _views;
49
+ let views = _ref.views,
50
+ value = _ref.value,
51
+ onChange = _ref.onChange,
52
+ _ref$ariaLabel = _ref["aria-label"],
53
+ ariaLabel = _ref$ariaLabel === void 0 ? "View" : _ref$ariaLabel,
54
+ onApplyToAll = _ref.onApplyToAll,
55
+ _ref$applyToAllLabel = _ref.applyToAllLabel,
56
+ applyToAllLabel = _ref$applyToAllLabel === void 0 ? "Apply to All Projects" : _ref$applyToAllLabel,
57
+ offerTitle = _ref.offerTitle,
58
+ className = _ref.className,
59
+ onKeyDown = _ref.onKeyDown,
60
+ onBlur = _ref.onBlur,
61
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
62
+ const _useLayerContext = useLayerContext(),
63
+ _useLayerContext$zInd = _useLayerContext.zIndex,
64
+ zIndex = _useLayerContext$zInd === void 0 ? layers.skyscraper : _useLayerContext$zInd;
65
+ const rootRef = useRef(null);
66
+ const handleRootRef = useForkRef(rootRef, ref);
67
+ const trackRef = useRef(null);
68
+ const optionRefs = useRef({});
69
+ const offerRef = useRef(null);
70
+ const offerActionRef = useRef(null);
71
+ const _useState = useState(null),
72
+ previewId = _useState[0],
73
+ setPreviewId = _useState[1];
74
+ const _useState2 = useState(null),
75
+ offerId = _useState2[0],
76
+ setOfferId = _useState2[1];
77
+ const offerTitleId = useId();
78
+ const checkedIndex = views.findIndex(_ref2 => {
79
+ let id = _ref2.id;
80
+ return id === value;
81
+ });
82
+ const tabStopId = (_views = views[checkedIndex >= 0 ? checkedIndex : 0]) == null ? void 0 : _views.id;
83
+ const offerView = views.find(_ref3 => {
84
+ let id = _ref3.id;
85
+ return id === offerId;
86
+ });
87
+ const previewView = offerView ? undefined : views.find(_ref4 => {
88
+ let id = _ref4.id;
89
+ return id === previewId;
90
+ });
91
+ const select = useCallback(id => {
92
+ if (id === value) {
93
+ return;
94
+ }
95
+ onChange(id);
96
+ setPreviewId(null);
97
+ if (onApplyToAll) {
98
+ setOfferId(id);
99
+ }
100
+ }, [onApplyToAll, onChange, value]);
101
+
102
+ // The popovers live in a portal, so "inside" covers them as well as the track.
103
+ const isInside = node => {
104
+ var _rootRef$current, _offerRef$current;
105
+ return Boolean(node && (((_rootRef$current = rootRef.current) == null ? void 0 : _rootRef$current.contains(node)) || ((_offerRef$current = offerRef.current) == null ? void 0 : _offerRef$current.contains(node))));
106
+ };
107
+ const focusChecked = useCallback(() => {
108
+ if (tabStopId) {
109
+ var _optionRefs$current$t;
110
+ (_optionRefs$current$t = optionRefs.current[tabStopId]) == null || _optionRefs$current$t.focus();
111
+ }
112
+ }, [tabStopId]);
113
+ useEffect(() => {
114
+ if (!offerId) {
115
+ return undefined;
116
+ }
117
+ const closeOutside = event => {
118
+ if (!isInside(event.target)) {
119
+ setOfferId(null);
120
+ }
121
+ };
122
+ document.addEventListener("mousedown", closeOutside);
123
+ return () => document.removeEventListener("mousedown", closeOutside);
124
+ }, [offerId]);
125
+ const handleOptionKeyDown = (event, index) => {
126
+ var _optionRefs$current$i;
127
+ const last = views.length - 1;
128
+ const targets = {
129
+ ArrowRight: index === last ? 0 : index + 1,
130
+ ArrowDown: index === last ? 0 : index + 1,
131
+ ArrowLeft: index === 0 ? last : index - 1,
132
+ ArrowUp: index === 0 ? last : index - 1,
133
+ Home: 0,
134
+ End: last
135
+ };
136
+ if (event.key === "Tab" && !event.shiftKey && offerActionRef.current) {
137
+ event.preventDefault();
138
+ offerActionRef.current.focus();
139
+ return;
140
+ }
141
+ const target = targets[event.key];
142
+ if (target === undefined) {
143
+ return;
144
+ }
145
+ event.preventDefault();
146
+ const id = views[target].id;
147
+ (_optionRefs$current$i = optionRefs.current[id]) == null || _optionRefs$current$i.focus();
148
+ select(id);
149
+ };
150
+ const handleRootKeyDown = event => {
151
+ onKeyDown == null || onKeyDown(event);
152
+ if (event.key !== "Escape" || !offerId && !previewId) {
153
+ return;
154
+ }
155
+ event.stopPropagation();
156
+ setPreviewId(null);
157
+ if (offerId) {
158
+ setOfferId(null);
159
+ focusChecked();
160
+ }
161
+ };
162
+ const handleRootBlur = event => {
163
+ onBlur == null || onBlur(event);
164
+ const next = event.relatedTarget;
165
+ if (next && !isInside(next)) {
166
+ setOfferId(null);
167
+ }
168
+ };
169
+ const handleOfferActionKeyDown = event => {
170
+ if (event.key !== "Tab") {
171
+ return;
172
+ }
173
+ event.preventDefault();
174
+ if (event.shiftKey) {
175
+ focusChecked();
176
+ return;
177
+ }
178
+
179
+ // The offer sits in a portal, so Tab goes on from the switcher in the page.
180
+ const next = Array.from(document.querySelectorAll(TABBABLE)).find(element => !isInside(element) && Boolean(rootRef.current && rootRef.current.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_FOLLOWING));
181
+ if (next) {
182
+ next.focus();
183
+ } else {
184
+ focusChecked();
185
+ setOfferId(null);
186
+ }
187
+ };
188
+ const applyToAll = async () => {
189
+ if (!offerId || !onApplyToAll) {
190
+ return;
191
+ }
192
+ const id = offerId;
193
+ focusChecked();
194
+ setOfferId(null);
195
+ await onApplyToAll(id);
196
+ };
197
+ return /*#__PURE__*/React.createElement(StyledViewSwitcher, _extends({
198
+ ref: handleRootRef,
199
+ className: classnames("c-view-switcher", className),
200
+ onKeyDown: handleRootKeyDown,
201
+ onBlur: handleRootBlur
202
+ }, rest), /*#__PURE__*/React.createElement(StyledViewSwitcherTrack, {
203
+ ref: trackRef,
204
+ role: "radiogroup",
205
+ "aria-label": ariaLabel,
206
+ className: "c-view-switcher__track"
207
+ }, views.map((view, index) => {
208
+ const checked = view.id === value;
209
+ return /*#__PURE__*/React.createElement(StyledViewSwitcherOption, {
210
+ key: view.id,
211
+ ref: node => {
212
+ optionRefs.current[view.id] = node;
213
+ },
214
+ type: "button",
215
+ role: "radio",
216
+ "aria-checked": checked,
217
+ "aria-label": view.label,
218
+ tabIndex: view.id === tabStopId ? 0 : -1,
219
+ className: "c-view-switcher__option",
220
+ onClick: () => select(view.id),
221
+ onKeyDown: event => handleOptionKeyDown(event, index),
222
+ onMouseEnter: () => setPreviewId(view.id),
223
+ onMouseLeave: () => setPreviewId(null),
224
+ onFocus: event => {
225
+ if (matchesFocusVisible(event.currentTarget)) {
226
+ setPreviewId(view.id);
227
+ }
228
+ },
229
+ onBlur: () => setPreviewId(null)
230
+ }, view.icon);
231
+ })), previewView ? /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(Popper, {
232
+ anchorEl: optionRefs.current[previewView.id],
233
+ open: true,
234
+ placement: "bottom",
235
+ strategy: "fixed",
236
+ modifiers: POPOVER_MODIFIERS,
237
+ style: {
238
+ zIndex
239
+ },
240
+ "aria-hidden": "true"
241
+ }, /*#__PURE__*/React.createElement(StyledViewSwitcherPreview, {
242
+ className: "c-view-switcher__preview"
243
+ }, previewView.preview ? /*#__PURE__*/React.createElement(StyledViewSwitcherThumbnail, null, previewView.preview) : previewView.illustration ? /*#__PURE__*/React.createElement(StyledViewSwitcherThumbnail, null, /*#__PURE__*/React.createElement(ViewIllustration, {
244
+ type: previewView.illustration
245
+ })) : null, /*#__PURE__*/React.createElement(Caption1, {
246
+ weight: "bold",
247
+ color: "primary"
248
+ }, previewView.label), previewView.description ? /*#__PURE__*/React.createElement(Caption1, {
249
+ color: "tertiary"
250
+ }, previewView.description) : null))) : null, offerView ? /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(Popper, {
251
+ anchorEl: trackRef.current,
252
+ open: true,
253
+ placement: "bottom",
254
+ strategy: "fixed",
255
+ modifiers: POPOVER_MODIFIERS,
256
+ style: {
257
+ zIndex
258
+ }
259
+ }, /*#__PURE__*/React.createElement(StyledViewSwitcherOffer, {
260
+ ref: offerRef,
261
+ role: "group",
262
+ "aria-labelledby": offerTitleId,
263
+ className: "c-view-switcher__offer"
264
+ }, /*#__PURE__*/React.createElement("div", {
265
+ className: "c-view-switcher__offer-title"
266
+ }, offerView.icon, /*#__PURE__*/React.createElement(Body2, {
267
+ id: offerTitleId,
268
+ weight: "bold",
269
+ color: "primary"
270
+ }, offerTitle ? offerTitle(offerView) : "Now in " + offerView.label)), /*#__PURE__*/React.createElement(Button, {
271
+ type: "button",
272
+ variant: "secondary",
273
+ size: "small",
274
+ ref: offerActionRef,
275
+ className: "c-view-switcher__offer-action",
276
+ onClick: applyToAll,
277
+ onKeyDown: handleOfferActionKeyDown
278
+ }, /*#__PURE__*/React.createElement(Caption1, null, applyToAllLabel))))) : null);
279
+ });
280
+ ViewSwitcher.displayName = "ViewSwitcher";
281
+ //# sourceMappingURL=ViewSwitcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewSwitcher.js","names":["React","forwardRef","useCallback","useEffect","useId","useRef","useState","classnames","StyledViewSwitcher","StyledViewSwitcherOffer","StyledViewSwitcherOption","StyledViewSwitcherPreview","StyledViewSwitcherThumbnail","StyledViewSwitcherTrack","Portal","useLayerContext","layers","useForkRef","Button","Popper","Body2","Caption1","ViewIllustration","POPOVER_MODIFIERS","name","options","offset","TABBABLE","matchesFocusVisible","element","matches","_unused","ViewSwitcher","_ref","ref","_views","views","value","onChange","_ref$ariaLabel","ariaLabel","onApplyToAll","_ref$applyToAllLabel","applyToAllLabel","offerTitle","className","onKeyDown","onBlur","rest","_objectWithoutPropertiesLoose","_excluded","_useLayerContext","_useLayerContext$zInd","zIndex","skyscraper","rootRef","handleRootRef","trackRef","optionRefs","offerRef","offerActionRef","_useState","previewId","setPreviewId","_useState2","offerId","setOfferId","offerTitleId","checkedIndex","findIndex","_ref2","id","tabStopId","offerView","find","_ref3","previewView","undefined","_ref4","select","isInside","node","_rootRef$current","_offerRef$current","Boolean","current","contains","focusChecked","_optionRefs$current$t","focus","closeOutside","event","target","document","addEventListener","removeEventListener","handleOptionKeyDown","index","_optionRefs$current$i","last","length","targets","ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End","key","shiftKey","preventDefault","handleRootKeyDown","stopPropagation","handleRootBlur","next","relatedTarget","handleOfferActionKeyDown","Array","from","querySelectorAll","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","applyToAll","createElement","_extends","role","map","view","checked","type","label","tabIndex","onClick","onMouseEnter","onMouseLeave","onFocus","currentTarget","icon","anchorEl","open","placement","strategy","modifiers","style","preview","illustration","weight","color","description","variant","size","displayName"],"sources":["../../../../src/components/ViewSwitcher/ViewSwitcher.tsx"],"sourcesContent":["import React, {\n FocusEvent,\n forwardRef,\n HTMLAttributes,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledViewSwitcher,\n StyledViewSwitcherOffer,\n StyledViewSwitcherOption,\n StyledViewSwitcherPreview,\n StyledViewSwitcherThumbnail,\n StyledViewSwitcherTrack,\n} from \"./Styles\";\nimport { Portal, useLayerContext } from \"../../helpers\";\nimport { layers } from \"../../utils\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Button } from \"../Button\";\nimport { Popper, PopperModifier } from \"../Popper\";\nimport { Body2, Caption1 } from \"../Typography\";\nimport { ViewIllustration, ViewIllustrationType } from \"./ViewIllustration\";\n\nexport interface ViewSwitcherView {\n id: string;\n /** View name: the radio's accessible name and the preview title. */\n label: string;\n /** DS icon element. */\n icon: ReactNode;\n /** Second line of the preview. */\n description?: string;\n /** Thumbnail drawn above the preview title. */\n preview?: ReactNode;\n /** Built-in thumbnail of this kind of view, used when there is no preview. */\n illustration?: ViewIllustrationType;\n}\n\nexport interface ViewSwitcherProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n views: ViewSwitcherView[];\n /** Id of the checked view. */\n value?: string;\n onChange: (id: string) => void;\n /** Accessible name of the radiogroup. */\n \"aria-label\"?: string;\n /** Turns on the extra action offered after a switch. */\n onApplyToAll?: (id: string) => unknown;\n /** Extra action button text. */\n applyToAllLabel?: string;\n /** Title of the extra action popover. Defaults to \"Now in {label}\". */\n offerTitle?: (view: ViewSwitcherView) => ReactNode;\n}\n\nconst POPOVER_MODIFIERS: PopperModifier[] = [\n { name: \"offset\", options: { offset: [0, 6] } },\n];\nconst TABBABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nconst matchesFocusVisible = (element: Element): boolean => {\n try {\n return element.matches(\":focus-visible\");\n } catch {\n return false;\n }\n};\n\n/**\n * @component ViewSwitcher\n * @description\n * Icon-only radiogroup that switches the view of a page. A preview with the view name shows on hover\n * and on keyboard focus. With onApplyToAll, a switch offers an extra action under the switcher.\n *\n * @example\n * <ViewSwitcher\n * aria-label=\"View\"\n * views={[\n * { id: \"list\", label: \"List View\", icon: <ViewListIcon /> },\n * { id: \"grid\", label: \"Grid View\", icon: <ViewGridIcon /> },\n * ]}\n * value={view}\n * onChange={setView}\n * onApplyToAll={applyToAllProjects}\n * />\n */\nexport const ViewSwitcher = forwardRef<HTMLDivElement, ViewSwitcherProps>(\n (\n {\n views,\n value,\n onChange,\n \"aria-label\": ariaLabel = \"View\",\n onApplyToAll,\n applyToAllLabel = \"Apply to All Projects\",\n offerTitle,\n className,\n onKeyDown,\n onBlur,\n ...rest\n },\n ref\n ) => {\n const { zIndex = layers.skyscraper } = useLayerContext();\n const rootRef = useRef<HTMLDivElement | null>(null);\n const handleRootRef = useForkRef(rootRef, ref);\n const trackRef = useRef<HTMLDivElement | null>(null);\n const optionRefs = useRef<Record<string, HTMLButtonElement | null>>({});\n const offerRef = useRef<HTMLDivElement | null>(null);\n const offerActionRef = useRef<HTMLButtonElement | null>(null);\n const [previewId, setPreviewId] = useState<string | null>(null);\n const [offerId, setOfferId] = useState<string | null>(null);\n const offerTitleId = useId();\n\n const checkedIndex = views.findIndex(({ id }) => id === value);\n const tabStopId = views[checkedIndex >= 0 ? checkedIndex : 0]?.id;\n const offerView = views.find(({ id }) => id === offerId);\n const previewView = offerView\n ? undefined\n : views.find(({ id }) => id === previewId);\n\n const select = useCallback(\n (id: string) => {\n if (id === value) {\n return;\n }\n\n onChange(id);\n setPreviewId(null);\n\n if (onApplyToAll) {\n setOfferId(id);\n }\n },\n [onApplyToAll, onChange, value]\n );\n\n // The popovers live in a portal, so \"inside\" covers them as well as the track.\n const isInside = (node: Node | null): boolean =>\n Boolean(\n node &&\n (rootRef.current?.contains(node) || offerRef.current?.contains(node))\n );\n\n const focusChecked = useCallback(() => {\n if (tabStopId) {\n optionRefs.current[tabStopId]?.focus();\n }\n }, [tabStopId]);\n\n useEffect(() => {\n if (!offerId) {\n return undefined;\n }\n\n const closeOutside = (event: MouseEvent): void => {\n if (!isInside(event.target as Node)) {\n setOfferId(null);\n }\n };\n\n document.addEventListener(\"mousedown\", closeOutside);\n\n return () => document.removeEventListener(\"mousedown\", closeOutside);\n }, [offerId]);\n\n const handleOptionKeyDown = (\n event: KeyboardEvent<HTMLButtonElement>,\n index: number\n ): void => {\n const last = views.length - 1;\n const targets: Record<string, number> = {\n ArrowRight: index === last ? 0 : index + 1,\n ArrowDown: index === last ? 0 : index + 1,\n ArrowLeft: index === 0 ? last : index - 1,\n ArrowUp: index === 0 ? last : index - 1,\n Home: 0,\n End: last,\n };\n if (event.key === \"Tab\" && !event.shiftKey && offerActionRef.current) {\n event.preventDefault();\n offerActionRef.current.focus();\n\n return;\n }\n\n const target = targets[event.key];\n\n if (target === undefined) {\n return;\n }\n\n event.preventDefault();\n\n const { id } = views[target];\n\n optionRefs.current[id]?.focus();\n select(id);\n };\n\n const handleRootKeyDown = (event: KeyboardEvent<HTMLDivElement>): void => {\n onKeyDown?.(event);\n\n if (event.key !== \"Escape\" || (!offerId && !previewId)) {\n return;\n }\n\n event.stopPropagation();\n setPreviewId(null);\n\n if (offerId) {\n setOfferId(null);\n focusChecked();\n }\n };\n\n const handleRootBlur = (event: FocusEvent<HTMLDivElement>): void => {\n onBlur?.(event);\n\n const next = event.relatedTarget as Node | null;\n\n if (next && !isInside(next)) {\n setOfferId(null);\n }\n };\n\n const handleOfferActionKeyDown = (\n event: KeyboardEvent<HTMLButtonElement>\n ): void => {\n if (event.key !== \"Tab\") {\n return;\n }\n\n event.preventDefault();\n\n if (event.shiftKey) {\n focusChecked();\n\n return;\n }\n\n // The offer sits in a portal, so Tab goes on from the switcher in the page.\n const next = Array.from(\n document.querySelectorAll<HTMLElement>(TABBABLE)\n ).find(\n (element) =>\n !isInside(element) &&\n Boolean(\n rootRef.current &&\n rootRef.current.compareDocumentPosition(element) &\n Node.DOCUMENT_POSITION_FOLLOWING\n )\n );\n\n if (next) {\n next.focus();\n } else {\n focusChecked();\n setOfferId(null);\n }\n };\n\n const applyToAll = async (): Promise<void> => {\n if (!offerId || !onApplyToAll) {\n return;\n }\n\n const id = offerId;\n\n focusChecked();\n setOfferId(null);\n\n await onApplyToAll(id);\n };\n\n return (\n <StyledViewSwitcher\n ref={handleRootRef}\n className={classnames(\"c-view-switcher\", className)}\n onKeyDown={handleRootKeyDown}\n onBlur={handleRootBlur}\n {...rest}\n >\n <StyledViewSwitcherTrack\n ref={trackRef}\n role=\"radiogroup\"\n aria-label={ariaLabel}\n className=\"c-view-switcher__track\"\n >\n {views.map((view, index) => {\n const checked = view.id === value;\n\n return (\n <StyledViewSwitcherOption\n key={view.id}\n ref={(node: HTMLButtonElement | null) => {\n optionRefs.current[view.id] = node;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={checked}\n aria-label={view.label}\n tabIndex={view.id === tabStopId ? 0 : -1}\n className=\"c-view-switcher__option\"\n onClick={() => select(view.id)}\n onKeyDown={(event: KeyboardEvent<HTMLButtonElement>) =>\n handleOptionKeyDown(event, index)\n }\n onMouseEnter={() => setPreviewId(view.id)}\n onMouseLeave={() => setPreviewId(null)}\n onFocus={(event: FocusEvent<HTMLButtonElement>) => {\n if (matchesFocusVisible(event.currentTarget)) {\n setPreviewId(view.id);\n }\n }}\n onBlur={() => setPreviewId(null)}\n >\n {view.icon}\n </StyledViewSwitcherOption>\n );\n })}\n </StyledViewSwitcherTrack>\n {previewView ? (\n <Portal>\n <Popper\n anchorEl={optionRefs.current[previewView.id]}\n open\n placement=\"bottom\"\n strategy=\"fixed\"\n modifiers={POPOVER_MODIFIERS}\n style={{ zIndex }}\n aria-hidden=\"true\"\n >\n <StyledViewSwitcherPreview className=\"c-view-switcher__preview\">\n {previewView.preview ? (\n <StyledViewSwitcherThumbnail>\n {previewView.preview}\n </StyledViewSwitcherThumbnail>\n ) : previewView.illustration ? (\n <StyledViewSwitcherThumbnail>\n <ViewIllustration type={previewView.illustration} />\n </StyledViewSwitcherThumbnail>\n ) : null}\n <Caption1 weight=\"bold\" color=\"primary\">\n {previewView.label}\n </Caption1>\n {previewView.description ? (\n <Caption1 color=\"tertiary\">\n {previewView.description}\n </Caption1>\n ) : null}\n </StyledViewSwitcherPreview>\n </Popper>\n </Portal>\n ) : null}\n {offerView ? (\n <Portal>\n <Popper\n anchorEl={trackRef.current}\n open\n placement=\"bottom\"\n strategy=\"fixed\"\n modifiers={POPOVER_MODIFIERS}\n style={{ zIndex }}\n >\n <StyledViewSwitcherOffer\n ref={offerRef}\n role=\"group\"\n aria-labelledby={offerTitleId}\n className=\"c-view-switcher__offer\"\n >\n <div className=\"c-view-switcher__offer-title\">\n {offerView.icon}\n <Body2 id={offerTitleId} weight=\"bold\" color=\"primary\">\n {offerTitle\n ? offerTitle(offerView)\n : `Now in ${offerView.label}`}\n </Body2>\n </div>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"small\"\n ref={offerActionRef}\n className=\"c-view-switcher__offer-action\"\n onClick={applyToAll}\n onKeyDown={handleOfferActionKeyDown}\n >\n <Caption1>{applyToAllLabel}</Caption1>\n </Button>\n </StyledViewSwitcherOffer>\n </Popper>\n </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EAAE,gBAElBrD,KAAA,CAAA4H,aAAA,CAACnH,uBAAuB;IACtByB,GAAG,EAAEyB,QAAS;IACdmE,IAAI,EAAC,OAAO;IACZ,mBAAiB3D,YAAa;IAC9BtB,SAAS,EAAC;EAAwB,gBAElC7C,KAAA,CAAA4H,aAAA;IAAK/E,SAAS,EAAC;EAA8B,GAC1C4B,SAAS,CAACiE,IAAI,eACf1I,KAAA,CAAA4H,aAAA,CAACxG,KAAK;IAACmD,EAAE,EAAEJ,YAAa;IAACgF,MAAM,EAAC,MAAM;IAACC,KAAK,EAAC;EAAS,GACnDxG,UAAU,GACPA,UAAU,CAAC6B,SAAS,CAAC,eACXA,SAAS,CAAC0D,KACnB,CACJ,CAAC,eACNnI,KAAA,CAAA4H,aAAA,CAAC1G,MAAM;IACLgH,IAAI,EAAC,QAAQ;IACboB,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,OAAO;IACZrH,GAAG,EAAE0B,cAAe;IACpBf,SAAS,EAAC,+BAA+B;IACzCwF,OAAO,EAAEV,UAAW;IACpB7E,SAAS,EAAEsE;EAAyB,gBAEpCpH,KAAA,CAAA4H,aAAA,CAACvG,QAAQ,QAAEsB,eAA0B,CAC/B,CACe,CACnB,CACF,CAAC,GACP,IACc,CAAC;AAEzB,CACF,CAAC;AAEDX,YAAY,CAACwH,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export * from "./ViewSwitcher";
2
+ export * from "./ViewIllustration";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./ViewSwitcher";
2
+ export * from "./ViewIllustration";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ViewSwitcher/index.ts"],"sourcesContent":["export * from \"./ViewSwitcher\";\nexport * from \"./ViewIllustration\";\n"],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB","ignoreList":[]}
@@ -51,6 +51,7 @@ export * from "./Window";
51
51
  export * from "./ValueButton";
52
52
  export * from "./PillButton";
53
53
  export * from "./PillGroup";
54
+ export * from "./ViewSwitcher";
54
55
  export * from "./Select";
55
56
  export * from "./SelectTrigger";
56
57
  export * from "./SelectTime";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAg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AAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
@@ -51,6 +51,7 @@ export * from "./Window";
51
51
  export * from "./ValueButton";
52
52
  export * from "./PillButton";
53
53
  export * from "./PillGroup";
54
+ export * from "./ViewSwitcher";
54
55
  export * from "./Select";
55
56
  export * from "./SelectTrigger";
56
57
  export * from "./SelectTime";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from \"./Button\";\nexport * from \"./CaretButton\";\nexport * from \"./ButtonGroup\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./CounterButton\";\nexport * from \"./Steppers\";\nexport * from \"./Tables\";\nexport * from \"./CompleteCheckbox\";\nexport * from \"./Paper\";\nexport * from \"./ScaleBar\";\nexport * from \"./Card\";\nexport * from \"./EntityCard\";\nexport * from \"./EntitiesHeader\";\nexport * from \"./Signifier\";\nexport * from \"./Avatar\";\nexport * from \"./Tag\";\nexport * from \"./Loaders\";\nexport * from \"./Nav\";\nexport * from \"./SideNav\";\nexport * from \"./Bubble\";\nexport * from \"./Input\";\nexport * from \"./Display\";\nexport * from \"./DrilldownMenu\";\nexport * from \"./Menu\";\nexport * from \"./Expanders\";\nexport * from \"./DatePicker\";\nexport * from \"./List\";\nexport * from \"./MenuSelector\";\nexport * from \"./MultiAvatar\";\nexport * from \"./RadioButton\";\nexport * from \"./RadioCard\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScrollShadow\";\nexport * from \"./Icons\";\nexport * from \"./Textarea\";\nexport * from \"./Modal\";\nexport * from \"./Sheet\";\nexport * from \"./Header\";\nexport * from \"./AutoResizeTextarea\";\nexport * from \"./Overlay\";\nexport * from \"./Accordion\";\nexport * from \"./Choose\";\nexport * from \"./ChooseV2\";\nexport * from \"./Links\";\nexport * from \"./SelectDate\";\nexport * from \"./Popper\";\nexport * from \"./ToastMessage\";\nexport * from \"./Tooltip\";\nexport * from \"./Transitions\";\nexport * from \"./Window\";\nexport * from \"./ValueButton\";\nexport * from \"./PillButton\";\nexport * from \"./PillGroup\";\nexport * from \"./Select\";\nexport * from \"./SelectTrigger\";\nexport * from \"./SelectTime\";\nexport * from \"./Dialog\";\nexport * from \"./ObjectFormModal\";\nexport * from \"./ConfirmDialog\";\nexport * from \"./Checkbox\";\nexport * from \"./Toggle\";\nexport * from \"./Typography\";\nexport * from \"./Autocomplete\";\nexport * from \"./ComboBox\";\nexport * from \"./Button/AddToListButton\";\nexport * from \"./PortableText\";\nexport * from \"./ProgressBar\";\nexport * from \"./ProgressPie\";\nexport * from \"./Reactions\";\nexport * from \"./Label\";\nexport * from \"./GlobalPortal\";\nexport * from \"./GlobalStyle\";\nexport * from \"./ProgressRing\";\nexport * from \"./EditableContent\";\nexport * from \"./EditableText\";\nexport * from \"./EditableHours\";\nexport * from \"./EditableCurrency\";\nexport * from \"./Folder\";\nexport * from \"./Chip\";\nexport * from \"./Trigger\";\nexport * from \"./Dot\";\nexport * from \"./Entity\";\nexport * from \"./Filter\";\nexport * from \"./Wizard\";\nexport * from \"./ContentWizard\";\nexport * from \"./IconButton\";\nexport * from \"./Typography\";\nexport * from \"./Badge\";\nexport * from \"./AvatarGroup\";\nexport * from \"./CommandPalette\";\nexport * from \"./EmptySlate\";\nexport * from \"./NoResultsSlate\";\nexport * from \"./FilterInput\";\nexport * from \"./Toolbar\";\nexport * from \"./InfoBox\";\nexport * from \"./Sort\";\nexport * from \"./StepSequence\";\nexport * from \"./StackedCard\";\nexport * from \"./Stack\";\nexport * from \"./Row\";\nexport * from \"./Columns\";\nexport * from \"./Tiles\";\nexport * from \"./Media\";\nexport * from \"./TitledText\";\nexport * from \"./LayoutTokens\";\nexport * from \"./Section\";\nexport * from \"./Collapse\";\nexport * from \"./LabeledDivider\";\nexport * from \"./FloatingPill\";\nexport * from \"./ClampedContent\";\nexport * from \"./ResizeHandle\";\nexport * from \"./ObjectLayout\";\nexport * from \"./ListRow\";\nexport * from \"./FileTile\";\nexport * from \"./EditorFrame\";\nexport * from \"./PropertyList\";\nexport * from \"./MessageBubble\";\nexport * from \"./DockedCard\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,oBAAoB;AAClC,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,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AAgB;AAC9B,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from \"./Button\";\nexport * from \"./CaretButton\";\nexport * from \"./ButtonGroup\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./CounterButton\";\nexport * from \"./Steppers\";\nexport * from \"./Tables\";\nexport * from \"./CompleteCheckbox\";\nexport * from \"./Paper\";\nexport * from \"./ScaleBar\";\nexport * from \"./Card\";\nexport * from \"./EntityCard\";\nexport * from \"./EntitiesHeader\";\nexport * from \"./Signifier\";\nexport * from \"./Avatar\";\nexport * from \"./Tag\";\nexport * from \"./Loaders\";\nexport * from \"./Nav\";\nexport * from \"./SideNav\";\nexport * from \"./Bubble\";\nexport * from \"./Input\";\nexport * from \"./Display\";\nexport * from \"./DrilldownMenu\";\nexport * from \"./Menu\";\nexport * from \"./Expanders\";\nexport * from \"./DatePicker\";\nexport * from \"./List\";\nexport * from \"./MenuSelector\";\nexport * from \"./MultiAvatar\";\nexport * from \"./RadioButton\";\nexport * from \"./RadioCard\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScrollShadow\";\nexport * from \"./Icons\";\nexport * from \"./Textarea\";\nexport * from \"./Modal\";\nexport * from \"./Sheet\";\nexport * from \"./Header\";\nexport * from \"./AutoResizeTextarea\";\nexport * from \"./Overlay\";\nexport * from \"./Accordion\";\nexport * from \"./Choose\";\nexport * from \"./ChooseV2\";\nexport * from \"./Links\";\nexport * from \"./SelectDate\";\nexport * from \"./Popper\";\nexport * from \"./ToastMessage\";\nexport * from \"./Tooltip\";\nexport * from \"./Transitions\";\nexport * from \"./Window\";\nexport * from \"./ValueButton\";\nexport * from \"./PillButton\";\nexport * from \"./PillGroup\";\nexport * from \"./ViewSwitcher\";\nexport * from \"./Select\";\nexport * from \"./SelectTrigger\";\nexport * from \"./SelectTime\";\nexport * from \"./Dialog\";\nexport * from \"./ObjectFormModal\";\nexport * from \"./ConfirmDialog\";\nexport * from \"./Checkbox\";\nexport * from \"./Toggle\";\nexport * from \"./Typography\";\nexport * from \"./Autocomplete\";\nexport * from \"./ComboBox\";\nexport * from \"./Button/AddToListButton\";\nexport * from \"./PortableText\";\nexport * from \"./ProgressBar\";\nexport * from \"./ProgressPie\";\nexport * from \"./Reactions\";\nexport * from \"./Label\";\nexport * from \"./GlobalPortal\";\nexport * from \"./GlobalStyle\";\nexport * from \"./ProgressRing\";\nexport * from \"./EditableContent\";\nexport * from \"./EditableText\";\nexport * from \"./EditableHours\";\nexport * from \"./EditableCurrency\";\nexport * from \"./Folder\";\nexport * from \"./Chip\";\nexport * from \"./Trigger\";\nexport * from \"./Dot\";\nexport * from \"./Entity\";\nexport * from \"./Filter\";\nexport * from \"./Wizard\";\nexport * from \"./ContentWizard\";\nexport * from \"./IconButton\";\nexport * from \"./Typography\";\nexport * from \"./Badge\";\nexport * from \"./AvatarGroup\";\nexport * from \"./CommandPalette\";\nexport * from \"./EmptySlate\";\nexport * from \"./NoResultsSlate\";\nexport * from \"./FilterInput\";\nexport * from \"./Toolbar\";\nexport * from \"./InfoBox\";\nexport * from \"./Sort\";\nexport * from \"./StepSequence\";\nexport * from \"./StackedCard\";\nexport * from \"./Stack\";\nexport * from \"./Row\";\nexport * from \"./Columns\";\nexport * from \"./Tiles\";\nexport * from \"./Media\";\nexport * from \"./TitledText\";\nexport * from \"./LayoutTokens\";\nexport * from \"./Section\";\nexport * from \"./Collapse\";\nexport * from \"./LabeledDivider\";\nexport * from \"./FloatingPill\";\nexport * from \"./ClampedContent\";\nexport * from \"./ResizeHandle\";\nexport * from \"./ObjectLayout\";\nexport * from \"./ListRow\";\nexport * from \"./FileTile\";\nexport * from \"./EditorFrame\";\nexport * from \"./Propert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